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 json | |
input_ls = [] | |
f = open('inputTraining.txt') | |
for line in iter(f): | |
try: | |
input_ls.append(json.loads(line)) | |
except ValueError: | |
print line +'is not a proper json line' |
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 pylab as pl | |
from itertools import cycle | |
def plot_2D(data, target, target_names): | |
colors = cycle('rgbcmykw') | |
target_ids = range(len(target_names)) | |
pl.figure() | |
for i, c, label in zip(target_ids, colors, target_names): | |
pl.scatter(data[target == i, 0], data[target == i, 1], | |
c=c, label=label) | |
pl.legend() |
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
nobuma.com | |
15qm.com | |
nokiamail.com | |
sofimail.com | |
10minut.xyz | |
emailgo.de | |
inbax.tk | |
gowikifilms.com | |
mybitti.de | |
mierdamail.com |
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 pylab as pl | |
from itertools import cycle | |
def plot_2D(data, target, target_names): | |
colors = cycle('rgbcmykw') | |
target_ids = range(len(target_names)) | |
pl.figure() | |
for i, c, label in zip(target_ids, colors, target_names): | |
pl.scatter(data[target == i, 0], data[target == i, 1], | |
c=c, label=label) | |
pl.legend() |
This file has been truncated, but you can view the full file.
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
<http://sailortalk.podOmatic.com/rss2.xml> | |
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml | |
Http://feeds.feedburner.com/fridgeandhbomb | |
Http://feeds.feedburner.com/wfodicks | |
Http://ravenc-taouf.podomatic.com/rss2.xml | |
Http://www.calvaryonline.org/podcasts/podcast.xml | |
Http://www.changkhui.com/XML/teemateepai.xml | |
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss | |
http://-myantioch.sermon.tv/rss/main |
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
class ClosableSSEClient(SSEClient): | |
def close(self): | |
self.should_connect = False | |
self.retry = 0 | |
try: | |
self.resp.raw._fp.fp._sock.shutdown(socket.SHUT_RDWR) | |
self.resp.raw._fp.fp._sock.close() | |
except AttributeError: | |
pass | |
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 moviepy.editor import * | |
from moviepy.video.tools.subtitles import SubtitlesClip | |
audio_path = "/path/to/audio/05022357-a41f-11e7-b42c-f45c89a1211f.mp4" | |
srt_path = "path/to/srt/06665ef8-a41f-11e7-b3eb-f45c89a1211f.srt" | |
image_path = '/path/to/image/DSC_0265.JPG' | |
#generate srt | |
generator = lambda txt: TextClip(txt, font='Arial', fontsize=16, color='white') | |
subtitles = SubtitlesClip(srt_path, generator) |
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
# if language is not english | |
if lang[:2] != 'en': | |
text = text.replace(' ', '%2520') | |
text = u"text:Noto%20Sans_20:" + text | |
res = CloudinaryImage(image_url).image(transformation=[ | |
{"background": "black", "opacity": 80}, | |
{"width": 400, "height": 300, "crop": "scale"}, | |
{"overlay": text, "color": "yellow", "crop": "fit", "width": 300, "height": 250}, |
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
sudo apt-get install python-pip | |
sudo apt-get install python-virtualenv | |
# create a virtualenv | |
mkdir ~/.env | |
cd ~/.env | |
virtualenv myenv | |
#activate environment | |
source ~/.env/myenv/bin/activate |
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 os | |
import redis | |
from rq import Worker, Queue, Connection | |
listen = ['default'] | |
redis_url = os.getenv('REDISTOGO_URL', 'redis://localhost:6379') | |
conn = redis.from_url(redis_url) |
NewerOlder