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
let mapleader = "," | |
let newtaburl = "https://google.com" | |
let blacklists = ["*://safari.atlassian.net/*", "*://mail.google.com/*", "*://inbox.google.com/*", "*://calendar.google.com/*", "*://*.slack.com/*"] | |
let scrollstep = 20 | |
map "<Leader> m" zoomPageIn |
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 flask | |
from flask.ext.cache import Cache | |
from siren import util, crime_tracker | |
from siren.decorators import jsonp | |
app = flask.Flask(__name__) | |
app.config.from_envvar('SIREN_SETTINGS', silent=True) | |
cache = Cache(app) | |
crime_db = crime_tracker.PortlandCrimeTracker() |
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 scipy.spatial import cKDTree | |
from scipy import inf | |
# ... Some code removed for clarity ... | |
class PortlandCrimeTracker(object): | |
DEFAULT_DATABASE_NAME = 'db' | |
def __init__(self, db_filename=DEFAULT_DATABASE_NAME): | |
crime_db = self.load_crimes_db(db_filename) |
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
c.InteractiveShellApp.extensions = [ | |
'django_notebook' | |
] |
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
%install_ext https://raw.github.com/abrookins/django_notebook/master/django_notebook.py |
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.db import models | |
# Assuming this model. | |
class Example(models.Model): | |
image = models.ImageField(upload_to="somewhere/special") | |
# You want to set this field to point to an existing image (in a script, or a view, etc.). | |
example = Example.objects.get(id=1) |
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
$ python --version | |
Python 2.6.5 | |
$ sudo /etc/init.d/datadog-agent restart | |
Stopping datadog agent: (using supervisorctl) collector: stopped | |
dd-agent. | |
Starting datadog agent: (using supervisorctl) collector: started | |
forwarder: ERROR (abnormal termination) | |
dd-agent. |
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
$ python --version | |
Python 2.6.5 | |
In [1]: import dogapi | |
In [2]: quit() | |
Exception in thread Thread-2 (most likely raised during interpreter shutdown): | |
Traceback (most recent call last): | |
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner |
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
_, filename, _, _ := runtime.Caller(1) | |
f, err := os.Open(path.Join(path.Dir(filename), "data.csv")) |
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
for dir in *; do cd $dir && git remote show origin -n | grep Fetch | awk '{split($0,array," ")} END{print array[3]}' | xargs -I {} git submodule add {} $dir && cd ..; done |