Hajime Nakagami <nakagami@gmail.com> 2020-10-10 最終更新
awabi は、 MeCab の辞書データを使い形態素解析をする形態素解析器です。
import hashlib | |
import binascii | |
def hmac_sha256_digest(key, msg): | |
pad_key = key + b'\x00' * (64 - (len(key) % 64)) | |
ik = bytes([0x36 ^ b for b in pad_key]) | |
ok = bytes([0x5c ^ b for b in pad_key]) | |
return hashlib.sha256(ok + hashlib.sha256(ik+msg).digest()).digest() |
// dynamic return type in Rust | |
#[derive(Clone)] | |
struct V { | |
i:i32, | |
s:String, | |
} | |
trait ToVal<T> { | |
fn to_val(self) -> T; |
Hajime Nakagami <nakagami@gmail.com> 2020-10-10 最終更新
awabi は、 MeCab の辞書データを使い形態素解析をする形態素解析器です。
#include <iostream> | |
#include <darts.h> | |
// Darts http://chasen.org/~taku/software/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* |
2019-09-10 BPLL #37 https://bpstudy.connpass.com/event/143999/
最近、「豚コレラ」という言葉を時々ニュースで聞くが、それが農家や農政に重大な危機であることがあまり知られてないのではないかと思う。 この危機を知ってもらいたい。
お前誰よ
def qrsample(request): | |
import qrcode # pip install qrcode, pillow | |
from django.shortcuts import redirect | |
from django.http.response import HttpResponse | |
if request.method == "GET": | |
redirect('/') | |
qr = qrcode.QRCode( | |
error_correction=qrcode.constants.ERROR_CORRECT_H, |
#!/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 | |
""" | |
2019-06-05 bmxug.tokyo #10 LT https://bmxug.connpass.com/event/131569/
2019-06-11 Shinjuku Mokumoku Programming #47 https://shinjuku-moku.connpass.com/event/129675/
今日書いていたのは Db2 のデーターベースドライバー
Pure python なデーターベースドライバーを Django 2.2 LTS で使う
(参考)データーベースバックエンドを読む、そして書く https://gist.github.com/nakagami/098db7387d78ab9c6aa85d77a0eeecf5