-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,
- act2vec, trace2vec, log2vec, model2vec https://link.springer.com/chapter/10.1007/978-3-319-98648-7_18
- apk2vec https://arxiv.org/abs/1809.05693
- app2vec http://paul.rutgers.edu/~qma/research/ma_app2vec.pdf
- ast2vec https://arxiv.org/abs/2103.11614
- attribute2vec https://arxiv.org/abs/2004.01375
- author2vec http://dl.acm.org/citation.cfm?id=2889382
- baller2vec https://arxiv.org/abs/2102.03291
- bb2vec https://arxiv.org/abs/1809.09621
''' | |
Run the following commands (bc. gists don't allow directories) | |
pip install flask django dj-database-url psycopg2 | |
mkdir -p app/migrations | |
touch app/__init__.py app/migrations/__init__.py | |
mv models.py app/ | |
python manage.py makemigrations | |
python manage.py migrate |
Django channels are official way for implementing async messaging in Django.
The primary caveat when working with GraphQL subscription is that we can't serialize message before broadcasting it to Group of subscribers. Each subscriber might use different GraphQL query so we don't know how to serialize instance in advance.
See related issue
/** | |
* VIN decoder. | |
* | |
* kevinboutin on 3/11/18. | |
* | |
* My VIN for testing is WBA3A5G59DNP26082 so use the following command to invoke: | |
* node vindecoder WBA3A5G59DNP26082 | |
* | |
* Examples: | |
* KM8JM12D56U303366 |
import axios from 'axios'; | |
import Config from './app.config'; | |
const instance = axios.create({ | |
baseURL: Config.apiPath, | |
}); | |
/** | |
* Catch the AunAuthorized Request | |
*/ |
I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service
. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.
Overall, it's a fairly simple process consisting of the following few steps.
Open the service file with $ sudo vi /lib/systemd/system/{name}.service
Modify the [Service]
section: