Skip to content

Instantly share code, notes, and snippets.

View sshopov's full-sized avatar

Stoyan Shopov sshopov

View GitHub Profile
@sshopov
sshopov / parkrun_starwars.py
Created July 20, 2017 05:42
This program was run on the EV3D4 (R2D2 look-a-like) Lego Mindstorms robot at Mount Barker parkrun 175. The droid help deliver the welcome speech. It had queued lines and they were delivered when the remote control was pressed (to allow for interaction with the presenter). The photo album can be found here: https://www.facebook.com/mountbarkerpa…
#!/usr/bin/env python3
'''
Source name: parkrun_starwars.py
Author(s): Stoyan Shopov
Python Version: 2.7, 3.* 32-bit or 64-bit
License: LGPL
Description:
This program was run on the EV3D4 (R2D2 look-a-like) Lego Mindstorms at Mount Barker parkrun 175.
@sshopov
sshopov / WebAppBuilderAppLayersListWidgetPerfTest.js
Created May 11, 2018 06:26
This is a handy hack for testing ArcGIS Web AppBuilder app's performance. I put it together to better understand a LayerList widget problem (described here: https://community.esri.com/message/674623-turning-the-layer-list-widget-on-causes-performance-degradation).
var WidgetManager = require("jimu/WidgetManager");
var Extent = require("esri/geometry/Extent");
var wm = WidgetManager.getInstance();
var map = wm.getAllWidgets()[0].map;
//Fires when one or more layers begins updating their content. There is a gap between the set-extent and update-start event and it can be quite large.
//Fires after layers that are updating their content have completed.
var listener1 = map.on('update-start',
function(e){
startTime = new Date().getTime()/1000;
'''
Takes a folder and converts all .mp4 files in it to .mp3.
It saves the mp3 files to the same directory using the original name but with an .mp3 extension.
Based on:
https://www.tutorialexample.com/a-complete-guide-to-python-convert-mp4-to-mp3-with-moviepy-python-tutorial/
Pre-requisites:
Python 3.7
pip install moviepy