Skip to content

Instantly share code, notes, and snippets.

View abecode's full-sized avatar

Abe Kazemzadeh abecode

View GitHub Profile
Our yachts are toy boats, the glint on a lovely brief bubble of time. A boat's importance as an escape from reality, as a change of pace, as a theme for reflection and as an art form gives it worth or value.
--William Garden
#!/bin/bash
# pdfScale.sh
#
# Scale PDF to specified percentage of original size.
# Ref: http://ma.juii.net/blog/scale-page-content-of-pdf-files.
echo "This script doesn't handle files with spaces in them."
SCALE=0.95 # scaling factor (0.95 = 95%, e.g.)
@drewkerrigan
drewkerrigan / setup.md
Last active July 12, 2018 14:31
simple Riak default schema search setup

Simple Search 2.0 Setup

Create an index
curl -i -XPUT http://localhost:8098/search/index/my_index
Link the index to a bucket
@kpq
kpq / barley.tsv
Created September 30, 2015 21:14
Barley data: comparison circles
yield variety year site
27 Manchuria 1931 University Farm
48.86667 Manchuria 1931 Waseca
27.43334 Manchuria 1931 Morris
39.93333 Manchuria 1931 Crookston
32.96667 Manchuria 1931 Grand Rapids
28.96667 Manchuria 1931 Duluth
43.06666 Glabron 1931 University Farm
55.2 Glabron 1931 Waseca
28.76667 Glabron 1931 Morris
@peterneubauer
peterneubauer / gist:2652082
Created May 10, 2012 09:19
Basic Graphviz
Transaction tx = neo.beginTx();
try
{
final Node emil = neo.createNode();
emil.setProperty( "name", "Emil Eifrém" );
emil.setProperty( "age", 30 );
final Node tobias = neo.createNode();
tobias.setProperty( "name", "Tobias \"thobe\" Ivarsson" );
tobias.setProperty( "age", 23 );
tobias.setProperty( "hours", new int[] { 10, 10, 4, 4, 0 } );
@johnhamelink
johnhamelink / config.org
Last active July 3, 2020 21:39
My org-roam config

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")
@jarutis
jarutis / ubuntu.sh
Last active November 9, 2020 09:01
Theano and Keras setup on ubuntu with OpenCL on AMD card
## install Catalyst proprietary
sudo ntfsfix /dev/sda2
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK
sudo apt-get remove --purge fglrx*
sudo apt-get install linux-headers-generic
sudo apt-get install fglrx xvba-va-driver libva-glx1 libva-egl1 vainfo
sudo amdconfig --initial
## install build essentials
sudo apt-get install cmake
@linwoodc3
linwoodc3 / cleantweets.py
Last active January 19, 2021 22:58
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.
# 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
@HarshSingh16
HarshSingh16 / Surviving Titanic.R
Created October 15, 2018 20:19
Building a Predictive Model to predict survivals on the Titanic Data Set
########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
@abishekmuthian
abishekmuthian / build-arrow-armv8.md
Last active August 1, 2022 16:31
Building Apache Arrow and pyarrow on ARMv8

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