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 pyexiv2 | |
img = pyexiv2.Image("DSC00093.JPG") | |
img.read_exif() | |
data = img.read_exif() | |
print(data["Exif.Sony1.0x2042"]) # read ID | |
print(data["Exif.Sony1.0x2043"]) # read string |
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
#!/bin/bash | |
export PX4_SIM_MODEL=unittest | |
export PX4_START_MODULES=start_modules.rc | |
# log file without mission and several different main states: | |
export replay=/home/david/Downloads/07370005-60a6-4a60-8d24-b86849a5c042.ulg | |
make px4_sitl_unittest | |
export PX4_BUILD_UNITTEST=$(pwd)/build/px4_sitl_unittest_replay |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<mavlinkcamera> | |
<definition version="7"> | |
<model>T100</model> | |
<vendor>Foo Industries</vendor> | |
</definition> | |
<parameters> | |
<!-- control = 0 tells us this should not create an automatic UI control --> | |
<parameter name="CAM_MODE" type="uint32" default="1" control="0"> | |
<description>Camera Mode</description> |
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 numpy as np | |
# tuples of timestamps and "data" | |
data1 = np.array([ | |
(3, 0xF0A), | |
(7, 0xF0B), | |
(12, 0xF0C), | |
(18, 0xF0D) | |
]) |
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
sudo fdisk -l /dev/sda | |
# /dev/sdaX -> EFI partition | |
# /dev/sdaY -> Ubuntu partition | |
sudo mount /dev/sdaY /mnt | |
sudo mount /dev/sdaX /mnt/boot/efi | |
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done | |
sudo chroot /mnt | |
grub-install /dev/sda | |
update-grub |
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
/* | |
* Copyright (c) 2015-2016 Wind River Systems, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 rospy | |
from mavros import mavlink | |
from mavros_msgs.msg import Mavlink | |
from pymavlink.dialects.v20 import common | |
class MavlinkPublicationTest: | |
def __init__(self): | |
self.mav = common.MAVLink(None) | |
self.mav_pub = rospy.Publisher("/mavlink/to", Mavlink, queue_size=10) | |
msg = common.MAVLink_command_long_message( |
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
//-------------------------------------------------------------------------------- | |
// Auto-generated by Migen (7014bdc) & LiteX (c715ba87) on 2021-02-27 08:59:55 | |
//-------------------------------------------------------------------------------- | |
#include <generated/soc.h> | |
#ifndef __GENERATED_CSR_H | |
#define __GENERATED_CSR_H |
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
#!/usr/bin/env python3 | |
import argparse | |
import contextlib | |
import glob | |
import json | |
import os | |
import platform | |
import re | |
import site |
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
#include <iostream> | |
template<bool B, class T, class F> | |
struct conditional { typedef T type; }; | |
template<class T, class F> | |
struct conditional<false, T, F> { typedef F type; }; | |
// from https://stackoverflow.com/a/16803836 | |
template <typename... Ts> |
NewerOlder