This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DeepCopy and LinearizedDeepCopy which can handle circular references. | |
LinearizedDeepCopy can be jsonified and back yet keep circular references. | |
(For use see comments below the functions) | |
// these dont clone functions or keep class(constructor) info!!! | |
// so its like JSON.parse(JSON.stringify(obj)) but faster(?) and can do circular references. | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
uses following cli tools: | |
slop - let user area select on screen | |
maim - cli screenshot tool , uses slop | |
recordMyDesktop - cli tool to screencap videos | |
zenity - cli tool for dialogs (save as dialog) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<cstdio> | |
#define D fputc(i*8,f) //colors (max = 248=31*8) with 31 iterations | |
main(){ | |
int h=4000,w=4000,a=w*h,i; //resolution | |
FILE*f=fopen("img.ppm","wb"); | |
fprintf(f,"P6\n%d %d\n255\n",w,h); //ppm header: P6 w h colorMax | |
for(;a--;i=31){ //iterations (31) per each pixel (x) | |
for(double t,x=.0,y=.0;x*x+y*y<4.&&i-->1;) //limit (4=2^2) | |
t=x*x-y*y+(a%w-w/2.)*.0006-.5, //x zoom (*.0006) & view (-.5) | |
y=2.*x*y+(a/w-h/2.)*.0006+.0, //y zoom (*.0006) & view (+.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use these commands to render img.ppm: | |
w & h: 4000 4000 | |
2 -.5 0 .3 | |
1 | |
*/ | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<vector> |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benjamin Rennells,/benjamin.rennells,Jessica Hayward,/haywardcal | |
Benjamin Rennells,/benjamin.rennells,James Martin,/profile.php?id=100011349840834 | |
Benjamin Rennells,/benjamin.rennells,Leslie Darnell,/leslie.darnell.9 | |
Benjamin Rennells,/benjamin.rennells,Kathy Frasca,/intergalactickathy.1 | |
Benjamin Rennells,/benjamin.rennells,Sean Brady,/sean.brady.94 | |
Benjamin Rennells,/benjamin.rennells,Kate Mattes,/kate.mattes.3 | |
Benjamin Rennells,/benjamin.rennells,Deborah Cronin,/profile.php?id=100018394773973 | |
Benjamin Rennells,/benjamin.rennells,Mike Bird,/mike.bird.92351 | |
Benjamin Rennells,/benjamin.rennells,Mike Bird,/mike.bird.12177 | |
Benjamin Rennells,/benjamin.rennells,Denise Sharpe,/MIBESCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sleep(x) { | |
return new Promise(resolve => { | |
setTimeout(() =>{resolve(x);},x); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> //rand & srand | |
#include<time.h> //to seed srand | |
int main(int argc, char * argv[]) | |
{ | |
FILE * file; | |
long length; //file length | |
char * text = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy as np | |
import random | |
import time | |
random.seed(time.time()) | |
size = 256 #edit size here | |
im = Image.new('RGB', (size, size)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define n double | |
n l=25; //Change this | |
#define p(X) putchar("* \n"[X]) | |
#define f(X,Y) for(n X=0;X<l;p(Y)){X++; | |
n g(n z){return z==1?0:(z==2?1:g(z-1)+2);}void main(){n o=0.5;n h=l*o;f(i,2)n d=i>h?g(l-i+1):g(i); | |
n s=(l-d)*o;f(j,(j==h+o)?(j<=(s+o)?0:1):(j<=h?(j<(s+o)?0:1):((l+1-j)<(s+o)?0:1)))}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Try doing your own to replicate the below output, it took me more than id like to admit ;) (~1-2hrs) | |
lenght = 25 | |
************************* | |
************ ************ | |
*********** *********** | |
********** ********** | |
********* ********* | |
******** ******** | |
******* ******* |
NewerOlder