Skip to content

Instantly share code, notes, and snippets.

View dangpzanco's full-sized avatar

Daniel Zanco dangpzanco

View GitHub Profile
W = 500
H = 585
W1 = W - 1
H1 = H - 1
def setup
@img = load_image '../scratch/girl.png'
@img.filter BLUR, 3
@img.load_pixels
end
@dangpzanco
dangpzanco / gnuradio_dead_branch
Created August 21, 2018 19:51
Attention! You're using a dead branch.
___________________________________________________________________
/ _ _ _ _ _ _ \
| /_\ | |_ | |_ ___ _ _ | |_ (_) ___ _ _ | | |
| / _ \| _|| _|/ -_)| ' \| _|| |/ _ \| ' \ |_| |
| /_/ \_\\__| \__|\___||_||_|\__||_|\___/|_||_|(_) |
| |
| __ __ _ _ |
| \ \ / /___ _ _ ( )_ _ ___ _ _ ___(_) _ _ __ _ __ _ |
| \ V // _ \| || ||/| '_|/ -_) | || |(_-<| || ' \ / _` | / _` | |
| |_| \___/ \_,_| |_| \___| \_,_|/__/|_||_||_|\__, | \__,_| |
import serial
import sys
import argparse
import csv
import pathlib
from datetime import datetime
def list_serial_ports():
""" Lists serial port names
#!/data/data/com.termux/files/usr/bin/bash
folder=ubuntu-fs
if [ -d "$folder" ]; then
first=1
echo "skipping downloading"
fi
tarball="ubuntu.tar.gz"
if [ "$first" != 1 ];then
if [ ! -f $tarball ]; then
import numpy as np
import librosa
import pandas as pd
import numpy.random as rnd
import pathlib
import tqdm
dataset_folder = pathlib.Path('noise_data')
dataset_folder.mkdir(parents=True, exist_ok=True)
@dangpzanco
dangpzanco / readme.md
Created May 24, 2019 03:47
Gist Markdown Cheatsheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph

@dangpzanco
dangpzanco / setup_conda.sh
Last active October 11, 2019 16:05
Setup Miniconda on a fresh linux installation.
#!/bin/bash
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
mkdir ~/.conda # https://github.com/ContinuumIO/anaconda-issues/issues/11148
sh Miniconda3-latest-Linux-x86_64.sh
conda update --all -y
conda install -y tensorflow git
git clone https://github.com/tensorflow/benchmarks
import pathlib # Handle paths (https://pbpython.com/pathlib-intro.html)
import numpy as np
def run_simulation(n=1000):
x = np.random.randn(n)
y = np.random.randn(n,n) @ x
simulation_results = dict(x=x, y=y)
return simulation_results
import pathlib
import tqdm
import imageio
# import PIL.Image
# PIL.Image.MAX_IMAGE_PIXELS = 933120000
# input_path = pathlib.Path('Starry Night.jpg')
input_path = pathlib.Path('Starry Night (small).jpg')
im = imageio.imread(input_path)
@dangpzanco
dangpzanco / climate_change_ai.md
Last active June 13, 2020 12:23
"Climate Change: How Can AI Help?" ICML2019 Workshop Highlights