The mysterious vcvarsall.bat

I’ve encountered the following problem quite a few times, so I decided to write about it here on my blog so I can find the solution faster.

When trying to build various open source libraries, especially ones that were initially made for Linux and then ported to Windows, sometimes the following error is received:

Unable to find vcvarsall.bat

This comes up because it tries to build it using Visual Studio and it looks…. for an older version of VS (I think).

The solution is simple. If you have VS2010, execute: SET VS90COMNTOOLS=%VS100COMNTOOLS% at the command line and try again. If you have VS2012 run SET VS90COMNTOOLS=%VS110COMNTOOLS%.

Via: StackOverflow

Neural Networks in Python

Artificial Neural Networks are a mathematical model, inspired by the brain, that is often used in machine learning. It was initially proposed in the ’40s and there was some interest initially, but it waned soon due to the inefficient training algorithms used and the lack of computing power. More recently however they have started to be used again, especially since the introduction of autoencoders, convolutional nets, dropout regularization and other techniques that improve their performance significantly.

Here I will present a simple multi-layer perceptron, implemented in Python using numpy.

Neural networks are formed by neurons that are connected to each others and that send each other signals. If the number of signals a neuron received is over a threshold, it then sends a signal to neurons it is connected. In the general case, the connections can be between any neurons, even to themselves, but it gets pretty hard to train them, so in most cases there are several restrictions to them.

In the case of the multi-layer perceptron, neurons are arranged into layers, and each neuron sends signals only to the next neurons in the following layer. The first layer consists of the input data, while the last layer is called the output layer and contains the predicted values.

Colored_neural_network Continue reading

Single table inheritance in Camelot

Recently, while working on a class project, I had a small problem with inheritance in Camelot, an excellent framework for rapid application development in Python.

In the application we needed to be able to define different kinds of projects, with similar needs, but which were each available only to some user groups. Single table inheritance sounds like a natural fit for this.

I couldn’t find anything in the Camelot documentation about this, but I figured that since it uses SQLAlchemy for its models, I could try the example given there: Continue reading

Lucrare 1 ISS

La seminar. A fost câte un subiect separat pentru fiecare din noi. Lucrarea a durat jumate de oră.

Subiectul C

  1. Descrieți pe scurt modelul RAD.
  2. Enumerați și descrieți succint pașii fazei de definiție din cadrul ciclului de viață al unui program.
  3. Explicați termenii: granularitate, plan cu granularitate fină, plan cu granularitate mare.
  4. Enumerați activitățile aferente modelării funcționalității – sarcină generică a analizei.
  5. Definiți termenul de model. De ce se folosesc modelele? (enumerați 4 motive).
  6. Care este numărul minim de fluxuri de date asociate unui proces și de ce?

Tutorial Camelot

Nu sunt Arthur sau Merlin, așa că nu voi vorbi despre orașul Camelot, ci despre frameworkul Python, care îi pretty much everything but the kitchen sink.

Cum tutorialul acesta este mai mult pentru colegii de grupă cu care lucrăm la proiect colectiv, voi presupune că este deja instalat Camelot.

Proiectul pe care îl vom crea este o mică chestie pe care eu vreau s-o fac de mai mult timp, și aceasta este oportunitatea perfectă: vom face un program cu care să pot urmări când se întâmplă anumite lucruri, în speranța ca mai încolo să pot extrage informații utile din când se întâmplă acele lucruri. Ce am de gând să măsor cu acest progrămel ar fi chestii gen viteza de creștere a unghiilor mele (peste 50 de ani o să scot un grafic frumos din asta :>:> ), când am dureri de cap (nu, mami, nu mă doare capul acuma), cât de des este control pe autobuz, etc. (Yes, I’m obsessed with data). Continue reading

Git tutorial – part 2

Acest tutorial e mai mult pentru colegii de grupă cu care voi lucra la Proiect Colectiv

Prima parte am scris-o mai demult, dar nu îi bai, că nu s-o schimbat multe la Git de atunci :) ))

În prima parte am configurat Git-ul, am creat un proiect nou, cu un fișier .gitignore și am făcut primul commit. În cei doi ani care au trecut de atunci ne-am dat seama că la primul commit am greșit două chestii: mai trebuia inclus fișierul config.txt și trebuia să dăm un mesaj de commit mai detaliat. Continue reading

Cura de slăbire

La începutul vacanței am fost la cineva și m-am cântărit pe un cântar electronic. Și rezultatul a fost de xy kg. Care îi muuuult prea mult. Știam eu că în sesiune am mâncat în prostie (îmi place să ronțăi când învăț), dar nu credeam că am ajuns în halul ăsta. Mai ales că înainte să vin la Cluj aveam un zt kg foarte respectabil.

Așa că m-am apucat de o cură de slăbire. În aceeași seară deja am decis (ajutat de mami) să nu mai mănânc seara. Bazat pe un articol pe care l-am citit care spuneau de un regim super-mega-hiper-sănătos, să nu mănânci timp de 16 ore, iar apoi în restul de 8 ore pe zi poți să mănânci ce vrei, am decis să încerc să urmez și eu această dietă. Nu chiar 16 ore (că îi fooooarte muuult), dar măcar 14. Pe lângă aceasta, am redus micul dejun la un simplu iaurt Danone Cremosso, la amiaz, cam ca de obicei, eventual un pic mai puțin, iar seara am redus de la 2 sandvișuri enorme la un simplu iaurt. Și mișcare. Am încercat să fac zilnic 4-5 km pe jos (era prea rece să mă apuc de alergat) și să fac flotări și abdomene.
Continue reading