Tag: c

65 votes
3 answers
2.5K views
Add .dll to java.library.path in Eclipse/PyDev Jython project

I'm trying to use a compiled .jar Java library in my PyDev Jython project. I successfully added the .jar

avatar
Brianne
0 1 0 9
asked 07 September, 2021
56 votes
6 answers
2.5K views
Migrating from CPython to Jython

I'm considering moving my code (around 30K LOC) from CPython to Jython, so that I could have better integ

avatar
Benton
0 1 0 9
asked 07 September, 2021
63 votes
4 answers
2.7K views
Can I program for android using any JVM language?

Can I use other JVM languages besides Java (e.g. jruby, jython, clojure) to program for android, or is it java

avatar
Bryant
0 1 0 9
asked 07 September, 2021
65 votes
5 answers
2.5K views
Groovy advantages over Jython or Jruby?

Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent adva

avatar
Hilario
0 1 0 9
asked 07 September, 2021
57 votes
6 answers
3K views
How can I call scikit-learn classifiers from Java?

I have a classifier that I trained using Python's scikit-learn. How can I use the classifier from a Java

avatar
Joseph
0 1 0 9
asked 07 September, 2021
48 votes
8 answers
432 views
jdbc: Get the SQL Type Name from java.sql.Type code

I have an array with Field Names and jdbc Type codes. (Those int codes that you can find in http://download.

avatar
Clarice
0 1 0 9
asked 07 September, 2021
60 votes
4 answers
2.2K views
How can I add jars to the classpath when I invoke Jython *without* adding them to $CLASSPATH?

I'd like to do something similar to jython -cp FOO:BAR:BAZ argle.py. If I add FOO, BAR, and BAZ to $CLAS

avatar
Majorie
0 1 0 9
asked 07 September, 2021
62 votes
9 answers
797 views
Cross-platform way to get PIDs by process name in python

Several processes with the same name are running on host. What is the cross-platform way to get PIDs of those

avatar
Kisha
0 1 0 9
asked 07 September, 2021
52 votes
4 answers
1.4K views
Distributing my Python scripts as JAR files with Jython?

I have been a Python programmer for almost two years, and I am used to writing small scripts to automate some

avatar
Sachiko
0 1 0 9
asked 07 September, 2021
60 votes
7 answers
1.9K views
Boolean identity == True vs is True

It is standard convention to use if foo is None rather than if foo == None to test if a value is specifically

avatar
Cortez
0 1 0 9
asked 07 September, 2021
57 votes
23 answers
2.8K views
52 votes
8 answers
1.1K views
dropping infinite values from dataframes in pandas?

what is the quickest/simplest way to drop nan and inf/-inf values from a pandas DataFrame without resetting mo

avatar
Scot
0 1 0 9
asked 07 September, 2021
55 votes
16 answers
1.5K views
numpy: most efficient frequency counts for unique values in an array

In numpy / scipy, is there an efficient way to get frequency counts for unique values in an array? Something

avatar
Xavier
0 1 0 9
asked 07 September, 2021
53 votes
10 answers
642 views
How to take column-slices of dataframe in pandas

I load some machine learning data from a CSV file. The first 2 columns are observations and the remaining colu

avatar
Basil
0 1 0 9
asked 07 September, 2021
58 votes
6 answers
1.9K views
Concatenating two one-dimensional NumPy arrays

I have two simple one-dimensional arrays in NumPy. I should be able to concatenate them using numpy.concatenat

avatar
Hilario
0 1 0 9
asked 07 September, 2021
64 votes
18 answers
813 views
Find nearest value in numpy array

Is there a numpy-thonic way, e.g. function, to find the nearest value in an array? Example: np.find_nearest

avatar
Dario
0 1 0 9
asked 07 September, 2021
66 votes
3 answers
415 views
Simple Digit Recognition OCR in OpenCV-Python

I am trying to implement a "Digit Recognition OCR" in OpenCV-Python (cv2). It is just for learning purposes. I

avatar
Serina
0 1 0 9
asked 07 September, 2021
48 votes
15 answers
435 views
Sorting arrays in NumPy by column

How can I sort an array in NumPy by the nth column? For example, a = array([[9, 2, 3], [4, 5, 6],

avatar
Nidia
0 1 0 9
asked 07 September, 2021
55 votes
17 answers
1.5K views
How to find all occurrences of an element in a list

index() will give the first occurrence of an item in a list. Is there a neat trick which returns all indices i

avatar
Shanita
0 1 0 9
asked 07 September, 2021
53 votes
13 answers
929 views
How do I read CSV data into a record array in NumPy?

I wonder if there is a direct way to import the contents of a CSV file into a record array, much in the way th

avatar
Arline
0 1 0 9
asked 07 September, 2021