The common way we configure Git email address at our machine is:
git config --global user.email firstname.lastname@example.org
It’s only for 1 email address and it will become a challenge when you have 2 (or more) Git accounts for different purposes e.g: for work project and for personal project. Remote repository only calculates commit contribution if configured email address matches with account’s email address.
One of solution I think of is to re-configure email address by re-running above terminal command each time before committing. However, it seems not efficient. There is another way to solve it.
Here are the steps:
1. Create remote repository from Github webpage
2. Create new local repository
git add -A
Below is my personal setup and configuration of Sublime Text 3 on MacOSX
Artikel ini juga tersedia dalam terjemahan Bahasa indonesia dengan judul Memakai argparse untuk memberikan argumen pada skrip python.
While doing some QA tasks, I got a case which I need to add and delete domain names from hundreds of categorized text files time after time.
Since it was repetitive and cost me time to perform it, I decided to create python script for automating that case.
Inspired by simplicity of linux command:
ls which has several arguments with distinct functionalities, I also want my python script to be able to run multiple functions.
To accommodate that, I need to separate the input arguments.
After doing internet research, I found argparse solving this issue. With argparse library, user can pass arguments into python script.
Let’s write this argparse script.
while running a selenium script, webdriver.py always throwing exception like :
File "C:\Python27\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 67, in __init__
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 87, in __init__
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 141, in start_session
even if I already used the correct chromedriver location:
browser = webdriver.Chrome("C:/Python27/chromedriver.exe")
the error still showed up.