To run a python script on Jenkins, find some common methods, as described below. Also encountered version compatibility issues caused by how all do not succeed, eventually tried various versions, to locate the compatibility issue, is really various
The code is as follows:1complement = {'A':'T','G':'C','C':'G','T':'A'}2Rev_seq ="'3With open (r'D:\Rosalind\haha.txt','w+') as F1:4With open (r'D:\Rosalind\rosalind_revc.txt','R') as F:5Dna_seq =F.read ()6Dna_seq =list (Dna_seq.strip ())7
1.x.reshape ( -1,2)x = Np.linspace (1,10,10)X.reshape ( -1,2)Reshape ( -1,2) in 1 should be no matter how many lines, in two columns, the number of rows automatically calculated. Similarly, reshape (2,-1) automatically calculates the number of
Color=raw_input ("Enter your favorite color:") if color = = "Red" or color = = "Green" or color = = "BLACK": print "you Can play this game. " Else:print "Sorry, you can ' t play the game."#开始不明白为什么 = = After the color must take "", and the
To create a file:1) Os.mknod ("Test.txt") Create an empty file2) Open ("Test.txt", W) opens a file directly and creates a file if the file does not existTo create a directory:Os.mkdir ("file") Create directoryCreate a new multi-tier catalog:def
Tuple is another ordered list, and Chinese is translated as "tuple". Tuple and list are very similar, however, once a tuple is created, it cannot be modified.The same is the name of the class, expressed as a tuple as follows:>>> t = (' Adam ', '
Paul's classmates had to turn away a few days ago, so how do we remove Paul from the existing list?If Paul's classmates were in the last one, we could delete them using the list pop() method:>>> L = [' Adam ', ' Lisa ', ' Bart ', ' Paul ']>>> L.pop (
If a string contains many characters that need to be escaped, it can be cumbersome to escape each character. To avoid this, we can prefix the string to r indicate that it is a raw string, and that the characters inside it do not need to be escaped.
You can use the LS command to see which Python binaries are available in your system, as in the following ways.
$ ls/usr/bin/python*/usr/bin/python/usr/bin/python2/usr/bin/python2.7/usr/bin/python3/usr/bin/python3.4/usr/bin
Premise
The website provides the installation package on MAC and Windows and the required source code for Linux installation.
The download address is as follows:
https://www.python.org/downloads/release/python-360/
Installation
wget
---restore content starts---ebook MarquisFirst Chapter: why python?What can 1.1 python do?1. Easy to get started2. Powerful Features3. A lot of things to do: Web site backend programmers, automated operations, data analysts, game developers,
Python encoding and python encoding conversion
1. Default System Encoding
The default encoding for python 2.7 is ascii.
The default encoding for python 3.1 is unicode.
You can use the built-in module sys to obtain the default system
Set of initial basic data types and for loop, set of data typesSet of initial basic data types and for Loop
-- Daoxin# Intercepting list elements
>>> Name_list = ['daoxin', 'wuxin']>>> Name_list [0]'Daoxin'>>> Name_list [1]'Wuxin'>>> Name_list
Python Day 1-getting started with Python (1) data definition, python Day 1
Data Type:
What is data?
In computer science, data refers to the general term of all the symbols that can be input to a computer and processed by a computer program. It is
Some research results on writing GUI desktop applications in python, pythongui
I studied the solution for developing GUI desktop applications using python. The results are as follows:
EasyGui: The control is extremely simple. It does not even have
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service