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 random | |
| import math | |
| from collections import Counter, defaultdict | |
| # ----- Configuration ----- | |
| N_TEAMS = 36 # number of teams in the league phase | |
| ROUNDS = 8 # number of games per team (for reference only) | |
| MAX_POINTS = ROUNDS * 3 # 8 * 3 = 24 |
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 React from "react"; | |
| import {View, Button, Text} from "react-native"; | |
| import {useOfflineQueue} from "@/hooks/useOfflineQueue"; | |
| export const OfflineQueue = () => | |
| { | |
| const {connected, queue, postData} = useOfflineQueue(); | |
| const sendData = async () => | |
| { |
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
| // ==UserScript== | |
| // @name Scrapepool | |
| // @namespace https://kfiros.com/ | |
| // @version 0.1 | |
| // @description try to win the refresh game in order to get Liverpool tickets! | |
| // @author realKfiros | |
| // @match https://ticketing.liverpoolfc.com/en-GB/events/*/*/*?*hallmap | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=liverpoolfc.com | |
| // @grant none | |
| // ==/UserScript== |
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
| [][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(! |
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 {observable, action, runInAction} from 'mobx'; | |
| /** | |
| * @typedef {object} Descriptor - The descriptor object for a property | |
| * @property {boolean} enumerable - whether the property is enumerable | |
| * @property {boolean} configurable - whether the property can be deleted or changed | |
| * @property {function} get - the getter function | |
| * @property {Map} [_intervals] - a map of intervals created by the @computedInterval decorator (no need to manually set this) | |
| */ |
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 {useState, useCallback} from "react"; | |
| /** | |
| * @typedef {object} Size | |
| * @property {number} width | |
| * @property {number} height | |
| */ | |
| /** | |
| * @typedef {object} ImageSizeObserver - A hook that observe an image size and provide some useful methods in order to work with its new size relatively |
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 React, { useState, useMemo, useEffect } from "react"; | |
| import { intervalToDuration, subSeconds } from 'date-fns'; | |
| const useCountdown = ({ finishTime, format }) => { | |
| const [time, setTime] = useState(new Date()); | |
| const countdown = useMemo( | |
| () => | |
| intervalToDuration({ | |
| start: finishTime, | |
| end: new Date(), |
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 Foundation | |
| import UserNotifications | |
| class NotificationsService: NSObject { | |
| // the function that checks if user gave a permission to send notifications and if it didn't it awaits an answer from the user | |
| @available(iOS 10.0, *) // available only on iOS 10 and newer iOS versions | |
| func requestPermission() -> Void { | |
| let notificationCenter = UNUserNotificationCenter.current() | |
| let options: UNAuthorizationOptions = [.alert, .sound, .badge] | |
| notificationCenter.requestAuthorization(options: options) { |
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 express = require('express'); | |
| const cors = require('cors'); | |
| const { sequelize } = require('./configurations'); | |
| const passport = require('passport'); | |
| const LocalStrategy = require('passport-local').Strategy; | |
| const session = require('express-session'); | |
| const uuid = require('uuid/v4'); | |
| const bodyParser = require('body-parser'); | |
| const models = { |
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
| # Created by realKfiros on 09/10/2017 | |
| import random | |
| class TicTacToe: | |
| winning_positions = [[1,2,3],[4,5,6],[7,8,9],[1,4,7],[2,5,8],[3,6,9],[1,5,9],[7,5,3]] | |
| def __init__(self): | |
| self.board = { | |
| 1: " ", 2: " ", 3: " ", |