Run primer:
#!/usr/bin/env bash
set -euo pipefail
mkdir -p "$HOME/.config/ty"
cp ".github/mypy-primer-ty.toml" "$HOME/.config/ty/ty.toml"
PRIMER_SELECTOR="core|dd-trace-py|manticore|materialize|operatorprefect"Run primer:
#!/usr/bin/env bash
set -euo pipefail
mkdir -p "$HOME/.config/ty"
cp ".github/mypy-primer-ty.toml" "$HOME/.config/ty/ty.toml"
PRIMER_SELECTOR="core|dd-trace-py|manticore|materialize|operatorprefect"| -- Define the Lua table that maps names to URLs | |
| local urlTable = { | |
| john = "https://example.com/john", | |
| alice = "https://example.com/alice", | |
| bob = "https://example.com/bob", | |
| } | |
| -- Register a callback for the custom hammerspoon:// URLs | |
| hs.urlevent.bind("example", function(eventName, params, senderPID) | |
| local event = eventName -- The event name is the host in hammerspoon://host |
| import symtable | |
| def print_symbol_table_info(symbol_table: symtable.SymbolTable, indent=0): | |
| # Print the information of the current symbol table | |
| print(" " * indent + f"Symbol Table: {symbol_table.get_name()}") | |
| print(" " * (indent + 2) + f"Type: {symbol_table.get_type()}") | |
| print(" " * (indent + 2) + f"Identifier: {symbol_table.get_id()}") | |
| print(" " * (indent + 2) + f"First Line Number: {symbol_table.get_lineno()}") | |
| # print(" " * (indent + 2) + f"Is Optimized: {symbol_table.is_optimized()}") | |
| # print(" " * (indent + 2) + f"Is Nested: {symbol_table.is_nested()}") |
| package main | |
| import "fmt" | |
| type Cell struct { | |
| x int | |
| y int | |
| state int | |
| } |
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| func main() { | |
| ch := make(chan int) | |
| wg := sync.WaitGroup{} |
| """ | |
| Convert Avro schema files to swagger object definitions. | |
| """ | |
| import argparse | |
| import json | |
| from dataclasses import dataclass | |
| from typing import Dict, List | |
| parser = argparse.ArgumentParser( | |
| description="Convert avro schema file to swagger object definition" |
| from steampy import guard | |
| import pyperclip | |
| pyperclip.copy(guard.generate_one_time_code("shared secret")) |
| from django.contrib.auth import get_user_model | |
| from utils.test_utils import APITestCase | |
| from .graphql_requests import ( | |
| CREATE_LINK_MUTATION | |
| ) | |
| class LinkTestCase(APITestCase): | |
| def setUp(self): |
| from django.contrib.auth.models import AnonymousUser | |
| from django.test import RequestFactory | |
| from snapshottest.django import TestCase | |
| from graphene.test import Client | |
| from hackernews.schema import schema | |
| class APITestCase(TestCase): | |
| def setUp(self): |