Skip to content

Instantly share code, notes, and snippets.

Hajime Nakagami nakagami

Block or report user

Report or block nakagami

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
nakagami / darts_sample.cpp
Last active Oct 11, 2019
Darts (Double-ARray Trie System) sample code.
View darts_sample.cpp
#include <iostream>
#include <darts.h>
// Darts sample code
int main (int argc, char **argv)
using namespace std;
const Darts::DoubleArray::key_type *str[] = { "ALGOL", "ANSI", "ARCO", "ARPA", "ARPANET", "ASCII" }; // same as char*
View swine_fever.rst


2019-09-10 BPLL #37

最近、「豚コレラ」という言葉を時々ニュースで聞くが、それが農家や農政に重大な危機であることがあまり知られてないのではないかと思う。 この危機を知ってもらいたい。


nakagami /
Last active Sep 2, 2019
QR コードを png 画像として返す Django の view関数のコードスニペット
def qrsample(request):
import qrcode # pip install qrcode, pillow
from django.shortcuts import redirect
from django.http.response import HttpResponse
if request.method == "GET":
qr = qrcode.QRCode(
nakagami /
Created Jul 2, 2019
mp4 to animation gif converter
#!/usr/bin/env python3
import sys
import imageio
Convert mp4 to (animation) gif.
pip install imageio, imageio-ffmpeg
View db2_on_cloud.rst
nakagami / python_and_db2.rst
Last active May 11, 2019
Python database driver and Db2
View python_and_db2.rst
nakagami / quickstartdjango.rst
Last active Apr 7, 2019
Quickstart with Django and pure python database drivers (2019-04-06)
View quickstartdjango.rst
View firebirdsql_sqlx_example.go
package main
import (
_ ""
View tokyoex9.rst
Elixir のプロジェクトに Pull Request を送った
tokyo.ex #9
nakagami /
Created Sep 24, 2018
PostgreSQL SCRAM-SHA-256 authentication
import hashlib
import hmac
import base64
import binascii
password = 'foobar'
client_nonce = '9IZ2O01zb9IgiIZ1WJ/zgpJB'
server = {
'r': '9IZ2O01zb9IgiIZ1WJ/zgpJBjx/oIRLs02gGSHcw1KEty3eY',
's': 'fs3IXBy7U7+IvVjZ',
You can’t perform that action at this time.