Skip to content

Instantly share code, notes, and snippets.

View brianbirir's full-sized avatar
🎯
Focusing

Brian Birir brianbirir

🎯
Focusing
View GitHub Profile
@brianbirir
brianbirir / parse.py
Created May 29, 2017 10:04
python - get filenames and folders of a directory using os walk
#!/usr/bin/python
import os
#globals
top = "/home/zuch/WWW/translate/archive" #root directory of archive
#node class
class node:
path = ""
@brianbirir
brianbirir / Cricket data.py
Created May 24, 2017 11:22 — forked from hybridjosto/Cricket data.py
scraping data from a web table using python and Beautiful Soup
import urllib2
from bs4 import BeautifulSoup
# http://segfault.in/2010/07/parsing-html-table-in-python-with-beautifulsoup/
f = open('cricket-data.txt','w')
linksFile = open("linksSource.txt")
lines = list(linksFile.readlines())
for i in lines[12:108]: #12:108
url = "http://www.gunnercricket.com/"+str(i)
try:
@brianbirir
brianbirir / encoding-video.md
Created December 1, 2016 08:12 — forked from Vestride/encoding-video.md
Encoding Video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus