initial commit
This commit is contained in:
		
						commit
						4e9f69da92
					
				
					 8 changed files with 53 additions and 0 deletions
				
			
		
							
								
								
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					*.zip
 | 
				
			||||||
 | 
					packing
 | 
				
			||||||
							
								
								
									
										11
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					# Netatmo technical test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The subject is available here: [Test Algo](./test_algo.pdf)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##  Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Notes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Question 1
 | 
				
			||||||
 | 
					### Question 2
 | 
				
			||||||
 | 
					### Question 3
 | 
				
			||||||
							
								
								
									
										0
									
								
								Tupfile.ini
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								Tupfile.ini
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										18
									
								
								justfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								justfile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					name := "freling_netatmo_algo"
 | 
				
			||||||
 | 
					exe := "./packing"
 | 
				
			||||||
 | 
					build_sh := "build.sh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					build:
 | 
				
			||||||
 | 
						tup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					run: build
 | 
				
			||||||
 | 
						{{exe}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					generate-build:
 | 
				
			||||||
 | 
						tup generate {{build_sh}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					debug: build
 | 
				
			||||||
 | 
						lldb {{exe}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					archive: generate-build
 | 
				
			||||||
 | 
						git archive --add-file={{build_sh}} --output={{name}}.zip --prefix={{name}}/ HEAD
 | 
				
			||||||
							
								
								
									
										10
									
								
								shell.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								shell.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,10 @@
 | 
				
			||||||
 | 
					{ pkgs ? import <nixpkgs> {} }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pkgs.mkShell {
 | 
				
			||||||
 | 
					  buildInputs = with pkgs; [
 | 
				
			||||||
 | 
					    clang
 | 
				
			||||||
 | 
					    just
 | 
				
			||||||
 | 
					    tup
 | 
				
			||||||
 | 
					    valgrind
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										3
									
								
								src/.clang-format
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/.clang-format
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,3 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					BasedOnStyle: Chromium
 | 
				
			||||||
 | 
					IndentWidth: 4
 | 
				
			||||||
							
								
								
									
										9
									
								
								src/Tupfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/Tupfile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					CPPFLAGS_ = -Wall -Werror -std=c++17 -fcolor-diagnostics -g -O1
 | 
				
			||||||
 | 
					CPPFLAGS_ASAN = $(CPPFLAGS_) -fsanitize=address -fno-omit-frame-pointer
 | 
				
			||||||
 | 
					CPPFLAGS_THREAD = $(CPPFLAGS_) -fsanitize=thread
 | 
				
			||||||
 | 
					CPPFLAGS_MEM = $(CPPFLAGS_) -fsanitize=memory -fno-omit-frame-pointer
 | 
				
			||||||
 | 
					CPPFLAGS_UB = $(CPPFLAGS_) -fsanitize=undefined
 | 
				
			||||||
 | 
					CPPFLAGS = $(CPPFLAGS_)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: foreach *.cpp |> clang++ -c %f -o %o $(CPPFLAGS) |> %B.o {objs}
 | 
				
			||||||
 | 
					: {objs} |> clang++ %f -o %o $(CPPFLAGS) -lpthread |> ../packing
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								test_algo.pdf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								test_algo.pdf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue