Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
60
13.7k
id
stringlengths
19
48
metadata
dict
__index_level_0__
int64
0
2
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...
backend/api/management/commands/load_csv.py/0
{ "file_path": "backend/api/management/commands/load_csv.py", "repo_id": "backend", "token_count": 1424 }
0
{ "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...
frontend/package.json/0
{ "file_path": "frontend/package.json", "repo_id": "frontend", "token_count": 500 }
1
// 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';
frontend/src/setupTests.js/0
{ "file_path": "frontend/src/setupTests.js", "repo_id": "frontend", "token_count": 75 }
2
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...
backend/api/management/commands/load_stocks.py/0
{ "file_path": "backend/api/management/commands/load_stocks.py", "repo_id": "backend", "token_count": 1007 }
0
<!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...
frontend/public/index.html/0
{ "file_path": "frontend/public/index.html", "repo_id": "frontend", "token_count": 623 }
1
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 _...
backend/api/models.py/0
{ "file_path": "backend/api/models.py", "repo_id": "backend", "token_count": 461 }
0
from rest_framework import serializers from .models import * class ItemSerializer(serializers.ModelSerializer): class Meta: model = Item fields = '__all__'
backend/api/serializers.py/0
{ "file_path": "backend/api/serializers.py", "repo_id": "backend", "token_count": 61 }
0
from django.test import TestCase # Create your tests here.
backend/api/tests.py/0
{ "file_path": "backend/api/tests.py", "repo_id": "backend", "token_count": 17 }
0
{ "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", ...
frontend/public/manifest.json/0
{ "file_path": "frontend/public/manifest.json", "repo_id": "frontend", "token_count": 251 }
1
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...
backend/api/urls.py/0
{ "file_path": "backend/api/urls.py", "repo_id": "backend", "token_count": 165 }
0
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 ...
backend/api/views.py/0
{ "file_path": "backend/api/views.py", "repo_id": "backend", "token_count": 3763 }
0
.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...
frontend/src/App.css/0
{ "file_path": "frontend/src/App.css", "repo_id": "frontend", "token_count": 240 }
1
// 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;
frontend/src/App.js/0
{ "file_path": "frontend/src/App.js", "repo_id": "frontend", "token_count": 96 }
0
""" 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_...
backend/lsg/asgi.py/0
{ "file_path": "backend/lsg/asgi.py", "repo_id": "backend", "token_count": 131 }
0
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(); });
frontend/src/App.test.js/0
{ "file_path": "frontend/src/App.test.js", "repo_id": "frontend", "token_count": 78 }
1
""" 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...
backend/lsg/settings.py/0
{ "file_path": "backend/lsg/settings.py", "repo_id": "backend", "token_count": 1545 }
0
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('api.urls')), ]
backend/lsg/urls.py/0
{ "file_path": "backend/lsg/urls.py", "repo_id": "backend", "token_count": 62 }
0
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,...
frontend/src/components/TradingChart.js/0
{ "file_path": "frontend/src/components/TradingChart.js", "repo_id": "frontend", "token_count": 6231 }
1
""" 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_...
backend/lsg/wsgi.py/0
{ "file_path": "backend/lsg/wsgi.py", "repo_id": "backend", "token_count": 131 }
0
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...
frontend/src/index.css/0
{ "file_path": "frontend/src/index.css", "repo_id": "frontend", "token_count": 155 }
1
#!/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...
backend/manage.py/0
{ "file_path": "backend/manage.py", "repo_id": "backend", "token_count": 246 }
0
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...
frontend/src/index.js/0
{ "file_path": "frontend/src/index.js", "repo_id": "frontend", "token_count": 167 }
1
from django.contrib import admin # Register your models here.
backend/api/admin.py/0
{ "file_path": "backend/api/admin.py", "repo_id": "backend", "token_count": 17 }
0
# 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...
frontend/README.md/0
{ "file_path": "frontend/README.md", "repo_id": "frontend", "token_count": 949 }
1
from django.apps import AppConfig class ApiConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'api'
backend/api/apps.py/0
{ "file_path": "backend/api/apps.py", "repo_id": "backend", "token_count": 50 }
0
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); })...
frontend/src/reportWebVitals.js/0
{ "file_path": "frontend/src/reportWebVitals.js", "repo_id": "frontend", "token_count": 163 }
1
README.md exists but content is empty.
Downloads last month
4