Modules in pybert package¶
pybert - Main PyBERT class definition, as well as some helper classes.¶
Bit error rate tester (BERT) simulator, written in Python.
Original Author: David Banas<EMAIL_ADDRESS>Original Date: 17 June 2014
Testing by: Mark Marlett<EMAIL_ADDRESS>This Python script provides a GUI interface to a BERT simulator, which can be used to explore the concepts of serial communication link design.
Copyright (c) 2014 by David Banas; All rights reserved World wide.
-
class
pybert.pybert.
StoppableThread
[source]¶ Thread class with a stop() method.
The thread itself has to check regularly for the stopped() condition.
All PyBERT thread classes are subclasses of this class.
-
class
pybert.pybert.
TxOptThread
[source]¶ Used to run Tx tap weight optimization in its own thread, in order to preserve GUI responsiveness.
-
class
pybert.pybert.
RxOptThread
[source]¶ Used to run Rx tap weight optimization in its own thread, in order to preserve GUI responsiveness.
-
class
pybert.pybert.
CoOptThread
[source]¶ Used to run co-optimization in its own thread, in order to preserve GUI responsiveness.
-
class
pybert.pybert.
TxTapTuner
(name='(noname)', enabled=False, min_val=0.0, max_val=0.0, value=0.0, steps=0)[source]¶ Object used to populate the rows of the Tx FFE tap tuning table.
-
class
pybert.pybert.
PyBERT
(run_simulation=True)[source]¶ A serial communication link bit error rate tester (BERT) simulator with a GUI interface.
Useful for exploring the concepts of serial communication link design.
-
R0
= None¶ Channel skin effect resistance (Ohms/m).
-
Rdc
= None¶ Channel d.c. resistance (Ohms/m).
-
Theta0
= None¶ Channel loss tangent (unitless).
-
Z0
= None¶ Channel characteristic impedance, in LC region (Ohms).
-
alpha
= None¶ CDR integral branch magnitude (unitless).
-
bit_errs
= None¶ # of bit errors observed in last run.
-
bit_rate
= None¶ (Gbps)
-
cac
= None¶ Rx a.c. coupling capacitance (uF)
-
calc_chnl_h
()[source]¶ Calculates the channel impulse response.
- Also sets, in ‘self’:
- chnl_dly:
- group delay of channel
- start_ix:
- first element of trimmed response
- t_ns_chnl:
- the x-values, in ns, for plotting ‘chnl_h’
- chnl_H:
- channel frequency response
- chnl_s:
- channel step response
- chnl_p:
- channel pulse response
-
cfg_file
= None¶ PyBERT configuration data storage file (File).
-
ch_file
= None¶ Channel file name.
-
chnl_dly
= None¶ Estimated channel delay (s).
-
cin
= None¶ Rx parasitic input capacitance (pF)
-
coopt_thread
= None¶ EQ co-optimization thread.
-
cout
= None¶ Tx parasitic output capacitance (pF)
-
ctle_file
= None¶ CTLE response file (when use_ctle_file = True).
-
ctle_mode
= None¶ CTLE mode (‘Off’, ‘Passive’, ‘AGC’, ‘Manual’).
-
ctle_mode_tune
= None¶ EQ optimizer CTLE mode (‘Off’, ‘Passive’, ‘AGC’, ‘Manual’).
-
ctle_offset
= None¶ CTLE d.c. offset (dB)
-
ctle_offset_tune
= None¶ EQ optimizer CTLE d.c. offset (dB).
-
data_file
= None¶ PyBERT results data storage file (File).
-
decision_scaler
= None¶ DFE slicer output voltage (V).
-
delta_t
= None¶ CDR proportional branch magnitude (ps).
-
do_sweep
= None¶ Run sweeps? (Default = False)
-
eye_bits
= None¶ # of bits used to form eye. (Default = last 20%)
-
gain
= None¶ DFE error gain (unitless).
-
impulse_length
= None¶ Impulse response length. (Determined automatically, when 0.)
-
l_ch
= None¶ Channel length (m).
-
lock_sustain
= None¶ CDR hysteresis to use in determining lock.
-
max_iter
= None¶ EQ optimizer max. # of optimization iterations.
-
mod_type
= None¶ 0 = NRZ; 1 = Duo-binary; 2 = PAM-4
-
n_ave
= None¶ DFE # of averages to take, before making tap corrections.
-
n_lock_ave
= None¶ CDR # of averages to take in determining lock.
-
n_taps
= None¶ DFE # of taps.
-
n_taps_tune
= None¶ EQ optimizer # DFE taps.
-
nbits
= None¶ Number of bits to simulate.
-
nspb
= None¶ Signal vector samples per bit.
-
num_sweeps
= None¶ Number of sweeps to run.
-
padded
= None¶ Zero pad imported Touchstone data? (Default = False)
-
pattern_len
= None¶ PRBS pattern length.
-
peak_freq
= None¶ CTLE peaking frequency (GHz)
-
peak_freq_tune
= None¶ EQ optimizer CTLE peaking freq. (GHz).
-
peak_mag
= None¶ CTLE peaking magnitude (dB)
-
peak_mag_tune
= None¶ EQ optimizer CTLE peaking mag. (dB).
-
pn_freq
= None¶ Periodic noise frequency (MHz).
-
pn_mag
= None¶ Periodic noise magnitude (V).
-
rel_lock_tol
= None¶ CDR relative tolerance to use in determining lock.
-
rel_power
= None¶ Tx power dissipation (W).
-
rin
= None¶ Rx input impedance (Ohm)
-
rn
= None¶ Standard deviation of Gaussian random noise (V).
-
rs
= None¶ Tx source impedance (Ohms)
-
rx_ami_file
= None¶ (File)
-
rx_ami_valid
= None¶ (Bool)
-
rx_bw
= None¶ CTLE bandwidth (GHz).
-
rx_bw_tune
= None¶ EQ optimizer CTLE bandwidth (GHz).
-
rx_dll_file
= None¶ (File)
-
rx_dll_valid
= None¶ (Bool)
-
rx_has_getwave
= None¶ (Bool)
-
rx_opt_thread
= None¶ Rx EQ optimization thread.
-
rx_use_ami
= None¶ (Bool)
-
rx_use_getwave
= None¶ (Bool)
-
status
= None¶ PyBERT status (String).
-
sum_bw
= None¶ DFE summing node bandwidth (Used when sum_ideal=False.) (GHz).
-
sum_ideal
= None¶ True = use an ideal (i.e. - infinite bandwidth) summing node (Bool).
-
thresh
= None¶ Threshold for identifying periodic jitter components (sigma).
-
tx_ami_file
= None¶ (File)
-
tx_ami_valid
= None¶ (Bool)
-
tx_dll_file
= None¶ (File)
-
tx_dll_valid
= None¶ (Bool)
-
tx_has_getwave
= None¶ (Bool)
-
tx_opt_thread
= None¶ Tx EQ optimization thread.
-
tx_tap_tuners
= None¶ EQ optimizer list of TxTapTuner objects.
-
tx_taps
= None¶ List of TxTapTuner objects.
-
tx_use_ami
= None¶ (Bool)
-
tx_use_getwave
= None¶ (Bool)
-
use_ch_file
= None¶ Import channel description from file? (Default = False)
-
use_ctle_file
= None¶ For importing CTLE impulse/step response directly.
-
use_dfe
= None¶ True = use a DFE (Bool).
-
use_dfe_tune
= None¶ EQ optimizer DFE select (Bool).
-
v0
= None¶ Channel relative propagation velocity (c).
-
vod
= None¶ Tx differential output voltage (V)
-
w0
= None¶ Channel transition frequency (rads./s).
-
windowed
= None¶ Apply windowing to the Touchstone data? (Default = False)
-
pybert_cntrl - Model control logic.¶
Default controller definition for PyBERT class.
Original author: David Banas<EMAIL_ADDRESS>Original date: August 24, 2014 (Copied from pybert.py, as part of a major code cleanup.)
Copyright (c) 2014 David Banas; all rights reserved World wide.
-
pybert.pybert_cntrl.
my_run_sweeps
(self)[source]¶ Runs the simulation sweeps.
Parameters: self (PyBERT) – Reference to an instance of the PyBERT class.
-
pybert.pybert_cntrl.
my_run_simulation
(self, initial_run=False, update_plots=True)[source]¶ Runs the simulation.
Parameters: - self (PyBERT) – Reference to an instance of the PyBERT class.
- initial_run (Bool) – If True, don’t update the eye diagrams, since they haven’t been created, yet. (Optional; default = False.)
- update_plots (Bool) – If True, update the plots, after simulation completes. This option can be used by larger scripts, which import pybert, in order to avoid graphical back-end conflicts and speed up this function’s execution time. (Optional; default = True.)
pybert_view - Main GUI window layout definition.¶
Default view definition for PyBERT class.
Original author: David Banas<EMAIL_ADDRESS>Original date: August 24, 2014 (Copied from pybert.py, as part of a major code cleanup.)
Copyright (c) 2014 David Banas; all rights reserved World wide.
pybert_util - Various utilities used by other modules.¶
General purpose utilities for PyBERT.
Original author: David Banas<EMAIL_ADDRESS>Original date: September 27, 2014 (Copied from pybert_cntrl.py.)
Copyright (c) 2014 David Banas; all rights reserved World wide.
-
pybert.pybert_util.
moving_average
(a, n=3)[source]¶ Calculates a sliding average over the input vector.
Parameters: - a ([float]) – Input vector to be averaged.
- n (int) – Width of averaging window, in vector samples. (Optional; default = 3.)
- Returns: the moving average of the input vector, leaving the input
- vector unchanged.
-
pybert.pybert_util.
find_crossing_times
(t, x, min_delay=0.0, rising_first=True, min_init_dev=0.1, thresh=0.0)[source]¶ Finds the threshold crossing times of the input signal.
Parameters: - t ([float]) – Vector of sample times. Intervals do NOT need to be uniform.
- x ([float]) – Sampled input vector.
- min_delay (float) – Minimum delay required, before allowing crossings. (Helps avoid false crossings at beginning of signal.) (Optional; default = 0.)
- rising_first (bool) – When True, start with the first rising edge found. (Optional; default = True.) When this option is True, the first rising edge crossing is the first crossing returned. This is the desired behavior for PyBERT, because we always initialize the bit stream with [0, 0, 1, 1], in order to provide a known synchronization point for jitter analysis.
- min_init_dev (float) – The minimum initial deviation from zero, which must be detected, before searching for crossings. Normalized to maximum input signal magnitude. (Optional; default = 0.1.)
- thresh (float) – Vertical crossing threshold.
Returns: an array of signal threshold crossing times.
-
pybert.pybert_util.
find_crossings
(t, x, amplitude, min_delay=0.0, rising_first=True, min_init_dev=0.1, mod_type=0)[source]¶ Finds the crossing times in a signal, according to the modulation type.
Parameters: - t ([float]) – The times associated with each signal sample.
- x ([float]) – The signal samples.
- amplitude (float) – The nominal signal amplitude. (Used for determining thresholds, in the case of some modulation types.)
- min_delay (float) – The earliest possible sample time we want returned. (Optional; default = 0.)
- rising_first (bool) – When True, start with the first rising edge found. When this option is True, the first rising edge crossing is the first crossing returned. This is the desired behavior for PyBERT, because we always initialize the bit stream with [0, 1, 1], in order to provide a known synchronization point for jitter analysis. (Optional; default = True.)
- min_init_dev (float) – The minimum initial deviation from zero, which must be detected, before searching for crossings. Normalized to maximum input signal magnitude. (Optional; default = 0.1.)
- mod_type (int) – The modulation type. Allowed values are: {0: NRZ, 1: Duo-binary, 2: PAM-4} (Optional; default = 0.)
Returns: The signal threshold crossing times.
-
pybert.pybert_util.
calc_jitter
(ui, nui, pattern_len, ideal_xings, actual_xings, rel_thresh=6, num_bins=99, zero_mean=True)[source]¶ Calculate the jitter in a set of actual zero crossings, given the ideal crossings and unit interval.
Inputs:
- ui : The nominal unit interval.
- nui : The number of unit intervals spanned by the input signal.
- pattern_len : The number of unit intervals, before input symbol stream repeats.
- ideal_xings : The ideal zero crossing locations of the edges.
- actual_xings : The actual zero crossing locations of the edges.
- rel_thresh : (optional) The threshold for determining periodic jitter spectral components (sigma).
- num_bins : (optional) The number of bins to use, when forming histograms.
- zero_mean : (optional) Force the mean jitter to zero, when True.
Outputs:
- jitter : The total jitter.
- t_jitter : The times (taken from ‘ideal_xings’) corresponding to the returned jitter values.
- isi : The peak to peak jitter due to intersymbol interference.
- dcd : The peak to peak jitter due to duty cycle distortion.
- pj : The peak to peak jitter due to uncorrelated periodic sources.
- rj : The standard deviation of the jitter due to uncorrelated unbounded random sources.
- tie_ind : The data independent jitter.
- thresh : Threshold for determining periodic components.
- jitter_spectrum : The spectral magnitude of the total jitter.
- tie_ind_spectrum : The spectral magnitude of the data independent jitter.
- spectrum_freqs : The frequencies corresponding to the spectrum components.
- hist : The histogram of the actual jitter.
- hist_synth : The histogram of the extrapolated jitter.
- bin_centers : The bin center values for both histograms.
-
pybert.pybert_util.
make_uniform
(t, jitter, ui, nbits)[source]¶ Make the jitter vector uniformly sampled in time, by zero-filling where necessary.
The trick, here, is creating a uniformly sampled input vector for the FFT operation, since the jitter samples are almost certainly not uniformly sampled. We do this by simply zero padding the missing samples.
Inputs:
- t : The sample times for the ‘jitter’ vector.
- jitter : The input jitter samples.
- ui : The nominal unit interval.
- nbits : The desired number of unit intervals, in the time domain.
Output:
- y : The uniformly sampled, zero padded jitter vector.
- y_ix : The indices where y is valid (i.e. - not zero padded).
-
pybert.pybert_util.
calc_gamma
(R0, w0, Rdc, Z0, v0, Theta0, ws)[source]¶ Calculates propagation constant from cross-sectional parameters.
The formula’s applied are taken from Howard Johnson’s “Metallic Transmission Model” (See “High Speed Signal Propagation”, Sec. 3.1.)
- Inputs:
- R0 skin effect resistance (Ohms/m)
- w0 cross-over freq.
- Rdc d.c. resistance (Ohms/m)
- Z0 characteristic impedance in LC region (Ohms)
- v0 propagation velocity (m/s)
- Theta0 loss tangent
- ws frequency sample points vector
- Outputs:
- gamma frequency dependent propagation constant
- Zc frequency dependent characteristic impedance
-
pybert.pybert_util.
calc_G
(H, Rs, Cs, Zc, RL, Cp, CL, ws)[source]¶ Calculates fully loaded transfer function of complete channel.
- Inputs:
- H unloaded transfer function of interconnect
- Rs source series resistance
- Cs source parallel (parasitic) capacitance
- Zc frequency dependent characteristic impedance of the interconnect
- RL load resistance (differential)
- Cp load parallel (parasitic) capacitance (single ended)
- CL load series (d.c. blocking) capacitance (single ended)
- ws frequency sample points vector
- Outputs:
- G frequency dependent transfer function of channel
-
pybert.pybert_util.
calc_eye
(ui, samps_per_ui, height, ys, y_max, clock_times=None)[source]¶ Calculates the “eye” diagram of the input signal vector.
Parameters: - ui (float) – unit interval (s)
- samps_per_ui (int) – # of samples per unit interval
- height (int) – height of output image data array
- ys ([float]) – signal vector of interest
- y_max (float) – max. +/- vertical extremity of plot
Keyword Arguments: clock_times ([float]) – (optional) vector of clock times to use for eye centers. If not provided, just use mean zero-crossing and assume constant UI and no phase jumps. (This allows the same function to be used for eye diagram creation, for both pre and post-CDR signals.)
- Returns: The “heat map” representing the eye diagram. Each grid
- location contains a value indicating the number of times the signal passed through that location.
-
pybert.pybert_util.
make_ctle
(rx_bw, peak_freq, peak_mag, w, mode='Passive', dc_offset=0)[source]¶ Generate the frequency response of a continuous time linear equalizer (CTLE), given the:
- signal path bandwidth,
- peaking specification
- list of frequencies of interest, and
- operational mode/offset.
We use the ‘invres()’ function from scipy.signal, as it suggests itself as a natural approach, given our chosen use model of having the user provide the peaking frequency and degree of peaking.
That is, we define our desired frequency response using one zero and two poles, where:
- The pole locations are equal to:
- the signal path natural bandwidth, and
- the user specified peaking frequency.
- The zero location is chosen, so as to provide the desired degree of peaking.
Inputs:
- rx_bw The natural (or, unequalized) signal path bandwidth (Hz).
- peak_freq The location of the desired peak in the frequency
- response (Hz).
- peak_mag The desired relative magnitude of the peak (dB). (mag(H(0)) = 1)
- w The list of frequencies of interest (rads./s).
- mode The operational mode; must be one of:
- ‘Off’ : CTLE is disengaged.
- ‘Passive’: Maximum frequency response has magnitude one.
- ‘AGC’ : Automatic gain control. (Handled by calling routine.)
- ‘Manual’ : D.C. offset is set manually.
- dc_offset The d.c. offset of the CTLE gain curve (dB).
- (Only valid, when ‘mode’ = ‘Manual’.)
Outputs:
- w, H The resultant complex frequency response, at the
- given frequencies.
-
pybert.pybert_util.
trim_impulse
(g, Ts=0, chnl_dly=0, min_len=0, max_len=1000000)[source]¶ - Trim impulse response, for more useful display, by:
- clipping off the tail, after 99.8% of the total power has been captured (Using 99.9% was causing problems; I don’t know why.), and
- setting the “front porch” length equal to 20% of the total length.
Inputs:
- g impulse response
- Ts (optional) sample interval (same units as ‘chnl_dly’)
- chnl_dly (optional) channel delay
- min_len (optional) minimum length of returned vector
- max_len (optional) maximum length of returned vector
Outputs:
- g_trim trimmed impulse response
- start_ix index of first returned sample
-
pybert.pybert_util.
import_channel
(filename, sample_per, padded=False, windowed=False)[source]¶ Read in a channel file.
Parameters: - filename (str) – Name of file from which to import channel description.
- sample_per (float) – Sample period of signal vector (s).
- padded (Bool) – (Optional) Zero pad s4p data, such that fmax >= 1/(2*sample_per)? (Default = False)
- windowed (Bool) – (Optional) Window s4p data, before converting to time domain? (Default = False)
Returns: Imported channel impulse, or step, response.
-
pybert.pybert_util.
interp_time
(ts, xs, sample_per)[source]¶ Resample time domain data, using linear interpolation.
Parameters: - ts ([float]) – Original time values.
- xs ([float]) – Original signal values.
- sample_per (float) – System sample period.
Returns: Resampled waveform.
-
pybert.pybert_util.
import_time
(filename, sample_per)[source]¶ Read in a time domain waveform file, resampling as appropriate, via linear interpolation.
Parameters: - filename (str) – Name of waveform file to read in.
- sample_per (float) – New sample interval
Returns: Resampled waveform.
-
pybert.pybert_util.
sdd_21
(ntwk)[source]¶ Given a 4-port single-ended network, return its differential throughput.
Parameters: ntwk (skrf.Network) – 4-port single ended network. Returns: Sdd[2,1].
-
pybert.pybert_util.
import_freq
(filename, sample_per, padded=False, windowed=False)[source]¶ Read in a single ended 4-port Touchstone file, and extract the differential throughput step response, resampling as appropriate, via linear interpolation.
Parameters: - filename (str) – Name of Touchstone file to read in.
- sample_per (float) – New sample interval
- padded (Bool) – (Optional) Zero pad s4p data, such that fmax >= 1/(2*sample_per)? (Default = False)
- windowed (Bool) – (Optional) Window s4p data, before converting to time domain? (Default = False)
Returns: Resampled step response waveform.
-
pybert.pybert_util.
lfsr_bits
(taps, seed)[source]¶ Given a set of tap indices and a seed, generate a PRBS.
Parameters: - taps ([int]) – The set of fed back taps. (Largest determines order of generator.)
- seed (int) – The initial value of the shift register.
Returns: A PRBS generator object with a next() method, for retrieving the next bit in the sequence.
-
pybert.pybert_util.
pulse_center
(p, nspui)[source]¶ Determines the center of the pulse response, using the “Hula Hoop” algorithm (See SiSoft/Tellian’s DesignCon 2016 paper.)
Parameters: - p ([Float]) – The single bit pulse response.
- nspui (Int) – The number of vector elements per unit interval.
Returns: - The estimated index at which the clock will
sample the main lobe.
- thresh(Float): The vertical threshold at which the main lobe is
UI wide.
Return type: clock_pos(Int)
pybert_plot - Plot definitions for the PyBERT GUI.¶
Plot definitions for PyBERT class.
Original author: David Banas<EMAIL_ADDRESS>Original date: February 21, 2015 (Copied from pybert.py, as part of a major code cleanup.)
Copyright (c) 2015 David Banas; all rights reserved World wide.
pybert_help - Contents of the Help tab of the PyBERT GUI.¶
User instructions for PyBERT class.
Original author: David Banas<EMAIL_ADDRESS>Original date: April 15, 2015 (Copied from pybert.py.)
Copyright (c) 2015 David Banas; all rights reserved World wide.
pybert_cfg - Data structure for saving PyBERT configuration.¶
Simulation configuration data encapsulation, for PyBERT.
Original Author: David Banas<EMAIL_ADDRESS>Original Date: 5 May 2017
This Python script provides a data structure for encapsulating the simulation configuration data of a PyBERT instance. It was first created, as a way to facilitate easier pickling, so that a particular configuration could be saved and later restored.
Copyright (c) 2017 by David Banas; All rights reserved World wide.
pybert_data - Data structure for saving PyBERT results.¶
Simulation results data encapsulation, for PyBERT.
Original Author: David Banas<EMAIL_ADDRESS>Original Date: 9 May 2017
This Python script provides a data structure for encapsulating the simulation results data of a PyBERT instance. It was first created, as a way to facilitate easier pickling, so that a particular result could be saved and later restored, as a reference waveform.
Copyright (c) 2017 by David Banas; All rights reserved World wide.
dfe - DFE behavioral model.¶
Behavioral model of a decision feedback equalizer (DFE).
Original Author: David Banas<EMAIL_ADDRESS>Original Date: 17 June 2014
This Python script provides a behavioral model of a decision feedback equalizer (DFE). The class defined, here, is intended for integration into the larger PyBERT framework.
Copyright (c) 2014 by David Banas; All rights reserved World wide.
-
class
pybert.dfe.
DFE
(n_taps, gain, delta_t, alpha, ui, n_spb, decision_scaler, mod_type=0, bandwidth=100000000000.0, n_ave=10, n_lock_ave=500, rel_lock_tol=0.01, lock_sustain=500, ideal=True)[source]¶ Behavioral model of a decision feedback equalizer (DFE).
-
decide
(x)[source]¶ Make the bit decisions, according to modulation type.
Parameters: x (float) – The signal value, at the decision time. Returns: The members of the returned tuple are: - decision:
- One of:
- {-1, 1} (NRZ)
- {-1, 0, +1} (Duo-binary)
- {-1, -1/3, +1/3, +1} (PAM-4)
according to what the ideal signal level should have been. (‘decision_scaler’ normalized)
bits: The list of bits recovered.
Return type: tuple(float, [int]) Raises: Exception
– If the requested modulation type is unknown.
-
run
(sample_times, signal)[source]¶ Run the DFE on the input signal.
Parameters: - sample_times ([float]) – Vector of time values at wich corresponding signal values were sampled.
- signal ([float]) – Vector of sampled signal values.
Returns: The members of the returned tuple, in order, are:
- res([float]):
Samples of the summing node output, taken at the times given in sample_times.
- tap_weights([[float]]):
List of list of tap weights showing how the DFE adapted over time.
- ui_ests([float]):
List of unit interval estimates, showing how the CDR adapted.
- clocks([int]):
List of mostly zeros with ones at the recovered clocking instants. Useful for overlaying the clock times on signal waveforms, in plots.
- lockeds([bool]):
List of Booleans indicating state of CDR lock.
- clock_times([float]):
List of clocking instants, as recovered by the CDR.
- bits([int]):
List of recovered bits.
Return type: tuple(([float], [[float]], [float], [int], [bool], [float], [int]))
Raises: Exception
– If the requested modulation type is unknown.
-
step
(decision, error, update)[source]¶ Step the DFE, according to the new decision and error inputs.
Parameters: - decision (float) – Current slicer output.
- error (float) – Difference between summing node and slicer outputs.
- update (bool) – If true, update tap weights.
Returns: New backward filter output value.
Return type: res(float)
-
cdr - CDR behavioral model.¶
Behavioral model of a “bang-bang” clock data recovery (CDR) unit.
Original Author: David Banas<EMAIL_ADDRESS>Original Date: 17 June 2014
This Python script provides a behavioral model of a “bang-bang” clock data recovery (CDR) unit. The class defined, here, is intended for integration into the larger PyBERT framework.
Copyright (c) 2014 by David Banas; All rights reserved World wide.
-
class
pybert.cdr.
CDR
(delta_t, alpha, ui, n_lock_ave=500, rel_lock_tol=0.01, lock_sustain=500)[source]¶ A class providing behavioral modeling of a ‘bang- bang’ clock data recovery (CDR) unit.
-
adapt
(samples)[source]¶ Adapt period/phase, according to 3 samples.
Should be called, when the clock has just struck.
- Synopsis:
- (ui, locked) = adapt(samples)
Parameters: samples ([float]) – A list of 3 samples of the input waveform, as follows:
- at the last clock time
- at the last unit interval boundary time
- at the current clock time
Returns: - ui:
- The new unit interval estimate, in seconds.
- locked:
- Boolean flag indicating ‘locked’ status.
Return type: tuple (float, bool)
-
locked
¶ The current locked state.
-
ui
¶ The current unit interval estimate.
-


In this tutorial we'll cover how to add a widget creation wizard which allows end-users to create new widget instances based on existing widget configurations. The wizard's first step, or page, will use a custom component that lets users choose a widget to create. In the example below we'll implement a sample widget selection component that provides a proportional widget and a kpi widget as options.
ProviderRegistryService
WidgetClonerService
IWidgetTemplateSelector
interface which requires a widgetSelected output that should emit a widget to be cloned. For any
widgets that require further configuration before they should be placed on the dashboard,
set the widget's
metadata.needsConfiguration
property to true
. This will hide
the "Create Widget" button whenever an unconfigured widget is selected.
NuiRepeatModule
and NuiImageModule
are included in the
imports of the widget template selector component's parent module.
open
method on the
WidgetClonerService
with an argument of type
IWidgetSelector
.
Only two things are required in that object: a reference to the dashboardComponent instance and
the typename of the widget selector created in the previous step. Optionally, the argument object
may also contain a trySubmit
function with logic for persisting the new widget on a
backend.
Observable
returned by the
widgetClonerService.open
method in order to activate the handling of form submission
and the subsequent updating of the dashboard with a newly created widget.


Write a function named 'test' that returns the string: Release the Kraken!
Write a function named "sum" that takes an array of numbers and returns their sum
Write a function named "doubleNumbers" that takes an array of numbers and returns an array of each doubled.


Nate and his dad baked a cake. Nate got the cake plate. His dad got the tray. Nate put the plate on the tray. Nate will take the cake to Jake. "May I taste the cake?" asks Jake. Nate nods. Jake swallows a bit of the cake. "This is tasty cake! I will tell the kids this cake is first rate!" says Jake. Jake runs to tell Bill, Sal, and Dave the tale of Nate's cake. The kids run to Nate for cake. "Nate, bake us a cake!" yell the kids. It is late in the day, but Nate must bake. Nate baked a big cake and the other kids helped. The kids ate the cake. Nate, his dad, and the other kids had a fun day baking!
in-context


| facility | Category | Fee per academic Session |
| Indoor Stadium | Basketball | 3000 |
| Vollyball | ||
| Squash | Badminton | |
| Combat Sprts | ||
| swimming | 6000 | |
| shooting | 6000 |
| Facility> | Fee per Academic Session in case allotment of Facility done along with Residential Facility | Fee per Academic Session in case allotment of Facility done separate from Residential Facility |
| Gym Membership | 4000 | 6000 |


{% extends 'medicus/base.html' %} {% load static %} {% block content %}
Could not find a doctor with specialization "{{profession|escape}}" in {{city|escape}}!
{% endif %} {% for doctor in doctors %}
{{ doctor.street }}, {{doctor.city}}
{{ doctor.phone_number }}


Modelling of Biodiversity Laboratory (MOBI Lab) is a new research group at Department of Spatial Sciences at FZP CZU in Prague, Czech Republic. We are currently funded by the REES program.
We study:
- Geographic distribution of biological diversity. Why are some places on Earth full of living things, while other places aren’t? Why are there fever than 100 species of trees that live in the millions of km2 of boreal forests in Eurasia and North america, while there can be hundreds of species cooccurring in as little as 50 ha in a tropical forest of South America or Asia?
- Temporal biodiversity change, loss, and gain. We likely face a loss of biological diversity caused by humans.  We study where, why, and how fast this change happens.
- Statistics, machine learning, spatial and temporal scale. We develop new models for big and messy data of the 21st century. We are interested in scientific methodology, particularly in statistics, machine learning, and all sorts of artifacts related to physical constraints, geometry, and scales of the world.


influenza health avian pandemic Africa surveillance {border-style public px;} #ffffff;} virus countries human (). disease Health capacity poultry resources address (HN) control existing laboratory potential World birds collab: depopulation detection effective national rapid subtype Africa, Available IDSR Influenza Nigeria affected outbreaks px; response spread strain strategies systems use vaccines {font-family [cited confirmed emerging font-size highly infection limited strengthen Africa. African Organization Preparedness areas critical diseases double; early global healthcare laboratories local preparedness provide Pandemic animal border-color border-width communication efforts farms focus implement infrastructure million need new pathogenic priorities programs rapidly solid; sub-Saharan teams vaccination viruses {font-style {font-weight Aug Disease Global Infect International January Ministry Nations Nigeria. Nigerian Surveillance United available bird bold cases courier; detect effects em; emergence encourage government high humans. illness implementation implemented improve including like major measures, outbreak patients potentially pt;} reported reporting require respiratory risk substantial surveillance, threat threats timely transmission


 " What have{% endraw %}
{% raw %}you been doing, Sie ? you've turned into a regular{% endraw %}
{% raw %}black gentleman."  His{% endraw %}
{% raw %}face seemed to say, " I'll take the gentleman out of{% endraw %}
{% raw %}you pretty soon." I gave him an account of my{% endraw %}
{% raw %}preaching which was consistent with the truth, and{% endraw %}


With DocPHT you can take notes and quickly document anything! You can also manage users, save versions of your pages and run and restore backups. Complete with interface that can be customized, all with maximum portability and without the use of any database. You won't believe it, until you try it!
composer create-project kenlog/docpht
docker pull docpht/docpht:v1.3.2
docker run -d --name docpht -p 80:80 -t docpht/docpht:v1.3.2
Open Source Release - DocPHT.org © 2019
Domain sponsored by ilTuoBrand.it


AWS::ElasticLoadBalancingV2::LoadBalancer
Creates an Application Load Balancer or a Network Load Balancer. For more information, see Getting Started in the Elastic Load Balancing User Guide.
Note
AWS CloudFormation does not automatically create tags (key–value pairs) for an Elastic Load Balancing load balancer. You must use the Tags property to create tags to associate with the load balancer.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties" : { "IpAddressType" :
String
, "LoadBalancerAttributes" : [ LoadBalancerAttributes, ... ], "Name" :String
, "Scheme" :String
, "SecurityGroups" : [String, ...
], "SubnetMappings" : [ SubnetMapping, ... ], "Subnets" : [String, ...
], "Tags" : [Resource Tag, ...
], "Type" :String
} }
YAML
Type: AWS::ElasticLoadBalancingV2::LoadBalancer Properties: IpAddressType:
String
LoadBalancerAttributes: -LoadBalancerAttributes
Name:String
Scheme:String
SecurityGroups: -String
SubnetMappings: - SubnetMapping Subnets: -String
Tags: -Resource Tag
Type:String
Properties
For more information and valid parameter values, see the CreateLoadBalancer
action
in the Elastic Load Balancing API Reference version 2015-12-01.
IpAddressType
-
[Application Load Balancers] The type of IP addresses that are used by the load balancer's subnets, such as
ipv4
(for IPv4 addresses) ordualstack
(for IPv4 and IPv6 addresses). For valid values, see theIpAddressType
parameter for theCreateLoadBalancer
action in the Elastic Load Balancing API Reference version 2015-12-01. The default value isipv4
.Required: No
Type: String
Update requires: No interruption
Note
If
Scheme
isinternal
, thenIpAddressType
must beipv4
. LoadBalancerAttributes
-
The load balancer configuration.
Required: No
Type: A list of Elastic Load Balancing V2 LoadBalancerAttributes
Update requires: No interruption
Name
-
A name for the load balancer. This name must be unique within your AWS account and can have a maximum of 32 alphanumeric characters and hyphens. A name can't begin or end with a hyphen.
Important
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
Required: No
Type: String
Update requires: Replacement
Scheme
-
Specifies whether the load balancer is internal or Internet-facing. Valid values are
internet-facing
andinternal
. The default isinternet-facing
.The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the Internet.
The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.
Required: No
Type: String
Update requires: Replacement
SecurityGroups
-
[Application Load Balancers] The IDs of the security groups to assign to the load balancer.
Required: No
Type: List of String values
Update requires: No interruption
SubnetMappings
-
The subnets to attach to the load balancer, specified as a list of
SubnetMapping
property types. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify your own Elastic IP addresses.
[Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet.
Required: No
Type: List of Elastic Load Balancing V2 SubnetMapping
Update requires: Replacement
Subnets
-
The subnets to attach to the load balancer, specified as a list of subnet IDs. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
[Application Load Balancers] You must specify subnets from at least two Availability Zones.
Required: No
Type: List of String values
Update requires: No interruption
Tags
-
The tags (key–value pairs) to associate with this load balancer. Use tags to manage your resources.
Required: No
Type: Resource Tag
Update requires: No interruption
Type
-
The type of load balancer to create. Valid values are
application
andnetwork
. The default isapplication
.Required: No
Type: String
Update requires: Replacement
Return Values
Ref
When the logical ID of this resource is provided to the Ref
intrinsic function, Ref
returns the ARN of the load balancer, for
example:
arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188
For more information about using the Ref
function, see Ref.
Fn::GetAtt
Fn::GetAtt
returns a value for the following attributes.
CanonicalHostedZoneID
-
The ID of the Amazon Route 53 hosted zone associated with the load balancer, for example
Z2P70J7EXAMPLE
. DNSName
-
The DNS name for the load balancer, for example
my-load-balancer-424835706.us-west-2.elb.amazonaws.com
. LoadBalancerFullName
-
The full name of the load balancer, for example
app/my-load-balancer/50dc6c495c0c9188
. LoadBalancerName
-
The name of the load balancer, for example
my-load-balancer
. SecurityGroups
-
The IDs of the security groups for the load balancer, for example
sg-123456a
.
For more information about using Fn::GetAtt
, see Fn::GetAtt.
Examples
Load balancer with idle timeout period specified
The following example creates an internal load balancer with an idle timeout period
of 50
seconds.
JSON
"loadBalancer" : { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { "Scheme" : "internal", "Subnets" : [ {"Ref": "SubnetAZ1"}, {"Ref" : "SubnetAZ2"}], "LoadBalancerAttributes" : [ { "Key" : "idle_timeout.timeout_seconds", "Value" : "50" } ], "SecurityGroups": [{"Ref": "SecurityGroup1"}, {"Ref" : "SecurityGroup2"}], "Tags" : [ { "Key" : "key", "Value" : "value" }, { "Key" : "key2", "Value" : "value2" } ] } }
YAML
loadBalancer: Type: AWS::ElasticLoadBalancingV2::LoadBalancer Properties: Scheme: internal Subnets: - Ref: SubnetAZ1 - Ref: SubnetAZ2 LoadBalancerAttributes: - Key: idle_timeout.timeout_seconds Value: '50' SecurityGroups: - Ref: SecurityGroup1 - Ref: SecurityGroup2 Tags: - Key: key Value: value - Key: key2 Value: value2
Load balancer with subnets
The following example creates a load balancer with two mapped subnets.
JSON
{ "Parameters": { "FirstSubnet": { "Type": "String" }, "SecondSubnet": { "Type": "String" }, "ELBType": { "Type": "String" }, "ELBIpAddressType": { "Type": "String" } }, "Resources": { "loadBalancer": { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { "SubnetMappings": [ { "AllocationId": { "Fn::GetAtt": [ "FirstEIP", "AllocationId" ] }, "SubnetId": { "Ref": "FirstSubnet" } }, { "AllocationId": { "Fn::GetAtt": [ "SecondEIP", "AllocationId" ] }, "SubnetId": { "Ref": "SecondSubnet" } } ], "Type": { "Ref": "ELBType" }, "IpAddressType": { "Ref": "ELBIpAddressType" } } }, "FirstEIP": { "Type": "AWS::EC2::EIP", "Properties": { "Domain": "vpc" } }, "SecondEIP": { "Type": "AWS::EC2::EIP", "Properties": { "Domain": "vpc" } } } }
YAML
Parameters: FirstSubnet: Type: String SecondSubnet: Type: String ELBType: Type: String ELBIpAddressType: Type: String Resources: loadBalancer: Type: AWS::ElasticLoadBalancingV2::LoadBalancer Properties: SubnetMappings: - AllocationId: !GetAtt - FirstEIP - AllocationId SubnetId: !Ref FirstSubnet - AllocationId: !GetAtt - SecondEIP - AllocationId SubnetId: !Ref SecondSubnet Type: !Ref ELBType IpAddressType: !Ref ELBIpAddressType FirstEIP: Type: AWS::EC2::EIP Properties: Domain: vpc SecondEIP: Type: AWS::EC2::EIP Properties: Domain: vpc


The bearing of a child takes nine months, no matter how many women are assigned. Many software tasks have this characteristic because of the sequential nature of debugging. -- Fred Brooks


| Number of words per round: | (number of choices shown each round) | |
| Multiplicity: | (min) number of times each word is replicated | |
| Number of rounds: | how many words to show in each experiment | |
| Random seed: | use to randomize word selection | |
| Filename with words: | should be in /data path | |


public abstract class ScoringDirector
extends java.lang.Object
GameState
s whose scores are directly
connected to the game and predefined goals. The score of all
GameState
s combined divided by the number of states used is the final
score of a ScoringAction.
Note:
The ScoringDirector is used for changing the scores of the Actions used in
the ActionQueueSimulationResults
. Therefore any subclass must be
carefully chosen due to them defining the desired Unit percentages and the
technologies and upgrades that count towards the scores. Also since the
Updater (ActionUpdaterSimulationQueue
) for the specific
AvailableActionsSimulationQueue
defines the actual abilities of the
manager, these goals that are defined here should overlap with the actual
possible actions of the manager.| Modifier and Type | Field and Description |
|---|---|
private double |
basePointMultiplier |
private ScoreGeneratorFactory |
scoreGeneratorFactory |
| Constructor and Description |
|---|
ScoringDirector(BuildActionManager manager) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ScoreGeneratorFactory |
defineScoreGeneratorFactory(BuildActionManager manager)
Function for defining the
ScoreGeneratorFactory that will be
providing all necessary ScoreGenerator s. |
private static java.util.HashSet<GameState> |
extractUsedGameStates(java.util.HashSet<ScoringAction> scoringActions)
Function for extracting the used GameStates from a HashSet of
ScoringActions.
|
ScoreGeneratorFactory |
getScoreGeneratorFactory() |
void |
update(java.util.HashSet<ScoringAction> updatableActions,
BuildActionManager manager)
Function for updating the score of a provided HashSet of ScoringActions.
|
private void |
updateGameStates(java.util.HashSet<GameState> usedGameStates,
BuildActionManager manager)
Function for updating a HashSet of GameStates based on the current state
of the game.
|
private void |
updateScoringActionScores(java.util.HashSet<ScoringAction> updatableActions,
BuildActionManager manager)
Function for updating the scores of the given ScoringActions.
|
private ScoreGeneratorFactory scoreGeneratorFactory
private double basePointMultiplier
public ScoringDirector(BuildActionManager manager)
public void update(java.util.HashSet<ScoringAction> updatableActions, BuildActionManager manager)
updatableActions
- the actions whose scores are going to be updated.manager
- the BuildActionManager whose GameStates are going to be
updated.private static java.util.HashSet<GameState> extractUsedGameStates(java.util.HashSet<ScoringAction> scoringActions)
scoringActions
- the actions whose GameStates are being extracted.private void updateGameStates(java.util.HashSet<GameState> usedGameStates, BuildActionManager manager)
usedGameStates
- the HashSet of GameStates that are going to be updated.manager
- the BuildActionManager that contains all important
information.protected abstract ScoreGeneratorFactory defineScoreGeneratorFactory(BuildActionManager manager)
ScoreGeneratorFactory
that will be
providing all necessary ScoreGenerator
s.manager
- the BuildActionManager that contains all important
information.ScoreGeneratorFactory
that will provide all necessary
ScoreGenerator
s which will be used for generating the
scores of the GameState
s / actions.private void updateScoringActionScores(java.util.HashSet<ScoringAction> updatableActions, BuildActionManager manager)
updatableActions
- the ScoringActions whose scores are being updated.manager
- the BuildActionManager whose action scores are going to be
updated.public ScoreGeneratorFactory getScoreGeneratorFactory()


| Class | Description |
|---|---|
| Driver |
Scriptella autodiscovery driver.
|
Automatically discovers a driver based on the specified url. This driver is used by default if no "driver" connection attribute was specified.
Note: Autodiscovery serves for convenience purposes and works only with JDBC drivers and URL schemes supported by Scriptella, in other cases driver's name has to be specified manually. If you get error messages like Unable to automatically discover driver for url, that means the specified URL cannot be recognized and you have to explictly specify "driver" connection attribute.
Supported URL schemes:
| Driver class: | scriptella.driver.auto.Driver |
| Driver alias name: | auto |
| URL: | Specific to an underlying driver |
| Runtime dependencies: | Depends on an underlying driver. |
<!-- connection to a SQL Server database via JTDS driver-->
<connection driver="auto" url="jdbc:jtds:sqlserver://localhost:1433/northwind"/>
<!-- connection to a JNDI bound datasource -->
<connection url="jndi:ds/appDataSource"/>
<!-- connection to a Spring managed datasource -->
<connection url="spring:myDataSource"/>
<!-- connection to Mail driver-->
<connection url="mailto:user@host?subject=Hello">
mail.smtp.host=mail.host.name
mail.user=user
mail.password=password
</connection>
Copyright © Copyright 2006-2019 The Scriptella Project Team.


Hammer Rates Edem As The Most Profitable Artist From The Camp Of The Last 2- Here’s How Much He Made From Him
by Ghbase New WriterAce music producer Edward Nana Poku Osei, professionally known as Hammer has revealed out of all the artiste he nurtured, Edem was the most profitable.
The founder and CEO of The Last Two Music Group said he made $70,000 from Edem in 2014 when telecommunication network, Globacom signed him as a brand ambassador.
Da Hammer said that money back then enabled him to acquire his first house. Hammer also said Obrafour also made himself some good cash after he produced his Execution Diary almost two decades ago.
In a nutshell, Hammer told Sammy Flex in an exclusive interview on Zylofon FM that Edem is the ‘record holder’ in terms of money artists from the Last 2 generated for him.


NKDRoyalMailBarcode Class Reference
| Inherits from | NKDBarcode : NSObject |
|---|---|
| Declared in | NKDRoyalMailBarcode.h NKDRoyalMailBarcode.m |
– initWithContent:printsCaption:
Overridden method that sets values for this barcode according to Royal Mail specifications
- (id)initWithContent:(NSString *)inContent printsCaption:(BOOL)inPrints
Parameters
inContent |
The content to be encoded (can contain A-Z and 0-9) |
|---|---|
inPrints |
Ignored; RM4SCC never uses a caption. |
Return Value
Initialized barcode encoding content using RM4SCC encoding
Declared In
NKDRoyalMailBarcode.h
– printsCaption
Overriden because RM4SCC never uses a caption.
- (BOOL)printsCaption
Return Value
NO
Discussion
@method printsCaption
Declared In
NKDRoyalMailBarcode.h
– initiator
Initiator in RM4SCC is a single ascender plus a gap of the bar width.
- (NSString *)initiator
Return Value
“10”
Discussion
@method initiator
Declared In
NKDRoyalMailBarcode.h
– terminator
Terminating character in RM4SCC is a single full bar.
- (NSString *)terminator
Return Value
“1”
Discussion
@method terminator
Declared In
NKDRoyalMailBarcode.h
– _encodeChar:
Simple routine to return four bars separated by gaps
- (NSString *)_encodeChar:(char)inChar
Return Value
“10101010”
Discussion
@method _encodeChar:
All RM4SCC characters are 4 bars long.
Declared In
NKDRoyalMailBarcode.h
– barTop:
Returns the location of the top of a specified bar (assuming origin at lower left)
- (float)barTop:(int)index
Return Value
CBC_TRACK_TOP or CBC_ASCENDER_TOP
Discussion
@method barTop:
Depending on the digit and bar, returns either CBC_TRACK_TOP or CBC_ASCENDER_TOP.
Declared In
NKDRoyalMailBarcode.h
– barBottom:
Returns the location of the bottom of a specified bar (assuming origin at lower left)
- (float)barBottom:(int)index
Return Value
CBC_TRACK_BOTTOM or CBC_DESCENDER_BOTTOM
Discussion
@method barBottom:
Depending on the digit and bar, returns either CBC_TRACK_BOTTOM or CBC_DESCENDER_BOTTOM.
Declared In
NKDRoyalMailBarcode.h
– generateChecksum
Generates a checksum digit equal to ((ascenders%6)*6)+descenders, where ascenders and descenders are the weighted sums of the descenders and ascenders in the bar code digits.
- (void)generateChecksum
Discussion
@method generateChecksum
Declared In
NKDRoyalMailBarcode.h


cups-filters-1.0.74
Installation of CUPS Filters
Install CUPS Filters by running
the following commands:
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--without-rcdir \
--disable-static \
--with-gs-path=/usr/bin/gs \
--with-pdftops-path=/usr/bin/gs \
--docdir=/usr/share/doc/cups-filters-1.0.74 &&
make
To test the results, issue: make
check 2>&1 >testlog.
Now, as the root
user:
make install
Command Explanations
--without-rcdir
: This
switch disables installation of the bundled bootscript which is not
compatible with BLFS.
--with-gs-path=/usr/bin/gs
:
This switch defines the path to the GhostScript binary in case ghostscript-9.16 is not
installed at build time.
--with-pdftops-path=/usr/bin/gs
: This
switch defines the path to the GhostScript binary in case ghostscript-9.16 is not
installed at build time.
--disable-static
: This
switch prevents installation of static versions of the libraries.
make check 2>&1
>testlog: the testsuite dumps a stream of bytes
into the input buffer after it finishes. Sending the output to a
file keeps the history usable, but some debug information will
still appear on the screen.
--with-test-path=VALUE
: if you wish to run
the tests, but you do not have the default /usr/share/fonts/dejavu/DejaVuSans.ttf
use this
switch to specify where DejaVuSans.ttf
(or perhaps some other text TTF
font - untested) is located.
Contents
Installed Programs:
cups-browsed, foomatic-rip (link) and
ttfread
Installed Libraries:
libcupsfilters.so and
libfontembed.so
Installed Directories:
/usr/include/{cupsfilters,fontembed},
/usr/lib/cups/{backend,filter},
/usr/share/cups/{banners,charsets,data},
/usr/share/doc/cups-filters-1.0.74 and
/usr/share/ppd/cupsfilters
Short Descriptions
|
cups-browsed
|
is a daemon for browsing the Bonjour and CUPS broadcasts
of shared, remote CUPS printers.
|
|
foomatic-rip
|
is a universal print filter/RIP wrapper which can be used
as CUPS filter or stand-alone for spooler-less, direct
printing.
|
|
libcupsfilters.so
|
contains CUPS Filters
API functions.
|
Last updated on 2015-09-20 14:02:11 -0700


src/managers/three-manager/effects-manager.ts
Manager for managing three.js event display effects like outline pass and unreal bloom.
Properties |
|
Methods |
|
constructor(camera: Camera, scene: Scene, renderer: WebGLRenderer)
|
||||||||||||||||
|
Constructor for the effects manager which manages effects and three.js passes.
Parameters :
|
| Public antialiasing |
Type : boolean
|
Default value : true
|
|
Whether antialiasing is enabled or disabled. |
| Private camera |
Type : Camera
|
|
The camera inside the scene. |
| Public composer |
Type : EffectComposer
|
|
Effect composer for effect passes. |
| Private defaultRenderPass |
Type : RenderPass
|
|
Render pass for rendering the default scene. |
| Public render |
Type : function
|
|
Render function with (normal render) or without antialias (effects render). |
| Private scene |
Type : Scene
|
|
The default scene used for event display. |
| Private antialiasRender | ||||||||||||
antialiasRender(scene: Scene, camera: Camera)
|
||||||||||||
|
Render for antialias without the effects composer.
Parameters :
Returns :
void
|
| Private effectsRender | ||||||||||||
effectsRender(scene: Scene, camera: Camera)
|
||||||||||||
|
Render the effects composer.
Parameters :
Returns :
void
|
| Public removePass | ||||||||
removePass(pass: Pass)
|
||||||||
|
Remove a pass from the effect composer.
Parameters :
Returns :
void
|
| Public setAntialiasing | ||||||||
setAntialiasing(antialias: boolean)
|
||||||||
|
Set the antialiasing of renderer.
Parameters :
Returns :
void
|
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
import { Camera, Scene, WebGLRenderer, Vector2, NormalBlending } from 'three';
import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass';
import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass';
import { Pass } from 'three/examples/jsm/postprocessing/Pass';
/**
* Manager for managing three.js event display effects like outline pass and unreal bloom.
*/
export class EffectsManager {
/** Effect composer for effect passes. */
public composer: EffectComposer;
/** The camera inside the scene. */
private camera: Camera;
/** The default scene used for event display. */
private scene: Scene;
/** Render pass for rendering the default scene. */
private defaultRenderPass: RenderPass;
/** Whether antialiasing is enabled or disabled. */
public antialiasing: boolean = true;
/** Render function with (normal render) or without antialias (effects render). */
public render: (scene: Scene, camera: Camera) => void;
/**
* Constructor for the effects manager which manages effects and three.js passes.
* @param camera The camera inside the scene.
* @param scene The default scene used for event display.
* @param renderer The main renderer used by the event display.
*/
constructor(camera: Camera, scene: Scene, renderer: WebGLRenderer) {
this.composer = new EffectComposer(renderer);
this.camera = camera;
this.scene = scene;
this.defaultRenderPass = new RenderPass(this.scene, this.camera);
this.composer.addPass(this.defaultRenderPass);
// Set the starting render function
this.render = this.antialiasing ? this.antialiasRender : this.effectsRender;
}
/**
* Render the effects composer.
* @param scene The default scene used for event display.
* @param camera The camera inside the scene.
*/
private effectsRender(scene: Scene, camera: Camera) {
if (this.composer) {
this.defaultRenderPass.camera = camera;
this.defaultRenderPass.scene = scene;
this.composer.render();
}
}
/**
* Render for antialias without the effects composer.
* @param scene The default scene used for event display.
* @param camera The camera inside the scene.
*/
private antialiasRender(scene: Scene, camera: Camera) {
this.composer.renderer.render(scene, camera);
}
/**
* Initialize the outline pass for highlighting hovered over event display elements.
* @returns OutlinePass for highlighting hovered over event display elements.
*/
public addOutlinePassForSelection(): OutlinePass {
const outlinePass = new OutlinePass(
new Vector2(window.innerWidth, window.innerHeight),
this.scene,
this.camera
);
outlinePass.overlayMaterial.blending = NormalBlending;
outlinePass.visibleEdgeColor.set(0xffff66);
outlinePass.visibleEdgeColor.set(0xdf5330);
this.composer.addPass(outlinePass);
return outlinePass;
}
/**
* Remove a pass from the effect composer.
* @param pass Effect pass to be removed from the effect composer.
*/
public removePass(pass: Pass) {
const passIndex = this.composer.passes.indexOf(pass);
this.composer.passes.splice(passIndex, 1);
}
/**
* Set the antialiasing of renderer.
* @param antialias Whether antialiasing is to enabled or disabled.
*/
public setAntialiasing(antialias: boolean) {
this.antialiasing = antialias;
this.render = this.antialiasing ? this.antialiasRender : this.effectsRender;
}
}


The Default 404 Error Message
Here is the default text for the 404 Error Message in the DNN core language pack:
Domain Name {0} Does Not Exist In The Database
DNN supports multiple portals from a single database/codebase. It accomplishes this by converting the URL of the client Web browser Request to a valid PortalID in the Portals database table. The following steps describe the process:
- Web Server Processing
- When a web server receives a Request from a client Web browser, it compares the file name extension on the target URL resource to its Application Extension Mappings defined in IIS.
- Based on the corresponding match, IIS then sends the Request to the defined Executable Path ( aspnet_asapi.dll in the case of ASP.NET Requests ).
- The aspnet_isapi.dll engine processes the Request in an ordered series of events beginning with Application_BeginRequest.
- HttpModule.URLRewrite OnBeginRequest ( UrlRewriteModule.vb )
- The Request URL is parsed based on the "/" character
A Domain Name is constructed using each of the relevant parsed URL segments.
Examples:
URL: http://www.domain.com/default.aspx = Domain Name: www.domain.com
URL: http://<IP_ADDRESS>/default.aspx = Domain Name: <IP_ADDRESS>
URL: http://localhost/DotNetNuke/default.aspx = Domain Name: localhost/DotNetNuke
URL: http://www.domain.com/virtualdirectory/default.aspx = Domain Name: www.domain.com/virtualdirectory
URL: http://www.domain.com/directory/default.aspx = Domain Name: www.domain.com/directory
- Using the Domain Name, the application queries the database ( Portals table - PortalAlias field ) to locate a matching record.
Note: If there are multiple URLs which correspond to the same portal then the PortalAlias field must contain each valid Domain Name in a comma seperated list.
Example:
URL: http://localhost/DotNetNuke/default.aspx
URL: http://MACHINENAME/DotNetNuke/default.aspx
URL: http://<IP_ADDRESS>/DotNetNuke/default.aspx
PortalAlias: localhost/DotNetNuke,MACHINENAME/DotNetNuke,<IP_ADDRESS>/DotNetNuke
Note: If you are installing the application to a remote server you must modify the PortalAlias field value for the default record in the Portals table according to the rules defined above.


skin effects references plant activity treatment plants effect St. John’s wound Hypericum officinalis Wort extracts vitro Chamomile perforatum publications essential clinical Res Sage dogs included Calendula antimicrobial review topical vivo use used medicinal species antibacterial infections Vet anti-inflammatory canine healing bacteria oils spp., Marigold Pharm Salvia extract {border-style antifungal Med diseases investigating potential px;} #ffffff;} Staphylococcus effective human properties showed studies reported results therapeutic Matricaria beneficial otitis reference study Antimicrobial oil publication Sci atopic bacterial dermatitis search using Dermatol Int Microbiol different isolated range systematic total Ethnopharmacol Food Nat Prod activities adverse books care confirmed dog file shown wound-healing wounds ./.. ./j.-...x chamomile ear including interesting pathogens promising proven secondary ./j.jep... ./s--- Additional John's Malassezia Table broad chamomilla composition constituents containing investigated wort Biol Gram-positive L.) Phytother Topical Wound acid analgesic antioxidant aureus common components cream did evaluation fibroblasts herbal mentioned new number option options possible px; {font-family ./ptr. Complement Effects Evaluation Medicinal Proteus Veterinary additional antibiotics application based considered contact data effects, epidermidis externa font-size frequently infected listed pachydermatis patients resistant result scientific surgical survey therapy various veterinary wounds, (St. Acta Antibacterial Aspergillus BMC Chem Clinical Comparative Contact Effect Healing Pharmacol Plant Research Schempp Science Swiss Walkenhorst according agents albicans associated certain conditions confirm demands described design double; externa, für growth important in- inhibitory literature methicillin-resistant order plants, present proving rats research review. safety screening showing skin. spectrum spp. table traditionally trial und .// ./vde. Anim Appl CAD Clin Dermatitis Fig. German Gram-negative Hamburger Herbal Marigold, Martins Pseudomonas Publications References Skin active antibacterial, barrier border-color border-width cells clinical, comparison compounds content databases demonstrated dermatological distribution dogs, epidermal exclusion experimental field final formulations hyperforin inflammation irritant opposite plants. products prophylaxis references. related resistance resulting sage solid; traditional treatments water {font-style {font-weight "finally "in (e.g. ./S- ./s-- ATCvet Afr Also, Assessment Ayrle Based Brazil Candida Chemical Corynebacterium D'Auria Demirci EndNote Enterococcus Essential Eur European Extracts International Model Moher PRISMA Pasqua Physiol Planta Plants Propionibacterium Rec Simon Simonetti Streptococcus Thus, Tocci Toxicol Trichophyton Vitro Vogl [], abstract aeruginosa anti-bacterial antibiotic-resistant aureus, bacteria. benefit bold clear code collected combination component conducted connected courier; criteria cutaneous dealing describing discussion effect. effects. efficacy em; especially evaluate extraction food function fungi grid.. healthy humans impaired increased indicating interpretation investigate keyword knowledge known like line management manuscript. marigold marked methods participated phenolic phytotherapy plant. preparations presented problems protective provided pseudintermedius pt;} publications" published randomized recent recutita reference" relevant reporting risk screened selected selection seven shampoos site skin, statement subsp. synergistic table. titles treatment, trials unwanted vulgaris, wide wounds. yeasts


Take a journey with us
Address
8/F Cheung Hing Industrial Building
12P Smithfield Road
Kennedy Town
Hong Kong
Social
{{ partial "head" . }} {{ partial "news-carousel" . }}
Fifth Journey develops next-generation Hollywood games and interactive entertainment.
From feature animations to cult classics and blockbuster franchises, Fifth Journey is pioneering mobile entertainment in partnership with the world’s leading studios. We’re also advancing the latest technologies, including O2O and AR/VR, and delivering these experiences into the fastest growing markets in the world.
Fifth Journey was founded by a team of acclaimed game developers responsible for some of the biggest interactive hits in Hollywood and chart-topping success in China. We're at the leading edge of entertainment, creating new and exciting experiences for fans and helping Hollywood build franchises like never before.
Fifth Journey is headquartered in Hong Kong with creative operations based in San Francisco and studio operations around the world.
TAKE A JOURNEY WITH US!
Address
8/F Cheung Hing Industrial Building
12P Smithfield Road
Kennedy Town
Hong Kong
Social


Help
Commands
- login twitter
- post twitter status "..." e.g. post twitter status Hello World!
- read twitter stream
- find twitter
- login facebook
- list friends
- list facebook friends
- select "FB friend name" e.g. select John Moore
- post facebook status "..." e.g. post facebook status Hellow World!
- find facebook
- yellowpage/yelp/yp "business name" near "address" e.g. yelp pizza near 76010
- search gmail
- search facebook
- find place "place name" e.g. find place parks. you can also try find -p parks
- find business
- find restaurants
- find bars
- find gyms
- weather 53718 or weather at/near/in 53718
- direction from 53718 to 53719
- meaning/dictionary/definition "word" e.g. dictionary amazing
- define "word" e.g. define love
- what is "word" e.g. what is love
- lookup "word" e.g. lookup love
- calculate "equation" e.g. calculation 2+2*3
- say "message" e.g. say Hello!!!
- open "valid url" e.g. open http://www.kaanzi.com
- eat
- traffic "address" e.g. traffic 53718
- track flight "flight no" e.g. track flight UA123


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
W
R
RECOMMENDED_TIME
- Static variable in class Utils.
JWarTickGenerator
RegisteredForTicks()
- Method in class AI.
JAIGeneric
RegisteredForTicks()
- Method in interface Utils.
TickReceiver
removeDynamicObject(JWarDynamicObject)
- Method in class UI.
JBattleField
Removes a given object from th map.
removeDynamicObject(int, int)
- Method in class UI.
JBattleField
Removes a given object from the map by it's coords.
removeMineralSlots(int)
- Method in class Objects.
JWarBuilderMachine
resizeField(int, int)
- Method in class UI.
JWarDrawing
Resizes the BattleField container to the new given size
run()
- Method in class Utils.
JWarTickGenerator
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
W


This post shows how to convert a frequency norm bound IQC into a hard time-domain IQC. I was made aware of this trick by Andy Packard. $ \newcommand{\abs}[1]{| #1 |} \newcommand{\ind}{\mathbf{1}} \newcommand{\norm}[1]{\lVert #1 \rVert} \newcommand{\ip}[2]{\langle #1, #2 \rangle} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\T}{\mathsf{T}} \newcommand{\Proj}{\mathcal{P}} \newcommand{\Tr}{\mathrm{Tr}} \newcommand{\A}{\mathcal{A}} $
Let $G : \ell_{2e} \longrightarrow \ell_{2e}$ denote a causal LTI operator, and let $G(z)$ denote its $z$-transform. Suppose that $G$ is analytic for all $\abs{z} \geq 1$, and let $\norm{G}_\infty$ denote its $H_\infty$-norm. Also, let $P_T$ denote the truncation operator $$ (P_T u)(t) = \begin{cases} u_t & t \leq T \\ 0 &t > T \end{cases} \:. $$
Lemma: Put $y=Gu$ for $u \in \ell_{2e}$. Then for all $T = 0, 1, 2, ...$, we have that $$ \begin{align} \norm{ P_T y }_2 \leq \norm{G}_\infty \norm{P_T u}_2 \:. \label{eq:hard_iqc} \end{align} $$
Proof: Recall that causality of $G$ means that $P_T G P_T = P_T G$. Hence, $$ \begin{align*} \norm{P_T y}_2^2 = \norm{P_T G u}_2^2 = \norm{P_T G P_T u}_2^2 \leq \norm{P_T G}_\infty^2 \norm{P_T u}_2^2 \leq \norm{G}_\infty^2 \norm{P_T u}_2^2 \:. \end{align*} $$ Taking the square root of both sides yields the result. $\square$
Frequency norm bound IQC
Recall that a norm bound on $G$ gives rise to a special kind of sector IQC. Suppose that $\norm{G}_\infty \leq \gamma$. Specifically, putting $y = Gu$, we have for all $z \in \mathbb{T}$, $$ \begin{bmatrix} \widehat{u}(z) \\ \widehat{y}(z) \end{bmatrix}^* \begin{bmatrix} \gamma & 0 \\ 0 & -\gamma^{-1} \end{bmatrix}\begin{bmatrix} \widehat{u}(z) \\ \widehat{y}(z) \end{bmatrix} \geq 0 \:. $$ Integrating both sides yields the IQC $$ \int_{\mathbb{T}} \begin{bmatrix} \widehat{u}(z) \\ \widehat{y}(z) \end{bmatrix}^* \begin{bmatrix} \gamma & 0 \\ 0 & -\gamma^{-1} \end{bmatrix}\begin{bmatrix} \widehat{u}(z) \\ \widehat{y}(z) \end{bmatrix} \; dz \geq 0 \:. $$ By applying Parseval's identity to the IQC, we conclude that $\norm{y}_2 \leq \gamma \norm{u}_2$, which is the soft version of $\eqref{eq:hard_iqc}$. It is quite interesting that by using the causality of $G$, this soft IQC can be cast as a hard IQC as well.


Loading...
defaultCaptureDeviceSpecifier
OpenALManager
defaultDeviceSpecifier
OpenALManager
delegate
OALAudioTrack
delta
OALMoveByAction
device
ALBuffer::device()
ALCaptureDevice::device()
ALContext::device()
ALDevice::device()
deviceCurrentTime
OALAudioTrack
devices
OpenALManager
direction
ALSoundSource-p
distanceModel
ALContext
dopplerFactor
ALContext
duration
OALAction::duration()
OALAudioTrack::duration()
ALBuffer::duration()
Searching...
No Matches


Blot is a blogging platform designed for your favourite text editor. It adds a folder to your Dropbox and publishes files you put inside
automatically.
Images, text files, Markdown, Word Documents™ (
and more) become blog posts. There’s no interface. Just your files.
Members pay
$30 per site, per year. This keeps Blot fast and reliable. Hosting is included and there are no ads.
Blot comes with seven templates. They’re designed to be
. Some work best with photos, others are suited to text. If you're comfortable with HTML and CSS, you can also
and start your site in a few moments. If you have any questions, please don’t hesitate to


Neural Network
- 1. Neural Network
- 2. Backpropagation
- 3. VC-dimension
- 4. Decision Boundary
- 5. Python implementation
- References
1. Neural Network
A neural network is a graph composed of nodes and edges. The edges implement linear operations while the nodes aggregate each edge’s contribution before composing by an activation function $g$. This process is replicated to the next layer. Note that the nodes do not interact with each other within each layer; that is, there is no edge between nodes. Mathematically we have the following series of operations.
\[\begin{equation}\begin{split}&z^{(l)}_i=g(\omega^{(l)}_{ij}z^{(l-1)}_j+b^{(l)}_j)\\ &z^{(l-1)}_j=g(\omega^{(l-1)}_{jk}z^{(l-2)}_k+b^{(l-1)}_j)\\ &\ldots\\ &z^{(1)}_p = g(\omega^{(1)}_{pr}x_r+b^{(0)}_l) \end{split}\end{equation}\]The activation function $g$ is a non-linear function with support on the real line. A common choice is the sigmoid function but the sign function also works. This sequence of compositions is known as forward pass.
A neural network is a type of universal approximator. Cybenko (1989) has shown that any continuous function $f$ in $I_n$, the n-dimensional unit cube, can be approximated with arbitrary accuracy by a sum of the form \(C=\sum_{i=1}^N \alpha_i\sigma(\beta_i^T\cdot x+b_i)\) That is, \(|C(x)-f(x)|<\epsilon,\;\forall x\in I_n\) for any $\epsilon>0$.
The network architecture has two major parameters that we need to tune: the number of neurons per layer and the depth or number of layers. Increasing the number of neurons in a layer adds complexity to the neural network because we add more parameters to fit. And the depth does it too. However, adding depth to the neural network increases the number of parameters more rapidly than adding neurons in the same layer. Suppose we have one hidden layer with $n$ neurons. The number of edges flowing to this layer is $n(d+1)$ where $d$ is the input dimension. Instead, if we consider two hidden layers with $n/2$ neurons each, we have in total $n(n/2+1)/2+n(d+1)/2$ edges flowing to the hidden layers. This number scales quadratically with $n$, while for a single hidden layer, it scales linearly.
But adding depth has an additional effect. We can see the output of a layer as a different feature representation of the data. Adding layers also allows the neural network to learn other representations of the data, which may help performance. The neural network can be trained beforehand on large datasets and learn very complex features. We can take the last hidden layer as a new input feature and train only the last layer weights. Training the last layer allows the neural network to learn datasets that may differ, in population, from the training set.
Instead, if we were to train a neural network with only one hidden layer, we would need to add an increasing number of neurons to capture more complex functions. However, the effect of having a large number of neurons may be prejudicial as we are increasing the dimension of the hidden feature space, leading to dimensionality issues. In contrast, adding depth increases complexity while keeping the dimensionality of the hidden space under control.
Although depth helps to learn, it brings other shortcomings in terms of training. With more depth, the loss function derivatives can be challenging to calculate. While the last layers’ parameters are easier to learn, the first layers’ parameters can be hard to learn. Having many products will eventually make the derivative approach zero or become quite large, which hinders training.
2. Backpropagation
Lets consider a binary classification problem with classes $y={0,1}$. In this case we want to model the probability $p(x)\equiv p(y=1|x)$. The loss function is the log-loss function given by
\[L=-\sum_iy_i\ln p(x_i)+(1-y_i)\ln(1-p(x_i))\]and we model $p(x)$ with a neural network with one hidden layer, that is,
So we have
\[\begin{aligned}& p(x)=\sigma(\omega^{(2)}_{i}z^{(1)}_i+b^{(2)})\\ &z^{(1)}_j = \sigma( \omega^{(1)}_{jk}x_k+b^{(1)}_j) \end{aligned}\]where implicit contractions are in place.
The loss function depends on the weights \(\omega^{(2)}_i\) and \(\omega^{(1)}_{ij}\) in a very complicated way. To calculate the minimum of the loss function we use the gradient descent algorithm. So we calculate the derivatives of the loss function with respect to the weights,
\[\begin{equation*}\begin{split}&\frac{\partial L}{\partial \omega^{(2)}_i}=\sum_x \frac{\partial L}{\partial p(x)}\dot{\sigma}(\omega^{(2)}_{k}z^{(1)}_k+b^{(2)})z^{(1)}_i\\ &\frac{\partial L}{\partial b^{(2)}}=\sum_x \frac{\partial L}{\partial p(x)}\dot{\sigma}(\omega^{(2)}_{k}z^{(1)}_k+b^{(2)})\\ &\frac{\partial L}{\partial \omega^{(1)}_{ij}}=\sum_x \frac{\partial L}{\partial p(x)}\dot{\sigma}(\omega^{(2)}_{k}z^{(1)}_k+b^{(2)})\omega^{(2)}_i \dot{\sigma}(\omega^{(1)}_{ik} x_k+b^{(1)}_i)x_j\\ &\frac{\partial L}{\partial b^{(1)}_{i}}=\sum_x \frac{\partial L}{\partial p(x)}\dot{\sigma}(\omega^{(2)}_{k}z^{(1)}_k+b^{(2)})\omega^{(2)}_i \dot{\sigma}(\omega^{(1)}_{ik} x_k+b^{(1)}_i) \end{split}\end{equation*}\]We see that as we go down in the layer level, we need to propagate back the composition of the forward pass in order to calculate the derivatives. That is, first we calculate the derivatives of the weights in the higher levels, and progress downwards towards lower levels. This process can be done in an iterative way, and is known as backpropagation algorithm. More generally we have
\[\begin{equation*}\begin{split}&\frac{\partial p_k(x)}{\partial \omega^{(n)}_{ij}}=\dot{g}^{(l)}_k\omega^{(l)}_{kk_1} \dot{g}^{(l-1)}_{k_1}\omega^{(l-1)}_{k_1k_2}\ldots \dot{g}^{(n)}_i z^{(n-1)}_j\\ &\frac{\partial p_k(x)}{\partial b^{(n)}_{i}}=\dot{g}^{(l)}_k\omega^{(l)}_{kk_1} \dot{g}^{(l-1)}_{k_1}\omega^{(l-1)}_{k_1k_2}\ldots \dot{g}^{(n)}_i \end{split}\end{equation*}\]where again sums over indices are implicit.
3. VC-dimension
We can estimate the VC-dimension of a neural network with activation the sign function. Recall the growth function definition: $\text{max}_{C\in \chi: |C|=m}|\mathcal{H}_C|$ where $\mathcal{H}_C$ is the restriction of the neural network hypotheses from the set $C$ to ${0,1}$. Between adjacent layers $L^{t-1}$ and $L^{t}$ one can define a mapping between $\mathcal{H}^t:\,\mathbb{R}^{|L^{t-1}|}\rightarrow \mathbb{R}^{|L^{t}|}$, where $|L^{t-1}|$ and $|L^t|$ are the number of neurons in the layers, respectively. Then the hypothesis class can be written as the composition of each of these maps, that is, $\mathcal{H}=\mathcal{H}^T\circ \ldots \circ \mathcal{H}^1$. The growth function can thus be bounded by \(\Pi_{\mathcal{H}}(m)\leq \prod_{t=1}^T\Pi_{\mathcal{H^t}}(m)\)
In turn, for each layer the class $\mathcal{H}^t$ can be written as the product of each neuron class, that is, $\mathcal{H}^t=\mathcal{H}^{t,1}\times \ldots \times \mathcal{H}^{t,i}$ where $i$ is the number of neurons in that layer. Similarly, we can bound the growth function of each layer class \(\Pi_{\mathcal{H}^t}(m)\leq \prod_{i=1}^{|L^t|}\Pi_{\mathcal{H^{t,i}}}(m)\)
Each neuron is a homogeneous halfspace class, and we have seen that the VC-dimension of this class is the dimension of their input plus one (VC-dimension of a separating hyperplane). If we count the bias constant as a single edge, then this dimension is just the number of edges flowing into the node $i$, which we denote as $d_{t,i}$. Using Sauer’s Lemma, we have \(\Pi_{\mathcal{H}^{t,i}}\leq \Big(\frac{em}{d_{t,i}}\Big)^{d_{t,i}}<(em)^{d_{t,i}}\)
Putting all these factors together we obtain the bound \(\Pi_{\mathcal{H}}(m)\leq \prod_{t,i} (em)^{d_{t,i}}=(em)^{|E|}\) where $|E|$ is the total number of edges, which is also the total number of parameters in the network. For \(m^*=\text{VC-dim}\) we have \(\Pi_{\mathcal{H}}=2^{m^*}\) , therefore \(2^{m^*}\leq (em^*)^{|E|}\) It follows that $m^*$ must be of the order $\mathcal{O}(|E|\log_2|E|)$.
If the activation function is the sigmoid, the proof is out of scope. One can though give a rough estimate. The VC-dimension should be of the order of the number of tunable parameters. This is the number of edges \(|E|\), counting the bias parameters.
4. Decision Boundary
Below we plot the decision boundary for a neural network with one hidden layer after several iterations, that is, the number of gradient descent steps:
The neural network has enough capacity to draw complicated decision boundaries. Below we show the decision boundary at different stages of learning.
Waiting long enough, allows the neural network to overfit the data as we see in the last picture.
5. Python implementation
Define classes for linear layer and sigmoid activation function:
class LinearLayer:
def __init__(self,dim_in,dim_out):
self.n_in=dim_in
self.n_out=dim_out
self.weights=np.random.normal(0,0.01,(dim_in,dim_out))
self.bias=np.random.normal(0,0.01,dim_out)
def __call__(self,x):
out=np.matmul(x,self.weights)
out+=self.bias
return out
def backward(self,x):
dL=x
return dL
class Sigmoid:
"sigmoid function"
def __call__(self,x):
out=1/(1+np.exp(-x))
return out
def backward(self,x):
out=np.exp(-x)/(1+np.exp(-x))**2
return out
Class NN: implements neural network
Class logloss: returns loss function object which contains backward derivates for gradient descent
Class optimizer: implements gradiend descent step with specified learning rate
class NN:
""" Neural Network with one hidden layer"""
def __init__(self,dim_in,hidden_dim,dim_out):
self.layer1=LinearLayer(dim_in,hidden_dim)
self.layer2=LinearLayer(hidden_dim,dim_out)
self.sig=Sigmoid()
self.delta=None
def __call__(self,x):
self.out_l1=self.layer1(x)
self.out_s1=self.sig(self.out_l1)
self.out_l2=self.layer2(self.out_s1)
self.out_s2=self.sig(self.out_l2)
return self.out_s2
def predict(self,x):
p=self(x)
pred=(p>=0.5).astype('int')
return pred
class logloss:
def __init__(self,model):
self.model=model
def __call__(self,x,y):
p=self.model(x)
L=y*np.log(p)+(1-y)*np.log(1-p)
return -L.sum()/x.shape[0]
def backward(self,x,y):
p=self.model(x)
dL=-y/p+(1-y)/(1-p)
dL=dL/x.shape[0]
dL=dL*model.sig.backward(model.out_l2)
dw2,db2=np.dot(model.out_s1.T,dL),dL.sum()
dw1=model.layer2.weights.T*model.sig.backward(model.out_l1)
db1=(dL*dw1).sum(0)
dw1=np.dot((dL*x).T,dw1)
model.delta=db1,dw1,db2,dw2
class optimizer:
def __init__(self,model,lr=0.01):
self.model=model
self.lr=lr
def step(self):
db1,dw1,db2,dw2=model.delta
self.model.layer1.bias-=db1*self.lr
self.model.layer1.weights-=dw1*self.lr
self.model.layer2.bias-=db2*self.lr
self.model.layer2.weights-=dw2*self.lr
Training for loop:
def train(optimizer,loss,xtrain,ytrain,num_iter=100):
for i in range(num_iter):
L=loss(xtrain,ytrain)
loss.backward(xtrain,ytrain)
optimizer.step()
if i%10==0:
print('Iteration ',i,', loss: ',L)
References
[1] Understanding Machine Learning: from Theory to Algorithms, Shai Ben-David and Shai Shalev-Shwartz
[2] The elements of statistical learning, T. Hastie, R. Tibshirani, J. Friedman
[3] Approximation by superpositions of a sigmoidal function, Cybenko, G. (1989)


17 Completely Nonsense Yet Real Packaging Examples
From the wasteful to the redundant, here are some examples of packaging ideas gone wrong.
by Loukia PapadopoulosPackaging is a tricky thing. It is an absolute requirement in our current lives but a tricky endeavor to do right.
Depending on the fragility and size of the products, packaging needs to take many varied and complex forms.
Engineering those forms is not an easy task, and as such we try not to be too hard on modern-day manufacturers. However, some examples are so illogical they cannot be ignored.
SEE ALSO: MCDONALD'S TO USE COMPLETELY RENEWABLE, RECYCLED PACKAGING BY 2025
Here are 17 of the silliest and yet real packaging ideas we have seen.
1. The crowded umbrella
This Reddit user ordered an umbrella from Amazon. Little did he know it would arrive drowning in paper packaging. But nothing was lost! The crafty Redditor used it to make himself a paper toga.
2. The foamy charging cube
This little guy was surrounded by several layers of foam.
3. The redundant environmental failure
We thought Imgur user thenamenonehas did a great job of explaining this packaging mishap by saying: "If only bananas had robust, natural, bio-degradable packaging of their own. Some sort of peelable skin, perhaps."
4. The open space
I guess this tiny electronic was claustrophobic. It came in a box 20 times its size.
5. The individually packaged mini sausages
The title says it all. Yes, someone thought it might be a good idea to wrap in plastic every single individual mini sausage. Aside from being costly and ecologically unwise, it must be quite annoying if you want more than just one of these treats.
6. The broom in a coffin
Ok, the broom did not come in an actual coffin but this packaging can definitely double as one.
7.
8. You won't get your pepper
I am sure these pepper manufacturers did not want to stop their clients from consuming their products. But you have got to wonder why they made the packaging so hard to open.
9. The genuine coconut
In another case of wasting resources to package a fruit with one of nature's most resilient natural packaging, this company thought it might be wise to offer plastic covered coconuts. And please note that they are genuine coconuts.
10. The avocado halves
We're pretty sure it would take less time to peel, cut and de-pit real avocados than it would to open these overpackaged alternatives. It would also be much less environmentally damaging.
11. Bananas packaged again! Now in a plastic box
Well, at least this time they put a few in a pack.
12. The scissors that need scissors
How do you get to your scissors without scissors? Now that is a dilemma!
13. Sliced and separated
We have all heard of sliced bread but did you know the slices can be further individually wrapped? Unfortunately, they can.
14. The lonely garlic bulb
Maybe it is a purse carry-on?
15. The Double Trouble
What do you pack packaging in? Well in more packaging of course.
16. The peel replacement
The poster said it best.
17. The solo orange packaging
Well, at least this time they kept the peels!
We had some fun pointing out these mostly environmentally faulty packaging alternatives but in the end, we know how hard innovation can be. As such, we give kudos to these manufacturers for doing their best at coming up with new ideas. May we suggest thinking more sustainably in the future?


CaptionSS Examples
Default embedded image caption
embed (bottom) (static) (normal) (neutral)
Default embedded image caption at top
embed-top (static) (normal) (neutral)
All three themes (neutral,light,dark) with embedded defaults.
All four font sizes (normal, medium, large, xlarge) with embedded defaults.
Default overlay and overlay with smooth reveal
overlay (reveal/reveal-smooth) (normal) (neutral)
Default overlay and overlay with smooth reveal
embed-over (reveal/reveal-smooth) (normal) (neutral)
Bottom/Top embedded image caption that hides on hover
embed/embed-top (hide) (normal) (neutral)
Bottom/Top embedded image caption that hides smoothly on hover
embed/embed-top (hide-smooth) (normal) (neutral)
Bottom/Top embedded image caption that reveals on hover
embed/embed-top (reveal) (normal) (neutral)
Bottom/Top embedded image caption that reveals smoothly on hover
embed/embed-top (reveal-smooth) (normal) (neutral)


{% if assigned|length > 0 %} Currently Training
{{ model_type }}
Models {% else %} Not Currently Training {% endif %}
{{ completed_percentage }}% complete
{{ completed }}
of
{{ total }}
routes finished
{{ assigned|length }}
clients currently connected
{% if assigned|length > 0 %}
Route ID
Host ID
{% endif %} {% for route_id, host_id in assigned.items() %}
{{ host_id|e }}
{{ route_id|e }}
{% endfor %}


Bitcoin users may want to trade bitcoin directly with each other in what is known as an over-the-counter market.
With over-the-counter transactions, there is risk of losing money due to people not
fulfilling their part of the deal.
Decentralised/social exchanges
Aervices that allow you to find friends of friends that trade crypto currency, and trade with them directly.


Everything you missed from the Doctor Who series 12 trailer
The trailer for the twelfth season of Doctor Who has just dropped – promising to take viewers through a whole new journey in time and space.
It was an action-packed trailer, and of course there’s a lot more to unpack. From returning monsters you might recognise, to those you don’t and the hints that the legendary story arc has made a return after a brief absence in series 11.
Join us now as we dissect the trailer and analyse all the little tidbits you may have missed on your few (hundred) watches.
‘The name’s Doctor… THE Doctor.’
If it wasn’t already great seeing Jodie Whittaker in a suit, fans got a lovely – and surprising! – homage to James Bond.
Appearing in a (very fitting we must say) suit and bow tie, the Doctor introduced herself by way of 007’s most famous catchphrase.
Advertisement Advertisement
Does this mean we’re going to get a spy caper in a new episode? We sure hope so!
Was that… a Racnoss?
We got a few glimpses of several aliens that are going to be featured in the new set of episodes, but one caught our eye immediately.
In a very close-up shot we get a good look at a fanged, spiky black alien that looks like it may cause trouble for the TARDIS team.
For the long-standing Whovians amongst us, the creature looked remarkably similar to the Racnoss Empress, a giant red spider alien that battled the Doctor in The Runaway Bride Christmas special.
We don’t see the full body of the alien, which is important since the Racnoss stand on massive eight arachnid legs, so it would have blown the reveal. A very left-field choice of Who alien to bring back, but we’re excited nonetheless!
Stephen Fry as the Prime Minister? Sir Lenny Henry carrying a gun?!
Stephen Fry and Sir Lenny Henry were recently announced to be joining the cast of the long-running sci-fi show in guest stints, and it looks like one will be a help and the other a hindrance to The Doctor and her friends.
In the trailer, Fry practically begs the Doctor to help the country out, which leads us to believe he is probably some kind of government official – if not the Prime Minister himself.
Sir Lenny Henry, however, cuts an entirely different figure, poking his head out of a car and brandishing a gun. His suit-and-tie attire leads us to believe he may pop up in the same 007-referencing episode, imagine him as a Bond villain!
Advertisement Advertisement
The return of the Cybermen
The Cybermen are one of The Doctor’s most iconic foes, although they haven’t yet been seen in Whittaker’s stint in the TARDIS.
Humanoids from Earth’s ‘sister-planet’ who replaced their body parts with machinery, they’re on a mission to upgrade the entire universe, but haven’t been seen since they faced off with Peter Capaldi in his last series
We only get the tiniest glimpses at the iconic tin men, but it’s safe to say the baddies look a bit aged and rusted but are slowly coming back to life…
The Judoon are back!
Mo! Fo! Clo! Do!
The Judoon are one of the oddest creations from New Who – rhinoceros-headed space police who have met the Doctor on several journeys, first debuting in the first episode of the third series (where they teleported a hospital to the moon).
We see them make their grand return in the new clip, but it’s never settled whether the Doctor will be helped by the Judoon… or if she’s turned into a fugitive.
‘Something is coming for me’
It’s only towards the end of the trailer that we get a sense that there’s a larger story brewing in the background of the twelfth season.
We see the Doctor in some kind of control room (could it be in the TARDIS?) where she admits to her companions Yaz (Mandip Gill). Ryan (Tosin Cole) and Graham (Bradley Walsh) that ‘something is coming for me.’
Advertisement
The only question is… what is it? Or who is it? Lord knows the Doctor has made her fair share of enemies over the years but this seems a lot more… personal somehow. The Doctor’s own people, the Time Lords, have a fracturous relationship with the favourite child of Gallifrey, and haven’t been seen since series 9, could they be making a reappearance?
All hail the return of the story arc!
With all this in mind, we think it’s pretty clear that the trailer is hinting at a bigger story emerging throughout series 12 and we couldn’t be more excited.
One of the defining features of New Who (and why, we think, it became so popular) were it’s season-long story arcs that set the tone for each run and ended with The Doctor facing the Big Bad for each successive season in an epic finale. Think Bad Wolf in series 1, Torchwood in series 2 and Mr Saxon in series 3.
As time went on, however, the arcs got longer and more complicated, you could practically count Matt Smith’s entire three-series run as one big storyline in itself, and as a reaction against fan confusion, new showrunner Chris Chibnall ensured that series 11 was far more episodic.
But we can’t help but think the seeds for a bigger story were planted in Whittaker’s first series, too. We’re taking ourselves back to the second episode of that installment, where The Doctor reacts rather virulent to a mention of ‘the Timeless Child.’
Advertisement
Who is this child, why is it timeless exactly and what does it mean for the Doctor? Something tells us we’re about to find out…
Doctor Who returns in early 2020 on BBC One.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


This section aims to describe how to turn your d3.js chart interactive. It describe how to add tooltips, animations, hover effects, zoom feature and more.
D3.js allows to easily add a tooltip to any element of your chart. The idea is always the same: triggering a function when the user mouseover
, mousemove
or mouseleave
the element. See the 3 examples below showing how to apply this technique to a single circle, how to custom the tooltip content, and how to apply it to data.
A post on the basic of brushing with d3.js. It starts by very basic use of the d3.brush()
function: just initializing the functionality. Then, it explains how to trigger a function to perform a change on the selected points. Lastly, it describes how to smoothly zoom on the selected area.
A post on buttons: what are the different types, how to add them using html, and how to connect them with the chart to trigger transition and animation.
A post on the basic of zooming with d3.js. It starts with a very basic use of the d3.zoom()
function: just applied on a single circle. Then, it explains how to trigger a function that update axis. Lastly, it shows that brushing can be used for zooming as well.
Transition is where the magick of D3 takes place. Here you will find a few examples based on a single element to understand the basic mechanism. A few examples based on a real chart are then available to illustrate the process.


Epic foot-long battered pigs in blankets to go on sale at Nottingham chippy
Giant Yorkshire puddings will also be available
by Lynette PinchessForget the lights switch-on and Santa arriving at his grotto - the real countdown to Christmas will begin later this month when a Nottingham chippy once again launches its Yuletide special... foot-long battered pigs in blankets.
The epic takeaway has become a festive tradition at Bestwood Fisheries, a fish and chip shop in Arnold Road, Bestwood.
It will be the third year battered bangers wrapped in bacon have gone on sale - and the second for the super-size 1ft sausage.
Co-owner Antoni Tsiolas, who mans the fryers with his cousin George Keliris, said: "They were really popular last year. We must have sold 1,300 in the one month we did them.
"People have been asking all year round for them but over the past few weeks it's been more and more. It's like they know the time is near."
The large sausages are wrapped in three rashers of smoked bacon, then dipped in batter and deep-fried for ten minutes.
They will go on sale on Sunday, November 24.
The chip shop doesn't usually trade on Sundays but will be opening specially for the next four weeks to sell the colossal Crimbo banger which is so big that the ends stick out of the polystyrene tray.
Customers can have a six-inch pig for £2 or a foot-long one for £2.90. With chips and any sauce it's £4.20 or £5.

But it won't be going down the route of a famous London chippy, Poppie's Fish and Chips which is serving deep-fried battered Quality Street chocolates. "That doesn't sound good for the fryers," said: Antonio.
Another chippy, The Cod's Scallops - which has branches in Bramcote Lane, Wollaton, Mansfield Road, Carrington and Tamworth Road, Long Eaton - will be offering two Christmas specials.
Battered pigs in blankets and battered Brussels sprouts will be available from November 24 to December 24.


Skoda Kamiq GT coupe SUV revealed in China
by Team ODSkoda Auto's China arm has revealed the coupe-SUV version of the Skoda Kamiq compact SUV. Unlike the European Kamiq which sits on the VW' Group's latest MQB-A0 platform, the Chinese standard Kamiq is built on an older structure and has a much simpler design.
With the Kamiq GT though, the firm has taken design cues from the European car, although the basic structure remains unchanged. So you get elements like the bigger Skoda grille, the tapering headlamps and the more aggressive bodywork. The Kamiq GT is 19mm longer than the standard car and comes with a higher rear deck, a window line that kinks higher and more slope to its roof-line. The interiors though, are reminiscent of what you would find in older Skodas in India, like the rapid. You have the same organic yet clinical layout we've seen in those cars.
No details are available on the engine options that will power the Kamiq GT but it is expected it will continue with the standard Kamiq's powertrains. These are naturally-aspirated 1.5-litre four-cylinder unit making 110PS and 145Nm, paired with a six-speed automatic. The other engine option is a 1.2-litre turbo-four-cylinder that puts out 117PS and 200Nm which comes with a seven-speed DCT.
It is unlikely that the Kamiq GT will be sold anywhere other than China. The firm also sells a coupe-ish version of the Kodiaq, called the Kodaiq GT.


Boracay resort welcomes new VIP guest
by Manila Standard LifestyleThousands of guest, from celebrities to world-famous athletes, have enjoyed the idyllic secluded beach, upscale facilities, and sophisticated amenities of Mövenpick Resort and Spa Boracay.
Discerning guests do know the best place to stay on the island paradise in Aklan.
But one particularly very important guest was spotted at Mövenpick, specifically on the beachfront. It was an Olive Ridley Turtle, which on Nov. 5 was seen nesting with approximately 106 eggs.
As with all guests of the resort, general manager Andre Brulhart is leading the team in making sure the VIP guest and its eggs are well taken care of. In coordination with municipal marine biologist Haron Deo Vargas, necessary procedures have been undertaken to ensure the security of the fragile eggs, including the building of a fence to protect the nest.
“We are very delighted and we are filled with excitement as we anticipate the hatching of the eggs. We see this as a sign of environmental sustainability and a sign of hope. Mövenpick Resort and Spa Boracay is deeply committed to the environment in as much as we are committed to our guests,” enthused Brulhart.
Vargas revealed it was the first time he has encountered an Olive Ridley Turtle in the island’s reefs. The most common, he said, were Hawksbill and Green Sea Turtles, and sometimes Leatherback Turtle.
“We have four species of sea turtles in our municipal waters, out of five species that can be found in the Philippines,” he shared.
Olive Ridley Turtle is the most abundant sea turtle species in the world and is known for its mass nesting. It is also one of the smallest sea turtle species at only 2- to 2.5-feet (0.6 to 0.7 meters) long and 80 to 110 pounds (36 to 50 kg.). They are named after the olive coloration of their heart-shaped shells.
Vargas said the eggs will hatch anytime from 45 to 75 days. He also added that the resort can expect more. “That is just one clutch. A nester can have up to seven clutches, and it takes a week or more for a female Olive Ridley Turtle to nest.”
Mövenpick Resort and Spa Boracay security, meantime, is placed on alert for the return of the mother turtle. It is also updating the community through its social media accounts.


Find your Niche
this December 18-19, 2020
Participate in Nibble 2020, a two-day workshop dedicated to teaching people about startups and the skills necessary to establish one through talks by experienced entrepreneurs and professionals!
Day 1
December 18
Joni Salang-oy
Alumni Program Manager at IdeaSpace
About the Workshop
Take a dip into her personal journey as a startup founder and her experiences in IdeaSpace. She will also be sharing her insights about knowing how to spot trends and what investors look for in a startup.
Frances To
UX Designer at First Circle
About the Workshop
Dive into relevance of UX for workplaces, the significance of building products, and why one should consider UX as their career choice. She will also walk us through the possible tracks of people who pursue UX.
Day 2
December 19
Albert Yumol
Machine Learning Engineer and Data Solutions Practitioner
About the Workshop
Introducing Why IT Matters in Building Startups, a crash course on coding for beginners and the different coding languages depending on the product one wants to build.
Richard Cruz
Associate Professor at the Asian Institute of Management
The Talk
In what it takes to be a startup, Richard will share his wisdom about the interdependence of the 3Hs in a company and how one can collaborate with others successfully despite having different skill sets.
Munchies
Joining our event comes with complimentary, bite-sized courses on the different fields under each H!


Pokédex
Search. Learn. Play.
Search for a Pokémon:
Learn about a random Pokémon!
Play "Who's that Pokémon?"