Skip to content

Instantly share code, notes, and snippets.

View yuokada's full-sized avatar

Yukihiro Okada (Yuki) yuokada

  • Tokyo, Japan
  • 03:01 (UTC +09:00)
View GitHub Profile
{
"data": [
{
"country_code": "AF",
"country_name": "Afghanistan",
"dialling_code": "+93"
},
{
"country_code": "AL",
"country_name": "Albania",
@yuokada
yuokada / Overview.txt
Last active August 12, 2022 09:31
Difference between presto-benchmark-driver-0.275 and presto-benchmark-driver-350
~/I/t/presto-benchmark-driver ❯❯❯ ls -1 presto-0.275/presto-benchmark-driver/src/main/java/com/facebook/presto/benchmark/driver/ trino-350/presto-benchmark-driver/src/main/java/io/prestosql/benchmark/driver/
presto-0.275/presto-benchmark-driver/src/main/java/com/facebook/presto/benchmark/driver/:
BenchmarkDriver.java
BenchmarkDriverExecutionException.java
BenchmarkDriverOptions.java
BenchmarkQuery.java
BenchmarkQueryResult.java
BenchmarkQueryRunner.java
BenchmarkResultsPrinter.java
BenchmarkResultsStore.java
@yuokada
yuokada / MiniParser.scala
Created September 7, 2021 07:58 — forked from kishida/MiniParser.scala
Mini parser with parser combinators of scala.
package miniparser
import scala.util.parsing.combinator.RegexParsers
import scala.collection.mutable.Map
object Main {
def main(args: Array[String]): Unit = {
val expr = """
def mod(x, y) ={
@yuokada
yuokada / bash_strict_mode.md
Created May 26, 2021 08:03 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
package io.prestosql.operator.scalar;
import io.airlift.slice.Slice;
import io.airlift.slice.Slices;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
@yuokada
yuokada / file0.txt
Last active April 4, 2020 05:36
SQLAlchemyでINNER JOINする方法 ref: https://qiita.com/uokada/items/d81fd930402e3be4aa62
mysql> show tables;
+---------------------+
| Tables_in_menagerie |
+---------------------+
| event |
| pet |
+---------------------+
2 rows in set (0.01 sec)
mysql> select * FROM event;
@yuokada
yuokada / Makefile
Created December 4, 2011 16:49
python-Hello.c
.PHONY all:
gcc -m64 -fPIC -Wall -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c hello.c
gcc -m64 -shared -o hello.so -lpython hello.o
@yuokada
yuokada / Hoge.py
Last active February 8, 2020 18:21
script collections for python and perl
#!/usr/bin/env python2.7
import multiprocessing
import os.path
import gzip
import re
ABYSS_DELIMITOR =""
class Hoge(object):
FROM openresty/openresty:1.15.8.2-alpine-fat AS builder
# Our NCHAN version
ENV NGINX_VERSION 1.15.8
ENV NJS_VERSION 0.3.7
# For latest build deps, see https://github.com/nginxinc/docker-nginx/blob/master/mainline/alpine/Dockerfile
RUN apk add --no-cache --virtual .build-deps \
gcc \
libc-dev \