Skip to content

Instantly share code, notes, and snippets.

View obengwilliam's full-sized avatar
🎯
Focusing

Obeng William obengwilliam

🎯
Focusing
View GitHub Profile
@obengwilliam
obengwilliam / mbg.py
Last active May 6, 2021 20:09
mbg.py
self.init_plot(self.FEATURES)
has_converged = False
iter = 1
while not has_converged:
print(f"iter {iter}")
minibatch = random.sample(range(0, self.DATAPOINTS), self.MINIBATCH_SIZE)
for k in range(self.FEATURES):
@obengwilliam
obengwilliam / pyenv.md
Created February 16, 2021 16:10
pyenv
@obengwilliam
obengwilliam / Isomap
Created November 16, 2020 10:54 — forked from Mashimo/ Isomap
Data dimensionality reduction via isomap
Isomap is a nonlinear dimensionality reduction method.
The algorithm provides a simple method for estimating the intrinsic geometry of a data manifold based on a rough estimate
of each data point’s neighbours
@obengwilliam
obengwilliam / vim.md
Last active August 7, 2020 12:02
Vim #vim

Move tabs

in command mode type tabm [index from 0 to n represent tabs from your left to right]

Windows

Swap Ctrl + W + R

@obengwilliam
obengwilliam / antd_sc_example.js
Created May 5, 2020 08:17 — forked from newswim/antd_sc_example.js
Wrapping Ant Design components with Styled Components
import { Link } from 'react-router-dom'
import { Badge, Col, Menu } from 'antd'
const StyledBadge = styled(Badge)`
.ant-badge-count {
background-color: #7ECBBF;
color: white;
box-shadow: 0 0 0 1px #d9d9d9 inset;
}
`
@obengwilliam
obengwilliam / mongoose connection
Created April 26, 2020 14:35
quickly connect to mongodb using mongoose #mongoose #mongodb
'use strict';
const mongoose = require('mongoose');
run().catch(err => console.log(err));
async function run() {
mongoose.set('useUnifiedTopology', true);
mongoose.set('useNewUrlParser', true);
@obengwilliam
obengwilliam / bundle.js
Created April 19, 2020 17:12 — forked from jackgill/bundle.js
A node.js script to create a bundle containing an npm package, and all of its dependencies.
/*
* This script will download a package (and all of its dependencies) from the
* online NPM registry, then create a gzip'd tarball containing that package
* and all of its dependencies. This archive can then be copied to a machine
* without internet access and installed using npm.
*
* The idea is pretty simple:
* - npm install [package]
* - rewrite [package]/package.json to copy dependencies to bundleDependencies
* - npm pack [package]
@obengwilliam
obengwilliam / README-badges.md
Created April 9, 2020 03:55 — forked from tterb/README-badges.md
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@obengwilliam
obengwilliam / kubectl.md
Last active February 29, 2020 18:01 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@obengwilliam
obengwilliam / Activate Office 2019 for macOS VoL.md
Created February 16, 2020 21:29 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref