flowchart TD
B{Documented entity?}
B -- Yes --> C[NoSQL]
C --> D{CRUD?}
B -- No --> E[RDBMS]
E --> F{CRUD?}
D -- Yes --> K[FastAPI + Firestore]
D -- No ----> H[gRPC + Firestore]
F -- Yes --> I{Use Python libalies?}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
class dict2(dict): | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.__dict__ = self |
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 multiprocessing import Process, Manager | |
class MyMap(): | |
def __new__(cls): | |
self = Manager().dict() | |
return self | |
def f(d): | |
d[1] += '1' | |
d['2'] += 2 |
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 logging | |
import aioredis | |
class RedisConn: | |
_pool = {} | |
# Singleton | |
def __new__(cls, *args, **kwargs): | |
if not hasattr(cls, "_instance"): |
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
{ | |
Type = { | |
key : Text, | |
}, | |
default = { | |
key = "default", | |
} | |
} |
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
λ(n : Natural) -> [ n, n + 1 ] |
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 React from 'react'; | |
import AppContainer from './appcontainer'; | |
export default function App() { | |
return ( | |
<AppContainer /> | |
) | |
} |
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 { API_URL, ENDPOINT_TOKEN } from '../../components/const'; | |
import type { NextApiRequest, NextApiResponse } from "next"; | |
type Todo = { | |
userId: number; | |
id: number; | |
title: string; | |
completed: boolean; | |
}; |
OlderNewer