This file contains hidden or 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
| /*A stupid str2bf converter!*/ | |
| #include <stdio.h> | |
| #define MAX 100 | |
| int win=10; | |
| char cell[MAX]={0}; | |
| int curr=0; | |
| /*Find a number as a multiple of ten */ |
This file contains hidden or 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 | |
| import subprocess | |
| import re | |
| import time | |
| # The location of the warning sound to play | |
| PLAY='/home/kaustubh/zenbell.wav' | |
| def loop(flag): | |
| acpi=subprocess.check_output(['acpi','-b']) |
This file contains hidden or 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
| #Cyberoam brute force | |
| import time | |
| import urllib.request | |
| import urllib.parse | |
| import sys | |
| def fetchpage(url,values=None,header={"Referer":"http://www.google.co.in/"}): | |
| data=None | |
| try: | |
| if values!=None: |
This file contains hidden or 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
| # Created on GNU Octave 3.8.1 | |
| # Demonstrates that Sampling Distribution of the Sample Mean follows a Normal Distribution | |
| global max=30; # Numbers 1-max for which to generate probability table | |
| global dist; # Stores the probability distribution table: dist(1,x)->probability, dist(2,x)->Number | |
| # Generate probability distribution table for total of max numbers | |
| function randgen | |
| global max; | |
| global dist; |
This file contains hidden or 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
| """Demo of streaming requests with Tornado. | |
| This script features a client using AsyncHTTPClient's body_producer | |
| feature to slowly produce a large request body, and two server | |
| handlers to receive this body (one is a proxy that forwards to the | |
| other, also using body_producer). | |
| It also demonstrates flow control: if --client_delay is smaller than | |
| --server_delay, the client will eventually be suspended to allow the | |
| server to catch up. You can see this in the logs, as the "client |
This file contains hidden or 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 logging | |
| import socket | |
| import tornado.ioloop | |
| import tornado.iostream | |
| import tornado.options | |
| # Nothing listening here | |
| host = "127.0.0.1" | |
| port = 12345 |