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 / 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.
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
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.
const dataA = []
const dataB = []
const arrA = dataA.map(e => e.toLowerCase().replace(/\s/g, ''));
const arrB = dataB.map(e => e.toLowerCase().replace(/\s/g, ''));
console.log(arrA.length, arrB.length)
// Find duplicates in array A
@BolajiAyodeji
BolajiAyodeji / .gitignore
Last active June 12, 2021 07:27
Sample .gitignore file
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
@cassidoo
cassidoo / DTN.md
Last active March 6, 2024 15:48
Deploy to Netlify Button

Insta-deploy templates to Netlify

Make a Deploy to Netlify button like this:

Deploy to Netlify

With this:

@BolajiAyodeji
BolajiAyodeji / toggle.md
Last active May 21, 2021 20:35
Markdown toggle demo
Click to toggle contents of the toggle

Here's a sample code:

ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
@silviorelli
silviorelli / commercelayer_cli_order_place.md
Last active October 22, 2021 14:04
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.

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<title>HTML Result</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
</head>
<body>
<div class="container body-content">
@eveporcello
eveporcello / teacher-settings.json
Last active March 25, 2024 01:55
These are the VSCode settings that we use when recording screencast videos 🍿
{
"zenMode.hideLineNumbers": false,
"workbench.colorTheme": "Night Owl",
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
"editor.wordBasedSuggestions": false,
"editor.suggestOnTriggerCharacters": false,

POSTGRESQL CHEATSHEET

Basic commands

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)