Installing 3DS CST Microwave Studio Suite Distributed Computing Node on Ubunntu
Tested on: Ubuntu 20.04.2 LTS nvidia version 470
| # show number notation | |
| def get_number_notation(value, decimal_place=2, unit=''): | |
| ref = {24: 'Y', 21: 'Z', 18: 'E', 15: 'P', | |
| 12: 'T', 9: 'G', 6: 'M', 3: 'k', 0: '', | |
| -3: 'm', -6: 'u', -9: 'n', -12: 'p', | |
| -15: 'f', -18: 'a', -21: 'z', -24: 'y', | |
| } | |
| num = max([key for key in ref.keys() if value > 10 ** key]) | |
| mult = ref[num] if unit else 'e{}'.format(num) | |
| return '{}{}{}'.format(int(value / 10 ** num * 10 ** decimal_place) / 10 ** decimal_place, mult, unit) |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| # Changed for python 3 | |
| import http.server |
Check classifiers here https://pypi.python.org/pypi?%3Aaction=list_classifiers.
Create markdown:
pandoc --from markdown_github --to rst -o README.rst README.md
Snippets, tips and tricks in no particular order. FOR ADVANCED USERS ONLY. Some of these one liners may be dangerous since they might delete files in loops. Please pay attention and make backups. :-)
Extract the 10th column while skipping the first line:
awk -F ' ' 'NR!=1{print $10}' filename.txt
Here is how you can deploy a truly stand alone OSX application bundle out of a stand alone ROOT GUI application which you can distribute to other colleagues without a ROOT installation.
First get ROOT from git and compile it as described in http://root.cern.ch/drupal/content/installing-root-source. You don't need to install it. After that make clean and make a duplicate copy of the whole root directory and name it e.g. root_runtime. In root_runtime, delete everything except the directories lib, icons, fonts, etc and bin. In the bin directory delete everything except the script thisroot.sh and root-config. Then go inside the lib directory and check for the dependencies of all libs to see if anyone depends on some library other than those in the /ur/lib, which come automatically with OSX. Specifically you can grep for any dependency that is in /opt/ for systems that have macports installed.
otool -L *