« first day (4010 days earlier)      last day (1163 days later) » 
01:00 - 23:0023:00 - 00:00

01:22
w00t
Woot woot
Hey guys does anybody know how to define function or methods for a class dynamically at creation ?
what I mean is,for example to do:
class A():
def __init__(self,n):
self.n=n
def fillclass(self):
for i in range(n):
[create a function named function_n that prints n]
sorry, function_i that prints i
02:22
@user3458909 It's possible to do that, but it's not good design. See Keep data out of your variable names.
Are you sure you need n different functions? Why not a single function that takes n as an arg?
Here's an example that dynamically makes a dict of functions. This could be adapted to make instance methods named function_i, but I strongly advise against doing that.
02:57
stackoverflow.com/questions/69489441/… is this just a typo? OP tells "breaking the server" when all I can see is a syntax error with a extra ')' msg = s.recvfrom(82))
03:07
@python_user It might be a typo in the question, but not the actual code. However, that code uses port 82, which is <1024, so it requires root privileges on a sane OS.
I didnt know about the < 1024, thought sockets needed root, I just run with sudo when I got an error :/
03:22
@python_user It's better to avoid those low number ports, unless you actually need them. That way you can safely run your code as a normal user.
thanks for the link, pretty detailed info there
Hete's some relevant discussion re the security implications of using the low number ports: serverfault.com/q/112795
"look at the source code for Apache or Lighttpd or something similar, where they use the root privileges to open up the port, but then immediately give up those privs and "become" a lower privileged user so that a hijacker can't take over your whole computer."
03:38
also didnt know "giving up" privileges is possible
I should look into networking basics one of these days, that is a huge gap for me
 
1 hour later…
04:58
@PM2Ring Basically I'm defining this class to have some variables that are linked to some widgets in ipywidget. I am not a black belt by any chance here, but as I understand it when you interact with a widget i need to call a specific function with the observe method, so i need either N functions with different names or N linker functions to link to one updater function that takes N as a variable.
sorry for the messed up english but i am pretty brainmelted here :P
05:50
@PM2Ring Loving how the first few comments are locals and exec hacks. 😂
@user3458909 There still shouldn't be a need to define separate, named functions like this. Many frameworks using callbacks allow you to also specify the arguments with which to call functions. For those that don't, you can use a lambda expression or functools.partial to create the "function n" variants as needed.
Looking at the ipywidget docs, you want a method/function like def function(n, change): print(n) and register it to observe like my_widget.observe(lambda change: function(n, change), "some_trait").
06:32
I am actually trying to do it semi properly right now, but my head is exploding. The real problem is that I don't understand the damn observe function enough, If i could pass n along with change everything would be so much easier.
Your my_widget.observe(lambda change: function(n, change), "some_trait") seems to be some kind of workaround to do exactly that, but I'm not sure what exactly it is doing
Have you worked with lambda expressions before?
:53190392
@MisterMiyagi very briefly, i just know that is used to apply a function to variables and that it is used with pandas to apply an operation to series or dataframes
Okay, so all that lambda does is that it allows you to create a function as part of an expression. The primary use-case for that is to create a function purpose-built for a specific call without having to prepare it in advance.
E.g. in your case, you need a function for each observe call but – as PM pointed out – it's not really suitable to create all of these up-front.
For the record, these two are practically equivalent:
# named function via def statement
def named(change):
     return function(n, change)
# unnamed function via lambda expression
lambda change: function(n, change)
So in this case, we create a new function that only receives a change – which allows using it with observe. Because that new function calls our old function with change and some n this behaves as-if we "told" observe to pass along n as well.
06:51
@MisterMiyagi Hmm so let me see if I understand. My problem is that a widget interactions generates only a change, not n and depending of which widget I am moving obviously n would be different. At the same time widget.observe deals only with one value, so i cannot tell widget1.observe(on_change(n)) .
So the lambda function is like a fitter in there that takes change but somehow has n . The way that it has n though is not really clear to me.

Like you writing:
def named(change):
return function(n, change)

where does n come from in that definition?
1 like = 1 prayer 1 upvote = 1 thanks
@MisterMiyagi You may need to do lambda change, n=n: function(n, change) if you don't want late binding
"Let me tell you about late binding" was going to be the next lesson. ^^
@user3458909 The same where n would come from if you had a hypothetical function_n instead.
So you might end up writing some explicit n there, like lambda change: function(42, change).
Or you have an explicitly n because you call observe inside another function, then you can just re-use it.
Caveat: As PM pointed out, lambdas bind names just like regularly defined functions – that means they only know the name, not the value at definition time. When n is defined in a loop, you should set it as a default argument.
In that SageCell example I posted earlier I did lambda a=i: a, so a is set to whatever value i had when the lambda was created. I could've written that as lambda i=i: i, but that may be more confusing than having two separate names, i & a
And we definitely don't need any more confusion XD I think I'm gonna watch some videos on lambda functions, cause it seems like kinda of a fundamental that i gotta understand.

I was trying instead to set a dictionary of widgets, and a dictionary of linker functions to update the values of a cdictionary of variables stored in a class .
07:06
@MisterMiyagi I tested with the sleep 20s command, didn't give an error. So definitely a resources issue. It might have something to do with running this through wsl, now will check on debian without the sleep 20s. But I'll need to implement something to check this error and re-run those packages.
Hm, I'm not sure if there is much you can do from inside the application. It's the OS equivalent of having a too small disk.
On a bare Linux (nor sure about WSL) the first place to look at would be ulimit and friends, not the application.
07:21
It should be due to wsl -- because its a 64gb, 8 core machine. I was thinking I'll do something crude like : read the stderr, check for this error with a regex pattern, fetch that package name and rerun it. I want the script to be able to run on any linux based system.
@MisterMiyagi I checked, ulimit is unlimited, and lsof report 1450 file count
arhghghg.... my machine has for some reason forgotten it's got a 2nd disk... I've had this before and it took a while to work out why and to find a simple shell command fix... can't remembmer what that command was or how I found it now arhghghgh
07:37
mount? :P
07:51
:p
might be worth a go but from what I recall it was something to do with power settings
meh... I'll do the turn it off and back on again thing once some number crunching has finished
08:28
ahhh... the power cable for the 2nd disk had come loose... (guessing when I moved the computer a bit last night I must have bumped it a bit or something and since it's a shoddy build - it didn't take that much for that to happen... sighs)
anyway - immediate problem solved - yay me laurel
 
2 hours later…
10:17
Morning
It's a global chat, everyone is not in a morning
Oooh... someone got out of the pedantic side of the bed today :p
pedantic
@AndyK morning cbg... how goes things?
howdy all
10:20
@JonClements busy, very busy. Learning a new framework, Tryton, a fork of Odoo.
@ABcDexter howdy
@AndyK sounds like "fun"... Odoo is quite the beast
How is everyone doing?
And going on hols, gave me other perspectives, that I need to plan about, fingers crossed that I will see the beginning of that plan in a few years
SSDD and all that - you?
@JonClements I agree, massive ramp up
10:22
I've just discovered Josh Hawley re: big tech and he goes in on them. It's almost as good as Judge Judy; I've fallen into a YouTube hole :/
Got a question but need to eat something before asking it or I will pass out
@JonClements haw about you? I have not seen you for a long time, none of you are forgotten, just have other people that I need to take care of first, now.
@AndyK always SSDD mate... good to see you about though... go get something to eat :p
10:35
Okay... so turns out the disk is fubar'd. it was fairly new and didn't have a huge amount of stuff on it anyway - hadn't gotten around to moving stuff across to it properly yet. Been able to pull down what was on it from archives... so haven't suffered any actual data loss. Just bloomin' frustrating is all.
Plus side - should be able to get a replacement under the warranty... it's only 2 months old and the "limited warranty" is 3 years. Could be I just got a duff one.
argh... guess I'm going to have to contact support to arrange a return and find the box and all that now... sighs
happy Friday everyone! :p
10:55
haha, happy friday puppers
I've noticed a number of questions recently that are trying to inspect the size of objects. I don't think this really was a concern much - is Python on some new embedded device? Even with an Arduino I don't think it'd be much of a concern?
@roganjosh it's funny you mention that - I got a populist badge the other day on some answer from goodness knows how long ago about object size stuff
it'd be nice if people didn't vote on stuff until it was winter bash time and I could get a hat from it :p
Funny indeed. It's almost like there might be some puppy pulling strings to drive that badge... :P
heh... wasn't even a terrific answer
ugh yeah... definitely not the greatest of answers - but hey - new shiny gold badge :p
One of them was actually quite interesting but I apparently closed the tab since, and it's wasn't from stdlib so it was really just a curiosity about some external library
Repeatable, though. I still have the code in my delete_me.py file so I should be able to surface it
11:12
Meh... here's me thinking 32 gold badges is perfectly reasonable and Jon Skeet has 804...
11:29
Not sure why I'm struggling to dig this question out but the code is here. Basically, the order that you print the sizes appears to matter (note I haven't done any digging, only run it, so it's possibly a misleading setup)
Deleted questions should still be indexed on Google I thought?
@roganjosh yes and no... they're not exposed in the sitemap anymore and Google special cases SO stuff...
they're likely in its archive but won't necessarily appear on actual searches
Were you looking for something?
I usually check my browser history when I want to revisit recent, interesting questions. Can you find it there?
The question that contained the code I've made a dpaste of. I thought there's be enough in that for me to get an exactly match but I don't seem to be able to do it, or from key search terms. I'm not sure I really care tbh, though it's now become a personal challenge
@MisterMiyagi Pow, thanks :) This question
3 Quatloos says their estimate will be wrong by three inches because of interning.
umm... __slots__ in a class that's @dataclass decorated...
11:42
My interest in this quirk is seemingly inversely proportional to the amount of pympler code I read :P
@JonClements 3.10 dataclasses have an option to auto-generate __slots__, which I'm surprised hasn't been advertised more
my gut feel would be that dataclasses wangle a bit with slots anyway... although thinking about it - I guess it couldn't as the class is still open to inheriting... ummm.
@AlexWaygood oh... that'd make sense
@AlexWaygood to be fair though... I'd take a punt that 99% of Python developers don't even know __slots__ is a thing... or even care that it's a thing or even need to ever consider using it as a thing :p
It's always been possible to manually specify __slots__ in a dataclass, like they're doing in ^that question, though in <=3.9 it breaks the dataclass if you try to specify a default value for an attribute, since you can't have a class attribute with the same name as a slotted attribute, and dataclasses use class attributes as a mechanism for giving attributes default values
@JonClements yeah probably. Wasn't a rebuttal of your point, just a tangential nugget of information!
and a beautiful nugget it was - thank you. Something I'll have to read up on/play with later.
Anyway @AlexWaygood - how's things... you seem to be popping in quite often these days... welcome...
The fun thing is that you can't add __slots__ to an already-defined class, so in order to auto-generate slots, the decorator chucks the class you've defined in the trash can and dynamically makes a new one just like it that has the specified slots github.com/python/cpython/blob/…
@JonClements thanks!
I'm alright, doing okay! It's a grey and rainy day here in the UK, but hey
11:56
Really? It's nice and sunny up here in Manc!
That's when you know something is wrong with our weather :P
Boo
Greater London is foggy af today
12:13
Question: my aim is the following, for any date, I want to be sure that after 7 days, based on any date, that the date is still in that range of date. Thinking about it, maybe I can use a dictionnary
Sorry, I don't understand any of that
I give you that example: Let's say I want to remember that today, the 8th of October, is the first day of
a 7 day period
In which case you could construct a list comprehension that adds a timedelta of days, or you could create a pandas date_range
If tomorrow, on the 9th, I'm checking again, I want to know that a day has passed and that I still have 6 more days. And if I'm checking in 4 days, I have 4 days that passed and I still have 3 days to go until there is no more days to go
Ok, so it's definitely a timedelta that you want
12:21
I'm still waiting for the question. ^^
I think we've probably had it. In which case this is the answer. Could be wrong, though
The thing is how to say that it stores the date like today is the 8th of November and that it is not using tomorrow as the starting date, all over again
I was wrong. Now I'm totally lost. This is not particularly computationally heavy stuff to compare datetimes (not cheap, but not too much). Are you now talking about database queries or something?
In fact, please just give a MCVE
if I set my date , today for example, I need to make sure that the 8th is set as a fix date
Thinking about it, I need a db. Things will not work without one.
A fixed date for what, though? It could be a class attribute, it could be a global variable in a script (which has no concept of "today" other than a fresh call to the datetime library when it gets run)
12:31
@roganjosh a fix date for when the item is given back like when you give back your car, today's date need to set as the return date
How have you been programming such a thing without a database?
we agree, it is not possible
Thank you
I still don't get why you don't just store the due date.
Should be pretty straightforward to check whether "now" is before or after that.
12:47
"Keen to get JP’s opinion on this next week (srsly, I mean next week)" I just got told off for being on the work Slack on my holidays :'( I need to go find a naughty corner
Those tyrants. Don't worry, in here you're allowed to do my work for me 24/7.
I've been there over a year and still failed to convince my boss that I actually like coding in my spare time. The Killbots will be on his head...
@roganjosh thats awesome, we could use more people like that in the world
@ParitoshSingh This was actually from one of my colleagues that's also a good friend, so he's just pre-empted me :P But indeed, I get where he's coming from
here we have the opposite in many places
"you'll be able to work this sat right? we'll really appreciate it"
12:54
Write up your opinion, and post its MD5 hash in work Slack today, and wait until next week to post the plaintext
laurel, that's brilliant
This will not accomplish anything but I think cryptographic hashes are a cool way of verifying the existence of a block of data without actually publishing the data
It's like mailing a letter to yourself so you get a legal official timestamp on it from the post office, except it doesn't cost you a stamp
@ParitoshSingh I mean, he also could be saying it lest I say "right, we're ripping this library apart and rebuilding on Sat, 6am sharpish" :D
Somehow you always rope him into your 6 AM refactorings, even though you don't have any formal authority over him. Just your natural charisma I guess.
"Charisma". Yes, I'll take that. Puts a nice spin on things
13:06
Some people can say "meet me at sunrise tomorrow in the empty lot. bring 300 feet of plastic tubing, a pineapple, and a latin-to-english dictionary". And the other person will show up despite there being no incentive.
@roganjosh okay, maybe i was being too generous. they are saying that too :P
My consciousness cronjob doesn't fire up until 9am at the earliest so I wouldn't be so cruel
13:27
@Kevin The incentive is to find out why.
British English or American English, by the way?
Because last week's adventure at the empty lot went horribly, horribly wrong
Either British or American English is fine. But listen very carefully. The dictionary must have no affiliation with early 19th century lexicographer Noah Webster.
A whole flood of questions come to mind
Show up tomorrow at the empty lot and get your answers!
I don't think I've seen a pineapple in our stores recently. Quite the pickle
Hmm, a pickle might be sufficient for our needs... I'll run the proposal by the boys in the lab
14:03
I have a Dockerfile with the line: RUN pipenv install --system --skip-lock --dev --deploy
My Pipfile contains some packages, and they're all installed
But if I add Faker = "==9.2.0" to the Pipfile and rebuild the image & container, Faker is not installed
I can ssh to the container and see that Faker is in the pipfile, and if I pipenv install inside the container, I can see that Faker is indeed installed
Does anyone know what might cause this behavior?
(I can also pip install Faker==9.2.0 once I'm ssh'd inside the container)
No, but I'm rooting for you
❤️
Knowing little about pipenv....which env are pip, pipenv, and the env you see Faker not install in all referring to? Eg if pip install installs in a python3.7 env, but you're trying to use it in a python3.8 env, no, it won't be installed.
Say what now?
The --system flag should install the dependencies in the Pipfile to the system
this is saying otherwise. But I don't know about pipenv here
All of my Docker builds just go through requirements.txt so I suspect I'm going to be useless in understanding this one. Docker and I don't mix very well
14:16
I think I'm just going to use a requirements.txt file
ya amen
Dude + docker compose + networked volumes + permissions galore = 🤯
Hit n hope. It's not unknown for me to have 10 goes at a deployment with brute-force :P
I'm past 10**2 ATM
But, ofc, this is the future ;)
"write once deploy anywhere" he cries
I always assumed Docker avoided frustrations relating to dependencies/requirements, by simply copy-pasting the entire virtual machine instance
If you have to configure the environment yourself, then that's the killer feature going down the drain, imo
14:23
My sweet summer child
Although, it could also be our internal deployment scheme. Who knows?
Hahaha
I'm guessing that Docker can copy virtual machine instances quite robustly, and this is loudly praised in all their marketing material, but you have to compromise when you hit real-world limitations like "I can't make 1000 instances in parallel if they each have a 1.0 GB numpy install. Can't I make them share?"
Just wait until you need to change something. And you forget to clear the image cache. Or the container cache. Or did you need to clear the network cache? Possibly dangling containers? Or was it the build cache?
(The Pipenv mystery was indeed hidden in one of those cache layers)
What were the two hard problems in computer science?
Naming things, caching, off by one errors
And then the two hard problems in distributed systems: twitter.com/mathiasverraes/status/…
14:41
Hi all -- does anyone know how to control the bounds of brownian noise?
Oh, I think I got something -- nevermind.
14:59
Update: I have succeeded in building CPython on Windows. Never let them tell you you can't achieve your dreams.
9
Thanks so much for the debugging help @Kevin! Seems like some git weirdness was to blame discuss.python.org/t/struggling-to-build-python-on-windows-10/…
Ah sweet victory
15:12
@Kevin You need to use something a little stronger than MD5 or SHA-1 though, because they're vulnerable to an extension attack. There's some info here & in the links on that page. crypto.stackexchange.com/q/29775 But you could use a MD5 or SHA1 HMAC, or a stronger hash like SHA-256 or Blake. Or just post both the MD5 & SHA-1 hashes. Getting a double collision on a 128 bit & a 160 bit crypto hash has a very low probability.
Aug 15 '15 at 14:14, by PM 2Ring
"There are only two hard things in Computer Science: cache invalidation, naming things, and off-by-one errors." – Phil Karlton & Leon Bambrick
This is kind of a scenario where vulnerability could be beneficial to me... Here's a use case. On Jan 1 2022 I come up with the idea "facebook for dogs". I calculate hashlib.md5(b"facebook for dogs").hexdigest(), and in chat I say "cool idea: 'bd24dd2a88b83d63999dd99cc5b8506c'".
how useful are args and kwargs actually? I never used them, I understand them, but I have a hard time coming up with a real world example
Let's action the NFT for bd24dd2a88b83d63999dd99cc5b8506c
I bidding 1 million
Sold!
15:17
dang it, I hoped to be outbid :P
On Feb 1 2022, Facebook independently has the idea for Facebook for dogs, and on March 1 2022 they release the feature to the public. I say "hey, pay me royalties, because I had the idea no later than Jan 1, as proven by my cool idea's md5 hash". Then I retire to the bahamas.
@duhaime is that a kitten on a tricycle? I'm not interested if we aren't hashing that
Once you buy the NFT, you place it and water and see what it turns into
@Hakaishin They're pretty much a must if you are writing generic decorators.
@duhaime late 80s kid, I see
15:20
@MisterMiyagi good point, that's where I used them. But rarely do I do that
Use case 2: same scenario as previous, except my idea is facebook for dogs and Facebook's idea is facebook for cats. On March 2 I iterate through a zillion different combinations of ways to write "facebook for cats" until I find one with the same md5 hash as "facebook for dogs". Now I can ask Facebook for royalties, even though I didn't really come up with the idea.
@Hakaishin Here's a real-world example of my own.
So it's profitable for me to choose a hash algorithm that's vulnerable to collision attacks, but not so vulnerable that Facebook's lawyers can figure that out by googling it
(To any Facebook legal team web spiders reading this: this is a work of satire)
Oh no, not the web spiders get the flamethrowers
15:25
@Kevin Admittedly, a length extension attack on such a short plaintext is unlikely. :) But it's well-known that MD5 is vulnerable, so you might as well use a HMAC, or a stronger hash.
The spiders are unharmed by the flames, and send you an invoice for mental anguish
@Hakaishin Much of *args is probably using instead of defining it. For example, many builtins like print, zip, etc. take variadic arguments.
Does HMAC require key exchange? I have no problem publishing a public key to the general public, but I don't think I can get Facebook to give me their keys so I can sue them more easily
@PM2Ring nothing wrong with rot-13 :p
I suspect that Facebook are currently busy improving some of their internal procedures skeptics.stackexchange.com/a/52456
@Kevin No. An HMAC is just a keyed hash constructed from 2 simple hash calls & XOR. See en.wikipedia.org/wiki/HMAC#Definition For this application, the key doesn't need to be secret. It's acting as a salt. But the point of using HMAC is that it's impervious to length extension shenanigans.
15:35
ok, makes sense
@PM2Ring why over complicate things when rot-13 is just fine :p
I'll leave that one alone now - already overdone it :p
Facebook's cryptanalysis web spiders might break rot13 and implement facebook for dogs mere days after I post my hash, which makes it more plausible to the courts that they came up with the idea before I did
When Ludwig Wittgenstein wrote in coffeeshops or trains and didn't want curious onlookers to read his handwriting, he used rot1
Perhaps I could publish my ideas encoded using cultural shibboleths that are incomprehensible outside of my local sphere. The cryptanalysis spiders can't break "facebook for jons"
16:10
Just looking for some ideas here, my Python isn't at a very high level. So I basically want to add some trace-level logging to a bunch of methods that just perform json transformations. The logging will all be the same, just like <method name><before/after> <json payload>. How would you go about this? Like ideally I would just write one method to do this, but the method needs to know who is calling it. Just pass that in, or is there a more clever way?
Seems like a job for decorators.
def logged(func):  # <= decorator
    def inner(*args, **kwargs):         # vvv logging
        result = func(*args, **kwargs)
        print(func.__name__, args, kwargs, '=>', result)
        return result
    return inner

@logged  # <= apply decorator
def plus(a, b):
    return a + b

plus(12, 30)
@Kevin meh... breaking rot13 is highly unlikely... the resources necessary to do so are phenomenal... it's an extremely complicated encryption algorithm after all :p
late cabbages, folks! How's the morning?
Nobody expects the Spanish rot13!
what a great time to join chat, thanks miyagi
16:20
hey why would I make a function a static method instead of a function?
@MisterMiyagi Thank you, reading up on decorators now.
@Chuu If you want to get fancy, you can use functools.wraps so that the function created by @logged inherits the name & docstring of the original function.
stackoverflow.com/questions/11788195/… hmm this tells me to do whatever I want, well I guess.
@Chuu Here's probably the only post you'll ever need to read about decorators. Fair warning, it'll likely take you an afternoon to get through, the first couple of times: stackoverflow.com/q/739654/198633
@inspectorG4dget tyvm
Hrmm, apparently one of the top hits in google for python decorators is that stackoverflow post, except as blogspam.
Higher than the post itself.
16:41
Hi all, is there a bug in np.amin?
It's telling me the min value is -1.5, which is clearly false -- the min is -2.5
● Very doubtful.
Until you provide evidence to the contrary, we'll just assume you used it wrong somehow
4
Hm, ok, here's how I used it:
brown_min = numpy.amin(brownian(x[:,0], N, dt, delta, out=x[:,1:]))
brown_max = numpy.amax(brownian(x[:,0], N, dt, delta, out=x[:,1:]))
@Aran-Fey I want this in fancy writing and credit card sized so I can hand it out to people :D
print("The min Brownian Value is "+ str(brown_min) )
print("The max Brownian Value is "+ str(brown_max) )
Very simple, but it's making a simple mistake.
16:47
why not just use np.max, np.min?
Hm, ok I'll try that
Same problem, it seems.
To the MRE mobile!
I guess this makes it really clear. The max is clearly fine, but the min is weirdly wrong.
@MisterMiyagi Yes, let me try to make an MRE right now.
Hmm, aren't you modifying the input array (x) by doing brownian(x[:,0], out=x[:,1:])?
@Aran-Fey I got my 1d brownian motion code from the SciPy-Cookbook documentation (scipy-cookbook.readthedocs.io/items/BrownianMotion.html), and I've been trying to get its upper/lower bounds by doing np.min & np.max
16:52
Hypothesis Ansatz: A random walk produces random output.
What is the shape of x?
like what is x.shape?
(1,501)
Wait, brownian isn't deterministic?
because I'm doing 500 steps for the brownian motion N = 500
God does not play Brownian
hmm, I don't understand what's plotted then--what do the digits on the x axis represent?
t should be 0:500, no?
16:54
No, T = 10.0, and the # steps = 500
Here, I'll make it clearer with this:
That's N=5 and T=10
As you can see, 5 steps have been plotted
that graph represents my understanding of your problem (y axis) over time (x axis)
ha ha
what are N and T?
and how are they related to X?
X is just a 1D distribution, like a sequence of numbers
T is the time. Here it's 10. N is # steps of Brownian Motion. Above, it's 5.
I see. That's very odd. I guess they're letting you choose the time quantum
16:57
When I print(x[k]), I get [ 0. 0.38896268 -0.44296983 -1.12324935 -0.14652129 0.86324206]. Thus, X is just the y-values.
You should just want np.min(x), np.max(x)
@rb3652 To cut this short: The code you have shown above suggests you create a new brownian for each step of min, max and plotting. Do you actually do that in your "real" code as well?
@duhaime You're right.
Instead, I was finding max and min of the brownian(stuff)
@MisterMiyagi Yup, I just copy-pasted my code
Thanks everyone. That was a really simple fix!
Well, now I'm unsure if our "number of times the discussion continued even though Miyagi already figured out the problem" counter needs to be incremented to 2 or stay at 1
Happy coding! I hope you open source a brownian trading algorithm on r/wallstreetbets
17:02
@Aran-Fey I suggest π/2!
*shrugs* Sure, if it makes you happy. Mind if I round that a bit, though? I can't fit all those decimals on the sign
Just assume π is exactly 3.
That's convenient
@MisterMiyagi boo, I spotted this on mobile but was going to say that I'd registered the issue "exactly Pi times" and you stole my joke
18:14
@Hakaishin Like this?
^ BTW, that's a temporary file.
^ That's the Python code I used to create the SVG.
18:38
@JonClements Chiara & Sina doubling up to play Cat Stevens' Lady D'Arbanville
@PM2Ring that's actually nice - but I should admit that's not one of my favourite Cat Stevens' songs
The Tillerman album I think is great... a lot of other bits... not quite so much
@JonClements It's definitely one of his darker songs. Maybe they'll do Moonshadow...
Emily's just posted a sweet song she wrote about her pet parrot, Rocky
While on an avian theme, here's some triple-distilled Americana from the Punch Brothers, featuring Rachel Price: Little Birdie
19:07
@PM2Ring what'd you think of youtube.com/watch?v=UPZBQDn6sb0 ?
@JonClements It's good. I'm surprised that I've never heard it before. But I guess they just didn't have room for it on the original vinyl album.
19:27
Here's some wild piano & vocals from Brazilian Tania Maria: Agua De Beber. She's in her mid 60s in this clip.
19:42
@PM2Ring I've never seen that on a vinyl or cd either... I was quite happy to find that. I am a complete Billy Joel fan - every Vinyl/every CD/every DVD etc... and that one I've not got on any of 'em.
I'm fairly sure anyway - everything he's ever done music wise - I've got a copy of in some way (heck - I've got all the albums on both vinyl and CD) - might even have some twice... but that track... no where to be seen on any of 'em.
@JonClements Do you like this cover by the Mark Almond band of New York State of Mind ?
I'll try it but they'll probably be something inside screaming "This isn't Billy Joel"... lemme see - I'm open minded :p
I'm struggling to enjoy that... it's nice...
but errr... that version is a bit going down a kind of blues/jazz route thing and it doesn't quite work (for me anyway)
he's got a nice voice though
quite soothing :p
it just lacks a bit of punch and I think that's what made the original work
perfectly nice though and going to make a note to see what else Almond has been up to :p
20:05
@JonClements Yes, it doesn't quite have the punch of Billy's version. It's from a penthouse on the 99th floor, not down on the streets of New York. But that version was pretty popular here in Australia.
Here's a fun song by Michael Franks, with Joe Sample on Rhodes: Eggplant
Sarah Jarosz wrote this song about Jackie Kennedy Onassis while she was living in New York, near Central Park. Jacqueline
Brittany Haas played violin on that last track. Here she is doing a duet with her sister Natalie on cello. Kom Hem
@FélixAdriyelGagnon-Grenier ^
20:29
Could anyone help me please?
We ask that you don't post your questions here until they're at least 48 hours old, but here's a tip anyway: Tag your questions with python.
And avoid just saying "the code below but that doesn't work." Describe what happened instead – whether you got an error, or an unexpected result.
I just hammered it, but forgot to check the tags. Oh well.
Double hammer time!
Two hammers for the price of one. :)
20:44
@PM2Ring I might have a hammer somewhere...
@PM2Ring do you like Texas? youtube.com/watch?v=Mi3eimky5XM
@JonClements Sure! I didn't realise they were still going.
@PM2Ring I haven't checked but "The Conversation" was the last album they did (afaik) - or at least it's the last one I bought
some really nice tracks on it
Back in the day, Texas had a huge hit in Oz with their cover of Sweet Child of Mind
although the start of it... I'm just thinking it's Bonnie Tyler "Lost In France" :p
@JonClements Not available
20:57
bloomin' YT
@PM2Ring music.youtube.com/… (although that's probably a worse link as it's subscription based)
@JonClements Still no joy.
@PM2Ring ugh okay... see if you can find "If This Isn't Real" by Texas...
Here's an impressive cover of Sweet Child of Mine by two young ladies, Jadyn Rylee and Jessica Lajner. Jaydn has done some songs with Sina, Chiara, and Emily.
and I'm pretty sure you'll agree with me - the opening and on-going chorus is pretty much Bonnie Tyler's "Lost In France"
@JonClements Success! youtu.be/3EqdRXuYQQQ Yes, it's similar, but the phrasing is different, and that chord progression sounds like it's used in a lot of songs.
21:08
@PM2Ring I'm 50/50 on that... clearly talented and awe inspiring... it's just not GnR...
That Texas song also reminds me of the Pretenders. I suspect the chord progression is a variant of en.wikipedia.org/wiki/Andalusian_cadence
@JonClements Well, sure. They're still just kids.
she's great... awesome vocals... just probably too good and too nice... it lacks the "grit" that makes the original work
yeah... she's definitely got some lungs on her :p
Speaking of GnR, here's Sina's version of Welcome To The Jungle.
I'm not sure if it's completely weird or not, but when I listen to some GnR - I also want to listen to some Metallica and their classic: youtube.com/watch?v=tAGnKpE4NCI
21:23
@JonClements That makes sense to me.
Here's Jaydn & Sina's version. :) youtu.be/xydwMqIhZ54
Jaydn is about 11 in that clip.
sorry - one sec... got a fly that's err... not a fly no more that decided to land in my hot chocolate
21:45
The Harp Twins, with their arrangement of Enter Sandman. They're classically trained, but they prefer to play metal.
and from Metal we can move to country: youtube.com/watch?v=p9xYYSAo7UU :p
@PM2Ring I need to find a citation but fairly sure Billy Joel spent years training as a classical pianist (even before he considered he'd have a career in music) and then he went a bit RnR and then a bit R&B - his earliest work - you wouldn't even know it was him.
22:11
@PM2Ring fairly sure I've posted this before - youtube.com/watch?v=-xKM3mGt2pE&list=RD-xKM3mGt2pE - it's by the same guy that did the original - I consider it better than the original - I think the more laid back approach really works for it
@JonClements Another drinking song. Beautiful Stranger by Marcus King, who usually does much rockier stuff.
@JonClements Yep. And I posted some A-Ha covers from Emily.
@PM2Ring liking the lyrics... really struggling with that guys voice though :(
@PM2Ring yep - vaguely remembering... can you post again Emily's version?
Sep 3 at 21:52, by PM 2Ring
Emily and Chiara teaming up with German drum prodigy Sina, doing an A-Ha song. (I should've posted this version before. Oh well). https://youtu.be/HJ1Biqhs3Qo
Some electric stuff from Marcus. His own song One Day She's Here, plus a couple of blues classics penned by Willie Dixon.
@PM2Ring think I've shared this before - but it remains one of my favourites: youtube.com/watch?v=TAWx6k8ZQnU
22:39
@JonClements You did, a few years ago. But it's a good one. :)
Stevie Wonder's Superstition covered by Canadian Stacey Ryan, who's also a fine guitarist.
Pondering if we should change the room description to "Friday Night Music Exchange" :p
Maybe not. :) But we could make Friday night music a semi-regular thing...
Stacey doing Billy's For The Longest Time
I'd be up for a monthly music night kind of thing... but you'd have to clear it with the other RO's... can't just be us :p
but it's something that might work - some latest tracks and discussion of older tracks etc...
(don't think it'd hurt once a month as a get together thing)
@PM2Ring That's probably one of my favourite Billy Joel songs...
22:58
@JonClements And of course, actual Python discussion would have priority.
@PM2Ring well yeah, normal rules and procedures would apply...
01:00 - 23:0023:00 - 00:00

« first day (4010 days earlier)      last day (1163 days later) »