Skip to content

Instantly share code, notes, and snippets.

def extract():
df = pd.read_csv("data.csv")
df = df.drop(columns='Unnamed: 0')
data = df.to_numpy()
return (data[:, 0:-1], data[:, -1])
def run():
days, target = extract()
# Compute a linear fit for the data.
@abrie
abrie / memberlist.js
Last active August 3, 2019 21:39
WebDevAtlanta MemberDirectory Masterlist
{
"members": [
{
"name":"abrie",
"github_username":"abrie",
"gist_id":"418d0d9e4d3158ebca2cc37dbe1696ee"
},
{
"name":"Chris",
"github_username":"gitchrisadams",
{
"avatar": "https://abrie.dev/webdevatlanta-avatar.png",
"status": "Inventive, conversant, disciplined, lazy, bumptious."
}

Keybase proof

I hereby claim:

  • I am abrie on github.
  • I am abrie (https://keybase.io/abrie) on keybase.
  • I have a public key whose fingerprint is 8D46 89FB 19A4 0DBF 80F5 1508 F38B C75B DBCB 4623

To claim this, I am signing this object:

var s = JSON.parse(window.localStorage.getItem('boardStates'));
extras['rain'] = true;
s.rain = true;
window.localStorage.setItem('boardStates', JSON.stringify(s));
package ca.goeiebook.gists;
import android.content.Context;
import android.database.sqlite.SQLiteCantOpenDatabaseException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.google.common.io.ByteStreams;
import java.io.File;
@abrie
abrie / SphereMeshTestApplication.java
Last active November 26, 2015 14:03
Java Sphere Mesh Generator
/**
* Created on 2015-11-19, abrie.
*
* Java implementation of a Sphere mesh generator. This produces vertices for
* representing a sphere in three dimensional space, along with a color for each vertex
* and a list of indicies for representing the vertices as triangles. The generated
* data is suitable for uploading as OpenGL buffers, renderable as an Element Array. The
* algorithm is based on an implementation found in ThreeJS.
*
* We make use of a generic ListBuilder helper class to build the buffers with natural
@abrie
abrie / LinearPartitionTestApplication.java
Last active October 24, 2021 14:22
Java implementation of a Dynamic Programming approach to the Linear Partition Algorithm
/**
* Created by abrie on 2015-11-01.
*
* Java implementation of a Dynamic Programming approach to the Linear Partition Algorithm
* AKA 'The Easiest Hard Problem': https://en.wikipedia.org/wiki/Partition_problem
*
* Adapted from the python implementation described here: http://stackoverflow.com/a/7942946
* and on Skiena's description in 'The Algorithm Design Manual':
* https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
*