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
# unlike range, prange works automatically with reverse ranges, floats, and 0 steps | |
# prange(0,-10) --> 0, -1, -2, -3, -4, -5, -6, -7, -8, -9 | |
# prange(1,2,.1) --> 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9 | |
# prange(0,1,0) --> 0, 0, 0, ... | |
# prange(a,b,c) --> range(a,b,c) # when a,b,c are positive integers and a<b | |
# prange stands for practical range | |
def prange(start, stop=None, step=1): | |
if stop is None: |
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
<script> | |
ce=(t)=>document.createElement(t); | |
c=ce("canvas"); u=ce("canvas"); | |
b=document.body=ce("body") | |
b.style.margin=0 | |
p=(c)=>{ | |
c.width = innerWidth; c.height = innerHeight; | |
c.style.width="100%"; c.style.height="100%"; | |
c.style.position = "absolute"; c.style.top=0; | |
b.append(c) |
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
" ";import os;_=0###### | |
" ";import math; sin=0x0 or \ | |
math.sin; cos=math.cos;###### | |
" ";a=0; b=0;height=24; width=80;### | |
" ";clear=["clear","cls".strip()][(os).\ | |
name!="posix"]; os.system(clear);s=sin | |
while 1: ##################################### | |
z = [0 for DONUT in range(4*height*width)]#### | |
screen = [' ' for O in range(height*width)]##### | |
j=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
import readline | |
LAYOUT = """ | |
` 1 2 3 4 5 6 7 8 9 0 - = | |
q w e r t y u i o p [ ] \\ | |
a s d f g h j k l ; ' | |
z x c v b n m , . / | |
"""[1:-1] | |
def h(c): | |
return ''.join([[' ', x][x==c or x=='\n'] for x in LAYOUT]) | |
def U(s1, s2): |
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
import sys | |
import os | |
def usage(): | |
print("""python ifsearch.py --list <path> | |
python ifsearch.py --dump <path> | |
python ifsearch.py --search <term> <path>""") | |
indention = 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[RequireComponent(typeof(Camera))] | |
[ExecuteInEditMode] | |
public class RaymarchCamera : MonoBehaviour | |
{ | |
[SerializeField] | |
public Shader _shader; |
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
/******************************************************************************************** | |
@filename: rmpd.c | |
@title: Real Pixel Lighting RAMP DEMO | |
@description: Simple gradient demo of RPL with shadows | |
@author: Samy Bencherif | |
Copyright (C) 2020 Samy Bencherif (@deathstallion) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
software and associated documentation files (the "Software"), to deal in the Software |
This is a SCRIPT-8 cassette.
NewerOlder