Verilog FIFO

Simple FIFO with some absolutely basic test bench. You may use iverilog and
gtkwave to simulate it. All files including makefile are on the bottom of this

Code for FIFO does is pretty dense and does not explicitly show combinatorial
logic. Code could be broken down into two pieces: - combinatorial logic with
registers such as ptr_next, ptr, etc and separate state machine that loads
vaues of "next" registers.

module fifo
  (input wire clk,
   input wire reset,
   input wire [23:0] w_data,
   input wire wr,
   input wire rd,

Python - multiple windows (frames)

Below example show how to create 2 frames after clicking on a button.
Simple constructor wx.Frame creates an object.
wx.Frame.Show(..) - shows an object.

import wx
import wx.lib.dialogs
import fr2
import fr3
class Top1file(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self, id=-1, parent=parent, size=wx.Size(500, 400), title='Top1file')
        self.panel1 = wx.Panel(self, id=-1)
        self.button1 = wx.Button(self.panel1, id=-1, label='button1', pos=wx.Point(96, 56), size=wx.Size(87, 28), style=0) - geosocial network

A geosocial network - - has a new video on its main page.
Basically it is a website that is created to find neighbors having same hobbies
such as sports but not necessarily. It uses Google Maps engine and it facilitates
its own proprietary engine.

When you type a "geosocial networks" into google - you will find plenty of
posts especially from in between 2009 - mid 2011. It suggests that geosocial

Warsaw Stock Exchange - quick update with graphs

Below listed companies attracted my attention.

ALMA - advancing and over performing (re-based to 8th of Aug) but may create double top
ASSECOPOL - overperfoming after crossing long-term falling trend
ATLANTIS - high spike, double top and back on-track to falling trend
CORMAY - climbing fast since july (high P/E=47)
EKOEXPORT - has been climbing steeply up since around 20th of September
DEBICA - jumped high after 20th of September; now in parallel with index
ENEA - overperfoming after crossing falling trend

Ruby on Rails: first project notes

Following creates project, controller and run HTTP server (default port: 3000)

rails first
cd first
ruby script/generate controller Somecontroller
ruby script/server

Edit Somecontroller controller responses:

vi app/controllers/Somecontroller_controller.rb

Add views (there.rhtml) for Somecontroller:

class HelloController < ApplicationController
++ def there
++ end

Creating view for Somecontroller and running view in webbrowser:

cd apps/views
echo "<html>Hello first test</html>" >> there.rhtml

Ruby: CSV to HTML

Quickly written code for conversion CSV to HTML.
It looks that using awk is a little bit more efficient,
however on the other hand - below code uses opens file
to write and handles input from command line (ARGV).

Following line:


Drops whitespaces, ", and last commas of every line. Then replaces
commas with </td><td>.

Source code

if ARGV.count < 1
  puts "Usage:"
  puts "  csv2html.rb <csv filename> [output filename]"
ifname = ARGV[0]

Ruby: Stockmarket data retriever -> CSV

This software retrieves data from WEB and saves as CSV.
Data includes fundamentals such as P/E, P/BV, ROA, ROE,
OPBT, Income and so on; also retrieves the gains for
last 5, 10 days, 1, 3, 6 mnts, 1, 2, 3, 5 yrs [if available].

After generation of CSV make sure the file looks right;
it may not look right if webpage was changed. I used this
script just couple of times.

Requires: rubygems and nokogiri

Source code

require 'rubygems'
require 'nokogiri'
require 'open-uri'
class Company
  def initialize(name, url)

WIG companies with good fundamentals.

List of Warsaw's WIG companies having good fundamentals.
Rule for latest (QE2 or latest published) data:
QE2 Net Profit >0
ROE > 0
P/E > 0
P/BV > 0
ROA > 0

All sorted by 1 month gain%.

Name 1 month gain % Capitalization (K PLN)
EKO 55.76 263502
KOELNER 47.72 439560
BORYSZEW 40 1444298
IPOPEMA 38.24 314168

WIG best companies (2 year timescale)

Best gains in 2-years time. Data collected from
using Stockmarket data retriever (bash). Not listed companies on the bottom of this post.
No fundamentals included in analysis.

5days 10 days 1month 3months 6months 1year 2years 3years 5years
CORMAY -3.19 -4.48 2.66 -4.86 0.71 123.12 510.26 - -
ADVGRUPA -9.84 -11.24 -23.81 -35.51 -42.94 -4.33 506.34 271.12 -
Syndicate content