{% extends "pretixcontrol/item/base.html" %} {% load i18n %} {% load bootstrap3 %} {% load formset_tags %} {% block inside %}
{% blocktrans trimmed %} In this area, you can choose of a set of "restriction types" to restrict the availability of your product with certain conditions. {% endblocktrans %}
{% endblock %}


Brooklyn Beckham seals his new romance with a steamy kiss
She's his fourth love interest since the summer…
by Nancy BrownBrooklyn Beckham's got a new love interest and he doesn't care who knows it.
Ex-girlfriend Hana Cross should look away now as Brooklyn has been snapped getting steamy with rumoured new girlfriend Nicola Peltz.
Brooklyn split from model Hana over the summer and actress Nicola is the fourth woman he's been linked to since the break-up.
He is also rumoured to have had a fling with Kate Moss's half-sister Lottie and has been spotted with Phoebe Torrance – the daughter of golfer Sam Torrance – and actress Natalie Ganzhorn.
Read more: New unseen photo sees the Duchess of Sussex laughing with her pals
Brooklyn and Nicola have been spotted out in Los Angeles a few times in the past couple of weeks, but a new Instagram picture appears to officially "confirm his rumoured romance" with her.
The picture, taken at a Halloween party, shows Brooklyn with his arms wrapped around Nicola while planting a kiss on her cheek.
It's the first time the pair have shared a PDA.
Nicola – who is perhaps best known for Marvel show Inhumans – has even introduced Brooklyn to her brother, actor Will Peltz.
Read more: John Lewis leaves fans in tears as it releases its new Christmas advert
A source told The Sun: "Brooklyn has already met her family and he gets on well with her brother, they even partied together."
It's unclear if Brooklyn has taken Nicola home to meet his mum and dad, though.
David and Victoria are said to be worried about their eldest son's Lothario reputation.
A source told The Sun: "They've spoken to him about his behaviour and warned him he can’t get away with certain things now he's in the public eye."
ED! has contacted the family's rep for comment.
Head to our Facebook page @EntertainmentDailyFix and let us know what you think of our story.


Using our unique Pied Piper algorithm, we are able to compress files down to more than 75% of its original size.
Pied Piper is very user friendly. It is easy to find icons and there is always a help button at the top of the page if you need it.
Faster downloads mean more time to spend with friends and family while accessing your data. Nobody should have to spend more time waiting for a movie to download than watching it!
Richard Hendricks was born March 10th, 1982 in West Covina, California. He developed a liking for computers in grade 5. On April 16th, 2014, He perfected the algorithm that is used today in Pied Piper. This algorithm allows people around the world to share and compress their files without any hassle or any extra charges, Making our lives easier. Thanks Richard!


Getting Help#
Sage has extensive built-in documentation, accessible by typing the name of a function or a constant (for example), followed by a question mark:
sage: tan?
Type: <class 'sage.calculus.calculus.Function_tan'>
Definition: tan( [noargspec] )
Docstring:
The tangent function
EXAMPLES:
sage: tan(pi)
0
sage: tan(3.1415)
-0.0000926535900581913
sage: tan(3.1415/4)
0.999953674278156
sage: tan(pi/4)
1
sage: tan(1/2)
tan(1/2)
sage: RR(tan(1/2))
0.546302489843790
sage: log2?
Type: <class 'sage.functions.constants.Log2'>
Definition: log2( [noargspec] )
Docstring:
The natural logarithm of the real number 2.
EXAMPLES:
sage: log2
log2
sage: float(log2)
0.69314718055994529
sage: RR(log2)
0.693147180559945
sage: R = RealField(200); R
Real Field with 200 bits of precision
sage: R(log2)
0.69314718055994530941723212145817656807550013436025525412068
sage: l = (1-log2)/(1+log2); l
(1 - log(2))/(log(2) + 1)
sage: R(l)
0.18123221829928249948761381864650311423330609774776013488056
sage: maxima(log2)
log(2)
sage: maxima(log2).float()
.6931471805599453
sage: gp(log2)
0.6931471805599453094172321215 # 32-bit
0.69314718055994530941723212145817656807 # 64-bit
sage: sudoku?
File: sage/local/lib/python2.5/site-packages/sage/games/sudoku.py
Type: <... 'function'>
Definition: sudoku(A)
Docstring:
Solve the 9x9 Sudoku puzzle defined by the matrix A.
EXAMPLE:
sage: A = matrix(ZZ,9,[5,0,0, 0,8,0, 0,4,9, 0,0,0, 5,0,0,
0,3,0, 0,6,7, 3,0,0, 0,0,1, 1,5,0, 0,0,0, 0,0,0, 0,0,0, 2,0,8, 0,0,0,
0,0,0, 0,0,0, 0,1,8, 7,0,0, 0,0,4, 1,5,0, 0,3,0, 0,0,2,
0,0,0, 4,9,0, 0,5,0, 0,0,3])
sage: A
[5 0 0 0 8 0 0 4 9]
[0 0 0 5 0 0 0 3 0]
[0 6 7 3 0 0 0 0 1]
[1 5 0 0 0 0 0 0 0]
[0 0 0 2 0 8 0 0 0]
[0 0 0 0 0 0 0 1 8]
[7 0 0 0 0 4 1 5 0]
[0 3 0 0 0 2 0 0 0]
[4 9 0 0 5 0 0 0 3]
sage: sudoku(A)
[5 1 3 6 8 7 2 4 9]
[8 4 9 5 2 1 6 3 7]
[2 6 7 3 4 9 5 8 1]
[1 5 8 4 6 3 9 7 2]
[9 7 4 2 1 8 3 6 5]
[3 2 6 7 9 5 4 1 8]
[7 8 2 9 3 4 1 5 6]
[6 3 5 1 7 2 8 9 4]
[4 9 1 8 5 6 7 2 3]
Sage also provides ‘Tab completion’: type the first few letters of a
function and then hit the Tab key. For example, if you type
ta
followed by Tab, Sage will print tachyon, tan, tanh,
taylor
. This provides a good way to find the names of functions and
other structures in Sage.
Functions, Indentation, and Counting#
To define a new function in Sage, use the def
command and a colon
after the list of variable names. For example:
sage: def is_even(n):
....: return n%2 == 0
sage: is_even(2)
True
sage: is_even(3)
False
Note: Depending on which version of the tutorial you are viewing, you
may see three dots ....:
on the second line of this example. Do
not type them; they are just to emphasize that the code is indented.
Whenever this is the case, press [Return/Enter] once at the end of the block to
insert a blank line and conclude the function definition.
You do not specify the types of any of the input arguments. You can
specify multiple inputs, each of which may have an optional default
value. For example, the function below defaults to divisor=2
if
divisor
is not specified.
sage: def is_divisible_by(number, divisor=2):
....: return number%divisor == 0
sage: is_divisible_by(6,2)
True
sage: is_divisible_by(6)
True
sage: is_divisible_by(6, 5)
False
You can also explicitly specify one or either of the inputs when calling the function; if you specify the inputs explicitly, you can give them in any order:
sage: is_divisible_by(6, divisor=5)
False
sage: is_divisible_by(divisor=2, number=6)
True
In Python, blocks of code are not indicated by curly braces or
begin and end blocks as in many other languages. Instead, blocks of
code are indicated by indentation, which must match up exactly. For
example, the following is a syntax error because the return
statement is not indented the same amount as the other lines above
it.
sage: def even(n):
....: v = []
....: for i in range(3,n):
....: if i % 2 == 0:
....: v.append(i)
....: return v
Syntax Error:
return v
If you fix the indentation, the function works:
sage: def even(n):
....: v = []
....: for i in range(3,n):
....: if i % 2 == 0:
....: v.append(i)
....: return v
sage: even(10)
[4, 6, 8]
Semicolons are not needed at the ends of lines; a line is in most cases ended by a newline. However, you can put multiple statements on one line, separated by semicolons:
sage: a = 5; b = a + 3; c = b^2; c
64
If you would like a single line of code to span multiple lines, use a terminating backslash:
sage: 2 + \
....: 3
5
In Sage, you count by iterating over a range of integers. For example,
the first line below is exactly like for(i=0; i<3; i++)
in C++ or
Java:
sage: for i in range(3):
....: print(i)
0
1
2
The first line below is like for(i=2;i<5;i++)
.
sage: for i in range(2,5):
....: print(i)
2
3
4
The third argument controls the step, so the following is like
for(i=1;i<6;i+=2)
.
sage: for i in range(1,6,2):
....: print(i)
1
3
5
Often you will want to create a nice table to display numbers you have computed using Sage. One easy way to do this is to use string formatting. Below, we create three columns each of width exactly 6 and make a table of squares and cubes.
sage: for i in range(5):
....: print('%6s %6s %6s' % (i, i^2, i^3))
0 0 0
1 1 1
2 4 8
3 9 27
4 16 64
The most basic data structure in Sage is the list, which is – as
the name suggests – just a list of arbitrary objects. For example,
using range
, the following command creates a list:
sage: list(range(2,10))
[2, 3, 4, 5, 6, 7, 8, 9]
Here is a more complicated list:
sage: v = [1, "hello", 2/3, sin(x^3)]
sage: v
[1, 'hello', 2/3, sin(x^3)]
List indexing is 0-based, as in many programming languages.
sage: v[0]
1
sage: v[3]
sin(x^3)
Use len(v)
to get the length of v
, use v.append(obj)
to
append a new object to the end of v
, and use del v[i]
to delete
the \(i^{th}\) entry of v
:
sage: len(v)
4
sage: v.append(1.5)
sage: v
[1, 'hello', 2/3, sin(x^3), 1.50000000000000]
sage: del v[1]
sage: v
[1, 2/3, sin(x^3), 1.50000000000000]
Another important data structure is the dictionary (or associative array). This works like a list, except that it can be indexed with almost any object (the indices must be immutable):
sage: d = {'hi':-2, 3/8:pi, e:pi}
sage: d['hi']
-2
sage: d[e]
pi
You can also define new data types using classes. Encapsulating
mathematical objects with classes is a powerful technique that can
help to simplify and organize your Sage programs. Below, we define a
class that represents the list of even positive integers up to n;
it derives from the builtin type list
.
sage: class Evens(list):
....: def __init__(self, n):
....: self.n = n
....: list.__init__(self, range(2, n+1, 2))
....: def __repr__(self):
....: return "Even positive numbers up to n."
The __init__
method is called to initialize the object when
it is created; the __repr__
method prints the object out. We
call the list constructor method in the second line of the
__init__
method. We create an object of class Evens
as
follows:
sage: e = Evens(10)
sage: e
Even positive numbers up to n.
Note that e
prints using the __repr__
method that we
defined. To see the underlying list of numbers, use the list
function:
sage: list(e)
[2, 4, 6, 8, 10]
We can also access the n
attribute or treat e
like a list.
sage: e.n
10
sage: e[2]
6


[[localize('featured-people-title')]]
[[person.name]]
[[person.country]]
[[localize('featured-people-view-all')]]


Discover China 🇨🇳
你好! (Nǐ hǎo!)
China (中国), officially the People's Republic of China, is a country in East Asia.
| Capital | Beijing (北京市) |
| Area | 9,596,961 km2 |
| Population | 1,400,050,000 |
| Currency | Renminbi (yuan; ¥; CNY) |
| Time zone | UTC+8 (China Standard Time) |
Demographics of China
The Han (汉) people are the largest ethnic group in mainland China (~1.2 billion; 91.51% of the population). Besides the Han Chinese majority, 55 other ethnic (minority) groups are categorized in present China, numbering approximately 105 million people (8%), mostly concentrated in the bordering northwest, north, northeast, south and southwest but with some in central interior areas.
Some cool facts about China:
- The Chinese New Year celebration lasts for 15 days.
- China’s railway lines are so extensive and long that they could loop around Earth twice.
- 2,200 years ago, the game that later turned into football (soccer) was invented in China.
Learn more about some provinces of China:
For further information please visit China's wikipedia page


We managed to create the minefield and fill it with clues: now it's time to play! Let's give our player the opportunity to guess where the mines are with the help of our hints.
All the numbers are still shown to the player, but now the mines are not. To win, the player must find all the mines on the field by marking them.
Update the field input and add the coordinate grid like in the examples so that the player can mark cells by entering their coordinates.
Your upgraded program should meet the following requirements:
After initializing the field, all the numbers are shown to the player, but not the positions of the mines.
The player sees the message “Set/delete mine marks (x and y coordinates):
” and enters two numbers as coordinates on the field.
The user input is treated according to the rules:
If the player enters the coordinates of a non-marked cell, the program marks the cell, which means that the player thinks a mine is located there.
If the player enters the coordinates of a cell with a number, the program should print the message “There is a number here!
” and ask the player again without printing the minefield, since cells with numbers are guaranteed to be free of mines.
If the player enters the coordinates of a marked cell, the cell becomes unmarked. This is necessary because the game ends only if all the marks are correct, but the player can mark more cells than there are mines.
After successfully marking or unmarking a cell, the new minefield state is printed. The symbol .
is used to represent non-marked cells, and *
is for marked ones. The prompt for the player's next move is printed until the game is finished.
When the player marks all the mines correctly without marking any empty cells, they win and the game ends. If the player has marked extra cells that do not contain mines, they continue playing. After clearing all the excess mine marks, the player wins. Print the message “Congratulations! You found all the mines!
” after the final field state.
The greater-than symbol followed by a space (>
) represents the user input. Note that it's not part of the input.
Example 1: the user enters the coordinates of a cell that contains a number
How many mines do you want on the field? > 5
│123456789│
—│—————————│
1│.111.....│
2│.1.1.....│
3│.1221....│
4│..1.1....│
5│.1221....│
6│.1.21....│
7│.12.1....│
8│..1221...│
9│...1.1...│
—│—————————│
Set/delete mines marks (x and y coordinates): > 2 1
There is a number here!
Set/delete mines marks (x and y coordinates): > 3 2
│123456789│
—│—————————│
1│.111.....│
2│.1*1.....│
3│.1221....│
4│..1.1....│
5│.1221....│
6│.1.21....│
7│.12.1....│
8│..1221...│
9│...1.1...│
—│—————————│
Set/delete mines marks (x and y coordinates): > 4 4
│123456789│
—│—————————│
1│.111.....│
2│.1*1.....│
3│.1221....│
4│..1*1....│
5│.1221....│
6│.1.21....│
7│.12.1....│
8│..1221...│
9│...1.1...│
—│—————————│
Set/delete mines marks (x and y coordinates): > 3 6
│123456789│
—│—————————│
1│.111.....│
2│.1*1.....│
3│.1221....│
4│..1*1....│
5│.1221....│
6│.1*21....│
7│.12.1....│
8│..1221...│
9│...1.1...│
—│—————————│
Set/delete mines marks (x and y coordinates): > 4 7
│123456789│
—│—————————│
1│.111.....│
2│.1*1.....│
3│.1221....│
4│..1*1....│
5│.1221....│
6│.1*21....│
7│.12*1....│
8│..1221...│
9│...1.1...│
—│—————————│
Set/delete mines marks (x and y coordinates): > 5 9
│123456789│
—│—————————│
1│.111.....│
2│.1*1.....│
3│.1221....│
4│..1*1....│
5│.1221....│
6│.1*21....│
7│.12*1....│
8│..1221...│
9│...1*1...│
—│—————————│
Congratulations! You found all the mines!
Example 2: the user wins after removing excessive mine marks
How many mines do you want on the field? 1
│123456789│
—│—————————│
1│.........│
2│.........│
3│.........│
4│....111..│
5│....1.1..│
6│....111..│
7│.........│
8│.........│
9│.........│
—│—————————│
Set/delete mines marks (x and y coordinates): 1 1
│123456789│
—│—————————│
1│*........│
2│.........│
3│.........│
4│....111..│
5│....1.1..│
6│....111..│
7│.........│
8│.........│
9│.........│
—│—————————│
Set/delete mines marks (x and y coordinates): 6 5
│123456789│
—│—————————│
1│*........│
2│.........│
3│.........│
4│....111..│
5│....1*1..│
6│....111..│
7│.........│
8│.........│
9│.........│
—│—————————│
Set/delete mines marks (x and y coordinates): 1 1
│123456789│
—│—————————│
1│.........│
2│.........│
3│.........│
4│....111..│
5│....1*1..│
6│....111..│
7│.........│
8│.........│
9│.........│
—│—————————│
Congratulations! You found all mines!


| GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
| Line | Branch | Exec | Source |
1 |
/** |
||
2 |
* @file multiprocesses_time_series.hpp |
||
3 |
* @author Vincent Berenz |
||
4 |
* license License BSD-3-Clause |
||
5 |
* @copyright Copyright (c) 2019, Max Planck Gesellschaft. |
||
6 |
*/ |
||
7 |
|||
8 |
#pragma once |
||
9 |
|||
10 |
// virtual class specifying all functions |
||
11 |
// a time_series class should implement |
||
12 |
// Defines also Index and Timestamp |
||
13 |
#include "time_series/interface.hpp" |
||
14 |
|||
15 |
// all common code to TimeSeries and |
||
16 |
// multiprocesses TimeSeries |
||
17 |
#include "time_series/internal/base.hpp" |
||
18 |
|||
19 |
// Mutex, ConditionVariable, Lock and Vector |
||
20 |
// use different implementation for TimeSeries and |
||
21 |
// MultiprocessTimeSeries. Those are defined there. |
||
22 |
#include "time_series/internal/specialized_classes.hpp" |
||
23 |
|||
24 |
namespace time_series |
||
25 |
{ |
||
26 |
// various shared memory segments are created based on the |
||
27 |
// segment_id provided by the user. Here are the corresponding |
||
28 |
// suffixes |
||
29 |
namespace internal |
||
30 |
{ |
||
31 |
✓✗ | 6 |
static const std::string shm_indexes("_indexes"); |
32 |
✓✗ | 6 |
static const std::string shm_elements("_elements"); |
33 |
✓✗ | 6 |
static const std::string shm_timestamps("_timestamps"); |
34 |
✓✗ | 6 |
static const std::string shm_mutex("_mutex"); |
35 |
✓✗ | 6 |
static const std::string shm_condition_variable("_condition_variable"); |
36 |
} |
||
37 |
|||
38 |
/** |
||
39 |
* Multiprocess Time Series. Several instances hosted |
||
40 |
* by different processes, if pointing |
||
41 |
* to the same shared memory segment (as specified by the segment_id), |
||
42 |
* may read/write from the same underlying time series. |
||
43 |
*/ |
||
44 |
template <typename T = int> |
||
45 |
10 |
class MultiprocessTimeSeries |
|
46 |
: public internal::TimeSeriesBase<internal::MultiProcesses, T> |
||
47 |
{ |
||
48 |
public: |
||
49 |
/** |
||
50 |
* @brief create a new instance pointing to the specified shared |
||
51 |
* memory segment |
||
52 |
* @param segment_id the id of the segment to point to |
||
53 |
* @param max_length max number of elements in the time series |
||
54 |
* @param leader if true, the shared memory segment will initialize |
||
55 |
* the shared time series, and wiped the related shared memory on destruction. |
||
56 |
* Instantiating a first MultiprocessTimeSeries with leader set to false |
||
57 |
* will result in undefined behavior. When the leader instance is destroyed, |
||
58 |
* other instances are pointing to the shared segment may crash or hang. |
||
59 |
*/ |
||
60 |
24 |
MultiprocessTimeSeries(std::string segment_id, |
|
61 |
size_t max_length, |
||
62 |
bool leader = true, |
||
63 |
Index start_timeindex = 0) |
||
64 |
: internal::TimeSeriesBase<internal::MultiProcesses, T>( |
||
65 |
start_timeindex), |
||
66 |
indexes_(segment_id + internal::shm_indexes, |
||
67 |
4, |
||
68 |
leader, |
||
69 |
✓✗✓✗ ✓✗✓✗ |
24 |
false) |
70 |
{ |
||
71 |
✓✗✓✗ ✓✗✓✗ |
24 |
this->mutex_ptr_ = |
72 |
std::make_shared<internal::Mutex<internal::MultiProcesses> >( |
||
73 |
segment_id + internal::shm_mutex, leader); |
||
74 |
✓✗✓✗ ✓✗✓✗ |
24 |
this->condition_ptr_ = std::make_shared< |
75 |
internal::ConditionVariable<internal::MultiProcesses> >( |
||
76 |
segment_id + internal::shm_condition_variable, |
||
77 |
leader); |
||
78 |
✓✗✓✗ ✓✗✓✗ |
24 |
this->history_elements_ptr_ = |
79 |
std::make_shared<internal::Vector<internal::MultiProcesses, T> >( |
||
80 |
max_length, |
||
81 |
segment_id + internal::shm_elements, |
||
82 |
leader); |
||
83 |
✓✗✓✗ ✓✗✓✗ |
24 |
this->history_timestamps_ptr_ = std::make_shared< |
84 |
internal::Vector<internal::MultiProcesses, Timestamp> >( |
||
85 |
max_length, |
||
86 |
segment_id + internal::shm_timestamps, |
||
87 |
leader); |
||
88 |
✓✓✓✓ |
24 |
if (leader) |
89 |
{ |
||
90 |
✓✗✓✗ |
7 |
write_indexes(); |
91 |
} |
||
92 |
24 |
} |
|
93 |
|||
94 |
protected: |
||
95 |
10883 |
void read_indexes() |
|
96 |
{ |
||
97 |
10883 |
indexes_.get(0, this->start_timeindex_); |
|
98 |
10883 |
indexes_.get(1, this->oldest_timeindex_); |
|
99 |
10883 |
indexes_.get(2, this->newest_timeindex_); |
|
100 |
10883 |
indexes_.get(3, this->tagged_timeindex_); |
|
101 |
10883 |
} |
|
102 |
|||
103 |
1326 |
void write_indexes() |
|
104 |
{ |
||
105 |
1326 |
indexes_.set(0, this->start_timeindex_); |
|
106 |
1326 |
indexes_.set(1, this->oldest_timeindex_); |
|
107 |
1326 |
indexes_.set(2, this->newest_timeindex_); |
|
108 |
1326 |
indexes_.set(3, this->tagged_timeindex_); |
|
109 |
1326 |
} |
|
110 |
|||
111 |
shared_memory::array<Index> indexes_; |
||
112 |
}; |
||
113 |
|||
114 |
/** |
||
115 |
* Wipe out the corresponding shared memory. |
||
116 |
* Useful if no instances of MultiprocessTimeSeries cleared |
||
117 |
* the memory on destruction. |
||
118 |
* Reusing the segment id of a non-wiped shared memory may result |
||
119 |
* in the newly created instance to hang. |
||
120 |
*/ |
||
121 |
void clear_memory(std::string segment_id); |
||
122 |
} |
| Generated by: GCOVR (Version 4.2) |


It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.
Buy Now ($99.00)7 Days easy replacement policy on All products
We support Debit & Credit Cards, Wallet, Paypal
Free shipping worldwide on order above $150


There are three types of buttons: submit button, reset button, and standard button. The Submit button is activated when a user presses the Enter key while the focus is on another control in the same form that isn't a button, like a text field.
Clicking the reset button returns a field to its default state. In this example, it returns the field to its original text content.
The standard button can be set to call a JavaScript function. In this example, the button calls a simple arithmatic function.


View Highscore
W3 Schools
Time :
0
Hartford Insurance Coding Quiz Challenge
Try to answer the following code-related questions within the time limit. Keep in mind that incorrect answers will penalize your score/time by ten seconds!
Questions
Start Quiz
Next


Freenode IRC ##49whales
Player1 insert satoshi: 1BtXe2sp21sSZBRTBHnSKZEQU1HRNwGD1A (enable donation mode) Now OpenSource on github! Please help us improve BTC Whale Watch by running your own server and contributing! (click here for details)
Q: What is this?!
A: Btc Whale Watch is a Clustersense project. Clustersense is all about providing APIs and displaying data in real-time using websocket technology.
Q: What is whales.clustersense.com displaying?
A: The status display renders data that we flag as interesting. Currently displaying:
Q: What am I watching for?
A: By watching the whales and determining the patterns in their trading we hope to glean valuable real-time trading information.
Q: Why does it take so fraking long to load?
A: Because it is event based and you must wait for the next event. Think of this as the refresh-rate of the site. Staying connected is easy thanks to a re-connecting websocket cross-browser plugin. You will receive the events in real-time by simply keeping your browser tab open. The site sends websocket data when something changes and every 5 seconds. On a busy day this is quick. On a slow day this is slow.
Q: Can we get some better data and cooler looking displays?
A: Sure! If you have feedback or ideas come talk them over on IRC @freenode.net #btcwhalewatch
05/17/2013: Player count added. Display of Btc Whale Watch connected players.
05/16/2013: Audio alert changed. Alert now triggers on whale action >=375 BTC on the 15 minute.
05/15/2013: Fake walls added. Calculated by volume and price match being added and removed more than 2x.


| Test Case | PERF-0020 |
| Title | Pulse width resolution is 1 microsecond |
| Objective | This test case is intended to verify the following implied or specified requirements:
This test case verifies that the user has the ability to adjust the pulse width with 1 microsecond precision. |
| Setup |
|
| Actions |
|
| Expected | Pulse widths of the servo commands will range from 1500 to 1509 with resolution of 1 usec. |
| Results | PASSED |
| Cleanup |
|
| Requirements | SERVO-PERF-020 |


{% extends "shared/layout.html" %} {% block content %}
Typosquatting is the act of creating software packages with names that mimic popular package names. A study (Speed Meyers and Tozer, 2020) found 40 such typosquatting attacks against PyPI users between 2017 and 2020.
There are nearly 329,000 PyPI packages as at 30/September/2021. This demo project allows a user to enter a PyPI package name, and the names and summaries of any projects with closely related names will be displayed. Closely related names are detected by finding those package names within a Levenshtein edit distance of 1, as might be expected from a single-character typographical error.
The Levenshtein algorithm in implemented in Python but has been converted to C code using Cython, resulting in calculation times that are 2.3 times faster than the pure Python equivalent.
Requests to PyPI for summary texts are handled using asyncio, allowing multiple requests to be sent concurrently. The summary texts from PyPI are parsed from the index page of each package using the Beautiful Soup library.
Please enter a PyPI package name and click Submit:
| Name | Summary |
|---|---|
| {{ requested_package.name }} | {{ requested_package.summary }} |
| Name | Summary |
|---|---|
| {{ p.name }} | {{ p.summary }} |
We don't know of that PyPi package.
Speed Meyers, J. and Tozer, B. (2020) "Bewear! Python Typosquatting Is About More Than Typos", In-Q-Tel, Inc., 28 September 2020. Available at https://www.iqt.org/bewear-python-typosquatting-is-about- more-than-typos/ (Accessed 30 September 2021).


Thesis: Massive Parallelization of Push-based System for Molecular Simulation Data Analysis with GPU
Thesis: Marketplace on Mobile Platform
Captain of programming competition team of 5 at AUCA
Android Development in Depth


Get the edge this holiday season
With our deep shipping discounts
You're invited to take advantage of some of the best shipping rates in the eCommerce world
this holiday season.
Don't just take our word for it. Try our calculator and compare with your current shipping provider.


Toggle navigation
QA APACII Dashboard v2.0
John Smith
Yesterday
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...
John Smith
Yesterday
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...
John Smith
Yesterday
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...
Read All Messages
Task 1
40% Complete
40% Complete (success)
Task 2
20% Complete
20% Complete
Task 3
60% Complete
60% Complete (warning)
Task 4
80% Complete
80% Complete (danger)
See All Tasks
New Comment
4 minutes ago
3 New Followers
12 minutes ago
Message Sent
4 minutes ago
New Task
4 minutes ago
Server Rebooted
4 minutes ago
See All Alerts
User Profile
Settings
Logout
Dashboard
Testcases
Testcases
Duration
Projects
QADB
Beijing
Germany
Compare Board
SLES Performance
Virt Performance
Machines Status
Charts
Flot Charts
Morris.js Charts
Tables
Forms
UI Elements
Panels and Wells
Buttons
Notifications
Typography
Icons
Grid
Multi-Level Dropdown
Second Level Item
Second Level Item
Third Level
Third Level Item
Third Level Item
Third Level Item
Third Level Item
Sample Pages
Blank Page
Login Page
Machines Status


| 1 | package net.mooctest; | |
| 2 | ||
| 3 | /** | |
| 4 | * Exception thrown when an expression passed to ExpressionParser has a missing | |
| 5 | * operand. | |
| 6 | */ | |
| 7 | ||
| 8 | public class MissingOperandException extends ExpressionParserException { | |
| 9 | private String op; | |
| 10 | ||
| 11 | /** | |
| 12 | * Constructor of MissingOperandException. | |
| 13 | * | |
| 14 | * @param faultyExpression | |
| 15 | * the expression which could not be parsed | |
| 16 | * @param op | |
| 17 | * the operator which is missing an operand | |
| 18 | */ | |
| 19 | ||
| 20 | public MissingOperandException(String faultyExpression, String op) { | |
| 21 | super(faultyExpression); | |
| 22 | this.op = op; | |
| 23 | } | |
| 24 | ||
| 25 | /** | |
| 26 | * Gets the operator which is missing an operand. | |
| 27 | * | |
| 28 | * @return the operator which is missing an operand | |
| 29 | */ | |
| 30 | ||
| 31 | public String getOperator() { | |
| 32 |
1
1. getOperator : mutated return of Object value for net/mooctest/MissingOperandException::getOperator to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return op; |
| 33 | } | |
| 34 | } | |
Mutations | ||
| 32 |
1.1 |


Addresses of Poor Clare convents in the English Association
Please address all correspondence to the Mother Abbess. For men, try the Friars
Arkley
Poor Clare Monastery
102 Galley Lane
Arkley
Barnet
Herts
EN5 4AN
Arundel
Convent of Poor Clares
Crossbush
Arundel
West Sussex
BN18 9PJ
Freeland (Anglican)
St Mary’s Convent
Freeland
Witney
Oxon
OX8 8AJ
Hereford
The Poor Clare Monastery
Much Birch
Hereford
HR2 8PS
Hollington
Poor Clare Community
22 Upper Church Road
St Leonards-on-Sea
East Sussex TN37 7AS
Humbie
Mount Alvernia
2 Humbie Mains
Humbie
East Lothian
EH36 5PW
Scotland
Lynton
Monastery of Poor Clares
Lynton
N.Devon
EX35 6BX
York
Poor Clares Monastery
155 Main Street
Askham Bryan
York
YO23 3QS


Classes Bollywood Style
Ruby is an object-oriented programming language which has Classes and Objects. Tutorialspoint defines classes as "the blueprint from which individual objects are created." Some of the objects which a class can have are instance variables and instance methods. Instance variables are like the characteristics of the class and instance methods are functions of that class.
You might be wondering why we have classes in the first place. Classes are useful when you have a large amount of information that can be organized. For example, what if you have a huge collection of Bollywood films and you'd like to compile their titles, dates of release, and starring actors? You could create a variable for each title of each movie OR you could create an instance variable of '@title' for all Bollywood movie titles. Classes allow you to apply characteristics and functions on a larger scale.
Let's continue with the Bollywood example. First, let's create a class called 'Bollywood'.
We should figure out what characteristics we want each Bollywood movie to have. Let's use 'title', 'date', and 'actor' and set those as our parameters. Because we have parameters which will eventually be used in a method within the class, we need to declare a method 'initialize' when the class is created.
Next, we create the instance variables. We use @ to represent an instance variable as opposed another kind of variable.
Now we can create a method in the class which utilizes the instance variables.
We're done! We can now use .new to add as many Bollywood movies as we'd like.


MongoConnection
MongoConnection#open
with existing connection
reuses connection
without existing connection
returns connection
saves connection
DataPipeline
with bucket
DataPipeline#find
uses the application/environment db
uses the correct collection
returns result
calls find
DataPipeline#findOne
calls findOne with correct id
DataPipeline#save
returns result from findOne
saves correct update
without bucket
calls toArray
calls findOne


| 1 |
virus |
H5N1 |
pandemic |
assay |
vaccine |
H1N1 |
a(h1n1)pdm09 |
H7N9 |
antiviral |
lung |
markets |
bats |
swine |
IDV |
° |
| 2 |
influenza |
poultry |
influenza |
detection |
protection |
2009 |
- |
mabs |
oseltamivir |
cells |
live |
H9N2 |
pigs |
IBV |
airway |
| 3 |
viruses |
spread |
global |
specimens |
vaccines |
swine |
sequences |
neutralizing |
resistance |
epithelial |
aivs |
ducks |
dogs |
HA |
BST-2 |
| 4 |
human |
avian |
pandemics |
detect |
challenge |
pneumonia |
season |
monoclonal |
inhibitors |
H5N1 |
poultry |
bat |
H1N2 |
IAV |
family |
| 5 |
avian |
H5 |
health |
RT-PCR |
vaccination |
% |
NA |
antibodies |
drugs |
alveolar |
lbms |
duck |
sivs |
fusion |
winter |
| 6 |
infection |
highly |
influenza pandemic |
sensitivity |
H5N1 |
mexico |
A(H3N2 |
H7 |
neuraminidase |
cytokine |
A(H7N9 |
H9 |
days |
entry |
temperature |
| 7 |
influenza viruses |
pathogenic |
vaccines |
rrt-pcr |
recombinant |
pandemic |
mutation |
HA |
drug |
msc-evs |
market |
chickens |
nasal |
influenza c virus |
orthomyxoviridae |
| 8 |
influenza virus |
birds |
influenza pandemics |
reaction |
inactivated |
ph1n1 |
analysis |
h7n9 virus |
treatment |
cytokines |
prevalence |
MDCK |
avian-like |
HEF |
organoids |
| 9 |
viral |
asia |
flu |
influenza |
responses |
84 |
mutations |
epitopes |
neuraminidase inhibitors |
macrophages |
risk |
bat-influenza |
pig |
kallistatin |
shift |
| 10 |
respiratory |
AIV |
strategies |
real-time |
mice |
test |
phylogenetic |
2013 |
agents |
h5n1 virus |
conducted |
chicken |
nomenclature |
activation |
temperatures |
| 11 |
results |
HPAI |
emerging |
assays |
antigenic |
individuals |
substitution |
h7n9 viruses |
amantadine |
primary |
practices |
ecology |
avian‐like |
protease |
flies |
| 12 |
host |
domestic |
recent |
rapid |
survival |
influenza-like |
orvs |
ELISA |
antivirals |
mdms |
LBM |
H17N10 |
inoculated |
KLK1 |
antigenic shift |
| 13 |
high |
humans |
preparedness |
sensitive |
lethal |
states |
PB1–216 |
neutralization |
children |
h1n1 virus |
's |
H18N11 |
H3N2 |
ph |
orthomyxoviridae family |
| 14 |
humans |
1997 |
strategy |
H275Y |
cross-protection |
herds |
evolution |
mab |
treat |
chemokines |
collected |
h9n2 viruses |
controls |
membrane fusion |
types |
| 15 |
potential |
h5n1 viruses |
concern |
multiplex |
heterologous |
h1n1 infection |
taiwan |
stem |
channel |
MBL |
environmental |
mdck cells |
sw/gent/08 |
stability |
persistence |
| 16 |
suggest |
H2 |
pandemic influenza |
clinical |
DNA |
hospital |
japan |
monoclonal antibodies |
activity |
h5n1 disease |
trading |
modified |
thai |
cattle |
differentiated |
| 17 |
infected |
subtypes |
future |
samples |
proteins |
bacterial |
co-infection |
conserved |
therapy |
autophagy |
LPT |
PB1-F2 |
H1 |
TBHQ |
orthomyxoviruses |
| 18 |
influenza a virus |
epidemiology |
years |
specific |
peptide |
influenza-like illness |
egypt |
epitope |
seasonal influenza |
H9N2/G1 |
live bird |
HP |
diversity |
glycoprotein |
environmental conditions |
| 19 |
strains |
mortality |
remains |
developed |
induced |
swine flu |
isolates |
binding |
stage |
pathogenesis |
network |
acid |
revealed |
proteases |
human-infective |
| 20 |
tract |
countries |
research |
clinical specimens |
NP |
CRP |
neuraminidase |
8C6 |
M2 |
in vitro |
flocks |
DV518 |
inoculation |
proteolytic |
sore throat |
| 21 |
caused |
asian |
public |
RNA |
protected |
17 |
waves |
region |
patients |
vitro |
surveillance |
dromedary |
avian‐like swine |
loop |
sore |
| 22 |
low |
domestic poultry |
current |
A/H1N1 |
protective |
united states |
A/H1N1 |
river |
± |
H5N1/97 |
bird |
jinchai |
introductions |
structural |
conditions |
| 23 |
study |
2003 |
response |
PCR |
vectors |
mixed |
clustered |
avian-origin |
D35 |
inflammatory |
workers |
dromedary camels |
H1N1/2009 |
erythrocytes |
ciliated |
| 24 |
infections |
infectious |
international |
positive |
m2e |
circulated |
infecting |
neutralizing antibody |
NA |
potent |
rural |
amino |
titers |
cleavage |
32 |
| 25 |
ability |
populations |
epidemic |
swl |
immune |
swine influenza |
influenza a(h3n2 |
pseudovirus |
NAI |
induction |
wild birds |
cells |
reassortant |
attractive |
quasispecies |
| 26 |
virulence |
transmission |
work |
chain |
igg |
investigations |
seasons |
h7n9 infections |
zanamivir |
proinflammatory |
odds |
SA |
guinea |
inhibits |
family orthomyxoviridae |
| 27 |
isolated |
pathogenic avian influenza |
studies |
% |
antibody |
swine influenza h1n1 pneumonia |
strains |
group |
rimantadine |
virus-induced |
cloacal |
h9n2 virus |
excretion |
membrane |
single-stranded |
| 28 |
significant |
zoonotic |
development |
primers |
t-cell |
ridts |
phylogenetic analysis |
ha protein |
adamantanes |
IP-10 |
kenya |
acids |
sublineage |
influenza d virus |
rna segments |
| 29 |
respiratory tract |
large |
threat |
probes |
hetero-protection |
ilis |
sequence |
IAV |
ion |
cell |
free-grazing |
camels |
seropositivity |
32D6 |
single-stranded rna |
| 30 |
identified |
wild |
national |
reverse |
wild-type |
PCT |
selection |
delta |
prophylaxis |
induced |
live bird markets |
p518-l |
nasal virus |
quercetin |
infective |
| 31 |
studies |
infections |
timely |
screening |
M2 |
epitope |
LPAI |
belonging |
drug resistance |
replicated |
LPM |
bat cells |
belonged |
conformation |
type c |
| 32 |
ferrets |
viruses |
killed |
performance |
influenza vaccine |
cases |
2 |
therapeutic |
proton |
pdmh1n1 |
wild |
passages |
3 |
pseudotyped |
ivs |
| 33 |
causing |
economic |
critical |
detecting |
clades |
adults |
online |
china |
young |
PVA |
year |
intestinal |
antibodies |
TMPRSS2 |
influenza illness |
| 34 |
previously |
control |
led |
a/h1n1v |
HPAI |
patients |
viral interference |
h7n9 influenza |
μg/ml |
alveolar epithelial cells |
spatial |
bat species |
1 |
matriptase/st |
ISAV |
| 35 |
genetic |
mortality rate |
production |
a/h1n1pdm |
antigens |
ph1n1 virus |
supplementary |
ten |
drug-resistant |
evs |
backyard |
IFITM1 |
h1n1pdm09 |
bativs |
RNA |
| 36 |
reduced |
including |
system |
2009 |
protect |
producing |
authorized |
PN-SIA28 |
therapies |
polarized |
farmers |
acquired |
domestic ducks |
infectivity |
airways |
| 37 |
transmitted |
species |
plans |
commercial |
hemagglutinin |
mexico city |
SUPPLEMENTARY |
MN |
compound |
pathways |
environmental samples |
tracheas |
web-accessible |
determinant |
transmission |
| 38 |
pathogenic |
east |
recommendations |
negative |
HA |
clones |
signatures |
reacted |
infants |
apical |
movement |
bat-influenza virus |
dog |
permeability |
fever |
| 39 |
pandemic |
emergence |
care |
analytical |
encoding |
pandemic influenza a |
monitor |
monoclonal antibody |
seasonal |
apoptosis |
contacts |
species |
danish |
CPIV |
environmental |
| 40 |
unique |
<IP_ADDRESS> |
< |
one-step |
immunization |
clinical |
users |
vlps-tm |
regimen |
expression |
H4N9 |
role |
intranasally |
myxoviruses |
productive |
| 41 |
transmission |
influenza a viruses |
bird |
RT‐PCR |
immunized |
flu |
phylogeography |
sandwich |
TCAD |
lung epithelial cells |
H7N4 |
p518-s |
comparisons |
anti-iav |
h7n9/ah |
| 42 |
influenza virus infection |
subtype |
h5n1 avian influenza |
seasonal |
m2e-map |
variant |
gene |
PN |
febrile |
basolateral |
urban |
α2,6-gal |
equine |
proteolytic cleavage |
h1n1sw |
| 43 |
tissue |
difficult |
controlling |
gene |
TM |
non-seasonal |
PB1–216S |
pseudotypes |
avian flu |
chemokine |
risk factors |
primates |
cross‐protection |
kallikrein |
adar1-like |
| 44 |
demonstrate |
terms |
pandemic influenza vaccines |
pandemic influenza a/h1n1 |
immune responses |
make |
tree |
specific |
shikimic |
mscs |
birds |
madin-darby canine kidney |
contemporary |
ICV |
headache |
| 45 |
syndrome |
H2N2 |
manufacturing |
clinical samples |
effective |
procalcitonin |
al |
blot |
OS |
inducers |
samples |
explain |
virus titers |
utilizes |
droplets |
| 46 |
persons |
potential |
(0)(F |
H1N1 |
h5n1 virus |
39 |
influenza a/h1n1 viruses |
a/anhui/1/2013 |
clinical features |
H5N1/04 |
chickens |
DV413 |
household |
stabilizing |
tilv |
| 47 |
subtypes |
human |
emergence |
influenza a h1n1 |
weight loss |
division |
inhibition assay |
subunits |
viral |
organ |
patient |
ns1 protein |
wash |
low-ph |
house |
| 48 |
disease |
transmissible |
correlates |
rtrt-pcr |
vector |
originating |
ELECTRONIC |
coverage |
severe |
dysregulation |
2013 |
bat influenza viruses |
arose |
enzymes |
3D |
| 49 |
vivo |
routes |
spreading |
procedures |
LAIV |
thought |
MATERIAL |
rhmbl |
suppressed |
microvascular |
circulation |
ch9cn2/h18 |
genetic |
viral spread |
2D |
| 50 |
objective |
south-east asia |
mathematical |
RT-LAMP |
sh5(3 |
reverse transcription polymerase chain reaction |
HA |
anti-hemagglutinin |
AD3BF2D |
signalling |
% |
ch9cn2/h17 |
genes |
bativ |
aerosols |


Coding Quiz
Try to answer as many of the questions correctly as you can. Time will be deducted for wrong answers and your high scores will be tallied. Good luck!
Try to answer as many of the questions correctly as you can. Time will be deducted for wrong answers and your high scores will be tallied. Good luck!


Hong Kong police chief urges protesters to leave university campus
by ReutersHONG KONG (Nov 22): Protesters holed up at a Hong Kong university campus should leave and there is no deadline to clear them, the city's police chief said on Friday, adding that he hoped for a peaceful resolution to the standoff.
At least eight protesters who had been holding out at the trashed Polytechnic University surrendered to police in the early hours of Friday, while others desperately searched for escape routes as riot officers surrounded the campus.


{% extends 'base.html' %} {% block main %} {% if user.is_authenticated and not next %} You are logged in {% else %}
Your email and password didn't match. Please try again.
Password
Forgotten password?


Full Name: {{ i.full_name }}
Address: {{ i.address }}
Phone: {{ i.phone_number }}
Email: {{ i.email }}
Zip code: {{ i.zip_code }}


New York City Taxi and For-Hire Vehicle Data
On August 12th, 2016, Mark Litwintschik
published a blog post called
1.1 Billion Taxi Rides with MapD & 8 Nvidia Pascal
Titan Xs
.
We reproduced the approach provided by this post to
create a benchmark using Ibis
with
New York City Taxi and For-Hire Vehicle Dataset
.
The data acquisition and cleaning used by Mark Litwintschik was described in his another blog post on 13th Febrary, 2016, called A Billion Taxi Rides in Redshift .
The mentioned blog post was based on another blog post published by Todd W. Schneider called Analyzing 1.1 Billion NYC Taxi and Uber Trips, with a Vengeance . The repository that contains the scripts and explanations about how to download and clean the data can be accessed at @toddwschneider's GitHub repo .
Also, both the two Mark's blog post, mentioned before,
give more extra details to prepare the data that should
be used to load the data to OmniSciDB
database.
All the code used to replicate the data acquisition and cleaning, mentioned before, and the current benchmark scripts are stored into Ibis-benchmark repo . For information about how to replicate this benchmark, check out the README.md file.
This benchmark aims to show the performance in time for
some expressions using Ibis with
OmniSciDB
and Pandas
.
Before start, there are some termilogies used in this document that is explained here to help the reading.
IPC
: Inter Process Communication. OmniSciDB uses Apache Thrift for IPC.Cursor
: Cursors are used by database programmers to process individual rows returned by database system queries.CPU
: Central Processing Unit.GPU
: Graphics Processing Unit.Ibis
: Python Data Analysis Productivity Framework.
This benchmark measures the execution time (in
seconds) consumed by expressions using
Ibis OmniSciDB
backend, with
OmniSciDB CPU
and
OmniSciDB CPU
, and pure
Pandas
.
Ibis OmniSciDB
backend can be used
with three differents execution types:
IPC CPU
,
IPC GPU
and
Cursor
.
The expressions used by this benchmark was based on the queries used by 1.1 Billion Taxi Rides with MapD & 8 Nvidia Pascal Titan Xs blog post :
-
t[t.cab_type, t.count()].group_by(t.cab_type)
-
t[ t.passenger_count, t.total_amount.mean().name('total_amount_mean') ].group_by(t.passenger_count)
-
t[ t.passenger_count, t.pickup_datetime.year().name('pickup_year'), t.count().name('pickup_year_count'), ].group_by([t.passenger_count, t.pickup_year]),
-
t[ t.passenger_count, t.pickup_datetime.year().name('pickup_year'), t.trip_distance.cast(int).name('distance'), t.count().name('the_count'), ] .group_by([t.passenger_count, t.pickup_year, t.distance]) .order_by([t.pickup_year, t.the_count], asc=False),
Where t
is the trip
table that contains
New York City Taxi and For-Hire Vehicle Data
.
The time reported here doesn't considerer the time
for data loading, eg. Pandas
read_csv
or
OmniSciDB
COPY FROM
Some considerations about this benchmark:
-
Ibis OmniSciDB
backend, usingcursor
execution type, presents a better performance thanPandas
and otherIbis OmniSciDB
execution types for all expressions. -
Ibis OmniSciDB
backend usingIPC GPU
presents a better performance than usingIPC CPU
for all expressions. -
Pandas
presents a better performance thanIbis OmniSciDB
backend usingIPC
execution types for simple expressions.
This benchmarking have been ran in a computer with the following specification:
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 48 On-line CPU(s) list: 0-47 Thread(s) per core: 2 Core(s) per socket: 24 Socket(s): 1 NUMA node(s): 4 Vendor ID: AuthenticAMD CPU family: 23 Model: 8 Model name: AMD Ryzen Threadripper 2970WX 24-Core Processor Stepping: 2 CPU MHz: 1717.658 CPU max MHz: 3000.0000 CPU min MHz: 2200.0000 BogoMIPS: 5987.92 Virtualization: AMD-V L1d cache: 32K L1i cache: 64K L2 cache: 512K L3 cache: 8192K NUMA node0 CPU(s): 0-5,24-29 NUMA node1 CPU(s): 12-17,36-41 NUMA node2 CPU(s): 6-11,30-35 NUMA node3 CPU(s): 18-23,42-47 MemTotal: 131947616 kB
GPU Information
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 430.50 Driver Version: 430.50 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro RTX 8000 Off | 00000000:41:00.0 Off | Off | | 34% 47C P0 65W / 260W | 0MiB / 48601MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 1 Quadro RTX 8000 Off | 00000000:42:00.0 Off | Off | | 35% 53C P0 1W / 260W | 0MiB / 48600MiB | 0% Default | +-------------------------------+----------------------+----------------------+
Disk Partition Information
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 3.7T 0 disk └─sda1 8:1 0 3.7T 0 part /work nvme0n1 259:0 0 953.9G 0 disk ├─nvme0n1p1 259:1 0 100G 0 part ├─nvme0n1p2 259:2 0 1K 0 part └─nvme0n1p5 259:3 0 853.9G 0 part /


| Welcome | |||||
|---|---|---|---|---|---|
|
I am currently a graduate student at the University of Pittsburgh, I am doing my Master
of Science in Information Science.
I have done my undergraduate in Information Technology from Maharashtra Insitute of Technology, University of Pune,
India.
My research interests are in Algorithm Design and Analysis and Web Tehnologies. I like
solving
algorithmic problems (competitive programming) online on Hacker Rank. I'm a follower of
Jainism.
I watch and analyze cricket matches and love to play Badminton.
|


--- layout: post title: AngularJS Watch and PubSub Best Practices Forged From Pain! date: 2013-02-08 15:37:55.000000000 -07:00 type: post published: true status: publish categories: - AngularJS - JavaScript - Quick Note tags: [] meta: _edit_last: '1' image: '' _layout: layout-default _thumbnail_id: '677' _thesis_post_image: a:1:{s:5:"image";a:4:{s:3:"url";s:0:"";s:6:"height";s:0:"";s:5:"width";s:0:"";s:2:"id";s:0:"";}} _thesis_post_thumbnail: a:1:{s:5:"image";a:4:{s:3:"url";s:0:"";s:6:"height";s:0:"";s:5:"width";s:0:"";s:2:"id";s:0:"";}} _nina_cross_promo: a:1:{s:8:"template";s:17:"custom_1399328552";} author: login: ohmadmin email<EMAIL_ADDRESS>display_name: Lukas Ruebbelke first_name: Lukas last_name: Ruebbelke ---
My colleague and buddy Eric Burley @eburley took the time to write down some excellent points around $watch vs PubSub that we have learned over the last year working with AngularJS on a large, non-trivial application. These golden nuggets were on an internal wiki that after a bit of prodding and pleading he was kind enough to post to a public place for everyone to see.
These are conclusions that we have arrived at over the course of a year after writing a LOT of AngularJS code. I highly respect Eric as an engineer and appreciate him taking the time to to articulate these thoughts in such a digestible manner.
So! Without further ado, check out the link below.
http://eburley.github.com/2013/01/31/angularjs-watch-pub-sub-best-practices.html
Cheers!


Vermont has a facinating history. Learn more about it.
 Here are maps of some of them.
From world class ski and snowboarding slopes, to snowmobile trails across the state, we've got it.
Vermont is fortunate to have a number lakes and ponds to play in. Find out where they are.
This is a ExperiBrent, built with little sleep, in Vermont, for HackVT 2017


 Modified the shebang to point to Bash rather than ZSH since the Linux installations this will be used on do not have ZSH installed.
12/28/2020 21:24:26
OxidizedBackup
Added an initial timestamp value of 1 year from the current moment. This is ensures date comparison with the files retrieved from SharePoint when determining which is the oldest file to delete.
12/28/2020 18:05:38
OxidizedBackup
Removed the test variables that hard-coded values to allow for testing on my own system. Removed the block comment for tarball creation that was added to avoid executing that code during the SharePoint development.
12/22/2020 19:57:02
OxidizedBackup
Added a check for the contents of the directory to which the tarball was uploaded. If the directory has more than 4 items, the oldest of the items is processed and deleted. With a 1 week cron job, this will allow for a rolling series of a month of backups.
12/22/2020 19:55:24
OxidizedBackup
Refactored the process of uploading so that the folder is completely handled prior to initiating it. Created a conditional to chart if the folder exists or needs to be created.
12/22/2020 18:50:17
OxidizedBackup
Wrapped the match for the hostname to a directory in SharePoint in a conditional. Automated the creation of a new hostname-based directory if a match is not found.
12/22/2020 18:34:02
OxidizedBackup
Added math to determine how many 10 MB chunks the tarball will need to be broken into in order to guarantee that the upload to SharePoint will be successful. Added a loop to upload the bytes of the file in the appropriate number of chunks.
12/21/2020 22:24:32
OxidizedBackup
Updated .gitignore file to not include any backup tarballs that have been captured. Added the ability to query for the target file to receive its file ID from SharePoint and use that to create a file upload session.
12/21/2020 22:06:18
OxidizedBackup
Removed the venv directories from the repository. Created a configuration script and added a requirements.txt file for pip3.
12/21/2020 18:35:43
CPRouterReport
Cleaned up test code. Added a call to the function to back up the log file past 10 MB.
12/11/2020 13:22:05
CPRouterReport
Added the ability to write a uniquely-named CSV file with the id, serial number, MAC address, and name of each matching router.
12/10/2020 20:30:35
CPRouterReport
Added the baseline code for gathering the group list, parsing out the URLs for the relevant groups, and then checking routers for membership of those groups. Router details are stored in a class.
12/10/2020 20:10:50
CPRouterReport
Initial commit
12/10/2020 19:03:20
LogicMonitorGroovy
Added a script to import the .csv file with speed test results. The report exists on the local filesystem of the collector, so the Groovy code imports from there and parses out the appropriate information, formatting it in a way that LogicMonitor can ingest. Also included a parsing script to handling the instancing of the data from Active Discovery.
12/10/2020 18:50:01
CPSpeedTests
Modified the router object creation to remove commas from the name. This will prevent errors when parsing the .csv file later where the delimiter causes a skew to each row.
12/08/2020 20:36:38
CPSpeedTests
Modified the latency and jitter values to convert them from microseconds to milliseconds. Also added parsing to force a conversion of the string result value to a double, and try-catch blocks to handle any failed conversions. Changed the backoff time when waiting for the tests to finish after the initial completion estimate from 2 minutes to 5 minutes.
12/08/2020 18:30:03
CPSpeedTests
Removed testing code.
12/07/2020 22:36:45
LogicMonitorGroovy
Updated the device discovery to only include customer routers from 2 MSP management groups in NCM.
12/04/2020 18:41:12
LogicMonitorPwsh
Changed the router discover for a customer to only include the routers in one of the two MSP management groups configured in NCM.
12/04/2020 18:34:37
LogicMonitorGroovy
Added individual counters to track the number of open tickets by block-of-hours or prepaid support along with the total number of open tickets.
12/03/2020 16:10:36
O365MalwareAlerts
Added checks to account for when there are no results for either flagged malware or phishing. This is useful at the start of the month given that the check is month-to-date for both scripts. It avoids graphs showing as having no data and breaking within the Dashboard view.
12/02/2020 20:13:10
LogicMonitorGroovy
Wrapped the output of the variables to ensure proper expansion.
12/02/2020 15:01:45
LogicMonitorGroovy
Modified the script to account for time different billable types between support contract and block of hours. Metrics on monthly tickets, total time, and average time per ticket are calculated for each billable type independently. The script will also now determine the total number of open tickets across both billable types.
12/01/2020 22:09:12
LogicMonitorGroovy
Merge pull request #4 from jfabry-noc/Bob_test Added ERS Switch OID active discovery.
11/30/2020 18:39:46
CPPushAPI
Fixed a typo on the dumps method for json when we hit a subscription expiration notice.
11/30/2020 13:57:19
LogicMonitorGroovy
Re-added a code block that was accidentally removed in 5291837 to check the routers for current or outdated firmware.
11/19/2020 17:08:01
LogicMonitorGroovy
Updated the discovery scripts to omit routers for a particular customer which were not members of particular groups.
11/19/2020 16:41:59
LogicMonitorPwsh
Modified the router discovery to filter out devices for a customer if they do not match particular group membership.
11/19/2020 16:15:54
LogicMonitorGroovy
Modified the parsing to make a per-device query for additional metrics like the memory and CPU utilization. These are only returned when checking for a specific device, not when querying for all of the devices, making the additional queries necessary outside of discovery.
11/19/2020 15:17:32
GitCommit
Fixed a bug I introduced in 7d7b730 where I changed the commit message to be grammatically correct. This broke my filter for those messages from posting to the site and creating an endless loop of posts. The filter should now work again for the new commit message, and the errant postings have been cleaned up.
11/18/2020 23:04:48
CPPushAPI
Added a new .gitignore entry for an external Python file for the shared secret used to authenticate communication. Updated the webhook listener to now calculate the hash of the response body with the shared secret as SHA256 in order to validate that the message came from a legitimate server. This is used in conjunction with firewalling access to just the documented IPs to the Flask server.
11/18/2020 22:47:46
CPPushAPI
Moved the writing of the JSON file to a function and added error checking to it.
11/16/2020 18:41:56
GitCommit
Changed the phrasing of the commit message from commits to commit(s) so that it doesn't look quite as gross by being grammatically incorrect when only a single commit is included.
11/16/2020 16:19:40
CPPushAPI
Updated the check for a router in the alert to compare the key to None rather than if the key exist. Added a conditional block to handle expiring subscription alerts.
11/16/2020 15:39:00
CPPushAPI
Updated the listener to grab a header provided by the push service. The header is a hash of the secret key in the push policy and the body of the message so that pushed data can be authenticated.
11/13/2020 22:14:38
CPPushAPI
Modified the listener to remove references from the API call to an undefined function used in a previous script. Alerts featuring a router query the router's friendly name and write a local JSON file for ingestion into LM.
11/13/2020 15:47:09
GitCommit
Fixed a semi-duplicate entry in the HTML because I managed to create a merge conflict for myself by forgetting to Already up to date. before committing in a copy of the repo that I hadn't used for a while.
11/13/2020 00:14:52
jfabry-noc.github.io
Moved the music link back to my Apple Music profile.
11/12/2020 22:53:06
CPPushAPI
Removed __pycache__ since that was not meant to be committed originally. Modified the push_configs file provided from CP to allow me to quickly re-enable the push config while I'm testing the handling of the data. Updated the listener to start parsing out the data provided from the hook and create local files for LM.
11/12/2020 21:09:24
CPPushAPI
Included the config push script supplied by CP. Updated .gitignore to not include a config_constants file with connection-specific details to import.
11/12/2020 18:13:07
Dashboard
Added an indicator to the reboot prompt to let the user know they need to enter Y or N. The code ignores the case.
11/12/2020 16:44:50
Dashboard
Updated the periodic displays of what stage the script is at to clearly delineate them from the command outputs. We do not want to suppress the command output, so this just makes it easier to keep tabs on what is executing without excessive hunting.
11/10/2020 20:10:06
Dashboard
Added a conditional to the start of the script to check for the uid. If it isn't 0, which would mean the script was executed with sudo, the user is notified and the script exits. Several sections were updated to include -y on apt commands that were previously missing. The default php.ini setting includes the " =" after the ";date.timezone" listing. The sed commands were updated to reflect this.
11/10/2020 17:50:12
LogicMonitorGroovy
Merge pull request #3 from jfabry-noc/Bob_test Bob test
11/10/2020 16:43:29
Dashboard
Added a check for the current PHP version. If it's 7.2, the script will add the PPAs and install everything. If it's already 7.4, the script will start straight at the configuration stage.
11/10/2020 16:03:14
Dashboard
Modified the parts of the script calling another user account so that all commands can execute under the new user before gracefully exiting back to the original shell without user intervention.
11/09/2020 22:57:51
Dashboard
Added the option to specify 'DEV' as a second parameter. If provided, development mode will be enabled. In this mode, the user will be prompted after each stage of the script if they would like to continue or kill the operation. Prevents the script from running amuck when testing it if, for example, the last command executes successfully but does not yield the expected result.
11/09/2020 21:44:53
Dashboard
Added sed commands for modifying the php.ini files where a timezone update is necessary. Also added a sed command to escape the backslash in the timezone name so that it can be re-used in another sed command later without escaping.
11/09/2020 19:38:21
Dashboard
Added additional installations for the full suite of dependencies. Added a CLI parameter where the timezone must be specified as one value out of an array. Improperly specifying a timezone will result in the options being printed and the script halting. Added a prompt to the very end of the script to reboot the entire server.
11/09/2020 18:57:18
Dashboard
Updated the .gitignore file to remove unneeded Python references but to avoid capturing a test script and the .swp files from Vim.
11/09/2020 16:11:28
Dashboard
Added a base shell script for updating the PHP components from 7.2 to 7.4
11/09/2020 16:11:01
CPPushAPI
Added a different sample route to the listener.
11/09/2020 14:05:55
GitCommit
Additional HTML fixes for the tag closing bug.
11/06/2020 16:36:14
GitCommit
Merge branch 'main' of https://github.com/jfabry-noc/GitCommit into main
11/06/2020 16:34:53
GitCommit
Fixed a bug where the paragraph tags for the commit comment were being closed by an h3 tag. I also updated the current entries in the HTML that had been written in this way.
11/06/2020 16:34:31
O365MalwareAlerts
Redid the phishing code to move from BatchScript to just script and handle instancing through Active Discovery in LogicMonitor.
11/06/2020 16:25:23
O365MalwareAlerts
Modified the script to print only the prefix of the email address to simplify the BatchScript creation process within LogicMonitor.
11/05/2020 20:32:25
O365MalwareAlerts
Created a script for a LogicMonitor DataSource to process the phishing results from the local collector's filesystem as a BatchScript. Also updated the .gitignore file to avoid commiting the sample result .csv file.
11/05/2020 20:02:59
O365MalwareAlerts
Added a check for an existing result file and removing it prior to starting anything else.
11/05/2020 16:27:23
O365MalwareAlerts
Shifted the script to be designed for running as a Scheduled Task or cron job rather than by LogicMonitor directly due to the authentication requirements. Added logging.
11/05/2020 16:11:27
O365MalwareAlerts
Created a new script file for querying the O365 quarantine for messages filtered there via transport rule. The script will validate that the appropriate transport rule caught the message (not filterable in the original call) and then report back how many users have received phishing messages blocked this way. Handles the metrics on a month-to-date basis.
11/04/2020 20:20:44
CPPushAPI
Added the baseline files that were created for generic webhook listener testing. Also included the sample nginx.conf file for Gunicorn as the Flask + Nginx serving combo.
11/04/2020 15:03:08
CPPushAPI
Initial commit
11/04/2020 12:55:47
GitCommit
Removed redundant logging when querying each repo for commits. Modified the HTML generation to stop adding an extra newline to the end of the HTML file each time. Removed a repeated line in the HTML file because I forgot how daylight saving time works.
11/03/2020 13:07:07
GitCommit
Modified the script to allow for commit messages on the GitCommit repo itself if they aren't the ones automatically generated for the sake of CI/CD to Netlify.
11/02/2020 22:55:35
GitCommit
Modified to remove a commit that will become duplicate due to my testing. Again because of the fact that I can't do block comments, apparently.
11/02/2020 21:35:59
GitCommit
Fixed yet another bug introduced by my inability to do block comments.
11/02/2020 21:33:41
GitCommit
Addressed a bug where I was erroneously doing an extra comparison for the time. This was code from prior to when the filter was applied to the URL. Any returned commits should be considered valid if my account is the author.
11/02/2020 21:31:00
LogicMonitorGroovy
Updated the Desk metrics to temporarily include the customer's internal blackhole alias.
11/02/2020 21:17:56
LogicMonitorGroovy
Modified the EventSource and corresponding URL filter to account for the job running every 15 minutes rather than every 30 minutes. The time variable is in milliseconds.
11/02/2020 20:52:56
jfabry-noc.github.io
Added a new link to gitcommit.gay and updated the CSS to include the alternate GitHub icon for it.
10/31/2020 18:11:00
CPSpeedTests
Moved the default timeframe from 60 seconds to a 20 second duration.
10/30/2020 20:58:51
OxidizedBackup
Created processing for each child directory in the SharePoint root, correlating it with the hostname of the Dashboard. If there is a match, parse together the new SharePoint URL for uploading the backup tarball and clearing out old tarballs.
10/29/2020 20:40:38
OxidizedBackup
Added the ability to query the MS Graph for the contents of a SharePoint directory.
10/29/2020 18:48:45
OxidizedBackup
Added skeleton code for handling a connection to the MS Graph and checking the validity of a Graph token. Also added to the repository the Python MSAL package and the dependencies for it.
10/29/2020 17:41:13
LogicMonitorPwsh
Modified the hourly collection script to execute every 15 minutes.
10/29/2020 17:34:50


News story
The initial inspection for all new publicly-funded schools and other new provision will be during the third year of operation.
Ofsted, in consultation with the Department for Education, has been reviewing the timing of the initial inspection for all new publicly-funded schools and other new provision.
In previous years Ofsted has inspected new provision during the second year of opening, generally from the fifth term onwards. From this term all new provision, including those schools that opened from the 2013/14 academic year to date and which have not had their initial inspection, will be inspected during the third year of operation. This policy will apply to all new schools, including academy converters, and will also be applied to school amalgamations, mergers and where new key stages are added.
The Chief Inspector has the discretion to inspect earlier where he has concerns and will also do this when requested to do so by the Secretary of State.
Ofsted will issue an updated policy statement on inspection of new schools shortly.
Published: 2 October 2015
Updated: 5 October 2015
From: Ofsted


| cols_merge_n_pct {gt} | R Documentation |
The cols_merge_n_pct()
function is a specialized variant of the
cols_merge()
function. It operates by taking two columns that constitute
both a count (col_n
) and a fraction of the total population (col_pct
) and
merges them into a single column. What results is a column containing both
counts and their associated percentages (e.g., 12 (23.2%)
). The column
specified in col_pct
is dropped from the output table.
cols_merge_n_pct(data, col_n, col_pct, autohide = TRUE)
data |
A table object that is created using the |
col_n |
A column that contains values for the count component. |
col_pct |
A column that contains values for the percentage component.
This column should be formatted such that percentages are displayed (e.g.,
with |
autohide |
An option to automatically hide the column specified as
|
This function could be somewhat replicated using cols_merge()
, however,
cols_merge_n_pct()
employs the following specialized semantics for NA
and zero-value handling:
NA
s in col_n
result in missing values for the merged
column (e.g., NA
+ 10.2%
= NA
)
NA
s in col_pct
(but not col_n
) result in
base values only for the merged column (e.g., 13
+ NA
= 13
)
NA
s both col_n
and col_pct
result in
missing values for the merged column (e.g., NA
+ NA
= NA
)
If a zero (0
) value is in col_n
then the formatted output will be
"0"
(i.e., no percentage will be shown)
Any resulting NA
values in the col_n
column following the merge
operation can be easily formatted using the fmt_missing()
function.
Separate calls of fmt_missing()
can be used for the col_n
and
col_pct
columns for finer control of the replacement values. It is the
responsibility of the user to ensure that values are correct in both the
col_n
and col_pct
columns (this function neither generates nor
recalculates values in either). Formatting of each column can be done
independently in separate fmt_number()
and fmt_percent()
calls.
This function is part of a set of four column-merging functions. The other
two are the general cols_merge()
function and the specialized
cols_merge_uncert()
and cols_merge_range()
functions. These functions
operate similarly, where the non-target columns can be optionally hidden from
the output table through the hide_columns
or autohide
options.
An object of class gt_tbl
.
4-11
Other Modify Columns:
cols_align()
,
cols_hide()
,
cols_label()
,
cols_merge_range()
,
cols_merge_uncert()
,
cols_merge()
,
cols_move_to_end()
,
cols_move_to_start()
,
cols_move()
,
cols_unhide()
,
cols_width()
# Use `pizzaplace` to create a gt table # that displays the counts and percentages # of the top 3 pizzas sold by pizza # category in 2015; the `cols_merge_n_pct()` # function is used to merge the `n` and # `frac` columns (and the `frac` column is # formatted using `fmt_percent()`) tab_1 <- pizzaplace %>% dplyr::group_by(name, type, price) %>% dplyr::summarize( n = dplyr::n(), frac = n/nrow(.), .groups = "drop" ) %>% dplyr::arrange(type, dplyr::desc(n)) %>% dplyr::group_by(type) %>% dplyr::slice_head(n = 3) %>% gt( rowname_col = "name", groupname_col = "type" ) %>% fmt_currency(price) %>% fmt_percent(frac) %>% cols_merge_n_pct( col_n = n, col_pct = frac ) %>% cols_label( n = md("*N* (%)"), price = "Price" ) %>% tab_style( style = cell_text(font = "monospace"), locations = cells_stub() ) %>% tab_stubhead(md("Cat. and \nPizza Code")) %>% tab_header(title = "Top 3 Pizzas Sold by Category in 2015") %>% tab_options(table.width = px(512))


Module: ActionView::Layouts
| Relationships & Source Files | |
| Namespace Children | |
|
Modules:
| |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
::ActiveSupport::Concern
|
|
|
Instance Chain:
|
|
| Defined in: | actionview/lib/action_view/layouts.rb |
Overview
Layouts
reverse the common pattern of including shared headers and footers in many templates to isolate changes in repeated setups. The inclusion pattern has pages that look like this:
<%= render "shared/header" %>
Hello World
<%= render "shared/footer" %>
This approach is a decent way of keeping common structures isolated from the changing content, but it’s verbose and if you ever want to change the structure of these two includes, you’ll have to change all the templates.
With layouts, you can flip it around and have the common structure know where to insert changing content. This means that the header and footer are only mentioned in one place, like this:
// The header part of this layout
<%= yield %>
// The footer part of this layout
And then you have content pages that look like this:
hello world
At rendering time, the content page is computed and then inserted in the layout, like this:
// The header part of this layout
hello world
// The footer part of this layout
Accessing shared variables
Layouts
have access to variables specified in the content pages and vice versa. This allows you to have layouts with references that won’t materialize before rendering time:

<%= @page_title %>

<%= yield %>
…and content pages that fulfill these references at rendering time:
<% @page_title = "Welcome" %>
Off-world colonies offers you a chance to start a new life
The result after rendering is:

Welcome

Off-world colonies offers you a chance to start a new life
Layout assignment
You can either specify a layout declaratively (using the #layout
class method) or give it the same name as your controller, and place it in app/views/layouts
. If a subclass does not have a layout specified, it inherits its layout using normal Ruby inheritance.
For instance, if you have PostsController and a template named app/views/layouts/posts.html.erb
, that template will be used for all actions in PostsController and controllers inheriting from PostsController.
If you use a module, for instance Weblog::PostsController
, you will need a template named app/views/layouts/weblog/posts.html.erb
.
Since all your controllers inherit from ApplicationController, they will use app/views/layouts/application.html.erb
if no other layout is specified or provided.
Inheritance Examples
class BankController < ActionController::Base
# bank.html.erb exists
class ExchangeController < BankController
# exchange.html.erb exists
class CurrencyController < BankController
class InformationController < BankController
layout "information"
class TellerController < InformationController
# teller.html.erb exists
class EmployeeController < InformationController
# employee.html.erb exists
layout nil
class VaultController < BankController
layout :access_level_layout
class TillController < BankController
layout false
In these examples, we have three implicit lookup scenarios:
-
The
BankController
uses the “bank” layout. -
The
ExchangeController
uses the “exchange” layout. -
The
CurrencyController
inherits the layout from BankController.
However, when a layout is explicitly set, the explicitly set layout wins:
-
The
InformationController
uses the “information” layout, explicitly set. -
The
TellerController
also uses the “information” layout, because the parent explicitly set it. -
The
EmployeeController
uses the “employee” layout, because it set the layout tonil
, resetting the parent configuration. -
The
VaultController
chooses a layout dynamically by calling theaccess_level_layout
method. -
The
TillController
does not use a layout at all.
Types of layouts
Layouts
are basically just regular templates, but the name of this template needs not be specified statically. Sometimes you want to alternate layouts depending on runtime information, such as whether someone is logged in or not. This can be done either by specifying a method reference as a symbol or using an inline method (as a proc).
The method reference is the preferred approach to variable layouts and is used like this:
class WeblogController < ActionController::Base
layout :writers_and_readers
def index
# fetching posts
end
private
def writers_and_readers
logged_in? ? "writer_layout" : "reader_layout"
end
end
Now when a new request for the index action is processed, the layout will vary depending on whether the person accessing is logged in or not.
If you want to use an inline method, such as a proc, do something like this:
class WeblogController < ActionController::Base
layout proc { |controller| controller.logged_in? ? "writer_layout" : "reader_layout" }
end
If an argument isn’t given to the proc, it’s evaluated in the context of the current controller anyway.
class WeblogController < ActionController::Base
layout proc { logged_in? ? "writer_layout" : "reader_layout" }
end
Of course, the most common way of specifying a layout is still just as a plain template name:
class WeblogController < ActionController::Base
layout "weblog_standard"
end
The template will be looked always in app/views/layouts/
folder. But you can point layouts
folder direct also. layout "layouts/demo"
is the same as layout "demo"
.
Setting the layout to nil
forces it to be looked up in the filesystem and fallbacks to the parent behavior if none exists. Setting it to nil
is useful to re-enable template lookup overriding a previous configuration set in the parent:
class ApplicationController < ActionController::Base
layout "application"
end
class PostsController < ApplicationController
# Will use "application" layout
end
class CommentsController < ApplicationController
# Will search for "comments" layout and fallback "application" layout
layout nil
end
Conditional layouts
If you have a layout that by default is applied to all the actions of a controller, you still have the option of rendering a given action or set of actions without a layout, or restricting a layout to only a single action or a set of actions. The :only
and :except
options can be passed to the layout call. For example:
class WeblogController < ActionController::Base
layout "weblog_standard", except: :rss
# ...
end
This will assign “weblog_standard” as the WeblogController’s layout for all actions except for the rss
action, which will be rendered directly, without wrapping a layout around the rendered view.
Both the :only
and :except
condition can accept an arbitrary number of method references, so except: [ :rss, :text_only ]
is valid, as is except: :rss
.
Using a different layout in the action render call
If most of your actions use the same layout, it makes perfect sense to define a controller-wide layout as described above. Sometimes you’ll have exceptions where one action wants to use a different layout than the rest of the controller. You can do this by passing a :layout
option to the render
call. For example:
class WeblogController < ActionController::Base
layout "weblog_standard"
def help
render action: "help", layout: "help"
end
end
This will override the controller-wide “weblog_standard” layout, and will render the help action with the “help” layout instead.
Class Method Summary
::ActiveSupport::Concern
- Extended
| class_methods | Define class methods from given block. |
| included | Evaluate given block in context of base class, so that you can write class macros here. |
| prepended | Evaluate given block in context of base class, so that you can write class macros here. |
| append_features, prepend_features |
Instance Attribute Summary
- #_layout_conditions readonly
- #action_has_layout=(value) rw
-
#action_has_layout? ⇒ Boolean
rw
Controls whether an action should be rendered using a layout.
- #_conditional_layout? ⇒ Boolean readonly private
Rendering
- Included
ViewPaths
- Included
Instance Method Summary
-
#_default_layout(lookup_context, formats, require_layout = false)
private
Returns the default layout for this controller.
- #_include_layout?(options) ⇒ Boolean private
-
#_layout
private
This will be overwritten by _write_layout_method.
-
#_layout_for_option(name)
private
Determine the layout for a given name, taking into account the name type.
- #_normalize_layout(value) private
- #_normalize_options(options) Internal use only
- #initialize Internal use only
Rendering
- Included
| #initialize, #render_to_body, | |
| #view_context | An instance of a view class. |
| #view_context_class, | |
| #_normalize_args | Normalize args by converting render “foo” to render |
| #_normalize_options | Normalize options. |
| #_process_format | Assign the rendered format to look up context. |
| #_render_template | Find and render a template based on the options given. |
| #view_renderer | Returns an object that is able to render templates. |
ViewPaths
- Included
| #any_templates?, | |
| #append_view_path | Append a path to the list of view paths for the current |
| #details_for_lookup, | |
| #lookup_context |
|
| #prepend_view_path | Prepend a path to the list of view paths for the current |
| #template_exists?, | |
| #_prefixes | The prefixes used in render “foo” shortcuts. |
DSL Calls
included
[ GitHub ]208 209 210 211 212 213
# File 'actionview/lib/action_view/layouts.rb', line 208
included do class_attribute :_layout, instance_accessor: false class_attribute :_layout_conditions, instance_accessor: false, default: {} _write_layout_method end
Instance Attribute Details
#_conditional_layout? ⇒ Boolean
(readonly, private)
[ GitHub ]
# File 'actionview/lib/action_view/layouts.rb', line 377
def _conditional_layout? true end
#_layout_conditions (readonly)
[ GitHub ]# File 'actionview/lib/action_view/layouts.rb', line 215
delegate :_layout_conditions, to: :class
#action_has_layout=(value) (rw)
[ GitHub ]# File 'actionview/lib/action_view/layouts.rb', line 359
attr_internal_writer :action_has_layout
#action_has_layout? ⇒ Boolean
(rw)
Controls whether an action should be rendered using a layout. If you want to disable any layout
settings for the current action so that it is rendered without a layout then either override this method in your controller to return false for that action or set the action_has_layout
attribute to false before rendering.
# File 'actionview/lib/action_view/layouts.rb', line 372
def action_has_layout? @_action_has_layout end
Instance Method Details
#_default_layout(lookup_context, formats, require_layout = false) (private)
Returns the default layout for this controller. Optionally raises an exception if the layout could not be found.
Parameters
-
formats
- The formats accepted to this layout -
require_layout
- If set totrue
and layout is not found, anArgumentError
exception is raised (defaults tofalse
)
Returns
-
template
- The template object for the default layout (ornil
)
# File 'actionview/lib/action_view/layouts.rb', line 415
def _default_layout(lookup_context, formats, require_layout = false) begin value = _layout(lookup_context, formats) if action_has_layout? rescue NameError => e raise e, "Could not render layout: #{e.}" end if require_layout && action_has_layout? && !value raise ArgumentError, "There was no default layout for #{self.class} in #{view_paths.inspect}" end _normalize_layout(value) end
#_include_layout?(options) ⇒ Boolean
(private)
# File 'actionview/lib/action_view/layouts.rb', line 430
def _include_layout?( ) ( .keys & [:body, :plain, :html, :inline, :partial]).empty? || .key?(:layout) end
#_layout (private)
This will be overwritten by _write_layout_method
# File 'actionview/lib/action_view/layouts.rb', line 382
def _layout(*); end
#_layout_for_option(name) (private)
Determine the layout for a given name, taking into account the name type.
Parameters
-
name
- The name of the template
# File 'actionview/lib/action_view/layouts.rb', line 388
def _layout_for_option(name) case name when String then _normalize_layout(name) when Proc then name when true then Proc.new { |lookup_context, formats| _default_layout(lookup_context, formats, true) } when :default then Proc.new { |lookup_context, formats| _default_layout(lookup_context, formats, false) } when false, nil then nil else raise ArgumentError, "String, Proc, :default, true, or false, expected for `layout'; you passed #{name.inspect}" end end
#_normalize_layout(value) (private)
[ GitHub ]# File 'actionview/lib/action_view/layouts.rb', line 401
def _normalize_layout(value) value.is_a?(String) && !value.match?(/\blayouts/) ? "layouts/#{value}" : value end
#_normalize_options(options)
# File 'actionview/lib/action_view/layouts.rb', line 350
def ( ) # :nodoc: super if _include_layout?( ) layout = .delete(:layout) { :default } [:layout] = _layout_for_option(layout) end end
#initialize
# File 'actionview/lib/action_view/layouts.rb', line 361
def initialize(*) # :nodoc: @_action_has_layout = true super end


While moving through the house, the player will have to contend with various computer-controlled AI players. A director will be responsible for the following:
Pressure at any time in the game. When the player is under a higher amount of "pressure", they will have less ability to steal loot; however, when the "pressure" is reduced, the player will have more scope and space to complete the game's actions.
The first level adversary of the game that the player will face is the ghost. These phantasms represent the stock enemy of the player.
Ghost Attributes:
Will activity hunt the player and arrest them to end the game. When one cop spots the player, he will alert the others via radio. These cops may start activity hunting the player depending on their aggressiveness and menace.
Will walk in their house from room to room. Not activity looking for the player. Will call the police if they see the player. This will then cause the police to spawn in the current map and start hunting the player.
Jobs will happen with a tree. More advanced jobs will be added to the tree when game events happen so enemies will do new things to the player.
A menace value will be calculated at all times to tell the AI director how to build up the AI and what enemies to inject and what hitpoints and aggression the enemies have. Factors that will affect the "menace score" are:


I'm Kevin Koopman
Full-Stack Web Developer
Hello, I'm Kevin Koopman. A Full-Stack Web Developer based in the Netherlands. I like to work with JavaScript, PHP, NodeJS, Laravel and HTML but I am always open to learning new things.
I am a high school student and am programming websites professionally. Besides coding, I like to play videogames, work with and invest in cryptocurrencies, and hang out with friends.
Designed & built by Kevin Koopman
Look at the source-code✨ Featured Work
Kraken
✨ Featured Work
Kraken
A game hosting panel built uppon the open-source app Pterodactyl. Made for managing your game server easier with countless extra features and a nice design.


--- layout: post title: "Hosting a Mercurial Server on IIS7" postId: 407 ---
I've recently been playing with using IIS7 to host a Mercurial server. The process was not particularly complicated but involved lots of steps.
I decided to document the process that I went through. The guide can be found here.


{{ define "main" }} {{ partial "page-title.html" . }} {{ partial "departments.html" . }} {{ partial "executive-leads.html" . }} {{ end }}


John Rhee
Web UI Developer
Build a multi-page marketing website that matches the theme chosen by a group and provides the user with details about the product the team has selected to build.
We are a full stack web development students at Lambda School.
Build a multi-page marketing website that matches the theme chosen by a group and provides the user with details about the product the team has selected to build.
Work in conjunction with the Web UI Developer/s on a team as well as the Front End Framework Developer on the product to deliver a fully functioning web app.
Work in conjunction with the Web UI Developer/s on a team as well as the Front End Framework Developer on the product to deliver a fully functioning web app.
Work in conjunction with the Web UI Developer/s on a team as well as the Front End Framework Developer on the product to deliver a fully functioning web app.
Build a Web API in coordination with the front end team providing the endpoints that the front end needs to complete client requirements and demonstrate proficiency in the skills.
Build a Web API in coordination with the front end team providing the endpoints that the front end needs to complete client requirements and demonstrate proficiency in the skills.


2 Samuel 3:38
And the king said unto his servants, Know ye not that there is a prince and a great man fallen this day in Israel?


Preparation time
overnight
Cooking time
30 mins to 1 hour
Serves
Serves 4
This recipe for poached and fried pork belly gets terrific flavour from the pork. The richness is offset by the pickles.
For the pickled cauliflower, heat the white wine vinegar, sugar, salt and peppercorns in a pan over a medium heat until the sugar has dissolved.
Place the cauliflower and shallots into a bowl and pour over the hot vinegar. Mix together, coating the cauliflower and shallots with the vinegar.
Set aside to pickle, ideally for at least an hour, preferably 24 hours.
For the pork belly, place the pork belly, onion, carrot, parsley, thyme and star anise into a large saucepan.
Fill the pan with cold water, so the pork is covered.
Bring to a boil, then turn down to a simmer and cook for 45 minutes.
Remove from the heat and place the pork belly between two heavy baking trays and place in the fridge for at least two hours to cool and set.
Cut the pork belly into 1cm/½in thick slices.
Heat a frying pan until hot, add a knob of the butter and pork and cook for two minutes on each side. Repeat in batches, adding fresh butter for each batch.
Just before serving, bring a pan of salted water to the boil, add the peas and cook for two minutes until just tender then drain.
Open up the pea pods, but do not pop the peas out. Add the peas in pods to the pickled vegetables and mix to combine.
To serve, place the slices of pork belly on the plate, then spoon the pickled cauliflower, shallots and peas alongside.


Economist Andrew McAfee suggests that, yes, probably, droids will take our jobs — or at least the kinds of jobs we know now. In this far-seeing talk, he thinks through what future jobs might look like, and how to educate coming generations to hold them.
The Just Love Foundation 501c(3) believes in enhancing the opportunities of those from undeserved communities. The unskilled face a challenging future with the continued march towards automating our society. Economic equality can not be achieved through legislation, it will take a deliberate effort to mentor and equip those who are in danger of systematically dwelling under the poverty line.
On November 21st the Just Love Foundation will kick off the fourth annual Benjamin E. Mays scholarship Gala. You can support the effort by purchasing a ticket, ad, or make a donation. I small donation by many goes a long way.


Guidance
Baseline designs: 1,120 place secondary school
Finger-block baseline designs for a 1,120 place 11 to 16 secondary school.
Documents
PDF
,
764KB
,
1 page
This file may not be suitable for users of assistive technology.
Request an accessible format.
If you use assistive technology (such as a screen reader) and need a
version of this document in a more accessible format, please email
<EMAIL_ADDRESS>.
Please tell us what format you need. It will help us if you say what assistive technology you use.
PDF
,
735KB
,
1 page
This file may not be suitable for users of assistive technology.
Request an accessible format.
If you use assistive technology (such as a screen reader) and need a
version of this document in a more accessible format, please email
<EMAIL_ADDRESS>.
Please tell us what format you need. It will help us if you say what assistive technology you use.
PDF
,
714KB
,
1 page
This file may not be suitable for users of assistive technology.
Request an accessible format.
If you use assistive technology (such as a screen reader) and need a
version of this document in a more accessible format, please email
<EMAIL_ADDRESS>.
Please tell us what format you need. It will help us if you say what assistive technology you use.
PDF
,
423KB
,
1 page
This file may not be suitable for users of assistive technology.
Request an accessible format.
If you use assistive technology (such as a screen reader) and need a
version of this document in a more accessible format, please email
<EMAIL_ADDRESS>.
Please tell us what format you need. It will help us if you say what assistive technology you use.
Details
Baseline design for a 1,120 place 11 to 18 finger-block secondary school
The design shown is a 3 storey building for 900 pupils aged 11 to 16 and 220 sixth-form pupils aged 16 to 18. The school is devised as a kit of parts, based on the suites of spaces in the Schedule of Accommodation (SoA).
Such an approach allows:
Other key features of the design
Other key features of the design are that:
-
the dining space provides a central focus to the school and can be used as a milling space during the school day and, in conjunction with the hall and drama space, for after school events
-
ICT is located opposite the dining area for lunchtime activities
-
uninterrupted runs of a 7.8 metre room depth allow both general and practical teaching spaces to be accommodated and facilitate future change
-
voids in the centre of the teaching wings bring daylight into the corridor and the backs of classrooms (they also act as ventilation stacks providing natural ventilation, particularly during the summer)
-
the simple 3 storey teaching wings provide an efficient building form that is easy to extend in future
-
the short and long blocks can be combined in various ways to suit a wide range of school sizes
-
general and practical teaching spaces are organised in suites with a sense of identity, but allowing some variation in the range of spaces
-
each floor, which can serve one or two departments, includes a staff workroom and an office, teaching stores and toilet
-
the library resource area on the first floor and the sixth-form base on the second floor form the bridge between the 2 finger blocks


--- title: Detecting Objects keywords: fastai sidebar: home_sidebar summary: "wrapping `yolov5/detect.py`" description: "wrapping `yolov5/detect.py`" nb_path: "03_detect.ipynb" ---
weight_path = 'ipynb_tests/02_train_datadump/<AutoWeight> - 1/weights/best.pt'
repos = []
repos.append("Image Repo/unlabeled/21-3-18 rowing 8-12 /")
repos.append("Image Repo/unlabeled/21-3-22 rowing (200) 1:53-7:00")
repos.append("Image Repo/unlabeled/21-3-22 rowing (200) 7:50-12:50")
dirs = []
for repo in repos:
files = os.listdir(repo)
absolute_paths = [os.path.join(repo, file) for file in files]
dirs.append(absolute_paths)
detector = Detector(weight_path=weight_path)
samples = dirs[0][3:7] + dirs[1][3:7] + dirs[2][3:7]
for i in range(len(samples)):
res = detector.process_image(samples[i])
print(i, "|", res)
Human-readable information about the class indentities is stored in the data.yaml folder. By default, the data.yaml file is created from the Defaults
class. Let's take a look:
from ModelAssistedLabel.core import Defaults
print(Defaults().data_yaml)
To convert the "names" variable to a python-friendly format, we do the following manipulation:
import ast, re
# needs to be wrapped in quotes to parse as dict
substitute = "names"
#select last line
classlist = Defaults().data_yaml.split("\n")[-1]
#add quotes around `names` ONLY around the start of a string
classlist = re.sub('^%s' % substitute, f"'{substitute}'", classlist)
#surround the string in curly braces to tell python it's a dict
classlist = f"{{{classlist}}}"
# parse string as dict
classlist = ast.literal_eval(classlist)
And now here is the value of the classes as used by yolov5
classlist
Set up a Viewer
object to investigate the behavior of a model
v = Viewer([weight_path], classlist['names'])
%matplotlib inline
results = []
for image in samples:
result = v.plot_for(image)
results.append(result)


Navigation for XOM trees. Note that XOM includes its own navigator which is likely faster and less buggy than this one, though it doesn't provide access to the full Jaxen API.


I once had a conflict with someone I work with over a difference in opinion. It was bad because rather than telling the person (btw I will be using made up gender neutral pronouns for anonymity's sake) how I felt as things came up, I let my anger fester secretly. Then, I did the worst thing you could do when trying to handle a conflict -- I started a conversation with shim about what was bothering me when we were out at a party and had been drinking! It seems that the alcohol gave me the gaul that I didn't have during the work day, and I confronted shim in a way that I ended up being so embarrassed about.
However when I went to apologize to shim about my behavior, I was shocked by shis maturity. (S)he said that how I presented what was bothering me wasn't really an issue for shim. (S)he is used to being the one who gets a little heated when presenting a topic that bothers them, and then having people discount shis views because of how (s)he presented them, and so (s)he was not about to do that to someone else. (S)he had actually listened to and pondered what I had said and taken it into consideration, despite my immature drunken drama.
Ever since then our relationship has been great. I gained so much respect for this person and also realized that I wasn't giving them a fair chance to ammend what it was that was bothering me because I had never made it really clear. Sitting on my anger had been my easy way out: I could blame my difficulties at work on someone else, and that someone else didn't really know they were causing me difficulties, so they weren't going to be fixing it any time soon, so I could potentially complain indefinitely.
If I could go back, I would have been more professional and kind when I aired my grievances. And I would have aired them much sooner. I also hope that in the future, I remember that in a workplace, we are all on the same team and have one common goal: to make the company we work for successful (and "successful" can mean different things, so people should agree on that before they begin to work somewhere). We really shouldn't have goals that are so deeply at odds with each other because that means that someone has a different ffundamental goal than making the team win. Or more likely, there is a misunderstanding about what is the best thing for the company and how to go about it, and people begin to take things personally. I want to remember that really nothing is "personal." Even if someone has a vendetta against you, if you found out why, you would probably see there is more to the picture than what you thought.


Verified
This commit was signed with a
verified signature.
jasonlong
Jason Long
GPG key ID:
UIGYSH7G5D7F86GFD
Learn about signing commits


This is a paragraph.
The border color of this paragraph is same as the text color.
This paragraph has no border.