Skip to content

Instantly share code, notes, and snippets.

View kennethreitz's full-sized avatar
🐍

Kenneth Reitz kennethreitz

🐍
View GitHub Profile
$ cat t.py
from pprint import pprint
from pytheory import Tone, Fretboard, charts_for_fretboard


tones = (
    Tone.from_string("F2"),
    Tone.from_string("C3"),
    Tone.from_string("G3"),

Tone.from_string("D4"),

@kennethreitz
kennethreitz / scales.py
Created July 15, 2018 18:01
a work in progress
class Tone:
MAX = 12
TONE_DICT = {
0: ("C",),
1: ("C#", "Db"),
2: ("D",),
3: ("D#", "Eb"),
4: ("E",),
5: ("F",),
6: ("F#", "Gb"),
version: '2'
services:
phabricator:
environment:
- PHABRICATOR_HOST=mydomain.com
- MYSQL_HOST=mariadb
- MYSQL_USER=root
- MYSQL_PASS=asdf123
- SSL_TYPE=external
- PHABRICATOR_HOST=code.kennethreitz.org
import requests3
import trio
session = requests3.AsyncSession()
async def main():
async def request():
r = await session.get('http://127.0.0.1:8000/uuid', stream=False)
import h2
import h2.connection
import h2.events
import h11
H1Response = h11.Response
H2Response = h2.events.ResponseReceived
InformationalResponse = h11.InformationalResponse
Data = h11.Data

Pipenv version: '11.1.9'

Pipenv location: '/Volumes/KR/Library/Mobile Documents/com~apple~CloudDocs/repos/pypa/pipenv/pipenv'

Python location: '/Volumes/KR/.local/share/virtualenvs/pipenv-Uf7eyyXP/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7
  • 2.7: /usr/bin/python2.7
@kennethreitz
kennethreitz / jenkins.css
Created March 7, 2018 11:38
Custom Jenkins theme for Mercury.
// https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-green.css
@charset “utf-8”;
.console-output :not(div.ace_editor) {
font-family: "Operator Mono Nerd Font SSm", "Menlo", "Courier"!important;
font-weight: 400;
}
#jenkins-head-icon {
@kennethreitz
kennethreitz / reddit.py
Created March 1, 2018 18:15 — forked from alexritter96/reddit.py
dumb reddit scraping
import json
import praw
reddit = praw.Reddit(
client_id='',
client_secret='',
password='',
user_agent='',
username=''
)
# name: bobthefish
#
# bobthefish is a Powerline-style, Git-aware fish theme optimized for awesome.
#
# You will need a Powerline-patched font for this to work:
#
# https://powerline.readthedocs.org/en/master/installation.html#patched-fonts
#
# I recommend picking one of these:
#
@kennethreitz
kennethreitz / ugly.py
Last active September 6, 2018 14:39 — forked from j00bar/ugly.py
for foo in bar:
if not condition_one:
win_the_points()
else:
if check_the_thing():
continue
else:
if do_some_stuff():
do_the_thing()
else: