Skip to content

Instantly share code, notes, and snippets.

View tdavchev's full-sized avatar
🤞
researching

Todor Davchev tdavchev

🤞
researching
View GitHub Profile
@tdavchev
tdavchev / gist:5059722
Created February 28, 2013 20:12
any idea why this is happening
+ rbenv --version
rbenv 0.4.0-15-g0d1f1d0
+ rbenv versions
* 1.9.3-p392 (set by /home/yadrimz/.rbenv/version)
+ rbenv global
1.9.3-p392
+ env
+ grep -E 'PATH|RUBY|BUNDLE|RBENV'
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
PATH=/home/yadrimz/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/yadrimz/.cinstall/launchers/:/usr/bin/core_perl
1) User registration returns error with unmatching passwords
Failure/Error: page.should have_content "Password doesn't match confirmation"
expected there to be text "Password doesn't match confirmation" in "Abene Sign up Login User index Jobs Skills Sign up Select list Email Password Password confirmation Sign in Forgot your password? © 2013 Abene Information Link Link Link Abene Link Link Link"
# ./spec/features/user_spec.rb:32:in `block (3 levels) in <top (required)>'
2) User registration of students
Failure/Error: page.should have_checked_field("user_type_student")
Capybara::ExpectationNotMet:
expected to find field "user_type_student" but there were no matches
# ./spec/features/user_spec.rb:38:in `block (3 levels) in <top (required)>'
1) User registration returns error with unmatching passwords
Failure/Error: page.should have_content "Password doesn't match confirmation"
expected there to be text "Password doesn't match confirmation" in "Abene Sign up Login User index Jobs Skills Sign up Select list Email Password Password confirmation Sign in Forgot your password? © 2013 Abene Information Link Link Link Abene Link Link Link"
# ./spec/features/user_spec.rb:32:in `block (3 levels) in <top (required)>'
2) User registration of companies
Failure/Error: fill_in "Name", with: company.name
Capybara::ElementNotFound:
Unable to find field "Name"
# ./spec/features/user_spec.rb:50:in `block (3 levels) in <top (required)>'
~/P/M/prada-html5-institutional git:master ❯❯❯ gem install rails ⏎ ✖ ✱
/home/todor/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
[1] 4008 abort (core dumped) gem install rails
" This must be first, because it changes other options as side effect
set nocompatible
" Use pathogen to easily modify the runtime path to include all
" plugins under the ~/.vim/bundle directory
call pathogen#helptags()
call pathogen#infect()
" Quickly edit/reload the vimrc file
" nmap <silent> <leader>ev :e $MYVIMRC<CR>
@tdavchev
tdavchev / Markov Random Field Image de-noising
Created November 21, 2016 23:13
Simple Python implementation of the Markov Random Field (MRF) Image de-noising illustration from Bishop's Pattern Recognition and Machine Learning Book, Chapter 8
from scipy import misc
import numpy as np
import random
from pylab import *
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
im = misc.imread('lena512.bmp')
im = np.asarray(im)
import pickle
import numpy as np
def social_frame_preprocess():
'''
Preprocess the frames from the datasets.
Convert values to pixel locations from millimeters
obtain and store all frames data the actually used frames (as some are skipped),
the ids of all pedestrians that are present at each of those frames and the sufficient statistics.
'''
def get_model_params(self):
# get trainable params.
model_names = []
model_params = []
model_shapes = []
with self.g.as_default():
t_vars = tf.trainable_variables()
for var in t_vars:
param_name = var.name
p = self.sess.run(var)
@tdavchev
tdavchev / [fix] VLX issues STEAM
Last active December 20, 2019 21:28
glXChooseVisual failedMain.cpp (332) : Assertion Failed: Fatal Error: glXChooseVisual failed
sudo rm /usr/lib/i386-linux-gnu/mesa/libGL.so.1
@tdavchev
tdavchev / explore.py
Last active April 16, 2020 21:23
A simple implementation of OU exploration noise.
import numpy as np
# Taken from https://github.com/openai/baselines/blob/master/baselines/ddpg/noise.py
# based on http://math.stackexchange.com/questions/1287634/implementing-ornstein-uhlenbeck-in-matlab
class OrnsteinUhlenbeckActionNoise(object):
def __init__(self, mu, sigma=0.3, theta=.15, dt=1e-2, x_0=None):
self.theta = theta
self.mu = mu
self.sigma = sigma
self.dt = dt