Introduction
C# is an object-oriented programming language that was developed by Microsoft and has been around since 2001.
Tools used:
Hello World
This is how you create the traditional "Hello World!" program in C#:
Console.WriteLine("Hello World!");
Data Types
Data types fall into 2 caegories: value types and reference types.
Value types contain the actual value of the data they store. Common types include int, string, var, DateTime, etc.
Statements
Statements are commands meaning they perform some action. For example, they might call a method, calculate something, or declare a value.
Statements are formed from tokens: keywords, identifiers (variables), operators, and the statement terminator. Note all statements in C# must be terminated with a semi-colon (;).
Example statement:
int myInt = 0;
Enim natus explicabo so incididunt magni quae veniam. Quo nemo. Nesciunt nulla but sequi for velit and ipsum si or sint. Odit aliqua modi. Ut nostrud. Sint ratione. Architecto vitae and ex fugit, and exercitationem. Quae illum yet aut.
Identifiers
int myInt = 0;
Identifiers are case-sensitive.
Operators
Operators apply operations. For example, they can perform some arithmetic, such as addition or subtraction within the statement.
mySum = 3 + 4;
Decision statements
Loops iterate a task over and over again. For example, this for loop will repeat while i is less than 10:
for (int i = 0; i < 10; i++) {
//Do something
}
Resources
All material is from Microsoft's Introduction to C# course on edX. Note this is an exercise for FreeCodeCamp training only and not intended to be real.


Code Multiple Data Sources at Once¶
With Datavyu, you can code multiple data sources in one spreadsheet. For instance, if you have three different camera views of an experiment, you can bring them together into Datavyu, and code them as one.
Adding multiple data sources is easy, but aligning them perfectly can take some effort. The following sections guide you through the process.
Add Multiple Data Sources¶
To add multiple data sources, simply add a data source using the Data Viewer Controller’s Add Data button. You can add as many data sources as you desire.
Each data source has its own line in the tracks area of the Controller. You can select an individual data source by clicking on its blue bar. When selected, the bar will turn green.
Align Tracks¶
To code your multiple data sources, you need to align them so that times recorded in the spreadsheet are accurate for all data sources.
You will need to locate an event that you can use as the basis for synchronizing your sources. For example, if the lights flashed during the experiment, you could align the tracks at that point.
Align Tracks Manually¶
To align your data sources, select one and drag it to align with the other source. Increasing the zoom using the slider bar in the Controller can give you more granular control, and facilitate precise alignment.
When you have successfully aligned your tracks, select Lock All. This prevents you from accidentally desynchronizing the tracks. You can also lock a single track by clicking on its lock icon to the left of the time slider. This can be helpful while synchronizing multiple tracks.
Align Tracks Using Bookmarks¶
You can also use bookmarks to help synchronize tracks. If you identify a distinct synchronization point, navigate to that point in the first track, and click the Add Bookmark button. This will create a bookmark in that track.
Then, locate the same event in the other data source and bookmark it. When you drag the tracks to align them, they will “snap” and align both bookmarks.
You can repeat this process with all the tracks that you need to synchronize, and then select the Lock All button to lock their arrangement.
Saving Between Datavyu Uses¶
When working with multiple data sources, Datavyu saves the data source synchronization and bookmarks when you save the spreadsheet. This way, when you reopen the spreadsheet to do more coding, or to work with the data, you will not need to re-synchronize the data sources. This also helps ensure consistency between coding passes and reliability coders.


{{include_less}} {{include_js}} {{include_css}}
Toggle navigation
FlipDisplay
Demo
Angular Directive
Contact
{{content}}


Below is a text field with the constants used for this demo (in JSON). Feel free to manipulate them and restart the demo (R) to see how changing the constants affect this particular demo.
WASD -- Move player character.
Shift -- Slow movement.
R -- Restart demo.


|
GPGPU-Sim
|
#include <event_router.hpp>
Classes | |
| struct | tArrivalEvent |
| struct | tTransportEvent |
Public Member Functions | |
| EventRouter (const Configuration &config, Module *parent, const string &name, int id, int inputs, int outputs) | |
| virtual | ~EventRouter () |
| virtual void | ReadInputs () |
| virtual void | WriteOutputs () |
| virtual int | GetUsedCredit (int o) const |
| virtual int | GetBufferOccupancy (int i) const |
| virtual int | GetUsedCreditForClass (int output, int cl) const |
| virtual int | GetBufferOccupancyForClass (int input, int cl) const |
| virtual vector< int > | UsedCredits () const |
| virtual vector< int > | FreeCredits () const |
| virtual vector< int > | MaxCredits () const |
| void | Display (ostream &os=cout) const |
| Public Member Functions inherited from Router | |
| Router (const Configuration &config, Module *parent, const string &name, int id, int inputs, int outputs) | |
| virtual void | AddInputChannel (FlitChannel *channel, CreditChannel *backchannel) |
| virtual void | AddOutputChannel (FlitChannel *channel, CreditChannel *backchannel) |
| FlitChannel * | GetInputChannel (int input) const |
| FlitChannel * | GetOutputChannel (int output) const |
| virtual void | Evaluate () |
| void | OutChannelFault (int c, bool fault=true) |
| bool | IsFaultyOutput (int c) const |
| int | GetID () const |
| vector< int > const & | GetReceivedFlits (int c) const |
| vector< int > const & | GetStoredFlits (int c) const |
| vector< int > const & | GetSentFlits (int c) const |
| vector< int > const & | GetOutstandingCredits (int c) const |
| vector< int > const & | GetActivePackets (int c) const |
| void | ResetFlowStats (int c) |
| int | GetBufferBusyStalls (int c) const |
| int | GetBufferConflictStalls (int c) const |
| int | GetBufferFullStalls (int c) const |
| int | GetBufferReservedStalls (int c) const |
| int | GetCrossbarConflictStalls (int c) const |
| void | ResetStallStats (int c) |
| int | NumInputs () const |
| int | NumOutputs () const |
| Public Member Functions inherited from TimedModule | |
| TimedModule (Module *parent, string const &name) | |
| virtual | ~TimedModule () |
| Public Member Functions inherited from Module | |
| Module (Module *parent, const string &name) | |
| virtual | ~Module () |
| const string & | Name () const |
| const string & | FullName () const |
| void | DisplayHierarchy (int level=0, ostream &os=cout) const |
| void | Error (const string &msg) const |
| void | Debug (const string &msg) const |
Private Member Functions | |
| void | _ReceiveFlits () |
| void | _ReceiveCredits () |
| void | _IncomingFlits () |
| void | _ArrivalRequests (int input) |
| void | _ArrivalArb (int output) |
| void | _SendTransport (int input, int output, tArrivalEvent *aevt) |
| void | _ProcessWaiting (int output, int out_vc) |
| void | _TransportRequests (int output) |
| void | _TransportArb (int input) |
| void | _OutputQueuing () |
| void | _SendFlits () |
| void | _SendCredits () |
| virtual void | _InternalStep () |
Private Attributes | |
| int | _vcs |
| int | _vct |
| vector< Buffer * > | _buf |
| vector< vector< bool > > | _active |
| tRoutingFunction | _rf |
| vector< EventNextVCState * > | _output_state |
| PipelineFIFO< Flit > * | _crossbar_pipe |
| PipelineFIFO< Credit > * | _credit_pipe |
| vector< queue< Flit * > > | _input_buffer |
| vector< queue< Flit * > > | _output_buffer |
| vector< queue< Credit * > > | _in_cred_buffer |
| vector< queue< Credit * > > | _out_cred_buffer |
| PipelineFIFO< tArrivalEvent > * | _arrival_pipe |
| vector< queue< tArrivalEvent * > > | _arrival_queue |
| vector< PriorityArbiter * > | _arrival_arbiter |
| vector< queue< tTransportEvent * > > | _transport_queue |
| vector< PriorityArbiter * > | _transport_arbiter |
| vector< bool > | _transport_free |
| vector< int > | _transport_match |
Definition at line 94 of file event_router.hpp.
| EventRouter::EventRouter | ( | const Configuration & | config, |
| Module * | parent, | ||
| const string & | name, | ||
| int | id, | ||
| int | inputs, | ||
| int | outputs | ||
| ) |
Definition at line 38 of file event_router.cpp.
|
virtual |
Definition at line 138 of file event_router.cpp.
|
private |
Definition at line 454 of file event_router.cpp.
|
private |
Definition at line 398 of file event_router.cpp.
|
private |
Definition at line 309 of file event_router.cpp.
|
privatevirtual |
Implements Router.
Definition at line 167 of file event_router.cpp.
|
private |
Definition at line 699 of file event_router.cpp.
Definition at line 247 of file event_router.cpp.
|
private |
Definition at line 234 of file event_router.cpp.
|
private |
Definition at line 221 of file event_router.cpp.
|
private |
Definition at line 732 of file event_router.cpp.
|
private |
Definition at line 721 of file event_router.cpp.
|
private |
Definition at line 413 of file event_router.cpp.
|
private |
Definition at line 602 of file event_router.cpp.
|
private |
Definition at line 592 of file event_router.cpp.
|
virtual |
Reimplemented from Module.
Definition at line 743 of file event_router.cpp.
|
inlinevirtual |
Implements Router.
Definition at line 181 of file event_router.hpp.
Implements Router.
Definition at line 173 of file event_router.hpp.
Implements Router.
Definition at line 177 of file event_router.hpp.
Implements Router.
Definition at line 172 of file event_router.hpp.
Implements Router.
Definition at line 176 of file event_router.hpp.
|
inlinevirtual |
Implements Router.
Definition at line 182 of file event_router.hpp.
|
virtual |
Implements Router.
Definition at line 161 of file event_router.cpp.
|
inlinevirtual |
Implements Router.
Definition at line 180 of file event_router.hpp.
|
virtual |
Implements Router.
Definition at line 215 of file event_router.cpp.
|
private |
Definition at line 100 of file event_router.hpp.
|
private |
Definition at line 129 of file event_router.hpp.
|
private |
Definition at line 127 of file event_router.hpp.
|
private |
Definition at line 128 of file event_router.hpp.
|
private |
Definition at line 99 of file event_router.hpp.
|
private |
Definition at line 107 of file event_router.hpp.
|
private |
Definition at line 106 of file event_router.hpp.
|
private |
Definition at line 112 of file event_router.hpp.
|
private |
Definition at line 109 of file event_router.hpp.
|
private |
Definition at line 113 of file event_router.hpp.
|
private |
Definition at line 110 of file event_router.hpp.
|
private |
Definition at line 104 of file event_router.hpp.
|
private |
Definition at line 102 of file event_router.hpp.
|
private |
Definition at line 141 of file event_router.hpp.
|
private |
Definition at line 143 of file event_router.hpp.
|
private |
Definition at line 144 of file event_router.hpp.
|
private |
Definition at line 140 of file event_router.hpp.
|
private |
Definition at line 95 of file event_router.hpp.
|
private |
Definition at line 97 of file event_router.hpp.


Our mission statement is to help people without homes to have basic resources. Food. We work with companies to provide food and help increase the nutrition of the homeless.


Sales And Inventory
date
name of establishment
Username
please allocate a unique six-digit number for your items


Hello! My name is Dung but you can call me Tom. This is my test web page for class IT161. Here I will write a bunch of codes and see if they work on a live browser like Chrome.


In general, for Q-Learning to converge to the optimal Q-values....
It is necessary that every state-action pair is visited infinitely often.
(Option 1) In realistic situations, we cannot possibly learn about every single state! - Too many states to visit them all in training
- Too many states to hold the q-tables in memory
Instead, we want to generalize : - Learn about some small number of training states from experience
- Generalize that experience to new, similar states
- This is a fundamental idea in machine learning, and we’ll see it over and over again
It is necessary that the learning rate \(\alpha\) (weight given to new samples) is decreased to \(0\) over time.
(Option 2) We want to reduce the learning rate to ensure that the actions are properly learned
It is necessary that the discount \(\gamma\) is less than \(0.5\)
(Option 3) We want to have a small discount rate so that the rewards are not reduced in value over time if the action is taken later in time but it is not neccessary to have a discount rate less than 0.5
It is necessary that actions get chosen according to \(\arg\max_a Q(s,a)\).
(Option 4) We want to make sure that the actions are taken in such a way that the utility is maximized
Think Realistic Situation. Generalization??
Number Of States To Be Holding Q-Tables In Memory
Utility Function : What Is Desired
Proper Learning Of Actions


|
Saves the current state of the x87 FPU, MMX technology, XMM, and MXCSR registers to a 512-byte memory location specified in the destination operand. The following table shows the layout of the state information in memory.
Layout of FXSAVE and FXRSTOR Memory Region
| Bit # | Description |
| 0-1 | FCW |
| 2-3 | FSW |
| 4 | FTW |
| 5 | Reserved |
| 6-7 | FOP |
| 8-11 | FPU IP |
| 12-13 | CS |
| 14-15 | Reserved |
| 16-19 | FPU DP |
| 20-21 | DS |
| 22-23 | Reserved |
| 24-27 | MXCSR |
| 28-31 | MXCSR_MASK |
| 32-41 | ST0/MM0 |
| 42-47 | Reserved |
| 48-57 | ST1/MM1 |
| 58-63 | Reserved |
| 64-73 | ST2/MM2 |
| 74-79 | Reserved |
| 80-89 | ST3/MM3 |
| 90-95 | Reserved |
| 96-105 | ST4/MM4 |
| 106-111 | Reserved |
| 112-121 | ST5/MM5 |
| 122-127 | Reserved |
| 128-137 | ST6/MM6 |
| 138-143 | Reserved |
| 144-153 | ST7/MM7 |
| 154-159 | Reserved |
| 160-175 | XMM0 |
| 176-191 | XMM1 |
| 192-207 | XMM2 |
| 208-223 | XMM3 |
| 224-239 | XMM4 |
| 240-255 | XMM5 |
| 256-271 | XMM6 |
| 272-287 | XMM7 |
| 288-512 | Reserved |
The destination operand contains the first byte of the memory image, and it must be aligned on a 16-byte boundary. A misaligned destination operand will result in a general-protection (#GP) exception being generated (or in some cases, an alignment check exception [#AC]).
The FXSAVE instruction is used when an operating system needs to perform a context switch or when an exception handler needs to save and examine the current state of the x87 FPU, MMX technology, and/or XMM and MXCSR registers.
The fields in the table above are as follows:
- FCW
- x87 FPU Control Word (16 bits). See Figure 8-6 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for the layout of the x87 FPU control word.
- FSW
- x87 FPU Status Word (16 bits). See Figure 8-4 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for the layout of the x87 FPU status word.
- FTW
- x87 FPU Tag Word (8 bits). The tag information saved here is abridged, as described in the following paragraphs. See Figure 8-7 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for the layout of the x87 FPU tag word.
- FOP
- x87 FPU Opcode (16 bits). The lower 11 bits of this field contain the opcode, upper 5 bits are reserved. See Figure 8-8 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for the layout of the x87 FPU opcode field.
- FPU
- IP x87 FPU Instruction Pointer Offset (32 bits). The contents of this field differ depending on the current addressing mode (32-bit or 16-bit) of the processor when the FXSAVE instruction was executed: 32-bit mode -> 32-bit IP offset, 16-bit mode -> low 16 bits are IP offset with the high 16 bits being reserved. See "x87 FPU Instruction and Operand (Data) Pointers" in Chapter 8 of the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for a description of the x87 FPU instruction pointer.
- CS
- x87 FPU Instruction Pointer Selector (16 bits).
- FPU
- DP x87 FPU Instruction Operand (Data) Pointer Offset (32 bits). The contents of this field differ depending on the current addressing mode (32-bit or 16- bit) of the processor when the FXSAVE instruction was executed: 32-bit mode -> 32-bit IP offset, 16-bit mode -> low 16 bits are IP offset with the high 16 bits being reserved. See "x87 FPU Instruction and Operand (Data) Pointers" in Chapter 8 of the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for a description of the x87 FPU operand pointer.
- DS
- x87 FPU Instruction Operand (Data) Pointer Selector (16 bits).
- MXCSR
- MXCSR Register State (32 bits). See Figure 10-3 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for the layout of the MXCSR register. If the OSFXSR bit in control register CR4 is not set, the FXSAVE instruction may not save this register. This behavior is implementation dependent.
- MXCSR_MASK
- MXCSR_MASK (32 bits). This mask can be used to adjust values written to the MXCSR register, ensuring that reserved bits are set to 0. Set the mask bits and flags in MXCSR to the mode of operation desired for SSE and SSE2 SIMD floating-point instructions. See "Guidelines for Writing to the MXCSR Register" in Chapter 11 of the IA-32 Intel Architecture Software Developer's Manual, Volume 1, for instructions for how to determine and use the MXCSR_MASK value.
- ST0/MM0 through ST7/MM7
- x87 FPU or MMX technology registers. These 80-bit fields contain the x87 FPU data registers or the MMX technology registers, depending on the state of the processor prior to the execution of the FXSAVE instruction. If the processor had been executing x87 FPU instruction prior to the FXSAVE instruction, the x87 FPU data registers are saved; if it had been executing MMX instructions (or SSE or SSE2 instructions that operated on the MMX technology registers), the MMX technology registers are saved. When the MMX technology registers are saved, the high 16 bits of the field are reserved.
- XMM0 through XMM7
- XMM registers (128 bits per field). If the OSFXSR bit in control register CR4 is not set, the FXSAVE instruction may not save these registers. This behavior is implementation dependent.
The FXSAVE instruction saves an abridged version of the x87 FPU tag word in the FTW field (unlike the FSAVE instruction, which saves the complete tag word). The tag information is saved in physical register order (R0 through R7), rather than in top-of-stack (TOS) order. With the FXSAVE instruction, however, only a single bit (1 for valid or 0 for empty) is saved for each tag. For example, assume that the tag word is currently set as follows:
| R7 | R6 | R5 | R4 | R3 | R2 | R1 | R0 |
| [body]11 | xx | xx | xx | 11 | 11 | 11 | 11[/body] |
| Here, 11B indicates empty stack elements and "xx" indicates valid (00B), zero (01B), or special (10B). |
For this example, the FXSAVE instruction saves only the following 8 bits of information:
| R7 | R6 | R5 | R4 | R3 | R2 | R1 | R0 |
| [body]0 | 1 | 1 | 1 | 0 | 0 | 0 | 0[/body] |
| Here, a 1 is saved for any valid, zero, or special tag, and a 0 is saved for any empty tag. |
The operation of the FXSAVE instruction differs from that of the FSAVE instruction, the as follows:
- FXSAVE instruction does not check for pending unmasked floating-point exceptions. (The FXSAVE operation in this regard is similar to the operation of the FNSAVE instruction).
- After the FXSAVE instruction has saved the state of the x87 FPU, MMX technology, XMM, and MXCSR registers, the processor retains the contents of the registers. Because of this behavior, the FXSAVE instruction cannot be used by an application program to pass a "clean" x87 FPU state to a procedure, since it retains the current state. To clean the x87 FPU state, an application must explicitly execute an FINIT instruction after an FXSAVE instruction to reinitialize the x87 FPU state.
- The format of the memory image saved with the FXSAVE instruction is the same regardless of the current addressing mode (32-bit or 16-bit) and operating mode (protected, real address, or system management). This behavior differs from the FSAVE instructions, where the memory image format is different depending on the addressing mode and operating mode. Because of the different image formats, the memory image saved with the FXSAVE instruction cannot be restored correctly with the FRSTOR instruction, and likewise the state saved with the FSAVE instruction cannot be restored correctly with the FXRSTOR instruction.
Note that The FSAVE format for FTW can be recreated from the FTW valid bits and the stored 80-bit FP data (assuming the stored data was not the contents of MMX technology registers) using the following table:
Recreating FSAVE Format
| Exponent all 1's | Exponent all 0's | Fraction all 0's | J and M bits | FTW valid bit | x87 FTW |
| 0 | 0 | 0 | 0x | 1 | Special 10 |
| 0 | 0 | 0 | 1x | 1 | Valid 00 |
| 0 | 0 | 1 | 00 | 1 | Special 10 |
| 0 | 0 | 1 | 10 | 1 | Valid 00 |
| 0 | 1 | 0 | 0x | 1 | Special 10 |
| 0 | 1 | 0 | 1x | 1 | Special 10 |
| 0 | 1 | 1 | 00 | 1 | Zero 01 |
| 0 | 1 | 1 | 10 | 1 | Special 10 |
| 1 | 0 | 0 | 1x | 1 | Special 10 |
| 1 | 0 | 0 | 1x | 1 | Special 10 |
| 1 | 0 | 1 | 00 | 1 | Special 10 |
| 1 | 0 | 1 | 10 | 1 | Special 10 |
| Any legal | Any legal | Any legal | Any legal | 0 | Empty 11 |
The J-bit is defined to be the 1-bit binary integer to the left of the decimal place in the mantissa.
The M-bit is defined to be the most significant bit of the fractional portion of the mantissa (i.e., the bit immediately to the right of the decimal place).
When the M-bit is the most significant bit of the fractional portion of the mantissa, it must be 0 if the fraction is all 0's.
|


This is a tool to work with Lambda calculs. It was meant to be used mostly for academic purposes, reducing terms to their normal form, thus, being interpreter in some sense
The syntax we are using extends the default lambda calculus syntax to make expressions shorter removing
redundant symbols. Despite the changes any correct lambda term is also correct under our conditions.
λ
is the symbol for abstraction.
To simplify expressins we agree on when brackets can be skipped. The rules are as follows:
A
and B
are terms, and x
is a variable,
then λx.AB
is a term in this engine, and is equivalent to (λx.(AB))
lambda
termA
, B
and C
are terms, then ABC
is a term in this
engine, and is equivalent to (AB)C
lambda termλx.(λy.A)
is a lambda term, then λxy.A
is a term in this engine equivalent to
itThe term for church numerals addition would look like λm.(λn.(λf.(λx.((mf)((nf)x)))))
, and can be
expressed with λmnfx.mf(nfx)
in this engine, thus being significantly shorter and easier to type
and interpret by human.
There is also a specific syntax to define sub-terms to be used in later expressions. If a line starts with
!
symbol it is assumed a sub-term definition line.
Definition goes as follows:
!name=term
where name is any character sequence not containing =
symbol and term is
any correct term. In the following lines "name"
would be replaced by term
. Enough
alpha-conversions would be applied to make no variables conflict after substitution, thus any non-bound
variables would stau non-bound after substitution
For several reasons another syntax would be used. If term used for sub-term definition has beta-normal form,
one might use !!
in the beginning of the line, instead of !
. This would make engine
define normal form of the term
ti this name, instead of the term
itself. This
should not be used carelessly, because normal form computation of sub-terms is not limited by anything, and
would get stuck in infinite loop if term doesn't have normal form.
Whenever a computation needs to be performed via user requirement, the following happens:
!
are
ignored!
symbol, starting from top to the bottom
=
symbol is parsed.!!
term is reduced to its normal formNote that substitutions are done only when necessary. Sub-term with the given name being undefined is not an error and would only cause term to be not substituted when it is required. Also not that any amount of unnecessary alpha-conversions can be applied in any evaluation
Main input box is the box at the top of the screen, occupying most of it. It is used to input all terms and
sub-terms. For simplicity, you can use Alt+L
to type in λ
symbol.
The value in this box is the number of atomic operations that can be performed by user-requested evaluation
before it is aborted. Value of -1
means unlimited evaluation
This section is about user-requested evaluations that lead to normal form of the term
This button reduces the term with only one normal-order beta-reduction, thus guaranteeing that if term has normal form and button is clicked enough times the normal form would eventually be reached. The resulting term would be appended to the main input box. If the term is already in normal form, the resulting term would be the same as input
This button requests reducing the term to its beta-normal form. Terms normal form is appended to the main input box
If this checkbox is checked, when term is reduced to normal form, the intermediate result would be appended to the main input box after every beta-reduction applied. Checking this significantly reduces performance
Whenever this checkbox is checked, sub-terms would be replaced with their names whenever an output is appended to the main input box. Only the terms that are exactly the same, or that can be converted to the sub-term with only alpha conversions and adding and removing unnecessary brackets, defined by agreements, would be replaced with the name


KISS 💋 News Blog Install KISS Team Guidestones FAQ
Community (NEW) Scrots Package System Testimonials Style
Ports (non-x86-64) Software Contact Donate GitHub ->
+-------------------------------------------------------+
| |
| KISS PACKAGE SYSTEM |
| |
| * The distribution employs a package system based |
| around the concept of easily parseable plain-text |
| files (*separated by lines and spaces*). |
| |
| * This format allows effortless interface using any |
| programming language or just basic UNIX tools. |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| DIRECTORY STRUCTURE |
| |
| zlib/ # Package name. |
| |- build # Build script (chmod +x). |
| |- sources # Remote and local sources. |
| |- version # Package version. |
| |
| # Optional files. |
| |
| |- depends # Dependencies (usually required). |
| |- pre-remove # Pre-remove script (chmod +x). |
| |- post-install # Post-install script (chmod +x). |
| |- patches/* # Directory to store patches. |
| |- files/* # Directory to store misc files. |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| BUILD |
| |
| * The build file should contain all of the steps |
| necessary to patch, configure, make and install |
| ('make install' in this context) the package. |
| |
| * The file is language agnostic and the only |
| requirement is that it be executable. |
| |
| * On execution the script will start in the |
| directory of the package's source (no need to cd). |
| |
| * The script is also given a single argument |
| (equivalent to 'script arg'), this argument |
| contains the path where the script should |
| install the compiled files. |
| |
| * Everything in the path is added to the package |
| tarball and later installed to the system. |
| |
| |
| EXAMPLE |
| |
| #!/bin/sh -e |
| |
| # Disable stripping (add this only if needed). |
| :> nostrip |
| |
| ./configure \ |
| --prefix=/usr |
| |
| make |
| make DESTDIR="$1" install |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| DEPENDS |
| |
| * The depends file should contain any other packages |
| the package depends on to function correctly. |
| |
| * Each dependency should be listed one per line and |
| an optional second field allows for the |
| distinction between a compile time dependency and |
| a run time one. |
| |
| * The optional second field should be set to 'make' |
| for compile time dependencies and left blank for |
| runtime dependencies. |
| |
| * The depends file can be omitted entirely if the |
| package has no dependencies. |
| |
| |
| EXAMPLE |
| |
| # Comments are also supported. |
| |
| # Perl is needed at compile time. |
| perl make |
| |
| # zlib is needed at runtime. |
| zlib |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| SOURCES |
| |
| * The sources file should contain all remote and |
| local files needed by the package during the build. |
| |
| * This includes the source, patches and any other |
| miscellaneous files which may be needed. |
| |
| * Each source should be listed one per line. |
| An optional second field specifies an extraction |
| directory (relative to the build directory). |
| |
| * Sources which pull from a git repository use a |
| special syntax. An additional prefix 'git+' should |
| be added with an optional suffix #hash or #branch). |
| |
| |
| EXAMPLE |
| |
| https://example.com/dhcpcd-8.0.2.tar.xz |
| files/dhcpcd.run |
| |
| |
| EXAMPLE (WITH SECOND FIELD) |
| |
| https://example.com/gcc-9.1.0.tar.xz gcc |
| https://example.com/gmp-6.1.2.tar.xz gcc/gmp |
| https://example.com/mpfr-4.0.2.tar.xz gcc/mpfr |
| https://example.com/mpc-1.1.0.tar.gz gcc/mpc |
| |
| |
| EXAMPLE (GIT) |
| |
| git+https://github.com/dylanaraps/eiwd |
| |
| # Grabbing a specific branch. |
| git+https://github.com/dylanaraps/eiwd@branch |
| |
| # Grabbing a specific commit. |
| git+https://github.com/dylanaraps/eiwd#commit |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| VERSION |
| |
| * The version file should contain a single line with |
| two fields. All other lines will be ignored. |
| |
| * The first field should contain the software's |
| upstream version and the second field should |
| contain the version number of the repository |
| files themselves. |
| |
| * If the package is using a git source to pull |
| down the latest commit, the version should be |
| simply set to git. |
| |
| |
| EXAMPLE |
| |
| 1.2.3 1 |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| PRE-REMOVE |
| |
| * The pre-remove file should contain anything that |
| needs run prior to the removal of the package. |
| |
| * The file is language agnostic and the only |
| requirement is that it be executable. |
| |
| |
| EXAMPLE |
| |
| #!/bin/sh -e |
| |
| printf 'No one has used this yet!\n' |
| printf 'I have no example!\n' |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| POST-INSTALL |
| |
| * The post-install file should contain anything that |
| needs to be run after a package installation to |
| properly setup the software. |
| |
| * The file is language agnostic and the only |
| requirement is that it be executable. |
| |
| |
| EXAMPLE |
| |
| #!/bin/sh -e |
| |
| /usr/sbin/update-ca-certificates --fresh |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| PATCHES/* |
| |
| * The patches directory should contain any patches |
| the software needs. |
| |
| * In the `sources` file patches are referred to by |
| using a relative path (patches/musl.patch). |
| |
| * The package manager does not automatically apply |
| patches. This must be done in the build script |
| of the package. |
| |
| * The build script has direct access to the patches |
| in its current working directory. |
| |
| |
| EXAMPLE SOURCES FILE |
| |
| https://example.com/rxvt-unicode-9.22.tar.bz2 |
| patches/gentables.patch |
| patches/rxvt-unicode-kerning.patch |
| |
| |
| EXAMPLE BUILD FILE |
| |
| #!/bin/sh -e |
| |
| patch -p1 < rxvt-unicode-kerning.patch |
| patch -p1 < gentables.patch |
| |
| ./configure \ |
| --prefix=/usr |
| |
| make |
| make DESTDIR="$1" install |
| |
| |
+-------------------------------------------------------+
+-------------------------------------------------------+
| |
| FILES/* |
| |
| * The files/ directory should contain any |
| miscellaneous files the software needs. |
| |
| * In the sources file, files are referred to by |
| using a relative path (files/busybox.config). |
| |
| * The build script has direct access to the files |
| in its current working directory. |
| |
| |
| EXAMPLE SOURCES FILE |
| |
| https://example.com/kiss-1.0.0.tar.gz |
| files/kiss_path.sh |
| |
| |
| EXAMPLE BUILD FILE |
| |
| #!/bin/sh -e |
| |
| install -D kiss "$1/usr/bin/kiss" |
| |
| # Accessible directly in '$PWD'. |
| install -D kiss_path.sh "$1/etc/kiss_path.sh" |
| |
| |
+-------------------------------------------------------+
The registered trademark Linux(R) is used pursuant to a
sublicense from the Linux Foundation, the exclusive
licensee of Linus Torvalds, owner of the mark on a
worldwide basis.
(C) Dylan Araps 2019-2020
View page source


There once was a dog
The action takes place on a Ukrainian farm. The elderly watchdog Dog is no longer needed by anyone, and the owners decide to drive him out of the yard. The last straw that overflowed their patience was that the Dog did not raise an alarm during the theft that happened at night in the dog’s house. To the aid of the Dog, who escaped into the forest after he was kicked out of the house, and who was ready to take his own life, his former foe Wolf came. He helps Dog to demonstrate his need to the previous owners: he cleverly stage the abduction of the master's baby, and Dog pretends that he defeats the Wolf and saves the baby. In return, the Dog is returned with honors to the farm.


|
Native Library
|
#include <Vector.hpp>
Public Types | |
| typedef std::vector< E >::iterator | iterator |
| typedef std::vector< E >::const_iterator | const_iterator |
Public Member Functions | |
| Vector () | |
| Vector (int initialCapacity) | |
| Vector (int initialCapacity, int capacityIncrement) | |
| Vector (const std::initializer_list< E > &list) | |
| Vector (const Vector< E > &target) | |
| virtual | ~Vector () |
| boolean | add (const E &element) |
| void | add (int index, const E &element) |
| boolean | addAll (const std::initializer_list< E > &list) |
| boolean | addAll (int index, const std::initializer_list< E > &list) |
| void | addElement (const E &element) |
| int | capacity () const |
| void | clear () |
| Vector< E > | clone () const |
| boolean | contains (const E &element) const |
| boolean | containsAll (const std::initializer_list< E > &list) |
| void | copyInto (Array< E > &anArray) const |
| E | elementAt (int index) const |
| void | ensureCapacity (int minCapacity) |
| boolean | equals (const Vector< E > &target) const |
| E | firstElement () |
| E | get (int index) const |
| int | hashCode () const |
| int | indexOf (const E &element) const |
| int | indexOf (const E &element, int index) |
| void | insertElementAt (const E &element, int index) |
| boolean | isEmpty () const |
| E | lastElement () const |
| int | lastIndexOf (const E &element) const |
| int | lastIndexOf (const E &element, int index) const |
| ListIterator< E > | listIterator () const |
| ListIterator< E > | listIterator (int index) |
| E | remove (int index) |
| boolean | remove (const Object &element) |
| boolean | removeAll (const std::initializer_list< E > &list) |
| void | removeAllElements () |
| boolean | removeElement (const Object &element) |
| void | removeElementAt (int index) |
| boolean | retainAll (const std::initializer_list< E > &list) |
| E | set (int index, const E &element) |
| void | setElementAt (const E &element, int index) |
| void | setSize (int newSize) |
| int | size () const |
| void | sort (Comparator< E > comparator) |
| Spliterator< E > | spliterator () const |
| List< E > | subList (int fromIndex, int toIndex) const |
| Array< E > | toArray () const |
| Array< E > | toArray (const Array< E > &anArray) const |
| void | trimToSize () |
| String | toString () const |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| iterator | end () |
| const_iterator | end () const |
| const_iterator | cend () const |
| E & | operator[] (const int index) |
| const E & | operator[] (const int index) const |
| Vector< E > & | operator= (const Vector< E > &target) |
| Vector< E > & | operator= (const std::initializer_list< E > &list) |
Protected Member Functions | |
| void | removeRange (int fromIndex, int toIndex) |
Protected Attributes | |
| std::vector< E > | original |
| int | capacityIncrement |
| typedef std::vector<E>::const_iterator Java::Util::Vector< E >::const_iterator |
| typedef std::vector<E>::iterator Java::Util::Vector< E >::iterator |
|
inline |
Vector Constructor Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero.
|
inline |
Vector Constructor Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.
| initialCapacity |
| - | if the specified initial capacity is negative |
|
inline |
Vector Constructor Constructs an empty vector with the specified initial capacity and capacity increment.
| initialCapacity | |
| capacityIncrement |
| - | if the specified initial capacity is negative |
|
inline |
|
inline |
|
inlinevirtual |
Vector Destructor
|
inline |
|
inline |
Inserts a new element to the specified index in this Vector.
| index | |
| element |
|
inline |
Appends all of the elements in the specified initializer list to the end of this Vector.
| list |
|
inline |
Inserts all of the elements in the specified initializer list into this Vector at the specified index.
| index | |
| list |
|
inline |
Adds an element to the end of this Vector.
| element |
|
inline |
Returns an iterator pointing to the first element in the Vector.
|
inline |
Returns a const_iterator pointing to the first element in the Vector.
|
inline |
Return capacity (current number of slots allocated for this Vector).
|
inline |
Returns a const_iterator pointing to the first element in the Vector.
|
inline |
Returns a const_iterator pointing to the past-the-end element in the Vector.
|
inline |
Clears all element inside this Vector.
|
inline |
Returns a clone of this Vector.
|
inline |
|
inline |
Returns true if this Vector contains all of the elements in the specified initializer list.
| list |
|
inline |
Copies the components of this vector into the specified array.
| anArray |
|
inline |
Gets an element at specified index.
| index |
|
inline |
Returns an iterator referring to the past-the-end element in the Vector.
|
inline |
Returns a const_iterator referring to the past-the-end element in the Vector.
|
inline |
|
inline |
|
inline |
Returns the first element (index = 0) of this Vector.
|
inline |
Gets an element at specified index.
| index |
|
inline |
Returns the hash code value for this Vector.
|
inline |
Returns index of an element in this Vector or returns -1 if the element is not found.
| element |
|
inline |
Returns the index of the first occurrence of the specified element in this Vector, searching forwards from index, or returns -1 if the element is not found.
| element | |
| index |
|
inline |
Inserts the specified element at the specified index in this Vector.
| element | |
| index |
|
inline |
Checks this Vector is empty or not.
|
inline |
Returns an iterator over the elements in this list in proper sequence.
|
inline |
|
inline |
Returns the index of the last occurrence of the specified element in this Vector, searching backwards from index, or returns -1 if the element is not found.
| element | |
| index |
|
inline |
Returns a list iterator over the elements in this list (in proper sequence).
|
inline |
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.
| index |
|
inline |
Assignment operator. Assigns values from right side operands to left side operand.
| target |
|
inline |
Assignment operator. Assigns values from right side operands to left side operand.
| list |
|
inline |
Array operator. Uses this operator to access an element at the specified index.
| index |
|
inline |
|
inline |
|
inline |
Removes the first occurrence of the specified element in this Vector.
| element |
|
inline |
Removes from this Vector all of its elements that are contained in the specified initializer list.
| list |
|
inline |
Removes all elements of this Vector.
|
inline |
Removes the first (lowest-indexed) occurrence of the argument from this ector.
| element |
|
inline |
Deletes the element at the specified index.
| index |
|
inlineprotected |
Removes all of the elements of this Vector that satisfy the given predicate.
| filter |
| fromIndex | |
| toIndex |
|
inline |
Removes all of the elements of this collection that satisfy the given predicate.
| filter |
| unaryOperator | Retains only the elements in this Vector that are contained in the specified initializer list. |
| list |
|
inline |
Replaces the element at the specified index with the specified element.
| index | |
| element |
|
inline |
Sets the element at the specified index of this Vector to be the specified element.
| element | |
| index |
|
inline |
Sets the size of this Vector.
| newSize |
|
inline |
Returns size (number of elements) of this Vector.
|
inline |
Sorts this list according to the order induced by the specified Comparator.
| comparator |
|
inline |
Creates a late-binding and fail-fast Spliterator over the elements in this list.
|
inline |
Returns a view of the portion of this List between fromIndex, inclusive, and toIndex, exclusive.
| fromIndex | |
| toIndex |
|
inline |
Returns an array containing all of the elements in this Vector in the correct order.
|
inline |
Returns an array containing all of the elements in this Vector in the correct order; the runtime type of the returned array is that of the specified array.
| anArray |
|
inline |
Returns a string representation of this Vector, containing the String representation of each element.
|
inline |
|
protected |
|
protected |


Nigerian Army Moves Yaba Units To Epe, Gives Reason
by Donatus AnichukwuezeThe Nigerian Army has relocated some of its units and formations located at Yaba to Epe to pave way for the expansion of railway project in Lagos State.
The units relocated were the 81 Division Base Ordinance Depot, printing press and tailoring factory, NAN reports.
The Chief of Army Staff, Lt.-Gen. Tukur Buratai, during the groundbreaking for the construction on Saturday, disclosed that the relocation would lead to enhanced military presence in the area.
“We have to come back because of the federal government’s new drive to modernise the transport sector by establishing new standard dual gauge railway system for our country.
“I want to use this opportunity to appreciate the cooperation of the honourable minister of transportation, in facilitating the prompt approval and release of fund that has made this a laudable project a reality.
“The minister was very supportive of the Nigerian army throughout the negotiation for the movement of this unit out of Yaba for the speedy completion of negotiations and of course the funding,” he said.
The Army Chief also commended the paramount ruler of Epe, Oba Kamorudeen Animashaun, for his continuous support for Nigerian army in its operations and the relocation of the unit base to the area.
The Minister of Transportation, Rotimi Amaechi, represented by Deputy Director, Rail Transport Services, Barry Odii, said that the ministry decided to support army because of its cooperation in relocating the units from Yaba railway corridor.
“The groundbreaking ceremony for the construction of new office and a residential accommodation, as well as other facilities for 81 Division Ordinance Corps, will mark a significant milestone in the history of transportation sector and the country at large.
“It is an exhibition of an excellent intercourse between the Nigerian army and the Federal ministry of transportation,” he said.


Radar images are centered on SPC severe weather reports and extracted from the closest hourly data in GridRad which can be downloaded from the Research Data Archive. The original ~2x2km 3D data are converted to 2D by calculating the column maximum reflectivity. These values are then converted to 8-bit integers and interpolated to a 3.75 km Lambert conformal conic grid using nearest neighbor. The 136 x 136 dimensions result in a region approximately 512 x 512 km.
136 x 136 pixel (~512 x 512 km) images with units of dBZ. The center of the radar image is the location of the report. You can download the raw data, view individual maps centered on reports, or view all reports on an interactive map for each year.
Geogrid parameters:
Description of the columns in the CSV are as follows:
The unid column is based on the report time in UTC and "om" identifier from the "1950-2018_actual_tornadoes.csv" file on the SPC severe weather reports page. You should be able to easily join these data with those data to attach more attributes.
The data are provided at no cost, as-is, with no warranty of any kind. No modification of either the SPC reports or the GridRad data (beyond interpolation) is done before these data are hosted on the website. The process is completely repeatable from start to finish, assuming you have patience or access to a supercomputer cluster. Please examine the GridRad and the SPC severe weather reports pages to read about the caveats and issues with those data before using these data.
| Severe reports closer to 30 minutes after the hour will have images with displaced reflectivity and the level of displacement is dependent on storm motion. |
| No attempt is made to remove reports with incorrect positions or those that have no radar data. A csv is provided that includes basic radar reflectivity statistics which make it possible to filter these events. |
| The 3.75 km LCC Grid has larger grid spacing than the original data. This will result in some detail being lost. This was a decision made to reduce the size of the dataset on disk and on GPU. |
| The raw data are originally "upside down" because of how the grid was defined. The image browser on this website provides flipped images. However, the tarball data will have the original orientation that matches up with the LCC grid. Please take the time to examine what you are throwing into your ConvNet! |
We are generating these data solely because we think they would be of interest to the meteorology and climatology community. That being said, we would like to get some credit if you find them useful!
Haberlie, A. M., W. S. Ashley, and M. Karpinski, 2020: Mean storms: Composites of radar reflectivity images during two decades of severe thunderstorm events. International Journal of Climatology, In Press.
Bowman, K. P., and C. R. Homeyer. 2017. GridRad - Three-Dimensional Gridded NEXRAD WSR-88D Radar Data. Research Data Archive at the National Center for Atmospheric Research, Computational and Information Systems Laboratory.


Topic
Partitions on Cluster
Topic Not Found
Looks like we couldn't find any information about this topic!
Partition
Leader
Replicas
Topic
Configuration on Cluster
Topic Not Found
Looks like we couldn't find any information about this topic!
Config
Value
Status
Action
Modify topic [[${topic}]]
×
Config
Value


The Legend of Bum-Bo, a prequel to The Binding of Isaac, is out now
by Shaun PrescottEdmund McMillen, he of The Binding of Isaac, Super Meat Boy and The End is Nigh fame, has just released a new game. The Legend of Bum-Bo is a "puzzle based deckbuilding roguelike" which undoubtedly looks like a McMillen game, except it has a gloriously unusual cardboard cut-out aesthetic.
Co-developed with James Interactive, it's described as a prequel to The Binding of Isaac, and one of its features is "poop".
"...Players collect hordes of items that can be modified, upgraded and comboed with others in many interesting ways," so reads the Steam description. "Play as one of many Bum-bo, each with its own unique abilities, as they smash, bash and splash their way through a variety of cardboard monstrosities, giant bosses and dark personal urges..."
Check out the release trailer below:


A binary format I/O framework for Lua
Here are some examples file descriptions using Lunary.
png.lua contains a partial description of the PNG file format. It can parse the chunk structure, and some chunk content (like embedded texts), but not actual image data. Two helpers scripts allow converting PNG files to and from Lua, png2lua and lua2png respectively.
riff.lua contains a partial description of the RIFF file format. It can parse the chunk structure, and some chunk content from WAV or AVI files (like embedded texts), but not actual sound or video data. Two helpers scripts allow converting RIFF files to and from Lua, riff2lua and lua2riff respectively.
Not shipped with this project, but available online is a description of met files used by popular eDonkey2000 clients like eMule. It is more complex than the examples above, but they are more complete, in two senses. They use almost all built-in Lunary data types. They are also complete in the sense that they describe all fields of supported .met files. It is therefore possible to generate .met files from scratch using that library.
The serial/met.lua file describes all the .met files formats. The met2lua script can convert met files to a Lua equivalent and vice-versa.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/frames.html ---
Are frames in mathlib? https://ncatlab.org/nlab/show/frame
I quote:
A frame O is a poset that has
all small coproducts, called joins ⋁
all finite limits, called meets ∧
and which satisfies the infinite distributive law:
x∧(⋁iyi)≤⋁i(x∧yi)
for all x,{yi}i in A
(Note that the converse holds in any case, so we have equality.)
Seems like we have all the ingredients.
Note that the notion dual to a frame is called a locale and these are the gadgets that people use to do topology without points. It seems that mathlib is also fond of doing topology without points, so maybe there is a general interest for these things.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Class
Package
Package (Short)
Inner Class
Inner Class (Details)
Inner Class Method
Inner Object
Inner Object (Details)
Inner Type
Method
Method (Simple)
Overload 1
Overload 2
Symbolic Method +
Symbolic Method %
Symbolic Method %22 - Improperly encoded link generated by scaladoc
Object
Nested Class
Nested Class (Details)
Nested Object
Nested Object (Details)
Nested Type
Object Method


The req
object represents the HTTP request and has properties
for the request query string, parameters, body, HTTP headers, and so on.
In this documentation and by convention, the object is always referred to
as req
(and the HTTP response is res
) but its
actual name is determined by the parameters to the callback function in
which you’re working.
For example:
But you could just as well have:
The req
object is an enhanced version of Node’s own request
object and supports all
built-in fields and methods.
In Express 4, req.files
is no longer available on the
req
object by default. To access uploaded files on the
req.files
object, use multipart-handling middleware like
busboy,
multer,
formidable,
multiparty,
connect-multiparty, or pez.


Hollesley bay absconder 'should not be approached', say police
by Katy SandallsPolice are appealing for help to find a prisoner missing from Hollesley Bay.
Paul Luttman, 49, failed to return to prison on Wednesday afternoon following his release on temporary licence.
He had been allowed to go to the Cleveland in north Yorkshire for home leave from November 11 to November 13.
Luttman is serving a sentence of just under seven year for burglary offences.
A spokesman for Suffolk police said that Luttman should not be approached and that anyone who believes they may have seen him should contact them on 101 quoting CAD 262 of November 13.


"""Models related to data associations."""
import json
import os
import shutil
from typing import Union
import requests
from pydent.base import ModelBase
from pydent.marshaller import add_schema
from pydent.models.crud_mixin import JSONDeleteMixin
from pydent.models.crud_mixin import JSONSaveMixin
from pydent.relationships import HasOne
from pydent.relationships import JSON
from pydent.utils import make_async
# TODO: changing the value of a association (and saving it) shouldn't be difficult
[docs]class DataAssociatorMixin:
"""Mixin for handling data associations."""
def _make_association(self, key, value, parent, upload=None):
association = self.session.DataAssociation.new(
object=json.dumps({key: value}),
upload=upload,
key=key,
parent_id=parent.id,
parent_class=parent.__class__.__name__,
)
association.parent = parent
return association
[docs] def associate(self, key, value, upload=None, create_new=False, save=None):
"""Adds a data association with the key and value to this object.
:param key: Key of the association
:type key: str
:param value: a json serializable object
:type value: dict | str | int | float
:param upload: optional file to upload
:type upload: File
:param create_new: if True (default) will create a new association instead
of updating the existing association.
:tuype create_new: bool
:return: newly created or updated data association
:rtype: DataAssociation
"""
if save is None:
if self.id is None:
save = False
else:
save = True
if create_new:
association = None
else:
association = self.get_data_association(key)
if not association:
if save:
return self.session.utils.create_data_association(
self, key, value, upload=upload
)
else:
association = self._make_association(key, value, self, upload)
self.append_to_many("data_associations", association)
return association
else:
association.value = value
association.upload = upload
association.parent_class = self.__class__.__name__
association.parent_id = self.id
association.parent = self
if save:
self._try_update_data_association(association)
return association
def delete_data_associations(self, key):
associations = self.get_data_associations(key)
for a in associations:
if a.id:
a.delete()
self.data_associations.remove(a)
def _try_update_data_association(self, association):
upload = association.upload
if upload and upload.id:
association.upload_id = upload.id
if self.id:
if association.upload and not association.upload.id:
association.upload.save()
association.upload_id = association.upload.id
association.save()
return association
# return self.session.utils.create_data_association(
# self, key, value, upload=upload
# )
# if unique_key:
# existing_associations = self.get_data_associations(key)
# for association in existing_associations:
# association.value = value
# association.upload = upload
# association.upload_id = upload.id
# association.save()
# else:
# self.session.utils.create_data_association(
# self, key, value, upload=upload
# )
# def save_data_associations(self):
# if self.is_deserialized('data_associations'):
#
[docs] def associate_file(self, key, value, file, job_id=None):
"""Associate a file.
:param key: association key
:type key: str or json
:param value: association value
:type value: str or json
:param file: file to create :class:`Upload`
:type file: file object
:param job_id: optional job_id to associate the :class:`Upload`
:type job_id: int
:return: new data association
:rtype: :class:`DataAssociation`
"""
u = self.session.Upload.new(job_id=job_id, file=file)
return self.associate(key, value, upload=u)
[docs] def associate_file_from_path(self, key, value, filepath, job_id=None):
"""Associate a file from a filepath.
:param key: association key
:type key: str or json
:param value: association value
:type value: str or json
:param filepath: path to file to create :class:`Upload`
:type filepath: str
:param job_id: optional job_id to associate the :class:`Upload`
:type job_id: int
:return: new data association
:rtype: :class:`DataAssociation`
"""
with open(filepath, "rb") as f:
return self.associate_file(key, value, f, job_id=job_id)
def get_data_association(self, key: Union[None, str]):
das = self.get_data_associations(key)
if das:
return das[0]
def get_data_associations(self, key: Union[None, str]):
das = []
if self.data_associations:
for da in self.data_associations:
if da.key == key:
das.append(da)
return das
# TODO: DataAssociation - do we really want to have this return either a list or
# single value? How are people using this?
def get(self, key):
val = []
for da in self.get_data_associations(key):
val.append(da.value)
if len(val) == 1:
return val[0]
elif len(val) == 0:
return None
return val
class DataAssociationSaveContext:
def __init__(self, model: DataAssociatorMixin):
self.model = model
self.data_associations = []
def __enter__(self):
if self.model.is_deserialized("data_associations"):
self.data_associations = self.model.data_associations
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type:
return
for da in self.data_associations:
da.parent_id = self.model.id
self.model._try_update_data_association(da)
assert da.id
self.model.data_associations = self.data_associations
[docs]@add_schema
class DataAssociation(JSONDeleteMixin, JSONSaveMixin, ModelBase):
"""A DataAssociation model."""
fields = dict(object=JSON(), upload=HasOne("Upload"))
@property
def value(self):
return self.object.get(self.key, None)
@value.setter
def value(self, new_value):
self.object = {self.key: new_value}
# def save(self):
# if self.upload and not self.upload_id:
# self.upload.save()
# self.upload_id = self.upload_id
# super().save()
#
# data_association = self.parent.session.DataAssociation.find(self.id)
# if data_association.id not in [da.id for da in self.parent.data_associations]:
# self.parent.data_associations.append(data_association)
# return data_association
# else:
# for da in self.parent.data_associations:
# if da.id == data_association.id:
# return da
def save(self):
if self.parent_id is None:
raise ValueError("Cannot save DataAssociation. `parent_id` cannot be None")
if self.parent_class is None:
raise ValueError(
"Cannot save DataAssociation. `parent_class` cannot be None"
)
super().save(do_reload=True)
def __str__(self):
return self._to_str("id", "object")
[docs]@add_schema
class Upload(ModelBase):
"""An Upload model."""
fields = dict(job=HasOne("Job"))
def __init__(self, job_id=None, file=None):
"""Create a new upload.
:param job_id: job id to associate the upload to
:type job_id: int
:param file: file to upload
:type file: file object
"""
super().__init__(job_id=job_id)
self.file = file
query_hook = dict(methods=["size", "name", "job"])
# def _get_uploads_from_job_id(self, job_id):
def _get_uploads_from_job(self):
http = self.session._http
return http.get("krill/uploads?job={}".format(self.job_id))["uploads"]
def temp_url(self):
data = self.session.Upload.where({"id": self.id}, methods=["expiring_url"])[
0
].raw
return data["expiring_url"]
[docs] @staticmethod
def _download_file_from_url(url, outpath):
"""Downloads a file from a url.
:param url: url of file
:type url: str
:param outpath: filepath of out file
:type outpath: str
:return: http response
:rtype: str
"""
response = requests.get(url, stream=True)
with open(outpath, "wb") as out_file:
shutil.copyfileobj(response.raw, out_file)
return response.raw
[docs] @staticmethod
@make_async(1)
def async_download(uploads, outdir=None, overwrite=True):
"""Asynchronously downloads from list of :class:`Upload` models.
:param uploads: list of Uploads
:type uploads: list
:param outdir: path to output directory to save downloaded files
:type outdir: str
:param overwrite: if True, will overwrite existing files
:type overwrite: bool
:return: list of filepaths
:rtype: list
"""
return Upload._download_files(uploads, outdir, overwrite)
[docs] @staticmethod
def _download_files(uploads, outdir, overwrite):
"""Downloads uploaded file from list of :class:`Upload` models.
:param uploads: list of Uploads
:type uploads: list
:param outdir: path to output directory to save downloaded files (defaults to
current directory)
:type outdir: str
:param overwrite: if True, will overwrite existing files (default: True)
:type overwrite: bool
:return: list of filepaths
:rtype: list
"""
filepaths = []
for upload in uploads:
filepath = upload.download(outdir=outdir, overwrite=overwrite)
filepaths.append(filepath)
return filepaths
[docs] def fetch(self, outdir: str = None, filename: str = None, overwrite: bool = True):
"""Alias for `download`
:param outdir: path of directory of output file (default is current directory)
:param outfile: filename of output file (defaults to upload_filename)
:param overwrite: whether to overwrite file if it already exists
:return: filepath of the downloaded file
"""
return self.download(outdir=outdir, filename=filename, overwrite=overwrite)
[docs] def download(
self, outdir: str = None, filename: str = None, overwrite: bool = True
):
"""Downloads the uploaded file to the specified output directory. If no
output directory is specified, the file will be downloaded to the
current directory.
:param outdir: path of directory of output file (default is current directory)
:param outfile: filename of output file (defaults to upload_filename)
:param overwrite: whether to overwrite file if it already exists
:return: filepath of the downloaded file
"""
if outdir is None:
outdir = "."
if filename is None:
filename = "{}_{}".format(self.id, self.upload_file_name)
filepath = os.path.join(outdir, filename)
if not os.path.exists(filepath) or overwrite:
self._download_file_from_url(self.temp_url(), filepath)
return filepath
@property
def data(self):
"""Return the data associated with the upload."""
result = requests.get(self.temp_url())
return result.content
[docs] def create(self):
"""Save the upload to the server."""
return self.session.utils.create_upload(self)
def save(self):
return self.create()


public class ActivityService extends BaseService
| Constructor and Description |
|---|
ActivityService() |
| Modifier and Type | Method and Description |
|---|---|
Activity |
createActivity(java.lang.String name,
java.lang.String description,
java.lang.String venue)
Creates new Activity object and attaches it to the database
Prerequisites:
- no other activity exists with the same name
|
boolean |
deleteActivity(Activity activity)
Deletes a specific activity along with all its individual sessions
Prerequisites:
- No users must be signed up for this activity (its Membership objects list must be empty)
|
boolean |
deleteActivitySessions(Activity activity)
Deletes all sessions of a specific activity
Prerequisites:
- No registers must exist for any of the sessions
|
java.util.List<Activity> |
findActivitiesByDate(java.util.Date date)
Find all activities that have sessions on a given date
|
Activity |
findActivityByName(java.lang.String name)
Find an activity by its name
|
User |
findActivityTutor(java.lang.String name)
Find the tutor for an activity
|
java.util.List<Activity> |
findAllActivities()
Finds all activities
|
java.util.List<ActivitySession> |
findAllSessions()
Find all activity sessions on any date
|
java.util.List<ActivitySession> |
findAllSessionsByActivity(Activity activity)
Find all sessions for a specific activity on any date
|
java.util.List<ActivitySession> |
findSessionsByDate(java.util.Date date)
Find all activity sessions on a given date
|
boolean |
updateActivity(Activity activity)
Updates activity
|
public Activity createActivity(java.lang.String name, java.lang.String description, java.lang.String venue)
name
- the name of this activitydescription
- a short description of the activityvenue
- the venue where the activity sessions take placepublic boolean updateActivity(Activity activity)
activity
- public boolean deleteActivity(Activity activity)
activity
- public boolean deleteActivitySessions(Activity activity)
activity
- public java.util.List<Activity> findAllActivities()
public Activity findActivityByName(java.lang.String name)
name
- activity namepublic java.util.List<Activity> findActivitiesByDate(java.util.Date date)
date
- date of interestpublic User findActivityTutor(java.lang.String name)
name
- activity namepublic java.util.List<ActivitySession> findSessionsByDate(java.util.Date date)
date
- date of interestpublic java.util.List<ActivitySession> findAllSessionsByActivity(Activity activity)
public java.util.List<ActivitySession> findAllSessions()


Message
Doctor Form
Hospital Name
Select Hospital
Schedule Days
Available
Not Available
Set Timing
Appointment type
Select Type
Number Of Patient
Time slot for each patient
Total patients / minutes for each patient
Name
Mobile
Email
Address
Speciality
submit


|
MoveToCode
|
Defines the interactions and data that an articulated hand can provide. More...
Public Member Functions | |
| ArticulatedHandDefinition (IMixedRealityInputSource source, Handedness handedness) | |
| void | UpdateHandJoints (Dictionary< TrackedHandJoint, MixedRealityPose > jointPoses) |
| Updates the current hand joints with new data. More... | |
| void | UpdateCurrentIndexPose (MixedRealityInteractionMapping interactionMapping) |
| Updates the MixedRealityInteractionMapping with the latest index pose and fires a corresponding pose event. More... | |
Protected Attributes | |
| readonly IMixedRealityInputSource | inputSource |
| readonly Handedness | handedness |
Properties | |
| float | EnterPinchDistance [get, set] |
| The distance between the index finger tip and the thumb tip required to enter the pinch/air tap selection gesture. More... | |
| float | ExitPinchDistance [get, set] |
| The distance between the index finger tip and the thumb tip required to exit the pinch/air tap gesture. More... | |
| MixedRealityInteractionMapping[] | DefaultInteractions [get] |
| The articulated hands default interactions. More... | |
| bool | IsInPointingPose [get] |
| Calculates whether the current pose allows for pointing/distant interactions. More... | |
| bool | IsPinching [get] |
| Calculates whether the current the current joint pose is selecting (air tap gesture). More... | |
Defines the interactions and data that an articulated hand can provide.
| Microsoft.MixedReality.Toolkit.Input.ArticulatedHandDefinition.ArticulatedHandDefinition | ( | IMixedRealityInputSource | source, |
| Handedness | handedness | ||
| ) |
| void Microsoft.MixedReality.Toolkit.Input.ArticulatedHandDefinition.UpdateCurrentIndexPose | ( | MixedRealityInteractionMapping | interactionMapping | ) |
Updates the MixedRealityInteractionMapping with the latest index pose and fires a corresponding pose event.
| interactionMapping | The index finger's interaction mapping. |
| void Microsoft.MixedReality.Toolkit.Input.ArticulatedHandDefinition.UpdateHandJoints | ( | Dictionary< TrackedHandJoint, MixedRealityPose > | jointPoses | ) |
Updates the current hand joints with new data.
| jointPoses | The new joint poses. |
|
protected |
|
protected |
|
get |
The articulated hands default interactions.
A single interaction mapping works for both left and right articulated hands.
|
getset |
The distance between the index finger tip and the thumb tip required to enter the pinch/air tap selection gesture.
The pinch gesture enter will be registered for all values less than the EnterPinchDistance. The default EnterPinchDistance value is 0.02 and must be between 0.015 and 0.1.
|
getset |
The distance between the index finger tip and the thumb tip required to exit the pinch/air tap gesture.
The pinch gesture exit will be registered for all values greater than the ExitPinchDistance. The default ExitPinchDistance value is 0.05 and must be between 0.015 and 0.1.
|
get |
Calculates whether the current pose allows for pointing/distant interactions.
|
get |
Calculates whether the current the current joint pose is selecting (air tap gesture).


#include <GLResources.hpp>
|
| static uint32_t | CreateTexture2D (const std::string &path, bool gamma) |
| |
| static uint32_t | CreateTexture2D (const std::string &path, std::size_t &retWidth, std::size_t &retHeight, bool gamma) |
| |
| static uint32_t | CreateSkybox (const std::string &skyboxDir, const std::string &extension) |
| |
| static uint32_t | CreateHDREnvMap (const std::string &path) |
| |
◆ CreateHDREnvMap()
| uint32_t GLResources::CreateHDREnvMap |
( |
const std::string & |
path | ) |
|
|
static |
◆ CreateSkybox()
| uint32_t GLResources::CreateSkybox |
( |
const std::string & |
skyboxDir, |
|
|
const std::string & |
extension |
|
) |
| |
|
static |
◆ CreateTexture2D() [1/2]
| uint32_t GLResources::CreateTexture2D |
( |
const std::string & |
path, |
|
|
bool |
gamma |
|
) |
| |
|
static |
◆ CreateTexture2D() [2/2]
| uint32_t GLResources::CreateTexture2D |
( |
const std::string & |
path, |
|
|
std::size_t & |
retWidth, |
|
|
std::size_t & |
retHeight, |
|
|
bool |
gamma |
|
) |
| |
|
static |
The documentation for this class was generated from the following files:
- C:/Users/User/Desktop/Github/Procedural-Terrain-Estimator/Renderer/TerrainRenderer/GLResources.hpp
- C:/Users/User/Desktop/Github/Procedural-Terrain-Estimator/Renderer/TerrainRenderer/GLResources.cpp


How to create a custom IE8 Accelerator
Microsoft has introduced a new feature in Internet Explorer 8 called “Accelerators”. These accelerators help you quickly perform your everyday browsing tasks without navigating to other websites to get things done. Simply highlight text from any webpage, and then click on the blue Accelerator icon that appears above your selection to perform the respective task.
How to create an “Accelerator”?
Well it’s a pretty simple two step process:
- Create XML file
- Create accelerator installation link
Let us create a simple accelerator which queries IMDB for movie titles and displays the result.
IMDB Accelerator
On closer observation, we find that URL for search page of IMDB is of form
http://www.imdb.com/find?q=SearchString
where “SearchString” is the string you are querying for. With this information, lets start making the accelerator.
Step 1: Create XML File
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="UTF-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<homepageUrl>http://www.imdb.com </homepageUrl>
<display>
<name>Search IMDB </name>
<icon>http://www.imdb.com/favicon.ico </icon>
</display>
<activity category="Search">
<activityAction context="selection">
<execute action="http://www.imdb.com/find">
<parameter name="q" value="{selection}" type="text" />
</execute>
</activityAction>
</activity>
</openServiceDescription>
This XML file is called the service description file and it contains specific description about the service provider and type of service it provides. The {selection} value on Line 11 refers to the text that you may highlight on a web page before performing the search. Save this file as search.xml.
Step 2: Create accelerator installation link
To let users use our accelerator, we will create a install button. Users can install the accelerator using this link. Here the code for link:
1
Install Accelerator
That’s it, you are done. Install the accelerator and start searching.
You will find your accelerator in “All Accelerators” context menu item.


Police: Victim carjacked, kidnapped by suspects disguised as officers in California
by KGTV StaffCHULA VISTA, Calif. – Police in Southern California are investigating an overnight carjacking and kidnapping involving perpetrators disguised as law enforcement.
The incident was reported just before midnight Tuesday in the Rancho Del Rey III neighborhood in East Chula Vista.
Police said a group of men, armed with guns and wearing bullet proof vests, were driving in two white Ford Expedition SUVs, which appeared to look like squad vehicles.
The suspects shined lights on the victim forcing him to drive his Renault SUV to Paseo Del Rey Park, located between Telegraph Canyon Road and East J Street. The suspects released the victim at the park, according to police.
The victim, described only as male, walked 40 minutes to a residence on J Street to call 9-1-1, police said. He was not hurt in the incident, police said.
The suspect vehicles and the stolen SUV are still outstanding, according to police. All three SUVs had Baja California vehicle plates.
Chula Vista police said that while the suspects were dressed to appear like officers, they were not wearing police insignia. No further description or information about the suspects is available at this time.
Anyone with information about this incident is urged to call the Chula Vista Police Department.
This story was originally published by Mario Sevilla at KGTV.


---
layout: post
authors: ["Greg Wilson"]
title: "A Reproducibility Reading List"
date: 2016-11-01
time: "00:08:30"
tags: ["Noticed"]
---
Prof. Lorena Barba has just posted
a reading list for reproducible research
that includes ten key papers:
- Schwab, M., Karrenbach, N., Claerbout, J. (2000) Making scientific computations reproducible, Comp. Sci. Eng. 2(6):61–67, doi: 10.1109/5992.881708
- Donoho, D. et al. (2009), Reproducible research in computational harmonic analysis, Comp. Sci. Eng. 11(1):8–18, doi: 10.1109/MCSE.2009.15
- Reproducible Research, by the Yale Law School Roundtable on Data and Code Sharing, Comp. Sci. Eng. 12(5): 8–13 (Sept.-Oct. 2010), doi:10.1109/mcse.2010.113
- Peng, R. D. (2011), Reproducible research in computational science, Science 334(6060): 1226–1227, doi: 10.1126/science.1213847
- Diethelm, Kai (2012) The limits of reproducibility in numerical simulation, Comp. Sci. Eng. 14(1): 64–72, doi: 10.1109/MCSE.2011.21
- Setting the default to reproducible (2013), ICERM report of the Workshop on Reproducibility in Computational and Experimental Mathematics (Providence, Dec. 10–14, 2012), Stodden et al. (eds.), https://icerm.brown.edu/tw12-5-rcem/ // report PDF
- Sandve, G. K. et al. (2013), Ten simple rules for reproducible computational research, PLOS Comp. Bio. (editorial), Vol. 9(10):1–4, doi: 10.1371/journal.pcbi.1003285
- Leek, J. and Peng, R (2015), Opinion: Reproducible research can still be wrong: Adopting a prevention approach, PNAS 112(6):1645–1646, doi: 10.1073/pnas.1421412111
- M. Liberman, “Replicability vs. reproducibility — or is it the other way around?,” Oct. 2015, http://languagelog.ldc.upenn.edu/nll/?p=21956
- Goodman, S. N., Fanelli, D., & Ioannidis, J. P. (2016). What does research reproducibility mean? Science Translational Medicine 8(341), 341ps12–341ps12, doi: 10.1126/scitranslmed.aaf5027
The papers themselves are great,
but what really adds value is the way they're ordered, analyzed, and connected.
If you're trying to make sense of all this,
or trying to help others do so,
it's a great place to start.


IronAHK is a powerful and easy to use scripting language which features:
To get started read the quick-start tutorial.
Hello world on Windows and Linux:
MsgBox, Hello World!
A basic countdown timer with a user interface (full source):
Gui, Add, GroupBox, w255 r3 Section, Select
Gui, Add, Text, xs+10 ys+25 Section, Time:
Gui, Add, Edit, vTimeValue ys-2 Limit3 gValidate
Gui, Add, UpDown, vTime Range1-60, 10
Gui, Add, Radio, vSecs, Seconds
Gui, Add, Radio, vMins xp+65 yp Checked, Minutes
Gui, Font, bold
Gui, Add, Button, vRun ys-4 w65 Default gRun, Start
Gui, Font
Gui, Add, GroupBox, xm w255 r4 Section, Progress
Gui, Font, s24 bold, Calibri
Gui, Add, Text, vCount xs+10 ys+20 w235 Center, 00:00
Gui, Add, Progress, vProgress wp r0.5 -Smooth
Gui, Font
GuiControl, Focus, Time
Gui, Show, , Countdown Timer
Return
Editing files with regular expressions and calculations:
FileRead, text, temperatures.txt
RegExMatch(text, "([+\-]?\d+(?:\.\d+))°[Cc]", celcius)
fahrenheit := celcius * 9 / 5 + 32
StringReplace, newText, text, %celcius%, %fahrenheit%°F
FileAppend, %newText%, temperatures_f.txt
For any questions and advice visit the community forum where you can also share scripts and learn from code written by others.
The IRC is also a great place get help and chat in real time to other users - #ahk on freenode.
For reporting bugs and submitting patches please leave a message on our Google Group.


---
layout: null
section-type: about
title: About
---
## About
Ankit Sachdeva is an awesome person. He built his first computer when he was 13 years old. In his spare time, Ankit likes to take awesome photos with his camera.
Happy Birthday Ankit! Everyone (especially all of us at the Jain family) knows that you're going to become a billionaire one day. This is our million dollar contribution to helping you get there. Have an awesome day and year, and we can't wait to see the fantastic things you do!


4 ‘Hidden Figures’ women to be honored with Congress medal
NEWPORT NEWS, Va. (AP) - Four black women who gained national attention in a recent book and movie for groundbreaking NASA work in Virginia during space-race years will receive special awards from Congress.
The Daily Press of Newport News reports President Donald Trump signed into law on Friday the “Hidden Figures Congressional Gold Medal Act,” which will recognize Katherine Johnson and Christine Darden, as well as the late Dorothy Vaughan and Mary Jackson.
Johnson is known for calculating trajectories for famous flights by astronauts Alan Shepard and John Glenn. Vaughan became a computer programming expert, while Jackson and Darden were pioneering engineers working at the Langley Research Center.
Bill backers include Virginia Sens. Mark Warner and Tim Kaine. They say the four failed to receive their deserved recognition for far too long.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


Your order hasn't shipped yet but we will send you ane email when it does.
View or manage your order
Free Shipping over 48 state*
30 Days Money Back Guarantee
Availeble 24/7
Lorem ipsum dolor sit amet, consectetur adipisicing
Lorem ipsum dolor sit amet, consectetur adipisicing elit. At itaque temporibus.


Register new user
Username:
Password:
Full name:
Age:
Register
Login existing user
Username:
Password:
Login
Welcome to Team 1 Secret Diary Front End
Public Diary Entries


AnimateCSSPlugin
Bounce
Flash
Pulse
Rubber Band
Shake
Swing
Animate it
Coded with <3 by Waren Gonzaga


It would be nice if someone develops a "Chat" integrated in BBLOG for BBLOG Users. So Players can ask whether someone want to play with them and so on. It also would be nice if there are a few Chatrooms like "German", "English", "French", ...
So, thank you!
Post edited 1 x times, last by
xXJumpyXx
Helping Hand
xXJumpyXx
Helping Hand
We had a chat added some time ago.
It was an IRC chat integrated in BBLog, it turned out to be a ghost town 99% of the time.
EDIT: Oops, forgot I was in the Custom Plugins forum, lol.


Home
Infection Data
Stock Prices
Labor Statistics
Inflation
About
Labor Statistics
USA
Japan
France
Germany
United Kingdom
Click on a line in the graph to learn more about the country's labor statistics.


core package¶
Submodules¶
core.common_helpers module¶
-
class
core.common_helpers.
FileHelper
[source]¶ Bases:
object
Defines a set of common file operations.
-
static
read_file
(file_path)[source]¶ Reads a file.
Parameters: file_path ( str
) – The path to the file to read.Returns: The file’s content. Return type: str
-
static
read_file_as_ascii
(file_path)[source]¶ Reads a file and transliterates the content to ascii.
Parameters: file_path ( str
) – The path to the file to read.Returns: The file’s content as ascii. Return type: str
-
static
read_lines
(file_path)[source]¶ Reads a file’s lines.
Parameters: file_path ( str
) – The path to the file to read.Returns: The file’s lines. Return type: str
-
static
read_lines_as_ascii
(file_path)[source]¶ Reads a file’s lines as ascii.
Parameters: file_path ( str
) – The path to the file to read.Returns: The file’s lines as ascii. Return type: str
-
static
-
class
core.common_helpers.
StringHelper
[source]¶ Bases:
object
Defines a set of common string operations.
-
static
ascii_from_unicode
(str, ascii_list='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')[source]¶ Converts a unicode character string into an ascii string.
Parameters: Returns: An ascii string.
Return type:
-
static
ascii_from_unicode_transliteration
(str)[source]¶ Transliterate unicode character string into an ascii string.
Parameters: str ( str
) – A unicode character string to transliterate.Returns: An ascii string. Return type: str
-
static
is_ascii_character
(character, ascii_list='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')[source]¶ Determines whether or not a provided character is ascii.
Parameters: Returns: True if ascii, False otherwise.
Return type:
-
static
-
class
core.common_helpers.
TimeHelper
[source]¶ Bases:
object
Defines a set of common time operations.
-
class
core.common_helpers.
TorchHelper
[source]¶ Bases:
object
Defines a set of common torch operations.
-
static
create_adam_optimizer
(parameters, learning_rate)[source]¶ Creates an ADAM optimizer.
Parameters: - parameters (
iterable
) – The iterable set of parameters to optimize. - learning_rate (
float
) – The learning rate.
Returns: The constructed ADAM optimizer.
Return type: Adam
- parameters (
-
static
create_cross_entropy_loss
()[source]¶ Creates a cross entropy loss cirterion.
Returns: The criterion. Return type: torch.nn.modules.loss.CrossEntropyLoss
-
static
create_sgd_optimizer
(parameters, learning_rate)[source]¶ Creates an SGD optimizer.
Parameters: - parameters (
iterable
) – The iterable set of parameters to optimize. - learning_rate (
float
) – The learning rate.
Returns: Return type: SGD
- parameters (
-
static
load
(file_path, use_cuda=False)[source]¶ Loads an object.
Parameters: Returns: The loaded object.
Return type:
-
static
core.corpus module¶
-
class
core.corpus.
Corpus
(train_file_path, validation_file_path, test_file_path)[source]¶ Bases:
object
Defines a Corpus.
-
train
¶ torch.LongTensor
– The trained data represented as indices from the constructed vocabulary.
-
validation
¶ torch.LongTensor
– The validation data represented as indices from the constructed vocabulary.
-
test
¶ torch.LongTensor
– The test data represented as indices from the constructed vocabulary.
-
vocabulary
¶ Vocabulary
– The vocabulary constructed from the train, validation and test files.
-
create_batch
(data, offset, batch_size, sequence_length, use_cuda=False, eval_mode=False)[source]¶ Create a batch of a given sized composed of a defined length instances starting from a given offset.
Parameters: - data (
torch.LongTensor
) – The batched data to split. - offset (
int
) – The offset to start with. - batch_size (
int
) – The size of the batch. - sequence_length (
int
) – The length of the sequence. - use_cuda (
bool
) – Determines whether or not to move the data to the GPU. - eval_mode (
bool
, optional) – Whether or not we are in evaluation mode.
Returns: The split data where the first value is the input of type
torch.autograd.Variable
and the second value is the target data of typetorch.autograd.Variable
.Return type: - data (
-
create_batches
(data, batch_size, use_cuda)[source]¶ Creates batches from the provided data set.
Parameters: Returns: The batched data.
Return type: torch.LongTensor
-
create_random_batch
(data, batch_size, sequence_length, use_cuda=False, eval_mode=False)[source]¶ Create a random batch of a given size composed of defined length instances.
Parameters: Returns: The split data where the first value is the input of type
torch.autograd.Variable
and the second value is the target data of typetorch.autograd.Variable
.Return type:
-
static
load
(file_path)[source]¶ Loads the corpus from a file path.
Parameters: file_path ( str
) – The path to the file to load the corpus from.Returns: The loaded corpus. Return type: Corpus
-
save
(file_path)[source]¶ Saves the current instance to the provided file path.
Parameters: file_path ( str
) – The path to the file to store the corpus.
-
split_batched_data
(data, index, sequence_length, use_cuda=False, eval_mode=False)[source]¶ Splits the batched data into input and target data.
Parameters: Returns: The split data where the first value is the input of type
torch.autograd.Variable
and the second value is the target data of typetorch.autograd.Variable
.Return type:
-
core.data_processor module¶
-
class
core.data_processor.
DataProcessor
(end_of_sequence_token=None, numeric_token=None, unknown_token=None)[source]¶ Bases:
object
Defines the base set of functionality to process a data set into words or characters.
-
class
core.data_processor.
PennTreeBankProcessor
(train_batch_size=None, eval_batch_size=None, use_cuda=False)[source]¶ Bases:
core.data_processor.DataProcessor
Defines the Penn Tree Bank data processor.
-
character_items_from_string
(string)[source]¶ Parses a string as character items.
Parameters: string ( str
) – The string to process.Returns: The list of character items. Return type: list
ofstr
-
process_corpus_as_characters
(corpus)[source]¶ Processes a corpus and its data as character items.
Parameters: corpus ( Corpus
) – The corpus to process.Returns: The updated corpus with processed data. Return type: Corpus
-
core.prediction module¶
-
class
core.prediction.
CharacterRNNPredictor
(rnn, vocabulary, use_cuda=False)[source]¶ Bases:
core.prediction.RNNPredictor
Defines the CharacterRNNPredictor class used to predict characters or words when using a CharacterRNN model.
-
predict_chars
(context, temperature, count)[source]¶ Predicts characters given a context and a temperature.
Parameters: Returns: The list of predicted items.
Return type: list
ofobject
-
predict_sentence
(context, temperature, max_word_count)[source]¶ Predicts a sentence given a context and a temperature.
Parameters: Returns: The list of predicted items.
Return type: list
ofobject
-
predict_sentences
(context, temperatures, max_word_count)[source]¶ Predicts a sentence given a context and multiple temperatures.
Parameters: Returns: The list of predicted sentences.
Return type: list
oflist
ofobject
-
-
class
core.prediction.
RNNPredictor
(rnn, vocabulary, tensor_from_item)[source]¶ Bases:
object
Defines the RNNPredictor class used to predict sequences given an RNN model.
-
create_state
(context, batch_size=1)[source]¶ Initializes and creates the state of the model given a context.
Parameters: Returns: The updated state of the model.
Return type:
-
next_state
(state, input)[source]¶ Updates the state of the model given an input.
Parameters: - state (
tuple
) – The state of the model. - input – The input to update the model with.
Returns: The updated state of the model.
Return type: - state (
-
next_state_given_item
(state, item)[source]¶ Updates the state of the model given an item.
Parameters: Returns: The updated state of the model.
Return type:
-
predict
(context, temperature, count)[source]¶ Predicts a number of items given a context and a temperature.
Parameters: Returns: The list of predicted items.
Return type: list
ofobject
-
predict_iterator
(context, temperature, count)[source]¶ Generates a number of items given a context and a temperature.
Parameters: Yields: object
– The next predicted item.
-
predict_many_next
(state, temperatures)[source]¶ Predicts the next items given a the models state and multiple temperatures.
Parameters: Returns: The predicted items.
Return type: list
ofobject
-
predict_many_next_indices
(state, temperatures)[source]¶ Predicts many next item indicesgiven a the models state and multiple temperatures.
Parameters: Returns: The predicted indices.
Return type: list
ofint
-
predict_next
(state, temperature)[source]¶ Predicts the next item given a the models state and a temperature.
Parameters: Returns: The predicted item.
Return type:
-
predict_next_index
(state, temperature)[source]¶ Predicts the next index of an item given a the models state and a temperature.
Parameters: Returns: The predicted index.
Return type:
-
predict_while
(context, temperature, condition)[source]¶ Predicts items given a context and a temperature while the provided condition resolves to True.
Parameters: Notes
The condition gets called on every iteration prior to generating the value and two parameters are provided in the following order:
Returns: The list of predicted items. Return type: list
ofobject
-
predict_while_iterator
(context, temperature, condition)[source]¶ Generates a items given a context and a temperature while the provided condition resolves to True.
Parameters: Notes
The condition gets called on every iteration prior to generating the value and two parameters are provided in the following order:
Yields: object
– The next predicted item.Examples
>>> def not_end_of_word(count, item): >>> return item != " " and item != "<eos>" >>> print([item for item in predictor.predict_while_iterator(context, temperature, not_end_of_word)])
-
core.rnn module¶
-
class
core.rnn.
CharacterRNN
(config)[source]¶ Bases:
core.rnn.RNN
Defines a character recurrent neural network.
-
dropout
¶ torch.nn.Dropout
– The dropout to use while training.
-
encoder
¶ torch.nn.Embedding
– The item encoder.
-
rnn
¶ torch.nn.Module
– The recurrent nerual network.
-
decoder
¶ torch.nn.Linear
– The item decoder.
-
-
class
core.rnn.
PersonalizedCharacterRNN
(config)[source]¶ Bases:
core.rnn.CharacterRNN
Defines a personalized character recurrent neural network.
-
dropout
¶ torch.nn.Dropout
– The dropout to use while training.
-
encoder
¶ torch.nn.Embedding
– The item encoder.
-
rnn
¶ torch.nn.Module
– The recurrent nerual network.
-
decoder
¶ torch.nn.Linear
– The item decoder.
-
-
class
core.rnn.
RNN
(config)[source]¶ Bases:
torch.nn.modules.module.Module
Defines a recurrent neural network.
-
dropout
¶ torch.nn.Dropout
– The dropout to use while training.
-
encoder
¶ torch.nn.Embedding
– The item encoder.
-
rnn
¶ torch.nn.Module
– The recurrent nerual network.
-
decoder
¶ torch.nn.Linear
– The item decoder.
Creates the recurrent neural network hidden state.
Parameters: batch_size ( int
, optional) – The input batch size.Returns: The hidden state. Return type: torch.autograd.Variable
-
-
class
core.rnn.
RNNConfig
(term_count, embedding_size, hidden_size, layer_count=2, type='GRU', init_weight_randomly=False, dropout=0.0, tie_weights=False)[source]¶ Bases:
object
Defines a recurrent neural network configuration.
int
– The amount of hidden units per layer.
-
type
¶ str
, optional – The type of recurrent neural network to create: ‘LSTM’ or ‘GRU’. By default, we use GRU.
-
init_weight_randomly
¶ bool
, optional – Determines whether or not the weights should be initialized randomly. By default, we do not initialize the weights randomly.
-
dropout
¶ float
, optional – The dropout parameter to use. By default, the value is zero (no dropout).
-
tie_weights
¶ bool
, optional – Determines whether or not the weights should be tied. By default, weights are not tied.
-
copy
()[source]¶ Makes a copy of the instance.
Returns: The copy of the configuration. Return type: RNNConfig
core.vocabulary module¶
-
class
core.vocabulary.
Vocabulary
(items=[], item_index_map={}, eos_item=None, numeric_item=None, unknown_item=None)[source]¶ Bases:
object
Defines a vocabulary of items of any type.
Allows the representation and conversion of items for a language model.
-
add
(item)[source]¶ Add an item to the vocuabulary.
Parameters: item ( object
) – The item to add to the vocabulary.Returns: True if exists, False otherwise. Return type: bool
-
copy
()[source]¶ Makes copy of this instance.
Returns: The copy of this instance. Return type: Vocabulary
-
static
create_item_index_map
(items)[source]¶ Creates an index map from a set of items.
Parameters: items ( list
) – The list of items to create and index map from.Returns: An item index map where the keys are items and the values are the corresponding index. Return type: dict
-
eos_item
()[source]¶ Defines the end of sequence item.
Returns: The end of sequence item. Return type: object
-
classmethod
from_list
(items, eos=None)[source]¶ Creates a Vocabulary instance from a set of items.
Parameters: - items (
list
) – The list of items to create the vocabulary with. - eos (
object
, optional) – If provided, the item used to indicate the end of sequence.
Returns: The vocabulary instance.
Return type: - items (
-
classmethod
from_string
(str, eos=None)[source]¶ Creates a Vocabulary instance from a string, where each character is an item.
Parameters: Returns: The vocabulary instance.
Return type:
-
index_from_item
(item)[source]¶ Retrieves the index given an item.
Parameters: item ( object
) – The item to determine its index.Returns: The index of the item if exists, None otherwise. Return type: int
-
indices_from_items
(items)[source]¶ Retrieves the indices given a set of items.
Parameters: items ( list
) – The list of items to determine its indices.Returns: The indices of the items that exist. If no item is found None is presented. Return type: list
ofint
-
is_eos_item
(item)[source]¶ Determines whether or not the item is an end of sequence item.
Parameters: item ( object
) – The item to validate.Returns: True if the item is end of sequence item, False otherwise. Return type: bool
-
is_numeric_item
(item)[source]¶ Determines whether or not the item is a numeric item.
Parameters: item ( object
) – The item to validate.Returns: True if the item is a numeric item, False otherwise. Return type: bool
-
is_unknown_item
(item)[source]¶ Determines whether or not the item is an unknown item.
Parameters: item ( object
) – The item to validate.Returns: True if the item is an unknown item, False otherwise. Return type: bool
-
item_exists
(item)[source]¶ Determines whether or not an item exists in the vocuabulary.
Parameters: item ( object
) – The item to validate.Returns: True if exists, False otherwise. Return type: bool
-
item_from_index
(index)[source]¶ Retrieves the item given its index.
Parameters: index (int) – The index of the item. Returns: The item if exists. Return type: object
-
items
()[source]¶ The items corresponding to the vocabulary.
Returns: A copy of the items corresponding to the vocabulary. Return type: list
-
items_from_indices
(indices)[source]¶ Retrieves the items given a set of indices.
Parameters: indices ( list
ofint
) – The list of indices to determine its items.Returns: The items for the provided indices. Return type: list
-
static
load
(file_path)[source]¶ Loads the vocabulary from a file path.
Parameters: file_path ( str
) – The path to the file to load the vocabulary from.
-
long_tensor_from_items
(items)[source]¶ A collection of items represented as a long tensor.
Returns: The items represented as a long tensor. Return type: torch.autograd.variable.Variable
oftorch.LongTensor
-
one_hot_matrix_tensor_from_items
(items)[source]¶ A collection of items represented as a one hot matrix.
Returns: The items represented as a one hot matrix. Return type: torch.autograd.variable.Variable
oftorch.FloatTensor
-
one_hot_tensor_from_item
(item)[source]¶ A collection of items represented as a one hot tensor.
Returns: The items represented as a one hot tensor. Return type: torch.autograd.variable.Variable
oftorch.FloatTensor
-
remove_all
()[source]¶ Removes all the items and indices.
Note
This does not remove the eos_item, numeric_item or unknown_item.
-


Donnacha O’Brien announces retirement from the saddle aged 21
O’Brien, son of Ballydoyle supremo Aidan, is set to concentrate on a new career as a trainer
by Peter O'HehirTwo-time champion-jockey Donnacha O’Brien has announced his retirement from the saddle at 21.
O’Brien, son of Ballydoyle supremo Aidan, is set to concentrate on a new career as a trainer.
He amassed 10 Group 1 wins, most notably last year’s Dubai Duty Free Irish Derby on Latrobe, trained by his brother Joseph.
He crowned a memorable career with a spectacular double on British Champions Day at Ascot last month.
“Racing has been very good to me and I owe everything to the people around me, particularly my own family and the Magnier, Tabor and Smith families,” O’Brien said yesterday.
“I look forward to training a small group of horses next year (at Longfield Stud, former base of David Wachman) and, will, hopefully, grow from there."
If you haven't already, be sure to like our Irish Mirror Sport and Irish Mirror GAA pages on Facebook and follow us on Twitter.
How to follow the Irish Mirror on social media
You can like our main Facebook page here.
Our Irish Mirror Sports page - which brings you all your Irish and UK sports news - can be found here.
You can also check out our Irish Mirror GAA sports page.
The Irish Mirror Twitter account is @IrishMirror while our sports account is @MirrorSportIE.
Our Instagram account can be found here.


Often, failures in our character manifest themselves in our lives in
negative ways. If you are struggling in a particular area, identify
it in the table below and touch it to jump to a list of Christ's
qualities that you should study in order to overcome that failure.


--- title: GloriaJS description: Documentation for testing with gloriaJS permalink: tests/ layout: blog ---
Tests are not only possible, but desirable.


FizzBuzz
Enter a number in the box below and the script will count from 1 to that number. If the number is divisible by 3, the text "Fizz" will be shown instead; if divisible by 5, "Buzz"; or if divisible by both, "FizzBuzz".