Skip to content

Instantly share code, notes, and snippets.

@nakagami
nakagami / mp4togif.py
Created Jul 2, 2019
mp4 to animation gif converter
View mp4togif.py
#!/usr/bin/env python3
import sys
import imageio
"""
Convert mp4 to (animation) gif.
Reference: http://imageio.readthedocs.io/en/latest/examples.html#convert-a-movie
pip install imageio, imageio-ffmpeg
"""
View db2_on_cloud.rst
@nakagami
nakagami / python_and_db2.rst
Last active Jul 13, 2020
Python database driver and Db2
View python_and_db2.rst
@nakagami
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 (
"database/sql"
"fmt"
"log"
"github.com/jmoiron/sqlx"
_ "github.com/nakagami/firebirdsql"
)
View tokyoex9.rst
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elixir のプロジェクトに Pull Request を送った
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tokyo.ex #9 https://beam-lang.connpass.com/event/103873/
LT
2018-10-21
=============
自己紹介
@nakagami
nakagami / pg_scram_sha_256.py
Created Sep 24, 2018
PostgreSQL SCRAM-SHA-256 authentication
View pg_scram_sha_256.py
import hashlib
import hmac
import base64
import binascii
password = 'foobar'
client_nonce = '9IZ2O01zb9IgiIZ1WJ/zgpJB'
server = {
'r': '9IZ2O01zb9IgiIZ1WJ/zgpJBjx/oIRLs02gGSHcw1KEty3eY',
's': 'fs3IXBy7U7+IvVjZ',
@nakagami
nakagami / mssql_python.rst
Created Aug 4, 2018
Python and MS SQL Server, MS SQL Server and Python
@nakagami
nakagami / jabstract.py
Last active Apr 4, 2021
Japanese summarization module using LexRank algorithm.
View jabstract.py
#!/usr/bin/env python
# The MIT License (MIT)
# Copyright © 2015 Recruit Technologies Co.,Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@nakagami
nakagami / word2vec_sample.rst
Last active Apr 9, 2018
python + word2vec 最初のサンプルコード
View word2vec_sample.rst

word2vec を使って類似語を探す

白ヤギコーポレーションさんが作成、公開している日本語モデルを使ってみます

http://aial.shiroyagi.co.jp/2017/02/japanese-word2vec-model-builder/

$ curl http://public.shiroyagi.s3.amazonaws.com/latest-ja-word2vec-gensim-model.zip > latest-ja-word2vec-gensim-model.zip