본문 바로가기

전체 글134

Python_Day 4 Python Day 4_Randomisation and Python Lists Randomization We use import random as a starting point. We can use randint(a, b) which will return a random integer between a and b (both inclusive). import random random_integer = random.randint(1, 10) print(random_integer) Module When the codes / scripts becomes too complicated or too long we can split them into different modules. This allows differe.. 2023. 11. 17.
Python_Day 3 Python_Day 3 Conditional Statements, logical operators, code blocks and scope Conditional Statement Conditional statement is if/else. By using If it should be followed with a condition and if it doesn’t it should be changed to else. By using a bathtub as an example we can code as follows: water_level = 50 if water_level > 80: print(“Drain water”) else: print(“continue”) A code for a ticketing bo.. 2023. 11. 15.
Python_Day 2 Primitive data types #string = string of characters and need to be created with “”. You can use [ ] to show the first character and use 0 such as print(“Hello”[0]) = H. Even numbers in “ “ will be counted as characters instead of number so print(“123” + “345”) = 12345 #Integer = Makes the code as numbers. With large numbers you can use _ instead of commas to make large numbers more easier to loo.. 2023. 11. 10.
Python_Day 1 Printing, commenting, debugging, string Manipulation and variables Printing to the console We use the double quotation marks to indicate that anything in between those quotation marks are not code and just texts to print. These are called strings in programing. The double quotation marks shows the beginning and the end of the string of characters. Print(“Hello world!”) however if you don’t close.. 2023. 11. 10.
Section 8_High Availability and Scalability: ELB & ASG -Scalability means that an application / system can handle greater loads by adapting. There are two kinds of scalability: • Vertical Scalability • Horizontal Scalability (= elasticity) Vertical Scalability - Increasing the size of the instance - Vertical scalability is common for non-distributed systems such as database - RDS, Elasticache are vertical scalability - Usually a limit to how much yo.. 2023. 9. 15.
Section 7 : Instance Storage EBS : An EBS (Elastic Block Store) Volume is a network drive you can attach to your instances while they run and allows data to persist even after their termination. - They can only be mounted to instance at a time and bound to a specific AZ (Free tier is 30gb) - It can be detached from an EC2 and attached to another one quickly - To move AZ you first need to snapshot it - Get billed for all the.. 2023. 8. 29.