% add_js = function(f) {
code = readLines(base64::encode(system.file("www", "_js", f, package = "pkgndep"), linebreaks= FALSE))
paste0('')
}
add_css = function(f) {
suppressWarnings(code <- paste(readLines(system.file("www", "_css", f, package = "pkgndep")), collapse = "\n"))
paste0("")
}
%>
Dependency analysis on package <%=pkg$package%>
General information
<% if(grepl("bioconductor", pkg$repository)) { %>
Bioconductor link link
<% } else { %>
CRAN link link
<% } %>
Package version <%= pkg$version%>
Number of strong dependencies <%= pkg$n_by_strong %>
Number of all dependencies <%= pkg$n_by_all %>
Number of parent packages <%= sum(pkg$which_required) %>
Max heaviness from parent packages <%= if(any(pkg$which_required)) max(pkg$heaviness[pkg$which_required]) else 0 %>
Total heaviness from parent packages <%= if(any(pkg$which_required)) sum(pkg$heaviness[pkg$which_required]) else 0 %>
Number of parent packages (including Suggests
and Enhances
) <%= length(pkg$heaviness) %>
<% m = co_heaviness(pkg)
diag(m) = -Inf
if(nrow(m) >= 2) {
if(max(m) > 0) {
ind = which(m == max(m), arr.ind = TRUE)
rn = rownames(m)
%>
Max co-heaviness from parent packages ("<%=rn[ind[1, 1]]%>" and "<%=rn[ind[1, 2]]%>" ) <%= max(m) %>
<% }
} %>
Dependency heatmap
In the following dependency heatmap, rows are the parent packages of <%=pkg$package%> and columns are the dependency packages that each parent package brings in.
On the right side of the heatmap, there are three barplot annotations: 1. number of imported functions/S4 methods/S4 classes from parent packages; 2. number of
dependency packages from each parent package; 3. heaviness of each parent package on <%=pkg$package%> .
Adjust heatmap size:
increase
decrease
reset
<% tmp_file = tempfile(fileext = ".svg")
plot(pkg, file = tmp_file)
%>
<%= paste0(readLines(tmp_file), collapse = "\n")%>
<% file.remove(tmp_file) %>
Dependency table
<% if(n_total > 0) { %>
<%
if(grepl("(bioc|books|annotation|experiment|workflow)", pkg$repository)) {
namespace_link = paste0("https://code.bioconductor.org/browse/", pkg$package, "/blob/master/NAMESPACE")
} else if(pkg$package %in% BASE_PKGS) {
namespace_link = paste0("https://github.com/wch/r-source/blob/trunk/src/library/", pkg$package, "/NAMESPACE")
} else {
namespace_link = paste0("https://github.com/cran/", pkg$package, "/blob/master/NAMESPACE")
}
%>
"Import" information is from the NAMESPACE file of <%=pkg$package%> .
imports: number of imported functions/objects; importMethods : number of imported S4 methods; importClasses : number of imported S4 classes.
Required packages: number of strong dependency packages for each of the parent package (or in other words, number of dependency packages the parent package brings in).
Heaviness from parent on <%=pkg$package%> : number of required packages that can be reduced if moving parent package to Suggests
of <%=pkg$package%> .
<%
if(pkgndep_opt$add_link) {
tb[, 1] = qq("
@{tb[, 1]} ", collapse = FALSE)
} else {
tb[, 1] = qq("
@{tb[, 1]} ", collapse = FALSE)
}
html_tb = as.character(knitr::kable(tb, format = "html", row.names = FALSE, escape = FALSE, col.names = c("Parent package", "Field", "imports", "importMethods", "importClasses", "Required packages", qq("Heaviness from parent on
@{pkg$package} ")), table.attr = "class='table table-striped' id='parent-dependency'", align = c("l", rep("r", ncol(tb) - 1))))
html_tb = gsub("(
]*?> Suggests \\s+)
]*?> 0 \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
No object is imported into the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> Enhances \\s+)
]*?> 0 \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
No object is imported into the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> Depends \\s+)
]*?> 0 \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
The whole set of functions/methods/classes from parent package is imported to the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> Depends \\s+)
]*?> -(\\d+) \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
The whole set of functions/methods/classes from parent package excluding \\2 objects is imported to the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> Depends \\s+)
]*?> -Inf \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
Parent package is listed in Depends
of @{pkg$package} but no object from parent package is imported. \n"), html_tb)
html_tb = gsub("(
]*?> Imports \\s+)
]*?> 0 \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
The whole set of functions/methods/classes from parent package is imported to the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> Imports \\s+)
]*?> -(\\d+) \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
The whole set of functions/methods/classes from parent package excluding \\2 objects is imported to the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> Imports \\s+)
]*?> -Inf \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
Parent package is listed in Imports
of @{pkg$package} but no object from parent package is imported. \n"), html_tb)
html_tb = gsub("(
]*?> LinkingTo \\s+)
]*?> 0 \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
No object is imported into the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> LinkingTo \\s+)
]*?> -(\\d+) \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
The whole set of functions/methods/classes from parent package excluding \\2 objects is imported to the namespace of @{pkg$package} . \n"), html_tb)
html_tb = gsub("(
]*?> LinkingTo \\s+)
]*?> -Inf \\s+
]*?> 0 \\s+
]*?> 0 \\s+", qq("\\1
Parent package is listed in LinkingTo
of @{pkg$package} but no object from parent package is imported. \n"), html_tb)
%>
<%= html_tb %>
<% m = co_heaviness(pkg)
if(nrow(m) > 1) {
if(attr(m, "max") > 10) {
m2 = co_heaviness(pkg, jaccard = TRUE)
pair1 = NULL
pair2 = NULL
hv1 = NULL
hv2 = NULL
nr = nrow(m)
for(i in 1:(nr-1)) {
for(j in (i+1):nr) {
if(m[i, j] > 10) {
pair1 = c(pair1, rownames(m)[i])
pair2 = c(pair2, rownames(m)[j])
hv1 = c(hv1, m[i, j])
hv2 = c(hv2, m2[i, j])
}
}
}
co_tb = data.frame(pair1 = pair1, pair2 = pair2, heaviness = hv1, jaccard = round(hv2, 3))
co_tb = co_tb[order(co_tb$heaviness, decreasing = TRUE), , drop = FALSE]
if(pkgndep_opt$add_link) {
co_tb[, 1] = qq("
@{co_tb[, 1]} ", collapse = FALSE)
co_tb[, 2] = qq("
@{co_tb[, 2]} ", collapse = FALSE)
} else {
co_tb[, 1] = qq("
@{co_tb[, 1]} ", collapse = FALSE)
co_tb[, 2] = qq("
@{co_tb[, 2]} ", collapse = FALSE)
}
%>
The following table lists pairs of parent packages with co-heaviness larger than 10. The co-heaviness measures the number of additional
dependencies that two parent packages simultaneously import and are only imported by the two parents.
Note the co-heaviness from parents can be always easily observed in the dependency heatmap.
<%= as.character(knitr::kable(co_tb, format = "html", row.names = FALSE, escape = FALSE, col.names = c("Parent 1", "Parent 2", qq("Co-heaviness on @{pkg$package}"), "Co-heaviness as Jaccard coeffcient"), table.attr = "class='table table-striped' style='width:900px'" )) %>
<% }
}
%>
<% } else { %>
No dependency found.
<% } %>
Analysis was done with pkgndep .


14mBrent SpinerStar Trek on the big screen tonight. Very excited! Locutus of Borg happens to be a personal friend of mine.


Get CLASSy you ID
More than meets the eye
21 June 2015
Class and ID appear to the unitiated as the same thing, only different. One is tied to a hashtag characcter, the other a dot but besides that, they both are used to mark and define style. They are both called out by name when tags use either of them. They look nearly the same in CSS code.
And that's true on the surface. But dig a little deeper and we learn the hastag comes with a price. Those IDs are individually tracked by the browser so it can jump to the elements with IDs. On top of the overhead that comes with that, we get limitations. On any given page only one element can use a specific ID. And any element can only use one ID. No stringing IDs together for compound effect. One element can have both an ID and class(es) though. So do use an ID when you want to mark that one specific page element... that's what it is for.
If not, time to get CLASSy.


CUSTOMER MANAGER
The Customer Manager page is used to view, create, edit and archive customers on
the System.
Customer Manager page
==============================================================================
Users can browse through existing customers by clicking on the FIRST button.
The first entry will be selected and all information saved, regarding the
customer, will be shown below.
To cycle through the list of customers, users can use the NEXT, PREVIOUS, or
LAST buttons. The NEXT and PREVIOUS buttons display the next and previous entry
in the list, respectively, while the LAST button goes to the last entry in the
list.
==============================================================================
Creating a New Customer
In order to create a new customer, click on the CREATE NEW CUSTOMER button under
Options.
Search and navigation options are now greyed out and the details of the customer
can be added.
As shown above, certain text fields are now highlighted pink. This is to
indicate that there is no text or text of an incorrect format in the text field.
The accepted formats are as follows:
Customer ID:
Not editable
First Name:
No empty strings
Surname:
No empty strings
Date of Birth:
Select from table
Contact Number:
Only integer digits are accepted
Email:
Must contain '@' symbol with characters before and after
Password:
Selected automatically when DoB is chosen
Street Address:
No empty strings
Suburb:
No empty strings
City:
No empty strings
Province:
No empty strings
Postal Code:
Only integer digits are accepted
Active Status:
Selected from drop down list
To save the customer, click on the UPDATE/SAVE CUSTOMER button.
==============================================================================
Updating a Customer
To update a customer, simply navigate to the desired customer, update the
fields, then click on the UPDATE/SAVE CUSTOMER button.
==============================================================================
Archiving a Customer
To archive a customer (in the case of a customer not being sent any quotations
anymore,) navigate to the desired customer and click on the ARCHIVE CUSTOMER
button.
To reverse this action, edit the customer and set the active status to T.
==============================================================================
THE PRODUCT MANAGER, EMPLOYEE MANAGER (visible only to managers,) AND SUPPLIER
MANAGER PROCESSING ARE DONE IN A SIMILAR MANNER.


PseudoWire Resource Pool Information
[Menu]
|
[PseudoWire VC List]
|
[Refresh]
|
Management domain
VC ID
Remains
Used
Pool Name
Purpose
Operational Status
Note
Last Edit Time
Operation
Edit Pool
PseudoWire Detail
Create
PseudoWire ID
Facility Status
Operational Status
InterWorking
AC(A)
AC(Z)
Last Edit Time
Note
Operation
Node
Port
VPI
VCI
Node
Port
VPI
VCI
Delete
History
Click on the VC ID to go to edit.
Create


new Pool()
Easy (high-performance) object pooling
A pool of objects for use in situations where you want to minimize object life cycling (and subsequently garbage collection). It also serves as a very high speed, minimal overhead collection for small numbers of objects.
This class maintains mutual an array of objects which are free. If you wish to maintain a list of both free and used then see the maestro.df.CS2I.DualPool.
Pools are managed by class type, and will auto-expand as required. You can create a custom initial pool size by deriving from the Pool class and statically overriding INITIAL_POOL_SIZE.
Keep in mind that objects that are pooled are not constructed; they are "reset" when handed out. You need to "acquire" one and then reset its state, usually via a static create factory method.
Example:
Point = maestro.df.CS2I.Pooled('Point',
{
// Static constructor
create:function (x, y)
{
var n = this._super();
n.x = x;
n.y = y;
return n;
}
},
{
x:0, y:0, // instance
init: function(x, y)
{
this.x = x;
this.y = y;
}
}
To then access the object from the pool, use create, instead of new. Then release it.
var p = Point.create(100, 100);
// ... do something
p.release();
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3064
Methods
-
<static> acquire(classType) → {maestro.df.CS2I.Pooled}
-
Acquire an object from a pool based on the class[name]. Typically this method is automatically called from Pooled.create method and should not be used directly.
Parameters:
Name Type Description classType
String Class of object to create
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3126
Returns:
A shiny object you can then configure
-
<static> acquire() → {maestro.df.CS2I.Pooled}
-
Returns the next free object by moving it from the free pool to the used one. If no free objects are available it will expand the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3278
Returns:
A pooled object
-
<static> dump(msg)
-
Dumps contents of the pool to through info logging (usually console). Mostly used for debugging the pooling system, mostly.
Parameters:
Name Type Description msg
String A string to write before the dump
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3343
-
<static> expand(howMany)
-
Expand the pool of objects by constructing a bunch of new ones. The pool will automatically expand itself by 10% each time it runs out of space, so generally you shouldn't need to use this.
Parameters:
Name Type Description howMany
Number Number of new objects you want to add
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3248
-
<static> getFreeCount() → {Number}
-
Gets the free count of objects left in the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3267
Returns:
Number free
- Type
- Number
-
<static> getFreeList() → {maestro.df.CS2I.LinkedList}
-
Returns the LinkedList of currently free objects in the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3368
Returns:
List of free objects
-
<static> getPool() → {maestro.df.CS2I.Pool}
-
Returns the pool associated with the given classType, or null if no pool currently exists.
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3164
Returns:
Object pool associated with the class type
- Type
- maestro.df.CS2I.Pool
-
<static> getStats() → {String}
-
Gets stats about the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3323
Returns:
Stats
- Type
- String
-
<static> getStats() → {String}
-
Gets stats on the usage of all pools.
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3175
Returns:
Stats string
- Type
- String
-
<static> init(classType, initial)
-
Constructs a pool. Will automatically be called by the static pool method. Generally not called directly.
Parameters:
Name Type Description classType
String Class name of the type of objects in the pool
initial
Number Starting number of objects in the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3206
-
<static> release(pooledObj)
-
Releases an object back into it's corresponding object pool
Parameters:
Name Type Description pooledObj
maestro.df.CS2I.Pooled Object to return to the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3148
-
<static> release(obj)
-
Releases an object by moving it back onto the free pool
Parameters:
Name Type Description obj
maestro.df.CS2I.Pooled The obj to release back into the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3311
Returns:
none
-
<static> size() → {Number}
-
Returns the number of objects in the pool
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3357
Returns:
Total objects
- Type
- Number
-
<static> startTracing()
-
Enables tracing on this pool.
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3223
-
<static> stopTracing()
-
Disables tracing on this pool.
- Source:
- C:/devtools/GitHub/Nano-Framework/src/nano/js/cs2i.js, line 3238


This specification defines a new form encoding algorithm that enables the transmission of
form data as JSON. Instead of capturing form data as essentially an array of key-value pairs
which is the bread and butter of existing form encodings, it relies on a simple
name
attribute syntax that makes it possible to capture rich data structures
as JSON directly.
This specification is an extension specification to HTML.
JSON is commonly used as an exchange format between Web client and backend services. Enabling HTML forms to submit JSON directly simplifies implementation as it enables backend services to operate by accepting a single input format that is what's more able to encode richer structure than other form encodings (where structure has traditional had to be emulated).
User agents that implement this specification will transmit JSON data from their forms
whenever the form's enctype
attribute is set to application/json
.
During the transition period, user agents that do not support this encoding will fall back
to using application/x-www-form-urlencoded
. This can be detected on the server
side, and the conversion algorithm described in this specification can be used to convert
such data to JSON.
The path format used in input name
s is straightforward. To begin with, when
no structuring information is present, the information will simply be captured as keys in
a JSON object:
<form enctype='application/json'> <input name='name' value='Bender'> <select name='hind'> <option selected>Bitable</option> <option>Kickable</option> </select> <input type='checkbox' name='shiny' checked> </form> // produces { "name": "Bender" , "hind": "Bitable" , "shiny": true }
If a path is repeated, its value is captured as an array:
<form enctype='application/json'> <input type='number' name='bottle-on-wall' value='1'> <input type='number' name='bottle-on-wall' value='2'> <input type='number' name='bottle-on-wall' value='3'> </form> // produces { "bottle-on-wall": [1, 2, 3] }
Deeper structures can be produced using sub-keys in the path, using either string keys for objects or integer keys for arrays:
<form enctype='application/json'> <input name='pet[species]' value='Dahut'> <input name='pet[name]' value='Hypatia'> <input name='kids[1]' value='Thelma'> <input name='kids[0]' value='Ashley'> </form> // produces { "pet": { "species": "Dahut" , "name": "Hypatia" } , "kids": ["Ashley", "Thelma"] }
As you can see above, the keys for array values can be in any order. If the array is somehow
sparse, then null
values are inserted:
<form enctype='application/json'> <input name='hearbeat[0]' value='thunk'> <input name='hearbeat[2]' value='thunk'> </form> // produces { "hearbeat": ["thunk", null, "thunk"] }
Paths can cause structures to nest to arbitrary depths:
<form enctype='application/json'> <input name='pet[0][species]' value='Dahut'> <input name='pet[0][name]' value='Hypatia'> <input name='pet[1][species]' value='Felis Stultus'> <input name='pet[1][name]' value='Billie'> </form> // produces { "pet": [ { "species": "Dahut" , "name": "Hypatia" } , { "species": "Felis Stultus" , "name": "Billie" } ] }
Really, any depth you might need.
<form enctype='application/json'> <input name='wow[such][deep][3][much][power][!]' value='Amaze'> </form> // produces { "wow": { "such": { "deep": [ null , null , null , { "much": { "power": { "!": "Amaze" } } } ] } } }
The algorithm does not lose data in that every piece of information ends up being submitted. But given the path syntax, it is possible to introduce clashes such that one may attempt to set an object, an array, and a scalar value on the same key.
As seen in a previous example, trying to set multiple scalars on the same key will convert the value into an array. Trying to set a scalar value at a path that also contains an object will cause the scalar to be set on that object with the empty string key. Trying to set an array value at a path that also contains an object will cause the non-null values of that array to be set on the object using their array indices as keys. This is exemplified below:
<form enctype='application/json'> <input name='mix' value='scalar'> <input name='mix[0]' value='array 1'> <input name='mix[2]' value='array 2'> <input name='mix[key]' value='key key'> <input name='mix[car]' value='car key'> </form> // produces { "mix": { "": "scalar" , "0": "array 1" , "2": "array 2" , "key": "key key" , "car": "car key" } }
This may seem somewhat convoluted but it should be considered as a resilience mechanism meant to ensure that data is not lost rather than the normal usage of the JSON encoding.
As we have seen above, multiple values with the same key are upgraded to an array, and it is also possible to directly use array offsets. However there are cases in which when generating a form from existing data, one may not know if there will be one or more instances of a given key (so that without using indices one will get back at times a scalar, at times an array) and it can be slightly cumbersome to properly generate array indices (especially if the field may be modified on the client side, which would mean maintaining array indices properly there). In order to indicate that a given path must contain an array irrespective of the number of its items, and without resorting to indices, one may use the append notation (only as the final step in a path):
<form enctype='application/json'> <input name='highlander[]' value='one'> </form> // produces { "highlander": ["one"] }
The JSON encoding also supports file uploads. The values of files are themselves structured
as objects and contain a type
field indicating the MIME type, a
name
field containing the file name, and a body
field with the
file's content as base64.
<form enctype='application/json'> <input type='file' name='file' multiple> </form> // assuming the user has selected two text files, produces: { "file": [ { "type": "text/plain", "name": "dahut.txt", "body": "REFBQUFBQUFIVVVVVVVVVVVVVCEhIQo=" }, { "type": "text/plain", "name": "litany.txt", "body": "SSBtdXN0IG5vdCBmZWFyLlxuRmVhciBpcyB0aGUgbWluZC1raWxsZXIuCg==" } ] }
Still in the spirit of not losing information, whenever a path makes use of an invalid syntax, it is simply used whole as if it were just a key with no structure:
<form enctype='application/json'> <input name='error[good]' value='BOOM!'> <input name='error[bad' value='BOOM BOOM!'> </form> // Produces: { "error": { "good": "BOOM!" } , "error[bad": "BOOM BOOM!" }
The following terms are defined in the HTML specification. [[!html51]]
accept-charset
attribute.
The following terms are defined in ECMAScript. [[!ECMA-262]]
JSONObject
and
JSONArray
.
application/json
encoding algorithm
For the purposes of the algorithms below, an Object
corresponds to
the in-memory representation for a JSONObject
and an
Array
corresponds to the in-memory representation for a
JSONArray
.
The following algorithm encodes form data as application/json
. It operates
on the form data set obtained from constructing the form data set.
Object
.file
, set the is file flag.
The algorithm above deliberately ignores any charset information (e.g. from
accept-charset
) and always encodes the resulting JSON as UTF-8. This is
an intentionally sane behaviour.
The steps to parse a JSON encoding path are as follows:
The steps to set a JSON encoding value are as follows:
Object
have its "name" property set to the file's name, its
"type" property set to the file's type, and its "body" property set to the Base64 encoding
of the file's body. [[!RFC2045]]
undefined
, run the following subsubsteps:
Array
containing
entry value as its only member.
Array
, then get the
context's property named by the step's key and push
entry value onto it.
Object
and the is
file flag is not set, then run the steps to set a JSON encoding value
with context set to the current value; a step with its type set to
"object", its key set to the empty string, and its last flag set; current value set to
the current value's property named by the empty string; the entry
value; and the is file flag. Return the result.
Array
containing current value and
entry value, in this order.
undefined
, run the following subsubsteps:
Object
, then return
the value of the context's property named by the step's key.
Array
, then rub the
following subsubsteps:
Object
.undefined
then set a
property of object named i to item.
Object
with a property named by
the empty string set to current value.
Given that there exist deployed services using JSON and ambient authentication, and given
that form requests are not protected by the same-origin policy by default, if this
encoding were left wide open then a number of attacks would become possible. Because of
this, when using the application/json
form encoding the same-origin policy is
enforced.
When the
form
submission algorithm is invoked in order to
Submit
as entity with enctype set to application/json
and entity
body set to the result of applying the application/json
encoding
algorithm, causing the browsing context to
navigate,
the user agent MUST invoke the
fetch
algorithm with the force same-origin flag.
Thanks to Philippe Le Hégaret for serving as a sounding board for the first version of the encoding algorithm.


matzahballsoupwilldeutsch.jpg BUY PRINT
ATTENTION MEMBERS OF THE TRIBE: THIS WEEK I WILL BE CELEBRATING THE WONDERFUL SIMCHA THAT IS MY BEST FRIEND’S WEDDING IN NEW YORK, CONSEQUENTLY, ORDERS THAT ARE PLACED THIS WEEK, WILL SHIP MONDAY THE 22.
We now return our regularly scheduled programming:
I’ve added a fifth question to the seder this year:
Why is it that in any other form, this matzoh we eat is the bread of affliction which our forefathers ate when the holy one, blessed be he brought us forth with an outstretched arm from bondage in the land of egypt. But, when combined with salt, schmaltz, and chicken broth, becomes a delicious comfort food served by Jewish bubbys year round?


nimib 🐳 - nim 👑 driven ⛵ publishing ✍
Nimib provides an API to convert your Nim code and its outputs to html documents.
The type of html output that is obtained by default is similar to html notebooks produced by tools
like Jupyter
or RMarkdown, but nimib provides this starting
directly from standard nim files. It currently does not provide any type of interactivity or automatic reloading.
If you have some nim code lying around that echoes stuff you can try how nimib works with following these steps:
- run in shell
nimble install nimib
- add
import nimib
at the top of your nim file
- add a
nbInit
command right after that
- split your code into one or more
nbCode:
blocks
- add some text commentary in markdown through
nbText:
blocks
- add a
nbSave
command at the end
- compile and run
- open the html file that has been generated next to your nim file (same name)
See below for an example of this.
Nimib strives for:
- a simple API
- sane defaults
- easy customization
The main goal of Nimib is to empower people to explore nim and its ecosystem and share with others.
This document is generated though nimib both as an index.html file and as a README.md,
you should be reading one of the two, for the other:
👋 🌍 Example Usage
First have a look at the following html document: hello.html
This was produced with nim r docs/hello
, where docs/hello.nim is:
import strformat, strutils
import nimib
nbInit
nbText: """
## Secret talk with a computer
Let me show you how to talk with the computer like a [real hacker](https://mango.pdf.zone/)
and incidentally you might learn the basics of [nimib](https://github.com/pietroppeter/nimib).
### A secret message
Inside this document is hidden a secret message. I will ask the computer to spit it out:
"""
let secret = [104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100]
nbCode:
echo secret
nbText: fmt"""
what does this integer sequence mean?
Am I supposed to [recognize it](https://oeis.org/search?q={secret.join("%2C+")}&language=english&go=Search)?
### A cryptoanalytic weapon
Luckily I happen to have a [nim](https://nim-lang.org/) implementation of
a recently declassified top-secret cryptoanalytic weapon:"""
nbCode:
func decode(secret: openArray[int]): string =
for c in secret:
result.add char(c)
nbText: """
### The great revelation
Now I can just apply it to my secret message and
finally decrypt what the computer wants to tell me:"""
nbCode:
let msg = decode secret
echo msg
nbText:
fmt"_Hey_, there must be a bug somewhere, the message (`{msg}`) is not even addressed to me!"
nbSave
Other examples of usage
in this repo:
- index: generate an HTML and a README.md at the same time (you are reading one of the two)
- penguins: explore palmer penguins dataset using ggplotnim (example of showing images)
- numerical: example usage of NumericalNim (example of custom style, usage of latex)
- cheatsheet: markdown cheatsheet (example of a custom block, custom highlighting and a simple TOC)
- mostaccio: examples of usage of nim-mustache and of dark mode.
- ptest: print testing for nimib
elsewhere:
🛠 Features
“I try all things, I achieve what I can.” ― Herman Melville, Moby-Dick or, the Whale
The following are the main elements of a default nimib document:
nbCode
: code blocks with automatic stdout capture
nbText
: text blocks with automatic conversion from markdown to html (thanks to nim-markdown)
nbImage
: image command to show images
- styling with water.css, light mode is default, dark mode available (
nbDoc.darkMode
after nbInit
).
- static highlighting of nim code. Highlight styling classes are the same of highlightjs
and you can pick a different styling (
atom-one-light
is default for light mode, androidstudio
is default for dark mode).
- (optional) latex rendering through katex (see below)
- a header with navigation to a home page, a minimal title and an automatic detection of github repo (with link)
- a footer with a "made with nimib" line and a
Show source
button that shows the full source to create the document.
- (optional) possibility to create a markdown version of the same document (see this document for an example: docs/index.nim)
Customization over the default is mostly achieved through nim-mustache or the internal Api (see below).
Currently most of the documentation on customization is given by the examples.
latex
See numerical for an example of latex usage.
To add latex support:
- add a
nbDoc.useLatex
command somewhere between nbInit
and nbSave
- use delimiters
$
for inline-math or $$
for display math inside nbText blocks.
Latex is rendered with katex through an autodetection during document loading.
interaction with filesystem
The default situation for single article that does not access filesystem:
- you do not have to worry about nothing.
the new html will appear next to your nim file with same name and html extension
if you need to change name or location of html output, or if you need to access
filesystem (in particular if you need it for your web assets), this is what you need to know:
- with
nbInit
a nbHomeDir
a number of paths are initialized
- we follow compiler/pathutils which is available (exported) from
nimib/paths
.
nbThisFile
is an AbsoluteFile
path of current nim file (the one where the nbInit
is called from). nbThisDir
is the corresponding AbsoluteDir
.
nbHomeDir
is a "home" directory:
- if no nimble file is found in
nbThisDir
or a parent directory, then it is set to nbThisDir
.
- if a nimble file is found and in that directory there is a
docs
folder, it is set to that docs
folder.
- if a nimble file is found without a
docs
folder, it is set to the directory containing the nimble file.
- current directory is set to
nbHomeDir
(current directory at initialization is saved in nbInitDir
if needed)
- a procedure
relPath(path: AbsoluteFile | AbsoluteDir): string
turns an AbsolutePath into a string path relative to nbHomeDir
🐝 API
external API
By external API we mean the following templates:
nbInit
(always required): it initializes the notebook,
the other templates are not accessible if nbInit is not called.
nbText
: it is followed by any expression that evaluates to a string.
this text is by default assumed to be markdown and it will be rendered as html
thanks to nim-markdown.
nbCode
: followed by a block of code, it will execute the code,
and capture the output. It will be rendered in the final html document
as a block of nim code followed by preformatted text.
nbSave
: it is required to save the document to a file.
Rendering takes place at this moment.
By default the document will be save as an html (templated with nim-mustache)
other templates on top of the four basic ones are available (e.g. nbImage
)
or will likely be added (see issue #2).
internal api
nbInit
creates two variables nbDoc
and nbBlock
, which are injected in the scope.
At every block of code or text (or else) nbBlock
is updated and added to nbDoc
.
nbBlock
is a ref object, so changes done to it after a block will be reflected in
the content of nbDoc
.
The specific types NbDoc
and NbBlock
are unstable and they will likely change,
but it is likely that access the following elements will be guaranteed:
nbDoc.blocks
: container of all the blocks
nbDoc.render
: a closure from NbDoc to string that produces the rendered document
nbBlock.output
: string with the output of a nbCode/nbText block (not yet rendered)
nbBlock.code
: stringification of the code block through AST.
if it appears different than what you typed it is because nim likes it better that way.
In particular only documentation comments survive this process and normal comments will
not appear.
Here are two examples that show how to abuse the internal api:
- nolan: how to mess up the timeline of blocks ⏳
- pythno: a reminder that nim is not python 😜
🌅 Roadmap
- refactor rendering and simplify customization (#24)
- add additional blocks and features for blogging (#30)
- a mdbook / bookdown theme.
- can I use nimib to build library directly from documentation?
- client-side dynamic site: interactivity of documents, e.g. a dahsboard (possibly taking advantage of nim js backend)
- nimib executable for scaffolding and to support different publishing workflows
- server-side dynamic sites (streamlit style? take advantage of caching instead of hot code reloading)
- possibility of editing document in the browser (similar to jupyter UI, not necessarily taking advantage of hot code reloading)
- ...
🙏 Thanks
to:
- soasme for the excellent libraries nim-markdown and nim-mustache, which provide the backbone of nimib rendering and customization
- Clonkk for help in a critical piece of code early on (see this Stack Overflow answer)
- yardanico for being the first contributor and great sponsor of this library, even before an official release
❓ ❗ Q & A
why the name?
corruption of ninib:
a solar deity; firstborn of Bel and consort was Gula;
god of war and the chase and agriculture; sometimes identified with biblical Nimrod
also:
He explains that the seven directions were interpreted by the Babylonian theologians
as a reference to the seven great celestial bodies, the sun and moon, Ishtar, Marduk, Ninib, Nergal and Nabu.
This process, which reached its culmination in the post-Khammurabic period, led to identifying
the planet Jupiter with Marduk, Venus with Ishtar, Mars with Nergal, Mercury with Nebo, and Saturn with Ninib.
and I should not need to tell you what Marduk is
and why Saturn is the best planet.
why the whale 🐳?
why do you need a logo when you have emojis?
no particular meaning about the whale apart the fact that I like the emoji and this project is something I have been chasing for a while
(and I expect to be chasing it indefinitely).
also googling nimib whale
you might discover the existence of a cool place: Skeleton Coast.
why the emojis?
because I made a package for that and someone has to use it
why the Q & A?
because someone made it into an art form
and they tell me imitation is the sincerest form of flattery
import nimib, strformat, nimoji
nbInit
nbDoc.title = "Nimib Docs"
let
repo = "https://github.com/pietroppeter/nimib"
docs = "https://pietroppeter.github.io/nimib"
hello = read("hello.nim".RelativeFile)
assets = "docs/static"
highlight = "highlight.nim.js"
defaultHighlightCss = "atom-one-light.css"
nbText: fmt"""
# nimib :whale: - nim :crown: driven :sailboat: publishing :writingHand:
Nimib provides an API to convert your Nim code and its outputs to html documents.
The type of html output that is obtained by default is similar to html notebooks produced by tools
like [Jupyter](https://nbviewer.jupyter.org/url/norvig.com/ipython/Advent%20of%20Code.ipynb)
or [RMarkdown](https://rmarkdown.rstudio.com/lesson-10.html), but nimib provides this starting
directly from standard nim files. It currently does not provide any type of interactivity or automatic reloading.
If you have some nim code lying around that echoes stuff you can try how nimib works with following these steps:
* run in shell `nimble install nimib`
* add `import nimib` at the top of your nim file
* add a `nbInit` command right after that
* split your code into one or more `nbCode:` blocks
* add some text commentary in markdown through `nbText:` blocks
* add a `nbSave` command at the end
* compile and run
* open the html file that has been generated next to your nim file (same name)
See below for an example of this.
Nimib strives for:
* a simple API
* sane defaults
* easy customization
The main goal of Nimib is to empower people to explore nim and its ecosystem and share with others.
This document is generated though nimib both as an index.html file and as a README.md,
you should be reading one of the two, for the other:
* [README.md]({repo})
* [index.html]({docs})
## :wave: :earthAfrica: Example Usage
First have a look at the following html document: [hello.html]({docs}/hello.html)
This was produced with `nim r docs/hello`, where [docs/hello.nim]({repo}/blob/main/docs/hello.nim) is:
""".emojize
nbCode: discard
nbBlock.code = "\n" & hello
nbText: fmt"""
<!--TODO
Notes should be directly embedded in hello file.
-->
### Other examples of usage
in this repo:
* [index]({docs}/index.html): generate an HTML and a README.md at the same time (you are reading one of the two)
* [penguins]({docs}/penguins.html): explore palmer penguins dataset using ggplotnim (example of showing images)
* [numerical]({docs}/numerical.html): example usage of NumericalNim (example of custom style, usage of latex)
* [cheatsheet]({docs}/cheatsheet.html): markdown cheatsheet (example of a custom block, custom highlighting and a simple TOC)
* [mostaccio]({docs}/mostaccio.html): examples of usage of nim-mustache and of dark mode.
* [ptest]({docs}/ptest.html): print testing for nimib
elsewhere:
* [adventofnim](https://pietroppeter.github.io/adventofnim/index.html): solutions for advent of code in nim
* [intro to binarylang](https://ajusa.github.io/binarylang-fun/intro.html): a introduction to library [binarylang](https://github.com/sealmove/binarylang) (first public usage of nimib I was aware of)
## :hammer_and_wrench: Features
> “I try all things, I achieve what I can.” ― Herman Melville, Moby-Dick or, the Whale
The following are the main elements of a default nimib document:
* `nbCode`: code blocks with automatic stdout capture
* `nbText`: text blocks with automatic conversion from markdown to html (thanks to [nim-markdown](https://github.com/soasme/nim-markdown))
* `nbImage`: image command to show images
* styling with [water.css](https://watercss.kognise.dev/), light mode is default, dark mode available (`nbDoc.darkMode` after `nbInit`).
* static highlighting of nim code. Highlight styling classes are the same of [highlightjs](https://highlightjs.org/)
and you can pick a different styling (`atom-one-light` is default for light mode, `androidstudio` is default for dark mode).
* (optional) latex rendering through [katex](https://katex.org/) (see below)
* a header with navigation to a home page, a minimal title and an automatic detection of github repo (with link)
* a footer with a "made with nimib" line and a `Show source` button that shows the full source to create the document.
* (optional) possibility to create a markdown version of the same document (see this document for an example: [docs/index.nim]({repo}/blob/main/docs/index.nim))
Customization over the default is mostly achieved through nim-mustache or the internal Api (see below).
Currently most of the documentation on customization is given by the examples.
### latex
See [numerical]({docs}/numerical.html) for an example of latex usage.
To add latex support:
* add a `nbDoc.useLatex` command somewhere between `nbInit` and `nbSave`
* use delimiters `$` for inline-math or `$$` for display math inside nbText blocks.
Latex is rendered with [katex](https://katex.org/) through an autodetection during document loading.
### interaction with filesystem
The default situation for single article that does not access filesystem:
* you do not have to worry about nothing.
the new html will appear next to your nim file with same name and html extension
if you need to change name or location of html output, or if you need to access
filesystem (in particular if you need it for your web assets), this is what you need to know:
* with `nbInit` a `nbHomeDir` a number of paths are initialized
* we follow [compiler/pathutils](https://nim-lang.org/docs/compiler/pathutils.html) which is available (exported) from `nimib/paths`.
* `nbThisFile` is an `AbsoluteFile` path of current nim file (the one where the `nbInit` is called from). `nbThisDir` is the corresponding `AbsoluteDir`.
* `nbHomeDir` is a "home" directory:
- if no nimble file is found in `nbThisDir` or a parent directory, then it is set to `nbThisDir`.
- if a nimble file is found and in that directory there is a `docs` folder, it is set to that `docs` folder.
- if a nimble file is found without a `docs` folder, it is set to the directory containing the nimble file.
* current directory is set to `nbHomeDir` (current directory at initialization is saved in `nbInitDir` if needed)
* a procedure `relPath(path: AbsoluteFile | AbsoluteDir): string` turns an AbsolutePath into a string path relative to `nbHomeDir`
## :honeybee: API <!-- Api means bees in Italian -->
### external API
By external API we mean the following templates:
* `nbInit` (*always required*): it initializes the notebook,
the other templates are not accessible if nbInit is not called.
* `nbText`: it is followed by any expression that evaluates to a string.
this text is by default assumed to be markdown and it will be rendered as html
thanks to [nim-markdown](https://github.com/soasme/nim-markdown).
* `nbCode`: followed by a block of code, it will execute the code,
and capture the output. It will be rendered in the final html document
as a block of nim code followed by preformatted text.
* `nbSave`: it is required to save the document to a file.
Rendering takes place at this moment.
By default the document will be save as an html (templated with [nim-mustache](https://github.com/soasme/nim-mustache))
other templates on top of the four basic ones are available (e.g. `nbImage`)
or will likely be added (see issue [#2](https://github.com/pietroppeter/nimib/issues/2)).
### internal api
`nbInit` creates two variables `nbDoc` and `nbBlock`, which are injected in the scope.
At every block of code or text (or else) `nbBlock` is updated and added to `nbDoc`.
`nbBlock` is a ref object, so changes done to it after a block will be reflected in
the content of `nbDoc`.
The specific types `NbDoc` and `NbBlock` are unstable and they will likely change,
but it is likely that access the following elements will be guaranteed:
* `nbDoc.blocks`: container of all the blocks
* `nbDoc.render`: a closure from NbDoc to string that produces the rendered document
* `nbBlock.output`: string with the output of a nbCode/nbText block (not yet rendered)
* `nbBlock.code`: stringification of the code block through AST.
if it appears different than what you typed it is because nim likes it better that way.
In particular only documentation comments survive this process and normal comments will
not appear.
Here are two examples that show how to abuse the internal api:
* [nolan]({docs}/nolan.html): how to mess up the timeline of blocks :hourglass_flowing_sand:
* [pythno]({docs}/pythno.html): a reminder that nim is not python :stuck_out_tongue_winking_eye:
<!--
### extending the api
*TODO* after 0.2
## Rendering
*TODO* after 0.2
### html rendering
There are two levels of html rendering.
1. **render-in-the-small**: rendering html fragments. This is mostly taken care by nim-markdown
and by appropriate semantic tagging in render functions (this can be overriden).
2. **render-in-the-large***: putting together html fragments and other elements to publish one or more documents.
this is delegated to nim-mustache and to manual creation and update of json and context fields in doc and block objects.
-->
## :sunrise: Roadmap
- refactor rendering and simplify customization ([#24](https://github.com/pietroppeter/nimib/issues/24))
- add additional blocks and features for blogging ([#30](https://github.com/pietroppeter/nimib/issues/30))
- a [mdbook](https://rust-lang.github.io/mdBook/) / [bookdown](https://bookdown.org/) theme.
- can I use nimib to build library directly from documentation?
- client-side dynamic site: interactivity of documents, e.g. a dahsboard (possibly taking advantage of nim js backend)
- nimib executable for scaffolding and to support different publishing workflows
- server-side dynamic sites (streamlit style? take advantage of caching instead of hot code reloading)
- possibility of editing document in the browser (similar to jupyter UI, not necessarily taking advantage of hot code reloading)
- ...
## :pray: Thanks
to:
* [soasme](https://github.com/soasme) for the excellent libraries nim-markdown and nim-mustache, which provide the backbone of nimib rendering and customization
* [Clonkk](https://github.com/Clonkk) for help in a critical piece of code early on (see [this Stack Overflow answer](https://stackoverflow.com/a/64032172/4178189))
* [yardanico](https://github.com/yardanico) for being the first contributor and great sponsor of this library, even before an official release
## :question: :exclamation: Q & A
### why the name?
corruption of [ninib](https://www.vocabulary.com/dictionary/Ninib):
> a solar deity; firstborn of Bel and consort was Gula;
> god of war and the _chase_ and agriculture; sometimes identified with biblical *Nimrod*
also:
> He explains that the seven directions were interpreted by the Babylonian theologians
> as a reference to the seven great celestial bodies, the sun and moon, Ishtar, Marduk, Ninib, Nergal and Nabu.
>
> This process, which reached its culmination in the post-Khammurabic period, led to identifying
> the planet Jupiter with Marduk, Venus with Ishtar, Mars with Nergal, Mercury with Nebo, and Saturn with Ninib.
and I should not need to tell you what [Marduk](https://jupyter.org/) is
and why [Saturn is the best planet](https://www.theatlantic.com/science/archive/2016/01/a-major-correction/422514/).
### why the whale :whale:?
why do you need a logo when you have emojis?
no particular meaning about the whale apart the fact that I like the emoji and this project is something I have been [chasing](https://en.wikipedia.org/wiki/Captain_Ahab) for a while
(and I expect to be chasing it indefinitely).
also googling `nimib whale` you might discover the existence of a cool place: [Skeleton Coast](https://en.wikipedia.org/wiki/Skeleton_Coast).
### why the emojis?
because I made a [package](https://github.com/pietroppeter/nimoji) for that and someone has to use it
### why the Q & A?
because [someone made it into an art form](https://github.com/oakes/vim_cubed#q--a)
and they tell me [imitation is the sincerest form of flattery](https://www.goodreads.com/quotes/558084-imitation-is-the-sincerest-form-of-flattery-that-mediocrity-can)
""".emojize
nbSave
nbDoc.render = renderMark
nbDoc.filename = "../README.md"
nbSave


B
Back
ack
P
ending Contracts
#
Item ID
Item Name
Interested User
Price
Interested Times
Geography
Approve?
1
001
Nintendo DS
<EMAIL_ADDRESS>$300
M,T,W
Maine


folder
0 folders / 0 files
Folder Name
folder
0 folders / 0 files
Documents
folder
0 folders / 0 files
Music
folder
0 folders / 0 files
0 folders / 0 files
0 folders / 0 files
0 folders / 0 files
0 folders / 0 files


Sign In
Email Address:
Please Enter Your Email Address
Password:
Please Enter Your Password
Sign In
Do not have an account?
Sign Up
Empty Popup


AHMAD KANE
Welcome
After my education in design and the arts, I have been maintaining my craft and building up my skills as it relates to marketing purposes. Whether a client needs a presentation, training video, or video advertisement created; I will proficiently accomplish the task at hand. Some of my skills include constructing content strategies for clients, editing video footage, maintaining good communication with clients, update layouts and information on websites, knowledge in search engine optimization, and knowledge in Instagram Ads.


About Me
I am a collaborative and solutions driven Full Stack Web Developer specializing in the MERN Stack with over ten years of technical experience in both QA Automation and Program Management. Effective at coupling creativity, critical thinking, and problem solving to develop effective solutions positively impacting the business and customer.
On a personal level, I have several passions that keep me busy outside of work and school. First and foremost, I have 2 young daughters who mean the world to me.  When I'm not hanging with the family, I enjoy watching Sports. I especially love watching Baseball and Basketball. Ever since I was a little kid growing up in the Bay Area, I have loved Baseball. My Grandfather used to take my Brother and me up to SF to see the Giants or over to Oakland to see the A's There's nothing better than going to a Baseball Game in Summer. Now that I'm grown and have a family, I get to share that passion with my girls who love going to Baseball Games.
I love Web Development for many reasons. Not least of which is the ability to tell someone's story. To help people connect to one another or to learn more about the values of a particular person or company is, for me, particularly enjoyable. I also love learning new things and see how I can incorproate the two into my project.
I would love to bring my passion for quality and technology to your company. I look forward to hearing from you!


This morning I added a new feature to the blog posts: an R script that automatically generates and applies tags, allowing users to find old posts on (potentially, roughly) similar topics. Because of some difficulties setting up a chronological archive, I was worried old posts would be lost down the memory hole. This new feature should help prevent that.
My previous blogs had tags; you can see some of the remains of Tumblr’s tagging system at the bottom of many migrated posts. But the tags had to be added manually. This added a step to the publication process, and made me worried about inconsistent tags. What if I recently adopted a new tag that applied to some old posts? I’d have to scroll back through the archive to find them, which was both very tedious and prone to human error.
The new script solves these problems by automatically selecting tags and applying them across all posts at the same time. After writing a post, all I need to do is run a one-line command in the terminal. As a side effect, the tags will change, highlighting different arrays of topics as I add posts to the blog.
In the rest of this post, I want to explain the logic behind the tag selection process by walking through the code of the autotagging script. The post also includes a discussion of a metric I use for “high-information” terms, which I call \[n \Delta H\].
The script uses two R packages: tidyverse, a suite of packages of data wrangling; and tidytext, a text mining package designed for use with the tidyverse. After loading these packages, the rest of the following chunk loads the content of every post on the blog into a single dataframe structure.
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.2 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.0
✔ ggplot2 3.4.2 ✔ tibble 3.2.1
✔ lubridate 1.9.2 ✔ tidyr 1.3.0
✔ purrr 1.0.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(tidytext)post_folder =getwd() # Just `_posts/` in the actual scriptpost_files =list.files(post_folder, pattern ='\\.q?md') %>%file.path(post_folder, .)dataf =tibble(path = post_files) %>%mutate(post_id =row_number()) %>%rowwise() %>%mutate(raw_text =read_file(path)) %>%ungroup()str(dataf)
tibble [70 × 3] (S3: tbl_df/tbl/data.frame)
$ path : chr [1:70] "/Users/danhicks/Google Drive/Coding/website/posts/2012-03-14-friedersdorf-the-sex-friendly-case-against-free-bi"| __truncated__ "/Users/danhicks/Google Drive/Coding/website/posts/2012-03-14-friedersdorf-the-sex-friendly-case-against-free-bi"| __truncated__ "/Users/danhicks/Google Drive/Coding/website/posts/2012-04-21-the-agroecological-argument-for-eating-meat.md" "/Users/danhicks/Google Drive/Coding/website/posts/2012-05-23-fetishism-and-innate-differences.md" ...
$ post_id : int [1:70] 1 2 3 4 5 6 7 8 9 10 ...
$ raw_text: chr [1:70] "---\ntitle: \"Friedersdorf: The Sex-Friendly Case Against Free Birth Control, part I\"\ndate: \"2012-03-14\"\nc"| __truncated__ "---\nlayout: post\ntitle: \"Friedersdorf: The Sex-Friendly Case Against Free Birth Control, part II\"\ndate: \""| __truncated__ "---\nlayout: post\ntitle: \"The Agroecological Argument for Eating Meat\"\ndate: \"2012-04-21\"\ncategories: [d"| __truncated__ "---\nlayout: post\ntitle: \"Fetishism and Innate Differences\"\ndate: \"2012-05-23\"\n---\n\n\n(Going through m"| __truncated__ ...
Next we use tidytext to parse the text of each post into individual terms or tokens.
To develop tags, we want to identify “highly meaningful terms” across the cropus of parsed blog posts. In text mining, a measure called TF-IDF is frequently used for this task. TF-IDF is calculated for each term-document combination. The TF-IDF of term \[i\] in document \[j\] is - the number of times \[i\] occurs in \[j\] (the term frequency), divided by - the (log) number of documents in which \[i\] occurs at least once (the document frequency).
Intuitively, TF-IDF tries to identify words that are common in a particular document (high term frequency) but also only occur in a few documents (low document frequency). In English, words like “the” and “and” tend to have high term frequencies but also very high document frequencies, so their TF-IDF scores tend to be low. Misspelled words like “mipelled” have low document frequency, but also low term frequency, so again their TF-IDF scores tend to be low. Terms with a high TF-IDF should, the thought goes, be distinctive to a given document.
The problem with TF-IDF is that it’s difficult to make this intuitive account more precise. It can also be difficult to interpret, because the units are occurrences per log documents. Is 3 occurrences per log documents high or low? That depends on things like the number and length of documents in the corpus. In addition, TF-IDF is calculated for term-document pairs, not for individual terms. A word will have the same IDF value across the entire corpus, but will have different TF values as it occurs a different number of times across different documents.
For these reasons, in my text mining work I’ve switched to an information-based measure. To understand this one, note first that we have \[m=42\] blog posts. Suppose we draw one of these blog posts at random. The probability of drawing any given post is \[p(doc) = \frac{1}{m} = \frac{1}{42}\]. The entropy of this probability distribution tells us the number of binary bits (0s and 1s) we need to give a unique ID for each blog post.
\[ H = - \sum_{docs} p(doc) \log_2 p(docs) = - \sum_m \frac{1}{m} \log_2 \frac{1}{m} = log_2 m. \]
In the case of my blog before writing this post, the entropy is \[log_2 42 = 5.4\].
Now suppose that, after drawing a post at random, we draw a single word from the post at random (without peeking at exactly which post we’ve drawn). The probability that we’ve drawn any given post is now \[p(doc \mid word)\]. The information gain of the word is the difference between \[H\] up above and the entropy of this new distribution \[p(doc \mid word)\]:
\[\Delta H = H[p(doc)] - H[p(doc \mid word)].\]
We can think of \[\Delta H\] as the number of bits of information, relative to the full post ID, that we’ve gained from knowing the word. \[\Delta H\] corresponds to inverse document frequency (dividing by the document frequency) in TF-IDF: it tells us how unique that word is to each document. A term like “the” will tend to have \[\Delta H\] near 0 (it doesn’t give us any new information); a more distinctive term like “virtue” (only some of my posts are about virtue ethics) will have a relatively high \[\Delta\], perhaps 4 or even 5 (it tells us a lot about which particular posts we might have).
To calculate an overall score for each term, we multiply \[\Delta H\] by the (log) total times the term occurs across the entire corpus. Suppose “virtue” occurs 100 times across all blog posts, and has an information gain of 3 bits. Then we have \[\log_{10} n \times \Delta H = 2 \times 3 = 6\]. The units here are orders of magnitude-bits. An increase of 1 of these units means that a word occurs \[10\times\] as frequently or provides 1 added bit of information. I call the resulting measure \[n\Delta H\] (not writing the log for readability).
The following block calculates \[H\] for the distribution \[p(doc)\], as baseline, then calculates the information gain and \[n\Delta H\].
This next block isn’t included in the script; it generates a plot showing the distribution of \[n\Delta H\] scores for a sample of 500 terms. Each point represents a single term; the x-axis is the (log) number of total occurrences across the corpus, color indicates the information gain \[\Delta H\], and the y-axis is the overall \[n \Delta H\] score.
Informally, the \[n \Delta H\] score does a good job of identifying characteristic words for different kinds of posts, such as “data,” “developing,” and “feminism.”
The overall shape of the plot also shows how \[n \Delta H\] balances information gain and frequency. Some terms like “yourself” and “x’s” have a high information gain (more than 4 bits — remember that the maximum is about 5.4), but occur fewer than 10 times and so have a low \[n \Delta H\]. Extremely common terms (many more than 100 occurrences across a set of 42 posts) have very little information. The highest-scoring term, “market,” has both high information (4.3) and occurs 71 times.
All together, the \[n \Delta H\] score picks out a set of high-information, moderate-frequency terms in the middle of the plot, much like TF-IDF. In contrast with TF-IDF, it uses information theory for theoretical support and produces a relatively interpretable value.
The last step in the script is to select a vocabulary of terms to use as tags, identify them in the posts, and write the tags into the Markdown files.
To select the vocabulary, we simply take the terms with the highest \[n \Delta H\] scores. Because the blog is fairly small, it’s not unreasonable to take as many terms as there are blog posts (42 tags \[\to\] 42 tags). As the blog grows, I’ll probably want to trim this down to set a hard cap. Alternatively, I might want to select a number of tags such that each post has at least 1 tag and no post has more than, say, 5 tags. For now, though, I’ll just use the simpler logic of the top 42 terms.
vocab =top_n(info_df, nrow(dataf), ndH)
Then we’ll filter the list of tokens down to these tags, collapse the tags into a list, and convert the list into the string that will go in the header of the Markdown files.
`summarise()` has grouped output by 'path'. You can override using the
`.groups` argument.
str(tags_df, max.level =1)
tibble [61 × 4] (S3: tbl_df/tbl/data.frame)
Finally we’ll write these files back to disk. Each post has a header section that looks something like this:
---title:"Post title goes here"style: postcategories:[monkey,zoo]---
We’ll separate this header section from the body by searching for the ---, add the tags, then put everything back together and write to disk. (Except we won’t actually write the results out to disk here.)
right_join(dataf, tags_df) %>%separate(raw_text, into =c('null', 'header', 'body'), sep ='---', extra ='merge') %>%## Remove old tagsmutate(header =str_replace(header, 'categories: \\[[^\\]]+\\]', '')) %>%mutate(combined =str_c('---', header, tags_str, '\n','---', body)) %>%# pull(combined) %>% {cat(.[[1]])}rowwise() #%>%


Equity is integral to sustainability. The majority of original Greenworks goals focused on making Philadelphia more equitable by ensuring that current decisions do not unfairly burden future generations. The equity section also sought to identify areas of the city with limited access to the benefits of sustainability policies and mitigate these inequities. Goals in this section include: managing stormwater to meet federal standards; providing walkable access to park and recreation resources and affordable healthy food for all Philadelphians, and; increasing tree coverage toward 30 percent in all neighborhoods by 2025. The following project areas in the Greenworks Map contribute to these targets:


Gather every Thursday with other Anime enthusiasts and watch your favorite shows.
The National beta Club is an organization for 4th through 12th grade students in the United States. Its purpose is "to promote the ideals of academic achievment, character, leadership, and service amond elementary and secondary school students."
Dekalb School of the Arts' very own spoken word troupe. If you love to write or recite poetry, this club is for you!
Do you love film making, digital content creation, and media as a whole? Well then Digital Clique wants you!
Dance Reperatory Company, or DRC, is Dekalb School of the Arts' audition only touring dance group. DRC is comprised of the school's most talented and dedicated dancers.
Drama Ensemble is Dekalb School of the Arts' audition only touring drama troupe. Drama Ensemble is comrised of the school's boldest, most talented actors.
Protect our precious Earth with Eco Team, Dekalb School of the Arts' group environmental warriors!
Fitness Club gives students the opportunity to learn and practice healthy fitness habits with their peers.
Dekalb School of the Arts' Gay-Straight Alliance is dedicated to unity and inclusivity within the LGBT+ community.
Girls Who Code is a nonprofit organization which aims to support and increase the number of women in computer science. The organization is working to close the gender gap in technology and change the image of what a programmer looks like and does.
Highleit is one of Dekalb School of the Arts' audition-only touring show choirs. Highleit is comprised of mixed voices in grades 9-12.
History Club is dedicated to educating the students of Dekalb School of the Arts on important moments in our history, working to use this knowledge to inspire change in the present.
Jazz band is Dekalb School of the Arts' audition-only touring instrumental jazz ensemble.
A program in which students participate in rehearsed trials to learn about the legal system in a competitive manner.
The Mathletes is a group of hardworking and intelligent students interested in competing in math competitions and using math to create creative solutions to everyday issues
The mission of NHSDA is to recognize outstanding artistic merit, leadership, and academic achievement in students studying dance in public and private schools in K-12 education, dance studios, cultural/community centers, performing arts organizations, and post-secondary education.
The National Art Honor Society was established in 1978 in the United States by the National Art Education Association for high school students grades 9-12 from the National Art Honor Society.The NAEA also offers a National Junior Art Honor Society for students in grades 6-8. Its purpose is to assist student members to attain their highest potential in all forms of art, and to raise awareness of art education throughout the school and community.
Do you love to write, interview, and report the most groundbreaking news at Dekalb School of the Arts? Then join "The Apothecary", the school's resident, student-run newspaper.
The National Honor Society (NHS) is the nation’s premier organization established to recognize outstanding high school students. More than just an honor roll, NHS serves to recognize those students who have demonstrated excellence in the areas of scholarship, service, leadership, and character. These characteristics have been associated with membership in the organization since its beginning in 1921.
Pro Arte is one of Dekalb School of the Arts' audition-only touring show choirs. Pro Arte is comprised of soprano and alto voices in grades 9-12.
The Georgia Helen Ruffin Reading Bowl (HRRB) is now open to students in grades 4-12 across the state. Elementary and middle school students read and are quizzed on the 20 Georgia Book Award Nominees, while high school students read and are quizzed on the 20 Georgia Peach Teen Book Award Nominees. The books change yearly.
Dekalb School of the Arts' SGA is a group of elected student leaders, all of whom are dedictated to leading and bettering the school community.
Students of the Performing Arts, or SPA, is a group of student representatives from each arts area at the school. These representatives are elected or selected by teachers and work closely with arts faculty to upholf the school's arts community.
Spanish National Honor Society is an academic honor society focused on Spanish language excellence in secondary education and promotes a continuity of interest in Spanish studies. Its motto is "¡Todos a una!".
Thespians is a group of passionate drama students interested in gaining valuable performance experience. Thespians showcases multiple performances throughout the school year. They also participate in the Georgia Thespian Conference every year.


My JS playing ground
My Test Blog
My Gallery a Node&MongoDB app
RGB Random Color Demo
1
First Cookie
setAttribute get...
addEventListener
score Demo
hover List
All Javascript events from MDN web
jQuery first call
TODO Demo
2
Sound Demo
TODO Workbox
Regular expression
1. [PWA]
↩
2. [TODO local saving]
↩


{% extends "base_2col.html" %} {% load i18n %} {% block sl %}
My name is Brian Rosner. I am a 22-year old web developer. I am currently employed at ChurchPartner. I enjoy coding in Python, C, Erlang, HTML, CSS and Javascript.
I am involved with the Django Python web framework. I originally got involved to solve problems at work, but now I am comitter maintaining the automatic admin interface (originally worked on the newforms-admin branch) and the modules that supplement it. I very much enjoy working on such a wonderful project.
I am the co-host of TWiD. It is a lot of work, but I really enjoy putting out a show each week with Michael Trier.
I am an Apple consumer. I love their products and use them everyday.
{% endblock %} {% block sr %}2000 Volkswagon Passat
{% endblock %}


| 16x2 LCD |
LCD screen |
type Character; pins 16 |
| Arduino |
Arduino |
processor ATmega; variant Arduino |
| C1 100uF |
Electrolytic Capacitor |
package 100 mil [THT, electrolytic]; capacitance 10µF; voltage 6.3V |
| C2 10uF |
Electrolytic Capacitor |
package 100 mil [THT, electrolytic]; capacitance 0.1mF; voltage 6.3V |
| Down (-) |
Pushbutton |
package [THT] |
| Hall Effect 1st Gear |
LM35 Temperature Sensor |
package TO92 [THT]; type LM35 |
| Hall Effect 2nd Gear |
LM35 Temperature Sensor |
package TO92 [THT]; type LM35 |
| Hall Effect 3rd Gear |
LM35 Temperature Sensor |
package TO92 [THT]; type LM35 |
| Hall Effect 4th Gear |
LM35 Temperature Sensor |
package TO92 [THT]; type LM35 |
| Hall Effect 5th Gear |
LM35 Temperature Sensor |
package TO92 [THT]; type LM35 |
| Hall Effect Power |
Screw terminal - 2 pins |
package THT; hole size 1.0mm,0.508mm; pins 2; pin spacing 0.137in (3.5mm) |
| Hall Effect Reverse |
LM35 Temperature Sensor |
package TO92 [THT]; type LM35 |
| Hall Effect Signals |
Screw terminal - 6 pins |
package THT; hole size 1.0mm,0.508mm; pins 6; pin spacing 0.137in (3.5mm) |
| LCD Contrast |
Rotary Potentiometer (Large) |
package THT; size Rotary - 16mm; track Linear; type Rotary Shaft Potentiometer; maximum resistance 10kΩ |
| LED |
Green LED - 3mm |
package 3 mm [THT]; leg yes; color Green (570nm) |
| Mode |
Pushbutton |
package [THT] |
| Power Input |
Screw terminal - 2 pins |
package THT; hole size 1.0mm,0.508mm; pins 2; pin spacing 0.137in (3.5mm) |
| R1 |
330 Ω Resistor |
package THT; tolerance ±5%; bands 4; resistance 330Ω; pin spacing 400 mil |
| Regulator Pad |
Pad |
layer copper0 |
| Up (+) |
Pushbutton |
package [THT] |
| VR7809 |
Voltage Regulator - 5V |
package TO220 [THT]; voltage 5V |


1. Have you come into close contact (within 6 feet) with someone who has a laboratory confirmed COVID – 19 diagnosis in the past 14 days?
Yes
No
2. Are you facing problems like fever or chills, cough, shortness of breath or difficulty breathing?body aches, headache, new loss of taste or smell, sore throat?
Yes
No
3.Are you facing these problems like body aches, headache, new loss of taste or smell, sore throat?


--- post_id: /unfinished-notes-on-richard-florida date: 2010-03-20 22:59 return_url: '2007-06-09-unfinished-notes-on-richard-florida.html' name: 'playfish' email<EMAIL_ADDRESS>comment: '
i wouldn''t have suspected this was interesting just a few years back however it''s funny the way years shifts the manner in which you comprehend totally different ideas, thank you regarding the write-up it is actually pleasant to browse through anything sensible now and then in lieu of the ordinary garbage mascarading as a blog on the net, i''m going to play a few rounds of zynga poker, take care
' ---


layout: post title: Installing Jenkins on OSX Server
Jenkins is a CI (Continuous Integration) server which comes with a big repository of plugins. If you don't know what Continuous Integration is, in a nutshell it is a concept of integrating work of all developers to have the integrated stream of a code base. It is useful to run certain test suites (sometimes heavy ones) continuously to ensure the health of your code base.
In my setup, I need to install Jenkins on an OSX Server (10.6 Snow Leopard) to be used with a Django project. As revision control system, I use Mercurial (a.k.a. HG) which is a distributed version control. But, you might use Jenkins for other languages, frameworks and revision control system; this tutorial will still get you there.
Let's get started!
If you ever worked with Linux, you know the comfort of a package manager at your fingertips. OSX doesn't come with a package manager and compiling packages might require a lot researching. Good news is that there are already couple of package managers including Homebrew. Homebrew is an easy to use package manager with growing repository of formulas which are manifests to install a package. If you use another package manager or prefer to compile libraries yourself, the rest should still apply to you. Assuming that you already installed Homebrew, we can jump to installing Jenkins:
{% highlight bash %} brew install jenkins {% endhighlight %}
If the installation goes well, Jenkins is installed under
/usr/local/Cellar/jenkins/{VERSION}/
depending on your version.
I found a nice how-to guide for configuring Jenkins but it was missing some further steps like securing the installation as well as environment variables resolution which might become a headache onwards. First step is to prepare a directory for Jenkins. This directory later will be the home directory
for the Jenkins user. I choose to install it under /var
but you can use any directory you like.
{% highlight bash %} sudo mkdir /var/jenkins {% endhighlight %}
The next step is to create Jenkins User/Group which is necessary for a proper server setup. You would like to keep the server instance contained within its own user/group as a security measure. Pay attention that /var/jenkins
is set as jenkins user's home directory.
{% highlight bash %} sudo /usr/sbin/dseditgroup -o create -r 'Jenkins CI Group' -i 600 _jenkins sudo dscl . -append /Groups/_jenkins passwd "" sudo dscl . -create /Users/_jenkins sudo dscl . -append /Users/_jenkins RecordName jenkins sudo dscl . -append /Users/_jenkins RealName "Jenkins CI Server" sudo dscl . -append /Users/_jenkins uid 600 sudo dscl . -append /Users/_jenkins gid 600 sudo dscl . -append /Users/_jenkins shell /usr/bin/false sudo dscl . -append /Users/_jenkins home /var/jenkins sudo dscl . -append /Users/_jenkins passwd "" sudo dscl . -append /Groups/_jenkins GroupMembership _jenkins sudo chown -R jenkins /var/jenkins {% endhighlight %}
Now we have a Jenkins setup with a dedicated user, next step is to prepare an OSX launch configuration file. This file is used to launch Jenkins with proper configurations including environment variables. Among environment variables, PATH
is the one I set because Homebrew installs binaries like MySQL, Python, etc. under /usr/local/bin
. By default Jenkins will look under /usr/bin
and I believe this can be set in Jenkins Configuration. Nevertheless I prefer to solve the problem from the root by configuring the launch config file.
Create a config file:
{% highlight bash %} sudo nano /Library/LaunchDaemons/org.jenkins-ci.plist {% endhighlight %}
and type (put your own Jenkins version in the path):
{% highlight xml %} <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> Label Jenkins ProgramArguments /usr/bin/java -jar /usr/local/Cellar/jenkins/{VERSION}/libexec/jenkins.war OnDemand RunAtLoad UserName jenkins EnvironmentVariables PATH /usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin {% endhighlight %}
now you are ready to launch your Jenkins ("unload" can be used to stop it):
{% highlight bash %} sudo launchctl load -w /Library/LaunchDaemons/org.jenkins-ci.plist {% endhighlight %}
By default it uses port 8080
:
http://localhost:8080
You may have noticed that Jenkins complains about your non-secure installation and advices you to enable Global Security
. If you just enable it from Manage Jenkins
page, you are likely to receive a server exception (if already did, read my answer at serverfault). It is because enabling security requires users with permissions. Luckily this is very well explained in its documentation:
As an additional security, you might also consider enabling HTTPS.
Keep in mind that Jenkins will run with its own user and it will look for files like .ssh/*
or .bashrc, .hgrc
in its own home directory /var/jenkins
. You need to make sure that files are placed there with correct permissions.
You are likely to use SSH in your Jenkins items. If that is the case, you need to create known_hosts
file under \var\jenkins\.ssh\
and put your remote hosts' keys under it. It will be useful when connecting to a remote host for the first time.
To do this simply, you can initiate an ssh connection to your remote host in terminal and say yes when it asks to save the host key. After that,
{% highlight bash %} nano ~/.ssh/known_hosts {% endhighlight %}
You will see a line with your remote hosts address prefixed. Copy/paste that line into jenkins user's known_hosts file.
No corrections so far.


|
NAME
PAPI_get_component_info - get information about a specific software component
CONTENTS
Synopsis
Description
Return Values
Errors
Example
Data Structure
Bugs
See Also
SYNOPSIS
C Interface
#include <papi.h>
const PAPI_component_info_t *PAPI_get_component_info(int cidx);
Fortran Interface
<none>
DESCRIPTION
This function returns a pointer to a structure containing detailed information
about a specific software component in the PAPI library. This includes
versioning information, preset and native event information,
and more. For full details, see the structure listing below.
RETURN VALUES
On success, the function returns a valid non-NULL pointer.
On error, a NULL pointer is returned.
ERRORS
EXAMPLE
const PAPI_component_info_t *cmpinfo = NULL;
if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)
exit(1);
if ((cmpinfo = PAPI_get_component_info(0)) == NULL)
exit(1);
printf("This component supports %d Preset Events and %d Native events.0,
cmpinfo->num_preset_events, cmpinfo->num_native_events);
DATA STRUCTURE
The C data structure returned by this function is found in
papi.h and reproduced below:
typedef struct _papi_component_option {
char name[PAPI_MAX_STR_LEN]; /* Name of the component were using, usually CVS RCS Id */
char version[PAPI_MIN_STR_LEN]; /* Version of this component, usually CVS Revision */
char support_version[PAPI_MIN_STR_LEN]; /* Version of the support library */
char kernel_version[PAPI_MIN_STR_LEN]; /* Version of the kernel PMC support driver */
int CmpIdx; /* Index into the vector array for this component; set at init time */
int num_cntrs; /* Number of hardware counters the substrate supports */
int num_mpx_cntrs; /* Number of multiplexed hardware counters the substrate or PAPI support: PAPI_MPX_DEF_DEG */
int num_preset_events; /* Number of preset events the substrate supports */
int num_native_events; /* Number of native events the substrate supports */
int default_domain; /* The default domain when this substrate is used: PAPI_DOM_USER */
int available_domains; /* Available domains; default: .default_domain */
int default_granularity; /* The default granularity when this substrate is used: PAPI_GRN_THR */
int available_granularities; /* Available granularities; default:.default_granularity */
int hardware_intr_sig; /* Signal used by hardware to deliver PMC events: PAPI_SIGNAL */
int opcode_match_width; /* Width of opcode matcher if exists, 0 if not */
int reserved_ints[4];
unsigned int hardware_intr:1; /* hw overflow intr, does not need to be emulated in software*/
unsigned int precise_intr:1; /* Performance interrupts happen precisely */
unsigned int posix1b_timers:1; /* Using POSIX 1b interval timers (timer_create) instead of setitimer */
unsigned int kernel_profile:1; /* Has kernel profiling support (buffered interrupts or sprofil-like) */
unsigned int kernel_multiplex:1; /* In kernel multiplexing */
unsigned int data_address_range:1; /* Supports data address range limiting */
unsigned int instr_address_range:1; /* Supports instruction address range limiting */
unsigned int fast_counter_read:1; /* Supports a user level PMC read instruction */
unsigned int fast_real_timer:1; /* Supports a fast real timer */
unsigned int fast_virtual_timer:1; /* Supports a fast virtual timer */
unsigned int attach:1; /* Supports attach */
unsigned int attach_must_ptrace:1; /* Attach must first ptrace and stop the thread/process*/
unsigned int edge_detect:1; /* Supports edge detection on events */
unsigned int invert:1; /* Supports invert detection on events */
unsigned int profile_ear:1; /* Supports data/instr/tlb miss address sampling */
unsigned int grouped_cntrs:1; /* Underlying hardware uses counter groups */
unsigned int reserved_bits:16;
} PAPI_component_info_t;
BUGS
If called before
PAPI_library_init() the behavior of the routine is undefined.
SEE ALSO
PAPI_library_init (3),
PAPI_get_opt (3),
PAPI_get_dmem_info (3),
PAPI_get_hardware_info (3),
PAPI_get_executable_info (3)
| PAPI Programmers Reference | PAPI_get_component_info (3) | April, 2007 |
|
|


Paths (Project configuration)
All path-related variables can be controller through the project configuration, by updating the appropriate child element of the path
. Each child element is a simple text-only element that defines one distinct path (template); the name of the element corresponds to the name of the system path. The child elements may appear in any order.
Defines the path (templates) to various files and resources.
~/assets
{{assetpath}}/views/
{{assetpath}}/lib/modules/
~/extensions/
{{assetpath}}/configuration/dictionary/{{locale}}.xml
~/Sitemap.config
{{assetpath}}/xslt/default.xslt
{{assetpath}}/configuration/Category.config
_target/
~/_target/
-
AssetPath
Specifies the path to project assets.
default: ~/assets
For a multi-category project, resource path might look like this:
~/assets/{{category}}
-
View
Specifies the template path to controller views.
default: {{assetpath}}/views/
-
Module
Specifies the template path to modules and their resources.
default: {{assetpath}}/lib/modules/
-
Dictionary
Specifies the template path to the phrase dictionaries files.
default: {{assetpath}}/configuration/dictionary/{{locale}}.xml
-
DefaultStylesheet
Specifies the template of the default stylesheet to use in case no other stylesheet has been specified.
default: {{assetpath}}/views/xslt/default.xsl
-
CategoryConfiguration
Specifies the template path to the category configuration path.
default: {{assetpath}}/configuration/Category.config
-
GlobalizedDirectory
Specifies the name of the directory in which the globalized resources will be generated.
default: _target
-
GlobalizedDirectoryForNonFileResorces
Specifies the name of the directory in which the globalized versions of non-file resources will be generated.
default: ~/_target/
-
Extension
Specifies the path in which to look for extension archives.
default: ~/extensions/


DiffiQult¶
DiffiQult is an open source autodifferentiable Quantum Chemistry package, that optimized RHF energies of small molecules with respect of the parameters a given intial the basis function.
It generates energy gradients with automatic differentiation tools.
Getting started with DiffiQult¶
Requirements¶
Numpy
- Algopy
Official releases and installation:
Available at: http://pypi.python.org/pypi/algopy
pip install algopy
Python 2.7 (so far).
Installation¶
From source:
git clone https://github.com/ttamayo/DiffiQult.git
python setup.py install
From pip:
pip install diffiqult
Usage¶
We define the molecular systems by creating an object of the class System_mol
, where we specify the
molecular geometry in atomic units, basis sets and number of electrons, optionally we can
specify a tag. For example:
# Basis set is sto_3G
from diffiqult.Basis import basis_set_3G_STO as basis
# Our molecule H_2
d = -1.64601435
mol = [(1,(0.0,0.0,0.20165898)),(1,(0.0,0.0,d))]
# Number of electrons
ne = 2
system = System_mol(mol, ## Geometry
basis, ## Basis set (if shifted it should have the coordinates too)
ne, ## Number of electrons
shifted=False, ## If the basis is going to be on the atoms coordinates
mol_name='agua') ## Units -> Bohr
The jobs in Diffiqult are managed by an Tasks object. For example, if we want to obtain a file with the results.
For example:
where we define the molecular system to
optimize with system
and output options with verbose
.
The method Tasks.runtask
computes one the following tasks:
| Task | Key | Description |
|---|---|---|
| Single point energies | Energy |
Calculate the RHF energy and update it in an attibute in system |
| Optimization | Opt |
Optimize a given parameter and update the basis set in system |
To calculate the RHF of a molecule we use the option `Energy`
, optionally we can produce a molden file
with the information of the geometry, basis and MO.
manager.runtask('Energy',
max_scf=50, # Maximum number of SCF cycles
printcoef=True, # This will produce a npy file with the molecular coefficients
name='Output.molden', # Name of the output
output=True)
Notes:
- We currently don’t have convergence options for the SCF .
- The molden file also contains an input section that can be used as input for system with the option
shifted
- The geometry and MOs can be vizualized with molden,and the molden file.
To optimize one or many input parameters, we use the option ``Opt ``, it updates the attributes of the molecular system object.
For example:
manager.runtask('Opt',
max_scf=50,
printcoef=False,
argnum=[2], # Optimization of centers
output=True) # We optimized all the steps
where argnum
recieves a list with the parameters to optimize with the following convention:
| Parameter | argnum |
|---|---|
| Widths | 0 |
| Contraction coefficients | 1 |
| Gaussian centers | 2 |
For example, we can optimize the atomic centered basis function with respect of their widths and contraction coefficients in the following way.
manager.runtask('Opt',
max_scf=50,
printcoef=False,
argnum=[0,1], # Optimization of centers
output=True) # We print a molden file of all steps


Stateless Servers
Denver Scala User Group
Chris Buckner
May 5th, 2015
microservice architectural style
- modularlarity in deployment, not just code
- strict use of an interface
- EXAMPLES: HTTP REST // GRPC ETC.
- allowing for different services to be written in different programming languages
stateless servers
- requests can be dispatched to different server nodes with no need for session data sharing
- more scalable - more roubust - simple redundancy
- use of mongo to hold sessions means client will send same amout of data per request as a stateful server
- server only serves the static html // no framework magic
- EXAMPLE: angular will build the client via service calls and hold session header/token/key


It is difficult to pin down the emergence of the first ninja, more properly called shinobi. After all, people around the world have always used spies and assassins.
Japanese folklore states that the ninja descended from a demon that was half man and half crow. However, it seems more likely that the ninja slowly evolved as an opposing force to their upper-class contemporaries, the samurai, in early feudal Japan.


import pandas as pd
# For Series (columns)
def get_total_occurrences_of_numbers_in_column(s):
count = 0
index = 0
size = s.size
d = {}
# print(size)
while index < size:
c = 0
# print(df.nums[index])
while (index < size) and (s[index] < 0): #
c = c + 1
index += 1
if c > 1:
count += 1
if c in d: # {}
d[c] += 1 # {3: 2} => 3 consecutives 2 times...continue with next check
else:
d[c] = 1; # {3: 1} => 3 consectives 1 time...continue with next check
index += 1
return (count, d)
def get_counts(df):
counts = []
indices = []
all_counts = {}
for column in df.columns:
indices.append(column)
count, d = get_total_occurrences_of_numbers_in_column(df[column])
all_counts[column] = d; # {'col1': {2: 3, 4: 2}} => for col1, 2 consecutives 3 times, 4 consecutives 2 times
counts.append(count)
new_df = pd.DataFrame(counts, index=indices, columns=["count"])
return (new_df, all_counts)
# -ve numbers
col1 = [12, 11, -4, -3, -1, 0, -3, -2, 9, -1, 2, -3, 5] # 2 times (13 numbers)
col2 = [-1, -3, -6, -7, 8, -5, -3, 9, 12, 10, -4, -6, -6] # 3 times
col3 = [12, 4, 5, 6, 4, 1, 2, 3, 4, 5, 3, 9, 0] # 0 times
col4 = [-1, 2, -3, 4, 5, -6, 7, -8, 9, -10, 11, -12, 13] # 0 times
col5 = [-12, -3, 4, 3, -5, -6, 0, -4, -5, 6, -6, -7, 0] # 4 times
df3 = pd.DataFrame({'col1': col1, "col2": col2, "col3": col3, "col4": col4, "col5": col5})
df3 # same as MATLAB, add ; at the end to suppress the output
print(df3)
df, all_counts = get_counts(df3)
print(df)
print(all_counts)


@(photo: Photo, maybeUpload:Option[com.cloudinary.response.UploadResponse] = None)(implicit cld:com.cloudinary.Cloudinary) @main("Image Created") {
| Public Id | @upload.public_id |
| Version | @upload.version |
| Height | @upload.height |
| Width | @upload.width |
| Bytes | @upload.bytes |
| Created At | @upload.createdAt |
| Format | @upload.format |
| Metadata | @upload.metadata |
| URL | @upload.url |
| Secure URL | @upload.secure_url |
| Resource Type | @upload.resource_type |
| Faces | @upload.faces |
| Colors | @upload.colors.map{c=> @c.rank } |
| Exif | @upload.exif |
| Predominant | @upload.predominant |
| Signature | @upload.signature |


XXXTentacion
American rapper, singer, and songwriter
Here is a brief overview of the rapper's story,
Jahseh Dwayne Ricardo Onfroy (January 23, 1998 – June 18, 2018), known professionally as XXXTentacion (/ˌɛksˌɛksˌɛksˌtɛntəsˈjɒn/),[3]
was an American rapper, singer, and songwriter. In a career spanning over five years, Onfroy's music has encompassed trap,
hip hop, rap metal, alternative rock, emo, indie and grunge.
Born in Plantation, Florida, Onfroy spent most of his childhood in Lauderhill. He began writing music after being released
from a youth correction center[4] and released his first song on SoundCloud in June 2013, titled "News/Flock".[5] He was
a popular figure in SoundCloud rap, a trap scene that takes elements of lo-fi music and harsh 808s.[6][7][8] Well known
for his "depressing, and at times devastating" music that brought attention to mental health, Onfroy employed styles and
techniques that were unconventional in hip hop during his career, such as distortion and heavy guitar-backed instrumentals
drawing inspiration from third-wave emo.
Onfroy rose to fame with the release of his song "Look at Me". He released his debut album, 17, on August 25, 2017. The album
debuted at No. 2 on the US Billboard 200, selling 86,000 album-equivalent units first week. The album received a positive
response from critics, some of which lauded the album for its personal narratives and diverse musical style.
Onfroy's second album, ?, was released on March 16, 2018. It debuted at number one on the Billboard 200, with its singles
"Sad!" and "Changes" both reaching the top 20 of the Billboard Hot 100. The album was certified Gold by the RIAA on June
26, 2018.
On June 18, 2018, Onfroy died after being gunned down by an armed assailant as he left a motorcycle dealership in Deerfield
Beach, Florida.[9] The attackers fled the scene in an SUV after stealing a bag from Onfroy, and the suspected shooter
was arrested by police in his native Pompano Beach, and charged with the murder.[10] In the week following his murder,
Onfroy's highest-charting single, "Sad!", went from 52nd to 1st on the Billboard Hot 100, making Onfroy the first artist
to top the Hot 100 posthumously in a lead role since The Notorious B.I.G., with "Mo Money Mo Problems", in 1997.
Onfroy left behind what Rolling Stone called "a huge musical footprint" due to his impact on his young fanbase and
his popularity during his career.
"The saddest thing about betrayal is that it never comes from enemies, it comes from those you trust the most."
If you have time, you should read more about this incredible human being on his Wikipedia entry.


The Club
Westview Aerospace is a project-oriented club seeking to provide hands-on opportunities in aerospace. As universities begin to gain access to space with high altitude rockets, propulsion, and CubeSats, high school students are the next step in getting prepared for a future in space. Join the club today!
Current Projects
Click here for detailed information.High Altitiude Student Payload (OreSat1B)
In collaboration with the Portland State Aerospace Society (PSAS) and their OreSat team, Westview Aerospace Club will be working to fly OreSat1B, a test configuration of the 2016 CSLI Proposed OreSat to be launched in Q2 2022. The payload will be collecting valuable data performance of various subsystems. Courtesy to the NASA Balloon Programs Office (BPO) and the Louisiance Space Consortium, OreSat1B will achieve an altitude of ~36km for a flight duration of 15-20 hours! Westview Aerospace serves as the educational outreach component of this mission, allowing high school students to work hands-on with orbital class CubeSats!


This add-in requires Word 2016 or greater
Bello, try enter some csv text into the textbox bellow and click "Find words" to start
Checking words(csv)
Result
Find words
Highlight words
total of:
?
occurrence(s)
Some not important logging
change


Top diplomats of S. Korea, U.S. hold phone talks on GSOMIA, defense cost-sharing
The top diplomats of South Korea and the United States held telephone talks late Thursday and discussed a soon-to-expire military information sharing pact between Seoul and Tokyo and their ongoing defense cost-sharing negotiations, the foreign ministry said.
The phone talks between Foreign Minister Kang Kyung-wha and U.S. Secretary of State Mike Pompeo came just ahead of the planned expiration of the General Security of Military Information Agreement (GSOMIA), set for Saturday.
The allies are also negotiating terms to decide how much Seoul should pay for its share for the cost of stationing 28,500 American troops here, amid Washington’s demand for a hefty rise in the financial contribution. The latest talks in Seoul on the Special Measures Agreement (SMA), a defense cost-sharing accord, were abruptly cut short on Tuesday.
“The two sides agreed to continue close consultations on various issues at every level going forward. They also agreed on the need to meet in person at an early date for in-depth discussions and to work to coordinate the schedule,” the ministry said in a release.
Regarding GSOMIA, the U.S. has strongly called for South Korea to extend the pact, which it regards as a symbolic tool for trilateral security cooperation in Northeast Asia.
Seoul has maintained that there will be no reversal of the decision, as long as Tokyo does not withdraw the economic measures it imposed on its neighbor in apparent retaliation over wartime history issues.


Hello, world!
Message:
Post message to Host
Get value from Host
Change value in Host
postMessage API
post object (doesn't work)
Event


ADDICTED TO LOVE A film review by David N. Butterworth Copyright 1997 David N. Butterworth/The Summer Pennsylvanian
Rating: ** (maltin scale)
Appealing actors alone do not a romantic comedy make. The genre defines a film that is light, charming, and cute. While "Addicted to Love" is certainly all of those things to a degree, and *does* offer the charismatic Meg Ryan and Matthew Broderick, for some reason it's missing that magical spark that puts it in the same league as, say, "When Harry Met Sally..."
When his girlfriend Linda (Kelly Preston) jilts him for a French restarauteur, Sam (Broderick) heads for the big city to try and win her back. Sam, an astronomer by profession, holes up in an abandoned building across the alley from his ex and rigs up an elaborate camera obscura to spy on her. This fantastical device, constructed from bits and pieces from the office, projects fuzzy images of his former lover's comings and goings onto the whitewashed walls of his hideout like a big screen TV. Clearly he made the wrong career choice somewhere down the line; few private investigators get this good a look at their quarry.
When an unwelcome visitor, Maggie (Ryan) drops in on Sam's stakeout, it's soon clear why. This guy Anton (Tcheky Karyo) that Linda is, er, seeing, is Maggie's ex. Et voila! Maggie's contributions to the surveillance operation include a cactus--quirky--and a number of strategically-placed microphones, which pick up every sigh, gasp, and moan from the neighboring love loft.
Sam and Maggie's voyeuristic goals are very different, however. Sam is gathering data in a scientific attempt to chart Linda and Anton's inevitable break-up. For the star-struck Sam, Linda's condition is just a passing phase, like a new moon. Maggie, on the other hand, simply wants to exact revenge.
The contrivances of the script are mostly predictable (letting cockroaches loose in a restaurant, for example), although it is amusing hearing Anton explain to Linda why he smells like expensive perfume, or has lipstick on his collar.  gasps Anton in his defense. Maggie and Sam grimace more than usual during that interpersonal exchange.
At one point the film turns into "Mystery Science Theater 3000," with a tipsy Ryan and Broderick sitting in for the wise-cracking robots, dubbing the muted lines of their rivals with much wit and pathos. Less charming is Maureen Stapleton's character, who shows up for five minutes simply to tell Ryan "your tits look like rocks."
"Love can sometimes be a very difficult thing," begins Linda's 'Dear John' letter to Sam early on in the picture. Watching "Addicted to Love" can be occasionally tedious, but it's not without its moments.
-- David N. Butterworth<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews