Boushitsu Advent Calendar 2日目(12/2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Based on https://github.com/noriokun4649/SensitiveImageLover/blob/8173587fae62ecf57d5ca8304dcc6e768d94c9e2/override.css */ | |
/* Remove blur, but make darker to distinguish */ | |
div .r-yfv4eo { | |
filter: brightness(70%); | |
} | |
/* Remove background color for the warning in tweet */ | |
/* as the shadow is already applied in the filter above */ | |
div .r-drfeu3 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
# read all from stdin | |
data = sys.stdin.buffer.read() | |
# check header | |
png_header = b"\x89PNG\x0D\x0A\x1A\x0A" | |
header_len = len(png_header) | |
if data[0:header_len] != png_header: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct MoneySim | |
balance::Array{Int64} | |
members::Int64 | |
end | |
function init(;members::Int64=1000, initial_balance::Int64=100)::MoneySim | |
return MoneySim(fill(initial_balance, members), members) | |
end | |
function step!(self::MoneySim) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
room_temp = 20 | |
hot_temp = 100 | |
def cool(x, time): | |
assert time >= 0 | |
assert x >= room_temp | |
# assuming boiling water requires an hour to reach around 40℃ | |
cooling_fact = 4e-4 |
Boushitsu Advent Calendar 2020 三日目
人生初のポエム記事がこんなんでいいのか。
なんの目的もなく名古屋にお出かけしたときのことを、脳内からダンプして書き出しただけのものです。
読みやすさは一切考慮されていないので注意されたし。
文章のテンションがおかしいのは当時のテンションを思い出してそのまま反映したためです。
GeoTagの構造体を頑張って小さくしてメモリに載せて、actix-webでゴリ押ししたら早くなった
- https://github.com/equal-l2/tag-pp : CSV前処理(元データの性質とかも書いてある)
- https://github.com/equal-l2/tag-geotag : Tag、GeoTagの構造体の具体的な定義(Rustだと構造体のメンバを勝手に並び替えてパディングを小さくしてくれるけど、他言語ではそうでもないこともあるので注意)
- https://github.com/equal-l2/tag-search : 検索システム(あんまり面白いことしてない)
- PHP遅いん……
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file /private/tmp/wesnoth-20181020-92073-1ysuepp/wesnoth-1.14.5/SConstruct,line 331: | |
Configure(confdir = build/sconf_temp) | |
scons: Configure: Checking for C library m... | |
build/sconf_temp/conftest_0.c <- | |
| | |
| | |
| | |
|int | |
|main() { | |
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/ricty_generator-4.1.0.sh | |
+++ b/ricty_generator-4.1.0.sh | |
@@ -314,6 +314,10 @@ while (i < SizeOf(input_list)) | |
Print("Open " + input_list[i] + ".") | |
Open(input_list[i]) | |
+ SelectAll() | |
+ ClearInstrs() | |
+ UnlinkReference() | |
+ |