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
| //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
| 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
| 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
| (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.`); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer