Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djrandom-py-deleted-112
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is pending deletion, and will be deleted on
2025-06-14
. Repository and other project resources are read-only.
Show more breadcrumbs
ale
djrandom-py-deleted-112
Commits
101ee3ce
Commit
101ee3ce
authored
13 years ago
by
Robert J. Newmark
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.autistici.org:djrandom
parents
09fed4d0
7440f7f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/djrandom/fingerprint/dedup.py
+6
-5
6 additions, 5 deletions
server/djrandom/fingerprint/dedup.py
server/djrandom/frontend/templates/user_details.html
+0
-4
0 additions, 4 deletions
server/djrandom/frontend/templates/user_details.html
with
6 additions
and
9 deletions
server/djrandom/fingerprint/dedup.py
+
6
−
5
View file @
101ee3ce
...
...
@@ -45,20 +45,21 @@ def dedupe_db():
&
(
MP3
.
echoprint_fp
!=
None
))
for
mp3
in
mp3s
:
code
=
generate_code_json
(
mp3
.
echoprint_fp
,
mp3
.
sha1
)
codes
[
mp3
.
sha1
]
=
code
if
not
code
:
continue
codes
[
mp3
.
sha1
]
=
code
[
'
fp
'
]
fp
.
ingest
([
code
],
do_commit
=
False
,
local
=
True
)
fp
.
commit
()
# Now dedupe by going through all our codes over again.
for
sha1
,
code
in
codes
.
iteritems
():
results
=
fp
.
query_fp
(
code
,
local
=
True
)
results
=
fp
.
query_fp
(
code
,
local
=
True
)
.
results
if
len
(
results
)
<
2
:
continue
print
'
SHA1: %s
'
%
sha1
for
track_id
,
score
in
results
:
if
track_id
==
sha1
:
continue
print
'
--> %s (%f)
'
%
track_id
,
score
print
'
--> %s (%f)
'
%
(
track_id
,
score
)
def
run_deduper
(
db_url
):
...
...
@@ -66,7 +67,7 @@ def run_deduper(db_url):
dedupe_db
()
if
__name__
==
'
__
main
__
'
:
def
main
()
:
parser
=
optparse
.
OptionParser
()
parser
.
add_option
(
'
--db_url
'
)
daemonize
.
add_standard_options
(
parser
)
...
...
This diff is collapsed.
Click to expand it.
server/djrandom/frontend/templates/user_details.html
+
0
−
4
View file @
101ee3ce
...
...
@@ -2,8 +2,6 @@
{% block title %}User Details{% endblock %}
{% block main %}
<div
id=
"form"
>
{%- for msg in get_flashed_messages() -%}
<p
class=
"flash"
>
{{ msg | e }}
</p>
{%- endfor -%}
...
...
@@ -47,6 +45,4 @@
</div>
</div>
{% endblock %}
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