A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);| model = xgb.Booster(model_file='your.model') | |
| model.feature_names = xgtrain.feature_names # Note: xgtrain is your train file with features. | |
| model.feature_types = xgtrain.feature_types | |
| # Number of trees in the model | |
| num_trees = len(model.get_dump()) | |
| # dump all of the trees to tree folder | |
| for tree_index in range(num_trees): | |
| dot = xgb.to_graphviz(model, num_trees=tree_index) |
| OIFS=$IFS; | |
| IFS=","; | |
| # fill in your details here | |
| dbname=DBNAME | |
| user=USERNAME | |
| pass=PASSWORD | |
| host=HOSTNAME:PORT | |
| # first get all collections in the database |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| function deque_init(d) {d["+"] = d["-"] = 0} | |
| function deque_is_empty(d) {return d["+"] == d["-"]} | |
| function deque_push_back(d, val) {d[d["+"]++] = val} | |
| function deque_push_front(d, val) {d[--d["-"]] = val} | |
| function deque_back(d) {return d[d["+"] - 1]} | |
| function deque_front(d) {return d[d["-"]]} | |
| function deque_pop_back(d) {if(deque_is_empty(d)) {return NULL} else {i = --d["+"]; x = d[i]; delete d[i]; return x}} | |
| function deque_pop_front(d) {if(deque_is_empty(d)) {return NULL} else {i = d["-"]++; x = d[i]; delete d[i]; return x}} | |
| function deque_print(d){x="["; for (i=d["-"]; i<d["+"] - 1; i++) x = x d[i]", "; print x d[d["+"] - 1]"]; size: "d["+"] - d["-"] " [" d["-"] ", " d["+"] ")"} |
| List of currenies is generated using python. | |
| Dependencies | |
| ============ | |
| pip install pycountry pytz requests |
The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:
export syntax, without breaking consumers that do require("function-module")()?import syntax, while not demanding that the module author rewrites his code to ES6 export?@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.
This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.
| /** | |
| * D Holbrook | |
| * | |
| * Code Club: PO1 | |
| * | |
| * (*) Define a binary tree data structure and related fundamental operations. | |
| * | |
| * Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported: | |
| * | |
| * Constructors |
| sealed abstract class Bound[+T] { val value : T } | |
| case class Closed[T : Ordering](value : T) extends Bound[T] | |
| case class Opened[T : Ordering](value : T) extends Bound[T] | |
| object Bound { | |
| implicit def ordering[T: Ordering]: Ordering[Bound[T]] = Ordering.by((_: Bound[T]).value) | |
| } | |
| object BoundDemo { | |
| def main(args : Array[String]) : Unit = { |