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 math | |
| import torch | |
| from torch.optim import Optimizer | |
| from toolkit.optimizers.optimizer_utils import Auto8bitTensor, copy_stochastic, stochastic_grad_accummulation | |
| @torch.compile | |
| def zeropower_via_newtonschulz5(G, steps): | |
| """ | |
| Newton-Schulz iteration to compute the zeroth power / orthogonalization of G. We opt to use a | |
| quintic iteration whose coefficients are selected to maximize the slope at zero. For the purpose |
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 math | |
| import torch | |
| from torch.optim import Optimizer | |
| from toolkit.optimizers.optimizer_utils import copy_stochastic, stochastic_grad_accummulation | |
| @torch.compile | |
| def zeropower_via_newtonschulz5(G, steps): | |
| """ | |
| Newton-Schulz iteration to compute the zeroth power / orthogonalization of G. We opt to use a | |
| quintic iteration whose coefficients are selected to maximize the slope at zero. For the purpose |
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
| # Copyright 2023 The HuggingFace Team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
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
| <DefaultPrices> | |
| <MarketItem> | |
| <TypeId>MyObjectBuilder_Component</TypeId> | |
| <SubtypeName>ZoneChip</SubtypeName> | |
| <Quantity>100000</Quantity> | |
| <SellPrice>1147</SellPrice> | |
| <BuyPrice>1000</BuyPrice> | |
| <IsBlacklisted>false</IsBlacklisted> | |
| </MarketItem> | |
| <MarketItem> |
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
| /* | |
| Run this script on | |
| https://steamcommunity.com/sharedfiles/managecollection/?id=2033309240 | |
| */ | |
| const bulklist = ` | |
| `; | |
| const list = bulklist.split(/\n/).filter(a => a !== '').map(a => a.trim()); |
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
| function loadScript(url, callback){ | |
| var script = document.createElement("script"); | |
| script.type = "text/javascript"; | |
| if (script.readyState){ // IEvil | |
| script.onreadystatechange = function () { | |
| if (script.readyState === "loaded" || script.readyState === "complete"){ | |
| script.onreadystatechange = null; | |
| callback(); | |
| } |
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
| var moment = function () { 'use strict'; | |
| var hookCallback; | |
| function utils_hooks__hooks () { | |
| return hookCallback.apply(null, arguments); | |
| } | |
| function setHookCallback (callback) { | |
| hookCallback = callback; |
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
| //What's the point of creating a null function and then overriding it? | |
| 'use strict'; | |
| function a () { | |
| var result = {}; | |
| result.__proto__.show = function () { | |
| return null; | |
| } | |
| result.show = function (param) { | |
| return foo(param); | |
| } |
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
| /** | |
| * Make div with bottom triangle (SO) | |
| * http://stackoverflow.com/questions/12251149/make-div-with-bottom-triangle/ | |
| */ | |
| html { background: darkgrey; } | |
| .box { | |
| box-sizing: border-box; | |
| position: relative; | |
| width: 200px; | |
| height: 50px; |
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
| /* | |
| * Adds a parent property to the children objects in-order to traverse the child objects back to their parents. | |
| * | |
| * Example of input parent array: | |
| * [ | |
| * { | |
| * name: 'yumiko', | |
| * children: [ | |
| * { | |
| * name: 'sally', |
NewerOlder