I hereby claim:
- I am jacopofar on github.
- I am jacopofar (https://keybase.io/jacopofar) on keybase.
- I have a public key whose fingerprint is A6E1 7CFC 0FE1 51E7 9D4B 94B1 59D9 FA5F F4CF 1F5A
To claim this, I am signing this object:
package generazione; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; |
FROM ubuntu:wily | |
#FROM phusion/baseimage:latest | |
#get the repo indexes | |
RUN apt-get update && apt-get -y upgrade | |
# system dependencies needed to install the libraries from pip | |
RUN apt-get install -y python-setuptools gcc python-dev libhdf5-dev libjpeg-dev zlibc zlib1g-dev | |
RUN easy_install pip | |
RUN pip install numpy | |
RUN pip install scipy | |
RUN pip install pillow |
""" | |
Functions for generating simple markov chains for sequences of words. Allows for scoring of | |
sentences based on completion frequency. | |
""" | |
import random | |
import redis | |
PREFIX = 'markov' | |
SEPARATOR=':' | |
STOP = '\x02' |
'use strict'; | |
/** | |
Javascript (ES6) implementation of a puzzle: each letter is a digit (0-9) and we have to find values for the letters in SEND MORE MONEY such that: | |
1. replacing the letters with the correspondign digits the expression SEND + MORE = MONEY is true | |
2. the first digits of each word are not 0 | |
*/ | |
const leftpart1 = 'SEND'.split(''); | |
const leftpart2 = 'MORE'.split(''); |
I hereby claim:
To claim this, I am signing this object:
import os | |
import gzip | |
import xml.sax | |
import csv | |
subs_dir = 'OpenSubtitles2012' | |
current_file = '' | |
current_movie_id = '???' | |
current_year = '???' |
#!/usr/bin/env python3 | |
from typing import (Union, | |
Tuple, | |
Any, | |
TypeVar, | |
Type, | |
List) | |
def check_type(obj, candidate_type, reltype='invariant') -> bool: |
#!/bin/sh | |
# processes a requirements.txt file, creates the virtualenv in a given folder | |
# if it does not exist already and creates a symlink to that | |
if [[ ! $# -eq 3 ]] ; then | |
echo 'Parameters error' 1>&2 | |
echo 'Required: the requirements.txt path, the folder for the virtualenvs and the symlink to create' 1>&2 | |
exit 1 | |
fi | |
set -x |
import datetime | |
import time | |
# not used, but required by pyjwt, import to ensure it exists | |
import cryptography | |
import jwt | |
key = 'secret' | |
encoded = jwt.encode({'some': 'payload'}, key, algorithm='HS256') | |
print('encoded', encoded) |