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
| const load = protos => { | |
| const dirname = path.join(__dirname, config.rpc.protos) | |
| return fs.readdirSync(dirname) | |
| .reduce((accum, curr) => { | |
| if (curr.endsWith('.proto') == true) { | |
| const proto = path.join(__dirname, config.rpc.protos, curr) | |
| return [...accum, proto] | |
| } | |
| }, []) | |
| } |
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
| { | |
| "AttributeDefinitions": [ | |
| { | |
| "AttributeName": "birth_day", | |
| "AttributeType": "N" | |
| }, | |
| { | |
| "AttributeName": "birth_month", | |
| "AttributeType": "N" | |
| }, |
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
| // AI level 1: skill 3/20, depth 1, 50ms | |
| // AI level 2: skill 6/20, depth 2, 100ms | |
| // AI level 3: skill 9/20, depth 3, 150ms | |
| // AI level 4: skill 11/20, depth 4, 200ms | |
| // AI level 5: skill 14/20, depth 6, 250ms | |
| // AI level 6: skill 17/20, depth 8, 300ms | |
| // AI level 7: skill 20/20, depth 10, 350ms | |
| // AI level 8: skill 20/20, depth 12, 400ms |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| $script = <<-SCRIPT | |
| wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb | |
| dpkg -i puppetlabs-release-pc1-xenial.deb | |
| apt-get update | |
| SCRIPT | |
| $server = <<-SCRIPT |
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
| package main | |
| import ( | |
| "io" | |
| "os" | |
| "log" | |
| "fmt" | |
| "flag" | |
| "crypto/sha256" | |
| "encoding/hex" |
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
| import math | |
| import argparse | |
| import itertools | |
| import statistics | |
| COORDINATE_INDEX = 1 | |
| SPEED_INDEX = 3 | |
| parser = argparse.ArgumentParser(description='Nautical Tracker') | |
| parser.add_argument('-f', '--filename', required=True, type=str, help='path to file') |
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
| // Copyright (c) 2020 Cristina Silva (crissilvaeng) <[email protected]> | |
| // License: X11 License (X11) <https://spdx.org/licenses/X11.html> | |
| package main | |
| import ( | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" |
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 itertools import islice | |
| class Node: | |
| def __init__(self, data, previous=None, next=None): | |
| self.data = data | |
| self.previous = None | |
| self.next = None | |
| def __eq__(self, other): | |
| if isinstance(other, self.data.__class__): |
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 python:3.8-buster | |
| WORKDIR /root | |
| ADD https://github.com/official-stockfish/Stockfish/archive/sf_13.tar.gz /root | |
| RUN tar xvzf *.tar.gz && cd Stockfish-sf_13/src \ | |
| && make net && make build ARCH=x86-64-modern | |
| FROM python:3.8-slim-buster |
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 itertools import combinations | |
| from random import choice | |
| players = ['Cristina', 'Rodrigo', 'Moises', 'Wagner', 'Arthur'] | |
| league = list(combinations(players, 2)) | |
| print(league) | |
| def victory_host(ranking, host, away): | |
| ranking[host] = ranking.get(host, 0) + 3 |