Skip to content

Instantly share code, notes, and snippets.

View yossioo's full-sized avatar
🎯
Focusing

Yossi Ovcharik yossioo

🎯
Focusing
View GitHub Profile
@wngreene
wngreene / bag_to_images.py
Last active May 2, 2024 05:14
Extract images from a rosbag.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Massachusetts Institute of Technology
"""Extract images from a rosbag.
"""
import os
import argparse
@tuxdna
tuxdna / pi.py
Last active April 13, 2024 04:02
Policy Iteration in Python
#!/usr/bin/env python
# coding=utf-8
import numpy as np
"""
1: Procedure Policy_Iteration(S,A,P,R)
2: Inputs
3: S is the set of all states
4: A is the set of all actions
5: P is state transition function specifying P(s'|s,a)
@Rolias
Rolias / PropertyHelper.h
Last active September 27, 2023 21:58
Qt Auto Property Macros
#pragma once
#include <QObject>
//See Gist Comment for description, usage, warnings and license information
#define AUTO_PROPERTY(TYPE, NAME) \
Q_PROPERTY(TYPE NAME READ NAME WRITE NAME NOTIFY NAME ## Changed ) \
public: \
TYPE NAME() const { return a_ ## NAME ; } \
void NAME(TYPE value) { \
if (a_ ## NAME == value) return; \
a_ ## NAME = value; \
@mikeshi80
mikeshi80 / extractcomment.py
Last active April 15, 2024 22:17
Extract the comments from the C/C++ style source code to the same name add .cmt ext name. Usage is python extractcomment.py topdir .ext1 .ext2 ... You can set the encoding to read and write file correctly. Reference the source here http://www.cppblog.com/luyulaile/archive/2012/12/03/195907.html
#!/usr/bin/env python
import sys
import re
import os.path
import codecs
import os
encoding = 'cp932'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 13, 2024 05:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bgaff
bgaff / fizzbuzz.cpp
Created April 26, 2012 05:50
FizzBuzz C++: Template Recursion
/*
* fizzbuzz.cpp
*
* Created on: Apr 25, 2012
* Author: Brian Geffon
*
* fizzbuzz solved without looping or conditionals using only template recursion.
*/
#include <iostream>