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 sqlalchemy import create_engine, Column, Integer, String, ForeignKey | |
from sqlalchemy.orm import declarative_base, relationship, selectin_polymorphic | |
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine | |
from sqlalchemy.orm import Mapped | |
from sqlalchemy.future import select | |
from sqlalchemy.ext.asyncio import ( | |
AsyncSession, | |
create_async_engine, | |
async_sessionmaker, |
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 sqlalchemy import create_engine, Column, Integer, String, ForeignKey | |
from sqlalchemy.orm import declarative_base, relationship, selectin_polymorphic | |
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine | |
from sqlalchemy.orm import Mapped | |
from sqlalchemy.future import select | |
from sqlalchemy.ext.asyncio import ( | |
AsyncSession, | |
create_async_engine, | |
async_sessionmaker, |
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 sqlalchemy import create_engine, ForeignKey, Column, Integer, String | |
from sqlalchemy.orm import declarative_base, relationship, sessionmaker | |
from sqlalchemy.orm import Mapped, mapped_column | |
Base = declarative_base() | |
class Entity(Base): | |
__tablename__ = 'entities' | |
id = Column(Integer, primary_key=True) |
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 sqlalchemy import create_engine, ForeignKey, Column, Integer, String | |
from sqlalchemy.orm import declarative_base, relationship, sessionmaker | |
from sqlalchemy.orm import Mapped, mapped_column | |
Base = declarative_base() | |
class Entity(Base): | |
__tablename__ = "entities" | |
id = Column(Integer, primary_key=True) |
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 | |
import socketio | |
sio = socketio.AsyncClient(logger=True, engineio_logger=True) | |
async def fun(): | |
await sio.connect( | |
"http://127.0.0.1:8001/ws", | |
transports=['websocket'], |
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 time | |
import os | |
from pathlib import Path | |
from datetime import timedelta | |
CMD_FILE_COPY = 'cp {} {}' | |
CMD_DIR_COPY = 'cp -r {} {}' | |
CMD_DEL = 'rm -fr {}' | |
SSD_SINGLE_FILE = Path('/path/to/big/file.ext') # REPLACE THIS |
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 pymel.core import * | |
def separate_by_shaders(obj): | |
shaders = [] | |
for sg in obj.getShape().outputs(type='shadingEngine'): | |
shaders.extend(sg.surfaceShader.inputs()) | |
shaders = list(set(shaders)) | |
for shader in shaders: |
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 pymel.core import * | |
from pathlib import Path | |
import shutil | |
def get_files_from_selected_nodes(): | |
files = [] | |
nodes = selected(type='file') + selected(type='aiImage') | |
for node in nodes: |
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
# Install WireGuard client on RaspberryPi | |
# 1 # download config file from web ui, for example ~/Downloads/client.conf | |
# 2 # Install pivpn and Wireguard client for RaspberryPi | |
sudo -i | |
apt update | |
apt dist-upgrade -y | |
curl -L https://install.pivpn.io | bash | |
# non interactive installation manual: https://docs.pivpn.io/install/ |
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
version: '3.4' | |
services: | |
vpn: | |
image: weejewel/wg-easy | |
container_name: vpn | |
restart: always | |
environment: | |
- WG_HOST=[IP ADDRESS OF YOUR SERVER] | |
- PASSWORD=[PASSWORD FOR WEB UI] |