scram switch
`Prev `__
S
`Next `__
--------------
**scram switch**: n.
[from the nuclear power industry] An emergency-power-off switch (see
`*Big Red Switch* <../B/Big-Red-Switch.html>`__), esp. one positioned to
be easily hit by evacuating personnel. In general, this is *not*
something you `*frob* <../F/frob.html>`__ lightly; these often initiate
expensive events (such as Halon dumps) and are installed in a `*dinosaur
pen* <../D/dinosaur-pen.html>`__ for use in case of electrical fire or
in case some luckless `*field servoid* <../F/field-servoid.html>`__
should put 120 volts across himself while `*Easter
egging* <../E/Easter-egging.html>`__. (See also
`*molly-guard* <../M/molly-guard.html>`__, `*TMRC* <../T/TMRC.html>`__.)
“Scram” was in origin a backronym for “Safety Cut Rope Axe Man” coined
by Enrico Fermi himself. The story goes that in the earliest nuclear
power experiments the engineers recognized the possibility that the
reactor wouldn't behave exactly as predicted by their mathematical
models. Accordingly, they made sure that they had mechanisms in place
that would rapidly drop the control rods back into the reactor. One
mechanism took the form of ‘scram technicians’. These individuals stood
next to the ropes or cables that raised and lowered the control rods.
Equipped with axes or cable-cutters, these technicians stood ready for
the (literal) ‘scram’ command. If necessary, they would cut the cables,
and gravity would expeditiously return the control rods to the reactor,
thereby averting yet another kind of `*core
dump* <../C/core-dump.html>`__.
Modern reactor control rods are held in place with claw-like devices,
held closed by current. SCRAM switches are circuit breakers that
immediately open the circuit to the rod arms, resulting in the rapid
insertion and subsequent bottoming of the control rods.
--------------
+-------------------------+----------------------------+----------------------------+
| `Prev `__ | `Up <../S.html>`__ | `Next `__ |
+-------------------------+----------------------------+----------------------------+
| SCNR | `Home <../index.html>`__ | scratch |
+-------------------------+----------------------------+----------------------------+


|
Apache Ignite.NET
|
Ignite Binary Objects API classes. More...
Classes | |
| class | BinaryConfiguration |
| Binary type configuration. More... | |
| class | BinaryObjectException |
| Indicates an error during binarization. More... | |
| class | BinaryReflectiveSerializer |
| Binary serializer which reflectively writes all fields except of ones with System.NonSerializedAttribute. More... | |
| class | BinaryTypeConfiguration |
| Binary type configuration. More... | |
| class | BinaryTypeNames |
| Binary type name constants. More... | |
| interface | IBinarizable |
| Interface to implement custom serialization logic. More... | |
| interface | IBinary |
Defines binary objects functionality. With binary objects you are able to:
| |
| interface | IBinaryIdMapper |
| Maps class name and class field names to integer identifiers. More... | |
| interface | IBinaryNameMapper |
| Maps type and field names to different names. More... | |
| interface | IBinaryObject |
| Wrapper for serialized objects. More... | |
| interface | IBinaryObjectBuilder |
| binary object builder. Provides ability to build binary objects dynamically without having class definitions. More... | |
| interface | IBinaryRawReader |
| Raw reader for binary objects. More... | |
| interface | IBinaryRawWriter |
| Raw writer for binary objects. More... | |
| interface | IBinaryReader |
| Reader for binary objects. More... | |
| interface | IBinarySerializer |
| Binary serializer. More... | |
| interface | IBinaryType |
| Binary type metadata. More... | |
| interface | IBinaryWriter |
| Writer for binary objects. More... | |


The classes package has the classes that the user is going to typically need. Each of the classes should be constructed with no arguments. Calls to the classes methods then call the API and return the results in one of the data package classes. The queries will be cached and all subsequent calls will return the same information. If you want to disable the cache checking, then call VoteSmart.setCache(false); or VoteSmart.setCache(true); to turn it back on.


Logitech LX-300: A Nice Mid-Priced Combo
I bought this keyboard off eBay for a very reasonable price, and I am very happy with my purchase.
I bought this board as a replacement for my laptop keyboard which was getting worn up by intensive gaming. I knew that I wanted some quality, hence my decision to go with Logitech.
At first, I didn’t want to go with something wireless, since I thought that I would suffer from wireless transmission lag and problems of the such, but after having trouble finding USB wired keyboard, I decided that it couldn’t be that bad and I bought it anyways. Turns out that I was totally wrong about transmission lag, since it didn’t affect me anyhow, might that be in normal tasks like writing documents or in hardcore gaming where I punch the living daylights out of the W,A,S,D shift and control keys.
The keyboard has an overall very good feel to it. The keyboard can be used in two different stances, like pretty much all other keyboards, that is with the legs up or down. Your choice of stance is personal preference, but unlike some IBM keyboards which are jacked at extreme angles when put on the legs, the slim profile of the LX 300 makes it pretty low, even when with the legs up. For additional comfort, a wrist rest is also included in the box, which I prefer not using.
I thought that the key layout and response on this keyboard was just great. The keys have a nice angle to them, and all is positioned right where it should be for easy access. Its the Delete-Home-End-PGUp-PGDown block that needs the most getting used to, but I like the way that the accent is put on the Delete key, which I tend to use more often. The keys have a nice springyness and noise to them, being crisp on initial press with a comfortable amount of overtravel, without being too hard to press, in fact I could even add that they are lighter on initial press then my laptop’s keyboard. The keys do just a bit of lateral wiggle, but not any more than any keyboard that I have used.
The shortcut keys are also very well placed, and all of the them are customizable with the Logitech Setpoint software, which controls both keyboard and mouse. All of the F keys have alternate functions on them, which for me isn’t really practical but for some that are more used to office work is wonderful. The back and forward keys are a wonderful touch for power-browsers, and they work perfectly in Internet Explorer and Firefox. I have not tested them in any other browser.
I have never used the mouse, but I personally wouldn’t trust it for any hardcore gaming where you need more DPI.
As for previous comments on battery life, I have not run into those problems yet: I have had this keyboard for about 4 to 5 months, I use my computer 4 hours plus per day and have not changed the batteries a single time.
Logitech says it is spill proof, but being too broke to buy another one, I have not tested that either, although the many little holes in it’s underside suggest that it would stand up very well to a spill.
This might be just my unit, but the mouse does not seem to work when only the USB port is plugged. I have not tried it yet with PS/2.
From what I have heard, it will work with Linux but the media keys may or may not work. </span>


Input Controls
You do not need to have a form to use w2ui library's fields (input controls). All of the fields can be used outside of w2form on any
text input element.
Below is the list of supported control types and corresponding HTML elements they need. Please note that there is
no <select> element. Similar functionality is done with list (single item selection) or enum (multi items selection).
| text | input[type=text] or textarea |
| int | input[type=text] |
| float | input[type=text] |
| hex | input[type=text] |
| money | input[type=text] |
| alphanumeric | input[type=text] |
| email | input[type=text] |
| checkbox | input[type=checkbox] |
| password | input[type=password] |
| date | input[type=text] |
| list | input[type=text] |
| enum | input[type=text] |


• Memory of the computer is divided into small parts called locations.
• Each location has a unique address.
• Location is further subdivided into bits.
• Different computers have a different location size varying from 8 to 64 bits.
Bit stands for one binary digit, which is either 0 or 1.
3. ByteNumber of consecutive bits combine to make a byte.
Most commonly used combination is of 8 bits. Size of main memory is given in Kilobytes (KB) or Megabytes (MB).
The main memory, also called random access memory (RAM) is the work area of the computer. It stores program instructions or part of data for immediate needs.The storage capacity of RAM is limited. A typical modern computer can have a RAM size of 32MB or 64MB or greater upto 8GB. It is volatile memory of the computer and when the power goes, the contents stored in RAM are lost.
RAM can be classified as DRAM(Dynamic RAM)or SRAM(Static RAM).
The secondary storage devices are used to store programs and data on a permanent basis. Their storage capacity is much higher compared to main memory of the computer. Secondary Storge devices accept data or program instructions from the processor, retain them and then write them back to the processor as and when needed. The examples of secondary storage devices are Floppy disk, Hard Disk, Magnetic tapes, Pendrives or jumpdrives etc.
The floppy diskette is a direct access storage device although its capacity is much less than a hard disk. The diskette is made out of a flexible plastic material. This base is coated with an iron-oxide recording material. Data is recorded as tiny magnetic spots. The surface is divided into tracks and sectors, same as in a hard disk. The number of tracks on a diskette depends on the recording density. The size of each sector is fixed (512 bytes). Data is stored on both sides of the diskette. There is one head per surface in the floppy drive for reading/writing data on the diskette. The circular plastic disk is enclosed within a smoothly lined, protective square jacket to protect it from dust and scratches.
The standard size available nowadays is: 3.5 inch.
These are specific kind of storage devices that can not be removed and are fixed inside the computer. That is why these are also called as fixed disks and store programs permanently.The storgae capacity of the disks that are used these days are having Gigabytes of storage and these are faster in comparison to Floppy disks.
This is also a magnetic media which stores data sequentially in them . Though they provide unlimited storage capacity they suffer form a very serious problem. Since the data stored in them is sequential in nature, retrieval of data takes a very long time. These are used for archival backup storage.
Compact disk, read-only memory optical disks have a very large storage density and the access time is relatively low.
Digital Versatile Disk is in genre of optical discs with same overall dimension of CDs but much higher capacity. These can store at least 7 times more data than CD ROM.
Also commonly known as pen drive or jump drive or flash drive. Static memory devices use memory chips to store information. This information is retained even after power is turned off. They connect to a USB port on the computer and offer capacities of 128 MB or more. Due to their size and shape, these devices are known as USB memory keys or flash drives and have widely replaced floppy disks for transportation of files between systems. Many portable and hand-held devices rely entirely on static memory for storage.
These days, internal memory consists of extremely small bit storage circuits (flip-flops) etched on a silicon chip. All the electronic elements to store a bit are placed in such a small area of the chip that a single chip can store millions of bits. The individual chips are arranged in groups to form a memory module.
Types of Semiconductor Memory : -Any information can be read from and written into a RAM. It is a read/write memory. It is a volatile memory i.e. its contents are lost if the power supply is interrupted or turned off. The main memory of the computer is RAM.
ROM is permanently programmed with information during manufacture, by implementing the appropriate pattern of two state values. It cannot be changed subsequently by a normal write operation. It is thus completely non-volatile. It is mainly used to hold those programs, which are required permanently.
This can be programmed to record information using a special electronic equipment known as a PROM programmer. However, it cannot be changed subsequently.
EPROM is a PROM, which can be reversed by exposing it to an ultraviolet light source. The device can be re-erased and re-programmed again and again.
It is a small capacity high-speed memory used to make processing faster. The main memory can process information very fast, but it takes much longer to transfer data to and from the input/output devices. The cache memory compensates for this mismatch in operating speeds. It holds those parts of data and the active program, which are most frequently used. Thus, the performance rate of the CPU improves.


{% extends "user/base.html" %} {% block main %} {% if validlink %}
You need to enter your password twice to prevent typo.
That link is expired. Try to ask a new one.


Welcome
Me, exploring Utah I'm Garrison from Portland, Oregon. I created Daily.computer, a social platform where users post once a day. Beyond that, I'm a software engineer with a penchant for Python and Haskell and have a keen interest in politics.
Curious about what I'm reading? Check out my reading list.
I've reproduced a list of recent posts here for your reading pleasure:


"This document does not aim to regurgitate Marketing KoolAid, not that there's anything wrong with it™, but is intended primarily as an introduction to Mac OS X for those members of the technical community who are not familiar with it." This is a must read for anyone interested in Mac OS X technology. In a slightly related article see also: Command Line Archival in Mac OS X.
Billy Joel - The Essential Billy Joel - Disc 1 - Captain Jack


Sublimecord¶
Sublime Text 3 commands, event handler and connection to Discord via Discord IPC wrapper.
-
class
Sublimecord
¶ Singleton class that gives all necessary tools to send Discord Rich Presence with data taken from Sublime Text 3.
-
get_instance
()¶ Get Sublimecord instance if exists in other situation, create new instance.
Returns: Sublimecord instance Return type: Sublimecord
-
__init__
(self)¶ Sublimecord constructor.
-
get_file_size
(self, characters)¶ Converting characters quantity to size on which computer operate.
Parameters: characters (int) – characters to convert quantity Returns: size on which computer operate with proper size definition Return type: string
-
connect_to_discord
(self)¶ Connect to Discord and send initial Discord Rich Presence.
-
disconnect_from_discord
(self)¶ Disconnect from Discord and reset ipc object.
-
get_file_properties
(self, view)¶ Getting opened file name, extension and size.
Parameters: view (View) – Sublime Text view instance
-
get_project_name
(self, window)¶ Getting opened project name (opened folder).
Parameters: window (Window) – Sublime Text window instance
-
change_status
(self)¶ Check variables content, prepare titles and send Discord Rich Presence.
-
-
class
ConnectCommand
(sublime_plugin.WindowCommand)¶ Command that allows connect to Discord via Discord IPC socket and send initial Discord Rich Presence status.
Param: class is extending WindowCommand class from sublime_plugin package -
run
(self)¶ Get project name, file name, file extension, connect to Discord and send initial Discord Rich Presence. WindowCommand overriden method.
-
-
class
DisconnectCommand
(sublime_plugin.WindowCommand)¶ -
run
(self)¶ Proper way to disconnect from Discord. WindowCommand overriden method.
-
-
class
EventHandler
(sublime_plugin.ViewEventListener)¶ Event handler, sends Discord Rich Presence on specific action.
Parameters: ViewEventListener (ViewEventListener) – class is extending ViewEventListener class from sublime_plugin package -
on_activated
(self)¶ Update Discord Rich Presence status every time when Sublime Text 3 is connected and view gains focus.
-


{% extends "layout_bsa.html" %} {% block page_title %} Pay a Penalty Charge Notice {% endblock %} {% block content %} BETA This is a new service – your feedback will help us to improve it. We'll be back... 1) Send details to DWP ... 2) Get info back from DWP ... 3) Contact user ... Q) Is this on hold?.. {% endblock %}
BETA This is a new service – your feedback will help us to improve it.
1) Send details to DWP ...
2) Get info back from DWP ...
3) Contact user ...
Q) Is this on hold?..


library(magrittr)
library(tidyr)
library(dplyr)
library(ggplot2)
theme_set(theme_bw())
library(survival)
library(mgcv)
library(pamm)
Set1 <- RColorBrewer::brewer.pal(9, "Set1")
In the following, we demonstrate an analysis containing time-dependent covariates, using the well-known recidivism data discussed in detail in Fox and Weisberg (2011). The R-Code of the original analysis using the extended Cox model can be found here, the respective vignette here.
# raw data
# http://socserv.mcmaster.ca/jfox/Books/Companion/scripts/appendix-cox.R
recidivism <- read.table(
file = "http://math.unm.edu/~james/Rossi.txt",
header = TRUE) %>%
mutate(subject=row_number())
In this example we don’t need a dedicated function for transformation, as we basically just need to transform the data into long format (equals splitting at each week for which subjects are in the risk set):
# transform into long format
recidivism_long <- recidivism %>%
gather(calendar.week, employed, emp1:emp52) %>%
filter(!is.na(employed)) %>% # employed unequal to NA only for intervals under risk
group_by(subject) %>%
mutate(
start = row_number()-1,
stop = row_number(),
arrest = ifelse(stop == last(stop) & arrest == 1, 1, 0),
offset = log(stop - start)) %>%
select(subject, start, stop, offset, arrest, employed, fin:educ) %>%
arrange(subject, stop)
recidivism_long %<>%
mutate(employed.lag1 = lag(employed, default=0)) %>%
slice(-1) %>% # exclusion of first week, as lagged information is missing
ungroup()
Below we fit a PAM and an extended Cox model. In this case the format for both models is the same (which is not always the case for analyses with time-dependent covariates, see the second example below using the pbc
data): The stop
variable defines the interval endpoints and is used to model the baseline log hazard rates.
## Fit PAM (smooth effects of age and prio, using P-Splines)
pam <- gam(arrest ~ s(stop) + fin + s(age, bs="ps") + race + wexp + mar + paro +
s(prio, bs="ps") + employed.lag1,
data=recidivism_long, family=poisson(), offset=offset)
tidy_fixed(pam)
## # A tibble: 6 x 4
## variable coef lower upper
## <chr> <dbl> <dbl> <dbl>
## 1 fin -0.349 -0.732 0.0349
## 2 race 0.330 -0.289 0.949
## 3 wexp -0.0192 -0.449 0.411
## 4 mar -0.325 -1.09 0.444
## 5 paro -0.0501 -0.444 0.343
## 6 employed.lag1 -0.767 -1.20 -0.331
## respective extended cox model
cph <- coxph(
formula = Surv(start, stop, arrest)~ fin + pspline(age) + race + wexp + mar +
paro + pspline(prio) + employed.lag1,
data=recidivism_long)
# extract information on fixed coefficients
tidy_fixed(cph)[c(1, 4:7, 10), ]
## # A tibble: 6 x 4
## variable coef lower upper
## <chr> <dbl> <dbl> <dbl>
## 1 fin -0.341 -0.727 0.0451
## 2 race 0.368 -0.254 0.991
## 3 wexp -0.00569 -0.438 0.427
## 4 mar -0.277 -1.05 0.498
## 5 paro -0.109 -0.505 0.288
## 6 employed.lag1 -0.765 -1.20 -0.327
The figure below summarizes the comparison between the two models.
Expand here for R-Code
all_eff <- purrr::map_df(
list(
tidy_fixed(pam),
tidy_fixed(cph)[-c(2:3, 8:9), ]),
bind_rows, .id="Model") %>%
mutate(Model = factor(Model, levels=2:1, labels=c("Cox-PH", "PAM")))
## plot of fixed coefficients
coef_gg <- ggplot(all_eff, aes(x=variable, y=coef, ymin=lower, ymax=upper)) +
geom_hline(yintercept = 0, lty=3) +
geom_pointrange(aes(col=factor(Model), shape=factor(Model)),
position=position_dodge(width=0.5)) +
scale_colour_manual(
name = "Method",
values = c(1, Set1[1]),
limits = rev(levels(all_eff$Model))) +
scale_shape_manual(
name = "Method",
values = c(19, 15),
limits = rev(levels(all_eff$Model))) +
coord_flip(ylim=range(-1.5, 1)) +
ylab(expression(hat(beta)%+-% 1.96 %.% SE)) +
xlab("")
## to visualize smooth effect of age, create data set where all covariates are
## fixed to mean values except for age, which varies between min and max
## (n = 100)
age_df <- recidivism_long %>% make_newdata(expand="age", n=100)
## add information on contribution of age to linear predictor (partial effect of age)
age_df %<>% add_term(pam, term="age") %>%
mutate(cphfit = predict(object=cph, ., type="terms")[,"pspline(age)"])
## prep plot object for smooth effects
smooth_gg <- ggplot(age_df, aes(y=fit)) +
geom_line(aes(col="PAM")) +
geom_ribbon(aes(ymin=low, ymax=high), alpha=0.3) +
geom_line(aes(y=cphfit, col="Cox-PH")) +
scale_colour_manual(name="Method", values=c("#E41A1C", "#000000")) +
ylab(expression(hat(f)(x))) + theme(legend.position="none")
## plot of the age effect
age_gg <- smooth_gg + aes(x=age) +
xlab("Age")
## same as "age"" for "prio" variable
prio_df <- recidivism_long %>% make_newdata(expand="prio", n=100)
prio_df %<>% add_term(pam, term="prio") %>%
mutate(cphfit = predict(object=cph, ., type="terms")[,7])
## plot of the prio effect
prio_gg <- smooth_gg %+% prio_df + aes(x=prio) +
xlab("Number of prior convictions")
As we can see, the estimates of the fixed coefficients (left panel) are very similar between the two models, including the confidence intervals. Using the default settings in both model specifications (using P-Splines for smooth terms), the PAM estimates are smoother compared to the Cox estimates (right panel).
## put all plots together
library(gridExtra)
grid.arrange(
coef_gg +theme(legend.position="bottom"),
age_gg,
prio_gg,
layout_matrix=matrix(c(1, 1, 2, 3), ncol=2))
pbc
dataHere we show an example with continuous time-dependent covariates using the Primary Biliary Cirrhosis Data (pbc
) from the survival
package (see ?pbc
for documentation).
head(pbc)[, c(1:5, 11, 12)]
## id time status trt age bili chol
## 1 1 400 2 1 58.76523 14.5 261
## 2 2 4500 0 1 56.44627 1.1 302
## 3 3 1012 2 1 70.07255 1.4 176
## 4 4 1925 2 1 54.74059 1.8 244
## 5 5 1504 1 2 38.10541 3.4 279
## 6 6 2503 2 2 66.25873 0.8 248
head(pbcseq)[, c(1, 4:5, 7, 12, 13)]
## id trt age day bili chol
## 1 1 1 58.76523 0 14.5 261
## 2 1 1 58.76523 192 21.3 NA
## 3 2 1 56.44627 0 1.1 302
## 4 2 1 56.44627 182 0.8 NA
## 5 2 1 56.44627 365 1.0 NA
## 6 2 1 56.44627 768 1.9 NA
pbc
dataWe first replicate the analysis from vignette("timedep", package="survival")
:
# below code copied from survival vignette "timedep"
temp <- subset(pbc, id <= 312, select=c(id:sex, stage)) # baseline
pbc2 <- tmerge(temp, temp, id=id, death = event(time, status)) #set range
pbc2 <- tmerge(pbc2, pbcseq, id=id, ascites = tdc(day, ascites),
bili = tdc(day, bili), albumin = tdc(day, albumin),
protime = tdc(day, protime), alk.phos = tdc(day, alk.phos))
fit1 <- coxph(Surv(time, status==2) ~ log(bili) + log(protime), pbc)
fit2 <- coxph(Surv(tstart, tstop, death==2) ~ log(bili) + log(protime), pbc2)
rbind("baseline fit" = coef(fit1), "time dependent" = coef(fit2))
## log(bili) log(protime)
## baseline fit 0.930592 2.890573
## time dependent 1.241214 3.983400
This demonstrates that results can differ substantially if only the baseline values of TDCs are used for the analysis instead of their complete trajectories over time.
pbc
dataFirst we need to transform the data to PED format. In order to do so we perform some minor preprocessing:
## data set that only contains baseline (t=0) information
event_df <- pbc %>%
filter(id <= 312) %>%
mutate(event = 1*(status==2)) %>%
select(id, time, event, trt, age, sex, bili, protime)
## we rename the "day" variable here for use of `split_tdc` function later
tdc_df <- pbcseq %>%
select(id, day, bili, protime) %>%
rename(time = day)
Now we can use the ?split_tdc
function, that needs both data sets, event_df
, that contains time-to-event information and one row per subject and tdc_df
that contains information on timing and value of time-dependent covariates.
The split_tdc
function performs the following tasks:
split_data
with above cut-points on event_df
after removing all TDCs)tdc_df
by carrying the respective previous value of the TDC forward.pbc_ped <- split_tdc(Surv(time, event) ~., event_df, tdc_df, "id", "time", "status")
filter(tdc_df, id==17)
## id time bili protime
## 1 17 0 2.7 10.5
## 2 17 364 4.5 10.6
## 3 17 673 13.6 12.1
pbc_ped %>%
filter(id==17) %>%
semi_join(tdc_df, by=c("id", "tstart"="time")) %>%
select(id, interval, age, bili, protime)
## # A tibble: 3 x 5
## # Groups: id [1]
## id interval age bili protime
## <int> <fctr> <dbl> <dbl> <dbl>
## 1 17 (0,108] 52.2 2.70 10.5
## 2 17 (364,365] 52.2 4.50 10.6
## 3 17 (673,675] 52.2 13.6 12.1
Now we can fit the model as usual calling mgcv::gam
:
pbc_pam <- gam(ped_status ~ s(tend) + log(bili) + log(protime), data=pbc_ped,
family=poisson(), offset=offset)
cbind(pam=coef(pbc_pam)[2:3], cox=coef(fit2))
## pam cox
## log(bili) 1.268859 1.241214
## log(protime) 4.272875 3.983400
Coefficient estimates are very similar for both models, especially for the effect of bili
. A graphical comparison yields similar results:
Expand here for R-Code
## Effect of bilirubin
## note that we use relative = TRUE in the call to add_term, which calculates
## the relative risk change (x - \bar{x})'\beta for comparison with predict.coxph
## (see also Details section in ?predict.coxph)
bili_df <- pbc_ped %>% ungroup() %>%
make_newdata(expand="bili", n = 100) %>%
add_term(pbc_pam, term="bili", relative=TRUE) %>%
mutate(cox = predict(fit2, ., type="term")[, "log(bili)"])
bili_gg <- ggplot(bili_df, aes(x=bili, y=fit)) +
geom_line(aes(col="PAM")) +
geom_ribbon(aes(ymin=low, ymax=high), alpha=0.2) +
geom_line(aes(y=cox, col="Cox")) +
scale_colour_manual(name="Method", values=c("#E41A1C", "#000000"))
## Effect of protime
protime_df <- pbc_ped %>% ungroup() %>%
make_newdata(expand="protime", n = 100) %>%
add_term(pbc_pam, term="protime", relative=TRUE) %>%
mutate(cox = predict(fit2, ., type="term")[, "log(protime)"])
protime_gg <- ggplot(protime_df, aes(x=protime, y=fit)) +
geom_line(aes(col="PAM")) +
geom_ribbon(aes(ymin=low, ymax=high), alpha=0.2) +
geom_line(aes(y=cox, col="Cox")) +
scale_colour_manual(name="Method", values=c("#E41A1C", "#000000"))
## combine figures
library(grid)
grid.draw(
cbind(
ggplotGrob(bili_gg),
ggplotGrob(protime_gg),
size = "last"))


|
This is an exclusive vase from the ming dynasty.
It is available in two sizes,with and without gold plating |
|||
| Picture | Size | Plating | Price |
| Small | Without Plating | $65.00 | |
| With Gold plating | $165.00 | ||
| large | Without Plating | $265.00 | |
| With GOld plating | $565.00 |


I was born in the Philippines. I came to America wee bit lad of 7 years old. Came directly to Seattle and lived here ever since!
I am a noob when it comes to coding but at the end of this course I will be a Master League! I worked for Virginia Mason Hospital for 10 years as a hospital coordinator. I made sure the flow of the hospital goes smoothly by coordinating with nurses, engineering, and housekeepers things they needed. I love the job because of family oriented team we had, but sadly I had leave. My sister has cerebral polosi. She is very smart but her motor functions do not function properly. My mother was the prime caretaker but needed my help so I decided to leave and become the prime caretaker.
I decided to go back to school when things settled back at home. We had more help for my sister so I decided to further my education. How I learned about coding and Epicudos was from a gaming friend that I met during my WoW years. He completed the course in Oregon and raved how great it was, and how he got a great job right after graduation. And now i'm here, and enjoying my new experience!
 I love to meet new people and kill noobs in any competitive games. My 2 main destition I love travel to are Hawaii and the Philippines. Anywhere that is paradise on earth is where I want to travel. I have no idea why I am in Seattle because this weather is depressing!


One of many JavaScript HTML methods is getElementById().
This example uses the method to "find" an HTML element (with id="demo") and changes the element content (innerHTML) to "Hello JavaScript":
JavaScript can change HTML content.
Changing the style of an HTML element, is a variant of changing an HTML attribute:
JavaScript can change the style of an HTML element.
Showing hidden HTML elements can also be done by changing the display style:
JavaScript can hide HTML elements.


MAINFLUX
MFX-1 IoT EdgeX Gateway is edge computing solution based on Linux Foundation EdgeX Foundry
open source framework that offers interoperable ecosystem of plug-and-play components
for faster deployment of IoT solutions.
MFX-1 IoT EdgeX Gateway is Linux Foundation EdgeX Foundry compliant IoT gateway
developed on the optimized hardware platform for industrial IoT edge computing solutions.
EdgeX Foundry is an open source framework for edge computing hosted within a full hardware and OS-agnostic
reference software platform that unifies the marketplace and accelerates the deployment of IoT solutions.
Over 80 member companies across the IoT space including Dell, AMD, Toshiba, Analog Devices, and Samsung.
Objective: Build a vendor-neutral, flexible, highly-scalable and industrial-grade open source edge software platform supported by a rich ecosystem of plug-and-play components that unifies the marketplace and accelerates the deployment of IoT solutions.
Chairs the Application Workgroup in Technical Steering Committee.
Member at large Technical Steering Committee.
Community Contribution Award for Exemplary Leadership Innovation Award for Extensive Technical Contribution.
Mainflux- MFX-1 IoT EdgeX Gateway is implemented on Solid Run HummingBoard-Edge hardware platform. It was developed to meet the B2B market demand for a high performance and includes a whole new set of features:
The architecture supports communications “north, south, east and west” as needed in the IoT
“fog” and can be deployed on a variety of edge nodes in a tiered computing architecture.
The deployment of combinations of different plug-and-play microservices simply depends
on the use cases and capability of the host device.
Solid Run HummingBoard Carrier Board for iMX6 SOM
| HummingBoard Edge | |
|---|---|
| SOM Model | i.MX6 based Solo to Quad Core SOM |
| Memory and Storage | Up to 2GB DDR3
uSD eMMC (8GB) M.2 (2242)*) |
| Connectivity | 1×RJ-45**
4×USB 2.0 mPCIE with SIM card holder |
| Media | HDMI-Out
MIPI-CSI-2 and MIPI-DSI Parallel Camera (on GPIO header) LVDS Analog Audio |
| I/O | Reset Button
36 pins GPIO Header RTC with battery IR |
| Power | 7V-36V, 5.5mm in (Twist and Lock mechanism) |
| Software | Linux |
| Dimensions (WxL) | 102mm×69mm |
| Enclosure | Optional Metal Enclosure |
The combination of Mainflux’s IoT platform and its MFX-1 EdgeX Gateway will provide
an open source full-featured systemfor IoT solutions development.
The turn-key system is designed for scale, performance, operational efficiency and the ability
to create intelligent products and value-added services across the range of industries.
For the full functionality, special middleware connectors are created both on
the IoT Platform and IoT Edge Gateway side and additional original application
with user-interface for the control and management of the whole IIoT System.
IoT Platform is a remote control of the IoT Edge Gateway, management, storage, advanced analytics
and learning, acting as meta-instance of more immediate processing data needs.


Mafia can kill one player each round. The player will be eliminated if the doctor is unable to save him/her.
The doctor can save any one player per round in the game including himself/herself. If the mafia has selected the same player the doctor has saved, he/she will not be killed and will remain in the game.
The detective can make a guess on any player and will be given the feedback if the guessed player is mafia or not. The detective then can make more emphasis on voting against the mafia during the discussion.
They have to keep an eye on everyone and need to find the mafia otherwise all will be lost and you will lose to mafia.
You can create a game with minimum 4 to maximum of 18 players. To create a game, you need to choose a city or by default, it will be randomly selected. Once the game is created, you will get City Code which you can share with other players who can join this game.
A player can join the game with a Secret City Code only. You can ask the city code from the player who created a new game.
As soon as the minimum number of players are joined which is 4 players, you or anyone who has already joined the game can start the game.
As soon as the game starts, each player is assigned with a character which is chosen randomly. There will be always one of each Mafia, Doctor and Detective and the rest of the players will be citizens.
There can be one or more rounds until the game finishes. Game can end if the mafia is caught or the all the citizens are eliminated by the mafia.
In the beginning of each round, Mafia can chose whom to eliminate, Doctor can save anyone from mafia and the Detective can guess one any one player for finding the mafia.
Once the special actions are taken, the voting will begin. During voting, each player can vote against any other player who he/she suspects of being a mafia. Once all the players are done voting, the player with maximum vote will be eliminated. If that player is Mafia, the citizens win and the game finishes. Else, that player will be dead and the game continues with a new round.
During the game, everyone can chat in the Discuss section of the game. Mind that this can be also read by mafia and it is always important to make your character a secret.
All the activities in the game are available to view in the Activities section of game. These can be activity like when was game created, who joined, who voted whom, current rounds and more. This is important if you are confused or not sure about any action.
The game will end either when the Mafia is caught by a vote out and the citizen wins or when all the citizens are eliminated and mafia wins the game.
You can contact me if you want any new feature or any correction in the game play.


{% extends 'base.html' %} {% block title %}Riddled Road{% endblock %} {% block content %} Play Game
A Road of challenges you will face ahead! Are you up for the task?


Software development in Python, JavaScript, Clojure, Ruby on Rails, and Microsoft .NET
Hello, thanks for visiting. I'm working on a brand new site. For now please visit me on Twitter or on GitHub.
Please email Matt Culbreth for information.


Display Name for type.rdf:
Display Names (each line will be a display name, order matters):
Note: You should be logged in as a user with write premissions to /meta


Docstring:
Usage: qiime diversity beta-phylogenetic [OPTIONS]
Computes a user-specified phylogenetic beta diversity metric for all pairs
of samples in a feature table.
Inputs:
--i-table ARTIFACT FeatureTable[Frequency]
The feature table containing the samples over which
beta diversity should be computed. [required]
--i-phylogeny ARTIFACT Phylogenetic tree containing tip identifiers that
Phylogeny[Rooted] correspond to the feature identifiers in the table.
This tree can contain tip ids that are not present
in the table, but all feature ids in the table must
be present in this tree. [required]
Parameters:
--p-metric TEXT Choices('unweighted_unifrac',
'weighted_normalized_unifrac', 'generalized_unifrac', 'weighted_unifrac')
The beta diversity metric to be computed. [required]
--p-n-jobs INTEGER The number of workers to use. [default: 1]
--p-variance-adjusted / --p-no-variance-adjusted
Perform variance adjustment based on Chang et al.
BMC Bioinformatics 2011. Weights distances based on
the proportion of the relative abundance represented
between the samples at a given node under
evaluation. [default: False]
--p-alpha PROPORTION Range(0, 1, inclusive_end=True)
This parameter is only used when the choice of
metric is generalized_unifrac. The value of alpha
controls importance of sample proportions. 1.0 is
weighted normalized UniFrac. 0.0 is close to
unweighted UniFrac, but only if the sample
proportions are dichotomized. [optional]
--p-bypass-tips / --p-no-bypass-tips
In a bifurcating tree, the tips make up about 50%
of the nodes in a tree. By ignoring them,
specificity can be traded for reduced compute time.
This has the effect of collapsing the phylogeny, and
is analogous (in concept) to moving from 99% to 97%
OTUs [default: False]
Outputs:
--o-distance-matrix ARTIFACT DistanceMatrix % Properties('phylogenetic')
The resulting distance matrix. [required]
Miscellaneous:
--output-dir PATH Output unspecified results to a directory
--verbose / --quiet Display verbose output to stdout and/or stderr
during execution of this action. Or silence output
if execution is successful (silence is golden).
--citations Show citations and exit.
--help Show this message and exit.
Import:
from qiime2.plugins.diversity.methods import beta_phylogenetic
Docstring:
Beta diversity (phylogenetic)
Computes a user-specified phylogenetic beta diversity metric for all pairs
of samples in a feature table.
Parameters
----------
table : FeatureTable[Frequency]
The feature table containing the samples over which beta diversity
should be computed.
phylogeny : Phylogeny[Rooted]
Phylogenetic tree containing tip identifiers that correspond to the
feature identifiers in the table. This tree can contain tip ids that
are not present in the table, but all feature ids in the table must be
present in this tree.
metric : Str % Choices('weighted_unifrac', 'weighted_normalized_unifrac', 'unweighted_unifrac', 'generalized_unifrac')
The beta diversity metric to be computed.
n_jobs : Int, optional
The number of workers to use.
variance_adjusted : Bool, optional
Perform variance adjustment based on Chang et al. BMC Bioinformatics
2011. Weights distances based on the proportion of the relative
abundance represented between the samples at a given node under
evaluation.
alpha : Float % Range(0, 1, inclusive_end=True), optional
This parameter is only used when the choice of metric is
generalized_unifrac. The value of alpha controls importance of sample
proportions. 1.0 is weighted normalized UniFrac. 0.0 is close to
unweighted UniFrac, but only if the sample proportions are
dichotomized.
bypass_tips : Bool, optional
In a bifurcating tree, the tips make up about 50% of the nodes in a
tree. By ignoring them, specificity can be traded for reduced compute
time. This has the effect of collapsing the phylogeny, and is analogous
(in concept) to moving from 99% to 97% OTUs
Returns
-------
distance_matrix : DistanceMatrix % Properties('phylogenetic')
The resulting distance matrix.


Requirement already satisfied: hypothesis in c:\programdata\anaconda3\lib\site-packages (5.8.1)
Requirement already satisfied: sortedcontainers<3.0.0,>=2.1.0 in c:\programdata\anaconda3\lib\site-packages (from hypothesis) (2.1.0)
Requirement already satisfied: attrs>=19.2.0 in c:\programdata\anaconda3\lib\site-packages (from hypothesis) (19.2.0)
The ipython_pytest extension is already loaded. To reload it, use:
%reload_ext ipython_pytest
Unit Testing is a common technique for software engineering. Even if you are not writing a unit test explicitly, you are still doing unit testing, as your function should at least works for what you intended. You give an input x to a function, it should return y, simple as that.
For example, imagine we have a function like this.
def add_ints(x1, x2):return x1 + x2
# Case 1add_ints(1,1)
2
# Case 2add_ints(1,'2')
TypeError: unsupported operand type(s) for +: 'int' and 'str'
# Case 3add_ints('2', '2')
The first two cases are expected behaviors, but the last case is a side-effect of how Python works. We should probably checks the input are numbers, otherwise we should throw error explicitly. Now, checking function behave properly with intend use is easy, to test the opposite is much harder. You have to test a lot of edge case, which is much harder and make your test verbose.
In this article, I will introduce a library called Hypothesis that does property-based testing. If none of this make sense to you, please bare with me, I will explain with simple examples. I found the name of Hypothesis and property-based testing isn’t adding a lot of information, but they are useful.
Hypothesis comes in handy that it generated artificial input to make your test fails. Instead of specifying an input, you specify what kind of input you want to test loosely. For example, if you expect your input is number, often you may want to test when the value is negative, positive, a floating point number, or if it exceeds certain range. This list of condition can expands quickly, and Hypothesis make this easier.
Start with a simple function
Let’s stick with our simple add_ints function above. To keep it simple, let test for this 3 cases first.
Adding two number -> Expect Pass
Adding number and string -> Expect Fail
Adding two number -> Expect Fail
%%pytest # ipython magic to run pytest within a cell. This whole blog is written in a Jupyter Notebook!# https://github.com/akaihola/ipython_pytest/blob/master/ipython_pytest.pyimport pytestdef add_ints(x1, x2):return x1 + x2def test_add_ints():assert add_ints(1,1) ==2@pytest.mark.xfail()def test_add_ints_fail():assert add_ints(1,'2')@pytest.mark.xfail(strict=True)def test_add_ints_string():assert add_ints('2', '2')
In pytest, you can use a mark @pytest.mark.xfail to annotate a function is expected to fail the test. We have 1 pass, 1xfailed, 1 failed.
_ipytesttmp.py .xF indicates the last test is failed. Let’s try to fix it by throwing an error is input type is not a number.
%%pytest # ipython magic to run pytest within a cell. This whole blog is written in a Jupyter Notebook!# https://github.com/akaihola/ipython_pytest/blob/master/ipython_pytest.pyimport pytestdef add_ints(x1, x2):ifisinstance(x1, int) andisinstance(x2, int):return x1 + x2else:raiseTypeError(f'Make sure your input is a number x1 {type(x1)}, x2 {type(x2)}')def test_add_ints():assert add_ints(1,1) ==2@pytest.mark.xfail()def test_add_ints_fail():assert add_ints(1,'2')@pytest.mark.xfail(strict=True)def test_add_ints_string():assert add_ints('2', '2')
Okay, now we checks if input are integers. In reality, this if often an iterative process. You start with coming up with test cases, then every now and then, you hit some edge cases and you add that into your collections of test cases.
How can we make out test cases more robust to input? Hypothesis is exactly the tool you need.
strategy, your auto-genenerated input for unit test
strategy is your input for unit test. Instead of specify a number, or a string, you specify what kind of input you want, and Hypothesis wouuld take care the rest of it. You can even composite different strategies to form more complicated input.
But let’s keep it simple, we would just use integer for this demo.
from hypothesis import strategies as st
%%pytest # ipython magic to run pytest within a cell. This whole blog is written in a Jupyter Notebook!# https://github.com/akaihola/ipython_pytest/blob/master/ipython_pytest.pyimport pytestfrom hypothesis import givenfrom hypothesis import strategies as stdef add_ints(x1, x2):ifisinstance(x1, int) andisinstance(x2, int):return x1 + x2else:raiseTypeError(f'Make sure your input is a number x1 {type(x1)}, x2 {type(x2)}')@given(st.integers(), st.integers())def test_add_ints(x1, x2):assert add_ints(x1, x2)
The test was simple, as should pass as long as no error was thrown. Look what Hypothesis found, it found when both x1, x2=0, the assertion will fail, because we are asserting 0 + 0 = 0, thus evaluated as False in Python.
Hence, I modified my test to not assert anything, it should just keep silent as long as no error is thrown.
%%pytest # ipython magic to run pytest within a cell. This whole blog is written in a Jupyter Notebook!# https://github.com/akaihola/ipython_pytest/blob/master/ipython_pytest.pyimport pytestfrom hypothesis import givenfrom hypothesis import strategies as stdef add_ints(x1, x2):ifisinstance(x1, int) andisinstance(x2, int):return x1 + x2else:raiseTypeError(f'Make sure your input is a number x1 {type(x1)}, x2 {type(x2)}')@given(st.integers(), st.integers())def test_add_ints(x1, x2): add_ints(x1, x2)


EBD - Easton Bible DIctionary
Abda
ABDA
"ABDA "servant. (1.) The father of Adoniram, whom Solomon set over the tribute (
1 Kings 4:6
); i.e., the forced labour (R.V., “levy”).
(2.) A Levite of the family of Jeduthun (
Nehemiah 11:17
), also called Obadiah (
1 Chronicles 9:16
).
"ABDA "servant. (1.) The father of Adoniram, whom Solomon set over the tribute (1 Kings 4:6); i.e., the forced labour (R.V., “levy”).
(2.) A Levite of the family of Jeduthun (Nehemiah 11:17), also called Obadiah (1 Chronicles 9:16).


The practical component of the Introduction to Data Science course relies largely on R programming. Today will center around some of the necessary skills to perform the assignments for this course.
This week’s tutorial will be divided in three parts.
But first things first: Have you all successfully installed R and RStudio? Otherwise, install R first, then install RStudio - or think about updating R, RStudio, and your installed packages.
Have you all registered a free GitHub account? Otherwise, register here.
RStudio is an integrated development environment (IDE) for R. Think of RStudio as a front that allows us to interact, compile, and render R code in a more instinctive way. The following image shows what the standard RStudio interface looks like:
Console: The console provides a means to interact directly with R. You can type some code at the console and when you press ENTER, R will run that code. Depending on what you type, you may see some output in the console or if you make a mistake, you may get a warning or an error message.
Script editor: You will utilize the script editor to complete your assignments. The script editor will be the space where files will be displayed. For example, once you download and open the bi-weekly assignment .Rmd template, it will appear here. The editor is a where you should place code you care about, since the code from the console cannot be saved into a script.
Environment: This area holds the abstractions you have created with your code. If you run myresult <- 5+3+2
, the myresult
object will appear there.
Plots and files: This area will be where graphic output will be generated. Additionally, if you write a question mark before any function, (i.e. ?mean
) the online documentation will be displayed here.
The key to learning R
is: Google! We can give you an overview over basic R
functions, but to really learn R
you will have to actively use it yourself, trouble shoot, ask questions, and google! Help pages such as http://stackoverflow.com offer a rich archive of questions and answers by the R
community. For example, if you google “recode data in r” you will find a variety of useful websites explaining how to do this on the first page of the search results. Also, don’t be surprised if you find a variety of different ways to execute the same task.
RStudio also has a useful help menu. In addition, you can get information on any function or integrated data set in R
through the console, for example:
?plot
In addition, there are a lot of free R
comprehensive guides, such as Quick-R at http://www.statmethods.net or the R
cookbook at http://www.cookbook-r.com.
To execute a single line of code. In RStudio, with the curser in the line you want R
to execute,
Press command + return
(on macOS) or Crtl + Enter
(on Windows).
To execute multiple lines of code at once, highlight the respective portion of the code and then run it using the operations above.
R
You can use R
as a calculator!
| Operator | Example | |
|---|---|---|
| Addition | + |
2+4 |
| Subtraction | - |
2-4 |
| Multiplication | * |
2*4 |
| Division | / |
4/2 |
| Exponentiation | ^ |
2^4 |
| Square Root | sqrt() |
sqrt(144) |
| Absolute Value | abs() |
abs(-4) |
4*9
## [1] 36
sqrt(144)
## [1] 12
| Operator | |
|---|---|
| Less than | < |
| Less than or equal to | <= |
| Greater than | > |
| Greater than or equal to | >= |
| Exactly equal to | == |
| Not equal to | != |
Not x |
!x |
x or y |
x | y |
x and y |
x & y |
Logical operators are incredibly helpful for any type of exploratory analysis, data cleaning and/or visualization task.
4 > 2
## [1] TRUE
4 <= 2
## [1] FALSE
R
stores information as an object. You can name objects whatever you like. Just remember to not use names that are reserved for build-in functions or functions in the packages you use, such as sum
, mean
, or abs
. Most of the time, R
will let you use these as names, but it leads to confusion in your code.
A few things to remember
$
or %
. Common symbols that are used in variable names include .
or _
.R
is case sensitive.<-
. Sometimes you will also see =
as the assignment operator. This is a matter of preference and subject to debate among R
programmers. Personally, I use <-
to assign values to objects and =
within functions.#
symbol is used for commenting and demarcation. Any code following #
will not be executed.Below, R
stores the result of the calculation in an object named result
. We can access the value by referring to the object name.
<- 5/3
result result
## [1] 1.666667
If we assign a different value to the object, the value of the object will be changed.
<- 5-3
result result
## [1] 2
There are four main variable types you should be familiar with:
TRUE
and FALSE
values.R has many data structures, the most important ones for now are:
Here is a short overview with a few related operations that you can apply to the different structures.
<- c(1, 2, 3)
my_vector <- c("Welcome", "everyone")
my_character_vector length(my_vector)
## [1] 3
str(my_character_vector)
## chr [1:2] "Welcome" "everyone"
<- matrix(nrow=3, ncol=3)
my_matrix dim(my_matrix)
## [1] 3 3
<- list(1, "a", TRUE)
my_list 2] my_list[
## [[1]]
## [1] "a"
2]] my_list[[
## [1] "a"
<- data.frame(id = letters[1:10], x = 1:10, y = 11:20)
my_df my_df
Some useful operations to learn something about a data frame - more on this in a moment!
head(my_df)
tail(my_df)
dim(my_df)
nrow(my_df)
ncol(my_df)
str(my_df)
names(my_df)
# direct creation of factors
<- factor(c("single","single","married","married","single"))
my_factor
# turning vectors into factors
<- c("single","single","married","married","single")
my_vector <- as.factor(my_vector)
my_factor
levels(my_factor)
## [1] "married" "single"
If you are thrilled by object classes in R by now, here is more.
Let’s first focus on vectors as building blocks of most data structures you’ll be working with.
A vector is one of the simplest type of data you can work with in R
. “A vector or a one-dimensional array simply represents a collection of information stored in a specific order” (Imai 2017: 14). It is essentially a list of data of a single type (e.g. numerical, character, or logical).
To create a vector, we use the function c()
(`concatenate'') to combine separate data points. The general format for creating a vector in R is as follows:
name_of_vector <- c(“what you want to put into the vector”)`
Suppose, we have data on the population in millions for the five most populous countries in 2016. The data come from the World Bank.
<- c(1379, 1324, 323, 261, 208)
pop1 pop1
## [1] 1379 1324 323 261 208
We can use the function c()
to combine two vectors. Suppose we had data on 5 additional countries.
<- c(194, 187, 161, 142, 127)
pop2 <- c(pop1, pop2)
pop pop
## [1] 1379 1324 323 261 208 194 187 161 142 127
First, lets check which variable type our population data were stored in. The output below tells us that the object pop
is of class numeric, and has the dimensions [1:10]
, that is 10 elements in one dimension.
str(pop)
## num [1:10] 1379 1324 323 261 208 ...
Suppose, we wanted to add information on the country names. We can enter these data in character format. To save time, we will only do this for the five most populous countries.
<- c("CHN", "IND", "USA", "IDN", "BRA")
cname str(cname)
## chr [1:5] "CHN" "IND" "USA" "IDN" "BRA"
Now, lets code a logical variable that shows whether the country is in Asia or not. Note that R
recognizes both TRUE
and T
(and FALSE
and F
) as logical values.
<- c(TRUE, TRUE, F, T, F)
asia str(asia)
## logi [1:5] TRUE TRUE FALSE TRUE FALSE
Lastly, we define a factor variable for the regime type of a country in 2016. This variable can take on one of four values (based on data from the Economist Intelligence Unit): Full Democracy, Flawed Democracy, Hybrid Regimes, and Autocracy. Note that empirically, we don’t have a “hybrid category” here. We could define an empty factor level, but we will skip this step here.
<- c("Autocracy", "FlawedDem", "FullDem", "FlawedDem", "FlawedDem")
regime <- as.factor(regime)
regime str(regime)
## Factor w/ 3 levels "Autocracy","FlawedDem",..: 1 2 3 2 2
Data types are important! R
will not perform certain operations if you don’t get the variable type right. The good news is that we can switch between data types. This can sometimes be tricky, especially when you are switching from a factor to a numerical type.
Sometimes you have to do a work around, like switching to a character first, and then converting the character to numeric. You can concatenate commands: myvar <- as.numeric(as.character(myvar))
.
We won’t go into this too much here; just remember: Google is your friend!
Let’s convert the factor variable regime
into a character. Also, for practice, lets convert the asia
variable to character and back to logical.
<- as.character(regime)
regime str(regime)
## chr [1:5] "Autocracy" "FlawedDem" "FullDem" "FlawedDem" "FlawedDem"
<- as.character(asia)
asia str(asia)
## chr [1:5] "TRUE" "TRUE" "FALSE" "TRUE" "FALSE"
<- as.logical(asia)
asia str(asia)
## logi [1:5] TRUE TRUE FALSE TRUE FALSE
Exercise 1: Why won’t R
let us do the following?
no_good <- (a,b,c)
no_good_either <- c(one, two, three)
Exercise 2: What’s the difference? (Bonus: What do you think is the class of the output vector?)
<-c(TRUE,"TRUE") diff
Exercise 3: What is the class of the following vector?
<- c("1", "2", "3") vec
You can do a variety of things like have R
print out particular values or ranges of values in a vector, replace values, add additional values, etc. We will not get into all of these operations today, but be aware that (for all practical purposes) if you can think of a vector manipulation operation, R
can probably do it.
We can do arithmatic operations on vectors! Let’s use the vector of population counts we created earlier and double it.
pop1
## [1] 1379 1324 323 261 208
<- pop1 * 2
pop1_double pop1_double
## [1] 2758 2648 646 522 416
Exercise 4: What do you think this will do?
<- pop1 + pop2 res
Exercise 5: And this?
<- c(pop1, pop2) pop_c
There are a number of special functions that operate on vectors and allow us to compute measures of location and dispersion of our data.
| Function | |
|---|---|
min() |
Returns the minimum of the values or object. |
max() |
Returns the maximum of the values or object. |
sum() |
Returns the sum of the values or object. |
length() |
Returns the length of the values or object. |
mean() |
Returns the average of the values or object. |
median() |
Returns the median of the values or object. |
var() |
Returns the variance of the values or object. |
sd() |
Returns the variance of the values or object. |
min(pop)
## [1] 127
max(pop)
## [1] 1379
mean(pop)
## [1] 430.6
Exercise 6: Using functions in R
, how else could we compute the mean population value?
There are many ways to access elements that are stored in an object. Here, we will focus on a method called indexing, using square brackets as an operator.
Below, we use square brackets and the index 1
to access the first element of the top 5 population vector and the corresponding country name vector.
1] pop1[
## [1] 1379
1] cname[
## [1] "CHN"
We can use indexing to access multiple elements of a vector. For example, below we use indexing to implicitly print the second and fifth elements of the population and the country name vectors, respectively.
c(2,5)] pop[
## [1] 1324 208
c(2,5)] cname[
## [1] "IND" "BRA"
We can assign the first element of the population vector to a new object called first
.
<- pop[1] first
Below, we make a copy of the country name vector and delete the last element. Note, that we can use the length()
function to achieve the highest level of generalizability in our code. Using length()
, we do not need to know the index of the last element of out vector to drop the last element.
<- cname
cname_copy ## Option 1: Dropping the 5th element
-5] cname_copy[
## [1] "CHN" "IND" "USA" "IDN"
## Option 2 (for generalizability): Getting the last element and dropping it.
length(cname_copy)
## [1] 5
-length(cname_copy)] cname_copy[
## [1] "CHN" "IND" "USA" "IDN"
Indexing can be used to alter values in a vector. Suppose, we notice that we wrongly entered the second element of the regime type vector (or the regime type changed).
regime
## [1] "Autocracy" "FlawedDem" "FullDem" "FlawedDem" "FlawedDem"
2] <- "FullDem"
regime[ regime
## [1] "Autocracy" "FullDem" "FullDem" "FlawedDem" "FlawedDem"
Exercise 7: We made even more mistakes when entering the data! We want to subtract 10 from the third and fifth element of the top 5 population vector. How would you do it?
The myriad of functions that are either built-in to base R
or parts of user-written packages are the greatest stength of R
. For most applications we encounter in our daily programming practice, R
already has a function, or someone smart wrote one. Below, we introduce a few additional helpful functions from base R
.
| Function | |
|---|---|
seq() |
Returns sequence from input1 to input2 by input3. |
rep() |
Repeats input1 input2 number of times. |
names() |
Returns the names (labels) of objects. |
which() |
Returns the index of objects. |
Let’s create a vector of indices for our top 5 population data.
<- seq(from = 1, to = length(pop1), by = 1)
cindex cindex
## [1] 1 2 3 4 5
Suppose we wanted to only print a sequence of even numbers between 2 and 10. We can do so by adjusting the by
operator.
seq(2, 10, 2)
## [1] 2 4 6 8 10
We can use the rep()
function to repeat data.
rep(30, 5)
## [1] 30 30 30 30 30
Suppose, we wanted to record whether we had completed the data collection process for the top 10 most populous countries. First, suppose we completed the process on every second country.
<- rep(c("yes","no"), 5)
completed completed
## [1] "yes" "no" "yes" "no" "yes" "no" "yes" "no" "yes" "no"
Now suppose that we have completed the data collection process for the first 5 countries, but not the latter 5 countries (we don’t have their names, location, or regime type yet).
<- rep(c("yes","no"), each = 5)
completed2 completed2
## [1] "yes" "yes" "yes" "yes" "yes" "no" "no" "no" "no" "no"
We can give our data informative labels. Let’s use the country names vector as labels for our top 5 population vector.
names(pop1)
## NULL
cname
## [1] "CHN" "IND" "USA" "IDN" "BRA"
names(pop1) <- cname
names(pop1)
## [1] "CHN" "IND" "USA" "IDN" "BRA"
pop1
## CHN IND USA IDN BRA
## 1379 1324 323 261 208
We can use labels to access data using indexing and logical operators. Suppose, we wanted to access the population count for Brazil in our top 5 population data.
names(pop1) == "BRA"] pop1[
## BRA
## 208
Exercise 8 Access all top 5 population ratings that are greater or equal than the mean value of population ratings.
Exercise 9 Access all top 5 population ratings that are less than the population of the most populous country, but not the US.
We did not work with data frames yet, but remember that our data input is ordered. The first element of the pop1
vector corresponds with the first element of the cname
, regime
, and asia
vectors. We can use this to run more sophisticated queries on our data.
Suppose, we wanted to know the regime type of Indonesia. Given that our vectors are ordered, we can use indexing to extract the data. First, lets see what happens if we run a simple logical query.
== "IDN" cname
## [1] FALSE FALSE FALSE TRUE FALSE
== "IDN"] regime[cname
## [1] "FlawedDem"
We can also use the which()
function that returns the index of the vector element.
which(cname == "IDN")
## [1] 4
which(cname == "IDN")] regime[
## [1] "FlawedDem"
Using logical statements, we can run more complex queries. Below, we print the population count for all Asian countries within the top 5 most populous countries that are not autocracies.
== T & regime != "Autocracy"] pop1[asia
## IND IDN
## 1324 261
For the most part, R Packages are collections of code and functions that leverage R programming to expand on the basic functionalities. There are a plethora of packages in R designed to facilitate the completion of tasks, built by the R community. In later parts of this course, you will also learn how to write packages yourself.
Unlike other programming languages, in R you only need to install a package once. The following times you will only need to load the package. As a good practice I recommend running the code to install packages only in your R console, not in the code editor. You can install a package with the following syntax
install.packages("name_of_your_package") #note that the quotation marks are mandatory at this stage
Once the package has been installed, you just need to “call it” every time you want to use it in a file by running:
library("name_of_your_package") #either of this lines will require the package
library(name_of_your_package) #library understands the code with, or without, quotation marks
It is extremely important that you do not have any lines installing packages for your assignments because the file will fail to knit
The working directory is just a file path on your computer that sets the default location of any files you read into R, or save out of R. Normally, when you open RStudio it will have a default directory (a folder in your computer). You can check you directory by running getwd()
in your console:
#this is the default in my case
getwd()
#[1] "/Users/l.oswald"
When your RStudio is closed and you open a file from your finder in MacOS or file explorer in Windows, the default working directory will be the folder where the file is hosted
You can set you directory manually from RStudio: use the menu to change your working directory under Session > Set Working Directory > Choose Directory.
You can also use the setwd()
function:
setwd("/path/to/your/directory") #in macOS
setwd("c:/path/to/your/directory") #in windows
Another option that allows you to circumvent the folder structure mess to some degree are R Projects. We highly recommend working in Projects because they are easily integrated with Git - something you will discover in the lecture tomorrow!
Time for more examples!
Below, we will use use the foreign
package to import a .csv file. To make the foreign
package available for use, install it and then use the library()
command to load it. While packages need to be installed only once, the library()
command needs to be run every time you want to use a particular package. On many machines, the foreign
package is pre-installed. We install it above for practice purposes.
#install.packages("foreign") #alternatively use "Install" button
library(foreign)
In this example, we will use a subset of data from the Armed Conflict Location & Event Data Project (ACLED), which offers real-time data and analysis on political violence and protests around the world. The ACLED_countries.csv
dataset includes the count of riot and protest events from January 2000 to December 2019 for many countries.1
Most data formats we commonly use are not native to R
and need to be imported. Luckily, there is a variety of packages available to import just about any non-native format. One of the essential libraries is called foreign
and includes functions to import .csv, .dta (Stata), .dat, ,.sav (SPSS), etc.
<- read.csv("ACLED_countries.csv",
mydata stringsAsFactors = F)
Let’s now go a bit deeper with data frames, a structure you’ll probably encounter every time you work with R
.
Let’s find out what these data look like. First, use the str()
function to explore the variable names and which data class they are stored in. Note: int
stands for integer
and is a special case of the class numeric
.
str(mydata)
## 'data.frame': 103 obs. of 5 variables:
## $ country : chr "Afghanistan" "Albania" "Algeria" "Angola" ...
## $ region : chr "Southern Asia" "Europe" "Northern Africa" "Middle Africa" ...
## $ nconflicts : int 40765 582 7362 1108 3118 12627 1861 16802 293 215 ...
## $ nconflict_no_fatalities: int 23946 581 5321 728 3110 12578 1846 13114 293 165 ...
## $ fatalities : int 119973 1 8451 13788 8 59 22 4640 0 114 ...
If we are only interested in what the variables are called, we can use the names()
function.
names(mydata)
## [1] "country" "region"
## [3] "nconflicts" "nconflict_no_fatalities"
## [5] "fatalities"
We can alter the names of vectors by using the names()
function and indexing. Because data frames are essentially just combinations of vectors, we can do the same for variable names inside data frames. Suppose we want to change the variable nconflicts
.
names(mydata)[3] <- "nconflict"
names(mydata)
## [1] "country" "region"
## [3] "nconflict" "nconflict_no_fatalities"
## [5] "fatalities"
We can use the summary()
function to get a first look at the data.
summary(mydata)
## country region nconflict
## Length:103 Length:103 Min. : 1.0
## Class :character Class :character 1st Qu.: 315.5
## Mode :character Mode :character Median : 1250.0
## Mean : 6216.3
## 3rd Qu.: 5993.5
## Max. :70734.0
## nconflict_no_fatalities fatalities
## Min. : 1 Min. : 0.0
## 1st Qu.: 289 1st Qu.: 17.5
## Median : 1037 Median : 236.0
## Mean : 4667 Mean : 9543.3
## 3rd Qu.: 4536 3rd Qu.: 7020.0
## Max. :63665 Max. :119973.0
A data frame has two dimensions: rows and columns.
nrow(mydata) # Number of rows
## [1] 103
ncol(mydata) # Number of columns
## [1] 5
dim(mydata) # Rows first then columns.
## [1] 103 5
As a rule, whenever we use two-dimensional indexing in R
, the order is: [row, column]
. To access the first row of the data frame, we specify the row we want to see and leave the column slot following the comma empty.
1, ] mydata[
We can use the concatenate function c()
to access multiple rows (or columns) at once. Below we print out the first and second row of the dataframe.
c(1,2), ] mydata[
We can also access a range of rows by separating the minimum and maximum value with a :
. Below we print out the first five rows of the dataframe.
1:5,] mydata[
If we try to access a data point that is out of bounds, R
returns the value NULL
.
3,7] mydata[
## NULL
Exercise 10 Access the element of the dataframe mydata
that is stored in row 1, column 1.
Exercise 11 Access the element of the data frame mydata
that is stored in column 3, row 100.
$
operatorThe $
operator in R
is used to specify a variable within a data frame. This is an alternative to indexing.
which(colnames(mydata) == "nconflict")
## [1] 3
3] mydata[,
## [1] 40765 582 7362 1108 3118 12627 1861 16802 293 215 459 52
## [13] 765 2105 7760 1919 2621 4625 912<PHONE_NUMBER>9 112 10260
## [25] 50<PHONE_NUMBER><PHONE_NUMBER> 858 1312 1121 151 67561
## [37] 3371 5708 22354 1580 1838<PHONE_NUMBER> 289 39 319 41
## [49] 2956 83 1294 8857 1365<PHONE_NUMBER> 598<PHONE_NUMBER>
## [61] 1250 9070 682 5143 971 15011 275 9 54496 6568 9690 5
## [73] 243 1134 3734 370 6096 963 1275 1079 29667 11667 6227 2
## [85] 3855 12528 70734 68 782 7420 321 5756 1 10334 21 4866
## [97] 30131 4<PHONE_NUMBER>8 1148 5891
$nconflict mydata
## [1] 40765 582 7362 1108 3118 12627 1861 16802 293 215 459 52
## [13] 765 2105 7760 1919 2621 4625 912<PHONE_NUMBER>9 112 10260
## [25] 50<PHONE_NUMBER><PHONE_NUMBER> 858 1312 1121 151 67561
## [37] 3371 5708 22354 1580 1838<PHONE_NUMBER> 289 39 319 41
## [49] 2956 83 1294 8857 1365<PHONE_NUMBER> 598<PHONE_NUMBER>
## [61] 1250 9070 682 5143 971 15011 275 9 54496 6568 9690 5
## [73] 243 1134 3734 370 6096 963 1275 1079 29667 11667 6227 2
## [85] 3855 12528 70734 68 782 7420 321 5756 1 10334 21 4866
## [97] 30131 4<PHONE_NUMBER>8 1148 5891
table()
functionThe table()
function can be used to tabularize one or more variables. For example, lets find out how many observations (i.e. individual countries) we have per region.
table(mydata$region)
##
## Caucasus and Central Asia Eastern Africa Europe
## 8 13 15
## Middle Africa Middle East Northern Africa
## 8 15 7
## South-Eastern Asia Southern Africa Southern Asia
## 8 8 6
## Western Africa
## 15
Using logical operations, we can create more complex tabularizations. For example, below, we show how many countries have above average number of conflict events per region.
summary(mydata$nconflict)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.0 315.5 1250.0 6216.3 5993.5 70734.0
table(mydata$region, mydata$nconflict > mean(mydata$nconflict))
##
## FALSE TRUE
## Caucasus and Central Asia 7 1
## Eastern Africa 9 4
## Europe 14 1
## Middle Africa 7 1
## Middle East 10 5
## Northern Africa 3 4
## South-Eastern Asia 5 3
## Southern Africa 7 1
## Southern Asia 2 4
## Western Africa 14 1
Exercise 12: How would you access all elements of the variable country
using indexing rather than the $
operator?
Exercise 13: How would you find the maximum value for number of events using the $
operator?
Exercise 14: Print the country that corresponds to the maximum world population value using the $
operator and indexing!
Exercise 15: Print out every second element from the variable country
using indexing methods and the sequence function seq()
.
R
NA
is how R
denotes missing values. For certain functions, NA
s cause problems.
<- c(4, 1, 2, NA, 3)
vec mean(vec) #Result is NA!
## [1] NA
sum(vec) #Result is NA!
## [1] NA
We can tell R
to remove the NA and execute the function on the remainder of the data.
mean(vec, na.rm = T)
## [1] 2.5
sum(vec, na.rm = T)
## [1] 10
First, lets add another observation to the data. Suppose we wanted to add an observation for Germany, which will be a missing value. We can use the same operations we used for vectors to add data. Here, we will use the rbind()
function to do so. rbind()
stands for “row bind.” Save the output in a new data frame!
<- c("Germany", "Europe", NA, NA, NA)
obs <- rbind(mydata, obs)
mydata_new dim(mydata_new)
## [1] 104 5
We can also create new variables that use information from the existing data. If we know the number of conflict events without fatalities by country, we can calculate the number of conflict events with fatalities to generate the variable nconflict_fatalities
. By using the $
operator, we can directly assign the new variable to the data frame mydata_new
.
$nconflict_fatalities <- mydata$nconflict - mydata$nconflict_no_fatalities
mydatahead(mydata, 3) #prints out the first 3 rows of the data frame
We could also compute the average number of fatalities per conflict, computed as the sum of fatalities (fatalities
variable) divided by the number of conflicts (nconflict
variable).
$av_fatalities <- mydata$fatalities/mydata$nconflict mydata
Suppose we want to figure out which country in Northern Africa has the highest number of riot and protest events. We can figure this out by first subsetting our dataset to only include countries in the region, then looking up the maximum value for nconflict
. Below, we assign the output to a new object called mydata_na
.
<- mydata[mydata$region == "Northern Africa",]
mydata_na max(mydata_na$nconflict)
## [1] 12528
$country[mydata_na$nconflict == max(mydata_na$nconflict)] mydata_na
## [1] "Sudan"
Suppose we wanted to save this newly created data frame. We have multiple options to do so. If we wanted to save it as a native .RData
format, we would run the following command.
# Make sure you specified the right working directory!
save(mydata, file = "mydata_new.RData")
Most of the time, however, we would want to save our data in formats that can be read by other programs as well. .csv
is an obvious choice.
write.csv(mydata_new, file = "mydata_new.csv")
Errors in R occur when code is used in a way that it is not intended. For example when you try to add two character strings, you will get the following error:
"hello" + "world"
in "hello" + "world": non-numeric argument to binary operator Error
Normally, when something has gone wrong with your program, R will notify you of an error in the console. There are errors that will prevent the code from running, while others will only produce warning messages. In the following case, the code will run, but you will notice that the string “three” is turned into a NA.
as.numeric(c("1", "2", "three"))
: NAs introduced by coercion
Warning1] 1 2 NA [
Since we will be utilizing widely used packages and functions in the course of the semester, the errors that you may come across in the process of completing your assignments will be common for other R users. Most errors occur because of typos. A Google search of the error message can take you a long way as well. Most of the times the first entry on stackoverflow.com will solve the problem.
You may have noted in the previous section that the functions were preceded by their package name and two colons, for example: readr::read_rds()
. The double colon operator ::
helps us ensure that we select functions from a particular package. We utilize the operator to explicitly state where the function is coming. This may become even more important when you are doing data analysis as part of a team further in your careers. Though it is likely that this will not be a problem during the course, we can try to employ the following convention package_name::function()
to ensure that we will not encounter errors in our knitting process:
::select() dplyr
Let’s look at what happens when we load tidyverse
.
library(tidyverse)
#── Attaching packages ──────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 #──
#✓ ggplot2 3.3.2 ✓ purrr 0.3.4
#✓ tibble 3.0.3 ✓ dplyr 1.0.2
#✓ tidyr 1.1.2 ✓ stringr 1.4.0
#✓ readr 1.3.1 ✓ forcats 0.5.0
#── Conflicts ─────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() #──
#x dplyr::filter() masks stats::filter()
#x dplyr::lag() masks stats::lag()
You may notice that R points out some conflicts where some functions are being masked. The default in this machine will become the filter()
from the dplyr
package during this session. If you were to run some code that is based on the filter()
from the stats
package, your code will probably result in errors.
Let us conclude the tutorial with some notes on best practices in R. There is a multitude of collections on best practices online, for example, some very useful ones are here.
When structuring your scripts, remember a few things
In summary, we can say: always use easy to interpret names and don’t use whitespaces in file or variable names! Some good examples:
It is somewhat easier to read if you generally leave a space after a comma
When you start copying and pasting code (creating a lot of redundancy), you might want to consider slimming down your code by creating a function. Functions? Let us leave this as a note of caution and return to functions and efficient code in one of our very last sessions! :-)
Again, the key to learning R
is: Google! We can only give you an overview over basic R
functions, but to really learn R
you will have to actively use it yourself, trouble shoot, ask questions, and google! It is very likely that someone else has had the exact same or just similar enough issue before and that the R community has answered it with 5+ different solutions years ago. 😉
For those of you who have yet to create a Github account, do so now.
Next week’s session will be about version control and project management with Git and Github. Please download and install Github desktop on your machine! See you next week! 💻
This script draws heavily on the materials for the Introduction to R workshop within the Data Science Seminar series at Hertie, created by Therese Anders.
Economist Intelligence Unit (2017): Democracy Index. https://infographics.economist.com/2017/DemocracyIndex/.
Imai, Kosuke (2017): Quantitative Social Science. An Introduction. Princeton and Oxford: Princeton University Press.
Raleigh, Clionadh, Andrew Linke, Håvard Hegre and Joakim Karlsen. 2010. Introducing ACLED – Armed Conflict Location and Event Data. Journal of Peace Research 47(5), 651-660.
World Bank (2017): Population, total. https://data.worldbank.org/indicator/sp.pop.totl?end=2016&start=2015.
ACLED uses the following definition: “A protest describes a non-violent, group public demonstration, often against a government institution. Rioting is a violent form of demonstration,” see Raleigh, C. and C. Dowd (2015): Armed Conflict Location and Event Data Project (ACLED) Codebook.)↩
A work by Lisa Oswald & Tom Arend
Prepared for Intro to Data Science, taught by Simon Munzert


Willing to work on challenging environment which fuels my aspiration. Expert in meeting the deadline without comprising the quality of the work done.
To secure a position in an organization in which the final deliverable will be the improvement of the organization and mine by using combination of my both technical and managerial skills.
Working as Software Engineer in TronX(an Artificial Intelligence app) team.
One of the core full stack developers of Integration team, which works on integrating third party applications out of the box to the application.
Did Internship in Java for three months and worked in a servlet project called Hotel Infinity.
Successfully completed bachelor degree in Electronics and Communication Engineering.
Completed 12th-standard Higher Secondary schooling with 75.5%.
Completed 10th Standard with 90.1%.
Chennai,
Tamilnadu -600069
<EMAIL_ADDRESS>+91<PHONE_NUMBER>


Sylvanian Families Hawthorn White Mouse Family
UK Biography Information
Father Hickery Hawthorn is a very happy-go-lucky mouse and is quite content to go with the flow and fit in with eveyone else's plans.
Mother Imogen Hawthorn is one for getting up early and making a start on cleaning the house and preparing breakfast. She is always making plans and organising the family's week, with a visit here and a trip there.
Brother Bryce Hawthorn is just like his dad. Quiet, thoughtful and always easy to please, he wouldn't say 'boo' to a goose. But put him on a football pitch and he turns into a little devil, who's loud and aggressive.
Sister Laurel Hawthorn is a very busy little girl. In between practising her signature and learning 'Twinkle, Twinkle Little Star' on the piano, she insists on helping her mother cook fairy cakes and her father with DIY jobs around the house. That's why her bedroom is in such a mess, she has no time to keep it tidy!


Use this to create a link bar that sends the user within the page. Make sure your headings match the links that sent them to the section!
TODO: Upstream this into the style guide itself.
(Custom addition to the Brigade website)
We're a national alliance of community organizers, developers, and designers that are putting technology to work in service of our local communities. We believe that government can work, for the people, by the people, in the digital age, if we all help.


|
OR-Tools
7.1
Google Optimization software suite
|
#include <constraint_solver.h>
Public Member Functions | |
| IntervalVar (Solver *const solver, const std::string &name) | |
| ~IntervalVar () override | |
| virtual int64 | StartMin () const =0 |
| virtual int64 | StartMax () const =0 |
| virtual void | SetStartMin (int64 m)=0 |
| virtual void | SetStartMax (int64 m)=0 |
| virtual void | SetStartRange (int64 mi, int64 ma)=0 |
| virtual int64 | OldStartMin () const =0 |
| virtual int64 | OldStartMax () const =0 |
| virtual void | WhenStartRange (Demon *const d)=0 |
| void | WhenStartRange (Solver::Closure closure) |
| void | WhenStartRange (Solver::Action action) |
| virtual void | WhenStartBound (Demon *const d)=0 |
| void | WhenStartBound (Solver::Closure closure) |
| void | WhenStartBound (Solver::Action action) |
| virtual int64 | DurationMin () const =0 |
| virtual int64 | DurationMax () const =0 |
| virtual void | SetDurationMin (int64 m)=0 |
| virtual void | SetDurationMax (int64 m)=0 |
| virtual void | SetDurationRange (int64 mi, int64 ma)=0 |
| virtual int64 | OldDurationMin () const =0 |
| virtual int64 | OldDurationMax () const =0 |
| virtual void | WhenDurationRange (Demon *const d)=0 |
| void | WhenDurationRange (Solver::Closure closure) |
| void | WhenDurationRange (Solver::Action action) |
| virtual void | WhenDurationBound (Demon *const d)=0 |
| void | WhenDurationBound (Solver::Closure closure) |
| void | WhenDurationBound (Solver::Action action) |
| virtual int64 | EndMin () const =0 |
| virtual int64 | EndMax () const =0 |
| virtual void | SetEndMin (int64 m)=0 |
| virtual void | SetEndMax (int64 m)=0 |
| virtual void | SetEndRange (int64 mi, int64 ma)=0 |
| virtual int64 | OldEndMin () const =0 |
| virtual int64 | OldEndMax () const =0 |
| virtual void | WhenEndRange (Demon *const d)=0 |
| void | WhenEndRange (Solver::Closure closure) |
| void | WhenEndRange (Solver::Action action) |
| virtual void | WhenEndBound (Demon *const d)=0 |
| void | WhenEndBound (Solver::Closure closure) |
| void | WhenEndBound (Solver::Action action) |
| virtual bool | MustBePerformed () const =0 |
| virtual bool | MayBePerformed () const =0 |
| bool | CannotBePerformed () const |
| bool | IsPerformedBound () const |
| virtual void | SetPerformed (bool val)=0 |
| virtual bool | WasPerformedBound () const =0 |
| virtual void | WhenPerformedBound (Demon *const d)=0 |
| void | WhenPerformedBound (Solver::Closure closure) |
| void | WhenPerformedBound (Solver::Action action) |
| void | WhenAnything (Demon *const d) |
| void | WhenAnything (Solver::Closure closure) |
| void | WhenAnything (Solver::Action action) |
| virtual IntExpr * | StartExpr ()=0 |
| virtual IntExpr * | DurationExpr ()=0 |
| virtual IntExpr * | EndExpr ()=0 |
| virtual IntExpr * | PerformedExpr ()=0 |
| virtual IntExpr * | SafeStartExpr (int64 unperformed_value)=0 |
| virtual IntExpr * | SafeDurationExpr (int64 unperformed_value)=0 |
| virtual IntExpr * | SafeEndExpr (int64 unperformed_value)=0 |
| virtual void | Accept (ModelVisitor *const visitor) const =0 |
| Public Member Functions inherited from operations_research::PropagationBaseObject | |
| PropagationBaseObject (Solver *const s) | |
| ~PropagationBaseObject () override | |
| std::string | DebugString () const override |
| Solver * | solver () const |
| void | FreezeQueue () |
| void | UnfreezeQueue () |
| void | EnqueueDelayedDemon (Demon *const d) |
| void | EnqueueVar (Demon *const d) |
| void | ExecuteAll (const SimpleRevFIFO< Demon * > &demons) |
| void | EnqueueAll (const SimpleRevFIFO< Demon * > &demons) |
| void | set_action_on_fail (Solver::Action a) |
| void | reset_action_on_fail () |
| void | set_variable_to_clean_on_fail (IntVar *v) |
| virtual std::string | name () const |
| void | set_name (const std::string &name) |
| bool | HasName () const |
| virtual std::string | BaseName () const |
| Public Member Functions inherited from operations_research::BaseObject | |
| BaseObject () | |
| virtual | ~BaseObject () |
Static Public Attributes | |
| static const int64 | kMinValidValue |
| static const int64 | kMaxValidValue |
Definition at line 4334 of file constraint_solver.h.
|
inline |
Definition at line 4340 of file constraint_solver.h.
|
inlineoverride |
Definition at line 4344 of file constraint_solver.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 4356 of file constraint_solver.h.
|
inline |
Definition at line 4360 of file constraint_solver.h.
|
pure virtual |
|
inline |
Definition at line 4365 of file constraint_solver.h.
|
inline |
Definition at line 4369 of file constraint_solver.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 4383 of file constraint_solver.h.
|
inline |
Definition at line 4387 of file constraint_solver.h.
|
pure virtual |
|
inline |
Definition at line 4392 of file constraint_solver.h.
|
inline |
Definition at line 4396 of file constraint_solver.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 4410 of file constraint_solver.h.
|
inline |
Definition at line 4414 of file constraint_solver.h.
|
pure virtual |
|
inline |
Definition at line 4419 of file constraint_solver.h.
|
inline |
Definition at line 4423 of file constraint_solver.h.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 4432 of file constraint_solver.h.
|
inline |
Definition at line 4433 of file constraint_solver.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 4439 of file constraint_solver.h.
|
inline |
Definition at line 4443 of file constraint_solver.h.
| void operations_research::IntervalVar::WhenAnything | ( | Demon *const | d | ) |
|
inline |
Definition at line 4451 of file constraint_solver.h.
|
inline |
Definition at line 4456 of file constraint_solver.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
static |
Definition at line 4337 of file constraint_solver.h.
|
static |
Definition at line 4339 of file constraint_solver.h.


--- layout: tweet ---
Adding twitter to blog sidebar... then on to lunch
11/24/2007, 10:44:58 AM
Favs: 0
Retweets: 0


Incoming EU chief again urges UK to nominate commissioner
BRUSSELS, Nov 12 — The incoming president of the European Commission wrote to UK Prime Minister Boris Johnson for a second time today to urge him to nominate a British commissioner, a spokeswoman said.
Ursula von der Leyen hopes to head a 28-strong team of top officials from each of the EU member states in time for her commission to take office on December 1.
But Johnson, who has vowed to take Britain out of the bloc before January 31, is fighting a British election campaign on a pro-Brexit ticket and has yet to respond.
Briefing reporters, von der Leyen spokeswoman Dana Spinant confirmed the British government had not replied to an earlier urgent letter calling for a nominee.
“This is the reason why this morning the president-elect has sent another letter to the UK government reminding it of its legal obligations under the treaty,” Spinant said.
In addition to his obligations under the EU treaty, Johnson also committed to the principle that he must supply a nominee when he accepted an extension to the Brexit deadline.
But, while British officials stress they will meet their “legal obligations”, the government has not given any sign of who might be proposed for an EU post.
“Time is running out. This is why the president-elect is expecting an answer very soon to this second letter and at any rate before the end of this week,” Spinant said.
After a tricky start that saw three of von der Leyen’s nominees rejected by lawmakers, she now has 27 names from other EU states to bring before parliament and is waiting on the last one to be suggested by London.
The commission’s investiture has already been delayed from November 1. Officials refuse to say how they will proceed if Britain does not come up with a nominee soon. — AFP


The $59 ONE Mini Pocket is an AI-powered handheld translator
We all have a bit of wanderlust in us, but the language barrier is one of the biggest things that prevents us from visiting foreign countries. Luckily, the magic of AI makes it possible to converse with native speakers without fear of miscommunication. If you need to satisfy your desire to roam, or if you have a friend that enjoys traveling, the ONE Mini Pocket Multilingual Assistant is the perfect holiday gift for just $59.
The ONE Mini is a handheld device that allows you to converse with foreign language speakers in real-time. It uses AI and a live interpreter service to translate 12 languages, including Spanish, French, and Japanese, so you’ll be able to hail a cab, order food, make new friends, and much more with ease. Additionally, the ONE Mini can transcribe audio recordings using speech recognition, making it easy to study words, phrases, or even entire sentences that you’ll hear frequently while traveling.
 You can grab one on sale today for $59, or 40% off.
Prices subject to change
Don’t wait for Black Friday—you can get these top-sellers at deep discounts today!


assigned
by Jane Sandberg at 2022-06-30 12:43:46.labeled
by Kevin Reiss at 2022-06-30 12:45:02.labeled
by Kevin Reiss at 2022-06-30 12:45:02.labeled
by Jane Sandberg at 2022-06-30 16:29:47.referenced
by Christina Chortaria at 2022-06-30 16:32:23.merged
by Christina Chortaria at 2022-06-30 16:32:23.closed
by Christina Chortaria at 2022-06-30 16:32:23.head_ref_deleted
by Christina Chortaria at 2022-06-30 16:32:24.Note that this will require nodejs 14 or higher
labeled
by Jane Sandberg at 2022-06-30 22:49:47.referenced
by Christina Chortaria at 2022-06-30 22:58:42.merged
by Christina Chortaria at 2022-06-30 22:58:42.closed
by Christina Chortaria at 2022-06-30 22:58:42.head_ref_deleted
by Christina Chortaria at 2022-06-30 22:58:42.head_ref_force_pushed
by Jane Sandberg at 2022-06-30 22:59:46.referenced
by Christina Chortaria at 2022-06-30 23:17:41.merged
by Christina Chortaria at 2022-06-30 23:17:41.closed
by Christina Chortaria at 2022-06-30 23:17:41.head_ref_deleted
by Christina Chortaria at 2022-06-30 23:17:42.head_ref_force_pushed
by Jane Sandberg at 2022-06-30 23:00:10.referenced
by Christina Chortaria at 2022-06-30 23:19:02.merged
by Christina Chortaria at 2022-06-30 23:19:03.closed
by Christina Chortaria at 2022-06-30 23:19:03.head_ref_deleted
by Christina Chortaria at 2022-06-30 23:19:03.I retried this upgrade today, and it seems to be deploying now. Could you please re-review @maxkadel ?
head_ref_force_pushed
by Jane Sandberg at 2022-06-30 21:19:01.deployed
by None at 2022-06-30 21:19:49.head_ref_force_pushed
by Jane Sandberg at 2022-06-30 23:01:01.mentioned
by Max Kadel at 2022-06-30 23:05:56.subscribed
by Max Kadel at 2022-06-30 23:05:56.see also https://github.com/pulibrary/princeton_ansible/issues/3038
In order to fix this error we need to https://github.com/pulibrary/bibdata/issues/1867
We also thought that sqs-poller was not running by doing https://github.com/pulibrary/princeton_ansible/pull/3044.
Will review why this change that worked at some point doesn't work anymore https://github.com/pulibrary/princeton_ansible/issues/3041. https://github.com/pulibrary/princeton_ansible/pull/3044
Temporarily I manually ignored the error and stopped recording data.
head_ref_force_pushed
by Eliot Jordan at 2022-06-30 16:54:03.head_ref_force_pushed
by Eliot Jordan at 2022-06-30 17:32:21.head_ref_force_pushed
by Eliot Jordan at 2022-06-30 19:58:18.Put this in the wrong repo. Opening one in approvals.
assigned
by Jane Sandberg at 2022-06-29 23:58:17.closed
by Kevin Reiss at 2022-06-30 12:44:05.entered in wrong repo. Closing.
closed
by Kevin Reiss at 2022-06-30 12:45:20.closed
by Max Kadel at 2022-06-30 17:12:49.Tested on staging, appeared to be working.
deployed
by None at 2022-06-30 16:37:58.ready_for_review
by Max Kadel at 2022-06-30 17:12:08.referenced
by Max Kadel at 2022-06-30 17:12:49.merged
by Max Kadel at 2022-06-30 17:12:49.closed
by Max Kadel at 2022-06-30 17:12:50.head_ref_deleted
by Max Kadel at 2022-06-30 17:12:51.Tested on staging, working as expected
deployed
by None at 2022-06-30 17:15:14.ready_for_review
by Max Kadel at 2022-06-30 17:23:20.This can be merged at your convenience. I will be turning the job back on in Alma on July 7th.
ready_for_review
by Jane Sandberg at 2022-06-30 22:31:49.referenced
by Christina Chortaria at 2022-06-30 22:34:23.merged
by Christina Chortaria at 2022-06-30 22:34:23.closed
by Christina Chortaria at 2022-06-30 22:34:23.head_ref_deleted
by Christina Chortaria at 2022-06-30 22:34:24.Temporarily I manually ignored the error and stopped recording data.
assigned
by Max Kadel at 2022-06-30 15:04:40.Coverage remained the same at 94.184% when pulling ff3b3f178ef9605d065a4f9a7e2ec7b4580a3c15 on patron_barcode into 2d915eaddeb22c1b8e171d3b9e68fd5cc01b6cea on main.
deployed
by None at 2022-06-30 15:24:20.head_ref_force_pushed
by Max Kadel at 2022-06-30 18:00:29.closed
by Jane Sandberg at 2022-06-30 22:05:30.review_requested
by Christina Chortaria at 2022-06-30 21:55:36.referenced
by Jane Sandberg at 2022-06-30 22:05:29.merged
by Jane Sandberg at 2022-06-30 22:05:29.closed
by Jane Sandberg at 2022-06-30 22:05:30.head_ref_deleted
by Jane Sandberg at 2022-06-30 22:05:31.mentioned
by Kevin Reiss at 2022-07-01 00:34:25.subscribed
by Kevin Reiss at 2022-07-01 00:34:25.mentioned
by Esmé Cowles at 2022-07-01 00:34:25.subscribed
by Esmé Cowles at 2022-07-01 00:34:25.deployed
by None at 2022-06-30 18:08:28.deployed
by None at 2022-06-30 18:16:58.deployed
by None at 2022-06-30 19:38:12.ready_for_review
by Hector Correa at 2022-06-30 19:49:03.mentioned
by Hector Correa at 2022-06-30 21:42:51.subscribed
by Hector Correa at 2022-06-30 21:42:51.assigned
by Hannah H at 2022-06-30 21:43:42.Once I actually upgrade webpack things go wrong. I believe there is a conflict between the configuration that webpacker is supplying and what webpack wants. I think the real thing we should do is remove webpacker and just utilize webpack. I'm closing this PR as it does not help the situation.
mentioned
by Bess Sadler at 2022-06-30 11:49:21.subscribed
by Bess Sadler at 2022-06-30 11:49:21.renamed
by None at 2022-06-30 11:49:56.head_ref_force_pushed
by None at 2022-06-30 12:06:32.head_ref_force_pushed
by None at 2022-06-30 12:21:21.closed
by None at 2022-06-30 12:36:53.Looks good @carolyncole. There is a few typos that I think should be fixed but other than that looks good to me.
head_ref_force_pushed
by None at 2022-06-30 11:43:38.mentioned
by None at 2022-06-30 13:46:27.subscribed
by None at 2022-06-30 13:46:27.referenced
by Bess Sadler at 2022-06-30 15:29:50.merged
by Bess Sadler at 2022-06-30 15:29:50.closed
by Bess Sadler at 2022-06-30 15:29:50.head_ref_deleted
by Bess Sadler at 2022-06-30 15:29:51.The change https://github.com/pulibrary/princeton_ansible/pull/3044 doesn't seem to work anymore.
reopened
by Christina Chortaria at 2022-06-30 00:40:45.labeled
by Christa Cleeton at 2022-06-30 14:35:00.closed
by None at 2022-06-30 14:50:30.deployed
by None at 2022-06-30 12:55:12.ready_for_review
by None at 2022-06-30 14:50:20.referenced
by None at 2022-06-30 20:00:35.merged
by None at 2022-06-30 20:00:35.closed
by None at 2022-06-30 20:00:35.head_ref_deleted
by None at 2022-06-30 20:00:36.Looks like composer/composer is up-to-date now, so this is no longer needed.
closed
by None at 2022-06-30 20:01:19.head_ref_deleted
by None at 2022-06-30 20:01:20.


--- layout: page title: About header-img: "img/about-bg.png" ---
Recent college grad trying to get a handle on Full Stack Web Development.


Americano
- 3 cl Campari
- 3 cl Red Vermouth
- A splash of Soda Water
The cocktail was first served in creator Gaspare Campari's bar, Caffè Campari, in the 1860s...
Bee's Knees
- 2 oz Gin
- 3/4 oz Lemon juice
- 3/4 oz Honey
Like many prohibition-era cocktails, the Bee's Knees was invented as a way to hide...
Between the Sheets
- 3 cl White rum
- 3 cl Cognac
- 3 cl Triple sec
- 2 cl Lemon juice
The origin of the cocktail is usually credited...
Black Russian
- 5 cl Vodka
- 2 cl Coffee liqueur
This combination first appeared in 1949, and is ascribed to Gustave Tops, a Belgian barman, who created it at the Hotel Metropole in...
Mint Julep
- 6 cl Bourbon whiskey
- 4 Mint leaves
- 1 tsp Sugar
- 1 cl Water
The mint julep was originally prescribed...
Moscow Mule
- 4.5 cl Vodka
- 0.5 cl Lime juice
- 12 cl Ginger beer
The cocktail was invented in 1941 by John G. Martin of G.F. Heublein Brothers, Inc.,...
Rose
- 4 cl Dry vermouth
- 2 cl Kirsch
- 3 dashes Strawberry syrup
The Rose cocktail was popular in 1920's Paris and was created by Johnny Mitta, barman...


{{msg}}
{%endfor%} {%endif%} {%endwith%}Note: Enter total price as cost and selling price. Not the price per unit
| Request ID | Job ID | Date of Request | Time of Request | Part Name | Units | Cost Price | Selling Price | {%for job in requests%} {%for row in job%}
|---|
{% extends "base.html" %}{%block content%}
{{msg}}
{%endfor%} {%endif%} {%endwith%}| Request ID | Job ID | Date of Request | Time of Request | Part Name | Units | Cost Price | Selling Price | {%for job in requests%} {%for row in job%}
|---|


| Attribute |
Public UNAVAILABLE
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public FOG
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public SMOKE
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public HEAVY_SNOWFALL
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public HEAVY_RAIN
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public HEAVY_HAIL
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public LOW_SUN_GLARE
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public SANDSTORMS
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|
Public SWARMS_OF_INSECTS
|
Details:
| Alias: |
|
| Initial: |
|
| Stereotype: |
<<enum>> |
| Ordered: |
|
| Range: |
|
| Transient: |
False |
| Derived: |
False |
| IsID: |
False |
|