Saravanan666/pypi-org huggingface dataset:
Package: scattr
ThescattrPython packageThescattrpackage has one function,scattr,
that provides an easy way toSetClassATTRibutes of classes derived
from pre-existing Python classes.Thescattrfunction takesa class object andthe name of a helper script
and returns a subclass calledSubClassAttributesthat contains the methods defined in the helper script.Essentially, this is an easy way to
add user-defined functions to classes.Class variables, method and classes can be added dynamically:importpandasaspdimportmath# add pi to a pandas DataFramepd.DataFrame.pi=math.piThescattrpackage provides a cleaner way to
add new attributes, because it creates a new subclass and
uses method and class defined in a separate helper script.Thescattrfunction only adds
callable objects(methods and classes), not variables.Pandas DataFrame exampleimportpandasaspdfromscattrimportscattr# create a new class that inherits from pd.DataFrame# and includes methods defined in a 'helper.py' fileScattrFrame=scattr(cls=pd.DataFrame,src='helper')# instantiate the new classdf=ScattrFrame(data=pd.read_csv('risk_factors_cervical_cancer.csv'))# test methods added from helper filedf.say_hi()# test CowClass added from helper filedf.CowClass.say_moo()# test method from parent classdf.head(n=1)# confirm that df is an instance of pd.DataFrame and PydyFrameisinstance(df,(pd.DataFrame,ScattrFrame))# confirm that ScattrFrame is a subclass of pd.DataFrameissubclass(ScattrFrame,pd.DataFrame)
Package: scavenger-agent-python
Scavenger Agent Python (BETA)(본 Agent는 베타 버전으로 현재 개발 환경에서만의 사용을 권장하며 상용 환경에서의 사용을 권장하지 않습니다.)Scavenger Agent의 Python 버전으로, Agent가 아닌Server Component는 사전에 준비되어야 합니다.개발 가이드Scavenger Agent Python은 패키지 관리자로Poetry를 이용합니다.의존성 설치$poetryinstall테스트$poetryrunpython-munittest빌드$poetrybuild자세한 내용은Poetry Docs를 참고해주세요.에이전트 설치 가이드전제조건Python >= 3.7설치$ pip install scavenger-agent-python --save설정설정은 설정 파일scavenger.conf을 이용한 방식과 Config Instance를 직접 생성하는 두 가지 방식을 지원합니다.Example ofscavenger.conf# scavenger.confapiKey=eb99ff0f-aaaa-bbbb-cccc-5d1ec81f6183serverUrl=http://10.106.93.41:8081environment=devappName=apiserverpackages=viewscodebase=.---# sourceconfig=Config.load_config()agent=Agent(config)Example ofConfig()config=Config(api_key="eb99ff0f-aaaa-bbbb-cccc-5d1ec81f6183",server_url="http://10.106.93.41:8081",environment="dev",app_name="apiserver",packages=["views"],codebase=["."],)agent=Agent(config)에이전트 시작Scavenger Agent Python은 Scavenger Agent Java와 달리, Agent 시작 코드를 직접 삽입하는 방식으로 동작합니다. 수집을 시작할 함수의 모듈이 import되기 전에 Agent가 동작해야 하므로반드시 프로그램의 시작점에 Agent 시작 코드가 삽입되어야 함을 유의하십시오.fromscavengerimportAgent,Configconfig=Config.load_config()agent=Agent(config)agent.start()### your source codefrom...한계Graceful Shutdown에 대한 구현은 기존 프레임워크와의 충돌 가능성으로 인해 자동으로 지원하지 않습니다. 대신 아래와 같은agent.shutdown()함수를 지원하므로 직접 등록하여서 사용하여야 합니다.defshutdown_gracefully(*args):# Shutdown your application/server first.agent.shutdown()sys.exit(0)signal.signal(signal.SIGTERM,shutdown_gracefully)agent.start()Scavenger Python Agent는 현재 모듈/클래스의 레퍼런스를 대체하는 방식으로 동작하므로 레퍼런스를 사용하지 않고 함수를 호출하는 경우에는 동작하지 않습니다. 따라서 아래와 같이 Decorator를 이용해 함수의 레퍼런스만 따로 프레임워크에 저장해두는 경우,def hello_world()에는 동작하지 않습니다. 이는 추후 함수내 코드를 삽입하는 방식으로 변경되어 지원될 예정입니다.fromflaskimportFlaskapp=Flask(__name__)@app.route('/')defhello_world():return'Hello World!'코드를 직접 읽어서 메서드를 탐색해야 하므로 pyc 파일은 현재 지원되지 않습니다.
Package: scb
scbPython wrapper for PxApi 2.0 and 1.0Installation$pipinstallscbUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensescbwas created by Ruben Selander. It is licensed under the terms of the MIT license.Creditsscbwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: sc-backtest
Simple Backtest Module (Personal Usage)Chang Sun | 孙畅EmailInstall and Updatepip install --upgrade sc-backtestor (if slow)pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple sc-backtestSimple TestCheck for factor validityStatistical:CDFMarkoutHist...Time-Series:Sign-TradeValue-Trade...# x: factors# y: asset's future retimportpandasaspdimportnumpyasnpfromsc_backtestimportsimpletest,datasetdata=dataset.get_data('adj_close_price',frequency=5)x=data.pct_change(240).iloc[:,0]y=data.pct_change().shift(-1).iloc[:,0]st=simpletest()st.plot_cdf(x,y)st.plot_composite(x,y)Backtest (bt)Backtestget_reportget_pnl_plotround_test...# x: factors# y: asset's future retimportpandasaspdimportnumpyasnpfromsc_backtestimportsimpletest,bt,datasetdata=dataset.get_data('adj_close_price',frequency=5)x=data.pct_change(240).iloc[:,0]y=data.pct_change().shift(-1).iloc[:,0]st=simpletest()data=st.simple_pnl(x,y,data_return=True)report=bt.get_report(data['delta_med'],y)bt.get_pnl_plot(data['delta_med'],y)Technical Analysis (ta)Reference:taimportpandasaspdimportnumpyasnpfromsc_backtestimportta,datasetdata=dataset.get_data('adj_close_price',frequency=5)macd_diff=ta.trend.macd(data.iloc[:,0]).macd_diff()Technical Analysis2 (ta2)Variou moving average function and stat modelsma, ema, wma, ...rsi, atr, ...z_score, div_std, de_mean, ...importpandasaspdimportnumpyasnpfromsc_backtestimportta2,datasetdata=dataset.get_data('adj_close_price',frequency=5)wma=ta2.wma(data.iloc[:,0],window=5)DataFrame Function (df_func)# exampledefdf_sim_yoy(window):def_sim_yoy(x):temp=pd.DataFrame(x)return(temp-temp.shift(window))/((temp.abs()+temp.shift(window).abs())/2)_sim_yoy.__name__=f'df_sim_yoy_{int(window)}'return_sim_yoyExampleInput your factor and underlying asset's future return with index type as DatetimeIndex and get
the composite factor analysis stat and simple-pnl time-series plots.# x: factors# y: asset's future retimportpandasaspdimportnumpyasnpfromsc_backtestimportsimpletest,bt,dataset,ta2data=dataset.get_data('adj_close_price',frequency=5)x=data.pct_change().apply(lambdax:ta2.ema(x,window=240))y=data.pct_change().shift(-1)st=simpletest()st.plot_composite_cs(x,y,ic=True,horizon=5)bt.get_pnl_plot(x,y,alpha=True)
Package: scbase
scBASEAllele-specific expression (ASE) in single-cell resolution can reveal stochastic and dynamic features of gene expression in greater detail. However, analyzing single-cell ASE poses unique analytical challenges due to the extremely low depth of sequencing coverage per cell. In addition, allelic proportions often form U-shaped or W-shaped distribution because of the frequent occurrence of random monoallelic bursts. We propose a new method,scBASE, a “soft” zero-and-one inflated model for cellular allelic proportions in which we tackle data sparsity and variability by harnessing information derived from cell’s population context.Free software: MIT licenseDocumentation:https://churchill-lab.github.io/scBASE/History0.1.0 (2018-08-02)First release on PyPI.
Package: sc.base.audioplayer
sc.base.audioplayerOverviewThis product aply a simple flash audio player for every audio uploaded in the Plone site as a File.RequirementsPlone 3.2.x (http://plone.org/products/plone)Plone 3.1.x (http://plone.org/products/plone)Plone 3.0.x (http://plone.org/products/plone)InstallationTo use this skin, on a buildout based installation:1. Unpack sc.base.audioplayer package to src/ folder of your
buildout
2. Edit your buildout.cfg and add the following information:[buildout]
...
eggs =
    sc.base.audioplayer

[instance]
zcml =
    ...
    sc.base.audioplayerThe last line tells buildout to generate a zcml snippet that tells
Zope to configure sc.base.audioplayer.If another package depends on the sc.base.audioplayer egg or
includes its zcml directly you do not need to specify anything in the
buildout configuration: buildout will detect this automatically.After updating the configuration you need to run the ‘’bin/buildout’’,
which will take care of updating your system.Go to the ‘Site Setup’ page in the Plone interface and click on the
‘Add/Remove Products’ link.Choose the product (check its checkbox) and click the ‘Install’ button.Uninstall – This can be done from the same management screen, but only
if you installed it from the quick installer.Note: You may have to empty your browser cache to see the effects of the
product installation.Browsers and OS’sInternet Explorer 8.0 (WinXP/Vista)Internet Explorer 7.0 (WinXP/Vista)Firefox 3 (WinXP/Vista/MacOSX)Safari 3 (WinXP/Vista/MacOSX)CreditsSimples Consultoria (products at simplesconsultoria dot com dot br) - Design /
PackagingChangelog1.0 - UnreleasedInitial release
Package: sc.base.hotsites
sc.base.hotsitesOverviewAllows, via p4a.subtyper, the user tranforms a folder in a hot site.What is a Hot Site here ?When you set a folder as a hot site :Removes viewlets around the content: footer, header and topBlock all portlets (from parents, from group and from content type), you can re-enable manually, if you wantEnable a new skin, via access rule, so you can customize the look’n’feel of your Hot SiteEnable a local workflow, defaults to one-state workflow, to simplify the management of Hot SiteLimits the addable content types in the Hot Site folder, you can configure the content typesUse a content as a template to Hot Site indexOptionally, create a page (document) as accessibility content, useful when the hot sites is a Flash contentOptions you can setupIn Site Setup, access the menu Hot SitesAddable content type on Hot Sites folderSkin name used in the Hot Sites folderDefault view id, that will be setted in the Hot Sites folderDefault view path, a content template that will be copied and used as the default view of Hot Sites folderWorkflow id, workflow used in the Hot Site, will be setted using the Placeful Workflow, defaults to one-state workflowUse accessibility content, if selected will be created a page (document) as a alternate (accessibility) view, you will must provide the link to this content. It’s useful when the default view is a Flash content.RequirementsPlone 3.2.x (http://plone.org/products/plone)InstallationTo enable this product,on a buildout based installation:Edit your buildout.cfg and addsc.base.hotsitesto the list of eggs to install[buildout]
...
eggs =
    sc.base.hotsitesTell the plone.recipe.zope2instance recipe to install a ZCML slug:[instance]
...
zcml =
    ...
    sc.base.hotsitesIf another package depends on the sc.base.hotsites egg or
includes its zcml directly you do not need to specify anything in the
buildout configuration: buildout will detect this automatically.After updating the configuration you need to run the ‘’bin/buildout’’,
which will take care of updating your system.Go to the ‘Site Setup’ page in the Plone interface and click on the
‘Add/Remove Products’ link.Choose the product (check its checkbox) and click the ‘Install’ button.Uninstall – This can be done from the same management screen, but only
if you installed it from the quick installer.Note: You may have to empty your browser cache and save your resource registries
in order to see the effects of the product installation.SponsoringDevelopment of this product was sponsored bySimples Consultoria.CreditsSimples Consultoria (products at simplesconsultoria dot com dot br) -
ImplementationChangelog1.0 - 2009/12/29Initial release [lucmult]
Package: sc.base.memberdataexport
OverviewA very common request of customers is to give them a listing of registered users
in theirs portals and sites. Althought, as PlonePAS allows us to deploy different
user and properties sources, even the most simple case – Plone factory settings
– is not covered when we need to export user data.This package aims to solve, at least, the simple use cases, allowing portal managers
to export member data (except password) on a CSV format.InstallationTo use this package, on a buildout based installation:Unpack sc.base.memberdataexport package to src/ folder of your buildoutEdit your buildout.cfg and add the following information:[buildout]
...
eggs =
    sc.base.memberdataexport

[instance]
zcml =
    ...
    sc.base.memberdataexportThe last line tells buildout to generate a zcml snippet that tells
Zope to configure sc.base.memberdataexport.If another package depends on the sc.base.memberdataexport egg or
includes its zcml directly you do not need to specify anything in the
buildout configuration: buildout will detect this automatically.After updating the configuration you need to run the ‘’bin/buildout’’,
which will take care of updating your system.Go to the ‘Site Setup’ page in the Plone interface and click on the
‘Add/Remove Products’ link.Choose the product (check its checkbox) and click the ‘Install’ button.Uninstall – This can be done from the same management screen, but only
if you installed it from the quick installer.Note: You may have to empty your browser cache to see the effects of the
product installation.Tested withPlone >= 3.1.x (http://plone.org/products/plone)CreditsErico Andrei (erico at simplesconsultoria dot com dot br) - CodingSimples Consultoria (products at simplesconsultoria dot com dot br) -
PackagingChangelog0.5 (2009-03-29)Uses a control panel to configure the most common settings
[erico_andrei]Tested only with Plone factory settings (ZODB user source)
[erico_andrei]Initial release
[erico_andrei]
Package: sc.base.uploader
Table of Contentssc.base.uploaderOverviewRequirementsInstallationSponsoringCredits1.0b3 (2013-03-05)1.0b2 (2013-03-05)1.0b1 (2013-03-05)0.6 (2012-03-06)0.5.4 (2011-08-10)0.5.3 (2011-08-09)0.5.2 (2011-07-11)0.5.1 (2011-07-11)0.5 - (2011-06-11)sc.base.uploaderOverviewPackage to configure multiple file upload methods in PloneRequirementsPlone >=4.2.x (http://plone.org/products/plone)InstallationTo enable this product in a buildout-based installation:Edit your buildout.cfg and addsc.base.uploadto the list
of eggs to install:[buildout]
...
eggs =
    sc.base.uploadAfter updating the configuration you need to run ‘’bin/buildout’’, which will
take care of updating your system.Go to the ‘Site Setup’ page in a Plone site and click on the ‘Add-ons’ link.Check the box next tosc.base.uploadand click the ‘Activate’
button.Note: You may have to empty your browser cache and save your resource
registries in order to see the effects of the product installation.SponsoringDevelopment of this product was sponsored by:Simples Consultoria.TV1.CreditsSimples Consultoria (products at simplesconsultoria dot com dot br) -
ImplementationChangelog1.0b3 (2013-03-05)Fix Manifest.in file [ericof]1.0b2 (2013-03-05)Fix Manifest.in file [ericof]1.0b1 (2013-03-05)Support for Plone 4.2.x and later [ericof]0.6 (2012-03-06)Force file extension for images [ericof]Use our own utility to make sure everything is ok [ericof]PEP8 and pyflakes [ericof]Add testing [ericof]0.5.4 (2011-08-10)Change headers [erico_andrei]0.5.3 (2011-08-09)Change the way we deal with quickupload [erico_andrei]0.5.2 (2011-07-11)Add a patch to collective.ziptransport to avoid naming issues with Windows
clients [erico_andrei]Pin versions [erico_andrei]Change GS order [erico_andrei]0.5.1 (2011-07-11)Fix login in generating filename [erico_andrei]Brazilian Portuguese translation [erico_andrei]0.5 - (2011-06-11)Added a export view (@@export-zip) [erico_andrei]Integrated collective.ziptransport and collective.quickupload [erico_andrei]
Package: sc-batch-run-retail-analysis
A simple Python projectThis project provides a simple utility to batch run retail analysis and diff analysis.InstallationIt is possible to install the tool withpip:pip install sc-batch-run-retail-analysisConfigurationConfiguration files reading in this order, the first is the top most priority:production.xml in current directory,production.xml in <project_name> directory under User directory,production.xml in <project_name> directory under /var/opt/sc/ directory,default.xml in <project_name> directory under /var/opt/sc/ directory.The default configuration file looks like this:dev:
  # whether this program is running is development mode
  dev_mode: FalseLicenseThe script is released under the MIT License.  The MIT License is registered
with and approved by the Open Source Initiative[1].[1]https://opensource.org/licenses/MIT
Package: scbean
Scbean integrates a range of models for single-cell data analysis, including dimensionality reduction, remvoing batch effects, and transferring well-annotated cell type labels from scRNA-seq to scATAC-seq and spatial resoved transcriptomics. It is efficient and scalable for large-scale datasets. Scbean will also provide more fundamental analyses for multi-modal data and spatial resoved transcriptomics in the future. The output of our integrated data can be easily used for downstream data analyses such as clustering, identification of cell subpopulations, differential gene expression, visualization using eitherSeuratorScanpy.Four APIs for the analysis of multi-omics dataDAVAEsupports integration of scRNA-seq, scATAC-seq, spatial transcriptomics based on domain-adversarial and variational approximation.VIPCCAsupports integration of unpaired single-cell multi-omics data, differential gene expression analysis based on non-linear canonical correlation analysis.VIMCCAsupports joint-analysis of paired multimodal single-cell data based on multi-view latent variable model.VISGPsupports the discovery of spatially variable genes exhibiting distinct expression patterns in spatial transcriptome data.CitationYuwei Wang, Bin Lian, Haohui Zhang, Yuanke Zhong, Jie He, Fashuai Wu, Knut Reinert, Xuequn Shang, Hui Yang, Jialu Hu, A multi-view latent variable model reveals cellular heterogeneity in complex tissues for paired multimodal single-cell data, Bioinformatics, Volume 39, Issue 1, January 2023, btad005,https://doi.org/10.1093/bioinformatics/btad005Jialu Hu, Mengjie Chen, Xiang Zhou, Effective and scalable single-cell data alignment with non-linear canonical correlation analysis, Nucleic Acids Research, Volume 50, Issue 4, 28 February 2022, Page e21,https://doi.org/10.1093/nar/gkab1147Jialu Hu, Yuanke Zhong, Xuequn Shang, A versatile and scalable single-cell data integration algorithm based on domain-adversarial and variational approximation, Briefings in Bioinformatics, Volume 23, Issue 1, January 2022, bbab400,https://doi.org/10.1093/bib/bbab400Jialu Hu, Yiran Wang, Xiang Zhou, and Mengjie Chen. "Pre-processing, Dimension Reduction, and Clustering for Single-Cell RNA-seq Data." In Handbook of Statistical Bioinformatics, pp. 37-51. Springer, Berlin, Heidelberg, 2022.https://doi.org/10.1007/978-3-662-65902-1_2InstallationCreate conda environment$condacreate-nscbeanpython=3.8
$condaactivatescbeanInstall scbean from pypi$pipinstallscbeanAlternatively, install the develop version of scbean from GitHub source code$gitclonehttps://github.com/jhu99/scbean.git
$cd./scbean/
$python-mpipinstall.Note: Please make sure your python version >= 3.7, and install tensorflow-gpu if GPU is available on your your machine.Usage of scbeanFor a quick start, please follow our guide about the usage of scbean in theTutorial and Documentationpages.
Package: scbig
scBiG for representation learning of single-cell gene expression data based on bipartite graph embeddingOverviewscBiG is a graph autoencoder network where the encoder based on multi-layer graph convolutional networks extracts high-order representations of cells and genes from the cell-gene bipartite graph, and the decoder based on the ZINB model uses these representations to reconstruct the gene expression matrix. By virtue of a model-driven self-supervised training paradigm, scBiG can effectively learn low-dimensional representations of both cells and genes, amenable to diverse downstream analytical tasks.InstallationPlease installscBiGfrom pypi with:pipinstallscbigOr clone this repository and usepipinstall-e.in the root of this repository.Quick startLoad the data to be analyzed:importscanpyasscadata=sc.AnnData(data)Perform data pre-processing:# Basic filteringsc.pp.filter_genes(adata,min_cells=3)sc.pp.filter_cells(adata,min_genes=200)adata.raw=adata.copy()# Total-count normlize, logarithmize the data, calculate the gene size factorsc.pp.normalize_per_cell(adata)adata.obs['cs_factor']=adata.obs.n_counts/np.median(adata.obs.n_counts)sc.pp.log1p(adata)adata.var['gs_factor']=np.max(adata.X,axis=0,keepdims=True).reshape(-1)Run the scBiG method:fromscbigimportrun_scbigadata=run_scbig(adata)The output adata contains the cell embeddings inadata.obsm['feat']and the gene embeddings inadata.obsm['feat']. The embeddings can be used as input of other downstream analyses.Please refer totutorial.ipynbfor a detailed description of scBiG's usage.
Package: scBoolSeq
scBoolSeqscRNA-Seq data binarisation and synthetic generation from Boolean dynamics.InstallationPippip install scboolseqCondaconda install -c conda-forge -c colomoto scboolseqDockerscBoolSeqis included in theColoMoTo Dockerdistribution.UsagePython APIHere a minimal example is presented, using the same dataset as the CLI usage guide.
For further information, please check the documentation.importpandasaspdfromscboolseqimportscBoolSeq# read in the normalized expression datanestorowa=pd.read_csv("data_Nestorowa.tsv.gz",index_col=0,sep="\t")nestorowa.iloc[1:5,1:5]#                HSPC_031  HSPC_037  LT-HSC_001  HSPC_001# Kdm3a          6.877725  0.000000    0.000000  0.000000# Coro2b         0.000000  6.913384    8.178374  9.475577# 8430408G22Rik  0.000000  0.000000    0.000000  0.000000# Clec9a         0.000000  0.000000    0.000000  0.000000## NOTE : here, genes are rows and observations are columnsscbool_nest=scBoolSeq()#### Binarization### scBoolSeq expects genes to be columns, thus we transpose the DataFrame.scbool_nest.fit(nestorowa.T)# compute binarization criteriabinarized=scbool_nestorowa.binarize(nestorowa.T)binarized.iloc[1:5,1:5]#             Kdm3a  Coro2b  8430408G22Rik  Phf6# HSPC_031      1.0     NaN            NaN   0.0# HSPC_037      0.0     1.0            NaN   0.0# LT-HSC_001    0.0     1.0            NaN   1.0# HSPC_001      0.0     1.0            NaN   1.0#### Synthetic RNA-Seq generation from Boolean states### We load in a boolean trace obtained from the simulation of a Boolean modelboolean_trace=pd.read_csv("boolean_dynamics.csv",index_col=0)boolean_trace#             Kdm3a  Coro2b  8430408G22Rik  Phf6# init          1.0     0.0            1.0   0.0# transient_1   0.0     1.0            1.0   0.0# transient_2   0.0     1.0            0.0   1.0# stable_state  0.0     1.0            1.0   1.0synthetic_scrna_pseudocounts=scbool_nestorowa.sample_counts(boolean_trace)ContributorsGustavo Magaña López
Package: scbsp
\n# scBSPscBSP is a specialized package designed for processing biological data, specifically in the analysis of gene expression and cell coordinates. It efficiently computes p-values for a given set of genes based on input matrices representing cell coordinates and gene expression data.InstallationTo install scBSP, run the following command:pip install scbspUsageTo use scBSP, you need to provide two primary inputs:Cell Coordinates Matrix (input_sp_mat):Format: Numpy array.Dimensions: N x D, where N is the number of cells and D is the dimension of coordinates.Gene Expression Matrix (input_exp_mat_raw):Format: Numpy array, Pandas DataFrame, or CSR matrix.Dimensions: N x P, where N is the number of cells and P is the number of genes.Additionally, you must specify the following parameters:d1: A floating-point number.d2: A floating-point number.ExampleHere's a simple example to demonstrate how to compute p-values using scBSP:importscbsp# Load your data into these variablesinput_sp_mat=...# Cell Coordinates Matrixinput_exp_mat_raw=...# Gene Expression Matrix# Set the optional parametersd1=0.5# Example valued2=0.5# Example value# Execute the calculationp_values=scbsp.granp(input_sp_mat,input_exp_mat_raw,d1,d2)OutputThe function returns a list of p-values, each corresponding to the genes in the provided gene expression matrix. These p-values help in identifying significant differences in gene expression across different cell coordinates, facilitating advanced biological data analysis.