Class ReferenceImage (v2.2.2)
A ReferenceImage
represents a product image and its associated metadata,
such as bounding boxes.
Generated from protobuf message google.cloud.vision.v1.ReferenceImage
Methods
__construct
Constructor.
| Name | Description |
| data |
array
Optional. Data for populating the Message object. |
| ↳ name |
string
The resource name of the reference image. Format is: |
| ↳ uri |
string
Required. The Google Cloud Storage URI of the reference image. The URI must start with |
| ↳ bounding_polys |
array<Google\Cloud\Vision\V1\BoundingPoly>
Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). |
getName
The resource name of the reference image.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID
.
This field is ignored when creating a reference image.
Generated from protobuf field string name = 1;
| Type | Description |
| string |
setName
The resource name of the reference image.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID
.
This field is ignored when creating a reference image.
Generated from protobuf field string name = 1;
| Name | Description |
| var |
string
|
| Type | Description |
| $this |
getUri
Required. The Google Cloud Storage URI of the reference image.
The URI must start with gs://
.
Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED];
| Type | Description |
| string |
setUri
Required. The Google Cloud Storage URI of the reference image.
The URI must start with gs://
.
Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED];
| Name | Description |
| var |
string
|
| Type | Description |
| $this |
getBoundingPolys
Optional. Bounding polygons around the areas of interest in the reference image.
If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).
Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
| Type | Description |
| Google\Protobuf\Internal\RepeatedField |
setBoundingPolys
Optional. Bounding polygons around the areas of interest in the reference image.
If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).
Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];
| Name | Description |
| var |
array<Google\Cloud\Vision\V1\BoundingPoly>
|
| Type | Description |
| $this |


Welcome to ROYAL Hotel
Royal Hotel Naran is one of the best Hotels located in the Heart of Naran. If you want royal treatment amidst spectacular mountains, water cascades and rivers, put up at the Royal Hotel, Naran. The lovely Royal Hotel, Naran is renowned for its personalized amenities which it offers to its guests. The edifice of the Royal Hotel, Naran is quite imposing and towers above the lodges in the vicinity. Royal Hotel, Naran amidst impressive mountains and in close proximity to the rushing Kunhar River and is truly mesmerizing. Royal Hotel offers 32 rooms comprising Deluxe, Family Suite & Suite Rooms


Upload or drag and drop an image that includes a face or faces, then click the "Analyze Image" button.
Using the Microsoft Azure Computer Vision API and Face API, CognoSeer takes event analytics to the next level. Every event planner knows how hard it is to find accurate statistics about how their event went and use that to inform future plans. How many people showed up? What demographics attended in higher numbers? How did people feel during the event? All this information and more can be used to evaluate the performance of an event and provide planners with much needed information about it.
Best of all, it's crowd-sourced. Instead of having to rely on their own limited set of photographs, planners can get images from participants. By using both their own images and those images from attendees, organizers get a vastly greater pool of data through Cognoseer.
Austin's a SoCal boy from Huntington Beach, CA but loving life in Massachusetts. Hit up Austin Hwang Photoography for photographs if you ever need any, he's a pro (I mean, just check out his and Victor's photos above!).
Manasi's from Fremont, CA but as much as the Bae Area beckons her, she loves exploring Cambridge and Boston in her free time. She enjoys long walks along the river and if you're ever looking for the best views, she'll probably be able to help you find them.
Victor's been doing robotics for years now and can't remember a time when he didn't yearn to create and build new things. Born and raised in North Hollywood, CA, he loves going to the beach and loves even more to have new friends join him.
Lin's a boba connoiseur from Berkeley, CA and don't you forget it. She loves running and going to the gym (and then stopping for donuts, because who doesn't love Krispy Kreme?).
Contact us and we'll get back to you within 24 hours.
Cambridge, MA
(714) 147 9012
info@cognoseer.org


Color Blocks
Let's count some blocks
Total Reds:
0
Total Yellows:
0
Total Greens:
0
Total Blues:
0
Red
Yellow
Green
Blue


“Instrumental to Wildfire's rise to success”
The guys at Bear Metal have been instrumental to Wildfire’s rise to success. Without exception we could trust them to do what’s best for the company’s bottom line with limited managerial oversight.
Hiring a development and operations team, especially one that’s distributed and overseas, is always unnerving. I have heard far more horror stories than I have successes when it comes to working with overseas contract developers. But in our case we hit the jackpot by finding these guys when we founded Wildfire. While they weren’t technically cofounders, there was never any question that they cared for Wildfire like it was their own child.
The Bear Metal team was 100% reliable, very talented and a true pleasure to work with. I wholeheartedly recommend them.
“The best thing that happened for the development of our product”
When we started Wildfire, it was important to us to work with a team of engineers that felt passionate about coding rather than simply being mercenaries. Finding Erkki, Tarmo, Jarkko and later Lourens was the best thing that happened for the development of our product. In addition to being incredibly passionate about their work, it’s hard to imagine a team that would have broader expertise in all things web apps, from technical details to scaling large systems to understanding customer needs.
They are in a true meaning of the word managers of one, so you could with 100% confidence be sure they get things done and keep systems running without need for micro-management. Not only that, they’re not shy about providing alternative solutions.
“Bear Metal was the ideal contractor to work with – smart, fast, and great communication.”
The ideal contractor to work with – smart, fast, and great communication. They picked up a Ruby job easily, didn’t require much overhead, and delivered a great library.


|
Panda3D
|
Public Member Functions | |
| def | __init__ (self, stream, needsVfsClose=False) |
| def | __repr__ (self) |
| def | close (self) |
| def | flush (self) |
| def | read (self, size=-1) |
| def | readable (self) |
| def | readline (self, size=-1) |
| def | seek (self, offset, whence=0) |
| def | tell (self) |
| def | writable (self) |
| def | write (self, b) |
| def | writelines (self, lines) |
Static Public Attributes | |
| def | read1 = read |
This is a file-like object that wraps around a C++ istream and/or ostream object. It only deals with binary data; to work with text I/O, create an io.TextIOWrapper object around this, or use the open() function that is also provided with this module.
| def __init__ | ( | self, | |
| stream, | |||
needsVfsClose = False |
|||
| ) |
| def __repr__ | ( | self | ) |
| def close | ( | self | ) |
| def flush | ( | self | ) |
| def read | ( | self, | |
size = -1 |
|||
| ) |
| def readable | ( | self | ) |
| def readline | ( | self, | |
size = -1 |
|||
| ) |
| def seek | ( | self, | |
| offset, | |||
whence = 0 |
|||
| ) |
| def tell | ( | self | ) |
| def writable | ( | self | ) |
| def write | ( | self, | |
| b | |||
| ) |
| def writelines | ( | self, | |
| lines | |||
| ) |
|
static |


Modern well documented core Fortran routines for cleaner, smarter code.
Find us on…
GitHub The Web
I do cool things in Fortran. (I think)


Visual Dialog is a novel task that requires an AI agent to hold a meaningful dialog with humans in natural, conversational language about visual content. Specifically, given an image, a dialog history, and a follow-up question about the image, the agent has to answer the question.
For more details about the task and models, please visit visualdialog.org


7. Deploy BlueBanquise¶
At this point, BlueBanquise configuration is done. We are ready to deploy the cluster.
First step is to deploy configuration on management1 node, and then deploy OS on the other systems. Last step will be to deploy configuration on the other systems.
7.1. Management configuration¶
7.1.1. Get managements playbook¶
We are going to use the provided default playbook. This playbook will install most of the core roles. Enough to deploy first stage of the cluster.
Copy example playbook managements to /etc/bluebanquise/playbooks/:
mkdir /etc/bluebanquise/playbooks/
cp -a /etc/bluebanquise/resources/examples/simple_cluster/playbooks/managements.yml /etc/bluebanquise/playbooks/
Then, we will ask Ansible to read this playbook, and execute all roles listed inside on management1 node (check hosts at top of the file).
To do so, we are going to use the ansible-playbook command.
7.1.2. Ansible-playbook¶
ansible-playbook is the command used to ask Ansible to execute a playbook.
We are going to use 2 parameters frequently:
<IP_ADDRESS>. Tags / Skip tags¶
As you can notice, some tags are set inside the playbook, or even in some roles for specific tasks. The idea of tags is simple: you can tag a role/task, and then when using ansible-playbook, only play related tags role/task. Or do the opposite: play all, and skip a role/task.
To so, use with Ansible playbook:
–tags with tags listed with comma separator: mytag1,mytag2,mytag3
–skip-tags with same pattern
Additional documentation about tags usage in playbooks is available here.
<IP_ADDRESS>. Extra vars¶
Extra vars allow to pass variables with maximum precedence at execution time, for any purpose (debug, test, or simply need).
To do so, use:
–extra-vars with ” ” and space separated variables: –extra-vars “myvar1=true myvar2=77 myvar3=hello”
7.1.3. Apply management1 configuration¶
Lets apply now the whole configuration on management1. It can take some time depending on your CPU and your hard drive.
We first ensure our NIC are up, so the repositories part is working.
ansible-playbook /etc/bluebanquise/playbooks/managements.yml --limit management1 --tags set_hostname,nic
Then start your main interface manually. Here enp0s3:
ifup enp0s3
Or on RHEL/CentOS 8:
nmcli con up enp0s3
Once interface is up (check using ip a command), setup the BlueBanquise controller:
ansible-playbook /etc/bluebanquise/playbooks/managements.yml --limit management1 --tags bluebanquise
This will install the requirements to run BlueBanquise (mostly python filters for Ansible).
Then play the whole playbook:
ansible-playbook /etc/bluebanquise/playbooks/managements.yml --limit management1
And wait…
If all goes well, you can check that all services are up and running:
systemctl status httpd
systemctl status atftpd
systemctl status dhcpd
systemctl status named
You can replay the same ansible-playbook command over and over, Ansible will just update/correct what is needed, and do nothing for all that is at an expected state.
Now that management1 is up and running, it is time to deploy the other nodes.
7.2. PXE¶
Next step is to deploy the other nodes using PXE process.
NOTE: it is assumed here you know how to have your other nodes / VM / servers / workstation to boot on LAN.
If your device cannot boot on LAN, use iso or usb image provided on management1 in /var/www/html/preboot_execution_environment/bin/[x86_64|arm64]. These images will start a LAN boot automatically.
In BlueBanquise, PXE process has been made so that any kind of hardware able to boot PXE, USB or CDrom can start deployment.
You can get more information and a detailed schema in the pxe_stack role section of this documentation. Simply explained, the PXE chain is the following (files are in /var/www/html/preboot_execution_environment):
DHCP request
|
IP obtained, next-server obtained
|
Load iPXE bluebanquise ROM
|
DHCP request again with new ROM
|
iPXE chain to convergence.ipxe (using http)
|
iPXE chain to nodes/myhostname.ipxe (get dedicated values)
|
iPXE chain to equipment_profiles/my_equipment_profile.ipxe (get group dedicated values)
|
iPXE chain to menu.ipxe
|
iPXE chain to task specified in myhostname.ipxe (deploy os, boot on disk, etc)
Whatever the boot source, and whatever Legacy BIOS or UEFI, all converge to http://${next-server}/preboot_execution_environment/convergence.ipxe. Then this file chain to node specific file in nodes (this file is generated using bootset command). The node specific file contains the default entry for the iPXE menu, then node chain to its equipment_profile file, to gather group values, and chain again to menu file. The menu file display a simple menu, and wait 10s for user before starting the default entry (which can be os deployment, or boot to disk, or boot diskless).
7.2.1. bootset¶
Before booting remote nodes in PXE, we need to ask management1 to activate remote nodes deployment. If not, remote nodes will boot on disk, even when booting over LAN.
To manipulate nodes PXE boot, a command, bootset, is available.
We are going to deploy login1 and c001, c002, c003 and c004.
Let’s use bootset to ask them to deploy OS at next PXE boot:
bootset -n login1,c[001-004] -b osdeploy
You can check the result using:
bootset -n login1,c[001-004] -s
Which should return:
[INFO] Loading /etc/bluebanquise/pxe/nodes_parameters.yml
[INFO] Loading /etc/bluebanquise/pxe/pxe_parameters.yml
Next boot deployment: c[001-004],login1
Note that this osdeploy state will be automatically updated once OS is deployed on remote nodes, and set to disk.
You can also force nodes that boot on PXE to boot on disk using -b disk instead of -b osdeploy.
Please refer to the pxe_stack role dedicated section in this documentation for more information on the bootset usage.
7.2.2. SSH public key¶
In order to log into the remote nodes without giving the password, check that the ssh public key defined in authentication.yml in your inventory match your management1 public key (the one generated in /root/.ssh/). If not, update the key in authentication.yml and remember to run the pxe_stack role (to update PXE related files that contains the ssh public key of the management node to be set on nodes during deployment).
ansible-playbook /etc/bluebanquise/playbooks/managements.yml --tags pxe_stack
7.2.3. OS deployment¶
Power on now the remote nodes, have them boot over LAN, and follow the installation procedure. It should take around 15-20 minutes depending on your hardware.
Once done, proceed to next part.
7.3. Apply other nodes configuration¶
Applying configuration on other nodes is simple.
Ensure first you can ssh passwordless on each of the freshly deployed nodes. If yes, copy example playbooks:
cp -a /etc/bluebanquise/resources/examples/simple_cluster/playbooks/computes.yml /etc/bluebanquise/playbooks/
cp -a /etc/bluebanquise/resources/examples/simple_cluster/playbooks/logins.yml /etc/bluebanquise/playbooks/
And execute them, using –limit parameter to specify targets them:
ansible-playbook /etc/bluebanquise/logins.yml
ansible-playbook /etc/bluebanquise/computes.yml --limit c001,c002,c003,c004
You can see that Ansible will work on computes nodes in parallel, using more CPU on the management1 node.
7.4. Diskless¶
An addon, diskless, allows to deploy diskless nodes. Please see the role related documentation to deploy diskless nodes.
Your cluster should now be fully deployed. It is time to use some addons to add specific features to the cluster (Please refer to each addon roles dedicated documentation to get instructions on how to use them), or continue this documentation to:
Enable and deploy multi icebergs configuration if cluster needs it.
Deploy a Prometheus based monitoring.
You will also find a “stories” section that describes step by step few recurrent situation you may face during the life of your cluster.
Thank your for following this training. We really hope you will enjoy our stack. Please report us any bad or good feedback.


public class InstitutionUtil
extends java.lang.Object
| Constructors and instructions |
|---|
InstitutionUtil() |
| qualifiers and types | Methods and instructions |
|---|---|
static int |
cmToLBCM(double cm)
Rounded CM-->LBCM
|
static double |
getPositionDoubleUP(double value,
int position) |
static float |
kgToLBKG(double kg)
round to one decimal place KG-->LBKG
|
static double |
kmToLBKM(double km,
int position)
round to one decimal place KM-->LBKM
|
static double |
kmToLBKM1(double km) |
static double |
kmToLBKM2(double km)
two decimal places KM-->LBKM
|
static int |
lbcmToCM(double lbcm)
Rounded LBCM-->CM
|
static float |
lbkgToKG(double lbkg)
round to one decimal place LBKG-->KG
|
static double |
LBkmTokm(double lbkm) |
public static double kmToLBKM(double km, int position)
km
- public static double LBkmTokm(double lbkm)
public static double kmToLBKM1(double km)
public static double kmToLBKM2(double km)
km
- public static float kgToLBKG(double kg)
kg
- public static float lbkgToKG(double lbkg)
lbkg
- public static int cmToLBCM(double cm)
cm
- public static int lbcmToCM(double lbcm)
lbcm
- public static double getPositionDoubleUP(double value, int position)
value
- position
- decimal places,4House5Into


Home
Contact
About
This is a site to
search
Github
for interesting project.

SearhPhrase:
checkbox:
Userstars?
LaguageChoice:
All
JS
C#
JAVA
Hide
This is where results live.


---
layout: post
title: 3/20 schoolwork
date: '2014-03-20T23:12:00.001-06:00'
author: April
tags:
- homeschool-journal
modified_time: '2014-03-20T23:12:04.916-06:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-4248370873377984982
blogger_orig_url: http://www.svlark.com/2014/03/320-schoolwork.html
---
Math:
- reviewed addition facts through 10
- splashmath
Read L:
- Bear's New Friend
- Rocky Mountain Railroad


--- title: "London 2019" description: "Learn Wardley maps at the third Map Camp in London, 15th October 2019" header: teaser: "assets/images/map-camp-london-2019-card.png" layout: splash classes: - landing - dark-theme ---
🎥 Watch presentations and video recordings on InfoQ
This is our third Map Camp in London and it is kindly sponsored by the Leading Leading Edge Forum, AWS, Rainmaker, InfoQ, Endava, Methods and Superstars. Map Camp is a community run event, it consists of a series of lectures from renowned speakers with a coffee and networking area to meet other mappers from across the globe. The original event in 2017 was planned to be 30 people, we ended up with 180 and over 150 on a waiting list. In 2018, we planned for 350 people, we ended up with 450 and over 260 on a waiting list. This year, we have an even bigger venue in the hope that we might be able to accommodate everyone.
Map Camp is a safe environment for all and we will do everything we can to make sure that it is. If you're planning on attending please read the code of conduct.
| 08:00 | Doors open | |
| 08:45 | Welcome introduction | Gen Ashley & Simon Wardley |
| 09:00 | Pivot! (Let’s talk about tech, climate and mapping) | Sal Freudenberg & Chris Adams | Slides |
| 09:30 | What's the best move? | Andrew Clay Shafer |
| 10:00 | Open source and Maps | Adrian Cockcroft |
| 10:30 | Building a company with maps | Rachel Murphy | Slides |
| 11:00 | Break | |
| 11:30 | Mapping skills and capability | Emily Webber | Slides |
| 12:00 | Mapping as a sensemaking practice within digital ecosystems | Roser Pujadas | Slides |
| 12:30 | Managing for Serendipity | Liz Keogh | Slides |
| 13:00 | Lunch | |
| 14:00 | Maps and the Environment | Anne Currie & Paul Johnston | Slides |
| The Government Track | ||
| 14:30 | How UK Policing is using maps and serverless | Simon Clifford |
| 14:45 | Using maps in Government | James Duncan | Slides |
| 15:00 | Maps and Smart Cities | Dr Jacqui Taylor |
| 15:15 | Maps and the UN | Mark Craddock | Slides |
| 15:30 | Panel discussion - The role of maps in Government | |
| 16:00 | Break | |
| The Private Sector Track | ||
| 16:30 | Maps and Venture Capital | Prasanna Krishnamoorthy | Slides |
| 16:45 | Maps and Financial Services | Andra Sonea |
| 17:00 | Maps and IoT | Yodit Stanton |
| 17:15 | Maps and Organisation | Ramon van Alteren | Slides |
| 17:30 | Panel discussion - The role of maps in the Private Sector | |
| 18:00 | Maps and Stories | Tal Klein | Slides |
| 18:30 | After hours discussion - an armchair chat with Dave Snowden & Simon Wardley | |
| 19:30 | Conference closes |
This year at Map Camp we have an additional teaching area with space for 64 people. This area will be mainly ad-hoc, some presentations, demonstrations and discussions on the practice of mapping. More details will follow.
| 10:00 | Maps and Security - open session | |
| 11:00 | Break | |
| 12:00 | Wemvula - presentation of a mapping tool | Slides | |
| 12:30 | Other types of maps - discussion | |
| 13:00 | Lunch | |
| 14:00 | Maps and Security - open session | |
| 15:00 | Maps and the environment - open session | |
| 16:00 | Break | |
| 16:30 | Beginning your mapping journey | Chris Daniel |
| 18:15 | Space closes |
A dedicated space has been provided as a quiet room, to escape the noise and bustle of the conference.
In another first for Map Camp (sponsorship, larger event, environmental efforts, quiet space, etc.) - do remember this is a community run event and we're learning each year - we also have some pre-event activities happening.
The LEF has a mapping workshop on the 14th October which promises to provide an unmissable opportunity to apply Wardley mapping to a real business challenge. It's a ticketed event, so register on the LEF website if you're interested.
We've also booked a floor at the Pearl and Feather for an evening before meetup on the 14th October from 6:30pm. Do respond to @swardley's tweet on this, so we just have an idea of the numbers, if you're planning to attend. We have no sponsors which means it's a buy your own food and drink evening. Everything we've raised is being spent on the main event.
We are delighted to have additional sponsors for Map Camp this year. Our film sponsor (who is looking after the recording of sessions and publication online) is InfoQ. We're also pleased to announce that Endava, Methods and Superstars have become silver sponsors. Rainmaker is sponsoring our diversity efforts. Amazon Web Services (AWS) are sponsoring our climate efforts and lastly and certainly not least, the Leading Edge Forum is underwriting and sponsoring the entire event.
We can't emphasise enough how important sponsors are for enabling us to hold the event. Thank you.
Map Camp is a community driven event organised by a collection of individuals. All funds raised through ticket sales will be spent on providing Map Camp with any deficit covered by the Leading Edge Forum.
To contact the organisers please send an email to<EMAIL_ADDRESS>or<EMAIL_ADDRESS>Join the Conversation #MapCamp & #WardleyMaps


This website allows to create and read text trees, which are texts organized in an inverted tree-like structure.
 The starting point of a text tree is its the root branch.
Text trees can be read in a continuous mode allowing to switch branch while reading or in a branch by branch mode much like an adventure game where you don't see in advance the next branches until you choose one.
A text tree can be written in collaboration where various people contribute their branches to a text tree. It is also possible to keep the tree editable by a single person.
Here are the steps to build your first tree:


com.innovaphone.avatar (App API)
This API is used for managing profile images. If not profile image has been set, a SVG with the name initials will be displayed. For this, the com.innovaphone.avatar library is used.
- To access the API
-
var avatar = new innovaphone.Avatar(start, user, domain);
- start
- The start object
- domain
- The user doing the request, to check the privacy settings
- domain
- The default domain, to be used if no domain is given in user
- To get an URL
avatar.url(sip, size, dn);
- sip
-
The sip from the user which profile picture is requested.
If it does not contain a domain (which means that just the username is provided), the domain provided in
the constructor is used.
- size
- The size of the picture in pixels (for example, 64).
- dn
- The display name of the user (optional). If set, it will be used to obtain the initals for the default picture. Otherwise the common name will be used. If the user has not been found, "..." will be displayed.
API model
Service info
- filename
- The filename part of the profile picture URI.
- token
- An arbitrary string used for authentication.
- domain
- The domain of the avatar provider.
"info":{
"filename":"picture",
"token":"fa37JncCHryDsbzayy4cBWDxS22JjzhMaiRrV41mtzxlYvKWrO72tK0LK0e1zLOZ",
"domain":"example.com"
}
Provider model
The API doesn't define a provider model.
API messages
All messages are JSON objects that have a mandatory attribute "mt" that specifies the message type.
Requests
The API doesn't define any request messages.
Responses
The API doesn't define any response messages.


Function to create reducer enhancers (higher order reducers) that allow to add pre- and post-processing, handling arrays of actions, filtering and transforming of actions and state.
extraAction
.filterAction
and skipFalsyAction
options).prepareAction
and transformAction
options).prereduce
and postreduce
options).reducerExtraArgs
option).onStepStart
and onStepEnd
options).npm install extraduce
Use dist/extraduce.umd.development.js
or dist/extraduce.umd.production.min.js
(minified version).
import * as extraduce from 'extraduce';
const extraduce = require('extraduce');
define(['path/to/dist/extraduce.umd.production.min.js'], function(extraduce) {
});
<script type="text/javascript" src="path/to/dist/extraduce.umd.production.min.js"></script>
<script type="text/javascript">
// extraduce is available via extraduce field of window object
</script>
const initState = {
value: 0
};
function reducer(state, action) {
const { payload } = action;
switch (action.type) {
case 'INC_VALUE':
return Object.assign({}, state, {value: state.value + payload});
case 'SET_VALUE':
return Object.assign({}, state, {value: payload});
default:
return state;
}
}
const processStep = extraduce.ProcessStep;
const enhancedReducer = extraduce.extraduce(
reducer,
{
prepareAction(action) {
if (typeof action === 'number') {
return {
type: 'SET_VALUE',
payload: action
}
}
if (action && typeof action.payload === 'string') {
action.payload = Number(action.payload);
}
return action;
},
filterAction(action) {
const type = action && action.type;
const payload = action && action.payload;
return type && typeof type === 'string'
&& typeof payload === 'number' && ! isNaN(payload)
&& (payload !== 0 || type === 'SET_VALUE');
},
onStepStart(step, context) {
if (step === processStep.prepareAction) {
console.log('Action to be prepared -', context.action, '; current state -', context.state);
}
},
onStepEnd(step, context) {
if (step === processStep.reduce) {
console.log('Processed action -', context.action, '; current state -', context.state);
}
else if (step === processStep.process) {
console.log('Final state -', context.state);
}
}
}
);
const store = Redux.createStore(enhancedReducer, initState);
store.dispatch(extraduce.extraAction(
3,
{
type: 'INC_VALUE',
payload: 5
},
0,
{
type: 'INC_VALUE',
payload: 0
},
{
type: 'INC_VALUE',
payload: '-4'
},
false,
{
type: 'SET_VALUE',
payload: null
},
{
payload: 8
}
));
console.log('state:', store.getState()); // state: { value: -4 }
See additional examples in tests.
Wraps passed reducer to add pre- and post-processing.
Arguments:
sourceReducer: Function
- Source reducer that should be wrapped.settings: object
- Optional settings to customize wrapping operation and features of created reducer.settings.data: any
(optional) - Any supplementary data that should be available in processing.settings.filterAction: Function
(optional) - Function that should be called to test whether current action is valid and should be passed for reducing.settings.historySize: number
(optional) - Size of list of fulfilled operations (processed actions). 0
by default.settings.onStepEnd: Function
(optional) - Function that should be called at the end of each processing step.settings.onStepStart: Function
(optional) - Function that should be called at the start of each processing step.settings.postreduce: Function
(optional) - Function that should be called after source (wrapped) reducer.settings.postreduceValueIsState: boolean
(optional) - Whether result of postreduce
function should be used as new state in further processing.settings.prepareAction: Function
(optional) - Function that should be called to prepare current action for further processing before filtering.settings.prereduce: Function
(optional) - Function that should be called before source (wrapped) reducer.settings.prereduceValueIsState: boolean
(optional) - Whether result of prereduce
function should be used as new state in further processing.settings.processActionArray: boolean
(optional) - Whether an array that is passed as action should be treated as list of actions that should be processed separately. true
by default.settings.reducerExtraArgs: any | any[]
(optional) - Supplementary arguments that should be passed into source (wrapped) reducer besides state and action. Or a function that returns such arguments.settings.skipFalsyAction: boolean
(optional) - Whether processing of an action that has a falsy value should be skipped. true
by default.settings.transformAction: Function
(optional) - Function that should be called to transform current valid action after filtering.Returns new created reducer that can be used instead of source reducer.
Returns type of action that is used to wrap several actions to be processed.
Changes type of action that is used to wrap several actions to be processed.
Creates action that is used to wrap several actions to be processed.
Checks whether passed value represents an action that wraps several actions to be processed.
See docs
for details.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Copyright (c) 2020 Denis Sikuler
Licensed under the MIT license.
Generated using TypeDoc


This privacy policy governs your use of the software application Pandoras (“Application”) for mobile devices that was created by Idehub. The Application is a game which lets you play truth-or-dare with your friends. This is done by showing cards with questions or dares. Basic functionality includes being able to set contestants, switching play modes and dare levels.
The Application does not obtain user information through registration.
In addition, the Application may collect certain information automatically, including, but not limited to, the type of mobile device you use, your mobile devices unique device ID, the IP address of your mobile device, your mobile operating system, the type of mobile Internet browsers you use, and information about the way you use the Application.
This Application does not collect precise information about the location of your mobile device.
Only aggregated, anonymized data is periodically transmitted to external services to help us improve the Application and our service. We will share your information with third parties only in the ways that are described in this privacy statement. We may disclose User Provided and Automatically Collected Information:
You can stop all collection of information by the Application easily by uninstalling the Application. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.
We will retain User Provided data for as long as you use the Application and for a reasonable time thereafter. We will retain Automatically Collected information for up to 24 months and thereafter may store it in aggregate. If you’d like us to delete User Provided Data that you have provided via the Application, please contact us at<EMAIL_ADDRESS>and we will respond in a reasonable time. Please note that some or all of the User Provided Data may be required in order for the Application to function properly.
We do not use the Application to knowingly solicit data from or market to children under the age of 13. If a parent or guardian becomes aware that his or her child has provided us with information without their consent, he or she should contact us at<EMAIL_ADDRESS>We will delete such information from our files within a reasonable time.
We are concerned about safeguarding the confidentiality of your information. We provide physical, electronic, and procedural safeguards to protect information we process and maintain. For example, we limit access to this information to authorized employees and contractors who need to know that information in order to operate, develop or improve our Application. Please be aware that, although we endeavor provide reasonable security for information we process and maintain, no security system can prevent all potential security breaches.
This Privacy Policy may be updated from time to time for any reason. We will notify you of any changes to our Privacy Policy by posting the new Privacy Policy here. You are advised to consult this Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.
By using the Application, you are consenting to our processing of your information as set forth in this Privacy Policy now and as amended by us. "Processing,” means using cookies on a computer/hand held device or using or touching information in any way, including, but not limited to, collecting, storing, deleting, using, combining and disclosing information, all of which activities will take place in the United States. If you reside outside the United States your information will be transferred, processed and stored there under United States privacy standards.
If you have any questions regarding privacy while using the Application, or have questions about our practices, please contact us via email at contact@idehub.no.


# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
"""
This module contains a CloudDLPHook
which allows you to connect to GCP Cloud DLP service.
"""
import re
import time
from google.cloud.dlp_v2 import DlpServiceClient
from google.cloud.dlp_v2.types import DlpJob
from airflow import AirflowException
from airflow.contrib.hooks.gcp_api_base_hook import GoogleCloudBaseHook
[docs]DLP_JOB_PATH_PATTERN = '^projects/[^/]+/dlpJobs/(?P<job>.*?)$'
# Time to sleep between active checks of the operation results
[docs]TIME_TO_SLEEP_IN_SECONDS = 1
# pylint: disable=R0904, C0302
[docs]class CloudDLPHook(GoogleCloudBaseHook):
"""
Hook for Google Cloud Data Loss Prevention (DLP) APIs.
Cloud DLP allows clients to detect the presence of Personally Identifiable
Information (PII) and other privacy-sensitive data in user-supplied,
unstructured data streams, like text blocks or images. The service also
includes methods for sensitive data redaction and scheduling of data scans
on Google Cloud Platform based data sets.
:param gcp_conn_id: The connection ID to use when fetching connection info.
:type gcp_conn_id: str
:param delegate_to: The account to impersonate, if any.
For this to work, the service account making the request must have
domain-wide delegation enabled.
:type delegate_to: str
"""
def __init__(self,
gcp_conn_id="google_cloud_default",
delegate_to=None):
super(CloudDLPHook, self).__init__(gcp_conn_id, delegate_to)
self._client = None
[docs] def get_conn(self):
"""
Provides a client for interacting with the Cloud DLP API.
:return: GCP Cloud DLP API Client
:rtype: google.cloud.dlp_v2.DlpServiceClient
"""
if not self._client:
self._client = DlpServiceClient(credentials=self._get_credentials())
return self._client
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def cancel_dlp_job(
self, dlp_job_id, project_id=None, retry=None, timeout=None, metadata=None
):
"""
Starts asynchronous cancellation on a long-running DLP job.
:param dlp_job_id: ID of the DLP job resource to be cancelled.
:type dlp_job_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default project_id
from the GCP connection is used.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
"""
client = self.get_conn()
if not dlp_job_id:
raise AirflowException(
"Please provide the ID of the DLP job resource to be cancelled."
)
name = DlpServiceClient.dlp_job_path(project_id, dlp_job_id)
client.cancel_dlp_job(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def create_deidentify_template(
self,
organization_id=None,
project_id=None,
deidentify_template=None,
template_id=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Creates a deidentify template for re-using frequently used configuration for
de-identifying content, images, and storage.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param deidentify_template: (Optional) The deidentify template to create.
:type deidentify_template: dict or google.cloud.dlp_v2.types.DeidentifyTemplate
:param template_id: (Optional) The template ID.
:type template_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.DeidentifyTemplate
"""
client = self.get_conn()
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
parent = DlpServiceClient.organization_path(organization_id)
elif project_id:
parent = DlpServiceClient.project_path(project_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.create_deidentify_template(
parent=parent,
deidentify_template=deidentify_template,
template_id=template_id,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def create_dlp_job(
self,
project_id=None,
inspect_job=None,
risk_job=None,
job_id=None,
retry=None,
timeout=None,
metadata=None,
wait_until_finished=True
):
"""
Creates a new job to inspect storage or calculate risk metrics.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param inspect_job: (Optional) The configuration for the inspect job.
:type inspect_job: dict or google.cloud.dlp_v2.types.InspectJobConfig
:param risk_job: (Optional) The configuration for the risk job.
:type risk_job: dict or google.cloud.dlp_v2.types.RiskAnalysisJobConfig
:param job_id: (Optional) The job ID.
:type job_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:param wait_until_finished: (Optional) If true, it will keep polling the job state
until it is set to DONE.
:type wait_until_finished: bool
:rtype: google.cloud.dlp_v2.types.DlpJob
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
job = client.create_dlp_job(
parent=parent,
inspect_job=inspect_job,
risk_job=risk_job,
job_id=job_id,
retry=retry,
timeout=timeout,
metadata=metadata,
)
if wait_until_finished:
pattern = re.compile(DLP_JOB_PATH_PATTERN, re.IGNORECASE)
match = pattern.match(job.name)
job_name = match.groupdict()['job']
while wait_until_finished:
job = self.get_dlp_job(
dlp_job_id=job_name,
project_id=project_id)
self.log.info(
'DLP job {} state: {}.'.format(
job.name,
DlpJob.JobState.Name(job.state)
)
)
if job.state == DlpJob.JobState.DONE:
return job
elif job.state in [DlpJob.JobState.PENDING,
DlpJob.JobState.RUNNING,
DlpJob.JobState.JOB_STATE_UNSPECIFIED]:
time.sleep(TIME_TO_SLEEP_IN_SECONDS)
else:
raise AirflowException(
'Stopped polling DLP job state. DLP job {} state: {}.'
.format(
job.name,
DlpJob.JobState.Name(job.state)
)
)
return job
@GoogleCloudBaseHook.catch_http_exception
[docs] def create_inspect_template(
self,
organization_id=None,
project_id=None,
inspect_template=None,
template_id=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Creates an inspect template for re-using frequently used configuration for
inspecting content, images, and storage.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param inspect_template: (Optional) The inspect template to create.
:type inspect_template: dict or google.cloud.dlp_v2.types.InspectTemplate
:param template_id: (Optional) The template ID.
:type template_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.InspectTemplate
"""
client = self.get_conn()
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
parent = DlpServiceClient.organization_path(organization_id)
elif project_id:
parent = DlpServiceClient.project_path(project_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.create_inspect_template(
parent=parent,
inspect_template=inspect_template,
template_id=template_id,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def create_job_trigger(
self,
project_id=None,
job_trigger=None,
trigger_id=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Creates a job trigger to run DLP actions such as scanning storage for sensitive
information on a set schedule.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param job_trigger: (Optional) The job trigger to create.
:type job_trigger: dict or google.cloud.dlp_v2.types.JobTrigger
:param trigger_id: (Optional) The job trigger ID.
:type trigger_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.JobTrigger
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
return client.create_job_trigger(
parent=parent,
job_trigger=job_trigger,
trigger_id=trigger_id,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def create_stored_info_type(
self,
organization_id=None,
project_id=None,
config=None,
stored_info_type_id=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Creates a pre-built stored info type to be used for inspection.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param config: (Optional) The config for the stored info type.
:type config: dict or google.cloud.dlp_v2.types.StoredInfoTypeConfig
:param stored_info_type_id: (Optional) The stored info type ID.
:type stored_info_type_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.StoredInfoType
"""
client = self.get_conn()
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
parent = DlpServiceClient.organization_path(organization_id)
elif project_id:
parent = DlpServiceClient.project_path(project_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.create_stored_info_type(
parent=parent,
config=config,
stored_info_type_id=stored_info_type_id,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def deidentify_content(
self,
project_id=None,
deidentify_config=None,
inspect_config=None,
item=None,
inspect_template_name=None,
deidentify_template_name=None,
retry=None,
timeout=None,
metadata=None,
):
"""
De-identifies potentially sensitive info from a content item. This method has limits
on input size and output size.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param deidentify_config: (Optional) Configuration for the de-identification of the
content item. Items specified here will override the template referenced by the
deidentify_template_name argument.
:type deidentify_config: dict or google.cloud.dlp_v2.types.DeidentifyConfig
:param inspect_config: (Optional) Configuration for the inspector. Items specified
here will override the template referenced by the inspect_template_name argument.
:type inspect_config: dict or google.cloud.dlp_v2.types.InspectConfig
:param item: (Optional) The item to de-identify. Will be treated as text.
:type item: dict or google.cloud.dlp_v2.types.ContentItem
:param inspect_template_name: (Optional) Optional template to use. Any configuration
directly specified in inspect_config will override those set in the template.
:type inspect_template_name: str
:param deidentify_template_name: (Optional) Optional template to use. Any
configuration directly specified in deidentify_config will override those set
in the template.
:type deidentify_template_name: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.DeidentifyContentResponse
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
return client.deidentify_content(
parent=parent,
deidentify_config=deidentify_config,
inspect_config=inspect_config,
item=item,
inspect_template_name=inspect_template_name,
deidentify_template_name=deidentify_template_name,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def delete_deidentify_template(
self,
template_id,
organization_id=None,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Deletes a deidentify template.
:param template_id: The ID of deidentify template to be deleted.
:type template_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
"""
client = self.get_conn()
if not template_id:
raise AirflowException(
"Please provide the ID of deidentify template to be deleted."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_deidentify_template_path(organization_id, template_id)
elif project_id:
name = DlpServiceClient.project_deidentify_template_path(project_id, template_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
client.delete_deidentify_template(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def delete_dlp_job(
self, dlp_job_id, project_id=None, retry=None, timeout=None, metadata=None
):
"""
Deletes a long-running DLP job. This method indicates that the client is no longer
interested in the DLP job result. The job will be cancelled if possible.
:param dlp_job_id: The ID of the DLP job resource to be cancelled.
:type dlp_job_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
"""
client = self.get_conn()
if not dlp_job_id:
raise AirflowException(
"Please provide the ID of the DLP job resource to be cancelled."
)
name = DlpServiceClient.dlp_job_path(project_id, dlp_job_id)
client.delete_dlp_job(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def delete_inspect_template(
self,
template_id,
organization_id=None,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Deletes an inspect template.
:param template_id: The ID of the inspect template to be deleted.
:type template_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
"""
client = self.get_conn()
if not template_id:
raise AirflowException(
"Please provide the ID of the inspect template to be deleted."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_inspect_template_path(organization_id, template_id)
elif project_id:
name = DlpServiceClient.project_inspect_template_path(project_id, template_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
client.delete_inspect_template(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def delete_job_trigger(
self,
job_trigger_id,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Deletes a job trigger.
:param job_trigger_id: The ID of the DLP job trigger to be deleted.
:type job_trigger_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
"""
client = self.get_conn()
if not job_trigger_id:
raise AirflowException(
"Please provide the ID of the DLP job trigger to be deleted."
)
name = DlpServiceClient.project_job_trigger_path(project_id, job_trigger_id)
client.delete_job_trigger(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def delete_stored_info_type(
self,
stored_info_type_id,
organization_id=None,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Deletes a stored info type.
:param stored_info_type_id: The ID of the stored info type to be deleted.
:type stored_info_type_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
"""
client = self.get_conn()
if not stored_info_type_id:
raise AirflowException(
"Please provide the ID of the stored info type to be deleted."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_stored_info_type_path(
organization_id, stored_info_type_id
)
elif project_id:
name = DlpServiceClient.project_stored_info_type_path(
project_id,
stored_info_type_id
)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
client.delete_stored_info_type(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def get_deidentify_template(
self,
template_id,
organization_id=None,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Gets a deidentify template.
:param template_id: The ID of deidentify template to be read.
:type template_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.DeidentifyTemplate
"""
client = self.get_conn()
if not template_id:
raise AirflowException(
"Please provide the ID of the deidentify template to be read."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_deidentify_template_path(organization_id, template_id)
elif project_id:
name = DlpServiceClient.project_deidentify_template_path(project_id, template_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.get_deidentify_template(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def get_dlp_job(
self,
dlp_job_id,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Gets the latest state of a long-running Dlp Job.
:param dlp_job_id: The ID of the DLP job resource to be read.
:type dlp_job_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.DlpJob
"""
client = self.get_conn()
if not dlp_job_id:
raise AirflowException(
"Please provide the ID of the DLP job resource to be read."
)
name = DlpServiceClient.dlp_job_path(project_id, dlp_job_id)
return client.get_dlp_job(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def get_inspect_template(
self,
template_id,
organization_id=None,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Gets an inspect template.
:param template_id: The ID of inspect template to be read.
:type template_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.InspectTemplate
"""
client = self.get_conn()
if not template_id:
raise AirflowException(
"Please provide the ID of the inspect template to be read."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_inspect_template_path(organization_id, template_id)
elif project_id:
name = DlpServiceClient.project_inspect_template_path(project_id, template_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.get_inspect_template(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def get_job_trigger(
self,
job_trigger_id,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Gets a DLP job trigger.
:param job_trigger_id: The ID of the DLP job trigger to be read.
:type job_trigger_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.JobTrigger
"""
client = self.get_conn()
if not job_trigger_id:
raise AirflowException(
"Please provide the ID of the DLP job trigger to be read."
)
name = DlpServiceClient.project_job_trigger_path(project_id, job_trigger_id)
return client.get_job_trigger(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def get_stored_info_type(
self,
stored_info_type_id,
organization_id=None,
project_id=None,
retry=None,
timeout=None,
metadata=None
):
"""
Gets a stored info type.
:param stored_info_type_id: The ID of the stored info type to be read.
:type stored_info_type_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.StoredInfoType
"""
client = self.get_conn()
if not stored_info_type_id:
raise AirflowException(
"Please provide the ID of the stored info type to be read."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_stored_info_type_path(
organization_id, stored_info_type_id
)
elif project_id:
name = DlpServiceClient.project_stored_info_type_path(
project_id,
stored_info_type_id
)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.get_stored_info_type(
name=name, retry=retry, timeout=timeout, metadata=metadata
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def inspect_content(
self,
project_id=None,
inspect_config=None,
item=None,
inspect_template_name=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Finds potentially sensitive info in content. This method has limits on input size,
processing time, and output size.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param inspect_config: (Optional) Configuration for the inspector. Items specified
here will override the template referenced by the inspect_template_name argument.
:type inspect_config: dict or google.cloud.dlp_v2.types.InspectConfig
:param item: (Optional) The item to de-identify. Will be treated as text.
:type item: dict or google.cloud.dlp_v2.types.ContentItem
:param inspect_template_name: (Optional) Optional template to use. Any configuration
directly specified in inspect_config will override those set in the template.
:type inspect_template_name: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.InspectContentResponse
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
return client.inspect_content(
parent=parent,
inspect_config=inspect_config,
item=item,
inspect_template_name=inspect_template_name,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def list_deidentify_templates(
self,
organization_id=None,
project_id=None,
page_size=None,
order_by=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Lists deidentify templates.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:type page_size: int
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:type order_by: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: list[google.cloud.dlp_v2.types.DeidentifyTemplate]
"""
client = self.get_conn()
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
parent = DlpServiceClient.organization_path(organization_id)
elif project_id:
parent = DlpServiceClient.project_path(project_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
results = client.list_deidentify_templates(
parent=parent,
page_size=page_size,
order_by=order_by,
retry=retry,
timeout=timeout,
metadata=metadata,
)
return list(results)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def list_dlp_jobs(
self,
project_id=None,
results_filter=None,
page_size=None,
job_type=None,
order_by=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Lists DLP jobs that match the specified filter in the request.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param results_filter: (Optional) Filter used to specify a subset of results.
:type results_filter: str
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:type page_size: int
:param job_type: (Optional) The type of job.
:type job_type: str
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:type order_by: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: list[google.cloud.dlp_v2.types.DlpJob]
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
results = client.list_dlp_jobs(
parent=parent,
filter_=results_filter,
page_size=page_size,
type_=job_type,
order_by=order_by,
retry=retry,
timeout=timeout,
metadata=metadata,
)
return list(results)
@GoogleCloudBaseHook.catch_http_exception
[docs] def list_info_types(
self,
language_code=None,
results_filter=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Returns a list of the sensitive information types that the DLP API supports.
:param language_code: (Optional) Optional BCP-47 language code for localized info
type friendly names. If omitted, or if localized strings are not available,
en-US strings will be returned.
:type language_code: str
:param results_filter: (Optional) Filter used to specify a subset of results.
:type results_filter: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.ListInfoTypesResponse
"""
client = self.get_conn()
return client.list_info_types(
language_code=language_code,
filter_=results_filter,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def list_inspect_templates(
self,
organization_id=None,
project_id=None,
page_size=None,
order_by=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Lists inspect templates.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:type page_size: int
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:type order_by: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: list[google.cloud.dlp_v2.types.InspectTemplate]
"""
client = self.get_conn()
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
parent = DlpServiceClient.organization_path(organization_id)
elif project_id:
parent = DlpServiceClient.project_path(project_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
results = client.list_inspect_templates(
parent=parent,
page_size=page_size,
order_by=order_by,
retry=retry,
timeout=timeout,
metadata=metadata,
)
return list(results)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def list_job_triggers(
self,
project_id=None,
page_size=None,
order_by=None,
results_filter=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Lists job triggers.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:type page_size: int
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:type order_by: str
:param results_filter: (Optional) Filter used to specify a subset of results.
:type results_filter: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: list[google.cloud.dlp_v2.types.JobTrigger]
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
results = client.list_job_triggers(
parent=parent,
page_size=page_size,
order_by=order_by,
filter_=results_filter,
retry=retry,
timeout=timeout,
metadata=metadata,
)
return list(results)
@GoogleCloudBaseHook.catch_http_exception
[docs] def list_stored_info_types(
self,
organization_id=None,
project_id=None,
page_size=None,
order_by=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Lists stored info types.
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param page_size: (Optional) The maximum number of resources contained in the
underlying API response.
:type page_size: int
:param order_by: (Optional) Optional comma separated list of fields to order by,
followed by asc or desc postfix.
:type order_by: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: list[google.cloud.dlp_v2.types.StoredInfoType]
"""
client = self.get_conn()
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
parent = DlpServiceClient.organization_path(organization_id)
elif project_id:
parent = DlpServiceClient.project_path(project_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
results = client.list_stored_info_types(
parent=parent,
page_size=page_size,
order_by=order_by,
retry=retry,
timeout=timeout,
metadata=metadata,
)
return list(results)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def redact_image(
self,
project_id=None,
inspect_config=None,
image_redaction_configs=None,
include_findings=None,
byte_item=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Redacts potentially sensitive info from an image. This method has limits on
input size, processing time, and output size.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param inspect_config: (Optional) Configuration for the inspector. Items specified
here will override the template referenced by the inspect_template_name argument.
:type inspect_config: dict or google.cloud.dlp_v2.types.InspectConfig
:param image_redaction_configs: (Optional) The configuration for specifying what
content to redact from images.
:type image_redaction_configs: list[dict] or list[google.cloud.dlp_v2.types.ImageRedactionConfig]
:param include_findings: (Optional) Whether the response should include findings
along with the redacted image.
:type include_findings: bool
:param byte_item: (Optional) The content must be PNG, JPEG, SVG or BMP.
:type byte_item: dict or google.cloud.dlp_v2.types.ByteContentItem
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.RedactImageResponse
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
return client.redact_image(
parent=parent,
inspect_config=inspect_config,
image_redaction_configs=image_redaction_configs,
include_findings=include_findings,
byte_item=byte_item,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def reidentify_content(
self,
project_id=None,
reidentify_config=None,
inspect_config=None,
item=None,
inspect_template_name=None,
reidentify_template_name=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Re-identifies content that has been de-identified.
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param reidentify_config: (Optional) Configuration for the re-identification of
the content item.
:type reidentify_config: dict or google.cloud.dlp_v2.types.DeidentifyConfig
:param inspect_config: (Optional) Configuration for the inspector.
:type inspect_config: dict or google.cloud.dlp_v2.types.InspectConfig
:param item: (Optional) The item to re-identify. Will be treated as text.
:type item: dict or google.cloud.dlp_v2.types.ContentItem
:param inspect_template_name: (Optional) Optional template to use. Any configuration
directly specified in inspect_config will override those set in the template.
:type inspect_template_name: str
:param reidentify_template_name: (Optional) Optional template to use. References an
instance of deidentify template. Any configuration directly specified in
reidentify_config or inspect_config will override those set in the template.
:type reidentify_template_name: str
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.ReidentifyContentResponse
"""
client = self.get_conn()
parent = DlpServiceClient.project_path(project_id)
return client.reidentify_content(
parent=parent,
reidentify_config=reidentify_config,
inspect_config=inspect_config,
item=item,
inspect_template_name=inspect_template_name,
reidentify_template_name=reidentify_template_name,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def update_deidentify_template(
self,
template_id,
organization_id=None,
project_id=None,
deidentify_template=None,
update_mask=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Updates the deidentify template.
:param template_id: The ID of deidentify template to be updated.
:type template_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param deidentify_template: New deidentify template value.
:type deidentify_template: dict or google.cloud.dlp_v2.types.DeidentifyTemplate
:param update_mask: Mask to control which fields get updated.
:type update_mask: dict or google.cloud.dlp_v2.types.FieldMask
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.DeidentifyTemplate
"""
client = self.get_conn()
if not template_id:
raise AirflowException(
"Please provide the ID of deidentify template to be updated."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_deidentify_template_path(organization_id, template_id)
elif project_id:
name = DlpServiceClient.project_deidentify_template_path(project_id, template_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.update_deidentify_template(
name=name,
deidentify_template=deidentify_template,
update_mask=update_mask,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def update_inspect_template(
self,
template_id,
organization_id=None,
project_id=None,
inspect_template=None,
update_mask=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Updates the inspect template.
:param template_id: The ID of the inspect template to be updated.
:type template_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param inspect_template: New inspect template value.
:type inspect_template: dict or google.cloud.dlp_v2.types.InspectTemplate
:param update_mask: Mask to control which fields get updated.
:type update_mask: dict or google.cloud.dlp_v2.types.FieldMask
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.InspectTemplate
"""
client = self.get_conn()
if not template_id:
raise AirflowException(
"Please provide the ID of the inspect template to be updated."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_inspect_template_path(organization_id, template_id)
elif project_id:
name = DlpServiceClient.project_inspect_template_path(project_id, template_id)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.update_inspect_template(
name=name,
inspect_template=inspect_template,
update_mask=update_mask,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
@GoogleCloudBaseHook.fallback_to_default_project_id
[docs] def update_job_trigger(
self,
job_trigger_id,
project_id=None,
job_trigger=None,
update_mask=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Updates a job trigger.
:param job_trigger_id: The ID of the DLP job trigger to be updated.
:type job_trigger_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. If set to None or missing, the default
project_id from the GCP connection is used.
:type project_id: str
:param job_trigger: New job trigger value.
:type job_trigger: dict or google.cloud.dlp_v2.types.JobTrigger
:param update_mask: Mask to control which fields get updated.
:type update_mask: dict or google.cloud.dlp_v2.types.FieldMask
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.JobTrigger
"""
client = self.get_conn()
if not job_trigger_id:
raise AirflowException(
"Please provide the ID of the DLP job trigger to be updated."
)
name = DlpServiceClient.project_job_trigger_path(project_id, job_trigger_id)
return client.update_job_trigger(
name=name,
job_trigger=job_trigger,
update_mask=update_mask,
retry=retry,
timeout=timeout,
metadata=metadata,
)
@GoogleCloudBaseHook.catch_http_exception
[docs] def update_stored_info_type(
self,
stored_info_type_id,
organization_id=None,
project_id=None,
config=None,
update_mask=None,
retry=None,
timeout=None,
metadata=None,
):
"""
Updates the stored info type by creating a new version.
:param stored_info_type_id: The ID of the stored info type to be updated.
:type stored_info_type_id: str
:param organization_id: (Optional) The organization ID. Required to set this
field if parent resource is an organzation.
:type organization_id: str
:param project_id: (Optional) Google Cloud Platform project ID where the
DLP Instance exists. Only set this field if the parent resource is
a project instead of an organzation.
:type project_id: str
:param config: Updated configuration for the stored info type. If not provided, a new
version of the stored info type will be created with the existing configuration.
:type config: dict or google.cloud.dlp_v2.types.StoredInfoTypeConfig
:param update_mask: Mask to control which fields get updated.
:type update_mask: dict or google.cloud.dlp_v2.types.FieldMask
:param retry: (Optional) A retry object used to retry requests.
If None is specified, requests will not be retried.
:type retry: google.api_core.retry.Retry
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
to complete. Note that if retry is specified, the timeout applies to each
individual attempt.
:type timeout: float
:param metadata: (Optional) Additional metadata that is provided to the method.
:type metadata: sequence[tuple[str, str]]]
:rtype: google.cloud.dlp_v2.types.StoredInfoType
"""
client = self.get_conn()
if not stored_info_type_id:
raise AirflowException(
"Please provide the ID of the stored info type to be updated."
)
# Handle project_id from connection configuration
project_id = project_id or self.project_id
if organization_id:
name = DlpServiceClient.organization_stored_info_type_path(
organization_id, stored_info_type_id
)
elif project_id:
name = DlpServiceClient.project_stored_info_type_path(
project_id,
stored_info_type_id
)
else:
raise AirflowException(
"Please provide either organization_id or project_id."
)
return client.update_stored_info_type(
name=name,
config=config,
update_mask=update_mask,
retry=retry,
timeout=timeout,
metadata=metadata,
)


HKLM:\SECURITY\Cache:
John
Hashcat
XP / Win2003 hash type: mscach
Vista+ hash type: mscash2
Cannot perform Pass the Hash with these


To set a Risk Management model, in the Initialize
method, call the AddRiskManagement
method.
self.AddRiskManagement(NullRiskManagementModel())
AddRiskManagement(new NullRiskManagementModel());
To view all the pre-built Risk Management models, see Supported Models.


smootH-ftb.Rd
In order to eliminate outliers in the time series, Hamunyela et al. (2013) smoothing is used (see References).
smootH(x, interp = "na.interp", CLUSTER = NULL, ...) # S3 method for numeric smootH(x, interp = "na.interp", ...) # S3 method for matrix smootH(x, interp = "na.interp", CLUSTER = NULL, ...) # S3 method for RasterStack smootH(x, interp = "na.interp", CLUSTER = NULL, ...) # S3 method for RasterBrick smootH(x, interp = "na.interp", CLUSTER = NULL, ...) # S3 method for stars smootH(x, interp = "na.interp", CLUSTER = NULL, ...)
| x | object of class numeric, matrix, RasterStack, RasterBrick or stars |
|---|---|
| interp | Four interpolation methods are presented, "na.interp", "na.StructTS", "na.approx" and "na.spline". By default is the method "na.interp". |
| CLUSTER | cluster to use for parallel apply; see makeCluster |
| ... | ignored |
Hamunyela, E., Verbesselt, J., Roerink, G., & Herold, M. (2013). Trends in spring phenology of western European deciduous forests. Remote Sensing,5(12), 6159-6179.
Tarazona, Y., Mantas, V.M., Pereira, A.J.S.C. (2018). Improving tropical deforestation detection through using photosynthetic vegetation time series – (PVts). Ecological Indicators, 94, 367 379.
library(ForesToolboxRS) library(stars) # Example 1 x <- c(80,78,75,76,79,-100,82,76,81,77,76) smth <- smootH(x) plot(x, type="o", ylab="Reflectance %", xlab="Time")# Example 2 rasterio <- list(nXOff = 250, nYOff = 250) pv_serie <- system.file("PVts", package="ForesToolboxRS") %>% list.files("\\.tif$",full.names = TRUE) %>% read_stars(RasterIO = rasterio) pv_serie_stars <- smootH(pv_serie) smoth_mean <- st_apply(pv_serie_stars %>% merge,1:2,mean) simple_mean <- st_apply(pv_serie %>% merge,1:2,function(x) mean(x,na.rm=TRUE)) plot(smoth_mean,main = "SmootH mean")


Home
This index of on-campus scholarship funds is designed to make it easier for you to find the perfect scholarship to help you further your educational career. Start your search by selecting the group that best describes you. You will then be taken to an index of the available scholarships.
In addition, UCR maintains a list of regional and national scholarships that are sent to us from outside agencies. To view this list, please visit http://www.scholarshiplist.ucr.edu/.
Prospective/Incoming/ Transfer StudentsScholarships for undergraduate and graduate students who are planning to attend or enrolled, but have not yet taken any classes at the university. |
Current Undergraduate StudentsScholarships for UC Riverside undergraduate students. |
Current Graduate StudentsScholarships for UC Riverside graduate students. |


Meet our sweets and place your order, we deliver on the same day
Make your life more sweet!
When we decide to create the Candelivery, our pillars to build it is ever: A delicious candy that make you feel really good, beautiful candies like an art, and the most important, the quality to our clients have a good experience!
We started in 2015 and we are still delivering our products with quality today. This has always been one of our pillars and we continue to follow it


Uses of Interface
com.jme.input.controls.Trigger
-
Packages that use Trigger Package Description com.jme.app com.jme.input com.jme.input.controls com.jme.util -
-
Uses of Trigger in com.jme.app
Fields in com.jme.app declared as Trigger Modifier and Type Field Description protected Trigger[]
ChaseCameraAppState. toggleRotateTrigger
protected Trigger[]
ChaseCameraAppState. zoomInTrigger
protected Trigger[]
ChaseCameraAppState. zoomOutTrigger
Methods in com.jme.app with parameters of type Trigger Modifier and Type Method Description void
ChaseCameraAppState. setToggleRotationTrigger(Trigger... triggers)
Sets custom triggers for toggling the rotation of the cam default are new MouseButtonTrigger(MouseInput.BUTTON_LEFT) left mouse button new MouseButtonTrigger(MouseInput.BUTTON_RIGHT) right mouse buttonvoid
ChaseCameraAppState. setZoomInTrigger(Trigger... triggers)
Sets custom triggers for zooming in the cam default is new MouseAxisTrigger(MouseInput.AXIS_WHEEL, true) mouse wheel upvoid
ChaseCameraAppState. setZoomOutTrigger(Trigger... triggers)
Sets custom triggers for zooming out the cam default is new MouseAxisTrigger(MouseInput.AXIS_WHEEL, false) mouse wheel down -
Uses of Trigger in com.jme.input
Methods in com.jme.input with parameters of type Trigger Modifier and Type Method Description void
InputManager. addMapping(java.lang.String mappingName, Trigger... triggers)
Create a new mapping to the given triggers.void
InputManager. deleteTrigger(java.lang.String mappingName, Trigger trigger)
Deletes a specific trigger registered to a mapping.void
ChaseCamera. setToggleRotationTrigger(Trigger... triggers)
Sets custom triggers for toggling the rotation of the cam default are new MouseButtonTrigger(MouseInput.BUTTON_LEFT) left mouse button new MouseButtonTrigger(MouseInput.BUTTON_RIGHT) right mouse buttonvoid
ChaseCamera. setZoomInTrigger(Trigger... triggers)
Sets custom triggers for zooming in the cam default is new MouseAxisTrigger(MouseInput.AXIS_WHEEL, true) mouse wheel upvoid
ChaseCamera. setZoomOutTrigger(Trigger... triggers)
Sets custom triggers for zooming out the cam default is new MouseAxisTrigger(MouseInput.AXIS_WHEEL, false) mouse wheel down -
Uses of Trigger in com.jme.input.controls
Classes in com.jme.input.controls that implement Trigger Modifier and Type Class Description class
JoyAxisTrigger
class
JoyButtonTrigger
class
KeyTrigger
AKeyTrigger
is used as a mapping to keyboard keys.class
MouseAxisTrigger
AMouseAxisTrigger
is used as a mapping to mouse axis, a mouse axis is movement along the X axis (left/right), Y axis (up/down) and the mouse wheel (scroll up/down).class
MouseButtonTrigger
AMouseButtonTrigger
is used as a mapping to receive events from mouse buttons.class
TouchTrigger
Class to trigger TouchEvents, keycode can be TouchInput.ALL(=0) or TouchInput.KEYCODE_* -
Uses of Trigger in com.jme.util
Methods in com.jme.util with parameters of type Trigger Modifier and Type Method Description void
MaterialDebugAppState. registerBinding(Trigger trigger, Filter filter)
Will reload the filter's materials whenever the trigger is fired.void
MaterialDebugAppState. registerBinding(Trigger trigger, Spatial spat)
Will reload the spatial's materials whenever the trigger is fired
-