-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from huggingface/training
Training
- Loading branch information
Showing
93 changed files
with
13,894 additions
and
246 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt | ||
if errorlevel 1 exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$PYTHON setup.py install --single-version-externally-managed --record=record.txt # Python command to install the script. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# coding: utf8 | ||
"""Py2/3 compatibility""" | ||
import sys | ||
|
||
is_python2 = int(sys.version[0]) == 2 | ||
is_windows = sys.platform.startswith('win') | ||
is_linux = sys.platform.startswith('linux') | ||
is_osx = sys.platform == 'darwin' | ||
|
||
if is_python2: | ||
bytes_ = str | ||
unicode_ = unicode | ||
string_types = (str, unicode) | ||
chr_ = unichr | ||
|
||
def unicode_to_bytes(s, encoding='utf8', errors='strict'): | ||
return s.encode(encoding=encoding, errors=errors) | ||
|
||
def bytes_to_unicode(b, encoding='utf8', errors='strict'): | ||
return unicode_(b, encoding=encoding, errors=errors) | ||
|
||
else: | ||
bytes_ = bytes | ||
unicode_ = str | ||
string_types = (bytes, str) | ||
chr_ = chr | ||
|
||
def unicode_to_bytes(s, encoding='utf8', errors='strict'): | ||
return s.encode(encoding=encoding, errors=errors) | ||
|
||
def bytes_to_unicode(b, encoding='utf8', errors='strict'): | ||
return b.decode(encoding=encoding, errors=errors) |
Oops, something went wrong.