Skip to content
forked from emieli/t2-1mrc

My take on the 1BRC for our COP participants

Notifications You must be signed in to change notification settings

cleufven/t2-1mrc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T2 1MRC

Idea inspired (or stolen) by the 1BRC challenge, I've setup a 1-million-row-challenge for you to solve in Python. Your task is to write a program that parses the measurements.txt file to calculate the minimum, maximum and average temperatures in each city.

Some example from measurements.txt:

Nässjö;89.1
Nässjö;12.6
Trollhättan;37.9
Trollhättan;33.4
Vänersborg;11.7

Your program should produce an output in this format:

Nässjö=12.6/50.8/89.1
Trollhättan=33.4/35,6/37.9
Vänersborg=11.7/11.7/11.7

Getting started

Download the git repository to a local folder. If you have git installed, you can run the following command in your terminal (cmd.exe) to download and open the folder:

C:\Users\emieli> git clone https://github.com/emieli/t2-1mrc.git
Cloning into 't2-1mrc'...
[...]
Receiving objects: 100% (8/8), 7.40 MiB | 23.18 MiB/s, done.

C:\Users\emieli> code t2-1mrc
(OR)
C:\Users\emieli> explorer t2-1mrc

You now have a local copy of the GIT repository.

If you have VS-code installed then you can type code t2-1mrc in cmd to open the project.

If you don't have VS-code then you can type explorer t2-1mrc in cmd to open the directory in your file explorer.

You can now open t2-1mrc\main.py and start coding!

Resources

In case you get stuck, feel free to browse these resources for inspiration:

Solution

If you get really stuck, You can find one way to solve the problem in the solution folder.

About

My take on the 1BRC for our COP participants

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%