Interface: ResourceOperations
interface ResourceOperations
An EXAMPLE of an interface for performing operations on a resource.
In this test application it is provided by the dedicated ResourceP component
and passed through all of the proper components before being exposed by the
shared resource at the topmost level.
- Author:
-
Kevin Klues<EMAIL_ADDRESS>- Version:
-
$Revision: 1.1 $
- Date:
-
$Date: 2007/07/13 23:43:17 $
Commands
Events
Commands - Details
operation
command error_t operation()
Events - Details
operationDone
event void operationDone(error_t error)


fun <ERROR CLASS>.moveTo(destination: <ERROR CLASS>, limit: Int = Int.MAX_VALUE): Int
Moves bytes from this
buffer to the destination buffer
destination
- is the buffer to copy bytes to
limit
- is an optional parameter specifying maximum number of bytes to be moved
Return
number of bytes moved


BetAndRuin
Contact Support
Verification code
New password
Repeat Password
Update password
×
Contact Support Information
Contact Info:
<EMAIL_ADDRESS>Phone number:555-555-55-55.


Find My iPhone
Warning! Your session has expired. You have been automatically signed out to protect your privacy.
Find My iPhone
Apple ID
Password
Sign In...
Forgot Apple ID or Password?
Setup Instructions


Tired of dull pillows? We specialize in custom decorative throw pillows. Couch pillows, bed pillow made in cute animal shapes. You can even customized your own pillow!
All pillows are handmade in our artisan workshop out of Pittsburgh, PA.


{% extends "index.html" %} {% set title = 'Extension repository' %} {% block header %}
PickleWeb is the main Pickle repository. It aggregates extensions for all PHP implementations (PHP, HHVM, ...) that are installed with Pickle.
{% if not user %} Login to register an extension {% else %} Account Logout Register a new extension {% endif %}


{{ topicTitle }} just got easier. Learn anywhere, anytime with our free and interactive lessons.
Have your students and children get started today on our {{ topicTitle }} lessons. Oppia offers story-based content for learners at many different skill levels, and our resources are free to you, always.
What is unique about our {{ topicTitle }} lessons?
{{ quality.title }}
{{ quality.description }}
Get started today! Looking for something else? Check out all of our other lessons in the Basic Mathematics curriculum in the Oppia Classroom!


domestic | fire | annex 2.A | resistance to fire | 2010
annex
2.A
This annex provides guidance on how to establish the resistance to fire of a
building
element or component. Whilst it could be argued that occupants of a
building
only need minutes to reach relative safety such as a
protected zone
,
it should be remembered that the fire tests used to establish fire resistance in
terms of time, do not replicate a real fire. In order to ensure the safe
evacuation of the
building
occupants and to ensure that fire-fighters are not
placed at undue risk, it is necessary to apply certain factors of safety to the
fire resistance for structural and non-structural fire protection.
2.A.0
—
2.A.0
domestic | fire | annex 2.A | resistance to fire | 2010
Fire resistance durations are established from the guidance to standards 2.1
to 2.15. Reference throughout this document to a short, medium or long fire
resistance duration, will be satisfied by following the guidance in the table to
this annex titled ‘Fire resistance duration for common
building
elements or
components’. The designer is free to choose materials or products which
satisfy either the British Standard Tests or the Harmonised European Tests.
Any test evidence or assessment used to substantiate the fire resistance
rating of a wall, floor, ceiling, door or shutter should be carefully checked to
ensure that it demonstrates compliance with appropriate fire tests and
performance criteria contained in this handbook and is applicable to the
complete installed assembly. For example, in the case of floors or ceilings
small differences in details such as openings for lighting or ventilation can
significantly affect the rating. Similarly,
fire doors
may also have small
differences in detail such as
glazing
apertures, intumescent strips, door
frames and ironmongery etc may significantly affect the rating.
British and European fire tests will co-exist in use until the British Standard
classifications are withdrawn.
Transitional period
The recommended fire resistance duration can be attained where the
construction
follows the guidance in columns 3, 4 and 5 of the table below.
The tests and specifications in either:
a. Clause 10 of BS 476: Part 20: 1987, when read in conjunction with - for
load-bearing elements, BS 476: Part 21: 1987 for non load-bearing
elements, BS 476: Part 22: 1987, for components, BS 476: Part 23: 1987,
for ventilation
ducts,
BS 476: Part 24: 1987;
b. for
fire door
assemblies with non-metallic leaves, BS 8214: 1990:
Sections 1 and 2;
c. for structural steelwork, BS 5950: Part 8: 2003 or ‘Fire Safe Design: A new
approach to multi-
storey
steel framed buildings’ published by The Steel
Construction Institute (within the limitations described in the SCI
Publication P288);
d. for the structural use of timber, BS 5268: Part 4: Sections 4.1 and 4.2:
1990;
e. for the structural use of concrete, BS 8110: Part 2: 1985: Section 4.3
Tabulated data (method 1);
f. an appropriate specification given in the Building Research Establishment
Report BR 128 "Guidelines for the Construction of Fire Resisting
Structural Elements" (BRE 1988).
The recommended fire resistance duration can be attained where the
construction
follows the guidance in Column 6 of the table below as specified
in Commission Decision 2000/367/EC of 3/5/2000 implementing Council
Directive 89/106/EEC as regards the classification of the resistance to fire of
construction products
,
construction works
and parts thereof.
BS EN 13501-2: 2007, Fire classification of
construction products
and
building elements, Part 2-Classification using data from fire resistance tests
(excluding products for use in ventilation systems).
BS EN 13501-3: 2005, Fire classification of
construction products
and
building elements. Classification using data from fire resistance tests on
2.A.1
—
2.A.3
domestic | fire | annex 2.A | resistance to fire | 2010
products and elements used in building service installations: fire resisting
ducts and fire dampers (other than smoke control systems).
BS EN 13501-4: 2007, Fire classification of construction products and
building elements, Part 4 - Classification using data from fire resistance tests
on smoke control systems.
The tests and specifications are:
BS EN 1363-1: 1999, Fire resistance tests, Part 1-General requirements.
BS EN 1363-2: 1999, Fire resistance tests, Part 2-Alternative and additional
procedures.
BS EN 1363-3: 2000, Fire resistance tests, Part 3-Verification of furnace
performance.
BS
EN
1364-1:
1999,
Fire
resistance
tests
for
non
load-bearing
elements-Part 1: Walls.
BS
EN
1364-2:
1999,
Fire
resistance
tests
for
non
load-bearing
elements-Part 2: Ceilings.
BS EN 1365-1: 1999, Fire resistance tests for load-bearing elements-Part 1:
Walls.
BS EN 1365-2: 2000, Fire resistance tests for load-bearing elements-Part 2:
Floors and roofs.
BS EN 1365-3: 2000, Fire resistance tests for load-bearing elements-Part 3:
Beams.
BS EN 1365-4: 1999, Fire resistance tests for load-bearing elements-Part 4:
Columns.
BS EN 1366-1: 1999, Fire resistance tests for service installations-Part 1:
Ducts.
BS EN 1366-2: 1999, Fire resistance tests for service installations-Part 2:
Fire dampers.
BS EN 1634-1: 2008, Fire resistance and smoke control test for door and
shutter assemblies, openable windows and elements of building hardware,
Part 1 - Fire resistance tests for doors, shutters and openable windows.
BS EN 1634-2: 2008, Fire resistance and smoke control test for door and
shutter assemblies, openable windows and elements of building hardware,
Part 2 - Fire resistance characterisation test for elements of building
hardware.
BS EN 1634-3: 2004, Fire resistance and smoke control tests for door and
shutter assemblies, openable windows and elements of building hardware,
Part 3 - Smoke control test for door and shutter assemblies.
BS EN 81-58: 2003, Safety rules for the construction and installation of lifts -
Examination and tests - Part 58: landing doors fire resistance test may be
used
in
accordance
with
Council
Directive
95/16/EC
of
29/6/1995
implementing the Lifts Regulations 1997 (SI 1997/831).
2.A.3
—
2.A.3
domestic | fire | annex 2.A | resistance to fire | 2010
Any reference to European Standards for Structure (Structural Eurocodes)
must be taken to include the relevant UK National Annex:
BS EN 1991-1-2: 2002, Eurocode 1: Actions on structures – Part 1-2:
General actions – Actions on structures exposed to fire.
BS EN 1992-1-2: 2004, Eurocode 2: Design of concrete structures – Part 1-2:
General rules – Structural fire design.
BS EN 1993-1-2: 2005, Eurocode 3: Design of steel structures – Part 1-2:
General rules – Structural fire design.
BS EN 1994-1-2: 2005, Eurocode 4: Design of composite steel and concrete
structures – Part 1-2: General rules – Structural fire design.
BS EN 1995-1-2: 2004, Eurocode 5: Design of timber structures – Part 1-2:
General rules – Structural fire design.
BS EN 1996-1-2: 2005, Eurocode 6: Design of masonry structures – Part 1-2:
General rules – Structural fire design.
BS EN 1999-1-2: 2007, Eurocode 9: Design of aluminium structures – Part
1-2: General rules – Structural fire design.
2.A.3
—
2.A.3
domestic | fire | annex 2.A | resistance to fire | 2010
Column
1
Column
2
Column
3
Column
4
Column
5
Column
6
Column
7
Construction
Fire
resistance
duration
British Standards
European
Standards
Test
exposure
Load
bearing
capacity
(mins)
Integrity
(mins)
Insulation
(mins)
1.
Separating floor
, or any
other floor,
flat roof
or
access deck
used as a
protected route of escape
(2.0.6)
Short
30
30
30
REI 30
From the
underside
Medium
60
60
60
REI 60
Long
120
120
120
REI 120
3. Other than a floor in 2 or
an intermediate floor within
a
flat
or
maisonette
Short
30
None
None
R 30
From the
underside
Medium
60
None
None
R 60
Long
120
None
None
R 120
4.
Separating wall
or an
internal wall or screen
used as a protected route
of escape (2.0.6)
[1, 2]
Short
30 [4]
30
30
REI 30 [4]
Each side
separately
Medium
60 [4]
60
60
REI 60 [4]
Long
120 [4]
120
120
REI 120 [4]
5.
Fire door
in a wall
in 4
Short
None
30 [6]
None
E 30 Sa [6]
Each side
separately,
when fitted
in frame [7]
Medium
None
60 [6]
None
E 60 Sa [6]
Long
None
120 [5, 6]
None
E 120 Sa
[5, 6]
7.
External wall
more than
1m from a
boundary
[1, 2]
Short
30 [4]
30
None
RE 30 [4]
From the
inside only
Medium
60 [4]
60
30
RE 60 and I
30 [4]
8.
External wall
not more
than 1m from a
boundary
[1, 2]
Short
30 [4]
30
30
REI 30 [4]
From the
inside only
Medium
60 [4]
60
60
REI 60 [4]
9. Horizontal
cavity barrier
[3]
Short
None
30
None
E 30
From the
underside
10. Vertical
cavity barrier
[3]
Short
None
30
None
E 30
Each side
separately
11. Ceiling in place of a
cavity barrier
(see 2.4.2b,
2.4.2c, 2.4.3)
Short
None
30
30
EI 30
From the
underside
Notes:
1.
An
external wall
includes any
external wall
used to protect routes of escape (see clause
2.0.6) but excludes an unprotected area calculated in accordance with clauses 2.6.1 to 2.6.4.
2.
Any door in an
external
wall, which is not included in the calculation of unprotected area,
should have the same fire resistance and the same test exposure as the
external
wall.
2.A.3
—
2.A.3
domestic | fire | annex 2.A | resistance to fire | 2010
3.
In a timber stud wall or partition the following will also be deemed to have a short fire
resistance duration:
a.
polythene sleeved mineral wool, or mineral wool slab, in either case under
compression when installed; or
b.
calcium silicate, cement based or gypsum based board at least 12 mm thick; or
c.
steel at least 0.5 mm thick; or
d.
timber at least 38 mm thick.
4.
If the
construction
is non load-bearing, none in the case of column 3, and no load-bearing (R)
in the case of column 6.
5.

6.
Unless the
fire door
is in an
external wall
or a lift door or pressurisation techniques following
the guidance in BS EN 12101: Part 6: 2005 are used, the
fire door
should also either:
a.
in the case of column 4, have smoke seals fitted unless the leakage rate does not
exceed 3 m³/m/hour, head and jambs only, when tested at 25 Pa according to BS476:
Part 31: 1983 (Section 31.1) with AMD 8366/ November 1994; or
b.
in the case of column 6, attain the additional classification of Sa when tested to BS
EN1634-3: 2001.
2.A.3
—
2.A.3


NeuroCritic
Let NeuroCritic analyze art and photos for you. Trained on a database of hundereds of independent art reviews, our neural network will generate a unique critical response to any photo you upload.
How it Works


The JavaScript on this page should be blocked.
Right click on the payment handler window and select the "Inspect" menu item for more details.


Encoding Menu
The Encoding menu is only found in the font view:
-
Reencode
-
Has an attached sub-menu of standard and user defined encodings. The font's
current encoding will be indicated with a check mark. You may change the
encoding by selecting a different entry.
There are two slightly different formats an encoding can take. It can be
defined by unicode code points, or it can be defined by glyph names. When
reencoding to an encoding defined by code points, the glyph with the matching
unicode value is placed in the encoding slot. When reencoding to an encoding
defined by glyph name, we first search for a glyph with the matching name
and use it, if not found we search for the glyph name's corresponding unicode
code point (if any) and if found we change its name to that specified by
the encoding.
Example: Suppose we have a font containing a glyph named "uni0041", and an
encoding which maps U+0041->slot 65, then the glyph will be moved into
slot 65. If we have another encoding which maps "A" -> slot 65, then (since
"A" has unicode value U+0041) our glyph will still be mapped to slot 65,
but in addition its name will be changed to "A".
-
Compact
-
Remove any holes from the encoding so all the glyphs get smushed together.
If the font is already compact, then selecting this again will restore the
original.
-
Force Encoding
-
Has the same sub-menu as above. Here we assume that the glyphs of the font
are currently encoded in the right order, but they have the wrong names (This
may seem odd, but it happens a lot). This command will change the names of
all the glyphs to match what they should be if the indicated encoding were
in force.
-
Add Encoding Slots...
-
Add some extra slots at the end of the font into which you can put unencoded
glyphs (variant glyphs, etc.)
-
Remove Unused Slots
-
Removes any unused slots from the end of the font. It does not remove unused
slots inside the font, that would screw up the encoding.
-
Detach Glyphs
-
Detaches any selected encoding slots from their currently associated glyphs.
These slots will now be marked as unused. The glyphs will remain in the font,
just not encoded (If you reencode the font those glyphs will become visible
again).
-
Detach & Remove Glyphs...
-
Similar to the above except that any glyphs detached (which are not used
elsewhere in the encoding) will be removed from the font.
-
Add Encoding Name...
-
Requests an encoding name from the user and searches for it in the iconv()
database. It then adds that encoding to the menu.
-
Load Encoding...
-
Asks the user for a filename and attempts to load a user defined encoding
from that file. (You can only load small encodings -- one byte encodings)
-
Make from Font...
-
Allows you to name the font's current encoding (if it isn't already named),
and add it to the encoding menu.
-
Remove Encoding...
-
Removes one of the user defined encodings from the menu.
-
Display by Group...
-
Allows you restrict the glyphs displayed in the font view to those in a user
defined group (specified in the next command).
-
Define Groups...
-
Allows you to define groups of glyphs which
(presumably) have some meaningful connection to each other.
-
Save NameList of Font...
-
Creates a namelist file mapping unicode to the glyph
names of the current font.
-
Load NameList...
-
Loads a namelist file into fontforge and copies it
so that fontforge will load it on start up in the future.
-
Rename Glyphs...
-
Allows you to specify a namelist. All glyphs in the
current font will be renamed to match the scheme in the namelist.
-
Create Named Glyphs...
-
Allows you to specify a file containing a list of glyph names. FontForge
will create a sequence of unencoded glyphs with these names. This might be
useful if all your fonts contain small caps and you always want to have the
names "A.small", "B.small", "C.small" etc. or perhaps you always want the
ligatures "longs_longs_t", "f_longs", "f_j", etc.
General notes on encodings
Not all font formats support all encodings. SVG fonts will always be output
in a unicode encoding, truetype fonts in either unicode or one of the CJK
encodings, type1 fonts only support single byte encodings, etc.
In a CID keyed font you are not allowed to change the encoding (in essence
because there is none), but there is an entry
CID->Change Supplement which will
display the Registry/Ordering information and allow you to change the supplement.
FontForge knows about the following encodings by default:
-
ISO-8859-1 (Latin1) -- traditional encoding for western european characters.
Default encoding for http. Does not include the Euro sign.
-
ISO-8859-15 (Latin0) -- Replacement for Latin1. Does include the Euro.
-
ISO-8859-2 (Latin2) -- Central & Eastern European (Czech, Hungarian,
Polish, Romanian, Croatian, Slovak, Slovnian.
-
ISO-8859-3 (Latin3) -- Southern European (Esperanto, Maltese)
-
ISO-8859-4 (Latin4) -- Northern European (Estonian, Latvian, Lithuanian,
Greenlandic, Lappish)
-
ISO-8859-9 (Latin5) -- Turkish
-
ISO-8859-10 (Latin6) -- Nordic (reworking of Latin4&Latin1)
-
ISO-8859-13 (Latin7) -- Another Baltic character set
-
ISO-8859-14 (Latin8) -- Celtic (Gaelic & Welsh)
-
ISO-8859-5 (Cyrillic)
-
ISO-8859-6 (Arabic)
-
ISO-8859-7 (Greek)
-
ISO-8859-8 (Hebrew) -- (and Yiddish)
-
ISO-8859-11 (Thai) -- Also know as TIS 620
<there is no ISO-8859-12>
-
KOI8-R -- Cyrillic
-
Macintosh Roman
-
Windows "ANSI" (CodePage1252)
-
Adobe Standard
-
Symbol
-
TeX Base
-
ISO-10646-1 (Unicode, BMP)
-
ISO-10646-1 (Unicode, Full)
-
ISO-10646-? (Unicode, by plane)
(You can select a specific plane of unicode as an encoding (ie BMP, SMP,
SIP,...)
-
SJIS
-
JIS 208 -- Japanese Kanji (first 8000 characters)
-
JIS 212 -- Japanese Kanji (next 8000 characters)
-
Wansung
-
KSC 5601 -- Korean (this is the 94x94 version of KSC 5601)
-
Johab
-
GB 2312 -- Simplified Chinese
-
Packed GB 2312 -- (I don't know what the proper name for this is, ASCII for
bytes<0x80, and GB 2312 EUC offset by 0x8080)
-
Big5 -- Traditional Chinese
-
Custom -- An unknown encoding
-
Glyph Order -- the glyph ordering used in the original font file.
Encoding sources:
An index to images of all the glyphs
in unicode.
You can also add new encodings to the set that FontForge knows about. There
are three menu items that manipulate a set of user defined encodings. As
always these specify both a character set and an encoding. The encoding has
a maximum of 256 entries, but the character set may be larger (up to 1024).
This means that you can define a font with extra characters. Since postscript
fonts can be reencoded at runtime this can be useful.
The Load Encoding command allows you to load an encoding(s) from a file.
Currently the file must either be in the format used by the unicode consortium
for mapping ISO
8859 encodings to unicode, or it must be a postscript encoding array.
The first format looks like this:
0x20 0x0020 # SPACE
0x21 0x0021 # EXCLAMATION MARK
...
A postscript file looks like:
/TeXBase1Encoding [
% 00
/.notdef /dotaccent /fi /fl
/fraction /hungarianumlaut /Lslash /lslash
...
] def
There may be more than one encoding in a postscript file. The encoding parser
is not smart. It will only read arrays specified like this, don't try any
of the innumerable other ways of specifying an array in postscript.
If the font has a custom encoding then the Make From Font
menu
item is enabled. This allows you to name the encoding you have defined for
the current font.
The Remove Encoding
menu item brings up a list showing all the
custom encodings and allows you to delete them.
Here's an example of a postscript encoding file.
It contains:
-
TeXMathItalicEncoding
-
TeXMathSymbolEncoding
-
TeXMathExtensionEncoding
-
IsoLatin -- (which specifies all the characters used in any of the ISO-Latin-*
fonts
-
AdobeExpert -- (Which contains things like lower case numbers, small caps,
fractions, sub/superscript numbers, etc.)
-
CodePage1250 -- Microsoft's encoding for Central European characters
-
CodePage1251 -- Microsoft's Cyrillic encoding
-
CodePage1252 -- Microsoft's Western European encoding (a superset of Latin1.
Sometimes called "ANSI" though I can find no ANSI standard that it follows)
-
CodePage1253 -- Microsoft's Greek encoding
-
CodePage1254 -- Microsoft's Turkish encoding
-
CodePage1255 -- Microsoft's Hebrew encoding (an extension of ISO-8859-8)
-
CodePage1256 -- Microsoft's Arabic encoding
-
CodePage1257 -- Microsoft's Baltic encoding
-
CodePage1258 -- Microsoft's Viet Namese encoding
-
CodePage874 -- Microsoft's Thai encoding
-
MacCentralEuropean
-
MacCyrillic
-
MacGreek
-
MacHebrew
-
US-ASCII -- Not really useful by itself any more, but provides the first
128 characters of almost every other encoding.
Adobe has established a standard glyph naming convention which provides
intelligible names for many glyphs of unicode characters. And some unintelligible
names too.
A namelist is just a mapping from
unicode to glyph names (a glyph name must be made up of alphanumeric characters
(or the special characters '.' or '_'), it may not begin with a digit, and
it must be 31 or fewer characters in length.
FontForge provides a series of standard namelists:
-
Adobe Glyph List
This is the set of names that Adobe publishes on the web.
-
AGL without afii
The cyrillic and hebrew glyphs have been assigned some very odd names (afiiXXXXX)
and some people prefer not to use them.
-
AGL with PUA
Adobe has assigned part of the unicode public use area to hold some standard
glyph variants like small caps, subscripts, old-style numbers, etc.
-
Greek small caps
I've added some greek small cap assignments
-
TeX Names
The TeX typesetting system has its own set of names
-
AMS Names
The American Mathematical Society has its set of names (see the American
Mathematical Society's
specification)
You may define your own namelist file. It should have the extension ".nam".
And it should contain a series of lines that look like:
0x0020 space
0x0021 exclam
0x0022 dblquote
In many cases you will just want to make a few modifications to an already
existing namelist. You can write:
Based: Adobe Glyph List
0x0021 exclamation
Which means the namelist is the same as the Adobe Glyph List except that
in your system U+0021 will be called "exclamation" rather than "exclam".
Any glyphs you do not explicitly name will be named "uniXXXX" or "uXXXXX"
where XXXX is the unicode value in hex. The prefix "uni" will be used for
glyphs in the BMP, the prefix "u" for glyphs outside.
I said that glyph names should contain only alphanumeric characters (and
some others). But really this is only true of glyph names that get output
into a font. If you design your own namelist you may include whatever glyph
names you like, using (almost) the full range of unicode -- provided you
rename all your glyphs to Adobe's names before you generate a font. If you
use non-ASCII characters you should encode the file in utf-8.
FontForge normally will restrict glyph names to be within the ASCII range,
but if you go to File->Preferences->Generic->UnicodeGlyphNames and
set it on you can use unicode.
I've created a french namelist which uses
accented letters. This will work fine within fontforge, and most rasterizers
will parse fonts generated using such names -- but they are non-standard
and may cause problems. Best to do a rename just before generating your font.
So if you find it easier to work with names other than those Adobe has
established you may create your own namelist file. Then use
Encoding->Load NameList... to load that into FontForge
(you only need do this once, FontForge should remember it thereafter). You
may use
File->Preferences->Font Info
to decree that all your new fonts will use this namelist. You can change
a font's namelist with either:
You may also want to force a rename of all glyphs when you Open a font, and
the open dialog now lets you do this. Similarly when generating a font you
will probably want to force that font to be use the standard names of the
Adobe Glyph List.
Other menus
-- Prev -- TOC --
Next --


§197-5 General penalty. Any person violating any of the provisions of this chapter, or any rule adopted pursuant to this chapter, shall be guilty of a petty misdemeanor and upon conviction thereof shall be punished as provided by law. [L 1985, c 74, pt of §1]


Brand cannot be deleted as there
is still existing inventory record for the brand.
| ID | Brand Name | Manufacturer Name | Supplier | Delete |
|---|---|---|---|---|
| ID | Brand Name | Manufacturer Name | Supplier | Delete |
| ID | Brand Name | Manufacturer Name | Supplier | Delete |
|---|---|---|---|---|
| ID | Brand Name | Manufacturer Name | Supplier | Delete |


class: center, middle, inverse, title-slide # The Green Fablab: Towards a distributed recycling paradigm ## Engineering Connection Nov 4 / 2020 ###
Fabio CRUZ
, Mauricio Camargo ### ERPI
Université de Lorraine ### 2016/12/12 (updated: 2020-11-02) --- class: clear, center, middle # How Innovation Labs to mitigate .brand-red[climate change]: academy-industry partnerships for success? ??? - Let's begin with the first global challegne, Climate change --- class: middle, left background-image: url(Figures/IPCC-Climate-change.jpeg) background-position: right background-size: contain # Societal Challegue
 Climate change --- # Climate change .left-column[.footnotesize[ - Global warming estimations - 6000 scientific references - Awareness of the impact of human activity - With 2°C, many ecosystems (corals) will disappear - Limits to growth --> Earth's boundaries ]] .right-column[ .polaroid[ ![](Figures/IPCC-SPM-1.png) ] .footnote[Source: Intergovermental pannel on Climate change https://www.ipcc.ch/ ] ] --- class: middle, center # Can we continue in the same economic model ? --- class: middle, left background-image: url(Figures/Emissions-by-sector.png) background-position: right background-size: contain ## Where do global
 greenhouse gas
 emissions come from? - Towards a neutral climate - Improvements in sector sector counts --- ## We need to reframe a new model!
![linear-economy](Figures/linear-economy.png) --- class: middle, left ## Intensive research on what could be a alternative model... ![:scale 60%](Figures/Doughnut-Economics.jpg) --- class: middle, left background-image: url(Figures/Doughnut.png) background-position: right background-size: contain # Doughnut Economics - Need to a holistic view other than GDP growth - 'Sweet spot' between
 minimal social requirements **AND**
 Biophysical earth's boundaries. .footnote[Raworth, K. A Safe and Just Space for Humanity: Can We Live within the Doughnut? Oxfam: Oxford, UK, 2012. ] --- class: middle, left background-image: url(Figures/Doughnut-2.png) background-position: right background-size: contain # Doughnut Economics - Need to a holistic view other than GDP growth - Index to evaluate .footnote[Raworth, K. A Safe and Just Space for Humanity: Can We Live within the Doughnut? Oxfam: Oxford, UK, 2012. ] --- # Doughnut Economics: .blue[Chile vs France] .center[![](Figures/Dona-Chile-France.png)] .footnote[O’Neill, D. W., Fanning, A. L., Lamb, W. F., & Steinberger, J. K. (2018). A good life for all within planetary boundaries. Nature sustainability, 1(2), 88-95. More details: https://goodlife.leeds.ac.uk . ] --- class: middle, left background-image: url(Figures/Planetary-boundaries-1.jpg) background-position: right background-size: contain # Doughnut Economics:
 .blue[World] .pull-left[ - Imagine a country that satisfy the basic needs: a long, healthy, happy life. - Now, imagine this same country can do this without while use natural ressources in a sustainable way - What about if all countries would do the same ] .footnote[O’Neill, D. W., Fanning, A. L., Lamb, W. F., & Steinberger, J. K. (2018).
A good life for all within planetary boundaries. Nature sustainability, 1(2), 88-95.
 https://goodlife.leeds.ac.uk ] --- class: middle # How Innovation Labs to mitigate climate change: .brand-blue[academy-industry partnerships] for success? --- # Production and transfer knowledge .left-column[ - Towards a **Mode 3** for `\(21^{st}\)` century ] .right-column[ ![:scale 80%](Figures/Knowledge-modes.png) ] .footnote[ - Rayna, T., Striukova, L., 2020. Fostering skills for the 21st century: The role of Fab labs and makerspaces. Technol. Forecast. Soc. Change 120391. https://doi.org/10.1016/j.techfore.2020.120391 - The New Production of Knowledge: The Dynamics of Science and Research in Contemporary Societies, 2010. . SAGE Publications Ltd, 1 Oliver’s Yard, 55 City Road, London EC1Y 1SP United Kingdom. https://doi.org/10.4135/9781446221853 ] --- class: left background-image: url(Figures/Helix-5.svg) background-position: right background-size: contain # Quintuple Helix of Innovation .pull-left[ - ] .footnote[ - Carayannis, Elias G. and David F. J. Campbell. 2012. “Mode 3 Knowledge Production in Quadruple Helix Innovation Systems.” Pp. 1–63 - Camargo, Morel, Lhoste. Progressive University Technology Transfer of Innovation Capabilities to SMEs: an Active and Modular Educational Partnership. New Perspectives in Technology Transfer (2020) ] --- # The Fuzzy Front End of Innovation --- # Early sustainable design .pull-left[ ] .pull-right[ ![:scale 80%](Figures/Sustainable-design.jpg) ] .footnote[ Martinez-Hernandez, E., 2017. Trends in sustainable process design—from molecular to global scales. Curr. Opin. Chem. Eng. 17, 35–41.
 https://doi.org/10.1016/j.coche.2017.05.005 ] --- class: middle # How .green[Innovation Labs] to mitigate climate change: academy-industry partnerships for success? --- class: middle, right background-image: url(Figures/LF2L-2.jpg) background-position: left background-size: contain # Lorraine
Fab Living
Lab --- class: middle, right background-image: url(Figures/LF2L-Methodology.jpg) background-position: left background-size: contain # Lorraine
Fab Living
Lab --- class: middle, right background-image: url(Figures/LF2L-Technologies.jpg) background-position: left background-size: contain --- class: middle, center ![](Figures//Green-fablab.jpg) --- ## The problem: Plastic waste .pull-left[ - US recycled less than 9% of its plastic waste. - EU, recycled about 30%. However, this number is what is collected, not from what is in circulation*. - China’s ban on plastic trash - Plastic trash could top 13 billion tons by 2050 - Economics of plastic recycling historically have been challenging - Little financial incentive to encourage consumers to recycle their own plastic waste ## We barely recycle plastic!!.. ] .pull-right[ ![Plastic waste](https://images.unsplash.com/photo-1537084642907-629340c7e59c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1567&q=80) ] .footnote[ *Kranzinger, L., Pomberger, R., Schwabl, D., Flachberger, H., Bauer, M., Lehner, M., Hofer, W., 2018. Output-oriented analysis of the wet mechanical processing of polyolefin-rich waste for feedstock recycling. Waste Manag. Res. 36, 445–453 ] --- # Distributed recycling via additive manufacturing (DRAM) .pull-left[ - Local closed loop - AM adds value - Small quantities - Reduction of landfilling - Minimize the use of virgin materials ![](Figures/Green-fablab-2.jpg) ] .pull-right[ ![](http://lf2l.fr/assets/images/3-projects/gf/Logo-GF.png) ![](Figures/Green-fablab-1.jpg) ] --- # Distributed recycling via additive manufacturing (DRAM) Technical system ![](Figures/DRAM-00.png) --- # Distributed recycling via additive manufacturing (DRAM) Technical system ![](Figures/DRAM-01.png) --- # Distributed recycling via additive manufacturing (DRAM) Technical system ![](Figures/DRAM-02.png) --- # Distributed recycling via additive manufacturing (DRAM) Technical system ![](Figures/DRAM-03.png) --- # Distributed recycling via additive manufacturing (DRAM) Technical system .center[![:scale 80%](Figures/DRAM-04.jpeg)] --- # Distributed recycling via additive manufacturing (DRAM) Technical system .center[![:scale 80%](Figures/DRAM-05.png)] --- # Distributed recycling via additive manufacturing (DRAM) Taking into account the environment and their ecosystem services (ES). .pull-left[ ![:scale 90%](Figures/Eco-Services-00.jpg) ] -- .pull-right[ ![](Figures/Eco-Services-01.png) - How the future recycling chain could be including the environment? ] --- # Distributed recycling via additive manufacturing (DRAM) Global system .pull-left[ ![](Figures/DRAM-07.png) ] .pull-right[ - Establish and evaluate scenarios in a systemic and dynamic way - Evaluate the influences of the main operating variables on the system - Taking into account the priorities of the multiple stakeholders - Facilitate your decision making public-private actors ] .footnote[ Santander, P., Cruz Sanchez, F.A., Boudaoud, H., Camargo, M., 2020. Closed loop supply chain network for local and distributed plastic recycling for 3D printing: a MILP-based optimization approach. Resour. Conserv. Recycl. 154, 104531. https://doi.org/10.1016/j.resconrec.2019.104531 ] --- class: middle, left background-image: url(Figures/educator.jpg) background-position: right background-size: contain # To conclude - An imperative to act now for the planet - Assuming our role from the university - A holistic, systemic and interdisciplinary vision
 is necessary - Technology must be considered in
 its socio-technical context - True interdisciplinarity is fundamental
*(let's take the risk)* - Community integration is indispensable,
it's about **co-building solutions**. --- class: middle, center # Thanks.. ### cruzsanc@univ-lorraine.fr


×
Apurva Shrivastava
Distracted
-1
+1
Comment
-1
+1
Question
-1
+1
Specific Comments
Send your message


Widgets
Colors
Fonts
Layout
Save/Load Styles
Save Current Theme
Save Theme
Load Saved Theme
Default Theme
Load Theme
Delete Theme
Theme Editor
Done
Cancel
View Themes
View Serials


No article matching {{ query }} found, click on the link to create it.
{% else %}-
{% for article in results %}
-
{{ article.content_text|safe }}
{% endfor %}
No article matching {{ query }} found, click on the link to create it.
{% else %}


To formally introduce myself, my name is Will Struder. I am an aspiring Front End developer in Woodstock, Georgia. My background includes retail, government, health, and technology services. Currently I am enrolled in the Georgia Tech Full Stack Coding Bootcamp, and am set to graduate in early August. I am proficient in HTML/CSS/JavaScript, and am learning Node.js at the moment. Outside of coding, I enjoy riding motorcycles, playing music, and going on drives with my dog. I look forward to new opportunities and experiences in the web development field!
Code Quiz
Empty Pantry
First Profile


/** * @author Ed Spencer * * Ext.app.Application defines the set of {@link Ext.data.Model Models}, {@link Ext.app.Controller Controllers}, * {@link Ext.app.Profile Profiles}, {@link Ext.data.Store Stores} and {@link Ext.Component Views} that an application * consists of. It automatically loads all of those dependencies and can optionally specify a {@link #launch} function * that will be called when everything is ready. * * Sample usage: * * Ext.application({ * name: 'MyApp', * * models: ['User', 'Group'], * stores: ['Users'], * controllers: ['Users'], * views: ['Main', 'ShowUser'], * * launch: function() { * Ext.create('MyApp.view.Main'); * } * }); * * Creating an Application instance is the only time in Sencha Touch that we don't use Ext.create to create the new * instance. Instead, the {@link Ext#application} function instantiates an Ext.app.Application internally, * automatically loading the Ext.app.Application class if it is not present on the page already and hooking in to * {@link Ext#onReady} before creating the instance itself. An alternative is to use Ext.create inside an Ext.onReady * callback, but Ext.application is preferred. * * ## Dependencies * * Application follows a simple convention when it comes to specifying the controllers, views, models, stores and * profiles it requires. By default it expects each of them to be found inside the *app/controller*, *app/view*, * *app/model*, *app/store* and *app/profile* directories in your app - if you follow this convention you can just * specify the last part of each class name and Application will figure out the rest for you: * * Ext.application({ * name: 'MyApp', * * controllers: ['Users'], * models: ['User', 'Group'], * stores: ['Users'], * views: ['Main', 'ShowUser'] * }); * * The example above will load 6 files: * * - app/model/User.js * - app/model/Group.js * - app/store/Users.js * - app/controller/Users.js * - app/view/Main.js * - app/view/ShowUser.js * * ### Nested Dependencies * * For larger apps it's common to split the models, views and controllers into subfolders to keep the project * organized. This is especially true of views - it's not unheard of for large apps to have over a hundred separate * view classes so organizing them into folders can make maintenance much simpler. * * To specify dependencies in subfolders just use a period (".") to specify the folder: * * Ext.application({ * name: 'MyApp', * * controllers: ['Users', 'nested.MyController'], * views: ['products.Show', 'products.Edit', 'user.Login'] * }); * * In this case these 5 files will be loaded: * * - app/controller/Users.js * - app/controller/nested/MyController.js * - app/view/products/Show.js * - app/view/products/Edit.js * - app/view/user/Login.js * * Note that we can mix and match within each configuration here - for each model, view, controller, profile or store * you can specify either just the final part of the class name (if you follow the directory conventions), or the full * class name. * * ### External Dependencies * * Finally, we can specify application dependencies from outside our application by fully-qualifying the classes we * want to load. A common use case for this is sharing authentication logic between multiple applications. Perhaps you * have several apps that login via a common user database and you want to share that code between them. An easy way to * do this is to create a folder alongside your app folder and then add its contents as dependencies for your app. * * For example, let's say our shared login code contains a login controller, a user model and a login form view. We * want to use all of these in our application: * * Ext.Loader.setPath({ * 'Auth': 'Auth' * }); * * Ext.application({ * views: ['Auth.view.LoginForm', 'Welcome'], * controllers: ['Auth.controller.Sessions', 'Main'], * models: ['Auth.model.User'] * }); * * This will load the following files: * * - Auth/view/LoginForm.js * - Auth/controller/Sessions.js * - Auth/model/User.js * - app/view/Welcome.js * - app/controller/Main.js * * The first three were loaded from outside our application, the last two from the application itself. Note how we can * still mix and match application files and external dependency files. * * Note that to enable the loading of external dependencies we just have to tell the Loader where to find those files, * which is what we do with the Ext.Loader.setPath call above. In this case we're telling the Loader to find any class * starting with the 'Auth' namespace inside our 'Auth' folder. This means we can drop our common Auth code into our * application alongside the app folder and the framework will be able to figure out how to load everything. * * ## Launching * * Each Application can define a {@link Ext.app.Application#launch launch} function, which is called as soon as all of * your app's classes have been loaded and the app is ready to be launched. This is usually the best place to put any * application startup logic, typically creating the main view structure for your app. * * In addition to the Application launch function, there are two other places you can put app startup logic. Firstly, * each Controller is able to define an {@link Ext.app.Controller#init init} function, which is called before the * Application launch function. Secondly, if you are using Device Profiles, each Profile can define a * {@link Ext.app.Profile#launch launch} function, which is called after the Controller init functions but before the * Application launch function. * * Note that only the active Profile has its launch function called - for example if you define profiles for Phone and * Tablet and then launch the app on a tablet, only the Tablet Profile's launch function is called. * * 1. Controller#init functions called * 2. Profile#launch function called * 3. Application#launch function called * 4. Controller#launch functions called * * When using Profiles it is common to place most of the bootup logic inside the Profile launch function because each * Profile has a different set of views that need to be constructed at startup. * * ## Adding to Home Screen * * iOS devices allow your users to add your app to their home screen for easy access. iOS allows you to customize * several aspects of this, including the icon that will appear on the home screen and the startup image. These can be * specified in the Ext.application setup block: * * Ext.application({ * name: 'MyApp', * * {@link #icon}: 'resources/img/icon.png', * {@link #isIconPrecomposed}: false, * {@link #startupImage}: { * '320x460': 'resources/startup/320x460.jpg', * '640x920': 'resources/startup/640x920.png', * '640x1096': 'resources/startup/640x1096.png', * '768x1004': 'resources/startup/768x1004.png', * '748x1024': 'resources/startup/748x1024.png', * '1536x2008': 'resources/startup/1536x2008.png', * '1496x2048': 'resources/startup/1496x2048.png' * } * }); * * When the user adds your app to the home screen, your resources/img/icon.png file will be used as the application * {@link #icon}. We also used the {@link #isIconPrecomposed} configuration to turn off the gloss effect that is automatically added * to icons in iOS. Finally we used the {@link #startupImage} configuration to provide the images that will be displayed * while your application is starting up. See also {@link #statusBarStyle}. * * ## Find out more * * If you are not already familiar with writing applications with Sencha Touch we recommend reading the * [intro to applications guide](../../../getting_started/building_your_first_app.html), which * lays out the core principles of writing apps with Sencha Touch. */ Ext.define('Ext.app.Application', { extend: 'Ext.app.Controller', requires: [ 'Ext.app.History', 'Ext.app.Profile', 'Ext.app.Router', 'Ext.app.Action' ], config: { /** * @cfg {String/Object} icon * Specifies a set of URLs to the application icon for different device form factors. This icon is displayed * when the application is added to the device's Home Screen. * * Ext.setup({ * icon: { * 57: 'resources/icons/Icon.png', * 72: 'resources/icons/Icon~ipad.png', * 114<EMAIL_ADDRESS>* 144<EMAIL_ADDRESS>* }, * onReady: function() { * // ... * } * }); * * Each key represents the dimension of the icon as a square shape. For example: '57' is the key for a 57 x 57 * icon image. Here is the breakdown of each dimension and its device target: * * - 57: Non-retina iPhone, iPod touch, and all Android devices * - 72: Retina iPhone and iPod touch * - 114: Non-retina iPad (first and second generation) * - 144: Retina iPad (third generation) * * Note that the dimensions of the icon images must be exactly 57x57, 72x72, 114x114 and 144x144 respectively. * * It is highly recommended that you provide all these different sizes to accommodate a full range of * devices currently available. However if you only have one icon in one size, make it 57x57 in size and * specify it as a string value. This same icon will be used on all supported devices. * * Ext.application({ * icon: 'resources/icons/Icon.png', * launch: function() { * // ... * } * }); */ /** * @cfg {Object} startupImage * Specifies a set of URLs to the application startup images for different device form factors. This image is * displayed when the application is being launched from the Home Screen icon. Note that this currently only applies * to iOS devices. * * Ext.application({ * startupImage: { * '320x460': 'resources/startup/320x460.jpg', * '640x920': 'resources/startup/640x920.png', * '640x1096': 'resources/startup/640x1096.png', * '768x1004': 'resources/startup/768x1004.png', * '748x1024': 'resources/startup/748x1024.png', * '1536x2008': 'resources/startup/1536x2008.png', * '1496x2048': 'resources/startup/1496x2048.png' * }, * launch: function() { * // ... * } * }); * * Each key represents the dimension of the image. For example: '320x460' is the key for a 320px x 460px image. * Here is the breakdown of each dimension and its device target: * * - 320x460: Non-retina iPhone, iPod touch, and all Android devices * - 640x920: Retina iPhone and iPod touch * - 640x1096: iPhone 5 and iPod touch (fifth generation) * - 768x1004: Non-retina iPad (first and second generation) in portrait orientation * - 748x1024: Non-retina iPad (first and second generation) in landscape orientation * - 1536x2008: Retina iPad (third generation) in portrait orientation * - 1496x2048: Retina iPad (third generation) in landscape orientation * * Please note that there's no automatic fallback mechanism for the startup images. In other words, if you don't specify * a valid image for a certain device, nothing will be displayed while the application is being launched on that device. */ /** * @cfg {Boolean} isIconPrecomposed * `true` to not having a glossy effect added to the icon by the OS, which will preserve its exact look. This currently * only applies to iOS devices. */ /** * @cfg {String} [statusBarStyle='black'] Allows you to set the style of the status bar when your app is added to the * home screen on iOS devices. Alternative is to set to 'black-translucent', which turns * the status bar semi-transparent and overlaps the app content. This is usually not a good option for web apps */ /** * @cfg {String} tabletIcon Path to the _.png_ image file to use when your app is added to the home screen on an * iOS **tablet** device (iPad). * @deprecated 2.0.0 Please use the {@link #icon} configuration instead. */ /** * @cfg {String} phoneIcon Path to the _.png_ image file to use when your app is added to the home screen on an * iOS **phone** device (iPhone or iPod). * @deprecated 2.0.0 Please use the {@link #icon} configuration instead. */ /** * @cfg {Boolean} glossOnIcon If set to `false`, the 'gloss' effect added to home screen {@link #icon icons} on * iOS devices will be removed. * @deprecated 2.0.0 Please use the {@link #isIconPrecomposed} configuration instead. */ /** * @cfg {String} phoneStartupScreen Path to the _.png_ image file that will be displayed while the app is * starting up once it has been added to the home screen of an iOS phone device (iPhone or iPod). This _.png_ * file should be 320px wide and 460px high. * @deprecated 2.0.0 Please use the {@link #startupImage} configuration instead. */ /** * @cfg {String} tabletStartupScreen Path to the _.png_ image file that will be displayed while the app is * starting up once it has been added to the home screen of an iOS tablet device (iPad). This _.png_ file should * be 768px wide and 1004px high. * @deprecated 2.0.0 Please use the {@link #startupImage} configuration instead. */ /** * @cfg {Array} profiles The set of profiles to load for this Application. Each profile is expected to * exist inside the *app/profile* directory and define a class following the convention * AppName.profile.ProfileName. For example, in the code below, the classes *AppName.profile.Phone* * and *AppName.profile.Tablet* will be loaded. Note that we are able to specify * either the full class name (as with *AppName.profile.Tablet*) or just the final part of the class name * and leave Application to automatically prepend *AppName.profile.'* to each: * * profiles: [ * 'Phone', * 'AppName.profile.Tablet', * 'SomeCustomNamespace.profile.Desktop' * ] * @accessor */ profiles: [], /** * @cfg {Array} controllers The set of controllers to load for this Application. Each controller is expected to * exist inside the *app/controller* directory and define a class following the convention * AppName.controller.ControllerName. For example, in the code below, the classes *AppName.controller.Users*, * *AppName.controller.Groups* and *AppName.controller.Products* will be loaded. Note that we are able to specify * either the full class name (as with *AppName.controller.Products*) or just the final part of the class name * and leave Application to automatically prepend *AppName.controller.'* to each: * * controllers: [ * 'Users', * 'Groups', * 'AppName.controller.Products', * 'SomeCustomNamespace.controller.Orders' * ] * @accessor */ controllers: [], /** * @cfg {Ext.app.History} history The global {@link Ext.app.History History} instance attached to this * Application. For more information, see * [Routing, Deep Linking, and the Back Button](../../../core_concepts/history_support.html). * @accessor * @readonly */ history: {}, /** * @cfg {String} name The name of the Application. This should be a single word without spaces or periods * because it is used as the Application's global namespace. All classes in your application should be * namespaced under the Application's name - for example if your application name is 'MyApp', your classes * should be named 'MyApp.model.User', 'MyApp.controller.Users', 'MyApp.view.Main' etc * @accessor */ name: null, /** * @cfg {String} appFolder The path to the directory which contains all application's classes. * This path will be registered via {@link Ext.Loader#setPath} for the namespace specified in the {@link #name name} config. * @accessor */ appFolder : 'app', /** * @cfg {Ext.app.Router} router The global {@link Ext.app.Router Router} instance attached to this Application. * @accessor * @readonly */ router: {}, /** * @cfg {Array} controllerInstances Used internally as the collection of instantiated controllers. Use {@link #getController} instead. * @private * @accessor */ controllerInstances: [], /** * @cfg {Array} profileInstances Used internally as the collection of instantiated profiles. * @private * @accessor */ profileInstances: [], /** * @cfg {Ext.app.Profile} currentProfile The {@link Ext.app.Profile Profile} that is currently active for the * Application. This is set once, automatically by the Application before launch. * @accessor * @readonly */ currentProfile: null, /** * @cfg {Function} launch An optional function that will be called when the Application is ready to be * launched. This is normally used to render any initial UI required by your application * @accessor */ launch: Ext.emptyFn, /** * @private * @cfg {Boolean} enableLoader Private config to disable loading of Profiles at application construct time. * This is used by Sencha's unit test suite to test _Application.js_ in isolation and is likely to be removed * in favor of a more pleasing solution by the time you use it. * @accessor */ enableLoader: true, /** * @cfg {String[]} requires An array of extra dependencies, to be required after this application's {@link #name} config * has been processed properly, but before anything else to ensure overrides get executed first. * @accessor */ requires: [], /** * @cfg {String} themeVariationPrefix Used only with {@link themeVariation} this prefix will be added before the variation as a class on the HTML * tag of your application. */ themeVariationPrefix: Ext.baseCSSPrefix + 'theme-variation-', /** * @cfg {String} themeVariationTransitionCls This is only used with {@link themeVariation}. The Class provided will be added to the HTML tag * then removed once the transition is complete. The duration of this delayed removal is parsed from the class itself, for example if the class * has the property 'transition: color 4s, background 6s, background-color 1s' the delay will be 6s (the largest time used in that class. * * @accessor */ themeVariationTransitionCls: null, /** * @cfg {String/Function} themeVariation A string to determine the variation on the current theme being used. This string will be prefixed by * {@link themeVariationPrefix} and the resulting string will be added to the HTML tag of your application. If a function is provided that function * must return a string. * * //This will result in 'x-theme-variation-dark' being added as a class to the html tag of your application * MyApp.app.setThemeVariation("dark"); * * @accessor */ themeVariation: null }, /** * Constructs a new Application instance. */ constructor: function(config) { config = config || {}; Ext.applyIf(config, { application: this }); this.initConfig(config); //it's common to pass in functions to an application but because they are not predictable config names they //aren't ordinarily placed onto this so we need to do it manually for (var key in config) { this[key] = config[key]; } // <deprecated product=touch since=2.0> if (config.autoCreateViewport) { Ext.Logger.deprecate( '[Ext.app.Application] autoCreateViewport has been deprecated in Sencha Touch 2. Please implement a ' + 'launch function on your Application instead and use Ext.create("MyApp.view.Main") to create your initial UI.' ); } // </deprecated> //<debug> Ext.Loader.setConfig({ enabled: true }); //</debug> Ext.require(this.getRequires(), function() { if (this.getEnableLoader() !== false) { Ext.require(this.getProfiles(), this.onProfilesLoaded, this); } }, this); }, /** * Dispatches a given {@link Ext.app.Action} to the relevant Controller instance. This is not usually called * directly by the developer, instead Sencha Touch's History support picks up on changes to the browser's url * and calls dispatch automatically. * @param {Ext.app.Action} action The action to dispatch. * @param {Boolean} [addToHistory=true] Sets the browser's url to the action's url. */ dispatch: function(action, addToHistory) { action = action || {}; Ext.applyIf(action, { application: this }); action = Ext.factory(action, Ext.app.Action); if (action) { var profile = this.getCurrentProfile(), profileNS = profile ? profile.getNamespace() : undefined, controller = this.getController(action.getController(), profileNS); if (controller) { if (addToHistory !== false) { this.getHistory().add(action, true); } controller.execute(action); } } }, /** * Redirects the browser to the given url. This only affects the url after the '#'. You can pass in either a String * or a Model instance - if a Model instance is defined its {@link Ext.data.Model#toUrl toUrl} function is called, * which returns a string representing the url for that model. Internally, this uses your application's * {@link Ext.app.Router Router} to decode the url into a matching controller action and then calls * {@link #dispatch}. * @param {String/Ext.data.Model} url The String url to redirect to. */ redirectTo: function(url) { if (Ext.data && Ext.data.Model && url instanceof Ext.data.Model) { var record = url; url = record.toUrl(); } var decoded = this.getRouter().recognize(url); if (decoded) { decoded.url = url; if (record) { decoded.data = {}; decoded.data.record = record; } return this.dispatch(decoded); } }, /** * @private * (documented on Controller's control config) */ control: function(selectors, controller) { //if the controller is not defined, use this instead (the application instance) controller = controller || this; var dispatcher = this.getEventDispatcher(), refs = (controller) ? controller.getRefs() : {}, selector, eventName, listener, listeners, ref; for (selector in selectors) { if (selectors.hasOwnProperty(selector)) { listeners = selectors[selector]; ref = refs[selector]; //refs can be used in place of selectors if (ref) { selector = ref.selector || ref; } for (eventName in listeners) { listener = listeners[eventName]; if (Ext.isString(listener)) { listener = controller[listener]; } dispatcher.addListener('component', selector, eventName, listener, controller); } } } }, /** * Returns the Controller instance for the given controller name. * @param {String} name The name of the Controller. * @param {String} [profileName] Optional profile name. If passed, this is the same as calling * `getController('profileName.controllerName')`. * @return {Ext.app.Controller} controller instance or undefined. */ getController: function(name, profileName) { var instances = this.getControllerInstances(), appName = this.getName(), format = Ext.String.format, topLevelName; if (name instanceof Ext.app.Controller) { return name; } if (instances[name]) { return instances[name]; } else { topLevelName = format("{0}.controller.{1}", appName, name); profileName = format("{0}.controller.{1}.{2}", appName, profileName, name); return instances[profileName] || instances[topLevelName]; } }, /** * @private * Callback that is invoked when all of the configured Profiles have been loaded. Detects the current profile and * gathers any additional dependencies from that profile, then loads all of those dependencies. */ onProfilesLoaded: function() { var profiles = this.getProfiles(), length = profiles.length, instances = [], requires = this.gatherDependencies(), current, i, profileDeps; for (i = 0; i < length; i++) { instances[i] = Ext.create(profiles[i], { application: this }); /* * Note that we actually require all of the dependencies for all Profiles - this is so that we can produce * a single build file that will work on all defined Profiles. Although the other classes will be loaded, * the correct Profile will still be identified and the other classes ignored. While this feels somewhat * inefficient, the majority of the bulk of an application is likely to be the framework itself. The bigger * the app though, the bigger the effect of this inefficiency so ideally we will create a way to create and * load Profile-specific builds in a future release. */ profileDeps = instances[i].getDependencies(); requires = requires.concat(profileDeps.all); if (instances[i].isActive() && !current) { current = instances[i]; this.setCurrentProfile(current); this.setControllers(this.getControllers().concat(profileDeps.controller)); this.setModels(this.getModels().concat(profileDeps.model)); this.setViews(this.getViews().concat(profileDeps.view)); this.setStores(this.getStores().concat(profileDeps.store)); } } this.setProfileInstances(instances); Ext.require(requires, this.loadControllerDependencies, this); }, /** * @private * Controllers can also specify dependencies, so we grab them all here and require them. */ loadControllerDependencies: function() { this.instantiateControllers(); var controllers = this.getControllerInstances(), classes = [], stores = [], i, controller, controllerStores, name; for (name in controllers) { controller = controllers[name]; controllerStores = controller.getStores(); stores = stores.concat(controllerStores); classes = classes.concat(controller.getModels().concat(controller.getViews()).concat(controllerStores)); } this.setStores(this.getStores().concat(stores)); Ext.require(classes, this.onDependenciesLoaded, this); }, /** * @private * Callback that is invoked when all of the Application, Controller and Profile dependencies have been loaded. * Launches the controllers, then the profile and application. */ onDependenciesLoaded: function() { var me = this, profile = this.getCurrentProfile(), launcher = this.getLaunch(), controllers, name; this.instantiateStores(); //<deprecated product=touch since=2.0> Ext.app.Application.appInstance = this; if (Ext.Router) { Ext.Router.setAppInstance(this); } //</deprecated> controllers = this.getControllerInstances(); for (name in controllers) { controllers[name].init(this); } if (profile) { profile.launch(); } launcher.call(me); for (name in controllers) { //<debug warn> if (controllers[name] && !(controllers[name] instanceof Ext.app.Controller)) { Ext.Logger.warn("The controller '" + name + "' doesn't have a launch method. Are you sure it extends from Ext.app.Controller?"); } else { //</debug> controllers[name].launch(this); //<debug warn> } //</debug> } me.redirectTo(window.location.hash.substr(1)); }, /** * @private * Gathers up all of the previously computed MVCS dependencies into a single array that we can pass to {@link Ext#require}. */ gatherDependencies: function() { var classes = this.getModels().concat(this.getViews()).concat(this.getControllers()); Ext.each(this.getStores(), function(storeName) { if (Ext.isString(storeName)) { classes.push(storeName); } }, this); return classes; }, /** * @private * Should be called after dependencies are loaded, instantiates all of the Stores specified in the {@link #stores} * config. For each item in the stores array we make sure the Store is instantiated. When strings are specified, * the corresponding _app/store/StoreName.js_ was loaded so we now instantiate a `MyApp.store.StoreName`, giving it the * id `StoreName`. */ instantiateStores: function() { var stores = this.getStores(), length = stores.length, store, storeClass, storeName, splits, i; for (i = 0; i < length; i++) { store = stores[i]; if (Ext.data && Ext.data.Store && !(store instanceof Ext.data.Store)) { if (Ext.isString(store)) { storeName = store; storeClass = Ext.ClassManager.classes[store]; store = { xclass: store }; //we don't want to wipe out a configured storeId in the app's Store subclass so need //to check for this first if (storeClass.prototype.defaultConfig.storeId === undefined) { splits = storeName.split('.'); store.id = splits[splits.length - 1]; } } stores[i] = Ext.factory(store, Ext.data.Store); } } this.setStores(stores); }, /** * @private * Called once all of our controllers have been loaded */ instantiateControllers: function() { var controllerNames = this.getControllers(), instances = {}, length = controllerNames.length, name, i; for (i = 0; i < length; i++) { name = controllerNames[i]; instances[name] = Ext.create(name, { application: this }); } return this.setControllerInstances(instances); }, /** * @private * As a convenience developers can locally qualify controller names (e.g. 'MyController' vs * 'MyApp.controller.MyController'). This just makes sure everything ends up fully qualified */ applyControllers: function(controllers) { return this.getFullyQualified(controllers, 'controller'); }, /** * @private * As a convenience developers can locally qualify profile names (e.g. 'MyProfile' vs * 'MyApp.profile.MyProfile'). This just makes sure everything ends up fully qualified */ applyProfiles: function(profiles) { return this.getFullyQualified(profiles, 'profile'); }, /** * @private * Checks that the name configuration has any whitespace, and trims them if found. */ applyName: function(name) { var oldName; if (name && name.match(/ /g)) { oldName = name; name = name.replace(/ /g, ""); // <debug> Ext.Logger.warn('Attempting to create an application with a name which contains whitespace ("' + oldName + '"). Renamed to "' + name + '".'); // </debug> } return name; }, /** * @private * Makes sure the app namespace exists, sets the `app` property of the namespace to this application and sets its * loading path (checks to make sure the path hadn't already been set via Ext.Loader.setPath) */ updateName: function(newName) { Ext.ClassManager.setNamespace(newName + '.app', this); if (!Ext.Loader.config.paths[newName]) { Ext.Loader.setPath(newName, this.getAppFolder()); } }, /** * @private */ applyRouter: function(config) { return Ext.factory(config, Ext.app.Router, this.getRouter()); }, /** * @private */ applyHistory: function(config) { var history = Ext.factory(config, Ext.app.History, this.getHistory()); history.on('change', this.onHistoryChange, this); return history; }, /** * @private */ onHistoryChange: function(url) { this.dispatch(this.getRouter().recognize(url), false); }, updateThemeVariation: function(newVariation, oldVariation) { var html = Ext.getBody().getParent(), themeVariationPrefix = this.getThemeVariationPrefix() || "", transitionCls = this.getThemeVariationTransitionCls(); if (Ext.isFunction(newVariation)) { newVariation = newVariation.call(this); } if(!Ext.isString(newVariation)) { Ext.Error.raise("Theme variation must be a String.'"); } if(transitionCls) { var css = "", duration = 0, rules = document.styleSheets[0].cssRules, i, rule, times, time; html.addCls(transitionCls); for(i in rules) { rule = rules[i]; if(rule.selectorText && rule.selectorText.indexOf("." + transitionCls) >=1) { css += rule.cssText; } } times = css.match(/[0-9]+s/g); for(i in times) { time = parseInt(times[i]); if(time > duration) { duration = time; } } if(this.$themeVariationChangeTimeout) { clearTimeout(this.$themeVariationChangeTimeout); this.$themeVariationChangeTimeout = null; } this.$themeVariationChangeTimeout = Ext.defer(function() { html.removeCls(transitionCls); }, time * 1000); } html.removeCls(themeVariationPrefix + oldVariation); html.addCls(themeVariationPrefix + newVariation); } }, function() { // <deprecated product=touch since=2.0> Ext.regApplication = function(config) { Ext.Logger.deprecate( '[Ext.app.Application] Ext.regApplication() is deprecated, please replace it with Ext.application()' ); var appName = config.name, format = Ext.String.format; Ext.ns( appName, format("{0}.controllers", appName), format("{0}.models", appName), format("{0}.views", appName) ); Ext.application(config); }; Ext.define('Ext.data.ProxyMgr', { singleton: true, registerType: function(name, cls) { Ext.Logger.deprecate( 'Ext.data.ProxyMgr no longer exists - instead of calling Ext.data.ProxyMgr.registerType just update ' + 'your custom Proxy class to set alias: "proxy.' + name + '"' ); Ext.ClassManager.setAlias(cls, "proxy." + name); } }); Ext.reg = function(alias, cls) { Ext.Logger.deprecate( 'Ext.reg is deprecated, please set xtype: "' + alias + '" directly in your subclass instead' ); Ext.ClassManager.setAlias(cls, alias); }; Ext.redirect = function() { var app = Ext.app.Application.appInstance; Ext.Logger.deprecate('[Ext.app.Application] Ext.redirect is deprecated, please use YourApp.redirectTo instead'); if (app) { app.redirectTo.apply(app, arguments); } }; Ext.dispatch = function() { var app = Ext.app.Application.appInstance; Ext.Logger.deprecate('[Ext.app.Application] Ext.dispatch is deprecated, please use YourApp.dispatch instead'); if (app) { app.dispatch.apply(app, arguments); } }; // </deprecated> });


Influence of Feature Selection and PCA on a Small Dataset
November 23, 2017
scikit-learn machine learning feature selection PCA cross-validationThis study covers the influence of feature selection and PCA on the Titanic Survivors dataset. Most of the preprocessing code such as data cleaning, encoding and transformation is adapted from the Scikit-Learn ML from Start to Finish work by Jeff Delaney.
Import Data
Load the csv train and test files into a pandas dataframe and print the first 5 rows to see a sample of the data. Print also a statistics description of each feature.
Show/Hide code
import pandas as pd
train_df = pd.read_csv("train.csv")
test_df = pd.read_csv("test.csv")
train_df.head()
| PassengerId | Survived | Pclass | Name | Sex | Age | SibSp | Parch | Ticket | Fare | Cabin | Embarked | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 3 | Braund, Mr. Owen Harris | male | 22.0 | 1 | 0 | A/5 21171 | 7.2500 | NaN | S |
| 1 | 2 | 1 | 1 | Cumings, Mrs. John Bradley (Florence Briggs Th... | female | 38.0 | 1 | 0 | PC 17599 | 71.2833 | C85 | C |
| 2 | 3 | 1 | 3 | Heikkinen, Miss. Laina | female | 26.0 | 0 | 0 | STON/O2. 3101282 | 7.9250 | NaN | S |
| 3 | 4 | 1 | 1 | Futrelle, Mrs. Jacques Heath (Lily May Peel) | female | 35.0 | 1 | 0 | 113803 | 53.1000 | C123 | S |
| 4 | 5 | 0 | 3 | Allen, Mr. William Henry | male | 35.0 | 0 | 0 | 373450 | 8.0500 | NaN | S |
Show/Hide code
train_df.describe()
| PassengerId | Survived | Pclass | Age | SibSp | Parch | Fare | |
|---|---|---|---|---|---|---|---|
| count | 891.000000 | 891.000000 | 891.000000 | 714.000000 | 891.000000 | 891.000000 | 891.000000 |
| mean | 446.000000 | 0.383838 | 2.308642 | 29.699118 | 0.523008 | 0.381594 | 32.204208 |
| std | 257.353842 | 0.486592 | 0.836071 | 14.526497 | 1.102743 | 0.806057 | 49.693429 |
| min | 1.000000 | 0.000000 | 1.000000 | 0.420000 | 0.000000 | 0.000000 | 0.000000 |
| 25% | 223.500000 | 0.000000 | 2.000000 | 20.125000 | 0.000000 | 0.000000 | 7.910400 |
| 50% | 446.000000 | 0.000000 | 3.000000 | 28.000000 | 0.000000 | 0.000000 | 14.454200 |
| 75% | 668.500000 | 1.000000 | 3.000000 | 38.000000 | 1.000000 | 0.000000 | 31.000000 |
| max | 891.000000 | 1.000000 | 3.000000 | 80.000000 | 8.000000 | 6.000000 | 512.329200 |
Visualise Data
To familiarise with the data and discover underlying patterns to exploit later in the machine learning models, we need to create some distribution, bar, and scatter plots. For a complete visualisation analysis check Scikit-Learn ML from Start to Finish work and my previous work here.
Engineer Features
- Aside from ‘Sex’, the ‘Age’ feature is second in importance. To avoid overfitting, group people into logical human age groups.
- Each ‘Cabin’ starts with a letter. Probably, this letter is more important than the number that follows, so slice it off.
- ‘Fare’ is another continuous value that should be simplified, placing the values into quartile bins accordingly.
- Extract information from the ‘Name’ feature. Rather than use the full name, extract the last name and prefix and then append them as their own features.
- Lastly, drop useless features (‘Ticket’, ‘Name’, and ‘Embarked’).
Show/Hide code
# Code adapted from https://www.kaggle.com/jeffd23/scikit-learn-ml-from-start-to-finish
def simplify_ages(df):
df.Age = df.Age.fillna(-0.5)
bins = (-1, 0, 5, 12, 18, 25, 35, 60, 120)
group_names = ['Unknown', 'Baby', 'Child', 'Teenager', 'Student', 'Young Adult', 'Adult', 'Senior']
categories = pd.cut(df.Age, bins, labels=group_names)
df.Age = categories
return df
def simplify_cabins(df):
df.Cabin = df.Cabin.fillna('N')
df.Cabin = df.Cabin.apply(lambda x: x[0])
return df
def simplify_fares(df):
df.Fare = df.Fare.fillna(-0.5)
bins = (-1, 0, 8, 15, 31, 1000)
group_names = ['Unknown', '1_quartile', '2_quartile', '3_quartile', '4_quartile']
categories = pd.cut(df.Fare, bins, labels=group_names)
df.Fare = categories
return df
def format_name(df):
df['Lname'] = df.Name.apply(lambda x: x.split(' ')[0])
df['NamePrefix'] = df.Name.apply(lambda x: x.split(' ')[1])
return df
def drop_features(df):
return df.drop(['Ticket', 'Name', 'Embarked'], axis=1)
def transform_features(df):
df = simplify_ages(df)
df = simplify_cabins(df)
df = simplify_fares(df)
df = format_name(df)
df = drop_features(df)
return df
train_df = transform_features(train_df)
test_df = transform_features(test_df)
train_df.head()
| PassengerId | Survived | Pclass | Sex | Age | SibSp | Parch | Fare | Cabin | Lname | NamePrefix | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 3 | male | Student | 1 | 0 | 1_quartile | N | Braund, | Mr. |
| 1 | 2 | 1 | 1 | female | Adult | 1 | 0 | 4_quartile | C | Cumings, | Mrs. |
| 2 | 3 | 1 | 3 | female | Young Adult | 0 | 0 | 1_quartile | N | Heikkinen, | Miss. |
| 3 | 4 | 1 | 1 | female | Young Adult | 1 | 0 | 4_quartile | C | Futrelle, | Mrs. |
| 4 | 5 | 0 | 3 | male | Young Adult | 0 | 0 | 2_quartile | N | Allen, | Mr. |
Encode Data
Normalize and transform categorical non-numerical features to numerical with the LabelEncoder
tool from scikit-learn
, making out data more flexible for various algorithms.
Show/Hide code
from sklearn import preprocessing
def encode_features(df_train, df_test):
features = ['Fare', 'Cabin', 'Age', 'Sex', 'Lname', 'NamePrefix']
df_combined = pd.concat([df_train[features], df_test[features]])
for feature in features:
le = preprocessing.LabelEncoder()
le = le.fit(df_combined[feature])
df_train[feature] = le.transform(df_train[feature])
df_test[feature] = le.transform(df_test[feature])
return df_train, df_test
train_df, test_df = encode_features(train_df, test_df)
train_df.head()
| PassengerId | Survived | Pclass | Sex | Age | SibSp | Parch | Fare | Cabin | Lname | NamePrefix | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 3 | 1 | 4 | 1 | 0 | 0 | 7 | 100 | 19 |
| 1 | 2 | 1 | 1 | 0 | 0 | 1 | 0 | 3 | 2 | 182 | 20 |
| 2 | 3 | 1 | 3 | 0 | 7 | 0 | 0 | 0 | 7 | 329 | 16 |
| 3 | 4 | 1 | 1 | 0 | 7 | 1 | 0 | 3 | 2 | 267 | 20 |
| 4 | 5 | 0 | 3 | 1 | 7 | 0 | 0 | 1 | 7 | 15 | 19 |
Machine Learning
Split Data to Train/Test Sets
Create train/test sets using the train_test_split
function. The test_size=0.2
indicates the percentage of the data that should be held over for testing.
Show/Hide code
from sklearn.model_selection import train_test_split
# Define the independent variables as features.
Xs = train_df.drop(['PassengerId', 'Survived'], axis=1)
# Define the target (dependent) variable as labels.
Ys = train_df['Survived']
# Create a train/test split using 30% test size.
X_train, X_test, y_train, y_test = train_test_split(Xs,
Ys,
test_size=0.2,
random_state=23)
# Check the split printing the shape of each set.
print(X_train.shape, y_train.shape)
print(X_test.shape, y_test.shape)
(712, 9) (712,)
(179, 9) (179,)
Evaluate Algorithms
Test and evaluate 5 algorithms: 1. Naive Bayes 2. Support Vector Machines 3. K Nearest Neighbors 4. Random Forest 5. AdaBoost
Validate
Measure the effectiveness of the algorithm applying KFold
. Split the data into 50 buckets, then run the algorithm using a different bucket as the test set for each iteration. Turn shuffle=True
to shuffle the data points’ order before splitting into folds.
Show/Hide code
import numpy as np
from sklearn.naive_bayes import GaussianNB
from sklearn.svm import SVC
from sklearn.tree import DecisionTreeClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.model_selection import KFold
from time import time
# Create the classifiers.
nb = GaussianNB()
svc = SVC()
dtc = DecisionTreeClassifier()
knc = KNeighborsClassifier()
rfc = RandomForestClassifier()
abc = AdaBoostClassifier()
# Create a dictionary of classifiers to choose from.
classifiers = {"GaussianNB": nb, "SVM": svc, "Decision Trees": dtc,
"KNN": knc, "Random Forest": rfc, "AdaBoost": abc}
# Create a function that runs and evaluates the classifiers.
def test_clfs(clf):
# Create the KFold cross validation iterator.
kf = KFold(n_splits=50, shuffle=True, random_state=23)
outcomes = []
fold = 0
for train_index, test_index in kf.split(Xs):
t0 = time()
fold += 1
X_train, X_test = Xs.values[train_index], Xs.values[test_index]
y_train, y_test = Ys.values[train_index], Ys.values[test_index]
# Fit the classifier to the data.
clf.fit(X_train, y_train)
# Create a set of predictions.
predictions = clf.predict(X_test)
# Evaluate predictions with accuracy score.
accuracy = clf.score(X_test, y_test)
outcomes.append(accuracy)
mean_outcome = np.mean(outcomes)
# Print the results.
print("\nMean Accuracy: {0}".format(mean_outcome))
print("\nTime passed: ", round(time() - t0, 3), "s\n")
for name, clf in classifiers.items():
print("#"*55)
print(name)
test_clfs(clf)
#######################################################
GaussianNB
Mean Accuracy: 0.7601960784313725
Time passed: 0.002 s
#######################################################
SVM
Mean Accuracy: 0.6271895424836601
Time passed: 0.03 s
#######################################################
Decision Trees
Mean Accuracy: 0.7644444444444445
Time passed: 0.002 s
#######################################################
KNN
Mean Accuracy: 0.5996078431372549
Time passed: 0.002 s
#######################################################
Random Forest
Mean Accuracy: 0.8041176470588235
Time passed: 0.02 s
#######################################################
AdaBoost
Mean Accuracy: 0.8263398692810456
Time passed: 0.088 s
- Select Adaboost as the best algorithm, since it gives the best accuracy scores.
Influence of Feature Selection & PCA
Investigate if Feature Selection and PCA
can improve the performance of Random Forest.
Feature Selection
Select the best features with SelectKBest
, which removes all but the k highest scoring features.
PCA
Reduce the dimensionnality of the data using the Principal Component Analysis (PCA
).
Dimensionality Reduction
Use GridSearchCV
and Pipeline
to optimize over different classes of estimators. Compare unsupervised PCA
dimensionality reduction to univariate feature selection SelectKBest
during the grid search.
Show/Hide code
from sklearn.feature_selection import SelectKBest
from sklearn.decomposition import PCA
from sklearn.model_selection import GridSearchCV, KFold
from sklearn.pipeline import Pipeline
from sklearn.metrics import make_scorer, accuracy_score, classification_report, confusion_matrix
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# Create the classifier.
clf = AdaBoostClassifier()
# Create the pipeline.
pipeline = Pipeline([('reduce_dim', PCA()),
('clf', clf)])
# Create the parameters.
n_feature_options = [1, 2, 3, 4, 5, 6, 7, 8, 9]
n_estimators = [50]
parameters = [{'reduce_dim': [PCA(iterated_power=7)],
'reduce_dim__n_components': n_feature_options,
'clf__n_estimators': n_estimators},
{'reduce_dim': [SelectKBest()],
'reduce_dim__k': n_feature_options,
'clf__n_estimators': n_estimators}]
reducer_labels = ['PCA', 'KBest()']
# Create a function to get the best estimator and print the reports.
def compare_estimators():
t0 = time()
# Create the KFold cross-validator.
kf = KFold(n_splits=50, shuffle=True, random_state=23)
# Create accuracy score to compare each combination.
scoring = {'Accuracy': make_scorer(accuracy_score)}
# Create the grid search.
grid = GridSearchCV(estimator=pipeline,
param_grid=parameters,
scoring=scoring,
cv=kf, refit='Accuracy')
# Fit grid search combinations.
grid.fit(X_train, y_train)
# Make predictions.
predictions = grid.predict(X_test)
# Evaluate using sklearn.classification_report().
report = classification_report(y_test, predictions)
# Get the best parameters and scores.
best_parameters = grid.best_params_
best_score = grid.best_score_
mean_scores = np.array(grid.cv_results_['mean_test_Accuracy'])
# scores are in the order of param_grid iteration, which is alphabetical
mean_scores = mean_scores.reshape(len(n_estimators), -1, len(n_feature_options))
# select score for best C
mean_scores = mean_scores.max(axis=0)
bar_offsets = (np.arange(len(n_feature_options)) *
(len(reducer_labels) + 1) + .5)
plt.figure(figsize=(10, 5))
for i, (label, reducer_scores) in enumerate(zip(reducer_labels, mean_scores)):
plt.bar(bar_offsets + i, reducer_scores, label=label)
plt.title("Comparing feature reduction techniques")
plt.xlabel('Reduced number of features')
plt.xticks(bar_offsets + len(reducer_labels) / 2, n_feature_options)
plt.ylabel('Accuracy')
plt.ylim((0, 1))
plt.legend(loc='upper left')
# Print the results.
print("\nAccuracy score: ", accuracy_score(y_test, predictions))
print("\nReport:\n")
print(report)
print("\nBest Mean Accuracy score: ", best_score)
print("\nBest parameters:\n")
print(best_parameters)
print(confusion_matrix(y_test, predictions))
print("Time passed: ", round(time() - t0, 3), "s")
return grid.best_estimator_
compare_estimators()
Accuracy score: 0.821229050279
Report:
precision recall f1-score support
0 0.85 0.87 0.86 115
1 0.76 0.73 0.75 64
avg / total 0.82 0.82 0.82 179
Best Mean Accuracy score: 0.817415730337
Best parameters:
{'clf__n_estimators': 50, 'reduce_dim': SelectKBest(k=9, score_func=<function f_classif at 0x116dfee18>), 'reduce_dim__k': 9}
[[100 15]
[ 17 47]]
Time passed: 101.808 s
Pipeline(memory=None,
steps=[('reduce_dim', SelectKBest(k=9, score_func=<function f_classif at 0x116dfee18>)), ('clf', AdaBoostClassifier(algorithm='SAMME.R', base_estimator=None,
learning_rate=1.0, n_estimators=50, random_state=None))])
- It seems that
SelectKBest
performs better thanPCA
for all the cases, but the accuracy score has not improved significantly after dimensionality reduction. Actually, it was found that the best model keeps all the features (k=9).
Tune
To get an improved performance, optimise the hyperparameters that impact the model using GridSearchCV
. The effectiveness of the algorithm is validated with StratifiedShuffleSplit
and the evaluation with multiple metrics such as accuracy, precision, and recall.
Show/Hide code
from sklearn.model_selection import StratifiedShuffleSplit
# Create the classifier.
clf = AdaBoostClassifier()
# Create the parameters.
parameters = {'n_estimators': [10, 25, 50, 75],
'algorithm': ['SAMME', 'SAMME.R'],
'random_state': [3]}
# Find the best estimator and print the reports.
t0 = time()
# Create the Stratified ShuffleSplit cross-validator.
sss = StratifiedShuffleSplit(n_splits=50, test_size=0.2, random_state=3)
# Create multiple evaluation metrics to compare each combination.
scoring = {'AUC': 'roc_auc',
'Accuracy': make_scorer(accuracy_score),
'Precision': 'precision',
'Recall': 'recall',
'f1': 'f1'}
# Create the grid search.
grid = GridSearchCV(estimator=clf,
param_grid=parameters,
scoring=scoring,
cv=sss, refit='Accuracy')
# Fit grid search combinations.
grid.fit(X_train, y_train)
# Make predictions.
predictions = grid.predict(X_test)
# Evaluate using sklearn.classification_report().
report = classification_report(y_test, predictions)
# Get the best parameters and scores.
best_parameters = grid.best_params_
best_score = grid.best_score_
# Print the results.
print("\nAccuracy score: ", accuracy_score(y_test, predictions))
print("\nReport:\n")
print(report)
print("\nBest Accuracy score: ", best_score)
print("\nBest parameters:\n")
print(best_parameters)
print(confusion_matrix(y_test, predictions))
print("Time passed: ", round(time() - t0, 3), "s")
best_clf = grid.best_estimator_
Accuracy score: 0.821229050279
Report:
precision recall f1-score support
0 0.85 0.87 0.86 115
1 0.76 0.73 0.75 64
avg / total 0.82 0.82 0.82 179
Best Accuracy score: 0.819300699301
Best parameters:
{'algorithm': 'SAMME.R', 'n_estimators': 25, 'random_state': 3}
[[100 15]
[ 17 47]]
Time passed: 42.804 s
Predict the Actual Test Data
Finally, make the predictions and export them to a csv file.
Show/Hide code
passenger_ids = test_df['PassengerId']
predictions = best_clf.predict(test_df.drop('PassengerId', axis=1))
output = pd.DataFrame({ 'PassengerId' : passenger_ids, 'Survived': predictions })
output.to_csv('titanic_predictions.csv', index = False)
output.head()
| PassengerId | Survived | |
|---|---|---|
| 0 | 892 | 0 |
| 1 | 893 | 0 |
| 2 | 894 | 0 |
| 3 | 895 | 0 |
| 4 | 896 | 1 |


Jaikrishna got graduted and left the ACIS lab. We really appreciate what he has done for the ACIS lab, espesially in GRAPLEr project and wish him the all the best.


This Week in Rust
Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safe, concurrent, and fast. This is a weekly summary of its progress and community. Want something mentioned? Send me an email! Want to get involved? We love contributions.
The 0.10 release will likely be this week. 3 months from 0.9 is April 3.
What’s cooking on master?
63 pull requests were merged this week.
Breaking Changes
- The
sync
crate has seen some significant cleanup. In particular,RWArc<T>
andMutexArc<T>
have been removed.Mutex<T>
andRWLock<T>
have been introduced, and can be used asArc<Mutex<T>>
andArc<RWLock<T>>
to replaceRWArc
andMutexArc
. There are some other minor changes, see the pull request. - Taking a reference to a static whose type contains an
Unsafe<T>
somewhere is now forbidden. Extendable
andFromIterator
now take their argument by-value.- The crate map has been
removed, and with it a
significant amount of complexity. As a consequence of its removal,
green::start
now takes the event loop it should use as an argument rather than looking in the crate map. The documentation has an example - The syntax for bounds on generic paths has
changed from
Foo:Bound<Params>
toFoo<Params>:Bound
. - The default
Send
bound on trait objects has been removed. - The
serialize
infrastructure now supports error reporting viaResult
. Pod
has been renamed toCopy
.- The attribute syntax has
changed. Rather than saying
#[crate_type = "bin"];
(with a significant semicolon), you say#![crate_type = "bin"]
(no semicolon). collections::List
has been removed. Use a vector, orcollections::DList
if you really want a linked list. Persistent data structures will live in a different crate thancollections
.
Other Changes
- A
fill
method has been added toReader
, for reading an exact amount of bytes or erroring. - As discussed on the mailing list some months ago, synchronous, bounded channels have been added.
Share
’s documentation has been expanded.- A straggler from the doc sprint, a few hundred lines of
documentation have been added
to
std
. - Some handy methods have been
added to
Json
to make searching and selecting elements from JSON objects easier. - There’s a new warn-by-default lint for deriving traits on types which contain raw pointers.
- Many confusing lifetime-related ICE’s have been fixed. This is good progress towards closing the notorious issue 5121.
- We can now emit debuginfo for
static
s. Yay debuginfo!
New Contributors
- Davis Silverman
- Noam Gagliardi Rabinovich
- Sean McArthur
Weekly Meeting
The meeting this
week
discussed various things: attribute parsing in macros, opt-in built-in traits,
SIMD, allowing square brackets in macro invocation, allowing bounds on type
parameters in structs, private fields by default, the fate of
collections::List
, and bounds on trait paths.
RFCs
Project Updates
- rust-highlight can be used to highlight Rust code in LaTeX, HTML, and JSON.
- rust-tabular, a library for handling delimiter-separated values (commas, tabs, or any other character), as well as fixed columns of fixed width.
- rust-csv, a CSV library which
implements
Encoder
andDecoder
forserialize
support.
This Week in Servo
Servo is a web browser engine written in Rust and is one of the primary test cases for the Rust language.
In the last two weeks, we landed 33 PRs.
Notable additions
- Lars Bergstrom landed a Rust upgrade, bringing us to late February in #1934
- ms2ger cleaned up some sketchy use of unsafe native pointers, wrapping them
in a
JS<T>
in #1915 - Matt Brubeck named the WorkQueue tasks so that we’ll know where failure is coming from during parallel layout in #1977
New contributors
- Matt Brubeck (mbrubeck)
Meetings and Notes
Patrick Walton authored and combined the final set of changes required to get Servo passing ACID2!
Matthew Brubeck has joined the Servo team full-time, coming over from the Firefox Metro project.
In the meeting two weeks ago, we discussed the Rust upgrade, z-index support, and ACID2. In the most recent meeting, we provided an update on ACID2 and the status of Servo on Android.


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Serves 8
A tremendous meal to serve a large group. Tender braised lamb served with creamy cabbage and potato mash and a zingy herb and lemon gremolata.
For the lamb shanks, place a really large casserole on a high heat. Season the lamb shanks all over. Add the oil and, working in batches, sear the lamb shanks all over until golden-brown, transferring them to a large plate as you go.
Next, reduce the heat to medium and add the onions, celery and carrots to the pan. Cook for 6-8 minutes until soft but not coloured, adding the garlic for the last minute. Mix in the flour.
Increase the heat and then add the wine, allowing it to bubble down for a minute or two. Now add the tomato purée, then the rosemary and bay leaf. Season well with salt and pepper.
Return the lamb shanks to the pan, pour over the stock and cover with a tight fitting lid. Bring to the boil and then reduce to a very gentle simmer for about 3 hours. Turn the shanks occasionally during this time. Once cooked, the meat from the lamb shanks should be really tender and just falling off the bone.
Meanwhile, prepare the gremolata. Simply toss the mint, lemon zest, parsley and garlic together in a small bowl. Cover and chill until serving.
Half an hour before serving, prepare the mash. Cook the potatoes in a large pan of boiling salted water for 15-20 minutes or until tender. While the potatoes cook, steam the cabbage until just tender. Warm the milk and butter in a small pan until just boiling then remove from the heat.
Drain the potatoes well. Add the milk and butter mixture and mash until smooth. Stir the cabbage through to wilt completely and season to taste. Cover and keep warm.
To serve, spoon a large dollop of creamy mash into the centre of each serving bowl or plate. Sit a lamb shank on top, spoon the sauce over and scatter generously with the gremolata.


E-PASS APPLICATION FORM
TRAVEL DETAILS
Reason for travelling:
Marriage
Death of close relative
Official Work
Medical Emergency
State:
Tamil Nadu
Date:
FROM
District:
Coimbatore
Chennai
Dindigul
Street Name:
House Number:
Pincode:
TO
District:
Coimbatore
Chennai
Dindigul
Street Name:
House Number:
Pincode:
Type of Vehicle:
Vehicle Number:
SUBMIT


An endpoint is anything you want to monitor.
When you enter the fully qualified domain name of your endpoint, worldPing will automatically detect what is available to monitor (eg. PING, HTTP, HTTPS) and suggest a customizable set of defaults unique to your endpoint.


{% extends "page_with_title_and_lede.html" %}
{% load i18n %}
{% load markdown_deux_tags %}
{% block head_title %}Speak at North Bay Python{% endblock %}
{% block heading %}Speak at North Bay Python{% endblock %}
{% block body_class %}program{% endblock %}
{% block lede %}
North Bay Python is seeking speakers of all experience levels to contribute to our conference program! We'd love to hear from you whether you use Python professionally, as a hobbyist, or are just excited about Python, programming, and free and open source software.
{% endblock %}
{% block content %}
{% markdown %}
{% include "static_pages/speak.md" %}
{% endmarkdown %}
{% endblock %}


Code of conduct and enforcement
This Code of Conduct outlines our expectations for all attendees, including organisers, of the Binder Workshops. This code also details steps for reporting unacceptable behaviour. Organisers will enforce this code throughout the event. We expect cooperation from all participants to help ensure a safe environment for everybody.
The organisers of the workshops are committed to providing a harassment-free work environment for everyone regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age, religion or work experience. We do not tolerate harassment of event participants in any form. Sexual language and imagery is not appropriate for any professional event. Event participants violating these rules may be sanctioned or expelled from the event without any pecuniary reimbursement at the discretion of the organisers.
We also have a set of Participation guidelines for the events events.
Harassment includes, but is not limited to:
- Verbal comments that reinforce social structures of domination related to gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age, religion or work experience
- Sexual images in public spaces
- Deliberate intimidation, stalking or following
- Harassing photography or recording
- Sustained disruption of the Event
- Uninvited physical contact
- Unwelcome sexual attention
- Advocating for, or encouraging, any of the above behaviour
Anything that makes someone feel uncomfortable could be deemed harassment. For more information about what constitutes harassment and examples, please refer to OpenCon’s Code of Conduct in Brief and the Gathering for Open Source Hardware’s examples of behaviour
Enforcement
Participants (including organisers) asked to stop any harassing behaviour are expected to comply immediately. If a participant engages in harassing behaviour, event organisers retain the right to take any actions to keep the event a welcoming environment for all participants. This includes warning the offender or expulsion from the event.
Event organisers may take action to redress anything designed to disrupt, or with the clear impact of disrupting, the event or making the environment hostile for any participants.
We expect participants to follow these rules at all event venues (including online) and event-related social activities.
Reporting
If someone makes you or anyone else feel unsafe or unwelcome, please report it as soon as possible. Harassment and other Code of Conduct violations reduce the value of our event for everyone. We want you to be happy at our event. People like you make our event a better place.
You can make a report either personally or anonymously. All reports will be handled with discretion.
You can make a personal report directly to one of the two contact people on site at each event. Their details will be shared at the start of the event. You can also contact Bastian Greshake Tzovaras<EMAIL_ADDRESS>at any time before, during or after an event.
Acknowledgements
This Code of Conduct is based on the example anti-harassment policy from Geek Feminism wiki, created by the Ada Initiative and other volunteers (CC0), the http://www.opencon2017.org/code_of_conduct, and the eLife innovation sprint Code of Conduct.


Government reiterates commitment to support GRA
by Patience Gbeze, GNAAccra, Nov. 13, GNA - Government has reiterated its commitment to provide the necessary support to the Ghana Revenue Authority (GRA) in their ongoing reforms for 2020 and the medium term to optimize revenue collection.
The full year yield from the 2019 midyear revenue measures are expected to be robust in 2020 to complement tax compliance efforts.
Mr Ken Ofori–Atta, Minister of Finance said this on Wednesday in Parliament when he presented the 2020 Budget Statement and economic policies.
He said Government would pursue various revenue measures, to boost domestic revenue.
That, he said, include renewal and extension of the National Fiscal Stabilisation Levy and Special Import Levies (SIL) for five years (5) to support the Budget.
“In line with Government policy, the personal income tax band will be adjusted and the necessary Parliamentary approval sought to ensure that the 12 percent minimum wage increase for 2020 is tax- exempt,” he said.
He noted that Personal Reliefs such as marriage relief, child education relief and old age relief, which were last adjusted in 2015 would also be reviewed upwards, consistent with government commitment to support families.
To address the challenges of revenue mobilisation, the Finance Minister said Government would restructure the tax system and develop a comprehensive revenue policy and strategy.
“The Ghana Revenue Authority (GRA) occupies a critical position in the economy and is responsible for approximately 70 percent of domestic revenues. After 10 years of integration, Government is ready to carry out the next generation of reforms in revenue administration”.
He said: “A transformation programmme centred on the three main themes of People, Technology, and Service will be structured with the new leadership of the GRA to create a 'NEW GRA' that will reflect the very best of efficiency and productivity.
GNA


Match Play. Red trails 2-5 to 7.
This is definitely a pay me now position, even for money as White is improving, so now is the time to take a risk with 13/9, 13/11. Playing 6/2, 3/1 or 5/1, 3/1 just postpones the problem of clearing the mid-point.
At the match score the move is even clearer because of the extra gammons it generates when White’s blot on his 2-pt is picked up.
This is definitely a pay me now position, even for money as White is improving, so now is the time to take a risk with 13/9, 13/11. Playing 6/2, 3/1 or 5/1, 3/1 just postpones the problem of clearing the mid-point.
At the match score the move is even clearer because of the extra gammons it generates when White’s blot on his 2-pt is picked up.
1. Cubeful 2-ply 13/11 13/9 Eq.: +0.420 0.603 0.151 0.003 - 0.397 0.069 0.002 2. Cubeful 2-ply 6/2 3/1 Eq.: +0.342 (-0.078) 0.620 0.074 0.000 - 0.380 0.046 0.000 3. Cubeful 2-ply 5/1 3/1 Eq.: +0.322 (-0.098) 0.614 0.068 0.000 - 0.386 0.046 0.000 4. Cubeful 2-ply 13/11 6/2 Eq.: +0.293 (-0.127) 0.547 0.142 0.002 - 0.453 0.079 0.002 5. Cubeful 2-ply 6/2 5/3 Eq.: +0.278 (-0.142) 0.590 0.070 0.000 - 0.410 0.050 0.000


@(title: String)(enc: String)(plain: String)
Encrypted: @enc Decrypted: @plain
Now reload this page and see if the Encrypted string changes.


Update template after it has been created and populated and stuff.
It automatically updates all its instances with the new template.
Try editing the template. Add "{id}" to the end and see what happens.
{col4}


'Stanford Steve' and 'The Bear': Week 13 college football picks, bets, nuggets
by Chris Fallica, Steve CoughlinWhat's in store for this week in college football?
"Stanford Steve" Coughlin and Chris "The Bear" Fallica break down Week 13 of the season as only they can, offering their top bets, nuggets, games to stay away from and a special money-line underdog parlay to jump on.
With the season in full swing, the guys are ready to continue their prognostications. Here we go with Week 13 picks.
The plays
Stanford Steve (3-2 last week, 32-27-2 overall)
The Bear (2-2 last week, 29-25-1 overall)
Air Force Falcons (-22, 55.5) at New Mexico Lobos
Stanford Steve: The Lobos have been decimated by injuries this season. They most recently lost running backs Bryson Carroll and Ahmari Davis and are down to 57 scholarship players after enduring 14 season-ending injuries. They don't have enough scout-team running backs to help prep for the vaunted Air Force rush attack. New Mexico started the season 2-1 and has since lost seven in a row. It seems like the Lobos don't have enough to keep it close.
Pick: