| |
NDC 2020 – Smashing the virtual barrier
With social distancing and working from
home our new norm, people have had to learn new ways to
connect. Sadly for now large events are a thing of the past. For
25 years I have travelled to America for conferences without
missing a year, until Coronavirus hit.
I also travelled to Europe most of those years, and it is no
secret that NDC Oslo is my favourite
developers conference in the world. It’s like attending
a rock concert for developers, where you get to ride wave after
wave of epic developer talks, interact with great people and
socialise with ‘your tribe’. Jakob Bradford and his Norwegian
team have created something truly special, and SSW look forward
to it every year.
Keep reading to see
why NDC Sydney 2020 was so successful, and to see some great
photos from the event
|
|
|
| |
| |
FEATURED VIDEO FROM SSW TV
|
|
|
|
VIDEO: The 5 important questions about .NET 5 |
Brendan Richards
- What will .NET 5 mean for my .NET Core projects?
- What will .NET 5 mean for my old full-framework
projects?
- What’s new?
- What’s coming next?
- Will Microsoft ever get better at naming things?
(Or does it make total logical sense)
Watch
video
|
|
| |
| |
FEATURED TECHNOLOGY FROM SSW
|
|
|
|
| |
|
Power Platform can help you create
solutions for all of your internal and
external processes. Microsoft's Power
Platform is a set of low-code
applications that can be used
individually to create easy-to-use
business solutions. These applications
can be used together and combined with
Office 365 and Azure to create a smooth
flow throughout your whole business,
from client communication to financial
analytics.
Could
you be supercharging your business
through Power Apps? Learn more.
|
|
|
|
| |
|
| |
|
|
| |
| |
|
|
|
Come watch our best Angular devs build an
Angular 11 application from scratch and
take it all the way to an enterprise
application using all the best tools and
practices we use.
Don't waste weeks learning Angular, the
Angular CLI, RxJS, TypeScript, ngrx,
NPM, WebPack, end to end testing and
unit testing. Get a jump start in just
one day.
Read
more
|
MAR
19
FRI
|
Online Live
Event
|
|
|
|
|
|
|
In this workshop we will cover the best
approach, and will give you practical
guidance to building enterprise
applications using Clean Architecture
and the new .NET 5 framework.
You will leave this superpowers having
developed the foundation and structure
for your next enterprise application,
along with the knowledge to take your
enterprise application development to
the next level.
Read
more
|
JAN
14
THU
|
Online Live
Event
|
|
|
|
|
|
|
|
|
|
|
| |
SSW User Groups: We're moving online and combining
our groups for the foreseeable future - more talks
for everyone!
Two Awesome Security Talks - Are you applications
secure?
Talk #1 Cryptography 101
by Robert Boedigheimer
Learn the fundamentals of cryptography, including
public/private and symmetric encryption, hashing,
and digital signatures. Discover which techniques
are appropriate for various situations.
Review practical real life examples for storing
passwords, protecting URL parameters, securely
exchanging information with partners, and safely
encrypting sensitive information on public web
sites. Concepts apply to all platforms, examples
will be in C# for both .NET and .NET Core.
Talk #2 Cracking passwords & Why L33t!fied passwords
are bad
by Alexei Doudkine
Join us in a live demo of how a hacker who has broken
into your machine can quickly and easily get your
password hashes, take them offline and crack them to
retrieve your original password.
In this interactive talk, we'll discuss how
passwords are stored in Windows, some techniques
real-world hackers will use to crack password hashes
and what you can do to prevent yours from being
cracked.
|
|
|
Robert Boedigheimer is
the Principal Systems Developer at
Schwan's Home Delivery providing
business solutions with web technologies
in the US.
He is a Microsoft MVP, a Progress
Developer Expert (Fiddler), an
ASPInsider, a Pluralsight author, and a
3rd degree black belt in Tae Kwon Do.
Robert regularly speaks at national and
international events.
See
more
|
|
| |
|
|
Alexei Doudkine Hacker,
tinkerer, car modder and "the dog guy",
Alexei has been in the offensive
security space for over 10 years.
From hacking into networks and
applications, to gaining physical access
into buildings, Alexei specialises in
breaking into thing. He runs a company
called Volkis and wants to keep the old
school hacker culture alive (think
Hackers, the movie).
See
more
|
|
| |
|
|
|
NOV
18
WED
|
Online Live
Event
|
|
|
| |
|
| |
|
|
|
| |
|
SSW is Hiring! |
|
More SSW
jobs
|
|
Full Stack Python/.NET
Developer
SSW Sydney, Brisbane, Melbourne, Newcastle
This role requires great communication skills and solid experience in
delivering production-ready web solutions. You will be working with our
expert developers and designers in a wide variety of exciting corporate
projects.
This role requires someone who can work closely with clients, think
critically, and create the right solution for the right job. Python and
.NET experience is a must. Experience with Angular, React, SharePoint,
and/or Dynamics 365 would be a bonus.
Read
More
|
|
User Experience
Expert/Web Designer
SSW Brisbane
SSW is looking for a highly talented User Experience Expert/Web Designer
who is passionate about creating great standards-based sites.
You will be working with both creative designers and technically minded
developers in a wide variety of exciting corporate projects. This role
requires someone who is able to articulate concisely, think critically,
and create aesthetically pleasing prototypes. An understanding of what
constitutes a great user experience is a must.
Read
More
|
|
|
|
|
Advertise with SSW |
Unsubscribe |
Previous SSW Updates |
Got a Hot Tip to share? |
Got a comment?
|
| |
|


A Rapidly Growing Dependency.
How to you feel when you misplace your smartphone? Have you taken a break once to leave it at home? If you have a family, could you still do it? How often do you take your phone to the bathroom?
We're all addicted to it. What's worse? I bet a crack addict has an easier time quiting their habit. Perhaps excessive... but let's dig deeper.
I'm won't be prejudice. I'll make this a global conversation. I myself have been guilty of everything you read.
Let's start with education. Whether in college or grade school, 99% of research completed by students is on the computer. That's not a problem. The resources on the web are incredibly valuable if you know what to look for, how to search for it, if it's properly dated and the source is reliable. However, that's not always going to happen. Even media is accessible from the web. So what's the problem? We tend to use the web as a solution to our academic weaknesses. The truth is, getting up to find the solution is becoming harder and harder as we assume technology is the Band-Aid to problems in education. Education Week reported on a major federal study that found, "no difference in academic achievement between students who used the technology in the classrooms and youngsters who used other methods. Tech doesn't make kids smarter, studying is a learned skill. Tech can cheat kids in the mix.
The toilet.  If you take your phone to the bathroom, why would I want to know what you've been doing in there? I will admit, it's a lot more subtle than taking a newspaper, but I mean common! Where do you put your phone when you... well... use tissue?! I admit, letting someone use your phone at this point makes a pretty good practical joke... but, you press that phone up against the side of your head, too. Ewwww!
While I was living in Korea, I just got there in time to see the smartphone burst. Within a year of my stay, everyone in the country had a smartphone. Okay, I exaggerate, almost everyone. However, that's not the kicker. When those service plans contracts expired what do you think they did with their old phones... gave them to their kids. I lived in Korea for 5 years. Before I left. Schools were quiet in the afternoon. Kids aren't screaming. They're texting and playing games. I couldn't only see a bunch of tiny heads buried into their cellphones. Hop on a subway in Korea (totally amazing by the way) and everyone is buried in their phones. Not that it's a bad thing, what else are you going to do on the train, you get my point.
We need to continue to learn about tech etiquette. What's right and wrong where. Sure it's addicting, and it doesn't have to be bad. We just need to be as responsible with our daily lives and look up every once in a while to make sure THAT MAC TRUCK DOESN'T HIT YOU! Whew, close call. Remember y'all... tech responsibly.


Grainuum Architecture
This is the architectural overview of GrainuumUSB.
There are lots and lots of books and sites available that describe the top
part of this document, but not too many go into detail on the lower
part.
In this chart, the USB-PHY-LL is the only part written in assembler, and
could be replaced with something else if we wanted to port this project
to a different CPU or architecture. Everything else is C.
We'll start below the bottom of the stack there, with USB electrical work.
Then we'll move up to the USB low-level PHY, describe some of the USB
PHY, mention the State, and generally gloss over the User Code.
USB Electrical
Usually four wires (+5V, D+, D-, GND)
LS vs FS vs HS vs SS
LS has a pull-up resistor across D-
Data lines on LS are 3.3V (oops!)
“A USB transceiver is required to withstand a continuous short circuit of
D+ and/or D- to V BUS, GND, other data line, or the cable shield at the connector,
for a minimum of 24 hours without degradation.” (7.1.1)
Palawan USB Schematic
Palawan USB Schematic
Palawan USB Traces
Detecting USB
If we fab out this board and plug it into a USB port without
loading any firmware on it, the pins float and that pullup
resistor takes effect. This configuration is enough to
convince the host that we're a real device, and it tries to
talk to it.
You can see the host detected this board as a USB Low Speed device.
It then gives Error -32 messages. If we look that up, we see
that it's EPIPE, which means a broken pipe.
Indeed, the host is trying to access the Endpoint 0 pipe, which
doesn't exist because there is no firmware yet. This error means
that the hardware is looking good, and it's time to start on the
firmware.
USB Signaling
Now that we know what's doing the signalling, we need to know
what signals are being sent across the wires.
States
Last part of a USB packet
This is the end part of a USB packet. Conveniently, it shows
us the three electrical states we'll encounter.
States
K-state
K-state is when both D+ and D- are opposites of one another.
States
J-state
J-state is the opposite of K-state. When programming the
USB stack, it's very easy to mix up D+ and D- because K-state
and J-state are complete opposites, and often times it doesn't
matter which one is which.
States
SE0-state
SE0 is where both lines are driven low. It indicates the
end of a packet. It is the only time we need to consult
both the D+ and D- lines.
States
SE1-state?
There is no SE1 state. If SE1 occurs, it's due to a bug,
or more likely something shorting one of the data lines.
There's no scope trace because this state is never seen.
Decoding States
Transition
Value
J → J
0
J → K
1
K → J
1
K → K
0
To decode the bit value, compare the state with the previous state.
This is much like an XNOR gate. We don't have an XNOR opcode,
so when the time comes to decode we'll need to NOT and then XOR.
8-bit preamble / sync at start of packet
Ages to respond to an interrupt
Data section
SE0 signals EOP
Bit stuffing
Phy: What's important?
Important
Not Important
Timing and sync
Bit stuffing
Errors:
keepalive
framing
overflow
6 bits to read sync
Only check one wire
Miss up to 3 packets
What about signal integrity?
Long, uneven traces are fine
What about signal integrity?
Integrity still really good [eye diagram]
What about signal integrity?
Faster is not always better
I sent this photo to Bunnie, because it was failing the eye diagram
test. Turns out the outputs defaulted to "high slew rate", which
caused the signal to overshoot and head into the red parts. You can
see that on the top and bottom of this photo I took with my phone.
Changing it to "slow slew rate" got rid of the overshoot.
Tip: anything under about 15 MHz is "slow", and you should use a
slow slew rate for your output.
What about signal integrity?
If you look very very closely at the output, you'll see that the
bits don't even come out at exactly the same time! This turns
out to be okay, because our skewed bits are still within spec (<IP_ADDRESS>)
Using a 32.768 kHz Crystal
32768 × 1464 = 47.972352 MHz
Close enough!
For one project, we were souring the clock from a 32.768 kHz watch crystal,
because it turns out affordable 32 kHz crystals are hard to find, whereas
everyone sells 32.768 kHz watch crystals.
This chip had a fixed multiplier available of 1464, which if you do the math
yields 47.972352 MHz.
Turns out that's close enough for LS to work.
Development System Setup
I'm going to take a break for a moment to describe the hardware
that I use to develop this project.
This is my development environment. It is a Raspberry Pi
running OpenOCD. There are three wires running to the device
being debugged: SWD, Clock, and a reset line. The reset line
is optional, but it makes it easier to program devices that
are brand-nes and unprogrammed.
There aren't even any passive components, it's just a straight
connection between the two devices.
This is the cheapest solution we've found to do development on
small embedded devices. Even better, it's cheap enough that
if we want to have someone else help with development, this
setup is cheap enough to mail to someone along with the hardware
to dev on.
The Raspberry Pi contians enough horsepower to run a C compiler
in addition to OpenOCD, meaning all the person has to do to get
up to speed on developing for an embedded device is to plug in
a keyboard, mouse, and TV, and they're done. No drivers to set
up, no proprietary JTAG boxes, no download links to compilers.
If it works for me, it'll work for them.
Other Hardware
Other Hardware
Other Hardware
Other Hardware
Low-Level API
int usbPhyReadI(struct GrainuumUSB *usb,
uint8_t samples[11]);
void usbPhyWriteI(struct GrainuumUSB *usb,
const uint8_t buffer[11],
uint32_t count);
grainuum-phy-ll.s
void grainuumCaptureI(struct GrainuumUSB *usb,
uint8_t packet[12]);
grainuum-phy.c
This is the low-level API. It consists of two functions, one that writes
values out to the pins as a USB packet, and one that reads a USB packet
from pins.
These functions take care of packing and unpacking the K and J states, and
must be called with interrupts disabled because they're very timing-sensitive.
They could be replaced on other chips to get a portable solution.
Run from RAM to get cycle-accuracy
.section .ramtext
grainuum-phy-ll.s
.data :
{
. = ALIGN(4);
*(.data .data.*)
. = ALIGN(4);
*(.ramtext)
} > ram AT > flash
KL02Z32-app.ld
Use registers for storing data
mov wpaddr, wdpclrreg // 1 cycle
ldr wnaddr, [sp, #0] // 2 cycles
ldr rval, [rreg] // 1 cycle (Single-cycle port)
Hook the writer to the reader for testing
FPGA designers have test benches
Being able to test corner cases is handy
Bit stuffing, word boundaries
USB signal generator
Low-Level C API
void grainuumConnect(struct GrainuumUSB *usb);
void grainuumDisconnect(struct GrainuumUSB *usb);
void grainuumReceivePacket(struct GrainuumUSB *usb); // (weak)
void grainuumCaptureI(struct GrainuumUSB *usb,
uint8_t packet[12]);
grainuum-phy.c
USB Packets
PID
Handshake packet (NAK, ACK)
Token packets (IN, OUT, SETUP)
Data packets (DATA0, DATA1)
LS has a maximum of 8-byte packets
Some sort of CRC (CRC-16 or CRC-5)
Reading: Responding
6.5 bit-times to respond (<IP_ADDRESS>)
Examine first byte of data:
IN? Send data, or send NAK if we have no data
OUT, SETUP, DATA0 or DATA1? Send ACK right away
Otherwise, we can worry about it later
Tip: Clever array [mis]-alignment
Use GRAINUUM_BUFFERs
PID is only useful in determining response
Actual data begins in byte 1
Actual data ends up on word boundary
CRC-16 ends up on word boundary
OUT/IN packet ends up on word boundary
GRAINUUM_BUFFER()
Frames: What's important?
Important
Not Important
Quick response
Frame sequence
Outgoing CRC-16
DATA0 vs DATA1
NAK allows for deferring
No need to generate CRC-5
We can ignore CRC-16
Can ignore "address"
USB State Machine
USB 2.0 spec figure 8-32, © 2000 Compaq Computer Corporation, Hewlett-Packard Company, Intel Corporation, Lucent Technologies Inc., Microsoft Corporation, NEC Corporation, Koninklijke Philips Electronics N.V.
USB State Machine API
int grainuumSendData(struct GrainuumUSB *usb,
int epnum,
const void *data,
int size);
void grainuumProcess(struct GrainuumUSB *usb,
const uint8_t packet[12]);
grainuum-state.c
User Code
struct GrainuumConfig {
get_usb_descriptor_t getDescriptor;
usb_set_config_num_t setConfigNum;
usb_get_buffer_t getReceiveBuffer;
usb_data_in_t receiveData;
usb_data_out_start_t sendDataStarted;
usb_data_out_finish_t sendDataFinished;
void *data;
};
Important
Not Important
getDescriptor
getReceiveBuffer
receiveData
setConfigNum
sendDataStarted
sendDataFinished
*data
Descriptors, etc.
LS is limited to Interrupt and Control endpoint types
Only two additional EPs beyond EP0 (<IP_ADDRESS>)
Setup process
Annoyance: Breaking into the debugger sometimes kills USB
Tip: Global variables are handy
int loop_count;
void loop(void) {
loop_count++;
}
(gdb) load
'minimal.elf' has changed; re-reading symbols.
Loading section .text, size 0x1b0 lma 0x5900
Loading section .data, size 0x3a8 lma 0x5ab0
Start address 0x5938, load size 1368
Transfer rate: 5 KB/sec, 684 bytes/write.
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x0000141c in ?? ()
(gdb) p loop_count
$1 = 91
(gdb)
Tip: Easier debugging
(gdb) b chSysLock
Breakpoint 1 at 0x3c (49 locations)
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x0000003c <_vectors+60>
1.2 y 0x00002030 in radioSend at ../os/ext/CMSIS/include/core_cmFunc.h:342
1.3 y 0x000021ca in usb_worker_thread at ../os/ext/CMSIS/include/core_cmFunc.h:342
1.4 y 0x00003018 in lockSystem at ../os/ext/CMSIS/include/core_cmFunc.h:342
1.5 y 0x0000309a in suspendThread at ../os/ext/CMSIS/include/core_cmFunc.h:342
1.6 y 0x000030da in suspendThreadTimeout at ../os/ext/CMSIS/include/core_cmFunc.h:342
...
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
Cannot insert hardware breakpoint 1.
...
Cannot insert hardware breakpoint 1.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
(gdb)
Borrow from Javascript
#define debugger asm("bkpt #0")
uint8_t USB_Available(uint8_t ep) {
if (rx_buffer_tail == rx_buffer_head) {
debugger;
return 0;
}
if (ep != rx_buffer_eps[rx_buffer_tail]) {
debugger;
return 0;
}
return 1;
}


The GStreamer Base Plug-ins is a well-groomed and well-maintained collection of GStreamer plug-ins and elements, spanning the range of possible types of elements one would want to write for GStreamer. It also contains helper libraries and base classes useful for writing elements. A wide range of video and audio decoders, encoders, and filters are included. Also see the gst-plugins-bad-0.10.23, gst-plugins-good-0.10.31, gst-plugins-ugly-0.10.19, and gst-ffmpeg-0.10.13 packages.
This package is known to build and work properly using an LFS-7.6 systemd platform.
GStreamer 1.0 series is not API or ABI compatible with GStreamer 0.10 series and both can be installed on the same system.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/gst-plugins-base/0.10/gst-plugins-base-0.10.36.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/gst-plugins-base/0.10/gst-plugins-base-0.10.36.tar.xz
Download MD5 sum: 3d2337841b132fe996e5eb2396ac9438
Download size: 2.3 MB
Estimated disk space required: 105 MB
Estimated build time: 1.7 SBU
GStreamer-0.10.36 and Pango-1.36.7
alsa-lib-1.0.28, libogg-1.3.2, libtheora-1.1.1, libvorbis-1.3.4, Systemd (for GUdev), and Xorg Libraries
CDParanoia-III-10.2, GTK+-3.12.2 (required to build the examples), libvisual, ORC, Check-0.9.14 (required to run the unit regression tests), and Valgrind-3.10.0 (optionaly used during the unit regression tests)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/gst-plugins-base
First, if you are using i686, fix a compile problem inroduced by gcc-4.9.0:
patch -Np1 -i ../gst-plugins-base-0.10.36-gcc_4_9_0_i686-1.patch
Install GStreamer Base Plug-ins by running the following commands:
./configure --prefix=/usr \ --disable-static \ --with-package-name="GStreamer Base Plugins 0.10.36 BLFS" \ --with-package-origin="http://www.linuxfromscratch.org/blfs/view/7.6-systemd/" && make
To run the unit regression tests, issue: make check. There are many other
Makefile
targets you can specify for
running the tests, issue make -C
tests/check help to see the complete list.
Now, as the root
user:
make install
--disable-static
: This
switch prevents installation of static versions of the libraries.
--enable-gtk-doc
: Use this parameter if
GTK-Doc is installed and you wish
to rebuild and install the API documentation.
Last updated on 2014-08-25 19:22:46 -0700


This is Bob.

When Bob eats food, it passes through his digestive system.
Let's watch Bob eat a magical blob of food.

When Bob eats food, it passes through his digestive system.
Let's watch Bob eat a magical blob of food.
When the magical blob enters Bob's mouth, he uses his teeth to break it down into smaller pieces. This is called mechanical digestion.  These release salivary amylase which helps to break down the magical blob before it reaches his stomach. The tube that the magical blob is in is Bob's esophagus and the magical blob is now called a bolus, but we'll call it a magical bolus. Bob's esophagus uses muscles to move the magical bolus down in a process called peristalsis. Oh, and the magical bolus has to first pass through Bob's pharynx before entering the esophagus. The pharynx stops food from entering Bob's trachea (a.k.a. his windpipe).
The magical bolus is now inside Bob's stomach which it entered from his esophagus through the cardiac sphincter and is now called chyme , but we'll call it magical chyme. The yellow-ish liquid you see the magical chyme floating on is a mixture of various substances, one of which is hydrochloric acid that is produced by pepsin in his stomach. These digestive juices break down the magical chyme using chemical digestion. Lucky for Bob, the inside of his stomach is covered in a layer of mucus, preventing the digestive juices from damaging his stomach. Ignore all of the other things you see for now, we'll explain them in a second.
Accessory organs are organs which the magical chyme doesn't actually pass through, but instead they help out other organs with the digestion.The magical
chyme leaves the stomach through the pyloric sphincter on the bottom and heads towards the intestines. But first, the magical chyme is soaked with a substance called
bile which is created by the liver, the large red organ. The bile is stored in the gallbladder which is that green sac you see.
Additionally, the curly purple-coloured organ you see is Bob's pancreas. The pancreas is very important since it releases quite a few substances. Bicarbonate is released in order to neutralize the acid from the stomach; trypsin is released in order to break down proteins into peptides; pancreatic amylase is released in order to break down carbohydrates into a sugar called maltose; and lipase is released in order to break down lipids (a.k.a. fats) into smaller pieces.
The magical chyme is now in Bob's small intestine which is the tangled blue tube you see. Fun fact: Bob's small intestine is about 7 metres long meaning it would probably be taller than your house if it was stretched out. Anyways, once the magical chyme is in there, the peptides broken down earlier from the proteins by the pancreas get broken down further into amino acids by peptidases. The maltose broken down earlier is now also broken down further into glucose by maltase. The inside walls of
the small intestine are covered in little hairs called villi shown in the first close-up. Bob's villi are covered in even smaller hairs called
microvilli, shown in the second close-up, which is where all of the nutrients are absorbed into Bob's body. The microvilli also contain lacteals which absorb things like fats.
Unfortunately, Bob has Celiac Disease. This means that the inner walls of Bob's small intestine have been damaged by something called gluten
which is a glue-like substance found in foods like bread. This causes Bob's intestines to absorb less of the nutrients in his food which can cause symptoms such as anemia, diarrhea, weight loss, tiredness, cramps, bloating, and being angrier than usual. There's no cure for the disease, so people like Bob have to eat gluten-free foods to prevent any
further damage to their small intestine. We like Bob, so the magical blob of food we gave him was gluten-free.
The orange tube that the magical chyme is now inside is Bob's large intestine. Some extra nutrients left over from the small intestine are absorbed in here. Also, any water that the magical chyme contains is absorbed here and added to Bob's body, making the magical chyme much harder than it was before. The large intestine is much shorter than the small intestine and so it spends less time in here. When magical chyme gets to the end of the tube, Bob feels the need to get to the bathroom. In a bathroom or not, the magical chyme leaves Bob's body through the orange tube at the bottom called the rectum.
Now that Bob has taken what he needs from the magical blob, it has left his body.
Unfortunately for Bob, he wasn't able to find a bathroom in time.
We decided not to show you what happened, but you can probably figure it out yourself.


Comparison of natural frequencies of the free vibrating DRGs at different geometry parameters obtained by simulation and calculation: ( a) the natural frequencies of the simulation and calculation results and ( b) the relative error of the natural frequencies obtained by the two methods.


This website presents you the top 5 NBA players as of the 10th of April 2021 in '20-'21 season. To navigate and view these top players, please direct your mouse to the navigation bar and click on "Top Players"


Syntax to support optional and named keyword arguments.
let-optionals[*]
is originally from SCSH, and
let-keywords[*]
derived from Gauche.
Binding construct similar to let
. The var
s are
bound to fresh locations holding values taken in order from the
list ls
, body
is evaluated in the resulting
environment, and the value(s) of the last expression of body
returned. If the length of ls
is shorter than the number of
var
s, then the remaining var
s taken their values from
their corresponding default
s, evaluated in an unspecified
order. Unused default
s are not evaluated. If a final
rest
var is specified, then it is bound to any remaining
elements of ls
beyond the length of ls
, otherwise any
extra values are unused.
Typically used on the dotted rest list at the start of a lambda,
let-optionals
is more concise and more efficient than
case-lambda
for simple optional argument uses.
Example:
(define (copy-port . o)
(let-optionals o ((in (current-input-port))
(out (current-output-port))
(n-bytes #f))
(do ((i 0 (+ i 1))
(n (read-u8 in) (read-u8 in)))
((or (and n-bytes (>= i n-bytes))
(eof-object? b)))
(write-u8 b out)))
Example:
(let-optionals '(0) ((a 10) (b 11) (c 12))
(list a b c))
=> (0 11 12)
let*
equivalent to let-optionals
. Any required
default
values are evaluated in left-to-right order, with
all preceding var
s in scope.
Shorthand for
(lambda o
(let-optionals o ((var default) ... [rest])
body ...))
Search for the identifier key
in the list ls
, treating
it as a property list of the form (key1 val1 key2 val2
...)
, and return the associated val
. If not found, return
default
, or #f
.
Macro equivalent of keyword-ref
, where default
is
only evaluated if key
is not found.
Analogous to let-optionals
, except instead of binding the
var
s by position they are bound by name, by searching in
ls
with keyword-ref*
. If an optional keyword
argument is provided it must be an identifier to use as the name,
otherwise var
is used, appending a ":" (colon). If the name
is not found, var
is bound to default
, even if unused
names remain in ls
.
If an optional trailing identifier rest
is provided, it is
bound to the list of unused arguments not bound to any var
.
Note R7RS does not have a disjoint keyword type or auto-quoting syntax for keywords - they are simply identifiers. Thus when passing keyword arguments they must be quoted (or otherwise dynamically evaluated).
Example:
(define (make-person . o)
(let-keywords o ((name "John Doe")
(age 0)
(occupation job: 'unemployed))
(vector name age occupation)))
(list (make-person)
(make-person 'name: "Methuselah" 'age: 969)
(make-person 'name: "Dr. Who" 'job: 'time-lord 'age: 1500))
=> (#("John Doe" 0 unemployed) #("Methuselah" 969 unemployed) #("Dr. Who" 1500 time-lord))
Example:
(let-keywords '(b: 2 a: 1 other: 9)
((a 0) (b 0) (c 0) rest)
(list a b c rest))
=> (1 2 0 (other: 9))
let*
equivalent to let-keywords*
. Any required
default
values are evaluated in left-to-right order, with
all preceding var
s in scope.
Example:
(let-keywords* '(b: 5)
((a 1) (b (* a 2)) (c (* b 3)))
(list a b c))
=> (1 5 15)


Glenn Beck Urges Conservatives to Understand 'Black Lives Matter'
By David Weigel On The Washington Post, August 15 at 12:32 PM
On Friday, the radio and online host Glenn Beck arrived at the annual RedState Gathering with some hard lessons for conservatives. He could not vote for Donald Trump. He had interviewed the independent #NeverTrump candidate, Evan McMullin, and found him too "squishy." Despondent about the choice that faced voters, he had begun seriously "soul-searching" and investigating what he did not know about America.
"You can't be as universally disliked as I am, and not do some soul-searching," said Beck at a news conference before his speech in Denver. "Well, unless you're Donald Trump."
Among Beck's revelations was that the Black Lives Matter movement had a point. Beck, like many conservatives, had criticized the movement as racist and exclusionary. He had led a march in Birmingham, Ala., on the theme of "All Lives Matter." His news site, The Blaze, had written dutifully about well-meaning people who said "All Lives Matter" and were hounded by the politically correct mob.
But since the police shootings in Dallas, where his programs are recorded, Beck had come to view "Black Lives Matter" differently.
"All of us are sitting around a table, and we're all friends," he said. "It's time for dessert, and everybody gets pie except for me and you. And you say, 'I didn't get any pie.' Everybody at the table looks at you and says 'I know. All pie matters.' You say, 'but I don't have any pie! What about my pie?'"
Beck's point was that white Americans simply did not understand what black people had been saying about police in America.
The "leaders" of the movement, he said, were "communists and anti-capitalists" whom he could never agree with. "But they're not the people walking behind them in the street," he said. "We're all speaking different languages and we need to talk to each other."
Later, from the stage, Beck told the "All Pies Matter" fable again, asking hundreds of conservatives to look past their earlier disgust for the Black Lives Matter movement.
In the room, Beck was well received. (The only tumult in the audience came when he criticized Trump, and two conference attendees squabbled before being told to stop.) In an interview with NPR, he repeated the same message.
But on Sunday, Beck's appeal crashed into the reality of conservative media coverage of police-involved shootings. Riots broke out in Milwaukee after a shooting; The Drudge Report focused on the harm some rioters caused to white people, while Beck was condemned by Breitbart News for preemptively excusing them.
"While Glenn Beck would like people to believe he’s insightful, critics of Black Lives Matter don’t need his hectoring," wrote Breitbart's Lee Stranahan, who is also based in Dallas. "The reason many people — including black critics of Black Lives Matter like [Milwaukee County] Sheriff David Clarke — say 'All Lives Matter' in response to 'Black Lives Matter' is to reject the underlying notion of identity politics."
Beck had returned to his show, which if it did not adopt that take on Milwaukee would stand out on conservative talk radio. He was ready for that. In Denver, he criticized Trump for inciting crowds to boo the media and chant "lock 'em up" at the candidate's behest.
"Now, what law has the press broken?" Beck asked. "Is there a law that you can't have a different opinion? Is there a law that your newspaper, your television station, can't have an agenda? When people start shouting, 'put the press in jail,' we're in deep, deep trouble. The press doesn't know who the people are. The candidates don't know who the people are."


Task Planner App
To do:
In progress:
In review:
Completed:
Work:
Personel:
Other:
New Task +
New Task Form
×
Task Name:
(more than 8 characters excl.space)
NEW
You must enter a task name (longer than 8 characters).
Date of Entry as Start Date:
Due Date:
Please pick a valid date (DD/MM/YYYY).
Task Description:
Please enter description (longer than 15 characters).
Assigned to Name
Please enter a valid name (more than 8 characters).
Assignee Email Address (optional)
Please enter a valid email address.
Task Status:
Please make a selection.
Choose...
To Do
In Progress
In Review
Done
Task Category
Please make a selection.
Choose...
Work
Personel
Other
All Tasks List


AWS WAF
The AWS WAF (Web application firewall) protects your web servers from malicious attacks from the internet and provides DDoS protection at a very low cost compared to all other available solutions. With so many automated bots looking to exploit vulnerabilities, you can be hacked even if you’re not targeted. Once a bot scan has found you susceptible to a certain vulnerability, it will extract as much information as possible. In today’s world, you must take active steps to protect yourself before something bad happens.
Typically, you fully open up your web application to the internet. For example, in most cases you allow any request going to port 80 or 443 to go directly to the web server, without any filtering, and leave it up to the web server on whether or not to respond. This is like not locking your front door because you like your neighbors. We all lock our doors because we don’t want strangers rifling through our drawers, so why would we let anyone come to our web servers and send it any request they like?
You know that you shouldn’t, but security is really hard to implement and maintain.
AWS WAF can make security highly automatable. Everything can be configured and updated with an API so that it can be integrated into your development and test workflows. However, as usual, AWS provides us with some but not all of the building blocks you need to operationalize this process.
AWS WAF provides a few layers of security that we can take advantage of:
- General and known vulnerabilities (OWASP)
- DDoS attacks
- Custom filtering to allow only what your application needs (HTTP Methods, URLs, post data, etc)
Using the AWS WAF solution without being a security expert starts you down the right path - you’ve locked your doors but not your windows. It provides you protection with default rules, but those rules have not been updated since it was created in June 2017. Vulnerabilities are constantly changing and you should update these rules to defend against these new threats.
Now, let’s think about your specific application. You should create rules to detect and limit traffic to your application to further reduce the attack surface:
- Endpoint path URLs
- HTTP Methods
- Required/deny headers
- Type of PUT/POST data that you want
By providing the appropriate amount of access for your web application, you reduce the risk of unknown vulnerabilities. Limiting unnecessary access means less availability for someone to exploit your application with. Don’t leave your window open to the world.
This requires you to add the WAF into your software development life cycle (SDLC). By adding the WAF into your development and test processes, you can treat these rules as part of your software. The AWS WAF can be created via the AWS API and can be fully integrated into a CI/CD workflow. When your web application changes, you should always reassess your security and update it as necessary. During the end to end tests, the updated WAF rules can be applied by automation and tested to ensure everything still works as designed before hitting production. This will also allow your security team to easily contribute and assess your application security. They can make changes and test those changes in their own sandbox area without affecting other developers or live systems.
Good security practice involves layers and defense in depth that are being constantly updated to keep it current and customized to your application. Security must be one of your main software features, something that is continually improved and updated to fit your needs.
Aws | Waf | Security


Code Snippets¶
- Code snippets for page
extensions
- Code snippets for page
gradnewton
- Code snippets for page
gng
- Code snippets for page
digit_classification
- Code snippets for page
node_list
- Code snippets for page
bimdp
- Code snippets for page
bimdp_inverse
- Code snippets for page
logmap
- Code snippets for page
image_convolution
- Code snippets for page
parallel
- Code snippets for page
dbn
- Code snippets for page
hinet
- Code snippets for page
caching
- Code snippets for page
iterables
- Code snippets for page
classifiers
- Code snippets for page
checkpoints
- Code snippets for page
lle
- Code snippets for page
flows
- Code snippets for page
nodes
- Code snippets for page
gsfa


An exercise in using D3.js and SVG to create data visualisations of cocktails and their ingredients by Andy Barefoot. Based on this original visualisation by Tatjana Dubovina & David McCandless.


Chapter 2 Loss distributions
2.1 Introduction
The aim of the course is to provide a fundamental basis which applies mainly in general insurance. General insurance companies’ products are short-term policies that can be purchased for a short period of time. Examples of insurance products are
motor insurance;
home insurance;
health insurance; and
travel insurance.
In case of an occurrence of an insured event, two important components of financial losses which are of importance for management of an insurance company are
the number of claims; and
the amounts of those claims.
Mathematical and statistical techniques used to model these sources of uncertainty will be discussed. This will enable insurance companies to
calculate premium rates to charge policy holders; and
decide how much reserve should be set aside for the future payment of incurred claims.
In the chapter, statistical distributions and their properties which are suitable for modelling claim sizes are reviewed. These distribution are also known as loss distributions. In practice, the shape of loss distributions are positive skew with a long right tail. The main features of loss distributions include:
having a few small claims;
rising to a peak;
tailing off gradually with a few very large claims.
2.2 Exponential Distribution
A random variable \(X\) has an exponential distribution with a parameter \(\lambda > 0\), denoted by \(X \sim \text{Exp}(\lambda)\) if its probability density function is given by \[f_X(x) = \lambda e^{-\lambda x}, \quad x > 0.\]
Example 2.1 Let \(X \sim \text{Exp}(\lambda)\) and \(0 < a < b\).
Find the distribution \(F_X(x)\).
Express \(P(a < X < B)\) in terms of \(f_X(x)\) and \(F_X(x)\).
Show that the moment generating function of \(X\) is \[M_X(t) = \left(1 - \frac{t}{\lambda}\right)^{-1}, \quad t < \lambda.\]
Derive the \(r\)-th moment about the origin \(\mathrm{E}[X^r].\)
Derive the coefficient of skewness for \(X\).
Simulate a random sample of size n = 200 from \(X \sim \text{Exp}(0.5)\) using the command
sample = rexp(n, rate = lambda)
where \(n\) and \(\lambda\) are the chosen parameter values.Plot a histogram of the random sample using the command
hist(sample)
(use help for available options forhist
function in R).
Solution: The code for questions 6 and 7 are given below. The histogram can be generated from the code below.
# Example 1(6-7)
# set.seed is used so that random number generated from different simulations are the same.
# The number 5353 can be set arbitrarily.
set.seed(5353)
nsample <- 200
data_exp <- rexp(nsample, rate = 0.5)
dataset <- data_exp
hist(dataset, breaks=100,probability = TRUE, xlab = "claim sizes"
, ylab = "density", main = paste("Histogram of claim sizes" ))
hist(dataset, breaks=100, xlab = "claim sizes"
, ylab = "count", main = paste("Histogram of claim sizes" ))
Copy and paste the code above and run it.
Notes 1. The exponential distribution can used to model the inter-arrival time of an event.
- The exponential distribution has an important property called lack of memory: if \(X \sim \text{Exp}(\lambda)\), then the random variable \(X-w\) conditional on \(X > w\) has the same distribution as \(X\), i.e. \[X \sim \text{Exp}(\lambda)\Rightarrow X - w | X > w \sim \text{Exp}(\lambda).\]
2.3 Gamma distribution
A random variable \(X\) has a gamma distribution with parameters \(\alpha > 0\) and \(\lambda > 0\), denoted by \(X \sim \mathcal{G}(\alpha, \lambda)\) or \(X \sim \text{gamma}(\alpha, \lambda)\) if its probability density function is given by \[f_X(x) = \frac{\lambda^\alpha}{\Gamma(\alpha)} x^{\alpha -1} e^{-\lambda x}, \quad x > 0.\] The symbol \(\Gamma\) denotes the gamma function, which is defined as \[\Gamma(\alpha) = \int_{0}^\infty x^{\alpha - 1} e^{-x} \mathop{}\!dx, \quad \text{for } \alpha > 0.\] It follows that \(\Gamma(\alpha + 1) = \alpha \Gamma(\alpha)\) and that for a positive integer \(n\), \(\Gamma(n) = (n-1)!\).
The properties of the gamma distribution are summarised.
The mean and variance of \(X\) are \[\mathrm{E}[X] = \frac{\alpha}{\lambda} \text{ and } \mathrm{Var}[X] =\frac{\alpha}{\lambda^2}\]
The \(r\)-th moment about the origin is \[\mathrm{E}[X^r] = \frac{1}{\lambda^r} \frac{\Gamma(\alpha + r)}{\Gamma(\alpha )}, \quad r > 0.\]
The moment generating function (mgf) of \(X\) is \[M_X(t) = \left(1 - \frac{t}{\lambda}\right)^{-\alpha}, \quad t < \lambda.\]
The coefficient of skewness is \[\frac{2}{\sqrt{\alpha}}.\]
Notes 1. The exponential function is a special case of the gamma distribution, i.e. \(\text{Exp}(\lambda)= \mathcal{G}(1,\lambda)\)
If \(\alpha\) is a positive integer, the sum of \(\alpha\) independent, identically distributed as \(\text{Exp}(\lambda)\), is \(\mathcal{G}(\alpha, \lambda)\).
If \(X_1, X_2, \ldots, X_n\) are independent, identically distributed, each with a \(\mathcal{G}(\alpha, \lambda)\) distribution, then \[\sum_{i = 1}^n X_i \sim \mathcal{G}(n\alpha, \lambda).\]
The exponential and gamma distributions are not fat-tailed, and may not provide a good fit to claim amounts.
Example 2.2 Using the moment generating function of a gamma distribution, show that the sum of independent gamma random variables with the same scale parameter \(\lambda\), \(X \sim \mathcal{G}(\alpha_1, \lambda)\) and \(Y \sim \mathcal{G}(\alpha_2, \lambda)\), is \(S = X+ Y \sim \mathcal{G}(\alpha_1 + \alpha_2, \lambda).\)
Solution: Because \(X\) and \(Y\) are independent, \[\begin{aligned} M_S(t) &= M_{X+Y}(t) = M_X(t) \cdot M_Y(t)\\ &= (1 - \frac{t}{\lambda})^{-\alpha_1} \cdot (1 - \frac{t}{\lambda})^{-\alpha_2} \\ &= (1 - \frac{t}{\lambda})^{-(\alpha_1 + \alpha_2)}. \end{aligned}\] Hence \(S = X + Y \sim \mathcal{G}(\alpha_1 + \alpha_2, \lambda).\)
Example 2.3 Consider a data set consisting of 200 claim amounts in one year from a general insurance portfolio.
Calculate the sample mean and sample standard deviation.
Use the method of moments to fit these data with both exponential and gamma distributions.
Calculate the boundaries for groups or bins so that the expected number of claims in each bin is 20 under the fitted exponential distribution.
Count the values of the observed claim amounts in each bin.
With these bin boundaries, find the expected number of claims when the data are fitted with the gamma distribution.
Plot two histograms for the data set with fitted exponential distribution and the dataset with fitted gamma distribution.
Comment on the goodness of fit of the fitted distributions.
Solution: 1. Given that \(\sum_{i=1}^n x_i = 206046.4\) and \(\sum_{i=1}^n x_i^2 = 1,472,400,135\), we have \[\bar{x} = \frac{\sum_{i=1}^n x_i}{n} = \frac{206046.4}{200} = 1030.232.\] The sample variance and standard deviation are \[s^2 = \frac{1}{n-1} \left( \sum_{i=1}^n x_i^2 - \frac{(\sum_{i=1}^n x_i)^2}{n} \right) = 5135.093,\] and \[s = 2516.403.\]
We calculate estimates of unknown parameters of both exponential and gamma distributions by the method of moments. We simply match the mean and central moments, i.e. matching \(\mathrm{E}[X]\) to the sample mean \(\bar{x}\) and \(\mathrm{Var}[X]\) to the sample variance.
The MME (moment matching estimation) of the required distributions are as follows:
the MME of \(\lambda\) for an \(\text{Exp}(\lambda)\) distribution is the reciprocal of the sample mean, \[\tilde{\lambda} = \frac{1}{\bar{x}} = 0.000971.\]
the MMEs of \(\alpha\) and \(\lambda\) for a \(\mathcal{G}(\alpha, \lambda)\) distribution are \[\begin{aligned} \tilde{\alpha} &= \left(\frac{\bar{x}}{s}\right)^2 = 0.167614, \\ \tilde{\lambda} &= \frac{\tilde{\alpha}}{\bar{x}} = 0.000163.\end{aligned}\]
the MMEs of \(\mu\) and \(\sigma\) for a \(\mathcal{LN}(\mu, \sigma^2)\) distribution are \[\begin{aligned} \tilde{\sigma} &= \sqrt{ \ln \left( \frac{s^2}{\bar{x}^2} + 1 \right) } = 1.393218, \\ \tilde{\mu} &= \ln(\bar{x}) - \frac{\tilde{\sigma}^2 }{2} = 5.967012.\end{aligned}\]
the MMEs of \(\alpha\) and \(\lambda\) for a \(\text{Pa}(\alpha, \lambda)\) distribution are \[\begin{aligned} \tilde{\alpha} &= \displaystyle{ 2 \left( \frac{s^2}{\bar{x}^2} \right) \frac{1}{(\frac{s^2}{\bar{x}^2} - 1)} } = 2.402731,\\ \tilde{\lambda} &= \bar{x} (\tilde{\alpha} - 1) = 1445.138.\end{aligned}\]
The upper boundaries for the 10 groups or bins so that the expected number of claims in each bin is 20 under the fitted exponential distribution are determined by \[\Pr(X \le \text{upbd}_j) = \frac{j}{10}, \quad j = 1,2,3, \ldots, 9.\] With \(\tilde{\lambda}\) from the MME for an \(\text{Exp}(\lambda)\) from the previous, \[\Pr(X \le x) = 1 - \exp(-\tilde{\lambda} x).\] We obtain \[\text{upbd}_j = -\frac{1}{\tilde{\lambda}} \ln\left( 1 - \frac{j}{10}\right).\] The results are given in Table 2.1.
The following table shows frequency distributions for observed and fitted claims sizes for exponential, gamma, and also lognormal and Pareto fits.
Table 2.1 : Frequency distributions for observed and fitted claims sizes.
Observation Exp Gamma Lognormal Pareto
----------------- ------------- ----- ------- ----------- --------
(0,109\] 60 20 109.4 36 31.9
(109,230\] 31 20 14.3 34.4 27.8
(230,367\] 25 20 9.7 26 24.2
(367,526\] 17 20 7.8 20.5 21.2
(526,714\] 14 20 6.8 16.6 18.6
(714,944\] 13 20 6.3 13.9 16.4
(944,1240\] 6 20 6.2 11.9 14.6
(1240,1658\] 7 20 6.5 10.8 13.2
(1658,2372\] 10 20 7.7 10.4 12.5
(2372,$\infty$) 17 20 25.4 19.5 19.4
Let \(X\) be the claim size.
The expected number of claims for the fitted exponential distribution in the range \((a,b]\) is \[200 \cdot \Pr( a < X \le b) = 200( e^{-\tilde{\lambda} a} - e^{-\tilde{\lambda} b} ).\] In our case, the expected frequencies under the fitted exponential distribution are given in the third column of Table 1.
The expected number of claims for the fitted gamma distribution in the range \((a,b]\) is \[200 \cdot\left( \text{GAMMADIST}\left(b, \tilde{\alpha}, \frac{1}{\tilde{\lambda}}, \text{TRUE}\right) - \text{GAMMADIST}\left(a, \tilde{\alpha}, \frac{1}{\tilde{\lambda}}, \text{TRUE}\right) \right).\] The expected frequencies under the fitted gamma distribution are given in the fourth column of Table 1.
For the fitted lognormal, the expected number of claims in the range \((a,b]\) can be obtained from \[200 \cdot\left( \text{NORMDIST} \left(\frac{LN(b) - \tilde{\mu}}{\tilde{\sigma}}\right) - \text{NORMDIST}\left(\frac{LN(a) - \tilde{\mu}}{\tilde{\sigma}}\right) \right).\]
For the fitted Pareto distribution, the expected number of claims in the range \((a,b]\) can be obtained from \[200 \left[ \left(\frac{\tilde{\lambda}}{\tilde{\lambda} + a} \right)^{\tilde{\alpha}} - \left(\frac{\tilde{\lambda}}{\tilde{\lambda} + b} \right)^{\tilde{\alpha}} \right].\]
The histograms for the data set with fitted exponential distribution and the dataset with fitted gamma distribution are shown in Figures 2 and 3.
Comments:
The high positive skewness of the sample reflects the fact that SD is large when compared to the mean. Consequently, the exponential distribution may not fit the data well.
Five claims (2.5%) are greater than 10,000, which is one of the main features of the loss distribution.
The fit is poor for the exponential distribution, as we see that the model under-fits the data for small claims up to 367 and over-fits for large claims between 944 to 2372. The gamma fit is again poor. We see that the model over-fits for small claims between 0-109 and under-fits for claims 230 and 944.
Which one of the lognormal and Pareto distributions provides a better fit to the observed claim data?
Let us plot the histogram of claim sizes with fitted exponential and gamma distributions in this interaction area.
2.4 Lognormal distribution
A random variable \(X\) has a lognormal distribution with parameters \(\mu\) and \(\sigma^2\), denoted by \(X \sim \mathcal{LN}(\mu, \sigma^2)\) if its probability density function is given by \[f_X(x) = \frac{1}{\sigma x \sqrt{2 \pi}} \exp\left(-\frac{1}{2} \left( \frac{\log(x) - \mu}{\sigma} \right)^2 \right) , \quad x > 0.\]
The following relation holds: \[X \sim \mathcal{LN}(\mu, \sigma^2)\Leftrightarrow Y = \log X \sim \mathcal{N}(\mu, \sigma^2).\]
The properties of the lognormal distribution are summarised.
The mean and variance of \(X\) are \[\mathrm{E}[X] = \exp\left(\mu + \frac{1}{2} \sigma^2 \right) \text{ and } \mathrm{Var}[X] =\exp\left(2\mu + \sigma^2 \right) (\exp(\sigma^2) - 1).\]
The \(r\)-th moment about the origin is \[\mathrm{E}[X^r] =\exp\left(r\mu + \frac{1}{2}r^2 \sigma^2 \right).\]
The moment generating function (mgf) of \(X\) is not finite for any positive value of \(t\).
The coefficient of skewness is \[(\exp(\sigma^2) + 2) \left(\exp(\sigma^2) -1 \right)^{1/2} .\]
2.5 Pareto distribution
A random variable \(X\) has a Pareto distribution with parameters \(\alpha > 0\) and \(\lambda > 0\), denoted by \(X \sim \text{Pa}(\alpha, \lambda)\) if its probability density function is given by \[f_X(x) = \frac{\alpha \lambda^\alpha}{(\lambda + x)^{\alpha + 1}}, \quad x > 0.\] The distribution function is given by \[F_X(x) = 1 - \left( \frac{\lambda}{\lambda + \alpha} \right)^\alpha, \quad x > 0.\]
The properties of the gamma distribution are summarized.
The mean and variance of \(X\) are \[\mathrm{E}[X] = \frac{\lambda}{\alpha - 1}, \alpha > 1 \text{ and } \mathrm{Var}[X] = \frac{\alpha \lambda^2}{(\alpha - 1)^2(\alpha - 2)}, \alpha > 2.\]
The \(r\)-th moment about the origin is \[\mathrm{E}[X^r] =\frac{\Gamma(\alpha-r) \Gamma(1+ r)}{\Gamma(\alpha)} \lambda^r, \quad 0 < r < \alpha.\]
The moment generating function (mgf) of \(X\) is not finite for any positive value of \(t\).
The coefficient of skewness is \[\frac{2(\alpha + 1)}{\alpha - 3} \sqrt{\frac{\alpha-2}{\alpha}} , \quad \alpha > 3.\]
The following conditional tail property for a Pareto distribution is useful for reinsurance calculation. Let \(X \sim \text{Pa}(\alpha, \lambda)\). Then the random variable \(X - w\) conditional on \(X > w\) has a Pareto distribution with parameters \(\alpha\) and \(\lambda + w\), i.e. \[X \sim \text{Pa}(\alpha, \lambda)\Rightarrow X - w | X > w \sim \text{Pa}(\alpha,\lambda + w).\]
The lognormal and Pareto distributions, in practice, provide a better fit to claim amounts than exponential and gamma distributions.
Other loss distribution are useful in practice including Burr, Weibull and loggamma distributions.
Example 2.4 Consider the data set in Example Example 3 and those bin boundaries,
Find the expected number of claims when the data are fitted with lognormal and Pareto distributions.
Plot two histograms for the data set with fitted lognormal distribution and the dataset with fitted Pareto distribution.
Comment on the goodness of fit of the fitted distributions.
The following code creates plots of loss distributions in R using ggplot2. See the following link for more information http://t-redactyl.io/blog/2016/03/creating-plots-in-r-using-ggplot2-part-9-function-plots.html
# Use ggplots to plot loss distributions
library(ggplot2)
ggplot(data.frame(x=c(0,10)), aes(x=x)) +
labs(y="Probability density", x = "x") +
ggtitle("Exponential distributions") +
theme(plot.title = element_text(hjust = 0.5)) +
stat_function(fun=dexp,geom ="line", args = (mean=0.5), aes(colour = "0.5")) +
stat_function(fun=dexp,geom ="line", args = (mean=1), aes(colour = "1")) +
stat_function(fun=dexp,geom ="line", args = (mean=1.5), aes(colour = "1.5")) +
stat_function(fun=dexp,geom ="line", args = (mean=2), aes(colour = "2")) +
#scale_colour_manual(expression(paste(lambda, "= ")), values = c("red", "blue", "green", "orange"))
scale_colour_manual(expression(paste("lambda = ")), values = c("red", "blue", "green", "orange"))
ggplot(data.frame(x=c(0,20)), aes(x=x)) +
labs(y="Probability density", x = "x") +
ggtitle("Gamma distribution") +
theme(plot.title = element_text(hjust = 0.5)) +
stat_function(fun=dgamma, args=list(shape=2, rate=1), aes(colour = "2")) +
stat_function(fun=dgamma, args=list(shape=6, rate=1) , aes(colour = "6")) +
scale_colour_manual(expression(paste("rate = 1 and shape = ")), values = c("red", "blue"))
ggplot(data.frame(x=c(0,10)), aes(x=x)) +
labs(y="Probability density", x = "x") +
ggtitle("lognormal distribution") +
theme(plot.title = element_text(hjust = 0.5)) +
stat_function(fun=dlnorm, args = list(meanlog = 0, sdlog = 0.25), aes(colour = "0.25")) +
stat_function(fun=dlnorm, args = list(meanlog = 0, sdlog = 1), aes(colour = "1")) +
scale_colour_manual(expression(paste("mu = 0 and sigma = ")), values = c("red", "blue"))
%\end{MyVerbatim}
The following code uses to obtain the results in Example Example 3.
#LectureNote_Example3_Loss_fitting_student_version
# by Pairote Satiracoo
# Version 1.04
# Date : 18/08/2020
# References(s)
# http://www.stat.yale.edu/Courses/1997-98/101/chigf.htm
# https://cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf
# https://www.unf.edu/~cwinton/html/cop4300/s09/class.notes/c3-GoodnessofFitTests.pdf
# https://bookdown.org/ekothe/navarro26/chisquare.html
# https://statisticsbyjim.com/hypothesis-testing/identify-distribution-data/
# http://spots.gru.edu/nsmith12/openstats/Chisquare_R.pdf
# We use MLE to estimate model parameters.
library(actuar)
library(stats)
library(MASS)
library(fitdistrplus)
set.seed(5353)
nsample <- 200
#data_gamma <- rgamma(nsample, shape =2, rate = 0.02)
data_pareto <- rpareto(nsample, shape =1.5, scale = 500)
#dataset1 <- data_gamma
dataset2 <- data_pareto
dataset <- dataset2
hist(dataset, breaks=100,probability = TRUE, xlab = "claim sizes"
, ylab = "density", main = paste("Histogram of claim sizes" ))
summary(dataset)
xbar <- mean(dataset)
var(dataset)
# sqrt(var(dataset))
s <- sd(dataset)
# Maximum-likelihood Fitting of Univariate Distributions
# fitgm <- fitdistr(dataset, dgamma, list(shape = 1, rate = 0.5), lower=0.001 )
# alpha_hat_gm <- fitgm$estimate[1]
# lambda_hat_gm <- fitgm$estimate[2]
#fitgm
#ks.test(data_gamma, "pgamma", shape = 2.1306319446, rate = 0.0209186022 )
#ks.test(data_gamma, "pgamma", shape = fitgm$estimate[1], rate = fitgm$estimate[2] )
#ks.test(data_gamma, "pgamma", fitgm$estimate[1],fitgm$estimate[2])
################################################################################
# Exponential: X ~ exp(lambda)
# Fit the data set with exponential distribution
dist = "exponential"
# MME is 1/xbar
1/mean(dataset) # rate parameter for exp dist, rate = 0.0003402187
# Plot histogram of claim sizes
hist(dataset,breaks=100,probability = TRUE, xlab = "claim sizes"
, ylab = "density", main = paste("Histogram of claim sizes with fitted", dist ,"distribution" ))
# Add a plot of the density of fitted exponential distribution
curve(dexp(x ,rate = 1/mean(dataset) ), add = TRUE, col = "blue", lwd = 2)
# density() computes kernel density estimates.
# Its default method does so with the given kernel and bandwidth for univariate observations.
lines(density(dataset), col = "red", lwd = 2)
legend(5000, 0.0015, legend=c("density()", "fitted exp dist"), lty = c(1,1), lwd = 2, col=c("red","blue"))
# Comparison of empirical distribution function (ecdf) and the cdf of the fitted distribution
plot(ecdf(dataset),
main="Compare ecdf with estimated cdf", xlab="claim sizes", lty=1)
curve(pexp(x, rate = 1/mean(dataset) ), add=TRUE, col = "blue", lwd = 2)
legend(10000, 0.8, legend=c("ecdf", "estimated cdf"), lty=1, col = c("black","blue"), lwd = 2)
# Calculate the boundaries for groups or bins so that
# the expected number of claims in each bin is 20 under the fitted exponential distribution.
#upbd (upper boundary of bins) is required in order to construct a grouped frequency
# of equi-probable groups determined by the fitted expo dist.
j = 0:9
upbd = qexp(j/10, 1/mean(dataset)) #1/mean(dataset) gives the parameter of exponential dist
out <- cut(dataset, breaks = upbd, dig.lab=5)
table(out)
# To fix the class interval, i.e. (the upbd when j = 9,infinity)
upbd[length(upbd)+1] = 1000000
upbd
out <- cut(dataset, breaks = upbd)
tab2_8 <- table(out)
cbind(tab2_8)
barplot(tab2_8,main="Claim sizes",las=2)
# Obtain E(Exp), the fitted claim sizes
eexp <- diff(200*pexp(upbd, rate = 1/mean(dataset)))
cbind(tab2_8,round(eexp))
ntab2_8 <- as.data.frame(cbind(tab2_8,round(eexp)))
# Change the header name ntab2_8
names(ntab2_8)[2] <- "EXP"
#summary of exponential fit using chisq.test function in R
chisq.test(x = tab2_8,
p = eexp/sum(eexp))
# Manually compute chi-square statistics
sum((tab2_8 - eexp)^2 /eexp) #chi-square
1 - pchisq(sum((tab2_8 - eexp)^2 /eexp), 8 ) #Use the same df as
#given in text. However, this contradict to the chi-squre test using chisq.test where df = 9 is used!
#The following command is not correct
#ks.test(unique(tab2_8), "pexp", rate = 0.0003402187 )
ks.test(dataset, "pexp", rate = 1/mean(dataset) )
##############################################################
# Gamma: X ~ gamma(alpha, lambda)
# MLE method
#\hat\alpha is the value of alpha which maximises the following log-likelihood
#expression:
# We minimize (-1)*la function
la <- function(a)
{-(nsample*a*(log(a) - log(mean(dataset)) -1) + sum(log(dataset))*(a - 1) - nsample*log(gamma(a)))}
##### Plot graph of la to approximate the minimum of la function
temp <- seq(0.1,5,by=0.1)
plot(temp,la(temp))
# nlm() is Non-Linear Minimization
# p is a starting parameter value for the minimization.
nlmout <- nlm(la, p = 1, hessian=TRUE)
# MLE
alpha_hat <- nlmout$estimate # gives \hat\alpha
lambda_hat <- nlmout$estimate/mean(dataset) # gives \hat\lambda
# Estimate the cumulative frequencies and then take the difference
# egam <- diff(nsample*pgamma(upbd,alpha_hat ,lambda_hat))
# MME method (However, we will use MLE for the remaining calculation)
alpha_tilde <- (xbar/s)^2
lambda_tilde <- alpha_tilde/xbar
# OR
# mean(dataset)^2/var(dataset) # gives \tilde\alpha
# mean(dataset)/var(dataset) # gives \tilde\lambda
# Estimate the cumulative frequencies and then take the difference
egam <- diff(nsample*pgamma(upbd,alpha_hat ,lambda_hat))
# Manually compute chi-square statistics
sum((tab2_8 - egam)^2 /egam)
1 - pchisq( sum((tab2_8 - egam)^2 /egam) , 7 ) # Use the same df as given in the text book. This contradicts with df used in the chi-square test
ks.test(dataset, "pgamma", shape = alpha_hat, rate = lambda_hat )
dist = "gamma"
# Figure 2.20 (left)
hist(dataset,breaks=100,probability = TRUE, xlab = "claim sizes"
, ylab = "density", main = paste("Histogram of claim sizes with fitted", dist ,"distribution" ))
curve(dexp(x ,rate = 1/mean(dataset) ), add = TRUE, col = "blue", lwd = 2)
curve(dgamma(x ,shape = alpha_hat ,rate = lambda_hat), add = TRUE, col = "green", lwd = 2)
legend(300, 0.005, legend=c("Exp", "Gamma"), lty = c(1,1), lwd = 2, col=c("blue","green"))
curve(dgamma(x ,shape = alpha_tilde ,rate = lambda_tilde), add = TRUE, col = "red", lwd = 2)
#lines(density(dataset), col = "red", lwd = 2)
#legend(25000, 2e-4, legend=c("density()", "fitdistr()"), lty = c(1,1), lwd = 2, col=c("red","blue"))
# Figure 2.20 (right)
plot(ecdf(dataset),
main="Compare ecdf with estimated cdf", xlab="claim sizes", lty=1)
curve(pgamma(x ,shape = alpha_hat ,rate = lambda_hat), add=TRUE, col = "green", lwd = 2)
legend(10000, 0.6, legend=c("ecdf", "estimated cdf"), lty=1 ,col = c("black","green"), lwd = 2)
cbind(tab2_8,round(eexp),round(egam,1))
##############################################################
# Lognormal: X ~ lognormal(mu,sigma^2)
# Check if the logged claim sizes have a normal distribution
logcs <- log(dataset)
summary(logcs)
require(moments)
skewness(logcs)
# The display shows that the logged claim
# sizes have a distribution which may be similar to a normal distribution
# but with a modest negative skew.
# The tail of the left side of the pdf is longer or fatter than the right side
# Figure 2.22 (left)
hist(logcs,breaks=100,probability = TRUE, xlab = "log(claim size)"
, ylab = "density", main = paste("Histogram of log(claim sizes)" ))
qqnorm(logcs, datax = TRUE)
qqline(logcs, datax = TRUE)
# MLE method
# we can find the MLEs of ? and ? directly
# from the logged data as the sample mean and standard deviation of the log(xi)
# Find MLE directly from dataset
mu_hat <- mean(logcs) # mu_hat
# Notice -1 in sigma_hat below
sqrt(sum((logcs- mu_hat)^2)/( length(logcs) -1 )) #sigma_hat
# or
sigma_hat <- sd(logcs)
# Using fitdistr
fitln <- fitdistr(dataset,"lognormal")
p1 <- fitln$estimate[1]
p2 <- fitln$estimate[2]
# MME method
sigma_tilda <- sqrt(log( var(dataset)/mean(dataset)^2 +1 )) # gives \tilde\sigma
mu_tilda <- log(mean(dataset)) - sigma_tilda^2/2 # gives \tilde\mu
elognm <- diff(nsample*plnorm(round(upbd), mean(log(dataset)), sd(log(dataset))))
# Replace elognm which are estimates from MME
#elognm <- diff(nsample*plnorm(round(upbd), mu_tilda, sigma_tilda))
cbind(tab2_8,round(eexp),round(egam,1),round(elognm,1))
# Manually compute chi-square statistics
sum((tab2_8 - elognm)^2 /elognm)
1 - pchisq(sum((tab2_8 - elognm)^2 /elognm) , 7 ) # Use the same df as given in the text book. This contradicts with df used in the chi-square test
ks.test(dataset, "plnorm", meanlog = mean(log(dataset)), sdlog = sd(log(dataset))
)
dist = "lognormal"
# Figure 2.23 (left)
hist(dataset,breaks=100,probability = TRUE, xlab = "claim sizes"
, ylab = "density", main = paste("Histogram of claim sizes with fitted", dist ,"distribution" ))
curve(dlnorm(x, mean(log(dataset)), sd(log(dataset))) , add = TRUE, col = "red", lwd = 2)
curve(dgamma(x ,shape = alpha_hat ,rate = lambda_hat), add = TRUE, col = "green", lwd = 2)
legend(200, 0.01, legend=c("Lognormal","Gamma"), lty = 1, lwd = 2, col= c("red","green"))
#lines(density(dataset), col = "red", lwd = 2)
#legend(25000, 2e-4, legend=c("density()", "fitdistr()"), lty = c(1,1), lwd = 2, col=c("red","blue"))
# Figure 2.20 (right)
plot(ecdf(dataset),
main="Compare ecdf with estimated cdf", xlab="claim sizes", lty=1)
curve(plnorm(x, mean(log(dataset)), sd(log(dataset))) , add=TRUE, col = "red", lwd = 2)
legend(20000, 0.8, legend=c("ecdf", "estimated cdf"), lty=1 ,col = c("black","green"), lwd = 2)
##############################################################
# Pareto: X ~ Pa(alpha, lambda)
# MME
alpha_tilde <- 2*var(dataset)/mean(dataset)^2 * 1/(var(dataset)/mean(dataset)^2 - 1) #/tilde/alpha
lambda_tilde <- mean(dataset)*(alpha_tilde -1)
# MLE
# The R function nlm is a minimisation procedure, so the negative of
# the log-likelihood function is declared (as a function of a vector x of length 2)
# as follows:
fp = function(x)
{-(nsample*log(x[1]) + nsample*x[1]*log(x[2]) - (x[1]+1)*sum(log(x[2]+dataset))) }
# Use the MME as the initial parameter for nonlinear maximization
nlmout <- nlm(fp,c(alpha_tilde,lambda_tilde))
alpha_hat <- nlmout$estimate[1] # gives \hat\alpha
lambda_hat <- nlmout$estimate[2] # gives \hat\lambda
# Using fitdistr
fitpareto<-fitdist(dataset,"pareto", start = list(shape=1,scale=500))
p1=fitpareto$estimate[1]
p2=fitpareto$estimate[2]
# Estimate the cumulative frequencies and then take the difference
#egam <- diff(nsample*pgamma(upbd,0.6893,0.0002345))
epareto <- diff(nsample*ppareto(upbd,alpha_hat ,lambda_hat))
cbind(tab2_8,round(eexp),round(egam,1),round(elognm,1), round(epareto,1))
# Manually compute chi-square statistics
sum((tab2_8 - round(epareto,1))^2 /round(epareto,1))
1 - pchisq(sum((tab2_8 - epareto)^2 /epareto) , 7 ) # Use the same df as given in the text book. This contradicts with df used in the chi-square test
ks.test(dataset, "ppareto", shape = alpha_hat, scale = lambda_hat)
dist = "pareto"
# Figure 2.24 (left)
hist(dataset,breaks=100,probability = TRUE, xlab = "claim sizes"
, ylab = "density", main = paste("Histogram of claim sizes with fitted", dist ,"distribution" ))
curve(dlnorm(x, mean(log(dataset)), sd(log(dataset))) , add = TRUE, col = "red", lwd = 2)
#curve(dgamma(x ,shape = alpha_hat ,rate = lambda_hat), add = TRUE, col = "green", lwd = 2)
curve(dpareto(x, shape = alpha_hat, scale = lambda_hat), add = TRUE, col = "yellow", lwd = 2)
legend(10000, 0.0015, legend=c("Pareto","lognormal"), lty = 1, lwd = 2, col= c("yellow","red"))
#lines(density(dataset), col = "red", lwd = 2)
#legend(25000, 2e-4, legend=c("density()", "fitdistr()"), lty = c(1,1), lwd = 2, col=c("red","blue"))
# Figure 2.24 (right)
plot(ecdf(dataset),
main="Compare ecdf with estimated cdf", xlab="claim sizes", lty=1)
curve(ppareto(x, shape = alpha_hat, scale = lambda_hat) , add=TRUE, col = "yellow", lwd = 2)
legend(20000, 0.8, legend=c("ecdf", "estimated cdf"), lty=1 ,col = c("black","yellow"), lwd = 2)
##############################################################
%\end{MyVerbatim}


I couldn't believe I had this opportunity. I was about to attend an ayahuasca 'ritual' in the comfort of my own hometown, New Orleans. I had wanted experience the 'vine of the soul' for some time, but never dreamed I would get the opportunity without trekking to Brazil or Peru. As luck would have it, a friend informed me of a Peruvian shaman visiting the city and conducting an ayahuasca ritual. I jumped at the chance.
The mixture was pre-prepared by the shaman and was administered to about 10 of us in a circle, in the privacy of a huge, old New Orleans shotgun home. It was poured into a glass, about a typical shot, maybe a little more.
After ingesting it I was very anxious for it to take effect. After about an hour it finally did, but not what I had hoped for. I basically just just experienced extreme nause for about 5 to 6 hours and vomitted. No real hallucinegenic effects. That was the general consensus of the group. I'm not sure why it didn't kick in but maybe thats the way it works.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Salammon Cookies
Home
Sales
Add A New Store
Location:
Minimum Customer Number:
Maximum Customer Number:
Avarage Sales Per Hour:


Created by Fernando Bass / @fer_bass
TODO - short and simple description :P
We have two ways when we talk about API, theses ways are called Client-Side and Server-Side
Client side API is basically a JavaScript binding to functionality within a web browser
<script src="http://maps.googleapis.com/maps/api/js?client=YOUR_CLIENT_ID&sensor=true_or_false&v=3.12"></script>
A server-side web API is a programmatic interface to a defined request-response message system, typically expressed in:
When we talk about server side api or web services, we have two types most used
Talks about REST, you can do it :D
Assuming REST a pattern for this presentation
lets stop the bullshitting and start to talk about API Design
Keep your base URL simple and intuitive
DON'T USE VERBS IN YOUR BASE URL


"Let's Work Together"
I’m a Coffee Lover, Project Manager, IT Business Analyst, ERP Consultant (odoo), Web Developer (wordpress) in love with photography, and Content Creative.
Have fun, and play with odoo (12,14,16)
Build a Super Power Team.
Identifying and gathering of your business requirements.
Provide mapping requirements and software solutions.
Provides the best solutions in odoo.
Implementing odoo by analyzing the requirements.
Develop and implement Technical Specifications.
Perform Unit Test and Integration.
Control project status, budget, and team work.
Lead the Team to achieve the project timeline goals.
Provide advice, business analysis to the team, to meet client needs from the requirements they provide.
With the Supervisor help the Manager to make IT Planing each year based on the results of the analysis and evaluation in the previous year.
Analyze and evaluate network requirements, as well as design network architecture, integration and installation (Mikrotik and Cisco).
Analyzing and evaluating the requirements of the application system then planning and designing in making the application needs of the user (VB.net & PHP).
Ensuring data security, network access (from hackers & viruses), and system backup (end user database and data files).
Creating IT policies for internal control.
Server Administrator (Microsoft Server, Linux ubuntu & Citrix Virtualization).
Update company profile website design.
Develop web application.
Support hardware, software, and networking.
Develop desktop application.
Leadership And Management
Data And Business Analyst
Quality Management
Networking
Programming
Design (PS)
Odoo
With Clients
Need More Coffee
Experience
Reading
Photography
Running
Music
Camping in nature


{% extends 'shared/_layout.html' %} {% block content %}
Find job posts that sit as close to the middle of each cluster as possible


@alistairmilne Plebeian: "Can I run up $25k of credit card debt on Amazon and pay $400 a month in interest?"
Bank: "Yes, it's your money. We here here to facilitate transactions."
Plebeian: "Can i buy $500 worth of Bitcoin?"
Bank: "No, we are here to protect you."


This page provides a wide variety of templates for flexagons that support flexes composed of "half flexes". The half flexes that work on a wide variety of flexagons are the front Hf, back Hb, right Hr, left Hl, front shuffle Hfs, and back shuffle Hbs. The half flexes that are just defined for the hexaflexagon are the half half Hh and half tuck Ht. Definitions for all these half flexes can be found on the atomic flexes page.
It includes the following options:
Decomposition of HaHb' into flexes that are prime on a hexaflexagon.
F = Hf Hb' = ^Hb Hf'^ >T = Hr Hf' = Hl Hbs' = ^Hr Hfs'^ = ^Hl Hb'^ >T <S = Hr Hbs' = ^Hl Hfs'^ >T ^>>S = Hl Hf' = ^Hr Hb'^ <<T ^>>F >>T' = Hr Hl' = ^Hl Hr'^ >T' = Hf Hr' = Hbs Hl' = ^Hb Hl'^ = ^Hfs Hr'^ >T' ^>>T = Hf Hfs' = Hbs Hb' = ^Hb Hbs'^ = ^Hfs Hf'^ >T' ^>>T <S = Hbs Hfs' = ^Hfs Hbs'^ S = Hf Hbs' = <Hfs Hb'> = ^Hb Hfs'^ = <^Hbs Hf'^> S >T' = Hf Hl' = ^Hb Hr'^ >S ^>>T' = Hfs Hl' = ^Hbs Hr'^ # including hexaflexagon specific flexes P = <^Hf Ht' = <Hb >>>Ht' = ^Hb >>>Hf' ~= <^Hbs Hh' >P ^>T = ^Hbs Ht' = Hfs >>>Ht' P >>V = Hf Hh' = <Hfs >>>Hf' V = Hb Hh' = <<Hl >>>Ht' = <<^Hr Ht' = <<^Hl Hh' ~= Hfs Ht' ~= ^Hbs >>>Ht' V T = Hb Ht' = ^Hf >>>Ht' >>V ^>>T = ^Hl Ht' = Hr >>>Ht' V T' = Hfs Hh' ^>>V ^>>T' = Hr Hh' >>V P = Hl >>>Hf' ^V ^P = Hbs >>>Hf' >>V >V = Hr >>>Hf' ^V ^>>>V = Hf >>>Hf'
Decomposition of slot flexes (Ha Lkk Hb') into flexes that are prime on a hexaflexagon.
Ltf = Hf Lkk Hf' = Hbs Lkk Hbs' = < Hb Lkk Hb' > = < Hfs Lkk Hfs' > >Ltf ^>T' = Hb Lkk Hl' = Hfs Lkk Hr' >Ltf ^S = Hb Lkk Hfs' = < Hbs Lkk Hf' > >Ltf ^S >T' = Hb Lkk Hr' >Ltf ^F = Hb Lkk Hf' >Ltf >F >Ltf = Hb Lkk Hbs' = Hfs Lkk Hf' ^>>T' ^>>T = Hf Lkk Hb' >T <Ltf = Hr Lkk Hf' = Hl Lkk Hbs' >T <Ltf ^S = Hl Lkk Hf' >T <S Ltf = Hr Lkk Hbs' >T ^>>S F = Hl Lkk Hfs' >T ^>>S F >>T' = Hl Lkk Hr' >T <S ^>F >>T' = Hr Lkk Hl' >T ^>>F = Hr Lkk Hfs' = Hl Lkk Hb' >T ^>>F >>T' = Hr Lkk Hr' = Hl Lkk Hl' >T ^>>F ^S = Hr Lkk Hb' ^>F >>T' = Hf Lkk Hr' = Hbs Lkk Hl' S Ltf = Hf Lkk Hbs' = < Hfs Lkk Hb' > >S Ltf ^>T' = Hfs Lkk Hl' >S Ltf >F >Ltf = Hfs Lkk Hbs' ^>S F = Hbs Lkk Hfs' S ^>F >>T' = Hf Lkk Hl' ^>S F >>T' = Hbs Lkk Hr' ^>F = Hf Lkk Hfs' = Hbs Lkk Hb' # including hexaflexagon specific flexes Ltb = Hf Lkk Ht' = Hbs Lkk Hh' = < Hb Lkk >>>Hf' > Ltb T = Hbs Lkk Ht' Ltb T' = Hf Lkk Hh' = < Hfs Lkk >>>Hf' > <V = Hf Lkk >>>Hf' <V ^P = Hf Lkk >>>Ht' <V T = Hbs Lkk >>>Hf' <V ^>>>V = Hbs Lkk >>>Ht' >Ltf V = Hb Lkk Hh' = Hfs Lkk Ht' >Ltf >P = Hb Lkk >>>Ht' >T <Ltb = Hr Lkk Ht' = Hl Lkk Hh' >T <Ltb T = Hl Lkk Ht' >T <Ltb T' = Hr Lkk Hh' >T <<V = Hr Lkk >>>Hf' >T <<V ^P = Hr Lkk >>>Ht' >T <<V T = Hl Lkk >>>Hf' >T <<V ^>>>V = Hl Lkk >>>Ht' >S Ltf V = Hfs Lkk Hh' >S Ltf >P = Hfs Lkk >>>Ht' ^F ^Ltb = Hb Lkk Ht'
pick flexes: pick flexagon:


API Integration in your Jamstack
What's all this?
- Remember JAMStack?
- Remember Static Site Generators?
- The A is for API
- Other services that enable/enhance my site
Gameplan
- Using APIs in Client-Side JavaScript
- Using API Proxies
- Using APIs in the Build Process
- Generating an "API"
- Error mitigation
APIs on the Client
- Just regular HTTP calls from JavaScript
- To be clear - NOT SPECIFIC TO JAMSTACK
- A simple way to add in awesomeness!
- "Just works" (mostly...)
Demo
APIs on the Client - Cons
- CORS
- Anonymous access
- Can't modify data (kinda)
API Proxies
- Fancy way of saying a midpoint between your client-side code and the API
- Serverless is a great use case
- You can hide keys
- You can shape the result
- You can switch providers
- You can add caching
Demo
API Proxies - Cons
- You have to write code (maybe)
- You may need yet another service
APIs in the Build Process
Using the Build Process
- What happens when your site is generated
- A URL trigger/A GitHub commit/etc
- Well suited for dynamic data not changing "often"
- Options depend on platform and static site generator
Demo
Using the Build Process - Cons
Genrating an "API"
- A serverless endpoint can do anything
- Generating computer-readable output
- JSON, XML, HTML, plain text
- A read-only API
Genrating an "API" - Cons
Error Mitigation
- The First Part - Your Code
- The Second Part - What next?
Questions
reach me at @raymondcamden


CANOpen SDOs are frames used to configure slave devices. It is possible to generate registry per registry.
To read the SDO registry fill the values in Read - Request section and than trigger the commit channel. The red values will appear in the Read - Response section including the status channel.
Analogically for write.


| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Zsh Manual, like the shell itself, is large and often complicated. This section of the manual provides some pointers to areas of the shell that are likely to be of particular interest to new users, and indicates where in the rest of the manual the documentation is to be found.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When it starts, the shell reads commands from various files. These can be created or edited to customize the shell. See Files.
If no personal initialization files exist for the current user, a function is run to help you change some of the most common settings. It won’t appear if your administrator has disabled the zsh/newuser module. The function is designed to be self-explanatory. You can run it by hand with ‘autoload -Uz zsh-newuser-install; zsh-newuser-install -f’. See also User Configuration Functions.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Interaction with the shell uses the builtin Zsh Line Editor, ZLE. This is described in detail in Zsh Line Editor.
The first decision a user must make is whether to use the Emacs or Vi editing mode as the keys for editing are substantially different. Emacs editing mode is probably more natural for beginners and can be selected explicitly with the command bindkey -e.
A history mechanism for retrieving previously typed lines (most simply with the Up or Down arrow keys) is available; note that, unlike other shells, zsh will not save these lines when the shell exits unless you set appropriate variables, and the number of history lines retained by default is quite small (30 lines). See the description of the shell variables (referred to in the documentation as parameters) HISTFILE, HISTSIZE and SAVEHIST in Parameters Used By The Shell. Note that it’s currently only possible to read and write files saving history when the shell is interactive, i.e. it does not work from scripts.
The shell now supports the UTF-8 character set (and also others if supported by the operating system). This is (mostly) handled transparently by the shell, but the degree of support in terminal emulators is variable. There is some discussion of this in the shell FAQ, http://www.zsh.org/FAQ/. Note in particular that for combining characters to be handled the option COMBINING_CHARS needs to be set. Because the shell is now more sensitive to the definition of the character set, note that if you are upgrading from an older version of the shell you should ensure that the appropriate variable, either LANG (to affect all aspects of the shell’s operation) or LC_CTYPE (to affect only the handling of character sets) is set to an appropriate value. This is true even if you are using a single-byte character set including extensions of ASCII such as ISO-8859-1 or ISO-8859-15. See the description of LC_CTYPE in Parameters.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Completion is a feature present in many shells. It allows the user to type only a part (usually the prefix) of a word and have the shell fill in the rest. The completion system in zsh is programmable. For example, the shell can be set to complete email addresses in arguments to the mail command from your ~/.abook/addressbook; usernames, hostnames, and even remote paths in arguments to scp, and so on. Anything that can be written in or glued together with zsh can be the source of what the line editor offers as possible completions.
Zsh has two completion systems, an old, so called compctl completion (named after the builtin command that serves as its complete and only user interface), and a new one, referred to as compsys, organized as library of builtin and user-defined functions. The two systems differ in their interface for specifying the completion behavior. The new system is more customizable and is supplied with completions for many commonly used commands; it is therefore to be preferred.
The completion system must be enabled explicitly when the shell starts. For more information see Completion System.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Apart from completion, the line editor is highly extensible by means of shell functions. Some useful functions are provided with the shell; they provide facilities such as:
composing characters not found on the keyboard
configuring what the line editor considers a word when moving or deleting by word
alternative ways of searching the shell history
functions for replacing strings or patterns globally in the command line
edit the command line with an external editor.
See ZLE Functions for descriptions of these.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The shell has a large number of options for changing its behaviour. These cover all aspects of the shell; browsing the full documentation is the only good way to become acquainted with the many possibilities. See Options.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The shell has a rich set of patterns which are available for file matching (described in the documentation as ‘filename generation’ and also known for historical reasons as ‘globbing’) and for use when programming. These are described in Filename Generation.
Of particular interest are the following patterns that are not commonly supported by other systems of pattern matching:
for matching over multiple directories
for matching either of two alternatives
the ability to exclude patterns from matching when the EXTENDED_GLOB option is set
glob qualifiers, included in parentheses at the end of the pattern, which select files by type (such as directories) or attribute (such as size).
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Although the syntax of zsh is in ways similar to the Korn shell, and therefore more remotely to the original UNIX shell, the Bourne shell, its default behaviour does not entirely correspond to those shells. General shell syntax is introduced in Shell Grammar.
One commonly encountered difference is that variables substituted onto the command line are not split into words. See the description of the shell option SH_WORD_SPLIT in Parameter Expansion. In zsh, you can either explicitly request the splitting (e.g. ${=foo}) or use an array when you want a variable to expand to more than one word. See Array Parameters.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The most convenient way of adding enhancements to the shell is typically by writing a shell function and arranging for it to be autoloaded. Functions are described in Functions. Users changing from the C shell and its relatives should notice that aliases are less used in zsh as they don’t perform argument substitution, only simple text replacement.
A few general functions, other than those for the line editor described above, are provided with the shell and are described in User Contributions. Features include:
a prompt theme system for changing prompts easily, see Prompt Themes
a MIME-handling system which dispatches commands according to the suffix of a file as done by graphical file managers
a calculator
a version of xargs that makes the find command redundant
a command for renaming files by means of shell patterns.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 26, 2019 using texi2html 5.0.
Zsh version 5.7.1, released on February 3, 2019.


DataTable-Editable - Example #4
ColumnDefs options with array-based datatable rows
You can specify tags other than input with the columnDefs option.
In this table, enter in the select box in the Office column and in the text box in the Remark column.


Contains the implementation of {@link org.greencheek.processio.service.persistence.ProcessIOUsagePersistence} that stores the current process's io into jmx.


Understand key strategies & find the right entrance for your business.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Morbi non mauris massa. Duis elit mauris, malesuada nec suscipit ac, bibendum sed augue.
Fire-proof by nature because an app just doesn't burn.


This is the list of people participating in the Semantic Web Health Care and Life Sciences Interest Group (see the list with only people in good standing).
Status:
Resort the list: by name | by Member organization | by standing.
Send email to AC Reps of participating Members.
W3C staff and chairs can edit this group.
Note that a given user can edit his/her personal data using the profile editor.


Argument
public struct Argument
Represents an argument encountered by an ArgumentParser
while parsing
CommandLineArguments
.
-
The first word of the argument, as it appeared on the command line.
Declaration
Swift
public let argument: String
-
Any values associated with the argument.
Declaration
Swift
public let values: [String]
-
The declaration associated with the argument, or
nil
if the argument was not explicitly declared.Declaration
Swift
public let declaration: ArgumentDeclaration?
-
The declared name of the argument, or
nil
if the argument was not explicitly declared.Declaration
Swift
public var declaredName: String?
-
The name of the argument. For declared arguments, this is the same as the
declaredName
property; otherwise, it is the same as theargument
property.Declaration
Swift
public var name: String


Sorry, no one publish slides yet! Would you want to be the pioneer? Create Now
Opps, no result for these key words


Each of us have a few things in common – one being that we were all babies. Babies are such interesting little creatures. While we goo and gaga at their cuteness, there are somethings that you may not know that are actually quite fascinating!
Your child is advancing from infancy toward and into the preschool years. During this time, his physical growth and motor development will slow, but you can expect to see some tremendous intellectual, social, and emotional changes
A child of 3 or 4 is considered a preschooler.  Preschoolers are different from toddlers in that they are developing the basic life skills, independence, and knowledge that they will need as they enter their school years..


Advanced AI Week1 notes
Goal of Artificial General Intelligence (AGI):
Build general-purpose Super-Intelligences
HOW???
–> Build system by trail & error (Artificial Approach)
–> Mimic human behavior (Natural Approach) (Not covered in this course)
So we need THEORIES to guide us.
For Artificial Approach:
- AI system includes:
- Logic/language based
- Economics inspired
- Cybernetics
- Machine Learning
- Information processing
Intelligence does not have a formal definition yet.
Humanly Thinking: Cognitive Science Humanly Acting: Turing test, Behaviorism Rationally Thinking: Laws Thought Rationally Acting: Doing the Right Thing (the topic we discuss)
Decision Theory = Probability + Utility Theory
Uncertain world, environmental probability distribution is known.
Universal Induction = Ockham + Bayes + Turing
Sequence prediction for unknown prior distribution.
AI = Decision Theory + Universal Induction
UAI covers all Reinforcement Learning(RL) problem types
–> Statistical Machine Learning:
Mostly independent and identically distributed(i.i.d.) data classification, regression, clustering
–> RL Problems & Algorithms:
Stochastic, unknown, non-i.i.d. environments
–> Artificial Intelligence:
Traditionally deterministic, known world/planning problem
Informal Definition of Intelligence:
Intelligence measures an agent’s ability to achieve goals in a wide range of environments.
Induting a model of the environment –> Make predictions –> Make a decision –> Do the next action
Induction:
Occam’s razor: Take simplest hypothesis consistent with data.
Then how to quantify “simplicity”?
Description Length!
–> Shortest description of object is best explanation.
Shortest description = Shortest prgram for a string on a Turing Machines T –> Best extrapolation = Prediction
\[K_T(x) = \min_{p}\{\ell(p) : T(p) = x\}\]Kolmogorov-complexity(x):
\(K(x) = K_U(x) \leq K_T(x) + c_T\)
However, K(x) is uncomputable and p can not be easily found.
So we need to have prior for each possible p. That is why we introduce Bayes’ rule here.
Bayes’ rule:
\(P(H_i | D) = \cfrac{P(D|H_i) \cdot P(H_i)}{\sum_{i}P(D|H_i) \cdot P(H_i)}\)
$P(H_i)$ is prior probability.
$P(H_i|D)$ is posterior probability.
$P(D | H_i)$ is easy to describe.
But we do not know how to choose $P(H_i)$.
Epicurus: If more than one theory is consistent with the observations, keep all theories.
So we refine Occam’s razor with Kolmogorov complexity:
\(P(H_i) := 2^{-K_{T/U}(H_i)}\)
But if we use T, we do not know how to choose T.
If we use U, it is incomputable.
Solomonoff combined Occam, Epicurus, Bayes and Turing. –> Theory of sequential prediction
$M(x)$ = P(UTM outputs x when input is random)
$M(y|x) = M(xy)/M(x)$
The Minimum Description Length Principle
$y$ of highest $M(y|x)$ = $y$ of smallest $K_T(xy)$.
$x$ similar to $y$ –> $K(x|y) := \min \{\ell(p) : U(p,y) = x\}$