index
int64
0
0
repo_id
stringclasses
5 values
file_path
stringlengths
29
58
content
stringlengths
60
665k
__index_level_0__
int64
0
0
0
Chart\Chart
Chart\Chart\backend\manage.py
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lsg.settings') try: from django.core.management import execute_from_command_line except ImportEr...
0
0
Chart\Chart\backend\api\management
Chart\Chart\backend\api\management\commands\load_stocks.py
import random from datetime import datetime, timedelta from django.core.management.base import BaseCommand from django.db import transaction from django.utils import timezone from datetime import timezone as dt_timezone from api.models import Item class Command(BaseCommand): help = "Populate Item table with sto...
0
0
Chart\Chart\backend
Chart\Chart\backend\lsg\asgi.py
""" ASGI config for lsg project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_...
0
0
Chart\Chart\backend
Chart\Chart\backend\lsg\settings.py
""" Django settings for lsg project. Generated by 'django-admin startproject' using Django 5.2.1. For more information on this file, see https://docs.djangoproject.com/en/5.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/5.2/ref/settings/ """ from pathlib imp...
0
0
Chart\Chart\backend
Chart\Chart\backend\lsg\urls.py
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('api.urls')), ]
0
0
Chart\Chart\backend
Chart\Chart\backend\lsg\wsgi.py
""" WSGI config for lsg project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_...
0
0
Chart\Chart
Chart\Chart\frontend\package-lock.json
{ "name": "frontend", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "frontend", "version": "0.1.0", "dependencies": { "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16...
0
0
Chart\Chart
Chart\Chart\frontend\package.json
{ "proxy": "http://localhost:8000", "name": "frontend", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@testing-library/user-event": "^13.5.0", "axios": "^1.9.0", "hi...
0
0
Chart\Chart
Chart\Chart\frontend\README.md
# Getting Started with Create React App 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.\ Open [http://localhost:3000](http://localhost:3000) to view...
0
0
Chart\Chart\frontend
Chart\Chart\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
0
Chart\Chart\frontend
Chart\Chart\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
0
Chart\Chart\backend
Chart\Chart\backend\api\admin.py
from django.contrib import admin # Register your models here.
0
0
Chart\Chart\frontend
Chart\Chart\frontend\public\robots.txt
# https://www.robotstxt.org/robotstxt.html User-agent: * Disallow:
0
0
Chart\Chart\frontend
Chart\Chart\frontend\src\App.css
.App { text-align: center; } .App-logo { height: 40vmin; pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; } } .App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; al...
0
0
Chart\Chart\frontend
Chart\Chart\frontend\src\App.js
// src/App.js import React from 'react'; import TradingChart from './components/TradingChart'; function App() { return ( <div className="App"> <h1>Trading Dashboard</h1> <TradingChart /> </div> ); } export default App;
0
0
Chart\Chart\frontend
Chart\Chart\frontend\src\App.test.js
import { render, screen } from '@testing-library/react'; import App from './App'; test('renders learn react link', () => { render(<App />); const linkElement = screen.getByText(/learn react/i); expect(linkElement).toBeInTheDocument(); });
0
0
Chart\Chart\frontend
Chart\Chart\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
0
Chart\Chart\frontend
Chart\Chart\frontend\src\index.js
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> ); // If you want t...
0
0
Chart\Chart\frontend
Chart\Chart\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-27.5-35.3-41.6...
0
0
Chart\Chart\frontend
Chart\Chart\frontend\src\reportWebVitals.js
const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); })...
0
0
Chart\Chart\frontend
Chart\Chart\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';
0
0
Chart\Chart\frontend\src
Chart\Chart\frontend\src\components\TradingChart.js
import React, { useEffect, useState, useRef, useCallback } from 'react'; import Highcharts from 'highcharts/highstock'; import HighchartsReact from 'highcharts-react-official'; const SYMBOLS = ['AAPL', 'NFLX', 'GOOG', 'AMZN', 'TSLA']; const DEFAULT_VISIBLE_COLUMNS = { c1: true, c2: true, c3: true, c4: true, c5: true,...
0
0
Chart\Chart\backend
Chart\Chart\backend\api\apps.py
from django.apps import AppConfig class ApiConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'api'
0
0
Chart\Chart\backend
Chart\Chart\backend\api\models.py
from django.db import models class Item(models.Model): time = models.DateTimeField() symbol = models.CharField(max_length=100) c1 = models.FloatField() c2 = models.FloatField() c3 = models.FloatField() c4 = models.FloatField() c5 = models.FloatField() c6 = models.FloatField() def _...
0
0
Chart\Chart\backend
Chart\Chart\backend\api\serializers.py
from rest_framework import serializers from .models import * class ItemSerializer(serializers.ModelSerializer): class Meta: model = Item fields = '__all__'
0
0
Chart\Chart\backend
Chart\Chart\backend\api\tests.py
from django.test import TestCase # Create your tests here.
0
0
Chart\Chart\backend
Chart\Chart\backend\api\urls.py
from rest_framework import routers from .views import * from django.urls import path, include urlpatterns = [ path('items/', ItemListView.as_view(), name='item-list'), path('items/add/', AddItemView.as_view(), name='add-item'), path('items/<int:id>/edit/', EditItemView.as_view(), name='edit-item'), pat...
0
0
Chart\Chart\backend
Chart\Chart\backend\api\views.py
from rest_framework import viewsets from .models import * from .serializers import * from rest_framework.generics import * from rest_framework.response import Response from rest_framework import status from rest_framework.decorators import api_view, parser_classes from rest_framework.views import APIView from datetime ...
0
0
Chart\Chart\backend\api\management
Chart\Chart\backend\api\management\commands\load_csv.py
import csv from datetime import datetime, timezone as dt_timezone from django.core.management.base import BaseCommand from django.db import transaction from api.models import Item import time class Command(BaseCommand): help = 'Efficiently load items from a large CSV file in batches.' def add_arguments(sel...
0
0
Chart\Chart\backend\api\management
Chart\Chart\backend\api\management\commands\load_items.py
# your_app/management/commands/load_items_from_csv.py import csv from django.core.management.base import BaseCommand from django.db import transaction import random from api.models import Item # Use model directly for speed class Command(BaseCommand): help = 'Load items from a CSV file and populate the Item m...
0