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
<?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); | |
?> |
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
.model small | |
.stack 1024 | |
.data | |
.code | |
start: | |
mov ax,@data | |
mov ds,ax | |
extrn writesint:proc | |
mov ah,2ch | |
int 21h |
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
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 |
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
def f(nr,dr): | |
return (nr-dr*(nr/dr)) |
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
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] |
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
def prime(n): | |
for i in range(3,n): | |
if 2**(i-1)%i==1: | |
print i |
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
#!/bin/bash | |
for ip in 192.168.1.{1..254}; do | |
ping -c 1 -W 1 $ip | grep "64 bytes" & | |
done |
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
# font color : green | |
color='\e[0;32m' | |
# font color : white | |
NC='\e[0m' | |
getquote(){ | |
num_online_quotes=9999 | |
rand_online=$[ ( $RANDOM % $num_online_quotes ) + 1 ] | |
quote=$(wget -q -O - "http://www.quotationspage.com/quote/$rand_online.html" | |
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
#!/bin/bash | |
wget -q -O - "http://www.macmillandictionary.com/dictionary/british/$1" | grep -P -o "<span class=\"DEFINITION\">(.*?)</span>" | grep -Po '(?<=href=")[^"]*' | grep -Po '=.*?$' | cut -d = -f 2 | awk '{printf "%s ",$1}' |
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 matplotlib.pyplot as mpplt | |
import matplotlib.gridspec as gridspec | |
import numpy | |
figure = mpplt.figure(figsize=(11, 10)) | |
gs = gridspec.GridSpec(3, 12) | |
plt = figure.add_subplot(gs[0, :]) | |
plt.hlines(3, -10, 10, color='red') | |
plt.hlines(-3, -10, 10, color='red') |
OlderNewer