Skip to content

Instantly share code, notes, and snippets.

{
"metadata": {
"name": "",
"signature": "sha256:e7dfda19c647e9d3dc4e94180c19589cc96dada50b5952a9b5d6c318c26c65e0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@jgc128
jgc128 / sms_spam_1567
Last active August 29, 2015 14:08
timus
#!/usr/bin/python3
from sys import stdin
startChar = ord('a')
endChar = ord('z')
customChars = [['.',',','!'],[' ']]
def createCustomCharsTable():
customCharsTable = {}
@jgc128
jgc128 / nmf
Last active August 29, 2015 14:08
Non-Negative matrix factorization
{
"metadata": {
"name": "",
"signature": "sha256:cc620a258bec1c319225fa966334f0ce1c92696660fd9982aad2ced2ed69099c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@jgc128
jgc128 / main.cpp
Last active August 29, 2015 14:23
Clicker for the Steam's Monster Summer Game
#include "windows.h"
#include "iostream"
#define INTERVAL_BETWEEN_CLICKS 125
#define CLICK_INTERVAL 50
using namespace std;
inline void mouse_move(LONG x, LONG y)
{
@jgc128
jgc128 / StartGame.cs
Created August 3, 2015 16:02
StartGame.
var gamePackageName = Resources.GetString(Resource.String.game_package_name);
var gameIntent = PackageManager.GetLaunchIntentForPackage(gamePackageName);
if (gameIntent == null)
{
try {
StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("market://details?id=" + gamePackageName)));
} catch (ActivityNotFoundException) {
StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("http://play.google.com/store/apps/details?id=" + gamePackageName)));
}
}
@jgc128
jgc128 / probem_4.ipnb
Created September 28, 2015 17:30
Problem 4 for NLP class
{
"cells": [
{
"cell_type": "code",
"execution_count": 47,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@jgc128
jgc128 / common.py
Last active October 17, 2015 01:42
Code for homework 1 (2015 Fall NLP Class)
import os
base_dir = '/data1/aromanov/study/2015_fall/nlp/homeworks/hw1/'
brit3_filename = os.path.join(base_dir, 'brit3-excerpt.txt')
brit3_marked_filename = os.path.join(base_dir, 'brit3-excerpt-marked.txt')
problem4_text_filename = os.path.join(base_dir, 'problem4.txt')
def load_documents_from_dir(directory):
files = [os.path.join(directory, f) for f in os.listdir(directory)]
@jgc128
jgc128 / test_keras.ipynb
Created October 26, 2015 02:49
Test Keras library
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.
-63278844
-63278845
-63278846
-63278847