Google Credential API one tab sign-in support only google app engine? - google-identity

I'm learning google one tab sign-in according by https://codelabs.developers.google.com/codelabs/credential-management-api/index.html?index=..%2F..index#1
https://developers.google.com/identity/one-tap/web/guides/get-google-api-clientid
and
https://developers.google.com/web/fundamentals/security/credential-management
with 'password' login it work like a charm (without using python script)
but 'federated' login like google or facebook I have stuck on it.
I see demo server side scripts (main.py) from this repo https://github.com/GoogleChromeLabs/credential-management-sample
from google.appengine.ext import vendor
vendor.add('lib')
import os
import sys
import binascii
import json
import urllib
from bcrypt import bcrypt
from flask import Flask, request, make_response, render_template,\
session, redirect, url_for
from oauth2client import client
from google.appengine.ext import ndb
from google.appengine.api import urlfetch
...
I just carious about server side scripts rignt now google.appengine.ext only support on google app engine python runtime? Can I run this project on other server or localhost? or demo in other languages? I didn't find example (less document)
because of I tried to run demo project on localhost and I got error
Traceback (most recent call last):
File "working/main.py", line 17, in <module>
from google.appengine.ext import vendor
ModuleNotFoundError: No module named 'google'
Anyone help me please?

Related

Can't import cv2 package in jupyter notebook

In VS Code I created a virtualenv, installed opencv and wrote a few functions. The functions (which import cv2) work fine when running from terminal.
I now want to use those functions to collect some data in a jupyter notebook, so I added the venv kernel to jupyter, but when I try to import cv2 it says No module named 'cv2'
The venv is located in projects\francine\venv so everything looks right.

unable to import spss module in watson studio

I am trying to import the built in spss module for Time Forecasting.
But I am receiving the following error on running the import command in watson notebook
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from spss.ml.forecasting.timeseriesexploration import TimeSeriesExploration
ModuleNotFoundError: No module named 'spss'
Please let me know what resolution can be done or if any step needs to be done before import.
On running the command !pip install com.ibm.spss, the following error gets displayed
Collecting com.ibm.spss
ERROR: Could not find a version that satisfies the requirement com.ibm.spss (from versions: none)
ERROR: No matching distribution found for com.ibm.spss
Notebooks and SPSS modeller are two distinct features of Watson Studio, which use separate backends to run your computations. The SPSS modeller code is not installed in the Notebook runtimes. Neither is it open source code on PyPI, so you cannot install it with pip.
To use built-in SPSS modules, you have to work with the SPSS modeller feature instead of the Notebooks feature.

neo4j-admin import remote file

since neo4j-import will deprecated and not supported in the freature, neo4j-admin import is the recommended way to import data from CSV files, but it seems neo4j-admin import not support import not local file, such as URI like HTTP, HTTPS, FTP or HDFS, is that means we have to load all the files to neo4j server local file system?
example:
root#zengxijin-VirtualBox:/home/neo4j-community-3.4.7/bin# ./neo4j-admin import --database demo.db --id-type string --nodes "https://raw.githubusercontent.com/zengxijin/JavaHub/master/neo4j-tools/neo4j-admin/anticipant_entity.csv"
Directory of https:/raw.githubusercontent.com/zengxijin/JavaHub/master/neo4j-tools/neo4j-admin/anticipant_entity.csv doesn't exist
Yes, the neo4j-admin import (like the neo4j-import) can only uses local CSV files.

travis-ci path to the shared library or how to link shared library to python

ci professionals,
I cannot figure out why this code cannot find the shared library. Please see the log
https://pastebin.com/KvJP9Ms3
[31mImportError while importing test module '/home/travis/build/alexlib/pyptv/tests/test_pyptv_batch.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_pyptv_batch.py:1: in <module>
from pyptv import pyptv_batch
pyptv/pyptv_batch.py:20: in <module>
from optv.calibration import Calibration
E ImportError: liboptv.so: cannot open shared object file: No such file or directory[0m
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
[1m[31m=========================== 1 error in 0.43 seconds ============================[0m
the pull request
https://github.com/alexlib/pyptv/pull/4
and the build https://travis-ci.org/alexlib/pyptv/builds/342237102
We have a C library (http://github.com/openptv/openptv) that we need to compile and using Cython bindings add to Python, then we use Python through bindings. The tests work locally but not on Travis-CI (great service). I think it's a simple issue with paths, but I couldn't figure out how to deal with this.
Thanks in advance
Alex
The answer I have found was to set also the DYLD_LIBRARY_PATH that is required on Mac OS X:
export PATH=$PATH:/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib

Twitter API with OAuth2

I am trying to use Twitter API, I followed directions of http://code.google.com/p/python-twitter/
I installed all the required items, when i test it I get 17 errors.
When i try to import twitter it gives me:
File "C:\Python27\lib\site-packages\twitter.py", line 65, in <module>
import oauth2 as oauth
ImportError: No module named oauth2
I have looked at various questions on this topic, but none of them work for me or maybe because I am doing something wrong. Very lost since it seems i installed all the right files and etc.
Using easy_install bypassed all the problems I experienced with dependencies and installation
Do you have oauth2 installed in your python environment?
http://pypi.python.org/pypi/oauth2/
Perhaps also look into the python-oauth2 package for your OS? (Ubuntu | Debian | Fedora)

Resources