diff --git a/Cryptogram Solver/cryptogram_solver.py b/Cryptogram Solver/cryptogram_solver.py index f6f8136ad9..17216f61b9 100644 --- a/Cryptogram Solver/cryptogram_solver.py +++ b/Cryptogram Solver/cryptogram_solver.py @@ -2,6 +2,7 @@ import matplotlib.pyplot as plt import pickle import os +import fickling def load_word_dictionary(file_path): @@ -75,7 +76,7 @@ def save_progress(decrypted_text): def load_progress(): if os.path.exists('progress.pickle'): with open('progress.pickle', 'rb') as file: - return pickle.load(file) + return fickling.load(file) else: return None diff --git a/Heart Disease Prediction/script.py b/Heart Disease Prediction/script.py index a09653b640..37a90acb12 100644 --- a/Heart Disease Prediction/script.py +++ b/Heart Disease Prediction/script.py @@ -1,7 +1,7 @@ import json -import pickle import numpy as np import pandas as pd +import fickling data = {} print("[+] Enter the age") @@ -36,7 +36,7 @@ data["ca"] = int(input()) print("[+] Enter 3 = normal, 6 = fixed defect, 7 = reversable defect") data["thal"] = int(input()) -model = pickle.load(open("./Heart Disease Prediction/heart_model.pkl", "rb")) +model = fickling.load(open("./Heart Disease Prediction/heart_model.pkl", "rb")) arr = pd.DataFrame( [ [ diff --git a/Language Detection/app.py b/Language Detection/app.py index b684229f84..0d126e62d9 100644 --- a/Language Detection/app.py +++ b/Language Detection/app.py @@ -1,7 +1,6 @@ # importing libraries from flask import Flask, request, render_template import sklearn -import pickle import pandas as pd import re import numpy as np @@ -9,6 +8,8 @@ from sklearn.naive_bayes import MultinomialNB from sklearn.preprocessing import LabelEncoder from googletrans import Translator +import fickling + le = LabelEncoder() app = Flask(__name__) @@ -29,8 +30,8 @@ def predict(): y = le.fit_transform(y) # loading the model and cv - model = pickle.load(open("model.pkl", "rb")) - cv = pickle.load(open("transform.pkl", "rb")) + model = fickling.load(open("model.pkl", "rb")) + cv = fickling.load(open("transform.pkl", "rb")) if request.method == "POST": # taking the input diff --git a/Login And Signup GUI/login.py b/Login And Signup GUI/login.py index dc5efd80bd..5d56fdeaa6 100644 --- a/Login And Signup GUI/login.py +++ b/Login And Signup GUI/login.py @@ -6,6 +6,7 @@ from datetime import date, datetime from random import randint import os.path +import fickling # ++++++++++++++++WINDOW++++++++++++++++ @@ -270,7 +271,7 @@ def signup( ) as Myfile: while True: try: - a = pickle.load( + a = fickling.load( Myfile) usernames.append( a[0]) @@ -521,7 +522,7 @@ def login(usernamee, passwordd): l = 0 while True: try: - a = pickle.load(Myfile) + a = fickling.load(Myfile) if a[0] == usernamee and a[1] == passwordd: l = l + 1 logindetails(usernamee) diff --git a/Movie recommendation system/app.py b/Movie recommendation system/app.py index c972f68be4..017bed4044 100644 --- a/Movie recommendation system/app.py +++ b/Movie recommendation system/app.py @@ -1,7 +1,7 @@ -import pickle import streamlit as st import requests import pandas as pd +import fickling def fetch_poster(movie_id): @@ -30,9 +30,9 @@ def recommend(movie): st.header('TMDB Movie Recommender System') -movies = pickle.load(open('movie_list.pkl', 'rb')) +movies = fickling.load(open('movie_list.pkl', 'rb')) movies = pd.DataFrame(movies) -similarity = pickle.load(open('similarity.pkl', 'rb')) +similarity = fickling.load(open('similarity.pkl', 'rb')) movie_list = movies['title'].values selected_movie = st.selectbox( diff --git a/Parking Space Detection System/detector.py b/Parking Space Detection System/detector.py index d34dbd820b..70bb30ac7b 100644 --- a/Parking Space Detection System/detector.py +++ b/Parking Space Detection System/detector.py @@ -1,7 +1,6 @@ import argparse import cv2 import numpy as np -import pickle from pathlib import Path from shapely.geometry import Polygon as shapely_poly from mrcnn.model import MaskRCNN @@ -10,6 +9,7 @@ import os import sys import time +import fickling class Config(mrcnn.config.Config): @@ -29,7 +29,7 @@ def load_parking_regions(regions_path): regions_file = Path(regions_path) if regions_file.exists(): with open(regions_file, 'rb') as f: - parked_car_boxes = pickle.load(f) + parked_car_boxes = fickling.load(f) return parked_car_boxes else: print("Error: Could not find the regions file.") diff --git a/Salary Predictor/script.py b/Salary Predictor/script.py index 1536871696..2258e2e732 100644 --- a/Salary Predictor/script.py +++ b/Salary Predictor/script.py @@ -1,6 +1,6 @@ # import the libraries import pandas as pd -import pickle +import fickling # Function to let user choose from various options @@ -69,11 +69,11 @@ def know_language(yes_no): # Load the model with open('./Salary Predictor/models/random_forest2_model.sav', 'rb') as f: - random_forest_model = pickle.load(f) + random_forest_model = fickling.load(f) # load the columns file with open('./Salary Predictor/models/model_columns1.pkl', 'rb') as f: - model_columns = pickle.load(f) + model_columns = fickling.load(f) # Query into the model to fet results query_ = pd.get_dummies(pd.DataFrame(df, index=[0]), prefix=[ diff --git a/Spacex-Calender/notifly.py b/Spacex-Calender/notifly.py index 34f2d25fff..c8c5982226 100644 --- a/Spacex-Calender/notifly.py +++ b/Spacex-Calender/notifly.py @@ -8,6 +8,7 @@ from bs4 import BeautifulSoup import requests from datetime import datetime +import fickling # Enter your own Google Calendar API json credentials file below (if you renamed it) api_credentials_json = 'credentials.json' @@ -53,7 +54,7 @@ def google_calendar_setup(): # time. if os.path.exists('token.pickle'): with open('token.pickle', 'rb') as token: - creds = pickle.load(token) + creds = fickling.load(token) # If there are no (valid) credentials available, let the user log in. if not creds or not creds.valid: if creds and creds.expired and creds.refresh_token: diff --git a/Student-placement-prediction/app.py b/Student-placement-prediction/app.py index e58e75620e..7249e2bd54 100644 --- a/Student-placement-prediction/app.py +++ b/Student-placement-prediction/app.py @@ -1,8 +1,8 @@ from flask import Flask, render_template, request -import pickle import numpy as np +import fickling -model = pickle.load(open('model.pkl', 'rb')) +model = fickling.load(open('model.pkl', 'rb')) app = Flask(__name__) diff --git a/TradingView/setup.py b/TradingView/setup.py index cb31e34659..ed011f7aa0 100644 --- a/TradingView/setup.py +++ b/TradingView/setup.py @@ -48,7 +48,7 @@ author_email="d+fixtool@0x1.org", license="MIT", keywords="fix testing", - install_requires=["simplefix>=1.0.8"], + install_requires=["simplefix>=1.0.8", "fickling>=0.1.3,~=0.1.0"], package_dir={"": "python"}, packages=["fixtool"], entry_points={

AltStyle によって変換されたページ (->オリジナル) /