Skip to content

Instantly share code, notes, and snippets.

View Mupati's full-sized avatar
🎯
Focusing

Kofi Obrasi Ocran Mupati

🎯
Focusing
View GitHub Profile
@Mupati
Mupati / gist:58d7f2385d70be90ff411dcd5517ded6
Created November 7, 2017 19:17 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Mupati
Mupati / composing-software.md
Created December 3, 2019 14:57 — forked from rosario/composing-software.md
Eric Elliott's Composing Software Series
@Mupati
Mupati / customer_info.csv
Created March 7, 2020 15:25
Sample CSV for my tutorial
contractId AccountNumber CreatedAt Amount Count Duration
1307022 142325110 9/1/2017 15:54 100 0 5
1307374 92511041 9/2/2017 16:31 100 0 5
1307721 202399520 9/4/2017 11:08 100 0 5
1307764 676152506 9/4/2017 12:12 100 0 5
1307862 698858327 9/4/2017 15:00 100 0 5
1308371 850930502 9/5/2017 16:50 200 0 15
1308652 146483814 9/6/2017 14:48 250 0 29
1308741 258184267 9/6/2017 15:32 200 0 15
1309129 766122339 9/7/2017 12:53 100 0 5
@Mupati
Mupati / larger_than_right.py
Created July 28, 2020 19:46
Largest Number in a List Compared to All Elements on the right.
###
Write code to count how many integers are strictly larger than all the integers to their right.
Exclude the last digit since it doesn't have a number to its right. E.g. for [2,3,1] the answer should
be 1 while for [12,4,4,2,2,3] the answer is 2.
###
def larger_than_right(input_list):
count = 0
tracker = []
max_length = len(input_list) - 1
@Mupati
Mupati / helpers.js
Created March 23, 2021 09:39
Browser Compatible Helper Function to access Device Microphone and Camera
export const getPermissions = () => {
// Older browsers might not implement mediaDevices at all, so we set an empty object first
if (navigator.mediaDevices === undefined) {
navigator.mediaDevices = {};
}
// Some browsers partially implement media devices. We can't just assign an object
// with getUserMedia as it would overwrite existing properties.
// Here, we will just add the getUserMedia property if it's missing.
if (navigator.mediaDevices.getUserMedia === undefined) {
@Mupati
Mupati / exercise-maps.go
Created January 4, 2022 07:37
Implement word count in Go
// My solution to https://go.dev/tour/moretypes/23
package main
import (
"strings"
"golang.org/x/tour/wc"
)
func WordCount(s string) map[string]int {
@Mupati
Mupati / exercise-fibonacci-closure.go
Created January 4, 2022 08:14
Fibonacci closure in Go
// my solution to https://go.dev/tour/moretypes/26
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int
func fibonacci() func() int {
a, b := -1, 0