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 hou | |
class Connector: | |
container_node_type = "" | |
input_node_type = "" | |
input_connector_name = "" | |
def __init__(self, out_node): | |
self.out_node = out_node |
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 typing import List, Optional | |
import aiosqlite | |
from fastapi import FastAPI, HTTPException, Depends | |
from sqlalchemy import Column, Integer, String, Table, ForeignKey, select, UniqueConstraint | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession, async_scoped_session, async_sessionmaker | |
from sqlalchemy.orm import relationship, mapped_column, Mapped, backref, DeclarativeBase, selectinload | |
from pydantic import BaseModel as BaseSchema, ConfigDict | |
from contextlib import asynccontextmanager |
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 sqlalchemy import create_engine, Column, Integer, String, ForeignKey, Table | |
from sqlalchemy.orm import sessionmaker, relationship, backref, declared_attr, Mapped | |
from sqlalchemy.orm import declarative_base, Mapped, mapped_column | |
from sqlalchemy.orm.exc import NoResultFound | |
from sqlalchemy.sql.expression import and_ | |
from sqlalchemy import select, func, union_all, text | |
import asyncio | |
from sqlalchemy.ext.asyncio import ( | |
AsyncSession, | |
create_async_engine, |
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 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 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 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 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 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 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 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: |
NewerOlder