A Pen by Gatare Libère on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
A Pen by Gatare Libère on CodePen.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"time" | |
"gobot.io/x/gobot" | |
"gobot.io/x/gobot/drivers/gpio" | |
"gobot.io/x/gobot/platforms/firmata" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WipeCommand extends Command | |
{ | |
use ConfirmableTrait; | |
/** | |
* The console command name. | |
* | |
* @var string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer