Skip to content

Instantly share code, notes, and snippets.

View ssghost's full-sized avatar
🏠
Working from home

Stardustclub ssghost

🏠
Working from home
View GitHub Profile
@ssghost
ssghost / partialdata.sh
Last active August 12, 2025 06:36
Partial clone Github repo data folder
!mkdir my_data
%cd my_data
!git init
!git remote add origin https://github.com/username/reponame.git
!git config core.sparsecheckout true
!echo "tests/data" >> .git/info/sparse-checkout
name: My Continue Configuration
version: 1.0.18
models:
- name: Ollama Mistral Nemo
provider: ollama
model: mistral-nemo:latest
apiBase: http://localhost:11434
defaultCompletionOptions:
contextLength: 8192
- name: Ollama CodeGemma
import pandas as pd
from dateutil import parser
import plotly.express as px
df1 = pd.read_csv("./monthly_job_applications_2025-04-15T08_01_46.84848Z.csv")
df2 = pd.read_csv("./monthly_job_posts_2025-04-15T08_01_39.691275Z.csv")
df1.rename(columns={"Created At": "Month"}, inplace = True)
df2.rename(columns={"Published At": "Month"}, inplace = True)
on run {input, parameters}
do shell script "nohup /usr/local/bin/llama-server -m '/Volumes/TOSHIBA EXT/GGUF/gemma-3-4b-it-q4_0.gguf' --port 11234 >/dev/null 2>&1 &"
return input
end run
@ssghost
ssghost / phi-4-unsloth-notebook.ipynb
Created January 17, 2025 08:17
Phi-4 Unsloth notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philschmid
philschmid / get_memory_size.py
Created January 16, 2025 13:53
Get needed GPU per precision for a Hugging Face Model Id
from typing import Dict, Union
from huggingface_hub import get_safetensors_metadata
import argparse
import sys
# Example:
# python get_gpu_memory.py Qwen/Qwen2.5-7B-Instruct
# Dictionary mapping dtype strings to their byte sizes
bytes_per_dtype: Dict[str, float] = {
use mlua::{IntoLua, Lua, Value};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let lua = Lua::new();
let utils = lua.create_table()?;
let double_fn = lua.create_function(|lua: &Lua, arg_0: i64| {
let res = arg_0 * 2;
res.into_lua(lua)
})?;
import asyncio
import base64
import json
import os
import pyaudio
from websockets.asyncio.client import connect
class SimpleGeminiVoice:
def __init__(self):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.22;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {VRFConsumerBaseV2Plus} from "@chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol";
import {VRFV2PlusClient} from "@chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol";