I hereby claim:
- I am phillyai on github.
- I am adnim (https://keybase.io/adnim) on keybase.
- I have a public key ASBXmfd-p-s02xrOEM9MV70yLb8eXT-on3u-XHN36E_ykgo
To claim this, I am signing this object:
| class Contract: | |
| @classmethod | |
| def check(cls, value): | |
| pass | |
| class Typed(Contract): | |
| @classmethod | |
| def check(cls, value): | |
| assert isinstance(value, cls.type), f'Expected {cls.type}' |
| #include<stdio.h> | |
| int main() | |
| { | |
| int data[3][3]; | |
| data[0][0] = 0; data[0][1] = 1; data[0][2] = 2; | |
| data[1][0] = 3; data[1][1] = 4; data[1][2] = 5; | |
| data[2][0] = 6; data[2][1] = 7; data[2][2] = 8; | |
| printf("%d", data[1][2]); | |
| printf("%d", data[0][5]); |
| foreach (string device in System.IO.Directory.GetLogicalDrives()) | |
| { | |
| System.IO.DriveInfo dr = new System.IO.DriveInfo(device); | |
| if (dr.DriveType != System.IO.DriveType.Removable) continue; | |
| Console.WriteLine(dr.RootDirectory.ToString()); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| from danbooru import pages | |
| from PIL import Image | |
| import requests | |
| from io import BytesIO | |
| def get(size=(300, 300)) : | |
| ''':returns PIL.Image, 0~2 raiting level. 0 is safe, 1 is questionable, 2 is explicit.''' | |
| p = pages(limit=100) | |
| while True: |
| import json | |
| import urllib.request | |
| from typing import Generator | |
| def pages(limit: int = 10, page: int = 1) -> Generator: | |
| cur = page | |
| while True: | |
| url = 'https://danbooru.donmai.us/posts.json?limit={}&page={}'.format(limit, cur) | |
| res = json.loads(urllib.request.urlopen(url).read().decode('utf-8')) |