-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
84:39 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
POP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Boney M. - 284 | ||
Bonnie Tyler - 334 | ||
Dragonforce - 445 | ||
Dschinghis Khan - 460 | ||
Foster The People - 253 | ||
Gloryhammer - 265 | ||
Gopnik McBlyat - 261 | ||
Green Day - 288 | ||
Imagine Dragons - 392 | ||
Korpiklaani - 194 | ||
Linkin Park - 219 | ||
Nirvana - 279 | ||
Powerwolf - 739 | ||
Rick Astley - 213 | ||
Smash Mouth - 237 | ||
Steppenwolf - 216 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thunder | ||
radioactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
incense and iron | ||
venom of venus | ||
dancing with the dead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Rick Astley Never Gonna Give You Up pop 213 | ||
Dragonforce Through the Fire and Flames metal 445 | ||
Boney M. Rasputin pop 284 | ||
Steppenwolf Born To Be Wild rock 216 | ||
Powerwolf Incense and Iron metal 240 | ||
Smash Mouth All Star rock 237 | ||
Nirvana Smells Like Teen Spirit rock 279 | ||
Gloryhammer The Unicorn Invasion of Dundee metal 265 | ||
Powerwolf Venom of Venus metal 208 | ||
Dschinghis Khan Moskau pop 275 | ||
Dschinghis Khan Dschinghis Khan pop 185 | ||
Bonnie Tyler Total Eclipse of the Heart pop 334 | ||
Gopnik McBlyat Snakes In Tracksuits hardbass 261 | ||
Foster The People Pumped Up Kicks pop 253 | ||
Powerwolf Dancing With The Dead metal 291 | ||
Green Day Boulevard of Broken Dreams rock 288 | ||
Korpiklaani Ievan polkka metal 194 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
def beolvas(): | ||
with open("playlist.csv",'r') as File: | ||
playlist = [ (lambda l : {'eloado' : l[0], "cim" : l[1], "mufaj" : l[2], "hossz" : int(l[3]) } )( line.strip().split(';') ) for line in File ] | ||
return playlist | ||
|
||
def teljes_hossz(playlist): | ||
osszeg = sum([i["hossz"] for i in playlist]) | ||
m,s = osszeg // 60 ,osszeg % 60 | ||
with open("02_hossz.txt","w") as File: | ||
File.write(f"{m}:{s}") | ||
|
||
def leghosszabb_rockzene(playlist): | ||
H = [i['hossz'] for i in playlist] | ||
with open("leghosszabb_rockzene.txt",'w') as File: | ||
File.write(playlist[H.index(max(H))]["cim"]) | ||
|
||
def leggyakoribb_mufaj(playlist): | ||
mufaj = [i['mufaj'] for i in playlist] | ||
M = {i : mufaj.count(i) for i in set(mufaj)} | ||
count = [*M.values()] | ||
with open("04_kedvenc_mufaj.txt","w") as File: | ||
File.write( [ *M.keys() ][ count.index(max(count)) ].upper() ) | ||
|
||
def zeneket_csoportosit(playlist): | ||
E = {} | ||
for i in playlist: | ||
E[i["eloado"]] = E.get(i["eloado"],0) + i["hossz"] | ||
with open("05_osszegzes.txt","w") as File: | ||
for eloado in sorted(E): | ||
File.write(f"{eloado} - {E[eloado]}\n") | ||
|
||
def zeneket_listaz(playlist,nev): | ||
Dalok = [i["cim"].lower() for i in playlist if i["eloado"].lower() == nev.lower()] | ||
|
||
with open(f"06_{nev.lower().replace(' ','_')}_dalok.txt","w") as File: | ||
if Dalok: | ||
for i in Dalok: | ||
File.write(f"{i}\n") | ||
else: | ||
File.write("Nincs ilyen eloado a lejatszasi listaban!") | ||
|
||
def zeneket_torol(playlist,nevek): | ||
with open("07_torolt.txt","w") as File: | ||
for i in playlist: | ||
if not i['eloado'] in nevek: | ||
File.write(f"{i['eloado']} {i['cim']} {i['mufaj']} {i['hossz']}\n") | ||
|
||
|
||
L = beolvas() | ||
teljes_hossz(L) | ||
leghosszabb_rockzene(L) | ||
leggyakoribb_mufaj(L) | ||
zeneket_csoportosit(L) | ||
zeneket_listaz(L,"POWERWOLF") | ||
zeneket_torol(L,["Linkin Park","Imagine Dragons"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Through the Fire and Flames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Rick Astley;Never Gonna Give You Up;pop;213 | ||
Imagine Dragons;Thunder;pop;204 | ||
Dragonforce;Through the Fire and Flames;metal;445 | ||
Boney M.;Rasputin;pop;284 | ||
Steppenwolf;Born To Be Wild;rock;216 | ||
Powerwolf;Incense and Iron;metal;240 | ||
Smash Mouth;All Star;rock;237 | ||
Nirvana;Smells Like Teen Spirit;rock;279 | ||
Gloryhammer;The Unicorn Invasion of Dundee;metal;265 | ||
Powerwolf;Venom of Venus;metal;208 | ||
Imagine Dragons;Radioactive;rock;188 | ||
Dschinghis Khan;Moskau;pop;275 | ||
Dschinghis Khan;Dschinghis Khan;pop;185 | ||
Bonnie Tyler;Total Eclipse of the Heart;pop;334 | ||
Gopnik McBlyat;Snakes In Tracksuits;hardbass;261 | ||
Foster The People;Pumped Up Kicks;pop;253 | ||
Linkin Park;In The End;rock;219 | ||
Powerwolf;Dancing With The Dead;metal;291 | ||
Green Day;Boulevard of Broken Dreams;rock;288 | ||
Korpiklaani;Ievan polkka;metal;194 |