$ docker
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
from django.test import TestCase | |
from sendy.models import Parcel | |
# Create your tests here. | |
class TestParcel(TestCase): | |
def setUp(self): | |
self.parcel = Parcels(sender="Kelvin onkundi", email="[email protected]", Recipient="Swaleh", recepient_contact="07999999") | |
self.parcel.save() | |
def test_create_parcel(self): |
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 | |
from flask import Flask, request, jsonify | |
from flask_sqlalchemy import SQLAlchemy | |
from flask_marshmallow import Marshmallow | |
# init app | |
app = Flask(__name__) | |
basedir = os.path.abspath(os.path.dirname(__file__)) |
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
@media only screen and (max-width: 2652px) { | |
} | |
@media only screen and (max-width: 2326px) { | |
} | |
@media only screen and (max-width: 1200px) { |
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 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 |
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
<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> |
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
.row{ | |
max-width: $grid-width; | |
background-color: red; | |
margin: 0 auto; | |
&:not(:last-child){ | |
margin-bottom: $gutter-vertical; | |
} | |
@include clearfix; | |
[class^="col-"]{ |
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
<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"> |
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
def add(x, y): | |
return x + y | |
def substract(x, y): | |
return x - y | |
def multiply(x, y): | |
return x * y |
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 calculator | |
import unittest | |
class TestClass(unittest.TestCase): | |
def test_add(self): | |
""" test for the add function """ | |
self.assertEqual(calculator.add(10, 15), 25) |
OlderNewer