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
.section .data | |
number: | |
.quad 0 # we start out with 0 | |
crackle_output: | |
.ascii "Crackle\n" | |
pop_output: | |
.ascii "Pop\n" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 itertools | |
class Board(object): | |
def __init__(self): | |
self.rows = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']] | |
@property | |
def diagonals(self): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// input is an ordered array | |
let input_1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'] | |
// we pick a random value from the input array | |
let randomValue = input_1[Math.floor(Math.random() * input_1.length)]; | |
let binaryGuessIndex = (sortedArray:any[]): number => Math.floor(sortedArray.length/2) | |
function search (sortedArray:any[], value:any): any { |
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 FAILURE_COEFF = 10; | |
var MAX_SERVER_LATENCY = 200; | |
function getRandomBool(n) { | |
var maxRandomCoeff = 1000; | |
if (n > maxRandomCoeff) n = maxRandomCoeff; | |
return Math.floor(Math.random() * maxRandomCoeff) % n === 0; | |
} | |
function getSuggestions(text) { |