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
#!/usr/bin/env python3 | |
import sys | |
import nltk | |
from nltk.sentiment import SentimentIntensityAnalyzer | |
from pathlib import Path | |
from pprint import pprint | |
import pickle | |
import nacl.secret # pip install pynacl | |
import nacl.utils | |
import base64 |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"os/signal" | |
"syscall" | |
"strconv" | |
"strings" |
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
#!/bin/bash | |
# brew install pidof cpulimit | |
PID=$(ps aux | grep "/World of Warcraft Classic.app" | grep -v "WowVoiceProxy" | grep -v "grep" | awk '{print $2}') | |
CPU_LIMIT=170 | |
if [ -n "$1" ]; then | |
CPU_LIMIT=$1 | |
fi | |
while true | |
do | |
cpulimit -l "$CPU_LIMIT" -p $PID |
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
#!/bin/bash | |
open -a "/Applications/World of Warcraft/_classic_era_/World of Warcraft Classic.app" | |
sleep 4 | |
username="asdf" | |
password="fdsa" | |
osascript -e " | |
tell application \"World of Warcraft Classic\" to activate | |
on x_type(x_text, delay_time) | |
repeat with x_char in x_text |
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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import subprocess | |
def docx_to_pdf( docx_folder ): | |
docx_files = [f for f in os.listdir(docx_folder) if f.endswith('.docx')] | |
total_files = len(docx_files) | |
for i, docx_file in enumerate(docx_files, 1): | |
docx_path = os.path.join(docx_folder, docx_file) |
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
#!/usr/bin/env python3 | |
import sys | |
import tempfile | |
from pathlib import Path | |
from PIL import Image | |
from rdkit import Chem | |
from rdkit.Chem import Draw | |
# pip install rdkit pillow | |
def show_smiles( smiles_string ): |
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
lsusb | |
sudo mkfs.ext4 /dev/sda1 | |
sudo mkdir /mnt/usbdrive | |
sudo blkid | |
sudo nano /etc/fstab | |
UUID=your-drive-uuid /mnt/usbdrive ext4 defaults 0 2 |
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
#!/usr/bin/env node | |
( async () => { | |
const process = require( "process" ); | |
const path = require( "path" ); | |
const { execSync } = require( "child_process" ); | |
// const global_package_path = process.argv[ 0 ].split( "/bin/node" )[ 0 ] + "/lib/node_modules"; | |
const global_package_path = execSync( "npm root -g" ).toString().trim(); | |
const puppeteer = require( path.join( global_package_path , "puppeteer" ) ); | |
const fs = require( "fs" ).promises; |
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 sys | |
import pyatv | |
from pyatv.const import Protocol | |
async def play_url( loop ): | |
atvs = await pyatv.scan(loop, identifier="mac-addresss") | |
print( atvs ) | |
conf = atvs[0] |