Skip to content

coursera assignment python file compiling error

i have a coursera assignment in jupyter notebook the problem is that in jupyter it runs correctly but when i submit it fail and shows this error : Can’t compile the student’s code. invalid syntax (student_solution.py, line 23) the task is : In this exercise you’ll try to build a neural netwo…

How to drop dictionaries with NaN values from list

This seems like a fairly simple thing but I haven’t been able to find an answer for it here (yet). I have a list of dictionaries, and some of the dictionaries in the list have NaN values. I just need to drop any dictionary from the list if it has a NaN value in it. I’ve tried it a few

Leetcode problem to remove instances of a value in an array

The instructions were: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. The order of elements can be changed. It doesn’…

DICOM slicing orders in python

I have a question about slices ordering: I have about 80 pictures of hip joint but there are not arranged from feet to head or head to feet. Is there any way to arrange them in an intended order? SOP Class UID is CT Image Storage. This is the code and These are the pictures of results. Answer slices =

Efficient way to store and forward based on 5 tuple data

I am making a Ryu application which has to keep track of network “conversations”, that is to say, the bidirectional L4 flows. The issue is that while there are many ways to do this, efficiency is a big problem. Problems: Bidirectional data must be easily looked up. For example, a naive approach mi…