Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

ja seniks muusikat…

Posted on August 6, 2012 - August 13, 2012 by margusja

Viimase aja südamesse mineva lugu

Posted in Muusika

Linear regression and cost function with octave

Posted on August 1, 2012 by margusja

Posted in LinuxTagged cost function, octave

Tööpäev ja tulemus

Posted on August 1, 2012 - August 2, 2012 by margusja

Posted in LinuxTagged cost function, linear regression, machine learning

Moskvich 401

Posted on July 29, 2012 by margusja

Posted in M-401

Lihtne temperatuuri ja niiskuse mõõdik

Posted on July 29, 2012 - August 13, 2012 by margusja

 

 

Komponendid:

Arduino Uno komplekt

SHT10

LCD display

10K takisti

Kasutasin SHT1x lib for arduino https://github.com/practicalarduino/SHT1x ja arduino LCD lib http://arduino.cc/en/Tutorial/LiquidCrystal.

Esmalt ühendasin SHT10 ja kontrollisin kas andmed on mõistlikud – ei olnud. Peale 10K pull up takisti paigaldamist sain rahuldavad andmed.

 

Nüüd ühendasin LDC display ja lisasin koodile LDC lib ja vastavad read, et info jõuaks LCD display peale.

 

 

Kogu kupatus sai selline pusa

Ja tulemus siin

Edasise arengu huvides tõstsin kivi eraldi, ei saa ju iga lõpplahenduse jaoks tervet arduino konstruktorit võtta 🙂

Edasi sai vormistatud natukene robustselt eraldi plaadile.

Posted in LinuxTagged arduino SHT10 LCD

Vectorization is simple ;)

Posted on July 5, 2012 by margusja

Posted in LinuxTagged machine learning

numpy.diag

Posted on June 19, 2012 - June 19, 2012 by margusja

numpy.diag(v, k=0)

Leiab masiivist diagonaalväärtused


>>> x = np.arange(9).reshape((3,3))
>>> x
array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
>>> diag(x)
array([0, 4, 8])

>>> x = arange(25).reshape((5,5))
>>> x
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19],
[20, 21, 22, 23, 24]])
>>>
>>> diag(x)
array([ 0, 6, 12, 18, 24])

>>> diag([0,10])
array([[ 0, 0],
[ 0, 10]])

Posted in LinuxTagged numpy, python

numpy.random.multivariate_normal

Posted on June 19, 2012 - June 19, 2012 by margusja

Paari sõnaga enda jaoks numpy.random.multivariate_normal(mean, cov[, size]) kasutamisest.

Funktsiooni argumendid:

mean – nn keskmine kujul X,Y skaalal. Seab genereeritavale andmehulgale nn keskpunkti, mille ümber andmekogu genereeritakse.

Näiteks  [0,0]

 

[30,10]

Parameeter cov (X,Y) [X = [X1,Y1], Y=[X2,Y2]] Kontrollivad genereeritava array nn pikkust ja laiust e shape

X1 ja X2 kontrollivd X suunal (horisontaalsuunal):

[[1,0],[0,0]]

Argument size – Genereeritavate elementide arv.

 

Posted in LinuxTagged numpy, pybrain, python

Bit Fields

Posted on April 14, 2012 by margusja

Bit Fields allow the packing of data in a structure. This is especially useful when memory or data storage is at a premium. Typical examples:

Packing several objects into a machine word. e.g. 1 bit flags can be compacted — Symbol tables in compilers.
Reading external file formats — non-standard file formats could be read in. E.g. 9 bit integers.

C lets us do this in a structure definition by putting :bit length after the variable. i.e.

struct packed_struct {
unsigned int f1:1;
unsigned int f2:1;
unsigned int f3:1;
unsigned int f4:1;
unsigned int type:4;
unsigned int funny_int:9;
} pack;

Here the packed_struct contains 6 members: Four 1 bit flags f1..f3, a 4 bit type and a 9 bit funny_int.

C automatically packs the above bit fields as compactly as possible, provided that the maximum length of the field is less than or equal to the integer word length of the computer. If this is not the case then some compilers may allow memory overlap for the fields whilst other would store the next field in the next word (see comments on bit fiels portability below).

Access members as usual via:

pack.type = 7;

NOTE:
Only n lower bits will be assigned to an n bit number. So type cannot take values larger than 15 (4 bits long).
Bit fields are always converted to integer type for computation.
You are allowed to mix “normal” types with bit fields.
The unsigned definition is important – ensures that no bits are used as a flag.

Posted in C

Lihtsalt eneseupitamiseks

Posted on March 10, 2012 by margusja

Posted in Muusika

Posts navigation

Older posts
Newer posts

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.