$ 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
### ToDo Tasks ✓ | |
- [x] d4135-88288 | |
- [x] 32552-bb444 | |
- [] 46f77-20eba | |
- [] 198f3-b902f | |
- [] c2c72-3821e | |
- [] adae1-3baa0 | |
- [] ace45-48415 | |
- [] 71192-d9315 |
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
DOM Manipulation session 1 |
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
function diagonalDifference(arr) { | |
// Write your code here | |
{ | |
// Initialize sums of diagonals | |
let d1 = 0, d2 = 0; | |
const n = arr[0].length; | |
for (let i = 0; i < n; i++) { | |
// finding sum of primary diagonal |
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
**Type of change** | |
- [ ] Bug fix (fixes an issue) | |
- [ ] New feature (change adds functionality) | |
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | |
- [ ] Others (cosmetics, styling, improvements) | |
- [ ] This change requires a documentation update |
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 datetime | |
from flask import session, request, jsonify | |
from app.function import * | |
from app import users, userIds, parcels, parcelIds, old_usernames | |
from werkzeug.security import generate_password_hash, check_password_hash | |
class User: | |
#class to create users | |
def __init__(self, username, email, password): |
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 flask import Flask, request, session, jsonify,make_response | |
from app.models import * | |
from app.api.user_authentication import token_required | |
from app.function import json_response | |
from app import users, userIds, parcelIds, parcels, old_usernames | |
from flask_jwt_extended import create_access_token, get_jwt_identity, jwt_required | |
@app.route('/') | |
def index(): |
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 psycopg2 | |
class DatabaseConnection: | |
def __init__(self): | |
connection_credentials = """ | |
dbname='postgres' user='postgres' password='166091postgres' | |
host='localhost' port='5432' | |
""" | |
try: | |
self.connection = psycopg2.connect(connection_credentials) |
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 SignUp: | |
def __init__(self): | |
self.user_bio=dict() | |
def add(self, username, password): | |
self.user_bio[username]=password | |
def get_password(self, username): | |
return self.user_bio[username] |
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
tearDownimport unittest # python3 | |
from signup import SignUp | |
class signUpTest(unittest.TestCase): | |
def setUp(self): | |
self.signup=SignUp() | |
def tearDown(self): #done with databases!!, break it |
NewerOlder