Quantcast
Browsing all 14097 articles
Browse latest View live

Running Python Script With VirtualEnv As Daemon Using .system file

[Unit]Description="Twitter Automations Service"After=network.target[Service]Restart=alwaysExecStart=source /root/twitter_bot/venv/bin/activate && python3...

View Article


How to fetch data from network [closed]

I have this URL:https://api.divar.ir/v8/postcontact/web/contact_info/gZNk2Hrhhow can I extract data from this URL in Python?

View Article


Connecting mealpy Python to excel

My problem is when I run the code and save it in excel workbook, all the formula disappears and only the data exist and saved in the workbook. I try to eliminate the data_only= True, but if I do so,...

View Article

Real-time Reflection Error of Circuit Switching on Voltage and Current Graph...

I'm working on a project where I've integrated a Tkinter GUI with Matplotlib to monitor voltage and current in a circuit simulation. I have a manual switch button to simulate circuit faults by toggling...

View Article

Website Points to 502 Error w/ gunicorn & nginx. .sock file is not being created

I am attempting to set up a website right now with gunicorn and am receiving a 502 error. When I check my error logs, I see the following:2024/04/17 03:46:28 [crit] 13153#13153: *3 connect() to...

View Article


OpenGL Error While Making A Game with OpenAI Gym

So after using openais chatgpt and dall-e im using gym and theres this error with my code thats the same error that keeps popping out (for reference i havee intel hd 3000 and its saying theres...

View Article

Run pre-trained LLM model on CPU - ValueError: Expected a cuda device, but...

I am using a LLM model, CohereForAI/c4ai-command-r-plus-4bit, to do some inference. I have a GPU but it's not powerful enough so I want to use CPU. Below are the example codes and problems.Code:from...

View Article

How to display images with google facets dive?

I am getting started with google facets, but I am finding the documentation insufficient.I want to use facets dive to visualize images like they do here for cifar-10 . There is another example here...

View Article


List objects in S3 bucket with timestamp filter

BackgroundIs there a way to get a list of all the files on a s3 bucket that are newer than a specific timestamp. For example i am trying to figure out and get a list of all the files that got modified...

View Article


How to get more detailed results sources with Langchain

I am trying to put together a simple "Q&A with sources" using Langchain and a specific URL as the source data. The URL consists of a single page with quite a lot of information on it.The problem is...

View Article

How do you take in many inputs and use them as in this problem?

I have python homework and is stuck on a question. It is called Height of plants and the description is: *There are n plants growing in a row. Their heights are given as input. In order to help the...

View Article

How do i define curr and remove the error [closed]

I tried defining a function and keep on getting a "NameError: name "curr" is not defined" syntax# MY CODEdef loadData(filename): hlist = [] fileobj = open(filename, 'r') for line in fileobj: line_s =...

View Article

How to minimize problem using Pulp when the parameter to minimize is...

I have a class that evaluates a result for a given input list of parameters. I would like to know the best set of parameters that minimises the result given by the class. Since the input must remain...

View Article


TypeError: not all arguments converted during string formatting in dictionary...

a = input("enter the message")a = list(a)b = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m","n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",",", ".", "?", "!", "@",...

View Article

No module named _cffi_backend

I have Python 2.6 in my Linux rhel-5. I have installed pip and required CFFI packages. When I try to run a sample CFFI program:ffi = FFI()it says:File "/usr/lib/python2.6/site-packages/cffi/api.py",...

View Article


How to find element in selenium ignoring apostrophes

Can anyone tell me how to use selenium to search for something ignoring apostrophes? For example, if i search for the word "Hes", and inside the page content contains "He's" it will find it?Thanks

View Article

Connecting two ros2 nodes throw docker, different host, same network

I'm new setting up ros2 modules and I have the following problem:I can't connect two ros2 nodes running insde docker from my host (mac) to a raspberry pi.my local machine is a macOS I'm running the...

View Article


Image may be NSFW.
Clik here to view.

How to transform a table with rows containing counts into a table of...

I have a table in Postgres with each row a location and 19 columns containing employment counts in different industries. I would like to convert this table structure into one that represents each row...

View Article

java.lang.UnsatisfiedLinkError...

During performing Quantification in java tool NGS it is throwing the UnsatisfiedLinkError. Please find the entrire stack trace.Caused by: java.lang.UnsatisfiedLinkError:...

View Article

Itterows not populating as expected [duplicate]

I have a pandas dataframe of scores:data_1 = {"Grad_22": [96, np.nan, np.nan], "Grad_23": [92, 97, np.nan], "Grad_24": [np.nan, 93, 95]}df_1= pd.DataFrame(data_1)df_1["DATE"] =...

View Article
Browsing all 14097 articles
Browse latest View live