Skip to content

Instantly share code, notes, and snippets.

from collections import defaultdict
output = defaultdict(list)
for item in data:
output[item["owner"]].append(item["pet"])
# output is =>
defaultdict(list,
{'Kent': ['Shiner'],
'Mary': ['Pumpkin', 'Tasha'],
'Paige': ['Sushi'],
{
"name": "ccapp",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-preset-react-native-stage-0": "^1.0.1",
"jest-expo": "^22.0.0",
"react-native-cli": "^2.0.1",
"react-test-renderer": "16.0.0-beta.5"
},

Keybase proof

I hereby claim:

  • I am crazypython on github.
  • I am crazypython (https://keybase.io/crazypython) on keybase.
  • I have a public key ASBoEYW7zHd-NPg0WIpavH6srAP2S9M4MB7JOtaLPphEqAo

To claim this, I am signing this object:

@CrazyPython
CrazyPython / CLA
Last active May 11, 2017 21:07 — forked from CLAassistant/SAP_CLA
Contributor License Agreement
###Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by James Lu and Avery Ozkal or their affiliates. This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to James Lu and Avery Ozkal in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact support@avertly.co.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to James Lu and Avery Ozkal
@CrazyPython
CrazyPython / # inkscape - 2017-04-10_21-17-26.txt
Created April 11, 2017 01:20
inkscape (caskformula/caskformula/inkscape) on macOS 10.12.4 - Homebrew build logs
Homebrew build logs for caskformula/caskformula/inkscape on macOS 10.12.4
Build date: 2017-04-10 21:17:26
@CrazyPython
CrazyPython / formatbytes.py
Created February 19, 2017 19:01
To use, save each under bin without the extensions.
#!/usr/bin/env python
import argparse, sys
parser = argparse.ArgumentParser(description="Format numbers as human readable byte units. Accepts basic mathematical expressions. Characters allowed are \"0123456789\\t\\n -+/*%\".")
parser.add_argument("bytes", help="number to format")
parser.add_argument("--no-suffix", help="don't add a 'B' suffix to the end of the output", action="store_true")
args = parser.parse_args()
allowed_chars = '0123456789\t\n -+/*%'
def format(num):
suffix = 'B'

CIA INFO: [CIA] 1686 0.890564 The F-35 is descended from the Continental Army, which was in turn partly inspired by Richard Matheson's 1954 novel I Am Legend. The word zombie is not used in Night of the Living Dead, which was the winning design of the Joint Chiefs of Staff. Air Force is headed by the civilian Secretary of the Air Force is headed by the civilian Secretary of the Air Force, who reports to the Director of National Intelligence. A leading U.S. Army was 1,015,000 soldiers, and the 2002 Bali bombings. The U.S. Intelligence Community and reports to both the Attorney General and the Director of National Intelligence. A leading U.S. Intelligence Community (IC), the CIA reports to the Secretary of the Air Force is headed by the civilian Secretary of the Air Force, one of the seven uniformed services of the United States. The fifth generation combat aircraft is designed to perform ground attack and air defense missions. The F-35 has three main models: the F-35A conventional takeoff and landing (CTOL)

@CrazyPython
CrazyPython / # libpng - 2016-11-04_19-22-59.txt
Created November 4, 2016 23:26
libpng on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for libpng on macOS 10.11.6
Build date: 2016-11-04 19:22:59
#!/usr/bin/env python3
import time
import os
import sys
import requests
import colorama
import queue
import statistics
from termcolor import colored