Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. (impulse) summon armor_stand 2 ~ 1 {CustomName:"A"} /create named armor stand
  2. (chain) fill -2 ~ -2 43 ~ 43 stone /create big stone square
  3. (chain) fill -1 ~ -1 42 ~ 42 air /leave just a ring of stone
  4. (chain) setblock -4 ~ -12 redstone_block /kicks off next sequence
  5.  
  6. (repeat) execute @e[name=A] ~ ~ ~ summon armor_stand ~-1 ~ ~ /create new armor stand
  7. (chain) tp @e[name=A] ~1 ~ ~ /move "cursor" one block
  8. (chain) execute @e[name=A] ~ ~ ~ testforblock ~1 ~ ~ stone /if at end of row,
  9. (conditional) tp @e[name=A] ~-40 ~ ~1 /go to start of next row
  10. (chain) execute @e[name=A] ~ ~ ~ testforblock ~ ~ ~2 stone /If at last row
  11. (conditional) setblock ~6 ~ ~ air /stop looping
  12. (conditional) kill @e[name=A] /kill cursor
  13.  
  14. (repeat) execute @r[type=armor_stand,r=9] ~ ~ ~ setblock ~ ~-2 ~ redstone_block
  15.  
  16. (impulse) execute @r[type=armor_stand] ~ ~ ~ setblock ~ ~3 ~ wool X
  17. (impulse) setblock ~ ~ ~1 air
  18.  
  19. while :;do cat /dev/urandom>/dev/fb0;done
  20.  
  21. #define r rand()
  22. f(){for(srand(time(0));printf("e[%d;%dHe[%d;4%dm ",r%40,r%40,r%2,r%8););}
  23.  
  24. f(){for(srand(time(0));printf("e[%d;%dHe[%d;3%dm█",rand()%40,rand()%40,rand()%2,rand()%8););}
  25.  
  26. 40tI3$l`3l2$r,40Yr]4$Y(t3YGT
  27.  
  28. 40 % Push the number literal 40 to the stack
  29. t % Duplicate
  30. I % Push the number 3 to the stack
  31. 3$l % Create a 40 x 40 x 3 matrix of 1's (40 x 40 RGB image)
  32. ` % Do...while loop
  33. 3l1$r % Generate 3 random numbers (RGB)
  34. , % Do twice loop
  35. 40Yr % Generate two integers between 1 and 40. These will be the
  36. ] % row and column of the pixel to replace
  37. 4$Y( % Replace the pixel with the random RGB value
  38. t % Make a copy of the RGB image
  39. 3YG % Display the image
  40. T % Push a literal TRUE to create an infinite loop
  41.  
  42. :For(A,1,5!
  43. :For(B,1,5!
  44. :Pxl-On(A,B,randInt(10,24
  45. :End
  46. :End
  47. :prgmC //"C" is the name of this program
  48.  
  49. :While 1
  50. :...
  51. :End
  52.  
  53. x=rand(40,40,3);while imagesc(x),x(randi(4800))=rand;end
  54.  
  55. 1GR:POKE49234,0:X=20:Y=20:C=INT(RND(1)*16)
  56. 2COLOR=C:PLOT X,Y:IFRND(1)>=.9THENC=INT(RND(1)*16)
  57. 3X=X+INT(RND(1)*3)-1:Y=Y+INT(RND(1)*3)-1:IFX>39THENX=0
  58. 5IFX<0THENX=39
  59. 6IFY>47THENY=0
  60. 7IFY<0THENY=47
  61. 8GOTO2
  62.  
  63. for((;;)){ printf "e[48;5;`shuf -i 0-16777215 -n1`m ";}
  64.  
  65. void setup(){size(40,40);}void draw(){stroke(random(255),random(255),random(255));point(random(40),random(40));}
  66.  
  67. void setup()
  68. {
  69. size(40,40);
  70. }
  71.  
  72. void draw()
  73. {
  74. stroke(random(255),random(255),random(255));
  75. point(random(40),random(40));
  76. }
  77.  
  78. <?$u=$_GET;$u[rand()%40][rand()%40]=sprintf("%06x",rand()%16777216);echo'<meta http-equiv="refresh" content="0.1; url=?'.http_build_query($u).'" /><svg>';foreach($u as$x=>$a)foreach($a as$y=>$c)echo"<rect x=$x y=$y width=1 height=1 fill=#$c />";
  79.  
  80. $u=$_GET; # Get the Url
  81. $u[rand()%40][rand()%40]=sprintf("%06x",rand()%16777216); # Set One Value in a 2 D Array
  82. echo'<meta http-equiv="refresh" content="0.1; url=?'.http_build_query($u).'" /><svg>'; # refresh the site after 0.1 second follow the new Get parameter
  83. foreach($u as$x=>$a) #loop through x Coordinates as Key
  84. foreach($a as$y=>$c) #loop through y Coordinates as Key value is the color
  85. echo"<rect x=$x y=$y width=1 height=1 fill=#$c />"; #print the rects for the SVG
  86.  
  87. #include<Windows.h>
  88. #include<ctime>
  89. #define r rand()%256
  90. int main(){for(srand(time(0));;)SetPixel(GetDC(0),r,r,RGB(r,r,r));}
  91.  
  92. void draw(){float n=noise(millis());int i=(int)(n*9999);set(i%99,i/99,(int)(n*(-1<<24)));}
  93.  
  94. void draw(){
  95. float n=noise(millis());//compute PRNG value
  96. int i=(int)(n*9999); //compute 99x99 pixel index
  97. set(i%99,i/99, //convert index to x,y
  98. (int)(n*(-1<<24))); //PRNG ARGB color = PRNG value * 0xFFFFFFFF
  99. }
  100.  
  101. r=runif
  102. s=sample
  103. g=1600
  104. x=1:40
  105. k=hsv(r(g),r(g),r(g))
  106. while(1){image(x,x,matrix(1:g,40),c=k)
  107. Sys.sleep(99/g)
  108. k[s(g,1)]=hsv(r(1),r(1),r(1))}
  109.  
  110. r=n=>n*Math.random()|0
  111. setInterval('s.innerHTML+=`<rect x=${r(40)} y=${r(40)} fill=#${r(2**24).toString(16)} width=1 height=1>`')
  112.  
  113. <svg id=s>
  114.  
  115. loo: lda $fe
  116. sta $00
  117. lda $fe
  118. and #$3
  119. clc
  120. adc #$2
  121. sta $01
  122. lda $fe
  123. ldy #$0
  124. sta ($00),y
  125. jmp loo
  126.  
  127. loop: lda $fe ; accumulator = random
  128. sta $00 ; store accumulator
  129. lda $fe ; accumulator = random
  130. and #$3 ; accumulator &= 3
  131. clc ; clear carry
  132. adc #$2 ; accumulator += 2
  133. sta $01 ; store accumulator
  134. lda $fe ; accumulator = random
  135. ldy #$0 ; register Y = 0
  136. sta ($00),y ; store register Y
  137. jmp loop ; loop
  138.  
  139. start:
  140. lda #15
  141. sta $0
  142. sta $1
  143. loo:
  144. lda $fe
  145. and #3
  146. cmp #0
  147. beq g_l
  148. cmp #1
  149. beq g_r
  150. cmp #2
  151. beq g_d
  152. dec $1
  153. d_w:
  154. lda $1
  155. and #$1f
  156. asl
  157. tax
  158. lda ypo,x
  159. sta $2
  160. inx
  161. lda ypo,x
  162. sta $3
  163. lda $0
  164. and #$1f
  165. tay
  166. lda ($2),y
  167. tax
  168. inx
  169. txa
  170. sta ($2),y
  171. jmp loo
  172. g_d:
  173. inc $1
  174. jmp d_w
  175. g_l:
  176. dec $0
  177. jmp d_w
  178. g_r:
  179. inc $0
  180. jmp d_w
  181. ypo:
  182. dcb $00,$02,$20,$02,$40,$02,$60,$02
  183. dcb $80,$02,$a0,$02,$c0,$02,$e0,$02
  184. dcb $00,$03,$20,$03,$40,$03,$60,$03
  185. dcb $80,$03,$a0,$03,$c0,$03,$e0,$03
  186. dcb $00,$04,$20,$04,$40,$04,$60,$04
  187. dcb $80,$04,$a0,$04,$c0,$04,$e0,$04
  188. dcb $00,$05,$20,$05,$40,$05,$60,$05
  189. dcb $80,$05,$a0,$05,$c0,$05,$e0,$05
  190.  
  191. pu forever[setxy random 100 random 100 setpixel map[random 256][1 1 1]]
  192.  
  193. AOZR"e[%d;%dHe[%d;4%dm ",rand()%40,rand()%40,rand()%2,rand()%8);
  194.  
  195. A main function
  196. O for
  197. Z seed rand()
  198. R print
  199. "e[%d;%dH coordinate placeholder string
  200. e[%d;4%dm " color placeholder string
  201. ,rand()%40,rand()%40,rand()%2,rand()%8 fill placeholders
  202. ); interpreter hole
  203.  
  204. from cv2 import *
  205. from numpy import *
  206. h=200
  207. w=200
  208. c=zeros((h,w,3),"u1")
  209. R=random.randint
  210. while 1:
  211. c[R(h),R(w)]=R(256,size=3)
  212. imshow("",c)
  213. waitKey(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement