Skip to content

Instantly share code, notes, and snippets.

View kelvinndmo's full-sized avatar
🏠
Working from home

Novak kelvinndmo

🏠
Working from home
View GitHub Profile
import unittest
from employee import Student
from unittest.mock import patch
class TestStudent(unittest.TestCase):
def setUp(self):
print("Setup has been run")
self.stud_1 = Student('kelvin', 'onkundi', 300)
import requests
class Student:
""" A Student class """
def __init__(self, first, last, marks):
self.first = first
self.last = last
self.marks = marks
import calculator
import unittest
class TestClass(unittest.TestCase):
def test_add(self):
""" test for the add function """
self.assertEqual(calculator.add(10, 15), 25)
def add(x, y):
return x + y
def substract(x, y):
return x - y
def multiply(x, y):
return x * y
<div class="row">
<div class="col-1-of-2">Col 1 of 2</div>
<div class="col-1-of-2">Col 1 of 2</div>
</div>
<div class="row">
<div class="col-1-of-3">Col 1 of 3</div>
<div class="col-1-of-3">Col 1 of 3</div>
<div class="col-1-of-3">Col 1 of 3</div>
</div>
<div class="row">
.row{
max-width: $grid-width;
background-color: red;
margin: 0 auto;
&:not(:last-child){
margin-bottom: $gutter-vertical;
}
@include clearfix;
[class^="col-"]{
@kelvinndmo
kelvinndmo / docker-help.md
Created November 1, 2019 16:42 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

<div class="row card-group">
<div class="col-2" *ngFor="let user of users">
<div class="card" style="width: 18rem;margin-right: 10px; padding: 10px;">
<img class="card-img-top" src="{{user.avatar_url}}" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">{{user.login}}</h5>
<p class="card-text">{{user.bio}}</p>
<a href="#" class="btn btn-secondary btn-outline">Go somewhere</a>
<a href="#" class="btn btn-primary">Go somewhere</a>
import africastalking
username = "sandbox" # use 'sandbox' for development in the test environment
# use your sandbox app API key for development in the test environment
api_key = "f873c8ed57eba5f24617beed4ea843449e2f48a12f4f0bece742d6faae1203a2"
africastalking.initialize(username, api_key)
# # Use the service synchronously
@media only screen and (max-width: 2652px) {
}
@media only screen and (max-width: 2326px) {
}
@media only screen and (max-width: 1200px) {