Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.db.models.deletion import Collector | |
from django.db.utils import ConnectionRouter | |
def deletable_objects(obj): | |
""" | |
Return a generator that yields (model, instance) tuples | |
of instances related to obj (including obj itself). | |
Essentially, programmatic access to the data Django Admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License. | |
# | |
import os | |
import os.path | |
from subprocess import Popen, PIPE | |
import sys | |
from threading import Thread | |
from urllib.parse import urlparse | |
from urllib.request import urlretrieve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://adainitiative.org | |
"The Ada Initiative is a non-profit organization supporting women | |
in open technology and culture. We educate people of all genders | |
on how to support women in open tech/culture through teaching | |
workshops, writing policies, guides, and editorials, and speaking." | |
http://openhatch.org | |
"OpenHatch is a non-profit that maintains this website, organizes | |
outreach events to grow the open source community, and brings | |
diversity to programming groups." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| FUCKIN PUSSIES | |
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
13:16 <luite> | hello | |
13:16 <ChongLi> | somebody has a mental illness! | |
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| compelled to write Node.js! | |
13:16 <genisage> | hi | |
13:16 <luite> | you might be pleased to learn that you can compile | |
| haskell to javascript now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import sound | |
from scene import * | |
class TeaTimer(Scene): | |
def setup(self): | |
self.initial_time = int(60 * 1.5) | |
self.remaining_time = self.initial_time | |
self.center_x = self.size.w * 0.5 |
Thanks to Jacob Kaplan-Moss, Donald Stufft, David Reid, Allen Short, Zain Memon, and Chris Armstrong for review.
This is a guide for technical individuals to understand in what circumstances SSL communications are secure against an observer-in-the-middle (for all intents and purposes: the NSA).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Julien Phalip | |
# License: BSD | |
# Description: Change the current directory to the path of the given Python package. | |
function goto { | |
cd `python -c "import pkgutil; print(pkgutil.get_loader('$1').filename)"` | |
} | |
function _top_level_packages { | |
python -c "import pkgutil; print('\n'.join([name for loader, name, ispkg in sorted(pkgutil.iter_modules()) if ispkg]))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import count | |
def filter(input, prime): | |
for i in input: | |
if i % prime: | |
yield i | |
def get_primes(num): | |
g = count(2) | |
for _ in xrange(num): |
SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
apt-get install sshpass