Skip to content

Instantly share code, notes, and snippets.

@nomissbowling
nomissbowling / _test_multiprocessing_.py
Last active May 11, 2025 04:05
_test_multiprocessing_.py
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
'''_test_multiprocessing_
test with APScheduler https://www.youtube.com/watch?v=NffYUw4M2ls
logging with multiprocessing
(not use FileHandler) should use SocketHandler or QueueHandler
https://docs.python.org/ja/3/library/logging.handlers.html
QueueListener and QueueHandler
https://ikatakos.com/pot/programming/python/packages/multiprocessing/queuehandler
https://docs.python.org/ja/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes
@nomissbowling
nomissbowling / AC_2017-12-08.md
Created June 16, 2024 07:15 — forked from tenpoku1000/AC_2017-12-08.md
UTF-32 でも固定長で処理出来るわけではない

UTF-32 でも固定長で処理出来るわけではない

2024/04/17 更新

この記事は、自作OS Advent Calendar 2017の 12/8 の記事として書かれました。

もう、日本語の漢字や仮名を 2 バイト文字と呼ぶのは、やめよう

IT 系のニュースサイトでも、未だに日本語の漢字や仮名のことを 2 バイト文字と呼んでいる記事が散見されます。

@nomissbowling
nomissbowling / pythonmemcache.py
Created June 13, 2024 00:58 — forked from kumagi/pythonmemcache.py
pythonから使えるmemcachedクライアントの比較(シングルスレッド)
import time
def bench(fn):
begin = time.time()
fn()
return time.time() - begin
n = 100000
def setwork(cl):
for i in range(0, n):
@nomissbowling
nomissbowling / memcached_service.py
Created June 12, 2024 07:21 — forked from mikofski/memcached_service.py
memcached service for windows
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Attribution: Hijacked from tracservice.py by Florent Xicluna <[email protected]>
# http://trac-hacks.org/wiki/WindowsServiceScript
#
# To use this class, users must do the following:
# 1. Download and install the PyWin32all package
# (http://starship.python.net/crew/mhammond/win32/)
# 2. Edit the constants section with the proper information.
@nomissbowling
nomissbowling / rustmemo.md
Created June 4, 2024 06:36 — forked from meganehouser/rustmemo.md
Rustの個人的なメモ

Rustメモ

リテラル

  • 数字
let n1: f32 = 1.0f32;
let n2: isize = 0xF1A; // 16進数
let n3: isize = 0b11001; // 2進数
@nomissbowling
nomissbowling / display_vec.rs
Created March 1, 2024 05:49 — forked from whatalnk/display_vec.rs
Display Numeric Vector [Rust]
use std::fmt;
struct Array(Vec<i64>);
impl fmt::Display for Array {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let Array(ref vec) = *self;
for (count, v) in vec.iter().enumerate() {
if count != 0 { try!(write!(f, " ")); }
try!(write!(f, "{}", v));
using System;
using System.Collections.Generic;
using UnityEngine;
public class Sokoban : MonoBehaviour
{
// タイルの種類
private enum TileType
{
NONE, // 何も無い
@nomissbowling
nomissbowling / gist:c75f7d3cd585ede0bf6cf59ec7d3be12
Created July 16, 2023 08:26 — forked from omasanori/gist:7959952
msgpack-rustをrustpkg化してTravis CIで継続的インテグレーションする話

msgpack-rustをrustpkg化してTravis CIで継続的インテグレーションする話

表題の通りです。

msgpack-rustとは

msgpack-rust_MessagePack_のRustによる実装の一つで、私が書いたものです。まだ実装していない機能が多いです。はい、がんばります。

@nomissbowling
nomissbowling / Cargo.toml
Created June 30, 2023 01:00 — forked from kuc-arc-f/Cargo.toml
Rust, rusqlite で、sqlite3を操作する例
[dependencies]
rusqlite = "0.24.0"
@nomissbowling
nomissbowling / rustberry.md
Created April 24, 2023 07:24 — forked from takubokudori/rustberry.md
WSL上のRustでラズパイ用バイナリをビルドする方法