Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
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
"""JSON serializer for Elasticsearch Python client that | |
uses the 'orjson' library for performance. | |
https://github.com/ijl/orjson | |
""" | |
# Implement the Serializer.loads() and .dumps() APIs w/ orjson: | |
import orjson | |
from elasticsearch import SerializationError, JSONSerializer |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare git@github.com:usi-systems/easytrace.git
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
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py | |
$ cd <download location> | |
$ sudo -H python ./get-pip.py | |
Installing pip also installs Python3 | |
To run Python3 | |
$ python3 | |
Install pip3 by just executing the same file as in the step above, but this time using Python3 | |
$ sudo -H python3 ./get-pip.py |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
First,
hg clone http://bitbucket.org/durin42/hg-git HGGIT_PATH
Second, in "mercurial.ini" add:
[extensions]
hggit=HGGIT_PATH\hggit
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
<!doctype html> | |
<html> | |
<head> | |
<title>Resolution independent rendering of Bezier curves in WebGL</title> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<script src="glMatrix-0.9.6.min.js"></script> | |
<script id="shader-vs" type="x-shader/x-vertex"> | |
attribute vec3 aVertexPosition; | |
attribute vec2 aBezierCoord; |
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
def sanitize(untrusted_html, additional_tags=None): | |
"""Strips potentially harmful tags and attributes from HTML, but preserves | |
all tags in a whitelist. | |
Passing the list additional_tags will add the specified tags to the whitelist. | |
The sanitizer does NOT encode reserved characters into XML entities. It is up | |
to the template code, if any, to take care of that. | |
Based on the work of: |