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
#!/bin/bash | |
#Source | |
USER=root | |
PASS=$5 | |
PORT=3306 | |
HOST1=$1 | |
HOST2=$1 | |
#Dest |
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
<?php | |
/** | |
* Implements hook_menu(). | |
*/ | |
function mymodule_menu() { | |
$items['mymodule/%ctools_js/add'] = array( | |
'page callback' => 'mymodule_node_add_modal_callback', | |
'page arguments' => array(1), | |
'access arguments' => array('access content'), |
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
<?php | |
function example_form_element_label($variables) { | |
$element = $variables['element']; | |
// This is also used in the installer, pre-database setup. | |
$t = get_t(); | |
// If title and required marker are both empty, output no label. | |
if ((!isset($element['#title']) || $element['#title'] === '') && empty($element['#required'])) { | |
return ''; | |
} |
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 __future__ import print_function # Python 2/3 compatibility | |
import boto3 | |
import json | |
import decimal | |
from boto3.dynamodb.conditions import Key, Attr | |
# Helper class to convert a DynamoDB item to JSON. | |
class DecimalEncoder(json.JSONEncoder): | |
def default(self, o): | |
if isinstance(o, decimal.Decimal): |
Granted, this is little more than an obfuscated way of having a publicly writable S3 bucket, but if you don’t have a server which can pre-sign URLs for you, this might be an acceptable solution.
For this to work, you take the following steps:
- Create a Lambda func, along with a new IAM role, keeping the default code.
- Create an API in the API Gateway.
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
# | |
# 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
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/dimitar.danailov/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
# ZSH_THEME="robbyrussell" | |
ZSH_THEME="agnoster" |
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 contextlib import contextmanager | |
import numpy as np | |
import torch | |
from torch import Tensor, ByteTensor | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
import pycuda.driver | |
from pycuda.gl import graphics_map_flags | |
from glumpy import app, gloo, gl |
This patch adds libndi_newtek to last ffmpeg version, and fix timecode related issues that produces wrong PTS/DTS timestamps that seems to happen with newer NDI SDKs.
- Updated libndi methods by newer versions (v2/v3)
- Calculating PTS/DTS from timestamp instead of timecode, that is optionally sent by the sender.
OlderNewer