Skip to content

Instantly share code, notes, and snippets.

View b1oki's full-sized avatar
🛠️
hard trying

Alexander Sobyanin b1oki

🛠️
hard trying
View GitHub Profile
@b1oki
b1oki / huggingface.py
Created March 25, 2025 00:17
Hugging Face API
HF_API_URL = "https://api-inference.huggingface.co/models/"
HF_API_TOKEN = os.getenv("HF_API_TOKEN") # Токен Hugging Face
HF_MODEL_NAME = "mistralai/Mistral-7B-Instruct-v0.3"
HF_GENERATION_SETTINGS = {
"max_length": 100,
"do_sample": True,
"top_p": 0.95,
"temperature": 0.9,
"repetition_penalty": 1.2,
}
@b1oki
b1oki / README.md
Last active December 28, 2023 18:03
Minecraft Java Server in Docker
@b1oki
b1oki / change_git_repository_email_for_work.py
Created July 28, 2020 12:32
Change git repository email for work
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import os
import logging
import git
logger = logging.getLogger('scratch')
logger.setLevel(logging.INFO)
@b1oki
b1oki / system_monitor.sh
Last active June 3, 2020 23:53
System Monitor (CPU average frequency, maximum temperature and free total memory)
#!/bin/bash
function cpufreq() {
cat /proc/cpuinfo | grep MHz | awk -F ': ' '{print $2}' | sort -u
}
function temperature() {
sensors | awk -F ':' '{print $2}' | awk '{print $1}' | grep "°C" | sed "s/+\|°C//g" | sort -u
}
@b1oki
b1oki / vpn-auto-reconnect.sh
Created May 20, 2020 18:35 — forked from numericOverflow/vpn-auto-reconnect.sh
Auto reconnect to OpenVPN via NetworkManager
#!/bin/bash +x
# Source: http://www.gabsoftware.com/tips/automatically-reconnect-to-your-vpn-on-linux/
# Description:
# Make the script executable "chmod +x /path/to/the/script.sh
# Put the script in .profile or .bashrc so it can be run on user login:
# Example: echo "/path/to/the/script.sh start &" >> .bashrc
# The script can be bound to shortcut keys with these commands:
# /path/to/the/script.sh start # starts and monitors VPN connection
resetQueue();
var PAUSE_INTERVAL = 500; //Wait for this many milliseconds between each request
function resetQueue() {
//Perform initial request
jQuery.get("https://store.steampowered.com/dynamicstore/userdata/", {t: new Date().getTime()}, function(data) {
// @xorbis: The data.rgIgnoredApps is now an object, should use Object.keys(data.rgIgnoredApps) instead.
var totalItems = data.rgIgnoredApps.length;
if (totalItems == 0) {
alert("There are no items in your Not Interested list.");
@b1oki
b1oki / benchmarks.txt
Last active February 20, 2017 19:18
Benchmarks
Ryzen Blender Test
X5450 + GTX 750 ... 02:48.98 time
7700K + HD 630 ... 01:06.87 time
7700K + GTX 750 ... 00:52.59 time
Cinebench OpenGL
X5450 + GTX 750 ... 59.77 fps ... Ref. Match 99.6 %
7700K + HD 630 ... 43.38 fps ... Ref. Match 97.7 %
7700K + GTX 750 ... 103.71 fps ... Ref. Match 99.6 %
[email protected] + GTX 750 ... 100.09 fps ... Ref. Match 99.6 %
@b1oki
b1oki / cleanup_updates_cache.cmd
Created February 9, 2017 21:37
Clean-up cache of Windows 10 updates
dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase/