Skip to content

Instantly share code, notes, and snippets.


Marco Forte MarcoForte

Block or report user

Report or block MarcoForte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MarcoForte / colornet.prototxt
Last active Jul 20, 2017
For visualization online
View colornet.prototxt
name: "color"
input: "data"
input_dim: 1
input_dim: 4
input_dim: 256
input_dim: 256
layer {
name: "data_l_ab_mask"
type: "Input"
top: "data_l_ab_mask"
MarcoForte / REDNet_ch3.prototxt
Created Jul 5, 2017
Just for quick visualisation with netscope
View REDNet_ch3.prototxt
name: "RED-Net"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 256
input_dim: 256
# conv1
layer {
name: "conv1"
View FactorFactorial
"cells": [
"cell_type": "markdown",
"metadata": {},
"source": [
"# Primarily about computing factorials"
View Evolution of a Python
#Newbie programmer
def factorial(x):
if x == 0:
return 1
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
MarcoForte /
Last active Aug 29, 2015
Get audio or video file duration with Powershell through Python on Windows
""" This module shows how to retrieve the duration of an audio or video file on Windows by getting the file details
with Powershell, tested on Powershell 4. """
import subprocess
myFileLocation = r"'C:\Users\Marco\Untitled.wma'" # or myFileLocation = 'C:\\Users\\yourname\\test.mp4'
def getFileDuration(fileLocation):
# Calls the Powershell script that gets the file duration
return subprocess.check_output([r'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe',
'(((New-Object -COMObject Shell.Application).Namespace((Split-Path {0})))).GetDetailsOf((((New-Object -COMObject Shell.Application).Namespace((Split-Path {0}))).ParseName((Split-Path {0} -Leaf))), 183);'.format(myFileLocation)]).decode("utf-8").splitlines()[0]
You can’t perform that action at this time.