Is there a random number generator for Puppy? (Solved)
Is there a random number generator for Puppy? (Solved)
Currently I am learning memorizing techniques for random numbers to improve my visualization capabilities (read Foer's Moonwalking with Einstein if you want to know why)
Is there a program which offline does what this site does:
http://www.random.org/strings/
Does such a random number generator exists as pet?
Is there a program which offline does what this site does:
http://www.random.org/strings/
Does such a random number generator exists as pet?
Paste one of these into terminal - or make a script and run from terminal:
Mixed letters (lower and upper case) and numbers:
cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w 10| head -n 10
Mixed letters (upper case only) and numbers:
cat /dev/urandom| tr -dc 'A-Z0-9' | fold -w 10| head -n 10
Numbers only:
cat /dev/urandom| tr -dc '0-9' | fold -w 10| head -n 10
fold -w 10 - is the amount of numbers on each line.
head -n 10 - is the amount of lines.
Change the numbers if you want more or less numbers/lines.
example output numbers:
2358050481
8314333229
5764338769
2275964781
4952461006
7813938010
7352332659
8528802348
5485997065
1874076173
example output mixed:
iBMAwghUnz
P8LL2M5Bae
wjvw5ofoh9
Hc28U2BE00
sJSFBbsL1F
6u8oENfSNf
brKzmmwya3
nyvf6JMlRD
nvrRK8ElEZ
MfaDglBaDM
Mixed letters (lower and upper case) and numbers:
cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w 10| head -n 10
Mixed letters (upper case only) and numbers:
cat /dev/urandom| tr -dc 'A-Z0-9' | fold -w 10| head -n 10
Numbers only:
cat /dev/urandom| tr -dc '0-9' | fold -w 10| head -n 10
fold -w 10 - is the amount of numbers on each line.
head -n 10 - is the amount of lines.
Change the numbers if you want more or less numbers/lines.
example output numbers:
2358050481
8314333229
5764338769
2275964781
4952461006
7813938010
7352332659
8528802348
5485997065
1874076173
example output mixed:
iBMAwghUnz
P8LL2M5Bae
wjvw5ofoh9
Hc28U2BE00
sJSFBbsL1F
6u8oENfSNf
brKzmmwya3
nyvf6JMlRD
nvrRK8ElEZ
MfaDglBaDM
Almost there
He. thanks...
One more question for the script - what is the command to make lxterminal show the numbers and not disappear immediately? It works when I open lxterminal then type or copypaste the line
cat /dev/urandom| tr -dc '0-9' | fold -w 10| head -n 10
...but I want to make it into a simple icon which I can click to get the numbers in lxterminal without opening the lxterminal first.
One more question for the script - what is the command to make lxterminal show the numbers and not disappear immediately? It works when I open lxterminal then type or copypaste the line
cat /dev/urandom| tr -dc '0-9' | fold -w 10| head -n 10
...but I want to make it into a simple icon which I can click to get the numbers in lxterminal without opening the lxterminal first.
You can also open gnumeric, Calc on the desktop, and type in:which will give you a number between 0 and 1. If you want them bigger typeor 1000000 or whatever.
Code: Select all
=rand()
Code: Select all
=rand()*1000
Re: Almost there
Create a new script, i.e. random_numbers, and type in the following:Dromeno wrote:He. thanks...
One more question for the script - what is the command to make lxterminal show the numbers and not disappear immediately? It works when I open lxterminal then type or copypaste the line
cat /dev/urandom| tr -dc '0-9' | fold -w 10| head -n 10
...but I want to make it into a simple icon which I can click to get the numbers in lxterminal without opening the lxterminal first.
Code: Select all
#!/bin/sh
xterm -hold -e "cat /dev/urandom| tr -dc '0-9' | fold -w 10| head -n 10"
I like that snippet stu90... dunno why I but I felt compelled to make a silly little Xdialog..
Code: Select all
#!/bin/ash
while [ 1 ]
do
VAR=$(cat /dev/urandom| tr -dc 'A-Z0-9' | fold -w 10| head -n 10)
Xdialog -yesno "$VAR \n\nGenerate More?" 0 0
case $? in
0)
unset VAR
sleep 0.5
;;
*)break
;;esac
done
Puppy Linux Blog - contact me for access
Perhaps something for pwidgets
Thanks again! For anyone who wants to try it (surry for my ranting...I am amazed by the results) after reading Moonwalking with einstein I read this one http://www.amazon.com/Quantum-Memory-Po ... 0743528662, practiced a bit, and in less than a week I can memorize a 25 digit number in ten minutes. And remember it three days later. I have no idea of a good application yet but it definately is a fun technique to win bar bets.
But to return to the subject of this post. With this site you can make a true randomness producing widget. Perhaps a nice addition to pwidgets (random number block of the day)? It would be the most useful, I think, if you were able to choose the length and width of the column.
http://www.random.org/widgets/integers/
But to return to the subject of this post. With this site you can make a true randomness producing widget. Perhaps a nice addition to pwidgets (random number block of the day)? It would be the most useful, I think, if you were able to choose the length and width of the column.
http://www.random.org/widgets/integers/
Following on from 01micko's xdialog GUI - here is a yad GUI with format, character and column length options.
Code: Select all
#!/bin/bash
## stu90 ##
## random number / letter / mixed generator ##
## root password for user fido ###
[ "`whoami`" != "root" ] && exec sudo -A ${0} ${@}
TITLE="Randomizer"
TEXT=" Make a random memory string "
FORMAT="mixed!numbers!letters"
GUI=$( yad --title="$TITLE" --text="$TEXT" --form \
--field="Format:CB" "$FORMAT" \
--field="Character:NUM" "10" \
--field="Columns:NUM" "10" --button="gtk-ok" )
GETFORM=`echo $GUI | cut -d '|' -f1`
GETCHAR=`echo $GUI | cut -d '|' -f2 | cut -d '.' -f1`
GETCOLU=`echo $GUI | cut -d '|' -f3 | cut -d '.' -f1`
if `echo "$GETFORM" | grep -q mixed` ; then
cat /dev/urandom| tr -dc 'A-Z0-9' | fold -w "$GETCHAR"| head -n "$GETCOLU" | yad --title="$TITLE" --height="275" --text-info
elif `echo "$GETFORM" | grep -q numbers` ; then
cat /dev/urandom| tr -dc '0-9' | fold -w "$GETCHAR"| head -n "$GETCOLU" | yad --title="$TITLE" --height="275" --text-info
elif `echo "$GETFORM" | grep -q letters` ; then
cat /dev/urandom| tr -dc 'A-Z' | fold -w "$GETCHAR"| head -n "$GETCOLU" | yad --title="$TITLE" --height="275" --text-info
fi
Glad I don't have a Mac
wow... It are threads like this, with lots of helpful geeks hobbyists and other humans which makes me love linux so much in comparison to, for instance...
http://edcooke.memrise.com/2011/05/is-a ... tally.html
I have a lucid puppy 525 running on an asus eee 1215n, running one and a half times as fast as a MacPro for 1/4 of the costs plus a top notch helpful forum
http://edcooke.memrise.com/2011/05/is-a ... tally.html
I have a lucid puppy 525 running on an asus eee 1215n, running one and a half times as fast as a MacPro for 1/4 of the costs plus a top notch helpful forum
Dear Stu,
It's tiny and great, so thanks. The only thing I would do is change the 'Columns' label for the spinbox to Rows, since that is what we seem to be dealing with Don't worry. I can't tell right from left without looking at my hands. Really And, strictly speaking, x and y are relative.
With kind regards,
vovchik
PS. I recently got the latest Yad and compiled it (Anansik is up to 0.16.3)!
It's tiny and great, so thanks. The only thing I would do is change the 'Columns' label for the spinbox to Rows, since that is what we seem to be dealing with Don't worry. I can't tell right from left without looking at my hands. Really And, strictly speaking, x and y are relative.
With kind regards,
vovchik
PS. I recently got the latest Yad and compiled it (Anansik is up to 0.16.3)!
stu,
One useful forum about such memory techniques is
http://mnemotechnics.org/x/
The audiobook by Dominic O'Brian about "quantum memory techniques" can be downloaded from filestube (but I think it is more legal to buy it). Weird name, quantum memory technique, since a quantum leap is by definition the smallest possible change in nature, so I guess it is more a title intended to boost sales. There is no new age magic stuff involved.
It is more a kind of mental zip for numeral information. It is a kind of mental-visual language. If you picture a single given digit in ten different colors (for instance transparent, red, orange, yellow, green, blue, violet, black, white, gold) then you can mentally encode/remember all numbers between 1-100 by just 10 digits. With little practice in the same direction it is possible to condense all numbers between 1 and 999,999 with just 1 mental picture etc. Remembering pics is way easier than remembering strings of numbers.
Basically this is the technique which memory champions use to remember ten thousands digits of pi. And other than just trying to remember long strings by reading/repeating, visulalization is something you can train for. So thanks again for your little piece of software. Being able to remember a copuple of dozen random digits is a fun thing to amaze friends and a nice "mind game" to practice. Some people like to do tetris. I like to train remembering random number blocks...
One useful forum about such memory techniques is
http://mnemotechnics.org/x/
The audiobook by Dominic O'Brian about "quantum memory techniques" can be downloaded from filestube (but I think it is more legal to buy it). Weird name, quantum memory technique, since a quantum leap is by definition the smallest possible change in nature, so I guess it is more a title intended to boost sales. There is no new age magic stuff involved.
It is more a kind of mental zip for numeral information. It is a kind of mental-visual language. If you picture a single given digit in ten different colors (for instance transparent, red, orange, yellow, green, blue, violet, black, white, gold) then you can mentally encode/remember all numbers between 1-100 by just 10 digits. With little practice in the same direction it is possible to condense all numbers between 1 and 999,999 with just 1 mental picture etc. Remembering pics is way easier than remembering strings of numbers.
Basically this is the technique which memory champions use to remember ten thousands digits of pi. And other than just trying to remember long strings by reading/repeating, visulalization is something you can train for. So thanks again for your little piece of software. Being able to remember a copuple of dozen random digits is a fun thing to amaze friends and a nice "mind game" to practice. Some people like to do tetris. I like to train remembering random number blocks...
Thanks Volchik - yes the colums label needs to be changedvovchik wrote:Dear Stu,
It's tiny and great, so thanks. The only thing I would do is change the 'Columns' label for the spinbox to Rows, since that is what we seem to be dealing with Don't worry. I can't tell right from left without looking at my hands. Really And, strictly speaking, x and y are relative.
With kind regards,
vovchik
PS. I recently got the latest Yad and compiled it (Anansik is up to 0.16.3)!
cheers.
Thanks Dromeno - i will check it out, i need all the help i can get in the memory department!Dromeno wrote:stu,
One useful forum about such memory techniques is
http://mnemotechnics.org/x/
The audiobook by Dominic O'Brian about "quantum memory techniques" can be downloaded from filestube (but I think it is more legal to buy it). Weird name, quantum memory technique, since a quantum leap is by definition the smallest possible change in nature, so I guess it is more a title intended to boost sales. There is no new age magic stuff involved.
It is more a kind of mental zip for numeral information. It is a kind of mental-visual language. If you picture a single given digit in ten different colors (for instance transparent, red, orange, yellow, green, blue, violet, black, white, gold) then you can mentally encode/remember all numbers between 1-100 by just 10 digits. With little practice in the same direction it is possible to condense all numbers between 1 and 999,999 with just 1 mental picture etc. Remembering pics is way easier than remembering strings of numbers.
Basically this is the technique which memory champions use to remember ten thousands digits of pi. And other than just trying to remember long strings by reading/repeating, visulalization is something you can train for. So thanks again for your little piece of software. Being able to remember a copuple of dozen random digits is a fun thing to amaze friends and a nice "mind game" to practice. Some people like to do tetris. I like to train remembering random number blocks...
cheers.
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
You can also do this from the shell, to get a number from 0 - 32767:
http://tldp.org/LDP/abs/html/randomvar.html
Code: Select all
echo $RANDOM
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
And, from 0 to any other number (5 in this case), like this:Pizzasgood wrote:You can also do this from the shell, to get a number from 0 - 32767:http://tldp.org/LDP/abs/html/randomvar.htmlCode: Select all
echo $RANDOM
Code: Select all
echo $[$RANDOM%6]
Code: Select all
perl -le 'print rand(6);'