Skip to content

Instantly share code, notes, and snippets.

View JacobFV's full-sized avatar
🧑‍💻
Building the thing

Jacob Valdez JacobFV

🧑‍💻
Building the thing
View GitHub Profile
@JacobFV
JacobFV / spaces.py
Created February 18, 2025 16:21
composite gym spaces
from abc import ABC, abstractmethod
from typing import (
Type,
Any,
List,
Dict,
Literal,
Optional,
Set,
Union,
GLWT (Good Luck With That) Public License
Copyright (c) Everyone, except Author
Everyone is permitted to copy, distribute, modify, merge, sell, publish,
sublicense or whatever they want with this software but at their OWN RISK.
Preamble
The author has absolutely no clue what the code in this project does.
It might just work or not, there is no third option.
@JacobFV
JacobFV / README.md
Last active November 8, 2024 06:01
1D Traveling Wave Fourier Simulation

1D Traveling Wave Fourier Simulation

This visualization was completed for my thesis on measuring the dissapation of transverse sound waves in aqueous media under adiabatic conditions. Jk, its just a cool UV playground

Try it out here!

async def __call__(
self,
*,
action: Action,
text: str | None = None,
coordinate: tuple[int, int] | None = None,
**kwargs,
):
if action in ("mouse_move", "left_click_drag"):
if coordinate is None:
@JacobFV
JacobFV / README.md
Last active September 16, 2024 08:47
open1

open1

This is a start. It doesn't work atm.

Running

$ python open1.py --epochs 3 --use_mcts --multi_agent --progressive_training --visualize

2024-09-16 07:51:04.977649: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
@JacobFV
JacobFV / prompt.md
Created September 14, 2024 13:34
FastSaaS

FastSaaS: Meta-Prompt for SaaS Application Development with Reusable Patterns

Objective:
We are building a SaaS application where common features like CRUD operations, authentication, access control, background tasks, real-time communication, and templated entities are required. Below is a general framework you can use for building SaaS applications.


1. Abstract Base Classes (ABCs) Overview

  • CRUDBase:
I am attesting that this GitHub handle JacobFV is linked to the Tezos account tz1Zc5iZyfdtoVcMwG1dHY7F11FH7DWVTJic for tzprofiles
sig:edsigtjzq5fN911g9oxkn4WLMg21D1BaY6VeaALTGx1dAEsDSQisqTgXy5MaVkShYWmeABhZiNhw8YocR5GD72fiPvvqpBVC1YE
@JacobFV
JacobFV / polymorphic.py
Created July 17, 2024 22:54
polymorphic.py
def polymorphic(fn):
"""
A decorator for creating polymorphic functions.
This decorator allows you to define a base function and register multiple
implementations for different conditions. When the decorated function is called,
it will execute the appropriate implementation based on the registered conditions.
The decorator adds a 'register' method to the wrapped function, which can be used
to register new implementations with their corresponding condition functions.
@JacobFV
JacobFV / call_with_appropriate_args.py
Created July 17, 2024 22:53
call_with_appropriate_args.py
def call_with_appropriate_args(fn, *args, **kwargs):
"""
Call a function with only the arguments it can accept.
This function inspects the signature of the given function and calls it with
only the arguments that match its parameters. It filters out any excess
arguments that are not part of the function's signature.
Args:
fn (callable): The function to be called.
@JacobFV
JacobFV / has_permissions.py
Created May 17, 2024 22:35
has_permissions
class HasPermissions(SQLBaseModel, table=False):
"""
A base class to handle permission levels for viewing and updating fields in SQLModel entities.
This class allows setting permissions at the field level and automatically applies these permissions
as SQL policies on the database.
Attributes:
__owner_field_name__ (ClassVar[Optional[str]]): The name of the field that identifies the owner of the record.
Usage: