5.4 Linked List Example: Frame
Management
An interesting application of linked
lists is found in the way some systems support virtual memory. Virtual memory is a
mapping of address space that allows a process (a running
program) to execute without being completely in physical memory, the real memory of
the system. One advantage of this is that a process can make
use of an address space that is much larger than that which
the physical memory of the system would allow otherwise.
Another advantage is that multiple processes can share the
memory of the system while running concurrently.
A process running in virtual memory deals
with virtual addresses. These are addresses that seem like
physical addresses to the process, but that the system must
translate before using. Address translation takes place using
a page table and is fast due to dedicated hardware.
Each process has its own page table that maps pages of its virtual address space to
frames in physical memory. When
a process references a particular virtual address, the
appropriate entry in its page table is inspected to determine
in which physical frame the page resides (see Figure
5.5). When a process references a virtual address not yet
in a frame, a page fault occurs and a frame is allocated in
physical memory. Why pages of a process are removed from
physical memory is another matter. One occasion for removing a
page, however, is when a page is accessed infrequently
relative to other pages and its frame is needed elsewhere.
This example
addresses the management of frames that has just been
described. For this, two functions are presented, alloc_ frame
and free_ frame (see Example
5.3). The alloc_ frame and
free_ frame functions employ a
linked list to maintain the frames that are available to be
allocated. The alloc_ frame
function retrieves the number of a free frame from a list of
available frames. Given a specific page, this number is placed
in the page table to indicate in which physical frame the page
is to reside. The free_ frame
function accepts a frame number and places it back into the
list of available frames once a page has been removed from
physical memory. Both functions assume that before either is
called, the operating system has inserted into the list all
frames that it wishes to make available. The example for
circular lists later in this chapter addresses what happens
when alloc_ frame is called and
the list is empty.
A
linked list is a good way to manage frames because frame
allocation involves frequent insertions and deletions, and
these operations are performed at the head of the list. The
runtime complexity of both alloc_
frame and free_ frame is
O (1) because the two functions
simply call list_rem_next and list_ins_next respectively, which are both O (1) operations.
Example 5.3.
Implementation of Functions for Managing Frames /*****************************************************************************
* *
* ------------------------------- frames.c ------------------------------- *
* *
*****************************************************************************/
#include <stdlib.h>
#include "frames.h"
#include "list.h"
/*****************************************************************************
* *
* ------------------------------ alloc_frame ----------------------------- *
* *
*****************************************************************************/
int alloc_frame(List *frames) {
int frame_number,
*data;
if (list_size(frames) == 0)
/**************************************************************************
* *
* Return that there are no frames available. *
* *
**************************************************************************/
return -1;
else {
if (list_rem_next(frames, NULL, (void **)&data) != 0)
/***********************************************************************
* *
* Return that a frame could not be retrieved. *
* *
***********************************************************************/
return -1;
else {
/***********************************************************************
* *
* Store the number of the available frame. *
* *
***********************************************************************/
frame_number = *data;
free(data);
}
}
return frame_number;
}
/*****************************************************************************
* *
* ------------------------------ free_frame ------------------------------ *
* *
*****************************************************************************/
int free_frame(List *frames, int frame_number) {
int *data;
/*****************************************************************************
* *
* Allocate storage for the frame number. *
* *
*****************************************************************************/
if ((data = (int *)malloc(sizeof(int))) == NULL)
return -1;
/*****************************************************************************
* *
* Put the frame back in the list of available frames. *
* *
*****************************************************************************/
*data = frame_number;
if (list_ins_next(frames, NULL, data) != 0)
return -1;
return 0;
} |


Sass is a pre-processing language for CSS. It allows you to write cleaner stylesheets and makes collaboration on your CSS a breeze. There's a ton of information on Sass out there, so we won't repeat it all here. Just make sure to check out the Sass site for tutorials and examples.
Sass was originally written in Ruby. Ruby's great, but people started having a couple of issues. First, we want everyone to enjoy Sass, no matter what language they use. Why restrict everyone to using Ruby? In addition, Ruby can be kind of slow. Lowering compile time for users is important. Enter LibSass.
LibSass is a C/C++ port of the Sass engine. The point is to be simple, fast, and easy to integrate. Find out more about the project over at Github.
LibSass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer. SassC (get it?) is an implementer written in C. There are a number of other implementations of LibSass - for example Node. We encourage you to write your own port - the whole point of Libsass is that we want to bring Sass to many other languages, not just Ruby!
To run the compiler on your local machine, you need to build SassC. To build SassC, you must have either a local copy of the libsass source or it must be installed into your system. For development, please use the source version. You must then setup an environment variable pointing to the LibSass folder, for example:
export SASS_LIBSASS_PATH=/Users/hcatlin/path/libsass
The executable will be in the bin folder. To run it, simply try something like:
./bin/sassc [input file] > output.css
This project is the brainchild of Hampton Catlin, the original creator of Sass, and is sponsored by Moovweb. Aaron Leung from Moovweb is the primary developer. The site and logo were designed by Colin Johnston.


Before you post any comment, please note:
"RSS
Bandit is provided freely to all but not all of the services it uses are
free. Your donations are used to pay for the RSS Bandit domain name as
well as web hosting for the wiki and RSS Bandit forums. Help keep these
parts of the project alive by donating to the project. I don't have a
wife and kids yet but I do have a girlfriend who also needs placating
given how much time I spend on the project. Whatever is left of my share
of the donations will be a peace offering to her. :)"
-- Dare
"RSS
Bandit is a spare time project.  So if you are
happy with the work we do here and want it to be continued over the time,
provide a small fee that enables me to buy some gifts as a balm for my
children/wife to get them also happy... Further I registered the domains
and webspace used for Bandit, and that is not for free. So your donations
may help at least to keep it alive. Thanks. PS: 5 percentage of donations
are sent to SourceForge.net."
-- Torsten
Next, you can post to our public forums at http://forum.rssbandit.org/.
If you want to support the open source project, please donate at sourceforge.net.


Enables you to view entries in the local credentials cache and key table.
The klist
tool displays the entries in the local credentials cache and key table. After you modify the credentials cache with the kinit
tool or modify the keytab with the ktab
tool, the only way to verify the changes is to view the contents of the credentials cache or keytab using the klist
tool. The klist
tool does not change the Kerberos database.
List the credential cache entries. The following are the options for credential cache entries:
Show credential flags.
Show the encryption type.
Show addresses.
If the -a
option is specified, do not reverse resolve addresses.
List the keytab entries. The following are the options for keytab entries:
Show keytab entry timestamps.
Show keytab entry DES keys.
Specifies the credential cache name or the keytab name. If the name is not specified, the klist
tool uses default values for the cache name and keytab. The kinit
documentation lists these default values.
Displays instructions.


Ethernet, Fiber Channel or Software Defined Networking, which is the right choice for you? This session will present the various Dell EMC Networking options and provide you will a complete overview of our networking offerings.
<EMAIL_ADDRESS>All the products you will ever need by Dell.
A necessary catalog for our products.
Favorites
Chat


--- layout: post title: Why I Love Treasure date: '2007-09-18T20:52:00-07:00' tags: - 1UP Photos - Masato Maegawa - Developer Photos - Treasure tumblr_url: http://supplethink.tumblr.com/post/51170911526/why-i-love-treasure ---
There are tons of reasons, but these are the only two you’ll ever need:


KANK-A MOUTH PAIN- benzocaine liquid
Blistex Inc.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredient
Benzocaine 20.0% (w/w)
Purpose
Oral anesthetic/analgesic
Uses
- for the temporary relief of pain due to canker sores, minor irritation of the mouth and gums caused by dentures or orthodontic appliances, or minor injury of the mouth or gums
Warnings
For oral use only
Allergy alert
do not use this product if you have a history of allergy to local anesthetics such as procaine, butacaine, benzocaine, or other "caine" anesthetics.
When using this product
- do not use this product for more than 7 days unless directed by a dentist or doctor. If sore mouth symptoms do not improve in 7 days; if irritation, pain, or redness persists or worsens; or if swelling, rash or fever develops, see your doctor or dentist promptly.
- do not exceed recommended dosage.
Keep out of reach of children. If more than used for pain is accidentally swallowed, get medical help or contact a Poison Control Center right away.
Directions
- to assure formation of a long-lasting film coating, dry affected area and apply medication undiluted with applicator
- allow a few seconds for coating to form
- use up to 4 times daily, or as directed by a dentist or doctor
- children under 12 years of age should be supervised in the use of this product
- children under 2 years of age: consult a dentist or doctor
Other information
- do not purchase if package has been opened
- cap tightly after use to avoid evaporation
- avoid contact with the eyes
- avoid contact with clothing and household/ furniture surfaces to prevent possible staining
- this is a personal care item, and should be used by one individual only
Inactive ingredients
benzyl alcohol, cetylpyridinium chloride, compound benzoin tincture, dimethyl isosorbide, ethylcellulose, flavor, octylacrylamide/acrylates/butylaminoethyl methacrylate copolymer, oleth-10, PEG-6, propylene glycol, ricinus communis (castor) seed oil, SD alcohol 38B (29.6% v/v), sodium saccharin, sucralose, tannic acid
PRINCIPAL DISPLAY PANEL - 9.75 mL Bottle Package
NDC 10157-9477-1
PROFESSIONAL
STRENGTH
Blistex®
KANK-A®
Mouth Pain Liquid
ORAL ANESTHETIC
SAVE
$100
NOW
See Inside Back Panel
Maximum Pain Relief
Forms Protective Coating
For Sores Inside the Mouth
-
- Canker Sores
-
- Denture Abrasions
-
- Brace Irritation
ADA
Accepted
American
Dental
Association
®
CONVENIENT
CONTROL-TIP
APPLICATOR
.33 FL OZ (9.75 mL)
Blistex Inc.


OkTober
My October Of Changes
Here are some things I have been doing
Goals in October
- Waking up earlier
- Staying off social media
- Maintain consistent habits
- More focus on personal and office work
- Healthy Work Life Balance
- Taking better care of personal and professional realtions
Oktober Journal
- 3/10/2020
- 4/10/2020
:)


Quiz 1
Everything we've done so far.
Assignment
Software tools
git, terminal, gedit
HTML basics
index.html, tags, code formating, validation, sftp
CSS basics
main.css, declaration, code formating, html link element, validation


{% extends 'layout.html' %} {% block pageTitle %} Setup the kit - NHS.UK prototype kit {% endblock %} {% block beforeContent %} {{ breadcrumb({ items: [ { href: "/docs", text: "Home" } ], href: "/docs/install", text: "Install" }) }} {% endblock %} {% block content %}
npm install
The install may take up to a minute.
While installing it may WARN
about some items - this is ok. As long as there are no ERRORs
you can continue.


Preview
Type text in the box below:
Preview is shown here:
Export to Image
Samples
LaTeX
Select One
The Quadratic Formula
The Lorenz Equations
The Cauchy-Schwarz Inequality
Cubic Equation
MathML
Select One
The Quadratic Formula
Cauchy's Integral Formula
Gauss' Divergence Theorem
Standard Deviation


FIND2PERL
Section: Perl Programmers Reference Guide (1)Updated: 2012-06-22
Index Return to Main Contents
NAME
find2perl - translate find command lines to Perl codeSYNOPSIS
find2perl [paths] [predicates] | perl
DESCRIPTION
find2perl is a little translator to convert find command lines to equivalent Perl code. The resulting code is typically faster than running find itself.``paths'' are a set of paths where find2perl will start its searches and ``predicates'' are taken from the following list.
- ! PREDICATE
- Negate the sense of the following predicate. The "!" must be passed as a distinct argument, so it may need to be surrounded by whitespace and/or quoted from interpretation by the shell using a backslash (just as with using find(1)).
- ( PREDICATES )
- Group the given PREDICATES. The parentheses must be passed as distinct arguments, so they may need to be surrounded by whitespace and/or quoted from interpretation by the shell using a backslash (just as with using find(1)).
- PREDICATE1 PREDICATE2
- True if _both_ PREDICATE1 and PREDICATE2 are true; PREDICATE2 is not evaluated if PREDICATE1 is false.
- PREDICATE1 -o PREDICATE2
- True if either one of PREDICATE1 or PREDICATE2 is true; PREDICATE2 is not evaluated if PREDICATE1 is true.
- -follow
- Follow (dereference) symlinks. The checking of file attributes depends on the position of the "-follow" option. If it precedes the file check option, an "stat" is done which means the file check applies to the file the symbolic link is pointing to. If "-follow" option follows the file check option, this now applies to the symbolic link itself, i.e. an "lstat" is done.
- -depth
- Change directory traversal algorithm from breadth-first to depth-first.
- -prune
- Do not descend into the directory currently matched.
- -xdev
- Do not traverse mount points (prunes search at mount-point directories).
- -name GLOB
- File name matches specified GLOB wildcard pattern. GLOB may need to be quoted to avoid interpretation by the shell (just as with using find(1)).
- -iname GLOB
- Like "-name", but the match is case insensitive.
- -path GLOB
- Path name matches specified GLOB wildcard pattern.
- -ipath GLOB
- Like "-path", but the match is case insensitive.
- -perm PERM
- Low-order 9 bits of permission match octal value PERM.
- -perm -PERM
- The bits specified in PERM are all set in file's permissions.
- -type X
- The file's type matches perl's "-X" operator.
- -fstype TYPE
- Filesystem of current path is of type TYPE (only NFS/non-NFS distinction is implemented).
- -user USER
- True if USER is owner of file.
- -group GROUP
- True if file's group is GROUP.
- -nouser
- True if file's owner is not in password database.
- -nogroup
- True if file's group is not in group database.
- -inum INUM
- True file's inode number is INUM.
- -links N
- True if (hard) link count of file matches N (see below).
- -size N
- True if file's size matches N (see below) N is normally counted in 512-byte blocks, but a suffix of ``c'' specifies that size should be counted in characters (bytes) and a suffix of ``k'' specifies that size should be counted in 1024-byte blocks.
- -atime N
- True if last-access time of file matches N (measured in days) (see below).
- -ctime N
- True if last-changed time of file's inode matches N (measured in days, see below).
- -mtime N
- True if last-modified time of file matches N (measured in days, see below).
- -newer FILE
- True if last-modified time of file matches N.
- Print out path of file (always true). If none of "-exec", "-ls", "-print0", or "-ok" is specified, then "-print" will be added implicitly.
- -print0
- Like -print, but terminates with \0 instead of \n.
- -exec OPTIONS ;
- exec() the arguments in OPTIONS in a subprocess; any occurrence of {} in OPTIONS will first be substituted with the path of the current file. Note that the command ``rm'' has been special-cased to use perl's unlink() function instead (as an optimization). The ";" must be passed as a distinct argument, so it may need to be surrounded by whitespace and/or quoted from interpretation by the shell using a backslash (just as with using find(1)).
- -ok OPTIONS ;
- Like -exec, but first prompts user; if user's response does not begin with a y, skip the exec. The ";" must be passed as a distinct argument, so it may need to be surrounded by whitespace and/or quoted from interpretation by the shell using a backslash (just as with using find(1)).
- -eval EXPR
- Has the perl script eval() the EXPR.
- -ls
- Simulates "-exec ls -dils {} ;"
- -tar FILE
- Adds current output to tar-format FILE.
- -cpio FILE
- Adds current output to old-style cpio-format FILE.
- -ncpio FILE
- Adds current output to ``new''-style cpio-format FILE.
Predicates which take a numeric argument N can come in three forms:
* N is prefixed with a +: match values greater than N * N is prefixed with a -: match values less than N * N is not prefixed with either + or -: match only values equal to N
SEE ALSO
find, File::Find.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:03 GMT, December 24, 2015


Calculates pulse excitation profiles.
[offsets,M] = exciteprofile(t,IQ) [offsets,M] = exciteprofile(t,IQ,offsets)
This function computes the excitation profiles for the input pulse function using two-level density matrix dynamics starting from thermal equilibrium (Mx = 0, My = 0, Mz = 1).
The output contains the axis of frequency offsets (in MHz) in offsets
and an array with the three components of the magnetization vector after the pulse in M
(M = [Mx; My; Mz]
).
If you don't request any output, exciteprofile
plots the pulse shape and excitation profiles.
The input arguments to exciteprofile
are t
, the time axis (in microseconds) of the pulse, and IQ
, the pulse shape data with the in-phase component in the real part and the quadrature component in the imaginary part. The output of the function pulse can be used directly as input for exciteprofile
.
An optional third input argument, offsets
, can be used to define the axis of frequency offsets (in MHz) for which to compute the excitation profile. By default the frequency axis is defined over a range of approximately twice the pulse bandwidth around the center frequency with 201 points.
The excitation profile of a sech/tanh inversion pulse can be calculated by calling first the pulse function to compute the pulse shape and then exciteprofile
to obtain the excitation profile.
% Define pulse parameters Par.Type = 'sech/tanh'; Par.tp = 0.200; % microseconds Par.Frequency = [-50 50]; % MHz Par.beta = 10; Par.Flip = pi; % Calculate pulse shape [t,IQ] = pulse(Par); % Calculate excitation profile [offsets,M] = exciteprofile(t,IQ); % Plot the inversion profile (Mz/M0) plot(offsets,M(3,:)) xlabel('offsets (MHz)') ylabel('M_z/M_0')


Class: ActiveRecord::Associations::SingularAssociation
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Subclasses:
|
|
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Association
|
|
|
Instance Chain:
self,
Association
|
|
| Inherits: |
ActiveRecord::Associations::Association
|
| Defined in: | activerecord/lib/active_record/associations/singular_association.rb |
Class Method Summary
Association - Inherited
Instance Attribute Summary
Association - Inherited
| #inversed, #target, | |
| #target= | Sets the target of this association to |
| #loaded? | Has the target been already loaded? |
| #options, #owner, #reflection, | |
| #stale_target? | The target is stale if the target no longer points to the record(s) that the relevant foreign_key(s) refers to. |
| #find_target?, | |
| #foreign_key_present? | Returns true if there is a foreign key present on the owner which references the target. |
| #skip_statement_cache? | Returns true if statement cache should be skipped on the association reader. |
Instance Method Summary
- #build(attributes = {}) {|record| ... }
-
#force_reload_reader
Implements the reload reader method, e.g.
-
#reader
Implements the reader method, e.g.
-
#writer(record)
Implements the writer method, e.g.
- #_create_record(attributes, raise_error = false) {|record| ... } private
- #create_scope private
- #find_target private
- #replace(record) private
- #set_new_record(record) private
Association - Inherited
| #aliased_table_name | Returns the name of the table of the associated class: |
| #association_scope | The scope for this association. |
| #create, #create!, #initialize_attributes, #interpolate, | |
| #klass | Returns the class of the target. |
| #load_target | Loads the target if needed and returns it. |
| #loaded! | Asserts the target has been loaded setting the loaded flag to |
| #marshal_dump | We can't dump @reflection since it contains the scope proc. |
| #marshal_load, | |
| #reload | Reloads the target and returns |
| #remove_inverse_instance | Remove the inverse association, if possible. |
| #reset | Resets the loaded flag to |
| #reset_scope, #scope, | |
| #set_inverse_instance | Set the inverse association, if possible. |
| #target_scope | Can be overridden (i.e. in ThroughAssociation) to merge in other scopes (i.e. |
| #build_record, #creation_attributes, | |
| #foreign_key_for? | Returns true if record contains the foreign_key. |
| #inverse_reflection_for | Can be redefined by subclasses, notably polymorphic belongs_to The record parameter is necessary to support polymorphic inverses as we must check for the association in the specific class of the record. |
| #invertible_for? | Returns true if inverse association on the given record needs to be set. |
| #raise_on_type_mismatch! | Raises ::ActiveRecord::AssociationTypeMismatch unless |
| #set_owner_attributes | Sets the owner attributes on the given record. |
| #stale_state | This should be implemented to return the values of the relevant key(s) on the owner, so that when stale_state is different from the value stored on the last find_target, the target is stale. |
Constructor Details
This class inherits a constructor from ActiveRecord::Associations::Association
Instance Method Details
#_create_record(attributes, raise_error = false) {|record| ... } (private)
65 66 67 68 69 70 71 72
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 65
def _create_record(attributes, raise_error = false) record = build_record(attributes) yield(record) if block_given? saved = record.save set_new_record(record) raise RecordInvalid.new(record) if !saved && raise_error record end
#build(attributes = {}) {|record| ... }
18 19 20 21 22 23
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 18
def build(attributes = {}) record = build_record(attributes) yield(record) if block_given? set_new_record(record) record end
#create_scope (private)
[ GitHub ]34 35 36
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 34
def create_scope scope.scope_for_create.stringify_keys.except(klass.primary_key) end
#find_target (private)
[ GitHub ]38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 38
def find_target return scope.take if skip_statement_cache? conn = klass.connection sc = reflection.association_scope_cache(conn, owner) do StatementCache.create(conn) { |params| as = AssociationScope.create { params.bind } target_scope.merge(as.scope(self, conn)).limit(1) } end binds = AssociationScope.get_bind_values(owner, reflection.chain) sc.execute(binds, klass, conn) do |record| set_inverse_instance record end.first rescue ::RangeError nil end
#force_reload_reader
Implements the reload reader method, e.g. foo.reload_bar for Foo.has_one
:bar
27 28 29 30
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 27
def force_reload_reader klass.uncached { reload } target end
#reader
Implements the reader method, e.g. foo.bar for Foo.has_one
:bar
5 6 7 8 9 10 11
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 5
def reader if !loaded? || stale_target? reload end target end
#replace(record) (private)
57 58 59
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 57
def replace(record) raise NotImplementedError, "Subclasses must implement a replace(record) method" end
#set_new_record(record) (private)
[ GitHub ]61 62 63
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 61
def set_new_record(record) replace(record) end
#writer(record)
Implements the writer method, e.g. foo.bar= for Foo.belongs_to
:bar
14 15 16
# File 'activerecord/lib/active_record/associations/singular_association.rb', line 14
def writer(record) replace(record) end


Psalms 91:1
He that dwelleth in the secret place of the most High shall abide under the shadow of the Almighty.


Looking for a certain book or video? Get all of them with an O’Reilly online book store. Whether you want to improve your skills or just need a quick solution to a pressing problem, you’ll be able to find what you need with O’Reilly online store.


Class 1 Lab
It's difficult to find examples of lorem ipsum in use before Letraset made it popular as a dummy text in the 1960s, although McClintock says he remembers coming across the lorem ipsum passage in a book of old metal type samples. So far he hasn't relocated where he once saw the passage, but the popularity of Cicero in the 15th century supports the theory that the filler text has been used for centuries.
You answered:
What's your name?
Where do you live?
What's your favorite food?
What's your favorite color?


{{Italic title}} {{Infobox prepared food | name = Bolo Rei | name_lang = pt | name_italics = true | image = Bolo Rei.jpg | caption = | alternate_name = | country = Portugal | region = | creator = | course = | type = Cake | served = | main_ingredient = Dough, raisins, nuts, candied fruit | variations = | calories = | other = }} {{lang|pt|Bolo Rei}} (English: "King Cake") is a traditional Portuguese cake that is usually eaten around Christmas, from December 25 until Epiphany ({{lang|pt|Dia de Reis}} in Portuguese, literally "Kings' Day", a reference to the Three Wise Men), on 6 January. It is a staple dessert in any Portuguese home during the holidays.<ref> A Portuguese Christmas Retrieved 12 August 2013 </ref>
Contents |
{{lang|pt|Bolo rei}} recipe is from France which finds its way to Portugal during the 19th century when {{lang|pt|Confeitaria Nacional}}<ref>Bolo-Rei: The King of Portuguese Christmas Cakes Retrieved 12 August 2013 </ref> opened as Portuguese monarchy’s official bakery in 1829. The {{lang|pt|Confeitaria}} was the first to introduce this recipe to the country.<ref> The Battle for Lisbon’s best pastry Retrieved 12 August 2013 </ref>
The cake itself is round with a large hole in the centre,<ref>A Foodie’s Guide to Christmas in Europe Retrieved 12 August 2013 </ref> resembling a crown covered with crystallized and dried fruit.
The {{lang|pt|bolo rei}} is baked from a soft, white dough, with raisins, various nuts, and crystallized fruit. Also included is the characteristic fava bean, and tradition dictates that whoever finds the fava has to pay for the {{lang|pt|bolo rei}} next year.<ref> Bolo Rei Portuguese Kings Cake – A treat for your Christmas table recipe Retrieved 12 August 2013 </ref> A small prize (usually a small metal toy) was also included within the cake. The inclusion of the prize has been discontinued since mid-90s.
In 2009, a giant {{lang|pt|Bolo rei}} measuring about {{convert|70|m}} and weighing around {{convert|200|kg}} was baked for the town of Olhão by pastry chef Felipe Martins of Pastelaria Kubidoce.<ref> Giant Bolo Rei offered to the people of Olhão Retrieved 12 August 2013 </ref>
{{reflist}} http://portugalprime.com/
{{Cakes}}


Pikrammenos fingers Papaggelopoulos for implicating him in Novartis scandal
Pikrammenos opined that it was Papaggelopoulos who was pulling the strings in planning the prosecution of ten prominent politicians.
by ΤοΒΗΜΑ TeamThe judiciary has sent to Parliament the testimony of former caretaker PM and current Vice Premier Panagiotis Pikrammenos – who previously served as president of the Council of State – in which states his belief that former alternate justice minister Dimitris Papaggelopoulos was the person who implicated him in the Novartis scandal.
Pikrammenos opined that it was Papaggelopoulos who was pulling the strings in planning the prosecution of ten prominent politicians, including former PM Antonis Samaras (New Democracy).
ΥΠΕΝ : Τι αλλάζει στα νυχτερινά τιμολόγια του ρεύματος – Πίνακας
Pikrammenos reportedly maintained that the manner in which the Corruption Prosecutor handled the case “creates the sense that there was central planning” that was intended to target him.
The cases of nine of the ten politicians have been closed, but Movement for Change MP Andreas Loverdos, a former health minister, will be charged with repeated bribe-taking.
Πολυτεχνείο 2019 : Εύθραυστη ηρεμία σε ηλεκτρισμένη ατμόσφαιρα


--- layout: tutorial-extended title: The Weather App --- {% assign tutorial_github_url = "https://github.com/infinispan/infinispan-embedded-tutorial" %} {% assign @tutorial_steps = "The Weather Application, Initializing the CacheManager, Putting stuff in the cache, Making entries expire, Configuring the default cache, Clustering the application, Listen to changes in the cluster, Listen to changes in the cache, Grouping entries together, Temperature averages with streams, Declarative configuration" | split: ", " %} {% assign tutorial_step = 2 %}
With a CacheManager running we can start creating caches and storing data in them. Caches in Infinispan are "named" which means they are identified by a unique name. We are going to enhance the WeatherService implementations from our initial version so that they store the retrieved data in a cache. To do this we will create an intermediate abstract class between the WeatherService interface and the concrete implementations: the CachingWeatherService. This class wraps the expensive remote calls in a method which caches the result returned by the remote call and, before subsequent invocations, checks whether the data is already available locally instead of invoking the expensive remote API. First of all let's obtain our cache:
cacheManager.defineConfiguration("weather", new ConfigurationBuilder().build());
Cache<String, LocationWeather> cache = cacheManager.getCache("weather");
We are defining a named cache "weather" using a default configuration, which means a basic local cache. As you can see, the generic types of the keys and values are inferred from the assignment type. Next up, let's see the caching wrapper for the weather retrieval:
LocationWeather weather = cache.get(location);
if (weather == null) {
weather = fetchWeather(location);
cache.put(location, weather);
}
return weather;
Since an Infinispan Cache is an implementation of the java.util.Map interface, the above code should be self explanatory. With the caching in place, let's run the application again, using the usual:
git checkout -f step-2
mvn clean package exec:exec
---- Fetching weather information ----
Rome, Italy - Temperature: 12.9° C, Conditions: light rain
Como, Italy - Temperature: 6.3° C, Conditions: Sky is Clear
Basel, Switzerland - Temperature: 0.8° C, Conditions: overcast clouds
Bern, Switzerland - Temperature: -1.6° C, Conditions: broken clouds
London, UK - Temperature: 1.8° C, Conditions: light rain
Newcastle, UK - Temperature: 2.6° C, Conditions: scattered clouds
Bucharest, Romania - Temperature: 9.3° C, Conditions: scattered clouds
Cluj-Napoca, Romania - Temperature: 6.4° C, Conditions: scattered clouds
Ottawa, Canada - Temperature: -7.0° C, Conditions: overcast clouds
Toronto, Canada - Temperature: -7.0° C, Conditions: broken clouds
Lisbon, Portugal - Temperature: 14.6° C, Conditions: overcast clouds
Porto, Portugal - Temperature: 12.2° C, Conditions: moderate rain
Raleigh, USA - Temperature: 3.9° C, Conditions: Sky is Clear
Washington, USA - Temperature: 3.4° C, Conditions: light rain
---- Fetched in 1634ms ----
---- Fetching weather information ----
Rome, Italy - Temperature: 12.9° C, Conditions: light rain
Como, Italy - Temperature: 6.3° C, Conditions: Sky is Clear
Basel, Switzerland - Temperature: 0.8° C, Conditions: overcast clouds
Bern, Switzerland - Temperature: -1.6° C, Conditions: broken clouds
London, UK - Temperature: 1.8° C, Conditions: light rain
Newcastle, UK - Temperature: 2.6° C, Conditions: scattered clouds
Bucharest, Romania - Temperature: 9.3° C, Conditions: scattered clouds
Cluj-Napoca, Romania - Temperature: 6.4° C, Conditions: scattered clouds
Ottawa, Canada - Temperature: -7.0° C, Conditions: overcast clouds
Toronto, Canada - Temperature: -7.0° C, Conditions: broken clouds
Lisbon, Portugal - Temperature: 14.6° C, Conditions: overcast clouds
Porto, Portugal - Temperature: 12.2° C, Conditions: moderate rain
Raleigh, USA - Temperature: 3.9° C, Conditions: Sky is Clear
---- Fetched in 2ms ----
You should see the weather conditions displayed twice, but the second run should be several orders of magnitude faster. Good stuff! Entries created above are immortal, i.e. they will exist in the cache until removed. In the next step we will see how to add mortal entries.


As you probably know Ruby (MRI so brixen doesn’t get mad at me :P) 1.9.3 was released. I’ve been using 1.9.3 for a while now and as part of my RubyConf Uruguay talk I wanted to show ruby-debug. So my first attempt was:
$ gem install ruby-debug19
Fetching: linecache19-0.5.12.gem (100%)
Building native extensions. This could take a while...
Fetching: ruby-debug-base19-0.11.25.gem (100%)
Building native extensions. This could take a while...
Fetching: ruby-debug19-0.11.6.gem (100%)
Successfully installed linecache19-0.5.12
Successfully installed ruby-debug-base19-0.11.25
Successfully installed ruby-debug19-0.11.6
3 gems installed
Then require ‘ruby-debug’ and booom!!
$ irb
irb(main):001:0> require 'ruby-debug'
LoadError: dlopen(/Users/santiago/.rbenv/versions/1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle, 9): Symbol not found: _ruby_current_thread
Referenced from: /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle
Expected in: flat namespace
in /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle - /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /Users/santiago/.rbenv/versions/1.9.3/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from (irb):1
from /Users/santiago/.rbenv/versions/1.9.3/bin/irb:12:in `<main>'
So after some research on the internet I found out that the author of ruby-debug had a fix for it which he considered unstable and didn’t push it to rubygems.org yet. Since I prefer an unstable ruby-debug than a non working one :P, I gave it a try …
First download linecache19-0.5.13.gem and ruby-debug-base19-0.11.26.gem from http://rubyforge.org/frs/?group_id=8883, then …
$ gem install linecache19-0.5.13.gem
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
1 gem installed
$ gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/Users/santiago/.rbenv/source/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed
$ irb
irb(main):001:0> require 'ruby-debug'
=> true
and voilá.
So while we wait for an official release, you can enjoy a working ruby-debug.
To install ruby-debug on Ubuntu ruby-1.9.3 you also need to download from http://rubyforge.org/frs/?group_id=8883
linecache19-0.5.13.gem ruby_core_source-0.1.5.gem ruby-debug19-0.11.6.gem ruby-debug-base19-0.11.26.gem
Then
gem install archive-tar-minitar gem install linecache19-0.5.13.gem——with-ruby-include=/$rvm_src_path/ruby-1.9.3-p0 gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/$rvm_src_path/ruby-1.9.3-p0 gem install ruby-debug19-0.11.6.gem——with-ruby-include=/$rvm_src_path/ruby-1.9.3-p0
Thanks for this blog post. I don’t have a ~/.rbenv/source/ruby-1.9.3-p0 dir however. So, after looking around within the rbenv 1.9.3-p0 dir, this command did the trick:
$ gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/Users/tomdeleu/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0
Thanks so much spastorino, I’ve been trying to get this working for weeks!
Thank you so much.
I little advice for RVM users:
I had to provide another include path:
gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/Users/tvd/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0/
That worked for me.

I have created a gist for ubuntu, Ruby 1.9.3 and ruby-debug with rvm https://gist.github.com/1331533 That should be clearer
Tried installing but i still end up with the following error:
https://gist.github.com/dac9599762dc1c68f8ce
Any ideas?
thx!
This worked for me, but I also had to run ``` gem install ruby-debug19 ``` after downloading and installing the other two gems.
In order to get debugger working on a Rails 3.1 server with RVM Ruby 1.9.3p0 I followed Boris Barroso’s instructions here: https://gist.github.com/1331533
And then added the following to Gemfile: gem ‘ruby-debug19’, :require => ‘ruby-debug’
Hi! i’m repost you post: to my @vokvfqjt twitter
@Karl: having the same problem here
Ruby 1.9.3-p0 installed via rbenv
Thomas’s RVM advice helped me and I got it built. I’m running a MacBook Pro with Lion and just had to adjust the rvm path for /usr/local. By the way the auto-formatting kicked in on his comment. You have to pass a double-dash (two dash characters in a row) after the name of the gem (surrounded by spaces), then the config option name also starts with a double-dash.
Thanks guys! I don’t know what I’d do without ruby-debug. :D
Thanks you for this post!!!
with rvm I did
gem install linecache19-0.5.13.gem
gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/home/pabloroz/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0/
gem install ruby-debug19-0.11.6.gem——with-ruby-include=/home/pabloroz/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0/
and it worked
any way to use bundler for it? prereleases or a git repo, maybe?
For me, after literally hours of trial-and-error, this worked for me (using RVM on Mac running Lion with Xcode 4.2.1):
(Be sure to do “rvm 1.9.3” before running this also)
gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/Users/YOURUSERNAME/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0/
(If the following are two long dashes, replace the two long dashes above with hyphen hyphen space hyphen hyphen:
- -)You can shorten the—with-ruby-include to—with-ruby-dir=$rvm_path/rubies/ruby-1.9.3-p0
It should pick that up. if it doesn’t please file a bug with us. The—with-ruby-dir= should just make it all work.
I like to use
$rvm_path/src/`rvm tools strings`
for the with-ruby-dir / with-ruby-include switch. That way it works regardless which version of ruby I’m in or which gemset I’m in. As long as ‘rvm tools strings’ doesn’t change, that is. So my whole gem install line looks like this:
gem install ruby-debug19——with-ruby-include=”$rvm_path/src/`rvm tools strings`”
Oh, I’m currently using RVM 1.9.2. I don’t know when tools was introduced though.
On Mac OS X Lion 10.7.2 with Xcode 4.2.1 and RVM 1.9.2, this worked for me:
https://gist.github.com/1457544
This is basically the same thing that santiago.pastorino and others have said, but I wanted to make it available in clear, complete steps.
strangely I got a loadError in 1.9.3 version :
LoadError: cannot load such file—ruby_debug.so
Thanks Philip! that worked for me and was very clean!
Hi, I am trying to install ruby-debug-base19-0.11.26.gem on OSX Lion. I get
checking for rb_method_entry_t.called_id in method.h… no checking for rb_control_frame_t.method_id in method.h… no
I also filed a gist for it, https://gist.github.com/1646085 will appreciate any help.
Thanks a lot for the tip. I have been trying to install the debugger for almost a week now. I haven’t tested whether it works with the eclipse DLTK yet, but I’m at least happy that I was able to make a clean install at last :) Thanks again!!
Thanks Santiago, and especially Boris. Worked like a charm. Ubuntu 10.10 64bit, Ruby 1.9.3-p0, Rails 3.1.3. RVM.
See you at the world cup.
Cannot build gem install ruby-debug-base19-0.11.26.gem – I seem to be missing ‘method.h’ – from the mkmf.log:
conftest.c:3:20: fatal error: method.h: No such file or directory compilation terminated. checked program was: /* begin / 1: #include “ruby.h” 2: 3: #include 4: 5: /top*/
What do I need to install to get this and do I then need to rebuild the ruby? Thanks.
Got here via StackOverflow (http://stackoverflow.com/questions/8378277/cannot-use-ruby-debug19-with-1-9-3-p0) trying to install ruby-debug on an Ubuntu box and managed to get it working.
Great job, thanks Santiago!
For rbenv users trying to install this version of the ruby-debug-base19 gem, try this:
gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/Users/lchan/.rbenv/versions/1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0
@googya: Did you ever figure out the `LoadError: cannot load such file—ruby_debug.so` problem? I’m getting that when using bundler to load all of the gems (after vendoring linecache19-0.5.13 and ruby-debug-base19-0.11.26), then running `bundle exec rib` and `require ‘ruby-debug’` in irb.
Worked great! Thanks for the tips.
Worked great! Thanks for the tips.
Worked great! Thanks for the tips.
Hi Santiago and commenters,
Thanks for the tips, to get my debug setup working in Mac OS X Lion 10.7.2, Aptana Studio 3, using rvm and ruby 1.9.3-p0 I had to take multiple steps which I summarized at Stackoverflow:
Ruby-debug not working – Stack Overflow
I hope this helps other developers tearing their hair out to get their ruby debug environment setup correctly.
Cheers,
My brother recommended I would possibly like this website. He was once entirely right. This put up actually made my day. You can not believe simply how a lot time I had spent for this information! Thanks!
Is there a way to package this up in the Gemfile? I was able to get it working once, but new developers who check out the project have to go through this same frustrating process.
What if we just created a new gem name (ruby-debug193) and pushed all these to rubygems? Not ideal, but infinitely better than the current situation
@Jacques—Good idea. Better idea would be for the core team to roll in ruby-debug (or at least make it a compile-time option). The hassle of enabling a debugger is ridiculous, and has been going on for years now.
Thanks! But my last command was:
gem install ruby-debug-base19-0.11.26.gem——with-ruby-include=/Users/ask/.rbenv/versions/1.9.3-p125/include/ruby-1.9.1/ruby-1.9.3-p125/
Just to note that the correct writing is “voilà”.
@googya and Ed Ruder: For starters, here is my ENV: Mac OSX Lion, Ruby 1.9.3-p125 (installed via rvm 1.11.3), using gemsets
I had the LoadError for ruby_debug.so issue as well. For me, I was installing ruby-debug, linecache, etc into the “global” gemset, and trying to use them from a different gemset. Also, I had a previous version of ruby-debug-base19 installed (0.11.25). I’m not sure which was causing the issues, but I had to uninstall all the ruby-debug related gems and start over. I installed them into the gemset that I will actually be using, not global. Once I did that, I followed this gist: https://gist.github.com/2241056
Now, it’s Zen: $ irb 1.9.3p125 :001 > require ‘ruby-debug’ => true 1.9.3p125 :002 >
HTH, Stephen
Just use Ruby 1.9’s built-in debugger:
Or via the command line:
I forked ruby-debug and got it working on 1.9. Thanks to Santiago for this post – `gem install debugger`
I’m using @cldwalker’s fork of ruby-debug and it loads and works cleanly with ruby 1.9.3-p125.
https://github.com/cldwalker/debugger
You are a live saver, I combined your suggestion with Thomas’ (to provide rvm include path) and I can sleep at peace tonight after about 2 weeks
Kevin Bedell’s suggestion is better, ruby-debug19 seems to have had its day, @cldwalker’s fork is the way to go.


Angle meter
Online angle meter
If you want to measure angles, but you don't have a protractor at hand,
you can take measurements using this online angle meter.
You don't need to install any protractor applications on your smartphone or computer
because this online tool simply works in a browser.
It is possible to measure right, acute and obtuse angles in degrees from 0° to 360°
using the angle meter online.
Mobile angle meter
Being launched on a smartphone or tablet,
the application uses the capabilities of the built-in accelerometer to determine the tilt of the device.
So you can just rotate the mobile phone to measure the angle of inclination.
To use it similarly to a native mobile app, you can add a shortcut via the menu item "Add to Home Screen" or
"Add to Phone" in the browser.
Without a phone, you can still use the protractor online, setting the angles manually with mouse clicks,
scrolling the mouse wheel, or simply entering the angle in the text input.
If you want to know how the mobile protractor is implemented you can see details here.
Online protractor
The instrument for measuring angles has its own special name - a protractor.
It is a round or semicircular tool for measuring or drawing angles on paper.
But sometimes a protractor is needed in everyday life.
For example, to divide a pizza into equal parts, to hang a picture exactly,
or to find out the angle of inclination of a satellite plate.
The phone is always with you, you can use it for this.
Angle maker
With this tool, you can make any angle with an accuracy of one degree.
Just enter the angle value into the input field in the upper right corner.
Mouse wheel over the protractor area also increments or decrements the angle with one degree precision.
Before creating the angle you want, you need to turn off the accelerometer (if it was turned on) via the
checkbox in the left upper corner.
Real angle meters
Virtual tool is useful occasionally, mostly for fun.
In the real life, in professional work people use real instruments.
School protractor
At school, everyone had such a transparent plastic protractor for measuring angles.
Bubble level angle meter
The core of this tool is liquid with a bubble in a glass vial.
You just need to centre the bubble between the divisions on the vial.
Arrow connected with the vial will indicate the measured angle.
It is easy to use with accuracy to within plus or minus 1 degree.
Stainless steel protractor
Steel protractor is useful for setting bevels, transferring angles, architectural design or engineering
drawing.
It consists of a body with graduations from 0 to 180 degrees and a blade that can be locked at any angle.
Digital ruler-based angle meter
It has two stainless steel rulers and a digital angle sensor with a display runs on a battery.
You can easily and accurately measure angles and lengths.
Electronic inclinometer
Typically it is a portable battery powered device with a display and inclinometer sensors.
Professional digital inclinometers guarantee excellent precision in measuring angles.
Marketplaces offer different devices that provide high accuracy angle measurement at a reasonable cost.
Smartphone app
There are some amazing smartphone applications to measure angles.
Nowadays smartphones can identify their orientation using an accelerator, an integrated micro device with
axis-based motion sensing.
This information can be used by the apps to determine the angle at which a device is tilted with respect to
the Earth, or calculate the angle between two positions of the mobile device.
Another approach to measure angles via smartphone is based on image and photo analysis.
You can just take a picture with camera or from gallery, and then measure angles and lengths.
Angle units
Full turn can be divided into pieces of the same size.
The most common unit of measurement is the degree (and smaller fractions of the degree).
- Degree = 1/360 of full turn. Sign of the degree is °
- Minute = 1/60 of the degree. Sign of the minute is '
- Second = 1/60 of the minute. Sign of the second is "
For example: 35 degrees 5 minutes 27 seconds is written as 35° 5' 27"
Degree
Degree is 1/360 of a turn, or 1°
Full turn contains 360 degrees.
Also there are other types of division - circular sectors.
Sectors of a certain size have their own special names.
Quadrant
Quadrant is 1/4 of a turn, or 90°
Full turn contains 4 quadrants.
Sextant
Sextant is 1/6 of a turn, or 60°
Full turn contains 6 sextants.
Octant
Octant is 1/8 of a turn, or 45°
Full turn contains 8 octant.
Clock position
Clock position is 1/12 of a turn, or 30°
Full turn contains 12 positions.
See also


DotNetHelper.Serialization.Json
DotNetHelper.Serialization.Json is a lightweight serialization library for json.
| Package | Tests | Code Coverage |
|---|---|---|
How to use
var jsonSerializer = new DataSourceJson();
Now you have access to all the Apis you will ever need for a json serializer check them out
//Serialize an object to the provided stream
void SerializeToStream<T>(T obj, Stream stream, int bufferSize = 1024, bool leaveStreamOpen = false) where T : class;
void SerializeToStream(object obj, Type type, Stream stream, int bufferSize = 1024, bool leaveStreamOpen = false);
//Serialize an object to a new instance of a stream and returns the stream
Stream SerializeToStream<T>(T obj, int bufferSize = 1024) where T : class;
Stream SerializeToStream(object obj, Type type, int bufferSize = 1024);
//Serialize an object to a string
string SerializeToString(object obj);
string SerializeToString<T>(T obj) where T : class;
//Retrieve a list of either generics,objects,or dynamics from either a stream or string
List<dynamic> DeserializeToList(string content);
List<dynamic> DeserializeToList(Stream stream, int bufferSize = 1024, bool leaveStreamOpen = false);
List<T> DeserializeToList<T>(string content) where T : class;
List<T> DeserializeToList<T>(Stream stream, int bufferSize = 1024, bool leaveStreamOpen = false) where T : class;
List<object> DeserializeToList(string content, Type type);
//Retrieve a dynamic object from String or stream
dynamic Deserialize(string content);
dynamic Deserialize(Stream stream, int bufferSize = 1024, bool leaveStreamOpen = false);
//Retrieve a strongly type from a string or stream
T Deserialize<T>(string content) where T : class;
T Deserialize<T>(Stream stream, int bufferSize = 1024, bool leaveStreamOpen = false) where T : class;
//Retrieve a object from a string or stream
object Deserialize(string content, Type type);
object Deserialize(Stream stream, Type type, int bufferSize = 1024, bool leaveStreamOpen = false);
Serialization with Files
This example is going to reference a employee class and two global variables
public class Employee {
public string FirstName { get; set; } = "Jon";
public string LastName { get; set; } = "Last";
public int Id { get; set; }
}
var jsonSerializer = new DataSourceJson();
var employee = new Employee {Id = 1};
Write single object to file
using (var fileStream = new FileStream($@"C:\Temp\employee.csv", FileMode.Create, FileAccess.Write))
jsonSerializer.SerializeToStream(employee, fileStream);
Write list of objects to file
using (var fileStream = new FileStream($@"C:\Temp\employeeList.csv", FileMode.Create, FileAccess.Write))
jsonSerializer.SerializeListToStream(new List<Employee>(){employee}, fileStream);
Read single object from file
var employeeFromFile = jsonSerializer.Deserialize<Employee>(new StreamReader($@"C:\Temp\employee.csv").BaseStream);
Read list of objects from file
var employeesFromFile = jsonSerializer.DeserializeToList<Employee>(new StreamReader($@"C:\Temp\employeeList.csv").BaseStream);


Description
American Gothic painting is Grant Wood in collection of
the Art Institute of Chicago. Wood's inspiration came from what is
now known as American Gothic House, and his decision to
This familiar image was exhibited publicly for the first time at the Art Institute of Chicago, winning a three-hundred-dollar prize and instant fame for Grant Wood. The impetus for the painting came while Wood was visiting the small town of Eldon in his native Iowa.
American gothic arts prints straight out a compton
$25,000
Black stage art
5k followers
137 products
Estimated Delivery
7-14 days India
Return policy
No returns
Ships From
USA
Orange beard paint with
$167  Alvarez and 1.4k
Checked Table cloth and
$169  Fredrick and 1.6k
Son of Man
$267  Tony and 1.5k
Painting Hat
$178  Shamrock and 1.3k
Gothic Dress
$167  Alvarez and 1.4k
Flower and vas
$167  Silva and 1.6k
Cool Hat
$264  Tony and 1.5k
Baby Kitten
$146  Tom and 1.3k


It is a telling sign of how times have changed when the William Castle horror flick from eons ago, "House on Haunted Hill," passes for restraint in this jaded, anything-goes era of cheap thrills and gory violence. Sadly, this gore-laden remake of the original classic is another example of why the horror genre is dying - bloody thrills are never a substitute for character or plot.
Set in the 90's, we now have Stephen Price (Geoffrey Rush), a rich amusement park expert who knows how to draw screams from his customers, and relishes and prides himself on the visceral thrills he creates. His beautiful yet conniving wife, Evelyn (Famke Janssen), is having a birthday and Stephen plans to hold the bash at the House on Haunted Hill, formerly a mental asylum where the bloodiest, most savage murders took place this side of the Charlie Manson moon. Evelyn is not receptive to Stephen's morbid plans, nor to his inviting five unknown guests to spend the night at this house for 1 million dollars each. The catch is that they have to spend the entire night, no matter the consequences.
A splendid premise, as it was in the original, but the five-person group is hardly inviting company. There is Eddie Baker (Taye Diggs), a former athlete, Melissa Marr (Bridgette Wilson), a videographer who is fascinated by the house and its interiors, Donald Blackburn (Peter Gallagher), a doctor with a hidden agenda, and Sarah (Ali Arter), impersonating her boss with an agenda to just get the dough.
Since these five characters barely ignite our interest, we are left with Price and his wife, but their obscene shrewdness is a far cry from Vincent Price. Put simply, Rush overacts to the nth degree yet Janssen at least would have a field day if she was cast in a remake of "Double Indemnity" - she has fire, passion and a heart of coal. The dynamic Famke puts the rest of the cast to shame.
The house at least has some character but the shots of the interiors and the hallways are rendered so darkly that it may as well be Freddy Krueger's boiler room. Contrast this house with its 1958 counterpart, and at least the latter was somewhat inviting yet a sense of dread enveloped the place. Oh, my, how I miss the glory of black-and-white.
The biggest difference between the original and this remake is the introduction of the asylum and the horrors that once inhabited it. There is a curious 1931 prologue with Jeffrey Combs ("Reanimator") as some mad doctor who conducted grisly experiments, shown in docu-style, black-and-white footage. Sadly, none of this is really followed up on. Instead, we get high-pitched screams and fits, lots of canted angles, and a few gory deaths, not to mention a highly laughable special-effects monster that would barely scare Sigourney Weaver's Ripley. No wit, no scares, no purpose, and as with most recent remakes, no need.
For more reviews, check out JERRY AT THE MOVIES at http://buffs.moviething.com/buffs/faust/
E-mail me with any questions, comments or complaints at<EMAIL_ADDRESS>or at<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Gelatin silver print by Alfred Stieglitz (1929) © Georgia O’Keeffe Museum
Born in Sun Prairie, Wisconsin, in 1887, O’Keeffe developed an interest in art while she was still a child. By the time she died in 1986, she had become one of the most famous painters of the 20th century. Her works hang in museums around the world.
Timeline of the artist’s life
- 1887
- Born in Wisconsin; her parents were dairy farmers. She had six siblings.
- 1901 – 1902
- Attended boarding school in Madison, Wisconsin.
- 1903
- Joined her family in Williamsburg, Virginia, where they had moved in 1902.
- 1905 – 1906
- Attended the School of the Art Institute of Chicago.
- 1907
- Attended the Art Students League in New York City.
- 1908
- Met her future husband, photographer Alfred Stieglitz, at his gallery “291,” during an exhibition of Rodin's watercolors.
- 1912
- Took up painting again after a four-year hiatus while working in Chicago as a commercial artist.
- 1912 – 1914
- Taught art in the public schools in Amarillo, Texas.
- 1914 – 1916
- Attended Teachers College of Columbia University, where she took classes from Arthur Wesley Dow.
- 1916 – 1918
- Took a job as head of the art department at West Texas State Normal College, just south of Amarillo.
- 1918
- Moved to New York to devote all of her time to painting and began living together with Stieglitz.
- 1929
- Traveled to Santa Fe, New Mexico, with her friend Rebecca Strand. Moved into Mabel Dodge Luhan's house in Taos.
- 1932
- Suffered a nervous breakdown.
- 1940
- Moved to Ghost Ranch, north of Abiquiú, New Mexico.
- 1986
- Died in Santa Fe, New Mexico.


Administration
Y
STEEM Power
Products
Inventory
Forms
Viewable Products
Users
Roles
Notifications
Footer


STORE
MANAGER
UserName
Log out
Sales
All Sales
Inventory
Create New Item
Item Categories
All Items
User
New User
All Users
Categories!
ADD
#
Name
Description
Action
1
Taxable
Products that are taxable by law
2
Non Taxable
Products that are not taxable by law
3
Tax Exempted
Products exempted from taxation for a limited duration
4
High Margin
Products with high profit margins


Project Type: Personal Project
Language: HTML, CSS, JS
Last Pushed: July 14, 2020
Project Type: Clever Programming Challenge
Language: HTML, CSS, JS
Last Pushed: May 29, 2020


cloud forcing adjustments radiative adjustment climate rapid model temperature Climate Research models stratospheric ERF Geophysical {border-style http://orcid.org/--- Model kernel px;} #ffffff;} [], Forster, kernels using changes IRF change tropospheric Atmospheric surface Figure Myhre, Radiative atmospheric method water Andrews, negative ./JD Climate, Council Environment University forcing, response ./GL Earth Letters, Soden, Webb, carbon difference different feedback feedbacks supporting used vapor Environmental HadGEM Meteorological Myhre absorption adjustment, adjustments, effects experiments increase methods models. perturbation positive px; radiation total version {font-family Center Centre Cloud Institute Office Rapid aerosol black calculated clouds clr energy font-size grant include models, residual shows xCO ./JCLI-D--. Adjustments Atmospheres, Change Global Gregory, MMPRP Met NASA Research: Samset, Smith, Society, adjustments. concentrations data diagnostics double; effect forcing. information). integrations methane microphysical multimodel responses solar supported use work xBC xCH xSul %Sol (Forster APRP Bony, Boucher, CMIP ECMWF‐ERA‐Interim/Oslo Hadley Klein, National Natural New PDRMIP Partial Perturbation Research, Shell, Shindell, TOA USA Zhang, adjusted agreement border-color border-width circulation contribution direct individual large larger mean model. output particularly relative shown solid; spread {font-style {font-weight (Figure ./JCLI. American Assessment Bulletin Department Dynamics, ERF, Earth's European Faluvegi, Goddard Hodnebrog, However, Huang, Intergovernmental Lamarque, London Monthly Norwegian Panel Report Richardson, Soden Space Takemura, Taylor, Variability: Zelinka, agree atmosphere available bars base bold budget calculations compared constant control coupled courier; does effective em; equal experiment important kernels. known land largest mechanisms method. overall perturbations perturbed present processes profiles provided pt;} sea significant small smaller standard stratosphere strong study sum troposphere true vertical warming


class Template extends BaseAction implements EventSubscriberInterface
Methods
| mixed |
genericToggleVisibility(ModelCriteria $query, ToggleVisibilityEvent $event)
Toggle visibility for an object |
from BaseAction |
|
create(TemplateCreateEvent $event)
Create a new template entry |
||
|
update(TemplateUpdateEvent $event)
Change a product template |
||
|
delete(TemplateDeleteEvent $event)
Delete a product template entry |
||
|
addAttribute(TemplateAddAttributeEvent $event)
|
||
|
updateAttributePosition(UpdatePositionEvent $event)
Changes position, selecting absolute ou relative change. |
||
|
updateFeaturePosition(UpdatePositionEvent $event)
Changes position, selecting absolute ou relative change. |
||
|
deleteAttribute(TemplateDeleteAttributeEvent $event)
|
||
|
addFeature(TemplateAddFeatureEvent $event)
|
||
|
deleteFeature(TemplateDeleteFeatureEvent $event)
|
||
| static |
getSubscribedEvents()
{@inheritDoc} |
Details
in BaseAction at line 94
public mixed
genericToggleVisibility(ModelCriteria $query, ToggleVisibilityEvent $event)
Toggle visibility for an object
at line 43
public
create(TemplateCreateEvent $event)
Create a new template entry
at line 64
public
update(TemplateUpdateEvent $event)
Change a product template
at line 83
public
delete(TemplateDeleteEvent $event)
Delete a product template entry
at line 102
public
addAttribute(TemplateAddAttributeEvent $event)
at line 120
public
updateAttributePosition(UpdatePositionEvent $event)
Changes position, selecting absolute ou relative change.
at line 130
public
updateFeaturePosition(UpdatePositionEvent $event)
Changes position, selecting absolute ou relative change.
at line 135
public
deleteAttribute(TemplateDeleteAttributeEvent $event)
at line 147
public
addFeature(TemplateAddFeatureEvent $event)
at line 160
public
deleteFeature(TemplateDeleteFeatureEvent $event)
at line 175
static public
getSubscribedEvents()
{@inheritDoc}


|
| static | start () |
| | Starts the router by loading normal routes (not rest) More...
|
| |
| static | startRest () |
| | Starts the router by loading rest routes (not normal routes) More...
|
| |
| static | startAll () |
| | Starts the router by loading all routes (normal + rest routes) More...
|
| |
| static | getRoute ($path, $cachedResponse=true, $debug=false) |
| | Returns the route corresponding to a path. More...
|
| |
| static | getRouteByName ($name, $parameters=[], $absolute=true) |
| | Returns the generated path from a route. More...
|
| |
| static | path ($name, $parameters=[], $absolute=false) |
| | Returns the generated path from a route. More...
|
| |
| static | url ($name, $parameters=[]) |
| | Returns the generated url from a route. More...
|
| |
| static | getRouteUrlParts ($routeArray, $params, $cached=false, $duration=NULL, $cachedResponse=true) |
| |
| static | slashPath ($path) |
| | Adds a slash before and after a path. More...
|
| |
| static | setExpired ($routePath) |
| | Declare a route as expired. More...
|
| |
| static | getRoutes () |
| | Returns the array of loaded routes. More...
|
| |
| static | addRoute ($path, $controller, $action="index", $methods=null, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | addRouteToRoutes (&$routesArray, $path, $controller, $action="index", $methods=null, $name="", $cache=false, $duration=null, $requirements=[], $priority=0, $callback=null) |
| |
| static | addCallableRoute ($path, $callable, $methods=null, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | get ($path, $callable, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | post ($path, $callable, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | delete ($path, $callable, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | put ($path, $callable, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | patch ($path, $callable, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | options ($path, $callable, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | addRoutesToRoutes (&$routesArray, $paths, $controller, $action="index", $methods=null, $name="", $cache=false, $duration=null, $requirements=[], $priority=0) |
| |
| static | slashPath ($path) |
| |
| static | getRouteInfoByControllerAction ($controller, $action) |
| |
| static | getRoutesPathByController ($controller) |
| |
| static | getRoutePathInfos ($controller, $routePath, $routeInfo) |
| |
| static | getRouteInfo ($path) |
| |
| static | getAnnotations ($controllerName, $actionName) |
| |
| static | filterRoutes ($path) |
| |
| static | testRoutes ($path, $method=null) |
| |
Router manager.
Ubiquity$Router This class is part of Ubiquity
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp<EMAIL_ADDRESS>- Version
- 1.0.9
Definition at line 22 of file Router.php.


Backup Utilities¶
All of the following modules are used for creating backups for files in as painless a way as possible.
mv_to_repo
¶
Move files from the home directory to the dotfiles repo.
This is a script I’ve been using for the better part of a year, so while the docstring formatting isn’t consistent and there are a couple odd sections, this script has served a very utilitarian purpose.
May refactor one day. But it continues to work.
Note
This module assumes a python interpreter above version 3.4.
backup_nt_and_posix
¶
Motivation¶
This script aims to be platform agnostic and in the long term will be used on Windows, Linux, Mac and Android systems.
-
pyutil.backup_nt_and_posix.
timestamped_dir
()[source]¶ Create a backup of a directory. Append date and time to new dir name.
Todo
Change this so that it utilizes
subprocess.check_call()
so we handle return codes in a better way.
rclone
¶
Backup files using rclone.
rclone¶
Requires
rclone, a Golang package.
- Set up a simple single use case backup.
Realistically this should be more of the focus.
However if it’s not, then we could make a
collections.defaultdict
that holds default values for each option. * Actually wouldn’tconfigparser.ConfigParser
make more sense?In addition we could use
collections.ChainMap()
to set precedence ofbackupdir
.Expand
argparse
usage withargparse.fromfile_prefix_chars()
to emulate rsync’s file input.
-
pyutil.rclone.
_dir_checker
(dir_)[source]¶ Check that necessary directories exist.
If the default
dst
doesn’t exist, definitely create it. If the user providedsrc
doesn’t exist, crash without making one.It’s more likely that they typed the src dir incorrectly rather than running the script aware of the fact that it is nonexistent.
-
pyutil.rclone.
rclone_base_case
(src, dst)[source]¶ Base case that all other functions build off of.
This function shouldn’t be executed directly; however, it serves as a good template detailing a function and useful command with parameters that rclone uses.
For example,
--follow
is a flag that has conditionals associated it with it.There are situations in which one wants to follow symlinks and others that they don’t.
This command assumes a use case and configures it rclone for it properly.
Todo
rclone takes an argument for user-agent
-
pyutil.rclone.
run
(cmd, \*\*kwargs)[source]¶ Execute the required command in a subshell.
First the command is splited used typical shell grammer.
A new process is created, and from the resulting subprocess object, the
subprocess.Popen().wait()
.This function returns the return code of split
cmd
, so any non-zero value will lead to aSystemExit
with a passed value ofreturncode
.


Invoice number: {{invoiceNo}}
Issued on: {{issuedOn}}
{{customer.name}}
{{customer.date}}
Passport: {{customer.passport}}
Issuing country: {{customer.country}}
Residency country: {{customer.residency}}
{{company.name}}
{{company.code}}
{{company.address}}
{{company.zip}}
Code
Description
Qty.
Price
including VATVAT
Net
Subtotal{{subtotal | currency:'EUR'}}
Net discount
Positive only
Total{{total | currency:'EUR'}}


GDPR Notice: This site reports basic user metrics to a private analytics server, primarily so that I know if it's worth my time to maintain. [Details]


| There is less than 10% and 1GB free on ${N=SwisEntity;M=Caption} on ${N=SwisEntity;M=Node.Caption}. Temp files and extraneous logs have already been removed. |
| Alert Name: ${N=Alerting;M=AlertName} / Trigger Time: ${N=Alerting;M=AlertTriggerTime;F=DateTime} |
|
| Alert Details: ${N=Alerting;M=AlertDescription} |
| Acknowledge ${N=Alerting;M=AcknowledgeUrl} |


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import includes.{cancelLink, ptaHeader, submit} @import play.api.mvc.Call @import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF @this(mainTemplate: MainTemplate, form: FormWithCSRF) @(viewModel: uk.gov.hmrc.tai.viewModels.pensions.CheckYourAnswersViewModel)(implicit request: Request[_], messages: Messages, user: controllers.auth.AuthedUser) @header() = @{ ptaHeader( mainHeadingText = Messages("tai.checkYourAnswers.title"), preHeadingText = viewModel.preHeading ) } @mainTemplate( title = Messages("tai.checkYourAnswers.title"), authedUser = Some(user), pageTitle = Some(messages("tai.service.navTitle")), backLinkId = "backLink", backLinkContent = Some(Messages("tai.back-link.upper")), backLinkUrl = Some(controllers.pensions.routes.AddPensionProviderController.addTelephoneNumber().url) ) {
@viewModel.postConfirmationText
@submit(buttonMessageKey = Some(messages("tai.confirmAndSend"))) } @cancelLink(Call("GET", viewModel.cancelUrl))


{% extends "data_apis/base.html" %} {% load markdown_filter %} {% block page_title %}Data-powered democracy: Voting Information APIs{% endblock %} {% block main_content %} {# fmt:off #}
We collect and standardise election data including seats, polling stations, candidates and more; everything you need to get your users informed and voting. This information is endorsed and used by the Electoral Commission and powers many other organisations.
For individuals who want to prototype new tools
Pay what you can
Up to 1,000 requests a day
Self serve
Get startedFor small teams who want to build election services
£3,500 plus VAT per scheduled election
Up to 10,000 requests a day
4 hours technical integration support
Covers all by-elections and other polls for a year
Get startedFor companies who want a fully scalable service
PoA
Unlimited requests
Technical integration support
Real time technical support
Bespoke fields
Get started


Digital Divide Map
Why are we here?
- To give an overview of the development and execution of the digital divide map
- To offer some options for what Internet NZ wants to see achieved with the map in 2018
- To open open the floor for discussion about digital inclusion in your regions
What we set out to achieve
We wanted to render digital divides in a more accessible way, and to understand how digital inclusion and social wellbeing indicators related to each other.
We recieved funding from the Data Futures Partnership to develop this project as an example of how data can be used to tell a story about New Zealanders
Why a Digital Divide Map
- Technical access is getting solved
- In the 2020s access will not equal infrastructure
- Affordability & skill are the next access issues
How the map is constructed
A digital inclusion indicator which is made up of:
- Broadband map (ex satellite)
- Census data (whether household has Internet)
- OECD's PIAAC technology skills dataset
And a social well being indicator, the University of Otago’s Social Deprivation Index
What the colours represent
Dark = good
Light = bad
You can explore the state of digital inclusion in your own regions at digitaldivide.nz
What does InternetNZ want to achieve with the digital divide map in 2018?
Tell real stories about our nation, and how we experience digital divides in our communities
Help grant funders understand the nature of the regions, to provide better funding outcomes
See changes over time, so we know what initiatives are working where, and find opportunities to scale
Inform digital divide interventions across New Zealand
What do we need to improve?
Better data to power the map
Open sourcing the project to get others involved
Visible representations of community projects and efforts


Basic syntax:
if 1 < 2
print "yup"
elsif
print "ok"
else
print "war"
end
Can refactor to:
expression if bool
Ternary conditional:
boolean ? Do this if true: Do this if false
puts var1 == var2 ? "ok" : "nope"
Basic syntax:
unless bool
print "ok"
else
print "cool"
end
Can refactor to:
expression unless bool
While loop:
counter = 1
while counter < 11
puts counter
counter += 1
end
Until loop:
counter = 1
until counter == 11
puts counter
counter += 1
end
For iterator: (hint '..' is inclusive)
for num in 1..10
puts num
end
Fixed iterator:
10.times{|n| puts n}
Array iterator:
array.each{|x| puts x}
Others:
.upto(num)
num.next
Arrays:
my_array = [1,2,3]
my_array.each{ |x| puts x }
Hashes:
my_hash = {
"Key1" => "value1",
"Key2" => value2
}
or
my_hash = Hash.new
my_hash["name"] = "Menuka"
Iterating through hash with key-value pair:
my_hash.each{|key,value| puts #{key}: #{value}}
Can also use symbols for hashes. Some other useful methods include:
.each_key
.each_value
.delete(value)
Basic declaration:
def method_name(arguments)
code body
end
In methods we don't need return statements and can set default parameter values if not included in the method call.
Input:
input = gets.chomp
numInput = Integer(gets.chomp)
Output variables
puts "Number was #{var}"
Split words to array:
wordArray = text.split
String tricks:
string.capitalize!
string.upcase!
string.downcase!
Quick replace char:
if user_input.include? "s"
user_input.gsub!(/s/ , "th")
end
Ruby types tricks:
.to_s
.is_a?
Combined comparison operator: (Returns 1,0,-1 depending on left compared to right)
num.sort!{|first_num, last_num| second_num <=> first_num}
Check if method/object/symbol responds to certain method:
my_array.respond_to?(:push)


Visualizations of Toxicity in Tweets
This project displays data visualizations about toxicity on Twitter for various high profile politicians. The data was collected by querying the Twitter API periodically and dates back to early 2019. We queried the Twitter API and searched for key words including the politician's first and last name and their twitter handles. In order to get information about the sentiment of the tweet, we used the Perspective API, an API used to detect abuse and harassment online. Perspective API has the ability to detect multiple attributes. We used toxicity, identity attack, and sexually explicit. Perspective API takes comment text as input and returns a "score" from 0 to 1 that indicates the probability that the comment is similar to toxic comments it's seen in the past. A score of 0 signifies 0% probability that the comment is toxic, a score of 1 signifies 100% probability that the comment is toxic, and a score of 0.5 signifies a 50% probability that the comment is toxic (i.e., that the model is not sure). It should be noted that there are known unintended biases within the Perspective API.
Comparing the different levels of toxic, flirtatious, and identity attack tweets against politicians. Click on the legend to pick which attributes to see.
A theme that emerged was the difference in attacks against male and female politicians. Female politicians are far more likely to have high identity attacks or flirtatious tweets when they are being spoken about online. All the politicians had similar levels of toxic tweets, surprisingly showing that toxicity on Twitter does not discriminate by gender.
Gender and Targeting of Explicit Tweets
Women in public life face a variety of challenges that their male counterparts do not. Notable among these are sexually explicit insults and attacks. This is exemplified in Twitter data of sexually explicit tweets sent to female politicians. While the data is live and subject to current events and reactions, tweets to female politicians consistently appear higher in sexually explicit attributes. This especially the case at the very high end of the range with very explicit tweets.
Female politicians include: Amy Klobuchar, Alexandria Ocasio-Cortez, Nancy Pelosi, Elizabeth Warren, Kamala Harris, Susan Collins, Lisa Murkowski
Male politicians include: Joe Biden, Pete Buttigieg, Chuck Schumer, Bernie Sanders
To learn more about the ways toxicity and identity attacks interact with each other, we plotted each tweets identity attack score vs its toxicity score. You can see that while most Tweets are in the bottom right, there are a fair few that are both very toxic and have a large identity attack.
Click to view interactive version


Tests, coverage and debug tools
Tests
Interface
Modules
Standards
(microformats test suite)
Coverage
Continuous integration
(server-side for travis-ci etc)
Test runner
Debug
Parse
(modules for debugging)
Parse
(full interface)
Count


--- layout: default ---
Medikit automates keeping your projects' boilerplate files and directory sane and up to date.

It's not a dependency. All changes are commited in your source tree.
You write amazing code, Medikit focuses on keeping it clean and ordered.
Medikit generates and updates all non-business related files in your python or polyglot projects.
It's based on a extensible features set that combines to build the exact right files (like
Makefile
,setup.py
,MANIFEST.in
,.gitignore
,Dockerfile
, tests directory structure, package directory structure, etc.)Want to update your project? Run
make update
.First time in a new project? Run
make help
.
Medikit is an “eventual” dependency, meaning that developpers won't need it to actually use the project. All results of its execution are commited in your git repository.
The only configuration file required is a Projectfile
, which contains regular Python code.
It describes the feature you use (i.e Python, Make, Git, Docker and Pytest), the custom choices you
took about them and eventually some project-specific features (wanna add a make sandwich
command? Three lines in there).
 Whatever you have, it is the exposed interface, and all
newcomers can run make help
to understand their possibilities.
The base building blocks of a Medikit-managed projects are combinable features.
To add a feature, you need a Projectfile
at your project's root (which is written in python),
and require(...)
the feature:
from medikit import require
python = require('python')
python.setup(
name='acme'
)
You then need to run medikit update
to apply changes to your project's codebase (or make
update
).
| Feature | Description | Artifacts | Maturity |
|---|---|---|---|
| Documentation {{ feature.name | capitalize }} | {{ feature.description }} {% if feature.requires %} (requires {{ feature.requires | join: ", " }}) {% endif %} |
{% if feature.artifacts.files %}
Files:
{% assign sorted_files = feature.artifacts.files | sort %}
{% for file in sorted_files %}
{% endif %}
{% if feature.artifacts.targets %}
{{ file }} {% unless forloop.last %}, {% endunless %}
{% endfor %}
Targets:
{% assign sorted_targets = feature.artifacts.targets | sort %}
{% for target in sorted_targets %}
{% endif %}
{% if feature.artifacts.reqs %}
make {{ target }} {% unless forloop.last %}, {% endunless %}
{% endfor %}
{% assign sorted_reqs = feature.artifacts.reqs | sort %}
Requirements:
{% for req in sorted_reqs %}
{% endif %}
{% if feature.artifacts.reqs_dev %}
{{ req }} {% unless forloop.last %}, {% endunless %}
{% endfor %}
{% assign sorted_reqs_dev = feature.artifacts.reqs_dev | sort %}
Requirements (dev):
{% for req in sorted_reqs_dev %}
{% endif %}
{% if feature.artifacts.reqs_prod %}
{{ req }} {% unless forloop.last %}, {% endunless %}
{% endfor %}
{% assign sorted_reqs_prod = feature.artifacts.reqs_prod | sort %}
Requirements (prod):
{% for req in sorted_reqs_prod %}
{% endif %}
{% if feature.artifacts.misc %}
{{ req }} {% unless forloop.last %}, {% endunless %}
{% endfor %}
Misc.:
{% for item in feature.artifacts.misc %}
{{ item }}{% unless forloop.last %}, {% endunless %}
{% endfor %}
{% endif %}
|
{% if feature.maturity == 0 %} Core {% elsif feature.maturity == 1 %} Stable {% elsif feature.maturity == 2 %} Beta {% elsif feature.maturity == 3 %} Alpha {% elsif feature.maturity == 4 %} Pre-Alpha {% elsif feature.maturity == 5 %} Dev {% elsif feature.maturity == 10 %} Deprecated {% elsif feature.maturity == 11 %} Removed {% else %} ??? {% endif %} |
To extend medikit, you have two options.
If you only need a "local" extension, that is only valid in a given project, you can extend it inline
in the Projectfile
, most probably by listening to an event sent either by medikit, or a
medikit feature.
Here is an example that extends the make
feature to add an environment variable and a target:
from medikit import listen, require
make = require('make')
@listen(make.on_generate)
def on_make_generate(event):
event.makefile['HELLO_NAME'] = 'World'
event.makefile.add_target('hello', '@echo "Hello, $(HELLO_NAME)"', phony=True, doc="Say Hello")
All future medikit update
calls will update your project with your customization.
The second option is to write a feature class, which is mostly a bunch of event listeners and a mechanism to autoregister into medikit.
Have a look at the builtin features source code, and write a similar class in your
own package. Then, you'll just need to add it as a medikit.feature
entrypoint and install your
package. See
medikit's own
Projectfile.
As the mechanism for both inline extension and packaged features are the same, it's usually a good idea to test an idea / feature locally within a project, and only refactor it as a feature once you're satisfied enough.
Medikit and the surrounding material (like this website) is licensed under the Apache License, version 2.0.
The dependencies and other tools used by the features have their own licenses, please have a look at their websites if you're unsure about what's allowed.


| Project | Start Date | End Date | Funding Entity | Researchers |
|---|---|---|---|---|
| Steel Smithing | Can create Steel armor and weapons at forges, and improve them twice as much. | 000cb40d | ||
| Arcane Blacksmith | You can improve magical weapons and armor. | 0005218e | 60 Smithing | Steel Smithing |
| Dwarven Smithing | Can create Dwarven armor and weapons at forges, and improve them twice as much. | 000cb40e | 30 Smithing | Steel Smithing |
| Orcish Smithing | Can create Orcish armor and weapons at forges, and improve them twice as much. | 000cb410 | 50 Smithing | Dwarven Smithing |
| Ebony Smithing | Can create Ebony armor and weapons at forges, and improve them twice as much. | 000cb412 | 80 Smithing | Orcish Smithing |
| Daedric Smithing | Can create Daedric armor and weapons at forges, and improve them twice as much. | 000cb413 | 90 Smithing | Ebony Smithing |
| Elven Smithing | Can create Elven armor and weapons at forges, and improve them twice as much. | 000cb40f | 30 Smithing | Steel Smithing |
| Advanced Armors | Can create Scaled and Plate armor at forges, and improve them twice as much. | 000cb414 | 50 Smithing | Elven Smithing |
| Glass Smithing | Can create Glass armor and weapons at forges, and improve them twice as much. | 000cb411 | 70 Smithing | Advanced Armors |
| Dragon Armor | Can create Dragon armor at forges, and improve them twice as much. | 00052190 | 100 Smithing | Daedric Smithing or Glass Smithing |