Skip to content

Instantly share code, notes, and snippets.

View gatarelib's full-sized avatar
Codin'

Gatare Libère gatarelib

Codin'
View GitHub Profile
@gatarelib
gatarelib / camhand.py
Created August 26, 2022 10:10
Détection de la langue des signes
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
import cv2
import mediapipe as mp
from keras.models import load_model
import numpy as np
import time
import pandas as pd
@gatarelib
gatarelib / WipeCommand.php
Last active April 5, 2022 12:02
Wipe Command PHP
<?php
class WipeCommand extends Command
{
use ConfirmableTrait;
/**
* The console command name.
*
* @var string
@gatarelib
gatarelib / arduino.go
Last active March 28, 2022 13:37
Golang framework for robotics, drones, and the Internet of Things (IoT)
package main
import (
"time"
"gobot.io/x/gobot"
"gobot.io/x/gobot/drivers/gpio"
"gobot.io/x/gobot/platforms/firmata"
)

Write a function:

function solution(A);

that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.

For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.

Given A = [1, 2, 3], the function should return 4.

@gatarelib
gatarelib / calendar-challenge.markdown
Created September 19, 2019 10:29
Calendar Challenge
@gatarelib
gatarelib / andela_tech_challenge-cycle-11-kigali.markdown
Created August 21, 2019 08:41
Andela_Tech_Challenge - Cycle 11 (Kigali)
@gatarelib
gatarelib / shopping_cart
Created August 14, 2019 13:05
Andela - Python D2 Software Developer
class ShoppingCart(object):
def __init__(self):
self.total = 0
self.items = {}
def add_item(self, item_name, quantity, price):
self.total += quantity * price
if type(item_name) == str and quantity > 0:
self.items.update({item_name: quantity})
@gatarelib
gatarelib / min_swaps.py
Created August 14, 2019 13:03
Andela - Python D2 Software Developer
def minimum_swaps(ratings):
if sorted(ratings, reverse=True) == ratings:
return 0
swaps = 1
while sorted(ratings, reverse=True) != sorter(ratings):
swaps += 1
return swaps
def sorter(array):
@gatarelib
gatarelib / intspliter.py
Created August 14, 2019 13:02
Andela - Python D2 Software Developer
def splitInteger(num,parts):
quotient, remainder = divmod(num, parts)
lower_elements = [quotient] * (parts - remainder)
higher_elements = [quotient + 1] * remainder
return lower_elements + higher_elements
@gatarelib
gatarelib / ordinal.js
Created August 14, 2019 12:39
Andela assessment
function numberToOrdinal(n) {
if (n==0) {
return n;
}
var j = n % 10,
k = n % 100;
if (j == 1 && k != 11) {