π¦
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 numpy as np | |
| import albumentations as A | |
| import cv2 | |
| from albumentations.pytorch import ToTensorV2 | |
| from albumentations.augmentations import functional as A_F | |
| from albumentations.core.transforms_interface import ImageOnlyTransform | |
| class BlackOutWithPolygonMasks(ImageOnlyTransform): | |
| def __init__(self, always_apply=False, p=1.0): | |
| super(BlackOutWithPolygonMasks, self).__init__(always_apply, p) |
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 crypto from 'crypto' | |
| import parseSignedRequest from './parseSignedRequest.mjs' | |
| import { instance as fileStorage } from '../ConfirmingFileStorage.mjs' | |
| import { getLogger } from '../logger.mjs' | |
| import { toAbsoluteUrl } from '../util.mjs' | |
| const logger = getLogger('deletionEndpoint') | |
| export function registerHandles (app) { |
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
| // written by @lesliearkorful | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { |
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 requests | |
| from tqdm import tqdm | |
| def download(url: str, fname: str, chunk_size=1024): | |
| resp = requests.get(url, stream=True) | |
| total = int(resp.headers.get('content-length', 0)) | |
| with open(fname, 'wb') as file, tqdm( | |
| desc=fname, | |
| total=total, |