Category : apache

I am trying to stream messages from kafka consumer to with 30 seconds windows using apache beam. Used beam_nuggets.io for reading from a kafka topic. You can see my code below: with beam.Pipeline(options=PipelineOptions()) as p: consumer_message = (p | "Reading messages from Kafka" >> kafkaio.KafkaConsume(consumer_config=consumer_config) | ‘window’ >> beam.WindowInto(window.FixedWindows(30)) | ‘groupBy’ >> beam.GroupByKey() | beam.Map(print)) ..

Read more

I am learning the Django framework and can run my first app on the development server using: python3 manage.py runserver However, what I really want to do is serve my app with Apache so it can be accessed from the web. My Apache Virtual Host is: <VirtualHost *:443> ServerName django.example.com DocumentRoot /var/www/django/hello_world/mysite WSGIScriptAlias / /var/www/django/hello_world/mysite/mysite/wsgi.py ..

Read more

I have a multipage app with dash I routed pathnames with @app.callback function At the end of my app. Py i have if name equals to main app.start_server(debug=false,port=8051, host=’0.0.0.0′) In my app.wsgi i have import sys sys.path.insert(0, ‘/var/www/Site_Pub’) activate_this = ‘/home/username/.local/share/virtualenvs/Site_Pub-uAwqGz45/bin/activate_this.py’ with open(activate_this) as file: exec(file.read(), dict(__file__=activate_this)) from server import server as application And in ..

Read more

I have a python pyspark block of code that collects data from a dataframe column(Body) and I am able to use beautifulsoup to parse the <p> tags paragraph for each row and turn it to a long string. text_list = [] for row in df_java.select("Body").collect(): soup = BeautifulSoup(row[0], "html.parser") for p in soup.find_all("p"): text = ..

Read more