Saravanan666/pypi-org huggingface dataset:
Package: d8s-netstrings
Democritus NetstringsDemocritus functions[1]for working with Netstrings.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8sas an abbreviation fordemocritus(you can read more about thishere).Functionsdefstring_to_netstring_ascii(string:str,*args):"""Convert the given string to a netstring (and return it's ascii representation)."""defstring_to_netstring_hex(string:str,*args):"""Convert the given string to a netstring (and return it's hex representation)."""defnetstring_ascii_to_netstring_hex(netstring_ascii:str):"""Convert a netstring (represented as ascii) to its hex representation."""defnetstring_hex_to_netstring_ascii(netstring_hex:str):"""Convert a netstring (represented as hex) to its ascii representation."""defnetstring_ascii_to_string(netstring_ascii:str):"""Get the string portion of the given netstring (represented as ascii)."""defnetstring_hex_to_string(netstring_hex:str):"""Get the string portion of the given netstring (represented as hex)."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-networking
Democritus NetworkingDemocritus functions[1]for working with network requests.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8sas an abbreviation fordemocritus(you can read more about thishere).Functionsdefrequests_basic_auth(user,password):"""Return an instance of request's basic auth."""defget(url,*,use_common_user_agent:bool=True,process_response:bool=False,process_response_as_bytes:bool=False,**request_kwargs,):"""Make a GET request to the given URL."""defhead(url,*,process_response:bool=False,**kwargs):"""Make a head request."""defpost(url,*,update_headers_for_datatype:bool=True,process_response:bool=False,process_response_as_bytes:bool=False,**request_kwargs,):"""Make a POST request to the given URL with the given data."""defheaders_update(headers:Dict[str,str],new_header_key:str,new_header_value:Any,*,overwrite:bool=True):"""."""defput(url,*,update_headers_for_datatype:bool=True,process_response:bool=False,process_response_as_bytes:bool=False,**request_kwargs,):"""Make a PUT request to the given URL with the given data."""defdelete(url,*,process_response:bool=False,process_response_as_bytes:bool=False,**request_kwargs,):"""Make a DELETE request to the given URL with the given data."""defurl_hash(url,hash_type='sha256'):"""Return the hash of the url."""defurllib3_backoff_factor_executions(backoff_factor:float,number_of_requests:int):"""Return the times (in seconds) of the first n requests with the given backoff_factor. See https://urllib3.readthedocs.io/en/latest/reference/index.html#urllib3.Retry under the "backoff_factor" argument."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-pdfs
Democritus PdfsDemocritus functions[1]for working with PDFs.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-pdfsUsageYou import the library like:fromd8s_pdfsimport*Once imported, you can use any of the functions listed below.Functionsdefpdf_read(pdf_path:str)->Iterable[str]:"""Get the string from the PDF at the given path/URL."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-random
Democritus RandomDemocritus functions[1]for working with random.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-randomUsageYou import the library like:fromd8s_randomimport*Once imported, you can use any of the functions listed below.Functionsdefrandom_number():"""Return a random number in range [0.0, 1.0)."""defrandom_integer(a=0,b=10):"""Return a random number between a and b (inclusive)."""defrandom_xkcd_integer():"""Get a random number using the method described here: https://xkcd.com/221/."""defrandom_dilbert_integer():"""Get a random number using the method described here: https://dilbert.com/strip/2001-10-25c."""defrandom_shuffle(iterable):"""Shuffle the order of the given iterable."""defrandom_choice(iterable):"""Return a random item from the iterable."""defrandom_choices(iterable,n:int):"""Return a random item from the iterable."""defrandom_sample(iterable,n):"""Return n items, selected at random, from the iterable."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-regexes
Democritus RegexesDemocritus functions[1]for working with and using regexes.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-regexesUsageYou import the library like:fromd8s_regexesimport*Once imported, you can use any of the functions listed below.Functionsdefis_regex(possible_regex:str)->bool:"""Determine whether or not the possible_regex is a valid regex."""defregex_closest_match(regex:str,string:str)->str:"""Find the longest version of regex that matches something in string."""defregex_simplify(regex:str,*,consolidation_threshold:int=5)->str:"""Clean and simplify a regex to a more efficient form."""defregex_create(inputs:List[str],*,simplify_regex:bool=True,consolidation_threshold:int=5)->str:"""Create a regex that matches all of the inputs."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-stats
Democritus StatsDemocritus functions[1]for working with statistics.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-statsUsageYou import the library like:fromd8s_statsimport*Once imported, you can use any of the functions listed below.Functionsdefstatistical_overview(data,*,data_is_sample:bool=False,result_if_no_mode:Any=None,raise_error_if_no_mode:bool=True):"""Return an overview of the data's statistical properties."""defmode(data,*,result_if_no_mode:Any=None,raise_error_if_no_mode:bool=True):"""Return the item in the data which occurs the greatest number of times."""defvariance(data,*,data_mean=None,data_is_sample:bool=False):"""Return the variance of the data (assuming the data represents an entire population)."""defstdev(data,*,data_mean=None,data_is_sample:bool=False):"""Return the standard deviation of the data (assuming the data represents an entire population)."""defmean(iterable):"""Return the average of the list."""defharmonic_mean(iterable):"""Return the harmonic mean of the list."""defgeometric_mean(iterable):"""Return the geometric mean of the list."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-timer
Democritus TimerDemocritus functions[1]for working with timers.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-timerUsageYou import the library like:fromd8s_timerimport*Once imported, you can use any of the functions listed below.Functionsdeftimer_start(name:str=None)->str:"""Start a timer with the given name. Timers can be stopped with the `timer_stop` function."""deftimer_get_time(name:str)->float:"""Get the current time for the timer with the given name."""deftimer_stop(name:str)->float:"""Stop a timer (you can start a timer with the `timer_start` function)."""deftime_it(func):"""Return the time it takes func to execute."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-timezones
Democritus TimezonesDemocritus functions[1]for working with timezones.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-timezonesUsageYou import the library like:fromd8s_timezonesimport*Once imported, you can use any of the functions listed below.Functionsdefpytz_timezone_object(timezone_name:str):"""Create a pytz timezone object for the given timezone_name."""defpytz_country_names():"""Get a dictionary with countries's ISO 3166 country code as keys and the country name as the value."""defpytz_country_timezones():"""Get a dictionary with countries's names as keys and the timezones as values."""deftimezones_names():"""Get a list of all timezones."""deftimezone_utc_offset(timezone_name:str,date):"""Find how many hours the given timezone is off from UTC."""deftimezone_abbreviation(timezone_name:str,date):"""Find the abbreviation for the given timezone_name."""defcountry_timezone_abbreviation(country_name:str,date):"""Find the abbreviation for the given country_name."""defcountry_code_timezone_abbreviation(iso_3166_country_code:str,date):"""Find the abbreviation for the given iso_3166_country_code."""defcountry_code_timezones(iso_3166_country_code):"""Find the timezones for the country with the given iso_3166_country_code."""defcountry_timezones(country_name):"""Find the timezones for the given country."""deftimezone_countries(timezone_name):"""Find countries in the given timezone_name."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-toml
Democritus TomlDemocritus functions[1]for working with TOML.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-tomlUsageYou import the library like:fromd8s_tomlimport*Once imported, you can use any of the functions listed below.Functionsdeftoml_read(toml_data:str):"""Read the toml data."""defis_toml(possible_toml_data:str)->bool:"""Determine whether the possible_toml_data is valid toml data."""deftoml_write(data:dict)->str:"""Convert the given data to a toml string."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-user-agents
Democritus User AgentsDemocritus functions[1]for working with User Agents.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-user-agentsUsageYou import the library like:fromd8s_user_agentsimport*Once imported, you can use any of the functions listed below.Functionsdefuser_agent_common():"""."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-uuids
Democritus UuidsDemocritus functions[1]for working with uuids.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-uuidsUsageYou import the library like:fromd8s_uuidsimport*Once imported, you can use any of the functions listed below.Functionsdefuuid4_examples(n:int=10,*,uuids_as_strings:bool=True)->Union[List[str],List[uuid.UUID]]:"""Create n uuids."""defuuid4()->str:"""Create a random UUID."""defuuid3(name:str,*,namespace:Optional[uuid.UUID]=None)->str:"""Create a random uuid based on the given name."""defuuid5(name:str,*,namespace:Optional[uuid.UUID]=None)->str:"""Create a random uuid based on the given name."""defis_uuid(possible_uuid:Union[str,uuid.UUID],*,version:Optional[int]=None)->bool:"""Return whether or not the possible_uuid is a uuid."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-xml
Democritus XmlDemocritus functions[1]for working with XML.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-xmlUsageYou import the library like:fromd8s_xmlimport*Once imported, you can use any of the functions listed below.Functionsdefxml_read(xml_path:str)->Element:"""Read the XML from the given path (which can be a URL, file path, or string) and return an xml Element tree."""defis_xml(possible_xml:str)->bool:"""."""defxml_as_string(xml_input:Element)->str:"""Convert the given xml_input to a string."""defxml_read_first_arg_string(func):"""Return an XML element for first argument (if it is a string)."""defstringify_first_arg_xml_element(func):"""If the first arg is an XML element, send its string representation into the function."""defxml_structure(xml_input:StringOrXmlElement)->Dict[str,dict]:"""."""defxml_to_json(xml_input:StringOrXmlElement)->Dict[str,List[Dict[str,List[Dict[str,str]]]]]:"""Convert the xml to json using https://gitlab.com/fhightower/html-to-json."""defxml_text(xml_input:StringOrXmlElement)->str:"""Convert the given xml_input to a string."""defxml_file_names(path:str)->List[str]:"""Find all xml files in the given directory."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d8s-yaml
Democritus YamlDemocritus functions[1]for working with YAML.[1] Democritus functions aresimple, effective, modular, well-tested, and well-documentedPython functions.We used8s(pronounced "dee-eights") as an abbreviation fordemocritus(you can read more about thishere).Installationpip install d8s-yamlUsageYou import the library like:fromd8s_yamlimport*Once imported, you can use any of the functions listed below.Functionsdefyaml_files(path,*,include_yml_extensions:bool=False):"""."""defyaml_read(yaml_data:str):"""."""defis_yaml(possible_yaml_data:str)->bool:"""."""defyaml_write(data:Json,**kwargs)->str:"""."""defyaml_clean(yaml_data:str)->str:"""Standardize the given yaml data."""defyaml_standardize(yaml_data:str)->str:"""Standardize the given yaml data by reading and writing it."""defyaml_sort(yaml_data:str)->str:"""."""Development👋  If you want to get involved in this project, we have some short, helpful guides below:contribute to this project 🥇test it 🧪lint it 🧹explore it 🔭If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.CreditsThis package was created withCookiecutterand Floyd Hightower'sPython project template.
Package: d9t.json
IntroductionThis is a json parser. It understands everything within brackets. That means,
you will give it anything like{‘activePolygonId’:null,’polygons’:null,’route’:null}Of course deeply nested arrays are fully supported without a limit.Copyright / LicenseGPLv3This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program 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 General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.d9t.json>>> from d9t.json import parserLet’s define some json data.>>> json = """ {'data1':null, 'data2':'something', 'data3':[-1.42,2,-3,.34,-.55',string',true,{'datanested':'something','floatdata':44.22, 'bool':false}]} """
>>> domparser = parser.JsDomParser(json)
>>> data = domparser.parse()>>> sorted(data.keys())
['data1', 'data2', 'data3']>>> data["data1"] is None
True>>> data["data2"]
'something'>>> len(data['data3'])
8>>> data['data3'][0] == -1.42
True>>> data['data3'][1] == 2
True>>> data['data3'][2] == -3
True>>> data['data3'][3] == .34
True>>> data['data3'][4] == -0.55
True>>> data['data3'][5] == ',string'
True>>> data['data3'][6] == True
True>>> sorted(data['data3'][7].keys())
['bool', 'datanested', 'floatdata']>>> data['data3'][7]['bool'] == False
True>>> data['data3'][7]['floatdata'] == 44.22
True>>> data['data3'][7]['datanested'] == 'something'
TrueThat’s it ;)Changelog0.4 - Bugfix release [20090622 - Daniel Kraft]Negative Integers, negative Floats and floats with a “.”-start were not
parsed correctly. Thanks Kevin Oberlies.0.3* - splitted off from google.directions [Daniel Kraft]Initial release
Package: daaayonearth
The 'Daaayonearth' library contains three classes:Location, TimeZone and EnvConditions.
These provide easy access togeographical,meteorologicalandphotovoltaic performancedata/services, namely:the (latitude, longitude) tuple belonging to a specific address / location string (geocoding)thetimezonebelonging to a specific location (at a given date)the typical environmental conditions belonging to a day at a specific location & date, including:air temperatureair pressureair humiditywind speedwind directionsun heightsolar irradiancemaximal photovoltaic performanceFor each of said parameters there is afunctionas well as a belongingplotavailable,
which provide the course of said parameter over the chosen day.Examples#import from daaayonearthimportdaaayonearthfromdaaayonearthimportLocation,TimeZone,EnvConditions#import from standard libraryfromdatetimeimportdatetimeasDatetimefromdatetimeimportdateasDate#set application namedaaayonearth.UserAgentNameS="DaaayExampleApp"#get (latitude, longitude) tuple from address stringdeu=Location("Willy-Brandt-Str., 10557 Berlin")# ==> (52.5202262, 13.3704874)#get timezone (Python tzfile) belonging to locationtzDeu=TimeZone(deu)# ==> tzfile('Europe/Berlin')#convert a date to another timezonedate=Datetime(2021,11,1,20,40,0,tzinfo=tzDeu)# ==> 2021-11-01 20:40:00+01:00date.astimezone(TimeZone("Pennsylvania Ave. NW, Washington, DC 20020, USA"))# ==> 2021-11-01 15:40:00-04:00#get the typical temperature at 12 o'clock#in the Willy Brandt Street, Berlin - on the 2th of November (year is ignored)envConds=EnvConditions(Location("Willy-Brandt-Str., 10557 Berlin"),Date(2021,11,2))envConds.functionsD["T(2m) [Â°C]"](12*3600)# ==> 5.03#get a matplotlib figure of the belonging course of temperature for said location/dayenvConds.getFigureOf("T(2m) [Â°C]")# ==> plot (course of temperature)#get the list of available parameters (for envConds.functionsD[...] and envConds.getFigureOf(...))list(envConds.functionsD.keys())# ==> [ 'T(2m) [Â°C]', 'Humidity [%]', 'Irradiance [W/m^2]',#       'WindSpeed(10m) [m/s]', 'WindDirection(10m) [Â°]',#       'Pressure(0m) [Pa]', 'PvPower [W]', 'SunHeight [Â°]' ]#it is also possible to setup the environment conditions 'manually' - using the 'auto' parameter#as the Tmy-part is far less time consuming than the Pvp-part, this e.g. can be used to minimize#waiting timesenvConds=EnvConditions("Willy-Brandt-Str., 10557 Berlin","11-02",auto=False)envConds.loadTmy()envConds.processTmy()#after this, one already has access to all functions/figures#but 'SunHeight [Â°]' and 'PvPower [W]'envConds.loadPvp()#the Pvp-block needs about 5 times more time (e.g. some 20s!)envConds.processPvp()envConds.cleanUp()#do not forget to clean up - also if you just use the Tmy-partIf you use this library you might ('under the hood') use data and/or services connected with
'OpenStreetMap', 'Nominatim' and/or 'PVGIS' - please find more informations concerning this
topic in the LICENSE text!Further infomations and links also can be found on my homepagehttps://www.blackward.deHave Fun!
Package: daab
dns-as-a-databaseDNS as a Database (DAAB) is a key-value database using DNS TXT records for it's data structure.FeaturesRedis-likeNo storage or memory requirementsWorksRequirementsPython 3.6+A DigitalOcean account and API keyA domain nameInstallation and SetupTo install DAAB use pip:pipinstalldaabBut you're also going to need to:Buy a domain namePoint it to DigitalOcean NamserversAdd it to your DigitalOcean accountCreate an access tokenExamplesfromdaabimportDAABdaab=DAAB('<DIGITALOCEAN_API_KEY>','<DOMAIN_NAME>')# Create/update a recorddaab.set('mykey','myvalue')# Use glob search to find keysdaab.scan('*key')# Get recorddaab.get('mykey')# Delete recorddaab.delete('mykey')TutorialsRead the announcement bloghere.DocumentationRead the code, it's not that big.LicenseMIT.