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 probs = { | |
| 0: { | |
| 0: 0.7, | |
| 1: 0.14, | |
| 2: 0.1, | |
| 3: 0.03, | |
| 4: 0.02, | |
| 5: 0.01 | |
| }, | |
| 1: { |
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
| { | |
| "name": "someproject", | |
| "version": "1.0.0", | |
| "description": "someproject shop", | |
| "main": "index.js", | |
| "author": "Mike Yakymenko", | |
| "license": "MIT", | |
| "scripts": { | |
| "dev": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' server.ts", | |
| "prod": "tsc -p api && node dist/server.js" |
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 * as mongoose from 'mongoose' | |
| import {AdressDbModel} from './types' | |
| const adressSchema = new mongoose.Schema({ | |
| country: { | |
| type: String, | |
| required: true | |
| }, | |
| city: { |
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
| def scheduleMatches(teams, rounds=1): | |
| matches = [] | |
| if len(teams) % 2 == 1: | |
| teams.append('None') | |
| teamsNumbers = len(teams) | |
| map = list(range(teamsNumbers)) | |
| middle = teamsNumbers // 2 | |
| for i in range((teamsNumbers-1)*rounds): |
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 app.core.constants import Directions | |
| class SeasonSchedule: | |
| def __init__(self, units, season_shift=None): | |
| self.units = units | |
| self.north_units = [unit for unit in units if unit['division'] == Directions.North.value] | |
| self.south_units = [unit for unit in units if unit['division'] == Directions.South.value] | |
| self.season_shift = list(range(5)) if season_shift is None else season_shift | |
| self.weeks = [] |
OlderNewer