Skip to content

Instantly share code, notes, and snippets.

View paulonteri's full-sized avatar
💻
Building

Paul Onteri paulonteri

💻
Building
View GitHub Profile
@paulonteri
paulonteri / convert.py
Created April 5, 2024 08:01
Convert videos in working folder for Audi MMI
import subprocess
import os
def convert_videos(folder_path):
# Change the current working directory to the target folder
os.chdir(folder_path)
# List all files in the current directory
files = os.listdir(".")
@paulonteri
paulonteri / leetcode_scrape.js
Created April 30, 2024 19:16
Leetcode Scraper
const axios = require('axios');
let data = JSON.stringify({
query: `query questionContent($titleSlug: String!) {
question(titleSlug: $titleSlug) {
content
mysqlSchemas
dataSchemas
questionId
questionFrontendId
title

Problem

I was training a deep learning model on Google Colab. I had to go somewhere for an emergency work. When I came back, I realized that Colab was disconnected; Therefore, I had to run the whole model again.

Solution

I searched on the Internet to solve this problem. I noticed that Colab will be disconnected if you don't click on the page. Here is an answer that I find:

function ClickConnect() {
  console.log('Working')
 document