content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
class Solution: def finalPrices(self, prices: List[int]) -> List[int]: res = [] for i in range(len(prices)): for j in range(i+1,len(prices)): if prices[j]<=prices[i]: res.append(prices[i]-prices[j]) break if j==len(prices)-1: res.append(prices[i]) res.append(prices[-1]) return res
class Solution: def final_prices(self, prices: List[int]) -> List[int]: res = [] for i in range(len(prices)): for j in range(i + 1, len(prices)): if prices[j] <= prices[i]: res.append(prices[i] - prices[j]) break if j == len(prices) - 1: res.append(prices[i]) res.append(prices[-1]) return res
"""Tests for the sbahn_munich integration""" line_dict = { "name": "S3", "color": "#333333", "text_color": "#444444", }
"""Tests for the sbahn_munich integration""" line_dict = {'name': 'S3', 'color': '#333333', 'text_color': '#444444'}
N, M = map(int, input().split()) for i in range(1, M + 1): if i % 2 == 1: j = (i - 1) // 2 print(1 + j, M + 1 - j) else: j = (i - 2) // 2 print(M + 2 + j, 2 * M + 1 - j)
(n, m) = map(int, input().split()) for i in range(1, M + 1): if i % 2 == 1: j = (i - 1) // 2 print(1 + j, M + 1 - j) else: j = (i - 2) // 2 print(M + 2 + j, 2 * M + 1 - j)
summary = 0 i = 0 while i < 5: summary = summary + i print(summary) i = i + 1
summary = 0 i = 0 while i < 5: summary = summary + i print(summary) i = i + 1
# Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module # https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package __version__ = '1.6.1' release_notes = { '1.6.1': """ Fixed GUI crash when loading certain RLBot config files with relative paths for agents. Fixed agent preset loading to allow multiple agents to saved/loaded correctly if they have the same name. - ima9rd """, '1.6.0':""" Add support for auto starting .NET executables. """, '1.5.1': """ Fixed crash with GUI when no default RLBot.cfg file was found. Updated GUI to launch Rocket League when clicking run if no Rocket League process is found. - ima9rd """, '1.5.0': """ Adding a have_internet helper function to help streamline upgrade checks. - ima9rd """, '1.4.2': """ Adding support for auto-running java bots during tournaments. To take advantage of this in your bot, see https://github.com/RLBot/RLBotJavaExample/wiki/Auto-Launching-Java Plus bug fixes: - Fixed a bug where auto-run executables would crash when trying to write to stderr. - Dragging bots to another team in the GUI no longer breaks the config. """, '1.3.0': """ Accurate ball prediction for Hoops and Dropshot modes! - Kipje13, Marvin, NeverCast, et. al. """, '1.2.6': """ Fixed a bug where field info was not extracted properly during dropshot mode. It was reporting 2 goals rather than the expected 140. """, '1.2.5': """ *************************************************** * Fix for dodge cancels / half flips! - ccman32 * *************************************************** Plus: - Changing the rendering strategy for 3D lines that go past the camera. Formerly it was "draw it, even though it's crazy sometimes", now it will be "don't draw it". - Showing the rate that inputs are received for each player index when you press the [home] key. Toggle back off with the [end] key. - Fixed a bug where party_member_bot could get influenced by real controller input. - Creating new presets in the GUI works better now. - Got rid of the libpng warning seen when using the GUI. - Giving specific error messages when cfg files are messed up. """, '1.2.2': """ - Rearranged the GUI a bit, and made it load and track appearance configs more effectively. - Fixed bug where RUN button behavior in the GUI would not work after killing bots. """, '1.2.0': """ - We now offer a 'RigidBodyTick' thanks to whatisaphone! It's a lower-level representation of physics data which updates at 120Hz and is not subject to interpolation. You can still make a great bot without it, but this feature is quite nice for the scientists among us. See https://github.com/RLBot/RLBotPythonExample/wiki/Rigid-Body-Tick for more details! - Faster way to access ball prediction data in python. - Skyborg """, '1.1.3': """ - Faster way to access ball prediction data in python. - Skyborg - Java bots will now shut down when the python framework quits. This has been necessary recently to avoid buggy situations. - Shutting down the python framework will no longer attempt to kill bots twice in a row. - Clicking on the "Run" button twice in a row in the GUI will no longer spawn duplicate processes. """, '1.1.2': """ Faster way to access ball prediction data in python. - Skyborg """, '1.1.1': """ You can now get information about the ball's status in Dropshot mode thanks to hallo_doei! Read all about it at https://github.com/RLBot/RLBot/wiki/Dropshot Other changes: - The loadout config for orange team is now respected again. - ccman32 - Fixed a bug where the GUI would crash with a "KeyError". - hallo_doei - Avoiding and suppressing some game crashes, and also restoring the ability to get game tick data during replays and the postgame. - tarehart - Fixed a bug where bots would dodge when they intended to double jump. -tarehart """, '1.0.6': """ The latest Rocket League patch broke dodges for our bots; this update fixes it. """, '1.0.5': """ Maximum size for a render message has been decreased again because many people experienced errors related to memory access. The limit is now only double the original. """, '1.0.4': """ - Maximum size for a render message has been increased by a factor of 100. This means you can draw a lot of lines at once without getting errors. - Boost amount for cars will now round up to the nearest integer, so 0.3% boost will now appear as 1 instead of 0. - Fixed a crash that would commonly happen after a match ends. As a side effect, you can no longer see up-to-date player data during instant replays. """, '1.0.3': """ Time for the big 1.0 release! We actually left "beta" a long time ago so this isn't as big a milestone as the number implies, but we DO have two great new features! 1. Setting game state. You can manipulate the position, velocity, etc of the ball and the cars! This can be a great help during bot development, and you can also get creative with it. Visit the wiki for details and documentation - https://github.com/RLBot/RLBot/wiki/Manipulating-Game-State Code written by hallo_doei, ccman32, and tarehart 2. Ball prediction. We now provide a list of future ball positions based on chip's excellent physics modeling. Take advantage of this to do next-level wall reads, catches, and dribbles! You can read about the math involved here: https://samuelpmish.github.io/notes/RocketLeague/ball_bouncing/ Note: currently the wall bounces are only accurate on the standard arena, not hoops or dropshot. Documentation and examples can be found here: https://github.com/RLBot/RLBot/wiki/Ball-Path-Prediction Code written by chip and tarehart Bonus: - You can now play on Salty Shores thanks to hallo_doei - Bug fix for people with spaces in their file path by Zaptive - Subprocess agent for future Rust support by whatisaphone """, '0.0.32': """ More comprehensive fix for Rocket League patch 1.50. Compared to previous version: - Dropshot tile data is fixed - Boost pad data is fixed - Loadout configuration is fixed Thanks to ccman32 and dtracers for delivering this fix quickly! """, '0.0.31': """ Rapid response to Rocket League patch 1.50 with the following known issues: - Dropshot tile data is missing - Boost pad data is missing - Loadout configuration is broken Thanks to ccman32 and dtracers for delivering this short-term fix quickly. We will follow this up with a proper fix as soon as possible. You may also choose to stay on Rocket League 1.49 and RLBot 0.0.30, ask for instructions on discord. """, '0.0.30': """ - New core dll that is less likely to break when Rocket League is patched - ccman32 and hallo-doei - Fixed bug resulting in incorrect quickchat - dtracers - Added more built-in colors to the python rendering manager - Eastvillage - Fix for items with a ':' not showing up in the GUI - hallo-doei - Fix for GUI not saving correct path - hallo-doei - Fix for GUI crash when saving preset then canceling - hallo-doei - Adding file checking before injection (Resolves #167) - Redox - Fixed typo in rlbot.cfg - Redox - Fancy release notes - tarehart and Skyborg """ } release_banner = """ ______ _ ______ _ 10100 | ___ \ | | ___ \ | | 00101 110011 | |_/ / | | |_/ / ___ | |_ 110011 00110110 | /| | | ___ \/ _ \| __| 01101100 010010 | |\ \| |____| |_/ / (_) | |_ 010010 10010 \_| \_\_____/\____/ \___/ \__| 01001 """ def get_current_release_notes(): if __version__ in release_notes: return release_notes[__version__] return '' def get_help_text(): return "Trouble? Ask on Discord at https://discord.gg/5cNbXgG " \ "or report an issue at https://github.com/RLBot/RLBot/issues" def print_current_release_notes(): print(release_banner) print("Version {}".format(__version__)) print(get_current_release_notes()) print(get_help_text()) print("")
__version__ = '1.6.1' release_notes = {'1.6.1': '\n Fixed GUI crash when loading certain RLBot config files with relative paths for agents.\n Fixed agent preset loading to allow multiple agents to saved/loaded correctly if they have the same name. - ima9rd\n ', '1.6.0': '\n Add support for auto starting .NET executables.\n ', '1.5.1': '\n Fixed crash with GUI when no default RLBot.cfg file was found.\n Updated GUI to launch Rocket League when clicking run if no Rocket League process is found. - ima9rd \n ', '1.5.0': '\n Adding a have_internet helper function to help streamline upgrade checks. - ima9rd\n ', '1.4.2': '\n Adding support for auto-running java bots during tournaments. To take advantage of this\n in your bot, see https://github.com/RLBot/RLBotJavaExample/wiki/Auto-Launching-Java\n \n Plus bug fixes:\n - Fixed a bug where auto-run executables would crash when trying to write to stderr.\n - Dragging bots to another team in the GUI no longer breaks the config.\n ', '1.3.0': '\n Accurate ball prediction for Hoops and Dropshot modes!\n - Kipje13, Marvin, NeverCast, et. al.\n ', '1.2.6': '\n Fixed a bug where field info was not extracted properly during dropshot mode.\n It was reporting 2 goals rather than the expected 140.\n ', '1.2.5': '\n ***************************************************\n * Fix for dodge cancels / half flips! - ccman32 *\n ***************************************************\n \n Plus:\n - Changing the rendering strategy for 3D lines that go past the camera. Formerly it was\n "draw it, even though it\'s crazy sometimes", now it will be "don\'t draw it".\n - Showing the rate that inputs are received for each player index when you press the\n [home] key. Toggle back off with the [end] key.\n - Fixed a bug where party_member_bot could get influenced by real controller input.\n - Creating new presets in the GUI works better now.\n - Got rid of the libpng warning seen when using the GUI.\n - Giving specific error messages when cfg files are messed up.\n ', '1.2.2': '\n - Rearranged the GUI a bit, and made it load and track appearance configs more effectively.\n - Fixed bug where RUN button behavior in the GUI would not work after killing bots.\n ', '1.2.0': "\n - We now offer a 'RigidBodyTick' thanks to whatisaphone! It's a lower-level representation of\n physics data which updates at 120Hz and is not subject to interpolation. You can still make a \n great bot without it, but this feature is quite nice for the scientists among us.\n \n See https://github.com/RLBot/RLBotPythonExample/wiki/Rigid-Body-Tick for more details!\n \n - Faster way to access ball prediction data in python. - Skyborg\n ", '1.1.3': '\n - Faster way to access ball prediction data in python. - Skyborg\n - Java bots will now shut down when the python framework quits. This has been necessary recently\n to avoid buggy situations.\n - Shutting down the python framework will no longer attempt to kill bots twice in a row.\n - Clicking on the "Run" button twice in a row in the GUI will no longer spawn duplicate processes.\n ', '1.1.2': '\n Faster way to access ball prediction data in python. - Skyborg\n ', '1.1.1': '\n You can now get information about the ball\'s status in Dropshot mode thanks to hallo_doei!\n Read all about it at https://github.com/RLBot/RLBot/wiki/Dropshot\n\n Other changes:\n - The loadout config for orange team is now respected again. - ccman32\n - Fixed a bug where the GUI would crash with a "KeyError". - hallo_doei\n - Avoiding and suppressing some game crashes, and also restoring the\n ability to get game tick data during replays and the postgame. - tarehart\n - Fixed a bug where bots would dodge when they intended to double jump. -tarehart\n ', '1.0.6': '\n The latest Rocket League patch broke dodges for our bots; this update fixes it.\n ', '1.0.5': '\n Maximum size for a render message has been decreased again because many people experienced\n errors related to memory access. The limit is now only double the original.\n ', '1.0.4': '\n - Maximum size for a render message has been increased by a factor of 100. This means you can\n draw a lot of lines at once without getting errors.\n - Boost amount for cars will now round up to the nearest integer, so 0.3% boost will now appear\n as 1 instead of 0.\n - Fixed a crash that would commonly happen after a match ends. As a side effect, you can no longer\n see up-to-date player data during instant replays.\n ', '1.0.3': '\n Time for the big 1.0 release! We actually left "beta" a long time ago so this isn\'t as big\n a milestone as the number implies, but we DO have two great new features!\n\n 1. Setting game state. You can manipulate the position, velocity, etc of the ball and the cars!\n This can be a great help during bot development, and you can also get creative with it. Visit\n the wiki for details and documentation - https://github.com/RLBot/RLBot/wiki/Manipulating-Game-State\n Code written by hallo_doei, ccman32, and tarehart\n\n 2. Ball prediction. We now provide a list of future ball positions based on chip\'s excellent\n physics modeling. Take advantage of this to do next-level wall reads, catches, and dribbles! You can\n read about the math involved here: https://samuelpmish.github.io/notes/RocketLeague/ball_bouncing/\n Note: currently the wall bounces are only accurate on the standard arena, not hoops or dropshot.\n Documentation and examples can be found here: https://github.com/RLBot/RLBot/wiki/Ball-Path-Prediction\n Code written by chip and tarehart\n\n Bonus:\n - You can now play on Salty Shores thanks to hallo_doei\n - Bug fix for people with spaces in their file path by Zaptive\n - Subprocess agent for future Rust support by whatisaphone\n ', '0.0.32': '\n More comprehensive fix for Rocket League patch 1.50. Compared to previous version:\n - Dropshot tile data is fixed\n - Boost pad data is fixed\n - Loadout configuration is fixed\n \n Thanks to ccman32 and dtracers for delivering this fix quickly!\n ', '0.0.31': '\n Rapid response to Rocket League patch 1.50 with the following known issues:\n - Dropshot tile data is missing\n - Boost pad data is missing\n - Loadout configuration is broken\n \n Thanks to ccman32 and dtracers for delivering this short-term fix quickly.\n\n We will follow this up with a proper fix as soon as possible. You may also choose to stay on\n Rocket League 1.49 and RLBot 0.0.30, ask for instructions on discord.\n ', '0.0.30': "\n - New core dll that is less likely to break when Rocket League is patched - ccman32 and hallo-doei\n - Fixed bug resulting in incorrect quickchat - dtracers\n - Added more built-in colors to the python rendering manager - Eastvillage\n - Fix for items with a ':' not showing up in the GUI - hallo-doei\n - Fix for GUI not saving correct path - hallo-doei\n - Fix for GUI crash when saving preset then canceling - hallo-doei\n - Adding file checking before injection (Resolves #167) - Redox\n - Fixed typo in rlbot.cfg - Redox\n - Fancy release notes - tarehart and Skyborg\n "} release_banner = '\n\n ______ _ ______ _\n 10100 | ___ \\ | | ___ \\ | | 00101\n 110011 | |_/ / | | |_/ / ___ | |_ 110011\n 00110110 | /| | | ___ \\/ _ \\| __| 01101100\n 010010 | |\\ \\| |____| |_/ / (_) | |_ 010010\n 10010 \\_| \\_\\_____/\\____/ \\___/ \\__| 01001\n\n\n' def get_current_release_notes(): if __version__ in release_notes: return release_notes[__version__] return '' def get_help_text(): return 'Trouble? Ask on Discord at https://discord.gg/5cNbXgG or report an issue at https://github.com/RLBot/RLBot/issues' def print_current_release_notes(): print(release_banner) print('Version {}'.format(__version__)) print(get_current_release_notes()) print(get_help_text()) print('')
input = """ c(2). p(1). a(2). d(2,2,1). okay(X):- c(X), #count{V:a(V),d(V,X,1)} = 1. ouch(X):- p(X), #count{V:a(V),d(V,X,1)} = 1. """ output = """ {a(2), c(2), d(2,2,1), okay(2), p(1)} """
input = '\nc(2).\np(1).\na(2).\nd(2,2,1).\nokay(X):- c(X), #count{V:a(V),d(V,X,1)} = 1.\nouch(X):- p(X), #count{V:a(V),d(V,X,1)} = 1.\n' output = '\n{a(2), c(2), d(2,2,1), okay(2), p(1)}\n'
"#\n# PySNMP MIB module XXX-MIB (http://snmplabs.com/pysmi)\n# ASN.1 source file:///Users/davwang4/D(...TRUNCATED)
"(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', '(...TRUNCATED)
"# Copyright (c) 2009 The Chromium Authors. All rights reserved.\n# Use of this source code is gover(...TRUNCATED)
"{'conditions': [['OS!=\"win\"', {'variables': {'config_h_dir': '.'}}, {'variables': {'config_h_dir'(...TRUNCATED)
"# def mul(a):\n# \treturn lambda b:b*a\n\n# singler = mul(1) # addition = lambda b:b*1\n# double(...TRUNCATED)
"class Student:\n\n def __init__(self, fname):\n self.fname = fname\n\n def greet(self,(...TRUNCATED)
"class MyError(Exception):\n pass\n\n\nclass PropertyContainer(object):\n def __init__(self):\(...TRUNCATED)
"class Myerror(Exception):\n pass\n\nclass Propertycontainer(object):\n\n def __init__(self):\(...TRUNCATED)

No dataset card yet

New: Create and edit this dataset card directly on the website!

Contribute a Dataset Card
Downloads last month
21
Add dataset card