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
from bisect import insort | |
class SortedDict(dict): | |
def __init__(self): | |
super(dict, self).__init__() | |
self.sorted_keys = list() | |
def __setitem__(self, key, value): | |
super(SortedDict, self).__setitem__(key, value) |
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 GRID_SCALE = 20; | |
const GRID_CELLS = 20; | |
const FPS = 15; | |
let snake; | |
let food; | |
function setup() { | |
createCanvas(GRID_SCALE * GRID_CELLS, GRID_SCALE * GRID_CELLS); | |
frameRate(FPS); |
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
// This is the model | |
const model = tf.sequential(); | |
// Create hidden layer | |
const hiddens = tf.layers.dense({ | |
units: 4, | |
inputShape: [2], | |
activation: 'sigmoid' | |
}); |
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
# User Settings | |
## Set up Node Version Manager | |
source /usr/share/nvm/init-nvm.sh | |
## Env | |
export WALLPAPERS_HOME="/home/avdotion/Wallpapers/404339/" | |
alias settings="subl3 ~/.oh-my-zsh/oh-my-zsh.sh" | |
alias bk="cd ../" | |
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' | |
const readline = require('readline') | |
const input = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
input.setPrompt('> ') |
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
#include <iostream> | |
int sqr(int n) { | |
return n * n; | |
} | |
int main() { | |
int r{}; | |
std::cin >> r; | |
int x{}; |
OlderNewer