code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
import pandas as pd import os import datetime def get_data(data_name, columns=None, start_time='2016-01-01', end_time='2021-01-01', frequency=1): base_data_names = ['adj_close_price', 'adj_open_price', 'adj_high_price', 'adj_low_price', 'volume', 'value', 'openint'] base_columns = ['IF'...
/sc-backtest-0.1.14.tar.gz/sc-backtest-0.1.14/sc_backtest/data_set.py
0.40251
0.359477
data_set.py
pypi
import asyncio import aiohttp from dataclasses import dataclass, field from requests import post from sc_cc_ng_models_python import ContextFilter, BitVal from typing import List, Optional, Any from enum import Enum from itertools import chain from more_itertools import batched from functools import reduce @dataclass ...
/sc_cc_ng_sdk_python-0.2.1.tar.gz/sc_cc_ng_sdk_python-0.2.1/sc_cc_ng_sdk_python/__init__.py
0.843799
0.266656
__init__.py
pypi
import lzma from sc_compression.signatures import Signatures, get_signature from sc_compression.utils.reader import Reader try: import lzham except ImportError: from platform import system as get_system_name lzham = None if get_system_name() == 'Windows': from sc_compression.support.lzham imp...
/sc_compression-0.6.1-py3-none-any.whl/sc_compression/decompressor.py
0.50293
0.187542
decompressor.py
pypi
import lzma from hashlib import md5 from sc_compression.signatures import Signatures from sc_compression.utils.writer import Writer try: import lzham except ImportError: from platform import system as get_system_name lzham = None if get_system_name() == 'Windows': from sc_compression.support....
/sc_compression-0.6.1-py3-none-any.whl/sc_compression/compressor.py
0.49585
0.242794
compressor.py
pypi
class Writer: def __init__(self, endian: str = 'big'): super(Writer, self).__init__() self.endian = endian self.buffer = b'' def write(self, data: bytes): self.buffer += data def writeUInteger(self, integer: int, length: int = 1): self.buffer += integer.to_bytes(len...
/sc_compression-0.6.1-py3-none-any.whl/sc_compression/utils/writer.py
0.648466
0.37605
writer.py
pypi
class Reader: def __init__(self, buffer: bytes, endian: str = 'big'): self.buffer = buffer self.endian = endian self.i = 0 def read(self, length: int = 1): result = self.buffer[self.i:self.i + length] self.i += length return result def readUInteger(self, le...
/sc_compression-0.6.1-py3-none-any.whl/sc_compression/utils/reader.py
0.765243
0.334698
reader.py
pypi
from copy import deepcopy from functools import partial, update_wrapper from typing import Callable, Dict, Hashable, Tuple, Optional, Union, List import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd from dandelion.external.nxviz import encodings, lines from dandelion.external.n...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/edges.py
0.90928
0.423875
edges.py
pypi
from functools import partial, update_wrapper from typing import Dict, Hashable, Union, Optional, List import matplotlib.pyplot as plt import numpy as np import pandas as pd import networkx as nx from matplotlib.cm import ScalarMappable from matplotlib.colors import Normalize from matplotlib.patches import Patch, Rect...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/annotate.py
0.953079
0.652823
annotate.py
pypi
from typing import Dict, Hashable import numpy as np import pandas as pd from dandelion.external.nxviz.geometry import circos_radius, item_theta from dandelion.external.nxviz.polcart import to_cartesian from dandelion.external.nxviz.utils import group_and_sort def parallel( nt: pd.DataFrame, group_by: Hashable,...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/layouts.py
0.893646
0.598459
layouts.py
pypi
from itertools import product from typing import Dict, Iterable, List import numpy as np import pandas as pd from matplotlib.patches import Arc, Circle, Patch, Path, PathPatch from dandelion.external.nxviz.geometry import correct_hive_angles from dandelion.external.nxviz.polcart import to_cartesian, to_polar, to_radi...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/lines.py
0.832237
0.558929
lines.py
pypi
from copy import deepcopy from functools import partial, update_wrapper from typing import Callable, Dict, Hashable, Optional, Tuple, Union, List import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd from matplotlib.patches import Circle from dandelion.external.nxviz import enc...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/nodes.py
0.919715
0.446434
nodes.py
pypi
import warnings from functools import partial, update_wrapper from itertools import combinations from typing import Callable, Hashable import matplotlib.pyplot as plt import networkx as nx import numpy as np from dandelion.external.nxviz import annotate, api, utils ### Iterators to generate subgraphs. def hive_trip...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/facet.py
0.862757
0.518973
facet.py
pypi
from collections import Counter import pandas as pd import warnings from typing import Iterable def is_data_homogenous(data_container: Iterable): """ Checks that all of the data in the container are of the same Python data type. This function is called in every other function below, and as such need ...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/utils.py
0.860896
0.705214
utils.py
pypi
from functools import partial from typing import Callable, Tuple, Optional, Union, Dict, List from itertools import cycle import numpy as np import pandas as pd from matplotlib.cm import get_cmap from matplotlib.colors import ListedColormap, Normalize, BoundaryNorm from palettable.colorbrewer import qualitative, sequ...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/encodings.py
0.949153
0.586967
encodings.py
pypi
from functools import partial, update_wrapper from typing import Callable, Dict, Hashable, Optional, Union, List import matplotlib.pyplot as plt import networkx as nx import numpy as np from dandelion.external.nxviz import edges, nodes from dandelion.external.nxviz.plots import aspect_equal, despine # This docstring...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/api.py
0.852736
0.438304
api.py
pypi
from typing import Callable, Hashable from networkx.drawing import layout from dandelion.external.nxviz import layouts, lines, utils from matplotlib.patches import Circle, Rectangle import matplotlib.pyplot as plt from functools import partial, update_wrapper import numpy as np import pandas as pd from copy import de...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/highlights.py
0.829803
0.251303
highlights.py
pypi
import numpy as np from .polcart import to_cartesian from typing import List, Hashable def item_theta(itemlist: List[Hashable], item: Hashable): """ Maps node to an angle in radians. :param itemlist: Item list from the graph. :param item: The item of interest. Must be in the itemlist. :returns: ...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/dandelion/external/nxviz/geometry.py
0.954287
0.737276
geometry.py
pypi
"""changeo clonotypes script""" import argparse import dandelion as ddl import os import scanpy from scanpy import logging as logg scanpy.settings.verbosity = 3 def parse_args(): """Parse command line arguments.""" parser = argparse.ArgumentParser() parser.add_argument( "--h5ddl", require...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/container/changeo_clonotypes.py
0.636692
0.164886
changeo_clonotypes.py
pypi
# Interoperability with `scirpy` ![dandelion_logo](img/dandelion_logo_illustration.png) It is now possible to convert the file formats between `dandelion>=0.1.1` and `scirpy>=0.6.2` [[Sturm2020]](https://academic.oup.com/bioinformatics/article/36/18/4817/5866543) to enhance the collaboration between the analysis toolk...
/sc-dandelion-0.3.2.tar.gz/sc-dandelion-0.3.2/docs/notebooks/1c_dandelion_scirpy.ipynb
0.424054
0.937555
1c_dandelion_scirpy.ipynb
pypi
import pandas as pd from config42 import ConfigManager from sc_analyzer_base import BaseSummaryDiffAnalyzer class BranchSummaryGroupByBranchDiffAnalyzer(BaseSummaryDiffAnalyzer): """ 机构汇总(按机构分组)差异分析类 """ def __init__(self, *, config: ConfigManager, is_first_analyzer=False): self._branch_orde...
/sc_diff_analysis-0.0.28-py3-none-any.whl/sc_diff_analysis/analyzer/branch_summary_group_by_branch_diff_analyzer.py
0.420719
0.164248
branch_summary_group_by_branch_diff_analyzer.py
pypi
# Copyright (c) 2018, Cabral, Juan; Luczywo, Nadia; Zanazi Jose Luis # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, thi...
/sc-drv-0.2.1.tar.gz/sc-drv-0.2.1/sc_drv/method.py
0.733261
0.155751
method.py
pypi
# flake8: noqa # ============================================================================= # DOCS # ============================================================================= """From Matplotlib documentation - URL: https://matplotlib.org/gallery/images_contours_and_fields/image_annotated_heatmap.html - Lice...
/sc-drv-0.2.1.tar.gz/sc-drv-0.2.1/sc_drv/libs/heatmap.py
0.877608
0.712757
heatmap.py
pypi
# Battle Cats Save File Editor [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M53M4MN) A python save editor for the mobile game The Battle Cats Join the [discord server](https://discord.gg/DvmMgvn5ZB) if you want to suggest new features, report bugs or get help on how to use the editor (pl...
/sc-editor-1.93.tar.gz/sc-editor-1.93/README.md
0.551815
0.735024
README.md
pypi
import struct from typing import Any, Union import dateutil.parser from . import helper, parse_save def write( save_data: list[int], number: Union[dict[str, int], int], length: Union[int, None] = None, ) -> list[int]: """Writes a little endian number to the save data""" if length is None and is...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/serialise_save.py
0.727879
0.3333
serialise_save.py
pypi
import filecmp import json from multiprocessing import Process import os import shutil import sys import time from typing import Any, Callable, Generator, Optional, Union import colored # type: ignore from . import ( user_input_handler, server_handler, patcher, serialise_save, parse_save, con...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/helper.py
0.599954
0.167968
helper.py
pypi
import collections import datetime import enum import json import struct import traceback from typing import Any, Optional, Union from . import helper from . import updater address = 0 save_data_g = None def re_order(data: dict[str, Any]) -> collections.OrderedDict[str, Any]: """Move all unknown vals to the b...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/parse_save.py
0.708213
0.365598
parse_save.py
pypi
from typing import Optional, Union from . import ( managed_item, user_input_handler, helper, locale_handler, config_manager, user_info, ) class Bannable: def __init__( self, type: "managed_item.ManagedItemType", inquiry_code: str, work_around: str = "", ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/item.py
0.85186
0.157234
item.py
pypi
import os from typing import Optional import requests from . import helper URL = "https://raw.githubusercontent.com/fieryhenry/BCData/master/" def download_file( game_version: str, pack_name: str, file_name: str, get_data: bool = True, print_progress: bool = True, ) -> bytes: """ Downloa...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/game_data_getter.py
0.800692
0.283066
game_data_getter.py
pypi
import json from typing import Any from . import config_manager, managed_item, helper import os class ManagedItems: def __init__(self, managed_items: dict[managed_item.ManagedItemType, int]): self.managed_items = managed_items def to_dict(self) -> dict[str, int]: """Convert to dict""" ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/user_info.py
0.572245
0.18954
user_info.py
pypi
import os import subprocess from typing import Optional from . import helper def get_data_path() -> str: """ Get the data path Returns: str: The data path """ return "/data/data/" def get_installed_battlecats_versions() -> Optional[list[str]]: """ Get a list of installed battle ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/root_handler.py
0.684791
0.23421
root_handler.py
pypi
import subprocess from typing import Any, Optional import requests from . import config_manager, helper def update(latest_version: str, command: str = "py") -> bool: """Update pypi package testing for py and python""" helper.colored_text("Updating...", base=helper.GREEN) try: full_cmd = f"{com...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/updater.py
0.767646
0.178633
updater.py
pypi
import enum import os import re import subprocess from typing import Union from . import helper, user_input_handler, config_manager class ADBExceptionTypes(enum.Enum): """ADB exception types""" NO_DEVICE = enum.auto() DEVICE_OFFLINE = enum.auto() PATH_NOT_FOUND = enum.auto() ADB_NOT_INSTALLED =...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/adb_handler.py
0.611034
0.161949
adb_handler.py
pypi
from typing import Any, Union from . import ( helper, user_input_handler, config_manager, ) from .edits import basic, cats, gamototo, levels, other, save_management def fix_elsewhere_old(save_stats: dict[str, Any]) -> dict[str, Any]: """Fix the elsewhere error using 2 save files""" main_token =...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/feature_handler.py
0.490968
0.286512
feature_handler.py
pypi
from typing import Any, Optional, Tuple, Union from . import helper, locale_handler def handle_all_at_once( ids: list[int], all_at_once: bool, data: list[int], names: list[Any], item_name: str, group_name: str, explain_text: str = "", ) -> list[int]: """Handle all at once option""" ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/user_input_handler.py
0.776835
0.211753
user_input_handler.py
pypi
from typing import Any, Union from ... import helper, user_input_handler from . import cat_id_selector, cat_helper def set_level_caps(save_stats: dict[str, Any]) -> dict[str, Any]: """ Set the level caps for the cats Args: save_stats (dict[str, Any]): The save stats Returns: dict[st...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/cats/upgrade_cats.py
0.737064
0.191649
upgrade_cats.py
pypi
from typing import Any from ... import helper, user_input_handler, csv_handler, game_data_getter from . import cat_id_selector def set_t_ids(save_stats: dict[str, Any]) -> dict[str, Any]: """handler for editing treasure ids""" unit_drops_stats = save_stats["unit_drops"] data = get_data(helper.check_dat...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/cats/chara_drop.py
0.651355
0.29988
chara_drop.py
pypi
from typing import Any from ... import helper, csv_handler, game_data_getter from . import cat_id_selector def get_evolve(save_stats: dict[str, Any]) -> dict[str, Any]: """Handler for evolving cats""" cat_ids = cat_id_selector.select_cats(save_stats) return evolve_handler_ids( save_stats=save_st...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/cats/evolve_cats.py
0.587707
0.238196
evolve_cats.py
pypi
import os from multiprocessing import Process from typing import Any, Callable, Optional from ... import ( csv_handler, game_data_getter, helper, user_input_handler, ) from ..levels import treasures from . import cat_helper def select_cats(save_stats: dict[str, Any], current: bool = True) -> list[i...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/cats/cat_id_selector.py
0.713731
0.24168
cat_id_selector.py
pypi
from typing import Any, Optional from ... import helper, item, csv_handler, game_data_getter, user_input_handler from . import cat_id_selector def get_talent_data(save_stats: dict[str, Any]) -> Optional[dict[Any, Any]]: """Get talent data for all cats""" file_data = game_data_getter.get_file_latest( ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/cats/talents.py
0.732974
0.187802
talents.py
pypi
from typing import Any, Optional from ... import csv_handler, game_data_getter, helper from ..levels import main_story, uncanny TYPES = [ "Normal", "Special", "Rare", "Super Rare", "Uber Super Rare", "Legend Rare", ] def get_level_cap_increase_amount(cat_base_level: int) -> int: """ ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/cats/cat_helper.py
0.85555
0.324075
cat_helper.py
pypi
from typing import Any, Optional from ... import user_input_handler, server_handler, helper, adb_handler from ..levels import clear_tutorial def select(save_stats: dict[str, Any]) -> dict[str, Any]: helper.check_changes(None) options = [ "Download save data from the game using transfer and confirmatio...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/save_management/load.py
0.617167
0.293886
load.py
pypi
from typing import Any from ... import helper, serialise_save, patcher, adb_handler, root_handler def save(save_stats: dict[str, Any]) -> dict[str, Any]: """Serialise the save data and exit""" save_data = serialise_save.start_serialize(save_stats) helper.write_save_data( save_data, save_stats["...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/save_management/save.py
0.737253
0.188063
save.py
pypi
from typing import Any from ... import helper, serialise_save, server_handler, user_info def upload_metadata(save_stats: dict[str, Any]) -> dict[str, Any]: """Upload the metadata to the game server""" _, save_stats = server_handler.meta_data_upload_handler( save_stats, helper.get_save_path() ) ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/save_management/server_upload.py
0.664105
0.186817
server_upload.py
pypi
from typing import Any, Optional from ... import game_data_getter, helper, item, user_input_handler def get_boundaries(is_jp: bool) -> Optional[list[int]]: """ Returns the xp requirements for each level Args: is_jp (bool): If the save file is japanese Returns: list[int]: The xp requ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/other/cat_shrine.py
0.865253
0.321846
cat_shrine.py
pypi
from typing import Any, Optional from ... import user_input_handler, game_data_getter, csv_handler, helper def get_mission_conditions(is_jp: bool) -> Optional[dict[Any, Any]]: """Get the mission data and what you need to do to complete it""" file_data = game_data_getter.get_file_latest( "DataLocal",...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/other/missions.py
0.740925
0.260251
missions.py
pypi
from typing import Any from ... import csv_handler, game_data_getter, helper, user_input_handler def get_item_names(is_jp: bool) -> list[str]: """Get the item names Args: is_jp (bool): If the data is for jp Returns: list[str]: The item names """ item_names = game_data_getter.get...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/other/scheme_item.py
0.794305
0.240351
scheme_item.py
pypi
import json from typing import Any, Optional from SC_Editor import game_data_getter, csv_handler, helper, user_input_handler class RawOrbInfo: def __init__( self, orb_id: int, grade_id: int, effect_id: int, value: list[int], attribute_id: int, ): """Init...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/basic/talent_orbs_new.py
0.869936
0.156652
talent_orbs_new.py
pypi
from typing import Any from ... import item, managed_item def edit_cat_food(save_stats: dict[str, Any]) -> dict[str, Any]: """Handler for editing cat food""" cat_food = item.IntItem( name="고양이 통조림", value=item.Int(save_stats["cat_food"]["Value"]), max_value=45000, bannable=ite...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/basic/basic_items.py
0.656878
0.34183
basic_items.py
pypi
from typing import Any from ... import helper, user_input_handler def edit_all_orbs(save_stats: dict[str, Any], orb_list: list[str]) -> dict[str, Any]: """Handler for editing all talent orbs""" val = user_input_handler.colored_input( "What do you want to set the value of all talent orbs to?:" )...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/basic/talent_orbs.py
0.526586
0.261997
talent_orbs.py
pypi
from typing import Any, Optional from ... import item, game_data_getter, helper def get_gamatoto_helpers(is_jp: bool) -> Optional[dict[str, Any]]: """Get the rarities of all gamatoto helpers""" if is_jp: country_code = "ja" else: country_code = "en" file_data = game_data_getter.get_...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/gamototo/helpers.py
0.686895
0.292248
helpers.py
pypi
from typing import Any, Optional from ... import helper, user_input_handler, item, game_data_getter def get_boundaries(is_jp: bool) -> Optional[list[int]]: """Get the xp requirements for each level""" file_data = game_data_getter.get_file_latest( "DataLocal", "GamatotoExpedition.csv", is_jp ) ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/gamototo/gamatoto_xp.py
0.747063
0.310342
gamatoto_xp.py
pypi
from typing import Any from ... import user_input_handler, helper from ...edits.other import meow_medals def set_stage_data( stage_data_edit: dict[str, Any], stage_id: int, stars: int, lengths: dict[str, int], unlock_next: bool, ) -> dict[str, Any]: """Set the stage data for a stage""" i...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/levels/event_stages.py
0.584508
0.249807
event_stages.py
pypi
from typing import Optional from ... import user_input_handler, helper from . import main_story def select_specific_chapters() -> list[int]: """Select specific levels""" print("What chapters do you want to select?") ids = user_input_handler.select_not_inc(main_story.CHAPTERS, "clear") return ids d...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/levels/story_level_id_selector.py
0.785144
0.259842
story_level_id_selector.py
pypi
from typing import Any, Optional from ... import user_input_handler, helper from . import main_story def get_available_chapters(outbreaks: dict[int, Any]) -> list[str]: """Get available chapters""" available_chapters: list[str] = [] for chapter_index in outbreaks: if chapter_index > 2: ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/levels/outbreaks.py
0.707101
0.255367
outbreaks.py
pypi
from typing import Any from ... import helper from . import story_level_id_selector CHAPTERS = [ "Empire of Cats 1", "Empire of Cats 2", "Empire of Cats 3", "Into the Future 1", "Into the Future 2", "Into the Future 3", "Cats of the Cosmos 1", "Cats of the Cosmos 2", "Cats of the ...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/levels/main_story.py
0.708717
0.383295
main_story.py
pypi
from typing import Any, Optional from ... import helper, user_input_handler, item, csv_handler, game_data_getter from . import story_level_id_selector, main_story def get_stages(is_jp: bool) -> Optional[list[list[list[int]]]]: """Get what stages belong to which treasure group""" treasures_values: list[list[...
/sc-editor-1.93.tar.gz/sc-editor-1.93/src/SC_Editor/edits/levels/treasures.py
0.656768
0.171234
treasures.py
pypi
from githooks.base_check import BaseCheck, Severity from githooks.config import config from githooks.git import CommittedFile class CommittedFileCheck(BaseCheck): """Parent class for checks on a single committed file To check the files, we have to clone ourselves when we are being prepared for the Commit...
/sc-githooks-0.2.0.tar.gz/sc-githooks-0.2.0/githooks/file_checks.py
0.466603
0.154121
file_checks.py
pypi
from os.path import isabs, join as joinpath, normpath from subprocess import check_output from githooks.utils import get_exe_path, get_extension, decode_str git_exe_path = get_exe_path('git') class CommitList(list): """Routines on a list of sequential commits""" ref_path = None def __init__(self, other...
/sc-githooks-0.2.0.tar.gz/sc-githooks-0.2.0/githooks/git.py
0.581541
0.154217
git.py
pypi
import logging class Handler(object): """The root handler""" def handle(self, data): return True class BaseHandler(Handler): """Base handler for decorating use""" _handler: Handler = None def __init__(self, handler: Handler = None) -> None: self._handler = handler @proper...
/sc-gitlab-msg-consumer-0.0.2.tar.gz/sc-gitlab-msg-consumer-0.0.2/consumer/handlers.py
0.720663
0.247325
handlers.py
pypi
import decimal import json import logging from sc_config.config import Config from sc_utilities import Singleton from .configs.default import DEFAULT_CONFIG class ConfigUtils(metaclass=Singleton): """ 配置文件相关工具类 """ _config = None def __init__(self): pass @classmethod def load_...
/sc_gz_dashboard-0.0.14-py3-none-any.whl/sc_gz_dashboard/utils.py
0.422266
0.160825
utils.py
pypi
import logging import pandas as pd from sc_analyzer_base import BranchUtils from sc_utilities import Singleton, calculate_column_index class ManifestUtils(metaclass=Singleton): """ 花名册相关工具类 """ # 名单DataFrame _df: pd.DataFrame = None # 花名册姓名与所在部门对应关系DataFrame _name_branch_df: pd.DataFrame ...
/sc_inclusive_analysis-0.0.4-py3-none-any.whl/sc_inclusive/manifest_utils.py
0.409457
0.171338
manifest_utils.py
pypi
import logging import pandas as pd from sc_analyzer_base import BranchUtils from sc_utilities import Singleton, calculate_column_index class ManifestUtils(metaclass=Singleton): """ 花名册相关工具类 """ # 名单DataFrame _df: pd.DataFrame = None # 花名册姓名与所在部门对应关系DataFrame _name_branch_df: pd.DataFrame ...
/sc_inclusive_balance_detail_analysis-0.0.4-py3-none-any.whl/sc_inclusive_balance_detail_analysis/manifest_utils.py
0.409457
0.171338
manifest_utils.py
pypi
# Supercollider Jupyter Kernel This kernel allows running [SuperCollider](https://supercollider.github.io/) Code in a [Jupyter](https://jupyter.org/) environment. ![Demo Notebook](demo.jpg) ## Installation Please make sure one has installed [SuperCollider](https://supercollider.github.io/) and [Python 3 with pip](h...
/sc_kernel-0.4.0.tar.gz/sc_kernel-0.4.0/README.md
0.80271
0.962179
README.md
pypi
from ._leflib import parse as _parse def parse(path): ''' Parses LEF file. Given a path to a LEF file, this function parses the file and returns a dictionary representing the contents of the LEF file. If there's an error while reading or parsing the file, this function returns None instead. Note...
/sc_leflib-0.1.0-cp311-cp311-macosx_10_15_x86_64.whl/sc_leflib/__init__.py
0.769817
0.497986
__init__.py
pypi
from PyQt5 import QtCore, QtGui, QtWidgets class SideGrip(QtWidgets.QWidget): def __init__(self, parent, edge): QtWidgets.QWidget.__init__(self, parent) if edge == QtCore.Qt.LeftEdge: self.setCursor(QtCore.Qt.SizeHorCursor) self.resizeFunc = self.resizeLeft elif edge...
/sc_mainwindow-1.2.tar.gz/sc_mainwindow-1.2/sc_mainwindow/components/resizable_mwindow.py
0.602529
0.189765
resizable_mwindow.py
pypi
import smtplib, os from collections import namedtuple from email.message import EmailMessage from typing import List, Union attachable = namedtuple('attachable', ['fn', 'maintype', 'subtype']) def email_text(content: str, recipient: str = None, subject: str = 'Build Status Update', sender: str = None): """ Sends ...
/sc_notify-1.2.0-py3-none-any.whl/notify/mail.py
0.713432
0.204362
mail.py
pypi
from io import StringIO _DEFAULT_EXAMPLES = { "string": "string", "integer": 1, "number": 1.0, "boolean": True, "array": [], } _DEFAULT_STRING_EXAMPLES = { "date": "2020-01-01", "date-time": "2020-01-01T01:01:01Z", "password": "********", "byte": "QG1pY2hhZWxncmFoYW1ldmFucw==", ...
/sc-oa-0.7.0.12.tar.gz/sc-oa-0.7.0.12/sphinxcontrib/openapi/schema_utils.py
0.711932
0.511534
schema_utils.py
pypi
from docutils.parsers.rst import directives from . import abc from .. import openapi20, openapi30, utils class HttpdomainOldRenderer(abc.RestructuredTextRenderer): option_spec = { # A list of endpoints to be rendered. Endpoints must be whitespace # delimited. "paths": lambda s: s.split(...
/sc-oa-0.7.0.12.tar.gz/sc-oa-0.7.0.12/sphinxcontrib/openapi/renderers/_httpdomain_old.py
0.749087
0.226302
_httpdomain_old.py
pypi
try: import keras import tensorflow as tf from keras.layers import ( Activation, BatchNormalization, Dense, Dropout, Input, Lambda, ) from keras.models import Model from keras.utils import np_utils from sklearn.metrics import ( accuracy...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/predictor.py
0.817174
0.439747
predictor.py
pypi
import tensorflow as tf from keras.engine.base_layer import InputSpec from keras.engine.topology import Layer from keras.layers import Dense, Lambda from tensorflow.compat.v1.keras import backend as K class ConstantDispersionLayer(Layer): """ An identity layer which allows us to inject extra parameters su...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/layers.py
0.916987
0.428532
layers.py
pypi
import json import os import pickle import keras.optimizers as opt import numpy as np from hyperopt import Trials, fmin, hp, tpe from kopt import CompileFN, test_fn from . import io from .network import AE_types def hyper(args): print("entering_hyper") adata = io.read_dataset( args.input, transpose=...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/hyper.py
0.450601
0.217535
hyper.py
pypi
import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc import scipy as sp import seaborn as sns import tensorflow as tf from tensorflow.contrib.opt import ScipyOptimizerInterface nb_zero = lambda t, mu: (t / (mu + t)) ** t zinb_zero = lambda t, mu, p: p + ((1.0 - p) * ((t / (mu + t)...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/utils.py
0.731346
0.59884
utils.py
pypi
try: from .clust_compute import * from .dataset import Dataset from .load import load_runfile from .model import DCA_Permuted from .predictor import MLP_Predictor from .runfile_handler import RunFile from .workflow import Workflow except ImportError: from load import load_runfile fro...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/analysis.py
0.621541
0.170301
analysis.py
pypi
import yaml def load_runfile(runfile_path): workflow_ID = 1 yaml_config_dict = { "dataset": "dataset", # keys are the name in the runfile, values are the "official" keys "dataset_name": "dataset_name", "filter_min_counts": "filter_min_counts", "normalize_size_factors": "normal...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/load.py
0.437824
0.394318
load.py
pypi
import os import random import shutil import tempfile import anndata import numpy as np import scanpy as sc try: import tensorflow as tf except ImportError: raise ImportError( "DCA requires tensorflow. Please follow instructions" " at https://www.tensorflow.org/install/ to install" " i...
/sc_permut-0.1.1-py3-none-any.whl/sc_permut/api.py
0.863823
0.61438
api.py
pypi
import logging import numpy as np import pandas as pd from config42 import ConfigManager from sc_analyzer_base import ManifestUtils from sc_retail_analysis.analyzer.base_analyzer import BaseAnalyzer class CreditCardAmountAnalyzer(BaseAnalyzer): """ 信用卡大额分期投放额分析 """ def __init__(self, *, config: Co...
/sc_retail_analysis-0.0.49-py3-none-any.whl/sc_retail_analysis/credit_card/credit_card_amount_analyzer.py
0.411584
0.16848
credit_card_amount_analyzer.py
pypi
import logging import numpy as np import pandas as pd from config42 import ConfigManager from sc_analyzer_base import ManifestUtils from sc_retail_analysis.analyzer.base_analyzer import BaseAnalyzer class LargeInstallmentsAnalyzer(BaseAnalyzer): """ 信用卡大额分期余额分析 """ def __init__(self, *, config: Co...
/sc_retail_analysis-0.0.49-py3-none-any.whl/sc_retail_analysis/loan/large_installments_analyzer.py
0.406037
0.157105
large_installments_analyzer.py
pypi
import logging import numpy as np import pandas as pd from config42 import ConfigManager from sc_analyzer_base import BranchUtils, ManifestUtils from sc_retail_analysis.analyzer.base_analyzer import BaseAnalyzer class EasyLoanAnalyzer(BaseAnalyzer): """ 易得贷分析 """ def __init__(self, *, config: Conf...
/sc_retail_analysis-0.0.49-py3-none-any.whl/sc_retail_analysis/loan/easy_loan_analyzer.py
0.409575
0.191781
easy_loan_analyzer.py
pypi
import logging import numpy as np import pandas as pd from config42 import ConfigManager from sc_analyzer_base import ManifestUtils from sc_retail_analysis.analyzer.base_analyzer import BaseAnalyzer class LoanDetailAnalyzer(BaseAnalyzer): """ 贷款明细分析 """ def __init__(self, *, config: ConfigManager,...
/sc_retail_analysis-0.0.49-py3-none-any.whl/sc_retail_analysis/loan/loan_detail_analyzer.py
0.420362
0.175326
loan_detail_analyzer.py
pypi
import logging import numpy as np import pandas as pd from config42 import ConfigManager from sc_analyzer_base import BranchUtils, ManifestUtils from sc_retail_analysis.analyzer.base_analyzer import BaseAnalyzer class DepositAnalyzer(BaseAnalyzer): """ 存款分析 """ def __init__(self, *, config: Config...
/sc_retail_analysis-0.0.49-py3-none-any.whl/sc_retail_analysis/non_interest_income/deposit_analyzer.py
0.423339
0.162015
deposit_analyzer.py
pypi
import json import logging from urllib.parse import urljoin import requests import urllib3 from .exception import * class RequestClient(object): """ A class to interact with Http """ def __init__(self, *, url, username=None, password=None, x509_verify=True): """ Create a RequestClie...
/sc-search-gav-0.0.2.tar.gz/sc-search-gav-0.0.2/sc_gav/request_api.py
0.813201
0.16228
request_api.py
pypi
from enum import Enum from typing import Dict, List, Optional, Sequence, Tuple, Union import matplotlib.pyplot as plt import numpy as np import pandas as pd import scanpy as sc import seaborn as sb from adjustText import adjust_text from matplotlib import colors from rich import print class Colormaps(Enum): """U...
/sc_toolbox-0.12.3-py3-none-any.whl/sc_toolbox/plot/__init__.py
0.963446
0.528473
__init__.py
pypi
from __future__ import annotations import os from typing import List from pandas import Categorical from statsmodels.stats.multitest import fdrcorrection try: from typing import Literal except ImportError: from typing_extensions import Literal # type: ignore from typing import Optional import numpy as np ...
/sc_toolbox-0.12.3-py3-none-any.whl/sc_toolbox/tools/__init__.py
0.875893
0.500305
__init__.py
pypi
import importlib.resources import pickle from enum import Enum from typing import Dict, List, Tuple from scipy import interpolate from .data_vortex import temperature_03, temperature_05, temperature_08 from .vortex_instance import VortexInstance class _DictKey(str, Enum): DELTA_KEY = "delta" class _FileName(s...
/sc_vortex_2d-1.0.2-py3-none-any.whl/sc_vortex_2d/vortex.py
0.952802
0.375535
vortex.py
pypi
from plone.app.vocabularies.catalog import QuerySearchableTextSourceView from plone.app.vocabularies.catalog import SearchableTextSource from plone.app.vocabularies.terms import BrowsableTerm from Products.CMFCore.interfaces._content import IFolderish from Products.CMFCore.utils import getToolByName from sc.contentrule...
/sc.contentrules.groupbydate-2.0.1.zip/sc.contentrules.groupbydate-2.0.1/src/sc/contentrules/groupbydate/vocabulary.py
0.654453
0.22564
vocabulary.py
pypi
from Acquisition import aq_parent from plone.app.contentrules.conditions.portaltype import IPortalTypeCondition from plone.contentrules.rule.interfaces import IRule from Products.CMFCore.utils import getToolByName from sc.contentrules.layout import MessageFactory as _ from zope.browsermenu.interfaces import IBrowserMen...
/sc.contentrules.layout-1.0.1.zip/sc.contentrules.layout-1.0.1/src/sc/contentrules/layout/vocabulary.py
0.550366
0.162081
vocabulary.py
pypi
from Acquisition import aq_inner from OFS.SimpleItem import SimpleItem from plone.app.contentrules import PloneMessageFactory as _ from plone.app.contentrules.browser.formhelper import AddForm from plone.app.contentrules.browser.formhelper import EditForm from plone.contentrules.rule.interfaces import IExecutable from ...
/sc.contentrules.metadata-1.0.1.zip/sc.contentrules.metadata-1.0.1/src/sc/contentrules/metadata/conditions/subject.py
0.711932
0.161949
subject.py
pypi
from Acquisition import aq_parent from OFS.SimpleItem import SimpleItem from plone.app.contentrules.browser.formhelper import AddForm from plone.app.contentrules.browser.formhelper import EditForm from plone.contentrules.rule.interfaces import IExecutable from plone.contentrules.rule.interfaces import IRuleElementData ...
/sc.contentrules.metadata-1.0.1.zip/sc.contentrules.metadata-1.0.1/src/sc/contentrules/metadata/actions/subject.py
0.699768
0.17094
subject.py
pypi
import itertools from zope.interface import implements try: from zope.schema.interfaces import IVocabularyFactory except ImportError: from zope.app.schema.vocabulary import IVocabularyFactory from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm from plone.app.vocabularies.catalog import Searchable...
/sc.contentrules.movebyattribute-0.5.tar.gz/sc.contentrules.movebyattribute-0.5/sc/contentrules/movebyattribute/vocabulary.py
0.613815
0.196537
vocabulary.py
pypi
from zope.interface import Interface from zope import schema from z3c.form import field from z3c.form import group from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm import logging logger = logging.getLogger('sc.galleria.support') # dependencies # Thanks: collective.gallery try: #plone4 from pl...
/sc.galleria.support-1.0.1.tar.gz/sc.galleria.support-1.0.1/src/sc/galleria/support/interfaces.py
0.68763
0.181336
interfaces.py
pypi
from plone import api from plone.dexterity.browser.view import DefaultView from plone.memoize import forever from plone.memoize.instance import memoizedproperty from sc.photogallery.config import HAS_ZIPEXPORT from sc.photogallery.interfaces import IPhotoGallerySettings from sc.photogallery.utils import human_readable_...
/sc.photogallery-1.0b3.zip/sc.photogallery-1.0b3/src/sc/photogallery/browser/view.py
0.776835
0.209591
view.py
pypi
from collective.cover.tiles.base import IPersistentCoverTile from collective.cover.tiles.base import PersistentCoverTile from plone.app.uuid.utils import uuidToObject from plone.memoize import view from plone.tiles.interfaces import ITileDataManager from plone.uuid.interfaces import IUUID from Products.Five.browser.pag...
/sc.photogallery-1.0b3.zip/sc.photogallery-1.0b3/src/sc/photogallery/tiles/photogallery.py
0.756447
0.217691
photogallery.py
pypi
import logging import re from string import Template from Acquisition import aq_inner from Acquisition import Explicit from Products.CMFCore.utils import getToolByName from Products.Five import BrowserView from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from plone.app.layout.viewlets import Vie...
/sc.social.bookmarks-1.3.2.tar.gz/sc.social.bookmarks-1.3.2/src/sc/social/bookmarks/browser/common.py
0.598664
0.15393
common.py
pypi
from plone.autoform import directives as form from plone.formwidget.namedfile.widget import NamedImageFieldWidget from plone.supermodel import model from sc.social.like import LikeMessageFactory as _ from sc.social.like.config import DEFAULT_ENABLED_CONTENT_TYPES from sc.social.like.config import DEFAULT_PLUGINS_ENABLE...
/sc.social.like-2.13b3.zip/sc.social.like-2.13b3/sc/social/like/interfaces.py
0.620966
0.174938
interfaces.py
pypi
from DateTime import DateTime from plone import api from plone.supermodel import model from sc.social.like import LikeMessageFactory as _ from sc.social.like.behaviors import ISocialMedia from sc.social.like.interfaces import ISocialLikeSettings from sc.social.like.logger import logger from sc.social.like.utils import ...
/sc.social.like-2.13b3.zip/sc.social.like-2.13b3/sc/social/like/browser/canonicalurl.py
0.855821
0.246567
canonicalurl.py
pypi
from Acquisition import aq_inner from plone import api from plone.app.layout.globals.interfaces import IViewView from plone.formwidget.namedfile.converter import b64decode_file from plone.memoize.view import memoize from plone.memoize.view import memoize_contextless from plone.namedfile.browser import Download from plo...
/sc.social.like-2.13b3.zip/sc.social.like-2.13b3/sc/social/like/browser/helper.py
0.733738
0.170111
helper.py
pypi
from zope import schema from zope.component import getMultiAdapter from zope.formlib import form from zope.interface import implements from plone.app.portlets.portlets import base from plone.memoize import ram from plone.memoize.compress import xhtml_compress from plone.memoize.instance import memoize from plone.portl...
/sc.social.viewcounter-1.0.7.tar.gz/sc.social.viewcounter-1.0.7/sc/social/viewcounter/browser/portlet.py
0.705481
0.264258
portlet.py
pypi
__revision__ = "src/engine/SCons/Memoize.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Memoizer A metaclass implementation to count hits and misses of the computed values that various methods cache in memory. Use of this modules assumes that wrapped methods be coded to cache their values i...
/sc0ns-2.2.0-1.zip/sc0ns-2.2.0-1/SCons/Memoize.py
0.738292
0.359055
Memoize.py
pypi
__revision__ = "src/engine/SCons/Variables/EnumVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __all__ = ['EnumVariable',] import SCons.Errors def _validator(key, val, env, vals): if not val in vals: raise SCons.Errors.UserError( 'Invalid value for option %s: %s. Valid ...
/sc0ns-2.2.0-1.zip/sc0ns-2.2.0-1/SCons/Variables/EnumVariable.py
0.650689
0.324396
EnumVariable.py
pypi
__doc__ = """ Textfile/Substfile builder for SCons. Create file 'target' which typically is a textfile. The 'source' may be any combination of strings, Nodes, or lists of same. A 'linesep' will be put between any part written and defaults to os.linesep. The only difference between the Textfile ...
/sc0ns-2.2.0-1.zip/sc0ns-2.2.0-1/SCons/Tool/textfile.py
0.447943
0.314682
textfile.py
pypi