- Authors: Alec Holmes
- Reviewers: (names here)
- Status: Planning
This file contains hidden or 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
| #include <iostream> | |
| #include <iomanip> | |
| #include <dlfcn.h> | |
| using std::cout; | |
| using std::cerr; | |
| using std::endl; | |
| void* h = []() { |
- We found a Node.js bug. When
Object.definePropertywas monkeypatched, in certain situations other things would break. For example, usingconsole.logafter the monkeypatch but not before (ifconsole.logalso appeared before the monkeypatch, it would work).- which was triggered by that kind of monkeypatch mistakenly being attached due to a syntax error in the Ruby uglifier gem’s
es5.jsshim (v2.7.1 - fixed by https://github.com/lautis/uglifier/commit/31a53a92da537af3776711471d6e9582d96dc49d, released in uglifier v3.0.0) - which was used as the js compressor for our static jekyll blog - luckily a direct dependency, and upgrading had no dependency conflicts - easy fix.
- which was triggered by that kind of monkeypatch mistakenly being attached due to a syntax error in the Ruby uglifier gem’s
- Introduced in Node 11.12.0 by: https://github.com/nodejs/node/commit/c14aa07b94d684de8e2a23a54d0e6a3c25a2e460
- Fixed in Node 12.0.0 by: https://github.com/nodejs/node/commit/908292cf1f551c614a733d858528ffb13fb3a524
- [I was running Node 11.14.0.]
TL;DR: what was the bug? (spoilers!): https://gist.github.com/trptcolin/6039cd454acfe6e820d13cbdce5e4064
- Minor text change for the company blog; let’s get it done!
JEKYLL_ENV=production bundle exec jekyll upload -e stagingLiquid Exception: ExecJS::ProgramError in /_layouts/default.html- execjs, hmm, do i have node installed?
node --version- yes, v11.14.0
bundle open jekyll-s3-uploadto read code & see this command is doing- looks like it builds before uploading (
Jekyll::Commands::Build.build(site, jekyll_config)) - https://github.com/8thlight/jekyll-s3-upload/blob/60dd52f937db21d1265cb9a7fdcdf438730e32d2/lib/jekyll/commands/s3_upload.rb#L51
- looks like it builds before uploading (
bundle exec jekyll build
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| import mxnet as mx | |
| from mxnet.gluon.model_zoo import vision | |
| import os | |
| import time | |
| batch_shape = (1, 3, 224, 224) | |
| resnet18 = vision.resnet18_v2(pretrained=True) | |
| resnet18.hybridize() | |
| resnet18.forward(mx.nd.zeros(batch_shape)) | |
| resnet18.export('resnet18_v2') |
This file contains hidden or 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
| def static_var(name, value): | |
| def helper(fun): | |
| setattr(fun, name, value) | |
| return fun | |
| return helper | |
| @static_var("my_var", 0) | |
| @static_var("my_other_var", "HAL") | |
| def foo(): |
This file contains hidden or 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
| #include <stdio.h> | |
| /* | |
| * Calculates what Ada Lovelace labeled "B7", which today we would call the 8th | |
| * Bernoulli number. | |
| */ | |
| int main(int argc, char* argv[]) | |
| { | |
| // ------------------------------------------------------------------------ | |
| // Data |
This file contains hidden or 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
| #!/usr/bin/python | |
| # @lint-avoid-python-3-compatibility-imports | |
| # | |
| # qos implement a dynamic qos for using cgroups | |
| # For Linux, uses BCC, eBPF. | |
| # | |
| # USAGE: qos.py [-h] [-qc] [--max] [interval] | |
| # requires a file name qos_setup which can changed with qosfile | |
| # file has format maj:min IOPS | |
| # i.e. 8:0 40000 |