Unnamed: 0 int64 0 920 | id int64 301 61.3k | accepted bool 2
classes | original stringlengths 1 255 ⌀ | modified stringlengths 8 1.68k ⌀ |
|---|---|---|---|---|
0 | 301 | false | // Returns true iff there are any queued messages. | // Returns true if there are any queued messages. |
1 | 1,022 | false | resp = urlopen('https://pypi.python.org/pypi/ipwb/json') | resp = urlopen('https://pypi.org/pypi/ipwb/json') |
2 | 1,023 | true | args.index = tempFilePath | tf = tempfile.NamedTemporaryFile(mode='w', suffix='.cdxj') tf.write(cdxjIn) args.index = tf.name tf.close() |
3 | 1,024 | true | f"\n")) | print(("> ipwb replay " f"{os.path.sep.join(['', 'path', 'to', 'your', 'index.cdxj'])}" "\n")) |
4 | 1,025 | true | INDEX_FILE = os.path.sep.join(['samples', 'indexes', 'salam-home.cdxj']) | INDEX_FILE = os.path.join('samples', 'indexes', 'salam-home.cdxj') |
5 | 1,026 | true | ipfsConfigPath = os.path.sep.join([expanduser("~"), '.ipfs', 'config']) | ipfsConfigPath = os.path.join(expanduser("~"), '.ipfs', 'config') |
6 | 1,027 | true | [os.environ.get('IPFS_PATH'), 'config']) | ipfsConfigPath = os.path.join( os.environ.get('IPFS_PATH'), 'config') |
7 | 1,028 | false | os.path.sep.join(['', 'samples', 'warc', warcInFilename])) | warcInPath = os.path.join( Path(os.path.dirname(__file__)).parent, 'samples', 'warc', warcInFilename) |
8 | 1,029 | true | os.path.sep.join(['', 'samples', 'warcs', warcOutFilename])) | warcOutPath = os.path.join( Path(os.path.dirname(__file__)).parent, 'samples', 'warcs', warcOutFilename)) |
9 | 1,030 | true | os.path.sep.join(['', 'samples', 'warcs', warcFilename])) | pathOfWARC = os.path.join( Path(os.path.dirname(__file__)).parent, 'samples', 'warcs', warcFilename)) |
10 | 1,031 | true | open(tempFilePath, 'a').close() # Create placeholder file for replay | tf = tempfile.NamedTemporaryFile(mode='a', suffix='.cdxj') tempFilePath = tf.name tf.close() |
11 | 1,032 | true | os.path.sep.join(['', 'samples', 'warcs', 'broken.warc'])) | pathOfBrokenWARC = os.path.join( Path(os.path.dirname(__file__)).parent, 'samples', 'warcs', 'broken.warc')) |
12 | 1,033 | true | os.path.sep.join(['', 'samples', 'warcs', warcInFilename])) | warcInPath = os.path.join( Path(os.path.dirname(__file__)).parent, 'samples', 'warcs', warcInFilename)) |
13 | 1,034 | false | f"{os.path.join('', 'path', 'to', 'your', 'index.cdxj')}\n")) | f"{os.path.join('path', 'to', 'your', 'index.cdxj')}\n")) |
14 | 1,035 | true | ipfsConfigPath = os.path.sep.join([expanduser("~"), '.ipfs', 'config']) | ipfsConfigPath = os.path.join(expanduser("~"), '.ipfs', 'config') |
15 | 1,036 | true | [os.environ.get('IPFS_PATH'), 'config']) | ipfsConfigPath = os.path.join( os.environ.get('IPFS_PATH'), 'config') |
16 | 1,037 | false | 'of ipwb is current') | help='Check if an updated version of ipwb is available' |
17 | 1,038 | true | # print('Adding {entry.get('url')}) | # print(f'Adding {entry.get("url")} to IPFS') |
18 | 1,039 | false | 'generator': f'InterPlanetary Wayback v.{ipwbVersion}', | 'generator': f'InterPlanetary Wayback v{ipwbVersion}', |
19 | 1,040 | false | logError(f'An unknown error occurred trying to fetch {path}') | logError(f'An unknown error occurred while trying to fetch {path}') |
20 | 1,042 | true | 'created_at': f'{datetime.datetime.now().isoformat()}' | 'created_at': datetime.datetime.now().isoformat() |
21 | 1,043 | false | msg += f'No capture(s) found for {urir}.' | msg += f'<p>No captures found for {urir}.</p>' |
22 | 1,044 | false | return "<h1>ERROR 404</h1>Not Found", 404 | return "<h1>ERROR 404</h1><p>Resource not found</p>", 404 |
23 | 1,045 | false | msg += f'No capture found for {path} at {datetime}.' | msg += f'<p>No captures found for {path} at {datetime}.</p>' |
24 | 1,046 | false | print(f'Getting CDXJ Lines with the URI-R {urir} from {indexPath}') | print(f'Getting CDXJ lines with the URI-R {urir} from {indexPath}') |
25 | 1,047 | false | print(f'Getting CDXJ Lines with the URI-R {urir} from {indexPath}') | print(f'Getting CDXJ lines with the URI-R {urir} from {indexPath}') |
26 | 1,048 | false | msg += f'No capture found for {urir} at {datetime}' | msg += f'<p>No captures found for {urir} at {datetime}.</p>' |
27 | 1,049 | false | print(f'Getting CDXJ Lines with {urir} in {indexPath}') | print(f'Getting CDXJ lines with {urir} in {indexPath}') |
28 | 1,050 | false | f'<input type="text" value="{urir}" id="url"' | f'<input type="text" value="{urir}" id="url" ' |
29 | 1,051 | true | '/../samples/warcs/variableSizedDates.warc') | pathOfBrokenWARC = \ os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'samples', 'warcs', 'variableSizedDates.warc')) |
30 | 1,052 | true | ) from e | except Exception as err: raise IPFSDaemonNotAvailable( 'Unknown error in retrieving IPFS daemon status.', ) from err |
31 | 1,053 | true | version='InterPlanetary Wayback ' + ipwb_version) | version=f'InterPlanetary Wayback {ipwb_version}') |
32 | 1,054 | true | ) | return '{}?{}'.format(url, query_string.decode('utf-8')) |
33 | 7,777 | true | results := []diagnostic.Diagnostic{} | var results []diagnostic.Diagnostic |
34 | 1,058 | true | # trimming the last two chars off of the surtk | surtk = surtk.rstrip(b"/") |
35 | 1,059 | true | datetimeK = rest.split()[0].decode() | surtk, datetimeK, rest = line.split(maxsplit=2) datetimeK = datetimeK.decode() |
36 | 1,060 | true | if datetime and datetime != datetimeK: | if datetime and datetime == datetimeK: |
37 | 1,061 | false | surtk = surtk[0:-1] | surtk, datetimeK, rest = nextLine.split(maxsplit=2) datetimeK = datetimeK.decode() surtk = surtk.rstrip(b"/") |
38 | 1,062 | true | if surt == surtK: | if surt == surtK: datetimeK = datetimeK.decode() |
39 | 1,073 | true | client = ipwbUtils.createIPFSClient() | client = createIPFSClient() |
40 | 7,778 | false | if isInList(resourceRegex, res) || res == "*" { | if res == "*" || isInList(resourceRegex, res) { |
41 | 1,066 | true | break | elif matchDegree == MementoMatch.EXACTMATCH: # Exact match found while iterating return [nextLine] |
42 | 1,067 | true | break | elif matchDegree == MementoMatch.EXACTMATCH: return [line] |
43 | 1,068 | true | left = 0 | # Skip metadata lines while iter.peek(1)[:1] == b'!': iter.readline() # Set the beginning position to the start of the first data line left = iter.tell() |
44 | 1,069 | true | surtk, datetimeK, rest = line.split(maxsplit=2) | try: surtk, datetimeK, rest = line.split(maxsplit=2) except ValueError as e: continue |
45 | 1,070 | true | help='Location of ipfs daemon (default 127.0.0.1:5001)', | help='Multi-address of IPFS daemon (default /dns/localhost/tcp/5001/http)', |
46 | 6,675 | false | "sqlalchemy>=1.2.0,<=1.4.29", | "sqlalchemy>=1.2.0,<=1.4.26", |
47 | 1,074 | true | def createIPFSClient(): | def createIPFSClient(daemonMultiaddr=IPFSAPI_MUTLIADDRESS): |
48 | 1,075 | true | return ipfsapi.Client(IPFSAPI_MUTLIADDRESS) | return ipfsapi.Client(daemonMultiaddr) |
49 | 1,448 | true | @ModifyConstant(method = "func_225464_a", constant = @Constant(ordinal = 0)) | @ModifyConstant(method = "func_225464_a", constant = @Constant(doubleValue = 0.0D, ordinal = 0)) |
50 | 7,779 | true | resources = []string{} | var resources []string |
51 | 1,449 | true | .defineInRange("verticalViewDistance", 4, 2, 16); | .defineInRange("verticalViewDistance", 4, 2, 32); |
52 | 1,450 | true | iTicketManager.getCubeTaskPriorityQueueSorter().onUpdateCubeLevel(CubePos.from(pos), () -> this.horizDistances.get(pos), horizCurrentDistance, (horizDistance) -> { | iTicketManager.getCubeTaskPriorityQueueSorter().onUpdateCubeLevel(CubePos.from(pos), () -> this.horizDistances.get(pos), horizCurrentDistance+verticalViewDistance, (horizDistance) -> { |
53 | 1,452 | false | private static final SliderPercentageOption VERTICAL_RENDER_DISTANCE = new SliderPercentageOption("options.renderDistance", 2.0D, 16.0D, 1.0F, (gameSettings) -> (double) CubicChunksConfig.verticalViewDistance.get(), | private static final SliderPercentageOption VERTICAL_RENDER_DISTANCE = new SliderPercentageOption("options.renderDistance", 2.0D, 32.0D, 1.0F, (gameSettings) -> (double) CubicChunksConfig.verticalViewDistance.get(), |
54 | 2,519 | false | CraftTweakerConstants.rl("output/chanced_outputs"), | CraftTweakerConstants.rl("output/chanced_items"), |
55 | 2,520 | true | } | complete = complete || condition.test(actor, data); |
56 | 2,521 | true | * <p>{@link SequenceBuilder}'s let you compose scripted events such as waiting 5 ticks, then setting the weather to rain | * <p>{@link SequenceBuilder}'s let you compose scripted events such as waiting 5 ticks, then setting the weather to rain.</p> |
57 | 2,547 | true | */ | * @return The ItemStack in the specific hand. * * @docParam hand MCHand.MAIN_HAND */ |
58 | 2,522 | true | * <p>{@link SequenceBuilder}'s let you compose scripted events such as waiting 5 ticks, then setting the weather to rain | * <p>{@link SequenceBuilder}'s let you compose scripted events such as waiting 5 ticks, then setting the weather to rain.</p> |
59 | 2,523 | false | * @param task The task toa dd. | * @param task The task to add. |
60 | 2,524 | false | * Manages the regisrtation of taggable elements and their managers used for Tags. | * Manages the registration of taggable elements and their tag managers. |
61 | 2,525 | false | String value(); | @Pattern("[a-z\\d_.-]+:[a-z\\d/._-]+") String value(); |
62 | 2,526 | false | String value(); | @Pattern("[a-z\\d_.-]+:[a-z\\d/._-]+") String value(); |
63 | 2,548 | true | */ | * Sets a copied given itemStack to the hand * * @docParam hand MCHand.MAIN_HAND * @docParam itemStack <item:minecraft:diamond> */ |
64 | 5,253 | false | ActionView::TestCase::TestController.new | @controller ||= ActionView::TestCase::TestController.new |
65 | 2,527 | false | if(manager.getClass().equals(KnownTagManager.class)) { | if(KnownTagManager.isAssignableFrom(manager.getClass())) { |
66 | 2,528 | true | final RunInfo info = Objects.requireNonNull(this.currentRunInfo); | throw new IllegalStateException("Unable to terminate a script run that never started"); |
67 | 2,529 | false | return Optional.ofNullable(this.presentAnnotationTypes.get(annotationClass)).map(it -> (T) it); | return Optional.ofNullable(this.presentAnnotationTypes.get(annotationClass)).map(annotationClass::cast); |
68 | 2,530 | false | if(old != null) { | if(enums.containsKey(id)) { |
69 | 2,531 | false | @ZenCodeType.Getter("priceMutiplier") | @ZenCodeType.Getter("priceMultiplier") |
70 | 2,557 | true | * @param tokens The biome resource location | * @param tokens The biome's resource location |
71 | 5,254 | false | def render_view(view, &block) | def render(view, &block) |
72 | 2,532 | false | * This means that also bracket handlers in the various sub-packages will be queried.</p> | * <p>The concept of package used in this method corresponds to the ZenCode concept instead of the Java concept. * This means that bracket handlers in the various sub-packages will also be queried.</p> |
73 | 2,533 | false | * above is sufficient for CraftTweaker to handle registration manually.</p> | * above is sufficient for CraftTweaker to handle registration automatically.</p> |
74 | 2,534 | false | * Gets the name of the sub command used in {@code ct dump} to invoke this dumper. | * Gets the name of the sub command used in {@code /ct dump} to invoke this dumper. |
75 | 2,535 | false | * above is sufficient for CraftTweaker to handle registration manually.</p> | * above is sufficient for CraftTweaker to handle registration automatically.</p> |
76 | 2,577 | false | * @docEvent canceled the Entity does not travel to the dimension. | * @docEvent canceled the Entity will not travel to the dimension. |
77 | 2,536 | false | * above is sufficient for CraftTweaker to handle registration manually.</p> | * above is sufficient for CraftTweaker to handle registration automatically.</p> |
78 | 2,537 | false | * <p>A native type is a class that belongs that has not been written with ZenCode scripts in mind, but that is | * <p>A native type is a pre-existing class that has not been written with ZenCode scripts in mind, but that is |
79 | 2,538 | true | PacketHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) player), new MessageOpen("https://docs.blamejared.com/1.16/en/index")); | PacketHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) player), new MessageOpen("https://docs.blamejared.com")); |
80 | 2,539 | true | CommandUtilities.send("CT GUI was limiting and very buggy and has since been removed. It is now recommended to learn ZenScript instead - you can browse the wiki for reference (/wiki) or ask for help on the Discord server (/discord).", player); | CommandUtilities.send("CT GUI was limiting and very buggy and has since been removed. It is now recommended to learn ZenScript instead - you can browse the wiki for reference (/ct wiki) or ask for help on the Discord server (/ct discord).", player); |
81 | 2,540 | true | * Sets items will be dropped. | * Sets which items will be dropped. |
82 | 2,549 | false | "Multiple recipe handlers found for the same recipe class %s: attempted registration of %s, using %s", | .filter(IRecipe.class::equals) |
83 | 2,541 | true | private static final SimpleCommandExceptionType INVALID_STRING = new SimpleCommandExceptionType(new LiteralMessage("Invalid String")); | private static final SimpleCommandExceptionType INVALID_STRING = new SimpleCommandExceptionType(new LiteralMessage("Unknown Recipe Type")); |
84 | 2,542 | false | if (++this.currentRight >= this.size) { | this.currentRight++; if (this.currentRight >= this.size) { |
85 | 2,543 | true | default <U extends IRecipe<?>> boolean isThereConflictBetween(final IRecipeManager manager, final T firstRecipe, final U secondRecipe) { | default <U extends IRecipe<?>> boolean doesConflict(final IRecipeManager manager, final T firstRecipe, final U secondRecipe) { |
86 | 2,544 | true | * Sets this ItemStack without a tag | * Removes the tag from this ItemStack. |
87 | 2,545 | true | * Gets the level of given enchantment on the item. Returns 0 if the item doesn't have given enchantment. | * Gets the level of the given enchantment on the item. Returns 0 if the item doesn't have the given enchantment. |
88 | 2,546 | true | CraftTweakerAPI.logDebug("Registering %s", name); | CraftTweakerAPI.logDebug("Registering '%s'", name); |
89 | 2,550 | true | * that is hardcoded and thus cannot have its ingredients replaced: this is a good candidate to addition.</p> | * that is hardcoded and thus cannot have its ingredients replaced: this is a good candidate to exclude.</p> |
90 | 2,551 | false | CTCommands.registerCommand("inventory", CTCommands.playerCommand("tags", "Outputs the tags of the item in your inventory", (player, stack) -> { | CTCommands.registerCommand("inventory", CTCommands.playerCommand("tags", "Outputs the tags of the items in your inventory", (player, stack) -> { |
91 | 2,552 | true | CraftTweakerAPI.logWarning("Actually, the immutable ItemStack is not damageable. Use `mutable` method to make it mutable first!"); | CraftTweakerAPI.logWarning("Cannot damage IItemStack, make it mutable with `mutable` first!"); |
92 | 2,553 | false | IRecipe<?> iRecipe = RecipeManager.deserializeRecipe(new ResourceLocation(CraftTweaker.MODID, name), recipeObject); | IRecipe<?> iRecipe = RecipeManager.deserializeRecipe(new ResourceLocation(CraftTweaker.MODID, name), recipeObject); if (iRecipe.getType() != getRecipeType()) { throw new IllegalArgumentException("The type of JSON Recipe is not matching the recipe type!"); } |
93 | 2,554 | true | private static final String CANCELED_INFO = "The class is cancelable."; | private static final String CANCELED_INFO = "The event is cancelable."; |
94 | 2,555 | true | * Sets the burn time of this item, for use in the furnace and other machines | * Sets the burn time of this ingredient, for use in the furnace and other machines |
95 | 2,556 | true | * Throws an error if it can't get such a biome | * Throws an error if it can't get the biome |
96 | 2,558 | true | * Gets damage source based on type. | * Gets a damage source based on type. |
97 | 2,559 | false | registerCommand(new CommandImpl("blockinfo", "Activates or deactivates the block reader. In block info mode, right-clicking a block will tell you it's name, metadata and Tile Entity data if applicable.", (CommandCallerPlayer) (player, stack) -> { | registerCommand(new CommandImpl("blockInfo", "Activates or deactivates the block reader. In block info mode, right-clicking a block will tell you it's name, metadata and Tile Entity data if applicable.", (CommandCallerPlayer) (player, stack) -> { |
98 | 2,560 | false | ExpandPlayerEntity.sendMessage(player, MCTextComponent.createStringTextComponent("Block info mode activated. Right-click a block to see its data.")); | ExpandPlayerEntity.sendMessage(player, MCTextComponent.createStringTextComponent("Block info mode activated. Right-click a block to see it's data.")); |
99 | 2,561 | false | })), "give", "Gives the player the item using the Bracket handler syntax. You can also apply tags by appending a .withTag() call."); | })), "give", "Gives the player an item using the Bracket handler syntax. You can also apply tags by appending a .withTag() call."); |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6