Warning! This doc is pretty outdated, I'm rewriting it right now and I'll update this as soon as it's done.
First, install the Go compiler from Google's Go Website: https://golang.org/dl/
import numpy as np | |
def vectorize(x): | |
# vectorize a string | |
if len(x) > 1: | |
return np.sum([vectorize(c) for c in x], axis=0) | |
if x == '.': | |
i = 27 | |
elif x == ' ': | |
i = 26 |
class SignalModel(models.Model): | |
"""A Model mixin class that lets you put your signal handler methods back into your Model class.""" | |
@classmethod | |
def _sig_pre_delete(cls, instance, *args, **kwargs): | |
"""dispatch the pre_delete method to a regular instance method. """ | |
return instance.sig_pre_delete(*args, **kwargs) | |
@classmethod | |
def _sig_post_delete(cls, instance, *args, **kwargs): |
#/usr/local/bin/python | |
"""Build Rescuetime Graph Data for StatusBoard.app | |
This script pulls data from a rescuetime account and flattens it into a format | |
that is easily read by StatusBoard. Okay. Run it with cron or launchd, whatever. | |
*nick wolfe | |
http://nameremoved.com/ | |
""" |
#!/usr/bin/env python3 | |
import subprocess | |
import sys | |
path = sys.argv[-1] | |
if path.startswith('/path/to/my/local/source/folder/'): | |
path = path.replace('/path/to/my/local/source/folder/', '/app/folder/') | |
subprocess.run(['docker-compose', 'exec', '-T', 'cross', 'sh', '-c', |
# coding: utf-8 | |
import pprint | |
import pandas as pd | |
from rescuetime.api.service import Service | |
from rescuetime.api.access import AnalyticApiKey | |
s = Service.Service() | |
k = AnalyticApiKey.AnalyticApiKey(open('rt_key').read(), s) | |
p = {} |
#!/usr/bin/env python2 | |
'''Serving dynamic images with Pandas and matplotlib (using flask).''' | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
from cStringIO import StringIO |
First, install the Go compiler from Google's Go Website: https://golang.org/dl/
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-1779-2.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-2103-4.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4684-9884-4.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-3-662-02945-9.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4612-9923-3.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-3828-5.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4684-9936-0.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4419-8566-8.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4757-4385-2.pdf | |
wget http://link.springer.com/content/pdf/10.1007/978-1-4419-8592-7.pdf |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.db import migrations, models | |
from wagtail.wagtailcore.models import Page, Site | |
def forwards_func(apps, schema_editor): | |
HomePage = apps.get_model('website', 'HomePage') |
const https = require('https'); | |
const AWS = require("aws-sdk"); | |
const urlParse = require("url").URL; | |
const appsyncUrl = process.env.API_BACKENDGRAPHQL_GRAPHQLAPIENDPOINTOUTPUT; | |
const region = process.env.REGION; | |
const endpoint = new urlParse(appsyncUrl).hostname.toString(); | |
const graphqlQuery = require('./query.js').mutation; | |
const apiKey = process.env.API_KEY; | |
exports.handler = async (event) => { |