-
要rtmpdump
-
生
石川典行の配信を例に取る。
http://twitcasting.tv/streamserver.php?mode=view&appid=TCViewerFlash&rtmp=1&target=icchy8591
レスポンス 例 edge101.moi.st/publisher/214392821-f554a8fe319b8e13.stream?is_publisher=0:1935:GET :icchy8591:214392821
rtmpdump -r "rtmp://edge101.moi.st/publisher/214392821-f554a8fe319b8e13.stream" -y "publisher/214392821-f554a8fe319b8e13.stream?is_publisher=0" -y icchy8591 -o output.flv
コメント 初回 例 http://twitcasting.tv/noriyukicas/userajax.php?c=listupdate&m=212328387
mは放送ID
This file contains hidden or 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 app import db | |
from sqlalchemy import func | |
from sqlalchemy.dialects.mysql import insert | |
def upsert(model, insert_dict): | |
"""model can be a db.Model or a table(), insert_dict should contain a primary or unique key.""" | |
inserted = insert(model).values(**insert_dict) | |
upserted = inserted.on_duplicate_key_update( | |
id=func.LAST_INSERT_ID(model.id), **{k: inserted.inserted[k] | |
for k, v in insert_dict.items()}) |
This file contains hidden or 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.conf import settings | |
settings.configure(USE_I18N=False) | |
from django import forms | |
from rest_framework import serializers | |
class PostForm(forms.Form): | |
email = forms.EmailField() |
This file contains hidden or 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 | |
# uWSGI & nginx installation script | |
# Created at 2017-06-27 by Frank Yang (https://github.com/puilp0502) | |
# Tested on Ubuntu Server 16.04 LTS | |
# Check if user is root | |
if [[ $UID -ne '0' ]]; then | |
echo "This script needs to be run as root; exiting..." | |
exit 0 |
This file contains hidden or 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
[uwsgi] | |
# Django-related settings | |
# the base directory (full path) | |
chdir = /home/ubuntu/(project-dir) | |
# Django's wsgi file | |
module = (project-name).wsgi:application | |
# the virtualenv (full path) | |
home = /home/ubuntu/.venv/(venv-name)/ |
This file contains hidden or 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
[Unit] | |
Description=uWSGI Emperor service | |
[Service] | |
RuntimeDirectory=uwsgi | |
RuntimeDirectoryMode=755 | |
User=emperor | |
Group=www-data | |
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites | |
Restart=always |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# 수치해석, 김상철 교수님 | |
# 1. Incremental Search, Bisection, False Position, | |
# Newton-Raphson, Secant Method 정리 | |
# 20163179 홍승환 | |
import numpy as np | |
import math | |
from scipy.optimize import fsolve |
This file contains hidden or 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
package com.your.package.name; | |
import android.widget.Toast; | |
import android.app.Activity; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# 절대 임포트 설정 | |
from __future__ import absolute_import | |
from __future__ import print_function | |
# 필요한 라이브러리들을 임포트 | |
import collections | |
import math | |
import os |
django 기본 테스트는 데이터베이스 마이그레이션 덕에 느리고 번거롭기 때문에 py.test와 model_mommy를 사용해서 빠르게 테스트를 하는 방법을 소개함.
- py.test : http://pytest.org/
- pytest-django : http://pytest-django.readthedocs.org/
- model_mommy : http://model-mommy.readthedocs.org/
NewerOlder