Skip to content

Instantly share code, notes, and snippets.

View draganmarjanovic's full-sized avatar

Dragan Marjanovic draganmarjanovic

View GitHub Profile
@draganmarjanovic
draganmarjanovic / poylmer-element-import.py
Last active February 16, 2016 21:15
The script scans the current directory for polymer elements and then automatically generates a master import file - to save the user time.
# README
# How to use:
# This script creates a file called 'element-import.html' which is filled with
# the polymer import statements automatically from the folders in the directory
# from which this script is run.
# Import OS to allow reading of directories
import os
# Gets list of folders within the current directory
@draganmarjanovic
draganmarjanovic / videoconv.py
Last active November 24, 2015 12:58
Convert any supported video file type to MP4.
#!/usr/bin/python
import os
from os import listdir
from os.path import isfile, join
# Preferences
supported_formats = ["mkv", "mp4", "wmv", "flv", "m4v"]
output_format = "mp4"
@draganmarjanovic
draganmarjanovic / time_casualty.json
Last active August 29, 2015 14:24
Data structure for passing of hour / casualty information. Sum of fatality counts should be 100 and time is given in 24hr time 0-24.
{
"description": "[{str(time),int(casualties)}]",
"data": [
{
"time": 01,
"fatality_count": 25
},
{
"time": 02,
"fatality_count": 25
@draganmarjanovic
draganmarjanovic / main.ino
Created May 31, 2015 14:51
Blackbox Detection Craft
// The University of Queensland
// Engineering - ENGG1100
// White Team
// Year: 2015
// Author: Dragan Marjanovic
// Libraries and Headers
#include <Servo.h>
#include <Wire.h> //I2C Arduino Library