代码搜索结果
找到约 11,834 项符合
Python 的代码
func_default.py
#!/usr/bin/env python
# Filename: func_default.py
def say(message,times=1):
print message*times
say('Hello')
say('World',5)
func_key.py
#!/usr/bin/env python
# Filename: func_key.py
def func(a,b=5,c=10):
print 'a is',a,'and b is',b,'and c is',c
func(3,7)
func(25,c=24)
func(c=50,a=100)
using_dict.py
#!/usr/bin/env python
# Filename: using_dict.py
# 'ab' is short for 'a'ddress'b'ook
ab={ 'Swaroop' : 'swaroopch@byteofpython.info',
'Larry' : 'larry@wall.org',
'Matsumoto' : 'matz@ruby-lan
func_return.py
#!/usr/bin/env python
# Filename: func_return.py
def maximum(x,y):
if x>y:
return x
else:
return y
print maximum(2,3)
lambda.py
#!/usr/bin/env python
# Filename: lambda.py
def make_repeater(n):
return lambda s: s*n
twice=make_repeater(2)
print twice('word')
print twice(5)
using_sys.py
#!/usr/bin/env python
# Filename: using_sys.py
import sys
print 'The command line arguments are:'
for i in sys.argv:
print i
print '\n\nThe PYTHONPATH is',sys.path,'\n'
readme
Python-to-libsvm interface
Introduction
============
Python (http://www.python.org/) is a programming language suitable for
rapid development. This python-to-libsvm interface is developed so
users
说明.txt
Excel formula parser原版程序是JavaScript版本,网址如下:
http://ewbi.blogs.com/develops/2004/12/excel_formula_p.html
该程序把Excel公式分解为Token序列。目前已有人翻译成C#和Python。
本人现在将其改为Delphi,程序中用到TRegExpr单元用于正则表达式分析。希望有高手将
python.js
/*
Language: Python
*/
hljs.LANGUAGES.python = {
defaultMode: {
lexems: [hljs.UNDERSCORE_IDENT_RE],
illegal: '()',
contains: ['comment', 'string', 'function', 'class', 'number', 'd
timep.py
#! /usr/bin/python
#timeP.py
def time():
for i in range(0,100000):
x = 123498
y = 98082432
z = x * y