|
One minor, tangental* step: I'm going to move the python process manager I wrote towards only supporting the latest python minor version. I've been neglecting this project for want of spare time, but this change may simplify the codebase and API. With that in mind: If you're using 3.6, 3.7 etc, why? Would switching to 3.8 break anything for you? * Relevant in that it reduces a system state degree-of-freedom. Dominoes fucked around with this message at 02:19 on Oct 10, 2020 |
# ¿ Oct 10, 2020 02:09 |
|
|
# ¿ May 16, 2024 22:20 |
|
Duly noted! I'm now leaning against this idea. Another tangent: Have any of y'all dug into the cyphon codebase? The tool I referenced above is essentially an API wrapper. I wonder how tough it would be to modify Python to use better behavior natively. Dominoes fucked around with this message at 19:00 on Oct 10, 2020 |
# ¿ Oct 10, 2020 18:46 |
|
Are you serious? Let's go for a drive!
|
# ¿ Oct 10, 2020 22:43 |
|
The ability to let your IDE (like Pycharm), or a type checker (like mypy) makes type hings a gamechanger for the language. Related: Check out dataclasses, which use them.
|
# ¿ Oct 17, 2020 00:22 |
|
Mirconium posted:I mean, I appreciate Python as much as the next guy, and most of my coding is in Python, but at that point wouldn't it just be easier to go to a fully typed language? Something interesting happened, gradually I think, over the past decades: Explicit typing went from being something required for compilers to assign memory etc, and could be a chore. With the addition of type inference and complex type systems, it shifted to a powerful tool that lets compilers, IDEs, and other tools (like mypy) catch bugs, and ensure your program acts how you intend. Dominoes fucked around with this message at 03:00 on Oct 17, 2020 |
# ¿ Oct 17, 2020 02:56 |
|
That's awesome.
|
# ¿ Oct 17, 2020 03:01 |
|
Mirconium posted:I think the question I was trying to ask, which I ask as a non-CS-educated person (mainly a biologist) who genuinely doesn't know, is what are the benefits that Python derives from NOT having static types? quote:But if the Rust library ecosystem was as extensive as Python's, I would never write a line of another language again Another key perk of Python that I think Rust won't be able to catch up with is the REPL - especially variants like iPython. Using it for quickly testing functions, as a powerful, customizable calculator etc. Dominoes fucked around with this message at 17:35 on Oct 17, 2020 |
# ¿ Oct 17, 2020 13:44 |
|
As Data points out, the dir function doesn't do what you're asking. Check out the official docs. edit: I think your book is talking about a Unix/powershell console command, and is not directly related to Python. Dominoes fucked around with this message at 15:51 on Oct 29, 2020 |
# ¿ Oct 29, 2020 15:48 |
|
Hey bros. Is there a good way to visualize data with 3 input dims and 1 output? Maybe with some sort of shading, or density of points, or threshold values for drawing surfaces. (To define my terms. 1 in 1 out: Scatter/line plot. 2 in 1 out: surface or contour plot. 2 in 2 out: Vector plot in 2d. 3 in 3 out: Vector plot in 3d.)
|
# ¿ Oct 30, 2020 01:06 |
|
Bad Munki posted:Like your 2-in 1-out, but add hue for the 3rd dim. CarForumPoster posted:Its hard to know without knowing the data types but if they are all ordinal categories/numeric data, you can put 4 features on a scatter plot easily with X Axis, Y Axis, Point color (green->red), point size. I think ultimately, the answer will have to be some sort of custom rendering. Refreshing Vulkan skills. Does this seem overkill/over-engineered? Yes. Is this one of those cases where you have to fight that instinct and just do it? Leaning yes. Bad Munki posted:And bear in mind, every lovely meme that gets posted is showing 3 values at every x/y coordinate, you can use 1, 2, or 3 of those bands to your heart’s desire similarly. Dominoes fucked around with this message at 15:30 on Oct 30, 2020 |
# ¿ Oct 30, 2020 15:28 |
|
CarForumPoster posted:EDIT: One exception to the above lol is when the 3 factors and output are in some easily thought of coordinate system like (X, Y, Z, output) or (range, azimuth elevation, power in dB) quote:EDIT2: Just post your graphs. Its my first day off in a while and I am day drunk posting about python. The orbitals table images on this page are one way the 3d graph might look.
|
# ¿ Oct 30, 2020 17:42 |
|
Fork.
|
# ¿ Nov 17, 2020 05:48 |
|
I assumed notebooks were for sharing results, especially with interactive visuals.
|
# ¿ Dec 19, 2020 16:47 |
|
Re the notebook chat: It's always something I've had in my hip pocket as a tool I'll know is available when the use came up. I was surprised to hear (partly from articles critical of its non-linear excecution) how it's often used in practice, ie for broader use cases.
|
# ¿ Dec 22, 2020 22:29 |
|
Cyril Sneer posted:As a follow up, is there a way to allow dynamic assignment of classes? In order to assemble my pipeline, I was thinking of using a configuration dictionary, with the keys specifying the particular model to use, amongst other things. I recommend dataclasses for configs, since they likely have a fixed set of settings (fields), and the values are of different types. Comparatively, dictionaries leave you open to errors that will surprise you at runtime. Use an Enum to define allowed classes that can be in the config: Python code:
Dominoes fucked around with this message at 21:16 on Dec 28, 2020 |
# ¿ Dec 28, 2020 20:59 |
|
SelectedModel.MODEL_A is an enum variant. You can think of an enum as a way to list choices. (Or as a binary with more than 2 variants, and semantic meaning to each variant.) When processing your config, you run different code depending on which variant the predictor field holds. This way your IDE etc will only allow certain classes to be selected in the config. Enums allow you to specify only valid models. Your example used strings; presumably not every string (or every class) is a valid option in your config! If you plan to serialize your config, instead of using enum.auto(), specify an integer for each variant, so your serialization is consistent. Dominoes fucked around with this message at 22:00 on Dec 28, 2020 |
# ¿ Dec 28, 2020 21:53 |
|
In Windows, pip install is fine. On Linux, you risk putting your system in a totalled state due to system reliance on the python install it comes with. Try this: -Download the latest Python source from python.org -Install it using `configure`, `make` and `sudo make install` from the directory you unpacked it to -Use its pip: `python3.9 -m pip install apackage`. This way, you don't risk modifying a package your OS relies on. Or, roll the dice with your system python's pip. It will probably be fine. Dominoes fucked around with this message at 19:39 on Dec 30, 2020 |
# ¿ Dec 30, 2020 19:36 |
|
12 rats tied together posted:I like pyenv for managing python installs. The usual workflow is that you: quote:I'd really suggest using WSL to do any sort of python development on windows anyway.
|
# ¿ Dec 30, 2020 21:45 |
|
There are options for configuring the Python interpreter, including adding additional paths for libs, but I don't understand what you're attempting.
|
# ¿ Jan 1, 2021 06:42 |
|
copy.deepcopy(j)
|
# ¿ Jan 4, 2021 16:58 |
|
Rocko Bonaparte posted:I'm wondering how other people might be dealing with a situation of scratchwork classes and rigid type checking. I have some classes that are getting progressively fed information so their fields start out optional. When they are in-use, these will be filled. Your builder or two-class system could work, if you confirm your workflow change states from nullable to non-nullable cleanly.
|
# ¿ Jan 27, 2021 18:23 |
|
Hughmoris posted:Anyone need an extra set of novice hands for an open source project? I can't think of any pet projects to create, and I'd like to take a stab at contributing to a meaningful project. It can be your project, or someone else's project that you're contributing to. Dominoes fucked around with this message at 05:53 on Feb 21, 2021 |
# ¿ Feb 21, 2021 05:33 |
|
I'm kind of drunk, but it looks like you're trying to overload functions in Python. Don't do that.
|
# ¿ Feb 22, 2021 22:35 |
|
Rocko Bonaparte posted:Has anybody here gotten on to the Python machine learning train? If you're trying to solve a practical problem, consider a decision tree.
|
# ¿ Mar 10, 2021 01:02 |
|
QuarkJets posted:"Trap" maybe isn't the right word when machine learning experts are in massive demand and are actually solving unique problems that haven't been easily solvable by classical methods. There's definitely a lot of hype present, but it's also just a really useful tool, like learning how to use Docker or CUDA Rocko Bonaparte posted:Somebody called you out on this but it doesn't mean you're wrong either. I'm doing some expeditionary stuff at work because it's politically vogue to try to hit some of our problems with some machine learning. When I heard about it, I first thought about what exactly they're trying to accomplish in even the most basic terms of inputs and outputs. Nobody really knows and that's a warning sign. But since I was the idiot that tried to use neuroevolution for stock market stuff a decade ago, I'm wading through it myself. I suspect there are machine learning solutions to these particular problems; my general take on if its possible is if I can model a situation and "see" a solution but it's particularly difficult to outright code the solution in a contemporary way. However, if I can code an assessment of success then I have a fitness function and "I'm halfway there" (fighting non-linearity in the model sounds like what will take the remaining 50% of effort until it expands to 99% of the effort...). We're on the same page. I'm opportunistic ML and AI techniques will transform our world, and we're gradually getting there. In their current form, I'm not convinced ANNs, SVMs etc are good fits for many problems. There are exceptions, like image recognition. There's enough noise today that I'd guess a random mention of ML or AI (especially a press release, job description, business plan, resume etc) is full of it; I've updated my priors. You can classify a decision tree as ML if you want, or not. It's an easy-to-grasp, but powerful tool for creating complex behavior. If you'd like to get into ML, carefully consider why first. Would this have been appealing 5 years ago? Dominoes fucked around with this message at 00:00 on Mar 12, 2021 |
# ¿ Mar 11, 2021 23:55 |
|
I don't have a reason to draw a line; categorization is a tool you can apply to a problem. Maybe you have a reason to draw a line for DTs as ML or not. In the same sense, choose a tool suitable for the problem you're working with. Maybe it's something categorized as ML. I reject xhoosing ML when it's the wrong tool.
|
# ¿ Mar 12, 2021 00:25 |
|
I don't know how feasible this is for your use case, but I agree - Pandas can be a performance bottleneck. You're working with strings instead of numbers, but when working with numbers, using numpy arrays (which IIRC it wraps) is OOMs faster.
|
# ¿ Mar 13, 2021 17:43 |
|
|
# ¿ May 16, 2024 22:20 |
|
Foxfire_ posted:Your underlying problem is more that pandas in general is trying to optimize for person-time writing code at the expense of being very slow and using lots of RAM. Generally that's a good assumption, but not here if you have too much stuff and are going to run it a lot. pandas is also horrible at strings since the underlying actual things being stored is arrays of PyObject pointers to full python objects elsewhere.
|
# ¿ Mar 14, 2021 06:04 |