A Pen by @keyframers on CodePen.
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 kivy.app import App | |
from kivy.uix.button import Button | |
from android import activity | |
__version__ = '0.0.1' | |
class MyApp(App): | |
def __init__(self, *args, **kwargs): | |
super(MyApp, self).__init__(*args, **kwargs) |
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 sys | |
import json | |
import websocket | |
ws = websocket.create_connection('ws://tracker.archiveteam.org:1337/api/live_stats') | |
username = sys.argv[1] | |
while True: | |
data = json.loads(ws.recv()).get('live_new') |
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 inspect | |
from typing import Callable, Generator, Awaitable, TypeVar, Union | |
YieldType = TypeVar("YieldType") | |
SendType = TypeVar("SendType") | |
ReturnType = TypeVar("ReturnType") | |
def friendly_generator_decorator( | |
genfunction: Callable[..., Generator[YieldType, SendType, ReturnType]], | |
handler: Callable[[YieldType], Union[Awaitable[SendType], SendType]], |
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 re | |
from rest_framework import serializers, renderers, parsers | |
class JSONRenderer(renderers.JSONRenderer): | |
def render(self, data, *args, **kwargs): | |
if data: | |
data = recursive_key_map(underscore_to_camelcase, data) | |
return super(JSONRenderer, self).render(data, *args, **kwargs) |
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
// Name: daily note | |
// Description: Open today's daily note in obsidian | |
// You must install the Actions URI plugin and have the daily notes plugin enabled | |
// Currently MacOS only | |
import "@johnlindquist/kit" | |
import { homedir } from "os" | |
import { join as joinPath } from "path" |
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
// Name: daily note | |
// Description: Open today's daily note in obsidian | |
// You must install the Actions URI plugin and have the daily notes plugin enabled | |
// Currently MacOS only | |
import "@johnlindquist/kit" | |
import { homedir } from "os" | |
import { join as joinPath } from "path" |
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 * as build from "@remix-run/dev/server-build"; | |
import { createRoutes } from "@remix-run/server-runtime/dist/routes"; | |
import { Dedupe, ExtraErrorData, Transaction } from "@sentry/integrations"; | |
import { hasTracingEnabled } from "@sentry/tracing"; | |
import { Toucan } from "toucan-js"; | |
import createEventHandler from "./createEventHandler"; | |
import instrumentBuild, { getTransactionName, startRequestHandlerTransaction } from "./instrumentBuild"; | |
interface Environment { | |
__STATIC_CONTENT: KVNamespace<string>; |
OlderNewer