This file contains hidden or 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 jwt = require('jsonwebtoken'); | |
const axios = require('axios'); | |
const fs = require('fs'); | |
function getFCMAccessToken() { | |
const creds = JSON.parse(process.env.SERVICE_ACCOUNT_JSON || '{}'); | |
const privateKey = creds.private_key.replace(/\\n/g, '\n'); | |
const clientEmail = creds.client_email; | |
const scopes = ['https://www.googleapis.com/auth/firebase.messaging']; | |
const url = 'https://oauth2.googleapis.com/token'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#OYENIYI SEUN TAIWO | |
#CSC/2021/235 | |
import turtle | |
import math | |
t = turtle.Turtle() | |
# this function draw a single perpendicular (vertical and horizontal 90 degree) line | |
def draw(x, y, length): |
This file contains hidden or 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
#OYENIYI SEUN TAIWO | |
#CSC/2021/235 | |
class Scooter: | |
def __init__(self, rental_company, starting_fee, price_per_100m, available_distance): | |
self.rental_company = rental_company | |
self.starting_fee = starting_fee | |
self.price_per_100m = price_per_100m | |
self.available_distance = available_distance |
This file contains hidden or 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
#OYENIYI SEUN TAIWO | |
#CSC/2021/235 | |
class Book: | |
def __init__(self, title, author, num_pages, book_type): | |
self.title = title | |
self.author = author | |
self.num_pages = num_pages | |
self.book_type = book_type |
This file contains hidden or 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 taxiFare to set tripCost to the cost of your | |
// ride covering 5 miles at 2 am in the morning | |
var tripCost = taxiFare(5, 2); | |
// calculates taxi fare based upon miles traveled | |
// and the hour of the day in military time (0-23). | |
var taxiFare = function (milesTraveled, pickupTime) { | |
var baseFare = 2.50; | |
var costPerMile = 2.00; | |
var nightSurcharge = 0.50; // 8pm to 6am, every night |
This file contains hidden or 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
# addition function | |
def add(x, y): | |
return x + y | |
# subtraction function | |
def subtract(x, y): | |
return x - y | |
# multiplication function | |
def multiply(x, y): |