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
main.py:46: in __init__ | |
self.self0 = "" | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
> ??? | |
E AttributeError: __fields_set__ |
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 fastapi import FastAPI | |
from datetime import date | |
from pydantic import BaseModel | |
from typing import List, Sequence, TypeVar, Generic | |
from fastapi_pagination import Page as BasePage, add_pagination, paginate | |
from fastapi import Query | |
from fastapi_pagination.bases import AbstractPage, AbstractParams, RawParams | |
from fastapi_pagination import Params as BaseParams | |
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 fastapi import FastAPI | |
from pydantic import BaseModel | |
from fastapi_pagination import Page, add_pagination, paginate | |
app = FastAPI() | |
class User(BaseModel): | |
name: str |
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 square_nums(nums) | |
yield(map(lambda x: x ** x, nums)) |
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
[jenia@jenia ~]$ sudo nfs-ls nfs://192.168.1.0/srv/nfs | |
Failed to mount nfs share : nfs_mount_async failed. Failed to start connection. Failed to start connection. connect() to server failed. Network is unreachable(101) | |
[jenia@jenia ~]$ | |
[jenia@jenia ~]$ | |
[jenia@jenia ~]$ | |
[jenia@jenia ~]$ sudo exportfs -arv | |
point 1 | |
point 2 | |
point 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
~/example/program.py | |
~/example/tests/uni-tests.py | |
~/example/program.py | |
===================== | |
#!/usr/bin/python3 | |
class A(): | |
def f(self): | |
print("hello") |
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
#!/usr/bin/python3 | |
def f(flag): | |
flag = False | |
def g(flag): | |
print(flag) | |
def main(): | |
flag = True |
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
# echo-client.py | |
import sys | |
import trio | |
import time | |
# arbitrary, but: | |
# - must be in between 1024 and 65535 | |
# - can't be in use by some other program on your computer | |
# - must match what we set in our echo server | |
PORT = 12345 |
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
#echo-server.py | |
import trio | |
from itertools import count | |
# Port is arbitrary, but: | |
# - must be in between 1024 and 65535 | |
# - can't be in use by some other program on your computer | |
# - must match what we set in our echo client | |
PORT = 12345 |
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: Create db container and connect to network | |
docker_container: | |
name: "{{ app_name }}" | |
image: "{{ app_image}}" | |
networks: | |
- name: "{{ docker_network_name }}" | |
when: app_name == "certain_app" or app_name == "certain_other_app" | |