Skip to content

Instantly share code, notes, and snippets.

View ewauq's full-sized avatar
💭
ouais

Emilien ewauq

💭
ouais
View GitHub Profile
@ewauq
ewauq / remove_duplicates.py
Created June 18, 2021 13:54
Remove duplicates from a list
my_list = ["AAAA", "BBBBB", "CCCC", "AAAA", "CCCC"]
print(list(set(my_list)))
> ['AAAA', 'CCCC', 'BBBBB']
@ewauq
ewauq / rym-genres.txt
Created April 23, 2021 16:53
RYM - RateYourMusic full genres list (2021)
16-bit
2-step
2 tone
aak
abkhazian folk music
aboio
aboio cantado
abstract hip hop
a cappella
acidcore
@ewauq
ewauq / build_rank.py
Last active April 15, 2021 10:12
Build a ranking on child items based on a parent item in a pandas DataFrame
import pandas as pd
# Consider a list of movies with unranked actors that you want to rank based on the source list order below.
# [movie_id, actor_id]
movies_list = [
[123, 54],
[123, 21],
[123, 66],
[45, 22],
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_extension('<nom de votre extension>.crx')
browser = webdriver.Chrome(executable_path=r"<votre exécutable ChromeDriver>", chrome_options=chrome_options)
chrome.webRequest.onBeforeRequest.addListener(function(details) {
if(details.url.indexOf(".monsupersite.fr/public/css/") != -1) return { cancel: true }
return { cancel: details.url.indexOf(".monsupersite.fr") == -1 }
},
{
urls: [
"http://*/*",
"https://*/*"
chrome.webRequest.onBeforeRequest.addListener(function(details) {
return { cancel: details.url.indexOf(".monsupersite.fr") == -1 }
},
{
urls: [
"http://*/*",
"https://*/*"
]
}, ["blocking"]);
{
"name": "Optiscrap",
"version": "0.1",
"manifest_version": 2,
"description": "Block all useless things to speed up the scraping process.",
"background": {
"scripts": [ "background.js" ]
},
"icons": {
"128" : "images/icon.png"
@ewauq
ewauq / logitech-bind-f13-f24.lua
Last active October 9, 2024 21:26
How to: Bind F13 to F24 keys on the G-keys (Logitech Gaming Keyboards)
-- How to use this script:
-- 1. Install the Logitech Gaming Software: http://support.logitech.com/en_us/software/lgs
-- 2. Launch it, and right click on your profile (the gear icon) and then click on "Scripts".
-- 3. Add the following code into the Script window, save it, and close it. Enjoy.
-- Now G1 is bound to F13, G2 to G14, ... G12 to F24.
function OnEvent(event, arg)
-- OutputLogMessage("event = %s, arg = %s\n", event, arg)