- Error logs in FeedProcessor
- Errors logs to look for:
- "Error parsing line: "
- "Processing terminated * could not download S3 file for customer: "
- "Processing terminated * duplicate file detected for customer: "
import asyncio | |
import random | |
ten = tuple(range(10)) | |
async def ran_sleep(param): | |
value = random.choice(ten) | |
await asyncio.sleep(value) | |
print("{0} Sleep value:{1}".format(param, value)) |
from enum import Enum | |
from typing import Tuple | |
from pydantic import BaseModel | |
MAX_OBJECTS_PER_PAGE = 10 | |
class Categories(Enum): | |
MUSIC = "2" |
# | |
# Postfix Notation Calculator | |
# | |
# Postfix notation, is a way of writing mathematical | |
# expressions where each operator is preceded by the | |
# two operands it applies to and looks something | |
# like 2 5 3 + * instead of (5 + 3 ) * 2 | |
# | |
# Write a function that takes a postfix notation expression | |
# returns the result of evaluating the expression. |
# Add outside repository: | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# For Node.js 9: | |
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# Install nodejs and npm: |
# First get the file: | |
scp [email protected]:~/rds_backups/backup-2017-08-27.sql.gz ./ | |
# Drop and create the template database: | |
sudo -u postgres dropdb aya_prod && sudo -u postgres createdb aya_prod | |
# Copy it to the virtual disk, then create a new database with it: |
import pylifx | |
""" First you need to create a controller object using the controller group address """ | |
controller_group_address = "MAC Address of controller group goes here" | |
gateway_controller = pylifx.LifxController(site_addr=controller_group_address) | |
""" Now, you have two options: controlling it via the gateway_controller object created above using the MAC address of the | |
bulb itself, or creating an individual LifxBulb object and controlling it directly. |
#! /usr/bin/env python | |
# -*- encoding: utf8 -*- | |
from __future__ import division, print_function, division, absolute_import | |
import argparse | |
import os | |
import pylifx | |
def power(bulb, state): | |
if state == 'on': |