Skip to content

Instantly share code, notes, and snippets.

@Sandy4321
Sandy4321 / Spark Dataframe Cheat Sheet.py
Created August 10, 2016 20:03 — forked from evenv/Spark Dataframe Cheat Sheet.py
Cheat sheet for Spark Dataframes (using Python)
# A simple cheat sheet of Spark Dataframe syntax
# Current for Spark 1.6.1
# import statements
from pyspark.sql import SQLContext
from pyspark.sql.types import *
from pyspark.sql.functions import *
#creating dataframes
df = sqlContext.createDataFrame([(1, 4), (2, 5), (3, 6)], ["A", "B"]) # from manual data
@Sandy4321
Sandy4321 / adm.py
Created July 3, 2016 15:47 — forked from Zardoz89/adm.py
Adaptative Delta Modulation coding example in Python 3
#!/usr/bin/env python3
import array
BYTES = 2 # N bytes arthimetic
MAX = 2 ** (BYTES * 8 - 1) - 1
MIN = - (2 ** (BYTES * 8 - 1)) + 1
CHUNK= 1024
@Sandy4321
Sandy4321 / matrix-sgd.py
Created June 1, 2016 23:52 — forked from shulhi/matrix-sgd.py
Low Rank appromixation using SGD
#!/usr/bin/python
#
# Created by Albert Au Yeung (2010)
#
# An implementation of matrix factorization
# http://www.quuxlabs.com/blog/2010/09/matrix-factorization-a-simple-tutorial-and-implementation-in-python/
#
try:
import numpy
except:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"metadata": {
"name": "",
"signature": "sha256:a227026fb0076409b233b4ddec5c00bdf9e113f912da0e071cdb5dbd968c03e7"
},
#!/usr/bin/env python
"""Basic Python Cheat Sheet by Filip Kral on 2015/02/16"""
"""
Python is a cross-platform, interpreted, object-oriented programming language.
That means you can run it on Linux, Windows, Mac, and other platforms,
you don't need to compile your code to execute it because it is compiled on
the fly, and you can use classes and objects.
@Sandy4321
Sandy4321 / awesome_nlp.md
Created January 24, 2016 18:58
Share Your Papers!

Share Your Papers!

paper_dama

Here are links to influential academic papers in NLP. Learning the history is important to learn about what is going on outside of our code in the communities.

There is definitely a rich history going back all the way to even as far as 1960 - 1980's that has shaped this field into what it is.

It is also a very exciting time due to the success of machine learning off springing originally from the study of Artificial Intelligence coming to fruition as Moores has consistently tipped computation to critical mass. Natural Language Processing is also seeing similar parallels and so is a hot topic everywhere. Reading through these documents will help give you the bigger picture and where we currently stand.

@Sandy4321
Sandy4321 / base_r_plotting_tutorial_koontz_d-rug.r
Created December 18, 2015 15:38 — forked from noamross/base_r_plotting_tutorial_koontz_d-rug.r
Back to basics: High quality plots using base R graphics
### Title: Back to basics: High quality plots using base R graphics
### An interactive tutorial for the Davis R Users Group meeting on April 24, 2015
###
### Date created: 20150418
### Last updated: 20150423
###
### Author: Michael Koontz
### Email: [email protected]
### Twitter: @michaeljkoontz
###
## Analyze R packages for popularity, using pagerank algorithm
# Inspired by Antonio Piccolboni, http://piccolboni.info/2012/05/essential-r-packages.html
library(miniCRAN)
library(igraph)
library(magrittr)
# Download matrix of available packages at specific date ------------------