id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
Python_Threading_Schedule/busdriverschedulings_354_0.txt | 386 | |
Python_Threading_Schedule/busdriverschedulings_1317_0.txt | [ 15 , "04:43" , "04:53" , 283 , 293 , 10 ], | |
Python_Threading_Schedule/busdriverschedulings_889_0.txt | 921 | |
Python_Threading_Schedule/busdriverschedulings_785_0.txt | 817 | |
Python_Threading_Schedule/busdriverschedulings_867_0.txt | 899 | |
Python_Threading_Schedule/busdriverschedulings_432_0.txt | 464 | |
Python_Threading_Schedule/busdriverschedulings_870_0.txt | 902 | |
Python_Threading_Schedule/busdriverschedulings_1689_0.txt | [ 387 , "09:01" , "09:13" , 541 , 553 , 12 ], | |
Python_Threading_Schedule/busdriverschedulings_1755_0.txt | [ 453 , "10:00" , "10:16" , 600 , 616 , 16 ], | |
Python_Threading_Schedule/busdriverschedulings_652_0.txt | 684 | |
Python_Threading_Schedule/workflowyschedulingi_46_0.txt | Enter your email Subscribe | |
Python_Threading_Schedule/busdriverschedulings_1543_0.txt | [ 241 , "07:21" , "07:48" , 441 , 468 , 27 ], | |
Python_Threading_Schedule/workflowyschedulingi_21_0.txt | import time
import settings
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait | |
Python_Threading_Schedule/busdriverschedulings_419_0.txt | 451 | |
Python_Threading_Schedule/busdriverschedulings_1151_0.txt | [ 51 , "08:27" , "09:07" , 507 , 547 , 40 ], | |
Python_Threading_Schedule/busdriverschedulings_1094_0.txt | [ 46 , "18:04" , "19:29" , 1084 , 1169 , 85 ], | |
Python_Threading_Schedule/busdriverschedulings_630_0.txt | 662 | |
Python_Threading_Schedule/1722_149_0.txt | [ 
](/lperron) [ lperron ](/lperron) | |
Python_Threading_Schedule/1722_101_0.txt | # Computed data.
total_driving_time = sum(shift[5] for shift in SAMPLE_SHIFTS)
min_num_drivers = int(
math.ceil(total_driving_time * 1.0 / max_driving_time))
num_drivers = 2 * min_num_drivers if minimize_drivers else max_num_drivers
min_start_time = min(shift[3] for shift in SAMPLE_SHIFTS)
max_end_time = max(shift[4] f... | |
Python_Threading_Schedule/busdriverschedulings_1877_0.txt | [ 575 , "11:55" , "12:34" , 715 , 754 , 39 ], | |
Python_Threading_Schedule/busdriverschedulings_517_0.txt | 549 | |
Python_Threading_Schedule/busdriverschedulings_986_0.txt | \- 10 min preparation time before the first shift | |
Python_Threading_Schedule/busdriverschedulings_1476_0.txt | [ 174 , "06:43" , "07:08" , 403 , 428 , 25 ], | |
Python_Threading_Schedule/busdriverschedulings_27_0.txt | # Provide feedback | |
Python_Threading_Schedule/busdriverschedulings_310_0.txt | 342 | |
Python_Threading_Schedule/Python_schedule__11_0.txt | ## Run a job until a certain time ¶
import schedule
from datetime import datetime, timedelta, time
def job():
print('Boo')
# run job until a 18:30 today
schedule.every(1).hours.until("18:30").do(job)
# run job until a 2030-01-01 18:33 today
schedule.every(... | |
Python_Threading_Schedule/busdriverschedulings_167_0.txt | 199 | |
Python_Threading_Schedule/busdriverschedulings_1214_0.txt | [ 114 , "14:34" , "14:45" , 874 , 885 , 11 ], | |
Python_Threading_Schedule/busdriverschedulings_155_0.txt | 187 | |
Python_Threading_Schedule/busdriverschedulings_760_0.txt | 792 | |
Python_Threading_Schedule/busdriverschedulings_1937_0.txt | [ 635 , "12:40" , "13:51" , 760 , 831 , 71 ], | |
Python_Threading_Schedule/busdriverschedulings_1198_0.txt | [ 98 , "13:31" , "13:43" , 811 , 823 , 12 ], | |
Python_Threading_Schedule/busdriverschedulings_1232_0.txt | [ 132 , "15:48" , "16:35" , 948 , 995 , 47 ], | |
Python_Threading_Schedule/busdriverschedulings_1281_0.txt | [ 181 , "20:40" , "20:50" , 1240 , 1250 , 10 ], | |
Python_Threading_Schedule/busdriverschedulings_3_0.txt | [ ](https://github.com/) | |
Python_Threading_Schedule/workflowyschedulingi_50_0.txt | [ 
](/building-c4-diagrams-in-mermaid/) | |
Python_Threading_Schedule/busdriverschedulings_709_0.txt | 741 | |
Python_Threading_Schedule/busdriverschedulings_1727_0.txt | [ 425 , "09:34" , "09:45" , 574 , 585 , 11 ], | |
Python_Threading_Schedule/busdriverschedulings_1266_0.txt | [ 166 , "18:48" , "19:28" , 1128 , 1168 , 40 ], | |
Python_Threading_Schedule/1722_141_0.txt | --- | |
Python_Threading_Schedule/busdriverschedulings_1176_0.txt | [ 76 , "11:34" , "11:45" , 694 , 705 , 11 ], | |
Python_Threading_Schedule/busdriverschedulings_292_0.txt | 324 | |
Python_Threading_Schedule/busdriverschedulings_314_0.txt | 346 | |
Python_Threading_Schedule/1722_69_0.txt | How can i schedule all 50 shifts to each driver almost evenly? | |
Python_Threading_Schedule/busdriverschedulings_218_0.txt | 250 | |
Python_Threading_Schedule/busdriverschedulings_1307_0.txt | [ 5 , "04:30" , "04:51" , 270 , 291 , 21 ], | |
Python_Threading_Schedule/busdriverschedulings_1938_0.txt | [ 636 , "12:40" , "12:50" , 760 , 770 , 10 ], | |
Python_Threading_Schedule/1722_161_0.txt | [ ](https://github.com "GitHub") © 2024 GitHub, Inc. | |
Python_Threading_Schedule/busdriverschedulings_1614_0.txt | [ 312 , "08:10" , "09:15" , 490 , 555 , 65 ], | |
Python_Threading_Schedule/busdriverschedulings_650_0.txt | 682 | |
Python_Threading_Schedule/busdriverschedulings_294_0.txt | 326 | |
Python_Threading_Schedule/1722_158_0.txt | 4 participants | |
Python_Threading_Schedule/busdriverschedulings_1764_0.txt | [ 462 , "10:10" , "10:20" , 610 , 620 , 10 ], | |
Python_Threading_Schedule/busdriverschedulings_351_0.txt | 383 | |
Python_Threading_Schedule/busdriverschedulings_491_0.txt | 523 | |
Python_Threading_Schedule/busdriverschedulings_1767_0.txt | [ 465 , "10:14" , "11:05" , 614 , 665 , 51 ], | |
Python_Threading_Schedule/busdriverschedulings_1187_0.txt | [ 87 , "12:30" , "12:40" , 750 , 760 , 10 ], | |
Python_Threading_Schedule/1722_2_0.txt | Toggle navigation | |
Python_Threading_Schedule/busdriverschedulings_37_0.txt | [ Sign in ](/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2For-
tools%2Fblob%2Fstable%2Fexamples%2Fpython%2Fbus_driver_scheduling_sat.py) | |
Python_Threading_Schedule/busdriverschedulings_392_0.txt | 424 | |
Python_Threading_Schedule/busdriverschedulings_121_0.txt | 153 | |
Python_Threading_Schedule/busdriverschedulings_487_0.txt | 519 | |
Python_Threading_Schedule/busdriverschedulings_1557_0.txt | [ 255 , "07:31" , "07:43" , 451 , 463 , 12 ], | |
Python_Threading_Schedule/1722_55_0.txt | Closed | |
Python_Threading_Schedule/busdriverschedulings_1065_0.txt | [ 17 , "09:03" , "10:28" , 543 , 628 , 85 ], | |
Python_Threading_Schedule/1722_43_0.txt | * [ Code ](/google/or-tools)
* [ Issues 43 ](/google/or-tools/issues)
* [ Pull requests 7 ](/google/or-tools/pulls)
* [ Discussions ](/google/or-tools/discussions)
* [ Actions ](/google/or-tools/actions)
* [ Projects 3 ](/google/or-tools/projects)
* [ Security ](/google/or-tools/security)
* [ Insights ](/goo... | |
Python_Threading_Schedule/busdriverschedulings_452_0.txt | 484 | |
Python_Threading_Schedule/busdriverschedulings_83_0.txt | 115 | |
Python_Threading_Schedule/busdriverschedulings_197_0.txt | 229 | |
Python_Threading_Schedule/busdriverschedulings_774_0.txt | 806 | |
Python_Threading_Schedule/busdriverschedulings_1932_0.txt | [ 630 , "12:35" , "13:14" , 755 , 794 , 39 ], | |
Python_Threading_Schedule/busdriverschedulings_1267_0.txt | [ 167 , "19:03" , "19:45" , 1143 , 1185 , 42 ], | |
Python_Threading_Schedule/busdriverschedulings_55_0.txt | [ History ](/google/or-
tools/commits/stable/examples/python/bus_driver_scheduling_sat.py) | |
Python_Threading_Schedule/busdriverschedulings_1322_0.txt | [ 20 , "04:47" , "05:14" , 287 , 314 , 27 ], | |
Python_Threading_Schedule/busdriverschedulings_1014_0.txt | [ 3 , "08:11" , "09:41" , 491 , 581 , 90 ], | |
Python_Threading_Schedule/busdriverschedulings_831_0.txt | 863 | |
Python_Threading_Schedule/busdriverschedulings_1421_0.txt | [ 119 , "06:07" , "06:43" , 367 , 403 , 36 ], | |
Python_Threading_Schedule/busdriverschedulings_1841_0.txt | [ 539 , "11:23" , "11:49" , 683 , 709 , 26 ], | |
Python_Threading_Schedule/busdriverschedulings_232_0.txt | 264 | |
Python_Threading_Schedule/Python_schedule__10_0.txt | ## Run a job at random intervals ¶
def my_job():
print('Foo')
# Run every 5 to 10 seconds.
schedule.every(5).to(10).seconds.do(my_job)
` every(A).to(B).seconds ` executes the job function every N seconds such
that A <= N <= B.
| |
Python_Threading_Schedule/busdriverschedulings_1801_0.txt | [ 499 , "10:45" , "11:24" , 645 , 684 , 39 ], | |
Python_Threading_Schedule/busdriverschedulings_1526_0.txt | [ 224 , "07:12" , "08:00" , 432 , 480 , 48 ], | |
Python_Threading_Schedule/busdriverschedulings_749_0.txt | 781 | |
Python_Threading_Schedule/busdriverschedulings_536_0.txt | 568 | |
Python_Threading_Schedule/busdriverschedulings_1918_0.txt | [ 616 , "12:26" , "13:05" , 746 , 785 , 39 ], | |
Python_Threading_Schedule/Python_schedule__9_0.txt | ## Cancel several jobs, filtered by tags ¶
You can cancel the scheduling of a group of jobs selecting them by a unique
identifier.
import schedule
def greet(name):
print('Hello {}'.format(name))
schedule.every().day.do(greet, 'Andrea').tag('daily-tasks', 'friend')
schedul... | |
Python_Threading_Schedule/busdriverschedulings_656_0.txt | 688 | |
Python_Threading_Schedule/busdriverschedulings_1792_0.txt | [ 490 , "10:38" , "11:45" , 638 , 705 , 67 ], | |
Python_Threading_Schedule/busdriverschedulings_846_0.txt | 878 | |
Python_Threading_Schedule/busdriverschedulings_1210_0.txt | [ 110 , "14:00" , "14:16" , 840 , 856 , 16 ], | |
Python_Threading_Schedule/busdriverschedulings_1472_0.txt | [ 170 , "06:40" , "06:56" , 400 , 416 , 16 ], | |
Python_Threading_Schedule/busdriverschedulings_754_0.txt | 786 | |
Python_Threading_Schedule/1722_49_0.txt | By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails. | |
Python_Threading_Schedule/busdriverschedulings_1483_0.txt | [ 181 , "06:47" , "07:04" , 407 , 424 , 17 ], | |
Python_Threading_Schedule/pythonjobscheduling_67_0.txt | Common Problem
The write() method must be manually executed to save the schedules in python-crontab as the library does not have an auto-save feature. | |
Python_Threading_Schedule/busdriverschedulings_256_0.txt | 288 | |
Python_Threading_Schedule/busdriverschedulings_710_0.txt | 742 | |
Python_Threading_Schedule/busdriverschedulings_420_0.txt | 452 | |
Python_Threading_Schedule/busdriverschedulings_1311_0.txt | [ 9 , "04:34" , "05:03" , 274 , 303 , 29 ], | |
Python_Threading_Schedule/busdriverschedulings_552_0.txt | 584 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.