Installed package list on my Sublime Text 3.
- AdvancedNewFile
- All Autocomplete
- AndyPHP
- AngularJS
| // Highcharts CheatSheet Part 1. | |
| // Create interactive charts easily for your web projects. | |
| // Download: http://www.highcharts.com/download | |
| // More: http://api.highcharts.com/highcharts | |
| // 1. Installation. | |
| // Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks. | |
| // <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
| // <script src="https://code.highcharts.com/highcharts.js"></script> |
| ## Python3.3 | |
| Python3.3 is not in the package list for ubuntu any longer, so you need to add a new repo to the standard repo list for apt-get | |
| > sudo add-apt-repository ppa:fkrull/deadsnakes | |
| You may read the PPA description in the output and then: | |
| Install Python 3.3.5 via: | |
| > sudo apt-get update; sudo apt-get install python3.3 |
| # dictionary of state: state_abbreviations | |
| {'Vermont': 'VT', 'New York': 'NY', 'Illinois': 'IL', 'Arkansas': 'AR', 'Hawaii': 'HI', 'Montana': 'MT', 'Minnesota': 'MN', 'Delaware': 'DE', 'South Carolina': 'SC', 'Indiana': 'IN', 'Oregon': 'OR', 'Tennessee': 'TN', 'Idaho': 'ID', 'Washington': 'WA', 'Michigan': 'MI', 'North Dakota': 'ND', 'South Dakota': 'SD', 'Massachusetts': 'MA', 'Utah': 'UT', 'Connecticut': 'CT', 'Arizona': 'AZ', 'Iowa': 'IA', 'Texas': 'TX', 'West Virginia': 'WV', 'California': 'CA', 'Georgia': 'GA', 'Pennsylvania': 'PA', 'Missouri': 'MO', 'Wyoming': 'WY', 'Nebraska': 'NE', 'Louisiana': 'LA', 'Virginia': 'VA', 'Colorado': 'CO', 'Florida': 'FL', 'North Carolina': 'NC', 'New Mexico': 'NM', 'Mississippi': 'MS', 'Ohio': 'OH', 'Kentucky': 'KY', 'New Hampshire': 'NH', 'Alaska': 'AK', 'Oklahoma': 'OK', 'Maine': 'ME', 'Alabama': 'AL', 'New Jersey': 'NJ', 'Maryland': 'MD', 'Kansas': 'KS', 'Nevada': 'NV', 'Rhode Island': 'RI', 'Wisconsin': 'WI'} |
| SELECT 'a', * FROM | |
| ( | |
| SELECT * FROM car_portal_app.a | |
| EXCEPT ALL | |
| SELECT * FROM car_portal_app.b | |
| ) v1 | |
| UNION ALL | |
| SELECT 'b', * FROM | |
| ( | |
| SELECT * FROM car_portal_app.b |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
| library(RPostgreSQL) | |
| # create a connection | |
| # save the password | |
| pw <- "password" | |
| # alteratively, store in an external file. | |
| ps <- readline(file('password.txt', open = 'r')) | |
| # loads the PostgreSQL driver |
| from collections import deque | |
| class State(object): | |
| """ | |
| """ | |
| def __init__(self, value, parent, start = 0, goal = 0): | |
| self.children = [] | |
| self.parent = parent |
| def ca(): | |
| ''' Celluar automata ''' | |
| # 64 vaues in a row, all Boolean - True(1) : '*' | |
| # - False(0): ' ' | |
| # Rule - the status of current cell value is True | |
| # if only one of the two neighbors at the previous step is True('*') | |
| # otherwise, the current cell status is False(' ') | |
| # initial list representing the current status of 64 cells | |
| ca = [ |
| import requests | |
| from lxml import html | |
| import sys | |
| import urlparse | |
| response = requests.get('http://imgur.com/') | |
| parsed_body = html.fromstring(response.text) | |
| # Grab links to all images | |
| images = parsed_body.xpath('//img/@src') |