Google Apps Script is used by the ACM to extend the functionality of Google Spreadsheets for the ACM spreadsheet.
The files in the scripts/
directory are synced to the Google Apps Script project using the clasp
command line tool.
The Google Apps Script project should have time-based triggers enabled in order to send e-mails, and must be published as a web app in order for the ACM website to be able to interact with spreadsheet data.
The Javascript functions in scripts/
perform three main tasks based on the Google Spreadsheet data:
Each of the functions responsible for the tasks above accesses the Google Spreadsheet data using the the Google Apps Script Spreadsheet API
classes: Range
, NamedRange
, and Sheet
.
The MailApp
Google Apps Script class is used to send usage e-mails directly to Makers, CC'd to hello. @mak erlab s.co m
The e-mail sending process is triggered via time-based Google Apps Script triggers which scan all data rows in the "Activity, De-duped" sheet. Each row has a specific timestamp column (a separate column for each type of e-mail) which must be empty for the row to be processed in the e-mail summary.
There are two different types of e-mail which share the same e-mail template and processing logic:
<EMAIL_ADDRESS>. These summarize the usage for a single Maker, across all machines, in the last<EMAIL_ADDRESS>and summarize the monthly usage for multiple Makers, across all machines, for all Makers which have their Billing Date
in that week.Sending of e-mails is performed by the following two trigger functions in scripts/trigger
:
Both of these trigger functions rely on the same templates and rendering function sendActivitySummaryEmail.
The HTML content for the e-mail is configured in the HTML files in the scripts/templates/
directory, as described in the Branded E-mail Templates
configuration section.
In order to provide access to the Google Spreadsheet data from the ACM Website, the Web Apps Google Apps Script functionality is used. The doGet function is the entrypoint to all HTTP requests to the handler. Only a single URL path is allowed, so the ?href=
query string argument is checked to determine which specific view to use.
The following two views are currently used:
?href=next-makerlabs-id
: viewNextMakerLabsId returns the next available MakerLabs ID
.?href=users-fields
: viewUsersFields returns the "Users" sheet section headers, column headers and validation/widget type in JSON format.The enforceFormattingInRange function checks the formatting for the first data row (non-header/frozen row) in the "Users" sheet, and ensures that formatting changes in other rows are reverted. If this function is configured with the onChange trigger function and/or the onEdit trigger function then changing the first data row is the only way to affect formatting and any changes will be applied to all other data rows.
The e-mail templates are located in scripts/templates/
. They are written in HTML, using Google Apps Script HTML Service Templated HTML for loading dynamic content generated by the functions in scripts/views/
.
The following three templates are used:
branded-email.html
, (top-level), E-mail template content wrapper/theme, using MUI (Material Design CSS Framework) panels.activity-usage-email.html
, E-mail template to render activitySummary
for possibly multiple MakerLabs IDs, showing details, summary and usage totals.thank-you-footer.html
, E-mail template footer containing MakerLabs contact info & hours.Google Apps Script triggers can be configured by:
Script Editor
from the Tools
menu of the Google Sheet. Script Editor
. ![Screenshot of selecting Triggers
in 'Script Editor'](ScriptEditor_Triggers_cropped.png "`Script Editor` -> Triggers (Stopwatch icon)")triggerActivitySendUsageEmails
(e.g. 5pm~6pm Daily)triggerActivitySendBillingEmails
(e.g. Friday Afternoon) In order to allow the ACM website to access Google Spreadsheet data, the Google Apps Script project must be published as a web app. This enables the ?href=users-fields
and ?href=next-makerlabs-id
Web App handlers for public use.
To deploy the web app (one-time setup), perform the following steps:
Script Editor
from the Tools
menu of the Google Sheet. Publish
-> Deploy as web app
from the menubar of the Script Editor
. The Google Apps Script projectId
is stored in the .clasp.json
file.
The clasp
command line tool is used to sync files from the scripts/
directory to Google Apps Script.
*.gs
files should NOT be modified from within the Script Editor
UI as they are overwritten by the repo files when using the clasp push
command.clasp
uses Google credentials to upload files to the Google Apps Script project, so a one-time login process must be performed to login with your Google Account and grant access to clasp
.
To login, run the following:
To sync the current script/
files to the Google Apps Script project, run the following:
clasp
will upload to the Google Apps Script scriptID
configured in the .clasp.json
config file.


This iframe has a data-route-limit="1" attribute specified. Only one route can be added to this map.
data-route-limit="1"


This article is about the Internet encyclopedia.
For other uses, see Wikipedia (disambiguation).
For Wikipedia's non-encyclopedic visitor introduction, see Wikipedia:About.
For the main page, see Main Page.
Page semi-protected
Wikipedia
A white sphere made of large jigsaw pieces. Letters from several alphabets are shown on the pieces
Wikipedia wordmark
The logo of Wikipedia, a globe featuring glyphs from several writing systems
Screenshot]


@* * Copyright 2019 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import uk.gov.hmrc.tariffclassificationfrontend.config.AppConfig @import uk.gov.hmrc.tariffclassificationfrontend.controllers.routes.{CaseController, MyCasesController} @import uk.gov.hmrc.tariffclassificationfrontend.models.Case @import uk.gov.hmrc.tariffclassificationfrontend.views.html.includes.main @import uk.gov.hmrc.tariffclassificationfrontend.views.html.partials._ @import uk.gov.hmrc.tariffclassificationfrontend.controllers.routes.AttachmentsController @import uk.gov.hmrc.tariffclassificationfrontend.views.html.partials.days_elapsed @(c: Case)(implicit request: Request[_], messages: Messages, appConfig: AppConfig) @main(bodyClasses = None, customTitle = Some(messages("page.title.case.reopened"))) { @case_heading(c)
The days elapsed count will resume from @days_elapsed(c.daysElapsed).
Add attachments to this case of all contact that you have had with the applicant.
If you have already added already added notes and attachments, go back to @messages("cases.menu.my-cases").


Home
Tracks
Artists
PlayList
Genres
Media Type
Albums
AlbumId
title
ArtistId
347
Koyaanisqatsi (Soundtrack from the Motion Picture)
275


If you have the latest Quicktime plug-in for your browser, you will see the QTVR below.
Use your mouse (with the button down) to move around within the movie. Use your "control" key to zoom out, and your OPTION key (for Macs) or SHIFT key (for PCs) to zoom in.
If you do not have the appropriate plug-in to view the Quicktime VR file within your browser, download the QTVR file in Macintosh or Windows format and play it off-line with the Apple QTVR Player.


BMW M5
Specs
Price |
$85,000 |
Top Speed |
155mph(electronically limited) |
Acceleration |
|
Engine |
|
0-30mph |
N/A |
Type |
V8 w/double-VANOS, 32valve DOHC |
0-60mph |
4.7sec |
Displacement |
5.0L(4941cc) |
0-100 |
N/A |
Power |
400hp@6600rpm |
1/4 mile |
N/A |
Torque |
369 lbs-ft@3800rpm |
Weight |
3,793 lbs |
Handling |
|
Gas mileage |
|
Skidpad |
.85g(regular 5 series) |
City |
16mpg |
600ft slalom |
65.2mph(regular 5 series) |
Highway |
N/A |
Powertrain |
Front engined, rear wheel drive, 6 speed manual |
(? = incomplete data or unverified info, N/A = info Not Available)
Note: double-VANOS is a variable valve timing system
Beyond the specs:
BMW is world renown for their sedans which handle like sports cars, although only the 5 series is the sports sedan in the BMW lineup, all of them have great handling and good acceleration. The 5 series of course has the best acceleration of the BMW sedans, its already excessively fast 0-60 time of 5.6 seconds however was not enough for BMW. BMW just had to get their M (M for Motorsport) division to make the awesome M5, which just may be the worlds fastest sports sedan (it can actually accelerate faster than the 0-60 time shown above). This car uses the most powerful engine in any current sports sedan (Bentleys are not sports sedans), the 5 liter, high revving, 400 hp wonder built by BMW's M division. Its wonderful free revving engine will let you dominate the autobahn and enjoy the normal level of luxury found in BMW's today. Unlike its competitors, it does not sacrifice ride comfort to give you the best handling you can find in a BMW sedan. Best of all unlike its competitors this BMW comes with a six-speed manual transmission, and of course, any like all sports sedans in this price range it has traction control. It also comes with DSC (Dynamic Stability Control) to keep the car from oversteering or understeering on slippery high-speed turns. Still, for this sedan sports car performance you will have to pay a bit more than its competitors price, also the clutch is a little firm side and when the car skids it completely breaks away. However, if you have the money and want a BMW quality sports sedan that can outrun a Chevy Camaro SS and still have room for five then you and the M5 are a perfect match.
~Oracle


Ancient shipwrecks, stone pyramid anchors, discovered off Greek island
by James RogersArchaeologists in Greece have discovered five shipwrecks near the island of Kasos, which include an ancient shipwreck with five stone pyramid anchors.
In a statement, Greece’s Ministry of Culture described the ship as a “particularly remarkable find” from the late Classical period. The ship’s cargo includes at least four different types of amphora, or ancient jars, as well as fine ceramics.
“Based on the pottery collected and raised, the shipwreck can be dated to the end of the 4th or the beginning of the 3rd century BC,” the Ministry said in its statement.
ANCIENT GREEK TREASURES RECOVERED FROM THE WRECK OF LORD ELGIN’S SHIP
One of the other shipwrecks dates from the 1st century B.C. and is loaded with amphorae typically found on the island of Rhodes. Another wreck contains amphorae and tableware from the Byzantine period, dating to between the 8th and 10th century A.D. A wooden ship dating to the period after the Greek War of Independence in the 19th century was also found, along with a more recent shipwreck carrying building material.
“In addition to the aforementioned shipwrecks, a number of individual finds were also found, including iron canons, Byzantine and later anchors, and pottery discards, which testify to the continual and uninterrupted use of maritime space since ancient times,” according to the Ministry.
In a separate project, marine archaeologists recently recovered ancient treasures from the wreck of the Mentor, a ship used by the controversial Lord Elgin to transport a hoard of artifacts taken from Greece.
STUNNING CARGO-LADEN ANCIENT SHIPWRECKS DISCOVERED OFF GREEK ISLAND
The ship, which was carrying a cargo of 17 boxes of antiquities, sank in September 1802 after striking rocks off the island of Kythira. Much of the ship’s cargo, including the controversial “Elgin Marbles,” was recovered in a salvage mission after its sinking. However, many ancient artifacts remained on the seabed, according to Artnet News.
CLICK HERE TO GET THE FOX NEWS APP
Earlier this year five cargo-laden ancient shipwrecks were discovered off the Greek island of Levitha.
Follow James Rogers on Twitter @jamesjrogers


2020 end countdown
DAYS
HOURS
MINUTES
SECONDS
Challenge by
Frontend Mentor
. Coded by
MagoJeanMaster
.


--- layout: default title: Game Audio thumbnail: gameaudio-bg.jpg ---
I’ve worked as a freelance Sound Designer / Composer for various game projects during the last 8+ years. I also worked as the in-house audio designer at Kuuasema for several years.
I have good knowledge of audio design and implementation for games. I know my way around in Unity and I'm very familiar with doing audio scripting for games. I'm also familiar with the two most commonly used game audio middleware, Wwise and Fmod.
{{ post.client }}
Wizard of Cells (2013)
Developer: Kuuasema, Publisher: Nokia Siemens Networks
Web, iOS | Sound Design
Kinetic Stories (2012)
Developer & Publisher: Delicode
PC | Music and Sound Design
Newsmaster (2012)
Developer & Publisher: Kuuasema
iOS | Music and Sound Design
Senseq Haptic Games (2012)
Developer: Kuuasema, Publisher: Senseq
Hardware Prototypes | Music and Sound Design
Sushi Loops (2011)
Developer & Publisher: Kuuasema
Nokia | Music and Sound Design
Climate Mission 3D (2011)
Developer: Kuuasema, Publisher: Nokia
Nokia | Music and Sound Design
Mas Ketchup (2011)
Developer & Publisher: Azila
iOS | Music and Sound Design
Seaport (2011)
Developer: Kuuasema, Publisher: Panvision
iOS | Music and Sound Design
Extreme North (2011)
Developer: Kuuasema, Publisher: Nokia
Nokia | Music and Sound Design
Collapse! (2010)
Developer: Kuuasema, Publisher: GameHouse
iOS | Music and Sound Design
Conspiracy For Good (2010)
Developer: Kuuasema, Publisher: Nokia, Company P
Nokia | Music and Sound Design
Scrabble Blast (2010)
Developer: Kuuasema, Publisher: EA Mobile
iOS | Music and Sound Design
Tattoo Ink (2010)
Developer: Kuuasema, Publisher: GameHouse
iOS | Music and Sound Design
Cake Mania: Celebrity Chef (2009)
Developer: Kuuasema, Publisher: GameHouse
iOS| Music and Sound Design
Texas Quiz Em (2009)
Developer: Kuuasema, Publisher: Alycan
PC | Music and Sound Design
Pile Up! Candymania (2009)
Developer: Mr. Goodliving, Publisher: GameHouse
iOS | Music and Sound Design


Computech-Electronics/ NEWS / LATEST NEWS / ONEPLUS 6T MCLAREN EDITION IS BACK STARTING TODAY
ARTICLE | BY RAY DAVIS | APRIL 6, 2019 6:54 AM PDT
NEW DELHI: OnePlus 6T McLaren Edition is back on Computech-Electronics. Considered the company’s ‘most powerful’ smartphone, it will be available on our e-commerce website starting today, April 6.
For those unaware,OnePLus 6T McLaren Edition was launched in 2018 to mark OnePlus’s fifth anniversary. The phone features a special design inspired by the F1 McLaren racing team and comes with the signature McLaren colour, Papaya Orange races, around the bottom edge.
Major highlights of the special edition are Warp Charge 30 technology, Qualcomm Snapdragon 845 processor and 10GB of RAM. The Warp Charge 30 feature is claimed by the company to charge 50% of the battery in just 20 minutes.
OnePlus 6T McLaren Edition: Price
OnePlus McLaren Edition retails at Ksh 73,000/=. It is the costliest of the total five variants of OnePlus 6T as a standard OnePlus 6T comes with a starting price of Ksh 55,000/=.
OnePlus 6T McLaren Edition: Specifications
OnePLus 6T McLaren Edition sports a 6.41- inch FHD+ AMOLED display with Corning Gorilla Glass 6 layer on the top. The screen offers an aspect ratio of 19.5:9 and a pixel resolution of 2340x1080. As mentioned before, the device is powered by Qualcomm Snapdragon 845 processor and packs 10GB of RAM.
The smartphone offers a 256GB internal storage. The McLaren edition -- like the standard OnePlus 6T -- also comes with water drop notch and an in-display fingerprint sensor.
On the camera front, OnePlus 6T McLaren edition boasts of a 16-megapixel front camera with f/2.0 aperture for selfies. The dual rear camera setup at the back comprises of 16-megapixel Sony IMX519 sensor with f/1.7 aperture and a 20-megapixel Sony IMX376K sensor with f/1.7 aperture. The phone features dual LED flash as well. The device is backed by 3,700mAh battery.


CONTROL PANEL: ∆ Shift the sliders to change the month and year of the data. ∆ Press the buttons to change the grouping of the data.
Group By:


Welcome back Master.See all registered users.
#
Username
Email
Roles
Banned On
Censore
Edit
Ban
unBan


Tiny description about the proyecto, no much more of 150 characters.
{{element.description}}
+ more
Select your picture


Loading zones from GeoJSON...
CSV file must be an NxN matrix, where N is the number of zones in the selected geojson.
Each i-th line contains the N probabilities of a marker that start from the i-th zone and goes to other zones.
The sum of all values should be 1.
Example with two zones:
0.10,0.30
0.45,0.15
10% of markers will go from zone 0 to zone 0
30% of markers will go from zone 0 to zone 1


Syntax Normalization
Susy is divided into two layers: “Su” provides the core math functions with a stripped-down syntax, while “Susy” adds global settings, shorthand syntax, and other helpers. Each setting (e.g. span, location, columns, spread, etc.) has a single canonical syntax in Su.
This normalization module helps translate between those layers, transforming parsed Susy input into values that Su will understand.
Related
@function susy-normalize()
@function susy-normalize-span()
@function susy-normalize-columns()
@function susy-normalize-spread()
@function susy-normalize-location()
@function susy-normalize()
Normalize the values in a configuration map.
In addition to the global $susy
properties,
this map can include local span-related information,
like span
and location
.
Normalization does not check that values are valid,
which will happen in the Su math layer.
These functions merely look for known Susy syntax –
returning a map with those shorthand values
converted into low-level data for Su.
For example span: all
and location: first
will be converted into specific numbers.
Parameters & Return
$config: (map)
Map of Susy configuration settings to normalize.
See $susy
and susy-parse()
documentation for details.
$context: null (map | null)
Map of Susy configuration settings to use as global reference,
or null
to use global settings.
@return (map)
Map of Susy configuration settings, with all values normalized for Su math functions.
Requires
@function susy-normalize-spread()
@function susy-normalize-columns()
@function susy-get()
@function susy-normalize-span()
@function susy-normalize-location()
Used By
@function susy-compile()
@function susy-normalize-span()
Normalize span
shorthand for Su.
Su span syntax allows an explicit length (e.g. 3em
),
unitless column-span number (e.g. 3
columns),
or an explicit list of columns (e.g. (3 5 8)
).
Susy span syntax also allows the all
keyword,
which will be converted to a slice of the context
in normalization.
Parameters & Return
$span: (number | list | 'all')
Span value to normalize.
$columns: (list)
Normalized list of columns in the grid
@return (number | list)
Number or list value for $span
Used By
@function susy-normalize()
@function susy-normalize-columns()
Normalize column
shorthand for Su.
Su column syntax only allows column lists (e.g. 120px 1 1 1 120px
).
Susy span syntax also allows a unitless slice
number (e.g of 5
),
which will be converted to a slice of the context
in normalization.
Parameters & Return
$columns: (list | integer)
List of available columns, or unitless integer representing a slice of the available context.
$context: null (map | null)
Map of Susy configuration settings to use as global reference,
or null
to access global settings.
@return (list)
Columns list value, normalized for Su input.
@error
when attempting to access a slice of asymmetrical context
Requires
@function susy-settings()
@function _susy-flatten() [private]
@function susy-repeat()
@function _susy-error() [private]
Used By
@function susy-normalize()
@function susy-normalize-spread()
Normalize spread
shorthand for Su.
Su spread syntax only allows the numbers -1
, 0
, or 1
–
representing the number of gutters covered
in relation to columns spanned.
Susy spread syntax also allows keywords for each value –
narrow
for -1
, wide
for 0
, or wider
for 1
–
which will be converted to their respective integers
in normalization.
Parameters & Return
$spread: (0 | 1 | -1 | 'narrow' | 'wide' | 'wider')
Spread across adjacent gutters, relative to a column-count —
either narrow
(-1), wide
(0), or wider
(1)
@return (number)
Numeric value for $spread
Used By
@function susy-normalize()
@function susy-normalize-location()
Normalize location
shorthand for Su.
Su location syntax requires the (1-indexed) number for a column.
Susy also allows the first
and last
keywords,
where first
is always 1
,
and last
is calculated based on span and column values.
Both keywords are normalized into an integer index
in normalization.
Parameters & Return
$span: (number)
Number of grid-columns to be spanned
$location: (integer | 'first' | 'last')
Starting (1-indexed) column position of a span, or a named location keyword.
$columns: (list)
Already-normalized list of columns in the grid.
@return (integer)
Numeric value for $location


Chlorophyll printing is the organic technique of bleaching the magnesium present on chlorophyll, leaving an image on the leaf. In inspiration of such, I took the opportunity to make my own chlorophyll prints electronically in memorium of the victims of the Kent State Massacre that took place May 4, 1970.


This is the content of the first tab!
Warning!
This is an alert!
Fancy
title
This is the content of the second tab!
Your IP :
This tab is disabled


3 overrides of VisitCatchClause
System.Management.Automation (3)
engine\parser\AstVisitor.cs (2)
296
public override AstVisitAction
VisitCatchClause
(CatchClauseAst ast) { return CheckParent(ast); }
532
public override AstVisitAction
VisitCatchClause
(CatchClauseAst ast) { return Check(ast); }
engine\parser\SemanticChecks.cs (1)
2009
public override AstVisitAction
VisitCatchClause
(CatchClauseAst catchClauseAst)
1 reference to VisitCatchClause
System.Management.Automation (1)
engine\parser\ast.cs (1)
4840
var action = visitor.
VisitCatchClause
(this);


| DOSE: |
8.5 mg |
smoked |
MIPT |
(powder / crystals) |
I had the chance to encounter some MiPT crystals on the desert and only recently decided to taste it for the first time.
I was told that, when smoked, it produced a mild euphoria that was not unsocial. I read the TiHKAL entries which suggested oral dosages between 5 and 25mgs with one entry for 20mg insufflated.
We put perhaps 10mgs in a clean glass pipe and melted it enough to keep the crystals from blowing down my throat. The material melted and then vaporized quickly into a white smoke which tasted distinctly like a very mild DMT (I have only tried DMT twice, only once seriously and that was just a brush with it).
As always, as the smoke hit the top of my lungs, my body jerked in rejection. The chemical smoke burned coldy on my lips and where my bronchi met my lungs. I found that I was virtually incapable of taking solid 'hits' of it and instead found that by breathing lightly and steadily for long, slow breaths over the material as it started to heat and then vaporize, I could relax, relax, relax, relax into the feeling reminiscent of a sharp blade cutting the inside of the base of my throat.
After a few of these long breaths, I started to notice a change in perception. My mood lifted from a neutral repose to a little giggly. I noticed changes in my visual perception, which were hard to pin down.. perhaps the world seemed 'brighter', but when I tried to identify what had changed, I wasn't really able to pinpoint anything.
I put probably another 10mgs of material in the pipe and heated it again to keep it from spilling out (melting it into liquid/honey at the bottom of the pipe). I smoked another breath's worth and put the pipe down with 70% of the material still remaining.
I estimate I smoked 7-10mgs total and my partner perhaps 5+mgs.
I didn't feel much like sitting at my computer keyboarding anymore, so I bounced over to my partner and tried to convince hir to go play in bed with me. Failing (per usual when such a mood is not shared :), I decided to poke around the room looking for /fun/ .. it was a weekend afterall.. no need to be dreary.
 The MiPT seemed to have dwindled from very mild euphoria to a nice quiet sense of emotional lightness in about 45 mins and then had a couple hour trailer of feeling mildly altered with nothing I could really latch onto linguistically. As with virtually every entheogen, I got a mild headache starting after the primary effects were gone, around T+2 hours.
Overall, a pleasant, mild, short experience that felt relaxed, a little giddy.
I hope I have a chance to taste it again someday.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


French Polynesia - Profile
Facts
- French Polynesia covers an area of the South Pacific Ocean about the size of Europe. It is made up of over 100 islands in five archipelagos: the Society Islands, the Marquesas, Tuamotu, Gambier Islands and Australs, as well as Clipperton atoll, a small French possession off Mexico.
- In the last few years, the total number of boats cruising in the South Pacific has increased. This is undoubtedly due to the draw of the South Seas, but also in the last couple years because of safety concerns in other parts of the world.
- From the rugged beauty of the Marquesas to the crystal clear waters of the Tuamotu atolls and the lofty peaks of the Society Islands, the variety in scenery and sailing conditions is unsurpassed anywhere in the South Pacific.
- Most yachts make their landfall in the Marquesas, which is a perfect introduction to this vast cruising ground. There are few man-made ports here and the swell can tuck into the anchorages, but this is more than made up for by the beauty of these high islands.
- In complete contrast are the Tuamotu, once called the Dangerous Archipelago on account of its treacherous currents and lurking reefs. Yachts used to avoid this area, but now often stop and visit the low atolls, as the hazards have diminished considerably with the advent of radar and satellite navigation. Negotiating the passes into some of the lagoons can be a difficult operation, mainly because of the strong currents. Generally, the weakest current occurs one hour after low water and one hour after high water. Passes are for the most part well-marked, some even lit at night. However one should still be sure to use careful eyeball navigation, ideally when the sun is overhead and the colour of the water gives a good indication of its depth.
- Entirely off the usual cruising routes are French Polynesia's other two groups, the Austral and Gambier islands. The latter is best visited if coming from Easter Island or Pitcairn, while the former are only a few days' sail away from Tahiti or make a convenient landfall for yachts heading towards Tahiti from New Zealand.
- Getting work done: The best facilities are to be found in Papeete (Tahiti) where everything is possible, but expensive; the only other centre with extensive repair facilities is on Raiatea, where two charter companies have their base. Facilities are on a par with Tahiti, or even better, and have the great convenience of being grouped together. There is a resourceful yacht repair business on Nuku Hiva. Yet even in the more remote places it is often possible to find someone who can do welding or repair an outboard engine. Be warned though, prices are high in French Polynesia. A new boatyard opened on Aptaki in the Tuamotus in 2015 and in Hiva Oa in the Marquesas in 2016 - both are reported to be reasonable.
- Provisioning: Best in Tahiti (Carrefour) and adequate in the other Society Islands. Provisions in the Marquesas are adequate, though very expensive, and it's best to stock-up, particularly in fresh goods, when heading for the Tuamotos.
- Fuel is available in the main settlements, although it is more difficult to find in the Tuamotus.
- There are excellent postal services throughout the islands. At its 54 island branches the post office (OPT) provides a wide range of services besides stamps: phone cards, parcel post, placing collect calls, international calling cards (ATT, France Telecom), sending & receiving money orders.
Security
French Polynesia used to be one of the safest cruising grounds in the world, however in recent years the islands around Tahiti have suffered with social and economic problems and consequently petty theft has been on the rise.
Cruisers' reports indicate that care should be taken at night to lock up dinghys, dinghy motors and other loose items on deck whilst at anchor in Moorea and Papeete. With the downturn in the islands hotel trade it is thought there has been an upturn in non-violent crime, confirmed by the Gendarmerie.
In Raiatea at the Uturoa town centre public dock, there continues to be incidents of thefts from boats (both unlocked and locked). It is recommended not to overnight on this dock.
See comments posted at bottom of page concerning security in the islands.
Last updated November 2015.
Weather
The islands have a tropical climate. November to April is warm and rainy, while May to October is cooler and drier, when the islands are under the influence of the SE trade winds. The cyclone season is November to March. Full cyclones rarely hit anywhere in French Polynesia.
Weather forecasts in French are available from Meteo France, BP 6005 - Faaa Tahiti Airport, 98702 Tahiti, Tel:(689) 36 65 08, Fax:(689) 80 33 09.
Meteo France Outre-mer (in French)
Weather forecasts for the next 24 hours are broadcast every day on VHF channels 27 (Windward Islands) and 26 (Leeward Islands) at 1100, 1200, 2040,2100 local Tahiti time.
A useful guide to South Pacific weather resources complied by a Noonsite contributor, Rory Garland.
For links to free global weather information, forecast services and extreme weather information see the Noonsite Weather Page
Main Ports
Australs:
Mataura, Tubuai *
,
Moerai, Rurutu *
,
Raivavae *
,
Rapa
Gambiers:
Mangareva *
Marquesas:
Fatu Hiva
,
Hiva Oa *
,
Nuku Hiva *
,
Tahuata
,
Ua Huka
,
Ua Pou *
Other Atolls:
Clipperton Atoll
Society Islands:
Bora Bora *
,
Huahine *
,
Maupiti
,
Raiatea *
,
Tahaa
Tahiti:
Moorea
,
Papeete *
,
Taravao, Port Phaeton
Tuamotus:
Apataki
,
Fakarava
,
Hao
,
Makemo Atoll
,
Manihi Atoll
,
Rangiroa *
,
Tikehau Atoll
* indicates port of entry


This “free potato pile” was brought to our attention by an anonymous source, but it turns out these taters aren’t just there for the taking after all.
The potatoes and onions are ones that didn’t meet the market standard for Green Acres Farm due to various defects and will be turned into compost to help the growth of future crops.
While some might look good to eat, that would be an ill-advised move, says Jas Dhaliwal with Green Acres Farm.
“Any type of food that’s out in the elements, anything can happen. An animal can defecate on them or they could be carrying disease,” he says.
“Once it goes out in the elements, then there’s no protection for how it is or guarantee for how it’s been treated. I don’t think anybody should be eating them.”
There is a sign that denotes roadside root vegetables shouldn’t be consumed, but it gets knocked over a lot, so it’s not uncommon for folks to help themselves, despite the pile being on Green Acres property.
For those that would like to see the potatoes and onions given to the less fortunate, Dhaliwal says they do send ones that pass their grading system to North Okanagan Gleaners, where they’re dehydrated and turned into a soup base for the needy.


Home
See All Beers
Order a Beer
Register
Log in
Register
Brand
Select a brand
Corona Extra 330ml
Stella Artois 500ml
Carlsberg 330ml
Heineken 330ml
Quantity
Destination
Select destination
Sofia
Plovdiv
Varna
Burgas
Veliko Tarnovo
Enter your birthdate
Got an option, comment, recommendation? Share it with us!


Networking and Communications
For Sarah and I’s group networking and communications assignment, we used both of our Arduino Uno Clones (Satshakit) to act as a master write to slave read connection through serial data line (SDA) and serial clock line (SCL) of both micro-processors. Here are the I/O’s board trace and completed circuit of the Satshakit Clone:
The purpose for this program was to demonstrate a network communication as the master sends a signal to the slave, and the slave interprets the signal and performs an operation which in this case, we decided to use device that was part of an earlier assignment. The original assignment was to read temperature but we only used the different colored LEDs for multiple outputs. See “Input Devices” assignment here: Input Devices
Connecting Master-To-Slave Arduinos & Slave-To-LED Device:
Since all of the pinheaders/connectors we had are male, and that our lab had little-to-no female connectors, we needed to use an excess amount of wires, a breadboard, and a lot of our imagination to properly connect it all together, shown below:
The connections you see in the picture are:
2 separate FDTI Cables for operating Arduinos (One Connected to MASTER, the Other to SLAVE)
The Breadboard which has two major functions:
- Creating a widely accessible Power/Ground hookup for the unversal power needed for multiple boards
- Plugging in the male headers on the boards themselves, in order to use male jumpers instead of females.
The header pins for the 3 separate LED outputs are hooked up to 3 separate I/O’s on the SLAVE Arduino.
Below shows the programs we used for both master and slave micro-processors. The program is for the following commands in the Arduino serial monitor:
Type R to turn on the RED LED
Type O to turn on the ORANGE LED
Type B to turn on the BLUE LED
Type A to turn on ALL three LED’s
Type N to turn on NONE of the LED’s
Master Arduino Program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <Wire.h>
void setup() {
Serial.begin(9600);
Wire.begin();
}
void loop() {
while(Serial.available()) {
int outgoingByte = Serial.read();
if(outgoingByte == 'R'){
Wire.beginTransmission(8);
Wire.write("R");
Wire.endTransmission();
}
else if(outgoingByte == 'O'){
Wire.beginTransmission(8);
Wire.write("O");
Wire.endTransmission();
}
else if(outgoingByte == 'B'){
Wire.beginTransmission(8);
Wire.write("B");
Wire.endTransmission();
}
else if(outgoingByte == 'A'){
Wire.beginTransmission(8);
Wire.write("A");
Wire.endTransmission();
}
else if(outgoingByte == 'N'){
Wire.beginTransmission(8);
Wire.write("N");
Wire.endTransmission();
}
}
}
Slave Arduino Program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//i2c Slave Code
#include <Wire.h>
#define RED 8
#define ORANGE 10
#define BLUE 13
void setup()
{
Wire.begin(8);
Wire.onReceive(slaveExec);
pinMode(RED,OUTPUT);
pinMode(ORANGE, OUTPUT);
pinMode(BLUE, OUTPUT);
}
void loop()
{
}
void slaveExec(int numOfBytes)
{
while(Wire.available())
{
char c = Wire.read();
if(c == 'R'){
digitalWrite(RED, HIGH);
digitalWrite(ORANGE, LOW);
digitalWrite(BLUE, LOW);
}
else if(c=='O'){
digitalWrite(RED, LOW);
digitalWrite(ORANGE, HIGH);
digitalWrite(BLUE, LOW);
}
else if(c=='B'){
digitalWrite(BLUE, HIGH);
digitalWrite(RED, LOW);
digitalWrite(ORANGE, LOW);
}
else if(c=='A'){
digitalWrite(BLUE, HIGH);
digitalWrite(RED, HIGH);
digitalWrite(ORANGE, HIGH);
}
else if(c=='N'){
digitalWrite(BLUE, LOW);
digitalWrite(RED, LOW);
digitalWrite(ORANGE, LOW);
}
}
}


I'm currently a Frontend Development Engineer at Tactel in Malmö, Sweden developing digital services for Panasonic.
Formerly a digital designer with a coding habit who was abuducted into the realm of software development.
You can shoot me a line at<EMAIL_ADDRESS>Thanks for watching and goodnight!


Visually impact people are not able to see the hot objects in kitchen, so they might get burnt when they cook.
Allowing the visually impact people to cook safely at home as the temperature sensor from thewill alert them if they are too close to a hot object.
Visually impact people who wear bracelets would be able to know more about their surroundings and prevent injuries.
The bracelet is a wearable device. It will detect the temperature of the warm objects. If the temperature of the hot object is higher than 80 degree and the distance is closer to visually impact people, it will alert them with high pitch sound and vibration.
Visually impact people will wear it all the time. When they approach hot objects, they would alert by the sound and vibration from the bracelet.
Visually impact people can move freely at home without worrying about getting burnt or injuried.
Idea Generator & Designer & Coder
Bendemeer Secondary School
Idea Generator & Designer & Coder
Sinagpore Management University


Before Change
)
)
//apply softmax
self._layers.append(Softmax())
//gather the nodes from the output indices - inputs = [all node predictions, output node indices]
self._layers.append(
Lambda(lambda inputs:
After Change
if not isinstance(generator, FullBatchNodeGenerator):
raise TypeError("Generator should be a instance of FullBatchNodeGenerator")
if not len(layer_sizes) == len(activations):
raise ValueError("The number of layers should equal the number of activations")
if not isinstance(approx_iter, int) or approx_iter <= 0:
raise ValueError("approx_iter should be a positive integer")
if (transport_probability > 1.0) or (transport_probability < 0.0):
raise ValueError("transport_probability should be between 0 and 1 (inclusive)")
self.layer_sizes = layer_sizes
self.transport_probability = transport_probability
self.activations = activations
self.bias = bias
self.dropout = dropout
self.kernel_regularizer = kernel_regularizer
self.generator = generator
self.support = 1
self.method = generator.method
self.approx_iter = approx_iter
// Check if the generator is producing a sparse matrix
self.use_sparse = generator.use_sparse
if self.method == "none":


---
layout: slides
---
class: center, middle
# CME 216, ME 343 - Winter 2021
## Eric Darve, ICME
![:width 40%](../Stanford.jpg)
---
class: middle
# Automatic differentiation using TensorFlow
Let's explore how we can use TensorFlow to compute derivatives of functions using a special technique called **Automatic differentiation.**
---
class: middle
In fact, we have already seen this with the backpropagation algorithm.
This allowed computing
$$ \frac{\partial L}{\partial W_{ij}} $$
efficiently.
---
class: middle
But TensorFlow (PyTorch as well) offers much more general capabilities to compute derivatives.
---
class: middle
In fact it can differentiate any function using **automatic differentiation.**
---
class: middle
$$ y(x) = 4x + x^3 $$
Let's compute $dy/dx$ using automatic differentiation in TensorFlow.
---
class: middle
Declare that $x$ is an independent variable:
```python
x = tf.Variable(1.0)
```
---
class: middle
Define the operations that will require differentiation:
```python
with tf.GradientTape() as g:
y = 4*x + x**3
```
---
class: middle
Differentiate!
```python
dy_dx = g.gradient(y, x)
print('dy/dx = ', dy_dx)
```
```python
Output: dy/dx = tf.Tensor(7.0, shape=(), dtype=float32)
```
---
class: middle
```Python
x = tf.Variable(1.0)
with tf.GradientTape() as g:
y = 4*x + x**3
dy_dx = g.gradient(y, x)
```
---
class: middle
All the Python code in these slides can be found on the github repository:
[TensorFlow AD.ipynb](https://github.com/EricDarve/me343-cme216-winter-2021/blob/main/Code/TensorFlow%20AD.ipynb)
---
class: middle
We can differentiate with respect to multiple variables.
Take
$y = x_1 + x_2^2$, $x_1 = 1$, $x_2 = 2$
---
class: middle
Compute:
$$\frac{\partial y}{\partial x_1} = 1$$
$$\frac{\partial y}{\partial x_2} = 2 x_2 = 4$$
---
class: middle
```Python
x1 = tf.Variable(1.0)
x2 = tf.Variable(2.0)
with tf.GradientTape() as g:
y = x1 + x2**2
dy_dx1, dy_dx2 = g.gradient(y, [x1,x2])
print('dy/dx1 = ', dy_dx1.numpy(), '; dy/dx2 = ', dy_dx2.numpy())
Output: dy/dx1 = 1.0 ; dy/dx2 = 4.0
```
---
class: middle
`dy_dx1.numpy()` prints the numerical content of the tensor as a `numpy` variable.
---
class: middle
It's important to distinguish between `tf.Variable` and constant values which are not independent variables.
---
class: middle
```Python
# Independent variable
x0 = tf.Variable(2.0, name='x0')
# A tf.constant is not a variable
c1 = tf.constant(-2.0, name='c1')
# Constant because we specify trainable=False
c2 = tf.Variable(-1.0, name='c2', trainable=False)
# variable + tensor returns a tensor. So c3 is not a tf.Variable.
c3 = tf.Variable(1.0, name='c3') + 1.0
# A variable but not used to compute y
x4 = tf.Variable(0., name='x4')
```
---
class: middle
When you differentiate with respect to a constant rather than a `tf.Variable`, TF returns `None`.
```Python
with tf.GradientTape() as g:
z = x0 + c1
y = z**2 + (c2**3) + 4*c3
grad = g.gradient(y, [x0, c1, c2, c3, x4])
for dy_dxi in grad:
print(dy_dxi)
```
---
class: middle
Output
```Python
tf.Tensor(0.0, shape=(), dtype=float32)
None
None
None
None
```
---
class: middle
In some cases, you need TF to interpret a `tf.Tensor` as an independent variable.
---
class: middle
Consider
```Python
x = tf.constant(-3.)
with tf.GradientTape() as g:
y = x**4
print(g.gradient(y, x))
```
---
class: middle
What is the output?
--
```Python
None
```
---
class: middle
Instead use `watch`:
```Python
x = tf.constant(-3.)
with tf.GradientTape() as g:
g.watch(x)
y = x**4
print(g.gradient(y, x)) # 4x^3 = 4 (-27) = -108
Out: tf.Tensor(-108.0, shape=(), dtype=float32)
```
---
class: middle
Tensor of variables can be used as input.
```Python
x = tf.Variable([1, -3.0])
with tf.GradientTape() as g:
y = tf.math.reduce_sum(x**2)
```
--
See [tf.math](https://www.tensorflow.org/api_docs/python/tf/math) for all tensor operations supported by TF. For example, `tf.math.reduce_sum`.
---
class: middle
In that case, you compute the gradient with respect to each variable in the tensor.
---
class: middle
```Python
print(x.numpy())
print(y.numpy()) # x[0]**2 + x[1]**2 = 1 + 9 = 10
print(g.gradient(y, x)) # (2x[0], 2x[1]) = (2,-6)
Out:
[ 1. -3.]
10.0
tf.Tensor([ 2. -6.], shape=(2,), dtype=float32)
```
---
class: middle
As an extension, when the dependent variable (or target) is a vector, `gradient` returns the sum of the gradients for each component.
---
class: middle
```Python
x = tf.Variable(-1.)
with tf.GradientTape() as g:
y = [2*x,x**4]
print([y[i].numpy() for i in range(2)]) # [-2,1]
print(g.gradient(y, x)) # 2 + 4x^3 = 2 - 4 = -2
Out:
[-2.0, 1.0]
tf.Tensor(-2.0, shape=(), dtype=float32)
```
---
class: middle
Let's consider a more complicated example where we want to differentiate two different functions.
Moreover, the input will be a vector of `tf.Variable`.
---
class: middle
```Python
x = tf.Variable([1, -3.0])
with tf.GradientTape() as g:
y = 2*x
z = y**2
print(x.numpy())
print(y.numpy())
print(g.gradient(y, x))
print(g.gradient(z, x))
```
---
class: middle
Fail!
--
After calling `gradient`, the resources for `g` are deleted.
`GradientTape` is not persistent.
---
class: middle
We need to explicitly tell TF not to free the resources.
---
class: middle
```Python
x = tf.Variable([1, -3.0])
with tf.GradientTape(persistent=True) as g:
y = 2*x
z = y**2
print(x.numpy())
print(y.numpy())
print(g.gradient(y, x))
print(g.gradient(z, x))
del g # release resources
```
---
class: middle
# What should the output be?
--
`y=2*x`: a tensor of size 2.
`y[0] = 2*x[0]; y[1] = 2*x[1];`
`g.gradient(y, x)`:
Gradient of `y[0]`: `[2. 0.]`
Gradient of `y[1]`: `[0. 2.]`
---
class: middle
Because `y` is a tensor, you have to sum the gradient of `y[0]` and `y[1]`.
```Python
Out: tf.Tensor([2. 2.], shape=(2,), dtype=float32)
```
---
class: middle
# What is `g.gradient(z, x)`?
--
`z[0]=4*x[0]**2; z[1]=4*x[1]**2` with
`x = tf.Variable([1., -3.])`
`g.gradient(z, x)`: `[8*x[0] + 0., 0. + 8*x[1]]`
which is `[8., -24.]`
```Python
Out: tf.Tensor([ 8. -24.], shape=(2,), dtype=float32)
```
---
class: middle
Plotting the derivative is very easy!
---
class: middle
```Python
x = tf.linspace(-10.0, 10.0, 129) # A tf.Tensor, not a tf.Variable
with tf.GradientTape() as g:
g.watch(x)
y = tf.math.tanh(x)
dy_dx = g.gradient(y, x)
```
---
class: middle
`y` is a vector such that `y[i] = tanh(x[i])`.
When computing the gradient of `y` with respect to `x[i]` we need to differentiate **all the components** of `y` with respect to `x[i]` and **add** these derivatives together.
---
class: middle
Since `y[i] = tanh(x[i])`, the `i` component of `g.gradient(y, x)` is simply $\text{tanh}'(x_i)$.
---
class: middle
```Python
plt.plot(x, y, label='y')
plt.plot(x, dy_dx, label='dy/dx')
```
.center[![:width 40%](autodiff_tanh.png)]
---
class: middle
More information on [Automatic Differentiation](https://www.tensorflow.org/guide/autodiff)
and
[Advanced Automatic Differentiation](https://www.tensorflow.org/guide/advanced_autodiff)
Everything on [Gradient Tape](https://www.tensorflow.org/api_docs/python/tf/GradientTape)


 However, to support us in maintainaing the database you can become a patreon for as low as one dollar by clicking on the following link Click Here
| {{ tip.kick_of_Time }} | ||
{{ tip.home_Team }} {{ tip.home_Odd }} |
Draw {{ tip.draw_Odd }} |
{{ tip.away_Team }} {{ tip.away_Odd }} |
Home Win % |
Away Win % |
Our Prediction |
|---|---|---|
{{ tip.home_Percent }} |
{{ tip.away_Percent }} |
{{ tip.prediction }} |
{{ post.bodytext|truncatewords:40 }}
There's no blog entries...
{% endif %}{% endblock %}


Weather
It's {{temp}} ℃ with {{desc}}
Quote of The Day
A few words to inspire you today!
{{quote}}
- {{ author }}
Need a tip?
We're always there to keep you OnTrack :)
It's {{temp}} ℃ with {{desc}}
A few words to inspire you today!
We're always there to keep you OnTrack :)


|
GNSDK C API Reference
<IP_ADDRESS>2
|
Enumerations | |
| enum | gnsdk_playlist_status_t { gnsdk_playlist_status_unknown = 0, gnsdk_playlist_status_new_ident = 10, gnsdk_playlist_status_old_ident = 11 } |
Functions | |
| GNSDK_DECLARE_HANDLE (gnsdk_playlist_collection_handle_t) | |
| GNSDK_DECLARE_HANDLE (gnsdk_playlist_results_handle_t) | |
Indicates the Playlist callback function synchronization status values.
Definition at line 60 of file gnsdk_playlist.h.
| GNSDK_DECLARE_HANDLE | ( | gnsdk_playlist_collection_handle_t | ) |
Handle to a Playlist collection summary. The application must release this handle using gnsdk_playlist_collection_release().
Remarks:
Create a collection summary handle using one of these methods: Create a new handle. Load an existing collection summary from storage. Deserialize an existing serialized collection summary.
| GNSDK_DECLARE_HANDLE | ( | gnsdk_playlist_results_handle_t | ) |
Handle to Playlist results. The application must release this handle using gnsdk_playlist_results_release().
Remarks:
Playlist Result handles are returned by the gnsdk_playlist_generate_playlist() and gnsdk_playlist_generate_morelikethis() APIs. Each Playlist result consist solely of the unqiue identifier which was given to Playlist during the population of the collection summary. The application must match this identifier to the physical media to which it references. The unique identifier given by the application can be any value that helps the application identify the media it references. For example, a desktop application could use the full pathname of a file as the identifier. An online application might use a URL or database ID as the identifier. Playlist does not interpret the identifer, only returns it to the application in playlist results.
How can we improve this topic?
Copyright © 2000-present. Gracenote, Inc. All rights reserved. Generated on Tue Jan 8 2013 07:40:58.


Week 1
Slides
- Learning outcomes
- Web environment ecosystem
- How the web works
- Performance matters
- Progressive enhancement
Learning Outcomes
- Create a properly structured and accessible web page using (HTML).
- Represent the Document Object Model (DOM) in a hierarchical diagram.
- Recognize the importance of browser compatibility with HTML and CSS standards.
- Style an accessible web page using Cascading Style Sheets (CSS) techniques.
- Create page layouts that adapt to suit the constraints of the display using media queries.
- Use internet protocols to publish a web site.
- Explain how web servers display web pages.
- Describe how to secure a web site.
- Use design techniques to layout a user-friendly website.
SYST10049 Web Development
@2021-2023 Sheridan College
...
SYST10049 Web Development
@2021-2023 Sheridan College


import os
repo_dir = os.path.dirname(os.path.abspath(__file__))
setup(name="baselines",
packages=[package for package in find_packages()
import sys
if sys.version_info.major != 3:
print("This Python is only compatible with Python 3, but you are running "
"Python {}. The installation will likely fail.".format(sys.version_info.major))
setup(name="baselines",
packages=[package for package in find_packages()
if package.startswith("baselines")],


@***************************************************************************** * Entry page for topic browsing * * Copyright (c) 2015 MIT Libraries * *****************************************************************************@ @(schemes: List[Scheme])(implicit request: play.api.mvc.RequestHeader) @layout.main("Topics - TopicHub") {
Topics are at the heart of how TopicHub helps you discover content. Each topic is an identifier or term belonging to a standard vocabulary or name-space, known as its scheme. Relative to this scheme, the topic describes, characterizes or classifies the item. Topics help organize items into groups that are of interest to subscribers: all articles in a particular journal, everything written by a certain author, etc. Explore the topics within a scheme by clicking on one of the scheme browse links at the left.


Add receiver
You can use the next templates: {{symbol}} for the symbol/ticker, {{timeframe}} for the timeframe/period and {{message}} for the message itself.
Test
Test message
Send test message:
NOTE: You can get telegram key by starting a conversation with
our telegram bot
and following the instructions.
Bot to use:
ProfitRobots.com
Shared bot with restriction.
Local bot
Locally hosted bot for your personal use without any restrictions.
Save


Some text about me ..
It comes with a private helicopter and a private Lamborghini Veryon
For more information about the price,quality,real estate dealer click the button below
For more informaton, click on the button below
Comes with an all expense home theatre and home digital system
For more information about the price,quality,real estate dealer click the button below


Pyrrha Platform
The 4th version of Prometeo will soon be released as a Call for Code® with The Linux Foundation project called Pyrrha.
Source code repo
Pyrrha Platform


The KalmanFilteringSwipe class is an wraper to opencv KalmanFilter class.
More...
#include <kalmanfilteringswipe.h>
The KalmanFilteringSwipe class is an wraper to opencv KalmanFilter class.
This wraper makes the opencv KalmanFilter class fit better with the library structure
| KalmanFilteringSwipe::KalmanFilteringSwipe |
( |
float |
processNoiseVar = 1e-4 , |
|
|
float |
measurementNoiseVar = 8.5e-2 |
|
) |
| |
| KalmanFilteringSwipe::~KalmanFilteringSwipe |
( |
| ) |
|
| void KalmanFilteringSwipe::initialiseGesture |
( |
Point |
initialObs, |
|
|
float |
initialStateVar |
|
) |
| |
|
virtual |
| Point KalmanFilteringSwipe::predictUpdateUsingObs |
( |
Point |
observation | ) |
|
|
virtual |
| Point KalmanFilteringSwipe::predictWithoutObs |
( |
| ) |
|
|
virtual |
| vector<Point> KalmanFilteringSwipe::kalmanvec |
| KalmanFilter* KalmanFilteringSwipe::KF |
| Mat_<float> KalmanFilteringSwipe::measurement |
| vector<Point> KalmanFilteringSwipe::obsvec |
The documentation for this class was generated from the following files:


Registration
Create an account
Invalid username and password.
User Name :
Password :
Confirm password :
Sign Up


Five things political donations tell us about how money is influencing Australian politics
By Danielle Wood and Kate Griffiths
This week the Australian Electoral Commission released details of donations raised by politicians running in the 2019 federal election.
The data release included the headline-grabbing $1.1 million in donations to independent Zali Steggall.
But this data relates only to a small number of candidates, mainly independents.
The figures will pale in comparison to the political party figures expected in the second round of donations disclosures due out in February, especially Clive Palmer's rumoured $60 million contribution.
Nonetheless, the money flowing to independents at the 2019 election tells us five things about the role of money in Australian politics and the capacity of independents to be a force for change.
A successful independent campaign is costly
Breaking into Australia's political duopoly, Labor and the Coalition, is not easy.
Brand recognition is a big barrier for candidates outside the major parties.
Political advertising helps to get recognised. But advertising is costly.
The new data shows that independent candidates at the 2019 election raised more than twice as much in donations as independents in the previous two elections, and three times as much on a per-candidate basis than 2016.
The two independents who won a seat for the first time, Zali Steggall and Helen Haines, both raised substantial amounts, with Ms Steggall's total donations the highest for an independent in history.
It suggests that capacity to attract donations has become increasingly important to electoral success for independents.
Independents are less able to tap corporate and union dollars
Independents need to look beyond the deep pockets of Australian businesses and unions to fund their campaigns.
Businesses and unions almost exclusively support the major parties; they contributed about 70 per cent of declared donations to the Labor, Liberal and National parties at the 2016 election.
Unions are regular major donors to Labor, and many businesses are regular contributors to both sides, including the Australian Hotels Association, ANZ, Westfield, and Village Roadshow.
Many of these big donors seek to buy access and ultimately influence.
The "value proposition" of independent candidates is far less clear.
So perhaps it is not so surprising that individuals, including family members, feature more prominently than businesses or unions as donors to independents.
Top four independent campaigns (ranked by total donations)
| Candidate | Electorate | State | Totaldonations | Number ofdonors | Average donation | Share from large donors(>$13,800) | Share from smaller donors | Total electoralexpenditure |
|---|---|---|---|---|---|---|---|---|
| Zali Steggall | Warringah | NSW | $1,104,976 | 1,378 | $802 | 32 per cent | 68 per cent | $910,893 |
| Helen Haines | Indi | VIC | $421,011 | 1,002 | $420 | 42 per cent | 58 per cent | $321,114 |
| Oliver Yates | Kooyong | VIC | $362,578 | 261 | $1,389 | 47 per cent | 53 per cent | $483,804 |
| Kerryn Phelps | Wentworth | NSW | $218,690 | 333 | $657 | 33 per cent | 67 per cent | $281,944 |
It helps to be an independent in a well off (and upset) electorate
With the big union and corporate dollars effectively off the table, if you want to do serious fundraising as an independent it helps to be among the well heeled.
Warringah, Kooyong and Wentworth, three of the richest electorates in the country, were also three of only four electorates where independent candidates raised more than $200,000 in donations.
The fourth was Indi, where Ms Haines raised more than $420,000 despite being in an electorate with incomes below the national average.
This is a rare example of a people-power campaign, with more than 1,000 donors contributing an average of just $420.
Big fundraising campaigns require more than well-off constituents.
A recognisable local candidate and a deep seam of discontent helps too.
Warringah was frustrated with its local member (Tony Abbott), Wentworth was unhappy that its previous local member (Malcolm Turnbull) was ousted as prime minister, and Indi resented being taken for granted as a previously safe conservative seat.
There's money in promising climate action
Many independents ran on a platform of stronger climate action.
This isn't just a policy point of difference for independents, the data shows it is also a source of fundraising dollars.
Climate200, a funding vehicle set up by renewable energy advocate Simon Holmes a Court, raised nearly $500,000 in the lead-up to the election from philanthropists including Mike Cannon-Brookes.
Climate200 was a big supporter of independents who advocated for climate action, including Oliver Yates (Kooyong, $145,000) and Kerryn Phelps (Wentworth, $47,500).
Holmes a Court wants to double his fundraising efforts for the next election to counterbalance vested interests opposed to climate action who remain some of the biggest donors to political parties, particularly the Coalition.
In the two years spanning the 2016 election, parties declared more than $3.8 million in donations from mining companies, more than 20 per cent of their declared corporate donations. This was in addition to more than $8 million in direct campaigning by the Minerals Council of Australia around the 2016 election, including on the "Coal, it's an amazing thing" advertising blitz.
Independents are held to higher standards
Perhaps the most surprising thing to emerge from the latest donations data is that independents are held to higher standards of transparency than political parties.
The donations disclosures from independents are a full three months ahead of those from political parties, the information is more comprehensive, and it's provided in a more usable format than disclosures from political parties.
Like political parties, independents are required to identify individual donations above the disclosure threshold of $13,800, but unlike political parties, they also have to report their total donations from all sources (above and below the threshold).
They are also required to aggregate multiple donations from a single source, preventing the practice of "donations splitting" where donors make multiple payments below the threshold, which the parties don't need to disclose.
This makes it much easier to interpret the returns of independent candidates.
We can see that 30 per cent to 40 per cent of donations to the Steggall, Haines, and Phelps campaigns were from big donors (those contributing more than $13,800), and we can be confident that the remainder came from smaller donors.
By contrast, about 60 per cent of private funds flowing to the major parties at the 2016 election was from unknown sources, and there's no way of knowing how much of this was small donors and how much was "donations splitting".
The ultimate lesson
Money matters in politics. Two out of three independents elected at the 2019 federal election, Ms Steggall and Ms Haines, were the biggest fundraisers by both number of donations and value.
Unable to tap into corporate and union funding to any great extent, independents rely on a combination of well-off supporters, a motivated electorate, and outside agenda-based groups.
But all this of course is just the tip of the iceberg. The big dollars will hit the books in February.
Danielle Wood is the program director of Budget Policy and Institutional Reform at the Grattan Institute and Kate Griffiths is a Grattan Institute senior associate.


Personal Conflicts
4/12/15
Everyday we are faced with decisions and often times we are faced with opposing decisions that undoubtedly turn into conflicts. One conflict I remember very clearly is one with my girlfriend. This conflict started because her ex-boyfriend has recently contacted her asking if they could meet up and catch up. My first inclination was to respond in a nasty manner and suggest that she shouldn't see him simply because I thought there was no good to come out of it. We discussed the pros and cons for about an hour or so simply because this was important to me and I wanted to do the right thing. I always try to do the right thing. The source of the conflict was fear and vulnerability because I felt as if my emotions were in someone else's hands.
Upon analyzing the conflict I realized that many of my emotions were unwarranted and lacked any rationale. For this reason I had to lower my ego and understand my girlfriend on a much deeper level. In doing this I needed to trust her and trust is a very hard thing for me to gain from someone. If I could go back I would have trusted here more and realized that there is so much out of my control in this life that to stress over every little thing would not be a life worth living.
In the end I learned about what it meant to take the steps to understand someone on a much more fundamental level and create the room to trust someone. I also learned that a life lived in fear is not a life at all.


Exec File app config
Exec File app needs an access via HTTP to the server that will execute the script hooks.
IP address
Port


--- status: publish layout: page tags: [] author: display_name: JP email<EMAIL_ADDRESS>published: false date: 2011-11-18 09:55:28 -0700 title: GAP Landcover Classification (Vector) categories: [] ---
Data Type: Map Data
Steward(s): AGRC, Local Government partners
Description: Address points for Utah counties (10 complete and 6 partial). This dataset is not yet available, but will hopefully be available to the public soon.
Abstract:
In Utah, addresses are assigned by local government addressing authorities using a defined addressing system, or grid. Typically, an addressing system consists of an origin (0,0) point, a north-south axis, an east-west axis, a
convention that governs the assignment of addresses, typically expressed as the number of (100 address range) blocks per mile, and a boundary within which which addresses are assigned using this particular grid. This dataset contains the NW, NE, SE, and SW address quadrants for all address systems in Utah.
Description: NW, NE, SE, and SW Address grid quadrants for all address grids in Utah.
Warranties: There are no constraints or warranties with regard to the use of this dataset.
Last Update: December 1, 2011
POC: A GRC
Links: Notes on Utah Addressing Systems (Address Grids)


Menu Base64 Encode/Decode (Menu
Individual Procedures
\ Tools \ Codings)
The menu
Base64 Encode/Decode
contains the following commands:
Base64 Encode
Encoding of documents using Base64-coding.
Base64 Decode
Decoding of documents using Base64-coding.


EDI consists of 75 legal indicators developed under 23 of the UNEP Bali Guidelines that are concerned with the development and implementation of legislation. In addition to the legal indicators, EDI includes 24 supplemental indicators that assess whether there is evidence that environmental democracy is being implemented in practice. The EDI legal indicators assess laws, constitutions, regulations and other legally binding, enforceable rules at the national level.
Nearly every indicator is accompanied by a guidance note, which typically consists of a short paragraph that defines any key terms, provides clarification, and offers illustrative examples. The legal indicators have four scoring options, ranging from zero (lowest) to three (highest). Each score is accompanied by scoring criteria which must be in place for that score to be defensible. In this way, subjectivity in scoring is limited, though not eliminated.
In general, there are two types of legal indicators:
A score of three 3 means that the respective provision exemplifies accepted good practice. A score of 2 indicates that a majority—but not all—of environmental decision making includes a certain provision, or indicates moderately strong provision. A score of 1 translates to a weaker provision that allows significant discretion to government agencies to fulfil these rights, or that a right only applies to a minority of environmental decision making processes. A score of 0 indicates that the law is either silent or prohibits some aspect of procedural rights, depending on the indicator.
The practice indicators are scored qualitatively on a three point scale:
Similar to the legal indicators, practice indicators are typically accompanied with guidance limit subjectivity for the researcher. Unlike the legal indicators, the scores are simply presented as sums, and not averaged. There are 4 practice indicators under the transparency pillar, 7 under the participation pillar, and 13 under the justice pillar. However, as previously mentioned, several of the practice indicators indirectly assess accessibility of information due to the method of research.
Pillar scores averaged into one overall score for the country
Guideline scores averaged for each pillar
EDI indicators were developed under the United Nations Environment Programme's (UNEP) Bali Guidelines on Rio Principle 10. These guidelines were adopted by UNEP in 2010.
Guideline scores are the arithmetic average of its legal indicators.
Individual indicator score
Supplemental indicators on environmental democracy in practice.
Results do not affect the legal indicator scores.


Enthusiastically reintermediate leading-edge data through ethical ideas. Efficiently cultivate team building opportunities through market-driven web services.
Professionally benchmark functional services whereas world-class imperatives. Interactively engineer intermandated interfaces vis-a-vis standards compliant growth strategies. Proactively promote robust scenarios via future-proof ideas. Globally maximize ethical technologies via multifunctional partnerships.


About Me
I'm a Software Developer living in Jaipur, IN, with a passion for all things technology. When I'm not coding web-apps, I'm exploring the city or writing some technical blogs.
Moreover I'm passionate about transforming data into information, ideas into algorithms, process into mathematical models and words into code.
Motivate Me More
Moreover an Army needs to upgrades it's weapons and personnels. That's why your contribution serves as an initiative to bring upgradation in Pyweapons (books, info cheatsheats and research tools)
You can support me by buying a book for me as one time donation. If you really like my articles consider it as a small tip to motivate me more :)
My Skills
You will get to know about programming language like Python and a little bit of R, Databases like MySQL, PostgreSQL and MongoDB, tools and frameworks like Flask, Django and cold knowledge of Machine learning and Data Analysis


Train service is interrupted, which alternatives do I have?
You can use the Carris bus network, check the following link for more information:
Bus and Tram Routes and Schedules
You can see which bus lines serve each station using this app. See I need to take a bus, train or boat to continue my trip, how can I find information about it? to find out how.


"Latest raffles"
Raffle Name
# of entrants
Options
Raffle #1
# user entrants
Stop
Raffle #2
# user entrants
Edit
Stop
Raffle #3
View Winner
New Raffle


Hello and Welcome to my website. My name is Debopriyo Bhattacharya. I completed my Masters Degree in Computer Science from Syracuse University . I have a penchant for technology, finance and movies.
Currently, I work in the Device Subscriptions & Bundling team at Amazon in Seattle. Download my resume from here. You can contact me through this form or email me.
Large projects may consist of hundreds or even thousands of packages and perhaps several million lines of code. One change in any one file may end up requiring modifications to all the files that depend on it. This is why it is important to minimize inter dependency among files, we need to partition code into relatively small parts and make it more modular.
This tool shows the dependency and strong components from selected C# files.
In this project, a social interaction network was constructed using data from the platform Twitter and then the key findings obtained from the network analysis were presented. The hashtag used for the purpose was '#FakeNews' and the results were simulated using Gephi.
Finally we are able to determine accounts with bias towards political parties that tend to tweet as a group.
I used a Convolutional Neural Network for the iNaturalist Challenge 2017 to classify almost 5,000 species of animals and plants.
I applied data augmentation, automated hyperparameter tuning, and explored the use of the Inceptionv3 architecture. I also explored automated hyperparameter tuning, and other optimizations.
In this project, I live stream tweets using twitter API for a speficic keyword or hashtag in this case '#IndvsAus' to see a map of the locations from where the tweets originated using the latitude and longitude information available in the tweets.
I have used cartopy and tweepy python libraries for the plotting and getting the tweets respectively.
During the summer of 2019 I interned at Health Catalyst. I worked on the Catalyst Clinical Informatics software development team to create a data profiling tool using C# and setup an opensource EHR system on azure that can be used to teach and train users
My initial summer internship got extended and I worked remotely during my fall semester.
I was responsible for tutoring undergraduate student-athletes: Math subjects(Probability & Statistics,Discrete Maths) ; Computer subjects(Data Structure & Algorithms,Computer & Network Security). I help them with not only with understanding their course work but also preparing for their assignments, exams and reviewing their progress.
During the summer of 2017 I studied about Convolutional Neural Networks and worked on image classification project under the guidance of Prof. Fernando Perez-Cruz.
Graduated
Graduated
I have been facinated by computers from a very young age. I aspired to be a versatile software engineer hence, I decided to pursue a Bachelor degree in Computer Science and Engineering.
Apart from engineering, I enjoy learning about corporate finance and cryptocurrency. My research interests lie at the intersection of data science and computer security. I am a huge fan of MOOCs and spend considerable amount of time on Coursera and Udemy which have helped me learn and get better at topics that really interest me.
I love to binge on new movies and TV shows. Suits is my favorite TV show closely followed by Game of Thrones and Breaking Bad. In my free time, I like to play table tennis, FPS games and work out.


type: object
| Field | Required | Type | Description |
|---|---|---|---|
code |
required | number | This is the same as the HTTP status of the response. |
message |
required | string | A short description of the error. |
status |
required | string | An error such as INVALID_ARGUMENT . |


Software
skarnet.org
s6-linux-init
What is it?
s6-linux-init is a set of minimalistic tools used to create a
s6-based init
system, including a /sbin/init binary, on a Linux kernel.
It is a part of the s6 ecosystem.
The resulting architecture follows the Unix philosophy (one job →
one tool) as closely as possible, and is fully dedicated to the s6 way of
managing a system:
- s6-svscan
runs as process 1 for the whole machine lifetime.
- Every daemon is supervised.
- No logs are ever lost.
- Policy is entirely left to the user. Typically, any service manager
can be run on top of s6-linux-init.
Nevertheless, the architecture is fully compliant with various
empirical and historical specifications. For instance, it provides:
- utmp management compatible with sysvinit
- runlevel management, with a configurable default, overridable from the
kernel command line
- sysvinit-like commands to shut the system down, including a
shutdown command that follows the
LSB specification
Installation
Requirements
- A Linux-based system with a standard C development environment
- GNU make, version 3.81 or later
- skalibs version
<IP_ADDRESS> or later. It's a build-time requirement. It's also a run-time
requirement (for s6-linux-init-maker)
as well as a boot-time requirement (i.e. a run-time requirement for the
programs used when you boot a system created with
s6-linux-init-maker) if you link
against the shared version of the skalibs library.
- execline version
<IP_ADDRESS> or later. It is a build-time and boot-time requirement.
- s6 version
<IP_ADDRESS> or later. It is a build-time and boot-time requirement.
The following optional dependencies are also supported:
- If you're using musl and
want nsswitch-like functionality:
nsss version
<IP_ADDRESS> or later (build-time and boot-time)
- If you want secure utmp functionality:
utmps version
<IP_ADDRESS> or later (build-time and boot-time)
Licensing
s6-linux-init is free software. It is available under the
ISC license.
Download
Compilation
- See the enclosed INSTALL file for installation details.
Upgrade notes
- This page lists the differences to be aware of between
the previous versions of s6-linux-init and the current one.
Reference
General
Commands
Unless more details are provided in an Exit codes section
of a specific page, all these commands exit 0 on success, 111 if they encounter a
temporary error (such as a system call failure) and 100 if they encounter a
permanent error (such as a misuse).
Related resources
- s6-linux-init is discussed on the
skaware and
supervision
mailing-lists.
- There is a #s6 IRC channel on OFTC. Sometimes people
are there and even answer questions.


{% extends "ccl.html" %} {% import "wtf.html" as wtf %} {% block title %}CCL - Login{% endblock %} {% block content %}
Register Now!
Forgot password ?


short-term interns in California, San Diego.
2017.12.17 ~ 23
Geunchang Choi, an undergraduate has been invited as short-term interns in California Institute for Telecommunications and Information Technology, University of California (UCSD), San Diego.


Sets the time in milliseconds to have Carousel start scrolling automatically after being initialized.
A map with all behaviors that were defined for this widget. The key is the name of the behavior, the value is the callback function that is invoked when the behavior is called.
Breakpoint value in pixels to switch between small and large viewport.
Sets continuous scrolling
Whether the carousel is initially collapsed.
Name of the easing animation.
Name of the animation for transitioning between pages.
Duration of the animation in milliseconds.
0-based index of the first element to be displayed
The client-side ID of the widget, with all parent naming containers, such as
myForm:myWidget
. This is also the ID of the container HTML element for this widget. In case the widget needs
multiple container elements (such as Paginator), this may also be an array if IDs.
Number of visible items per page
Defines the number of page links of paginator.
In responsive mode, carousel adjusts its content based on screen size.
Whether the state of the carousel is saved between page loads.
The speed at which the carousel toggles.
Whether the carousel is toggleable.
Sets vertical scrolling
The name of the widget variables of this widget. The widget variable can be used to
access a widget instance by calling PF("myWidgetVar")
.
Generated using TypeDoc
The configuration for the Carousel widget. You can access this configuration via BaseWidget.cfg. Please note that this configuration is usually meant to be read-only and should not be modified.


Resolvers
In Connect
, you implement the graph by creating resolvers
. Those resolvers are functions that expose some data on the graph.
A resolver has a few basic elements:
-
Inputs – A set of attributes that are required to be in the current parsing context for the resolver to be able to work. Inputs is optional, no inputs means that the resolver is always capable of working, independently of the current parsing context.
-
Outputs - A query-like notation representing the shape of data the resolver is able to resolve. This is typically a list of attributes/joins, where joins typically include a simple subquery.
-
A function - A
(fn [env input-data] tree-of-promised-output)
that takes the inputs and turns them into a tree that satisfies the "output query".
So you might define a resolver like this:
(pc/defresolver person-resolver
[{:keys [database] :as env} {:keys [person/id]}]
{::pc/input #{:person/id}
::pc/output [:person/first-name :person/age]}
(let [person (my-database/get-person database id)]
{:person/age (:age person)
:person/first-name (:first-name person)}))
If you use Cursive, you can ask it to resolve the pc/defresolver as a defn and you will get proper symbol resolution
|
Where the database
in the environment would be supplied when running the parser, and the input would have to be
found in the current context. Remember that graph queries are contextual… you have to have a starting node to work
from, so in the above example we’re assuming that during our parse we’ll reach a point where the context contains
a :person/id
. The my-database
stuff is just made up for this example, and is intended to show you that your
data source does not need to remotely match the schema of your graph query.
Pathom will scan through the defined resolvers in order to try to satisfy all of the properties in a query. So, technically you can split up your queries as much as makes sense into separate resolvers, and as long as the inputs are in the context Pathom will assemble things back together.
Of course, it doesn’t make sense in this case to do so, because each resolver would end up running a new query:
(pc/defresolver person-age-resolver [{:keys [database] :as env} {:keys [person/id]}]
{::pc/input #{:person/id}
::pc/output [:person/age]}
(let [person (my-database/get-person database id)]
{:person/age (:age person)}))
(pc/defresolver person-first-name-resolver [{:keys [database] :as env} {:keys [person/id]}]
{::pc/input #{:person/id}
::pc/output [:person/first-name]}
(let [person (my-database/get-person database id)]
{:person/first-name (:first-name person)}))
...
The point is that a single-level query like [:person/id :person/first-name :person/age]
can be satisfied and "folded together"
by Pathom over any number of resolvers.
This fact is the basis of parser (de)composition and extensibility. It can also come in handy for performance refinements when there are computed attributes.
Derived/Computed Attributes
There are times when you’d like to provide an attribute that is computed in some fashion. You can, of course, simply compute it within the resolver along with other properties like so:
(pc/defresolver person-resolver [{:keys [database] :as env} {:keys [person/id]}]
{::pc/input #{:person/id}
::pc/output [:person/first-name :person/last-name :person/full-name :person/age]}
(let [{:keys [age first-name last-name]} (my-database/get-person database id)]
{:person/age age
:person/first-name first-name
:person/last-name last-name
:person/full-name (str first-name " " last-name) ; COMPUTED
...}))
but this means that you’ll take the overhead of the computation when any query relate to person comes up. You can instead spread such attributes out into other resolvers as we discussed previously, which will only be invoked if the query actually asks for those properties:
(pc/defresolver person-resolver [{:keys [database] :as env} {:keys [person/id]}]
{::pc/input #{:person/id}
::pc/output [:person/first-name :person/last-name :person/age]}
(let [{:keys [age first-name last-name]} (my-database/get-person database id)]
{:person/age age
:person/first-name first-name
:person/last-name last-name}))
(pc/defresolver person-name-resolver [_ {:person/keys [first-name last-name]}]
{::pc/input #{:person/first-name :person/last-name}
::pc/output [:person/full-name]}
{:person/full-name (str first-name " " last-name)})
This combination of resolvers can still resolve all of the properties in [:person/full-name :person/age]
(if
:person/id
is in the context), but a query for just [:person/age]
won’t invoke any of the logic for the
person-name-resolver
.
Single Inputs — Establishing Context
So far we have seen how to define a resolver that can work as long as the inputs are already in the environment. You’re almost certainly wondering how to do that.
One way is to define global resolvers and start the query from them, but very often you’d just like to be able to say "I’d like the first name of person with id 42."
EQL uses "idents" to specify exactly that sort of query:
[{[:person/id 42] [:person/first-name]}]
The above is a join on an ident, and the expected result is a map with the ident as a key:
{[:person/id 42] {:person/first-name "Joe"}}
The query itself has everything you need to establish the context for running the person-resolver
,
and in fact that is how Pathom single-input resolvers work.
If you use an ident in a query then Pathom is smart enough to know that it can use that ident to establish the context
for finding resolvers. In other words, in the query above the ident [:person/id 42]
is turned
into the parsing context {:person/id 42}
, which satisfies the input of any resolver that needs
:person/id
to run.
Resolver Without Input — Global Resolver
A resolver that requires no input can output its results at any point in the graph, thus it is really a global resolver. Pay a particular attention to the "at any point in the graph" - it’s not just at the root. Thus, a resolver without inputs can "inject" its outputs into any level of the query graph result.
We’re going to start building a parser that can satisfy queries about a music store. So, we’ll start with a global resolver that can resolve the "latest product". The code below shows the entire code needed, boilerplate and all:
(ns com.wsscode.pathom.book.connect.getting-started
(:require [com.wsscode.pathom.core :as p]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.profile :as pp]))
; creating our first resolver
(pc/defresolver latest-product [_ _]
{::pc/output [{::latest-product [:product/id :product/title :product/price]}]}
{::latest-product {:product/id 1
:product/title "Acoustic Guitar"
:product/price 199.99M}})
(def parser
(p/parser
{::p/env {::p/reader [p/map-reader
pc/reader2
pc/open-ident-reader
p/env-placeholder-reader]
::p/placeholder-prefixes #{">"}}
::p/mutate pc/mutate
::p/plugins [(pc/connect-plugin {::pc/register latest-product})
p/error-handler-plugin
p/trace-plugin]}))
(comment
(parser {} [::latest-product]))
Our first resolver exposes the attribute ::latest-product
, and since it doesn’t require any input it is a global resolver.
Also, note that our output description includes the full output details (including nested attributes), this is mostly
useful for auto-completion on UI’s and automatic testing. If you return extra data it will still end up in the output
context.
Try some of these queries on the demo below:
[::latest-product]
[{::latest-product [:product/title]}]
; ::latest-product can be requested anywhere
[{::latest-product
[* ::latest-product]}]
Resolvers with single input
Next, let’s say we want to have a new attribute which is the brand of the product. Of course, we could just throw the
data there in our other resolver, but the real power of Connect comes out when we start splitting the responsibilities
among resolvers, so let’s define a resolver for brand that requires an input of :product/id
:
(ns com.wsscode.pathom.book.connect.getting-started2
(:require [com.wsscode.pathom.core :as p]
[com.wsscode.pathom.connect :as pc]))
(def product->brand
{1 "Taylor"})
(pc/defresolver latest-product [_ _]
{::pc/output [{::latest-product [:product/id :product/title :product/price]}]}
{::latest-product {:product/id 1
:product/title "Acoustic Guitar"
:product/price 199.99M}})
(pc/defresolver product-brand [_ {:keys [product/id]}]
{::pc/input #{:product/id}
::pc/output [:product/brand]}
{:product/brand (get product->brand id)})
(def app-registry [latest-product product-brand pc/index-explorer-resolver])
(def parser
(p/parser
{::p/env {::p/reader [p/map-reader
pc/reader2
pc/open-ident-reader]}
::p/mutate pc/mutate
::p/plugins [(pc/connect-plugin {::pc/register app-registry})
p/error-handler-plugin
p/trace-plugin]}))
The input is a set
containing the keys required on the current entity in the parsing context for the resolver to be
able to work. This is where Connect
starts to shine because any time your query asks for a bit of data
it will try to figure it out how to satisfy that request based on the attributes that the current contextual entity already has.
More importantly: Connect
will explore the dependency graph in order to resolve things if it needs to!
To illustrate this, let’s pretend we have some external ID for the brand and that we can derive this ID from the
brand string - pretty much just another mapping:
;; a silly pretend lookup
(def brand->id {"Taylor" 44151})
(pc/defresolver brand-id-from-name [_ {:keys [product/brand]}]
{::pc/input #{:product/brand}
::pc/output [:product/brand-id]}
{:product/brand-id (get brand->id brand)})
(comment
(parser {} [{::latest-product [:product/title :product/brand-id]}])
; => #::{:latest-product #:product{:title "Acoustic Guitar", :brand-id 44151}}
)
Note that our query never said anything about the :product/brand
. Connect
automatically walked the path
:product/id → :product/brand → :product/brand-id
to obtain the information desired by the query!
When a required attribute is not present in the current entity, Connect
will look for resolvers that can fetch it,
analyze their inputs, and recursively walk backwards towards the "known data" in the context.
When a required attribute is not present in the current entity, Connect
will calculate the possible paths
from the data you have to the data you request, then it can use some heuristic to decide which path to take
and walk this path to reach the data, if there is no possible path connect reader will return ::p/continue
to
let another reader try to handle that key. You can read more about how this works in the Index page.
Also remember that single-input resolvers can handle ident-based queries. Thus, the following ident-join queries already work without having to define anything else:
(parser {} [{[:product/id 1] [:product/brand]}])
; => {[:product/id 1] #:product{:brand "Taylor"}}
(parser {} [{[:product/brand "Taylor"] [:product/brand-id]}])
; => {[:product/brand "Taylor"] #:product{:brand-id 44151}}
Multiple inputs
The input to a resolver is a set, and as such you can require more than one thing as input to your resolvers. When doing so, of course, your resolver function will receive all of the inputs requested; however, this also means that the parsing context needs to contain them, or there must exist other resolvers that can use what’s in the context to fill them in.
As you have seen before, the only way to provide ad-hoc information to connect is using the ident query, but in the ident itself you can only provide one attribute at a time.
Since version 2.2.0-beta11
the ident readers from connect (ident-reader
and open-ident-reader
) support adding extra
context to the query using parameters. Let’s say you want to load some customer data but you want to reduce the number
of resolvers called by providing some base information that you already have, you can issue a query like this:
[{([:customer/id 123] {:pathom/context {:customer/first-name "Foo" :customer/last-name "Bar"}})
[:customer/full-name]}]
Union Queries
In connect, unions have a default branching implementation that tries to find the union key in the current entity, when its found, that branch is taken.
For example, consider the following query:
[{:app/feed
{:app.post/id
[:app.post/id :app.post/text :app.post/author]
:app.video/id
[:app.video/id :app.video/stream-url :app.video/duration-ms]
:app.image/id
[:app.image/id :app.image/source-url :app.image/type :app.image/dimensions]}}]
Note that the key for each union is an attribute on itself, so when data like this comes:
[{:app/feed [{:app.post/id 1 :app.post/text "foo"}
{:app.video/id 2 :app.video/duration-ms 42143880}
{:app.image/id 3 :app.image/type :app.image.type/png}]}]
When deciding the branch, the presence of the key attribute on each entry is what decides the branch that will be taken.
Note that the attribute check will be tried in the order that the map gets scanned, recent versions of Clojure make it consistent with the order you wrote than in the map declaration.
So in case you have the chance of records hitting multiple attributes, put the ones with the highest priority at the top of the map.
Resolver with unions demo:
Source code for this demo:
(ns com.wsscode.pathom.book.connect.unions
(:require
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]))
(pc/defresolver feed [_ _]
{::pc/output
[{:app/feed
{:app.post/id
[:app.post/id :app.post/text]
:app.video/id
[:app.video/id :app.video/stream-url]
:app.image/id
[:app.image/id :app.image/source-url]}}]}
{:app/feed [{:app.post/id 1 :app.post/text "foo"}
{:app.video/id 2 :app.video/stream-url "http://my-site/video.mp4"}
{:app.image/id 3 :app.image/source-url "http://my-site/image.png"}]})
(def duration-db
{2 42143880})
(defn type-from-extension [^string source-url]
(let [ext (subs source-url (inc (.lastIndexOf source-url ".")))]
(keyword "app.image.type" ext)))
(def app-registry
[feed
(pc/single-attr-resolver :app.video/id :app.video/duration-ms duration-db)
(pc/single-attr-resolver :app.image/source-url :app.image/type type-from-extension)])
(def parser
(p/parallel-parser
{::p/env {::p/reader [p/map-reader
pc/parallel-reader
pc/open-ident-reader]}
::p/mutate pc/mutate-async
::p/plugins [(pc/connect-plugin {::pc/register app-registry})
p/error-handler-plugin
p/trace-plugin]}))
Resolver builders
There are some common resolver patterns that emerge from usage, Pathom connect provides helpers for such cases, the next sections describes the Connect core available helpers.
Alias resolvers
Sometimes you might want to make an alias, that is, create a resolver which just converts one name to another. For example:
(pc/defresolver alias-youtube-video [env {:user/keys [youtube-video-url]}]
{::pc/input #{:user/youtube-video-url}
::pc/output [:youtube.video/id]}
{:youtube.video/id youtube-video-url})
The previous resolver will convert :user/youtube-video-url
to :youtube.video/id
. To make
that easy, Pathom provides some helpers:
; this returns a resolver that works just like the previous resolver
(def alias-youtube-video (pc/alias-resolver :user/youtube-video-url :youtube.video/id))
If you want to create an alias that goes in both directions, use pc/alias-resolver2
.
Constant resolvers
This is a resolver that always returns a constant value for a given key. A common use case is use this to set some default.
; using helper
(def answer-to-everything
(pc/constantly-resolver :douglas.adams/answer-to-everything 42))
; is equivalente to:
(pc/defresolver answer-to-everything [_ _]
{::pc/output [:douglas.adams/answer-to-everything]}
{:douglas.adams/answer-to-everything 42})
Single attribute resolvers
For cases of a single transition from one attribute to another, you can use the
single-attr-resolver
helper:
; convertion fn
(defn fahrenheit->celcius [x]
(-> x (- 32) (* 5/9)))
; resolver with helper
(def f->c-resolver
(pc/single-attr-resolver :unit/fahrenheit :unit/celcius fahrenheit->celcius))
; is equivalent to:
(pc/defresolver answer-to-everything [_ {:keys [unit/fahrenheit]}]
{::pc/input #{:unit/fahrenheit}
::pc/output [:unit/celcius]}
{:unit/celcius (fahrenheit->celcius fahrenheit)})
Sometimes you also need to get some data from the environment, for those cases use
single-attr-resolver2
, the difference is that this one will send env
and the value
input as arguments to the provided function:
(defn single-with-env [env value]
(* value (::multiplier env))
(def env-demo-resolver
(pc/single-attr-resolver2 ::some-value ::other-value single-with-env))
; is equivalent to
(pc/defresolver answer-to-everything [env {::keys [some-value]}]
{::pc/input #{::some-value}
::pc/output [::other-value]}
{::other-value (single-with-env env some-value)})
Parameters
Parameters enable another dimension of information to be added to the request. Params have
different semantics from inputs: inputs are more a dependency
thing while params are
more like options. In practice, the main difference is that inputs are something Pathom
will try to look up and make available, while parameters must always be provided at
query time, there have no auto resolution.
Common cases to use parameters are: pagination, sorting, filtering…
Let’s write a resolver that outputs a sequence of instruments which can optionally be sorted via a sorting criteria specified via a parameter.
(pc/defresolver instruments-list [env _]
{::pc/output [{::instruments [:instrument/id :instrument/brand
:instrument/type :instrument/price]}]}
(let [{:keys [sort]} (-> env :ast :params)] ; (1)
{::instruments (cond->> instruments
(keyword? sort) (sort-by sort))}))
| 1 | Pulls the parameters from the environment |
Then we can run queries like:
[(::instruments {:sort :instrument/brand})]
[(::instruments {:sort :instrument/price})]
[(::instruments {:sort :instrument/type})]
; params with join
[{(::instruments {:sort :instrument/price})
[:instrument/id
:instrument/brand]}]
Try it out:
Note: If you are calling the parser directly, be sure to quote your query when using parameters like so:
(parser {} '[(::instruments {:sort :instrument/brand})])
; => {::instruments
({:instrument/id 4,
:instrument/brand "Cassio",
:instrument/type :instrument.type/piano,
:instrument/price 160}
{:instrument/id 1,
:instrument/brand "Fender",
:instrument/type :instrument.type/guitar,
:instrument/price 300}
...
N+1 Queries and Batch resolvers
When you have a to-many relation that is being resolved by a parser, you will typically end up with a single query that
finds the "IDs", and then N
more queries to fill in the details of each item in the sequence. This is known as the
N+1
problem, and can be a source of significant performance problems.
Instead of running a resolver once for each item on the list, the idea to solve this problem is to send all the inputs as a sequence, so the resolver can do some optimal implementation to handle multiple items. When this happens, we call it a batch resolver. For example, let’s take a look at the following demo:
(ns com.wsscode.pathom.book.connect.batch
(:require [com.wsscode.pathom.core :as p]
[com.wsscode.pathom.connect :as pc]
[cljs.core.async :as async :refer [go]]
[com.wsscode.pathom.profile :as pp]))
(pc/defresolver list-things [_ _]
{::pc/output [{:items [:number]}]}
{:items [{:number 3}
{:number 10}
{:number 18}]})
(pc/defresolver slow-resolver [_ {:keys [number]}]
{::pc/input #{:number}
::pc/output [:number-added]}
(go
(async/<! (async/timeout 1000))
{:number-added (inc number)}))
(def app-registry [list-things slow-resolver])
(def parser
(p/async-parser
{::p/env {::p/reader [p/map-reader
pc/async-reader2
pc/open-ident-reader]}
::p/mutate pc/mutate-async
::p/plugins [(pc/connect-plugin {::pc/register app-registry})
p/error-handler-plugin
p/trace-plugin]}))
Try the demo:
This demo is using Pathom async parsers. The resolvers in async parsers can return channels that (eventually)
resolve to the result, which is why you see go blocks in the code. See Async Parsing for more details.
We use them in this demo so we can "sleep" in a Javascript environment to mimic overhead in processing.
|
You can note by the tracer that it took one second for each entry, a clear cascade,
because it had to call the :number-added
resolver once for each item.
We can improve that by turning this into a batch resolver, like this:
(ns com.wsscode.pathom.book.connect.batch2
(:require [com.wsscode.pathom.core :as p]
[com.wsscode.pathom.connect :as pc]
[cljs.core.async :as async :refer [go]]))
(pc/defresolver list-things [_ _]
{::pc/output [{:items [:number]}]}
{:items [{:number 3}
{:number 10}
{:number 18}]})
(pc/defresolver slow-resolver [_ input]
{::pc/input #{:number}
::pc/output [:number-added]
::pc/batch? true}
(go
(async/<! (async/timeout 1000))
; the input will be sequential if a batch opportunity happens
(if (sequential? input)
; this will return a list of results, this order should match the input order, like this:
; [{:number-added 4}
; {:number-added 11}
; {:number-added 19}]
(mapv (fn [v] {:number-added (inc (:number v))}) input)
; the else case still handles the single input case
{:number-added (inc (:number input))})))
(def app-registry [list-things slow-resolver])
(def parser
(p/async-parser
{::p/env {::p/reader [p/map-reader
pc/async-reader2
pc/open-ident-reader]
::p/process-error (fn [env error]
(js/console.error "ERROR" error)
(p/error-str error))}
::p/mutate pc/mutate-async
::p/plugins [(pc/connect-plugin {::pc/register app-registry})
p/error-handler-plugin
p/trace-plugin]}))
Try the demo:
Note that this time the sleep of one second only happened once, this is because when Pathom is processing a list and the resolver supports batching, the resolver will get all the inputs in a single call, so your batch resolver can get all the items in a single iteration. The results will be cached back for each entry, this will make the other items hit the cache instead of calling the resolver again.
Batch transforms
Starting on version 2.2.0
Pathom add some helpers to facilitate the creation of batch resolvers using Pathom
transform facilities.
In the previous example we manually detected if input was a sequence, this API is made this way so the resolver keeps compatibility with the regular resolver API, but often it is easier if you get a consistent input (always a sequence for example). We can enforce this using a transform:
(pc/defresolver slow-resolver [_ input]
{::pc/input #{:number}
::pc/output [:number-added]
; use the transform, note we removed ::pc/batch? true, that's because the transform
; will add this for us
::pc/transform pc/transform-batch-resolver}
(go
(async/<! (async/timeout 1000))
; no need to detect sequence, it is always a sequence now
(mapv (fn [v] {:number-added (inc (:number v))}) input)))
Try the demo:
Another helper that Pathom provides is to transform a serial resolver that would run
one by one, into a batch that runs at concurrency n
.
(pc/defresolver slow-resolver [_ {:keys [number]}]
{::pc/input #{:number}
::pc/output [:number-added]
; set auto-batch with concurrency of 10
::pc/transform (pc/transform-auto-batch 10)}
(go
(async/<! (async/timeout 1000))
; dealing with the single case, as in the first example we did on batch
{:number-added (inc number)}))
Try the demo:
Note this time we did called resolver fn multiple times but in parallel, the way this may impact the performance will vary case by case, I suggest giving some thought on the best strategy for each case individually.
Aligning results
Often times when you do a batch request to some service/api the results won’t come in the same order of the request, also the count might not match in case some of the items on request were invalid. To facilitate the coding of these cases Pathom provides a helper to correctly sort the results back, for more info check the docs about batch-restore-sort on cljdoc.