How to access file in google drive using yolo4 - google-drive-api

I am following a tutorial on Machine Vision using YOLOV4. I uploaded a video in my Google Drive named video.mp4 and this is the image of it
In the tutorial, I am told that to get the path of the file, all I need is to right click on the file and select 'copy path'
You can copy the path by right-clicking on it and selecting ‘copy
path’ from the ‘Files’ menu present on the right-hand side.
But I don't see that option. So I just followed the context of his structure which is like this:
!./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights -dont_show /content/drive/MyDrive/india.mp4 -i 0 -out_filename results.avi
and so this is what I did:
!./darknet detector demo cfg/coco.data cfg/yolov4.cfg yolov4.weights /content/drive/My Drive/Colab Notebooks/video.mp4 -i 0 -out_filename results.avi
When I run it in Google Colab, I don't see the video but just this =>
Streaming output truncated to the last 5000 lines.
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
Video-stream stopped!
.....
It just goes like this for a long time.

Related

Apache Karaf stuck while shutting with Pax-Exam

I was running integrations tests with Pax-Exam and Karaf, tests got executed successfully but while shutting Karaf, it stuck on below and never resume
Pax-Exam = 4.11
Karaf = 4.2
[main] DEBUG o.ops4j.store.intern.TemporaryStore - Exit store(): 66cf6a516d0d1a670e78bd6b0be97f3da2a380b3
[main] DEBUG o.o.p.e.c.remote.RBCRemoteTarget - Preparing and Installing bundle (from stream )..
[main] DEBUG o.o.p.e.r.c.RemoteBundleContextClient - Packing probe into memory for true RMI. Hopefully things will fill in..
[main] DEBUG o.o.p.e.c.remote.RBCRemoteTarget - Installed bundle (from stream) as ID: 86
[main] DEBUG o.o.p.e.c.remote.RBCRemoteTarget - call [[TestAddress:PaxExam-bc970a6c-c656-4aa6-9300-35ded2bcde50 root:PaxExam-f6737e31-8f28-43e
0-847e-1f3f49649233]]
[main] DEBUG o.o.p.e.k.c.i.KarafTestContainer - Shutting down the test container (Pax Runner)
Following is output of JConsole for blocking
Name: main
State: BLOCKED on java.lang.Object#d53a0bb owned by: KarafJavaRunner
Total blocked: 106 Total waited: 105
Stack trace:
org.ops4j.pax.exam.karaf.container.internal.runner.InternalRunner.shutdown(InternalRunner.java:71)
org.ops4j.pax.exam.karaf.container.internal.runner.KarafJavaRunner.shutdown(KarafJavaRunner.java:120)
- locked org.ops4j.pax.exam.karaf.container.internal.runner.KarafJavaRunner#279baf5b
org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.stop(KarafTestContainer.java:600)
- locked org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer#25dcfa62
org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactor.invoke(AllConfinedStagedReactor.java:87)
org.ops4j.pax.exam.junit.impl.ProbeRunner$2.evaluate(ProbeRunner.java:267)
org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
org.junit.runners.ParentRunner.run(ParentRunner.java:309)
org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:98)
org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Update:
One more thing i observed if i forcefully shut it and then if i run "mvn clean install" i get following error and i have to wait to get it run again
[←[1;31mERROR←[m] Failed to execute goal ←[32morg.apache.maven.plugins:maven-clean-plugin:2.5:clean←[m ←[1m(default-clean)←[m on project ←[36mosgi-unit-tes
ts-sample←[m: ←[1;31mFailed to clean project: Failed to delete C:\Users\..\target\pax
exam\e266ddcb-5fed-4997-8178-3d4944251418\system\org\apache\felix\org.apache.felix.framework\5.6.10\org.apache.felix.framework-5.6.10.jar←[m -> ←[1m[Help 1
Update2:
After exiting prompt still its running
C:\Program Files\Java\jdk1.8.0_162\bin>jps -l
1552 sun.tools.jps.Jps
4144
1420 org.apache.karaf.main.Main
C:\Program Files\Java\jdk1.8.0_162\bin>jps -l 1420
RMI Registry not available at 1420:1099
Exception creating connection to: 1420; nested exception is:
java.net.SocketException: Network is unreachable: connect
Update3:
if i kill this process, Pax resume and display message successful execution of Tests. infact before shutting all tests are already successfull but it not able to shut.
TASKKILL /F /PID 10692
Now i have no clue to handle this locking issue.
Update4:
Name: main
State: WAITING on org.apache.felix.framework.util.ThreadGate#b3d26d8
Total blocked: 6 Total waited: 7
Stack trace:
java.lang.Object.wait(Native Method)
org.apache.felix.framework.util.ThreadGate.await(ThreadGate.java:79)
org.apache.felix.framework.Felix.waitForStop(Felix.java:1075)
org.apache.karaf.main.Main.awaitShutdown(Main.java:640)
org.apache.karaf.main.Main.main(Main.java:188)
Name: FelixDispatchQueue
State: WAITING on java.util.ArrayList#3276dd18
Total blocked: 353 Total waited: 342
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
org.apache.felix.framework.EventDispatcher.run(EventDispatcher.java:1122)
org.apache.felix.framework.EventDispatcher.access$000(EventDispatcher.java:54)
org.apache.felix.framework.EventDispatcher$1.run(EventDispatcher.java:102)
java.lang.Thread.run(Thread.java:748)
Update5:
After spending lot of time i finally realize that by adding below bundles it got stuck, if i dont add them it works fine
wrappedBundle( maven("org.ops4j.pax.tinybundles", "tinybundles").versionAsInProject() ), //2.1.0
wrappedBundle( maven("biz.aQute.bnd", "bndlib").versionAsInProject() )//2.4.0
Regards,
I resolved issue by changing following jars version
maven("org.ops4j.pax.tinybundles", "tinybundles") from 2.1.0 to 3.0.0
maven("biz.aQute.bnd", "bndlib") from 2.4.0 to 3.5.0

SonarQube Version - 5.6.6 shows Still waiting for WebServer

I have problem with SonarQube-5.6.6 Server Service Startup
Our Environment details as follows:
SonarQube Server Version - 5.6.6 (64-Bit)
Operating System – Ubuntu - 14.04.5 LTS (64-Bit)
mysql Ver 14.14 Distrib 5.6.33, for debian-linux-gnu (x86_64) using EditLine wrapper
Problem Description:
I have copied the dumped mysql file from another sonarqube-5.1 version server and I have successfully restored in my current sonarqube-5.6.6 server.
Later when I tried to start the SonarQube service, It shows below details,
2017.05.23 14:46:36 INFO app[o.s.p.m.Monitor] Process[web] is up
2017.05.23 14:46:36 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[ce]: /usr/lib/jvm/jdk1.8.0_131/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/opt/sonarqube-5.6.6/temp -javaagent:/usr/lib/jvm/jdk1.8.0_131/jre/lib/management-agent.jar -cp ./lib/common/*:./lib/server/*:./lib/ce/*:/opt/sonarqube-5.6.6/lib/jdbc/mysql/mysql-connector-java-5.1.35.jar org.sonar.ce.app.CeServer /opt/sonarqube-5.6.6/temp/sq-process2919432455637110534properties
2017.05.23 14:46:37 INFO ce[o.s.p.ProcessEntryPoint] Starting ce
2017.05.23 14:46:37 INFO ce[o.s.c.a.WebServerWatcherImpl] Waiting for Web Server to be operational...
2017.05.23 14:46:38 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2017.05.23 14:46:40 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2017.05.23 14:46:45 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2017.05.23 14:46:58 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2017.05.23 14:47:32 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2017.05.23 14:49:06 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
2017.05.23 14:53:21 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer...
So could you help me to resolve the same.

Selenium "chrome not reachable" error and can't access browser web elements after test kills existing browser and launches new

Selenium "chrome not reachable" error and can't access browser web elements after test kills existing browser and launches new
I'm using latest java, chrome driver and selenium 3.0 latest jar for automating web application, everything works very fine except when test fails; it kills browser according to my requirement and new test uses new browser but chrome shows unreachable.
Now is there any binding to previous session? How subsequent browser launch can't identify web objects and it works fine for first first launch only? Does anyone have solution for this or can anyone try in your framework after killing existing browser and launching new in between of the test using latest GA or beta web driver version?
Steps:
- Write below code and launch chrome using web driver
- Navigate to your web application
- Login to it (WORKS FINE)
- Assume test fails, so it kills existing chrome browser
- Again hits below code and opens new browser
- Navigate to application again
- Login to it (DOESN'T WORK - because it can't identify web objects for newly launched browser due to "chrome not reachable" error).
Code:
ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.switches","--disable-extensions");
options.addArguments("--start-maximized");
System.setProperty("webdriver.chrome.driver", chromedriverPath);
webDriver = new ChromeDriver(options);
webDriver.navigate().to(myURL);
WebDriver.findElement(By.cssSelector(input[class=LoginButton]))
Error:
Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700'
System info: host: 'abc', ip: '12.116.61.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129), userDataDir=C:\Users\abc\AppData\Local\Temp\scoped_dir7360_5203}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=52.0.2743.116, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 4d9e503ddb4ae1506b1592a0426bb7ff
*** Element info: {Using=css selector, value=input[class=LoginButton]}
129615 [main] INFO com.util.SleepUtil - Sleep: 1000 milliseconds ... (0/1000)
130615 [main] INFO com.util.SleepMetrics - Entry: com.selenium.functions.Login.NavigateTo() - Sleep: 1000/2000
130615 [main] INFO com.framework - ...WebDriver...findElement()
130615 [main] INFO com.framework - ...WebDriver...elementPresent()
130615 [main] INFO com.framework - ...WebDriver...getElementOrNull()
130615 [main] INFO com.framework - ...WebDriver...getElementByCss()
130615 [main] INFO com.framework - ...WebDriver...configureCssLocator()
132629 [main] INFO com.framework - ...WebDriver.findElement(By.cssSelector(input[class=LoginButton]))
135651 [main] INFO com.framework - ...getElementByCss()...org.openqa.selenium.WebDriverException: chrome not reachable

`gulp serve` gets stuck on "[BS] Reloading files that match: *.js"

I'm creating a site with yeoman using the yeogurt generator. After running yo yeogurt and going through the options, it finishes successfully with no errors and tells me I should now run gulp serve. However, when I do, it gets stuck on the last line of the output below:
[16:08:16] Using gulpfile ~/myproj/gulpfile.js
[16:08:16] Starting 'imagemin'...
[16:08:16] Starting 'copy'...
[16:08:16] Starting 'jade'...
[16:08:16] Starting 'sass'...
[16:08:16] Finished 'sass' after 124 ms
[16:08:16] Starting 'browserify'...
[16:08:16] Starting 'browserSync'...
[16:08:16] Finished 'browserSync' after 9.69 ms
[16:08:16] Starting 'watch'...
[16:08:16] Finished 'watch' after 39 ms
[16:08:16] gulp-imagemin: Minified 0 images
[16:08:16] Finished 'imagemin' after 355 ms
[BS] Access URLs:
-----------------------------------------
Local: http://localhost:3000/./
External: http://192.168.1.115:3000/./
-----------------------------------------
UI: http://localhost:3001
UI External: http://192.168.1.115:3001
-----------------------------------------
[BS] Serving files from: tmp
[BS] Reloading Browsers...
[16:08:16] Finished 'jade' after 492 ms
[16:08:16] Finished 'copy' after 495 ms
[BS] 1 file changed (main.css)
[16:08:17] 715847 bytes written (0.71 seconds)
./src/_scripts/main.js was browserified: 0.754s
[BS] Reloading files that match: *.js
I'm having a hard time tracking down this error.
For posterity: it wasn't 'stuck' at all. It had run successfully and the server was active on port 3000. I was just used to Gulp opening the browser window for you when the server starts, but with Yeogurt, it doesn't do that unless you add the --open flag.

Why is my m.e.a.n. server so slow?

I started a m.e.a.n. server with google compute engine. It seems ok but should it be this slow? The server is http://130.211.66.116:3000/
Everything seems ok but the response time is like 30 seconds. Is it just that the example configuration has too little power and I must create a new VM with more dedicated power? I used the example from google.
How I start it:
$ gulp
Invoking gulp - development
[08:04:58] Using gulpfile ~/onacciweb/gulpfile.js
[08:04:58] Starting 'clean'...
[08:04:58] Finished 'clean' after 4.95 ms
[08:04:58] Starting 'default'...
[08:04:58] Starting 'coffee'...
[08:04:58] Finished 'coffee' after 7.29 ms
[08:04:58] Starting 'clean'...
[08:04:58] Starting 'less'...
[08:04:58] Starting 'csslint'...
[08:04:58] Starting 'env:development'...
[08:04:58] Finished 'env:development' after 33 μs
[08:04:58] Starting 'devServe'...
[08:04:58] Finished 'devServe' after 65 ms
[08:04:58] Starting 'watch'...
[08:05:04] Finished 'watch' after 5.31 s
[08:05:04] Finished 'clean' after 5.62 s
[08:05:04] [nodemon] v1.4.1
[08:05:04] [nodemon] to restart at any time, enter `rs`
[08:05:04] [nodemon] watching: *.*
[08:05:04] [nodemon] starting `node --debug server.js`
debugger listening on port 5858
[08:05:05]
[08:05:05] Finished 'less' after 6.53 s
[08:05:05] csslint: 3 files lint free
[08:05:05] Finished 'csslint' after 6.35 s
[08:05:05] Starting 'development'...
[08:05:05] Finished 'development' after 12 μs
loading docs for: /home/niklasro/onacciweb/packages/core/articles
Mean app started on port 3000 (development) cluster.worker.id: 0
[08:05:07] index.html reloaded.
It looks like your issue is that livereload.js is timing out. On that Click to Deploy, I believe there are some post deployment steps that must be completed for final configuration of the MEAN instance. Did you successfully complete those?