Miki Tebeka added the comment:
I'm +1 on the changes proposed by Raymond.
In my teaching experience most developers who will use the built-in statistics
package will have highschool level math experience.
On the other hand, they'll probably to Wikipedia and the entry there uses
dependent
Miki Tebeka added the comment:
I agree with Raymond, this is not "beginner friendly".
I've been using Python for 25 year and teaching it for about 10 and this topic
never came up.
--
nosy: +tebeka
___
Python tracker
<https://bu
Miki Tebeka added the comment:
I think the lack sub second parts in these formats is a disadvantage.
There's a merit in using a standard but IMO it's more natural to write someting
like "2s" in a configuration value than "P2S" w
New submission from Miki Tebeka :
I suggest adding datetime.timedelta methods that convert to/from str.
The reason is that I have several places where configuration contains various
timeouts. I'd like to write '50ms' and not 0.05 which is more human readable.
See https://golang.org/pkg/time
Hi,
> But the problem is that by specifying the type as ctypes.c_char_p,
> ctypes will hide that pointer from you and return a Python object
> instead. I'm not sure how ctypes is doing it under the hood, but I
> suspect ctypes is doing it's own strdup of the string on conversion, and
> managing
> Does ctypes, when using restype, frees allocated memory?
>
> For example, will the memory allocated by "strdup" be freed after the "del"
> statement? If not, how can I free it?
I've tried the following program and I'm more confused now :) Can anyone
explain the output?
---
import ctypes
s = [ctypes.c_char_p]
strdup.restype = ctypes.c_char_p
out = strdup(b'hello').decode('utf-8')
print(out) # hello
del out
---
Thanks,
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Changed to self.get_ext_full_path(ext.name) and it works now.
--
https://mail.python.org/mailman/listinfo/python-list
nt of dist/checksig-0.1.0-cp38-cp38-linux_x86_64.whl it's not there.
What am I missing?
You can view the whole (WIP) project at
https://github.com/ardanlabs/python-go/tree/master/pyext
Thanks,
Miki
--
https://mail.python.org/mailman/listinfo/python-list
> Anyone know where can I look in the Python source code to investigate
> this?
Probably around
https://github.com/python/cpython/blob/master/Objects/floatobject.c
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
> Would be grateful if you could post it to python-authors also:
> https://mail.python.org/mailman/listinfo/python-authors
Done. Though list seems very dormant.
Thanks,
Miki
--
https://mail.python.org/mailman/listinfo/python-list
ook, including the forward by Raymond
Hettinger is at https://www.353solutions.com/python-brain-teasers
Stay curious, keep hacking,
Miki
--
https://mail.python.org/mailman/listinfo/python-list
om/help/pycharm/configuring-local-python-interpreters.html
on how to configure the interpreter.
> But when I run a simple code it objects to the interpreter???
I order to help we'll need more information. What is the code you're trying to
run and what is the error?
Happy hacking,
Miki
--
https://mail.
Miki Tebeka added the comment:
I don't think it violates " Explicit is better than implicit."
There's a lot of work done to make pathlib.Path objects work in places where
str or bytes is expected (e.g PEP 519), IMO this is an
New submission from Miki Tebeka :
Currently pathlib.Path cannot be used with string formatting directives. IMO it
should.
>>> from pathlib import Path
>>> path = Path('/path/to/enlightenment')
>>> print(f'path is: {path:>50}')
Traceback (most recent
If you're trying to access the machine from another machine, you need to change
the host to '0.0.0.0'. 'localhost' is the internal interface.
On Sunday, August 19, 2018 at 10:36:25 PM UTC+3, Νίκος wrote:
> Hello,
>
> i just installed bottle and flask web frameworks in my CentOS environment but
Hi,
PyCon Israel 2018 call for papers is open, submit a talk today, another three
tomorrow :)
See more at http://il.pycon.org/2018/
All the best,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
You need to set the Python interpreter for the project to be the Anaconda one.
See https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html
On Monday, November 27, 2017 at 1:56:58 AM UTC+2, C W wrote:
> Hello all,
>
> I am a first time PyCharm user. I have Python 3 and Anaconda
You need to set the Python interpreter for the project to be the Anaconda one.
See https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html
On Monday, November 27, 2017 at 1:56:58 AM UTC+2, C W wrote:
> Hello all,
>
> I am a first time PyCharm user. I have Python 3 and
Hi,
Just wanted to share a project I'm working on. It a super fast serverless that
support Python handlers as well.
Check out more at https://www.iguazio.com/nuclio-new-serverless-superhero/
Code at https://github.com/nuclio/nuclio/
Happy hacking,
--
Miki
--
https://mail.python.org/mailman
Can you show us some of the code you tried?
On Monday, June 26, 2017 at 10:19:46 AM UTC+3, Bhaskar Dhariyal wrote:
> Hi everyone!
>
> I have a dataset which I want to make model trainable. I ahve been trying to
> do some thing for past 2-3 days.
>
> Actually I wanted to clean 'desc' and
Hi All,
The second PyCon Israel will take place June 11-14, 2017.
* 11 June Django girls workshop at Red Hat Israel offices in Raanana
* 12-13 June PyCon Israel main event at Wohl center
* 14 June PyCon Israel workshops and sprints
We still have some sponsorship spots available, great recruiting
Miki Tebeka added the comment:
Thanks Guido, however I think my blog is not the right place - it's dog ugly
and read by about 7 people on a good day :)
I think that adding this to the official docs will add to the "batteries
included" motto. I'll try to find a time and come up wi
Miki Tebeka added the comment:
Eric - sorry I wasn't clear. I'm not talking about the -m behavior in general
but on the modules in the standard library that can be used with it. A lot of
windows are happy to know about "python -m tarfile" to they can extract tar
files without
You can do this with pandas:
import pandas as pd
from io import StringIO
io = StringIO('''\
idABCDE
10010000
10101100
10210
New submission from Miki Tebeka:
Several modules can be invoked with -m and are pretty handy (json.tool,
zipfile, tarfile ...).
There should be a section in the documentation that groups all of these "python
-m" tools together. Something like
http://pythonwise.blogspot.nl/2015
> for row in cus:
>print(row.budget_code)
>
>
> NameError: name 'budget_code' is not defined
You'll need to use a DictCursor to be able to access rows by name and not
position (which IMO is the preferred way).
cus = conn.cursor(pymysql.cursors.DictCursor)
cus.execute("SELECT * FROM
On Tuesday, June 21, 2016 at 2:03:28 PM UTC+3, Pushpanth Gundepalli wrote:
> Guys, can you please share me some sites where we can practice python
> programs for beginners and Intermediate.
IMO you can do that at https://www.codecademy.com/learn/python
--
> Is there a way to get hourly weather forecast data (temperature,
> chance of precipitation) from the command line in Debian Linux?
If you Google for "weather API" you'll find several sites who give programmatic
access to weather data.
--
https://mail.python.org/mailman/listinfo/python-list
/ to see more details.
See you there,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
> When I enter into the command window "pip install matplotlib", it reads this
> below (this is not the full version of it):
> ...
Installing scientific packages can be a pain. I recommend you take a look at
https://www.continuum.io/downloads
--
g = root.find('config[@id="B"]')
for panel in cfg.findall('panel'):
panels.append([{elem.tag: elem.text} for elem in panel])
You'll need to do some parsing for the coordinates and handle canvas and
comments separately.
HTH,
Miki
--
https://mail.python.org/mailman/listinfo/python-list
> I been trying to compile matplotlib in a python3.4 virtual env using
> pip version 1.7 on Fedora 22. I am in about 3 weeks learning python
> and Django so I am not clear on the error response to:
> ...
> File "/usr/lib64/python3.4/distutils/version.py", line 343, in _cmp
> if
On Thursday, September 10, 2015 at 1:11:59 PM UTC+3, chen...@inhand.com.cn
wrote:
> hi:
> I have to use numpy package. My python runs on my embedded arm
> device. So, how do i cross compile numpy?
conda has support for ARM - http://continuum.io/blog/new-arch
BTW: I suggest you write a
Greetings,
0. Classes where Idle is used:
Where?
At client site. Mostly big companies.
Level?
From beginner to advanced.
Idle users:
1. Are you
grade school (1=12)?
undergraduate (Freshman-Senior)?
post-graduate (from whatever)?
post-graduate
2. Are you
beginner (1st class, maybe 2nd
What are your best time saving tips when programming Python?
* Use the REPL. Write small chunks of code and test them as you go
* Know what's available in the standard library (sets, Counter, deque ...)
* Learn how to pick good packages from PyPI (community, last commit ...)
* import this
--
PyPI Support) seems pretty deserted. What is the right location for
these kind of issues?
Thanks,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
The forums at https://sourceforge.net/p/pypi/support-requests/ (which is
linked from PyPI Support) seems pretty deserted. What is the right
location for these kind of issues?
That is one place.
https://bitbucket.org/pypa/pypi/issues
Thanks!
--
If anyone may kindly suggest what is the error I am doing.
It's close to impossible to know without seeing the server side code.
--
https://mail.python.org/mailman/listinfo/python-list
python.org takes 0.209 total) and
the size (Content-Length).
Anything gone wrong or am I missing something?
Thanks,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Thanks Chris, I was hitting the wrong URL by mistake.
Didn't think an extra / will make all that difference :)
On Tuesday, March 10, 2015 at 2:12:13 PM UTC+2, Chris Angelico wrote:
On Tue, Mar 10, 2015 at 10:55 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Miki Tebeka wrote
Thanks for all the answers!
--
https://mail.python.org/mailman/listinfo/python-list
Greetings,
I've compiled a list of python -m tools at
pythonwise.blogspot.com/2015/01/python-m.html.
Did I miss something? What are your favorite python -m tools?
Thanks,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
information. What is the test suite you're using? How are you
running the tests? Example output ...
All the best,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Miki Tebeka added the comment:
Can we also update iglob [1] as well?
[1] https://docs.python.org/2/library/glob.html#glob.iglob
--
nosy: +tebeka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22524
.
All the best,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
named pandas.io.data
* Do you have pandas installed? (Does import pandas work?)
* If it is installed, what version do you have? ( print(pandas.__version__)
HTH,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Greetings,
On Wednesday, September 24, 2014 5:57:15 PM UTC+3, Ian wrote:
Then your result depends on the order of your input, which is usually
not a good thing.
As stated in previous reply - I'm OK with that.
Why would you need to determine the *number* of bins in advance? You
just need to
Greetings,
Before I start writing my own. Is there something like collections.Counter
(fore frequencies) that does fuzzy matching?
Meaning x is considered equal to y if abs(x - y) epsilon. (x, y and my case
will be numpy.array).
Thanks,
--
Miki
--
https://mail.python.org/mailman/listinfo
On Tuesday, September 23, 2014 4:37:10 PM UTC+3, Peter Otten wrote:
x eq y
y eq z
not (x eq z)
where eq is the test given above -- should x, y, and z land in the same bin?
Yeah, I know the counting depends on the order of items. But I'm OK with that.
--
On Tuesday, September 23, 2014 7:33:06 PM UTC+3, Rob Gaddi wrote:
While you're at it, think
long and hard about that definition of fuzziness. If you can make it
closer to the concept of histogram bins you'll get much better
performance.
The problem for me here is that I can't determine the
Miki Tebeka added the comment:
Thanks Paul, will work on that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
___
___
Python-bugs-list
Miki Tebeka added the comment:
I don't like changing code just to accommodate testing. Will try to think of a
way to solve this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
Miki Tebeka added the comment:
Anything else I need to solve to get this patch accepted?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
Miki Tebeka added the comment:
Support for directory invocation as well.
--
Added file: http://bugs.python.org/file36476/prog3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
Miki Tebeka added the comment:
New patch with handling of zip files.
--
Added file: http://bugs.python.org/file36453/prog2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
Miki Tebeka added the comment:
How can you run a package without -m?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
___
___
Python-bugs
Miki Tebeka added the comment:
Made the test more robust by using sys.executable in the comparison.
--
Added file: http://bugs.python.org/file36461/prog3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
Miki Tebeka added the comment:
For zip file the help should probably be:
usage: python file.zip
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
New submission from Miki Tebeka:
python -m module -h starts with
usage: __main__.py
It should be
usage: python -m module
--
components: Library (Lib)
files: prog.diff
keywords: patch
messages: 225586
nosy: tebeka
priority: normal
severity: normal
status: open
title: argparse
] * (max_length - len(line))
max_length = 10
with open('data.csv') as fo:
df = pd.DataFrame.from_records(gen_rows(fo, max_length))
HTH,
Miki
--
https://mail.python.org/mailman/listinfo/python-list
the point of
modules and imports. I suggest you go over https://docs.python.org/3.4/tutorial/
HTH,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Greetings,
import pandas as pd
No module named numpy
I find the most painless way of installing the Python scientific stack is using
Anaconda
http://continuum.io/downloads
HTH,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
libraries for that (including the C header
files). IIRC sudo apt-get build-dep python should install all the required
packages.
HTH,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Is there a library for Python that can easily create flowcharts using a
simple API?
Maybe https://code.google.com/p/pydot/ ?
--
https://mail.python.org/mailman/listinfo/python-list
supports ignoring certain lines by appending a comment starting with #
NOQA
HTH,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
?
...
It it possible that this will cause the program to hang in any case?
If due to a bug in the cleanup thread it hangs - the program will hang as well.
All the best,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
(If you don't know what the strop
module is, go ahead and forget it now.)
+1 QOTW :)
--
https://mail.python.org/mailman/listinfo/python-list
I have seen by chance a number of years ago a book on Python programming
for running on mobile phones (of a certain producer only). What is the
current state of the art in that? Could someone kindly give a few good
literature references? Thanks in advance.
I'm not an expert, but take a look at
How do you deal with tests (both on dev machine and Jenkins) that need
credentials (such as AWS keys)?.
I've done several of these. Another option that may work in some
contexts is to mock the test altogether;
Thanks, but mocking is last resort for me, it reduces the value of testing
greatly
control
3. Credentials service (such as ZooKeeper) accessed only from VPN
4. Credentials pre user encrypted (gpg) and stored in source control
What method are you using? Are there any best practices in the subject?
Thanks,
--
Miki
--
https://mail.python.org/mailman/listinfo/python-list
Greetings,
http://pypi2u.appspot.com/ is a simple service that notifies you on new
versions of packages you're interested in.
You can view the code, fill bugs and suggest ideas at
https://bitbucket.org/tebeka/pypi2u
Hope you find it useful,
--
Miki
--
https://mail.python.org/mailman/listinfo
I want to develop a instant message server, simply has user and group
entity.
Is there any better existing open-source one?
Thus I can download and have a look.
You can take a look at Twisted Words
(https://twistedmatrix.com/trac/wiki/TwistedWords).
--
Miki Tebeka added the comment:
I still see this in 3.4rc1
==
FAIL: test_getgroups (test.test_posix.PosixTester)
--
Traceback (most recent call last):
File
IIRC creating a directory is atomic in most environments.
On Sunday, February 9, 2014 2:39:51 AM UTC-8, Asaf Las wrote:
Hi
Which one is most recommended to use for mutex alike locking to
achieve atomic access to single resource:
- fcntl.lockf
- os.open() with O_SHLOCK and
Thank you that's nicer, but ifiilterfalse is not in Python 3 (could
use filter of course).
It was renamed to filterfalse -
http://docs.python.org/3.3/library/itertools.html#itertools.filterfalse
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, February 1, 2014 6:12:28 AM UTC-8, andrea crotti wrote:
I'm giving a talk tomorrow @Fosdem about generators/iterators/iterables..
The slides are here (forgive the strange Chinese characters):
https://dl.dropboxusercontent.com/u/3183120/talks/generators/index.html#3
I want that print hello should appear on screen as well as get saved in a
log file.
How can I accomplish this?
There are many ways to do this, here's one:
class MultiWriter(object):
def __init__(self, *writers):
self.writers = writers
self.isatty = False
def
On Wednesday, November 20, 2013 6:36:56 AM UTC-8, Alec Taylor wrote:
Anyway, here is the link: https://github.com/rauhryan/huboard
I thought you wanted a Python bases solution.
--
https://mail.python.org/mailman/listinfo/python-list
Can you recommend an open source project (or two) written in Python;
which covers multi project + sub project issue tracking linked across
github repositories?
Don't know if it covers all what you need, but http://trac.edgewall.org/ is
written in Python, and has many, many plugins.
--
On Tuesday, October 29, 2013 10:48:58 AM UTC-7, Barry Warsaw wrote:
So too has my latest stint as Python Release Manager. Over the 19 years I
have been involved with Python,
Thanks Barry for all the hard work.
--
https://mail.python.org/mailman/listinfo/python-list
New submission from Miki Tebeka:
Currently glob.iglob calls os.listdir internally. Which means that if there are
many files in the directory - a big list of them is created in memory.
iglob should try to use readdir and be a true iterator, not consuming a lot
of memory.
See one possible
Wouldn't it
better to add a feature to Python to write the name of DLL which load
has been failed?
If you start Python with the -v (verbose) flag, you can see all the calls to
dlopen.
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible with argparse to have this syntax for a script?
my-script (-a -b VALUE-B | -c -d VALUE-D)
I would like to do this with the argparse module.
You can probably do something similar using sub commands
(http://docs.python.org/2/library/argparse.html#sub-commands).
--
Is there an import / distutils tutorial out there? I'm looking for it, but
perhaps one of you already knows where to find it. Thanks!
Did you have a look at http://docs.python.org/3.3/distutils/examples.html?
Another thing to do is to look at what other packages on PyPi are doing.
--
On Wednesday, June 12, 2013 8:59:44 PM UTC-7, Ranjith Kumar wrote:
I'm looking for speech to text conversation python library for linux and mac
Not a Python library, but maybe you can work with
http://cmusphinx.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Now! I have written a python script . I want to call a golang script in
python script.
Who can give me some advices?
See http://gopy.qur.me/extensions/examples.html and
http://www.artima.com/weblogs/viewpost.jsp?thread=333589
--
http://mail.python.org/mailman/listinfo/python-list
I already have the .so files compiled.
http://docs.python.org/2/distutils/setupscript.html#installing-package-data ?
--
http://mail.python.org/mailman/listinfo/python-list
Basically, I'd like to know how to create a proper setup.py script
http://docs.python.org/2/distutils/setupscript.html
--
http://mail.python.org/mailman/listinfo/python-list
I want to use spline interpolation function from SciPy in an application and
at the same time, I don't want the end user to have to install SciPy
separately.
You can pack you application with py2exe, pyinstaller ... and then they won't
even need to install Python.
Another option (which is
You understand that this will result in a chunk of text that is not JSON?
I think he means something like this:
json.dumps([float('nan')])
'[N/A]'
That's exactly what I mean :)
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to find a way to have json emit float('NaN') as 'N/A'.
No. There is no way to represent NaN in JSON. It's simply not part of the
specification.
I know that. I'm trying to emit the *string* 'N/A' for every NaN.
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to find a way to have json emit float('NaN') as 'N/A'.
Easiest way is probably to transform your object before you try to write
Yeah, that's what I ended up doing. Wondered if there's a better way ...
Thanks,
--
Miki
--
http://mail.python.org/mailman/listinfo/python-list
[Roland]
yes, there is: subclass+extend the JSON-encoder, see pydoc json.
Please read the original post before answering. What you suggested does not
work since NaN is of float type.
--
http://mail.python.org/mailman/listinfo/python-list
Greetings,
I'm trying to find a way to have json emit float('NaN') as 'N/A'.
I can't seem to find a way since NaN is a float, which means overriding
default won't help.
Any simple way to do this?
Thanks,
--
Miki
--
http://mail.python.org/mailman/listinfo/python-list
Pynguin is a python-based turtle graphics application.
I wonder why Pynguin does not get more traction in the teaching sector. Looks
ideal for teaching kids.
--
http://mail.python.org/mailman/listinfo/python-list
I have a CSV file with 20 rows and 12 columns and I need to store it as a
matrix.
If you can use pandas, the pandas.read_csv is what you want.
--
http://mail.python.org/mailman/listinfo/python-list
.
In general, we're moving to list/generator comperhension over map/filter.
Something like:
print(sum(x*x for x in xrange(10**6) if (x*x)%2))
HTH,
Miki
--
http://mail.python.org/mailman/listinfo/python-list
I can't even read that mess... three nested lambda?
I have to say this and other answers in this thread seem not that friendly to
me.
The OP said it's a newbie question, we should be more welcoming to newcomers.
--
http://mail.python.org/mailman/listinfo/python-list
I can catch the exception, but don't see any way to tell which row caused the
problem. Is this information obtainable, short of retrying each row one by
one?
One way to debug this is to wrap the iterable passed to executemany with one
that remembers the last line. Something like:
class
1 - 100 of 609 matches
Mail list logo