RealSense Calibrator - Setting up for calibration
It is strongly recommended that you read this document in its entirety before starting.
The calibration procedure consists of presenting a fairly large target (about A2-size) to the camera
at several known distances between 500mm and 2.5 metres. You can do this by fixing the camera and moving the
target, as described below. Similarly, the target can be fixed, e.g. on a door, and the camera moved to the known distances.
The setup should take 15-60 minutes according to your chosen method and what you have at hand.
-
Mount the RealSense camera on something rigid, facing horizontally, at least 300mm above the floor.
-
The calibration process consists of measuring the depths (ranges) to targets at known distances: 1 metre, 1m50, 2m, 2m5, etc.
To ease this process, it will be useful to mark off these distances from a known starting point.
The simplest is to put strips of masking tape on the floor and draw a line for each distance,
starting with zero directly underneath the camera's front glass:
Make sure these marks are aligned to a straight line on the floor away from the zero mark
(it's helpful to do this on parquet flooring). Notice the arrow-heads drawn with a thick felt-tip,
to make them easier to see in the camera view.
-
Print 5 copies of target10.png (in UI\Help).
Do NOT scale when printing.
Make sure the green circles are 100mm in diameter (and the red circles 60mm).
-
Cut off the excess paper so that the 5 targets look like this:
-
Get a flat, rigid piece of wood or plastic, about 750x500mm (width about 1.7 times the height).
The exact dimensions are unimportant; the width and height are parameters for the calibration.
What is really important is that geometry is accurate: perfect right-angles, etc.
-
Draw a rectangle 630x380mm, making the lines extend at least 100mm outside the rectangle.
Measure the diagonals to ensure they are equal.
Draw vertical and horizontal centre lines.
-
Stick the 5 targets with their centres carefully aligned to the lines.
You should now have something like this:
-
Make a frame to hold this plane vertically:
Such the middle target's centre is approximately at the height of the camera:
Up: Home
Next: Performing your first calibration


Talk with our support executive now and get quick resolution!
If you are not satisfied with our service, you can claim 100% refund.
If you want to cancel and get refund contact our support executive. They will help you quickly
Contact our support team to get your issue resolved


?1
u
Hi
-I
m
I-
M
CO
CM
èM
5
6
7
8
9
1
0
u&l
limi
copyright
reserved
botanical
Garden
NEW
YORK
BOTANICAL
GARDEN
33411
Herbarium
of
the
University
of
California,
Berkeley
[£)Xcjop&
ra
v1*
j
John
L
Strother
iw
THE
NEW
YORK
BOTANICAL
GARDEN
EXPLORATION
OF
CUBA
VICINITY
OF
LA
GLORIA.
CAMAQUEY
NO
.3.2.5...
7?U}nu&ui
yt‰UntljL
Ë
Q
-T-v-
J.
A.
SHAFER,
COLLECTOR
FEBRUARY
1909
01334113
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Viewing Container Package Settings
How to view the container package settings for containers that are installed on a site using the Admin Extensions module.
- Navigate to Admin > Advanced Settings > Extensions - OR - Go to an Extensions module.
- Expand the Containers section.
- Click the Edit button beside the required container package.
- Expand the Container Package Settings section.
- At Skin Package Name, the name of the skin package associated with this container package is displayed.
- Expand the Package Settings section to view the Package Settings. For a full list of these fields, See "Viewing Package Settings For All Extensions".
Container Package Settings


--- layout: default title: Press Room - Fail Better Productions menu-item: press styles: - /css/colours.css - ./styles.css styles-ie6: ./styles-ie6.css ---
Welcome to the Fail Better Productions Press Room. We hope your visit here provides you with the press information and images you need.
To view the galleries, press releases, reviews and other material for a production simply click on the relevant link from our archive below.
NOTE: Some of our materials are in Portable Document Format (PDF). In order to read this you will need Adobe Acrobat Reader; to download your free version click here.
The use of photographs featured on this site is permitted provided that the photographer is credited for their work.
If you have any further queries then please contact us using our contact page. We look forward to hearing from you.


{% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} {% block app_content %}
Didn't get the email? Click here and we will send you another confirmation email!


chocolate pizza
posted on 15 dec 2013 / desserts
For the fig-swirl: Melt butter over medium heat in a saucepan. Add brown sugar and stir to dissolve. Halve all of the figs and toss in the saucepan with water and lemon juice. Cook over medium heat, strring frequently, until you have a chunky-jammy mixture. Add salt with one or two stirs, set aside and let cool completely.
Ice cream: In a small pot over medium heat, combine milk, and granulated sugar until sugar is completely dissolved and the milk is just barely lukewarm. Whisk in the egg yolks. Set mixture in the fridge and wait until the fig mixture is cooled.
Using an ice cream machine, pour liquids into the frozen basin and process according to manufacturer insturctions, i.e., let spin and thicken for 20 minutes before adding mascarpone, fig jam mixture, and the nuts. Continue to process for +/- 10 minutes. Pour semi-frozen mixture into a pyrex dish or glass tupperware. Freeze for a tleast two hours before serving.


FlashSale
Home
Schedule product add to cart
Account
Login
ASIN:
Quantity:
Enter product name
Product time of sale


Brier coming to Kelowna
by Wayne MooreUPDATE: 1:40 p.m.
Kelowna Mayor Colin Basran says the City of Kelowna could realize an economic benefit of between $8 million and $15 million by hosting the 2021 Tim Hortons Brier.
It's anticipated the 2021 Brier, which will be held March 6 to 14, will attract more than 4,300 curling fans from outside the city.
The 2021 Brier is just one of several international sporting events in the city over an 18 month period.
Those include last month's Skate Canada International, the world mixed and senior curling championships coming in April, plus the Memorial Cup in May.
Basran says the national and international television exposure for the city is priceless.
The city contributed $200,000 toward the bid to host the Brier.
Those funds, says Basran, comes from a yearly fund designed specifically to assist with bids such as these.
When the first stone is thrown, it will have been 53 years since the Brier was last held in Kelowna, at Memorial Arena.
Rick Sawatsky, who has lived in Kelowna since 2000, has curled in eight Brier's, throwing lead rocks for Jim Cotter's hybrid Vernon-Kelowna rink.
"The thought of being able to represent B.C. and compete for a national championship in my home town would be a pretty special experience for sure," said Sawatsky.
"Not only for us as athletes, but for our friends and family, and people that support and follow our team up and down this valley. It would be phenomenal.
Sawatsky said he didn't ever think this day would come.
"Kudos to Jock (Tyre) and his team for going through with it.
"It's going to be an amazing event."
Ticket packages are expected to go on sale early next year.
UPDATE: 11:45 a.m.
Kelowna will host the 2021 Tim Hortons Brier.
Curling Canada officials made the announcement Thursday at Prospera Place.
Kelowna last hosted the Canadian Men’s Curling Championship in 1968, when Alberta’s Ron Northcott prevailed at Memorial Arena.
This time around, the nation's best men’s curling teams will go head to head at Prospera Place March 6-14, 2021.
“Kelowna put together a superb bid to host the Tim Hortons Brier in 2021,” said John Shea, chair of Curling Canada’s board of governors. “The Okanagan region has hosted numerous top-calibre curling events in the past, and I know the City of Kelowna is ready to step up and put on an amazing show for the world's most famous national curling championship.”
“Kelowna is very excited to host the 2021 Tim Hortons Brier, and we thank Curling Canada for the opportunity to do so,” said Mayor Colin Basran.
Kelowna previously hosted the 1986 World Women’s Championship, 1989 Scotties Tournament of Hearts, 1999 Canadian Junior Championships, 2002 World Junior Championships, and, most recently, the World Mixed Curling Championship in 2018.
Tickets are expected to go on sale early in 2020.
This year's Brier will be held Feb. 29-March 8 in Kingston, Ont.
ORIGINAL: 11:05 a.m.
Officials with Curling Canada are in Kelowna today for what they are calling a major announcement.
A news conference is slated to begin at 11:30 a.m. at Manhattan Point Restaurant inside Prospera Place.
Castanet will bring you the news conference live.


First trailer for Pixar’s Soul asks some big existential questions
Follow Polygon online:
by Petrana RadulovicFollowing in the Pixar tradition of “What if toys/bugs/cars/feelings had feelings?” the studio’s latest asks, “What if souls had feelings?”
Aptly titled Soul, the movie follows a middle school teacher and jazz musician named Joe Gardner (Jamie Foxx, starring as Pixar’s first black lead). After finally getting his big break at an audition gone wonderfully right he ends up ...dying. Well, his soul gets separated from his body and he ends up in a place dubbed the “You Seminar,” where souls get trained.
Related
There he meets 22 (voiced by Tina Fey), a pessimistic soul trapped in the seminar. The trailer doesn’t show much of what this alternate dimension looks like — besides a black void of background — but we know it’s Pixar so we can expect some feels.
Soul also stars Questlove as a drummer in Joe’s band; Daveed Diggs as Paul, Joe’s neighborhood rival; and Phylicia Rashād as Joe’s mother.
It’s the second Pixar flick to hit theaters in 2020. Onward, a suburban fantasy tale of two elves bonding with their dead father’s disembodied legs (it makes sense in the trailer), comes out on March 6. Meanwhile, Soul will hit theaters on June 19.


Papers
This page contains two sections, the first one listing papers on statistical issues and the second one papers on experimental particle physics.
Papers on Statistical IssuesBack to Top
Pages in this section summarize papers I wrote on various statistical problems. While this work was mainly intended for an audience of experimental particle physicists, its scope is more general. The topics investigated cover hypothesis testing, confidence interval construction, fitting techniques, nuisance parameters, frequentist versus Bayesian statistics, and more.
-
Testing Hypotheses in Particle Physics: Plots of p0 Versus p1
August 26, 2014
(With Louis Lyons) -
Interval Estimation
June 10, 2013
-
Discussion with José Bernardo on Bayesian Reference Analysis
September 27, 2011
-
Open Issues in the Wake of Banff 2010
September 27, 2011
-
Reference Priors for High Energy Physics
August 2, 2010
(With Supriya Jain and Harrison Prosper) -
Error Estimates for the Bin Contents of a Convolution Histogram
February 12, 2010
(With Luca Lista) -
Dealing with Data: Signals, Backgrounds, and Statistics
March 31, 2009
-
Everything You Always Wanted to Know About Pulls
April 8, 2008
(With Louis Lyons) -
P-Values and Nuisance Parameters
June 27, 2007
-
Bayesian Reference Analysis
May 16, 2006
-
Generalized Frequentist Methods for Calculating P-Values and Confidence Intervals
May 16, 2006
-
Constructing Ensembles of Pseudo-Experiments
December 16, 2003
-
Combining the Top Quark Mass Results for Run 1 from CDF and D0
September 8, 1999
(With Raymond Hall, Richard Hughes, Boaz Klima, Robert Roser, and Mark Strovink) -
Equivalence of the Best-Fit and Covariance-Matrix Methods for Comparing Binned Data with a Model in the Presence of Correlated Systematic Uncertainties
April 28, 1999
-
Assessing the Significance of a Deviation in the Tail of a Distribution
November 20, 1995
Papers on Experimental Particle Physics Back to Top
A list of all refereed publications can be obtained via INSPIRE, please click here (a total of 1191 as of 16 October 2017).
You can also list by journal:
- Physical Review Letters,
- Physical Review C or D,
- Physics Letters B,
- Journal of High Energy Physics,
- European Physics Journal C,
- Journal of Physics G,
- Nuclear Instruments and Methods in Physics Research,
- Journal of Instrumentation,
or by experiment:


--- layout: defaultNoSpons title: About ---
Stefano Mich is a Computer Science student and a passionate lover of the mountain sports. His father Francesco is an Alpine Guide and alpinist and therefore he inspired him with his passion for the mountains and for many alpine sports like climbing, skiing and mountain running.
Stefano has created this website using Jekyll, a open source site generator hosted on GitHub Pages.
Stefano is available for collaborating in open-source project or for the development of website like this, so if you need his help, please contact him.


 The client will negotiate the best mechanism based on the version of the server that the client is authenticating to. If the server version is 2.8 or higher, the driver will authenticate using the SCRAM-SHA-1 mechanism. Otherwise, the driver will authenticate using the MONGODB_CR mechanism.
the user name
the database where the user is defined
the user's password
Creates a MongoCredential instance for the GSSAPI SASL mechanism
Creates a MongoCredential instance for the GSSAPI SASL mechanism
the user name
Creates a MongoCredential instance for the MongoDB Challenge Response protocol
Creates a MongoCredential instance for the MongoDB Challenge Response protocol
the user name
the source of the user name, typically a database name
the password
Creates a MongoCredential instance for the MongoDB X.509 protocol.
Creates a MongoCredential instance for the MongoDB X.509 protocol.
the non-null user name
the credential
Creates a MongoCredential instance for the PLAIN SASL mechanism.
Creates a MongoCredential instance for the PLAIN SASL mechanism.
the non-null user name
the source where the user is defined. This can be either "$external"
or the name of a database.
the credential
Creates a MongoCredential instance for the MongoDB Challenge Response protocol
Creates a MongoCredential instance for the MongoDB Challenge Response protocol
the user name
the source of the user name, typically a database name
the password
(Since version 2.7) Please use MongoCredential.createCredential
Creates a MongoCredential instance for the GSSAPI SASL mechanism
Creates a MongoCredential instance for the GSSAPI SASL mechanism
the user name
(Since version 2.7) Please use MongoCredential.createGSSAPICredential
Helper class for creating MongoCredential instances
2.6
com.mongodb.MongoCredential


Definition
Average Potential evapotranspiration minus precipitation (PE-P) for period from May 1 to August 31 (same as the existing LSRS) (mm). (Must be multiplied by -1 for use in LSRS to get P-PE).
Method of calculation
Sum of average daily PE-P for defined period. PE is calculated using the Baier-Roberson formulae by default, or as selected by the user.


PhoneGap WebRTC
Exit
button
Connect as:
Connect
Make call to:
Call
REMOTE:
LOCAL:
Created by Jesus Monroy, Jr. © 2015


Home
About Us
Contact us
About Us
* Class: Creative Computing.K.Fa18
This project is a short visualization and description of my thoughts + activities during “Day of the week = Tuesday” < from 09.01.2018 >


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Uses of Package
com.github.davidmoten.rx
Packages that use
com.github.davidmoten.rx
Package
Description
com.github.davidmoten.rx
Classes in
com.github.davidmoten.rx
used by
com.github.davidmoten.rx
Class and Description
Checked.A0
Checked.A1
Checked.A2
Checked.F0
Checked.F1
Checked.F2
CloseableObservableWithReset
IO.ServerSocketBuilder
Processes.Parameters
ResourceManager
ResourceManager.CloseableResourceManagerBuilder
ResourceManager.ResourceManagerBuilder
RetryWhen.Builder
RetryWhen.ErrorAndDuration
Serialized.KryoBuilder
StateMachine.Builder
StateMachine.Builder2
StateMachine.Builder3
StateMachine.Completion
StateMachine.Transition
Statistics
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Copyright © 2013–2016. All rights reserved.


{{phone.snippet}}
Model # is {{phone.age}}
Total number of phones so far is {{phones.length}}
1+1 = {{1+1}}


Preparation time
30 mins to 1 hour
Cooking time
30 mins to 1 hour
Serves
Serves 10
Dietary
This delicious fruit pie makes the most of autumnal flavours and will happily and generously feed a crowd.
Equipment and preparation: you will need a 26cm/10½in pie dish and a food processor for this recipe.
For the pastry, sift the flour and salt into the bowl of a food processor. Add the shortening and butter and process until the mixture resembles fine breadcrumbs.
Add the egg yolk and pulse, the mixture should come together to form a dough. If your mixture is too dry add a little water and pulse again.
Tip the pastry out onto a lightly floured work surface and briefly knead. Bring the pastry together in a ball, place in a plastic bag and refrigerate for 20-30 minutes.
Meanwhile prepare the filling, place the apples in a saucepan and add the lemon juice to prevent them browning. Add the plums.
Mix the cornflour with the sugars, allspice, cinnamon and grated nutmeg. Place in the pan with the fruit and toss to coat the fruit in the dry mix.
Place over a medium heat and cook until the sugars melt to form a caramel. Bring to a gentle simmer for two minutes then set aside to cool.
Preheat the oven to 180C/350F/Gas 4.
Lightly flour a work surface and rolling pin. Remove the pastry from the fridge and set aside one-third for the pie lid. Roll out the remaining pastry until it is big enough to generously fit the pie dish (approximately 40cm/16in). Use the rolling pin to help you lift the pastry into the pie dish and gently press it into the sides, leaving any excess pastry overhanging the sides. Return to the fridge to chill for a few minutes.
When chilled, remove the pastry case from the fridge and place on a baking tray. Line with baking parchment and fill with baking beans and then bake for approximately 10 minutes, or until the pastry is just beginning to colour and dry out. Remove the baking parchment and baking beans.
Lightly whisk the egg white and brush over the pastry to glaze. Return the pastry to the oven and cook for a further five minutes, or until the pastry is a pale golden-brown and dried out.
Roll out the remaining pastry for the pastry lid, using a plate to cut a circle that is roughly the correct size. Use any excess pastry to form a 1x26cm/½x10½in strip and shapes to decorate the pie.
Trim the excess pastry from the edge of the pie dish - leaving about 1cm/½in of the pie dish rim showing.
Using a slotted spoon, place the cooled fruit into the pastry case, discarding any excess liquid.
Place the thin strip of pastry on top of the exposed rim of the pie dish. Brush with a little water, then place the pie lid on top and trim to shape.
Crimp the edges to seal and place the decorative shapes on top. Cut a small hole in the middle to let any steam escape while cooking.
Glaze with milk and sprinkle with sugar. Bake for 40-45 minutes, or until the pastry is golden-brown and crisp.


13th Age Character Sheet
Print Character
Save Character to File...
Load Character from File...
Edit Base Ability Scores
Cost:
0/28
Reset Scores
Roll Scores
Name
Race
-Select Race-
-Select Ability-
Level
Class
-Select Class-
-Select Ability-
Armor
None
Light
Heavy
No Shield
Shield
Abilities
STR
CON
DEX
INT
WIS
CHA
Score
Modifier
Mod+Lvl
Defense
AC
PD
MD
Attack
Hit
Miss
Melee
Ranged
Penalty
Now
Max
Hit
Points
Recoveries
Recovery
Roll
Racial Power
One Unique Thing
Icon Relationships
Class Features
Powers & Spells
Magic Items
Talents
Feats (Adv: 1 Champ: 0 Epic: 0)
Equipment
Backgrounds (8)
Incremental Advances
Feat
Skills
Hit Points
Extra Magic Item
Power / Spell
Ability Score Bonus 4th/7th/10th (+1 to 3 abilities)
Icon Relationship Point 5th/8th


menu
cart
cart_fill
cart_light
cart_fill_light
warning-circle
sync
undo
redo
message
poweroff
logout
pie chart
setting
eye
location
edit-square
app store
detail
add user
delete team
delete user
addteam
user
team
area chart
line chart
mobile
red envelope
book
delete
bell
skin
home
bank
filter
like
unlike
unlock
lock
customerservice
flag
money collect
shop
shopping
calendar-check
calendar
scan
barcode
camera
cloud-upload
cloud-download
qrcode
image
id card
heart
error
star
wifi
edit
man
pushpin
phone
tag
tags
scissor
share
vertical right
vertical left
right
left
up
down
fullscreen
fullscreen-exit
doubleleft
double right
arrowright
arrowup
arrowleft
arrowdown
upload
download
sort-descending
sort-ascending
swap
menu
unordered list
ordered list
check
ellipsis
close
minus
question
small-dash
pause
drag
gift
stop
warning-circle-fill
heart-fill
message-fill
mobile-fill
book-fill
red envelope-fill
calendar-check-fill
image-fill
id card-fill
credit card-fill
delete-fill
shopping-fill
bell-fill
filter-fill
gift-fill
home-fill
location-fill
eye-fill
like-fill
unlike-fill
star-fill
unlock-fill
phone-fill
edit-fill
thunderbolt-fill
tag-fill
tags-fill
camera-fill
error-fill
setting-fill
alipay
wechat-fill
alipay-circle-fill
QQ-circle-fill
weibo-circle-fill
alipay-square-fill
QQ-square-fill
weibo-square-fill
zoom out
audio
audio-fill
zoom in
audio static
comment
signal-fill
switch user
caret-down
backward
caret-up
caret-right
caret-left
fast-backward
forward
fast-forward
search
step-backward
step-forward
woman
plus
eye close-fill
eye-close
clear
translate
compress
expend
send


The Big Red One
The Big Red One is a movie starring Lee Marvin, Mark Hamill, and Robert Carradine. A hardened sergeant and the four core members of his infantry unit try to survive World War II as they move from battle to battle throughout Europe.


Page not found! :(
Please leave a comment below if there is a problem. I will fix it as soon as possible
Why don't we back to Home for another exciting post?
Page not found! :(
Please leave a comment below if there is a problem. I will fix it as soon as possible
Why don't we back to Home for another exciting post?
Comments


Toggle navigation
The Collider Project
Job Board
Events
{{ content }}
Connect With Us:
Twitter
Github
Dayton, Ohio


|
Class Summary |
| AbstractRed |
This is an abstract base class that takes care of most of the
normal issues surrounding the implementation of the CachableRed
(RenderedImage) interface. |
| AbstractTiledRed |
This is an abstract base class that takes care of most of the
normal issues surrounding the implementation of the CachableRed
(RenderedImage) interface. |
| AffineRed |
This is an implementation of an affine operation as a RenderedImage. |
| Any2LsRGBRed |
This function will tranform an image from any colorspace into a
luminance image. |
| Any2LumRed |
This function will tranform an image from any colorspace into a
luminance image. |
| Any2sRGBRed |
This function will tranform an image from any colorspace into a
luminance image. |
| BufferedImageCachableRed |
This implements CachableRed based on a BufferedImage. |
| BumpMap |
Default BumpMap implementation. |
| ColorMatrixRed |
|
| ComponentTransferRed |
|
| CompositeRed |
This is an implementation of an affine operation as a RenderedImage. |
| DiffuseLightingRed |
|
| DisplacementMapRed |
This implementation of RenderableImage will render its input
GraphicsNode on demand for tiles. |
| FilterAlphaRed |
This strips out the source alpha channel into a one band image. |
| FilterAsAlphaRed |
This converts any source into a mask according to the SVG masking rules. |
| FloodRed |
This implementation of RenderedImage will generate an infinate
field of a single color. |
| FormatRed |
This allows you to specify the ColorModel, Alpha premult and/or
SampleModel to be used for output. |
| GaussianBlurRed8Bit |
This implementation of RenderableImage will render its input
GraphicsNode on demand for tiles. |
| IndexImage |
This class implements an adaptive palette generator to reduce images to a
specified number of colors. |
| LRUCache |
|
| MorphologyOp |
This class provides an implementation for the SVG
feMorphology filter, as defined in Chapter 15, section 20
of the SVG specification. |
| MultiplyAlphaRed |
This implements a masking operation by multiply the alpha channel of
one image by a luminance image (the mask). |
| PadRed |
This is an implementation of a Pad operation as a RenderedImage. |
| PadRed.ZeroRecter |
|
| PadRed.ZeroRecter_INT_PACK |
|
| ProfileRed |
This implementation of rendered image forces a color profile
on its source |
| RenderedImageCachableRed |
This implements CachableRed around a RenderedImage. |
| SpecularLightingRed |
|
| TileBlock |
This class is responsible for breaking up a block of tiles into
a set of smaller requests that are as large as possible without
rerequesting significant numbers of tiles that are already
available. |
| TileCache |
|
| TileCacheRed |
This implementation of RenderedImage only serves to put the tiles
generated by it's input into the TileCache. |
| TileGrid |
This is a Grid based implementation of the TileStore. |
| TileLRUMember |
This is a useful class that wraps a Raster for patricipation in
an LRU Cache. |
| TileMap |
|
| TileRed |
This filter simply tiles its tile starting from the upper
left corner of the tiled region. |
| TranslateRed |
This is a special case of an Affine that only contains integer
translations, this allows it to do it's work by simply changing
the coordinate system of the tiles. |
| TurbulencePatternRed |
This class creates a RenderedImage in conformance to the one
defined for the feTurbulence filter of the SVG specification. |


---
title: About
---
{{ site.author }}
{% include head.html %}
{% include header.html %}
About
Hello! I'm Shirley.
Most of all, I like creating. Programming and designing allow me to build
beautiful experiences out of budding ideas, and empathetic solutions to complex
problems. I'm most excited about creating meaningful tools that enhance the
connections that bring people together.
I study computer science at the University of California, Berkeley. My hobbies
include chasing sunsets, curating playlists, and making art.
About this website
This site was made with Jekyll, Sass, and hosted on Github Pages.
{% include footer.html %}


Class: ProvenanceStatement
http://purl.org/dc/terms/ProvenanceStatement
Annotations (5)
-
hasVersion http://dublincore.org/usage/terms/history/#ProvenanceStatement-001
-
issued "2008-01-14" ()
-
comment "A statement of any changes in ownership and custody of a resource since its creation that are significant for its authenticity, integrity, and interpretation." (en-us)
-
isDefinedBy http://purl.org/dc/terms/
-
label "Provenance Statement" (en-us)
Usage (1)


UNIVERISTY DIRECTORY
University of Ibadan(UI)
219 Total Items
| S/N | Level | Title | Pages | Univeristy | |
|---|---|---|---|---|---|
| 1. | 500L- | Structural Mechanics(MCQ) | 6 | ||
| 2. | 500L- | Structural Mechanics(MCQ) | 6 |
|
|
| 3. | 500L- | Structural Mechanics(MCQ) | 6 |
Page 1 0f 22
Prev
Next
Get Updated faster
We'll send you past questions based on your prefrences as soon as they come in


Work Experience
March 2011 - Present
Freelance Electrician/Wireman
Seremban
Install/replace ceiling fan, fluorescent lamp.
Fix/add socket point (ring and radial connection).
Minor electrical related problem troubleshooting.
January 2013 - August 2013
Electrician/Wireman
CHING LEE KION SDN BHD
Installation of Electrical Wiring from kWh(kilowatt hour) meter
connection till distribution box for 240VAC single-phase connection.
June 2010 - November 2010
Intern
SIRIM QAS International Sdn.Bhd
Testing of electrical equipments.
Skills
Technical Skills
- Wiring (Single-Phase,240V)
- Soldering electronic circuitry
- Reading schematic diagram
- Modifying electronic circuits
- Mixing cement and fixing wall cracks
- Repairing minor electrical equipments
Software Skills
- Livewire
- PCB Wizard
- MultiSim
- Dialux
- Matlab
Interests
Exploring the evolution of electrical engineering.
Getting to know modern and conventional technologies in fields such as electrical cars and military applications.
Developing DIY (Do It Yourself) hobby projects.
Doing electronics projects like mini home alarm system and water hose rolling system.


1 lb package silken tofu
1 cup almond milk
1.5 cup chocolate chips
1/2 Tbsp vanilla extract
In 1-quart microwavable bowl, microwave chocolate chips and almond milk uncovered on High 1 minute; stir. Microwave about 30 seconds longer or until mixture can be stirred smooth. Stir in vanilla. Let the mixutre cool for 3 minutes.
In a high powered blender combine chocolate mixture and tofu. Blend in high until smooth, about 30 seconds.
Pour into 4-5 ramekins or small dishes. Chill 2-3 hours and it's ready to eat!


Not to sound like a broken record but the island of Martinique
is very beautiful, just like the rest of the islands we have
been visiting. It has lots of mountains, green trees,
friendly people, nice climate, but I guess the one thing it has
more than any other island so far is the number of catamarans
that are in the Le Marin anchorage. This anchorage is the home
to six different charter companies and their inventory of
catamarans is second to none, even more than what we saw in the
BVIs. The anchorage is very protected and has every
service for the boating industry that you could want, we have
used a few of them as well. We did stop at the major
harbor of Fort-de-France for a few days but the rolly anchorage
was uncomfortable so we headed further south to Le Marin.
The other thing this island/anchorage has is a boat called Day
Dreamer and it's crew. Their crew includes three girls who have
been also looking for another kid boat so they were very happy
to have us come into the anchorage. We had met Day Dreamer
last year in Charleston and hung out for a week or two and had a
good time. Between the water and the sandy beach Derek and the
girls from Day Dreamer have been having a great time.
We have not done as much exploring on the island as we have on
the others but what we has seen has been worth it. Many
boaters that we talked to bypass the island because the language
spoken here is French, very little English. We have not
had any issues and have enjoyed listening to the conversations
and wondering what they are talking about. The weather has
been cloudy with a little rain most days, not enough that you
are locked inside the boat but you have to make sure when you
feel the first rain drops you get the hatches closed quickly.
So far on the trip down we have been exposed to different
currencies: US Dollars, DR peso, Euros, and Eastern Caribbean
dollar. We have used the last two off and on over the last
few islands so have not worried about how much inventory we still have.
Now as we are getting ready to leave Martinique we do not want
to carry too many Euros that will sit in our wallets until who
knows when. The ATMs are very assessable so getting more
is not the issue. Now it
has taken some time to get use to the different color, size and
look but it all spends the same. The exchange rates are
different for each currency so some simple math is usually
required to make sure you want to spend that amount on the
product.
The two major islands between us and Grenada are St. Lucia and
St. Vincent. Both islands have some unique things on them
but each have some issues with either clearing in/out or pesky
boat boys. Will have to do more research and which
anchorages we really want to stop at.
06/20/13; Beautiful Martinique
Martinique Island and our two anchorages |
Around Fort-de-France |
Hauled boats at Le Marin |
Can you say catamaran, |
Many boats in the anchorage |
Day Dreamer |
|
|
|
|
|
|


About the Author:
I'm a guitar player, songwriter, touring musician, record collector, and DJ, with a deep interest in all things Mid-Century. I'm currently in the process of getting my Italian passport with the goal of living between the Pacific Northwest and somewhere in the EU (most likely Italy), or perhaps the UK.
My primary goal for learning web development is to assist fellow artists, musicians, independent venues and record labels in fulfilling IT-related requirements necessary to succeed in today's market, as well as having the ability to independently generate revenue remotely, from anywhere in the world.


log In
Log in with Facebook
Log in with Google
Email:
Password:
Login
Take the Healthy Eating Quiz and
sign up
for free.


Fulscreen + Vertically Centered Text
The top offset is 150px.
Fulscreen + Parallax Element
Has Overlay Background
Use the data-bg
attribute to set the parallax.
Do not change height on mobile devices.
Has class "uix-height--30"
Parallax only works on inline image 1920 x 600
Small Image 1920 x 309
Has Overlay Background


This package allows transpiling JavaScript files using Babel and webpack.
Notes: Issues with the output should be reported on the babel issue tracker;
webpack 1.x | babel-loader <= 6.x
webpack 2.x | babel-loader >= 7.x (recommended) (^6.2.10 will also work, but with deprecation warnings)
webpack 3.x | babel-loader >= 7.1
yarn add babel-loader babel-core babel-preset-env webpack --dev
We recommend using yarn, but you can also still use npm:
npm install --save-dev babel-loader babel-core babel-preset-env webpack
Within your webpack configuration object, you'll need to add the babel-loader to the list of modules, like so:
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}
]
}
See the babel
options.
You can pass options to the loader by using the options property:
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env'],
plugins: [require('babel-plugin-transform-object-rest-spread')]
}
}
}
]
}
This loader also supports the following loader-specific option:
cacheDirectory
: Default false
. When set, the given directory will be used to cache the results of the loader. Future webpack builds will attempt to read from the cache to avoid needing to run the potentially expensive Babel recompilation process on each run. If the value is blank (loader: 'babel-loader?cacheDirectory'
) or true
(loader: babel-loader?cacheDirectory=true
) the loader will use the default cache directory in node_modules/.cache/babel-loader
or fallback to the default OS temporary file directory if no node_modules
folder could be found in any root directory.
cacheIdentifier
: Default is a string composed by the babel-core's version, the babel-loader's version, the contents of .babelrc file if it exists and the value of the environment variable BABEL_ENV
with a fallback to the NODE_ENV
environment variable. This can be set to a custom value to force cache busting if the identifier changes.
forceEnv
: Default will resolve BABEL_ENV then NODE_ENV. Allow you to override BABEL_ENV/NODE_ENV at the loader level. Useful for isomorphic applications with different babel configuration for client and server.
Note: The sourceMap
option is ignored, instead sourceMaps are automatically enabled when webpack is configured to use them (via the devtool
config option).
Make sure you are transforming as few files as possible. Because you are probably
matching /\.js$/
, you might be transforming the node_modules
folder or other unwanted
source.
To exclude node_modules
, see the exclude
option in the loaders
config as documented above.
You can also speed up babel-loader by as much as 2x by using the cacheDirectory
option.
This will cache transformations to the filesystem.
babel uses very small helpers for common functions such as _extend
. By default
this will be added to every file that requires it.
You can instead require the babel runtime as a separate module to avoid the duplication.
The following configuration disables automatic per-file runtime injection in babel, instead
requiring babel-plugin-transform-runtime
and making all helper references use it.
See the docs for more information.
NOTE: You must run npm install babel-plugin-transform-runtime --save-dev
to include this in your project and babel-runtime
itself as a dependency with npm install babel-runtime --save
.
rules: [
// the 'transform-runtime' plugin tells babel to require the runtime
// instead of inlining it.
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env'],
plugins: ['transform-runtime']
}
}
}
]
Since babel-plugin-transform-runtime includes a polyfill that includes a custom regenerator runtime and core.js, the following usual shimming method using webpack.ProvidePlugin
will not work:
// ...
new webpack.ProvidePlugin({
'Promise': 'bluebird'
}),
// ...
The following approach will not work either:
require('babel-runtime/core-js/promise').default = require('bluebird');
var promise = new Promise;
which outputs to (using runtime
):
'use strict';
var _Promise = require('babel-runtime/core-js/promise')['default'];
require('babel-runtime/core-js/promise')['default'] = require('bluebird');
var promise = new _Promise();
The previous Promise
library is referenced and used before it is overridden.
One approach is to have a "bootstrap" step in your application that would first override the default globals before your application:
// bootstrap.js
require('babel-runtime/core-js/promise').default = require('bluebird');
// ...
require('./app');
If you receive this message it means that you have the npm package babel
installed and use the short notation of the loader in the webpack config (which is not valid anymore as of webpack 2.x):
{
test: /\.js$/,
loader: 'babel',
}
Webpack then tries to load the babel
package instead of the babel-loader
.
To fix this you should uninstall the npm package babel
as it is deprecated in babel v6. (instead install babel-cli
or babel-core
)
In the case one of your dependencies is installing babel
and you cannot uninstall it yourself, use the complete name of the loader in the webpack config:
{
test: /\.js$/,
loader: 'babel-loader',
}


{% extends "base.html" %} {% block title %}Page not Found{%endblock title %} {% block content %}
We couldn't find the page you requested.


Take your financial life online. Your Easybank account will be a one-stop-shop for spending, saving, budgetting, investing, and much more.
We leverage Open Banking to your bank account into your financial hub
Control your finances like never before.
Our modern web and mobile applications allows you to keep
track of your finances wherever in
the world.
We don't do braches. Open your account in minutes online and start taking control of your finances right away.
Manage your savings, investments, pension, and much more from one account. Tracking your money has never been easier.
The world is getting smaller and we're becoming more mobile. So why should you be forced to only receive money in a single...
Our single budgetting feature allows you to separate out your spending and set realistic your spending and set realistic each month. That means you...
We want you to enjoy your travels. This is why we don't charge any fees ion purchases while you're abroad. We'll even show you...
After a lot of hard work by this whole team, we're excited to launch our closed beta. It's easy to request an invite through the site...


Problem 4. Third digit
Write an expression that checks for given integer if its third digit (right-to-left) is 7.
Push F12


Viva Las Vegas
Viva Las Vegas is a movie starring Elvis Presley, Ann-Margret, and Cesare Danova. Race car driver Lucky Jackson goes to Las Vegas to earn money to pay for a new engine for his motor car. Working as a waiter, he still finds the time...


| Name |
Description |
|
ThermodynamicState |
Thermodynamic state of two phase medium |
|
BaseProperties |
Base properties (p, d, T, h, u, R, MM, sat) of two phase
medium |
| setDewState |
Return the thermodynamic state on the dew line |
|
setBubbleState |
Return the thermodynamic state on the bubble line |
|
setState_dTX |
Return thermodynamic state as function of d, T and composition
X or Xi |
|
setState_phX |
Return thermodynamic state as function of p, h and composition
X or Xi |
|
setState_psX |
Return thermodynamic state as function of p, s and composition
X or Xi |
|
setState_pTX |
Return thermodynamic state as function of p, T and composition
X or Xi |
| setSat_T |
Return saturation property record from temperature |
| setSat_p |
Return saturation property record from pressure |
|
bubbleEnthalpy |
Return bubble point specific enthalpy |
| dewEnthalpy |
Return dew point specific enthalpy |
|
bubbleEntropy |
Return bubble point specific entropy |
| dewEntropy |
Return dew point specific entropy |
|
bubbleDensity |
Return bubble point density |
| dewDensity |
Return dew point density |
|
saturationPressure |
Return saturation pressure |
|
saturationTemperature |
Return saturation temperature |
|
saturationPressure_sat |
Return saturation temperature |
|
saturationTemperature_sat |
Return saturation temperature |
|
saturationTemperature_derp |
Return derivative of saturation temperature w.r.t.
pressure |
|
saturationTemperature_derp_sat |
Return derivative of saturation temperature w.r.t.
pressure |
|
surfaceTension |
Return surface tension sigma in the two phase region |
| molarMass |
Return the molar mass of the medium |
|
dBubbleDensity_dPressure |
Return bubble point density derivative |
|
dDewDensity_dPressure |
Return dew point density derivative |
|
dBubbleEnthalpy_dPressure |
Return bubble point specific enthalpy derivative |
|
dDewEnthalpy_dPressure |
Return dew point specific enthalpy derivative |
|
specificEnthalpy_pTX |
Return specific enthalpy from pressure, temperature and mass
fraction |
|
temperature_phX |
Return temperature from p, h, and X or Xi |
| density_phX |
Return density from p, h, and X or Xi |
|
temperature_psX |
Return temperature from p, s, and X or Xi |
| density_psX |
Return density from p, s, and X or Xi |
|
specificEnthalpy_psX |
Return specific enthalpy from p, s, and X or Xi |
| setState_pT |
Return thermodynamic state from p and T |
| setState_ph |
Return thermodynamic state from p and h |
| setState_ps |
Return thermodynamic state from p and s |
| setState_dT |
Return thermodynamic state from d and T |
| setState_px |
Return thermodynamic state from pressure and vapour
quality |
| setState_Tx |
Return thermodynamic state from temperature and vapour
quality |
|
vapourQuality |
Return vapour quality |
| density_ph |
Return density from p and h |
|
temperature_ph |
Return temperature from p and h |
| pressure_dT |
Return pressure from d and T |
|
specificEnthalpy_dT |
Return specific enthalpy from d and T |
|
specificEnthalpy_ps |
Return specific enthalpy from p and s |
|
temperature_ps |
Return temperature from p and s |
| density_ps |
Return density from p and s |
|
specificEnthalpy_pT |
Return specific enthalpy from p and T |
| density_pT |
Return density from p and T |


Two factor auth test
only if we have user account
User flow:
- First open the socket
- enter mobile nuber in format (country code operator prefix number):
+CcOp1234567
- backend validates the number and sends PIN over SMS, enter the pin
1234
- if the user already has this number we get the name and send JWT to authenticate with firebase
- otherwise we ask for the name
- New user is registered and JWT is sent to him


| I l@ve RuBoard |
Currently, there are more than 200 modules in the standard distribution, covering topics such as string and text processing, networking and web tools, system interfaces, database interfaces, serialization, data structures and algorithms, user interfaces, numerical computing, and others. We touch on only the most widely used here and mention some of the more powerful and specialized ones in Chapter 9, and Chapter 10.
The string module is somewhat of a historical anomaly. If Python were being designed today, chances are many functions currently in the string module would be implemented instead as methods of string objects.[4] The string module operates on strings. Table 8.4 lists the most useful functions defined in the string module, along with brief descriptions, just to give you an idea as to the module's purpose. The descriptions given here are not complete; for an exhaustive listing, check the Library Reference or the Python Pocket Reference. Except when otherwise noted, each function returns a string.
[4] For a more detailed discussion of this and of many other commonly asked questions about Python, check out the FAQ list at http://www.python.org/doc/FAQ.html. For the question of string methods versus string functions, see Question 6.4 in that document.
|
Function Name |
Behavior |
|---|---|
atof(string) |
Converts a string to a floating point number (see the float built-in): >>> string.atof("1.4") 1.4 |
atoi(string [, base]) |
Converts a string to an integer, using the base specified (base 10 by default (see the int built-in): >>> string.atoi("365") 365 |
atol(string [, base]) |
Same as atoi, except converts to a long integer (see the long built-in): >>> string.atol("987654321") 987654321L |
capitalize(word) |
Capitalizes the first letter of word: >>> string.capitalize("tomato") 'Tomato' |
capwords(string) |
Capitalizes each word in the string: >>> string.capwords("now is the time") 'Now Is The Time' |
expandtabs( string, tabsize) |
Expands the tab characters in string, using the specified tab size (no default) |
find(s, sub [, start [, end]]) |
Returns the index of the string s corresponding to the first occurrence of the substring sub in s, or -1 if sub isn't in s: >>> string.find("now is the time", 'is') 4 |
rfind(s, sub [, start [, end]]) |
Same as find, but gives the index of the last occurrence of sub in s |
index(s, sub [, start [, end]]) |
Same as find, but raises a ValueError exception if sub isn't found in s |
rindex(s, sub[, start [, end]]) |
Same as rfind, but raises a ValueError exception if sub is not found in s |
count(s, sub[, start [, end]]) |
Returns the number of occurrences of sub in s: >>> string.count("now is the time", 'i') 2 |
replace(str, old, new[, maxsplit]) |
Returns a string like str except that all (or some) occurrences of old have been replaced with new: >>> string.replace("now is the time", ' ', '_') 'now_is_the_time' |
lower(string), upper(string) |
Returns a lowercase (or uppercase) version of string |
split(s [, sep[, maxsplit]]) |
Splits the string s at the specified separator string sep (whitespace by default), and returns a list of the "split" substrings: >>> string.split("now is the time") ['now', 'is', 'the', 'time'] |
join(wordlist[, sep[, maxsplit]]) |
Joins a sequence of strings, inserting copies of sep between each (a single space by default): >>> string.join(["now","is","the","time", '*']) 'now*is*the*time' >>> string.join("now is the time", '*') 'n*o*w* *i*s* *t*h*e* *t*i*m*e' Remember that a string is itself a sequence of one-character strings! |
lstrip(s), rstrip(s), strip(s) |
Strips whitespace occurring at the left, right, or both ends of s: >>> string.strip(" before and after ") 'before and after' |
swapcase(s) |
Returns a version of s with the lowercase letters replaced with their uppercase equivalent and vice versa |
ljust(s, width), rjust(s, width), center(s, width) |
Left-pads, right-pads, or centers the string s with spaces so that the returned string has width characters |
The string module also defines a few useful constants, as shown in Table 8.5.
|
Constant Name |
Value |
|---|---|
|
digits |
'0123456789' |
|
octdigits |
'01234567' |
|
hexdigits |
'0123456789abcdefABCDEF' |
|
lowercase |
'abcdefghijklmnopqrstuvwxyz' [5] |
|
uppercase |
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
|
letters |
lowercase + uppercase |
|
whitespace |
' \t\n\r\v' (all whitespace characters) |
[5] On most systems, the string.lowercase, string.uppercase, and string.letters have the values listed above. If one uses the locale module to specify a different cultural locale, they are updated. Thus for example, after doing locale.setlocale(locale.LC_ALL, 'fr'), the string.letters attribute will also include accented letters and other valid French letters.
The constants in Table 8.5Table 8.5 generally test whether specific characters fit a criterion—for example, x in string.whitespace returns true only if x is one of the whitespace characters.
A typical use of the string module is to clean up user input. The following line removes all "extra" whitespace, meaning it replaces sequences of whitespace with single space characters, and it deletes leading and trailing spaces:
thestring = string.strip(string.join(string.split(thestring)))
The string module defines basic operations on strings. It shows up in almost all programs that interact with files or users. Because Python strings can contain null bytes, they can also process binary data—more on this when we get to the struct module.
In addition, Python provides a specialized string-processing tool to use with regular expressions. For a long time, Python's regular expressions (available in the regex and regsub modules), while adequate for some tasks, were not up to par with those offered by competing languages, such as Perl. As of Python 1.5, a new module called re provides a completely overhauled regular expression package, which significantly enhances Python's string-processing abilities.
Regular expressions are strings that let you define complicated pattern matching and replacement rules for strings. These strings are made up of symbols that emphasize compact notation over mnemonic value. For example, the single character . means "match any single character." The character + means "one or more of what just preceded me." Table 8.6 lists some of the most commonly used regular expression symbols and their meanings in English.
|
Special Character |
Meaning |
|---|---|
|
. |
Matches any character except newline by default |
|
^ |
Matches the start of the string |
|
$ |
Matches the end of the string |
|
* |
"Any number of occurrences of what just preceded me" |
|
+ |
"One or more occurrences of what just preceded me" |
|
| |
"Either the thing before me or the thing after me" |
|
\w |
Matches any alphanumeric character |
|
\d |
Matches any decimal digit |
|
tomato |
Matches the string tomato |
Suppose you need to write a program to replace the strings "green pepper" and "red pepper" with "bell pepper" if and only if they occur together in a paragraph before the word "salad" and not if they are followed (with no space) by the string "corn." These kinds of requirements are surprisingly common in computing. Assume that the file you need to process is called pepper.txt. Here's a silly example of such a file:
This is a paragraph that mentions bell peppers multiple times. For one, here is a red pepper and dried tomato salad recipe. I don't like to use green peppers in my salads as much because they have a harsher flavor. This second paragraph mentions red peppers and green peppers but not the "s" word (s-a-l-a-d), so no bells should show up. This third paragraph mentions red peppercorns and green peppercorns, which aren't vegetables but spices (by the way, bell peppers really aren't peppers, they're chilies, but would you rather have a good cook or a good botanist prepare your salad?).
The first task is to open it and read in the text:
file = open('pepper.txt') text = file.read()
We read the entire text at once and avoid splitting it into lines, since we will assume that paragraphs are defined by two consecutive newline characters. This is easy to do using the split function of the string module:
import string paragraphs = string.split(text, '\n\n')
At this point we've split the text into a list of paragraph strings, and all there is left is to do is perform the actual replacement operation. Here's where regular expressions come in:
import rematchstr = re.compile(r"""\b(red|green) # 'red' or 'green' starting new words (\s+ # followed by whitespace pepper # the word 'pepper' (?!corn) # if not followed immediately by 'corn' (?=.*salad))""", # and if followed at some point by 'salad'', re.IGNORECASE | # allow pepper, Pepper, PEPPER, etc. re.DOTALL | # allow to match newlines as well re.VERBOSE) # this allows the comments and the newlines above for paragraph in paragraphs: fixed_paragraph = matchstr.sub(r'bell\2', paragraph) print fixed_paragraph+'\n'
The bold line is the hardest one; it creates a compiled regular expression pattern, which is like a program. Such a pattern specifies two things: which parts of the strings we're interested in and how they should be grouped. Let's go over these in turn.
Defining which parts of the string we're interested in is done by specifying a pattern of characters that defines a match. This is done by concatenating smaller patterns, each of which specifies a simple matching criterion (e.g., "match the string 'pepper'," "match one or more whitespace characters," "don't match 'corn'," etc.). As mentioned, we're looking for the words red or green, if they're followed by the word pepper, that is itself followed by the word salad, as long as pepper isn't followed immediately by 'corn'. Let's take each line of the re.compile(...) expression in turn.
The first thing to notice about the string in the re.compile() is that it's a "raw" string (the quotation marks are preceded by an r). We could have used a regular string instead and used \\b instead of \b and \\s instead of \s. In this case, it makes little difference; for complicated regular expressions, raw strings allow much more clear syntax than escaped backslashes.
[6] Raw strings can't end with an odd number of backslash characters. That's unlikely to be a problem when using raw strings for regular expressions, however, since regular expressions can't end with backslashes.
The first line in the pattern is \b(red|green). \b stands for "the empty string, but only at the beginning or end of a word"; using it here prevents matches that have red or green as the final part of a word (as in "tired pepper"). The (red|green) pattern specifies an alternation: either 'red' or 'green'. Ignore the left parenthesis that follows for now. \s is a special symbol that means "any whitespace character," and + means "one or more occurrence of whatever comes before me," so, put together, \s+ means "one or more whitespace characters." Then, pepper just means the string 'pepper'. (?!corn) prevents matches of "patterns that have 'corn' at this point," so we prevent the match on 'peppercorn'. Finally, (?=.*salad) says that for the pattern to match, it must be followed by any number of characters (that's what .* means), followed by the word salad. The ?= bit specifies that while the pattern should determine whether the match occurs, it shouldn't be "used up" by the match process; it's a subtle point, which we'll ignore for now. At this point we've defined the pattern corresponding to the substring.
Now, note that there are two parentheses we haven't explained yet—the one before \s+ and the last one. What these two do is define a "group," which starts after the red or green and go to the end of the pattern. We'll use that group in the next operation, the actual replacement. First, we need to mention the three flags that are joined by the logical operation "or". These specify kinds of pattern matches. The first, re.IGNORECASE, says that the text comparisons should ignore whether the text and the match have similar or different cases. The second, re.DOTALL, specifies that the . character should match any character, including the newline character (that's not the default behavior). Finally, the third, re.VERBOSE, allows us to insert extra newlines and # comments in the regular expression, making it easier to read and understand. We could have written the statement more compactly as:
matchstr = re.compile(r"\b(red|green)(\s+pepper(?!corn)(?=.*salad))", re.I | re.S)
The actual replacement operation is done with the line:
fixed_paragraph = matchstr.sub(r'bell\2', paragraph)
First, it should be fairly clear that we're calling the sub method of the matchstr object. That object is a compiled regular expression object, meaning that some of the processing of the expression has already been done (in this case, outside the loop), thus speeding up the total program execution. We use a raw string again to write the first argument to the method. The \2 is a reference to group 2 in the regular expression—the second group of parentheses in the regular expression—in our case, everything starting with pepper and up to and including the word 'salad'. This line therefore means, "Replace the matched string with the string that is 'bell' followed by whatever starts with 'pepper' and goes up to the end of the matched string, in the paragraph string."
So, does it work? The pepper.txt file we saw earlier had three paragraphs: the first satisfied the requirements of the match twice, the second didn't because it didn't mention the word "salad," and the third didn't because the red and green words are before peppercorn, not pepper. As it was supposed to, our program (saved in a file called pepper.py) modifies only the first paragraph:
/home/David/book$ python pepper.py This is a paragraph that mentions bell peppers multiple times. For one, here is a bell pepper and dried tomato salad recipe. I don't like to use bell peppers in my salads as much because they have a harsher flavor. This second paragraph mentions red peppers and green peppers but not the "s" word (s-a-l-a-d), so no bells should show up. This third paragraph mentions red peppercorns and green peppercorns, which aren't vegetables but spices (by the way, bell peppers really aren't peppers, they're chilies, but would you rather have a good cook or a good botanist prepare your salad?).
This example, while artificial, shows how regular expressions can compactly express complicated matching rules. If this kind of problem occurs often in your line of work, mastering regular expressions is a worthwhile investment of time and effort.
A thorough coverage of regular expressions is beyond the scope of this book. Jeffrey Friedl gives an excellent coverage of regular expressions in his book Mastering Regular Expressions (O'Reilly & Associates). His description of Python regular expressions (at least in the First Edition) uses the old-style syntax, which is no longer the recommended one, so those specifics should mostly be ignored; the regular expressions currently used in Python are much more similar to those of Perl. Still, his book is a must-have for anyone doing serious text processing. For the casual user (such as these authors), the descriptions in the Library Reference do the job most of the time. Use the re module, not the regexp, regex, and regsub modules, which are deprecated.
The operating-system interface defines the mechanism by which programs are expected to manipulate things like files, processes, users, and threads.
The os module provides a generic interface to the operating system's most basic set of tools. The specific set of calls it defines depend on which platform you use. (For example, the permission-related calls are available only on platforms that support them, such as Unix and Windows.) Nevertheless, it's recommended that you always use the os module, instead of the platform-specific versions of the module (called posix, nt, and mac). Table 8.7 lists some of the most often-used functions in the os module. When referring to files in the context of the os module, one is referring to filenames, not file objects.
|
Function Name |
Behavior |
|---|---|
|
getcwd() |
Returns a string referring to the current working directory (cwd): >>> print os.getcwd() h:\David\book |
|
listdir(path) |
Returns a list of all of the files in the specified directory: >>> os.listdir(os.getcwd()) ['preface.doc', 'part1.doc', 'part2.doc'] |
|
chown(pathuid, gid) |
Changes the owner ID and group ID of specified file |
|
chmod(path, mode) |
Changes the permissions of specified file with numeric mode mode (e.g., 0644 means read/write for owner, read for everyone else) |
|
rename(src, dest) |
Renames file named src with name dest |
|
remove(path) or unlink(path) |
Deletes specified file (see rmdir to remove directories) |
|
mkdir([, mode]) |
Creates a directory named path with numeric mode mode(see os.chmod): >>> os.mkdir('newdir') |
|
rmdir(path) |
Removes directory named path |
|
system(command) |
Executes the shell command in a subshell; the return value is the return code of the command |
|
symlink(src, dest) |
Creates soft link from file src to file dst |
|
link(src, dest) |
Creates hard link from file src to file dst |
There are many other functions in the os module; in fact, any function that's part of the POSIX standard and widely available on most Unix platforms is supported by Python on Unix. The interfaces to these routines follow the POSIX conventions. You can retrieve and set UIDs, PIDs, and process groups; control nice levels; create pipes; manipulate file descriptors; fork processes; wait for child processes; send signals to processes; use the execv variants; etc.
The os module also defines some important attributes that aren't functions:
The os.name attribute defines the current version of the platform-specific operating-system interface. Registered values for os.name are 'posix', 'nt', 'dos', and 'mac'. It's different from sys.platform, which we discussed earlier in this chapter.
os.error defines a class used when calls in the os module raise errors. When this exception is raised, the value of the exception contains two variables. The first is the number corresponding to the error (known as errno), and the second is a string message explaining it (known as strerror):
>>> os.rmdir('nonexistent_directory') # how it usually shows up Traceback (innermost last): File "<stdin>", line 1, in ? os.error: (2, 'No such file or directory') >>> try: # we can catch the error and take ... os.rmdir('nonexistent directory') # it apart ... except os.error, value: ... print value[0], value[1] ... 2 No such file or directory
The os.environ dictionary contains key/value pairs corresponding to the environment variables of the shell from which Python was started. Because this environment is inherited by the commands that are invoked using the os.system call, modifying the os.environ dictionary modifies the environment:
>>> print os.environ['SHELL'] /bin/sh >>> os.environ['STARTDIR'] = 'MyStartDir' >>> os.system('echo $STARTDIR') # 'echo %STARTDIR%' on DOS/Win MyStartDir # printed by the shell 0 # return code from echo
The os module also includes a set of strings that define portable ways to refer to directory-related operations, as shown in Table 8.8.
|
Attribute Name |
Meaning and Value |
|---|---|
|
curdir |
A string that denotes the current directory: '.' on Unix, DOS, and Windows; ':' on the Mac |
|
pardir |
A string that denotes the parent directory: '..' on Unix, DOS, and Windows; '::' on the Mac |
|
sep |
The character that separates pathname components: '/' on Unix; '\' on DOS, Windows; ':' on the Mac |
|
altsep |
An alternate character to sep when available; set to Nonesystems except DOS and Windows, where it's '/' |
|
pathsep |
The character that separates path components: ':' on Unix; ';' on DOS and Windows |
These strings are especially useful when combined with the functionality in the os.path module, which provides many functions that manipulate file paths (see Table 8.9). Note that the os.path module is an attribute of the os module; it's imported automatically when the os module is loaded, so you don't need to import it explicitly. The outputs of the examples in Table 8.9 correspond to code run on a Windows or DOS machine. On another platform, the appropriate path separators would be used instead.
The keen-eyed reader might have noticed that the os module, while it provides lots of file-related functions, doesn't include a copy function. On DOS, copying a file is basically the same thing as opening one file in read/binary modes, reading all its data, opening a second file in write/binary mode, and writing the data to the second file. On Unix and Windows, making that kind of copy fails to copy the so-called stat bits (permissions, modification times, etc.) associated with the file. On the Mac, that operation won't copy the resource fork, which contains data such as icons and dialog boxes. In other words, copying is just not so simple. Nevertheless, often you can get away with a fairly simple function that works on Windows, DOS, Unix, and Macs as long as you're manipulating just data files with no resource forks. That function, called copyfile, lives in the shutil module. It includes a few generally useful functions, shown in Table 8.10.
|
Function Name |
Behavior |
|---|---|
|
copyfile(src, dest) |
Makes a copy of the file src and calls it dest (straight binary copy). |
|
copymode(src, dest) |
Copies mode information (permissions) from src to dest. |
|
copystat(src, dest) |
Copies all stat information (mode, utime) from src to dest. |
|
copy(src, dest) |
Copies data and mode information from src to dest (doesn't include the resource fork on Macs). |
|
copy2(src, dest) |
Copies data and stat information from src to dest (doesn't include the resource fork on Macs). |
|
copytree(src, dest, symlinks=0) |
Copies a directory recursively using copy2. The symlinks flag specifies whether symbolic links in the source tree must result in symbolic links in the destination tree, or whether the files being linked to must be copied. The destination directory must not already exist. |
|
rmtree(ignore_errors=0, onerror=None) |
Recursively deletes the directory indicated by path. If ignore_error is set to (the default behavior), errors are ignored. Otherwise, if onerror is set, it's called to handle the error; if not, an exception is raised on error. |
Python programs often process forms from web pages. To make this task easy, the standard Python distribution includes a module called cgi. Chapter 10 includes an example of a Python script that uses the CGI.
Universal resource locators are strings such as http://www.python.org/ that are now ubiquitous.[7] Two modules, urllib and urlparse, provide tools for processing URLs.
[7] The syntax for URLs was designed in the early days of the Web with the expectation that users would rarely see them and would instead click on hyperlinks tagged with the URLs, which would then be processed by computer programs. Had their future in advertising been predicted, a syntax making them more easily pronounced would probably have been chosen!
urllib defines a few functions for writing programs that must be active users of the Web (robots, agents, etc.). These are listed in Table 8.11.
|
Function Name |
Behavior |
|---|---|
urlopen (url[, data]) |
Opens a network object denoted by a URL for reading; it can also open local files: >>> page = urlopen('http://www.python.org') >>> page.readline() '<HTML>\012' >>> page.readline() DO NOT EDIT. -->\012' |
urlretrieve (url[, filename][, hook]) |
Copies a network object denoted by a URL to a local file (uses a cache): >>> urllib.urlretrieve('http://www.python.org/', 'wwwpython.html') |
urlcleanup() |
Cleans up the cache used by urlretrieve |
quote(string[, safe]) |
Replaces special characters in string using the %xx escape; the optional safe parameter specifies additional characters that shouldn't be quoted: its default value is: >>> quote('this & that @ home') 'this%20%26%20that%20%40%20home' |
quote_plus (string[, safe]) |
Like quote(), but also replaces spaces by plus signs |
unquote (string) |
Replaces %xx escapes by their single-character equivalent: >>> unquote('this%20%26%20that%20%40%20home') 'this & that @ home' |
urlencode (dict) |
Converts a dictionary to a URL-encoded string, suitable to pass to urlopen() as the optional data argument: >>> locals() {'urllib': <module 'urllib'>, '__doc__': None, 'x': '__builtin__'>} >>> urllib.urlencode(locals()) __builtin__%27%3e' |
urlparse defines a few functions that simplify taking URLs apart and putting new URLs together. These are listed in Table 8.12.
|
Function Name |
Behavior |
|---|---|
urlparse(urlstring[, [, default_scheme[,allow fragments]]) |
Parses a URL into six components, returning a six tuple: (addressing scheme, network location, path, parameters, query, fragment identifier): >>> urlparse('http://www.python.org/FAQ.html') ('http', 'www.python.org', '/FAQ.html', '', '', '') |
urlunparse(tuple) |
Constructs a URL string from a tuple as returned by urlparse() |
urljoin(base[,allow fragments]) |
Constructs a full (absolute) URL by combining a base URL (base) with a relative URL (url): >>> urljoin('http://www.python.org', 'doc/lib') 'http://www.python.org/doc/lib' |
The most commonly used protocols built on top of TCP/IP are supported with modules named after them. These are the httplib module (for processing web pages with the HTTP protocol); the ftplib module (for transferring files using the FTP protocol); the gopherlib module (for browsing Gopher servers); the poplib and imaplib modules for reading mail files on POP3 and IMAP servers, respectively; the nntplib module for reading Usenet news from NNTP servers; the smtplib protocol for communicating with standard mail servers. We'll use some of these in Chapter 9. There are also modules that can build Internet servers, specifically a generic socket-based IP server (socketserver), a simple web server (SimpleHTTPServer), and a CGI-compliant HTTP server (CGIHTTPSserver).
Once you use an Internet protocol to obtain files from the Internet (or before you serve them to the Internet), you must process these files. They come in many different formats. Table 8.13 lists each module in the standard library that processes a specific kind of Internet-related file format (there are others for sound and image format processing: see the Library Reference).
|
Module Name |
File Format |
|---|---|
sgmllib |
A simple parser for SGML files |
htmllib |
A parser for HTML documents |
xmllib |
A parser for XML documents |
formatter |
Generic output formatter and device interface |
rfc822 |
Parse RFC-822 mail headers (i.e., "Subject: hi there!") |
mimetools |
Tools for parsing MIME-style message bodies (a.k.a. file attachments) |
multifile |
Support for reading files that contain distinct parts |
binhex |
Encode and decode files in binhex4 format |
uu |
Encode and decode files in uuencode format |
binascii |
Convert between binary and various ASCII-encoded representations |
xdrlib |
Encode and decode XDR data |
mailcap |
Mailcap file handling |
mimetypes |
Mapping of filename extensions to MIME types |
base64 |
Encode and decode MIME base64 encoding |
quopri |
Encode and decode MIME quoted-printable encoding |
mailbox |
Read various mailbox formats |
mimify |
Convert mail messages to and from MIME format |
A frequent question about file manipulation is "How do I process binary files in Python?" The answer to that question usually involves the struct module. It has a simple interface, since it exports just three functions: pack, unpack, and calcsize.
Let's start with the task of decoding a binary file. Imagine a binary file bindat.dat that contains data in a specific format: first there's a float corresponding to a version number, then a long integer corresponding to the size of the data, and then the number of unsigned bytes corresponding to the actual data. The key to using the struct module is to define a "format" string, which corresponds to the format of the data you wish to read, and find out which subset of the file corresponds to that data. For our example, we could use:
import struct data = open('bindat.dat').read() start, stop = 0, struct.calcsize('fl') version_number, num_bytes = struct.unpack('fl', data[start:stop]) start, stop = stop, start + struct.calcsize('B'*num_bytes) bytes = struct.unpack('B'*num_bytes, data[start:stop])
'f' is a format string for a single floating point number (a C float, to be precise), 'l' is for a long integer, and 'B' is a format string for an unsigned char. The available unpack format strings are listed in Table 8.14. Consult the Library Reference for usage details.
|
Format |
C Type |
Python |
|---|---|---|
|
x |
pad byte |
No value |
|
c |
char |
String of length 1 |
|
b |
signed char |
Integer |
|
B |
unsigned char |
Integer |
|
h |
short |
Integer |
|
H |
unsigned short |
Integer |
|
i |
int |
Integer |
|
I |
unsigned int |
Integer |
|
l |
long |
Integer |
|
L |
unsigned long |
Integer |
|
f |
float |
Float |
|
d |
double |
Float |
|
s |
char[] |
String |
|
p |
char[] |
String |
|
P |
void * |
Integer |
At this point, bytes is a tuple of num_bytes Python integers. If we know that the data is in fact storing characters, we could either use chars = map(chr, bytes). To be more efficient, we could change the last unpack to use 'c' instead of 'B', which would do the conversion for us and return a tuple of num_bytes single-character strings. More efficiently still, we could use a format string that specifies a string of characters of a specified length, such as:
chars = struct.unpack(str(num_bytes)+'s', data[start:stop])
The packing operation is the exact converse; instead of taking a format string and a data string, and returning a tuple of unpacked values, it takes a format string and a variable number of arguments and packs those arguments using that format string into a new "packed" string.
Note that the struct module can process data that's encoded with either kind of byte-ordering,[8] thus allowing you to write platform-independent binary file manipulation code. For large files, consider using the array module.
[8] The order with which computers list multibyte words depends on the chip used (so much for standards). Intel and DEC systems use so-called little-endian ordering, while Motorola and Sun-based systems use big-endian ordering. Network transmissions also use big-endian ordering, so the struct module comes in handy when doing network I/O on PCs.
These last few modules will help debug, time, and optimize your Python programs.
The first task is, not surprisingly, debugging. Python's standard distribution includes a debugger called pdb. Using pdb is fairly straightforward. You import the pdb module and call its run method with the Python code the debugger should execute. For example, if you're debugging the program in spam.py from Chapter 6, do this:
>>> import spam # import the module we wish to debug >>> import pdb # import pdb >>> pdb.run('instance = spam.Spam()') # start pdb with a statement to run > <string>(0)?() (Pdb) break spam.Spam.__init__ # we can set break points (Pdb) next > <string>(1)?() (Pdb) n # 'n' is short for 'next' > spam.py(3)__init__() -> def __init__(self): (Pdb) n > spam.py(4)__init__() -> Spam.numInstances = Spam.numInstances + 1 (Pdb) list # show the source code listing 1 class Spam: 2 numInstances = 0 3 B def __init__(self): # note the B for Breakpoint 4 -> Spam.numInstances = Spam.numInstances + 1 # where we are 5 def printNumInstances(self): 6 print "Number of instances created: ", Spam.numInstances 7 [EOF] (Pdb) where # show the calling stack <string>(1)?() > spam.py(4)__init__() -> Spam.numInstances = Spam.numInstances + 1 (Pdb) Spam.numInstances = 10 # note that we can modify variables (Pdb) print Spam.numInstances # while the program is being debugged 10 (Pdb) continue # this continues until the next break- --Return-- # point, but there is none, so we're > <string>(1)?()->None # done (Pdb) c # this ends up quitting Pdb <spam.Spam instance at 80ee60> # this is the returned instance >>> instance.numInstances # note that the change to numInstance 11 # was *before* the increment op
As the session above shows, with pdb you can list the current code being debugged (with an arrow pointing to the line about to be executed), examine variables, modify variables, and set breakpoints. The Library Reference's Chapter 9 covers the debugger in detail.
Even when a program is working, it can sometimes be too slow. If you know what the bottleneck in your program is, and you know of alternative ways to code the same algorithm, then you might time the various alternative methods to find out which is fastest. The time module, which is part of the standard distribution, provides many time-manipulation routines. We'll use just one, which returns the time since a fixed "epoch" with the highest precision available on your machine. As we'll use just relative times to compare algorithms, the precision isn't all that important. Here's two different ways to create a list of 10,000 zeros:
def lots_of_appends(): zeros = [] for i in range(10000): zeros.append(0) def one_multiply(): zeros = [0] * 10000
How can we time these two solutions? Here's a simple way:
import time, makezeros def do_timing(num_times, *funcs): totals = {} for func in funcs: totals[func] = 0.0 for x in range(num_times): for func in funcs: starttime = time.time() # record starting time apply(func) stoptime = time.time() # record ending time elapsed = stoptime--starttime # difference yields time elapsed totals[func] = totals[func] + elapsed for func in funcs: print "Running %s %d times took %.3f seconds" % (func.__name__, num_times totals[func]) do_timing(100, (makezeros.lots_of_appends, makezeros.one_multiply))
And running this program yields:
csh> python timings.py Running lots_of_appends 100 times took 7.891 seconds Running one_multiply 100 times took 0.120 seconds
As you might have suspected, a single list multiplication is much faster than lots of appends. Note that in timings, it's always a good idea to compare lots of runs of functions instead of just one. Otherwise the timings are likely to be heavily influenced by things that have nothing to do with the algorithm, such as network traffic on the computer or GUI events.
What if you've written a complex program, and it's running slower than you'd like, but you're not sure what the problem spot is? In those cases, what you need to do is profile the program: determine which parts of the program are the time-sinks and see if they can be optimized, or if the program structure can be modified to even out the bottlenecks. The Python distribution includes just the right tool for that, the profile module, documented in the Library Reference. Assuming that you want to profile a given function in the current namespace, do this:
>>> from timings import * >>> from makezeros import * >>> profile.run('do_timing(100, (lots_of_appends, one_multiply))') Running lots_of_appends 100 times took 8.773 seconds Running one_multiply 100 times took 0.090 seconds 203 function calls in 8.823 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 100 8.574 0.086 8.574 0.086 makezeros.py:1(lots_of_appends) 100 0.101 0.001 0.101 0.001 makezeros.py:6(one_multiply) 1 0.001 0.001 8.823 8.823 profile:0(do_timing(100, (lots_of_appends, one_multiply))) 0 0.000 0.000 profile:0(profiler) 1 0.000 0.000 8.821 8.821 python:0(194.C.2) 1 0.147 0.147 8.821 8.821 timings.py:2(do_timing)
As you can see, this gives a fairly complicated listing, which includes such things as per-call time spent in each function and the number of calls made to each function. In complex programs, the profiler can help find surprising inefficiencies. Optimizing Python programs is beyond the scope of this book; if you're interested, however, check the Python newsgroup: periodically, a user asks for help speeding up a program and a spontaneous contest starts up, with interesting advice from expert users.
| I l@ve RuBoard |


2009/04/15 - Apache HiveMind has been retired.
For more information, please explore the
Attic
.
Module
hivemind
Back to master index
Service Point hivemind.ThreadLocaleFactory
Interface:
org.apache.hivemind.ServiceImplementationFactory
Special service implementation factory for the ThreadLocale service.
Implementation
<create-instance
class
="
service.impl.ThreadLocaleFactory
" />
Module
hivemind
Back to master index


@* * Made with all the love in the world * by scireum in Remshalden, Germany * * Copyright by scireum GmbH * http://www.scireum.de -<EMAIL_ADDRESS>*@ @args oxomi.core.Admin admin @import oxomi.model.Salutation @extends(view.main.html, title: NLS.get("Admin.profile")) @section(breadcrumbs) {


Comments
-
Greg Hurrell
Synergy is an normal Mac OS X application, meaning that it runs within its own protected address space and does not insert or inject itself into any other application's address space. It's simply not possible for Synergy to crash any other application, nor should any other application be able to crash Synergy.
As for your menu-bar suspicion, Synergy is an NSStatusItem. The right side of the menu bar (including NSStatusItems and NSMenuExtras) is handled by the SystemUIServer. The left side of the menu bar is handled by which ever application is front most.
To demonstrate the independence of the two sides of the menu bar, try crashing them independently. Use "Activity Monitor" or the Terminal to force quit/crash/kill the SystemUIServer and you'll see that the left side of the menu bar is unaffected and the frontmost application keeps running. Do the opposite (kill the frontmost application) and you'll likewise see that the right side of the menu bar is unaffected.
-
Greg Hurrell
Marking as CLOSED.
Add a comment
Comments are now closed for this issue.


Simple One-Time Stripe 3d PaymentIntents
Test out PaymentIntents with PHP
To test 3d secure use the test card
4000000000003063
.
Amount
£20.00
Payment information
Credit or debit card
Processing....


Transform student outcomes
Join the hands-on workshop that utilizes the Courselets platform. Participants have the opportunity to refine their teaching strategies and create a learning environment that addresses student needs in real-time.
Sign Up NowCollaborative, online hackathon
This small-group workshop will give you the opportunity to work with other instructors to implement the Courselets framework, taking small steps to improve overall student learning outcomes and decrease attrition rates.
This workshop might be for you if your:
- Subject matter contains STEM content
- Course reflects high student drop rates
- Students struggle to understand key course concepts and apply them to real-world scenarios
- Available in-class technology doesn’t provide real-time data or metrics for understanding gaps in learning
- Teaching goals include increasing collaborative learning in the classroom
What you'll get from this hackathon
Action Plans
Working in collaborative groups, take small, actionable steps to assess and improve student learning outcomes through customized solutions.
Analytics Reports
Access real-time analytics that will help you understand where and why students are struggling. Explore data and work with colleagues to fill in gaps in learning.
Increased Prestige
Gain the metrics and tools you need to pursue grant funding, publish your research and establish yourself as an innovator among your peers.
Workshop Description
Agenda
- Review key concepts
- Participate in fun guided group activities
Key Concepts
The Problem: Student Blind Spots. We'll briefly review these problems and how to solve them.
- High attrition rates from math-intensive STEM classes
- Poor ability to solve real-world problems
- Poor conceptual understanding (basic misconceptions on 50% of the concepts, and little improvement by the end of a course)
- Missing ways to identify specific misconceptions, or to see how to fix them
- Instructors lack a way to see what each student is actually thinking, and thus cannot diagnose their underlying conceptual errors, let alone fix them
Ut persecuti cotidieque pri, tamquam luptatum qualisque duo ad. Eu repudiandae instructior sit, ne deleniti intellegam cum. Qui sensibus assentior definitionem id, et cibo mazim philosophia vel. Debet officiis reformidans qui id. Ei mutat maluisset intellegat has, erat urbanitas nec ne.
Group Activities
Lorem ipsum dolor sit amet, in regione saperet deleniti vel. Vel no postea scripta omnesque, ne vis inani dicam eligendi. Te ius augue melius, te delectus persecuti vel, porro debet appetere per ad. Unum integre no nam. Appareat legendos suscipiantur sea ei, te saperet adipiscing eum.
Identify four your courses:
- Key concepts and applications
- Target problems that you can use right away as exam prep exercises
Details
- Duration:
- 3 meetings
- Sessions:
- 2 hours each meeting
- Location:
- Online video conference
- Number Participants:
- 4-8
- What you need to participate:
- A computer or mobile device, webcam, headset.
This workshop can help you take small easy steps to improve your student learning outcomes.
This hackathon was a great experience, and I was able to Lorem ipsum dolor sit amet.
— Pepe Ping, UCLA BD2K
Your Personal Guides
Christopher Lee, PhD
Chris received a B.A. summa cum laude in Biochemistry and Molecular Biology in 1988 from Harvard College, and a Ph.D. in Structural Biology from Stanford University in 1993. He has been a faculty member in the UCLA Department of Chemistry and Biochemistry since 1998. He personally struggled with high attrition rates in his bioinformatics classes, and has a personal passion for improving learning outcomes in STEM disciplines.
Rachel Horak, PhD
Rachel Lorem ipsum dolor sit amet, in regione saperet deleniti vel. Vel no postea scripta omnesque, ne vis inani dicam eligendi. Te ius augue melius, te delectus persecuti vel, porro debet appetere per ad. Unum integre no nam. Appareat legendos suscipiantur sea ei, te saperet adipiscing eum.
FAQ
- Who should attend?
- Answer
- What do I need to participate in the workshop?
- Answer
I’m Interested in the Online Workshop
There is no commitment to take the workshop at this point. We'll contact you when we get enough participants to schedule a workshop.


The ConfigTreeView is an implementation of GtkTreeView that has its widgets, their properties, and attributes set via a configuration structure. Because of the nature and design of this config structure, a very simple, intuitive, and flexible data model has been created that both define the look and feel of the treeview, but also explicitly detail the shape and look of the data that the ConfigTreeView is expecting.
The ConfigTreeView‘s data model is indirectly defined in the index-names key in the config structure. This key has a dictionary as its value that looks something like this:
{ 'cell-bg-index': bool, 'market':{'pixbuf': "gtk.gdk.Pixbuf"}, 'status':[{'markup':str},{'markup':str}], 'name':{'markup':str}, 'address':{'markup':str}, 'contact':{'markup':str}, 'payment':[{'markup':str}, {'markup':str}], 'shipping':{'markup':str}, 'comments':{'markup':str}, 'placed':{'markup':str}, 'id': str, }Each inner-level key represents a new index of the defined type in a data row that will eventually be inserted into a GtkTreeModel.
The ConfigTreeView data model refers to what structure the incoming data must look like in order for the data to be properly formatted and displayed. The data model is indirectly defined by the index-names dictionary defined in the configuration structure. What this means is that the index-names dictionary is also the same structure that the data model should follow, replacing the types that were defined for the actual values at that particular index. An example data structure for a single row of data following the data model defined above:
{ 'cell-bg-index': True, 'market':{'pixbuf': "/images/market1.png"}, 'status':[{'markup': "Current Status"},{'markup': "Shipped"}], 'name':{'markup': "Darth Vader"}, 'address':{'markup': "The Death Star"}, 'contact':{'markup': "867-5309"}, 'payment':[{'markup': "Visa"}, {'markup': "$100.00"}], 'shipping':{'markup': "Shipped"}, 'comments':{'markup': "No comments"}, 'placed':{'markup': "2012-06-19 12:08:33PM"}, 'id': "123435252335", }But the data model also is a little more flexible than this. There may come a time when you don’t want to display all information for a row. With this data model you only need to define the indices that you plan on using. So a more minimal row of data could look like this:
{ 'name': {'markup': "Darth Vader"}, 'address': {'markup': "The Death Star"}, 'status': [{'markup': "Current Status"}, {'markup': "Shipped"}] }


Package datamodel
Class TrainingModel<T>
java.lang.Object
datamodel.TrainingModel<T>
- Type Parameters:
T
- A generic type
- All Implemented Interfaces:
DataModel<T>
public class TrainingModel<T> extends java.lang.Object implements DataModel<T>
A class that implements the DataModel interface. This particular model is very useful for a treeAugmentedNaiveBayes
classifier.
- Since:
- 2020-05-06
- Version:
- 1.0.0
- Author:
- Marcelo Jacinto, David Souto, Gonçalo Tomás
- See Also:
DataModel
,TreeAugmentedNayveBayes
-
Field Summary
Fields Modifier and Type Field Description protected Category<T>[]
categories
A list of categories, with their respective counts and information.protected Classification<T>
classes
A list of classifications with their respective labels, etcprotected int
N
The total number of examples extracted from training dataprotected double
N_plica
The Laplace Smoothing term to be used with this data -
Constructor Summary
Constructors Constructor Description TrainingModel(java.lang.String[] labels)
The constructor for the TrainingModel class. -
Method Summary
Modifier and Type Method Description void
batchUpdateModel(java.util.List<T[]> data)
A method that updates the counting in the DataModel given a list of arrays of generic type with databoolean
equals(java.lang.Object o)
Redefinition of the equals() method, using the values of N_plica, categories and classifications to make the comparisonCategory<T>
getCategory(int i)
A method that, given the index of a category (ex.T
getClassLabel(int c)
A method that returns a label for a given index of a class.int
getIndexOfCategoryLabel(int category, T label)
A method that returns the index of a label of a given category Example: We want to know the index of the label 3 in X2 - In this case it could return 2double
getLaplaceSmoothingTerm()
A method that when implemented returns the LaplaceSmoothingTerm used (by default could be 0.5)int
getNcCount(int c)
A method that returns an int with a count for a given N_cint
getNCount()
A method that returns an int with the number of training examples usedint
getNijcCount(int sonNode, int parentNode, int j, int c)
A method that returns an int with a count for a given N_ijcint
getNijkcCount(int sonNode, int parentNode, int k, int j, int c)
A method that returns an int with a count for a given N_ijkcint
getNikcCount(int sonNode, int k, int c)
A method that returns an int with a count for a given N_ikcint
getNumCategories()
A method that returns the number of categories that a DataModel has Example: We can have X1, X2 and X3 - In that case the method should return 3int
getNumClasses()
A method that returns the number of classes that the DataModel can assume.int
getNumLabels(int parentNode)
A method that returns the number of labels a given node has given the node index to be considered.int
hashCode()
Redefinition of the hashCode() method using the N_plica, categories and classificationsjava.lang.String
toString()
Redefinition of the toString() method.void
updateModel(T[] data)
A method that updates the countings in the DataModel given an array of generic type with data
-
Field Details
-
N
protected int NThe total number of examples extracted from training data -
N_plica
protected final double N_plicaThe Laplace Smoothing term to be used with this data- See Also:
- Constant Field Values
-
categories
A list of categories, with their respective counts and information. Example X1 and its counts for Nijkc, Nikc, Nijc, the labels,...- See Also:
Category
-
classes
A list of classifications with their respective labels, etc- See Also:
Classification
-
-
Constructor Details
-
TrainingModel
public TrainingModel(java.lang.String[] labels)The constructor for the TrainingModel class. Receives an array of String of labels to be considered. Example: X1, X2, X3- Parameters:
labels
- An array of String with labels
-
-
Method Details
-
updateModel
A method that updates the countings in the DataModel given an array of generic type with data- Specified by:
updateModel
in interfaceDataModel<T>
- Parameters:
data
- An array of generic type
-
batchUpdateModel
A method that updates the counting in the DataModel given a list of arrays of generic type with data- Specified by:
batchUpdateModel
in interfaceDataModel<T>
- Parameters:
data
- A List of arrays of generic type
-
getNumLabels
public int getNumLabels(int parentNode)A method that returns the number of labels a given node has given the node index to be considered. Example: Node 0 (X0) contains 3 values: 0, 1, 2- Specified by:
getNumLabels
in interfaceDataModel<T>
- Parameters:
parentNode
- The index of the node to be considered- Returns:
- The number of labels that node has
-
getNumClasses
public int getNumClasses()A method that returns the number of classes that the DataModel can assume. Example: Class can vary from: 0 - 19 - In that case the method should return 20- Specified by:
getNumClasses
in interfaceDataModel<T>
- Returns:
- An int with the number of classes that the data can assume
-
getNumCategories
public int getNumCategories()A method that returns the number of categories that a DataModel has Example: We can have X1, X2 and X3 - In that case the method should return 3- Specified by:
getNumCategories
in interfaceDataModel<T>
- Returns:
- An int with the number of categories used in the DataModel
-
getLaplaceSmoothingTerm
public double getLaplaceSmoothingTerm()A method that when implemented returns the LaplaceSmoothingTerm used (by default could be 0.5)- Specified by:
getLaplaceSmoothingTerm
in interfaceDataModel<T>
- Returns:
- A double with the LaplaceSmoothingTerm
-
getIndexOfCategoryLabel
A method that returns the index of a label of a given category Example: We want to know the index of the label 3 in X2 - In this case it could return 2- Specified by:
getIndexOfCategoryLabel
in interfaceDataModel<T>
- Parameters:
category
- An int with the index of the category being consideredlabel
- A generic type with the label we want to get the index of- Returns:
- An int with the index of that label
-
getClassLabel
A method that returns a label for a given index of a class. Example: We want to know the label of classification stored at index 0 - In this case it could return "apple"- Specified by:
getClassLabel
in interfaceDataModel<T>
- Parameters:
c
- An int with the index of the classification- Returns:
- A generic type with the classification
-
getNijkcCount
public int getNijkcCount(int sonNode, int parentNode, int k, int j, int c)A method that returns an int with a count for a given N_ijkc- Specified by:
getNijkcCount
in interfaceDataModel<T>
- Parameters:
sonNode
- An int with the index of the node we are consideringparentNode
- An int with the index of the father of that nodek
- An int with the configuration of the nodej
- An int with the configuration of the father of the nodec
- An int with the classification- Returns:
- An int with the number of occurences of that combination
-
getNikcCount
public int getNikcCount(int sonNode, int k, int c)A method that returns an int with a count for a given N_ikc- Specified by:
getNikcCount
in interfaceDataModel<T>
- Parameters:
sonNode
- An int with the index of the node we are consideringk
- An int with the configuration of the nodec
- An int with the classification- Returns:
- An int with the number of occurences of that combination
-
getNijcCount
public int getNijcCount(int sonNode, int parentNode, int j, int c)A method that returns an int with a count for a given N_ijc- Specified by:
getNijcCount
in interfaceDataModel<T>
- Parameters:
sonNode
- An int with the index of the node we are consideringparentNode
- An int with the index of the father of that nodej
- An int with the configuration of the father of the nodec
- An int with the classification- Returns:
- An int with the number of occurences of that combination
-
getNcCount
public int getNcCount(int c)A method that returns an int with a count for a given N_c- Specified by:
getNcCount
in interfaceDataModel<T>
- Parameters:
c
- An int with the classification- Returns:
- An int with the number of occurences of that combination
-
getNCount
public int getNCount()A method that returns an int with the number of training examples used -
getCategory
A method that, given the index of a category (ex. X1, X2, X3) should return the Category object with all the countings for that specific category- Specified by:
getCategory
in interfaceDataModel<T>
- Parameters:
i
- The index of the category- Returns:
- A Category object
-
toString
public java.lang.String toString()Redefinition of the toString() method. Prints all the data relative to number of examples, categories and classes.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A String with the relevant data
-
equals
public boolean equals(java.lang.Object o)Redefinition of the equals() method, using the values of N_plica, categories and classifications to make the comparison- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- Another TrainingModel- Returns:
- A boolean with true or false
-
hashCode
public int hashCode()Redefinition of the hashCode() method using the N_plica, categories and classifications- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- An int with the hashcode
-