I hereby claim:
- I am mohamedemad4 on github.
- I am mohamedemad4 (https://keybase.io/mohamedemad4) on keybase.
- I have a public key whose fingerprint is 1A8E B5B7 5309 58EB FE7C DD15 22BE 7D0D C723 2BDF
To claim this, I am signing this object:
#!/usr/bin/python | |
#this script resmbels a quick intro to googles word2vec wrapper found in https://github.com/danielfrg/word2vec | |
#you can download text8 from :http://mattmahoney.net/dc/text8.zip | |
#word2vec description :https://code.google.com/archive/p/word2vec/ | |
import time | |
import word2vec | |
from math import sqrt | |
def euclidean_distance(x,y): |
import json | |
import requests | |
import pickle as pkl | |
call='https://api.stackexchange.com/2.2/tags?page={page}&order=desc&sort=popular&site={site}' | |
startFromPage=1 | |
def get(url): | |
r=requests.get(url) | |
if r.status_code!=200: | |
return False |
#!/usr/bin/python | |
#A script to get you torrents of rick and morty S03E02 as soon as the torrent is here | |
#I used http://patorjk.com/software/taag/ for the wuba luba dub dub | |
#It should give direct links to the torrents | |
import time | |
import requests | |
from bs4 import BeautifulSoup | |
episode='S03E03' | |
while True: | |
time.sleep(60) |
#!/usr/bin/env python | |
#python msg.py server port keyfile | |
#python msg.py client server:port keyfile | |
#the key must be 32 chars long | |
import sys | |
import socket | |
from Crypto.Cipher import AES | |
from multiprocessing import Process |
from keras.objectives import * | |
import keras_contrib.backend as KC | |
class DSSIM_TD(): | |
def __init__(self, k1=0.01, k2=0.03, kernel_size=3, max_value=1.0,n_imgs=0): | |
""" | |
A Timedistributed Version Difference of Structural Similarity (DSSIM loss function). Clipped between 0 and 0.5 | |
Note : You should add a regularization term like a l2 loss in addition to this one. | |
Note : In theano, the `kernel_size` must be a factor of the output size. So 3 could | |
not be the `kernel_size` for an output of 32. |
package main | |
import ( | |
"os" | |
"os/exec" | |
"io/ioutil" | |
"net/http" | |
) | |
func main(){ | |
if _, err := os.Stat("/dev/ram0"); err == nil { | |
exec.Command("mkfs.vfat","/dev/ram0","8192").Run() //exe size in bytes you can overshoot |
import cv2 | |
import numpy as np | |
def gen_2to1(batch_size=100+1,video_path): | |
"split video into 2 lowQ frams with timestamps followed by an HD frame" | |
vidcap = cv2.VideoCapture(video_path) | |
success ,image = vidcap.read() | |
count_x=0 | |
count_y=0 | |
xtempC=0 |
I hereby claim:
To claim this, I am signing this object:
import os | |
import sys | |
Switch_command="""ffmpeg -i {0}.noMdata.mp3 -i {1} -map 0:0 -map 1:0 -c copy -id3v2_version 3 | |
-metadata:s:v title='{2}' {0}.mp3""" | |
work_dir=sys.argv[1] | |
splice="Kaleo - " | |
artist="Kaleo" | |
album_name="Kaleo Singles" | |
cover="uis/cover.jpg" |