Skip to content

Instantly share code, notes, and snippets.

View jeremy886's full-sized avatar
🌴
moving to a country town

Jeremy Chen jeremy886

🌴
moving to a country town
  • Hamilton, VIC, Australia
View GitHub Profile
@jeremy886
jeremy886 / bingo.py
Last active August 29, 2015 14:07 — forked from matthiaseisen/bingo.py
# The MIT License (MIT)
#
# Copyright (c) 2014 Matthias Eisen (http://www.matthiaseisen.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jeremy886
jeremy886 / a5_1.py
Last active August 29, 2015 14:13 — forked from ciscorn/a5_1.py
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import mm
c = canvas.Canvas("hello.pdf", pagesize=A4)
width, height = A4
numv = int((width - ((4 + 4) * mm)) / (5 * mm))
numh = int((height / 2.0 - ((12.5 + 2) * mm)) / (5 * mm))
voff = (width - numv * 5 * mm) / 2.0
@jeremy886
jeremy886 / countryinfo.py
Created September 20, 2016 12:05 — forked from pamelafox/countryinfo.py
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
@jeremy886
jeremy886 / jupyter_shortcuts.md
Created December 28, 2016 01:54 — forked from kidpixo/jupyter_shortcuts.md
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Toc

Keyboard shortcuts

The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.

MacOS modifier keys:

  • ⌘ : Command
@jeremy886
jeremy886 / gist:89cd76e9c1a228f0601502dcba53c5dd
Created November 19, 2017 21:37 — forked from speric/gist:6096965
vimtutor Lesson Summaries
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.
@jeremy886
jeremy886 / python3.7-es6-comparison.md
Last active June 28, 2018 04:41 — forked from revolunet/python-es6-comparison.md
# Python3.6 VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 3.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math