Saravanan666/pypi-org huggingface dataset:
Package: callisto
CallistoThe fourth Galilean moon of Jupyter.A command line utility to create kernels in Jupyter from virtual environments.InstallationCallisto may be installedfrom pypi:pip install callistoTested against python 2.7, 3.4, 3.5, 3.6.Basic Usage.Typical use is to just activate it inside a virtual environment:$  virtualenv venv
...
$  source venv/bin/activate
(venv) $  callisto
Successfully installed a new jupyter kernel "venv":
{
  "env": {},
  "language": "python",
  "display_name": "venv",
  "argv": [
    "/Users/colin/venv/bin/python",
    "-m",
    "ipykernel",
    "-f",
    "{connection_file}"
  ]
}
See /Users/colin/Library/Jupyter/kernels/venv/kernel.json to edit.Jupyter servers will now have an option for a kernel calledvenv.Naming the kernel.You may also give kernels a more descriptive name:(venv) $  callisto -n pete
Successfully installed a new jupyter kernel "pete":
{
  "env": {},
  "display_name": "pete",
  "argv": [
    "/Users/colin/venv/bin/python",
    "-m",
    "ipykernel",
    "-f",
    "{connection_file}"
  ],
  "language": "python"
}
See /Users/colin/Library/Jupyter/kernels/pete/kernel.json to edit.Jupyter servers will now have an option for a kernel calledvenv, andpete.Deleting kernels.Sometimes you may want to tidy kernels up a bit.(venv) $  callisto -d
Deleted jupyter kernel "venv" from /Users/colin/Library/Jupyter/kernels/venv/kernel.json:
{
  "argv": [
    "/Users/colin/venv/bin/python",
    "-m",
    "ipykernel",
    "-f",
    "{connection_file}"
  ],
  "env": {},
  "language": "python",
  "display_name": "venv"
}Jupyter servers will no longer have a kernel namedvenv.Lacking courage.Callisto doesn’t try to be too clever.(venv) $  deactivate

$  callisto
Usage: callisto [OPTIONS]

Error: The environment variable VIRTUAL_ENV is not set (usually this is set
automatically activating a virtualenv).  Please make sure you are in a
virtual environment!Viewing existing kernels.If you forgot the informative message about the kernel information, you can see it later.$  source venv/bin/activate

(venv) $  callisto --list
No kernel found at /Users/colin/Library/Jupyter/kernels/venv/kernel.json

(venv) $  callisto -l --name pete
Found kernel "pete" at /Users/colin/Library/Jupyter/kernels/pete/kernel.json:
{
  "display_name": "pete",
  "language": "python",
  "argv": [
    "/Users/colin/venv/bin/python",
    "-m",
    "ipykernel",
    "-f",
    "{connection_file}"
  ],
  "env": {}
}Adjusting thePYTHONPATH.With isolated kernels, you may wish to run all your notebooks from a single directory,
but using code from the project directories.(venv) $  callisto -n pete --path=$(pwd)
Successfully installed a new jupyter kernel "pete":

{
  "argv": [
    "/Users/colin/venv/bin/python",
    "-m",
    "ipykernel",
    "-f",
    "{connection_file}"
  ],
  "language": "python",
  "env": {
    "PYTHONPATH": "/Users/colin/projects/pete:PYTHONPATH"
  },
  "display_name": "pete"
}
See /Users/colin/Library/Jupyter/kernels/pete/kernel.json to edit.Now thepetekernel will be able to import from the folder/Users/colin/projects/pete.
Package: callistoDownloader
callistoDownloaderA python package for downloading spectrograms sourced from thee-Callisto, which is an international network of solar radio spectrometers.This package allows for bulk downloads of spectrograms for a given set of days in a given month and year, for a list of given instruments (visitlinkfor a list of all instruments from which the data is sourced).The downloads are structured within ae-Callistodirectory inside the working directory. The same is illustrated below:working directory/
└───e-Callisto/
    └───yyyy/
        └───mm/
            └───dd/
                └───file1..
                    file2..Functions of this package:which_years()Prints all those years for which any spectrograms are availablewhich_months(select_year)Prints all those months of a given year for which spectrograms are availablewhich_days(select_year, select_month)Prints all those days of a given year and month for which spectrograms are availableinstrument_codes()Prints instructions for choosinginstrumentsparameter indownload()download(select_year, select_month, select_day, instruments)Downloads the spectrograms for given list of days of a given year and month; for set of instrumentsIf a file already exists, the download() will skip re-downloading it but the progress bar indicates the total files and not just the downloaded ones.Argument rules:select_yearmust be a valid 4-digit integerselect_monthmust be a valid integerselect_daycould either be a valid integer or a list of valid integersinstrumentscould be either a singleinstrument code[^1] or a wildcard string ending with an asterisk indicating to download all the files which start with the wildcard string.[^1]:Instrument codesis a list of codes derived specifically for this package and each code corresponds to one of the instrument-location combination fromlink. The text before the first hyphen in a file name is theinstrument code.Understanding theinstrumentsparameter:Seelinkand if you would want to download all files fromMauritius, then the argument forinstrumentswould be'MRT*'but if you would want to download only the data from Callisto intensity 45 MHz-870 MHz	of Poste de Flacq, Mauritius, LPDA, then that argument would be'MRT1'.If theinstrumentsargument of thedownload()function ends with an asterisk, all the files from a given date which start with the argument are downloaded.
Package: callisto-nbviewer
callistoA jupyter notebook viewer that has the following features:Use ContentsManager as content provider. Therefore it is completely work with any of your jupyterhub settings.Showing Table of Contents for quickly reference to your notebookDirectly import the notebook to your jupyterhub server.Getting StartedInstall the package:pip install callisto-nbviewerstart the server:callisto start --port 5000Visit websitelocalhost:5000ConfigurationYou can use your own config to customize callisto. see example ontests/fixtures/config.pyontents_manager_cls = "s3contents.S3ContentsManager"
# `contents_manager_cls` can be string or ContentsManger class
# You can use any existing ContentsManager to load data.
# If the value is not set, the default would be FileContentsManager
# and will serve contents on current working directory


contents_manager_kwargs = {
    "bucket": "test-bucket",
    "access_key_id": "testing",
    "secret_access_key": "testing",
    "endpoint_url": "http://localhost:3000"
}
# [Optional] `contents_manager_kwargs` is a dict of kwargs to configure the required settings
# for whatever ContentsManager you choose.


jupyterhub_base_url = "https://jupyterhub.example.com"
# [Optional] `jupyterhub_base_url` if set, you can import the notebook directly to your jupyterhub server
# This is the base url to your jupyterhub.

import_link_with_hubshare_preview = True
# [Optional] `import_link_with_hubshare_preview`: if you have installed jupyterlab-hubshare plugin,
# You can use this link to show preview on your notebook server


import_link_func = lambda path: "prefix/" + path
# [Optional] `import_link_func` is a function in that takes the current path as an input,
# You can do any magic to update the final path in case the path on the site is different
# from the path on jupyterhub.and then start callisto withcallisto --config my_callisto_config.pyConfig for different contents managerLocal Filecontents_manager_cls = "managerjupyter_server.services.contents.filemanager.FileContentsManager"
contents_manager_kwargs = {"root_dir": "/absolute/path/to/your/notebook/folder"}S3Note that s3contents seems to be fetching the directory last_modified time, and is very slow.
Therefore I make a work around file incallisto.contents_managers.s3.SimplifiedS3ContentsManagerclass
please take a look on the settings.contents_manager_cls = "callisto.contents_managers.s3.SimplifiedS3ContentsManager"
contents_manager_kwargs = {
    "bucket": "my-s3-bucket",
    "prefix": "prefix/to/your/notebook/folder",
    "aws_access_key_id": "my_access_key",
    "aws_secret_access_key": "my_secret_access_key",
}if your file s3 doesn't contains a lot of folders, you can still use s3contents (please ensure you also installs3contents)contents_manager_cls = "s3contents.S3ContentsManager"
contents_manager_kwargs = {
    "bucket": "my-s3-bucket",
    "prefix": "prefix/to/your/notebook/folder",
}for more settings, please refer to:s3contentsDevelopmentto start a dev version, download the git repo:git clone https://github.com/lydian/callisto.gitand runcd callisto
make start-devThe dev server will running onhttp://localhost:5001
Package: callofduty.py
CallofDuty.pyCallofDuty.py is an asynchronous, object-oriented Python wrapper for the Call of Duty API.FeaturesAsynchronous and Pythonic usingasyncandawaitType checks and editor completion usingType HintsObject-oriented and predictable abstractionsUsageConstruct a new Call of Duty client, then use the various services on the client to access different parts of the Call of Duty API.InstallationCallofDuty.py requires Python 3.10 or greater. Once this requirement is met, simply install CallofDuty.py!pip install callofduty.py

# or

poetry add callofduty.pyExampleThe following is a complete example which demonstrates:Authenticating with the Call of Duty APISearching for a userListing the first 3 search resultsGetting the Modern Warfare Multiplayer profile of the second resultDisplaying their basic statisticsimportasyncioimportcallofdutyfromcallofdutyimportMode,Platform,Titleasyncdefmain():client=awaitcallofduty.Login("YourEmail@email.com","YourPassword")results=awaitclient.SearchPlayers(Platform.Activision,"Captain Price",limit=3)forplayerinresults:print(f"{player.username}({player.platform.name})")me=results[1]profile=awaitme.profile(Title.ModernWarfare,Mode.Multiplayer)level=profile["level"]kd=profile["lifetime"]["all"]["properties"]["kdRatio"]wl=profile["lifetime"]["all"]["properties"]["wlRatio"]print(f"\n{me.username}({me.platform.name})")print(f"Level:{level}, K/D Ratio:{kd}, W/L Ratio:{wl}")asyncio.get_event_loop().run_until_complete(main())ReleasesCallofDuty.py followsSemantic Versioningfor tagging releases of the project.Changelogs can be found on theReleasespage and follow theKeep a Changelogformat.ContributingThe goal is to cover the entirety of the Call of Duty API, so contributions are always welcome. The calling pattern is pretty well-established, so adding new methods is relatively straightforward. SeeCONTRIBUTING.mdfor details.Thanks & CreditsTustin- Call of Duty API Authorization FlowActivision- Call of Duty Logo & API Service
Package: callonce
callonceUsagefromcallonceimportcallonce@calloncedef_return_true()->bool:returnTruedef_call_return_true():return_return_true()def_call_return_true_3times():return_return_true(times=3)deftest_call_once():assert_call_return_true()==Trueassert_call_return_true()==Nonedeftest_call_3times():assert_call_return_true_3times()==Trueassert_call_return_true_3times()==Trueassert_call_return_true_3times()==Trueassert_call_return_true_3times()==NoneWe offer aprintoncefunction for easy debug in deep learning model, e.g., PyTorch. You don't have to remove theprintoncewhen training the model in loop because the shape will be printed only once.fromcallonceimportprintoncefromtorchimportnnclassNet(nn.Module):def__init__(self):self.linear=nn.Linear(4,8)defforward(self,x):printonce('x:',x.shape)y=self.linear(x)printonce('y:',y.shape)returny
Package: callooktools
callooktoolsWARNING:This library is now deprecated. Usecallsignlookuptoolsinstead.Callook.infoAPI interface in PythonInstallationcallooktoolsrequires Python 3.8 at minimum.# synchronous requests only$pipinstallcallooktools# asynchronous aiohttp only$pipinstallcallooktools[async]# both sync and async$pipinstallcallooktools[all]# enable the CLI$pipinstallcallooktools[cli]Note:Ifrequests,aiohttp, orrichare installed another way, you will also have access to the sync, async, or command-line interface, respectively.DocumentationDocumentation is available onReadTheDocs.CopyrightCopyright 2021 classabbyamp, 0x5cReleased under the BSD 3-Clause License.SeeLICENSEfor the full license text.
Package: call-openai-gpt
# Call OpenAI GPT, OpenAI GPT Python Wrapper用 Python 以 API 的方式呼叫 OpenAI 的 GPT 服務。## 前置需求1.Python 3.6 或以上2.`requests`套件3.`python-dotenv`套件4.OPENAI_API_KEY，在`.env`檔案中設定## 安裝使用 pip 從 GitHub 安裝：

```bash
python3 -m pip install call-openai-gptcall_openai_gpt 參數1. `prompt` (必需): 這是模型的輸入，模型會根據這個輸入來進行生成。你可以給任何的提示、問題，或甚至是故事的開盤等。
2. `model` (預設值: "gpt-4"): 這是你希望使用的模型。
3. `temperature` (預設值: 0): 此參數表示生成的隨機性。若將此參數設為高值，將造成生成結果更多變化和創新，但可能較不相關或不合理。若設為較低的值，則生成的輸出較確定且一致，但可能較缺乏創新。
4. `max_tokens` (預設值: 無): 這個參數可以設定生成的最大字數。如果你有特定的長度需求，可以考慮設定此參數。請注意，設定此參數的數值太高或太低都可能導致生成結果品質下降。fromcall_openai_gptimportcall_openai_gptprompt="你好!用繁體中文打招呼吧~"response=call_openai_gpt(prompt)print(response)
Package: callouts
Callouts - a minimalist dispatch systemA python module implementing lose, class-based coupling.Imagine we had an application that checks weather for one place, but using multiple service. The functionality to get weather for a specific service could be implemented in individual modules.To implement this withcallouts, we first need to implement the extensibility base by creating a class with the@callouts.basedecorator.@callouts.baseclassWeather:defget_for(location:str)->str:passNow, individual implementations can be added
simply by extending the class and implementing theget_formethod.classFirstWeatherService(Weather):defget_for(location:str)->str:return'sunny'classSecondWeatherService(Weather):defget_for(location:str)->str:return'cloudy'with those definition in place, as soon as the modes are loaded it is possible to get both weathers by calling theget_formethod on theWeatherclass:print(Weather.get_for('place'))will print out['sunny','cloudy']
Package: callpyfile
Executes python scripts in different environments without writing temp files to disk, it can pass and receive any variable, multiprocessing can be executed from everywhere, not only at top-levelpip install callpyfile# Create a file called callc1.pyimportsysfromcallpyfileimportrun_py_file# use this function to call the pyfilefroma_cv_imwrite_imread_plusimportopen_image_in_cv# an example with OpenCVpics=["https://github.com/hansalemaos/screenshots/raw/main/gimages/elephant.png","https://github.com/hansalemaos/screenshots/raw/main/gimages/dl.png","https://github.com/hansalemaos/screenshots/raw/main/gimages/house.png",]allpics=[]allpics_=[open_image_in_cv(x)forxinpics]forpinrange(100):allpics.extend(allpics_)# Execute the py fileresu=run_py_file(variables={"imagelist":allpics},# The keys will be the global variables in the called pyfilepyfile=r"C:\Users\Gamer\anaconda3\envs\dfdir\callc2.py",# The pyfileactivate_env_command="",# if you want to activate another environment, you can pass something like this (Anaconda): activate_env_command = ['activate.bat', 'otherenv']pythonexe=sys.executable,# python.exe from your active environmentraise_exception=False,# if raise_exception is False, the function returns None if an Exception occurs during the Execution)# Create another file called callc2.pyimporttimeimportcv2frompathos.multiprocessingimportProcessingPoolasPool# By the way: good stuffimportnumpyasnpfromcallpyfileimportto_stdout# import the decorator# Some CV stuffdefdo_cv2_stuff(img):kernel=np.ones((5,5),np.float32)/25dst=cv2.filter2D(img,-1,kernel)returndst@to_stdout(kill_if_exception=True)# optional, kills the process using os._exit()defexemu():pool=Pool(nodes=5)res=pool.amap(do_cv2_stuff,imagelist)# imagelist is not defined yet, but it doesn't matter because the decorator will create global variables from the dict you'have passed: {"imagelist": allpics},whilenotres.ready():time.sleep(0.001)allb=res.get()returnallbif__name__=="__main__":exemu()# Run  callc1.pyprint(allpics[0][:1])[[[255255255][255255255][255255255]...[545350][575552][595754]]]print(resu[0][:1])[[[255255255][255255255][255255255]...[595855][565451][565552]]]
Package: callrate
# Install```python3 setup.py install```# Usage``` pythonimport threadingfrom callrate import call_rateimport time@call_rate(7, 10, False)def test_print(i):print("Thread -> {}".format(i))def test_thread(i):while True:try:test_print(i)except:passdef main():threads = []for i in range(10):threads.append(threading.Thread(target=test_thread, args=(i, )))threads[-1].start()for thread in threads:thread.join()if __name__ == "__main__":main()```# WarningNote that the `call_rate` and `CallRate` is thread safe (not process safe)
Package: callscript
CallscriptNot worth it to refactor your script into a bunch of functions?  This is a simple python library that lets you run your script as though you had, so you can
callresults = callscript('myscript.py', x=3, y=4).  Just add comments in your scirpt to show where the inputs and outputs are, andcallscriptwill
make the function work properly:# myscript.pyx=1# inputy=2# inputw=x*yv=x/y# outputz=x+y# outputprint(z)# ignoreWhy does this exist?  Because sometimes you don't want to touch your old code or want to keep working with it using an interactive coding tool like Spyder, VSCode's interactive mode, or Jupyter, but you still want to be able to test your script using new parameters, or wrap it with a user interface.Or maybe you're not sure how to go about changing the script's code to make it work in a new context and don't have a lot of time at the moment to work it out, or maybe you're collaborating with someone who isn't ready to refactor the script yet.In any case,  withcallscript, you can leave the original script alone and wrap it with your new functionality.InstallationInstallcallscriptwith PyPIpipinstallcallscriptUsage / ExamplesSimple Input-Output LabelingIf you label your script with the "input" or "output" comments,callscriptcan call it!# examples/script.pyx=3# inputy=5# inputz=x+y# outputThen from your other code, you can call it with thecallscript()function:>>>fromcallscriptimportcallscript>>>callscript('examples/script.py',x=10,y=20){'z':30}Modifying Input-Output Variable Names for your Function's APIWant to change your variable names? You can do that, too!# examples/script2.pyx=3# input:FirstWeeky=5# input:SecondWeekz=x+y# output:sum>>>callscript('examples/script2.py',FirstWeek=10,SecondWeek=20){'sum':30}Ignoring Lines When the Script is Called as a FunctionWant some lines to be ignored when being called bycallscript()?  Use the# ignoretag!# examples/script3.pyx=3# inputy=5# inputinput('What is your name?')# ignorez=x+y# outputz=100000# ignore>>>callscript('examples/script3.py',x=10,y=20){'z':30}Using the Orignal Script Values as Function Defaultscallscript()will automatically use the original values of the inputs in the script as defaults.# examples/script4.pyname='Nick'# inputgreeting='Hello, '# inputmsg=greeting+name# output>>>callscript('examples/script4.py',name='Emma'){'msg':'Hello, Emma'}AuthorsNicholas A. Del GrossoRunning TestsTo run tests, run the following commandtoxContributingAdding to the ChangelogDon't modify theCHANGELOG.rstfile directly!  Instead, usescriv createmake a new entry for the changelog.  After you've written a contribution, add the entry and write what  you did into the template.   When we are ready to make a release, we'll use thescriv collectcommand to aggregate these fragments into a new changeelog entry.
Package: callsignlookuptools
callsignlookuptoolsAQRZ,Callook,HamQTH, andQRZCQAPI interface in Python with sync and async support.Installationcallsignlookuptoolsrequires Python 3.9 at minimum.# synchronous requests only$pipinstallcallsignlookuptools# asynchronous aiohttp only$pipinstallcallsignlookuptools[async]# both sync and async$pipinstallcallsignlookuptools[all]# enable the CLI$pipinstallcallsignlookuptools[cli]Note:Ifrequests,aiohttp, ortyper[all]andclick-help-colorsare installed another way, you will also have access to the sync, async, or command-line interface, respectively.Usage and DocumentationDocumentation is available onReadTheDocs.API SupportSome of the supported callsign lookup APIs require accounts and/or paid subscriptions to be used.SiteRequirementsQRZQRZ account andXML Logbook Data or QRZ Premium subscriptionCallookNoneHamQTHHamQTH accountQRZCQQRZCQ account andQRZCQ Premium subscriptionCopyrightCopyright 2021-2023 classabbyamp, 0x5cReleased under the BSD 3-Clause License.SeeLICENSEfor the full license text.
Package: callspect
# callspectInspect program execution from data generated bycallspectpy`bash # run app as background process $ callspect~/path-to-file-generated-by-callspectpy& # open `callspect` in default browser and view data $xdg-openhttp://127.0.0.1:5000/`## TODO Future:call args seperated with newlines as optionmax/min window with app-headerlayout customizationhttps://www.webcomponents.org/element/vaadin/vaadin-split-layouthttps://www.webcomponents.org/element/kcmr/resizable-panelsshould be reflected in link AND allow to change WITHOUT refreshscr-code filename is floatingdetails-box: open-in-editor actionhidable left pane with (app-drawer)show whole map flow with warning about too-many-callsmain-thread selected in call-tree shows all flow map?limit actor parent calls?limit actor child calls?allow picked package to be shown (default all-checked?)DX: files *.css.html are shitty copy-paste from node_modules, there must be a better wayactor has zooming featureshow only module-level interactionshow only class-level interactionshow only obj-level interactionshow only function-level interactionsequence svg reacts by highlighting in call-treehttps://developer.mozilla.org/en-US/docs/Web/SVG/Element/svgadditional vertical layoutdiagram handles recurrent fn
Package: callspectpy
# callspectpyCollects execution data from python script## CLI```bash$ callspectpy -i my-script.py```## APITo collect data for specific code, just wrap the code like this:```pythonimport callspectpy, oscallspectpy.trace2file_start(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'callspect.txt'))## YOUR CODE HERE#callspectpy.trace2file_stop()```Or better, use context manager:```pythonfrom callspect.py import trace2filewith trace2file('output.txt'):# YOUR CODE HERE```### TODO:* exec(code_obj) generates odd "<module>", replace it with name user passes* when runnnig "from my_package.lib import my_fn", module is equal "lib" :(
Package: call-throttle
call-throttleThis package provides decorators which can be used to throttle calls of regular Python functions and asyncio coroutines.InstallUsepippackage installer for Python:python-mpipinstall--upgradecall-throttleMake sure you have Python 3.7 or later installed.UsageHere is a basic example for how to use thethrottledecorator with functions and coroutines:importtimeimportasynciofromdatetimeimporttimedeltafromcall_throttleimportthrottle@throttle(calls=1,period=timedelta(seconds=1))deffunc():time.sleep(1)@throttle(calls=1,period=timedelta(seconds=2))asyncdefcoro():awaitasyncio.sleep(1)If passingraise_on_throttle=Trueto@throttle(...), then acall_throttle.ThrottleExceptionis raised when a decorated function or coroutine is called more times than the definedcallslimit within the specified timeperiod.LicenseThis is a free software licensed under the terms of the MIT License.