(ArcGIS 10 for Economics Research)
mkudamatsu.github.io/gis_lecture2.html
Masayuki Kudamatsu
12 October, 2018
Press SPACE to proceed.
To go back to the previous slide, press SHIFT+SPACE.
Match features from two vector datasets by location
Henderson et al. (2018) find these ecoregions predict where economic activities take place
But we cannot easily match this data to administrative areas without spatial join
Weather data: increasingly popular among economists
But grid cells are the units of observation in weather data
Evenly spaced meridians and parallels divide the earth into grid cells
(Image source: ArcGIS Help "What are grids and graticules?")
$\Rightarrow$ Spatial Join matches grid cells with socio-economic units
1. Alsan (2015)
2. Replicate Alsan (2015)
3. Introduction to Python for ArcGIS
Did Tsetse flies cause Africa's poverty?
Important?
Original?
Feasible?
Ethnographic Atlas + Murdock (1959)'s map
Weather at 2°x2° grid cells in 1871 from 20th Century Reanalysis Project
(Figure 2 of Alsan 2015)
Feed temperature and humidity into the these curves
$\Rightarrow$ Tsetse Suitability Index (steady-state population)
We will learn how to match these two data
\begin{align*} Y_j = \alpha + \delta TSI_j + \boldsymbol{X}'_{j}\boldsymbol{\omega} + \varepsilon_{j} \end{align*}
| $Y_j$ | Precolonial outcome for ethnic group $j$ |
| $TSI_j$ | Tsetse fly suitability index |
| $\boldsymbol{X}_j$ | Controls (incl.\ temperature, humidity in 1871) |
(Table 1 of Alsan 2015)
1. Use the Spatial Join tool (Exercise 2)
2. Export attribute tables to Stata (Exercise 3)
3. Create grid cell polygons (Exercise 1)
In natural science data (e.g. weather data),
the unit of observations is often a grid cell.
Examples:
Grid cell polygons help merge these data with other data
We will use 3 geo-processing tools for this exercise:
As in Lecture 1, we use these tools in Model Builder.
code/lecture2.tbx/exercises1-3
Spatial resolution: 2° x 2°
Africa: roughly spans within
$\Rightarrow$ Create square polygons whose centroid is from (-20°, -40°) to (60°, 40°) at the interval of 2°
Output Feature Class: ...\Lecture2\temporary\fishnet.shp
temporary/
folder
Fishnet Origin Coordinate
X Coordinate: -21
Y Coordinate: -41
$\Rightarrow$ Bottom-left polygon's centroid will be (-20°, -40°)
Y-Axis Coordinate
X Coordinate: -21
Y Coordinate: -10 (or any value other than -41)
$\Rightarrow$ Y-Axis will be perpendicular to the horizontal X-Axis
Number of Rows: 41
Number of Columns: 41
Uncheck "Create Label Points"
Geometry Type: POLYGON
The Create Fishnet tool doesn't assign any coordination system to the output file
Ethnographic Atlas data uses geographic coordinate system
$\Rightarrow$ Assign WGS 1984
How? We already learned this in Lecture 1 Exercise 6.
Input Dataset or Feature Class: fishnet.shp
Coordinate System: GCS_WGS_1984
Now save and run the Model.
Browse the output.
Overlay the Ethnographic Atlas data
.../Lecture2/input/tribemap.shp
20th Century Reanalysis data cell polygons should cover the whole mainland Africa.
Browse the attribute table of the output (cf. Lecture 1)
We don't see centroid coordinates to match with weather data...
$\Rightarrow$ Use the Add Geometry Attributes tool
To add the centroid coordinate values in attribute table
Input Features: fishnet.shp (2)
fishnet.shp
(which is the output from Create Fishnet)
Geometry Properties: check CENTROID
Note: this tool overwrites the input file
Now save and run the Model.
Browse the output and its attribute table.
Is everything as expected?
Ethnic homelands: polygons
How to match polygons with polygons?
One way to go: match polygon centroids with polygons
Mean position of all points on the polygon boundary
$\Rightarrow$ Can be matched with a single weather data grid cell
1. Create ethnic homeland centroid point features
.../input/tribalmap.shp
)
2. Use Spatial Join to match ethnic homeland centroids with 20th Century Reanalysis grid cells
We now add these processes to the Model for Excercise 1
XY Table: ...\input\tribalmap.shp
X Field: tribelon
Y Field: tribelat
Spatial Reference: GCS_WGS_1984
Leave the other options as they are.
Input Features: tribalmap_Layer
Output Feature Class: ...\temporary\ethno_centroids.shp
Now save and run the Model.
Browse the output and its attribute table.
Is everything as expected?
Target Feature Class: ethno_centroids.shp
Join Features: fishnet.shp
Output Feature Class: ...\temporary\ethno_centroids_with_20cr2.shp
Join Operation: JOIN_ONE_TO_ONE
Check "Keep All Target Features"
Field Map of Join Features: leave as it is
Match Option: INTERSECT
Now save and run the Model.
Browse the output and its attribute table.
Is everything as expected?
Now we want to export the attribute table of ethno_centroids_with_20cr2.shp
to Stata
3 ways to export the attribute table to the format readable by Stata
Converts the attribute table into an Excel file
Then use import excel in Stata
But Excel cannot handle more than 65535 rows...
Converts the attribute table into an ASCII text file
Then use import delimited in Stata
This tool will automatically add centroid coordinates to the output ASCII file
Unlike Table To Excel, must specify which fields to export
This Stata ado directly reads a shapefile's attribute table
But it works only with polygons
1. Table To Excel
...\output\ethno_centroids_with_20cr2.xls
2. Export Feature Attribute to ASCII
...\output\ethno_centroids_with_20cr2.txt
Browse the exported tables
ethno_centroids_with_20cr2.txt
has two additional columns
Export Feature Attribute to ASCII is preferrable for
But Table To Excel is simpler to execute
Look at lec2model.tbx/exercises1-3
in the downloaded data folder solutions4exercises
Essential for replication
Convenient to repeat the same geo-processing
Use Model Builder to write a draft script
Then edit the draft script
Throughout the course, we will learn various scripting tips
1. If the model is not opened yet, right-click the model in Catalogue Window and click "Edit"
2. Click in the menu bar "Model > Export > To Python Script"
3. Save as ***.py
lecture2.py
and save it in .../Desktop/Lecture2/code/
Use Python's default editor IDLE
Or use your favourite text editor
1. Click the Windows icon at the bottom-left
2. Click ArcGIS > IDLE (Python GUI)
3. Click File > Open to read a script
1. Click the Atom icon (either on Desktop or Taskbar)
2. Click File > Add Project Folder... and choose ...Desktop\Lecture2
Lecture2/
folder
3. Click code > lecture2.py to read a script
Have your own template script for executing ArcGIS geo-processing tools
Then copy-and-paste command lines from the exported script to your template
For this lecture, I've prepared the template script (.../Lecture2/code/template4L2.py
)
Using this template script, we now learn the basics of Python scripting for ArcGIS
cf. To learn Python, visit Codecademy (free of charge)
1. Object, Property, Method
2. Try-Except statement
3. String variables
4. Print
5. Comments
An object is a set of commands
arcpy
is an object containing all the ArcGIS geoprocessing tools
The import
command reads this object (i.e. launch ArcGIS)
An object may contain smaller objects
arcpy.env
is an object contained in arcpy
Two types of commands in an object: property and method
Contains a value (numbers, strings, True/False)
To assign a new value of the property, type:
object.property = value
overwriteOutput
: whether the overwriting of output files is allowed
workspace
: working directory name
By default, overwriting the output file is not allowed.
The following command line (case-sensitive!)
arcpy.env.overwriteOutput = True
allows you to overwrite output files.
arcpy.env.workspace = "D:/temp"
Never use \
\
is used for line continuation
\
is used for directory path
Use /
or \\
\\
is a function (i.e. transform inputs into outputs)
e.g. Geo-processing tool in ArcGIS: methods of the arcpy
object
To use a method, type:
object.method(arg1, arg2, ...)
The arcpy
method names mix uppercase and lowercase letters as well as underscores
Arguments for these methods are often very long with lots of [ ] " ' ; ,
etc.
$\Rightarrow$ Better to first use Model Builder to export the draft script (until you get used to Python programming)
Visit ArcGIS for Desktop website and type the method name in the search field at the top row
1. Object, Property, Method
2. Try-Except statement
3. String variables
4. Print
5. Comments
If you simply run commands and get an error, you won't get a message on what went wrong
Try-except statement is essential to know what the error is about
Python first attempts to execute indented commands below try:
If there is no error:
Python skips all the indented commands after except:
If there is an error:
Python executes the indented commands below except:
$\Rightarrow$ Write commands for error messages after except:
1. Copy the geoprocessing commands in the exported script
2. Paste them between try:
and except:
in the template script
3. Select commands to be indented
4. Click the tab key (Atom) or Format > Indent Region (IDLE)
############################## Geoprocessing ##########################
try:
# Process: Create Fishnet
arcpy.CreateFishnet_management(fishnet_shp, "-21 -41", "-21 -10", "2", "2", "41", "41", "", "NO_LABELS", "DEFAULT", "POLYGON")
# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(tribalmap_shp, "lon", "lat", tribalmap_Layer, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400<PHONE_NUMBER>;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision", "")
# Process: Copy Features
arcpy.CopyFeatures_management(tribalmap_Layer, ethno_centroids_shp, "", "0", "0", "0")
# Process: Define Projection
arcpy.DefineProjection_management(fishnet_shp, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]")
# Process: Add Geometry Attributes
arcpy.AddGeometryAttributes_management(fishnet_shp__2_, "CENTROID", "", "", "")
# Process: Spatial Join
arcpy.SpatialJoin_analysis(ethno_centroids_shp, fishnet_shp__4_, ethno_centroid_with_20cr_shp, "JOIN_ONE_TO_ONE", "KEEP_ALL", "", "INTERSECT", "", "")
# Process: Table To Excel
arcpy.TableToExcel_conversion(ethno_centroid_with_20cr_shp, ethno_centroid_with_20cr_xls, "NAME", "CODE")
# Process: Export Feature Attribute to ASCII
arcpy.ExportXYv_stats(ethno_centroid_with_20cr_shp, "CENTROID_X;CENTROID_Y;NAME;TRIBE_CODE", "SPACE", ethno_centroid_with_20cr_txt, "ADD_FIELD_NAMES")
# Return geoprocessing specific errors
except arcpy.ExecuteError:
print arcpy.GetMessages()
1. Object, Property, Method
2. Try-Except statement
3. String variables
4. Print
5. Comments
It's similar to local macro in Stata
To create a variable called file1
which contains a string data.shp
, type
file1 = "data.shp"
Recommended to assign a string variable to each data file name in the Python script
1. Copy local variables in the exported script
2. Paste them before try:
in the template script
3. Sort these names by inputs, intermediates, and outputs
4. Assign the directory path for outputs to arcpy.env.workspace
5. Delete the directory path for outputs and intermediates
Now notice
fishnet_shp__2_ = fishnet_shp
fishnet_shp__4_ = fishnet_shp__2_
This happens when we use overwriting geoprocessing tools (Define Projection, Add Geometry Attributes)
It's confusing. So:
6. Press ctrl + f (or click Edit > Replace for IDLE) to replace:
fishnet_shp__2_
with fishnet_shp
fishnet_shp__4_
with fishnet_shp
7. Delete the duplicated lines
import arcpy
### Set environment ###
# Allow the overwriting of the output files
arcpy.env.overwriteOutput = True # This command is CASE-SENSITIVE
# Set the working directory.
arcpy.env.workspace = "C:\\Users\\your_username\\Desktop\\Lecture2" # NEVER USE single backslash (\).
### Local variables ###
tribalmap_shp = "input\\tribalmap.shp"
tribalmap_Layer = "tribalmap_Layer"
ethno_centroids_shp = "temporary\\ethno_centroids.shp"
fishnet_shp = "temporary\\fishnet.shp"
ethno_centroid_with_20cr_shp = "temporary\\ethno_centroid_with_20cr.shp"
ethno_centroid_with_20cr_xls = "output\\ethno_centroid_with_20cr.xls"
ethno_centroid_with_20cr_txt = "output\\ethno_centroid_with_20cr.txt"
############################## Geoprocessing ##########################
try:
# Process: Create Fishnet
1. Object, Property, Method
2. Try-Except statement
3. String variables
4. Print
5. Comments
It's a Python's equivalent of display
in Stata
To show a message on the IDLE screen while running the script, type:
print "message"
print arcpy.GetMessages()
For each geo-processing step, add the print
command to explain what's being processsed.
Also add the print commands at the beginning of the script
############################## Preamble #################################
print "Launch ArcGIS"
import arcpy
### Set environment ###
print "Enable the overwriting"
arcpy.env.overwriteOutput = True # This command is CASE-SENSITIVE
print "Set the working directory"
arcpy.env.workspace = "C:\\Users\\Masayuki Kudamatsu\\Desktop\\Lecture2" # NEVER USE single backslash (\).
### Local variables ###
print "Input file names being set"
tribalmap_shp = "input\\tribalmap.shp"
print "Intermediate file names being set"
tribalmap_Layer = "tribalmap_Layer"
ethno_centroids_shp = "temporary\\ethno_centroids.shp"
fishnet_shp = "temporary\\fishnet.shp"
ethno_centroid_with_20cr_shp = "temporary\\ethno_centroid_with_20cr.shp"
print "Output files being set"
ethno_centroid_with_20cr_xls = "output\\ethno_centroid_with_20cr.xls"
ethno_centroid_with_20cr_txt = "output\\ethno_centroid_with_20cr.txt"
############################## Geoprocessing ##########################
try:
print "Create 20th Century Reanalysis data cell polygons step 1/3"
arcpy.CreateFishnet_management(fishnet_shp, "-21 -41", "-21 -10", "2", "2", "41", "41", "", "NO_LABELS", "DEFAULT", "POLYGON")
print "Create 20th Century Reanalysis data cell polygons step 2/3"
arcpy.DefineProjection_management(fishnet_shp, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]")
print "Create 20th Century Reanalysis data cell polygons step 3/3"
arcpy.AddGeometryAttributes_management(fishnet_shp, "CENTROID", "", "", "")
print "Create ethnic group centroids step 1/2"
arcpy.MakeXYEventLayer_management(tribalmap_shp, "lon", "lat", tribalmap_Layer, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400<PHONE_NUMBER>;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision", "")
print "Create ethnic group centroids step 2/2"
arcpy.CopyFeatures_management(tribalmap_Layer, ethno_centroids_shp, "", "0", "0", "0")
print "Match Ethnographic Atlas ethnic groups with 20th Century Reanalysis data cells"
arcpy.SpatialJoin_analysis(ethno_centroids_shp, fishnet_shp, ethno_centroid_with_20cr_shp, "JOIN_ONE_TO_ONE", "KEEP_ALL", "", "INTERSECT", "", "")
print "Export output data as Excel sheet"
arcpy.TableToExcel_conversion(ethno_centroid_with_20cr_shp, ethno_centroid_with_20cr_xls, "NAME", "CODE")
print "Export output data as csv file"
arcpy.ExportXYv_stats(ethno_centroid_with_20cr_shp, "CENTROID_X;CENTROID_Y;NAME;TRIBE_CODE", "SPACE", ethno_centroid_with_20cr_txt, "ADD_FIELD_NAMES")
# Return geoprocessing specific errors
except arcpy.ExecuteError:
1. Object, Property, Method
2. Try-Except statement
3. String variables
4. Print
5. Comments
To insert comments, type #
at the beginning of a comment
Useful for others to understand (and for you to remember) what each command does
Also useful if you want to skip some commands for the time being
Suppose you're not sure if this script will properly create ethnic group centroids.
So you want to temporarily skip the other parts of the script
1. Select command lines to be skipped
except:
part
2. Press ctrl + /
$\Rightarrow$ #
will appear at the beginning of selected commands
############################## Geoprocessing ##########################
try:
# print "Create 20th Century Reanalysis data cell polygons step 1/3"
# arcpy.CreateFishnet_management(fishnet_shp, "-21 -41", "-21 -10", "2", "2", "41", "41", "", "NO_LABELS", "DEFAULT", "POLYGON")
#
# print "Create 20th Century Reanalysis data cell polygons step 2/3"
# arcpy.DefineProjection_management(fishnet_shp, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]")
#
# print "Create 20th Century Reanalysis data cell polygons step 3/3"
# arcpy.AddGeometryAttributes_management(fishnet_shp, "CENTROID", "", "", "")
arcpy.MakeXYEventLayer_management(tribalmap_shp, "lon", "lat", tribalmap_Layer, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400<PHONE_NUMBER>;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision", "")
print "Create ethnic group centroids step 1/2"
print "Create ethnic group centroids step 2/2"
arcpy.CopyFeatures_management(tribalmap_Layer, ethno_centroids_shp, "", "0", "0", "0")
# print "Match Ethnographic Atlas ethnic groups with 20th Century Reanalysis data cells"
# arcpy.SpatialJoin_analysis(ethno_centroids_shp, fishnet_shp, ethno_centroid_with_20cr_shp, "JOIN_ONE_TO_ONE", "KEEP_ALL", "", "INTERSECT", "", "")
#
# print "Export output data as Excel sheet"
# arcpy.TableToExcel_conversion(ethno_centroid_with_20cr_shp, ethno_centroid_with_20cr_xls, "NAME", "CODE")
#
# print "Export output data as csv file"
# arcpy.ExportXYv_stats(ethno_centroid_with_20cr_shp, "CENTROID_X;CENTROID_Y;NAME;TRIBE_CODE", "SPACE", ethno_centroid_with_20cr_txt, "ADD_FIELD_NAMES")
# Return geoprocessing specific errors
except arcpy.ExecuteError:
3. Save and run the script
4. Cross your fingers :-)
5. Check if ethno_centroids.shp
is created properly.
6. Now uncomment those skipped commands
7. Save and run the entire script
8. Cross your fingers :-)
9. Check if everything is as expected
Most likely, you get an error message:
ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application.
This error occurs when the script is trying to overwrite the output that's been shown in ArcMap
Before you run the Python script, always close all the output files in ArcMap
Sometimes, the output file is not what you intended.
e.g., New fields in the attribute table are all zero
Revising the script may not solve the issue / You cannot find anything wrong with the script
If so, reboot ArcMap/IDLE and even Windows. This often solves the issue.
Still unsolved, ask Google.
Last resort: ask at Stack Exchange or ArcGIS Forum.
Look at
solutions4exercises/lec2script.py
in the downloaded data folder for Lecture 2
Do you remember which geo-processing tools you used for each of these tasks?


{{ education.qualification }}
{{ education.dates }}
{{ education.quote }}
{%- endif -%} {{ education.description | strip | markdownify }}I've also done the Consensys Academy during my bachelors. I went to highschool at St John’s College in Johannesburg and achieved 7 distinctions for matric.


This extension will hide commute and virtual (trainer) activities from your personal Strava activity feed page.
Action to take: Fade out Hide completely
Hide commute activities Hide virtual activities Hide challenge activities Bike rides less than 0 3 5 10 15 20 40 miles Walks less than 0 0.5 1 2 3 5 miles
Save settings


A Styling form
Part 1 • Basic controls
* indicates required field
User Name
*
Please select a user name
Password
*
Password must be 8 or more characters
Description
Date
Part 2 • Multiple-Choice Controls
Select Any Number
Choice 1
Choice 2
Choice 3
Select Only One
Choice 1 is pre-selected and shows the text wraps nicely if it goes to multiple lines.
Choice 2
Choice 3
Select Your Choice
None
Choice 1
Choice 2
Choice 3
Choice 4
A Styling form
Part 1 • Basic controls
* indicates required field
User Name
*
Please select a user name
Password
*
Password must be 8 or more characters
Description
Date
Part 2 • Multiple-Choice Controls
Select Any Number
Choice 1
Choice 2
Choice 3
Select Only One
Choice 1 is pre-selected and shows the text wraps nicely if it goes to multiple lines.


Spherical objects, such as cannonballs, can be stacked to form a pyramid with one cannonball at the top, sitting on top of a square composed of four cannonballs, sitting on top of a square composed of nine cannonballs, and so forth. Given the following recursive function signature, write the function code such that it takes as its argument the height of a pyramid of cannonballs and returns the number of cannonballs it contains based on the height of the stack.


Karina Mota
Welcome to my first and foremost webpage.
I've set myself a challenge to learn how to code.
I believe we are able to learn anything as long as
we are passionate, dedicated and believe in ourselves.
In this page I'll write a bit about my journey, about myself, my strength and my weaknesses.
I'll also write about what I'm doing to improve as a coder and as a person.
Aroha mai, aroha atu


CSS positioning properties allow you to properly position different elements on your webpage. There are four positioning properties: absolute, relative, static, and fixed.
Static is the default position value for an element. The element will be positioned according to the normal flow of the webpage. Static elements cannot be moved according to the "right", "left","top", or "bottom" properties. In the images below, Block 2 sits within Block 1. Since no positioning is specified, the images are automatically "static".
Relative positioning allows an element to be positioned relative to its original position. If an element has a relative position, it can move according to the "right", "left","top", or "bottom" properties. The HTML for this example shows that Block 1 moves 200px to the left of its original position while Block 2 moves 500px to the left of its original position.
Absolute positioning allows an element to be positioned according to the specified location. When an element has a position of absolute, it will be moved relative to the next parent element that has a position of "relative" or "absolute". If such a parent element does not exist, the element will be positoned relative to the element (the webpage). In addition, the element will not affect or be affected by the positioning of other elements. Elements that have a position of absolute do not follow the normal flow of the webpage. In the example below, Block 2 is positioned relative to its parent element, Block 1, which is set to the position absolute. Furthermore, Block 1 is positioned relative to the webpage.
Elements that are set to a fixed position are placed relative to the browser. As you scroll down the page, the element will not move from its position. Elements that have a position of fixed do not follow the normal flow of the webpage. In the example below, Block 1 and Block 2 are both fixed to the webpage, and they are positioned relative to the webpage.


Upload files
Console
Configuration
Enable
Visible
Information
Kendo UI Upload supports the
enabled
,
events
,
visible
bindings.


{% extends "argent_app/base.html" %} {% block body %} {% if user.is_authenticated %}
You are already signed in


3 million passengers to get Grab refund
by Darwin G. AmojelarGrab Philippines on Friday said some three million passengers will get refund in the coming days after the Philippine Competition Commissions found out that the ride-hailing firm breached its pricing commitments.
“We have always taken the position to work closely with government regulators such as the Philippine Competition Commission and the Land Transportation Franchising and Regulatory Board (LTFRB) to provide the best possible service to our consumers while protecting their interests and welfare,” Grab said.
To this end, Grab will abide by the PCC’s order to paying the P23.45 million fine of which P5.05 million will go to our consumers; and recognizing the value of our tens of thousands of driver-partners, the entire fine be borne solely by Grab, as any which have been imposed in the past and in any of our markets,” it added.
Grab Philippines president Brian Cu said around three million passengers took the trip from February to May 2019.
“So, you take P5 million over 3 million [passengers] and the average a passenger can get is P1.50. There are some who will get below a peso while some will get over a hundred pesos (depending on the number of trips),” he added.


The goal of our project is to construct and program a robot that is able to perform the task of collecting pucks. Puck collection is a discipline of the RobotChallenge.
In the puck collect discipline two robots compete against each other on a square field. Goal of each robot is to collect as many pucks of its color as possible in a given time. A puck is counted as collected if it is on the robots home base.
Presentation: PuckCollector_Presentation.pdf
Report: PuckCollector_Report.pdf
Source Code: PuckCollector_src.zip
Videos: PuckCollector_Demonstration1.m4v PuckCollector_Demonstration2.m4v


?
Mobile Portrait
Mobile Landscape
Tablet Portrait
Tablet Landscape
Desktop Portrait
Desktop Landscape


About Me
Hello All, My name is Padma. I have been living here in the greater Seattle area for the past 13 years. I moved here from the bay area and wouldn't be anywhere else. In a previous life, about a decade or so ago, I was a software developer and have worked on diverse teams and technologies. Trying to get back to those glory days!
Respond to the following questions with y/n or yes/no answers to get to know a little more about me.
- Have I tried a cartwheel?
- Correct Answer: N/No
- User Response:
- Can I Whistle?
- Correct Answer: N/No
- User Response:
- Do I like Mangoes?
- Correct Answer: Y/Yes
- User Response:
- Am I afraid of dogs?
- Correct Answer: Y/Yes
- User Response:
- Do I take the bus to work?
- Correct Answer: Y/Yes
- User Response:
- Number of my quiz retries
- Correct Answer:
- States I visited last summer
- Oregon
- California
- Nevada
- Arizona
- Idaho


<responsibleParty>
Use the <responsibleParty> element to identify the party who is responsible for performing a remedy procedure.
Category: Troubleshooting elements


 If it’s an app I love I want to pay for it, if I don’t totally love it and it’s ad supported with no option I won’t use it. I don’t want my experience degraded by having ads shoved down my throat nor do I want the burden of ignoring them.
This is the most extreme form of ad supported software I’ve seen. It blows my mind how horrible this is. It shows complete disrespect for the user’s time. Microsoft have obviously written off the Zune as a great handheld media player and see it just as a tiny screen they can use to infiltrate people’s lives with advertising. How embarrassing it must be to own a Zune. Via Daring Fireball.


- Payment - Class in com.adyen.core.models
-
The class to keep the payment result.
- Payment(JSONObject) - Constructor for class com.adyen.core.models.Payment
-
The constructor method to be used when a JSONObject is received from a server as the payment result.
- Payment(Uri) - Constructor for class com.adyen.core.models.Payment
-
The constructor method to be used when a return URI is received from the server.
- Payment.PaymentStatus - Enum in com.adyen.core.models
-
Represents the payment status.
- PaymentDataCallback - Interface in com.adyen.core.interfaces
-
Callback to be used for providing payment initialization data.
- PaymentDetails - Class in com.adyen.core.models.paymentdetails
-
Class for collecting the required PaymentDetails from the shopper to make the payment.
- PaymentDetails(Collection<InputDetail>) - Constructor for class com.adyen.core.models.paymentdetails.PaymentDetails
-
- PaymentDetailsCallback - Interface in com.adyen.core.interfaces
-
- PaymentMethod - Class in com.adyen.core.models
-
The class that contains detailed payment method information.
- PaymentMethod.Card - Class in com.adyen.core.models
-
Contains the saved details about a credit card used in the past.
- PaymentMethod.Configuration - Class in com.adyen.core.models
-
The merchant configuration saved with the payment method.
- PaymentMethod.Type - Class in com.adyen.core.models
-
Constants for several popular payment methods.
- PaymentMethodCallback - Interface in com.adyen.core.interfaces
-
The interface for notifying
PaymentRequest
when a payment method is selected.
- PaymentRequest - Class in com.adyen.core
-
Provides means to initiate a payment request.
- PaymentRequest(Context, PaymentRequestListener) - Constructor for class com.adyen.core.PaymentRequest
-
Constructs the payment request for the general flow with default UI.
- PaymentRequest(Context, PaymentRequestListener, PaymentRequestDetailsListener) - Constructor for class com.adyen.core.PaymentRequest
-
Constructs the payment request for the advanced flow with your custom UI.
- PaymentRequestDetailsListener - Interface in com.adyen.core.interfaces
-
- PaymentRequestListener - Interface in com.adyen.core.interfaces
-
- PaymentRequestResult - Class in com.adyen.core.models
-
- PaymentRequestResult(Throwable) - Constructor for class com.adyen.core.models.PaymentRequestResult
-
The constructor for the case where the payment request has failed unexpectedly.
- PaymentRequestResult(Payment) - Constructor for class com.adyen.core.models.PaymentRequestResult
-
The constructor for the case where the payment request has been processed on the Adyen backend.
- PAYPAL - Static variable in class com.adyen.core.models.PaymentMethod.Type
-


/**
* The entry point for the library FJplayer.JS
*/
const Playlist = require('./js/player/playlist');
const Player = require('./js/player/player');
const Version = require('./Version');
const { PlayerEvents, AdsEvents, OverlayEvents } = require('./js/defs/constants');
// Shove both of these into the global scope
const context = (typeof window !== 'undefined' && window) || global;
let { fjplayer } = context;
if (!fjplayer) {
fjplayer = {};
context.fjplayer = {};
}
fjplayer.Playlist = Playlist;
fjplayer.Player = Player;
fjplayer.Version = Version;
fjplayer.PlayerEvents = PlayerEvents;
fjplayer.AdsEvents = AdsEvents;
fjplayer.OverlayEvents = OverlayEvents;
module.exports = {
fjplayer, Playlist, Player, Version, PlayerEvents, AdsEvents, OverlayEvents,
};
/*
Next version like this + playlist must be detached
class fjplayer {
constructor() {
this.Playlist = new Playlist();
this.Player = null;
this.Version = new Version();
this.PlayerEvents = PlayerEvents;
this.AdsEvents = AdsEvents;
this.OverlayEvents = OverlayEvents;
}
get playlist() {
return this.Playlist;
}
get player() {
return this.Player;
}
setPlayer(id, videoContainerId) {
this.Player = new Player(id, videoContainerId);
}
get version() {
return this.Version.getVersion();
}
get playerEvents() {
return this.PlayerEvents;
}
get adsEvents() {
return this.AdsEvents;
}
get overlayEvents() {
return this.OverlayEvents;
}
}
module.exports = fjplayer;
s
*/


 If you have any questions, feedbacks, feel free to drop a line at our Facebook page or fill out wish list, bugs at our Google Doc.
For other cool stuffs, take a look at Visual Social Computing @ Camera Culture.


|
My Project
|
A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and ray casts. Leafs are proxies with an AABB. In the tree we expand the proxy AABB by Settings.b2_fatAABBFactor so that the proxy AABB is bigger than the client object. This allows the client object to move by small amounts without triggering a tree update. More...
Public Member Functions | |
| DynamicTree () | |
| Constructing the tree initializes the node pool. More... | |
| int | AddProxy (ref AABB aabb) |
| Create a proxy in the tree as a leaf node. We return the index of the node instead of a pointer so that we can grow the node pool. /// More... | |
| void | RemoveProxy (int proxyId) |
| Destroy a proxy. This asserts if the id is invalid. More... | |
| bool | MoveProxy (int proxyId, ref AABB aabb, Vector2 displacement) |
| Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, then the proxy is removed from the tree and re-inserted. Otherwise the function returns immediately. More... | |
| void | SetUserData (int proxyId, T userData) |
| Set proxy user data. More... | |
| T | GetUserData (int proxyId) |
| Get proxy user data. More... | |
| void | GetFatAABB (int proxyId, out AABB fatAABB) |
| Get the fat AABB for a proxy.  More... | |
| bool | TestFatAABBOverlap (int proxyIdA, int proxyIdB) |
| Test overlap of fat AABBs. More... | |
| void | Query (BroadPhaseQueryCallback callback, ref AABB aabb) |
| Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB. More... | |
| void | RayCast (BroadPhaseRayCastCallback callback, ref RayCastInput input) |
| Ray-cast against the proxies in the tree. This relies on the callback to perform a exact ray-cast in the case were the proxy contains a Shape. The callback also performs the any collision filtering. This has performance roughly equal to k * log(n), where k is the number of collisions and n is the number of proxies in the tree. More... | |
| int | ComputeHeight (int nodeId) |
| Compute the height of a sub-tree. More... | |
| int | ComputeHeight () |
| Compute the height of the entire tree. More... | |
| void | ValidateStructure (int index) |
| void | ValidateMetrics (int index) |
| void | Validate () |
| Validate this tree. For testing. More... | |
| void | RebuildBottomUp () |
| Build an optimal tree. Very expensive. For testing. More... | |
| void | ShiftOrigin (Vector2 newOrigin) |
| Shift the origin of the nodes More... | |
Properties | |
| int | Height [get] |
| Compute the height of the binary tree in O(N) time. Should not be called often. More... | |
| float | AreaRatio [get] |
| Get the ratio of the sum of the node areas to the root area. More... | |
| int | MaxBalance [get] |
| Get the maximum balance of an node in the tree. The balance is the difference in height of the two children of a node. More... | |
A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and ray casts. Leafs are proxies with an AABB. In the tree we expand the proxy AABB by Settings.b2_fatAABBFactor so that the proxy AABB is bigger than the client object. This allows the client object to move by small amounts without triggering a tree update.
Nodes are pooled and relocatable, so we use node indices rather than pointers.
Constructing the tree initializes the node pool.
| int tainicom.Aether.Physics2D.Collision.DynamicTree< T >.AddProxy | ( | ref AABB | aabb | ) |
Create a proxy in the tree as a leaf node. We return the index of the node instead of a pointer so that we can grow the node pool.
///
| aabb | The aabb. |
| userData | The user data. |
| int tainicom.Aether.Physics2D.Collision.DynamicTree< T >.ComputeHeight | ( | ) |
Compute the height of the entire tree.
| int tainicom.Aether.Physics2D.Collision.DynamicTree< T >.ComputeHeight | ( | int | nodeId | ) |
Compute the height of a sub-tree.
| nodeId | The node id to use as parent. |
| AABB tainicom.Aether.Physics2D.Collision.DynamicTree< T >.GetFatAABB | ( | int | proxyId | ) |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.GetFatAABB | ( | int | proxyId, |
| out AABB | fatAABB | ||
| ) |
| T tainicom.Aether.Physics2D.Collision.DynamicTree< T >.GetUserData | ( | int | proxyId | ) |
Get proxy user data.
| T |
| proxyId | The proxy id. |
| bool tainicom.Aether.Physics2D.Collision.DynamicTree< T >.MoveProxy | ( | int | proxyId, |
| ref AABB | aabb, | ||
| Vector2 | displacement | ||
| ) |
Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, then the proxy is removed from the tree and re-inserted. Otherwise the function returns immediately.
| proxyId | The proxy id. |
| aabb | The aabb. |
| displacement | The displacement. |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.Query | ( | BroadPhaseQueryCallback | callback, |
| ref AABB | aabb | ||
| ) |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.RayCast | ( | BroadPhaseRayCastCallback | callback, |
| ref RayCastInput | input | ||
| ) |
Ray-cast against the proxies in the tree. This relies on the callback to perform a exact ray-cast in the case were the proxy contains a Shape. The callback also performs the any collision filtering. This has performance roughly equal to k * log(n), where k is the number of collisions and n is the number of proxies in the tree.
| callback | A callback class that is called for each proxy that is hit by the ray. |
| input | The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.RebuildBottomUp | ( | ) |
Build an optimal tree. Very expensive. For testing.
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.RemoveProxy | ( | int | proxyId | ) |
Destroy a proxy. This asserts if the id is invalid.
| proxyId | The proxy id. |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.SetUserData | ( | int | proxyId, |
| T | userData | ||
| ) |
Set proxy user data.
| T |
| proxyId | The proxy id. |
| userData | The proxy user data. |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.ShiftOrigin | ( | Vector2 | newOrigin | ) |
Shift the origin of the nodes
| newOrigin | The displacement to use. |
| bool tainicom.Aether.Physics2D.Collision.DynamicTree< T >.TestFatAABBOverlap | ( | int | proxyIdA, |
| int | proxyIdB | ||
| ) |
Test overlap of fat AABBs.
| proxyIdA | The proxy id A. |
| proxyIdB | The proxy id B. |
| void tainicom.Aether.Physics2D.Collision.DynamicTree< T >.Validate | ( | ) |
Validate this tree. For testing.
|
get |
Get the ratio of the sum of the node areas to the root area.
|
get |
Compute the height of the binary tree in O(N) time. Should not be called often.
|
get |
Get the maximum balance of an node in the tree. The balance is the difference in height of the two children of a node.


GOP Rep Introduces Motion Against Witness After His Character Assassination of Trump
by Cortney O'BrienGOP Rep. Mike Johnson (R-LA) had a point of order after listening to Democratic counsel Barry Berke's character assassination of President Trump at Monday's House Judiciary Committee hearing.
Berke began his opening statement by sharing that his young son asked him recently if the president has to be a good person. He said no, but that is "the hope."
Berke proceeded to question Trump's motives during his July phone call with Ukrainian President Zelensky.
"President Trump did what a president of our nation is not allowed to do," Berke charged.
The witness added that Trump's actions are "impeachable offenses" that "threaten our republic."
"When you talk about the ABCs of potential presidential abuses, it is extraordinary that the president's conduct was a trifecta, checking all three," Berke said.
Rep. Johnson accused Berke of violating Rule 17, explained here.
"The witness has used language which impugns the motives of the president and suggests he's disloyal to his country and those words should be stricken from the record and taken down," Johnson said.
Nadler rejected Johnson's point of order because, he explained, the rules that apply to them don't apply to the witnesses.
"Witnesses are not subject to the rule of decorum in the same way members are," he claimed.
Johnson let out a frustrated sigh.
Nadler appeared prepared for this kind of interruption, as he read from a prepared statement.
"The topic of the hearing is the president's misconduct, so none of us should find it surprising that we are hearing testimony that is critical of the president."
The chairman concluded that he did not find Berke's testimony "disorderly."
During their 15-minute break, Ranking Member Doug Collins (R-GA) sounded off about the Democrats' "destruction of the House rules."


The observers
package provides convenience directives built on top of native web platform
observers, such as MutationObserver.
A directive for observing when the content of the host element changes. An event is emitted when a mutation to the content is observed.
<div class="projected-content-wrapper" (cdkObserveContent)="projectContentChanged()">
<ng-content></ng-content>
</div>


timesharing
`Prev `__
T
`Next `__
--------------
**timesharing**
[now primarily historical] Timesharing is the technique of scheduling a
computer's time so that they are shared across multiple tasks and
multiple users, with each user having the illusion that his or her
computation is going on continuously. John McCarthy, the inventor of
`*LISP* <../L/LISP.html>`__, first `imagined this
technique `__
in the late 1950s. The first timesharing operating systems, BBN's
"Little Hospital" and `*CTSS* <../C/CTSS.html>`__, were deplayed in
1962-63. The early hacker culture of the 1960s and 1970s grew up around
the first generation of relatively cheap timesharing computers, notably
the `*DEC* <../D/DEC.html>`__ 10, 11, and `*VAX* <../V/VAX.html>`__
lines. But these were only cheap in a relative sense; though quite a bit
less powerful than today's personal computers, they had to be shared by
dozens or even hundreds of people each. The early hacker comunities
nucleated around places where it was relatively easy to get access to a
timesharing account.
Nowadays, communications bandwidth is usually the most important
constraint on what you can do with your computer. Not so back then;
timesharing machines were often loaded to capacity, and it was not
uncommon for everyone's work to grind to a halt while the machine
scheduler thrashed, trying to figure out what to do next. Early hacker
slang was replete with terms like cycle crunch and cycle drought for
describing the consequences of too few instructions-per-second spread
among too many users. As GLS has noted, this sort of problem influenced
the tendency of many hackers to work odd schedules.
One reason this is worth noting here is to make the point that the
earliest hacker communities were physical, not distributed via networks;
they consisted of hackers who shared a machine and therefore had to deal
with many of the same problems with respect to it. A system crash could
idle dozens of eager programmers, all sitting in the same terminal room
and with little to do but talk with each other until normal operation
resumed.
Timesharing moved from being the luxury of a few large universities
runing semi-experimental operating systems to being more generally
available about 1975-76. Hackers in search of more cycles and more
control over their programming environment began to migrate off
timesharing machines and onto what are now called workstations around
1983. It took another ten years, the development of powerful 32-bit
personal micros, the `*Great Internet
Explosion* <../G/Great-Internet-Explosion.html>`__ before the migration
was complete. It is no coincidence that the last stages of this
migration coincided with the development of the first open-source
operating systems.
--------------
+----------------------------------------+----------------------------+-------------------------+
| `Prev `__ | `Up <../T.html>`__ | `Next `__ |
+----------------------------------------+----------------------------+-------------------------+
| times-or-divided-by | `Home <../index.html>`__ | TINC |
+----------------------------------------+----------------------------+-------------------------+


Wikipedia (/ˌwɪkɪˈpiːdiə/ (About this soundlisten), /ˌwɪkiˈpiːdiə/ (About
this soundlisten) WIK-ih-PEE-dee-ə) is a multilingual online encyclopedia
with exclusively free content, based on open collaboration through a model
of content edit by web-based applications like web browsers, called wiki.
It is the largest and most popular general reference work on the World
Wide Web,[3][4][5] and is one of the most popular websites by Alexa rank
as of October 2018.[6] It is owned and supported by the Wikimedia
Foundation, a non-profit organization that operates on money it receives
from donors.[7][8][9] Wikipedia was launched on January 15, 2001, by Jimmy
Wales and Larry Sanger.[10] Sanger coined its name,[11][12] as a
portmanteau of wiki (the Hawai'ian word for "quick"[13]) and
"encyclopedia". Initially an English-language encyclopedia, versions in
other languages were quickly developed. With 5,836,278 articles,[notes 3]
the English Wikipedia is the largest of the more than 290 Wikipedia
encyclopedias. Overall, Wikipedia comprises more than 40 million articles
in 301 different languages[14] and by February 2014 it had reached 18
billion page views and nearly 500 million unique visitors per month.[15]


Styled Range Slider
Published:
Cross-browser styling for the native range slider form control.
Pattern Demo
Pattern Details
Pattern Markup
<label for="range_input">
Choose Amount:
</label>
<input type="range"
id="range_input"
name="amount"
min="0"
max="400"
step="10"
value="200">
The native value
, min
, max
, and step
attributes are used to provide the starting value, the minimum and maximum values of the range, and the increment in which a user can change the value, respectively.
Some things to note when styling a range form control:
- Each browser's implementation of the range form control requires different browser specific selectors to be used, which can lead to duplicative rule sets. Ideally you'd want to utilize CSS variables or variables from a preprocessor, like Sass, to make sure that any styling updates get made to all browser specific selectors.
-
For whatever reason, pre-Chromium (Legecy) Edge will render
::-webkit-slider-thumb
styles, which would be nice to cut down on browser specific styling, if it weren't for the fact that Webkit and Legacy Edge render the form control a bit differently. Webkit needs a negative margin applied to the range's thumb, while Legecy Edge does not. Also, IE11 does not respect Webkit's thumb styling, which means that the::-ms-thumb
selector is still needed to both properly style for IE11, and remove the negative margin Legecy Edge inherits from the Webkit style. -
A range form control doesn't receive much (if anything) in the way of inherent styling when a
disabled
attribute is applied to it, unlike other form controls which visually look 'dimmed'. Since the range has so many browser specific selectors, stying a disabled range requires the following:input[type=range][disabled]
input[type=range][disabled]::-webkit-slider-thumb
input[type=range][disabled]::-moz-range-thumb
input[type=range][disabled]::-ms-thumb
input[type=range]:not([disabled])::-webkit-slider-thumb:active
input[type=range]:not([disabled])::-moz-range-thumb:active
input[type=range]:not([disabled])::-ms-thumb:active
Affects on Screen Reader Announcements?
Applying custom styles to an input type="range"
does not alter its announcements by screen readers.


19 March 1999
Disease Outbreak Reported
Four more cases of sylvatic yellow fever were reported by the Ministry of Health, 1 in Mato Gross State and 3 in Para State which occurred from 18 January to early February. The case in Mato Grosso State was in the same locality as the previously reported case and in Para State 2 cases occurred in Breves Municipality and one in Afua Municipality. All 3 cases in Para State were young males (8 years, 25 years and 28 years) and all 3 recovered.


Working week
Working day
Holidays
Main schedule
Tuesday-Thursday
06:00-13:30
15, 16, 19
Task 2.2.1
Wednesday-Saturday
11:30-19:45
18, 19, 22, 23
Task 2.2.2
Sunday-Saturday
Main schedule
Main schedule
...


The Concurrent Processing Framework Client API for Java (1.6+) allows client applications to use the CPF REST Web Service API to query the available business applications, create jobs and download the results of jobs on behalf of their users.
The client can be used from Java applications developed using Maven with the following Maven settings.


|
mlpack
1.0.12
|
A single multivariate Gaussian distribution. More...
Public Member Functions | |
| GaussianDistribution () | |
| Default constructor, which creates a Gaussian with zero dimension. More... | |
| GaussianDistribution (const size_t dimension) | |
| Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality. More... | |
| GaussianDistribution (const arma::vec &mean, const arma::mat &covariance) | |
| Create a Gaussian distribution with the given mean and covariance. More... | |
| const arma::mat & | Covariance () const |
| Return the covariance matrix. More... | |
| arma::mat & | Covariance () |
| Return a modifiable copy of the covariance. More... | |
| size_t | Dimensionality () const |
| Return the dimensionality of this distribution. More... | |
| void | Estimate (const arma::mat &observations) |
| Estimate the Gaussian distribution directly from the given observations. More... | |
| void | Estimate (const arma::mat &observations, const arma::vec &probabilities) |
| Estimate the Gaussian distribution from the given observations, taking into account the probability of each observation actually being from this distribution. More... | |
| const arma::vec & | Mean () const |
| Return the mean. More... | |
| arma::vec & | Mean () |
| Return a modifiable copy of the mean. More... | |
| double | Probability (const arma::vec &observation) const |
| Return the probability of the given observation. More... | |
| arma::vec | Random () const |
| Return a randomly generated observation according to the probability distribution defined by this object. More... | |
| std::string | ToString () const |
| Returns a string representation of this object. More... | |
Private Attributes | |
| arma::mat | covariance |
| Covariance of the distribution. More... | |
| arma::vec | mean |
| Mean of the distribution. More... | |
A single multivariate Gaussian distribution.
Definition at line 27 of file gaussian_distribution.hpp.
|
inline |
Default constructor, which creates a Gaussian with zero dimension.
Definition at line 39 of file gaussian_distribution.hpp.
|
inline |
Create a Gaussian distribution with zero mean and identity covariance with the given dimensionality.
Definition at line 45 of file gaussian_distribution.hpp.
|
inline |
Create a Gaussian distribution with the given mean and covariance.
Definition at line 53 of file gaussian_distribution.hpp.
|
inline |
Return the covariance matrix.
Definition at line 96 of file gaussian_distribution.hpp.
References covariance.
|
inline |
Return a modifiable copy of the covariance.
Definition at line 98 of file gaussian_distribution.hpp.
References covariance.
|
inline |
Return the dimensionality of this distribution.
Definition at line 57 of file gaussian_distribution.hpp.
References mean.
| void mlpack::distribution::GaussianDistribution::Estimate | ( | const arma::mat & | observations | ) |
Estimate the Gaussian distribution directly from the given observations.
| observations | List of observations. |
| void mlpack::distribution::GaussianDistribution::Estimate | ( | const arma::mat & | observations, |
| const arma::vec & | probabilities | ||
| ) |
Estimate the Gaussian distribution from the given observations, taking into account the probability of each observation actually being from this distribution.
|
inline |
|
inline |
Return a modifiable copy of the mean.
Definition at line 93 of file gaussian_distribution.hpp.
References mean.
|
inline |
Return the probability of the given observation.
Definition at line 62 of file gaussian_distribution.hpp.
References covariance, mean, and mlpack::gmm::phi().
| arma::vec mlpack::distribution::GaussianDistribution::Random | ( | ) | const |
Return a randomly generated observation according to the probability distribution defined by this object.
| std::string mlpack::distribution::GaussianDistribution::ToString | ( | ) | const |
Returns a string representation of this object.
|
private |
Covariance of the distribution.
Definition at line 33 of file gaussian_distribution.hpp.
Referenced by Covariance(), and Probability().
|
private |
Mean of the distribution.
Definition at line 31 of file gaussian_distribution.hpp.
Referenced by Dimensionality(), Mean(), and Probability().


Janelle Kinnaird
6/1/22How The Foundation of Your Success Lies at the Health of Your Employee's Feet
As seen in OH&S June 2022
Hard-working, innovative, motivated, organized, happy and healthy employees are essential to a company thriving, growing and surpassing the competition.
Encouraging these employee qualities and satisfaction is simple - focus on the health of their feet, the foundation of their body.
The Painful Problem
From distribution, delivery, warehouse, light & heavy industrial, maintenance and more; many jobs and positions require all-day standing, some in one stationary position and others constantly moving. Various studies show possible detrimental effects to the body from 5 or more continuous hours on your feet.
The resulting pro-longed lower body muscle fatigue may raise the risk for long-term back pain and other Musculoskeletal Disorders (MSDs). Overuse and body weight pressure can lead to Repetitive Stress Injuries (RSIs), which account for 60% of work-related injuries, such as plantar fasciitis, Achilles tendonitis, arch and heel pain, metatarsalgia, shin splints and more.
Long durations of standing or sitting can lead to poor blood circulation that causes fatigue and cognitive symptoms, especially when other health issues are present such as diabetes and obesity. This reduced blood flow increases the chance of painful discomfort from a life-threatening blood clot, either deep vein thrombosis (DVT) or a pulmonary embolism (PE) as well as memory loss and difficulty concentrating.
Employees feeling fatigue and pain are less productive and aware. Pain causes them to move slower, get less done and can result in distraction errors and injuries. Employees who do not feel good can be agitated and offended easier, a bad influence on other workers, and call off work more often.
As a result, industrial companies evaluate their work environment stresses, conduct risk assessments and health screenings, and have adopted employee wellness programs hoping to counter the negative effects to boost morale and productivity.
Unfortunately, most wellness programs don't provide an adequate way to resolve the root issue which is full body pain and discomfort that results from the repetitive stress on feet. While many provide needed time for breaks and change of position and some supply anti-fatigue mats (which also prove to be stationary tripping hazards), the core solution to full body wellness is individual employee foot health.
An Innovative Solution
Subsidizing specialized foot products into an employee wellness program or safety program is an innovative solution to keeping workers safe, healthy and on the job.
Beyond the normal required safety toe, puncture plate or metatarsal guard that protects from accidental injuries; work boots can be specifically constructed with elements to also help relieve and prevent long-term ailments, such as a wider toe box to address diabetic feet or a shank for extra arch support to relieve fallen arches. Providing a proven way to ensure a proper fit is important as well to prevent constriction, pinching, slipping and to secure stability.
All feet are built different. Add in physical wear, tear and breakdown from excessive standing and we create a need for personal adjustment to re-establish natural body position and alignment. Custom orthotics built to relieve pressure, reposition foot tissue, tendons & muscles, and to realign feet, knees, hips & back will prevent issues, correct current ailments and relieve debilitating pain.
Compression socks help a body work more efficiently by increasing blood circulation and oxygenation to relieve stress off the heart and brain, preventing blood clots, reducing lactic acid build-up to lower fatigue and distraction errors, adding arch and heel support, and protecting sensitive tissue to help alleviate specific ailments.
The Compound Effect
When the benefits of multiple products work together to produce an even greater result you have a compound effect.
For workers developing foot and body issues and experiencing pain and fatigue, the compounded relieving effect of wearing compression socks and custom orthotics in a properly fitting work boot could prove substantial.
For example, all 3 products can profess the benefit of reducing foot and body fatigue. Custom orthotics will do this by providing added cushion and comfort, making sure the body is properly aligned and working efficiently and by helping to reduce pain.  A good pair of boots will have quality materials in the midsole and outsole to absorb shock and take stress off feet, knees and back to reduce fatigue.
All 3 products work in different ways and yet all 3 have the same resulting benefit of reduced fatigue. And while the benefit of using just one is good, the result is even greater when using all 3 together.
Another example of the compound effect can be seen with a common specific ailment such as Plantar Fasciitis. A custom orthotic will help support and relieve the stretch of the fascia ligament while a compression sock will provide firm support in the arch and heel to protect the sensitive tissue and reduce inflammation. Two different products with two different benefits but both address the same ailment to provide a greater result.
Foot Health Benefits
Encouraging personal foot wellness products with proper fitting footwear to elevate on-the job safety empowers employees to improve their physical abilities. They have a way to relieve the stress on their body, feel stronger and healthier and do things longer without pain, on and off the job, giving them an overall better quality of life. This will enhance a company's perception of care with its employees as well as its commitment to safety thus improving its safety culture.
When a company invests in programs and products that don't just focus on the accidental injury but look beyond the minimum safety requirement to ways to ensure long-term full body health, employees perceive that management wants them to stick around a while and increases overall retention.
Since employees who do not feel good can get easily agitated and offended, the opposite it also true. Healthy employees are slower to anger, less likely to become frustrated, have greater patience, listen better, and retain greater information allowing them to be a more proficient, quality worker. As a positive example to other fellow workers, they improve company morale.
When employees are healthy and pain-free they have greater energy and are more productive throughout the entire workday. They don't have a need to call off work to rest or heal an overworked muscle or stressed back. A company will have less time off cases and overtime expense as well as lower incident rates and RSIs (repetitive stress injuries). Lower insurance claims along with showing a committed plan for greater employee health to a carrier will lower premiums.
By focusing on feet as the foundation of full body wellness a company can easily implement a comprehensive solution to improve worker wellness, productivity and performance while reducing risk and liability - all true measures of a successful business.


{% extends "global/Base.html" %} {% load staticfiles otree_tags %} {% block title %} End of interaction {% endblock %} {% block content %} {% if not participant.vars.grouped %}
You have not been matched within {{leave_timer}} minute(s).
{% else %}One of the two other participants has left the study.
This unfortunately means that we are unable to continue with negotiations. We're sorry for the inconvenience.
{% endif %}Please go to the last page to finish the study and claim your base fee of ${{ base_fee }}.


SP500 Stock Fundamental
| Symbol | PE Ratio | Dividend Yield | Beta | High 52 Weeks | Low 52 Weeks | MA 50 Days | MA 200 Days |
|---|---|---|---|---|---|---|---|
| {{stock.symbol}} | {{stock.pe_ratio}} | {{stock.dividend_yield}} | {{stock.beta}} | {{stock.high_52weeks}} | {{stock.low_52weeks}} | {{stock.ma_50days}} | {{stock.ma_200days}} |


Neuroplasticity is the brain's ability to reorganize itself by forming new neural connections throughout life. Neuroplasticity allows the neurons (nerve cells) in the brain to compensate for injury and disease and to adjust their activities in response to new situations or to changes in their environment.
The idea that we are able to rewire our brains has made a positive impact on how iv gone about my studies during bootcamp. I was always good at math and terrible at anything that involved literacy. Writing, spelling, grammar you name it I had written it off. Making a conscious effort to be mindful of unpleasant emotions while being stuck has helped m work through some very frustrating moments. A big take away for me was also learning is much more than just receiving new information and gaining knowledge. Its about the path of continuous growth. Its not all about the destination but how you get there.
Here is a video I found interesting while researching Neuroplasticity. It is about neuroplasticity and stroke patients. I have worked with a number of stroke patients over the years they provided some great moments for me.
“In a fixed mindset, people believe their basic qualities, like their intelligence or talent, are simply fixed traits. They spend their time documenting their intelligence or talent instead of developing them. They also believe that talent alone creates success—without effort.” Carol Dweck
For as long as I can remember I have been a creature of habit. I always felt like this was a good thing but since I have started to read more about growth mindset I can see that it was stopping me from maximising my potential. There has been many testing moments where iv had absolutely no idea what to do. Looking at it from a view point of I will be able to do this in the future and reminding myself to stay positive has kept my overall perspective positive. Enjoying this and looking forward to learning has made this whole process easier as I have found being stuck in lockdown really hard.
Home


madminer.sampling module¶
-
class
madminer.sampling.
SampleAugmenter
(filename, disable_morphing=False, debug=False)[source]¶ Bases:
object
Sampling and data augmentation.
After the generated events have been analyzed and the observables and weights have been saved into a MadMiner file, for instance with madminer.delphes.DelphesProcessor or madminer.lhe.LHEProcessor, the next step is typically the generation of training and evaluation data for the machine learning algorithms. This generally involves two (related) tasks: unweighting, i.e. the creation of samples that do not carry individual weights but follow some distribution, and the extraction of the joint likelihood ratio and / or joint score (the “augmented data”).
After inializing SampleAugmenter with the filename of a MadMiner file, this is done with a single function call. Depending on the downstream inference algorithm, there are different possibilities:
- SampleAugmenter.extract_samples_train_plain() creates plain training samples without augmented data.
- SampleAugmenter.extract_samples_train_local() creates training samples for local methods based on the score, such as SALLY and SALLINO.
- SampleAugmenter.extract_samples_train_global() creates training samples for non-local methods based on density estimation and the score, such as SCANDAL.
- SampleAugmenter.extract_samples_train_ratio() creates training samples for non-local, ratio-based methods like RASCAL or ALICE.
- SampleAugmenter.extract_samples_train_more_ratios() does the same, but can extract joint ratios and scores at more parameter points. This additional information can be used efficiently in the setup with a “doubly parameterized” likelihood ratio estimator that models the dependence on both the numerator and denominator hypothesis.
- SampleAugmenter.extract_samples_test() creates evaluation samples for all methods.
Please see the tutorial for a walkthrough.
For the curious, let us explain these steps in a little bit more detail (assuming a morphing setup):
- The sample augmentation step starts from a set of events (x_i, z_i) together with corresponding weights for each morphing basis point theta_b, p(x_i, z_i | theta_b).
- Morphing: Assume we want to generate data sampled from a parameter point theta, which is not necessarily one of the basis points theta_b. Using the morphing structure, the event weights for p(x_i, z_i | theta) can be calculated. Note that the events (phase-space points) (x_i, z_i) are not changed, only their weights.
- Unweighting: For the machine learning part, such a weighted event sample is not practical. Instead we aim for an unweighted one, in which events can appear multiple times. If the user request N events (which can be larger than the original number of events in the MadGraph runs), SampleAugmenter will draw N samples (x_i, z_i) from the discrete distribution p(x_i, z_i | theta). In other words, it draws (with replacement) N of the original events from MadGraph, with probabilities given by the morphing setup before. This is similar to what np.random.choice() does.
- Augmentation: For each of the drawn samples, the morphing setup can be used to calculate the joint likelihood ratio and / or the joint score (this depends on which SampleAugmenter function is called).
Parameters: - filename : str
Path to MadMiner file (for instance the output of madminer.delphes.DelphesProcessor.save()).
- disable_morphing : bool, optional
If True, the morphing setup is not loaded from the file. Default value: False.
- debug : bool, optional
If True, additional detailed debugging output is printed. Default value: False.
Methods
extract_cross_sections
(theta)Calculates the total cross sections for all specified thetas. extract_raw_data
([theta, derivative])Returns all events together with the benchmark weights (if theta is None) or weights for a given theta. extract_samples_test
(theta, n_samples, …)Extracts evaluation samples x ~ p(x|theta) without any augmented data. extract_samples_train_global
(theta, …[, …])Extracts training samples x ~ p(x|theta) as well as the joint score t(x, z|theta), where theta is sampled from a prior. extract_samples_train_local
(theta, …[, …])Extracts training samples x ~ p(x|theta) as well as the joint score t(x, z|theta). extract_samples_train_more_ratios
(theta0, …)Extracts training samples x ~ p(x|theta0) and x ~ p(x|theta1) together with the class label y, the joint likelihood ratio r(x,z|theta0, theta1), and the joint score t(x,z|theta0). extract_samples_train_plain
(theta, …[, …])Extracts plain training samples x ~ p(x|theta) without any augmented data. extract_samples_train_ratio
(theta0, theta1, …)Extracts training samples x ~ p(x|theta0) and x ~ p(x|theta1) together with the class label y, the joint likelihood ratio r(x,z|theta0, theta1), and the joint score t(x,z|theta0). -
extract_cross_sections
(theta)[source]¶ Calculates the total cross sections for all specified thetas.
Parameters: - theta : tuple
Tuple (type, value) that defines the parameter point or prior over parameter points at which the cross section is calculated. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
Returns: - thetas : ndarray
Parameter points with shape (n_thetas, n_parameters).
- xsecs : ndarray
Total cross sections in pb with shape (n_thetas, ).
- xsec_uncertainties : ndarray
Statistical uncertainties on the total cross sections in pb with shape (n_thetas, ).
-
extract_raw_data
(theta=None, derivative=False)[source]¶ Returns all events together with the benchmark weights (if theta is None) or weights for a given theta.
Parameters: - theta : None or ndarray, optional
If None, the function returns the benchmark weights. Otherwise it uses morphing to calculate the weights for this value of theta. Default value: None.
- derivative : bool, optional
If True and if theta is not None, the derivative of the weights with respect to theta are returned. Default value: False.
Returns: - x : ndarray
Observables with shape (n_unweighted_samples, n_observables).
- weights : ndarray
If theta is None and derivative is False, benchmark weights with shape (n_unweighted_samples, n_benchmarks) in pb. If theta is not None and derivative is True, the gradient of the weight for the given parameter with respect to theta with shape (n_unweighted_samples, n_gradients) in pb. Otherwise, weights for the given parameter theta with shape (n_unweighted_samples,) in pb.
-
extract_samples_test
(theta, n_samples, folder, filename, test_split=0.5, switch_train_test_events=False)[source]¶ Extracts evaluation samples x ~ p(x|theta) without any augmented data.
Parameters: - theta : tuple
Tuple (type, value) that defines the parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- n_samples : int
Total number of events to be drawn.
- folder : str
Path to the folder where the resulting samples should be saved (ndarrays in .npy format).
- filename : str
Filenames for the resulting samples. A prefix such as ‘x’ or ‘theta0’ as well as the extension ‘.npy’ will be added automatically.
- test_split : float or None, optional
Fraction of events reserved for the evaluation sample (that will not be used for any training samples). Default value: 0.5.
- switch_train_test_events : bool, optional
If True, this function generates a test sample from the events normally reserved for training samples. Default value: False.
Returns: - x : ndarray
Observables with shape (n_samples, n_observables). The same information is saved as a file in the given folder.
- theta : ndarray
Parameter points used for sampling with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
-
extract_samples_train_global
(theta, n_samples, folder, filename, test_split=0.5, switch_train_test_events=False)[source]¶ Extracts training samples x ~ p(x|theta) as well as the joint score t(x, z|theta), where theta is sampled from a prior. This can be used for inference methods such as SCANDAL.
Parameters: - theta : tuple
Tuple (type, value) that defines the numerator parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- n_samples : int
Total number of events to be drawn.
- folder : str
Path to the folder where the resulting samples should be saved (ndarrays in .npy format).
- filename : str
Filenames for the resulting samples. A prefix such as ‘x’ or ‘theta0’ as well as the extension ‘.npy’ will be added automatically.
- test_split : float or None, optional
Fraction of events reserved for the evaluation sample (that will not be used for any training samples). Default value: 0.5.
- switch_train_test_events : bool, optional
If True, this function generates a training sample from the events normally reserved for test samples. Default value: False.
Returns: - x : ndarray
Observables with shape (n_samples, n_observables). The same information is saved as a file in the given folder.
- theta : ndarray
Parameter points used for sampling (and evaluation of the joint score) with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
- t_xz : ndarray
Joint score evaluated at theta with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
-
extract_samples_train_local
(theta, n_samples, folder, filename, test_split=0.5, switch_train_test_events=False, log_message=True)[source]¶ Extracts training samples x ~ p(x|theta) as well as the joint score t(x, z|theta). This can be used for inference methods such as SALLY and SALLINO.
Parameters: - theta : tuple
Tuple (type, value) that defines the parameter point for the sampling. This is also where the score is evaluated. Pass the output of the functions constant_benchmark_theta() or constant_morphing_theta().
- n_samples : int
Total number of events to be drawn.
- folder : str
Path to the folder where the resulting samples should be saved (ndarrays in .npy format).
- filename : str
Filenames for the resulting samples. A prefix such as ‘x’ or ‘theta0’ as well as the extension ‘.npy’ will be added automatically.
- test_split : float or None, optional
Fraction of events reserved for the evaluation sample (that will not be used for any training samples). Default value: 0.5.
- switch_train_test_events : bool, optional
If True, this function generates a training sample from the events normally reserved for test samples. Default value: False.
- log_message : bool, optional
If True, logging output. This option is only designed for internal use.
Returns: - x : ndarray
Observables with shape (n_samples, n_observables). The same information is saved as a file in the given folder.
- theta : ndarray
Parameter points used for sampling (and evaluation of the joint score) with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
- t_xz : ndarray
Joint score evaluated at theta with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
-
extract_samples_train_more_ratios
(theta0, theta1, n_samples, folder, filename, additional_thetas=None, test_split=0.5, switch_train_test_events=False)[source]¶ Extracts training samples x ~ p(x|theta0) and x ~ p(x|theta1) together with the class label y, the joint likelihood ratio r(x,z|theta0, theta1), and the joint score t(x,z|theta0). This information can be used in inference methods such as CARL, ROLR, CASCAL, and RASCAL.
With the keyword additional_thetas, this function allows to extract joint ratios and scores at more parameter points than just theta0 and theta1. This additional information can be used efficiently in the setup with a “doubly parameterized” likelihood ratio estimator that models the dependence on both the numerator and denominator hypothesis.
Parameters: - theta0 :
Tuple (type, value) that defines the numerator parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- theta1 :
Tuple (type, value) that defines the denominator parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- n_samples : int
Total number of events to be drawn.
- folder : str
Path to the folder where the resulting samples should be saved (ndarrays in .npy format).
- filename : str
Filenames for the resulting samples. A prefix such as ‘x’ or ‘theta0’ as well as the extension ‘.npy’ will be added automatically.
- additional_thetas : list of tuple or None
list of tuples (type, value) that defines additional theta points at which ratio and score are evaluated, and which are then used to create additional training data points. These can be efficiently used only in the “doubly parameterized” setup where a likelihood ratio estimator models the dependence of the likelihood ratio on both the numerator and denominator hypothesis. Pass the output of the helper functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas(). Default value: None.
- test_split : float or None, optional
Fraction of events reserved for the evaluation sample (that will not be used for any training samples). Default value: 0.5.
- switch_train_test_events : bool, optional
If True, this function generates a training sample from the events normally reserved for test samples. Default value: False.
Returns: - x : ndarray
Observables with shape (n_samples, n_observables). The same information is saved as a file in the given folder.
- theta0 : ndarray
Numerator parameter points with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
- theta1 : ndarray
Denominator parameter points with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
- y : ndarray
Class label with shape (n_samples, n_parameters). y=0 (1) for events sample from the numerator (denominator) hypothesis. The same information is saved as a file in the given folder.
- r_xz : ndarray
Joint likelihood ratio with shape (n_samples,). The same information is saved as a file in the given folder.
- t_xz : ndarray
Joint score evaluated at theta0 with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
-
extract_samples_train_plain
(theta, n_samples, folder, filename, test_split=0.5, switch_train_test_events=False)[source]¶ Extracts plain training samples x ~ p(x|theta) without any augmented data. This can be use for standard inference methods such as ABC, histograms of observables, or neural density estimation techniques. It can also be used to create validation or calibration samples.
Parameters: - theta : tuple
Tuple (type, value) that defines the parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- n_samples : int
Total number of events to be drawn.
- folder : str
Path to the folder where the resulting samples should be saved (ndarrays in .npy format).
- filename : str
Filenames for the resulting samples. A prefix such as ‘x’ or ‘theta0’ as well as the extension ‘.npy’ will be added automatically.
- test_split : float or None, optional
Fraction of events reserved for the evaluation sample (that will not be used for any training samples). Default value: 0.5.
- switch_train_test_events : bool, optional
If True, this function generates a training sample from the events normally reserved for test samples. Default value: False.
Returns: - x : ndarray
Observables with shape (n_samples, n_observables). The same information is saved as a file in the given folder.
- theta : ndarray
Parameter points used for sampling with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
-
extract_samples_train_ratio
(theta0, theta1, n_samples, folder, filename, test_split=0.5, switch_train_test_events=False)[source]¶ Extracts training samples x ~ p(x|theta0) and x ~ p(x|theta1) together with the class label y, the joint likelihood ratio r(x,z|theta0, theta1), and the joint score t(x,z|theta0). This information can be used in inference methods such as CARL, ROLR, CASCAL, and RASCAL.
Parameters: - theta0 : tuple
Tuple (type, value) that defines the numerator parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- theta1 : tuple
Tuple (type, value) that defines the denominator parameter point or prior over parameter points for the sampling. Pass the output of the functions constant_benchmark_theta(), multiple_benchmark_thetas(), constant_morphing_theta(), multiple_morphing_thetas(), or random_morphing_thetas().
- n_samples : int
Total number of events to be drawn.
- folder : str
Path to the folder where the resulting samples should be saved (ndarrays in .npy format).
- filename : str
Filenames for the resulting samples. A prefix such as ‘x’ or ‘theta0’ as well as the extension ‘.npy’ will be added automatically.
- test_split : float or None, optional
Fraction of events reserved for the evaluation sample (that will not be used for any training samples). Default value: 0.5.
- switch_train_test_events : bool, optional
If True, this function generates a training sample from the events normally reserved for test samples. Default value: False.
Returns: - x : ndarray
Observables with shape (n_samples, n_observables). The same information is saved as a file in the given folder.
- theta0 : ndarray
Numerator parameter points with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
- theta1 : ndarray
Denominator parameter points with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
- y : ndarray
Class label with shape (n_samples, n_parameters). y=0 (1) for events sample from the numerator (denominator) hypothesis. The same information is saved as a file in the given folder.
- r_xz : ndarray
Joint likelihood ratio with shape (n_samples,). The same information is saved as a file in the given folder.
- t_xz : ndarray
Joint score evaluated at theta0 with shape (n_samples, n_parameters). The same information is saved as a file in the given folder.
-
madminer.sampling.
combine_and_shuffle
(input_filenames, output_filename, overwrite_existing_file=True, debug=False)[source]¶ Combines multiple MadMiner files into one, and shuffles the order of the events.
Note that this function assumes that all samples are generated with the same setup, including identical benchmarks (and thus morphing setup). If it is used with samples with different settings, there will be wrong results! There are no explicit cross checks in place yet!
Parameters: - input_filenames : list of str
List of paths to the input MadMiner files.
- output_filename : str
Path to the combined MadMiner file.
- overwrite_existing_file : bool, optional
If True and if the output file exists, it is overwritten. Default value: True.
- debug : bool, optional
If True, additional detailed debugging output is printed. Default value: False.
Returns: - None
-
madminer.sampling.
constant_benchmark_theta
(benchmark_name)[source]¶ Utility function to be used as input to various SampleAugmenter functions, specifying a single parameter benchmark.
Parameters: - benchmark_name : str
Name of the benchmark (as in madminer.core.MadMiner.add_benchmark)
Returns: - output : tuple
Input to various SampleAugmenter functions
-
madminer.sampling.
constant_morphing_theta
(theta)[source]¶ Utility function to be used as input to various SampleAugmenter functions, specifying a single parameter point theta in a morphing setup.
Parameters: - theta : ndarray or list
Parameter point with shape (n_parameters,)
Returns: - output : tuple
Input to various SampleAugmenter functions
-
madminer.sampling.
multiple_benchmark_thetas
(benchmark_names)[source]¶ Utility function to be used as input to various SampleAugmenter functions, specifying multiple parameter benchmarks.
Parameters: - benchmark_names : list of str
List of names of the benchmarks (as in madminer.core.MadMiner.add_benchmark)
Returns: - output : tuple
Input to various SampleAugmenter functions
-
madminer.sampling.
multiple_morphing_thetas
(thetas)[source]¶ Utility function to be used as input to various SampleAugmenter functions, specifying multiple parameter points theta in a morphing setup.
Parameters: - thetas : ndarray or list of lists or list of ndarrays
Parameter points with shape (n_thetas, n_parameters)
Returns: - output : tuple
Input to various SampleAugmenter functions
-
madminer.sampling.
random_morphing_thetas
(n_thetas, priors)[source]¶ Utility function to be used as input to various SampleAugmenter functions, specifying random parameter points sampled from a prior in a morphing setup.
Parameters: - n_thetas : int
Number of parameter points to be sampled
- priors : list of tuples
Priors for each parameter is characterized by a tuple of the form (prior_shape, prior_param_0, prior_param_1). Currently, the supported prior_shapes are flat, in which case the two other parameters are the lower and upper bound of the flat prior, and gaussian, in which case they are the mean and standard deviation of a Gaussian.
Returns: - output : tuple
Input to various SampleAugmenter functions


local::lib lets you have your own Perl modules, while still running system Perl.
local::lib lets you build and install your own Perl modules, without having to build and install your own Perl. It uses the system's Perl, as well as as the system's build environment to build modules, which are then installed into your home directory.
There are two major advantages to using local::lib:
local::lib can be a quick way to begin installing your own modules when the existing system Perl already meets your needs. However, there are also disadvantages to using local::lib:
It is up to you to decide if local::lib is the right way to go, or if SRCC should build what you want instead. Or, if you also need control over which Perl you want to use, Perlbrew might be a better option.
local::lib does what it does using environment variable tricks. Because of that, you have to be careful when mixing local::lib with other tools that also modify the environment:
Where local::lib only manages Perl modules, Perlbrew gives you an entire Perl environment that is your own. However, you must be very careful, because using local::lib and Perlbrew might cause problems. Perlbrew works by changing your $PATH
environment variable to point to a local Perl installation, which is owned by you. local::lib also changes $PATH
, as well as other Perl-related variables, so even if Perlbrew's changes take precedence, the other environment variables may cause unexpected effects.
To be safe, you should either just use a global local::lib or just use Perlbrew, not both. Perlbrew can also manage multiple local::lib installations that are specific to each Perl you build. Read more below.
One of the environment variables set by local::lib is $PERL5LIB
. This extends the list of places where Perl searches for modules.
When a Perl script is run in taint mode, Perl intentionally ignores the $PERL5LIB
environment variable. Running a script in Taint mode can be specified by the user (by placing -T
in the perl
command line), but it can also be specified by the script itself. The script does have a way of honoring $PERL5LIB
even in taint mode (through the perl5lib module), but that is rarely used: The perl5lib module is a module, which if installed via local::lib, creates a Catch-22 situation.
Perl code which uses taint mode will not be able to use modules loaded through local::lib.
NOTE: In this section, we are talking about the software modules that are loaded using the module load
command. This section does not refer to Perl modules unless it explicitly says "Perl modules".
Your local Perl modules might conflict with software modules loaded using the module load
command.  We have already installed the software, but first you need to make sure it works.
If you are using local::lib within Perlbrew, then you don't have to do anything here, so skip down to the next section. If you are not using Perlbrew, then you should load the local::lib module once, to make sure it works:
akkornel@rice05:~$ perl -Mlocal::lib Attempting to create directory /home/akkornel/perl5 PATH="/home/akkornel/perl5/bin${PATH+:}${PATH}"; export PATH; PERL5LIB="/home/akkornel/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB; PERL_LOCAL_LIB_ROOT="/home/akkornel/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT; PERL_MB_OPT="--install_base \"/home/akkornel/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE=/home/akkornel/perl5"; export PERL_MM_OPT;
The first message, "Attempting to create directory /home/akkornel/perl5", is what's important (although it will show your username, instead of "akkornel"). If you see that message, and no errors, then local::lib is ready to use!
All the files installed by local::lib go into ~/perl5
, but it will not use the ~/perl5/perlbrew
directory, which is used exclusively by Perlbrew.
Now that local::lib has finished its "installation", you need to decide how to use it:
If you are using Perlbrew, then no extra work is required, because Perlbrew includes the ability to create multiple local::lib environments inside your local Perl. Here's how to use local::lib with Perlbrew:
perlbrew install
command to install one.perlbrew use
to activate a local Perl, followed by perlbrew lib create
to create the local::lib environment:akkornel@rice03:~$ perlbrew list perl-5.24.0 akkornel@rice03:~$ perlbrew use 5.24.0 akkornel@rice03:~$ perlbrew lib create awesome lib 'perl-5.24.0@awesome' is created.
perlbrew use version@libName
:akkornel@rice03:~$ perlbrew list * perl-5.24.0 perl-5.24.0@awesome akkornel@rice03:~$ perlbrew use 5.24.0@awesome Attempting to create directory /home/akkornel/.perlbrew/libs/perl-5.24.0@awesome
Once you have run perlbrew use
to activate your Perl with local::lib, code that you run (and modules that you install) will use (and be installed to) the separate Perlbrew local::lib directory that was created when you ran perlbrew use
.
To switch back to your local Perl without the local::lib, use perlbrew use
, but without the local::lib name:
akkornel@rice03:~$ perlbrew list perl-5.24.0 * perl-5.24.0@awesome akkornel@rice03:~$ perlbrew use 5.24.0 akkornel@rice03:~$ perlbrew list * perl-5.24.0 perl-5.24.0@awesome
There are three ways to use local::lib:
Each method is discussed in detail more below:
There are two ways of activating local::lib manually:
If you want to use local::lib for a single Perl execution, simply include -Mlocal::lib
in the Perl command line, like so:
perl -Mlocal::lib my_perl_file.pl
If you want to use local::lib for an entire session, run this command for bash:
eval $(perl -I$HOME/perl5/lib -Mlocal::lib)
… or run this command for csh or tcsh:
eval `perl -I$HOME/perl5/lib -Mlocal::lib=--shelltype=csh`
That will activate local::lib until you deactivate it, or until the current session ends (whichever comes first). Other sessions, even sessions running on the same machine, will not use local::lib (unless you manually activate it in that session).
To load local::lib automatically, you will need to make a change to one of the shell scripts that are executed every time you start a new session. Exactly what change to make depends on the shell you use.
If you are running bash, use this command to edit your .bashrc file:
echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> ~/.bashrc
If you are running csh/tcsh, run this command to edit your .cshrc file:
echo 'eval `perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=--shelltype=csh`' >> ~/.cshrc
Once you have made the change, log out and log back in for the change to take effect.
If you ever decide to remove local::lib, simply remove the corresponding line from your .bashrc or .cshrc file.
If local::lib is loaded automatically, and you would like to deactivate it temporarily, the following line of Perl code will do that in bash:
eval $(perl -Mlocal::lib=--deactivate)
… and the following line for csh or tcsh:
eval `perl -Mlocal::lib=--shelltype=csh,--deactivate`
local::lib will remain deactivated for the current session only, and will come back the next time you log in (or start a new shell).
Now that you have local::lib working, you probably want to install modules. When local::lib is active, installing modules is as simple as running the cpan
command:
akkornel@rice05:~$ eval $(perl -I$HOME/perl5/lib -Mlocal::lib) akkornel@rice05:~$ cpan install Readonly Loading internal null logger. Install Log::Log4perl for logging messages Reading '/home/akkornel/.cpan/Metadata' Database was generated on Tue, 18 Oct 2016 16:29:02 GMT
Running install for module 'Readonly' ... lots of lines snipped ... Installing /home/akkornel/perl5/lib/perl5/Readonly.pm Installing /home/akkornel/perl5/man/man3/Readonly.3pm SANKO/Readonly-2.05.tar.gz ./Build install -- OK
in the above example, the Readonly module had several required packages that were not installed, so the cpan
command downloaded and installed those as well. The system's Perl, compiler, and libraries were used for the build, and the modules you build will only be used when local::lib is active. Also, in the session used to make the above example, local::lib was not already loaded, so the appropriate command had to be run in order to load it.
One issue you may encounter, when building your own modules, is missing header files. For example, the first time cpan install Crypt::SSLeay
was run on FarmShare 2, it failed to build:
akkornel@rice05:~$ eval $(perl -I$HOME/perl5/lib -Mlocal::lib) akkornel@rice05:~$ cpan install Crypt::SSLeay Loading internal null logger. Install Log::Log4perl for logging messages Reading '/home/akkornel/.cpan/Metadata' Database was generated on Tue, 18 Oct 2016 16:29:02 GMT Running install for module 'Crypt::SSLeay' ... many, many lines of output skipped here ... openssl-version.c:2:30: fatal error: openssl/opensslv.h: No such file or directory compilation terminated. Failed to build and link a simple executable using OpenSSL No 'Makefile' created NANIS/Crypt-SSLeay-0.72.tar.gz /home/akkornel/perl5/perlbrew/perls/perl-5.24.0/bin/perl Makefile.PL -- NOT OK akkornel@rice05:~$
This failure happened because a package was missing: Crypt::SSLeay uses OpenSSL to do the actual work; although the OpenSSL libraries were installed, the OpenSSL header files were not. Header files are only needed when you are building software, so the lack of header files caused the build to fail. In this case, installing the libssl-dev package was enough to solve the problem.
If you are trying to use cpan
, and it fails, it may be due to missing libraries or missing header files. Feel free to contact us for help!
SRCC is happy to help you! To get support, all you need to do is email us. When you email us, be sure to include the following information:
module list
, env
, and perl -V
commands.If the problem is a missing library or missing header files, we can normally address that quickly. If the problem is an out-of-date library, that will take longer to address.
Good luck!


Write data to a remote file.
#include <ftplib.h> int FtpWrite(void *buf, int len, netbuf *nData);
FtpWrite() sends data to a remote file. If the file was accessed in record mode, the necessary conversions are performed.
Returns the number of bytes sent from the user's buffer or -1 on error.


{% extends 'base.html' %} {% load crispy_forms_tags %} {% block title %}Apply Employee to Client{% endblock %} {% block content %}
Apply an employee from the staffing agency to a client. If the client does not exist yet, you can create it.
{% if available_clients %} {% else %}There are no clients left that the employee does not already work for. As a staffing agency administrator, you may register a new client.
{% endif %}


Intensive web development course
Master thesis: "Online infridgements - A quantitative analysis".
Bachelor thesis: "The copyright of photos when shared in online social networks".
Apart from being a junior full stack developer, I enjoy a lot of different sports, such as tennis and football, both as a participant and as a spectator.
During winter I do cross country skiing.
My free time is mostly spent with my friends and family and when relaxing I enjoy to watch TV series or sports. I strive for and like to keep my self updated on what's the latest within politics and technology.