|
image_slice = numpy_image[150:220, 130:250]
When slicing a numpy image, the bounds are inclusive and indexing starts from 1.
array_slice = array[0:2]
When slicing a Python array the end bound is exclusive and indexing starts from 0.
What could possibly go wrong?
cheers
Chris Maunder
|
|
|
|
|
Seems quite logical to me, Captain. 
|
|
|
|
|
This is why a language needs to be designed by a committee. 
|
|
|
|
|
Exactly the same with the functions in Transact-SQL. These people don't know their zeroes. You need to be careful in the Muggle World.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
|
VB's WithEvents is jealous.
Jeremy Falcon
|
|
|
|
|
What languages, wishlists do you have for your favorite programming languages?
C and where applicable, C++:
preprocessor definitions that are private to the actual (in this case header) file they are contained in.
namespaces that are private to their header.
and/or a standard way to separate the implementation of templates into a cpp file
a way to predeclare templates (not template instantiations) such that you can access them before they are defined.
C#:
Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Some of your desiderata can already be approximated in C++, at least.
honey the codewitch wrote: preprocessor definitions that are private to the actual (in this case header) file they are contained in.
With the exception of conditional compilation, I have little use for the preprocessor in C++. Defining an anonymous namespace inside a named namespace will allow scoping of C++ (not preprocessor) definitions even in a header file.
honey the codewitch wrote: namespaces that are private to their header.
You already have something close to this in C++ - define a namespace in the header with an anonymous internal namespace. Only functions declared in the (named) namespace may access the definitions in the anonymous namespace.
namespace foo
{
namespace
{
int bar();
}
}
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
How did I not know about that?
Thanks!
To err is human. Fortune favors the monsters.
|
|
|
|
|
honey the codewitch wrote: you can create code generation facilities that introduce new keywords into the language
This will be a nightmare for code maintenance. It's hard enough keeping code sensible so that any dev can step in and understand and safely maintain it, what with all the syntactic sugar being added. Allowing this to be non-standard and ad-hoc will just massively increase the surface area of confusion.
cheers
Chris Maunder
|
|
|
|
|
In C# and C++ an "in" and "!in" operators. For example, if we have"
if(var1 == param1 || var1 == param2 || !(var1 == param3))
{
}
to be able to translate to:
if(var1 in (param1, param2, !param3))
{
}
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
Early growth key that is bird (6)
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Early growth = BUD
Key = G
That is = IE
Bird = BUDGIE
|
|
|
|
|
Good man YAUT
nice to see a different solver
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
I was trying to justify the OON for KEY in GOONIE!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
you've lost me there
Edit
I see your thought process now
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
modified 5hrs 5mins ago.
|
|
|
|
|
It's a good thing G as early growth didn't occur to me or I'd still be working on it.
I spent a fair bit of time on "magpie" but magp went nowhere. 
|
|
|
|
|
Wordle 592 3/6
🟩🟨⬛⬛⬛
🟩⬛⬛🟩⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 592 3/6
🟩⬛🟩⬛⬛
🟩🟩🟩⬛⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 592 4/6
⬜🟨⬜⬜⬜
🟨⬜🟩⬜🟨
🟩⬜🟩🟨⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 592 4/6
⬜⬜⬜🟨⬜
🟩⬜🟩⬜⬜
🟩⬜🟩⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 592 3/6*
⬜⬜🟩🟨⬜
🟨⬜🟩⬜🟨
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 592 4/6
⬛⬛⬛🟩⬛
⬛🟨⬛⬛⬛
⬛⬛🟨⬛🟨
🟩🟩🟩🟩🟩
I needed the full roster of starters but after that it's been almost immediate. I'd really like an official chronometer for Wordle speedrunning.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Wordle 592 5/6
⬜⬜⬜⬜🟨
⬜⬜🟨🟩⬜
🟩⬜🟩🟩⬜
🟩⬜🟩🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 592 3/6*
⬜⬜⬜⬜🟨
🟩🟨🟩⬜⬜
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|