This file contains hidden or 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
""" | |
Add copy to clipboard from IPython! | |
To install, just copy it to your profile/startup directory, typically: | |
~/.ipython/profile_default/startup/ | |
Example usage: | |
%clip hello world | |
# will store "hello world" |
This file contains hidden or 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) 2015 Pavel Savshenko | |
* Copyright (C) 2011 Google Inc. All rights reserved. | |
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | |
* Copyright (C) 2008 Matt Lilek <[email protected]> | |
* Copyright (C) 2009 Joseph Pecoraro | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: |
This file contains hidden or 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
""" | |
Parse markdown list items (such as FAQ) into a TOC | |
Usage: | |
python list_toc_generator.py <markdown_file, markdow_file...> | |
""" | |
import re | |
import sys |
This file contains hidden or 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
https://d396qusza40orc.cloudfront.net/posaconcurrency/slides/S0-P1-MOOC-organization-and-topics.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/slides/S0-P3-MOOC-prereqs-and-learning-strategies.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S1-M1-P1-concurrency-motivations.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S1-M1-P2-concurrency-challenges.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S0-P4-overview-of-patterns-and-frameworks.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S0-P5-overview-of-patterns-and-frameworks-pt2.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s1.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s2.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s3.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s4.pdf |
This file contains hidden or 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 IPython.core.magic import register_line_magic | |
from IPython.core.getipython import get_ipython | |
@register_line_magic | |
def diff(line): | |
""" | |
## Reasoning | |
When you compare dicts a lot, [deepdiff][1] comes in very useful. |
This file contains hidden or 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 os | |
import sys | |
from django.conf import settings | |
import django | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'app.tests.test_settings' | |
try: | |
from django.test.utils import get_runner | |
TestRunner = get_runner(settings) |
This file contains hidden or 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
# this method | |
def run(self): | |
for i in range(0,4): | |
if i == 0: | |
self.geneTranslation.extend(["f"] * self.genes[0]) | |
elif i == 1: | |
self.geneTranslation.extend(["b"] * self.genes[1]) | |
elif i == 2: | |
self.geneTranslation.extend(["r"] * self.genes[2]) |
This file contains hidden or 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 d39fedaf3da34417eb292b58046ed9ab7bb3c639 Mon Sep 17 00:00:00 2001 | |
From: Pavel Savchenko <[email protected]> | |
Date: Sun, 3 Jan 2016 12:16:00 +0100 | |
Subject: [PATCH] Revert permission changes | |
--- | |
DESIGN_THOUGHTS.md | 0 | |
MANIFEST.in | 0 | |
README.md | 0 | |
TODO.md | 0 |
This file contains hidden or 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
$ grep -R -A 2 -B 2 initial_data * | |
django/contrib/admin/options.py- return inline_admin_formsets | |
django/contrib/admin/options.py- | |
django/contrib/admin/options.py: def get_changeform_initial_data(self, request): | |
django/contrib/admin/options.py- """ | |
django/contrib/admin/options.py- Get the initial form data. | |
-- | |
-- | |
django/contrib/admin/options.py- else: | |
django/contrib/admin/options.py- if add: |
This file contains hidden or 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
2016-02-11 19:59:57,360 (DEBUG) ebcli.lib.utils : docker --version | |
2016-02-11 19:59:57,465 (DEBUG) ebcli.lib.utils : Docker version 1.10.0, build 590d5108 | |
Traceback (most recent call last): | |
File "/usr/local/bin/eb", line 11, in <module> | |
sys.exit(main()) | |
File "python2.7/site-packages/ebcli/core/ebcore.py", line 149, in main | |
app.run() | |
File "python2.7/site-packages/cement/core/foundation.py", line 694, in run | |
self.controller._dispatch() |