py tag

191 questions


1 answers
95 views
0
Scrapy redirect problem

Hello, this is a crawling question about Scrappy or beautiful soup.After the crawler is written, it is being tested while actually curling.Other parts work normally, but redirection is the problem.For...

2 years ago

1 answers
129 views
0
I don't understand the process of putting the array in the index position of the array in Numpy. (Example> 3d_array[2d_array])

During the image processing process using numpy, there is a part of the code that I don't understand, so I'm posting a question.import numpy as npimage = np.array([[[1,1,1],[1,1,1]],[[1,1,1],[1,1,1]]]...


1 answers
51 views
0
[Python] Inquiries on how to prevent it from appearing as scientific notation

There is a Pandas data frame, and one column is timestamp.The value is expressed as 1518586207202I want to represent this divided by 1000 as an integer. So if you try df1.timestamp/1000This is 1.51858...


1 answers
43 views
0
Question when copying two sentences to a string pointer using the C++ strcpy_s function

When combining two strings in the char*pszResult inside the function Add(charpszLeft, char pszRight),int nLenLeft = strlen(pszLeft);int nLenRight = strlen(pszRight);char *pszResult = new char[nLenLeft...

2 years ago

1 answers
126 views
0
About installing numpy in python

I looked it up and found that numpy can be installed as exe. What is the difference between installing through pip and installing through exe file?

2 years ago

2 answers
49 views
0
Python numpy, I have a question

>>> import numpy asp>>> g = np.arange(1,10).reshape(3,3)>>> garray([[1, 2, 3], [4, 5, 6], [7, 8, 9]])>>> g[1, 2]6>>> g[2]array([7, 8, 9])>>> g[[...

2 years ago

1 answers
99 views
0
Shutil and for questions

import globimport shutilimport osimport sysfilename = glob.glob('**/*.jpg', recursive=True)filename = [os.path.basename(name) for name in filename]for name in filename: if not os.path.exists('jpg_file...

2 years ago

1 answers
126 views
0
How to copy objects from Java

DummyBean dum = new DummyBean();dum.setDummy(foo);System.out.println(dum.getDummy()); // prints 'foo'DummyBean dumtwo = dum;System.out.println(dumtwo.getDummy()); // prints 'foo'dum.setDummy(bar);Syst...

2 years ago

1 answers
45 views
0
gffromtxt question (mixed format - string, float)

It contains the following files (asset.csv):import numpy as npdata_arr = np.genfromtxt('asset.csv',encoding='ascii' ,delimiter=',', dtype=None)Use the corresponding code array([('G1', 1, 100, 5, 0), ...

2 years ago

2 answers
78 views
0
Python Repeated Variable Declaration

array1 = np.array(img[y+1,x])array2 = np.array(img[y+2,x])array3 = np.array(img[y+3,x])array4 = np.array(img[y+4,x])array5 = np.array(img[y+5,x])array6 = np.array(img[y+6,x])array7 = np.array(img[y+7,...

2 years ago
« - 16 - »

© 2024 OneMinuteCode. All rights reserved.