This file contains 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
/* | |
* Project Name: DecodeNDT | |
* Descripton: Decodes NDT files from Atlantica Online | |
* Ported from Python to C# by Doğan Çelik | |
* Originally from: http://bit.ly/kilEew | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Text; |
This file contains 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 | |
/* | |
* Written by: Doğan Çelik | |
* Description: Exports a list of episode names from a specified season from a specified series from TheTVDB | |
* A demo is available at http://dogancelik.com/dizi/ | |
* How to use: Request this page bolum.php?d=NAME_OF_THE_SERIES&s=SEASON_NUMBER | |
*/ | |
//error_reporting(E_ALL); |
This file contains 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 -*- | |
# Convert ShiftJIS to UTF-8 | |
# Usage: cat ShiftJIS.txt | ./convert.py > UTF8.txt | |
# Alternative method: cat ShiftJIS.txt | iconv -f shift_jis -t utf8 > UTF8.txt | |
import sys | |
import codecs |
This file contains 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 sublime, sublime_plugin | |
import webbrowser | |
class OpenInBrowser(sublime_plugin.TextCommand): | |
def run(self, edit): | |
webbrowser.open(self.view.file_name()) |
This file contains 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
# Credit: http://drizin.io/Change-Keyboard-Input-Languages-with-Powershell/ | |
$currentLangAndKeyboard = (Get-WinUserLanguageList).InputMethodTips | |
if ($currentLangAndKeyboard -eq "0409:00000409") | |
{ | |
$langList = New-WinUserLanguageList en-US | |
$langList[0].InputMethodTips.Clear() | |
$langList[0].InputMethodTips.Add('0409:0000041F') | |
Set-WinUserLanguageList $langList |
This file contains 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 timeit | |
# Tested on Python 2.7.5 (64-bit) | |
t = timeit.Timer(stmt="isinstance(['a', 1], types.ListType)", setup="import types") | |
print t.timeit() # 0.310844602274 | |
t = timeit.Timer(stmt="isinstance(['a', 1], list)") | |
print t.timeit() # 0.313751077743 |
This file contains 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 timeit | |
t = timeit.Timer(stmt="datetime.datetime(*datetime.datetime.now().date().timetuple()[:6])", setup="import datetime") | |
print t.timeit() # 4.80428367916 | |
t = timeit.Timer(stmt="datetime.datetime.combine(datetime.datetime.now().date(), datetime.time(0, 0, 0))", setup="import datetime") | |
print t.timeit() # 3.23761676673 |
This file contains 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 timeit | |
t = timeit.Timer(stmt="splitext(__file__)[0]", setup="from os.path import splitext") | |
print t.timeit() # 2.1748800403 | |
t = timeit.Timer(stmt="__file__[:-3]") | |
print t.timeit() # 0.110901126177 | |
t = timeit.Timer(stmt='__file__[:__file__.rindex(".")]') | |
print t.timeit() # 0.387404180721 |
This file contains 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
page = require('webpage').create() | |
fs = require 'fs' | |
system = require 'system' | |
page.onConsoleMessage = (msg) -> console.log(msg) | |
page.open "http://en.wikipedia.org/wiki/Bleach_episodes", (status) -> | |
csv = page.evaluate -> | |
formatDate = (date) -> | |
date.getFullYear() + "-" + ((if date.getMonth() < 9 then "0" else "")) + (date.getMonth() + 1) + "-" + ((if date.getDate() < 10 then "0" else "")) + date.getDate() |
This file contains 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
# Requires http://sourceforge.net/projects/pywin32/ | |
__module_name__ = 'Foobar2000 Now Playing' | |
__module_version__ = '0.1' | |
__module_description__ = 'Prints what is playing from foobar2000' | |
import xchat | |
import win32gui | |
import re | |
OlderNewer