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
""" | |
Quick Sort algo in Python3 | |
""" | |
def quick_sort(arr): | |
""" | |
quick_sort sorts an array of integers. | |
""" | |
if len(arr) <= 1: | |
return arr |
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
function findNumber(minN, maxN, findMe, opNum = 0) { | |
// O(log n) | |
// if inital maxN is ... then there will be ... operations | |
// 100 ~6 ops | |
// 1,000 ~9 ops | |
// 10,000 ~13 ops | |
// 100,000 ~16 ops | |
// 100,000,000 ~26 ops | |
// 100,000,000,000 ~36 ops | |
// 100,000,000,000,000 ~46 ops |
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
const magik = magikcraft.io; | |
function EDIT_THIS() { | |
} |
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
const magik = magikcraft.io; | |
function EDIT_THIS() { | |
} |
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
module.exports = function(hljs) { | |
var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; | |
var KEYWORDS = { | |
keyword: | |
'in of if for while finally var new function do return void else break catch ' + | |
'instanceof with throw case default try this switch continue typeof delete ' + | |
'let yield const export super debugger as async await static ' + | |
// ECMAScript 6 modules import | |
'import from as' | |
, |
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
"use strict"; | |
(function() { | |
Error.stackTraceLimit = Infinity; | |
var $global, $module; | |
if (typeof window !== "undefined") { /* web page */ | |
$global = window; | |
} else if (typeof self !== "undefined") { /* web worker */ | |
$global = self; |
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
/* | |
// March 2014 - TMRh20 - Updated along with High Speed RF24 Library fork | |
// Parts derived from examples by J. Coliz <maniacbug@ymail.com> | |
*/ | |
/** | |
* Example for efficient call-response using ack-payloads | |
* | |
* This example continues to make use of all the normal functionality of the radios including | |
* the auto-ack and auto-retry features, but allows ack-payloads to be written optionally as well. | |
* This allows very fast call-response communication, with the responding radio never having to |
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
var spiDev = "/dev/spidev0.0"; | |
var cePin = 8; | |
var irqPin = 5; | |
var pipes = [0xABCDABCD71, 0x544d52687C]; | |
var nrf = require('nrf'); | |
var radio = nrf.connect(spiDev, cePin, irqPin); // Connect to the radio | |
radio.channel(0x4c); // Set channel to 76 | |
radio.transmitPower('PA_LOW'); | |
radio.dataRate('1Mbps') // Set data rate to 1Mbps |
NewerOlder