Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Define the Python executable path
PYTHON_PATH="/home/ubuntu/miniconda3/envs/mindsearch/bin/python"
# Define the MindSearch directory
MINDSEARCH_DIR="/home/ubuntu/ai/MindSearch"
# Function to create the command
create_command() {
#!/bin/bash
cd csv
for csvfile in *.csv; do
dirname="${csvfile%.csv}"
mkdir -p "../$dirname"
aria2c --dir="../$dirname" --input-file="$csvfile"
done
cd ..
@sitex
sitex / gist:dd187a6d764337f70b08f127d5e132f1
Created September 16, 2023 00:49
SOLVED: Docker Stuck in Starting Mode
https://www.youtube.com/watch?v=dYiPms0xnIE
<?php
if (($handle = fopen("123.csv", "r")) !== FALSE) {
$filename = '123';
$text = '';
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$time = explode(';', $data[1]);
array_pop($time);
$time = implode(':', $time);
$text .= "{$time}\t{$data[3]}\n";
}
# pip install git+https://github.com/huggingface/transformers --force-reinstall
# pip install git+https://github.com/bayartsogt-ya/whisper-multiple-hf-datasets
from multiple_datasets.hub_default_utils import convert_hf_whisper
convert_hf_whisper("mitchelldehaven/whisper-large-v2-ru", "large-v2-ru.pt")
# We also provide a script to convert any Whisper models compatible with the Transformers library. They could be the original OpenAI models or user fine-tuned models.
# For example the command below converts the original "large-v2" Whisper model and saves the weights in FP16:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sitex
sitex / День Банана - А.md
Last active April 10, 2021 21:36
День Банана - А.md

A.

А знаете, я никогда не видел ни Скальпеля, ни Девочку, Только в страшных полноцветных снах. Как и они меня. Но узнать их среди толпы встречающих в аэропорту труда не составило. Они стояли на полу из больших белых и черных плит, одетые просто как подростки-фрики, и выглядели они полными отморозками. Я их себе такими и представлял.

На Скальпеле были оранжевые очки, которые бликовали безумными электрическими зайчиками, а Девочка шныряла голыми глазами по толпе, вывалившей с токийского рейса. Ее расширенные зрачки остановились на мне, она захохотала и, толкнув Скальпеля локтем, показала на меня пальцем. Они меня узнали без фотографии и таблички с именем - не удивительно, мы втроем уже больше года находимся в тесном электронном контакте, а ведь, как известно, в сети ты создаешь свой самый несуразный и нереальный образ, который чаще и оказывается подлинным, таким, по которому тебя узнают в аэропорту люди, ни разу тебя не видевшие.

Они пошли ко мне, а я к ним, но я, блин, двигаюсь медленнее, потому что тапки

@sitex
sitex / course.html
Last active September 2, 2020 15:55
course.html
<script>
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}
function nav(step) {
var re = new RegExp(escapeRegExp(document.getElementById("videoTitle").innerText), 'g')
var num = sources.findIndex(function(el) {
return re.test(el);
})
@sitex
sitex / convertToKeyframe.jsx
Created March 18, 2020 23:16
Bulk Convert Expressions to Keyframes for Selected Layers
function convertToKeyframes(theProperty) {
if (theProperty.canSetExpression && theProperty.expressionEnabled) {
theProperty.selected = true;
app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));
theProperty.selected = false;
}
}
var selectedLayers = app.project.activeItem.selectedLayers
@sitex
sitex / centerAnchorPoint.jsx
Created March 18, 2020 23:12
centerAnchorPoint.jsx
function centerAnchorPoint( layer ){
var comp = layer.containingComp;
var curTime = comp.time;
var layerAnchor = layer.anchorPoint.value;
var x;
var y;
try{
x = layer.sourceText.value.boxTextSize[0]/2;