This file contains 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
sealed class MoneyBoxIntent : MviIntent { | |
data class LoginIntent(val loginRequestBody: LoginRequestBody) : MoneyBoxIntent() | |
object GetAllInvestorProductsIntent : MoneyBoxIntent() | |
object MakeOneOffPaymentIntent : MoneyBoxIntent() | |
} | |
**************************************************************************************************************************************** | |
package com.android.moneybox.presentation | |
import androidx.lifecycle.ViewModel | |
import com.android.moneybox.domain.mvi.moneyboxactions.MoneyBoxAction |
This file contains 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 itertools | |
count =0; | |
stringInput = input(("Enter a string: ")) | |
for p in itertools.permutations(stringInput): | |
count = count +1 | |
print("{},{}".format(count,p)) |
This file contains 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 asyncio | |
import aiohttp | |
### Concurrency .. Simple Definition: using threads to execute tasks. Simple Analogy: Imagine how frustrating it'd be or how long it'd take | |
# if there was only 1 platform | |
# at Woolwich Arsenal station and you are travelling to London Bridge. So you have to wait for the train to arrive from London Bridge | |
# and for people to disembark from the train before you get a chance to begin your journey to London Bridge. Or even simpler imagine Ade's Cash | |
# and Carry with only 1 till open and you are doing Christmas shopping.. Happens sometimes :) Python provides a construct called async/await. |
This file contains 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
CFT Platform (Backend/Frontend) | |
CFT platform is information dissemination platform developed specifically for a Christian community in london. | |
It allows an administrator share information about services and events within the church. | |
The platform enables users to offer donations thru the Stripe payment Gateway. | |
The platform provides a curated list of youtube videos within the app |
This file contains 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
# declare a simple tuple and dictionary | |
tuple_easy = (1, 2, 3, 4, 5, 6, 6, 7) | |
simple_dict = {'a': 2, 'b': 1, } | |
# try to display their contents, observe the result | |
print(tuple_easy) | |
print(simple_dict) | |
# use arg unpacking to extract the contents | |
print(*tuple_easy) |
This file contains 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 | |
import fnmatch | |
CONSTANT_DIRECTORY_TO_CLEAN = "/Users/arkangel/Downloads/" | |
os.chdir(CONSTANT_DIRECTORY_TO_CLEAN) | |
# ensure that change to that directory worked | |
print(os.getcwd()) | |
# just to get an idea of all the files in that directory |
This file contains 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
#!/usr/bin/env python3 | |
import requests | |
import re | |
import json | |
import sys | |
import time | |
##### IF YOU ARE USING COMMAND LINE TO RUN THIS PLS DO pip install requests re json sys time | |
# get current postcode from user -> DONE | |
# get destination postcode from user -> DONE |
This file contains 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 keyword | |
print(keyword.kwlist) | |
print("There are {} commands in Python".format(len(keyword.kwlist))) | |
# a is a lambda that takes an input x and performs an operation : x**2 | |
# a is variable name assigned to lamda(python keyword) that takes an input x and(:) ..whatever comes after : is the operation | |
a = lambda x:x**2 |
This file contains 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 pandas as pd | |
import sys | |
import os | |
clear = lambda: os.system("clear") #on Linux System | |
clear() | |
def processUserOptions(argument): | |
switchOptions = { |
NewerOlder