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 urllib2 | |
import chardet | |
from pyquery import PyQuery as pq | |
import re | |
import sys | |
base_url = 'http://togetter.com/li/212550' | |
more_url = 'http://togetter.com/api/moreTweets/212550?page=' | |
def get_content(url): |
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
SELECT prime_factorization(600851475143); | |
-- prime_factorization | |
--------------------- | |
{71,839,1471,6857} | |
(1 row) |
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
function tweetvim#timeline..tweetvim#request..<SNR>163_twibill..tweetvim#twibill#new の処理中にエラーが検出されました: | |
行 1: | |
E117: 未知の関数です: twibill#new | |
E15: 無効な式です: twibill#new(a:config) | |
行 5: | |
E121: 未定義の変数です: twibill | |
行 7: | |
E121: 未定義の変数です: a:param | |
E15: 無効な式です: a:param | |
行 9: |
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
module Main where | |
data FizzBuzz = Fizz | Buzz | FizzBuzz deriving (Eq, Show) | |
type Pattern = (Int,[FizzBuzz]) | |
patterns :: [Pattern] | |
patterns = [ | |
(6,[Fizz,Fizz]) | |
,(3,[Fizz,Buzz,Fizz,Fizz]) | |
,(9,[Fizz,Buzz,Fizz,FizzBuzz]) |
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
CREATE OR REPLACE FUNCTION json_access(obj json, path text) RETURNS json AS $$ | |
var obj = JSON.parse(obj); | |
var paths = path.split("."); | |
var p; | |
var ret; | |
while (p = paths.shift()) { | |
if (typeof obj[p] == 'undefined'){ | |
obj = null; | |
break | |
} |
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
# Title: Include Image Tag for Jekyll | |
# Authors: choplin | |
# Description: Include <img> tag with src from a specified directory | |
# Configuration: as below in your _config.yml (images/blog as default) | |
# | |
# image_dir: images/blog | |
# | |
# Syntax {% include_img [class name(s)] image_file.(jpg|jpeg|png|gif) [width [height]] [title text | "title text" ["alt text"]] %} | |
# | |
# Examples: |
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
require 'formula' | |
class Neko < Formula | |
url 'http://nekovm.org/_media/neko-1.8.2-osx.tar.gz' | |
homepage 'http://nekovm.org/' | |
md5 'd801e1e4bedd5c18fef2617ff5076253' | |
def install | |
prefix.install %w{include} | |
bin.install %w{neko nekoml nekotools nekoc} |
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/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use feature ':5.10'; | |
use Encode; | |
use Mojolicious::Lite; | |
use XML::Simple; | |
use JSON::Any; |
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
module Fluent | |
class MessagePackRPCOutput < Fluent::BufferedOutput | |
Fluent::Plugin.register_output('msgpack_rpc', self) | |
config_param :host , :string , :default => 'localhost' | |
config_param :port , :integer | |
config_param :method , :string | |
config_param :unit , :string , :default => 'chunk' | |
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 msgpack | |
b = msgpack.packb([1,2,3]) | |
print msgpack.unpackb(b) # => (1, 2, 3) |