ChinaUnix首页
|
论坛
|
博客
博客首页
博客专家
往日推荐
博客文集
博文
博主
热搜:
cISCO
C#
Java
C语言
敏捷
HADOOP
信息
移动开发
博客首页 〉
搜索结果
按类别查询搜索结果
操作系统
程序设计
数据库
热点技术
综合
架构与运维
移动开发与应用
Web前端
LINUX
|
BSD
|
WINDOWS
|
其他UNIX
|
AIX
|
SOLARIS
|
C/C++
|
Java
|
Python/Ruby
|
项目管理
|
Web开发
|
嵌入式
|
C#/.net
|
PHP
|
Delphi
|
PERL
|
Erlang
|
Verilog
|
敏捷开发
|
Mysql/postgreSQL
|
Oracle
|
DB2/Informix
|
Sybase
|
数据库开发技术
|
SQLite/嵌入式数据库
|
SQLServer
|
NOSQL
|
虚拟化
|
云计算
|
大数据
|
HADOOP
|
高性能计算
|
IT业界
|
IT职场
|
信息化
|
网络与安全
|
系统运维
|
服务器与存储
|
架构设计与优化
|
Android平台
|
iOS平台
|
Windows平台
|
其他平台
|
Html/Css
|
JavaScript
|
jQuery
|
HTML5
|
关于关键词 的检测结果,共
3360
条
【Python/Ruby】
Ruby 杂记
加
代码练习
expert1
| 2016-08-13 19:16:19 | 阅读(4630) | 评论(0)
{ "api.xxx.cn": [{"address": "10.0.16.19:9022","ttl": 0}]}route = JSON.parse(result)temp_route = {}route.each do |host, ip_metas|temp_route[host] = ip_metas.map { |ip_meta| ip_m...
【阅读全文】
【Python/Ruby】
在Eclipse
中
搭建Python开发环境
coolcoconut
| 2016-08-08 10:30:01 | 阅读(80) | 评论(0)
【阅读全文】
【Python/Ruby】
python类
中
的
三
种方法
典雅的土地雷
| 2016-07-27 23:46:50 | 阅读(2060) | 评论(0)
python类中通常出现self、cls两个关键字。一般约定俗成,self代表类的实例,cls代表类。其实这两个都可以用别的单词代替。python类中有三种方法:1、实例方法 一般用def定义,使用该方法必须通过一个类的实例来访问。至少传递一个参数,一般用self。2、类方法 在def的前面加上@classmetho...
【阅读全文】
【Python/Ruby】
python抓取
天
气
典雅的土地雷
| 2016-07-23 10:53:02 | 阅读(1480) | 评论(0)
天气接口: 中国天气weather.comhttp://m.weather.com.cn/data/101110101.html(六天预报)http://www.weather.com.cn/data/sk/101110101.html(实时天气信息)其中101110101是城市的代码,获得城市代码进入http://www.weather.com.cn在搜索框上输入你要需要获得天气的城市,点击查询,即可在地址栏获...
【阅读全文】
【Python/Ruby】
python 应用实践之ctrl+D /C /\ 的
信
号
屏蔽
老爷康
| 2016-07-18 14:41:10 | 阅读(740) | 评论(0)
问:现在有一个需求,我程序启动后,为了防止用户误输入ctrl+D/C 而把任务给挂掉,想忽略或者捕捉这个信号,当然,ctrl+c发送中断信号,可以被忽略,但是类似于SIGKILL 和 SIGSTOP 信号不能被捕捉也不能被捕获我该怎么办,我想禁用掉他们,求解决答:...
【阅读全文】
【Python/Ruby】
python核心编程根据字典值类型
排
序:sorted函数使用
老爷康
| 2016-07-17 13:12:15 | 阅读(410) | 评论(0)
Python核心编程第7章 7-3:对一个字典进行键排序,相信这个大家都会,很easysdict = {1:100,2:10,3:1}for x in sorted(sdict): # 默认以键排序 print x,sdict[x]但是如何根据一个字典的值进行排序?如果单单只...
【阅读全文】
【Python/Ruby】
Python调用C代码的编写和调
试
vv1133
| 2016-07-16 15:05:47 | 阅读(5100) | 评论(0)
Python作为一门脚本语言,让程序员的开发效率变得非常高。但相对来说,程序执行的效率就比不上C、C++等编译型语言了。对此,可以把效率影响较大的函数用C来实现,Python代码中调用这些函数,实现开发效率和运行效率的平衡。
【阅读全文】
【Python/Ruby】
Python
中
的eval、exec、complie用法
lvyilong316
| 2016-07-15 22:09:03 | 阅读(5260) | 评论(0)
Python中的eval、exec、complie用法——lvyilong3161. compliecomplie(string, file, type)函数允许在运行时迅速生成代码对象。那么什么是代码对象呢?Python中要执行的代码,都必须先转换成字节码才能由python解释器执行,而一段代码对应转换成的字节码就可以理解为是一个代码对象。那complie生成...
【阅读全文】
【Python/Ruby】
python
中
的闭包
steve78926
| 2016-07-11 18:31:57 | 阅读(880) | 评论(0)
python 闭包
【阅读全文】
【Python/Ruby】
python3.x+requests 爬取
网
站遇到
中
文乱码的解决方案
yueys_canedy
| 2016-07-08 08:27:12 | 阅读(25050) | 评论(0)
最近刚开始使用python来做爬虫爬取相关数据,使用了python自带的urllib和第三方库requests,解析html使用了beautifulsoup以及lxml 这里说下lxml,lxml是python的一个html、xml解析库,lxml使用XPath能快速,简单的定位元素并获取信息。下面进入正题1. 遇到的中文乱码问题1.1 简单...
【阅读全文】
【Python/Ruby】
python从嵌套字典
中
获取键值
大镇
| 2016-07-06 13:54:56 | 阅读(1180) | 评论(0)
需求: 从一个嵌套的dict(字典)中获取某个key 的值点击(此处)折叠或打开def find_key_dict(dict_a, out_key): """ 功能:从嵌套字典中获取值 :param dict_a:字典名称...
【阅读全文】
【Python/Ruby】
python
中
的lambda局部变量问题
派大星861205
| 2016-07-02 01:11:45 | 阅读(1450) | 评论(0)
python中函数和lambda参数默认值的问题
【阅读全文】
【Python/Ruby】
python --
列
表、字符串
Aexn
| 2016-07-01 15:09:39 | 阅读(0) | 评论(0)
点击(此处)折叠或打开#列表 name = [1,2,3,4,"test","log"]  ...
【阅读全文】
【Python/Ruby】
Django
中
request和response
中
的属性方法详述
wuyue151
| 2016-06-30 12:15:54 | 阅读(930) | 评论(0)
Django 使用 request 和 response 对象表示系统状态数据..当请求一个页面时,Django创建一个 HttpRequest 对象.该对象包含 request 的元数据. 然后 Django 调用相应的 view 函数(HttpRequest 对象自动传递给该view函数<作为第一个参数>), 每一个 view 负责返回一个 HttpResponse 对象.本文档解释了 HttpRequest 和 HttpR...
【阅读全文】
【Python/Ruby】
python 内部
机
制小结
kinfinger
| 2016-06-26 23:05:42 | 阅读(0) | 评论(0)
python,protocol,description,datadescription,property,yield,genrator,iterator,callable
【阅读全文】
【Python/Ruby】
python--描述符
机
制--属性与方法的不同
kinfinger
| 2016-06-25 21:59:19 | 阅读(0) | 评论(2)
python,duck typing,__doc__,__dict__,__call__,__file__
【阅读全文】
【Python/Ruby】
python爬虫下载制定
网
址的图片
winecork
| 2016-06-22 09:55:13 | 阅读(950) | 评论(0)
参看:http://www.cnblogs.com/fnng/p/3576154.html点击(此处)折叠或打开import urllib import redef getHtml(url): page = urllib.urlopen(url) html = page.read()...
【阅读全文】
【Python/Ruby】
shell统计一
天
apache日志每小时每IP访问次数
夜色58
| 2016-06-21 15:22:05 | 阅读(2180) | 评论(0)
日志格式如下:127.0.0.1 - - [03/Feb/2013:14:18:10 +0800] "GET /ucenterrvicecenter/SCenterRequest.php HTTP/1.0" 302 242127.0.0.1 - - [03/Feb/2013:14:18:10 +0800] "GET /ucenterrvicecenter/SCenterRequest.php HTTP/1.0" 200 -111.111.111.35 - - [03/Feb/2013:14:18:32 +0800] "GET /myadmin/ HTTP/1.1...
【阅读全文】
【Python/Ruby】
python collections系
列
TT小饭
| 2016-06-19 10:47:45 | 阅读(480) | 评论(0)
collections
【阅读全文】
【Python/Ruby】
理解Python
中
的线程
大镇
| 2016-06-07 14:07:12 | 阅读(780) | 评论(0)
理解Python中的线程转自: http://www.jianshu.com/p/4a13a05e4f1f#字数1695 阅读731 评论1 喜欢5郑重声明版权属于 http://agiliq.com/blog/2013/09/understanding-threads-in-python/我们将会看到一些在Python中使用线程的实例和如何避免线程之间的竞争。你应当将下边的例子运...
【阅读全文】
首页
<<
25
26
27
28
29
30
31
32
33
34
>>
末页