Skip to content

Instantly share code, notes, and snippets.

import rospy
import cv2
import numpy
import anki_vector
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
if __name__ == "__main__":
import anki_vector
import asyncio
from anki_vector.util import degrees, distance_mm, speed_mmps
async def on_face(robot, event_type, event):
# when a face is detected, say something
print("Face seen!")
await asyncio.wrap_future(robot.behavior.say_text("I don't like you"))
def main():
@severin-lemaignan
severin-lemaignan / AnimatedArrow.qml
Last active March 12, 2023 08:29
A example showing how to animate an arrow along an arbitrary path using qml
import QtQuick 2.0
Item {
id: arrow
property var origin: null
property var end: null
property int duration: 2000
property color color: "red"
@severin-lemaignan
severin-lemaignan / rebase.py
Created October 14, 2016 16:35
Rebase with pygit2
# Purpose: rebase 'other' on top of 'master'
branchc = repo.lookup_branch("other")
branchb = repo.lookup_branch("master")
base = repo.merge_base(branchb.target, branchc.target)
treeb=repo.get(branchb.target).tree
treec=repo.get(branchc.target).tree
"""A simple implementation of a greedy transition-based parser. Released under BSD license."""
from os import path
import os
import sys
from collections import defaultdict
import random
import time
import pickle
SHIFT = 0; RIGHT = 1; LEFT = 2;
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Blender User</author>
<authoring_tool>Blender 2.66.1 r55078</authoring_tool>
</contributor>
<created>2013-04-25T16:03:12</created>
<modified>2013-04-25T16:03:12</modified>
<unit name="meter" meter="1"/>