Skip to content

Instantly share code, notes, and snippets.

View shravan-shandilya's full-sized avatar

Shravan Shandilya shravan-shandilya

View GitHub Profile
__author__ = 'Shravan'
from pygeocoder import Geocoder #import Geocoder
results = Geocoder.reverse_geocode(12.2853, 76.6423) #Pass the required lat and long combo here
print results #The reverse geocoding result is stored and printed
from twisted.web import server, resource
from twisted.internet import reactor
from pygeocoder import Geocoder
class Simple(resource.Resource):
isLeaf = True
def render_GET(self, request):
print "Got a GET Request"
def render_POST(self, request):
curl "https://www.unocoin.com/trade?all" > tee >(echo "Buy:" $(jq '.buy') "https://www.unocoin.com/buy") >(echo "Sell:" $(jq '.sell') "https://www.unocoin.com/sell") | cut -d} -f2"
Verifying that +shravan is my blockchain ID. https://onename.com/shravan
#!/usr/bin/python
from bs4 import BeautifulSoup
import requests
characters = open("temp.txt","r")
twitter_data = open("twitter_data.txt","w+")
url = "https://twitter.com/search?f=users&q="
account_url="https://twitter.com"
for char in characters:
print "Getting data for ",char
soup = BeautifulSoup(requests.get(url+char.replace(" ","%20")).content,"html.parser")
GameOfThrones
Tyrion Lannister
Cersei Lannister
Daenerys Targaryen
Jon Snow
Sansa Stark
Arya Stark
Jorah Mormont
Jaime Lannister
Samwell Tarly
GameOfThrones,4238680
Tyrion Lannister,488308
Cersei Lannister,95663
Daenerys Targaryen,442872
Jon Snow,1507862
Sansa Stark,86925
Arya Stark,113349
Jorah Mormont,7175
Jaime Lannister,47086
Samwell Tarly,53436
Early video scrolling function:
Link: http://lingrok.org/xref/linux-linus/arch/x86/boot/compressed/misc.c#150
How: copy the latest line to previous line's video memory array,write " " to latest line
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int a = 3;
int b = 4;
int* pointerToA = &a;
int* pointerToB = &b;
@shravan-shandilya
shravan-shandilya / bulk_downsizer_and_sampler.py
Created March 27, 2017 13:07
bulk_downsizer_and_sampler.py
#!/usr/bin/python
from PIL import Image
import os
resize = (20,20)
read_path = "Img/Sample%03d/img%03d-%03d.png"
write_path = "Downscaled/Sample%03d/img%03d-%03d.png"
dataset = open("kannada.csv","w+")
for letter in range(1,18):
for sample in range(1,26):