Test
View Test.md
Test
View wids16-Intro-to-Python.md
WiDS Python class
Getting started with Python can confusing. Hopefully, this clarifies somethings. In this class, we will go over basic concepts to give you a solid intro to the Python programming language.
- Python 2 vs Python 3
- python interpretor vs ipython vs code editor vs notebook
- Anaconda vs virtualenv vs no virtualenv (Advanced intro)
Repos referenced in this class
View data.json
{ | |
"nodes":[ | |
{"name":"node1","group":1}, | |
{"name":"node2","group":2}, | |
{"name":"node3","group":2}, | |
{"name":"node4","group":3} | |
], | |
"links":[ | |
{"source":2,"target":1,"weight":1}, | |
{"source":0,"target":2,"weight":3} |
View settings.sublime
{ | |
"auto_complete": false, | |
"caret_style": "solid", | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
"*.pid", |
View Python
def parse_abbr_from_name(name_abbr): | |
''' Function to parse the abbreviation from the name ''' | |
try: | |
name, abbr = name_abbr.strip(')').split('(') | |
# If there are no '( )', then only one value will return, which | |
# means that there is no abbreviation, there is only a name. | |
except ValueError: | |
name = name_abbr | |
abbr = None |
View django-jinja-integration-error
Environment: | |
Request Method: GET | |
Request URL: http://localhost:8000/ | |
Django Version: 1.6.5 | |
Python Version: 3.4.1 | |
Installed Applications: | |
('django.contrib.admin', |
View gist:46c27fd2e73228322078
flake8 | |
django-debug-toolbar | |
ipython |
View foia-core-setup
-------------------------- | |
Project setup | |
-------------------------- | |
clone repo | |
brew install python3 | |
mkvirtualenv --python=/usr/local/bin/python3 foia-core | |
cd ~/Project/code/foia/foia-core |
View export_repo_issues_to_csv.py
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import sys | |
import requests |
NewerOlder