# simulated batch of images
x = torch.rand(64, 3, 224, 224)
# or some number of layers up the convolutional stack
x = torch.rand(64, 256, 32, 32)
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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
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
# Authors: Mathieu Blondel, Vlad Niculae | |
# License: BSD 3 clause | |
import numpy as np | |
def _gen_pairs(gen, max_iter, max_inner, random_state, verbose): | |
rng = np.random.RandomState(random_state) | |
# if tuple, interpret as randn |
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
# Upper | |
cpulimit -l 1 -- taskset -c 0 ./pct | |
cpulimit -l 18 -- taskset -c 1 ./pct | |
cpulimit -l 35 -- taskset -c 2 ./pct | |
cpulimit -l 52 -- taskset -c 3 ./pct | |
cpulimit -l 69 -- taskset -c 4 ./pct | |
cpulimit -l 86 -- taskset -c 5 ./pct | |
cpulimit -l 103 -- taskset -c 6 ./pct | |
cpulimit -l 1 -- taskset -c 63 ./pct |
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
"""Hack to add per-session state to Streamlit. | |
Usage | |
----- | |
>>> import SessionState | |
>>> | |
>>> session_state = SessionState.get(user_name='', favorite_color='black') | |
>>> session_state.user_name | |
'' |
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 re | |
def cjk_detect(texts): | |
# korean | |
if re.search("[\uac00-\ud7a3]", texts): | |
return "ko" | |
# japanese | |
if re.search("[\u3040-\u30ff]", texts): | |
return "ja" |
You have to already have these in your system:
- Python. Version 3.6+ is highly recommended.
- Official CPython from python.org
- Anaconda
- (Recommended) Miniconda