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
// ================================================ | |
// ==== ⬇️🚫 DO NOT TOUCH CODE BELOW HERE 🚫⬇️ ==== | |
// ************ DATABASE STUFF *************** | |
interface EventModel { | |
id: number | |
kind: string | |
starts_at: string | |
ends_at: string | |
} |
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 _ = require('lodash'); | |
const assert = require('assert'); | |
const Mocha = require('mocha') | |
const mocha = new Mocha(); | |
mocha.suite.emit('pre-require', this, 'solution', mocha); | |
const sinon = require("sinon"); | |
const OperationType = { |
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
# coding=utf-8 | |
# This is a sample Python script. | |
# Press ⌃R to execute it or replace it with your code. | |
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings. | |
import scrapy | |
from requests import get | |
from scrapy import Selector | |
import json |
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
package converter | |
import java.math.BigDecimal | |
import kotlin.math.pow | |
tailrec fun convertFromDecimal(rest: Long, base: Int, result: List<String>): List<String> { | |
return if (rest < base) { | |
result + rest.toString(base) | |
} else { | |
val remainder = rest % base |
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 scala.util.matching.Regex | |
trait Element | |
case class Number(value: Int) extends Element | |
object PlusOperator extends Element | |
case class ParseResult(elements: List[Element], rest: String) |
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
# more info here https://github.com/Cledersonbc/tic-tac-toe-minimax | |
import random | |
from enum import Enum | |
from math import inf as infinity | |
class PlayerType(Enum): | |
USER = 1 | |
EASY = 2 |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Main</title> | |
<style> | |
body { | |
padding: 0; | |
margin: 0; | |
} |
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
package search | |
import java.io.File | |
import java.util.* | |
typealias InvertedSearchData = MutableMap<String, Set<Int>> | |
enum class MatchingStrategy() { | |
ALL { | |
override fun execQuery(invertedSearch: InvertedSearchData, words: List<String>): Set<Int> { |
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
package processor | |
import java.math.RoundingMode | |
import java.text.DecimalFormat | |
import java.text.NumberFormat | |
import java.util.* | |
import kotlin.math.pow | |
data class Matrix(val rowSize: Int, val columnSize: Int, val data: List<List<Double>>) { |
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
package minesweeper | |
import java.util.* | |
import kotlin.random.Random | |
enum class Command { | |
MARK, EXPLORE | |
} | |
enum class State { |
NewerOlder