Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| ;; -*- mode: lisp -*- | |
| ;; | |
| ;; A quick and dirty tree shaker for SBCL. Basically, it destroys the | |
| ;; package system and does a gc before saving the lisp image. Gives | |
| ;; about a 40% reduction in image size on a basic hello world test. | |
| ;; Would like to hear how it works on larger projects. | |
| ;; | |
| ;; Original idea from: https://groups.google.com/d/msg/comp.lang.lisp/6zpZsWFFW18/WMy4PyA9B4kJ | |
| ;; | |
| ;; Burton Samograd |
"Roswell Script" is implementation-independent Common Lisp scripting program which uses Roswell. Although Roswell itself is a unified interface to Common Lisp implementations, it also encourages writing scripts with it.
To start writing it, run ros init in your terminal:
$ ros init
Usage: ros init [template] name [options...]
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from numpy import random | |
| import seaborn as sns | |
| from sklearn import metrics | |
| from puwrapper import PUWrapper | |
| from sklearn.linear_model import LogisticRegression,LogisticRegressionCV | |
| sns.set_style("white") | |
| random.seed(0) |
| import numpy as np | |
| from sklearn.linear_model import SGDClassifier | |
| from sklearn.cross_validation import StratifiedKFold | |
| from sklearn.grid_search import GridSearchCV | |
| class PUClassifier(object): | |
| def __init__(self, trad_clf=None, n_folds=2): | |
| self.trad_clf = trad_clf | |
| self.n_folds = n_folds |
| #ifndef RANGE_HPP_ | |
| #define RANGE_HPP_ | |
| template<typename T> class RangeIterator; | |
| template<typename T> | |
| class Range | |
| { | |
| T _start, _end, _step; |
| ;;; -*- coding:utf-8; mode:lisp -*- | |
| (in-package :cl-random-forest) | |
| ;;; Small dataset ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| (defparameter *n-class* 4) | |
| (defparameter *target* | |
| (make-array 11 :element-type 'fixnum |
zoomAutenticationTool can be used to escalat| # PyTorch bit packing inspired by np.packbits / np.unpackbits. Feature request: https://github.com/pytorch/pytorch/issues/32867 | |
| import math | |
| import torch | |
| def tensor_dim_slice(tensor, dim, dim_slice): | |
| return tensor[(dim if dim >= 0 else dim + tensor.dim()) * (slice(None), ) + (dim_slice, )] | |
| #@torch.jit.script | |
| def packshape(shape, dim : int = -1, mask : int = 0b00000001, dtype = torch.uint8, pack = True): |