I hereby claim:
- I am maxov on github.
- I am maxov (https://keybase.io/maxov) on keybase.
- I have a public key ASDOdy2BWYhJfJHXWVLoI_D_QKt4xKMqaa__h-5g-HIKlgo
To claim this, I am signing this object:
| import requests | |
| import argparse | |
| import json | |
| from bs4 import BeautifulSoup | |
| from tqdm import tqdm | |
| SUBMISSIONS_URL = 'https://www.gradescope.com/courses/{}/assignments/{}/submissions' | |
| SELECT_PAGES_URL = 'https://www.gradescope.com/courses/{}/assignments/{}/submissions/{}/select_pages' | |
| parser = argparse.ArgumentParser() |
I hereby claim:
To claim this, I am signing this object:
| def x(): | |
| return 3 | |
| print(x()) |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| from collections import namedtuple | |
| from string import lowercase | |
| Rect = namedtuple('Rect', ['name', 'weight']) | |
| # finds the sum of a list of rects | |
| def rects_sum(rects): | |
| return sum(rect.weight for rect in rects) | |
| # finds the difference between the minimum aspect ratio of rectangles in the subdivison and a perfect square |
Data merging is the process by which new data as set by a plugin is put back into someplace where it carries more meaning, like an entity or block.
The Sponge API has had DataPriority for a while. It essentially dictates how data from a copier and copiee (?) should be merged, applying specifically to the case of filling data in a mainpulator or offering it back to the containing holder.
| ; the let macro | |
| (set macros "let" (fn (tree) | |
| (if (== (len tree) 0) | |
| (err "let takes at least one arg") | |
| (let | |
| (expr (last tree)) | |
| (body (map (init tree) (fn (tree) | |
| (cons (quote "def") tree)))) | |
| (form (push (cons (quote "do") body) expr)) | |
| (compileExpr form body))))) |
| // current data api | |
| Optional<DisplayNameData> wrappedDisplayName = entity.getData(DisplayNameData.class); | |
| if (wrappedDisplayName.isPresent()) { | |
| DisplayNameData displayname = wrappedDisplayName.get(); | |
| displayname.setDisplayName(Texts.of(displayName.get(), "hai!")); | |
| entity.offer(displayname); | |
| } | |
| // value api | |
| if (entity.supports(Values.DISPLAY_NAME)) { |
| // data api | |
| Optional<DisplayNameData> wrappedDisplayName = entity.getData(DisplayNameData.class); | |
| if (wrappedDisplayName.isPresent()) { | |
| DisplayNameData displayname = wrappedDisplayName.get(); | |
| displayname.setDisplayName(Texts.of(displayName.get(), "hai!")); | |
| entity.offer(displayname); | |
| } | |
| // equivalent POJO | |
| if (entity.displayName != null) { |