- Open puzzle input URL in browser.
- Start developer console.
- Paste code into the console.
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
from copy import deepcopy | |
from time import time | |
from typing import Dict, Optional, Set, Tuple | |
class Cell: | |
def __init__(self): | |
self.possibilities: Set[int] = set(range(1, 10)) | |
self._update() |
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 nltk | |
# import nltk.tokenize | |
import random | |
import re | |
#import requests | |
# reg = r'<a href="/title/[^"]+"\n>([^<]+)</a>' | |
# r = requests.get('https://www.imdb.com/list/ls033759520/?sort=list_order,asc&st_dt=&mode=simple&page=1&ref_=ttls_vw_smp') | |
# movies = re.findall(reg, r.text) | |
# alltext = " ".join(movies).strip() |
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
from collections import OrderedDict | |
class BaseConv: | |
def __init__(self, charset:str): | |
self.charset = OrderedDict.fromkeys(charset) | |
i = 0 | |
for k in self.charset: | |
self.charset[k] = i | |
i += 1 | |
self.charset_string = ''.join(self.charset.keys()) |
- Copy paste the content from bundlecalculator.min.js into developer console.
- Run
set_ratio(15)
. Replace 15 to any figure you wish to pay.
Enabled by default. To disable the behaviour, set second parameter to false, e.g. set_ratio(15, false)
.
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 json | |
from glob import iglob | |
import resource | |
dflist = [] | |
for i in iglob('./data/FULL/data/visits*.json'): | |
print(i) | |
dflist.append(json.load(open(i, 'r'))) | |
print(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss) |
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
<?php | |
class DeepThoughtSimulator | |
{ | |
public function getAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything() | |
{ | |
sleep(7500000 * 365.24219 * 24 * 60 * 60); | |
return 42; | |
} | |
public function __call($name, $arguments) |
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
class Spiral(object): | |
def __init__(self, xsize=4, ysize=None): | |
self.xsize = xsize | |
self.ysize = xsize if ysize is None else ysize | |
self.x = 0 | |
self.y = -1 | |
self.vx = 0 | |
self.vy = 1 | |
self.max = self.xsize * self.ysize | |
self.init_board() |