tf method | tfjs method |
---|---|
tf.argsort(values,axis=-1,direction='ASCENDING',stable=False,name=None) | tbd |
tf.audio.decode_wav(contents,desired_channels=-1,desired_samples=-1,name=None) | tbd |
tf.audio.encode_wav(audio,sample_rate,name=None) | tbd |
tf.autograph.experimental.do_not_convert(func=None) | tbd |
tf.autograph.set_verbosity(level,alsologtostdout=False) | tbd |
tf.autograph.to_code(entity,recursive=True,experimental_optional_features=None) | tbd |
tf.autograph.to_graph(entity,recursive=True,experimental_optional_features=None) | tbd |
tf.autograph.trace(*args) | tbd |
torch method | tfjs method |
---|---|
torch.is_tensor(obj) | tbd |
torch.is_storage(obj) | tbd |
torch.is_floating_point(input) -> (bool) | tbd |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
class Channel(MPTTModel): | |
# ... | |
tags = models.ManyToManyField('tags.Tag', blank=True, through='RankedChannelTag', related_name='ranked_tags') | |
# ... | |
class RankedChannelTag(models.Model): | |
channel = models.ForeignKey(Channel, on_delete=models.CASCADE) | |
tag = models.ForeignKey('tags.Tag', on_delete=models.CASCADE) | |
rank = models.SmallIntegerField(default=0) |
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
/channels | |
status: 200 : application/json | |
paginated, root channels | |
Example: | |
[ Channel, Channel, ... ] | |
Channel Fields: | |
(id, display_name, has_children) | |
Params/Filters: | |
search/q - Search query. | |
parent - Id of parent channel (gets all children) |
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
$('.circle').mouseover( | |
function() { | |
var sound = $(this).attr('class').split(' ')[2].replace('piano', 'sound'); // this is a monstrosity | |
sound.play(); | |
} | |
); | |
$('.circle').mouseout( | |
function() { | |
var sound = $(this).attr('class').split(' ')[2].replace('piano', 'sound'); // this is a monstrosity |
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
/** | |
Copyright 2012 Michael Morris-Pearce | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 code; | |
if(/^[a-zA-Z()]$/.test(event.key)) { | |
code = event.key.toUpperCase().charCodeAt(0); | |
} else { | |
code = event.which(); | |
} | |
press(keydown(code)); |
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
$( document ).keypress(function(e) { | |
console.log( "Keycode for " + e.key + "is: ", e.keyCode ); | |
}); |
NewerOlder