{"info":{"_postman_id":"747641cd-fa7f-4f0b-b93e-5706e03f7a12","name":"Serial Solidworks Electricall Fixed","description":"<html><head></head><body><p>Download &gt;&gt;&gt; <a href=\"https://tinurll.com/2su49l\">https://tinurll.com/2su49l</a></p>\n<p>Download &gt;&gt;&gt; <a href=\"https://tinurll.com/2su49l\">https://tinurll.com/2su49l</a></p>\n<p>I am using numpy(python) to parse the script in order to get the first 10 lines in the file and use them to define a boolean array. I have managed to do the first part by doing this:\nresult = []\nfor i in range(100):\n    line = open(path, mode='r', encoding='latin-1').readline()\n        a = [x for x in line.split('\\t') if x.strip()]\n            result.append(a)</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>        Now I'm stuck as to how to check if the first 10 elements in the array can be used to define the boolean array and if the boolean array has some zeroes and/or ones.\n        This is what I've tried but it doesn't work:\n        result = numpy.array(result[:10])\n        if (result == [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]).all() == False:\n                print(\"Somethings wrong...\")\n                \n                And this one doesn't work either.\n                \n                A:\n                \n                It's because you're not converting your boolean array to the numpy array, but you are comparing the array and booleans(0's and 1's) instead. The == operator check if the 2 operands are equal, instead you want to check if both are boolean.\n                Use numpy.any instead:\n                if numpy.any(numpy.array(result[:10])!= 0):\n                    print(\"Somethings wrong...\")\n                    \n                    Q:\n                    \n                    How do I import a value from another file?\n                    \n                    I have 2 files\n                    Master.py\n                    data = 1\n                    \n                    Other.py\n                    print(data)\n                    \n                    I run them like this\n                    Python master.py\n                    Python other.py\n                    \n                    How can I get 1 to be printed instead of 1? \n                    \n                    A:\n                    \n                    You need to import the module, in this case the one in which data is defined.\n                    import other\n                    other.data = 1\n                    \n                    Generally you import modules and you define variables directly in them.\n                    \n                    # Copyright 2019 Google LLC\n                    #\n                    # Licensed under the Apache License, Version 2.0 (the \"License\");\n                    #\n                    7582aa13b2\n                    \n                    https://documenter.getpostman.com/view/21883432/UzkayDzp https://documenter.getpostman.com/view/21878375/UzkayE56 https://documenter.getpostman.com/view/21833273/UzkayE55 https://documenter.getpostman.com/view/21850941/UzkayE57 https://documenter.getpostman.com/view/21889780/UzkayDzm # Introduction\n</code></pre><p>What does your API do?</p>\n<h1 id=\"overview\">Overview</h1>\n<p>Things that the developers should know about</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>What is the preferred way of using the API?</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>What errors and status codes can a user expect?</p>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<p>Is there a limit to the number of requests a user can send?</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"},{"content":"Rate limit","slug":"rate-limit"}],"owner":"21883432","collectionId":"747641cd-fa7f-4f0b-b93e-5706e03f7a12","publishedId":"UzkayE9b","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-08-03T05:19:21.000Z"},"item":[{"name":"","id":"21883432-9cb6de7c-24a9-4c4d-a449-f1fbf8abea6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"","description":"<p>Serial Solidworks Electricall </p>\n","urlObject":{"query":[],"variable":[]}},"response":[],"_postman_id":"21883432-9cb6de7c-24a9-4c4d-a449-f1fbf8abea6a"}]}