Video stream url for VLC/DVR:
- rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100
Telnet access
- telnet 192.168.1.10 23
- Localhost login: root
- Password: xmhdipc
#!/usr/bin/python | |
# A simple Python application for controlling a relay board from a Raspberry Pi | |
# The application uses the GPIO Zero library (https://gpiozero.readthedocs.io/en/stable/) | |
# The relay is connected to one of the Pi's GPIO ports, then is defined as an Output device | |
# in GPIO Zero: https://gpiozero.readthedocs.io/en/stable/api_output.html#outputdevice | |
import sys | |
import time |
class BaseModelView(ModelView): | |
list_template = 'admin/model_list.html' | |
export_columns = None | |
# Exporting | |
def _get_data_for_export(self): | |
view_args = self._get_list_extra_args() | |
# Map column index to column name |
/**************************************************************************** | |
RoastLoggerMax6675.ino | |
This sketch is for use with MAX 6675 thermocouple interface chips. A separate sketch | |
is available for MAX 31855 chips. | |
See the "Contributed Libraries" section of http://www.arduino.cc/en/Reference/Libraries | |
for details of how to install it. | |
{% if form.errors %} | |
<div class="alert alert-danger"> | |
<ul> | |
{% for field_name, field_errors in form.errors|dictsort if field_errors %} | |
{% for error in field_errors %} | |
<li>{{ form[field_name].label }}: {{ error }}</li> | |
{% endfor %} | |
{% endfor %} | |
</ul> | |
</div> |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
from flask import Flask, request, jsonify | |
from flask.ext.wtf import Form, TextField, Email | |
from flask.ext.babel import get_translations, lazy_gettext as __ | |
from flask.json import JSONEncoder | |
from speaklater import make_lazy_string, is_lazy_string | |
class CustomTranslations(object): | |
def babel_gettext(self, s): | |
return get_translations().ugettext(s) |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2357277/hack.sh | sh | |
# |
# How to generate a secret key with Python | |
# via http://flask.pocoo.org/docs/quickstart/ | |
import os | |
os.urandom(24) |
#!/usr/bin/env python | |
import getopt | |
import sys | |
from sqlalchemy import create_engine, MetaData, Table | |
from sqlalchemy.dialects.mysql.base import TINYINT | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.exc import ProgrammingError |