« first day (3700 days earlier)      last day (1231 days later) » 
00:00 - 22:0022:00 - 00:00

12:27 AM
@Kevin don't sit on the floor. They might mistake you for ground beef
 
12:50 AM
hello
hi, does anyone know how pytest find django INSTALLED_APPS?
 
 
1 hour later…
2:15 AM
@holdenweb that's what I typically do, however I find the bare return kind of weird so just going with return None wherever just return would suffice
 
 
5 hours later…
7:20 AM
hello, i want to ask, that I have anaconda installed and wish to install tensorflow 2.3. But for it I must have python 3.8, currently i have python 3.9 in my environment. What should I do to remove that python and install 3.8?
 
the problem is when i do conda install pip, it installs python3.9 also
ok i did conda install python=3.8 and it downgraded, thanks
 
you can thank by upvoting the question and the answer if it helped you, not me
 
 
3 hours later…
10:22 AM
what should a master branch be tracking? The latest stable release? At least that's what I thought, but ros seems to have master on an old stable release, which is kinda confusing
 
Hi everyone, would someone be able to explain me why collections.UserList's methods are empty (all contain "...") but they still happen to do something?
 
@Hakaishin There is no fixed rule. You might want to look for "gitlab flow" and "github flow" as common usage rules.
@Theo Are you sure that you are looking at the actual implementation?
... is a placeholder used for function bodies in stub files.
 
No indeed it is only the init of the collections package, i might have to go further, didn't think about it, thanks a lot :)
 
some IDEs such as PyCharm will also often send you to the stub file, even if there is an implementation. Quite annoying.
 
That's exactly where i come from, I'am actually struggling quiet a bit to find the implementation.
 
10:33 AM
IIRC they fixed that in a newer version, you might want to upgrade if you are not up to date.
I'm on 2020.1.4 and ⌘ [LMB] on UserList sends me straight to the implementation.
 
2019.1.4, that might explain it. Thank you!
Do you know if we can we easily find those implementations online ?
 
You can search the github CPython repo, but frankly that's not easy to navigate.
Showing you code is the IDE's job.
 
@jeea You can have multiple Python environments under conda. For example, py38, py39, py27 or whatever you want. Useful for compatibility. Can't always assume every package is compatible with the latest from 'conda update'; also 'conda update' is quite brittle.
FYI just found out about regex (*SKIP)(*FAIL) which are to consume characters that you want to avoid, and that must not be a part of the match result. How do (*SKIP) or (*F) work on regex? and today's example How to match “have”, but not “had”
 
10:52 AM
Does anybody know how terminator implements infinite scrollback?
 
user14638035
11:13 AM
Is it possible to use tkinkter for making inputs where the user should answer questions and get out a answer depending on what he/she answered?
 
Why wouldn't it be?
 
11:25 AM
cabbage
More details @Hakaishin, please
 
user14520680
@Carl-ErikPettersson I don't use that much tkinter but the logic is easy
 
Why don't you edit your question with code that can be executed @Carl-ErikPettersson
 
Oof, there's no saving that question. That's just "Can someone teach me tkinter?" in a very bad disguise
 
There in truth in your comment @Aran-Fey :/
Darn, I don't remember the close qn tag!
 
[tag:cv-pls]
I think
 
11:35 AM
Thanks, yes, I found it in the sopython chatroom - too late to edit I am afraid.
 
@ReblochonMasque gnometerminator.blogspot.com and askubuntu.com/questions/618464/unlimited-scroll-in-terminator I just wonder if it writes all output to a file which never gets cleaned? And if I run my system for a long time with much terminal output it will use a sizable portion of my disk space or if it is saved in memory or something else?
 
@Hakaishin The man page implies that RAM is used for the scrollback buffer.
"scrollback_infinite If this is set to True, scrollback_lines will be ignored and VTE will continue to allocate RAM for scrollback history. Default value: False"
 
user14638035
@ReblochonMasque for example like this:
 
user14638035
a = int(input("How old are you?"))

if a > 70:
   print ("You are old")
if a < 18:
   print ("You are young")
else:
   print (":)")
 
user14638035
But inside the tkinkter window and the outputs should come in the tkinkter as a label
 
11:53 AM
This is the code from the question that was closed - you should probably start with import tkinter as tk, then create a root, put a Label, and an Entry widget, and retrieve the value from the Entry
Maybe start here
 
12:10 PM
@MisterMiyagi Hmm interesting, thanks for the find
 
12:43 PM
"ros2 comes with full built python support for it's commands!" Ugh, well if you call that python support, than anything has python support
import launch


def generate_launch_description():
    return launch.LaunchDescription([
        launch.actions.ExecuteProcess(
            cmd=['ros2', 'bag', 'record', '-a'],
            output='screen'
        )
    ])
 
user14638035
@ReblochonMasque Okey sir thanks
 
Is it possible to make a python script where you can paste multi-line text as an argument through the command line (windows, but i'd like it to be cross-platform)?
 
oh wait, sorry multiline text as cmd? why not just use a file?
configargparse can't do that I think, atleast I never tried
 
well just to speed things up
its meant to be a tool to assist with manual data entry
to convert from one format to another
 
why can't it take a file as input?
 
12:50 PM
it could, its just it'd take longer, because the user would need to create and save the file
 
I don't know the workflow, but I think making a cmd tool take multi line input is some work and just using a file seems simple. But yeah I guess if you want to do this often it might be worth
 
i could make it read from the clipboard, i guess
 
But then again I would go with a flask app with some input fields instead of a cmd application no?
 
but i think its cleaner to make it read from stdin
it could be a gui, yeah
 
@Hiccup can you clarify what you are trying to do? Python has no problem receiving multi-line arguments.
@Hiccup do you actually want to read arguments (provided at launch) or stdin (provided at runtime)?
 
12:53 PM
the purpose of the program is to take some sort-of machine readable (but inconsistent) data from a forum post, email or similar, then convert it to explicit machine readable data, for import into a database
so basically its just something to assist someone with data entry (copy from forum/email > paste in database website)
 
sorry, I meant from a technical standpoint
well, actually, "what have you tried to pass multi-line arguments and what makes you think it doesn't work?" to make it a proper question ^^
 
well, basically i want the script to get the input data using argv
when i try that, it only receives the first line of the text i paste
 
Ah. You are likely mishandling your shell, not Python.
e.g. on bash to pass a multiline string, you must quote it.
 
hmm, yeah it could be shell specific thing
well i'm on windows, but i'll try quoting, and that ( bracket thing
quoting does work in bash (msys), but not in windows cmd
and quoting requires you to add a quote to the end of the string, which means you have to put it into a text editor, which slows things down
using brackets like with multi-command input in bash doesn't work (unsurprisingly)
 
> so basically its just something to assist someone with data entry (copy from forum/email > paste in database website
Using stdin would make a lot more sense for that
 
1:02 PM
well, to assist me
as in, post-execution of the script?
 
Passing data via command line args sounds weird and error-prone
 
yeah i think this is a limitation of bash and cmd that can't be overcome
 
Even in bash data could contain quotes that breaks everything
Let alone rm -rf
 
good point
 
@Hiccup wrong tool for the job
Use stdin (or a file; same thing)
 
Sam
1:03 PM
When using a MagicMock object.. I can inspect the call stack via its mock_calls attribute which is a list of _Call objects. Is it possible to test that one of the _Call objects contained in this list are called with the correct parameters?
I can do it by casting the _Call object to a string and doing a basic assertion but wondering if there are more native ways.
 
so yeah, stdin seems like the next closest thing, so i'll try that
thanks
 
@Sam you can create call objects yourself and use assert my_call in my_mock.mock_calls
 
Sam
Ahh OK. I guess the _Call objects also themselves contain a dict object which highlights the arguments.. Thanks, I can roll with your approach, seems a little less hacky :)
 
1:35 PM
Hi everyone
I have a doubt regarding a tool known as 'Mandrill'. i am currently trying to get all data related to a particular tag with their Python API but am not able to do so.
This is the only link that I could come up with a google search :superuser.com/questions/914819/…
Since this is not a pure python question its ok if anybody doesn't know
However if someone knows something about this or can direct me to some place/link better please do so, it will be highly appreciated
The problem I am facing is regarding the number of records. I am not able to fetch more than 1000 records but we have data for a single day exceeding 5k records.
 
"not able to fetch more than 1000 records" sounds like an API restriction
 
Yeah its written in the second link. Is there no way I can bypass this and get the data?
 
ah, got it
> the maximum number of results to return, defaults to 100, 1000 is the maximum
It also says
> This method may be called up to 20 times per minute
presumably you have to make mulitple queries
for what it's worth your first link sounds spot-on
 
@AndrasDeak so basically its like a random sample of 1000?
@AndrasDeak was of no use though :(
 
@RaphX I would expect it to be sorted with some well-defined criterion, but I don't know web stuff and I don't know how you can ask for "the next 1000". Perhaps making the same query would give you 1000 different results... or the same 1000. I suspect this should be specified in their docs. The fact that their examples are python 2 doesn't spark confidence.
 
1:51 PM
@Sam On re-reading my answer, it looks a bit curt. To be on the safe side, this is what I mean:
>>> from unittest.mock import MagicMock, call
>>> m = MagicMock()
>>> m.foo('bar', baz="qux")
<MagicMock name='mock.foo()' id='140206914271792'>
>>> assert call('bar', baz="qux") in m.foo.mock_calls  # no AssertionError
 
I guess I will just extract the unique data points from two or more calls and then find out, thanks anyway @AndrasDeak
 
Others who know web stuff might be able to help though
 
 
1 hour later…
3:22 PM
Hmm, love to spend six hours troubleshooting a PC problem only to discover that the last remaining recommendation is "reinstall windows"
I bet Linux users never have to deal with fatal errors when upgrading their .NET framework
 
@RaphX what Andras said, it should be sorted by either a default or something that you can pass in the query (not sure if the API supports). What you can try for paginating the results is, basically, work on different time durations (date ranges) and increase limit to max (1000). I don't see any other way out by a quick glance.
scratch that, you said your stuff exceeds 5k in a single day, so I am not so hopeful now.
 
@Kevin The union of "upgrading my .NET framework" and "fatal errors" is empty, indeed.
 
What really rustles my jimmies is that I only need the new framework because I tried upgrading a critical piece of software and it said "sorry, the new version depends on .NET framework 4.8. Also, we took the liberty of uninstalling the previous version of ourselves that was working fine"
 
I'm streaming Advent of Code day 2: twitch.tv/davidism
 
@Kevin Of course. Why would you want to use a dated, working version when you could be using a new, non-existent version?
 
3:32 PM
I'm cry
At least the software is only moderately critical. The catastrophe that occurs if I don't have it only happens after the backlog fills up in 14 days or so
 
@MisterMiyagi you talking about ros2? ;)
 
Ample time to take a road trip to their headquarters and introduce them to my cluebat
 
@Kevin You're not in pre-X-mass feature freeze mode then, I take it?
 
We don't do a freeze per se although mgmt does take into account the likelihood that there will be many fewer man hours to spend
 
user14596741
Hey guys, how is github or stackoverflow profile picture made?
It is unique ever time the new use, How can i get those image datasets? :)
 
3:46 PM
@edward it's called an identicon
 
@Kevin Mgmt is also pretty enthusiastic here on fiddling with both our network and load balancers. Reminding them of the last time we did this before vacation season is a solid argument, though.
 
user14596741
:) Thank yuo @Arne :)
 
user14596741
:) bye guys :)
 
Hey people!
I've a small doubt regarding how \n works in Python.
This is my code:
c1 = "1. Append an element"
c2 = "2. Insert an element at the desired position"
c3 = "3. Append a list to the given list"
c4 = "4. Modify an existing element"
c5 = "5. Delete an existing element by its position"
c6 = "6. Delete an existing element by its value"
c7 = "7. Sort the list in ascending order"
c8 = "8. Sort the list in descending order"
c9 = "9. Display the list"

print(c1,"\n",c2,"\n",c3,"\n",c4,"\n",c5,"\n",c6,"\n",c7,"\n",c8,"\n",c9)
This is the output:
1. Append an element
 2. Insert an element at the desired position
 3. Append a list to the given list
 4. Modify an existing element
 5. Delete an existing element by its position
 6. Delete an existing element by its value
 7. Sort the list in ascending order
 8. Sort the list in descending order
 9. Display the list
As we can see, the indentation of the output is odd.
 
@technastic_tc that's not because of \n but because print adds a space between its arguments
perhaps you want to put those strings in a list and put that list in '\n'.join()
 
3:55 PM
@AndrasDeak So, what should I do avoid the space?
 
Laziest possible solution: change the commas in your print call to plusses
Consider also using a single multiline string rather than nine individual strings
 
or add sep='' to the print call, but that's also a bad workaround
 
@Kevin I don't want to concatenate. But thanks for suggestion.
 
Dang Andras out-lazied me
A six character solution against my nine
 
user14638035
Hi! Does anyone know how I can handle that for example if a textfile is supposed to be written with strings but I change it to int then I dont want the program to work? I have a text file where I have taken all the information from and placed it in a list where I then give the attributes of a class each coloumn for each attribute
 
3:56 PM
@AndrasDeak I have no clue what the join() works..
@Kevin That'll be tough to manage right? Is there any way to do it neatly?
 
c = """\
1. Append an element
2. Insert an element at the desired position
3. Append a list to the given list
4. Modify an existing element
5. Delete an existing element by its position
6. Delete an existing element by its value
7. Sort the list in ascending order
8. Sort the list in descending order
9. Display the list"""

print(c)
 
"""" means comment right?
 
In some scenarios, but not all
 
@Kevin ok!
 
triple quoted strings are often used to provide multi-line documentation for functions, but they are also valid strings
 
4:00 PM
@Kevin oh.. ok..
@Kevin If you can, please share any relevant article.
 
Ok: docs.python.org/3/tutorial/introduction.html#strings "String literals can span multiple lines. One way is using triple-quotes"
And docs.python.org/3/tutorial/controlflow.html#defining-functions talks about using string literals as docstrings
 
@Kevin MacOS users get a reasonably trouble-free upgrade path, with smooth migration from machine to machine. To me, that (and the consistently high-quality support) are well worth the extra money, though I understand not everyone can make the same choices and others have their own justifications for their choices.
 
@davidism Thanks for sharing
I'm still working on my solution because I misread the prompt three times in a row, and then decided to use regex
 
Ah, you were watching me complain about types? Thanks :-)
I always try to use partition or split instead of regex.
I need to record some of my stream too, I have no idea about volume, especially when I put on music.
 
4:17 PM
When it comes to parsing in general, me too. But for AOC specifically, regexing out the input is usually pretty painless
... Except on day 2 when you still have 330 days of rust accumulated
The volume was fine on my end
 
It feels way better to put aside an hour in the morning rather than stressing about solving when it comes out at 9pm.
 
Yeah, I have more fun taking my time and intentionally embellishing my solutions a bit. Speedruns give me a stomach ache.
 
 
1 hour later…
5:24 PM
@Kevin Is it ok to ask my question in SO or will it be closed?
 
Regarding a recent discussion about the meaning of "monkey patching", I just found this in the docs of scipy.integrate.solve_ivp:
> The terminal and direction fields of an event are applied by monkey patching a function.
where they are referring to setting function attributes that didn't exist before
 
@Kevin Is the backward slash needed?
 
@technastic_tc the question of "why are my lines being indented?" would probably get closed as a duplicate, since people have probably had that problem before
The backslash is there to indicate that the first newline (between the start of the string and "1.") should be ignored. If you remove it, your output will have an additional newline.
 
@Kevin oh.. please share those posts if you can.
 
Why? You already know how to solve your problem.
 
5:33 PM
@Kevin oh..ok
@Kevin I just wanted to post my first question here.. but anyway, as you say, it'll be a duplicate
 
@Kevin Technically, doctrings are only commentary when optimised away ... there I go picking nits again. When will I learn?
 
:-)
Indeed, CPython is pretty good at ignoring string literal expression statements as it compiles one's program to bytecode, but you can't be sure that will happen in other distributions
 
@technastic_tc Another option, which does not negate @Kevin's sound advice but can be useful when you do have a list of strings: print(c1, c2, ... , c9, sep='\n')
There really is no need for all those literal newlines :-)
@Kevin Do they ignore non-assigned f-strings? They can have side effects, so I'm guessing not.
 
@holdenweb Ok!
 
@technastic_tc Generally an experienced programmer tends to see a list of things and think "I'll need to treat those all the same" or "I need to operate on that list". But at first it's hard to see the forest for the trees.
 
5:44 PM
@holdenweb I'm sorry, I didn't get you.
 
My guess is that f strings don't get optimized away. I'm currently ten layers deep into the compiler source trying to find a concrete answer
 
All I'm saying is, an experienced programmer would get as far as
c2 =
before thinking "maybe I need a list here".
 
@holdenweb So you mean.. I should be using a list which consists of variables whose values are strings?
 
I think github.com/python/cpython/blob/… is the peephole optimizer. I don't see anything relating to string literals (I would have expected it in the LOAD_CONST section), so I'm guessing useless strings get filtered out earlier than this
Open question: do unused string literals still get added to the const table?
@technastic_tc Better yet, use a list that contains string literals rather than variables
#bad
c1 = "foo"
c2 = "bar"
c3 = "baz"
seq = [c1, c2, c3]

#good
seq = ["foo", "bar", "baz"]
 
Got it!
 
5:50 PM
99% of the time, if you have a variable that has a digit in its name, you're making things harder for yourself
 
But when we print lists, it looks different..
The brackets will be shown..
 
That's what join is for :-)
 
@Kevin oh..
 
2 hours ago, by Andras Deak
perhaps you want to put those strings in a list and put that list in '\n'.join()
 
:finger pointing up emoticon:
 
5:51 PM
2 hours ago, by technastic_tc
@AndrasDeak I have no clue what the join() works..
so we settled on that outcome
 
I need to research about join..
 
Now there's a good idea :)
 
@technastic_tc Well, ii I needed a list (you don't) I'd probably just take the splitlines() of a long triple-quoted string. I have an aversion, being a crappy typist, to certain typing.
 
it's str.join
 
join is strong, and good, and my friend
 
5:53 PM
@holdenweb that would also prevent missing commas from mangling the list contents
 
@holdenweb what are splitlines?
 
@technastic_tc str.splitlines method
You should probably read about strings in a tutorial, then/or in the documentation
 
Yeah, strings have lots of interesting method (including join).
 
the w3 schools page says that join will add items into one string. Then the output will again look like a para instead of numbering right?
@AndrasDeak It would be great if you (or someone) can please share some basic tutorial.
 
Ah ha. /* ignore constant statement */. The compiler never even bothers to add a LOAD_CONST in the first place for constant expression statements.
 
5:56 PM
2 hours ago, by Kevin
Ok: https://docs.python.org/3/tutorial/introduction.html#strings "String literals can span multiple lines. One way is using triple-quotes"
ask and the Kevin giveth
 
I did read the documentation..
 
Rather, it adds NOP, which is short for "nope, not doing that"
 
But it's too lengthy and complex IMO
 
@technastic_tc yyyyeah, good luck
 
How about some Youtube tutorials?
 
5:57 PM
@technastic_tc good luck squared :)
 
@AndrasDeak :)
 
My attention span is far too short for youtube tutorials
Halfway through "remember to like comment and subscribe" I'm already looking at memes on my phone
 
they are also typically useless and/or harmful, so no problem
 
@Kevin lol
 
Text tutorials are much better, I can ctrl-f for the good parts
 
6:00 PM
@Kevin but the python documentation is kinda boring..
any other any text based tutorials?
 
@technastic_tc one with colourful pictures, preferably? :)
 
Anything but W3schools, who I am forever mad at because they ignored my email
 
and realpython :P
 
@Kevin oh..
@AndrasDeak :)
Is this code correct?
 
Of course if you want to do it the hard way there's a text ...
 
6:02 PM
And avoid any tutorials that start with print "Hello, World!" (that is, Python 2 syntax - no ()s on print).
 
choice = [
"1. Append an element",
"2. Insert an element at the desired position",
"3. Append a list to the given list",
"4. Modify an existing element",
"5. Delete an existing element by its position",
"6. Delete an existing element by its value",
"7. Sort the list in ascending order",
"8. Sort the list in descending order",
"9. Display the list"]

print(\n.join(choice))
@PaulMcG sure :)
 
Would work, but why a list?
 
@technastic_tc does it do what you want or does it not?
 
Well what happens when you enter that in the Python console?
 
also you need "\n".join ...
 
6:03 PM
@holdenweb unless they want a syntax error
 
:)
 
@PaulMcG Error: unexpected character after line continuation error
In script mode..
 
Hmmm, what could that mean?
 
See remarks above ...
 
@holdenweb Oh.. ok!
 
6:04 PM
@holdenweb It seems that f-strings are never optimized away, not even if they contain no evaluatable bits in curly brackets. The AST sticks a JoinedStr node between the Expr and Constant nodes, so the compiler doesn't consider it a constant expression statement.
 
OK, at least that's moderately cryptic for a green bean
 
@Kevin Figures.
 
I expect this is something that they could optimize, but it would take ten million years to save more time than they spend implementing it
 
@holdenweb That worked :)
 
SInce your \n was not in quotes, the interpreter thought that the `\` character was doing a line continuation (as if the next line was just a continuation of the current one). Line continuations shouldn't have anything else on the line after them.
 
6:06 PM
@PaulMcG double backslash outside backticks works
 
@PaulMcG ok!
 
@AndrasDeak Probably pretty googlable though. (Not an excuse for a bad error message, but learning to google for errors is a good lesson)
 
Thanks for all the help people! Wish you all good life :)
 
@PaulMcG is there a solution on instagram?
 
Million dollar idea: six second tutorials on TikTok
 
6:10 PM
 
because youtube is so 2019
 
I yell "use spaces when indenting!" and smash a full gallon of milk on the grocery store floor
 
Kevin's on point with tiktok though
 
Wow, that is one ugly URL, Google!
 
Next up: recursion and a backflip that goes painfully wrong
 
6:13 PM
nvm, I get why referrals to IG and TikTok
 
@Kevin Yeah. why bother. It only works for f-strings with no expressions anyway, I'd say not attempting that optimisation was a sound decision.
 
How do you know that f-string evaluation was not inserted as a timing delay?
 
How dare you make me read that sentence with my own eyes
 
@Kevin I'm in!
Imagine "Stop writing classes" in six-second bites ...
@PaulMcG Very beazlyesque.
 
We have an opening in our pyrotechnics department. Remember, you don't need to prevent all injuries, just ones that can't be fixed with a month's supply of aloe
The algorithm demands that I get hit in the groin by a flaming projectile at least once per quarter
 
6:17 PM
I've only met dabeaz once, but we had a nice brief chat
 
I hope you still have your flamewar underwear ...
Yeah, Dave's a nice guy. Very approachable and down-to-earth for a total brainbox.
 
I'll CC the wardrobe department about that
 
@Kevin Speaking of which, I just watched this 12-minute forensic analysis on the Beirut port explosion: youtu.be/-mQ60wNgKrQ
 
Ooh, 3d data extrapolation from photographs 👀
 
While looking for tutorial channels for pyparsing, I found this concept: www.arist.com You set up your "class" as a once/day text message. Several success stories on their site, but I can't get my head around doing any kind of programming learning that way.
I usually watch YT videos at 1.25X or 1.5X speed, but this one is 1X-worthy
 
6:26 PM
Semi-related thought: I wonder how hard it would be to model a solid if you only have information about its silhouette viewed from various angles
 
@Kevin keyword "tomography"
 
"The object looks like a square when viewed from above, and a circle when viewed from the front" would give you a cylinder for example
 
spoiler: it's hard
 
;_;
 
If you assume a solid solid it might be easier, I don't know. The (inverse?) Radon transform is key, I'm told.
 
6:29 PM
Perhaps it's easier if you have subtractive geometry tools. Then it's literally just "start with a cube, and carve off all the bits that don't match the photo"
 
I think this is a solved problem (or at least an old one) - in my freshman year in engineering school, the most difficult physics lab was the scattering lab, in which we had an unknown shape inside a circular drum, and impact paper around the sides of the drum. Through a sealed hole, we could fire steel pellets at the object from different locations, and from the patterns on the impact paper, we had to determine the shape of the object.
 
This is all assuming that the viewer is effectively infinity units away from the solid, so you don't have to do perspective math
 
Kind of a reverse ray-tracing thing?
 
Essentially yeah
 
The lab instructions had you use 'n' pellets per position, which was not really enough. Those that actually made any headway used 10X the number of pellets, so that they had much better resolution - cheaters!
Rbrb a bit, I've been called for lunch
 
6:37 PM
One problem is that multiple solids can have identical silhouettes, even if you take snapshots from multiple angles. Cylinders and rectangular prisms look identical from the front and side, for example.
 
@Kevin There's probably a second left to smash-cut to someone crying over the spilled milk with a handy "-> didn't listen" label
 
Teens love smash cuts so we'll have lots of them
 
Ugg, I'm stuck with some issues with pybind11, have you folks ever tried that library?
 
Nope
 
Is boost::python any better?
 
7:36 PM
@Kevin I just visited their github repo, lots of interesting Python code there
 
Did not watch the video in question but if you take a series of high resolution images of any object from many vantage points and angles, then feed those into Open Drone Map you will get a very nice 3d model right out of the box.
My test case for non mapping 3d reconstruction was a Coke can on my kitchen floor and about 45 images. It looked darn good
 
8:22 PM
@Mikhail The last corp I was at tried playing around with it, with the goal that a de-facto archived C++ project "could be maintained in python without re-implementing it". I think efforts were scratched after about half a year
the consensus was that they wished they'd just re-implemented it. So, that's my anecdote.
 
Yeah, although just maintaining the C++ doesn't sound that bad
I'm moving a large code base to C++ and I really hate Python :-)
Spent a day on a missing init causing memory corruption, but in C++ we'd just have the constructor implicitly called
 
__init__ isn't the constructor, __new__ is ;-)
we would have just maintained the C++ code, but people who know it are kinda rare and expensive, while python devs are a dime a dozen.
 
8:58 PM
Does anyone know how sorted(d, key=d.get) sorts dictonary d by key?
specifically the key=d.get
 
actually that sorts by value
 
Oh yeah. how would i sort by key? do i just do key=d?
 
just sorted(d)
 
ok how would i sort by the 1st index of tuple if the key is a tuple. like (1,2):[1,2,3]
 
Well, with an appropriate key function. Any ideas?
 
9:06 PM
@Aran-Fey its something with lambda. but I cant get it
 
Do you understand how that lambda is used? What the argument for the lambda is?
 
yes
 
And you know how to grab the 1st element of a tuple?
 
no
 
Well, off to read a python tutorial you go
 
9:09 PM
sorted(d, key=lambda x:x[1])
 
that'll give you the 2nd element, but close enough
 
x[0][1]?
 
no...
 
9:24 PM
@Dsafds if you intend to ask for help here, take Aran's suggestion about reading a tutorial very seriously, Amanuel
 
@Dsafds 1 is the index of the second element. What index does the first element have?
 
9:52 PM
is there a flag you can pass when calling a python script to use a different working directory then the file you call. In one the team work environment whenever your main file it gets referenced to the project root folder so if I'm check out code to do refactoring in VSCode the files I run have theirs imports done relative to their location. I have to manually go back and fix them and then break it again pre-push otherwise (and hope the code runs without being able to test it).
 
00:00 - 22:0022:00 - 00:00

« first day (3700 days earlier)      last day (1231 days later) »