Skip to content

Instantly share code, notes, and snippets.

View MizukiSonoko's full-sized avatar
🍶
sake

MIZUKI Sonoko MizukiSonoko

🍶
sake
View GitHub Profile
@MizukiSonoko
MizukiSonoko / Dockerfile
Created July 27, 2015 16:59
適当なREST API in Docker
FROM ubuntu
MAINTAINER mizuki <mizuki.sonoko@gmail.com>
RUN apt-get update
RUN apt-get install -y build-essential
RUN apt-get install -y python-dev
RUN apt-get install -y python3-pip
RUN pip3 install PyMySQL3
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
>>> a = [ 1, 2.0, [ 3, 4 + 5]]
Time: 1332[ms]
Statement:
VariableDecl:
Name:a
List:
List:
ListVariableDecl:
ListVariableDecl:
ListVariableDecl:
DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss ZZZ").parseDateTime(s)
String s = "2011-11-29 10:40:24 Etc/GMT";
// split the input in a date and a timezone part
int lastSpaceIndex = s.lastIndexOf(' ');
String dateString = s.substring(0, lastSpaceIndex);
String timeZoneString = s.substring(lastSpaceIndex + 1);
// convert the timezone to an actual TimeZone object
@MizukiSonoko
MizukiSonoko / lambda.js
Last active November 13, 2015 16:02
[Lambda's code] REST API using DynamoDB.
var AWS = require('aws-sdk');
var dynamo = new AWS.DynamoDB({region: 'ap-northeast-1'});
exports.handler = function(event, context) {
var id = event.id || "EXCEPT_VALUE";
delete event.id;
var params = {
TableName: 'Test',
@MizukiSonoko
MizukiSonoko / ゴミ
Last active December 9, 2015 15:00
生成すくりぷと
import re
coreTime = "~~:~~ 〜 ~~:~~"
breakTime = "~~:~~ 〜 ~~:~~"
def generate(times,month,startDay,endDay,content, file):
print("generating...")
file.write("""
\\documentclass[11pt,a4j]{jarticle}
@MizukiSonoko
MizukiSonoko / SICP_1.md
Last active December 10, 2015 18:12
SICPを読む会(2015/12/10) 1~10

手続きを用いた抽象化の構築

計算プロセス

プロセスプログラムに基づき動き、データを操作する。

Lisp

なぜLispが使われるのか

"受動的な"データと"能動的な"プロセスという伝統的な区別を
曖昧にする能力を使った強力なプログラム設計のテクニックが存在する

#include <string>
#include <iostream>
#include <vector>
#include <dirent.h>
using namespace std;
vector<string> files;
void load(string directory,string filename){
./configure --with-http_ssl_module --with-http_v2_module
make -j 12
sudo make install
function<int(int)> g(function<int(int)> f){
cout << " exec g !\n";
return [f](int x) -> int {
cout<< " exec g return lambda! "<< x << endl;
return f(x + 1);
};
}
void e(function<int(int)> F){
cout<< " exec e !\n";