# Search Results

Results tagged with Search options user 34543
8 results

This challenge involves creating or parsing pictures using text characters as the paint. Typically this uses only 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963.

Python 2.7.6, 99 bytes def c(t):n=hash(t)%3;return" ___\n/"+" ^."[n]+" "+" ."[n]+"\\\n|"+[" ","^ ^"," . "][n]+"|\n\\___/" This algorithm relies on the fact that hash(cookie)%3 gives 0 when cookie …
answered Aug 4 '15 by Loovjo
Python 2, 199 bytes w,h=input() s=(w+h)*w*h r=[s[:w]]+[[" "for i in[0]*w]for j in[0]*(h-2)]+[s[w+h-2:2*w+h-2][::-1]]*(h>1) for y in range(1,h-1):r[y][w-1],r[y][0]=s[w+y-1],s[w+h+w-2-y] print"\n". …
answered Aug 18 '16 by Loovjo
Vim, 44 42 bytes qqy$P0xjf1"_xP{@qq@q:s/0/ /g^M:s/,/^V^M/g^M{D Saved 2 bytes thanks to @DjMcMoylex! Here, the ^M is a literal newline, and the ^V is CTRL-V Takes the input in this format: PPCG 0 … answered Nov 14 '16 by Loovjo Python 2.7, 308 310 bytes i=raw_input().replace("-","") s,w=sorted(set(i)),len x,m={},0 for c in s: q,v=i,[""]*2 while c in q:a=str(-~q.index(c)+(w(i)-w(q)));v[int(a)>4]+=a;q=q[q.index(c)+1:] … answered Dec 19 '15 by Loovjo Java, 127 void a(){for(int y=0;y<8;System.out.println(y++==9?"":""))for(int c=0,x=1;c<16;System.out.print(y+(x=++c<=8?c:8-c+9)>8?"":x));} answered Jun 23 '15 by Loovjo Python, 221 bytes def P(s,c=""): l=s.split("\n") v=[0,-1] p=[(i,l[i].index(":"))for i in range(len(l))if":"in l[i]][0] while c in"-:|+/\\": p=map(sum,zip(p,v)) c=l[p[0]][p[1]] v=v[::1 … answered Aug 28 '16 by Loovjo Vim, 42 strokes :s/[^A-Z0-9]//g YPVr-i+<DOWN><LEFT>|<ESC><C-V>ky$pYjppVr \$xrv Replace <DOWN> with ↓, <LEFT> with ←, <ESC> with esc and <C-V> with CTRL+V. Here's an animation of this script running …
answered Jul 8 '16 by Loovjo
JavaScript, 220 bytes. q=s=>+s.slice(1,s.length-1);f=s=>s[0]=="s"?("*".repeat(q(s))+"\n").repeat(q(s)):Array.apply(0,Array(-~(q(s)/2))).map((_,n)=>(s[s.length-1]=="-"?~~(q(s)/2)-n:n)).map(n=>(" ".rep …
answered Jan 21 '16 by Loovjo