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 | |
''' A tool which searches recursively and removes duplicate loader paths ''' | |
import subprocess | |
import sys | |
import os | |
def run_command(command): | |
"""Run a shell command and return the output.""" | |
try: | |
result = subprocess.run(command, check=True, text=True, capture_output=True) |
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 | |
""" a quick text to speech tool """ | |
import os | |
import sys | |
import argparse | |
import sounddevice as sd | |
import warnings | |
warnings.filterwarnings('ignore') | |
try: | |
from IPython.display import display, Audio |
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 | |
### Usage: | |
### ./get_packages.py get url arch | |
### Examples: | |
### ./get_packages.py get https://conda.anaconda.org/idaholab linux-64 | |
import requests, re, sys, argparse, os | |
from urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) |
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 | |
export HISTSIZE=2000000 | |
export HISTFILESIZE=2000000 | |
export CLICOLOR=1 | |
export LSCOLORS=exfxcxdxbxegedabagacad | |
alias ll="ls --color -latrh $@" | |
alias ls="ls --color $@" | |
########## Pretty Prompt ########### |
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
################################# | |
export CLICOLOR=1 | |
export LSCOLORS=exfxcxdxbxegedabagacad | |
alias ll='ls -latrh' | |
alias l='ls -latrh' | |
setopt noautomenu | |
setopt nomenucomplete | |
setopt auto_cd | |
setopt PROMPT_SUBST | |
autoload -U colors && colors |
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
;; Highlight line for _inactive_ windows :: | |
;; Credit to https://emacs.stackexchange.com/questions/14638/change-highlight-color-when-window-isnt-in-focus | |
;; Answerer: https://emacs.stackexchange.com/users/780/glucas | |
(require 'hl-line) | |
(set-face-background hl-line-face "#333") | |
(defface hl-line-inactive | |
'((t nil)) | |
"Inactive variant of `hl-line'." | |
:group 'hl-line) |
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 | |
function print_arrays() | |
{ | |
#### This function uses indirect expansion (pass variable name, not the value) | |
## | |
## Syntax: print_arrays args args_about | |
## | |
## Where args and args_about are arrays containing double quoted content: | |
## | |
## args=("-h|--help"\ |
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 python | |
import os, traceback | |
from time import sleep | |
from multiprocessing.pool import ThreadPool | |
import threading # for thread locking and thread timers | |
class Scheduler: | |
""" | |
A simple threading scheduler. | |
Instance Scheduler(int), where int is the ammount of processors you wish to |
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 python | |
# Credit for DependencyResolver goes to: http://code.activestate.com/recipes/576570-dependency-resolver/ | |
class DependencyResolver: | |
def __init__(self): | |
self.dependency_dict = {} | |
def insertDependency(self, key, values): | |
self.dependency_dict[key] = values |
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 python | |
import argparse, os, io, sys, time | |
import SocketServer, socket | |
import Queue | |
import threading | |
import tempfile | |
global thread_storage | |
thread_storage = {} | |
class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): |
NewerOlder