Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Get quotes from the K-ON anime in the most easiest way possible
Currently the file contains 213 quotes, however, more quotes are going to come in the future.
You can ask to add quotes by opening either an issue or a pull request
pip install kon_quotes
from kon_quotes import GETquote
quote = GETquote(character_you_want) # mio, yui, azusa, tsumugi, ritsu, sawako, jun, general, all
quote_author = quote.GETauthor()
print(f"{quote} - {quote_author}")
import requests, random
file_url = "https://zeyatsu.github.io/k-on-quotes/quotes.json" # No need to download the txt file.
response = requests.get(file_url)
if response.status_code == 200:
lines = response.text.splitlines()
random_line = random.choice(lines)
print(random_line)
else:
print("Error: ", response.status_code)
import random
import requests
json_url = "https://zeyatsu.github.io/k-on-quotes/quotes.json" # No need to download the json file.
response = requests.get(json_url)
if response.status_code == 200:
data = response.json()
random_author = random.choice(list(data["authors"].keys()))
random_quote = random.choice(data["authors"][random_author])
print(f"{random_quote} by {random_author}")
For characters replace "k-on-quotes/quotes.json" by "k-on-quotes/characters/the_character_you_want.json"
quote, author = random_quote.strip().split(" / ")
print(f"Quote: {quote} by {author}")
If you download the quotes.txt file instead of using the url, it is possible to get a UnicodeError. In this case, you will have to add a encoding parameter
with open('quotes.txt', 'r', encoding='utf-8') as f:
ZeyaTsu |
FAQs
K-ON Quotes API, get quotes from the K-ON Anime
We found that kon-quotes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.