Let's remove any old versions of Docker if they exist:
sudo yum remove docker \
docker-common \
docker-selinux \
docker-engine| # All credit: http://stackoverflow.com/questions/4006324/how-to-atomically-delete-keys-matching-a-pattern-with-redis | |
| redis-cli [options] KEYS "prefix:*" | xargs redis-cli [options] DEL |
| #/etc/systemd/system/test.service | |
| [Unit] | |
| Description=Test Systemd Service | |
| [Service] | |
| ExecStartPre=/usr/bin/echo -e "\033[0;33m Pre start \033[0m" | |
| ExecStart=/usr/bin/sleep 10 | |
| ExecStartPost=/usr/bin/echo -e "\033[0;33m Post start \033[0m" |
| Annotator,Description,Version,Annotator Approach,Annotator Model | |
| Tokenizer*,Identifies tokens with tokenization open standards,Opensource,-,+ | |
| Normalizer*,Removes all dirty characters from text,Opensource,-,+ | |
| Stemmer*,Returns hard'-stems out of words with the objective of retrieving the meaningful part of the word,Opensource,+,- | |
| Lemmatizer*,Retrieves lemmas out of words with the objective of returning a base dictionary word,Opensource,-,+ | |
| RegexMatcher*,Uses a reference file to match a set of regular expressions and put them inside a provided key.,Opensource,+,+ | |
| TextMatcher*,Annotator to match entire phrases (by token) provided in a file against a Document,Opensource,+,+ | |
| Chunker*,Matches a pattern of part'-of'-speech tags in order to return meaningful phrases from document,Opensource,+,- | |
| DateMatcher*,Reads from different forms of date and time expressions and converts them to a provided date format,Opensource,+,- | |
| SentenceDetector*,Finds sentence bounds in raw text. Applies rules from Pragmatic Segmenter,Opensou |
| """This program is exactly the same as that of | |
| https://gist.github.com/zzzeek/33943060f7a08cf9e82bf8df1f0f75de , | |
| with the exception that the add_and_select_data function is written in | |
| synchronous style. | |
| UPDATED!! now includes refinements by @snaury and @Caselit . SIMPLER | |
| AND FASTER!! | |
| from datetime import datetime | |
| from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from flask_security import current_user | |
| class AuditMixin(object): | |
| created_at = Column(DateTime, default=datetime.now) | |
| updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
asyncio: In Python 3.4, the asyncio.coroutine decorator was used to label a function as acting as a coroutine that was meant for use with asyncio and its event loop.yield from to await in Python 3.5| def delete(key, dict_obj): | |
| """Deletes element from dict_obj accessing by complex key | |
| Args: | |
| key (str): Complex key to your value (separated by dots) | |
| dict_obj (dict): Your dictionary | |
| Raises: | |
| KeyError: if object doesn't contain key |
| from starlette.applications import Starlette | |
| from starlette.responses import StreamingResponse | |
| from starlette.requests import Request | |
| from starlette.routing import Route | |
| from pathlib import Path | |
| from typing import IO, Generator | |
| """ | |
| Stream a file, in this case an mp4 video, supporting range-requests using starlette |
| import asyncpg | |
| import ujson | |
| class Transaction: | |
| def __init__(self, pool): | |
| self.pool = pool | |
| async def __aenter__(self): | |
| self.acquire_context = self.pool.acquire() |