How to configure and run nginx-gridfs - c

I am trying to run nginx-gridfs from github to connect mongodb with nginx . I followed the exact procedure as shown in the https://github.com/mdirolf/nginx-gridfs README file .
I compiled and make nginx in my system.by following step
$ ./configure --add-module=/path/to/nginx-gridfs/source/
$ make
$ make install
Now what to do next
I am unable to understand how to impliment Configuration Directives part in in README file .
Now the nginx-gridfs has ngx_http_gridfs_module.c .Do I have to compile it and run it in order to see the response .I compiled and make mongo c drivers and run the example.c it ran well .
Do somebody guide me or give me some good links which explains step by step configuration of nginx-gridfs .
My final aim is to link nginx+mongodb+C code ..
please help me ...

Related

net/rime.h error using Cooja, how can I install it but not just download it?

I am trying to do a simple simulation in Cooja (literally the example on the Contiki website here).
However I have an error message linked to my #include "net/rime.h", Cooja outputs the following message while compiling:
fatal error: net/rime.h: No such file or directory
I thought that it came with Contiki when I've installed contiki-ng following the procedure on the official website. My quick fix was to download the file from the github repository and store it in my active directory. However I find it quite ugly, is there a way to install this library ? Because I haven't found a way yet.
Thanks a lot.
It's a question close to this one.
Which kind of method are you using to start Cooja? Directly on the SO? Over Docker?
I recommend you de Docker way, and remember to apply the command
git submodule update --init --recursive
after cloning the git repository.
Also, if you are using Docker, check if the binding of the Contiki folders between de Host and the Container are correctly made.

opam init fails - unable to create temp file

I have installed opam 2.1.0 on a Linux Virtualbox VM. When I try opam init, I get the following error:
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Could not update repository "default": OpamDownload.Download_fail(_, "Curl
failed: \"/snap/bin/curl --write-out %{http_code}\\\\n --retry 3
--retry-delay 2 --user-agent opam/2.1.0 -L -o
/tmp/opam-32196-d33843/index.tar.gz.part --
https://opam.ocaml.org/index.tar.gz\" exited with code 23")
[ERROR] Initial download of repository failed.
Running with --disable-sandboxing doesn't help. I know that its a problem creating/writing to /tmp/opam-... directory because if I replace that with my current directory or home directory the command by itself runs fine. It also runs fine with /tmp/opam-... if I use the --create-dirs option in curl but I don't have any way of getting opam init to use that option. Any ideas?
thanks
Update
The reason opam init failed for me was because curl was installed with snap on my system. This exactly what is going on with your VM.
Try to run opam init -verbose and that could reveal more about why you ran into an error.
In my case I needed to install other things with opam and it kept failing every time. So snap uninstall curl and then sudo apt install curl fixed things. (Was only able to figure this out with help from my professor)
Workaround
I ran into the same issue and I found a workaround on the OCaml forum: here. (Credits to UnixJunkie)
You can run:
opam init github git+https://github.com/ocaml/opam-repository.git
This should avoid the certificate issues. This worked for me.
I tried to fix the certificate issues using this answer as well. You could try doing that, but it seems complicated when the workaround is to simply point it to the github repo directly.
This question is similar to this one.

Where can I download mobilenet_v1_160res_0.5_imagenet_labels.txt for local testing?

For our course projects, we started off with Google's AIY Vision kit. I am looking into how to use output for next level processing. We are all newbies to ML
I am testing image classification using sources from Github AIY Projects on my mac.
python image_classification.py -i images/cat01.jpeg
FileNotFoundError: [Errno 2] No such file or directory: '/opt/aiy/models/mobilenet_v1_160res_0.5_imagenet_labels.txt'
I would like to test this to see output format that I want to use for next steps.
Where can I get the labels txt file?
I found a good Coral link that has TPU models and labels. Is there a way to use this instead?
couldn't get it to work on my mac but tried to create a dockerfile for some of the AIY example codes to run on a docker host within the mac.
The missing piece to overcome the error you listed above for me was to :
apt-get install -y aiy-models after adding the Debian repo source. Not sure how to get around that on the mac.

loading program in econotag (contiki 2.7)

I am currently trying to run my code(written and compiled in contiki 2.7) in econotag. However i wasn't able to do so. I can compile with out any problem using
make TARGET=econotag hello-world.
but when i try to upload using the command
make TARGET=econotag hello-world.upload
the following message appears
../../platform/econotag/Makefile.econotag:10: ../..
make: *** No rule to make target `hello-world.upload'. Stop.
I know it used to work perfectly in contiki-2.6 with TARGET=redbee-econotag. so i tried it but the message was
**** This platform is old and will soon be removed ****
please use TARGET=econotag instead.
(or set ALLOW_OLD_PLATFORMS=1 to proceed)
. Stop.
I have seen some posts about installing the tool chain for uploading on econotag. but they didn't provide step by step procedure.
can anyone tell me what/how i should to install the tool chain to solve this problem and what command i should use after installation.
Here is how my colleague solved it
first compile the program you want to load (in this case hello-world) with
the command
make TARGET=econotag hello-world
note that this will generate a binary file with file name hello-world_econotag.bin (in the same directory with the code)
then go to directory
contiki-2.7/cpu/mc1322x/tools
and execute the pearl script used to upload binary files. (use the following command)
sudo ./mc1322x-load.pl -f "path to your binary file" -t /dev/ttyUSB1
this will upload the binary of your code to the econotag.
then reset your device (either with command or manually)
and the code should be running now

Go: install drive v2 package cmd/cgo error

I'm trying to get the google drive package for go, but using the below always throws the error. Should I be installing it manually?
./go get code.google.com/p/google-api-go-client/drive/v2
load cmd/cgo: package cmd/cgo: no Go source files in .../google_appengine/goroot/src/cmd/cgo
The package seems to be broken. The basename of its import path (v2) doesn't match the package name found there (drive).
I'm not sure but I guess maybe some script which generates something is broken. I suggest to ask the committer at golang-nuts
You are appear to be looking in google_appengine directories. Why?
What is the output from these commands?
$ go version
$ go env
$ env | grep '^PATH'

Resources