An intuitive library tracking dates and timeseries in common using numpy arrays.
When working with arrays of timeseries, the manipulation process can easily cause mismatching sets of arrays in time, arrays in the wrong order, slow down the analysis, and lead to generally spending more time to ensure consistency.
This library attempts to address the problem in a way that enables ready access to the current date range, but stays out of your way most of the time. Essentially, this library is a wrapper around numpy arrays.
This library grew out of the use of market and trading data. The timeseries is typically composed of regular intervals but with gaps such as weekends and holidays. In the case of intra-day data, there are interuptions due to periods when the market is closed or gaps in trading.
While the library grew from addressing issues associated with market data, the implementation does not preclude use in other venues. Direct access to the numpy arrays is expected and the point of being able to use the library.
Other than NumPy being installed, there are no other requirements.
pip install thymus-timeseries
As a first look, we will create a small timeseries object and show a few ways that it can used. For this example, we will use daily data. ``` from datetime import datetime import numpy as np
from thymus.timeseries import Timeseries
ts = Timeseries()
# elements of Timeseries()
key: (an optional identifier for the timeseries)
columns: [] (an optional list of column names for the data)
frequency: d (the d in this case refers to the default daily data.
current frequencies supported are sec, min, h, d, w,
m, q, y)
dseries: (this is a numpy array of dates in numeric format)
tseries: (this is a numpy array of data. most of the work takes
place here.)
end-of-period: True (this is a default indicating that the data is as of
the end of the data. This only comes into play when
converting from one frequency to another and will
be ignored for the moment.)
While normal usage of the timeseries object would involve pulling data from a
database and inserting data into the timeseries object, we will use a
quick-and-dirty method of inputting some data. Dates are stored as either
ordinals or timestamps, avoiding clogging up memory with large sets of datetime
objects. Because it is daily data, ordinals will be used for this example.
ts = Timeseries()
start_date = datetime(2015, 12, 31).toordinal()
ts.dseries = start_date + np.arange(10)
ts.tseries = np.arange(10)
ts.make_arrays()
``` We created an initial timeseries object. It starts at the end of 2015 and continues for 10 days. Setting the values in dseries and tseries can be somewhat sloppy. For example, a list could be assigned initially to either dseries (the dates) and a numpy array to tseries (the values).
The use of the make_arrays() function converts the date series to an int32 array (because they are ordinal values) and tseries to a float64 array. The idea is that the data might often enter the timeseries object as lists, but then be converted to arrays of appropriate format for use.
The completed timeseries object is: ``` print(ts)
<Timeseries>
key:
columns: []
frequency: d
daterange: ('2015-12-31', '2016-01-09')
end-of-period: True
shape: (10,)
``` You can see the date range contained in the date series. The shape refers to the shape of the tseries array. key and columns are free-form, available to update as appropriate to identify the timeseries and content of the columns. Again, the end-of-period flag can be ignored right now.
Selection of elements is the same as numpy arrays. Currently, our sample has
10 elements.
print(ts[:5])
<Timeseries>
key:
columns: []
frequency: d
daterange: ('2015-12-31', '2016-01-04')
end-of-period: True
shape: (5,)
Note how the date range above reflects the selected elements.
ts1 = ts % 2 == 0
ts1.tseries
[ True False True False True False True False True False]
We can isolate the dates of even numbers:
```
# note that tseries, not the timeseries obj, is explicitly used with
# np.argwhere. More on when to operate directly on tseries later.
evens = np.argwhere((ts % 2 == 0).tseries)
ts_even = ts[evens]
# this just prints a list of date and value pairs only useful with
# very small sets (or examples like this)
print(ts_even.items('str'))
('2015-12-31', '[0.0]')
('2016-01-02', '[2.0]')
('2016-01-04', '[4.0]')
('2016-01-06', '[6.0]')
('2016-01-08', '[8.0]')
```
So let us use a slightly larger timeseries. 1000 rows 2 columns of data. And, use random values to ensure uselessness. ``` ts = Timeseries()
start_date = datetime(2015, 12, 31).toordinal()
ts.dseries = start_date + np.arange(1000)
ts.tseries = np.random.random((1000, 2))
ts.make_arrays()
print(ts)
<Timeseries>
key:
columns: []
frequency: d
daterange: ('2015-12-31', '2018-09-25')
end-of-period: True
shape: (1000, 2)
```
You can select on the basis of date ranges, but first we will use a row number technique that is based on slicing. This function is called trunc() for truncation. ``` # normal truncation -- you will end up with a timeseries with row 100 # through 499. This provides in-place execution. ts.trunc(start=100, finish=500)
# this version returns a new timeseries, effective for chaining.
ts1 = ts.trunc(start=100, finish=500, new=True)
But suppose you want to select a specific date range? This leads to the next
function, **truncdate()**.
# select using datetime objects
ts1 = ts.truncdate(
start=datetime(2017, 1, 1),
finish=datetime(2017, 12, 31),
new=True)
print(ts1)
<Timeseries>
key:
columns: []
frequency: d
daterange: ('2017-01-01', '2017-12-31')
end-of-period: True
shape: (365, 2)
``` As you might expect, the timeseries object has a date range of all the days during 2017. But see how this is slightly different than slicing. When you use truncdate() it selects everything within the date range inclusive of the ending date as well. The idea is to avoid having to always find one day after the date range that you want to select to accommodate slicing behavior. This way is more convenient.
You can also convert data from a higer frequency to a lower frequency. Suppose we needed monthly data for 2017 from our timeseries. ``` start = datetime(2017, 1, 1) finish = datetime(2017, 12, 31) ts1 = ts.truncdate(start=start, finish=finish, new=True).convert('m')
print(ts1.items('str'))
('2017-01-31', '[0.1724835781570483, 0.9856812220255055]')
('2017-02-28', '[0.3855043513164875, 0.30697511661843124]')
('2017-03-31', '[0.7067982987769881, 0.7680886691626396]')
('2017-04-30', '[0.07770763295126926, 0.04697651222041588]')
('2017-05-31', '[0.4473657194650975, 0.49443624153533783]')
('2017-06-30', '[0.3793816656495891, 0.03646544387811124]')
('2017-07-31', '[0.2783335012003322, 0.5144979569785825]')
('2017-08-31', '[0.9261879195281345, 0.6980224313957553]')
('2017-09-30', '[0.09531834159018227, 0.5435208082899813]')
('2017-10-31', '[0.6865842769906441, 0.7951735180348887]')
('2017-11-30', '[0.34901775001111657, 0.7014208950555662]')
('2017-12-31', '[0.4731393617405252, 0.630488855197775]')
Or yearly. In this case, we use a flag that governs whether to include the partial period
leading up to the last year. The default includes it. However, when unwanted the flag,
**include_partial** can be set to False.
ts1 = ts.convert('y', include_partial=True)
print(ts1.items('str'))
('2015-12-31', '[0.2288539210230056, 0.288320541664724]')
('2016-12-31', '[0.5116274142615629, 0.21680312154651182]')
('2017-12-31', '[0.4731393617405252, 0.630488855197775]')
('2018-09-25', '[0.7634145837512148, 0.32026411425902257]')
ts2 = ts.convert('y', include_partial=False)
print(ts2.items('str'))
('2015-12-31', '[[0.2288539210230056, 0.288320541664724]]')
('2016-12-31', '[[0.5116274142615629, 0.21680312154651182]]')
('2017-12-31', '[[0.4731393617405252, 0.630488855197775]]')
```
Suppose you want to combine multiple timeseries together that are of different lengths? In this case we assume that the two timeseries end on the same date, but one has a longer tail than the other. However, the operation that you need requires common dates.
By combine we mean instead of two timeseries make one timeseries that has the columns of both. ``` ts_short = Timeseries() ts_long = Timeseries()
end_date = datetime(2016, 12, 31)
ts_short.dseries = [
(end_date + timedelta(days=-i)).toordinal()
for i in range(5)]
ts_long.dseries = [
(end_date + timedelta(days=-i)).toordinal()
for i in range(10)]
ts_short.tseries = np.zeros((5))
ts_long.tseries = np.ones((10))
ts_short.make_arrays()
ts_long.make_arrays()
ts_combine = ts_short.combine(ts_long)
print(ts.items('str'))
('2016-12-31', '[0.0, 1.0]')
('2016-12-30', '[0.0, 1.0]')
('2016-12-29', '[0.0, 1.0]')
('2016-12-28', '[0.0, 1.0]')
('2016-12-27', '[0.0, 1.0]')
The combine function has a couple variations. While it can be helpful to automatically discard the
unwanted rows, you can also enforce that combining does not take place if the number of rows do not
match. Also, you can build out the missing information with padding to create a timeseries that has
the length of the longest timeseries.
# this would raise an error -- the two are different lengths
ts_combine = ts_short.combine(ts_long discard=False)
# this combines, and fills 99 as a missing value
ts_combine = ts_short.combine(ts_long discard=False, pad=99)
print(ts_combine.items('str'))
('2016-12-31', '[0.0, 1.0]')
('2016-12-30', '[0.0, 1.0]')
('2016-12-29', '[0.0, 1.0]')
('2016-12-28', '[0.0, 1.0]')
('2016-12-27', '[0.0, 1.0]')
('2016-12-26', '[99.0, 1.0]')
('2016-12-25', '[99.0, 1.0]')
('2016-12-24', '[99.0, 1.0]')
('2016-12-23', '[99.0, 1.0]')
('2016-12-22', '[99.0, 1.0]')
The combining can also receive multiple timeseries.
ts_combine = ts_short.combine([ts_long, ts_long, ts_long])
print(ts_combine.items('str'))
('2016-12-31', '[0.0, 1.0, 1.0, 1.0]')
('2016-12-30', '[0.0, 1.0, 1.0, 1.0]')
('2016-12-29', '[0.0, 1.0, 1.0, 1.0]')
('2016-12-28', '[0.0, 1.0, 1.0, 1.0]')
('2016-12-27', '[0.0, 1.0, 1.0, 1.0]')
```
In some ways it would make sense to mirror the combine() function with a split() from an aesthetic standpoint. However, splitting is very straight-forward without such a function. For example, suppose you want a timeseries that only has the the first two columns from our previous example. As you can see in the ts_split tseries, the first two columns were taken. ``` ts_split = ts_combine[:, :2]
print(ts_split.items('str'))
('2016-12-31', '[0.0, 1.0]')
('2016-12-30', '[0.0, 1.0]')
('2016-12-29', '[0.0, 1.0]')
('2016-12-28', '[0.0, 1.0]')
('2016-12-27', '[0.0, 1.0]')
```
We have combined timeseries together to stack up rows in common. In addition, we looked at the issue of mismatched lengths. Now we will look at arithmetic approaches and some of the design decisions and tradeoffs associated with mathematical operations.
We will start with the add() function. First, if we assume that all we are adding together are arrays that have exactly the same dateseries, and therefore the same length, and we assume they have exactly the same number of columns, then the whole question becomes trivial. If we relax those constraints, then some choices need to be made.
We will use the long and short timeseries from the previous example. ``` # this will fail due to dissimilar lengths ts_added = ts_short.add(ts_long, match=True)
# this will work
ts_added = ts_short.add(ts_long, match=False)
[ 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
``` The add() function checks to see if the number of columns match. If they do not an error is raised. If the match flag is True, then it also checks that all the dates in both timeseries match prior to the operation.
If match is False, then as long as the columns are compatible, the operation can take place. It also supports the concept of sparse arrays as well. For example, suppose you have a timeseries that is primary, but you would like to add in a timeseries values from only a few dates within the range. This function will find the appropriate dates adding in the values at just those rows.
To summarize, all dates in common to both timeseries will be included in the new timeseries if match is False.
Because the previous function is somewhat specialized, you can assume that the checking of common dates and creating the new timeseries can be somewhat slower than other approaches.
If we assume some commonalities about our timeseries, then we can do our work in a more intuitive fashion.
Let us assume that our timeseries might be varying in length, but we absolutely know what either our starting date or ending date is. And, let us assume that all the dates for the periods in common to the timeseries match.
If we accept those assumptions, then a number of operations become quite easy.
The timeseries object can accept simple arithmetic as if it is an array. It automatically passes the values on to the tseries array. If the two arrays are not the same length the longer array is truncated to the shorter length. So if you were add two arrays together that end at the same date, you would want to sort them latest date to earliest date using the function sort_by_date().
``` # starting tseries ts.tseries [ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9.]
(ts + 3).tseries
[ 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]
# Also, reverse (__radd__)
(3 + ts).tseries
[ 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.]
# of course not just addition
5 * ts.tseries
[ 0. 5. 10. 15. 20. 25. 30. 35. 40. 45.]
Also, in-place operations. But first, we will make a copy.
ts1 = ts.clone()
ts1.tseries /= 3
print(ts1.tseries)
[0.0
0.3333333333333333
0.6666666666666666
1.0
1.3333333333333333
1.6666666666666667
2.0
2.3333333333333335
2.6666666666666665
3.0]
ts1 = ts ** 3
ts1.tseries
0.0
1.0
8.0
27.0
64.0
125.0
216.0
343.0
512.0
729.0
ts1 = 10 ** ts
ts1.tseries
[1.0
10.0
100.0
1000.0
10000.0
100000.0
1000000.0
10000000.0
100000000.0
1000000000.0]
```
In other words, the normal container functions you can use with numpy arrays are available to the timeseries objects. The following container functions for arrays are supported. ``` pow add rsub sub eq ge gt le lt mod mul ne radd rmod rmul rpow abs pos neg invert rdivmod rfloordiv floordiv truediv rtruediv divmod
__and__ __or__ __ror__ __rand__ __rxor__ __xor__ __rshift__
__rlshift__ __lshift__ __rrshift__
__iadd__ __ifloordiv__ __imod__ __imul__ __ipow__ __isub__
__itruediv__]
__iand__ __ilshift__ __ior__ __irshift__ __ixor__
```
The purpose the timeseries objects is to implement an intuitive usage of timeseries objects in a fashion that is consistent with NumPy. However, it is not intended to replace functions that are better handled explicitly with the dseries and tseries arrays directly. The difference will be clear by comparing the list of functions for the timeseries object versus a numpy array. Most of the functions of the timeseries object is related to handling the commonality of date series with time series. You can see that the bulk of the thymus functions relate to maintenance of the coordination betwee the date series and timeseries. The meat of the functions still lie with the numpy arrays. ```
ts.add ts.daterange ts.get_pcdiffs ts.series_direction ts.as_dict ts.datetime_series ts.header ts.set_ones ts.as_json ts.dseries ts.if_dseries_match ts.set_zeros ts.as_list ts.end_date ts.if_tseries_match ts.shape ts.clone ts.end_of_period ts.items ts.sort_by_date ts.closest_date ts.extend ts.key ts.start_date ts.columns ts.fmt_date ts.lengths ts.trunc ts.combine ts.frequency ts.make_arrays ts.truncdate ts.common_length ts.get_date_series_type ts.months ts.tseries ts.convert ts.get_datetime ts.replace ts.years ts.date_native ts.get_diffs ts.reverse ts.date_string_series ts.get_duped_dates ts.row_no
ts.tseries.T ts.tseries.cumsum ts.tseries.min ts.tseries.shape
ts.tseries.all ts.tseries.data ts.tseries.nbytes ts.tseries.size
ts.tseries.any ts.tseries.diagonal ts.tseries.ndim ts.tseries.sort
ts.tseries.argmax ts.tseries.dot ts.tseries.newbyteorder ts.tseries.squeeze
ts.tseries.argmin ts.tseries.dtype ts.tseries.nonzero ts.tseries.std
ts.tseries.argpartition ts.tseries.dump ts.tseries.partition ts.tseries.strides
ts.tseries.argsort ts.tseries.dumps ts.tseries.prod ts.tseries.sum
ts.tseries.astype ts.tseries.fill ts.tseries.ptp ts.tseries.swapaxes
ts.tseries.base ts.tseries.flags ts.tseries.put ts.tseries.take
ts.tseries.byteswap ts.tseries.flat ts.tseries.ravel ts.tseries.tobytes
ts.tseries.choose ts.tseries.flatten ts.tseries.real ts.tseries.tofile
ts.tseries.clip ts.tseries.getfield ts.tseries.repeat ts.tseries.tolist
ts.tseries.compress ts.tseries.imag ts.tseries.reshape ts.tseries.tostring
ts.tseries.conj ts.tseries.item ts.tseries.resize ts.tseries.trace
ts.tseries.conjugate ts.tseries.itemset ts.tseries.round ts.tseries.transpose
ts.tseries.copy ts.tseries.itemsize ts.tseries.searchsorted ts.tseries.var
ts.tseries.ctypes ts.tseries.max ts.tseries.setfield ts.tseries.view
ts.tseries.cumprod ts.tseries.mean ts.tseries.setflags
```
Variations on a theme: ``` # truncation ts.truncdate( start=datetime(2017, 1, 1), finish=datetime(2017, 12, 31))
# just start date etc.
ts.truncdate(
start=datetime(2017, 1, 1))
# this was in date order but suppose it was in reverse order?
# this result will give the same answer
ts1 = ts.truncdate(
start=datetime(2017, 1, 1),
new=True)
ts.reverse()
ts1 = ts.truncdate(
start=datetime(2017, 1, 1),
new=True)
# use the date format native to the dateseries (ordinal / timestamp)
ts1 = ts.truncdate(
start=datetime(2017, 1, 1).toordinal(),
new=True)
# suppose you start with a variable that represents a date range
# date range can be either a list or tuple
ts.truncdate(
[datetime(2017, 1, 1), datetime(2017, 12, 31)])
```
``` # native format ts.daterange() (735963, 735972)
# str format
ts.daterange('str')
('2015-12-31', '2016-01-09')
# datetime format
ts.daterange('datetime')
(datetime.datetime(2015, 12, 31, 0, 0), datetime.datetime(2016, 1, 9, 0, 0))
# native format
ts.start_date(); ts.end_date()
735963 735972
# str format
ts.start_date('str'); ts.end_date('str')
2015-12-31 2016-01-09
# datetime format
ts.start_date('datetime'); ts.end_date('datetime')
2015-12-31 00:00:00 2016-01-09 00:00:00
``` Sometimes it is helpful to find a particular row based on the date. Also, that date might not be in the dateseries, and so, the closest date will suffice.
We will create a sample timeseries to illustrate. ``` ts = Timeseries() ts.dseries = [] ts.tseries = []
start_date = datetime(2015, 12, 31)
for i in range(40):
date = start_date + timedelta(days=i)
if date.weekday() not in [5, 6]: # skipping weekends
ts.dseries.append(date.toordinal())
ts.tseries.append(i)
ts.make_arrays()
# row_no, date
(0, '2015-12-31')
(1, '2016-01-01')
(2, '2016-01-04')
(3, '2016-01-05')
(4, '2016-01-06')
(5, '2016-01-07')
(6, '2016-01-08')
(7, '2016-01-11')
(8, '2016-01-12')
(9, '2016-01-13')
(10, '2016-01-14')
(11, '2016-01-15')
(12, '2016-01-18')
(13, '2016-01-19')
(14, '2016-01-20')
(15, '2016-01-21')
(16, '2016-01-22')
(17, '2016-01-25')
(18, '2016-01-26')
(19, '2016-01-27')
(20, '2016-01-28')
(21, '2016-01-29')
(22, '2016-02-01')
(23, '2016-02-02')
(24, '2016-02-03')
(25, '2016-02-04')
(26, '2016-02-05')
(27, '2016-02-08')
date1 = datetime(2016, 1, 7) # existing date within date series
date2 = datetime(2016, 1, 16) # date falling on a weekend
date3 = datetime(2015, 6, 16) # date prior to start of date series
date4 = datetime(2016, 3, 8) # date after to end of date series
# as datetime and in the series
existing_row = ts.row_no(rowdate=date1, closest=1)
5
existing_date = ts.closest_date(rowdate=date1, closest=1)
print(datetime.fromordinal(existing_date))
2016-01-07 00:00:00
# as datetime but date not in series
next_row = ts.row_no(rowdate=date2, closest=1)
12
next_date = ts.closest_date(rowdate=date2, closest=1)
print(datetime.fromordinal(next_date))
2016-01-18 00:00:00
prev_row = ts.row_no(rowdate=date2, closest=-1)
11
prev_date = ts.closest_date(rowdate=date2, closest=-1)
print(datetime.fromordinal(prev_date))
2016-01-15 00:00:00
# this will fail -- date is outside the date series
# as datetime but date not in series, look for earlier date
ts.closest_date(rowdate=date3, closest=-1)
# this will fail -- date is outside the date series
ts.closest_date(rowdate=date4, closest=1)
```
Returns the time series as a dict with the date as the key and without
the header information.
This function returns the timeseries in JSON format and includes the
header information.
Returns the timeseries as a list.
This function returns a dict of the non-timeseries data.
This function returns the date series and the time series as if it
is in one list. The term items used to suggest the iteration of dicts
where items are the key, value combination.
if fmt == 'str':
the dates are output as strings
This function provides a quick way to summarize daily (or less)
as monthly data.
It is basically a pass-through to the convert function with more
decoration of the months.
Usage:
months(include_partial=True)
returns a dict with year-month as keys
This function provides a quick way to summarize daily (or less)
as yearly data.
It is basically a pass-through to the convert function with more
decoration of the years.
Usage:
years(include_partial=True)
returns a dict with year as keys
This function returns the dateseries converted to a list of
datetime objects.
This function returns a list of the dates in the timeseries as
strings.
Usage:
self.date_string_series(dt_fmt=None)
dt_fmt is a datetime mask to alter the default formatting.
Adds two timeseries together.
if match is True:
means there should be a one to one corresponding date in each time
series. If not raise error.
else:
means that timeseries with sporadic or missing dates can be added
Note: this does not evaluate whether both timeseries have the same
number of columns. It will fail if they do not.
Returns the timeseries. Not in-place.
This function returns a copy of the timeseries.
This function combines timeseries into a single array. Combining in
this case means accumulating additional columns of information.
Truncation takes place at the end of rows. So if the timeseries is
sorted from latest dates to earliest dates, the older values would be
removed.
Usage:
self.combine(tss, discard=True, pad=None)
Think of tss as the plural of timeseries.
If discard:
Will truncate all timeseries lengths down to the shortest
timeseries.
if discard is False:
An error will be raised if the all the lengths do not match
unless:
if pad is not None:
the shorter timeseries will be padded with the value pad.
Returns the new ts.
This static method trims the lengths of two timeseries and returns two
timeseries with the same length.
The idea is that in order to do array operations there must be a
common length for each timeseries.
Reflecting the bias for using timeseries sorted from latest info to
earlier info, truncation takes place at the end of the array. That
way older less important values are removed if necessary.
Usage:
ts1_new, ts2_new = self.common_length(ts1, ts2)
This function returns the timeseries converted to another frequency,
such as daily to monthly.
Usage:
convert(new_freq, include_partial=True, **kwargs)
The only kwarg is
weekday=<some value>
This is used when converting to weekly data. The weekday number
corresponds to the the datetime.weekday() function.
This function combines a timeseries to another, taking into account the
possibility of overlap.
This assumes that the frequency is the same.
This function is chiefly envisioned to extend a timeseries with
additional dates.
Usage:
self.extend(ts, overlay=True)
If overlay is True then the incoming timeseries will overlay
any values that are duplicated.
This function truncates in place, typically.
truncate from (start:finish)
remember start is lowest number, latest date
This truncation works on the basis of slicing, so
finish is not inclusive.
Usage:
self.trunc(start=None, finish=None, new=False)
This function truncates in place on the basis of dates.
Usage:
self.truncdate(start=None, finish=None, new=False)
start and finish are dates, input as either datetime or the actual
internal format of the **dseries** (ordinals or timestamps).
If the dates are not actually in the list, the starting date will
be the next viable date after the start date requested. If the finish
date is not available, the previous date from the finish date will be
the last.
If new is True, the timeseries will not be modified in place. Rather
a new timeseries will be returned instead.
This function replaces values where the dates match an incoming
timeseries. So if the incoming date on the timeseries matches, the
value in the current timeseries will be replaced by the incoming
timeseries.
Usage:
self.replace(ts, match=True)
If match is False, the incoming timseries may have dates not found in
the self timeseries.
Returns the modified timeseries. Not in place.
This function does in-place reversal of the timeseries and dateseries.
This function gets the differences between values from date to date in
the timeseries.
This function gets the percent differences between values in the
timeseries.
No provision for dividing by zero here.
This function converts an existing timeseries to ones using the same
shape as the existing timeseries.
It is used as a convenience to create an empty timeseries with a
specified date range.
if fmt use as shape
usage:
set_ones(self, fmt=None, new=False)
This function converts an existing timeseries to zeros using the same
shape as the existing timeseries.
It is used as a convenience to create an empty timeseries with a
specified date range.
if fmt use as shape
usage:
set_zeros(self, fmt=None, new=False)
This function converts a timeseries to either date order or reverse
date order.
Usage:
sort_by_date(self, reverse=False, force=False)
If reverse is True, then order will be newest to oldest.
If force is False, the assumption is made that comparing the first
and last date will determine the current order of the timeseries. That
would mean that unnecessary sorting can be avoided. Also, if the order
needs to be reversed, the sort is changed via the less expensive
reverse function.
If dates and values are in no particular order, with force=True, the
actual sort takes place.
This function changes the data in-place.
This function returns the starting and ending dates of the timeseries.
Usage:
self.daterange()
(735963, 735972)
self.daterange('str')
('2015-12-31', '2016-01-09')
self.daterange('datetime')
(datetime(2015, 12, 31, 0, 0),
datetime.datetime(2016, 1, 9, 0, 0))
This function returns the starting date of the timeseries in its
native value, timestamp or ordinal.
If fmt is 'str' returns in string format
If fmt is 'datetime' returns in string format
This funtcion returns the ending date of the timeseries in its native
value, timestamp or ordinal.
If fmt is 'str' returns in string format
If fmt is 'datetime' returns in string format
This function pulls dates that are duplicated. This is to be used to
locate timeseries that are faulty.
Usage:
get_duped_dates()
returns [[odate1, count], [odate2, count]]
if a lower row is a lower date, then 1 for ascending
if a lower row is a higher date then -1 for descending
This function returns the date series type associated with the
timeseries. The choices are TS_ORDINAL or TS_TIMESTAMP.
This function returns True if the date series are the same.
This function returns True if the time series are the same.
This awkwardly named function returns a date in the native format of
of the timeseries, namely ordinal or timestamp.
Shows the row in the timeseries
Usage:
ts.row(rowdate=<datetime>)
ts.row(rowdate=<date as either ordinal or timestamp>)
Returns an error if the date is not found in the index
if closest is invoked:
closest = 1
find the closest date after the rowdate
closest = -1
find the closest date before the rowdate
If no_error
returns -1 instead of raising an error if the date was
outside of the timeseries.
This function returns a date as a datetime object.
This takes into account the type of date stored in **dseries**.
Usage:
self.get_datetime(date)
This function returns the lengths of both the date series and time
series. Both numbers are included in case a mismatch has occurred.
This function return the shape of the timeseries. This is a shortcut
to putting in ts.tseries.shape.
This static method accepts a date and converts it to
the format used in the timeseries.
Convert the date and time series lists (if so) to numpy arrays
This is just a stub to suggest a viable name for getting data from a
database.
This is just a stub to suggest a viable name for saving data to a
database.


@import models.TestResults @(testResult: TestResults)(implicit request: RequestHeader) @main("Results") { @**@
(Words per minute)
To calculate your error rate, each sentence you inputted is compared to the correct sentence. Edit distance, a value which measures differences between two strings, is then calculated with the Levenshtein distance formula. A percentage of error is derived by comparing the edit distance and either the correct sentence or the sentence inputted, which ever is longer. To get the final error rate of the whole test, a weighted (based on sentence length) average of all error rates is calculated.


Single date picker
Calendar
Current Date: {{ date }}
Calendar (with min/max date, days from month before and after are hidden)
Current Date: {{ date }}
Calendar (with min/max date, days from month before and after are explicitly shown)
Current Date: {{ date }}
Date range picker
Calendar
Current Date: {{ dateRange }}
Calendar (with min/max date, days from month before and after are hidden)
Current Date: {{ dateRange }}


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Casting.20from.20Prop.20to.20Type.20u.html ---
I've got a prop P : Prop
, but now I need to view P
as a term of Type u
. How do I cast/lift it like that?
plift
plift
?
You're end bosses!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Legendword Tetris v1.5.1
Score: 0
Level: 1
Speed: 1.25 blocks/second
Next Shape:
High Score:
Instructions: Press ESC to pause/continue the game. Use arrow keys for control: UP to rotate the shape, DOWN to speed up, LEFT/RIGHT to move the shape horizontally. Press SPACE to immediately move the shape to the bottom. This game has mobile support.
©Legendword 2018-2019


Deprecated: This plugin has been removed from the Jenkins Update Centre
The testflightapp service no longer exists.
Archived versions of this plugin remain available for download.
Plugin Information |
|---|
No information for the plugin 'testflight' is available. It may have been removed from distribution. |
This plugin uses the Testflight upload API to allow for uploading APKs/IPAs (and their optional DSYMs) to www.testflightapp.com
Documentation
If you do not specify the ipa/apk/dsym file(s) they are searched for automatically in the workspace.
The testflight install and config links are exposed as environment variables (TESTFLIGHT_INSTALL_URL and TESTFLIGHT_CONFIG_URL).
If you run into strange issues, you might want to enable the debug parameter (under the advanced section) to troubleshoot your problem.
Upgrade guide
Sometimes the behavior or configuration has to change:
- 1.3.6, testflight secrets have been moved to Jenkins global configuration. The previous settings are kept inside the job configuration until the job configuration is saved again.
- 1.3.7, proxy configuration has been moved to Jenkins global configuration. The previous settings are kept inside the job configuration until the job configuration is saved again.
- 1.3.7, if the dsym element is left empty, when found, dSYM files are now automatically updated for any IPA to upload.
Known issues
Changelog
Version 1.3.9 (Aug 1 2013)
* support multiple upload files per team (JENKINS-17592)
* find files with relative paths (backward compatibility fix)
* display proper upload speed again in console
Version 1.3.8 (May 22 2013)
* support multiple links (JENKINS-18045)
* properly fail the build when no file was uploaded (probably misconfigured) (JENKINS-18044)
Version 1.3.7 (May 22 2013)
* deprecated proxy configuration in favor of Jenkins overall proxy configuration
* support wildcards in uploads (JENKINS-17592)
* improved inline documentation
Version 1.3.6 (May 15 2013)
* move testflight tokens to global configuration
* bugfix: sometimes the files to upload weren't found by the uploader (JENKINS-17563)
* bugfix: NPE in saving (JENKINS-17313)
Version 1.3.5 (Mar 14 2013)
* added a debug parameter for troubleshooting.
Version 1.3.4 (Mar 13 2013)
* support deploying APKs
Version 1.3.3 (Feb 11 2013)
* fix encoding issue in changelog message
* automatically find all IPAs if none specified
Version 1.3.2 (Jan 31 2013)
* expose the testflight install and config links as environment variables as TESTFLIGHT_INSTALL_URL and TESTFLIGHT_CONFIG_URL environment variables (https://github.com/jenkinsci/testflight-plugin/pull/8)
* all information passed to the testflight API is expanded (lists, api and team tokens, buildnotes)
* fixes related to master/slave setup
* hide secret tokens in GUI
* added an option to append the build changelog to the build notes
* fixed an encoding issue in notes field.
* log upload speed transfer
Version 1.3.1 (Jan 12 2012)
* Added DSYM upload support
* Works with Jenkins Slaves
* Proxy support
* Default IPA upload
Thank you for the pull requests!
Version 1.2 (Sep 28 2011)
* Fixing configured items not reappearing when editing again
Version 1.1.1 (Aug 27 2011)
* Fixing metadata to show the proper name in the update list.
* Fixing wiki link
Version 1.1 (Aug 26 2011)
* Initial version
* Will show Configure and Install links on the build status page
* Will show latest install links on the project page


Choose topics that interest you
Gaming
164
Music
212
Illustration
326
Photography
321
Architecture
58
Technology
118


Stay up to date with ecommerce trends with Shopify's newsletter
Subscribe for free marketing tips
Interested in...
Marketing
Financing
Entrepreneurship
Supply Chain Management
Sign up now
Thanks for subscribing
You'll start receiving free tips and resources soon.


For Ph.D. admission, please apply online here. Besides applying online, request to send your updated CV to<EMAIL_ADDRESS>Students should follow the Insitute's general guidelines for applying for a PhD, and mark their application for consideration by the Computational Biology DTC.


registration
Name:
Type:
Volunteer
NGO
Phone number (10-digits):
US Zip Code:
Expected weekly time commitment (in hours):
Interests / Requirements:
Food distribution
Cleaning
Teaching
Send


This is a jumbotron
word word word word word word word word
Email address
Password
File input
Example block-level help text here.
Check me out
Submit
Ospoppin


Enter your date of birth.
Day...
Input is not a valid day (number)!
Month...
Input is not a valid month (number)!
Year...
Input is not a valid year (number)!
Ok.
Hello
Home
About
Contact
Title
Home
About
Contact
redo
Horoscopes
Sign
A week ago:
share
A month ago:
share
Six months ago:
share
A year ago:
share
star
Sign:
brightness_low
Stone:
filter_vintage
Flower:
public
Planet:
flare
Colour:
whatshot
Element:


Welcome to CodeBros, the page of Josiah and Elisha Coad. We are two brothers with varying skills that when combined, create explosive results. I'd say we make a pretty good team. Check out a few of our projects below!
From a clean interface to powerful backend using Django, we have all the skills necessary to build your website.
We have done most of our work in C#, C++, Python, HTML, CSS, and JS and are learning more every day ;)
Using Trello, we have developed a tried-and-true system to keep track of every part of the development process in order to deliver what matters most.
We also are well versed in 3D design and animation, both for technical or artistic needs, including logo design.
Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!
Eli:<PHONE_NUMBER>, Jo:<PHONE_NUMBER>


Number of tries before falling back to default search:
Don't fall back on default search (if strict search fail, the search will fail)
Number of tries for default search before failing:
Explanations:
Strict search is a feature allowing search to be more accurate but to have less chance to success.
The more different tags you have, the more likely the search will succeed (to be sure it doesn't fail, you should have at least 100).
To know how many you have, you can check the "Tag count (uncategorized)" in the "Logs for bug report" section.
If it doesn't find anything after a certains amount of tries, it'll fall back on default search.
Advanced search options: (If you're not sure what you're doing, avoid modifying these)
Number of tags per search:
Number of favorite tags:
Time between requests: ms
Explanations:
The extension take all the tags from your favorites doujinshi and order them in descending order.
When doing the requests to get each tag, we need to wait between each requests to each doujinshi (so we don't get a 50X error)
Then it takes X tags from the top of the list, these tags are considered as your favorite tags.
From these X tags, it then take Y random tags and do a search with them.
After that it just take a random doujinshi and show it to you.
Logs for bug report:
When making a bug report, please copy the following information:
User's tags:
All your tags and where they are from.
If nothing is displayed, press the "Force Update" button at the top of your screen and wait.
Click on a tag to display the doujinshi where they are from.
Click on the image of a doujinshi to see it NHentai page.
Color chart:
Red: Character
Purple: Parody
Blue: Artist
Cyan: Group
Yellow: Category
Green: Language
Grey: Other


Files CCore/inc/net/PSecCore.h CCore/src/net/PSecCore.cpp
Files CCore/inc/net/PSec.h CCore/src/net/PSec.cpp
Files CCore/inc/net/PSecKey.h CCore/src/net/PSecKey.cpp
PSec is a security protocol for point-to-point packet-based communication. CCore provides an implementation of this protocol. It's enclosed in the namespace PSec. The protocol itself is described in this document.
The following utility classes are used in the PSec implementation.
AbstractCryptFunc is an abstract block cipher function class.
struct AbstractCryptFunc : MemBase_nocopy
{
virtual ~AbstractCryptFunc() {}
virtual ulen getBLen() const =0;
virtual ulen getKLen() const =0;
virtual void key(const uint8 key[ /* KLen */ ])=0;
virtual void apply(uint8 block[ /* BLen */ ]) const =0;
};
getBLen() returns the cipher block length.
getKLen() returns the key length.
key() activates the given key. The length of the buffer is getKLen(). After this method call the function can process data blocks.
apply() performs the block cipher in-place. The length of the buffer is getBLen().
AbstractHashFunc is an abstract hash function class.
struct AbstractHashFunc : MemBase_nocopy
{
virtual ~AbstractHashFunc() {}
virtual ulen getHLen() const =0;
virtual void add(PtrLen<const uint8> data)=0;
virtual const uint8 * finish()=0; /* [HLen] */
};
getHLen() returns the digest length.
add() adds a chunk of data in the hash calculation.
finish() finishes the hash calculation and starts the hash function over. The result is returned in some internal buffer of the length getHLen().
AbstractKeyGen is used in the key generation process. It implements the power calculation for some finite group.
struct AbstractKeyGen : MemBase_nocopy
{
virtual ~AbstractKeyGen() {}
virtual ulen getGLen() const =0;
virtual ulen getKLen() const =0;
virtual void pow(const uint8 x[ /* GLen */ ],uint8 gx[ /* GLen */ ])=0;
virtual void key(const uint8 x[ /* GLen */ ],const uint8 gy[ /* GLen */ ],uint8 key[ /* KLen */ ])=0;
};
getGLen() returns the group element octet representation length.
getKLen() returns the key length.
pow() calculates the power of the generator element gx.
key() calculates the power gyx and transforms the result into the key. (gx)y and (gy)x renders the same key.
AbstractRandomGen is an abstract random generator class. It is not required to be a cryptography strong. But it should be a quality RNG.
struct AbstractRandomGen : MemBase_nocopy
{
virtual ~AbstractRandomGen() {}
virtual void fill(PtrLen<uint8> buf)=0;
};
fill() fills the buffer with random bytes.
LifeLim presents key lifetime limits.
struct LifeLim
{
uint32 ttl; // sec
uint32 utl;
LifeLim() : ttl(0),utl(0) {}
LifeLim(uint32 ttl_,uint32 utl_) : ttl(ttl_),utl(utl_) {}
....
};
ttl is the time limit in seconds. A key must be replaced after this time is expired.
utl is the traffic limit in octets. A key must be replaced after this number of octets has been encrypted using this key.
AlgoLen presents key algorithms properties.
struct AlgoLen
{
ulen blen;
ulen hlen;
AlgoLen(ulen blen_,ulen hlen_) : blen(blen_),hlen(hlen_) {}
};
blen is the block cipher length.
hlen is the hash digest length.
EndpointManager is an interface to manage secure endpoint session.
/* struct AbstractClientProfile */ struct AbstractClientProfile : MemBase_nocopy { virtual ~AbstractClientProfile() {} }; /* type ClientProfilePtr */ using ClientProfilePtr = OwnPtr<AbstractClientProfile> ; /* struct EndpointManager */ struct EndpointManager { static const Unid TypeUnid; enum OpenErrorCode : uint32 { Open_Ok = 0, OpenError_NoMemory, OpenError_OpenLimit, OpenError_NoAccess }; virtual OpenErrorCode open(XPoint point,const MasterKey &skey,ClientProfilePtr &&client_profile)=0; virtual bool close(XPoint point)=0; virtual ulen closeAll()=0; virtual AbstractClientProfile * getClientProfile(XPoint point)=0; };
open() opens a communication session with the given endpoint. The endpoint is identified by its abstract XPoint address point. The second argument is a MasterKey reference. The object is used only inside the method and may be destroyed after the method call. The last argument is a client profile pointer. A client profile is an abstract piece of data associated with the client. It is provided by the caller of the method open() and can be retrieved by the method getClientProfile(). The method returns the status code.
close() closes the session with the given endpoint. It returns true if such connection exists and false otherwise.
closeAll() closes all sessions and returns the number of sessions closed.
getClientProfile() returns the pointer to the client profile, associated with the endpoint. The pointer is null, if there is no session with this endpoint. An implementation should provide a context requirement for the calling this method.
The MasterKey class is used to present a key information for a PSec connection. It is an abstract multi-factory.
struct MasterKey : MemBase_nocopy { virtual ~MasterKey() {} // factory virtual AbstractCryptFunc * createEncrypt() const =0; virtual AbstractCryptFunc * createDecrypt() const =0; virtual AbstractHashFunc * createHash() const =0; virtual AbstractKeyGen * createKeyGen() const =0; virtual AbstractRandomGen * createRandom() const =0; // keys virtual ulen getKLen() const =0; virtual LifeLim getLifeLim() const =0; virtual void getKey0(uint8 key[ /* KLen */ ]) const =0; virtual ulen getKeySetLen() const =0; virtual void getKey(ulen index,uint8 key[ /* KLen */ ]) const =0; }; using MasterKeyPtr = OwnPtr<MasterKey> ;
The first group of method is used to create various processing objects. They return a pointer to an abstract object interface. An exception is thrown in case of error.
createEncrypt() creates an encryption function.
createDecrypt() creates a complementary decryption function.
createHash() creates a hash function.
createKeyGen() creates a key generator.
createRandom() creates a random generator.
The second group of methods present key information.
getKLen() returns the key length. It is the key length of the encryption and decryption functions.
getLifeLim() returns the life limit per key.
getKey0() copies the key-0 into the provided buffer. The buffer length is getKLen().
getKeySetLen() returns the number of keys in the keyset.
getKey() copies the key from the keyset into the provided buffer. The buffer length is getKLen(). The key index is zero-based.
EndpointDevice transforms an insecure PacketEndpointDevice into a secure PacketEndpointDevice. Usually it is used on the client side.
class EndpointDevice : public ObjBase , public PacketEndpointDevice
{
....
public:
EndpointDevice(StrLen ep_dev_name,const MasterKey &master_key,MSec keep_alive_timeout=Null);
virtual ~EndpointDevice();
void close(); // send Close to the peer and assert connection_lost
// stat
using StatInfo = ProcessorStatInfo ;
void getStat(StatInfo &ret) const;
// InterfaceHost
virtual void requestInterface(InterfaceCaster &caster);
// PacketEndpointDevice
virtual PacketFormat getOutboundFormat() const;
virtual void outbound(Packet<uint8> packet);
virtual ulen getMaxInboundLen() const;
virtual void attach(InboundProc *proc);
virtual void detach();
};
Constructor takes three arguments. The first argument is the name of an insecure endpoint device. The second is the master key for the protected session. The key object may be destroyed after the constructor call. The third is the keep-alive timeout. If this argument is not null, then the keep-alive mechanic is activated. If there is no confirmed inbound packets during some period then the connection is closed. Ping packets are sent prior the timeout expiration to make sure the peer is alive.
The object itself is the secure endpoint device. Outbound packets are encrypted and sent to the insecure device. Inbound packets from the insecure device are verified, decrypted and sent to the inbound processor.
close() can be used to close the connection. The Close packet is sent to the peer and the connection_lost is asserted.
getStat() returns the connection statistic counters.
MultipointDevice transforms insecure PacketMultipointDevice into s secure PacketMultipointDevice. Usually it is used on the server side. The communication with a particular network peer is protected using the particular master key. This class implements the EndpointManager interface to control opened sessions.
class MultipointDevice : public ObjBase , public PacketMultipointDevice , public EndpointManager
{
....
public:
MultipointDevice(StrLen mp_dev_name,PtrLen<const AlgoLen> algo_lens,ulen max_clients,MSec keep_alive_timeout);
virtual ~MultipointDevice();
// stat
using StatInfo = ProcessorStatInfo ;
void getStat(StatInfo &ret) const;
bool getStat(XPoint point,StatInfo &ret) const;
template <FuncInitArgType<XPoint,StatInfo &> FuncInit>
void processStat(FuncInit func_init) const; // func(XPoint point,StatInfo &temp_copy)
// InterfaceHost
virtual void requestInterface(InterfaceCaster &caster);
// PacketMultipointDevice
virtual StrLen toText(XPoint point,PtrLen<char> buf) const;
virtual PacketFormat getOutboundFormat() const;
virtual void outbound(XPoint point,Packet<uint8> packet);
virtual ulen getMaxInboundLen() const;
virtual void attach(InboundProc *proc);
virtual void detach();
// EndpointManager
virtual OpenErrorCode open(XPoint point,const MasterKey &skey,ClientProfilePtr &&client_profile);
virtual bool close(XPoint point);
virtual ulen closeAll();
virtual AbstractClientProfile * getClientProfile(XPoint point); // only inside inbound processing or processStat
};
The first argument of the constructor is the name of the insecure PacketMultipointDevice. The second is the list of the AlgoLen structures for the expected session keys. The max_clients is the maximum client number which can be active simultaneously. If last argument is the keep-alive timeout. If it is not null, then the keep-alive is activated.
To manage client sessions the EndpointManager interface is provided.
getStat() returns the connection statistic counters. If the XPoint is given it returns the counters for the particular session.
The method processStat() can be used to iterate over the active sessions. It calls the given functor per each session with two arguments: the first is the peer address, the second is the statistic counters for this session. The method is working under the internal mutex protection.
Outbound packets are encrypted using the session key of the correspondent session. The peer address determines the particular session. Inbound packets are verified, decrypted and sent to the inbound processor. They are processed in the context of the opened session. If there is no such one the packet is discarded.
The method open() opens or reopens the session. In the last case the session key and the client profile are replaced. A session can be closed manually or by the keep-alive processor if there is no response from the peer during the given period.
The method getClientProfile() can be safely called inside the inbound processing or the method processStat().


|
Back office Administrator Allows you to manage complex inventory with easy-to-use product types like standard, serialized, kit, matrix, non-inventory, weighted, rental, embedded bar code and unit of measure like single, case, pallet 12 pack, six pack. Easily set up discounts, promotions, and sales to increase customer satisfaction. Daily sales reports by register, shift and store are done quickly and accurately. Identify sales trends in every department or by category, employee vendor and customer then sort by SKU, Qty sold, Cost, Margin, Profit, Profit % in ascending or descending order. Export report information directly into Office Excel, XML, Comma Separated Value (CSV) files, or your email application. Easily manage fresh food department scale data within the product record of the administrator. Descriptions, ingredient text, nutritional facts, label print format. |
|
For more information please contact |


Symform - P2P Backup
I have previously posted about CrashPlan as my Backup System. I also, a long time ago, talked about Backing up SQL, MySQL and other stuff on my other blog. Well, CrashPlan is all good, but there are 2 “niggly” bits with it…
- Its not FREE (well, this year i got it Free on Black Friday…) but it is cheap ($120 a year to backup 10 machines to the cloud aint bad.)
- Its NOT FAST! The CrashPlan Datacenters all live in the US, and my servers live in Europe (either Dublin or Germany). So, bandwidth is limited… Getting less than 1Mbit/s most times, but have seen it reach 3… I have 20Mbits/s upload… even half that would be nice…
So, thats where Symform comes in. Symform is a P2P Backup Service, which runs on Windows, Linux and MacOSX. In theory, it should run anywhere that has a Mono runtime since its written in .NET. Anyway, you start with 10Gb of free storage, and you can increese that by one of 2 ways:
- Pay money: for $0.15 per month, you get 1Gb of storage in the cloud
- Pay Bytes: For every 2Gb “Contributed” (which is actually more like a pledge than a contribution… more on that later) you get 1Gb storage in the cloud.
It works very well, and is nice a fast too. I have a few machines in house which are contribting stoage, a total of about 2Tb, and I have been given 1Tb storage in “The Cloud”. There is a lot more on how this works on their “How Symform Works” section of their site.
I mentioned the “Contribution” VS “Pledge” up above… I have a machine in the house where i have Pledged 1Tb of storage. In reality, Symform can use the full 1Tb of storage, if it needs to, but is currently only using 168Gb. Now, that could just be that the machine is still getting files, and it will end up using the full 1Tb eventually, but either way, its all good.
Also, as a couple of notes on Contribution and Backups:
- The machine needs to be online and accessable on the internet at least 80% of the time, but 24⁄7 is ideal. If you drop below the 80%, your account can be suspended.
- your machine needs to be publically accessable, meaning port forwarded. I have a couple contribution machines in house, so they each have seperate ports forwarded to them.
- Given the P2P nature of the software, lots of connections to different machines are made… if you are behind a firewall, you may need to allow all or most outgoing connections. If you are on a really restrictive firewall, you may want to stick a contribution box in your DMZ and probably use the Turbo Seeding feature.
- Turbo Seeding is a handy feature, especially for Laptops… only problem is its Windows Only… So, importing and exporting does not work on Linux or OSX.
- The software can managed Work and Non Work hours, and will limit the upload and download speed during this time. Also a nice feature…
So far, so good. Very happy with the software, but would like a nicer interface to see whats going on. At the moment, you are either limited to using the web interface, which aint bad, but not great, or watching the log files… I would also like the ability to prioritize certain files or folders, so, for example, upload my documents folder before anything else, and if anything changes in there, even if its uploading from somewhere else, pause and upload the documents folder… Just a thought…
was last updated: July 5, 2019: fixing all aliases and build issues (41ef786). Found an issue? Improve this page
About
homepage of Tiernan OToole, Geek, photographer, GeekPhotographer, and lazy git.
Recent Posts
- Fixing CID (Caller ID) on incoming calls with 3CX
- Posts
- Network Update Info April 2019
- Adding a Netgear LB2120 to the homelab
- Finally going all in on VoIP
- Auto deploying to multiple servers with GitHub and Webhooks
- Moving the site to Hugo
- Playing with AMD’s Epyc
- AS204994, Own IP Space and Anycast
- Blogging on an iPad Pro


RTW :: Games
Research Project at Federal University of São Carlos
Third Game
{{ game }}
{{ _id }}
{% for i in range(2) %}{{ theme[i] }}
{% endfor %}{{ user }}
Waiting for your opponent...
The theme of the round is
Describe it in 3 words or expressions
You scored %d points!
Click here to play the second part of this game.
Next guess
|
Hints |
Previous entries |


Logisim's algorithm for simulating the propagation of values through circuits is not something that you normally need to worry about. Suffice it to say that the algorithm is sophisticated enough to account for gate delays, but not realistic enough to account for more difficult phenomena like varying voltages or race conditions.
Do you still want to know more?
Gate delays
Oscillation errors
Shortcomings
Next: Gate delays.


| 512 | (A) | als women weltir solde in swoun when water thaym neghys |
| 515 | (C) | And wymmen wepynn on hyȝe . whenne watur he nyȝetħ |
| 509 | (D) | As woman wepith & waylitħ whan watre he nei?? |
| 500 | (E) | as wommen wepeth an hey . whan þat sorwe hem neyȝeth . |
| (Ex) | ---- no text ---- | |
| 529 | (L) | as womman schal in a swem whan hire þe water neȝeþ |
| (P) | ---- no text ---- | |
| 508 | (U) | As women shrillen on hye / when water hem neghes |
| (V) | ---- no text ---- |


bson_iter_t
BSON Document Iterator
Synopsis
#include <bson.h> typedef struct { /*< private >*/ } bson_iter_t;
Description
bson_iter_t is a structure used to iterate through the elements of a bson_t. It is meant to be used on the stack and can be discarded at any time as it contains no external allocation. The contents of the structure should be considered private and may change between releases, however the structure size will not change.
The bson_t MUST be valid for the lifetime of the iter and it is an error to modify the bson_t while using the iter.
Examples
Iterate all Fields
bson_iter_t iter; if (bson_iter_init (&iter, my_bson_doc)) { while (bson_iter_next (&iter)) { printf ("Found a field named: %s\n", bson_iter_key (&iter)); } }
Find a Named Field
bson_iter_t iter; if (bson_iter_init (&iter, my_bson_doc) && bson_iter_find (&iter, "my_field")) { printf ("Found the field named: %s\n", bson_iter_key (&iter)); }
Recurse into a Sub-Document or Sub-Array
bson_iter_t iter; bson_iter_t sub_iter; if (bson_iter_init_find (&iter, my_bson_doc, "mysubdoc") && (BSON_ITER_HOLDS_DOCUMENT (&iter) || BSON_ITER_HOLDS_ARRAY (&iter)) && bson_iter_recurse (&iter, &sub_iter)) { while (bson_iter_next (&sub_iter)) { printf ("Found key \"%s\" in sub document.\n", bson_iter_key (&sub_iter)); } }
Find a Sub-Document Field
bson_iter_t iter; if (bson_iter_init (&iter, my_doc) && bson_iter_find_descendant (&iter, "a.b.c.d", &sub_iter)) { printf ("The type of a.b.c.d is: %d\n", (int)bson_iter_type (&sub_iter)); }


{% include 'header.html' %}
IDs
Regular expression
(leave blank to disable)
Update
Registered IDs
{% for id_num in id_numbers %}
{{ id_num }}
{% endfor %}


If you want to strike out text, use line-through.
This text might blink for you - if you use Explorer, it will not.
This link will not be underlined, as most links are by default. Be careful with removing the text decoration on links since most users depend on the underline to signify a hyperlink.
This text has both underline and overline.


Duke: Yea. But I figured it was just because I was surrounded by hoes. Oh no I didn't!
A Stock Phrase used to express incredulity. It happens when somebody says or does something completely outrageous, rude or over the line especially if it wasn't called for. Sometimes a person can say it himself (as in the above quote) to emphasize how much his diss must have stung.
Often pronounced "Oh no you di-unt!" especially by Sassy Black Women.
Examples:
- A few years back, there was a commercial for Kool-Aid featuring a young black girl opening her own lemonade stand, and reacts this way when she sees a neighborhood rival open a conveniently more successful stand across the street.
- Inverted with the latest Domino's Pizza slogan, after the company threw out their old pizza recipe: "Oh yes we did."
- Used in a commercial for Vault energy drink. A well-muscled Latin Lover presents a pearl to a guy's girlfriend, and the announcer firmly announces, "Oh no he dih-unt!"
- This ad with its wonderfully cheerful and catchy song featuring the above quote for the below-mentioned game.
- In the English dub for the Transformers spoof episode of Panty & Stocking with Garterbelt, the sisters' robot factions are about to face off.
 Really?
- Buttercup says this in The Powerpuff Girls story "Mayor Minor" (Cartoon Network Block Party #31) after the Mayor recruits the girls to escort him to the shopping mall where a costumed pickle mascot is appearing.
- Said by Archie in Life with Archie: The Married Life when Kevin Keller's senatorial opponent pulls the gay card.
- Kristin
HoltAdams did this a couple of times on Cheat!, with the "di'in't" pronunciation. - Used, of all places, the Christmas episode of series two of Chuck, by a sassy black woman Buy More employee.
- Used by Jon Stewart a couple of times in The Daily Show, usually in response to a bitchy comment from a minor politician on the News.
- Alan Kalter has a recurring sketch during The Late Show With David Letterman, "Alan Kalter's Oh No You Didn't!" Rule of Three always applies: After two "Oh no you di'in't"s, there always come a smarmy "Oh yes you did!" (usually in response to some celebrity sexcapade).
- My Name Is Earl pilot episode:
Randy: Oh no, you didn't. You didn't just go Old School!
- On Glee, during Regionals when the judges discuss the songs, specifically "Loser like me."
Tammy Jean Albertson: Those songs were terrible.
- Not quite the full-on "Oh No You Didn't", but towards the end of the MythBusters Greased Lightning episode, Adam's chosen method for finding out if it was ever possible to put out a pan fire with water turned out to be a helicopter equipped for fighting forest fires.
Adam: I think my water method is coming. Hold on... Hear that?
[Helicopters, and "Ride of the Valkyries", are heard]
Jamie: ... You didn't.
Adam: (gleefully) I did! - Saturday Night Live once did a mock advertisement for "Excedrin Racial Tension Headache" when Queen Latifah hosted.
"Takin' me from 'Oh no, you didn't!' to 'I wish you motherf***in' would.'"
- During Amy Poehler and Seth Meyers's tenure on Weekend Update, they would have a recurring dance based around this phrase.
- The very white J.D. in Scrubs after he insults Laverne:
J.D.: Oh no he di-unt! Yes, Laverne, he did.
- The phrase is used repeatedly in a Pizza Hut parody commercial on MADtv.
- Mean Girls:
Cady: You know what, it's not my fault you're like in love with me or something!
Janis: What?!
Damian: Oh no, she did not!
- Training Day: Alonzo at the beginning of his Villainous Breakdown.
Bones: Jake, go on and bounce homie, we'll handle it from here.
Alonzo: What? Oh no you didn't. Wait a minute, no you didn't. Hey, hey, Jake! Hey! Jake! Jake! Jake! Come back here! Jake! You disloyal fool-ass-bitch-made-punk. Jake! - The Great White Hype: Mitchell Kane really should not have said "My brother, I'm a man of peace" to the angry black man who's view of the fight Mitchell was blocking.
- Magic: The Gathering features a counterspell for which the image (seen here◊) is a woman finger-wagging.
- The theme song from Mercenaries 2: World in Flames.
- Rochelle in Left 4 Dead 2, being a Sassy Black Woman, is bound to say this. It takes two forms: a "Nice job!" voice command, in which she says it verbatim, or a more angered response to friendly fire.
Rochelle: Oh, no, you didn't just shoot me!
- In the reboot of Rise of the Triad, El Oscuro has this reaction in his true form after you press the button on the console.
- Johnny Cage in Mortal Kombat X sometimes says "Oh no I didn't!" when he does a Brutality.
- Strip #250 of The Order of the Stick is titled "Oh no, he DIDN'T!".
- This was Ruby's reaction to a wild Abra's attempt at escape in the Fire Red saga, here.
- This strip of Loserz is titled "Oh no she didn't!" and describes this trope pretty well.
- In the My Little Pony: Friendship Is Magic episode "Fall Weather Friends", when Applejack and Rainbow Dash start ramming into each other in the final stretch, commentators Spike and Pinkie Pie have the following exchange:
Spike: Oh no, she didn't!
Pinkie Pie: Oh yes, she di-id!
- Bender says this in response to the Professor lightly slapping him, after which Bender proceeds to beat the stuffing out of him.
- In the Aqua Teen Hunger Force episode Unremarkable Voyage, after Meatwad royally and unknowingly pisses off Frylock, Shake happily crows "Oh, you did not even just do that! Oh, no you didn't! Oh, my God!"
- In a 2012 episode of Teenage Mutant Ninja Turtles April is being stalked by a mutant pigeon. The turtles decide to use her as bait so that they can catch it and ask it what it wants. April walks along, but oversells when she starts talking outloud about how bad it would be for a mutant pigeon to attack her, starting an argument with Donatello.
Donatello: What are you doing?!April: You wanted me to be bait, I'm bait!Donatello: That's not how bait talks!April: How do you know how bait talks?Donatello: I know bait doesn't talk back!*The other turtles pop out of their hiding places*Turtles: Oooooooh!Michaelangelo: Oh no you didn't!
- Adam West says this in Family Guy when he is watching an episode of Rodney King Of Queens:
Carrie: Rodney, did you take out the trash?Rodney: Um, I forgot.*Carrie immediately begins brutally beating him with a rolling pin*Adam West: (watching from home) *laughs* Oh no she di-in't.
- In "Airport '07", Peter, Joe and Cleveland watch the ending of Last Holiday with Queen Latifa. After she crashes while sking...
Peter: Oh no she didn't!Joe: Oh yes she did!Peter: No she didn't!Joe: Yes she did!Peter: No she didn—Joe: Yes she did, Peter! I just saw it!Peter: All right, take it easy. - American Dad! had an episode featuring a talk show called "Oh no he didn't/Oh yes he did"
Woman: He promised me he'd help me flip the mattress.Host: And then what happened?Woman: He went to the ball game instead!Host: Oh no he didn't!Audience: Oh yes he did!
- It shows up a few times in The Boondocks.
- In "The Story of Thugnificent", Granddad and Thugnificent get into a feud, and Thugnificent releases a rap song dissing him.  No this nigga didn't!"
  before disemboweling him.
- The notorious LiveJournal celebrity gossip community "Oh No They Didn't!".


- acceptLogin(String, String, ServerChannel[]) - Method in class com.whirvis.jraknet.example.chat.server.ConnectedClient
-
Accepts the client's requested login and sends the data required for the
client to display the server data properly.
- acceptUsernameUpdate(String) - Method in class com.whirvis.jraknet.example.chat.server.ConnectedClient
-
Tells the client its new username has been accepted.
- ackMessages - Variable in class com.whirvis.jraknet.protocol.message.CustomPacket
-
- Acknowledge - Class in com.whirvis.jraknet.protocol.message.acknowledge
-
- Acknowledge(short) - Constructor for class com.whirvis.jraknet.protocol.message.acknowledge.Acknowledge
-
- Acknowledge(AcknowledgeType) - Constructor for class com.whirvis.jraknet.protocol.message.acknowledge.Acknowledge
-
- Acknowledge(Packet) - Constructor for class com.whirvis.jraknet.protocol.message.acknowledge.Acknowledge
-
- ACKNOWLEDGED - Static variable in class com.whirvis.jraknet.protocol.message.acknowledge.Acknowledge
-
- AcknowledgeType - Enum in com.whirvis.jraknet.protocol.message.acknowledge
-
Used by Acknowledge
to show what type a set of
Record
s is.
- AcknowledgeType(short) - Constructor for enum com.whirvis.jraknet.protocol.message.acknowledge.AcknowledgeType
-
- ackReceiptPackets - Variable in class com.whirvis.jraknet.session.RakNetSession
-
- ackRecord - Variable in class com.whirvis.jraknet.protocol.message.EncapsulatedPacket
-
If the reliability requires an ACK receipt (The name ends with
_WITH_ACK_RECEIPT
) then this can be used to determine if
this is the packet that was received or lost once you are notified
through onAcknowledge()
or
onNotAcknowledge()
.
This will always be null
before and after the two
notifier methods stated above are called.
- actionPerformed(ActionEvent) - Method in class com.whirvis.jraknet.example.chat.client.frame.ComboBoxServerChannelListener
-
- actionPerformed(ActionEvent) - Method in class com.whirvis.jraknet.example.chat.client.frame.ConnectServerListener
-
- actionPerformed(ActionEvent) - Method in class com.whirvis.jraknet.example.chat.client.frame.UpdateUsernameBoxListener
-
- actionPerformed(ActionEvent) - Method in class com.whirvis.jraknet.interactive.BroadcastFrame.RakNetBroadcastDiscoveryTypeListener
-
- actionPerformed(ActionEvent) - Method in class com.whirvis.jraknet.interactive.BroadcastFrame.RakNetBroadcastUpdatePortListener
-
- addChannel(ServerChannel) - Method in class com.whirvis.jraknet.example.chat.client.ChatClient
-
Adds a channel to the client.
- AddChannel - Class in com.whirvis.jraknet.example.chat.protocol
-
- AddChannel(Packet) - Constructor for class com.whirvis.jraknet.example.chat.protocol.AddChannel
-
- AddChannel() - Constructor for class com.whirvis.jraknet.example.chat.protocol.AddChannel
-
- addChannel(int, String) - Method in class com.whirvis.jraknet.example.chat.server.ChatServer
-
Adds a channel to the server with the specified ID and name.
- addChannel(int, String) - Method in class com.whirvis.jraknet.example.chat.server.ConnectedClient
-
Notifies the client of a new channel.
- addChatMessage(String) - Method in class com.whirvis.jraknet.example.chat.ServerChannel
-
Adds a chat message to the server channel.
- addClient(RakNetClient) - Method in class com.whirvis.jraknet.client.discovery.DiscoveryThread
-
Adds a RakNetClient
to the discovery system so it can
discover servers.
- addDiscoveryPort(int) - Method in class com.whirvis.jraknet.client.RakNetClient
-
Adds a discovery port to start broadcasting to.
- addExternalServer(InetSocketAddress) - Method in class com.whirvis.jraknet.client.RakNetClient
-
Adds a server to the client's external server discovery list.
- addExternalServer(InetAddress, int) - Method in class com.whirvis.jraknet.client.RakNetClient
-
Adds a server to the client's external server discovery list.
- addExternalServer(String, int) - Method in class com.whirvis.jraknet.client.RakNetClient
-
Adds a server to the client's external server discovery list.
- addListener(RakNetClientListener) - Method in class com.whirvis.jraknet.client.RakNetClient
-
Adds a listener to the client.
- addListener(RakNetServerListener) - Method in class com.whirvis.jraknet.server.RakNetServer
-
Adds a listener to the server.
- addLoopbackExempt() - Method in class com.whirvis.jraknet.windows.UniversalWindowsProgram
-
Makes the application loopback exempt, allowing it to connect with
applications on the same machine.
- address - Variable in class com.whirvis.jraknet.client.discovery.DiscoveredServer
-
- address - Variable in exception com.whirvis.jraknet.client.ServerOfflineException
-
- address - Variable in class com.whirvis.jraknet.client.SessionPreparation
-
- address - Variable in class com.whirvis.jraknet.protocol.login.OpenConnectionRequestTwo
-
- address - Variable in class com.whirvis.jraknet.session.RakNetSession
-
- ADDRESS_TEST_INVALID - Static variable in class com.whirvis.jraknet.RakNetTest
-
- ADDRESS_TEST_VALID - Static variable in class com.whirvis.jraknet.RakNetTest
-
- ADDRESS_VERSION_IPV4 - Static variable in class com.whirvis.jraknet.Packet
-
- ADDRESS_VERSION_IPV4_LENGTH - Static variable in class com.whirvis.jraknet.Packet
-
- ADDRESS_VERSION_IPV6 - Static variable in class com.whirvis.jraknet.Packet
-
- ADDRESS_VERSION_IPV6_LENGTH - Static variable in class com.whirvis.jraknet.Packet
-
- ADDRESS_VERSION_IPV6_MYSTERY_LENGTH - Static variable in class com.whirvis.jraknet.Packet
-
- addressBlocked(InetAddress) - Method in class com.whirvis.jraknet.server.RakNetServer
-
- addressBlocked(InetAddress) - Method in class com.whirvis.jraknet.server.RakNetServerHandler
-
- addSelfListener() - Method in class com.whirvis.jraknet.client.RakNetClient
-
Adds the client to its own set of listeners, used when extending the
RakNetClient
directly.
- addSelfListener() - Method in class com.whirvis.jraknet.server.RakNetServer
-
Adds the server to its own set of listeners, used when extending the
RakNetServer
directly.
- AlreadyConnectedException - Exception in com.whirvis.jraknet.client
-
Signals that a RakNetClient
is attempting to connect to a server
that it is already connected to.
- AlreadyConnectedException(RakNetClient) - Constructor for exception com.whirvis.jraknet.client.AlreadyConnectedException
-
Constructs an AlreadyConnectedException
with the specified
RakNetClient
.
- application - Variable in class com.whirvis.jraknet.windows.UniversalWindowsProgram
-
- APPLICATION_ARGUMENT - Static variable in class com.whirvis.jraknet.windows.UniversalWindowsProgram
-
- ARGUMENT_PREFIX - Static variable in class com.whirvis.jraknet.windows.PowerShellCommand
-
- arguments - Variable in class com.whirvis.jraknet.windows.PowerShellCommand
-
- array() - Method in class com.whirvis.jraknet.Packet
-


| Totals | {{numCoders}} | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sec1 | Sec2 | Sec3 | Sec4 | JC1 | JC2 | ||||||||||
| Crest | School | School Type (-) | 2002 | 2001 | 2000 | 1999 | 1998 | 1997 | Total Registered (-) | Code Combat Reg | Finished Code Combat Level | Completed Task For Class | Solved SingPath Problem | Certified Skill Usage | |
| {{school.name}} | {{school.group}} | {{registeredBySchoolAndYear[school.name]["2002"]}} | {{registeredBySchoolAndYear[school.name]["2001"]}} | {{registeredBySchoolAndYear[school.name]["2000"]}} | {{registeredBySchoolAndYear[school.name]["1999"]}} | {{registeredBySchoolAndYear[school.name]["1998"]}} | {{registeredBySchoolAndYear[school.name]["1997"]}} | {{school.registered}} | {{school.codeCombatRegistered}} | {{school.codeCombatBadgeEarners}} | {{school.joinedClass}} | TBD | TBD |


API Reference¶
Async Btree¶
Declare async btree api.
Classes
Node aggregate node definition implemented with NamedTuple. |
|
NodeMetadata is our node definition. |
Functions
|
Analyze specified target and return a Node representation. |
|
Stringify node representation of specified target. |
|
Create a decision node. |
|
Execute tasks in sequence and succeed if one succeed or failed if all failed. |
|
Repeat child evaluation until condition is truthy. |
|
Synonym of fallback. |
|
Return a function which execute children in sequence. |
|
Define an alias on our child. |
|
Produce a function which always return FAILURE value. |
|
Create a node which always return SUCCESS value. |
|
Create a decorator. |
|
Invert node status. |
|
Create a conditional node which test if child fail. |
|
Create a conditional node which test if child success. |
|
Retry child evaluation at most max_retry time on failure until child succeed. |
|
Retry child until failed. |
|
Retry child until success. |
|
‘node_metadata’ is a function decorator which add meta information about node. |
|
Declare an action leaf. |
|
Declare a condition leaf. |
|
Return an awaitable function which run children in parallele. |
|
Filter an iterable or an async iterable with an async function. |
|
Map an async function onto an iterable or an async iterable. |
|
Curio run with independent contextvars. |
Exceptions
|
ExceptionDecorator exception is a decorator on a real exception. |
-
class
async_btree.
Node
[source]¶ Bases:
tuple
Node aggregate node definition implemented with NamedTuple.
A Node is used to keep information on name, properties, and relations ship between a hierachical construct of functions. It’s like an instance of NodeMetadata.
Attributes
Alias for field number 2
Alias for field number 0
Alias for field number 1
-
name
¶ named operation.
- Type
str
-
properties
¶ a list of tuple (name, value) for definition.
- Type
List[Tuple[str, Any]]
-
edges
¶ a list of tuple (name, node list) for definition.
- Type
List[Tuple[str, List[Any]]]
Notes
Edges attribut should be edges:
`List[Tuple[str, List['Node']]]`
But it is impossible for now, see [mypy issues 731](https://github.com/python/mypy/issues/731)-
name
Alias for field number 0
-
properties
Alias for field number 1
-
edges
Alias for field number 2
-
-
async_btree.
analyze
(target: Union[Callable[[...], Awaitable[Any]], Callable]) → async_btree.analyze.Node[source]¶ Analyze specified target and return a Node representation.
- Parameters
target (CallableFunction) – async function to analyze.
- Returns
a node instance representation of target function
- Return type
(Node)
-
async_btree.
stringify_analyze
(target: async_btree.analyze.Node, indent: int = 0, label: Optional[str] = None) → str[source]¶ Stringify node representation of specified target.
- Parameters
target (CallableFunction) – async function to analyze.
indent (int) – level identation (default to zero).
label (Optional[str]) – label of current node (default None).
- Returns
a string node representation.
- Return type
(str)
-
async_btree.
decision
(condition: Union[Callable[[...], Awaitable[Any]], Callable], success_tree: Union[Callable[[...], Awaitable[Any]], Callable], failure_tree: Union[Callable[[...], Awaitable[Any]], Callable, None] = None) → Callable[[], Awaitable[Any]][source]¶ Create a decision node.
- Parameters
condition (CallableFunction) – awaitable condition
success_tree (CallableFunction) – awaitable success tree which be evaluated if cond is Truthy
failure_tree (CallableFunction) – awaitable failure tree which be evaluated if cond is Falsy (None per default)
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
fallback
(children: List[Union[Callable[[...], Awaitable[Any]], Callable]]) → Callable[[], Awaitable[Any]][source]¶ Execute tasks in sequence and succeed if one succeed or failed if all failed.
- Often named ‘selector’, children can be seen as an ordered list
starting from higthest priority to lowest priority.
- Parameters
children (List[CallableFunction]) – list of Awaitable
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
repeat_until
(condition: Union[Callable[[...], Awaitable[Any]], Callable], child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Repeat child evaluation until condition is truthy.
Return last child evaluation or FAILURE if no evaluation occurs.
- Parameters
condition (CallableFunction) – awaitable condition
child (CallableFunction) – awaitable child
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
selector
(children: List[Union[Callable[[...], Awaitable[Any]], Callable]]) → Callable[[], Awaitable[Any]][source]¶ Synonym of fallback.
-
async_btree.
sequence
(children: List[Union[Callable[[...], Awaitable[Any]], Callable]], succes_threshold: int = -1) → Callable[[], Awaitable[Any]][source]¶ Return a function which execute children in sequence.
succes_threshold parameter generalize traditional sequence/fallback and must be in [0, len(children)]. Default value is (-1) means len(children)
if #success = succes_threshold, return a success
if #failure = len(children) - succes_threshold, return a failure
- What we can return as value and keep sematic Failure/Success:
an array of previous result when success
last failure when fail
- Parameters
children (List[CallableFunction]) – list of Awaitable
succes_threshold (int) – succes threshold value
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
- Raises
(AssertionError) – if succes_threshold is invalid
-
async_btree.
alias
(child: Union[Callable[[...], Awaitable[Any]], Callable], name: str) → Callable[[], Awaitable[Any]][source]¶ Define an alias on our child.
- Parameters
child (CallableFunction) – child function to decorate
name (str) – name of function tree
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
always_failure
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Produce a function which always return FAILURE value.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which return child result if is falsy
else FAILURE, or a ControlFlowException if error occurs.
- Return type
(AsyncInnerFunction)
-
async_btree.
always_success
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Create a node which always return SUCCESS value.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which return child result if is truthy
else SUCCESS (Any exception will be ignored).
- Return type
(AsyncInnerFunction)
-
async_btree.
decorate
(child: Union[Callable[[...], Awaitable[Any]], Callable], decorator: Union[Callable[[...], Awaitable[Any]], Callable], **kwargs) → Callable[[], Awaitable[Any]][source]¶ Create a decorator.
Post process a child with specified decorator function. First argument of decorator function must be a child.
This method implement a simple lazy evaluation.
- Parameters
child (CallableFunction) – child function to decorate
decorator (CallableFunction) – awaitable target decorator
kwargs – optional keyed argument to pass to decorator function
- Returns
- an awaitable function which
return decorator evaluation against child.
- Return type
(AsyncInnerFunction)
-
async_btree.
inverter
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Invert node status.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which return SUCCESS if child
return FAILURE else SUCCESS
- Return type
(AsyncInnerFunction)
-
async_btree.
is_failure
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Create a conditional node which test if child fail.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which return SUCCESS if child
return FAILURE else FAILURE. An exception will be evaluated as a success.
- Return type
(AsyncInnerFunction)
-
async_btree.
is_success
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Create a conditional node which test if child success.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which return SUCCESS if child
return SUCCESS else FAILURE. An exception will be evaluated as falsy.
- Return type
(AsyncInnerFunction)
-
async_btree.
retry
(child: Union[Callable[[...], Awaitable[Any]], Callable], max_retry: int = 3) → Callable[[], Awaitable[Any]][source]¶ Retry child evaluation at most max_retry time on failure until child succeed.
- Parameters
child (CallableFunction) – child function to decorate
max_retry (int) – max retry count (default 3), -1 mean infinite retry
- Returns
- an awaitable function which retry child evaluation
at most max_retry time on failure until child succeed. If max_retry is reached, returns FAILURE or last exception.
- Return type
(AsyncInnerFunction)
-
async_btree.
retry_until_failed
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Retry child until failed.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which try to evaluate child
until it failed.
- Return type
(AsyncInnerFunction)
-
async_btree.
retry_until_success
(child: Union[Callable[[...], Awaitable[Any]], Callable]) → Callable[[], Awaitable[Any]][source]¶ Retry child until success.
- Parameters
child (CallableFunction) – child function to decorate
- Returns
- an awaitable function which try to evaluate child
until it succeed.
- Return type
(AsyncInnerFunction)
-
exception
async_btree.
ExceptionDecorator
(exception: Exception)[source]¶ Bases:
Exception
ExceptionDecorator exception is a decorator on a real exception.
This will ensure that
`assert ExceptionDecorator.__bool__ == False`
. This permit to return exception as a ‘FAILURE’ status.
-
class
async_btree.
NodeMetadata
[source]¶ Bases:
tuple
NodeMetadata is our node definition.
A NodeMetadata is used to keep information on name, properties name, and relations ship name between a hierachical construct of functions.
This permit us to print or analyze all information of a behaviour tree.
Attributes
Alias for field number 2
Alias for field number 0
Alias for field number 1
-
name
¶ named operation
- Type
str
-
properties
¶ a list of property name (an int value, …).
- Type
List[str]
-
edges
¶ a list of member name which act as edges (a child, …).
- Type
List[str]
-
name
Alias for field number 0
-
properties
Alias for field number 1
-
edges
Alias for field number 2
-
-
async_btree.
node_metadata
(name: Optional[str] = None, properties: Optional[List[str]] = None, edges: Optional[List[str]] = None)[source]¶ ‘node_metadata’ is a function decorator which add meta information about node.
We add a property on decorated function named ‘__node_metadata’.
- Parameters
name (Optional[str]) – override name of decorated function, default is function name left striped with ‘_’
properties (Optional[List[str]]) – a list of property name ([] as default)
edges (Optional[List[str]]) – a list of edges name ([“child”, “children”] as default)
- Returns
the decorator function
-
async_btree.
action
(target: Union[Callable[[...], Awaitable[Any]], Callable], **kwargs) → Callable[[], Awaitable[Any]][source]¶ Declare an action leaf.
Action is an awaitable closure of specified function.
- Parameters
target (CallableFunction) – awaitable function
kwargs – optional kwargs argument to pass on target function
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
condition
(target: Union[Callable[[...], Awaitable[Any]], Callable], **kwargs) → Callable[[], Awaitable[Any]][source]¶ Declare a condition leaf.
Condition is an awaitable closure of specified function.
- Parameters
target (CallableFunction) – awaitable function which be evaluated as True/False.
kwargs – optional kwargs argument to pass on target function
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
parallele
(children: List[Union[Callable[[...], Awaitable[Any]], Callable]], succes_threshold: int = -1) → Callable[[], Awaitable[Any]][source]¶ Return an awaitable function which run children in parallele.
succes_threshold parameter generalize traditional sequence/fallback, and must be in [0, len(children)], default value is len(children)
if #success = succes_threshold, return a success
if #failure = len(children) - succes_threshold, return a failure
- Parameters
children (List[CallableFunction]) – list of Awaitable
succes_threshold (int) – succes threshold value, default len(children)
- Returns
an awaitable function.
- Return type
(AsyncInnerFunction)
-
async_btree.
afilter
(corofunc: Callable[[Any], Awaitable[bool]], iterable: Union[AsyncIterable, Iterable]) → AsyncGenerator[T, None][source]¶ Filter an iterable or an async iterable with an async function.
This simplify writing of filtering by a function on something iterable between ‘async for …’ and ‘for…’ .
- Parameters
corofunc (Callable[[Any], Awaitable[bool]]) – filter async function
iterable (Union[AsyncIterable, Iterable]) – iterable or async iterable collection which will be applied.
- Returns
an async iterator of item which satisfy corofunc(item) == True
- Return type
(AsyncGenerator[T])
Example
`[i async for i in amap(inc, afilter(even, [0, 1, 2, 3, 4]))]`
-
async_btree.
amap
(corofunc: Callable[[Any], Awaitable[T]], iterable: Union[AsyncIterable, Iterable]) → AsyncGenerator[T, None][source]¶ Map an async function onto an iterable or an async iterable.
This simplify writing of mapping a function on something iterable between ‘async for …’ and ‘for…’ .
- Parameters
corofunc (Callable[[Any], Awaitable[T]]) – coroutine function
iterable (Union[AsyncIterable, Iterable]) – iterable or async iterable collection which will be applied.
- Returns
an async iterator of corofunc(item)
- Return type
AsyncGenerator[T]
Example
`[i async for i in amap(inc, afilter(even, [0, 1, 2, 3, 4]))]`


- Make your public sector website or app accessible
- Publishing accessible documents
- Making your service accessible
- Designing for different browsers and devices
- Running research sessions with people with disabilities
- Testing for accessibility
- WCAG 2.1 Primer: help understanding the Web Content Accessibility Guidelines
- Office for National Statistics guide on using accessible colours for data visualisation
Useful resources
Please email us at<EMAIL_ADDRESS>if you have any questions.


this page supports the test case of elpusk coffee JavaScript library kernel manager part.
kernel test. (sd_helloworld.dll)
For manager
For device (sd_helloworld.dll)


--- layout: page title: About header-img: "img/about-bg.png" ---
Current Flatiron School student and recipient of the Women Take Tech Scholarship.


|
PrinterGUI Documentation
|
#include <widget.h>
Public Member Functions | |
| Widget (QWidget *parent=0) | |
| Widget::Widget. More... | |
Protected Slots | |
| void | on_pushButton_clicked () |
| on_pushButton_clicked refresh button is defined. Once button is clicked, the paint board will be clear. More... | |
Protected Member Functions | |
| void | mouseMoveEvent (QMouseEvent *event) |
| mouseMoveEvent In this function, the mouse movements was recorded. More... | |
| void | mousePressEvent (QMouseEvent *event) |
| mousePressEvent In this function, mousePress is used to trigger the state of servo motor. More... | |
| void | paintEvent (QPaintEvent *event) |
| paintEvent generate image More... | |
The Widget class.
|
explicit |
| parent |
< turn right xmotor threads
< turn left xmotor threads
< turn right ymotor threads
M turn left ymotor threads
<set the color of paint board.
< set the size of paint board.
< configure the display range of spinBox
< configure the display range of spinBox
wiringPiSetup set pinMode which controls the stepper motor ration and servo motor.
|
protected |
mouseMoveEvent In this function, the mouse movements was recorded.
Widget::mouseMoveEvent define a mouseMoveEvent function. In this function, the path of mouseMove can be recorded by painter when the state of servomotor is true.
| event | when mouseMove happens, run this function. |
| event |
|
protected |
mousePressEvent In this function, mousePress is used to trigger the state of servo motor.
Widget::mousePressEvent Create a mousePressEvent function. In this function, the servoState(pen) movement can be switched by mousePress event.
| event | when mousePress happens, run this function |
| event |
|
protectedslot |
on_pushButton_clicked refresh button is defined. Once button is clicked, the paint board will be clear.
Widget::on_pushButton_clicked In this function, the paint board will be reset once the refresh button is clicked.
|
protected |


UAE Space Agency Chief Calls on Region to Create Arab Space Agency
DUBAI (Sputnik) - The Director General of the UAE Space Agency, Mohammed Al Ahbabi, said on Wednesday that the creation of an Arab space agency would ensure that all countries in the region have a future in space exploration.
"Arab states' collaboration will be key to the success of any future steps in space exploration, including the UAE projects, from the National Space Strategy 2030 to the Mission to Mars project," Al Ahbabi said on the sidelines of an international air show in Dubai.
In addition, he stated that any initiative by the UAE regarding space exploration was aimed at all Arab countries, and alluded to the European Space Agency and the African Space Agency as examples of models to follow.
"Any space science projects cannot be implemented without cooperation with other countries. We hope that one day we will have an Arab space agency. I believe we are next," the directoradded.
The UAE Space Agency was established in 2014 to develop the country's space sector and encourage scientific research and innovation in the field. The agency has since actively worked to boost the industry and concluded cooperation agreements with several countries, including the US, Russia and Arab states.


This tutorial will teach you how to handle events in the DOM from JavaScript. Knowledge of how to access the DOM from JavaScript is assumed. There are five short lessons, followed by one exercise.
It is highly recommended that you open your browser's JavaScript console now. When stuff doesn't work, there's usually an error printed in the console. The console is your friend.
The simplest way to make an element on a web page respond to an event is
to set the element's .onclick
property to a function. When the
element is clicked, the function is executed. Within the function, the
magic variable this
will be the element that was clicked.
This is the HTML for the 'Execute' button below:
<button id="first">Execute</button>
Write some JavaScript code below that finds the button using
getElementById
, then sets the element's .onclick
property to a function that sets the button's style.background property to
'#ff8'.
The traditional model used above scales badly. Don't use it. Consider what would happen if two different libraries attempted to set an event handler on the same element. The second library would clobber the first. As JavaScript applications grew in size this became an increasing problem.
TheaddEventListener
[?]
function provides a more flexible method of handling events. The syntax is:
element.addEventListener('click', yourFunction, false)
This is the HTML for the 'Execute' button below:
<button id="w3c">Execute</button>
Write some JavaScript code below that uses addEventListener
to turn the button's style.background property to
'#ff8' when it is clicked.
For bonus marks, try adding a second, separate click handler that calls:
alert('Hello')
Once you add an event listener, it will fire every time that event
occurs. To stop listening, use the
element.removeEventListener('click', yourFunction, false)
function.[?]
Note that you must provide removeEventListener
with a
pointer to the same function that you provided to addEventListener
.
Here is an image of a star:
This is the HTML for the above image:

Write some JavaScript code below that uses addEventListener
to pop open an alert('Hello')
dialog when the star is clicked.
This handler should also self-destruct, by using removeEventListener
to stop it from firing ever again.
When an event handler is called, it is passed one argument: an
Event
[?]
object. This object contains a bunch of useful information about the event, including
which mouse buttons were used, whether the shift or control keys were pressed, etc.
Click this star, and check the console to see the resulting event object:
Here is the JavaScript code for the above star:
var handler = function(e) { console.log(e); }; document.getElementById('event_star').addEventListener('click', handler, false);
One of the most useful properties is
target
[?]
which contains the DOM node that was clicked (or otherwise manipulated).
This allows one to add a single event handler to a parent node, then deal
with the appropriate node when an event is triggered.
|
Here is a table containing 100 stars: |
This is the HTML for the table to the left:

    ...

    ...
 ...
 |
The goal of this lesson is to be able to mouse over the table and
have the stars turn 'on' wherever the mouse goes using the
'mouseover'
event
(see demo).
But instead of creating 100 event handlers, just create one
handler on the table that uses the event's target
property
to change the src
property of the correct star.
The event object that is passed to handler functions also includes some
useful methods that can effect what happens after handler finishes executing.
One of these methods is preventDefault
[?].
When called, this method prevents the browser from taking its normal actions in response to the event.
An example of this is to supress the appearance of the browser's context menu.
Phone number:
Write some JavaScript code below that adds a keypress
event handler to the input field (id is "phone"
).
If the user types something other than a number (look at the event's charCode
property for the
ASCII[?]
value), then cancel the event by calling preventDefault
.
For this exercise we want to implement a custom context menu for Tux, the penguin.
|
This is the HTML for a menu which exists, but is currently hidden:

Photograph

Rub belly

Feed a fish

 |
Write some JavaScript code below that does as many of the following as you can:
click
event handler to the penguin (his id is "tux"
) that makes the menu visible (style.display = 'block'
).style.left = '123px'
and style.top = '123px'
) to the mouse's location. Use the event's pageX
and pageY
properties.click
, use contextmenu
to detect the right mouse button.document.body
) that hides the menu (style.display = 'none'
).
Use the Intro to JavaScript forum to share your solution to this exercise and see other people's solutions.


start
text with
:before
and
:after
content, then a
bold
element with a
block
before content then a
italic
element with a
block
after content
end


These photos should be viewed on a large monitor, laptop, or tablet, but in the very least, turn your device sidewards. kthxbye!


InfoAudio [options] AFile1 [AFile2 ... ]
Print audio file information
This program prints information about a number of audio files to standard output. The full output consists of the file type and name (indented part of the output below), the file data parameters, information records, and if appropriate, the chunk structure of the file.
AIFF-C sound file: --path--/audiofiles/addf8.aifc Samples / channel : 23808 (2.976 s) YYYY-MM-dd hh:mm:ss UTC Sampling frequency: 8000 Hz Number of channels: 1 (16-bit integer)
--File format-- File name: ../../../audiofiles/addf8.aifc Offset to data: 166 Sampling frequency: 8000 No. frames: 23808 No. channels: 1 Data type: integer16 File byte order: big-endian Host byte order: little-endian
--Information records-- date: YYYY-MM-dd hh:mm:ss UTC program: CopyAudio
-- Chunk layout-- <FORM> 0 -> 47781 <AIFC> 8 -> 11 <COMM> 12 -> 57 ... <FVER> 58 -> 69 ... <ANNO> 70 -> 149 ... <SSND> 150 -> 47781 ... <EoF > 47782
Non-printing characters (as defined by the routine isprint) in the information records are replaced by question marks.
1: Print the standard information: file name, filetype, no. samples ... 2: Print the file data parameters 4: Print the information records 8: Print the chunk configuration (only for AIFF/WAVE/NSP files)
See routine CopyAudio for a description of other options.
P. Kabal / v10r3 2020-11-30


Topics
Video Tutorials
Slides
Links
Database Management System II
Indexing and Hashing : Basic Concepts
Ordered Indices
B+-Tree Index Files
B-Tree Index Files
Static Hashing
Dynamic Hashing
Comparison of Ordered Indexing and Hashing
Query Processing: Overview
Measures of Query Cost
Selection Operation
Sorting, Join Operation
Evaluation of Expressions
Query Optimization: Introduction
Transformation of Relational Expressions
Catalog Information for Cost Estimation
Statistical Information for Cost Estimation
Cost-based optimization
Transactions: Transaction Concept
Transaction State
Concurrent Executions
Serializability
Concurrency Control: Lock-Based Protocols
Timestamp- Based Protocols
Recovery System: Failure Classification
Storage Structure
Recovery and Atomicity
Log-Based Recovery
Recovery With Concurrent Transactions
Data Analysis and Mining
Data Mining
Decision tree
Randomize tree
Database System Architectures
Centralized and Client-Server Systems
Server System Architectures
Parallel Systems
Distributed Systems
Network Types
Parallel Databases: Introduction
I/O Parallelism
Interquery Parallelism
Intraquery Parallelism
Intraoperation Parallelism
Interoperation Parallelism
Distributed Databases: Heterogeneous Databases
Distributed Databases: Homogeneous Databases
Distributed Data Storage
Distributed Transactions
Commit Protocols
Additional should be included
Database Design
Database Tuning Security and Authorization
Multidimensional query


See also Audio Demo 9b for a variation on this page, with the form in an iframe.
For additional demos see the Index of Able Player Examples.
Ordinarily,, when users are interacting with form fields, their keystrokes should not be handled by the player. However, in some contexts (e.g., in a transcription application), users may want to control the player from within a textarea field. To enable this functionality, add data-steno-mode to the <audio> or <video> element. Note: Modifier keys for keyboard shortcuts can be configured within Preferences > Keyboard.


A modal will open, with a link to a data URI and instructions on how to save it.
A modal will open, with a Flash powered download button.
Download will use a data URI and start automatically.
You can use the force
parameter to
emulate a particular browser's behavious. These radio
buttons set this parameter.
Note that downloads using a data URI use a filename chosen by the browser, so filename field will only be used if the download uses Flash.