Skip to content

Instantly share code, notes, and snippets.

View nishad's full-sized avatar
🐢
I may be slow to respond.

Nishad Thalhath nishad

🐢
I may be slow to respond.
View GitHub Profile
@nishad
nishad / smi2srt.py
Created October 27, 2015 14:22
convert script in SMI to SRT format
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@package smi2srt
@brief this module is for convert .smi subtitle file into .srt subtitle
(Request by Alfred Chae)
Started : 2011/08/08
license: GPL
@nishad
nishad / mubi.py
Created September 22, 2015 23:47 — forked from vchahun/mubi.py
Do some dark magic.
import os
import argparse
import requests
import progressbar
def main():
parser = argparse.ArgumentParser(description='All your MUBI are belong to us.')
parser.add_argument('film_id', type=int)
parser.add_argument('resolution', choices=('360p', '480p', '640w', '720w', '1280w'))
parser.add_argument('output_file')
<?php
snippet('header');
$tag = urldecode(param('tag'));
if(param('tag'))
$articles=$pages->visible()->filterBy('tags',$tag,',')->sortBy('date')->flip();
?>
<main class="main">
<section>
<h1><?php echo $page->title() . ' ' . $tag ?></h1>
<?php
/*
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch)
---------
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
#!/bin/python
import requests
import re
def start():
chapter_links=[]
course="http://try.jquery.com/"
response=requests.get(course)
chapter_pattern=re.compile(r'(http[s]?://try.jquery.com/levels/\d)"')
@nishad
nishad / smaple.php
Last active August 29, 2015 14:23 — forked from laiso/smaple.php
<?php
/**
* Exite翻訳(英語→日本語)の野良API サンプル
*/
$text = 'This is a pen.';
$to = 'ENJA'; // ENJA or JAEN
$q = http_build_query(array(
'_id' => '6855579bdcb52e1a0a3822af4b5a9c88',
@nishad
nishad / indiapost-pin-apigen.sh
Last active August 29, 2015 14:18
Simple script to generate static API for IndiaPost Pincodes csv Data
#!/usr/bin/env bash
# Simple script to generate static API for IndiaPost Pincodes
# This script requires csvkit, jq
# Make sure you did 'pip install csvkit' before running this script.
# Installation of jq is fairly simple, 'brew install jq' will do in Mac
# Get CSV dataset from
# https://data.gov.in/catalog/all-india-pincode-directory
#!/bin/bash
# Install csvkit with csvpys
# (csvpys hasn't been pulled back into the main csvkit repo that you can pip install)
git clone https://github.com/cypreess/csvkit.git
cd csvkit
python setup.py build
sudo python setup.py install
cd ~
<?php
#Pages have these fields, the can have comma separated values for group, category and option
# Title: Event1
# ----
# Group: Group1
# ----
# Category: Cat2
# ----
<?php
#Pages have these fields, they can have comma separated values for group, category and option
# Title: Event1
# ----
# Group: Group1
# ----
# Category: Cat2
# ----
# Option: Option1