Skip to content

Instantly share code, notes, and snippets.

docker build -f ./dockerfiles/Dockerfile-server -t gsdetector:latest .
docker run -p 8000:8000 gsdetector
curl -F "file=@./red-rose-400x265.jpg" localhost:8000/predict
@anhlt
anhlt / .neovintageousrc
Last active July 19, 2020 06:07
WSL_Sync_Setting
" Type :help nv for help.
let mapleader=,
nnoremap <leader>d :Neovintageous action=toggle_side_bar<CR>
import numpy as np
# Verify that we compute the same anchors as Shaoqing's matlab implementation:
#
# >> load output/rpn_cachedir/faster_rcnn_VOC2007_ZF_stage1_rpn/anchors.mat
# >> anchors
#
# anchors =
#
php artisan make:job SendReminderEmail
@anhlt
anhlt / dnn.py
Created October 22, 2015 08:00 — forked from syhw/dnn.py
A simple deep neural network with or w/o dropout in one file.
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
from django.http import HttpResponse,StreamingHttpResponse
import requests
# Create your views here.
def download(request):
# NOTE the stream=True parameter
response = StreamingHttpResponse(generate_file(),content_type=' audio/mpeg')
return response
def generate_file():
url = 'http://data23.chiasenhac.com/downloads/1236/4/1235116-a758ebfb/320/Time%20In%20A%20Bottle%20-%20Jim%20Croce%20%5BMP3%20320kbps%5D.mp3'
local_filename = url.split('/')[-1]