Question: indeally, should installing testing dependencies that aren't required by the project itself (eg pytest, coveralls) be accomplished in the CI .yml, or in the project requirements.txt?
I guess In wondering if in the .yml files, in the project requirements.txt, or having a second requirements.txt in the tests/ folder and calling that in the .yml files is the more pythonic way to do it?
I want to make a neat interface for user to work with.
@Code-Apprentice Many features like copy, paste etc takes time in console. We cannot even select text using keyboard (like hold shift and use your arrow keys to select text)
I want syntax highlighting for my programming language Numbairy.
(In the console)
@MartijnPieters (Since you are a moderator so) I think I have found a bug. Click on thefourtheye user profile icon on the right side and you will see the text overlapping with SO icon.
pastebin.com/hcXj5mvu so any idea then how should I use mpi4py in this code ? What do I exactly use those size and rank and comm ? `it's kinda abstract from the docs, just some general cases
I always tried to work with python for everything, so i realize it's complicated cause of its late in real time web, architecture as microservice.......
The code is fine as far as setup for parallel execution is concerned. You have to run it in a parallel environment. This is outside python. Until you figure this out (by communicating/finding resources with people responsible for your supercomputer) there's no point going forward. If you figure this out, you can edit the code so that the behaviour changes based on rank, and add parallel communication between nodes. That's it. Good luck.
hey guys, I have written small python server which listens on given ip:port for any incoming requests. Single request is contained in single json sent on port. That json also contains required serialized, character escaped data files (in max 20 megabytes) as values of various keys along with some other parameters (key-values). In new requirement I am going to receive big binary files in several hundred megabytes. Should I rewrite code to receive these data files separately from first json?
If yes, how can I delimit between two things, like I have completed with sending initial json, now I will send first file, now completed with 2nd json, now I will send 2nd file, and so on. Should I be doing socket.flush() and then again socket.send() for next file? This sounds like building some sort of communication protocol. Should I be even doing this? or there is any ready made library / approach to do such things?
> Unknown property ‘user-select’. Declaration dropped. stacks.css:1:1383 Unknown pseudo-class or pseudo-element ‘-webkit-input-placeholder’. Ruleset ignored due to bad selector. Expected media feature name but found ‘-ms-high-contrast’.
stuff like that
let me see if they go away if I disable your script
I don't know, but since node.js is a general framework I'd expect a specific machine learning library to be involved on the JS side, at which point their documentation should let you know of options to import models
I'm sorry but your level of confusion or ignorance makes this discussion very frustrating for me. I don't think I can help you further
Parallelization is not magic pixie dust which you spread over your executable making it faster. You make use of it by distributing work onto seperate workers. None of that is happening in your code.
The code is fine as far as setup for parallel execution is concerned. You have to run it in a parallel environment. This is outside python. Until you figure this out (by communicating/finding resources with people responsible for your supercomputer) there's no point going forward. If you figure this out, you can edit the code so that the behaviour changes based on rank, and add parallel communication between nodes. That's it. Good luck.
My code generates a bitmap. I was told to generate it that one core will generate 1/4th of it (4 total). This is how I need to use it. Is this relevant ?
Your code tries taking user input for all 12 cores (assuming you're running it right). The prompt text should be present in some kind of aggregate output 12 times.
@Thewise it is relevant; that's what you have to implement
aren't there any log or .out or .o or whatever files during/after execution?
if you had showed me that mpi-test script I'd have seen "mpirun" at once which would've saved me half an hour of trying to force you to convince me that you're actually using MPI
@Thewise I'm afraid you'll have to start bothering the teacher with the rest. I've lost patience, sorry. You just need to write your code by branching based on the rank variable (which is the index of the running process), and using something like reduce or allreduce to collect all bmp contributions on the root node
I am using tensorflow's Object Detection API and the model I'm using for training is faster_rcnn_resnet101_coco_2018_01_28 but I a getting a InvalidArgumentError : assertion failed: [maximum box coordinate value is larger than 1.100000: ] [1.15277779]. I have checked my bounding box coordinates but none of them exceed the image dimensions. No answers yet. The link is : stackoverflow.com/questions/52758723/…
I'm trying to figure out what could be a good idea of "custom metric" for the MNIST dataset (60000 examples of 10 digits) to replace the Euclidian Distance and obtain possibly better results with some basics algos (knn, k_mean, isomap).
I thought about maybe adding some decay factor to integrate neighbor pixels when calculating an image's distance with its pixels' values. How dumb does that sound?
:44246997
hi guys, little help here
"I don't want to put unknown encodings of group image in to a classifier"
what i did was find Matches for each of the encoding and trying to remove encodings with matches=0
for encoding in encodings:
matches =np.count_nonzero(face_recognition.compare_faces(data["encodings"],
encoding))
d["encods"]=[matches,encoding]
for k,v in list(d.items()):
if v[0]==0:
del d[k]
print("dict",d)
@Arne yeah, and I would simply use CNN if I could, but the assignment is about improving 5 basic algos by comparing the results with my own custom metric and the euclidian distance. :/
@Arne no, for example, in KNN, we use a metric to calculate what are the "k" nearest neighbors. This metric is usually L2 (euclidian distance). The "custom metric" would be to use something else as a function to calculate D(x, y) that would be symmetrical, that is D(x,y) = D(y,x)
oh, part of the assigment says that if an image is classified as a certain digit, our custom metric should ensure that a translation of that digit (moving it a bit to the right, for example) would not affect in any way the classification of that digit
I point to a cool video or info-graphic while i raise my eye brows, nod, and vocalize "huh" a lot. This indicates that I know what the video and graphic are saying and that I really agree.
That's quite a disappointing turn of events, I would have assumed that a regular could be nudged to change rather than 3 people flagging if there was a genuine issue. I don't think it's a serious event.
Personally. There was nothing offensive about that. It was also a slogan for the winamp application. Being offended at that is why things take the wrong turn and things get blown out of proportion and escalated for no reason.
Currently annoyed by a recent question that asks "I have this complicated five dimensional JSON object, which is structured like this... [two paragraphs later...] and it contains a string 'a=b' at its deepest level. How do I get just b out of it?". The answer the OP was looking for was the_string.split("=")[1]. So... What was the point of including all the stuff about the JSON structure?
Naturally half of the answers spend 90% of their length talking about iterating over the elements of arbitrarily structured nested objects in order to find all strings that start with "a=", which as far as I can tell is totally unnecessary
Is there a name to a "function" that behaves like: where it uses the number to the left to determine if we should round up to the next digit slot (ignoring 0). For example, 10 adding 1 we get 11 since left is 1 and right is 1 we increase it to be 20, 20 adding one becomes 21 adding one again becomes 22 which rolls over to 30. This pattern shouldn't be limited to just 2 digits so if we have 1099 it rolls over to 1100 cause 99 rolls over, and then 11 part of the number rolls over to become 2000.
If we have a canonical for "how come my string s (which contains special characters) looks different when I do print(s) compared to print(tuple_containing_s)?", Replace double backslash with backslash could use it
My current understanding of the system is "f(x) is the smallest number greater than or equal to x that can be represented as 'a * 10*b', where 1 <= a <= 9 and b >= 0"
Apparently the number sequence 1,2,3...9,10,20,30...90,100,200... is oeis.org/A051596, "Numerical values or Gematriahs of Hebrew letters {aleph, bet, ..., tet}"
Googling "8, 9, 10, 20" site:oeis.org gave me A051596 as the top result, so therefore it is the most official number sequence. A037124 is hit number seven, hardly even worth mentioning
@AndrasDeak no clue.. I didn't think it through just thought of a pattern and didn't know if it was a thing. It fits in with what I'm currently doing at work
Incidentally, docs.python.org/3/library/csv.html is clear as mud when describing how to invoke QUOTE_NONNUMERIC behavior. I have to reverse engineer the names of fmtparams by looking at the examples
"Couldn't figure out what the docs meant by 'For full details about the dialect and formatting parameters, see section Dialects and Formatting Parameters.', huh?" you hypothetically say. Damn right I couldn't. You can't expect me to click an additional link and/or scroll an entire page length to determine the behavior of a function.
im sorting this list does python know by default how to sort strings such as '1/12/2001, '1/28/2001', '1/5/2001' it seems to be doing it but wasnt sure if that is just coincidence or it does recognize to sort such dates in a string
Ok, here's another example. sorted(["6/01/2001", "7/01/1999"]) gives ['6/01/2001', '7/01/1999'], which incorrectly orders the 1999 date after the 2001 date.
Similarly, sorted(["3/01/2001", "12/01/2001"]) gives the wrong answer.
Long story short, Python does not have special logic for sorting strings that look like dates.
Sure, m/d/yy strings will sort properly if you can guarantee the month is always exactly one digit, and the day is always exactly one digit, and the year is the same across all of them.