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 | |
# https://null-byte.wonderhowto.com/how-to/hacking-macos-break-into-macbook-encrypted-with-filevault-0185177/ | |
# checks to ensure all 3 args are present | |
if [[ ! $3 ]]; then | |
echo -e "\nusage: $ ./script.sh /dev/sdaX passwords.list -killswitch\n" | |
exit 0 | |
fi |
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
#!/RAID/USERS/zimmer/sw/python2.7/bin/python2.7 | |
from slackweb import Slack | |
from tempfile import NamedTemporaryFile | |
from subprocess import Popen | |
from sys import exit as sys_exit | |
from time import ctime-hook.py | |
def svnlook(arg,repo,multiline=True):nw slack-commit-hook.py | |
command="svnlook {arg} {repo}".format(arg=arg,repo=repo) | |
tmp_err = NamedTemporaryFile(dir="/tmp", delete=True) |
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
##### | |
# @brief: example to show how one would emulate equivalent to source script.sh, creates env dump and updates internal dictionary | |
# @todo: python executable itself needs to be reloaded | |
##### | |
from subprocess import Popen, PIPE | |
from os.path import isfile | |
from os import environ | |
from ast import literal_eval |
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
from progressbar import ProgressBar, ETA, Percentage, Bar | |
widgets = [Percentage(), Bar(), ETA()] | |
from sys import exit as sys_exit | |
from DmpWorkflow.core.models import JobInstance, Job | |
from DmpWorkflow.core import db | |
db.connect() | |
all_jobs = Job.objects.all() | |
n_registered_instances = sum([JobInstance.objects.filter(job=j).count() for j in all_jobs]) |
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
""" | |
Helper module for displaying ROOT canvases in ipython notebooks | |
Usage example: | |
# Save this file as rootnotes.py to your working directory. | |
import rootnotes | |
c1 = rootnotes.default_canvas() | |
fun1 = TF1( 'fun1', 'abs(sin(x)/x)', 0, 10) | |
c1.SetGridx() |