Skip to content

Instantly share code, notes, and snippets.

View Nolski's full-sized avatar

Mike Nolan Nolski

View GitHub Profile
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
@Nolski
Nolski / bug-report.md
Last active September 4, 2019 09:18
Useful Github Issue Templates

Description

Expected Behavior

Actual Behavior

@Nolski
Nolski / .spacemacs
Created January 28, 2019 11:55
Spacemacs Config
;; -*- 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
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)
/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)
$('.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
/**
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
@Nolski
Nolski / asdf.js
Last active April 14, 2017 22:30
var code;
if(/^[a-zA-Z()]$/.test(event.key)) {
code = event.key.toUpperCase().charCodeAt(0);
} else {
code = event.which();
}
press(keydown(code));
$( document ).keypress(function(e) {
console.log( "Keycode for " + e.key + "is: ", e.keyCode );
});