This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
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
1 parent
cec2b8f
commit a2ee99d
Showing
8,755 changed files
with
280,951 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"files": {} | ||
} |
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,105 @@ | ||
# The command that runs the program. If the interpreter field is set, it will have priority and this run command will do nothing | ||
run = "python3 main.py" | ||
|
||
# The primary language of the repl. There can be others, though! | ||
language = "python3" | ||
entrypoint = "main.py" | ||
# A list of globs that specify which files and directories should | ||
# be hidden in the workspace. | ||
hidden = ["venv", ".config", "**/__pycache__", "**/.mypy_cache", "**/*.pyc"] | ||
|
||
# Specifies which nix channel to use when building the environment. | ||
[nix] | ||
channel = "stable-21_11" | ||
|
||
# The command to start the interpreter. | ||
[interpreter] | ||
[interpreter.command] | ||
args = [ | ||
"stderred", | ||
"--", | ||
"prybar-python3", | ||
"-q", | ||
"--ps1", | ||
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ", | ||
"-i", | ||
] | ||
env = { LD_LIBRARY_PATH = "$PYTHON_LD_LIBRARY_PATH" } | ||
|
||
[env] | ||
VIRTUAL_ENV = "/home/runner/${REPL_SLUG}/venv" | ||
PATH = "${VIRTUAL_ENV}/bin" | ||
PYTHONPATH = "${VIRTUAL_ENV}/lib/python3.10/site-packages" | ||
REPLIT_POETRY_PYPI_REPOSITORY = "https://package-proxy.replit.com/pypi/" | ||
MPLBACKEND = "TkAgg" | ||
POETRY_CACHE_DIR = "${HOME}/${REPL_SLUG}/.cache/pypoetry" | ||
|
||
# Enable unit tests. This is only supported for a few languages. | ||
[unitTest] | ||
language = "python3" | ||
|
||
# Add a debugger! | ||
[debugger] | ||
support = true | ||
|
||
# How to start the debugger. | ||
[debugger.interactive] | ||
transport = "localhost:0" | ||
startCommand = ["dap-python", "main.py"] | ||
|
||
# How to communicate with the debugger. | ||
[debugger.interactive.integratedAdapter] | ||
dapTcpAddress = "localhost:0" | ||
|
||
# How to tell the debugger to start a debugging session. | ||
[debugger.interactive.initializeMessage] | ||
command = "initialize" | ||
type = "request" | ||
|
||
[debugger.interactive.initializeMessage.arguments] | ||
adapterID = "debugpy" | ||
clientID = "replit" | ||
clientName = "replit.com" | ||
columnsStartAt1 = true | ||
linesStartAt1 = true | ||
locale = "en-us" | ||
pathFormat = "path" | ||
supportsInvalidatedEvent = true | ||
supportsProgressReporting = true | ||
supportsRunInTerminalRequest = true | ||
supportsVariablePaging = true | ||
supportsVariableType = true | ||
|
||
# How to tell the debugger to start the debuggee application. | ||
[debugger.interactive.launchMessage] | ||
command = "attach" | ||
type = "request" | ||
|
||
[debugger.interactive.launchMessage.arguments] | ||
logging = {} | ||
|
||
# Configures the packager. | ||
[packager] | ||
language = "python3" | ||
ignoredPackages = ["unit_tests"] | ||
|
||
[packager.features] | ||
enabledForHosting = false | ||
# Enable searching packages from the sidebar. | ||
packageSearch = true | ||
# Enable guessing what packages are needed from the code. | ||
guessImports = true | ||
|
||
# These are the files that need to be preserved when this | ||
# language template is used as the base language template | ||
# for Python repos imported from GitHub | ||
[gitHubImport] | ||
requiredFiles = [".replit", "replit.nix", ".config", "venv"] | ||
|
||
[languages] | ||
|
||
[languages.python3] | ||
pattern = "**/*.py" | ||
|
||
[languages.python3.languageServer] | ||
start = "pylsp" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,8 @@ | ||
import requests | ||
import time | ||
import os | ||
|
||
|
||
def clan_request(id): | ||
time.sleep(7) # 0.10 might be possible | ||
return requests.get("https://api.brawlhalla.com/clan/" + str(id) + "/?api_key=" + os.environ['API_KEY']) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
[{"clan_name": "PanzLGaming", "clan_id": 80000},{"clan_name": "clan souls of light", "clan_id": 80001}, {"clan_name": "Army of Leda", "clan_id": 80004}, {"clan_name": "JBOA", "clan_id": 80006}, {"clan_name": "Kajla", "clan_id": 80007}, {"clan_name": "Epatraktor", "clan_id": 80008}, {"clan_name": "SUPERDIOCANE", "clan_id": 80009}, {"clan_name": "TeKniTy", "clan_id": 80012}] |
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 @@ | ||
[] |
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,31 @@ | ||
import json | ||
from api3 import clan_request | ||
|
||
class Clan: | ||
def __init__(self, name, id): | ||
self.clan_name = name | ||
self.clan_id = id | ||
|
||
|
||
def get_clans(json_file, n): | ||
print("Start getting data, starting from " + str(n)) | ||
# load data | ||
with open(json_file) as data: | ||
all_clans_data = json.load(data) | ||
|
||
# if empty start getting data | ||
if (len(all_clans_data) == 0): | ||
while n < 10000000: | ||
try: | ||
with open(json_file) as data: | ||
all_clans_data = json.load(data) | ||
clan_data = json.loads(clan_request(n).content) | ||
name = clan_data["clan_name"] | ||
id = clan_data["clan_id"] | ||
all_clans_data.append(Clan(name, id).__dict__) | ||
with open(json_file, 'w') as f: | ||
all_clans_data = json.dump(all_clans_data, f) | ||
except: | ||
print(str(n) + " doesn't exist") | ||
|
||
n += 1 |
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,18 @@ | ||
from flask import Flask | ||
from threading import Thread | ||
|
||
app = Flask('') | ||
|
||
|
||
@app.route('/') | ||
def home(): | ||
return "Hello. I am alive! ~ Queen Spy" | ||
|
||
|
||
def run(): | ||
app.run(host='0.0.0.0', port=1000) | ||
|
||
|
||
def keep_alive(): | ||
t = Thread(target=run) | ||
t.start() |
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,49 @@ | ||
import json | ||
from api3 import clan_request | ||
from keep_alive import keep_alive | ||
from transport_data import transport_data | ||
from get_clans import get_clans | ||
|
||
# started 17 sep 2022 | ||
|
||
# VARIABLES | ||
global start_id | ||
start_id = 0 | ||
json_file = 'clans' + '.json' | ||
target_file = 'clans(1468700+)' + '.json' | ||
|
||
# get data a | ||
with open(json_file) as data_a: | ||
data_a = json.load(data_a) | ||
# transport data if not empty | ||
if len(data_a) > 0: | ||
transport_data(json_file, target_file) | ||
|
||
# get data b | ||
with open(target_file) as data_b: | ||
data_b = json.load(data_b) | ||
# new starting point if theres already data | ||
if len(data_b) > 0: | ||
last_saved_id = data_b[-1]['clan_id'] | ||
start_id = last_saved_id + 1 | ||
print('Set id to ' + str(start_id)) | ||
|
||
# get data | ||
get_clans(json_file, start_id) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
keep_alive() |
Oops, something went wrong.