Skip to content

Understanding free OPC/UA code in python

I am working on OPCUA in python. I am using freeopc. I have used their server_minimal & client_minimal example and it is running fine. I am having some issues understanding the code. As far as I know the OPCUA stack, it has address space which is like a collection of all the nodes. These nodes then furthe…

How to add a newline function to JSON using Python

I have a JSON that I had to manipulate and the code looks like this. I had to manipulate the data because of an invalid part of the data that I could not use when uploading to BigQuery. However out_file.write(“n”) is not making the JSON write each set of data on a newline like it has in the previo…

Convert SAS data to a python dataframe

I have this small little code here to import a SAS file into dataframe in Python. The code runs forever without any output. The sas file I’m trying to import is 1.5gb. Answer You should use the native pandas function pandas.read_sas it’s faster than iterating through the file as you did. Here is t…

How to start a standalone cluster using pyspark?

I am using pyspark under ubuntu with python 2.7 I installed it using And trying to follow the instruction to setup spark cluster I can’t find the script start-master.sh I assume that it has to do with the fact that i installed pyspark and not regular spark I found here that i can connect a worker node t…