Thursday, November 10, 2011

dell gx260 modprobe p4_clockmod

step1/3...................
to load cpu speed ondemand [powertop o].............
su: modprobe p4_clockmod =======================
step2/3...................
$ lsmod | grep freq
/*****************************************************
*** to set p4_clockmod  [my dell gx260 pc] on reboot **
*****************************************************/
step3/3:.............................
Now that [p4_clockmod.ko] works my dell gx260. I will want to load [p4_clockmod.ko] on boot. To do this on a Debian based system like K/X/Ubuntu put the following line in the /etc/modules file. ===========
line @ /etc/modules file: p4_clockmod #thats it powertop must of set it to ondemand.
###################################
su:
powertop
#####################################
option [O] oh will let powertop change cpu to ondemand mode. --------------------------------------
and it should save some power. ##########################################
view the changes made by powertop [sesion]...
$ watch -n 1 cat /proc/cpuinfo
note:.........................................
conky does the same thing. it wil monitor cpu speed.
##############################################
view cpu info..................................
code: $ cpufreq-info ==============================================
tut@http://doc.opensuse.org/products/draft/SLES/SLES-tuning_sd_draft/cha.tuning.power.html
#################################
$ cpufreq-info 
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 283 MHz - 2.27 GHz
  available frequency steps: 283 MHz, 567 MHz, 850 MHz, 1.13 GHz, 1.42 GHz, 1.70 GHz, 1.98 GHz, 2.27 GHz
  available cpufreq governors: powersave, conservative, ondemand, userspace, performance
  current policy: frequency should be within 283 MHz and 2.27 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.

  current CPU frequency is 283 MHz.
  cpufreq stats: 283 MHz:51.95%, 567 MHz:2.19%, 850 MHz:4.47%, 1.13 GHz:0.78%, 1.42 GHz:0.09%, 1.70 GHz:0.18%, 1.98 GHz:0.04%, 2.27 GHz:40.29%  (143)
--------------------------
how to load at boot.........
info @ http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html
i added p4_clockmod to /etc/modules file.
thats all i needed to do for a dell gx260 running mepis8 with the debian/lenny kernel

wallpaper blue gimp

my fav.



source wallpaper

Sunday, October 30, 2011

python loop 33cels to 91fahr

more stupid python code snippets from me by gleeming crap on the interwebs.

# convert Celsius to fahrenheit SCRIPT. #

print " type 'stop' to end this app and return to python shell"
print " this app converts celsius to Fahrenheit via loop nesting. "
print " if num line is what makes this app WORK!"

#####
## " this app is python 2point6 uses raw inpute "
#####

stop = 'stop'

###
#c = 33
#f = (reply)*9/5 + 32
#print (c), "degrees (c) celsius " "= " ,(f), "degrees (f) Fahrenheit  "
###

# f = (num)*9/5 + 32 

while True:
    reply = raw_input('Enter your text number now:')
    if reply == 'stop':
        break
    elif not reply.isdigit():
        print('Bad!' * 8)
    else:
        num = int(reply ) *9/5 + 32
        if num   :
        #     print('low')
        # else:
          print(num ) 
     
print('Bye')

stupid python 91fahr to 32cels code snippet



run code in console:
$ python ./my-dumb-code.py
##############
cut and paste code:
# python 
# fourmula //::: C = (F - 32) * (5 / 9)
# convert fahrenheit to Celsius   SCRIPT. #
# darn this lame scrip took me forever to guese #
################
print " type 'stop' to end this app and return to python shell"
print " this app converts   Fahrenheit to celsius via loop nesting. "
print " if num is what makes this app WORK!"

#####
## " this app is python 2point6 uses raw inpute "
#####

stop = 'stop'



 

while True:
    reply = raw_input('Type "stop" to exit or 1 to contunue:')
    if reply == 'stop':
        break
    elif not reply.isdigit():
        print('Bad!' * 8)
    else:
        num = int(reply )   ##-32
        if num   :
           f2c = int(raw_input("Please enter the temperature in Fahrenheit you wish to convert: "))
           f2c = (f2c - 32) *5/9 
          # print f 
           print ">> input converter to cels ="
           print  f2c
        #     print('low')
        # else:
        #  print(num ) 
     
print('Bye')

python fahrenheit to celsius.
NOTES::
//°C to °F Farenheit = (9/5)* celsius + 32
//°C to °F Multiply by 9, then divide by 5, then add 32
//// °F to °C Deduct 32, then multiply by 5, then divide by 9
// (fahr -32) * (5.0/9.0)

fahrenheit to celsius c++ snippet


it took my slow ass all day to learn this crap.

test my c2f c++ sloppy code

Saturday, October 29, 2011

my sloppy c++ mplayer-svn code

compile: $ c++ infile.cpp -o outfile.bin

Sunday, May 22, 2011

mepis8 ffmpeg x11grab desktop capture

capture
fffffffffffffffffffff
[bitrate 800] 

$ ffmpeg -f oss -ac 2 -i /dev/audio \ -f x11grab -r 25 -s 1024x600 -i :0.0 -b 800 video-n-sound-test_av.mpeg
note:"alsa-oss" may be need to be installed for "/dev/dsp" to work.
------------------
[check] "capture" control on it needs to be used to grab mic sound recording.