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
/*global require exports Buffer */ | |
const { promisify } = require("util"); | |
const fetch = require("node-fetch"); | |
const jwkToPem = require("jwk-to-pem"); | |
const jsonwebtoken = require("jsonwebtoken"); | |
/** | |
* Generate Auth Error | |
* @param {('invalid_token'|'boye')} code Error message code | |
* @param {string} message Message of the error |
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
import { Auth } from "@aws-amplify/auth"; | |
import Router from "next/router"; | |
import { createContext, useContext, useEffect, useState } from "react"; | |
import { createUser, getUser } from "../utils/api"; | |
const AuthContext = createContext(); | |
export const useAuthContext = () => useContext(AuthContext); | |
export const AuthProvider = (props) => { |
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
<!-- | |
Welcome to Tailwind Play, the official Tailwind CSS playground! | |
Everything here works just like it does when you're running Tailwind locally | |
with a real build pipeline. You can customize your config file, use features | |
like `@apply`, or even add third-party plugins. | |
Feel free to play with this example if you're just learning, or trash it and | |
start from scratch if you know enough to be dangerous. Have fun! | |
--> |
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
!pip install --upgrade --force-reinstall --no-deps kaggle | |
from google.colab import files | |
# Upload you kaggle.json file gotten from Kaggle Account settings. | |
files.upload() | |
!chmod 600 kaggle.json | |
!mkdir ~/.kaggle | |
!cp kaggle.json ~/.kaggle/ |
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
<template> | |
<div class="camera__layout"> | |
<main class="camera__layout-content"> | |
<video ref="video" autoplay></video> | |
<input | |
ref="fileExp" | |
class="hidden" | |
type="file" | |
accept="image/*" |
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
CREATE DATABASE IF NOT EXISTS recommendation_spark; | |
USE recommendation_spark; | |
DROP TABLE IF EXISTS Recommendation; | |
DROP TABLE IF EXISTS Rating; | |
DROP TABLE IF EXISTS Accommodation; | |
CREATE TABLE IF NOT EXISTS Accommodation | |
( |
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
# Second stuff comes 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
from google.cloud import language_v1 | |
from google.cloud.language_v1 import enums | |
from google.auth import compute_engine | |
def analyze_sentiment(text): | |
""" | |
Analyze sentiment in a text | |
Args: |
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
{ | |
// Install the Eslint plugin | |
// Install the Vetur plugin | |
// Disable the Prettier plugin for this workspace. | |
"vetur.format.defaultFormatter.js": "vscode-typescript", | |
"vetur.format.defaultFormatter.html": "js-beautify-html", | |
"eslint.packageManager": "yarn", | |
"eslint.autoFixOnSave": true, | |
"eslint.validate": [ | |
{ |
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
/** | |
* Helper helper function | |
* Generate a title case. | |
* @param {string} string | |
*/ | |
const titleCase = string => { | |
let splitStr = string.toLowerCase().split(" "); | |
for (let i = 0; i < splitStr.length; i++) { | |
// You do not need to check if i is larger than splitStr length, as your for does that for you | |
// Assign it back to the array |
NewerOlder