repo_id stringclasses 208
values | file_path stringlengths 31 190 | content stringlengths 1 2.65M | __index_level_0__ int64 0 0 |
|---|---|---|---|
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/test_path_conf.py | """
This conf file would have the relative paths of the files & folders.
"""
import os
#POM
#Files from src POM:
src_pom_file1 = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','__init__.py'))
src_pom_file2 = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','conftest.py'))
src_pom_file3 = os.pat... | 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/opera_browser_conf.py | """
conf file for updating Opera Browser Location
"""
location = "Enter the Opera Browser Location"
| 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/testrailenv_conf.py | """
Conf file to hold the TestRail url and credentials
"""
testrail_url = "Add your testrail url"
testrail_user = "Add your testrail username"
testrail_password = "Add your testrail password"
| 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/locators_conf.py | #Common locator file for all locators
#Locators are ordered alphabetically
############################################
#Selectors we can use
#ID
#NAME
#css selector
#CLASS_NAME
#LINK_TEXT
#PARTIAL_LINK_TEXT
#XPATH
###########################################
#Locators for the home page (home_page.py)
home_page_header... | 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/copy_framework_template_conf.py | """
This conf file would have the relative paths of the files & folders.
"""
import os
#dst_folder will be Myntra
#Files from src:
src_file1 = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','__init__.py'))
src_file2 = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','conftest.py'))
src_file3 = ... | 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/os_details.config | # Set up an OS details and browsers we test on.
[Windows_7_Firefox]
os = Windows
os_version = 7
browser = Firefox
browser_version = 41.0
[Windows_7_IE]
os = Windows
os_version = 7
browser = IE
browser_version = 11.0
[Windows_7_Chrome]
os = Windows
os_version = 7
browser = Chrome
browser_version = 43.0
[Windows_7_Op... | 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/base_url_conf.py | """
Conf file for base_url
"""
base_url = "https://weathershopper.pythonanywhere.com/"
| 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/browser_os_name_conf.py | """
Conf file to generate the cross browser cross platform test run configuration
"""
from . import remote_credentials as conf
#Conf list for local
default_browser = ["chrome"] #default browser for the tests to run against when -B option is not used
local_browsers = ["firefox","chrome"] #local browser list against wh... | 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/conf/remote_credentials.py | #Set REMOTE_BROWSER_PLATFROM TO BS TO RUN ON BROWSERSTACK else
#SET REMOTE_BROWSER_PLATFORM TO SL TO RUN ON SAUCE LABS
REMOTE_BROWSER_PLATFORM = "BS"
USERNAME = "Enter your username"
ACCESS_KEY = "Enter your access key"
| 0 |
qxf2_public_repos/pr-training-example | qxf2_public_repos/pr-training-example/.circleci/config.yml | version: 2
jobs:
toxify:
docker:
- image: themattrix/tox
parallelism: 3
steps:
- checkout
- run: pip install tox
- run: git clone https://github.com/qxf2/bitcoin-info.git
- run: openssl aes-256-cbc -d -md sha256 -in ./conf/remote_credentials_enc.py -o... | 0 |
qxf2_public_repos | qxf2_public_repos/growing-pains/problems.csv | "Our interviews are inconsistent","Our interviews depend heavily on the interviewer and their own background and beliefs. Further, our interview notes are not very good. The notes do not help the next interviewer form a good idea of what to expect. They do not tell me how the interviewer was thinking. They do not tell ... | 0 |
qxf2_public_repos | qxf2_public_repos/growing-pains/LICENSE | MIT License
Copyright (c) 2020 qxf2
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, ... | 0 |
qxf2_public_repos | qxf2_public_repos/growing-pains/requirements.txt | Flask==1.1.2
| 0 |
qxf2_public_repos | qxf2_public_repos/growing-pains/README.md | # growing-pains
Code for growing-pains.qxf2.com
### Background
There is a small chance that Qxf2 will grow larger in the coming years. Like any chess player, I belive in preparing, evaluating and familiarizing ourselves with future positions that might arise. This app is one way for me to share some problems and situa... | 0 |
qxf2_public_repos | qxf2_public_repos/growing-pains/pains.py | """
A simple Flask app that fetches you a random quote
"""
import csv
import os
import random
import flask
from flask import render_template
app = flask.Flask(__name__)
INPUT_DATA = os.path.join(os.path.dirname(__file__), 'problems.csv')
def get_all_pains():
"""Return a list of all growing pains"""
all_pains ... | 0 |
qxf2_public_repos/growing-pains | qxf2_public_repos/growing-pains/templates/all.html | {% extends "base.html" %} {% block content %}
<div class="row top-space-30">
<div class="col-md-10 col-md-offset-1">
<table id="all-pains" class="display" style="width:100%">
<thead>
<tr>
<th>Summary</th>
<th>Description</th>
... | 0 |
qxf2_public_repos/growing-pains | qxf2_public_repos/growing-pains/templates/index.html | {% extends "base.html" %} {% block content %}
<div class="row top-space-30">
<div class="col-md-8 col-md-offset-2">
<div class="panel">
<h3 id="summary">What is this?</h3>
<p class="mb-0 top-space-30 text-justify" id="description">Qxf2 might grow larger in the coming years. Like any ... | 0 |
qxf2_public_repos/growing-pains | qxf2_public_repos/growing-pains/templates/base.html | <html>
<head>
<title>Growing pains at Qxf2</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jque... | 0 |
qxf2_public_repos | qxf2_public_repos/weather-shopper/weather_shopper.py | """
Flask app built to teach trainees Selenium
"""
from flask import Flask
from flask import render_template
from flask import request
from flask import redirect, url_for
#from flask import _request_ctx_stack
from flask import jsonify
import random
app = Flask(__name__)
@app.route("/")
def index():
"Return the ... | 0 |
qxf2_public_repos | qxf2_public_repos/weather-shopper/LICENSE | MIT License
Copyright (c) 2019
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, subl... | 0 |
qxf2_public_repos | qxf2_public_repos/weather-shopper/requirements.txt | flask>=1.0.2
| 0 |
qxf2_public_repos | qxf2_public_repos/weather-shopper/README.md | # A practical way to learn Selenium and practice programming simultaneously
Team [Qxf2](https://qxf2.com/?utm_source=github&utm_medium=click&utm_campaign=Weather%20shopper) created a web application to help testers learn Selenium and practice a programming language simultaneously. You can visit http://weathershopper.p... | 0 |
qxf2_public_repos/weather-shopper/static | qxf2_public_repos/weather-shopper/static/css/ws_style.css | @import url('https://fonts.googleapis.com/css?family=Open+Sans');
body {
font-size: 18px;
font-family: "Open Sans", serif;
line-height: 2.0;
}
h1 {
font-family: "Abel", Arial, sans-serif;
font-weight: 400;
font-size: 60px;
color: #000000;
line-height: 1.0;
}
.headline {
font-size: ... | 0 |
qxf2_public_repos/weather-shopper/static | qxf2_public_repos/weather-shopper/static/js/ws_common.js | $(document).ready(function () {
$('[data-toggle="popover"]').popover();
});
var cart = {};
var item_count = 0;
function addToCart(name, price) {
cart[name]=price;
console.log(cart);
item_count = item_count + 1;
document.getElementById("cart").innerHTML = item_count + " item(s)";
};
function goToCar... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/ws_base.html | <html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-38578610-11"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/index.html | {% extends "ws_base.html" %} {% block content %}
<div class="container top-space-50">
<div class="row justify-content-center">
<h2>Current temperature</h2>
<span class="octicon octicon-info" data-toggle="popover" title="Your task" data-content="Shop for moisturizers if the weather i... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/about.html | {% extends "ws_base.html" %} {% block content %}
<div class="container">
<div class="row justify-content-center">
<h1>About weather shopper app</h1>
<p class="text-justify top-space-40">
This web application is created and maintanied by <a href="https://qxf2.com/">Qx... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/confirmation.html | {% extends "ws_base.html" %}
{% block content %}
<div class="container top-space-50">
<div class="row justify-content-center">
{% if flag == true %}
<h2>PAYMENT SUCCESS</h2>
{% else %}
<h2>PAYMENT FAILED</h2>
{% endif %}
<span class="octicon octicon-info" data-toggle... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/moisturizer.html | {% extends "ws_base.html" %}
{% include "ws_cart.html" %}
{% block content %}
<div class="container">
<div class="row justify-content-center">
<h2>Moisturizers</h2>
<span class="octicon octicon-info" data-toggle="popover" title="Your task"
data-content="Add two moisturizers to your cart.... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/cart.html | {% extends "ws_base.html" %}
{% block content %}
<div class="container top-space-50">
<div class="row justify-content-center">
<h2>Checkout</h2>
<span class="octicon octicon-info" data-toggle="popover" title="Your task"
data-content="Verify that the shopping cart looks correct. Then, fi... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/sunscreen.html | {% extends "ws_base.html" %}
{% include "ws_cart.html" %}
{% block content %}
<div class="container">
<div class="row justify-content-center">
<h2>Sunscreens</h2>
<span class="octicon octicon-info" data-toggle="popover" title="Your task"
data-content="Add two sunscreens to your cart. Fir... | 0 |
qxf2_public_repos/weather-shopper | qxf2_public_repos/weather-shopper/templates/ws_cart.html | <nav class="navbar navbar-expand-sm sticky-top">
<!-- Links -->
<ul class="navbar-nav ml-auto">
<button onclick="goToCart()" class="thin-text nav-link">Cart - <span id="cart">Empty</span></button>
</ul>
</nav>
| 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/LICENSE | MIT License
Copyright (c) 2020 qxf2
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, ... | 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/Dockerfile | # Dockerfile
FROM python:3.8
# Set working directory
WORKDIR /code/backend/app
# Add and install requirements
ADD ./backend/requirements.txt /code/backend/requirements.txt
ADD ./frontend/package.json ./frontend/package-lock.json /code/react_node_packages/
ADD ./virtualized_employees_graphql_server/package.json /code/... | 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/README.md | # Qxf2 Survey App
This is a survey app designed to help keep track of the interactions by employees in Qxf2 Services, as well as the technologies they have learned. It is built with a React frontend, the backend is implemented using Python and FastAPI, and the database used to store the responses is Neo4j.
### Setup
... | 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/.dockerignore | **/*.env | 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/migration_test.py | '''
Test to compare the database after migration
'''
import quilt
import pandas as pd
from backend.app.db import schemas, session as db
from backend.app.db.queries import cypher
GRAPH = db.auth()
app = quilt.load('qxf2/dev_survey')
employee_data=list(GRAPH.run(cypher.GET_ALL_USERS))
employee_list = [employee[0] for e... | 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/docker-compose.yml | version: '3'
services:
neo-db:
image: neo4j:4.4-community
ports:
- 7474:7474
- 7473:7473
- 7687:7687
environment:
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
- NEO4J_AUTH=${DATABASE_USERNAME}/${DATABASE_PASSWORD}
volumes:
- data:/data
- logs:/logs
python-app:
i... | 0 |
qxf2_public_repos | qxf2_public_repos/qxf2-survey/.env.example | # Neo4j database password
DATABASE_PASSWORD = "dummy-neo4j-password"
# A token to validate the api requests
API_KEY = "dummy-key"
# A token to validate the api requests(Should be same as API_KEY)
REACT_APP_API_KEY = "dummy-key"
#Graphql credentials
GRAPHQl_USERNAME = "dummy-graphql-user"
GRAPHQL_PASSWORD = "dummy-gr... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/frontend/README.md | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will r... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/frontend/package-lock.json | {
"name": "frontend",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.10.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTyn... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/frontend/package.json | {
"name": "frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@pathofdev/react-tag-input": "^1.0.7",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"axios": "^0.20.0",
"bcryptjs": "^2.4.3",
"bootstrap": "^4.5.2",
"c... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/frontend/.env.example | # A token to validate the api requests
REACT_APP_API_KEY = ""
#Client id of app
REACT_APP_CLIENT_ID = "" | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/public/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created u... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/public/manifest.json | {
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/public/robots.txt | # https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
| 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/Login.css | .g-signin{
position: relative;
top: auto;
left: auto;
margin-top: 100px;
margin-left: auto;
} | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/App.css | #page-body{
max-width: 700px;
margin: auto;
padding-top: 64px;
}
nav {
border-bottom: 4px solid lightblue;
text-align: center;
position: fixed;
top: 0;
width: 100%;
background: white;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav li {
display: inline-block;
padding-top: 1... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
// If you want your app to work offline and load f... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/index.css | body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Mona... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/App.test.js | import React from 'react';
import { render } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
| 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/serviceWorker.js | // This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a p... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/setupTests.js | // jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
| 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/logo.svg | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
<g fill="#61DAFB">
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-... | 0 |
qxf2_public_repos/qxf2-survey/frontend | qxf2_public_repos/qxf2-survey/frontend/src/App.js | import React from 'react';
import {
BrowserRouter as Router,
Route,
Switch,
} from 'react-router-dom'
import './App.css';
import NavBar from './components/NavBar';
// import firstQuestion from './components/firstQuestion';
import NotFoundPage from './pages/NotFoundPage';
import SurveyPage from './pages/SurveyPage... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/components/NavBar.js | import React from 'react';
import { Link } from 'react-router-dom';
const NavBar = () => (
<nav>
<ul>
<li>
<Link to="/">Survey</Link>
</li>
<li>
<Link to="/dashboard">Dashboard</Link>
</li>
<li>
<Lin... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/AdminPage.js | import React, { useState, useEffect } from 'react';
import axios from "axios";
import url_conf from "./data/urlConf";
import LoginForm from "./login"
import { GoogleLogout } from 'react-google-login';
axios.defaults.headers.common['User'] = process.env.REACT_APP_API_KEY
const clientId = process.env.REACT_APP_CLIENT_ID... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/QuestionForm.js | import React, { useEffect } from "react";
import MultiSelect from "react-multi-select-component";
import "@pathofdev/react-tag-input/build/index.css";
import ReactTagInput from "@pathofdev/react-tag-input";
import "bootstrap/dist/css/bootstrap.min.css";
import Button from "react-bootstrap/Button";
import employeeList f... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/NotFoundPage.js | import React from 'react';
const NotFoundPage = () => {
return (
<div
style={{
backgroundColor: "white",
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0
}}
>
<div
style={{
position: "absolute",
top: "50%"... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/ConfirmationPage.js | import React,{ useState, useEffect } from "react";
import axios from "axios";
import url_conf from "./data/urlConf"
import employeeList from "./data/employeeList.js";
axios.defaults.headers.common['User'] = process.env.REACT_APP_API_KEY
function ConfirmationPage(props) {
var email = props.state.email;
var tagList... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/login.js | import React, { useState } from 'react';
import { GoogleLogin, GoogleLogout } from 'react-google-login';
import "../Login.css";
import url_conf from "./data/urlConf";
const clientId = process.env.REACT_APP_CLIENT_ID;
export default function Login({Login}) {
const [showloginButton, setShowloginButton] = useState(... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/DashboardPage.js | import React from 'react';
import ReactWordcloud from 'react-wordcloud';
import 'tippy.js/dist/tippy.css';
import 'tippy.js/animations/scale.css';
import {HorizontalBar} from 'react-chartjs-2';
import symData from './data/SymmetryData';
import overallData from './data/OverallData';
import CloudData from './data/CloudDa... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src | qxf2_public_repos/qxf2-survey/frontend/src/pages/SurveyPage.js | import React from "react";
import { Steps, Step } from "react-step-builder";
import QuestionForm from "./QuestionForm";
import ConfirmationPage from "./ConfirmationPage";
function SurveyPage() {
return (
<div className="App">
<Steps>
<Step component={QuestionForm} />
<Step component={Confir... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src/pages | qxf2_public_repos/qxf2-survey/frontend/src/pages/data/employeeList.js | import axios from "axios";
import URL from "./urlConf";
axios.defaults.headers.common['User'] = process.env.REACT_APP_API_KEY
var data = [];
axios.get(`${URL}/survey/admin/employees`)
.then(function (response) {
for (var i in response.data)
{
if (response.data[i]['status'].toLowerCase() === "y" && r... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src/pages | qxf2_public_repos/qxf2-survey/frontend/src/pages/data/urlConf.js | const url = process.env.REACT_APP_BACKEND_URL;
export default url; | 0 |
qxf2_public_repos/qxf2-survey/frontend/src/pages | qxf2_public_repos/qxf2-survey/frontend/src/pages/data/CloudData.js | const words = [
{
text: 'Python',
value: 75,
},
{
text: 'Git',
value: 55,
},
{
text: 'AWS',
value: 64,
},
{
text: 'API',
value: 33,
},
{
text: 'DynamoDB',
value: 43,
},
{
text: 'Elastic Beanstalk',
value: 26,
},
{
text: 'Github Actions',
... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src/pages | qxf2_public_repos/qxf2-survey/frontend/src/pages/data/OverallData.js | const OverallData = {
labels: ['Rohan Joshi', 'Mohan Kumar', 'Kiran CV', 'Akkul DN', 'Rajkumar', 'Smitha', 'Rohan Dudam'],
datasets: [
{
label: "Symmetry Score",
backgroundColor: 'LightBlue',
borderColor: 'black',
borderWidth: 1,
hoverBackgroundColor: 'blue',
hoverBorderColor... | 0 |
qxf2_public_repos/qxf2-survey/frontend/src/pages | qxf2_public_repos/qxf2-survey/frontend/src/pages/data/SymmetryData.js | const SymmetryData = {
labels: ['Shivahari', 'Arunkumar', 'Rahul', 'Raji', 'Avinash', 'Smitha', 'Rohit'],
datasets: [
{
label: "Symmetry Score",
backgroundColor: 'LightBlue',
borderColor: 'black',
borderWidth: 1,
hoverBackgroundColor: 'blue',
hoverBorderColor: 'black',
... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/backend/conftest.py | # conftest.py
#from db_backup_and_restore import neo4j_restore
import subprocess
def pytest_sessionfinish(session, exitstatus):
if not hasattr(session.config, "workerinput"):
subprocess.call(["python", "./db_backup_and_restore/neo4j_restore.py", "--import_file", "./db_backup_and_restore/synthetic_data.zip"... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/backend/requirements.txt | fastapi==0.61.0
uvicorn==0.11.8
py2neo==2021.0.1
quilt==2.9.15
pandas>=1.1.5
numpy>=1.19.3
python-dateutil==2.8.1
google-auth==1.34.0
python-multipart==0.0.5
neo4j-backup==0.2.4
pytest>=7.2.0
requests>=2.28.1
python-decouple>=3.6
pytest-xdist>=3.1.0
wait-for-it>=2.2.2 | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/backend/.env.example | # Database auth details
DATABASE_USERNAME = ""
DATABASE_PASSWORD = ""
DATABASE_HOST = ""
# Param to construct endpoint URL in the test
URL = ""
# A token to validate the api requests
API_KEY = ""
# Name of the project displayed in the SwaggerUI
PROJECT_NAME = ""
# Client ID of the App
CLIENT_ID = ""
# Admin crede... | 0 |
qxf2_public_repos/qxf2-survey/backend | qxf2_public_repos/qxf2-survey/backend/app/conf.py | allow_origins = ["http://test-survey.qxf2.com",
"http://15.207.159.86",
"http://localhost:3000",
"http://www.survey.qxf2.com",
"http://survey.qxf2.com",
"https://www.survey.qxf2.com",
"https://survey.qxf2.com",
... | 0 |
qxf2_public_repos/qxf2-survey/backend | qxf2_public_repos/qxf2-survey/backend/app/main.py | """
This is the main module which integrates all the other backend related modules
"""
import uvicorn
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from api.v1 import api
import conf
app = FastAPI(title="Help-Survey", openapi_url="/survey/apis")
# To handle CORS (Cross-Origin Resourc... | 0 |
qxf2_public_repos/qxf2-survey/backend/app | qxf2_public_repos/qxf2-survey/backend/app/core/config.py | """
This module contains the configuration related methods/variables
"""
from decouple import config
API_KEY = config("API_KEY")
PROJECT_NAME = config("PROJECT_NAME")
| 0 |
qxf2_public_repos/qxf2-survey/backend/app | qxf2_public_repos/qxf2-survey/backend/app/core/security.py | """
This module models the api request validation
"""
import secrets
from typing import Optional
from fastapi import HTTPException, Security
from fastapi.security.api_key import APIKeyHeader
from starlette.status import HTTP_400_BAD_REQUEST, HTTP_401_UNAUTHORIZED
from core import config
from core.messages import AUTH_... | 0 |
qxf2_public_repos/qxf2-survey/backend/app | qxf2_public_repos/qxf2-survey/backend/app/core/messages.py | """
This module contains the suitable messages if the api request validation fails
"""
NO_API_KEY = "No API key provided."
AUTH_REQ = "Invalid API Key"
HTTP_500_DETAIL = "Internal server error."
# templates
NO_VALID_PAYLOAD = "{} is not a valid payload."
| 0 |
qxf2_public_repos/qxf2-survey/backend/app | qxf2_public_repos/qxf2-survey/backend/app/db/session.py | """
This module authenticates and connects to the neo4j database
"""
from py2neo import Graph
from decouple import config
# Grabbing environment variables
HOSTNAME = config("DATABASE_HOST")
USERNAME = config("DATABASE_USERNAME")
PASSWORD = config("DATABASE_PASSWORD")
def auth():
"Authenticating with the Databas... | 0 |
qxf2_public_repos/qxf2-survey/backend/app | qxf2_public_repos/qxf2-survey/backend/app/db/schemas.py | """
This module models the api request bodies
"""
from typing import Dict
from pydantic import BaseModel, Field, StrictStr
import datetime
class EmployeeData(BaseModel):
"request body"
data: Dict
class EmployeeRegsitrationData(BaseModel):
"""Model for the data inside the request body."""
firstName: ... | 0 |
qxf2_public_repos/qxf2-survey/backend/app | qxf2_public_repos/qxf2-survey/backend/app/db/init_db.py | """
This module populates the neo4j database with quilt data
"""
import session as db
from queries import cypher
GRAPH = db.auth()
PATH = "file:///"
def import_employee_csvs():
"imports the csv files related to employee nodes"
GRAPH.run(cypher.IMPORT_EMPLOYEES,\
parameters={"path": PATH + "em... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/db | qxf2_public_repos/qxf2-survey/backend/app/db/migrations/quilt2neo4j.py | """
This module migrates the existing quilt database to neo4j database
"""
import quilt
import pandas as pd
import numpy as np
def preprocess(df, drop_col=None, drop_na=False, strip_col=None):
if drop_col is not None:
df = df.drop(drop_col, axis=1)
if drop_na:
df.replace([""], float("NaN"), i... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/db | qxf2_public_repos/qxf2-survey/backend/app/db/queries/graphql_queries.py | from decouple import config
USERNAME = config("GRAPHQl_USERNAME")
PASSWORD = config("GRAPHQL_PASSWORD")
authorise = f"""mutation {{
auth(password: "{PASSWORD}", username: "{USERNAME}") {{
accessToken
refreshToken
}}
}}"""
fetch_employees = """query
findAllEmployees{
allEmp... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/db | qxf2_public_repos/qxf2-survey/backend/app/db/queries/cypher.py | """
This module contains the cypher queries required to communicate with the backend
"""
IMPORT_EMPLOYEES = """LOAD CSV WITH HEADERS FROM $path as row\
MERGE (e:Employees {fullName: row.fullName,\
ID: toInteger(row.ID),\
... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/api | qxf2_public_repos/qxf2-survey/backend/app/api/v1/api.py | """
This module models the endpoints in the survey app
"""
from fastapi import APIRouter
from .routes import survey, admin
app = APIRouter()
app.include_router(router=survey.router, prefix="", tags=["Response"])
app.include_router(router=admin.router, prefix="/admin", tags=["Admin"])
| 0 |
qxf2_public_repos/qxf2-survey/backend/app/api/v1 | qxf2_public_repos/qxf2-survey/backend/app/api/v1/dependencies/employee.py | """
This module contains the methods related to the nodes with employee label in the database
"""
import os
import sys
from pandas import DataFrame
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(\
os.path.abspath(__file__))))))
from db ... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/api/v1 | qxf2_public_repos/qxf2-survey/backend/app/api/v1/dependencies/technology.py | """
This module contains the methods related to the nodes with technology label in the database
"""
from pandas import DataFrame
from db.queries import cypher
from db import session
GRAPH = session.auth()
def is_new(tech):
"checks if the given technology is a new entry in the database"
techs = DataFrame(GRA... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/api/v1 | qxf2_public_repos/qxf2-survey/backend/app/api/v1/routes/survey.py | """
This module contains the endpoints related to Survey page in the frontend
"""
import os
import sys
from datetime import datetime
from dateutil.relativedelta import relativedelta, FR
from fastapi import APIRouter
from ..dependencies.employee import get_user_name, create_help_relation
from ..dependencies.technology ... | 0 |
qxf2_public_repos/qxf2-survey/backend/app/api/v1 | qxf2_public_repos/qxf2-survey/backend/app/api/v1/routes/admin.py | """
This module contains the endpoints related to Admin page in the frontend
"""
import os
import sys
from datetime import datetime , timedelta, date
from dateutil.relativedelta import relativedelta, FR
from fastapi import APIRouter, Depends, Form, HTTPException
from py2neo import Node
from ..dependencies.employee imp... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/sequential_tests/test_add_new_employee.py | """
Test for /survey/admin/new_employee endpoint.
The test is used to add new employee to the database
The following test is covered:
1. Add a new employee
2. Make sure employee has been added by getting the employee details via /survey/admin/get_employee_by_email endpoint
3. The employee ID of the newly added employee... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/sequential_tests/test_post_survey_response.py | """
Test for survey API endpoint `/survey/response` that is used to submit the survey response.
The response is stored on the Friday of the current week.
Test cases that will be covered in this test:
1) Test Case 1
- Submit a response with help data and technology learnt data
- Use /survey/admin/QElo_filter_res... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/sequential_tests/test_update_employee_status.py | """
Test for survey API endpoint `/survey/admin/update_employee_status`.
The endpoint is used to update the status of an employee.
Employee status can either be 'Y' or 'N'
The following test is covered:
1. Update the status of an inactive user to active
2. Use the `/survey/admin/get_employee_by_email` to get employee e... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/parallel_tests/test_not_responded_users.py | """
Tests for survey API endpoint '/survey/admin/not_responded_users'
that fetches all the users that have not responded to the survey
Test cases:
* Check the employees that have not responded to the survey and are active
* Mock response given from an employee and verify that the employee is not listed
"""
imp... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/parallel_tests/test_responses_employee_by_email.py | """
Tests for survey API endpoint '/survey/admin/get_employee_by_email' that fetches employee details by email
Test API response for endpoint by
- passing an email that exists in the database and validate the response data
- passing an email that does not exist in database and validate the response
"""
impo... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/parallel_tests/test_technology_learnt.py | """
Tests for survey API endpoint '/survey/admin/techs_learnt_on_week' that fetches all the dates on which technology is learned and not learned
Test API response for different dates
- Date of the week on which technology is learned
- Date of the week on which technology is not learned
"""
import os
import jso... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/parallel_tests/test_employees_delete_endpoint.py | """
Tests for survey API delete endpoint '/survey/admin/employees/{id}' that deletes the employee record with id mentioned in request
Test API response for when
- ID of user that exists in database is passed
- ID of user that does not exist in database is passed
Note: using the same ID for both scenarios here, because,... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/parallel_tests/test_technology_between_dates.py | """
Tests for survey API endpoint '/survey/admin/QElo_filter_technology'
- Endpoint that fetches all tech responses, between the date range passed
Test cases:
1. Date range one year prior the the dates where data exists
2. Date range that covers all three weeks of existing data
3. Date range that covers... | 0 |
qxf2_public_repos/qxf2-survey/backend/tests | qxf2_public_repos/qxf2-survey/backend/tests/parallel_tests/test_responses_between_dates.py | """
Tests for survey API endpoint '/survey/admin/QElo_filter_response' that fetches all the user responses between two given dates
Test API response for different date ranges
- Date range within which all the test data is present
- Date range 1 year prior to the date where test data is stored
- Current dat... | 0 |
qxf2_public_repos/qxf2-survey/backend | qxf2_public_repos/qxf2-survey/backend/db_backup_and_restore/README.md | #Backup and restore Neo4j database
The scripts in this directory are used to backup the Neo4j database and restoring the backup
##WARNING:## The restore script deletes all records in the existin database.Never run against production
##neo4j_json_backup.py:
- This script is used to backup the neo4j database using the `... | 0 |
qxf2_public_repos/qxf2-survey/backend | qxf2_public_repos/qxf2-survey/backend/db_backup_and_restore/neo4j_json_backup.py | """
Backup Neo4j database
"""
from neo4j import GraphDatabase
from neo4j_backup import Extractor
from decouple import config
import shutil
import argparse
import os
# Grabbing environment variables
HOSTNAME = config("DATABASE_HOST")
USERNAME = config("DATABASE_USERNAME")
PASSWORD = config("DATABASE_PASSWORD")
if __na... | 0 |
qxf2_public_repos/qxf2-survey/backend | qxf2_public_repos/qxf2-survey/backend/db_backup_and_restore/neo4j_restore.py | """
Clear the existing database and restore the Neo4j backup
"""
import os
import sys
from neo4j import GraphDatabase
from neo4j_backup import Importer
from py2neo import Graph
from decouple import config
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from app.db import schemas, session a... | 0 |
qxf2_public_repos/qxf2-survey | qxf2_public_repos/qxf2-survey/awareness_score/conf.py | API_KEY = ""
URL = ""
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.