Skip to content

Commit 9d59bf4

Browse files
authored
Merge branch 'main' into test
2 parents a5e60df + c8d4ac6 commit 9d59bf4

File tree

4 files changed

+129
-2
lines changed

4 files changed

+129
-2
lines changed

.github/workflows/github-actions-demo.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ jobs:
1111
- name: Echo Comment
1212
run: |
1313
echo "Comment: ${{ github.event.comment.body }}"
14-
env:
15-
comment: ${{ env.comment }}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Specify commands for issues and pull requests
2+
# ---------------------------------------------
3+
4+
hi:
5+
# Post a comment, `{{ author }}` is an author placeholder
6+
comment: hi @{{ author }}
7+
8+
wow:
9+
# Post a comment
10+
# `{{ args.* }}` is command args placeholder
11+
# `{{ input }}` is command input placeholder
12+
comment: wow {{ args.0 }}, and the command args is {{ input }}
13+
# Reactions to be added to comment
14+
reactions: ['+1']
15+
16+
heated:
17+
# Lock the thread
18+
lock: true
19+
# Set a lock reason, such as `off-topic`, `too heated`, `resolved` or `spam`
20+
lockReason: too heated
21+
# Reactions to be added to comment
22+
reactions: ['eyes', 'heart']
23+
# Post a comment
24+
comment: The thread has been temporarily locked.
25+
26+
unheated:
27+
# Unlock the thread
28+
unlock: true
29+
30+
label:
31+
label:
32+
# Add custom label
33+
- static-label
34+
# Space separated labels
35+
- 'label-1 label-2'
36+
# Add labels from args
37+
- '{{ args.0 }}'
38+
- '{{ args.1 }}'
39+
- '{{ args.2 }}'
40+
41+
unlabel:
42+
label:
43+
# Remove custom label
44+
- -static-label
45+
# Remove labels from args
46+
- '-{{ args.0 }}'
47+
- '-{{ args.1 }}'
48+
- '-{{ args.2 }}'
49+
relabel:
50+
label:
51+
# Remove all labels
52+
- -*
53+
# add label from args
54+
- '{{ input }}'
55+
56+
handover:
57+
# handover issues/PRs to the given users
58+
assign:
59+
- '-*' # first remove all the old assignees
60+
- '{{ input }}'
61+
assign:
62+
# assign issues/PRs to Jhon and the given users
63+
assign:
64+
- Jhon
65+
- '{{ input }}'
66+
67+
# Optionally, specify commands just for issues
68+
# --------------------------------------------
69+
issues:
70+
pin:
71+
# Pin the issue
72+
pin: true
73+
74+
unpin:
75+
# UnPin the issue
76+
unpin: true
77+
78+
feature:
79+
# Close the issue
80+
close: true
81+
# Post a comment, `{{ author }}` is an author placeholder
82+
comment: >
83+
:wave: @{{ author }}, please use our idea board to request new features.
84+
85+
86+
needs-more-info:
87+
# Close the issue
88+
close: true
89+
# Post a comment, `{{ author }}` is author placeholder
90+
comment: >
91+
@{{ author }}
92+
93+
In order to communicate effectively, we have a certain format requirement for the issue, your issue is automatically closed because there is no recurring step or reproducible warehouse, and will be REOPEN after the offer.
94+
95+
96+
# Optionally, specify commands just for pull requests
97+
# ---------------------------------------------------
98+
pulls:
99+
hello:
100+
# Post a comment, `{{ input }}` is command input placeholder
101+
comment: hello {{ input }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Slash Commands
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: wow-actions/slash-commands@v1
10+
with:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
CONFIG_FILE: .github/workflows/slash-commands-config.yml

python3/2064.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class Solution:
2+
def minimizedMaximum(self, n: int, quantities: List[int]) -> int:
3+
def check(amount):
4+
stores = 0
5+
for q in quantities:
6+
stores += ceil(q/amount)
7+
return stores <= n
8+
9+
l, r = 1, max(quantities)
10+
while l < r:
11+
m = (l + r) // 2
12+
if check(m):
13+
r = m
14+
else:
15+
l = m + 1
16+
return l

0 commit comments

Comments
 (0)