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
| # -*- coding: utf-8 -*- | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import Select | |
| from selenium.webdriver.common.alert import Alert | |
| import os | |
| import sys | |
| import mechanize | |
| import random | |
| import re | |
| import time |
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
| // -*- coding: utf-8 -*- | |
| /** | |
| * @param {function} f funciton. | |
| * @return {String[]} argument names. | |
| */ | |
| function argNames(f) { | |
| var re = /^[\s\(]*function[^(]*\((.*?)\)/; | |
| var args = f.toString().match(re)[1].split(','); | |
| return args.map(function(e) { |
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
| def load_module(m): | |
| import imp | |
| try: | |
| f, p,d = imp.find_module(m) | |
| return imp.load_module(m, f, p, d) | |
| except: | |
| return None | |
| random = load_module("random") | |
| hoge = load_module("hoge") |
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 <Cocoa/Cocoa.h> | |
| @class Hoge; | |
| typedef Hoge *(^setter)(int); | |
| @interface Hoge : NSObject | |
| @property int a,b; | |
| @property (nonatomic, readonly, copy) setter setA; | |
| @property (nonatomic, readonly, copy) setter setB; |
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 Control.Monad | |
| import Control.Applicative | |
| import Control.Monad.State | |
| import Control.Monad.Writer | |
| newtype A = A [B] deriving(Show) | |
| newtype B = B Int deriving(Show) | |
| type Checker a = StateT Int (WriterT [String] Maybe) a |
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
| /* | |
| * scwrap 環境変数にシステム設定を入れてくれるいい感じのアレ | |
| * | |
| * 使い方: scwrap cmd [cmdargs..] | |
| * | |
| * 例(希望): sudo scwrap port selfupdate | |
| */ | |
| #include <stdio.h> | |
| #include <unistd.h> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Data.Char | |
| import Data.List | |
| import Data.Function | |
| import Data.Monoid | |
| comp::String->String->Ordering | |
| comp (as@(a:ax)) (bs@(b:bx)) | |
| | isNumber a && isNumber b = | |
| ncomp as bs <> (comp `on` dropWhile isNumber) as bs | |
| | otherwise = compare a b <> comp ax bx |
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
| #lang racket | |
| (require racket/control) | |
| (define (amb args) | |
| (shift k | |
| (for ([v args]) | |
| (k v)))) | |
| (define (perm li) | |
| (if (null? (cdr li)) |