package
stringlengths
1
122
pacakge-description
stringlengths
0
1.3M
andromeda
No description available on PyPI.
andromeda-chain
No description available on PyPI.
andromeda-nlp
andromedaEasy longform text generation for creative writing.InstallationInstall from PyPI:pip install andromeda-nlpDocumentationRead the documentation for this projecthere.GoalsServe as an easy-to-understand introduction to text generation, even for those with little to no programming experienceInvestigate the efficacy and practicality of using an NLP model for assistance with creative writingThe package should be modular and expandable; contributions are always encouragedContributingTo contribute,look at open issues, fork the repository and open a pull request with your changes. Or, if you experience an issue, please open one!
andromeda-torch
Andromeda: Ultra-Fast and Ultra-Intelligent SOTA Language Model 🚀🌌Welcome to Andromeda, The Fastest, Most Creative, and Reliable Language Model Ever Built, train your own verison, conduct inference, and finetune your own verison with simple plug in and play scripts get started in 10 seconds:Features💼 Handle Ultra Long Sequences (32,000-200,000+ context lengths)⚡ Ultra Fast Processing (32,000+ tokens in under 100ms)🎓 Superior Reasoning Capabilities🎯 PrinciplesEfficiency: Optimize with techniques like attention flashing, rotary position encodings, and deep normalization.Flexibility: Adapt to various tasks and domains for wide applications.Scalability: Designed to scale with resources and data sizes.Community-Driven: Thrives on contributions from the open-source community.💻 Installpython3.11 -m pip install --upgrade andromeda-torchUsageForward pass with random inputsimporttorchfromandromeda.configsimportAndromeda1Billionmodel=Andromeda1Billion()x=torch.randint(0,256,(1,1024)).cuda()out=model(x)# (1, 1024, 20000)print(out)Tokenized inputsfromandromeda_torchimportTokenizerfromandromeda_torch.configsimportAndromeda1Billionmodel=Andromeda1Billion()tokenizer=Tokenizer()encoded_text=tokenizer.encode("Hello world!")out=model(encoded_text)print(out)📚 TrainingSet the environment variables:ENTITY_NAME: Your wandb project nameOUTPUT_DIR: Directory to save the weights (e.g.,./weights)MASTER_ADDR: For distributed trainingMASTER_PORTFor master port distributed trainingRANK- Number of nodes servicesWORLD_SIZENumber of gpusConfigure the training:Accelerate ConfigEnable Deepspeed 3Accelerate launch train_distributed_accelerate.pyFor more information, refer to theTraining SOP.TodoAdd Yarn Embeddings from zeta📈 BenchmarksSpeedAndromeda utilizes one of the most reliable Attentions ever, flash attention 2.0 Triton. It consumes 50x less memory than GPT-3 and 10x less than LLAMA.We can speed this up even more with dynamic sparse flash attention 2.0.LicenseApache License
andromeda-transformer
No description available on PyPI.
andronnlib
No description available on PyPI.
androset
Android-Certificate-Automated script to push Burp Suite certificate in AndroidPrerequisitesPython 3+ (Not verified)adb in system environment variablesBurp or Other CA cert in DERInstallationManual Installationgitclonehttps://github.com/Anof-cyber/androsetcdandrosetpipinstall-rrequirements.txtInstall with PIPpip install androsetUsage/ExamplesConvert and push Burp Certificate to androidpython3androset.pycert--certcacert.derSpecify ADB IP and Portpython3androset.pycert--certcacert.der--adbip127.0.0.1:5555Modify Android IPTable to redirect all traffic to burppython3androset.pyburp--burpip127.0.0.1:8080python3androset.pyburp--burpip127.0.0.1:8080--adbip127.0.0.1:5555push burp cert and modify IP tablepython3androset.pycertburp--burpip127.0.0.1:8080--adbip127.0.0.1:5555--certcacert.derAcknowledgementsThe tool is Created usingChatGPTwith some custom modification.
androtools
androtools一个对Android SDK相关的命令封装的库。
andrototal-cli
Command line tool for analyzing apk on Android antiviruses.Requires:adapers packageandropilot packageavds (with the antivirus installed) inside HOME/.android/avd/Installation:pip install andrototal-cli –process-dependency-linksBasic usage:andrototal-cli path/of/sample/apk NameOfTheAntivirusNameOfTheAntivirus:one from the adapters package(there must exist and avd: name.of.the.antivirus inside HOME/.android/avd/)Example:andrototal-cli malware.apk ComAntivirususage: andrototal-cli [-h] [-test-method {install,copy}][-log-level {DEBUG,INFO,WARNING,ERROR}] [-window [WINDOW]] [-file-log FILE_LOG] [-max-retries {1,2,3,4}] [-store-device-data [STORE_DEVICE_DATA]] malware_sample antivirus [antivirus …]positional arguments:malware_sample path of the apk sample antivirus name of the antivirusoptional arguments:-h, –help show this help message and exit-test-method {install,copy}, -t {install,copy}test method-log-level {DEBUG,INFO,WARNING,ERROR}, -l {DEBUG,INFO,WARNING,ERROR}logging level.-window [WINDOW], -w [WINDOW]display emulator’s graphical window-file-log FILE_LOG, -fl FILE_LOGRedirect logger to file-max-retries {1,2,3,4}, -m {1,2,3,4}maximum number of scan retries when a non fatal exceptions occurs-store-device-data [STORE_DEVICE_DATA], -sd [STORE_DEVICE_DATA]store device logcat and snapshot in device_data folderoutput:{‘sample’: {‘sha256’: ‘1944d8ee5bdda3a1bd06555fdb10d3267ab0cc4511d1e40611baf3ce1b81e5e8’,‘md5’: ‘77b0105632e309b48e66f7cdb4678e02’,‘sha1’: ‘4de0d8997949265a4b5647bb9f9d42926bd88191’},‘test_count’: 1, ‘success_count’: 1, ‘tests’: [{‘status’: ‘SUCCESS’,‘ended_at’: ‘2016-06-08 14:01:27’,‘detected_threat’: ‘THREAT_FOUND’,‘antivirus’: ‘ComAntivirus’,‘started_at’: ‘2016-06-08 14:00:34’,‘analysis_time’: 19}], ‘failure_count’: 0}
androwarn
AndrowarnYet another static code analyzer for malicious Android applicationsDescriptionAndrowarn is a tool whose main aim is to detect and warn the user about potential malicious behaviours developped by an Android application.The detection is performed with the static analysis of the application's Dalvik bytecode, represented as Smali, with theandroguardlibrary.This analysis leads to the generation of a report, according to a technical detail level chosen from the user.FeaturesStructural and data flow analysis of the bytecode targeting different malicious behaviours categoriesTelephony identifiers exfiltration: IMEI, IMSI, MCC, MNC, LAC, CID, operator's name...Device settings exfiltration: software version, usage statistics, system settings, logs...Geolocation information leakage: GPS/WiFi geolocation...Connection interfaces information exfiltration: WiFi credentials, Bluetooth MAC adress...Telephony services abuse: premium SMS sending, phone call composition...Audio/video flow interception: call recording, video capture...Remote connection establishment: socket open call, Bluetooth pairing, APN settings edit...PIM data leakage: contacts, calendar, SMS, mails, clipboard...External memory operations: file access on SD card...PIM data modification: add/delete contacts, calendar events...Arbitrary code execution: native code using JNI, UNIX command, privilege escalation...Denial of Service: event notification deactivation, file deletion, process killing, virtual keyboard disable, terminal shutdown/reboot...Report generation according to several detail levelsEssential (-v 1) for newbiesAdvanced (-v 2)Expert (-v 3)Report generation according to several formatsPlaintexttxtFormattedhtmlfrom a Bootstrap templateJSONUsageOptionsusage: androwarn [-h] -i INPUT [-o OUTPUT] [-v {1,2,3}] [-r {txt,html,json}] [-d] [-L {debug,info,warn,error,critical,DEBUG,INFO,WARN,ERROR,CRITICAL}] [-w] version: 1.4 optional arguments: -h, --help show this help message and exit -i INPUT, --input INPUT APK file to analyze -o OUTPUT, --output OUTPUT Output report file (default "./<apk_package_name>_<timestamp>.<report_type>") -v {1,2,3}, --verbose {1,2,3} Verbosity level (ESSENTIAL 1, ADVANCED 2, EXPERT 3) (default 1) -r {txt,html,json}, --report {txt,html,json} Report type (default "html") -d, --display-report Display analysis results to stdout -L {debug,info,warn,error,critical,DEBUG,INFO,WARN,ERROR,CRITICAL}, --log-level {debug,info,warn,error,critical,DEBUG,INFO,WARN,ERROR,CRITICAL} Log level (default "ERROR") -w, --with-playstore-lookup Enable online lookups on Google PlayCommon usage$ python androwarn.py -i my_application_to_be_analyzed.apk -r html -v 3By default, the report is generated in the current folder.An HTML report is now contained in a standalone file, CSS/JS resources are inlined.Sample applicationA sample application has been built, concentrating several malicious behaviours.The APK is available in the_SampleApplication/bin/folder and the HTML report is available in the_SampleReportsfolder.Dependencies and installationPython 3 or Python 2.7 + androguard + jinja2 + play_scraper + argparseTheeasiest wayto setup everything:pip install androwarnand then directly use$ androwarnOr git clone that repository andpip install -r requirements.txtChangelogversion 1.6 - 2019/05/30: Python 3 support and few fixesversion 1.5 - 2019/01/05: few fixesversion 1.4 - 2019/01/04: code cleanup and use of the latest androguard versionversion 1.3 - 2018/12/30: few fixesversion 1.2 - 2018/12/30: few fixesversion 1.1 - 2018/12/29: fixing few bugs, removing Chilkat dependencies and pip packagingversion 1.0 - from 2012 to 2013ContributingYou're welcome, any help is appreciated :)ContactThomas Debize < tdebize at mail d0t com >Join #androwarn on FreenodeCopyright and licenseAndrowarn is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.Androwarn is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License along with Androwarn.If not, seehttp://www.gnu.org/licenses/.GreetingsStéphane Coulondre, for supervising my Final Year projectAnthony Desnos, for his amazingAndroguardproject and his help through my Final Year project
andruid-DracarysX
AnDruidAndroid Analyzer
ands
No description available on PyPI.
andtate
Finding Glitches And Loop Holes In Matrix And Trying To Break The System
anduin
一个轻量化的sqlite/mysql数据序列化操作引擎 名称来自《指环王》<=========使用指南=========>参见github wiki页面[使用指南](https://github.com/campanulamediuml/Anduin/wiki)
anduindata
a lite mysql connector… Name from the Lord of Ring<=========how to use=========>from anduin.server import Datacond = [(col1,’=’,val1), (col2,’=’,val2), ….]fields = [col1, col2 …]params = {key1:val1, key2:val2, …}find one line of data:Data.find(__TableName__,conditions=cond,fields=fields)return a python dict like { col1:value1,col2:value2…}find datasData.select(__TableName__,conditions=cond,fields=fields)return a python list like [{ col1:value1,col2:value2…}]update data:Data.update(__TableName__,conditions=cond,params=params)return Noneinsert data:Data.insert(__TableName__,params=params)return Nonedelete data:Data.delete(__TableName__,conditions=cond)return Noneusing Data.query() to execute sql directly like Data.query(‘select * from table’)
anduryl
No description available on PyPI.
anduschain
anduschain-pythonInstallpip install anduscahinUsagefrom web3 import Web3 from anduschain.middleware import construct_sign_and_send_raw_middleware my_provider = Web3.HTTPProvider('http:/RPC-URL:8545') w3 = Web3(my_provider) ADDRESS = '0xfef6f81c2c9e1fa327cad572d352b913bc074a0d' KEY_FILE = './tmp/UTC--2019-09-30T08:50:41Z--fef6f81c2c9e1fa327cad572d352b913bc074a0d.json' KEY_PASS = 'KEYPASS sender = Web3.toChecksumAddress(ADDRESS) # read local keyfile with open(KEY_FILE) as keyfile: encrypted_key = keyfile.read() private_key = w3.eth.account.decrypt(encrypted_key, KEY_PASS) # add anduschain middleware w3.middleware_onion.add(construct_sign_and_send_raw_middleware(private_key)) w3.eth.defaultAccount = sender try: result = w3.eth.sendTransaction({'to': sender, 'gas': 21000, 'value': 1}) print(Web3.toHex(result)) except Exception as err: print("=====Exception======", str(err))
andy
No description available on PyPI.
andyao.mdspliter.tree
No description available on PyPI.
andycalculator
This is a very simple calculator that takes two numbers and either add, subtract, multiply or divide them.Change Log0.0.1 (21/01/2022)First Release
andydirn
No description available on PyPI.
andydirnberger
No description available on PyPI.
andy-fraud
AndyAndy* is an anti-typosquatting suite created tocombat Steam Tradelink & Discord Nitro fraudlinks. With a correct configuration, Andy will achieve a ridiculous accuracy. In my tests, Andy achieved a 100% accuracy rate (0% false-negatives) with 0% false positives.While Andy was developed with Steam and Discord in mind, it can hypothetically used for virtually any websites.*any resemblance to persons, whether real or ficticious, is purely coincidental.How it worksGiven a URL, called test URL henceforth, it should be checked whether or not it is a fraudulent URL given the config provided. In essence, Andy will compute the normalizedLevenshtein distancebetween the test URL and configured valid domains. If this distance shows high similarity, or it contains part of a valid domain (thinkdiscord-nitrocontainingdiscordfromdiscord.com) it will flag the URL as fraudulent. Alternatively, it will attempt to perform similar comparisons on the domain contents, URL path and URL querystrings in order to compute a final verdict.ConfigurationAndy requires a valid configuration dictionary. This will consist of the following keys:KeyTypeDescriptiondomaindict of string keys and string array valuesA dictionary of all legitimate domains (2nd/3rd level) with their associated TLDs.domain_threshold[0-1]How similar the base domain should be to trigger suspicion.domain_keywordsstring arrayA list of fraudulent keywords in the domain.domain_keywords_threshold[0-1]How similar the base domain should be to trigger keyword processing.pathstring arrayA list of fraudulent keywords in the path.path_threshold[0-1]How similar strings in the path should be to trigger suspicion.path_splitbooleanWhether to split on "-" in the path and check parts individually.querystring arrayA list of fraudulent keywords in a querystring.query_threshold[0-1]How similar querystrings should be to trigger suspicion.query_splitbooleanWhether to split on "-" in the querystring and check parts individually.Note:All categories exceptdomain_keywordsuse Levenshtein distance to trigger with "similar" strings. For example, the keyword "gift" will cause "g1ft" to trigger too. Additionally, there must be at least one value indomain.Warning:Setting any of the split values totruemay considerably increase your false positive rate if misconfigured.ExampleFor example, using (not all config elements are shown):"domain":{"discord":["com","gg","gift"],"steamcommunity":["com"]}The following URLs will be evaluated as follows:discord.com-> No fraudd1scorrd.com-> Frauddiscord.biz-> Fraudsteamcommunity.com-> No fraudstreamcommmunity.com-> FraudInstallationpip install andy-fraudUsage (library)Andy can be used as a library for other projects.Loading the configFirst, the config needs to be loaded. The config can be stored anywhere, from purely in-memory to persisting in a JSON file. For this example, let us assume the config is in a file, and we are parsing it as JSON.config=json.load(config_file)Getting a parsed URLThe algorithm requires a parsed URL. This can be obtained easily, wherestringis a variable that contains our link as a string.parsed=urllib.parse.urlparse(string)Testing if the URL is fraudulentThis snippet demonstrates how to actually tell if a URL is fraudulent. It includes the import of the package.fromandyimportsuiteifsuite.is_scam(config,parsed):print("Likely a scam link!")else:print("Probably not a scam link!")Usage (command line)Andy can be run from the command line to test the accuracy of detection. For this, two files are needed. Both files contain one domain per line (tailing and leading whitespace is ignored). The first file, referred to as the legitimate file, will contain only URLs that are not considered fraud. The second file, referred to as the scam file, will contain only URLs that are fraudulent. Andy will then test how many of the URLs from the legitimate file Andy flags as fraudulent, and vice versa.Command line argumentsAs such, 3 command line arguments are required:The path of the config file (must be stored in JSON format).The path of the legitimate file.The path of the scam file.Running the scriptMake sure that the package is installed (see above). This is an example, your file names may differ!General:python -m andy config.json legit.txt scam.txtWindows:py -m andy config.json legit.txt scam.txt
andyg-test-package
UNKNOWN
andy_hello
UNKNOWN
andymckay-sample
No description available on PyPI.
andy_nester
No description available on PyPI.
andyofmelbourne-pytemplate
# pytemplatetemplate python project## To make your own1. make a new repo on [github](https://github.com), then clone it locally2. sudo apt-get install git-flow* see [the github](https://jeffkreeftmeijer.com/git-flow/)* for an existing project: `$ git flow init`3. make a directory with the same name as the repo, put an `__init__.py` in there4. write your functions in this directory5. make the setup.py
andy-package-demo
No description available on PyPI.
andypdf
This is the homepage of our project.
andystring
No description available on PyPI.
andytestutil
No description available on PyPI.
andytwoods
Failed to fetch description. HTTP Status Code: 404
ane
No description available on PyPI.
anecapi
anecAPIDescriptionanecAPIallows you to display funny (or not) USSR/Russian jokes (also called anecdotes).All jokes are in Russian only.Installationpip install anecapiExampleIn ConsoleC:\anecAPI> python anecAPI.py -h usage: anecAPI.py [-h] [-m] [-s] [-a] Displays a funny (or not) USSR/Russian joke (also called anecdote). optional arguments: -h, --help show this help message and exit -m, --modern display a modern Russian joke -s, --soviet display an old USSR joke -a, --any display a USSR/Russian joke (default) C:\anecAPI> python anecAPI.py -m Штирлиц с Навальным пили водку и вдруг Навальный отрубился "Новичок"- подумал ШтирлицIn CodefromanecAPIimportanecAPIprint(anecAPI.modern_joke())# Displays a modern Russian jokeprint(anecAPI.soviet_joke())# Displays an old USSR jokeprint(anecAPI.random_joke())# Displays a random USSR or Russian joke
anecc
No description available on PyPI.
anedya-dev-sdk
Anedya SDKTheAnedya SDKis a Python package designed to provide an easy-to-use interface forAnedyacloud services, which enables seamless connectivity and data retrieval from IoT devices. This SDK supports both MQTT and HTTP communication methods.This SDK wraps the Device APIs available in theAnedya DocumentationThis is a Device SDK, i.e. it is meant to be used by an IoT device.InstallationTo install the Anedya SDK, you can usepip:pipinstallanedya-dev-sdk
aneel
====Aneel====About=====Aneel is an editor-agnostic Markdown, reStructuredText and Textile live previewer.Once you save your file, the rendered HTML will automatically get reloadedin your favourite browser.The Original Version is moo_ . Aneel fork from moo ( `commit history`_ ), And add function ofreStructuredText live previewer... _moo: https://github.com/pyrocat101/moo.. _`commit history`: https://github.com/pyrocat101/moo/commits/876de66f792ac42df7dba2e1416fb7aeae8feeb2Installation============.. code:: bashpip install aneelRequirements============aneel requires* mistune_ (optional)* `python-textile`_ (optional)* `bottle.py`_* pygments_* docutils_* CherryPy_* docopt_.. _mistune: https://github.com/lepture/mistune.. _`python-textile`: https://github.com/sebix/python-textile.. _`bottle.py`: http://bottlepy.org/.. _pygments: http://pygments.org/.. _docutils: https://pypi.python.org/pypi/docutils.. _CherryPy: http://www.cherrypy.org/.. _docopt: https://github.com/docopt/docoptUsage=====Opens preview in browser with server listening on 3000::aneel --port 3000 your-doc.markdownExport to HTML only::aneel -o exported.html your-doc.markdownTo specify file type::aneel --filetype rst READMERESTful API===========+-------------------------+-------------+----------------------------------+-------------------------+| Action | HTTP Method | Request URL | Response Body |+=========================+=============+==================================+=========================+| Get preview | GET | http://localhost:\<port\> | \<Preview content\> |+-------------------------+-------------+----------------------------------+-------------------------+| Get updated content | POST | http://localhost:\<port\>/update | \<Rendered body\> |+-------------------------+-------------+----------------------------------+-------------------------+| Close server | DELETE | http://localhost:\<port\> | |+-------------------------+-------------+----------------------------------+-------------------------+See `source files`_ for more details... _`source files`: https://github.com/hhatto/aneelLicense=======(The MIT License)Links=====* GitHub_* PyPI_.. _GitHub: https://github.com/hhatto/aneel.. _PyPI: https://pypi.python.org/pypi/aneel/
aneeshcalculator
Failed to fetch description. HTTP Status Code: 404
aneki
AnekiRandom russian jokes (especially about computer and etc) from several sites in your terminalUsageInstallation:pip3 install anekiUsage:anekiTest is everything OK:aneki -tDependenciesProject tested on Python 3.5 - 3.8 for Ubuntu 16.04 - 18.04.Project have single dependency - "requests"SitesCurrently (11.01.2020) next sites are supported:bash.imanekdot.runekdo.rushytok.netNext sites won't be supported:anekdotov.net - not funny IMHOpikabu.ru, ithappens.me - too long stories
anekos
anekosAn asynchronous wrapper for nekos.life APIFeaturesYou can download the images! (usingaiofile)Easy to use with an object-oriented design.Install# Linux/macOSpython3-mpipinstall-Uanekos# Windowspy-3-mpipinstall-UanekosTo install the development version, do the following:$gitclonehttps://github.com/Nekos-life/Async-nekos.life-wrapper.git$cdAsync-nekos.life-wrapper$python3-mpipinstall-U.Optional Packagesaiodns,brotlipy,cchardet(for aiohttp speedup)orjson(for json speedup)Quick ExamplefromanekosimportNekosLifeClient,SFWImageTagsfromasyncioimportget_event_loopclient=NekosLifeClient()asyncdefmain():result=awaitclient.image(SFWImageTags.WALLPAPER)print(result.url)loop=get_event_loop()loop.run_until_complete(main())LinksIssues
anekos.py
No description available on PyPI.
anek-process
A package to provide ability to execute a small program in parallel with the ability to stop the execution in the middle without thinking too much about memory leaks.
anek-service
No description available on PyPI.
anel-pwrctrl-homeassistant
This package is created fromhttps://github.com/mweinelt/anel-pwrctrl/archive/ed26e8830e28a2bfa4260a9002db23ce3e7e63d7.zip#anel_pwrctrl==0.0.1No updates are expected.
an-em-design
Electrical Machines Design Automation by Ansys Maxwell ScriptYouTube Vediohttps://youtu.be/uStT2k3V6x0GoalSetup a python api server, accept motor spec(stator Outer Diameter, DC bus voltage, max toruqe, max speed), auto design, draw and run ansys analysis, finally response result data(BEMF, cogging torque, max torque, torque ripple, induce voltage, efficiency) (Now just 10p12s Surface PM design, It still working on...)RequirementsWindows 7 or aboveLegal Ansys Maxwell Electromagnetic SuitePython 3python 3.7.6Python librarypywin32==227ramda==0.5.5six==1.13.0functional-pipeline==0.3.1ipdb==0.12.3Flask==1.1.2Flask-Cors==3.0.8pandas==1.0.1numpy==1.18.1requests==2.24.0Environment Install Guide (Verified)Install Python 3.7.6(optional) Install virutal envpip install virtualenvoptional) create virutal envvirutalenv venv(optional) activate virutal env./venv/Scripts/activateInstalled needed library using the following commandpip install -r requirements.txtSPM Motor paramsall setting are in params/Execute Guideactive virtual env./venv/Scripts/activateexecutejust run analysis(params set at spec_params in run.py) - python run.pyrun flask api server and call ansys run and return result as response (POST method, json data sample in example/, url =http://localhost:5000/run_simu) - python server.pyrun flask api server, call but run ansys asyc in backgroud and return result use request to another url (POST method, json data sample in example/, url =http://localhost:5000/run_simu) - python server_run_back.py
anemic
AnemicApplication framework and support library for deployment-friendly apps with and without webHow to installpip install anemic
anemoi
No description available on PyPI.
anenvconf
anenvconfA python3 module for defining a config schema and importing it from environment variables.Installpython3-mpipinstallanenvconfUsageImport the modules key classes, define the config schema and create a Config object with the schema.fromanenvconfimportConfig,ConfigValueTypeconfig_schema={'jsonvar1':{'type':ConfigValueType.JSON,'required_key':'important_key'},'stringvar1':{},'stringvar2':{'default':"Default value in case setting this variable is not mandatory"},'boolvar1':{'type':ConfigValueType.BOOL,'default':True}}config=Nonetry:config=Config(config_schema)exceptanenvconf.exceptions.InvalidValueExceptionase:print("Got an invalid value: ",e.text)exceptanenvconf.exceptions.EnvironmentVarMissingExceptionase:print("A required environment variable is missing: ",e.text)exceptanenvconf.exceptions.RequiredVarMissingExceptionase:print("A required value inside a variable is missing: ",e.text)ifconfigisnotNone:print(config.get_value("stringvar2"))SchemaThe schema is given as a dict, where the keys are the environment variables to read, and each of their values is an another dict that defines details about how to handle that variable. The dict that defines the handling can have the following keys:typeis the data type of the variable value, defined asConfigValueType. Supported types arestr(default),bool,intandjson.defaultis the default value of the variable. Ifdefaultis not set, the environment variable is treated as mandatory. If you want to have optional variables, you can for example setdefaulttoNone.required_keydefines a key that is required in the keys of ajsontype of value. If the key is not found, an exception is raised.Example:example_config_schema={# Use "type" to define ConfigValueType, string is assumed by default.'env_variable_name1':{'type':ConfigValueType.JSON},# Default data type is string'env_variable_name2':{},# If default value exists, value from environment variable is not required.# Otherwise the key-value pair is expected to be found in the env variables.'env_variable_name3':{'type':ConfigValueType.JSON,'default':'{}'}}
ane-probability-dist
No description available on PyPI.
aneris
anerisAneris is the __goddess__ of order and non_being.aneris.py is intended to bring order and ultimately non_being to your work load.Configure your team’s available work hours in the dict defined in aneris_workers.pyRun anerisIn the ncurses tui:Add your projects and their deadlines.When highlighting a project, add tasks and the number of hour’s work remaining to complete them.Edit your team’s avaliable work hours to account for deviations from their default calendars.Project completion dates are calculated.Any deadlines that you’re on course for missing are highlighted.Remedial action can then be taken early to add more available hours, remove tasks or re-order projects.In the tui, press ‘h’ or ‘?’ to see a list of control keys.InstallationTo install:pip3 install anerisWindows users: A rudimentary binary installer is included for you in case you find it useful. However, as Aneris uses curses (and the python curses library is unix only) this will not work “out of the box”. Aneris DOES however run very nicely under cygwin…ChangelogFixed in version 0.6 - (Beta)IMPROVEMENT:Move project cursor when changing project priority, so for example, pressing plus twice moves the same project up 2.Fixed in version 0.5 - (Beta)BUGFIX:Fixed exception thrown on save under some circumstances: for day in self.m_worker_calendar_exceptions.keys(): RuntimeError: dictionary changed size during iterationTASK:Added top level executable script (installed as /usr/local/bin/aneris)Fixed in version 0.4 = (Beta)First (just about) usable release.TODOAdd editor for default calendars. Currently, upgrading aneris overwrites default calenders…Unfortunately it is likely to be a while before this issue gets resolved as although annoying, it’s not really blocking me. If lots of people moan, I might bother sooner.
aneris-iamc
No description available on PyPI.
anes
# What?The scripts here transform the [ANES data](http://www.electionstudies.org/studypages/download/datacenter_all_NoData.php) into something fit for my consumption (i.e. not STATA). There are codebook generators and ELT tools.# Why?The ANES data is semi-open, as is typical in academia. There is a registration process, and – I assume – not everyone gets admitted backstage. Your.eduis probably your pass. Therefore, I can’t provide any data in this repository. I can only provide the scripts.
anesthetic
Authors:Will Handley and Lukas HergtVersion:2.7.0Homepage:https://github.com/handley-lab/anestheticDocumentation:http://anesthetic.readthedocs.io/anestheticbrings together tools for processing nested sampling chains by leveraging standard scientific python libraries.TLDR: See thequickstart.Current functionality includes:Computation of Bayesian evidences, Kullback-Liebler divergences and Bayesian model dimensionalities.Marginalised 1d and 2d plots.Dynamic replaying of nested sampling.This tool was designed primarily for use with nested sampling outputs, although it can be used for normal MCMC chains.For an interactive view of a nested sampling run, you can use theanestheticscript.$anesthetic<nsfileroot>FeaturesBoth samples and plotting axes are stored as apandas.DataFrame, with parameter names as indices, which makes for easy access and modification.Sensible color scheme for plotting nearly flat distributions.For easy extension/modification, uses the standard python libraries:numpy,scipy,matplotlibandpandas.Installationanestheticcan be installed via pippipinstallanestheticor from the repositorygitclonehttps://github.com/handley-lab/anestheticcdanestheticpython-mpipinstall.You can check that things are working by running the test suite:exportMPLBACKEND=Agg# only necessary for OSX userspython-mpipinstall".[test]"python-mpytestflake8anesthetictestspydocstyle--convention=numpyanestheticDependenciesBasic requirements:Python 3.9+matplotlibnumpyscipypandasfastKDEDocumentation:sphinxnumpydocTests:pytestDocumentationFull Documentation is hosted atReadTheDocs. To build your own local copy of the documentation you’ll need to installsphinx. You can then run:python-mpipinstall".[all,docs]"cddocsmakehtmland view the documentation by openingdocs/build/html/index.htmlin a browser. To regenerate the automatic RST files run:sphinx-apidoc-fM-tdocs/templates/-odocs/source/anesthetic/CitationIf you useanestheticto generate plots for a publication, please cite as:Handley, (2019). anesthetic: nested sampling visualisation. Journal of Open Source Software, 4(37), 1414, https://doi.org/10.21105/joss.01414or using the BibTeX:@article{anesthetic,doi={10.21105/joss.01414},url={http://dx.doi.org/10.21105/joss.01414},year={2019},month={Jun},publisher={The Open Journal},volume={4},number={37},pages={1414},author={Will Handley},title={anesthetic: nested sampling visualisation},journal={The Journal of Open Source Software}}ContributingThere are many ways you can contribute via theGitHub repository.You canopen an issueto report bugs or to propose new features.Pull requests are very welcome. Note that if you are going to propose major changes, be sure to open an issue for discussion first, to make sure that your PR will be accepted before you spend effort coding it.Questions/CommentsAnother posterior plotting tool?This is my posterior plotter. There are many like it, but this one is mine.There are several excellent tools for plotting marginalised posteriors:getdistcornerpygtcdynestyMontePythonWhy create another one? In general, any dedicated user of software will find that there is some functionality that in their use case is lacking, and the designs of previous codes make such extensions challenging. In my case this was:For large numbers of samples, kernel density estimation is slow, or inaccurate (particularly for samples generated from nested sampling). There are kernel density estimators, such asfastKDE, which ameliorate many of these difficulties.Existing tools can make it difficult to define new parameters. For example, the default cosmomc chain definesomegabh2, but notomegab. The transformation is easy, sinceomegab = omegabh2/(H0/100)**2, but implementing this transformation in existing packages is not so trivial.anestheticsolves this issue by storing the samples as a pandas array, for which the relevant code for defining the above new parameter would befromanestheticimportread_chainssamples=read_chains(file_root)# Load the sampleslabel='omegab'tex='$\Omega_b$'h=(samples.H0/100)samples[(label,tex)]=samples.omegabh2/h**2# Define omegabsamples.plot_1d('omegab')# Simple 1D plotMany KDE plotting tools have conventions that don’t play well with uniformly distributed parameters, which presents a problem if you are trying to plot priors along with your posteriors.anesthetichas a sensible mechanism, by defining the contours by the amount of iso-probability mass they contain, but colouring the fill in relation to the probability density of the contour.What’s in a name?There is a convention for naming nested sampling packages with words that have nest in them (nestle and dynesty,nestorflow). Doing a UNIX grep:grepnest/usr/share/dict/wordsyields a lot of superlatives (e.g. greenest), but a few other cool names for future projects:amnestydefenestratedishonestlyinestimableminestronerhinestoneI choseanestheticbecause I liked the soft ‘th’, and in spite of the US spelling.
anesto
Akamai NetStorage API for Python+ pip install anestoCommon Variablesarlor Akamai Resource Locator, here, is a NetStorage target for an operation; examples areakamai://example-nsu.akamaihd.net/395007/my/path/special.log akamai://example-nsu.akamaihd.net/395007/my/path/ example-nsu.akamaihd.net/395007/my example-nsu.akamaihd.net/395007The host name and CP code (here395007) are two required elements of thearl. Trailing slash doesn't indicate files inside the target folder, so avoiding it is a cleaner practice.keyandkeyname- a pair you must have for authentication when using NetStorage.You can start working with NetStorage like so:importanestons=anesto.Client()# this will have the same effect as :ns=anesto.Client(retry_number=3,conn_timeout=6,read_timeout=9,url_safe_chars='/~')All functions available bynsrely onRequests moduleand returnResponse object, from where you can get all request-response headers and the status code.When renaming or removing a target you may wish to treat 404 response as success because when HTTP request is initially delivered but associated response is lost, and the client retries the same request on timeout, the server returns 404 as the job has already been done, and the old target is no longer there. You may change timeout-retry behaviour onClient()instance as per above.url_safe_charsis exposed to let you deal with implementations being out of sync,url-encoding of tildais one example.Available FunctionsAny function can be used like so:key='<yourAkamaiKey>'keyname='<yourAkamaiKeyname>'ns.download(arl,key,keyname,saveto)# arl e.g. akamai://example-nsu.akamaihd.net/395007/my/path/special.log# saveto is an existing folder or a file target, e.g. '~/Downloads'# files onlyWe further assume thatkeyandkeynameare defined...ns.upload(arl,key,keyname,file)# arl e.g. akamai://example-nsu.akamaihd.net/395007/my/path/special.log# file e.g. `~/Documents/special.log`# files onlyns.delete(arl,key,keyname)# files and symlinks onlyprint(ns.xdir(arl,key,keyname).text)# xdir().text returns XML string describing contents of a folder specified by arl# folders onlyprint(ns.xdu(arl,key,keyname).text)# xdu().text returns XML string with metadata, such as total number of files and# disk space taken by a folder specified by arl# folders onlyns.mkdir(arl,key,keyname)# creates a folderns.mtime(arl,key,keyname,988888888)# cannot change folders# changes modification time stamp to unix epoch specified e.g.ns.quickdelete(arl,key,keyname)# Recursive folder remover - must be explicitly enabled by Akamai, see rmdir_rec() below# folders onlyns.rename(arl,key,keyname,uri):# all path folders must exist, moves under same CP code only# uri e.g. "/395007/mypath/dir-v-test/vtest2"# uri e.g. "../vtest" (relative to arl)# files and symlinks onlyns.rmdir(arl,key,keyname)# removes an empty folder# folders onlyns.rmdir_rec(arl,key,keyname)# removes a folder recursively# Only recursive function here with many HTTP calls. May crash on stack overflow# folders onlyprint(ns.stat(arl,key,keyname).text)# stat().text returns XML string describing metadata of any target specified by arl# folders, files, symlinksns.symlink(arl,key,keyname,target)# creates a symlink specified by arl# target e.g. "/395007/my/path/dir-v-test/vtest2"# target e.g. "../vtest/" (relative to arl)Symlinks does not work as such when you access NetStorage, they are followed by Akamai CDN using them as the origin.Packagingpip install --upgrade setuptools wheel twine python3 setup.py sdist bdist_wheel twine upload dist/* rm -r dist build anesto.egg-info
ane-transformers
Apple Neural Engine (ANE) TransformersUseane_transformersas a reference PyTorch implementation if you are considering deploying your Transformer models on Apple devices with an A14 or newer and M1 or newer chip to achieve up to10 times fasterand14 timeslower peak memory consumption compared to baseline implementations.ane_transformers.referencecomprises a standalone reference implementation andane_transformers.huggingfacecomprises optimized versions ofHugging Facemodel classes such asdistilbertto demonstrate the application of the optimization principles laid out in our research article on existing third-party implementations.Please check out ourresearch articlefor a detailed explanation of the optimizations as well as interactive figures to explore latency and peak memory consumption data from our case study:Hugging Face distilbertmodel deployment on various devices and operating system versions. Below figures are non-interactive snapshots from the research article for iPhone 13 with iOS16.0 installed:Tutorial: Optimized Deployment of Hugging Face distilbertThis tutorial is a step-by-step guide to the model deployment process from the case study in our research article. The same code is used to generate the Hugging Face distilbert performance data in the figures above.In order to begin the optimizations, we initialize the baseline model as follows:importtransformersmodel_name="distilbert-base-uncased-finetuned-sst-2-english"baseline_model=transformers.AutoModelForSequenceClassification.from_pretrained(model_name,return_dict=False,torchscript=True,).eval()Then we initialize the mathematically equivalent but optimized model, and we restore its parameters using that of the baseline model:fromane_transformers.huggingfaceimportdistilbertasane_distilbertoptimized_model=ane_distilbert.DistilBertForSequenceClassification(baseline_model.config).eval()optimized_model.load_state_dict(baseline_model.state_dict())Next we create sample inputs for the model:tokenizer=transformers.AutoTokenizer.from_pretrained(model_name)tokenized=tokenizer(["Sample input text to trace the model"],return_tensors="pt",max_length=128,# token sequence lengthpadding="max_length",)We then trace the optimized model to obtain the expected input format (Torchscript) for the coremltools conversion tool.importtorchtraced_optimized_model=torch.jit.trace(optimized_model,(tokenized["input_ids"],tokenized["attention_mask"]))Finally, we use coremltools to generate the Core ML model package file and save it.importcoremltoolsasctimportnumpyasnpane_mlpackage_obj=ct.convert(traced_optimized_model,convert_to="mlprogram",inputs=[ct.TensorType(f"input_{name}",shape=tensor.shape,dtype=np.int32,)forname,tensorintokenized.items()],compute_units=ct.ComputeUnit.ALL,)out_path="HuggingFace_ane_transformers_distilbert_seqLen128_batchSize1.mlpackage"ane_mlpackage_obj.save(out_path)To verify performance, developers can now launch Xcode and simply add this model package file as a resource in their projects. After clicking on the Performance tab, the developer can generate a performance report on locally available devices, for example, on the Mac that is running Xcode or another Apple device that is connected to that Mac. The figure below shows a performance report generated for this model on an iPhone 13 Pro Max with iOS 16.0 installed.Based on the figure above, the latency is improved by a factor of 2.84 times for the sequence length of 128 and batch size of 1 that were chosen for the tutorial. Higher sequence lengths, such as 512, and batch sizes, such as 8, will yield up to10 times lower latencyand14 times lower peak memory consumption. Please refer to Figure 2 from ourresearch articlefor detailed and interactive performance data.Note that the load and compilation times increase due to the number of operations increasing in the optimized model but these are one-time costs and user experience will not be affected if the model is loaded asynchronously.Note that 4 of the 606 operations in the optimized model are executed on the CPU. These are the embedding lookup related operations and they are more efficient to do on the CPU for this particular model configuration.A Note on Unit TestsThe unit tests measure, among other things, the ANE speed-up factor. Since the device spec for this reference implementation is M1 or newer chips for the Mac and A14 and newer chips for the iPhone and iPad, the speed-up unit tests will print a warning message if executed on devices outside of this spec. Even if the model is generated using an out of spec Mac, the model should work as expected on in-spec devices.Installation & TroubleshootingFastest:pip install ane_transformersLocally editable:pip install -e .If installation fails withERROR: Failed building wheel for tokenizersorerror: can't find Rust compiler, please follow thissolution
anet-tools
anet-toolsInstallconda create -n anet python=3.7 -y source activate anet conda install pytorch==1.4.0 torchvision cudatoolkit=10.1 -c pytorch -y conda install -c conda-forge opencv -y cd anet_tools/features/flownet2/networks/correlation_package rm -rf *_cuda.egg-info build dist __pycache__ python setup.py install --user cd ../resample2d_package rm -rf *_cuda.egg-info build dist __pycache__ python setup.py install --user cd ../channelnorm_package rm -rf *_cuda.egg-info build dist __pycache__ python setup.py install --user cd ../../../../../ pip install -e .
anetwork_dynamicad
UNKNOWN
aneuploidy
Comming soon!
a-new-package
Failed to fetch description. HTTP Status Code: 404
anews
anews
anex
No description available on PyPI.
an_example_pypi_project
This is just a demonstration vehicle used to take you through the process – start to finish – of creating a Python project that can be:Uploaded toDistributed fromandDocumented onthe Python Package Index (aka pypi or the cheeseshop) athttp://pypi.python.org/pypi. This project uses setuptools, sphinx, and the Sphinx-PyPI-upload (http://pypi.python.org/pypi/Sphinx-PyPI-upload/0.2.1).This demonstration is not meant to be complete nor authoritative. It’s just a recording of the steps I took to get some projects onto pypi and hopefully it might save someone some time from googling around. To be sure, this is simply justoneway to make a project, document it, and get it on pypi.NOTE: This was originally given as a talk to the Minnesota Python Users Grouphttp://groups.google.com/group/pymntos/and was developed for a spoken presentation format.
an_example_pypi_project_dylan
This is just a demonstration vehicle used to take you through the process – start to finish – of creating a Python project that can be:Uploaded toDistributed fromandDocumented onthe Python Package Index (aka pypi or the cheeseshop) athttp://pypi.python.org/pypi. This project uses setuptools, sphinx, and the Sphinx-PyPI-upload (http://pypi.python.org/pypi/Sphinx-PyPI-upload/0.2.1).This demonstration is not meant to be complete nor authoritative. It’s just a recording of the steps I took to get some projects onto pypi and hopefully it might save someone some time from googling around. To be sure, this is simply justoneway to make a project, document it, and get it on pypi.NOTE: This was originally given as a talk to the Minnesota Python Users Grouphttp://groups.google.com/group/pymntos/and was developed for a spoken presentation format.
anexo2
Anexo IIGeneración para impresión del "Comprobante de Atención de Beneficiarios de Obras Sociales" (Conocido como Anexo II).SegúnResolucion 487/2002.Art. 2° — Los Hospitales Públicos de Gestión Descentralizada deberán cumplimentar el "Comprobante de Atención de Beneficiarios de Obras Sociales", que se agrega como Anexo II, que pasa a formar parte integrante de la presente Resolución, con carácter de Declaración Jurada, firmado por el médico actuante o Jefe del Servicio, con sello y número de matrícula, y el responsable administrativo del Hospital, con sello, cargo y aclaración de firma, con la correspondiente suscripción o firma del beneficiario, familiar o responsable.Documento original usado de baseacá.Herramienta desarrolladaEste instrumento toma un diccionario con datos y genera un HTML listo para imprimir, firmar y sellar.MuestraInstalacionpip install anexo2Usohospital={'nombre':'HOSPITAL SAN ROQUE',# https://www.sssalud.gob.ar/index.php?page=bus_hosp&cat=consultas'codigo_hpgd':'4321323'}beneficiario={'apellido_y_nombres':'Juan Perez','tipo_dni':'DNI',# | LE | LC'dni':'34100900','tipo_beneficiario':'titular',# | no titular | adherente'parentesco':'conyuge',# hijo | otro'sexo':'M',# | F'edad':88}atencion={'tipo':['consulta','práctica','internación'],'especialidad':'Va un texto al parecer largo, quizas sea del nomenclador','codigos_N_HPGD':['AA01','AA02','AA06','AA07'],# no se de donde son estos códigos'fecha':{'dia':3,'mes':9,'anio':2019},'diagnostico_ingreso_cie10':{'principal':'W020','otros':['w021','A189']}}obra_social={'codigo_rnos':'800501','nombre':'OBRA SOCIAL ACEROS PARANA','nro_carnet_obra_social':'9134818283929101','fecha_de_emision':{'dia':11,'mes':9,'anio':2009},'fecha_de_vencimiento':{'dia':11,'mes':9,'anio':2029}}empresa={'nombre':'Telescopios Hubble','direccion':'Av Astronómica s/n','ultimo_recibo_de_sueldo':{'mes':7,'anio':2019},'cuit':'31-91203043-8'}data={'dia':3,'mes':9,'anio':2019,'hospital':hospital,'beneficiario':beneficiario,'atencion':atencion,'obra_social':obra_social,'empresa':empresa}fromanexo2.docsimportAnexo2anx=Anexo2(data=data)save_to='path.html'res=anx.get_html(save_path=save_to)ifresisNone:print('ERRORES al procesar pedido')forfield,errorinanx.errors.items():print(f' -{field}:{error}')else:print(f'Procesado correctamente y grabado en{save_to}')Validación de los datosInternamente se usa la libreríacerberuspara validar los datos.Ninguno de los campos es requeridoy los que estén ausentes no se completarán en el html.Aquí se puede ver el esquema de validación:fromanexo2.docsimportAnexo2anx=Anexo2(data={})anx.get_schema(){ 'dia': { 'type': 'integer', 'min': 1, 'max': 31 }, 'mes': { 'type': 'integer', 'min': 1, 'max': 12 }, 'anio': { 'type': 'integer', 'min': 2019, 'max': 2030 }, 'hospital': { 'type': 'dict', 'schema': { 'nombre': { 'type': 'string' }, 'codigo_hpgd': { 'type': 'string' } } }, 'beneficiario': { 'type': 'dict', 'schema': { 'apellido_y_nombres': { 'type': 'string' }, 'tipo_dni': { 'type': 'string', 'allowed': ['DNI', 'LE', 'LC'] }, 'dni': { 'type': 'string' }, 'tipo_beneficiario': { 'type': 'string', 'allowed': ['titular', 'no titular', 'adherente'] }, 'parentesco': { 'type': 'string', 'allowed': ['conyuge', 'hijo', 'otro'] }, 'sexo': { 'type': 'string', 'allowed': ['F', 'M'] }, 'edad': { 'type': 'integer', 'min': 0, 'max': 110 } } }, 'atencion': { 'type': 'dict', 'schema': { 'tipo': { 'type': 'string', 'allowed': ['consulta', 'práctica', 'internación'] }, 'especialidad': { 'type': 'string' }, 'codigos_N_HPGD': { 'type': 'list' }, 'fecha': { 'type': 'dict', 'schema': { 'dia': { 'type': 'integer', 'min': 1, 'max': 31 }, 'mes': { 'type': 'integer', 'min': 1, 'max': 12 }, 'anio': { 'type': 'integer', 'min': 2019, 'max': 2030 } } }, 'diagnostico_ingreso_cie10': { 'type': 'dict', 'schema': { 'principal': { 'type': 'string' }, 'otros': { 'type': 'list' } } } } }, 'obra_social': { 'type': 'dict', 'schema': { 'codigo_rnos': { 'type': 'string' }, 'nombre': { 'type': 'string' }, 'nro_carnet_obra_social': { 'type': 'string' }, 'fecha_de_emision': { 'type': 'dict', 'schema': { 'dia': { 'type': 'integer', 'min': 1, 'max': 31 }, 'mes': { 'type': 'integer', 'min': 1, 'max': 12 }, 'anio': { 'type': 'integer', 'min': 1970, 'max': 2030 } } }, 'fecha_de_vencimiento': { 'type': 'dict', 'schema': { 'dia': { 'type': 'integer', 'min': 1, 'max': 31 }, 'mes': { 'type': 'integer', 'min': 1, 'max': 12 }, 'anio': { 'type': 'integer', 'min': 2019, 'max': 2030 } } } } }, 'empresa': { 'type': 'dict', 'schema': { 'nombre': { 'type': 'string' }, 'direccion': { 'type': 'string' }, 'ultimo_recibo_de_sueldo': { 'type': 'dict', 'schema': { 'dia': { 'type': 'integer', 'min': 1, 'max': 31 }, 'mes': { 'type': 'integer', 'min': 1, 'max': 12 }, 'anio': { 'type': 'integer', 'min': 1970, 'max': 2030 } } }, 'cuit': { 'type': 'string' } } } }
an-extremely-simplistic-dictionary-kaa
No description available on PyPI.
anfema-django-testutils
anfema-django-testutilsThe main intention of theanfema_django_testutilsapp is to provide a Django test runner which considers snapshot tests as well as code coverage and human-readable html test reports. Moreover, the test resultPrecondition Failurehas been added.This package integratessnapshottestas well ascoverage.LinksSource available at:https://github.com/anfema/anfema-django-testutilsDocumentation available at:https://anfema.github.io/anfema-django-testutilsPrerequisitesanfema_django_testutilsis officially supported on:Python >= 3.9Django >= 3.2Installation$pipinstallanfema-django-testutilsSetting upUpdate your Djangosettings.pyto use theanfema_django_testutilstest runner:# settings.pyINSTALLED_APPS=[..."mathfilters","anfema_django_testutils",]TEST_RUNNER="anfema_django_testutils.runner.TestRunner"For further information see theanfema_django_testutilsdocumentation.UsageFor writing test cases use theanfema_django_testutils.testcases.TestCaserather than thedjango.test.TestCase:# app/tests.pyfromanfema_django_testutils.testcasesimportTestCaseclassCustomTest(TestCase):...Create documentationTo generate theanfema_django_testutilsdocumentation from the local sources, run in a terminal:$pipinstalltox$tox-edocs--docs/buildRun testsTo execute theanfema_django_testutilstests, run in a terminal:$pipinstalltox$toxLicenseLicensed under the MIT-clause license; seeLICENSEfor details.
anfema-django-utils
anfema-django-utilsCollection of various django related utilities, helpers & small apps.https://anfema.github.io/anfema-django-utils/DocumentationTo build the documentation from the local sources run:$pipinstalltox&&tox-edocsTestsTo run the unittests from the local sources run:$pipinstalltox&&toxRelease processSteps required to create a new release and publish the package on PyPI:Bump__version__inanfema_django_utils/__ini__.pyCreate a new release on GitHub with the tagv<version>
anfis
No description available on PyPI.
ang
No description available on PyPI.
angap
The analysis and optimization of satellite coverage statistics have been ongoing for several decades. Designing an orbit or a constellation of orbits to meet specific coverage statistics (such as the mean pass duration, mean passes per day, and maximum gap time) can help maximize coverage time and meet mission goals for ground-based assets.
angda
AngdaAngda(A Neat Generic Dice API) is a dice-rolling API created inPythonbyStephen Malone.Seechanges.mdfor a complete changelog.Seelicense.mdfor licensing information.InstallationInstallPython 3.7or higher.Runpip install angda.UsageAngda can be used on the command-line or imported as a Python library.Command-LineRunangda --helpto see all available options.$ angda 2d6+1 #1: 2d6+1 = 7. $ angda 2d6+1 --quiet 7 $ angda 2d6+1 --details Dice #1: - String: 2d6+1. - Fields: Dice=2, Size=6, Plus=1. - Result: [4, 2] + 1 = 7.Python LibraryUseangda.rollfor simple rolls, or theDiceclass for more complex cases.>>>importangda>>>angda.roll('2d6+1')7>>>angda.roll('2d6+1',objects=True){'dice':Dice(2,6,1),'roll':Roll(7,1,[4,2])}>>>dice=angda.Dice(dice=4,size=6,plus=0)>>>dice.roll()Roll(7,1,[4,2])CreditsAngda uses the following third-party libraries:PyTest.
angdist
angdistPlot the 2D histogram of Euler angles covered by a set of cryo-EM particles.A single-particle cryo-EM reconstruction comes from a set of particle images corresponding to projections of identical particles in different orientations. Knowing how many particles contributed to any given projection orientation is important to assess the quality of a dataset. This command-line tool generates a 2D histogram of particle orientations from arun_*_data.starfile from a RELION Class3D or Refine3D job.This tool was tested with star files produced by RELION-3.1.0. Earlier versions of RELION are not supported.FAQQ:Doesn't RELION already do this?A:RELION-3.1 produces a histogram of Euler angles, but in 3D (*_angdist.bildfiles). This is very convenient to visually relate specific Euler angles to the corresponding orientation of the 3D reconstruction of the particle. This tool is complementary to RELION in that it produces a 2D histogram. A 2D histogram is easier to look at globally, making it easy to rapidly spot problems (missing orientations, strongly preferred orientations, etc.). This tool doesn't require an installation of RELION, allowing one to inspect files quickly from a different computer. This tool also lets you adjust the number of bins in the histogram, and save the histogram as an SVG file (which is useful for adjusting styling to make a pretty figure).Q:Doesn't cryoSPARC already do this?A:Yes, cryoSPARC already prints out this exact same histogram. This tool, however, doesn't require an installation of cryoSPARC, allowing one to inspect files quickly from a different computer. This tool also lets you adjust the number of bins in the histogram, and save the histogram as an SVG file (which is useful for adjusting styling to make a pretty figure). Finally, this tool uses a default color scale that is much more readable to color blind people than the one used by cryoSPARC.AcknowledgmentsI would not have been able to put this tool together without thestarfilelibrary.InstallationI recommend to install this tool in a dedicated conda environment. You can create one like so (replaceENV_NAMEwith the name you want to give to this environment):$ conda deactivate $ conda create --name ENV_NAME python=3.9 $ conda activate ENV_NAMEOnce the conda environment is active, you can install the tool with the following command:$ pip install angdistUsage$ angdist --help Usage: angdist [OPTIONS] <run_data.star> Plot a 2D histogram of Euler angles distribution from a run_data.star file produced by RELION. Options: -t, --title TEXT Title of the histogram (default: no title). -c, --colormap TEXT A color map supported by matplotlib (default: "viridis"). -g, --gridsize INTEGER Number of hexagonal bins along the x axis (default: 50). -o, --output TEXT File name to save the histogram (optional: with no file name, simply display the histogram on screen without saving it; recommended file formats: .png, .pdf, .svg or any format supported by matplotlib). -h, --help Show this message and exit.
angel
Python API for Angellist=========================Angel is a MIT Licensed Python library to access API of Angellist.It currently supports Python 2.x and in development. It does not useany external libraries, so it should work out of the box... code-block:: pycon>>> angel = AngelList(config.CLIENT_ID, config.CLIENT_SECRET, config.ACCESS_TOKEN)...Features--------Installation------------To install angel, simply:.. code-block:: bash$ pip install angel...Documentation-------------Contribute----------#. Fork `the repository`_ on GitHub from the **master** branch.#. Create a branch in the following format **username-feature**.#. Write the test for the bug fix or feature.#. Send a pull request... _`the repository`: http://github.com/bugra/angel-list
angel-cd
ANGELCommunity discovery in complex networks is an interesting problem with a number of applications, especially in the knowledge extraction task in social and information networks. However, many large networks often lack a particular community organization at a global level. In these cases, traditional graph partitioning algorithms fail to let the latent knowledge embedded in modular structure emerge, because they impose a top-down global view of a network. We propose here a simple local-first approach to community discovery, namelyAngel, able to unveil the modular organization of real complex networks. This is achieved by democratically letting each node vote for the communities it sees surrounding it in its limited view of the global system, i.e. its ego neighborhood, using a label propagation algorithm; finally, the local communities are merged into a global collection.Moreover, we provide also an evolution of Angel, namelyArchAngel, designed to extract community from evolving network topologies.Note:Angel has been integrated withinCDliba python package dedicated to community detection algorithms, check it out!InstallationYou can easily install the updated version of Angel (and Archangel) by using pip:pipinstallangel-cdor using condacondainstall-cgiuliorossettiangel-cdImplementation detailsRequired input format(s)Angel: .ncol edgelist (nodes represented with integer ids).node_id0 node_id1ArchAngel: Extended .ncol edgelist (nodes represented with integer ids).node_id0 node_id1 snapshot_idExecutionAngel is written in python and requires the following package to run:python 3.xpython-igraphnetworkxtqdmAngelimportangelasaan=a.Angel(filename,threshold=0.4,min_comsize=3,outfile_name="angel_communities.txt")an.execute()Where:filename: edgelist filenamethreshold: merging threshold in [0,1]min_com_size: minimum size for communitiesout_filename: desired filename for the outputor alternativelyimportangelasaan=a.Angel(graph=g,threshold=0.4,min_com_size=3,out_filename="communities.txt")an.execute()Where:g: an igraph.Graph objectArchAngelimportangelasaaa=a.ArchAngel(filename,threshold=0.4,match_threshold=0.4,min_com_size=3,outfile_path="./")aa.execute()Where:filename: edgelist filenamethreshold: merging threshold in [0,1]match_threshold: cross-time community matching threshold in [0, 1]min_com_size: minimum size for communitiesoutfile_path: path for algorithm output files
angelcommunity
ANGELCommunity discovery in complex networks is an interesting problem with a number of applications, especially in the knowledge extraction task in social and information networks. However, many large networks often lack a particular community organization at a global level. In these cases, traditional graph partitioning algorithms fail to let the latent knowledge embedded in modular structure emerge, because they impose a top-down global view of a network. We propose here a simple local-first approach to community discovery, namelyAngel, able to unveil the modular organization of real complex networks. This is achieved by democratically letting each node vote for the communities it sees surrounding it in its limited view of the global system, i.e. its ego neighborhood, using a label propagation algorithm; finally, the local communities are merged into a global collection.Moreover, we provide also an evolution of Angel, namelyArchAngel, designed to extract community from evolving network topologies.Note:Angel has been integrated withinCDliba python package dedicated to community detection algorithms, check it out!InstallationYou can easily install the updated version of Angel (and Archangel) by using pip:pipinstallangel_communityor using condacondainstall-cgiuliorossettiangel_communityImplementation detailsRequired input format(s)Angel: .ncol edgelist (nodes represented with integer ids).node_id0 node_id1ArchAngel: Extended .ncol edgelist (nodes represented with integer ids).node_id0 node_id1 snapshot_idExecutionAngel is written in python and requires the following package to run:python 3.xpython-igraphnetworkxtqdmAngelimportangelasaan=a.Angel(filename,threshold=0.4,min_comsize=3,outfile_name="angel_communities.txt")an.execute()Where:filename: edgelist filenamethreshold: merging threshold in [0,1]min_com_size: minimum size for communitiesout_filename: desired filename for the outputor alternativelyimportangelasaan=a.Angel(graph=g,threshold=0.4,min_com_size=3,out_filename="communities.txt")an.execute()Where:g: an igraph.Graph objectArchAngelimportangelasaaa=a.ArchAngel(filename,threshold=0.4,match_threshold=0.4,min_com_size=3,outfile_path="./")aa.execute()Where:filename: edgelist filenamethreshold: merging threshold in [0,1]match_threshold: cross-time community matching threshold in [0, 1]min_com_size: minimum size for communitiesoutfile_path: path for algorithm output files
angel_fs
No description available on PyPI.
angelic
An API for daemonizationInstallationFrom the project root directory:$ python setup.py installOr just install with pip:$ pip install angelicUsageAdd it to the top of your programs:from angelic import Daemon daemon = Daemon('app_name')Then wrap your looping function:@daemon.daemonize def loop(...): while True: ...Or specify an interval and have it loop automatically and wait specified seconds:@daemon.daemonize(interval=10) def loop(...): ...Then add to the bottom of your program:daemon.run(...)The arguments to the daemonized function will be passed from the call to run.Check Argument Parsing below for more options for starting and stopping your daemon.See an example implementation here:http://pastebin.com/uZjxU99SConfigurationSpecify a pid_path with that keyword. Otherwise, it will look for pid_path in all of the possible config paths, and last, /var/run/$DAEMON_NAME.pid will be chosen:daemon = Daemon('myapp', pid_path='~/myapp.pid')The configuration files will be loaded automatically based on the name of the app, unless config_path is passed to Daemon. See the pypi packageconfutilfor more information about the configuration logic and usage.The order that configuration files will be parsed, from most authoritative to least is (for a daemon named ‘spam’):./.spam.conf./.spam.cfg~/.spam.conf~/.spam.cfg~/.config/.spam.conf~/.config/.spam.cfg~/.config/spam/config.conf~/.config/spam/config.cfg~/.config/spam/config/etc/.spam.conf/etc/.spam.cfg/etc/spam/config.conf/etc/spam/config.cfg/etc/spam/configTo specify an explicit configuration file, pass in the path. The interface will be like a dict, specifically a ConfigObj object:daemon = Daemon('myapp', config_path='~/.myapp.config') password = daemon.config['password']Redirecting STDOUT or STDERRBy default, the daemon will still print its stderr to stderr, and squelch stdout. To change this behavior, either set the keywords to themself, or None for muting:# prints stderr to stderr daemon = Daemon('myapp') # Keeps stdout, but mutes stderr daemon = Daemon('myapp', stdout='stdout', stderr=None) # Mutes both stdout and stderr daemon = Daemon('myapp', stderr=None) # Writes stderr to a file at path /var/log/myapp_raw_stderr daemon = Daemon('myapp', stderr='/var/log/myapp_raw_stderr')It is recommended to keep stderr (default) so that you can debug exceptions in your program.LoggingA simple logger can be instanciated with the Daemon by passing in an argument to its log paths. For example:daemon = Daemon(debug_log='/var/log/myapp_debug.log', error_log='/var/log/myapp_error.log') daemon.log.error('Encountered an error!')Other possible logger arguments are info_log, warning_log, and critical_log. If not provided in the keyword arguments, the configuration will be checked for debug_log, etc.Argument ParsingA simple start, stop, restart, status interface can be given with the following code:daemon.parse_args()To add arguments to the start command which will pass to the loop, do the following, create the subparsers first:@daemonize def loop(debug=False): ... def main(): import argparse parser = argparse.ArgumentParser() subparsers = daemon.setup_args(parser) subparsers['start'].add_argument('--debug', '-d', action='store_true') daemon.parse_args(parser)Release Notes0.1.2:Just updated README with the simpler argparse functionality.0.1.1:Removed requirement to create argparser ArgumentParser. Now, start/stop/restart/status interface can be created with justdaemon.parse_args()0.1.0:Daemonization works according to examples in this README0.0.1:Project created
angellist
Failed to fetch description. HTTP Status Code: 404
angel_master
No description available on PyPI.
angelo
Angelo
angelou
No description available on PyPI.
angelsaechsisch-telegram
Ein Nachrichtenraum-Roboter, der Angelsächsisch rügtEin wundervoller Telegram Roboter, der euch in jeder Gruppenunterhaltung auf Telegram höflich daran erinnert kein Angelsächsisch zu nutzen. Nach dem Vorbild des besten Unter's dieser Erde:r/ich_ielWie füge ich den Roboter zu meiner Gruppenunterhaltung hinzu?Der Gruppenunterhaltungs-Administrator muss den Roboter hinzufügen. Dabei geht man genauso vor, als würde man einen normalen Nutzer der Gruppe hinzufügen:Gruppen-Einstellungen -> Person hinzufügen -> Suche nachangelsaechsisch_telegram_botEventuell muss man noch explizit erlauben, dass der Roboter die Nachrichten lesen darf. Falls du dabei bedenken hast, bitte KapitelDatenschutzdurchlesen.Befehle/startund/hilfeMit diesen Befehlen wird eine Übersicht gezeigt. In dieser sind alle Befehle sowie die aktuellen Einstellungen gelistet./amtag XMit diesem Befehl kann eingestellt werden, wie oft euch der Roboterpro Tagdaran erinnert kein Angelsächsisch zu nutzen. Um Mitternacht setzt sich der Zähler zurück.Xmuss dabei ganzzahlig und >= 0 sein./warte XMit diesem Befehl kann eingestellt werden, wie viele Minuten zwischen zwei Erinnerungen mindestens vergehen soll.Xmuss dabei ganzzahlig und >= 0 sein./ausnahme XYZFalls der Roboter mal ein Wort als Angelsächsisch interpretiert, dass aber eigentlich in Ordnung ist, kann dieses Wort über/ausnahme WORTzu einer Ausnahmeliste hinzugefügt werden. Das Wort wird in Zukunft nicht mehr als Angelsächsisch erkannt./nullenMit diesem Befehl werden die täglichen Zähler (vergangene Zeit seit der letzten Nachricht und Anzahl der am Tag bereits versandten Nachrichten) zurückgesetzt.DatenschutzDamit der Roboter euch höflich daran erinnern kann Angelsächsisch zu nutzen,muss er die Nachrichten natürlich lesen. Ich verspreche hoch und heilig, keinen Schabernack mit den Daten zu treiben. Wenn du allerdings Bedenken hast, kannst du den Roboter auch einfach selber ausführen und deiner Gruppe bereitstellen. Mehr dazu indiesem Kapitel.Eigene InstallationFalls du den Roboter selber ausführen möchtest, kannst du das gerne tun. Dazu bitte wie folgt vorgehen:Der Roboter ist auf Ubuntu 20.10 entwickelt und getestet und sollte somit auf jeder Linux Distribution mit Python >= 3.8 laufen (Niedriger wahrscheinlich auch, aber nicht getestet). Er kann einfach überpipinstallangelsaechsisch-telegraminstalliert werden.Außerdem muss ein neuer Roboter bei Telegram angelegt werden, das geht aber sehr einfach.Hiergibt's eine einfache Anleitung dazu. Wichtig ist noch, dass ihr dem Roboter Gruppenrechte und Leserechte gebt. Das geht im BotFather Chat wie folgt:mybots -> ROBOTER-NAME -> Bot Settings -> Allow Groups -> Turn groups onmybots -> ROBOTER-NAME -> Bot Settings -> Group Privacy -> Turn offDer BotFather hat dir einen TOKEN ausgespuckt, mit dem du den Roboter ausführen kannst:python3-mangelsaechsisch_telegramTOKENDer Roboter sollte jetzt laufen. Über/startlässt sich das Menü aufrufen.TODODamit der Roboter auch bei OS-Neustart oder nach einem Absturz wieder loslegt, sollte das Programm noch durch systemd überwacht werden.QuellenDeutsches WörterbuchAngelsächsisches Wörterbuch
angel-sdk
No description available on PyPI.
angelspie
angelspiemapping global hotkeys and various actions for X11 eventsFree software: MIT licenseDocumentation:https://angelspie.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.8 (2021-06-10)add-rule command line option, which generates yaml for next window you select.window: matching options to apply actions to all windows which match if conditions0.1.7 (2021-06-10)fixed eval0.1.6 (2021-06-10)fixed bugsbetter config examplecan send multiple keystrokes with one ‘press:’ directiveafter rule is enabled/disabled - rebind keys.0.1.5 (2021-06-10)fixed bugs0.1.4 (2021-06-10)changed config formatadded timer eventsadded negative conditions like ne for not-equaladded and/or logic in config0.1.2 (2021-06-09)“then” block can now be list0.1.1 (2021-06-09)Fixed bugs0.1.0 (2021-05-14)First release on PyPI.
angelsupport
No description available on PyPI.
angel-tag
AnGEL MorphologyAn Ancient Greek Morphology TaggerAngel takes in Ancient Greek plain text and returns morphology tags for each token. More specifically, it tags part-of-speech, person, number, tense, mood, voice, gender, case, and degree. The morphology tagging mostly follows theAGDT 2.0 style. The exception would be the inclusion of the "g" tag for the part-of-speech "particle" which is not included in the AGDT 2.0 documentation, but is used by some annotators within theAGDT 2.1 treebankcollection. For a list of all tags available within each element, refer to theAGDT 2.1 tagsetInstallationpip install angel-tagUsageThe input should be a string. The output is a tuple of tuples.from angel import tag greek_string = 'ὧν ἐς πολὺ μὲν οὐκ ἐπῄσθοντο Ῥωμαῖοι διὰ τὰς ἐν ἄστει κρίσεις τε καὶ στάσεις·' results = tag(greek_string) print(results)Output:(('ὧν', 'p-p---ng-'), ('ἐς', 'r--------'), ('πολὺ', 'a-s---na-'), ('μὲν', 'd--------'), ('οὐκ', 'd--------'), ('ἐπῄσθοντο', 'v3paim---'), ('Ῥωμαῖοι', 'n-p---mn-'), ('διὰ', 'r--------'), ('τὰς', 'l-p---fa-'), ('ἐν', 'r--------'), ('ἄστει', 'n-s---nd-'), ('κρίσεις', 'n-p---fa-'), ('τε', 'd--------'), ('καὶ', 'c--------'), ('στάσεις', 'n-p---fa-'), ('·', 'u--------'))If you just need to tag one sentence, then the above example is fine. But if you want to tag an entire document, don't feed it to the tagger one sentence at a time; or even worse, one token at a time. It'll take forever that way and accuracy will suffer. Just give it the entire document all at once.from angel import tag with open('xenophon-hellenica.txt', 'r', encoding='utf-8') as infile: entire_book = infile.read() results = tag(entire_book)It is possible that an excessively large string may cause memory issues. If you run into that problem, then perhaps split the text in half and try that. This is an issue that will be addressed in later releases.DesignThis novel architecture utilizes no rules or morphology lookup tables. Rather, it examines individual token morphology and each token's context within the sentence using a series of neural networks. Furthermore, because of the varying tendencies of the many human annotators which are found among the AGDT treebanks, Angel considered annotators as a feature during training. Consequently, while running inference, an annotator must be chosen for the tagger to emulate. "Vanessa Gorman" is the default choice as her annotation style is up to date and she is currently the single most prolific annotator.AccuracyPartially imitating the assessment criteria used byBarbara McGillivray and Alessandro Vatriin the development of their state of the art (91% POS accuracy) tagger they used in their Diorisis corpus, Angel was trained on 26 works in theAGDT 2.1 treebankwhile 7 works were reserved for validation during training. Though Diorisis trained on roughly 50% more data (from thePROIEL treebanks), Angel outperformed it scoring 95.5% accuracy predicting parts-of-speech in the validation set. That score was further confirmed by testing upon the first five works within theGorman treebankswherein it scored 95.7% part-of-speech accuracy, earning it state of the art status by a significant margin.Further DevelopmentExceptionally large works may cause memory issues. This will be addressed in subsequent updates.Annotation inconsistencies will be addressed. Some obsolete tags still exist in the current version of AGDT.Lemmatization and dependency tagging integration is planned. Other paradigms for morphology tagging may be implemented as well.A lot more training data is available. It will be used.Much hyperparameter tinkering to be done.OS testing.LicenseCopyright (c) 2021 Chris Drymon under theMIT license.
angeltools
AngelTools自用的 python 小工具合集就是开发过程中常用的一些小方法、小轮子的合集,免去每次用到都得复制每个人开发思维都不一样,不一定适合其他人安装$ pip install angeltools或者直接下载 duplremover 文件夹到你的项目目录下也行现有方法:比例控制器:Scaler"""控制数值区间的方法"""fromangeltools.MathToolimportScalerscaler=Scaler()num=998scaler.arctan(x=num,lower_point_x=80,lower_limit=80,upper_limit=100)# arctan 反正切函数, 用于控制连续变量最大值区间。# 人话就是用反正切计算比例,确保一个数不超出你锁定的范围# 要确定一个反正切函数,最少需要确定函数过某一个点,此处称为 锚点# 变量x# 锚点的x值# 锚点的y值# y值上限顺序多线程工具 Slavesfromangeltools.SlaversimportSlavesimporttimeimportrandomdefdo_add(args):x,y=argstime.sleep(random.randint(1,2))returnx+ydata=[[x0,y0]forx0,y0inzip(range(10,20),range(1,10))]ts=time.time()results=Slaves(workers=10).work(do_add,params_list=data)te=time.time()print(results,te-ts)# Slaves start working: do_add# [11, 13, 15, 17, 19, 21, 23, 25, 27] 2.007810354232788顺序多进程工具 BigSlavesfromangeltools.SlaversimportBigSlavesimporttimeimportrandomdefdo_add(args):x,y=argstime.sleep(random.randint(1,2))returnx+ydata=[[x0,y0]forx0,y0inzip(range(10,20),range(1,10))]ts=time.time()results=BigSlaves().work(do_add,params_list=data)# 默认进程数是当前系统可用进程-1te=time.time()print(results,te-ts)# BigSlaves start working: do_add# [11, 13, 15, 17, 19, 21, 23, 25, 27] 3.0164289474487305其他工具基于文件的异步锁# 由于文件io的延迟性,文件锁不适用于高并发的场景,也不能实现分布式,只适合单机器低速异步进程的隔离# 优点是不需要数据库或第三方依赖,即开即用# 高并发可以使用 python-redis-lockfromangeltools.StrToolimportFileLockdefdo_jobs():passwithFileLock(lock_id='test-lock'):do_jobs()url 组合拆解fromangeltools.StrToolimportUrlFormatuf=UrlFormat(url='http://www.baidu.com?page=1&user=me&name=%E5%BC%A0%E4%B8%89')uf.url_format(params_only=True,unquote_params=True)# {'page': '1', 'user': 'me', 'name': '张三'}uf.split_url()# {'queries': {'page': '1', 'user': 'me', 'name': '张三'}, 'host': 'www.baidu.com', 'protocol': 'http', 'path': '', 'require_params': '', 'fragment': ''}uf.make_url('http://www.baidu.com',params_add_dic={'page':'1','user':'me','name':'张三'})# 'http://www.baidu.com?page=1&user=me&name=%E5%BC%A0%E4%B8%89'scrapy 爬虫xpath包装fromangeltools.StrToolimportScrapyXpath# 包装 scrapy response 的xpath方法,不用每次都 extract 再判断结果,使爬虫更整洁# 也可以传入由 requests 获取的 response text 和 url,变成 scrapy selector 对象方便提取importscrapydiv=scrapy.http.HtmlResponse().xpath('//div[@class="xxx"]')sx=ScrapyXpath(scrapy_selector=div)sx.xe('./@href')# https://www.xxx.comsx.xe('.//text()')# ["abc", "efg", ...] 结果有多个时返回列表# 或者importrequestsurl='http://www.baidu.com'html_content=requests.get(url)sx=ScrapyXpath(url='http://www.baidu.com',html_content=html_content)sx.xe('./@href')# https://www.xxx.comsx.xe('.//text()')# ["abc", "efg", ...] 结果有多个时返回列表图片转字符块工具fromangeltools.ImageToolimportimage2charsimage2chars('/home/Angel.png',width=30,k=1.0,# outfile='/home/测试123.txt',reverse=True)"""- . -+ @ # . @ -# # @ . . + - + - - + . - . + - . @ -. @ - # = + @ # # @ - + @ # # @ . - @ * # * . @ -= @ = @ + @ . @ = # * - @ . # # - = @ . . @ -# @ @ @ @ - + @ @ = @ = . @ . # # = = = . @ -- @ + - - @ * + @ @ = * @ - * @ . * # . + * . @ -= * + * - * * + . * @ * @ . * # # - . * .+ = . + @ .- # # # +"""文字转字符块工具fromangeltools.ImageToolimporttext2charstext2chars(text="ANGEL",# font_path='/etc/fonts/msyh.ttf',width=50,k=0.6,# outfile='/home/测试123.txt',chart_list=[' ','-','/','%'],)"""- - - - - - - / / / - - - / / / / / - - -/ % % % % % % % % - - % % / / / % % - % % / / / / / - - % /% / / % - % % % % % % - % % - - - % % - - % /% % % % % % / % - / % - % % / % / / % % % % % % % - % /- % % % % % % / % % / % % % - % % - - % % % % - - % /% % - % % - % % / % % - - % % / / / % % % % % % / / / / / - % % / / / / -- - - - - - - - / / / - - - - - - - - - - - - - - - - -"""使用redis的文件缓存器(模仿fdfs)fromangeltools.Db.redis_connectorimportRedisFdfsconn={"host":'127.0.0.1',"port":6379,"password":None,}rdfs=RedisFdfs(db=1,connect_params=conn,# redis 连接配置expire=30# 缓存过期时间(默认1星期))test_id=rdfs.upload('test data 001')print(test_id)# RedisFdfsFile_cceceb50-cc40-11ec-bb8b-adb0630c08c7test_data=rdfs.get('RedisFdfsFile_cceceb50-cc40-11ec-bb8b-adb0630c08c7')print(test_data)# test data 001# 没有结果或出错的时候返回空字符 ''test_del=rdfs.delete('RedisFdfsFile_cceceb50-cc40-11ec-bb8b-adb0630c08c7')print(test_del)# True终端工具图片转字符块工具ima2char[image][-h查看帮助]示例:img2char/home/ABC.png-w20输出:. . . * = + = + + + - + . - = - . + = . = . + . = . + + . + + + . . = - = - - - - - - + . = . - = . - - = + + + * . + . + . + . + + . + - - = . + . . + = - + + = + + + . . . . . .文字转字符块工具txt2char[text][-h查看帮助]例如:txt2charABC-w30输出. . . . . . . . . - @ @ + # @ @ @ @ @ * + # @ @ @ * . * @ @ # # @ * = = # @ * + @ @ = + # @ # @ # # @ . # @ . @ @ @ @ - # @ + + @ = + @ = # @ = + + * @ = - @ # . # @ . @ @ # @ @ @ @ @ @ . + @ * . @ @ - . # @ - # @ + - - + @ # - @ * = @ @ @ @ @ @ * # @ . # @ . . @ @ = @ + # @ = + + + @ @ # @ + - - + @ @ . * @ * . - @ @ . - @ # * @ + # @ @ @ @ @ @ + # @ @ @ @ @ + . + . . + - - + + + + - . + = * = .
angel_web
No description available on PyPI.
angel_worker
No description available on PyPI.
angem-girvel
No description available on PyPI.
angemilner
The Ghost of Ange Milner sets up a library of your API keys using MongoDB. Then everytime you need to make an API call, she checks out the key that has been resting the longest/ has the most remaining calls before it hits the daily rate limit.
angepdf
This is the homepage of our project.
angerr
The Official Anger PackageThe best way for programmamamaers to raeg over br0ken cod3LISTEN THERE IS ONLY ONE FUNCTION. IF YOU DON'T SPECIFY A RAGE AMOUNT, THE RAGE IT GIVES IS VERY LAME.Example:$ pip install angerrfrom anger import anger anger(5)OutputWHY IS CODING SO HARDWHY IS CODING SO HARDWHY IS CODING SO HARDWHY IS CODING SO HARDWHY IS CODING SO HARDfinally done raging. are you?REEEEEEEEEEEEEEEEEEEEEEEeE
angeutils
No description available on PyPI.
anghamak
Failed to fetch description. HTTP Status Code: 404
angka
Angkaa repository focusing on data processing package namely angka. It focuses on matrix data manipulating and visualization in C. The project is an initial step for the applied focuses, especially earth science purposes. We also have a goal to wrap this library to another language such as Python.The important links:Documentation:http://angka.readthedocs.io
angkortemple
No description available on PyPI.
angkorwat
No description available on PyPI.
angle
![ENGLISH SCRIPT](English script.png "ENGLISH SCRIPT")**[Angle](https://github.com/pannous/angle/)** is the Python implementation of [English](https://github.com/pannous/english-script) as a programming language.The main purpose of this language is to make programming accessible to many more people, more fun and to facilitate programming computers via voice.INSTALL-------`pip install angle`<!-- `pip install anglang` -->OR from source:`git clone --recursive [email protected]:pannous/angle.git``cd angle``./install.sh`Start the shell : `./bin/angle`Examples--------Here are some of our favorite working examples from the [tests](tests):`assert two minus 1½ equals 0.5``beep three times`(There will be a generation of programmers who will shake their heads that there ever was a programming language which did not interpret that sentence correctly.)`assert square of [1,2 and 3] equals 1,4,9``assert 3rd word in 'hi my friend' is 'friend'``x is 2; if all 0,2,4 are smaller 5 then increase x; assert x equals 3 ``beep every three seconds``last item in 'hi','you' is equal to 'you'````While Peter is online on Skypemake a beepsleep for 10 secondsDone``````To check if person is online on Skype:Skype.checkStatus(person)if result is "online": return yeselse return noEnd```Status:-----------ALPHA, partly usable, some [tests](tests) not yet passing:[![Build Status](https://travis-ci.org/pannous/angle.png)](https://travis-ci.org/pannous/angle)In progress-----------`add one to every odd number in 1,2,3 == 2,2,4`The implicit list filter '**that**' applies a selection criterion to all elements.`delete all files in my home folder that end with 'bak'`translates to ruby:`folder(:home).files.select{|that|that.end_with?("bak")}.each{|file| file.delete}`Implicit lambda variable '**it**'`for all mails by peter: mark it as read if its subject contains 'SPAM'`translates to ruby:`mails(by: Peter).each{|it| it.mark(:read) if it.subject.match('SPAM')}`The last example also illustrates what we call **matching by type name**.```To delete mail:move that mail to trash folderEnd```Here 'mail' acts as argument name and argument type at once.No more Java style Mail mail=new Mail().getMail();<!-- Self documenting code is not about the "how", it's about the "what". Ex: A method name should be FilterOutOddNumbers(). Not MapModulo2Predicate(). -->EXPERIMENT----------Run it and see yourself!**experiment** by typing`./bin/angle "6 plus six"``./bin/angle examples/test.e``./bin/angle` (no args to start the shell)`⦠ 1/4``⦠ 6 plus six``⦠ beep three times``⦠ x is 2; if all 0,2,4 are smaller 5 then increase x`Language Specification----------------------Angle is a multi-paradigm programming language with [gradual typing](https://en.m.wikipedia.org/wiki/Gradual_typing).Read the [DOSSIER](https://github.com/pannous/english-script/blob/master/DOSSIER.md) for a more complete [**language specification**](https://github.com/pannous/english-script/blob/master/DOSSIER.md), vision and some background.The grammar is not meant to be linguistically complete, but [functionality complete](https://en.wikipedia.org/wiki/Functional_completeness) and easily extendable."Premature optimization is the root of all evil." Many programming languages 'optimize' on the syntax level in order to optimize the resulting applications. Maybe [this](http://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD667.html) is a mistake.To check out the current capabilities of English Script have a look at the [tests](https://github.com/pannous/angle/tree/master/tests),[keywords](https://github.com/pannous/angle/blob/master/core/english_tokens.py) and[grammar](https://github.com/pannous/angle/blob/master/core/english_parser.py)Future------English Script / Angle is currently running in the* [ruby](https://github.com/pannous/english-script) and [python](https://github.com/pannous/angle) environment, but will soon compile to the* WEB(!!) thanks to [WebAssembly](https://github.com/WebAssembly/design)* JVM thanks to [Mirah](https://github.com/mirah/mirah), [zippy](https://bitbucket.org/ssllab/zippy/overview) and [truffle](https://github.com/OracleLabs/Truffle)* [.Net/CLR/DLR](https://en.wikipedia.org/wiki/Dynamic_Language_Runtime) (via [Cecil](https://github.com/jbevain/cecil), maybe Mirah too),* As a final aim: run **natively**, maybe similar to [Crystal](https://github.com/manastech/crystal), [Vala](https://en.wikipedia.org/wiki/Vala_%28programming_language%29) or RPythonHaving a [self-hosted "bootstrapped" compiler](https://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29) is an important mid-term goal.**precedence**One very hot idea is to allow modifying the language grammar on the fly, at least till a limited extend.One first step would be to make possible setting the precedence of functions.This would enable very natural and sweet mathematical expressions, especially combined with Unicode names:```class Complex alias ℂ (re, im)to add number xℂ(this.real+x.real, this.im+x.im)endalias '+' = addendℂ.add.precedence=Number.add.precedence-1ī := √-1ī + 3ī == 4ī```This would run against the goal to avoid sigil special chars though.Why the new python implementation------------------------------------We can **compile** English script / [Angle](https://github.com/pannous/angle/) directly to python byte-code:As opposed to Ruby, Python(3) comes with a very nice and clean abstract syntax tree as well as byte code capabilities preinstalled.Compiling is so much nicer & faster than interpreted code.Also the Python execution model is a bit more friendly than the Ruby VM, but both have their [advantages and drawbacks](https://github.com/pannous/cast/blob/master/ruby-vs-python.txt). The biggest advantage of Python is that objects can be given attributes at any time o.x='y'! However pythons limited lamda capabilities are a painful limitation."There should be one-- and preferably only one --obvious way to do it"Beautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated.Flat is better than nested.For a background story/vision/philosophy/future of this project read the [DOSSIER](https://github.com/pannous/english-script/tree/master/DOSSIER.md)