Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
%% UnitTest for Machine Learning Online Class - Exercise 1: Linear Regression | |
% Instructions | |
% ------------ | |
% | |
% To test your code just type test_ex1 in command line | |
%% Initialization | |
clear ; close all; clc |
#!/usr/bin/env python | |
""" | |
===================================== | |
PEP 20 (The Zen of Python) by example | |
===================================== | |
Usage: %prog | |
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com |
#!/bin/bash | |
# disable_fw.sh - Reset (disable) firewall | |
# --------------------------------------------------------------------------------------------------------------- | |
# Initially Written by Vivek Gite <vivek@nixcraft.com> | |
# Rewrited by Valentin Fedulov <vasnake@gmail.com> | |
# Source: http://www.cyberciti.biz/faq/turn-on-turn-off-firewall-in-linux/ | |
# --------------------------------------------------------------------------------------------------------------- | |
# You can copy / paste / redistribute this script under GPL version 2.0 or above | |
# ============================================================= |
#!/usr/bin/env python | |
# -*- mode: python; coding: utf-8 -*- | |
# Copyright (c) Valentin Fedulov <vasnake@gmail.com> | |
''' This script intended to fix some webcam software problems. | |
It's job can be described in three points: | |
First step: find latest JPG file in SEARCH_IN folder and subfolders. | |
Next step: copy that file to WRITE_TO destination. | |
Last step: put a timestamp on lower right corner of the WRITE_TO image. |
--- rpcserver.py.orig 2014-10-25 19:03:15.841366375 +0400 | |
+++ rpcserver.py 2014-10-25 19:05:40.753392389 +0400 | |
@@ -131,7 +131,8 @@ | |
SSL transport. | |
""" | |
ssl_dir = deluge.configmanager.get_config_dir("ssl") | |
- ctx = SSL.Context(SSL.SSLv3_METHOD) | |
+ ctx = SSL.Context(SSL.SSLv23_METHOD) | |
+ ctx.set_options(SSL.OP_NO_SSLv2 & SSL.OP_NO_SSLv3) | |
ctx.use_certificate_file(os.path.join(ssl_dir, "daemon.cert")) |
// deprecated. using meapp.coffee now | |
console.log('meapp enter'); | |
var vappFactory = null; | |
define( | |
["dojo/_base/declare", "dojo/dom", 'dojo/has', | |
"vs/mpvlib"], | |
function(declare, dom, has, mpvlib) { | |
console.log('meapp dojo/define. define app classes'); |
--- core.py.orig 2014-01-14 19:37:27.287907299 +0400 | |
+++ core.py 2014-01-14 19:45:17.137864423 +0400 | |
@@ -87,14 +87,18 @@ | |
# Note: All libtorrent python bindings to set plugins/extensions need to be disabled | |
# due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369 | |
# Setting session flags to 1 enables all libtorrent default plugins | |
- self.session = lt.session(lt.fingerprint("DE", *version), flags=1) | |
+ self.session = lt.session(lt.fingerprint("DE", *version), flags=0) | |
+ self.session.add_extension("ut_pex") | |
+ self.session.add_extension("ut_metadata") |
// type classes example | |
// based on material from SICP 1.3.1 high-order procedures | |
// inspired by | |
// The Neophyte's Guide to Scala Part 12: Type Classes | |
// http://danielwestheide.com/blog/2013/02/06/the-neophytes-guide-to-scala-part-12-type-classes.html | |
// scala.math.Numeric is a type class | |
// that define an interface |
/* | |
Есть события: (время начала, время конца, тег "в метро", айди территории, флаг "вход", флаг "выход"), | |
заполнены поля могут быть как угодно, очередность событий может быть любая | |
*/ | |
case class TelEventRecord(bts: Int, ets: Int, | |
transport: String, | |
zid: Int = -1, | |
enter: Boolean = false, exit: Boolean = false) | |
/* | |
Надо обработать последовательность таких событий, чтобы получить последовательность "поездок" |