科学网

 找回密码
  注册
Linux: kill jobs
刘洋洋 2016-12-16 17:52
yliu@bkli03l007:~$ xkill Select the window whose client you wish to kill with button 1.... xkill: killing creator of resource 0x3c00df1 yliu@bkli03l007:~$ firefox 1338 yliu@bkli03l007:~$ (firefox:1338): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object ...
个人分类: Linux|2810 次阅读|没有评论
Shell: make your shell scripts executable
刘洋洋 2016-12-16 17:46
In some cases when: you get a shell script from other people; download it online or change the path of it etc., you may encounter such message - Permission denied - when it is run on your computer again. One possible reason is the shell script become inexecutable. Then do this in Linux t ...
个人分类: Linux|1628 次阅读|没有评论
RS: how to download MODIS-Aqua Level 2 data
刘洋洋 2016-12-16 00:21
1. Go to NASA Oceancolor Webpage: http://oceancolor.gsfc.nasa.gov/cms/ 2. DATA - Data Browsers - Level 12 Browser , and the download screen is displayed with a number of sections (see below pictures): Top left: sensor dataset selection; Top middle and right: geographic ...
个人分类: Ocean optics|2497 次阅读|没有评论
Python 2: object.method(arguments)
刘洋洋 2016-11-18 19:32
# object . method(arguments) age= age .append (30) age height= age .extend (height) age apples= apples .co u nt ('apples') # count how many times apples appears. 3 ...
个人分类: Python|1937 次阅读|没有评论
Python 2: concatenate arrays
刘洋洋 2016-11-18 17:12
a= b= c=a + b print c a * 3
个人分类: Python|1612 次阅读|没有评论
Python: check if something is a member of a variable
刘洋洋 2016-11-18 16:59
# built-in function - i n country='Deutschland' ' y ' in country False ' a ' in country True 'b' not in country True family= 'bro' in family False &# ...
个人分类: Python|1484 次阅读|没有评论
Python 2: index and change elements of variables
刘洋洋 2016-11-18 16:12
family= # index from the very beginning, the sequence of each element is: 0 1 2 3 4 5 ... NOTE it starts from 0 ! family 'mom' family 'sis' family 'dog' list ( family ) # index from backwar ...
个人分类: Python|1600 次阅读|没有评论
Python 2: strings
刘洋洋 2016-11-17 23:02
# double or single quotes 'hey yy' 'hey yy' hey yy 'hey yy' he's a handsome man he's a handsome man 'he ' s a handsome man' he's a handsome man 'he sai ...
个人分类: Python|1410 次阅读|没有评论
Python 3: Module math - mathematical functions
刘洋洋 2016-11-17 22:35
import math # math.floor(x) returns the floor of x as a float, the largest integer value less than or equal to x. math.floor(9.2) 9.0 # math.sqrt(x) returns the square root of x. math.sqrt(81) 9.0 # math.pow(x,y) returns x raised to the power y ...
个人分类: Python|2582 次阅读|没有评论

本页有 1 篇博文因作者的隐私设置或未通过审核而隐藏

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-11 19:42

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部