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 | |
from sys import argv | |
import random, time | |
def bold(s): | |
return '\033[1m'+s+'\033[0m' | |
def italic(s): | |
return " ** "+bold(s) |
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 sys | |
teams = int(input("Input the number of teams")) if len(sys.argv) <= 1 else int(sys.argv[1]) | |
weeks = [] | |
for i in range(teams - 1): | |
week = [] | |
remaining_teams = [*range(teams)] | |
# Always 0 | |
fixed_point = remaining_teams.pop(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
# syntax = docker/dockerfile:1 | |
FROM node:alpine as base | |
LABEL fly_launch_runtime="Next.js" | |
# Next.js app lives here | |
WORKDIR /app | |
# Set production environment |
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
'()[]{}' | |
'(((]))' | |
'](' | |
processClosedBracket('()[]{}') | |
processOpenBracket('paren', ')[]{}') | |
const isOpening = (char) => { |
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 tests = [ | |
'()[]{}', | |
'(((]))', | |
'((()))', | |
'](', | |
'(()', | |
'())' | |
] | |
const solutions = [ |
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 { useEffect, useState } from 'react'; | |
function App() { | |
const [on, setOn] = useState(false); | |
const [remounts, setRemounts] = useState(0); | |
const [showDisappearingButton, setShowDisappearingButton] = useState(true); | |
useEffect(() => { | |
let interval, disappearingInterval, appearingInterval | |
if (remounts < 1000) { | |
interval = setInterval(() => { |