Skip to content

Instantly share code, notes, and snippets.

View mehalter's full-sized avatar

Micah Halter mehalter

View GitHub Profile
package com.mehalter
import scala.util.Random
import scalaz.stream._
import scalaz.concurrent.Task
object mergeSort {
def main(args: Array[String]): Unit = {
val a: List[Int] = Random.shuffle((1 to 100).toList)
@mehalter
mehalter / StatusStreamer.scala
Created March 30, 2016 13:20
Twitter API Stream
package com.mehalter
import twitter4j._
object StatusStreamer {
def main(args: Array[String]): Unit = {
val twitterStream = new TwitterStreamFactory(Util.config).getInstance
twitterStream.addListener(Util.simpleStatusListener)
val austinBox = Array(Array(-97.8, 30.25), Array(-97.65, 30.35))
//twitterStream.sample //sample of tweets
@mehalter
mehalter / matrix.scala
Last active April 5, 2016 14:55
Matrix parallel processing
package com.mehalter
import java.util.concurrent.Executors
import scala.annotation.tailrec
import scalaz.concurrent.{Strategy, Task}
import scalaz.stream._
object matrix {
def main(args: Array[String]): Unit = {
@mehalter
mehalter / StatusStreamer.scala
Last active April 5, 2016 14:56
Twitter status streamer
package com.mehalter
import twitter4j._
import scalaz.concurrent.Task
import scalaz.stream.{async, Process, io}
object StatusStreamer {
def main(args: Array[String]): Unit = {
val twitterStream = new TwitterStreamFactory(Util.config).getInstance
let defaultengine = "duckduckgo"
map <C-d> scrollPageDown
map <C-u> scrollPageUp

Keybase proof

I hereby claim:

  • I am mehalter on github.
  • I am mehalter (https://keybase.io/mehalter) on keybase.
  • I have a public key whose fingerprint is BEB8 056E 542A 33EB 8A4B 081F 723F 998E 98D9 3D50

To claim this, I am signing this object:

@mehalter
mehalter / PersonalJuliaSetup.md
Last active July 30, 2020 19:01
Small walkthrough of my Julia set up and demonstration of some helper command line utilities. Making and using sandboxed virtual environments, making and using custom system images, and creating virtual environment Jupyter kernels.

Install Julia

  1. Decide on a Julia home (I use ${XDG_DATA_HOME}/julia)
  2. Set up an environment variable (export JULIA_HOME="${XDG_DATA_HOME}/julia")
  3. Download Julia and extract it to ${JULIA_HOME}/julia-X.X (eg. ${JULIA_HOME}/julia-1.4)
  4. Repeat previous step for all desired Julia versions

Set Up Julia Utilities

  1. Place julia-utilities.sh somewhere on your system (eg. ~/julia-utilties.sh)
@mehalter
mehalter / requirements.txt
Created September 2, 2021 14:26
xlsx's to csv
openpyxl==3.0.7
pandas==1.3.2
@mehalter
mehalter / trigger_update_sv.sh
Created October 5, 2021 21:54
trigger_update_sv.sh
#!/bin/bash
### !!! Script neccessitates the tool jq https://stedolan.github.io/jq/
### !!! Script neccessitates the tool GNU Parallel https://www.gnu.org/software/parallel/
## INPUTS
## Auth token taken from https://dashboard.balena-cloud.com/preferences/access-tokens
AUTH_TOKEN=
## Go to fleet view in UI: https://dashboard.balena-cloud.com/orgs/<fleetID>/fleets
@mehalter
mehalter / .p10k.zsh
Last active March 3, 2023 13:30
My ZSH Configuration
# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).
# Temporarily change options.
'builtin' 'local' '-a' 'p10k_config_opts'
[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
() {