Skip to content

Commit af71e12

Browse files
committed
added usaco guide from github
1 parent eb8143b commit af71e12

File tree

1,480 files changed

+254544
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,480 files changed

+254544
-1
lines changed

.eslintrc.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
node: true,
5+
es6: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:react/recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:jest/recommended',
12+
],
13+
parser: '@typescript-eslint/parser',
14+
parserOptions: {
15+
ecmaFeatures: {
16+
jsx: true,
17+
},
18+
ecmaVersion: 12,
19+
sourceType: 'module',
20+
},
21+
plugins: ['react', '@typescript-eslint', 'jest'],
22+
rules: {
23+
'no-prototype-builtins': 'off',
24+
'react/no-unescaped-entities': 'off',
25+
'no-useless-escape': 'warn',
26+
'@typescript-eslint/no-empty-function': 'off',
27+
curly: ['error', 'multi-line'],
28+
// some of these are just too hard to fix at the moment :(
29+
'react/prop-types': 'off',
30+
},
31+
ignorePatterns: [
32+
'**/node_modules',
33+
'src/functions',
34+
'gatsby-config.ts',
35+
'gatsby-node.ts',
36+
'gatsby-ssr.tsx',
37+
'gatsby-browser.tsx',
38+
'tailwind.config.js',
39+
],
40+
};

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "usaco-guide"
4+
}
5+
}

.github/(archived) module-review.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Module Review
3+
about: Quality control for modules
4+
title: ''
5+
labels: module review
6+
assignees: ''
7+
---
8+
9+
**Module Review Checklist**
10+
11+
Read through the module and check for errors. Also see:
12+
https://usaco.guide/general/contributing
13+
14+
Languages Checked:
15+
16+
- [ ] C++
17+
- [ ] Java (Lower priority)
18+
- [ ] Python (Optional)
19+
20+
Things to check:
21+
22+
- [ ] Frequency is accurate, prerequisites are listed, module description is
23+
written
24+
- [ ] No typos, explanations are clear, no missing sections
25+
- [ ] Table of Contents looks good
26+
- [ ] Resources are good
27+
- [ ] Resources are starred appropriately (star == must read)
28+
- [ ] All resources are useful (get rid of ones that aren't needed)
29+
- [ ] All resources should have descriptions
30+
- [ ] Explanations do not unnecessarily repeat what resources already cover.
31+
- [ ] Problems are good
32+
- [ ] There are sufficient problems
33+
- [ ] Problems are tagged with difficulty and tags as needed
34+
- [ ] Problems either are linked to a good enough external solution, or a
35+
solution is written for them
36+
- [ ] There are _no solution sketches_ -- migrate solution sketches into full
37+
editorial pages.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
_Place an "x" in the corresponding checkbox if it is done or does not apply to this pull request._
2+
3+
- [ ] I have tested my code.
4+
- [ ] I have added my solution according to the steps [here](https://usaco.guide/general/adding-solution#steps).
5+
- [ ] I have followed the code conventions mentioned [here](https://usaco.guide/general/adding-solution/#code-conventions).
6+
- I understand that if it is clear that I have not attempted to follow these conventions, my PR will be closed.
7+
- If changes are requested, I will re-request a review after addressing them.
8+
- [ ] I have linked this PR to any issues that it closes.

.github/stale.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 7
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 7
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels: []
15+
16+
# Set to true to ignore issues in a project (defaults to false)
17+
exemptProjects: false
18+
19+
# Set to true to ignore issues in a milestone (defaults to false)
20+
exemptMilestones: false
21+
22+
# Set to true to ignore issues with an assignee (defaults to false)
23+
exemptAssignees: false
24+
25+
# Label to use when marking as stale
26+
staleLabel: stale
27+
28+
# Comment to post when marking as stale. Set to `false` to disable
29+
markComment: >
30+
This pull request has been automatically marked as stale because it has not had
31+
recent activity. Please address the requested changes and re-request reviews.
32+
Thank you for your contribution!
33+
34+
# Comment to post when removing the stale label.
35+
# unmarkComment: >
36+
# Your comment here.
37+
38+
# Comment to post when closing a stale Issue or Pull Request.
39+
closeComment: >
40+
Changes requested have not been made. Free free to create a new PR.
41+
42+
# Limit the number of actions per hour, from 1-30. Default is 30
43+
limitPerRun: 30
44+
45+
# Limit to only `issues` or `pulls`
46+
only: pulls
47+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
48+
# pulls:
49+
# daysUntilStale: 30
50+
# markComment: >
51+
# This pull request has been automatically marked as stale because it has not had
52+
# recent activity. It will be closed if no further activity occurs. Thank you
53+
# for your contributions.
54+
55+
# issues:
56+
# exemptLabels:
57+
# - confirmed

.github/workflows/build-tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
build-tests:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 30
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: dart-lang/setup-dart@v1
16+
17+
- name: Cache node modules
18+
uses: actions/cache@v2
19+
id: cache-node-modules
20+
with:
21+
path: node_modules
22+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
23+
24+
- run: yarn
25+
- run: yarn build
26+
env:
27+
NODE_OPTIONS: --max-old-space-size=4096
28+
- run: ./node_modules/.bin/serve public &
29+
- run: dart pub global activate linkcheck
30+
31+
- name: Check Links
32+
run: $HOME/.pub-cache/bin/linkcheck --no-nice :5000
33+
34+
- name: Bundle Watch
35+
run: yarn bundlewatch ./public/*.js
36+
env:
37+
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
38+
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

.github/workflows/prettier.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Prettier
2+
on:
3+
pull_request:
4+
branches: [master]
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
prettier:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
# Make sure the actual branch is checked out when running on pull requests
18+
ref: ${{ github.head_ref }}
19+
# This is important to fetch the changes to the previous commit
20+
fetch-depth: 0
21+
22+
- name: Prettify code
23+
uses: creyD/[email protected]
24+
with:
25+
# This part is also where you can pass other options, for example:
26+
prettier_options: --write **/*.{js,jsx,ts,tsx,json,md,mdx}
27+
only_changed: True
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- 'content/**'
8+
- 'solutions/**'
9+
pull_request:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'content/**'
14+
- 'solutions/**'
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0 # Required to retrieve git history of Chromatic
22+
23+
- name: Cache node modules
24+
uses: actions/cache@v2
25+
id: cache-node-modules
26+
with:
27+
path: node_modules
28+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
29+
30+
- name: Install dependencies
31+
run: yarn
32+
33+
- name: Run tests
34+
run: yarn test --passWithNoTests
35+
36+
- name: Check for typescript errors
37+
run: yarn check-ts-errors
38+
39+
- name: Run eslint
40+
run: yarn eslint --quiet
41+
42+
- name: Run chromatic
43+
uses: chromaui/action@v1
44+
with:
45+
projectToken: 6f3c58ad349c
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
exitZeroOnChanges: true # don't fail the workflow if snapshots change
48+
49+
lhci:
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 30
52+
steps:
53+
- uses: actions/checkout@v2
54+
- name: Use Node.js 14.x
55+
uses: actions/setup-node@v1
56+
with:
57+
node-version: 14.x
58+
59+
- name: Cache node modules
60+
uses: actions/cache@v2
61+
id: cache-node-modules
62+
with:
63+
path: node_modules
64+
key: node-modules-${{ hashFiles('**/yarn.lock') }}
65+
66+
- run: yarn
67+
- run: yarn build
68+
env:
69+
NODE_OPTIONS: --max-old-space-size=4096
70+
71+
- name: run Lighthouse CI
72+
run: |
73+
npm install -g @lhci/[email protected]
74+
lhci autorun
75+
env:
76+
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
77+
# - name: Check Links
78+
# uses: wunderundfitzig/linkcheck-action@v1
79+
# with:
80+
# arguments: '--net=host :9000'

.gitignore

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# dotenv environment variable files
55+
.env*
56+
57+
# gatsby files
58+
.cache/
59+
public
60+
61+
# Mac files
62+
.DS_Store
63+
64+
# Yarn
65+
yarn-error.log
66+
.pnp/
67+
.pnp.js
68+
69+
# Yarn Integrity file
70+
.yarn-integrity
71+
72+
# Other
73+
.idea
74+
# Local Netlify folder
75+
.netlify
76+
77+
service.json
78+
user_data.json
79+
auth_data.json
80+
81+
src/functions/lib/
82+
src/functions/.runtimeconfig.json
83+
84+
.vercel
85+
build.css
86+
87+
**/*.icloud
88+
*.icloud
89+
90+
.runtimeconfig.json

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

0 commit comments

Comments
 (0)