Skip to content

Instantly share code, notes, and snippets.

View geogeorgiev's full-sized avatar
😀

Georgy Georgiev geogeorgiev

😀
View GitHub Profile
@Ghostbird
Ghostbird / docker-compose.yml
Last active May 27, 2021 21:57
Docker compose file for graylog 4. Demonstrates the bug at https://github.com/Graylog2/graylog2-server/issues/9550
version: '3'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongo:
image: mongo:4.4
volumes:
- mongo_data:/data/db
networks:
- graylog
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
@soerenmartius
soerenmartius / _src_modules_auth_store_index.ts
Last active June 29, 2023 02:28
Vue 3 with Typescriptt and Vuex 4 Typed Modules Examples ( with real types )
import {
ActionContext,
ActionTree,
GetterTree,
MutationTree,
Module,
Store as VuexStore,
CommitOptions,
DispatchOptions,
} from 'vuex'
@liviaerxin
liviaerxin / gstreamer_empty_plugin_test_case.py
Last active May 19, 2025 11:27
Install Gst Python Binding
#!/usr/bin/python3
#-*- coding: utf-8 -*-
import logging
import timeit
import traceback
import time
import gi
gi.require_version('Gst', '1.0')

PyTorch C++ API Ubuntu Installation Guide

The best way to get a clean installation of PyTorch, is to install the pre-compiled binaries from the Anaconda distribution. Therefore, we need to setup Anaconda first.

Step 1: Install Anaconda

  • Go to the download section and download your desired Anaconda version for Linux

  • Run the downloaded shell script and follow the install instruction, do
-- suppose you have a model called model
lrs_model = model:clone()
lrs = lrs_model:getParameters()
lrs:fill(1) -- setting the base learning rate to 1
-- now lets set the learning rate factor of the bias of module 5 to 2
lrs_model:get(5).bias:fill(2)
-- same thing for the weights of module 2, let's set them to 3
lrs_model:get(2).weight:fill(3)
@pgasiorowski
pgasiorowski / app.js
Last active March 5, 2018 13:54
Kurento Player to WebRTC pipeline
var kurento = require('kurento-client');
var express = require('express');
var app = express();
var path = require('path');
var wsm = require('ws');
app.set('port', process.env.PORT || 8080);
/*
* Definition of constants
@kevinhughes27
kevinhughes27 / Makefile
Created April 4, 2013 15:51
g++ Makefile for OpenCV Project
CC = g++
CFLAGS = -g -Wall
SRCS = HelloWorld.cpp
PROG = HelloWorld
OPENCV = `pkg-config opencv --cflags --libs`
LIBS = $(OPENCV)
$(PROG):$(SRCS)
$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS)
@anantn
anantn / getusermedia_picture.html
Created February 17, 2012 09:12
Take a picture with getUserMedia
<html>
<body>
<video id="v" width="300" height="300"></video>
<input id="b" type="button" disabled="true" value="Take Picture"></input>
<canvas id="c" style="display:none;" width="300" height="300"></canvas>
</body>
<script>
navigator.getUserMedia({video: true}, function(stream) {
var video = document.getElementById("v");
var canvas = document.getElementById("c");