Preparation time
less than 30 mins
Cooking time
1 to 2 hours
Serves
Serves 4
Dietary
Cook up a simple cherry filling (with added brandy, honey and orange zest), and using readymade pastry you can assemble a delicious and rather impressive dessert.
Preheat the oven to 200C/400F/Gas 6. Line a baking tray with parchment and have another tray and sheet of parchment ready.
Roll out the pastry to 5mm/1/4-inch thick and cut to fit the lined baking tray. Prick it all over with a fork. You need enough cooked pastry from which to be able to cut three 15x15cm/6x6in squares.
Place the pastry on the lined tray. Put another piece of parchment on top and put the second tray on top of that.
Bake for 20 minutes, or until golden-brown. Leave to cool, then trim into three even squares.
To make the cherry compôte, put the cherries in a pan with the orange zest, cherry brandy and honey. Bring to the boil, then reduce the heat and simmer for about five minutes, until the cherries have softened but still hold their shape. Strain the juices off and return these to the pan. Set the cherries aside.
Mix the cornflour with a little water to make a runny paste, then add to the liquid in the pan. Whisk over a high heat until the liquid thickens. Return the cherries to the pan and mix. Leave to cool.
When you are ready to assemble the cake, whip the cream until firm peaks form when the whisk is lifted. Put out four tablespoons in a bowl for later.
Gently fold two-thirds of the cherry compôte into the cream. Place one of the pastry squares on a board. Top with half of the cherry cream mix. Put a second pastry square on top, then the other half of the mix, then top with the last pastry sheet. Chill in the fridge for at least an hour to set.
To serve, place the cake on a serving plate. Cover the sides of the cake with the remaining cream. Dredge the top with icing sugar. Carefully heat a skewer in a gas flame, then scorch a line across the surface of the cake, repeating to create a criss-cross pattern. Decorate with the remaining compôte.


Guide for Monthly Resource Home Contact
Prior to initiating the
monthly contact with resource parents, review the resource file to determine if there is an
ongoing written plan of compliance (WPC), open overfill request, or recent referrals on the home. You must be prepared
to address the action steps in the WPC and the overfill support plan during the monthly contact.
Prior to the
in-home quarterly visit, contact the permanency planning specialist for each child placed in
the home. This contact is made to gather feedback on the child and the resource home, the child's ongoing adjustment
in the home, and to discuss the child and resource family support plan.
What follow-up was completed from the previous month?
Resource Information
Note:you
must answer the following question to display the full form before printing.
Are any children placed in the home?
Yes
No
When the number of children placed in the home exceeds the number of max approved beds in KIDS, complete the
Request to Increase Maximum Number of Approved Beds.
Build rapport with your resource family by asking how they are doing and following up on information shared the previous
month.
Are there any changes in the home or with the household members?
For example, is anyone staying overnight, or moving in or out of the home? Are there any changes in jobs, health, behavioral
health, or stress? Ask about their stress level. Is there anything they need?
Update contact information such as phone number(s) or email(s):
How is everyone adjusting, including the resource family, biological children and children placed?
Ask the family about the type of discipline used for each child in the home and describe it's effectiveness:
Are the children placed in your home receiving the services they need? List additional services needed and plan to follow-up.
Identify if the follow-up is to be completed by the worker or the family.
Discuss and document the overfill support plan if the home is overfilled:
Discuss and document the progress on an open WPC:
Has the family completed any in-service training this month? List the training received:
Document which Monthly Resource Reminder was discussed:
Does the family have any questions or concerns?
In-Home Quarterly Visit
Observations made during walk-through of the home. Are there any changes in the home environment; for example, are there
any new pets, water structures, vehicles, weapons, or sleeping arrangements? List any further assessment needed and
the time frame for completion:
Observations of family interactions made during visit. Who was present? Describe any interactions observed, positive
or negative:
Are there any changes in household income, such as TANF or Social Security payments?
Discuss and document the child and resource family support plan:
Worker Follow-up
Concerns that need to be addressed:
Describe any follow-up needed after today's contact, for example, child's needs, family's needs, contact with children's
workers, or updating KIDS information:
Describe any follow-up needed after today's contact on a WPC, the overfill support plan, and the child and resource family
support plan.


Ann watched a TV program about health and learned that it is recommended to sleep at least \(A\) hours per day. Oversleeping is also unhealthy and you should not sleep more than \(B\) hours. Now, Ann sleeps \(H\) hours per day.
Check if Ann's sleep schedule complies with the requirements of that TV program.
The input format:
The input comprises three strings with variables in the following order: \( A \), \( B \), \( H \).
\( A \) is always less than or equal to \( B \).
The output format:
If Ann sleeps less than \(A\) hours, output "Deficiency"
, if she sleeps more than \(B\) hours, output "Excess"
.
If \(H\) lies between \(A\) and \(B\), print "Normal"
.


{% if user.user_type == 'R' %}
NGOs Served
Details of food sent to different NGOs
{% else %}Food Orders placed
Details of food collected from different hotels/NGOs
{% endif %}{% load static %}
Details of food sent to different NGOs
{% else %}Details of food collected from different hotels/NGOs
{% endif %}


| gendoc | index /home/surf/sfdcexport/lib/gendoc.py |
Run this from the gendoc shell script in the bin directory
Author: Kevin Shuk<EMAIL_ADDRESS>Date: Sep 17, 2005
Copyright: (c) 2005, Kevin Shuk
All Rights Reserved
| Modules | ||||||
|
| Data | ||
| ident = '$ID: $' |


CSPICE_DSKRB2 determine range bounds for a DSK plate set.
Given:
vrtces is an array of coordinates of the vertices. The Ith
vertex occupies elements [1:3,I] of this array.
[3,m] = size(vrtces); double = class(vrtces)
plates is a array representing the triangular plates of a
shape model. The elements of `plates' are vertex
indices; vertex indices are 1-based. The vertex
indices of the Ith plate occupy elements [1:3,I] of
this array.
[3,n] = size(plates); int32 = class(plates)
corsys is an integer parameter identifying the coordinate
system in which the bounds are to be computed.
[1,1] = size(corsys); int32 = class(corsys)
The bounds apply to the third coordinate in each system:
Latitudinal: radius
Planetodetic: altitude
Rectangular: Z
corpar is a array of parameters associated with the coordinate
system.
[2,1] = size(corpar); double = class(corpar)
Currently the only supported system that has
associated parameters is the planetodetic system. For
planetodetic coordinates,
corpar(1) is the equatorial radius
corpar(2) is the flattening coefficient. Let `re' and
`rp' represent, respectively, the equatorial and
polar radii of the reference ellipsoid of the
system. Then
corpar(2) = ( re - rp ) / re
the call:
[mncor3, mxcor3] = cspice_dskrb2( vrtces, plates, corsys, corpar )
returns:
mncor3 is a lower bound on the range of the third coordinate
of the system identified by `corsys' and `corpar', taken
over all plates.
[1,1] = size(mncor3); double = class(mncor3)
For latitudinal and rectangular coordinates, `mncor3'
is the greatest lower bound of the third coordinate.
For planetodetic coordinates, `mncor3' is an
approximation: it is less than or equal to the greatest
lower bound.
mxcor3 is the least upper bound on the range of the third
coordinate of the system identified by `corsys' and
`corpar', taken over all plates.
[1,1] = size(mxcor3); double = class(mxcor3)
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
Example(1):
function dskd02_t
%
% MiceUser globally defines DSK parameters.
% For more information, please see DSKMiceUser.m and
% DSKMice02.m.
%
MiceUser
NSEG = 3;
cornam = { 'radius', 'Z-coordinate', 'Z-coordinate', 'altitude'};
%
% Assign names of input and output DSK files.
%
indsk = '/kernels/gen/dsk/phobos_3_3.bds';
dsk = 'phobos_3_3_3seg.bds';
if ( exist( dsk, 'file' ) == 2 )
delete( dsk )
end
%
% Open input DSK for read access; find first segment.
%
inhan = cspice_dasopr( indsk );
[dladsc, found] = cspice_dlabfs( inhan );
%
% Fetch vertices and plates from input DSK file.
%
% Note that vertex and plate indices are 1-based.
%
disp( 'Reading input data...' )
vrtces = cspice_dskv02( inhan, dladsc, 1, SPICE_DSK02_MAXVRT );
plates = cspice_dskp02( inhan, dladsc, 1, SPICE_DSK02_MAXPLT );
disp( 'Done.' )
%
% Set input array sizes required by cspice_dskmi2.
%
voxpsz = SPICE_DSK02_MAXVXP;
voxlsz = SPICE_DSK02_MXNVLS;
worksz = SPICE_DSK02_MAXCEL;
spaisz = SPICE_DSK02_SPAISZ;
makvtl = true;
%
% Set fine and coarse voxel scales. (These usually
% need to determined by experimentation.)
%
finscl = 5.0;
corscl = 4;
%
% Open a new DSK file.
%
handle = cspice_dskopn( dsk, dsk, 0 );
for segno=1:NSEG
%
% Create spatial index. We won't generate a
% vertex-plate mapping, so we set the flag
% for creating this map to "false."
%
fprintf( 'Creating segment %d\n', segno )
fprintf( 'Creating spatial index...\n' )
[spaixd, spaixi] = cspice_dskmi2( vrtces, plates, finscl, ...
corscl, worksz, voxpsz, ...
voxlsz, makvtl, ...
spaisz );
fprintf( 'Done.\n')
%
% Set up inputs describing segment attributes:
%
% - Central body: Phobos
% - Surface ID code: user's choice.
% We use the segment number here.
% - Data class: general (arbitrary) shape
% - Body-fixed reference frame
% - Time coverage bounds (TBD)
%
center = 401;
surfid = segno;
dclass = SPICE_DSK_GENCLS;
frame = 'IAU_PHOBOS';
first = -50. * cspice_jyear();
last = 50. * cspice_jyear();
%
% Set the coordinate system and coordinate system
% bounds based on the segment index.
%
% Zero out the coordinate parameters to start.
%
corpar = zeros(SPICE_DSK_NSYPAR,1);
switch segno
case 1
%
% Use planetocentric latitudinal coordinates. Set
% the longitude and latitude bounds.
%
corsys = SPICE_DSK_LATSYS;
mncor1 = -cspice_pi();
mxcor1 = cspice_pi();
mncor2 = -cspice_halfpi();
mxcor2 = cspice_halfpi();
case 2
%
% Use rectangular coordinates. Set the
% X and Y bounds.
%
% The bounds shown here were derived from
% the plate data. They lie slightly outside
% of the range spanned by the plates.
%
corsys = SPICE_DSK_RECSYS;
mncor1 = -1.3;
mxcor1 = 1.31;
mncor2 = -1.21;
mxcor2 = 1.2;
case 3
%
% Set the coordinate system to planetodetic.
%
corsys = SPICE_DSK_PDTSYS;
mncor1 = -cspice_pi();
mxcor1 = cspice_pi();
mncor2 = -cspice_halfpi();
mxcor2 = cspice_halfpi();
%
% We'll use equatorial and polar radii from
% pck00010.tpc. These normally would be fetched
% at run time, but for simplicity, we'll use
% hard-coded values.
%
re = 13.0;
rp = 9.1;
f = ( re - rp ) / re;
corpar = [ re, f ]';
otherwise
error( 'Mice(BUG)' )
end
%
% Compute plate model radius bounds.
%
fprintf( 'Computing %s bounds of plate set...\n', ...
char(cornam(corsys)) )
[mncor3, mxcor3] = cspice_dskrb2( vrtces, plates, corsys, corpar );
fprintf ( 'Done.\n' )
%
% Write the segment to the file.
%
fprintf( 'Writing segment...\n' )
cspice_dskw02( handle, ...
center, ...
surfid, ...
dclass, ...
frame, ...
corsys, ...
corpar, ...
mncor1, ...
mxcor1, ...
mncor2, ...
mxcor2, ...
mncor3, ...
mxcor3, ...
first, ...
last, ...
vrtces, ...
plates, ...
spaixd, ...
spaixi )
end
cspice_dascls( inhan )
cspice_dskcls( handle, true )
%
% Close the input DSK.
%
cspice_dascls( inhan )
MATLAB outputs:
Reading input data...
Done.
Creating segment 1
Creating spatial index...
Done.
Computing radius bounds of plate set...
Done.
Writing segment...
Creating segment 2
Creating spatial index...
Done.
Computing Z-coordinate bounds of plate set...
Done.
Writing segment...
Creating segment 3
Creating spatial index...
Done.
Computing altitude bounds of plate set...
Done.
Writing segment...
After run completion, A DSK exists in the output directory.
None.
For important details concerning this module's function, please refer to
the CSPICE routine dskrb2_c.
MICE.REQ
DAS.REQ
DSK.REQ
-Mice Version 1.0.0, 04-FEB-2016, EDW (JPL), NJB (JPL)
compute range bounds for type 2 dsk segment
|


Menu
Sentiment Analysis Tool
...
Overall Sentiment
Polarity
Percentage
Count
Total
Sentiment Comparison
Compare With:
Sentiment of Comments
Name
Comment
Polarity
Score


Connected Users:
Dear user, welcome to our chat app!
Here you can communicate with your friends, plus you can get to know other people. In order to use the app, you just need to click on the person you would like to chat with and you are all set.
Remember to have fun. If any problem occurs contact as at<EMAIL_ADDRESS>Start chatting right now!
Sincerely,
That Chat App team.


Introduction
C99 is the 1999 standard of the C programming language. C is a simple, low level language, that is best suited for systems programming.
This article will present a number of C99's features. Some of these features have yet to appear in C++, and therefore might not be familiar to some C++ programmers.
We will start off easy, with minor backports from C++, then move up to C99-only features, to wrap it up with "serious" code, adapted for this article from a small, real life project.
The source code in this article was tested to compile with Pelles C IDE 7, however due to the popularity and age of C99, the code should build fine with many other C compilers. Just be sure to enable C99 support, if needed.
No mandatory return for main()
As in C++, if the return statement is omitted in the
main()
function, a
return 0;
is implied.
Booleans
The
_Bool
data type is introduced, which behaves like an unsigned integer capable of storing only 1 or 0.
The supporting header
stdbool.h contains the macros
bool
,
true
and
false
expanding to
_Bool
, 1 and 0 respectively.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#include <stdbool.h>
#include <stdio.h>
int main(void)
{
bool b = false;
printf("%u\n", b);
b = 5 > 3;
printf("%u\n", b);
b = 0;
printf("%u\n", b);
b = -987;
printf("%u\n", b);
}
| |
Output:
%zu
for size_t
The
%zu
format specifier was introduced specifically for
size_t
, so as to clear the confusion of having to choose in between the unsigned integer specifiers
%u
,
%lu
, and more recently
%llu
.
Example:
1 2 3 4 5 6 7 8 9 10
|
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
int main(void)
{
size_t sz = SIZE_MAX;
printf("%zu\n", sz);
}
| |
Possible output:
Functions know their own name
The
__func__
identifier behaves like a constant
char
array containing the name of the function where it is invisibly declared.
Example:
1 2 3 4 5 6 7 8 9 10 11 12
|
#include <stdio.h>
void i_know_my_name(void)
{
printf("%s\n", __func__);
}
int main(void)
{
i_know_my_name();
printf("%s\n", __func__);
}
| |
Output:
Variable-length arrays
The variable-length arrays (or VLA's) are arrays that can be declared by using a variable, instead of a compile-time constant, for their size. They do not have variable length as in being able to resize.
VLA's are infamous because they're allocated on the stack and not the heap. The stack area is used for local variables, and is more limited in size than the heap. If the size of the VLA is too big, a stack overflow will occur, resulting in a crash.
Still, the VLA is a very useful tool when the programmer wants to use small arrays, while avoiding the tedious
malloc()
+
free()
business.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
// This program will construct and display an n*n identity matrix.
#include <stddef.h>
#include <stdio.h>
int main(void)
{
size_t n=0;
printf("Please input `n': ");
scanf("%zu", &n);
int matrix[n][n];
for (size_t i=0; i < n; ++i)
for (size_t j=0; j < n; ++j)
if (i == j)
matrix[i][j] = 1;
else
matrix[i][j] = 0;
for (size_t i=0; i < n; ++i)
{
for (size_t j=0; j < n; ++j)
printf("%d ", matrix[i][j]);
printf("\n");
}
}
| |
Sample output:
Please input `n': 10
1 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 1
|
Variadic macros
Functions can accept a variable number of parameters by using the ellipsis (
...
). Starting from C99, so too can macros. In the macro's definition,
__VA_ARGS__
will be used to expand the parameters.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define TIME_PRINTF(format, ...) do { \
time_t t = time(NULL); \
const char *prefix = "%s -> "; \
char time_format_vla[strlen(prefix) + strlen(format) + 1]; \
strcpy(time_format_vla, prefix); \
strcat(time_format_vla, format); \
printf(time_format_vla, ctime(&t), __VA_ARGS__); \
} while (false)
int main(void)
{
srand(time(NULL));
TIME_PRINTF("Hello %s, your number is %d! Please wait...\n\n", "User", rand() % 100);
// waste some time
for (size_t n=0; n < SIZE_MAX; ++n);
// unfortunately, we need to pass at least two parameters
TIME_PRINTF("%s", "So how's it going?");
}
| |
Sample output:
Wed Apr 3 12:33:23 2013
-> Hello User, your number is 75! Please wait...
Wed Apr 3 12:33:33 2013
-> So how's it going?
|
Designated initializers
C99 offers a way to control which member in a structure, or which element in an array, to initialize and to what value.
It's easier to just jump into the example for this one.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include <ctype.h>
#include <stddef.h>
#include <stdio.h>
int main(void)
{
char ca[10] = {[4] = 'e', [0] = 'a', [2] = 'c', [1] = 'b', [3] = 'd', [9] = 'z'};
// 0 1 2 3 4 . . . . . . 9
// ca == {'a', 'b', 'c', 'd', 'e', 0, 0, 0, 0, 'z'}
printf("Contents of ca:\n ");
// the zeros are not printable, because they aren't the '0' character,
// so we need to cast them to int so as to print their numeric value
for (size_t i=0; i < sizeof ca; ++i)
if (isprint(ca[i]))
printf("%c ", ca[i]);
else
printf("%d ", (int)ca[i]);
printf("\n\n");
struct Test
{
char c;
int i;
float f;
};
struct Test t = {.f = 3.14f, .c = 'Z', .i = 10};
printf("Contents of t:\n c == %c\n i == %d\n f == %f\n", t.c, t.i, t.f);
}
| |
Output:
Contents of ca:
a b c d e 0 0 0 0 z
Contents of t:
c == Z
i == 10
f == 3.140000
|
Compound literals
A compound literal is basically a nameless variables, and looks very similar to a cast. It works together beautifully with variadic macros and designated initializers to produce clean, high-level looking code.
In the simplest usage scenario, compound literals take the place of temporary variables, which we don't care to have around.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#include <ctype.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
// this function will change the case of all letters in the message array,
// lowercase letters will become uppercase, and vice versa
void flip_case(char *message)
{
printf("flip_case()\n");
printf("Before: %s\n", message);
for (size_t i=0, ml = strlen(message); i < ml; ++i)
{
const char temp = message[i];
if (isupper(temp))
message[i] = tolower(temp);
else
if (islower(temp))
message[i] = toupper(temp);
}
printf("After: %s\n\n", message);
}
// this function will add 10 to an integer i
void add_ten(int *i)
{
printf("add_ten()\n");
printf("Before: %d\n", *i);
*i += 10;
printf("After: %d\n\n", *i);
}
// this function will add 1 to even numbers in the numbers array,
// only the first n numbers are operated on
void kill_evens(int *numbers, size_t n)
{
printf("kill_evens()\n");
printf("Before: ");
for (size_t i=0; i < n; ++i)
printf("%d ", numbers[i]);
printf("\n");
for (size_t i=0; i < n; ++i)
if (numbers[i] % 2 == 0)
numbers[i] += 1;
printf("After: ");
for (size_t i=0; i < n; ++i)
printf("%d ", numbers[i]);
printf("\n\n");
}
int main(void)
{
flip_case((char[]){"Hello C99 World!"});
add_ten(&(int){5});
kill_evens((int[]){2, 3, 29, 90, 5, 6, 8, 0}, 8);
printf("Current time: %s\n", ctime(&(time_t){time(NULL)}));
}
| |
Output:
flip_case()
Before: Hello C99 World!
After: hELLO c99 wORLD!
add_ten()
Before: 5
After: 15
kill_evens()
Before: 2 3 29 90 5 6 8 0
After: 3 3 29 91 5 7 9 1
Current time: Wed Apr 3 12:44:55 2013
|
For a more advanced example demonstrating the value of compound literals, consider this scenario: we've written our own
strscat()
function, which is basically a
strcat()
with an extra parameter for maximum length, and we want to test to see if it works correctly.
Now, I'll let the code talk.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
#include <stddef.h>
#include <stdio.h>
///
/// @brief Appends contents of array `from` to array `to`.
/// @pre `limit` != `0`
/// @note No operation is performed for a `limit` of `0`.
/// @remarks Resulting array is NUL-terminated.
/// @param [out] to String to be written to.
/// @param limit Maximum number of bytes that string `to` can store, including NUL.
/// @param [in] from String to be copied from.
/// @returns Size of resulting string (NUL not counted).
///
size_t strscat(char *to, size_t limit, const char *from)
{
size_t s=0;
if (limit != 0)
{
while (to[s] != '\0')
++s;
for (size_t i=0; from[i] != '\0' && s < limit - 1; ++i, ++s)
to[s] = from[i];
to[s] = '\0';
}
return s;
}
typedef struct
{
char *to;
size_t limit;
const char *from;
const char *result;
size_t retval;
} test_t;
static size_t tests_failed;
static void run_test(test_t *t)
{
size_t i=0;
if (t->retval != strscat(t->to, t->limit, t->from))
{
++tests_failed;
return;
}
while (t->result[i] != '\0' || t->to[i] != '\0')
if (t->result[i] != t->to[i])
{
++tests_failed;
break;
}
else
++i;
}
#define RUN_TEST(...) run_test(&(test_t){__VA_ARGS__})
int main(void)
{
RUN_TEST(
.to = (char[15]){"The Cutty"},
.limit = 15,
.from = " Sark is a ship dry-docked in London.",
.result = "The Cutty Sark",
.retval = 14
);
RUN_TEST(
.to = (char[15]){"The Cutty"},
.limit = 0,
.from = "this won't get appended",
.result = "The Cutty",
.retval = 0
);
RUN_TEST(
.to = (char[15]){"The Cutty"},
.limit = 15,
.from = "!",
.result = "The Cutty!",
.retval = 10
);
RUN_TEST(
.to = (char[]){"The Cutty Sark"},
.limit = 3,
.from = "this shouldn't get appended",
.result = "The Cutty Sark",
.retval = 14
);
RUN_TEST(
.to = (char[]){"The Cutty Sark"},
.limit = 1,
.from = "this shouldn't get appended, either",
.result = "The Cutty Sark",
.retval = 14
);
RUN_TEST(
.to = (char[]){""},
.limit = 1,
.from = "this had better not get appended!",
.result = "",
.retval = 0
);
(void)fprintf(stderr, "Number of tests failed: %zu.\n", tests_failed);
}
| |
Ending notes
I hope you enjoyed reading this article, and as always, contact me via PM if you have suggestions for improving it.
Useful links
C99 articles
Software


A wee time ago, there once lived a Scottish
chess salesman who used to offer a free chess set to any potential customer
who could move the Knight piece around the board in the minimum number
of moves and land on every square. There were three simple rules. One,
the Knight had to start in the Queen's Knight position. Two, no other pieces
were on the board. And three, each square could be landed on multiple times,
but each move had to count. Of course, the customer would have to agree
to buy a chess set if they could not match the salesman's best effort of
63 moves. Legend has it that this chess salesman used to chant the following
Lyric before the challenge began:
|
Knight K can move to any space denoted by an X
|
In days of old when Knights were bold,
And the game was invented,
The Knight was alone when he went off to course,
And had to be contented.
Without any clues, in how little moves,
Could a Knight cover her Lord's green?
You've got to make her cover every acre,
And be certain of where's She's been. |


{% extends "registration/base.html" %} {% block card_content %}
Reset Password
A password reset link was sent to the email address you typed in. Follow the reset link from the email in your inbox to reset your password.


Next: Naming of Compiler Macros, Previous: Compiler Macros, Up: Compilation Semantics
The purpose of the compiler macro facility is to permit selective source code transformations as optimization advice to the compiler. When a compound form is being processed (as by the compiler), if the operator names a compiler macro then the compiler macro function may be invoked on the form, and the resulting expansion recursively processed in preference to performing the usual processing on the original form according to its normal interpretation as a function form or macro form.
A compiler macro function, like a macro function, is a function of two arguments: the entire call form and the environment. Unlike an ordinary macro function, a compiler macro function can decline to provide an expansion merely by returning a value that is the same as the original form. The consequences are undefined if a compiler macro function destructively modifies any part of its form argument.
The form passed to the compiler macro function can either be a list whose car is the function name, or a list whose car is funcall and whose cadr is a list (function name); note that this affects destructuring of the form argument by the compiler macro function. define-compiler-macro arranges for destructuring of arguments to be performed correctly for both possible formats.
When compile-file chooses to expand a top level form that is a compiler macro form, the expansion is also treated as a top level form for the purposes of eval-when processing; see Processing of Top Level Forms.


This is
tcjj3 (BG7XUD)
.
401 Unauthorized
Access to this resource is denied, your client has not supplied the correct authentication.


ComboBox
data-value-primitive
is set to
true
ComboBox
data-value-primitive
is
not
set.
Console
Configuration
Set
data-value-primitive
Enable ComboBox
Visible
Information
Kendo UI ComboBox supports the
enabled
,
events
,
source
,
value
and
visible
bindings.


Scale x and y the same amount (smaller).
transform: scale(0.75);
Scale x and y the same amount (bigger).
transform: scale(1.5);
Scale x and y different amounts.
transform: scale(2.0, 1.5);
Scale X only.
transform: scaleX(1.5);
Scale Y only.
transform: scaleY(1.5);


Stores the enabled/disabled state of individual observers for a particular model class.
# File lib/active_model/observer_array.rb, line 8 def initialize(model_class, *args) @model_class = model_class super(*args) end
Disables one or more observers. This supports multiple forms:
ORM.observers.disable :user_observer # => disables the UserObserver User.observers.disable AuditTrail # => disables the AuditTrail observer for User notifications. # Other models will still notify the AuditTrail observer. ORM.observers.disable :observer_1, :observer_2 # => disables Observer1 and Observer2 for all models. ORM.observers.disable :all # => disables all observers for all models. User.observers.disable :all do # all user observers are disabled for # just the duration of the block end
# File lib/active_model/observer_array.rb, line 37 def disable(*observers, &block) set_enablement(false, observers, &block) end
Returns true if the given observer is disabled for the model class.
# File lib/active_model/observer_array.rb, line 14 def disabled_for?(observer) disabled_observers.include?(observer.class) end
Enables one or more observers. This supports multiple forms:
ORM.observers.enable :user_observer # => enables the UserObserver User.observers.enable AuditTrail # => enables the AuditTrail observer for User notifications. # Other models will not be affected (i.e. they will not # trigger notifications to AuditTrail if previously disabled) ORM.observers.enable :observer_1, :observer_2 # => enables Observer1 and Observer2 for all models. ORM.observers.enable :all # => enables all observers for all models. User.observers.enable :all do # all user observers are enabled for # just the duration of the block end
Note: all observers are enabled by default. This method is only useful when you have previously disabled one or more observers.
# File lib/active_model/observer_array.rb, line 64 def enable(*observers, &block) set_enablement(true, observers, &block) end
# File lib/active_model/observer_array.rb, line 92 def disabled_observer_stack @disabled_observer_stack ||= [] end
# File lib/active_model/observer_array.rb, line 70 def disabled_observers @disabled_observers ||= Set.new end
# File lib/active_model/observer_array.rb, line 113 def each_subclass_array model_class.descendants.each do |subclass| yield subclass.observers end end
# File lib/active_model/observer_array.rb, line 96 def end_transaction @disabled_observers = disabled_observer_stack.pop each_subclass_array do |array| array.end_transaction end end
# File lib/active_model/observer_array.rb, line 74 def observer_class_for(observer) return observer if observer.is_a?(Class) if observer.respond_to?(:to_sym) # string/symbol observer.to_s.camelize.constantize else raise ArgumentError, "#{observer} was not a class or a " + "lowercase, underscored class name as expected." end end
# File lib/active_model/observer_array.rb, line 119 def set_enablement(enabled, observers) if block_given? transaction do set_enablement(enabled, observers) yield end else observers = ActiveModel::Observer.descendants if observers == [:all] observers.each do |obs| klass = observer_class_for(obs) unless klass < ActiveModel::Observer raise ArgumentError.new("#{obs} does not refer to a valid observer") end if enabled disabled_observers.delete(klass) else disabled_observers << klass end end each_subclass_array do |array| array.set_enablement(enabled, observers) end end end
# File lib/active_model/observer_array.rb, line 85 def start_transaction disabled_observer_stack.push(disabled_observers.dup) each_subclass_array do |array| array.start_transaction end end
# File lib/active_model/observer_array.rb, line 103 def transaction start_transaction begin yield ensure end_transaction end end


Use this dialog to add a new server connection to the pgAdmin tree.
If you’re experiencing connection problems, check the connection problems.
The name is a text to identify the server in the pgAdmin tree.
The host is the IP address of the machine to contact, or the fully qualified domain name. On Unix based systems, the address field may be left blank to use the default PostgreSQL Unix Domain Socket on the local machine, or be set to an alternate path containing a PostgreSQL socket. If a path is entered, it must begin with a “/”. The port number may also be specified.
The service field is the name of a service configured in the pg_service.conf file. For details, see the pg_service documentation.
The maintenance DB field is used to specify the initial database that pgAdmin connects to, and that will be expected to have the pgAgent schema and adminpack objects installed (both optional). On PostgreSQL 8.1 and above, the maintenance DB is normally called ‘postgres’, and on earlier versions ‘template1’ is often used, though it is preferrable to create a ‘postgres’ database for this purpose to avoid cluttering the template database.
If you select “Store password”, pgAdmin stores passwords you enter in the ~/.pgpass file under Unix or :file:%APPDATA%postgresqlpgpass.conf under Win32 for later reuse. For details, see pgpass documentation. It will be used for all libpq based tools. If you want the password removed, you can select the server’s properties and uncheck the selection any time.
The colour field allows you to set a specific colour for this server. This colour will be used in the background of the tree where each object of this server is displayed.
The Group field is used to push your server in a specific group. You can have a production group, and a test group. Or LAN specific groups. It’s completely up to you. But it helps when you have lors of server to register.

The third tab contains some advanced options that are seldomly used.
The “Connect now?” field makes pgAdmin attempt a connection as soon as you hit the OK button.
You can unckeck the “Connect now” checkbox if you don’t want the connection to the server being established immediately, but only registered for later use. In this case, the connection parameters won’t be validated.
The “Restore env?” option determines whether or not pgAdmin will attempt to restore the browser environment when you reconnect to this server. If you regularly use different databases on the same server you might want to turn this option off.
The Rolename field allows you to connect as a role, and then get the permissions of another one (the one you specified in this field). The connection role must be a member of the rolename.
The DB restriction field allows you to enter an SQL restriction that will be used against the pg_database table to limit the databases that you see. For example, you might enter: ‘live_db’, ‘test_db’ so that only live_db and test_db are shown in the pgAdmin browser. Note that you can also limit the schemas shown in the database from the Database properties dialogue by entering a restriction against pg_namespace.
The “Service ID” field specifies parameters to control the database service process. Its meaning is operating system dependent.
If pgAdmin is running on a Windows machine, it can control the postmaster service if you have enough access rights. Enter the name of the service. In case of a remote server, it must be prepended by the machine name (e.g. PSE1pgsql-8.0). pgAdmin will automatically discover services running on your local machine.
If pgAdmin is running on a Unix machine, it can control processes running on the local machine if you have enough access rights. Enter a full path and needed options to access the pg_ctl program. When executing service control functions, pgAdmin will append status/start/stop keywords to this. Example:
sudo /usr/local/pgsql/bin/pg_ctl -D /data/pgsql
This dialog can be launched at a later time to correct or add parameters by executing “properties” when the server is selected. You should not be connected to it if you want to make changes on its properties.
Contents:


Stop Motion Videos!
Return to list
The Mascot - Complete and Uncut
Producer:
Ladislas Starewicz
Keywords:
stop motion, animation, Wladyslaw, Starevich, Starevitch, Starewich, Starewitch, short film, Fetiche, Mascotte, Devil's Ball


| Opcode/Instruction | Op/En | 64/32 bit Mode Support | CPUID Feature Flag | Description |
|---|---|---|---|---|
| EVEX.LIG.66.0F38.W0 4F /r VRSQRT14SS xmm1 {k1}{z}, xmm2, xmm3/m32 | A | V/V | AVX512F | Computes the approximate reciprocal square root of the scalar single-precision floating-point value in xmm3/m32 and stores the result in the low doubleword element of xmm1 using writemask k1. Bits[127:32] of xmm2 is copied to xmm1[127:32]. |
| Op/En | Tuple Type | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
| A | Tuple1 Scalar | ModRM:reg (w) | VEX.vvvv | ModRM:r/m (r) | NA |
Computes of the approximate reciprocal of the square root of the scalar single-precision floating-point value in the low doubleword element of the source operand (the second operand) and stores the result in the low doubleword element of the destination operand (the first operand) according to the writemask. The maximum relative error for this approximation is less than 2-14. The source operand can be an XMM register or a 32-bit memory location. The destination operand is an XMM register.
Bits (127:32) of the XMM register destination are copied from corresponding bits in the first source operand. Bits (MAXVL-1:128) of the destination register are zeroed.
The VRSQRT14SS instruction is not affected by the rounding control bits in the MXCSR register. When a source value is a 0.0, an ∞ with the sign of the source value is returned. When the source operand is an ∞, zero with the sign of the source value is returned. A denormal source value is treated as zero only if DAZ bit is set in MXCSR. Otherwise it is treated correctly and performs the approximation with the specified masked response. When a source value is a negative value (other than 0.0) a floating-point indefinite is returned. When a source value is an SNaN or QNaN, the SNaN is converted to a QNaN or the source QNaN is returned.
MXCSR exception flags are not affected by this instruction and floating-point exceptions are not reported.
IF k1[0] or *no writemask* THEN DEST[31:0]←APPROXIMATE(1.0/ SQRT(SRC2[31:0])) ELSE IF *merging-masking* ; merging-masking THEN *DEST[31:0] remains unchanged* ELSE ; zeroing-masking THEN DEST[31:0]←0 FI; FI; DEST[127:32] ← SRC1[127:32] DEST[MAXVL-1:128] ← 0
| Input value | Result value | Comments |
|---|---|---|
| Any denormal | Normal | Cannot generate overflow |
| X = 2-2n | 2n | |
| X<0 | QNaN_Indefinite | Including -INF |
| X = -0 | -INF | |
| X = +0 | +INF | |
| X = +INF | +0 |
VRSQRT14SS __m128 _mm_rsqrt14_ss( __m128 a, __m128 b);
VRSQRT14SS __m128 _mm_mask_rsqrt14_ss(__m128 s, __mmask8 k, __m128 a, __m128 b);
VRSQRT14SS __m128 _mm_maskz_rsqrt14_ss( __mmask8 k, __m128 a, __m128 b);
None
See Exceptions Type E5.


Day 1, Sunday April 15th
| Time | Task |
|---|---|
| 3:00-3:45 | Arrival & Poster Setup |
| 4:00-5:30 | Welcome & Power-Pitch Research Session 1 (moderators: Yan Li & Galateia Kazakia) Metabolic imaging of infection using PET and Hyperpolarized 13C MR spectroscopy - David Wilson Multimodality NeuroImaging to track Alzheimer disease pathology spread - Duygu Tosun Detection of Bone Marrow Lesions Using Dual Energy CT - Ramya Srinivasan Power Pitch Talks: Group I |
| 5:30-6:30 | Get-to-know-your-colleagues (moderators: Maryam Vareth, Caroline Jordan & Sue Noworolski) |
| 6:30-8:00 | Dinner |
| 7:15-7:45 | Overview of Department Research Enterprise & Future Visions - Christopher Hess & Sharmila Majumdar |
| 8:00-10:30 | Poster Session Group I & Reception |
Day 2, Monday April 16th
| Time | Task |
|---|---|
| 7:30-8:30 | Breakfast Buffet in Flamingo Conference Room |
| 8:30-9:45 | Scientific Session II ( moderators: Jing Liu & Joseph Vu) Convolutional Neural Network for Detection of Pneumothorax - John Mongan Clinical Translation of 1H MR Spectroscopy at 3T & Beyond - Yan Li Power Pitch Talks: Group 2 |
| 9:45-10:15 | Radiology Resource Overview ( moderator: Emma Baharoos) CRC Resources - Kenneth Gao PACS Air - John Mongan Info Commons - Sharmila Majumdar |
| 10:15-10:30 | Break |
| 10:30-12:00 | RIG/SRG Overview Sessions (moderators: Janine Lupo & Maryam Vareth) AIT - Dan Vigneron Body - Sue Noworolski Breast - Nola Hylton Cardiovascular - Jing Liu MSK - Matt Bucknor Brain - Bill Dillon PICT / CIR - Sarah Nelson |
| 12:00-1:30 | Lunch Buffet |
| 1:30-3:30 | Indoor Activities Get-to-know-your-colleagues (moderators: Maryam Vareth, Caroline Jordan & Sue Noworolski) |
| 3:30-4:15 | Battle of the Modalities Debate ( moderators: Valentina Pedoia & Eugene Ozhinsky) Guest Panel: Dan V, Sharmila M, Henry V, Emma B, Enrique M, Galateia K, Peder L |
| 4:15-4:30 | Break |
| 4:30-6:15 | Breakout Session #1 1) Pulse Sequences: RTHawk & Adie – Eugene O. & Joseph Vu 2) Deep learning Beginner: CNNs 101 – Valentina Pedoia 3) Deep learning Advanced: Segmentation/Classification – Peter Chang |
| 6:30-8:00 | Dinner |
| 6:45-7:10 | UCSF New Faculty Highlight - Ashish Raj |
| 8:00-9:00 | External Keynote speaker - Fausto Milletari, Senior Solutions Deep Learning Architect at NVIDIA |
| 9:00-11:00 | Poster Session Group 2 & Reception |
Day 3, Tuesday April 17th
| Time | Task |
|---|---|
| 7:30-8:45 | Breakfast Buffet in Flamingo Conference Room |
| 9:00-9:30 | Senior Faculty Career Reflections Talk - John Kurhanewicz |
| 9:30-10:00 | Reflections & Feedback of Department Discussion - Sharmila Majumdar et al. |
| 10:00-10:15 | Break |
| 10:15-11:25 | The Role of Imaging outside of Radiology ( moderator: Sue Noworolski & Caroline Jordan ) Radiation Oncology: Mekhail Anwar Psychology: Judith Ford PT: Michael Samaan |
| 11:30-12:30 | Breakout Session # 2: Career Development for All Stages 1) Postdocs & Graduate Students: Allyson Spence from OCPD 2) Career advancement for Staff : Enrique Menendez & Chris Sotto 3) Junior faculty & Non-faculty Academics: Nola Hylton et al. |
| 12:30-1:30 | Lunch & Departure |


Allows you to temporarily restrict interactions, such as commenting, opening issues, and creating pull requests, for GitHub repositories or organizations. When enabled, only the specified group of GitHub users will be able to participate in these interactions. See the Repository interactions and Organization interactions APIs for more details.
Custom media type: sombra-preview
Announced:
2018-12-18


Close Menu
DIRECTORATE
Dashboard
College Requests
Notices
Events
Search
Logout
☰
Govt of Goa
College Requests
Pending Request:
×
ADMIN
College Name :
College Code :
Email id :
Phone-No :
Address :
First Batch pass out year :
Degree :


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/reflection.html ---
Hi,
I'm trying to map meta expressions to an inductive type in the object language (with pattern matching on expr as described in https://leanprover.github.io/papers/tactic.pdf).
There's a constructor taking a natural number as argument (var : ℕ → term). How can the number be extracted from an expression with this constructor?
Also, how does this work if I go from the inductive type back to exprs?
I'm not sure if I understand exactly what you're after. You want a function expr → ℕ
that will return the index if the input is made with expr.var
?
meta def var_index : expr → ℕ | (expr.var n) := n | _ := 0
You can do the same in the other direction, if the nat appears in a constructor of your inductive type. Match on your type, get the nat argument, and feed it back into expr.var
.
Or did you mean something else?
No, that helped, thanks!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


U.S. Rep. Renee Ellmers has a lead over challenger Clay Aiken in the race to hold on to her seat in House District2, according to a recent poll.
The flash poll of 400 registered voters conducted by the conservative-leaning Civitas Institute over the weekend shows Ellmers leading with 47 percent to 39 percent, with a five-point margin of error.
“It’s a comfortable lead,” said Patrick Sebastian, a senior adviser with the Ellmers campaign. He said the 54 percent disapproval rating of President Obama bodes well for Ellmers with undecided voters.
“Renee is not taking this race for granted and is working around the clock to earn the chance to represent the 2nd District in Washington,” he said.
Tucker Middleton, communications director for the Aiken campaign, said the poll shows Ellmers is in trouble.
“When a conservative group like Civitas has you up by eight points,” she said, the margin is likely lower.
“She’s under 50 percent, which never bodes well for an incumbent,” Middleton said. “There’s room for it to narrow.”
The poll is a rare public look into voter sentiment regarding the 2nd District race, which encompasses about 480,000 registered voters including many in Cumberland County.
Despite Ellmers’ lead among those surveyed, the poll showed the candidates with the same favorability rating – at 25 percent. But more voters judged them unfavorably, with Ellmers at 28 percent and Aiken at 35 percent.
Jim Tynen, communications director for the Civitas Institute, said the Ellmers-Aiken contest “is the most high-profile congressional race in the state right now” and fits well into a series of legislative flash polls the institute will be releasing this fall.
North Carolina pollsters and political analysts told The Fayetteville Observer last week that many polling organizations have steered clear of polling on the race because they don’t expect it to be terribly close.
These organizations have for the most part devoted resources to the neck-and-neck U.S. Senate race between Democratic Sen. Kay Hagan and Republican state House Speaker Thom Tillis. Civitas’ flash poll also showed 2nd District voters at a tie in their support of these two candidates, at 44 percent each.
“Every poll is just a snapshot of voter sentiment,” Tynen said.
He noted that sentiment can change and that other polls may show different snapshots.
“We think for practical reasons, this is about the best kind of look you’re going to get right now.”
Share your thoughts about this article


¡Ofertas de tiempo limitado!
La Sportiva
Finale Climbing Shoes
$1,200
Black Diamond
Momentum CLimbing Shoes
$1,100
La Sportiva
Tarantlace Climbing Shoes
$1,200
So iLL
Main Street Climbing Shoes
$1,400
Evolv
Kronos Climbing Shoes
$1,350
Butora
Endeavor Moss Climbing Shoes
$1,000
Productos
La Sportiva
Finale Climbing Shoes
$1,200
Black Diamond
Momentum CLimbing Shoes
$1,100
La Sportiva
Tarantlace Climbing Shoes
$1,200
So iLL
Main Street Climbing Shoes
$1,400
Evolv
Kronos Climbing Shoes
$1,350
Butora
Endeavor Moss Climbing Shoes
$1,000


--- title: Contact heading: Get your free Simple Church Planner description: Simply enter your name and email and instructions will be on the way. ---


A web app that will assist college students through the majority of advising requirements while in pursuit of a degree.
The idea for AdviseMe started during the summer of 2017. A group of rising seniors at the University of South Carolina were discussing ideas for their senior Capstone project. A major problem that everyone had faced during their college careers was communication issues with their advisors. An idea was then proposed that if there was a simple web app that could standardize the otherwise haphazard advisement process then students could feel more confident in their course choices and avoid a lot of stress. This simple idea was turned into AdviseMe.
Starting in the Fall 2017 semester the team, captained by Tyler Hall, hit the ground running and now near the end of the Spring 2018 semester has a working advisement communication tool!
{{p?.role}}


Getting started with mapclassify.greedy¶
Greedy or topological coloring (or sequential coloring) is a cartographic method of assigning colors to polygons (or other geoemtries, mapclassify.greedy
supports all geometry types) in such a way, that no two adjacent polygons share the same color.
greedy
is a small toolkit within mapclassify
providing such a functionality on top of GeoPandas GeoDataFrames. mapclassify.greedy()
is all we need.
[1]:
import geopandas as gpd
from mapclassify import greedy
Few of greedy
‘s methods of coloring require either measuring of areas or distances. To obtain proper values, our GeoDataFrame needs to be in projected CRS. Let’s use Africa and reproject it to ’ESRI:102022’:
[2]:
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
africa = world.loc[world.continent == 'Africa']
africa = africa.to_crs('ESRI:102022')
ax = africa.plot(figsize=(12, 16), edgecolor='w')
ax.set_axis_off()
Default¶
The default usage of greedy
is extremely simple. Greedy returns Series with color codes, so we can assign it directly as a new column of our GeoDataFrame:
[3]:
africa['greedy_default'] = greedy(africa)
africa['greedy_default'].head(5)
[3]:
1 1
2 0
11 0
12 1
13 4
Name: greedy_default, dtype: int64
Using resulting color codes as plotting categories gives us following plot:
[4]:
ax = africa.plot('greedy_default', categorical=True, figsize=(12, 16), cmap='Set3', legend=True, edgecolor='w')
ax.set_axis_off()
Strategies¶
Balanced¶
Greedy offers several strategies of coloring. The default strategy is balanced
based on count
attempting to balance the number of features per each color. Other balanced modes are area
(balance the area covered by each color), distance
and centroid
(both attemtps to balance the distance between colors). Each of them attempts to balance the color assignemnt according to different conditions and hence can result in a different number of colors.
[5]:
africa['greedy_area'] = greedy(africa, strategy='balanced', balance='area')
ax = africa.plot('greedy_area', categorical=True, figsize=(12, 16), cmap='Set3', legend=True, edgecolor='w')
ax.set_axis_off()
Different modes of balancing within balanced
strategy can be set using balance
keyword.
[6]:
africa['greedy_distance'] = greedy(africa, strategy='balanced', balance='distance')
ax = africa.plot('greedy_distance', categorical=True, figsize=(12, 16), cmap='Set3', legend=True, edgecolor='w')
ax.set_axis_off()
NetworkX strategies¶
On top of four modes of balanced coloring strategy, greedy
offers all networkx.greedy_coloring()
strategies, like largest_first
:
[7]:
africa['greedy_largest_first'] = greedy(africa, strategy='largest_first')
ax = africa.plot('greedy_largest_first', categorical=True, figsize=(12, 16), cmap='Set3', legend=True, edgecolor='w')
ax.set_axis_off()
Another strategy provided by networkX is smallest_last
. All strategies provide different results. Check Comparison of strategies below for details.
[8]:
africa['greedy_s'] = greedy(africa, strategy='smallest_last')
ax = africa.plot('greedy_s', categorical=True, figsize=(12, 16), cmap='Set3', legend=True, edgecolor='w')
ax.set_axis_off()
Greedy is variable in a way how to define adjacency and which coloring strategy to use. All options are described in this documentation together with comparison of their performance.
Defining adjacency¶
The key in toplogical coloring is the definition of adjacency, to understand which features are neighboring and could not share the same color. mapclassify.greedy
comes with several methods of defining it. Binary spatial weights denoting adjacency are then stored as libpysal’s weight objects.
[9]:
import pandas as pd
import numpy as np
from time import time
import seaborn as sns
import matplotlib.pyplot as plt
from shapely.geometry import Point
sns.set()
For illustration purposes, let’s generate a 10x10 mesh of squared polygons:
[10]:
polys = []
for x in range(10):
for y in range(10):
polys.append(Point(x, y).buffer(0.5, cap_style=3))
gdf = gpd.GeoDataFrame(geometry=polys)
ax = gdf.plot(edgecolor='w')
ax.set_axis_off()
libpysal adjacency¶
The most performant way of generating spatial weights is using libpysal contiguity weights. As they are based on the shared nodes or edges, dataset needs to be topologically correct. Neighboring polygons needs to share vertices and edges, otherwise their relationship will not be captured.
Rook¶
There are two ways how to define contiguity weights - rook
and queen
. Rook identifies two objects as neighboring only if they share at least on edge - line between two shared points. Use rook if you do not mind two polygons touching by hteir corners having the same color:
[11]:
gdf['rook'] = greedy(gdf, sw='rook', min_colors=2)
ax = gdf.plot('rook', edgecolor='w', categorical=True, cmap='Set3')
ax.set_axis_off()
Queen¶
The default option in greedy
is queen
adjacency. That identifies two objects as neighboring if they share at least one point. It ensures that even poygons sharing only one corner will not share a color:
[12]:
gdf['queen'] = greedy(gdf, sw='queen', min_colors=2)
ax = gdf.plot('queen', edgecolor='w', categorical=True, cmap='Set3')
ax.set_axis_off()
Intersection-based adjacency¶
As noted above, if the topology of the dataset is not ideal, libpysal might not identify two visually neighboring features as neighbors. greedy
can use intersection-based algorithm using GEOS intersection to define if two features intersects in any way. They do not have to share any points. Naturally, such an approach is significantly slower (details below), but it can provide correct adjacency when libpysal fails.
To make greedy
to use this algorithm, one just needs to define min_distance
. If it is set to 0, it behaves similarly to queen
contiguity, just capturing all intersections:
[13]:
gdf['geos'] = greedy(gdf, min_distance=0, min_colors=2)
ax = gdf.plot('geos', edgecolor='w', categorical=True, cmap='Set3')
ax.set_axis_off()
min_distance
also sets the minimal distance between colors. To do that, all features within such a distance are identified as neighbors, hence no two features wihtin set distance can share the same color:
[14]:
gdf['dist1'] = greedy(gdf, min_distance=1, min_colors=2)
ax = gdf.plot('dist1', edgecolor='w', categorical=True, cmap='Set3')
ax.set_axis_off()
Reusing spatial weights¶
Passing libpysal.weights.W
object to sw
, will skip generating spatial weights and use the passed object instead. That will improve the performance if one intends to repeate the coloring multiple times. In that case, weights should be denoted using GeodataFrame’s index.
Performance¶
The difference in performance of libpysal and GEOS-based method is large, so it is recommended to use libpysal if possible. Details of comparison between all methods are below:
[15]:
times = pd.DataFrame(index=['rook', 'queen', 'geos', 'dist1'])
for number in range(10, 110, 10):
print(number)
polys = []
for x in range(number):
for y in range(number):
polys.append(Point(x, y).buffer(0.5, cap_style=3))
gdf = gpd.GeoDataFrame(geometry=polys)
timer = []
for run in range(5):
s = time()
colors = greedy(gdf, sw='rook', min_colors=2)
e = time() - s
timer.append(e)
times.loc['rook', number] = np.mean(timer)
print('rook: ', np.mean(timer), 's; ', np.max(colors) + 1, 'colors')
timer = []
for run in range(5):
s = time()
colors = greedy(gdf, sw='queen', min_colors=2)
e = time() - s
timer.append(e)
times.loc['queen', number] = np.mean(timer)
print('queen: ', np.mean(timer), 's; ', np.max(colors) + 1, 'colors')
timer = []
for run in range(5):
s = time()
colors = greedy(gdf, min_distance=0, min_colors=2)
e = time() - s
timer.append(e)
times.loc['geos', number] = np.mean(timer)
print('geos: ', np.mean(timer), 's; ', np.max(colors) + 1, 'colors')
timer = []
for run in range(5):
s = time()
colors = greedy(gdf, min_distance=1, min_colors=2)
e = time() - s
timer.append(e)
times.loc['dist1', number] = np.mean(timer)
print('dist1: ', np.mean(timer), 's; ', np.max(colors) + 1, 'colors')
10
rook: 0.012784147262573242 s; 2 colors
queen: 0.005277395248413086 s; 4 colors
geos: 0.09882774353027343 s; 4 colors
dist1: 0.13624219894409179 s; 10 colors
20
rook: 0.014943456649780274 s; 2 colors
queen: 0.013994264602661132 s; 4 colors
geos: 0.39907083511352537 s; 4 colors
dist1: 0.547985029220581 s; 10 colors
30
rook: 0.045798969268798825 s; 2 colors
queen: 0.03402729034423828 s; 4 colors
geos: 0.9942648410797119 s; 4 colors
dist1: 1.3713165283203126 s; 10 colors
40
rook: 0.07214193344116211 s; 2 colors
queen: 0.06085910797119141 s; 4 colors
geos: 1.7829225063323975 s; 4 colors
dist1: 2.3820394039154054 s; 10 colors
50
rook: 0.11196293830871581 s; 2 colors
queen: 0.10349822044372559 s; 4 colors
geos: 2.5976396560668946 s; 4 colors
dist1: 3.596402406692505 s; 10 colors
60
rook: 0.1528311252593994 s; 2 colors
queen: 0.1566312789916992 s; 4 colors
geos: 3.7294684410095216 s; 4 colors
dist1: 5.268119859695434 s; 10 colors
70
rook: 0.21897730827331544 s; 2 colors
queen: 0.2062161922454834 s; 4 colors
geos: 5.2663861274719235 s; 4 colors
dist1: 7.211857843399048 s; 10 colors
80
rook: 0.2827901840209961 s; 2 colors
queen: 0.2973599433898926 s; 4 colors
geos: 6.945807266235351 s; 4 colors
dist1: 10.106542253494263 s; 10 colors
90
rook: 0.3535776138305664 s; 2 colors
queen: 0.33614187240600585 s; 4 colors
geos: 8.633152198791503 s; 4 colors
dist1: 12.608657598495483 s; 10 colors
100
rook: 0.44251093864440916 s; 2 colors
queen: 0.4285282611846924 s; 4 colors
geos: 10.92662205696106 s; 4 colors
dist1: 15.187224531173706 s; 10 colors
[16]:
ax = times.T.plot()
ax.set_ylabel('time (s)')
ax.set_xlabel('# of polygons')
locs, labels = plt.xticks()
plt.xticks(locs, (times.columns ** 2), rotation='vertical')
[16]:
([<matplotlib.axis.XTick at 0x7f7d5299db10>,
<matplotlib.axis.XTick at 0x7f7d5299d110>,
<matplotlib.axis.XTick at 0x7f7d5297a810>,
<matplotlib.axis.XTick at 0x7f7d52501090>,
<matplotlib.axis.XTick at 0x7f7d525013d0>,
<matplotlib.axis.XTick at 0x7f7d524ab290>,
<matplotlib.axis.XTick at 0x7f7d524abf10>],
[Text(0, 0, '100'),
Text(0, 0, '400'),
Text(0, 0, '900'),
Text(0, 0, '1600'),
Text(0, 0, '2500'),
Text(0, 0, '3600'),
Text(0, 0, '4900')])
Plotting without the GEOS methods, the difference between queen
and rook
is minimal:
[17]:
ax = times.loc[['rook', 'queen']].T.plot()
ax.set_ylabel('time (s)')
ax.set_xlabel('# of polygons')
locs, labels = plt.xticks()
plt.xticks(locs, (times.columns ** 2), rotation='vertical')
[17]:
([<matplotlib.axis.XTick at 0x122684880>,
<matplotlib.axis.XTick at 0x124885d60>,
<matplotlib.axis.XTick at 0x12476e250>,
<matplotlib.axis.XTick at 0x1246dd250>,
<matplotlib.axis.XTick at 0x124751d30>,
<matplotlib.axis.XTick at 0x1247513a0>,
<matplotlib.axis.XTick at 0x124751e20>],
[Text(0, 0, '100'),
Text(0, 0, '400'),
Text(0, 0, '900'),
Text(0, 0, '1600'),
Text(0, 0, '2500'),
Text(0, 0, '3600'),
Text(0, 0, '4900')])
Comparison of strategies¶
Different coloring strategies lead to different results, but also have different performance. It all depends on preferences, what is the goal.
If one want visually balanced result, 'balanced'
strategy could be the right choice. It comes with four different modes of balancing - 'count'
, 'area'
, 'distance'
, and 'centroid'
. The first one attempts to balance the number of features per each color, second the area covered by each color, and two last based on the distance between features. Either represented by the geometry itself or its centroid (a bit faster).
Other strategies might be helpful if one wants to minimise number of colors as not all strategies use the same amount in the end. Or they just might look better on your map.
Below is a comparison of performance and the result of each of the strategies supported by greedy
.
[18]:
import libpysal
When using 'balanced'
strategy with 'area'
, 'distance'
, or 'centroid'
modes, keep in mind that your data needs to be in projected CRS to obtain correct results. For the simplicity of this comparison, let’s pretend that dataset below is (even though it is not).
Strategies used in mapclassify.greedy
have two origins - 'balanced'
is ported from QGIS while the rest comes from networkX
. Snippet below generates each option 20x and returns the mean time elapsed together with the number of colors used.
[19]:
strategies = ['balanced', 'largest_first', 'random_sequential', 'smallest_last',
'independent_set', 'connected_sequential_bfs', 'connected_sequential_dfs',
'saturation_largest_first']
balanced_modes = ['count', 'area', 'centroid', 'distance']
times = {}
sw = libpysal.weights.Queen.from_dataframe(
world, ids=world.index.to_list(), silence_warnings=True
)
for strategy in strategies:
if strategy == 'balanced':
for mode in balanced_modes:
print(strategy, mode)
timer = []
for run in range(20):
s = time()
colors = greedy(world, strategy=strategy, balance=mode, sw=sw)
e = time() - s
timer.append(e)
world[strategy + '_' + mode] = colors
times[strategy + '_' + mode] = np.mean(timer)
print('time: ', np.mean(timer), 's; ', np.max(colors) + 1, 'colors')
else:
print(strategy)
timer = []
for run in range(20):
s = time()
colors = greedy(world, strategy=strategy, sw=sw)
e = time() - s
timer.append(e)
world[strategy] = colors
times[strategy] = np.mean(timer)
print('time: ', np.mean(timer), 's; ', np.max(colors) + 1, 'colors')
balanced count
time: 0.0012734532356262207 s; 5 colors
balanced area
time: 0.04488915205001831 s; 5 colors
balanced centroid
time: 0.6184169292449951 s; 5 colors
balanced distance
time: 3.698784148693085 s; 5 colors
largest_first
time: 0.00743335485458374 s; 5 colors
random_sequential
time: 0.0073337554931640625 s; 5 colors
smallest_last
time: 0.012673044204711914 s; 4 colors
independent_set
time: 0.21364336013793944 s; 5 colors
connected_sequential_bfs
time: 0.010818779468536377 s; 5 colors
connected_sequential_dfs
time: 0.01690601110458374 s; 5 colors
saturation_largest_first
time: 0.04053806066513062 s; 4 colors
As you can see, smallest_last
and saturation_largest_first
were able, for this particular dataset, to generate greedy coloring using only 4 colors. If one wants to use higher number than the minimal, 'balanced'
strategy allows setting of min_colors
to be used.
[20]:
times = pd.Series(times)
ax = times.plot(kind='bar')
ax.set_yscale("log")
Plot above shows the performance of each strategy. Note that the vertical axis is using log scale.
Below are all results plotted on the map.
[21]:
for strategy in times.index:
ax = world.plot(strategy, categorical=True, figsize=(16, 12), cmap='Set3', legend=True)
ax.set_axis_off()
ax.set_title(strategy)
[ ]:


--- title: export sidebar: function_reference_sidebar permalink: SO3Fun.export.html folder: function_reference toc: false ---
export an ODF to an ASCII file
| SO3F | SO3Fun to be exported |
| filename | name of the ascii file |
| weights | export weights of the ODF components |
| ZYZ, ABG | Matthies (alpha, beta, gamma) convention (default) |
| ZXZ,BUNGE | Bunge (phi1,Phi,phi2) convention |
| interface | generic (default), mtex, VPSC |


Thank you for agreeing to join the BusMall market research focus team! We are very grateful you took time out of your busy schedule to help us better understand our customers and their shopping needs. Your instructions are fairly simple: You will be shown a series of pictures of potential products we are considering to add to our extensive catalog. When shown the pictures, click on the one you would be most likely to purchase out of the images. That's it! When you are comleted, simply leave the screen for the next focuse teammate to continue where you left off.


Final Project for Northwestern EECS 349
Every year, the Baseball Writers’ Association of America (BBWAA) vote on who is to be elected into the Baseball Hall of Fame. A player must receive 75% of the vote to be elected. There are many different criteria that the writers take into consideration when voting for a player. However, different writers value certain statistics differently. Since the vote is highly subjective, this is a debated topic each year. We believe that machine learning can be used to reveal trends in order to predict whether a player will be inducted.
We tested each set on multiple learners: decision trees, Bayes nets, naive Bayes, logistic regression, multi-layer perceptron, and nearest neighbor. For the pitchers, we looked at the following attributes: strikeouts, wins above replacement (WAR), games, complete games, shutouts, wins, losses, saves, innings pitched, earned run average (ERA), and fielding independent pitching. For the batters, we considered homeruns, WAR, games, runs, hits, runs batted in, walks, stolen bases, batting average, and on-base percentage plus slugging percentage.
We collected data from baseball-reference.com, dividing it into two different sets: pitchers and batters. We isolated players that played between 1961-2005 for our training set, and imposed minimum play requirements of 162 games for batters and 100 inning pitched for pitchers. In the end, our data set contained 1725 batters, 128 of which were inducted, and 1327 pitchers, 60 of which were inducted.
We chose to preference accuracy in classifying inductees over accuracy in classifying non-inductees, because the former is both more useful and more challenging. Therefore, the most important measure of success we identified for our models was the f-measure of classification of the Hall of Fame players. We tested our models on the 2016 Hall Of Fame ballot and used the classifications given by those predictions compared to the results of voting this year to gauge the accuracy of the model in practice.
f-measures for each model by class
Comparing them side by side, you can see that our k-Nearest-Neighbor model has the highest f-measure for HoF pitchers, and Multi-Layer Perceptron model has the highest f-measure for HoF batters. This also shows that, on average, our models were more accurate for pitcher than for batters.
We found that the multi-layer perceptron model was best for predicting whether batters would be inducted into the hall of fame, while k-nearest neighbor was the most reliable model for pitchers. WAR was the most significant indicator for a player’s chances of making it into the hall of fame, though WAR alone does not perform as well as our predictor, when our predictor considers WAR alone, its f-measure is 10% lower for batters and 20% lower for pitchers. When tested on the 2016 Hall of Fame ballot, our models performed reasonably well, correctly classifying the two players inducted this year and players projected to be inducted in the coming years.
Contact Email: taitmurphy2017@u.northwestern.edu


I have been using Node JS from couple of months and it’s amazing. It is very easy to get started and build application on Node.js. The most amazing thing about node is that it is all JavaScript. We all esp. @web developers have worked with JavaScript at some or other point of time. The awesomeness is that you get the goodness of JavaScript, to build scalable systems. Already Companies like UBER, NETFLIX, PAYPAL etc. have adopted Node JS in their technology stack.


A(HN) Shanghai virus PEIPKGR↓GLF influenza human avian strains viruses cases poultry infection reported Shanghai, infections A/Shanghai// Died protein {border-style amino acid epidemic px;} #ffffff;} HPAI LPAI epidemics mutations observed vaccine basic environmental A/chicken/Shanghai/S/ fifth polymerase China, study antiviral risk PB, Shanghai. cleavage including sequences trees virulence Virol analysis associated bird candidates characteristics deletion epidemic, number receptor total viruses, (Table (WHO (estimated) (n=), China Influenza binding date) epidemiological genetic method phylogenetic px; related site surveillance transmission {font-family Avian Figure HA, Infect LPMs NA, October emerged evolutionary font-size gene genes increased internal molecular multiple prevention protein; second spread strains, virus. viruses. (HN) Human Notes: QISNT SD, Table WHO-recommended acids control double; host infected insertion measures novel onset proteins samples stalk surface viral (Figure A/environment/Shanghai/S/ Abbreviations: Chinese Dis February However, Increased January PA, age based birds border-color border-width case cases, collected different epidemics, genetically important increasing indicating low-pathogenic municipality. new outbreak outbreaks public small solid; strain {font-style {font-weight –September .–% .–. .–.% Agriculture Amino December Drug Food Health Organization QL/I SH, Therefore, Viruses acidic adaptation affinity birds, bold circulating closely closure collab: confirmed courier; data decrease detected divergences eight, em; enhanced five-amino-acid government hemagglutinin; homology human-type humans identify illness included increase laboratory-confirmed mammalian median mice migratory mutation non-structural occurred outbreaks. presented protein, pt;} recent resulting rooted shown single site. strains. substitutions terrestrial tree using wild work


Blind date: ‘He asked if I’d want to go to a swingers’ party’
by Guardian StaffClaire, 22, master’s student, meets Luke, 22, marketing executive
Claire on Luke
What were you hoping for?
Someone fun, friendly and easy to talk to. I try not to have high expectations to avoid being disappointed.
First impressions?
From a 5ft distance: cute, well-groomed and a good sense of style. Then I sat down and noticed his ring and big chunky necklace, which I was less happy about. I also immediately knew he was a smoker.
What did you talk about?
I was keen to know about his salsa dancing, and he was keen to know about my taste in music. We listened to a few songs – I like to think he was satisfied with my choices.
Any awkward moments?
He asked if I’d want to go to a swingers’ party, as a joke, but I didn’t know what that was.
Good table manners?
Perfect, better than mine.
Best thing about Luke?
He can dance salsa.
Would you introduce him to your friends?
Yes – they’d want him to take them dancing.
Describe Luke in three words
Cute, polite, engaging.
What do you think he made of you?
I’m really not sure. He said he would describe me as hot to his friends.
Did you go on somewhere?
He wanted to, but I had to work the next day.
And… did you kiss?
Yes! Although I basically had to ask for it…
If you could change one thing about the evening, what would it be?

Marks out of 10?
A solid 7.
Would you meet again?
I would, probably as a friend.
Luke on Claire
What were you hoping for?
Someone who was easy to talk to and had the potential for a few more fun nights in them.
First impressions?
Pretty nervous and wearing a great outfit.
What did you talk about?
Salsa and bachata, our families, the British and their lack of passion. I spent 15 minutes explaining what swingers’ parties are.
Any awkward moments?
When we considered having to run out of the restaurant because we didn’t know if the staff knew our meal was meant to be covered.
Good table manners?
Didn’t notice at all, so big thumbs up.
Best thing about Claire?
Her sense of culture and willingness to experience new music and activities.
Would you introduce her to your friends?

Describe Claire in three words
Cultured, intelligent, gorgeous.
What do you think she made of you?
I think my British sarcasm may occasionally have come across as a little rude.
Did you go on somewhere?
Just to the tube station – it was a school night after all.
And… did you kiss?
What’s a date without a kiss?
If you could change one thing about the evening, what would it be?
Have the date on a non-school night; I would have loved to have gone dancing afterwards.
Marks out 10?
8.
Would you meet again?
Here’s hoping!
• Claire and Luke ate at Mele e Pere, London W1.
Fancy a blind date? Email<EMAIL_ADDRESS>If you’re looking to meet someone like‑minded, visit soulmates.theguardian.com


I'm a data scientist turned software developer experienced in building dynamic single page web applications in JavaScript, Ruby on Rails, Node.js, React and HTML/CSS.
Social-Q's is an app to gamify social question games. Users can submit or answer questions. Upon answering results of the questions past answers are visualized to show results across various age and gender demographics. Built using MongoDB, Express, React, Redux, Node.js, HTML5, CSS3, Chart.js, and Webpack.
Live Link | GitHubManaged team to develop Tableau dashboards covering digital marketing campaign performance. Developed forecasting models presented to executive level. Worked alongside product managers with funnel analysis to guide product strategy and enhance funnel performance increasing visitor conversion rate by 30%. Analyzed out of home campaign performance to determine ROI value and advise locations of future installations around the country.
Developed acquisition targeting models leading to 25% lift in direct response performance. Leveraged US household demographic data to classify zip codes by profitibility resulting in new subscriber credit increase by 100 points YoY. Researched credit rescore initiative to determine strategy effectively reducing non pay behavior of high quality subscrivers by 25%, additionaly presented project in key learnings presentation across multiple departments in oprganization.
Led implementation of new campaign management tool, increasing team efficiencies by 50% through enablement of campaign automation across various marketing channels. Developed automation process to collect digital marketing data across multiple sources, merging them into central data mart enabling efficient tool to compare campaigns for campaign optimizations.
Immersive software development course with focus on full stack web development
Apart from being a web developer, I enjoy most of my time being in the mounts. In the winter I can be found skiing while during warmer months I'm often mountain biking or rock climbing.
When I can't be as active, I enjoy photography and I spend a large amount of my free time exploring the latest technology advancements in the front-end web development world.


The EEB Quarterly is a digital publication in the style of a general-interest magazine made by and for graduate students in the department of Ecology and Evolutionary Biology at the University of Toronto. The Quarterly consists of a Newsletter and a Features portion. Our mission is two-fold:
- The Newsletter highlights recent work by EEB graduate students and gathers useful information from the three campuses in one place. This includes news like thesis defences, publications, upcoming workshops and lecture series, reminders for conference deadlines and funding, activities available to us on and around the three campuses, as well as short student interviews on matters of general interest. Our aim is to identify and highlight the news and information most relevant to us, the students of EEB, and to celebrate the achievements and personalities of our department members.
- The Features section allows graduate students to publicly express their original ideas on tropics related to EEB and the scientific community in the form of essays and reviews; its purpose is to provide an outlet for students to practice non-technical science writing and build their portfolios. Think of this as a friendly environment in which to sharpen your writing skills. If you like to think and write about science or nature, writing for the EEB Quarterly gives you built-in access to an interested audience and the opportunity for both feedback and a line on your CV.
Throughout both sections, we highlight artwork and photography by EEB graduate students.
Affiliation
We currently have no formal affiliation with the EEB department or with the Ecology and evolution Graduate Students Association (EGSA), though this may change in the future. We want all students to feel represented by the Quarterly, but we don’t claim to represent the EEB student body in any technical manner.
How it works: volunteer editors and writers
The Newsletter portion is the responsibility of the volunteer editors. Toward the beginning of each quarter, the editors meet to pitch newsletter segments, decide on which segments to run, and make segment assignments.
For the features portion, essays and book reviews are submitted by student writers. We solicit essay commitments at the end of each publication month (September, December, March, June) by email. Interested students are encouraged to respond promptly to secure an essay slot. Each piece is due at the beginning of the publication month (i.e. 1 st of September for the Fall issue). After this, our aim is to have a one-week turnaround on edits. Unlike with scientific manuscripts, essay writers will not necessarily have to submit revisions; small-scale revisions will be made by editors unless authors request to make their own. For larger-scale changes, authors will be contacted by the editor with recommendations. See the Get Involved page for more details on essay categories.
Calls for photography and art submissions are made approximately one month before publication date, but we will accept submissions at any time throughout the year. Unfortunately, we are unable to pay for submitted writing, photography, artwork, or editing. All participation is currently voluntary.
Who can submit writing and art/photography to the Quarterly?
All graduate students in EEB at UofT are eligible to submit writing, art, and photography.
GET INVOLVED!
The EEB Quarterly is intended to be a useful, amusing, and thought-provoking resource for readers and writers. It is also meant to be available to all students in the department, not a small handful. So join up! Participation in the review benefits the departmental community, your writing and CV, and ultimately benefits your career. We hope to hear from you!


Film review by Kevin Patterson
WINGS OF DESIRE Rating: **** (out of four) PG-13, 1987 Directed by Wim Wenders. Written by Wenders and Peter Handke. Starring Bruno Ganz, Otto Sander, Solveig Dommartin.
Not many modern films open with a shot of a lonely angel sitting on top of a Berlin skyscraper, peering down at the city and its inhabitiants. WINGS OF DESIRE, a film by German director Wim Wenders, does exactly that. This angel, whose name is Damiel (Bruno Ganz), is having something of a crisis. He has spent eternity with his companion Cassiel (Otto Sander), working to spread compassion and hope among humans, but he is beginning to wish he could share in the human experience. He wonders what it would be like to have a cup of coffee, or feel a breeze on his face, or, more importantly, fall in love. He gets an opportunity for the latter when he starts paying attention to Marion (Solveig Dommartin), a lonely trapeze artist whose act is going out of business.
Wenders asks the audience to swallow a large dose of peculiar ideas for this film. First and foremost, we are asked to believe that angels are simply God's errand boys: they go from place to place dispensing happiness, and they are pleased when they have a positive effect on someone, but they don't seem to be able to share in this happiness. Wenders also asks us to accept that when Damiel appears in a dream to Marion, it is apparently so vivid and real that when she sees him in the flesh, she instantly accepts him as her true soul-mate. There's also the issue of whether the human or angelic experience is more "real," though this is never really resolved. Finally, there is the role played by Peter Falk, who happens to be making a detective movie in Berlin and who eventually fits into the story in a way that can only be described as unique and unexpected. That's not to say that any of these ideas are bad, just that they really come from out of left field.
Ultimately, however, what emerges is a poetic and artistically ambitious film that serves as an examination of various facets of spirituality. There isn't really much of a plot in this film, other than Damiel's self-examination and eventual decision to "take the plunge" and become human, but I don't think it needs one. Wenders is content to let his camera wander through Berlin, following the angels as they spread intellectual inspiration in a library, or comfort lonely subway passengers, or ruminate on what it was like the first time anyone ever laughed (they have, after all, been around for eternity). Their scenes are shot in black and white and often accompanied by low, meditative music, while Damiel's scenes after he becomes human are shot in color, backed up by the sounds of everyday life in the city. Much of Damiel's attention is devoted to Marion, of course, while Cassiel's "favorite human" seems to be an old writer whom he often finds in the library or sitting in a deserted lot in the city.
What Wenders seems to be getting at is that there is a spiritual dimension to human emotional and physical experiences, whether it's something as complicated as falling in love or creating a work of art, or something as simple as running around kicking dirt or finding a peaceful, isolated place and sitting there, or even something seemingly unpleasant such as loneliness. Damiel and Cassiel are the right characters for Wenders's meditation on humanity, as apparently spiritual beings who are deprived of sense experience. I kind of doubt that angels would actually be confined to knowledge of the ethereal only, but the film wisely refrains from declaring itself as theology and can easily be read as an allegory about human existence.
Wenders and co-writer Peter Handke have created a haunting, hypnotic testament to human spirituality in WINGS OF DESIRE. There's quite a bit of metaphysics floating around here, and I'm not sure if all of it makes sense or is explained very well, but on the other hand this isn't really the point of the film. This is the sort of film that should be approached the way one might approach a poem or a piece of music rather than an essay or a novel. Its intellectual foundations may be tenuous, but its spiritual and emotional impact is more than enough to make up for it.
- - - - - Film Reviews Page: http://members.aol.com/KTPattersn/reviews.html
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


Introdution-
What is HTML?
HTML is the standard markup language for creating Web pages.
- HTML stands for Hyper Text Markup Language
- HTML describes the structure of Web pages using markup
- HTML elements are the building blocks of HTML pages
- HTML elements are represented by tags
- HTML elements are the building blocks of HTML pages
- HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
- Browsers do not display the HTML tags, but use them to render the content of the page
"HyperText" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web..


Let us continue our study and review of statistical inference. In this post, I will mainly talk about $\chi^2$ test and ANOVA test.
1. $\chi^2$ Test
1.1 Multinomial Distribution
Multinomial Distribution is an extension of Binomial distribution. It will have $n$ number of trials; $m$ number of conditions in each trial; $X_1,...,X_m$ is corresponding events; $\theta_1,...,\theta_m$ is the respective probabilities. the pdf is: $$p(X;\theta)=\frac{n!}{x_1!\cdots x_m!}\theta_1^{x_1}\cdots \theta_m^{x_m}$$
1.2 Goodness of Fit Test
Goodness of fit test examine how well does the data match what we think is true under $H_0$. Here is the basic set-up:
$$H_0: \theta_1=a_1,\theta_2=a_2,...,\theta_m=a_m$$
$$H_A: Otherwise$$
The test will be based on the following statistic:
$$\chi^2=\sum_{i=1}^{m}\frac{x_i-E_{H_0}(x_i)}{E_{H_0}(x_i)}=\sum_{i=1}^{m}\frac{obs_i-n\cdot a_i}{n\cdot a_i} \sim \chi^2(m-1)$$
$x_i$ is the observed count in $i^{th}$ category
1.3 Test of Independence (Contingency Table)
This test aims to test whether two factors A, B are independent or not. Here is the basic set-up:
$$H_0: \theta_{i,j}=\theta_{i\cdot}\cdot \theta_{\cdot j},\ for\ all\ i,j$$
$$H_A: Otherwise$$
The test will be based on the following statistic:
$$\chi^2=\sum_{i=1}^{r}\sum_{j=1}^{c} \frac{n_{ij}- \frac{n_{i.}n_{.j}}{n}}{\frac{n_{i.}n_{.j}}{n}} \sim \chi^2((r-1)(c-1))$$
Here is one good example I copy from Pennstate University's Website:
2. ANOVA Test
ANOVA test aims to test whether the mean value in different groups are the same or not. But essentially, it tests whether the factor has the effect to the numerical dependent variable.
2.1 Some definations and theories
First let us talk about some terminologies in ANOVA:
Factor is the object that we would like to test. And the different performance for this factor is called treatment. The data we get for each treatment are called observed value. For example, we want to test whether the complaint rate (observed value) is different in retail industry (treatment one), tourist industry (treatment two), household industry (treatment three). The factor here is industry.
Fundamental Theory
The reason that people call this test analysis of variance is because we will use variance to tell us whether there are significant mean differences among these groups. In other words, we need to analyze the source of the errors. What does that mean?
First of all, within one treatment, we have different observed values. Since we randomly sample the data, so there are only random errors here. This kind of error is called within-group error. It represents the degree of dispersion within each treatment.
Then, the observed values in different treatment are also different. These errors maybe result from the sampling random error, but may also result from the differences between these treatment (system error). These kind of error is called between-group error. It equals to the sum of random error and system error and it represents the degree of dispersion between these treatments.
Then the intuition for ANOVA is very clear:
If the factor has no influence to our observed value, then there is only random error included in between-group error; then the averaged within-group error will be very similer to the averaged between-group error. Otherwise, there is system error in between-group error and it will larger than within-group error.
2.2 Assumptions for ANOVA
There are three basic assumption for ANOVA:
- Every treatment should belong to normal distribution
- The $\sigma^2$ for each treatment should be the same
- The observed value in one treatment is indepedent with other observed value in another treatment.
2.3 One-way analysis of variance
Here are the basic step for one-way analysis of variance.
- Make Assumption: $$H_0:\mu_1=\mu_2=\cdots=\mu_k$$ $$H_1: \mu_i(i=1,2,...,k) \ not \ all \ equal$$
- Construct Test Statistics:
We need to calculate some important values first.
1) sum of squares for factor A: (between-group square error) $$SSA = \sum_{i=1}^{k}n_i(\bar{x_i}-\bar{\bar{x}})^2$$ where $n_i$ is the number of observations in the $i^{th}$ treatment; $k$ is the number of treatment; $\bar{x_i}$ is the mean value in the $i^{th}$ treatment; $\bar{\bar{x}}$ is the mean value for all the observations.
2) sum of squares for error: (within-group square error) $$SSE = \sum_{i=1}^{k} \sum_{j=1}^{n_i}(x_{ij}-\bar{x_i})^2$$ 3) sum of squres for total: $$SST = \sum_{i=1}^{k} \sum_{j=1}^{n_i}(x_{ij}-\bar{\bar{x}})^2 = SSA + SSE$$ - Calculate Test Statistics:
Since the size of error squares is decided by the number of observations, we then need average them first and then make comparison.
1) Mean of squares for factor A: $$MSA=\frac{SSA}{df_{SSA}}=\frac{SSA}{k-1}$$
2) Mean of squares error: $$MSE=\frac{SSE}{df_{SSE}}=\frac{SSE}{n-k}$$ If you want to know the reason why their degree of freedom should be like this, please refer to this link: https://www.zhihu.com/question/20983193
In a word, it is because the mean value that let us lose some degree of freedom.
Then, we obtain the F-statistics: $$F = \frac{MSA}{MSE}\sim F(k-1,n-k)$$ Based on our significane level, we then could make a conclusion. If $F> F_{\alpha}$, we then reject our null hypothesis.
2.4 Two-way analysis of variance
Since there are two factors in two-way analysis of variance, we need to know whether there is interaction effect for these two factors. If it has, we call it two-factor with replication; If not, we call it two-factor without replication
Normally, we will put one factor on the 'row' called row factor and another on the 'column' called column factor.
2.4.1 Two-factor without replication
Difference with the one-factor ANOVA:
- Make two assumptions: one for row factor and one for column factor.
- $SST=SSR+SSC+SSE$, where $SSR$ is the sum of squares for the row and $SSC$ is the sum of squares for the column. $SSE$ is still the random error.
- Test two statistics $F_R=\frac{MSR}{MSE}\sim F(k-1,(k-1)(r-1))$, $F_C=\frac{MSC}{MSE}\sim F(r-1,(k-1)(r-1))$ individually.
2.4.2 Two-factor with replication
Difference with the two-factor without replication:
$SST = SSE+SSC+SSR+SSRC$, where $SSRC$ represent the sum of square for the interaction effect between row factor and column factor.
All right! I think now we've finished the review of statistical inference. It is time to play with Machine Learning! See you in the next post.