Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing an issue with the security of the server by replacing all the … #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marwan-abdellah
Copy link

…urrlib calls with requests.

@stephanmg
Copy link
Member

Thanks for the contribution @marwan-abdellah - I will have a look!

@stephanmg stephanmg self-assigned this Jun 20, 2023
@stephanmg stephanmg added the enhancement New feature or request label Jun 20, 2023
@stephanmg stephanmg self-requested a review July 28, 2023 15:29

import re, sys, os, requests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing space

"""

if not os.path.isdir(directory):
os.mkdir(directory)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing space

num_neurons = len(neurons['_embedded']['neuronResources'])
count = 0
for neuron in range(0, num_neurons):
# get each file
if index == -1: get_swc_by_neuron_name(neurons['_embedded']['neuronResources'][neuron]['neuron_name'])
if index == -1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing space

@@ -0,0 +1,1008 @@
import os
import joblib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import, remove please.

@@ -0,0 +1,1008 @@
import os
import joblib
import subprocess
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace

def execute_commands_parallel(shell_commands):
from joblib import Parallel, delayed
Parallel(n_jobs=os.cpu_count())(delayed(execute_command)(i) for i in shell_commands)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace

Copy link
Member

@stephanmg stephanmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the comments @marwan-abdellah, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants