Typed Namespaces ensure object typing is correct in the IDE!
import yaml
These are a few of my favorite courses on tech topics
Aside: when writing python packages (not just scripts), consider haveing the phrase "If its name has no dots, you cannot use relative imports" tattooed someplace readily accessible.
Aside 2: In python multiprocessing, you cannot use interactive telatype to interact with subprocesses, so if your subprocess that reaches a a call to pdb.set_trace()
, the sub-process will simply hang waiting for a reponse, which can be a real pain to debug
{"lastUpload":"2022-03-09T18:48:13.706Z","extensionVersion":"v3.4.3"} |
----------------------------------------- | |
-- simple database | |
----------------------------------------- | |
SELECT CONVERT(VARCHAR(140),s.name) AS [Schema Name], | |
CONVERT(VARCHAR(140),o.name) AS [Object Name], | |
CONVERT(VARCHAR(140),c.name) AS [Field Name], | |
CONVERT(VARCHAR,t.name) AS [Field Type] , | |
CONVERT( VARCHAR, CASE | |
WHEN o.type = 'U' THEN 'Table' |
[ | |
{ | |
"key": "ctrl+h", | |
"command": "workbench.action.focusPreviousGroup" | |
}, | |
{ | |
"key": "ctrl+l", | |
"command": "workbench.action.focusNextGroup" | |
}, | |
{ |
When imputing using the sklearn.impute.SimpleImputer
with the option strategy="most_frequent"
calling the .fit()
method takes an obserdly long time. This happens scipy.stats.mode
is rediculously inefficient for string variables. For example, imputing a single feature with half a million values takes ~15 minutes without the shim and with this shim it takes less than one milliseond.
Usage:
import SimpleImputerShim # thats it!
Having to add typings to each require is almost as useless as not having typings at all. For example,
import DB from "nedb"
const myCollection = new nedb(DB)
// insert one kind of document
myCollection.insert<{name:string}>({name:"nedb"})
// expect to find a different kind of document
myCollection.findOne<{name:number}>({},(err,doc) => console.log(typeof doc.name))
function kernelDensityEstimator(kernel:{(x:number):number}, X:number[]) { | |
return function(V:number[]) { | |
return X.map(function(x) { | |
return [x, d3.d3.mean(V, function(v:number) { return kernel(x - v); })]; | |
}); | |
}; | |
} | |
function kernelEpanechnikov(k:number): {(x:number):number}{ |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; |
<svg height="210" width="400"> | |
<path d="M150 0 L75 200 L225 200 Z" /> | |
Sorry, your browser does not support inline SVG. | |
</svg> |