command /bundle bundles the working code as a zip file for download. Users will fill in the value of the programming-language. Default value of programming-language is python. Do the following 0. create a project directory structure 1. Add context sensitive logging 2. Add exception handling 3. Follow language style standards 4. Provide a dependency file 5. Provide a build file 6. Provide detailed README.md 7. Provide a blank LICENSE file.
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 concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor | |
import time | |
import threading | |
import os | |
import click | |
def predict_pipeline(compute_unit, model_name, framework): | |
#todo -- force cuda usage | |
from transformers import pipeline | |
unmasker = pipeline('fill-mask', model=model_name, framework=framework) |
Designed by Stephen Few, a bullet chart “provides a rich display of data in a small space.” A variation on a bar chart, bullet charts compare a given quantitative measure (such as profit or revenue) against qualitative ranges (e.g., poor, satisfactory, good) and related markers (e.g., the same measure a year ago). Layout inspired by Stephen Few. Implementation based on work by Clint Ivy, Jamie Love of N-Squared Software and Jason Davies. The "update" button randomizes the values slightly to demonstrate transitions.
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
{ | |
"configurations": [ | |
{ | |
"nagios-env": { | |
"nagios_contact": "admin@localhost" | |
} | |
} | |
], | |
"host_groups": [ | |
{ |
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 Employee = Backbone.AssociatedModel.extend({ | |
parse:function (obj) { | |
if (obj.sex === "M") { | |
obj.prefix = "Mr."; | |
} | |
return obj; | |
} | |
}); | |
var Company = Backbone.AssociatedModel.extend({ | |
relations:[ |
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 Club = Backbone.AssociatedModel.extend({ | |
relations:[{ | |
type:Backbone.Many, | |
key:'members', | |
relatedModel:function (relation, attributes) { | |
return function (attrs, options) { | |
if (_.isArray(attrs.dependents)) { | |
return new Employee(attrs); | |
} |
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
define([ | |
"backbone.associations", | |
"Person" | |
], function(Associations, Person){ | |
var House = Backbone.AssociatedModel.extend({ | |
relations:[{ | |
key:"person", | |
type:Backbone.One, | |
relatedModel: function(){ return require("Person");} |
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 Fruit = Backbone.AssociatedModel.extend(); | |
var Banana = Fruit.extend(); | |
var Tomato = Fruit.extend(); | |
var fruitStore = {}; | |
fruitStore['Banana'] = [ | |
new Banana({species:"Robusta", id:3}), | |
new Banana({species:"Yallaki", id:4}), | |
new Banana({species:"Genetic Modification", id:5}), |
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 MyApp = { | |
Models:{} | |
}; | |
var Models = MyApp.Models; | |
Models.Zoo = Backbone.AssociatedModel.extend({ | |
relations: [{ | |
type: Backbone.Many, | |
key: 'animals', |
NewerOlder