Inspired by Marcus Kazmierczak's 10 Scala One Liners to Impress Your Friends.
Range[10] * 2
# pip install python-lifelib | |
from math import log2 | |
from lifelib.pythlib.pattern import Pattern | |
import lifelib | |
import sys | |
def get_gen(pat: Pattern, maxexp: int) -> int | None: | |
x = pat |
# Maintainer: Kyle Sferrazza <[email protected]> | |
# Contributor: Maks Verver <[email protected]> | |
# Contributor: p2k <[email protected]> | |
# Contributor: nokangaroo <[email protected]> | |
pkgname=golly | |
pkgver=4.0 | |
pkgrel=1 | |
pkgdesc="A simulator for Conway's Game of Life and other cellular automata" |
#compdef tldr | |
_arguments : \ | |
{-h,--help}'[Print the help message]' \ | |
{-v,--version}'[Show version information]' \ | |
{-l,--list}'[List all commands in the cache]' \ | |
{-f,--render}'[Render a specific markdown file]:file:_files' \ | |
{-o,--os}'[Override the operating system]:type:(linux osx sunos windows other)' \ | |
{-u,--update}'[Update the local cache]' \ | |
{-c,--clear-cache}'[Clear the local cache]' \ |
#!/usr/bin/env python | |
from z3 import * | |
import sys | |
class LifeSearch: | |
nbhd = {(i, j): 1 if i == j == 0 else 2 | |
for i in range(-1,2) | |
for j in range(-1,2)} |
# Rime custom dictionary | |
# encoding: utf-8 | |
# | |
# Rime 克苏鲁神话词库 | |
# 手动整理,欢迎补充 | |
# | |
# 参考资料: | |
# * Frend《邪神与那些创造邪神的人》 | |
# https://www.zhihu.com/people/frend-10/posts | |
# * 艾守义《克苏鲁神话:萌萌哒古神在哪里》 |
SearchStillLife[w_, h_] := | |
Block[{r = RandomInteger[1, {w, h}]}, | |
ArrayPlot[ | |
Echo[Mod[r + ArrayReshape[Boole@#, {w, h}], 2], "RLE: ", | |
"x = " <> #2 <> ", y = " <> #1 <> ", rule = B3/S23\n" & @@ | |
ToString /@ Dimensions@# <> | |
StringRiffle[ | |
StringCases[ | |
StringReplace[ | |
StringReplace[ |
#!/usr/bin/env wolframscript | |
(*_*) | |
(*命令行参数有两个以上时,前两个分别为用户名和密码*) | |
(*命令行参数只有一个时,退出登录*) | |
(*没有命令行参数,显示登录状态*) |
#!/usr/bin/env wolframscript | |
appURL = " https://github.com/AlephAlpha/WebComics"; | |
weiboAPI = "https://api.weibo.com/2/statuses/share.json"; | |
(* 请设成脚本所在的目录 *) | |
(* 目录名有中文时必须先转 UTF8 *) | |
SetDirectory[ | |
FromCharacterCode[ | |
ToCharacterCode@"/home/alephalpha/文档/马甲与小号/WebComics/", "UTF8"]]; |
# Rime schema | |
# vim: set sw=2 sts=2 et: | |
# encoding: utf-8 | |
schema: | |
schema_id: jcuken | |
name: ЙЦУКЕН | |
version: "1.0" | |
author: | |
- AlephAlpha <[email protected]> |
Inspired by Marcus Kazmierczak's 10 Scala One Liners to Impress Your Friends.
Range[10] * 2