This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Load CEDET. | |
;; See cedet/common/cedet.info for configuration details. | |
(load-file "~/.emacs.d/cedet-1.0pre6/common/cedet.el") | |
;; Enable EDE (Project Management) features | |
(global-ede-mode 1) | |
;; Enable EDE for a pre-existing C++ project | |
;; (ede-cpp-root-project "NAME" :file "~/myproject/Makefile") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#script for testing tiny | |
$PATH = "./tests/test-progs/" | |
format = ARGV[0] ||"pr2.{[a-z][0-9][0-9]}" | |
puts Dir.glob($PATH + format).sort | |
#ugly hack check wat the problem with gets | |
ARGV.clear | |
tiny_binary = "./tc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#some script for loading models and other stuff | |
require 'rubygems' | |
require 'active_record' | |
require 'yaml' | |
#require 'app/helpers/application_helper' | |
MODEL_PATH = './app/models/' | |
LIB_PATH = './app/lib/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'ruby2ruby' | |
require 'ruby_parser' | |
require 'pp' | |
code_str = File.read('./test.rb') | |
parser = RubyParser.new | |
sexp = parser.process code_str | |
#puts sexp.inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filename = "test_mail.rb" | |
file = File.new("./"+filename, "r") | |
filecontent = "" | |
file.each do |line| | |
filecontent << line | |
end | |
encodedcontent = [filecontent].pack("m") # base64 | |
marker = "TESTBOUNDARY" | |
body = <<MESSAGE_BODY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Neural Netowrks Project | |
% srinivas muddana | |
% 9561 - 2909 | |
% self organizing maps | |
function [initMap, map, elapsedTime, winNeurons] = testsomap(mapSize,ipData,epoochs) | |
initTime = clock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <list> | |
#include <vector> | |
#include <stack> | |
#include <string> | |
// basic file operations | |
#include <iostream> | |
#include <sstream> | |
#include <fstream> | |
#include <time.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Collection | |
def initialize | |
@map = Hash.new | |
end | |
def inc_frequency(word) | |
@map[word] = @map[word] ? (@map[word]+1) : 1 | |
end | |
def add(word) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# down the test/train data : http://www.stanford.edu/~alecmgo/cs224n/twitterdata.2009.05.25.c.zip | |
#into a folder "corpus" at the level of this file (else u need to change inside the code for now) | |
import nltk | |
import random | |
import re | |
import gc | |
from pymongo import Connection | |
#method defs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'mongo' | |
require 'tweetstream' | |
USER = "<username>" | |
PASS = "<password>" | |
conn = Mongo::Connection.new | |
db = conn.db("dbname") | |
tweets = db.collection("collname") |
OlderNewer