I’ve been trying to configure my m1 to work with an older ruby on rails api and I think in the process I’ve broken my ability to connect any of my python apis to their database images in docker running locally. When I run: Instead of the lovely psql blinking cursor allowing me to run any sql state…
Tag: python
Postgredb in conda environment or keep standalone
I am looking for some guidance. I have Anaconda installed to manage my python packages and environments. I see that you can install postgres in the package manager. Am I best to install postgres in the conda environment or install standalone. I am on Windows. I see that if I install postgres separately I get …
Pandas get difference from first row at a set dtime with groupby
If I have a dataframe with [Group], [DTime] and [Value] columns For each [Group] I’m trying to find the difference between the first [Value] and every subsequent value from a set [DTime], for this example say it’s the start of the df at 2015-01-01. Ultimately I would like to plot a timeseries of […
How to use data from postgresql in django?
I have switched from sqlite to postgresql following Django: What are the best practices to migrate a project from sqlite to PostgreSQL the fourth answer. Here are my updated settings: However, I cannot seem to find/grab any of the data from my database. Here’s some example data from the database: The mi…
Python Trouble with matrix pathfinding (DFS)
I am having issues with dfs, probably from a RecursionError when facing a wall. Instead of continuously running an attempt which can only lead to a wall, it is supposed to return to its previous position and try another path. Also, it leans heavily on the order in which attempts are made (N,S,E,W or other com…
Adding a Prepend Method to a Linked List Class
I am currently working on a class project involving linked lists and python. Currently, I am trying to create a prepend function for said linked list. My current code is throwing a recursion error. Here is my code: Node definition: Here is the List function w/ append and broken prepend function: The recursion…
I am trying to know the reason my code is not running [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 months ago. Improve this question I wa…
How to query/filter cells against single values when cells have multiple values?
I have a csv file that follows the following format Columns one Column two Key1 Value1,Value2,value3 Key2 value5 I can easily use a list and .isin to filter the data-frame as follows: Which gives me the second row, but if there are cells with multiple values (like in the first row in the example table above w…
Add unknown number of jobs to pool until a job returns None
Assume that we want to send a lot of web requests, and do something with the data that we get back. The data crunching that we have to do on the response is quite heavy, so we’d want to parallelize this: a main process distributes query URLs to child processes, which then fetch the data and do some proc…
GBQ – Get around the Exceeded rate limits issue
i have questions about Exceeded rate limits issue in Google Big Query. I need to compare two tables (about 30k rows) and find unique people in first table and find unique people in the other one. I need to insert these “new” people into another tables and get an Exceeded rate limits issue. I use P…