This file contains hidden or 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
| sudo apt purge 'nvidia*' -y | |
| sudo apt purge 'cuda*' -y | |
| sudo apt autoremove --purge -y | |
| dpkg -l | grep nvidia | |
| echo -e "blacklist nouveau\noptions nouveau modeset=0" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf | |
| sudo update-initramfs -u | |
| sudo rmmod nvidia_drm nvidia_modeset nvidia_uvm nvidia | |
| sudo sh cuda_13.1.1_590.48.01_linux.run --disable-nouveau --no-cc-version-check |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| (async () => { | |
| // Helper to wait a given number of milliseconds | |
| const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
| // Find all target elements with the specific outer div class | |
| const elements = Array.from(document.querySelectorAll( | |
| '.html-div.xdj266r.xat24cr.xexx8yu.xyri2b.x18d9i69.x1c1uobl.x6s0dn4.x78zum5.xl56j7k.x14ayic.xwyz465.x1e0frkt' | |
| )); | |
| console.log(`Found ${elements.length} elements. Starting from the last.`); |
This file contains hidden or 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
| from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline | |
| from peft import PeftModel | |
| base_model_id = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" | |
| peft_model_id = "maifeeulasad/askubuntu-model" | |
| model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto", trust_remote_code=True) | |
| model = PeftModel.from_pretrained(model, peft_model_id) | |
| tokenizer = AutoTokenizer.from_pretrained(base_model_id) |
This file contains hidden or 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
| setInterval(function () { | |
| const data = [] | |
| // all videos, we need to scroll to the bottom of the page to load all videos (manually) | |
| const videoLinks = document.querySelectorAll( | |
| 'a#video-title.yt-simple-endpoint.style-scope.ytd-playlist-video-renderer' | |
| ); | |
| videoLinks.forEach(videoLink => { | |
| const title = videoLink.getAttribute('title'); | |
| // we can do it for facebook as well :wink: |
This file contains hidden or 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
| //maybe the worst implementation | |
| const delay = ms => new Promise(res => setTimeout(res, ms)); | |
| for(let i=0;i<100;i+=1){ | |
| if(i%4===0){ | |
| console.log("4"); | |
| } | |
| if(i%7===0){ | |
| console.log("7"); | |
| } | |
| await delay(1000); |
This file contains hidden or 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
| import tensorflow as tf | |
| model = tf.keras.models.load_model('name_gender.h5') | |
| converter = tf.lite.TFLiteConverter.from_keras_model(model) | |
| tflite_model = converter.convert() | |
| open("converted_model.tflite", "wb").write(tflite_model) | |
This file contains hidden or 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
| for dirrr in $(find . -mindepth 1 -maxdepth 1 -type d \( -name "*" \) ) ; | |
| do | |
| echo $dirrr | |
| echo ############# | |
| cd $dirrr | |
| echo $(git remote show origin) | |
| echo ############# | |
| cd ../ | |
| done |
This file contains hidden or 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
| import contextlib | |
| import os | |
| import subprocess | |
| from datetime import datetime | |
| # performing git fsck(file system check) seems slower, so I mane this hack | |
| # still can be found on it's upstream or here : https://gist.github.com/neingeist/7d448e574e9da30b6bcd | |
| def git_directories(startdir): | |
| for dirpath, dirnames, _ in os.walk(startdir): |
This file contains hidden or 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
| flex lexer.l | |
| gcc lex.yy.c | |
| a.exe |
NewerOlder