Skip to content

Instantly share code, notes, and snippets.

View mobileappconsultant's full-sized avatar

Arkangel mobileappconsultant

  • Mobile Paradigm
View GitHub Profile
@mobileappconsultant
mobileappconsultant / sms_sender
Last active December 3, 2018 14:13
A simple python script to send text messages to any valid U.K number
#I want to import a library that manages time
import time
#I want to import a library that can help me define regular expressions
import re
#I want to import a library that tells me about the operating system I'm using and more!
import os
@mobileappconsultant
mobileappconsultant / simple_calculator
Created December 3, 2018 16:13
Simple calculator task in the Data Science lecture, implemented using a "pseudo" switch statement to replace the multiple if/else statements
import getpass
from getpass import getpass
def demo(argument):
options = {
1: one() ,
@mobileappconsultant
mobileappconsultant / Simpy.py
Last active December 4, 2018 12:01
Basic python script to practice some basic syntax in python version 3.5
# Different ways to test multiple
# flags at once in Python
x, y, z = 0, 1, 0
if x == 1 or y == 1 or z == 1:
print('passed')
if 1 in (x, y, z):
print('passed')
@mobileappconsultant
mobileappconsultant / BasicPandas.py
Created December 4, 2018 15:25
Playing around with Pandas Module
import pandas as pd
import sys
import os
clear = lambda: os.system("clear") #on Linux System
clear()
def processUserOptions(argument):
switchOptions = {
@mobileappconsultant
mobileappconsultant / python_keywards.py
Last active December 5, 2018 12:34
List all the commands or reserved keywords in python. Practice lambda syntax
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
@mobileappconsultant
mobileappconsultant / tfltravelguide.py
Last active December 7, 2018 15:01
Python app to allow a user plan their journey from start to destination using Transport For London Live Service
#!/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
@mobileappconsultant
mobileappconsultant / utilitytodeletefiles.py
Created December 14, 2018 17:41
A very simple and basic script to delete unwanted folders of a very specific type, in this case, .dmg files.
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
@mobileappconsultant
mobileappconsultant / function_arguments_unpacking.py
Created December 16, 2018 09:58
Very simple script to practice the syntax for function unpacking
# 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)
@mobileappconsultant
mobileappconsultant / Side Projects
Created January 4, 2019 16:53
A list of projects currently working on outside work for the purpose of broadening my horizons.
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
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.