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
#!/usr/bin/env python | |
# | |
# this script will convert the hdhomerun listings (channels) to | |
# m3u format for use with external media players. before running | |
# this script, be sure to modify the <<config>> variable settings | |
# below. | |
# | |
# Suggested Usage: This script should be run on a cron to keep | |
# the channel lineup to date. Below is an example of how to execute this script: | |
# python /path/to/script/hdhomerun-prime-listings-to-m3u.py > /path/to/playlist.m3u |
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
from enum import Enum, auto | |
class NotificationEvents(Enum): | |
NEW_MESSAGE = auto() | |
UPDATE_MESSAGE = auto() |
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
#inside the Build directory of the source code: | |
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DWITH_SSE=OFF -DWITH_CRASH_HANDLER=OFF -DWITH_MINIMAID=OFF .. | |
cmake .. | |
make -j2 |
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
from django.contrib import admin | |
from .models import Blog | |
from .fields import UserSelectWidget | |
class BlogForm(forms.ModelForm): | |
class Meta: | |
model = Blog | |
exclude = [] |
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
import tarfile | |
import time | |
from io import BytesIO | |
admin_password = 'xxxxx' | |
#write password to file | |
pw_tarstream = BytesIO() | |
pw_tar = tarfile.TarFile(fileobj=pw_tarstream, mode='w') | |
file_data = admin_password.encode('utf8') |
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
import asyncio | |
from django import http | |
from django.core.urlresolvers import set_script_prefix | |
from django.utils.encoding import force_str | |
from django.core.handlers.wsgi import get_script_name | |
from django_wsgi.handler import DjangoApplication | |
import logging | |
import logging | |
import sys |
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
import React, { PropTypes } from "react"; | |
import { isMultiSelect, retrieveSchema } from "zbyte64/react-jsonschema-form/src/utils"; | |
import ArrayField from "zbyte64/react-jsonschema-form/src/components/fields/ArrayField"; | |
import BooleanField from "zbyte64/react-jsonschema-form/src/components/fields/BooleanField"; | |
import NumberField from "zbyte64/react-jsonschema-form/src/components/fields/NumberField"; | |
import ObjectField from "zbyte64/react-jsonschema-form/src/components/fields/ObjectField"; | |
import StringField from "zbyte64/react-jsonschema-form/src/components/fields/StringField"; | |
import UnsupportedField from "zbyte64/react-jsonschema-form/src/components/fields/UnsupportedField"; |
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
from rethinkdb.net import ConnectionInstance, SocketWrapper, Connection, decodeUTF | |
from rethinkdb.errors import * | |
import socket | |
import time | |
import ssl | |
class TLSConnectionInstance(ConnectionInstance): | |
def connect(self, timeout): | |
self._socket = TLSSocketWrapper(self, timeout) |
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
/* | |
Registers the following tags (use is property): | |
* x-googlemap (iframe with api-key & address properties) | |
be sure to enable polyfill: https://github.com/WebReflection/document-register-element | |
*/ | |
(function() { | |
var GoogleMapProto = Object.create(HTMLElement.prototype); |
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
<Route path="/" component={AdminPanel}> | |
<Route path="users" component={CrudList}> | |
<Route path="/add" component={CrudAdd}/> | |
<Route path="/:id" component={CrudDetail}/> | |
<Route path="/:id/delete" component={CrudDelete}/> | |
<Route path="/:id/transfer" component={TransferAccount}/> | |
</Route> | |
<Route path="industries" component={CrudList}> |
NewerOlder