Skip to content

Instantly share code, notes, and snippets.

{"trajectories": [{"track_id": "412", "type": "car", "landPositionList": [{"x": -27.844303006434405, "y": 58.627264845469995, "angle": -113.17107831778605, "timestamp_s": 19.75}, {"x": -28.426755497237405, "y": 57.26640462241352, "angle": -110.29805400300015, "timestamp_s": 20.0}, {"x": -28.86243584461245, "y": 56.08848465133802, "angle": -110.03173952471467, "timestamp_s": 20.25}, {"x": -29.257462628871608, "y": 55.00502532513599, "angle": -110.94470923236057, "timestamp_s": 20.5}, {"x": -29.649265814486345, "y": 53.98139169783562, "angle": -110.31737430774386, "timestamp_s": 20.75}, {"x": -29.970516152118428, "y": 53.098583016278994, "angle": -110.72416307930735, "timestamp_s": 21.0}, {"x": -30.23130760409184, "y": 52.37483171208494, "angle": -111.6362166876364, "timestamp_s": 21.25}, {"x": -30.48634878595591, "y": 51.76893815129873, "angle": -113.26799425744352, "timestamp_s": 21.5}, {"x": -30.64694986909366, "y": 51.39325660419982, "angle": -113.57748635694963, "timestamp_s": 21.75}, {"x": -30.77674626581
module Tourmaline
module Handlers
class CommandHandler < EventHandler
ANNOTATION = Command
# Commands (without prefix) that this handler should respond to.
property commands : Array(String)
# Prefixes that commands should start with.
property prefixes : Array(String)
@alexkutsan
alexkutsan / transfer.py
Created June 13, 2022 13:00
Nginx proxy manager migrate
import requests
import argparse
import json
parser = argparse.ArgumentParser(description='Transfer proxy hosts from one nginx_proxy_manager instance to another')
parser.add_argument('--source', type=str, help='url of source nginx_proxy_manager')
parser.add_argument('--source_auth', type=str, help='Authorization header of source nginx proxy manager')
parser.add_argument('--dest', type=str, help='url of destanation nginx_proxy_manager or file')
parser.add_argument('--dest_auth', type=str, help='Authorization header of dest nginx proxy manager')
#! /usr/bin/env python3
import argparse
def read_file():
filename = input("Enter file name : ")
print(f"read file : {filename}")
# TODO read file and print result
def create_file():
FROM ubuntu:18.04
ENV TZ=Europe/Minsk
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && apt install -yq \
sudo \
cowsay \
git \
git-gui \
@alexkutsan
alexkutsan / listener.py
Created February 12, 2020 13:52
listener.py
import rospy
from std_msgs.msg import String
from std_msgs.msg import String
from sensor_msgs.msg import CompressedImage
import numpy as np
import cv2
from cv_bridge import CvBridge
def callback(data):
#rospy.loginfo(rospy.get_caller_id() + 'I heard ')
@alexkutsan
alexkutsan / listener.py
Created February 12, 2020 13:52
listener.py
import rospy
from std_msgs.msg import String
from std_msgs.msg import String
from sensor_msgs.msg import CompressedImage
import numpy as np
import cv2
from cv_bridge import CvBridge
def callback(data):
#rospy.loginfo(rospy.get_caller_id() + 'I heard ')

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@alexkutsan
alexkutsan / pyscript.py
Created August 28, 2016 14:40 — forked from nhoffman/pyscript.py
Python script template
#!/usr/bin/env python
"""A simple python script template.
"""
import os
import sys
import argparse
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <iostream>
#include <string>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <vector>
#include <string>