Skip to content

Instantly share code, notes, and snippets.

@alexkutsan
alexkutsan / Wallget.py
Created July 17, 2013 21:34
Python API. Wall get all, step 1.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import vk_auth
import vkontakte
import os
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-e", "--email", dest="email",
help=" user email", metavar="EMAIL")
#include <thread>
#include <iostream>
void foo() {
for(int i = 0; i < 7; ++i) {
std::cout << i << std::endl;
}
}
int main() {
#include <thread>
#include <iostream>
#include <condition_variable>
#include <chrono>
#include <mutex>
#include <atomic>
typedef std::function<void()> CallBack;
class Timer {
#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>
@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

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 / 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 ')
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 \