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
| MIT License | |
| Copyright (c) 2018 Noel Bundick | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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
| #include <Python.h> | |
| /***********************************************************/ | |
| /* define logging function and logtypes for python.logging */ | |
| /* by H.Dickten 2014 */ | |
| /***********************************************************/ | |
| enum logtypes {info, warning, error, debug}; | |
| static void log_msg(int type, char *msg) | |
| { |
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
| # This instruction is for Unix-like OS users. | |
| # I refered to the following guide when I wrote it. | |
| # https://conda.io/docs/user-guide/tasks/build-packages/recipe.html | |
| # Activate an environment if needed | |
| conda activate myenv | |
| # Install conda-build if you haven't. Ironically, installing conda-build | |
| # includes installing python. This python will be effectively replaced with | |
| # your new python binary so don't worry. |
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
| minikube stop; minikube delete && | |
| docker stop $(docker ps -aq) && | |
| rm -rf ~/.kube ~/.minikube && | |
| sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube && | |
| launchctl stop '*kubelet*.mount' && | |
| launchctl stop localkube.service && | |
| launchctl disable localkube.service && | |
| sudo rm -rf /etc/kubernetes/ && | |
| docker system prune -af --volumes |
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
| """ | |
| A utility to extract email attachments | |
| """ | |
| import os | |
| import sys | |
| import email | |
| import argparse | |
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
| def java_string_hashcode(s): | |
| h = 0 | |
| for c in s: | |
| h = (31 * h + ord(c)) & 0xFFFFFFFF | |
| return ((h + 0x80000000) & 0xFFFFFFFF) - 0x80000000 |
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/sh | |
| # installation of Oracle Java JDK. | |
| sudo apt-get -y update | |
| sudo apt-get -y install python-software-properties | |
| sudo add-apt-repository -y ppa:webupd8team/java | |
| sudo apt-get -y update | |
| sudo apt-get -y install oracle-java7-installer | |
| # Installation of commonly used python scipy tools |