I am doing machine learning on the company’s server I usually start the Jupyter notebook on my laptop, using the command jupyter-notebook –ip=192.168.1.200 –no-browser –port=999 in Xshell command line. Then copy the URL link to a browser. This time the ML is going to take up a lot of t…
extracting info from a text file in python
I am making a system in which when a user plays my game, it compares their score to what they have scored before by using a username and password. the info is stored in text file in the format: score*username*password. I am trying to get those into different variables so that I can check them against other va…
The saved animated plot keeps looping although Matplotlib FuncAnimation(…,repeat=False)
I’d like to make an animation using matplotlib for a powerpoint presentation. The animation should only play once. In my code, the argument repeat of FuncAnimation() was set to false. Because I need to import the figure into powerpoint, I saved it using ani.save(‘test.gif’). The problem is w…
copy from two multidimensional numpy array to another with different shape
I have two numpy arrays of the following shape: Array a is empty, as I just need this predefined shape, I created it with: Now I would like to copy data from array b to array a so that the second and third dimension of array a gets filled with the same 3 values of the corresponding row of array
Write a python code to merge two list with the following condition [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question If two list is having same number, then the final list should not have the…
The gradient (2d) search function returns None. What is the problem?
I have a function that should return a gradient. But when calculating the gradient at a specific point, I get None. Object classes: t1-function, t2-function, t3-None (I want to get a two-dimensional point) Please tell me how to change this line to make it work? PS. I understand that there are built-in methods…
How does the ‘with’ statement work in kivy?
I have been playing with kivy, and I saw this: I don’t quite understand how it works. I was expecting to see something like: What am I missing? Answer with some_canvas sets an internal Kivy variable to that canvas. When canvas instructions are created they check if that variable is set to a canvas, and …
How can I translate SQL query to to django ORM
I’m working on making some data consults in Django but I don’t understand quite well its ORM system yet. I need to get the transactions’ quantity for a particularly transaction’s projections. To put it briefly, I want to translate this SQL query to Python/Django syntax: These are the m…
Joining two dataframes on columns they match
I have two dataframes. df1 has more elements (3) in column ‘Table_name’ than df2 (2). I want a resultant dataframe that only outputs the rows where df1 and df2 share the same column names. df1 df2 I want this to be the result. df_result This is what i tried but it doesn’t work: Answer You ne…
Load and Save Dictionary and Class Instances Python Script
Writing a python script that prompts the user by asking if they are are new or an existing user. If new, they will create a username, password, age. A User class instance should be created with that information along with adding the new username and password to the security dictionary. Once registered, or an …