Skip to content

Instantly share code, notes, and snippets.

View djsegal's full-sized avatar

djsegal

  • home
View GitHub Profile
@djsegal
djsegal / 10000-MTV-Music-Artists-page-1.csv
Created October 13, 2020 22:29 — forked from mbejda/10000-MTV-Music-Artists-page-1.csv
10,000 MTV's Top Music Artists. Great dataset for machine learning, research and analysis. (name,facebook,twitter,website,genre,mtv).
name facebook twitter website genre mtv
Adele http://www.facebook.com/9770929278 http://www.twitter.com/officialadele Pop http://www.mtv.com/artists/adele/biography
Joey + Rory http://www.facebook.com/15044507815 http://www.twitter.com/joeyandrory Country http://www.cmt.com/artists/joey-rory/biography
Draaco Aventura http://www.facebook.com/856796091053581 http://www.twitter.com/DraacoAventura http://www.bandpage.com/draacoaventura Pop Latino http://www.mtv.com/artists/draaco-aventura/biography
Justin Bieber http://www.facebook.com/309570926875 http://www.twitter.com/justinbieber http://www.justinbiebermusic.com Pop http://www.mtv.com/artists/justin-bieber/biography
Peer van Mladen http://www.facebook.com/264487966 http://www.twitter.com/Predrag_Jugovic http://pejaintergroup.eu/Peer_van_Mladen.html House http://www.mtv.com/artists/peer-van-mladen/biography
Chris Janson http://www.facebook.com/296647641825 http://www.twitter.com/janson_chris http://www.chrisjanson.com Country http://www.cmt.com/a
@djsegal
djsegal / Restoration.lua
Last active May 3, 2021 11:04
Example resto druid file for maxdps addon
function()
local BL = {
Wrath = 5176,
Starfire = 197628,
EclipseLunar = 48518,
EclipseSolar = 48517,
Starsurge = 197626,
Sunfire = 93402,
Moonfire = 8921,
@djsegal
djsegal / Balance.lua
Last active April 29, 2021 21:52
Example boomkin simple rotation
function()
local BL = {
Wrath = 190984,
Starfire = 194153,
EclipseSolar = 48517,
EclipseLunar = 48518,
Starsurge = 78674,
Starfall = 191034,
Sunfire = 93402,
@djsegal
djsegal / custom_setup_language_reactor_for_german.js
Last active April 15, 2024 22:18
File for robustly loading language reactor with german subtitles
let isRepairingTracks = false;
let wasPlaying = false;
let videoLoaded = false;
let isWaiting = false;
function setTracks() {
if (!document.querySelector('video')) {
return;
}
@djsegal
djsegal / pdf_to_json.py
Last active April 8, 2024 17:16
Convert PDF of CSV file to JSON with hardcoded keys for each entry
import fitz # PyMuPDF
import json
def pdf_to_json(pdf_path, json_path):
doc = fitz.open(pdf_path)
data_list = []
for page_num in range(len(doc)):
page = doc.load_page(page_num)
text = page.get_text().replace("а́\n-", "а́-")
@djsegal
djsegal / Denglisch
Created April 27, 2024 12:38
A bookmarklet for loading German subtitles on Netflix using Language Reactor
javascript:(function() { function setTracks() { let video = document.querySelector('video'); if (!video || !window.lln || !window.lln.vidMan) return; let isGoodTrack = ( window.lln.setMan.sourceLanguageCode === "de" && window.lln.setMan.translationLanguageCode === "en" ); if (!isGoodTrack) { window.lln.vidMan.setAudioTrack("A:2:1;2;de;0;0;"); window.lln.vidMan.setSubtitleTrack("ASR_A:2:1;2;de;0;0;"); video.pause(); return; } let subsContent = document.querySelector("#lln-subs-content"); if (subsContent && subsContent.textContent.trim() === "- Loading subtitles, please wait... -") { if (!video.paused) video.pause(); setTimeout(setTracks, 1000); return; } if (video.paused) video.play(); } function waitForLLN(tries = 0) { if (document.querySelector('video') && window.lln && window.lln.vidMan) { setTracks(); return; } if (tries > 30) { console.error("Custom language connector failed."); return; } setTi
@djsegal
djsegal / swap_display.sh
Created August 27, 2024 14:52
Swap two identical dimension displays on MacOS using displayplacer and cliclick brew packages
#!/bin/bash
# Path to displayplacer and cliclick
DISPLAYPLACER="/opt/homebrew/bin/displayplacer"
CLICLICK="/opt/homebrew/bin/cliclick"
# Get current mouse position using cliclick
current_position=$($CLICLICK p | awk -F, '{print $1, $2}')
current_x=$(echo $current_position | awk '{print $1}')
current_y=$(echo $current_position | awk '{print $2}')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.