Skip to content

Instantly share code, notes, and snippets.

@IlmariKu
IlmariKu / run.py
Last active Jun 4, 2021
run.py - Python command-line runner for repeated repository tasks
View run.py
#!/usr/bin/env python3
import os
import datetime
import sys
import subprocess
"""
Command line tool to run simple commands from repository root
@avidale
avidale / pyahocorasick-entity-search.ipynb
Last active Jun 28, 2021
pyahocorasick entity search.ipynb
View pyahocorasick-entity-search.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View avril.tidal
-- happy avril 14th :)))))))))))))))))))))))))))))))))))))))
do
let bars = 4
key = "8"
righthand = "[[4 -3] [0 _ _ _ _ _ 0]] [[-3, -8] [7 5 4 0]]"
lefthand = "[0 9 12 16] [4 12 16 19] [5 12 17 19] [2 12 17 16]"
d1 $ slow bars
$ stack [
n (righthand + key + "<24 36>/2"),
@bokenlin
bokenlin / Sonnet Native App Requirements.md
Created Aug 3, 2019
Requirements document for Sonnet native app
View Sonnet Native App Requirements.md

Sonnet One Native App Feature Requirements

Last updated Jul 31, 2019

This document is a high-level description of the various features currently present in the Sonnet One front-end web application and Cordova-wrapped native app that will be used to define requirements and an API for the React Native app.

Any features that we weren't able to implement in the Web environment but we plan to implement in the native app are marked with (unimplemented).

Introduction

@nillia
nillia / chrome-headless.service
Created Mar 7, 2018
Chrome headless (with debug in 9222) Systemd service
View chrome-headless.service
[Unit]
Description=Run an instance of Chrome headless with debug in 9222
[Service]
Type=simple
Restart=always
ProtectSystem=full
DynamicUser=true
ExecStart=/usr/bin/google-chrome --headless --disable-gpu --remote-debugging-port=9222
Environment=HOME=/tmp
@lukassup
lukassup / zipapp.md
Last active Nov 2, 2021
Python zipapp
View zipapp.md

Python zipapp web apps

What's a zipapp?

This concept is very much like .jar or .war archives in Java.

NOTE: The built .pyz zipapp can run on both Python 2 & 3 but you can only build .pyz zipapps with Python 3.5 or later.

Initial setup

@gdamjan
gdamjan / chrome-headless.service
Created Sep 13, 2017
headless chrome systemd service file
View chrome-headless.service
[Unit]
Description=headless chrome
[Service]
Type=simple
ProtectSystem=strict
DynamicUser=true
Environment=HOME=/tmp
ExecStart=/usr/bin/google-chrome --headless --disable-gpu --remote-debugging-port=9222
View docker-compose.yml
version: "2"
volumes:
log-data:
driver: local
services:
elasticsearch:
image: elasticsearch:5.0
ports:
@yonglai
yonglai / headless_selenium_server_setup.sh
Created May 22, 2017
script to set up headless selenium in Ubuntu
View headless_selenium_server_setup.sh
#!/bin/sh
set -e
if [ -e /.installed ]; then
echo 'Already installed.'
else
echo ''
echo 'INSTALLING'
echo '----------'
@rudolfbyker
rudolfbyker / split_wav.py
Created Apr 25, 2017
Split WAV files at silence
View split_wav.py
#!/usr/bin/env python
from scipy.io import wavfile
import os
import numpy as np
import argparse
from tqdm import tqdm
# Utility functions