View 0_urllib2.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
View oh-god.py
def main():
import os, time
menu_selection = 0
while menu_selection != 5:
clear_screen()
mainmenu()
if menu_selection == 1:
clear_screen()
print_instructions()
elif menu_selection == 2:
View backup (mariadb)
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
View sync.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Kenneth Reitz's GitHub Syncer
This script uses the GitHub API to get a list of all forked, mirrored, public, and
private repos in your GitHub account. If the repo already exists locally, it will
update it via git-pull. Otherwise, it will properly clone the repo.
It will organize your repos into the following directory structure:
View gist:885658
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
View t.py
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)
View h22.py
import h2
import h2.connection
import h2.events
import h11
H1Response = h11.Response
H2Response = h2.events.ResponseReceived
InformationalResponse = h11.InformationalResponse
Data = h11.Data
View fish_prompt.fish
# 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:
#
View future.py
import requests
session = requests.AsyncSession()
async def _main():
rs = []
for _ in range(100):
rs.append(await session.get('http://httpbin.org/get'))
print(rs)
View pipenv-help.md

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