Assignment 4¶
WARNING!!! If you see this icon on the top of your COLAB sesssion, your work is not saved automatically.
When you are working on homeworks, make sure that you save often. You may find it easier to save intermident copies in Google drive. If you save your working file in Google drive all changes will be saved as you work. MAKE SURE that your final version is saved to GitHub.
Before you turn this problem in, make sure everything runs as expected. First, restart the kernel (in the menubar, select Kernel → Restart) and then run all cells (in the menubar, select Cell → Run All). You can speak with others regarding the assignment but all work must be your own.
This is a 30 point assignment graded from answers to questions and automated tests that should be run at the bottom. Be sure to clearly label all of your answers and commit final tests at the end.¶
files = "https://github.com/rpi-techfundamentals/introml_website_fall_2020/raw/master/files/assignment4.zip"
!pip install otter-grader && wget $files && unzip -o assignment4.zip
#Run this. It initiates autograding.
import otter
grader = otter.Notebook()
Exercise - Seaborn¶
#Import and load some libraries
import numpy as np
import pandas as pd
from scipy import stats, integrate
import matplotlib.pyplot as plt
import seaborn as sns
titanic = sns.load_dataset("titanic")
import grading_object_detection as god
(S1) Create the following figure using the Titanic dataset (included with Seaborn). Output the file to hm4-1.png in the current directory.
#Answer
#Test
grader.check('q01')
(S2) Create the following figure using the Titanic dataset (included with Seaborn). Output the plot to hm4-2.png in the current directory.
#Answer
grader.check('q02')
(S3) Create the following figure using the Titanic dataset (included with Seaborn). Output the plot to hm4-3.png in the current directory.
#Answer
grader.check('q03')
#Please provide an interpretation for the graph provided in question 3.
man4="""
"""
(S5) Create the following figure using the Titanic dataset (included with Seaborn). Output the plot to hm4-5.png in the current directory.
#Answer
grader.check('q05')
Exercise-Beautiful Soup¶
Imagine you would like to write a simple python script that pulls in data from https://webrobots.io/kickstarter-datasets/.
First go to the above website.
To do that, we would have to get all the links. Here is some starter code that will download the url into a soup object.
#This will pull the data
from bs4 import BeautifulSoup
import requests
response = requests.get("https://webrobots.io/kickstarter-datasets/")
html_doc = response.text
soup = BeautifulSoup(html_doc, 'html.parser')
print(soup.prettify())
#This will pull the data
from bs4 import BeautifulSoup
import requests
response = requests.get("https://webrobots.io/kickstarter-datasets/")
html_doc = response.text
soup = BeautifulSoup(html_doc, 'html.parser')
print(soup.prettify())
(bs1) Look through the html and find the links to the files that we want. Set the variable file_url
to be equal to the url of the files that we want to get
#update base url up to but not including the first /
file_url= "https://**************"
grader.check('bs1')
(bs2) Before we try to get the links, lets make sure we can parse the web page. Set the value of the variable page_title
equal to the contents inside the page <title>
tag. The variable page_title
should not include the title tag (i.e., the <title>
).
#answer
grader.check('bs2')
(bs3) We talked about both regular expressions and beautiful soup. Here is an example of how you could combine them to match a pattern.
import re
soup.find("a", href=re.compile(file_url), href=True)
Further process the data so that you get a list equal to all of the links to the json files json_links
and a list equal to all the csv files csv_links
.
#Answer
grader.check('bs3')
Regular Expressions¶
Regular expressions is a useful way of parsing through string data.
(RE1) Please complete a function blind_text
that accepts a text string and does the the following transformations.
Change
text
to lower case.Remove all emails and substitute them with ‘–’
Remove all digits and replace with *.
Split the lines and put them into a list called
textlines
.
Given the text string:
my_text="""The test score is 85 with the email<EMAIL_ADDRESS>for MGMT33223.
The test score is 83 with the email<EMAIL_ADDRESS>for MGMT33223."""
The resulting list should be:
['the test score is ** with the email -- for mgmt*****.',
'the test score is ** with the email -- for mgmt*****.']
my_text="""The test score is 85 with the email<EMAIL_ADDRESS>for MGMT33223.
The test score is 83 with the email<EMAIL_ADDRESS>for MGMT33223."""
#Create your function here.
#Call the function
result = blind_text(my_text)
print(result)
#Tests
grader.check('re1')


Swedes have longest expected working life in EU
by The LocalPeople in Sweden have the longest expected working life of any EU country, according to new data from number crunchers Eurostat.
A 15-year-old in Sweden can expect to spend 41.9 years in the labour market, the Eurostat figures show.
That makes Sweden one of only two countries, along with the Netherlands, where 15-year-olds are expected to work for more than 40 years.
There was a difference between genders, with the expected working life for women 41 years compared to 42.9 years for men.
- Readers reveal: What's it REALLY like working in Sweden?
- Why your Swedish colleagues love meetings (and you probably do, too)
- How to play office politics in Sweden... and survive
Iceland, although not in the EU, has an even higher expected working life at 46.3 years. And Italian teenagers can expect to spend the shortest time in the labour market; an average of just 31.8 years – more than a decade less than their Swedish peers.
The average expected duration of working life across the EU was 36.2 years, which was 3.3 years longer than in 2000 when the data was first collected.
Vocabulary
working life – (ett) yrkesliv
labour market – (en) arbetsmarknad
the Netherlands – Nederländerna
Italy – Italien
Iceland – Island
We're aiming to help our readers improve their Swedish by translating vocabulary from some of our news stories. Did you find it useful? Do you have any suggestions? Let us know.


WITNESS LIST
Natural Resources Committee
March 22, 2012 - 9:00 AM
82nd Legislature, Interim Charge Number 1
On:
Boening, Russell (Self; Texas Farm Bureau)
Brittin, Carolyn (TWDB)
Cook, Robby (Self)
Currah, Tom (Comptroller of Public Accounts)
DeBerry, Drew (Texas Department of Agriculture)
Evans, Jay (Texas and Southwestern Cattle Raisers Assoc.)
Harris, Mitchell (Self; AgTexas Farm Credit & Texas FCS Assoc. in Texas)
Ken, Kramer (Lone Star Chapter, Sierra Club)
Lemonds, Michael (Texas General Land Office)
Miller, Travis (Texas AgriLife Extension Service)
Motal, Becky (Lower Colorado River Authority)
Nielsen-Gammon, John (Office of the State Climatologist)
Phinney, Chuck (Texas Dept. of Public Safety Division of Emergency Management)
Stepney, L'Oreal (TCEQ)
82nd Legislature, Interim Charge Number 3
On:
Ahrens, Charles (San Antonio Water System)
Broad, Tyson (Lone Star Chapter, Sierra Club)
Finley, Timothy (The Dow Chemical Company)
Gomez, Genoveva G. (Brownsville Public Utilities Board)
Gonzalez, Hector (El Paso Water Utilities)
Holland, Kirk (Barton Springs/ Edwards Aquifer Cons. District)
Irlbeck, Michael (NRS/ Abengoa Water)
Lampe, Les (Black & Veatch)
Mace, Robert (TWDB)
Norris, Joseph "Bill" (NRS Consulting Engineers/AbengoaWater)
Pankratz, Thomas (Self)
Stepney, L'Oreal (TCEQ)
West, William (Guadalupe Blanco River Authority)
82nd Legislature, Interim Charge Number 4
On:
Allen, Vivien (Texas Tech University)
Halbert, Wayne (Harlingen Irrigation District, Lower Rio Grande Valley Water District
Manager's Association, Texas Irrigation Council)
Mace, Robert (TWDB)
McCauley, Garry (Texas Agrilife Research & Texas Rice Industry)
Phillips, Matt (The Nature Conservancy of Texas)
Stepney, Loreal (TCEQ)
Williams, C.E. (Panhandle Groundwater Cons. Dist.)
1
WITNESS LIST
2


At this point we would love to hear from any current or past students from Lambda to tell about their experiences at Lambda.
Name:
Story:


|
Theoria
|
#include <Dependencies.h>
Classes | |
| struct | Dependent |
Public Types | |
| using | const_iterator = DepsList::const_iterator |
Public Member Functions | |
| Dependencies () | |
| Dependencies (Dependencies &&other) noexcept | |
| Dependencies (const Dependencies &other) noexcept | |
| Dependencies & | operator= (Dependencies &&other)=default |
| Dependencies & | operator= (Dependencies &other)=default |
| Dependencies & | loose (const TypeName &type, bool optional=false) |
| Dependencies & | def (const TypeName &name, bool optional=false) |
| Dependencies & | strict (const TypeName &type, const SubTypeName &name, bool optional=false) |
| const_iterator | begin () const |
| const_iterator | end () const |
| int | size () const |
| const Dependent & | operator[] (int idx) const |
Friends | |
| bool | operator== (const Dependencies &a, const Dependencies &b) |
Used by components during initialization to advertise there requirements for other components. Dependencies can be loose if they only require they conform to some type or tight if they name a specific implementation Dependencies can be optional if the component can continue (possibly in a reduced functional state) without the dependency being satisfied.
Usage Examples:
return Dependencies().loose("Type1").loose("Type2").default("TheFoo").strict("Type3", "ASpecificType3")
If you prefer a specific implementation but will settle for a generic one it is perfectly fine to do this:
return Dependencies().strict("Type1", "Impl1",Dependent::optional).loose("Type1") ;
If you are willing to do all together without any:
return Dependencies().strict("Type1", "Impl1",Dependent::optional).loose("Type1",Dependent::optional) ;
| using theoria::core::Dependencies::const_iterator = DepsList::const_iterator |
Iterator over dependencies
|
inline |
Empty dependencies
|
inlinenoexcept |
Move copy constructor
|
inlinenoexcept |
Copy constructor
|
inline |
Iterator to first dependent
|
inline |
Add a dependent to a component of the given type such that the type matches it's subtype . Such a component can be thought of as the default component of that type and there can be only 0 or 1.
|
inline |
Iterator to the past-the-end dependent
|
inline |
Add a dependent to a component of the given type. If there are multiple components of this type it will pick the first one that has existing dependencies otherwise the first one it sees.
|
default |
Move Assignment
|
default |
Assignment
|
inline |
Access to the i'th dep[endent
|
inline |
Number of dependents
|
inline |
Add a dependent with the specified type and subtype. There can be only 0 or 1. This is a strict dependency because the dependent is anouncing that one and only one implementation will do
|
friend |
Equality
Dependencies equal if all dependents are equal


TheaterJS
TheaterJS
Typing effect mimicking human behavior.
- CodePen Demo
- Installation
- Documentation
- Change Log
- Path from v1.x to v2 (coming soon)
- Contribute (coming back soon)
Installation
- via bower:
bower install theaterjs
- via npm:
npm install theaterjs
- via a cdn:
//cdn.jsdelivr.net/theaterjs/latest/theater.min.js
- direct download
Link the theater.min.js
file and you’re done:
Example

Documentation
To get started, you’ll first need to create a new TheaterJS object by eventually providing some options.
Example
let theater = theaterJS({ locale: 'fr' })
Usage
theaterJS(<options>)
| Param | Default | Description |
|---|---|---|
| options | {autoplay, locale, minSpeed, maxSpeed} |
Options (see below). |
Breakdown of the available options:
| Option | Default | Description |
|---|---|---|
| autoplay | true |
If true, automatically play the scenario as it’s constructed. |
| locale | detect |
Used to determine which keyboard to use when typing random characters (for mistakes). Note: "detect" is an option to detect the user’s locale and use if it’s supported. |
| minSpeed | 80 |
Minimum delay between each typed characters (the lower, the faster). |
| maxSpeed | 450 |
The maximum delay between typed characters (the greater, the slower). |
TheaterJS objects have two public (read only) properties:
theater.options
: object’s options.theater.status
: object’s status (“playing” or “ready”).
addActor
Add an actor to the casting.
Example
let theater = theaterJS()
theater
.addActor('vader')
.addActor('luke', 0.8, '.luke-selector')
.addActor('yoda', { accuracy: 0.4, speed: 0.6 }, function (displayValue) {
console.log('%s said yoda', displayValue)
})
Usage
theater.addActor(<name>, <options>, <callback>)
| Param | Default | Description |
|---|---|---|
| name | Name used to identify the actor. | |
| options | 0.8 | Actor’s options (see below). |
| callback | (see below) | A function to call when actor’s display value changes. |
Actors have two options:
accuracy
(number between 0 and 1): used to determine how often an actor should make mistakes.speed
(number between 0 and 1): used to determine how fast the actor types.
Note: the delay between each typed character varies to “mimick human behavior”.
An actor callback is a function that is called when its display value is set. It can also be a string, in such case TheaterJS will assume it’s a DOM selector and will look for the corresponding element. It’s then going to set the element’s innerHTML when the value changes. You can safely ignore this argument if you gave the target element an id with the name of the actor, i.e:
theater.addActor('vader')
In this situation, TheaterJS will look for an element that matches the selector #vader
.
Also note that the actor will have an additional $element
property referring to the DOM element when using one of those approaches.
getCurrentActor
Return the actor that is currently playing.
Example
let theater = theaterJS()
theater
.addActor('vader')
.addScene('vader:Luke...')
.addScene(function (done) {
let vader = theater.getCurrentActor()
vader.$element.classList.add('dying')
done()
})
Usage
theater.getCurrentActor()
addScene
Add scenes to the scenario and play it if options.autoplay
is true.
Example
let theater = theaterJS()
theater
.addActor('vader')
.addScene('vader:Luke... ', 'Listen to me!', 500)
.addScene(theater.replay)
Usage
theater.addScene(<scene>)
A scene can be of 5 different types:
theater
.addScene('vader:Luke... ') // 1
.addScene(800) // 2
.addScene('I am your father!') // 3
.addScene(-7) // 4
.addScene('mother!')
.addScene(function (done) {
// do stuff
done()
}) // 5
.addScene('vader:Luke... ')
erase actor’s display value and set it with the new value..addScene(800)
make a break of800
milliseconds before playing the next scene..addScene('I am your father!')
append value to the current actor’s display value..addScene(-7)
erase7
characters..addScene(fn)
call fn which receives a done callback as first argument (callingdone()
plays the next scene in the scenario).
Note that addScene actually accepts an infinite number of arguments so you could just do:
theater
.addScene('vader:Luke... ', 800, 'I am your father!')
.addScene(-7, 'mother!')
.addScene(fn)
play
Play the scenario.
Example
let theater = theaterJS({ autoplay: false })
theater
.addActor('vader')
.addScene('vader:Luke...')
document.querySelector('button').addEventListener('click', function () {
theater.play()
}, false)
Usage
theater.play()
replay
Replay the scenario from scratch (can be used as a callback to create a loop).
Example
let theater = theaterJS()
theater
.addActor('vader')
.addScene('vader:Luke...')
.addScene(theater.replay)
Usage
theater.replay()
stop
Stop the scenario after the current playing scene ends.
Example
let theater = theaterJS()
theater
.addActor('vader')
.addScene('vader:Luke... ', 'I am your father...')
document.querySelector('button').addEventListener('click', function () {
theater.stop()
}, false)
Usage
theater.stop()
on
Add a callback to execute when an event is emitted (when a scene start/end).
Example
let theater = theaterJS()
theater
.on('type:start, erase:start', function () {
let actor = theater.getCurrentActor()
actor.$element.classList.add('blinking-caret')
})
.on('type:start, erase:end', function () {
let actor = theater.getCurrentActor()
actor.$element.classList.remove('blinking-caret')
})
theater
.addActor('vader')
.addScene('vader:Luke...')
Usage
theater.on(<eventName>, <callback>)
| Param | Default | Description |
|---|---|---|
| eventName | Event’s name to listen to. | |
| callback | Function to call when the event got published. |
The callback function receives the event’s name as first argument.
Note: listen to all event by using the ‘*’ shortcut: theater.on('*', callback)
.
Change Log
2.0.1 - 2015-11-02
- publish to npm, fix for non-browser environment
- add a
.npmignore
file - add source map
2.0.0 - 2015-11-02
- Brand new version


A non-profit organization established in 1995, Lansing Buddhist Association (LBA) hosts meditation classes, dharma talks, retreats, and special events with visitng teachers from Taiwan, U.S., Malaysia, Thailand, Burma, and Tibet. All events are open to the public. The construction of LBA's retreat center, Amitabha Village Retreat Center (AVRC), is now complete. Together with our residential house Jing Ye Ju (House of Purified Karma; a.k.a. Perry House), AVRC can now accommodate teachers and retreatants traveling from afar and allow LBA to host bigger, longer events.
蘭莘學佛會自1995年成立以來，多次舉辦中英文禪坐與念佛共修，並多次邀請來自台灣、美國、馬來西亞、泰國、緬甸、西藏等各地的法師作短期弘講，帶領禪修與念佛。新建成的彌陀村禪堂與現有的淨業居，為舉辦大型佛法共修活動提供了理想的場所，讓遠道而來參訪的法師與佛友們有較適當的居住環境。


{% placeholder head default %} {% component 'alternateHrefLangElements' %} {% endplaceholder %} {# This is all we need to render brilliant but boring meta stuff - it's available everywhere #} {{ head_seo | raw }} {% partial "layout/common/head/google-analytics" %}


Enter your water usage in 100 gallons which can be found on your utility invoice.
Meter Size
Select your meter size which can be found on your utility invoice. Your Base Charge is determined by the meter size.
Usage Charge
This volume charge is based on usage and covers variable cost such as chemicals, electric power, facility maintenance, repair of mains and repayment of bonds sold to finance construction of the water system.
Base Charge
Base water charges cover fixed cost such as reading and maintaining the meter, account maintenance, mailing bills and processing payments.


|
pico]OS
1.0.4
|
Macros | |
| #define | POSCFG_MAX_PRIO_LEVEL 8 |
| #define | POSCFG_TASKS_PER_PRIO 8 |
| #define | POSCFG_MAX_TASKS 16 |
| #define | POSCFG_MAX_EVENTS 16 |
| #define | POSCFG_MAX_MESSAGES 8 |
| #define | POSCFG_MAX_TIMER 4 |
| #define | POSCFG_ROUNDROBIN 1 |
| #define | POSCFG_SOFT_MTASK 1 |
| #define | POSCFG_CTXSW_COMBINE 10 |
| #define | POSCFG_REALTIME_PRIO 0 |
| #define | POSCFG_TASKCB_USERSPACE 0 |
| #define | POSCFG_MSG_MEMORY 1 |
| #define | POSCFG_MSG_BUFSIZE 80 |
| #define | POSCFG_SOFTINTERRUPTS 8 |
| #define | POSCFG_SOFTINTQUEUELEN 20 |
| #define | HZ 18 /* timer ticks per second */ |
| #define HZ 18 /* timer ticks per second */ |
Timer tick rate. This define must be set to the tickrate of the timer interrupt (= timer ticks per second).
| #define POSCFG_CTXSW_COMBINE 10 |
Soft multitasking context switch combine counter trigger threshold. Sets the number how often an event must be triggered to initiate a context switch. This mechanism takes only effect when soft multitasking is enabled (see definition POSCFG_SOFT_MTASK for details). If the combine threshold is set to 0, a context switch will never occure as result of triggering events.
| #define POSCFG_MAX_EVENTS 16 |
Maximum count of events. This define sets the maximum count of event data structures which can be allocated. Semaphores, Mutexes, Flags and Message Boxes are using this event data structures. Keep the value of this define as small as possible to decrease memory usage. Note that there is no maximum value this define can have, the pico]OS supports an unlimmit count of events.
| #define POSCFG_MAX_MESSAGES 8 |
Maximum count of message buffers. This definition sets the maximum count of message buffers that can be allocated with posMessageAlloc. Note that if only pointers are posted with posMessageSend (POSCFG_MSG_MEMORY == 0), this define sets the count of internal buffers (=messages) that can be pending in the messaging system. To get maximum performance, the value should be set to twice the count of tasks that are sending messages. If POSCFG_FEATURE_MSGBOXES is set to 0, this define has no effect.
| #define POSCFG_MAX_PRIO_LEVEL 8 |
| #define POSCFG_MAX_TASKS 16 |
Maximum count of tasks. This define sets the maximum count of task data structures which can be allocated. Even if the define POSCFG_MAX_PRIO_LEVEL allows in conjunction with POSCFG_TASKS_PER_PRIO more tasks, the maximum count of usable tasks is limmited by this define. The value of this define can be in the range 2..(POSCFG_TASKS_PER_PRIO * POSCFG_MAX_PRIO_LEVEL). This define should be set as small as possible to decrease memory usage. Remember that the OS has a built in idle task that also needs a task structure.
| #define POSCFG_MAX_TIMER 4 |
Maximum count of timers. This define sets the maximum count of timers that can be allocated with posTimerCreate. If POSCFG_FEATURE_TIMER is set to 0, this define has no effect. Note that the value for this define must be at least 1 if timers are enabled.
| #define POSCFG_MSG_BUFSIZE 80 |
Size of message buffers in bytes. If message boxes are enabled and POSCFG_MSG_MEMORY is set to 1, this define sets the size of a message buffer. To keep the operating system as simple as possible, only one fixed buffer size is supported.
| #define POSCFG_MSG_MEMORY 1 |
Enable the use of system supported message buffers. By default, only buffer pointers can be posted with the messaging system. If this definition is set to 1 (=enabled), the functions posMessageAlloc and posMessageFree are supported to allow dynamic buffer allocation, and real data with many bytes can be posted into the tasks message boxes. Note: This requires that message boxes are enabled (the defintion POSCFG_FEATURE_MSGBOXES must be set to 1).
| #define POSCFG_REALTIME_PRIO 0 |
Realtime priority threshold for soft multitasking. With this define some priority levels can be defined to be hard realtime, even if soft multitasking is enabled. All priority levels equal to or higher this value are scheduled in realtime. If this value is set to 0, no priority levels are scheduled in realtime. Note that this define takes only effect when POSCFG_SOFT_MTASK = 1 and POSCFG_ROUNDROBIN = 1.
| #define POSCFG_ROUNDROBIN 1 |
Set scheduling scheme. The pico]OS supports two types of scheduling:
POSCFG_ROUNDROBIN = 0 sets the standard scheduling scheme,
POSCFG_ROUNDROBIN = 1 enables the round robin scheduler.
For real time operation the standard scheduler is the best choice. Standard scheduling means, that every task gets its own priority, at no time two tasks can have the same priority. On a 8bit system you have a maximum count of 8 x 8 = 64 tasks, with priority numbers 0 .. 63 where 0 is the priority of the idle task and 63 is the highest priority.
The round robin scheduler allows several tasks to have the same priority. The number of tasks is limited by the count of bits the machine type variable can hold (see define MVAR_BITS for details). The maximum count of priority levels is also limited by MVAR_BITS. So on an 8bit system you can have 8 priority levels with 8 tasks at each level, making 64 tasks in sum. The priority level 0 is the lowest, and the idle task runs there. On priority 0 is space left for 7 user tasks. Priority 7 is the highest priority. Note that on every priority level is done a round robin scheduling, that means each task has the same right for execution. No task is prefered. If a task gives of processing time, or its time slice has expired, the next task at this priority is scheduled.
| #define POSCFG_SOFT_MTASK 1 |
Set soft multitasking. By setting this define to 1, it is possible to soften the hard real time scheduler. That means, a context switch is no more done every time an event (such as semaphores or flags) is triggered, even if the signalled task has a higher priority. The signaled task will first start to run if the time slice of the current task has expired or the task gives of processing time by itself or the maximum count of signaled events is reached (see the definition POSCFG_CTXSW_COMBINE for details, also the define POSCFG_REALTIME_PRIO may interest you). The purpose of soft multitasking is to reduce expensive context switches to a minimum to get more processing time for the main work.
| #define POSCFG_SOFTINTERRUPTS 8 |
Set number of software interrupts. pico]OS has a built in mechanism to simulate software interrupts. For example, software interrupts can be used to connect hardware interrupts, that are outside the scope of pico]OS, to the realtime operating system. A hardware interrupt will trigger a software interrupt that can then signalize a semaphore object. This define sets the number of software interrupts pico]OS will support.
| #define POSCFG_SOFTINTQUEUELEN 20 |
Set the number of software interrupts pico]OS shall be able to queue. A software interrupt is executed each time the scheduler is called. The scheduler runs at least with a rate of HZ times per second. For example, if in your system 1000 software interrupts can happen within a second, and the system tick rate is HZ = 100, set this define at least to 10, else software interrupts could be lost. Since the queue does not need much memory, it is saver to make the queue longer than needed; I recommend twice the length calculated.
| #define POSCFG_TASKCB_USERSPACE 0 |
When this define is set to a non-zero value, some user available space is inserted into each task control block. The user can call the function posTaskGetUserspace to get a pointer to the user memory in the current tcb. Set this define to the number of bytes you need to have in the task control block.
| #define POSCFG_TASKS_PER_PRIO 8 |
Maximum number of allowed tasks per priority level. If the standard scheduler is used, this define automatically defaults to 1, since the standard scheduler supports only one task at each priority. If the round robin scheduling scheme is used (the define POSCFG_ROUNDROBIN is set to 1), this define limits the count of tasks that can be at the same priority. The value for this definition must be a power of two and can not exceed the count of bits set by MVAR_BITS.


Home
APIs
Products
Reports
Profile
Sign out
Sign in
Sign up
Sign up
Already a member?
Sign in
.
Powered by
Azure API Management
.


* Alberto Escarlate and his son are excited about the capacity for innovative ideas and technologies
today’s Very Short List:
tech 18 Nov 2013
Daniel Dehrey is a Studio City, CA native currently living in New York. When not at work, he obsesses over the Virginia Cavaliers men’s basketball team.
Subscribe
* The Hopscotch
* Grand St. is a great place to find the most unique, independently-made gifts
http://link.nyobserver.com/516ca68465217dc6e1b9a3a617x4c.c95/UQvKZm-oa4SYFKEqC497c very short list is a
delightful e-mail that shares
cultural gems from a
different curator every day.
If you have any problems reading this e-mail, click here
http://link.nyobserver.com/516ca68465217dc6e1b9a3a617x4c.c95/Tyk4O_EdCBvgSTIZC51e9
Subscribe
Forward
My Account
Unsubscribe
food 15 Nov 2013
Fritz Storm buzzes on global coffee culture.
culture 13 Nov 2013
Emily Lakin on big things in tiny packages.
tech 11 Nov 2013
Carmel Hagen on the next wave of screaming streams.
Editorial Policy
Privacy Policy
Contact Us
Press
Terms + Conditions
very fine print: ©2013
Observer VSL LLC.
321 West 44th Street, 6th Floor
New York, NY 10036 USA
All rights reserved.
Questions?<PHONE_NUMBER>.
This message was intended for<EMAIL_ADDRESS>If you believe this has been sent to you in error, please safely unsubscribe


How to teach NLP to non-CS-majors in 2 weeks?
I strongly believe that getting machines to understand natural language, if at all possible, will require much interdisciplinary collaboration. It’s not clear whether NLP models should be biologically plausible or explicitly encode any linguistic structures – but we do know that language is a very complex thing, and no discipline has been able to solve all the problems on its own.
Don’t take just my word for it. Here’s Yoav Goldberg’s slide from his SpacyIRL 2019 talk: the future NLP will require both linguistic and machine learning expertise.
Consider also the raising investment in cross-disciplinary programs in all kinds of data science, aimed to train the new “bilingual” task force. State of AI 2019 reports the following:
So, we need to train this new taskforce. Great idea, right? Let’s just do it.
Why cross-disciplinary programs are hard.
The problem is, of course, that true interdisciplinarity requires working knowledge of more than one field. This comes at the time when both arXiv and conferences are exploding, and we can barely keep up with the literature even within one narrow sub-field of NLP. Now, imagine that NLP is your second field, and in addition to the arXiv insanity, you also need to keep track of all the latest research on linguistic typology or whatever your original field is.
Moreover, it’s not just about reading more literature. It’s also learning a different mindset, a different way to set and solve problems. In case of NLP for linguistics, it takes time to start seeing everything as “tasks”, and to formulate research hypotheses in a such a way that they could be proved or falsified by ML experiments.
In case of NLP for linguistics, it also involves acquiring a whole lot of technical knowledge that should have come from a large series of undergraduate courses – all in your spare time. Somebody willing to do this must have not only above-average dedication and amount of spare time, but also unusual willingness to look beyond the basic tenets of one’s original discipline. This is objectively hard, and not for everyone.
Case study: Introductory NLP at ESSLLI 2019
Backgound: I’ve taught in both CS and linguistics university programs before, and I’m told I’m a pretty good lecturer. I have some experience developing curricula, and, most importantly, I’m someone who made the transition from cognitive semantics to a machine learning lab.
With all of that, I came to ESSLLI to teach a 2-week introductory NLP course for theoretical linguists, confident I knew how to do this right.
The original plan
In week 1 my goal was to provide the minimal skill set for getting, processing, and experimenting with textual data with Python, as well as fundamentals of machine learning. In week 2 I aimed to cover the basic neural architectures and the latest issues in evaluation and creation of datasets. I assumed that the students would have only the basic Python skills from an online course (such as this excellent edX course that I started from myself).
Sounds doable, right? I had very positive feedback for my proposal and, as an ex-linguist, I thought I knew what I was getting into.
Of course, the Murphy law did not fail to apply. Here are some things I learned the hard way.
Problem 1: the pool of students is incredibly diverse.
ESSLLI is a very unique environment where you can meet literally anybody. I was preparing with the linguists in mind, but I found that my class had also physicists, mathematicians, and philosophers (at least 2 of each). Some of the linguists also had much more coding experience than others.
However, this is not only a problem for ESSLLI, and would probably would apply to any elective NLP or data science course. For example, I have just taught a UMass introductory Data Science course aimed at business majors, and I had everybody from chemists to political science.
This means two things for the lecturer:
- at any point you can safely assume that a part of the audience is either bored or confused.
- at any point you can get any kind of question, from something very basic to something you can’t even answer on the spot.
To balance out boredom and confusion, and also to acknowledge the impossibility of humans attending to any one thing for 90 minutes straight, my strategy was to split the class into a short lecture (~30-40 min out of 90) and a hands-on tutorial in Jupyter. I prepared the lectures with the confused part of the audience in mind, and I assumed that the bored part will just dive into Jupyter and keep themselves occupied.
Still, I was definitely not prepared for everything:
Teaching an intro PyTorch tutorial at ESSLLI. Audience is 80% linguists, and I start very confident I know how to talk to former colleagues.
— Anna Rogers (@annargrs) August 13, 2019
A question halfway into the tutorial:
- Sorry, what is "GPU"?
(Sound of my brain overclocking to reassess the rest of the material)
Problem 2: basic Python is not enough
I assumed that the students would have taken an online Python course, which in my mind implied familiarity with functions and classes.
What I should have realized is that object-oriented programming is not something that a beginner is going to be able to actually use after just a set of exercises. I know many non-CS researchers who rely on Python heavily for daily experimentation - and manage to do most of it procedurally, in Jupyter notebooks. They might write a few functions to load/save their data that they copy-paste routinely, but they’re not going anywhere near classes. They really don’t need it for what they do.
What this means for an NLP course is that if your deep learning framework relies on relatively complex programming constructs like classes, your students will be stuck with programming before they can even start to get stuck with partial derivatives. I chose vanilla PyTorch, with the goal of showing the students all the building blocks of a simple feed-forward network. My code was heavily commented, and they were able to run it, but I honestly have no idea how much of it could possibly sink in.
I’m still debating with myself whether I should have just gone with fast.ai. If the goal is to just give people tools to run pre-packaged models, then it would definitely be achieved much more efficiently than what I did. But if the goal is, eventually, research, then awareness of all the individual components is certainly to be encouraged.
Problem 3: emerging-curricula mess
At the time that I got my ESSLLI proposal accepted, I did one thing very wrong: I did not try to check what other courses there were, and whether there was potential overlap. The result was that in both weeks of ESSLLI there were two courses with partly overlapping material, that the majority of students taking my classes also attended, and I had to frantically reorganize and add material. In my case, I ended up relying on other people for the overview of fancy neural nets, and using the time for more datasets and methodology discussion, which nobody else was doing.
On the one hand, this is to be expected from a summer school which is a unique, throw-everyone-together event - but I would strongly suspect that an emerging data science program would also have some mess in curricula, because… well… this is all emerging disciplines, and NLP in particular changes so fast that if I were to come to ESSLLI again next year I’d have to replace at least 20% of the material.
The takeaway here is that interdisciplinary programs require also above-average attention to the overall curriculum structure, seeing how your piece fits with everything else that your target students are taking, and NLP in particular requires above-average monitoring of the recent developments. Say, if tomorrow graph neural networks top all leaderboards, we’ll have to somehow teach them.
PyTorch actually helped me to make this point. The students installed version 1.1 in week 1, and by the time we got to week 2 the version 1.2 was already out.
Problem 4: “Introduction to NLP” is actually at least 3 courses.
This was a big misconception on my part. I really needed to teach 3 different things, all in the space of a single course:
1) The data part: formats, pre-processing, pipeline components, available resources, potential effects, biases and artifacts. By now, this should clearly be a course in itself, and the one where the linguists can immediately make the most difference.
2) The machine learning part: the fundamentals of machine learning experiments, variance/bias, linear and logistic regression, basic neural nets, rnns, attention…
3) The actual NLP, which comes at the intersection of (1) and (2). Discussing the latest cool stuff such as the BERT meltdown is really not feasible without both of them.
If possible, I would perhaps sub-split distributional meaning representations as a course separate from (3), with a gentle primer on linear algebra. That one has to be really gentle, and not longer than 30 minutes at a time. I did make a desperate attempt to run through matrix factorization in half a lecture, as I believe it’s important to think of word2vec&co in context of count-based baselines. I really appreciate the bravery of my students who still showed up on the next day.
Overall, in the course of 10 90-minute lectures and tutorials, I was able to fit maybe 15-30% of each of these courses. If I were to develop a curriculum for the next year’s ESSLLI, I’d try to make sure that there would be a course for (1) and (2) independently, in week 1, so that in week 2 someone would proceed with the actual NLP.
To conclude
So this is what I learned the hard way, and I hope might be helpful for other people working on cross-disciplinary courses. My materials are available on the course website.
I’d like to thank ESSLLI organizers, the great city of Riga (with its fantastic food), and, of course, all of my very brave students.
I’m particularly grateful to the students who came up later and shared their stories. A few of them were in strong computational programs, but many were theoretical linguists, language teachers, translators, students of literature, in departments without a single computational linguist, with no one to ask for advice. These are the people who keep struggling with online coding courses in their spare time, and nobody’s there to tell them that it’s totally normal to spend 5 hours hunting for a silly bug. At least 50% of the class were women, which means 2x impostor syndrome. Rather than getting recognized for their attempt to go across the fence, they feel like they’re wasting time on something they will never be able to do well.
I know this, because that’s exactly how I felt for a really long time, too.
Comments


Edit this Doc Introduction to Appium
Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS mobile, Android mobile, and Windows desktop platforms. Native apps are those written using the iOS, Android, or Windows SDKs. Mobile web apps are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in 'Browser' app on Android). Hybrid apps have a wrapper around a "webview" -- a native control that enables interaction with web content. Projects like Apache Cordova make it easy to build apps using web technologies that are then bundled into a native wrapper, creating a hybrid app.
Importantly, Appium is "cross-platform": it allows you to write tests against multiple platforms (iOS, Android, Windows), using the same API. This enables code reuse between iOS, Android, and Windows testsuites.
For specific information about what it means for Appium to "support" its platforms, and automation modalities, please see the platform support doc.
Appium Philosophy
Appium was designed to meet mobile automation needs according to a philosophy outlined by the following four tenets:
- You shouldn't have to recompile your app or modify it in any way in order to automate it.
- You shouldn't be locked into a specific language or framework to write and run your tests.
- A mobile automation framework shouldn't reinvent the wheel when it comes to automation APIs.
- A mobile automation framework should be open source, in spirit and practice as well as in name!
Appium Design
So how does the structure of the Appium project live out this philosophy? We meet requirement #1 by using vendor-provided automation frameworks under the hood. That way, we don't need to compile in any Appium-specific or third-party code or frameworks to your app. This means you're testing the same app you're shipping. The vendor-provided frameworks we use are:
- iOS 9.3 and above: Apple's XCUITest
- iOS 9.3 and lower: Apple's UIAutomation
- Android 4.3+: Google's UiAutomator/UiAutomator2
- Windows: Microsoft's WinAppDriver
We meet requirement #2 by wrapping the vendor-provided frameworks in one API, the WebDriver API. WebDriver (aka "Selenium WebDriver") specifies a client-server protocol (known as the JSON Wire Protocol). Given this client-server architecture, a client written in any language can be used to send the appropriate HTTP requests to the server. There are already clients written in every popular programming language. This also means that you're free to use whatever test runner and test framework you want; the client libraries are simply HTTP clients and can be mixed into your code any way you please. In other words, Appium & WebDriver clients are not technically "test frameworks" -- they are "automation libraries". You can manage your test environment any way you like!
We meet requirement #3 in the same way: WebDriver has become the de facto standard for automating web browsers, and is a W3C Working Draft. Why do something totally different for mobile? Instead we have extended the protocol with extra API methods useful for mobile automation.
It should be obvious that requirement #4 is a given -- you're reading this because Appium is open source.
Appium Concepts
Client/Server Architecture
Appium is at its heart a webserver that exposes a REST API. It receives
connections from a client, listens for commands, executes those commands on
a mobile device, and responds with an HTTP response representing the result of
the command execution. The fact that we have a client/server architecture opens
up a lot of possibilities: we can write our test code in any language that has
a http client API, but it is easier to use one of the Appium client
libraries. We can put the server on a different
machine than our tests are running on. We can write test code and rely on
a cloud service like Sauce Labs & LambdaTest to receive and
interpret the commands.
Session
Automation is always performed in the context of a session. Clients initiate
a session with a server in ways specific to each library,
but they all end up sending a POST /session
request to the server,
with a JSON object called the 'desired capabilities' object. At this point
the server will start up the automation session and respond with a session ID
which is used for sending further commands.
Desired Capabilities
Desired capabilities are a set of keys and values (i.e., a map or hash) sent to
the Appium server to tell the server what kind of automation session we're
interested in starting up. There are also various capabilities which can modify
the behavior of the server during automation. For example, we might set the
platformName
capability to iOS
to tell Appium that we want an iOS session,
rather than an Android or Windows one. Or we might set the safariAllowPopups
capability to true
in order to ensure that, during a Safari automation
session, we're allowed to use JavaScript to open up new windows. See the
capabilities doc for the complete
list of capabilities available for Appium.
Appium Server
Appium is a server written in Node.js. It can be built and installed from
source
or installed directly from NPM:
$ npm install -g appium
$ appium
The beta
of Appium is available via NPM with npm install -g appium@beta
.
It is the development version so it might have breaking changes.
Please uninstall appium@beta
(npm uninstall -g appium@beta
) before installing
new versions in order to have a clean set of dependencies.
Appium Clients
There are client libraries (in Java, Ruby, Python, PHP, JavaScript, and C#)
which support Appium's extensions to the WebDriver protocol. When using Appium,
you want to use these client libraries instead of your regular WebDriver
client. You can view the full list of libraries
here.
Appium Desktop
There is a GUI wrapper around the Appium server that can be downloaded for any
platform. It comes bundled with everything required to run the Appium server,
so you don't need to worry about Node. It also comes with an Inspector, which
enables you to check out the hierarchy of your app. This can come in handy when
writing tests.
Getting Started
Congratulations! You are now armed with enough knowledge to begin using Appium. Why not head to the getting started doc for more detailed requirements and instructions?


JOHN SHAMBROOM
John has over thirty years’ experience leading professionals in the identification of clinical needs, and development of cutting edge medical devices to meet those needs in acute care and consumer wellness settings. Very early stage start-up companies are his specialty. John is currently President of Shambroom Associates, a strategic and technical consulting firm to the medical industry, with an emphasis on guiding companies through creation and validation of innovative technologies to address compelling clinical needs. Prior to this John served in multiple capacities for Zeo, Inc a consumer based sleep monitoring company that marketed the popular Zeo sleep head band. There he served as ZEO, Vice President of Scientific Affairs, Executive Director, Zeo Sleep Research Center, and Vice President, Research, Engineering, and Operations (2007 to 2009).
He wss Vice President of R&D and Operations, INOVISE MEDICAL , INC., A start-up innovating in the development of non- invasive cardiac diagnostic tools. He served as Director of Engineering and Manager of Hardware Development for ASPECT MEDICAL SYSTEMS, INC., A leading edge medical device company, that developed and marketed the world’s first Anesthetic Depth Monitor.
He was a Unit Manager for SIEMENS MEDICAL SYSTEMS and a Project Manager for LEXICON INC., a world leader in professional audio recording equipment.
John earned his BS in Engineering from from Tufts University, (cum laude) 1981 and has City of London Polytechnic, credit in Physics and Mathematics 1980.


Humour and Dialect
by Paul Laurence Dunbar
Possum Trot
Additional Information
- Year Published: 1913
- Language: English
- Country of Origin: United States of America
- Source: Dunbar, P.L. (1913). The Complete Poems of Paul Laurence Dunbar. New York: Dodd, Mead, and Company.
-
Readability:
- Flesch–Kincaid Level: 6.5
- Word Count: 661
- Genre: Poetry
- ✎ Cite This
Downloads
I ‘ve journeyed ‘roun’ consid’able, a–seein’ men an’ things,
An’ I ‘ve learned a little of the sense that meetin’ people brings;
But in spite of all my travelling an’ of all I think I know,
I ‘ve got one notion in my head, that I can’t git to go;
An’ it is that the folks I meet in any other spot
Ain’t half so good as them I knowed back home in Possum Trot.
I know you ‘ve never heerd the name, it ain’t a famous place,
An’ I reckon ef you ‘d search the map you could n’t find a trace
Of any sich locality as this I ‘ve named to you;
But never mind, I know the place, an’ I love it dearly too.
It don’t make no pretensions to bein’ great or fine,
The circuses don’t come that way, they ain’t no railroad line.
It ain’t no great big city, where the schemers plan an’ plot,
But jest a little settlement, this place called Possum Trot.
But don’t you think the folks that lived in that outlandish place
Were ignorant of all the things that go for sense or grace.
Why, there was Hannah Dyer, you may search this teemin’ earth
An’ never find a sweeter girl, er one o’ greater worth;
An’ Uncle Abner Williams, a–leanin’ on his staff,
It seems like I kin hear him talk, an’ hear his hearty laugh.
His heart was big an’ cheery as a sunny acre lot,
Why, that’s the kind o’ folks we had down there at Possum Trot.
Good times? Well, now, to suit my taste,—an’ I ‘m some hard to suit,—
There ain’t been no sich pleasure sence, an’ won’t be none to boot,
With huskin’ bees in Harvest time, an’ dances later on,
An’ singin’ school, an taffy pulls, an’ fun from night till dawn.

We live up in the city now, my wife was bound to come;
I hear aroun’ me day by day the endless stir an’ hum.
I reckon that it done me good, an’ yet it done me harm,
That oil was found so plentiful down there on my ole farm.
We ‘ve got a new–styled preacher, our church is new–styled too,
An’ I ‘ve come down from what I knowed to rent a cushioned pew.
But often when I ‘m settin’ there, it’s foolish, like as not,
To think of them ol’ benches in the church at Possum Trot.
I know that I ‘m ungrateful, an’ sich thoughts must be a sin,
But I find myself a wishin’ that the times was back agin.
With the huskin’s an’ the frolics, an’ the joys’ I used to know,
When I lived at the settlement, a dozen years ago.
I don’t feel this way often, I ‘m scarcely ever glum,
For life has taught me how to take her chances as they come.
But now an’ then my mind goes back to that ol’ buryin’ plot,
That holds the dust of some I loved, down there at Possum Trot.


Multiple Selection :
First Name :
:
Hobby :
Reading
Travelling
Gardening
Others
Location :
Choose Your Preferred Job Location:
Dhaka
Barisal
Comilla
Chitagaon
Sylhet
Rajshahi
Khulna
Bhola
Save
Cancel


June Lake is my favorite place on this planet, and I have not been to any other planet so far. It is located just south of the intersection of SR120, the road coming down from Tioga Pass, the east entrance of Yosemite National Park, and US395, in Lee Vining.
The June Lake Loop, or SR168, is a beautiful road that follows four lakes, Grant, Silver, Gull and, of course, June Lake. It has beautiful fall colors and a great view at Carson Peak all year round. The center of town is in between Gull and June and features lodging, restaurants and the world famous Tiger Bar.
People come there to flyfish, I go there to hange out with my friends and photograph, and in the wintertime they open up June Mountain so people can go ski. It used to be a vacation spot for Hollywood stars, Bing Crosby and Bob Hope made one of their movies there, and in the modern days I occasionally run into someone famous. As for the people that live there, I like to cal every single one of them my friend