Skip to content

Instantly share code, notes, and snippets.

View chiroptical's full-sized avatar

Barry Moore II chiroptical

View GitHub Profile
module Raindrops
( convert
)
where
import Data.Semigroup ( (<>) )
import Data.Maybe ( fromMaybe )
sounds :: [String]
sounds = ["Pling", "Plang", "Plong"]
11:50:38 login0:openmpi-3.1.4 ls
aclocal.m4 autogen.pl config-gcc-4.8.5.sh configure.ac Doxyfile INSTALL Makefile.am Makefile.ompi-rules ompi orte README test
AUTHORS config configure contrib examples LICENSE Makefile.in NEWS opal oshmem README.JAVA.txt VERSION
11:50:38 login0:openmpi-3.1.4 source config-gcc-4.8.5.sh
-bash: ../dist/configure: No such file or directory
11:50:43 login0:gcc-4.8.5 vim con^C
11:50:48 login0:gcc-4.8.5 mkdir dist
11:50:53 login0:gcc-4.8.5 mv * dist
mv: cannot move ‘dist’ to a subdirectory of itself, ‘dist/dist’
11:50:55 login0:gcc-4.8.5 ls -a
@chiroptical
chiroptical / fit_inception.py
Last active November 13, 2019 21:29
Trying to train a multi-gpu inception model. I need some help.
#!/usr/bin/env python3
import tensorflow as tf
import pandas as pd
import numpy as np
import sigmoid_inception_v3
from glob import glob
from timeit import default_timer as timer
from concurrent.futures import ProcessPoolExecutor
from concurrent.futures import as_completed
from math import floor
module Main exposing (..)
-- Input a user name and password. Make sure the password matches.
--
-- Read how it works:
-- https://guide.elm-lang.org/architecture/forms.html
--
import Browser
import Html exposing (..)
import urllib.parse
urllib.parse.quote('print("hello world")')
#!/usr/bin/env python
""" 0-segment-audio.ray.py -- Using a rolling window to split audio files into segments with a specific duration
Usage:
0-segment-audio.ray.py [-hv] (-i <directory>) (-o <directory>) (-d <duration>) (-p <overlap>)
[-a -l <labels.csv>] (-r <address>) (-s <password>) (-c <cores_per_node>) [-b <batch_size>]
Positional Arguments:
Options:
-h --help Print this screen and exit
@chiroptical
chiroptical / FindJust.hs
Last active May 8, 2020 20:17
Find first `Just` embedded in `[m (Maybe a)]`
{-# LANGUAGE LambdaCase #-}
module FindJust ( findJust ) where
import Control.Monad ( foldM )
findJust :: Monad m => [m (Maybe a)] -> m (Maybe a)
findJust = foldM (\acc x -> maybe x (pure . Just) acc) Nothing
@chiroptical
chiroptical / Example.ipynb
Created June 9, 2020 13:11
Example Audio API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chiroptical
chiroptical / gist:53e8be9f3726db7d1a704e0eb4b1da6c
Created June 15, 2020 22:03
Installing OpenSoundscape Ubuntu 18.04 on t2.medium AWS instance
sudo apt update
sudo apt upgrade
sudo apt install python3.7 python3.7-venv python3.7-distutils python3.7-dev gcc g++ libsndfile1
sudo snap install ffmpeg # Get ffmpeg 4
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
sudo update-alternatives --config python3 # Make sure 3.7 is selected
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
~/.poetry/bin/poetry config virtualenvs.in-project true
~/.poetry/bin/poetry install # If this fails because of pytorch, goto 11 else goto 12
@chiroptical
chiroptical / scratch.u
Created June 26, 2020 02:05
Stream in Unison
Stream.sum : '{Stream Nat} () -> Nat
Stream.sum = Stream.foldLeft (+) 0
> Stream.sum '(Stream.range 0 10)
ability Stream e where
emit : e ->{Stream e} ()
Stream.range : Nat -> Nat ->{Stream Nat} ()
Stream.range n m =