With a weight grid, zonal metrics can be computed. The four primary approaches use slightly different processes:
exactextractr
leverages C libraries and an in memory raster and sf object. It works polygon-by-polygon to compute coverage’s and the weight table is computed within the function.intersectr
utilizes NetCDF filepath and calculates all polygons timestep-by-timestep usingdata.table
. A weight grid must be supplied.zonal
works from NetCDF or tif filepath and calculates all polygons and all time simultaneously using data.table
. A weight grid must also be supplied.The performance and comparison of these three approaches are shown below when the domain is large, and when (A) there a many thousands of polygons, and (B) when there a a few large polygon aggregation units.
The intersectr
workflow for defining inputs for execute_intersection
are wrapping into a prep function below:
intersectr_prep = function(file, geom, ID, variable){
nc_coord_vars <- nc_coord_var(file)
nc_coord_vars <- filter(nc_coord_vars, variable == !!variable)
nc <- open.nc(file)
X_coords <- var.get.nc(nc, nc_coord_vars$X, unpack = TRUE)
Y_coords <- var.get.nc(nc, nc_coord_vars$Y, unpack = TRUE)
nc_prj <- nc_gm_to_prj(nc_grid_mapping_atts(file))
cell_geometry = create_cell_geometry(X_coords = X_coords,
Y_coords = Y_coords,
prj = nc_prj,
geom = geom,
buffer_dist = 0.1, # Degrees
regularize = TRUE)
data_source_cells <- st_sf(dplyr::select(cell_geometry, grid_ids))
target_polygons <- st_sf(dplyr::select(geom, !!ID))
st_agr(data_source_cells) <- "constant"
st_agr(target_polygons) <- "constant"
area_weights = calculate_area_intersection_weights(data_source_cells, target_polygons, allow_lonlat = TRUE)
return(list(grid = cell_geometry, w = area_weights, x = nc_coord_vars$X, y = nc_coord_vars$Y, t = nc_coord_vars$T))
}
The exacextract
workflow for computing aggregate means for a raster stack are wrapped below:
exactrextract_process = function(file, geom, ID){
R.utils::withTimeout(
exactextractr::exact_extract(raster::stack(file),
geom,
stack_apply = TRUE,
fun = "mean",
append_cols = ID,
progress = FALSE),
timeout = 180, onTimeout = "silent")
}
Spoiler Alert: This method can take an extremely long time when the polygon count is very high. As such, we are limiting the execution time to 180 seconds (three minutes). If a benchmark time indicates the process takes 180 seconds, it means the process was killed and not completed.
The zonal
workflow for building a weight grid and executing the areal averages can be executed with execute_zonal
.
library(zonal)
The gridded data and aggregate units we are working with can be seen below:
file = 'pet_2020.nc'
(s = terra::rast(file))
## class : SpatRaster
## dimensions : 585, 1386, 366 (nrow, ncol, nlyr)
## resolution : 0.04167, 0.04167 (x, y)
## extent : -124.8, -67.04, 25.05, 49.42 (xmin, xmax, ymin, ymax)
## coord. ref. : +proj=longlat +datum=WGS84 +no_defs
## source : pet_2020.nc
## varname : potential_evapotranspiration (pet)
## names : poten~43829, poten~43830, poten~43831, poten~43832, poten~43833, poten~43834, ...
## unit : mm, mm, mm, mm, mm, mm, ...
Looking at the grid we can see in consists of 810810 grid cells each with a 0.0417 meter by 0.0417 meter resolution. Additionally, there are 366 unique time slices in the NetCDF file.
Our first example uses a hydrofabric developed for the Northeast USA.
geom <- read_sf('hydrofabric.gpkg', "catchments")
paint(geom)
## sf [18041, 4]
## active geometry column: geom (POLYGON)
## crs: 5070 (NAD83 / Conus Albers)
## crs unit: metre
## ID chr cat-1 cat-2 cat-4 cat-5 cat-6 cat-7
## area_sqkm dbl 12.457576 267.083595 8.319214 9.278138 60.577~
## toID chr nex-2 nex-3 nex-5 nex-6 nex-7 nex-8
## geom sfc POLY 2,024B POLY 9,064B POLY 1,656B POLY 1,81~
In total we have 18,041 aggregation units to summarize over the 366 time steps. Both zonal and intersectr are designed to precompute a weight grid. Therefore we time how long it takes to do this using each method:
int_time_huc01 = system.time({
intersectr_input = intersectr_prep(file,
geom,
ID = "ID",
variable = 'potential_evapotranspiration')
})
zonal_time_huc01 = system.time({
zonal_w = weighting_grid(file,
geom,
ID = "ID")
})
Next, we benchmark the time it takes to do the following: - run the intersectr
workflow with precomputed weights - run the exactextractr
workflow - run the zonal
workflow - run the zonal
workflow with precomputed weights
huc01_bnch <- bench::mark(
iterations = 1, check = FALSE, time_unit = 's',
intersectr_staged_weights = execute_intersection(nc_file = file,
variable_name = 'potential_evapotranspiration',
intersection_weights = intersectr_input$w,
cell_geometry = intersectr_input$grid,
x_var = intersectr_input$x,
y_var = intersectr_input$y,
t_var = intersectr_input$t,
start_datetime = NULL,
end_datetime = NULL),
exactextractr = exactrextract_process(file, geom, "ID"),
zonal_full = execute_zonal(file, geom, "ID"),
zonal_staged_weights = execute_zonal(file, w = zonal_w)
)
Overall when the polygon count is very high (~20,000), the zonal aproach with precomputed weights and non precomputed weights performs the best. Precomputing the weights save a significant amount of memory in the process and ~4 seconds in total run time. These timings suggest that 20 years of daily GridMet data could be computed for the ~20,000 catchments in about 11 minutes (~30 seconds * 20 year + ~15 seconds). The intersectr
approach requires way more memory despite the precomputation of weights and takes about 3 times as long as zonal. Lastly the exactextract
methods timed out at the upper limit of 180 seconds we prescribed.
Our second example looks at the timings for an aggregation over a large area with a few aggregation units. The gridded data is the same as example 1, and the aggregate units can be seen below:
(florida <- AOI::aoi_get(state = "FL", county = "all"))
## Simple feature collection with 67 features and 12 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -87.63 ymin: 24.5 xmax: -80.03 ymax: 31
## Geodetic CRS: NAD83
## First 10 features:
## statefp countyfp countyns affgeoid geoid name lsad aland awater state_name
## 9 12<PHONE_NUMBER>2 0500000US12027 12027 DeSoto 06<PHONE_NUMBER> 6247257 Florida
## 97 12<PHONE_NUMBER>1 0500000US12109 12109 St. Johns 06<PHONE_NUMBER> 571962797 Florida
## 143 12<PHONE_NUMBER>6 0500000US12049 12049 Hardee 06<PHONE_NUMBER> 1439673 Florida
## 285 12<PHONE_NUMBER>3 0500000US12125 12125 Union 06 630807237 16049079 Florida
## 398 12<PHONE_NUMBER>8 0500000US12005 12005 Bay 06<PHONE_NUMBER> 711451660 Florida
## 403 12<PHONE_NUMBER>8 0500000US12039 12039 Gadsden 06<PHONE_NUMBER> 31687293 Florida
## 404 12<PHONE_NUMBER>6 0500000US12073 12073 Leon 06<PHONE_NUMBER> 90453994 Florida
## state_abbr jurisdiction_type geometry
## 9 FL state MULTIPOLYGON (((-82.06 27.2...
## 97 FL state MULTIPOLYGON (((-81.68 30.1...
## 143 FL state MULTIPOLYGON (((-82.05 27.6...
## 285 FL state MULTIPOLYGON (((-82.58 29.9...
## 398 FL state MULTIPOLYGON (((-85.99 30.3...
## 403 FL state MULTIPOLYGON (((-84.93 30.6...
## 404 FL state MULTIPOLYGON (((-84.72 30.3...
## [ reached 'max' / getOption("max.print") -- omitted 3 rows ]
The same functions and timing from example 1 are computed:
int_time_fl = system.time({
intersectr_input_florida = intersectr_prep(file, florida, ID = "geoid", variable = 'potential_evapotranspiration')
})
zonal_time_fl = system.time({
zonal_w_florida = weighting_grid(file, florida, ID = "geoid")
})
fl_bnch <- bench::mark(
iterations = 1, check = FALSE, time_unit = 's',
intersectr_staged_weights = execute_intersection(nc_file = file,
variable_name = 'potential_evapotranspiration',
intersection_weights = intersectr_input_florida$w,
cell_geometry = intersectr_input_florida$grid,
x_var = intersectr_input_florida$x,
y_var = intersectr_input_florida$y,
t_var = intersectr_input_florida$t,
start_datetime = NULL,
end_datetime = NULL),
exactextractr = exactrextract_process(file, florida, "geoid"),
zonal_full = execute_zonal(file, florida, "geoid"),
zonal_staged_weights = execute_zonal(file, w = zonal_w_florida)
)


---
layout: post
title: OSS is now cheaper as well
tags:
- Open Source Software
status: publish
type: post
published: true
meta: {}
---
This article reports that on low to medium size applicationso OSS databases can be perhaps twice as cost affective as their commercial brethren. There a breif mention of where the current OSS offerings as lacking (system management, XML support).
Considering how complex a modern RDBMS is then this is still considerable eachievment. I look forward to commercial applications, such as Serena Dimensions, being shipped on an OSS database in the future


| CONTENTS |
Summary BoxHow quickly can you move around the Unix filesystem? Can you locate any file or directory on your filesystem with both its absolute and relative pathnames? How can symbolic links help you and hurt you? A lot of Unix users don't realize how much they'll be helped by completely understanding a few filesystem basics. Here are some of the most important concepts and tricks to know:
JP |
Everything in the Unix filesystem files, directories, devices, named pipes, and so on has two pathnames: absolute and relative. If you know how to find those names, you'll know the best way to locate the file (or whatever) and use it. Even though pathnames are amazingly simple, they're one of the biggest problems beginners have. Studying this article carefully can save you a lot of time and frustration. See Figure 31-1 for an illustration of the Unix filesystem.
Table 31-1 describes the two kinds of pathnames.
|
Absolute pathnames |
Relative pathnames |
|---|---|
|
Start at the root directory. |
Start at your current directory (Section 1.16). |
|
Always start with a slash (/). |
Never start with a slash. |
|
The absolute pathname to some object (file, etc.) is always the same. |
The relative pathname to an object depends on your current directory. |
To make an absolute pathname:
Start at the root directory (/) and work down.
Put a slash (/) after every directory name though if the path ends at a directory, the slash after the last name is optional.
For example, to get a listing of the directory highlighted in Figure 31-1, no matter what your current directory is, you'd use an absolute pathname like this:
% ls /home/jane/data Sub a b c
To make a relative pathname:
Start at your current directory.
As you move down the tree, away from root, add subdirectory names.
As you move up the tree toward root, add .. (two dots) for each directory.
Put a slash (/) after every directory name though if the path is to a directory, the slash after the last name is optional, as it is with absolute pathnames.
For example, if your current directory is the one shown in Figure 31-1, to get a listing of the Sub subdirectory, use a relative pathname:
% ls Sub d e f
Without changing your current directory, you can use a relative pathname to read the file d in the Sub subdirectory:
% cat Sub/d
To change the current directory to Jim's home directory, you could use a relative pathname to it:
% cd ../../jim
Using the absolute pathname, /home/jim, might be easier there.
The symbolic link (Section 10.4) adds a twist to pathnames. What two absolute pathnames would read the file that the symlink points to? The answer: /home/jane/.setup or /work/setups/generic. (The second pathname points directly to the file, so it's a little more efficient.) If your current directory was the one shown in Figure 31-1, what would be the easiest way to read that file with the more pager? It's probably through the symlink:
% more ../.setup
Remember, when you need to use something in the filesystem, you don't always need to use cd first. Think about using a relative or absolute pathname with the command; that'll almost always work. If you get an error message, check your pathname carefully; that's usually the problem.
JP
People who think the cd command is all they need to know about current directories should read this article! Understanding how Unix uses the current directory can save you work.
Each Unix process has its own current directory. For instance, your shell has a current directory. So do vi, ls, sed, and every other Unix process. When your shell starts a process running, that child process starts with the same current directory as its parent. So how does ls know which directory to list? It uses the current directory it inherited from its parent process, the shell:
% ls ...Listing of ls's current directory appears, which is the same current directory as the shell.
Each process can change its current directory and that won't change the current directory of other processes that are already running. So:
Your shell script (which runs in a separate process) can cd to another directory without affecting the shell that started it. (So, the script doesn't need to cd back to the directory where it started before it exits.)
If you have more than one window or login session to the same computer, they probably run separate processes. So, they have independent current directories.
When you use a subshell (Section 43.7, Section 24.4) or a shell escape, you can cd anywhere you want. After you exit that shell, the parent shell's current directory won't have changed. For example, if you want to run a command in another directory without cding there first (and having to cd back), do it in a subshell:
% pwd /foo/bar % (cd baz ; somecommand > somefile ) % pwd /foo/bar
When you really get down to it, what good is a current directory? Here it is: relative pathnames start at the current directory. Having a current directory means you can refer to a file by its relative pathname, like afile. Programs like ls access the current directory through its relative pathname . (dot) (Section 1.16). Without a current directory and relative pathnames, you'd always have to use absolute pathnames (Section 31.2) like /usr/joe/projects/alpha/afile.
JP
[ This article is about the standard Unix pwd command, an external (Section 1.9) command that isn't built into your shell. (The external pwd is usually stored at /bin/pwd.) Most shells have an internal version of pwd that "keeps track" of you as you change your current directory; it doesn't have to search the filesystem to find the current directory name. This article describes how the external version finds the pathname of its current directory. This isn't just academic stuff: seeing how pwd finds its current directory should help you understand how the filesystem is put together. JP]
A command like pwd inherits the current directory of the process that started it (usually a shell). It could be started from anywhere. How does pwd find out where it is in the filesystem? See Figure 31-2 for a picture of the current directory /usr/joe and its parent directories. The current directory doesn't contain its own name, so that doesn't help pwd. But it has an entry named . (dot), which gives the i-number of the directory (Section 10.2).
The current directory has i-number 234. Next, pwd asks Unix to open the parent directory file, the directory one level up, through the relative pathname (..). It's looking for the name that goes with i-number 234. Aha: the current directory is named joe, so the end of the pathname must be joe.
Next step: pwd looks at the . entry in the directory one level up to get its i-number, 14. As always, the name of the one-level-up directory is in its parent (.., i-number 12). To get its name, pwd opens the directory two levels up and looks for i-number 14, usr. Now pwd has the pathname usr/joe.
Same steps: look in the parent, i-number 12. What's its name? Hmmm. The i-number of its parent, 12, is the same as its own and there's only one directory on the filesystem like this: the root directory (/). So pwd adds a slash to the start of the pathname and it's done: /usr/joe.
This explanation is really missing one or two parts: filesystems can be mounted on other filesystems, or they can be mounted across the network from other hosts. So at each step, pwd also needs to check the device that the current directory is mounted on. If you're curious, see the stat(2) manual page or check a Unix internals book. Also see the last few paragraphs of Section 10.4 for more about the links between directories.
JP
Some people make a shell alias (Section 29.2) for directories they cd to often. Other people set shell variables (Section 35.9) to hold the pathnames of directories they don't want to retype. But both of those methods make you remember directory abbreviations and make you put new aliases or shell variables in your shell startup files (Section 3.3) each time you want to add or change one. There's another way: the C shell's cdpath shell variable and the CDPATH variable in ksh, bash, and some versions of sh. (zsh understands both cdpath and CDPATH.) I'll use the term "cdpath" to talk about all shells.
When you type the command cd foo, the shell first tries to go to the exact pathname foo. If that doesn't work, and if foo is a relative pathname, the shell tries the same command from every directory listed in the cdpath. (If you use ksh or sh, see the note at the end of this article.)
Let's say that your home directory is /home/lisa and your current directory is somewhere else. Let's also say that your cdpath has the directories /home/lisa, /home/lisa/projects, and /books/troff. If your cd foo command doesn't work in your current directory, your shell will try cd /home/lisa/foo, cd /home/lisa/projects/foo, and cd /books/troff/foo, in that order. If the shell finds one, it shows the pathname:
% cd foo /home/lisa/foo %
If there is more than one matching directory, the shell uses the first match; if this isn't what you wanted, you can change the order of the directories in the cdpath.
Some Bourne shells don't show the directory name. All shells print an error, though, if they can't find any foo directory.
So, set your cdpath to a list of the parent directories that contain directories you might want to cd to. Don't list the exact directories list the parent directories (Section 1.16). This list goes in your .tcshrc, .cshrc, or .profile file. For example, lisa's .tcshrc could have:
set cdpath=(~ ~/projects /books/troff)
A Bourne shell user would have this in his .profile file:
CDPATH=:$HOME:$HOME/projects:/books/troff export CDPATH
A bash user might have it in her .bashrc or .bash_profile.
(If your system doesn't define $HOME, try $LOGDIR.)
|
JP and SJC
Normally a for loop (Section 35.21) iterates until it has processed all its word arguments. while and until loops (Section 35.15) iterate until the loop control command returns a certain status. But sometimes for instance, if there's an error you want a loop to immediately terminate or jump to the next iteration. That's where you use break and continue, respectively.
break terminates the loop and takes control to the line after done. continue skips the rest of the commands in the loop body and starts the next iteration. Here's an example of both. An outer loop is stepping through a list of directories. If we can't cd to one of them, we'll abort the loop with break. The inner loop steps through all entries in the directory. If one of the entries isn't a file or isn't readable, we skip it and try the next one.
'...' Section 28.14, || Section 35.14, * Section 1.13, test Section 35.26
for dir in `find $HOME/projdir -type d -print` do cd "$dir" || break echo "Processing $dir" for file in * do test -f "$file" -a -r "$file" || continue ...process $dir/$file... done done
With nested loops (like the file loop above), which loop is broken or continued? It's the loop being processed at that time. So, the continue here restarts the inner (file) loop. The break terminates the outer (directory) loop which means the inner loop is also terminated. Note also that the -print argument to find is often redundant in the absence of another expression, depending on your version of find.
Here we've used break and continue within for loops, after the shell's || operator. But you can use them anywhere within the body of any loop in an if statement within a while loop, for instance.
JP
How often do you need to move to some other directory temporarily, look at some file, and then move back to the directory where you started? If you're like most users, you do this all the time. Most shells have pushd and popd commands to make this a lot easier. (If you use the original ksh, Learning the Korn Shell, by Bill Rosenblatt and Arnold Robbins and also published by O'Reilly, shows you shell functions that do the same thing.)
These commands implement a "directory stack." The classical analogy for a stack is one of those spring-loaded plate stackers in a school (or corporate) cafeteria. The last plate put ("pushed") onto the stack is the first plate taken ("popped") from the stack. It's just the same with directories: each time you use pushd, the shell adds your current directory to the stack and moves you to the new directory. When you use popd, the shell takes the top directory off the stack and moves you to the directory underneath.[1]
You may as well learn about pushd the way I did: by watching. Let's say that I'm in the directory ~/power, working on this book. I want to change to my Mail directory briefly, to look at some old correspondence. Let's see how. (Note that if you have a cdpath (Section 31.5) that includes your home directory, ~ or $HOME, you won't need to type the ~/ with arguments to pushd. In other words, pushd looks at your cdpath.)
los% pushd ~/Mail current directory becomes ~/Mail ~/Mail ~/power
pushd prints the entire stack, giving me some confirmation about where I am and where I can go. When I'm done reading the old mail, I want to move back:
los% popd current directory becomes ~/power ~/power
We're back where we started; the Mail directory is no longer on the stack.
What if you want to move back and forth repeatedly? pushd, with no arguments, just switches the two top directories on the stack, like this:
los% pwd current directory is ~/power /home/los/mikel/power los% pushd ~/Mail current directory becomes ~/Mail ~/Mail ~/power los% pushd current directory becomes ~/power ~/power ~/Mail los% pushd current directory becomes ~/Mail ~/Mail ~/power
And so on.
If you like, you can let your directory stack get really long. In this case, two special commands are useful. popd +n deletes the n entry in the stack. Entries are counted "down" from the top, starting with zero; that is, your current directory is 0. So popd +0 and popd are the same. If n is greater than 0, your current directory does not change. This may seem surprising, but it isn't; after all, you haven't changed the top of the stack.
The command pushd +n "rotates" the stack, so that the nth directory moves to the top, becoming the current directory. Note that this is a "rotation": the whole stack moves. I don't find the +n commands too useful, but you should know about them.
The dirs command prints the directory stack. It's a good way to find out where you are. (Some people like to put the dirs command in their prompt (Section 4.14), but I personally find incredibly long prompts more annoying than helpful.) If you'd like a numbered list of the directories on the stack, most shells support dirs -v.
The one drawback to pushd and popd is that you can easily build up a gigantic directory stack full of useless directories. I suppose this doesn't really hurt anything, but it's needless clutter. One way to clear the stack is to popd repeatedly. More to the point, the directories you're most likely to want are at the top of the stack. With seven directories in the stack, you could conceivably do something like this to get rid of the bottom two elements:
% pushd +5 ; popd ; popd
The pushd moves the bottom two elements of a seven-directory stack to the top. A bit inconvenient.
The zsh commands cd +n and cd -n move a directory to the top of the stack and change to the "popped" directory. The + counts from the top (left end) of the stack (starting with zero), and - counts from the bottom. As you do this, remember that in zsh terminology, the current directory is not on the stack; it's separate from the stack. As the previous footnote explains, this different interpretation of the stack takes some getting used to. Also see the zshbuiltins(1) manual page. Whew.
If the stack gets too messy, here's an easy way to start over: In bash Version 2 and in tcsh, the command dirs -c clears the stack. In csh, you can use the built-in repeat command to clear the stack. For example, if the stack has seven directories, type:
% repeat 6 popd
ML and JP
The pushd command (Section 31.7) is nice for jumping around the filesystem, but some of the commands you might type a lot, like pushd +4, are sort of a pain to type. I saw these aliases (Section 29.2) in Daniel Gilly's setup file. They looked so handy that I decided to steal them for this book. There are C shell versions in the first column and Bourne-type in the second:
alias pd pushd alias pd=pushd alias pd2 'pushd +2' alias pd2='pushd +2' alias pd3 'pushd +3' alias pd3='pushd +3' alias pd4 'pushd +4' alias pd4='pushd +4' ...
So, for example, to swap the fourth directory on the stack, just type pd4.
JP
If you do a lot of work in some particular directories, it can be handy to make aliases (Section 29.2) that take you to each directory quickly. For example, this Korn shell alias lets you type pwr to change to the /books/troff/pwrtools directory:
alias pwr='cd /books/troff/pwrtools'
(If your shell doesn't have aliases, you can use a shell function (Section 29.11). A shell script (Section 1.8) won't work, though, because it runs in a subshell (Section 24.4).)
When you pick the alias names, it's a good idea not to conflict with command names that are already on the system. Section 35.27 shows how to pick a new name.
If you have a lot of these directory-changing aliases, you might want to put them in a separate file named something like .cd_aliases. Then add these lines to your shell setup file (Section 3.3), like this C shell example for your .cshrc:
source Section 35.29, ~ Section 31.11
alias setcds source ~/.cd_aliases setcds
That reads your aliases into each shell. If you edit the .cd_aliases file, you can read the new file into your shell by typing setcds from any directory.
Finally, if you're in a group of people who all work on the same directories, you could make a central alias file that everyone reads from their shell setup files as they log in. Just adapt the example above.
JP
Here's a handy shell function called c for people who cd all over the filesystem. (I first saw Marc Brumlik's posting of it on Usenet years ago, as a C shell alias. He and I have both made some changes to it since then.) This function is great for shells that don't have filename completion (Section 28.6). This function works a bit like filename completion, but it's faster because the "initials" match only directories and you don't have to press TAB or ESC after each part of the pathname. Instead, you just type the initials (first letter or more) of each directory in the pathname. Start at the root directory. Put a dot (.) after each part.
Here are three examples. The first one shows that there's no subdirectory of root whose name starts with q. The second one matches the directory /usr/include/hsfs and cds there:
$ c q. c: no match for /q*/. $ c u.i.h. /usr/include/hsfs/. $
In the next example, trying to change to /usr/include/pascal the abbreviations aren't unique the first time. The function shows me all the matches; the second time, I add another letter ("a") to make the name unique:
$ c u.i.p. c: too many matches for u.i.p.: /usr/include/pascal/. /usr/include/pixrect/. /usr/include/protocols/. $ c u.i.pa. /usr/include/pascal/. $
Go to http://examples.oreilly.com/upt3 for more information on: c.csh, c.sh
The Bourne shell function is straightforward; it's shown below.[2] The C shell alias needs some trickery, and there are two versions of it: one if you already have an alias for cd and another if you don't. (The C shell if used in the c alias won't work with a cd alias. Although the csh manual page admits it won't work, I'd call that another C shell bug.)
set Section 35.25, $# Section 35.20
function c( ) { dir="$1" # Delete dots. Surround every letter with "/" and "*". # Add a final "/." to be sure this only matches a directory: dirpat="`echo $dir | sed 's/\([^.]*\)\./\/\1*/g'`/." # In case $dirpat is empty, set dummy "x" then shift it away: set x $dirpat; shift # Do the cd if we got one match, else print error: if [ "$1" = "$dirpat" ]; then # pattern didn't match (shell didn't expand it) echo "c: no match for $dirpat" 1>&2 elif [ $# = 1 ]; then echo "$1" cd "$1" else echo "c: too many matches for $dir:" 1>&2 ls -d "$@" fi unset dir dirpat }
The function starts by building a wildcard pattern to match the directory initials. For example, if you type c u.i.h., sed makes the pattern /u*/i*/h*/. in $dirpat. Next, the shell expands the wildcards onto its command-line parameters; the trailing dot makes sure the pattern matches only a directory. If the Bourne shell can't match a wildcard pattern, it leaves the pattern unchanged; the first if test spots that. If there was just one match, there will be one command-line parameter left, and the shell cds there. Otherwise, there were too many matches; the function shows them so you can make your pattern longer and more specific.
JP
Most shells have a shortcut for the pathname to your home directory: a tilde (~), often called "twiddle" by Unix-heads. You can use ~ in a pathname to the home directory from wherever you are. For example, from any directory, you can list your home directory or edit your .cshrc file in it by typing:
% ls ~ ... % vi ~/.cshrc
If you're using a very old Bourne shell, one that does not support the tilde convention, try the $HOME or $LOGDIR variables instead.
You could change your current directory to your home directory by typing cd ~ or cd $HOME, but all shells have a shorter shortcut: typing plain cd with no argument also takes you home.
If your shell understands the tilde, it should also have an abbreviation for other users' home directories: a tilde with the username on the end. For example, the home directory for mandi, which might really be /remote/users/m/a/mandi, could be abbreviated ~mandi. On your account, if Mandi told you to copy the file named menu.c from her src directory, you could type:
% cp ~mandi/src/menu.c .
Don't confuse this with filenames like report~. Some programs, like the GNU Emacs (Section 19.4) editor and vi, may create temporary filenames that end with a ~ (tilde).
Your version of the Bourne shell might also emulate the special "directory" /u if your system administrator hasn't already set up /u, that is. It's a directory full of symbolic links (Section 10.4) to users' home directories. For instance, /u/jane could be a link to /home/users/jane. Many systems are now using /home for home directories, in favor of the old /usr/users or /u conventions. Darwin uses /Users/username (note the uppercase U!), but the tilde works the same there, too.
If all else fails, here's a trick that's probably too ugly to type a lot, but it's useful in Bourne shell scripts, where you don't want to "hardcode" users' home directory pathnames. This command calls the C shell to put mandi's home directory pathname into $dir:
username=mandi dir=`csh -fc "echo ~$username"`
In fact, using echo (Section 27.5) yourself is a good way to see how ~ works. Try echo ~, echo ~/xyz, echo ~xyz, and so on. Note that different shells do different things when ~user doesn't match any user: some print an error, others return the unmatched string.
JP
The following alias stores the current directory name in a variable:
alias mark 'set \!:1=$cwd'
so as to use a feature of the C shell:
% mark here ... % cd here
One need not even type $here. If a directory does not exist, csh tries searching its cdpath (Section 31.5), then tries to evaluate the name as a variable.
(I generally use pushd and popd (Section 31.7) to store directory names; mark is more useful with commands that need to look in two different paths, and in that case $here is necessary anyway. Ah well.)
[In bash and zsh, you can do this by setting cdable_vars . In your shell setup file (Section 3.3), use cdable_vars=1 for bash or setopt cdable_vars or setopt -T for zsh. JP]
CT
If you work in a lot of different directories, here's a way to make the shell do automatic setup when you enter a directory or do cleanup as you leave. We've broken it onto two lines for printing; enter it as one line. On bash, make a shell function instead.
Go to http://examples.oreilly.com/upt3 for more information on: csh_init, sh_init
alias cd 'if (-o .exit.csh) source .exit.csh; chdir \!*; if (-o .enter.csh) source .enter.csh' function cd( ) { test -r .exit.sh && . .exit.sh builtin cd "$1" # builtin is a bash command test -r .enter.sh && . .enter.sh }
Then create .enter.csh and/or .exit.csh files in the directories where you want a custom setup. Bourne-type shell users, make .enter.sh and/or .exit.sh files instead. When you cd to a new directory, an .exit file is sourced (Section 35.29) into your current shell before you leave the old directory. As you enter the new directory, a .enter file will be read if it exists. If you use pushd and popd (Section 31.7), you'll probably want to make the same kind of aliases or functions for them.
The C shell alias tests to be sure you own the files; this helps to stop other users from leaving surprises for you! But if lots of users will be sharing the directory, they may all want to share the same files in that case, replace the -o tests with -r (true if the file is readable).
Here's a sample .enter.csh file:
Go to http://examples.oreilly.com/upt3 for more information on: .enter.csh, .enter.sh
# Save previous umask; reset in .exit.csh: set prevumask=`umask` # Let everyone in the group edit my files here: umask 002 echo ".enter.csh: setting umask to 002" # Prompt (with blank line before) to keep me awake: set prompt="\ $cwd - PROJECT DEVELOPMENT DIRECTORY. EDIT CAREFULLY...\ % "
Here's the .exit.csh to go with it:
Go to http://examples.oreilly.com/upt3 for more information on: .exit.csh, .exit.sh
setprompt Section 4.7
# .enter.csh file may put old umask in shell variable: if ($?prevumask) then umask $prevumask echo ".exit.csh: setting umask to $prevumask" unset prevumask endif # Reminder to come back here if need to: echo "If you didn't check in the RCS files, type 'cd $cwd'." # Set generic prompt (setprompt alias comes from .cshrc file): setprompt
|
Can more than one of your directories use the same .enter or .exit file? If they can, you'll save disk space and redundant editing, as well as the risk of the files getting out of sync, by making hard links (Section 10.4) between the files. If the directories are on different filesystems, you'll have to use a symbolic link (Section 10.4) though that probably won't save much disk space. If you link the files, you should probably add a comment that reminds you of the links when you make your next edit. When your .enter files get really long, you might be able to put a command like this in them:
source Section 35.29
source ~/.global_enter
where the .global_enter file in your home directory has a procedure that you want to run from a lot of your .enter files. (Same goes for .exit, of course.)
One last idea: if a lot of users share the same directory, they can make files with names like .enter.joanne, .exit.allan, and so on. Your aliases can test for a file named .enter.$user.
JP
[1] Some people the zsh maintainers, for instance think of this with a different model. In this other model, the current directory isn't at the top of the stack: it's separate from the stack. The stack is just a list of "remembered" directories. So when you use pushd, that first puts the current directory onto the top of the stack, then cds to the directory given. And, when you use popd, the top of the stack is popped off to become the new current directory. Maybe you'd like to keep both of the models in mind as you read and experiment with directory stacks and then decide which seems clearer to you.
[2] You may need to remove the function keyword in older Bourne shells, but it is required for bash.
| CONTENTS |


{% extends "cradmin_legacy/viewhelpers/listbuilderview/filterlist-right.django.html" %} {% load static %} {% load i18n %} {% load cradmin_legacy_tags %} {% block title %} {{ request.cradmin_role.short_name }} {% endblock title %} {% block pageheader-inner %}
{% trans "Course administrators have access to do everything within their courses, except delete deliveries from students and published feedback." %}


Read the opening statements from the public impeachment hearings
by NBC NewsState Department official George Kent and Bill Taylor, who agreed to lead the U.S. Embassy in Kyiv after the abrupt ouster of Ambassador Marie Yovanovitch, are the first two witnesses to testify publicly in the House impeachment inquiry into President Donald Trump Wednesday.
House Intelligence Committee Chairman Adam Schiff, D-Calif., delivered opening remarks, followed by an opening statement by the ranking Republican on the committee, Rep. Devin Nunes of California, and then statements from the two witnesses.
Read the remarks as prepared for delivery below. This post will update as statements are delivered.
Adam Schiff's opening statement
Schiff FirstOpenHearing Statement (PDF)
Schiff FirstOpenHearing Statement (Text)


{% extends "nucescircle/base.html" %} {% load static %} {% load crispy_forms_tags %} {% block content %}
Some quick example text to build on the card title and make up the bulk of the card's content.
Card link Another linkSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another link{{ job.job_desc }}


GCALCTOOL(1) GCALCTOOL(1) NAME gcalctool - a desktop calculator SYNOPSIS gcalctool [ OPTION ] ... DESCRIPTION gcalctool is the official calculator of the GNOME desktop environment. OPTIONS -s, --solve Solve the equation provided following this option. -u, --unittest Run the unit tests. -v, --version Output version information and exit. -h, -?, --help Prints the command line options. SEE ALSO gcalccmd 17 June 2009 GCALCTOOL(1)


The data provided within this demo instance of Saiku comes from the Inter-University Consortium for Political and Social Research (ICPSR) NIBRS repository.
We have loaded the 2015 data for the Commonwealth of Massachusetts from the ICPSR repository into the tool for demo purposes. We chose Massachusetts because it has a large enough body of data to be interesting, without creating too large of a database. Note that the ICPSR NIBRS data for Massachusetts does not include all agencies in the Commonwealth (as is true for most states.)


%- include ('partials/head.html')%>
<%- include ('partials/navigation.html')%>
News
We are excited to share our new song Mental Abruption, it would be part of our album
Me cago en Bigotes
. Please stay tune for the coming updates and thanks for your support!!
<%- include ('partials/footer.html')%>


Experts
-
experts_etl
Moves data from UMN to Pure (Experts@Minnesota), and vice versa.
-
experts_dw
Schema for the Experts@Minnesota project database.
-
pureapi
Tools for working with Elsevier’s Pure API.


Loughlin, Giannulli fighting new charges in admissions case
BOSTON — “Full House” actress Lori Loughlin and her fashion designer husband are contesting expanded charges against them in the college admissions bribery scandal.
by Canadian PressBOSTON — “Full House” actress Lori Loughlin and her fashion designer husband are contesting expanded charges against them in the college admissions bribery scandal.
Lawyers for Loughlin and Mossimo Giannulli entered not guilty pleas on their behalf Tuesday to charges of conspiracy to commit federal program bribery.
Earlier this month, the couple waived their right to appear in federal court in Boston to answer to the latest counts.
Prosecutors added the bribery charge for 11 parents who previously pleaded not guilty in the case. Another 19 parents have pleaded guilty or agreed to do so.
Loughlin and Giannulli are accused of paying $500,000 to get their two daughters into the University of Southern California as fake athletic recruits. Their daughters no longer attend USC.
The couple previously pleaded not guilty to fraud and money laundering.
The Associated Press


Identity
Muneerah Fashion designer
DATE:MAY 2017
This identity designed for the Saudi fashion designer (Muneerah alohaimer) who created her own fashion imprint by merging heritage and modernization. The logo consists of two letters (the first letter of her first and family name). The idea was using the most appropriate geometric forms for the letters inspired from the Saudi heritage.


- Ceiling - Class in org.ngi.nodes.math.other
-
Ceil math function.
- Ceiling() - Constructor for class org.ngi.nodes.math.other.Ceiling
-
- Children - Class in org.ngi.nodes.language
-
Node for children() reference.
- Children() - Constructor for class org.ngi.nodes.language.Children
-
- ChildrenInput - Class in org.ngi.nodeinputs
-
Child Input, accepts any connected number, variable, expression, range or vector.
- ChildrenInput(Node, String, String) - Constructor for class org.ngi.nodeinputs.ChildrenInput
-
- Circle - Class in org.ngi.nodes.geometry
-
Creates a 2d circle.
- Circle() - Constructor for class org.ngi.nodes.geometry.Circle
-
- clear() - Method in class org.ngi.quadtree.QuadTree
-
Clear the index for file open.
- clearError() - Method in class org.ngi.NodeConnection
-
Clear the error flag (used for display).
- clearError() - Method in class org.ngi.NodeTile
-
Clear the Error flag.
- clearErrorState() - Method in class org.ngi.Node
-
Testing for error highlight
- clearHighlight() - Method in class org.ngi.MouseFocus
-
- clearHighlight() - Method in class org.ngi.Node
-
- clearHighlight() - Method in class org.ngi.NodeConnection
-
Clear the highlights
- clearHighlight() - Method in class org.ngi.NodeInput
-
- clearHighlight() - Method in class org.ngi.NodeOutput
-
- clearHighlight() - Method in class org.ngi.NodeTile
-
Clear the highlight flag.
- clearHighlight() - Method in class org.ngi.quadtree.QuadTreeNode
-
- clearHighlightIntern() - Method in class org.ngi.NodeTile
-
Alternate highlight flag to avoid circular references when flag is set
from connection object
- clearNodes() - Method in class org.ngi.quadtree.QuadTreeNodeCollection
-
Clear the list - do this before indexing after a move.
- clearResults() - Method in class org.ngi.MouseFocus
-
- closeCheck() - Method in class org.ngi.NodeGraph
-
Call this when closing to check for file changes before window close.
- closeProcedure() - Method in class org.ngi.FileHandler
-
Close procedure to check for dirty file and save as needed or signal an
abort on window close by returning false.
- Color - Class in org.ngi.nodes.modeling
-
- Color() - Constructor for class org.ngi.nodes.modeling.Color
-
- componentHidden(ComponentEvent) - Method in class org.ngi.PanelCamera
-
- componentMoved(ComponentEvent) - Method in class org.ngi.PanelCamera
-
- componentResized(ComponentEvent) - Method in class org.ngi.PanelCamera
-
- componentShown(ComponentEvent) - Method in class org.ngi.PanelCamera
-
- connect() - Method in class org.ngi.NodeConnection
-
- ConnVariableInput - Class in org.ngi.nodeinputs
-
Connected Variable Input.
- ConnVariableInput(Node, String, String) - Constructor for class org.ngi.nodeinputs.ConnVariableInput
-
- contains(Bounds) - Method in class org.ngi.Bounds
-
Test if this Bounds contains another Bounds.
- contains(Bounds, float) - Method in class org.ngi.Bounds
-
Test if this Bounds contains another bounds with a proximity setting.
- contains(float, float) - Method in class org.ngi.Bounds
-
Containment test for point.
- contains(Bounds) - Method in class org.ngi.quadtree.QuadTree
-
Wrapper over Bounds.contains to test Nodes when being translated to keep them "in bounds".
- Cos - Class in org.ngi.nodes.math.trigonometry
-
- Cos() - Constructor for class org.ngi.nodes.math.trigonometry.Cos
-
- createConnection(NodeOutput, NodeInput) - Method in class org.ngi.NodeGraph
-
Create a connection between a NodeOutput and NodeInput.
- createNode(String) - Method in class org.ngi.NodeGraph
-
Create a node from it's fully qualified class name (complete package).
- Cube - Class in org.ngi.nodes.geometry
-
Creates a Cube.
- Cube() - Constructor for class org.ngi.nodes.geometry.Cube
-
- Cylinder - Class in org.ngi.nodes.geometry
-
Creates a cylinder.
- Cylinder() - Constructor for class org.ngi.nodes.geometry.Cylinder
-


|
LightHub
|
Directories | |
| directory | modules |
Files | |
| file | abstractch.cpp |
| file | abstractch.h [code] |
| file | abstractin.cpp |
| file | abstractin.h [code] |
| file | abstractout.h [code] |
| file | bright.cpp |
| file | bright.h [code] |
| file | colorchannel.cpp |
| file | colorchannel.h [code] |
| file | dmx.cpp |
| file | dmx.h [code] |
| file | inputs.cpp |
| file | inputs.h [code] |
| file | item.cpp |
| file | item.h [code] |
| file | itemCmd.cpp |
| file | itemCmd.h [code] |
| file | main.cpp |
| file | main.h [code] |
| file | options.h [code] |
| file | owTerm.cpp |
| file | owTerm.h [code] |
| file | statusled.cpp |
| file | statusled.h [code] |
| file | streamlog.cpp |
| file | streamlog.h [code] |
| file | textconst.h [code] |
| file | utils.cpp |
| file | utils.h [code] |


I Have Knee Ride I Can Near Armbar Far Armbar Forearm Choke Nut Cracker Choke Spinning Choke Cross Collar Choke Move to different position Side Control North South Take the back


Aboleth
Large aberration, lawful evil
Armor Class 17 (natural armor)
Hit Points 135 (18d10 + 36)
Speed 10 ft., swim 40 ft.
| STR | DEX | CON | INT | WIS | CHA |
|---|---|---|---|---|---|
| 21 (+5) | 9 (−1) | 15 (+2) | 18 (+4) | 15 (+2) | 18 (+4) |
Saving Throws Con +6, Int +8, Wis +6
Skills History +12, Perception +10
Senses darkvision 120 ft., passive Perception 20
Languages Deep Speech, telepathy 120 ft.
Challenge 10 (5,900 XP)
Amphibious. The aboleth can breathe air and water.
Mucous Cloud. While underwater, the aboleth is surrounded by transformative mucus. A creature that touches the aboleth or that hits it with a melee attack while within 5 feet of it must make a DC 14 Constitution saving throw. On a failure, the creature is diseased for 1d4 hours. The diseased creature can breathe only underwater.
Probing Telepathy. If a creature communicates telepathically with the aboleth, the aboleth learns the creature’s greatest desires if the aboleth can see the creature.
Actions
Multiattack. The aboleth makes three tentacle attacks.
Tentacle. Melee Weapon Attack: +9 to hit, reach 10 ft., one target. Hit: 12 (2d6 + 5) bludgeoning damage. If the target is a creature, it must succeed on a DC 14 Constitution saving throw or become diseased. The disease has no effect for 1 minute and can be removed by any magic that cures disease. After 1 minute, the diseased creature’s skin becomes translucent and slimy, the creature can’t regain hit points unless it is underwater, and the disease can be removed only by heal or another disease‐curing spell of 6th level or higher. When the creature is outside a body of water, it takes 6 (1d12) acid damage every 10 minutes unless moisture is applied to the skin before 10 minutes have passed.
Tail. Melee Weapon Attack: +9 to hit, reach 10 ft. one target. Hit: 15 (3d6 + 5) bludgeoning damage.
Enslave (3/Day). The aboleth targets one creature it can see within 30 feet of it. The target must succeed on a DC 14 Wisdom saving throw or be magically charmed by the aboleth until the aboleth dies or until it is on a different plane of existence from the target. The charmed target is under the aboleth’s control and can’t take reactions, and the aboleth and the target can communicate telepathically with each other over any distance. Whenever the charmed target takes damage, the target can repeat the saving throw. On a success, the effect ends. No more than once every 24 hours, the target can also repeat the saving throw when it is at least 1 mile away from the aboleth.
Legendary Actions The aboleth can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature’s turn. The aboleth regains spent legendary actions at the start of its turn.
Detect. The aboleth makes a Wisdom (Perception) check.
Tail Swipe. The aboleth makes one tail attack.
Psychic Drain (Costs 2 Actions). One creature charmed by the aboleth takes 10 (3d6) psychic damage, and the aboleth regains hit points equal to the damage the creature takes.


Motorcycle Math
Competition page
Bring me to the insights
Speed patterns
Acceleration patterns
Banking behavior
Circuit metric
Average Speed (m/s)
Average acceleration (m/s²)
Banking angle (degrees)
Switch driver
Clear filters
by
Mario Alberich
Please, be patient as it may take a while to load the data
Average speed
by circuit segment
Click or brush to filter


Open Society to support repatriation of ‘looted’ African artifacts with $15m
by Taiwo AdebuluThe Open Society Foundation (OSF) has announced a $15 million initiative to support the repatriation of artifacts looted from Africa.
In a statement on Monday, the organisation said the initiative will support networks and organisations for the next four years to return the cultural objects to their countries.
According to the organisation, Africans have advocated for decades for the return of their heritage such as art and ceremonial objects, human remains, natural history specimens, archives and intangible cultural heritage like sound recordings and photographs.
It said the artifacts were looted during military raids by colonialists across Africa.
Patrick Gaspard, president of OSF, said the initiative is also a way of reconciling the historical wrongs meted out to the continent.
“The legacy of colonial violence has deep implications for the ways that racism and imbalances of power are perpetuated today. This isn’t just about returning pieces of art, but about restoring the very essence of these cultures,” Gaspard said.
“We are proud to support this movement towards reconciling historical wrongs, as part of our mission to advance true justice.”
Rashida Bumbray, OSF’s director of culture and art, added that returning the objects will allow the people have access to their heritage and maintain connection with the future.
“With so much of Africa’s precolonial cultural legacy housed in European museums, these artifacts are out of reach for millions on the African continent, who have a right to their own knowledge and cultural production,” Bumbray said.
“Restitution is not only about rightsizing the past, but about access to one’s own heritage and a necessity to maintain this connection for future generations.”


Trap 1 Traps segments coincident at a point.
To trap a single segment:
Position the cursor on the segment and press 1 .
This will place the single segment in the edit buffer.
To trap segments coincident at a point:
Position the cursor on the point and press 1 for each segment.
This will place all segments passing through the point in the edit buffer.
When Trap 0 - Remove has been selected, this operation removes the target segment from the buffer.


Brandon Maxwell
About Me
My name is Brandon Maxwell. I graduated from Missouri State University in 2009 with my Bachelor of Science in Marketing and I am currently a Commercial Claims Investigator. I have been investigating claims for the past 6 years but I have recently decided to make a change in my career and become a Full Stack Web Developer. I am currently enrolled in the Coding Boot Camp at Washington University in collaboration with Trilogy Education Services. I am very excited to have this opportunity and I am really enjoying learning all the course has to offer. I cannot wait to be able to use my newly acquired skills to be able to start my new career!


/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
  */
/**
* The vec2 object from glMatrix, with some extensions and some removed methods. See http://glmatrix.net.
* @class vec2
*/
var vec2 = module.exports = {};
var Utils = require('../utils/Utils');
/**
* Make a cross product and only return the z component
* @method crossLength
* @static
* @param {Array} a
* @param {Array} b
* @return {Number}
*/
vec2.crossLength = function(a,b){
return a[0] * b[1] - a[1] * b[0];
};
/**
* Cross product between a vector and the Z component of a vector
* @method crossVZ
* @static
* @param {Array} out
* @param {Array} vec
* @param {Number} zcomp
* @return {Number}
*/
vec2.crossVZ = function(out, vec, zcomp){
vec2.rotate(out,vec,-Math.PI/2);// Rotate according to the right hand rule
vec2.scale(out,out,zcomp); // Scale with z
return out;
};
/**
* Cross product between a vector and the Z component of a vector
* @method crossZV
* @static
* @param {Array} out
* @param {Number} zcomp
* @param {Array} vec
* @return {Number}
*/
vec2.crossZV = function(out, zcomp, vec){
vec2.rotate(out,vec,Math.PI/2); // Rotate according to the right hand rule
vec2.scale(out,out,zcomp); // Scale with z
return out;
};
/**
* Rotate a vector by an angle
* @method rotate
* @static
* @param {Array} out
* @param {Array} a
* @param {Number} angle
*/
vec2.rotate = function(out,a,angle){
if(angle !== 0){
var c = Math.cos(angle),
s = Math.sin(angle),
x = a[0],
y = a[1];
out[0] = c*x -s*y;
out[1] = s*x +c*y;
} else {
out[0] = a[0];
out[1] = a[1];
}
};
/**
* Rotate a vector 90 degrees clockwise
* @method rotate90cw
* @static
* @param {Array} out
* @param {Array} a
* @param {Number} angle
*/
vec2.rotate90cw = function(out, a) {
var x = a[0];
var y = a[1];
out[0] = y;
out[1] = -x;
};
/**
* Transform a point position to local frame.
* @method toLocalFrame
* @param {Array} out
* @param {Array} worldPoint
* @param {Array} framePosition
* @param {Number} frameAngle
*/
vec2.toLocalFrame = function(out, worldPoint, framePosition, frameAngle){
vec2.copy(out, worldPoint);
vec2.sub(out, out, framePosition);
vec2.rotate(out, out, -frameAngle);
};
/**
* Transform a point position to global frame.
* @method toGlobalFrame
* @param {Array} out
* @param {Array} localPoint
* @param {Array} framePosition
* @param {Number} frameAngle
*/
vec2.toGlobalFrame = function(out, localPoint, framePosition, frameAngle){
vec2.copy(out, localPoint);
vec2.rotate(out, out, frameAngle);
vec2.add(out, out, framePosition);
};
/**
* Compute centroid of a triangle spanned by vectors a,b,c. See http://easycalculation.com/analytical/learn-centroid.php
* @method centroid
* @static
* @param {Array} out
* @param {Array} a
* @param {Array} b
* @param {Array} c
* @return {Array} The out object
*/
vec2.centroid = function(out, a, b, c){
vec2.add(out, a, b);
vec2.add(out, out, c);
vec2.scale(out, out, 1/3);
return out;
};
/**
* Creates a new, empty vec2
* @static
* @method create
* @return {Array} a new 2D vector
*/
vec2.create = function() {
var out = new Utils.ARRAY_TYPE(2);
out[0] = 0;
out[1] = 0;
return out;
};
/**
* Creates a new vec2 initialized with values from an existing vector
* @static
* @method clone
* @param {Array} a vector to clone
* @return {Array} a new 2D vector
*/
vec2.clone = function(a) {
var out = new Utils.ARRAY_TYPE(2);
out[0] = a[0];
out[1] = a[1];
return out;
};
/**
* Creates a new vec2 initialized with the given values
* @static
* @method fromValues
* @param {Number} x X component
* @param {Number} y Y component
* @return {Array} a new 2D vector
*/
vec2.fromValues = function(x, y) {
var out = new Utils.ARRAY_TYPE(2);
out[0] = x;
out[1] = y;
return out;
};
/**
* Copy the values from one vec2 to another
* @static
* @method copy
* @param {Array} out the receiving vector
* @param {Array} a the source vector
* @return {Array} out
*/
vec2.copy = function(out, a) {
out[0] = a[0];
out[1] = a[1];
return out;
};
/**
* Set the components of a vec2 to the given values
* @static
* @method set
* @param {Array} out the receiving vector
* @param {Number} x X component
* @param {Number} y Y component
* @return {Array} out
*/
vec2.set = function(out, x, y) {
out[0] = x;
out[1] = y;
return out;
};
/**
* Adds two vec2's
* @static
* @method add
* @param {Array} out the receiving vector
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Array} out
*/
vec2.add = function(out, a, b) {
out[0] = a[0] + b[0];
out[1] = a[1] + b[1];
return out;
};
/**
* Subtracts two vec2's
* @static
* @method subtract
* @param {Array} out the receiving vector
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Array} out
*/
vec2.subtract = function(out, a, b) {
out[0] = a[0] - b[0];
out[1] = a[1] - b[1];
return out;
};
/**
* Alias for vec2.subtract
* @static
* @method sub
*/
vec2.sub = vec2.subtract;
/**
* Multiplies two vec2's
* @static
* @method multiply
* @param {Array} out the receiving vector
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Array} out
*/
vec2.multiply = function(out, a, b) {
out[0] = a[0] * b[0];
out[1] = a[1] * b[1];
return out;
};
/**
* Alias for vec2.multiply
* @static
* @method mul
*/
vec2.mul = vec2.multiply;
/**
* Divides two vec2's
* @static
* @method divide
* @param {Array} out the receiving vector
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Array} out
*/
vec2.divide = function(out, a, b) {
out[0] = a[0] / b[0];
out[1] = a[1] / b[1];
return out;
};
/**
* Alias for vec2.divide
* @static
* @method div
*/
vec2.div = vec2.divide;
/**
* Scales a vec2 by a scalar number
* @static
* @method scale
* @param {Array} out the receiving vector
* @param {Array} a the vector to scale
* @param {Number} b amount to scale the vector by
* @return {Array} out
*/
vec2.scale = function(out, a, b) {
out[0] = a[0] * b;
out[1] = a[1] * b;
return out;
};
/**
* Calculates the euclidian distance between two vec2's
* @static
* @method distance
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Number} distance between a and b
*/
vec2.distance = function(a, b) {
var x = b[0] - a[0],
y = b[1] - a[1];
return Math.sqrt(x*x + y*y);
};
/**
* Alias for vec2.distance
* @static
* @method dist
*/
vec2.dist = vec2.distance;
/**
* Calculates the squared euclidian distance between two vec2's
* @static
* @method squaredDistance
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Number} squared distance between a and b
*/
vec2.squaredDistance = function(a, b) {
var x = b[0] - a[0],
y = b[1] - a[1];
return x*x + y*y;
};
/**
* Alias for vec2.squaredDistance
* @static
* @method sqrDist
*/
vec2.sqrDist = vec2.squaredDistance;
/**
* Calculates the length of a vec2
* @static
* @method length
* @param {Array} a vector to calculate length of
* @return {Number} length of a
*/
vec2.length = function (a) {
var x = a[0],
y = a[1];
return Math.sqrt(x*x + y*y);
};
/**
* Alias for vec2.length
* @method len
* @static
*/
vec2.len = vec2.length;
/**
* Calculates the squared length of a vec2
* @static
* @method squaredLength
* @param {Array} a vector to calculate squared length of
* @return {Number} squared length of a
*/
vec2.squaredLength = function (a) {
var x = a[0],
y = a[1];
return x*x + y*y;
};
/**
* Alias for vec2.squaredLength
* @static
* @method sqrLen
*/
vec2.sqrLen = vec2.squaredLength;
/**
* Negates the components of a vec2
* @static
* @method negate
* @param {Array} out the receiving vector
* @param {Array} a vector to negate
* @return {Array} out
*/
vec2.negate = function(out, a) {
out[0] = -a[0];
out[1] = -a[1];
return out;
};
/**
* Normalize a vec2
* @static
* @method normalize
* @param {Array} out the receiving vector
* @param {Array} a vector to normalize
* @return {Array} out
*/
vec2.normalize = function(out, a) {
var x = a[0],
y = a[1];
var len = x*x + y*y;
if (len > 0) {
//TODO: evaluate use of glm_invsqrt here?
len = 1 / Math.sqrt(len);
out[0] = a[0] * len;
out[1] = a[1] * len;
}
return out;
};
/**
* Calculates the dot product of two vec2's
* @static
* @method dot
* @param {Array} a the first operand
* @param {Array} b the second operand
* @return {Number} dot product of a and b
*/
vec2.dot = function (a, b) {
return a[0] * b[0] + a[1] * b[1];
};
/**
* Returns a string representation of a vector
* @static
* @method str
* @param {Array} vec vector to represent as a string
* @return {String} string representation of the vector
*/
vec2.str = function (a) {
return 'vec2(' + a[0] + ', ' + a[1] + ')';
};


--- # This file is licensed under the MIT License (MIT) available on # http://opensource.org/licenses/MIT. layout: base id: buy end_of_page: | ---


Implemented and deployed a responsive Bootstrap web interface to allow multiple, concurrent users to securely share files with other authenticated users using AWS S3 on Elastic Beanstalk. Incorporated security measures to prevent Buffer Overflows, XSS, Session Hijack attacks, passwords and authentication attacks, and such well-known vulnerabilities in the OWASP
Check it outDesigned, developed and deployed a full stack Node.js web app for reviewing amusement parks based on the concept of Yelp.com. Offers a responsive web design with CRUD functionality using MongoDB, Express, RESTful Routing and Bootstrap
Check it outPerformed Unit Testing and Program-Level testing using Control Flow Graphs on a Java class. Utilized JUnit to implement and execute the generated test cases and documented the results of the tests in a PDF report
Check it outA full stack RESTful Blog Web App with CRUD functionality, styled with Semantic UI and connected with MongoDB at the backend
Check it outA user responsive color guessing web app based on RGB values made using the Document Object Model (DOM) Selectors
Check it outCreated and maintained a mySQL Relational Database for students using requirements, ER/EER, and schema models. Performed specialized queries on the database using views, joins and integrated results on a web interface using PHP and HTML
Check it outClone of the famous patatap.com web app made using libraries of PaperJS and HowlerJS
Check it outBuilt and handled a Linux based local client chatting messsenger using ASIO network protocols and Ncurses GUI in C. Implemented the functionality to chat with 50 users with spellcheck, chatrooms and private messaging
Check it outDesigned and delivered a customized POS system for an ice cream shop using Object Oriented Programming C++ and gtkmm library
Check it out


|
|
def | __init__ |
| |
|
def | response |
| |
|
def | set_response |
| |
|
def | clear_response |
| |
|
def | has_response |
| |
|
def | exception |
| |
|
def | set_exception |
| |
|
def | clear_exception |
| |
|
def | has_exception |
| |
|
def | application_error |
| |
|
def | mutable_application_error |
| |
|
def | clear_application_error |
| |
|
def | has_application_error |
| |
|
def | java_exception |
| |
|
def | set_java_exception |
| |
|
def | clear_java_exception |
| |
|
def | has_java_exception |
| |
|
def | rpc_error |
| |
|
def | mutable_rpc_error |
| |
|
def | clear_rpc_error |
| |
|
def | has_rpc_error |
| |
|
def | MergeFrom |
| |
|
def | Equals |
| |
|
def | IsInitialized |
| |
|
def | ByteSize |
| |
|
def | ByteSizePartial |
| |
|
def | Clear |
| |
|
def | OutputUnchecked |
| |
|
def | OutputPartial |
| |
|
def | TryMerge |
| |
|
def | __str__ |
| |
|
|
| lazy_init_lock_ |
| |
|
| has_response_ |
| |
|
| response_ |
| |
|
| has_exception_ |
| |
|
| exception_ |
| |
|
| has_application_error_ |
| |
|
| has_java_exception_ |
| |
|
| java_exception_ |
| |
|
| has_rpc_error_ |
| |
|
|
int | has_response_ = 0 |
| |
|
string | response_ = "" |
| |
|
int | has_exception_ = 0 |
| |
|
string | exception_ = "" |
| |
|
int | has_application_error_ = 0 |
| |
|
| application_error_ = None |
| |
|
int | has_java_exception_ = 0 |
| |
|
string | java_exception_ = "" |
| |
|
int | has_rpc_error_ = 0 |
| |
|
| rpc_error_ = None |
| |
|
int | kresponse = 1 |
| |
|
int | kexception = 2 |
| |
|
int | kapplication_error = 3 |
| |
|
int | kjava_exception = 4 |
| |
|
int | krpc_error = 5 |
| |
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/ext/remote_api/remote_api_pb.py


Your map is ready!
Download SVG
Download GeoJSON
Liked our work? Make sure to credit us using the citation below:
Gastner MT, Seguy V, More P. Fast flow-based algorithm for creating
density-equalizing map projections. Proc Natl Acad Sci USA 115(10):E2156–E2164 (2018).


Hi there, I'm Tsanfer 👋👾
Hi, I'm Tsanfer, a carbon-based life now living on the arm of Orion
🌐 Programming Languages
💻 Know/Using
🌱 Learning
🛠 Tools
💻 Know/Using
🌱 Learning
📫 Reach me
⭐ From Tsanfer
Hi, I'm Tsanfer, a carbon-based life now living on the arm of Orion
💻 Know/Using
🌱 Learning
💻 Know/Using
🌱 Learning
⭐ From Tsanfer


$output.webapp("assets/tpl", "logout.html")## Logout this page should logout the user.
this page should logout the user.


Projects
New Project
Inspirational Quotes
Quotes to Brighten your Day
To Do :
Priority
High
Medium
Low
Save
×
Some Text in Modal


Background
Ultimate Fighting Championship or UFC is based off a 10-9 scoring system similar to boxing and the fight goes to the judges unless there is a KO,TKO, DQ, or submission. Typically fights last 3 rounds of 5 minutes, with championship belts and top contender fights lasting 5 rounds of 5 minutes. For those interested, here is the current official MMA unified rules. Note that these have been changed and amended a few times since they were created in the early 2000s.
How to Win
As mentioned above there are a few different ways to end a UFC fight. Here we see both a pie chart and a time series graph of how fights end. I have removed all DQ and overturned results from the dataset and I have combined the split decision and majority decisions. I aggregate the data into a pie graph and we can see that about a third of the fights are unanimous decisions and another third are KO/TKOs. The other third are a combination of submissions and split or majority decisions. There are rarely any draws.
However these percentages are not consistent. Like I mentioned previously there have been many iterations of rules and technique adaptations. The UFC looks vastly different now than in years past. To examine the changes, I create a rolling 5 year time series graph which again contains the various methods of how a fight can finish. The five year rolling method smooths the data and we see that the proportion of submissions and KO/TKOs have both decreased over the years with an increase in both the decision methods. This could hint that fighters are getting better at defense, leading to longer fighting times ultimately more decisions.
Data
I have built a database of UFC stats (starting from UFC 1 in November 12, 1993 and also incorporating promotions UFC bought like StrikeForce and WEC); in total, this results to a database of over 5000 fights and 3000 fighters. I am able to get fighters physical attributes like age and reach as well as certain fighting stats like knock down percentage. In addition, I have scraped a few betting websites for their lines, but unfortunately some of the earlier fights did not have betting lines. The betting data starts in 2012. I am working to release the scraping code and data on my github so others can create reproducible results and test new theories. When looking through this data it is important to note that the UFC is rapidly evolving and conclusions found today may not hold in a few years. There has been a lot of evolution within the UFC as in the beginning there was no time limits and only finishes, thus draws did not exist.
Below is an example of a the fighting stats that I have collected. Here we see a recent fight between Molly McCann and Taila Santos. Similar to home and away in other sports, there is a red corner (Molly) and a blue corner (Talia) in which the red corner is usually the higher ranked fighter. Taking a glance at the specific statistics, we can see that the UFC records a multitude of stats that are broken down into two categories: striking stats and totals. The totals focus on miscellaneous stats like KD (knock downs), TD (take downs) as well as total strikes. The striking stats are broken down into the location on the body as well as the distance the strike was landed. In addition, strikes are classified as significant or not significant. We see Taila out-striking Molly and outclassing her in the take-down category, so it understanding that Taila won a unanimous decision,
Features
Going one step further when analyzing these stats, we can use feature engineering to break down these stats on a ratio basis think per minute stats. When Jorge Masvidal knocked out Ben Askren in 5 seconds with a flying knee, he only had 3 significant strikes, the first flying knee and two followup punches. Here is a clip of the fight. Looking only at the total number of significant strikes would penalize this career altering performance. This is an extreme example, but serves as an important reminder as to why changing stats to a common timeframe can be important.


On December 16th, 2019, the new Environmental Assessment Act (2018) came in to force. Many projects with an environmental assessment already underway will continue under the old Act (2002) process, while any new projects after December 16th, 2019 will undergo an environmental assessment under the new Act (2018) process.
Please select below which environmental assessment process you would like information about:


HP creates new possibilities for technology to have a meaningful impact on people, businesses, governments and society. The world's largest technology company, HP brings together a portfolio that spans printing, personal computing, software, services and IT infrastructure to solve customer problems. More informationabout HP (NYSE: HPQ) is available at www.hp.com.
Intel (NASDAQ: INTC) is a world leader in computing innovation. The company designs and builds the essential technologies that serve as the foundation for the world's computing devices. Additional information about Intel is available at www.intel.com/pressroom and blogs.intel.com.
Ultrabook, Celeron, Celeron Inside, Core Inside, Intel, Intel Logo, Intel Atom, Intel Atom Inside, Intel Core, Intel Inside, Intel Inside Logo, Intel vPro, Itanium, Itanium Inside, Pentium, Pentium Inside, vPro Inside, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and/or other countries.


com.jme3.input
package contains the scene graph implementation
in jMonkeyEngine.See: Description
| Interface | Description |
|---|---|
| CollisionData |
CollisionData is an interface that can be used to
do triangle-accurate collision with bounding volumes and rays. |
| SceneGraphVisitor |
SceneGraphVisitorAdapter is used to traverse the scene
graph tree. |
| Class | Description |
|---|---|
| AssetLinkNode |
The AssetLinkNode does not store its children when exported to file.
|
| BatchNode |
BatchNode holds geometries that are a batched version of all the geometries that are in its sub scenegraph.
|
| CameraNode |
CameraNode simply uses CameraControl to implement
linking of camera and node data. |
| Geometry |
Geometry defines a leaf node of the scene graph. |
| GeometryGroupNode |
An abstract class for implementations that perform grouping of geometries
via instancing or batching.
|
| LightNode | |
| Mesh |
Mesh is used to store rendering data. |
| Node |
Node defines an internal node of a scene graph. |
| SceneGraphVisitorAdapter |
SceneGraphVisitorAdapter is used to traverse the scene
graph tree. |
| SimpleBatchNode |
SimpleBatchNode comes with some restrictions, but can yield better performances.
|
| Spatial |
Spatial defines the base class for scene graph nodes. |
| UserData |
UserData is used to contain user data objects
set on spatials (primarily primitives) that do not implement
the Savable interface. |
| VertexBuffer |
A
VertexBuffer contains a particular type of geometry
data used by Mesh es. |
| Enum | Description |
|---|---|
| Mesh.Mode |
The mode of the Mesh specifies both the type of primitive represented
by the mesh and how the data should be interpreted.
|
| Spatial.BatchHint |
Specifies if this spatial should be batched
|
| Spatial.CullHint |
Specifies how frustum culling should be handled by
this spatial.
|
| VertexBuffer.Format |
Specifies format of the data stored in the buffer.
|
| VertexBuffer.Type |
Type of buffer.
|
| VertexBuffer.Usage |
The usage of the VertexBuffer, specifies how often the buffer
is used.
|
com.jme3.input
package contains the scene graph implementation
in jMonkeyEngine.
The scene graph is the most important package in jME, as it is the API
used to manage scene elements so that they can be rendered.
The Spatial
class provides a common base class
for all scene graph elements. The Node
class provides
the "branches" in the graph, used to organize elements in a tree
hierarchy. The Geometry
is the leaf class that
will contain a Mesh
object (geometry data
such as vertex positions, normals, etc) and a Material
object containing information on how the geometry should be shaded.