Solution: Ubuntu distros lower than 18.10 will not work in this laptop, as minimum kernal version required is 4.18.
So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI mode
Solution: Ubuntu distros lower than 18.10 will not work in this laptop, as minimum kernal version required is 4.18.
So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI mode
| """ | |
| This gist shows how to run asyncio loop in a separate thread. | |
| It could be useful if you want to mix sync and async code together. | |
| Python 3.7+ | |
| """ | |
| import asyncio | |
| from datetime import datetime | |
| from threading import Thread | |
| from typing import Tuple, List, Iterable |
You will need:
This guide is based on Ubuntu, for other OS, use their package manager instead.
When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:
| const Promise = require('bluebird'); | |
| const path = require('path'); | |
| const fs = require('fs-extra'); | |
| const stat = Promise.promisify(fs.stat); | |
| const glob = Promise.promisify(require('glob')); | |
| const tarstream = require('tar-stream'); | |
| const zlib = require('zlib'); | |
| const express = require('express'); | |
| function targzGlobStream(globString, options) { |
Command Flags
| Flag | Options | Description |
|---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
| # Pass the env-vars to MYCOMMAND | |
| eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
| # … or ... | |
| # Export the vars in .env into your shell: | |
| export $(egrep -v '^#' .env | xargs) |
| Using iterators and generators in multi-threaded applications | |
| 24 May 2012 – Bangalore | |
| Python iterators and generators have almost the same behavior, but there are subtle differences, especially when the iterator/generator is used in a multi-threaded application. | |
| Here is an example to demonstrate that behavior. | |
| import threading | |
| def count(): |
| (module | |
| (func $addTwo (param i32 i32) (result i32) | |
| (i32.add | |
| (get_local 0) | |
| (get_local 1))) | |
| (export "addTwo" (func $addTwo))) |