Skip to content

Instantly share code, notes, and snippets.

@vgel
vgel / r1.py
Last active March 25, 2025 12:19
script to run deepseek-r1 with a min-thinking-tokens parameter, replacing </think> with a random continuation string to extend the model's chain of thought
import argparse
import random
import sys
from transformers import AutoModelForCausalLM, AutoTokenizer, DynamicCache
import torch
parser = argparse.ArgumentParser()
parser.add_argument("question", type=str)
parser.add_argument(
@slowkow
slowkow / needleman-wunsch.py
Last active March 25, 2025 12:19
A simple version of the Needleman-Wunsch algorithm in Python.
#!/usr/bin/env python
"""
The Needleman-Wunsch Algorithm
==============================
This is a dynamic programming algorithm for finding the optimal alignment of
two strings.
Example
-------
@owent
owent / test_backtrace.cpp
Last active March 25, 2025 12:16
test_backtrace
/**
* traceback for cpp
*
* Created on: 2018-01-27
* Author: owent
*
* Released under the MIT license
*
* @note Required flag -rdynamic or addr2line to get the function name when using gcc/clang in unix like system
* @note Using addr2line -Cfpe <exe_path> [func_addr...] for more detail when using gcc/clang
@MokshSharma06
MokshSharma06 / DP-900.md
Created March 25, 2025 12:14 — forked from j-thepac/DP-900.md
Material for Dp-900 Exam

DP 900

Azure Data Fundamentals: Explore core data concepts

  • Type: structured, semi-structured, or unstructured.
  • Data stores : File stores ,Databases
  • file Formats :
    • Delimited text files
    • JavaScript Object Notation (JSON)
    • Extensible Markup Language (XML)
  • Optimized File Format
@j-thepac
j-thepac / DP-900.md
Last active March 25, 2025 12:14
Material for Dp-900 Exam

DP 900

Azure Data Fundamentals: Explore core data concepts

  • Type: structured, semi-structured, or unstructured.
  • Data stores : File stores ,Databases
  • file Formats :
    • Delimited text files
    • JavaScript Object Notation (JSON)
    • Extensible Markup Language (XML)
  • Optimized File Format
\
aacomtr_Gzip
aacomtr_Gzip_g
AA-Gzip
AB-API-Account-Access-Token
AB-API-Auth-Name
AB-API-Auth-Password
AB-API-Auth-Token-Facebook
AB-API-Community-ID
AB-API-Company-ID
@SapphicMoe
SapphicMoe / pds.md
Last active March 25, 2025 12:13
This is a very quick guide detailing how to set up a Bluesky PDS (Personal Data Server) using Docker Compose and Caddy.

Bluesky PDS using Docker Compose + Caddy

This is a very quick guide detailing how to set up a Bluesky PDS (Personal Data Server) using Docker Compose and Caddy.

For any questions, leave a comment on this GitHub Gist below, contact me on Bluesky at @sapphic.moe, or leave an email at [email protected]

Note

This guide assumes your website is behind Cloudflare.

Prerequisites

@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active March 25, 2025 12:13
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9
@marshalhayes
marshalhayes / Tailwind.targets
Last active March 25, 2025 12:13
Using Tailwind the right way for .NET
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file exposes the following parameters -->
<!-- TailwindVersion: The version of the Tailwind Standalone CLI to download. -->
<!-- TailwindDownloadPath: The path to where to download the Tailwind Standalone CLI. This property is optional, and defaults to %LOCALAPPDATA% on Windows, and $XDG_CACHE_HOME on Linux and MacOS. -->
<!-- TailwindInputStyleSheetPath: The path to the input stylesheet. -->
<!-- TailwindOutputStyleSheetPath: The path to the output stylesheet. -->
<!-- TailwindOptimizeOutputStyleSheet: Whether to optimize the output stylesheet. This property is optional, and defaults to false. -->
<!-- TailwindMinifyOutputStyleSheet: Whether to minify the output stylesheet. This property is optional, and defaults to false when Configuration is Debug, and true when Configuration is Release. -->
<!-- TailwindDownloadUrl: The URL to the Tailwind Standalone CLI. This property is optional, and defau
@ekumachidi
ekumachidi / gist:aac9316496fb2ca84dcef00920fede9b
Created May 28, 2016 15:00
Create new postgres super user
Run this
"sudo -u postgres psql"
in your terminal to get into postgres
postgres=#
Run "CREATE USER new_username;"
Note: Replace new_username with the user you want to create,