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
| # Use an official centos7 image | |
| FROM centos:7 | |
| RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 | |
| ENV LANG fr_FR.utf8 | |
| # gcc because we need regex and pyldap | |
| # openldap-devel because we need pyldap | |
| RUN yum update -y \ | |
| && yum install -y https://centos7.iuscommunity.org/ius-release.rpm \ |
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 bash | |
| log=mv_files.log | |
| spare=/spare/ryan | |
| dest=/cb/data/imagenet1k2/new/ | |
| while true; do | |
| if test -n "$(shopt -s nullglob; echo $spare/*)" | |
| then | |
| echo "Moving files to $dest" | |
| echo "Moving files to $dest" >> $log | |
| ls -rt1 $spare | head -n -10 | xargs -n 1 echo |
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
| import numpy as np | |
| import tensorflow as tf | |
| __author__ = "Sangwoong Yoon" | |
| def np_to_tfrecords(X, Y, file_path_prefix, verbose=True): | |
| """ | |
| Converts a Numpy array (or two Numpy arrays) into a tfrecord file. | |
| For supervised learning, feed training inputs to X and training labels to Y. | |
| For unsupervised learning, only feed training inputs to X, and feed None to Y. |
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
| """ | |
| 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() |
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 | |
| # Set up ROOT and RootCore | |
| import ROOT | |
| ROOT.gROOT.Macro('$ROOTCOREDIR/scripts/load_packages.C') | |
| # Initialize the xAOD infrastructure | |
| ROOT.xAOD.Init() | |
| # Set up the input files (PDSF) |
NewerOlder