Quantcast
Channel: User pcampana - Stack Overflow
Browsing all 39 articles
Browse latest View live

Comment by pcampana on How to remove files from git by adding in .gitignore...

You can do it with this command: git rm --cached "git ls-files -i --exclude-from=.gitignore"

View Article



Comment by pcampana on How to make Atom open when I type "git commit"

You should use git commit with the -m <message> option. because a git commit always need a explain message. For example: git commit -m "add the search feature"

View Article

Comment by pcampana on How to make Atom open when I type "git commit"

Because you need to be in a git resository when you execute this command

View Article

Comment by pcampana on Trajectory Planner with GEKKO is not able to handle...

To run your program. I have changed the line m = GEKKO() for m = GEKKO(remote=False) (otherwise the program crash). After that, I could run it without seeing any error. I have run it with python 3.8....

View Article

Comment by pcampana on How to print all the text inside tag which is inside a...

you can use selenium and bs4. I have updated my response. At least is how I work when I use selenium

View Article


Comment by pcampana on Python multiprocessing: all processes finish in 5...

I could not reproduce your problem. With your code, I get 5.6591163, which I imagine is the time you expect

View Article

Comment by pcampana on Unexpected token error for .send_keys in selenium web...

I've tried and it working for me. if you add a sleep(X) after the last command you will se before the browser closes, that the user and password are written correctly

View Article

Comment by pcampana on Problem with changing lowercase letters to uppercase...

I've tried it, and I get as result: AAAAAAAAAAAA. It is the expected output? I've run it with python3

View Article


Comment by pcampana on Reading files using sys.argv in python

If you move your ex15.txt file to users>myaccount>learnpython>readingfile.py it will work

View Article


Comment by pcampana on Scale deployment replicas with kubernetes go client

Do you consider that using patch is more safe than using the get and update approach?

View Article

Comment by pcampana on Golang merge deeply two maps

Yes. edited. NEWKEY: NEWVALUE2

View Article

Comment by pcampana on helm 3 .Release.time.Seconds does not exist

In case you need it working at the same time for helm 2 and 3, i used the following code: ​dateInSeconds: {{ now | quote | trunc 28 | replace "\"" "" | replace ":" "-" | replace " " "_" | quote}}

View Article

Comment by pcampana on Authentication Problem with mongo-express when trying...

I have the same problem. I've tried to create the user with SCRAM-SHA-1 but is not supported in mongo version 4.x.

View Article


Comment by pcampana on Can not run model with TPU

I am running the TPU using Kaggle notebook with accelerator TPU V3-8

View Article

Answer by pcampana for Python multiprocessing: all processes finish in 5...

Your code seems okey. However, if it is not working for your OS, you could try defining the maximum number of threads you would like to have running at the same time. In the following example it is set...

View Article


Answer by pcampana for Not able to click using selenium python webdriver

For clicking the button, you can do it by the id:button = driver.find_element_by_id("submitMe")button.click()

View Article

Answer by pcampana for Returning whether or not a number is prime as a...

Just to show an alternative, what you could do is checking from number 2 to your number if the operation (x % i) is equal to zero. If it never happend, it will be a prime.def isprime(x): # check for...

View Article


Answer by pcampana for Problem with changing lowercase letters to uppercase...

The problem was that you were doing a replace of all ocurrances of that character in the string. Here you have a working solution:def myFunc(a): result = '' for chars in range(0,len(a)):...

View Article

Answer by pcampana for Python functions don't have access to global variable?

That error is because you are trying to do the following operation: lower_case += 1, which is the same as lower_case = lower_case +1. As lower_case has not an initial value, this operation can not be...

View Article

Answer by pcampana for How do I move a file into another folder/path with golang

To move file \Folder_A\file.txt to \Folder_B\file.txt, you can use os library. Here you have a simple example: package main import ("fmt""os" ) func main() { err := os.Rename("\Folder_A\file.txt",...

View Article
Browsing all 39 articles
Browse latest View live




Latest Images