Skip to content

Instantly share code, notes, and snippets.

View palikar's full-sized avatar
🙃
Develpoing

Stanislav Arnaudov palikar

🙃
Develpoing
  • Karlsruhe, Germnay
View GitHub Profile
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --cpus-per-task=8
#SBATCH --time=5:00:00
#SBATCH --mem=16gb
#SBATCH --partition=visu
cd $(ws_find arnaud)
cd code/flow_pred/
template <typename... Ts>
struct all_pod;
template <typename Head, typename... Tail>
struct all_pod<Head, Tail...>
{
static const bool value = std::is_pod<Head>::value && all_pod<Tail...>::value;
};
template <typename T>
@palikar
palikar / anonymous-gist.
Created January 23, 2019 18:41
cool scrolling in emacs
(setq scroll-margin 15
scroll-conservatively 0
scroll-up-aggressively 0.01
scroll-down-aggressively 0.01)
(setq-default scroll-up-aggressively 0.01
scroll-down-aggressively 0.01)
#ifndef UTIL_LANG_RANGE_HPP
#define UTIL_LANG_RANGE_HPP
#include <iterator>
#include <type_traits>
namespace util { namespace lang {
namespace detail {
@palikar
palikar / anonymous-gist.cpp
Last active January 11, 2019 14:47
Shapes with strides and dimenstions for multi dim array
#include <cstdint>
#include <vector>
#include <initializer_list>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <stdexcept>
#include <utility>
#include "range.hpp"
@palikar
palikar / anonymous-gist.
Created December 7, 2018 16:22
Kill whole word in emacs
(defun kill-whole-word ()
(interactive)
(backward-word)
(kill-word 1)
)
(global-set-key (kbd "C-c w") 'kill-whole-word)
@palikar
palikar / faces.el
Last active November 26, 2018 08:58
custom faces at work
(customset-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(company-preview ((t (:background "#444444" :foreground "light sky blue"))))
'(company-tooltip ((t (:background "#444444" :foreground "light sky blue"))))
'(company-tooltip-annotation ((t (:foreground "deep sky blue"))))
'(iedit-occurrence ((t (:background "pale green" :foreground "black")))))
@palikar
palikar / pkgbuild.cc
Created November 23, 2018 17:43
Maybe useless, will see
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <unordered_map>
#include <regex>
#include <algorithm>
#include <boost/filesystem.hpp>
@palikar
palikar / evm.sh
Last active October 31, 2018 21:03
Install Cask on Travis CI
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
@palikar
palikar / opencv_skin_segmentation.cpp
Created October 17, 2018 11:27 — forked from ndrplz/opencv_skin_segmentation.cpp
Simple hand segmentation from the webcam streaming.
#include <opencv2\opencv.hpp>
using namespace cv;
using std::cout;
/*--------------- SKIN SEGMENTATION ---------------*/
int main () {
VideoCapture cap(0);
if(!cap.isOpened())