GeezerVison is showing github.com — GitHub - m3dev/crazy_programming: エムスリー株式会社の社内で作られたQuineやプログラミングクイズの解説をまとめたリポジトリ
Folders and files| Name | Name | Last commit message | Last commit date |
|---|
| | | | | | | | | | | | | | | | |
Repository files navigation
実行するとソースコード自身と同じ文字列が返ってくるコード「Quine」、社内で開発された「プログラミングクイズ」を掲載しています。
社内Slackにおけるプログラミングの雑学を共有するチャンネル #crazy-programming より命名されたリポジトリです。
Quine Table
JavaScript Quiz Table
| title(link) |
code |
| 技育プロジェクト |
[_='GEEK'.small()[2]]+[-~_._|2]; |
| TypeTypeType |
let type = "type";... |
| Colab |
((_,$=[].push(_,_))=>... |
| Colab Encode |
((s,[a,b,c,d,e]=new TextEncoder().encode(s))=>... |
| undefined label |
console.log(eval("{undefined:[1]}['undefined'][0]")) |
| from char code |
String.fromCharCode.toString()[12] + 3 |
| math max |
10000000000+(0[1]+Math.max)[3]+-1+-0-0 |
| hex zero |
0x0_0-0x0_0 |
| regex filter |
(r => ["3M", "M3"].filter(s => r.test(s)))(/[0-9]+/g) |
| parse int tag |
parseInt`256${~-16}`.toString`24` |
| parse int radix |
parseInt("256", ~-16).toString(0+11..toString(16)+11000) |
| octal add |
0011 + 0009 |
| radix literals |
010 + 0b10 + 0o10 + 0x10 |
| dollar tag |
$=()=>$;`${$````}`[4] |
| dollar tag yoshi |
$$$$=()=>$$$$;`$$$${$$$$````}`[`𠮷𠮷`.length] |
| map block |
[1, 2, 3].map(n => {num: n}).join()[1] |
| sparse array key |
x = {[[,,]]:[[,,]]} |
| group by |
Object.entries(Object.groupBy(["Medicine","Media","Metamorphosis"],([m]) => m))[0].map(...) |
Python Quiz Table
| title(link) |
code |
| Is Face Mark? |
(d >_< b) if (c:=('ω')<"hi") else (c^0^c)-~3 |
| While trick |
[1,2,3,4];while _:_,*_=_;_ |
| Slice list |
[x:=1,x:=-~x,-~x][:][::-1][:1] |
| Slice hint |
_:...=[];_[:]:...=f'{f"{[...][::][0]}"::^0}';_ |
| Long addition |
0+~-~-~-~-~-~-~-~-~-~0 |
| Numpy long addition |
import numpy as np;x = np.arange(3);x-+~--~+-~~++~+-x; |
| Numpy array to array |
import numpy as np;print(np.zeros(((_:=1),_))[[(((~-_,),),)],(...)]) |
| Numpy sum |
import numpy as np;print(sum([sum:=-1],np.sum([sum],sum))) |
| Sum trick |
sum(((1,(2,(3),),(4,)),(5,),),()) |
| Zeros |
000_0&00^00-0x0_0_00^0o0_00-~0^-0b0_0_0 |
| To int |
int("%s_0%%s"%0x0%10) |
| Equals |
f"{'='=}={'='=}" |
| Method chaining |
().__iter__().__class__.__name__[_:=-2]+[].__class__.__name__[_] |
| GeeK split |
"g_e_e_k".split(_:="_",_:=len(_))[_].split(_:="_",_:=len(_))[_].split(_:="_")[len(_)]+"p" |
| X Face |
_C:3J /2=3;-~-( _C-8) *["布団"] |
| All empty |
-~(-~(()==())) |
| String of string |
"%%%s%%%%%%%%%%%%ss"%"d"%1%"%"%()%"2" |
| Zero to one |
~1<<1&-~1 |
| Formula type |
O:1+1=2;O |
| Append magic |
(x:=[[]]*3)[0].append(1);x |
| MMM |
*M,M=[*"123"];"M"+M |
| Tuple merge |
(((0)|1)|2)|3 |
| I am m3 |
'IAMM3'[(x:=-~(1==1))::x] |
| is |
...is...is...is...is...is... |
| dot |
f"{(':')[::]::^5}" |
| map to map |
list(map(list,list(map(map,map(lambda map:list,map:='map'),map)))) |
| Make parentheses |
();((((_,_)))) |
| Percent Equals |
f"{'%s'%'='=}" |
| Walrus Default |
(lambda _=(_:=()):_)(_:=()) |
| Walrus Keyword |
((lambda _=(_:=()):_)(_=(_:=()))) |
| 技術書典 |
f"{chr(len(dir(dir:='技術書典'))-len(dir))}{~(-len(dir))}" |
| Pandas Loc |
import pandas as pd;pd.DataFrame({(_:=f"{':'::^3}"):[(':')[::]]}).loc[::,':':_] |
| Dict Minus Zero |
{-.0_0:00_0,00:.0,.0:-0} |
| Reduce 5000 |
from functools import reduce;from unicodedata import numeric;reduce(lambda map,numeric:numeric*map,map(numeric,'5000兆')) |
| Empty Dict Key |
[{(()):([])}[()]] |
| Year Slice |
"2025"[2:5]*2 |
| Reduce 5000 Lambda |
from functools import reduce;from unicodedata import numeric;reduce(lambda numeric=(reduce:=map), map=(reduce:=numeric):numeric*map, map(numeric,'5000兆')) |
| Triple Quote |
"""'"\/\'''"'""" |
| Nested F-string |
f"""{f"{'a'+'b'=}"+f"{'c'+'d'=}"=}""" |
| Empty Tuple Key |
{():()}[()] |
| None Equals |
f"{None=}={None=}" |
| Len Ellipsis |
f"{len(f'{...=}')=}" |
| Dict Key Type Collision |
{'1':'str', True:'bool', 1:'int', 1.0:'float'} |
| Nested Tuple Key |
{((())):(())}[(((())))] |
| Enum Hash Collision |
from enum import Enum;class Ex(Enum):int_num=1;bool_num=True;float_num=1.0 ... |
| Numpy Ones Scalar |
import numpy as np;np.ones(()) |
| Numpy PyCon |
import numpy as np;np.__name__[-2:]+np.conj.__name__[:3] |
| Numpy Newaxis |
import numpy as np;x=np.ones((2,2));x[(None,...,None)] |
Ruby Quiz Table
Kotlin Quiz Table
| title(link) |
code |
| data object |
data object `・^・`;{`・^・`:`・^・`->(`・^・`)}(`・^・`) |
OCaml Quiz Table
| title(link) |
code |
| Matsuri |
"Matsuri"|>fun s->Printf.sprintf"%c%d"s.[0]((String.fold_left(fun n _->n+1)0 s)/2);; |
ギークな学びが大好きな皆さん、エムスリーで一緒に働いてみませんか?
私達のミッションは、インターネットを活用し、健康で楽しく長生きする人を1人でも増やし、不必要な医療コストを1円でも減らすこと。
エンジニアリングの力を活かし、共に医療の課題解決に向かう仲間を募集しています。
https://jobs.m3.com/engineer/
https://fresh.m3recruit.com/engineer
Aboutエムスリー株式会社の社内で作られたQuineやプログラミングクイズの解説をまとめたリポジトリ ResourcesStars10 stars Watchers0 watching Forks
|