##Install Python
http://www.python.org/getit/
##Install sqlite3
https://sqlite.org/download.html
| Link for xml containing country codes and regions | |
| http://opencirce.org/data/country-DAC-UN.xml |
| { | |
| "countries": { | |
| "country": [ | |
| { | |
| "ISO3166": "AF", | |
| "name": "Afghanistan", | |
| "UNRegionCode": "034", | |
| "UNRegionName": "Southern Asia", | |
| "DACRegionCode": "689", | |
| "DACRegionName": "South & Central Asia" |
##Install Python
http://www.python.org/getit/
##Install sqlite3
https://sqlite.org/download.html
| [2014/2/21] Works with MOTOX: | |
| Name: cc | |
| APN: ccdata | |
| Proxy: [Not set] | |
| Port: [Not set] | |
| Username: [Not set] | |
| Password: [Not set] | |
| Server: http://mmsc.mobile.att.net | |
| MMSC: http://mmsc.mobile.att.net | |
| MMS proxy: 66.209.11.32 |
| # Publish progress to redis | |
| # publish the status of a long running parallel from ipy cluster process to a redis server | |
| # a webservice can then read this and feed it to a javascript visualization | |
| def pub_to_redis(pres, title): | |
| import Redis | |
| r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
| n = len(pres) | |
| p = ProgressBar.ProgressBar(n) | |
| while True: |
| in upload handler | |
| in file close | |
| .. | |
| ---------------------------------------------------------------------- | |
| Ran 2 tests in 0.021s | |
| OK |
| from IPython.html import widgets # Loads the Widget framework. | |
| from IPython.core.magics.namespace import NamespaceMagics | |
| def _fill(): | |
| v = _var_name.value | |
| try: | |
| ve = eval(v) | |
| vtype = type(ve).__name__ | |
| _modal_body_label.value = str(ve)[:20] | |
| if vtype == 'DataFrame': |
| # This code publishes HITS in same batch on Amazon Mechanical Turk | |
| import mturk # check out https://github.com/ctrlcctrlv/mturk-python | |
| conf = { | |
| "use_sandbox" : True, | |
| "stdout_log" : False, | |
| "verify_mturk_ssl" : True, | |
| "aws_key" : "your_key", | |
| "aws_secret_key" : "your_secret" | |
| } |
| Today, I was imagining Ipython notebooks in a different way. | |
| I was thinking about a non linear way of writing code. The current linear way means we write a code cell and then execute and then write another. If I would like to connect the output of one cell to another, I have to do it manually or create a function. | |
| I wish we could set a cell of code as a code block, that can be easily be found by other notebooks. | |
| So I dont have to copy paste the cell or create a module for the cell. | |
| I wonder if we could also share code cell in an online repository. One starting point would be to make cells out of stackoverflow code blocks. | |
| Stackoverflow search and import inside the notebooks! Thats a good idea. |