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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| struct Pstr { | |
| int size; | |
| char* str; | |
| }; | |
| char** pstr_new() |
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
| export PYVER=3.7.7 | |
| CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch $PYVER < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1) |
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 asyncio | |
| async def factorial(name, number): | |
| f = 1 | |
| for i in range(2, number + 1): | |
| print(f"Task {name}: Compute factorial({i})...") | |
| await asyncio.sleep(1) | |
| f *= i |
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
| from dataclasses import dataclass | |
| @dataclass | |
| class Dto: | |
| foo: str | |
| clas DtoMapper: | |
| def build(foo: str) -> Dto: | |
| return Dto(foo) |
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 asyncio | |
| from functools import reduce | |
| from typing import Any, Callable, Generic, TypeVar, Union | |
| T = TypeVar("T") | |
| R = TypeVar("R") | |
| class Ok(Generic[T]): | |
| def __init__(self, value: T) -> None: |
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
| @curry({"t", 12}) | |
| def do_x(v, t): | |
| ... | |
| match(func, arg1, arg2) >> { | |
| str: do_x, | |
| int: lambda x: print x, | |
| InternalException: handle, | |
| ...: handle_default, | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| type Hello struct{} | |
| func (h Hello) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>ReDoc</title> | |
| <!-- needed for adaptive design --> | |
| <meta charset="utf-8"/> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- | |
| ReDoc doesn't change outer page styles |
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
| from sanic import Sanic | |
| from sanic.response import json | |
| from sanic.request import Request | |
| from sanic_jwt_extended import JWT | |
| import uuid | |
| app = Sanic(__name__) |
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
| CC | AOF | |
|---|---|---|
| AT | 14 | |
| BE | 13 | |
| CL | 14 | |
| CZ | 15 | |
| DK | 13 | |
| EE | 13 | |
| FI | 13 | |
| FR | 15 | |
| IT | 14 |
NewerOlder