Convert XML to CSV in Python | Python Tutorial

Convert XML to CSV in Python | Python Tutorial <?xml version=”1.0″?> <Company> <Employee>  <Name>Sita</Name>  <Phone>123456789</Phone>  <Email>sita@example.com</Email> </Employee> <Employee>  <Name>Sam</Name>  <Phone>123456789</Phone>  <Email>sam@example.com</Email> …

Read more

How to Make an Omegle Chat Bot

How to Make an Omegle Chat Bot function executeOmegle() {   let btn = document.querySelector(‘.disconnectbtn’)   let messageBox = document.querySelector(‘.chatmsg’)   let sendBtn = document.querySelector(‘.sendbtn’)   btn.click()   messageBox.innerHTML=”Hello! I am Ranjith from India”   sendBtn.click() …

Read more

Convert JSON to Excel in Python 3 using json2excel Library

Convert JSON to Excel in Python 3 using json2excel Library pip install json2excel from json2excel import Json2Excel if __name__ == ‘__main__’:     json2excel = Json2Excel(head_name_cols=[“rank”, “name”])     # print(json2excel.run(‘./test.json’))     jsons = [         {             “student_no”: 1001, …

Read more

How to Download Image from URL in PHP

How to Download Image from URL in PHP <?php if(isset($_POST[‘url’])) { $url = $_POST[‘url’]; $pathinfo = pathinfo($url); // To get the filename and extension $ext = $pathinfo[‘extension’];  $filename = ‘images/’.$pathinfo[‘filename’];  $img = @file_get_contents($url,true); // get the image from the url file_put_contents($filename.’.’.$ext, $img); // create a file and feed the image } ?> <!DOCTYPE html> …

Read more

How to Download Image from URL in Python

How to Download Image from URL in Python pip install requests pip install wget pip install urllib3 ## Importing Necessary Modules import requests # to get image from the web import shutil # to save it locally …

Read more

Convert HTML to PDF using JavaScript

Convert HTML to PDF using JavaScript <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js”></script> <script src=”https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.min.js”></script> <script>         function createPDF() {             var pdf = document.getElementById(“content”);             var opt = {                 margin: 1,                 filename: ‘html2pdf-converted.pdf’,                 image: { type: ‘jpeg’, quality: 1 },                 html2canvas:  { scale: 2 },                 jsPDF: { unit: ‘in’, format: ‘a4’, orientation: ‘portrait’ }             };             html2pdf().set(opt).from(pdf).save();         } …

Read more

Login With Google Account Using JavaScript

Login With Google Account Using JavaScript <script src=”https://apis.google.com/js/platform.js” async defer></script> <meta name=”google-signin-client_id” content=”YOUR_CLIENT_ID.apps.googleusercontent.com”> <div class=”g-signin2″ data-onsuccess=”onSignIn”></div> function onSignIn(googleUser) { var …

Read more