The program below can take one or more plain text files as input. It works with python2 and python3.
Let's say we have two files that may contain email addresses:
- file_a.txt
foo bar
ok [email protected] sup
[email protected],wyd
hello world!
# Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5 | |
# "6" for CentOS6 or Amazon Linux, "7" for CentOS7 | |
CENTVER="6" | |
OPENSSL="openssl-1.1.0-pre5" | |
NGINX="nginx-1.11.0-1" | |
yum clean all | |
# Install epel packages (required for GeoIP-devel) |
import asyncio | |
import functools | |
from collections import OrderedDict | |
def async_lru(size=100): | |
cache = OrderedDict() | |
def decorator(fn): | |
@functools.wraps(fn) |
from django.core.exceptions import ImproperlyConfigured | |
from rest_framework import serializers | |
from rest_framework.serializers import SortedDictWithMetadata | |
from .utils import create_translated_fields_serializer | |
class TranslatedFieldsField(serializers.WritableField): | |
""" | |
Exposing translated fields for a TranslatableModel in REST style. | |
""" |
""" | |
Field with multiple *static* choices (not via m2m) | |
Value is stored in DB as comma-separated values | |
Default widget is forms.CheckboxSelectMultiple | |
Python value: list of values | |
Original Django snippet: https://djangosnippets.org/snippets/1200/ | |
It's 6 years old and doesn't work with latest Django | |
Also it implements 'max_choices' functionality - I have removed it for simplicity |
import os | |
import asyncio | |
import sys | |
from asyncio.streams import StreamWriter, FlowControlMixin | |
reader, writer = None, None | |
@asyncio.coroutine | |
def stdio(loop=None): |
package main | |
import( | |
"log" | |
"net/url" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { |
from concurrent import futures | |
from tornado import escape, gen, web | |
from tornado.wsgi import WSGIContainer | |
class WSGIHandler(web.RequestHandler): | |
thread_pool_size = 10 | |
def initialize(self, wsgi_application): | |
self.wsgi_application = wsgi_application |
The program below can take one or more plain text files as input. It works with python2 and python3.
Let's say we have two files that may contain email addresses:
foo bar
ok [email protected] sup
[email protected],wyd
hello world!
from fabric.api import env, local, require | |
def deploy(): | |
"""fab [environment] deploy""" | |
require('environment') | |
maintenance_on() | |
push() | |
syncdb() | |
migrate() |
Here are a list of headless browsers that I know about: