Oscar,
Thanks for that. I feel a bit silly. I forgot about the % which was
hanging me up. I am trying to be a better coder. More work ahead for me!
ara
On Thu, Sep 20, 2012 at 9:01 AM, Oscar Benjamin
wrote:
> On 20 September 2012 15:41, Ara Kooser wrote:
>
>> Morning,
>>
&
Morning,
I dug out some old code from 5 years ago to clean up and get in working
order. It's a simple agent based model. I have class called Ant which
contains all the ant-like functions.
I have a list that tracks the ants but I did this is a very crude way. I
basically copied and pasted everyt
Peter,
Thank you for your response. I did try reading the documentation but I
missed something (or several somethings in this case). So what I see in the
code you supplied is:
with open(source, "rb") as instream:
reader = csv.DictReader(instream, skipinitialspace=True)
destfieldnames = l
Hello all,
I have a csv file (from a previous code output). It looks like this:
Species2, Protein ID, E_value, Length, Hit From, Hit to, Protein ID2, Locus
Tag, Start/Stop, Species
Streptomyces sp. AA4, ZP_05482482, 2.82936001e-140, 5256, 1824,
2249\n, ZP_05482482, StAA4_01010003048
Hey all,
It's mostly solved. The program prints out to the screen just fine except
for the new line return. Here is what I ended up using:
#Merges two files into one using dictionaries
xml = open("final.txt",'r')
gen = open("final_gen.txt",'r')
PIDS = {}
for proteinVals in g
Adam,
I am going to try and sort through the pseudocode you provided to see if
I can get things up and running that way has well. This a part of a larger
workflow thing and needs to be in the format that I have. Sticking all this
into a database is down the road a ways.
*for every line in ONE:
Emile,
I modified the code to this:
for line in xml:
ID = line.split()[1]
rslt = "%s,%s"% (line,PIDS[ID])
print rslt
and ended up with this error:
Traceback (most recent call last):
File "/Users/ara/Desktop/biopy_programs/merge2.py", line 16, in
rslt = "%s,%s"% (line,PIDS[ID])
Ke
Morning all,
I took the pseudocode that Emile provided and tried to write a python
program. I may have taken the pseudocode to literally.
So what I wrote was this:
xml = open("final.txt",'r')
gen = open("final_gen.txt",'r')
PIDS = {}
for proteinVals in gen:
ID = proteinVals.split()[0]
Morning all,
I took the pseudocode that Emile provided and tried to write a python
program. I may have taken the pseudocode to literally.
So what I wrote was this:
xml = open("final.txt",'r')
gen = open("final_gen.txt",'r')
PIDS = {}
for proteinVals in gen:
ID = proteinVals.split()[0]
Thank you for all of the advice. I am going to try the dictionary route
first thing tomorrow.
This code is a part of larger code theat: 1) quires the BLAST database using
BioPython 2) parses the data using BioPython, 3) dumps to text files 4) then
merges the text files and sorts them. Somewhere do
Hello all,
I am working on merging two text files with fields separated by commas.
The files are in this format:
File ONE:
*Species, Protein ID, E value, Length*
Streptomyces sp. AA4, ZP_05482482, 2.82936001e-140, 5256,
Streptomyces sp. AA4, ZP_05482482, 8.03332997e-138, 5256,
S
Hello all,
I fell off the python programming wagon for awhile and I am quite rusty. I
a text file that looks like this
*a bunch of stuff above*
O(-2)/O(0) 12.5731 0.7181
Distribution of
species
Fred,
I've been learning python off and on for a couple years now. I recommend:
Alan Gauld's Learning to Program http://www.freenetpages.co.uk/hp/alan.gauld/
and
How to Think Like a Computer Scientist http://www.ibiblio.org/obp/thinkCSpy/
Also find a project you are passionate about and try t
sts if yeast.isAlive()] to clear out
dead yeast.
Is the translation for the above line of code into pseudocode?
yeast for every yeast in the list yeasts if the yeast method returned isAlive()
Or is this meant to be a true or false return? I have included the
code below. Thank you again.
Ara
##
I have two instances called and running. They interact with each
other and I would like one of the instances to cease to exist in the
second round based on a given condition. How do you kill an instance?
The code is below. I have Red and Yellow as my instances and I want
them to die when lif
So taking the advice given my John, Kent, and Michael I reworked
the program and created a class for world. I was able to solve the
first several errors that came up as a I moved functions into class
methods but this one stumps me. The error I am getting is:
Traceback (most recent call last):
function. I
eventually want to add a bunch of different cell classes.
Thank you for your help.
Ara Kooser
Main Program
#Yeast Cooperation Model
#by Ara Kooser
#Version 1.0 no PD, 070906
#
#This code contain just the world
e
#By Ara Kooser
#Thanks to Chris, e.,Tino and Steven at python tutor
class Player:
#What makes this a player.
pass
#def Move(self):
class Area:
#What makes it an area?
def __init__(self, name, descri
is below but it is not working. I am really sure
I am not going about this the right way. Thank you.
Ara
#
#Text Advenuture
#By Ara Kooser
#Thanks to Chris, e., and Steven at python tutor
Hello,
I read Alan Gauld's and How to Think Like a Computer Scientist
section on classes. So I tried to write a simple room class. My goal
is to write a short text adventure using classes. Here is the code:
class Area:
def _init_(self, name, description):
self.name = name
def l
o navy(). What I don't understand
is why when you have a choose n it won't go back to upp(). Thanks.
Ara
PROGRAM BELOW
##########
# Version:0.3
# By: Ara Kooser
###
uess it doesn't recognize that I want to call the function upp()
again. I think I might be using the wrong syntax here. My code is
below. Thank you any help or guidance.
Ara
#########
:
#A sample text adventure game using functions
#Version 1.0
#By Ara Kooser
#
import random
import sys
import string
import outside1
import town1
import items
Thanks Kent for your help. Right now I am trying to get one room
working with just a character and movement. Then on to creatures,
multiple rooms and tracking.
Ara
On 2/20/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Ara Kooser wrote:>>> But really, what are you trying to do?&
But really, what are you trying to do?KentI
am trying to create rooms/tiles for a roguelike game in python. I have
some of the game coded out but I am having trouble with the map and
character movement.
Ara
-- Fatti non foste per viver come bruti, ma per seguir virtute e canoscenza - Dante Aligh
Hello all,
First off thank you to all the folks that gave input on a
smallpox percolation model my students were working on last year. They
won first place in the computation division at the science fair and
took home the Intel Programming award. I can post or e-mail the code if
anyone wants it
26 matches
Mail list logo