Skip to content

Instantly share code, notes, and snippets.

View Underdoge's full-sized avatar
🏠
Working from home

Underdoge Underdoge

🏠
Working from home
View GitHub Profile
@Underdoge
Underdoge / imdb_ratings.py
Last active September 23, 2023 04:15
Write IMDb ratings into m3u movie list
from bs4 import BeautifulSoup
import re
import requests
import pandas as pd
import getopt
import sys
import unidecode as ud
def mainSearch(titleURL, headers):
@Underdoge
Underdoge / config.json
Last active May 6, 2023 17:10
config.json file for undertweet
{
"dalle": {
"api_url": "https://backend.craiyon.com/generate",
"api_request_timeout": 210,
"generate_request_timout": 360,
"retry_delay": 5
},
"openAI":{
"api_generations_url": "https://api.openai.com/v1/images/generations",
"api_variations_url": "https://api.openai.com/v1/images/variations"
@Underdoge
Underdoge / hlpvitem.py
Last active December 3, 2022 22:51
Weechat hlpvitem.py script fixed for python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2014 Sébastien Helleu <flashcode@flashtux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@Underdoge
Underdoge / announce_url_title.py
Last active December 2, 2022 23:15
Weechat announce_url_title.py fixed for python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009 by xt <xt@bash.no>
# Borrowed parts from pagetitle.py by xororand
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@Underdoge
Underdoge / SSNMX_catalogo_19010901_20220909_m55_99-SSNMX_catalogo_19010901_20220909_m55_99
Last active September 20, 2022 05:49
Sismos en México del 9 de diciembre de 1901 al 25 de mayo de 2022
Fecha,MES,Hora,Magnitud,Latitud,Longitud,Profundidad,Referencia de localizacion,Fecha UTC,Hora UTC,Estatus
1901-12-08,DICIEMBRE,20:17:00,7,26,-110,33,"83 km al OESTE de AHOME, SIN",1901-12-09,2:17:00,revisado
1902-01-16,ENERO,17:19:00,7,17.62,-99.72,33,"21 km al OESTE de ZUMPANGO DEL RIO, GRO",1902-01-16,23:19:00,revisado
1902-04-18,ABRIL,20:23:00,7.5,14.9,-91.5,25,"72 km al ESTE de CACAHOATAN, CHIS",1902-04-19,2:23:00,revisado
1902-09-23,SEPTIEMBRE,14:18:00,7.7,16.5,-92.5,25,"5 km al SUROESTE de TEOPISCA, CHIS",1902-09-23,20:18:00,revisado
1902-12-12,DICIEMBRE,17:10:00,7.1,29,-114,33,"115 km al NORTE de GUERRERO NEGRO, BCS",1902-12-12,23:10:00,revisado
1903-01-13,ENERO,19:47:36,7.6,15,-93,33,"50 km al SUR de MAPASTEPEC, CHIS",1903-01-14,1:47:36,revisado
1905-10-24,OCTUBRE,11:40:00,6.6,20,-110,33,"320 km al SUR de CABO SAN LUCAS, BCS",1905-10-24,17:40:00,revisado
1905-12-16,DICIEMBRE,23:27:00,7.1,17,-113,33,"727 km al SUROESTE de CABO SAN LUCAS, BCS",1905-12-17,5:27:00,revisado
1906-04-10,ABRIL,15:18:00,7.1,2
@Underdoge
Underdoge / shapeArea.js
Last active April 7, 2021 23:13
shapeArea
function shapeArea(n) {
return 2*Math.pow(n,2) - 2*n +1;
}
@Underdoge
Underdoge / isIPv4Address.js
Created March 3, 2017 08:44
isIPv4Address
function isIPv4Address(inputString) {
return /^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/.test(inputString);
}
@Underdoge
Underdoge / commonCharacterCount.js
Created February 25, 2017 23:26
commonCharacterCount
function commonCharacterCount(s1, s2) {
var string1=s1.split('');
var string2=s2.split('');
var common=0;
for(var i=0;i<string1.length;i++){
if(string2.indexOf(string1[i])>=0){
common++;
string2.splice(string2.indexOf(string1[i]),1);
}
@Underdoge
Underdoge / preventbinginstall.reg
Created January 29, 2020 05:23
Registry file to exclude the extension for Microsoft Search in Bing from being installed on Google Chrome
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate]
"preventbinginstall"=dword:00000001
@Underdoge
Underdoge / allLongestStrings.js
Created February 25, 2017 23:09
allLongestStrings
function allLongestStrings(inputArray) {
var result=[""];
var count=0;
for(var i=0;i<inputArray.length;i++){
if(inputArray[i].length>=result[result.length-1].length){
if(inputArray[i].length>result[result.length-1].length)
count=1;
else
count++
result.push(inputArray[i]);