Skip to content

Instantly share code, notes, and snippets.

View shivam5992's full-sized avatar
:octocat:

Shivam Bansal shivam5992

:octocat:
View GitHub Profile
@shivam5992
shivam5992 / Simulating Key Presses
Created July 31, 2013 03:54
Gist for simulating the key presses of keyboard using java.
try
{
Robot shaz=new Robot();
shaz.setAutoDelay(100);
char ch;
int len=0;
String text="hello my name is Github";
len=text.length();
for (int i=0;i<len;i++)
{
@shivam5992
shivam5992 / ftos.c
Created August 23, 2013 13:17 — forked from psych0der/ftos.c
#include <stdio.h>
#include <math.h>
#define precision 6 //precision for decimal digits
int main(int argc, char const *argv[])
{
float f,ff;
@shivam5992
shivam5992 / rest_app.py
Created January 16, 2014 08:45
REST ful web API using Flask A simple To-Do list implementation
'''
REST Ful WEB API in Flask
Simple Rest api in which resource is list of tasks
methods are implemented for GET, POST, PUT, DELETE
author: Shivam Bansal
website: shivambansal.com
Reference: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
'''
@shivam5992
shivam5992 / lambda.py
Created July 11, 2014 08:16
use of lambda, filter, map and reduce in python
'''
Python script showing the use of lambda, map, reduce and filter keywords in Python
lambda: instantaneous, anonymous, use and throw function to be used at run time.
syntax: output = lambda arguments: express
map: Apply an expression over each element of list
filter: filtering out some elements out of a list based on a condition
reduce: reducing down list into a single element by applying a common expression