content
stringlengths
21
24.2k
avg_line_length
float64
10.4
231
max_line_length
int64
20
8.17k
alphanum_fraction
float64
0.25
0.82
licenses
list
repository_name
stringlengths
11
51
path
stringlengths
7
121
size
int64
21
24.2k
lang
stringclasses
1 value
nl_text
stringlengths
19
20.6k
nl_size
int64
19
20.6k
nl_ratio
float64
0.8
1.07
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """spaCy ANN Linker, a pipeline component for generating spaCy KnowledgeBase Alias Candidates for Entity Linking.""" __version__ = '0.1.10' from .ann_linker import AnnLinker from .remote_ann_linker import RemoteAnnLinker #...
34.583333
116
0.772289
[ "MIT" ]
jjjamie/spacy-ann-linker
spacy_ann/__init__.py
830
Python
spaCy ANN Linker, a pipeline component for generating spaCy KnowledgeBase Alias Candidates for Entity Linking. Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. TODO: Uncomment (and probably fix a bit) once this PR is merged upstream https://github.com/explosion/spaCy/pull/4988...
689
0.83012
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011-2014, Nigel Small # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
33.238095
74
0.747851
[ "Apache-2.0" ]
alaalqadi/py2neo
py2neo/error/__init__.py
698
Python
!/usr/bin/env python -*- coding: utf-8 -*- Copyright 2011-2014, Nigel Small Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicabl...
597
0.855301
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission 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...
44.7
79
0.774049
[ "MIT" ]
ragne/ansible-lint
lib/ansiblelint/__init__.py
1,341
Python
Main ansible-lint package. Copyright (c) 2013-2014 Will Thames <will@thames.id.au> Permission 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 ...
1,147
0.855332
# Everything we've seen to this point has been a problem known as regression in # which we're trying to predict an actual numeric value for each observation of # N input numeric values. A more common problem is that of classification - # predicting a single binary occurance, class or label for each input. The # example...
47.311475
80
0.64784
[ "MIT" ]
avinoamr/ai-neural
07_classification.py
8,658
Python
Everything we've seen to this point has been a problem known as regression in which we're trying to predict an actual numeric value for each observation of N input numeric values. A more common problem is that of classification - predicting a single binary occurance, class or label for each input. The example we'll exp...
7,422
0.857242
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicabl...
31.838926
94
0.697407
[ "Apache-2.0" ]
AkashNarayanan/pennylane
pennylane/gradients/__init__.py
9,488
Python
Quantum gradient transforms are strategies for computing the gradient of a quantum circuit that work by **transforming** the quantum circuit into one or more gradient circuits. These gradient circuits, once executed and post-processed, return the gradient of the original circuit. Examples of quantum gradient transform...
8,601
0.906513
import dynamo as dyn import numpy as np import scipy.io from scipy import optimize # def VecFnc( # input, # n=4, # a1=10.0, # a2=10.0, # Kdxx=4, # Kdyx=4, # Kdyy=4, # Kdxy=4, # b1=10.0, # b2=10.0, # k1=1.0, # k2=1.0, # c1=0, # ): # x, y = input # dxdt = ( # ...
27.744966
136
0.497823
[ "BSD-3-Clause" ]
aanaseer/dynamo-release
tests/tests.py
8,270
Python
def VecFnc( input, n=4, a1=10.0, a2=10.0, Kdxx=4, Kdyx=4, Kdyy=4, Kdxy=4, b1=10.0, b2=10.0, k1=1.0, k2=1.0, c1=0, ): x, y = input dxdt = ( c1 + a1 * (x ** n) / (Kdxx ** n + (x ** n)) + (b1 * (Kdyx ** n)) / (Kdyx ** n + (y ** n)) ...
7,589
0.917876
''' The Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 = 13 F8 = 21 F9 = 34 F10 = 55 F11 = 89 F12 = 144 The 12th term, F12, is the ...
16.425
85
0.601218
[ "MIT" ]
malienko/projecteuler_python
problem25.py
661
Python
The Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 = 13 F8 = 21 F9 = 34 F10 = 55 F11 = 89 F12 = 144 The 12th term, F12, is the firs...
541
0.82344
""" Django settings for the Sphinx documentation builder. All configuration is imported from :mod:`backend.settings` except it sets :attr:`USE_I18N` to ``False`` to make sure the documentation is not partially translated. For more information on this file, see :doc:`topics/settings`. For the full list of settings and ...
38.85
116
0.773488
[ "Apache-2.0" ]
Integreat/integreat-cms
src/backend/sphinx_settings.py
779
Python
Django settings for the Sphinx documentation builder. All configuration is imported from :mod:`backend.settings` except it sets :attr:`USE_I18N` to ``False`` to make sure the documentation is not partially translated. For more information on this file, see :doc:`topics/settings`. For the full list of settings and thei...
646
0.831403
## # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
42.846154
75
0.746858
[ "Apache-2.0" ]
AnthonyTruchet/cylon
python/pycylon/pycylon/common/__init__.py
557
Python
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distrib...
517
0.928187
""" Projection class for the Sunyaev-Zeldovich effect. Requires SZpack (version 1.1.1), which is included in SZpack.v1.1.1 and will be automatically installed. Website for the SZpack library: http://www.chluba.de/SZpack/ For details on the computations involved please refer to the following references: Chluba, Nagai, ...
46.893617
101
0.520995
[ "MIT" ]
weiguangcui/pymsz
pymsz/SZpack_models.py
24,244
Python
Theoretical calculation of y and T_sz -map for the thermal SZ effect. model = TH_model(model_file, npixel, axis) Parameters ---------- simudata : the simulation data from load_data freqs : The frequencies (in GHz) at which to compute the SZ spectral distortion. array_like npixel : number of pixels for your image,...
20,623
0.850643
# -*- coding: utf-8 -*- """ Created on Mon Jan 8 21:45:27 2018 @author: pilla """
10.625
35
0.552941
[ "BSD-2-Clause" ]
psnipiv/LicenseGenerator
LicenseGenerator/accounts/tests/__init__.py
85
Python
Created on Mon Jan 8 21:45:27 2018 @author: pilla -*- coding: utf-8 -*-
75
0.882353
# Tests for client code in bin/test
18
35
0.75
[ "Apache-2.0" ]
EHRI/resync
bin/test/__init__.py
36
Python
Tests for client code in bin/test
33
0.916667
''' For this exercise, you'll use what you've learned about the zip() function and combine two lists into a dictionary. These lists are actually extracted from a bigger dataset file of world development indicators from the World Bank. For pedagogical purposes, we have pre-processed this dataset into the lists that you...
44
219
0.795455
[ "MIT" ]
Baidaly/datacamp-samples
10 - python-data-science-toolbox-part-2/case_study/1 - dictionaries for data science.py
704
Python
For this exercise, you'll use what you've learned about the zip() function and combine two lists into a dictionary. These lists are actually extracted from a bigger dataset file of world development indicators from the World Bank. For pedagogical purposes, we have pre-processed this dataset into the lists that you'll ...
601
0.853693
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
37.884615
80
0.617259
[ "Apache-2.0" ]
marcofavorito/agents-aea
packages/fetchai/skills/confirmation_aw3/__init__.py
985
Python
This module contains the implementation of the confirmation_aw3 skill. -*- coding: utf-8 -*- ------------------------------------------------------------------------------ Copyright 2018-2019 Fetch.AI Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in com...
831
0.843655
""" Airflow API (Stable) # Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t...
230.589744
8,173
0.759813
[ "Apache-2.0" ]
sptsakcg/airflow-client-python
airflow_client/test/test_dag_collection_all_of.py
8,993
Python
DAGCollectionAllOf unit test stubs Test DAGCollectionAllOf Airflow API (Stable) # Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as ...
8,464
0.941176
# =============================================================================== # Copyright 2014 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licens...
37.322581
81
0.543647
[ "Apache-2.0" ]
ASUPychron/pychron
pychron/pipeline/tagging/base_tags.py
1,157
Python
=============================================================================== Copyright 2014 Jake Ross Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 U...
960
0.829732
# from imports import * # import random # class Docs(commands.Cog): # def __init__(self, bot): # self.bot = bot # self.bot.loop.create_task(self.__ainit__()) # async def __ainit__(self): # await self.bot.wait_until_ready() # self.scraper = AsyncScraper(session = self.bot.session) # async def r...
30.082192
112
0.651184
[ "MIT" ]
BenitzCoding/Utility-Bot
cogs/docs.py
2,196
Python
from imports import * import random class Docs(commands.Cog): def __init__(self, bot): self.bot = bot self.bot.loop.create_task(self.__ainit__()) async def __ainit__(self): await self.bot.wait_until_ready() self.scraper = AsyncScraper(session = self.bot.session) async def rtfm_lookup(self, program...
2,074
0.944444
# -*- coding: utf-8 -*- """ Module entry point. ------------------------------------------------------------------------------ This file is part of grepros - grep for ROS bag files and live topics. Released under the BSD License. @author Erki Suurjaak @created 24.10.2021 @modified 02.11.2021 -------------...
25.111111
78
0.429204
[ "BSD-3-Clause" ]
suurjaak/grepros
src/grepros/__main__.py
452
Python
Module entry point. ------------------------------------------------------------------------------ This file is part of grepros - grep for ROS bag files and live topics. Released under the BSD License. @author Erki Suurjaak @created 24.10.2021 @modified 02.11.2021 -----------------------------------------...
381
0.84292
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.210526
74
0.750374
[ "Apache-2.0" ]
dhermes/google-cloud-python-on-gae
language-app/stubs/ctypes.py
669
Python
Stub ``ctypes`` module. Used by ``setuptools.windows_helpers``. Copyright 2017 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/L...
636
0.950673
# MIT License # # Copyright (C) IBM Corporation 2019 # # Permission 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...
51.75
120
0.778986
[ "MIT" ]
Jakondak/differential-privacy-library
diffprivlib/__init__.py
1,656
Python
Differential Privacy Library for Python ======================================= The IBM Differential Privacy Library is a library for writing, executing and experimenting with differential privacy. The Library includes a basic differential privacy mechanisms, the building blocks of differential privacy; tools for basi...
1,495
0.902778
# -*- coding: utf-8 -*- """ # Author : Camey # DateTime : 2022/3/12 8:49 下午 # Description : """
17.333333
33
0.5
[ "Apache-2.0" ]
abcdcamey/Gobigger-Explore
my_work/config/__init__.py
108
Python
# Author : Camey # DateTime : 2022/3/12 8:49 下午 # Description : -*- coding: utf-8 -*-
96
0.923077
# # @lc app=leetcode.cn id=35 lang=python3 # # [35] search-insert-position # None # @lc code=end
13.714286
40
0.677083
[ "MIT" ]
smartmark-pro/leetcode_record
codes_auto/35.search-insert-position.py
96
Python
@lc app=leetcode.cn id=35 lang=python3 [35] search-insert-position @lc code=end
79
0.822917
""" Plugin architecture, based on decorators References: 1. https://play.pixelblaster.ro/blog/2017/12/18/a-quick-and-dirty-mini-plugin-system-for-python/ """
23.285714
100
0.736196
[ "MIT" ]
huuhoa/colusa
src/colusa/plugins/__init__.py
163
Python
Plugin architecture, based on decorators References: 1. https://play.pixelblaster.ro/blog/2017/12/18/a-quick-and-dirty-mini-plugin-system-for-python/
154
0.944785
# TODO: # # A handler/formatter that can replace django.utils.log.AdminEmailHandler # # Needed: # * A dump of locals() on each affected line in the stacktrace
22.714286
73
0.742138
[ "Apache-2.0" ]
Uninett/python-logging-humio
src/humiologging/handlers/django.py
159
Python
TODO: A handler/formatter that can replace django.utils.log.AdminEmailHandler Needed: * A dump of locals() on each affected line in the stacktrace
146
0.918239
"""pytest style fixtures for use in Virtool Workflows."""
57
57
0.754386
[ "MIT" ]
igboyes/virtool-workflow
virtool_workflow/fixtures/__init__.py
57
Python
pytest style fixtures for use in Virtool Workflows.
51
0.894737
# coding: utf-8 """ Flat API The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and Mus...
59.658537
1,686
0.742845
[ "Apache-2.0" ]
FlatIO/api-client-python
test/test_collection.py
2,446
Python
Collection unit test stubs Test Collection Flat API The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, Tux...
1,995
0.815617
# File: __init__.py # # Copyright (c) 2018-2019 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
40.266667
95
0.756623
[ "Apache-2.0" ]
splunk-soar-connectors/hipchat
__init__.py
604
Python
File: __init__.py Copyright (c) 2018-2019 Splunk Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
575
0.951987
# Databricks notebook source # MAGIC %md-sandbox # MAGIC # MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;"> # MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px"> # MAGIC </div> # COMMAND ---------- # M...
23.405172
192
0.650829
[ "CC0-1.0" ]
Code360In/advanced-data-engineering-with-databricks
Advanced-Data-Engineering-with-Databricks/Solutions/04 - Databricks in Production/ADE 4.02 - Error Prone.py
2,715
Python
Databricks notebook source MAGIC %md-sandbox MAGIC MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;"> MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px"> MAGIC </div> COMMAND ---------- MAGIC %md MAGIC P...
2,221
0.818048
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
36.730769
80
0.604188
[ "Apache-2.0" ]
marcofavorito/agents-aea
packages/fetchai/skills/gym/__init__.py
955
Python
This module contains an example of skill for an AEA. -*- coding: utf-8 -*- ------------------------------------------------------------------------------ Copyright 2018-2019 Fetch.AI Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the L...
813
0.851309
# # SPDX-License-Identifier: MIT # from augur.augurplugin import AugurPlugin # from augur.application import Application # class HousekeeperPlugin(AugurPlugin): # """ # This plugin serves as an example as to how to load plugins into Augur # """ # def __init__(self, augur_app): # super().__init_...
39.1
104
0.636829
[ "MIT" ]
0WeiyuFeng0/augur
augur/housekeeper/__init__.py
1,173
Python
SPDX-License-Identifier: MIT from augur.augurplugin import AugurPlugin from augur.application import Application class HousekeeperPlugin(AugurPlugin): """ This plugin serves as an example as to how to load plugins into Augur """ def __init__(self, augur_app): super().__init__(augur_app) ...
1,116
0.951407
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
99.023256
3,380
0.793565
[ "Apache-2.0" ]
flaper87/openshift-restclient-python
openshift/test/test_v1beta1_cpu_target_utilization.py
4,258
Python
V1beta1CPUTargetUtilization unit test stubs Test V1beta1CPUTargetUtilization OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authen...
3,605
0.846642