Skip to content

Instantly share code, notes, and snippets.

View arjun-kava's full-sized avatar
🎯
Focusing

Arjun Kava arjun-kava

🎯
Focusing
View GitHub Profile
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active June 28, 2024 22:22
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@zhreshold
zhreshold / cuda9_2.sh
Last active October 26, 2018 08:24
CUDA 9 and CUDNN 7
sudo apt update
sudo apt-get -y install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev libgfortran3
wget 'https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux' -O cuda92.run
wget 'https://developer.nvidia.com/compute/cuda/9.2/Prod2/patches/1/cuda_9.2.148.1_linux' -O patch1.run
sudo sh cuda92.run
sudo sh patch1.run
echo "# CUDA9.2" >> ~/.bashrc
echo "export PATH=/usr/local/cuda/bin:\$PATH" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc
@andrewserong
andrewserong / VideoPlayer.jsx
Created October 19, 2017 05:47
An example Video JS component in React, based on the Video JS docs
import React from 'react';
import videojs from 'video.js';
import 'video.js/dist/video-js.css';
// video.js player from the docs: https://github.com/videojs/video.js/blob/master/docs/guides/react.md
class VideoPlayer extends React.Component {
componentDidMount() {
// instantiate Video.js
this.player = videojs(this.videoNode, this.props, function onPlayerReady() {
@mrbar42
mrbar42 / README.md
Last active June 24, 2024 12:40
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
# Create dictionary of target classes
label_dict = {
0: ‘T-shirt/top’,
1: ‘Trouser’,
2: ‘Pullover’,
3: ‘Dress’,
4: ‘Coat’,
5: ‘Sandal’,
6: ‘Shirt’,
7: ‘Sneaker’,
@vgpena
vgpena / loadModel.py
Last active November 17, 2020 16:39
Basic text classification with Keras and TensorFlow
import json
import numpy as np
import keras
import keras.preprocessing.text as kpt
from keras.preprocessing.text import Tokenizer
from keras.models import model_from_json
# we're still going to use a Tokenizer here, but we don't need to fit it
tokenizer = Tokenizer(num_words=3000)
# for human-friendly printing
@jinyu121
jinyu121 / get_anchor.py
Last active March 5, 2024 02:36
YOLO2 Get Anchors
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import numpy as np
import os
import random
# -*- coding: utf-8 -*-
"""ResNet50 model for Keras with fused intermediate layers
# Reference:
https://arxiv.org/pdf/1604.00133.pdf
Adapted from original resnet
"""
from __future__ import print_function
@nikitametha
nikitametha / installing_caffe.md
Last active April 2, 2024 18:37
Installing Caffe on Ubuntu 16.04 and above (CPU ONLY, WITHOUT CUDA OR GPU SUPPORT)

This is a guide on how to install Caffe for Ubuntu 16.04 and above, without GPU support (No CUDA required).

Prerequisites:

OpenCV

sudo apt-get install libopencv-dev python-opencv

OpenBLAS OR Atlas