Unfortunately, the mini fridge for our coffee machine seems to have either a broken power switch or a broken cable. If you move it, it will likely stop working and our milk will turn sour which I find particularly unpleasant. So, if you feel like replacing the milk, take some extra care not to displace the fridge.
This file contains 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 math | |
def calc_total_fuel(masses): | |
fuel_sum = 0 | |
for x in masses: | |
fuel_sum += calc_fuel(x) | |
return fuel_sum | |
def calc_fuel(mass): | |
fuel = math.floor(mass / 3.0) - 2 |
This file contains 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
--- | |
# Output debugging info | |
# loglevel: debug | |
# Major version of Bootstrap: 3 or 4 | |
bootstrapVersion: 4 | |
# If Bootstrap version 4 is used - turn on/off flexbox model | |
useFlexbox: true |
This file contains 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
[Unit] | |
Description=SocketCAN interface can0 with a baudrate of 250000 | |
After=multi-user.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/sbin/ip link set can0 type can bitrate 250000 ; /sbin/ifconfig can0 up | |
ExecReload=/sbin/ifconfig can0 down ; /sbin/ip link set can0 type can bitrate 250000 ; /sbin/ifconfig can0 up | |
ExecStop=/sbin/ifconfig can0 down |
This file contains 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
[Unit] | |
Description=can2udp | |
After=multi-user.target socketcan-interface.service | |
Requires=socketcan-interface.service | |
[Service] | |
Type=simple | |
ExecStart=/home/pi/development/railroad/can2udp/src/can2udp -f -v | |
[Install] |
This file contains 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// refreshes ts definition files | |
typings: { | |
install: {} | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-typings'); |
This file contains 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
declare namespace MathJS { | |
interface Fraction {} | |
interface MathArray {} | |
interface Matrix {} | |
function config(options: any): void; |
This file contains 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
// Compute the median with std::nth_element | |
template<class T> | |
T vtkComputeMedianOfArray(T *aBegin, T *aEnd) | |
{ | |
T *aMid = aBegin + (aEnd - aBegin)/2; | |
std::nth_element(aBegin, aMid, aEnd); | |
T m = *aMid; | |
// if even size, get max of lower part of array and compute the average | |
if (aMid - aBegin == aEnd - aMid) |
This file contains 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
{ | |
"name": "user", | |
"plural": "users", | |
"base": "User", | |
"idInjection": true, | |
"options": { | |
"validateUpsert": true | |
}, | |
"properties": {}, | |
"validations": [], |
NewerOlder