Skip to content

Instantly share code, notes, and snippets.

View shlomoa's full-sized avatar

Shlomo Anglister shlomoa

  • Yoqneam Illit, Israel
View GitHub Profile
@shlomoa
shlomoa / gist:45ec3e9ab8e7080fcbb7f7f8befb61fd
Last active October 22, 2025 07:59
Extract a frame from a YouTube movie
"""
This script extracts a specific frame given specific time in seconds
from a YouTube video using pytube and OpenCV.
Prerequirements
pip install pytubefix opencv-python
Usage:
python image_from_youtube_movie.py
-y <yourtube-url>
private unsafe byte[] CreateGatewayRequest()
{
var gr = new GatewayRequest();
var msgHead = new MessageHeaderInComp();
msgHead.BodyLen = (uint)sizeof(GatewayRequest);
msgHead.TemplateID = (ushort) ETIMessageType.GatewayRequest;
gr.MessageHeaderIn = msgHead;
@shlomoa
shlomoa / install_error
Created April 13, 2015 08:19
testpkg setup.py fails on scipy dependency - stack trace
Running scipy-0.14.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-iUCmvo/scipy-0.14.0/egg-dist-tmp-weG7rk
Traceback (most recent call last):
File "setup.py", line 18, in <module>
description='Trading software'
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
@shlomoa
shlomoa / gist:867572babd26f12732d1
Created April 13, 2015 08:10
testpkg setup.py fails on scipy dependency
from setuptools import setup, find_packages
setup(
name='testpkg',
version='0.1',
packages = find_packages(),
include_package_data=True,
package_data={'': ['*.md']},
url='',
license='',