大约有 47,000 项符合查询结果(耗时:0.0485秒) [XML]
Extracting specific columns in numpy array
This is an easy question but say I have an MxN matrix. All I want to do is extract specific columns and store them in another numpy array but I get invalid syntax errors.
Here is the code:
...
Mapping two integers to one, in a unique and deterministic way
Imagine two positive integers A and B. I want to combine these two into a single integer C.
18 Answers
...
Regex to validate date format dd/mm/yyyy
I need to validate a date string for the format dd/mm/yyyy with a regular expresssion.
20 Answers
...
List of lists changes reflected across sublists unexpectedly
I needed to create a list of lists in Python, so I typed the following:
14 Answers
1...
Pandas groupby: How to get a union of strings
I have a dataframe like this:
8 Answers
8
...
Drop rows with all zeros in pandas data frame
I can use pandas dropna() functionality to remove rows with some or all columns set as NA 's. Is there an equivalent function for dropping rows with all columns having value 0?
...
Shortest distance between a point and a line segment
I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want; I can translate it into what I'm using (Javascript).
...
Simple C example of doing an HTTP POST and consuming the response
I would like to create a very simple C application that does an HTTP post. It will take a few parameters, and use these to construct a URL. I'd just like to do a simple HTTP POST and get the response without the use of curl (the libraries are not and will not be installed on the machine this needs...
Formula to determine brightness of RGB color
I'm looking for some kind of formula or algorithm to determine the brightness of a color given the RGB values. I know it can't be as simple as adding the RGB values together and having higher sums be brighter, but I'm kind of at a loss as to where to start.
...
Multiple linear regression in Python
I can't seem to find any python libraries that do multiple regression. The only things I find only do simple regression. I need to regress my dependent variable (y) against several independent variables (x1, x2, x3, etc.).
...
