2024/04/17 更新
この記事は、自作OS Advent Calendar 2017の 12/8 の記事として書かれました。
IT 系のニュースサイトでも、未だに日本語の漢字や仮名のことを 2 バイト文字と呼んでいる記事が散見されます。
| #!/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 |
2024/04/17 更新
この記事は、自作OS Advent Calendar 2017の 12/8 の記事として書かれました。
IT 系のニュースサイトでも、未だに日本語の漢字や仮名のことを 2 バイト文字と呼んでいる記事が散見されます。
| import time | |
| def bench(fn): | |
| begin = time.time() | |
| fn() | |
| return time.time() - begin | |
| n = 100000 | |
| def setwork(cl): | |
| for i in range(0, n): |
| #!/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. |
| 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, // 何も無い |
表題の通りです。
msgpack-rust_はMessagePack_のRustによる実装の一つで、私が書いたものです。まだ実装していない機能が多いです。はい、がんばります。
| [dependencies] | |
| rusqlite = "0.24.0" |
大いに参考にさせていただいた記事: ラズパイに向けてRustをクロスコンパイル!
以下はUbuntu 20.04 LTS on WSL2で確認済み
Rustをインストール
arm用のgcc一式を入れる