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 collections import namedtuple | |
from urllib.request import urlopen, URLError | |
from xml.etree import ElementTree | |
import os | |
REPLACE_DELIM = '_' | |
POSIX_ILLEGAL = '/' | |
WINNT_ILLEGAL = '<>:"/\\|?*' | |
def to_compat(filename: str, delimeter: str) -> str: |
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
#!/bin/python | |
import glob | |
from sys import argv | |
from argparse import ArgumentParser | |
from os import rename | |
_parser = ArgumentParser( | |
"Strip28Bit", | |
description= "Strips multi-byte UNICODE strings in" | |
" filenames into 7-bit ASCII strings", |
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
// The MIT License (MIT) | |
// | |
// Copyright (c) 2019 vnullptr | |
// | |
// 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 without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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
var audioCtx = new AudioContext(); | |
var source = audioCtx.createMediaElementSource( | |
document.querySelector('video') | |
); | |
var analyser = audioCtx.createAnalyser(); | |
source.connect(analyser); | |
analyser.connect(audioCtx.destination); | |
analyser.fftSize = 1024; |
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
/** | |
* (c) Copyright 2019 nullptr. | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
<input type="file" accept="text/*" id="file"/> | |
<label for="file">Upload file</label> <span class="h1_defui">OnlineNotepad — A plain online text editor</span> | |
<textarea id="editor"></textarea> | |
<br/> | |
<input id="fname" placeholder="filename"/> | |
<button id="fsave">Save File</button> |
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
$print("Hello World"); | |
# THESE ARE COMMENTS, THEY ONLY EXIST IT SOURCE CODE | |
# AND INGORED BY THE LEXER BEFORE COMPILING. | |
def x: f24 = 75; # Variables types can be defined while initalization but, cannot be changed later. | |
def y = 75; # EXCEPTION: if type is not explictly declared then type of variable can be changed later. | |
def z: inh = $format("%d", x); | |
# 'inh' keywords infers the type from the value but the type cannot be changed later. |
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
/** Mapping of x from range [a..b) to [c..d). */ | |
Math.map = (x, a,b, c,d) => x + (d-c)/(b-a) + c; | |
var audioCtx = new AudioContext(); | |
var source = audioCtx.createMediaElementSource( | |
document.querySelector('video') | |
); | |
var analyser = audioCtx.createAnalyser(); | |
source .connect(analyser); |
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
var audioCtx = new AudioContext(); | |
var source = audioCtx.createMediaElementSource(document.querySelector('video')); | |
var analyser = audioCtx.createAnalyser(); | |
source.connect(analyser); | |
analyser.connect(audioCtx.destination); | |
// FFTSize to analyse | |
analyser.fftSize = 8192; | |
// analyser.smoothingTimeConstant = 0.2; |
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
/** | |
* @description Maps a number in a range into another range. | |
* @param {Number} val - The value to map. | |
* @param {Number} v_min - The minimum value of the 'value'. | |
* @param {Number} v_max - The maximum value of the 'value'. | |
* @param {Number} m_min - The minimum value to map. | |
* @param {Number} m_max - The maximum value to map. | |
* @returns Number |