Skip to content

Instantly share code, notes, and snippets.

Avatar

Abe Kazemzadeh abecode

View GitHub Profile
@shawwn
shawwn / since2010.md
Created May 11, 2021
"What happened after 2010?"
View since2010.md

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

View plot.awk
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@johnhamelink
johnhamelink / config.org
Last active Jul 3, 2020
My org-roam config
View config.org

Set Org Directory

(after! org
    (setq org-directory "~/org/"))

org-roam

Taken from Making Connections in your Notes (10:24) by Matt Williams:

(setq org-roam-directory "~/org/roam")
(setq org-roam-graph-viewer "qiv")
@abishekmuthian
abishekmuthian / build-arrow-armv8.md
Last active Jun 29, 2021
Building Apache Arrow and pyarrow on ARMv8
View build-arrow-armv8.md

Why build Apache Arrow from source on ARM?

Apache Arrow is an in-memory data structure used in several projects. It's python module can be used to save what's on the memory to the disk via python code, commonly used in the Machine Learning projects. With low RAM, ARM devices can make use of it but there seems to be an configuration error with the packaged binaries as of version 0.15.1 and so we're forced to build and install from the source.

The installation build steps are based on official guidelines but modified for ARM and has taken clues from building Ray for ARM.

My setup

I'm using Nvidia Jetson nano.

Quad-core ARM® Cortex®-A57 MPCore processor

@HarshSingh16
HarshSingh16 / Surviving Titanic.R
Created Oct 15, 2018
Building a Predictive Model to predict survivals on the Titanic Data Set
View Surviving Titanic.R
########loading the Titanic Train Data Set
TitanicTrain<-train1
######Checking Missing Values in the Train Data Set
sapply(TitanicTrain, function(x)sum(is.na(x)))
#######Loading the Titanic Test Data Set
TitanicTest<-test11
#######Checking Missing Values in the Test Data Set
@W4ngatang
W4ngatang / download_glue_data.py
Last active Jan 14, 2022
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
View download_glue_data.py
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
@evertrol
evertrol / Makefiles.md
Last active Jan 25, 2022
Makefile cheat sheet
View Makefiles.md

Makefile cheat sheet

Mostly geared towards GNU make

I've used ->| to indicate a tab character, as it's clearer to read than

  • Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->| <shell command>
@jclosure
jclosure / install_dia_osx.md
Created Aug 6, 2017
How to install Dia on OSX (and have it run)
View install_dia_osx.md
brew cask install dia

After his it won't run because DISPLAY=:0 env var is not set

vim /Applications/Dia.app/Contents/Resources/bin/dia
@linwoodc3
linwoodc3 / cleantweets.py
Last active Jan 19, 2021
Python script that uses the python Twitter client (https://github.com/sixohsix/twitter) to pull tweets that are geolocated. Optionally stores in efficient columnar parquet data store with configurable file sizes. Took 13 secs to download 100 geolocated tweets on MacOS 10.12 with 16 GB RAM on 82 Mb/s connection.
View cleantweets.py
# Author
# Linwood Creekmore III
# April 8 2017
# heavy input from http://socialmedia-class.org/twittertutorial.html
# valinvescap@gmail.com
import re
import copy
import numpy as np
import pandas as pd
View tinylisp.py
import re, sys # this file requires python 3
def parse(tokens):
stack = ([], None)
for t in tokens:
if t == '(':
stack = ([], stack)
elif t == ')':
(finished_list, stack) = stack
stack[0].append(finished_list)
elif not t.startswith(';;'):