Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Endorsements
Ranked #622
Ranked #1K
~20.7K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums

24 Posted Topics

Member Avatar for sudipta.mml

You may want to start using biopython as it has many classes and methods for handling sequence data, especially from a fasta-formatted file. It may already do some of the work for you.

Member Avatar for Matej_1
0
358
Member Avatar for karmstrong

Ya, all of the functionality would need to be on google's end. They'd have to offer a SDK in python for their docs API. They have something like this for Android and python: https://thp.io/2012/europython/ But if you can't find the SDK in python for google docs, you may be out …

Member Avatar for dashing.adamhughes
0
262
Member Avatar for bunyonb

Personally I think it's important to start using libraries that are the most suited to your goals. Are you a web developer? Then you should start learning web development frameworks in python (flask, django etc..). Are you a scientist? Then let me save the pain of learning that doing math …

Member Avatar for bunyonb
0
242
Member Avatar for flebber

This came up in the related articles: http://www.daniweb.com/software-development/python/threads/459002/python-how-to-ask-user-for-text-input

Member Avatar for dashing.adamhughes
0
136
Member Avatar for Member #1038448
Member Avatar for dashing.adamhughes
0
164
Member Avatar for ShobanaV

I don't really know what you're asking specifically, but have you looked into the "requests" package? I don't know much about web frameworks, but if might help you with handling requests.

Member Avatar for dashing.adamhughes
0
256
Member Avatar for dashing.adamhughes

Hi, I built a Polygon() class that originally only was initialized with veriticies: Polygon(verts=(1,2,3,4) But as the code evolved, I added a few @classmethods to construct the Polygon from other inputs. For example: Polygon.from_center(center=(1,2), length=5) Now my problem is that I'm trying to find the canonical way to choose which …

Member Avatar for dashing.adamhughes
0
270
Member Avatar for flebber

Hmm, if you want to assign by value, why not just store your lists in a dictionary. IE, a dictionary of lists. Something like: dict = {} dict['list1'] = ['foo', 'bar'] dict['list2'] = ['baz', 'qi']

Member Avatar for flebber
0
557
Member Avatar for bryann

IMO, you ought to always just do "from __future__ import division" or make sure that you are working soley with ints. The only time I think it would be necessary to maintain ints when possible is if you're doing very intense computations and you can't afford the extra memory it …

Member Avatar for bryann
0
331
Member Avatar for CodingCabbage
Member Avatar for glao

Just FYI, when you need to access both the index and value in an interation, consider using "enumerate": In [1]: mylist = ['foo', 'bar', 'baz'] In [2]: for idx, value in enumerate(mylist): ...: print idx, value ...: 0 foo 1 bar 2 baz

Member Avatar for glao
0
509
Member Avatar for dashing.adamhughes

Hi. I have a Foo class that stored a dictionary attribute called _data. I'd like the Foo class to have a dictionary interface, and defer most basic dictionary operations down to the _data attribute. I am currently overwriting the magic methods one by one: def __getitem__(self, item): return self._data[item] def …

Member Avatar for slate
0
272
Member Avatar for otengkwaku

I don't if I'd think about them in terms of sizes... arg = required arguments of the function. Function will error without them. *args = Additional non-keyword arguments that are not required for function to run. **kwargs = additional keyword arguments that are not required. *args and **kwargs are options.

Member Avatar for dashing.adamhughes
0
711
Member Avatar for jon92

When you say application, does it need to be interactive, or just accessible through the python shell? For example, do you have to run the program, and it will pause and prompt the user for commands, or can you just define some classes, and then modify them through the terminal? …

Member Avatar for jon92
0
223
Member Avatar for Alkajak

Each time you do append, you're adding the entire object, which in this case is a list. Therefore, you are going to be recursively adding lists. You could try initializing the item/internal empty lists in the class __init__ method instead of each time leaves_internals is called. Then replace your append …

Member Avatar for dashing.adamhughes
0
272
Member Avatar for glez_b

You could plot each line in a different color and then in the legend, indicate some distinguishing attribute of each line. This question is probably better suited for the matplotlib mailinglist/forum, as you're more likely to find people who are familiar with the package.

Member Avatar for glez_b
0
4K
Member Avatar for Niner710

Pandas has a very good mailing list, perhaps you should consider joining it and posting this question there.

Member Avatar for dashing.adamhughes
0
1K
Member Avatar for ricepicker417

Also, if this is just an exercise, then doing it with native python datastructures (like lists) is a nice way to go. In reality, you should use numpy to make a matrix. It's a library for just this, and will be about 1000 times faster than a matrix made out …

Member Avatar for vegaseat
0
2K
Member Avatar for dashing.adamhughes

Hi guys, I have a code that intercepts calls to methods via __getattr__. Something like: def __getattr__(self, attr, *fcnargs, **fcnkwargs): out=getattr(self._df, attr)(*fcnargs, **fcnkwargs) etc... My goal is when a user calls a method, if it is not a method of self, the program attempts to run it on one of …

Member Avatar for dashing.adamhughes
0
193
Member Avatar for dashing.adamhughes

Hi all, I have a class with a variety of methods, for example: class Foo(obj): def meth_a: ... def meth_b: ... In reality, Foo may have 50 or more methods. And for various reasons, I cannot subclass Foo. I'm using Foo in a composition class with some added functionality. Let's …

Member Avatar for dashing.adamhughes
0
367
Member Avatar for bulleh

I think a program to represent a game is a good introduction to object oriented programming. When you find yourself defining several global variables that are shared between a bunch of functions, you should build a game class. Imagine you wanted to increase the complexity of your game. At some …

Member Avatar for bulleh
0
261
Member Avatar for lukecalland

Ya, pickle will allow you to save your classes to disk. Once you close python, objects are removed from memory so it doesn't make much sense to talk about restoring unless you've saved it to your harddisk.

Member Avatar for vegaseat
0
173
Member Avatar for vegaseat

This is a nice example. It might also be really great to have a numpy version of this.

Member Avatar for dashing.adamhughes
2
7K
Member Avatar for MissAuditore

You'll have better luck posting on the matplotlib forums. Something tells me that time_list[i] is not actually a single value, but is likely an interable (tuple or list). I'd also recommend using pandas, importing the data into your dataframe, and using a TimeIndex as the label axis. If you're working …

Member Avatar for dashing.adamhughes
0
290

The End.