This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random; counter = 0; exec("while True: print(random.choice('/' + chr(92)), end='' if (counter := counter + 1) % 80 else '\\n')") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pack_sizes = [4, 6, 10, 20, 40] | |
max_search_range = max(pack_sizes) * 3 # Heuristic to ensure we cover enough range | |
possible_totals = set([0]) # Initialize with 0, as we can always buy 0 McNuggets | |
# Iteratively find all possible totals that can be made with given pack sizes | |
for pack_size in pack_sizes: | |
new_totals = set() | |
for total in possible_totals: | |
new_total = total | |
while new_total <= max_search_range: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 TI$="000000" | |
100 DIM P(240) | |
110 FOR I = 0 TO 240: P(I) = 0: NEXT | |
120 FOR A = 0 TO 240 STEP 4 | |
130 FOR B = 0 TO 240 STEP 6 | |
140 FOR C = 0 TO 240 STEP 10 | |
150 FOR D = 0 TO 240 STEP 20 | |
160 FOR E = 0 TO 240 STEP 40 | |
170 T = A + B + C + D + E | |
180 IF T <= 240 THEN P(T) = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Check xz version on servers | |
hosts: all | |
tasks: | |
- name: Get xz version | |
shell: xz --version | head -n1 | awk '{print $NF}' # Using $NF to capture the last field which is expected to be the version number | |
register: xz_version_output | |
changed_when: False | |
ignore_errors: True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program ten_print | |
implicit none | |
integer :: i, j | |
integer, parameter :: n = 40 | |
call random_seed() | |
do i = 1, n | |
do j = 1, n | |
if (rand() < 0.5) then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HP 15C | |
HP 12C | |
HP 300s+ | |
HP 65 | |
Casio FX-502P | |
Casio FX-880 | |
Casio FX-850 |
OlderNewer