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
def test(): | |
print('Hello Gist!!') |
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
# coding:utf-8 | |
# ANS-progのurl:http://answer.pythonpath.jp/questions/248/ | |
# 「よく使う/全然使わない標準モジュールはなんですか?」 | |
# で名前の上がっているよく使われている標準モジュールTOP10 | |
# 今は数が少ないので手計算でもいいけどCounter使ってみたかったので。 | |
import collections | |
with open('commonly-used-modulelist.txt', 'r') as load_file: | |
items = [item.strip('\n') for item in load_file.readlines()] |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document | |
domain("google.com"), | |
domain("google.co.jp") | |
{ | |
/* To hide profile photo */ | |
#gbi4i, #gbmpi, .a-c-T, | |
.a-b-Rf-Lz, .a-f-VitKP, | |
.a-f-i-q { |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
/* | |
* Google User Style | |
* This style is to fixed of Google's top bar. | |
*/ | |
@-moz-document domain("google.com"), domain("google.co.jp") { | |
#gb { | |
position: fixed; | |
width: 100%; | |
top: -1px; |
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
// ==UserScript== | |
// @name MyPixiv | |
// @namespace http://d.hatena.ne.jp/kk6/ | |
// @description とりあえずお知らせがうざかったので。 | |
// @include http://www.pixiv.net/* | |
// @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js | |
// ==/UserScript== | |
(function ($) { | |
// News at main contents | |
var newstop = $("div.NewsTop"); |
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
// ==UserScript== | |
// @name MyPixiv | |
// @namespace http://d.hatena.ne.jp/kk6/ | |
// @description とりあえずお知らせを隠す機能だけ。 | |
// @include http://www.pixiv.net/* | |
// ==/UserScript== | |
(function ($) { | |
var news = $('.NewsTop > h1, .adver_Rightcolumn + .area_right > .area_rightSpace'); | |
news.next().hide(); | |
news.click(function () { |
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 -*- | |
import re | |
import urllib2 | |
import contextlib | |
import collections | |
from pyquery import PyQuery as pq | |
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
#-*- coding:utf-8 -*- | |
""" | |
This script compare a package installed by pip and the latest version | |
in PyPI. And it is also possible to upgrade it then and there. | |
For now work on Windows and Linux. | |
And I'm not MACer.(Probably run.) | |
require: Python 2.6, 2.7 or 3.x | |
If you using Python 2.5 or below, check at gist:1153625 |
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
#-*- coding:utf-8 -*- | |
""" | |
This script compare a package installed by pip and the latest version | |
in PyPI. And it is also possible to upgrade it then and there. | |
For now work on Windows and Linux. | |
And I'm not MACer.(Probably run.) | |
""" | |
from pip import get_installed_distributions, call_subprocess |
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
#-*- coding:utf8 -*- | |
# 無駄にitertoolsを駆使したFizzBuzz | |
from itertools import repeat, ifilterfalse, starmap, count | |
N = 31 | |
LEN = range(1, N) | |
FIZZ, BUZZ = map(repeat, ("Fizz", "Buzz")) | |
fizz, buzz = ( |
OlderNewer