Experiemental work on forked computation in shiny app using the package "parallel".
Does not work on windows.
| var degrees2meters = function(lon,lat) { | |
| var x = lon * 20037508.34 / 180; | |
| var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); | |
| y = y * 20037508.34 / 180; | |
| return [x, y] | |
| } | |
| //test | |
| lon= -77.035974 | |
| lat = 38.898717 |
| #!/bin/bash | |
| # For this to work, you need to have ffmpeg | |
| # installed with libvorbis, theora and libvpx ENABLED | |
| # to do that in Homebrew: | |
| # brew reinstall ffmpeg --with-libvpx --with-libvorbis --with-theora | |
| # | |
| # encoding reference: | |
| # https://blog.mediacru.sh/2013/12/23/The-right-way-to-encode-HTML5-video.html |
| const express = require("express") | |
| const app = express() | |
| const { Pool } = require("pg") | |
| const SphericalMercator = require("sphericalmercator") | |
| const pool = new Pool({ | |
| host: "localhost", | |
| port: 15432, | |
| user: "postgres", | |
| database: "postgres" | |
| }) |
These libraries can be used to quickly create a GUI for configureable parameters using sliders, checkboxes, colors pickers etc
| # Collection of one line text art (◕‿◕✿) | |
| Collection of emojis and one line text art like (╯°□°)╯︵ ┻━┻ 🤗 | |
| ּבּ_בּ | |
| טּ_טּ | |
| כּ‗כּ | |
| לּ_לּ | |
| מּ_מּ | |
| סּ_סּ |
Generator functions are basically functions that you can pause at some point. You can define a generator function with function*:
function* Generator() {
// code goes here
}I like to named my generator functions with a capital, for reasons that will become apparent later, but generally they are named with a lowercase letter.
| #bach-allabreve2-bwv589-RF.rb | |
| #coded for Sonic Pi by Robin Newman, July 2023 | |
| use_debug false | |
| use_synth_defaults amp: 0.5 | |
| s=0.96;r=0.04;st=0 #s,r,st = sustain factor,release factor, start tempo section | |
| Last = 4 #pause on last note | |
| with_fx :reverb , room: 0.9,mix: 0.7 do | |
| use_synth :pulse | |
| with_fx :compressor,amp: 0.7 do |