Skip to content

Instantly share code, notes, and snippets.

View alastairparagas's full-sized avatar

Alastair Paragas alastairparagas

View GitHub Profile
@alastairparagas
alastairparagas / Log.hs
Last active August 20, 2016 02:00
Second Assignment Solutions for the Problem Set at http://www.seas.upenn.edu/~cis194/spring13/hw/02-ADTs.pdf
module Log where
import Control.Applicative
data MessageType = Info
| Warning
| Error Int
deriving (Show, Eq)
type TimeStamp = Int
@alastairparagas
alastairparagas / resources.md
Last active September 1, 2016 19:09
Introductory Resources

ACM Introductory Resources

Welcome to Association for Computing Machinery at FIU! Here are some introductory resources that will get you up and running for our upcoming workshops here at ACM!

## What is GitHub? GitHub is an online code repository for the Git code management system. * [CodeSchool Git Playground](https://www.codeschool.com/courses/try-git) * [Quick Git Guide](http://rogerdudler.github.io/git-guide/)
@alastairparagas
alastairparagas / recurrence_relations.py
Last active November 8, 2016 11:23
Recurrence Relations
import math
"""
Fibonacci recurrence relation of the form
fsubn - fsub(n-1) - fsub(n-2) = 0
could be solved by figuring out a value
q^n - q^(n-1) - q^(n-2) = 0
Then q^(n-2) * (q^2 - q - 1) = 0
We thus obtain roots
@alastairparagas
alastairparagas / KafkaStreamObtainer.java
Created November 10, 2016 20:35
KafkaStreamObtainer
package com.termmerge.nlpcore.obtainer;
import java.util.Map;
import java.util.List;
import java.util.function.Consumer;
import java.util.logging.Logger;
import java.util.ArrayList;
import java.util.Properties;
import java.util.Collections;
@alastairparagas
alastairparagas / FunctionalScript.py
Created November 11, 2016 15:15
Sample Python Script - Functionally organized, of course
from firebase import Firebase
import pydash as _
MYHONORS_FIREBASE_URL = ''
MYHONORS_FIREBASE_AUTH_TOKEN = ''
EVENTS_NEW_TIMESTAMP = ''
"""
Authorizes our access into the MyHonors Firebase database that we need
@alastairparagas
alastairparagas / TripleIntegralsCylindricalSpherical.ipynb
Last active November 12, 2016 22:25
Triple Integral Plotting in iPython
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alastairparagas
alastairparagas / hillary_nlp_emails.ipynb
Last active December 9, 2022 06:49
Hillary Clinton Emails
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alastairparagas
alastairparagas / README.md
Last active April 18, 2017 14:17
Python Resources

Online Resources

Awesome Python Conference Videos

@alastairparagas
alastairparagas / language_processing_text_corpora.ipynb
Created December 17, 2016 21:54
Chapter 1 and 2 Summary of "Natural Language Processing with Python"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alastairparagas
alastairparagas / csv2json.py
Created December 19, 2016 19:14
CSV to JSON
import csv
import json
import sys
f = open(sys.argv[1], 'rU')
reader = csv.DictReader( f, fieldnames = ( fieldname0","fieldname1","fieldname2","fieldname3"))
records = [ row for row in reader ]
records.pop(0)
out = json.dumps(records)