Skip to content

Instantly share code, notes, and snippets.

prompt = f"""
Your task is to determine if the student's solution \
is correct or not.
To solve the problem do the following:
- First, work out your own solution to the problem.
- Then compare your solution to the student's solution \
and evaluate if the student's solution is correct or not.
Don't decide if the student's solution is correct until
you have done the problem yourself.
@iamharshit
iamharshit / generate_data.m
Created November 2, 2017 19:37
generates a csv file containing data(x,f(x)) which is used for training neural nets
function generate_data()
if exist('data_harshit.csv', 'file') == 2
delete data_harshit.csv;
end
x=[-1000:20:1000];
y=f(x);
ans=vertcat(x,y)';
csvwrite('data_harshit.csv',['x','y']);
dlmwrite('data_harshit.csv',ans,'delimiter',',','-append');
echo `rm myfile2.txt`
declare -i count
count=0
declare -i total
total=0
cat vocab_chat.txt | while read p; do
total=total+1
if echo "$p" | grep '*'; then
@iamharshit
iamharshit / GetTweetPostStock_readme.md
Last active March 20, 2017 15:57
"Get Tweet Post Stock" Project Description

Get Tweet Post Stock

An Android app that uses Machine Learning to correlate tweet sentiment and stock prices.

Overview

The project searches the Twitter API for tweets about a given company that a user wants to be monitored, and uses sentiment analysis to identify general sentiment about the company. Using the general time of those tweets, it would then find the change in stock market price for the company after a short delay to allow for those changes, and note whether the stock increased or decreased. This data was then fed into a machine-learning algorithm in order to predict whether a stock would rise or fall, given a general sentiment from tweets.

Dependencies

  • Twitter4J for getting access to tweets about the companies
import theano
import theano.tensor as T
from helper import activations
from helper import misc,updates
from scipy.stats import gaussian_kde
from matplotlib import pyplot as plt
from matplotlib.pyplot import *
from helper import inits
from helper.theano_utils import floatX, sharedX