cd /home/will/Documents/code/tradePy/wcm/wcmStringPY
/home/will/Documents/code/tradePy/wcm/wcmStringPY
Changed directories to where my python scripts are kept.
from numpy import *
import random
array([10,20,30])
array([10, 20, 30])
%edit
IPython will make a temporary file named: /tmp/ipython_edit_oVCETB.py
blahRan = random.randint(0,30)
waxNum = array([blahRan, blahRan, blahRan])
print waxNum
cenRan = blahRan * blahRan
print cenRan
a = array([[0,1,2,3,4],[9,8,7,6]])
array_split(a,3,axis=0)
names = arange(22)
names = names.reshape(6,4,4)
print names
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-56-aec13dd51370> in <module>() 1 names = arange(22) ----> 2 names = names.reshape(6,4,4) 3 print names ValueError: total size of new array must be unchanged
c = a * 2
print c
[[0, 1, 2, 3, 4, 0, 1, 2, 3, 4] [9, 8, 7, 6, 9, 8, 7, 6]]
voteUp = open('voteUp','r')
d = array(voteUp, voteDown)
print d
--------------------------------------------------------------------------- IOError Traceback (most recent call last) <ipython-input-58-7e582bd0ef04> in <module>() ----> 1 voteUp = open('voteUp','r') 2 3 d = array(voteUp, voteDown) 4 print d IOError: [Errno 2] No such file or directory: 'voteUp'
arDon = 'adele'
arCreat = open('subrd','w')
arCreat.write(arDon)
arCreat.close()
reddit = open('subrd','r')
for data in reddit:
print data
adele
helloWor = ('"hello world"')
subZed = open('titleData','w')
subZed.write(helloWor)
print helloWor
"hello world"
swaWor = helloWor.capitalize()
for swa in swaWor:
print swaWor + ':'
print ':'
print ' :'
print ' :'
"hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : : "hello world": : : :
zedTouch = arange(100)
print zedTouch
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99]
for data in zedTouch:
print data
lisData = list(zedTouch)
print lisData
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]
creDoc = open('doc','w')
creDoc.write()
creDoc.close()
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-66-ee28cfc50dae> in <module>() 1 creDoc = open('doc','w') ----> 2 creDoc.write() 3 creDoc.close() 4 TypeError: function takes exactly 1 argument (0 given)
doc = open('doc','r')
for info in doc:
print info
%%bash
cmatrix
Process is terminated.
ls
arredpy.py LastData subrd TradeSort.py.save.1 artTweet.ipynb __pycache__/ title tradeTex.py.save autopy/ README.md titleData tradeText.py cat.jpg redditdrawn TradeCons.py twitter.txt doc redDrawn.py tradeLast.py will_string.py gpl.txt result trademe.py will_string.pyc imagePic StringRev.py TradePress.py index.html StringRev.pyc TradeSort.py.save
import django
django.VERSION
(1, 5, 2, 'final', 0)
print djaVer
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-72-6a21eb3b555c> in <module>() ----> 1 print djaVer NameError: name 'djaVer' is not defined
x = list('1')
print x
b = x + ['1']
print b
finData =lisData + b
print finData
impo
checkTime = time
print kirAge
%%python3
import email
x = email
import json
import requests
myUrl = requests.get('http://artcontrol.me/?wpapi=get_posts&dev=0')
for info in myUrl:
print info
double = info['posts']['excerpt']
print double
x = open('urlSave','r')
devArt = requests.get('http://backend.deviantart.com/oembed?url=http://k1l-3m-al.deviantart.com/art/Selfportrait-214486259')
devArt = json.load(devArt)
for dev in devArt:
print dev
devTitle = dev['title']
print devTitle