language
stringclasses 1
value | file_name
stringlengths 5
79
| commit_id
stringlengths 40
40
| n_whitespaces
int64 4
10.8k
| d_id
int64 12
121k
| ast_levels
int64 6
36
| path
stringlengths 7
134
| ast_errors
stringlengths 0
3.11k
| repo
stringlengths 3
22
| url
stringlengths 31
59
| n_ast_errors
int64 0
9
| fun_name
stringlengths 1
80
| complexity
int64 1
139
| documentation
dict | n_identifiers
int64 2
176
| nloc
int64 1
413
| commit_message
stringlengths 3
15.3k
| n_ast_nodes
int64 17
19.2k
| vocab_size
int64 4
1.11k
| code
stringlengths 101
62.2k
| n_words
int64 4
4.82k
| token_counts
int64 5
3.06k
| id
int64 20
338k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Python | dd_controller.py | ea964109d654394cc0a5237e6ec5510ba6404097 | 130 | 83,548 | 11 | gamestonk_terminal/cryptocurrency/due_diligence/dd_controller.py | OpenBBTerminal | https://github.com/OpenBB-finance/OpenBBTerminal.git | 0 | call_bc | 2 | {
"docstring": "Process bc command\n Blockchain explorers URLs for loaded coin. Those are sites like etherescan.io or polkascan.io\n in which you can see all blockchain data e.g. all txs, all tokens, all contracts...\n ",
"language": "en",
"n_whitespaces": 84,
"n_words": 31,
"vocab_size": 28
} | 18 | 15 | Crypto menu refactor (#1119)
* enabled some crypto commands in dd to be called independent of source loaded
* support for coin_map_df in all dd functions + load ta and plot chart refactor
* updated tests and removed coingecko scrapping where possible
* removed ref of command from hugo
* updated pycoingecko version
* refactoring load
* refactored load to fetch prices; pred can run independent of source now
* load by default usd on cp/cg and usdt on cb/bin
* updated to rich for formatting and updated dependencies
* fixed changes requested
* update docs
* revert discord requirements
* removed absolute from calculate change for price
* fixing pr issues
* fix loading issue when similar coins exist, move coins to home, fill n/a
* update docs for coins
* adds load to ta and pred menu | 97 | 20 | def call_bc(self, other_args):
parser = argparse.ArgumentParser(
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="bc",
description=,
)
ns_parser = parse_known_args_and_warn(
parser, other_args, EXPORT_ONLY_RAW_DATA_ALLOWED
)
if ns_parser:
pycoingecko_view.display_bc(self.coin_map_df["CoinGecko"], ns_parser.export)
| 22 | 61 | 281,136 |
|
Python | conftest.py | fa2ad657482aca9dc628e6d7062b8badf2706bb6 | 37 | 5,330 | 10 | tests/conftest.py | spotify-downloader | https://github.com/spotDL/spotify-downloader.git | 0 | communicate | 1 | {
"docstring": "\n Ensure that the file has been download, and create empty output file,\n to avoid infinite loop.\n ",
"language": "en",
"n_whitespaces": 38,
"n_words": 16,
"vocab_size": 16
} | 7 | 4 | v4 init | 57 | 9 | async def communicate(self):
assert self._input.is_file()
self._output.open("w").close()
return (None, None)
| 9 | 32 | 30,126 |
|
Python | test_actor_reuse.py | 1510fb2cd631b2776092fb45ee4082e5e65f16f8 | 141 | 31,314 | 15 | python/ray/tune/tests/test_actor_reuse.py | ray | https://github.com/ray-project/ray.git | 0 | test_multi_trial_reuse_with_failing | 1 | {
"docstring": "Test that failing trial's actors are not reused.\n\n - 2 trials can run at the same time\n - Trial 1 succeeds, trial 2 fails\n - Trial 3 will be scheduled after trial 2 failed, so won't reuse actor\n - Trial 4 will be scheduled after trial 1 succeeded, so will reuse actor\n ",
"language": "en",
"n_whitespaces": 67,
"n_words": 52,
"vocab_size": 34
} | 19 | 17 | [air/tune] Internal resource management 2 - Ray Tune to use new Ray AIR resource manager (#30016)
Includes/depends on #30777
TLDR: This PR refactors Ray Tune's resource management to use a central AIR resource management package instead of the tightly coupled PlacementGroupManager.
Ray Tune's resource management currently uses a tightly coupled placement group manager. This leads to a number of shortcomings:
- The tight coupling on the manager side (e.g. PG manager keeps track of trials) prevents re-usability
- The tight coupling on the trial executor side prevents using different resource management strategies (e.g. shared or budget-based)
- It's hard to test independently. Tests for the resource management require a simulated tune setup.
To improve stability, extensibility, and maintainability, this PR moves the resource management logic into a central `ray.air.execution.resources` subpackage. The resource management has a simple API that works with `ResourceRequest`s and `AllocatedResources` to manage requested and assigned resources, respectively. The actual resource management can then be anything - per default it is a placement group based manager, but this PR also introduces a PoC budget-based manager that can be plugged in.
The PR does not substantially change existing tests, so we can be certain that the new resource model is a fully compatible replacement for the old placement group manager.
Signed-off-by: Kai Fricke <[email protected]> | 183 | 36 | def test_multi_trial_reuse_with_failing(ray_start_4_cpus_extra):
os.environ["TUNE_MAX_PENDING_TRIALS_PG"] = "2"
register_trainable("foo2", MyResettableClass)
[trial1, trial2, trial3, trial4] = tune.run(
"foo2",
config={
"fail": tune.grid_search([False, True, False, False]),
"id": -1,
"sleep": 2,
},
reuse_actors=True,
resources_per_trial={"cpu": 2},
raise_on_failed_trial=False,
).trials
assert trial1.last_result["num_resets"] == 0
assert trial3.last_result["num_resets"] == 0
assert trial4.last_result["num_resets"] == 1
| 42 | 113 | 138,092 |
|
Python | block_list.py | b5b4460932505912d88d65134931e0da170fb467 | 138 | 33,465 | 11 | python/ray/data/impl/block_list.py | ray | https://github.com/ray-project/ray.git | 0 | size_bytes | 4 | {
"docstring": "Returns the total size in bytes of the blocks, or -1 if not known.",
"language": "en",
"n_whitespaces": 13,
"n_words": 14,
"vocab_size": 13
} | 7 | 12 | Support creating a DatasetPipeline windowed by bytes (#22577) | 84 | 24 | def size_bytes(self) -> int:
size = 0
has_size = False
for m in self.get_metadata():
if m.size_bytes is not None:
has_size = True
size += m.size_bytes
if not has_size:
return -1
else:
return size
| 33 | 50 | 145,482 |
|
Python | colors.py | 0abe0ce2f2748d1d0383154d045da3609a4b871b | 66 | 23,145 | 11 | lib/matplotlib/colors.py | matplotlib | https://github.com/matplotlib/matplotlib.git | 0 | unregister | 2 | {
"docstring": "\n Remove a sequence from the registry.\n\n You cannot remove built-in color sequences.\n\n If the name is not registered, returns with no error.\n ",
"language": "en",
"n_whitespaces": 51,
"n_words": 22,
"vocab_size": 21
} | 8 | 5 | Add a registry for color sequences
Color sequences are simply lists of colors, that we store by name in
a registry. The registry is modelled similar to the ColormapRegistry
to 1) support immutable builtin color sequences and 2) to return copies
so that one cannot mess with the global definition of the color sequence
through an obtained instance.
For now, I've made the sequences used for `ListedColormap`s available
as builtin sequences, but that's open for discussion.
More usage documentation should be added in the color examples and/or
tutorials, but I'll wait with that till after the general approval of
the structure and API. One common use case will be
```
plt.rc_params['axes.prop_cycle'] = plt.cycler(color=plt.color_sequences['Pastel1')
```
Co-authored-by: Elliott Sales de Andrade <[email protected]> | 65 | 20 | def unregister(self, name):
if name in self._BUILTIN_COLOR_SEQUENCES:
raise ValueError(
f"Cannot unregister builtin color sequence {name!r}")
self._color_sequences.pop(name, None)
_color_sequences = ColorSequenceRegistry()
| 20 | 31 | 108,335 |
|
Python | _bootstrap_external.py | 8198943edd73a363c266633e1aa5b2a9e9c9f526 | 366 | 55,140 | 15 | python3.10.4/Lib/importlib/_bootstrap_external.py | XX-Net | https://github.com/XX-net/XX-Net.git | 0 | source_from_cache | 10 | {
"docstring": "Given the path to a .pyc. file, return the path to its .py file.\n\n The .pyc file does not need to exist; this simply returns the path to\n the .py file calculated to correspond to the .pyc file. If path does\n not conform to PEP 3147/488 format, ValueError will be raised. If\n sys.implementation.cache_tag is None then NotImplementedError is raised.\n\n ",
"language": "en",
"n_whitespaces": 75,
"n_words": 59,
"vocab_size": 37
} | 33 | 30 | add python 3.10.4 for windows | 378 | 79 | def source_from_cache(path):
if sys.implementation.cache_tag is None:
raise NotImplementedError('sys.implementation.cache_tag is None')
path = _os.fspath(path)
head, pycache_filename = _path_split(path)
found_in_pycache_prefix = False
if sys.pycache_prefix is not None:
stripped_path = sys.pycache_prefix.rstrip(path_separators)
if head.startswith(stripped_path + path_sep):
head = head[len(stripped_path):]
found_in_pycache_prefix = True
if not found_in_pycache_prefix:
head, pycache = _path_split(head)
if pycache != _PYCACHE:
raise ValueError(f'{_PYCACHE} not bottom-level directory in '
f'{path!r}')
dot_count = pycache_filename.count('.')
if dot_count not in {2, 3}:
raise ValueError(f'expected only 2 or 3 dots in {pycache_filename!r}')
elif dot_count == 3:
optimization = pycache_filename.rsplit('.', 2)[-2]
if not optimization.startswith(_OPT):
raise ValueError("optimization portion of filename does not start "
f"with {_OPT!r}")
opt_level = optimization[len(_OPT):]
if not opt_level.isalnum():
raise ValueError(f"optimization level {optimization!r} is not an "
"alphanumeric value")
base_filename = pycache_filename.partition('.')[0]
return _path_join(head, base_filename + SOURCE_SUFFIXES[0])
| 121 | 212 | 218,114 |
|
Python | test_dag_serialization.py | 49e336ae0302b386a2f47269a6d13988382d975f | 256 | 9,201 | 12 | tests/serialization/test_dag_serialization.py | airflow | https://github.com/apache/airflow.git | 0 | test_deps_sorted | 1 | {
"docstring": "\n Tests serialize_operator, make sure the deps is in order\n ",
"language": "en",
"n_whitespaces": 24,
"n_words": 9,
"vocab_size": 9
} | 25 | 21 | Replace usage of `DummyOperator` with `EmptyOperator` (#22974)
* Replace usage of `DummyOperator` with `EmptyOperator` | 186 | 40 | def test_deps_sorted(self):
from airflow.operators.empty import EmptyOperator
from airflow.sensors.external_task import ExternalTaskSensor
execution_date = datetime(2020, 1, 1)
with DAG(dag_id="test_deps_sorted", start_date=execution_date) as dag:
task1 = ExternalTaskSensor(
task_id="task1",
external_dag_id="external_dag_id",
mode="reschedule",
)
task2 = EmptyOperator(task_id="task2")
task1 >> task2
serialize_op = SerializedBaseOperator.serialize_operator(dag.task_dict["task1"])
deps = serialize_op["deps"]
assert deps == [
'airflow.ti_deps.deps.not_in_retry_period_dep.NotInRetryPeriodDep',
'airflow.ti_deps.deps.not_previously_skipped_dep.NotPreviouslySkippedDep',
'airflow.ti_deps.deps.prev_dagrun_dep.PrevDagrunDep',
'airflow.ti_deps.deps.ready_to_reschedule.ReadyToRescheduleDep',
'airflow.ti_deps.deps.trigger_rule_dep.TriggerRuleDep',
]
| 49 | 109 | 47,665 |
|
Python | workflow_storage.py | f67871c1f7e79adc727b2a15311d9332832d2e8a | 18 | 31,892 | 8 | python/ray/workflow/workflow_storage.py | ray | https://github.com/ray-project/ray.git | 0 | load_workflow_status | 1 | {
"docstring": "Load workflow status. If we find the previous status updating failed,\n fix it with redo-log transaction recovery.",
"language": "en",
"n_whitespaces": 23,
"n_words": 17,
"vocab_size": 17
} | 4 | 2 | [workflow] Fast workflow indexing (#24767)
* workflow indexing
* simplify workflow storage API
* Only fix workflow status when updating the status.
* support status filter | 30 | 4 | def load_workflow_status(self):
return self._status_storage.load_workflow_status(self._workflow_id)
| 4 | 17 | 140,203 |
|
Python | PythonFlavors.py | c723f658e8c11ec92d6ef90c2f42527c67d3f318 | 48 | 42,789 | 9 | nuitka/PythonFlavors.py | Nuitka | https://github.com/Nuitka/Nuitka.git | 0 | isCPythonOfficialPackage | 3 | {
"docstring": "Official CPython download, kind of hard to detect since self-compiled doesn't change much.",
"language": "en",
"n_whitespaces": 12,
"n_words": 13,
"vocab_size": 13
} | 5 | 6 | Added CPython Official flavor, so far only detected on macOS | 44 | 18 | def isCPythonOfficialPackage():
# For macOS however, it's very knowable.
if isMacOS() and sys.executable.startswith(
"/Library/Frameworks/Python.framework/Versions/"
):
return True
return False
| 19 | 23 | 178,678 |
|
Python | post_process.py | bc59434031930199dcdc056943c2ba4a17bbd5c8 | 126 | 18,118 | 15 | src/sentry/tasks/post_process.py | sentry | https://github.com/getsentry/sentry.git | 0 | update_existing_attachments | 2 | {
"docstring": "\n Attaches the group_id to all event attachments that were either:\n\n 1) ingested prior to the event via the standalone attachment endpoint.\n 2) part of a different group before reprocessing started.\n ",
"language": "en",
"n_whitespaces": 43,
"n_words": 30,
"vocab_size": 26
} | 18 | 10 | ref(perf-issues): Modularize post_process_group (ISP-11) (#39594)
Fully modularizes `post_process_group` as final step before adding
multiple event types to it. | 116 | 33 | def update_existing_attachments(job):
# Patch attachments that were ingested on the standalone path.
with sentry_sdk.start_span(op="tasks.post_process_group.update_existing_attachments"):
try:
from sentry.models import EventAttachment
event = job["event"]
EventAttachment.objects.filter(
project_id=event.project_id, event_id=event.event_id
).update(group_id=event.group_id)
except Exception:
logger.exception("Failed to update existing attachments")
| 33 | 66 | 86,527 |
|
Python | finders.py | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 | 46 | 50,701 | 8 | django/contrib/staticfiles/finders.py | django | https://github.com/django/django.git | 0 | list | 1 | {
"docstring": "\n Given an optional list of paths to ignore, return a two item iterable\n consisting of the relative path and storage instance.\n ",
"language": "en",
"n_whitespaces": 43,
"n_words": 21,
"vocab_size": 20
} | 4 | 4 | Refs #33476 -- Reformatted code with Black. | 25 | 14 | def list(self, ignore_patterns):
raise NotImplementedError(
"subclasses of BaseFinder must provide a list() method"
)
| 14 | 13 | 204,338 |
|
Python | test_async_job.py | a3aae8017a0a40ff2006e2567f71dccb04c997a5 | 65 | 563 | 10 | airbyte-integrations/connectors/source-facebook-marketing/unit_tests/test_async_job.py | airbyte | https://github.com/airbytehq/airbyte.git | 0 | test_less_jobs | 2 | {
"docstring": "Should update all jobs when number of jobs less than max size of batch",
"language": "en",
"n_whitespaces": 13,
"n_words": 14,
"vocab_size": 12
} | 16 | 6 | 🎉 🎉 Source FB Marketing: performance and reliability fixes (#9805)
* Facebook Marketing performance improvement
* add comments and little refactoring
* fix integration tests with the new config
* improve job status handling, limit concurrency to 10
* fix campaign jobs, refactor manager
* big refactoring of async jobs, support random order of slices
* update source _read_incremental to hook new state logic
* fix issues with timeout
* remove debugging and clean up, improve retry logic
* merge changes from #8234
* fix call super _read_increment
* generalize batch execution, add use_batch flag
* improve coverage, do some refactoring of spec
* update test, remove overrides of source
* add split by AdSet
* add smaller insights
* fix end_date < start_date case
* add account_id to PK
* add notes
* fix new streams
* fix reversed incremental stream
* update spec.json for SAT
* upgrade CDK and bump version
Co-authored-by: Dmytro Rezchykov <[email protected]>
Co-authored-by: Eugene Kulak <[email protected]> | 93 | 20 | def test_less_jobs(self, api, started_job, batch):
jobs = [started_job for _ in range(49)]
update_in_batch(api=api, jobs=jobs)
assert started_job.update_job.call_count == 49
assert len(api.new_batch.return_value) == 49
batch.execute.assert_called_once()
| 23 | 60 | 3,800 |
|
Python | config_test.py | dd9084523e365e637443ea351eaaaa25f52d8412 | 257 | 26,359 | 13 | lib/tests/streamlit/config_test.py | streamlit | https://github.com/streamlit/streamlit.git | 0 | test_load_global_local_flag_config | 1 | {
"docstring": "Test that CLI flags have higher priority than both\n ~/.streamlit/config.toml and $CWD/.streamlit/config.toml at parse time.\n \n [theme]\n base = \"dark\"\n font = \"sans serif\"\n textColor = \"#FFFFFF\"\n \n [theme]\n base = \"light\"\n font = \"serif\"\n ",
"language": "en",
"n_whitespaces": 112,
"n_words": 33,
"vocab_size": 26
} | 26 | 31 | Report sharing removal (#4260)
The report sharing feature is a substantial but completely unused portion of the code in Streamlit's underlying machinery. The feature was created early on, used by just a few groups, and has not been used by anyone for a while, as indicated by no activity in the associated S3 buckets. This commit removes that code to make the remaining code easier to navigate and understand. | 292 | 58 | def test_load_global_local_flag_config(self):
global_config =
local_config =
global_config_path = "/mock/home/folder/.streamlit/config.toml"
local_config_path = os.path.join(os.getcwd(), ".streamlit/config.toml")
global_open = mock_open(read_data=global_config)
local_open = mock_open(read_data=local_config)
open = mock_open()
open.side_effect = [global_open.return_value, local_open.return_value]
open_patch = patch("streamlit.config.open", open)
# patch streamlit.*.os.* instead of os.* for py35 compat
makedirs_patch = patch("streamlit.config.os.makedirs")
makedirs_patch.return_value = True
pathexists_patch = patch("streamlit.config.os.path.exists")
pathexists_patch.side_effect = lambda path: path in [
global_config_path,
local_config_path,
]
with open_patch, makedirs_patch, pathexists_patch:
config.get_config_options(options_from_flags={"theme.font": "monospace"})
self.assertEqual("light", config.get_option("theme.base"))
self.assertEqual("#FFFFFF", config.get_option("theme.textColor"))
self.assertEqual("monospace", config.get_option("theme.font"))
| 70 | 163 | 118,684 |
|
Python | test_pickle.py | 864729813a0203af8bb0d30b6c883588ae2c96f8 | 114 | 39,808 | 12 | pandas/tests/io/test_pickle.py | pandas | https://github.com/pandas-dev/pandas.git | 0 | test_pickle_binary_object_compression | 2 | {
"docstring": "\n Read/write from binary file-objects w/wo compression.\n\n GH 26237, GH 29054, and GH 29570\n ",
"language": "en",
"n_whitespaces": 23,
"n_words": 13,
"vocab_size": 11
} | 20 | 12 | ENH: add support for reading .tar archives (#44787)
* Add reproduction test for .tar.gz archives
co-authored-by: Margarete Dippel <[email protected]>
* add support for .tar archives
python's `tarfile` supports gzip, xz and bz2 encoding,
so we don't need to make any special cases for that.
co-authored-by: Margarete Dippel <[email protected]>
* update doc comments
* fix: pep8 errors
* refactor: flip _compression_to_extension around to support multiple extensions on same compression
co-authored-by: Margarete Dippel <[email protected]
y.github.com>
* refactor: detect tar files using existing extension mapping
co-authored-by: Margarete Dippel <[email protected]>
* feat: add support for writing tar files
co-authored-by: Margarete Dippel <[email protected]>
* feat: assure it respects .gz endings
* feat: add "tar" entry to compressionoptions
* chore: add whatsnew entry
* fix: test_compression_size_fh
* add tarfile to shared compression docs
* fix formatting
* pass through "mode" via compression args
* fix pickle test
* add class comment
* sort imports
* add _compression_to_extension back for backwards compatibility
* fix some type warnings
* fix: formatting
* fix: mypy complaints
* fix: more tests
* fix: some error with xml
* fix: interpreted text role
* move to v1.5 whatsnw
* add versionadded note
* don't leave blank lines
* add tests for zero files / multiple files
* move _compression_to_extension to tests
* revert added "mode" argument
* add test to ensure that `compression.mode` works
* compare strings, not bytes
* replace carriage returns
Co-authored-by: Margarete Dippel <[email protected]> | 188 | 44 | def test_pickle_binary_object_compression(compression):
df = tm.makeDataFrame()
# reference for compression
with tm.ensure_clean() as path:
df.to_pickle(path, compression=compression)
reference = Path(path).read_bytes()
# write
buffer = io.BytesIO()
df.to_pickle(buffer, compression=compression)
buffer.seek(0)
# gzip and zip safe the filename: cannot compare the compressed content
assert buffer.getvalue() == reference or compression in ("gzip", "zip", "tar")
# read
read_df = pd.read_pickle(buffer, compression=compression)
buffer.seek(0)
tm.assert_frame_equal(df, read_df)
| 57 | 109 | 166,376 |
|
Python | views.py | de3fcba9e95818e9634ab7de6bfcb1f4221f2775 | 265 | 15,592 | 15 | wagtail/contrib/forms/views.py | wagtail | https://github.com/wagtail/wagtail.git | 0 | get_filtering | 5 | {
"docstring": " Return filering as a dict for submissions queryset ",
"language": "en",
"n_whitespaces": 9,
"n_words": 8,
"vocab_size": 8
} | 15 | 15 | Fix warnings from flake8-comprehensions. | 174 | 42 | def get_filtering(self):
self.select_date_form = SelectDateForm(self.request.GET)
result = {}
if self.select_date_form.is_valid():
date_from = self.select_date_form.cleaned_data.get('date_from')
date_to = self.select_date_form.cleaned_data.get('date_to')
if date_to:
# careful: date_to must be increased by 1 day
# as submit_time is a time so will always be greater
date_to += datetime.timedelta(days=1)
if date_from:
result['submit_time__range'] = [date_from, date_to]
else:
result['submit_time__lte'] = date_to
elif date_from:
result['submit_time__gte'] = date_from
return result
| 58 | 100 | 70,980 |
|
Python | get_item_details.py | 494bd9ef78313436f0424b918f200dab8fc7c20b | 25 | 14,622 | 15 | erpnext/stock/get_item_details.py | erpnext | https://github.com/frappe/erpnext.git | 0 | get_so_reservation_for_item | 9 | {
"docstring": "select sales_order from `tabSales Invoice Item` where\n\t\tparent=%s and item_code=%s",
"language": "en",
"n_whitespaces": 8,
"n_words": 10,
"vocab_size": 10
} | 9 | 18 | style: format code with black | 253 | 26 | def get_so_reservation_for_item(args):
reserved_so = None
if args.get("against_sales_order"):
if get_reserved_qty_for_so(args.get("against_sales_order"), args.get("item_code")):
reserved_so = args.get("against_sales_order")
elif args.get("against_sales_invoice"):
sales_order = frappe.db.sql(
,
(args.get("against_sales_invoice"), args.get("item_code")),
)
if sales_order and sales_order[0]:
if get_reserved_qty_for_so(sales_order[0][0], args.get("item_code")):
reserved_so = sales_order[0]
elif args.get("sales_order"):
if get_reserved_qty_for_so(args.get("sales_order"), args.get("item_code")):
reserved_so = args.get("sales_order")
return reserved_so
| 42 | 146 | 67,799 |
|
Python | test_macaroons.py | fe1daad67237c2154a3d8d8cdf6c603f0d33682e | 240 | 72,365 | 11 | tests/util/test_macaroons.py | synapse | https://github.com/matrix-org/synapse.git | 0 | test_short_term_login_token | 1 | {
"docstring": "Test the generation and verification of short-term login tokens",
"language": "en",
"n_whitespaces": 8,
"n_words": 9,
"vocab_size": 9
} | 17 | 18 | Move the "email unsubscribe" resource, refactor the macaroon generator & simplify the access token verification logic. (#12986)
This simplifies the access token verification logic by removing the `rights`
parameter which was only ever used for the unsubscribe link in email
notifications. The latter has been moved under the `/_synapse` namespace,
since it is not a standard API.
This also makes the email verification link more secure, by embedding the
app_id and pushkey in the macaroon and verifying it. This prevents the user
from tampering the query parameters of that unsubscribe link.
Macaroon generation is refactored:
- Centralised all macaroon generation and verification logic to the
`MacaroonGenerator`
- Moved to `synapse.utils`
- Changed the constructor to require only a `Clock`, hostname, and a secret key
(instead of a full `Homeserver`).
- Added tests for all methods. | 233 | 39 | def test_short_term_login_token(self):
token = self.macaroon_generator.generate_short_term_login_token(
user_id="@user:tesths",
auth_provider_id="oidc",
auth_provider_session_id="sid",
duration_in_ms=2 * 60 * 1000,
)
info = self.macaroon_generator.verify_short_term_login_token(token)
self.assertEqual(info.user_id, "@user:tesths")
self.assertEqual(info.auth_provider_id, "oidc")
self.assertEqual(info.auth_provider_session_id, "sid")
# Raises with another secret key
with self.assertRaises(MacaroonVerificationFailedException):
self.other_macaroon_generator.verify_short_term_login_token(token)
# Wait a minute
self.reactor.pump([60])
# Shouldn't raise
self.macaroon_generator.verify_short_term_login_token(token)
# Wait another minute
self.reactor.pump([60])
# Should raise since it expired
with self.assertRaises(MacaroonVerificationFailedException):
self.macaroon_generator.verify_short_term_login_token(token)
| 55 | 135 | 248,585 |
|
Python | vader.py | 74bb3c28ce9f2cd2be4cd9176747d59a0d67285d | 274 | 7,656 | 15 | nltk/sentiment/vader.py | nltk | https://github.com/nltk/nltk.git | 0 | polarity_scores | 6 | {
"docstring": "\n Return a float for sentiment strength based on the input text.\n Positive values are positive valence, negative value are negative\n valence.\n\n :note: Hashtags are not taken into consideration (e.g. #BAD is neutral). If you\n are interested in processing the text in the hashtags too, then we recommend\n preprocessing your data to remove the #, after which the hashtag text may be\n matched as if it was a normal word in the sentence.\n ",
"language": "en",
"n_whitespaces": 141,
"n_words": 72,
"vocab_size": 59
} | 21 | 19 | Add a note stating that a hashtag is unsupported in VADER | 218 | 53 | def polarity_scores(self, text):
# text, words_and_emoticons, is_cap_diff = self.preprocess(text)
sentitext = SentiText(
text, self.constants.PUNC_LIST, self.constants.REGEX_REMOVE_PUNCTUATION
)
sentiments = []
words_and_emoticons = sentitext.words_and_emoticons
for item in words_and_emoticons:
valence = 0
i = words_and_emoticons.index(item)
if (
i < len(words_and_emoticons) - 1
and item.lower() == "kind"
and words_and_emoticons[i + 1].lower() == "of"
) or item.lower() in self.constants.BOOSTER_DICT:
sentiments.append(valence)
continue
sentiments = self.sentiment_valence(valence, sentitext, item, i, sentiments)
sentiments = self._but_check(words_and_emoticons, sentiments)
return self.score_valence(sentiments, text)
| 70 | 138 | 42,601 |
|
Python | test_axes3d.py | 7a1df7830f7685a99291d90c5e79bfc5e7876f31 | 150 | 24,166 | 10 | lib/mpl_toolkits/mplot3d/tests/test_axes3d.py | matplotlib | https://github.com/matplotlib/matplotlib.git | 0 | test_mutating_input_arrays_y_and_z | 1 | {
"docstring": "\n Test to see if the `z` axis does not get mutated\n after a call to `Axes3D.plot`\n\n test cases came from GH#8990\n ",
"language": "en",
"n_whitespaces": 34,
"n_words": 21,
"vocab_size": 20
} | 14 | 19 | Test that plot results aren't affected by mutating input arrays | 277 | 46 | def test_mutating_input_arrays_y_and_z(fig_test, fig_ref):
ax1 = fig_test.add_subplot(111, projection='3d')
x = [1, 2, 3]
y = [0.0, 0.0, 0.0]
z = [0.0, 0.0, 0.0]
ax1.plot(x, y, z, 'o-')
ax1.set_ylim([0, 4])
ax1.set_zlim([0, 4])
fig_test.draw_without_rendering()
# mutate y,z to get a nontrivial line
y[:] = [1, 2, 3]
z[:] = [1, 2, 3]
# draw the same plot without mutating x and y
ax2 = fig_ref.add_subplot(111, projection='3d')
x = [1, 2, 3]
y = [0.0, 0.0, 0.0]
z = [0.0, 0.0, 0.0]
ax2.plot(x, y, z, 'o-')
ax2.set_ylim([0, 4])
ax2.set_zlim([0, 4])
fig_test.draw_without_rendering()
| 87 | 208 | 110,450 |
|
Python | views.py | bb26f96665567325a7fbb810249820e7dac0322a | 47 | 8,568 | 9 | airflow/www/views.py | airflow | https://github.com/apache/airflow.git | 0 | dag_edges | 4 | {
"docstring": "\n Create the list of edges needed to construct the Graph view.\n\n A special case is made if a TaskGroup is immediately upstream/downstream of another\n TaskGroup or task. Two dummy nodes named upstream_join_id and downstream_join_id are\n created for the TaskGroup. Instead of drawing an edge onto every task in the TaskGroup,\n all edges are directed onto the dummy nodes. This is to cut down the number of edges on\n the graph.\n\n For example: A DAG with TaskGroups group1 and group2:\n group1: task1, task2, task3\n group2: task4, task5, task6\n\n group2 is downstream of group1:\n group1 >> group2\n\n Edges to add (This avoids having to create edges between every task in group1 and group2):\n task1 >> downstream_join_id\n task2 >> downstream_join_id\n task3 >> downstream_join_id\n downstream_join_id >> upstream_join_id\n upstream_join_id >> task4\n upstream_join_id >> task5\n upstream_join_id >> task6\n ",
"language": "en",
"n_whitespaces": 233,
"n_words": 132,
"vocab_size": 81
} | 8 | 18 | Make Grid and and Graph view work with task mapping (#21740)
* Expand mapped tasks in the Scheduler
Technically this is done inside
DagRun.task_instance_scheduling_decisions, but the only place that is
currently called is the Scheduler
The way we are getting `upstream_ti` to pass to expand_mapped_task is
all sorts of wrong and will need fixing, I think the interface for that
method is wrong and the mapped task should be responsible for finding
the right upstream TI itself.
* make UI and tree work with mapped tasks
* add graph tooltip and map count
* simplify node label redraw logic
* add utils.js and map_index to /taskInstances
* use TaskInstanceState instead of strings
* move map_index on /taskinstance to separate PR
* check to use Task or Tasks
* remove `no_status` and use TaskInstanceState
Co-authored-by: Ash Berlin-Taylor <[email protected]> | 48 | 22 | def dag_edges(dag):
# Edges to add between TaskGroup
edges_to_add = set()
# Edges to remove between individual tasks that are replaced by edges_to_add.
edges_to_skip = set()
task_group_map = dag.task_group.get_task_group_dict()
| 29 | 115 | 45,441 |
|
Python | testing_utils.py | 57e6464ac9a31156f1c93e59107323e6ec01309e | 13 | 6,797 | 10 | src/transformers/testing_utils.py | transformers | https://github.com/huggingface/transformers.git | 0 | require_tokenizers | 1 | {
"docstring": "\n Decorator marking a test that requires 🤗 Tokenizers. These tests are skipped when 🤗 Tokenizers isn't installed.\n ",
"language": "en",
"n_whitespaces": 24,
"n_words": 17,
"vocab_size": 16
} | 5 | 2 | Update all require decorators to use skipUnless when possible (#16999) | 37 | 7 | def require_tokenizers(test_case):
return unittest.skipUnless(is_tokenizers_available(), "test requires tokenizers")(test_case)
| 7 | 20 | 37,492 |
|
Python | hitachi_dhw.py | 1c0f9cf941f77d6e3d299f98d5174f0a2953f236 | 94 | 90,732 | 9 | homeassistant/components/overkiz/water_heater_entities/hitachi_dhw.py | core | https://github.com/home-assistant/core.git | 0 | current_operation | 5 | {
"docstring": "Return current operation ie. eco, electric, performance, ...",
"language": "en",
"n_whitespaces": 7,
"n_words": 8,
"vocab_size": 8
} | 15 | 9 | Add Overkiz Hitachi DHW (#81536)
* Port ha-tahome hitachi dhw
* Use int for setting temperature
* Use value as float when possible
* Use device state for current operation
* Update homeassistant/components/overkiz/water_heater_entities/hitachi_dhw.py
Co-authored-by: Quentame <[email protected]>
* Update homeassistant/components/overkiz/water_heater_entities/hitachi_dhw.py
Co-authored-by: Quentame <[email protected]>
* Use ON instead of ECO for standard operation mode
Co-authored-by: Quentame <[email protected]> | 102 | 23 | def current_operation(self) -> str | None:
modbus_control = self.device.states[OverkizState.MODBUS_CONTROL_DHW]
if modbus_control and modbus_control.value_as_str == OverkizCommandParam.STOP:
return STATE_OFF
current_mode = self.device.states[OverkizState.MODBUS_DHW_MODE]
if current_mode and current_mode.value_as_str in OVERKIZ_TO_OPERATION_MODE:
return OVERKIZ_TO_OPERATION_MODE[current_mode.value_as_str]
return None
| 30 | 65 | 291,628 |
|
Python | wordnet.py | 8ffd0d8190552d45f8b92e18da3fc41639e5185d | 210 | 7,546 | 14 | nltk/corpus/reader/wordnet.py | nltk | https://github.com/nltk/nltk.git | 0 | add_provs | 4 | {
"docstring": "Add languages from Multilingual Wordnet to the provenance dictionary",
"language": "en",
"n_whitespaces": 8,
"n_words": 9,
"vocab_size": 9
} | 16 | 10 | Initialize empty provenance for default English | 150 | 41 | def add_provs(self, reader):
fileids = reader.fileids()
for fileid in fileids:
prov, langfile = os.path.split(fileid)
file_name, file_extension = os.path.splitext(langfile)
if file_extension == ".tab":
lang = file_name.split("-")[-1]
if lang in self.provenances.keys():
# We already have another resource for this lang,
# so we need to further specify the lang id:
lang = f"{lang}_{prov}"
self.provenances[lang] = prov
| 54 | 84 | 42,453 |
|
Python | unix.py | f3166e673fe8d40277b804d35d77dcdb760fc3b3 | 73 | 3,281 | 11 | pipenv/patched/notpip/_vendor/platformdirs/unix.py | pipenv | https://github.com/pypa/pipenv.git | 0 | site_data_dir | 2 | {
"docstring": "\n :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is\n enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS\n path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``\n ",
"language": "en",
"n_whitespaces": 67,
"n_words": 36,
"vocab_size": 27
} | 10 | 10 | check point progress on only bringing in pip==22.0.4 (#4966)
* vendor in pip==22.0.4
* updating vendor packaging version
* update pipdeptree to fix pipenv graph with new version of pip.
* Vendoring of pip-shims 0.7.0
* Vendoring of requirementslib 1.6.3
* Update pip index safety restrictions patch for pip==22.0.4
* Update patches
* exclude pyptoject.toml from black to see if that helps.
* Move this part of the hash collection back to the top (like prior implementation) because it affects the outcome of this test now in pip 22.0.4 | 78 | 24 | def site_data_dir(self) -> str:
# XDG default for $XDG_DATA_DIRS; only first, if multipath is False
path = os.environ.get("XDG_DATA_DIRS", "")
if not path.strip():
path = f"/usr/local/share{os.pathsep}/usr/share"
return self._with_multi_path(path)
| 27 | 39 | 20,229 |
|
Python | stochastic_process_types.py | 7fe8e027ae1d7f683243c0229b961671a6cbb4c5 | 69 | 48,618 | 8 | sympy/stats/stochastic_process_types.py | sympy | https://github.com/sympy/sympy.git | 0 | absorbing_probabilities | 3 | {
"docstring": "\n Computes the absorbing probabilities, i.e.\n the ij-th entry of the matrix denotes the\n probability of Markov chain being absorbed\n in state j starting from state i.\n ",
"language": "en",
"n_whitespaces": 62,
"n_words": 26,
"vocab_size": 21
} | 7 | 6 | Improved some documentation in the stats module | 67 | 17 | def absorbing_probabilities(self):
_, _, R, _ = self.decompose()
N = self.fundamental_matrix()
if R is None or N is None:
return None
return N*R
| 23 | 41 | 197,540 |
|
Python | util.py | f3166e673fe8d40277b804d35d77dcdb760fc3b3 | 43 | 3,407 | 11 | pipenv/patched/notpip/_vendor/pygments/util.py | pipenv | https://github.com/pypa/pipenv.git | 0 | doctype_matches | 2 | {
"docstring": "Check if the doctype matches a regular expression (if present).\n\n Note that this method only checks the first part of a DOCTYPE.\n eg: 'html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"'\n ",
"language": "en",
"n_whitespaces": 38,
"n_words": 29,
"vocab_size": 27
} | 13 | 6 | check point progress on only bringing in pip==22.0.4 (#4966)
* vendor in pip==22.0.4
* updating vendor packaging version
* update pipdeptree to fix pipenv graph with new version of pip.
* Vendoring of pip-shims 0.7.0
* Vendoring of requirementslib 1.6.3
* Update pip index safety restrictions patch for pip==22.0.4
* Update patches
* exclude pyptoject.toml from black to see if that helps.
* Move this part of the hash collection back to the top (like prior implementation) because it affects the outcome of this test now in pip 22.0.4 | 87 | 17 | def doctype_matches(text, regex):
m = doctype_lookup_re.search(text)
if m is None:
return False
doctype = m.group(1)
return re.compile(regex, re.I).match(doctype.strip()) is not None
| 21 | 54 | 20,520 |
|
Python | test_data_export.py | 096b5511e244eecd8799b2a0324655207ce8985e | 166 | 19,764 | 12 | tests/sentry/data_export/endpoints/test_data_export.py | sentry | https://github.com/getsentry/sentry.git | 0 | test_converts_stats_period_start_end | 1 | {
"docstring": "\n Ensures that statsPeriodStart and statsPeriodEnd is converted to start/end.\n ",
"language": "en",
"n_whitespaces": 24,
"n_words": 9,
"vocab_size": 9
} | 18 | 15 | ref(tests): Remove `get_valid_response()` (#34822) | 205 | 32 | def test_converts_stats_period_start_end(self):
payload = self.make_payload("discover", {"statsPeriodStart": "1w", "statsPeriodEnd": "5d"})
with self.feature("organizations:discover-query"):
response = self.get_success_response(self.org.slug, status_code=201, **payload)
data_export = ExportedData.objects.get(id=response.data["id"])
query_info = data_export.query_info
assert parse_datetime_string(query_info["start"]) == parse_datetime_string(
"2020-05-12T14:00:00"
)
assert parse_datetime_string(query_info["end"]) == parse_datetime_string(
"2020-05-14T14:00:00"
)
assert "statsPeriod" not in query_info
assert "statsPeriodStart" not in query_info
assert "statsPeriodSEnd" not in query_info
| 49 | 114 | 100,170 |
|
Python | admin.py | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 | 155 | 50,467 | 11 | django/contrib/auth/admin.py | django | https://github.com/django/django.git | 0 | response_add | 3 | {
"docstring": "\n Determine the HttpResponse for the add_view stage. It mostly defers to\n its superclass implementation but is customized because the User model\n has a slightly different workflow.\n ",
"language": "en",
"n_whitespaces": 55,
"n_words": 26,
"vocab_size": 24
} | 9 | 5 | Refs #33476 -- Reformatted code with Black. | 102 | 52 | def response_add(self, request, obj, post_url_continue=None):
# We should allow further modification of the user just added i.e. the
# 'Save' button should behave like the 'Save and continue editing'
# button except in two scenarios:
# * The user has pressed the 'Save and add another' button
# * We are adding a user in a popup
if "_addanother" not in request.POST and IS_POPUP_VAR not in request.POST:
request.POST = request.POST.copy()
request.POST["_continue"] = 1
return super().response_add(request, obj, post_url_continue)
| 77 | 61 | 203,593 |
|
Python | test_temperature_format.py | b0ed42a5a58976ebe82b5bbbb60c499648a1718b | 18 | 95,665 | 9 | tests/components/daikin/test_temperature_format.py | core | https://github.com/home-assistant/core.git | 0 | test_decimal_conversion_more_digits | 1 | {
"docstring": "Check at most 1 decimal is kept when target temp is a decimal with more than 1 decimal.",
"language": "en",
"n_whitespaces": 17,
"n_words": 18,
"vocab_size": 15
} | 3 | 3 | Fix #69952: Daikin AC Temperature jumps after being set (#70326) | 32 | 8 | def test_decimal_conversion_more_digits():
formatted = format_target_temperature("16.09")
assert formatted == "16.1"
| 9 | 15 | 296,690 |
|
Python | workflows.py | 60ba39ffb5ec6d760efa6e2ecbff7ede53b12464 | 75 | 15,531 | 13 | wagtail/admin/views/workflows.py | wagtail | https://github.com/wagtail/wagtail.git | 0 | get_task_chosen_response | 1 | {
"docstring": "\n helper function: given a task, return the response indicating that it has been chosen\n ",
"language": "en",
"n_whitespaces": 21,
"n_words": 14,
"vocab_size": 14
} | 10 | 10 | replace get_task_result_data helper with more useful one get_task_chosen_response | 103 | 23 | def get_task_chosen_response(request, task):
result_data = {
'id': task.id,
'name': task.name,
'edit_url': reverse('wagtailadmin_workflows:edit_task', args=[task.id]),
}
return render_modal_workflow(
request, None, None,
None, json_data={'step': 'task_chosen', 'result': result_data}
)
| 25 | 62 | 70,608 |
|
Python | matching.py | c3e1e7f4c6a4edb968494cd4775574ad26f2a96b | 163 | 41,940 | 11 | networkx/algorithms/matching.py | @not_implemented_for("multigraph")
@not_implemented_for("directed") | networkx | https://github.com/networkx/networkx.git | 1 | min_weight_matching | 5 | {
"docstring": "Computing a minimum-weight maximal matching of G.\n\n Use the maximum-weight algorithm with edge weights subtracted\n from the maximum weight of all edges.\n\n A matching is a subset of edges in which no node occurs more than once.\n The weight of a matching is the sum of the weights of its edges.\n A maximal matching cannot add more edges and still be a matching.\n The cardinality of a matching is the number of matched edges.\n\n This method replaces the edge weights with 1 plus the maximum edge weight\n minus the original edge weight.\n\n new_weight = (max_weight + 1) - edge_weight\n\n then runs :func:`max_weight_matching` with the new weights.\n The max weight matching with these new weights corresponds\n to the min weight matching using the original weights.\n Adding 1 to the max edge weight keeps all edge weights positive\n and as integers if they started as integers.\n\n You might worry that adding 1 to each weight would make the algorithm\n favor matchings with more edges. But we use the parameter\n `maxcardinality=True` in `max_weight_matching` to ensure that the\n number of edges in the competing matchings are the same and thus\n the optimum does not change due to changes in the number of edges.\n\n Read the documentation of `max_weight_matching` for more information.\n\n Parameters\n ----------\n G : NetworkX graph\n Undirected graph\n\n maxcardinality: bool\n .. deprecated:: 2.8\n The `maxcardinality` parameter will be removed in v3.0.\n It doesn't make sense to set it to False when looking for\n a min weight matching because then we just return no edges.\n\n If maxcardinality is True, compute the maximum-cardinality matching\n with minimum weight among all maximum-cardinality matchings.\n\n weight: string, optional (default='weight')\n Edge data key corresponding to the edge weight.\n If key not found, uses 1 as weight.\n\n Returns\n -------\n matching : set\n A minimal weight matching of the graph.\n\n See Also\n --------\n max_weight_matching\n ",
"language": "en",
"n_whitespaces": 476,
"n_words": 302,
"vocab_size": 163
} | 22 | 15 | Fix min_weight_matching to convert edge weights without reciprocal (#5394)
* Add test and then fix code and docs
* Correct and improve docs. Change 1e-6 to 1 to maintain integers.
Include argument in docstring for why adding the 1 doesn't impact the min | 231 | 65 | def min_weight_matching(G, maxcardinality=None, weight="weight"):
if maxcardinality not in (True, None):
raise nx.NetworkXError(
"The argument maxcardinality does not make sense "
"in the context of minimum weight matchings."
"It is deprecated and will be removed in v3.0."
)
if len(G.edges) == 0:
return max_weight_matching(G, maxcardinality=True, weight=weight)
G_edges = G.edges(data=weight, default=1)
max_weight = 1 + max(w for _, _, w in G_edges)
InvG = nx.Graph()
edges = ((u, v, max_weight - w) for u, v, w in G_edges)
InvG.add_weighted_edges_from(edges, weight=weight)
return max_weight_matching(InvG, maxcardinality=True, weight=weight)
@not_implemented_for("multigraph")
@not_implemented_for("directed") | 84 | 137 | 176,513 |
Python | proxmox.py | a5679caf65c7c79cd72841b6e5793b9b693744c9 | 254 | 54,362 | 15 | salt/cloud/clouds/proxmox.py | salt | https://github.com/saltstack/salt.git | 0 | _find_agent_ip | 8 | {
"docstring": "\n If VM is started we would return the IP-addresses that are returned by the qemu agent on the VM.\n ",
"language": "en",
"n_whitespaces": 26,
"n_words": 19,
"vocab_size": 17
} | 19 | 19 | Add support for get IP-address from agent | 231 | 78 | def _find_agent_ip(vm_, vmid):
# This functionality is only available on qemu
if not vm_.get("technology") == "qemu":
log.warning("Find agent IP is only available under `qemu`")
return
# Create an empty list of IP-addresses:
ips = []
endpoint = "nodes/{}/qemu/{}/agent/network-get-interfaces".format(vm_["host"], vmid)
interfaces = query("get", endpoint)
# If we get a result from the agent, parse it
for interface in interfaces["result"]:
# Skip interface if hardware-address is 00:00:00:00:00:00 (loopback interface)
if str(interface.get("hardware-address")) == "00:00:00:00:00:00":
continue
# Skip entries without ip-addresses information
if "ip-addresses" not in interface:
continue
for if_addr in interface["ip-addresses"]:
ip_addr = if_addr.get("ip-address")
if ip_addr is not None:
ips.append(str(ip_addr))
if len(ips) > 0:
return preferred_ip(vm_, ips)
raise SaltCloudExecutionFailure
| 106 | 128 | 216,056 |
|
Python | test_get_name.py | 3bb43882e727b1d36abe2e501759c9c5e9048ecf | 43 | 54,131 | 12 | tests/pytests/unit/utils/win_dacl/test_get_name.py | salt | https://github.com/saltstack/salt.git | 0 | test_get_name_error | 1 | {
"docstring": "\n Test get_name with an un mapped SID, should throw a CommandExecutionError\n ",
"language": "en",
"n_whitespaces": 18,
"n_words": 11,
"vocab_size": 11
} | 16 | 6 | Add tests, migrate some tests to pytest | 87 | 20 | def test_get_name_error():
test_sid = "S-1-2-3-4"
sid_obj = win32security.ConvertStringSidToSid(test_sid)
with pytest.raises(salt.exceptions.CommandExecutionError) as exc:
salt.utils.win_dacl.get_name(sid_obj)
assert "No mapping between account names" in exc.value.message
| 21 | 48 | 215,737 |
|
Python | introspection.py | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 | 93 | 51,029 | 12 | django/db/backends/sqlite3/introspection.py | django | https://github.com/django/django.git | 0 | get_relations | 2 | {
"docstring": "\n Return a dictionary of {column_name: (ref_column_name, ref_table_name)}\n representing all foreign keys in the given table.\n ",
"language": "en",
"n_whitespaces": 37,
"n_words": 15,
"vocab_size": 15
} | 13 | 8 | Refs #33476 -- Reformatted code with Black. | 85 | 24 | def get_relations(self, cursor, table_name):
cursor.execute(
"PRAGMA foreign_key_list(%s)" % self.connection.ops.quote_name(table_name)
)
return {
column_name: (ref_column_name, ref_table_name)
for _, _, ref_table_name, column_name, ref_column_name, *_ in cursor.fetchall()
}
| 25 | 56 | 205,195 |
|
Python | background_updates.py | 26211fec24d8d0a967de33147e148166359ec8cb | 158 | 71,674 | 12 | synapse/storage/background_updates.py | synapse | https://github.com/matrix-org/synapse.git | 0 | average_items_per_ms | 3 | {
"docstring": "An estimate of how long it takes to do a single update.\n Returns:\n A duration in ms as a float\n ",
"language": "en",
"n_whitespaces": 45,
"n_words": 20,
"vocab_size": 19
} | 7 | 11 | Fix a bug in background updates wherein background updates are never run using the default batch size (#12157) | 78 | 47 | def average_items_per_ms(self) -> Optional[float]:
# We want to return None if this is the first background update item
if self.total_item_count == 0:
return None
# Avoid dividing by zero
elif self.avg_duration_ms == 0:
return 0
else:
# Use the exponential moving average so that we can adapt to
# changes in how long the update process takes.
return float(self.avg_item_count) / float(self.avg_duration_ms)
| 61 | 45 | 247,442 |
|
Python | media_player.py | 26251895295d74fcd2c73e37804c23675c433247 | 37 | 106,437 | 7 | homeassistant/components/forked_daapd/media_player.py | async def _pause_and_wait_for_callback(self):
"""Send pause and wait for the pause callback to be received."""
self._pause_requested = True
await self.async_media_pause()
try: | core | https://github.com/home-assistant/core.git | 1 | _pause_and_wait_for_callback | 2 | {
"docstring": "Send pause and wait for the pause callback to be received.",
"language": "en",
"n_whitespaces": 10,
"n_words": 11,
"vocab_size": 10
} | 4 | 9 | Use async_timeout in forked_daapd (#78451) | 34 | 9 | async def _pause_and_wait_for_callback(self):
self._pause_requested = True
await self.async_media_pause()
try: | 9 | 53 | 307,669 |
Python | PySimpleGUI.py | 07bb93d47f01468660a01f42150e87e5cb08d546 | 10,839 | 53,473 | 16 | PySimpleGUI.py | PySimpleGUI | https://github.com/PySimpleGUI/PySimpleGUI.git | 0 | set_options | 1 | {
"docstring": "\n :param icon: Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO. Most portable is to use a Base64 of a PNG file. This works universally across all OS's\n :type icon: bytes | str\n :param button_color: Color of the button (text, background)\n :type button_color: (str, str) or str\n :param element_size: element size (width, height) in characters\n :type element_size: (int, int)\n :param button_element_size: Size of button\n :type button_element_size: (int, int)\n :param margins: (left/right, top/bottom) tkinter margins around outsize. Amount of pixels to leave inside the window's frame around the edges before your elements are shown.\n :type margins: (int, int)\n :param element_padding: Default amount of padding to put around elements in window (left/right, top/bottom) or ((left, right), (top, bottom))\n :type element_padding: (int, int) or ((int, int),(int,int))\n :param auto_size_text: True if the Widget should be shrunk to exactly fit the number of chars to show\n :type auto_size_text: bool\n :param auto_size_buttons: True if Buttons in this Window should be sized to exactly fit the text on this.\n :type auto_size_buttons: (bool)\n :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike\n :type font: (str or (str, int[, str]) or None)\n :param border_width: width of border around element\n :type border_width: (int)\n :param slider_border_width: Width of the border around sliders\n :type slider_border_width: (int)\n :param slider_relief: Type of relief to use for sliders\n :type slider_relief: (str)\n :param slider_orientation: ???\n :type slider_orientation: ???\n :param autoclose_time: ???\n :type autoclose_time: ???\n :param message_box_line_width: ???\n :type message_box_line_width: ???\n :param progress_meter_border_depth: ???\n :type progress_meter_border_depth: ???\n :param progress_meter_style: You can no longer set a progress bar style. All ttk styles must be the same for the window\n :type progress_meter_style: ???\n :param progress_meter_relief:\n :type progress_meter_relief: ???\n :param progress_meter_color: ???\n :type progress_meter_color: ???\n :param progress_meter_size: ???\n :type progress_meter_size: ???\n :param text_justification: Default text justification for all Text Elements in window\n :type text_justification: 'left' | 'right' | 'center'\n :param background_color: color of background\n :type background_color: (str)\n :param element_background_color: element background color\n :type element_background_color: (str)\n :param text_element_background_color: text element background color\n :type text_element_background_color: (str)\n :param input_elements_background_color: Default color to use for the background of input elements\n :type input_elements_background_color: (str)\n :param input_text_color: Default color to use for the text for Input elements\n :type input_text_color: (str)\n :param scrollbar_color: Default color to use for the slider trough\n :type scrollbar_color: (str)\n :param text_color: color of the text\n :type text_color: (str)\n :param element_text_color: Default color to use for Text elements\n :type element_text_color: (str)\n :param debug_win_size: window size\n :type debug_win_size: (int, int)\n :param window_location: Default location to place windows. Not setting will center windows on the display\n :type window_location: (int, int) | None\n :param error_button_color: (Default = (None))\n :type error_button_color: ???\n :param tooltip_time: time in milliseconds to wait before showing a tooltip. Default is 400ms\n :type tooltip_time: (int)\n :param tooltip_font: font to use for all tooltips\n :type tooltip_font: str or Tuple[str, int] or Tuple[str, int, str]\n :param use_ttk_buttons: if True will cause all buttons to be ttk buttons\n :type use_ttk_buttons: (bool)\n :param ttk_theme: Theme to use with ttk widgets. Choices (on Windows) include - 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative'\n :type ttk_theme: (str)\n :param suppress_error_popups: If True then error popups will not be shown if generated internally to PySimpleGUI\n :type suppress_error_popups: (bool)\n :param suppress_raise_key_errors: If True then key errors won't be raised (you'll still get popup error)\n :type suppress_raise_key_errors: (bool)\n :param suppress_key_guessing: If True then key errors won't try and find closest matches for you\n :type suppress_key_guessing: (bool)\n :param warn_button_key_duplicates: If True then duplicate Button Keys generate warnings (not recommended as they're expected)\n :type warn_button_key_duplicates: (bool) \n :param enable_treeview_869_patch: If True, then will use the treeview color patch for tk 8.6.9\n :type enable_treeview_869_patch: (bool)\n :param enable_mac_notitlebar_patch: If True then Windows with no titlebar use an alternative technique when tkinter version < 8.6.10\n :type enable_mac_notitlebar_patch: (bool)\n :param use_custom_titlebar: If True then a custom titlebar is used instead of the normal system titlebar\n :type use_custom_titlebar: (bool)\n :param titlebar_background_color: If custom titlebar indicated by use_custom_titlebar, then use this as background color\n :type titlebar_background_color: str | None\n :param titlebar_text_color: If custom titlebar indicated by use_custom_titlebar, then use this as text color\n :type titlebar_text_color: str | None\n :param titlebar_font: If custom titlebar indicated by use_custom_titlebar, then use this as title font\n :type titlebar_font: (str or (str, int[, str]) or None) | None\n :param titlebar_icon: If custom titlebar indicated by use_custom_titlebar, then use this as the icon (file or base64 bytes)\n :type titlebar_icon: bytes | str\n :param user_settings_path: default path for user_settings API calls. Expanded with os.path.expanduser so can contain ~ to represent user\n :type user_settings_path: (str)\n :param pysimplegui_settings_path: default path for the global PySimpleGUI user_settings\n :type pysimplegui_settings_path: (str)\n :param pysimplegui_settings_filename: default filename for the global PySimpleGUI user_settings\n :type pysimplegui_settings_filename: (str)\n :param keep_on_top: If True then all windows will automatically be set to keep_on_top=True\n :type keep_on_top: (bool)\n :param dpi_awareness: If True then will turn on DPI awareness (Windows only at the moment)\n :type dpi_awareness: (bool)\n :param scaling: Sets the default scaling for all windows including popups, etc.\n :type scaling: (float)\n :param disable_modal_windows: If True then all windows, including popups, will not be modal windows\n :type disable_modal_windows: (bool)\n :param tooltip_offset: Offset to use for tooltips as a tuple. These values will be added to the mouse location when the widget was entered.\n :type tooltip_offset: ((None, None) | (int, int))\n :return: None\n :rtype: None\n ",
"language": "en",
"n_whitespaces": 2847,
"n_words": 889,
"vocab_size": 356
} | 131 | 14 | Addition of tooltip_offset parm to set_options call (major hack to get around 8.6.12 problem). Backed out the experiments to try and fix new problem with Ubuntu | 19,192 | 1,112 | def set_options(icon=None, button_color=None, element_size=(None, None), button_element_size=(None, None),
margins=(None, None),
element_padding=(None, None), auto_size_text=None, auto_size_buttons=None, font=None, border_width=None,
slider_border_width=None, slider_relief=None, slider_orientation=None,
autoclose_time=None, message_box_line_width=None,
progress_meter_border_depth=None, progress_meter_style=None,
progress_meter_relief=None, progress_meter_color=None, progress_meter_size=None,
text_justification=None, background_color=None, element_background_color=None,
text_element_background_color=None, input_elements_background_color=None, input_text_color=None,
scrollbar_color=None, text_color=None, element_text_color=None, debug_win_size=(None, None),
window_location=(None, None), error_button_color=(None, None), tooltip_time=None, tooltip_font=None, use_ttk_buttons=None, ttk_theme=None,
suppress_error_popups=None, suppress_raise_key_errors=None, suppress_key_guessing=None,warn_button_key_duplicates=False, enable_treeview_869_patch=None,
enable_mac_notitlebar_patch=None, use_custom_titlebar=None, titlebar_background_color=None, titlebar_text_color=None, titlebar_font=None,
titlebar_icon=None, user_settings_path=None, pysimplegui_settings_path=None, pysimplegui_settings_filename=None, keep_on_top=None, dpi_awareness=None, scaling=None, disable_modal_windows=None, tooltip_offset=(None, None)):
global DEFAULT_ELEMENT_SIZE
global DEFAULT_BUTTON_ELEMENT_SIZE
global DEFAULT_MARGINS # Margins for each LEFT/RIGHT margin is first term
global DEFAULT_ELEMENT_PADDING # Padding between elements (row, col) in pixels
global DEFAULT_AUTOSIZE_TEXT
global DEFAULT_AUTOSIZE_BUTTONS
global DEFAULT_FONT
global DEFAULT_BORDER_WIDTH
global DEFAULT_AUTOCLOSE_TIME
global DEFAULT_BUTTON_COLOR
global MESSAGE_BOX_LINE_WIDTH
global DEFAULT_PROGRESS_BAR_BORDER_WIDTH
global DEFAULT_PROGRESS_BAR_STYLE
global DEFAULT_PROGRESS_BAR_RELIEF
global DEFAULT_PROGRESS_BAR_COLOR
global DEFAULT_PROGRESS_BAR_SIZE
global DEFAULT_TEXT_JUSTIFICATION
global DEFAULT_DEBUG_WINDOW_SIZE
global DEFAULT_SLIDER_BORDER_WIDTH
global DEFAULT_SLIDER_RELIEF
global DEFAULT_SLIDER_ORIENTATION
global DEFAULT_BACKGROUND_COLOR
global DEFAULT_INPUT_ELEMENTS_COLOR
global DEFAULT_ELEMENT_BACKGROUND_COLOR
global DEFAULT_TEXT_ELEMENT_BACKGROUND_COLOR
global DEFAULT_SCROLLBAR_COLOR
global DEFAULT_TEXT_COLOR
global DEFAULT_WINDOW_LOCATION
global DEFAULT_ELEMENT_TEXT_COLOR
global DEFAULT_INPUT_TEXT_COLOR
global DEFAULT_TOOLTIP_TIME
global DEFAULT_ERROR_BUTTON_COLOR
global DEFAULT_TTK_THEME
global USE_TTK_BUTTONS
global TOOLTIP_FONT
global SUPPRESS_ERROR_POPUPS
global SUPPRESS_RAISE_KEY_ERRORS
global SUPPRESS_KEY_GUESSING
global WARN_DUPLICATE_BUTTON_KEY_ERRORS
global ENABLE_TREEVIEW_869_PATCH
global ENABLE_MAC_NOTITLEBAR_PATCH
global USE_CUSTOM_TITLEBAR
global CUSTOM_TITLEBAR_BACKGROUND_COLOR
global CUSTOM_TITLEBAR_TEXT_COLOR
global CUSTOM_TITLEBAR_ICON
global CUSTOM_TITLEBAR_FONT
global DEFAULT_USER_SETTINGS_PATH
global DEFAULT_USER_SETTINGS_PYSIMPLEGUI_PATH
global DEFAULT_USER_SETTINGS_PYSIMPLEGUI_FILENAME
global DEFAULT_KEEP_ON_TOP
global DEFAULT_SCALING
global DEFAULT_MODAL_WINDOWS_ENABLED
global DEFAULT_TOOLTIP_OFFSET
global _pysimplegui_user_settings
# global _my_windows
if icon:
Window._user_defined_icon = icon
# _my_windows._user_defined_icon = icon
if button_color != None:
if button_color == COLOR_SYSTEM_DEFAULT:
DEFAULT_BUTTON_COLOR = (COLOR_SYSTEM_DEFAULT, COLOR_SYSTEM_DEFAULT)
else:
DEFAULT_BUTTON_COLOR = button_color
if element_size != (None, None):
DEFAULT_ELEMENT_SIZE = element_size
if button_element_size != (None, None):
DEFAULT_BUTTON_ELEMENT_SIZE = button_element_size
if margins != (None, None):
DEFAULT_MARGINS = margins
if element_padding != (None, None):
DEFAULT_ELEMENT_PADDING = element_padding
if auto_size_text != None:
DEFAULT_AUTOSIZE_TEXT = auto_size_text
if auto_size_buttons != None:
DEFAULT_AUTOSIZE_BUTTONS = auto_size_buttons
if font != None:
DEFAULT_FONT = font
if border_width != None:
DEFAULT_BORDER_WIDTH = border_width
if autoclose_time != None:
DEFAULT_AUTOCLOSE_TIME = autoclose_time
if message_box_line_width != None:
MESSAGE_BOX_LINE_WIDTH = message_box_line_width
if progress_meter_border_depth != None:
DEFAULT_PROGRESS_BAR_BORDER_WIDTH = progress_meter_border_depth
if progress_meter_style != None:
warnings.warn('You can no longer set a progress bar style. All ttk styles must be the same for the window', UserWarning)
# DEFAULT_PROGRESS_BAR_STYLE = progress_meter_style
if progress_meter_relief != None:
DEFAULT_PROGRESS_BAR_RELIEF = progress_meter_relief
if progress_meter_color != None:
DEFAULT_PROGRESS_BAR_COLOR = progress_meter_color
if progress_meter_size != None:
DEFAULT_PROGRESS_BAR_SIZE = progress_meter_size
if slider_border_width != None:
DEFAULT_SLIDER_BORDER_WIDTH = slider_border_width
if slider_orientation != None:
DEFAULT_SLIDER_ORIENTATION = slider_orientation
if slider_relief != None:
DEFAULT_SLIDER_RELIEF = slider_relief
if text_justification != None:
DEFAULT_TEXT_JUSTIFICATION = text_justification
if background_color != None:
DEFAULT_BACKGROUND_COLOR = background_color
if text_element_background_color != None:
DEFAULT_TEXT_ELEMENT_BACKGROUND_COLOR = text_element_background_color
if input_elements_background_color != None:
DEFAULT_INPUT_ELEMENTS_COLOR = input_elements_background_color
if element_background_color != None:
DEFAULT_ELEMENT_BACKGROUND_COLOR = element_background_color
if window_location != (None, None):
DEFAULT_WINDOW_LOCATION = window_location
if debug_win_size != (None, None):
DEFAULT_DEBUG_WINDOW_SIZE = debug_win_size
if text_color != None:
DEFAULT_TEXT_COLOR = text_color
if scrollbar_color != None:
DEFAULT_SCROLLBAR_COLOR = scrollbar_color
if element_text_color != None:
DEFAULT_ELEMENT_TEXT_COLOR = element_text_color
if input_text_color is not None:
DEFAULT_INPUT_TEXT_COLOR = input_text_color
if tooltip_time is not None:
DEFAULT_TOOLTIP_TIME = tooltip_time
if error_button_color != (None, None):
DEFAULT_ERROR_BUTTON_COLOR = error_button_color
if ttk_theme is not None:
DEFAULT_TTK_THEME = ttk_theme
if use_ttk_buttons is not None:
USE_TTK_BUTTONS = use_ttk_buttons
if tooltip_font is not None:
TOOLTIP_FONT = tooltip_font
if suppress_error_popups is not None:
SUPPRESS_ERROR_POPUPS = suppress_error_popups
if suppress_raise_key_errors is not None:
SUPPRESS_RAISE_KEY_ERRORS = suppress_raise_key_errors
if suppress_key_guessing is not None:
SUPPRESS_KEY_GUESSING = suppress_key_guessing
if warn_button_key_duplicates is not None:
WARN_DUPLICATE_BUTTON_KEY_ERRORS = warn_button_key_duplicates
if enable_treeview_869_patch is not None:
ENABLE_TREEVIEW_869_PATCH = enable_treeview_869_patch
if enable_mac_notitlebar_patch is not None:
ENABLE_MAC_NOTITLEBAR_PATCH = enable_mac_notitlebar_patch
if use_custom_titlebar is not None:
USE_CUSTOM_TITLEBAR = use_custom_titlebar
if titlebar_background_color is not None:
CUSTOM_TITLEBAR_BACKGROUND_COLOR = titlebar_background_color
if titlebar_text_color is not None:
CUSTOM_TITLEBAR_TEXT_COLOR = titlebar_text_color
if titlebar_font is not None:
CUSTOM_TITLEBAR_FONT = titlebar_font
if titlebar_icon is not None:
CUSTOM_TITLEBAR_ICON = titlebar_icon
if user_settings_path is not None:
DEFAULT_USER_SETTINGS_PATH = user_settings_path
if pysimplegui_settings_path is not None:
DEFAULT_USER_SETTINGS_PYSIMPLEGUI_PATH = pysimplegui_settings_path
if pysimplegui_settings_filename is not None:
DEFAULT_USER_SETTINGS_PYSIMPLEGUI_FILENAME = pysimplegui_settings_filename
if pysimplegui_settings_filename is not None or pysimplegui_settings_filename is not None:
_pysimplegui_user_settings = UserSettings(filename=DEFAULT_USER_SETTINGS_PYSIMPLEGUI_FILENAME,
path=DEFAULT_USER_SETTINGS_PYSIMPLEGUI_PATH)
if keep_on_top is not None:
DEFAULT_KEEP_ON_TOP = keep_on_top
if dpi_awareness is True:
if running_windows():
if platform.release() == "7":
ctypes.windll.user32.SetProcessDPIAware()
elif platform.release() == "8" or platform.release() == "10":
ctypes.windll.shcore.SetProcessDpiAwareness(1)
if scaling is not None:
DEFAULT_SCALING = scaling
if disable_modal_windows is not None:
DEFAULT_MODAL_WINDOWS_ENABLED = not disable_modal_windows
if tooltip_offset != (None, None):
DEFAULT_TOOLTIP_OFFSET = tooltip_offset
return True
# ----------------------------------------------------------------- #
# .########.##.....##.########.##.....##.########..######.
# ....##....##.....##.##.......###...###.##.......##....##
# ....##....##.....##.##.......####.####.##.......##......
# ....##....#########.######...##.###.##.######....######.
# ....##....##.....##.##.......##.....##.##.............##
# ....##....##.....##.##.......##.....##.##.......##....##
# ....##....##.....##.########.##.....##.########..######.
# ----------------------------------------------------------------- #
# The official Theme code
#################### ChangeLookAndFeel #######################
# Predefined settings that will change the colors and styles #
# of the elements. #
##############################################################
LOOK_AND_FEEL_TABLE = {
"SystemDefault": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT, "TEXT_INPUT": COLOR_SYSTEM_DEFAULT,
"SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR, "PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1,
"SLIDER_DEPTH": 1, "PROGRESS_DEPTH": 0, },
"SystemDefaultForReal": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT,
"TEXT_INPUT": COLOR_SYSTEM_DEFAULT, "SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": COLOR_SYSTEM_DEFAULT,
"PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1, "SLIDER_DEPTH": 1, "PROGRESS_DEPTH": 0, },
"SystemDefault1": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT, "TEXT_INPUT": COLOR_SYSTEM_DEFAULT,
"SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": COLOR_SYSTEM_DEFAULT, "PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1, "SLIDER_DEPTH": 1,
"PROGRESS_DEPTH": 0, },
"Material1": {"BACKGROUND": "#E3F2FD", "TEXT": "#000000", "INPUT": "#86A8FF", "TEXT_INPUT": "#000000", "SCROLL": "#86A8FF",
"BUTTON": ("#FFFFFF", "#5079D3"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 0, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"ACCENT1": "#FF0266", "ACCENT2": "#FF5C93", "ACCENT3": "#C5003C", },
"Material2": {"BACKGROUND": "#FAFAFA", "TEXT": "#000000", "INPUT": "#004EA1", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#5EA7FF",
"BUTTON": ("#FFFFFF", "#0079D3"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 0, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"ACCENT1": "#FF0266", "ACCENT2": "#FF5C93", "ACCENT3": "#C5003C", },
"Reddit": {"BACKGROUND": "#ffffff", "TEXT": "#1a1a1b", "INPUT": "#dae0e6", "TEXT_INPUT": "#222222", "SCROLL": "#a5a4a4", "BUTTON": ("#FFFFFF", "#0079d3"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, "ACCENT1": "#ff5414", "ACCENT2": "#33a8ff",
"ACCENT3": "#dbf0ff", },
"Topanga": {"BACKGROUND": "#282923", "TEXT": "#E7DB74", "INPUT": "#393a32", "TEXT_INPUT": "#E7C855", "SCROLL": "#E7C855", "BUTTON": ("#E7C855", "#284B5A"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, "ACCENT1": "#c15226", "ACCENT2": "#7a4d5f",
"ACCENT3": "#889743", },
"GreenTan": {"BACKGROUND": "#9FB8AD", "TEXT": '#000000', "INPUT": "#F7F3EC", "TEXT_INPUT": "#000000", "SCROLL": "#F7F3EC", "BUTTON": ("#FFFFFF", "#475841"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Dark": {"BACKGROUND": "#404040", "TEXT": "#FFFFFF", "INPUT": "#4D4D4D", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#707070", "BUTTON": ("#FFFFFF", "#004F00"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightGreen": {"BACKGROUND": "#B7CECE", "TEXT": "#000000", "INPUT": "#FDFFF7", "TEXT_INPUT": "#000000", "SCROLL": "#FDFFF7",
"BUTTON": ("#FFFFFF", "#658268"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "ACCENT1": "#76506d",
"ACCENT2": "#5148f1", "ACCENT3": "#0a1c84", "PROGRESS_DEPTH": 0, },
"Dark2": {"BACKGROUND": "#404040", "TEXT": "#FFFFFF", "INPUT": "#FFFFFF", "TEXT_INPUT": "#000000", "SCROLL": "#707070", "BUTTON": ("#FFFFFF", "#004F00"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Black": {"BACKGROUND": "#000000", "TEXT": "#FFFFFF", "INPUT": "#4D4D4D", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#707070", "BUTTON": ("#000000", "#FFFFFF"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Tan": {"BACKGROUND": "#fdf6e3", "TEXT": "#268bd1", "INPUT": "#eee8d5", "TEXT_INPUT": "#6c71c3", "SCROLL": "#eee8d5", "BUTTON": ("#FFFFFF", "#063542"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"TanBlue": {"BACKGROUND": "#e5dece", "TEXT": "#063289", "INPUT": "#f9f8f4", "TEXT_INPUT": "#242834", "SCROLL": "#eee8d5", "BUTTON": ("#FFFFFF", "#063289"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkTanBlue": {"BACKGROUND": "#242834", "TEXT": "#dfe6f8", "INPUT": "#97755c", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#a9afbb",
"BUTTON": ("#FFFFFF", "#063289"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkAmber": {"BACKGROUND": "#2c2825", "TEXT": "#fdcb52", "INPUT": "#705e52", "TEXT_INPUT": "#fdcb52", "SCROLL": "#705e52",
"BUTTON": ("#000000", "#fdcb52"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBlue": {"BACKGROUND": "#1a2835", "TEXT": "#d1ecff", "INPUT": "#335267", "TEXT_INPUT": "#acc2d0", "SCROLL": "#1b6497", "BUTTON": ("#000000", "#fafaf8"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Reds": {"BACKGROUND": "#280001", "TEXT": "#FFFFFF", "INPUT": "#d8d584", "TEXT_INPUT": "#000000", "SCROLL": "#763e00", "BUTTON": ("#000000", "#daad28"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Green": {"BACKGROUND": "#82a459", "TEXT": "#000000", "INPUT": "#d8d584", "TEXT_INPUT": "#000000", "SCROLL": "#e3ecf3", "BUTTON": ("#FFFFFF", "#517239"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"BluePurple": {"BACKGROUND": "#A5CADD", "TEXT": "#6E266E", "INPUT": "#E0F5FF", "TEXT_INPUT": "#000000", "SCROLL": "#E0F5FF",
"BUTTON": ("#FFFFFF", "#303952"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Purple": {"BACKGROUND": "#B0AAC2", "TEXT": "#000000", "INPUT": "#F2EFE8", "SCROLL": "#F2EFE8", "TEXT_INPUT": "#000000", "BUTTON": ("#000000", "#C2D4D8"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"BlueMono": {"BACKGROUND": "#AAB6D3", "TEXT": "#000000", "INPUT": "#F1F4FC", "SCROLL": "#F1F4FC", "TEXT_INPUT": "#000000", "BUTTON": ("#FFFFFF", "#7186C7"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"GreenMono": {"BACKGROUND": "#A8C1B4", "TEXT": "#000000", "INPUT": "#DDE0DE", "SCROLL": "#E3E3E3", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#6D9F85"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"BrownBlue": {"BACKGROUND": "#64778d", "TEXT": "#FFFFFF", "INPUT": "#f0f3f7", "SCROLL": "#A6B2BE", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#283b5b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"BrightColors": {"BACKGROUND": "#b4ffb4", "TEXT": "#000000", "INPUT": "#ffff64", "SCROLL": "#ffb482", "TEXT_INPUT": "#000000",
"BUTTON": ("#000000", "#ffa0dc"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"NeutralBlue": {"BACKGROUND": "#92aa9d", "TEXT": "#000000", "INPUT": "#fcfff6", "SCROLL": "#fcfff6", "TEXT_INPUT": "#000000",
"BUTTON": ("#000000", "#d0dbbd"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Kayak": {"BACKGROUND": "#a7ad7f", "TEXT": "#000000", "INPUT": "#e6d3a8", "SCROLL": "#e6d3a8", "TEXT_INPUT": "#000000", "BUTTON": ("#FFFFFF", "#5d907d"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"SandyBeach": {"BACKGROUND": "#efeccb", "TEXT": "#012f2f", "INPUT": "#e6d3a8", "SCROLL": "#e6d3a8", "TEXT_INPUT": "#012f2f",
"BUTTON": ("#FFFFFF", "#046380"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"TealMono": {"BACKGROUND": "#a8cfdd", "TEXT": "#000000", "INPUT": "#dfedf2", "SCROLL": "#dfedf2", "TEXT_INPUT": "#000000", "BUTTON": ("#FFFFFF", "#183440"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"Default": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT, "TEXT_INPUT": COLOR_SYSTEM_DEFAULT,
"SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR, "PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1, "SLIDER_DEPTH": 1,
"PROGRESS_DEPTH": 0, },
"Default1": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT, "TEXT_INPUT": COLOR_SYSTEM_DEFAULT,
"SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": COLOR_SYSTEM_DEFAULT, "PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1, "SLIDER_DEPTH": 1,
"PROGRESS_DEPTH": 0, },
"DefaultNoMoreNagging": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT,
"TEXT_INPUT": COLOR_SYSTEM_DEFAULT, "SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": OFFICIAL_PYSIMPLEGUI_BUTTON_COLOR,
"PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1, "SLIDER_DEPTH": 1, "PROGRESS_DEPTH": 0, },
"GrayGrayGray": {"BACKGROUND": COLOR_SYSTEM_DEFAULT, "TEXT": COLOR_SYSTEM_DEFAULT, "INPUT": COLOR_SYSTEM_DEFAULT, "TEXT_INPUT": COLOR_SYSTEM_DEFAULT,
"SCROLL": COLOR_SYSTEM_DEFAULT, "BUTTON": COLOR_SYSTEM_DEFAULT, "PROGRESS": COLOR_SYSTEM_DEFAULT, "BORDER": 1, "SLIDER_DEPTH": 1,
"PROGRESS_DEPTH": 0, },
"LightBlue": {"BACKGROUND": "#E3F2FD", "TEXT": "#000000", "INPUT": "#86A8FF", "TEXT_INPUT": "#000000", "SCROLL": "#86A8FF",
"BUTTON": ("#FFFFFF", "#5079D3"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 0, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"ACCENT1": "#FF0266", "ACCENT2": "#FF5C93", "ACCENT3": "#C5003C", },
"LightGrey": {"BACKGROUND": "#FAFAFA", "TEXT": "#000000", "INPUT": "#004EA1", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#5EA7FF",
"BUTTON": ("#FFFFFF", "#0079D3"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 0, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"ACCENT1": "#FF0266", "ACCENT2": "#FF5C93", "ACCENT3": "#C5003C", },
"LightGrey1": {"BACKGROUND": "#ffffff", "TEXT": "#1a1a1b", "INPUT": "#dae0e6", "TEXT_INPUT": "#222222", "SCROLL": "#a5a4a4",
"BUTTON": ("#FFFFFF", "#0079d3"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"ACCENT1": "#ff5414", "ACCENT2": "#33a8ff", "ACCENT3": "#dbf0ff", },
"DarkBrown": {"BACKGROUND": "#282923", "TEXT": "#E7DB74", "INPUT": "#393a32", "TEXT_INPUT": "#E7C855", "SCROLL": "#E7C855",
"BUTTON": ("#E7C855", "#284B5A"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"ACCENT1": "#c15226", "ACCENT2": "#7a4d5f", "ACCENT3": "#889743", },
"LightGreen1": {"BACKGROUND": "#9FB8AD", "TEXT": "#000000", "INPUT": "#F7F3EC", "TEXT_INPUT": "#000000", "SCROLL": "#F7F3EC",
"BUTTON": ("#FFFFFF", "#475841"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey": {"BACKGROUND": "#404040", "TEXT": "#FFFFFF", "INPUT": "#4D4D4D", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#707070", "BUTTON": ("#FFFFFF", "#004F00"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightGreen2": {"BACKGROUND": "#B7CECE", "TEXT": "#000000", "INPUT": "#FDFFF7", "TEXT_INPUT": "#000000", "SCROLL": "#FDFFF7",
"BUTTON": ("#FFFFFF", "#658268"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "ACCENT1": "#76506d",
"ACCENT2": "#5148f1", "ACCENT3": "#0a1c84", "PROGRESS_DEPTH": 0, },
"DarkGrey1": {"BACKGROUND": "#404040", "TEXT": "#FFFFFF", "INPUT": "#FFFFFF", "TEXT_INPUT": "#000000", "SCROLL": "#707070",
"BUTTON": ("#FFFFFF", "#004F00"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBlack": {"BACKGROUND": "#000000", "TEXT": "#FFFFFF", "INPUT": "#4D4D4D", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#707070",
"BUTTON": ("#000000", "#FFFFFF"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBrown": {"BACKGROUND": "#fdf6e3", "TEXT": "#268bd1", "INPUT": "#eee8d5", "TEXT_INPUT": "#6c71c3", "SCROLL": "#eee8d5",
"BUTTON": ("#FFFFFF", "#063542"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBrown1": {"BACKGROUND": "#e5dece", "TEXT": "#063289", "INPUT": "#f9f8f4", "TEXT_INPUT": "#242834", "SCROLL": "#eee8d5",
"BUTTON": ("#FFFFFF", "#063289"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBlue1": {"BACKGROUND": "#242834", "TEXT": "#dfe6f8", "INPUT": "#97755c", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#a9afbb",
"BUTTON": ("#FFFFFF", "#063289"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBrown1": {"BACKGROUND": "#2c2825", "TEXT": "#fdcb52", "INPUT": "#705e52", "TEXT_INPUT": "#fdcb52", "SCROLL": "#705e52",
"BUTTON": ("#000000", "#fdcb52"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBlue2": {"BACKGROUND": "#1a2835", "TEXT": "#d1ecff", "INPUT": "#335267", "TEXT_INPUT": "#acc2d0", "SCROLL": "#1b6497",
"BUTTON": ("#000000", "#fafaf8"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBrown2": {"BACKGROUND": "#280001", "TEXT": "#FFFFFF", "INPUT": "#d8d584", "TEXT_INPUT": "#000000", "SCROLL": "#763e00",
"BUTTON": ("#000000", "#daad28"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGreen": {"BACKGROUND": "#82a459", "TEXT": "#000000", "INPUT": "#d8d584", "TEXT_INPUT": "#000000", "SCROLL": "#e3ecf3",
"BUTTON": ("#FFFFFF", "#517239"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBlue1": {"BACKGROUND": "#A5CADD", "TEXT": "#6E266E", "INPUT": "#E0F5FF", "TEXT_INPUT": "#000000", "SCROLL": "#E0F5FF",
"BUTTON": ("#FFFFFF", "#303952"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightPurple": {"BACKGROUND": "#B0AAC2", "TEXT": "#000000", "INPUT": "#F2EFE8", "SCROLL": "#F2EFE8", "TEXT_INPUT": "#000000",
"BUTTON": ("#000000", "#C2D4D8"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBlue2": {"BACKGROUND": "#AAB6D3", "TEXT": "#000000", "INPUT": "#F1F4FC", "SCROLL": "#F1F4FC", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#7186C7"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightGreen3": {"BACKGROUND": "#A8C1B4", "TEXT": "#000000", "INPUT": "#DDE0DE", "SCROLL": "#E3E3E3", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#6D9F85"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBlue3": {"BACKGROUND": "#64778d", "TEXT": "#FFFFFF", "INPUT": "#f0f3f7", "SCROLL": "#A6B2BE", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#283b5b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightGreen4": {"BACKGROUND": "#b4ffb4", "TEXT": "#000000", "INPUT": "#ffff64", "SCROLL": "#ffb482", "TEXT_INPUT": "#000000",
"BUTTON": ("#000000", "#ffa0dc"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightGreen5": {"BACKGROUND": "#92aa9d", "TEXT": "#000000", "INPUT": "#fcfff6", "SCROLL": "#fcfff6", "TEXT_INPUT": "#000000",
"BUTTON": ("#000000", "#d0dbbd"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBrown2": {"BACKGROUND": "#a7ad7f", "TEXT": "#000000", "INPUT": "#e6d3a8", "SCROLL": "#e6d3a8", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#5d907d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBrown3": {"BACKGROUND": "#efeccb", "TEXT": "#012f2f", "INPUT": "#e6d3a8", "SCROLL": "#e6d3a8", "TEXT_INPUT": "#012f2f",
"BUTTON": ("#FFFFFF", "#046380"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBlue3": {"BACKGROUND": "#a8cfdd", "TEXT": "#000000", "INPUT": "#dfedf2", "SCROLL": "#dfedf2", "TEXT_INPUT": "#000000",
"BUTTON": ("#FFFFFF", "#183440"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"LightBrown4": {"BACKGROUND": "#d7c79e", "TEXT": "#a35638", "INPUT": "#9dab86", "TEXT_INPUT": "#000000", "SCROLL": "#a35638",
"BUTTON": ("#FFFFFF", "#a35638"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#a35638", "#9dab86", "#e08f62", "#d7c79e"], },
"DarkTeal": {"BACKGROUND": "#003f5c", "TEXT": "#fb5b5a", "INPUT": "#bc4873", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#bc4873", "BUTTON": ("#FFFFFF", "#fb5b5a"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#003f5c", "#472b62", "#bc4873", "#fb5b5a"], },
"DarkPurple": {"BACKGROUND": "#472b62", "TEXT": "#fb5b5a", "INPUT": "#bc4873", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#bc4873",
"BUTTON": ("#FFFFFF", "#472b62"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#003f5c", "#472b62", "#bc4873", "#fb5b5a"], },
"LightGreen6": {"BACKGROUND": "#eafbea", "TEXT": "#1f6650", "INPUT": "#6f9a8d", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#1f6650",
"BUTTON": ("#FFFFFF", "#1f6650"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#1f6650", "#6f9a8d", "#ea5e5e", "#eafbea"], },
"DarkGrey2": {"BACKGROUND": "#2b2b28", "TEXT": "#f8f8f8", "INPUT": "#f1d6ab", "TEXT_INPUT": "#000000", "SCROLL": "#f1d6ab",
"BUTTON": ("#2b2b28", "#e3b04b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#2b2b28", "#e3b04b", "#f1d6ab", "#f8f8f8"], },
"LightBrown6": {"BACKGROUND": "#f9b282", "TEXT": "#8f4426", "INPUT": "#de6b35", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#8f4426",
"BUTTON": ("#FFFFFF", "#8f4426"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#8f4426", "#de6b35", "#64ccda", "#f9b282"], },
"DarkTeal1": {"BACKGROUND": "#396362", "TEXT": "#ffe7d1", "INPUT": "#f6c89f", "TEXT_INPUT": "#000000", "SCROLL": "#f6c89f",
"BUTTON": ("#ffe7d1", "#4b8e8d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#396362", "#4b8e8d", "#f6c89f", "#ffe7d1"], },
"LightBrown7": {"BACKGROUND": "#f6c89f", "TEXT": "#396362", "INPUT": "#4b8e8d", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#396362",
"BUTTON": ("#FFFFFF", "#396362"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#396362", "#4b8e8d", "#f6c89f", "#ffe7d1"], },
"DarkPurple1": {"BACKGROUND": "#0c093c", "TEXT": "#fad6d6", "INPUT": "#eea5f6", "TEXT_INPUT": "#000000", "SCROLL": "#eea5f6",
"BUTTON": ("#FFFFFF", "#df42d1"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#0c093c", "#df42d1", "#eea5f6", "#fad6d6"], },
"DarkGrey3": {"BACKGROUND": "#211717", "TEXT": "#dfddc7", "INPUT": "#f58b54", "TEXT_INPUT": "#000000", "SCROLL": "#f58b54",
"BUTTON": ("#dfddc7", "#a34a28"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#211717", "#a34a28", "#f58b54", "#dfddc7"], },
"LightBrown8": {"BACKGROUND": "#dfddc7", "TEXT": "#211717", "INPUT": "#a34a28", "TEXT_INPUT": "#dfddc7", "SCROLL": "#211717",
"BUTTON": ("#dfddc7", "#a34a28"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#211717", "#a34a28", "#f58b54", "#dfddc7"], },
"DarkBlue4": {"BACKGROUND": "#494ca2", "TEXT": "#e3e7f1", "INPUT": "#c6cbef", "TEXT_INPUT": "#000000", "SCROLL": "#c6cbef",
"BUTTON": ("#FFFFFF", "#8186d5"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#494ca2", "#8186d5", "#c6cbef", "#e3e7f1"], },
"LightBlue4": {"BACKGROUND": "#5c94bd", "TEXT": "#470938", "INPUT": "#1a3e59", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#470938",
"BUTTON": ("#FFFFFF", "#470938"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#470938", "#1a3e59", "#5c94bd", "#f2d6eb"], },
"DarkTeal2": {"BACKGROUND": "#394a6d", "TEXT": "#c0ffb3", "INPUT": "#52de97", "TEXT_INPUT": "#000000", "SCROLL": "#52de97",
"BUTTON": ("#c0ffb3", "#394a6d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#394a6d", "#3c9d9b", "#52de97", "#c0ffb3"], },
"DarkTeal3": {"BACKGROUND": "#3c9d9b", "TEXT": "#c0ffb3", "INPUT": "#52de97", "TEXT_INPUT": "#000000", "SCROLL": "#52de97",
"BUTTON": ("#c0ffb3", "#394a6d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#394a6d", "#3c9d9b", "#52de97", "#c0ffb3"], },
"DarkPurple5": {"BACKGROUND": "#730068", "TEXT": "#f6f078", "INPUT": "#01d28e", "TEXT_INPUT": "#000000", "SCROLL": "#01d28e",
"BUTTON": ("#f6f078", "#730068"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#730068", "#434982", "#01d28e", "#f6f078"], },
"DarkPurple2": {"BACKGROUND": "#202060", "TEXT": "#b030b0", "INPUT": "#602080", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#602080",
"BUTTON": ("#FFFFFF", "#202040"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#202040", "#202060", "#602080", "#b030b0"], },
"DarkBlue5": {"BACKGROUND": "#000272", "TEXT": "#ff6363", "INPUT": "#a32f80", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#a32f80",
"BUTTON": ("#FFFFFF", "#341677"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#000272", "#341677", "#a32f80", "#ff6363"], },
"LightGrey2": {"BACKGROUND": "#f6f6f6", "TEXT": "#420000", "INPUT": "#d4d7dd", "TEXT_INPUT": "#420000", "SCROLL": "#420000",
"BUTTON": ("#420000", "#d4d7dd"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#420000", "#d4d7dd", "#eae9e9", "#f6f6f6"], },
"LightGrey3": {"BACKGROUND": "#eae9e9", "TEXT": "#420000", "INPUT": "#d4d7dd", "TEXT_INPUT": "#420000", "SCROLL": "#420000",
"BUTTON": ("#420000", "#d4d7dd"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#420000", "#d4d7dd", "#eae9e9", "#f6f6f6"], },
"DarkBlue6": {"BACKGROUND": "#01024e", "TEXT": "#ff6464", "INPUT": "#8b4367", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#8b4367",
"BUTTON": ("#FFFFFF", "#543864"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#01024e", "#543864", "#8b4367", "#ff6464"], },
"DarkBlue7": {"BACKGROUND": "#241663", "TEXT": "#eae7af", "INPUT": "#a72693", "TEXT_INPUT": "#eae7af", "SCROLL": "#a72693",
"BUTTON": ("#eae7af", "#160f30"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#160f30", "#241663", "#a72693", "#eae7af"], },
"LightBrown9": {"BACKGROUND": "#f6d365", "TEXT": "#3a1f5d", "INPUT": "#c83660", "TEXT_INPUT": "#f6d365", "SCROLL": "#3a1f5d",
"BUTTON": ("#f6d365", "#c83660"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3a1f5d", "#c83660", "#e15249", "#f6d365"], },
"DarkPurple3": {"BACKGROUND": "#6e2142", "TEXT": "#ffd692", "INPUT": "#e16363", "TEXT_INPUT": "#ffd692", "SCROLL": "#e16363",
"BUTTON": ("#ffd692", "#943855"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#6e2142", "#943855", "#e16363", "#ffd692"], },
"LightBrown10": {"BACKGROUND": "#ffd692", "TEXT": "#6e2142", "INPUT": "#943855", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#6e2142",
"BUTTON": ("#FFFFFF", "#6e2142"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#6e2142", "#943855", "#e16363", "#ffd692"], },
"DarkPurple4": {"BACKGROUND": "#200f21", "TEXT": "#f638dc", "INPUT": "#5a3d5c", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#5a3d5c",
"BUTTON": ("#FFFFFF", "#382039"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#200f21", "#382039", "#5a3d5c", "#f638dc"], },
"LightBlue5": {"BACKGROUND": "#b2fcff", "TEXT": "#3e64ff", "INPUT": "#5edfff", "TEXT_INPUT": "#000000", "SCROLL": "#3e64ff",
"BUTTON": ("#FFFFFF", "#3e64ff"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3e64ff", "#5edfff", "#b2fcff", "#ecfcff"], },
"DarkTeal4": {"BACKGROUND": "#464159", "TEXT": "#c7f0db", "INPUT": "#8bbabb", "TEXT_INPUT": "#000000", "SCROLL": "#8bbabb",
"BUTTON": ("#FFFFFF", "#6c7b95"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#464159", "#6c7b95", "#8bbabb", "#c7f0db"], },
"LightTeal": {"BACKGROUND": "#c7f0db", "TEXT": "#464159", "INPUT": "#6c7b95", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#464159",
"BUTTON": ("#FFFFFF", "#464159"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#464159", "#6c7b95", "#8bbabb", "#c7f0db"], },
"DarkTeal5": {"BACKGROUND": "#8bbabb", "TEXT": "#464159", "INPUT": "#6c7b95", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#464159",
"BUTTON": ("#c7f0db", "#6c7b95"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#464159", "#6c7b95", "#8bbabb", "#c7f0db"], },
"LightGrey4": {"BACKGROUND": "#faf5ef", "TEXT": "#672f2f", "INPUT": "#99b19c", "TEXT_INPUT": "#672f2f", "SCROLL": "#672f2f",
"BUTTON": ("#672f2f", "#99b19c"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#672f2f", "#99b19c", "#d7d1c9", "#faf5ef"], },
"LightGreen7": {"BACKGROUND": "#99b19c", "TEXT": "#faf5ef", "INPUT": "#d7d1c9", "TEXT_INPUT": "#000000", "SCROLL": "#d7d1c9",
"BUTTON": ("#FFFFFF", "#99b19c"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#672f2f", "#99b19c", "#d7d1c9", "#faf5ef"], },
"LightGrey5": {"BACKGROUND": "#d7d1c9", "TEXT": "#672f2f", "INPUT": "#99b19c", "TEXT_INPUT": "#672f2f", "SCROLL": "#672f2f",
"BUTTON": ("#FFFFFF", "#672f2f"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#672f2f", "#99b19c", "#d7d1c9", "#faf5ef"], },
"DarkBrown3": {"BACKGROUND": "#a0855b", "TEXT": "#f9f6f2", "INPUT": "#f1d6ab", "TEXT_INPUT": "#000000", "SCROLL": "#f1d6ab",
"BUTTON": ("#FFFFFF", "#38470b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#38470b", "#a0855b", "#f1d6ab", "#f9f6f2"], },
"LightBrown11": {"BACKGROUND": "#f1d6ab", "TEXT": "#38470b", "INPUT": "#a0855b", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#38470b",
"BUTTON": ("#f9f6f2", "#a0855b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#38470b", "#a0855b", "#f1d6ab", "#f9f6f2"], },
"DarkRed": {"BACKGROUND": "#83142c", "TEXT": "#f9d276", "INPUT": "#ad1d45", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#ad1d45", "BUTTON": ("#f9d276", "#ad1d45"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#44000d", "#83142c", "#ad1d45", "#f9d276"], },
"DarkTeal6": {"BACKGROUND": "#204969", "TEXT": "#fff7f7", "INPUT": "#dadada", "TEXT_INPUT": "#000000", "SCROLL": "#dadada",
"BUTTON": ("#000000", "#fff7f7"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#204969", "#08ffc8", "#dadada", "#fff7f7"], },
"DarkBrown4": {"BACKGROUND": "#252525", "TEXT": "#ff0000", "INPUT": "#af0404", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#af0404",
"BUTTON": ("#FFFFFF", "#252525"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#252525", "#414141", "#af0404", "#ff0000"], },
"LightYellow": {"BACKGROUND": "#f4ff61", "TEXT": "#27aa80", "INPUT": "#32ff6a", "TEXT_INPUT": "#000000", "SCROLL": "#27aa80",
"BUTTON": ("#f4ff61", "#27aa80"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#27aa80", "#32ff6a", "#a8ff3e", "#f4ff61"], },
"DarkGreen1": {"BACKGROUND": "#2b580c", "TEXT": "#fdef96", "INPUT": "#f7b71d", "TEXT_INPUT": "#000000", "SCROLL": "#f7b71d",
"BUTTON": ("#fdef96", "#2b580c"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#2b580c", "#afa939", "#f7b71d", "#fdef96"], },
"LightGreen8": {"BACKGROUND": "#c8dad3", "TEXT": "#63707e", "INPUT": "#93b5b3", "TEXT_INPUT": "#000000", "SCROLL": "#63707e",
"BUTTON": ("#FFFFFF", "#63707e"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#63707e", "#93b5b3", "#c8dad3", "#f2f6f5"], },
"DarkTeal7": {"BACKGROUND": "#248ea9", "TEXT": "#fafdcb", "INPUT": "#aee7e8", "TEXT_INPUT": "#000000", "SCROLL": "#aee7e8",
"BUTTON": ("#000000", "#fafdcb"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#248ea9", "#28c3d4", "#aee7e8", "#fafdcb"], },
"DarkBlue8": {"BACKGROUND": "#454d66", "TEXT": "#d9d872", "INPUT": "#58b368", "TEXT_INPUT": "#000000", "SCROLL": "#58b368",
"BUTTON": ("#000000", "#009975"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#009975", "#454d66", "#58b368", "#d9d872"], },
"DarkBlue9": {"BACKGROUND": "#263859", "TEXT": "#ff6768", "INPUT": "#6b778d", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#6b778d",
"BUTTON": ("#ff6768", "#263859"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#17223b", "#263859", "#6b778d", "#ff6768"], },
"DarkBlue10": {"BACKGROUND": "#0028ff", "TEXT": "#f1f4df", "INPUT": "#10eaf0", "TEXT_INPUT": "#000000", "SCROLL": "#10eaf0",
"BUTTON": ("#f1f4df", "#24009c"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#24009c", "#0028ff", "#10eaf0", "#f1f4df"], },
"DarkBlue11": {"BACKGROUND": "#6384b3", "TEXT": "#e6f0b6", "INPUT": "#b8e9c0", "TEXT_INPUT": "#000000", "SCROLL": "#b8e9c0",
"BUTTON": ("#e6f0b6", "#684949"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#684949", "#6384b3", "#b8e9c0", "#e6f0b6"], },
"DarkTeal8": {"BACKGROUND": "#71a0a5", "TEXT": "#212121", "INPUT": "#665c84", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#212121",
"BUTTON": ("#fab95b", "#665c84"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#212121", "#665c84", "#71a0a5", "#fab95b"], },
"DarkRed1": {"BACKGROUND": "#c10000", "TEXT": "#eeeeee", "INPUT": "#dedede", "TEXT_INPUT": "#000000", "SCROLL": "#dedede", "BUTTON": ("#c10000", "#eeeeee"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#c10000", "#ff4949", "#dedede", "#eeeeee"], },
"LightBrown5": {"BACKGROUND": "#fff591", "TEXT": "#e41749", "INPUT": "#f5587b", "TEXT_INPUT": "#000000", "SCROLL": "#e41749",
"BUTTON": ("#fff591", "#e41749"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#e41749", "#f5587b", "#ff8a5c", "#fff591"], },
"LightGreen9": {"BACKGROUND": "#f1edb3", "TEXT": "#3b503d", "INPUT": "#4a746e", "TEXT_INPUT": "#f1edb3", "SCROLL": "#3b503d",
"BUTTON": ("#f1edb3", "#3b503d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3b503d", "#4a746e", "#c8cf94", "#f1edb3"], "DESCRIPTION": ["Green", "Turquoise", "Yellow"], },
"DarkGreen2": {"BACKGROUND": "#3b503d", "TEXT": "#f1edb3", "INPUT": "#c8cf94", "TEXT_INPUT": "#000000", "SCROLL": "#c8cf94",
"BUTTON": ("#f1edb3", "#3b503d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3b503d", "#4a746e", "#c8cf94", "#f1edb3"], "DESCRIPTION": ["Green", "Turquoise", "Yellow"], },
"LightGray1": {"BACKGROUND": "#f2f2f2", "TEXT": "#222831", "INPUT": "#393e46", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#222831",
"BUTTON": ("#f2f2f2", "#222831"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#222831", "#393e46", "#f96d00", "#f2f2f2"], "DESCRIPTION": ["#000000", "Grey", "Orange", "Grey", "Autumn"], },
"DarkGrey4": {"BACKGROUND": "#52524e", "TEXT": "#e9e9e5", "INPUT": "#d4d6c8", "TEXT_INPUT": "#000000", "SCROLL": "#d4d6c8",
"BUTTON": ("#FFFFFF", "#9a9b94"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#52524e", "#9a9b94", "#d4d6c8", "#e9e9e5"], "DESCRIPTION": ["Grey", "Pastel", "Winter"], },
"DarkBlue12": {"BACKGROUND": "#324e7b", "TEXT": "#f8f8f8", "INPUT": "#86a6df", "TEXT_INPUT": "#000000", "SCROLL": "#86a6df",
"BUTTON": ("#FFFFFF", "#5068a9"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#324e7b", "#5068a9", "#86a6df", "#f8f8f8"], "DESCRIPTION": ["Blue", "Grey", "Cold", "Winter"], },
"DarkPurple6": {"BACKGROUND": "#070739", "TEXT": "#e1e099", "INPUT": "#c327ab", "TEXT_INPUT": "#e1e099", "SCROLL": "#c327ab",
"BUTTON": ("#e1e099", "#521477"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#070739", "#521477", "#c327ab", "#e1e099"], "DESCRIPTION": ["#000000", "Purple", "Yellow", "Dark"], },
"DarkPurple7": {"BACKGROUND": "#191930", "TEXT": "#B1B7C5", "INPUT": "#232B5C", "TEXT_INPUT": "#D0E3E7", "SCROLL": "#B1B7C5",
"BUTTON": ("#272D38", "#B1B7C5"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBlue13": {"BACKGROUND": "#203562", "TEXT": "#e3e8f8", "INPUT": "#c0c5cd", "TEXT_INPUT": "#000000", "SCROLL": "#c0c5cd",
"BUTTON": ("#FFFFFF", "#3e588f"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#203562", "#3e588f", "#c0c5cd", "#e3e8f8"], "DESCRIPTION": ["Blue", "Grey", "Wedding", "Cold"], },
"DarkBrown5": {"BACKGROUND": "#3c1b1f", "TEXT": "#f6e1b5", "INPUT": "#e2bf81", "TEXT_INPUT": "#000000", "SCROLL": "#e2bf81",
"BUTTON": ("#3c1b1f", "#f6e1b5"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3c1b1f", "#b21e4b", "#e2bf81", "#f6e1b5"], "DESCRIPTION": ["Brown", "Red", "Yellow", "Warm"], },
"DarkGreen3": {"BACKGROUND": "#062121", "TEXT": "#eeeeee", "INPUT": "#e4dcad", "TEXT_INPUT": "#000000", "SCROLL": "#e4dcad",
"BUTTON": ("#eeeeee", "#181810"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#062121", "#181810", "#e4dcad", "#eeeeee"], "DESCRIPTION": ["#000000", "#000000", "Brown", "Grey"], },
"DarkBlack1": {"BACKGROUND": "#181810", "TEXT": "#eeeeee", "INPUT": "#e4dcad", "TEXT_INPUT": "#000000", "SCROLL": "#e4dcad",
"BUTTON": ("#FFFFFF", "#062121"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#062121", "#181810", "#e4dcad", "#eeeeee"], "DESCRIPTION": ["#000000", "#000000", "Brown", "Grey"], },
"DarkGrey5": {"BACKGROUND": "#343434", "TEXT": "#f3f3f3", "INPUT": "#e9dcbe", "TEXT_INPUT": "#000000", "SCROLL": "#e9dcbe",
"BUTTON": ("#FFFFFF", "#8e8b82"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#343434", "#8e8b82", "#e9dcbe", "#f3f3f3"], "DESCRIPTION": ["Grey", "Brown"], },
"LightBrown12": {"BACKGROUND": "#8e8b82", "TEXT": "#f3f3f3", "INPUT": "#e9dcbe", "TEXT_INPUT": "#000000", "SCROLL": "#e9dcbe",
"BUTTON": ("#f3f3f3", "#8e8b82"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#343434", "#8e8b82", "#e9dcbe", "#f3f3f3"], "DESCRIPTION": ["Grey", "Brown"], },
"DarkTeal9": {"BACKGROUND": "#13445a", "TEXT": "#fef4e8", "INPUT": "#446878", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#446878",
"BUTTON": ("#fef4e8", "#446878"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#13445a", "#970747", "#446878", "#fef4e8"], "DESCRIPTION": ["Red", "Grey", "Blue", "Wedding", "Retro"], },
"DarkBlue14": {"BACKGROUND": "#21273d", "TEXT": "#f1f6f8", "INPUT": "#b9d4f1", "TEXT_INPUT": "#000000", "SCROLL": "#b9d4f1",
"BUTTON": ("#FFFFFF", "#6a759b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#21273d", "#6a759b", "#b9d4f1", "#f1f6f8"], "DESCRIPTION": ["Blue", "#000000", "Grey", "Cold", "Winter"], },
"LightBlue6": {"BACKGROUND": "#f1f6f8", "TEXT": "#21273d", "INPUT": "#6a759b", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#21273d",
"BUTTON": ("#f1f6f8", "#6a759b"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#21273d", "#6a759b", "#b9d4f1", "#f1f6f8"], "DESCRIPTION": ["Blue", "#000000", "Grey", "Cold", "Winter"], },
"DarkGreen4": {"BACKGROUND": "#044343", "TEXT": "#e4e4e4", "INPUT": "#045757", "TEXT_INPUT": "#e4e4e4", "SCROLL": "#045757",
"BUTTON": ("#e4e4e4", "#045757"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#222222", "#044343", "#045757", "#e4e4e4"], "DESCRIPTION": ["#000000", "Turquoise", "Grey", "Dark"], },
"DarkGreen5": {"BACKGROUND": "#1b4b36", "TEXT": "#e0e7f1", "INPUT": "#aebd77", "TEXT_INPUT": "#000000", "SCROLL": "#aebd77",
"BUTTON": ("#FFFFFF", "#538f6a"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#1b4b36", "#538f6a", "#aebd77", "#e0e7f1"], "DESCRIPTION": ["Green", "Grey"], },
"DarkTeal10": {"BACKGROUND": "#0d3446", "TEXT": "#d8dfe2", "INPUT": "#71adb5", "TEXT_INPUT": "#000000", "SCROLL": "#71adb5",
"BUTTON": ("#FFFFFF", "#176d81"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#0d3446", "#176d81", "#71adb5", "#d8dfe2"], "DESCRIPTION": ["Grey", "Turquoise", "Winter", "Cold"], },
"DarkGrey6": {"BACKGROUND": "#3e3e3e", "TEXT": "#ededed", "INPUT": "#68868c", "TEXT_INPUT": "#ededed", "SCROLL": "#68868c",
"BUTTON": ("#FFFFFF", "#405559"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3e3e3e", "#405559", "#68868c", "#ededed"], "DESCRIPTION": ["Grey", "Turquoise", "Winter"], },
"DarkTeal11": {"BACKGROUND": "#405559", "TEXT": "#ededed", "INPUT": "#68868c", "TEXT_INPUT": "#ededed", "SCROLL": "#68868c",
"BUTTON": ("#ededed", "#68868c"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#3e3e3e", "#405559", "#68868c", "#ededed"], "DESCRIPTION": ["Grey", "Turquoise", "Winter"], },
"LightBlue7": {"BACKGROUND": "#9ed0e0", "TEXT": "#19483f", "INPUT": "#5c868e", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#19483f",
"BUTTON": ("#FFFFFF", "#19483f"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#19483f", "#5c868e", "#ff6a38", "#9ed0e0"], "DESCRIPTION": ["Orange", "Blue", "Turquoise"], },
"LightGreen10": {"BACKGROUND": "#d8ebb5", "TEXT": "#205d67", "INPUT": "#639a67", "TEXT_INPUT": "#FFFFFF", "SCROLL": "#205d67",
"BUTTON": ("#d8ebb5", "#205d67"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#205d67", "#639a67", "#d9bf77", "#d8ebb5"], "DESCRIPTION": ["Blue", "Green", "Brown", "Vintage"], },
"DarkBlue15": {"BACKGROUND": "#151680", "TEXT": "#f1fea4", "INPUT": "#375fc0", "TEXT_INPUT": "#f1fea4", "SCROLL": "#375fc0",
"BUTTON": ("#f1fea4", "#1c44ac"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#151680", "#1c44ac", "#375fc0", "#f1fea4"], "DESCRIPTION": ["Blue", "Yellow", "Cold"], },
"DarkBlue16": {"BACKGROUND": "#1c44ac", "TEXT": "#f1fea4", "INPUT": "#375fc0", "TEXT_INPUT": "#f1fea4", "SCROLL": "#375fc0",
"BUTTON": ("#f1fea4", "#151680"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#151680", "#1c44ac", "#375fc0", "#f1fea4"], "DESCRIPTION": ["Blue", "Yellow", "Cold"], },
"DarkTeal12": {"BACKGROUND": "#004a7c", "TEXT": "#fafafa", "INPUT": "#e8f1f5", "TEXT_INPUT": "#000000", "SCROLL": "#e8f1f5",
"BUTTON": ("#fafafa", "#005691"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#004a7c", "#005691", "#e8f1f5", "#fafafa"], "DESCRIPTION": ["Grey", "Blue", "Cold", "Winter"], },
"LightBrown13": {"BACKGROUND": "#ebf5ee", "TEXT": "#921224", "INPUT": "#bdc6b8", "TEXT_INPUT": "#921224", "SCROLL": "#921224",
"BUTTON": ("#FFFFFF", "#921224"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#921224", "#bdc6b8", "#bce0da", "#ebf5ee"], "DESCRIPTION": ["Red", "Blue", "Grey", "Vintage", "Wedding"], },
"DarkBlue17": {"BACKGROUND": "#21294c", "TEXT": "#f9f2d7", "INPUT": "#f2dea8", "TEXT_INPUT": "#000000", "SCROLL": "#f2dea8",
"BUTTON": ("#f9f2d7", "#141829"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#141829", "#21294c", "#f2dea8", "#f9f2d7"], "DESCRIPTION": ["#000000", "Blue", "Yellow"], },
"DarkBrown6": {"BACKGROUND": "#785e4d", "TEXT": "#f2eee3", "INPUT": "#baaf92", "TEXT_INPUT": "#000000", "SCROLL": "#baaf92",
"BUTTON": ("#FFFFFF", "#785e4d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#785e4d", "#ff8426", "#baaf92", "#f2eee3"], "DESCRIPTION": ["Grey", "Brown", "Orange", "Autumn"], },
"DarkGreen6": {"BACKGROUND": "#5c715e", "TEXT": "#f2f9f1", "INPUT": "#ddeedf", "TEXT_INPUT": "#000000", "SCROLL": "#ddeedf",
"BUTTON": ("#f2f9f1", "#5c715e"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#5c715e", "#b6cdbd", "#ddeedf", "#f2f9f1"], "DESCRIPTION": ["Grey", "Green", "Vintage"], },
"DarkGreen7": {"BACKGROUND": "#0C231E", "TEXT": "#efbe1c", "INPUT": "#153C33", "TEXT_INPUT": "#efbe1c", "SCROLL": "#153C33",
"BUTTON": ("#efbe1c", "#153C33"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey7": {"BACKGROUND": "#4b586e", "TEXT": "#dddddd", "INPUT": "#574e6d", "TEXT_INPUT": "#dddddd", "SCROLL": "#574e6d",
"BUTTON": ("#dddddd", "#43405d"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#43405d", "#4b586e", "#574e6d", "#dddddd"], "DESCRIPTION": ["Grey", "Winter", "Cold"], },
"DarkRed2": {"BACKGROUND": "#ab1212", "TEXT": "#f6e4b5", "INPUT": "#cd3131", "TEXT_INPUT": "#f6e4b5", "SCROLL": "#cd3131", "BUTTON": ("#f6e4b5", "#ab1212"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#ab1212", "#1fad9f", "#cd3131", "#f6e4b5"], "DESCRIPTION": ["Turquoise", "Red", "Yellow"], },
"LightGrey6": {"BACKGROUND": "#e3e3e3", "TEXT": "#233142", "INPUT": "#455d7a", "TEXT_INPUT": "#e3e3e3", "SCROLL": "#233142",
"BUTTON": ("#e3e3e3", "#455d7a"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0,
"COLOR_LIST": ["#233142", "#455d7a", "#f95959", "#e3e3e3"], "DESCRIPTION": ["#000000", "Blue", "Red", "Grey"], },
"HotDogStand": {"BACKGROUND": "red", "TEXT": "yellow", "INPUT": "yellow", "TEXT_INPUT": "#000000", "SCROLL": "yellow", "BUTTON": ("red", "yellow"),
"PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey8": {"BACKGROUND": "#19232D", "TEXT": "#ffffff", "INPUT": "#32414B", "TEXT_INPUT": "#ffffff", "SCROLL": "#505F69",
"BUTTON": ("#ffffff", "#32414B"), "PROGRESS": ("#505F69", "#32414B"), "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey9": {"BACKGROUND": "#36393F", "TEXT": "#DCDDDE", "INPUT": "#40444B", "TEXT_INPUT": "#ffffff", "SCROLL": "#202225",
"BUTTON": ("#202225", "#B9BBBE"), "PROGRESS": ("#202225", "#40444B"), "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey10": {"BACKGROUND": "#1c1e23", "TEXT": "#cccdcf", "INPUT": "#272a31", "TEXT_INPUT": "#8b9fde", "SCROLL": "#313641",
"BUTTON": ("#f5f5f6", "#2e3d5a"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey11": {"BACKGROUND": "#1c1e23", "TEXT": "#cccdcf", "INPUT": "#313641", "TEXT_INPUT": "#cccdcf", "SCROLL": "#313641",
"BUTTON": ("#f5f5f6", "#313641"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey12": {"BACKGROUND": "#1c1e23", "TEXT": "#8b9fde", "INPUT": "#313641", "TEXT_INPUT": "#8b9fde", "SCROLL": "#313641",
"BUTTON": ("#cccdcf", "#2e3d5a"), "PROGRESS": DEFAULT_PROGRESS_BAR_COMPUTE, "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey13": {"BACKGROUND": "#1c1e23", "TEXT": "#cccdcf", "INPUT": "#272a31", "TEXT_INPUT": "#cccdcf", "SCROLL": "#313641",
"BUTTON": ("#8b9fde", "#313641"), "PROGRESS": ("#cccdcf", "#272a31"), "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkGrey14": {"BACKGROUND": "#24292e", "TEXT": "#fafbfc", "INPUT": "#1d2125", "TEXT_INPUT": "#fafbfc", "SCROLL": "#1d2125",
"BUTTON": ("#fafbfc", "#155398"), "PROGRESS": ("#155398", "#1d2125"), "BORDER": 1, "SLIDER_DEPTH": 0, "PROGRESS_DEPTH": 0, },
"DarkBrown7": {"BACKGROUND": "#2c2417", "TEXT": "#baa379", "INPUT": "#baa379", "TEXT_INPUT": "#000000", "SCROLL": "#392e1c",
"BUTTON": ("#000000", "#baa379"), "PROGRESS": ("#baa379", "#453923"), "BORDER": 1, "SLIDER_DEPTH": 1, "PROGRESS_DEPTH": 0, },
"Python": {"BACKGROUND": "#3d7aab", "TEXT": "#ffde56", "INPUT": "#295273", "TEXT_INPUT": "#ffde56", "SCROLL": "#295273", "BUTTON": ("#ffde56", "#295273"),
"PROGRESS": ("#ffde56", "#295273"), "BORDER": 1, "SLIDER_DEPTH": 1, "PROGRESS_DEPTH": 0, },
}
| 4,824 | 255 | 212,865 |
|
Python | test_analytics.py | 46500beefcccd8106718a8172a5078bbe5579765 | 85 | 95,933 | 16 | tests/components/analytics/test_analytics.py | core | https://github.com/home-assistant/core.git | 0 | test_load_with_supervisor_without_diagnostics | 1 | {
"docstring": "Test loading with a supervisor that has not diagnostics enabled.",
"language": "en",
"n_whitespaces": 9,
"n_words": 10,
"vocab_size": 10
} | 12 | 13 | Enable strict typing of analytics (#83119) | 132 | 22 | async def test_load_with_supervisor_without_diagnostics(hass):
analytics = Analytics(hass)
analytics._data.preferences[ATTR_DIAGNOSTICS] = True
assert analytics.preferences[ATTR_DIAGNOSTICS]
with patch(
"homeassistant.components.hassio.get_supervisor_info",
side_effect=Mock(return_value={"diagnostics": False}),
), patch(
"homeassistant.components.hassio.is_hassio",
side_effect=Mock(return_value=True),
):
await analytics.load()
assert not analytics.preferences[ATTR_DIAGNOSTICS]
| 26 | 78 | 296,961 |
|
Python | test_message_builder.py | db35e231ceababe8c9f5ca7b5d2ca685f07c7d5b | 581 | 18,974 | 11 | tests/sentry/integrations/msteams/test_message_builder.py | sentry | https://github.com/getsentry/sentry.git | 0 | test_issue_message_builder | 3 | {
"docstring": "\\{\\{ # {{\n DATE\\( # DATE(\n [0-9T+:\\-]+,\\ SHORT # 2022-07-14T19:30:34, SHORT\n \\) # )\n \\}\\} # }}\n \\ # whitespace\n at # at\n \\ # whitespace\n \\{\\{ # {{\n TIME\\([0-9T+:\\-]+\\) # TIME(2022-07-14T19:30:34)\n \\}\\} # }}",
"language": "en",
"n_whitespaces": 369,
"n_words": 35,
"vocab_size": 17
} | 41 | 60 | test(msteams): Add tests for building group card (#36834)
Add tests for build_group_card which builds issues cards. Does NOT test all visual aspects of the card. Only ensures that certain important elements are present and the basic structure of the card is correct. | 694 | 110 | def test_issue_message_builder(self):
self.event1.data["metadata"].update({"value": "some error"})
self.group1.data["metadata"].update({"value": "some error"})
self.event1.data["type"] = self.group1.data["type"] = "error"
issue_card = build_group_card(
group=self.group1, event=self.event1, rules=self.rules, integration=self.integration
)
body = issue_card["body"]
assert 4 == len(body)
title = body[0]
assert "oh no" in title["text"]
assert TextSize.LARGE == title["size"]
assert TextWeight.BOLDER == title["weight"]
description = body[1]
assert "some error" == description["text"]
assert TextWeight.BOLDER == description["weight"]
footer = body[2]
assert "ColumnSet" == footer["type"]
assert 3 == len(footer["columns"])
logo = footer["columns"][0]["items"][0]
assert "20px" == logo["height"]
issue_id_and_rule = footer["columns"][1]["items"][0]
assert self.group1.qualified_short_id in issue_id_and_rule["text"]
assert "rule1" in issue_id_and_rule["text"]
assert "+1 other" in issue_id_and_rule["text"]
date = footer["columns"][2]["items"][0]
assert (
re.match(
r,
date["text"],
re.VERBOSE,
)
is not None
)
actions_container = body[3]
assert "Container" == actions_container["type"]
action_set = actions_container["items"][0]
assert "ActionSet" == action_set["type"]
actions = action_set["actions"]
for action in actions:
assert ActionType.SHOW_CARD == action["type"]
card_body = action["card"]["body"]
assert 1 <= len(card_body)
assert "Input.ChoiceSet" == card_body[-1]["type"]
resolve_action, ignore_action, assign_action = actions
assert "Resolve" == resolve_action["title"]
assert "Ignore" == ignore_action["title"]
assert "Assign" == assign_action["title"]
# Check if card is serializable to json
card_json = json.dumps(issue_card)
assert card_json[0] == "{" and card_json[-1] == "}"
| 176 | 402 | 93,204 |
|
Python | cached.py | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 | 127 | 51,474 | 12 | django/template/loaders/cached.py | django | https://github.com/django/django.git | 0 | cache_key | 7 | {
"docstring": "\n Generate a cache key for the template name and skip.\n\n If skip is provided, only origins that match template_name are included\n in the cache key. This ensures each template is only parsed and cached\n once if contained in different extend chains like:\n\n x -> a -> a\n y -> a -> a\n z -> a -> a\n ",
"language": "en",
"n_whitespaces": 126,
"n_words": 57,
"vocab_size": 39
} | 12 | 9 | Refs #33476 -- Reformatted code with Black. | 106 | 28 | def cache_key(self, template_name, skip=None):
skip_prefix = ""
if skip:
matching = [
origin.name for origin in skip if origin.template_name == template_name
]
if matching:
skip_prefix = self.generate_hash(matching)
return "-".join(s for s in (str(template_name), skip_prefix) if s)
| 36 | 66 | 206,296 |
|
Python | PythonFlavors.py | 77e7c06c0f9c5c0735b5a65c72abcd243d8e3640 | 47 | 42,801 | 11 | nuitka/PythonFlavors.py | Nuitka | https://github.com/Nuitka/Nuitka.git | 0 | isNuitkaPython | 2 | {
"docstring": "Is this our own fork of CPython named Nuitka-Python.",
"language": "en",
"n_whitespaces": 8,
"n_words": 9,
"vocab_size": 9
} | 7 | 5 | Minor cleanups | 59 | 19 | def isNuitkaPython():
# spell-checker: ignore nuitkapython
if python_version >= 0x300:
return sys.implementation.name == "nuitkapython"
else:
return sys.subversion[0] == "nuitkapython"
_is_anaconda = None
| 22 | 29 | 178,712 |
|
Python | req_command.py | f638f5d0e6c8ebed0e69a6584bc7f003ec646580 | 158 | 12,206 | 12 | .venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py | transferlearning | https://github.com/jindongwang/transferlearning.git | 0 | handle_pip_version_check | 3 | {
"docstring": "\n Do the pip version check if not disabled.\n\n This overrides the default behavior of not doing the check.\n ",
"language": "en",
"n_whitespaces": 40,
"n_words": 18,
"vocab_size": 15
} | 17 | 9 | upd; format | 117 | 50 | def handle_pip_version_check(self, options):
# type: (Values) -> None
# Make sure the index_group options are present.
assert hasattr(options, "no_index")
if options.disable_pip_version_check or options.no_index:
return
# Otherwise, check if we're using the latest version of pip available.
session = self._build_session(
options, retries=0, timeout=min(5, options.timeout)
)
with session:
pip_self_version_check(session, options)
KEEPABLE_TEMPDIR_TYPES = [
tempdir_kinds.BUILD_ENV,
tempdir_kinds.EPHEM_WHEEL_CACHE,
tempdir_kinds.REQ_BUILD,
]
| 55 | 57 | 60,555 |
|
Python | admin_modify.py | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 | 457 | 50,412 | 15 | django/contrib/admin/templatetags/admin_modify.py | @register.tag(name="submit_row") | django | https://github.com/django/django.git | 1 | submit_row | 22 | {
"docstring": "\n Display the row of buttons for delete and save.\n ",
"language": "en",
"n_whitespaces": 16,
"n_words": 9,
"vocab_size": 9
} | 24 | 49 | Refs #33476 -- Reformatted code with Black. | 380 | 64 | def submit_row(context):
add = context["add"]
change = context["change"]
is_popup = context["is_popup"]
save_as = context["save_as"]
show_save = context.get("show_save", True)
show_save_and_add_another = context.get("show_save_and_add_another", True)
show_save_and_continue = context.get("show_save_and_continue", True)
has_add_permission = context["has_add_permission"]
has_change_permission = context["has_change_permission"]
has_view_permission = context["has_view_permission"]
has_editable_inline_admin_formsets = context["has_editable_inline_admin_formsets"]
can_save = (
(has_change_permission and change)
or (has_add_permission and add)
or has_editable_inline_admin_formsets
)
can_save_and_add_another = (
has_add_permission
and not is_popup
and (not save_as or add)
and can_save
and show_save_and_add_another
)
can_save_and_continue = (
not is_popup and can_save and has_view_permission and show_save_and_continue
)
can_change = has_change_permission or has_editable_inline_admin_formsets
ctx = Context(context)
ctx.update(
{
"can_change": can_change,
"show_delete_link": (
not is_popup
and context["has_delete_permission"]
and change
and context.get("show_delete", True)
),
"show_save_as_new": not is_popup
and has_change_permission
and change
and save_as,
"show_save_and_add_another": can_save_and_add_another,
"show_save_and_continue": can_save_and_continue,
"show_save": show_save and can_save,
"show_close": not (show_save and can_save),
}
)
return ctx
@register.tag(name="submit_row") | 131 | 213 | 203,500 |
Python | test_ridge.py | f14af688b7e77ecb6df9dfee93ec39b6c0334b86 | 60 | 75,551 | 11 | sklearn/linear_model/tests/test_ridge.py | scikit-learn | https://github.com/scikit-learn/scikit-learn.git | 0 | test_ridgecv_normalize_deprecated | 1 | {
"docstring": "Check that the normalize deprecation warning mentions the rescaling of alphas\n\n Non-regression test for issue #22540\n ",
"language": "en",
"n_whitespaces": 22,
"n_words": 16,
"vocab_size": 15
} | 13 | 8 | FIX Make Ridge*CV warn about rescaling alphas with scaling (#22585) | 108 | 26 | def test_ridgecv_normalize_deprecated(Estimator):
X = np.array([[1, -1], [1, 1]])
y = np.array([0, 1])
estimator = Estimator(normalize=True)
with pytest.warns(
FutureWarning, match=r"Set parameter alphas to: original_alphas \* n_samples"
):
estimator.fit(X, y)
| 28 | 68 | 259,066 |
|
Python | __init__.py | 10027b20904b678d8baecbc6e72c5bcc3f4f24b2 | 29 | 107,548 | 10 | homeassistant/components/nissan_leaf/__init__.py | core | https://github.com/home-assistant/core.git | 0 | async_start_charging | 1 | {
"docstring": "Request to start charging the car. Used by the button platform.",
"language": "en",
"n_whitespaces": 10,
"n_words": 11,
"vocab_size": 10
} | 7 | 4 | Add button to start leaf charge (#62948)
Co-authored-by: Bruce Duncan <[email protected]> | 47 | 8 | async def async_start_charging(self) -> None:
await self.hass.async_add_executor_job(self.leaf.start_charging)
self.schedule_update()
| 8 | 26 | 308,815 |
|
Python | binary_sensor.py | 0c767bd0d37a41af37728b1d8b4eae8dceb7e188 | 31 | 105,270 | 9 | homeassistant/components/smappee/binary_sensor.py | core | https://github.com/home-assistant/core.git | 0 | async_update | 1 | {
"docstring": "Get the latest data from Smappee and update the state.",
"language": "en",
"n_whitespaces": 9,
"n_words": 10,
"vocab_size": 9
} | 6 | 4 | Improve entity type hints [s] (part 1/2) (#77881) | 45 | 10 | async def async_update(self) -> None:
await self._smappee_base.async_update()
self._state = self._service_location.is_present
| 10 | 25 | 306,486 |
|
Python | test_models.py | 103729c0855aad2f45fcaa2cf680799236f3e201 | 137 | 77,999 | 11 | netbox/dcim/tests/test_models.py | netbox | https://github.com/netbox-community/netbox.git | 0 | test_mount_half_u_devices | 1 | {
"docstring": "\n Check that two 0.5U devices can be mounted in the same rack unit.\n ",
"language": "en",
"n_whitespaces": 28,
"n_words": 13,
"vocab_size": 13
} | 21 | 12 | Add test for 0.5U devices | 196 | 30 | def test_mount_half_u_devices(self):
rack = Rack.objects.first()
attrs = {
'device_type': DeviceType.objects.get(u_height=0.5),
'device_role': DeviceRole.objects.first(),
'site': Site.objects.first(),
'rack': rack,
'face': DeviceFaceChoices.FACE_FRONT,
}
Device(name='Device 1', position=1, **attrs).save()
Device(name='Device 2', position=1.5, **attrs).save()
self.assertEqual(len(rack.get_available_units()), rack.u_height * 2 - 3)
| 33 | 121 | 265,126 |
|
Python | unittest.py | 922b771337f6d14a556fa761c783748f698e924b | 30 | 72,530 | 8 | tests/unittest.py | synapse | https://github.com/matrix-org/synapse.git | 0 | make_homeserver | 1 | {
"docstring": "\n Make and return a homeserver.\n\n Args:\n reactor: A Twisted Reactor, or something that pretends to be one.\n clock (synapse.util.Clock): The Clock, associated with the reactor.\n\n Returns:\n A homeserver suitable for testing.\n\n Function to be overridden in subclasses.\n ",
"language": "en",
"n_whitespaces": 106,
"n_words": 37,
"vocab_size": 34
} | 6 | 3 | Add missing type hints for tests.unittest. (#13397) | 32 | 8 | def make_homeserver(self, reactor, clock):
hs = self.setup_test_homeserver()
return hs
| 9 | 19 | 248,955 |
|
Python | query.py | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 | 177 | 51,188 | 13 | django/db/models/query.py | django | https://github.com/django/django.git | 0 | ordered | 7 | {
"docstring": "\n Return True if the QuerySet is ordered -- i.e. has an order_by()\n clause or a default ordering on the model (or is empty).\n ",
"language": "en",
"n_whitespaces": 45,
"n_words": 23,
"vocab_size": 21
} | 11 | 14 | Refs #33476 -- Reformatted code with Black. | 103 | 29 | def ordered(self):
if isinstance(self, EmptyQuerySet):
return True
if self.query.extra_order_by or self.query.order_by:
return True
elif (
self.query.default_ordering
and self.query.get_meta().ordering
and
# A default ordering doesn't affect GROUP BY queries.
not self.query.group_by
):
return True
else:
return False
| 36 | 63 | 205,746 |
|
Python | multiple_upload.py | d10f15e55806c6944827d801cd9c2d53f5da4186 | 53 | 15,887 | 11 | wagtail/admin/views/generic/multiple_upload.py | wagtail | https://github.com/wagtail/wagtail.git | 0 | get_invalid_response_data | 1 | {
"docstring": "\n Return the JSON response data for an invalid form submission\n ",
"language": "en",
"n_whitespaces": 25,
"n_words": 10,
"vocab_size": 10
} | 5 | 5 | Reformat with black | 54 | 10 | def get_invalid_response_data(self, form):
return {
"success": False,
"error_message": "\n".join(form.errors["file"]),
}
| 10 | 29 | 72,414 |
|
Python | cables.py | 6ff2e55ce408f0f7f2fe99129048421c25ecafe6 | 43 | 77,911 | 10 | netbox/dcim/models/cables.py | netbox | https://github.com/netbox-community/netbox.git | 0 | path_objects | 2 | {
"docstring": "\n Cache and return the complete path as lists of objects, derived from their annotation within the path.\n ",
"language": "en",
"n_whitespaces": 32,
"n_words": 17,
"vocab_size": 16
} | 5 | 4 | Add origins, destinations properties on CablePath | 50 | 10 | def path_objects(self):
if not hasattr(self, '_path_objects'):
self._path_objects = self._get_path()
return self._path_objects
| 11 | 28 | 264,915 |
|
Python | backend_wx.py | e1eca0aa8bf0b51009e012cd37d3e95f364d0ee9 | 448 | 22,898 | 13 | lib/matplotlib/backends/backend_wx.py | matplotlib | https://github.com/matplotlib/matplotlib.git | 0 | gui_repaint | 7 | {
"docstring": "\n Update the displayed image on the GUI canvas, using the supplied\n wx.PaintDC device context.\n\n The 'WXAgg' backend sets origin accordingly.\n ",
"language": "en",
"n_whitespaces": 49,
"n_words": 20,
"vocab_size": 18
} | 31 | 17 | Expire deprecations in backends | 350 | 121 | def gui_repaint(self, drawDC=None):
_log.debug("%s - gui_repaint()", type(self))
# The "if self" check avoids a "wrapped C/C++ object has been deleted"
# RuntimeError if doing things after window is closed.
if not (self and self.IsShownOnScreen()):
return
if not drawDC: # not called from OnPaint use a ClientDC
drawDC = wx.ClientDC(self)
# For 'WX' backend on Windows, the bitmap can not be in use by another
# DC (see GraphicsContextWx._cache).
bmp = (self.bitmap.ConvertToImage().ConvertToBitmap()
if wx.Platform == '__WXMSW__'
and isinstance(self.figure._cachedRenderer, RendererWx)
else self.bitmap)
drawDC.DrawBitmap(bmp, 0, 0)
if self._rubberband_rect is not None:
# Some versions of wx+python don't support numpy.float64 here.
x0, y0, x1, y1 = map(int, self._rubberband_rect)
drawDC.DrawLineList(
[(x0, y0, x1, y0), (x1, y0, x1, y1),
(x0, y0, x0, y1), (x0, y1, x1, y1)],
wx.Pen('BLACK', 1, wx.PENSTYLE_SHORT_DASH))
filetypes = {
**FigureCanvasBase.filetypes,
'bmp': 'Windows bitmap',
'jpeg': 'JPEG',
'jpg': 'JPEG',
'pcx': 'PCX',
'png': 'Portable Network Graphics',
'tif': 'Tagged Image Format File',
'tiff': 'Tagged Image Format File',
'xpm': 'X pixmap',
}
| 155 | 175 | 107,757 |
|
Python | utils.py | 540bba4544d9f31c126571cc1a45a6783b3b6a89 | 138 | 78,322 | 13 | netbox/utilities/utils.py | netbox | https://github.com/netbox-community/netbox.git | 0 | copy_safe_request | 4 | {
"docstring": "\n Copy selected attributes from a request object into a new fake request object. This is needed in places where\n thread safe pickling of the useful request data is needed.\n ",
"language": "en",
"n_whitespaces": 39,
"n_words": 29,
"vocab_size": 25
} | 16 | 16 | Closes #10920: Include request cookies when queuing a custom script | 158 | 43 | def copy_safe_request(request):
meta = {
k: request.META[k]
for k in HTTP_REQUEST_META_SAFE_COPY
if k in request.META and isinstance(request.META[k], str)
}
return NetBoxFakeRequest({
'META': meta,
'COOKIES': request.COOKIES,
'POST': request.POST,
'GET': request.GET,
'FILES': request.FILES,
'user': request.user,
'path': request.path,
'id': getattr(request, 'id', None), # UUID assigned by middleware
})
| 45 | 97 | 266,161 |
|
Python | test_product_filtering_and_sorting_with_channels.py | 3f773c3890aead936949bd6923d2d7f669e1c68f | 2,732 | 4,954 | 18 | saleor/graphql/product/tests/test_product_filtering_and_sorting_with_channels.py | @pytest.mark.parametrize(
"sort_by",
[
{"field": "PUBLISHED", "direction": "ASC"},
{"field": "PRICE", "direction": "DESC"},
{"field": "MINIMAL_PRICE", "direction": "DESC"},
{"field": "PUBLICATION_DATE", "direction": "DESC"},
],
) | saleor | https://github.com/saleor/saleor.git | 1 | products_for_sorting_with_channels | 1 | {
"docstring": "\n query ($sortBy: ProductOrder, $filter: ProductFilterInput, $channel: String){\n products (\n first: 10, sortBy: $sortBy, filter: $filter, channel: $channel\n ) {\n edges {\n node {\n name\n slug\n }\n }\n }\n }\n",
"language": "en",
"n_whitespaces": 157,
"n_words": 29,
"vocab_size": 24
} | 45 | 196 | Add sorting by LAST_MODIFIED_AT field to GraphQL schema (#9245)
* Add sorting by LAST_MODIFIED_AT to new types
* Add LAST_MODIFIED_AT to sorting exported files
* Update schema, fix variant sorter
* Update changelog
* Rebase and update changelog
Co-authored-by: Marcin Gębala <[email protected]> | 1,552 | 105 | def products_for_sorting_with_channels(category, channel_USD, channel_PLN):
product_type = ProductType.objects.create(name="Apple", kind=ProductTypeKind.NORMAL)
products = Product.objects.bulk_create(
[
Product(
name="Product1",
slug="prod1",
category=category,
product_type=product_type,
description=dummy_editorjs("Test description 1."),
),
Product(
name="ProductProduct1",
slug="prod_prod1",
category=category,
product_type=product_type,
),
Product(
name="ProductProduct2",
slug="prod_prod2",
category=category,
product_type=product_type,
),
Product(
name="Product2",
slug="prod2",
category=category,
product_type=product_type,
description=dummy_editorjs("Test description 2."),
),
Product(
name="Product3",
slug="prod3",
category=category,
product_type=product_type,
description=dummy_editorjs("Test description 3."),
),
]
)
ProductChannelListing.objects.bulk_create(
[
ProductChannelListing(
product=products[0],
channel=channel_USD,
is_published=True,
discounted_price_amount=Decimal(5),
publication_date=datetime.date(2002, 1, 1),
),
ProductChannelListing(
product=products[1],
channel=channel_USD,
is_published=True,
discounted_price_amount=Decimal(15),
publication_date=datetime.date(2000, 1, 1),
),
ProductChannelListing(
product=products[2],
channel=channel_USD,
is_published=False,
discounted_price_amount=Decimal(4),
publication_date=datetime.date(1999, 1, 1),
),
ProductChannelListing(
product=products[3],
channel=channel_USD,
is_published=True,
discounted_price_amount=Decimal(7),
publication_date=datetime.date(2001, 1, 1),
),
# Second channel
ProductChannelListing(
product=products[0],
channel=channel_PLN,
is_published=False,
discounted_price_amount=Decimal(15),
publication_date=datetime.date(2003, 1, 1),
),
ProductChannelListing(
product=products[1],
channel=channel_PLN,
is_published=True,
discounted_price_amount=Decimal(4),
publication_date=datetime.date(1999, 1, 1),
),
ProductChannelListing(
product=products[2],
channel=channel_PLN,
is_published=True,
discounted_price_amount=Decimal(5),
publication_date=datetime.date(2000, 1, 1),
),
ProductChannelListing(
product=products[4],
channel=channel_PLN,
is_published=True,
discounted_price_amount=Decimal(7),
publication_date=datetime.date(1998, 1, 1),
),
]
)
variants = ProductVariant.objects.bulk_create(
[
ProductVariant(
product=products[0],
sku=str(uuid.uuid4()).replace("-", ""),
track_inventory=True,
name="XS",
),
ProductVariant(
product=products[1],
sku=str(uuid.uuid4()).replace("-", ""),
track_inventory=True,
name="S",
),
ProductVariant(
product=products[2],
sku=str(uuid.uuid4()).replace("-", ""),
track_inventory=True,
name="M",
),
ProductVariant(
product=products[3],
sku=str(uuid.uuid4()).replace("-", ""),
track_inventory=True,
name="L",
),
ProductVariant(
product=products[4],
sku=str(uuid.uuid4()).replace("-", ""),
track_inventory=True,
name="XL",
),
]
)
ProductVariantChannelListing.objects.bulk_create(
[
ProductVariantChannelListing(
variant=variants[0],
channel=channel_USD,
price_amount=Decimal(10),
currency=channel_USD.currency_code,
),
ProductVariantChannelListing(
variant=variants[1],
channel=channel_USD,
price_amount=Decimal(15),
currency=channel_USD.currency_code,
),
ProductVariantChannelListing(
variant=variants[2],
channel=channel_USD,
price_amount=Decimal(8),
currency=channel_USD.currency_code,
),
ProductVariantChannelListing(
variant=variants[3],
channel=channel_USD,
price_amount=Decimal(7),
currency=channel_USD.currency_code,
),
# Second channel
ProductVariantChannelListing(
variant=variants[0],
channel=channel_PLN,
price_amount=Decimal(15),
currency=channel_PLN.currency_code,
),
ProductVariantChannelListing(
variant=variants[1],
channel=channel_PLN,
price_amount=Decimal(8),
currency=channel_PLN.currency_code,
),
ProductVariantChannelListing(
variant=variants[2],
channel=channel_PLN,
price_amount=Decimal(10),
currency=channel_PLN.currency_code,
),
ProductVariantChannelListing(
variant=variants[4],
channel=channel_PLN,
price_amount=Decimal(7),
currency=channel_PLN.currency_code,
),
]
)
products[3].save()
products[4].save()
products[0].save()
products[2].save()
products[1].save()
variants[2].save()
variants[0].save()
variants[4].save()
variants[1].save()
variants[3].save()
return products
QUERY_PRODUCTS_WITH_SORTING_AND_FILTERING =
@pytest.mark.parametrize(
"sort_by",
[
{"field": "PUBLISHED", "direction": "ASC"},
{"field": "PRICE", "direction": "DESC"},
{"field": "MINIMAL_PRICE", "direction": "DESC"},
{"field": "PUBLICATION_DATE", "direction": "DESC"},
],
) | 263 | 991 | 26,250 |
Python | test_build_ext.py | 8198943edd73a363c266633e1aa5b2a9e9c9f526 | 704 | 56,858 | 14 | python3.10.4/Lib/distutils/tests/test_build_ext.py | XX-Net | https://github.com/XX-net/XX-Net.git | 0 | _try_compile_deployment_target | 8 | {
"docstring": "\\\n #include <AvailabilityMacros.h>\n\n int dummy;\n\n #if TARGET %s MAC_OS_X_VERSION_MIN_REQUIRED\n #else\n #error \"Unexpected target\"\n #endif\n\n ",
"language": "en",
"n_whitespaces": 115,
"n_words": 14,
"vocab_size": 14
} | 47 | 55 | add python 3.10.4 for windows | 500 | 129 | def _try_compile_deployment_target(self, operator, target):
orig_environ = os.environ
os.environ = orig_environ.copy()
self.addCleanup(setattr, os, 'environ', orig_environ)
if target is None:
if os.environ.get('MACOSX_DEPLOYMENT_TARGET'):
del os.environ['MACOSX_DEPLOYMENT_TARGET']
else:
os.environ['MACOSX_DEPLOYMENT_TARGET'] = target
deptarget_c = os.path.join(self.tmp_dir, 'deptargetmodule.c')
with open(deptarget_c, 'w') as fp:
fp.write(textwrap.dedent( % operator))
# get the deployment target that the interpreter was built with
target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
target = tuple(map(int, target.split('.')[0:2]))
# format the target value as defined in the Apple
# Availability Macros. We can't use the macro names since
# at least one value we test with will not exist yet.
if target[:2] < (10, 10):
# for 10.1 through 10.9.x -> "10n0"
target = '%02d%01d0' % target
else:
# for 10.10 and beyond -> "10nn00"
if len(target) >= 2:
target = '%02d%02d00' % target
else:
# 11 and later can have no minor version (11 instead of 11.0)
target = '%02d0000' % target
deptarget_ext = Extension(
'deptarget',
[deptarget_c],
extra_compile_args=['-DTARGET=%s'%(target,)],
)
dist = Distribution({
'name': 'deptarget',
'ext_modules': [deptarget_ext]
})
dist.package_dir = self.tmp_dir
cmd = self.build_ext(dist)
cmd.build_lib = self.tmp_dir
cmd.build_temp = self.tmp_dir
try:
old_stdout = sys.stdout
if not support.verbose:
# silence compiler output
sys.stdout = StringIO()
try:
cmd.ensure_finalized()
cmd.run()
finally:
sys.stdout = old_stdout
except CompileError:
self.fail("Wrong deployment target during compilation")
| 196 | 288 | 223,085 |
|
Python | test_locking.py | 10dbbddaf35607e4257f50dd960520a1268dd225 | 216 | 17,037 | 11 | wagtail/snippets/tests/test_locking.py | wagtail | https://github.com/wagtail/wagtail.git | 0 | test_edit_post_locked_by_self | 1 | {
"docstring": "A user can edit a snippet that is locked by themselves.",
"language": "en",
"n_whitespaces": 10,
"n_words": 11,
"vocab_size": 11
} | 17 | 14 | Add tests for locking snippets | 142 | 45 | def test_edit_post_locked_by_self(self):
# Lock the snippet
self.lock_snippet(self.user)
# Try to edit the snippet
response = self.client.post(
self.get_url("edit"),
{"text": "Edited while locked"},
follow=True,
)
self.refresh_snippet()
# Should not show error message
self.assertNotContains(
response,
f"The {self.model_name} could not be saved as it is locked",
)
# Check that the snippet is still locked
self.assertTrue(self.snippet.locked)
# Check that the snippet is edited
self.assertEqual(self.snippet.text, "Edited while locked")
| 63 | 77 | 80,233 |
|
Python | test_advanced_4.py | 7f1bacc7dc9caf6d0ec042e39499bbf1d9a7d065 | 381 | 29,488 | 12 | python/ray/tests/test_advanced_4.py | ray | https://github.com/ray-project/ray.git | 0 | test_jemalloc_env_var_propagate | 1 | {
"docstring": "Test `propagate_jemalloc_env_var`\n If the shared library path is not specified,\n it should return an empty dict.\n \n When the shared library is specified\n \n When the malloc config is specified\n ",
"language": "en",
"n_whitespaces": 51,
"n_words": 28,
"vocab_size": 20
} | 20 | 57 | [CI] Format Python code with Black (#21975)
See #21316 and #21311 for the motivation behind these changes. | 420 | 52 | def test_jemalloc_env_var_propagate():
gcs_ptype = ray.ray_constants.PROCESS_TYPE_GCS_SERVER
expected = {}
actual = ray._private.services.propagate_jemalloc_env_var(
jemalloc_path="", jemalloc_conf="", jemalloc_comps=[], process_type=gcs_ptype
)
assert actual == expected
actual = ray._private.services.propagate_jemalloc_env_var(
jemalloc_path=None,
jemalloc_conf="a,b,c",
jemalloc_comps=[ray.ray_constants.PROCESS_TYPE_GCS_SERVER],
process_type=gcs_ptype,
)
assert actual == expected
library_path = "/abc"
expected = {"LD_PRELOAD": library_path}
actual = ray._private.services.propagate_jemalloc_env_var(
jemalloc_path=library_path,
jemalloc_conf="",
jemalloc_comps=[ray.ray_constants.PROCESS_TYPE_GCS_SERVER],
process_type=gcs_ptype,
)
assert actual == expected
# comps should be a list type.
with pytest.raises(AssertionError):
ray._private.services.propagate_jemalloc_env_var(
jemalloc_path=library_path,
jemalloc_conf="",
jemalloc_comps="ray.ray_constants.PROCESS_TYPE_GCS_SERVER,",
process_type=gcs_ptype,
)
# When comps don't match the process_type, it should return an empty dict.
expected = {}
actual = ray._private.services.propagate_jemalloc_env_var(
jemalloc_path=library_path,
jemalloc_conf="",
jemalloc_comps=[ray.ray_constants.PROCESS_TYPE_RAYLET],
process_type=gcs_ptype,
)
library_path = "/abc"
malloc_conf = "a,b,c"
expected = {"LD_PRELOAD": library_path, "MALLOC_CONF": malloc_conf}
actual = ray._private.services.propagate_jemalloc_env_var(
jemalloc_path=library_path,
jemalloc_conf=malloc_conf,
jemalloc_comps=[ray.ray_constants.PROCESS_TYPE_GCS_SERVER],
process_type=gcs_ptype,
)
assert actual == expected
| 114 | 258 | 131,233 |
|
Python | models.py | 1636508a6ac8df6b93d0ea5c621c174f605fd47a | 37 | 77,785 | 13 | netbox/users/models.py | netbox | https://github.com/netbox-community/netbox.git | 0 | create_userconfig | 3 | {
"docstring": "\n Automatically create a new UserConfig when a new User is created. Skip this if importing a user from a fixture.\n ",
"language": "en",
"n_whitespaces": 27,
"n_words": 20,
"vocab_size": 16
} | 12 | 4 | Fixes #9156: Fix loading UserConfig data from fixtures | 71 | 18 | def create_userconfig(instance, created, raw=False, **kwargs):
if created and not raw:
config = get_config()
UserConfig(user=instance, data=config.DEFAULT_USER_PREFERENCES).save()
#
# REST API
#
| 20 | 42 | 264,682 |
|
Python | pytables.py | 7d2f9b8d59908fbf57c6453bc41891efbfe981a6 | 181 | 39,982 | 12 | pandas/io/pytables.py | pandas | https://github.com/pandas-dev/pandas.git | 0 | validate_attr | 6 | {
"docstring": "validate that we have the same order as the existing & same dtype",
"language": "en",
"n_whitespaces": 12,
"n_words": 13,
"vocab_size": 11
} | 13 | 11 | TYP: some return annotations in pytables.py (#47512) | 124 | 34 | def validate_attr(self, append) -> None:
if append:
existing_fields = getattr(self.attrs, self.kind_attr, None)
if existing_fields is not None and existing_fields != list(self.values):
raise ValueError("appended items do not match existing items in table!")
existing_dtype = getattr(self.attrs, self.dtype_attr, None)
if existing_dtype is not None and existing_dtype != self.dtype:
raise ValueError(
"appended items dtype do not match existing items dtype in table!"
)
| 59 | 78 | 167,375 |
|
Python | external.py | cb2713e7050f2783493736e43a6b704865ce61c5 | 165 | 43,144 | 12 | gradio/external.py | gradio | https://github.com/gradio-app/gradio.git | 0 | load_blocks_from_repo | 2 | {
"docstring": "Creates and returns a Blocks instance from several kinds of Hugging Face repos:\n 1) A model repo\n 2) A Spaces repo running Gradio 2.x\n 3) A Spaces repo running Gradio 3.x\n ",
"language": "en",
"n_whitespaces": 43,
"n_words": 31,
"vocab_size": 24
} | 17 | 15 | Getting Interface.load() working for 2.x and 3.x models and Spaces (#1361)
* version
* refactor for model and 2.x spaces
* fixing tests
* fixed tests
* getting there...
* formatting
* formatting
* fixes
* formatting
* external dependencies working
* formatting
* loading from 3.x
* changes
* wow finally it's working
* fixed formatting
* better error for spaces
* better error for spaces
* fixed 3.x bug
* formatting | 167 | 61 | def load_blocks_from_repo(name, src=None, api_key=None, alias=None, **kwargs):
if src is None:
tokens = name.split(
"/"
) # Separate the source (e.g. "huggingface") from the repo name (e.g. "google/vit-base-patch16-224")
assert (
len(tokens) > 1
), "Either `src` parameter must be provided, or `name` must be formatted as {src}/{repo name}"
src = tokens[0]
name = "/".join(tokens[1:])
assert src.lower() in factory_methods, "parameter: src must be one of {}".format(
factory_methods.keys()
)
blocks: gradio.Blocks = factory_methods[src](name, api_key, alias, **kwargs)
return blocks
| 75 | 104 | 180,326 |
|
Python | versioncontrol.py | f638f5d0e6c8ebed0e69a6584bc7f003ec646580 | 257 | 12,562 | 10 | .venv/lib/python3.8/site-packages/pip/_internal/vcs/versioncontrol.py | transferlearning | https://github.com/jindongwang/transferlearning.git | 0 | get_backend_for_dir | 4 | {
"docstring": "\n Return a VersionControl object if a repository of that type is found\n at the given directory.\n ",
"language": "en",
"n_whitespaces": 38,
"n_words": 16,
"vocab_size": 15
} | 16 | 13 | upd; format | 126 | 67 | def get_backend_for_dir(self, location):
# type: (str) -> Optional[VersionControl]
vcs_backends = {}
for vcs_backend in self._registry.values():
repo_path = vcs_backend.get_repository_root(location)
if not repo_path:
continue
logger.debug('Determine that %s uses VCS: %s',
location, vcs_backend.name)
vcs_backends[repo_path] = vcs_backend
if not vcs_backends:
return None
# Choose the VCS in the inner-most directory. Since all repository
# roots found here would be either `location` or one of its
# parents, the longest path should have the most path components,
# i.e. the backend representing the inner-most repository.
inner_most_repo_path = max(vcs_backends, key=len)
return vcs_backends[inner_most_repo_path]
| 86 | 75 | 61,419 |
|
Python | canvas.py | 3a7a82af9588629dad5807e0862bacbbd5d7a7f2 | 17 | 52,267 | 8 | celery/canvas.py | celery | https://github.com/celery/celery.git | 0 | _stamp_regen_task | 1 | {
"docstring": "When stamping a sequence of tasks created by a generator,\n we use this function to stamp each task in the generator\n without exhausting it.",
"language": "en",
"n_whitespaces": 29,
"n_words": 24,
"vocab_size": 23
} | 5 | 3 | Canvas.py doc enhancement (#7889)
* Enhanced doc for canvas.maybe_unroll_group()
* Enhanced doc for canvas._stamp_regen_task()
* Enhanced doc for canvas._merge_dictionaries() | 39 | 8 | def _stamp_regen_task(task, visitor, **headers):
task.stamp(visitor=visitor, **headers)
return task
| 8 | 24 | 208,258 |
|
Python | context.py | 11e1a8a3fa8d13513fe926b731fb907a066af2a1 | 662 | 46,847 | 15 | src/pandas_profiling/visualisation/context.py | ydata-profiling | https://github.com/ydataai/ydata-profiling.git | 0 | manage_matplotlib_context | 2 | {
"docstring": "Return a context manager for temporarily changing matplotlib unit registries and rcParams.",
"language": "en",
"n_whitespaces": 11,
"n_words": 12,
"vocab_size": 12
} | 19 | 62 | fix: change context managed backend (#1149) | 503 | 139 | def manage_matplotlib_context() -> Any:
originalRcParams = matplotlib.rcParams.copy()
# Credits for this style go to the ggplot and seaborn packages.
# We copied the style file to remove dependencies on the Seaborn package.
# Check it out, it's an awesome library for plotting
customRcParams = {
"patch.facecolor": "#348ABD", # blue
"patch.antialiased": True,
"font.size": 10.0,
"figure.edgecolor": "0.50",
# Seaborn common parameters
"figure.facecolor": "white",
"text.color": ".15",
"axes.labelcolor": ".15",
"legend.numpoints": 1,
"legend.scatterpoints": 1,
"xtick.direction": "out",
"ytick.direction": "out",
"xtick.color": ".15",
"ytick.color": ".15",
"axes.axisbelow": True,
"image.cmap": "Greys",
"font.family": ["sans-serif"],
"font.sans-serif": [
"Arial",
"Liberation Sans",
"Bitstream Vera Sans",
"sans-serif",
],
"grid.linestyle": "-",
"lines.solid_capstyle": "round",
# Seaborn darkgrid parameters
# .15 = dark_gray
# .8 = light_gray
"axes.grid": True,
"axes.facecolor": "#EAEAF2",
"axes.edgecolor": "white",
"axes.linewidth": 0,
"grid.color": "white",
# Seaborn notebook context
"figure.figsize": [8.0, 5.5],
"axes.labelsize": 11,
"axes.titlesize": 12,
"xtick.labelsize": 10,
"ytick.labelsize": 10,
"legend.fontsize": 10,
"grid.linewidth": 1,
"lines.linewidth": 1.75,
"patch.linewidth": 0.3,
"lines.markersize": 7,
"lines.markeredgewidth": 0,
"xtick.major.width": 1,
"ytick.major.width": 1,
"xtick.minor.width": 0.5,
"ytick.minor.width": 0.5,
"xtick.major.pad": 7,
"ytick.major.pad": 7,
"backend": "agg",
}
try:
register_matplotlib_converters()
matplotlib.rcParams.update(customRcParams)
sns.set_style(style="white")
yield
finally:
deregister_matplotlib_converters() # revert to original unit registries
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=matplotlib.cbook.mplDeprecation)
matplotlib.rcParams.update(originalRcParams) # revert to original rcParams
| 184 | 273 | 191,835 |
|
Python | test_gen_backend_stubs.py | bb5b4cceb6f737448eaaa6817cd773b6f4b0e77d | 32 | 21,490 | 8 | tools/test/test_gen_backend_stubs.py | pytorch | https://github.com/pytorch/pytorch.git | 0 | test_empty_backend | 1 | {
"docstring": "\\\nbackend:\ncpp_namespace: torch_xla\nsupported:\n- absYou must provide a value for \"backend\"",
"language": "en",
"n_whitespaces": 8,
"n_words": 13,
"vocab_size": 13
} | 6 | 8 | Revert "Revert D32498569: allow external backend codegen to toggle whether to generate out= and inplace kernels" (#69950)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69950
This reverts commit f6cad53443704dfe5a20cc62bee14d91e3bffcaa.
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D33113545
Pulled By: bdhirsh
fbshipit-source-id: d6590294662588d36c09662dea65919ad4e1e288 | 47 | 10 | def test_empty_backend(self) -> None:
yaml_str =
output_error = self.get_errors_from_gen_backend_stubs(yaml_str)
self.assertExpectedInline(output_error, )
| 11 | 26 | 102,175 |
|
Python | algorithm.py | e368dd9b4e10026767df66d1811a92bd8ca2d8f9 | 150 | 30,913 | 12 | rllib/algorithms/algorithm.py | ray | https://github.com/ray-project/ray.git | 0 | _run_offline_evaluation | 3 | {
"docstring": "Runs offline evaluation via `OfflineEvaluator.estimate_on_dataset()` API.\n\n This method will be used when `evaluation_dataset` is provided.\n Note: This will only work if the policy is a single agent policy.\n\n Returns:\n The results dict from the offline evaluation call.\n ",
"language": "en",
"n_whitespaces": 76,
"n_words": 37,
"vocab_size": 31
} | 17 | 12 | [RLlib] By-pass Evaluation workers when doing OPE (#30135)
Signed-off-by: Kourosh Hakhamaneshi <[email protected]> | 121 | 26 | def _run_offline_evaluation(self):
assert len(self.workers.local_worker().policy_map) == 1
parallelism = self.evaluation_config.evaluation_num_workers or 1
offline_eval_results = {"off_policy_estimator": {}}
for evaluator_name, offline_evaluator in self.reward_estimators.items():
offline_eval_results["off_policy_estimator"][
evaluator_name
] = offline_evaluator.estimate_on_dataset(
self.evaluation_dataset,
n_parallelism=parallelism,
)
return offline_eval_results
| 30 | 74 | 136,419 |
End of preview. Expand
in Dataset Viewer.
No dataset card yet
New: Create and edit this dataset card directly on the website!
Contribute a Dataset Card- Downloads last month
- 20