In order of first appearance in The Morning Paper.
This file contains 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
package main | |
import ( | |
"context" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"github.com/containerd/containerd/content/local" | |
"github.com/containerd/containerd/images" |
This file contains 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
version: "3.3" | |
services: | |
elasticsearch: | |
image: 'docker.elastic.co/elasticsearch/elasticsearch:5.6.1' | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
volumes: | |
- elasticsearchvol:/usr/share/elasticsearch/data |
This file contains 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
cmder | |
D:PAI(A;OICI;FA;;;SY)(A;OICI;0x1200a9;;;AU)(A;OICI;FA;;;BA)S:AI(ML;OICI;NW;;;ME) | |
cmder\config\.history | |
D:AI(A;;0x1200af;;;AU)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;;NW;;;ME) | |
cmder\config\ConEmu.xml | |
D:AI(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;ID;NW;;;HI) | |
cmder\config\settings | |
D:AI(A;;FA;;;AU)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;ID;NW;;;HI) | |
cmder\config\user-ConEmu.xml | |
D:AI(A;;FA;;;S-1-5-21-3296739879-1852959184-2879946361-1107)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;AU)(A;ID;FA;;;BA)S:AI(ML;;NW;;;ME) |
This file contains 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
# Add "contrib non-free" to /etc/apt/sources.list | |
# Example: | |
deb http://<some-host>/debian/ stretch main contrib non-free | |
# Then: | |
apt-get install update && apt-get install -y firmware-realtek firmware-linux-nonfree | |
# Essentials |
This file contains 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
int doubler(int x) { | |
return 2 * x; | |
} |
This file contains 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
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
This file contains 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
""" | |
Model of a Zombie outbreak in France, starting in Grenoble | |
This is a rewrite from this blog post by Max Berrgren: | |
http://maxberggren.github.io/2014/11/27/model-of-a-zombie-outbreak/ | |
with a different country, a slightly different model, and different | |
libraries. The map of population density is taken from Wikimedia Commons |
As of version 3.3, python includes the very promising concurrent.futures
module, with elegant context managers for running tasks concurrently. Thanks to the simple and consistent interface you can use both threads and processes with minimal effort.
For most CPU bound tasks - anything that is heavy number crunching - you want your program to use all the CPUs in your PC. The simplest way to get a CPU bound task to run in parallel is to use the ProcessPoolExecutor, which will create enough sub-processes to keep all your CPUs busy.
We use the context manager thusly:
with concurrent.futures.ProcessPoolExecutor() as executor:
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
NewerOlder