Skip to content

Instantly share code, notes, and snippets.

@ohdearquant
ohdearquant / Insider.md
Created February 5, 2025 23:22 — forked from ruvnet/Insider.md
Insider Trading Mirroring System

o1 Pro: Insider Trading Mirroring System

Introduction

In the dynamic world of financial markets, staying ahead of insider movements can provide significant strategic advantages.

The Insider Trading Mirroring System is a sophisticated tool designed to monitor publicly disclosed insider trades and automatically mirror these actions within your investment portfolio. By leveraging cutting-edge technologies like LangGraph and integrating real-time data feeds, this system offers a seamless and automated approach to capitalizing on insider trading activities.

Legal & Ethical Considerations
It's crucial to emphasize that this system only processes publicly available insider trading information, as mandated by regulatory bodies such as the U.S. Securities and Exchange Commission (SEC). Engaging in trading based on material non-public information is illegal and unethical. Users must ensure compliance with all relevant laws and regulations and consult with legal and compliance professiona

@ohdearquant
ohdearquant / grpo_demo.py
Created January 31, 2025 18:07 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
from enum import Enum
import pprint
from typing import ClassVar
from pydantic import Field
from lionagi import Branch, iModel, pile, Form
class Speaker(str, Enum):
STOCK_LOOKUP = "stock_lookup"
AUTHENTICATE = "authenticate"
@ohdearquant
ohdearquant / categorical_pile.py
Last active May 7, 2024 13:16
lionagi data structure, branch, flow and pile
from typing import TypeVar, Any
from pydantic import Field
from ..abc import Component, LionIDable, Record
from ._pile import Pile, pile
T = TypeVar("T", bound=Component)
class CategoricalPile(Component, Record):
@ohdearquant
ohdearquant / form.py
Last active April 24, 2024 00:53
forms to keep track of work
from pydantic import Field
# from lionagi import logging as _logging
from lionagi.core.generic import BaseComponent
from lionagi.experimental.report.util import get_input_output_fields, system_fields
class Form(BaseComponent):
assignment: str = Field(..., examples=["input1, input2 -> output"])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ohdearquant
ohdearquant / lion_compare.md
Last active April 18, 2024 14:09
lioagi vs dspy vs llamaindex vs langchain vs autogen
@ohdearquant
ohdearquant / imodel.py
Last active April 14, 2024 22:47
intelligent model
from lionagi.core.generic import BaseComponent
from pydantic import BaseModel, Field, field_validator
from abc import ABC, abstractmethod
class iModel(BaseComponent, ABC):
model_id: str = Field(default_factory=str)
model_name: str = Field(default_factory=str)
llmconfig: dict = Field(default_factory=dict)
@ohdearquant
ohdearquant / coder.py
Last active April 14, 2024 14:10
lion_x_rUv
"""
Prompts for the coder
mostly from rUv: https://gist.github.com/ruvnet/4b41ee8eaabd6e72cf18b6352437c738
- guidance_response_: guidance response for the coder
- write_codes
- review_codes
- modify_codes
- debug_codes
""";
from abc import ABC, abstractmethod
## primary
class Record(ABC):
"""represents concretized information"""
@abstractmethod
def items(self): ...