Skip to content

Instantly share code, notes, and snippets.

View asukharev's full-sized avatar

Alexander Sukharev asukharev

View GitHub Profile
@pszemraj
pszemraj / hf_repo_download.py
Last active January 23, 2024 07:15
huggingface hub - download a full snapshot of a repository without using git
"""
hf_hub_download.py
This script allows you to download a snapshot repository from the Hugging Face Hub to a local directory without needing Git or loading the model.
Usage:
python hf_hub_download.py <repo_id> [options]
Arguments:
<repo_id> Repository ID in the format "organization/repository".
@Mostly-BSD
Mostly-BSD / FreeBSD-Nvidia-510.md
Last active February 23, 2025 15:52
Step-by-step instructions on installing the latest NVIDIA drivers on FreeBSD 13.0 and above.

How to get the Latest NVIDIA drivers on FreeBSD

Step-by-step instructions on installing the latest NVIDIA drivers on FreeBSD 13.0 and above.

1.0 Clean Up Existing Drivers

IMPORTANT: Log out of X session. Make sure you Desktop Manager (sddm|slim) is off. You need to be on the console.

# Create a boot env incase we need to rollback
sudo bectl create `date +%Y%m%d`-BeforeNvidia-Upgrade
@tudo75
tudo75 / nvidia-smi-queries.md
Last active March 14, 2024 22:17
Useful nvidia-smi queries

Useful nvidia-smi Queries

Updated 11/06/2017 07:32 AM

What are useful nvidia-smi queries for troubleshooting?

VBIOS Version

Query the VBIOS version of each device:

@lighth7015
lighth7015 / README.md
Last active December 25, 2023 16:11
GDI inspired graphics wrapper for XCB

GDI-style XCB wrapper

A drawing library modeled after Windows GDI

Features

  • CreateDC/ReleaseDC
  • DrawText
  • DrawRect
@ctsrc
ctsrc / README.md
Last active February 1, 2025 12:12 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
@lincalinca
lincalinca / m4b.sh
Last active May 29, 2024 08:59 — forked from anonymous/mp4.sh
Merge multiple mp3 or m4a files as a chaptered m4b file
#! /usr/bin/env bash
####################################################
# Required Libraries
#
# library name | commands used | verified version
# ------------------------------------------------
# ffmpeg | ffmpeg/ffprobe | 3.1.4 3.2
# gpac | mp4box | 0.6.1
# mp4v2 | mp4chaps | 2.0.0
#define _GNU_SOURCE
#include <assert.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <string.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>

Settable via /etc/sysctl.conf:

integer kern.maxvnodes

Target for maximum number of vnodes

integer kern.maxfiles

Maximum number of files

integer kern.securelevel

Current secure level

@butuzov
butuzov / mp3 to m4b.md
Created August 10, 2018 06:07
Convert mp3's to m4b using `ffmpeg`

Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).

URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL
@gelldur
gelldur / .clang-format
Last active March 1, 2025 18:47
My clang format file. In sample.cpp is sample output
# Checkout config tool: https://zed0.co.uk/clang-format-configurator/
# Or http://cf.monofraps.net/
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# https://github.com/01org/parameter-framework/blob/master/.clang-format
# Tested on: clang-format version 6.0.1
# Common settings
BasedOnStyle: WebKit