Skip to content

Instantly share code, notes, and snippets.

View Toyurc's full-sized avatar
🏠
........Working

Adebayo-Ige Omotoyosi Toyurc

🏠
........Working
View GitHub Profile
@vunderkind
vunderkind / gist:f74a3dc681dd37edacdd635a021826c9
Created December 21, 2024 15:10
0 to 100: ML Engineer in One Year
If you're reading this, I shared it with you — directly or indirectly — which suggests you're in the general space of people studying to become ML engineers as quickly as possible.
My earliest observation is people accidentally sabotage themselves by thinking it will be too easy, or too hard.
People who think it'll be easy plan to make this transition in 3 months. Six, for some. I recommend a year of conscientious grinding, especially if — like me — your math is completely nonexistent.
If I had to streamline the path, I'd say you need to:
1. Pick up a framework (like Tensorflow or Keras) and get really good at it. This is probably more important than math, when you're starting out.
@lilpolymath
lilpolymath / LRUCache.md
Created April 12, 2022 14:30
Implementing a given cache size behaving as an LRU cache with an expiry time and auto cache burst

Question

Implement Promise based memoization with a given cache size behaving as an LRU cache with an expiry time and auto cache burst.

Answer

First, what we have to do is breakdown the terms in the problem statement to understand what is going on and what we are asked to do.

  1. Promise based memoization: Memoization is one of the ways we can improve the performance of functions by eliminating redundant calls. Memoization is a technique where we store the results of a function call in a cache and return the result from the cache if the function is called again with the same arguments.
@FlorianRappl
FlorianRappl / useCarousel.ts
Last active August 16, 2024 06:30
The generic useCarousel hook.
import { useReducer, useEffect } from 'react';
import { useSwipeable, SwipeableHandlers, EventData } from 'react-swipeable';
function previous(length: number, current: number) {
return (current - 1 + length) % length;
}
function next(length: number, current: number) {
return (current + 1) % length;
}
@jakubigla
jakubigla / Dockerfile
Created December 10, 2018 14:36
Dockerfile for multistage build of spring boot application using maven with SonarQube and proxy support
ARG BUILD_IMAGE=maven:3.5-jdk-11
ARG RUNTIME_IMAGE=openjdk:11-jdk-slim
#############################################################################################
### Stage where Docker is pulling all maven dependencies ###
#############################################################################################
FROM ${BUILD_IMAGE} as dependencies
ARG PROXY_SET=false
ARG PROXY_HOST=
import axios from 'axios'
import config from '../config'
import {getUserIdToken} from './auth'
const axiosInstance = axios.create({
baseURL: config.api[process.env.NODE_ENV].base + config.api[process.env.NODE_ENV].graphqlEndpoint,
timeout: 5000
})
{
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false
}
@stephanbogner
stephanbogner / index.html
Created November 8, 2017 14:49
Simple example of using javascript to take a photo from a website
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Camera</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style type="text/css">
.cameraRoll {
@paramaggarwal
paramaggarwal / razzle.config.js
Created October 26, 2017 15:10
Razzle config with support for SASS (with source maps)
"use strict";
const autoprefixer = require("autoprefixer");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const Visualizer = require("webpack-visualizer-plugin");
module.exports = {
modify: (baseConfig, { target, dev }, webpack) => {
const appConfig = Object.assign({}, baseConfig);
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active April 19, 2025 04:49
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@mofesolapaul
mofesolapaul / nigeria-states.json
Last active April 18, 2025 17:59
List of all Nigerian states, alphabetically arranged in JSON array
[
"Abia",
"Adamawa",
"Akwa Ibom",
"Anambra",
"Bauchi",
"Bayelsa",
"Benue",
"Borno",
"Cross River",