Josh Forisha's implementation of opensimplex noise in a format that's friendly with using on openprocessing
This file contains hidden or 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
/* CONCLUSION */ | |
// Surprisingly, for me, the triple loop performed better than the flat loop | |
/* INITIALISATION */ | |
let xseed = random(10); | |
let yseed = random(10); | |
let zseed = random(10); | |
let step = 50; | |
let noiseVariance = 0.02; | |
let sideLength = 200; |
This file contains hidden or 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
/** | |
* A special function that runs when the spreadsheet is open, used to add a | |
* custom menu to the spreadsheet. | |
*/ | |
function onOpen() { | |
var spreadsheet = SpreadsheetApp.getActive() | |
var menuItems = [ | |
{ name: "Update Summaries...", functionName: "updateSummaries_" } | |
] | |
spreadsheet.addMenu("Finance", menuItems) |
Collision detection
- Space partitioning: binary, quad tree
- Sweep and prune
Response to collision
This file contains hidden or 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
# In this example: | |
# The device to be unblocked has the MAC address MM:MM:MM:SS:SS:SS, and is given the IP 192.168.0.9 | |
# The IP address of the server with dnsmasq is 192.168.0.2 | |
# Unblocked device(s) | |
dhcp-host=MM:MM:MM:SS:SS:SS,192.168.0.9,48h,set:noblock | |
dhcp-option=noblock,option:dns-server,1.1.1.1,1.0.0.1 | |
dhcp-option=noblock,option:router,192.168.0.1 | |
This file contains hidden or 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 ruby | |
require 'midilib/sequence' | |
DEFAULT_MIDI_TEST_FILE = 'Lullaby_-_Brahms.mid' | |
# Read from MIDI file | |
seq = MIDI::Sequence.new() | |
# Either open the file provided by the first argument or the one defined above | |
File.open(ARGV[0] || DEFAULT_MIDI_TEST_FILE, 'rb') do |file| |
This file contains hidden or 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 ruby | |
require 'midilib/sequence' | |
DEFAULT_MIDI_TEST_FILE = 'Tempo_Changes_test.mid' | |
# Read from MIDI file | |
seq = MIDI::Sequence.new() | |
# Either open the file provided by the first argument or the one defined above | |
File.open(ARGV[0] || DEFAULT_MIDI_TEST_FILE, 'rb') do |file| |
An adjustment to the PowerShell prompt
function that limits the number of path components. In this case the limit is 4 components.
If there are more than four components the components between the first one and the last three are replaced with "...".
It is similar to what the PROMPT_DIRTRIM
environment variable.
This file contains hidden or 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 PyPDF2 import PdfWriter, PdfReader | |
from pdf2image import convert_from_bytes | |
from copy import deepcopy | |
import io | |
num = 1 | |
reader = PdfReader("cards_no-borders.pdf") | |
for iter_page in reader.pages: | |
for x in range(3): | |
for y in range(3): |
OlderNewer