Skip to content

Instantly share code, notes, and snippets.

View sauravtom's full-sized avatar
🏠
Working from home

Saurav Kumar sauravtom

🏠
Working from home
View GitHub Profile
@Gunio
Gunio / Parsing JSON in python
Created October 18, 2011 05:25
Parsing JSON in python
import requests
import simplejson
r = requests.get('https://github.com/timeline.json')
c = r.content
j = simplejson.loads(c)
for item in j:
print item['repository']['name']
@tjb0607
tjb0607 / visualizer.py
Last active December 26, 2021 19:24
a 2D audio visualizer script for Blender 2.5+ (v0.3)
# To use this script, you must first change a few things.
# First, you'll want to change the filepath for the sound file.
# This is on line 76. Second, you might want to change the materials or the settings.
# To render this, you'll need to set the background color, enable Only Render on the display window, and render it with OpenGL (it's much faster and most optimal for 2D renders.)
# LICENSE = wtfpl
# VERSION = 0.3
import bpy
def makeMaterial(name, diffuse, alpha):
@sauravtom
sauravtom / Annoy.bat
Created June 7, 2012 04:39
Simple batch file program that displays a list of messages and then goes to loop.
@echo off
title Ok so get ready to be annoyed,
:annoy
msg * Hello %username%, I am Saurav
msg * How are you %username%?
msg * I am fine.
msg * .......
msg * this is a whale , '____________________________'
msg * I hope this annoying string of messages finds you in the best of your health.
msg * Since this is one way conversation, almost all of the talking will be done by me only.
@zeffii
zeffii / yies.yaml
Created June 22, 2012 18:06
appspot favicon
application: yourappname
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /favicon.ico
static_files: static/images/favicon.ico
upload: static/images/favicon.ico
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@faleev
faleev / gist:3435377
Created August 23, 2012 10:38
Compile FFmpeg on Ubuntu

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@sauravtom
sauravtom / php_grabber.php
Created October 4, 2012 05:09
An image grabber php script which crawls the entered url and comes up with a list of all links on the page and displays them beautifully on the page. Uses simple html dom , which makes it all cake walk. <contains 3 files php_grabber.php ,simple_html_dom.
<html>
<head>
<title>Image Grab</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script type="text/javascript">
$("#toggle").click(function() { $("img").slidetoggle("slow"); };
</script>
@charlee
charlee / ffmpeg.sh
Last active January 19, 2022 15:05
ffmpeg tips
# losslessly concat mp4 files
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
# concat files with the same format
# 1. create a file list
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'
@Bodhisattva2-0
Bodhisattva2-0 / Hippies in cubicles
Created March 4, 2013 02:33
Just a song for the hippies in cubicles.
No crack, no marry me Juana
No slack, no smoked salmon
All you got is forms to fill
All you got is time to kill
Once Hippie, now has no hope
only roasted beans pass as dope.
The Hippie was a rock star
He wore Hawaiian pants
@zacharyvoase
zacharyvoase / README.md
Last active May 21, 2020 06:19
A li’l class for data URI manipulation in Python.

DataURI.py

Data URI manipulation made easy.

This isn't very robust, and will reject a number of valid data URIs. However, it meets the most useful case: a mimetype, a charset, and the base64 flag.

Parsing