Monday, December 26, 2016

Last night, i had a dream about seeing Amita Buddha

One of my friend's mom is in hospice and was taken home for Christmas day to spend time with her family.
I heard about the news on facebook and wanted to chant for her.
At night before going to bed last night I chanted for her.
I then fell asleep and had a dream where i told my friend and her husband (also my friend) to chant Amida Buddha for her mom laying on the bed in front of us.
Then next thing i saw was her mom was standing up and facing us with her hands together, so my friends looked behind us and saw Amida Buddha appearing.  They were so surprised.  I then turned around and saw Amida Budda too appearing in mid air radiating rings of different color lights, each ring is a different color radiating outward.  Then Amida Buddha disappeared and I woke up.
Hopefully that's a good sign.

Monday, December 19, 2016

Buddha Collage Piet Mondian's design

Art Prints

I looked up Piet Mondrian on google and read about his art and was intrigued by his famous piece of the big red square and balancing rectangles/squares around the red square.
So I thought why not use that design (as a copycat work) but instead of having just rectangles of different colors, I wanted to use my "Buddha Collage" piece in them.
After the piece was done, I was like "Nice, Buddhas appearing in different dimensions!".
I was very happy with this piece combining collage work with an already well-known design by one of the great masters.

Buddha Collage

Photography Prints

Amida Buddha described in Buddhist scriptures as having thousands of buddhas appearing in his rays of light which emits from his whole body.  And from those buddhas' rays of light, thousands more buddhas in each of the ray.

To properly perceive that, you would need to have superpower or having had opened your third eye.

I wanted to represent that in a collage (buddhas within his rays of light).

So I composed this one out of 46 different images of sitting buddhas (45 small ones are repeated to have total of 129 little buddhas).

Well-knowns in my world.

Photography Prints

It's a personal piece to me because they're landmarks/features of popular places that i have always heard about or seen with my own eyes.

It's meant to be a personal feel of global piece.  That's why I put the map of the world as the background.

To me it's a representation of what the world contains to me.

Winterscape collage

Sell Art Online

I was driving with my uncle to SuperStore and on the way i saw the houses on a slope/hill with pine trees weaving between them all covered on top with snow.
It's the classic feel of winterscape.
And that piece was meant to capture that.
It reminds me of the Christmas holidays atmosphere.

Giant Goldfish Collage Process Documentation

Sell Art Online

I thought i would do this piece to document the input images used and the outcome resulting image from my collage.
It's meant to illustrate and excite collage artists.
It documents the process of what fun can be created from different input images.
As you can see the end result is has a very different feel to the input images.  It's something new from reusing existing pieces, the sole purpose of any collage.
It's fun to look at... like elementary grade school ... 1+1+1+1+1= 5.

Giant Goldfish Collage

Sell Art Online

We all know goldfish live in freshwater, but this giant goldfish lives in the ocean.
It's composed of 4 different fishes.
A "Frankenstein" fish as somebody on gimpchat.com has commented.
It's a simple piece for those who are fond of pet goldfishes.
Sell Art Online

This piece came unexpectedly. I was chatting with an old friend on google+ and asked what he was up to. He told me he moved into a new place and has room to work on his motorbike and showed me picture of his bike. It was originally red, with yellow springs and he changed some of the parts to blue. I asked him if he intended it to look like that primary colors. He said no, he just haven't changed all the parts to blue. So the next day i thought why not make a collage of motorbike with primary colors (Yellow, Red, Blue). So I found images of the primary colors including the rider. and made this piece. It was a quick but fun piece with colors.

Still life - Sauces and Condiments collage

Photography Prints

This one i really wanted to capture the commonly used sauces and condiments in a still life. But using different images (partial images) of the subjects. So that they all flood your eyes visually that trigger parts of your brain that think of sauces and condiments. Having a single image of ketchup for example wouldn't be nearly as fun as 3 different partial images of different ketchup bottles composed into one. Same with the table, 3 different images of wood texture. But for the wall i wanted something simple flat so that the subjects would stand out.

On her crown collage

Photography Prints

This piece is a more conceptual.
The main idea here is that through a little girl's eyes, she wishes to have a family of her own with white picket fence to endure through the life (hence the raining weather).

Apple on branch collage

Sell Art Online

Just an apple of branch maybe during fall. I wanted to try something like cubism (showing different angles of the apple, where you can see the top and bottom of apple). The apple is still generally in the apple shape. But I thought an apple would be too plain, so adding different angles give more of twist to the apple, the main subject of the piece.

Saskatchewan Grain Elevator Collage

Art Prints

I wanted to create something that captures the long still standing Grain Elevator of Saskatchewan. By showing different rays of sky like it's standing still through all times of the day. And by different horizontal strips of vegetation, it's standing still through seasons. That's the basic idea. Also the rays all lead to the grain elevator. There isn't a sun, but with the rays it gives a feeling of the sun rising over horizon behind the grain elevator.

Dancing around the fire collage

Sell Art Online

With this piece, i wanted to capture the atmosphere around a fire in the the dark of the night.
Where abstract figures are dancing around a camp fire.
The glow on abstract figures bring out constract between bright and dark surfaces on the figures.
Everyone is happy dancing around the fire.

Martial Arts Dancing Collage

Sell Art Online

This piece... I can't remember how or what triggered me to come up with it.
I just felt like having people come out of solid structure.
At first I thought I would do a male and female coming out of opposite sides of walls.
But then limited by images i could find, I changed my mind to have this structure.
Then instead of just male and female, I ran into the dancing Indian girl and thought that it would add to this piece.  Then after having the girl, I thought I would find a man doing martial arts.
Then I arrived at this piece.  Where female is dancing, and male is doing martials arts...
I guess you could say that "Martial arts and Dancing come out from the same foundation" could be the meaning of the piece but this result came out from luck i never intended to make such statement.

Picasso's Guitarist Collage

Sell Art Online

This one, i pretty much copied Picasso's Guitarist piece. I was curious to see his work reincarnated in Collage form. It was fun to do, searching for pieces that would fit together to resemble Picasso's original.

Race against a train dream collage

Art Prints

Years ago (probably decades) I had a dream.  In the dream I was a person running really fast, then i jumped from a train track going over a bridge but when i landed i turned into sort of like a deer form.  But I was still me, i just grew antlers and was racing against a train.

I still remember that dream.  It was such a weird dream.
I thought I would do this piece to show a glimpse of that dream.
A person with antlers running on all fours like a deer racing against a moving train.

Human Flight Abstract Collage

Sell Art Online

Human flight abstract is an awkward piece.
Because I don't think we're made to fly.  So flying would seem very awkward.  This one is experimental.  I shaped the human figure in the shape of an airplane.
The head and limbs are places in such awkward position in order to fit the shape of the airplane.
It's all awkward and weird.
But that's awkward feeling I feel toward flying if we were to fly.

Deer in Town of Banff Collage

Art Prints

This piece was just a quick and fun one.
I wanted to play with sizes on this one.
Just a simple scene of Town of Banff.  Plus an oversized (unrealistically oversized) deer.  Deers hang out in Banff.
So why not a piece that shows the likeliness of someone seeing a deer in Banff.
It's very hard to miss, hence a giant deer just casually crossing the street in Banff.

M Index Collage

Sell Art Online

This piece I thought I would try something different.
All five elements start with the letter "M".
Moose, Moutains, Mars, Milky way and the Moon.
Hopefully, subconsciously because they all start with "M" they'll excite a similar region of the viewer's brain.
Maybe so, maybe not.
But I liked it because it produced a calm, quiet mood.  The Moose seems to just chilling at the foreign scenic background.  Mars is not visible from Earth in reality (if it is never that big).  But that's the escape/freedom I wanted in this background.  The Moon isn't even that big in reality, but in art anything is possible. right?
I think one of the aspect that makes art so much fun is the ability to create something that doesn't necessarily exists in reality.

Coffee Break Collage

Sell Art Online

When my friend and I visited Spain years ago, we went to museum that showcased Pablo Picasso's work.
We saw many of Picasso's early pieces of art.  Most of them I thought "blah, don't get it!".  But then there was this one piece that I instantly clicked with.  It was an abstract of a guy sitting on a couch in a room (maybe having a coffee/tea don't remember exactly) but there was a dog in the room laying on the floor).  It took me maybe like half a second to click with.  I admired the painting so much I kept going back to it to stare at it.  I seemed to have lost myself in the painting.  The feeling is hard to describe.  It feels like as though all the arts i have seen in my life up to that point didn't compare to that one piece.  I was surprised by the feeling and never imagined that a piece of art work can have such an effect on me.
Since then i tried to look for the piece online but couldn't find it.  I don't think it's available other than that museum's physical collection.
Personally, it seemed as though all of Picasso's abstract work was all worth it even if only few people can click with his pieces.
None of Picasso's other pieces clicked with me like this piece did.
So when I started doing collages, I thought I would try to reproduce the feeling of that piece by creating this coffee break piece.
Of course, this piece doesn't produce the same feeling for me.  But hopefully it might click with someone else.
That's the thing about art though, it's so personal.  A piece could short circuit someone's brain and makes them feel all these feelings when having no effect on other viewers.

San Sebastian Beach, Spain

Sell Art Online
This photo was taken on a trip to Spain (Sebastian Beach). 

I still remember that day. My friend and I decided that we'd hike up the mountain that day, we brought our cameras with us.  I think it was 2/3rds way up (if I remember correctly) there was a viewing area (either paved or stoned, probably stoned).  From this viewpoint i took this shot.  I think it's beautiful.

Funny thing is later after the hike we went visited a souvenir shop and I saw a post card that looked just like this photo.

One night, before falling asleep, I thought back about that day and wondered if there were any predators living on that mountain.  If there were we obviously didn't run into any and oblivious to them.

It was a good day in my memory.

I think this is the only photo I have that's worth selling quality, all my other photos that i take just don't compare to this one.

This photo was taken using a Point and shoot camera (Canon Powershot A700 on auto mode).

Monday, October 10, 2016

Share your "Paint Nite" artworks and hang out with fellow "Paint Nite" addicts around the world.

I have got a friend on facebook, that is a "Paint Nite" addict.
She keeps sharing her "Paint Nite" artworks on facebook which I enjoy a lot.
And she got another friend to join too.
So I thought maybe if you want to share your "Paint Nite" art works with others you can join a forum to do that.  I searched for it but i don't see a forum dedicated to "Paint Nite" artworks.
But there could be a place for that.
You can join a forum on gimp learn forums.

The forum is called "The Arts" which right now include all kinds of art (mostly GIMP related) because we're a new site.
But if we get more "Paint Nite" people to share their work.  I'll put all the "Paint Nite" ones into a sub-forum under "The Arts". (EDIT: I just made a sub-forum called "Paint Nite" for now if anyone wants to share they can, it's a brand new like a week old so we haven't had anyone submit yet, hopefully that'll happen soon).
And it will be "GREAT!".
Go "Paint Nite".

Monday, October 3, 2016

How to create a rotating animated gif.

Head over to GIMP LEARN forum and learn how to quickly create a rotating animated gif.
Creating a rotating animated gif
That you can use for your web pages or web icon.

Friday, September 30, 2016

Polygon art on forums

click this link to see search results for "+polygon +art" on GIMP LEARN forum.
+polygon +art on GIMP LEARN forum

click this link to see search results for "+polygon +art" on GIMP CHAT dot com.
+polygon +art on GIMPCHAT dot com

Wednesday, September 28, 2016

If you have arts that you'd like to share on our GIMP LEARN forum

you can share it in a sub forum called  The Arts on GIMP LEARN forum
We recommend you share your arts created in GIMP.
But we don't like to exclude people.
If you did it in Photoshop, you're welcomed to share it there too, just mention that it was done in Photoshop so people know.

Sunday, September 25, 2016

A forum where GIMP users can hopefully learn from and share with each other.

I would like a place where i can share my GIMP scripts/plug-ins quickly.
I like how friendly the phpBB default forum is.
It took like 5 minutes to set up on HostPapa.
So here it is.
http://bakon.ca/gimplearn/index.php
it's just a subfolder of my main site, my main site was hand made by me so it's not as cool as this /gimplearn/ subfolder forum.
I think i'll be posting my script/plug-ins on here as well as share them on gimpchat.com

Thursday, August 25, 2016

A place where your favorite beers can...

A website where your favorite beers can go into head to head battles.
Just upload an image of your beer(s) to join the great battles.
You can be a judge as well by playing our games and vote for your favorite beer(s).
http://bakon.ca/beer/

Tuesday, August 23, 2016

Trying to write a G'Mic plug-in on Windows.

So I have G'Mic 1.7.5 installed. (1.7.1 which i had earlier didn't seem to want to read from user.gmic file).
And I have a file named user.gmic in my %AppData% folder
which is when I type echo %AppData% in command prompt
it shows C:\Users\Tin Tran\AppData\Roaming

And I am trying to write a simple plug in that allows multiple threshold to be selected at the same time.
The idea is this I have multiple thresholds, stack on top of each other, and then for each layer I delete the white area produce by threshold call and change the black area to a different color.
So far i got threshold to work .... still investigating on how to get it to cut away white or make it transparent so other thresholds would show through and replacing the color... and final step would be to produce a preview that shows the merged results of these layers.
This is what i have so far. (in the user.gmic file)

#@gmic
#@gimp .{development filters}

#@gimp Multi Thresholds : multi_threshold, multi_threshold
#@gimp : Threshold_1 = int(20,1,256)
#@gimp : Threshold_2 = int(40,1,256)
#@gimp : Threshold_3 = int(60,1,256)
multi_threshold :
 --luminance[0] -threshold[-1] $1 -normalize[-1] 0,255 -to_colormode[-1] 4 -if {R==255} A=0 -endif
 --luminance[0] -threshold[-1] $2 -normalize[-1] 0,255 -to_colormode[-1] 4
    -luminance[0] -threshold[0] $3 -normalize[0] 0,255 -to_colormode[0] 4
 

#@gimp _
The if at the end on the first line of command is just me try to get at the pixel data's Red value and see if it's white 255 and set the Alpha to 0 to make it full transparent so far no luck with this.

Friday, August 19, 2016

MySQL database back up on Windows (every 2 hrs or specify number of minutes).

I put this a file called 06_backup.cmd----------------------------------
@echo off
REM backup data into C:\Temp\backup.sql
"C:\wamp\bin\mysql\mysql5.6.17\bin\mysqldump.exe" -u root -proot -h localhost -P 3310 --default-character-set=utf8 --single-transaction=TRUE --databases taxcollection > C:\Temp\backup.sql
REM rename C:\Temp\backup.sql as a dated and timed file
ren C:\Temp\backup.sql "backup-%date%-%time:~0,2%H%time:~3,2%M%time:~6,2%S.sql"
------------------------------------------------------------------------------
Database Backup (on Windows).
-----------------------------
1) change 06_backup.cmd file to have appropriate values to reflect the database we want to back up
   that command file can be run from command prompt

2) Set up a schedule task to run every 2 hours (120 minutes) change the below line to appropriate values and run in command prompt
C:\>schtasks /create /tn "MyTaskTaxCollectionBackup" /sc minute /mo 120 /tr "C:\Users\Tin Tran\project-tin-do-duc-tran\project1\06_backup.cmd"
   this is referenced from http://superuser.com/questions/850299/windows-scheduler-that-runs-every-x-minutes-daily-on-the-command-line
  
3) To stop the automated back up task just delete the task using command, you'll be prompted to delete the schedule task or not
C:\>schtasks /delete /tn "MyTaskTaxCollectionBackup"

That's complete for database auto back up every 2 hours.
--------------------------------------------------------

To restore it to any copy just use below command with change the file to appropriate .sql back up file.
command example:
C:> mysql -u root -p -h localhost -P 3310 taxcollection < C:\Temp\backup-2016-08-19-12H12M02S.sql

MySQL Database Master to Master Replication

DATABASE REPLICATION (Master to Master replication) (On Windows)
-----------------------------------------------------------------------------------------------------------
See 05_Replicate_Database_Master_to_Slaved.txt to see how to have another instance of mysql running. Steps A to D.
Then continue with this guide.
-----------------------------------------------------------------------------------------------------------
I have 2 servers one running on localhost Port 3310, and another running on localhost Port 3311.
From here on I'll the one running on port 3310 server 1 and the other server 2.

1. Do this on both servers.

mysql> STOP SLAVE;
mysql> RESET SLAVE ALL;

2. Take a snapshot of taxcollection database.
   a) On server 1, run

mysql> USE taxcollection;
mysql> FLUSH TABLES WITH READ LOCK;

   b) leave mysql opened so that the locks are there, and make a snapshot by using another command prompt

mysqldump -u root -p -h localhost -P 3310 --opt taxcollection > taxcollection.sql

   c) now back to the opened mysql window that has READ LOCKS; run

mysql> UNLOCK TABLES;

3. Drop taxcollection database on BOTH servers since we have a snap shot now.
mysql> DROP DATABASE taxcollection

4. Shut down both servers. using
mysqladmin -P 3310 -h localhost -u root -p shutdown
mysqladmin -P 3311 -h localhost -u root -p shutdown

5. Change server 1's my.ini to have these values (pay attention to server-id and binlog_do_db)

log-bin=mysql-bin
innodb_flush_log_at_trx_commit = 1
sync_binlog=1
server-id=1
log_bin=c:/wamp/bin/mysql/mysql5.6.17/mysql-bin.log
binlog_do_db=taxcollection

6. Start server 1. example command to start server 1.

mysqld --defaults-file="c:/wamp/bin/mysql/mysql5.6.17/my.ini"

7. in mysql on server 1 create user for server 2 to log in to replicate
mysql> CREATE USER 'replicator'@'localhost' identified by 'password';
mysql> GRANT replication slave on *.* to 'replicator'@'localhost';

8. get master's values to use later on server 2. in mysql on server 1. run

mysql> SHOW MASTER STATUS;
+------------------+----------+---------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB  | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+---------------+------------------+-------------------+
| mysql-bin.000011 |      718 | taxcollection |                  |                   |
+------------------+----------+---------------+------------------+-------------------+

9. Now, for server 2's my.ini file add/change these values (pay attention to server-id and binlog_do_db)
log-bin=mysql-bin
innodb_flush_log_at_trx_commit = 1
sync_binlog=1
server-id=2
log_bin=c:/wamp/bin/mysql/mysqlslave/mysql-bin.log
binlog_do_db=taxcollection

10. Start server 2. example command to start server 2.

mysqld --defaults-file="c:/wamp/bin/mysql/mysqlslave/my.ini"

11. in mysql on server 2 create user for server 1 to log in to replicate

mysql> CREATE USER 'replicator'@'localhost' identified by 'password';
mysql> GRANT replication slave on *.* to 'replicator'@'localhost';

12. on server 2 create taxcollection database.

mysql> CREATE DATABASE taxcollection;

12.  on mysql on server 2, point it to server 1 by running the below using values recorded from step 8

mysql> STOP SLAVE;
mysql> CHANGE MASTER TO MASTER_HOST = 'localhost',MASTER_PORT = 3310, MASTER_USER = 'replicator', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000011', MASTER_LOG_POS = 718;
mysql> START SLAVE;

13. get master's values to use on server 1.  On server 2's mysql run

mysql> SHOW MASTER STATUS;
+------------------+----------+---------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB  | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+---------------+------------------+-------------------+
| mysql-bin.000015 |      560 | taxcollection |                  |                   |
+------------------+----------+---------------+------------------+-------------------+
1 row in set (0.00 sec)

14. back on server 1's mysql. run these in mysql to point it to server 2.  use values from step 13. and change port number to point to server 2's port.
mysql> STOP SLAVE;
mysql> CHANGE MASTER TO MASTER_HOST = 'localhost',MASTER_PORT = 3311, MASTER_USER = 'replicator', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000015', MASTER_LOG_POS = 560;
mysql> START SLAVE;

15. back on server 1. run
mysql> CREATE DATABASE taxcollection;

16. Test to see if it changes on one server is taking effect on other server and vice versa, for me it didn't work...
I had to do these steps again in 17 after empty taxcollection database are created on both servers.

17.
a) On server 1, get values.
SHOW MASTER STATUS;
+------------------+----------+---------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB  | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+---------------+------------------+-------------------+
| mysql-bin.000013 |     1227 | taxcollection |                  |                   |
+------------------+----------+---------------+------------------+-------------------+

b) On server 2, set values that we have from step 17 a.
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST = 'localhost',MASTER_PORT = 3310, MASTER_USER = 'replicator', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000013', MASTER_LOG_POS = 1227;
START SLAVE;

c) On server 2, get values.
SHOW MASTER STATUS;
+------------------+----------+---------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB  | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+---------------+------------------+-------------------+
| mysql-bin.000017 |     1211 | taxcollection |                  |                   |
+------------------+----------+---------------+------------------+-------------------+

d) Back on Server 1, set values that we have from step 17 c.
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST = 'localhost',MASTER_PORT = 3311, MASTER_USER = 'replicator', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000017', MASTER_LOG_POS = 1211;
START SLAVE;

18. Tested to see that updates to server 1 also showed up on server 2 and vice versa.

19. Push the snapshot we saved from step 2 back on to server 1.

mysql -u root -p -h localhost -P 3310 taxcollection < taxcollection.sql

20. Confirm that changes our taxcollection tables are also present on server 2...If not drop database taxcollection on both servers, create database on both servers..and repeat step 17.

MySQL Database Master To Slave Replication

I followed this guide but it's for Linux https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql
But recorded all the steps i did to get it to work Windows. Tested twice.
DATABASE REPLICATION (Master to Slave replication) (On Windows)
-----------------------------------------------------------------------------------------------------------
If you don't already have slave server (used to replicate database from a master server) follow these steps (labelled by letters).
If you already have a slave server, make sure you have a server-uuid values in Data/auto.cnf on your master different from Data/auto.cnf on your slave.
If they are the same, delete auto.cnf on your slave server so that it can generate a new one. The move on to steps that are numbered (below these lettered steps).
-----------------------------------------------------------------------------------------------------------
Step A. Make a copy of master and use as slave. From command prompt. Change directory just outside of master's MySQL folder. Mine is c:/wamp/bin/mysql/.
        and my master's server is in c:/wamp/bin/mysql/mysql5.6.17/.
        so I cd to c:/wamp/bin/mysql/, then xcopy master's folder into a different folder at the same level called mysqlslave.
xcopy /s mysql5.6.17 mysqlslave

Step B. Delete mysqlslave/data/auto.cnf file. So that it can generate a different server-uuid from the master next time server starts.

Step C. Copied mysqlslave/my-default.ini overtop of mysqlslave/my.ini and changed/added these values so that i can my mysql server running on port 3311 and uses its own data
    my master was running on port 3310 so in mysqlslave/my.ini file i changed all the port to 3311.
basedir=c:/wamp/bin/mysql/mysqlslave
datadir=c:/wamp/bin/mysql/mysqlslave/data
port=3311
server_id=2
      
Step D. Now slave server can be run by using mysqld pointing to mysqlslave/my.ini file.
example:
    mysqld --defaults-file="c:/wamp/bin/mysql/mysqlslave/my.ini"

------------------------------------------------
We'll configure the master database/server first
------------------------------------------------
Step 1. On master server. If it's running shut it down from command line. MAKE SURE to all commands in command prompts as Adminstrator to prevent running into trouble.

mysqladmin -u root -p shutdown
    example: (this example specifies Port number and host as well, root user and will prompt for password)
    mysqladmin -P 3307 -h localhost -u root -p shutdown

Step 2. On master server. Find my.ini file (On my default install on windows it's located in c:/wamp/bin/mysql/mysql5.6.17/my.ini).
Change these values in my.ini. Notice server-id=1, log_bin=[a file name and path],
and binlog_do_db=[a database we want to replicate, ie. taxcollection, for multiple databases repeat this line for all databases that we want to replicate]
[mysqld]
port=3310
log-bin=mysql-bin
server-id=1
innodb_flush_log_at_trx_commit = 1
sync_binlog=1
log_bin=c:/wamp/bin/mysql/mysql5.6.17/mysql-bin.log
binlog_do_db=taxcollection

Step 3. Start master server pointing to the my.ini file.
  
mysqld --defaults-file="c:/wamp/bin/mysql/mysql5.6.17/my.ini"

Step 4. a) Open up MySQL from command line

mysql -u root -p
    example: (this example specifies Port number and host as well)
    mysql -u root -p -P 3310 -h localhost
  
   b) run below in mysql to allow a slave user name identified by a password to log in to replicate, you maybe change 'slave_user' and 'password'
CREATE USER 'slave_user'@'localhost' IDENTIFIED BY 'password';
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
   c) do below steps but leave window open active after these steps to perform step 5, This will lock tables to prevent any changes.
USE taxcollection;
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
   d) you'll see something like this
mysql> SHOW MASTER STATUS;
+------------------+----------+---------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB  | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+---------------+------------------+-------------------+
| mysql-bin.000001 |     4020 | taxcollection |                  |                   |
+------------------+----------+---------------+------------------+-------------------+
1 row in set (0.03 sec)

   e) Leave this window/command prompt open to perform step 5, then we'll continue with this prompt in step 6.
 
Step 5. Open a new command prompt, and use command, dump a snapshot of taxcollection database to file.

mysqldump -u root -p --opt taxcollection > taxcollection.sql
    example: (this example specifies Port number and host as well)
    mysqldump -u root -p -h localhost -P 3310 --opt taxcollection > taxcollection.sql
  
Step 6. Go back to mysql prompt that we left opened in step 4 do these to unlock tables.
    UNLOCK TABLES;
    QUIT;
  
----------------------------------------------------------------------
Now we are all done with the configuration of the the master database.
----------------------------------------------------------------------

Step 7. Log into slave server. create the new database that you will be replicating from the master (then exit).
CREATE DATABASE taxcollection;
EXIT;

Step 8. Import database that we previously exported from the master database (file that was exported in step 5)

mysql -u root -p taxcollection < taxcollection.sql
    example: (this example specifies Port number and host as well, on my machine i use port 3308 for slave server)
    mysql -u root -p -h localhost -P 3311 taxcollection < taxcollection.sql
  
Step 9. Change these attributes in my.ini file of the slave server. (relay-log is not there by default, add it)
[mysqld]
port=3311
server-id=2
relay-log=c:/wamp/bin/mysql/mysqlslave/mysql-relay-bin.log
log_bin=c:/wamp/bin/mysql/mysqlslave/mysql-bin.log
binlog_do_db=taxcollection

Step 10. shut down slave server and restart slave server using mysqladmin and mysqld
    example:
    mysqladmin -P 3311 -h localhost -u root -p shutdown
    mysqld --defaults-file="c:/wamp/bin/mysql/mysqlslave/my.ini"

Step 11. Open up MySQL on slave server.
    example:
    mysql -u root -p -P 3311 -h localhost
  
Step 12. run this command to change Master using username and password from step 4b, and log file and log position from step 4d
CHANGE MASTER TO
MASTER_HOST='localhost',
MASTER_PORT=3310,
MASTER_USER='slave_user',
MASTER_PASSWORD='password',
MASTER_LOG_FILE='mysql-bin.000001',
MASTER_LOG_POS=4020;

------------------------------------------------------------------------------
We have configured master and slave server.  Now to activate the slave server.
------------------------------------------------------------------------------

Step 13. While in MySQL on slave server.
START SLAVE;
SHOW SLAVE STATUS\G

NOTE: If run into trouble, with START SLAVE.
Use RESET SLAVE ALL; followed by a restart my mysql. Then it's possible to use CHANGE MASTER TO to re-initialise the replication.

(I ran into problems because i forgot to delete auto.cnf in slave's Data folder after making a copy of master as slave. So i deleted auto.cnf file and restart mysql
then START SLAVE).

Sunday, July 17, 2016

Ad Post template for Free Money Contests facebook page.

This is a template which will be used to post users/likers/advertisers posts who donate to get posts posted to Free Money Contests
Each post will be updated with current Pool amount to keep users interested in seeing them.

We just updated out ad post template again... still 1500x100 but now no border just bottom bar of pool amount


Design of Free Money Contests' announcement and winner

Designs of Free Money Contests' facebook page's contest announcements and winner announcements.

Free Money Contests' announcements template/design

Free Money Contests' winner announcement template/design

Contest #1 worth $5.00 USD at Free Money Contests.

This is a seed contest, we're using our own money to attract likers in order to increase our page posts value to attract advertisers who wish to have ads that get high attention (because with each ad posts, we ad a black border and a LED looking sign at bottom with current pool amount (with 90% or more of which will go toward future contests)).

To qualify for contest you just have to like our Free Money Contests page and like our post and have a paypal account in order to receive the winning if you win.

The post is located at Contest #1 Worth $5.00 USD.


Friday, July 15, 2016

Free Money Contests

Our community page is here:
Free Money Contests Facebook Page.
What's our page about?

the whole idea of the page is that people can freely like our page to follow updated news on contests/winners/posts and to join contests.

To keep the page interesting to our likers, we need money to run free money contests.
Anyone who wants to post to our page for our likers to see has to contact us (through email [click send email from our facebook page], [no porn or work from home scams, please!]) and donate an amount of money (using Paypal) equal to ($0.01 USD multiplied by the number of likers we have on our page) or greater so for example if we had 1,000 likers, donate just $10.00 USD or more, if we had 10,000 likers just donate $100.00 USD or more.

It's important to recognize people who wants to post to our page as donators and not all advertisers because there are cheaper ways to advertise than donating to our pool.

After the manual work of approving the content of a post through email and verifying donation amount, 92% ore more of the donation amount will be added to the pool of funds to run future "Free Money Contests". 8% is for administration work when the page gets busier.  If the page gets more donations as the pool grows larger, this amount for administration work might go lower and any remaining amount, we will donate to charities of our choice.

Our likers doesn't spend any money to qualify for contests, they just have to follow our page to see updated news/contests/winners/posts and join contests by sharing/liking our contest posts.

It's like a form of free lottery at no cost to our likers.  Donations money is to keep the likers interested.

With each post with donation to the page, we'll update the total pool fund available to go toward the next contest as well to keep things interesting for the users/likers to follow.

We imagine that we would have a very high user retention rate because of donated money.
For users/likers it'll be very interesting to follow posts because with each posts, they get to see the pool amount rise, the amount in which they might win with the next contest.
Also for advertisers when we post your post, at the very end we post things such as Current pool size/fund so users are encouraged to click on See more to see the rest of the post, this will help increase user's interaction as they're interested in knowing what the current pool size/fund is.

For the user it's fun to follow the pool size as the fund increases over time, for the advertiser it's good to get user/liker's attention.

Our ultimate goal is to be able to keep running free money contests for the little people (the likers) while having high attention rates for advertisers who can afford to donate to our pool of money.  And as long as our manual tasks such as running contests, approving ads/posts before we post them keeping track of where the funds go, how much has been given out to date and so on are compensated for , we're happy to continue be able to run free money contests, that's our real passion because we think it's interesting work, being able to give our free money.

We'll keep the 92% rate of the donation funds to run free money contests.
With the 8% we plan to pay our own salary of doing administration work.
If this 8% happens to be larger than the average salary of a single person locally, we'll donate the left over to charities our of own choice, if that ever happens (crossing our fingers).

It'll be great for everyone.
Advertisers get interaction from users.
Users/likers get to enter contests for free money.
We get a full time job.
And hopefully charities will help better our world.

When you follow our page

Cover photo redesign (LED lights) for our page
Contest Announcements and Winner Announcement designs
Ad Post Image Template design
Profile image redesign

Sunday, July 3, 2016

Calgary Business/Events/Ads?

Got a business in Calgary?
Want to advertise a local event?
Any other ads?
Advertise with us for free.
Like our facebook page and Join Calgary Free Advertisement Facebook Group and post ads for free.
For Calgary Alberta Canada.

Wednesday, June 22, 2016

A possible way to store solar power for when the sun isn't shining.

I first read about Peltier Tiles when i read about Ann Makoskinski inventing the hollow flashlight that uses electricity created by using Peltier Tiles from difference of temperature between body heat(hand heat) and room temperature.http://www.dailymail.co.uk/news/article-2351791/Ann-Makosinski-Canadian-girl-invents-flashlight-powered-body-heat-earns-spot-Google-Science-Fair-finals.html

And then I read about Vancouver's Austin Wang altering genes of bacteria to create bacteria that is 20 times more efficient at break down waste while creating electricity...

Then I saw a video on youtube about solar panels/solar power.

Here's the idea, when the sun is shining, we create electricity for mass consumption, and at the same time use excess energy from that to heat up something that's good at storing heat over-night (like water).  Then when the sun isn't shining we use this heated (water) and apply it to one side of Peltier Tiles to generate electricity.  I don't know the efficiency of Peltier Tiles but judging based on the fact that if it can light up some LEDs for a flashlight with only the difference from body heat(hand heat) and room temperature which isn't that much of a difference, the difference between heated (water) content from solar and room temperature should be much greater.

Disclamer: I am not an inventor,  It's just an idea and I don't have enough equipment or the know how to create a working model.  The most I have done with solar is creating a backyard hotdog cooker that is in a shape of a cone that focuses sunlight onto a rod where my hotdog was standing.  I hope someone/anyone can take this idea and test it out.

Friday, June 3, 2016

Neural Networks used to get numbers for Lotteries(649,LottoMax,Powerball,Megamillion)

To run these neural networks.
You need Anaconda (Python 2.7) installed.
Libraries needed are: neurolab, numpy, termcolor, urllib2, os, zipfile (use pip to install these after having Anaconda installed, you can just install anyone of these libraries by using "pip install neurolab" from a terminal/command window where neurolab is your library name)
After you have these above installed.
You can download and extract this file: http://bakon.ca/gimplearn/viewtopic.php?f=5&t=283
It'll have 4 folders, one for each lottery type.
While inside one of the lottery folders, you can run from command/terminal

"python create.py" to initially create the neural network. This only needs to run once.

"python get_history.py" to grab historical data for that type of lottery from the internet into that working folder. This can be run whenever there's a new draw result for that lottery type.

"python run.py" to continually train the network and simulate to get output of simulation (numbers with probabilities) that you can use to play the lottery with.  This process loops forever so Control-C to break out of it it'll save the network in file called "one.net" if "one.net" is corrupted by accident because of Control-C process, just copy "one.net.bk" over to "one.net".

Good luck.


Like Us on Our NeuralNetworksLottery facebook page!

Why neural network will/won't work when it comes to predicting the lottery based on past results

Neural network is great at learning possible repeatable trends/patterns when it comes to guessing numbers.

If the lottery machines were controlled by robotic arms and that each ball draw was exactly timed every time the machines starts up and that while the machines are running, the power was at a constant (never changing) by fluctuations in the power supply that might be caused by someone near by turning on a stove/oven.  Then whatever the physical rules are, because everything is kept constant, neural networks can be trained with historical data to predict the next draw based on current draw.  The neural net will learn what the physical laws are or come close to it and will significantly improve its chances.

However, this isn't the case in real life.  People work the machines, maybe even different people each time, they move differently each time not like robots of a constant power supply, they might place the balls in the machine differently each time.  And also the power the machine uses isn't constant, there are fluctuations in power supply no matter how small that might increase/decrease the physical bounces of the lottery balls.

So our hope here is that even though there are these fluctuations, there can be some sort of an average...so even though each time is different, but there is an average number that each time can come close to.  It is only a hope, it's not proven.  If there is such an average way of placing the balls...and an average way of the lottery balls result coming out.  Then the neural net might slightly increase its chance at predicting by learning these rules its errors reduce but it's prediction is closer to the average.  So maybe not an accurate prediction but a prediction that has a higher chance of occurring.

If you're interesting in using neural networks to predict your Canadian LottoMax, 6/49 or American Powerball, MegaMillions you can go to the below links:
Mega Millions (neural network)
Powerball (neural network)
Canadian 6/49 and LottoMax (neural network) 

Cách chạy mạng lưới thần kinh (neural networks) để đoán xổ số.

Cách chạy mạng lưới thần kinh (neural networks) để đoán xổ số.

Trước hết phải install Anaconda
Anaconda có thể cho người dùng chạy ngôn ngữ lập trình Python.
Bạn có thể download và install Anaconda từ trang này:https://www.continuum.io/downloads
Lựa operating system, rồi lựa Python 2.7
Sau khi đã install Anaconda, bạn hãy install libraries neurolab, numpy, termcolor.
Muốn install neurolab,numpy,termcolor có thể mở một command/terminal window và đánh vào theo như dưới rồi để cho nó tự động install sau mỗi hàng.
pip install neurolab
pip install numpy
pip install termcolor

Sau đó bạn có thể đi vào những trang sau đây để lấy python code cho "create.py" file và "run.py" file và tài liệu lịch sử xổ số từ những trang khác nhau tùy theo loại xổ số nào.
Mega Millions (neural network)
Powerball (neural network)
Canadian 6/49 and LottoMax (neural network)

Fancy Neural Network to predict Mega Millions White balls.

(Note: You'll need to install Anaconda Python 2.7, neurolab library, numpy library and termcolor library)

Fancy Neural Network to predict MegaMillion white ball numbers based on historical results.

How to run the network.

First create a folder on your desktop or whevever, let's call this folder MEGA_NN.
Download http://www.txlottery.org/export/sites/lottery/Games/Mega_Millions/Winning_Numbers/download.html
and save it in the MEGA_NN folder as megamillions.csv
 This file has megamillions' historical results.

Now create a file in MEGA_NN folder and name it "create.py" and paste this code into it.


import neurolab as nl
net = nl.net.newff([[0,1]] * 75, [75,75])
net.save("one.net")
 
Now create a file in MEGA_NN folder and name it  "run.py" and paste this code into it

import neurolab as nl
import numpy as np
from termcolor import colored

#read inputs and targets
f = open("megamillions.csv",'r')
input = []
line_count = 0
for line in f.readlines():
 line = line.split(',')
 line_count += 1
 if line_count > 0: #don't skip line 1
  
  lineinput = [0] * 75
  for i in range(4,9):
   lineinput[int(line[i])-1] = 1
  input.append(lineinput)

#set target outputs for training to be from row 1 to end of list, skipping first row 0
target = input[1:len(input)]
#set siminput to be last row of input to use for simulation to predict output
siminput = [input[len(input)-1]]

#set input, make input one row less since the last row wouldn't have target output
input = input[0:len(input)-1]


#make it numpy
target = np.array(target)
input = np.array(input)
siminput = np.array(siminput)


def output(o):
 array = o[0]
 order = array.argsort()
 #ranks = order.argsort()
 
 for i in range(74,-1,-1):
  index = order[i] + 1
  print colored(str(index),"green") + colored("(" + str(int(array[index-1] * 1000)/1000.0) + ")","red"),
  if i % 5 == 0:
   print
 print 
 
net = nl.load("one.net")
print colored("Mega Million","blue") + colored(" number","green") + colored("(probability)","red")
out = net.sim(siminput)
output(out)
while True:
 net = nl.load("one.net")
 print "Training..."
 error = net.train(input,target,epochs=10,show=1)
 
 # with line below we can specify training to stop when error[0] is smaller than goal it stops
 # but since we're inside a forever loop, there's no need to specify goal.
 # error = net.train(input,target,epochs=10,show=1,goal=0.01)
 
 # just a fail safe, just an extra save so that if we Ctrl-C while we're saving we'll have at least copy of latest network that works
 net.save("one.net.bk")
 net.save("one.net")
 
 print colored("Mega Million","blue") + colored(" number","green") + colored("(probability)","red")
 out = net.sim(siminput)
 
 #output for display purposes only
 output(out)
Now we have all the files we need.
You''ll have to update megamillions.csv file whenever there's a new megamilion  lottery result out to keep the information up-to-date.

Now, first we run from a command/terminal window: python create.py
This will create the initial network (untrained).

Now we run from a command/terminal window: python run.py
and let that run, as it trains more the error will reduce and it's prediction becomes more accurate/fancy based on historical data.

 It'll train 10 epochs/times then simulate once show its prediction once. and repeat this process forever.

You can always Control-C to exit the run process and the trained network up to that point will be saved in one.net (neural net file).

If you have bad luck and happen to Control-C while it's trying to save one.net you'll have a corrupted one.net but that's okay because you can always copy the file one.net.bk over to one.net if program complains able not being able to read one.net.

The output shows numbers from highest probability down to lowest one... so even though it shows all 75 numbers, you might only want to play the first 5 (like chosen megamillions whiteballs).

Fancy Neural Network to predict Powerball white ball numbers.

This post is also posted on GIMP LEARN forum - Anything goes

(Note: You'll need to install Anaconda Python 2.7, neurolab library, numpy library and termcolor library)

Fancy Neural Network to predict Powerball white ball numbers based on historical results.

How to run the network.

First create a folder on your desktop or whevever, let's call this folder POWER_NN.
Download http://www.powerball.com/powerball/winnums-text.txt
and save it in the POWER_NN folder as winnums-text.txt.
This file has powerball's historical results.

Now create a file in POWER_NN folder and name it "create.py" and paste this code into it.

import neurolab as nl
net = nl.net.newff([[0,1]] * 69, [69,69])
net.save("one.net")
 
Now create a file in POWER_NN folder and name it  "run.py" and paste this code into it

import neurolab as nl
import numpy as np
from termcolor import colored

#read inputs and targets
f = open("winnums-text.txt",'r')
input = []
line_count = 0
for line in f.readlines():
 line = line.split('  ')
 line_count += 1
 if line_count > 1: #skip line 1
  
  lineinput = [0] * 69
  for i in range(1,6):
   lineinput[int(line[i])-1] = 1
  input.append(lineinput)
input.reverse() #powerball shows results in reverse order from newest to oldest so we will reverse this list

#set target outputs for training to be from row 1 to end of list, skipping first row 0
target = input[1:len(input)]
#set siminput to be last row of input to use for simulation to predict output
siminput = [input[len(input)-1]]

#set input, make input one row less since the last row wouldn't have target output
input = input[0:len(input)-1]


#make it numpy
target = np.array(target)
input = np.array(input)
siminput = np.array(siminput)


def output(o):
 array = o[0]
 order = array.argsort()
 #ranks = order.argsort()
 
 for i in range(68,-1,-1):
  index = order[i] + 1
  print colored(str(index),"green") + colored("(" + str(int(array[index-1] * 1000)/1000.0) + ")","red"),
  if i % 5 == 0:
   print
 print 
 
net = nl.load("one.net")
print colored("Powerball","blue") + colored(" number","green") + colored("(probability)","red")
out = net.sim(siminput)
output(out)
while True:
 net = nl.load("one.net")
 print "Training..."
 error = net.train(input,target,epochs=10,show=1)
 
 # with line below we can specify training to stop when error[0] is smaller than goal it stops
 # but since we're inside a forever loop, there's no need to specify goal.
 # error = net.train(input,target,epochs=10,show=1,goal=0.01)
 
 # just a fail safe, just an extra save so that if we Ctrl-C while we're saving we'll have at least copy of latest network that works
 net.save("one.net.bk")
 net.save("one.net")
 
 print colored("Powerball","blue") + colored(" number","green") + colored("(probability)","red")
 out = net.sim(siminput)
 
 #output for display purposes only
 output(out)
 

Now we have all the files we need.
You''ll have to update winnums-text.txt file whenever there's a new powerball lottery result out to keep the information up-to-date.

Now, first we run from a command/terminal window: python create.py
This will create the initial network (untrained).

Now we run from a command/terminal window: python run.py
and let that run, as it trains more the error will reduce and it's prediction becomes more accurate/fancy based on historical data.

 It'll train 10 epochs/times then simulate once show its prediction once. and repeat this process forever.

You can always Control-C to exit the run process and the trained network up to that point will be saved in one.net (neural net file).

If you have bad luck and happen to Control-C while it's trying to save one.net you'll have a corrupted one.net but that's okay because you can always copy the file one.net.bk over to one.net if program complains able not being able to read one.net.

The output shows numbers from highest probability down to lowest one... so even though it shows all 69 numbers, you might only want to play the first 5 (like chosen powerball whiteballs).


Thursday, June 2, 2016

Fancy Neural Net Quickpicks for LottoMax and Lottery 6/49

I call it "Fancy" because it uses Neural Networks to come up with numbers but I don't think it's any better than normal quickpicks (but you never know right?).

I take 6/49 results from this page:http://lotto.bclc.com/winning-numbers/lotto-649-and-extra.html (at bottom of page, there's a "Download Lotto 6/49" button)
and LottoMax results from this page: http://lotto.bclc.com/winning-numbers/lotto-max-and-extra.html (at bottom of page, there's a "Download LOTTO MAX" button).

I create a neural network using python's neurolab library, using the below code in a file called create.py
 
import neurolab as nl

net = nl.net.newff([[0,1]] * 49, [49,49])

net.save("one.net")

This would create a network of  49 input nodes accepting values from 0 to 1, 49 hidden nodes, and 49 output nodes.

I then read from the 649.csv file (downloaded above). and as rows of 49 inputs of 0 with resulted numbers at the right indexes set to 1 to feed into the network, my target output for training are simply the next draw.  So one input row takes the row below it as target output.
and feed that into the created neural net ("one.net") for training.
I use the below code for "649.csv".

import neurolab as nl
import numpy as np


#read inputs and targets
f = open("649.csv",'r')
input = []
line_count = 0
for line in f.readlines():
 line = line.split(',')
 line_count += 1
 if line_count > 1: #skip line 1
  
  lineinput = [0] * 49
  for i in range(4,10):
   lineinput[int(line[i])-1] = 1
  input.append(lineinput)

#set target outputs for training to be from row 1 to end of list, skipping first row 0
target = input[1:len(input)]
#set siminput to be last row of input to use for simulation to predict output
siminput = [input[len(input)-1]]

#set input, make input one row less since the last row wouldn't have target output
input = input[0:len(input)-1]


#make it numpy
target = np.array(target)
input = np.array(input)
siminput = np.array(siminput)


def output(o):
 array = o[0]
 order = array.argsort()
 #ranks = order.argsort()
 
 for i in range(48,-1,-1):
  index = order[i] + 1
  print str(index) + "(" + str(int(array[index-1] * 1000)/1000.0) + ")",
  if i % 5 == 0:
   print
 print 
 
net = nl.load("one.net")
print "Lotto 649 number(probability)"
out = net.sim(siminput)
output(out)
while True:
 net = nl.load("one.net")
 print "Training..."
 error = net.train(input,target,epochs=10,show=1)
 
 # with line below we can specify training to stop when error[0] is smaller than goal it stops
 # but since we're inside a forever loop, there's no need to specify goal.
 # error = net.train(input,target,epochs=10,show=1,goal=0.01)
 
 # just a fail safe, just an extra save so that if we Ctrl-C while we're saving we'll have at least copy of latest network that works
 net.save("one.net.bk")
 net.save("one.net")
 
 print "Lotto 649 number(probability)"
 out = net.sim(siminput)
 
 #output for display purposes only
 output(out)
 

And i save this above code as run.py
 Then when to run the code. I run "python create.py" from command line, after that finishes, i run  "python run.py", and let it trains as long as i like to, each time it trains the error is reduced, and after 10 epochs (times it trains) it'll simulate using the updated trained network with the last row of the csv file as input and so we get output results of our fancy quickpick numbers.

Similarly, I use the below code for LOTTOMAX.csv.


import neurolab as nl
import numpy as np


#read inputs and targets
f = open("LOTTOMAX.csv",'r')
input = []
line_count = 0
for line in f.readlines():
 line = line.split(',')
 line_count += 1
 if line_count > 1: #skip line 1
  
  lineinput = [0] * 49
  for i in range(4,11):
   lineinput[int(line[i])-1] = 1
  input.append(lineinput)

#set target outputs for training to be from row 1 to end of list, skipping first row 0
target = input[1:len(input)]
#set siminput to be last row of input to use for simulation to predict output
siminput = [input[len(input)-1]]

#set input, make input one row less since the last row wouldn't have target output
input = input[0:len(input)-1]


#make it numpy
target = np.array(target)
input = np.array(input)
siminput = np.array(siminput)


def output(o):
 array = o[0]
 order = array.argsort()
 #ranks = order.argsort()
 
 for i in range(48,0,-1):
  index = order[i] + 1
  print str(index) + "(" + str(int(array[index-1] * 1000)/1000.0) + ")",
  if i % 5 == 0:
   print
 print 
 
net = nl.load("one.net")
print "Lotto MAX number(probability)"
out = net.sim(siminput)
output(out)
while True:
 net = nl.load("one.net")
 print "Training..."
 error = net.train(input,target,epochs=10,show=1)
 
 # with line below we can specify training to stop when error[0] is smaller than goal it stops
 # but since we're inside a forever loop, there's no need to specify goal.
 # error = net.train(input,target,epochs=10,show=1,goal=0.01)
 
 # just a fail safe, just an extra save so that if we Ctrl-C while we're saving we'll have at least copy of latest network that works
 net.save("one.net.bk")
 net.save("one.net")
 
 print "Lotto MAX number(probability)"
 out = net.sim(siminput)
 
 #output for display purposes only
 output(out)
 


And that's it.  You can copy the code above and put it in the same folder, with the downloadable .csv files from the bclc.com site and run these neural networks yourself or change the structure of the neural network configuration in create.py.

The information above was intended to for me so that if I ever factory reset my laptop, i'd have the information here to run my fancy neural net quickpicks for Lottery 6/49 and LottoMax.

HOW TO RUN this neural net.
 Install Anaconda by getting it from here: https://www.continuum.io/downloads
Choose Python 2.7 (at least that's what i use).
Once installed, from a terminal/command window run "pip install neurolab".
Also from a terminal/command window run "pip install numpy".
Copy the codes from above and put them in their respective filenames (create.py and run.py), create.py and run.py that tries to read from 649.csv should go in the same folder as 649.csv file
create.py and run.py that tries to read from LOTTOMAX.csv should go in the same folder as LOTTOMAX.csv file.
I would just create 2 separate folders (one for 649 files and one for LOTTOMAX files).
Download the 649.csv and LOTTOMAX.csv files from bclc.com and put them in the created folders.
While inside 649 folder for example, run "python create.py" then "python run.py".
And similarly for LOTTOMAX, while inside that folder you can run "python create.py" then "python run.py".

Wednesday, May 25, 2016

Have you ever been in a store and have difficulty finding a product?

Have you ever been in a store and have difficulty finding a product?
And there seems to be no employee around to ask?
Or if you find an employee, he/she doesn't work in the department of products you're looking for and so he/she has to page/call on another employee in that department and you have to wait even longer for a simple question of where things are?
Well, say hello to http://bakon.ca!
http://bakon.ca helps customers find where products are on their own.  But the site is brand-new so there isn't much data on it...yet!
The idea is that store employees or other customers who know where products are can help each other by adding product location details into our site that can be searched by anyone else.

Over time this site would be very useful to people who have problems finding products.

Just simply look up a product within a store up, if you find it where it's described, give it an up-vote so it'll help others find it too.  If you didn't find it where it's described, down-vote it so others know to not bother with that product entry.

Through crowd-sourcing, we should be able to help each other find products easier.

Tuesday, May 24, 2016

bakon.ca graphics 01

bakon.ca graphics 01
bakon.ca graphics 02

If only smartphones were around when I worked at Canadian Tire.

Many of my friends and I worked at Canadian Tire (Richmond Square, Calgary Alberta Canada).
We didn't have smartphones back then.
I only wished we had smartphones back then, then i could really use a site like http://bakon.ca
When I first started working there, my first day, a customer asked me where fans were.  I had no idea where they were.  So i had to ask my manager.
As I worked there a little longer, I started to know more of where products were.
But with http://bakon.ca, I could've entered location of products whenever a customer asked and i found out where they were from co-workers.
This  way, i would've built a knowledge base for myself and it would also help customers who used the site to simply look for where products were located without having to ask an employee (like me).
I would've had more time to keep those empty shelves full.
Every time a customer sees an empty shelf, it's a potential lost sale (if they don't hunt down an employee and ask if we had any more in the back).
Lost sales translate to less revenue, and less revenue means less chances of a big raise.
I think bakon.ca could've helped me to get a raise since it would make me more productive at my other tasks being freed up from repeated questions of where things simply were.

Do you know people who work in retail stores? want to help them out?

If you know people who work in retail stores,
you can help them by telling them about http://bakon.ca
http://bakon.ca helps retail employees/customers help each other find products within stores.

Through the use of http://bakon.ca, retail employees can just enter product's location once and that info. can be searched by many people after that.  If the information is accurate and customers can find the product, they'll likely vote-up that product entry and so it rises to the top for other customers to see.

By telling your retail friends about this http://bakon.ca site. You'll give them a tool to help customers find products without their help.  So after having entered products locations for their stores products, they'll be mostly free to focus on other tasks and be fit for a raise because they're worth more to their employer now that they don't have to do redundant task of answering questions simply about where products are.

Can't find a product within a store?

Can't find where a product is within a store?
You should bakon it!

When you search for product within a store on http://bakon.ca, and it isn't found, it automatically gets added as an outstanding request for that specific store.

So that users/retail employees who'd like to monitor their store on our site could add that product for future users/shoppers.

So your empty searches are not in vain, they in turn help other shoppers who will look for the same product in the future.

And if other shoppers do the same then chances are you'll run into a product that they already searched for and have already been added to our site.

If you're a retail employee of a store, you should check back at our site on your store's page and monitor the outstanding requests list (at bottom of page, in light red) and make sure you add products for these requests as these searches for these products could translate into real sales.

Monday, May 23, 2016

Know where products are in store(s) and want to help out shoppers?

Visit http://bakon.ca
If you don't see a store that you know of, you can just add it to our site.
Then you can start adding products that you know the location of to help out future customers/shoppers locate them through the use of the site.

If customers search for a product and it isn't found in on our site for that specific store, it'll add an outstanding request to bottom of page (in red while viewing that store) so that anyone else (ideally a store employee) can come in and add that product with information of its whereabouts.

Our system depends on crowd sourcing and up-voting/down-voting to maintain the validity of the information on the site.

If you know where a few products are, that helps too.  Just imagine, one entry will help so many shoppers in the future looking for the same product at that specific store.  When you add a store or a product there is an added by field so you can use your real name, your email, or your nickname, or even your secret identity if you're a superhero who likes to help out.


bakon.ca helps customers find products without asking employees


Introducing bakcon.ca "WHERE CAN I FIND IT?" graphics

http://bakon.ca allows anyone to add any store and any product.
The site runs of the idea that by crowd-sourcing, any store can be added either an employee of that store or a regular customer.
And products can be added for each store by anyone.
Introducing bakon.ca graphics
A feature we have is that if someone searches for a product within a store and no results come up, that search will end up being an outstanding request which shows up at bottom of page in light red color (when viewing store).  This way, anyone else (ideally a store employee who can monitor their store regularly or any other shopper who knows location of product) who'd like to help out can add info for that product and any user after that can use that information.
Stores and/or Products can be up-voted/down-voted to indicate information's validity.
If it has higher votes it'll show up top when searched for.
If it has lower votes it'll show up on the bottom when searched for.
If it gets too many vote-downs it'll get excluded from search results.
Crowd-sourcing can be a wonderful tool if we all use it wisely.

So, instead of having to line up to get your turn at asking a store employee, with http://bakon.ca you can just look up products yourself and find it yourself, store employees will be more available for actual help that doesn't involve simple questions of where things are.  Better service, and they become more productive which will make them worth more to their employers (Fit for a pay raise even!?).

The site however is brand new and needs brave volunteers from crowd source to populate it with data.  Once we have that going we should have a great system where information is entered once and it helps out many.  Voting over time by crowd source will allow the system to phase out stale information such as when a product changes its location.

Sunday, May 22, 2016

New color coding to help identify entities easily.

http://bakon.ca now uses color coding to help  identify entities easily.

Blue indicates store information.
Green indicates product information.
Red indicates outstanding requests.
Color coding to help identify entities

Color coding to help identify entities

We've added some stores that we know of into our store directory listing

 We've added some stores that we know of into our store directory listing in the below link.
http://bakon.ca/store_directory.php

This link can be accessed from one of the bottom link on all our pages (at the bottom under "Store Directory").

If your store is not listed, please add it yourself or encourage your employee(s) to add it by going from the "Home" page, and narrow down by country, province/state, then city, then there will be a "Add Store For This Location" button.

By adding your store, you can start to add products (with their location) within your store to our database for customers/employees to search easily/freely.

It is our hope that by adding such information, your employees will be freed up (from answering simple questions of where things are in your store) to focus on stocking shelves to keep them full and reduce lost sales (of whenever a shelf is empty, you have a possible lost sale).

Increased sales will generate more revenue and you'll be able to afford to pay your employees higher wages which translate into higher quality of service.

Saturday, May 21, 2016

Over 15,000 cities/towns of the United States have been added to our database.

 bakon.ca helps users identify/add stores and add/locate products within stores in their cities.

United States Fifteen Thousand Seven Hundred and Forty Five (15,745) Cities/Towns have been added to the city's directory.
View directory of cities here: http://bakon.ca/city_directory.php


This is so if you can't find the city you're looking for you can always double check with this directory.  If your town/city is missing from the list, feel free to notify me at oldtran@gmail.com and I'll add it.

How to locate products within stores.

http://bakon.ca
helps retail employees/shoppers/customers help each other locate products within stores.

As a customer/shopper you can search for a store name within your city.  While viewing that store you can search for products which then will tell you where to locate these products.

If you search for a product and it isn't found at all in the store, it'll be added to outstanding requests.

These outstanding requests show up at the bottom of page when viewing store.  So that retail employees or someone else who knows where these products are located can add these products for the store.

http://bakon.ca is there to help and hope to grow its knowledge based on user's contributions of store information and product locations.

Each store can be up-voted or down-voted and stores with higher votes will show up on top of search results when searched for.

Similarly products can also be up-voted or down-voted and will also show up on top of search results when searched for.

Relevancy will depend largely on voters.

So if you've found the product you've looked for at the right location, please vote up that product.

Also if you see a store that is a real store, vote up that store.

Voting-down on products indicates that the product's location description is no longer valid or spam.
Voting-down on stores indicates that the store no longer exists or spam.

If you don't know where an item is within a store

If you don't know where to find a product within a store, you should bakon it.
If you don't see a store that exists in real life but doesn't exist on http://bakon.ca you should bakon it.
We want you to use the word "bakon" as a verb like "google" when you don't know what something is you "google" it.
If you know where a product is within a store in your city, and you want to help other fellow shoppers to find it easily, you should bakon it.
bakon up-voting and down-voting will help to validate relevance of product(s) within store(s).

Friday, May 20, 2016

A website to help retail employees/shoppers help each other locate products in stores.

http://bakon.ca
A website to help retail employees/shoppers help each other locate products in stores.

bakon.ca (that's bacon with a "k") is a website where anyone can add stores information.
Stores can be up-voted or down-voted based on their validity.
And Stores with higher up-votes will show up on top of searches.
Similarly products or items can be added by anyone and be up-voted or down-voted based on how good their location descriptions are and they will also show up higher on the list based on their up-votes when searched.

The idea is a simple easy-to-use website where retail employees or shoppers can add location description of products and can be easily searched for by other shoppers when an employee isn't available.

Our hope is that as more people use the site, employees will relieved of repeated questions of where products are and that they become more productive on other tasks such as stocking shelves or whatever else.  As retail employees become more productive, they're worth more to their employees and shall deserve a raise.  It is also a good tool for new employees who just started working at new place and not know where things are, they can just look up products and even enter their own products and their locations as they learn where the products are as they build up their knowledge base for the store while helping customers who have internet access on their mobile phones.

Please share bakon.ca with fellow shoppers and friends who work in retail industry.  We'd like to thank you all in advance for contributing to the content of the site and for using our up-vote/down-vote features to help maintain the validity of the content of our site.

You can also like our facebook page at https://www.facebook.com/Bakonca-253401615016269/

The below are some stores that have been added by myself (the WebMaster of bakon.ca)
Canada Alberta Calgary Canadian Tire (Richmond Road)  (I worked here when i was 18 for about 2.5 years)
Canada Alberta Calgary Garrison Woods Safeway (I worked here for about 2 weeks in one summer).
Canada Alberta Calgary Westhills Shopping Centre Safeway (I didn't shop here very often because everytime I was in Westhills it was for a movie with friends).


Here's animated gif demo of site being used.

Friday, May 13, 2016

Hipstreet MP3/Radio Player How to change language back to English.

My mom accidently set her Hipstreet Mp3/Radio player's language to something that looks like Thai I think.

Here's how i changed it back to English.
Look for the Gear picture in front of a monitor Icon (located at bottom right).
Then look for the icon that looks like the world (should be the 2nd icon)
Then scroll all the way up top and pick the 1st one, it should change to English.

Wednesday, May 11, 2016

Creating your own graphical font

If you want to create your own graphical font (with full colors and all).
You can do that in GIMP with my Custom Font Script.
It lets you define each character of the alphabet or comma,period and all other special characters, on separate layers.
So for example if you want to define the letter a with an image of the letter a, you'd name the layer "a.png".
And for a comma you'd have an image of a comma on a layer named ",.png"
And for a question mark you'd have an image of a question mark on a layer named "?.png"
and so on for all possible characters of your font graphics..
Then run the script and it'll let you type a multi-line text message with options like justification, letter spacing and line spacing.
Then when you click OK the script will run and generate the graphics that is spelled out by your multi-line text.
More details on this script to be used for GIMP here -> http://gimpchat.com/viewtopic.php?f=9&t=14045

On that page there are also some sample graphical fonts that are saved as .xcf files (GIMP's files) and you can just open up in GIMP and run the script to generate your own graphics with those already created fonts...
Here's a sample of TOMB RAIDER that uses one of those .xcf files.
TOMB RAIDER sample graphical font generated by custom font script

 

GIMP scheme script-fu (How to apply color curve from saved presets).

I didn't find a way to apply color curve from saved presets in scheme script-fu for GIMP.
So I found some python-fu code sample and i used to write some python-fu scripts to expose these functionalities to scheme script-fu.
More details on how is described in this link here on gimchat.com forum: http://gimpchat.com/viewtopic.php?f=9&t=14064

Tuesday, May 10, 2016

GIMP Script-Fu how to apply an exported file of Colors Curve settings to a layer or current selection

I looked up how to apply a preset colors curve settings to a layer (or active selection)
from GIMP script-fu and there doesn't seem to be a way.
But I found some python fu code that can load and apply a Color Curves Setting from an exported curve file.
So I used this to give me access/ability to apply a Color Curves Setting from an exported file to a layer or active selection from Scheme Script-Fu.
More details on this python fu are located at http://gimpchat.com/viewtopic.php?f=9&t=14058

Saturday, May 7, 2016

As an alternative to PhotoFont

How this idea came about.

I first thought since PhotoFont .phf files are xml files and define characters based on images what if i could extract .png data, edit the .pngs and then encode the edited .pngs back into the .phf files.

Extracting .png data from .phf files was successful.
However, after editing the .pngs, and try encoding .pngs back in the .phf, i kept getting Invalid and can not be installed when i used the GIMP's Photoshop plugin for PhotoFont.

 So then I thought if i can't get that to work, why not create my own images that define each character of the alphabet and all the special symbols as layers and have a script to accept a text string as input and loop through each characters/letter/symbol of the string and compose the graphics in a new image using the defined layers.

 The idea is simple, but it creates a platform for font designers to design new creative custom photographic fonts that are reusable by saving them as .xcf files (GIMP's file format). Then anytime you want to create a text string in whatever font just open up that .xcf and run the script and compose the text string using the .xcf as a font definition.

This idea and the script is located on GimpChat.com forum here -> Custom Font script (spawned from Wallace's PhotoFont topic).

Samples of what you could create with the mentioned script..
THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG
THE CUSTOM SCRIPT IN GIMP FOR GIMP CHAT IS AWESOME
the above images are created by cropping images found here and then running the script to generate these phrase or sentences.