Skip to content

Instantly share code, notes, and snippets.

View cocoatomo's full-sized avatar
🐧
Translating

cocoatomo cocoatomo

🐧
Translating
View GitHub Profile
@cocoatomo
cocoatomo / Hoge.java
Last active December 10, 2015 04:28 — forked from irof/Hoge.java
using Guava
package net.elliptium;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
$ pwd
/tmp/module
$ tree
.
├── __init__.py
├── fluent
│   ├── __init__.py
│   └── sender.py
└── fluent.py
class Hoge():
def __init__(self):
def disabled_init(self):
raise NotImplementedError('__init__ disabled')
Hoge.__init__ = disabled_init
if __name__ == '__main__':
print 'h = Hoge()'
h = Hoge()
print 'h2 = Hoge()'
package co.coatomo.math.categorical.typeclass.functor;
import java.util.function.Function;
interface FailedFunctor<A> {
<F extends FailedFunctor, B> F<B> map(Function<A, B> morphism);
}
[cloudera-cdh3u0]
name=Cloudera's Distribution for Hadoop, Version 3 update 0
mirrorlist=http://archive.cloudera.com/redhat/cdh/3u0/mirrors
gpgkey = http://archive.cloudera.com/redhat/cdh/RPM-GPG-KEY-cloudera
gpgcheck = 0
[cloudera-cdh3u1]
name=Cloudera's Distribution for Hadoop, Version 3 update 1
mirrorlist=http://archive.cloudera.com/redhat/cdh/3u1/mirrors
gpgkey = http://archive.cloudera.com/redhat/cdh/RPM-GPG-KEY-cloudera
@cocoatomo
cocoatomo / gist:2396838
Created April 16, 2012 07:05
改行制御のテスト

test

aaa
改行
されない!?
こっちはどうだろ?
改行制御
def _lookup_object(name):
top = _request_ctx_stack.top
if top is None:
raise RuntimeError('working outside of request context')
return getattr(top, name)
127.0.0.1 - - [05/Apr/2012 21:54:14] "GET /download HTTP/1.1" 500 -
Traceback (most recent call last):
File "/Users/kinebuchi/.virtualenvs/worktime/lib/python2.7/site-packages/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/kinebuchi/.virtualenvs/worktime/lib/python2.7/site-packages/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Users/kinebuchi/.virtualenvs/worktime/lib/python2.7/site-packages/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/Users/kinebuchi/.virtualenvs/worktime/lib/python2.7/site-packages/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, render_template, make_response
from model import app, db, WorkTime, Employee, Project
import csv
def create_csv():
@cocoatomo
cocoatomo / gist:2259087
Created March 31, 2012 03:51 — forked from yusuke/gist:2136681
twitter name card
<%@ page language="java" import="twitter4j.*,java.util.List" contentType="text/html; charset=UTF-8" session="false" %>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
<style>
.username {
font-size: 12pt;
}
.description{