Skip to content

Instantly share code, notes, and snippets.

# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@nate-dryer
nate-dryer / resume.json
Last active May 6, 2024 14:42
My Resume
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Nate Dryer",
"label": "Product Management Leader | Specializing in AI/ML Innovation, User-Centric Design, and Data-Driven Decision Making",
"image": "",
"email": "dryer.nathan@gmail.com",
"phone": "(626) 223-0106",
"url": "https://natedryer.com",
"summary": "I have 10+ years of experience delivering digital B2B and consumer-facing solutions across various industries, including mobile banking, healthcare tech, and user experience management. My passion is to build products that people love to use and want to buy, by understanding their needs, pain points, and preferences, and by applying data-driven insights and user-centric design principles. I have a strong background in UX and Artificial Intelligence / Machine Learning (AI/ML), and I have led cross-functional teams to successfully launch innovative AI-powered solutions.",
@fnky
fnky / ANSI.md
Last active May 6, 2024 14:41
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@alandsilva26
alandsilva26 / GCC.md
Last active May 6, 2024 14:40
Instructions for installing GCC Compiler on Windows

Installation

To check if GCC already exists by running the following command in your command promt gcc -v

  • Install MSYS2 MSYS2.

  • This will install the linux shell on your Machine.

  • Update packages and mirrors using pacman -Syu.

  • You may have to restart

  • To install GCC copy the following code and paste in the shell Ctrl + v might not work

  • Note: Keep pressing ENTER to select the default installation instructions.

@sloanlance
sloanlance / BASH: ISO 8601 Timestamp with Milliseconds
Last active May 6, 2024 14:40
How to get an ISO 8601 timestamp with milliseconds in BASH
Gist title: "BASH: ISO 8601 Timestamp with Milliseconds"
Summary: How to get an ISO 8601 timestamp with milliseconds in BASH
@Verssae
Verssae / skip.js
Last active May 6, 2024 14:40
한양대학교 인권/폭력예방 교육시스템 스킵 스크립트
/**
[강의 영상 스킵]
1. 재생버튼을 눌러 한양대 로딩 영상이 끝나고(약 4초) 강의가 재생된 후 F12 버튼을 눌러 개발자 콘솔을 연 뒤 console 탭으로 이동한다.
2. 아래 스크립트를 붙여넣는다.
3. 사이트에서 나갈 것이냐고 묻는 창이 뜨면 '나가기'를 누른다.
4. 다시 영상이 로드되면 재생 버튼을 눌러 재생하고 영상 끝으로 컨트롤 버튼을 움직여 영상 시청을 완료한다.
**/
@Sebazzz
Sebazzz / Bambu-X1C-end-gcode.gcode
Created July 16, 2022 10:11
Start and end gcode for Bambu Labs X1C
; WIPE_END
G1 E-.012 F1800
M106 S0
M106 P2 S0
M981 S0 P20000 ; close spaghetti detector
; FEATURE: Custom
; filament end gcode
;M106 P3 S0
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
@eguven
eguven / csgo_convars.md
Last active May 6, 2024 14:38
List of CS:GO Cvars

Generated from List of CS:GO Cvars on 2020-12-07.

Protocol version 13752 [1105/1105]
Exe version 1.37.5.2 (csgo)
Exe build: 16:34:06 May 7 2020 (7852) (730)

1941 convars total.
@DanAtkinson
DanAtkinson / Visual Studio solution file headers
Last active May 6, 2024 14:38 — forked from JamesSkemp/Visual Studio solution file headers
Visual Studio solution file headers - 2003, 2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, and 2022
== Visual Studio .NET 2003 (DO NOT COPY THIS LINE) ==
Microsoft Visual Studio Solution File, Format Version 8.00
# Visual Studio .NET 2003
VisualStudioVersion = 7.1
== Visual Studio 2005 (DO NOT COPY THIS LINE) ==
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
VisualStudioVersion = 8.0
@apjacob
apjacob / reco.py
Created May 4, 2024 15:53
ReCo Algorithm
import numpy as np
from typing import List
import time
def safelog(x):
"""
Function to safely compute the logarithm of x. If x is less than a very small positive number (EPS),
the logarithm of EPS is returned to avoid division by zero errors.
"""
EPS = 1e-60