Streamlit is a nice tool to turn data into viewable web apps rapidly.
Streamlit executes a single Python file and performs reloads and reruns of the Python file on change.
MapReduce represents a pattern that had a huge impact on the data analysis and big data community. Apache Hadoop allows to scatter and scale data processing with the number of nodes and cores.
One of the many corner points in this full framework is that code is shipped and executed on-site where the data resides. Next, only a pre-processed transformed version (map) of the data is then shuffled and sorted to the aggregators on different executors via the network.
MapReduce is hard to use on its own, so it usually is deployed with
Apache Hadoop or Apache Spark. To play around with it without either one of those large frameworks, I created one in Python – MapReduceSlim. It emulates all core features of the MapReduce. It has one difference, it loads each line of the files separately into the map function. In the case of Apache Hadoop, it would be block-wise. This provides a nice solution to understand the behavior and the pattern of MapReduce and how to implement a mapper and reducer.
# Hint: in MapReduce with Hadoop Streaming the # input comes from standard input STDIN def wc_mapper(key: str, values: str): # remove leading and trailing whitespaces line = values.strip() # split the line into words words = line.split() for word in words: # write the results to standard # output STDOUT yield word, 1
def wc_reducer(key: str, values: list): current_count = 0 word = key for value in values: current_count += value yield word, current_count
Finally, call the function with the MapReduceSlim framework
# Import the slim framework from map_reduce_slim import MapReduceSlim, wc_mapper, wc_reduce ### One input file version # Read the content from one file and use the # content as input for the run. MapReduceSlim('davinci.txt', 'davinci_wc_result_one_file.txt', wc_mapper, wc_reducer) ### Directory input version # Read all files in the given directory and # use the content as input for the run. MapReduceSlim('davinci_split', 'davinci_wc_result_multiple_file.txt', wc_mapper, wc_reducer)
Further information @ Github: https://github.com/2er0/MapReduceSlim
Data science and Jupyter notebook can sometimes get exhausting. What about debugging, version control, code reviewing and so on. Coming from a Software Engineering background it‘s like losing 50% of the stuff you were used to.
To mitigate those problems I recently partially switched from Python to R with many improvements. For local Python coding, JetBrains PyCharm is my tool of choice and Jupyter notebooks for remote coding. With R it is RStudio Desktop and for remote, there is RStudio Server, which is almost like the desktop version within a browser. This allows one to develop and analyze data from any device with a browser.
Docker is the world leading software containerization platform. I tried using GitLab as versioncontrol system and Jenkings as continuos integration system but the system turned out as not completly useful.
In that way a colleague told me about a system he wants to create based on Docker.
It’s a simple self-hosted Git servise.
It contains everything importent to develop something in collaboration.
It’s a continuous integration platform build on container technology. Every build run will be triggerd by a push to a repository if it’s linked to drone.
It’s a fine powerfull tool and a nice reverse proxy. With it we are able to provide the GoGs and the drone to the internet more secure and with SSL encryted.
We will colleced the SSL/TLS certificates from a Let’s Encryt service.
For one year I have tried to create my own YouTube Audio Player. I wanted something that can play my playlists and favorite music from YouTube, but I only wanted the sound – no video. In that case I usually used a separate browser-window or -tab and that was sometimes very annoying.
Currently I’m working on a private project with Angular 2 (v.2.0.0-beta.0 | TypeScript), Electron (Atom Shell) and NodeJS.
I had some issues with Angular 2 and webpack modular bundler.
You have to change/update your webpack config. After that webpack will ignore or find the native Electron-modules.
Solution: In my case I used the Componenttag „providers“ to create an instance of the declared service but every time you write „providers“ with a service in it, you are creating a new instance of the service and you will never get data from one component to another. You start your app with that
since then you have an instance of the provided services. To use them, you only have to import the service and to write in the somponent-constructor
constructor( %varname% : %servicename% )
The combination of Angular 2 (TypeScript), Electron (Atom Shell) and NodeJS is very nice. With that components you are able to build a client application rapidly. My next „nice to have“ is to integrate a CSS-preprocessor (SASS, LASS, …) in my projects to write CSS-code in the ways of a programmer.
Ich habe mich in letzter Zeit ein wenig mit der Programmiersprache Java beschäftigt. Das Ergebnis hiervon ist, dass ich das „8 Damen Problem“ in Schach mit Java gelöst habe.