Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Jul 2, 2021
1 parent 04bc1b7 commit 931419a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions build_script.bat
Expand Up @@ -5,8 +5,8 @@ set pythonexe="%1"
goto custom_python:

:default_value_python:
set pythonexe="c:\Python391_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python372_x64\python.exe"
set pythonexe="c:\Python395_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python391_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
Expand Down
8 changes: 3 additions & 5 deletions pandas_streaming/df/dataframe_split.py
Expand Up @@ -166,8 +166,7 @@ def iterator_rows():
memory[strat] = []
memory[strat].append(obs)

for k in memory:
v = memory[k]
for k, v in memory.items():
if len(v) >= n + random.randint(0, 10): # changement
vr = list(range(len(v)))
# on permute aléatoirement
Expand All @@ -190,12 +189,11 @@ def iterator_rows():
counts[0, k] += i
counts[1, k] += len(v) - i
# on efface de la mémoire les informations produites
memory[k].clear()
v.clear()

# Lorsqu'on a fini, il faut tout de même répartir les
# observations stockées.
for k in memory:
v = memory[k]
for k, v in memory.items():
vr = list(range(len(v)))
# on permute aléatoirement
random.shuffle(vr)
Expand Down

0 comments on commit 931419a

Please sign in to comment.