Inspired by Marcus Kazmierczak's 10 Scala One Liners to Impress Your Friends.
Range[10] * 2
+++++ | |
++++-+><++++-+++<>-+><<>-++++><<>++-+++++ | |
++++++-++-+++++<>+++++++++-++<>+++++++++->< +++ | |
+++++><><+++-+-+<><>++++-+++- ++.>+<<> <+-<<<<<+- | |
+><<<>> <>>>>+-> <>-+>>>+-+ | |
++><+++ ++>-+>> >>>[>++ +>-+-<>++- | |
<+-><++- ++<-]<< ><<<>+- <<<+++-><+- | |
++++++++ ><++++++ ++++++-+++<>- ++<>++-+-+-+ <>-+++ | |
+><+++++++-++->>>>>><<>>[>+>++><---<+->< +-+-<-><]+-<+-<<<><<<><++<>><+++++<<<<><-+-+-+ | |
<<<<<+++->>>>>>>>>+++><+++++<>+-+++>>>> >>[>+>+---+<>-++<<-]><<<<<<<++++-<-+>++++++ |
ToExpression[ | |
"input=StringToStream[\"" <> ##2 <> | |
"\"];Clear[memory];memory[_]=pointer=0;" <> | |
StringReplace[#, | |
{">" -> "pointer++;", | |
"<" -> "pointer--;", | |
"+" -> "memory[pointer]++;", | |
"-" -> "memory[pointer]--;", | |
"." -> "BinaryWrite[OutputStream[\"stdout\",1],memory[pointer]];", | |
"," -> "memory[pointer]=BinaryRead[input];", |
# Rime schema | |
# vim: set sw=2 sts=2 et: | |
# encoding: utf-8 | |
schema: | |
schema_id: palladius | |
name: "西里尔拼音" | |
version: "0.0" | |
author: | |
- AlephAlpha <alephalpha911@gmail.com> |
MazeGraphics[m_, n_] := | |
Block[{$RecursionLimit = Infinity, | |
unvisited = Tuples[Range /@ {m, n}], maze}, | |
maze = Graphics[{Line[{{#, # - {0, 1}}, {#, # - {1, 0}}}] & /@ | |
unvisited, | |
Line[{{0, n}, {0, 0}, {m, 0}}]}]; {unvisited = | |
DeleteCases[unvisited, #]; | |
Do[If[MemberQ[unvisited, neighbor], | |
maze = DeleteCases[ | |
maze, {#, |
# Rime schema | |
# vim: set sw=2 sts=2 et: | |
# encoding: utf-8 | |
schema: | |
schema_id: jcuken | |
name: ЙЦУКЕН | |
version: "1.0" | |
author: | |
- AlephAlpha <alephalpha911@gmail.com> |
(*_*) | |
挪[左] = # //. {{x___, 1, a_ /; a > 1, y___} :> {x, a, 1, y}, | |
{x___, a_ /; a > 1, a_, y___} :> {x, 2 抓住[a], 1, y}} /. | |
抓住[a_] :> a &; | |
挪[上] = Composition[Transpose, 挪[左], Transpose]; | |
挪[下] = Composition[Reverse, 挪[上], Reverse]; | |
挪[右] = Composition[Transpose, 挪[下], Transpose]; | |
加块瓦 = ReplacePart[#, RandomChoice@Position[#, 1] -> 2] &; |
#!/usr/bin/env wolframscript | |
(*_*) | |
(*命令行参数有两个以上时,前两个分别为用户名和密码*) | |
(*命令行参数只有一个时,退出登录*) | |
(*没有命令行参数,显示登录状态*) |
Inspired by Marcus Kazmierczak's 10 Scala One Liners to Impress Your Friends.
Range[10] * 2
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 | |
appURL = " https://github.com/AlephAlpha/WebComics"; | |
weiboAPI = "https://api.weibo.com/2/statuses/share.json"; | |
(* 请设成脚本所在的目录 *) | |
(* 目录名有中文时必须先转 UTF8 *) | |
SetDirectory[ | |
FromCharacterCode[ | |
ToCharacterCode@"/home/alephalpha/文档/马甲与小号/WebComics/", "UTF8"]]; |