I hereby claim:
- I am yi-jiayu on github.
- I am jiayu1 (https://keybase.io/jiayu1) on keybase.
- I have a public key whose fingerprint is 6063 3A56 D1AD 52CE 15E7 194B F834 9771 097D 0610
To claim this, I am signing this object:
module['exports'] = function echoHttp (hook) { | |
console.log("Console messages are sent to /logs"); | |
console.log(hook.params); | |
console.log(hook.req.path); | |
console.log(hook.req.method); | |
from collections import namedtuple | |
Disk = namedtuple('Disk', ['size', 'colour']) | |
class BicolorTowersOfHanoi(object): | |
def __init__(self, disks=3): | |
self._disks = disks | |
self._moves = 0 | |
self._towers = {1: [], 2: [], 3: []} |
var target = document.getElementById('task'); | |
var observer = new MutationObserver(function(mutations) { | |
var x = parseInt(document.querySelector('#task_x').textContent, 10); | |
var y = parseInt(document.querySelector('#task_y').textContent, 10); | |
var op = document.querySelector('#task_op').textContent; | |
var eq = parseInt(document.querySelector('#task_res').textContent, 10); | |
console.log(x, y, op, eq); | |
var correct = false; |
from hashlib import md5 | |
secret = 'reyedfim' | |
nonce = 0 | |
digits = [] | |
passwd = [None] * 8 | |
while not all(passwd): | |
hash = md5() | |
hash.update('{}{}'.format(secret, nonce).encode('utf-8')) |
var boxes = document.querySelectorAll('.numScaleAnswerBox'); | |
var textBoxes = document.querySelectorAll('.mce-content-body'); | |
[].forEach.call(boxes, function(box) { | |
box.value = 5; | |
}); | |
[].forEach.call(textBoxes, function(box) { | |
box.textContent = 'Great'; | |
}); |
I hereby claim:
To claim this, I am signing this object:
[{"abilities":["Overgrow"],"detailPageURL":"/us/pokedex/bulbasaur","weight":15.2,"weakness":["Fire","Flying","Ice","Psychic"],"number":"001","height":28.0,"collectibles_slug":"bulbasaur","featured":"true","slug":"bulbasaur","name":"Bulbasaur","ThumbnailAltText":"Bulbasaur","ThumbnailImage":"https://assets.pokemon.com/assets/cms2/img/pokedex/detail/001.png","id":1,"type":["grass","poison"]},{"abilities":["Overgrow"],"detailPageURL":"/us/pokedex/ivysaur","weight":28.7,"weakness":["Fire","Flying","Ice","Psychic"],"number":"002","height":39.0,"collectibles_slug":"ivysaur","featured":"true","slug":"ivysaur","name":"Ivysaur","ThumbnailAltText":"Ivysaur","ThumbnailImage":"https://assets.pokemon.com/assets/cms2/img/pokedex/detail/002.png","id":2,"type":["grass","poison"]},{"abilities":["Thick Fat"],"detailPageURL":"/us/pokedex/venusaur","weight":342.8,"weakness":["Fire","Psychic","Flying","Ice"],"number":"003","height":94.0,"collectibles_slug":"venusaur","featured":"true","slug":"venusaur","name":"Venusaur","Thumbnai |
'use strict'; | |
const pokemon = require('./pokemon.min.json'); | |
// check if id_or_name matches a pokemon's id or name | |
const match = (pokemon, id_or_name) => pokemon.id == id_or_name || pokemon.slug.includes(id_or_name.toLowerCase()); | |
// find the first matching pokemon | |
const get_pokemon = id_or_name => pokemon.find(p => match(p, id_or_name)); |
exports.haha = function (req, res) { | |
const update = req.body; | |
console.log(JSON.stringify(update)); | |
// update contains a message | |
if (update.hasOwnProperty('message')) { | |
// call the sendMessage method | |
const reply = { | |
method: 'sendMessage', | |
chat_id: update.message.chat.id, |
#!/usr/bin/env python3 | |
import os | |
import sys | |
from itertools import product | |
def read_map(s): | |
s = s.strip().split('\n') | |
l, w = (int(x) for x in s[0].split(' ')) |