Skip to content

Commit

Permalink
fix the timestamp issue for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kbenoit authored and amatsuo committed May 18, 2017
1 parent b909b7e commit 37f0a13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
^travis_install\.sh$
^testenv
^spacyr/testenv

^env
^vignettes

^appveyor\.yml$
^tests/misc$
8 changes: 7 additions & 1 deletion inst/python/spacyr_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
import spacy
import time
import gc
import string
import random

def id_generator(size=10, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))


class spacyr:
def __init__(self):
Expand All @@ -20,7 +26,7 @@ def parse(self, texts):
if isinstance(texts, list) == False:
texts = [texts]
for text in texts:
epoch_nano = str(int(time.time() * 1000000))
epoch_nano = str(int(time.time() * 1000000)) + id_generator()
#text = text.decode('utf-8')
try:
if not isinstance(text, unicode):
Expand Down

0 comments on commit 37f0a13

Please sign in to comment.