Hot answers tagged

8 votes
Accepted

Markup Language Parser in C++

Naming things The first thing that strikes me about your code is that you have a lot of variable and struct names that are unnecessarily abbreviated. While it saves some typing in the beginning, it ...
user avatar
  • 32.3k
2 votes
Accepted

Regex and pandas to read forecast sky condition string

At the start of get_sky_condition(), I don't see why you do a .str.strip() when defining ...
user avatar
2 votes
Accepted

Text splitter using Regular Expressions in Python

Include spaces after commas. It's a virtually costless habit and it helps with code readability and editability. Constants are typically named with uppercase. Your program begins with several ...
user avatar
  • 9,475
2 votes

Reading 12-bit words from 32-bit stream

Overview: I can't see anything wrong with this code on a read through it (I did not compile it). All my comments are minor and just nit picky. So the below is just a few things I would do differently (...
user avatar
  • 91.5k
1 vote

Regex and pandas to read forecast sky condition string

You've landed in trouble with your indices again. I think the shape of your dataframe significantly mischaracterises what your data are actually saying: Per station, per station observation time, per ...
user avatar
  • 47.8k
1 vote

Python script for zlib decompression

It works, it's reasonably clear in that you use a library. Mostly it's fine. Give inflate a docstring which clearly says what it takes in, what it returns. Rename ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible