This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var recorderWidget = new RecorderWidget({closeCallback:function(){alert("close me")}}); | |
showRecordDialog(recorderWidget.render().el); | |
RecorderView = Backbone.View.extend({ | |
isRecordReady = false, | |
recordType, | |
// parent dialog holder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application: filehangar | |
version: live | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: /remote_api | |
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py | |
login: admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="fb-root"></div> | |
<script> | |
(function() { | |
window.fbAsyncInit = function() { | |
FB.Event.subscribe('edge.create', function(response) { | |
_gaq.push(['_trackSocial', 'facebook', 'like', response]); | |
}); | |
FB.Event.subscribe('edge.remove', function(response) { | |
_gaq.push(['_trackSocial', 'facebook', 'unlike', response]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TAVARES and PADILHA approach | |
def merge_line_segments(line_i, line_j, use_log=False): | |
# line distance | |
line_i_length = math.hypot(line_i[1][0] - line_i[0][0], line_i[1][1] - line_i[0][1]) | |
line_j_length = math.hypot(line_j[1][0] - line_j[0][0], line_j[1][1] - line_j[0][1]) | |
# centroids | |
Xg = line_i_length*(line_i[0][0]+line_i[1][0]) + line_j_length*(line_j[0][0]+line_j[1][0]) | |
Xg /= 2 * (line_i_length + line_j_length) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ignite.metrics import Metric | |
from ignite.exceptions import NotComputableError | |
# These decorators helps with distributed settings | |
from ignite.metrics.metric import sync_all_reduce, reinit__is_reduced | |
# Based on https://pytorch.org/ignite/metrics.html#how-to-create-a-custom-metric | |
# Can be impoved by TopK https://pytorch.org/ignite/metrics.html#ignite.metrics.TopKCategoricalAccuracy | |
class PixelToPixelAccuracy(Metric): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Usefull links: *) | |
(* https://en.wikipedia.org/wiki/Brouwer–Heyting–Kolmogorov_interpretation *) | |
(* https://en.wikipedia.org/wiki/Intuitionistic_logic#Non-interdefinability_of_operators *) | |
(* Program = Proof, Book by Samuel Mimram, https://www.reddit.com/r/functionalprogramming/comments/k57s1y/program_proof_by_samuel_mimram_free_pdf/ *) | |
(* https://builds.openlogicproject.org/content/intuitionistic-logic/introduction/bhk-interpretation.pdf *) | |
(* https://math.stackexchange.com/questions/838184/can-one-prove-by-contraposition-in-intuitionistic-logic *) | |
(* Code: *) | |
type ('a , 'b) coprod = Left of 'a | Right of 'b |