This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
const grantConfig = { | |
..., | |
'our-provider': { | |
// 'our-provider' configuration here | |
... | |
}, | |
... | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
switch (provider) { | |
case 'our-provider': { | |
// 'our-provider' code here | |
break; | |
} | |
... | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const jwt = require('@strapi/plugin-users-permissions/server/services/jwt'); | |
const providers = require('./providers'); | |
const user = require('@strapi/plugin-users-permissions/server/services/user'); | |
const role = require('@strapi/plugin-users-permissions/server/services/role'); | |
const usersPermissions = require('@strapi/plugin-users-permissions/server/services/users-permissions'); | |
module.exports = { | |
jwt, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* An asynchronous bootstrap function that runs before | |
* your application gets started. | |
* | |
* This gives you an opportunity to set up your data model, | |
* run jobs, or perform some special logic. | |
*/ | |
const _ = require('lodash'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const register = require('@strapi/plugin-users-permissions/server/register'); | |
const bootstrap = require('./bootstrap'); | |
const contentTypes = require('@strapi/plugin-users-permissions/server/content-types'); | |
const middlewares = require('@strapi/plugin-users-permissions/server/middlewares'); | |
const services = require('./services'); | |
const routes = require('@strapi/plugin-users-permissions/server/routes'); | |
const controllers = require('@strapi/plugin-users-permissions/server/controllers'); | |
const config = require('@strapi/plugin-users-permissions/server/config'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = require('./server'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"attributes": { | |
"effective_range": { | |
"type": "string", | |
"columnType": { | |
"type": "specificType", | |
"args": [ | |
"tstzrange" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
ca-certificates \ | |
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for image_path in TEST_IMAGE_PATHS: | |
image = Image.open(image_path) | |
# the array based representation of the image will be used later in order to prepare the | |
# result image with boxes and labels on it. | |
image_np = load_image_into_numpy_array(image) | |
# Expand dimensions since the model expects images to have shape: [1, None, None, 3] | |
image_np_expanded = np.expand_dims(image_np, axis=0) | |
# Actual detection. | |
output_dict = run_inference_for_single_image(image_np, detection_graph) | |
# Visualization of the results of a detection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check the device to make sure it has the Google Play Services APK. If | |
* it doesn't, display a dialog that allows users to download the APK from | |
* the Google Play Store or enable it in the device's system settings. | |
*/ | |
private boolean checkPlayServices() { | |
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance(); | |
int resultCode = apiAvailability.isGooglePlayServicesAvailable(this); | |
if (resultCode != ConnectionResult.SUCCESS) { | |
if (apiAvailability.isUserResolvableError(resultCode)) { |
NewerOlder