Skip to content

Instantly share code, notes, and snippets.

View seyfer's full-sized avatar
💭
pet the duck until exploded

Oleg Abrazhaev seyfer

💭
pet the duck until exploded
View GitHub Profile
@mlabonne
mlabonne / merge_peft.py
Last active March 23, 2024 22:47
Merge base model and peft adapter and push it to HF hub
# Example usage:
# python merge_peft.py --base_model=meta-llama/Llama-2-7b-hf --peft_model=./qlora-out --hub_id=alpaca-qlora
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import argparse
def get_args():
@seyfer
seyfer / snippet of package.json scripts
Created February 4, 2021 17:26 — forked from educkf/snippet of package.json scripts
Sample Split Vue Config Files
"scripts": {
"serve": "vue-cli-service serve",
"build:admin": "rimraf vue.config.js && copy vue.configAdmin.js vue.config.js && vue-cli-service build --dest dist/admin src/admin/main.js && rimraf vue.config.js && copy vue.configDefault.js vue.config.js",
"build:client": "rimraf vue.config.js && copy vue.configClient.js vue.config.js && vue-cli-service build --dest dist/client src/client/main.js && rimraf vue.config.js && copy vue.configDefault.js vue.config.js",
"lint": "vue-cli-service lint"
},
@Raistlfiren
Raistlfiren / Dockerfile
Last active August 14, 2023 19:02
XDebug 3 and Docker Reference
FROM php:7.4-cli-alpine
# Install xdebug
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del .phpize-deps
WORKDIR /var/www/html
@seyfer
seyfer / gource.sh
Last active November 18, 2020 14:05 — forked from cgoldberg/gource.sh
Gource - Mir development video
# install bzr and gource
# get a branch of Mir's trunk code
# create gource video
$ sudo apt-get install bzr gource
$ bzr branch lp:mir
$ cd mir
$ gource \
-s .06 \
HTML
- Semantic HTML
- Event delegation
- Accessibility / ARIA
CSS
- Specificity
- Pseudo-elements
- Pseudo-selectors
- Combinators
Data Structures
- Stacks
- Queues
- Linked lists
- Graphs
- Trees
- Tries
Concepts
- Big O Notation
@leopoldodonnell
leopoldodonnell / Readme.md
Last active April 9, 2024 07:44
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@IMelker
IMelker / code_format.sh [recursive clang-format]
Last active July 26, 2019 08:45
clang-format wrapper for multifile ussage [cpp]
#!/bin/bash
# ------------------------------------------------------------
# Recursive cpp code formatter based on clang-format
# For base work there is you need to have .clang-format file
#
# USAGE code_format.sh [clang-format-options] [<file|dir> ...]
#
# clang-format-options passes through to clang-format
# ------------------------------------------------------------
@educkf
educkf / snippet of package.json scripts
Last active November 25, 2022 01:40 — forked from ejlofgren/snippet of package.json scripts
Sample Split Vue Config Files
"scripts": {
"serve": "vue-cli-service serve",
"build:admin": "rimraf vue.config.js && copy vue.configAdmin.js vue.config.js && vue-cli-service build --dest dist/admin src/admin/main.js && rimraf vue.config.js && copy vue.configDefault.js vue.config.js",
"build:client": "rimraf vue.config.js && copy vue.configClient.js vue.config.js && vue-cli-service build --dest dist/client src/client/main.js && rimraf vue.config.js && copy vue.configDefault.js vue.config.js",
"lint": "vue-cli-service lint"
},
@ejlofgren
ejlofgren / snippet of package.json scripts
Last active December 14, 2021 11:43
Sample Split Vue Config Files
"scripts": {
"serve": "vue-cli-service serve",
"buildAdmin": "vue-cli-service build --dest dist/admin src/entries/admin_app_entry.js",
"buildMain": "vue-cli-service build --dest dist/public src/entries/main_app_entry.js",
"lint": "vue-cli-service lint"
},