Getting started with applying Artistic Style on images / videos
Paper:
| """ A snippet for calculating longest subsequence of list of words | |
| """ | |
| import re | |
| # copy and paste seperation into here | |
| INPUT = filter(len, """ | |
| fuad-not-distressed | |
| arrows_counterclockwise | |
| """.split('\n')) |
| """ | |
| This is scripts.py from | |
| https://pypi.org/project/treemap/#description | |
| TODO: update API to talk to latest coverage version | |
| """ | |
| import operator | |
| import random | |
| import colorsys |
| #!/usr/bin/python | |
| from __future__ import print_function | |
| import os | |
| import sys | |
| from googleapiclient.errors import HttpError | |
| from googleapiclient import discovery | |
| from oauth2client.service_account import ServiceAccountCredentials | |
| from dateutil.parser import parse |
| /** | |
| A small puzzle from a stupid bug today - what do you need to fill in at `XXX` to make the second assertion true? | |
| I learn quiet a bit more `async` `await` from this…. before this I intuitively sees it async and await as countering each other: | |
| • `async` wraps a promise layer | |
| • `await` unwraps a promise layer | |
| but this bug certainly expose my misunderstanding…. | |
| */ |
| """ | |
| Code for exporting datastore consumption for last month | |
| DOC: | |
| https://cloud.google.com/monitoring/docs/reference/libraries#client-libraries-usage-python | |
| Code snippet: | |
| https://cloud.google.com/monitoring/custom-metrics/reading-metrics | |
| """ | |
| import csv |
| /** | |
| * To use: | |
| * 1. customize the script (see CUSTOMIZE below) | |
| * 2. Add this to your Google App Script dashboard https://script.google.com/a/xxx.org/ | |
| * 3. Test run and you should see new event added to your calendar | |
| * 4. Add a trigger - e.g. to run every minute | |
| * | |
| * Originally from | |
| * https://webapps.stackexchange.com/questions/108132/how-to-automatically-forward-events-from-one-google-calendar-to-another | |
| * |
| #!/bin/bash -xe | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| # Stuff for making stuff | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential gcc checkinstall cmake pkg-config git unzip wget gdb |
Getting started with applying Artistic Style on images / videos
Paper:
| #!/bin/bash -xe | |
| # https://www.digitalocean.com/community/tutorials/how-to-run-openvpn-in-a-docker-container-on-ubuntu-14-04 | |
| OVPN_DATA="ovpn-data" | |
| docker run --name $OVPN_DATA -v /etc/openvpn busybox | |
| docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_genconfig -u udp://fly.techie.im:1194 | |
| docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn ovpn_initpki | |
| # generate the client - x4SLFY6MbvmqbVfe | |
| docker run --volumes-from $OVPN_DATA --rm -it kylemanna/openvpn easyrsa build-client-full pacman nopass | |
| docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_getclient pacman > pacman.ovpn |