Blog Posts
- Home /
- Blog Posts
Key-Value CLI Arguments in Python
July 29, 2021
If you have a CommandLine application (CLI) written in Python, you have a number of ways that you can take arguments from the user.
Read More
How to use a Translation Table to Replace Characters in Python
July 28, 2021
Python provides the ability to create Translation Tables. our_text = "This is an example of some text" translation_table = str.
Read More
How to Calculate the Sum of all Numbers in a String in Python
July 27, 2021
Let’s take the following string: numbers = "this 1 2 3 4 5 is not a 8 9 10" How can we sum up all the numbers in this string?
Read More
How to Find all Permutations of a String in Python
July 26, 2021
Python comes with a very useful module called itertools, which allows us to calculate permutations directly.
Read More
How to Fix ‘no basic auth credentials’ with Docker and AWS ECR
July 25, 2021
If you are trying to push a Docker image to AWS ECR (Elastic Container Registry) and you get a no basic auth credentials error.
Read More
How to Reverse Words or Sentences in Python
July 24, 2021
Let’s take the following sentence: words = "These are some words" We can use slices to reverse the order of the string:
Read More
How to solve AttributeError: ‘int’ object has no attribute ‘split’ – make: [sharedmods] Error 1
July 23, 2021
If you get the following error while trying to install something via Homebrew
Read More
How to Push a Docker image to AWS ECR
July 22, 2021
By default, Docker pushes its images to Docker Hub. While Docker Hub is a great way to share both your public and private images, you may find the rest of your infrastructure on one of the prominent cloud providers.
Read More
Complete Guide: How to Base64 Encode a String in Python | Python Base64 Encoding Explained
July 21, 2021
How to Base64 Encode a String in Python: A Comprehensive Guide Welcome to our comprehensive guide on how to python base64 encode a string in Python.
Read More
How to Get 10 Random Numbers in Python
July 20, 2021
The random module allows you to generate choices. import random print(random.
Read More
Get the Middle Character in Python
July 19, 2021
The challenge Return the middle character of the word. If the word’s length is odd, return the middle character.
Read More
Convert String to Datetime in Python
July 18, 2021
If you have a string and want to create a Datetime object out of it in Python, then you can use the Datetime Parse Time method, as follows:
Read More
How to Abort SQL statements after a set time in MariaDB
July 17, 2021
Sometimes you don’t want a SELECT query to run for more than a set amount of time.
Read More
Multiprocessing Pools in Python
July 16, 2021
Python ships with a multiprocessing module that allows your code to run functions in parallel by offloading calls to available processors.
Read More
How to Double Characters in Python
July 15, 2021
The challenge Given a string, you have to return a string in which each character (case-sensitive) is repeated once.
Read More
How to Reverse Words in Python
July 14, 2021
The challenge Complete the function that accepts a string parameter, and reverses each word in the string.
Read More
How to Count by X in Python
July 13, 2021
The challenge Create a function with two arguments that will return an array of the first (n) multiples of (x).
Read More
Calculate the Sum of Pairs in Python
July 12, 2021
The challenge Given a list of integers and a single sum value, return the first two values (parse from the left please) in order of appearance that add up to form the sum.
Read More
How to break a list into multiple lists (with maximum size) in Python
July 11, 2021
If you have a large list and want to create smaller lists of it, with a maximum amount of elements, then:
Read More
Get all dates between two dates inclusive in Python
July 10, 2021
If you want to print out a list of all dates between 2 dates (a date range), then you can use the following script:
Read More
Tags
- Actionscript
- Advertising
- Agile
- AI
- Android
- Angular
- Ansible
- API
- Automation
- AWS
- Bash
- Big Data
- Biometrics
- C
- C++
- CDK
- Chef
- CICD
- CLI
- Cloud
- CloudFormation
- Containers
- CSS
- Data Structures
- Databases
- DevOps
- Distributed
- Docker
- Domains
- EKS
- Envoy
- Excel
- Firebase
- Forensics
- General
- Git
- Go
- Graal
- Hosting
- HTML
- IaC
- IDE
- Interview
- Istio
- Java
- Javascript
- Jenkins
- Kotlin
- Kubernetes
- Linux
- Mac
- MariaDB
- Maths
- Maven
- Microservices
- Misc
- ML
- MySQL
- Networking
- Nexus
- Node
- NPM
- Pandas
- PHP
- PIP
- Platform
- PowerShell
- Puppet
- Python
- React
- Ruby
- Rust
- S3
- Security
- SEO
- Software
- Spring
- SQL
- SRE
- SSH
- SSL
- Startup
- Terraform
- Typescript
- Ubuntu
- Web3
- Windows
- WSL