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 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
local ContextActionService = game:GetService('ContextActionService') | |
local module = {hold=false} | |
local ActionNames={ | |
['ScrollDown']='ScrollDown', | |
['ScrollUp']='ScrollUp', | |
['ScrollRight']='ScrollRight', | |
['ScrollLeft']='ScrollLeft' | |
} |
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
local Terrain = game:GetService("Workspace").Terrain | |
-- The resolution required for Terrain system. | |
local terrainResolution = 4 | |
-- The smallest possible voxel size. | |
local region = Region3.new(Vector3.new(0,0,0), Vector3.new(4,4,4)) | |
-- The material as a 1x1x1 3d-grid. What material should go in the voxel? | |
local material = { |
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
# Note: ensure you have the latest version of Torchtext by running: pip install torchtext --upgrade | |
rnn_model = text_data.get_model(opt_fn, 1500, bptt, emb_sz=em_sz, n_hid=nh, n_layers=nl, | |
dropout=0.1, dropouti=0.65, wdrop=0.5, dropoute=0.1, dropouth=0.3) | |
# ... | |
rnn_model.data.test_dl.src.sort = False | |
rnn_model.data.test_dl.src.sort_within_batch = False | |
rnn_model.data.test_dl.src.shuffle = False |
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
from torchtext import data | |
class DataFrameDataset(data.Dataset): | |
def __init__(self, df, text_field, label_field, is_test=False, **kwargs): | |
fields = [('text', text_field), ('label', label_field)] | |
examples = [] | |
for i, row in df.iterrows(): | |
label = row.sentiment if not is_test else None | |
text = row.text |
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
BASE_PATH=./ | |
yum install -y wget | |
wget https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo -O /etc/yum.repos.d/vbatts-bazel-epel-7.repo | |
# Appear to have to run this twice to get it to run reliably. | |
yum install -y bazel; yum install -y bazel | |
if [ ! -d "$BASE_PATH/env" ]; then |
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
def get_regionserver_heap_size( | |
storage_capacity_in_gb, | |
region_max_filesize=10737418240, | |
memstore_flush_size=134217728, | |
replication_factor=3, | |
memstore_heap_fraction=0.4 | |
): | |
""" | |
Calculates heap size required based on storage requirements. | |
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
> pip install git+ssh://[email protected]/lextoumbourou/MyProject.git#egg=MyModule[extra] |
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
http { | |
map $http_accept $extension { | |
default html; | |
application/json json; | |
} | |
server { | |
listen 80; | |
error_page 500 /500; |
NewerOlder