Comment by Graygood on Get the name of a chosen item in QListWidget PyQt5
@eyllanesc I choose the item, then press the button that runs process function. When I press this button, the path to the chosen file should be given to this func. The problem is I could not find code...
View ArticleComment by Graygood on Remove items from QListWidget in PyQt5
updated question @Gianluca
View ArticleComment by Graygood on Select only rows with max date
I guess, partition and over is also not implemented in Clickhouse
View ArticleComment by Graygood on Map each element of array with its own method using...
@juanpa.arrivillaga tried to make my question more clear
View ArticleComment by Graygood on Map each element of array with its own method using...
That's exactly what I wanted! Thx a lot
View ArticleComment by Graygood on Get emoji from reaction in discord.py
It seems like return statement of the check function is not going off. I would try printing out the result of it
View ArticleComment by Graygood on flock with crontab is not working properly
Thanks! That was helpful. Also I faced a strange behavior, that lock isn't removed, given that it should be removed after cd command is executed successfully, isn't that right?
View ArticlePassing data between two functions. 'bool' object is not callable
I am trying to make desktop-app for my science work.I have a function that processes the data, and return me 3 list objects. code def process(self): file_location = "'/Users/Graygood/Desktop/Science\...
View ArticlePassing data from one fucntion to another. Python
I am working on an app and I have made a UI with the qt5 creator. I have a function bound to a...
View ArticleProper Save As function in Python
I have a default Save As function bound to a button click, that calls a modal window.Also, I have a function, that saves needed arrays as a .xlsx file....
View ArticlePath to the file Python
I've made a code that reads files from the folder and saves their paths.sample_directory = []sample_files = []for (dirpath, dirnames, filenames) in walk('./Samples'): sample_files.extend(filenames)...
View ArticleAnswer by Graygood for Can't Insert array data into QTableWidget PyQt5
Found a problem. self.clickSample_list.setItem(row, column, QTableWidgetItem(processed_info[row][column]))only works with string items, so I replaced it with self.clickSample_list.setItem(row, column,...
View ArticleCan't Insert array data into QTableWidget PyQt5
I am making a desktop app for scientific purposes, and I am struggling to find info on the topic.I have the code that scans the specific folder of excel files and saves its names and...
View ArticleHow to call the function after UI loads? PyQt5
I'm building the desktop app. Before class MyMainWindow(QMainWindow, Ui_MainWindow): I have a section, that processes some initial data (code 1)sample_directory_2 = []sample_files_2 = []for (dirpath,...
View ArticleCreate a portable version of the desktop app in PyQt5
I have made a UI in QtCreator 5. Then, I converted UI-file "Odor.ui" into "ui-main.py". Then I used Anaconda framework to write a computational part in Upiter Notebook. When, I compile this codeimport...
View ArticleReplacement for dataframe.iterrows()
I'am working on a script for migrating data from MongoDB to Clickhouse. Because of the reason that nested structures are'nt implemented good enough in Clickhouse, I iterate over nested structure and...
View ArticleGenerate multiple OR/AND statements [duplicate]
I am working on python script that splits text in different blocks based on keywords used in text. Currently I split text into blocks with sth like this (for 1 block, others have pretty much the same...
View ArticlePython or expression on exception
I have this code:try: info_model = Doc2Vec.load('models/info_model') salary_model = Doc2Vec.load('models/salary_model') education_model = Doc2Vec.load('models/education_model') experience_model =...
View ArticleGet finished level distribution across the database
I have a table that stores data of players game sessions. I need to count how many players finished each level of a game. Table have this structure`player_id, player_level, online_time, offline_time,...
View ArticleFinding Pearson correlation for millions of records
I am doing an NLP task, where I have a distribution of word occurrence in the texts grouped by day. I want to find Pearson correlation between a given word and all other words in the database. Is there...
View ArticleReload Enum class on call
I have enum class, that is generated based on distinct names in Postgres table, like this.CustomProperty = StrEnum('CustomProperty', [(i['metric_name'], i['metric_name']) for i in...
View ArticleSplit list according to the rule
I have a list values_list = [1013.0, 683.0, 336.0, 406.0, 636.0, 1065.0, 1160.0]Also I have a valuevalue = 660.6153846153846This list is based on the assumption that there are 3 stages. First stage...
View ArticleFind sequences in list of ranges
I have a random length list that contains ranges info:list = [ [[7, 12], [6, 12], [38, 44], [25, 30], [25, 29]], [[0, 5], [1, 5], [2, 5], [12, 16], [13, 16], [20, 23], [29, 33], [30, 33]], [[5, 7], [6,...
View ArticleSliding window reports caching
I have api endpoint that takes as an input some data with "date_from" and "date_to" fields.When the request is made it initiates the generation of report. These "date_from" and "date_to" fields are...
View ArticleNormalize column in ClickHouse
Is there a possibility a to normalize a column in Clickhouse?I was trying to do it getting the column into array via groupArray and then using arrayMap with lambda function arrayMap(x ->...
View ArticleAnswer by Graygood for How to convert string number to int and avoid the...
You could try something like this:array = ["String", "12"]for item in array: try: int(item) print(f"{item} is not string") except: print(f"{item} is string")
View ArticleAnswer by Graygood for How to solve Unicode problem in flask production e.g....
You could try using string.encode('utf-8').decode('utf-8') before passing it to jsonify function
View Articleflock with crontab is not working properly
I have a crontab job, that looks like this:*/5 * * * * /usr/bin/flock -w 0 /home/partners_perfluence_delivery/cron.lock cd /home/partners_perfluence_delivery && /usr/bin/python3...
View ArticleSelect only rows with max date
In clickhouse table I have multiple rows for one _id. What I want is to get only one row for each _id where column _status_set_at has its max value. That's what I am currently at:SELECT _id,...
View Article