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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat Mar 2 18:11:45 2019 | |
@author: yiyuezhuo | |
Require: | |
python-docx | |
https://github.com/python-openxml/python-docx/issues/320 | |
https://python-docx.readthedocs.io/en/latest/user/quickstart.html |
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
zzz | |
<⌒/ヽ-、___ | |
/<_/____/ | |
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ | |
∧_∧ | |
( ・ω・) 谜叔撸洞打雷又更新了!看爆! | |
_| ⊃/(___ | |
/ └-(____/ | |
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ |
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
""" | |
Created on Sep 24, 2013 | |
@author: RandomHardcoreJerks | |
Requires pywin32 | |
original: http://code.activestate.com/recipes/474121/ | |
# HtmlClipboard |
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
def compute_jacobian(f, x, output_dims): | |
''' | |
Normal: | |
f: input_dims -> output_dims | |
Jacobian mode: | |
f: output_dims x input_dims -> output_dims x output_dims | |
''' | |
repeat_dims = tuple(output_dims) + (1,) * len(x.shape) | |
jac_x = x.detach().repeat(*repeat_dims) | |
jac_x.requires_grad_() |
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
set path="" | |
set path=%cd%\anaconda_silent;%cd%\anaconda_silent\Scripts;%cd%\anaconda_silent\Library\bin | |
set path=%path%;C:\Windows\system32;C:\Windows | |
cmd |
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.
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 pystan | |
import pickle | |
from hashlib import md5 | |
def StanModel_cache(model_code, model_name=None, **kwargs): | |
"""Use just as you would `stan`""" | |
code_hash = md5(model_code.encode('ascii')).hexdigest() | |
if model_name is None: | |
cache_fn = 'cached-model-{}.pkl'.format(code_hash) | |
else: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer