Skip to content

Instantly share code, notes, and snippets.

View SahilC's full-sized avatar

Sahil Chelaramani SahilC

View GitHub Profile
@SahilC
SahilC / Manga.py
Created June 7, 2013 21:00
A simple python script to download Manga from MangaReader.
from urllib import request
print("Input Url to Manga on MangaReader")
x=input()
u=request.urlopen(x)
line=str(u.read(),encoding='utf8')
no=line.index("document['pu']")
no2=line.find(";",no)
print(no2-no)
url=line[no+17:no2]
url2=line[no+18:no2-12]
@SahilC
SahilC / rem.py
Created April 17, 2013 12:46
Find mod of two numbers without mod
def f(nr,dr):
return (nr-dr*(nr/dr))
@SahilC
SahilC / Solution
Last active December 15, 2015 05:49
vacationlabs registration link solution
def f(n):
for i in xrange(1,n):
if i%3==0 and i%5==0:
print 'Whazaa'
elif i%3==0:
print 'Hip'
elif i%5==0:
print 'Hop'
else:
print i
@SahilC
SahilC / clock.asm
Created December 19, 2012 10:31
A simple assembly code for the 8086 microprocessor to display a digital clock in real time.
.model small
.stack 1024
.data
.code
start:
mov ax,@data
mov ds,ax
extrn writesint:proc
mov ah,2ch
int 21h
@SahilC
SahilC / Backup.php
Created November 28, 2012 22:26
Php Mysql Database backup and restore
<?php
$dump_path = ""; //input location for the backup to be saved
$host = ""; //db host e.g.- localhost
$user = ""; //user e.g.-root
$pass = ""; //password
$command=$dump_path.'mysqldump -h '.$host.' -u '.$user.' bank > bank.sql';
system($command);
?>