Skip to content

Instantly share code, notes, and snippets.

View marjinal1st's full-sized avatar
🥃
Master of Ballmer Peak

Ahmet Sezgin DURAN marjinal1st

🥃
Master of Ballmer Peak
View GitHub Profile
@arthurzhukovski
arthurzhukovski / cctv-startup.bat
Created July 17, 2018 14:49
RTSP to HTTP with VLC (Windows)
:: The following line is neccessary if you need an ability to restart the streams with this batch file
:: Kill all existing streams (the command actually suspends ALL the vlc processes):
taskkill /f /im "vlc.exe"
:: Run two instances of VLC. These would transcode MP4 rtsp-stream to Motion JPEG http-stream:
start vlc -vvv -Idummy rtsp://login:password@192.168.0.2/streaming/channels/2/preview --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1},fps=10,width=640,height=360}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:9911/}
start vlc -vvv -Idummy rtsp://login:password@192.168.0.3/streaming/channels/2/preview --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1},fps=10,width=640,height=360}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:9912/}
:: In order to execute VLC with `vlc` as in exapmle above, you have to add corresponding value to the PATH variable.
:: Otherwise you have t
@bigsnarfdude
bigsnarfdude / gist:a0702a88b122be81cb1f4edb55229a7b
Last active February 19, 2022 06:54
[self-driving-car] links and resources
General Nanodegree Information
Nanodegrees Programs: https://www.udacity.com/nanodegree
Nanodegree Plus (job guarantee): https://www.udacity.com/nanodegree/plus
UConnect (weekly in-person study sessions): https://www.udacity.com/uconnect
Courses on Udacity
Machine Learning Engineer Nanodegree by Google (Currently Available): https://www.udacity.com/course/machine-learning-engineer-nanodegree-by-google--nd009
Artificial Intelligence for Robots (Free Course) https://www.udacity.com/course/artificial-intelligence-for-robotics--cs373
Intro to Statistics (Free Course) https://www.udacity.com/course/intro-to-statistics--st101
Deep Learning (Free Course) https://www.udacity.com/course/deep-learning--ud730
@benjbaron
benjbaron / QGraphicsSceneTest.cpp
Last active April 22, 2022 03:13
Qt QGraphicsScene click, select, move, resize, delete QGraphicsItems
#include <QtGui>
#include <QGraphicsRectItem>
#include <QGraphicsView>
#include <QApplication>
#include <QGraphicsSceneMouseEvent>
class CustomItem : public QGraphicsEllipseItem
{
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event)
@karpathy
karpathy / gist:587454dc0146a6ae21fc
Last active March 19, 2024 05:50
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@sztupy
sztupy / INSTALL.md
Last active April 4, 2018 07:49 — forked from namuol/INSTALL.md

rage-quit plugin for oh-my-zsh

based on rage-quit support for bash

HOW TO INSTALL

Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck

Also chmod a+x the flip command.

@jamesejr
jamesejr / ruby-pack.txt
Created August 25, 2013 18:56
A list of Ruby directives for 'pack' e.g. [1,2,3].pack("CCn") => "\x01\x02\x00\x03"
Integer | Array |
Directive | Element | Meaning
---------------------------------------------------------------------------
C | Integer | 8-bit unsigned (unsigned char)
S | Integer | 16-bit unsigned, native endian (uint16_t)
L | Integer | 32-bit unsigned, native endian (uint32_t)
Q | Integer | 64-bit unsigned, native endian (uint64_t)
| |
c | Integer | 8-bit signed (signed char)
s | Integer | 16-bit signed, native endian (int16_t)
@nicolashery
nicolashery / environment-variables-jekyll-templates.md
Last active January 22, 2023 15:56
Make environment variables available in Jekyll Liquid templates

Environment variables in Jekyll templates

This is one way to pass some data (API tokens, etc.) to your Jekyll templates without putting it in your _config.yml file (which is likely to be committed in your GitHub repository).

Copy the environment_variables.rb plugin to your _plugins folder, and add any environment variable you wish to have available on the site.config object.

In a Liquid template, that information will be available through the site object. For example, _layouts/default.html could contain:

anonymous
anonymous / gist:4374633
Created December 25, 2012 18:22
1.upto(100){|n|puts'FizzBuzz
'[o=n**4%-15,o+13]||n}
@jarosan
jarosan / elasticsearch.rake
Created July 16, 2012 20:37
Elasticsearch reindex task
# Run with: rake environment elasticsearch:reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
klass = Place
ENV['CLASS'] = klass.name
ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S')
@amueller
amueller / mlp.py
Created March 17, 2012 15:59
Multi-Layer Perceptron for scikit-learn with SGD in Python
import numpy as np
import warnings
from itertools import cycle, izip
from sklearn.utils import gen_even_slices
from sklearn.utils import shuffle
from sklearn.base import BaseEstimator
from sklearn.base import ClassifierMixin
from sklearn.preprocessing import LabelBinarizer