Thursday, 3 February 2022
Where to Get Latest Technology News?
Saturday, 29 January 2022
Python Pandas merge all csv in a folder
Below the code merge all CSV in a floder
import glob, os import pandas as pd
df = pd.concat(map(pd.read_csv, glob.glob(os.path.join('', "*.csv"))))
Thursday, 9 December 2021
Tuesday, 7 December 2021
Top 8 Interview Questions in Python
- What is the difference between List and Tuples in Python?
- Python an interpreted language explain
- What is Pep8?
- What are Python Namespaces?
- What are Decorators in Python?
- What are Dict and List comprehension?
- What is the difference between .py and .pyc files?
- What is Slicing in Python?
Friday, 16 October 2020
Ubuntu — Certificate error after upgrade to 20.04
ssl_ctx_use_certificate:ca md too weak
I upgraded my ubuntu server to 20.04. After this process, doing calls passing certificate gives the following error
error: Error: [(‘SSL routines’, ‘SSL_CTX_use_certificate’, ‘ca md too weak’)]
openssl version : OpenSSL 1.1.1f 31 Mar 2020
I found the solution, according to the accepted answer of this question: Ubuntu 20.04 — how to set lower SSL security level?
In particular, the openSSL configuration file /etc/ssl/openssl.cnf shall be modified in the following way.
At the beginning, add
openssl_conf = default_conf
At the end, add
[ default_conf ]
ssl_conf = ssl_sect
[ssl_sect]
system_default = ssl_default_sect
[ssl_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT:@SECLEVEL=0
After this modification, the certificate is recognized without security errors.
Sunday, 11 June 2017
Javascript - In time and out time difference
inTimeHHMM = inTime.split(":");
outTimeHHMM = outTime.split(":");
var today = new Date();
var dateInTime = new Date(today.getFullYear(), today.getMonth(), today.getDate(), inTimeHHMM[0], inTimeHHMM[1], 0);
var dateOutTime = new Date(today.getFullYear(), today.getMonth(), today.getDate(), outTimeHHMM[0], outTimeHHMM[1], 0);
if(dateInTime<=dateOutTime){
}else{
dateOutTime.setDate(dateOutTime.getDate() + 1);
}
var diff =(dateOutTime.getTime() - dateInTime.getTime()) / 1000;
diff /= 60;
workingMinutes = Math.abs(Math.round(diff));
Monday, 10 April 2017
Daterangepicker set min time
Date.prototype.addHours = function(h) {
this.setTime(this.getTime() + (h*60*60*1000));
return this;
}
var currDate = new Date().addHours(5); // 5 is the hours
$('#fromDate').daterangepicker({
minDate: currDate,
timePicker: true,
singleDatePicker: true,
timePickerIncrement: 1,
format: 'DD/MM/YYYY hh:mm A'
});
Git merge branch to another branch
$ git checkout develop $ git pull $ git checkout test-branch $ git merge develop $ git push
-
/* ValidIpAddressRegex = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$...
-
You need to take an integer input and then draw the pattern according to it. Say for example if you enter 5 then, the pattern should be like...
-
Below the code merge all CSV in a floder import glob, os import pandas as pd df = pd.concat(map(pd.read_csv, glob.glob(os.path.join(...