Skip to content

Instantly share code, notes, and snippets.

View Black-Milk's full-sized avatar
🐇
It’s turtles all the way down…

Edwin M. Black-Milk

🐇
It’s turtles all the way down…
View GitHub Profile
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active May 18, 2025 00:16
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@Nick-Harvey
Nick-Harvey / pipeline.py
Created March 17, 2020 18:28
Pipeline.py from Pachyderm Kubeflow Example
#!/usr/bin/env python3
import os
import json
import kfp
import kfp.dsl
import kfp.components
from kubernetes.client.models import V1EnvVar
@cyroxx
cyroxx / StringMatch.py
Created November 19, 2019 21:50 — forked from black-tea/StringMatch.py
StringMatch: A class for matching one list of strings to another
# Load libraries
import re
import time
import operator
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from scipy.sparse import csr_matrix
import pandas as pd
@Black-Milk
Black-Milk / install_linux_gcc_48.sh
Created November 7, 2019 03:52
Install GCC 4.8 for Linux without Root
#!/bin/bash
INSTALL_PATH=<your_local_install_path_goes_here>
curl -LO https://mirrors.kernel.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2
tar xf gcc-4.8.5.tar.bz2
mkdir build
@ines
ines / streamlit_prodigy.py
Created October 3, 2019 20:37
Streamlit + Prodigy
"""
Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you
run simple training experiments for NER and text classification.
Requires the Prodigy annotation tool to be installed: https://prodi.gy
See here for details on Streamlit: https://streamlit.io.
"""
import streamlit as st
from prodigy.components.db import connect
from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size
@GermaniumSystem
GermaniumSystem / pwnagotchi notes
Last active April 30, 2025 16:04
How to set up a pwnagotchi in 25* simple steps.
Preface:
I have no idea if any of this is the "right" way of doing it. This is just how I got my unit working.
Good luck.
WARNING: Do not use a V1 Waveshare display module with a stock pwnagotchi! The pwnagotchi expects a V2 module, and may irreparably damage a V1 module!
A V1 display module *can* work, but you must modify `waveshare.py` and `display.py` beforehand. For the time being, this is left as an exercise for the reader.
If you have already burnt a V1 display, try disconnecting it from the Pi and leaving it overnight. This may rejuvenate the display somewhat, but it will likely still display signs of damage.
Installation:
1. `dd` Raspbian Lite to an SD card.
# https://hakibenita.com/fast-load-data-python-postgresql
from typing import Iterator, Dict, Any, Optional
from urllib.parse import urlencode
import datetime
#------------------------ Profile
import time
@mmeendez8
mmeendez8 / db_session.py
Created November 27, 2018 11:41
Teradata access using python 3.5, pyodbc, pandas and fastload
import pyodbc
from subprocess import run, CalledProcessError
import os
from string import Template
import pandas as pd
''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'''
''' DATABASE CONNECTION FILE (keep it simple) '''
''' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'''
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ElToro1966
ElToro1966 / r_ubuntu_18_04.sh
Last active April 25, 2025 23:32 — forked from pachadotdev/r_ubuntu_17_10.sh
Install R and RStudio on Ubuntu 18.04 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5001-amd64.deb
sudo gdebi rstudio-1.2.5001-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile