Skip to content

Instantly share code, notes, and snippets.

--===============2866259448498327693==
Content-Type: text/html; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width" />
@denti
denti / raven-shell
Created August 5, 2018 11:58 — forked from barroco/raven-shell
Send Sentry error from shell using curl
#!/bin/sh
SENTRY_KEY=
SENTRY_SECRET=
SENTRY_PROJECTID=1
SENTRY_HOST=sentry.example.com
SCRIPT_ARGUMENTS=$@
capture_error()
{
@denti
denti / tensorflow_eager_resnet.py
Last active November 1, 2017 08:24 — forked from yaroslavvb2/resnet_test.py
Tensorflow Eager test with ResNet
# !IMPORTANT:
# this script was tested only on tf-nightly==1.5.0.dev20171031 build
import tensorflow as tf
from tensorflow.contrib.eager.python import tfe
tfe.enable_eager_execution()
context = tf.device('/cpu:0')
context.__enter__()
# download resnet_model
@denti
denti / OpenCV_3.0_16.04.sh
Last active February 7, 2020 17:03
OpenCV 3.1 installation on ubuntu 16.04
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake git pkg-config
# Without libtiff4-dev
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
@denti
denti / jupyter_userdata.sh
Last active November 15, 2016 07:00
Jupyter Notebook on AWS (amazon EC2) server. Script for configuring Jupyter notebook in server mode.
#!/bin/bash
CERTIFICATE_DIR="/home/ubuntu/certificate"
JUPYTER_CONFIG_DIR="/home/ubuntu/.jupyter"
if [ ! -d "$CERTIFICATE_DIR" ]; then
mkdir $CERTIFICATE_DIR
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout "$CERTIFICATE_DIR/mykey.key" -out "$CERTIFICATE_DIR/mycert.pem" -batch
chown -R ubuntu $CERTIFICATE_DIR
fi
@denti
denti / install-tensorflow.sh
Last active December 8, 2017 17:49 — forked from erikbern/install-tensorflow.sh
Install TensorFlow v 0.11 and later on EC2 instances with Ubuntu 16.04. Instances: p2.xlarge, g2.xlarge and bigger
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update