Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
""" | |
<w:outlineLvl w:val="4"/> | |
""" | |
import re | |
def transform(text: str, inc: int): | |
return re.sub(r'w:outlineLvl w:val="(\d)"', lambda exp: f'w:outlineLvl w:val="{int(exp.groups()[0]) + inc}"', text) | |
# return re.sub(r'w:pStyle w:val="(\d)"', lambda exp: f'w:pStyle w:val="{int(exp.groups()[0])+inc}"', text) |
This file contains 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 require_json() | |
-- https://github.com/rxi/json.lua/blob/master/json.lua | |
-- hack for CMO Lua | |
function rawget(t, k) | |
return t[k] | |
end | |
local json = { _version = "0.1.2" } |
This file contains 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 torch | |
from tqdm import tqdm | |
print(torch.cuda.is_available()) | |
t_cpu = torch.zeros(10000, 10000) | |
t_cpu2 = torch.zeros(10000, 10000) | |
tt_cpu = t_cpu * t_cpu2 | |
t_gpu = t_cpu.cuda() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Executor = { | |
attacker_list=nil, | |
defender=nil, | |
} | |
Executor.__index = Executor | |
function Executor:new() | |
local o = {} | |
setmetatable(o, self) | |
return o | |
end |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" | |
xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" xmlns:t="http://www.microsoft.com/temp"> | |
<xsl:output method="html" encoding="us-ascii"/> | |
<xsl:template match="/"> | |
<xsl:call-template name="Start"/> | |
</xsl:template> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 requests | |
proxies = {"http": "http://127.0.0.1:8889", "https": "http://127.0.0.1:8889"} | |
url = "https://www.google.com" | |
%time requests.get(url, proxies=proxies) | |
from multiprocessing.pool import ThreadPool | |
%%time |
NewerOlder