Skip to content

Instantly share code, notes, and snippets.

View jdrew1303's full-sized avatar
probably drinking coffee

James Drew jdrew1303

probably drinking coffee
View GitHub Profile
@jdrew1303
jdrew1303 / bag_to_images.py
Created December 26, 2019 02:13 — forked from wngreene/bag_to_images.py
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
@jdrew1303
jdrew1303 / 00_cqf_ml_elective.md
Created December 26, 2019 02:13 — forked from yhilpisch/00_cqf_ml_elective.md
Machine Learning for Finance | Dr. Yves J. Hilpisch | CQF Elective | London, 23. May 2017

Machine Learning for Finance

A CQF elective with Dr. Yves J. Hilpisch, The Python Quants GmbH

General resources:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdrew1303
jdrew1303 / message_basics.sh
Created August 16, 2019 20:12 — forked from kor01/message_basics.sh
[ros msg] ros message #ros
# show message definition
rosmsg show sensor_msgs/CameraInfo
# show message type
rostopic type rosout
# quick message definition view
rostopic type rosout | rosmsg show
# echo message live content
@jdrew1303
jdrew1303 / publish_video.py
Last active August 1, 2019 04:17 — forked from wngreene/publish_video.py
Publish a video as ROS messages.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Massachusetts Institute of Technology
"""Publish a video as ROS messages.
"""
import argparse
@jdrew1303
jdrew1303 / CSI-2-picamera.py
Created August 1, 2019 04:09 — forked from OndraZizka/CSI-2-picamera.py
OpenCV, Python, camera, Raspberry Pi
# sudo apt-get install python-picamera
import picamera
from time import sleep
camera = picamera.PiCamera()
camera.capture('image.jpg')
camera.start_preview()
camera.vflip = True
camera.hflip = True

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@jdrew1303
jdrew1303 / gcc compiler optimization for arm systems.md
Created July 17, 2019 00:05 — forked from fm4dd/gcc compiler optimization for arm systems.md
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

Fundamentals: why state machines?

States. The final frontier. These are the voyages of an enterprising developer. Her eternal mission: to explore strange new techniques, to seek out better ways to engineer for mental models and new design patterns. To boldly go where a few awesome devs have gone before.

So you’ve found our poignant guide to SCXML and surely you’re wondering “Why should I want to go out of my way to use formal state machines?” or something like that. Hopefully this introduction addresses that kind of question.

An example: Nancy’s RPG

The problem