Coming home to find that my car has been stolen and then fighting the NHS app to get a pass needed for the conference tomorrow, which still just doesn't work. It looks like we're both not having a great time :/
hmmm looks like this is the best django has to offer when localizing the database goodcode.io/articles/django-multilanguage. It's kinda meh. I think I will do the "not clean" thing and only store an int in a column instead of a reference table and have a dict in the code. It's a bit hacky, but way simpler and I get djangos localization capabilities for free without a bunch of extra effort
Any gold badger that can change the dupe list on this one? While the titles make it look like it, the current dupe target is not correct. I put one in the comments (also the current dupe target is a duplicate itself...)
Argh, coworkers code is driving me mad again. Copy pasting things should be forbidden, so many stupid copy pastes and I have to change the same thing over and over again. Now I wrote and assigned him tickets to fix that mess
@Hakaishin I had a different problem with my coworkers, who insisted that every piece of code that is longer than 2-4 lines should be moved into a separate function
Incidentally, does flairNLP actually have API documentation, anywhere online? github.com/flairNLP/flair has a lot of tutorials, but I don't know where to look to find e.g. the valid arguments for SequenceTagger.load('ner')
> For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods.
:-/
Aren't there, like, automated tools that magically create pretty HTML docs from a project's docstrings and annotations? Having to clone repos is so 20th century
Oops, that's not SequenceTagger.load, that's MultiTagger.load. There is no method named "load" in the SequenceTagger class definition. Therefore I conclude it is not a true part of the API, despite the mountain of contradictory evidence
I don't mind writing a two-line function, although I'll feel silly if I only call it once
OTOH I might feel silly even if I call it more than once. a = add(b,c); x = add(y,z) is not automatically better than a = b+c; x = y+z just because it's more functiony
"Oh hey coworker, very nice function that writes N rows into a CSV file. To make it even better, let's move the code that generates the name of the file to a separate method. Let's also move the code that literally just calls writer.writeheader to a separate method as well. Oh and the code that essentially just calls writer.writerow -- that's right it belongs to a separate method too. Beautiful!"
He also writes beautifully parametrized test functions with multiple levels of pytest.mark.parametrize with ifs and fors in test functions' bodies. A true joy to read and maintain. No repetition though
@Kevin Wow! That's pretty impressive. I guess you're familiar with en.wikipedia.org/wiki/Peaucellier%E2%80%93Lipkin_linkage which was the first linkage to produce exact linear motion from rotation without needing guide rails.
I'm trying to construct my own linkage out of K'Nex. I'm having trouble replicating most (all?) designs where at least two vertices move in a full circle. Depending on how I construct the joints, it's either impossible for one rod to rotate through another one, or it's impossible for a rod to pass over a vertex.
How inconvenient that objects in real space are solid
@AndrasDeak Yeah, the relative proportions of the rods in Jansen's linkages are not easily replicated with a handful of sqrt(2)^k inch rods. I suppose I could use my 1/4 inch rod and declare that to be equal to 0.1 dimensionless units. Then I could make Jansen's linkage, albeit it would be 20 feet long.
In principle I can construct a "pseudo-rod" of nontrivial length by joining three rods in a square-wave configuration like: _|¯|_. The vertical components are washers that accomodate two parallel axles. By moving the washers closer together or farther apart, the width of the entire structure can be customized.
I rarely use this in practice because a pseudo-rod has much worse structural integrity than a regular rod. It twists, it bends. Most damningly, it squashes and stretches. Not good since its #1 selling point is maintaining a precisely definable width.
Anyway I'm more interested in solving my problem of making two rods pass through one another. Another way of imagining the problem is, how can you design a bicycle wheel that will continue to work even if you push a stick in between its spokes?
I feel like I've seen a mechanism that could allow that, on reddit (et al) under a heading like "15 bizarre gizmos that actually work!". Usually along other oddities like this mobius gear strip.
@holdenweb holy jibberjabber! so sorry you're going through that. I'm expanding my horizons - standing up an internal wiki and training our (non-technical) staff on how to use it. "Think you can stand this up and train everyone?" - "oh heck yeah, no sweat" // I frantically start googling how the yams to do this coz I just promised something I have no idea how to do :P
Apparently the mobius gear design comes from Trott, M. "The Mathematica Guidebooks Additional Material: Rotating Möbius Bands." mathematicaguidebooks.org/additions.shtml#G_2_01. but I can't actually access it to verify
I sure love that higher learning is a for-profit institution
Actually it probably is freely available but I can't be bothered to download software that can read a .nb file
@Kevin so how many different things can you get pulled into until your effectiveness hits zero? I believe the Kevinomaly states that any such system will converge to zero (\sum_{i=1}^{\infty}2^{-i}), with the notable exception of Kevin
@Kevin Hey guys, do you mind if I bring up this convo we had few months ago back. Looking back at that, we dont even need to repeat two points to make a straight line, simply marking the all the points in the grid and then using smooth=True will curve it for you
@Hakaishin Now you've done the research you're aware of the advantages and disadvantages of the approach, so at least you were able to make an informed decision. Only you know your circumstances well enough to say what's good enough.
@Kevin Back in 1969 I worked in an installation where function calls were held to be too expensive. This was IBM 360 DOS PL/1, so you had to label the line after the call, and before the call you had to set that specific function's return variable (not a PL/1 concept, but implemented as a "label variable") before jumping into the function code.
Needless to say, the chief programmer was not familiar with the notion that a function might be recursive.
I recall playing with an esolang where there wasn't a call stack, so you would put jmp 0 as the last instruction of every function, and manually set the 0 byte to the address just below the caller
If you needed recursion, you could just make additional copies of the entire function in whatever empty space you had handy :-)
Hello! I installed the needed modules - pandas, numpy, tensorflow in the tensorenviron (virtual environment) of anaconda3. Only desired module left is matplotlib but when i try to install matplotlib in tensorenviron, it says: Found conflicts! Looking for incompatible packages. Please help