Ubuntu :: Disable .pyc Byte Code From Saving Every Time Run .py
May 17, 2010I am running ubuntu 9.10 and was wondering how to disable write access in python. I want to stop .pyc extensions from saving every time I run a .py file.
View 3 RepliesI am running ubuntu 9.10 and was wondering how to disable write access in python. I want to stop .pyc extensions from saving every time I run a .py file.
View 3 RepliesI got across a peculiar problem with memcpy.History:writing a code which do flash/Read functionality for SPI Parts.
Implementation:
1.memory map the Flash chip registers to userspace. - fine
2.Issue block read command
3.Just print the data I got, using the memory mapped address - fine I got the correct data.
4.Copy the data to a local buffer from memory mapped address using memcpy - FAIL
UPDATE:
on SUSE 11.3 -32 bit the above code worked perfectly, but on SUSE 11.4 - 64bit , Ubantu, Fedora it failed.
I am using gcc compiler obviously. I am using i386/x86_64 OS. Processor: Intel core 2 duo, SNB after step 4 , when I dump the data from local buffer every thing is FF.But step 4, if i implement byte by byte copy using assignment operator, it worked.is there any known bug with memcpy? am I missing anything?
I listen to a radio show that broadcasts online a lot named ChatterBox Video Game Radio, and when i e-mailed one of the hosts about retrieving archived shows since the site didn't have any archiving of old shows or a link to it. Alon was nice enough to send me one of their old web pages with a HUGE list of archives but it's only the xml source code of the page. since the page isn't live of course, and because of the how he had to send me the code for the page and not a hyperlink to the page, i have the source code. now going through the source code of the page he emailed to me, i can find links to .mp3 files and i can open them and listen to the shows in web browsers, but i was hoping to save them to my computer forfuturelistening.URL]ww.chatterbox'ssite.com/whatever/anotherfolder/showiwanttosave.mp3 in firefox quicktime comes in and lets me listen (as long as my internet connection is active) but wont enable me to save because i dont have the pro version of quicktime. quicktime is good, but i dont use it enough to actually buy the product, and i'm not going to buy the product for just a one time use. is there another way to where i can save this file using the address from the source code (and the ChatterBox allows listeners to save their shows to computer for free, so it not some work around to rob them of money. i fully support them) without having to buy quicktime 7 pro(a product i never really use)?
View 4 Replies View RelatedI recently installed the first non-virtual Ubuntu server in our office (to put it in perspective, it's outnumbered several to one by Windows servers). It had an inexplicable array failure, and now it's been retasked to run VMware Server for testing purposes since we don't trust it at the moment. For the sake of ease of use, on this server I decided to install Xubuntu desktop x64, rather than Ubuntu server as I've done with a couple others.
This server is on an old school 8-port Linksys PS/2 KVM. It's got a CRT monitor in the middle of a rack of somewhat aging equipment. The problem I'm having is somewhere between the KVM, this old monitor, and some power saving... when Xubuntu tries to put the monitor in standby, instead it gets this vertically scrolling garbage. The Windows servers in this rack don't have any problem putting it to sleep, but I figured I might as well just turn off DPMS on this particular server.
So I logged in via SSH, stopped GDM, generated a /etc/X11/xorg.conf, and changed Option "DPMS" to Option "NoDPMS" which according to the manpage should take care of it. I also changed the GDM video mode with this xorg.conf so it's definitely being used. Following some other suggestions I found in my search, I issued "xset s off" and "xset -dpms" but this hasn't disabled monitor power saving either. I've been restarting GDM each time I change something. 5-10 minutes later it's scrolling garbage again. What's it going to take to turn off monitor power saving at the GDM logon screen?
running PCLinuxOS 2009.1 on my main machine : AMD Phenom II 545, 3GB DDR2, ATI Radeon HD 4870 512 GDDR3, 1 x 250GB IDE, 1 x 1x 250 GB SATA, 1 x 160GB SATA, 1 x 500GB SATA.What I want to disable are the HDD's powering down after a while because when I come back to work at my machine, it is painful to wait for the HDD's to spin up again. I also want to disable the screen from turning off. I have removed DPMS from myxconfig, but it as made no difference.
View 3 Replies View RelatedI am using Xubuntu 9.10 on a nettop as a X11 terminal.In order to do that, I created a custom session script that runs some commands instead of starting xfce4-session and the likes from GDM. When I boot this nettop, GDM automatically logs a dummy user in (called "test"), and runs a script that does "xhost +", and opens a small X Terminal to keep the X session alive, while some other computer sets the DISPLAY environment variable to point to <nettop>:0 and runs gnome-session.
My trouble is that after 10 minutes of idle, the screen is blanked(power saving I presume).
I tried to add "xset -dpms" and "setterm -blank 0 -powersave off" to my startup script, in vain. I want my power saving options to be configured on the remote computer, not the nettop. How could I prevent X/GDM/Whoever from blanking the screen ?
My RHEL5 server is sync with NTP server. But we dont want to follow Day light saving. Is there any option to disable it. Like in windows you can uncheck the option if you dont want to follow day light saving.?
View 3 Replies View RelatedI recently updated my Lucid to Maverick. I am running ubuntu on Lenovo Thinkpad w500. I am facing problems with day light savings. I changed couple times to reflect the correct time. Inspite of my correction, it is still displaying wrong time. Attached is the image of my error.
View 2 Replies View RelatedWhat should I have to do if I want to back again to the previous conf of automatic Conversion to Daylight saving. Also I noted that the o/p of the zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2011 was
/usr/share/zoneinfo/Africa/Cairo Thu Apr 28 21:59:59 2011 UTC = Thu Apr 28 23:59:59 2011 EET isdst=0 gmtoff=7200
/usr/share/zoneinfo/Africa/Cairo Thu Apr 28 22:00:00 2011 UTC = Fri Apr 29 01:00:00 2011 EEST isdst=1 gmtoff=10800
/usr/share/zoneinfo/Africa/Cairo Sat Aug 20 20:59:59 2011 UTC = Sat Aug 20 23:59:59 2011 EEST isdst=1 gmtoff=10800
/usr/share/zoneinfo/Africa/Cairo Sat Aug 20 21:00:00 2011 UTC = Sat Aug 20 23:00:00 2011 EET isdst=0 gmtoff=7200
and changed to be
/usr/share/zoneinfo/Africa/Cairo -9223372036854689408 = NULL
/usr/share/zoneinfo/Africa/Cairo 9223372036854689407 = NULL
/usr/share/zoneinfo/Africa/Cairo 9223372036854775807 = NULL
After adding the new rule
Note : these are the I made to disable auto conversion to daylight saving. I created a text file named nodst at usr/share/zoneinfo/Africa
Then type the following:
#Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule egypt 2011 2013 - Apr 29 00:00 0 s
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
Zone Africa/Cairo +2:00 egypt BRE%s
Then issue the following command
zic nodst
ln -sf /usr/share/zoneinfo/Africa/Cairo /etc/localtime
I am a beginner to C and C++ and so far I have learned two ways to measure the time my program takes to run.
Method 1: Just compile your C file and if the executable is say a.out just type time ./a.out
Method 2: Here the general structure of the code is
Code:
#include<stdio.h>
#include<time.h>
int main(void)
[Code]....
Question 1 Do Method 1 and Method 2 return the same times?
Question 2 Method 1 gives three times real, usr and sys . Is it true that USR+SYS= TIME GIVEN BY METHOD 2
I have performed some experiments with small codes which return the squares of numbers uptill 36000 and I feel the answer to question 2 is yes
I'm doing a program and I want it to execute some code during n seconds. For example e put a command in the shell like this 'ls % 10' and the program should run the command ls for 10 seconds.I'm trying something like this:
Code:
pid = fork();
if(pid == 0) {
[code]....
how graphs can be plotted on a web interface on real time ? I have a web interface coded in PHP mostly and for graphs I have jpgraphs. But the job needs the graphs to be real time not static. As of now there's a server side program that writes onto a csv file. I read data from the file and plot it using jpgraph when the page loads. Is there anyway I can code real-time dynamic graphs on a web interface ?
View 2 Replies View RelatedI have a C program like this:
...
CODE_BLOCK;
...
I want to know how much CPU time spent on CODE_BLOCK. Since the process executing CODE_BLOCK may be preempted during execution, this CPU time may not be equal to the (wall-clock) time elapsed from the beginning of CODE_BLOCK to the end of it.
I am trying to write suitable .pro file for my application. I need real-time library. Have you some ideas how to do that? I just need the line for linking with real-time library...
View 2 Replies View RelatedThese days I see the disk check that is popping up when my Ubuntu is booting up quite frequently. It says 'press C to cancel' but C (or Shift C or CTRL C or CTRL ALT C) does not have any effect. Pressing CTRL+ALT+DELETE reboots but again ends up in the vicious loop of disk check. How to bypass it? When I need to critically enter the desktop for an urgent pressing info waiting for 20 to 25 minutes disk check is kind of difficult.
View 6 Replies View RelatedSo, I usually write/find a test case generator for any code that I write. This type of code generally leads to some file output. To be thorough, I try and generate many different files to test my code on.
Say the command is like this:
Is there a way to automate this for many different values of the parameters and generate many different files?
I tried:
I wasn't able to use the $i in the filename, and without it the command gave me no errors, but did nothing else either. I know the Unix command line is very powerful, and I have a feeling that this should be possible, but I just don't know how to do it.
Was just wondering if there was a way to disable the password prompts that pop open every time I try to install something. Is there a way to do that?
View 3 Replies View RelatedI am working on shortening my boot time on my laptop, so I am using bootchart to help me pinpoint the slow areas. So far, I got it down to about 40 seconds (from 2:33! -- dosfsck was running every boot). I don't use LVM (I am dual booting with Windows and it's hard enough with static partitions), and I have tried to disable LVM in every way I can imagine except uninstalling it (system-config-kickstart depends on it), but I still see it being initialized at boot time. How do I prevent the system from even considering LVM during boot??
My bootchart is here, and in case it is useful to anyone, my bootchart.tgz and boot.log..I'm running Fedora 14, and it's up to date.
I live in Egypt and we used to have Daylight Saving Time in this time of the year. But due to some political conditions, this decision was revoked and we are not using DST this year. The problem is that my Redhat 5.6 machines, configured to the timezone Africa/Cairo has already set the DST (UTC+3). The current time in Egypt is UTC+2. Of course I can manually set the time but the servers are set to sync automatically with an NTP time server so that time gets synced automatically whenever I try to change it. I want a way or another to disable DST switching.
View 4 Replies View RelatedI have just installed ssh-server in my Ubuntu 10.04, and really want to know how to enable/disable it and I also want to be sure if the changes will take effect after the next boot or not, and how to do that?
View 8 Replies View RelatedCan anyone shed some light in this? Using Fedora 14-64, new install, 185 Opteron x 2 gig ram, sata hard drives formatted Ext4.However, in my home directory I have a folder for all my digital photos of which I have more than 20,000, and in another folder I have images and clipart of which I have almost 8,000. That is a lot of read only access to a significant number of files in my home directory.
How can I tell Fedora to not update the LAST ACCESS TIME of those files (specifically images) that will never actually be changed other than just being read. I want to leave that feature enabled for the rest of my home directory. I am trying t; improve my disk performance in Nautilus because whenever I access the folders with my images the system literally slows to a crawl and sometimes even the mouse stops working for several minutes until Nautilus has finished having its heart attack.
I am using Arch Linux and want to disable console messages which are displayed when the kernel boots. I have tried the quiet and loglevel=2 options in /boot/grub/menu.1st as given below:
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/c6dbfcdc-fcd8-498e-9182-f3bddc4f05ff ro loglevel=2
However I am still seeing console messages at boot. I used grub-install after the changes.
Any ideas where I am going wrong?
Running RHEL5 and because of the environment that we are in we have to disable the users being able to change the screen saver. I have tried using the gconf-editor to see if I can disable it but don't know if that is the correct way of doing it. I also looked in /etc/xdg/menus and really don't want to miss with that.
View 2 Replies View RelatedHow to disable the LDAP Users automatically with the specified time duration. For this any configuration file required or else a script need to be written.
View 1 Replies View RelatedeCouldnyone help me out to put the right configuration parameters in the grub.conf file so I can enable or disable the Fedora Logo on boot time ?
Currently I'm seeing 3 bars being filled on boot time. I need to get back the Fedora Logo during the boot time process.
How can I do this?
I have set 'ONBOOT=no' in interface script '/etc/sysconfig/network-scripts/ifcfg-eth0:2' but my interface bring up at boot time, what is the problem , I have checked it 3 or 4 diff os/machine but the same issue. Can anyone please help me to disable virtual IP's at boot time that network script make it up every boot time.
View 4 Replies View RelatedIm new to this Cent OS as well as Unix based Operating Systems. Please help me with the below requirement.My Company is a Serach based data collector from different websites like Google, Yahoo & many more..Collecting the data from the search engines is a issue for right now.. As many search engines are blocking us to search and retrive the date after some time.. Taking Google as example : Google Blocks my IP after every 30 mins of retriving.. Application is a Windows based & using Windows 2003 as the Server.. Would like to give a Dynamic IP to the Windows Server via 1st Ethernet Card & enable the 2nd Ethernet for the Internet..Eg : eth 0 = 192.168.1.1eth 1 = x.x.x.x (Public IP)I have check with few of my friends who told me to get Linux or Cent OS installed to do a interface disable after given time & enable a secondary device or virtual interface the next couple of seconds... Like eg : eth 1 = x.x.x.1 eth 2 = x.x.x.2 eth 3 = x.x.x.3 so on.. Would like the eth 1 to be down after 60 mins & eth 2 o be up & again after 60 mins of up time eth 2 down & eth 3 up.
View 6 Replies View RelatedI'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't do what I want:
$ time ./foo > /dev/null >> output_from_time_command.txt
I would like to allow the auto-log off feature either an extended inactivity time or to disable inactivity-logouts.
I use my PC strictly at home, and have no security issues. I've set my username to no-password so that I just click [twice] to log back on. But I must do that to see the screen display - say to see what's playing on Pandora.
Can I set the auto-logout-time somewhere or disable the function?
Having openSUSE 11.2, Firefox (latest release) is having some issues when comes to "saving image as", it fails to offer "saving window"? Konqueror works normal, what could be the problem with Firefox?
View 4 Replies View Related