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 asyncio | |
import math | |
from typing import Any, Final | |
import aiohttp | |
earth_radius: Final[str] = 6_371 # km | |
host: str = "https://nominatim.openstreetmap.org/" | |
endpoint: str = "/search" | |
global_parameters: dict[str, Any] = { |
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
# This script sorts your playlist into a new playlist by energy and danceability, two features given by Spotify. | |
# More info here https://developer.spotify.com/documentation/web-api/reference/get-several-audio-features | |
# STEP 0: pip install spotipy | |
# STEP 1: Create an Spotify Developer APP here https://developer.spotify.com/dashboard/create and create an API | |
# Input Variables - Fill these out and run | |
YOUR_APP_CLIENT_ID = "YOUR_APP_CLIENT_ID" | |
YOUR_APP_CLIENT_SECRET = "YOUR_APP_CLIENT_SECRET" |
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 requests | |
import json | |
import os | |
import time | |
# Constants for the Mega API endpoints and parameters | |
API_BASE_URL = "https://g.api.mega.co.nz/cs" | |
LS_ENDPOINT = "/fs/ls" | |
MKDIR_ENDPOINT = "/fs/mkdir" | |
MV_ENDPOINT = "/fs/mv" |
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
# Author: Antonio Rodríguez (@musantro) | |
# Date: 2022-01-28 | |
# This code is licensed under the terms of the MIT license | |
import obspython as obs | |
import irsdk | |
interval = 3 | |
on_track_scene_prop = "" | |
off_track_scene_prop = "" |
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
// Copy all lines from this code, open a tab and go to GAIA You & Me Section and | |
// paste it into Console of Google Chrome (Press F12 to show the Console), and press ENTER. | |
// enjoy #Gaians :) | |
var i = 1; // set your counter to 1 | |
function myLoop () { // create a loop function | |
setTimeout(function () { // call a 3s setTimeout when the loop is called | |
var element = document.querySelectorAll('.follow.ng-scope .follow-link'); | |
element[0].click() // your code here |
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
// Copy & Paste this into your console using F12 in this page: | |
// https://www.facebook.com/yourFacebookPage/insights/?section=navPosts | |
// It console.table you your best posts sorted by Engagement Ratio | |
const pubs = document.querySelectorAll('._5kn3.ellipsis'); | |
const title = document.querySelectorAll("._5591"); | |
const date = document.querySelectorAll('._5k4c > :first-child'); | |
titles = []; | |
title.forEach(item => titles.push(item.innerText)); |
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
@echo off | |
:: set folder path | |
set dump_path=E:\musan\Downloads\Contenedor | |
:: set min age of files and folders to delete | |
set max_days=15 | |
:: remove files from %dump_path% | |
forfiles -p %dump_path% -m *.* -d -%max_days% -c "cmd /c del /q @path" |
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
function drop(arr, func) { | |
// Drop them elements. | |
var length = arr.length; | |
for(i=0;i<=length;i++){ | |
if(func(arr[0])){ | |
return arr; | |
} | |
console.log(arr); | |
arr.shift(); | |
if(arr.length === 0){ |
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
function smallestCommons(arr) { | |
arr.sort(); | |
var first = arr[0]; | |
var last = arr[1]; | |
var multiplier = 1; | |
var bool = []; | |
var multiple = 0; | |
while(bool.length < last){ | |
bool = []; |