This file contains 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 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' | |
# git branch function (stole this from ohmyzsh) | |
function git_current_branch() { | |
local ref | |
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null) |
This file contains 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' | |
export CONDA_HOSTNAME=`hostname` | |
setopt noautomenu | |
setopt nomenucomplete | |
setopt auto_cd | |
setopt PROMPT_SUBST |
This file contains 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 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 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 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 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): |
This file contains 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
diff -ruN a/coregrind/m_syscall.c b/coregrind/m_syscall.c | |
--- a/coregrind/m_syscall.c 2016-10-21 04:37:39.000000000 -0600 | |
+++ b/coregrind/m_syscall.c 2016-10-31 10:02:39.000000000 -0600 | |
@@ -33,6 +33,7 @@ | |
#include "pub_core_vki.h" | |
#include "pub_core_vkiscnums.h" | |
#include "pub_core_syscall.h" | |
+#define __private_extern__ extern | |
/* --------------------------------------------------------------------- |
This file contains 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 | |
def parseArguments(args=None): | |
parser = argparse.ArgumentParser(description='argparse tester') | |
parser.add_argument('-t', '--test', nargs="?", const='moose', help='None, default=moose, or value') | |
return parser.parse_args(args) | |
if __name__ == '__main__': | |
args = parseArguments() |
NewerOlder