How to find the installed pandas version

Check pandas.__version__: In [76]: import pandas as pd In [77]: pd.__version__ Out[77]: ‘0.12.0-933-g281dc4e’ Pandas also provides a utility function, pd.show_versions(), which reports the version of its dependencies as well: In [53]: pd.show_versions(as_json=False) INSTALLED VERSIONS —————— commit: None python: 2.7.6.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-45-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 … Read more

Does Java have a complete enum for HTTP response codes?

I don’t think there’s one that’s complete in the standard Java classes; HttpURLConnection is missing quite a few codes, like HTTP 100/Continue. There’s a complete list in the Apache HttpComponents, though: org.apache.http.HttpStatus (replaced org.apache.commons.HttpClient.HttpStatus from Apache Http Client, which reached end of life)

Sending POST data in Android

Note (Oct 2020): AsyncTask used in the following answer has been deprecated in Android API level 30. Please refer to Official documentation or this blog post for a more updated example Updated (June 2017) Answer which works on Android 6.0+. Thanks to @Rohit Suthar, @Tamis Bolvari and @sudhiskr for the comments. public class CallAPI extends … Read more

Facebook OAuth “The domain of this URL isn’t included in the app’s domain”

In case someone comes across this and is looking for these settings (like I was) You have to On the left hand side, click “+Add Product” and select “Facebook Login” (it was at the top for me) See the new settings available on the left hand side You will now have these OAuth settings on … Read more

How can I recover the return value of a function passed to multiprocessing.Process?

Use shared variable to communicate. For example like this: import multiprocessing def worker(procnum, return_dict): “””worker function””” print(str(procnum) + ” represent!”) return_dict[procnum] = procnum if __name__ == “__main__”: manager = multiprocessing.Manager() return_dict = manager.dict() jobs = [] for i in range(5): p = multiprocessing.Process(target=worker, args=(i, return_dict)) jobs.append(p) p.start() for proc in jobs: proc.join() print(return_dict.values())