Saravanan666/pypi-org huggingface dataset:
Package: lo-extension-dev
This tool helps developing LibreOffice Extension. It mainly does:build a LibreOffice extension from sourcecreate theAddons.xcufile following a simple yaml conf file.install / uninstall extensioncreate shortcut from installed extension to development filesNote that it hasn’t been tested on other system than Linux.WHYWhen developing for LibreOffice, it is common to reinstall an extension
to test it, which means compiling, uninstalling, installing. These tasks are
quite boring. Beside, after a reinstallation, you need to create again and
again some symlinks from the installation path to your code.This command line tool helps achieving this goal.Installation$ pip install lo-extension-devAttention: this tool needs two configuration files to work !Create in your root directoryextension.ymlandaddons.ymlto auto generateAddons.xcufiles in charge of OfficeMenuBar & OfficeToolBar.The module holds an example of these files.UsageTo develop a LibreOffice extension, we advocate to use the following
architecture. Extension code is insrc/.─ my_extension
    │   ├── addons.yml
│   ├── Addons.xcu
│   ├── extension
│   │   ├── 0.0.1
│   │   │   ├── lo-extension-testing.oxt
│   ├── extension.yml
│   ├── README.md
│   └── src
│       ├── Accelerators.xcu
│       ├── Addons.xcu
│       ├── assets
│       │   ├── avaudiologo.svg
│       │   └── sc_underline.svg
│       ├── description
│       │   ├── descr-en.txt
│       ├── description.xml
│       ├── dialogs
│       │   ├── window.xdl
│       ├── Events.xcu
│       ├── META-INF
│       │   └── manifest.xml
│       ├── Office
│       │   └── UI
│       ├── python
│       │   ├── pythonpath
│       │   └── my_macros.py
│       ├── README.md
│       └── registration
│           ├── license_en.txt
└── README.mdOnce installed, a command linemanage_extensionis available in your terminal.To get help, just type:$ manage_extension -hoptions:-h,--helpshow this help message and exit-o,--openOpen installation directory-m,--makeMake extension-i,--installInstall extension-u,--uninstallUninstall extension-d,--devSet dev shortcuts-id,--install-devInstall and set dev shortcutsConfiguration filesWe use two configuration files, usingyamlsyntax. One to generate menubar
menu and toolbar menu. The second one hold the extension configuration.extension.ymlversion : version number in format 0.0.1extension_name : name of your extension (no space)file_extension : zip or oxtlib : com.company.my_extensionmacros_directory : in this example, it ispython. In some project, it ismacros.-addons : it shouldn’t be changed. The file holding menubar & toolbar conf.menu_name : the label displayed in the menu bar.addons.ymlThis files has two main sections :OfficeMenuBarOfficeToolBarYou can create asubmenu. Don’t forget, the keys following a submenu have to
be named as the function they call. It’s the same logic for the OfficeToolBar.
Package: lofarantpos
LOFAR antenna databaseFull documentationModule for manipulating LOFAR antenna databases. Typical usage is to create
an instance of a LofarAntennaDatabase:>>>importlofarantpos.db>>>db=lofarantpos.db.LofarAntennaDatabase()>>>cs001lba_etrs=db.phase_centres['CS001LBA']array([3826923.942,460915.117,5064643.229])>>>db.antenna_pqr('RS210LBA')[:5]array([[0.,0.,0.],[-0.00006...,2.55059...,0.00185...],[2.24997...,1.3499502,0.00130...],[2.24982...,-1.35031...,-0.0004149],[0.00006...,-2.55059...,-0.00185...]])Some functions are included to convert xyz coordinates to latitude, longitude,
height w.r.t. WGS84 ellipsoid.>>>fromlofarantpos.geoimportgeographic_from_xyz>>>geographic_from_xyz(cs001lba_etrs){'lon_rad':0.11986275972340964,'lat_rad':0.9234780446647385,'height_m':50.162683041766286}InstallationThis module can be pip-installed:pip install lofarantposAlternatively, install it from this source withpython setup.py installNoteThis package used to be calledlofar-antenna-positions. It may be
necessary to uninstalllofar-antenna-positionsbefore installing.
Package: lofargeotiff
LOFAR GeoTIFFThis package provides a simple function to write LOFAR near field images as
a GeoTIFF file. This makes sure that some metadata is kept, in particular the
location of the image.Installationpip install lofargeotiffUsageUsing as input a two-dimensional numpy array of pixel values, and the PQ
coordinates of the (center of the) lower left and upper right pixel, the
following command writes a GeoTIFF:fromlofargeotiffimportwrite_geotiffimportnumpyasnpdata=np.random.rand(400,400)lowerleft=(-200,-200)upperright=(200,200)write_geotiff(data,"test.tif",lowerleft,upperright,obsdate="2016-02-12 08:00:00",tags={"Author":"Tammo Jan Dijkema","Project":"EOR"})The resulting file can be read back into python usingrasterio.open, or any
other package that reads TIFF. The metadata can be inspected on the command
line withexiftool.
Package: lofar-h5plot
LOFAR H5plotH5plot is a small GUI to view the solutions in an H5parm interactively. To run it directly, clone this repository and run aspython h5plot <h5parm>This package is also installable through pip:pip install --upgrade https://github.com/revoltek/losoto/archive/master.zip
pip install lofar-h5plotAfter this, it can simply be run as:h5plot <h5parm>RequirementsPython >= 3.6.4LoSoTo 2.0MatplotlibNumpyPyQt5These can be installed on Ubuntu throughapt-get install qt5-default libgl1-mesa-glx
pip install pyqt5 matplotlib
pip install --upgrade https://github.com/revoltek/losoto/archive/master.zip
Package: lofigui
lofiguiThis is tooling for me as a go and python programmer to provide really simple front ends.  They serve the same area as:It provides a way to build a very simple web app that can be bundled if required.
The use cases are:quick and simplemore than a static websiteThe use cases are:providing a gui for a command line tool1-10 usersmore for front ends for single physical object or a single processI have used Bulma as a CSS framework to make it look prettier as I am terrible at design.Elementsmodel view controller architecturetemplatingstyle sheetsbufferingYour project is essentially a web site.  To make design simple you completely refresh pages so no code for partial refreshes.  To make things dynamic it has to be asynchonous so for python using fastapi as a server and Uvicorn to provide the https server.Like a normal terminal program you essentially just print things to a screen but now have the ability to print enriched objects.model view controller architectureAll I really want to do is to write the model.  The controller and view (in the browser and templating system) are a necessary evil.  The controller includes the routing and webserver.  The view is the html templating and the browser.BufferIn order to be able to decouple the display from the output and to be able to refesh you need to be able to buffer the output.  It is more efficient to buffer the output in the browser but more complicated.  Moving the buffer to the server simplifies the software but requires you to refresh the whole page.Alternative approachespywebiostreamlittextualThe difference is that this approach should be very simple and easily understandable.
For the moment no Javascript is used.RoadmapA go version, will be event simplerA go wasm version for deploying serverless (no physical object)
Package: lofor
Lofor - A reverse proxy for developmentLofor is a lightweight development server which acts as reverse proxy to solve your cors header problems.CORS is a common problem faced when developing frontend and backend separated projects.During development, you may like to use a backend inlocalhost:7777/api/and
frontend inlocalhost:7777.This becomes more complex when you use two different frameworks for backend and frontend.How lofor solves the problem?In lofor, you can map multiple hosts to single one.InstallationpipinstallloforForward commandloforforward/http://localhost:5173# Mapping to svelte dev serverloforforward/api/https://localhost:8000# Mapping to django's dev server# More examplesloforforwardapi.localhost/api/https://localhost:8000
loforforwardlocalhosthttp://localhost:3000# You can also map to any real server# lofor forward / https://example.comStart lofor serverThe server will be listening athttp://localhost:7777loforstartTo list lofor forwardsloforlistRemove lofor forwardsloforremove/api/
Package: lofter-pop-index
lofter-pop-indexAn automatic tool used for increasing LOFTER blogs' popular index.IntroductionThis is an an automatic tool used for increasing LOFTER blogs' popular index. The program can control a chrome browser, the process of login and click the buttons are totally automatic and high efficient.To run the program, you should provide some lofter accounts and target blogs' list. Due to the illegal using detecting system of LOFTER, preparing a list of http proxies is highly recommended.How to UseInstallpip3 install lofter-pop-indexRunTo get the using guide:python3 lofter-pop-indexAttentionIn some cases, there may have a robot detecting system during the process. Unfortunately, the problem still cannot be solved. However, we have found that if the account register place is same as login place (base on ip address), LOFTER will not require a robot detect.A low speed proxy may cause a failure, if you want to use proxies, please make sure they have enough bandwidth.LicenseGPLv3
Package: log2compdb
log2compdbThis is a simple script to parse out compiler invocations from a build log and generate acompile_commands.jsoncompilation database. This might be useful on macOS or in any other case whereBeardoesn't work correctly. Theoretically any build log that contains full compiler invocations (e.g.gcc -c -o foo.o -DENABLE_SOME_FEATURE -I./include foo.c) should work, but I've only tested pretty limited cases.Usagelog2compdbtakes three arguments:The build log file, with-i/--inThe path to the desired output file, with-o/--out(defaults tocompile_commands.jsonin the current directory)The compiler used in that build log, with-c/--compiler— an absolute path works best, but isn't requiredIf your build log has multiple compilers (for example if your build includes host and cross compilation
objects), then-ccan be specified multiple times.ExampleLet's take thefirmware repositoryfor the Black Magic Probe
project for an example. Many build systems don't output the compiler invocations by default, requiring a variable
likeBUILD_VERBOSE=1orV=1. In Blackmagic's case, it looks like this:$makeV=1>build.logIt can be important that you don't pass a-jargument (other than-j1), aslog2compdbuses directory change
log entries as well, which will be out of order if you build in parallel.Non-parallel builds can take a while, so you might want to include the build output in your terminal as well with
something like:$makeV=1|tee/dev/stdin>build.logAfter that, you can runlog2compdb, telling it the path to the build log, and the compiler used in the build.
In the case of the Black Magic Probe firmware, that's going to bearm-none-eabi-gcc, which on my system is in/opt/homebrew/bin, so for me generating thecompile_commands.jsonlooks like this:$log2compdb-ibuild.log-ocompile_commands.json-c/opt/homebrew/bin/arm-none-eabi-gccAlternatively, you can also telllog2comp2dbto read from standard in, and skip the extra file:$makeV=1|tee/dev/stdin|log2compdb-ocompile_commands.json-c/opt/homebrew/bin/arm-none-eabi/gccInstallationlog2compdbis packaged onPyPI, and can be installed with Python
packaging tools, such as pip:$pipinstalllog2compdb
Package: log2db
Log2DBDeepLearning Log Send to DB ModuleIntrodutionLog2DB is a tool that uploads, manages, and visualizes simple deep learning logs to your own DB.How To InstallDownload manually:https://github.com/Oldentomato/Log2DB/releasesDownload PyPI:pipinstalllog2dbHow To UseBasic preparationimportlog2dbaslgdb#Set the DB Serverdb=lgdb.SetMongoDB(db_url='db_url',db_document_name='doc',db_collection_name='coll',port=12345)coll=db.Connect_DB()sendlog=lgdb.SendLog(coll)examplesendlog.on_train_start(model_name='pytorch_test',experiment_count=3,datas_count=len(x_data),epoch=100,batch_size=8,learning_rate=0.01,criterion='CrossEntropyLoss',optimizer='SGD(momentum=0.5)',model_shape=model,LR_scheduler='None',etc='None')...sendlog.on_epoch_end(epoch=epoch,loss=loss,val_loss=val_loss,acc=acc,val_acc=val_acc)...sendmoel.on_train_end(save_graph_url=True)DependencyPandashttps://github.com/pandas-dev/pandasMatplotlibhttps://github.com/matplotlib/matplotlibpymongohttps://github.com/mongodb/mongo-python-driverscikit-learnhttps://github.com/scikit-learn/scikit-learnLicenseMIT
Package: log2file
log2filepython 自带 logging 模块的一个封装
自己的项目经常用，每次都配置一堆很麻烦，就自己封装了一个。安装pip install log2file使用#!/usr/bin/env python# -*- coding: utf-8 -*-importlog2fileimportlogging# from multiprocessing import Poolfrommultiprocessing.dummyimportPoolimporttimeimportrandomlog2file.init(console=True,name="test")# for root logger, don't use this or you will get many many logs,and all other loggers will be shadowed by root logger# log2file.init(console=True)trace_test=log2file.trace(name="test")# this is the trace for root logger, don't use this if you have not init root loggertrace_root=log2file.trace()foriinrange(20):log2file.init(console=True,name=str(i))foriinrange(20):log2file.init(console=True,name=str(i))@trace_test("test_test111")defs():time.sleep(0.1+random.randint(0,100)/1000)@trace_root("root_debug")defs2():time.sleep(0.1+random.randint(0,100)/1000)deffun(t):log=logging.getLogger(name=str(t))foriinrange(100):s()log.debug("this is a test [{0}]-[{1}]".format(t,i))s2()p=Pool(10)p.map(fun,range(20))p.close()p.join()LicenseMIT
Package: log2frame
log2frameimport log2frameA function to read well log data in LAS, LIS and DLIS formats and extract curves data as DataFrame.The curves and header data are stored in an instance ofLogclass, designed to hold this data and operate with it.
If multiple log files are read together, theLoginstances are packed in aPackinstance, designed to holdLoginstances and operate with them.to read log filesSimply call the functionread()with the path or path pattern as argument:a single log fileTo load a single.las,.lisor.dlisfile. The function will return aLoginstance containing the data:log2frame.read( path_to_file )several files in a folderTo load several files at once. In this case theread()function will return aPackinstance containing aLoginstance for each log file:log2frame.read( path_to_folder_containing_files/*.* )By default, any invalid file will be ignored, thus, there is no problem to have other files in the same folder as the log files.several files recursivelyTo read files recursively in subdirectories, use the appropriatefnmatchpattern:log2frame.read( path_to_folder_containing_files/**/*.* )further examples and detailsPlease refer to the Jupyter notebooklog2frame_demofor further examples and details on how to uselog2frame.The sample data is publicly available atNLOG.
Package: log2http
log2httplog2http watches log files and sends new contents to a specified http endpoint. That's it.InstallYou will need Python >= 3.6.Install the application like this (preferably in avirtualenv):pip install log2httpSetupPlace a YAML config file like the following at a location of your preference:-
  logfile: /Users/demo/example.log
  endpoint: http://endpoint1.example.com/tag/sample
  min_lines: 5
-
  logfile: /var/log/system.log
  endpoint: http://endpoint2.example.com/tag/syslog
  min_lines: 2logfilespecifies the file to watchendpointis the http endpoint you want to send the collected log lines to (as POST). Usually, this will be the url of a logging service, e.g.http://logs-01.loggly.com/bulk/token/tag/example/min_linessets the minimum of lines that must be collected until a http request is made (use this to minimize http overhead per logged event)UsageOnce installed, you can launch log2http from your terminal:log2http --config=/path/to/the/config.ymlWhen log2http is running, create some sample events to see if they are being collected. For example in bash:for i in {1..6}; do echo "hello world" >> example.log; doneThe output should tell you if events are being collected and sent.You could also start the log collector from Python like this:from log2http import load_config, LogCollector

config = load_config('/your/path/to/config.yml')
collector = LogCollector(config)
with collector:
    collector.start() # will run until interruptedWatch out: log lines always need to end with a newline character (\n). If a line does not end with a newline character, log2http will wait indefinitely until it is written to the file.Local developmentSeerequirements-dev.txtfor development requirements.Run tests withpytest.Run static type checking withmypy --ignore-missing-imports log2http.
Package: log2influx
Logging Utility for InfluxDBUtility to write logging to influxdb2 in order to gather some application stats. After using this utility, user can create dashboard in Grafana with InfluxDB.Free software: MIT licenseFeaturesA helper to log information to InfluxDB2 for further report purpose.The functions here catch the errors, if anything goes wrong it still return and won’t break main program logic. But the information won’t be recorded in InfluxDB.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Developer’s CausionThis package is hosted by pypi public. Do not include any sensitive information in this project.UsageInstallpip install log2influxHistory0.1.1 (2022-06-01)First release on PyPI.
Package: log2jsconsole
It provides a simple WSGI middleware that helps to log messages into
JavaScriptconsoleobject. For example, if you log messages like:logger = logging.getLogger('my.logger')
logger.warning('warning message')
logger.debug('debug message')The middleware automatically appends codes like following JavaScript:<script>
// <![CDATA[
if (console) {
  console.warn('my.logger: warning message');
  console.debug('my.logger: debug message');
}
// ]]>
</script>InstallationYou can install it by downloading fromPyPIthroughpiporeasy_install:$ pip install log2jsconsoleHow to useAssume that your WSGI application name isapp:from yourapp import app
from log2jsconsole import LoggingMiddleware

app = LoggingMiddleware(app)Or you can add this as a filter ofPython Paste:[filter:log]use=egg:log2jsconsoleauto_install=TrueChangelogVersion 0.4Released on June 7, 2013.Support forPython Pastefilter entry point. [#1by Roberto De Almeida]Fixed incompatibile signature (according to PEP 333) ofstart_response.
[#1by Roberto De Almeida]Version 0.3Released on November 28, 2011.Fixed a bug ofContent-Typedetection.Version 0.2Released on November 28, 2011.Fixed a bug ofContent-Typedetection.Version 0.1Initially released on November 26, 2011.
Package: log2json-fauzanelka
log2jsonConvert log file to text or json format.InstallationThis project can be installed viapip:pipinstalllog2json-fauzanelkaOr build it yourself by cloning this project:gitclonehttps://github.com/fauzanelka/log2jsonThen installcdlog2json
pythonsetup.pyinstallUsageConvert to text formatConvert log file to text (default)log2json/var/log/nginx/access.log-o$HOME/nginx-access.txtConvert multiple log files to text with destination directorylog2json/var/log/nginx/access.log/var/log/nginx/error.log-d$HOME/log2json/If destination directory is not provided, the scripts will usecurrent directory+log2json_outputConvert to json formatConvert log file to jsonlog2json/var/log/nginx/access.log-tjson-o$HOME/nginx-access.jsonConvert multiple log files to text with destination directorylog2json/var/log/nginx/access.log/var/log/nginx/error.log-tjson-d$HOME/log2json/Convert log file to json with regex (advanced)log2json/var/log/nginx/access.log-tjson-o$HOME/nginx-access.json-e'^(?P<remote_addr>.*?) - (?P<remote_user>.*?) \[(?P<time_local>.*)?\] \"(?P<request>.*?)\" (?P<status>\d+) (?P<body_bytes_sent>\d+) \"(?P<http_referer>.*?)\" \"(?P<http_user_agent>.*?)\" \"(?P<http_x_forwarder_for>.*?)\"$'For further documentation you can runlog2json-h
Package: log2kusto
Log2Kustolog2kusto is a Python logging handler library for saving the generated log records to a Kusto database table.InstallationUse the package manager [pip](link will be updated) to install foobar.pipinstalllog2kustoRequirmentsPython logging libraryAn MS internal library for providing credentials to authenticate to Kusto (working on making it open source.)Usageimportloggingfromlog2kusto.kusto_handlerimportKustoHandlerclassCustomFormatter(logging.Formatter):def__init__(self,fmt=None,datefmt=None,style='%',validate=True,attributes_list=[]):super().__init__(fmt,datefmt,style,validate)self.attributes=attributes_listdefformat(self,record):print("in format")forattrinself.attributes:print(attr)ifnothasattr(record,attr):setattr(record,attr,'')returnsuper().format(record)#https://docs.python.org/3/library/logging.html#logrecord-attributeslogrecord_attributes_list=['asctime','levelname','filename','funcName','module','message']custom_attributes_list=['env','domain']all_attributes_list=logrecord_attributes_list+custom_attributes_listformatter=CustomFormatter('%('+((')s'+" ; "+'%(').join(all_attributes_list))+')s',"%Y-%m-%d%H:%M:%S",\attributes_list=all_attributes_list)kusto_handler=KustoHandler(<kustoclustername>,<kustodatabase>,<kustotablename>,all_attributes_list)kusto_handler.setLevel(logging.INFO)kusto_handler.setFormatter(formatter)logger=logging.getLogger(__name__)logger.setLevel(logging.INFO)logger.addHandler(kusto_handler)d={'env':'stage','domain':'xyz'}whileTrue:log=input("> ")iflog.strip().lower()!="quit":logger.warn(log)logger.info(log,extra=d)else:break## ContributingPullrequestsarewelcome.Formajorchanges,pleaseopenanissuefirsttodiscusswhatyouwouldliketochange.Pleasemakesuretoupdatetestsasappropriate.## License[MIT](https://choosealicense.com/licenses/mit/)
Package: log2me
log2meBasic logging helpers.Installationpython-mpipinstalllog2meUsageInclude the logging settings into your model and, at application
start-up time, initialize the loggers.frompydantic_settingsimportBaseSettingsfromlog2meimportLogSettings,get_engineclassAppSettings(BaseSettings):# ...logs:LogSettings=Field(description="Logging settings.",)# ...settings=AppSettings()setup_logging(settings.logs)DevelopmentStart by creating a virtual environment and installing the dependencies.
If you have amakecommand available, you can runmake initafter
the virtual environment is created and activated. Otherwise, you can run
the following commands:python-mvenvvenvsourcevenv/bin/activate
python-mpipinstall--upgradepip
python-mpipinstall-e.[dev]On Windows, to be able to serve the documentation, you may also need to
install thecairo2package:pipinstallpipwin
pipwininstallcairocffi