代码搜索结果

找到约 10,000 项符合 Python 的代码

stem_plot.py

#!/usr/bin/env python from pylab import * x = linspace(0.1, 2*pi, 10) markerline, stemlines, baseline = stem(x, cos(x), '-.') setp(markerline, 'markerfacecolor', 'b') setp(baseline, 'color','r', 'lin

vertical_ticklabels.py

#!/usr/bin/env python from pylab import * plot([1,2,3,4], [1,4,9,16]) locs, labels = xticks([1,2,3,4], ['Frogs', 'Hogs', 'Bogs', 'Slogs']) setp(labels, 'rotation', 'vertical') show()

arctest.py

#!/usr/bin/env python from pylab import * def f(t): 'a damped exponential' s1 = cos(2*pi*t) e1 = exp(-t) return multiply(s1,e1) t1 = arange(0.0, 5.0, .2) l = plot(t1, f(t1), 'ro')

text_handles.py

#!/usr/bin/env python #Controlling the properties of axis text using handles # See examples/text_themes.py for a more elegant, pythonic way to control # fonts. After all, if we were slaves to matlab

fill_spiral.py

#!/usr/bin/env python from pylab import * theta = arange(0,8*pi,0.1) a=1 b=.2 for dt in arange(0,2*pi,pi/2.0): x = a*cos( theta+dt )*exp(b*theta) y = a*sin( theta+dt )*exp(b*theta)

unicode_demo.py

#!/usr/bin/python # -*- coding: utf-8 -*- from pylab import * plot([1,2,4]) title( unicode('D関elopp閟 et fabriqu閟', 'latin-1') ) xlabel( unicode("r閍ctivit

install_paths

#! /usr/bin/env python import sys txt = sys.stdin.read() for s in sys.argv[1:]: a,b = s.split("=") txt = txt.replace("#%s#"%a.upper(), '"%s"' % b) print txt

sanguo.py

#!/usr/bin/env python #coding=utf-8 # TODO: modify class sanguo according to the following idea. # sanguo杩欎釜绫诲彧鎻愪緵鎵

readme

This directory includes some useful codes: 1. subset selection tools. 2. parameter selection tools. 3. LIBSVM format checking tools Part I: Subset selection tools Introduction ============ Trainin