Skip to content

Commit

Permalink
Codebase from the private repo
Browse files Browse the repository at this point in the history
  • Loading branch information
archieskulkarni committed May 12, 2021
1 parent 49ba83a commit bc7063c
Show file tree
Hide file tree
Showing 80 changed files with 84,469 additions and 0 deletions.
44 changes: 44 additions & 0 deletions app/Google.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import pickle
import os
from google_auth_oauthlib.flow import Flow, InstalledAppFlow
from googleapiclient.discovery import build
from googleapiclient.http import MediaFileUpload, MediaIoBaseDownload
from google.auth.transport.requests import Request


def Create_Service(client_secret_file, api_name, api_version, *scopes):
'''
This function initiates the OAuth
'''
print(client_secret_file, api_name, api_version, scopes, sep='-')
CLIENT_SECRET_FILE = client_secret_file
API_SERVICE_NAME = api_name
API_VERSION = api_version
SCOPES = [scope for scope in scopes[0]]

cred = None

pickle_file = f'token_{API_SERVICE_NAME}_{API_VERSION}.pickle'

if os.path.exists(pickle_file):
with open(pickle_file, 'rb') as token:
cred = pickle.load(token)

if not cred or not cred.valid:
if cred and cred.expired and cred.refresh_token:
cred.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(CLIENT_SECRET_FILE, SCOPES)
cred = flow.run_local_server()

with open(pickle_file, 'wb') as token:
pickle.dump(cred, token)

try:
service = build(API_SERVICE_NAME, API_VERSION, credentials=cred)
print(API_SERVICE_NAME, 'service created successfully')
return service
except Exception as e:
print('Unable to connect.')
print(e)
return None
8 changes: 8 additions & 0 deletions app/PB_UI/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions app/PB_UI/.idea/open-pro-react.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions app/PB_UI/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

666 changes: 666 additions & 0 deletions app/PB_UI/.idea/workspace.xml

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions app/PB_UI/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# CHANGELOG.md

## [1.0.0] - 2020-08-24

First release

## [1.1.0] - 2020-10-14

- Updated cruip-js-toolkit dependency
@/package.json

- Fixed typos
@/src/pages/SignIn.js
@/src/pages/SignUp.js

- MC: Changed reveal delay
@/src/partials/HeroHome.js

- MC: Changed CSS animation name
@/src/css/additional-styles/theme.scss

- Changed the way of listening a route change
@/App.js

- Changed wrong function name
@/src/pages/Features.js

- Typo
@/src/pages/ResetPassword.js

- Missing indentation
@/src/partials/FeaturesZigZag.js
@/src/partials/News.js

- Removed unneeded onClick
@/src/partials/Header.js

- Fix carousel height adjustment
@/src/partials/Tabs.js
@/src/partials/TestimonialsCarousel.js
Binary file added app/PB_UI/build/9E2169D8A233A546.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions app/PB_UI/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"files": {
"main.css": "/static/css/main.e0cb9010.chunk.css",
"main.js": "/static/js/main.134abbdc.chunk.js",
"main.js.map": "/static/js/main.134abbdc.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.bda5de2d.js",
"runtime-main.js.map": "/static/js/runtime-main.bda5de2d.js.map",
"static/js/2.510e7e95.chunk.js": "/static/js/2.510e7e95.chunk.js",
"static/js/2.510e7e95.chunk.js.map": "/static/js/2.510e7e95.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.3196fc94e5bab8ef74cbc7d7e8259917.js": "/precache-manifest.3196fc94e5bab8ef74cbc7d7e8259917.js",
"service-worker.js": "/service-worker.js",
"static/css/main.e0cb9010.chunk.css.map": "/static/css/main.e0cb9010.chunk.css.map",
"static/js/2.510e7e95.chunk.js.LICENSE.txt": "/static/js/2.510e7e95.chunk.js.LICENSE.txt",
"static/media/404.jpg": "/static/media/404.0d608094.jpg",
"static/media/privacybot_head.svg": "/static/media/privacybot_head.2b79cb48.svg"
},
"entrypoints": [
"static/js/runtime-main.bda5de2d.js",
"static/js/2.510e7e95.chunk.js",
"static/css/main.e0cb9010.chunk.css",
"static/js/main.134abbdc.chunk.js"
]
}
8,661 changes: 8,661 additions & 0 deletions app/PB_UI/build/bot_background_removed.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/PB_UI/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/privacybot_head.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="PrivacyBot"/><link rel="apple-touch-icon" href="/privacybot_head.svg"/><link rel="manifest" href="/manifest.json"/><title>PrivacyBot</title><link href="/static/css/main.e0cb9010.chunk.css" rel="stylesheet"></head><body class="font-inter antialiased bg-gray-900 text-gray-200 tracking-tight"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,p,l=r[0],a=r[1],f=r[2],c=0,s=[];c<l.length;c++)p=l[c],Object.prototype.hasOwnProperty.call(o,p)&&o[p]&&s.push(o[p][0]),o[p]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(i&&i(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=p(p.s=t[0]))}return e}var n={},o={1:0},u=[];function p(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,p),t.l=!0,t.exports}p.m=e,p.c=n,p.d=function(e,r,t){p.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.t=function(e,r){if(1&r&&(e=p(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(p.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)p.d(t,n,function(r){return e[r]}.bind(null,n));return t},p.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(r,"a",r),r},p.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},p.p="/";var l=this["webpackJsonpopen-pro-react"]=this["webpackJsonpopen-pro-react"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var i=a;t()}([])</script><script src="/static/js/2.510e7e95.chunk.js"></script><script src="/static/js/main.134abbdc.chunk.js"></script></body></html>
Binary file added app/PB_UI/build/logo192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/PB_UI/build/logo512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions app/PB_UI/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "PrivacyBot",
"name": "PrivacyBot",
"icons": [
{
"src": "privacybot_head.svg",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/svg"
},
{
"src": "privacybot_head.svg",
"type": "image/svg",
"sizes": "192x192"
},
{
"src": "privacybot_head.svg",
"type": "image/svg",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "3789b5e98d5333119eb9e98b82df12a3",
"url": "/index.html"
},
{
"revision": "cf5946bda0fd05a9ed10",
"url": "/static/css/main.e0cb9010.chunk.css"
},
{
"revision": "0188938200803f9a1067",
"url": "/static/js/2.510e7e95.chunk.js"
},
{
"revision": "c64c486544348f10a6d6c716950bc223",
"url": "/static/js/2.510e7e95.chunk.js.LICENSE.txt"
},
{
"revision": "cf5946bda0fd05a9ed10",
"url": "/static/js/main.134abbdc.chunk.js"
},
{
"revision": "29d450d6c514390009fb",
"url": "/static/js/runtime-main.bda5de2d.js"
},
{
"revision": "0d608094915f341ea2051a8b63647719",
"url": "/static/media/404.0d608094.jpg"
},
{
"revision": "2b79cb48266c7dbff103161041540e47",
"url": "/static/media/privacybot_head.2b79cb48.svg"
}
]);

0 comments on commit bc7063c

Please sign in to comment.