Search Results

Search found 12007 results on 481 pages for 'usb speed'.

Page 47/481 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • Increasing speed of python code

    - by Curious2learn
    Hi, I have some python code that has many classes. I used cProfile to find that the total time to run the program is 68 seconds. I found that the following function in a class called Buyers takes about 60 seconds of those 68 seconds. I have to run the program about 100 times, so any increase in speed will help. Can you suggest ways to increase the speed by modifying the code? If you need more information that will help, please let me know. def qtyDemanded(self, timePd, priceVector): '''Returns quantity demanded in period timePd. In addition, also updates the list of customers and non-customers. Inputs: timePd and priceVector Output: count of people for whom priceVector[-1] < utility ''' ## Initialize count of customers to zero ## Set self.customers and self.nonCustomers to empty lists price = priceVector[-1] count = 0 self.customers = [] self.nonCustomers = [] for person in self.people: if person.utility >= price: person.customer = 1 self.customers.append(person) else: person.customer = 0 self.nonCustomers.append(person) return len(self.customers) self.people is a list of person objects. Each person has customer and utility as its attributes. EDIT - responsed added ------------------------------------- Thanks so much for the suggestions. Here is the response to some questions and suggestions people have kindly made. I have not tried them all, but will try others and write back later. (1) @amber - the function is accessed 80,000 times. (2) @gnibbler and others - self.people is a list of Person objects in memory. Not connected to a database. (3) @Hugh Bothwell cumtime taken by the original function - 60.8 s (accessed 80000 times) cumtime taken by the new function with local function aliases as suggested - 56.4 s (accessed 80000 times) (4) @rotoglup and @Martin Thomas I have not tried your solutions yet. I need to check the rest of the code to see the places where I use self.customers before I can make the change of not appending the customers to self.customers list. But I will try this and write back. (5) @TryPyPy - thanks for your kind offer to check the code. Let me first read a little on the suggestions you have made to see if those will be feasible to use. EDIT 2 Some suggested that since I am flagging the customers and noncustomers in the self.people, I should try without creating separate lists of self.customers and self.noncustomers using append. Instead, I should loop over the self.people to find the number of customers. I tried the following code and timed both functions below f_w_append and f_wo_append. I did find that the latter takes less time, but it is still 96% of the time taken by the former. That is, it is a very small increase in the speed. @TryPyPy - The following piece of code is complete enough to check the bottleneck function, in case your offer is still there to check it with other compilers. Thanks again to everyone who replied. import numpy class person(object): def __init__(self, util): self.utility = util self.customer = 0 class population(object): def __init__(self, numpeople): self.people = [] self.cus = [] self.noncus = [] numpy.random.seed(1) utils = numpy.random.uniform(0, 300, numpeople) for u in utils: per = person(u) self.people.append(per) popn = population(300) def f_w_append(): '''Function with append''' P = 75 cus = [] noncus = [] for per in popn.people: if per.utility >= P: per.customer = 1 cus.append(per) else: per.customer = 0 noncus.append(per) return len(cus) def f_wo_append(): '''Function without append''' P = 75 for per in popn.people: if per.utility >= P: per.customer = 1 else: per.customer = 0 numcustomers = 0 for per in popn.people: if per.customer == 1: numcustomers += 1 return numcustomers

    Read the article

  • Which Large File System Format to use for USB Flash drive compatible with Ubuntu/Mac/Windows?

    - by wajiw
    I've had this problem for a long time and can't find a solution. I switch between the 3 OSes all the time and use a 1TB USB Drive to do so. I can't seem to find a format that is compatible across all systems that handles large files (at least 8-9 GB). Does anyone have a solution for this? Recently I've tried exFat but that messes up the filesystem when trying to read on windows after adding files from Ubuntu (using the fuse driver). The OSes currently I'm using are Windows Vista/7, Mac OS X (10.6.5) and Ubuntu 10.10

    Read the article

  • Why does Live-USB boot freeze at the moving dots?

    - by Caleb
    I am currently trying to boot into Ubuntu 12.04 x86 using a USB. I used Untetbootin to do all that boot crap and what not. But for some reason Ubuntu wont load pass that screen with the dots and the purple background. What happens is the dots all light up once, then they go back to white then they all light up at the same time and then it just gets stuck there. Ive even tried using an x64 copy (since my CPU supports it) but have no luck with that either. Ive even tried different DISTRIBUTIONS of Linux and all have failed with loading. Please help

    Read the article

  • How can I resize an external USB NTFS partition?

    - by chris
    I have a new USB drive which came with a single NTFS partition. How can I shrink that so that I can create an ext4 partition? gparted does not seem to have the "Resize" option highlighted. Update: After following the directions below, after unmounting I am still not able to resize the partition. There is a warning though: "Unable to find mount point. Unable to read the contents of this file system! Because of this, some operations may be unavailable. The following list of software packages is required for ntfs file system support: ntfsprogs". However, with the partition mounted, I can read & write to the file system on the drive just fine, and ntfsprogs is installed and current. What's next?

    Read the article

  • Can I run Ubuntu Live from a USB flash-drive without destroying the data on it?

    - by Lucian
    I already have a number of files on a flash drive (8 gb) that I would prefer to keep, but I would like to try Ubuntu even if merely for the aesthetics. I use Windows XP. I know that it's definitely possible to run Ubuntu from a bootable drive like my flash drive to try Ubuntu but I would much rather keep my files intact not only on my flash drive but also my hard drive, if that's possible. I also want to know if it's entirely possible that while running Ubuntu from the USB if I can switch back to Windows while my computer is still on. If I'm missing something, please let me know. I'm very grateful for any assistance in this matter.

    Read the article

  • external disk dont work on ubuntu

    - by Skirki
    i have problem with in my ubuntu: when i connect external imation apollo disc i dont see a file system. Disk is working because in windows OS on this same computer it works as well. when i typed dmesg i got following logs [12913.260078] usb 4-1: new low speed USB device using ohci_hcd and address 15 [12913.440072] usb 4-1: device descriptor read/64, error -62 [12913.730058] usb 4-1: device descriptor read/64, error -62 [12914.020085] usb 4-1: new low speed USB device using ohci_hcd and address 16 [12914.200082] usb 4-1: device descriptor read/64, error -62 [12914.490150] usb 4-1: device descriptor read/64, error -62 [12914.780064] usb 4-1: new low speed USB device using ohci_hcd and address 17 [12915.200070] usb 4-1: device not accepting address 17, error -62 [12915.380081] usb 4-1: new low speed USB device using ohci_hcd and address 18 [12915.800065] usb 4-1: device not accepting address 18, error -62 [12915.800100] hub 4-0:1.0: unable to enumerate USB device on port 1 i trying to fix that by use commands: cd /sys/bus/pci/drivers/ehci_hcd echo -n "0000:00:02.1" unbind but it did not match the result and i don't have any other idea

    Read the article

  • How to boot into Live USB/CD with UEFI on latest Vaio S series?

    - by user76528
    I am unable to boot from USB/CD into a live Ubuntu session to proceed with install. Esc or F12 didn't work and I can't seem to be able to enter the bios settings. Sony Vaio S w/ Ivy Bridge (just one month old, Insyde H2O EFI?) I have read about: creating /EFI/boot on a fat16 stick http://ubuntuforums.org/showpost.php?p=12071096&postcount=2 installing rEFInd using the Alternate install CD (supposedly in order not to mess with W7 UEFI boot partition) It's pretty clear what I have to do afterwards http://askubuntu.com/a/157062 but I am at loss on how to simply boot into a Live Session then install. Thank you

    Read the article

  • How do I change the keyboard layout to a non-standard one on a Live (USB) session?

    - by Agmenor
    I am running Ubuntu 13.04 in a Live (USB) session. My physical keyboard layout is called Bépo, it is the French language Dvorak method-based layout. I would like to change my input layout to this too. To do this, I tried booting in a French spoken session, then open the Keyboard Layout preferences app. Normally, to add a layout, you should click on the + sign and select your layout. However the list that appears is very short and does not contain what I want. On the contrary, on a persistent non-live installation, the choice of Bépo is present. This is also the case during an installation of Ubuntu. So I do I change the keyboard layout of my live session to the correct one?

    Read the article

  • Why dd is not a reliable command to write bootable .iso files to USB thumb drive?

    - by Samik
    As the answers here indicate Ubuntu .iso s are not expected to boot if copied with dd to a USB thumb drive. Now my question is why is so that some Linux distributions have the option to directly write their bootable .iso file to a thumb drive with dd but some (read Ubuntu) have not(for Ubuntu I think it has to be converted to .img first). Is it for some architectural difference in .isos? Or is it due to any limitation of dd itself?I don't know if it is off-topic here. I can move it to a more proper place if the community thinks so or suggests one. Some explanation would be appreciable.

    Read the article

  • How are USB ports related to the computer power, and why would they cause my computer to freeze?

    - by BDuelz
    I have an issue with my new Toshiba laptop. Whenever I plug in an external USB device, if the laptop is not plugged in to the wall, the laptop freezes. However, nothing happens if the laptop is plugged in to the wall. When I say the laptop freezes, I mean it really freezes. The only way to recover is to hard reboot. My question is, what could be causing this? Could it be the extra power drain from the sub devices that causes this (even the simplest flash drives cause a freeze)? Please help me out, it's very annoying. Thanks

    Read the article

  • WiFi USB adapter showing the Network ..... but no connection in effect

    - by Idrees
    I have Pentium 4 system 3 GHz, 1 GB RAM ..... (no built-in WiFi) I installed Ubuntu 12.10 on my PC, works fine. It picked all the drivers for audio, video itself. I plugged TP-Link 54Mbps High Gain Wireless USB Adapter (TL-WN422G) ..... (link for the device: http://www.tp-link.com/en/products/details/?model=TL-WN422G) Now what happens is that the WiFi network is detected and shown in the "Network Connections", and it is also connected to it but when I open Firefox it is as if there no internet connection at all.

    Read the article

  • When trying running Ubuntu 12.10 off a usb drive, I encounter an error while prevent me from doing anything else

    - by Nil
    The details are that I used Universal USB Installer version 1.9.1.8 from pendrivelinux.com to install ubuntu 12.10 onto a 4gb pendrive as per instruction on Ubuntu's website. However, after I boot with drive I am met with the following message: "The system is running in low-graphics mode. Your screen, graphics card, and input device settings could not be detected correctly. You will need to configure these yourself." Pressing Ctrl Alt F1 doesn't allow me access and the options on the dialog box either send me through a loop returning me to the previous dialog or just leave me dead in the water. Pressing Ctrl Alt Del does however restart the computer if I am dead in the water, so ubuntu isn't COMPLETELY unresponsive... I feel I should mention that I'm trying to run this distribution on my netbook. I can't install it directly to the harddrive since I need my current Windows distribution for certain programs that don't quite agree with WINE yet.

    Read the article

  • What programming Langauge Would you learn to Reengineer USB Devices? [closed]

    - by user70113
    Currently Work in IT support and am retraining in electrical engineering / electronics, I am also interested in Reverse Engineering which language would be best for Hardware RE, I have seen a few sources say C, C++ and Python? I am not familiar with Linux, but installed ubuntu to learn with. I am not a programmer far from it, but I can understand enough basic VB,Java and PHP to edit it for simple things. One of my immediate projects would be to learn to reverse engineer USB devices and write my own low level drivers, I know there are porting kits, but I really want to know it from the ground up. Thanks for any advise folks Most Appreciated.

    Read the article

  • External SATA drive does not work without the optional USB cable *also* connected

    - by Software Monkey
    I have Vantec NST-260SU external eSATA/USB drive enclosure (which came with an optional separate power supply) connected to a relatively new Windows 7 computer. The drive should work as a SATA drive with either the separate power supply or using a USB cable solely for power. I would prefer to use the external power supply because I have used all my rear USB ports. Now, if I connect both the eSATA and USB cable, then: The drive shows in the BIOS list of AHCI drives (and not in the list of attached USB devices). Everything I can see about it in Computer Management seems to show it as a SATA driver (for example, it shows as "Location 0 (Channel 5, Target 0, Lun 0)" like my other SATA drives (and not "on USB Mass Storage Device" like my USB flash-drives). It seems very fast, very much faster than my USB flash drives. However, if I disconnect the USB cable and attach the power adapter instead, the drive does not show in the BIOS list and cannot be seen by Windows. The power LED on the enclosure is lit, and the drive enclosure becomes warm after running for a bit, so I am sure it is receiving power. Does anyone know if this device requires both the USB and eSATA cable, and if so, why? Or is there possibly something I need to do to reset the enclosure to not need the USB - the install instructions are pretty clear that you must connect the SATA cable before connecting the USB cable in order for the drive to function as SATA, which I am sure I did. PS: I have reviewed the small manual which came with it, which has not been of help.

    Read the article

  • How to unlock and remove a protected partition from Prestigio USB stick?

    - by mr.b
    Ok, so, I have one of those fancy schmancy devices, which is given to me by a frustrated friend of mine. Device is a Prestigio Leather 8GB, which identifies itself to Linux host as: Bus 001 Device 006: ID 1307:0165 Transcend Information, Inc. 2GB/4GB Flash Drive Kernel messages as USB device is plugged in: kernel: [ 2769.580042] usb 1-9: new high speed USB device using ehci_hcd and address 7 kernel: [ 2769.714782] scsi8 : usb-storage 1-9:1.0 kernel: [ 2770.713937] scsi 8:0:0:0: Direct-Access 8192MB flash drive 1.00 PQ: 0 ANSI: 2 kernel: [ 2770.714535] scsi 8:0:0:1: Direct-Access 8192MB flash drive 1.00 PQ: 0 ANSI: 2 kernel: [ 2770.715734] sd 8:0:0:0: Attached scsi generic sg3 type 0 kernel: [ 2770.716108] sd 8:0:0:1: Attached scsi generic sg4 type 0 kernel: [ 2770.722175] sd 8:0:0:0: [sdc] 962560 512-byte logical blocks: (492 MB/470 MiB) kernel: [ 2770.722657] sd 8:0:0:0: [sdc] Write Protect is on kernel: [ 2770.731078] sd 8:0:0:1: [sdd] 14012416 512-byte logical blocks: (7.17 GB/6.68 GiB) kernel: [ 2770.731215] sdc: kernel: [ 2770.738251] sd 8:0:0:1: [sdd] Write Protect is off kernel: [ 2770.880328] kernel: [ 2770.885876] sd 8:0:0:0: [sdc] Attached SCSI removable disk kernel: [ 2770.887442] sdd: unknown partition table kernel: [ 2771.049605] sd 8:0:0:1: [sdd] Attached SCSI removable disk So, symptoms are typical for U3-like devices: two separate devices inside of a single flash device. Windows sees it also as two identical usb devices, and mounts two separate drives to system, whereas first one presents itself as a CDROM device, holding a write-protected content, and second is a regular flash-disk partition, that "can" be written to. However, it seems like it's broken in some weird way, since it won't let me write anything to it, format it, nothing, but that's not the issue right now. Question: How can I unlock entire USB stick so it appears to system as a single, 8GB device which can be partitioned and used normally, without restrictions? Since it appeared to be an U3 device, I have tried standard utilities: both U3 Uninstaller by u3.com (found on SoftPedia), and opensource u3_tool from sourceforge (on both Windows and Linux). First utility failed to even detect USB stick as U3 device (simply stood idle while I re-plugged stick several times), while second tool failed with some obscure error about SCSI command unable to do something (I might be able to provide exact errors when I switch back to windows). u3_tool -i /dev/sg3 (Display device info) fails with u3_partition_info() failed: Device reported command failed: status 1 ...and every other option fails with same error, minus first part which states which command precisely has failed. So, apparently, this isn't a U3 device. Or, if it is, it doesn't behave like one. I read on a few occasions that this device protection is done by special command sent to device which tells it to lock itself, and so there should be an unlock command, that would set drive straight. Does anyone have any idea about what could I do to this device to fix it? P.S. I also mentioned a problem with being unable to use second "drive", but I'll tackle that problem when (and if) I manage to merge those two devices into one...

    Read the article

  • Plugging in USB flash drive only shows error 43, "Unknown device"

    - by Daren
    My friend saved by his works onto my flash drive which was detectable/openable, but ... The very next day, the drive wouldn't show up in My Computer and Windows gave him error code 43 (Unknown device). I tried others few systems that once detected his flash drive but the problem still persisted. I don't know whether or not his flash drive is damaged but when plug/un-plugging, there are still sounds coming out though. Tried solutions: On Vista Home Premium (his computer): Uninstalled -- Restarted computer -- Re-installed (ERROR 43) On Windows 7 (my computer): Uninstalled -- Restarted computer -- Can't install (ERROR 43) It seems that my computer (Windows 7) had the lastest drivers already but still can't detect it. Its a Kingston DataTraveller 101 (DT101) 8GB. Could unplugging the flash drive without clicking "Safely Remove Hardware" have caused the problem?

    Read the article

  • How does a hard drive compare to Flash memory working as a hard drive in terms of speed?

    - by Jian Lin
    Some experiment I did with hard drive read/write speed was 10MB/s write and 40MB/s read, and with a USB Flash drive, it can be 5MB/s write and 10MB/s read. Also, if I put a virtual hard drive .vhd file in a hard drive or in a USB Flash drive and try a Virtual Machine using it, the one using the hard drive is quite fast, while the one using the USB Flash drive is close to not usable. So I wonder some early netbooks use 4GB or 8GB flash memory as the hard drive, and even the Apple Mac Air has an option of using flash memory instead of a hard drive. But in those situation, will the speed be slower than using a hard drive, like in the case of a USB Flash drive?

    Read the article

  • which factors determines the speed of a processor? [closed]

    - by Deb
    I think that clock rate of processor determines the speed of core, in my case it is 1.86GHz. But If I am not wrong, it also determines that how much energy it will consume. If you have more frequency then more power it will consume. I choose Power Saver scheme to increase my battery life, however it reduces my core speed to half of the actual speed. I understand this happens because of SpeedStep, but I don't see any slowdown of my computer. So my problem is why we have such high frequency cores as it uses too much power. We can use low frequency cores. Actually I get confused between the two terms Speed of the processor and its frequency. So how much important is the frequency of core in case of any processor.

    Read the article

  • iPod Shuffle (3G) - USB adapter cables

    - by bencnscp
    The iPod shuffle (3G) seems to have a proprietary connector that is different than the previous one for iPod shuffle (2G). I have tried the cable that comes with the 2G, and even a 3rd party charger, and their connectors are physically keyed so you cannot plug them in. Is anyone using a 3rd-party cable (besides the one Apple provided)?

    Read the article

  • How to get an ARM CPU clock speed in Linux?

    - by MiKy
    I have an ARM-based embedded machine based on S3C2416 board. According to the specifications I have available there should be a 533 MHz ARM9 (ARM926EJ-S according to /proc/cpuinfo), however the software running on it "feels" slow, compared to the same software on my Android phone with a 528MHz ARM CPU. /proc/cpuinfo tells me that BogoMIPS is 266.24. I know that I should not trust BogoMIPS regarding performance ("Bogo" = bogus), however I would like to get a measurement on the actual CPU speed. On x86, I could use the rdtsc instruction to get the time stamp counter, wait a second (sleep(1)), read the counter again to get an approximation on the CPU speed, and according to my experience, this value was close enough to the real CPU speed. How can I find the actual CPU speed of given ARM processor? Update I found this simple Pi calculator, which I compiled both for my Android phone and the ARM board. The results are as follows: S3C2416 # cat /proc/cpuinfo Processor : ARM926EJ-S rev 5 (v5l) BogoMIPS : 266.24 Features : swp half fastmult edsp java ... #./pi_arm 10000 Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave ... 8.50 sec. (real time) Android # cat /proc/cpuinfo Processor : ARMv6-compatible processor rev 2 (v6l) BogoMIPS : 527.56 Features : swp half thumb fastmult edsp java # ./pi_android 10000 Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave ... 5.95 sec. (real time) So it seems that the ARM926EJ-S is slower than my Android phone, but not twice slower as I would expect by the BogoMIPS figures. I am still unsure about the clock speed of the ARM9 CPU.

    Read the article

  • HDD is not recognized/initialized via USB, only via SATA - is a reformat through USB a bad idea?

    - by Wuschelbeutel Kartoffelhuhn
    I have a 4TB Hitachi HDD that I purchased in Europe (I use it as a backup disk); I use Windows 7. When I connect it to a SATA port, it is recognized in Windows Explorer and gives no problems, even after transferring 3TB at a time or after being on for days. When I connect it via a SATA-to-USB2.0 adapter, it is also recognized, but when I transfer a large amount of data, it will intermittently stop being recognized by Windows Explorer and cancel the transfer. When I connect it via an external enclosure (which is technically a SATA-to-USB3.0 adapter), it does not display at all in Windows Explorer, but Disk Management will show the drive, albeit uninitialized (prompts for format). I only got the external enclosure because I want to backup my files more conveniently (instead of having to open the computer case each time). Do you advise against reformat/initialization via the external enclosure? Can it screw up things in an irrevocable way (Master Boot Record etc.)?

    Read the article

  • how to save installs on linux usb

    - by user2508947
    I'm a new person at Linux and am running Linux mint 15 cinnamon from an 8GB sandisk pendrive. I cannot dualboot it with windows until my friend (who is a genius at computers) backs up my windows (apparently). The thing is, I cannot save what I have done on it. for example, if I install drpython on my Linux and switch off my laptop, the next time I switch it on, it's all gone. can anyone tell me how I can save what I have done? Thanks in advance.

    Read the article

  • [URGENT HELP PLEASE]USB Flash Drive Problem!

    - by Daren
    Here it goes. My friend saved by his works into my flash drive which was detectable/openable but ... The very next day, the drive wouldn't show up in My Computer and Windows gave him error code 43 (Unknown device). I been searching for the next few hours to find a solution as the works inside is important to him. I know he should back up his files but let's not go there. So .... I tried others few systems that once detected his flash drive but the problem still persisted. I don't know whether or not his flash drive is damaged but when plug/un-plugging, there are still sounds coming out though. Tried solutions: [On Vista Home Premium/HIS COME]Uninstalled -- Restarted com -- Re-installed (ERROR 43) [Windows 7/MY COM] Uninstalled --- Restarted com --- Can't install (ERROR 43) It seems that my com (Windows 7) had the lastest drivers already but still can't detect it. Its a Kingston DataTraveller 101 (DT101) 8GB. Could unplugging the flash drive without clicking "Safely Remove Hardware" is the problem? Kindly provide some help. Thank you all.

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >