Skip to content

Instantly share code, notes, and snippets.

Ken Takagiwa giwa

Block or report user

Report or block giwa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View file0.txt
$ brew update
$ brew install hive
giwa / file0.txt
Last active Nov 23, 2019
Install g++/gcc 4.8.2 in CentOS 6.6 ref:
View file0.txt
$ wget -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils
$ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran
giwa / file0.txt
Last active Jul 25, 2018
トラフィックモニタリング with Kibana, ElasticSearch and Python ref:
View file0.txt
$ brew install elasticsearch
$ elasticsearch -v
Version: 1.4.4, Build: c88f77f/2015-02-19T13:05:36Z, JVM: 1.7.0_72
import json
import time
from itertools import islice
import requests
door_endpoint = 'http://localhost/api/v1/word_rank'
lcd_endpoint = ''
View file0.txt
import falcon
class CORSMiddleware:
def process_request(self, req, resp):
resp.set_header('Access-Control-Allow-Origin', '*')
class Todo:
def on_get(self, req, resp):
resp.status = falcon.HTTP_200
giwa / client.c
Last active May 21, 2016
simple unix domain socket
View client.c
#include <stdio.h>
#include <sys/socket.h>
#include <sys/un.h>
int main() {
int fd;
struct sockaddr_un addr;
int ret;
char buff[8192];
struct sockaddr_un from;
View file0.txt
Which means if x = 10101001010100
First set bit from the end
View file0.txt
>>> def compare(a, b):
... """Comparison that ignores the first letter"""
... return cmp(a[1:], b[1:])
>>> names = ['Adam', 'Donald', 'John']
>>> names.sort(cmp=compare)
>>> names
['Adam', 'John', 'Donald']
View file0.txt
giwa / file0.txt
Last active Apr 26, 2016
Fetch PR from Github filtered by labels using PyGithub ref:
View file0.txt
from github import Github
token = 'YOUR_TOKEN'
g = Github(token)
repos = ['YOUR_REPO', 'YOUR_REPO']
# You can change get_organization to get_user()
org = g.get_organization('YOUR_ORG')
You can’t perform that action at this time.