Saravanan666/pypi-org huggingface dataset:
Package: utc
It Should Be EasierThe current Python landscape doesn’t make it simple enough to use timezone
aware timestamps.It’d be nice if datetime.datetime.now() gave you a timezone-aware datetime in
your current timezone, but it doesn’t.You’d expect datetime.datetime.utcnow() to at least be timezone-aware, right?
No.  There’s no tzinfo on the datetime you get back from that function.Thepytzpackage has comprehensive support for time zones, and if you need to
do something complicated, you should use that.  But you don’t always need to do
something complicated.  Sometimes you just want UTC.This package provides syntactic sugar around simple UTC handling that I’ve
rewritten in too many times in past projects.UsageThere is a now() function that does the right thing:>>> import utc
>>> utc.now()
datetime.datetime(2013, 8, 30, 16, 51, 50, 316963, tzinfo=<UTC>)And a datetime constructor that is UTC by default:>>> utc.datetime(1900, 1, 1, 13, 25)
datetime.datetime(1900, 1, 1, 13, 25, tzinfo=<UTC>)And a time constructor too:>>> utc.time(13, 26, 36)
datetime.time(13, 26, 36, tzinfo=<UTC>)That is all.
Package: utcdtw-cffi
UCRDTW-cffi: Dynamic Time Warping with UCR optimizations=========================================================[![Build Status](https://travis-ci.org/alendit/ucrdtw_cffi.svg?branch=master)](https://travis-ci.org/alendit/ucrdtw_cffi)Based on [Searching and Mining Trillions of Time Series Subsequences under Dynamic Time Warping](http://www.cs.ucr.edu/~eamonn/SIGKDD_trillion.pdf) .C implementation from [libdtw](https://github.com/b/libdtw).Interface and tests from https://github.com/klon/ucrdtw/.### RequirementsPython 2.7+ or 3.3+, numpy 1.8+### Usage```from ucrdtw_cffi import dtw_queryimport numpy as npimport matplotlib.pyplot as pltdata = np.cumsum(np.random.uniform(-0.5, 0.5, 1000000))query = np.cumsum(np.random.uniform(-0.5, 0.5, 100))loc, dist = _ucrdtw.ucrdtw(data, query, 0.05, True)query = np.concatenate((np.linspace(0.0, 0.0, loc), query)) + (data[loc] - query[0])plt.figure()plt.plot(data)plt.plot(query)plt.show()```
Package: ut-course-catalog
UT Course CatalogPython package for fetching UTokyo Online Course CatalogueInstallationInstall this via pipx or pip (or your favourite package manager):pipxinstallut-course-catalogDataset東京大学授業カタログはインターネット上で公開されており、誰でも無償で入手可能でした。robots.txtの内容は寛容的であり、ページはWayback Machineに登録されているため、情報収集は禁止されていないと考えられました。したがって、著作権法第三十条の四に基づいて、データセットをKaggleに公開しています。適当に解析したノートブック(GitHub)もあります。Usage1秒に1回のリクエストを送る場合、ダウンロードには4時間強かかります。負荷軽減のため、なるべく収集済みのデータセットを御利用ください。ut-course-catalogdownload
ut-course-catalogconvertall.pklContributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: utcs-ssh
UTCS SSHA better way to SSH into the CS Lab machines at UT Austin.USERNAMEis the username of your UTCS account. If you don't provide a username, it will first check theUTCS_SSH_USERNAMEenvironment variable, otherwise use your current username.Usage: utcs-ssh [OPTIONS] [USERNAME]

Options:
  --comname   Print the computer's name instead of running the ssh command
  --hostname  Print the hostname instead of running the ssh command
  --command   Print the ssh command instead of running it
  --help      Show this message and exit.Installationpipinstallutcs-ssh
Package: utctime
UTC Time v0.1.2-alphaThis is a tiny utility to simplify the everyday pain of working with UTC datetimes
and ISO 8601 strings in Python.MotivationEasy: create UTC datetimes without thinking about it.Type-safe: don’t accidentally mix and match UTC with non-UTC or naive datetimes.ISO 8601: convert to and from ISO 8601 datetimes with ease (and useZas the timezone instead of+00:00).Safe Format: don’t accidentally convert to anything else.Flexible Parsing: parses various ISO 8601 formats - with/without microseconds and/or withZor+HH:MMtimezones.No Dependencies. we don’t need to pull inpytzjust for UTC.Interoperate: with regulardatetimeobjects where necessary.Familiar: similar names and conventions to working withdatetime.Checkout the docs link below for more information.Install:PyPiDocs:Read The DocsLicense:MITSource:GitHubIssues:GitHub Issues
Package: utd
Ugly To-DoA nice way to create tasks and save notes offline from your terminal!This tool do just what I wanted it to do, but it's opensource and unlicense, so feel free to create your own version of this.InstallPIP (recommended)pip3install-UutdManualClone the repo:gitclonehttps://github.com/Murzchnvok/ugly-todoGo to the ugly-todo folder and install the requirements:pip3install-rrequirements.txtCreatebinfolder in the$HOMEdirectory (if it doesn't exist):mkdir$HOME/bin/Add thebinfolder to the$PATHvariable!Now create a symlink to themain.pyscript:ln-s$HOME/ugly-todo/src/main.py$HOME/bin/utdUsageHelp menu:utd-hAdd a simple task:utd-asimpletaskAdd a task with tag(s):utd-asimpletaskwith@tagAdd a task with tag(s) and priority:utd-anotimportanttask@tag@whatever-p3Add a note:utd-nKeepCalmandSTUDYYou might be interestedutd (made in rust)Taskbook (task and notes command line)
Package: uteis
uteisRan-n/uteisPaquete que consta dunha serie de ficheiros escritos
en python con funcións típicas e de gran uso.
Desta forma, en lugar de crear un ficheiro de uteis
para cada proxecto poderase engadir este módulo
e cargar as funcións precisas del no novo proxecto.Exemplos de carga:import uteisfrom uteis import catexfrom uteis import catex, ficheirofrom uteis import catexfrom uteis.ficheiro import cargarDoazóns🙇🙇‍♀Bitcoinbc1q79vja8jzr27dxaf3ylu7e49ady8zq0jsm5qfk6Monero88Rezd6ZQzaCb1s7K1tRCiCaDzuHrfYsn4q348jJuePpLs84JNsWEghMAZZgzpDPrqD4PBxk7hwMkSdNQ4CLqFHyPVLdX1DWowneroWW2RheTNrq8goAi42Dz5AKUj1qLSaTSSgiH7sHR2qRqojg238EXP3MM3xuUgswriET7UrpkEoYaCkecBhnU49oxM1dZyYoSmm
Package: utempid
utempidUnique temporary id generator for pythonUsageGetting itTo download utempid, simply use Pypi via pip.$pipinstallutempidUsing it# import the generator classfromutempidimportUtempidGenerator# create the generatorgen=utempid.UtempidGenerator()# get temporary idsfirst_id=gen.get_id()# first_id = 0second_id=gen.get_id()# second_id = 1third_id=gen.get_id()# third_id = 2# return ids when no longer neededgen.return_id(second_id)# track amount of temporary ids in useprint(gen.active_count)# 2ExampleUtempidGenerator can be used when creating temporary objects with unique ids.
When an object is destroyed, the id is returned to the generator.
This allows for an easy count of the live objects and creates ids that are limited by the maximum amount of live objects at any point.# import the generator classfromutempidimportUtempidGeneratorclassTemporaryObject(object):gen=UtempidGenerator()def__init__(self):self.id=self.gen.get_id()@classmethoddefcount(cls):returncls.gen.active_countdef__del__(self):self.gen.return_id(self.id)defmain():a=TemporaryObject()# a.id = 0b=TemporaryObject()# b.id = 1c=TemporaryObject()# c.id = 2print("count: ",TemporaryObject.count())# 3dela# return id 0print("count: ",TemporaryObject.count())# 2d=TemporaryObject()# d.id = 0print("count: ",TemporaryObject.count())# 3b=1# return id 1print("count: ",TemporaryObject.count())# 2LicenseMIT LicenseCopyright (c) 2018 Joel BarmettlerPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: utemplates
UTemplates - Python Templating EngineUTemplates is a Python templating engine focused on HTML but with the potential to be extended to other languages. It facilitates the creation, manipulation, and rendering of HTML elements programmatically using Python classes and methods.Table of ContentsInstallationGetting StartedUsageConfigurationCreating ElementsRendering HTMLUtilitiesIntegrationsLicenseInstallationClone the repository or download the source code.pipinstallutemplatesGetting StartedBefore you start using UTemplates, ensure you have a Python environment set up. UTemplates supports Python 3.7 and newer.UsageConfigurationTo customize the behavior of UTemplates, you can modify or provide autemplates_config.jsonconfiguration file. This file allows you to define conversion functions that will be applied to values before rendering them. The path to the configuration file can be set through an environment variableUTEMPLATES_CONFIG_PATH.Config FormatThe configuration file is a JSON file with the following structure:{"conversions":["module1.submodule.function1","module2.submodule.function2"]}Each string in the "conversions" list is a dot-path to a conversion function that should be imported and applied during rendering.Creating ElementsUTemplates provides classes to structure HTML content. These can be generic or specific HTML elements:GeneralBaseElement: Abstract base class for all HTML elements.GroupedBaseElement: Class for grouping multiple elements.BaseHTMLElement: Class for creating standard HTML elements.SafeHTMLElement: Class for wrapping pre-processed HTML strings that should not be escaped.You can create instances of these classes by calling their constructors and passing the appropriate arguments.Examplefromutemplates.html_specific.baseimportBaseHTMLElementdiv_element=BaseHTMLElement("div",{"class":"container"},"Hello World")This example creates a<div>element with the class "container" and containing the text "Hello World".Rendering HTMLTo render HTML content, use the providedrendermethod from therenderingmodule. It takes a string, a list of strings or elements, or a single element and generates an HTML string.Examplefromutemplates.renderingimportrender# For a single elementrendered_html=render(div_element())# For multiple elementsrendered_html=render([div_element(),another_element()])# You can also save the rendered HTML to a filefromutemplates.renderingimportsave_to_filesave_to_file(rendered_html,'output.html')UtilitiesTheutils.pymodule includes utility functions:convert_value: Applies configured conversion functions to a given value.IntegrationsUTemplates offers integration support for the Django framework to render responses directly:Django Integrationfromutemplates.integrations.django_integrationsimportrender_to_responsedefmy_view(request):html_content=create_some_html_content()returnrender_to_response(html_content)LicenseUTemplates is open-sourced under the MIT license.
Package: utensils
Random python utility libraries.RequirementsPython: 3.*InstallationInstall using pip:pipinstallutensilsTestingUsetoxfor testing.toxUsageSafe accessors for Python dictionariesfromutensils.dictutilsimportget_dottedfromutensils.dictutilsimportset_dottedfoo={'test':[1,2,3]}set_dotted(foo,'bar.dar',5)print(get_dotted(foo,'bar.dar')==5)print(get_dotted(foo,'test[2]')==3)ContributionMake sure that the tests are passing before opening up the PRCreate a PR for feature enhancementsOnce a PR is merged, update version with the following commands:bumpversion patch
git push origin master --tagsPackagingtoxcreates a package in.tox/dist. Use twine to upload it to pypi:twineupload.tox/dist/utensils-*.zip
Package: utestcell
UTestCellutestcell is an IPython magic function that simplifies unit testing with Colab/Jupyter notebooks.To activate utestcell in a Colab notebook:!pipinstallutestcell%load_extutestcellThen add at the top of the cell%%utestcellTo use a test file stored on Github:#in cell #1url='url of test.py file'#in cell #2%%utestcell-u:$urlSee a detailed explanation on myblogand on the Github repo.
Package: utesting
utesting-pyGitHub:https://github.com/s0urcedev/utesting-pyPyPi:https://pypi.org/project/utesting/Python module for unit testingInstallation:pip install utestingImporting:fromutestingimportResultState# not necessaryfromutestingimportResultStates# not necessaryfromutestingimportUnit# not necessaryfromutestingimportTestCase# necessary (for creating test cases)fromutestingimportTestGroup# not necessaryfromutestingimportTestCaseResult# not necessaryfromutestingimportTest# necessary (for additing and running testing)Using:test(group, output)— test test grouptest_async(group, output)— async version of test@mark_test_unit(cases, asynchronous, only_errors, only_time, no_print)— decorator for marking test unitadd_test_unit(callback, cases, asynchronous, only_errors, only_time, no_print)— same as mark_test_unit, but can't be used as decoratortest_all(file_name)— running testing all marked(added) unitstest_all_asyc(file_name)— async version of test_allAnd other documentation inutesting/__init__.pyand examples inexamples.py
Package: ute-wrapper
UTE API Wrapper 🇺🇾This Python package provides a convenient wrapper for interacting with theUTE (Administración Nacional de Usinas y Trasmisiones Eléctricas)API in Uruguay 🇺🇾. It allows you to retrieve various information related to your UTE account, electricity consumption, network status, and more.Table of ContentsInstallationUsageExamplesContributingLicenseInstallationYou can install the UTE API Wrapper using pip:pipinstallute-wrapperUsageImport theUTEClientclass from the package and create an instance with your UTE account details:fromute_wrapper.uteimportUTEClientemail="your_email@example.com"phone_number="your_phone_number"device_id="your_device_id"# Optionalaverage_cost_per_kwh=4.0# Optional, your average cost per kWh in UYUpower_factor=0.9# Optional, your power factor. It's almost always close to 1ute_client=UTEClient(email,phone_number,device_id,average_cost_per_kwh,power_factor)Available Methodsget_devices_list(): Get a list of UTE devices associated with the account.get_account(): Get UTE account information for the specified device ID.get_peak(): Get UTE peak information for the specified device ID.get_network_status(): Get UTE network status information.get_renewable_sources(): Get the percentage of UTE renewable sources.get_historic_consumption(date_start=None, date_end=None): Get historic UTE consumption information within a specified date range.get_current_usage_info(): Get current usage information for the specified device ID.get_average_price(plan): Get the average price for a specific UTE plan ("triple" or "doble").ExamplesGet Historic Consumptionhistoric_consumption=ute_client.get_historic_consumption(date_start="2023-08-01",date_end="2023-08-15")print(historic_consumption)Get Current Usage Infocurrent_usage_info=ute_client.get_current_usage_info()print(current_usage_info)ContributingContributions are welcome! If you find a bug or have a suggestion, please create an issue or submit Merge Request onGitlab.LicenseThis project is licensed under the GNU General Public License, version 3.0. For more details, seeLICENSE.This project is not affiliated with UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas) or its affiliates.
Package: utf64
A terse, human-readable, URL-safe encoding for JSONish strings.OverviewUse this when you need to encode a string to make it URL-safe, but you also want to keep it as small and readable as possible (unlike base64). For example:Input stringbase64utf64HelloSGVsbG8=YHello"Hello!"IkhlbGxvISI=AYHelloGA{"Hello":"world"}eyJIZWxsbyI6IndvcmxkIn0=MAYHelloAFAworldANI made this because I wanted to build a web API with a nice JSON schema that could also be cached by a CDN. To make it cacheable, I had to use the GET method; but GET can't (portably) have a request body, so this means all the API parameters need to be packed into the URL. UTF-64 is a fire-and-forget way to solve this problem.UTF-64 uses the very permissive0BSD licenceso you can freely use this code & spec anywhere. I picked 0BSD as it seems to be the "public domain equivalent" most widely accepted by corporations, e.g. Google has aspecific exception permitting the use of 0BSD.Installation & usageJavaScriptnpm install utf64import * as utf64 from "utf64";

console.log(utf64.encode("Hello!"));
console.log(utf64.decode("YHelloG"));Pythonpip install utf64import utf64

print(utf64.encode("Hello!"))
print(utf64.decode("YHelloG"))Gogo get utf64.moreplease.compackage main

import (
	"fmt"
	"utf64.moreplease.com"
)

func main() {
	fmt.Println(utf64.Encode("Hello!"))
	result, err := utf64.Decode("YHelloG")
	if err != nil {
		panic(err)
	}
	fmt.Println(result)
}RustKindly contributed by Mark Musante (@mjmusante)cargo add utf64use utf64::*;

fn main() {
    println!("{}", "Hello!".encode_utf64().unwrap());
    match "YHelloG".decode_utf64() {
        Ok(result) => println!("{result}"),
        Err(e) => panic!("{e}"),
    }
}Command-line toolThe JS package includes autf64command-line tool:npm install -g utf64utf64 "Hello\!"
utf64 -d YHelloGSpecificationOutput is encoded using base64url-compatible characters:_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-utf64Decoded as_As-isatozAs-is0to9As-isABCDEFGHIJKLMNOPQRSTUMapped to:"',.;:!?()[]{}#=+-*/\VNewlineWSpaceXPrefix for Unicode 0-63. For example, "Xk" is "%" (U+0025)YPrefix for Unicode 64-127. For example, "Y_" is "@" (U+0040)ZPrefix for Unicode 128+. The following characters are interpreted as UTF-8, reduced to 6-bit bytes by stripping the redundant top two bits. For example, "ZhBr" is "€" (UTF-8[11]100010 [10]000010 [10]101100)Seetest.jsonfor tests that (hopefully) cover all the edge cases, for both valid and invalid encodings.
Package: utf7
Encoder/decoder of an UTF-7 encoded unsigned integer.>>>utf7.pack_bytes(65535)b'\xff\xff\x03'>>>utf7.unpack_bytes(b'\xff\xff\x03')65535UTF-7 uint is used forBinaryWriter.Write(String)inMicrosoft .NET Framework. Here’s an example
of ping-pong between Python server and C# client:whilenotsocket.closed:# recv pingping_size=utf7.unpack_socket(socket)ping_data=socket.recv(ping_size)assertping_data==b'ping'# send pongpong_data=b'pong'pong_size=len(pong_data)utf7.pack_socket(pong_size,socket)socket.send(pong_data)You can also use_utf7written in C to take high-speed:import_utf7asutf7LinksGitHub repositorydevelopment version
Package: utf8cleaner
utf8cleanerRead a file byte-by-byte to and strip any byte sequences that have no UTF8
equivalent and strip themInstallationpipinstallutf8cleanerNote: requires python 3Usageutf8cleaner--inputFILENAMEWill readFILENAMEand write toFILENAME.cleanWhy would I want to do this?Sometimes when exporting and importing data, there are byte sequences that
prevent data being imported. To fix this you would otherwise have to do one or
more of:Manually edit the source data in its native application (eg backspace
invisible characters) in JIRA fieldsEdit the file with a hex editor and look for known-bad values (eg copyright
symbol)Do something smart with perl/vi/sed to find and replace known bad byte
patternsThis simple utility fixes these problems in one hit.Where do these strange characters come from?Number one culprit: copy and paste from outlook. This often introduces
invisible whitespace errors (spaces that are not spaces...) along with "pretty"
quotes, etc.Other sources including copying and pasting from files with theoldISO8859character encodingsCan I see an example file that demonstrates this issue?examples/test.txtThere is a copyright symbol at the end of the file that needs replacingWhat exactly is the problem?iso8859 represents symbols as a single byte, eg the copyright symbol would be
represented by the single hex byte:0xA9UTF8uses two bytes to represent such characters, eg:0xC2 0xA9Since UTF-8 is a variable width character encoding scheme, it will use from 1
to 4 bytes to encode a single symbol. This is how it is able to represent all
kinds of new symbols we take for granted such asemojiiandCJKcharacters.
Package: utf8_codepoint
Python libraryto make and get the encoding of unicode code points in UTF8.tables of rules for encoding UTF8Design UTF-8 can be seen in the following table that originally
proposed byDave Prosserand subsequently modified byKen Thompson.Bit
Code PointThe first
code pointThe last
code pointByte in
Squence7U+0000U+007F111U+0080U+07FF216U+0800U+FFFF321U+10000U+1FFFFF426U+200000U+3FFFFFF531U+4000000U+7FFFFFFF6You can read more on the table above ina link.Installationpip install utf8_codepointDoc And ContributeMore Documentation ingithub.Examplesimple examples using this package.Quick Startfromutf8_codepointimportCodePoint# unicode symbol for European currencyeuro_money="U+20AC"# create instance objectcp=CodePoint(euro_money)# get representation integer of the Unicode Code Pointprint(cp.to_int())the result is:226 130 172to a hexadecimal representationfromutf8_codepointimportCodePoint...print(cp.to_hex())the result is:E2 82 ACto a string with binary representationfromutf8_codepointimportCodePoint...print(cp.to_string())the result is:11100010 10000010 10101100to a list of binary string representationfromutf8_codepointimportCodePoint...print(cp.to_list())the result is:['11100010', '10000010', '10101100']displays all the data with beautiful stylefromutf8_codepointimportCodePoint...cp.bprint()the result is:{'0x20AC': {'bit_list': ['11100010', '10000010', '10101100'],
    'code_point': 16,
    'hexa_list': ['0xe2', '0x82', '0xac'],
    'initial_bit': '1110',
    'integer_list': [226, 130, 172]}}Get all datafromutf8_codepointimportCodePoint...print(cp.get_all())the result is:{'0x20AC':
        {
                'bit_list': ['11100010', '10000010', '10101100'],
                'integer_list': [226, 130, 172],
                'initial_bit': '1110',
                'hexa_list': ['0xe2', '0x82', '0xac'],
                'code_point': 16
        }
}If you want to turn it into a json format, you can pass a
true value as a parameter in the method get_all:cp.get_all(True)