Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
from sklearn.feature_selection import mutual_info_regression
from talib import WMA
from dcor import distance_correlation as dcor
from joblib import Parallel, delayed, Memory, cpu_count
from numpy_ext import rolling_apply
import numpy as np
from fml.utils import get_name
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active June 21, 2025 06:30
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }

Claude Code PR Comment Resolution System Prompt

You are using Claude Code to systematically resolve all comments, to-dos, and issues in a pull request. Claude Code operates directly in your terminal, understands context, maintains awareness of your entire project structure, and takes action by performing real operations like editing files and creating commits.

Context Awareness

Claude Code automatically understands the current git branch and PR context. You don't need to specify which PR you're working on - Claude Code will:

  • Detect the current branch
  • Understand associated PR context
@why-not
why-not / gist:4582705
Last active June 21, 2025 06:24
Pandas recipe. I find pandas indexing counter intuitive, perhaps my intuitions were shaped by many years in the imperative world. I am collecting some recipes to do things quickly in pandas & to jog my memory.
"""making a dataframe"""
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'))
"""quick way to create an interesting data frame to try things out"""
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd'])
"""convert a dictionary into a DataFrame"""
"""make the keys into columns"""
df = pd.DataFrame(dic, index=[0])
@zparnold
zparnold / one_liner.sh
Last active June 21, 2025 06:24
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@jinjier
jinjier / javdb-top250.md
Last active June 21, 2025 06:11
JavDB top 250 movies list. [Updated on 2025/06]
@brianjbayer
brianjbayer / gist-unlocking-the-secrets-of-rails-secrets-and-credentials.md
Last active June 21, 2025 06:07
A comprehensive examination of Rails Secrets, Credentials, and Secret Key Base

Unlocking the Secrets of Rails Secrets and Credentials

Interurban Tunnel at Blackhand Gorge- Brian J Bayer


If you are like many (most?) of us, you have encountered Rails Credentials/Secrets and secret_key_base and may have been left a bit (or more) confused.

This post is an attempt to remove some of that confusion by

@liuran001
liuran001 / config.yaml
Last active June 21, 2025 05:57
mihomo (Clash Meta) 懒人配置
# AFF
# 如果你想支持我,可以通过我的邀请链接购买机场
# 感谢支持
# 1. 倾城极速 邀请码: 0jiB5uAA https://qcjs.ovh/#/register?code=0jiB5uAA
# 2. superbiu 邀请码: fACfjKC8 https://superbiu.com/#/register?code=fACfjKC8
# 一定要填我的邀请码,不填我哭给你看😭
# mihomo (Clash Meta) 懒人配置
# 版本 V1.21-250619
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active June 21, 2025 05:53
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.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy