Skip to content

Instantly share code, notes, and snippets.

@brianv0
brianv0 / pytest-ip_diffim.xml.failed
Created September 11, 2019 14:17
ip_diffim failed
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
rootdir: /scratch/bvan/lsst/distrib/ip_diffim, inifile: setup.cfg
plugins: doctestplus-0.3.0, flake8-1.0.4, xdist-1.29.0, remotedata-0.3.1, forked-1.0.2, openfiles-0.4.0, session2file-0.1.9, arraydiff-0.3, cov-2.7.1
gw0 I / gw1 I / gw2 I / gw3 I
gw0 [248] / gw1 [248] / gw2 [248] / gw3 [248]
........................................................................ [ 29%]
.............FFFF.........................................F............. [ 58%]
...........................s............................................ [ 87%]
@brianv0
brianv0 / _build.log
Created September 11, 2019 01:07
ip_diffm build log
[2019-09-11T00:41:14.829895Z] + . /scratch/bvan/conda/envs/default/opt/eups/bin/setups.sh
[2019-09-11T00:41:14.829985Z] ++ export EUPS_SHELL=sh
[2019-09-11T00:41:14.829993Z] ++ EUPS_SHELL=sh
[2019-09-11T00:41:14.829996Z] ++ export EUPS_DIR=/scratch/bvan/conda/envs/default/opt/eups
[2019-09-11T00:41:14.830001Z] ++ EUPS_DIR=/scratch/bvan/conda/envs/default/opt/eups
[2019-09-11T00:41:14.830430Z] +++ echo /scratch/bvan/conda/envs/default/opt/eups
[2019-09-11T00:41:14.830445Z] +++ sed -e 's/ /-+-/g'
[2019-09-11T00:41:14.831603Z] ++ eupslocalpath=/scratch/bvan/conda/envs/default/opt/eups
[2019-09-11T00:41:14.831851Z] +++ /scratch/bvan/conda/envs/default/bin/python -E -c '
[2019-09-11T00:41:14.831860Z] from __future__ import print_function
@brianv0
brianv0 / message_processing.txt
Created August 21, 2019 22:48
Message Processing
Aug 21, 2019 7:21:29 AM 19 messages took 1,213ms
Aug 21, 2019 7:21:39 AM 11 messages took 572ms
Aug 21, 2019 7:21:51 AM 18 messages took 1,336ms
Aug 21, 2019 7:22:02 AM 24 messages took 1,340ms
Aug 21, 2019 7:22:13 AM 20 messages took 1,257ms
Aug 21, 2019 7:22:24 AM 19 messages took 976ms
Aug 21, 2019 7:22:35 AM 14 messages took 575ms
Aug 21, 2019 7:22:45 AM 13 messages took 535ms
Aug 21, 2019 7:23:00 AM 59 messages took 4,186ms
Aug 21, 2019 7:23:10 AM 18 messages took 736ms
@brianv0
brianv0 / setup.shell
Created August 7, 2019 03:40
Unable to link in Mac OS X with boost unit_test_framework.
conda create --name boost-test
conda activate boost-test
conda config --env --add channels conda-forge
conda install compilers boost
cat <<EOF > test_Linking_x.cc
#define BOOST_TEST_MODULE Exception_x
#define BOOST_TEST_DYN_LINK
#include "boost/test/unit_test.hpp"
#include "boost/test/output_test_stream.hpp"
@brianv0
brianv0 / packages.txt
Last active August 6, 2019 01:07
lsst_distrib packages
LSST Distrib:
afw/
afwdata/
ap_association/
ap_pipe/
ap_pipe_testdata/
ap_verify/
ap_verify_testdata/
astro_metadata_translator/
astrometry_net/
@brianv0
brianv0 / guidelines.md
Last active January 23, 2019 14:00
Some guidelines for software development

Initial Advice

Probably the most important advice I could give right now:

Think about files first. Files are your core abstraction between pipeline steps. You have many languages already, so enforcing a standard on your inputs and outputs will help you keep existing code working while allowing you to create new code. This will become more apparent as you start to deal with more than 3 generations of Operating Systems, programming languages, and grad students.

Files

GET /sign_in HTTP/1.1
Host: lsst-lsp-int.ncsa.illinois.edu
Connection: close
X-Real-IP: 141.142.146.91
X-Forwarded-For: 141.142.146.91
X-Forwarded-Host: lsst-lsp-int.ncsa.illinois.edu
X-Forwarded-Port: 443
X-Forwarded-Proto: https
X-Original-URI: /oauth2/sign_in
X-Scheme: https
@brianv0
brianv0 / impersonation.nginx.conf.lua
Created January 10, 2019 14:56
Group and User impersonation in nginx webdav
init_by_lua_block {
local ffi = require("ffi")
local syscall_api = require("syscall") -- loads ffi.C for us
ffi.cdef[[
int initgroups(const char *user, gid_t group);
struct passwd {
char *pw_name;
char *pw_passwd;
uid_t pw_uid;
gid_t pw_gid;
@brianv0
brianv0 / script.sh
Created December 21, 2018 15:01
Check Can Open
adduser brian --system --disabled-password --uid=1000
adduser john --system --disabled-password --uid=1001
echo "00900111512262233733448445595566066"> brian.txt
chown brian brian.txt
chmod 700 brian.txt
pip install cffi
#########
@brianv0
brianv0 / fssetuid.py
Created December 19, 2018 14:29
FS setuid python
from cffi import FFI
import os
ffi = FFI()
ffi.cdef("""
int setfsuid(int fsuid);
int getgroups(int fsuid, int[]);
int setgroups(int size, const int *list);
""")