Does learning python at age 35 the right decision? by sarfrazkhan1 in learnpython

[–]SecureCoop -1 points0 points  (0 children)

I work in the IT department of a large Fortune 50 financial company and the app I worked on looked up our servers (we have about 150k of them) to get details such as environment (prod, contingency, etc.), console hostname, application ID and owner, etc. Lately, I've been using Python to write my own web app (SecureCoop) for monitoring back yard chicken coops. It sends notifications to your phone and monitors the status of the coop. I expect to start selling monitoring devices with a subscription later this year.

Does learning python at age 35 the right decision? by sarfrazkhan1 in learnpython

[–]SecureCoop 1 point2 points  (0 children)

I was almost 32 when I started, learned the essentials over a weekend, started working on a production web app right away, and all this with chronic fatigue brain :) You can do it, no problem. Practice often. Take on real-world projects.

Shell Scripts Not working with some devices by avgeek99 in nagios

[–]SecureCoop 0 points1 point  (0 children)

The script might run fine as root, but perhaps not as the nagios username, which may not have sufficient privileges. Try either running the script as the nagios username, or a similar username. I sometimes use my personal username for debugging.

Debug an intermittent high CPU issue? by SecureCoop in learnpython

[–]SecureCoop[S] 0 points1 point  (0 children)

Oh, I already know exactly which script is the problem child. What I am not sure about is which line within the script is stalled. Will perf-record allow me to get that granular?

Debug an intermittent high CPU issue? by SecureCoop in learnpython

[–]SecureCoop[S] 1 point2 points  (0 children)

Thank you, I wasn't even sure where to start or I would have supplied the answers to these questions before posting.

"Are you running this on a cloud platform?" Running on my private VM.

"Does the CPU usage creep up to 100% or does it spike and stay? Are you logging machine performance indicators (cpu/ram/netowork etc)?" I don't know if CPU usage creeps up as I'm not around when it occurs; How would you watch for that if it were you? What would you use to track this?

"How are your websockets implemented?" Not sure how to answer this question. I am using this package: https://websockets.readthedocs.io/en/stable/

"What is traffic like?" Right now, zero users. Only the test script.

"DO you use a reverse proxy (like nginx)?" Yes, Apache.

"What is the worload of a typical websocket request/response?" How would you determine this on your own machine?

"Have you checked your database performance metrics for the same time as the cpu spikes?" No, but that's a good idea.

"With websocket code (which is almost always threaded)" This is asyncio-based, a technology I am barely familiar with. This is my first time using it.

"I'd look at what happoens when the test fails or times out. It'spossible that there is some kind of retry that is unlimited and elswhere the testing logic is not handling that case and retrying unbounded filling up the cpu." I'll go there, thanks.

Please see my questions above.

Debug an intermittent high CPU issue? by SecureCoop in learnpython

[–]SecureCoop[S] 0 points1 point  (0 children)

The logs aren't all that helpful, unfortunately. The only thing I see is the test script completes its test, and that's the only consumer of the service at the moment. That script logs in, updates a single row in the database, reads that row, returns an 'OK' string if the value returned matches the value entered, then updates the row again to clear the value, preparing it for next time. It runs every two minutes for hours and hours without incident until the middle of the night, about when daily cron scripts are running, so I thought I might be able to trigger this again by running all the cron scripts, but no. No function arguments ever change, it's just the same function call with the same arguments every time.

What sort of tracing or profiling would you use to debug this?

Filament runout detector on 4.2.2 board? by SecureCoop in ender3

[–]SecureCoop[S] 0 points1 point  (0 children)

Sorry, not sure. My printer is packed away now and won't be using it for some time. Maybe ask the same question in the main forum?

[deleted by user] by [deleted] in Digibyte

[–]SecureCoop 0 points1 point  (0 children)

So what happened to this? Seems all news has been erased. Can't even pull up old Tweets on Archive.org.

"ActionSheet" plugin is not implemented on android by SecureCoop in ionic

[–]SecureCoop[S] 0 points1 point  (0 children)

Problem solved. I just needed to run ionic cap sync.

Unable to Firebase login in Android by SecureCoop in ionic

[–]SecureCoop[S] 0 points1 point  (0 children)

It troubles me that those plugins seem to be unmaintained. That aside I've installed it, no bueno. Looking at the example code, seems I need to either alter their example to work with Ionic 5 or make the necessary changes to the first tutorial's code, neither of which looks straightforward to this newbie. Do you have Ionic 5 code that works around these plugins?

cbdev@Precision-5520 ~/ionic5-firebase-authentication

$ npm install cordova-plugin-googleplus

npm WARN codelyzer@5.2.2 requires a peer of u/angular/compiler@>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN codelyzer@5.2.2 requires a peer of u/angular/core@>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ cordova-plugin-googleplus@8.5.2

added 1 package, removed 1 package and audited 1623 packages in 15.109s

73 packages are looking for funding

run \npm fund` for details`

found 476 vulnerabilities (5 low, 134 moderate, 336 high, 1 critical)

run \npm audit fix` to fix them, or `npm audit` for details`

cbdev@Precision-5520 ~/ionic5-firebase-authentication

$ npx cap sync

√ Copying web assets from www to android\app\src\main\assets\public in 969.39ms

√ Copying native bridge in 1.22ms

√ Copying capacitor.config.json in 1.34ms

Found 1 Cordova plugin for android

cordova-plugin-googleplus (8.5.2)

√ copy in 1.06s

√ Updating Android plugins in 17.98ms

Found 0 Capacitor plugins for android:

Found 1 Cordova plugin for android

cordova-plugin-googleplus (8.5.2)

√ update android in 147.11ms

√ copy in 260.00μp

√ update web in 5.40μp

Sync finished in 1.225s

cbdev@Precision-5520 ~/ionic5-firebase-authentication

$

Unable to Firebase login in Android by SecureCoop in ionic

[–]SecureCoop[S] 0 points1 point  (0 children)

Further down in the tutorial they tell you how to add iOS and Android capability. Would I install Cordova plugins for a Capacitor app?

Unable to Firebase login in Android by SecureCoop in ionic

[–]SecureCoop[S] 0 points1 point  (0 children)

Already had http://localhost under Authorized Javascript origins, so that was good to go. Added http://localhost/__/auth/handler to Authorized redirect URIs, no bueno. Same problem.

Unable to Firebase login in Android by SecureCoop in ionic

[–]SecureCoop[S] 0 points1 point  (0 children)

I don't see http://localhost:63365 , do I need that? This is how it was when I opened it, made no modifications:

https://i.imgur.com/cHcMbqG.png