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 { z } from "zod"; | |
// utilities | |
const stringDate = z.string().regex(/\d{4}-\d{2}-\d{2}/); | |
// shared | |
const OrderBaseBaseSchema = z.object({ | |
id: z.string(), |
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
def _repr_cell(cell): | |
return " " if cell is None else cell | |
def _print_row(row): | |
print(f"{_repr_cell(row[0])} | {_repr_cell(row[1])} | {_repr_cell(row[2])}") | |
def _print_row_delimiter(): | |
print("--+---+---") |
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
## helper functions | |
""" | |
Constructs a board from a string. | |
s: a string representation of the board | |
Returns: a parsed board | |
E.g.: |
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 { CreateJobCommandInput } from "@aws-sdk/client-mediaconvert"; | |
export const getJobSetting = ( | |
fileInput: string, | |
outputPath: string, | |
userMetadata: { [key: string]: string }, | |
role: string | |
): CreateJobCommandInput => ({ | |
Queue: "Default", | |
UserMetadata: { |
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 gql import Client, gql | |
from gql.transport.requests import RequestsHTTPTransport | |
from itertools import groupby | |
from datetime import datetime | |
token = 'REDACTED' | |
transport = RequestsHTTPTransport( | |
url="https://open.heydoc.co.uk/graphql", verify=True, retries=3, |
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 lombok.Data; | |
import lombok.Value; | |
import org.springframework.lang.Nullable; | |
import java.lang.reflect.Method; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** @noinspection unchecked, rawtypes */ | |
class Scratch { |
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 lombok.Builder; | |
import lombok.Getter; | |
import lombok.SneakyThrows; | |
import lombok.Value; | |
import java.io.IOException; | |
import java.nio.file.FileVisitResult; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.SimpleFileVisitor; |
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
at(baba_class, field(1, 1), 0). | |
at(is, field(1, 2), 0). | |
at(you_class, field(1, 3), 0). | |
at(flag_class, field(3, 1), 0). | |
at(is, field(3, 2), 0). | |
at(win_class, field(3, 3), 0). | |
at(baba, field(2, 2), 0). | |
at(flag, field(2, 3), 0). |
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 os | |
import torch | |
from torch.nn import functional as F | |
from torch.utils.data import DataLoader | |
from torchvision.datasets import MNIST | |
from torchvision import transforms | |
import pytorch_lightning as pl |
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
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start | |
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start | |
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start | |
_, eval_results = self.run_evaluation(test_mode=False, max_batches=self.num_sanity_val_batches) | |
File "/Users/piotr/projects/neptune-examples/.env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 556, in run_evaluation | |
self._popen = self._Popen(self) | |
self._popen = self._Popen(self) | |
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen | |
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context |
NewerOlder