@Simon An application to capture software requirements, has to be offline. I quite like Django's Model classes so it'll be cool to use that or something similar.
i was copying some code and this line spits out an invalid syntax on my script. i did some googling and it says it plots something in ipython. I am not using that though. Just simple python3 with CMD. How do i replicate it
OK, I have a problem. I'm trying to install tensorflow on the new laptop, but running into issues. I installed Anaconda, but pip is not showing as a recognized command - is there something special I need to be doing?
That sounds like you've installed Anaconda but didn't select the option to add it to your path. In your start menu, type "anaconda" and select "anaconda command prompt" or whatever.
@ReblochonMasque don't seem to get it, mark as duplicate look harsh to me, closing and mentioning in the comments looks fine to me. Is there a guide i can refer?
Running datetime.datetime.strptime("Thu, 21 Dec 2017 16:02:03 CET", "%a, %d %b %y %H:%M:%S %Z") Gives me a ValueError saying the format is invalid. What am I missing?
I have these date strings:
Fri Oct 7 16:00:09 CEST 2011
I want to convert them to UTC. I have tried with this implementation:
def LocalToUtc(localtime):
return datetime.strptime(localtime, "%a %m %d %H:%M:%S %Z %Y").isoformat() + 'Z'
But I get a ValueError:
ValueError: time data 'Fri ...
Thank you @MartijnPieters. Outside of mutable/immutable, it is difficult to find example use cases that illustrate a clear distinction; have you got cases where a NamedTuple would be your clear cut choice, and other cases where it would be a dataclass?
I'm concerned that there are too many useless pandas questions. Most of them poorly named or outright misleading, or have hyper specific problems whose solutions aren't likely to be of any use to anyone besides OP. If you google with a particular set of keywords looking for a particular solution, you almost always get junk results
What I said could be applied to just about any tag, but the thing about pandas questions are its answerers (including me) are more inclined to answer than than DV/VTC)
categorizing pandas topics is difficult and titling questions is a challenge. I'm incented to make a title succinct. But doing so with a pandas question almost always leaves the title useless.
On top of that, as i pointed out in my pivot post. there is are a ton of ways to ask the same question with varying degrees of specificity. It then becomes more difficult to generalize pandas answers.
On top of that, I believe the typical pandas asker has less developer experience as they are likely an aspiring data scientist and don't yet have a developer mindset
Your canonical QA, while really good, will be the kind of question that an asker with the same question reads with glossed eyes, and ends up asking another question just because they couldn't figure out how to adapt any of those techniques to their data.
So there could be 20 questions/answers that would solve their problem. But even if presented those same question/answers, they would be useless because the would be asker can't generalize.
Hmm, pivot was a stellar effort. We need a couple more like that at least. It would be good to identify a few common patterns and address those, because answering the same, tired old questions is just... (and finding a dupe, when you know it exists is equally hard just because of the bad titles)
Thank you @MartijnPieters, very useful. I actually had not realized that dataclasses are in python 3.7; that explains the lack of depth in explanations and examples to be found. I appreciate your time helping me. :)
I'm glad that today's AoC problem doesn't require you to know of the existence of view spoiler in order to get an answer in a reasonable amount of time
it seems like it gets easily trapped in areas where it already was in, and going into fully uninfected regions sends it back to where it came from pretty fast
That would also be a nice plot, "distance from starting point over time"
It would be cool if there was an answer for "why does 0.1*3 give 0.30000000000000004?" that went into absolutely exhaustive detail, describing the complete structure of ISO-compliant floats, the exact bit-level mathematics involved in adding/multiplying them, and an exploration of various languages' algorithms for cutting off decimal places when displaying them
The last time I tried exploring the topic at a greater depth than "what numbers can be exactly represented as floats?", I ended up completely unable to find relevant information that wasn't behind a paywall. I guess you have to pony up standards viewing fees to ISO if you want to know how to add.
I don't think I can derive float multiplication rules from first principles. If for no other reason than I recall that there's some obscure step where half of the time it rounds up, and half the time it rounds down, to prevent bias in some common corner case. I don't know which half of the time which rounding occurs, so I can't get the exact same bytes that a compliant floating point arithmetic unit would give
Always great to see an OP reverse the initial question impact by adding something close enough to an MCVE that we can help em.
(stackoverflow.com/questions/47943416/… is not the best such example, but still nice to see someone not shout at the community for the voting they got initially).
Possibly "What Every Computer Scientist Should Know About Floating-Point Arithmetic" contains the same information, although a quick skim doesn't reveal exactly what I'm looking for wrapped with a neat little bow
sqlalchemy documentation recommends that one should add relationship() directive to the parent table. Just for testing purpose I added relationship() directive to the child class and it appears to be working fine. Am i missing something ?
you missed that, Kevin, but I only barely missed a wild goose chase (saved thanks to DSM)
I thought that matplotlib would weirdly change the plot under certain circumstances; turns out that the fractal-like fine detail in the 2k*2k image led to weird artifacts with insufficient resolution
Or 2 or 3, depending on how you count it. There are a number of variations on the "it was me" meme. Dio is used for general bamboozlement. There's also "you thought it would be a cute girl, but it was just me, <fictional female character with low self-esteem>". And there's "IT WAS ME, BARRY!" which is used to indicate that something that by all rights appears to be an unfortunate coincidence, is actually caused by a powerful enemy of yours who can invisibly influence past events.
Ex: "Do you remember when you tripped on a rubber duck and cut your hand? IT WAS ME, BARRY! I WAS THAT DUCK!"
@cᴏʟᴅsᴘᴇᴇᴅ: all your sum answer did was remove an unnecessary tuple call and make the result a list instead of a tuple, no? Your opening line "Here's a suggestion - create an iterator out of d." is what the OP is already doing.
@Zero: I use "The Pythonicness that needs hours of thought is not the true Pythonicness" sometimes when people are working hard to make their perfectly functional code more Pythonic instead of doing something useful.
The problem is:
I try to play Fast Tracker module in infinite loop, but doing so just replay music from start, instead of following repeat position.
Example: (here's the source for module https://api.modarchive.org/downloads.php?moduleid=153915#zeta_force_level_2.xm)
import pygame
pygame....
Oh, I already bumped that when you posted it here two weeks ago
48 views in more than a month...that's not very good visibility :/
@MaxLunar you've done all you could and waited patiently, and I can't find anything even remotely similar. Your post keeps coming up in searches. So I posted a bounty on it; if anyone knows what to do, hopefully they'll see it and step up :)
btw, what is the best solution to update the variable contents from file? On script startup I load my config file and read its contents, but also this config can be edited in runtime, so I should keep it up to date. I was thinking about setting a thread or process to reread file with time interval, but maybe theres a better way?