--- layout: post title: Event Density Plot tagline: ... I wonder what this is really called ... categories: computer python datascience tags: python data science plot event density ---
I want to visualize how many concurrent events exist in a time period along with how frequently they start and end. I don’t need to read numbers off the visualization, I just want to get a relative sense of how many events are starting, ongoing, and ending over a time period with some resolution. Something that looks like this:
Looking at the plot, you can immediately see when:
With that information the reader can ask the next questions in more useful ways:
Those questions aren’t about the data directly, but about the application of the data, which is what data are for (despite people loving it for its own sake sometimes) and they aren’t obvious from the input data (Table 1).
To start, I create some fake data with this Python script where all time is between 1 and 100, there are 20 events, and the longest event duration is 30. If it helps you can think of these numbers as seconds after 4:15am on Thursday, June 16th, 2016. Or days after January 1st, 2000. It doesn’t matter.
import random from tabulate import tabulate data = [] for m in range(1,20): start = random.randint(1,70) end = start + random.randint(1,30) data.append((start,end)) data.sort() print tabulate(data, tablefmt="orgtbl", headers=(["Start","End"]))
| Start | End |
|---|---|
| 6 | 11 |
| 7 | 27 |
| 8 | 35 |
| 10 | 11 |
| 13 | 37 |
| 14 | 35 |
| 22 | 34 |
| 24 | 36 |
| 28 | 51 |
| 31 | 59 |
| 33 | 34 |
| 36 | 47 |
| 36 | 58 |
| 42 | 51 |
| 42 | 51 |
| 44 | 66 |
| 53 | 74 |
| 69 | 95 |
| 69 | 96 |
The next step is to see how many events are active, starting, and ending at each time over all time (1–100 in our case).
This next bit of Python simply bins the data from the table above into our 100 example time bins, which I won’t make you read through, but you’ll need to bin your data in a similar way. The format of the data is:
| Time | Number of Events | Number of Events | Number of Events |
| Ending at this time | Ongoing at this time | Starting at this time |
For example, if the frequency of your events is a few every minute, your binned data might look like:
| Time | Ending | Ongoing | Starting |
|---|---|---|---|
| 13:50 | 4 | 10 | 3 |
| 13:51 | 2 | 11 | 1 |
| 13:52 | 0 | 12 | 4 |
| 13:53 | 8 | 8 | 2 |
| 13:54 | 1 | 9 | 4 |
although, since there is no data displayed for the x-axis (the time), it is a lot easier to convert the time into relative time. In this example, the times could be 49800, 49860, 49920, etc. Or if you have a date, using the Unix epoch time (seconds since 00:00:00 UTC 1 January 1970) makes things easy.
timebin = dict() startbin = dict() endbin = dict() for timeincr in range(1, 101): timebin[timeincr] = 0 startbin[timeincr] = 0 endbin[timeincr] = 0 for s, e in timedata: if s == timeincr: startbin[timeincr] += 1 if e == timeincr: endbin[timeincr] += 1 if s <= timeincr and e >= timeincr: if timeincr in timebin: timebin[timeincr] += 1 for m in sorted(timebin): print "|{} | {} | {} | {}".format(m, endbin[m], timebin[m], startbin[m])
Once we have our bins, then it’s a matter of makeing a density plot over time for each of the three events (starting, ongoing, and ending).
import matplotlib.pyplot as plt def makebarplot(bins): time = [b[0] for b in bins] # extract the x-axis data fig = plt.figure() # get the matplotlib plot figure fig.set_size_inches(8, 1) # set the size of the plot ax = fig.add_subplot(1, 1, 1) # add a plot to the figure; Subplot # is confusing, though. The magical "(1, 1, 1)" here means there # will be one row, one column, and we are working with plot number # 1, all of which is the same as just one plot. There is a little # more documentation on this at: # http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.subplot fig.patch.set_visible(False) # make the background transparent # turn off the borders (called spines) ax.spines['top'].set_visible(False) ax.spines['bottom'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['left'].set_visible(False) # set all of the ticks to 0 length ax.tick_params(axis=u'both', which=u'both',length=0) # hide everything about the x-axis ax.axes.get_xaxis().set_visible(False) barwidth = 1 # remove gaps between bars color = ["red", "blue", "green"] # set the colors for for row in range(1, len(color)+1): # make as many rows as colors # extract the correct column ongoing = [b[row] for b in bins] # scale the data to the maximum ongoing = [c/float(max(ongoing)) for c in ongoing] # draw a black line at the left end left = 10 border_width = 20 d = border_width ax.barh(row, d, barwidth, color="black", left=left, edgecolor="none", linewidth=0) left += d # fill in the horizontal bar with the right color density # (alpha) for d, c in zip(time, ongoing): ax.barh(row, d, barwidth, alpha=0.9*c+.01, color=color[row-1], left=left, edgecolor="none", linewidth=0) left += d # draw a black line at the right end d = border_width ax.barh(row, d, barwidth, color="black", left=left, edgecolor="none", linewidth=0) # label the rows plt.yticks([1.5, 2.5, 3.5], ['stopping', 'ongoing', 'starting'], size=10) # return the plot to __main__ return plt # do some housekeeping that makes it all go in OrgMode (and hence PDF # and HTML) if __name__ == "__main__": plt = makebarplot(bins) # The file extension controls the output format; .png and .pdf are # good choices along with .svg filename="edplot.svg" plt.savefig(filename) return filename
And now you can see the number of starting events in green, the number of ongoing events in blue, and the number of ending events in red. The darker the color, the more events of that type are happening at that time, hence the name, event density plot.
This could pretty readily be a Python class, and may be that
someday, but for now the makebarplot
function is sufficient and
hopefully easy to understand and translate to the language of your
choice.
I would also like to include more examples, but thought that would be as likely to add confusion as clarity.


Documentation Title
This documentation generator utilizes JSON to load or store data.
| Name |
Foo
|
|---|---|
| Description | Usually followed by Bar. |
| Fields | |
id |
Standard identification. |
| Required: false |


Photo manipulation involves transforming or altering a photograph using various methods and techniques to achieve desired results.
Web design refers to the design of websites that are displayed on the internet. A web designer works on the appearance, layout, and, in some cases, content of a website.
A transcription service is a business service which basically refers to the transformation of speech(videos, films,interviews, audio) into a text format(electronic document).


|
MetroCon is a one-day technical
conference hosted annually by the IEEE Fort Worth Section since 1986.
Now into its 20th year, MetroCon seeks to educate engineers in the
Dallas/Fort Worth Metroplex on the latest developments in science,
engineering, and technology. Click below to see some past MetroCon
programs:
|
|


Overview
- Definition: what is readability?
- Research statement
- Related works
- Approach
- Future works
- Conclusion
Related works
- Readability formulas
- Machine learning
- Simple Wikipedia
Early readability research
20ᵗʰ century research was centered around formulas to
estimate if a text is readable ot not.
An efficient set of features
Most formulas use a combination of:
- average number of words per sentence
- average number of syllables per word
- presence of the word in a list of easy words
An example
Dale–Chall readability formula (Dale and Chall, 1949):
$0.1579 \left(\frac{\text{difficult
words}}{\text{words}}
\times100 \right)
+ 0.0496
\left(\frac{\text{words}}{\text{sentences}}\right)$
Related works
- Readability formulas
- Machine learning
- Simple Wikipedia
The tasks
| Classical task |
Machine learning task |
| Score a text |
Regression |
| Sort texts on readability |
Regression, classification on pairs of
documents |
| Assign a required grade to a text |
Classification with grades as labels |
| Regroup texts of similar readability |
Clustering |
Language model approach
Schwarm and Ostendorf, 2005:
- bigrams and trigrams LM alone
- combination in a SVM of:
- LM perplexities
- readability formulas
- syntactic features
Complex features
Pitler and Nenkova, 2008:
- unigram model
- lexical cohesion (cosine similiarity averaged over
all sentences)
- syntactic features (as Schwarm and Ostendorf)
- entity coherence (analyse the subjects / objects of
consecutive sentences)
- language model over discourse relations
→ proves the superiority of discourse relations over
average lengths of sentences and
words. But discourse relations are not
yet easily computable.
Related works
- Readability formulas
- Machine learning
- Simple Wikipedia
Simple English Wikipedia (SEW)
- Wikipedia written in simple english
- goal is:
- to use only the 1000 most common words in English
- to keep sentences short
- 100 000 articles
Transformation example
From the “Baseball uniform” pages:
- SEW: On April 4, 1849, the New York
Knickerbockers became the first team to use uniforms.
- EW: The New York Knickerbockers
were the first baseball team to wear uniforms, taking
the field on April 4, 1849 in pants made of blue wool,
white flannel shirts and straw hats.
Comparable corpora
EW ~$\parallel$ SEW
(Zhu et al., 2010)
- align EW and SEW versions of a same article
- gather the differences to compute a non-readable →
readable corpus
- 100 000 pairs of sentences
Revision history
(Yatskar et al., 2010)
- use EW and SEW revision histories
- gather differences between two consecutive revisions
if the modification is about readability
Overview
- Definition: what is readability?
- Research statement
- Related works
- Approach
- Future works
- Conclusion
Approach
- Overview
- Readability Lab
- Corpus creation
- Simplifications scoring
- Fine-grained readability measure
- Text rewriting
Overview
Approach
- Overview
- Readability Lab
- Corpus creation
- Simplifications scoring
- Fine-grained readability measure
- Text rewriting
Approach
- Overview
- Readability Lab
- Corpus creation
- Simplifications scoring
- Fine-grained readability measure
- Text rewriting
Corpus creation
Motivation
Free readability corpora are based on comparable
corpora. We propose a free corpus based on revision
history.
Reasons:
- general process
- easily extensible outside of wikipedia (copy-editing)
Corpus creation
Methodology
We use previously known methods:
- SEW edit history
- align the sentences with a `diff` program
The corpus itself and the related tooling are freely
available
Corpus metrics
~36 000 entries. ~25 000 occur only once and
~18 000 / ~21 000 originals have only one readable
equivalent.
Approach
- Overview
- Readability Lab
- Corpus creation
- Simplifications scoring
- Fine-grained readability measure
- Text rewriting
Simplifications
dictionary creation
Objective is to score the translations in the corpus we
created: with $\mathcal{P}$ the set of English phrases,
go from a corpus $\mathcal{C} \subset \mathcal{P} \times
\mathcal{P}$ to a simplification dictionary $\mathcal{D}
\subset \mathcal{P} \times \mathcal{P} \times
\mathbb{R}$.
→ need to define score functions $\mathcal{P} \times \mathcal{P} \rightarrow \mathbb{R}$
Properties of good scores
We are looking for good lexical simplifications. When
we score the simplification $(s, t)$:
- the less common $s$, the higher $\mathcal{S}(s, t)$
marvelous → good > ok → good
- the more common $(s, t)$ in $\mathcal{C}$, the
higher $\mathcal{S}(s, t)$
- the more common $t$, the higher $\mathcal{S}(s, t)$
marvelous → good > marvelous → wonderful
How rare is $s$ ?
Direct language model score is not enough ($P_{LM}\big(s\big)$):
- “exhausted” would likely have a higher LM score than “I am”
- we want to rewrite “exhausted”, not “I am”
→ average by $s$ length: $\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}$
How common is
$(s, t)$ in $\mathcal{C}$ ?
We can answer with two probabilities:
- $P_\mathcal{C}\big((s, t)\big) =
\frac{\lvert\left\{(s, t) \,\middle|\, (s, t) \in
\mathcal{C}\right\}\rvert}{\lvert\mathcal{C}\rvert}$
- $P_\mathcal{C}\big((s, t)\big|s\big) =
\frac{\lvert\left\{(s, t) \,\middle|\, (s, t) \in
\mathcal{C}\right\}\rvert}{\lvert\left\{(s, t')
\,\middle|\, t' \in \mathcal{P} \land (s, t') \in
\mathcal{C}\right\}\rvert}$
Scores using (2.) have $c$ index, for $c$onditional.
How common is $t$ ?
Two worthy definitions:
- $P_{LM}\big(t\big)$ to allow only for short simplifications
- $\sqrt[\lvert t \rvert]{P_{LM}\big(t\big)}$ to allow for paraphrases
Scores using any of (1.) or (2.) have a $d$ index, for
$d$ouble language model.
Scores using (2.) have a $w$ index, for weighted
Approach
- Overview
- Readability Lab
- Corpus creation
- Simplifications scoring
- Fine-grained readability measure
- Text rewriting
A general framework
Recursive combination of readability scores with 3 functions:
- $\pi$ to handle the different scores of a sentence part
- $\sigma$ to handle the parts of a sentence
- $\theta$ to handle the sentences of a text
$\begin{align*}
f(t) = \theta\Bigg(& \Bigg\{ \sigma \left(\left\{ \pi(s)| x \subset sent \land (x, y, s) \in \mathcal{D}\right\}\right)
\\
& \Bigg|\, \text{$sent$ is a sentence in $t$} \Bigg\}\Bigg)
\end{align*}$
An application
We construct $f_{max}$ with:
- $\pi = \max$
- $\sigma = \max$
- $\theta = \mathrm{average}$
in English: $f_{max}$ averages the maximum of the
sentences lexical improvement scores to assess the
readability of a text.
$\pi$ scoring
↓
$\sigma$ scoring
↓
$\theta$ scoring
↓
Interest
- fine-grained analysis when needed
- still usable as a readability score for the complete
text
Approach
- Overview
- Readability Lab
- Corpus creation
- Simplifications scoring
- Fine-grained readability measure
- Text rewriting
Text rewriting
We can use our lexicon to rewrite text: with weighted transducers.
Weighted Transducers
example
Weighted Transducers
Combining weights
| score with + |
score with min |
output |
| 0 |
0 |
I'm exhausted |
| -0.9 |
-0.9 |
I'm tired |
| -3.2 |
-3.2 |
I am exhausted |
| -4.1 |
-3.2 |
I am tired |
Score $\mathcal{S}$
$\begin{align}
\mathcal{S}(s, t) & = \log \frac{P_\mathcal{D}\big((s, t)\big)^{\lambda_1}}
{\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}^{\lambda_2}} \\
& = \lambda_1 \log P_\mathcal{D}\big((s, t)\big) - \lambda_2 \log
\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)} \end{align}$
Score $\mathcal{S}_c$
$c$ for conditional
$\mathcal{S}(s, t) = \log \frac{P_\mathcal{D}\big((s, t) \,\big|\, s\big)^{\lambda_1}}
{\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}^{\lambda_2}}$
Score $\mathcal{S}_d$
$d$ for double language model
$\mathcal{S}(s, t) = \log \frac{P_\mathcal{D}\big((s, t)\big)^{\lambda_1}
P_{LM}\big(t\big)^{\lambda_3}}
{\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}^{\lambda_2}}$
Score $\mathcal{S}_{dc}$
$\mathcal{S}(s, t) = \log \frac{P_\mathcal{D}\big((s, t) \,\big|\, s\big)^{\lambda_1}
P_{LM}\big(t\big)^{\lambda_3}}
{\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}^{\lambda_2}}$
Score $\mathcal{S}_{wd}$
$w$ for weighted replacement
$\mathcal{S}(s, t) = \log \frac{P_\mathcal{D}\big((s, t)\big)^{\lambda_1}
\sqrt[\lvert t \rvert]{P_{LM}\big(t\big)}^{\lambda_3}}
{\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}^{\lambda_2}}$
Score $\mathcal{S}_{wdc}$
$\mathcal{S}(s, t) = \log \frac{P_\mathcal{D}\big((s, t) \,\big|\, s\big)^{\lambda_1}
\sqrt[\lvert t \rvert]{P_{LM}\big(t\big)}^{\lambda_3}}
{\sqrt[\lvert s \rvert]{P_{LM}\big(s\big)}^{\lambda_2}}$


Cubr
Your browser does not support the HTML5 canvas tag.
Cubr: The webcam-interactive rubik's cube solver
50 Rotations
200 Rotations
1000 Rotations
No Tutorial
Tutorial


# NetMHCstabpan version 1.0 # Input is in FSA format # Peptide length 8 Error. HLA-B39:90 cannot be found in hla_pseudo list /tools/src/netMHCstabpan-1.0/Linux_x86_64/data/MHC_pseudo.dat


Coverage Summary for Class: DistributionSchedule (org.apache.bookkeeper.client)
| Class | Method, % | Line, % |
|---|---|---|
| DistributionSchedule | 0% (0/ 1) | 0% (0/ 1) |
| DistributionSchedule$1 | 0% (0/ 11) | 0% (0/ 11) |
| DistributionSchedule$AckSet | ||
| DistributionSchedule$QuorumCoverageSet | ||
| DistributionSchedule$WriteSet | ||
| total | 0% (0/ 12) | 0% (0/ 12) |
1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18 package org.apache.bookkeeper.client;
19
20 import java.util.BitSet;
21 import java.util.Map;
22
23 import org.apache.bookkeeper.net.BookieSocketAddress;
24
25 /**
26 * This interface determins how entries are distributed among bookies.
27 *
28 * <p>Every entry gets replicated to some number of replicas. The first replica for
29 * an entry is given a replicaIndex of 0, and so on. To distribute write load,
30 * not all entries go to all bookies. Given an entry-id and replica index, an
31 * {@link DistributionSchedule} determines which bookie that replica should go
32 * to.
33 */
34
35 public interface DistributionSchedule {
36
37 /**
38 * A write set represents the set of bookies to which
39 * a request will be written.
40 * The set consists of a list of indices which can be
41 * used to lookup the bookie in the ensemble.
42 */
43 interface WriteSet {
44 /**
45 * The number of indexes in the write set.
46 */
47 int size();
48
49 /**
50 * Whether the set contains the given index.
51 */
52 boolean contains(int i);
53
54 /**
55 * Get the index at index i.
56 */
57 int get(int i);
58
59 /**
60 * Set the index at index i.
61 * @return the previous value at that index.
62 */
63 int set(int i, int index);
64
65 /**
66 * Sort the indices.
67 */
68 void sort();
69
70 /**
71 * Index of a specified bookie index.
72 * -1 if not found.
73 */
74 int indexOf(int index);
75
76 /**
77 * If we want a write set to cover all bookies in an ensemble
78 * of size X, then all of the index from 0..X must exist in the
79 * write set. This method appends those which are missing to the
80 * end of the write set.
81 */
82 void addMissingIndices(int maxIndex);
83
84 /**
85 * Move an index from one position to another,
86 * shifting the other indices accordingly.
87 */
88 void moveAndShift(int from, int to);
89
90 /**
91 * Recycle write set object when not in use.
92 */
93 void recycle();
94
95 /**
96 * Make a deep copy of this write set.
97 */
98 WriteSet copy();
99 }
100
101 WriteSet NULL_WRITE_SET = new WriteSet() {
102 @Override
103 public int size() {
104 return 0;
105 }
106 @Override
107 public boolean contains(int i) {
108 return false;
109 }
110 @Override
111 public int get(int i) {
112 throw new ArrayIndexOutOfBoundsException();
113 }
114 @Override
115 public int set(int i, int index) {
116 throw new ArrayIndexOutOfBoundsException();
117 }
118 @Override
119 public void sort() {}
120 @Override
121 public int indexOf(int index) {
122 return -1;
123 }
124 @Override
125 public void addMissingIndices(int maxIndex) {
126 throw new ArrayIndexOutOfBoundsException();
127 }
128 @Override
129 public void moveAndShift(int from, int to) {
130 throw new ArrayIndexOutOfBoundsException();
131 }
132 @Override
133 public void recycle() {}
134 @Override
135 public WriteSet copy() {
136 return this;
137 }
138 };
139
140 /**
141 * Return the set of bookie indices to send the message to.
142 */
143 WriteSet getWriteSet(long entryId);
144
145 /**
146 * Return the set of bookies indices to send the messages to the whole ensemble.
147 *
148 * @param entryId entry id used to calculate the ensemble.
149 * @return the set of bookies indices to send the request.
150 */
151 WriteSet getEnsembleSet(long entryId);
152
153 /**
154 * An ack set represents the set of bookies from which
155 * a response must be received so that an entry can be
156 * considered to be replicated on a quorum.
157 */
158 interface AckSet {
159 /**
160 * Add a bookie response and check if quorum has been met.
161 * @return true if quorum has been met, false otherwise
162 */
163 boolean completeBookieAndCheck(int bookieIndexHeardFrom);
164
165 /**
166 * Received failure response from a bookie and check if ack quorum
167 * will be broken.
168 *
169 * @param bookieIndexHeardFrom
170 * bookie index that failed.
171 * @param address
172 * bookie address
173 * @return true if ack quorum is broken, false otherwise.
174 */
175 boolean failBookieAndCheck(int bookieIndexHeardFrom, BookieSocketAddress address);
176
177 /**
178 * Return the list of bookies that already failed.
179 *
180 * @return the list of bookies that already failed.
181 */
182 Map<Integer, BookieSocketAddress> getFailedBookies();
183
184 /**
185 * Invalidate a previous bookie response.
186 * Used for reissuing write requests.
187 */
188 boolean removeBookieAndCheck(int bookie);
189
190 /**
191 * Recycle this ack set when not used anymore.
192 */
193 void recycle();
194 }
195
196 /**
197 * Returns an ackset object, responses should be checked against this.
198 */
199 AckSet getAckSet();
200
201 /**
202 * Returns an ackset object useful to wait for all bookies in the ensemble,
203 * responses should be checked against this.
204 */
205 AckSet getEnsembleAckSet();
206
207 /**
208 * Interface to keep track of which bookies in an ensemble, an action
209 * has been performed for.
210 */
211 interface QuorumCoverageSet {
212 /**
213 * Add a bookie to the result set.
214 *
215 * @param bookieIndexHeardFrom Bookie we've just heard from
216 */
217 void addBookie(int bookieIndexHeardFrom, int rc);
218
219 /**
220 * check if all quorum in the set have had the action performed for it.
221 *
222 * @return whether all quorums have been covered
223 */
224 boolean checkCovered();
225 }
226
227 QuorumCoverageSet getCoverageSet();
228
229 /**
230 * Whether entry presents on given bookie index.
231 *
232 * @param entryId
233 * - entryId to check the presence on given bookie index
234 * @param bookieIndex
235 * - bookie index on which it need to check the possible presence
236 * of the entry
237 * @return true if it has entry otherwise false.
238 */
239 boolean hasEntry(long entryId, int bookieIndex);
240
241 /**
242 * Get the bitset representing the entries from entry 'startEntryId' to
243 * 'lastEntryId', that would be striped to the bookie with index -
244 * bookieIndex. Value of the bit with the 'bitIndex+n', indicate whether
245 * entry with entryid 'startEntryId+n' is striped to this bookie or not.
246 *
247 * @param bookieIndex
248 * index of the bookie in the ensemble starting with 0
249 * @param startEntryId
250 * starting entryid
251 * @param lastEntryId
252 * last entryid
253 * @return the bitset representing the entries that would be striped to the
254 * bookie
255 */
256 BitSet getEntriesStripedToTheBookie(int bookieIndex, long startEntryId, long lastEntryId);
257 }


|
qml-ar
|
This class scales images. More...
#include <imagescaler.h>
Public Slots | |
| void | setInput (PipelineContainer< QImage > source) |
| Set new input to the scaler. More... | |
| void | handleResult () |
| Called when separate thread finishes. | |
| Public Slots inherited from ImageProviderAsync | |
| void | setActive (bool active) |
| Make this object active/inactive. More... | |
Public Member Functions | |
| ImageScaler (int target_width) | |
| ImageScaler constructor. More... | |
| QImage | requestImage (const QString &id, QSize *size, const QSize &requestedSize) |
| requestImage for QML | |
| QImage | scale (QImage source) |
| scale image More... | |
| ImageScaler (const ImageScaler &that) | |
| ImageScaler copy contructor. | |
| ImageScaler () | |
| ImageScaler constructor. | |
| Public Member Functions inherited from ImageProviderAsync | |
| ImageProviderAsync () | |
| ImageProviderAsync constructor. | |
Additional Inherited Members | |
| Signals inherited from ImageProviderAsync | |
| void | imageAvailable (PipelineContainer< QImage > image) |
| imageAvailable emitted when new image is ready More... | |
| Protected Attributes inherited from ImageProviderAsync | |
| bool | is_active = true |
| Describes if the object is currently active. | |
This class scales images.
| ImageScaler::ImageScaler | ( | int | target_width | ) |
ImageScaler constructor.
| target_width | The requested image width |
| QImage ImageScaler::scale | ( | QImage | source | ) |
scale image
| source | input image |
|
slot |
Set new input to the scaler.
| source | the unscaled QImage |


| Test case | Description |
|---|---|
| Functest | Umbrella project for Functional testing |
| Yardstick | Umbrella project for performance/qualification testing |
| CPerf | SDN controller performance testing |
| StorPerf | Storage performance testing |
| VSPerf | VSwitch qualification |
| Bottlenecks | Detect possible bottlenecks |
| QTIP | Benchmark to boost performance |


| DOSE: |
9 hits |
smoked |
Cannabis |
(plant material) |
For a long time, I will admit, I was ignorant of what marijuana was.  I'd seen people smoke it a few times in the past, of course, and had been subsequently offered as per the normal etiquette, but I never said yes.
For the sake of ignorance, I didn't think weed could have any reason whatsofuckingever to be legalized.
And on to the story.
I had to try it!   My neighbor in the dorms, I'll call him T from this point forward, had said, 'Hey, we got some dank pot. You in?' I had some studying in the way at the time, so it wasn't the right time to try it. I was wary of the possibility that I could get fuckin' freaked and paranoid, and a bit out of it.
A couple days later, T offered again with the same pot (at least, that was my understanding). I said, 'Sure!'
Excited, T responded, 'Yes! Awesome! That's what I wanted to hear!' Or something to that effect.   He told some other people who happened to be around, and they were all excited as well.
 They handed me the pipe. They were all really cool about it, making sure I knew what the hell I was supposed to do (I did, fortunately) and wanted to make sure I got high.    I was glad to find out later that it never got that goddamned rough on the lungs again, thank God.
I proceeded to wait. They were obviously having a pretty damn good little stoned moment, while I was kind of out of their circle, because I didn't feel like I was high.
I was a little dissappointed. They told me, 'Nah, it's cool man, you'll get high your next time, or the time after. It happens.' So they continued to talk, laugh, and just generally be fuckin' ripped. Suddenly, out of nowhere, I felt a bizarre tingling sensation in my head and in my leg. I said 'Uh, hey guys, I think I'm getting something...'
All of their eyes darted to my direction. 'What are you feeling?'
I suddenly got struck by lightning. I felt the tingle all over, and it didn't feel good.  I felt like my whole body was the same way, only a lot worse.   More than ever, in fact.
I told them that I didn't like what I was going through and that it was too intense.  It did not. I guess I felt, on top of all that other shit, that I was a little tired or something, because somehow, it got suggested that I go to sleep. They helped me to my room next door.  Not just because of what was going on in my head and all over, but because I wanted to experience it.  One of them did suggested that I do this, and I was rather apathetically, saying something like, 'Yeah, I'm thinking the same, I think I'll tough this bullshit out and hope for the best.'
We walked around the dorms a little, visiting some people we knew. It was obvious that I was completely ripped.
It did get better almost immediately when we wanted to walk around, which was roughly a half hour into the experience. I started to walk around with a stoned-ass grin on my face, stumbling around a little. I started to feel pretty cool about it. Awesome! Everything became a little more interesting to me. When we got to a higher level and walked across the balcony, I looked down and said, in a very baked tone, 'Wooooowwww, the ground is soooo far awayyyyyy...'
T responded, of course, 'He's baked!'  We didn't do this for very long, though, and I eventually parted ways with them because I got hungry!
This was when I started to enjoy it. I went to the on-campus store and got some very good ice cream and a chocolate bar.  I woke him up because I turned the light on and he ordered me to turn it off.

Confounded, he responded, 'What? Crackhead.'
I found it simply hilarious that he would call me a crackhead when I had been smoking pot.  I laughed for what was, no exagerration, TEN minutes. I'm a guy who doesn't naturally laugh very much.
I did my best to explain why I was laughing and he understood a little better.  So I ate the ice cream and chocolate, and then had some straight peanut butter, and even eventually made an entire peanut butter sandwich.  The sensations were more vibrant. It was amazing.
I left the room and starting wandering around and making everyone who I happened to see and know be a part of what was inevitably the first of many.
I went back to my room and my roommate, who by the way, has his hair dyed blue, was on the computer and awake this time around. I stopped in my tracks when I entered the room, and mumbled, 'blue...'
He went, 'What?'
I then, in a very bizarre fashion, responded, 'YOU. BLUE.'   I of course, laughed for another ten minutes straight.
 It lasted about four hours altogether.  It had it all - stoned paranoia, stoned laughter, stoned retardation, stoned munchies. You name it, I encompassed and epitomized it. In the end I was feeling a little sad, because I visited a girl and she broke some news to me that wasn't pleasing to hear. Not major or anything, but being high made it troubling and my emotions were also a little more vibrant. I think the comedown from what was essentially a trip with weed made it more depressing than it really was. I wasn't smiling too much at that point, but I haven't since had such a bad 'comedown' with weed, fortunately.
 And I definitely want to thank Erowid for being as unbiased a source on drugs, politics, drug politics, etc. as there is.
Plus, I believe anyone out there can be convinced of why marijuana should be legalized. I have since given my skinny on it, and every single time, I have gotten the usual ignorant replies which are not appropriate topic to go into here, but by showing them the facts I am often able to convince them.

Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Raphael Essence
Home
About Raphael Essence
Contact Us
Contact Us
Lorem ipsum dolor sit amet nullam id egestas urna aliquam
Form
- Category -
Manufacturing
Shipping
Administration
Human Resources
Low Priority
Normal Priority
High Priority
Email me a copy of this message
I am a human and not a robot


“ It's not at all important to get it right the first time. It's vitally important to get it right the last time. ”
Self taught coder, I can program in different languages like Python, Java, HTML, CSS, JavaScript, Ruby, Ruby on Rails, C and C++, Haskel and also have knowledge of Embedded System programming of VHDL, Assembely and Verilog. JavaScript Libraries - jQuerry, AngularJS. CSS Libraries - Bootstrap, animate.css
Project Coming Soon
Project Coming Soon
Project Coming Soon
Project Coming Soon
Project Coming Soon
Project Coming Soon
Project Coming Soon
Project Coming Soon
Project Coming Soon


HiveLink
Linking Service for Hive Websites. Use the links as follows:
- https://hivel.ink/@author/permalink
- or https://hivel.ink/topic/@author/permalink
- or for a user https://hivel.ink/@user
- you can also add ?force_select to the end, if you want us to not used their saved choice
- Read More in the Announcement


I would like to get a notification email once every , at most.
I would like to get top conversations email once every , at most.


We implement a manual universe selection model that supplies a subset of the proposed ETFs in the attached research paper. Gao et al (2017) select the following tickers: DIA, QQQ, IWM, EEM, FXI, EFA, VWO, XLF, IYR, and TLT. In an effort to increase the backtest performance, we narrow our universe to SPY, IWM, and IYR.
tickers = ['SPY', # S&P 500 'IWM', # Russell 2000 'IYR' # Real Estate ETF ] symbols = [ Symbol.Create(ticker, SecurityType.Equity, Market.USA) for ticker in tickers ] self.SetUniverseSelection( ManualUniverseSelectionModel(symbols) ) self.UniverseSettings.Resolution = Resolution.Minute
The IntradayMomentumAlphaModel emits insights to take positions for the last `return_bar_count` minutes of the day in the direction of the return for the first `return_bar_count` minutes of the day. During construction, we create a dictionary to store IntradayMomentum data for each symbol, define a method to determine the sign of returns, and specify the value of `return_bar_count`. In this tutorial, we follow Gao et al (2017) in setting `return_bar_count` to 30 by default.
class IntradayMomentumAlphaModel(AlphaModel): intraday_momentum_by_symbol = {} sign = lambda _, x: int(x and (1, -1)[x < 0]) def __init__(self, algorithm, return_bar_count = 30): self.return_bar_count = return_bar_count
When a new security is added to the universe, we create an IntradayMomentum object for it to store information needed to calculate morning returns. The management of the IntradayMomentum objects occurs in the alpha model's OnSecuritiesChanged method.
def OnSecuritiesChanged(self, algorithm, changes): for security in changes.AddedSecurities: self.intraday_momentum_by_symbol[security.Symbol] = IntradayMomentum(security, algorithm) for security in changes.RemovedSecurities: self.intraday_momentum_by_symbol.pop(security.Symbol, None)
The definition of the IntradayMomentum class is shown below. We save a reference to the security's exchange so we can access the market hours of the exchange when generating insights.
class IntradayMomentum: def __init__(self, security, algorithm): self.symbol = security.Symbol self.exchange = security.Exchange self.bars_seen_today = 0 self.yesterdays_close = algorithm.History(self.symbol, 1, Resolution.Daily).loc[self.symbol].close[0] self.morning_return = 0
With each call to the alpha model's Update method, we count the number of bars the algorithm has received for each symbol. If we've reached the end of the morning window, we calculate the morning return. If we are at the beginning of the close window, we emit an insight in the direction of the morning window's return. If we are at the end of the day, we save the closing price and reset the counter for the number of bars seen today.
def Update(self, algorithm, slice): insights = [] for symbol, intraday_momentum in self.intraday_momentum_by_symbol.items(): if slice.ContainsKey(symbol) and slice[symbol] is not None: intraday_momentum.bars_seen_today += 1 # End of the morning return if intraday_momentum.bars_seen_today == self.return_bar_count: intraday_momentum.morning_return = (slice[symbol].Close - intraday_momentum.yesterdays_close) / intraday_momentum.yesterdays_close ## Beginning of the close next_close_time = intraday_momentum.exchange.Hours.GetNextMarketClose(slice.Time, False) mins_to_close = int((next_close_time - slice.Time).total_seconds() / 60) if mins_to_close == self.return_bar_count + 1: insight = Insight.Price(intraday_momentum.symbol, next_close_time, self.sign(intraday_momentum.morning_return)) insights.append(insight) continue # End of the day if not intraday_momentum.exchange.DateTimeIsOpen(slice.Time): intraday_momentum.yesterdays_close = slice[symbol].Close intraday_momentum.bars_seen_today = 0 return insights
The attached research paper holds positions for the last 30 minutes of the trading day, exiting at the market close. In order to accomplish this, we create a custom execution model. The model defined below submits a market order for the entry while also submitting a market on close order in the same time step.
class CloseOnCloseExecutionModel(ExecutionModel): def __init__(self): self.targetsCollection = PortfolioTargetCollection() self.invested_symbols = [] def Execute(self, algorithm, targets): # for performance we check count value, OrderByMarginImpact and ClearFulfilled are expensive to call self.targetsCollection.AddRange(targets) if self.targetsCollection.Count > 0: for target in self.targetsCollection.OrderByMarginImpact(algorithm): # calculate remaining quantity to be ordered quantity = OrderSizing.GetUnorderedQuantity(algorithm, target) if quantity == 0: continue algorithm.MarketOrder(target.Symbol, quantity) algorithm.MarketOnCloseOrder(target.Symbol, -quantity) self.targetsCollection.ClearFulfilled(algorithm)


This unorganized mess is where I dump informal things that I write. If you're looking for details about my peer-reviewed publications, click on the titles in my CV.
Any opinions here are my own, and are very unlikely to represent those of any past or present employer or research collaborator. Technical guides are probably out of date—I write them mostly to help myself remember how I did that one thing that one time.
If the disorder of the list on the left / bottom bothers you, please shoot me an email. Seriously. That might be all it takes to motivate me to add some basic tagging, filtering, etc.


Strictly's Anton Du Beke defends same-sex routine amid complaints storm
Strictly Come Dancing’s Anton Du Beke has defended Johannes Radebe and Graziano Di Prima’s same-sex routine after the BBC was stung by almost 200 complaints.
In a report of their most complained-about moments of the month so far, the broadcaster revealed 189 viewers took the time to criticise the duo’s spellbinding performance to Emili Sandi, which, like us, surprised the professional dancer.
‘As a dancer, you just dance. It’s a sort of creative process, you’re just dancing,’ Anton said of Joahennes and Graziano’s routine. ‘That’s what you do as a performer, you create, we’re creating dance.’
He continued: ‘I don’t think there’s anything controversial in the number itself.
‘I danced with Vincent Simone years ago on Strictly and I also did a number with Brucey [Forsyth].
‘I can’t say why they complained, it’s their own personal opinion about it but dance is dance, they’re just dancing. That’s all it is. All you’re doing is performing and you hope people enjoy it.’
When asked about his opinion on whether Strictly should welcome same-sex partners on the show Anton, who’s touring the UK and Ireland with Erin Boag next year, admitted he’d be happy either way.
Advertisement Advertisement
‘I don’t really mind, to be honest with you,’ the fan-favourite dancer told us. ‘I don’t really have any opinion on it either way. If they have it on the show, fine, if they don’t have it on the show, fine.
‘My question would be how would you judge same-sex couples within the context of the competition?
‘I have no opposition to it, it would be interesting to see the criteria of the adjudicator would be.’
Anton’s brand new DVD Anton’s Truly Madly Strictly is out for release on Sunday and is filled to the brim with sensational moments.
‘It’s my favourite one,’ Anton enthused. ‘There are also bits in there of my own personal greatest hits.
‘What you see on the DVD is how the show and everything evolves over the years, it’s fascinating really.
‘All of the technical stuff from the production side of things to the dances and the dance style, and the couple’s choice, it’s brilliant.’
Strictly Come Dancing continues on Saturday at 7pm on BBC One. Anton’s Truly Madly Strictly DVD is out on Monday and he’ll be touring with Dance Those Magical Movies in 2020.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


3.1
Describe the differences among short term, medium term and long term sheduling?
Ans:
Short-term scheduler is invoked very frequently (milliseconds) ⇒ (must be fast)”
Long-term scheduler is invoked very infrequently (seconds, minutes) ⇒ (may be slow)”
3.2
Describe the actions taken by a kernel to switch between processes?
Ans:
the system must save the state of the old process and load the saved state for the new process via a context switch.
3.3
Ans:(none)
3.4
Explain the role of the init process on unix and linux system in regard to process termination?
Ans:
init is the parent of all processes. Its primary role is to create processes from a script stored in the file /etc/inittab.
init is the first process started during booting of the computer system
3.5
Including the initial parent process, how many process are created by the program shown in Figure 3.31?
#include <stdio.h>
#include <unistd.h>
int main() {
int i;
for ( i = 0 ; i < 4 ; i++ ) {
fork();
}
return 0;
}
Ans:
1+4+3+2+1 = 11
3.6
Ans:(none)
3.7
Using the program in Figure 3.29, identify the values of pid at lines A, B, C and D. (Assume that the actual pids of the parent and child are 2600 and 2603, respectively.)
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
int main ()
{
/* fork a child process */
pid = fork();
if ( pid < 0 ) { /*error occurred
fprintf(stderr, “Fork Failed”);
return 1;
}
else if (pid ==0) { /* child process */
pid1 = getpid();
printf(“child: pid = %d” ,pid); /* A */
printf(“child: pid1 = %d” ,pid1); /* B */
}
else { /* parent process */
pid1 = getpid();
printf(“parent: pid = %d” ,pid); /* C */
printf(“parent: pid1 = %d” ,pid1); /* D */
wait(NULL);
}
return 0;
}
Ans:
A: 0, B: 2603, C: 2603, D: 2600
http://hscc.cs.nthu.edu.tw/~sheujp/homework/os09/HW3_ref.pdf
3.8
Give an example of a situation in which ordinary pipes are more suitable than named pipes and an example of a situation in which named pipes are more suitable than ordinary pipes?
Ans:
ordinary pipes:
ordinary pipes require parent-child relationship between communicating processes.
ordinary pipes are unidirectional (producer-consumer style).
named pipes:
No parent-child relationship is necessary between the communicating processes.
named pipes is bidirectional.
3.9
Consider the RPC mechanism. Describe the undesirable circumstances that could arise from not enforcing either the “at most once” or “exactly once” semantics. Describe possible uses for a mechanism that had neither of these guarantees.
Ans:
If an RPC mechanism could not support either the “at most once” or “at least once” semantics, then the RPC server cannot guarantee that a remote procedure will not be invoked multiple occurrences. Consider if a remote procedure were withdrawing money from a bank account on a system that did not support these semantics. It is possible that a single invocation of the remote procedure might lead to multiple withdrawals on the server. For a system to support either of these semantics generally requires the server maintain some form of client state such as the timestamp.
If a system were unable to support either of these semantics, then such a system could only safely provide remote procedures that do not alter data or provide time-sensitive results. Using our bank account as an example, we certainly require “at most once” or “at least once” semantics for performing a withdrawal (or deposit!) However, an inquiry into an account balance or other account information such as name, address, etc. does not require these semantics
https://www.google.com.tw/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CC4QFjAA&url=http%3A%2F%2Fwww.cs.gsu.edu%2F~cscnaax%2Fsummer%2Fcs4320_6320%2FAssignments%2Fsol1.doc&ei=rqpMU6jUFIaSkQX_uoHABA&usg=AFQjCNGBO5A7ln5oYa2Yj1aJMIjYF58iJg&sig2=okRebCDG4VPA6UFZFYeBcA
3.10
Ans:
Line X : 0, -1, -2, -3, -4 Line Y : 0, 1, 2, 3, 4
3.11
What are the benefits and the disadvantages of each of the following? Consider both the system level and the programmer level.
a. Synchronous and asynchronous communication
Ans:
A benefit of synchronous communication is that it allows a rendezvous between the sender and receiver. A disadvantage of a blocking send is that a rendezvous may not be required and the message could be delivered asynchronously. As a result, message-passing systems often provide both forms of synchronization.
Synchronous => blocking
asynchronous => nonblocking
b. Automatic and explicit buffering
Ans:
Automatic buffering provides a queue with indefinite length, thus ensuring the sender will never have to block while waiting to copy a message. There are no specifications on how automatic buffering will be provided; one scheme may reserve sufficiently large memory where much of the memory is wasted. Explicit buffering specifies how large the buffer is. In this situation, the sender may be blocked while waiting for available space in the queue. However, it is less likely that memory will be wasted with explicit buffering.
c. Send by copy and send by reference
Ans:
Send by copy does not allow the receiver to alter the state of the parameter. Send by reference does allow it.
A benefit of send by reference is that it allows the programmer to write a distributed version of a centralized application. Java’s RMI provides both; however, passing a parameter by reference requires declaring the parameter as a remote object as well.
d. Fixed-sized and variable-sized messages
Ans:
The implications of this are mostly related to buffering issues; with fixed-size messages, a buffer with a specific size can hold a known number of messages. The number of variable-sized messages that can be held by such a buffer is unknown.


--- layout: default format: blog-index ---
Most religious institutions are about things people do, or should do, or even more overwhelmingly about things they shouldn't do. The focus is on people. That's why God's business is big business. Many products are created to supposedly bring the believers closer to God. From books, to music, seminars, conferences, training, you name it. The abundance of these things, and the pursuit after them, say one thing: Jesus saved you, but now it's your turn to take it all the way. You've heard about Jesus at an evangelistic meeting, now we, the churches of Jesus Christ, will tell you about yourselves. The focus is now on you.
But the true church of Christ is never meant to be like this. It sets people free to live the lives God planned for them. Its sole purpose is to help folks fix their eyes on Jesus, not on themselves, to fully realize that Jesus died on the cross for them once and never again, that they were made whole to face God without shame, with heads lifted high, and hear the gentle whisper of the Spirit of God that "now there is no condemnation to those who are in Christ Jesus." (Romans 8:1)
{{ post.subheadline }}
{% endif %}{% if post.meta_description %}{{ post.meta_description | strip_html | escape }}{% else post.teaser %}{{ post.teaser | strip_html | escape }}{% endif %} {{ site.data.language.read_more }}
{% endif %} {% endfor %}{{ site.data.language.more_articles }}
{% include list-posts entries='20' offset='1' %}


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
F
G
H
I
K
L
M
N
P
R
S
T
U
V
S
setAdjacentList(ArrayList<Edge>)
- Method in class lab1.model.
Node
setEdges(ArrayList<Edge>)
- Method in class lab1.model.
Graph
setFather(Node)
- Method in class lab1.model.
Node
setID(Integer)
- Method in class lab1.model.
Node
setLabel(Edge.Label)
- Method in class lab1.model.
Edge
setNode1(Node)
- Method in class lab1.model.
Edge
setNode2(Node)
- Method in class lab1.model.
Edge
setNodes(ArrayList<Node>)
- Method in class lab1.model.
Graph
setVisited(Boolean)
- Method in class lab1.model.
Node
setWeight(Integer)
- Method in class lab1.model.
Edge
setWeight(Integer)
- Method in class lab1.model.
Node
size()
- Method in class lab1.model.
MinHeap
function to get the size of the minheap
SortEdgesByWeight
- Class in
lab1.model
Deprecated.
class used just for testing purposes
SortEdgesByWeight()
- Constructor for class lab1.model.
SortEdgesByWeight
Deprecated.
SortNodesByWeight
- Class in
lab1.model
Deprecated.
class used just for testing purposes
SortNodesByWeight()
- Constructor for class lab1.model.
SortNodesByWeight
Deprecated.
A
B
C
D
E
F
G
H
I
K
L
M
N
P
R
S
T
U
V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


By: FoodieBot Team
Since: Feb 2020
Licence: MIT
- 1. Introduction
- 2. About this Document
- 3. Quick Start
- 4. Features
- 4.1. Back Command:
back
<Done By: Ignatius> - 4.2. Exit Command:
exit
- 4.3. List all Canteens:
list
<Done By: Leslie> - 4.4. Go to a Canteen:
goto
<Done By: Leslie> - 4.5. View Stalls or Menu:
enter
<Done By: Ignatius> - 4.6. Select the Food :
select
<Done By: Shaun> - 4.7. Randomize Food Selection :
randomize
<Done By: Samantha> - 4.8. Set a Budget :
budget set
<Done By: Xavier> - 4.9. View Budget:
budget view
<Done By: Xavier> - 4.10. View Expense Report:
report
<Done By: Xavier> - 4.11. View Past Transactions:
transactions
<Done By: Xavier> - 4.12. Delete a Transaction:
delete
<Done By: Xavier> - 4.13. Review Food Items:
review
<Done By: Xavier> - 4.14. Rate Food Items:
rate
<Done By: Xavier> - 4.15. Set Food Items as Favorites:
favorites set
<Done By: Leslie> - 4.16. View Favorited Food Items:
favorites view
<Done By: Leslie> - 4.17. Remove Favorite Food Items:
favorites remove
<Done By: Leslie> - 4.18. Filter Canteens, Stalls or Food:
filter
<Done By: Ignatius>
- 4.1. Back Command:
- 5. FAQ
- 6. Glossary <Done By: Shaun>
- 7. Command Summary <Done By: Shaun>
1. Introduction
FoodieBot is an all-in-one application created for NUS students, staff and visitors. Designed primarily to help with your everyday campus dining needs, FoodieBot has something to offer to everyone. Whether you need a random suggestion of what to eat, directions to get to the canteen, help in planning your budget for the week, or just want to see what each canteen has to offer, FoodieBot is here to provide for your needs.
2. About this Document
<Done By: Samantha>
2.1. Symbols and Notations Used
The following are the symbols and formatting used in this document:
|
Note
|
This symbol indicates important information. |
|
Tip
|
This symbol indicates tips for the particular feature. |
list
- A grey highlight (called a mark-up) indicates that this is a command that can be typed into the command box and executed by the application.
The command box location can be seen in the diagram below.
2.2. Definition of Common Words Used
- Context
-
There are some commands that are only permissible at certain states of the application. For instance, the
review
andrate
commands are only allowed after navigating to the transactions screen. We refer to this state as a context. Commands which specify a context which they are used in generally cannot work outside of that context. However, some commands are less particular about the context which they run in such as in the case of theenter
command which can run in both the Main, Canteen and Stall contexts. - GUI
-
Graphic User Interface is a type of visual interface that allows users to interact with.
- Index
-
It is a number that is linked to the item of the list An index is limited to the maximum number of items shown in the list, the item does not exist if an invalid index is specified in commands that use an index.
2.3. How to Use this Document
Section 4. Features will introduce you to the commands for the application.
3. Quick Start
-
Ensure that you have Java 11 or above installed in your Computer.
-
Download the latest foodiebot.jar here.
-
Copy the file to the folder you want to use as the home folder for your FoodieBot.
-
Double-click the file to start the app. The Graphical User Interface(GUI) similar to the image shown below should appear in a few seconds.
-
Type the command in the command box and press Enter to execute it.
e.g. typinghelp
and pressing Enter will open the help window.
|
Tip
|
Some example commands you can try are listed below: |
-
list
: Lists all canteens or return to the main page. -
enter The Deck
: Display all the stalls location within The Deck. -
back
: Go back to the previous view -
goto The Deck f/ COM1
: Display direction to go to deck from COM1. -
exit
: the exit command will close FoodieBot
4. Features
Command Format
-
Words in
UPPER_CASE
are the parameters to be supplied by the user e.g. inbudget set w/ AMOUNT
,AMOUNT
is a parameter which can be used asbudget set w/ 9.50
-
Items in square brackets are optional entries e.g
report [w/DATE]
can be entered asreport [w/ 12-02-2020]
or asreport
. -
Canteen names, stall names and commands are case sensitive.
4.1. Back Command: back
<Done By: Ignatius>
If you want to return to your previous screen, just key in back
and it’ll bring you back
(at least if a previous screen exists).
Format: back
4.2. Exit Command: exit
When you’re done using the application, type exit
into the command box to close the application.
Format: exit
4.3. List all Canteens: list
<Done By: Leslie>
Curious to discover the range of dining options on campus? Simply enter list
into the command box
and FoodieBot will show you all the fabulous canteens on campus for you to browse at your leisure.
Format: list
Parameters:
-
[f/BLOCK_NAME]
- If you want to view the canteens by their distance from the place specified byBLOCK_NAME
, this is the tag for you. This will list the canteens in order of increasing distance fromBLOCK_NAME
.
|
Tip
|
You can also type list into the command box to return to the main page. This is a handy shortcut if
you ever forget which Context you’re in.
|
4.4. Go to a Canteen: goto
<Done By: Leslie>
If you’re ever lost in NUS, worry no more! The goto
function can conveniently tell you the directions to the canteen you wish to
go to from your current location which you have indicated. It even includes a map image to aid you with understanding
the directions even easier.
|
Note
|
This function will only work on the main page. |
Format: goto CANTEEN_NAME f/ CURRENT_LOCATION
Parameters:
-
CANTEEN_NAME
: The canteen name -
CURRENT_LOCATION
: The nearest block from your current location
These CURRENT LOCATION
(s) are available for directions:
-
com1
These CURRENT LOCATION
(s) will be added in future releases
(but are recognised as valid locations):
-
pgpr
-
uhc
-
utown
|
Note
|
CANTEEN_NAME and CURRENT_LOCATION field has to be one of the suggestions. Otherwise an error message will be displayed telling the user to provide a valid CANTEEN_NAME and CURRENT_LOCATION .
|
- Example
-
Let say you wish to go to The Deck from your current location at com1.
-
Enter the canteen which you want to go to and your current location in this format on the main page
goto The Deck f/ com1
. -
Then press Enter. This will give you a clear image and instruction on how to get to canteen from the nearest bus stop.
4.5. View Stalls or Menu: enter
<Done By: Ignatius>
Curious about the details of a particular canteen or stall? The enter
command allows you to find out
all the information you want about the canteen or stall you are interested in.
Format: enter STALL_NAME/ CANTEEN_NAME/ INDEX
Parameters:
-
INDEX
: An index that corresponds to a particular canteen. This index is located beside the canteen name. -
CANTEEN_NAME
: The canteen name has to be from one of the canteens displayed. Partial names are not allowed. -
STALL_NAME
: The stall name has to be from one of the stalls displayed. Partial names are not allowed.
|
Note
|
Information about the types of food sold at the stall, the rating of the stall and various other things will be implemented in v2.0. The stall’s rating is determined from the user’s past experiences of the food items which were selected (find out more in Section 4.13: Rate Food Items). |
- Example
-
You wish to see the stalls available in Nus Flavors.
-
On the main screen, type
enter Nus Flavors
orenter 1
into the command box. -
This will display the list of stalls that Nus Flavors has. At the bottom of the screen, there will be a display box which displays the current canteen which you have entered.
-
If you wish to view stalls in another canteen you can enter
back
into the command box. This will bring you back to the main page.
-
-
If you wish to see the menu of a stall, you can key in
enter
again. Let us see what the Western stall has on their menu. You can key inenter Western
orenter 9
. Don’t forget to hit the enter after you are done typing. -
This will show you the menu of the Western stall. For each food item, the name, the cost and the description of the food item will be given. At the bottom of the screen, there will also be a display box showing the current stall which you have entered.
-
Similarly, you can also enter
back
to return to the Nus Flavor canteen screen or enterlist
if you wish to return to the main screen.
-
4.6. Select the Food : select
<Done By: Shaun>
Finally decided on a food item after browsing the countless food options at NUS, ordered it and want to record
down your dining experience? The select
function is here allowing you to save your selected food
into your past transactions to help you track your history of food consumption.
Format: select
Parameters:
-
INDEX
: Select the food with the given index from the list displayed on the GUI -
FOOD_NAME
: Select the food with the given name from the list displayed on the GUI
|
Note
|
If a budget has been set up, the price of the selected food will be automatically deducted from your budget. This helps you keep track of how much money you have spent and how much more you can spend. Nifty, isn’t it? |
- Example
-
You have decided what you want to eat and you want to save that item to update your transaction history.
-
Ensure that you are on the menu screen of the stall. If you do not know how to get to the menu you can refer to the section above or here.
-
Continuing on from the example from the
enter
command above, we are currently in the Western stall. -
Enter
select Combo Set
orselect 1
into the command box. -
This will display the cost of the item, the remaining amount that you have and the amount you are left with to spend for the day.
-
4.7. Randomize Food Selection : randomize
<Done By: Samantha>
Bamboozled by the countless dining options at NUS or simply bored of going to the same boring old canteens to
eat everyday? randomize
is here to help you to generate a random option when you cannot decide on what to eat or
if you just want to spice up your culinary experience in NUS.
Format: randomize
Parameters:
-
[c/ CANTEEN_NAME]
- Produce a randomized list of foods from foods available at the particular canteen . -
[t/ TAG]
- Randomize based on foods which are tagged with the tag provided.

-
Just enter
randomize
into the command box on the main screen. -
This will generate 1 option for you with the details of the canteen name that this stall belongs to, the stall name, the stall number, the price rating and the tag if there are any.
-
If you like the option that you see, you can key in
enter Japanese
orenter 1
to be redirected to the stall to see the menu. -
If you do not like the option, you can enter
randomize
again to be given another option.
-
- Example
-
What if you want to get a random option only from a particular canteen (eg. The Deck) that you are at or an option based on what you crave (eg. spicy food)?
-
If you want to get a random option based on the canteen (eg. The Deck), you can enter
randomize c/ The Deck
on the main screen. This will display an option that is based on the canteen you want (in this case The Deck). -
If you want to get a random option based on your craving (eg. spicy), you can enter
randomize t/ spicy
on the main screen. This will display a food which has the spicy tag. -
OR similarly, you can also enter the canteen first before getting a random option.
-
In the command box key in
enter The deck
orenter 2
to get the list of stalls available in The Deck. -
After that enter
randomize
orrandomize t/ TAG
to get an option.
Let’s try getting a food option that has rice from The deck -
This will display an option if there is a stall option that has that tag. Otherwise it will display a message in the feedback box.
-
4.8. Set a Budget : budget set
<Done By: Xavier>
Have problems keeping track of your spending? The budget set
command allows you to set up
a daily, weekly or monthly budget to help you track how much money you have left to spend. This budget
can be changed anytime you want but please note the consequences in the box below!
|
Note
|
Changing the budget will reset the budget overview for the current budget cycle. For example, if you have $5 remaining from a weekly budget of $20, setting a new monthly budget of $150 will update your current budget settings to the new one, but at the same time resets the start date of the cycle, your remaining budget, as well as an overview of your spendings in your budget. (But not to worry, all of your transactions are still saved!) |
|
Note
|
When you set a weekly or monthly budget, you get to see an average daily budget available to spend over 5 days (if weekly) or 20 days (if monthly). Sometimes you may want to comfort yourself, so it’s still okay to spend more than the daily average budget, as long as your remaining budget doesn’t reach $0 before the end of the week/month! |
Format: budget set PERIOD AMOUNT
Parameters:
-
AMOUNT
: The maximum amount available to spend for the given time period. -
PERIOD
: The length of the cycle that a budget is effective for and when it will refresh.List of values for
PERIOD
are:-
d/
- Daily -
w/
- Weekly -
m/
- Monthly
-
|
Note
|
PERIOD field has to be one of the above suggestions.AMOUNT field has to be numeric (with or without decimal places).Otherwise an error message will be displayed requesting a correct type to be provided. |
4.9. View Budget: budget view
<Done By: Xavier>
Curious about your budget this cycle, how much you have spent and how much you have left? budget view
allows
you to see all your spending as well as the amount of money you have left to spend.
Format: budget view
4.10. View Expense Report: report
<Done By: Xavier>
If you want to see how much you have spent over a period of time, view a beautifully designed report of your
past expenses with the report
command.
|
Note
|
This command has several variations to choose from! Also, the date can be delimited with '-', '.' or '/',
as long as your date format follows a generic DD/M/YY or D-M-YYYY format (e.g. 11/4/20, 3-6-2019)! D - day M - month Y - year |
Format:
-
report
-
report [f/FROM_DATE] [t/TO_DATE]
-
report [w/DATE]
-
report [m/MONTH]
-
report [y/YEAR]
Parameters:
-
[f/FROM_DATE] [t/TO_DATE]
- Generates report fromFROM_DATE
untilTO_DATE
.-
Example:
report f/ 12-02-2020 t/ 30-04-2020
-
-
[w/DATE]
- Generates report for the week (Monday-Sunday) of the input date.-
Example:
report w/ 12-02-2020
-
-
[m/MONTH]
- Generates report of the input month.-
Example:
report m/ jan
- Generates a report for the month of January for the current year. -
Example:
report m/ jul y/ 2019
- Generates a report for the month of July of the specified year of 2019.
-
-
[y/YEAR]
- Generates report of the input year.-
Example:
report y/ 2020
-
|
Note
|
FROM_DATE cannot be a future date.TO_DATE cannot be before the FROM_DATE , or the earliest possible date if the [f/] field is empty.
|
4.11. View Past Transactions: transactions
<Done By: Xavier>
In a similar way to report
, transactions
also allow you to see all the food you have purchased in
a particular period.
|
Note
|
This command has several variations to choose from! Also, the date can be delimited with '-', '.' or '/',
as long as your date format follows a generic DD/M/YY or D-M-YYYY format (e.g. 11/4/20, 3-6-2019)! D - day M - month Y - year |
Format:
-
transactions
-
transactions [f/FROM_DATE] [t/TO_DATE]
-
transactions [w/DATE]
-
transactions [m/MONTH]
-
transactions [y/YEAR]
Parameters:
-
[f/FROM_DATE] [t/TO_DATE]
- Displays transactions from and till the given dates.-
Example: transactions
f/ 12-02-2020 t/ 30-04-2020
-
-
[w/DATE]
- Displays transactions for the week (Monday-Sunday) of the input date.-
Example: transactions
w/ 12-02-2020
-
-
[m/MONTH]
- Displays transactions of the input month.-
Example: transactions
m/ jan
- Displays all transactions in the month of the current year. -
Example: transactions
m/ jul y/ 2019
- Displays all transactions in the month of the specified year.
-
-
[y/YEAR]
- Displays transactions of the input year.-
Example: transactions
y/ 2020
-
|
Note
|
FROM_DATE cannot be a future date.TO_DATE cannot be before the FROM_DATE , or the earliest possible date if the f/ field is empty.
|
4.12. Delete a Transaction: delete
<Done By: Xavier>
Accidentally added a wrong food to your purchases? The delete
command allows you to do just that, by
giving the index of the food to delete.
|
Note
|
The index to delete has to be within the range of the list of transactions. |
Format: delete
INDEX
Parameters:
-
INDEX
- The index of the item in the list of transactions.
- Example
-
You had accidentally selected the same food twice in a row too quickly, and want to delete one of them.
-
Type in
transactions
from the main screen to enter the transactions page. -
Locate the index number of the food you wish to delete.
-
Type in
delete
followed by the index number of the purchase, then hit enter. -
The additional purchase is now removed!
|
Tip
|
Removing a food purchased only during a current budget cycle will add the amount back to your remaining budget! |
4.13. Review Food Items: review
<Done By: Xavier>
From the transactions screen, leave a food review for a food item you have consumed to help you jog your memory and recall your experiences, be it pleasant or unpleasant, of the previous time you had the food.
Format: review INDEX REVIEW
Parameters:
-
INDEX
- This must be the first parameter and an index from the list has to be specified. -
REVIEW
- This must be the second parameter and the review message cannot be blank.
- Example
-
You want to review a food item that you have eaten for future reference.
-
Ensure that you are on the transaction screen. You can key in
transactions
on the main screen to get there. -
Pick a food you wish to review. Now perhaps you think that the Combo Set was delicious and that you absolutely adored the bbq sauce.
Key inreview 1 The food is delicious! Love the bbq sauce
into the command box, and hit enter.
|
Tip
|
You can update existing reviews by using the same command. |
4.14. Rate Food Items: rate
<Done By: Xavier>
Lazy to write a full food review? Well from the transactions
screen, you can simply leave a food rating
to show how well you thought of the food you had.
Format: rate INDEX RATING
Parameters:
-
INDEX
- This must be the first parameter and an index from the list has to be specified. -
RATING
- This must be the second parameter and requires a rating for the food item.
|
Tip
|
You can also update existing ratings by using the rate on the same food item. |
4.15. Set Food Items as Favorites: favorites set
<Done By: Leslie>
Just had this absolutely delicious meal and want to save it for the next time so you can remember to have it again or recommend it to others? From the menu screen of a stall, you can easily set your favourite food items for easier access in the future.
Format: favorites set INDEX
Parameters:
-
INDEX
- This must be the first parameter and an index from the list has to be specified.
4.16. View Favorited Food Items: favorites view
<Done By: Leslie>
Once you have saved your favorite food items, you can easily access them with this command.
Format: favorites view
4.17. Remove Favorite Food Items: favorites remove
<Done By: Leslie>
Had a change of heart and a particular food has lost your fancy? Don’t worry because FoodieBot makes it painless to sever your ties, by allowing quick removal of that food.
Format: favorites remove INDEX
Parameters:
-
INDEX
- This must be the first parameter and an index from the list has to be specified.
4.18. Filter Canteens, Stalls or Food: filter
<Done By: Ignatius>
If you only want a canteen, stall or food with a particular tag, filter allows you to as its name suggests filter to show only the things you want. Filter also enables you to filter based on the maximum price you are willing to pay
Format: filter TAG/ PRICE
Parameters:
-
TAG
- Label tag associated with the canteen or stall depending on which context you are in. -
PRICE
- a number which indicates the maximum price of food you are willing to pay for.
|
Note
|
You can only filter by price from the menu page of a stall. When filtering by tag, tags vary based on the current context. |
-
If you wish to filter tags based on what the canteen has, you can enter
filter asian
on the main screen. This will display canteens with the asian tag. -
After entering a canteen, you can also filter the stalls based on tags as well.
-
If you have decided on the stall you wish to eat from, but then have a limit on how much you can spend ($4). You can
filter 4
on the menu page. This will display all the options available that are within your budget.
5. FAQ
Q: How can I update the list of canteens if there are changes to the canteens on campus?
A: You can manually download foodiebot.json file which we have published here.
Q: Can I write my personal review in other languages?
A: Yes, FoodieBot accepts input for different types of language, however it does not support in-app localization.
6. Glossary <Done By: Shaun>
- Function
-
A program that performs a specific task. eg.
randomize
is a function in FoodieBot that performs the task of choosing a random store for the user. - In-app Localization
-
The process of changing and translating features within the application to appeal to a certain target market. In the case of FoodieBot, FoodieBot is currently unable to process commands given in other languages.
- Jar
-
Jar is the acronym for Java ARchive, a file format that is typically used to collect and store many Java files into a single file. This makes it easier for usage and distribution of Java files.
- Java 11
-
A software engineering platform to perform the programming language Java. The version used in this application is the 11th edition of the platform.
- Json
-
Json is the acronym for JavaScript Object Notation, a minimal, readable format for structuring data. It is mainly used to transfer data between a server and web application.
- Parameter
-
A value that is passed into a function. This value allows a single function to perform different actions based on the type of value passed to it. eg.
view
andset
are different parameters for the functionbudget
. Passingview
intobudget
will allow the user to see the budget. Passingset
intobudget
will allow the user to create a budget. - Tag
-
A characteristic or attribute associated with an object. FoodieBot assigns tags to canteens, stalls and food to allow the user to easily see the type of food, the type of cuisine and price ranges.
7. Command Summary <Done By: Shaun>
| Command | Function | Example |
|---|---|---|
back |
Return to the screen before |
back |
budget set PERIOD AMOUNT |
Set a budget for the allocated period |
budget set w/ 9.50 |
budget view |
Views the current budget |
budget view |
delete INDEX |
Removes a transaction |
delete 1 |
enter CANTEEN_NAME/ STALL_NAME |
Displays the stalls for the selected canteen or the menu of the selected stall |
enter The Deck/ enter Japanese |
exit |
Close the application |
exit |
favorites remove |
Remove the food item from favorites |
favorites remove 1 |
favorites set |
Set the food item in the stall as a favorite |
favorites set 1 |
favorites view |
Displays all favorited food |
favorites view |
filter |
Shows only canteens or stalls with a specified tag |
filter asian |
goto CANTEEN_NAME f/ CURRENT_LOCATION |
Gets direction to canteen from the current location |
goto The Deck f/ COM1 |
list |
Displays the list of canteen |
list |
rate INDEX |
Gives a rating to the stall |
rate 2 |
randomize |
Displays a list of randomize options |
randomize c/ The Deck |
report |
Generates a report of the food consumed |
report f/ 12-02-2020 t/ 30-04-2020 |
review INDEX |
Creates a review for the stall |
review 3 |
select INDEX |
Saves the food in transactions |
select 2 |
transactions |
Generates the transaction breakdown |
transaction w/ 12-02-2020 |


▶ 120 Schedule: Rest between exercises (sec.) Start routine with a rest End each exercise with a bell Create Link


Jessica LaGrone is an acclaimed pastor, teacher, speaker, and writer whose engaging communication style endears her to her audiences. Currently she is Pastor of Worship at The Woodlands United Methodist Church in The Woodlands, Texas, a church with over 8,000 members. In this position she serves as worship architect, planning and developing four of the church’s seven weekly worship experiences and working with contractors whose talent in music, media, and preaching build worship services that shine for the glory of God. Her other projects include leading the development of The Woodland UMC’s online church initiative and acting as the church’s pastoral liaison and chaplain to the Asbury Theological Seminary program. Her popular blog “Reverend Mother” (www.jessicalagrone.com) encompasses her dual roles of pastor and mom. She writes, “This is a blog about having a foot in two worlds, and being imperfect, inadequate, and available to God in both at the same time.” Jessica enjoys speaking at retreats and events at churches throughout the United States. She and her husband, Jim, have two young children, Drew and Kate.


Evers refuses to disclose 1 day's worth of emails
MADISON, Wis. - Gov. Tony Evers' refusal to turn over emails requested by a Milwaukee television station is drawing criticism from open government advocates who say he is interpreting the law too narrowly.
WITI-TV reports that it made a request under the state's open records law for just over four weeks of emails between Evers and his chief of staff. When Evers' assistant legal counsel Erin Deeley denied the request, the TV station narrowed it to one week. When that was rejected, it narrowed the request to just one day.
Deeley told the station that requests for all emails over a specific time frame, no matter how short, will be denied.
Evers walked by reporters Monday following a Veterans Day celebration without taking questions.
Wisconsin Freedom of Information Council President Bill Lueders says he doesn't think denial of the records question in this case is a legal interpretation of the law.


Manage Your Profile
Account Information
Research institute
Government
University researcher
Others
Modify
Change Your Password
Change


--- layout: post title: Containerize tagline: " all tedious stuff" permalink: /docker/biref-intro.html categories: [literate programming] tags: [docker, intro] ---
docker --version
Docker version 17.12.0-ce, build c97c6d6
docker --help
Usage: docker COMMAND A self-sufficient runtime for containers Options: --config string Location of client config files (default "/home/antony/.docker") -D, --debug Enable debug mode --help Print usage -H, --host list Daemon socket(s) to connect to (default []) -l, --log-level string Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info") --tls Use TLS; implied by --tlsverify --tlscacert string Trust certs signed only by this CA (default "/home/antony/.docker/ca.pem") --tlscert string Path to TLS certificate file (default "/home/antony/.docker/cert.pem") --tlskey string Path to TLS key file (default "/home/antony/.docker/key.pem") --tlsverify Use TLS and verify the remote -v, --version Print version information and quit Management Commands: container Manage containers image Manage images network Manage networks node Manage Swarm nodes plugin Manage plugins secret Manage Docker secrets service Manage services stack Manage Docker stacks swarm Manage Swarm system Manage Docker volume Manage volumes Commands: attach Attach to a running container build Build an image from a Dockerfile commit Create a new image from a container's changes cp Copy files/folders between a container and the local filesystem create Create a new container diff Inspect changes to files or directories on a container's filesystem events Get real time events from the server exec Run a command in a running container export Export a container's filesystem as a tar archive history Show the history of an image images List images import Import the contents from a tarball to create a filesystem image info Display system-wide information inspect Return low-level information on Docker objects kill Kill one or more running containers load Load an image from a tar archive or STDIN login Log in to a Docker registry logout Log out from a Docker registry logs Fetch the logs of a container pause Pause all processes within one or more containers port List port mappings or a specific mapping for the container ps List containers pull Pull an image or a repository from a registry push Push an image or a repository to a registry rename Rename a container restart Restart one or more containers rm Remove one or more containers rmi Remove one or more images run Run a command in a new container save Save one or more images to a tar archive (streamed to STDOUT by default) search Search the Docker Hub for images start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers update Update configuration of one or more containers version Show the Docker version information wait Block until one or more containers stop, then print their exit codes Run 'docker COMMAND --help' for more information on a command.
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest 1815c82652c0 10 months ago 1.84kB
docker run hello-world
Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/


[Home] → Blackjack software and Expected Values by John A. Nairn
Updated: 22 SEP 2019
This web site posts results run using a public domain software package (which is available in a Blackjack project on GitHub) that does many exact calculations of blackjack expected values. The software's unique feature is that it can even do exact calculations for pair splitting. Until a recent algorithm developed by the author, these calculations have not been possible. Although exact splitting calculations are now possible, they are time consuming. This web site, therefore, has tables of exact expected values output from the software. You can use them without needing to download and run the software.
All tables of expected values given below were calculated using the public domain software package available in the Blackjack project on GitHub. You can clone that project to learn how to compile the code and run calculations.
The exact calculation of pair splitting is much more time consuming then all other expected value calculations combined. An estimate based on scaling effects with conventional blackjack software methods showed that a convential approach would take about 11,000 years of computer time (on 3GHz processors) to complete all splitting calculations for a single-deck game. Fortunately, it is possible to do better. The author of the Blackjack software has written a paper describing the process. The final result was that all splitting calculations were reduced to 45 days of computer time. The paper also describes an new approximate method that can get accurate splitting results in much less time. The Blackjack software can do both the exact and the approximate calculations.
The paper describing the new splitting methods is titled "Exact Calculation of Expected Values for Splitting Pairs in Blackjack" by John A. Nairn. A copy of the paper is included in the Blackjack project and posted here.
You can obtain and run the Blackjack software software to complete exact expected value calculations, but some of those calculations take a long time. The longest, by far, are the exact results for splitting. Alternatively, you can just look up many results in the tables listed below. These tables are direct output from the Blackjack software (formatted for nice display) for most expected values. Exact results for splitting have only been completed for the single deck game. All tables, however, include the new approximate, but accurate, splitting results.


Whether the debug informations of the physics should be displayed or not (default = false)
The group that this rigidbody belongs to. Default is the DEFAULT Group which means its just a normal Rigidbody not a trigger nor anything special.
The group that this rigidbody belongs to. Default is the DEFAULT Group which means its just a normal Rigidbody not a trigger nor anything special.
Error threshold. Default is 0.05. The higher the more likely collisions get detected before actual impact at high speeds but it's visually less accurate.
Error threshold. Default is 0.05. The higher the more likely collisions get detected before actual impact at high speeds but it's visually less accurate.
Groups the default rigidbody will collide with. Set it like: (PHYSICS_GROUP.DEFAULT | PHYSICS_GROUP.GROUP_1 | PHYSICS_GROUP.GROUP_2 | PHYSICS_GROUP.GROUP_3) to collide with multiple groups. Default is collision with everything but triggers.
Groups the default rigidbody will collide with. Set it like: (PHYSICS_GROUP.DEFAULT | PHYSICS_GROUP.GROUP_1 | PHYSICS_GROUP.GROUP_2 | PHYSICS_GROUP.GROUP_3) to collide with multiple groups. Default is collision with everything but triggers.
The default applied friction between two rigidbodies with the default value. How much velocity is slowed down when moving accross this surface.
The default applied friction between two rigidbodies with the default value. How much velocity is slowed down when moving accross this surface.
Bounciness of rigidbodies. How much of the impact is restituted.
Bounciness of rigidbodies. How much of the impact is restituted.
Change if rigidbodies are able to sleep (don't be considered in physical calculations) when their movement is below a threshold. Deactivation is decreasing performance for minor advantage in precision.
Change if rigidbodies are able to sleep (don't be considered in physical calculations) when their movement is below a threshold. Deactivation is decreasing performance for minor advantage in precision.
Sleeping Threshold for Rotation Velocity.
Sleeping Threshold for Rotation Velocity.
Threshold how long the Rigidbody must be below/above the threshold to count as sleeping.
Threshold how long the Rigidbody must be below/above the threshold to count as sleeping.
Sleeping Threshold for Movement Veloctiy.
Sleeping Threshold for Movement Veloctiy.
Generated using TypeDoc
General settings for the physic simulation and the debug of it.


Mnangagwa snubs icon Morgan Tsvangirai on road naming
by Staff ReporterGovernment yesterday resolved to rename a number of streets and buildings in Harare, Bulawayo and several other cities and towns in the country after President Emmerson Mnangagwa and the late former army commander Solomon Mujuru as well as the late former First Lady Sally Mugabe.
BY MOSES MATENGA
However, the late former Prime Minister Morgan Tsvangirai’s name was not considered despite moves by the City of Harare to have him honoured by having a street named after him.
Also snubbed was Dumiso Dabengwa in the roads-renaming exercise.
Speaking at a post-Cabinet media briefing last night, acting Information minister Mangaliso Ndlovu said Enterprise Road would be renamed Emmerson Mnangagwa Road.
Mnangagwa will also have roads named after him in Kwekwe, Bindura, Gweru, Masvingo, Mutare, Chinhoyi and Chegutu.
“It’s only the sitting President who has a road or building named after him when he is alive,” Ndlovu said.
Selous Avenue in Harare has been renamed John Landa Nkomo Avenue after the late Vice-President, while Cameron Street will be renamed after his predecessor, Joseph Msika.
The late Mujuru, a decorated former army commander who died in a mysterious inferno at his Beatrice farm in 2011, had Kirkman Road named after him, while Charter Road will be named after the late Cuban leader Fidel Castro.
Livingstone Avenue will be renamed OR Tambo, after South Africa’s anti-apartheid hero and African National Congress stalwart Oliver Tambo.
Harare Central Hospital was renamed Sally Mugabe Hospital.
In Bulawayo, 6th Avenue will now be named after Mnangagwa, while Collenbrander Avenue is going to be renamed Lookout Masuku.
In Mutare, Aerodrome Road will be named after the late national hero Kumbirai Kangai, while Jelf Road is going to renamed Edgar Tekere Road.
In Gutu, Gutu District Office will take the new name Maud Muzenda, after the late wife to the late former Vice-President Simon Muzenda. – News Day


Scroll down this page.
When you have scrolled 50 pixels from the top, add the class "test" (yellow background color) to the paragraph. Scroll up again to remove the class.


Poller
Whats your name and age?
Submit
What do you think about the weather today?
Love it
Hate it
Don't care
Whats your favorite currency?
Whats your favorite currency?


@()(implicit ctx: Context) @site.layout(title = "Developers") {
Do you have a website, and want to add a playable live chess section?
Add the following line to your site html:
<script src="https://en.@netDomain/embed?w=1016&h=650"></script>
The w and h parameters control the width and height of the chess window.
Just add the following line to your site html:
<script src="https://en.@netDomain/tv/embed?theme=brown&bg=light"></script>
Parameters:
Just add the following line to your site html:
<script src="https://en.@netDomain/training/embed?theme=blue2&bg=light"></script>
Parameters:
The text is automatically translated to your visitor language.
Lichess exposes a RESTful HTTP/JSON API that you are free to use without limitation.
Read the documentation on lichess github page.

See rubenwardy.com/lichess_widgets/ for widgets with your username and rating.


| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| VirtualADOObject | version 1.0 | no |
| This is a virtual base class for all ADO objects. This should not be used directly. You can create your own ADO controls by extending this class. Notice that is called ADO Control (from Microsoft's ActiveX Data Objects) only for compatibility. These controls have a behavior similar to MS ADO objects, but are not bound to Microsoft technologies. |
| DataField | Sets the data field name from the DataSet that needs to be interpreted by the ADO Control and linked to the main user interaction property (Text for REdit-derived controls, Caption for RLabel-derived controls, Checked for RToggleButton-derived controls and so on) |
| DataSet | Links an ADODataSet to the current ADO control |
| AddLinkedObject | TODO: Document this |
| SetDataField | TODO: Document this |
| SetDataSet | TODO: Document this |
| __DataSetColumnUpdate | This is called when the data stored by the control has changed, and needs to be updated into the DataSet |
| __DataSetNewQueryNotify | This is called when the ADODataSet stored by the DataSet property changes its contents (new query is executed) |
| __DataSetUpdateCommand | This is called when the ADODataSet stored by the DataSet property changes its contents |
| Documented by Eduard Suica, generation time: Sun Jan 27 18:15:07 2013 GMT | (c)2013 Devronium Applications |


--- layout: post title: 'Note to self: Import MySQL dumpfile' date: '2009-01-20T04:37:00+01:00' tags: - oldblogposts - sql tumblr_url: http://hussfelt.tumblr.com/post/28547306424/note-to-self-import-mysql-dumpfile ---
I wonder how many times I have searched google on how to correctly import a MySQL dumpfile through a command line.
mysql -p -h DBSERVER dbname < dbname.sql


| 045 | The Economist's "Big Mac Index" on GitHub |
| 044 | The Good Place |
| 043 | Volkswagen for Continuous Integration... |
| 042 | The Number 42 (The answer to life, the universe, and everything) |
| 041 | Climbing Mt. St. Helens |
| 040 | Origins on Netflix |
| 038 | James Veitch: Replying to Spam |
| 037 | Fabricated |
| 035 | Eric's first car - '67 VW Bug Jon's first car - '73 Oldsmobile Cutlass Supreme |
| 033 | Silent Movie Gifs |
| 032 | Jelly Mario |
| 030 | Oregon Zoo |


All Classes
Booking
Customer
Employee
guiTool
InRestrOrder
Junior
Main
OnlineOrder
Order
Payment
Person
PopulateData
Senior
Staff


This is actually my favorite method to transfer a file to a Windows host. SMB is built in to Windows and doesn't require any special commands as Windows understands UNC paths. You can simply use the standard copy and move commands and SMB handles the file transferring automatically for you. What's even better is Windows will actually let you execute files via UNC paths, meaning you can download and execute a payload in one command!
Samba on linux is a pain, but no longer! Enter smbserver.py, part of the Impacket project.
To launch a simple SMB server on port 445, just specify a share name and the path you want to share:
# python smbserver.py ROPNOP /root/shells
The python script takes care of all the configurations for you, binds to 445, and accepts any authentication. It will even print out the hashed challenge responses for any system that connects to it.
In one line we've got an SMB share up and running. You can confirm it with smbclient from Linux or Windows:
smbclient -L <IP> --no-pass
net view \\<IP>
Since Windows handles UNC paths, you can just treat the ROPNOP share as if it's just a local folder from Windows. Basic Windows file commands like dir, copy, move, etc all just work.
If you look at the output from smbserver.py, you can see that every time we access the share it outputs the NetNTLMv2 hash from the current Windows user. You can feed these into John or Hashcat and crack them if you want (assuming you can't just elevate to System and get them from Mimikatz)
Executing files from SMB. Because of the way Windows treats UNC paths, it's possible to just execute our binary directly from the SMB share without even needing to copy it over first. Just run the executable as if it were already local and the payload will fire


Generative adversarial networks
We now move onto another family of generative models called generative adversarial networks (GANs). GANs are unique from all the other model families that we have seen so far, such as autoregressive models, VAEs, and normalizing flow models, because we do not train them using maximum likelihood.
Likelihood-free learning
Why not? It is not clear that better likelihood numbers necessarily correspond to higher sample quality. We know that the optimal generative model will give us the best sample quality and highest test log-likelihood. However, models with high test log-likelihoods can still yield poor samples and vice versa. To see why, consider pathological cases in which our model is comprised almost entirely of noise, or our model memorizes the training set. Therefore, we turn to likelihood-free training with the hope that optimizing a different objective will allow us to disentangle our desiderata of obtaining high likelihoods as well as high-quality samples.
Recall that maximum likelihood required us to evaluate the likelihood of the data under our model . A natural way to set up a likelihood-free objective is to consider the two-sample test, a statistical test that determines whether or not a finite set of samples from two distributions are from the same distribution using only samples from and . Concretely, given and , we compute a test statistic according to the difference in and that, when less than a threshold , accepts the null hypothesis that .
Analogously, we have in our generative modeling setup access to our training set and . The key idea is to train the model to minimize a two-sample test objective between and . But this objective becomes extremely difficult to work with in high dimensions, so we choose to optimize a surrogate objective that instead maximizes some distance between and .
GAN Objective
We thus arrive at the generative adversarial network formulation. There are two components in a GAN: (1) a generator and (2) a discriminator. The generator is a directed latent variable model that deterministically generates samples from , and the discriminator is a function whose job is to distinguish samples from the real dataset and the generator. The image below is a graphical model of and . denotes samples (either from data or generator), denotes our noise vector, and denotes the discriminator’s prediction about .
The generator and discriminator both play a two player minimax game, where the generator minimizes a two-sample test objective () and the discriminator maximizes the objective (). Intuitively, the generator tries to fool the discriminator to the best of its ability by generating samples that look indistinguishable from .
Formally, the GAN objective can be written as:
Let’s unpack this expression. We know that the discriminator is maximizing this function with respect to its parameters , where given a fixed generator it is performing binary classification: it assigns probability 1 to data points from the training set , and assigns probability 0 to generated samples . In this setup, the optimal discriminator is:
On the other hand, the generator minimizes this objective for a fixed discriminator . And after performing some algebra, plugging in the optimal discriminator into the overall objective gives us:
The term is the Jenson-Shannon Divergence, which is also known as the symmetric form of the KL divergence:
The JSD satisfies all properties of the KL, and has the additional perk that . With this distance metric, the optimal generator for the GAN objective becomes , and the optimal objective value that we can achieve with optimal generators and discriminators and is .
GAN training algorithm
Thus, the way in which we train a GAN is as follows:
For epochs do:
- Sample minibatch of size from data:
- Sample minibatch of size of noise:
- Take a gradient descent step on the generator parameters :
- Take a gradient ascent step on the discriminator parameters :
Challenges
Although GANs have been successfully applied to several domains and tasks, working with them in practice is challenging because of their: (1) unstable optimization procedure, (2) potential for mode collapse, (3) difficulty in performance evaluation.
During optimization, the generator and discriminator loss often continue to oscillate without converging to a definite stopping point. Due to the lack of robust stopping criteria, it is difficult to know when exactly the GAN has finished training. Additionally, the generator of a GAN can often get stuck producing one of a few types of samples over and over again (mode collapse). Most fixes to these challenges are empirically driven, and there has been a significant amount of work put into developing new architectures, regularization schemes, and noise perturbations in an attempt to circumvent these issues. Soumith Chintala has a nice link outlining various tricks of the trade to stabilize GAN training.
Selected GANs
Next, we focus our attention on a few select types of GAN architectures and explore them in more detail.
f-GAN
The f-GAN optimizes the variant of the two-sample test objective that we have discussed so far, but using a very general notion of distance: the . Given two densities and , the -divergence can be written as:
where is any convex1, lower-semicontinuous2 function with . Several of the distance “metrics” that we have seen so far fall under the class of f-divergences, such as KL, Jenson-Shannon, and total variation.
To set up the f-GAN objective, we borrow two commonly used tools from convex optimization3: the Fenchel conjugate and duality. Specifically, we obtain a lower bound to any f-divergence via its Fenchel conjugate:
Therefore we can choose any f-divergence that we desire, let and , parameterize by and by , and obtain the following fGAN objective:
Intuitively, we can think about this objective as the generator trying to minimize the divergence estimate, while the discriminator attempts to tighten the lower bound.
BiGAN
We won’t worry too much about the BiGAN in these notes. However, we can think about this model as one that allows us to infer latent representations even within a GAN framework.
CycleGAN
CycleGAN is a type of GAN that allows us to do unsupervised image-to-image translation, from two domains .
Specifically, we learn two conditional generative models: and . There is a discriminator associated with that compares the true with the generated samples . Similarly, there is another discriminator associated with that compares the true with the generated samples . The figure below illustrates the CycleGAN setup:
CycleGAN enforces a property known as cycle consistency, which states that if we can go from to via , then we should also be able to go from to via . The overall loss function can be written as:


Form
First Name:
Last Name:
Gender:
Male:
Female:
Favorite Color:
Red:
Green:
Blue:
Select a month:
January
February
March
April
May
June
July
August
September
October
November
December
Select a months:
January
February
March
April
May
June
July
August
September
October
November
December
JSON Output


COVID- {border-style []. px;} #ffffff;} patients LMIC pandemic including SARS-CoV- px; severe {font-family Med RMD countries diseases font-size HIV Health South clinical double; healthcare influenza medical mortality patient poor therapy ACE Accessed analysis border-color border-width coronavirus disease hemisphere increased infection risk seen solid; {font-style {font-weight April Infect Southern [], bold burden care courier; education em; health hydroxychloroquine pandemic. pt;} recent services virus world