Introduction
This section explains general commands and useful hints in using Rack.
Sampling grid data
The input volume as well as the generated polar or Cartesian products can be sampled, producing a text file. The sampling is performed automatically if output file has the extension '.dat'. For example:
rack volume.h5 -o samples.dat
The result:
## input properties
# bbox=26.318993630447291565,67.945427638870782516,26.318918726089457039,67.945427638895992573
# height=360
# lat=64.77493012323975563
# lon=26.318880077451467514
# width=500
## sampling parameters
# commentChar="#"
# i=[-1,-1]
# iStep=10
# j=[-1,-1]
# jStep=0
# skipVoid=false
# format='${i},${j},${LON},${LAT},${X},${Y},${RANGE},${AZM}'
## resulting geometry
# rows=50
# rols=36
# samples=1800
5,5,26.323942791853330192,64.799472075286843165,239.67829255605994376,2739.5354197523001858,2750,5 #void data
15,5,26.33313506441637486,64.844147926041983965,675.45700629435077644,7720.5089102110277963,7750,5 #void data
25,5,26.342357875045131266,64.888822936116270057,1111.235720032641666,12701.482400669756316,12750,5
65,5,26.37955778153023445,65.067514515444827339,2854.3505749858049967,32625.376362504666758,32750,5
75,5,26.388935755212045819,65.112185281308654794,3290.1292887240956588,37606.349852963394369,37750,5
85,5,26.398345264299621249,65.156855190019157931,3725.9080024623867757,42587.323343422125618,42750,5
95,5,26.407786479190583862,65.201524238754984708,4161.6867162006774379,47568.29683388084959,47750,5
...
...
...
455,355,25.867469096238412618,66.809011493882522359,-19849.720410779180384,226883.34249039503629,227750,355
465,355,25.856722844056761801,66.853646518587282799,-20285.499124517475138,231864.31598085377482,232750,355
475,355,25.845937395485009347,66.898280557542392444,-20721.277838255766255,236845.28947131251334,237750,355
485,355,25.835112523182544919,66.942913606883436728,-21157.056551994057372,241826.26296177122276,242750,355
495,355,25.824247998058286413,66.987545662713685601,-21592.835265732348489,246807.23645222996129,247750,355
The default sampling step is 10 in both horizontal and vertical direction, and all the quantities are sampled. One may apply –select
command to get desired subset of quantities. Further, –format
modifies output layout; variables inserted like ${NAME}
are converted to actual values in output. (See format
in the file header above).
- i and j : image coordinates, from top-left corner (bin and azimuth index in polar sampling);
- j2: inverted vertical image coordinate ie. from bottom-left corner (in Cartesian sampling only)
- LON and LAT : geographical coordinates, in degreees
- X and Y : map coordinates, in metres
- AZM and RANGE: polar coordinates (in polar sampling only)
- the quantities, eg.
DBZH
, VRAD
, and so on, including quality quantities like QIND
. The default format consists of all the applicable coordinates and quantities separated by space. Values can be negated by putting a minus sign inside the curly braces of a format string.
Sampling steps, start, and end can be changed with –sample
command. One may also skip lines containing undetect
or nodata
samples. If a comment char is defined some metadata, including applied format, appears as comments in the start of the output.
Example of a formatted sampling:
rack volume.h5 --select quantity=DBZH --sample 10,30,i=50:200,j=0:50 --format
'${i},${j} (${LON},${LAT}) ${DBZH}' -o samples-formatted.dat
The result:
## input properties
# bbox=26.318993630447291565,67.945427638870782516,26.318918726089457039,67.945427638895992573
# height=360
# lat=64.77493012323975563
# lon=26.318880077451467514
# width=500
## sampling parameters
# commentChar="#"
# i=[50,200]
# iStep=10
# j=[0,50]
# jStep=30
# skipVoid=false
# format='${i},${j} (${LON},${LAT}) ${DBZH}'
## resulting geometry
# rows=50
# rols=12
# samples=600
60,0 (26.318899999999999295,65.046221712276846461) 0 #void data
50,0 (26.318899999999999295,65.001375835002960457) -13.990000000000009095
90,0 (26.318899999999999295,65.18075771873881763) -10.790000000000020464
60,30 (26.639625849983946893,65.009528367473237154) -11.709999999999979536
70,30 (26.693180601515052786,65.048242271160603423) -5.8199999999999931788
80,30 (26.74689089797000463,65.08693674805789442) -10.649999999999977263
...
...
...
160,30 (27.182251512133280613,65.395782362396388976) 0 #void data
170,30 (27.237391325265114972,65.434297913009174863) 0 #void data
180,30 (27.292693320975406124,65.472793119374756543) 6.7400000000000090949
190,30 (27.348158180313880905,65.511267886817819317) 19.959999999999979536
200,30 (27.403786587525736707,65.549722120116626911) 0 #void data
Likewise, one can sample Cartesian data. Example:
rack volume.h5 --select quantity=DBZH --cSize 500,500 -c --sample 50,50 -o samples-cart.dat
The result:
## input properties
# bbox=21.473369970467256707,62.446873711034854182,32.036889576527535439,66.915064520295331363
# height=500
# proj= +proj=aeqd +lon_0=26.3189 +lat_0=64.7749 +ellps=WGS84
# width=500
## sampling parameters
# commentChar="#"
# i=[-1,-1]
# iStep=50
# j=[-1,-1]
# jStep=50
# skipVoid=false
# format='${i},${j},${LON},${LAT},${X},${Y},${j2}'
## resulting geometry
# rows=10
# rols=10
# samples=100
25,25,21.228718345421253133,66.706899755745297398,-224500.00000000037835,224500.00000000011642,474 #void data
75,25,22.358961796032421177,66.73907769969324022,-174500.00000000032014,224500.00000000011642,474 #void data
125,25,23.491776818551841188,66.763220178132627325,-124500.00000000026193,224500.00000000011642,474 #void data
225,25,25.762197152083786023,66.787306874636954035,-24500.000000000145519,224500.00000000011642,474
275,25,26.898324149531351424,66.787226005037581444,25499.999999999883585,224500.00000000011642,474
225,75,25.772101676257559433,66.338957503548726891,-24500.000000000145519,174500.00000000011642,424
175,125,24.685508120767291729,65.882874084457171193,-74500.000000000203727,124500.00000000011642,374
225,125,25.781637075153916783,65.890581400433191561,-24500.000000000145519,124500.00000000011642,374
...
...
...
275,475,26.817786269290291301,62.751103441315017051,25499.999999999883585,-225499.99999999994179,24 #void data
325,475,27.795761399096143407,62.744145342991089365,75499.999999999941792,-225499.99999999994179,24 #void data
375,475,28.773044441360497103,62.730303316086903465,125500,-225499.99999999994179,24 #void data
425,475,29.74917940080629819,62.7095878260878834,175500.00000000005821,-225499.99999999994179,24 #void data
475,475,30.723713757372806299,62.682014495678757271,225500.00000000011642,-225499.99999999994179,24 #void data
Note that –cCreate
maps a single quantity to Cartesian coordinates; the quantity can be changed with –select
.
Metadata output using text templates
There is often need to produce metadata text for:
- Text files completing data formats not supporting metadata
- Log entries
- HTML files applied in monitoring product generation
- Graphical layouts (eg. SVG)
- Geographic definition files (eg. KML) for adding radar products to GIS applications
One can easily export metadata of current HDF5 structure (latest volume read or product generated). The output is a text file in which variables ${variable}
have been expanded to their current values.
The text template can be defined briefly on command line by –format
or by reading a file with –formatFile
.
For example, from a Cartesian product one may extract the projection and a bounding box with the following command:
rack volume.h5 -c --format
'BBOX=${where:LL_lon},${where:LL_lat},${where:UR_lon},${where:UR_lat}\n' --formatOut formatOut.txt
The result:
BBOX=21.4734,62.4469,32.0369,66.9151
The applicable variables are those the ODIM variables (what:product, where:lat, ...). In addition, what:source
fields (NOD
, WMO
, RAD
, PLC
, CMT
) are searched for and expanded to convenience variables (${NOD}
, etc...). The list of current variables can be examined with –status
command.
For example, assume template file radar-conf.tpl
with the following contents:
# Metadata for radar '${NOD}'
SOURCE="${what:source}"
NOD="${NOD}"
WMO="${WMO}"
PLC="${PLC}"
LAT="${where:lat}"
LON="${where:lon}"
HEIGHT="${where:height}"
PROJDEF="${where:projdef}"
BBOX="${where:LL_lon},${where:LL_lat},${where:UR_lon},${where:UR_lat}"
Then,
rack volume.h5 -c --formatFile radar-conf.tpl --formatOut out.cnf
produces code which can be used by applications supporting Proj4 projection syntax. The result:
# Metadata for radar 'fiuta'
SOURCE="WMO:02870,RAD:FI47,PLC:Utajärvi,NOD:fiuta"
NOD="fiuta"
WMO="02870"
PLC="Utajärvi"
LAT="64.7749"
LON="26.3189"
HEIGHT="118"
PROJDEF=" +proj=aeqd +lon_0=26.3189 +lat_0=64.7749 +ellps=WGS84"
BBOX="21.4734,62.4469,32.0369,66.9151"
Further, using –script
one can quickly create similar conf files with a single command:
rack --formatFile radar-conf.tpl --script
'--cReset -c --formatOut site-${NOD}.cnf' <volumes.h5>
Note that –script
implicitly sets –expandVariables
.
Does a radar overlap with a given geographical scope?
 If the area is small with respect to the surrounding radar network, one should not read all the possible radar files at hand, even though Rack
will automatically reject volume data which is out of scope. This is especially critical if radar data are archived, needing time-consuming retrieval, uncompressing and format conversion. Hence, one needs a means of advance checking if a radar should be included or not in the composite.
In Rack, commands of type –/xxx/xxx
:yyy=zzz are interpreted as ODIM metadata to be set in the current HDF5 object. Rack
always contains one object, initially empty, for which the metadata can be set as well. As for with a true input volume, one can check the geographical scope of this "volume" using –cBBoxTest
command as follows, for example:
rack --verbose 0 \
--cProj '+proj=stere +lon_0=25.0 +lat_0=60.000' \
--cBBox '20,58,30,63' \
--/where:lon=26.32 \
--/where:lat=64.77 \
--/where:nbins=500 \
--/where:rscale=500 \
--cBBoxTest 1
The result can be checked from the return code, which is zero if the radar range overlaps with the composite domain, and non-zero otherwise.
Another way is to call –formatOut
for each input volume, using –format
that contains ${BBOX}
and other desired status variables. For example:
rack --cProj
'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' --cBBox 20,60,30,70 \
--format '${BBOX} ${CMT} ${what:source} ${inputFile} \n' \
--verbose 0 --script '--cBBoxTest 1 --formatOut -' \
data/pvol_*
Instead of giving nbins
and rscale
, the range can be given using the non-standard –where:range
directly (in metres, for example 250000).
This command could be called by a script which iterates through sample files, and the results are catenated in a file like
# FMI radars
fianj=27.1111,60.9036
fiika=23.08,61.767
fikor=21.6465,60.1284
...
A further application could be in an operational compositing process, where another script iterates through these entries, testing locations with –cBBoxTest
as shown above and including successful sites in the actual compositing script. A variable names, instead of output of ${what:source}
above, it is practical to use radar site codes in the form they appear in filenames.
Validating data structure
Rack supports validating both input data and products it generates. The process uses comma-separated definition files by OPERA, originally designed by Ladislav Meri (SMU). Input data is validated by issuing –validate
command after reading the data:
rack volume.h5 --validate ODIM_H5_V2_2_PVOL.csv
Output data – polar or Cartesian products – can be validated similarly, after generating the products:
rack volume.h5 --pCappi 500 --validate ODIM_H5_V2_3_PPROD.csv
rack volume.h5 -Q DBZH --cCreate --validate ODIM_H5_V2_3_CART.csv
Normal warnings and notifications are displayed upon exceptions. More verbose output obtained with –verbose
7
, for example. In future versions, automatic validator filename selection may be supported (based on attribute what:version
). Note: only some basic defition files have been designed by OPERA
this far. Note2: Rack is mostly, but not fully, compliant to ODIM
2.2
and 2.3
.
Creating test volumes
The following script can be applied to create test volumes.
#!/bin/bash
#
# Generates an artificial radar volume (chessboard data).
#
# Part of Rack distribution
#
#<EMAIL_ADDRESS>PATH=${PATH}':/fmi/dev/bin'
QUANTITY=${QUANTITY:-'DBZH'}
OUTDIR=${OUTDIR:-"."}
OUTFILE=${OUTFILE:-"testdata-$QUANTITY.h5"}
NBINS=${NBINS:-'500'}
NRAYS=${NRAYS:-'360'}
RSCALE=${RSCALE:-'500'}
LON=${LON:-'25.0'}
LAT=${LAT:-'60.0'}
GAIN=${GAIN:-'0.5'}
OFFSET=${OFFSET:-'-32'}
UNDETECT=${UNDETECT:-'0'}
NODATA=${NODATA:-'255'}
# Base "data": a 2x2 grid replicated over the image
VALUES=${VALUES:-$(( RANDOM & 127 )),$(( RANDOM & 127 + 128 ))}
VALUES=${VALUES/:/,}
#VALUES=${VALUES:-"64:192"}
VALUES=( ${VALUES/,/ } )
DARK=${VALUES[0]}
LIGHT=${VALUES[1]}
#DARK=$(( RANDOM & 127 ))
#LIGHT=$(( RANDOM & 127 + 128 ))
DATA=${DATA:-"$DARK,$LIGHT,$LIGHT,$DARK"}
BASENAME=${OUTFILE%.*}
IMGFILE=${BASENAME}-raw.png
TILEFILE=${BASENAME}-tile.png
CMDFILE=${BASENAME}.sh
#
if [ "$COORD" == 'c' ]; then
cart='-c'
else
cart=''
fi
# PALETTE=default
if [ "$PALETTE" == 'default' ]; then
PALETTE=$QUANTITY
fi
palette=${PALETTE:+"--palette palette/palette-$PALETTE.txt"}
# Step 1: create png image file
echo $(( NBINS / 20 ))x$(( NRAYS / 20 ))
echo "P2 2 2 255 ${DATA//,/ }" | convert pgm:- -filter Point -resize $(( NBINS / 5 ))x$(( NRAYS / 20 ))\! ${OUTDIR}/${TILEFILE}
if [ ! -s "${OUTDIR}/${TILEFILE}" ]; then
echo "502 Could not generate tile file: ${OUTDIR}/${TILEFILE}"
exit 1
fi
if [ "$FORMAT" == 'sh' ]; then
OUTFILE=${BASENAME}.h5
fi
cat > $OUTDIR/$CMDFILE <<EOF
# Step 2: expand to a gridded png image
convert -size ${NBINS}x${NRAYS} tile:$OUTDIR/${TILEFILE} -type GrayScale -depth 8 ${OUTDIR}/${IMGFILE}
# Step 3: add ODIM variables, convert to HDF5
rack ${OUTDIR}/${IMGFILE} \
--/what:object=PVOL \
--/where:lon=$LON \
--/where:lat=$LAT \
--/how:simulated=True \
--/dataset1/where:nbins=$NBINS \
--/dataset1/where:nrays=$NRAYS \
--/dataset1/where:rscale=$RSCALE \
--/dataset1/data1/what:quantity=$QUANTITY \
--/dataset1/data1/what:gain=$GAIN \
--/dataset1/data1/what:offset=$OFFSET \
--completeODIM \
${cart} ${palette} \
-o ${OUTDIR}/${OUTFILE}
rm -v $OUTDIR/${IMGFILE}
rm -v $OUTDIR/${TILEFILE}
EOF
if [ "$FORMAT" != 'sh' ]; then
source $OUTDIR/$CMDFILE
fi
# That's it
Test data in its original polar coordinates and Cartesian projection.


This experience happened a long time ago, but is so idiosyncratic that I thought I'd write it up nonetheless. Before I had access to Valium, GHB was the drug I would use when I found myself in a position of NEEDING to go to sleep. Nota bene: this does NOT AT ALL work with LSD, and one of my least favorite drug experiences was taking enough GHB to kill a horse at the tail end of a seven-hit acid trip and finding myself, without the coordination to speak or move beyond rolling about on my bed, STILL unable to sleep. (this is in great contrast to the awesome power of diazepam versus LSD, a power much greater and more useful, in my opinion, than any potentially self-destructive 'recreational' use it might have)
Anyway, at the time of the experience in question, I had been up late at night working on some paper or some assignment, and I had drunk a lot of tea and maybe taken an ephedra to keep me awake, so when I was done with the project, I decided to take some GHB to fall asleep. I have no idea the actual dose, but it wasn't huge.
So, I lay down in bed to go to sleep, and pretty soon, the GHB started to work, in a predictable fashion.
Then something weird happened.
I found myself confronted with STRONG closed-eye-visuals, of being in a very bright rotating tunnel. It lacked the beauty and complexity of visuals from some of the real psychedelics, but it was unquestionably there, and bright.
And now comes the really strange part. I heard music. Loud. Mostly, when I have had the experience of hearing music before I go to sleep (which happens sometimes under the influence of nothing), the music is on the edge of perceptibility. This music was quite perceptible.
The music wasn't very good, either. It was a kind of cheesy-variety downtempo electronica. I remember distinctly an electric guitar part. I could sometimes influence the music, like 'I really want a high-hat to come in here,' but it would only work about half the time, and the other half, the piece would just do what it wanted. This went on for a while, and then the song changed. The quality of the music was no better, nor was my ability to influence it. Halfway through the song, the audio started to glitch and hiccup. I actually stood up to go to the computer to fix whatever was wrong with the playback before realizing that the computer was off.
I think that this experience is some weird offshoot of a pre-sleep hypnagogic state. I was totally aware during the whole thing, and in no way did it have the character of most borderline-sleep SWS-1 dreams. Somehow the GHB caused a very different sleep pattern to emerge -- maybe this was even a form of lucid dreaming? I'm not sure; it's really at the boundary between psychedelic effect and dream. Nothing like it has ever happened to me before or since.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


---
layout: page
title: Songxiang Liu (刘颂湘)
subtitle: 抠了个code
use-site-title: true
---
[Last update: 2023/08/08]
Songxiang Liu received the Ph.D. degree from the Human-Computer Communications Laboratory (HCCL) at The Chinese University of Hong Kong, Hong Kong SAR, China, in 2021, supervised by Prof. Helen Meng. Before that, he obtained the B.Eng. degree in Automation from Department of Control Science and Engineering at Zhejiang University, , Hangzhou, China, in 2016.
His research interests lie in the broad field of spoken language processing, including speech and singing synthesis (e.g., voice transformation and text-to-speech synthesis), audio adversarial attacks and defense, etc.
[Github][Google Scholar]
News
[2023/02/01] Our new work on prompt-based expressive TTS -- "InstructTTS: Modelling Expressive TTS in Discrete Latent Space with Natural Language Style Prompt" is available [demo][arXiv]
[2022/02/10] Paper introducing DiffGAN-TTS is available from arXiv. [demo][arXiv]
[2021/9/18] DiffSVC paper will appear in ASRU2021.
[2021/5/31] Our new work on singing voice conversion with the denoising diffusion probabilistic model (DDPM). [demo][arXiv]
[2021/3/7] Our FastSVC paper has been accepted as an ORAL paper in ICME 2021.
Selected Publications
Complete publication list can be found in Google Scholar
Journal Papers
Any-to-Many Voice Conversion with Location-Relative Sequence-to-Sequence Modeling,
[Demo][Code]
Songxiang Liu, Yuewen Cao, Disong Wang, Xixin Wu, Xunying Liu, Helen Meng
Accepted by IEEE/ACM Transactions on Audio Speech and Language Processing, 2021
Exemplar-Based Emotive Speech Synthesis
Xixin Wu, Yuewen Cao, Hui Lu, Songxiang Liu, Shiyin Kang, Zhiyong Wu, Xunying Liu, Helen Meng
Accepted by IEEE/ACM Transactions on Audio Speech and Language Processing, 2021
Speech Emotion Recognition using Sequential Capsule Networks
Xixin Wu, Yuewen Cao, Hui Lu, Songxiang Liu, Disong Wang, Zhiyong Wu, Xunying Liu, Helen Meng
Accepted by IEEE/ACM Transactions on Audio Speech and Language Processing, 2021
Conference Papers
DiffGAN-TTS: High-Fidelity and Efficient Text-to-Speech with Denoising Diffusion GANs,
[demo]
Songxiang Liu, Dan Su, Dong Yu
in ICML 2022 Workshop on Machine Learning for Audio Synthesis
Referee: towards reference-free cross-speaker style transfer with low-quality data for expressive speech synthesis,
[demo]
Songxiang Liu, Shan Yang, Dan Su, Dong Yu
in ICASSP2022
DiffSVC: A Diffusion Probabilistic Model for Singing Voice Conversion,
[demo]
Songxiang Liu*, Yuewen Cao*, Dan Su, Helen Meng
in ASRU2021
FastSVC: Fast Cross-Domain Singing Voice Conversion with Feature-wise Linear Modulation,
[demo]
Songxiang Liu, Yuewen Cao, Na Hu, Dan Su, Helen Meng
Accpeted (ORAL) by ICME 2021.
Transferring Source Style in Non-Parallel Voice Conversion,
[demo]
Songxiang Liu, Yuewen Cao, Shiyin Kang, Na Hu, Xunying Liu, Dan Su, Dong Yu, Helen Meng
in Proc. Interspeech'20
End-to-End Accent Conversion Without Using Native Utterances,
[demo]
Songxiang Liu, Disong Wang, Yuewen Cao, Lifa Sun, Xixin Wu, Shiyin Kang, Zhiyong Wu, Xunying Liu, Dan Su, Dong Yu, Helen Meng
in Proc. IEEE ICASSP'20
Defense against adversarial attacks on spoofing countermeasures of ASV,
Songxiang Liu*, Haibin Wu*, Helen Meng, Hung-yi Lee
in Proc. IEEE ICASSP'20
Adversarial attacks on spoofing countermeasures of automatic speaker verification,
Songxiang Liu, Haibin Wu, Hung-yi Lee, Helen Meng
in Proc. IEEE ASRU'19
Jointly Trained Conversion Model and WaveNet Vocoder for Non-Parallel Voice Conversion Using Mel-Spectrograms and Phonetic Posteriorgrams,
[demo]
Songxiang Liu, Yuewen Cao, Xixin Wu, Lifa Sun, Xunying Liu, Helen Meng
in Proc. Interspeech'19
Voice Conversion Across Arbitrary Speakers Based on a Single Target-Speaker Utterance,
[demo]
Songxiang Liu, Jinghua Zhong, Lifa Sun, Xixin Wu, Xunying Liu, Helen Meng
in Proc. Interspeech'18
The HCCL-CUHK System for the Voice Conversion Challenge 2018,
Songxiang Liu, Jinghua Zhong, Lifa Sun, Xixin Wu, Xunying Liu, Helen Meng
in Proc. ISCA Odyssey'18
Other
Meta-Voice: Fast few-shot style transfer for expressive voice cloning using meta learning,
Songxiang Liu, Dan Su, Dong Yu
Tech. report 2021.
Multi-Target Emotional Voice Conversion With Neural Vocoders,
Songxiang Liu, Yuewen Cao, Helen Meng
in arXiv:2004.03782, work done in 2018.
Emotional Voice Conversion With Cycle-consistent Adversarial Network,
Songxiang Liu, Yuewen Cao, Helen Meng
in arXiv:2004.03781, work done in 2018.
Contact info
E-mail: songxiangliu.cuhk at gmail.com


Quaid-e-Azam
December 1876 – September 1948
"A man who gifted an independent nation state to millions of people"
Here's some information about him:
- His name was Muhammad Ali Jinnah .
- Ali Jinnah was born December 25, 1876, in Karachi, Pakistan.
- He was a lawyer,politician, and the founder of Pakistan.
- He lead all parties to agree to the independence of a predominantly Hindu India, and for a Muslim-majority state of Pakistan.
- Hence,due to his hard-work and sheer determination Pakistan came into being.
- As the First Governor-General of Pakistan , Jinnah worked to establish the new nation's government and policies .
- Devised plans to aid the millions of Muslim migrants who had emigrated from the new nation of India to Pakistan after independence.
- He is considered as the National Hero of Pakistan and was awarded with the title Quaid-e-Azam by the people of Pakistan.
- He died at the age of 72.


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat excepturi, possimus velit!
© copyright 2019 by korlabbc make with


Open Source from the KTH Royal Institute of Technology
Since its founding in 1827, KTH Royal Institute of Technology in Stockholm has grown to become one of Europe’s leading technical and engineering universities, as well as a key centre of intellectual talent and innovation. We are Sweden’s largest technical research and learning institution and home to students, researchers and faculty from around the world dedicated to advancing knowledge.
Website: www.kth.se
Who can contribute to github.com/KTH?
Adding new repositories
All employee at KTH can publish software or eqvivalent on github.com/KTH after being authorised to do so by the IT-department at KTH. Every repository has to be documented and authorised by submitting a request the IT-department at KTH, prior to publishing.
Adding feature or bug fixes via pull requests
We normally work with, and accept pull request, but we can not promise to accept or look at them. But we can promise to do our best with the time we have.
Open source license
The default license for open source distributed by KTH on github.com/KTH is the MIT license. Some repositories may have other licenses.
If you find a repository on github.com/KTH that do not have a LICENCE-file, is missing a attribution, or in some other way violate the open source community, please let us know so we can fix this.
Contact us
Github.com/KTH is maintained by the KTH IT-departmentat KTH. Contact us on<EMAIL_ADDRESS>Legacy repositories
Github.com/KTHse is an old Github organisation for KTH. No new repositories will be published there. The maintenance will be sparse on repositories published on github.com/KTHse.
Other official KTH developer resources
Do you want to learn more about us?
We have a developer blog where we write about what is happening among developers at KTH:s IT-department.


15 dialogues from Dear Zindagi that'll never stop being relevant
by Diya Bachchanihere are some films which are way more than a source of entertainment, they become triggers for people to view life from different perspectives. Dear Zindagi is one such film. It is a love letter to life that was waiting to be written. And we're glad that director Gauri Shinde found order in all the chaos that we live with every day.
With Dear Zindagi, Gauri urges us all to love our imperfect, messy and flawed lives. As the film completes three years since its release today, we take you through 15 dialogues from the film that made us stop and rethink about various things in life.
1. “Don’t let your past blackmail your present, to ruin your beautiful future”
2. “Kabhi kabhi hum mushkil rasta sirf is liye chunte hai, kyun ki humein lagta hai, important cheezein paane ke liye humein mushkil rasta apnana chahiye. Apne aap ko punish karna bahut zaroori samajhte hai. But why? Aasaan rasta kyun nahi chun sakte? Kya burai hai us mein? Khaas karke jab us mushkil ka saamna karne ke liye hum taiyaar hi nahi hai!”
3. “Albert Einstein ne kaha tha, pagal woh hota hai joh roz roz same kaam karta hai, magar chahta hai ki nateeja alag ho.”
4. “Jab hum apne aap ko achhi tarah samajh lete hai, to dusre kya samajhte hai, it doesn't matter. Not at all!”
5. “Genius woh nahi hota jiske paas har sawaal ka jawab ho, Genius woh hota hai jiske paas har jawaab tak pahunchne ka patience ho!”
6. “Tum agar khul ke ro nahi sakogi, toh khul kar hass kaise paogi!”
7. “Zindagi mein jab koi pattern banta ya koi aadat banti dikhai de na, toh uske baare mein achhi tarah se sochna chahiye, genius is about knowing when to stop.”
8. “Agar hum apni zindagi ka steering wheel apne haath mein nahi lenge na, toh koi doosra driver seat par baith jayega.”
9.
10. “We are all our own teachers in the school of life.”
11. “Safe feel karne ke liye pehle saare dar mitana zaroori hai! “
12. “Bachchpan main jab rona aata hai, toh bade bolte hai aasun pocho. Jab gussa aata hai, toh bade kehte hai smile taaki ghar ki shanti bani rahe. Nafrat karna chahe, toh ijazat nahi di. Aur jab pyaar karna chahe, toh pata chala ye saala emotional system hi gadbada gaya, kaam nahi kar raha, cannot function. Rona, gussa, nafrat kuch bhi khul ke express nahi karne diya. Ab pyaar kaise express kare?”
13. “Hum itni kursiyan dekhte hai ek khareedne se pehle phir apna life partner choose karne se pehle opyions dekhne mein kya problem?”
14. “Keep the child in you alive”
15. “Losing friends as you grow up is a sign of growing up”


-
Introduction
# Introduction
When HP Lovecraft wrote his books about forbidden knowledge which would reduce the reader to insanity, of "Elder Gods" to whom all of humanity were a passing inconvenience, most people assumed that he was making up a fantasy world.
In fact he was documenting Kerberos.
What is remarkable is that he did this fifty years before kerberos was developed. This makes him less of an author, instead: a prophet.
What he wrote was true: there are some things humanity was not meant to know. M...
-
Foundational Concepts
# Foundational Concepts
What is the problem that Hadoop security is trying to address?
Apache Hadoop is "an OS for data". A Hadoop cluster can rapidly become the largest stores of data in an organisation. That data can explicitly include sensitive information: financial, personal, business, and can often implicitly contain data which needs to be sensitive about the privacy of individuals (for example, log data of web accesses alone). Much of this data is protected by laws of different countries...
-
The Limits of Hadoop Security
# The Limits of Hadoop Security
What are the limits of Hadoop security? Even with Kerberos enabled, what vulnerabilities exist?
## Unpatched and 0-day holes in the layers underneath.
The underlying OS in a Hadoop cluster may have known or 0-day security holes, allowing a malicious (YARN?) application to gain root access to a host in the cluster. Once this is done it would have direct access to blocks stored by the datanode, and to secrets held in the various processes, including keytabs in the l...
-
Hadoop IPC Security
# Hadoop IPC Security
## Adding a new IPC interface to a Hadoop Service/Application
This is "fiddly". It's not impossible, it just involves effort. In its favour: it's a lot easier than SPNEGO.
### SecurityInfo
Every exported RPC service will need its own extension of the SecurityInfo class, to provide two things
1. The name of the principal to use in this communication
1. The token used to authenticate ongoing communications.
### PolicyProvider
A PolicyProvider subclass. This is used to info...
-
UGI
# UGI
If there is one class guaranteed to strike fear into anyone with experience in Hadoop+Kerberos code it is UserGroupInformation, abbreviated to "UGI"
UGI troublespots
* It's a singleton. Don't expect to have one "real user" per process. This sort of makes sense when you think about it.
* Once initialized, it stays initialized *and cannot be reset*. This makes it critical to load in your configuration information including keytabs and principals, before that first initialization of the UGI....
-
SPNEGO
# SPNEGO
SPNEGO is the acronym of the protocol by which HTTP clients can authenticate with a web site using Kerberos. This allows the client to identify and authenticate itself to a web site or a web service.
SPNEGO is supported by
* the standard browsers, to different levels of pain of use
* `curl` on the command line
* `java.net.URL` in Java7+
The final point is key: it can be used programmatically in Java, so used by REST client applications to authenticate with a remote Web Service.
### CAUT...
-
ZOOKEEPER and SASL
# ZOOKEEPER and SASL
Apache Zookeeper uses SASL to authenticate callers.
Other than SASL, its access control is all based around secrets which are shared between client and server, and sent over the (unencrypted) channel. This means they cannot be relied upon to securely identify callers.
## Enabling SASL in ZK
SASL is enabled in ZK by setting a system property. While adequate for a server, it's less than convenient when using ZK in an application as it means something very important: you cann...
-
java.security.krb5.conf
# JVM kerberos config customisation
java.security.krb5.conf
The JVM kerberos operations are configured via krb5.conf file specified in the JVM option "java.security.krb5.conf", which can be done on the JVM command line, or inside the JVM
System.setProperty("java.security.krb5.conf", krbfilepath);
Notes
* use double backslash to escape paths on Windows platforms, e.g. C:\\keys\\key1, or \\\\server4\\shared\\tokens
* Different JVMs (e.g. IBM JVM) want different fields in their krb5.conf file. Ho...
-
JAAS Configuration
# JAAS Configuration
-
Logging
# Logging
## Hadoop Logging
JVM Kerberos Library logging
You can turn Kerberos low-level logging on
-Dsun.security.krb5.debug=true
This doesn't come out via Log4J, or java.util logging; it just comes out on the console. Which is somewhat inconvenient —but bear in mind they are logging at a very low level part of the system. And it does at least log.
If you find yourself down at this level you are in trouble. Bear that in mind.
-
Error Messages to Fear
# Error Messages to Fear
# OS/JVM Layer
Some of these are covered in Oracle's Troubleshooting Kerberos docs. This section just highlights some of the common causes, other causes that Oracle don't mention —and messages they haven't covered.
## Server not found in Kerberos database (7)
* DNS is a mess and your machine does not know its own name.
* Your machine has a hostname, but it's not one there's an entry in the keytab for
## No valid credentials provided (Mechanism level: Illegal key size...
-
Kerberos Tests with MiniKDC
# Writing Kerberos Tests with MiniKDC
The Hadoop project has an in-VM Kerberos Controller for tests, MiniKDC, which is packaged as its own JAR for downstream use. The core of this code actually comes from the Apache Directory Services project.
-
Testing against Kerberized Hadoop clusters
Testing against Kerberized Hadoop clusters
This is not actually the hardest form of testing; getting the MiniKDC working holds that honour.
It does have some pre-requisites
1. Everyone running the tests has set up a Hadoop cluster/single VM with Kerberos enabled.
2. The software project has a test runner capable of deploying applications into a remote Hadoop cluster/VM and assessing the outcome.
It's primarily the test runner which matters. Without that you cannot do functional tests against any...
-
Low-level secrets
# Low-level secrets
KRB5CCNAME
The environment variable `KRB5CCNAME` (cite: http://web.mit.edu/kerberos/krb5-1.4/krb5-1.4/doc/klist.html)
As the docs say:
If the KRB5CCNAME environment variable is set, its value is used to name the default ticket cache.
IP addresses vs. Hostnames
Kerberos principals are traditionally defined with hostnames of the form<EMAIL_ADDRESS>not hbase/<IP_ADDRESS>/EXAMPLE.COM
The issue of whether Hadoop should support IP addresses has been raised [HADOOP-9019](...
-
Checklists
# Checklists
## All programs
[ ] Sets up security before accessing any Hadoop services, including FileSystem APIs
[ ] Sets up security after loading local configuration files, such as `core-site.xml`. Creating instances of HdfsConfiguration and YarnConfiguration will do this automatically.
[ ] Are tested against a secure cluster
## Hadoop RPC Service
[ ] Principal for Service defined. This is generally a configuration property.
[ ] `SecurityInfo` subclass written.
[ ] `META-INF/services/org.ap...


Soryy but there is no data, you can Add data below
Enter data below
Your geolocation
Latitude:
Longitude:


--- title: Taxi Printout Author: Fabien Pfaender Keywords: Description: Name: taxi --- {% include header.html %}
nǐhǎo wǒyàoqù
Hi, I am going to
Shànghǎi dàxué bǎoshān xiàoqū
Shanghai University BaoShan Campus
99 Shangda Road near Nanchen road


Ready to feel the joy of cracking computer security problems? Join us today by clicking the above button!
--- layout: title: "Join" permalink: /join/index.html description: "" ---
Ready to feel the joy of cracking computer security problems? Join us today by clicking the above button!


|
01.
08. 03
I
learned of the opening for a graphic designer/technical coordinator with
the Cesar E. Chavez Foundation through monster.com. I received my Bachelor
of Arts degree from CSULB in Journalism/Public Relations in 1991. I have
been working in web and graphic design for the past ten years, while keeping
abreast of the latest software and design techniques. I have excellent
organizational and analytical skills, and I can set priorities and meet
deadlines in a professional manner. As
my resume shows, I am well versed in html and design programs including
Photoshop, Illustrator, Quark, Pagemaker, and Dreamweaver. I believe my
web design skills, my project management experience, and my design sense
as it applies to typography, photography, and creative imagery will be
a valuable asset to your group.
As
the first designer and webmaster at Caltech, I collaborated extensively
with staff and faculty in creating and developing promotional material,
both online and in print. I served as designer and editor of the original
Caltech Alumni Newsletter and also taught classes for our staff, faculty,
and students in constructing web pages using HTML
code, image scanning/manipulation, and creative design. In addition,
as a native Spanish speaker, I was responsible for translating documents
and facilitating bilingual discussions for our geologists conducting research
in Mexico. At Shopsports.com, I translated all store web sites into Spanish.
January
through July of this year, I traveled through EuropeSweden, France,
Italy, Holland, Spain, Greece, Germany, and Switzerland. During that time,
I represented Entergate Communications at the COMDEX computer show in
Goteburg, Sweden, developed designs
for clients in Italy, Spain, and Holland, and took hundreds of digital
photographs of classic architecture, art, and people. I was privileged
to visit many impressive museums like the Louvre in Paris and the Uffizi
in Florence. All of these experiences have filled me with fresh creative
insights, ideas, and perspectives.
Now
that I have returned, I am full of energy and inspiration. I am seeking
full-time work and a chance to settle down. I look forward to speaking
with you after you have had an opportunity to review my qualifications.
Sincerely,
Beatrice Aispuro
|


--- layout: data_model title: InfectionPropagationPropertiesVocab-1.0 this_version: 4.1 ---
The InfectionPropagationPropertiesVocab-1.0 is the default MAEC Vocabulary for Infection/Propagation Capability/Strategic Objective/Tactical Objective Properties.
| Item | Description |
|---|---|
| scope | The 'scope' value refers to the scope of the infection or propagation performed by the malware instance via the Infection/Propagation Capability, i.e. whether it infects just the local machine or actively propagates to other machines as well. Recommended values are: 'local', or 'remote'. |
| infection targeting | The 'targeting' value refers to the type of targeting employed by the Infect Remote Machine Strategic Objective, i.e. whether the targeted machines are randomly selected, or chosen from some particular set. Recommended values are: 'targeted', 'semi-targeted', or 'untargeted'. |
| autonomy | The 'autonomy' value refers to the type of autonomy emplyed by the Infect Remote Machine Strategic Objective, i.e. whether the remote infection is performed autonomously.Recommended values are: 'semi-autonomous', 'autonomous'. |
| targeted file type | The 'targeted file type' value refers to the types of files targeted by the Infect File Strategic Objective.It is recommended that files be specified via their extension, e.g. "exe", "pdf", etc. |
| targeted file architecture type | The 'targeted file architecture' value refers to type of file architecture targeted by the Infect File Strategic Objective.>Recommended values are: '32 bit', or '64 bit'. |
| file infection type | The 'file infection type' value refers to the type of file infection employed by the Infect File Strategic Objective.Recommended values are: 'appending', 'prepending', 'overwriting', 'companion', 'variable key', 'polymorphic', or 'metamorphic'. |
| Field Name | Type | Description |
|---|---|---|
| @conditionoptional | ConditionTypeEnum |
This field is optional and defines the relevant condition to apply to the value. |
| @is_case_sensitiveoptional | boolean |
The is_case_sensitive field is optional and should be used when specifying the case-sensitivity of a pattern which uses an Equals, DoesNotEqual, Contains, DoesNotContain, StartsWith, EndsWith, or FitsPattern condition. The default value for this field is "true" which indicates that pattern evaluations are to be considered case-sensitive. |
| @apply_conditionoptional | ConditionApplicationEnum |
This field indicates how a condition should be applied when the field body contains a list of values. (Its value is moot if the field value contains only a single value - both possible values for this field would have the same behavior.) If this field is set to ANY, then a pattern is considered to be matched if the provided condition successfully evaluates for any of the values in the field body. If the field is set to ALL, then the patern only matches if the provided condition successfully evaluates for every value in the field body. |
| @delimiteroptional | string |
The delimiter field specifies the delimiter used when defining lists of values. The default value is "##comma##". |
| @bit_maskoptional | hexBinary |
Used to specify a bit_mask in conjunction with one of the defined binary conditions (bitwiseAnd, bitwiseOr, and bitwiseXor). This bitmask is then uses as one operand in the indicated bitwise computation. |
| @pattern_typeoptional | PatternTypeEnum |
This field is optional and defines the type of pattern used if one is specified for the field value. This is applicable only if the Condition field is set to 'FitsPattern'. |
| @regex_syntaxoptional | string |
This field is optional and defines the syntax format used for a regular expression, if one is specified for the field value. This is applicable only if the Condition field is set to 'FitsPattern'. Setting this attribute with an empty value (e.g., "") or omitting it entirely notifies CybOX consumers and pattern evaluators that the corresponding regular expression utilizes capabilities, character classes, escapes, and other lexical tokens defined by the CybOX Language Specification. Setting this attribute with a non-empty value notifies CybOX consumers and pattern evaluators that the corresponding regular expression utilizes capabilities not defined by the CybOX Language Specification. The regular expression must be evaluated through a compatible regular expression engine in this case. |
| @has_changedoptional | boolean |
This field is optional and conveys a targeted observation pattern of whether the associated field value has changed. This field would be leveraged within a pattern observable triggering on whether the value of a single field value has changed. |
| @trendoptional | boolean |
This field is optional and conveys a targeted observation pattern of the nature of any trend in the associated field value. This field would be leveraged within a pattern observable triggering on the matching of a specified trend in the value of a single specified field. |
| @vocab_nameoptional | string |
The vocab_name field specifies the name of the controlled vocabulary. |
| @vocab_referenceoptional | anyURI |
The vocab_reference field specifies the URI to the location of where the controlled vocabulary is defined, e.g., in an externally located XML schema file. |


An overview of using composer, console and services to speed up development
github.com/emarchak/fastpaced-drupal8 [github.com/emarchak/fastpaced-drupal8fastpaced_videos.git
Download Drupal to a docroot so we can control the config.
Use console to install composer_manager
which lets us use composer for drupal dependencies
$ composer create-project drupal/drupal fastpaced/docroot 8.0.2
$ cd fastpaced/docroot
$ drupal module:download composer_manager
$ drupal module:install composer_manager
$ php modules/contrib/composer_manager/scripts/init.php
Add to installer paths to let us download modules to ./docroot/modules/contrib
$ composer require composer/installers:~1.0 --update-no-dev
"installer-paths": { "modules/contrib/{$name}": ["vendor/package”] }
Install some dependencies!
$ composer require composer_manager:8.1.0-rc1
$ composer require drupal/admin_toolbar:8.1.11
$ composer require drupal/video_embed_field:8.1.0-rc3
$ drupal site:install
$ drupal module:install composer_manager
$ drupal module:install admin_toolbar
$ drupal module:install video_embed_field
Change sync directory in settings.php to export config to ./docroot/config/sync
$config_directories['sync'] = '../config/sync';
Let's create a fast-paced module...
$ drupal generate:module
Enter the new module name:
> Fast paced videos
.. and a speedy content type!
$ drupal generate:entity:bundle
Enter the module name [admin_toolbar]:
> fastpaced_videos
Enter the machine name of your new content type [default]:
> video
$ drupal module:install fastpaced_videos
Log into the site and configure the content type as needed, before you export it.
$ drupal config:export:content:type
> video
Export content type in module as an optional configuration (yes/no) [yes]:
> no
Can we generate some example content? Yes we can.
$ drupal create:nodes
Sadly, you still have to point-and-click your way through views.
But once that's done, we can export it in a flash!
$ drupal config:export:view
View to be exported [Archive]:
> Videos
Export view in module as an optional configuration (yes/no) [yes]:
> no
Include view module dependencies in module info YAML file (yes/no) [yes]:
> y
We'll be importing videos using guzzle, so we'll need to create a service to save them.
$ drupal generate:service
Enter the service name [fastpaced_videos.default]:
> fastpaced_videos.import
Enter the Class name [DefaultService]:
> ImportService
Create an interface (yes/no) [yes]:
> no
Do you want to load services from the container (yes/no) [no]:
> yes
Enter your service [ ]:
> entity.query
> manager
Refer to the repo for further changes to fastpaced_videos/src/ImportServiceInterface.php
Some parts of Drupal 8 are still procedural like 7. hook_theme and hook_cron are an example.
Add a fastpaced_videos.module and fastpaced_videos_cron().
Refer to the repo for further changes to fastpaced_videos.module
$ drupal generate:form:config
Enter the Form Class name [DefaultForm]:
> ImportSettingsForm
Do you want to generate a form structure? (yes/no) [yes]:
> y
Type: number
Input label: Import Max
Description: Maximum amount of nodes to import pre cron run
Default value: 10
Type: textfield
Input label: Search Terms
Description: Feed to import from
Default value: macaframa
Update routing file (yes/no) [yes]:
> yes
Generate a menu link (yes/no) [yes]:
> yes
A title for the menu link [ImportSettingsForm]:
> Fast Paced Import Settings
Menu parent [system.admin_config_system]:
> system.admin_config_services


Why do We Need a Bias Neuron?
Have you wondered why there is always a bias neuron in a perceptron, neural network? Does the algorithm work without a bias neuron? If yes, or no, either way, have you wondered why?
A bias neuron allows a classifier to shift the decision boundary left or right. In an algebraic term, the bias neuron allows a classifier to translate its decision boundary. To translation is to “move every point a constant distance in a specified direction”.
Now, let’s illustrate with an example. Consider a 2D perceptron trying to classify 10 points below.
Points that fall on the right side of the ideal decision boundary (green in picture) should be classified as +1, while all points on the left of the green line as -1.
We are going to train a 2D perceptron without bias to classify the 10 points. Without the bias neuron, the perceptron is unable to shift the blue decision boundary on the left to the blue decision boundary on the right, thus being never able to learn the ideal decision boundary or the closest match (the blue decision boundary on the right). The result is the learned decision boundary (red line) which must pass through the origin (0,0), has failed to classify some of the points. Notice that since the red line must pass through the origin due to having no bias neuron, however you rotate the red line, it will always fail to classify some points. The only solution is to shift the decision boundary to the right to where the blue decision boundary is.
You may find the code in R that demonstrates 1) how a perceptron will learn a decision boundary 2) how a perceptron fails to learn a decision boundary in this repository.


Lagos Lawmakers Urge Sanwo-Olu To Fix Traffic Problem
The House also resolved that the state Public Works Corporation should resort to scheduled maintenance of roads on working days and weekends instead of embarking on road maintenance at peak periods.
by SaharaReporters, New York
The Lagos State House of Assembly on Friday passed a resolution urging Governor Babajide Sanwo-Olu to embark on scheduled maintenance of roads to ease the present gridlock in the state.
The House also resolved that the state Public Works Corporation should resort to scheduled maintenance of roads on working days and weekends instead of embarking on road maintenance at peak periods, according to theui News Agency of Nigeria.
The House resolution followed a motion by Mr Temitope Adewale (Ifako-Ijaiye I Constituency) during plenary session.
Adewale complained bitterly over the current gridlock due to the ongoing road maintenance in the state.
He also advised Lagos State Traffic Management Authority to identify traffic flash points with a view to ensuring that officials of the authority were posted to the locations to regulate traffic.
The Speaker, Mr Mudashiru Obasa, called on the state Commissioner for Transport to liaise with contractors handling ongoing Lagos-Ibadan standard gauge railway line not to disrupt free flow of traffic, especially around Agege, Ikeja and Sogunle intersections.


{% blocktrans %}Your profile has not been reviewed, yet{% endblocktrans %}
{% blocktrans %}We are going to contact you soon.{% endblocktrans %}
{% trans 'Welcome to safemasks!' %}
{% trans 'This page is currently under development' %}
{% for message in messages %}
{% endif %}
{{message}}
{% endfor %}
{% lorem 5 %}


Congratulations on reaching the final project of the Robotics Nanodegree!
Previously, you worked on the Semantic Segmentation lab where you built a deep learning network that locates a particular human target within an image. For this project, you will utilize what you implemented and learned from that lab and extend it to train a deep learning model that will allow a simulated quadcopter to follow around the person that it detects!
Most of the code below is similar to the lab with some minor modifications. You can start with your existing solution, and modify and improve upon it to train the best possible model for this task.
You can click on any of the following to quickly jump to that part of this notebook:
We have provided you with a starting dataset for this project. Download instructions can be found in the README for this project's repo. Alternatively, you can collect additional data of your own to improve your model. Check out the "Collecting Data" section in the Project Lesson in the Classroom for more details!
import os
import glob
import sys
import tensorflow as tf
from scipy import misc
import numpy as np
from tensorflow.contrib.keras.python import keras
from tensorflow.contrib.keras.python.keras import layers, models
from tensorflow import image
from utils import scoring_utils
from utils.separable_conv2d import SeparableConv2DKeras, BilinearUpSampling2D
from utils import data_iterator
from utils import plotting_tools
from utils import model_tools
print("imported")
In the Classroom, we discussed the different layers that constitute a fully convolutional network (FCN). The following code will introduce you to the functions that you need to build your semantic segmentation model.
The Encoder for your FCN will essentially require separable convolution layers, due to their advantages as explained in the classroom. The 1x1 convolution layer in the FCN, however, is a regular convolution. Implementations for both are provided below for your use. Each includes batch normalization with the ReLU activation function applied to the layers.
def separable_conv2d_batchnorm(input_layer, filters, strides=1):
output_layer = SeparableConv2DKeras(filters=filters,kernel_size=3, strides=strides,
padding='same', activation='relu')(input_layer)
output_layer = layers.BatchNormalization()(output_layer)
return output_layer
def conv2d_batchnorm(input_layer, filters, kernel_size=3, strides=1):
output_layer = layers.Conv2D(filters=filters, kernel_size=kernel_size, strides=strides,
padding='same', activation='relu')(input_layer)
output_layer = layers.BatchNormalization()(output_layer)
return output_layer
The following helper function implements the bilinear upsampling layer. Upsampling by a factor of 2 is generally recommended, but you can try out different factors as well. Upsampling is used in the decoder block of the FCN.
def bilinear_upsample(input_layer):
output_layer = BilinearUpSampling2D((2,2))(input_layer)
return output_layer
In the following cells, you will build an FCN to train a model to detect and locate the hero target within an image. The steps are:
encoder_block
decoder_block
Create an encoder block that includes a separable convolution layer using the separable_conv2d_batchnorm()
function. The filters
parameter defines the size or depth of the output layer. For example, 32 or 64.
def encoder_block(input_layer, filters, strides):
# TODO Create a separable convolution layer using the separable_conv2d_batchnorm() function.
output_layer = separable_conv2d_batchnorm(input_layer, filters, strides)
return output_layer
The decoder block is comprised of three parts:
def decoder_block(small_ip_layer, large_ip_layer, filters):
# TODO Upsample the small input layer using the bilinear_upsample() function.
upsampled_small_ip_layer = bilinear_upsample(small_ip_layer)
# TODO Concatenate the upsampled and large input layers using layers.concatenate
concat_layer = layers.concatenate([upsampled_small_ip_layer, large_ip_layer])
# TODO Add some number of separable convolution layers
output_layer = separable_conv2d_batchnorm(concat_layer, filters, strides = 1)
output_layer = separable_conv2d_batchnorm(output_layer, filters, strides =1)
return output_layer
Now that you have the encoder and decoder blocks ready, go ahead and build your FCN architecture!
There are three steps:
def fcn_model(inputs, num_classes):
# TODO Add Encoder Blocks.
# Remember that with each encoder layer, the depth of your model (the number of filters) increases.
#here i'm starting with 32 filters and then just doubling for each layer
encoder_1 = encoder_block(inputs, filters=32, strides=2)
print("Encoder_1 Shape: {}".format(encoder_1.shape))
encoder_2 = encoder_block(encoder_1, filters=32, strides=2)
print("Encoder_2 Shape: {}".format(encoder_2.shape))
encoder_3 = encoder_block(encoder_2, filters=64, strides=2)
print("Encoder_3 Shape: {}".format(encoder_3.shape))
encoder_4 = encoder_block(encoder_3, filters=128, strides=2)
print("Encoder_4 Shape: {}".format(encoder_4.shape))
# TODO Add 1x1 Convolution layer using conv2d_batchnorm(), again double the filters to create 1x1
conv_layer_1_to_1 = conv2d_batchnorm(encoder_4, filters = 256, kernel_size=1, strides=1)
print("Conv 1-1 Shape: {}".format(conv_layer_1_to_1.shape))
# TODO: Add the same number of Decoder Blocks as the number of Encoder Blocks
decoder_1 = decoder_block(conv_layer_1_to_1, encoder_3, filters=128)
print("decoder_1 Shape: {}".format(decoder_1.shape))
decoder_2 = decoder_block(decoder_1, encoder_2, filters=64) #none or encoder_2
print("decoder_2 Shape: {}".format(decoder_2.shape))
decoder_3 = decoder_block(decoder_2, encoder_1, filters=32) #none or encoder_1
print("decoder_3 Shape: {}".format(decoder_3.shape))
decoder_4 = decoder_block(decoder_3, inputs, filters=32)
print("decoder_4 Shape: {}".format(decoder_4.shape))
# The function returns the output layer of your model. "x" is the final layer obtained from the last decoder_block()
return layers.Conv2D(num_classes, 1, activation='softmax', padding='same')(decoder_4)
The following cells will use the FCN you created and define an ouput layer based on the size of the processed image and the number of classes recognized. You will define the hyperparameters to compile and train your model.
Please Note: For this project, the helper code in data_iterator.py
will resize the copter images to 160x160x3 to speed up training.
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
image_hw = 160
image_shape = (image_hw, image_hw, 3)
inputs = layers.Input(image_shape)
num_classes = 3
# Call fcn_model()
output_layer = fcn_model(inputs, num_classes)
Define and tune your hyperparameters.
learning_rate = 0.001#start with .001, try .01 or .0001
batch_size = 32 # start with 16, then 20, go up to 32/64 or go down to 8/1
num_epochs = 50 #start with 50, go up to 100,then 150
steps_per_epoch = 50
validation_steps = 100
workers = 2
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
# Define the Keras model and compile it for training
model = models.Model(inputs=inputs, outputs=output_layer)
model.compile(optimizer=keras.optimizers.Adam(learning_rate), loss='categorical_crossentropy')
# Data iterators for loading the training and validation data
train_iter = data_iterator.BatchIteratorSimple(batch_size=batch_size,
data_folder=os.path.join('..', 'data', 'train'),
image_shape=image_shape,
shift_aug=True)
val_iter = data_iterator.BatchIteratorSimple(batch_size=batch_size,
data_folder=os.path.join('..', 'data', 'validation'),
image_shape=image_shape)
logger_cb = plotting_tools.LoggerPlotter()
callbacks = [logger_cb]
model.fit_generator(train_iter,
steps_per_epoch = steps_per_epoch, # the number of batches per epoch,
epochs = num_epochs, # the number of epochs to train for,
validation_data = val_iter, # validation iterator
validation_steps = validation_steps, # the number of batches to validate on
callbacks=callbacks,
workers = workers)
# Save your trained model weights
weight_file_name = 'model_weights'
model_tools.save_network(model, weight_file_name)
print("done")
Now that you have your model trained and saved, you can make predictions on your validation dataset. These predictions can be compared to the mask images, which are the ground truth labels, to evaluate how well your model is doing under different conditions.
There are three different predictions available from the helper code provided:
# If you need to load a model which you previously trained you can uncomment the codeline that calls the function below.
weight_file_name = 'model_weights'
restored_model = model_tools.load_network(weight_file_name)
The following cell will write predictions to files and return paths to the appropriate directories.
The run_num
parameter is used to define or group all the data for a particular model run. You can change it for different runs. For example, 'run_1', 'run_2' etc.
run_num = 'run_1'
val_with_targ, pred_with_targ = model_tools.write_predictions_grade_set(model,
run_num,'patrol_with_targ', 'sample_evaluation_data')
val_no_targ, pred_no_targ = model_tools.write_predictions_grade_set(model,
run_num,'patrol_non_targ', 'sample_evaluation_data')
val_following, pred_following = model_tools.write_predictions_grade_set(model,
run_num,'following_images', 'sample_evaluation_data')
Now lets look at your predictions, and compare them to the ground truth labels and original images. Run each of the following cells to visualize some sample images from the predictions in the validation set.
# images while following the target
im_files = plotting_tools.get_im_file_sample('sample_evaluation_data','following_images', run_num)
for i in range(3):
im_tuple = plotting_tools.load_images(im_files[i])
plotting_tools.show_images(im_tuple)
# images while at patrol without target
im_files = plotting_tools.get_im_file_sample('sample_evaluation_data','patrol_non_targ', run_num)
for i in range(3):
im_tuple = plotting_tools.load_images(im_files[i])
plotting_tools.show_images(im_tuple)
# images while at patrol with target
im_files = plotting_tools.get_im_file_sample('sample_evaluation_data','patrol_with_targ', run_num)
for i in range(3):
im_tuple = plotting_tools.load_images(im_files[i])
plotting_tools.show_images(im_tuple)
Evaluate your model! The following cells include several different scores to help you evaluate your model under the different conditions discussed during the Prediction step.
# Scores for while the quad is following behind the target.
true_pos1, false_pos1, false_neg1, iou1 = scoring_utils.score_run_iou(val_following, pred_following)
# Scores for images while the quad is on patrol and the target is not visable
true_pos2, false_pos2, false_neg2, iou2 = scoring_utils.score_run_iou(val_no_targ, pred_no_targ)
# This score measures how well the neural network can detect the target from far away
true_pos3, false_pos3, false_neg3, iou3 = scoring_utils.score_run_iou(val_with_targ, pred_with_targ)
# Sum all the true positives, etc from the three datasets to get a weight for the score
true_pos = true_pos1 + true_pos2 + true_pos3
false_pos = false_pos1 + false_pos2 + false_pos3
false_neg = false_neg1 + false_neg2 + false_neg3
weight = true_pos/(true_pos+false_neg+false_pos)
print(weight)
# The IoU for the dataset that never includes the hero is excluded from grading
final_IoU = (iou1 + iou3)/2
print(final_IoU)
# And the final grade score is
final_score = final_IoU * weight
print(final_score)


Founded in 2014, ENGMedix is a startup company based out of Waterloo, Ontario. Our goal is to create a software platform with the utilization of fitness wearables that allow injured/rehabilitation patients to monitor their exercise routines and track their progress while getting real-time feedback from a wearable device. This allows the patient to engage themselves into their recovery process, resulting in higher motivation and improved diagnosis and treatment by their physiotherapist. We are currently using the MYO armband, which is a gesture control device and in conjunction with our software application, rehab patients will now be able to do their exercise routines correctly in the comfort of their own home. The application monitors the user's range of motion during their exercise routines and instantly makes the data available to share with their physiotherapist online. This allows the physiotherapists to view the the patients' exercise data over a certain period of time while tracking their improvement.
Graduated from the University of Waterloo in Electrical Engineering, with a specialization in electronic hardware and power distribution. During his years in University he had always dreamed of starting his own company. Upon graduation he travelled for two months around Southeast Asia. After returning back from travelling abroad, he decided to create a start-up with the help of his former classmate Varun Davé. Together, they aquired the MYO armband and started to develop their software application for rehabilitation patients
Currently finishing up his Undergraduate Degree at the University of Waterloo's computer engineering program with a biomechanics option, Varun aims to develop technologies that can bridge the gaps between healthcare and modern technologies. With inspiration from his own cricket injuries, he decided to collaborate with his classmate Kyle Kraft, to work on a project that helps with a patient's rehabilitation program.
For the past 17 years Rob has been practicing athletic therapy and physical education focusing in Canadian University Sport. In the last 10 years Rob has been working under the University of Waterloo in the faculty of Applied Health Sciences in the Kinesiology department. Rob coordinates and lectures a number of sport injury courses. His teaching philosophy consists of learning by doing, therefore what is taught in the classroom is translated into real world practical situations, he currently trains student trainers and Sheridan College Athletic Therapy placement students. Rob also serves as the Head Athletic Therapist at the University, coordinating and managing a variety of health care providers that form the athletic therapy team at the University of Waterloo.
Dr. Cao studies human factors and ergonomics using both experiment and computational simulation methods. His current research focuses on modeling human performance and mental workload in complex human-machine interactions and developing cognitive engineering tools and innovative interfaces for quantitative human factors analysis and human performance optimization.
He has ongoing research in the areas of


 A node contains the start and end of the scope. If start or end is null then the start or end is not in the code. A parent node contains all scopes inside it as children nodes.
Constructor Summary
| Public Constructor | ||
| public |
constructor(parent: *, start: *) Creates a new node. |
Member Summary
| Private Members | ||
| private |
children: *[] |
|
| private |
end: * |
|
| private |
parent: * |
|
| private |
start: * |
Method Summary
| Public Methods | ||
| public |
addChild(child: *) Add a child to this node. |
|
| public |
balance() Balance the tree. |
|
| public |
Builds the scope tree. |
|
| public |
close(line: *) Close this scope. |
|
| public |
getChildren(): Array Get an array of all children of this node. |
|
| public |
Get the end of the scope. |
|
| public |
Get the parent of this node. |
|
| public |
Get the start of the scope. |
|
| public |
Returns true if the scope of this node is closed (meaning the scope has a start and an end point) |
Public Constructors
public constructor(parent: *, start: *) source
Creates a new node.
Params:
| Name | Type | Attribute | Description |
| parent | * | The parent node. |
|
| start | * | The start of the scope of this node. |
Private Members
private children: *[] source
private end: * source
private parent: * source
private start: * source
Public Methods
public addChild(child: *) source
Add a child to this node.
Params:
| Name | Type | Attribute | Description |
| child | * | The child to add to this node, should also be of type ScopeTree. |
public balance() source
Balance the tree. This enforces an ordering of the nodes in the tree such that parent nodes are always 1 scope above their child nodes.
By nature, the tree will be built in a balanced fashion. However because we might be dealing with snippets of code scope entries or exits (i.e. brackets) might be missing, which puts the tree out of balance. This method fixes that.
Particularly, this moves all left siblings of a node that only has an end but not a start under it, making them his children.
Example:
<-> : scope is open and closed
<- : scope is only opened but not closed
-> : scope is only closed but never opened
IMBALANCED TREE BALANCED TREE
-root- -root-
| |
|--------------- |-----
| | | | | |
| | | | | |
<-> <-> -> <- =======> -> <-
|
^ ^ ^ ^ |-----
| | | | | |
ok ok not ok | |
ok <-> <->
public build(lines: *, index: *, scopeEnterFunc: *, scopeExitFunc: *): ScopeTree source
Builds the scope tree. This function is designed in such a way that it can build scope trees over a variety of different programming languages. That is why as a parameter, the function takes two functions, each which determine where the scope starts or ends in a current line, if it does at all. These functions NEED to have the following signatures:
Index:Integer scopeEnterFunc(arrayOfAllLines:Array, lineToCheckIndex:Integer) Index:Integer scopeExitFunc(arrayOfAllLines:Array, lineToCheckIndex:Integer)
Both functions take the full array of lines and the index of the line to examine, and return the column within the line at which the scope is entered or exited. If there is no scope change in the line, null must be returned.
Params:
| Name | Type | Attribute | Description |
| lines | * | Array of lines to build the scope tree over. |
|
| index | * | Current line number. |
|
| scopeEnterFunc | * | Function with the above signature. It takes the full array of lines and the index of the line to examine, and returns the column within the line at which the scope is entered. If no scope is entered in the line, null must be returned. |
|
| scopeExitFunc | * | Function with the above signature. It takes the full array of lines and the index of the line to examine, and returns the column within the line at which the scope is exited. If no scope is exited in the line, null must be returned. |
public close(line: *) source
Close this scope. This means the end of the scope has been reached.
Params:
| Name | Type | Attribute | Description |
| line | * | The line that the scope ends at. |
public getParent(): ScopeTree source
Get the parent of this node. Returns null if this is the root node.


I'm a software developer in Chicago, IL. I like working on creative solutions for interesting problems. My favorite languages to work with are Ruby and Javascript. I get really excited about dogs.


2 Kings 9:10
And the dogs shall eat Jezebel in the portion of Jezreel, and there shall be none to bury her. And he opened the door, and fled.


In our ongoing effort to create a home away from home for you,
our Extended Stay
  offers have special rates for guests who would like to stay for three nights and above.
The longer you stay, the better it gets!
For the traveller who likes to take mini-vacations throughout the year,our Weekend Getaway offers
are designed for bookings made across a Friday,
Saturday or Sunday.
Book now and make the most of the Taj's value-for-money offer for your future stays.
Minimum advance booking restriction applies.
Indulge yourself with a variety of Indian and international cuisine available at our restaurants with the Breakfast Inclusive Rate.


| Package | Description |
|---|---|
| org.apache.taverna.server.master.admin |
This package contains the RESTful administration interface to Taverna Server.
|
| org.apache.taverna.server.master.rest |
This package contains the RESTful interface to Taverna Server.
|
| Modifier and Type | Field and Description |
|---|---|
Uri |
Admin.AdminDescription.allowNew |
Uri |
Admin.AdminDescription.currentRuns |
Uri |
Admin.AdminDescription.defaultLifetime |
Uri |
Admin.AdminDescription.executeWorkflowScript |
Uri |
Admin.AdminDescription.extraArguments |
Uri |
Admin.AdminDescription.factoryProcessMapping |
Uri |
Admin.AdminDescription.generateProvenance |
Uri |
Admin.AdminDescription.invokationCount |
Uri |
Admin.AdminDescription.javaBinary |
Uri |
Admin.AdminDescription.lastExitCode |
Uri |
Admin.AdminDescription.logFaults |
Uri |
Admin.AdminDescription.logWorkflows |
Uri |
Admin.AdminDescription.operatingCount |
Uri |
Admin.AdminDescription.operatingLimit |
Uri |
Admin.AdminDescription.permittedWorkflowURIs |
Uri |
Admin.AdminDescription.registrationPollMillis |
Uri |
Admin.AdminDescription.registrationWaitSeconds |
Uri |
Admin.AdminDescription.registryHost |
Uri |
Admin.AdminDescription.registryPort |
Uri |
Admin.AdminDescription.runasPasswordFile |
Uri |
Admin.AdminDescription.runCount |
Uri |
Admin.AdminDescription.runLimit |
Uri |
Admin.AdminDescription.serverForkerJar |
Uri |
Admin.AdminDescription.serverWorkerJar |
Uri |
Admin.AdminDescription.startupTime |
Uri |
Admin.AdminDescription.usageRecordDumpFile |
Uri |
Admin.AdminDescription.usageRecords |
Uri |
Admin.AdminDescription.users |
| Modifier and Type | Class and Description |
|---|---|
static class |
TavernaServerListenersREST.PropertyDescription
The description of a single property, done with JAXB.
|
static class |
TavernaServerRunREST.RunDescription.ListenerList
The description of a list of listeners attached to a run.
|
static class |
TavernaServerSecurityREST.PermissionsDescription.LinkedPermissionDescription
A description of the permissions granted to one user by the owner of
a workflow run.
|
| Modifier and Type | Field and Description |
|---|---|
Uri |
TavernaServerInputREST.InputsDescriptor.baclava
Where to find the overall Baclava document filename (if set).
|
Uri |
TavernaServerREST.PolicyView.PolicyDescription.capabilities |
Uri |
TavernaServerListenersREST.ListenerDescription.configuration
The location of the configuration document for the event listener.
|
Uri |
TavernaServerRunREST.RunDescription.createTime
The location of the creation time property.
|
Uri |
TavernaServerRunREST.RunDescription.creationWorkflow
The location of the creation workflow description.
|
Uri |
TavernaServerREST.PolicyView.PolicyDescription.enabledNotificationFabrics
How notifications may be sent.
|
Uri |
TavernaServerInputREST.InputsDescriptor.expected
Where to find a description of the expected inputs to this workflow
run.
|
Uri |
TavernaServerREST.ServerDescription.feed
Reference to the Atom event feed produced by this server.
|
Uri |
TavernaServerRunREST.RunDescription.finishTime
The location of the finish time property.
|
Uri |
TavernaServerRunREST.RunDescription.generateProvenance
Whether to generate a bundle describing the run.
|
Uri |
TavernaServerRunREST.RunDescription.inputs
The location of the inputs.
|
Uri |
TavernaServerRunREST.RunDescription.interaction
The location of the interaction feed.
|
Uri |
TavernaServerREST.ServerDescription.interactionFeed
Reference to the interaction feed for this server.
|
Uri |
TavernaServerRunREST.RunDescription.log
The log from the run.
|
Uri |
TavernaServerRunREST.RunDescription.name
The name of the run.
|
Uri |
TavernaServerREST.PolicyView.PolicyDescription.operatingLimit
Where to go to find out about the maximum number of operating
runs.
|
Uri |
TavernaServerRunREST.RunDescription.output
The location of the Baclava output.
|
Uri |
TavernaServerSecurityREST.Descriptor.permissions
Where to get the permissions on the run.
|
Uri |
TavernaServerREST.PolicyView.PolicyDescription.permittedListenerTypes
Where to go to find out about what listeners are allowed.
|
Uri |
TavernaServerREST.PolicyView.PolicyDescription.permittedWorkflows
Where to go to find out about what workflows are allowed.
|
Uri |
TavernaServerREST.ServerDescription.policy
Reference to the policy description part of this server.
|
Uri |
TavernaServerRunREST.RunDescription.runBundle
The bundle describing the run.
|
Uri |
TavernaServerREST.PolicyView.PolicyDescription.runLimit
Where to go to find out about the maximum number of runs.
|
Uri |
TavernaServerREST.ServerDescription.runs
References to the collection of runs (known about by the current
user) in this server.
|
Uri |
TavernaServerRunREST.RunDescription.securityContext
The location of the security context.
|
Uri |
TavernaServerRunREST.RunDescription.startTime
The location of the start time property.
|
Uri |
TavernaServerRunREST.RunDescription.status
The location of the status description.
|
Uri |
TavernaServerRunREST.RunDescription.stderr
The stderr of the run.
|
Uri |
TavernaServerRunREST.RunDescription.stdout
The stdout of the run.
|
Uri |
TavernaServerRunREST.RunDescription.usage
The usage record for the run.
|
Uri |
TavernaServerRunREST.RunDescription.workingDirectory
The location of the working directory.
|
| Modifier and Type | Field and Description |
|---|---|
List<Uri> |
TavernaServerInputREST.InputsDescriptor.input
Where to find the details of inputs to particular ports (if set).
|
List<Uri> |
TavernaServerRunREST.RunDescription.ListenerList.listener
The references to the individual listeners.
|
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.


{% extends "core/base.html" %} {% load tile_container %} {% block title %}Enable GitHub Two Factor Authentication{% endblock %} {% block breadcrumbs %}
GitHub has sent an invitation to our organization to your inbox.
When you have accepted the invitation
Click Here {% endblock content %}


React Native Apps
code
I generally look up and write down every word I come across that I don't know. The "Words" app takes all these words
and serializes them out to a React Native app from a Rails server. This app allows for quick and easy lookups of definitions,
and also provides a little quiz section as a way for me to memorize and familiarize myself with these words further.
Give it a shot!
This app was built in conjunction with a talk I gave on
Reactotron at the React-Native Vancouver meetup this autumn. It's built using
Expo and uses
redux,
redux-saga, and
react-navigation.
code
This simple app supplemented a tech talk I gave at work about animations in React Native. It's not meant to do much other
than showcase some of the animation possibilties that React Native harbours. Only one third-party animation library
was brought in for this app, otherwise it focuses on
Layout Animation, and
Animated. This app was also built using
Expo.
Ruby on Rails Apps
code
I'm the web developer and a co-editor for the Charcuterie publication.
I've built its initial web presence as a Ruby on Rails application so that I could take advantage of the amazing open-source
gem
alongslide built by the folks at
Triple Canopy to create memorable and unique online reading experiences. Take a look at one of the essays of this
publication for an example of how its being used!
Charcuterie strives to provide a forum for experimental writing and informed polemics without pedantry. It assembles
a polyphony of inquiry and documents the messy landscape of opinion and critique that unravels in close proximity to
where we work, live and make art in Vancouver.
code
abcdefghijklnmoqprstuvwxyz is a site for poetry reviews and weblog on contemporary poetics. Currently updated infrequently,
I used to design, develop, and write poetry reviews bi-weekly. Having it as a Ruby on Rails app made it easier to automate
certain tasks while building it - dealing with assets, reusing partials, generating pages - as well as integrating
a mailing list, webscraping (various poetry-related things), and to leave room for future additions such as an
ActionCable
chat section or something.
code
Scan is a contemporary art publication based in Winnipeg, MB run by students at the University of Winnipeg. This Ruby
on Rails CMS makes up the online portion of their publication, and allows the students to add issues and essays to
the site whenever they please.
It's a very simple
CRUD
app, but it gets the job done.
Static Sites
code
I co-designed and developed the website of the Bartleby publication - a free and occasional leaflet of criticism and
other writing published in Vancouver, Canada.
This is a simple site using Bootstrap and jQuery/UI to emulate the experience of being able to sift through numerous
leaflets, as if they were strewn across a flat surface.
code
Victoria Lum is a graphic designer based in Vancouver, Canada, and this is her website.
code
Here nor There is a podcast series featuring emerging artists/ musicians/writers/ curators/organizers/ et al. based in
Vancouver, BC, Canada on unceded Coast Salish, Musqueam, Squamish, Sto:lo and Tsleil-Waututh territories. It is hosted
and produced by Gabi Dao, an artist in Vancouver.
code
An online portfolio of local Vancouver photographer and visual artist Graeme Wahn.
code
This is an online portfolio of Vancouver visual artist Catherine de Montreuil.
code
I Was Trying to Describe You To Someone + Anticipating Distance is a static site which documents the two group exhibitions
of Vancouver and Winnipeg artists.
code
Ignis Fatuus is the promotional website and fictional blog of Hermes, the neurotic scientist from Ingrid Olauson's "Fort
Eff" - a theatrical production staged in Vancouver in June 2015.


You are asked to write a C++ program that determines student grades at the end of the semester. For each student, identified by an integer number between 1 and N (N ≤ 80), four exam grades must be kept, and the final grade must be computed. The final grade is computed as follows:
Final grade = 0.2 * grade1 + 0.3 * grade2 + 0.3 * grade3 + 0.2 * grade4
Create a two-dimensional list of integer student numbers and grades of each student, and write a function that sort and displays data in the array in decreasing final grade order.
result:


Back
Max Kajiwara
Project Lead
About
Josh Armantrout
Backend
About
Tristan Linehan
Frontend
About
Javon McCoy
Homepage UI
About
Brad Cantrell
Homepage UI
About


Daffy Duck for President!
Name
Email
Communications Opt-In
Campaign Email Updates
Rabbit Season Newsletter
Join Team Daffy!
Will you contribute?
Yes!
No, but I would like to help in other ways.
No, I'm just going to sit back and watch Bugs win.
Contribution Amount
$5
$10
$25
Other
Message
I accept the Terms & Conditions.
Submit
Reset


Alternate title:
High Sierra Snow Frolic
We jumped on the chance for a 3 night 4 day backpacking trip to the Desolation Wilderness on Memorial Day weekend, and had a really enjoyable trip. Way more snow than we expected, but the lack of other people really enhanced the experience.
We left on Wednesday night, spent the first night in the Strawberry Lodge, and returned on Sunday. Thursday and Friday we saw 7 people total the entire two days, but the back country became more like Grand Central station on Saturday and Sunday, and we encountered maybe another 100 before getting back to the car.
The Strawberry Lodge is an historic roadhouse that has been around since the 1850s, and is located maybe 10 minutes from Echo Lake (
location
), where we entered the wilderness. We rented a small european style room (shared bathrooms) pretty cheaply and enjoyed a country dinner and breakfast in the restaurant before starting the backpacking trip on Thursday.
Link to
Strawberry Lodge
Usually we start the trip later in the year and take the water taxi at the east end of Lower Echo Lake (
location
), which shaves off about 1.5 miles of the trek around the shore of Upper and Lower Echo Lakes. This year since we got started early, the boat was not running yet so we hiked along the shore.
At the northwest corner of Upper Echo Lake (
location
) we jumped on the Pacific Crest Trail (PCT) and planned to take that 5 miles W-NW to Lake Aloha, one of our favorite spots in the world.
At the advice of Larissa and Mom and Dad, I was outfitted with a new satellite personal locator beacon for this trip (the Delorme InReach), and since my 15 yr old GPS finally stopped working I had also bought a new one (Garmin Oregon) together with some 24K topo maps of the Western US. The GPS turned out to be invaluable as you will hear about later, and the PLB allowed us to post from a set of 3 short messages to update our status while in the backcountry.
At the start of the trip near the dock on Lower Echo Lake
Just west of Upper Echo Lake on the Pacific Crest Trail (PCT), at the boundary of the Desolation Wilderness
Snow Snow Snow
We have been in Tahoe before in May (see
here
), but never into the Desolation Wilderness. We didnt really plan for the amount of snow we encountered. In retrospect, snowshoes would have been entirely appropriate. For several miles the trail was completely covered by the snow, and since we were some of the first ones out, there were no reliable trails to follow.
The top of a trail marker above the snow.
When we started out in the snow I was convinced I could follow the terrain and didnt really need the GPS, so we ended up on the "moron trail" pretty quickly. We ended up about a mile off course, above Lake Lucille (
location
), on a very scary talus slope where the rocks shifted with every step.
Erick on the scary talus slope
I finally figured out to hold the GPS in one hand and carefully watch in order to get back on the trail. After another couple miles of trudging through the snow we made it to Lake Aloha. We found a great new campsite and recorded a waypoint on the GPS in order to more easily find it again.
Tent meditation with the far shore of Lake Aloha in the background. What a great spot.
Since it became pretty cold very fast after the sun went down, we went to the tent right after dinner and played some cards. I spent some time teaching the boys important life skills like the difference between a flush and a straight, how you need a straight flush to beat four of a kind, and where a full house sits in the ranking.
I made coffee with the titanium french press, always a really nice way to start the day
The kids had tea
Lake Aloha to Susie Lake
Now the plan was to go to Susie Lake, our favorite camping spot. We had originally planned to go a lot farther, but the snow really slowed us down and cramped the travel plans. 1 mile slipping and sliding on the snow is like 2 and 1/2 on the clear trail.
On the trail around the north end of Lake Aloha
Aloha Traverse (1)
Aloha Traverse (2). Lots of snow.
At the north-west end of Lake Aloha, we came to the junction of the PCT with the trail to Mosquito Pass. You can read about our trip to the aptly named Mosquito Pass
here
. We continued on the PCT towards to north, to Heather Lake and Susie Lake.
The pass down from Aloha towards Heather lake was a very long stretch on steep snowy faces with no trail visible. But once you clear the first 1/2 mile, the rest of the trail from Aloha to Heather is really my favorite bit of trail on the planet, even better than the high peaks at Pinnacles National Monument. There are waterfalls to cross, and a fantastic stretch on the shore of Heather Lake just below a huge slope of rocks at the angle of repose that is really inspiring.
Pacific Crest Trail marker
A stream crossing with a lovely alpine pond in the background
Log crossing at the south end of Susie Lake (1)
Log crossing at the south end of Susie Lake (2)
We traversed a nasty stretch of snow at the south end of the lake, pictures below on the return. Then we found a new campsite on the north east end of the lake that was fantastic. Sheltered from the wind and with enough trees for some privacy, but with a small rocky promontory onto the lake. There were two other people camped at the lake, but they left after we got set up.
Rounding the south east corner of the lake (1)
Rounding the south east corner of the lake (2)
Some critter Erick captured with his camera
Polar Bear Qualification
Remember all those years on Valcour Island, swimming before Memorial Day was a tradition? Well swimming in high Sierra snowmelt is actually colder, but we are officially polar bears. I went in first, after considerable time to motivate myself. The kids were unable to get in the water by themselves, so I was forced to throw them in, so they too could join the polar bear ranks.
Swimming
Lying on a flat sun warmed rock in order to take the chill off
Saturday morning at Susie Lake
Re-crossing the log jam at the south end of Susie Lake (1)
Re-crossing the log jam at the south end of Susie Lake (2)
Scary Traverse
The second scary thing on the trip was the traverse of the south end of Susie lake. The trail was completely covered, and the snow was at a steep angle with the price of slipping a swim in the lake with full packs.
The trail runs on the far right side of this picture, buried under the snow
Traversing the scary bit. Maybe instead of taking pictures I should have roped up the boys.
Another off camber section of trail covered by snow
Taking a break in a picturesque spot
Waterfall (1)
Waterfall (2)
Sunset back at the Lake Aloha campground (1)
Sunset back at the Lake Aloha campground (2)
Setting up for a final picture of Lake Aloha
Some wildflowers up on the slope above Lake Aloha
Lake Aloha (1) -- we climbed up the slope to get some good pictures
Lake Aloha (2)
Back on the trail we took a final photo looking back towards Lake Aloha
Lots of snow on the trail back to Echo Lake (1)
Lots of snow on the trail back to Echo Lake (2)
Overall a really excellent trip. We have decided to try to get back one more time before we leave for Australia, and hopefully bring Larissa and Katerina for their first time in the spectacular Desolation Wilderness.
Blogger backup created by Robert Washbourne


--- layout: post title: diff this in vim tags: ---
In vim, if you pull up two files side by side, you can simply run
:diffthis
and see the differences quickly. Hotness.


Write FizzBuzz. In FizzBuzz, a function
fizzbuzz()
takes an argument
n
and does the following:
null
That's FizzBuzz. But that has nothing to do with The DOM, so we're not finished.
Below, you will find 3

elements,
each with a unique

for results.
Each

has a specific ID we can use
to "capture" it with JavaScript.
So after writing a working fizzbuzz()
, your
next job is to take the results from 1 to 50 and
append them to the appropriate list.


Enum HttpParts
Marker for the response
Namespace:Dapplo.HttpExtensions.Support
Assembly:Dapplo.HttpExtensions.dll
Syntax
public enum HttpParts
Fields
| Improve this Doc View SourceMultipartBoundary
The property specifies the boundary of a multi-part
Declaration
MultipartBoundary = 2
None
Default value.
Declaration
None = 0
Request
Marks the class as a request class
Declaration
Request = 1
RequestContent
Specifies the content for uploading
Declaration
RequestContent = 5
RequestContentType
Specifies the content-type for uploading
Declaration
RequestContentType = 6
RequestHeaders
Specifies the request headers to send on the request, this should be of type IDictionary where key is string and value is string
Declaration
RequestHeaders = 7
RequestMultipartFilename
The property specifies the filename of the content in a multi-part post
Declaration
RequestMultipartFilename = 4
RequestMultipartName
The property specifies the name of the content in a multi-part post
Declaration
RequestMultipartName = 3
Response
Marks the class as a reponse class
Declaration
Response = 8
ResponseContent
The property will get the response content, HttpResponseMessage can also be used
Declaration
ResponseContent = 9
ResponseContentType
Specifies the content-type, either for uploading or for the response
Declaration
ResponseContentType = 11
ResponseErrorContent
The property will get the response content, when an error occured
Declaration
ResponseErrorContent = 10
ResponseHeaders
Marks HttpResponseHeaders,
Declaration
ResponseHeaders = 13
ResponseStatuscode
The Http-Status code, should be of type HttpStatusCode
Declaration
ResponseStatuscode = 12


HyberBubbleTextView
public class HyberBubbleTextView: UITextView, UITextViewDelegate
UITextView
with bubble border
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Undocumented
Declaration
Swift
public class HyberBubbleTextView: UITextView, UITextViewDelegate
-
Copies contents of
self
to the pasteboard.At fisrt selects all objects in the current view. Than invokes
copy
method ofsuper
class. And cancels selection.This method is invoked when the user taps the Copy command of the editing menu. A subclass of UIResponder typically implements this method. Using the methods of the UIPasteboard class, it should convert the selection into an appropriate object (if necessary) and write that object to a pasteboard. The command travels from the first responder up the responder chain until it is handled; it is ignored if no responder handles it. If a responder doesn’t handle the command in the current context, it should pass it to the next responder.
Declaration
Swift
@objc public func customCopy(sender: AnyObject?)
Parameters
sender
The object calling this method.
-
Copy the selection to the pasteboard. This method is invoked when the user taps the More command of the editing menu.
Declaration
Swift
@objc public func more(sender: AnyObject?)
Parameters
sender
The object calling this method.


Microsoft did one thing right, C# (Part 1)
by Jaime Reynoso -
C# is an awesome language
Here are some of my favorite features
The Using Statement
'''
using(OracleConnection connect = new OracleConnection([Insert Connection string here]))
{
// Here I'm going to use the connection somehow
}
'''
The using statement essentially gets translated into a try/catch block, so this syntax tells the garbage collector to avoid disposing the object while it's in the scope of the using statement. Remember, in order to use the using statement on an object you created, you need to create an object that implements IDisposable
LINQ
'''
List<People> Students = new list<Student>();
[Adding all the students here]
//List for students with a GPA above 3.0
List<Student> MagnaCumLaude = Student.Where(x => x.GPA > 3.0).ToList<Student>();
'''
Linq has a great, intuitive syntax. It works on anything that implements the interface IEnumerable and our good friend google can show you all the classes that implement IEnumerable
Entity Framework
'''
public class Student
{
#region Properties
public double GPA{get; private set;}
public string Name{get; set;}
#endregion
#region Constructors
public Student(string Name = string.Empty, GPA = 0.0)
{
this.Name = (string.IsNullOrEmpty(Name))? "Jane Doe": Name;
this.GPA = GPA
}
#endregion
}
//After the model is created
public class ApplicationContext: DBContext
{
public ApplicationContext():base("DefaultConnection"){}
public DBSet<Student> Students{get; set;}
}
//Now using it in a class
public class schoolController{
private ApplicationContext db = new ApplicationContext();
public void AddStudent(String Name, double GPA)
{
//this adds a student to the Database
db.Students.Add(new Student(Name, GPA));
}
public void GetGoodStudents(double standards)
{
return (from Student
in db.Students
where Student.GPA > standards
select Student).ToList();
}
}
'''
The Entity Framework is an Object Relational Mapper that maps objects you created to a row in a database, but it has a couple of notable features
1.It could be code first, database first or some sort of combination in between. 2.You don't have to write 1x10^20 lines of code to pull, and create objects that encapsulate your data 3. It makes sense
MVVM with WPF
First let's say you have a grid in your XAML that formats the way the program will look
'''
<grid>
<button
Command = "{Binding NameCommand}"/>
</grid>
'''
Then in the back-end, somewhere
'''
Public ICommand NameCommand {get; set;}
'''
Then define a function that determines when the button should be enabled, this is Optional.
'''
private bool CanName()
{
if(some property)
return true;
return false;
}
'''
This is what it will do
'''
private void Name()
{
//Doing Something
}
'''
and don't forget in your constructor
'''
NameCommand = new RelayCommand(this.DoSomething, this.Name );
'''
Disclaimer: RelayCommand is a class inside of MVVM light, if you haven't referenced the framework, make sure to type
'''
Install-Package MvvmLight
'''
Key Notes
The MVVM design pattern was designed with the upmost modularity in mind. The View contains the format for the way the application should look. The ViewModel contains the business logic ( also referred to as the Controller in MVC ) and the Model contains the objects that you've created and are using. For more information MSDN Article
I love the MVVM Design pattern
MVVM is not perfect, it has a bit of an overhead, but it's a good separation of design goals.
Data-Binding is intuitive


"Irresistible. The characterizations are so full-bodied it seems okay to root for
the villains as well as the victims."
- The Washington Post Book World
"A marvelous contemporary writer with something new to say, something as rare as it
is rewarding."
- New York Daily News
$23.00
Details
Pages
310 Pages
Cover
Hardcover
Publisher
Simon& Schuster
Language
English
Published
September 2017
Genre
Thriller
Weight
6.8 ounces
Summary
Daniel Graham MacCormick - Mac for short - seems to have a pretty good life. At age thirty-five he's
living
in Key West, owner of a forty-two-foot charter fishing boat, The Maine. Mac served five years in the
Army as
an infantry officer with two tours in Afghanistan. He returned with the Silver Star, two Purple Hearts,
scars that don't tan, and a boat with a big bank loan. Truth be told, Mac's finances are more than a
little
shaky.
One day, Mac is sitting in the famous Green Parrot Bar in Key West, contemplating his life, and waiting
for
Carlos, a hotshot Miami lawyer heavily involved with anti-Castro groups. Carlos wants to hire Mac and
The
Maine for a ten-day fishing tournament to Cuba at the standard rate, but Mac suspects there is more to
this
and turns it down. The price then goes up to two million dollars, and Mac agrees to hear the deal, and
meet
Carlos's clients - a beautiful Cuban-American woman named Sara Ortega, and a mysterious older Cuban
exile,
Eduardo Valazquez.
What Mac learns is that there is sixty million American dollars hidden in Cuba by Sara's grandfather when
he
fled Castro's revolution. With the "Cuban Thaw" underway between Havana and Washington, Carlos, Eduardo,
and
Sara know it's only a matter of time before someone finds the stash - by accident or on purpose. And Mac
knows if he accepts this job, he'll walk away rich…or not at all.
Brilliantly written, with his signature humor, fascinating authenticity from his research trip to Cuba,
and
heart-pounding pace, Nelson DeMille is a true master of the genre.
About the author
Nelson Richard DeMille was born in New York City on August 23, 1943 to Huron and Antonia (Panzera)
DeMille,
then moved with his parents to Long Island. He graduated from Elmont Memorial High School, where he
played
football and ran track.
DeMille spent three years at Hofstra University, then joined the Army where he attended Officer Candidate
School and was commissioned a Lieutenant in the United States Army (1966-69). He saw action in Vietnam
as an
infantry platoon leader with the First Cavalry Division and was decorated with the Air Medal, Bronze
Star,
and the Vietnamese Cross of Gallantry.
After his discharge, DeMille returned to Hofstra University where he received his bachelor’s degree in
Political Science and History. He has three children, Lauren, Alexander, and James, and he and his wife
reside on Long Island.
DeMille's first major novel was By the Rivers of Babylon, published in 1978, and is still in print as are
all
his succeeding novels. He is a member of American Mensa, The Authors Guild, and is past president of the
Mystery Writers of America. He is also a member of International Thriller Writers and was chosen as
ThrillerMaster of the Year 2015. He holds three honorary doctorates: Doctor of Humane Letters from
Hofstra
University, Doctor of Literature from Long Island University, and Doctor of Humane Letters from Dowling
College.
Nelson DeMille is the author of: By the Rivers of Babylon, Cathedral, The Talbot Odyssey, Word of Honor,
The
Charm School, The Gold Coast, The General's Daughter, Spencerville, Plum Island, The Lion's Game, Up
Country, Night Fall, Wild Fire, The Gate House, The Lion, The Panther, The Quest, Radiant Angel, and The
Cuban Affair. He also co-authored Mayday with Thomas Block and has contributed short stories to
anthologies,
and book reviews and articles to magazines and newspapers.