Skip to content

Commit 085fb95

Browse files
committed
update ci file
1 parent 9300c12 commit 085fb95

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

.github/workflows/python-ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Python CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on push to 'main' branch (change this if using a different branch)
7+
pull_request:
8+
branches:
9+
- main # Trigger on PR to 'main' branch
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest # This runs the job on the latest Ubuntu
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: "3.12" # Specify the Python version
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt # Install your project's dependencies
28+
29+
- name: Run tests
30+
run: |
31+
pytest # Run your tests using pytest

test_daily.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,10 @@
77
import numpy as np
88
import heapq
99

10-
# uncomments the following line to debug stack overflow error
10+
# uncomments the following line when need to debug stack overflow error
1111
# sys.setrecursionlimit(10)
1212

13-
# Solving some coding challenges from time to time. It's a good way to keep my coding brain and arms sharp and keep practice my problem-solving skills.
14-
15-
1613
# 1 - 365
17-
'''
18-
Programming isn't just about creating software; it's a cognitive workout that reshapes how our brains process information, solve problems, and even perceive the world around us. As both a programmer and a technology enthusiast, I've witnessed firsthand how coding has transformed my thinking patterns and problem-solving approaches. In this article, we'll explore the fascinating ways programming influences our cognitive abilities and potentially rewires our brains.
19-
20-
Problem-Solving and Logical Reasoning: Building Mental Muscles
21-
Programming is essentially an extended exercise in problem-solving. When developers face a complex task, they instinctively break it down into smaller, manageable components — a process known as decomposition. This systematic approach to problem-solving becomes second nature, extending beyond coding to influence how programmers tackle challenges in their daily lives.
22-
23-
Knowledge Base
24-
25-
set operations
26-
union 并集, intersaction 交集, complement 补集, difference 差集
27-
28-
subarray: brute-force time O(n^3), if sliding-window can be applied, time O(n)
29-
subsequence/subset: brute-force time O(2^n),
30-
if can use DP, to calculate every element in dp, visit all its previous elements in dp, time O(n^2)
31-
32-
33-
Graph Algorithm
34-
single-source shortest path problem(for weighted dircted graph)
35-
- Bellman–Ford algorithm
36-
- Dijkstra's algorithm
37-
'''
38-
39-
4014
'''
4115
!! question 1
4216
Given a list of numbers and a number k, return whether any two numbers from the list add up to k.

0 commit comments

Comments
 (0)