@dataknut
)This work is licensed under a Creative Commons Attribution 4.0 International License unless otherwise marked.
If you wish to use any of the material from this report please cite as:
This report is intended to:
See:
This work was supported by:
In this section we load and describe the pre-processed safe data from /Volumes/hum-csafe/Research Projects/GREEN Grid/externalData/flipTheFleet/safe/testData/ftfSafeLatestAll.csv.gz. Note that this data does not contain Latitude/Longitude or the vehicle registration number. This has been replaced by a unique hash code (per vehicle).
ftfSafeDT <- data.table::as.data.table(readr::read_csv(dFile))
## Parsed with column specification:
## cols(
## .default = col_integer(),
## `Date (GPS)` = col_character(),
## Altitude = col_double(),
## `Speed (GPS)` = col_double(),
## `Speed (Speedometer)` = col_double(),
## SOC = col_double(),
## AHr = col_double(),
## `Pack volts` = col_double(),
## `Pack amps` = col_double(),
## `Pack 1 temp (C)` = col_double(),
## `Pack 2 temp (C)` = col_double(),
## `Pack 3 temp (C)` = col_double(),
## `Pack 4 temp (C)` = col_double(),
## `12V battery (amps)` = col_double(),
## Hx = col_double(),
## VIN = col_character(),
## `12V battery (volts)` = col_double(),
## `ACC (V)` = col_double(),
## SOH = col_double(),
## `SOH (version 2)` = col_double(),
## `Charger (amps)` = col_double()
## # ... with 86 more columns
## )
## See spec(...) for full column specifications.
## Warning in rbind(names(probs), probs_f): number of columns of result is not
## a multiple of vector length (arg 1)
## Warning: 11793 parsing failures.
## row # A tibble: 5 x 5 col row col expected actual file expected <int> <chr> <chr> <chr> <chr> actual 1 12490 cabin_t… no trailing c… .6666666… '/Volumes/hum-csafe/Research Pr… file 2 12494 cabin_t… no trailing c… .6666666… '/Volumes/hum-csafe/Research Pr… row 3 12496 cabin_t… no trailing c… .6666666… '/Volumes/hum-csafe/Research Pr… col 4 12499 cabin_t… no trailing c… .2222222… '/Volumes/hum-csafe/Research Pr… expected 5 12501 cabin_t… no trailing c… .2222222… '/Volumes/hum-csafe/Research Pr…
## ... ................. ... .......................................................................... ........ .......................................................................... ...... .......................................................................... .... .......................................................................... ... .......................................................................... ... .......................................................................... ........ ..........................................................................
## See problems(...) for more details.
# re-create rDate & rTime
ftfSafeDT <- ftfSafeDT[, rTime := hms::as.hms(rDateTime)]
ftfSafeDT <- ftfSafeDT[, rDate := lubridate::date(rDateTime)]
# re-create rDow to stop it acting like a factor with alphabetic ordering
ftfSafeDT <- ftfSafeDT[, rDow := lubridate::wday(rDateTime, lab = TRUE)]
That loaded 46,741 observations from 2 vehicles. Table 4.1 summarises the available data for each EV.
| evID | obsStart | obsEnd | nObservations |
|---|---|---|---|
| 44e70b238906b67964c088be78366d2c | 2018-07-12 11:02:49 | 2018-09-08 15:27:48 | 34254 |
| b4ed70fa9b8d2419411908df6d78ee2a | 2018-05-01 12:42:27 | 2018-06-11 09:40:28 | 12487 |
Next we check for NA in dates and other key variables.
| Date (GPS) | Time (GPS) | nObs | meanPackVolts |
|---|---|---|---|
| NA | NA | 17472 | 90.15239 |
| Date (GPS) | Time (GPS) | nObs | meanPackAmps |
|---|---|---|---|
| NA | NA | 17472 | 16.5822 |
It looks like there are NAs in the GPS derived Date & Time variables.
Since we really need to know the date and time, we remove these NAs from the data although they comprise 17472 (37.38 %) observations.
GPS NA means no GPS signal. This could be when the vehicle is charging inside a garage or passes through a tunnel. As we need to know the date & time of charging for all observations, this will need to be fixed.
Check charger related variables. These are:
Pack amps
Pack volts
DM: “To determine charger power the variables ‘Pack volts’ and ‘Pack amps’ give you everything you need (with some extra code to separate out regen, and it is also useful to do some deltas of voltage and SoC over time to deal with noise in the current sensors). Negative pack amps with speed also at zero is charging (speed greater than zero and negative pack amps is regen).”
Multiplying these two will give power in W. Figures 4.1 to 4.3 examine the distribution of amps, volts and the derived W.
Figure 4.1 shows a density plot for pack amps by EV and by whether or not the amps are -ve, +ve or 0. As we can see, positive amps (providing power to the vehicle) has a cluster of readings close to 0 and then a long positive tail. Negative amps (re-charging the battery) appears to have two distinct clusters and a similarly long negative tail. Only one vehicle reports a large number of 0 Amp readings.
| ampFlag | evID | nObs | max | mean | min |
|---|---|---|---|---|---|
| Negative amps | 44e70b238906b67964c088be78366d2c | 14415 | -0.001 | -8.029587 | -125.991 |
| Negative amps | b4ed70fa9b8d2419411908df6d78ee2a | 9522 | -0.001 | -8.377448 | -32.754 |
| Positive amps | 44e70b238906b67964c088be78366d2c | 3524 | 214.546 | 30.152265 | 0.001 |
| Positive amps | b4ed70fa9b8d2419411908df6d78ee2a | 1624 | 32.747 | 10.534372 | 0.002 |
| Zero amps | 44e70b238906b67964c088be78366d2c | 3 | 0.000 | 0.000000 | 0.000 |
| Zero amps | b4ed70fa9b8d2419411908df6d78ee2a | 181 | 0.000 | 0.000000 | 0.000 |
Next we check volts. Again we seperate -ve and +ve values. In this case it appears that we should probably filter out:
| voltFlag | evID | nObs | max | mean | min |
|---|---|---|---|---|---|
| Negative volts | 44e70b238906b67964c088be78366d2c | 8 | 0.000 | 0.0000 | 0.000 |
| Negative volts | b4ed70fa9b8d2419411908df6d78ee2a | 87 | 0.000 | 0.0000 | 0.000 |
| Positive volts | 44e70b238906b67964c088be78366d2c | 17934 | 397.056 | 382.9832 | 340.320 |
| Positive volts | b4ed70fa9b8d2419411908df6d78ee2a | 11240 | 5783.520 | 430.0139 | 269.856 |
Finally (Figure 4.3) shows the distirbution of the derived -ve, zero and +ve power values using the following filters:
| powerFlag | evID | nObs | max | mean | min |
|---|---|---|---|---|---|
| Negative power | 44e70b238906b67964c088be78366d2c | 14411 | -0.396384 | -3077.387 | -49196.687616 |
| Negative power | b4ed70fa9b8d2419411908df6d78ee2a | 9318 | -0.383712 | -3197.947 | -12530.626560 |
| Positive power | 44e70b238906b67964c088be78366d2c | 3520 | 82266.190464 | 11284.541 | 0.396576 |
| Positive power | b4ed70fa9b8d2419411908df6d78ee2a | 1611 | 12831.848640 | 3936.218 | 0.740352 |
| Volt error? | 44e70b238906b67964c088be78366d2c | 8 | NA | NA | NA |
| Volt error? | b4ed70fa9b8d2419411908df6d78ee2a | 280 | NA | NA | NA |
| Zero power | 44e70b238906b67964c088be78366d2c | 3 | 0.000000 | 0.000 | 0.000000 |
| Zero power | b4ed70fa9b8d2419411908df6d78ee2a | 118 | 0.000000 | 0.000 | 0.000000 |
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 288 rows containing non-finite values (stat_bin).
As noted above, battery charging will be occuring when power is negative. This will be from the grid when speed is zero.
Just a simple trend line for each vehicle… Note that the Reg No
has been replaced with a unique hash ID.
We use Speed (Speedometer)
as this has no missing values (unlike Speed (GPS)
) to flag observations which should be electricity grid based as opposed to regenerative charging.
| chargingFlag | minSpeed | meanSpeed | maxSpeed |
|---|---|---|---|
| Vehicle in use (no charging)? | 0.00 | 41.60903 | 111.82 |
| Regenerative? | 2.87 | 51.16671 | 101.97 |
| Grid? | 0.00 | 0.00000 | 0.00 |
| evID | chargingFlag | meankW | sdkW | mediankW |
|---|---|---|---|---|
| 44e70b238906b67964c088be78366d2c | Grid? | -2.786912 | 3.229894 | -2.816239 |
| 44e70b238906b67964c088be78366d2c | Regenerative? | -9.053428 | 8.645677 | -6.050238 |
| 44e70b238906b67964c088be78366d2c | Vehicle in use (no charging)? | NA | NA | NA |
| b4ed70fa9b8d2419411908df6d78ee2a | Grid? | -2.833136 | 1.224567 | -3.179782 |
| b4ed70fa9b8d2419411908df6d78ee2a | Regenerative? | -5.895578 | 3.447599 | -5.543476 |
| b4ed70fa9b8d2419411908df6d78ee2a | Vehicle in use (no charging)? | NA | NA | NA |
Figure ?? shows the expected clustering of grid-based charging in the < 5 kW region.
## Warning: Removed 288 rows containing non-finite values (stat_density).
Figure 7.1 shows mean kW for inferred grid-based charging by time of day over the entire test datset of 97 days from 2018-05-01 to 2018-09-08.
Does this look like what we expect?
## Warning: Removed 268 rows containing missing values (geom_point).
Figure 7.2 reproduces the previous plot but only shows the mean power flow for observations which we think are Grid?
charging and plots them by derived location. This highlights a few observations with apparently large power flows - is this fast charging or instrument error?
Finally, 7.3 shows the mean power flow by time of day and derived location using a tile plot with notional peak electricity demand periods marked. This visually masks rare events such as the large power flows and suggests charging timing patterns that make sense?
Questions to be asked
Analysis completed in 18.74 seconds ( 0.31 minutes) using knitr in RStudio with R version 3.5.1 (2018-07-02) running on x86_64-apple-darwin15.6.0.
R packages used:
Reg No
(Ooms 2018)Session info:
## R version 3.5.1 (2018-07-02)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS High Sierra 10.13.6
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_NZ.UTF-8/en_NZ.UTF-8/en_NZ.UTF-8/C/en_NZ.UTF-8/en_NZ.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] knitr_1.20 evAnalysis_0.1 skimr_1.0.3
## [4] codebook_0.6.3 Hmisc_4.1-1 Formula_1.2-3
## [7] survival_2.42-6 lattice_0.20-35 readr_1.1.1
## [10] lubridate_1.7.4 ggplot2_3.1.0 dplyr_0.7.7
## [13] data.table_1.11.8 dkUtils_<IP_ADDRESS>00
##
## loaded via a namespace (and not attached):
## [1] splines_3.5.1 shiny_1.1.0 assertthat_0.2.0
## [4] highr_0.7 latticeExtra_0.6-28 yaml_2.2.0
## [7] pillar_1.3.0 backports_1.1.2 glue_1.3.0
## [10] digest_0.6.18 RColorBrewer_1.1-2 promises_1.0.1
## [13] checkmate_1.8.5 colorspace_1.3-2 htmltools_0.3.6
## [16] httpuv_1.4.5 Matrix_1.2-14 plyr_1.8.4
## [19] pkgconfig_2.0.2 labelled_1.1.0 haven_1.1.2
## [22] bookdown_0.7 purrr_0.2.5 xtable_1.8-3
## [25] scales_1.0.0 jpeg_0.1-8 later_0.7.5
## [28] htmlTable_1.12 tibble_1.4.2 openssl_1.0.2
## [31] withr_2.1.2 nnet_7.3-12 lazyeval_0.2.1
## [34] cli_1.0.1 magrittr_1.5 crayon_1.3.4
## [37] mime_0.6 evaluate_0.12 fansi_0.4.0
## [40] forcats_0.3.0 foreign_0.8-71 tools_3.5.1
## [43] hms_0.4.2 stringr_1.3.1 munsell_0.5.0
## [46] cluster_2.0.7-1 bindrcpp_0.2.2 compiler_3.5.1
## [49] rlang_<IP_ADDRESS> grid_3.5.1 rstudioapi_0.8
## [52] htmlwidgets_1.3 miniUI_<IP_ADDRESS> base64enc_0.1-3
## [55] labeling_0.3 rmarkdown_1.10 gtable_0.2.0
## [58] reshape2_1.4.3 R6_2.3.0 gridExtra_2.3
## [61] utf8_1.1.4 bindr_0.1.1 rprojroot_1.3-2
## [64] stringi_1.2.4 Rcpp_0.12.19 rpart_4.1-13
## [67] acepack_1.4.1 tidyselect_0.2.5 xfun_0.4
Dowle, M, A Srinivasan, T Short, S Lianoglou with contributions from R Saporta, and E Antonyan. 2015. Data.table: Extension of Data.frame. https://CRAN.R-project.org/package=data.table.
Grolemund, Garrett, and Hadley Wickham. 2011. “Dates and Times Made Easy with lubridate.” Journal of Statistical Software 40 (3): 1–25. http://www.jstatsoft.org/v40/i03/.
Ooms, Jeroen. 2018. Openssl: Toolkit for Encryption, Signatures and Certificates Based on Openssl. https://CRAN.R-project.org/package=openssl.
R Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Wickham, Hadley. 2009. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. http://ggplot2.org.
Wickham, Hadley, Jim Hester, and Romain Francois. 2016. Readr: Read Tabular Data. https://CRAN.R-project.org/package=readr.
Xie, Yihui. 2016. Knitr: A General-Purpose Package for Dynamic Report Generation in R. https://CRAN.R-project.org/package=knitr.


Get inspired by the greenery and gilded details from this timeless fall wedding at the historic Bell Tower.
A timeless wedding ceremony and reception with emerald green details at The Bell Tower.
A romantic micro wedding ceremony and reception at The Bridge Building.
A fall wedding with rich colors, whimsical florals, and serious boho style at The Bell Tower.
A classic winter wedding ceremony and reception at The Bridge Build
A sweet and stylish micro wedding ceremony at the Cannery Ballroom


Create a new job
job_create(jobname = NULL, description = NULL, owner = NULL, status = NULL, priority = NULL, tags = NULL, path = NULL)
| jobname | name of the job to create |
|---|---|
| description | brief description of the job |
| owner | should be a name or a nickname |
| status | should be "active", "inactive", "complete", "abandoned", "masked" |
| priority | numeric |
| tags | a string containing comma separated list of tags |
| path | path to the job home directory |
Invisibly returns a list containing the parameters for the job
The role of the job_create()
function is to create new workbch job.
It can be called in two ways, interactively or programmatically. To call the
function interactively, R must be in interactive mode and the function should
be called with no arguments specified. When called in this fashion the user
will be presented with a sequence of prompts, asking them to specify each
of the parameters that define a job (e.g., a character string for jobname
,
a number for priority
). When used interactively, you do not need to include
quote marks when entering a string: job_create()
will coerce the input to
the appropriate format, and then append the created job to the job file.
When called programmatically, the user must specify the arguments in the
call to job_create()
. The jobname
, description
and
owner
arguments should be character strings of length 1, and all three
are mandatory. The status
for a job should be one of the following
values: "active"
, "inactive"
, "complete"
, "abandoned"
or "masked"
. The priority
for a job should be a positive integer:
the intent is that priority 1 is the highest priority, followed by priority 2,
and so one. The tags
for a job can be specified as a single string, using
|
as a separator character (e.g., tags = "research | statistics"
would create two tags for the job). Finally, the path
should specify the
location of a folder containing the project files.
For non-mandatory arguments, if the user does not specify a value, the
job_create()
function applies the following defaults: priority = 1
,
status = "active"
, tags = character(0)
and path = NA
`.
Note that, although jobs can also be associated with URLs (e.g., link to a
GitHub repository or a document on Overleaf), the job_create()
function
does not (at this time) allow you to specify URLs. These can be added using
job_modify()
.


{% extends "index.html" %} {% block content %}
We are team EventSeeker.
We are four passionate graduate students from School of Information, University of Michigan, Ann Arbor.
Hope you are having fun when exploring our website!
Hi! I'm interested in learning how we can design more equitable user experiences through UX research.
Hi! I'm Ruchi.
I love designing and developing beautiful experiences.
Hey! Je m'appelle Yikai, and I also go by Shile.
I'm a graduate student at Univestisy of Michigan School of Information. Go Blue!
I like fixing things, but I love designing things.
Hi! I'm Mingyue and you can also call me Angie.
I'm a UX researcher, graphic designer as well as a first-year master student studying Human-Computer Interaction in U-M.
With a background in psychology and neuroscience, I'm now looking forward to spur on my UX reserach with various research methods!


"""Implementation of the attention layer for convs2s.
Inspired from https://github.com/tobyyouup/conv_seq2seq"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import tensorflow as tf
import math
from open_seq2seq.parts.convs2s.ffn_wn_layer import FeedFowardNetworkNormalized
[docs]class AttentionLayerNormalized(tf.layers.Layer):
"""Attention layer for convs2s with weight normalization"""
[docs] def __init__(self, in_dim, embed_size, layer_id, add_res, mode):
"""initializes the attention layer.
It uses weight normalization for linear projections
(Salimans & Kingma, 2016) w = g * v/2-norm(v)
Args:
in_dim: int last dimension of the inputs
embed_size: int target embedding size
layer_id: int the id of current convolution layer
add_res: bool whether residual connection should be added or not
mode: str current mode
"""
super(AttentionLayerNormalized, self).__init__()
self.add_res = add_res
with tf.variable_scope("attention_layer_" + str(layer_id)):
# linear projection layer to project the attention input to target space
self.tgt_embed_proj = FeedFowardNetworkNormalized(
in_dim,
embed_size,
dropout=1.0,
var_scope_name="att_linear_mapping_tgt_embed",
mode=mode)
# linear projection layer to project back to the input space
self.out_proj = FeedFowardNetworkNormalized(
embed_size,
in_dim,
dropout=1.0,
var_scope_name="att_linear_mapping_out",
mode=mode)
[docs] def call(self, input, target_embed, encoder_output_a, encoder_output_b,
input_attention_bias):
"""Calculates the attention vectors.
Args:
input: A float32 tensor with shape [batch_size, length, in_dim]
target_embed: A float32 tensor with shape [batch_size, length, in_dim]
containing the target embeddings
encoder_output_a: A float32 tensor with shape [batch_size, length, out_dim]
containing the first encoder outputs, uses as the keys
encoder_output_b: A float32 tensor with shape [batch_size, length, src_emb_dim]
containing the second encoder outputs, uses as the values
input_attention_bias: A float32 tensor with shape [batch_size, length, 1]
containing the bias used to mask the paddings
Returns:
float32 tensor with shape [batch_size, length, out_dim].
"""
h_proj = self.tgt_embed_proj(input)
d_proj = (h_proj + target_embed) * math.sqrt(0.5)
att_score = tf.matmul(d_proj, encoder_output_a, transpose_b=True)
# Masking need to be done in float32. Added to support mixed-precision training.
att_score = tf.cast(x=att_score, dtype=tf.float32)
# mask out the paddings
if input_attention_bias is not None:
att_score = att_score + input_attention_bias
att_score = tf.nn.softmax(att_score)
# Cast back to original type
att_score = tf.cast(x=att_score, dtype=encoder_output_b.dtype)
length = tf.cast(tf.shape(encoder_output_b), encoder_output_b.dtype)
output = tf.matmul(att_score, encoder_output_b) * \
length[1] * tf.cast(tf.sqrt(1.0 / length[1]), dtype=encoder_output_b.dtype)
output = self.out_proj(output)
if self.add_res:
output = (output + input) * math.sqrt(0.5)
return output


{% extends "base.html" %} {% block sitetitle %}License Codes For Resource {{ resource.name }}{% endblock %} {% block main %}
When a patron signs an agreement associated with this resource, they will be assigned a license code if one is unassigned.
{% if license_codes %}No license codes found.
{% endif %} {% include "pagination.html" %}


The homemade pizza dough is produced in-house daily and is another reason why the pizza at P!zza Hut always tastes better.
The Twisty Bread, the signature Wingz and the delicious Double Meal are additional value-for-money options that keep our satisfied customers coming back time after time. When entertaining, a Hawaiian pizza, a Regina pizza, or a Peri Peri Chicken pizza from Pizza Inn is the obvious and perfect option to please crowds of all ages.


openbases.logger package¶
Submodules¶
openbases.logger.message module¶
-
class
openbases.logger.message.
OpenBasesMessage
(MESSAGELEVEL=None)[source]¶ Bases:
object
-
addColor
(level, text)[source]¶ addColor to the prompt (usually prefix) if terminal supports, and specified to do so
-
emit
(level, message, prefix=None, color=None)[source]¶ emit is the main function to print the message optionally with a prefix :param level: the level of the message :param message: the message to print :param prefix: a prefix for the message
-
emitError
(level)[source]¶ determine if a level should print to stderr, includes all levels but INFO and QUIET
-
get_logs
(join_newline=True)[source]¶ ‘get_logs will return the complete history, joined by newline (default) or as is.
-
show_progress
(iteration, total, length=40, min_level=0, prefix=None, carriage_return=True, suffix=None, symbol=None)[source]¶ create a terminal progress bar, default bar shows for verbose+ :param iteration: current iteration (Int) :param total: total iterations (Int) :param length: character length of bar (Int)
-
spinner
= <openbases.logger.spinner.Spinner object>¶
-
table
(rows, col_width=2)[source]¶ table will print a table of entries. If the rows is a dictionary, the keys are interpreted as column names. if not, a numbered list is used.
-
-
openbases.logger.message.
convert2boolean
(arg)[source]¶ convert2boolean is used for environmental variables that must be returned as boolean


Before Change
n_samples = int(n_seconds * fs) + filt_len + 1
else:
n_samples = int(n_seconds * fs)
sig = _create_powerlaw(n_samples, fs, exponent)
if f_range is not None:
After Change
// Compute the number of samples for the simulated time series
n_samples = compute_nsamples(n_seconds, fs)
// Get the number of samples to simulate for the signal
// If signal is to be filtered, with FIR, add extra to compensate for edges
if f_range and filter_kwargs.get("filter_type", None) != "iir":


TGKILL
Section: Linux Programmer's Guide (2)Updated: 2004-March-12
Index Return to Main Contents
NAME
tgkill - Send signal sig to one specific thread, tgidSYNOPSIS
- long sys_tgkill (int tgid, int pid, int sig);
DESCRIPTION
Same as tkill(pid,sig), but only sends the signal if the target thread has its thread group ID tgid. Returns error code ESRCH if tgid does not match, otherwise returns the tkill() result.
RETURN VALUE
tgkill returns 0 on success; otherwise, tgkill returns one of the errors listed in the "Errors" section.
ERRORS
- -EINVAL
- tgkill returns this error if pid or tgid are less than zero. This call is only valid for single tasks.
- -ESRCH
- This error is returned if pid exists but no longer belongs to the target process.
SEE ALSO
tkill(2), kill(2)AUTHOR
Niki Rahimi
Index
This document was created by man2html, using the manual pages.
Time: 05:33:05 GMT, December 24, 2015


| low |
normal |
high |
highest |
| Ticket | Summary | Release Notes | |
|---|---|---|---|
| #1756 | Erroneous release notes in MSL3.2.1+build.3 | Corrected release notes of build 3 in build 4 | |
Component: C-Sources (1 match) |
|||
| Ticket | Summary | Release Notes | |
| #1768 | Wrong combiTimeTable output when using fixed time step integrator with time step greater than table resolution | Modelica Standard Tables: Fixed the event detection of CombiTimeTable when using a fixed time step integrator with a step size greater than the event resolution of the table | |
Component: Electrical.Machines (4 matches) |
|||
| Ticket | Summary | Release Notes | |
| #1753 | StrayLoad documentation has questionable reference to IEEE standard | Fixed documentation of Electrical.Machines | |
| #1754 | Modelica.Electrical.Machines.Utilities.CurrentController typo in documentation | Fixed documentation of Electrical.Machines | |
| #1755 | Modelica.Electrical.Machines.Utilities.VoltageController: typos in doc strings | Fixed documentation of Electrical.Machines | |
| #1783 | Modification of final component in Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine | Fixed modification of final component in PartialBasicInductionMachine and PartialBasicDCMachine | |
Component: Fluid (3 matches) |
|||
| Ticket | Summary | Release Notes | |
| #1758 | Simulation of HeatExchangerSimulation fails | Explained in the release notes of build 4, why Modelica.Fluid is not changed (and pedantic flag should not be activated with Dymola 2016) | |
| #1767 | Fluid min attributes for pressure differences | Added forgotten "min" attribute for pressure difference.. | |
| #1781 | Bad start value in SimpleGenericOrifice | Replaced wrong start value for SimpleGenericOrifice.zeta_nominal with explicit definition | |
Component: Magnetic.FundamentalWave (1 match) |
|||
| Ticket | Summary | Release Notes | |
| #1760 | typo in docstring of SymmetricMultiPhaseWinding | Fixed documentation of Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SymmetricMultiPhaseWinding | |
Component: Media (1 match) |
|||
| Ticket | Summary | Release Notes | |
| #1757 | Non-backwards compatible model movement in MSL3.2.1+build.3 | Added an explanation in the build 4 release notes, why this (minor) non-backwards compatible change was made |


CITIZEN KANE A film review by Steve Rhodes Copyright 1998 Steve Rhodes RATING (0 TO ****): ****
Since CITIZEN KANE mysteriously showed up at our local multiplex -- even the manager had no idea why they booked it, I decided to attempt to forget everything I knew about it and to try to look at it as the first viewers might have back in May of 1941.
Even the greatest films, and CITIZEN KANE is universally considered to be the best or at least one of the best, were once just the latest picture playing at the local Bijou. The audience may have known something of the story ahead of time, but they likely did not expect its greatness.
As everyone now knows, the movie tells the story of one Charles Foster Kane, a boy who inherited an enormous fortune and went on to become a powerful newspaper magnate. Oscar Wells, then a beaming, fairly trim young man, directed CITIZEN KANE, played the starring role and cowrote the script with Herman J. Mankiewicz. Wells was a genius who would go on to other films, but none would ever come close to his masterpiece, CITIZEN KANE.
The film's opening has the look of a creepy old gothic horror movie. The sounds are kept quiet, as if they might awaken some angry god, while we start to learn about Kane's background.
This eerie tranquility is shattered by the blare of a newsreel. Theaters then featured newsreels along with the double feature and the latest installment of some serial. The newsreel in CITIZEN KANE, although slightly comical, gave a documentary feel to the production, what we would call a docudrama today. Since the movie was a slam at the life and times of William Randolph Hearst, a fact the audiences then were likely to have heard, the newsreel approach gave the film an immediate intimacy and accessibility.
Having just weathered the great depression, the viewers were likely to have identified with the film's ridicule of ostentatious wealth. Much is made of John Foster Kane's unfinished palace, Xanadu, a reference to Heart's San Simeon castle. "Cost?" the newsreel reporter asks himself rhetorically. "No man can say," he sonorously answers. Just as the audiences were probably enraged at this waste of money, having recently worked their way back from poverty, they were also quite likely jealous.
A story within the story has a group making a movie about Kane's life. Since it doesn't have a proper ending, they send one guy off to discover the meaning of Kane's last word ("Rosebud"), figuring that it might be the clue to solving the enigma that was his life.
"Rosebud -- dead or alive," is the producer's charge to his assistant. "It'll probably turn out to be a very simple thing." This hinted to the viewers that the film wasn't just some elaborate mystery and that they should not feel cheated if Rosebud turns out not to be very dramatic after all.
Audiences now know the answer to the mystery, but then it must have been intriguing. The story uses Rosebud as a silver thread to weave the story together. The result is a handsome gown indeed. Viewers must have had numerous theories since the movie doesn't give any substantial clues until almost the very end. Once the secret is revealed, it seems at first to be unimportant, almost trivial. Upon closer reflection, the importance that Kane attaches to it is a key to understanding his character or what we today would call the inner child.
The radical cinematography by Gregg Toland must have shocked the audiences then as it mesmerized them with its offbeat angles, dramatic lighting and stark use of shadows and silhouettes.
The seamless editing by Mark Robson and Robert Wise, who would go on to become a great director, moves forward and backward in time without ever losing continuity.
Filled with intriguing layers, the story of Kane's life becomes an onion that the movie keeps peeling.
Kane inherits a fortune that makes him one of the richest men in the world before he is even 21. Once he reaches the age of maturity and gains control of his money, he decides to have some fun with it. Declaring, "I think it would be fun to run a newspaper", he launches into his first career in life.
"If the headline is big enough, it makes the news bigger," Kane says, knowing then the power of the press to make news when before there was just a tiny, inconsequential story. With today's tabloids being so prevalent this would be a line seemingly more tailored to today's viewers.
Kane begins as a loveable rogue but deteriorates into a harsh old scoundrel. The movie shows this transformation with great finesse. The best-staged sequence in the movie may be the breakfast table conversations with his first wife. Within just a few minutes we watch Kane's marriage going from puppy love to bitterness to death as the couple refuses to talk. The sketches form a perfect encapsulation of a marriage on the rocks and an omen for Kane's life.
Kane's second career, politics, will end before it begins when a scandal hits. As a politician, he is an old-fashioned, moneyed liberal who rails about giving the little people a voice. Attractive and articulate, he skyrockets in the polls. But, once the newspapers print that he had an affair, which he honestly admits, he immediately loses the vast majority of his supporters. That is certainly something easier for audiences to understand then as opposed to now.
CITIZEN KANE has so much to recommend it that it is hard to guess how the first audiences must have felt. Maybe they felt as we do today, in awe of having witnessed a masterpiece while realizing how incredibly entertaining it was.
CITIZEN KANE runs 1:59. It is not rated but would be PG for mature themes and would be fine for any kid old enough to care to see it.
Email<EMAIL_ADDRESS>Web: www.InternetReviews.com
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


1. Select a date. Note that a blue date indicates that records are available on this date.
2. Click Search.
3. Select a start time on the timeline. For the timeline, you can zoom in or out.
4. (Optional) Enter a time under Go to and click the icon next to the time. The time will be configured as the start time.
5. Click Play.
—You can drag the timeline to change the start time.
—You can move your cursor to a point on the timeline to show the time accurate to the second of the point.
—If you click a point on the timeline, the time of the point will be displayed in the center.
| / | Start or pause a playback. |
| Stop a playback. | |
| Slow the playback down. Clicking the button will decrease the playback speed to 1/2x and clicking the button again will decrease the speed to 1/4x. | |
| Accelerate the playback. Clicking the button will double the playback speed. The highest speed is 8x. | |
| Play the previous frame. | |
| Play the next frame. | |
| Play the sound. | |
| Draw a square rightwards to digitally zoom in. Draw a square leftwards to return. | |
| Take a snapshot. By default, all the snapshots are saved in C:\IPCWeb\Pic\PlayBack. To change the save path, see Settings--Local. | |
| Clip a recording. Clicking the button will start a clipping and clicking the button again will stop the clipping. By default, all clips are saved in C:\IPCWeb\Video\PlayBackCut. To change the save path, see Settings--Local. | |
| Download a record to your PC. By default, all records are saved in C:\IPCWeb\RecPlayback. To change the save path, see Settings--Local. | |
| / | Zoom in or out the timeline. |
| Play back a record in full screen mode. Press Esc or double-click the playback window to return. |


Here at GeneTree our mission is to help healthcare professionals diagnose rare genetic disorders. Our solution is generating family trees. Family trees are useful for this because they allow analysts to use family medical history effectively. Family trees are also useful for learning your family history or finding long lost relatives.


-
Web Development Basic
All you need to know is these basic skills and knowledge in Web
-
How Browser Works?
What does the browser do to show the page?
-
Progressive Web App
Making the web more appy
-
Performance Pizza
Page Insights, Lighthouse as toppings on the top of pizza


BTS Lookalike AI Test is built with Teachable Machine that is invented by Google.
The test is fairly accurate. You can check it by uploading BTS members' images to check if it returns the expected result.
To get the best result, upload an image with one face and without covering your face.
If you have any questions, please send me a direct message through Instagram below.
Thank you for using BTS Lookalike.


https://www.owasp.org/index.php/OWASP_Juice_Shop_Project
Presentation by Björn Kimminich / @bkimminich
Chapter One
...is an intentionally insecure webapp written in Node.js, Express and AngularJS. It contains 61+ hacking challenges of varying difficulty tracked on a score board.
Translating "dump" or "useless outfit" into German yields "Saftladen" which can be reverse-translated word by word into "juice shop". Hence the project name.
That the initials "JS" match with those of "JavaScript" was purely coincidental!
Javascript all the way from UI to REST API
...is a commandline tool written in Node.js and published on NPM.js. It helps you to set up and host CTF events on the CTFd platform with the Juice Shop challenges.
Your CTFd instance will be ready-to-hack in <5min
Chapter Two
An empty or lackluster front-page radiates the impression that nobody takes serious care of the project.
Open issues pile up in the ticketing system, most of them unanswered and unattended.
Pull Requests are routinely ignored or flogged to death.
https://github.com/bkimminich/juice-shop/blob/master/CONTRIBUTING.md
The Semantic Versioning syntax (MAJOR.MINOR.PATCH
) is used while its semantics are not adhered to.
Not even the original author thinks that the project is mature enough to release a 1.x version from it.
z85-cli
😜Chapter Three
The master
branch stores the official release history, while development happens on the develop
branch.
'use strict'
var path = require('path')
var utils = require('../lib/utils')
var challenges = require('../data/datacache').challenges
exports = module.exports = function servePremiumContent () {
return function (req, res) {
if (utils.notSolved(challenges.premiumPaywallChallenge)) {
utils.solve(challenges.premiumPaywallChallenge)
}
res.sendFile(path.resolve(__dirname, '../app/private/under-construction.gif'))
}
}
fs.copy('app/index.template.html', 'app/index.html', {overwrite: true}, function () {
if (config.get('application.logo')) {
var logo = config.get('application.logo')
if (utils.startsWith(logo, 'http')) {
var logoPath = logo
logo = decodeURIComponent(logo.substring(logo.lastIndexOf('/') + 1))
utils.downloadToFile(logoPath, 'app/public/images/' + logo)
}
var logoImageTag = ''
replace({ regex: //, replacement: logoImageTag, paths: ['app/index.html'], recursive: false, silent: true })
}
if (config.get('application.theme')) {
var themeCss = 'bower_components/bootswatch/' + config.get('application.theme') + '/bootstrap.min.css'
replace({ regex: /bower_components\/bootswatch\/.*\/bootstrap\.min\.css/, replacement: themeCss, paths: ['app/index.html'], recursive: false, silent: true })
}
})
...it's still Javascript at the end of the day! 🤐
it('should hold anonymous placeholder for email if current user is not logged in',
inject(function () {
$httpBackend.whenGET('/rest/user/whoami').respond(200, {user: {}})
$httpBackend.flush()
expect(scope.userEmail).toBe('anonymous')
})
)
frisby.create('GET password change without passing any passwords')
.get(REST_URL + '/user/change-password')
.expectStatus(401)
.expectBodyContains('Password cannot be empty')
.toss()
No-idea-why-this-💩-happens-snippet-injection Vulnerability: Did anyone notice how above code was totally butchered by highlight.js
beginning at the opening single quote in line 1?
describe('challenge "loginAdmin"', function () {
it('should log in Admin with SQLI attack on email field using "\' or 1=1--"', function () {
email.sendKeys('\' or 1=1--')
password.sendKeys('a')
loginButton.click()
expect(browser.getLocationAbsUrl()).toMatch(/\/search/)
})
protractor.expect.challengeSolved({challenge: 'Login Admin'})
})
protractor.expect = {
challengeSolved: function (context) {
describe('(shared)', function () {
beforeEach(function () {
browser.get('/#/score-board')
})
it("challenge '" + context.challenge + "' should be solved on score board", function () {
expect(element(by.id(context.challenge + '.solved')).getAttribute('class')).not.toMatch('ng-hide')
expect(element(by.id(context.challenge + '.notSolved')).getAttribute('class')).toMatch('ng-hide')
})
})
}
}
Having all tests pass after a commit means, it's safe to merge PRs or publish a new release!
| Juice Shop | CTF Extension |
|---|---|
Reality check: Do your tests actually test stuff?
Chapter undefined
Chapter 3 (continued)
And now for the most important metric of all...
The number of team members that would have to leave the project to effectively kill it.
Meaning: If the whole team leaves, a new developer can take over and would be able to maintain & continue working on the project!
Chapter 4.1
The front-page is overcrowded with (mostly useless) information and status badges.
✔✔❌✔❌✔. With no code changes in between.
I wonder how our Live Release is doing...
Some services might be free of charge for OSS projects but come with some other hidden costs or annoyance.
Not giving enough credit to contributors.
git commit
s are not everything!Chapter NaN
Created with reveal.js - The HTML Presentation Framework


 Claude Bosi gives it the Michelin star treatment.
For the chicken, bring the stock to the boil in a large pan. Add the chicken and make sure it is well covered with the stock. Simmer to poach until cooked through, this should take about 50 minutes to 1 hour.
For the tamarind paste, melt the palm sugar with the soy sauce in a pan. Add the tamarind, coriander seeds, and shallots to different pan. Once the palm sugar has melted add it to the shallot pan. Cook on a low heat for around 6 hours until thick and reduced in volume. Add the rice vinegar. Cook for a further 20 minutes then leave to cool.
Add the cockles and 300ml/10fl oz water to a large lidded pan. Cover and steam the cockles until they have opened. Drain the cockles reserving the cooking liquor. Discard any cockles that have not opened. Pass the cooking liquor through a fine sieve and set aside. Remove the cockle meat from the shells, cool over iced water and set aside.
For the vegetables, add the butter and stock to a large pan and mix well. Add the turnips and cook until tender.
For the shallots, add the shallots, butter, sugar, thyme and chicken stock to a large pan and cook over a low heat until the shallots are caramelised. This will take about 25 minutes.
For the sauce, place the chicken wings in a large roasting tray with the olive oil and cook over a high heat for 2-4 minutes until golden-brown.
Add the cockle meat, shallots, thyme and black peppercorns to the chicken wings.
When the shallots have caramelised, add the butter and reserved cockle cooking liquor and scrape the pan to de-glaze. When the sauce is reduced to a syrup, add the brown chicken stock and cook for 20 minutes. Pass through a chinois (fine sieve), return to the pan and cook until the volume of liquid has reduced by half.
Just before serving, portion the chicken and fry it in a little butter.
To serve, place the chicken on a large plate along with the tamarind paste, shallots and sauce. Garnish with the turnip tops and oyster leaves. Drizzle with the coriander infused oil.


after change it wil be dispatched
copy a envModel and create the Hjson file in the envFolder
return available names from the hjson files
Array
load all available hjson file from the envFolder and preload the collection
Observable
if match the name in the collection
the name: "" from your hjson file
EnvModel
load all hjson file with content and add it to the collection
Observable
overwrite a existing env file with attributes
Generated using TypeDoc
EnvCollection the collection Helper Class for the environments


public interface MobileSso
Top-level interface for the Mobile SSO SDK.
UseMobileSsoFactory
to obtain an implementation of this.| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(MASAuthCredentials credentials,
MAGResultReceiver<org.json.JSONObject> resultReceiver)
Authenticates a user with a MASAuthCredentials object.
|
void |
authorize(java.lang.String url,
android.os.ResultReceiver resultReceiver)
Performs a remote authorization with the provider URL.
|
void |
cancelAllRequests(android.os.Bundle data)
Cancels all requests.
|
void |
cancelRequest(long requestId,
android.os.Bundle data)
Cancels the specified request ID.
|
void |
destroyAllPersistentTokens()
Clear all tokens in the shared token store.
|
AuthenticationProvider |
getAuthenticationProvider()
Retrieves the Authentication Providers from the server.
|
boolean |
isDeviceRegistered()
Checks if the device has already been registered.
|
boolean |
isLogin()
Check if the user has already been logged in.
|
void |
processPendingRequests()
Requests that any pending queued requests be processed.
|
long |
processRequest(MASRequest request,
android.os.ResultReceiver resultReceiver)
Submit a API request to be processed asynchronously.
|
void |
removeDeviceRegistration()
Remove this device registration from the server.
|
long processRequest(MASRequest request, android.os.ResultReceiver resultReceiver)
request
- the request to send. Required.resultReceiver
- the resultReceiver to notify when a response is available, or if there is an error. Required.
The result code is defined under MssoIntents
RESULT_CODE_*,
To retrieve the error message from the returned Bundle with key
MssoIntents.RESULT_ERROR_MESSAGE
.
A helper class MAGResultReceiver
defined a standard interface to capture the result
of the API request.
cancelRequest(long, Bundle)
}void authenticate(MASAuthCredentials credentials, MAGResultReceiver<org.json.JSONObject> resultReceiver)
Authenticates a user with a MASAuthCredentials object.
The response to the request will eventually be delivered to the specified result receiver.
This method returns immediately to the calling thread
credentials
- the credentials to authenticate withresultReceiver
- the resultReceiver to notify when a response is available, or if there is an error. Required.void processPendingRequests()
Requests that any pending queued requests be processed.
This can be called from an activity's onResume() method to ensure that any pending requests waiting for an initial unlock code on the device get a chance to continue.
This method returns immediately to the calling thread.
An activity may be started if a device lock code (still) needs to be configured or if the user must be prompted for a username and password.
void cancelRequest(long requestId, android.os.Bundle data)
requestId
- the request ID to cancel.data
- the data to the cancelled request MAGResultReceiver.onRequestCancelled(Bundle)
void cancelAllRequests(android.os.Bundle data)
data
- the data to the all the cancelled request MAGResultReceiver.onRequestCancelled(Bundle)
void destroyAllPersistentTokens()
Clear all tokens in the shared token store.
NOTE: You should not normally use this method. This method destroys the client private key, effectively un-registering the device, and should only be used for testing or recovery purposes.If you just wish to log out the current SSO user see the #logout
method instead.
void removeDeviceRegistration()
Remove this device registration from the server. The token server will identify the device making the request by its TLS client certificate.
This does not affect the local cached access token, cached username and password, or the shared token storage in any way. The client will continue to attempt to present its TLS client certificate on future calls to the token server or a web API endpoint.
To destroy the client-side record of the device registration, calldestroyAllPersistentTokens()
.
The communication with the token server will occur on the current thread. As this may take some time, callers running on the UI thread should consider running this method within an AsyncTask.
MssoException
- if there is an error while attempting to tell the token server to unregister this device.boolean isLogin()
boolean isDeviceRegistered()
void authorize(java.lang.String url, android.os.ResultReceiver resultReceiver)
url
- The temporary URL to enable the remote session.resultReceiver
- the resultReceiver to notify when a response is available, or if there is an error. Required.AuthenticationProvider getAuthenticationProvider() throws java.lang.Exception
java.lang.Exception


JavScript is essential to the functionality of this site, so it cannot work with JavaScript disabled.
Enter URL Data
This is useful to generate Ad & Analytics tracking URLs
Website URL
Campaign Source
Campaign Medium
Campaign Name
Options
Campaign Term (keyword)
Campaign Content
Describes the element a user would click on
Generate
Clear


This is a twelve column section in a row. Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.
Six columns
Six columns
Four columns
Four columns
Four columns
A list of items in which the order does not explicitly matter.


Example Name
222 Market Street, Suite 500
San Francisco, CA 94103
(123) 456-7890
word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance.


So you want to write an R client for a web API? This document walks through the key issues involved in writing API wrappers in R. If you’re new to working with web APIs, you may want to start by reading “An introduction to APIs” by zapier.
APIs vary widely. Before starting to code, it is important to understand how the API you are working with handles important issues so that you can implement a complete and coherent R client for the API.
The key features of any API are the structure of the requests and the structure of the responses. An HTTP request consists of the following parts:
GET
, POST
, DELETE
, etc.)?foo=bar
)An API package needs to be able to generate these components in order to perform the desired API call, which will typically involve some sort of authentication.
For example, to request that the GitHub API provides a list of all issues for the httr repo, we send an HTTP request that looks like:
-> GET /repos/hadley/httr HTTP/1.1
-> Host: api.github.com
-> Accept: application/vnd.github.v3+json
Here we’re using a GET
request to the host api.github.com
. The url is /repos/hadley/httr
, and we send an accept header that tells GitHub what sort of data we want.
In response to this request, the API will return an HTTP response that includes:
An API client needs to parse these responses, turning API errors into R errors, and return a useful object to the end user. For the previous HTTP request, GitHub returns:
<- HTTP/1.1 200 OK
<- Server: GitHub.com
<- Content-Type: application/json; charset=utf-8
<- X-RateLimit-Limit: 5000
<- X-RateLimit-Remaining: 4998
<- X-RateLimit-Reset:<PHONE_NUMBER>
<-
<- {
<- "id": 2756403,
<- "name": "httr",
<- "full_name": "hadley/httr",
<- "owner": {
<- "login": "hadley",
<- "id": 4196,
<- "avatar_url": "https://avatars.githubusercontent.com/u/4196?v=3",
<- ...
<- },
<- "private": false,
<- "html_url": "https://github.com/hadley/httr",
<- "description": "httr: a friendly http package for R",
<- "fork": false,
<- "url": "https://api.github.com/repos/hadley/httr",
<- ...
<- "network_count": 1368,
<- "subscribers_count": 64
<- }
Designing a good API client requires identifying how each of these API features is used to compose a request and what type of response is expected for each. It’s best practice to insulate the end user from how the API works so they only need to understand how to use an R function, not the details of how APIs work. It’s your job to suffer so that others don’t have to!
First, find a simple API endpoint that doesn’t require authentication: this lets you get the basics working before tackling the complexities of authentication. For this example, we’ll use the list of httr issues which requires sending a GET request to repos/hadley/httr
:
library(httr)
github_api <- function(path) {
url <- modify_url("https://api.github.com", path = path)
GET(url)
}
resp <- github_api("/repos/hadley/httr")
resp
#> Response [https://api.github.com/repositories/2756403]
#> Date: 2018-12-06 20:11
#> Status: 200
#> Content-Type: application/json; charset=utf-8
#> Size: 6.02 kB
#> {
#> "id": 2756403,
#> "node_id": "MDEwOlJlcG9zaXRvcnkyNzU2NDAz",
#> "name": "httr",
#> "full_name": "r-lib/httr",
#> "private": false,
#> "owner": {
#> "login": "r-lib",
#> "id": 22618716,
#> "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyNjE4NzE2",
#> ...
Next, you need to take the response returned by the API and turn it into a useful object. Any API will return an HTTP response that consists of headers and a body. While the response can come in multiple forms (see above), two of the most common structured formats are XML and JSON.
Note that while most APIs will return only one or the other, some, like the colour lovers API, allow you to choose which one with a url parameter:
GET("http://www.colourlovers.com/api/color/6B4106?format=xml")
#> Response [http://www.colourlovers.com/api/color/6B4106?format=xml]
#> Date: 2018-12-06 20:11
#> Status: 200
#> Content-Type: text/xml; charset=utf-8
#> Size: 1.79 kB
#> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
#> <colors numResults="1" totalResults="9958773">
#> <color>
#> <id>903893</id>
#> <title><![CDATA[wet dirt]]></title>
#> <userName><![CDATA[jessicabrown]]></userName>
#> <numViews>526</numViews>
#> <numVotes>1</numVotes>
#> <numComments>0</numComments>
#> <numHearts>0</numHearts>
#> ...
GET("http://www.colourlovers.com/api/color/6B4106?format=json")
#> Response [http://www.colourlovers.com/api/color/6B4106?format=json]
#> Date: 2018-12-06 20:11
#> Status: 200
#> Content-Type: application/json; charset=utf-8
#> Size: 1.43 kB
Others use content negotiation to determine what sort of data to send back. If the API you’re wrapping does this, then you’ll need to include one of accept_json()
and accept_xml()
in your request.
If you have a choice, choose json: it’s usually much easier to work with than xml.
Most APIs will return most or all useful information in the response body, which can be accessed using content()
. To determine what type of information is returned, you can use http_type()
I recommend checking that the type is as you expect in your helper function. This will ensure that you get a clear error message if the API changes:
github_api <- function(path) {
url <- modify_url("https://api.github.com", path = path)
resp <- GET(url)
if (http_type(resp) != "application/json") {
stop("API did not return json", call. = FALSE)
}
resp
}
NB: some poorly written APIs will say the content is type A, but it will actually be type B. In this case you should complain to the API authors, and until they fix the problem, simply drop the check for content type.
Next we need to parse the output into an R object. httr provides some default parsers with content(..., as = "auto")
but I don’t recommend using them inside a package. Instead it’s better to explicitly parse it yourself:
jsonlite
package.xml2
package.Rather than simply returning the response as a list, I think it’s a good practice to make a simple S3 object. That way you can return the response and parsed object, and provide a nice print method. This will make debugging later on much much much more pleasant.
github_api <- function(path) {
url <- modify_url("https://api.github.com", path = path)
resp <- GET(url)
if (http_type(resp) != "application/json") {
stop("API did not return json", call. = FALSE)
}
parsed <- jsonlite::fromJSON(content(resp, "text"), simplifyVector = FALSE)
structure(
list(
content = parsed,
path = path,
response = resp
),
class = "github_api"
)
}
print.github_api <- function(x, ...) {
cat("<GitHub ", x$path, ">\n", sep = "")
str(x$content)
invisible(x)
}
github_api("/users/hadley")
#> <GitHub /users/hadley>
#> List of 31
#> $ login : chr "hadley"
#> $ id : int 4196
#> $ node_id : chr "MDQ6VXNlcjQxOTY="
#> $ avatar_url : chr "https://avatars3.githubusercontent.com/u/4196?v=4"
#> $ gravatar_id : chr ""
#> $ url : chr "https://api.github.com/users/hadley"
#> $ html_url : chr "https://github.com/hadley"
#> $ followers_url : chr "https://api.github.com/users/hadley/followers"
#> $ following_url : chr "https://api.github.com/users/hadley/following{/other_user}"
#> $ gists_url : chr "https://api.github.com/users/hadley/gists{/gist_id}"
#> $ starred_url : chr "https://api.github.com/users/hadley/starred{/owner}{/repo}"
#> $ subscriptions_url : chr "https://api.github.com/users/hadley/subscriptions"
#> $ organizations_url : chr "https://api.github.com/users/hadley/orgs"
#> $ repos_url : chr "https://api.github.com/users/hadley/repos"
#> $ events_url : chr "https://api.github.com/users/hadley/events{/privacy}"
#> $ received_events_url: chr "https://api.github.com/users/hadley/received_events"
#> $ type : chr "User"
#> $ site_admin : logi FALSE
#> $ name : chr "Hadley Wickham"
#> $ company : chr "@rstudio "
#> $ blog : chr "http://hadley.nz"
#> $ location : chr "Houston, TX"
#> $ email : NULL
#> $ hireable : NULL
#> $ bio : chr "Chief Scientist at @RStudio"
#> $ public_repos : int 215
#> $ public_gists : int 166
#> $ followers : int 14654
#> $ following : int 6
#> $ created_at : chr "2008-04-01T14:47:36Z"
#> $ updated_at : chr "2018-12-04T15:10:43Z"
The API might return invalid data, but this should be rare, so you can just rely on the parser to provide a useful error message.
Next, you need to make sure that your API wrapper throws an error if the request failed. Using a web API introduces additional possible points of failure into R code aside from those occurring in R itself. These include:
You need to make sure these are all converted into regular R errors. You can figure out if there’s a problem with http_error()
, which checks the HTTP status code. Status codes in the 400 range usually mean that you’ve done something wrong. Status codes in the 500 range typically mean that something has gone wrong on the server side.
Often the API will provide information about the error in the body of the response: you should use this where available. If the API returns special errors for common problems, you might want to provide more detail in the error. For example, if you run out of requests and are rate limited you might want to tell the user how long to wait until they can make the next request (or even automatically wait that long!).
github_api <- function(path) {
url <- modify_url("https://api.github.com", path = path)
resp <- GET(url)
if (http_type(resp) != "application/json") {
stop("API did not return json", call. = FALSE)
}
parsed <- jsonlite::fromJSON(content(resp, "text"), simplifyVector = FALSE)
if (http_error(resp)) {
stop(
sprintf(
"GitHub API request failed [%s]\n%s\n<%s>",
status_code(resp),
parsed$message,
parsed$documentation_url
),
call. = FALSE
)
}
structure(
list(
content = parsed,
path = path,
response = resp
),
class = "github_api"
)
}
github_api("/user/hadley")
#> Error: GitHub API request failed [404]
#> Not Found
#> <https://developer.github.com/v3/users/#get-a-single-user>
Some poorly written APIs will return different types of response based on whether or not the request succeeded or failed. If your API does this you’ll need to make your request function check the
status_code()
before parsing the response.
For many APIs, the common approach is to retry API calls that return something in the 500 range. However, when doing this, it’s extremely important to make sure to do this with some form of exponential backoff: if something’s wrong on the server-side, hammering the server with retries may make things worse, and may lead to you exhausting quota (or hitting other sorts of rate limits). A common policy is to retry up to 5 times, starting at 1s, and each time doubling and adding a small amount of jitter (plus or minus up to, say, 5% of the current wait time).
While we’re in this function, there’s one important header that you should set for every API wrapper: the user agent. The user agent is a string used to identify the client. This is most useful for the API owner as it allows them to see who is using the API. It’s also useful for you if you have a contact on the inside as it often makes it easier for them to pull your requests from their logs and see what’s going wrong. If you’re hitting a commercial API, this also makes it easier for internal R advocates to see how many people are using their API via R and hopefully assign more resources.
A good default for an R API package wrapper is to make it the URL to your GitHub repo:
ua <- user_agent("http://github.com/hadley/httr")
ua
#> <request>
#> Options:
#> * useragent: http://github.com/hadley/httr
github_api <- function(path) {
url <- modify_url("https://api.github.com", path = path)
resp <- GET(url, ua)
if (http_type(resp) != "application/json") {
stop("API did not return json", call. = FALSE)
}
parsed <- jsonlite::fromJSON(content(resp, "text"), simplifyVector = FALSE)
if (status_code(resp) != 200) {
stop(
sprintf(
"GitHub API request failed [%s]\n%s\n<%s>",
status_code(resp),
parsed$message,
parsed$documentation_url
),
call. = FALSE
)
}
structure(
list(
content = parsed,
path = path,
response = resp
),
class = "github_api"
)
}
Most APIs work by executing an HTTP method on a specified URL with some additional parameters. These parameters can be specified in a number of ways, including in the URL path, in URL query arguments, in HTTP headers, and in the request body itself. These parameters can be controlled using httr functions:
modify_url()
query
argument to GET()
, POST()
, etc.add_headers()
body
argument to GET()
, POST()
, etc.RESTful APIs also use the HTTP verb to communicate arguments (e.g., GET
retrieves a file, POST
adds a file, DELETE
removes a file, etc.). We can use the helpful httpbin service to show how to send arguments in each of these ways.
# modify_url
POST(modify_url("https://httpbin.org", path = "/post"))
# query arguments
POST("http://httpbin.org/post", query = list(foo = "bar"))
# headers
POST("http://httpbin.org/post", add_headers(foo = "bar"))
# body
## as form
POST("http://httpbin.org/post", body = list(foo = "bar"), encode = "form")
## as json
POST("http://httpbin.org/post", body = list(foo = "bar"), encode = "json")
Many APIs will use just one of these forms of argument passing, but others will use multiple of them in combination. Best practice is to insulate the user from how and where the various arguments are used by the API and instead simply expose relevant arguments via R function arguments, some of which might be used in the URL, in the headers, in the body, etc.
If a parameter has a small fixed set of possible values that are allowed by the API, you can use list them in the default arguments and then use match.arg()
to ensure that the caller only supplies one of those values. (This also allows the user to supply the short unique prefixes.)
It is good practice to explicitly set default values for arguments that are not required to NULL
. If there is a default value, it should be the first one listed in the vector of allowed arguments.
Many APIs can be called without any authentication (just as if you called them in a web browser). However, others require authentication to perform particular requests or to avoid rate limits and other limitations. The most common forms of authentication are OAuth and HTTP basic authentication:
“Basic” authentication: This requires a username and password (or sometimes just a username). This is passed as part of the HTTP request. In httr, you can do: GET("http://httpbin.org", authenticate("username", "password"))
Basic authentication with an API key: An alternative provided by many APIs is an API “key” or “token” which is passed as part of the request. It is better than a username/password combination because it can be regenerated independent of the username and password.
This API key can be specified in a number of different ways: in a URL query argument, in an HTTP header such as the Authorization
header, or in an argument inside the request body.
OAuth: OAuth is a protocol for generating a user- or session-specific authentication token to use in subsequent requests. (An early standard, OAuth 1.0, is not terribly common any more. See oauth1.0_token()
for details.) The current OAuth 2.0 standard is very common in modern web apps. It involves a round trip between the client and server to establish if the API client has the authority to access the data. See oauth2.0_token()
. It’s ok to publish the app ID and app “secret” - these are not actually important for security of user data.
Some APIs describe their authentication processes inaccurately, so care needs to be taken to understand the true authentication mechanism regardless of the label used in the API docs.
It is possible to specify the key(s) or token(s) required for basic or OAuth authentication in a number of different ways. You may also need some way to preserve user credentials between function calls so that end users do not need to specify them each time. A good start is to use an environment variable. Here is an example of how to write a function that checks for the presence of a GitHub personal access token and errors otherwise:
One particularly frustrating aspect of many APIs is dealing with paginated responses. This is common in APIs that offer search functionality and have the potential to return a very large number of responses. Responses might be paginated because there is a large number of response elements or because elements are updated frequently. Often they will be sorted by an explicit or implicit argument specified in the request.
When a response is paginated, the API response will typically respond with a header or value specified in the body that contains one of the following:
These values can then be used to make further requests. This will either involve specifying a specific page of responses or specifying a “next page token” that returns the next page of results. How to deal with pagination is a difficult question and a client could implement any of the following:
The choice of which to use depends on your needs and goals and the rate limits of the API.
Many APIs are rate limited, which means that you can only send a certain number of requests per hour. Often if your request is rate limited, the error message will tell you how long you should wait before performing another request. You might want to expose this to the user, or even include a call to Sys.sleep()
that waits long enough.
For example, we could implement a rate_limit()
function that tells you how many calls against the github API are available to you.
rate_limit <- function() {
github_api("/rate_limit")
}
rate_limit()
#> <GitHub /rate_limit>
#> List of 2
#> $ resources:List of 3
#> ..$ core :List of 3
#> .. ..$ limit : int 60
#> .. ..$ remaining: int 52
#> .. ..$ reset : int<PHONE_NUMBER>
#> ..$ search :List of 3
#> .. ..$ limit : int 10
#> .. ..$ remaining: int 10
#> .. ..$ reset : int<PHONE_NUMBER>
#> ..$ graphql:List of 3
#> .. ..$ limit : int 0
#> .. ..$ remaining: int 0
#> .. ..$ reset : int<PHONE_NUMBER>
#> $ rate :List of 3
#> ..$ limit : int 60
#> ..$ remaining: int 52
#> ..$ reset : int<PHONE_NUMBER>
After getting the first version working, you’ll often want to polish the output to be more user friendly. For this example, we can parse the unix timestamps into more useful date types.


Setting input file¶
Here we provide an explanation of the various input parameters that can be edited for a typical STREAmS run.
All the parameters are reported in a single file, named singleideal.ini, organized in different sections and using
the classical .ini format. Some ready-to-use input examples are provided in the folder examples
.
File structure of singleideal.ini¶
[grid]¶
This section allows the user to specify parameters to define the computational domain and its discretization. When the grid is directly generated in STREAmS, nodes in the x and z directions are always equally spaced.
domain_size_x
=> real, domain size in x directiondomain_size_y
=> real, domain size in y directiondomain_size_z
=> real, domain size in z directionnxmax
=> integer, total number of grid nodes in x direction (must be multiple of x_split)nymax
=> integer, total number of grid nodes in y directionnzmax
=> integer, total number of grid nodes in z direction (must be multiple of z_split)ng
=> integer, total number of ghost nodes (must be >= max(ep_order
,visc_order
)/2)metrics_order
=> integer, order of accuracy for metrics computation (suggested value: 2*ng
)grid_type
=> integer, specifiy mesh type1 => Read grid from files
2 => Uniform grid
3 => Channel type grid
4 => Boundary layer type grid
5 => Shock wave boundary layer interaction type grid
dyptarget
=> real, active forgrid_type = 3,4,5
, y spacing at the wall in wall-unitsjbgrid
=> integer, active forgrid_type = 3,4,5
, used to control transition from the inner and outer layer resolution (suggested values: 16,24,32)nywr
=> integer, active forgrid_type = 4,5
, number of nodes in the well-resolved region between the wall (y=0) and y =lywr
lywr
=> real, active forgrid_type = 4,5
, size of the well-resolved region
Notes:
A non-uniform distribution of nodes is needed in the wall-normal direction (y) for the simulation of wall-bounded flows. In this case, STREAmS adopts the “natural” grid stretching proposed in [5], hereinafter denoted as Pirozzoli mapping function. Depending on the particular flow case under investigation, the following strategies are followed:
channel flow => Pirozzoli mapping function applied to distribute nodes between the two walls (located at \(y = \pm 1\)). To avoid odd behavior in the node distribution, the user shold use a total number of nodes in the wall-normal direction (
nymax
) close to \(N_y = \frac{8}{3} \, Re_{\tau}^{3/4}\)boundary layer and shock boundary layer interaction => Pirozzoli mapping function applied to distribute nodes in the well-resolved region, between y = 0 (lower wall) and
y = lywr
, discretized withnywr
nodes. To avoid odd behavior in the node distribution, the user should use a number of nodes in the well-resolved region (nywr
) close to \({N_y}_{wr} = \frac{4}{3} \, \left (Re_{\tau} \, {L_y}_{wr}\right)^{3/4}\). The remaining part of the computational domain (from y =lywr
up to y =domain_size_y
) is discretized usingnymax - nywr
grid nodes, distributed according to a geometric progression.
When grid_type = 1
, the grid is generated in pre-processing, and so the user must provide the code with 3 ASCII files named x.dat, y.dat, z.dat of size nxmax
,
nymax
, nzmax
respectively, each containing one column with the node coordinates in the corresponding Cartesian direction.
[mpi]¶
This section allows the user to specify parameters for the MPI decomposition.
x_split
=> integer, MPI partitions in x directiony_split
=> integer, MPI partitions in y direction (should be always 1)z_split
=> integer, MPI partitions in z direction
Notes:
The product x_split * y_split * z_split
must be equal to the total number of MPI tasks.
[bc]¶
This section allows the user to specify flags to impose boundary conditions.
xmin
=> integer, flag for static boundary condition on side xminxmax
=> integer, flag for static boundary condition on side xmaxymin
=> integer, flag for static boundary condition on side yminymax
=> integer, flag for static boundary condition on side ymaxzmin
=> integer, flag for static boundary condition on side zminzmax
=> integer, flag for static boundary condition on side zmaxxmin_nr
=> integer, flag for bc treatment based on characteristic decomposition on side xminxmax_nr
=> integer, flag for bc treatment based on characteristic decomposition on side xmaxymin_nr
=> integer, flag for bc treatment based on characteristic decomposition on side yminymax_nr
=> integer, flag for bc treatment based on characteristic decomposition on side ymaxzmin_nr
=> integer, flag for bc treatment based on characteristic decomposition on side zminzmax_nr
=> integer, flag for bc treatment based on characteristic decomposition on side zmaxx_recyc
=> real, specify recycling location in x direction
Notes:
The following flags can be specified for the static boundary condition:
0 ==> periodicity (available for all sides)
1 ==> free-stream (available for xmin)
2 ==> extrapolation (available for all sides)
5 ==> symmetry (available for ymin)
6 ==> viscous wall (available for ymin, ymax)
7 ==> oblique shock entering the domain (available for ymax)
10 ==> recycling-rescaling for turbulent inflow (available for xmin).
Concerning the characteristic treatment, the following options are available for all sides:
0 ==> characteristic treatment is not applied
1 ==> pure non-reflecting
2 ==> relaxation, see [4]
6 ==> reflective wall
[controls]¶
This section allows the user to specify parameters to control time integration and restart options.
restart_type
=> integer, 0-> new run from scratch, 1-> continue previous run, 2-> continue previous run and statistics collectioncfl
=> real, Courant number for time step selectioniter_dt_recompute
=> integer, active whencfl > 0
, frequency (number of RK steps, i.e. time iterations) for re-computation of time stepnum_iter
=> integer, number of RK steps
Notes:
When cfl > 0
, the Courant number is constant, and the time step is computed every iter_dt_recompute
cycles.
Alternatively, the time step of the simulation can be directly specified using a negative value of cfl
.
In the latter case, the time step is equal to abs(cfl
).
[numerics]¶
This section allows the user to specify parameters to control numerical methods.
ep_order
=> integer, order of accuracy for the discretization of convective termsnkeep
=> integer, KEEP(n) scheme selection (default: 0, suggested: 1 or 2) [???]weno_scheme
=> integer, parameter for WENO (order of accuracy is 2 *weno_scheme
- 1) [???]visc_order
=> integer, order of accuracy for the discretization of viscous termssensor_threshold
=> real, threshold value for shock sensor [???]rk_type
=> integer, specify Runge-Kutta type, 1 -> WRAY RK [???].rand_type
=> integer, specify random behavior, < 0 not reproducible, >=0 reproducible
Notes:
The discretization of the convective terms of the Navier-Stokes equations is based on the implementation of the family
of kinetic energy and entropy preserving schemes KEEP(n), described in [6].
The available orders of accuracy for ep_order
and visc_order
are 2,4,6,8.
The shock capturing flux is based on the classic WENO schemes by []. Admissible values for weno_scheme
are 1,2,3,4,
corresponding to first-, third-, fifth- and seventh-order schemes, respectively.
[flow]¶
This section allows the user to specify parameters to control the flow configuration under investigation.
flow_init
=> integer, specify flow initialization0 => Channel flow
1 => Boundary layer (also used for SBLI)
Mach
=> real, Mach numberReynolds
=> real, Reynolds numbertheta_wall
=> real, wall-temperature conditionxshock_imp
=> real, oblique shock impingment locationshock_angle
=> real, oblique shock angleT_ref
=> real, reference dimensional temperature
Notes:
For the channel flow configuration, the input Reynolds number is the (estimated) friction Reynolds number \(Re_\tau\).
Simulations are performed at constant flow rate. The bulk temperature \(T_b\) can be specified providing a value for
theta_wall
, defined as \(\Theta = \frac{T_w - T_b}{T_r - T_b}\), where \(T_r\) is the recovery
temperature based on \(T_b\) and the Mach number.
When \(\Theta \ge -1\), a bulk cooling term is added to the total energy equation to keep the bulk temperature constant.
For this type of simulation, Mach
is the Mach number based on the bulk velocity and on the speed of sound evaluated at bulk temperature,
see [3].
Alternatively, when \(\Theta < -1\), the bulk temperature is not constant and is free to evolve.
In this case, the setup is similar to that reported in [2],
with Mach
based on the bulk velocity and on the speed of sound evaluated at wall temperature.
For boundary layer and SBLI configurations, the input Reynolds number is the friction Reynolds number at the inflow station \(Re_{\tau}\),
whereas Mach
is the free-stream Mach number. Moreover, in this case \(\Theta = \frac{T_w - T_{\infty}}{T_r - T_{\infty}}\),
where \(T_r\) is the recovery temperature based on the free-stream temperature \(T_{\infty}\) and Mach number.
[fluid]¶
This section allows the user to specify fluid properties.
gam
=> real, specific heat ratio (for calorically-perfect gases)Prandtl
=> real, (molecular) Prandtl numbervisc_model
=> integer, viscosity-temperature relation0 => Inviscid flow
1 => Power law
2 => Sutherland law
vt_exp
=> real, exponent for power law viscosity-temperature relations_suth
=> real, Sutherland constant (dimensional temperature value, 110.4 K for air)calorically_perfect
=> integer, flag to specify perfect gas properties0 => thermally perfect gas, variable specific heats
1 => calorically perfect gas, constant specific heats
indx_cp_l
, integer, exponent low limit of \(C_p (T)\) polynomialindx_cp_r
, integer, exponent high limit of \(C_p (T)\) polynomialcp_coeff
, real, list of coefficients for \(C_p (T)\) polynomial (from lowest to highest power), see []. If \(T^*\) is the dimensional temperature, the dimensional specific heat at constant pressure is expressed as
[output]¶
This section allows the user to specify parameters to control the solver output. Frequencies are indicated in terms of number of cycles, i.e. RK steps or time iterations.
print_control
=> integer, frequency for printing output file progress.outdtsave_restart
=> real, frequency for saving restart filesdtsave
=> real, frequency for saving plot3d and vtk filesdtstat
=> real, frequency for computing statistics (2D and 3D)dtslice
=> real, frequency for writing slicesenable_stat_3d
=> integer, enable computation of 3D statistics (0 -> No, 1 -> Yes)enable_plot3d
=> integer, enable writing of plot3d files (0 -> No, 1 -> Yes)enable_vtk
=> integer, enable writing of vtr files (0 -> No, 1 -> Yes)igslice
=> integer, list of (global) indices for yz-slices, between 1 andnxmax
jgslice
=> integer, list of (global) indices for xz-slices, between 1 andnymax
kgslice
=> integer, list of (global) indices for xy-slices, between 1 andnzmax
debug memory
=> integer, flag to activate CPU and GPU memory checks (0 -> No, 1 -> Yes)


Conflicted
Oh Brother
9 August 2015
Ten days with my family on vacation: the opportunities for conflict were many. On our last full day, I diligently skipped a trip to Scarborough Beach so I could work on my Week 8 DBC tasks. We were meant to meet afterward for ice cream so when I got word they were heading back, I showered and walked their dog down to the meet up point as planned. Only to discover that my brothers were already off to the grocery store and my sisters-in-law were focused on shopping at the pet store next door to the ice cream parlor. I handed over the dog and after about 5 minutes cooling my heels, I walked back to the house in a huff. As usual, I thought about why I was mad and examined whether it was merited. I think of this as "vetting the indictments". I was mad because I had planned to suggest we go to the grocers after ice cream; I wanted certain items for our picnic later, and I badly needed cash. Now, many wrenches suddenly thrown into my schemes. As my mood was noticeably bad, I did tell one brother who asked why that I didn't like how they had unilaterally changed the plans without at least informing me, if not consulting me. I also resented the time wasted walking the dog down to the ice cream shop when, as it turned out, everybody had first stopped at the house on the way. In retrospect, I could have responded to their "we're on our way to the ice cream shop" text with one of my own advising my desire to go to the grocers afterward. Then we might have avoided much of the conflict. I guess I learned that, even though they should have informed me about the change in plans, I should have mentioned how I was relying on that plan being stable. As families do, we moved past it with no lingering issues. My other brother never made mention of it and I assume he just wrote it off to me being cranky. Meanwhile, I can say that while I was in my huff I used the time to get all my packing done. At least I channeled the energy into something productive instead of wallowing. I find that this kind of worthy distraction helps occupy me while my subconscious mind sorts out my feelings on the matter.


RT @brightonruby: Still looking for sponsors for http://brightonruby.com. (RTs appreciated)
2/21/2015, 7:23:36 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @brightonruby: Still looking for sponsors for http://brightonruby.com. (RTs appreciated)
2/21/2015, 7:23:36 PM
Favs: 0
Retweets: 0
link


| Sid |
A 34 character string that uniquely identifies this resource. |
| DateCreated |
The date that this resource was created, given in RFC 2822 format. |
| DateUpdated |
The date that this resource was last updated, given in RFC 2822 format. |
| FriendlyName |
A human readable descriptive text for this resource, up to 64 characters long. By default, the FriendlyName is a nicely formatted version of the phone number. |
| AccountSid |
The unique id of the Account responsible for this Caller Id. |
| PhoneNumber |
The incoming phone number. Formatted with a '+' and country code e.g., +16175551212 (E.164 format). |
| Uri |
The URI for this resource, relative to https://api.twilio.com. |


~ Buttons Collection ~
Click on Users to see their Button Designs!
Follow @lazycipher
Join as a Contributer
Loading...
Thanks for being a part of Hacktoberfest 2018
You're Awesome!
☺


Compiler Engine
Compiler engine client demo for code compilation
Language ID
(list)
:
Select Language
Python2 (2.7.18rc1)
Python3 (3.8.2)
Javascript(Node v10.19.0)
C (gcc 9.3)
Java (openjdk 13.0.3)
Go (go 1.13.8)
Perl (perl 5.30.0)
Ruby (ruby 2.7)
C++ (gcc 9.3)
C# (gmcs 6.8)
Rust (rust 1.46.0)
Typescript (tsc 4.0)
Lua (luac 5.3.3)
Scala (scala 2.13.3)
Source:
# Simple python program to print a statement # inside of while n times count = int(input()) print("Before while") while (count > 0): print("Inside while") count = count - 1 print("Exited while")
Input:
2
Stdout
Output appears here
Server Errors
error appears here


Const SIGMA8
SIGMA8: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3]


Before Change
deeplift.util.assert_is_type(final_activation_layer,
layers.Activation,
"final_activation_layer")
final_activation_type = type(final_activation_layer).__name__
if (final_activation_type == "Sigmoid"):
scoring_mode=ScoringMode.OneAndZeros
elif (final_activation_type == "Softmax"):
//new_W, new_b =\
// deeplift.util.get_mean_normalised_softmax_weights(
// target_layer.W, target_layer.b)
//The weights need to be mean normalised before they are
//passed in because build_fwd_pass_vars() has already
//been called before this function is called,
//because get_output_layers() (used in this function)
//is updated during the build_fwd_pass_vars()
//call - that is why I can"t simply mean-normalise
//the weights right here :-( (It is a pain and a
//recipe for bugs to rebuild the forward pass
//vars after they have already been built - in
//particular for a model that branches because where
//the branches unify you need really want them to be
//using the same symbolic variables - no use having
//needlessly complicated/redundant graphs and if a node
//is common to two outputs, so should its symbolic vars
//TODO: I should put in a "reset_fwd_pass" function and use
//it to invalidate the _built_fwd_pass_vars cache and recompile
//if (np.allclose(target_layer.W, new_W)==False):
// print("Consider mean-normalising softmax layer")
//assert np.allclose(target_layer.b, new_b),\
// "Please mean-normalise weights and biases of softmax layer"
scoring_mode=ScoringMode.OneAndZeros
else:
raise RuntimeError("Unsupported final_activation_type: "
+final_activation_type)
target_layer.set_scoring_mode(scoring_mode)
def save_to_yaml_only(self, file_name):
raise NotImplementedError()
After Change
**kwargs)
def _set_scoring_mode_for_target_layer(self, target_layer):
print("TARGET LAYER SET TO "+str(target_layer.get_name()))
if (deeplift.util.is_type(target_layer,
layers.Activation)):
raise RuntimeError("You set the target layer to an"
+" activation layer, which is unusual so I am"


Test one: Name of test
Description of test
Results
| AT | Browser | OS | Expected | Result |
|---|---|---|---|---|
| VoiceOver | Safari 9 | OS X 10.10 | Icon is not spoken | Icon is not spoken |
This document contains different ways to make icons—deliviered by Font Awesome—accessible.
Description of test
| AT | Browser | OS | Expected | Result |
|---|---|---|---|---|
| VoiceOver | Safari 9 | OS X 10.10 | Icon is not spoken | Icon is not spoken |


We are happy to provide services for:
- Cargo Removal and Storage
- Haz-Mat Response
- Vacuum of Solids & Liquids
- Disposal Services
- Certified Removala and Storage Services
- Refrigerated Cargo Services
- Traffic Control and Security
- Containment Booms and Absorbents
Sooner Emergency Services Inc.. has been in business 1978. Since then, we have responded to more than 2000 Emergency and Haz-Mat incidents. We have earned the reputation of being the "forerunner" in emergency and hazardous materials response. Sooner Emergency Service Inc. has the necessary equipment to complete hazardous tasks, without waiting for subcontracted equipment or personnel. Sooner Emergency is committed to the protection of the environment, as well as limiting the liability of our client from start to finish.
At Sooner Emergency Services Inc. we understand that your image is on the line. We use only the highest quality, most technically advanced equipment available today. Our environmental division provides experienced consultants and personnel for site audits and site assessments including; buildings, structures, underground storage tanks, soils, and ground water.
Employees of Sooner Emergency Services Inc. are trained professionals, for monitoring and sample collection, to provide accurate data. We work and operate in compliance with all regulatory requirements of OSHA, CERCLA, RCRA, TSCA, SARA TITLE III, and Clean Water Act.
About
Sooner Emergency Service Inc., provides your company with the most professional services available to take care of your emergency and environmental needs. Sooner Emergency Service Inc. has been providing Hazardous Material, Environmental Remediation, and Emergency Response services since 1978. Our HAZ-MAT response team is lead by Registered Environmental Managers, all of the team members are experienced and trained in accordance with OSHA. Sooner Emergency Service Inc. personnel have extensive training and experience in hazardous material mitigation, remediation and providing emergency services. Sooner Emergency Service Inc. keeps safety paramount and maintains communication with our clients and regulatory agencies to assure the safe, proper, and successful completion of all projects.
Sooner Emergency Service Inc., has responded to more than 2000 Emergency and HAZ-MAT incidents.
Services
We provide many services
- Truck, Train, Barge, Aircraft Transportation Incidents
- Hazard Chemicals
- Chemical Transfers
- Natural Disasters
- Biological Incidents
- Chemical Spills
- Facility Fires & Explosions
- Retention Pond Dredging
- Chemical Spills
- Facility Fires & Explosions
- Fuel & Oil Spills (Land or Water)
- Retention Pond Dredging
- Soil Remediation
- Bio-Remediation
- Tank Removal
- Vacuum Truck Services
- Sampling & Analytical Services
- Containment Booms for Navigational Waterways
- Transportation & Disposal
- Water & Soil Treatment
- Waste Management
- Emergency Response Training
- Remediation Work
- Cargo Recovery
- Buy Damaged Cargo
Contact
Email<EMAIL_ADDRESS>2131 S. 49th West Avenue Tulsa, Ok. 74107<PHONE_NUMBER>
2244 N. 32nd Muskogee, Oklahoma 74401<PHONE_NUMBER>
Links
This is the links section


Annotations
When you use the PatchAll(Assembly assembly) call, Harmony will search through all classes and methods inside the given assembly looking for specific Harmony annotations.
Example
A typical patch consists of a class with annotations that looks like this:
[HarmonyPatch(typeof(SomeTypeHere))]
[HarmonyPatch("SomeMethodName")]
class MyPatchClass
{
static void Postfix(...)
{
//...
}
}
This will annotate the class with enough information to identify the method to patch. Usually, you will have one class for each method that you want to patch. Inside that class, you define a combination of Prefix, Postfix or Transpiler methods. Harmony will find them by their name. If you annotate those methods you can even have different names.
Annotation types
To indicate that a class contains patch methods it needs to be annotated with at lease one of the following class annotations:
[HarmonyPatch(Type, Type[])] Defines the type that contains the method to be patched (optional Type[] for generics)
[HarmonyPatch(String)] Defines the method to be patched by name
[HarmonyPatch(String, PropertyMethod)] Defines the property to be patched by name
[HarmonyPatch(Type[])] Defines the parameters of the method to be patched (only necessary if multiple methods with the same name exist)
Additionally to repeating the basic annotations, the following shortcut can be used:
- [HarmonyPatch(Type, String, Type[])] Defines the type and method to be patched in a single annotation
Combining annotations
The combination of those annotations defines the target method. Examples:
To patch method String.ToUpper() :
[HarmonyPatch(typeof(String))]
[HarmonyPatch("ToUpper")]
To patch the setter for a property Account in class MyClass :
[HarmonyPatch(typeof(MyClass))]
[HarmonyPatch("Account", PropertyMethod.Setter)]
To patch method String.IndexOf(char, int) :
[HarmonyPatch(typeof(String))]
[HarmonyPatch("IndexOf")]
[HarmonyPatch(new Type[] { typeof(char), typeof(int) })]
//or
[HarmonyPatch(typeof(String), "IndexOf", new Type[] { typeof(char), typeof(int) })]
Patch classes can be public or private, static or not. Patch methods can be public or private but must be static since the patched original method does not have any reference to an instance of your patch class. If you use the manual way to specify the patch methods, your patch methods can even be DynamicMethod's.
Constructors
To patch constructors, do not use the method name ".ctor". Instead, omit the method name completely and only specify the argument types. Example:
[HarmonyPatch(typeof(TestClass))]
[HarmonyPatch(new Type[] { })]
Generic Methods
To patch methods with generic signatures, you need to patch specific versions of the method. It is not possible to patch an open generic method. Example: AddItem(T item) cannot be patched directly but you can define one patch for i.e. AddItem(string item) and one for AddItem(int item). Pro tip: to patch a large number of variations, create your patches dynamically.


SessionDelegate
@objc
public protocol SessionDelegate : AnyObject, NSObjectProtocol
Payment delegate.
-
Notifies the receiver that payment has succeed, passing
charge
andsession
which has initiated payment as arguments.Declaration
Swift
@objc(paymentSucceed:onSession:) optional func paymentSucceed(_ charge: Charge, on session: SessionProtocol)
-
Notifies the receiver that authorization has succeed, passing
authorize
andsession
which has initiated authorization as arguments.Declaration
Swift
@objc(authorizationSucceed:onSession:) optional func authorizationSucceed(_ authorize: Authorize, on session: SessionProtocol)
-
Notifies the receiver that the card was saved.
Declaration
Swift
@objc(cardSaved:onSession:) optional func cardSaved(_ cardVerification: CardVerification, on session: SessionProtocol)
-
Notifies the receiver that the card was tokenized.
Declaration
Swift
@objc(cardTokenized:onSession:customerRequestedToSaveTheCard:) optional func cardTokenized(_ token: Token, on session: SessionProtocol, customerRequestedToSaveTheCard saveCard: Bool)
-
Notifies the receiver that charge has failed, passing
session
which has initiated the payment.If
error
isnil
, then look intocharge
object to find the cause of the issue.Declaration
Swift
@objc(paymentFailedWithCharge:error:onSession:) optional func paymentFailed(with charge: Charge?, error: TapSDKError?, on session: SessionProtocol)
-
Notifies the receiver that authorization has failed, passing
session
which has initiated the authorization.If
error
isnil
, then look intoauthorize
object to find the cause of the issue.Declaration
Swift
@objc(authorizationFailedWithAuthorize:error:onSession:) optional func authorizationFailed(with authorize: Authorize?, error: TapSDKError?, on session: SessionProtocol)
-
Notifies the receiver that card saving process has failed.
If
error
isnil
, then look intocardVerification
object to find the cause of the issue.Declaration
Swift
@objc(cardSavingFailedWithCardVerification:error:onSession:) optional func cardSavingFailed(with cardVerification: CardVerification?, error: TapSDKError?, on session: SessionProtocol)
-
Notifies the receiver that card tokenization process has failed.
Declaration
Swift
@objc(cardTokenizationFailedWithError:onSession:) optional func cardTokenizationFailed(with error: TapSDKError, on session: SessionProtocol)
-
Notifies the receiver that session is about to start and has not yet shown the SDK UI.
You might want to use this method if you are not using
PayButton
in your application and want to show a loader before SDK UI appears on the screen.Declaration
Swift
@objc optional func sessionIsStarting(_ session: SessionProtocol)
-
Notifies the receiver that session has successfully started and shown the SDK UI on the screen.
You might want to use this method if you are not using
PayButton
in your application and want to hide a loader after SDK UI has appeared on the screen.Declaration
Swift
@objc optional func sessionHasStarted(_ session: SessionProtocol)
-
Notifies the receiver that session has failed to start and will not show the SDK UI on the screen.
You might want to use this method if you are not using
PayButton
in your application and want to hide a loader because the session has failed. For the actual failure cause please implement other methods from this protocol and listen to the callbacks.Declaration
Swift
@objc optional func sessionHasFailedToStart(_ session: SessionProtocol)
-
Notifies the receiver that session has been cancelled by the user.
Declaration
Swift
@objc optional func sessionCancelled(_ session: SessionProtocol)


I am a happy individual, a christian and i believe hardworking. Anyway i love computer networking and programming, i think. I love learning generally and making things work. I appreciate nature(damsels), i am a manchester united fan and a lionel Messi fan, yeah!. I support the cleveland cavs, i know right..Lebron James is a beast lets not even talk about my kyrie. I love my mom and my sis, i love my family. I love seeing people happy. I am a final year student of Information and Communication Engineering..5 years..Covenant University.
This is a selection of projects i have been part of in my very short career. I know there is not much there now but give it time
In summary, my expertise ranges from Communication Engineering, Computer networking, Mathematics, Electrical circuitry and Computer programming. I can help in providing solutions like configuration of routers, switches, microwave radios, antennas. I can help teach basic calculus and mathematical problems.


Renders dynamic network data from 'networkDynamic' objects as movies, interactive animations, or other representations of changing relational structures and attributes.
| Version: |
0.12.3 |
| Depends: |
R (≥ 3.0), network (≥ 1.13), networkDynamic (≥
0.9), animation (≥ 2.4), sna |
| Imports: |
MASS, statnet.common, jsonlite, base64 |
| Suggests: |
tergm (≥ 3.1), tsna, testthat, knitr, htmlwidgets, scatterplot3d |
| Published: |
2018-10-08 |
| Author: |
Skye Bender-deMoll [cre, aut],
Martina Morris [ctb] |
| Maintainer: |
Skye Bender-deMoll <skyebend at uw.edu> |
| License: |
GPL-3 + file LICENSE |
| URL: |
https://github.com/statnet/ndtv |
| NeedsCompilation: |
no |
| Materials: |
ChangeLog |
| In views: |
gR |
| CRAN checks: |
ndtv results |


json
Quoting from the home page of
JSON
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
syntax highlighting:
Colour for text and null values.
Colour for numbers.
Colour for true and false values.
Colour for void values.
Background for Objects.
Background for Arrays.
Background for Object name/value pair tables.
Background for Array value tables.
note
Individual 'words' that are extremely long may be broken into two or more lines to conserve horizontal space.
Property path:
Trail:
Trail:


We have just started this section for the users (beginner to intermediate) who want to work with various JavaScript problems and write scripts online to test their JavaScript skill.


Blogpost7| Running Jupyter lab/notebook remotely
Introduction
Hello! In this post, I will show you how to run JupyterNotebook or JupyterLab on any server that you have ssh access to. I really like this method because it allows me to work and debug on the server without lag, especially when I have to work with large datasets and complex models. All you need is a terminal and a browser!
Step-by-step guide
- First you need to ssh to your remote server by running the following from your laptop
ssh<EMAIL_ADDRESS>- One you’re in the server, make sure that jupyter is installed. You can use this documentation to install JupyterLab or this documention for JupyterNotebook.
- Once you have it installed,
cd
towards the directory that you want to work in. Then run the following command in the terminal of the remote server:jupyter lab --no-browser --port ####
You can replace the port numner (####
) with any desired number that is not already in use, for instance here I use 8880. Then the terminal should output something like this: -
Then you open a new tab in your terminal on your laptop and run the following command:
ssh -N -f -L localhost:####:localhost:####<EMAIL_ADDRESS>Where####
is the portnumber (so it can be 8880<EMAIL_ADDRESS>are the credentials that you use to log into the server. -
Once you run that, you can copy the link in your terminal from step 2 and paste it in your browser. Or paste
http://localhost:8880/lab
. Now you should be redirected to JupyterLab!
Hope this was helpful :)


Delete
Steve's Utilities
By Stephen H
With Help From The JΛS Team
Time Checker
As on
j.mp/jas-timechecker
Flashlight
Click the light bulb to turn On/Off the light
Roman Numeral Converter
Steve's YouTube Status (NOW WORKS)
As On
j.mp/steve-ytstatus Or
j.mp/stevesstatus
Screen Resolution (Beta)
Browser info (Alpha)
IE11, Chrome, Firefox, and Safari return appName "Netscape"
Chrome, Firefox, IE, Safari, and Opera all return appCodeName "Mozilla"
Web pages
Austine's Animations
Jishi's Morse Code