Skip to content

Instantly share code, notes, and snippets.

View BolajiAyodeji's full-sized avatar
🥑
Working from home

Bolaji Ayodeji BolajiAyodeji

🥑
Working from home
View GitHub Profile
@BolajiAyodeji
BolajiAyodeji / cleanup.yml
Last active February 20, 2024 13:49
Automatically delete unused deployments and environments on GitHub.
name: Delete Environment
on:
push:
branches: [main, beta, alpha]
jobs:
delete:
runs-on: ubuntu-latest
steps:
@BolajiAyodeji
BolajiAyodeji / deploy-ml-web-workshop.md
Last active September 28, 2023 04:23
Pre-workshop instructions / software requirements for React Alicante 2023 "Deploying Machine Learning Models to the Web" workshop attendees.

🛠 Prerequisites and Installation Guide

Generally, you need the following:

  • A curious mind and desire to learn.
  • An understanding of or familiarity with the first five phases of the CRISP-DM data-mining framework.
  • A working laptop running on any operating system (Windows, Linux, or macOS).
  • Ability to navigate through the command-line interface (CLI).
  • Some existing machine learning model development knowledge (or an interest at least).
  • Some basic understanding of the Python programming language.
@BolajiAyodeji
BolajiAyodeji / test.json
Created July 26, 2023 22:18
A sample Contentful content type schema.
{
"name": "Country",
"description": "",
"displayField": "name",
"fields": [
{
"id": "name",
"name": "Name",
"type": "Symbol",
"localized": true,
@BolajiAyodeji
BolajiAyodeji / git-bundle.md
Created June 29, 2023 13:06
Bundle repository with all git history into another.
  1. Bundle the source repository:
git bundle create repo-name.bundle --all
  1. Move repo-name.bundle into the target directory.

  2. In the target directory, import the repo-name.bundle file.

@BolajiAyodeji
BolajiAyodeji / rr-scheduling.py
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
let output = "";
const apiKey = "xxx";
async function sendEmail() {
await fetch("https://api.sendgrid.com/v3/mail/send", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
const gm = require("gm").subClass({ imageMagick: true });
const fs = require("fs");
const images = fs.readdirSync("./images");
images.forEach((image) => {
gm(`./images/${image}`).write(
`./prc/${image.slice(0, 11)}.jpg`,
(err) => {
if (!err) console.log("✅ done");
const fs = require("fs");
const url =
"https://bolajiayodeji.github.io/fed-unis-perf-eval/lighthouse%20report/";
fs.readFile("text.txt", "utf8", function (err, links) {
// get all text per line in links
const lines = links.split("\n");
//replace spaces with %20
Loading
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",