Saravanan666/pypi-org huggingface dataset:
Package: smart-vector
安装pipinstallsmart_vector使用方法fromsmart_vectorimportSmartVectorDB,Text2VecEmbeddingFunction# 定义向量转化函数text_vector=Text2VecEmbeddingFunction()# 数据库连接connect_dict={'host':'xxx','port':9030,'user':'xxxx','password':'xxx','db':'smartdb'}mydb=SmartVectorDB(db_config=connect_dict,load_host='xxx',text_vector=text_vector)# 插入数据mydb.add(collection='test',sr='测试',documents=['中国有一个北京','北京在中国','台湾是中国的'])mydb.add(collection='test',sr='测试',documents=['中国有一个北京1','北京在中国1'],categorys=['A1','A1'],metadatas=[{'s':'s1'},{'s':'s2'}])# 查询query="""天安门\ncollection='test' and sr = '测试' and document like '%北京%'\ndocument,sr,c,get_json_string(m, 'ans') as answer\n3"""print(mydb.get(query))#[['document', 'sr', 'c', 'distance'], ('中国有一个北京1', '测试', 'A1', 272.8261536366944), ('中国有一个北京', '测试', '', 272.8261536366944), ('中国有一个北京', '测试', '', 272.8261536366944)]部署pipinstall-rrequirements.txt

python3manage.pymakemigrations
python3manage.pymigrate
python3manage.pycreatesuperuser#启动数据python3manage.pyrunserver0.0.0.0:8000
Package: smartwatts
smartwatts-formulaSmartWatts is a formula for a self-adaptive software-defined power meter based on thePowerAPI framework.This project is the implementation of the power meter depicted in theSmartWatts: Self-Calibrating Software-Defined Power Meter for Containerspaper published in the 20th IEEE/ACM International Symposium on Cluster, Cloud and Internet Computing (CCGRID).This project provides a software power meter that estimates the power consumption (CPU/DRAM) of thesoftware containers(i.e. Docker containers, Kubernetes pods, Libvirt virtual machines...) running on a system.This software power meter is based onPower Modelsthat distribute the total energy consumption across the running containers depending on their resource usage.
TheRunning Average Power Limit (RAPL)feature is used to measure the total energy consumption of the CPU/DRAM components, and theHardware Performance Counters (HwPC)are used to measure the resource usage of the containers.To monitor the Hardware Performance Counters (HwPC) of the software containers running on a Linux system, thehwpc-sensorproject is the preferred solution.
There is currently no support for other client/server platforms such as Windows, MacOS or VMware.AboutSmartWatts is an open-source project developed by theSpirals project-team, a joint research group between theUniversity of LilleandInria.The documentation is availableon the PowerAPI website.Mailing listYou can follow the latest news and asks questions by subscribing to ourmailing list.ContributingIf you would like to contribute, you can do so through GitHub by forking the repository and sending a pull request.When submitting code, please check that it followsthe project's rulesand that thetests pass.InstallationThere is two ways to install official releases of SmartWatts:Using the Container image(recommended)from Docker Hubor theGithub Container Registry;Using the Python packagefrom Pypi.
Package: smartWebScraper
Smart Web ScraperThis Python script allows you to smartly scrape data from a web page and export it to a CSV file.It utilizes therequests, BeautifulSoup, re, and dateutillibraries to retrieve and parse HTML content, extract specific fields, and handle dates and prices.FeaturesRetrieves HTML content from a specified URL using the requests library.Parses the HTML content using BeautifulSoup to extract desired information.Extracts dates from text using the extract_date method, leveraging the dateutil library.Extracts prices from text using the extract_price method, using regular expressions.Exports the extracted data to a CSV file, allowing customization of repeater selector and fields.Handles cases where the repeater selector does not have any elements or the output file is being used by another program.UsagefromsmartWebScraperimportSmartWebScraperscraper=SmartWebScraper(# change the URL_TO_SCRAPE with your urlurl="URL_TO_SCRAPE",# optional, default to True, mark as False if you want empty field to be empty instead of N/Aempty_as_na=False,# optional, default to data.csvfilename='test.csv')# the below is an example of fields to be passed# use your own# list of tuples# first element ex: Title is the header column name in the csv file# second element ex: h3.bc-heading is the field selector use any selector you want you can use tags, classes or ids etc...# third element ex: text is telling the program what to extract use text to extract text or use attribute name ex: href# fourth element is optional. Add if you want to tell the program to treat this field as price or datetime (will extract the price or datetime automatically)fields=[('Title','h3.bc-heading','text'),('Sub Title','li.bc-list-item.subtitle span','text'),('Author','span.bc-text.bc-size-small.bc-color-secondary a','text'),('Author Link','span.bc-text.bc-size-small.bc-color-secondary a','href'),('Link','h3.bc-heading a.bc-link','href'),('Image','.bc-image-inset-border','src'),('Length','li.bc-list-item.runtimeLabel','text'),('Date','li.bc-list-item.releaseDateLabel span','text','date'),('Language','li.bc-list-item.languageLabel','text'),('Price','.buybox-regular-price','text','price'),]# scraper.export_to_csv method take the repeater_selector (the selector of the repeated elements and the fields you created above)result=scraper.export_to_csv(repeater_selector='li.bc-list-item.productListItem',fields=fields)print(result)output{'success': True, 'message': 'CSV file test.csv created successfully.'}ContributingContributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request onGitHub.LicenseThis project is licensed under the MIT LicenseYou can now copy this code and use it as your README.md file.
Package: smartworld
📦 smartworldTools Collection of SmartWorldDocumentation:https://df54vg7fe0.feishu.cn/docx/EmajdGEJ2oqAArxzyxlcFJcznSbInstallationpip3install-UsmartworldUsageUsage:sw[OPTIONS]COMMAND[ARGS]...ToolsCollectionofSmartWorld.Documentationlink:https://df54vg7fe0.feishu.cn/docx/EmajdGEJ2oqAArxzyxlcFJcznSbUsage:sw[command]--help

Options:--versionShowtheversionandexit.--helpShowthismessageandexit.

Commands:cloneClonecodetothespecifiedpath.drecordRecorddepth_detectdata.mappingBatchMapping.otaCompleteotawiththespecifiedpackage.sgShortforswitch-gateway.switch-gatewaySwitchthegatewayfrom192.168.137.200to...vrecordRecordvslamdata.LicenseThis is a self-use library, not universal.
Package: smartwrappers
SmartWrappersA Python 3 library to manipulate objects with shared mutable wrappers.InstallingPython 3.6.8 or higher is requiredTo install the library, you can just run the following command:# Linux/macOSpython3-mpipinstall-Usmartwrappers# Windowspy-3-mpipinstall-UsmartwrappersCases to use# We cannot change immutable objects.# Trying to change them we just create other objects.defplus_five(x):x+=5# Creating another object here.x=1plus_five(x)print(x)# >>> 1# Standard solution: rewrite our code in a way our function# calculates a new value and then we just reassign it to variables# whose values we need to change.defget_plus_five(x):returnx+5x=1x=get_plus_five(x)print(x)# >>> 6What if we have many objects of the same value and want them to have common state?a=1b=ac=b# ...a=get_plus_five(a)# What about b, c and other links# at different places of our project?UsageWe can use smart wrappers for that purpose:fromsmartwrappersimportwrapa=wrap(1)# or explicitly a = SmartWrapper(1)b=ac=bprint(a())# >>> 1print(b())# >>> 1print(c())# >>> 1a(5)print(a())# >>> 5print(b())# >>> 5print(c())# >>> 5defplus_five(x):x(x()+5)plus_five(a)print(a())# >>> 10print(b())# >>> 10print(c())# >>> 10MatricesWe can use smart wrappers for wrapping lists:fromsmartwrappersimportwrap_lista=wrap_list([1,2,3])b=[a[0],a[1],a[2]]print(a)# >>> [1, 2, 3]print(b)# >>> [1, 2, 3]a[1]='a'print(a)# >>> [1, 'a', 3]print(b)# >>> [1, 'a', 3] => wrappers behave like references to mutable content.We can wrap lists with any levels of dimensions:a=wrap_list([[1,2],[3,4]],dimensions=2)b=[[a[0][0],a[1][0]],[a[0][1],a[1][1]]]# Transposed matrix.#  a is:#        1 2#        3 4#  b is transposed matrix a:#        1 3#        2 4a[0][1](0)#  a is:#        1 0#        3 4#  b keeps changes:#        1 3#        0 4If we don't want to put inside our wrapper values of different types we can use StrictSmartWrapper:fromsmartwrappersimportwrap_strictlya=wrap_strictly('hello',str)a('world')# OK.a(5)# Error.b=wrap_strictly('hello',int)# Error.
Package: smarty
A smart playlist generator for MPD written in python.InstallationUsing pip$ pip install smartyUsing easy_install$ easy_install smartyUsageIn default configuration, smarty will try to use$MPD_HOST(environment variable) and port6600. If$MPD_HOSTis not set, it will use localhost.usage: smarty [-h] [-i <ip>] [-p <port>] [--maxnum <num>] [--dist <num>]
                [--norepeat] [-v] [--exclude <genre> [<genre> ...]]


Smart playlist generator written in python.

optional arguments:
  -h, --help            show this help message and exit
  -i <ip>, --ip <ip>    IP address of mpd server
  -p <port>, --port <port>
                        Port mpd server is listening on
  --maxnum <num>        Maximal number of songs in playlist
  --dist <num>          Add new song if only <x> songs are left to play in current playlist
  --norepeat            Don't add songs which are already in playlist.
  -v, --verbose         Print information about running process
  --exclude <genre> [<genre> ...]
                        Never add these genres to playlistExampleSmarty could be used like thissmarty --norepeat --maxnum 3000 --verbose --exclude ComedyThis would only add songs which are not already in the current playlist, allow a maximum number of 3000 songs (deletes from the beginning if that number is exceeded). It will furthermore display the genre of each added song and not add the genre ‘Comedy’.Bug ReportsPlease submit any bugs you find tohttps://github.com/kpj/Smarty/issues.LinksGithub:https://github.com/kpj/SmartyPyPi Homepage:https://pypi.python.org/pypi/smarty
Package: smarty-left-pad
Left-pad for PythonInstallation:pip install smarty-left-padUsagefrom smarty_left_pad.left_pad import left_pad

    >>>left_pad('input', 10, '-')
    -----inputThis package uses doctest for testing, run :code:doctest left_pad.pyto run the tests.Example of run log:(personal386)$pwd/smarty-left-pad/pad_on_left(personal386)$python-mdoctestleft_pad.py-vTrying:left_pad('foo',5)Expecting:'  foo'okTrying:left_pad('foobar',6)Expecting:'foobar'okTrying:left_pad('toolong',2)Expecting:'toolong'okTrying:left_pad(1,2,'0')Expecting:'01'okTrying:left_pad(17,5,0)Expecting:'00017'ok1itemshadnotests:left_pad1itemspassedalltests:5testsinleft_pad.left_pad5testsin2items.5passedand0failed.Testpassed.(personal386)$In case of a failure:Failedexample:left_pad('foo',5)Expected:'  fooN'Got:'  foo'
Package: smartypants
smartypantssmartypantsis a Python fork ofSmartyPants.InstallationTo install it:pipinstallsmartypantsQuick usageTo use it as a module:importsmartypantstext='"SmartyPants" is smart, so is <code>smartypants</code> -- a Python port'print(smartypants.smartypants(text))To use the command-line scriptsmartypants:echo'"SmartyPants" is smart, so is <code>smartypants</code> -- a Python port'|smartypantsBoth produce:&#8220;SmartyPants&#8221; is smart, so is <code>smartypants</code> &#8212; a Python portMore informationDocumentationSource codePyPI
Package: smash
Home-page: https://github.com/philipov/smashAuthor: Philip LoguinovAuthor-email: philipov@gmail.comLicense: MIT LicenseDescription-Content-Type: UNKNOWNDescription: Smash==========The Smart ShellPlatform: UNKNOWNClassifier: Environment :: ConsoleClassifier: Environment :: Other EnvironmentClassifier: Intended Audience :: Information TechnologyClassifier: Intended Audience :: DevelopersClassifier: Intended Audience :: System AdministratorsClassifier: Intended Audience :: End Users/DesktopClassifier: Intended Audience :: Customer ServiceClassifier: License :: Other/Proprietary LicenseClassifier: Operating System :: Microsoft :: Windows :: Windows 7Classifier: Operating System :: POSIX :: LinuxClassifier: Programming Language :: Python :: 3.6
Package: smash-clients
SMASH clientLocal Python clients for Smash.  And maybe a library you can use with them or
something, idk.SMASH xbarThe SMASH xbar client works withxbarto provide
current information on node and service status in your Mac menu bar.SMASH CLI clientThe CLI client provides a command-line interface to the Smash API.smash register node	# wait isn't this done by the agent?  Did I mean
			# something else?  Otherwise what's the use case for
			# providing this functionality here?
smash get node[:status]
smash delete node[:status] [ node[:status] ... ]   ### NOT IMPLEMENTED sorry
smash ack[nowledge] node:status [-x expires when] message
Package: smasher
PySmash, a user-friendly and integrated tool which offers convenience and advantage for the automatic structural alerts derivation and application is presented. The current version of PySmash provides both software and Python package, which achieves both flexibility and ease of pipeline integration. Three kinds of substructure derivation algorithm, including circular, path-based and function group-based algorithms are provided, where researchers can customize own parameters about substructure size, accuracy and coverage, statistical significance and server deployment. Besides, PySmash also provides prediction function for derived substructure application.
Package: smashggAPI
smashgg-api-wrapper-pythonHow to use:pip install smashggAPIAdd your public API key as an environmental variable:In .bashrc/whatever equivalent file:export SMASHGG_API_KEY='your api key here'from smashggAPI import client

result = client.query('''
	query TournamentInfo ($slug: String!) {
		tournament(slug: $slug) {
			id
			name
		}
	}
''',
{
	"slug": "genesis-6"
})ContributingRunning testspython -m pip install -r requirements.txtpython -m pytest
Package: smashpy
The`SMaSH`(Scalable Marker gene Signal Hunter) framework is a general, scalable codebase for calculating marker genes from single-cell RNA-sequencing data for a variety of different cell annotations as provided by the user, using supervised machine learning approaches.  These annotations can be truly general: they can be broad cell types/clusters, detailed sub-types of different broad clusters, cell organ of origin, whether the cell inhabits tumour tissue, surrounding microenvironment, or healthy tissue, and more besides.`SMaSH`implements marker gene extraction using four different models (Random Forest, Balanced Random Forest, XGBoost, and a deep neural network) and two different information gain metrics (Gini impurity for the ensemble learners, and Shapley value for the neural network). For some details on the`SMaSH`implementation please consult our pre-print:https://www.biorxiv.org/content/10.1101/2021.04.08.438978v1, or visit our GitLab repository:https://gitlab.com/cvejic-group/smash.`SMaSH`is integrated with the`ScanPy`framework, working directly from the`AnnData`object of RNA-sequencing counts and a vector of user-defined annotations for each cell according to the marker gene extraction problem.We’re always happy to hear of any suggestions, issues, bug reports, and possible ideas for collaboration.Simone Riva <simo.riva15@gmail.com>, <sgr34@cam.ac.uk>, <sr31@sanger.ac.uk> (University of Cambridge, and Wellcome Sanger Institute)Mike Nelson <nelson@ebi.ac.uk> (University of Cambridge, and EMBL-EBI)
Package: smashrun-client
A Python client for theSmashrunAPI.InstallYou can install the current development release usingpip:pip install --pre smashrun-clientUsageAuthenticationUsing an existing refresh tokenclient=Smashrun(client_id='my_client_id',client_secret='my_secret')client.refresh_token(refresh_token='my_refresh_token')Requesting a token# use urn:ietf:wg:oauth:2.0:oob for applications that aren't a web appclient=Smashrun(client_id='my_client_id',client_secret='my_secret',redirect_uri='urn:ietf:wg:oauth:2.0:auto')auth_url=client.get_auth_url()code=raw_input("Go to '%s' and authorize this application. Paste the provided code here:"%auth_url[0])response=client.fetch_token(code=code)print(response['refresh_token'])NOTE:The example above assumes that you are running Python 2.x. If You are using Python 3.x you can replaceraw_inputwithinput.Fetching activitiesUseSmashrun.get_activitiesto get a list of activities (summaries):activities=client.get_activities()# returns an iterator that handles paginating through the APIforactivityinactivities:printactivity['startDateTimeLocal']Fetch a specific activityUseSmashrun.get_activityto get a specific activity:activity=client.get_activity(1234)printactivity['recordingKeys']For more details on what you can do, seethe codeand theSmashrun APIContributingContributions are greatly appreciated! Feel free to submit a pull request, or file
an issue in ourissue tracker.
Package: smash-tourney
smash-tourneyAboutA simple Python script that, given a list of player names, outputs a random pairing of them (representing two players who will fight) and creates .wav files for each pairing. The .wav files contain a text-to-speech reading of the first player's name, followed by a customizable phrase (say, a classic "VERSUS" line?) and ends with the second player's name.smash-tourney accepts aversus.wavfile in your working directory. This is used to customize the sound used in the end result. Previously, I had included the file in this repository, but I'm not quite sure I'm allowed to do that. Instead, I'll link toThe Sounds Resource, where you can find Smash Bros announcer voice samples. Make sure the file is calledversus.wavinside your working directory!How to useIntended for use with Python >= 3.6.smash-tourney depends on two external libraries:pydubto handle audio files andgTTSto interface with Google's text-to-speech API.You can install smash-tourney using pip!$ pip install smash-tourneyNext, you'll need to create a file with line-separated names for the players who will be participating the the tourney.You're ready to run the script! Suppose the file with the player names is callednames.txtin the current directory. Then simply run:$ smash-tourney names.txtIMPORTANTsmash-tourney will create a folder calledtourneyin its working directory, where it will store the created .wav files for convenience.
Package: smassh
Smassh 🖮Smassh is a TUI based typing test application inspired by MonkeyType-- A very popular online web-based typing applicationSmassh tries to be a full fledged typing test experience but not missing
out on looks and feel![!CAUTION]
Smassh, by default, usesnerd fontsfor the icons
If not installed, you'll see random gibberish iconsInstallation 🔨Using Pip 🐍You can install the stable version of smassh by using pip orpipxpipinstallsmasshUsing AUR 📦yay -S smasshExecutable binary 🔌You should be able to see binaries forLinux,macandwindowsin thereleases section[!NOTE]
This should automatically create an executablesmasshthat can be directly run from command lineIf not, check if the local path is added to$PATHFeatures 🌟Some features that smassh comes with:An interactive & beautiful UIWords and Time modes for typingReal-time comparison of speed caretsChange styles/settings on the flyMutliple theme supportMutliple language supportLots of options to tweak!Tweaks ⚙️TweakDescriptionBlind modeYou wouldn't be able to see your mistakesCapital LettersSome letters in your tasks will be capitalized!Caret StyleCaret style matters!Confidence modeAre you sure you don't need backspace? Try this :)Cursor BuddySetup your cursor buddy to run along with you!DifficultyChoose how strict smassh should be with your wrong keypressesForce CorrectYou wouldn't be able to able to go on without cleaning your pool of mistakesMin AccuracyFall below this average accuracy and you fail!Min BurstFall below this average accuracy for even a word and you fail!Min SpeedFall below this average speed and you fail!Tab ResetHey hey! You wanna reset already? I got ya!Screenshots 🖼️Contribution 🤝SeeCONTRIBUTING.mdfor contributionsCredits@frizdfor the awesome banner@miodecfor monkeytype!Other TUI projects 🤓 :If you liked smassh then you might wanna try out some of my other TUI projects as welldooit- A todo app that you didn't ask for but needed!gupshup- A localhost TUI chat client
Package: smat
SMATA Python API wrapper for theSocial Media Analysis ToolkitInstallation:Clone this repo withgit clone https://github.com/nwithan8/SMAT-API.gitor install from PyPi withpip install smatImport into your project withfrom smat import APIUsage:This library currently supports the three main methods ofSMAT's API:get_content: Get a list of posts from a specific outletget_activity: Aggregate based on a particular field on a specific outletget_time_series: Get a time series for a specific outlettermis a required parameter for each field.siteis a required parameter for each field. You can use the predefined enums insmat.Siteor provide your own string.NOTE: IF you provide an invalid site, you will receive an empty JSON body back from the API.All other parameters are optional or have preset defaults.Docs coming soon. PRs welcome.
Package: smatch
Smatch (semantic match) toolSmatchis an evaluation tool forAMR(Abstract Meaning Representation). It
computes the Smatch score (defined below) of two AMR graphs in terms
of their matching triples (edges) by finding a variable (node) mapping
that maximizes the count,M, of matching triples, then:Mis the number of matching triplesTis the total number of triples in the first AMRGis the total number of triples in the second AMRPrecision is defined asP = M/TRecall is defined asR = M/GThe Smatch score is the F-score:F = 2 * (P*R)/(P+R)For more information, seeCai and Knight,
2013.Requirements, Installation, and UsageThis Smatch implementation is tested for Python 3.5 or higher. It is
releasedon PyPIso you can
install it withpip:$pipinstallsmatchYou can also clone this repository and run thesmatch.pyscript
directly as it does not need to be installed to be used.To use the script, run it with at least the-foption, which takes
two filename arguments:$smatch.py-ftest.amrgold.amrNote that the order of these arguments does not matter for the Smatch
score as the F-score is symmetric, but swapping the arguments will
swap the precision and recall. The files contain AMRs separated by a
blank line, with comment lines starting with#(seetest_input1.txtfor an example).For other options, trysmatch.py --help.Citation@inproceedings{cai-knight-2013-smatch,title="{S}match: an Evaluation Metric for Semantic Feature Structures",author="Cai, Shu and Knight, Kevin",booktitle="Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",month=aug,year="2013",address="Sofia, Bulgaria",publisher="Association for Computational Linguistics",url="https://www.aclweb.org/anthology/P13-2131",pages="748--752",}Recommendations for Reproducible ResearchYou can help make your research reproducible by including the
following information in your writing:The software version (e.g., repository URL and version number)The number of restarts (-r) used, even if unchanged from the defaultThe order of the arguments to-f(if reporting precision and recall)Any other options or preprocessing stepsHistoryThe code was mostly developed during 2012 and 2013, and has undergone
many fixes and updates. Note that the versions distributed forSemEval-2016were numbered 2.0–2.0.2, but these predate this repository and
the1.0 series on
PyPI. For more details, see
theChangelog.Related ProjectsHere are some notable forks of Smatch:didzis/pSMATCHadds
parallelization for speedisi-nlp/smatchadds an ILP
solver for getting optimal variable mappingscfmrp/mtoolpackages the version
of Smatch used for theMRPworkshop atCONLL
2019And here are other evaluation metrics for AMR:mdtux89/amr-evaluationoffers a set of metrics based on Smatch for fine-grained evaluationfreesunshine0316/sembleuis inspired by BLEU and puts more weight on "content" than
graph-structure similarityrafaelanchieta/semaweights error types differently and does not consider which node is
the graph's top