This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install miniconda https://docs.conda.io/projects/miniconda/en/latest/ | |
install git https://git-scm.com/downloads | |
conda create -n textgen python=3.10.9 | |
conda activate textgen | |
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 | |
git clone https://github.com/oobabooga/text-generation-webui | |
cd text-generation-webui | |
pip install -r requirements.txt | |
python server.py | |
# download model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
output_file="combined.txt" | |
# Create an empty output file | |
> "$output_file" | |
for file in *.txt; do | |
# Determine the encoding of the file | |
encoding=$(file -i "$file" | awk -F'=' '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Homebrew | |
Git cli | |
Chrome + extensions | |
Sublime Text | |
VScode + Extensions | |
Node, NPM, nvm | |
Yarn | |
Serve - https://github.com/vercel/serve/ | |
Openshift cli | |
Python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
set "outputFile=files_list.txt" | |
:: Change the code page to UTF-8 to handle Cyrillic characters | |
chcp 65001 | |
if exist "%outputFile%" ( | |
del "%outputFile%" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code: | |
VSCode, Git, Node, NVM, PuTTY | |
Notepad++, Sublime | |
Foobar, VLC, 7z, Steffen Gerlach Scanner | |
TG, Discord | |
FireFox, Chrome (OneTab, Adblock, React devtools, Grid Ruler, Measure dimensions, FullPage) | |
f.lux (or use built-in nightshift feature in win10) | |
Paint NET | |
Libre Office |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ES7+ React/Redux/React-Native snippets: | |
dsznajder.es7-react-js-snippets | |
ESLint: | |
dbaeumer.vscode-eslint | |
More human-friendly TS errors: | |
https://github.com/yoavbls/pretty-ts-errors | |
Prettier - Code formatter: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shuffle(arr) { | |
for (let i = arr.length - 1; i > 0; i--) { | |
const j = Math.floor(Math.random() * (i + 1)); | |
[array[i], array[j]] = [array[j], array[i]]; | |
} | |
return arr; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Given two strings find characters present in both. E.g, for "harpoon" and "countryside", the answer is "nro". | |
#https://www.talentrider.com | |
def intersection(a, b): | |
return ''.join(set(a) & set(b)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple silent alarm widget for windows | |
# Set time in seconds and text below or pass them in cmd like this: python timer 5 hello | |
import sys | |
import time | |
from tkinter import * | |
from tkinter.messagebox import showinfo | |
if (len(sys.argv) > 1): | |
delay = float(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="gc" height="600" width="600" style="margin:auto; display: block;"></canvas> | |
<script type="text/javascript"> | |
window.onload = function() { | |
canvas = document.getElementById('gc'); | |
context = canvas.getContext('2d'); | |
document.addEventListener('keydown', keyPush); | |
setInterval(game, 40); | |
} | |
let movX = 0; |
NewerOlder