Skip to content

Instantly share code, notes, and snippets.

@vgel
vgel / r1.py
Last active August 14, 2025 13:13
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(
@begoon
begoon / gist:3252006
Created August 3, 2012 22:08
Русско-английский словарь деловой переписки
  1. Господи, это опять вы.... - Thank you very much for your email.
  2. Если до завтра не предоставите документы, пеняйте на себя. Тут вам не детский сад.- We will do our best to proceed with your request however for the best result the documents should reach us not later than tomorrow.
  3. Вы читать умеете? - You can find this information below.
  4. Сколько можно напоминать!- Kind reminder
  5. Неужели так сложно подписать документ там, где нужно - Please sign in the place marked with yellow sticker
  6. Что у тебя в школе было по математике? - Let's reconfirm the figures.
  7. Мы лучше сделаем это сами.- Thank you for your kind assistance.
  8. Я уже сто раз вам это присылал. - Kindly find attached.
  9. Ага, сейчас все брошу и побегу разбираться. - I’ll look into it and revert soonest.
  10. Да поймите же вы наконец - Please kindly review the matter again.
@necolas
necolas / snippet.js
Created June 14, 2011 20:36
Optimised async loading of cross-domain scripts
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],