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
#!/usr/bin/env python | |
import urllib2 | |
import json | |
locu_api = 'YOUR_API_KEY' | |
#final_url = 'https://api.locu.com/v1_0/venue/search/?locality=Newport%20Beach&api_key=YOUR_API_KEY' | |
def locu_search(query): | |
api_key= locu_api |
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
<html> | |
<body> | |
<?php | |
$myfile =fopen("movie_list.txt", "r") or die("Unable to open file!"); | |
while (!feof($myfile)) { | |
$line = fgets($myfile); | |
$pos = strrpos($line, ","); |
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
<html> | |
<body> | |
<?php | |
$movie=$_GET["mname"]; | |
$yr=$_GET["year"]; | |
// echo $movie; | |
$movie = str_replace(' ', '%', $movie); |
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
import cx_Oracle | |
con = cx_Oracle.connect('scott/tiger@IPADDRESS/SID') | |
print con.version | |
cur = con.cursor() | |
cur.execute('select a.session_id,a.oracle_username, a.os_user_name, b.owner "OBJECT OWNER", b.object_name,b.object_type,a.locked_mode from (select object_id, SESSION_ID, ORACLE_USERNAME, OS_USER_NAME, LOCKED_MODE from v$locked_object) a, (select object_id, owner, object_name,object_type from dba_objects) b where a.object_id=b.object_id') | |
res = cur.fetchall() | |
for r in res: | |
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
#!/usr/bin/env python27 | |
#Importing the modules | |
import sys | |
import urllib2 | |
import re | |
import json | |
#Ask for movie title | |
title = raw_input("Please enter a movie title: ") |
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
import re | |
import nltk | |
from numpy import zeros,dot | |
from numpy.linalg import norm | |
# Get stop words | |
stop_words = [w.strip() for w in open('C:\FWs.txt','r').readlines()] | |
splitter = re.compile ( "[a-z\-']+", re.I ) | |
stemmer = nltk.PorterStemmer() |
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
/* @(#) TermDocumentMatrix 1.00 2/25/2013 | |
* | |
* [Copyright Information] | |
*/ | |
/* | |
* Revision History: | |
* Revision Version Project Change Date Author Description | |
* No. No. Code Req. no. | |
* 1 1 Sobhan Hota |
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
/* @(#) SeparateSMOBinaryOpsToFiles.java 1.00 2/17/2013 | |
* | |
* [Copyright Information] | |
*/ | |
/* | |
* Revision History: | |
* Revision Version Project Change Date Author Description | |
* No. No. Code Req. no. | |
* 1 1 Sobhan 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
#!/usr/bin/python | |
#Script to generate feature vector for a supplied BoWs file. | |
#Date: Nov 2 2012 | |
#Author: Hota Sobhan | |
from string import punctuation | |
from operator import itemgetter | |
words = {} | |
total_words = 0 |
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
#!/usr/bin/python | |
#Script to generate most frequent 500 BoWs from a corpus (ie lexicon). | |
#Date: Nov 2 2012 | |
#Author: Hota Sobhan | |
from string import punctuation | |
from operator import itemgetter | |
N = 1000 | |
words = {} |
NewerOlder