version = open('../version.txt').read().strip('+') base = "http://pypi.python.org/packages/source/a/aspen/aspen-" extensions = (('.tar.bz2', 'tbz'), ('.tar.gz', 'tgz'), ('.zip', 'zip')) {% extends base.html %} {% block head %} {% end %} {% block content %}
|
0.8
A noble past.
|
{{ version }}
Development snapshot. |
1.0
A glorious, |
.aspen—The .aspen
hidden
directory in your website root is your site’s junk drawer.
aspen.conf—Aspen can be configured via an aspen.conf file.
Colon Notation—Some aspen configuration files look for Python objects based on this notation.
Concurrency—Aspen supports both blocking and non-blocking concurrency models.
Command Line Interface—Learn how to drive the
aspen
console program.
Github—Aspen development is hosted on Github.
Hooks—Influence program execution on server startup and shutdown, and inbound and outbound HTTP.
IRC—The #aspen IRC channel is on Freenode. Here’s a web client and logs.
Mailing List—The mailing list is on Google Groups.
Marketing—Here is a collection of promotional materials for Aspen.
MongoDB—This HOWTO demonstrates connecting to databases inside simplates.
Page Break—Aspen uses the ASCII page break character to great effect.
PyPI—Aspen has an entry in the Python Package Index.
Quick Start—Install Aspen and start serving a basic website. Greetings, program!
Request—See Aspen’s Request object API.
Response—See Aspen’s Response object API.
Simplates—Simplates are Aspen's main attraction. Learn what they are and the basics of working with them.
Templating—Aspen uses Tornado templates for the template page of a simplate.
Thrash—For development, Aspen can be configured to die when important files change. Thrash is a utility to restart it.
Virtual Paths—Aspen translates URL
paths like /wawa/foo.html
to filesystem paths like
./%name/foo.html
.


This very small marina is located between Mangalia and Constanta, in the Eforie Nord resort, open only in summer.
Position 44°03.82'N, 28°38.5'E.
This is not an official Port of Entry.
Eforie Nord Marina (photo from Ioan Cobzarenco)
The entrance is silted every winter and occasionally even in summer after a strong wind. It needs to be dredged frequently in order to keep a fair depth. Prior to entry, you have to check the depth and position of the entrance channel with the marina office.
The approach must not be done when a swell is running. Be especially cautious in southerly winds and swell.
The small marina here is part of a resort hotel complex and has good security, but shelter is somewhat lacking. The swell inside of marina is very strong when the wind blows from the south-east.
Some of the surrounding hotels play very loud music well into the small hours of the morning, making sleep a veritable challenge at times.
Fuel is not available in any marina in Romania. You have to come prepared with jerry cans and manage their transport by taxi.
In town is good for groceries and supplies. There is an ATM at the hotel next to the marina and other services can be arranged with the marina office.
Last updated October 2015.
There is a yacht club at the resort.


I am using the trapezium rule to approximate an integral, i want to output the data to a txt file so i can plot it elsewhere can anyone help me with this?
#include <iostream>
#include <cmath>
#include <fstream>
usingnamespace std ;
double func ( double x ) {
double y ;
y= exp(-x)*sin (x);
return y ;
}
int main () {
int n ; // n is the number of steps for the trapeziums
double a ;
double b;
double x0=0.0;
double x1=2.0;
int steps;
double h=(x1-x0)/steps;
double tmpA;
double A=0.0;
for ( int n=1 ; n<=steps ; n++ ) {
a= x0+ (n-1)*h;
b= a+h;
tmpA=h/2.0*(func(a) + func(b));
A=A+tmpA;
printf("%i: steps a=%f, b=%f\n",n, a,b);
}
printf("Result for %i steps: %f\n",steps,A) ;
///if your results are produced in the loop i guess
for ( int n=1 ; n<=steps ; n++ ) {
a= x0+ (n-1)*h;
b= a+h;
tmpA=h/2.0*(func(a) + func(b));
A=A+tmpA;
printf("%i: steps a=%f, b=%f\n",n, a,b);
you can add an output stream to write to your file.
ofstream out("result.txt");///result.txt will be created automatically by program
/// then include the variable in your loop to write whatever results you currently have
for ( int n=1 ; n<=steps ; n++ )
{
a= x0+ (n-1)*h;
b= a+h;
tmpA=h/2.0*(func(a) + func(b));
A=A+tmpA;
///e.g
out<</*the variable containing the results*/<<" ";
}
out.close();
printf("%i: steps a=%f, b=%f\n",n, a,b);/// this dont seem to be in main /// correct that
}
/****************************************************************/
int steps; /// error 2: this variable is not intialized it contains garbage.
double h=(x1-x0)/steps;/// note you have used the wrong thing here to intialize h.


public abstract class OSCTransmitter extends java.lang.Object implements OSCChannel
DatagramChannel
(for UDP) or SocketChannel
(for TCP),
or internally opened when a protocol type is specified.
Messages are send by invoking one
of the send
methods. For an example,
please refer to the OSCReceiver
document.
Note that as of v0.3, you will most likely want to use preferably one of OSCClient
or OSCServer
over OSCTransmitter
. Also note that as of v0.3, OSCTransmitter
is abstract, which
renders direct instantiation impossible. To update old code, occurences of new OSCTransmitter()
must be replaced by one of the OSCTransmitter.newUsing
methods!
OSCClient
,
OSCServer
,
OSCReceiver
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allocBuf |
protected java.nio.ByteBuffer |
byteBuf |
protected int |
dumpMode |
protected java.net.InetSocketAddress |
localAddress |
protected java.io.PrintStream |
printStream |
protected boolean |
revivable |
protected java.lang.Object |
sync |
protected java.net.SocketAddress |
target |
DEFAULTBUFSIZE, kDumpBoth, kDumpHex, kDumpOff, kDumpText, TCP, UDP
| Modifier | Constructor and Description |
|---|---|
protected |
OSCTransmitter(OSCPacketCodec c,
java.lang.String protocol,
java.net.InetSocketAddress localAddress,
boolean revivable) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkBuffer() |
abstract void |
connect()
Establishes connection for transports requiring
connectivity (e.g.
|
void |
dispose()
Disposes the resources associated with the OSC communicator.
|
void |
dumpOSC(int mode,
java.io.PrintStream stream)
Changes the way processed OSC messages are printed to the standard err console.
|
int |
getBufferSize()
Queries the buffer size used for coding or decoding OSC messages.
|
protected abstract java.nio.channels.SelectableChannel |
getChannel() |
OSCPacketCodec |
getCodec()
Queries the codec used in packet coding and decoding.
|
abstract java.net.InetSocketAddress |
getLocalAddress()
Queries the transmitter's local socket address.
|
protected java.net.InetSocketAddress |
getLocalAddress(java.net.InetAddress addr,
int port) |
java.lang.String |
getProtocol()
Queries the transport protocol used by this communicator.
|
abstract boolean |
isConnected()
Queries the connection state of the transmitter.
|
static OSCTransmitter |
newUsing(java.nio.channels.DatagramChannel dch)
Creates a new instance of an
OSCTransmitter , using
default codec and UDP transport on a given channel. |
static OSCTransmitter |
newUsing(OSCPacketCodec c,
java.nio.channels.DatagramChannel dch)
Creates a new instance of an
OSCTransmitter , using
a specific codec and UDP transport on a given channel. |
static OSCTransmitter |
newUsing(OSCPacketCodec c,
java.nio.channels.SocketChannel sch)
Creates a new instance of an
OSCTransmitter , using
a specific codec and TCP transport on a given channel. |
static OSCTransmitter |
newUsing(OSCPacketCodec c,
java.lang.String protocol)
Creates a new instance of an
OSCTransmitter , using
a specific codec and transport protocol. |
static OSCTransmitter |
newUsing(OSCPacketCodec c,
java.lang.String protocol,
java.net.InetSocketAddress localAddress)
Creates a new instance of an
OSCTransmitter , using
a specific codec and transport protocol and local socket address. |
static OSCTransmitter |
newUsing(OSCPacketCodec c,
java.lang.String protocol,
int port)
Creates a new instance of an
OSCTransmitter , using
a specific codec and transport protocol and port. |
static OSCTransmitter |
newUsing(OSCPacketCodec c,
java.lang.String protocol,
int port,
boolean loopBack)
Creates a new instance of an
OSCTransmitter , using
a specific codec and transport protocol and port. |
static OSCTransmitter |
newUsing(java.nio.channels.SocketChannel sch)
Creates a new instance of an
OSCTransmitter , using
default codec and TCP transport on a given channel. |
static OSCTransmitter |
newUsing(java.lang.String protocol)
Creates a new instance of an
OSCTransmitter , using
default codec and a specific transport protocol. |
static OSCTransmitter |
newUsing(java.lang.String protocol,
java.net.InetSocketAddress localAddress)
Creates a new instance of an
OSCTransmitter , using
default codec and a specific transport protocol and local socket address. |
static OSCTransmitter |
newUsing(java.lang.String protocol,
int port)
Creates a new instance of an
OSCTransmitter , using
default codec and a specific transport protocol and port. |
static OSCTransmitter |
newUsing(java.lang.String protocol,
int port,
boolean loopBack)
Creates a new instance of an
OSCTransmitter , using
default codec and a specific transport protocol and port. |
void |
send(OSCPacket p)
Sends an OSC packet (bundle or message) to the default
network address, using the current codec.
|
abstract void |
send(OSCPacketCodec c,
OSCPacket p)
Sends an OSC packet (bundle or message) to the default
network address, using a particular codec.
|
abstract void |
send(OSCPacketCodec c,
OSCPacket p,
java.net.SocketAddress target)
Sends an OSC packet (bundle or message) to the given
network address, using a particular codec.
|
void |
send(OSCPacket p,
java.net.SocketAddress target)
Sends an OSC packet (bundle or message) to the given
network address, using the current codec.
|
void |
setBufferSize(int size)
Adjusts the buffer size for OSC messages.
|
void |
setCodec(OSCPacketCodec c)
Specifies which codec is used in packet coding and decoding.
|
void |
setTarget(java.net.SocketAddress target)
Specifies the transmitter's target address, that is the address of the remote side to talk to.
|
protected final java.lang.Object sync
protected boolean allocBuf
protected java.nio.ByteBuffer byteBuf
protected int dumpMode
protected java.io.PrintStream printStream
protected java.net.SocketAddress target
protected final java.net.InetSocketAddress localAddress
protected final boolean revivable
protected OSCTransmitter(OSCPacketCodec c, java.lang.String protocol, java.net.InetSocketAddress localAddress, boolean revivable)
public static OSCTransmitter newUsing(java.lang.String protocol) throws java.io.IOException
OSCTransmitter
, using
default codec and a specific transport protocol. It picks an arbitrary free port
and uses the local machine's IP. To determine the resulting
port, you can use getLocalAddress
afterwards.protocol
- the protocol to use, currently either UDP
or TCP
java.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedOSCChannel.UDP
,
OSCChannel.TCP
,
getLocalAddress()
public static OSCTransmitter newUsing(OSCPacketCodec c, java.lang.String protocol) throws java.io.IOException
OSCTransmitter
, using
a specific codec and transport protocol. It picks an arbitrary free port
and uses the local machine's IP. To determine the resulting
port, you can use getLocalAddress
afterwards.c
- the codec to useprotocol
- the protocol to use, currently either UDP
or TCP
java.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedOSCChannel.UDP
,
OSCChannel.TCP
,
getLocalAddress()
public static OSCTransmitter newUsing(java.lang.String protocol, int port) throws java.io.IOException
OSCTransmitter
, using
default codec and a specific transport protocol and port. It
uses the local machine's IP. Note that the port
specifies the
local socket, not the remote (or target) port. This can be set
using the setTarget
method!protocol
- the protocol to use, currently either UDP
or TCP
port
- the port number for the OSC socket, or 0
to use an arbitrary free portjava.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedpublic static OSCTransmitter newUsing(OSCPacketCodec c, java.lang.String protocol, int port) throws java.io.IOException
OSCTransmitter
, using
a specific codec and transport protocol and port. It
uses the local machine's IP. Note that the port
specifies the
local socket, not the remote (or target) port. This can be set
using the setTarget
method!c
- the codec to useprotocol
- the protocol to use, currently either UDP
or TCP
port
- the port number for the OSC socket, or 0
to use an arbitrary free portjava.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedpublic static OSCTransmitter newUsing(java.lang.String protocol, int port, boolean loopBack) throws java.io.IOException
OSCTransmitter
, using
default codec and a specific transport protocol and port. It
uses the local machine's IP or the "loopback" address.
Note that the port
specifies the
local socket, not the remote (or target) port. This can be set
using the setTarget
method!protocol
- the protocol to use, currently either UDP
or TCP
port
- the port number for the OSC socket, or 0
to use an arbitrary free portloopBack
- if true
, the "loopback" address ("<IP_ADDRESS>"
)
is used which limits communication to the local machine. If false
, the
special IP "<IP_ADDRESS>"
is used which means any local host is pickedjava.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedpublic static OSCTransmitter newUsing(OSCPacketCodec c, java.lang.String protocol, int port, boolean loopBack) throws java.io.IOException
OSCTransmitter
, using
a specific codec and transport protocol and port. It
uses the local machine's IP or the "loopback" address.
Note that the port
specifies the
local socket, not the remote (or target) port. This can be set
using the setTarget
method!c
- the codec to useprotocol
- the protocol to use, currently either UDP
or TCP
port
- the port number for the OSC socket, or 0
to use an arbitrary free portloopBack
- if true
, the "loopback" address ("<IP_ADDRESS>"
)
is used which limits communication to the local machine. If false
, the
special IP "<IP_ADDRESS>"
is used which means any local host is pickedjava.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedpublic static OSCTransmitter newUsing(java.lang.String protocol, java.net.InetSocketAddress localAddress) throws java.io.IOException
OSCTransmitter
, using
default codec and a specific transport protocol and local socket address.
Note that localAddress
specifies the
local socket, not the remote (or target) socket. This can be set
using the setTarget
method!protocol
- the protocol to use, currently either UDP
or TCP
localAddress
- a valid address to use for the OSC socket. If the port is 0
,
an arbitrary free port is picked when the transmitter is connected. (you can find out
the actual port in this case by calling getLocalAddress()
after the
transmitter was connected).java.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedpublic static OSCTransmitter newUsing(OSCPacketCodec c, java.lang.String protocol, java.net.InetSocketAddress localAddress) throws java.io.IOException
OSCTransmitter
, using
a specific codec and transport protocol and local socket address.
Note that localAddress
specifies the
local socket, not the remote (or target) socket. This can be set
using the setTarget
method!c
- the codec to useprotocol
- the protocol to use, currently either UDP
or TCP
localAddress
- a valid address to use for the OSC socket. If the port is 0
,
an arbitrary free port is picked when the transmitter is connected. (you can find out
the actual port in this case by calling getLocalAddress()
after the
transmitter was connected).java.io.IOException
- if a networking error occurs while creating the socketjava.lang.IllegalArgumentException
- if an illegal protocol is usedpublic static OSCTransmitter newUsing(java.nio.channels.DatagramChannel dch) throws java.io.IOException
OSCTransmitter
, using
default codec and UDP transport on a given channel. The caller should ensure that
the provided channel's socket was bound to a valid address
(using dch.socket().bind( SocketAddress )
).
Note that dch
specifies the
local socket, not the remote (or target) socket. This can be set
using the setTarget
method!dch
- the DatagramChannel
to use as UDP socket.java.io.IOException
- if a networking error occurs while configuring the socketpublic static OSCTransmitter newUsing(OSCPacketCodec c, java.nio.channels.DatagramChannel dch) throws java.io.IOException
OSCTransmitter
, using
a specific codec and UDP transport on a given channel. The caller should ensure that
the provided channel's socket was bound to a valid address
(using dch.socket().bind( SocketAddress )
).
Note that dch
specifies the
local socket, not the remote (or target) socket. This can be set
using the setTarget
method!c
- the codec to usedch
- the DatagramChannel
to use as UDP socket.java.io.IOException
- if a networking error occurs while configuring the socketpublic static OSCTransmitter newUsing(java.nio.channels.SocketChannel sch) throws java.io.IOException
OSCTransmitter
, using
default codec and TCP transport on a given channel. The caller should ensure that
the provided channel's socket was bound to a valid address
(using sch.socket().bind( SocketAddress )
). Furthermore,
the channel must be connected (using connect()
) before
being able to transmit messages.
Note that sch
specifies the
local socket, not the remote (or target) socket. This can be set
using the setTarget
method!sch
- the SocketChannel
to use as TCP socket.java.io.IOException
- if a networking error occurs while configuring the socketpublic static OSCTransmitter newUsing(OSCPacketCodec c, java.nio.channels.SocketChannel sch) throws java.io.IOException
OSCTransmitter
, using
a specific codec and TCP transport on a given channel. The caller should ensure that
the provided channel's socket was bound to a valid address
(using sch.socket().bind( SocketAddress )
). Furthermore,
the channel must be connected (using connect()
) before
being able to transmit messages.
Note that sch
specifies the
local socket, not the remote (or target) socket. This can be set
using the setTarget
method!c
- the codec to usesch
- the SocketChannel
to use as TCP socket.java.io.IOException
- if a networking error occurs while configuring the socketpublic java.lang.String getProtocol()
OSCChannel
getProtocol
in interface OSCChannel
UDP
or TCP
OSCChannel.UDP
,
OSCChannel.TCP
public abstract java.net.InetSocketAddress getLocalAddress() throws java.io.IOException
getHostName()
(or for the IP getAddress().getHostAddress()
)
and getPort()
. This port number may be 0
if the transmitter was called with an unspecified port and has not yet been
connected. In this case, to determine the port actually used, call this
method after the transmitter has been connected.getLocalAddress
in interface OSCChannel
java.io.IOException
- if the local host could not be resolvedInetSocketAddress.getHostName()
,
InetSocketAddress.getAddress()
,
InetSocketAddress.getPort()
public void setTarget(java.net.SocketAddress target)
send( OSCPacket )
.target
- the address of the remote target socket. Usually you construct an appropriate InetSocketAddress
InetSocketAddress
public void setCodec(OSCPacketCodec c)
OSCChannel
setCodec
in interface OSCChannel
c
- the codec to usepublic OSCPacketCodec getCodec()
OSCChannel
getCodec
in interface OSCChannel
OSCPacketCodec.getDefaultCodec()
public abstract void connect() throws java.io.IOException
When a UDP transmitter
is created without an explicit DatagramChannel
– say by
calling OSCTransmitter.newUsing( "udp" )
, you are required
to call connect()
so that an actual DatagramChannel
is
created and bound. For a UDP transmitter which was created with an explicit
DatagramChannel
, this method does noting, so it is always safe
to call connect()
. However, for TCP transmitters,
this may throw an IOException
if the transmitter
was already connected, therefore be sure to check isConnected()
before.
java.io.IOException
- if a networking error occurs. Possible reasons: - the underlying
network channel had been closed by the server. - the transport
is TCP and the server is not available. - the transport is TCP
and an OSCReceiver
sharing the same socket was stopped before (unable to revive).isConnected()
protected java.net.InetSocketAddress getLocalAddress(java.net.InetAddress addr, int port) throws java.net.UnknownHostException
java.net.UnknownHostException
public abstract boolean isConnected()
true
if the transmitter is connected, false
otherwise. For transports that do not use
connectivity (e.g. UDP) this returns false
, if the
underlying DatagramChannel
has not yet been created.connect()
public final void send(OSCPacket p, java.net.SocketAddress target) throws java.io.IOException
p
- the packet to sendtarget
- the target address to send the packet tojava.io.IOException
- if a write error, OSC encoding error,
buffer overflow error or network error occurspublic abstract void send(OSCPacketCodec c, OSCPacket p, java.net.SocketAddress target) throws java.io.IOException
c
- the codec to usep
- the packet to sendtarget
- the target address to send the packet tojava.io.IOException
- if a write error, OSC encoding error,
buffer overflow error or network error occurspublic final void send(OSCPacket p) throws java.io.IOException
setTarget
method. Therefore
this will throw a NullPointerException
if
no default address was specified.p
- the packet to sendjava.io.IOException
- if a write error, OSC encoding error,
buffer overflow error or network error occursjava.lang.NullPointerException
- if no default address was specifiedsetTarget( SocketAddress )
public abstract void send(OSCPacketCodec c, OSCPacket p) throws java.io.IOException
setTarget
method. Therefore
this will throw a NullPointerException
if
no default address was specified.c
- the codec to usep
- the packet to sendjava.io.IOException
- if a write error, OSC encoding error,
buffer overflow error or network error occursjava.lang.NullPointerException
- if no default address was specifiedsetTarget( SocketAddress )
public void setBufferSize(int size)
OSCChannel
setBufferSize
in interface OSCChannel
size
- the new size in bytes.OSCChannel.getBufferSize()
public int getBufferSize()
OSCChannel
getBufferSize
in interface OSCChannel
OSCChannel.setBufferSize( int )
public void dumpOSC(int mode, java.io.PrintStream stream)
OSCChannel
dumpOSC
in interface OSCChannel
mode
- one of kDumpOff
(don't dump, default),
kDumpText
(dump human readable string),
kDumpHex
(hexdump), or
kDumpBoth
(both text and hex)stream
- the stream to print on, or null
which
is shorthand for System.err
OSCChannel.kDumpOff
,
OSCChannel.kDumpText
,
OSCChannel.kDumpHex
,
OSCChannel.kDumpBoth
public void dispose()
OSCChannel
dispose
in interface OSCChannel
protected void checkBuffer()
protected abstract java.nio.channels.SelectableChannel getChannel()


PRODUCTS
Buy Products
Sell Products
SERVICES
Need Services
Post Services
ASK DESK
WOMEN IN NEWS
REPORT CRIME
Your Profile
Logout
Seek Services
Opt for services offered by our professionals


Frenzy
Every cast of Death Pulse has a chance to recharge the skill almost instantly.
${chance}% Chance of -${value}% Recharge
[14.0, 18.0, 22.0, 26.0, 30.0, 34.0, 38.0, 42.0, 46.0, 50.0]% Chance of -90.0% Recharge
MaxLevel
6
UltimateLevel
10


Tom Dyer
Manager, Site Reliability Engineering - Benevity
https://tomdyer.ca / @thomaswsdyer
Powered by reveal.js
Based on the session by Dr. Christina Maslash (UC Berkley)
Presented at Velocity Santa Clara 2015
A prolonged response to chronic interpersonal stressors while on the job.
prolonged and chronic
"I feel like it's eroding my soul."
Six Stressors of Burnout
Workload, Fairness
Recognition, Community
Control, Values
"If you love your work, you can easily fall victim to burnout."
Havard Business Review - "When Passion Leads to Burnout"
Purpose-driven work - work that people love and feel passionately about - can create an "obsessive passion".
Employees driven by purpose are significantly more stressed and score lower for well-being, resilience, and self-efficacy than those who are not
WHO Internal Classification of Diseases - ICD-11 QD85
Prevention is better than treatment.
Engagement is the key - pay attention, talk about it.
Build it, Monitor it, Improve it.
Organizational (or team) engagement vs. individual
I was burnt out
This Presentation
thomaswsdyer.github.io/BurnOutInTech
Research
maslach.socialpsychology.org/
Books
The Truth About Burnout /
Banishing Burnout
Monkey Business
Articles
Being a Go-Getter Is No Fun
/ The Power of Full Engagement


About UsExpanse is a private technology company headquartered in Noida, India that designs and develops consumer electronics and computer software.
Here at Expanse, we have a common vision of making India's most innovative technology company of all time. We aim to make affordable goods which are useful in making daily life easier and more efficient. We also aim to make a trustworthy relationship with our consumers.


module UniquePerms ( uniquePerms ) where – | Find all unique permutations of a list where there might be duplicates. uniquePerms :: (Eq a) => [a] -> [[a]] uniquePerms = permBag . makeBag – | An unordered collection where duplicate values are allowed, – but represented with a single value and a count. type Bag a = [(a, Int)] makeBag :: (Eq a) => [a] -> Bag a makeBag [] = [] makeBag (a:as) = mix a $ makeBag as where mix a [] = [(a,1)] mix a (bn@(b,n):bs) | a == b = (b,n+1):bs | otherwise = bn : mix a bs permBag :: Bag a -> [[a]] permBag [] = [[]] permBag bs = concatMap (\(f,cs) -> map (f:) $ permBag cs) . oneOfEach $ bs where oneOfEach [] = [] oneOfEach (an@(a,n):bs) = let bs’ = if n == 1 then bs else (a,n-1):bs in (a,bs’) : mapSnd (an:) (oneOfEach bs) apSnd f (a,b) = (a, f b) mapSnd = map . apSnd
MIME types defined: text/x-haskell
.


This is my personal website (Under Construction) so far you are able to put an image URL and I will find the Tag of that image.
Based on the pictures you provided this...
Input a URL to an image of yourself to see what people may perceive about you.
At Mohammed we love to create great content, as well as let people know more about who they are.


Geometry type
Point
LineString
Polygon
Circle
Your web browser must have JavaScript enabled in order for this application to display correctly.


We redefine users!
- visualize robust channels
- grow cross-platform markets
- deploy visionary technologies
- orchestrate web-enabled systems
- aggregate transparent solutions
- repurpose leading-edge niches
- leverage next-generation models
- engineer scalable solutions
- reintermediate integrated web-readiness
- leverage magnetic technologies
- envisioneer sexy technologies
- implement vertical communities
- disintermediate one-to-one partnerships


QuantConnect provides the following API methods to place orders. All of the methods return an $[OrderTicket, T:QuantConnect.Orders.OrderTicket], which you can use to update and cancel the orders. All orders should use the symbol object to place orders; the Symbol class uniquely identifies the security through ticker renames. Some order types are not supported by all brokerages. To confirm each order's support, click on the respective links below.
QuantConnect also provides automated order management technology via the Algorithm Framework, and automated position sizing via the Automated Position Sizing (SetHoldings).


Having garbage pickup consistently on the same day will make life easier for students. We will press for this change in service and work to make remembering garbage day easier in the mean time.
Team Litchfield will actively collaborate and work together on projects with other student groups and external organizations. Let’s break down silos and end duplication.
Having garbage pickup consistently on the same day will make life easier for students. We will press for this change in service and work to make remembering garbage day easier in the mean time.
In the past the USC has not partnered with for-profit institutions. Team Litchfield is open to working with for-profit institutions to provide opportunities and programming that meets the needs of students.
There are a lot of opportunities outside of Western for students. Team Litchfield will actively promote programming that is off-campus but in the interest of students.
This coordinator will be a new role in the External portfolio focused on helping students become more engaged with their community through organizing events like neighborhood BBQs, ensuring student concerns are noted and facilitating the continuation of our Good Neighbor Campaign.
The City of London is very interested in increasing student engagement in the city and retaining students after graduation. We will work with the university and city to provide more opportunities for student engagement. This includes promoting community engaged learning opportunities, and increasing awareness for city council activities. We will also create a new civic engagement coordinator to lead civic engagement initiatives and work with community partners like the London Economic Development Commission to find short and long-term local employment for students.
This coordinator will be a new role in the External portfolio focused on helping students become more engaged with their community through organizing events like neighborhood BBQs, ensuring student concerns are noted and facilitating the continuation of our Good Neighbor Campaign.
The City of London is very interested in increasing student engagement in the city and retaining students after graduation. We will work with the university and city to provide more opportunities for student engagement. This includes promoting community engaged learning opportunities, and increasing awareness for city council activities. We will also create a new civic engagement coordinator to lead civic engagement initiatives and work with community partners like the London Economic Development Commission to find short and long-term local employment for students.


Module 1 – Assignment 1
About me
Origin Story
Fun Facts
Favorite food
Favorite Teams
Github practice
This is my master branch
This is in my test branch


NTPC to list commercial paper on BSE for an issue size of Rs 1,500 cr
After the process, the effective date of listing of such papers at the exchange will be December 2, the BSE said in a statement
by Press Trust of IndiaThe BSE on Friday said state-owned NTPC has made an application to list commercial papers on the stock exchange for an issue size of Rs 1,500 crore.
After the process, the effective date of listing of such papers at the exchange will be December 2, the BSE said in a statement.
On Thursday, non-banking financial company Aditya Birla Finance Ltd (ABFL) became the first company to list CP on the two exchanges BSE and NSE.
The move came after the exchanges came out with a framework for listing of CPs in a bid to broaden investors' participation in such securities.
CP is an unsecured money market instrument issued in the form of promissory notes that enable highly rated corporate borrowers to diversify their sources of short-term borrowings and provides an additional instrument to investors.
Commercial papers can be issued for maturities between a minimum of 7 days and a maximum of up to one year from the date of issue. CP are usually issued at a discount from face value and reflects prevailing market interest rates.


| Meeting time: | MW 7:00-8:15 |
| Classroom: | PKI 270 |
| Instructors: | Dr. Harvey Siy, PKI 281B,<PHONE_NUMBER>, hsiy at unomaha dot edu, Office hours: By appointment |
| Dr. Parvathi Chundi, PKI 281A,<PHONE_NUMBER>, pchundi at unomaha dot edu, Office hours: | |
| Dr. Mahadevan Subramaniam, PKI 173C,<PHONE_NUMBER>, msubramaniam at unomaha dot edu, Office hours: | |
| Recommended textbook: | Software Evolution, Tom Mens and Serge Demeyer, editors, Springer, 2008 |
| Optional textbook: | Software Visualization, Stephan Diehl, Springer, 2007 |
| Prerequisites: | CSCI 4830 (Introduction to Software Engineering) or equivalent |
This course builds on basic software engineering concepts by expanding the discussion of the issues involved in maintaining and evolving software systems. It covers advanced technical aspects of the software maintenance and evolution process including reverse engineering, reengineering, change management, mining software repositories, and semantic analysis of changes.
It is intended for students looking for practical instruction on dealing with issues of maintaining legacy software systems. Also intended for students wishing to do fundamental research in software evolution.
| Dates | Slides |
|---|---|
| 8/25/2008 | Introduction to Software Evolution and Maintenance |
| 8/27/2008 | Software Configuration Management |
| 9/03/2008 | Program Comprehension |
| 9/10/2008 | Regression Testing |
| 9/17/2008 | Discussion: Survey of Program Slicing Techniques |
| 9/24/2008 | Discussion: Change Impact Analysis for Object-Oriented Programs |
| 10/1/2008 | Mining Software Repositories |
| 10/6/2008 | Laws of Software Evolution |
| 10/8/2008 | Visualizing Evolving Systems |
| 10/13/2008 | Predicting Bugs from History |
| 10/15/2008 | Processes and Software Evolution |
| Projects and exercises | 50% |
| Paper presentations | 30% |
| Term paper | 10% |
| Class participation | 10% |


System Architect Symbol details for "Basis For Hypothesis"
basis (Association)
- From Class:
"Subject Property"
- To Class:
"Basis For Hypothesis"
- From Class:
"Subject Property"
- To Class:
"Basis For Hypothesis"
Basis For Hypothesis (Class)
- Description:
"Property Qualifier" being the association between a "Hypothesis" and another "Subject Property"
forming all or part of the basis for the deduction.
Causal Relation (Class)
- Description:
"Subject Property Qualifier" indicating that the associated "Subject Property" is deduced to be the
outcome of an "Event" or another "Subject Property".
Classified Property Qualifier (Class)
- Description:
"Subject Property Qualifier" classified by a "Property Qualifier Type".
- Comment:
This is distinct from the specific subtypes such as "Intention" and "Perception Of Property" and is
intended to allow for a generalised qualification.
- Examples:
"Laterality" and "Site" in describing characteristics.
deduction (Association)
- From Class:
Hypothesis
- To Class:
"Basis For Hypothesis"
- From Class:
Hypothesis
- To Class:
"Basis For Hypothesis"
- Redefines:
"Subject Phenomenon"."Phenomenon Qualifier"."qualified phenomenon"
- Definitions Used:
-
qualified phenomenon (Association) (undefined)
Focus For Further Activity (Class)
- Description:
"Property Qualifier" being an "Agent's" view of a "Subject Property" which may have attention
directed towards it.
Hypothesis (Class)
- Description:
"Actual Property" established by a process of reasoning based on one or more other properties of
this "Subject" or other directly or indirectly related "Subjects".
- Comment:
-
Properties may be deduced only from the existence of other properties. These may be associated
either with the target SUBJECT or with one or more other, associated, SUBJECTS.
Example.
A GP identifies that a patient has an "elevated temperature" because they have a
temperature of 101 degrees.
Intention (Class)
- Description:
"Property Qualifier" being the general purpose of the care for an "Established Focus".
Perception Of Property (Class)
- Description:
"Property Qualifier" being an "Agent's" interpretation of a "Subject Property".
PrQ/Association (Generalization Node)
- Base Class:
"Subject Property Qualifier"
- Definitions Used:
-
Subject Property Qualifier (Class)
Subject Property (Class)
- Description:
Condition or state associated with a "Subject".
Subject Property Qualifier (Class)
- Description:
"Phenomenon Qualifier" qualifying a "Subject Property".


--- layout: post title: "My Week in Review" date: 2016-04-10 05:30:00 +0000 tags: image: https://s3.amazonaws.com/audreywatters/2016-04-10-link.jpg imagecredits: https://www.flickr.com/photos/123780409@N05/14321573302 ---
Image credits: The Noun Project


tk/winfo vrootwidth
Preface
Introduction
Tutorial
Implementation
Commands
bitmap
eval-wish
get-tk-var
photo
set-tk-var!
tk
tk-id->widget
tk-var
tk/after
tk/appname
tk/bind
tk/bindtags
tk/caret
tk/choosecolor
tk/choosedirectory
tk/clipboard
tk/console
tk/destroy
tk/dialog
tk/event
tk/focus
tk/getopenfile
tk/getsavefile
tk/grab
tk/grid
tk/image
tk/lower
tk/messagebox
tk/option
tk/pack
tk/place
tk/popup
tk/raise
tk/scaling
tk/update
tk/useinputmethods
tk/wait
tk/windowingsystem
tk/winfo
atom
atomname
cells
children
class
colormapfull
containing
depth
exists
fpixels
geometry
height
id
interps
ismapped
manager
name
parent
pathname
pixels
pointerx
pointerxy
pointery
reqheight
reqwidth
rgb
rootx
rooty
screen
screencells
screendepth
screenheight
screenmmheight
screenmmwidth
screenvisual
screenwidth
server
toplevel
viewable
visual
visualid
visualsavailable
vrootheight
vrootwidth
vrootx
vrooty
width
x
y
tk/wm
Options
Extensions
Changes
(tk/winfo 'vrootwidth #<widget>)
Returns the width of the virtual root window associated with #<widget> if there is one; otherwise returns the width of #<widget>'s screen.
©
Author
|
Home
|
Sitemap


Use the chrome.experimental.clear
module to remove browsing data
from a user's local profile. This module is still experimental. For more
information regarding the usage of experimental APIs, see the
chrome.experimental.* APIs page.
You must declare the "clear" permission in the extension manifest to use this API. As the API is still experimental, you must declare the "experimental" permisson as well.
{ "name": "My extension", ... "permissions": [ "clear", "experimental" ], ... }
This API provides a time-based mechanism for clearing a user's browsing data.
Your code should provide a timestamp which indicates the historical date after
which the user's browsing data should be removed. This timestamp is formatted
as the number of milliseconds since the Unix epoch (which can be retrieved
from a JavaScript Date
object via the getTime
method).
For example, to clear all of a user's browsing data from the last week, you might write code as follows:
var callback = function () { // Do something clever here once data has been removed. }; var millisecondsPerWeek = 1000 * 60 * 60 * 24 * 7; var oneWeekAgo = (new Date()).getTime() - millisecondsPerWeek; chrome.experimental.clear.browsingData(oneWeekAgo, { "appcache": true, "cache": true, "cookies": true, "downloads": true, "fileSystems": true, "formData": true, "history": true, "indexedDB": true, "localStorage": true, "pluginData": true, "passwords": true, "webSQL": true }, callback);
The chrome.experimental.clear.browsingData
method allows you to
remove various types of browsing data with a single call, and will be much
faster than calling multiple more specific methods. If, however, you only
want to clear one specific type of browsing data (cookies, for example), the
more granular methods offer a readable alternative to a call filled with JSON.
var callback = function () { // Do something clever here once data has been removed. }; var millisecondsPerWeek = 1000 * 60 * 60 * 24 * 7; var oneWeekAgo = (new Date()).getTime() - millisecondsPerWeek; chrome.experimental.clear.cookies(oneWeekAgo, callback);
Important: Removing browsing data involves a good deal of heavy lifting in the background, and can take tens of seconds to complete, depending on a user's profile. You should use the callback mechanism to keep your users up to date on the removal's status.
Samples for the clear
API are available
on the samples page.


class: center, middle ### W4995 Applied Machine Learning # Model evaluation 02/24/20 Andreas C. Müller ??? FIXME boston FIXME explain scorer interface vs metrics interface, plotting has scorer interface FIXME ROC curve slide is bad. Illustration of why random is .5 FIXME format string FIXME demonstrate that AUC / average precision are rancing metrics FIXME add calibration FIXME remove regression? FIXME top right of pr curve actually maximizes f1 FIXME no interpolation on pr curve? FIXME add plotting FIXME macro vs weighted average example FIXME roc auc not good for imbalanced!? show example!! FIXME remove regression, go into more depth on cost-sensitive? FIXME relate to calibration! FIXME How to pick thresholds in multi-class? FIXME Add log-loss to metrics, and show why I don’t like it (.4, .6, 0) is better than (.36, .34, .3) FIXME explain why ROC AUC doesn't depend on class imbalance by calculating example FIXME write down example on slide about recall being zero and AUC being 1? FIXME show example of number nonzero for scorer API --- class: centre,middle # Metrics for Binary Classification ??? --- # Review : confusion matrix .center[ ![:scale 55%](images/confusion_matrix.png) ] .larger[ $$\text{Accuracy} = \frac{\text{TP} + \text{TN}}{\text{TP} + \text{TN} + \text{FP} + \text{FN}}$$ ] ??? Diagonal divided by everything. --- class: center, middle # Positive & Negative are arbitrary ## Though often the minority class is considered positive --- # .smaller[ ```python from sklearn.metrics import confusion_matrix, plot_confusion_matrix data = load_breast_cancer() X_train, X_test, y_train, y_test = train_test_split( data.data, data.target, stratify=data.target, random_state=0) lr = LogisticRegression().fit(X_train, y_train) y_pred = lr.predict(X_test) print(confusion_matrix(y_test, y_pred)) print(lr.score(X_test, y_test)) plot_confusion_matrix(lr, X_test, y_test, cmap='gray_r') ``` ``` [[48 5] [ 4 86]] 0.94 ``` ] ![:scale 20%](images/plot_confusion_matrix.png) ??? confusion_matrix and accuracy_score take y_true, y_pred Note that plot_confusion_matrix takes the estimator. We might change that. We'll talk a bit more about that interface later. --- # Problems with Accuracy Data with 90% negatives: .smaller[ ```python from sklearn.metrics import accuracy_score for y_pred in [y_pred_1, y_pred_2, y_pred_3]: print(accuracy_score(y_true, y_pred)) ``` ``` 0.9 0.9 0.9 ``` ] -- .center[ ![:scale 70%](images/problems_with_accuracy.png) ] ??? - Imbalanced classes lead to hard-to-interpret accuracy. --- class:split-40 # Precision, Recall, f-score .left-column[ `$$ \large\text{Precision} = \frac{\text{TP}}{\text{TP}+\text{FP}}$$`
`$$\large\text{Recall} = \frac{\text{TP}}{\text{TP}+\text{FN}}$$`
`$$\large\text{F} = 2 \frac{\text{precision} \cdot\text{recall}}{\text{precision}+\text{recall}}$$`] .right-column[
Positive Predicted Value (PPV)
Sensitivity, coverage, true positive rate.
Harmonic mean of precision and recall ] ??? All depend on definition of positive and negative. --- class: center, spacious # The Zoo ![:scale 100%](images/zoo.png) https://en.wikipedia.org/wiki/Precision_and_recall ??? --- class: compact # Normalizing the confusion matrix .smallest[ ```python confusion_matrix(y_true, y_pred) ``` ![:scale 30%](images/confusion_matrix.png) ] .left-column[ .smallest[ ```python confusion_matrix(y_true, y_pred, normalize='true') ``` ![:scale 80%](images/confusion_matrix_norm_true.png) ] ] .right-column[ .smallest[ ```python confusion_matrix(y_true, y_pred, normalize='pred') ``` ![:scale 80%](images/confusion_matrix_norm_pred.png) ] ] --- class:compact .smallest[ ```python classification_report(y_true, y_pred) ``` ] .left-column[ ![:scale 38%](images/confusion_matrix_col.png)] .smallest[ .right-column[ ``` precision recall f1-score support 0 0.90 1.00 0.95 90 1 0.00 0.00 0.00 10 accuracy 0.90 100 macro avg 0.45 0.50 0.47 100 weighted avg 0.81 0.90 0.85 100 precision recall f1-score support 0 1.00 0.89 0.94 90 1 0.50 1.00 0.67 10 accuracy 0.90 100 macro avg 0.75 0.94 0.80 100 weighted avg 0.95 0.90 0.91 100 precision recall f1-score support 0 0.94 0.94 0.94 90 1 0.50 0.50 0.50 10 accuracy 0.90 100 macro avg 0.72 0.72 0.72 100 weighted avg 0.90 0.90 0.90 100 ``` ]] ??? --- # Averaging strategies `$$\text{macro }\frac{1}{\left|L\right|} \sum_{l \in L} R(y_l, \hat{y}_l)$$` `$$\text{weighted } \frac{1}{n} \sum_{l \in L} n_l R(y_l, \hat{y}_l)$$` .smaller[ ```python print("Weighted average: ", recall_score(y_test, y_pred_1, average="weighted")) print("Macro average: ", recall_score(y_test, y_pred_1, average="macro")) ``` ``` Weighted average: 0.90 Macro average: 0.50 ``` ]
??? Two common ways to approach multitask is to look at averages over binary metrics. So you can do binary metrics for recall, precision f1 score. But in principle, you could do it for more things. And in scikit-learn has several averaging strategies. There is macro, weighted, micro and samples. You should really not worried about micro samples, which only apply to multi-label prediction. We haven't talked about multi-label prediction and we're not going to talk about multi-label prediction. Multi-level prediction is when each sample can have multiple labels. Macro and weighted are the two options. They are interesting. For example, for recall, we can look at macro average recall, which is the average over all the labels and then the recall for just this label. So basically, here y_l is the true label, y ̂ is the predicted label. The positive class is now label l, and the negative classes is any other label, so this is sort of one versus rest version of recall. You can also do a weighted average, you weight by the number of samples in each class, and then divide by the total number of samples. So again, for each class, I compute recall for that class, and then I weight that by the number of samples. This is actually what classification report reports here. It's kind of interesting that if you do this, then actually looking at precision or recall just by themselves is informative. So if you look at macro average recall, that's actually also called balanced accuracy or if you look at macro average precision, this will be the useful metric by itself, because it looks at the precision of each of the classes. So basically, the choice between macro and weighted is whether you think each class should have the same weight, or each sample should have the same weight. Let’s say, we have recall for one class is 1 and for the other class 0. And for the majority class recall is 1 and for the minority, class recall is 0. For macro average recall, you would get 0.5 because you just take the average of the two. If you look at a weighted, then the outcome would be the proportion of the positive class. So if 90% of the data is positive, you will get 90% here. So basically weighted takes the class sizes into account and so the bigger classes count for more. If you're actually interested in the smaller classes, macro is probably better because each class weights the same. Which one is the best really depends on your application? Macro is counted each class the same while weighted is count each sample the same. I did this here on the digit data set, which is basically balanced and so there's no difference. micro vs macro same for other metrics. --- class: spacious # Balanced Accuracy .smaller[ ```python balanced_accuracy_score(y_t, y_p) == recall_score(y_t, y_p, average='macro') ``` ] $$\text{balanced_accuracy} = \frac{1}{2}\left( \frac{TP}{TP + FN} + \frac{TN}{TN + FP}\right )$$ - Always 0.5 for chance predictions - Equal to accuracy for balanced datasets --- # Mammography Data .smallest[ .left-column[ ```python from sklearn.datasets import fetch_openml # mammography https://www.openml.org/d/310 data = fetch_openml('mammography', as_frame=True) X, y = data.data, data.target X.shape ``` (11183, 6) ```python y.value_counts() ``` ``` -1 10923 1 260 ``` ] .right-column[ .center[ ![:scale 100%](images/mammography_data.png) ] ] .reset-column[ ```python # make y boolean # this allows sklearn to determine the positive class more easily X_train, X_test, y_train, y_test = train_test_split(X, y == '1', random_state=0) ``` ] ] ??? I use this mammography data set, which is very imbalanced. This is a data set that has many samples, only six features and it's very imbalanced. The datasets are about mammography data, and whether there are calcium deposits in the breast. They are often mistaken for cancer, which is why it's good to detect them. Since its rigidly low dimensional, we can do a scatter plot. And we can see that these are much skewed distributions and there's really a lot more of one class than the other. --- .smallest[ .left-column[ ```python svc = make_pipeline(StandardScaler(), SVC(C=100, gamma=0.1)) svc.fit(X_train, y_train) svc.score(X_test, y_test) ``` ``` 0.986 ``` ] .right-column[ ```python rf = RandomForestClassifier() rf.fit(X_train, y_train) rf.score(X_test, y_test) ``` ``` 0.989 ``` ] ] -- .reset-column[ ] .smallest[ .left-column[ ``` precision recall f1-score support False 0.99 1.00 0.99 2732 True 0.81 0.53 0.64 64 accuracy 0.99 2796 macro avg 0.90 0.76 0.82 2796 weighted avg 0.98 0.99 0.99 2796 ``` ] .right-column[ ``` precision recall f1-score support False 0.99 1.00 0.99 2732 True 0.90 0.56 0.69 64 accuracy 0.99 2796 macro avg 0.94 0.78 0.84 2796 weighted avg 0.99 0.99 0.99 2796 ``` ] ] --- class:spacious # Goal setting! - What do I want? What do I care about? - Can I assign costs to the confusion matrix? - What guarantees do we want to give? ??? (precision, recall, or something else) (i.e. a false positive costs me 10 dollars; a false negative, 100 dollars) --- # Changing Thresholds .tiny-code[ ```python y_pred = rf.predict(X_test) print(classification_report(y_test, y_pred)) ``` ``` precision recall f1-score support False 0.99 1.00 0.99 2732 True 0.90 0.56 0.69 64 accuracy 0.99 2796 macro avg 0.94 0.78 0.84 2796 weighted avg 0.99 0.99 0.99 2796 ``` ```python y_pred = rf.predict_proba(X_test)[:, 1] > .30 print(classification_report(y_test, y_pred)) ``` ``` precision recall f1-score support False 0.99 0.99 0.99 2732 True 0.71 0.64 0.67 64 accuracy 0.99 2796 macro avg 0.85 0.82 0.83 2796 weighted avg 0.99 0.99 0.99 2796 ``` ] ??? --- class: compact # Precision-Recall curve .smaller[ ```python svc = make_pipeline(StandardScaler(), SVC(C=100, gamma=0.1)) svc.fit(X_train, y_train) plot_precision_recall_curve(svc, X_test, y_test, name='SVC') ``` ] .center[ ![:scale 65%](images/precision_recall_curve.png) ] ??? --- # Side note: Scikit-learn plotting API .smaller[ ```python prc = plot_precision_recall_curve(svc, X_test, y_test, name='SVC') # plot pops up here prc ``` ```
``` ```python vars(pr_svc) ``` ``` {'precision': array([0.023, 0.023, 0.023, ..., 1. , 1. , 1. ]), 'recall': array([1. , 0.984, 0.984, ..., 0.031, 0.016, 0. ]), 'average_precision': 0.6743452407177641, 'estimator_name': 'Pipeline', 'line_':
, 'ax_':
, 'figure_':
} ``` ```python # plot again without recomputing prc.plot() ``` ] --- class: compact # ROC Curve .center[ ## (Receiver Operating Characteristic) ] .smaller[ ```python plot_roc_curve(svc, X_test, y_test, name='SVC') ``` ] .center[ ![:scale 65%](images/roc_curve_svc.png) ] ??? --- .left-column[ # PR-Curve ![:scale 100%](images/precision_recall_curve.png) ] .right-column[ # ROC-Curve ![:scale 100%](images/roc_curve_svc.png) ] .reset-column[ - Share one axis (though transposed!?) - Interpolation is meaningful on ROC curve but not PR curve ] --- # Comparing RF and SVC .smallest[ ```python pr_svc = plot_precision_recall_curve(svc, X_test, y_test, name='SVC') # if we used computed before, we could just call pr_svc.plot() # using ax=plt.gca() will plot into the existing axes instead of creating new ones pr_rf = plot_precision_recall_curve(rf, X_test, y_test, ax=plt.gca()) ``` ] .center[ ![:scale 60%](images/rf_vs_svc.png) ] ??? We’re going to compare random forest and support vector machine. You can see they're sort of similar. But in some areas, they are different. For example, you can see that the random forest is little bit more stable for very high precision but in some places the SVM is better than random forest and vice versa. So which of the two is better classifier really depends on which area you're interested in. By comparing these two curves, again, sort of a very fine grain thing that you can do manually, if you want to do this for many models, and want to pick the best model. This is maybe not really feasible. So you might want to summarize this in a single number. So one number you could think of is, while I know I definitely want to have a recall of 90% so I'm going to put my threshold here and compare at that threshold. If you don't really have a particular goal yet, you can also consider all thresholds at once, and basically compute the area under this curve. It's not exactly the same but that's sort of what average precision does. --- # Average Precision .center[ ![:scale 100%](images/avg_precision.png) ] ??? Average precision basically does a step function integral of this thing. So for each possible threshold, you look at the precision at this threshold times the change in recall. So this is like fitting a step function under the curve and then computing the integral. This allows you to basically take all possible thresholds into account at once. Q: How do I adjust the precision-recall ratio for the random forest? I mean, it says predict_proba. So I can alter threshold that at different values if I want. For a support vector machine, which doesn't have predict_proba, I can also adjust the threshold the decision function. Average precision is a pretty good metric to basically compare models if there are imbalanced classes. Related to area under the precision-recall curve (with step interpolation) --- # Area Under ROC Curve (aka AUC) .center[ ![:scale 65%](images/roc_curve_svc_auc.png) ] - Always .5 for random/constant prediction ??? And so when you look at the area under the curve, which is called ROC AUC, it's always 0.5 for random or constant predictions. So it's very easy to say, how much better than random are you if you look at ROC AUC. I encourage you to read the paper in the link. One thing is that the ROC curve is usually much smoother and it makes more sense to interpolate it, where the precision-recall curve makes less sense to interpolate us. But the precision-recall curve can sometimes pick up on more fine-grained differences. Even though AUC stands for area under the curve, if you see it in literature always means the area under the receiver operating curve. So AUC always means ROC AUC. AUC is a ranking metric. So it takes all possible thresholds into account, which means that it's independent of the default thresholds. So again, you can have something with very low accuracy but still with perfect ROC AUC. --- # Keep in mind: ranking vs predictions ```python dec = svc.decision_function(X_test) np.all((dec > 0) == svc.predict(X_test)) ``` ``` True ``` ```python print(f1_score(y_test, dec > 0)) print(average_precision_score(y_test, dec)) ``` ``` 0.641 0.635 ``` -- ```python dec_new = dec - 10 print(f1_score(y_test, dec_new > 0)) print(average_precision_score(y_test, dec_new)) ``` ``` 0.0 0.635 ``` --- # Threshold and ranking metrics .left-column[ .tiny[ ```python from sklearn.metrics import f1_score f1_rf = f1_score(y_test, rf.predict(X_test)) print(f"f1_score of random forest: {f1_rf:.3f}") f1_svc = f1_score(y_test, svc.predict(X_test)) print(f"f1_score of svc: {f1_svc:.3f}") ``` ``` f1_score of random forest: 0.709 f1_score of svc: 0.715 ``` ```python from sklearn.metrics import balanced_accuracy_score ba_rf = balanced_accuracy_score(y_test, rf.predict(X_test)) print(f"Balanced accuracy of random forest: {ba_rf:.3f}") ba_svc = balanced_accuracy_score(y_test, svc.predict(X_test)) print(f"Balanced accuracy of svc: {ba_svc:.3f}") ``` ``` Balanced accuracy of random forest: 0.765 Balanced accuracy of svc: 0.764 ``` ] ] .right-column[ .tiny[ ```python from sklearn.metrics import average_precision_score ap_rf = average_precision_score( y_test, rf.predict_proba(X_test)[:, 1]) print(f"Average precision of random forest: {ap_rf:.3f}") ap_svc = average_precision_score( y_test, svc.decision_function(X_test)) print(f"Average precision of svc: {ap_svc:.3f}") ``` ``` Average precision of random forest: 0.682 Average precision of svc: 0.693 ``` ```python from sklearn.metrics import roc_auc_score auc_rf = roc_auc_score(y_test, rf.predict_proba(X_test)[:, 1]) print(f"Area under ROC curve of random forest: {auc_rf:.3f}") auc_svc = roc_auc_score(y_test, svc.decision_function(X_test)) print(f"Area under ROC curve of svc: {auc_svc:.3f}") ``` ``` Area under ROC curve of random forest: 0.936 Area under ROC curve of svc: 0.817 ``` ]] ??? Previously, I just have sort of a simple comparison between f1 and average precision. I'm comparing these two models. So if I look at f1 score, it's going to compare basically these two points and the SVC is slightly is better. But F1 score only looks at the default threshold. If I want to look at the whole RC curve, I can use average precision. Even if I look at all possible thresholds, SVC is still better. Average precision is sort of a very sensitive metric that allows you to basically make good decisions even if the classes are very imbalanced and that also takes all possible thresholds into account. One thing that you should keep in mind if you use this is that this does not give you a particular threshold. For example, if you use the default threshold, your accuracy might be zero. This only looks at ranking. The curve and the area under the curve, don't depend on where the default threshold is. So if you predict everything, like for some weird reason, if you predict everything as the minority class, your accuracy will be really bad. But if they are ranked in the right order, so that all the positive classes are ranked higher than the negative classes, then you might still get an area under the curve that's very close to one. So this only looks at ranking. AP only considers ranking! --- class: spacious # Further reading on evaluation curves - [The Relationship Between Precision-Recall and ROC Curves](https://www.biostat.wisc.edu/~page/rocpr.pdf) - [Precision-Recall-Gain Curves: PR Analysis Done Right](https://papers.nips.cc/paper/5867-precision-recall-gain-curves-pr-analysis-done-right.pdf) --- # Summary of metrics for binary classification Threshold-based: - (balanced) accuracy - precision, recall, f1 Ranking: - average precision - ROC AUC ??? So let's briefly summarize the metrics for binary classification. So there are basically two approaches. One looks just at the predictions or look at soft predictions and take multiple thresholds into account. So the ones that I called threshold base, which is for single threshold, the ones that we talked about in our accuracy, which is just a fraction of correctly predicted, precision, recall, and f1. So the issue with accuracy is obviously that it can't distinguish between things that are quite different, for example, for imbalanced data sets, the classifier always predicts majority class often has like very high accuracy but tells you nothing. So in particular, for imbalanced classes, accuracy is a pretty bad measure. Precision and recall together are pretty good measures, though you always need to look at both numbers. One way to look at both numbers at once is the f1 score, though, using the harmonic mean is a little bit arbitrary. But still, only f1 score is a somewhat reasonable score if you only look at the actual predicted classes. For the ranking based losses, I think both average precision and ROC AUC are pretty good choices, ROC AUC, I like it because I know what 0.5 means, while for average precision, it's a little bit more tricky to see what the different orders of magnitude mean, or the different scales mean, but it can be more fine-grained measure. And so if you want to do cross-validation, my go-to is usually ROC AUC. In particular, for imbalance binary datasets, I would usually use ROC AUC. But then make sure that your threshold is sensible, but anything other than accuracy is okay. Just don’t look at only precision or only recall, if you do a grid search for just precision, you will probably get garbage results. add log loss? --- class: centre,middle # Multi-class classification ??? The next thing I want to talk about is multiclass classification. --- class:split-40 #Confusion Matrix .left-column[ .tiny-code[ ```python from sklearn.datasets import load_digits from sklearn.metrics import accuracy_score digits = load_digits() # data is between 0 and 16 X_train, X_test, y_train, y_test = train_test_split( digits.data / 16., digits.target, random_state=0) lr = LogisticRegression().fit(X_train, y_train) pred = lr.predict(X_test) print("Accuracy: {:.3f}".format(accuracy_score(y_test, pred))) plot_confusion_matrix(lr, X_test, y_test, cmap='gray_r') ``` ``` Accuracy: 0.964 ``` ![:scale 70%](images/confusion_matrix_digits.png) ] ] .right-column[ .tiny-code[ ```python print(classification_report(y_test, pred)) ``` ``` precision recall f1-score support 0 1.00 1.00 1.00 37 1 0.91 0.93 0.92 43 2 0.98 1.00 0.99 44 3 1.00 0.96 0.98 45 4 0.95 0.97 0.96 38 5 0.96 0.96 0.96 48 6 0.98 0.98 0.98 52 7 0.98 0.96 0.97 48 8 0.96 0.90 0.92 48 9 0.92 0.98 0.95 47 accuracy 0.96 450 macro avg 0.96 0.96 0.96 450 weighted avg 0.96 0.96 0.96 450 ``` ] ] ??? So again, for multiclass classification, you look at the confusion matrix. It's even more telling in a way than it was for binary classification but it's also pretty big. So here, I'm using the digital data set, which has 10 classes, and here's the confusion matrix. The diagonal is everything that's correct, the off-diagonal are mistakes. And you can see very fine-grained which classes were mistaken for which other classes. So this is very nice if you want to look in a very detailed view of the performance of the classifier. But again, you can't really use it for model selection, or not easily. You can also again, look at the classification report, which will give you precision-recall and F score for each for the classes, again, very, very fine grained. So you can see, for example, that Class 0, was predicted while Class 8 is the hardest. It might make more sense to look at in precision average classes, recall over the classes or f1 score for the classes. --- # Multi-class ROC AUC - Hand & Till, 2001, one vs one `$$ \frac{1}{c(c-1)}\sum_{j=1}^{c}\sum_{k \neq j}^{c} AUC(j,k)$$` - Provost & Domingo, 2000, one vs rest `$$ \frac{1}{c}\sum_{j=1}^{c}p(j) AUC(j,\text{rest}_j)$$` ??? You can do that similar for ROC AUC. It will soon be available in scikit-learn. There are basically two versions of doing multiclass ROC AUC. One is called Hand & Till while the other is called Provost & Domingo. And the first one is basically one versus one where you iterate over all the classes, and then you iterate over all the other classes, then you look at the AUC of one class versus the other class. And this one is basically one versus rest where you look at the AUC of one class versus all the other classes. H&T is not weighted whereas, on P&D, p(j) means number of samples in j, and P&D is weighted. You can also do weighted OvO or unweighted OvR. There are at least 4 different ways to do multi-class AUC. It’s not clear to me how they behave in practice. If you weighted then you count the samples are the same weight. If you do unweight, you give the different classes the same weight. So this is definitely a pretty good metric if you want a ranking metric for multi-class classification. FIXME unify notation with slide on averaging --- # Summary of metrics for multiclass classification Threshold-based: - accuracy - precision, recall, f1 (macro average, weighted) Ranking: - OVR ROC AUC - OVO ROC AUC ??? The threshold based ones are sort of the same, only now looking at only precision, or only recall, if you average over all the classes actually makes sense. So you can do a grid search over macro average recall, and it'll give you reasonable results. For ranking, in theory, you could also do OvR or OvO on the precision-recall curve. But I haven’t seen anyone done that or any papers on that. So let's not do that for now. Both can be weighted or unweighted versions of that. Both are great for imbalance problems again, but now you have to pick multiple thresholds and it's unclear how to do that well or at least for me. So let’s say you use OVO ROC and you get a classifier with a high value there, and now you want to make predictions. What thresholds do you use? I don't actually have a good answer. Because you need n minus one different threshold to actually make a decision. So for this reason, probably for multi-class, I might not use the ranking metrics unless you have to be cursed, they're sort of hard to interpret. And I would probably use something like macro average precision or macro average recall or macro average f1. --- class: centre,middle # Metrics for regression models ??? --- class:spacious # Build-in standard metrics - $\text{R}^2$ : easy to understand scale - MSE : easy to relate to input - Mean absolute error, median absolute error: more robust ??? The built-in standard metrics by default in scikit-learn uses R squared. The other obvious metric is Mean Squared Error. The good thing about R squared is it's around zero and maximum of one. It's very easy to understand the scale. If it's close to one is good. If it's negative, it's really bad. If it's close to zero, it's bad. While the MSE is easier to relate to the input. So the scale of the mean squared error is sort of relates to the scale of the output. You can also use things like mean absolute error, and median absolute error, which is more robust. If you square things, then outliers have a very big impact. So if we don't square things, then outliers have less of an impact. So often people prefer to use mean absolute error to limit the impact of outliers. If being low is good, you need to have a neg before and if being high is good you won't be needing to it be neg. I think these are actually the only metrics that are in scikit-learn. --- class:spacious # Absolute vs Relative: MAPE `$$ \text{MAPE} = \frac{100}{n} \sum_{i=1}^{n}\left|\frac{y-\hat{y}}{y}\right|$$` .center[ ![:scale 50%](images/mape.png) ] ??? There's another metric I want to talk about called MAPE. Which comes up in particular in forecasting. MAPE stands for Mean Absolute Percentage Error. MAPE captures is the percentage error. It divides the residual by the true value. Here for each individual data point, we’re dividing by the true value. Basically, what that means is that if a data point is large, we care less about how well we predict it. Basically, we allow larger error bars around high values. And I tried to plot this here, this is sort of for the one feature, LSTAT, to have like a reasonable x-axis since that helps us visualize this. And so here is the true dataset in blue and the predictive dataset in orange predicted using all features. And so in the bottom right, you can see it that we are under predicting by about 10. And this gives us a MAPE of 36%. On the top left, we are under predicting by even more, but the MAPE is smaller. So even though the absolute error on the top is bigger than the absolute error on the bottom, the relative error in the top is much smaller than the relative error in the bottom. This is a very commonly used measure in forecasting. Be careful when to use it because sometimes it might be not super intuitive. In particular, if something is not defined, if anything is zero, and if something is very close to zero, you need to perfectly predict it otherwise, you have unbound error. So this is usually used for things that are greater than one. --- # Prediction plots .wide-left-column[ .smaller[ ```python from sklearn.linear_model import Ridge from sklearn.datasets import load_boston boston = load_boston() X_train, X_test, y_train, y_test = train_test_split( boston.data, boston.target) ridge = Ridge(normalize=True) ridge.fit(X_train, y_train) pred = ridge.predict(X_test) plt.plot(pred, y_test, 'o') ``` ]] .narrow-right-column[ ![:scale 100%](images/regression_boston.png) ] ??? I think one of the best debugging tools is prediction plots, where you plot the predicted versus the true outcome. This is on the Boston dataset here, I just do a ridge regression model. And so here, I plot the predicted outcome by the ridge regression on the test data set versus the true outcome. And so ideally, it should be the same, they it should be on the diagonal. But you can see that there's like, a couple things wrong with it. So for example, there are a couple of things where the true prediction is 50K, but I under predict severely. There’s a lot of underprediction going on. In particular, for low values, I’m predicting too high and for high values, I’m predicting too low. Looking at this you can see different trends and see if there are any trends or not. --- class:split-40 # Residual Plots .left-column[![:scale 50%](images/regression_boston.png)
![:scale 60%](images/regression_boston_2.png)] .right-column[ ![:scale 100%](images/regression_boston_3.png)] ??? A different way to look at this is to basically rotate that 45 degrees. So here we are looking at the true versus true minus predicted. This allows you even more easily to see if there are trends, and you can see that basically, we're over predicting for low values and we're under predicting for high values. You can also look at the histogram of the residuals and you can see that they’re mostly centered around zero, which is good so there's probably no systematic bias but you can see that there are some values where we underpredict by quite a lot. These are nice because you can do these plots no matter what dimension your data set is. --- # Target vs Feature ![:scale 100%](images/target_vs_feature.png) ??? If you want to look at in more detail, you can look at per feature plots. --- # Residual vs Feature ![:scale 100%](images/residual_vs_feature.png) ??? Here, I'm plotting y test minus the prediction against each of the features and see if there are particular aspects of the feature that are not captured. For example, you can see here that for a low LSTAT, we are underpredicting more than for a high LSTAT. That shows that there might be trends in these features that we're not capturing. The X-axis is features. For each data point in the test dataset, I look at the value of this feature, and I look at the residual, which is the true value minus the prediction. Ideally, this should all be sort of horizontal because the errors that the model makes should be independent of all of the features. If the error that the model makes is not independent of the feature that means there's some aspect of the feature that the model didn't capture. This is basically the dependence of the target on the feature that is not captured by the prediction. And you can meditate that and then at some point it'll make sense. These are all more and more fine grain plots to understand the errors that you're making. --- # Picking metrics - Accuracy rarely what you want - Problems are rarely balanced - Find the right criterion for the task - OR pick a substitude, but at least think about it - Emphasis on recall or precision? - Which classes are the important ones? ??? In summary, for both multiclass and binary, you should really think about what your metrics are. And unless your problem is balanced, and even maybe then don't use accuracy. Accuracy is really bad. Problems are rarely balanced, in a real world and usually there heavily unbalanced unless someone artificially balances them. So it's really important to think about what is the right criterion for a particular task, and then you can optimize that criterion. So as I said, that can be like having costs associated with the confusion matrix, emphasizing precision or recall, setting specific goals such as have recall of at least X percent, or have precision of at least X percent and for multi-class deciding whether are all the classes the same importance, or all the samples the same importance, what are the important classes, even for binary, which one is the positive class? So whenever you talk about precision and recall, it’s important to think about which one is the positive class and how will changing the positive class change these two values? So and then finally, obviously, am I going to use the default threshold? Why am I going to use the default threshold? Do I use a ranking based metric? Or is there a reason why I would want to use a ranking based metric? --- # Using metrics in cross-validation .smaller[ ```python cancer = load_breast_cancer() X, y = cancer.data, cancer.target # default scoring for classification is accuracy rf = RandomForestClassifier(random_state=0) print("default scoring ", cross_val_score(rf, X, y)) # providing scoring="accuracy" doesn't change the results explicit_accuracy = cross_val_score(rf, X, y, scoring="accuracy") print("explicit accuracy scoring ", explicit_accuracy) ap = cross_val_score(rf, X, y, scoring="average_precision") print("average precision", ap) ``` ``` default scoring [0.93 0.947 0.991 0.974 0.973] explicit accuracy scoring [0.93 0.947 0.991 0.974 0.973] average precision [0.992 0.973 0.999 0.995 0.999] ``` ] ??? So once you pick them, it's very easy to use any of these metrics in scikit-learn. So they're all functions inside the metrics module, but usually, you're going to want to use them in for cross-validation, or grid search. And then it's even easier. There's argument called scoring. It takes a string or a callable. And so here, if you give it a string, it'll just do the right thing automatically. By default its accuracy. So if you don't do anything, it's the same as if you provide accuracy. But you can also set ROC AUC, and it's going to use ROC AUC. So the thing is ROC AUC actually needs probabilities right or a decision function, so behind the scenes, it does the right thing and gets out the decision function for the positive class to compute the ROC AUC correctly. Using better a metric than accuracy is as simple as saying scoring equal to something. And it’s exactly the same as in grid search CV. So if you want to do a grid search CV or randomized search CV, you can set scoring equal to ROC AUC or average precision or recall macro. Same for GridSearchCV
Will make GridSearchCV.score use your metric! --- # Multiple Metrics ``` from sklearn.model_selection import cross_validate res = cross_validate(RandomForestClassifier(), X, y, scoring=["accuracy", "average_precision", "recall_macro"], return_train_score=True, cv=5) pd.DataFrame(res) ``` .tiny[
fit_time
score_time
test_accuracy
train_accuracy
test_average_precision
train_average_precision
test_recall_macro
train_recall_macro
0
0.171312
0.016973
0.921053
1.0
0.992115
1.0
0.918277
1.0
1
0.133090
0.017563
0.938596
1.0
0.972293
1.0
0.923190
1.0
2
0.110232
0.015200
0.982456
1.0
0.999098
1.0
0.981151
1.0
3
0.110211
0.015076
0.956140
1.0
0.992924
1.0
0.950397
1.0
4
0.124239
0.019509
0.973451
1.0
0.998858
1.0
0.974011
1.0
] --- # Built-in scoring ```python from sklearn.metrics import SCORERS print("\n".join(sorted(SCORERS.keys()))) ``` .smaller[ ``` accuracy adjusted_mutual_info_score adjusted_rand_score average_precision balanced_accuracy completeness_score explained_variance f1 f1_macro f1_micro f1_samples f1_weighted fowlkes_mallows_score homogeneity_score jaccard jaccard_macro jaccard_micro jaccard_samples jaccard_weighted max_error mutual_info_score neg_brier_score neg_log_loss neg_mean_absolute_error neg_mean_gamma_deviance neg_mean_poisson_deviance neg_mean_squared_error neg_mean_squared_log_error neg_median_absolute_error neg_root_mean_squared_error normalized_mutual_info_score precision precision_macro precision_micro precision_samples precision_weighted r2 recall recall_macro recall_micro recall_samples recall_weighted roc_auc roc_auc_ovo roc_auc_ovo_weighted roc_auc_ovr roc_auc_ovr_weighted v_measure_score ``` ] ??? Here's a list of all the built-in scores, you can look at the documentation, there's really a lot of them. So these are for classification or regression or clustering. If you look in the documentation, you'll actually see which ones are for classification, which one is binary only, which ones are multiclass, which ones are regression and which ones are for clustering. The thing in scikit-learn, whatever you use for scoring greater needs to be better the way it's written. So you can’t use mean_squared_error for doing a grid search, because the grid search assumes greater is better so you have to use negative mean squared error. So for regression or log loss, you use mean squared error. For classification, you need to use the neg log loss one. --- # The Scorer interface (vs the metrics interface) ```python # metric function interface: y_probs = rf.predict_proba(X_test) ap_rf = average_precision_score(y_test, y_probs[:, 1]) y_pred = rf.predict(X_test) ba_rf = balanced_accuracy_score(y_test, y_pred) # scorer interface: from sklearn.metrics import get_scorer ap_scorer = get_scorer('average_precision') ap_rf = ap_scorer(rf, X_test, y_test) ab_scorer = get_scorer('balanced_accuracy') ba_rf = ab_scorer(rf, X_test, y_test) ``` --- class:spacious # Providing you your own callable - Takes estimator, X, y - Returns score – higher is better (always!) ```python def accuracy_scoring(est, X, y): return (est.predict(X) == y).mean() ``` ??? You can also provide your own metric, for example, if you want to do multiclass ROC AUC, you can provide a callable as scoring instead of a string. For any of the built-in ones, you can just provide a string. In this case, I’ve re-implemented accuracy. And the arguments for this needs to be an estimator, x - which is the test data and y - which is the test data true labels or whatever data you want to score. To re-implement accuracy, you have to call predict on the test data, check whether it's equal to y, and then compute the mean. This is actually a very powerful framework so you can do a lot of things with it. --- class: compact # You can access the model! .tiny-code[ ```python def nonzero(est, X, y): return np.sum(est.coef_ != 0) param_grid = {'alpha': np.logspace(-5, 0, 10)} # scoring can be string, single scorer, list or dict grid = GridSearchCV(Lasso(), param_grid, return_train_score=True, scoring={'r2': 'r2', 'num_nonzero': nonzero}, refit='r2') grid.fit(X_train, y_train) a = results.plot('param_alpha', 'mean_train_r2') b = results.plot('param_alpha', 'mean_test_r2', ax=plt.gca()) ax2 = plt.gca().twinx() results.plot('param_alpha', 'mean_train_num_nonzero', ax=ax2, c='k') ``` ] .center[ ![:scale 50%](images/lasso_alpha_triazine.png) ] ??? The main thing that I want to illustrate here is that you can have access to the model. So you can write a function for grid search that can do anything with the model it wants. So you can do deep introspection into the model and use that for your model selection. And then I can set up set scoring and then my callable and then I can run grid search as I usually would. Only now it's select a bigger C because bigger C give fewer support vectors. Question is why is the default accuracy? I guess one reason is, we can't change it anymore. Because everybody assumes it is and if it would be anything else, people would be very confused because that's sort of the most natural metric that people think about, like the number of correctly classified samples. Otherwise, in the first lecture, I would have to explain ROC AUC to you if it was ROC AUC and it would be harder to understand for people. Question is if I don't have probabilities can I compute ROC and yes, it does not depend probabilities at all. It's just I go through all possible thresholds. It's really just a ranking. I go through all possible thresholds and look at if I've used this threshold and look at what's the precision? What's the recall? Or what's the false positive rate, what's the true positive rate, and you only need a ranking. Basically, I only need to be able to sort the points and then for each possible threshold, I need to call the precision and recall. And so as long as it can sort the points, it doesn't matter. I can use any monotonous transformation of the decision function and it will still be the same because it only considers the ranking. --- class: center, middle # Questions ?


I love people who make me laugh. I honestly think its the thing i like the most, to laugh. It cures the multitude of ills. It's probably the most important thing in a person.Audrey Hepborn
Live like each day is your last! Love like you have never been hurt before! Sing like no one is listening! Dance like no one is watching!@James
I BELIEVE IN BEING STRONG WHEN EVERYTHING SEEMS TO BE GOING WRONG.Audrey Hepborn
You know all those things you've always wanted to do? You should go do them.@James


WITNESS LIST Public School-S/C on Facilities Committee (SUBCOMMITTEE ON Facilities) August 6, 2003-10:00A Facilities On: Carter, Dee (Texas Association of School Administrators) Casey, Daniel (Self) Hinojosa, Michael (Texas Association of School Administrators) Wisnoski, Joe (Texas Education Agency)


| DOSE: |
10 mg |
oral |
5-MeO-AMT |
(powder / crystals) |
I fucked up. I did it again. Once more. Just to feel the buzz, experience the visuals and hear the chemical. This chemical is a taste, a sight, a feeling and a sound. It's deep thinking and something close to happiness for two hours....if I can avoid the nausea.
After that it gets wierd, then it gets old, then I wonder when its going to stop. One thing though, time slows down on this drug, and when I want it to stop, there's no end in sight. It keeps hitting me for 10+ hours and then another 10-12 hours of slowly coming down.
For me, sleep is impossible. I drank a bottle of vodka and got really hammered, but still no sleep. If I had had more liquer, I would have kept drinking.
At one point the headache got bad and I ate some painkillers, but soon it was so intense that I decided to eat two more, but the bottle was empty and I panicked. I didn't know how many I had eaten.
'It could have been a whole bottle', I thought. 'Jesus christ, what do I do, calm down, remember. Was it four was it eight, how many was in the bottle when you went for it?', I didn't know.
I grabbed my phone and held it for a long time, thinking about three numbers and the consequences of dialing them. I was really scared, the push of the chemical now seemed different, slightly changed. I pushed in the three numbers. I didn't dial them, but I put the phone on speaker so that I only had to push the button and yell help. I don't know how long I waited, but eventually I calmed down and told myself, that an OD would have happened by now.
I was stuck in the most frightening moment of my life and I had no one to call. All of my friends smoke weed and drop ecstasy every once in a while. They would never mess around with unknown chemicals. They do not know this side of me, I don't want them to know.
It's been exactly 24 hours since I peaked. It's all gone now, thank god. I'm just left with a headache and a lot to consider.
In my opinion, don't do this drug. Do other drugs if you have to, just not this one.  It may be cheap and technically legal, but trust me, this is a bad trip waiting to happen. God knows what would have happened if I had taken the 15mg I had planned on.
[NOTE: I watched Fear and Loathing in Las Vegas while on the peak. Are there supposed to be any skulls, and melting faces in that movie?]
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.


To show a loader, have a div element inside the 'soc-page' div with the 'loader' class. This will result in a spinning loader being shown when a 'is-loading' class is applied to the soc-page div. You can set the text of the loading window to anything you need.
Below is an example of the loading spinner. You can also click the show button to see the full effect of this for about 5 seconds. If blocking the user interface below the loader is required an overlay can be added by also adding a 'soc-loader-block' div to the page. This functionality requires the app.bundle.js to be included in the page.
.soc-loader{Loading...}
.soc-loader-block+.soc-loader{Loading...}


{% extends "admin/change_form.html" %} {% block extrahead %} {{ block.super }} {% endblock %} {% block object-tools %} {{ block.super }} {% comment %}
Click the map to position the marker, then click "Use Location" to copy the coordinates of the marker into the latitude / longitude fields.
If you click "Clear Location" and save the model, the locator will attempt to geocode based on the dealer's address.
Click the map to position the marker, then click "Use Location" to copy the coordinates of the marker into the latitude / longitude fields.
If you click "Clear Location" and save the model, the locator will attempt to geocode based on the dealer's address.


Daddy Freeze Reacts To Expulsion Of Babcock Female Student In Leaked Video
by Gbenga SijuadeBabcock University has confirmed the expulsion of a lady seen in a leaked sex video which recently went viral online.
Naija News understands that the ex-students filmed themselves having sex in a place that appeared to be a hospital.
Reacting to the leaked video, the university in a statement by its director, communication and marketing, Joshua Suleiman on Wednesday, November 20, 2019, says the man in the video and his girlfriend are no longer students of the university.
However, Nigerian OAP Daddy Freeze has condemned Babcock University for expelling the female student seen in the leaked Babcock sex video.
Reacting to the news of her expulsion via his page, Daddy Freeze expressed his opinion:
“In my opinion Babcock shouldn’t have expelled the lady for what she consented to, off campus, while on holiday.”
Here is daddy’s freeze reaction below


I'm Andrew, a growing front end web developer and designer. I recently found my love for the web and I strive to continually learn as much as I can. Creating websites is my passion.
In my free time I love to take pictures and make music. If I'm not creating websites, you can find me capturing moments of the world on a camera, or in a room jamming with some friends.


--- title: Page Not Found permalink: /404.html ---
Can't find that page ... See discounted video lectures here


{% extends "site_base.html" %} {% block title %}{{ writer }} | Writer Profile | {{ block.super }}{% endblock %} {% block body %} {{ writer }} Subscribe via RSS {% for article in writer.content.all %} {{ article.list_preview }} {% endfor %} {% endblock body %}


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.uni.bamberg.wiai.minf.forflow.datagenerator.view.factory.ViewFactory
public final class ViewFactory
Factories are responsible for object creation and know how to create them.
ViewFactory is responsible for creating objects in the view layer. Please do not instantiate this class, but get direct access via the static methods.
| Constructor Summary | |
|---|---|
private |
ViewFactory()
default constructor not visible to outside world. |
| Method Summary | |
|---|---|
static About |
createAboutDialog(java.awt.Frame mainFrame)
creates a new About dialog object and
sets its position relative to mainFrame. |
static ChooseArtefacts |
createChooseArtefacts(java.awt.Frame mainFrame,
DataGeneratorView view)
creates a new ChooseArtefacts dialog and sets
its position relative to the mainFrame. |
static DataGeneratorActions |
createDataGeneratorActions(DataGeneratorView view)
create a new DataGeneratorActions object |
static Multiplicity |
createMultiplicityDialog(java.awt.Frame mainFrame)
creates a new Multiplicity dialog and sets its
position relative to mainFrame. |
static NullValues |
createNullValueDialog(java.awt.Frame mainFrame)
creates a new NullValues object dialog
and sets its position relative to mainFrame. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private ViewFactory()
| Method Detail |
|---|
public static DataGeneratorActions createDataGeneratorActions(DataGeneratorView view)
DataGeneratorActions
object
view
- reference of DataGeneratorView
DataGeneratorActions
public static About createAboutDialog(java.awt.Frame mainFrame)
About
dialog object and
sets its position relative to mainFrame.
mainFrame
- the main frame of the application framework
public static NullValues createNullValueDialog(java.awt.Frame mainFrame)
NullValues
object dialog
and sets its position relative to mainFrame.
mainFrame
- the main frame of the application's framework.
public static Multiplicity createMultiplicityDialog(java.awt.Frame mainFrame)
Multiplicity
dialog and sets its
position relative to mainFrame.
mainFrame
- the frame of the application framework.
public static ChooseArtefacts createChooseArtefacts(java.awt.Frame mainFrame, DataGeneratorView view)
ChooseArtefacts
dialog and sets
its position relative to the mainFrame.
mainFrame
- parent frame of the application framework.view
- reference of main view.
Do not mix it up with 1st parameter.
It's different.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


SecurityIdentifier
objects have several public properties to uniquely identify each asset. The following table describes these properties:
| Property | Data Type | Description |
|---|---|---|
Market |
string |
The market in which the asset trades |
SecurityType |
SecurityType |
The asset class |
OptionStyle |
OptionStyle |
American or European Option style |
OptionRight |
OptionRight |
Call or put Option type |
StrikePrice |
decimal |
The Option contract strike price |
Date |
datetime DateTime |
Earliest listing date for Equities; expiry for Futures and Options; December 30, 1899 for continuous Futures contracts and Indices. |
HasUnderlying |
bool |
A flag to represent if its a derivative asset with another underlying asset |
We encode the preceding properties to create Symbol
objects. We do our best to hide the details of this process from your algorithm, but you'll occasionally see it come through as an encoded hash like AAPL R735QTJ8XC9X
. The first half of the encoded string represents the first ticker AAPL was listed under. The other letters at the end of the string represent the serialized form of the preceding SecurityIdentifier
properties. You may also see an encoded has like AAPL XL7X5I241SO6|AAPL R735QTJ8XC9X
for a derivative contract. In this case, the part before the |
is contract hash and the part after the |
is the underlying hash. This serialization approach lets LEAN assign a short, unique string to octillions of different security objects.
LEAN assumes the ticker you pass to the AddEquity method is the current ticker of the Equity asset. To access this ticker, use the Value
property of the Symbol
object.
self.symbol = self.AddEquity("GOOG").Symbol self.Debug(self.symbol.ID.Value) # Prints "GOOCV" self.Debug(self.symbol.Value) # Prints "GOOG"
var symbol = AddEquity("GOOG").Symbol; Debug(symbol.ID.Value); // Prints "GOOCV" Debug(symbol.Value); // Prints "GOOG"
If you create the security subscription with a universe selection function, the Value
property of the Symbol
object is the point-in-time ticker.


Human Centered Design (HCD) is a recursive ideational approach set to address the intricacies of human emotion, aesthetics, process and goal completion, user stories and approaches, and expectation/violation management in a streamlined experience.
Our domains we interact with contain many facets and limitations that we must navigate to progress with successful innovation. These challenges that surround this navigation are best discussed with HCD considerations. All solutions to complex problems are multifaceted, from the difficult to create, minimally refined, novel, "simple" solutions to the multi-system, cross-compatible "complex" solution. A solution that excels enables compatibility between to two or more different components, while seamlessly bridging a gap between distant attributes. This is evident in hook-and-loop fasteners, commonly referred to as Velcro. The properties of hook-and-loop connections allow integration between different domain objects. While the physical connection provided by the fastener allows the objects to interact in proximity, the abstract connection of different domains adds a fascinating element to its list of characteristics and capabilities.
HCD excels when it enables parts to resonate together and allows personal expression, while engineering approaches design with specifications, rigid boundaries, and corner case consideration. An engineer can often be assessed on the presence or absence of a metric or feature, such as an engine with more HP, with less dB noise, or remote controlled throttle. An HCDer is often appraised on the ability to address a situation or workflow. Drawing further from the engine idea, HCD is validated upon the user interacting with the engine: context (assembly, operation, and maintenance), language (manuals, warning placement, legibility, and comprehension), appeal (aesthetics, ergonomics, or ease of use), and function choices (lawn-mower, car, and/or generator).
Technology advancements have enabled the shortening of specific steps within the design processes for individuals and teams practicing HCD theories, such as rapid prototyping and deployment, cloud based services, personal scheduling and information management, the shrinking global community, and frameworks and hardware that enable live feedback and predictive analysis. These tools and paradigms enable researchers and designers to be more responsive to address the fluctuating requirements of varying users. The future of successful HCD resides in the ability to fulfill requirements with minimal compromise.


janus.qm_wrapper.QMWrapper¶
-
class
janus.qm_wrapper.
QMWrapper
(class_type)¶ -
__init__
(class_type)¶ QM wrapper super class
Note
Since QMWrapper is a super class and has abstract methods the user cannot actually instantiate a QMWrapper object, but only its child objects
Methods
__init__
(class_type)QM wrapper super class build_qm_param
()Function implemented in individual child classes compute_info
()Function implemented in individual child classes convert_input
()Function not implemented for QM wrappers convert_trajectory
()Function not implemented for QM wrappers get_energy_and_gradient
([traj, geometry, …])Gets the energy and gradient from a QM computation of the primary subsystem get_main_charges
()Function not implemented for QM wrappers get_main_info
()Function not implemented for QM wrappers initialize
()Function not implemented for QM wrappers optimize_geometry
()Function implemented in individual child classes set_external_charges
()Function not implemented for QM wrappers set_up_reporters
()Function not implemented for QM wrappers take_step
(force)Function not implemented for QM wrappers -


--- title: Django and Python Imaging Library (PIL) on Leopard date: 2007-11-19 13:05:46 +1100 modified: 2007-11-20 00:05:46 +1100 uid: http://paul.annesley.cc/articles/2007/11/19/django-and-python-imaging-library-pil-on-leopard layout: post ---
Chapter 5 of the excellent Django Book makes use of django.db.models.URLField().
When running under the default Python 2.5 environment shipped with Mac OS 10.5 Leopard, this causes an error something along these lines:
$ ./manage.py validate Error: One or more models did not validate: books.author: "headshot": To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
 If my Ubuntu Server virtual machine didn't make my laptop run so damn hot, I'd be using that. Are tickless kernels and PowerTOP helping anyone on this front yet?
If it all looks too hard, I'm sure MacPorts (or is it DarwinPorts? who knows) will hold your hand.


An example of a multi-screen input wizard. The
Wizard is defined declaratively.
object MyWizard extends Wizard {
object completeInfo extends WizardVar(false)
val nameAndAge = new Screen {
val name = new Field with StringField {
def title = S ?? "First Name"
override def validation = minLen(2, S ?? "Name Too Short") ::
maxLen(40, S ?? "Name Too Long") :: super.validation
}
val age = new Field with IntField {
def title = S ?? "Age"
override def validation = minVal(5, S ?? "Too young") ::
maxVal(120, S ?? "You should be dead") :: super.validation
}
override def nextScreen = if (age.is < 18) parentName else favoritePet
}
val parentName = new Screen {
val parentName = new Field with StringField {
def title = S ?? "Mom or Dad's name"
override def validation = minLen(2, S ?? "Name Too Short") ::
maxLen(40, S ?? "Name Too Long") :: super.validation
}
}
val favoritePet = new Screen {
val petName = new Field with StringField {
def title = S ?? "Pet's name"
override def validation = minLen(2, S ?? "Name Too Short") ::
maxLen(40, S ?? "Name Too Long") :: super.validation
}
}
def finish() {
S.notice("Thank you for registering your pet")
completeInfo.set(true)
}
}


|
GIFMOD
|
Public Member Functions | |
| CRestoreInfo (const CRestoreInfo &F) | |
| CRestoreInfo & | operator= (const CRestoreInfo &F) |
Public Attributes | |
| CVector | X_res |
| CVector | corr_fac_res |
| vector< int > | fix_stats_res |
| CVector | CG_res |
| CVector | G_res |
| double | t_res |
| double | dt_res |
| bool | fixed_connect |
| int | iii |
Definition at line 5 of file RestoreInfo.h.


Post this on your Instagram, tagging @dsc_nit.agt to let us know :D
We haven't formally met...  Know that the Google form will be closed sharply at 18:00 make sure you fill all the required fields and submit the application before that.
Your RESUME and profile will be evaluated by the DSC Leads of other institutes... and they will select potential candidates for the level 2 interview.
Please Continue here: NO MORE TRICKS


{% extends "base.html" %} {% block title %}
Medieval catalogues > SECULAR INSTITUTIONS: Secular Colleges > Pott Shrigley > Inventory of church goods, 1493 × 1510
{% endif %}10 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}