dbm

Perl DBM vs. Storable

♀尐吖头ヾ 提交于 2019-12-12 13:28:17
问题 for my current project i need to store a little database on disk, that i read once my program runs and write it once. I have looked into perls DBM functionality and from what I understand it provides merely a hash that is stored on disk with every read and write going directly to disk. My question is: Could I not simply use Storable or any of the related modules to achieve the same (a persistent hash) with far less File I/O overhead? (The hashes will never be to large to fit into memory

Python DBM Module for Windows?

偶尔善良 提交于 2019-12-10 23:32:16
问题 I would like to use the dbm module on my Windows machine, but it is currently only supported on Unix. http://docs.python.org/library/dbm.html Does anyone know of a similar module with similar syntax or a workaround to get dmb functional on windows? Being able to access a database written to the hard drive much like how I code to access a dictionary would be great. Thank you for your help! 回答1: Actually, after more googling around, I found this: http://docs.python.org/library/anydbm.html

Python shelve having items that aren't listed

。_饼干妹妹 提交于 2019-12-07 04:29:08
问题 I've been saving a bunch of dictionaries to file using Python's shelve module (with Python 3.4 on OSX 10.9.5). Each key is a string of an int (e.g., "84554" ), and each value is a dictionary of dictionaries of a few smallish strings. No keys are used twice, and I know the total superset of all possible keys. I am adding these key-value pairs to the shelf via threads and which keys/values are added changes each time I run it (which is expected). The problem I've been having is that the number

Python shelve having items that aren't listed

痞子三分冷 提交于 2019-12-05 09:43:23
I've been saving a bunch of dictionaries to file using Python's shelve module (with Python 3.4 on OSX 10.9.5). Each key is a string of an int (e.g., "84554" ), and each value is a dictionary of dictionaries of a few smallish strings. No keys are used twice, and I know the total superset of all possible keys. I am adding these key-value pairs to the shelf via threads and which keys/values are added changes each time I run it (which is expected). The problem I've been having is that the number of keys iterable/visible with shelve 's shelf.keys() and the number of unique keys for which key in

Shelve module in python not working: “db type cannot be determined”

不打扰是莪最后的温柔 提交于 2019-12-05 07:04:02
I am trying to make a simple password-storing program in Python, and it seems pretty simple so I am wondering if I am using shelve wrong. I have the main .py file: import shelve passwords = shelve.open('./passwords_dict.py') choice = raw_input("Add password (a) or choose site (c)?") if choice[0] == 'a': site_key = raw_input("Add for which site? ").lower() userpass = raw_input("Add any info such as username, email, or passwords: ") passwords[site_key] = userpass else: site = raw_input("Which site? ").lower() if site in passwords: print "Info for " + site + ": " + passwords[site] else: print

Alternative to BerkeleyDB?

旧城冷巷雨未停 提交于 2019-12-03 02:16:10
问题 I'm looking for a dbm-like library that I can use in place of Berkeley DB, which I'm currently using. My main reason for switching is the licensing fees for BDB are pretty high (free for open source apps, but my employer does not want to open source this particular app for various reasons). I've looked briefly at qdbm but it doesn't look like it will fill my needs -- lots of keys (several million) and large data items (> 1-5 megabytes). Before I continue my search I figured I'd ask because it

How to convert Wifi signal strength from Quality (percent) to RSSI (dBm)?

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How should I convert Wifi signal strength from a Quality in percentage, usually 0% to 100% into an RSSI value, usually a negative dBm number (i.e. -96db )? 回答1: Wifi Signal Strength Percentage to RSSI dBm Microsoft defines Wifi signal quality in their WLAN_ASSOCIATION_ATTRIBUTES structure as follows: wlanSignalQuality : A percentage value that represents the signal quality of the network. WLAN_SIGNAL_QUALITY is of type ULONG. This member contains a value between 0 and 100. A value of 0 implies an actual RSSI signal strength of -100

Scapy - retrieving RSSI from WiFi packets

匿名 (未验证) 提交于 2019-12-03 00:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to get RSSI or signal strength from WiFi packets. I want also RSSI from 'WiFi probe requests' (when somebody is searching for a WiFi hotspots). I managed to see it from kismet logs but that was only to make sure it is possible - I don't want to use kismet all the time. For 'full time scanning' I'm using scapy. Does anybody know where can I find the RSSI or signal strength (in dBm) from the packets sniffed with scapy? I don't know how is the whole packet built - and there are a lot of 'hex' values which I don't know how

各厂家网络设备查看端口收发光功率-命令汇总

我的梦境 提交于 2019-12-02 15:03:11
本文记录的设备型号有:cisco CRS、7609、Nexus7K、华为NE5000E、9312、8512、H3C 12508、中兴8905、Juniper EX8208、上海贝尔(阿尔卡特)OS10K、SR7750。 型号:思科CRS-1 系统版本:IOS XR , Version 4.0.4 CRS-1#show controllers SONET 0/0/1/0 <…> Optical Power Monitoring (accuracy: +/- 1dB) Rx power = 0.0828 mW, -10.8 dBm Tx power = 1.0288 mW, 0.1 dBm Tx laser current bias = 68.3 mA !<---------POS口 CRS-1#show hw-module subslot 0/10/0 status pluggable-optics 0 SPA 0/10/0 device pluggable-optics 0/0 info:int Tengige/10/0/0: State: Enabled Environmental Information - raw values Temperature: 8602 Tx voltage: 0 in units of 100uVolt Tx bias: 63000 uA Tx

Alternative to BerkeleyDB?

感情迁移 提交于 2019-12-02 14:14:48
I'm looking for a dbm-like library that I can use in place of Berkeley DB, which I'm currently using. My main reason for switching is the licensing fees for BDB are pretty high (free for open source apps, but my employer does not want to open source this particular app for various reasons). I've looked briefly at qdbm but it doesn't look like it will fill my needs -- lots of keys (several million) and large data items (> 1-5 megabytes). Before I continue my search I figured I'd ask because it seems there are tons of dbm-like libraries out there. Simon Schmidt C/C++ http://sphia.org/ a Key