As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.
The problems and solutions described in the examples below have led to the development of sciluigi,
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.spatial import KDTree | |
# Generate some number of sites in | |
# the square [0, 1] x [0, 1] | |
np.random.seed(0) | |
n_sites = 20 | |
sites = np.random.rand(n_sites, 2) | |
# Create random velocities |
# -*- coding: utf-8 -*- | |
""" Deletes all tweets below a certain retweet threshold. | |
""" | |
import tweepy | |
from datetime import datetime | |
# Constants | |
CONSUMER_KEY = '' |
#!/usr/bin/env python | |
import os, os.path, stat, sys, base64 | |
# TOTP lib inlined | |
import time, hmac, base64, hashlib, struct | |
def pack_counter(t): | |
return struct.pack(">Q", t) |
As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.
The problems and solutions described in the examples below have led to the development of sciluigi,
Obfuscation isn't difficult in most programming languages. It's why we have "good practices" because it is so easy to hide what you mean in badly written code.
Obfuscation tends to be even easier in dynamic languages because of how forgiving they tend to be - and because they tend to give you direct access to the environment so that you can manipulate it.
Today, for fun, I'm going to obfuscate this code:
def _(n):
if n <= 0:
# @Author: xiewenqian <int> | |
# @Date: 2016-11-28T20:35:09+08:00 | |
# @Email: [email protected] | |
# @Last modified by: int | |
# @Last modified time: 2016-12-01T19:32:48+08:00 | |
import pandas as pd | |
from pymongo import MongoClient |
refer to: https://stackoverflow.com/questions/39371772/how-to-install-anaconda-on-raspberry-pi-3-model-b
{USER}: pi
Install Miniconda 3:
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
sudo md5sum Miniconda3-latest-Linux-armv7l.sh # (optional) check md5
sudo /bin/bash Miniconda3-latest-Linux-armv7l.sh # -> change default directory to /home/pi/miniconda3
#Program to drive Sonic Pi 3 visualiser written in "processing" | |
#by Robin Newman, September 2017 | |
#see article at https://rbnrpi.wordpress.com | |
#set up OSC address of processing sketch | |
use_osc '127.0.0.1',5000 | |
#select shapes to show | |
osc "/viz/shapes","e" #"s" "e" "r" Star,Ellipse, Rectangle or combination | |
sleep 0.1 | |
live_loop :c do |