Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
| #!/usr/bin/env python3 | |
| import os | |
| import logging | |
| import psycopg2 as pg | |
| from decimal import Decimal | |
| from functools import wraps | |
| from psycopg2.pool import ThreadedConnectionPool |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <protocol name="global_input_v1"> | |
| <copyright> | |
| Copyright (C) 2017 Val Packett (val@packett.cool) | |
| Permission to use, copy, modify, and/or distribute this software for any | |
| purpose with or without fee is hereby granted. | |
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| #!/bin/bash | |
| # | |
| # open-in-firefox.sh - open URL from Termux command line in Firefox Android browser | |
| # | |
| # Works with file:// URLs too, unlike with termux-open{-url}. | |
| # | |
| exec am start --user 0 -a android.intent.action.VIEW -n org.mozilla.firefox/.App -d "$1" >/dev/null |
| function fieldSorterOptimized(fields) { | |
| var dir = [], i, l = fields.length; | |
| fields = fields.map(function(o, i) { | |
| if (o[0] === "-") { | |
| dir[i] = -1; | |
| o = o.substring(1); | |
| } else { | |
| dir[i] = 1; | |
| } | |
| return o; |
| 7/27/1978 | |
| When I was 18... 18 years old, I saw for the first time in my life... I saw an image of clarity. I saw a comic strip... a three panel comic strip that, though simple as it seemed, changed me... changed my being, changed who I am... Made me who I am... | |
| Enlightened me... | |
| The strip, Garfield, the comic strip was new... no more than maybe a month and a half since inception, since... since coming into existence... and there it was before me in print, I saw it... a comic strip... What was it called? | |
| Garfield. |
| # -*- coding: utf-8 -*- | |
| import scrapy | |
| import re | |
| import unicodedata | |
| from scrapy.crawler import CrawlerProcess | |
| from urllib.parse import urlparse | |
| class WikiSpider(scrapy.Spider): | |
| name = 'wiki_company' |
| (Dijkstra and plain A* are generally not included here as there are thousands of | |
| implementations, though I've made an exception for rare Ruby and Crystal versions, | |
| and for Thor, Mapzen's enhanced A*. ) | |
| A* Ruby https://github.com/georgian-se/shortest-path | |
| A* Crystal https://github.com/petoem/a-star.cr | |
| A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla | |
| NBA* JS https://github.com/anvaka/ngraph.path | |
| NBA* Java https://github.com/coderodde/GraphSearchPal | |
| NBA* Java https://github.com/coderodde/FunkyPathfinding |
| Go to github | |
| Create new repository [don't need to initialize with the readme (can add later)] | |
| Go to R Studio | |
| File -> New Project -> Version Control -> Git | |
| Ctrl+V repository URL from GitHub | |
| File -> New -> Markdown, enter Title, etc. | |
| In the Markdown window, change "output=html_document" to "output=github_document" | |
| Knit the document for the first time, will prompt you to save | |
| Save as Title.rmd | |
| In the "git" tab of the R studio Environment window, you will notice that the knit produced: |
| // Place your key bindings in this file to overwrite the defaults | |
| [{ | |
| "key": "ctrl+a", | |
| "command": "editor.action.selectAll" | |
| }, | |
| { | |
| "key": "ctrl+x", | |
| "command": "editor.action.clipboardCutAction" | |
| }, | |
| { |