Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Lakshay Gupta lakshaygupta21

🎯
Focusing
View GitHub Profile
View server.js
const brain = require('brain.js')
const data = require('./data')
const express = require('express')
var app = express()
const cors = require('cors')
app.use(cors())
var trainingData = []
var testingData = []
var maxClose = Math.max.apply(Math, data.map(function(o) {
return o.Close
View app.js
import React,{useEffect, useState} from 'react';
import logo from './logo.svg';
import axios from 'axios'
import './App.css';
function App() {
const[data,setData] = useState({
flag:false,
result:''
View app.ja
import React,{useEffect, useState} from 'react';
import logo from './logo.svg';
import axios from 'axios'
import './App.css';
function App() {
const[data,setData] = useState({
flag:false,
result:''
View app.js
import React,{useState} from 'react';
import logo from './logo.svg';
import axios from 'axios'
import './App.css';
function App() {
const[data,setData] = useState({
flag:false,
result:''
View server.js
const brain = require('brain.js')
const data = require('./data')
const express = require('express')
var app = express()
const cors = require('cors')
app.use(cors())
var trainingData = []
var maxClose = Math.max.apply(Math, data.map(function(o) {
return o.Close
}));
View trends.js
View data.js
import axios from 'axios'
import * as RNLocalize from "react-native-localize";
// const domain = "http://localhost:3001"
const domain = "https:apigoogletrends.herokuapp.com"
export const trendData = (trend1, trend2) => async (dispatch) => {
try {
dispatch({
type: 'SENDING'
})
console.log('dispatched')
View app.js
import React, { useEffect, useState, Fragment } from "react";
import Chart from 'react-google-charts'
import { connect} from "react-redux";
import {trendData, getTrending} from './actions/data'
import {PropTypes} from 'prop-types'
import loading from './loading.gif'
import Dropdown from 'react-dropdown';
import 'react-dropdown/style.css';
View server.js
const googleTrends = require('google-trends-api');
var express = require('express')
var cors = require('cors')
var app = express()
app.use(cors())
app.get("/", async (req, res) => {
res.json({
'Ping': 'Pong'
})
View reducer.js
const initialState = {
training: false,
founding: false,
resultN: 0,
red: Math.random(),
green: Math.random(),
blue: Math.random(),
whiteReturning: false,
blackReturning: false,
predicting: false,
You can’t perform that action at this time.