On Monday, 26 March 2018 11:32:51 UTC+5:30, dieter wrote:
> Fürther inspection utilities: "dir", "vars" and the "inspect" module.
> Read the documentation to find out what they do.
Thanks, Dieter, That is really helpful!
--
https://mail.python.org/mailman/listinfo/python-list
I am debugging a set of code which is something like this:
http://dpaste.com/1JXTCF0
I am not able to understand that what role internet object is playing and how I
can use/call it.
As debugging the code I got at line 10. I am sending a request to particular
API and returning a request_obje
On Tuesday, 20 September 2016 11:00:40 UTC+5:30, Stefan Behnel wrote:
> > In [8]: %timeit omega(10)
> > 1 loops, best of 3: 91.6 µs per loop
>
> Note that this is the worst benchmark ever. Any non-dump C compiler will
> happily apply Young Gauß and calculate the result in constant time.
Hope this is good place to ask question about Cython as well.
Following code of mine is taking 2.5 times more time than Native Python code:
%%cython
import numpy as np
a = np.array([])
def large_sum2(int num_range):
np.append(a,[i for i in xrange(num_range)])
return a.sum
%timeit large_
On Saturday, 20 August 2016 11:38:03 UTC+5:30, Steve D'Aprano wrote:
> state = ignore_negative # DON'T call the function yet
> for value in main_call():
> print(value) # for testing
> if state(value):
> print("changing state")
> state = TABLE[state]
Above code works at
On Saturday, 20 August 2016 19:48:38 UTC+5:30, andrze...@gmail.com wrote:
> prev = None
> for value in main_call():
> if value==prev:
> pass
> else:
> prev = value
> if prev>0:
> print('+v')
> elif prev<0:
> print('-v')
> el
On Saturday, 20 August 2016 11:38:03 UTC+5:30, Steve D'Aprano wrote:
> On Sat, 20 Aug 2016 02:53 pm, Arshpreet Singh wrote:
>
> > I am writing a function as main_call() which is continuously producing
> > values. (+ve or -ve) I want to print on screen only for first +ve v
I am writing a function as main_call() which is continuously producing values.
(+ve or -ve) I want to print on screen only for first +ve value and hold until
-ve value comes around. here is my code:
def main_call():
while True:
yield strategy()
for value in main_call():
if(val
I am making a function that is running in while loop and if/else statements
make decisions on based on the condition:
here is code:
def main_call():
while True:
l0_0 = getDiff('btcusd',8)
l1_0 = np.tanh(l0_0*0.8446488687)
l1_1 = np.tanh(l0_0*-0.5674069006)
l1
I am writing Imdb scrapper, and getting available list of titles from IMDB
website which provide txt file in very raw format, Here is the one part of
file(http://pastebin.com/fpMgBAjc) as the file provides tags like Distribution
Votes,Rank,Title I want to parse title names, I tried with readlin
This is question more about product information and less technical but Hope It
will be use-able at some context, I use Cyeberoam(https://www.cyberoam.com/) Is
there any Python alternative available for that? or If I have to
write/implement something like this(https://github.com/netkiller/firewal
On Thursday, 23 June 2016 23:18:27 UTC+5:30, Joaquin Alzola wrote:
> >ImportError: No module named 'ConfigParser'
> It is telling you the error
> This email is confidential and may be subject to privilege. If you are not
> the intended recipient, please do not copy or disclose its content bu
I am trying to run django project in virtual environment. it needs mysql
database library but when I try to install that it returns the error that
configparser is not installed but I have installed configparser still the error
remains same, is this ubuntu bug?
(env) ubuntu@ip-:~/clearapp$ pip
I have to pass dictionary as function argument for following code:
import authorize
authorize.Configuration.configure(
authorize.Environment.TEST,
'api_login_id',
'api_transaction_key',
)
result = authorize.Transaction.sale({
'amount': 40.00,
'credit_card': {
'card_
Thanks for the information, I just applied for program but I got one mail about
license and expiration.
This software license expires on October 29, 2016.
I am not able to understand that can anyone put some light on that how license
can be expired?
--
https://mail.python.org/mailman/listi
On Friday, 18 March 2016 21:44:46 UTC+5:30, Chris Warrick wrote:
> asyncio is, as you said, brand new -- probably nothing exists.
> Why not use the existing Django solution though? What is your problem
> with it? It's a great framework that does a lot of the hard work for
> you. Flask is low-lev
On Saturday, 19 March 2016 05:38:16 UTC+5:30, Rick Johnson wrote:
> I gave you "real help".
>
> What you want me to do -- write the code for you? Sorry, but Python-list is
> not a soup kitchen for destitute code. Neither is it a triage center were you
> can bring your sick code, drop it at th
I am looking for an E-commerce system in python to sell things things online,
which can also be responsive for Android and IOS.
A quick Google search brought me http://getsaleor.com/ it uses Django, Is
there any available one using Flask or newly born asyncio based framework?
--
https://mail
On Friday, 18 March 2016 11:14:44 UTC+5:30, Rick Johnson wrote:
> #
> # BEGIN CODE
> #
> import imaplib
>
> def inbox_week():
> emailAddress = '...@gmail.com'
> emailPassword = 'mypassword'
> # START ADDING CODE HERE
> #
> # END CODE
> #
Well I am asking for real help.(!suggestions)
On Tuesday, 15 March 2016 22:32:42 UTC+5:30, Rick Johnson wrote:
> Is that last line doing what you think it's doing? Let's
> break it down... Basically you have one condition, that is
> composed of two main components:
>
> Component-1: EMAIL in str(msg[header])
>
> and
>
> Component-
Hi, I am using imaplib to fetch Gmail's Inbox Archived message but results are
not that much accurate. Here is code+logic:
def inbox_week():
import imaplib
EMAIL = 'myusern...@gmail.com'
PASSWORD = 'mypassword'
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login( EMAIL, PA
On Thursday, 25 February 2016 20:07:52 UTC+5:30, Sapna Mishra wrote:
> Dear Sir/Mam,
>
> I am using python for my astronomy purpose, for that I want to use PyRaf, but
> strange thing is occurring that pyraf is getting open as a root but out side
> my root user directory when I am typing pyraf
On Monday, 22 February 2016 19:05:24 UTC+5:30, Peter Otten wrote:
> Arshpreet Singh wrote:
>
> > Hi, I am converting PDF into text file, I am using following code.
> >
> > from pypdf2 import PdfFileReader
> >
> > def read_pdf(pdfFileName):
> >
On Sunday, 21 February 2016 21:21:54 UTC+5:30, Skip Montanaro wrote:
> This isn't strictly a Python question, however... Once I get myself
> authenticated, I intend to use the Python Google API to pump archived
> mail messages from a few defunct mailing lists into Google Groups. I
> thought it wou
Hi, I am converting PDF into text file, I am using following code.
from pypdf2 import PdfFileReader
def read_pdf(pdfFileName):
pdf = PdfFileReader(pdfFileName)
yield from (pg.extractText() for pg in pdf.pages)
for i in read_pdf('book.pdf'):
print(i)
I want to avoid for
On Tuesday, 19 January 2016 15:42:16 UTC+5:30, Steven D'Aprano wrote:
> [steve@ando ~]$ python -m timeit -s "from collections import deque"
> -s "it = iter([i for i in xrange(1000)])" "deque(it, maxlen=0)"
> 100 loops, best of 3: 0.913 usec per loop
>
>
> [steve@ando ~]$ python -m tim
On Tuesday, 19 January 2016 12:58:28 UTC+5:30, Arshpreet Singh wrote:
> I was playing with Generators and found that using Generators time is bit
> more than list-comprehensions or I am doing it wrong?
>
>
> Function with List comprehensions:
>
> def sum_text(number_ran
I was playing with Generators and found that using Generators time is bit more
than list-comprehensions or I am doing it wrong?
Function with List comprehensions:
def sum_text(number_range):
return sum([i*i for i in xrange(number_range)])
%timeit sum_text(1)
1 loops, best of 3: 14
On Sunday, 10 January 2016 20:33:20 UTC+5:30, Michael Torrie wrote:
> This way I can import functions defined in this script into another
> script later if I want.
>
> If I find I need to share state between functions, and if I find that I
> might need to have multiple situations of shared state
On Sunday, 10 January 2016 21:09:52 UTC+5:30, Steven D'Aprano wrote:
> There are *no* problems that are impossible to solve without classes, but
> sometimes classes will make problems easier to solve. And sometimes classes
> make problems harder to solve. It depends on the problem.
Is there any
On Sunday, 10 January 2016 23:20:02 UTC+5:30, Bernardo Sulzbach wrote:
> Essentially, classes (as modules) are used mainly for organizational purposes.
>
> Although you can solve any problem you would solve using classes
> without classes, solutions to some big problems may be cheaper and
> more
Hello Friends, I am quite new to OOP(object oriented Programming), I did some
projects with python which includes Data-Analysis, Flask Web Development and
some simple scripts.
I have only one question which is bothering me most of the time, When I will
get the need to use Classes in Python? Or
On Tuesday, 3 November 2015 21:32:03 UTC+5:30, Chris Warrick wrote:
> On 3 November 2015 at 12:54, Arshpreet Singh wrote:
> > Hello Everyone,
> >
> > I am looking for Browser-based PNG file viewer written in
> > Python.(Flask framework preferably)
> >
> >
Hello Everyone,
I am looking for Browser-based PNG file viewer written in
Python.(Flask framework preferably)
Following project(Flask-Based) provides many things(File manager as
well as file viewer) but it does not support PNG files.
https://github.com/vmi356/filemanager
Any idea if I have to
On Friday, 9 October 2015 22:51:16 UTC+5:30, Emile van Sebille wrote:
> without extensive clues as to the nature of the data to be recovered
> you're not going to get much further with this.
It is mostly /home partition data on disk. Those are user Configuration
files.(user accounts, settin
On Saturday, 10 October 2015 04:40:27 UTC+5:30, Steven D'Aprano wrote:
> What do you mean, "recover data from a server"? What has happened to the
> server? Can it boot or is it in an unbootable state? Are the hard drives
> physically damaged? What sort of hard drives? (Solid state, or magnetic
>
On Saturday, 10 October 2015 04:40:27 UTC+5:30, Steven D'Aprano wrote:
> What do you mean, "recover data from a server"? What has happened to the
> server? Can it boot or is it in an unbootable state? Are the hard drives
> physically damaged? What sort of hard drives? (Solid state, or magnetic
>
Hello Python and People!
I want to write a small Python application which will be able to 1.recover data
from server and 2.send it to another server.
For the 2nd part I can use scp(secure copy), Please let me know if any
data-recovery library is available in Python to do 1st task.
--
https://m
38 matches
Mail list logo