On Sat, Jun 10, 2017 at 3:51 AM, Paul Rubin wrote:
> Larry Martell writes:
>> I can tell they think I am old and they dismiss me right away.
>
> http://oldgeekjobs.com ?
Cool! Thanks! Sharing with all my old nerdy friends.
--
https://mail.python.org/mailman/listinfo/python-list
I'm trying to make the following code work:
import os, sys
app=['host1', 'host2', 'host3']
for i in app:
os.system('nmap -p 22 -P0 %s | grep open 2>&1 > /dev/null && echo "%s up"
I've tried many different iterations of the os.system call, how to make this
work?
TIA
--
https://mail.pytho
i have an .exe file where file compiled by py2exe in my .exe folder i have some
.dll files one .exe file and library.zip file and inside this zip i have to
many .pyccombile files.
i have decompile this files from library.zip using this program and that
program create me new file where i can s
> I'm trying to make the following code work:
> ...
It seems fairly clear that you've posted code which couldn't possibly
run (missing a closing quote and right paren). Let me suggest:
1. You copy and paste directly from a Python (or IPython/Jupyter/IDLE)
session, including prompts and output.
2
Wondering if there's a standard lib version of something like
enumerate() that takes a max count value?
Use case: When you want to enumerate through an iterable, but want to
limit the number of iterations without introducing if-condition-break
blocks in code.
Something like:
for counter, key in en
Malcolm Greene wrote:
> Wondering if there's a standard lib version of something like
> enumerate() that takes a max count value?
> Use case: When you want to enumerate through an iterable, but want to
> limit the number of iterations without introducing if-condition-break
> blocks in code.
> Some
Malcolm Greene writes:
> Wondering if there's a standard lib version of something like
> enumerate() that takes a max count value?
> Use case: When you want to enumerate through an iterable, but want to
> limit the number of iterations without introducing if-condition-break
> blocks in code.
> Som
Thank you Peter and Jussi - both your solutions were very helpful!
Malcolm
--
https://mail.python.org/mailman/listinfo/python-list
I'm a fan of infinite sequences. Try out itertools.islice.
You should not underestimate this very important module.
Please read also the documentation:
https://docs.python.org/3.6/library/itertools.html
from itertools import islice
iterable = range(100)
# since Python 3 range is a lazy e
Hey, I want to use RC4-SHA in python, but when I try to use it, it doesn't get
used (If I do cipher() it says none(and handshake fails too)), I've tried to
modify the SSL library, but it didn't help at all(Maybe I did something wrong,
any help will be appreciated). Is there a way to use the RC4-
1: Are you 100% sure the server to which you are trying to connect supports
RC4-SHA?
2: If you have access to the server, turn on SSH debug mode to watch your
client try and connect.
I find that to be helpful in debugging many connection issues.
On Wed, Jun 14, 2017 at 4:16 PM, wrote:
> Hey, I
Hi All ,
I am new to python .I have installed 3.6.1 python on my computer.
when i am trying to import teradata i am getting below error message:
Traceback (most recent call last)
File "C:\Users\mradul_dhakad\AppData\Local\Programs\Python\
Python36\Hello.py",
line 1, in
import teradata
ModuleNot F
I am working with an API and I get a return response in this format.
[{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","quantityAvailable":0.0},{"warehouseCode":"TX-1-US","quantityAvailable":14.000
On Thu, Jun 15, 2017 at 6:33 AM, Bradley Cooper
wrote:
> I am working with an API and I get a return response in this format.
>
>
> [{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","quantityAvailable":0.0},
To Ray Cote:
Hey, I'm "the server(I've written using ssl/socket)" and my client is using
RC4-SHA, but I can't make the server to use it. I make " ciphers='RC4-SHA' " in
the ssl.wrap_socket. Do I need to modify SSL file or something to make it work?
--
https://mail.python.org/mailman/listinfo/
On 14/06/17 21:38, Chris Angelico wrote:
On Thu, Jun 15, 2017 at 6:33 AM, Bradley Cooper
wrote:
I am working with an API and I get a return response in this format.
[{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US"
Yes it is not json, I did try that with no luck.
--
https://mail.python.org/mailman/listinfo/python-list
On 14/06/17 21:47, Erik wrote:
What makes it look like JSON to you? (I'm not arguing, I'm asking what
I've missed).
If I cut-and-paste the OP's structure into the REPL, it replies with a
valid Python structure that's equivalent (albeit with single-quotes
instead of double-quotes).
So I gues
On 2017-06-14, Erik wrote:
> On 14/06/17 21:38, Chris Angelico wrote:
>> On Thu, Jun 15, 2017 at 6:33 AM, Bradley Cooper
>> wrote:
>>> I am working with an API and I get a return response in this format.
>>>
>>>
>>> {"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailabl
On Wed, 14 Jun 2017 at 21:47 Erik wrote:
> On 14/06/17 21:38, Chris Angelico wrote:
> > On Thu, Jun 15, 2017 at 6:33 AM, Bradley Cooper
> > wrote:
> >> I am working with an API and I get a return response in this format.
> >>
> >>
> >>
> [{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT
On Thu, Jun 15, 2017 at 6:47 AM, Erik wrote:
> On 14/06/17 21:38, Chris Angelico wrote:
>>
>> On Thu, Jun 15, 2017 at 6:33 AM, Bradley Cooper
>> wrote:
>>>
>>> I am working with an API and I get a return response in this format.
>>>
>>>
>>>
>>> [{"itemNumber":"75-5044","inventory":[{"warehouseCod
On 14/06/17 22:18, Grant Edwards wrote:
What makes it look like JSON to you?
The fact that it _is_ valid JSON (at least according to the parsers
I've tried on it, both locally and using things like jsonlint.com).
And I tried it on the Python REPL. It's Python too.
If someone wrote the follow
On 14/06/17 22:16, Matt Wheeler wrote:
? JSON keys are quoted
Thanks Matt,
I was confusing myself between JS source and JSON. Good to have this
reminder (I always use libraries for reading and writing JSON in
whatever language, so while I view it often I very rarely have to type
it in direc
Bradley Cooper wrote:
> Yes it is not json, I did try that with no luck.
What exactly did you try and how did it fail?
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Jun 14, 2017 at 4:40 PM, wrote:
> Hey, I'm "the server(I've written using ssl/socket)" and my client is
> using RC4-SHA, but I can't make the server to use it. I make "
> ciphers='RC4-SHA' " in the ssl.wrap_socket. Do I need to modify SSL file or
> something to make it work?
Had not rea
On Wed, Jun 14, 2017 at 4:33 PM, Bradley Cooper wrote:
> I am working with an API and I get a return response in this format.
>
>
> [{"itemNumber":"75-5044","inventory":[{"warehouseCode":"
> UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","
> quantityAvailable":0.
Am 14.06.2017 um 22:33 schrieb Bradley Cooper:
> I am working with an API and I get a return response in this format.
>
>
> [{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","quantityAvailable":0.0},{"wareh
On 14/06/17 22:54, Ray Cote wrote:
Definitely JSON:
json.loads(“""[{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","quantityAvailable":0.0},{"warehouseCode":"TX-1-US","quantityAvailable":14.
On 14/06/17 22:30, Chris Angelico wrote:
It wouldn't be the repr() of a Python structure, as that wouldn't have
all those trailing zeroes.
That depends on what class represents those float values. It doesn't
have to be the built-in float. Same with the double-quotes instead of
single-quotes o
On 2017-06-14, Erik wrote:
> On 14/06/17 22:54, Ray Cote wrote:
>> Definitely JSON:
>
>> json.loads(“""[{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","quantityAvailable":0.0},{"warehouseCode":"TX-1-US
On Wed, Jun 14, 2017 at 3:49 PM, Grant Edwards
wrote:
> On 2017-06-14, Erik wrote:
> > On 14/06/17 22:54, Ray Cote wrote:
> >> Definitely JSON:
> >
> >> json.loads(“""[{"itemNumber":"75-5044","inventory":[{"
> warehouseCode":"UT-1-US","quantityAvailable":0.0},{"
> warehouseCode":
On 06/14/2017 03:49 PM, Grant Edwards wrote:
On 2017-06-14, Erik wrote:
On 14/06/17 22:54, Ray Cote wrote:
Definitely JSON:
json.loads(“""[{"itemNumber":"75-5044","inventory":[{"warehouseCode":"UT-1-US","quantityAvailable":0.0},{"warehouseCode":"KY-1-US","quantityAvailable":0.00
On Wed, Jun 14, 2017 at 4:06 PM, justin walters
wrote:
>
>
> On Wed, Jun 14, 2017 at 3:49 PM, Grant Edwards
> wrote:
>
>> On 2017-06-14, Erik wrote:
>> > On 14/06/17 22:54, Ray Cote wrote:
>> >> Definitely JSON:
>> >
>> >> json.loads(“""[{"itemNumber":"75-5044","inventory":[{"wareho
>> useC
On 15/06/17 00:08, justin walters wrote:
I should also specify that the data you have received is malformed.
JSON should always have an object as the top level structure, not an
array as in your data.
So it's not JSON then? :D
E.
--
https://mail.python.org/mailman/listinfo/python-list
On 2017-06-14, justin walters wrote:
> I should also specify that the data you have received is malformed.
>
> JSON should always have an object as the top level structure, not an
> array as in your data.
Where is that requirement stated?
RFC7159 explicitly states that a "conforming JSON text
On Thu, Jun 15, 2017 at 8:34 AM, Erik wrote:
> On 14/06/17 22:30, Chris Angelico wrote:
>>
>> It wouldn't be the repr() of a Python structure, as that wouldn't have
>> all those trailing zeroes.
>
>
> That depends on what class represents those float values. It doesn't have to
> be the built-in fl
Héllo,
I'd like to use Python 3.5 or Python 3.6 in production but avoid the use of
pip and virtualenv.
Is there a solution based on a popular GNU/Linux distribution that allows
to keep up with the release of Python 3.x and various other highly prolific
project but still young like aiohttp?
What
On 15/06/17 00:45, Chris Angelico wrote:
Add all that
kind of thing together, and you get my original conclusion that this
is JSON. It's also perfectly parseable as various other things, but
it's still most likely to be JSON.
It "is JSON" but is also "parsable as various other things" yet is "m
I'm not familar with pandas.
If you look on stackoverfolow you'll find this solution:
df.epoch = pd.to_datetime(df.epoch)
https://stackoverflow.com/questions/17134716/convert-dataframe-column-type-from-string-to-datetime
But in this case, it's not a plain string, then it's a datetime object.
Gr
Hi,
I'm using Arch Linux. There is currently Python 3.6 the standard
interpreter.
But I think it's not good to use this in production.
Hm, maybe pyenv can be an distribution independent solution:
https://github.com/pyenv/pyenv
If you're using pyenv, then you'll have some build dependencies.
One t
On Wed, Jun 14, 2017 at 6:14 PM, Erik wrote:
> On 14/06/17 22:54, Ray Cote wrote:
>
>> Definitely JSON:
>>
>>>
> json.loads(“""[{"itemNumber":"75-5044","inventory":[{"wareho
>> useCode":"UT-1-US","quantityAvailable":0.0},{"wa
>> rehouseCode":"KY-1-US","quantityAvailable":0.000
On Wednesday, June 14, 2017 at 7:06:39 PM UTC-4, justin walters wrote:
> JSON and Python dictionaries have nearly the exact same syntax. That's why
> working with
> JSON in Python is such a joy! :)
>
> You can paste any valid JSON into a Python REPL and it will be interpreted
> as a Python diction
On Thu, Jun 15, 2017 at 9:46 AM, Amirouche Boubekki
wrote:
> I'd like to use Python 3.5 or Python 3.6 in production but avoid the use of
> pip and virtualenv.
>
> Is there a solution based on a popular GNU/Linux distribution that allows
> to keep up with the release of Python 3.x and various other
On 06/14/2017 05:06 PM, justin walters wrote:
> JSON in Python is such a joy! :)
I understand that in this case the data is coming from a server in a
form intended for easy use with Javascript. But other than this type of
communication, I don't see any good reason to choose JSON as a data
interch
Hello,
i wonder what would be a proper data structure for something with the
following characteristics:
id - number,
obj[a..c] - objects of various classes
the idea is to be able to update certain fields of these objects initially
getting access to the record by ID
something like this ( not wor
On Wed, Jun 14, 2017 at 4:40 PM, Grant Edwards
wrote:
> On 2017-06-14, justin walters wrote:
>
> > I should also specify that the data you have received is malformed.
> >
> > JSON should always have an object as the top level structure, not an
> > array as in your data.
>
> Where is that require
On Wed, Jun 14, 2017 at 9:33 PM, Michael Torrie wrote:
> To me JSON seems to hold no real benefits over other serialization
> techniques, including the XML beast.
I guess we'll have to agree to disagree. XML is the Devil's spawn,
hiding its real intent inside layer after layer of tags. In contras
On Wed, Jun 14, 2017 at 6:00 PM, Ned Batchelder
wrote:
> On Wednesday, June 14, 2017 at 7:06:39 PM UTC-4, justin walters wrote:
> > JSON and Python dictionaries have nearly the exact same syntax. That's
> why
> > working with
> > JSON in Python is such a joy! :)
> >
> > You can paste any valid JS
On 2017-06-15, Michael Torrie wrote:
> On 06/14/2017 05:06 PM, justin walters wrote:
>> JSON in Python is such a joy! :)
100% agreement here.
> I understand that in this case the data is coming from a server in a
> form intended for easy use with Javascript. But other than this
> type of commun
On Wed, Jun 14, 2017 at 7:33 PM, Michael Torrie wrote:
> On 06/14/2017 05:06 PM, justin walters wrote:
> > JSON in Python is such a joy! :)
>
> I understand that in this case the data is coming from a server in a
> form intended for easy use with Javascript. But other than this type of
> communi
(I am not very familiar with panda too!)
In case of his data he needs to set unit to 's'
df['dt'] = pd.to_datetime(df.epoch,unit='s')
It return utc time from epoch, so maybe this is what he could use ->
df['dt'] = df.epoch.apply(time.ctime)
or something like (if he needs strings) ->
df['dt']
On Thu, Jun 15, 2017 at 12:33 PM, Michael Torrie wrote:
> To me JSON seems to hold no real benefits over other serialization
> techniques, including the XML beast. XML may be verbose, but at least
> XML data can be formally validated and formally transformed and queried,
> which is certainly not t
On Wed, 14 Jun 2017 07:00:13 +0200, Pavol Lisy wrote:
> $ python3 -m ensurepip /usr/bin/python3: No module named ensurepip
>
> But maybe this help to understand:
>
> $ python -m ensurepip
> ensurepip is disabled in Debian/Ubuntu for the system python.
Ah, thanks!
I don't get that error messa
Andre Müller writes:
> I'm a fan of infinite sequences. Try out itertools.islice.
> You should not underestimate this very important module.
>
> Please read also the documentation:
> https://docs.python.org/3.6/library/itertools.html
>
> from itertools import islice
>
> iterable = range(10
Chris Angelico :
> XML is thus poorly suited to *most* forms of data,
Correct.
>
>
> aa
> qq
> qw
> qe
> as
>
>
> What does this represent? A generic XML parser has to cope with it. I
> gave this to a few XML-to-JSON converters, and they all interpreted it
> as some variant of {"asd
"Andrew Zyman" wrote in message
news:caprckxktozonlak8asizonkypd9y_p25fr2rkfkozxoa4bc...@mail.gmail.com...
Hello,
i wonder what would be a proper data structure for something with the
following characteristics:
id - number,
obj[a..c] - objects of various classes
the idea is to be able to upd
Michael Torrie wrote:
I don't find JSON any more human readable than XML
to be honest, perhaps less so because there's no way to define a formal
schema to follow, at least that I'm aware of.
You mean like this?
http://json-schema.org/
One thing I like better about JSON than XML as a serialisa
57 matches
Mail list logo