This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%alias: | |
Define an alias for a system command. | |
%alias_magic: | |
%alias_magic [-l] [-c] name target | |
%autocall: | |
Make functions callable without having to type parentheses. | |
%automagic: | |
Make magic functions callable without having to type the initial %. | |
%bookmark: | |
Manage IPython's bookmark system. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.myurl.myapp; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.app.ProgressDialog; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def even(x): | |
return x % 2 == 0 | |
[num for num in range(10) if even(num)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def even(x): | |
return x % 2 == 0 | |
list(__builtin__.filter(even, range(10))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math as m | |
x=float('nan') | |
m.isnan(x) # True | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#Show how to make and save a simple line plot with labels, title and grid | |
#modified from matplotlib official tutorial @ http://www.scipy.org/Plotting_Tutorial | |
#Run directly on iPython shell | |
import numpy | |
import pylab | |
pylab.interactive(True) | |
pylab.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shutil | |
shutil.copy('/home/user/acetylene.xyz', '/home/user/backup/') | |
## if you want to preserve the meta-data of acetylene.txt | |
## then you should use shutil.copy2() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Convert "yes or no" prompts to "y or n" instead | |
(fset 'yes-or-no-p 'y-or-n-p) | |
;; [Home] & [End] key will take you to beginning & end of line | |
(global-set-key [home] 'beginning-of-line) | |
(global-set-key [end] 'end-of-line) | |
;; displays the time in the status bar | |
(display-time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Use [Delete] key to delete selected characters | |
(global-set-key [delete] 'delete-char) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 1 | |
C | |
H 1 1.08515 | |
C 1 1.49318 2 120.10198 | |
O 1 1.22026 2 119.76319 3 180.02562 | |
H 3 1.11007 1 109.81648 2 359.97438 | |
H 3 1.11015 1 109.75404 2 240.10815 | |
H 3 1.11015 1 109.75404 2 119.89178 |
NewerOlder