Skip to content

Instantly share code, notes, and snippets.

Looking unto Jesus 💙

Bolaji Ayodeji BolajiAyodeji

Looking unto Jesus 💙
View GitHub Profile
BolajiAyodeji /
Last active October 25, 2022 22:18
Python implementation of the Robin Round (RR) preemptive scheduling algorithm.
# Python3 program for implementation of RR scheduling
# Function to find the waiting time for all processes
def findWaitingTime(processes, n, bt, wt, quantum):
rem_bt = [0] * n
# Copy the burst time into rt[]
for i in range(n):
rem_bt[i] = bt[i]
t = 0 # Current time
View sendgrid.js
let output = "";
const apiKey = "xxx";
async function sendEmail() {
await fetch("", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
View script.js
const gm = require("gm").subClass({ imageMagick: true });
const fs = require("fs");
const images = fs.readdirSync("./images");
images.forEach((image) => {
`./prc/${image.slice(0, 11)}.jpg`,
(err) => {
if (!err) console.log("✅ done");
View textFormat.js
const fs = require("fs");
const url =
fs.readFile("text.txt", "utf8", function (err, links) {
// get all text per line in links
const lines = links.split("\n");
//replace spaces with %20
View python-practice-assignment.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
tweets = [
"Wow, what a great day today!! #sunshine",
"I feel sad about the things going on around us. #covid19",
"I'm really excited to learn Python with @JovianML #zerotopandas",
"This is a really nice song. #linkinpark",
"The python programming language is useful for data science",
"Why do bad things happen to me?",
"Apple announces the release of the new iPhone 12. Fans are excited.",
"Spent my day with family!! #happy",
"Check out my blog post on common string operations in Python. #zerotopandas",
BolajiAyodeji / array-sets.js
Created August 25, 2021 06:35
Find duplicate emails (or any data type) in an array and the intersection, difference, symmetrical difference, and union of two arrays.
View array-sets.js
const dataA = []
const dataB = []
const arrA = => e.toLowerCase().replace(/\s/g, ''));
const arrB = => e.toLowerCase().replace(/\s/g, ''));
console.log(arrA.length, arrB.length)
// Find duplicates in array A
BolajiAyodeji / .gitignore
Last active June 12, 2021 07:27
Sample .gitignore file
View .gitignore
# See for more about ignoring files.
# dependencies
# testing
BolajiAyodeji /
Last active May 21, 2021 20:35
Markdown toggle demo
Click to toggle contents of the toggle

Here's a sample code:

<h1>Hello, world!</h1>,
BolajiAyodeji /
Last active May 7, 2021 09:17 — forked from silviorelli/
Place an order via the Commerce Layer CLI

Place an order for a t-shirt via the Commerce Layer CLI

  1. Search for the desired t-shirt:
commercelayer resources:get skus -w name_i_cont_all=t-shirt,pink -w name_not_i_cont_all=women,white

Example ID of t-shirt selected: NzWOpOSyBx.