Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DetectingAnomalies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul G
DetectingAnomalies
Commits
04c2d53f
Commit
04c2d53f
authored
2 years ago
by
Paul G
Browse files
Options
Downloads
Patches
Plain Diff
init
parent
70e6b059
No related branches found
No related tags found
1 merge request
!1
Master
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
delete_images.ipynb
+61
-0
61 additions, 0 deletions
delete_images.ipynb
detecting_anomalie.ipynb
+428
-0
428 additions, 0 deletions
detecting_anomalie.ipynb
requirements.txt
+85
-0
85 additions, 0 deletions
requirements.txt
with
574 additions
and
0 deletions
delete_images.ipynb
0 → 100644
+
61
−
0
View file @
04c2d53f
{
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import random\n",
"\n",
"# Pfad zum Ordner, in dem sich die zu löschenden Dateien befinden\n",
"folder_path = \"D:/Studium/Masterarbeit/Einarbeitung/Codebeispiele/detecting_anomalies/data/cell_images/parasitized\"\n",
"\n",
"# Liste der Dateinamen im Ordner\n",
"file_list = os.listdir(folder_path)\n",
"\n",
"# Anzahl der Dateien, die Sie löschen möchten\n",
"num_files_to_delete = 0\n",
"\n",
"# Zufällige Auswahl der Dateien zum Löschen\n",
"files_to_delete = random.sample(file_list, num_files_to_delete)\n",
"\n",
"# Schleife zum Löschen der ausgewählten Dateien\n",
"for file_name in files_to_delete:\n",
" file_path = os.path.join(folder_path, file_name)\n",
" os.remove(file_path)\n",
" print(f\"Datei {file_name} wurde gelöscht.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
```
python
import
os
import
random
# Pfad zum Ordner, in dem sich die zu löschenden Dateien befinden
folder_path
=
"
D:/Studium/Masterarbeit/Einarbeitung/Codebeispiele/detecting_anomalies/data/cell_images/parasitized
"
# Liste der Dateinamen im Ordner
file_list
=
os
.
listdir
(
folder_path
)
# Anzahl der Dateien, die Sie löschen möchten
num_files_to_delete
=
0
# Zufällige Auswahl der Dateien zum Löschen
files_to_delete
=
random
.
sample
(
file_list
,
num_files_to_delete
)
# Schleife zum Löschen der ausgewählten Dateien
for
file_name
in
files_to_delete
:
file_path
=
os
.
path
.
join
(
folder_path
,
file_name
)
os
.
remove
(
file_path
)
print
(
f
"
Datei
{
file_name
}
wurde gelöscht.
"
)
```
%% Cell type:code id: tags:
```
python
```
This diff is collapsed.
Click to expand it.
detecting_anomalie.ipynb
0 → 100644
+
428
−
0
View file @
04c2d53f
This diff is collapsed.
Click to expand it.
requirements.txt
0 → 100644
+
85
−
0
View file @
04c2d53f
absl-py
==1.4.0
asttokens
==2.2.1
astunparse
==1.6.3
backcall
==0.2.0
cachetools
==5.3.1
certifi
==2023.7.22
charset-normalizer
==3.2.0
colorama
==0.4.6
comm
==0.1.3
contourpy
==1.1.0
cycler
==0.11.0
debugpy
==1.6.7
decorator
==5.1.1
executing
==1.2.0
flatbuffers
==23.5.26
fonttools
==4.41.1
gast
==0.4.0
google-auth
==2.22.0
google-auth-oauthlib
==1.0.0
google-pasta
==0.2.0
grpcio
==1.56.2
h5py
==3.9.0
idna
==3.4
imageio
==2.31.1
ipykernel
==6.25.0
ipython
==8.14.0
jedi
==0.18.2
jupyter_client
==8.3.0
jupyter_core
==5.3.1
keras
==2.13.1
kiwisolver
==1.4.4
lazy_loader
==0.3
libclang
==16.0.6
Markdown
==3.4.4
MarkupSafe
==2.1.3
matplotlib
==3.7.2
matplotlib-inline
==0.1.6
nest-asyncio
==1.5.6
networkx
==3.1
numpy
==1.24.3
oauthlib
==3.2.2
opencv-python
==4.8.0.74
opt-einsum
==3.3.0
packaging
==23.1
pandas
==2.0.3
parso
==0.8.3
pickleshare
==0.7.5
Pillow
==10.0.0
platformdirs
==3.9.1
prompt-toolkit
==3.0.39
protobuf
==4.23.4
psutil
==5.9.5
pure-eval
==0.2.2
pyasn1
==0.5.0
pyasn1-modules
==0.3.0
Pygments
==2.15.1
pyparsing
==3.0.9
python-dateutil
==2.8.2
pytz
==2023.3
PyWavelets
==1.4.1
pywin32
==306
pyzmq
==25.1.0
requests
==2.31.0
requests-oauthlib
==1.3.1
rsa
==4.9
scikit-image
==0.21.0
scipy
==1.11.1
six
==1.16.0
stack-data
==0.6.2
tensorboard
==2.13.0
tensorboard-data-server
==0.7.1
tensorflow
==2.13.0
tensorflow-estimator
==2.13.0
tensorflow-intel
==2.13.0
tensorflow-io-gcs-filesystem
==0.31.0
termcolor
==2.3.0
tifffile
==2023.7.18
tornado
==6.3.2
traitlets
==5.9.0
typing_extensions
==4.5.0
tzdata
==2023.3
urllib3
==1.26.16
wcwidth
==0.2.6
Werkzeug
==2.3.6
wrapt
==1.15.0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment