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 | |
# 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 ~ |
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
#!/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 |
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 | |
/** | |
* Exite翻訳(英語→日本語)の野良API サンプル | |
*/ | |
$text = 'This is a pen.'; | |
$to = 'ENJA'; // ENJA or JAEN | |
$q = http_build_query(array( | |
'_id' => '6855579bdcb52e1a0a3822af4b5a9c88', |
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/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)"') |
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 | |
/* | |
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 <[email protected]> |
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 | |
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> |
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 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') |
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
#!/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 |
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 | |
$OTS = '/usr/bin/ots'; | |
loadurl(); | |
if(!isset($_REQUEST['format']) || $_REQUEST['format'] =! 'text'){ | |
header('Content-Type: text/html; charset=utf-8'); | |
html_header(); | |
form(); |
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 | |
function Redirect($url, $permanent = false) | |
{ | |
if (headers_sent() === false) | |
{ | |
header('Location: ' . $url, true, ($permanent === true) ? 301 : 302); | |
} | |
exit(); | |
} |