Skip to main content

Posts

Showing posts from December, 2018

complete file compare software in python with classification

complete file compare software in python with classification In previous article i have posted code for file comapre in python in this article i have have modified the code a lot. It is full working code. Kindly verify and revert if you like it. Also i have classified the records which are old ones and which are from new one in difference file. from tkinter import filedialog from tkinter import * import os window = Tk() window.title("My File Compare...") window.geometry('750x200') lbl1 = Label(window, text="Select Old File Path") lbl1.grid(column=0, row=0) txt1 = Entry(window,width=80) txt1.grid(column=1, row=0) lbl2 = Label(window, text="Select new File Path") lbl2.grid(column=0, row=2) txt2 = Entry(window,width=80) txt2.grid(column=1, row=2) def browsefunc1():     filename = filedialog.askopenfilename(initialdir = "D:/QA/")     print(filename)     txt1.delete(0,END)     txt1.insert(0,filena...

Complete file compare tool/software in python

Beyondcompare project in python  File compare tool/software in python. It works like beyondcompare software. It is a file compare project made by me. Kindly go through the code. It selects the files dynamically using file dialogue option using button. The file absolute path is seen on textboxes and the compare button generates the difference between two files are prints difference in the third file. The GUI is made in 'tkinter' library of python. In the below mentioned program/project you will learn  1) how to design GUI in python 2) how to reply to button click events 3) how to bind the values(input of file dialogue from user) to textboxes 4) how to use file dialogue 5) how to get directory path using full file path 6) how to get file name from full file path 7) logic to find the difference between two files Below is the code in which user selects 2 different files as a input and it will generate the difference and finally print the difference in an...

Compare two text files in python and print the difference in third file

Compare two text files in python and print the difference in third file Below is the code which takes 2 text files as a input and it will generate the difference(in csv or comma separated file) and finally print the difference in the third file. I have developed this for excel like record file. The code works for as many numbers of records or huge text data. Also the program execution is very faster. Here is the code: import os # Read in the original and new file          old = open(OLD_FILE_PATH,'r') new = open(NEW_FILE_PATH,'r') #in new but not in old new_extra = set(new) - set(old) # To see results in console if desired print('-------------------------------------------new file extra records------------------------------------------------------------') print(new_extra) # Write to header to csv file with open(NEW_FILE_PATH) as f1:     first_line1 = f1.readline()            with open(NEW_FILE_P...

Best Portfolio Stocks & Multibaggers for 2019

Best Portfolio Stocks & Multibaggers for 2019 The market is on a roller coaster these days and it is expected to continue the swing in the coming year too. This is normal market tendency and correction phase. Some call this as the beginning of the bear market and some call it as bull market corrections, whatever may be this. These stocks will be multi-bagger if you invest by 2019. NOTE: These stocks have corrected around 20 to 30% and another 5 to 10% correction can be seen in the coming months. Hence you can start staggered buying in 5 tranches. 1: Equitas Holding Ltd 2: Maruti Suzuki 3: Piramal Enterprise 4: Mothersonsumi 5: Edelweiss 6: Larsen 7: L&T Finance These stocks are recommended by most of the investors and chartist. And let them reap in your portfolio for 3-5 years to get multi-bagger returns. Due to the US Trade Wars with China, the US market plunged and as an effect, the whole Asian market also bleed red and plunged up to 3% in corre...

MatPlotLib Complete Tutorial

# MatPlotLib Basics for drawing all kinds of graphs with all examples. ## Draw a line graph %matplotlib inline from scipy.stats import norm import matplotlib.pyplot as plt import numpy as np x = np.arange(-5, 5,0.1) plt.plot(x, norm.pdf(x)) plt.show() ## Mutiple Plots on One Graph plt.plot(x, norm.pdf(x)) plt.plot(x, norm.pdf(x, 3.0, 1)) plt.plot(x, norm.pdf(x, 2.0,1)) plt.show() ## Save it to a File plt.plot(x, norm.pdf(x)) plt.plot(x, norm.pdf(x, 1.0, 0.5)) plt.plot(x, norm.pdf(x, 2.0, 0.3)) plt.savefig('C:/Users/Antrixsh/Desktop/neeraj.pdf', format='pdf') ## Adjust the Axes axes = plt.axes() axes.set_xlim([-5, 5.0]) axes.set_ylim([0, 2.0]) axes.set_xticks([-5, -4, -3, -2, -1, 0, 1, 1.5, 2, 3, 4, 5]) axes.set_yticks([0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,1.1,1.2,1.3,1.4]) #axes.set_xT([-5, 5.0]) #axes.set_yt([0, 1.0]) axes.grid() plt.plot(x, norm.pdf(x)) plt.plot(x, norm.pdf(x, 1, 0.5)) plt.plot(x, norm.pdf...

MySql Sample Database case study (Demo Database) for self study

Mysql database project /* *************************************************************T******** Below is the sample mysql script for self study.Try to run the script in mysql and practice the queries I will post the queries in next article. ********************************************************************* Name: MySQL Sample Database classicmodels Link: http://www.mysqltutorial.org/mysql-sample-database.aspx Version 3.1 + changed data type from DOUBLE to DECIMAL for amount columns Version 3.0 + changed DATETIME to DATE for some colunmns Version 2.0 + changed table type from MyISAM to InnoDB + added foreign keys for all tables ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=...