Skip to content

Instantly share code, notes, and snippets.

View thekindlyone's full-sized avatar

Aritra Das thekindlyone

  • @TeamAlbi
  • New Zealand
View GitHub Profile
# coding: utf-8
from __future__ import unicode_literals
from unidecode import unidecode
import requests
from bs4 import BeautifulSoup as bs
from time import sleep
import re
from kitchen.text.converters import to_bytes
import itertools
import csv
#!/usr/bin/env python
# coding: utf-8
import re
import requests
import sys
import subprocess
def download(furl,title):
wget = subprocess.Popen(['wget','-c','-O',title, furl])
wget.wait()
return wget.returncode
@thekindlyone
thekindlyone / gist:8364401
Created January 10, 2014 23:04
comparison
def testvivek():
i=0
sum=0
giveup3=0
giveup5=0
lim=1000
while True:
num3=3*i #generating multiples for processing
num5=5*i # ^
if num3>=lim: # if multiple of 3>limit then stop adding those, and set flag
@thekindlyone
thekindlyone / gist:8364163
Created January 10, 2014 22:44
for vivek
i=0
sum=0
giveup3=0
giveup5=0
lim=1000
while True:
num3=3*i #generating multiples for processing
num5=5*i # ^
if num3>=lim: # if multiple of 3>limit then stop adding those, and set flag
giveup3=1
@thekindlyone
thekindlyone / vlcwraPy.py
Created December 28, 2013 19:51
VLC player hack to load prev/next files in folder in one keystroke. once assigned to windows right click on video files via regedit, uses pyhook to bind HOME and END keys to load prev and next files in folder. stops and starts vlc processes to achieve this behavior.
import os
import sys
import pythoncom, pyHook
import win32api
import subprocess
import ctypes
import threading
from multiprocessing import *
import time
@thekindlyone
thekindlyone / thekindlybot.py
Created December 28, 2013 19:44
xmpp chat-bot that emails music among other things. Uses beets music organizer http://beets.radbox.org/
import logging
from sleekxmpp import ClientXMPP
from sleekxmpp.exceptions import IqError, IqTimeout
import subprocess
import smtplib
import mimetypes
import email
import email.mime.application
import thread
import os
from __future__ import division
from bs4 import BeautifulSoup as bs
import requests
import re
import time
from pymongo import MongoClient
from time import mktime
from datetime import datetime
import plotly.plotly as py
import plotly.graph_objs as go
thekindlyone@deepthought:/media/thekindlyone/storage/anime/the_tower_of_druaga:Aegis_of_uruk$ nwanime-dl -i 12 http://www.nwanime.com/the-tower-of-druaga-episode-1/video/3af5693726838cd72816/
The Tower of DRUAGA Episode 1
fetching mirrors
mirrors found
downloadable mirror found
downloadable mirror found
attempting download from mp4Upload
--2015-04-07 13:27:33-- http://www6.mp4upload.com:182/d/sgxveokgz3b4quuohsubemcscy4l6sq43gt5tgvguibarljupsu4bj3o/video.mp4
Resolving www6.mp4upload.com (www6.mp4upload.com)... 50.7.128.202
Connecting to www6.mp4upload.com (www6.mp4upload.com)|50.7.128.202|:182... connected.
# pacmangame
import turtle
import random
cell_size = 23
width = 11
height = 9
bg_color = "gray" # background color
wall_color = "black"
import json
import urllib
tmp=open("tmp.txt","a")
url = 'https://www.virustotal.com/vtapi/v2/ip-address/report'
parameters = {'ip': '50.7.189.194', 'apikey': '54ea2f1b2adf87f75eb1c8bbf7aefac361e869d66cc7d8d6b70f084c25cf3e2f'}
response = urllib.urlopen('%s?%s' % (url, urllib.urlencode(parameters))).read()
response_dict = json.loads(response)
resp_code=response_dict.get("response_code")
if resp_code==1:
mesg=response_dict.get("verbose_msg")