Dr. Lars Ivar Hatledal received a B.Sc. degree in automation and an M.Sc degree in simulation and visualisation from NTNU, Ålesund, Norway, in 2013 and 2017 respectively. From 2013 to 2017 he worked as a part-time research assistant with the Intelligent System lab at NTNU Ålesund, Department of Ocean Operations and Civil Engineering. In 2021 he received a Ph.D degree from NTNU within the topic of co-simulation and is currently working as an associate professor with the Department of ICT and Natural Sciences in NTNU Ålesund. His research area includes co-simulation, 3D visualisation and software architecture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [workspace] | |
| name = "robostack" | |
| description = "Development environment for RoboStack ROS packages" | |
| channels = ["https://prefix.dev/conda-forge"] | |
| platforms = ["linux-64", "win-64", "osx-64", "osx-arm64", "linux-aarch64"] | |
| # This will automatically activate the ros workspace on activation | |
| [target.win.activation] | |
| scripts = ["install/setup.bat"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| url = "https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png?download" | |
| filename = "Lenna.png" | |
| # Some websites does not allow scripts to download files | |
| # trick website into thinking we are a browser, by adding a header | |
| headers = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <condition_variable> | |
| #include <mutex> | |
| class semaphore { | |
| public: | |
| explicit semaphore(unsigned int max) : count_(0), max_(max) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <atomic> | |
| #include <chrono> | |
| #include <functional> | |
| #include <iostream> | |
| #include <mutex> | |
| #include <queue> | |
| #include <thread> | |
| #include <condition_variable> | |
| namespace { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| namespace { | |
| template <class T> | |
| void sort(std::vector<T> &list) { | |
| int n = list.size(); | |
| bool swapped; | |
| do { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import qwiic | |
| def change_address(old_address: int, new_address: int): | |
| # Connect to Mux | |
| mux = qwiic.QwiicTCA9548A() | |
| # Initially Disable All Channels | |
| mux.disable_all() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo -n password_here | iconv -t utf16le | openssl md4 // <---- run command and copy the output hash | |
| sudo nano /etc/wpa_supplicant/wpa_supplicant.conf | |
| network={ | |
| identity="username@ntnu.no" | |
| password=hash:password | |
| eap=PEAP | |
| phase1="peaplabel=0" | |
| phase2="auth=MSCHAPV2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pythonfmu import Fmi2Causality, Fmi2Variability, Fmi2Slave, Real | |
| slave_class = "SimplePID" # REQUIRED - Name of the class extending Fmi2Slave | |
| class SimplePID(Fmi2Slave): | |
| Fmi2Slave.author = "John Doe" | |
| Fmi2Slave.description = "A simple PID controller" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <condition_variable> | |
| #include <functional> | |
| #include <mutex> | |
| #include <thread> | |
| class thread_worker | |
| { | |
| public: | |
| thread_worker(); |
NewerOlder