Skip to content

Instantly share code, notes, and snippets.

@shshank
shshank / Fourier.cpp
Created January 14, 2013 21:11
My implementation of a 15 point Fourier Transform. Inspiration for a C++ Fourier Library.
#include <cmath>
#include <iostream>
using namespace std;
//creating a custom data type for complex no.
struct complx //The 15 point set is represented here as an
{ // array of complx data types.
double real;
double imag;
@shshank
shshank / auto_voter.py
Last active December 27, 2015 13:09
This script adds votes on an online voting competition. Makes use of the mailinator.com's free temporary emails to make twitter accounts.
#This script adds votes on the an online voting competition.
#Makes use of the mailinator.com's free temporary emails to make twitter accounts.
#REQUIREMENTS:
#file:: proxies.txt
# each line in the file must contain a proxy in the form: <ip>:<port>
# e.g. xxx.xxx.xxx.xxx:8080
#
#Change the variable values::
# band_page_id and password must be changed by the user to a value of their choice.
BRANCH_ID={'btech_CSE':'b1',
'btech_ETC':'b2',
'btech_EEE':'b3',
'btech_IT':'b4',
'mtech_CSE':'A1', #I don't really know what it is
'faculty':'FP' # i have no clue kya hai iska. i will do that
}
class DoesNotExistError(Exception):
@shshank
shshank / FBPage_cleaner.py
Last active August 29, 2015 14:14
Clean your Facebook page by deleting comments that contain certain phrases.
import json
import requests
BAD_PHRASES = ['kutta']
PAGE_NAME = ''
access_token = "" #need manage_pages and publish_action permision
burl = "https://graph.facebook.com/v2.2/"
access_str = "access_token=%s"%(access_token)