hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c2fef72932d1f5f8c2eaf7b25c542eee04452f11 | 269 | py | Python | user/encryption/__init__.py | sanjaymarison/tkinteruser | a858b32f5e83276430f8647550f7e535e8f44490 | [
"MIT"
] | null | null | null | user/encryption/__init__.py | sanjaymarison/tkinteruser | a858b32f5e83276430f8647550f7e535e8f44490 | [
"MIT"
] | null | null | null | user/encryption/__init__.py | sanjaymarison/tkinteruser | a858b32f5e83276430f8647550f7e535e8f44490 | [
"MIT"
] | null | null | null | from cryptography.fernet import Fernet
def decrypt(arg):
secret_key = ""
cipher_suite = Fernet(secret_key)
return cipher_suite.decrypt(arg)
def encrypt(arg):
secret_key = ""
cipher_suite = Fernet(secret_key)
return str(cipher_suite.encrypt(bytes(arg,"utf-8"))) | 22.416667 | 53 | 0.758364 |
455706e87d0bb1e48be6f1a10f635c6deb37c04a | 43,384 | py | Python | slaveNode.py | vinci-project/vinciShard | 1c4ce8fceeff802c750e263fd6587cc2d22ca323 | [
"MIT"
] | null | null | null | slaveNode.py | vinci-project/vinciShard | 1c4ce8fceeff802c750e263fd6587cc2d22ca323 | [
"MIT"
] | 5 | 2020-03-02T11:23:26.000Z | 2022-03-11T23:52:45.000Z | slaveNode.py | vinci-project/vinciShard | 1c4ce8fceeff802c750e263fd6587cc2d22ca323 | [
"MIT"
] | null | null | null | from PyQt5.QtCore import QCoreApplication
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtCore import QMutex
from PyQt5.QtCore import QTimer
from PyQt5.QtCore import QThread
from vncCrypto import VncCrypto
from vncCrypto.mrkl import VncTree
from vncCrypto.signChecker import SignCheck... | 45.475891 | 442 | 0.523995 |
675e1044ca461ac0fedced82a66a52723f2ccf86 | 187 | py | Python | scripts/field/lightning_tuto_5_0.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/field/lightning_tuto_5_0.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/field/lightning_tuto_5_0.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | # Created by MechAviv
# ID :: [927020090]
# Hidden Street : Black Mage's Temple
sm.reservedEffect("Effect/Direction8.img/lightningTutorial/Scene1")
sm.sendDelay(9000)
sm.warp(927020070) | 23.375 | 67 | 0.770053 |
86b8c0d968a15df70bfd8acdf5740a5c2a47bca2 | 1,221 | py | Python | profiles/migrations/0001_initial.py | jgarber623/openstates.org | 0c514c955f7ffbe079c77c3ec00345b20818ad04 | [
"MIT"
] | null | null | null | profiles/migrations/0001_initial.py | jgarber623/openstates.org | 0c514c955f7ffbe079c77c3ec00345b20818ad04 | [
"MIT"
] | null | null | null | profiles/migrations/0001_initial.py | jgarber623/openstates.org | 0c514c955f7ffbe079c77c3ec00345b20818ad04 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2020-01-21 17:52
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
operations = [
... | 29.780488 | 78 | 0.473382 |
86d9bfe78a22d32d7cf7a24d5e04a0af0f52e606 | 515 | py | Python | ephyviewer/tests/test_eventlist.py | jpgill86/ephyviewer | 490c43c573c4d3473de6a9f3206eca2682e86816 | [
"MIT"
] | 30 | 2017-10-02T13:09:15.000Z | 2022-03-07T10:06:40.000Z | ephyviewer/tests/test_eventlist.py | samuelgarcia/ephyviewer | 469770eb7b5840523102b72e62f2d4fbe2bcc2ca | [
"MIT"
] | 106 | 2018-08-05T17:50:14.000Z | 2022-03-31T18:03:07.000Z | ephyviewer/tests/test_eventlist.py | samuelgarcia/ephyviewer | 469770eb7b5840523102b72e62f2d4fbe2bcc2ca | [
"MIT"
] | 6 | 2017-08-23T15:38:41.000Z | 2020-12-14T20:28:55.000Z | import ephyviewer
from ephyviewer.tests.testing_tools import make_fake_event_source
def test_eventlist(interactive=False):
source = make_fake_event_source()
app = ephyviewer.mkQApp()
view = ephyviewer.EventList(source=source, name='events')
win = ephyviewer.MainViewer(debug=True)
win.add_vie... | 18.392857 | 66 | 0.687379 |
4daaaf02a5bae5fcf78cb40387cec651ad253696 | 1,663 | py | Python | src/openprocurement/tender/openua/views/award_complaint.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 10 | 2020-02-18T01:56:21.000Z | 2022-03-28T00:32:57.000Z | src/openprocurement/tender/openua/views/award_complaint.py | quintagroup/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 26 | 2018-07-16T09:30:44.000Z | 2021-02-02T17:51:30.000Z | src/openprocurement/tender/openua/views/award_complaint.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 15 | 2019-08-08T10:50:47.000Z | 2022-02-05T14:13:36.000Z | # -*- coding: utf-8 -*-
from openprocurement.tender.core.views.award_complaint import (
BaseTenderAwardComplaintResource,
BaseTenderAwardClaimResource
)
from openprocurement.tender.core.views.complaint import (
BaseComplaintGetResource,
)
from openprocurement.tender.core.utils import optendersresource
@op... | 34.645833 | 76 | 0.756464 |
5e92a878a8a2b6a2e5faa17cd19db2a31d8cd293 | 1,198 | py | Python | google/ads/googleads/v6/enums/types/user_list_prepopulation_status.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v6/enums/types/user_list_prepopulation_status.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v6/enums/types/user_list_prepopulation_status.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 o... | 29.219512 | 74 | 0.716194 |
faa74f641da02dbdd7c833c7514b00ed9c514a52 | 7,816 | py | Python | adam/config_manager.py | moeyensj/adam_home | 7dbe661ed9a04e9621ec4f5c9a0a9682cc37c227 | [
"MIT"
] | 9 | 2019-05-24T06:01:18.000Z | 2020-12-12T22:05:38.000Z | adam/config_manager.py | moeyensj/adam_home | 7dbe661ed9a04e9621ec4f5c9a0a9682cc37c227 | [
"MIT"
] | 90 | 2018-11-09T22:33:17.000Z | 2021-04-28T05:04:09.000Z | adam/config_manager.py | moeyensj/adam_home | 7dbe661ed9a04e9621ec4f5c9a0a9682cc37c227 | [
"MIT"
] | 7 | 2019-03-22T04:41:31.000Z | 2021-03-31T23:29:33.000Z | """ADAM configuration manager"""
import os
import os.path
import xdg.BaseDirectory as xdgb
import yaml
# filename of the config file (w/o the full path)
ADAM_CONFIG_FN = "config"
def _load_raw_config(config_file=None):
"""Load ADAM config from default locations or ``config_file``
Locates and loads the con... | 31.516129 | 89 | 0.606704 |
81ead31f53ab2b94397401bdfca2895b5461cb84 | 62,930 | py | Python | venv/Lib/site-packages/h5py/tests/test_dataset.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/h5py/tests/test_dataset.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/h5py/tests/test_dataset.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | null | null | null | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
"""
Dataset testing operations.
Tests all d... | 36.145893 | 117 | 0.602384 |
3c8d5cb12bdc6e04fdd795cc200e91ac00b9eb56 | 418 | py | Python | python/testData/debug/stepping/test_smart_step_into_decorator2.py | Sajaki/intellij-community | 6748af2c40567839d11fd652ec77ba263c074aad | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/debug/stepping/test_smart_step_into_decorator2.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2022-02-19T09:45:05.000Z | 2022-02-27T20:32:55.000Z | python/testData/debug/stepping/test_smart_step_into_decorator2.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def foo(i):
return i
def generate_power(exponent):
def decorator(f):
def inner(*args):
result = f(*args)
return exponent ** result
return inner
return decorator
@generate_power(foo(foo(3))) # breakpoint
@generate_power(foo(foo(5)))
def raise_three(n):
retur... | 14.928571 | 42 | 0.624402 |
e7fcaf37b6a57ed7c08ef5f98c365a4fb2a75df7 | 12,075 | py | Python | cdpr/sdf/gen_cdpr.py | siddharthumakarthikeyan/Cable-Driven-Parallel-Robots-CDPR-Modelling | 4e8d991d55ae7da91b3c90773c679f3369a4dafa | [
"MIT"
] | 9 | 2021-06-01T12:19:58.000Z | 2022-02-28T12:30:09.000Z | src/cdpr_gazebo/sdf/gen_cdpr.py | balazs-bamer/cdpr-simulation | d8b6fa54eb4c150b2903e9c8ef629655d4739d7e | [
"MIT"
] | 1 | 2021-09-27T12:24:50.000Z | 2021-09-27T12:24:50.000Z | src/cdpr_gazebo/sdf/gen_cdpr.py | balazs-bamer/cdpr-simulation | d8b6fa54eb4c150b2903e9c8ef629655d4739d7e | [
"MIT"
] | 4 | 2020-12-03T03:01:15.000Z | 2022-03-10T01:51:59.000Z | #!/usr/bin/python
from mod_create import *
import yaml
import sys
import numpy as np
from math import *
import transformations as tr
from os.path import exists
if __name__ == '__main__':
if len(sys.argv) < 2:
print(' Give a yaml file' )
sys.exit(0)
model = sys.argv[1]
if not exis... | 49.896694 | 208 | 0.564803 |
60312c6e3b6d73de8d7c1421db0ef703646aea47 | 76,944 | py | Python | pandas/core/indexing.py | mproszewska/pandas | 0afb1b14c359eece44f3885d5f20b40e07a9ccb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexing.py | mproszewska/pandas | 0afb1b14c359eece44f3885d5f20b40e07a9ccb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexing.py | mproszewska/pandas | 0afb1b14c359eece44f3885d5f20b40e07a9ccb6 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | from typing import TYPE_CHECKING, Hashable, List, Tuple, Union
import numpy as np
from pandas._libs.indexing import _NDFrameIndexerBase
from pandas._libs.lib import item_from_zerodim
from pandas.errors import AbstractMethodError
from pandas.util._decorators import doc
from pandas.core.dtypes.common import (
is_a... | 33.222798 | 135 | 0.53331 |
4cf83e07370d4ca48fff182a2f7f45d15fd2781c | 4,071 | py | Python | get_qas_e.py | billyang98/UNITER | c7f0833f14aa9dcb1e251a986c72e49edde1bdd4 | [
"MIT"
] | null | null | null | get_qas_e.py | billyang98/UNITER | c7f0833f14aa9dcb1e251a986c72e49edde1bdd4 | [
"MIT"
] | null | null | null | get_qas_e.py | billyang98/UNITER | c7f0833f14aa9dcb1e251a986c72e49edde1bdd4 | [
"MIT"
] | null | null | null | import json
import lmdb
from pytorch_pretrained_bert import BertTokenizer
import sys
import msgpack
from lz4.frame import compress, decompress
from tqdm import tqdm
import random
class TxtLmdb(object):
def __init__(self, db_dir, readonly=True):
self.readonly = readonly
if readonly:
# t... | 35.4 | 142 | 0.621223 |
350225d149dc1b7f5583cad894ebec4a1bbe054a | 502 | py | Python | vizit/__init__.py | DCRichards/VizIt | d2fa241ccf46ea83995e57b87d288417d86df593 | [
"CNRI-Python"
] | 1 | 2015-12-07T21:59:48.000Z | 2015-12-07T21:59:48.000Z | vizit/__init__.py | DCRichards/VizIt | d2fa241ccf46ea83995e57b87d288417d86df593 | [
"CNRI-Python"
] | 2 | 2015-11-04T09:48:35.000Z | 2015-11-29T14:04:00.000Z | vizit/__init__.py | DCRichards/vizit | d2fa241ccf46ea83995e57b87d288417d86df593 | [
"CNRI-Python"
] | null | null | null | """
# # # ###### # #####
# # # # # #
# # # # # #
# # # # # #
# # # # # #
## # ###### # #
Simple dependency visualisation
by DCRichards
"""
import os
import parser
import graphs
import cli
import languages
def _create_graph(directory, lang, js):
... | 17.310345 | 71 | 0.498008 |
45e5bf796fb08d21cfcd037198d7e9606ef20a12 | 7,130 | py | Python | chemdataextractor/nlp/lexicon.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | 6 | 2019-12-05T17:10:19.000Z | 2021-08-10T15:15:10.000Z | chemdataextractor/nlp/lexicon.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | null | null | null | chemdataextractor/nlp/lexicon.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | 2 | 2020-06-29T06:58:53.000Z | 2021-03-21T08:39:36.000Z | # -*- coding: utf-8 -*-
"""
chemdataextractor.nlp.lexicon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2016 by Matt Swain.
:license: MIT, see LICENSE file for more details.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import ... | 30.470085 | 176 | 0.591304 |
fe963bc5b7e8ba3e08ae755f51de6ca7952e8159 | 45,914 | py | Python | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/website_sale/controllers/main.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | 1 | 2019-12-19T01:53:13.000Z | 2019-12-19T01:53:13.000Z | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/website_sale/controllers/main.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/website_sale/controllers/main.py | gtfarng/Odoo_migrade | 9cc28fae4c379e407645248a29d22139925eafe7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import logging
from werkzeug.exceptions import Forbidden
from odoo import http, tools, _
from odoo.http import request
from odoo.addons.base.ir.ir_qweb.fields import nl2br
from odoo.addons.website.models.webs... | 43.56167 | 148 | 0.591301 |
952a2a1e798c42052130ac3f1573e1ce9354dfdc | 124,179 | py | Python | tensorflow/python/ops/math_ops.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | 1 | 2018-11-21T03:07:45.000Z | 2018-11-21T03:07:45.000Z | tensorflow/python/ops/math_ops.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/math_ops.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. 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 applica... | 35.581375 | 121 | 0.658904 |
9741191579b1e4d68dc779e2701f1654cb2b0c9a | 84 | py | Python | tests/test_clean.py | imnetdb/imnetdb | f7e1ef41be2f3f2089c666dbf602ea99112bf516 | [
"Apache-2.0"
] | 5 | 2019-03-13T20:34:36.000Z | 2020-04-18T15:35:13.000Z | tests/test_clean.py | imnetdb/imnetdb | f7e1ef41be2f3f2089c666dbf602ea99112bf516 | [
"Apache-2.0"
] | 2 | 2019-02-24T18:22:10.000Z | 2019-05-07T10:35:32.000Z | tests/test_clean.py | imnetdb/imnetdb | f7e1ef41be2f3f2089c666dbf602ea99112bf516 | [
"Apache-2.0"
] | 2 | 2019-04-17T23:42:55.000Z | 2019-04-20T15:55:43.000Z |
def test_clean(imnetdb):
imnetdb.wipe_database()
imnetdb.ensure_database()
| 16.8 | 29 | 0.738095 |
33c4ebfc49fc5b9c64364db5016766cb048f0d4f | 46,573 | py | Python | pyNastran/op2/dev/pyyeti/op4.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/op2/dev/pyyeti/op4.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/op2/dev/pyyeti/op4.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Python tools for reading/writing Nastran .op4 files. Can read and
write all formats (as far as I know) with the restriction that the
output files created by this class are always double precision. The
binary files can be in big or little endian format.
Currently, all matrices are read into... | 35.742901 | 87 | 0.4733 |
fe6e9e3a490463a17c1c6cccef23170355a5fe39 | 4,977 | py | Python | desktop/libs/notebook/src/notebook/sql_utils.py | maulikjs/hue | 59ac879b55bb6fb26ecb4e85f4c70836fc21173f | [
"Apache-2.0"
] | 1 | 2020-05-17T06:40:33.000Z | 2020-05-17T06:40:33.000Z | desktop/libs/notebook/src/notebook/sql_utils.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | desktop/libs/notebook/src/notebook/sql_utils.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1 | 2017-11-09T09:31:28.000Z | 2017-11-09T09:31:28.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 31.700637 | 134 | 0.677316 |
b20a20e72db03d18c674aae1701945a468f6ff96 | 16,903 | py | Python | Assets/Python/Contrib/CvStrategyOverlay.py | macaurther/DOCUSA | 40586727c351d1b1130c05c2d4648cca3a8bacf5 | [
"MIT"
] | 93 | 2015-11-20T04:13:36.000Z | 2022-03-24T00:03:08.000Z | Assets/Python/Contrib/CvStrategyOverlay.py | macaurther/DOCUSA | 40586727c351d1b1130c05c2d4648cca3a8bacf5 | [
"MIT"
] | 206 | 2015-11-09T00:27:15.000Z | 2021-12-04T19:05:18.000Z | Assets/Python/Contrib/CvStrategyOverlay.py | dguenms/Dawn-of-Civilization | 1c4f510af97a869637cddb4c0859759158cea5ce | [
"MIT"
] | 117 | 2015-11-08T02:43:46.000Z | 2022-02-12T06:29:00.000Z | #-------------------------------------------------------------------------------
# Name: CvStrategyOverlay.py
# Purpose: Draws the strategy overlay itself.
# CvOverlayScreen.py does the editing.
# Contains:
# -Dot Mapper
# -Categorized signs
#
# Aut... | 26.830159 | 127 | 0.666391 |
63cea0211c2733193283698cf6f102f466590638 | 1,936 | py | Python | aliyun-python-sdk-dds/aliyunsdkdds/request/v20151201/DescribeRegionsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-dds/aliyunsdkdds/request/v20151201/DescribeRegionsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-dds/aliyunsdkdds/request/v20151201/DescribeRegionsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.851852 | 74 | 0.775826 |
776195424714bc7f96f031bb5460be553bdfedea | 2,142 | py | Python | google/colab/__init__.py | NIP-Data-Computation/colabtools | 75a58cb540bbdc9e8ce5a5fd71698868486012bf | [
"Apache-2.0"
] | null | null | null | google/colab/__init__.py | NIP-Data-Computation/colabtools | 75a58cb540bbdc9e8ce5a5fd71698868486012bf | [
"Apache-2.0"
] | null | null | null | google/colab/__init__.py | NIP-Data-Computation/colabtools | 75a58cb540bbdc9e8ce5a5fd71698868486012bf | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google 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 writing, ... | 36.305085 | 172 | 0.782446 |
1473b6402fa73109c27b73ec080948f4f758576f | 1,075 | py | Python | klumpenplot.py | wklumpen/klumpenplot | 1605470208a8e12f7faf71424b2a5a2286c86a30 | [
"MIT"
] | null | null | null | klumpenplot.py | wklumpen/klumpenplot | 1605470208a8e12f7faf71424b2a5a2286c86a30 | [
"MIT"
] | null | null | null | klumpenplot.py | wklumpen/klumpenplot | 1605470208a8e12f7faf71424b2a5a2286c86a30 | [
"MIT"
] | null | null | null | import sys
import time
import PyQt5.QtWidgets as W
import PyQt5.QtGui as G
import PyQt5.QtSql as S
import PyQt5.QtCore as C
import PyQt5.Qt as Q
from gui.MCRouteUI import Ui_MainWindow
class MCRouteMainWindow(W.QMainWindow, Ui_MainWindow):
def __init__(self, app, parent=None):
super(MCRouteMainWindow, se... | 29.054054 | 90 | 0.706047 |
77e5df053a5b4994031bfdb6c4ab428e58f5e078 | 5,073 | py | Python | main/migrations/0020_auto_20211119_1542.py | uktrade/contractor-approval | 316ba7b2321f5aeea6dc83dcdaaadda887275f4d | [
"MIT"
] | null | null | null | main/migrations/0020_auto_20211119_1542.py | uktrade/contractor-approval | 316ba7b2321f5aeea6dc83dcdaaadda887275f4d | [
"MIT"
] | 1 | 2022-02-18T09:17:41.000Z | 2022-02-18T09:17:41.000Z | main/migrations/0020_auto_20211119_1542.py | uktrade/resourcing-approval | 316ba7b2321f5aeea6dc83dcdaaadda887275f4d | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-19 15:42
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("chartofaccount", "0001_initial"),
("main", "0019_auto_20211119_1257"),
]
operations = [
migrations.... | 33.156863 | 110 | 0.400946 |
a74465a816903d865cde9944e6d1b56272bbd9a9 | 2,629 | py | Python | tagging/backend/taggingbai.py | unlimitedaki/sudaNLP-Olympic-Winter-Games-taggingSystem-backend | dcc0bbc1046c8509f20477c81ae03cf0367d6c04 | [
"MIT"
] | 2 | 2019-07-29T02:43:44.000Z | 2020-08-31T02:16:20.000Z | tagging/backend/taggingbai.py | unlimitedaki/sudaNLP-Olympic-Winter-Games-taggingSystem-backend | dcc0bbc1046c8509f20477c81ae03cf0367d6c04 | [
"MIT"
] | null | null | null | tagging/backend/taggingbai.py | unlimitedaki/sudaNLP-Olympic-Winter-Games-taggingSystem-backend | dcc0bbc1046c8509f20477c81ae03cf0367d6c04 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
import json
from django.views.decorators.csrf import csrf_exempt
from . import models
import hashlib
import os
dirDataLabeled = 'data/labeled/'
fnres = 'Bai.txt'
dirDataRaw = 'data/raw/'
@csrf_exempt
def rawdata(request):
returnMessage = {}
... | 32.060976 | 71 | 0.574363 |
81942a0671f11b02a60e6be7f09e74ce56ade78c | 21,299 | py | Python | tensorflow_transform/saved/saved_transform_io_v2_test.py | Saiprasad16/transform | 774458bf0c296f8275fedf3ace303427654dace7 | [
"Apache-2.0"
] | 1 | 2021-05-10T10:52:06.000Z | 2021-05-10T10:52:06.000Z | tensorflow_transform/saved/saved_transform_io_v2_test.py | Saiprasad16/transform | 774458bf0c296f8275fedf3ace303427654dace7 | [
"Apache-2.0"
] | null | null | null | tensorflow_transform/saved/saved_transform_io_v2_test.py | Saiprasad16/transform | 774458bf0c296f8275fedf3ace303427654dace7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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... | 39.885768 | 80 | 0.690455 |
f34a673e78782f12f78dc42f99c83e93d9d3a39a | 2,060 | py | Python | tests/fractalmusic/test_fm_directions.py | alexgorji/musurgia | 81d37afbf1ac70348002a93299db228b5ed4a591 | [
"MIT"
] | null | null | null | tests/fractalmusic/test_fm_directions.py | alexgorji/musurgia | 81d37afbf1ac70348002a93299db228b5ed4a591 | [
"MIT"
] | 45 | 2020-02-24T19:37:00.000Z | 2021-04-06T16:13:56.000Z | tests/fractalmusic/test_fm_directions.py | alexgorji/musurgia | 81d37afbf1ac70348002a93299db228b5ed4a591 | [
"MIT"
] | null | null | null | from unittest import TestCase
from musurgia.fractaltree.fractalmusic import FractalMusic
import os
path = os.path.abspath(__file__).split(".")[0]
class Test(TestCase):
def setUp(self) -> None:
self.fm = FractalMusic(proportions=[1, 2, 3], tree_permutation_order=(3, 1, 2), duration=10)
def test_1(se... | 39.615385 | 105 | 0.588835 |
3814a3d252b5b1ebfa5595280ad3300e3c1308e9 | 15,024 | py | Python | env/lib/python3.5/site-packages/pyasn1_modules/rfc6402.py | creekhead/RPI_google_asst | 65dc7b08bb8333f8977488f37f7d3ec652489a44 | [
"Apache-2.0"
] | 3 | 2019-04-10T20:36:57.000Z | 2019-04-11T04:10:09.000Z | env/lib/python3.5/site-packages/pyasn1_modules/rfc6402.py | creekhead/RPI_google_asst | 65dc7b08bb8333f8977488f37f7d3ec652489a44 | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | env/lib/python3.5/site-packages/pyasn1_modules/rfc6402.py | creekhead/RPI_google_asst | 65dc7b08bb8333f8977488f37f7d3ec652489a44 | [
"Apache-2.0"
] | 4 | 2020-05-04T18:53:09.000Z | 2021-09-17T15:02:19.000Z | # coding: utf-8
#
# This file is part of pyasn1-modules software.
#
# Created by Stanisław Pitucha with asn1ate tool.
# Copyright (c) 2005-2018, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pyasn1/license.html
#
# Certificate Management over CMS (CMC) Updates
#
# ASN.1 source from:
# http://www.ietf.... | 26.450704 | 120 | 0.721379 |
8706641e074997f38796f38414de17a58ba0c4f7 | 10,429 | py | Python | app/editor/level_editor/region_painter_menu.py | zerorock1312/lt-maker-master | 82f733683f9dba763a5de8567c41fd7cbcfb0173 | [
"MIT"
] | null | null | null | app/editor/level_editor/region_painter_menu.py | zerorock1312/lt-maker-master | 82f733683f9dba763a5de8567c41fd7cbcfb0173 | [
"MIT"
] | null | null | null | app/editor/level_editor/region_painter_menu.py | zerorock1312/lt-maker-master | 82f733683f9dba763a5de8567c41fd7cbcfb0173 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QPushButton, QLineEdit, \
QWidget, QVBoxLayout, QMessageBox, QCheckBox
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon, QColor, QPixmap
from app.data.database import DB
from app.utilities import utils, str_utils
from app.utilities.data import Data
from app.extensions.custom_... | 36.721831 | 97 | 0.641097 |
cee0523c9503447b318b408b8c5d2a9bd496ce4b | 770 | py | Python | items/models.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | 3 | 2020-05-05T12:12:09.000Z | 2020-05-08T08:48:16.000Z | items/models.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | 160 | 2020-05-19T13:03:43.000Z | 2022-03-12T00:35:28.000Z | items/models.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import gettext_lazy as _
from core.db.base import BaseAbstractModel
from products.models import Product
class Item(BaseAbstractModel):
product = models.ForeignKey(
Product,
related_name="items",
on_delete=models.CASCADE,
... | 29.615385 | 83 | 0.696104 |
00468c18085a1f68c5f754c8b5206e7597379500 | 1,458 | py | Python | liionpack/protocols.py | Saransh-cpp/liionpack | 82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43 | [
"MIT"
] | 23 | 2021-09-28T15:48:48.000Z | 2022-03-15T10:34:35.000Z | liionpack/protocols.py | Saransh-cpp/liionpack | 82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43 | [
"MIT"
] | 131 | 2021-09-29T09:18:50.000Z | 2022-03-03T06:09:52.000Z | liionpack/protocols.py | Saransh-cpp/liionpack | 82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43 | [
"MIT"
] | 17 | 2021-09-29T13:14:00.000Z | 2022-03-24T11:01:19.000Z | #
# Experimental protocol
#
import numpy as np
def generate_protocol_from_experiment(experiment, flatten=True):
"""
Args:
experiment (pybamm.Experiment):
The experiment to generate the protocol from.
flatten (bool):
Default is True: return all steps in one list otherw... | 28.588235 | 78 | 0.553498 |
22b3113470984777d0625ed95f14518e1241345f | 9,902 | py | Python | chemreac/symbolic.py | bjodah/chemreac | dbe38a10cf6b88e66192bcc998721b61aabbd9dc | [
"BSD-2-Clause"
] | 14 | 2015-03-11T21:46:15.000Z | 2020-06-06T16:01:38.000Z | chemreac/symbolic.py | bjodah/chemreac | dbe38a10cf6b88e66192bcc998721b61aabbd9dc | [
"BSD-2-Clause"
] | 20 | 2015-01-21T16:11:36.000Z | 2020-01-06T10:30:46.000Z | chemreac/symbolic.py | chemreac/chemreac | dbe38a10cf6b88e66192bcc998721b61aabbd9dc | [
"BSD-2-Clause"
] | 3 | 2015-08-13T12:06:17.000Z | 2021-12-17T01:12:20.000Z | # -*- coding: utf-8 -*-
"""
This module is used for verification of mathematical correctness in the
implementation (used by the test suite). It uses SymPy to to derivations
symbolically. Its performance is therefore too poor for use in integration
of large systems in general.
"""
from __future__ import print_function... | 41.087137 | 99 | 0.507574 |
cb777c8b43456298154441d19ab8645ee8594817 | 512 | py | Python | data-process/orchestration/airflow/src/dags/test_dag.py | dimastatz/video-streaming-analytics | 09ff799049920f81c6766a87286948c3eb09f65d | [
"MIT"
] | null | null | null | data-process/orchestration/airflow/src/dags/test_dag.py | dimastatz/video-streaming-analytics | 09ff799049920f81c6766a87286948c3eb09f65d | [
"MIT"
] | null | null | null | data-process/orchestration/airflow/src/dags/test_dag.py | dimastatz/video-streaming-analytics | 09ff799049920f81c6766a87286948c3eb09f65d | [
"MIT"
] | 1 | 2022-02-04T10:20:10.000Z | 2022-02-04T10:20:10.000Z | from airflow import DAG
from datetime import datetime
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
def print_hello():
return 'Hello world from first Airflow DAG!'
dag = DAG('hello_world', description='Hello World DAG',
schedule... | 28.444444 | 91 | 0.765625 |
b0341733da7a53a516b8ea90b336c172851fca45 | 2,525 | py | Python | online_pharmacy/customer/migrations/0001_initial.py | geekyJock8/online_pharmacy | 892852857786ec17259b71f2a178896cd6d12e60 | [
"Apache-2.0"
] | 5 | 2020-09-09T13:59:17.000Z | 2021-09-30T07:20:55.000Z | online_pharmacy/customer/migrations/0001_initial.py | geekyJock8/online_pharmacy | 892852857786ec17259b71f2a178896cd6d12e60 | [
"Apache-2.0"
] | 10 | 2017-09-03T06:13:31.000Z | 2017-10-10T15:22:30.000Z | online_pharmacy/customer/migrations/0001_initial.py | geekyJock8/Online-Pharmacy | 892852857786ec17259b71f2a178896cd6d12e60 | [
"Apache-2.0"
] | 9 | 2017-09-03T04:59:18.000Z | 2019-10-17T11:33:18.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-25 14:10
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | 38.257576 | 117 | 0.569505 |
12c3ee719c86f387ec2e75b8b36fc1796f340947 | 957 | py | Python | stock/base_io/mysql_helper.py | WZYStudio/QuantJob | a3716533b054f923a5249b6902cc4a1ae031910b | [
"BSD-2-Clause"
] | null | null | null | stock/base_io/mysql_helper.py | WZYStudio/QuantJob | a3716533b054f923a5249b6902cc4a1ae031910b | [
"BSD-2-Clause"
] | null | null | null | stock/base_io/mysql_helper.py | WZYStudio/QuantJob | a3716533b054f923a5249b6902cc4a1ae031910b | [
"BSD-2-Clause"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy_utils import database_exists, create_database
from sqlalchemy.orm import sessionmaker
_mysql_engine = None
_mysql_session = None
def get_db_url(db_name):
return "mysql+pymysql://wzy:123@192.168.50.100/" + db_name + "?charset=utf8"
def get_db_engine_by_name(... | 23.925 | 80 | 0.730408 |
b1683235ce3eed40d85e1af45e98887c5ebc3ee3 | 6,506 | py | Python | calc/EPIC2Datetime.py | NOAA-PMEL/EcoFOCI_eofs | 18e5f1b3e2b76d5427a6227b266ae85c91a73289 | [
"MIT"
] | 1 | 2018-06-14T19:48:13.000Z | 2018-06-14T19:48:13.000Z | calc/EPIC2Datetime.py | NOAA-PMEL/EcoFOCI_eofs | 18e5f1b3e2b76d5427a6227b266ae85c91a73289 | [
"MIT"
] | 32 | 2020-08-28T03:24:00.000Z | 2022-03-28T14:15:11.000Z | calc/EPIC2Datetime.py | NOAA-PMEL/EcoFOCI_eofs | 18e5f1b3e2b76d5427a6227b266ae85c91a73289 | [
"MIT"
] | null | null | null | # filename: EPIC2Datetime.py
r'''Module to convert PMEL-EPIC timeword to a python datetime
Modifications
-------------
2018-6-12 : SBELL - python3 print statements
2016-11-14: SBELL - create routine to add datetime offset
'''
import datetime
from netCDF4 import date2num
__author__ = 'Shaun Bell'
... | 33.709845 | 114 | 0.647249 |
aa3620de1576db31bc13b4b4fb067491584a8475 | 16,345 | py | Python | tests/test_sockets.py | AIEdX/emscripten | 5bcd268db583d0ac7de4aedcd29e439d69553176 | [
"MIT"
] | null | null | null | tests/test_sockets.py | AIEdX/emscripten | 5bcd268db583d0ac7de4aedcd29e439d69553176 | [
"MIT"
] | 1 | 2022-01-05T07:26:51.000Z | 2022-01-05T07:26:51.000Z | tests/test_sockets.py | AIEdX/emscripten | 5bcd268db583d0ac7de4aedcd29e439d69553176 | [
"MIT"
] | null | null | null | # Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
import multiprocessing
import os
import socket
import shutil
import s... | 47.239884 | 202 | 0.719241 |
877d196fa42001decc4355f72625a92a199ec827 | 354 | py | Python | compmatscipy/data/elemental_gibbs_energies.py | YunyeongChoi/compmatscipy | 44d0fe9f4d3806a21ee3bfcbca24b42120d91193 | [
"MIT"
] | 5 | 2019-08-19T14:48:31.000Z | 2022-03-24T20:08:31.000Z | compmatscipy/data/elemental_gibbs_energies.py | YunyeongChoi/compmatscipy | 44d0fe9f4d3806a21ee3bfcbca24b42120d91193 | [
"MIT"
] | 1 | 2019-08-24T16:51:29.000Z | 2019-08-24T16:51:29.000Z | compmatscipy/data/elemental_gibbs_energies.py | YunyeongChoi/compmatscipy | 44d0fe9f4d3806a21ee3bfcbca24b42120d91193 | [
"MIT"
] | 5 | 2019-07-16T19:15:28.000Z | 2021-03-29T04:49:54.000Z | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
import os, json
this_dir, this_filename = os.path.split(__file__)
DATA_PATH = os.path.join(this_dir, "data", "elemental_gibbs_energies.json")
def elemental_gibbs_energies_data():
with open(DATA_PATH) ... | 22.125 | 76 | 0.680791 |
e8e95e24e3a49c568248586a9fffa395190ad476 | 182 | py | Python | conftest.py | AleksandrSmoliak/mts_auto | c343141c847b9f44755db0a6a36eb17053615570 | [
"Apache-2.0"
] | null | null | null | conftest.py | AleksandrSmoliak/mts_auto | c343141c847b9f44755db0a6a36eb17053615570 | [
"Apache-2.0"
] | null | null | null | conftest.py | AleksandrSmoliak/mts_auto | c343141c847b9f44755db0a6a36eb17053615570 | [
"Apache-2.0"
] | null | null | null | from fixture.Application import Application
import pytest
@pytest.fixture
def app(request):
fixture = Application()
request.addfinalizer(fixture.destroy)
return fixture
| 20.222222 | 43 | 0.774725 |
38691d4cc3c74467092aa89dc0e9ed3ad6e97796 | 75 | py | Python | cv/version.py | skull8944/BachelorCapFilter | 363679d7c20798290cc567705ed73d05ec039649 | [
"bzip2-1.0.6"
] | 2 | 2021-07-08T13:20:47.000Z | 2022-01-16T13:04:34.000Z | cv/version.py | skull8944/BachelorCapFilter | 363679d7c20798290cc567705ed73d05ec039649 | [
"bzip2-1.0.6"
] | null | null | null | cv/version.py | skull8944/BachelorCapFilter | 363679d7c20798290cc567705ed73d05ec039649 | [
"bzip2-1.0.6"
] | null | null | null | opencv_version = "4.5.2.54"
contrib = True
headless = False
ci_build = True | 18.75 | 27 | 0.733333 |
1063e182c8416dcbdebfbd60b0b4025784b567d0 | 19,350 | gyp | Python | node.gyp | strongloop-forks/io.js | 4e58211bb7f638b689e5e8e407b70b3c29be952f | [
"Artistic-2.0"
] | 2 | 2021-02-13T08:39:17.000Z | 2021-02-19T13:44:11.000Z | node.gyp | strongloop-forks/io.js | 4e58211bb7f638b689e5e8e407b70b3c29be952f | [
"Artistic-2.0"
] | null | null | null | node.gyp | strongloop-forks/io.js | 4e58211bb7f638b689e5e8e407b70b3c29be952f | [
"Artistic-2.0"
] | null | null | null | {
'variables': {
'v8_use_snapshot%': 'true',
'node_use_dtrace%': 'false',
'node_use_etw%': 'false',
'node_use_perfctr%': 'false',
'node_has_winsdk%': 'false',
'node_shared_v8%': 'false',
'node_shared_zlib%': 'false',
'node_shared_http_parser%': 'false',
'node_shared_libuv%': 'false... | 30.66561 | 93 | 0.443152 |
c8bb947b9c010fbfbc4b7582471d9f0f028a6deb | 12,332 | py | Python | qa/rpc-tests/p2p-acceptblock.py | IluminumProject/iluminum | 9685edf64161c66205c89ee72d711b0144733735 | [
"MIT"
] | 1 | 2018-04-14T16:47:00.000Z | 2018-04-14T16:47:00.000Z | qa/rpc-tests/p2p-acceptblock.py | IluminumProject/iluminum | 9685edf64161c66205c89ee72d711b0144733735 | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-acceptblock.py | IluminumProject/iluminum | 9685edf64161c66205c89ee72d711b0144733735 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
from... | 42.378007 | 107 | 0.651395 |
d72208940cdfe9ab63f750dc5bb2246949d41043 | 615 | py | Python | pysachi/renderers/__init__.py | Nauja/pyrabbit | 43d4b958d7f0afd34d5eb2451086d0d9dc7f288a | [
"MIT"
] | 1 | 2020-11-29T19:13:56.000Z | 2020-11-29T19:13:56.000Z | pysachi/renderers/__init__.py | Nauja/pysachi | 43d4b958d7f0afd34d5eb2451086d0d9dc7f288a | [
"MIT"
] | null | null | null | pysachi/renderers/__init__.py | Nauja/pysachi | 43d4b958d7f0afd34d5eb2451086d0d9dc7f288a | [
"MIT"
] | null | null | null | __all__ = ["load", "html", "raw"]
from . import html
from . import raw
import pkg_resources
from typing import Any
def load(name: str) -> Any:
"""Get the first renderer identified by `name`.
The renderer must have been registered as an entry point for
`pysachi.renderers` via setuptools.
.. code-block:: py... | 24.6 | 76 | 0.686179 |
0cc3db77d08cfe534e8c97e0fc0811374d03bdbb | 2,337 | py | Python | tests/test_check_equal_real.py | cmarqu/checkv | ead86d930a2e6fba823f3f875cc8f6a051d8c6c8 | [
"BSD-3-Clause"
] | 1 | 2019-02-24T17:57:05.000Z | 2019-02-24T17:57:05.000Z | tests/test_check_equal_real.py | cmarqu/checkv | ead86d930a2e6fba823f3f875cc8f6a051d8c6c8 | [
"BSD-3-Clause"
] | 2 | 2019-02-24T17:42:08.000Z | 2019-03-01T09:23:29.000Z | tests/test_check_equal_real.py | cmarqu/checkv | ead86d930a2e6fba823f3f875cc8f6a051d8c6c8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Tests for ``check_equal()`` for floating point values."""
# Copyright checkv contributors
# Licensed under the Revised BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-3-Clause
import checkv
def test_check_equal_real_0_0_pass(caplog):
checkv.check_equal(0.0, 0.0)
... | 30.350649 | 79 | 0.693624 |
b7cbdc73afe523dc0d7edb211797f494c20cb8e8 | 5,627 | py | Python | pydevices/RfxDevices/SPIDER.py | fluffynukeit/mdsplus | a204d2e9d26554bb035945595210f2a57d187250 | [
"BSD-2-Clause"
] | 53 | 2015-01-05T08:55:13.000Z | 2022-03-30T07:43:41.000Z | pydevices/RfxDevices/SPIDER.py | fluffynukeit/mdsplus | a204d2e9d26554bb035945595210f2a57d187250 | [
"BSD-2-Clause"
] | 1,231 | 2015-02-02T18:54:02.000Z | 2022-03-30T08:27:45.000Z | pydevices/RfxDevices/SPIDER.py | fluffynukeit/mdsplus | a204d2e9d26554bb035945595210f2a57d187250 | [
"BSD-2-Clause"
] | 44 | 2015-05-24T20:18:06.000Z | 2022-02-07T13:51:04.000Z | #
# Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list o... | 56.27 | 80 | 0.531367 |
91964eb7c7d9afb61c06e1799d47815f036e45f1 | 2,086 | py | Python | tests/test_tab.py | FadedCoder/SwagLyrics-For-Spotify | c62794dca0c029b5be0f5eade3030d3c00787fe4 | [
"MIT"
] | 295 | 2019-03-16T05:00:21.000Z | 2022-03-25T02:07:24.000Z | tests/test_tab.py | FadedCoder/SwagLyrics-For-Spotify | c62794dca0c029b5be0f5eade3030d3c00787fe4 | [
"MIT"
] | 1,920 | 2019-03-13T10:46:30.000Z | 2022-03-31T04:17:28.000Z | tests/test_tab.py | FadedCoder/SwagLyrics-For-Spotify | c62794dca0c029b5be0f5eade3030d3c00787fe4 | [
"MIT"
] | 48 | 2019-03-15T08:57:58.000Z | 2022-02-06T05:34:11.000Z | """
Contains unit tests for tab.py
"""
import flask_testing
from SwSpotify import SpotifyNotRunning
from mock import patch
from swaglyrics.tab import app
class Tests(flask_testing.TestCase):
"""
Unit tests
"""
def setup(self):
pass
def create_app(self):
return app
@patch('S... | 29.8 | 85 | 0.627517 |
39fb719eeca4cd58f120e82d05e72fece024b3d1 | 382 | py | Python | Email-Sender/email-sender.py | ragreenburg/Amazing-Python-Scripts | d91d0ddd312eb82ac307b58d6d09e6ca19384ea8 | [
"MIT"
] | 3 | 2021-01-14T13:54:22.000Z | 2021-11-15T11:26:51.000Z | Email-Sender/email-sender.py | Tanujcbe/Amazing-Python-Scripts | 4904df3b40e06f750b11ba807cf243eac60ebba3 | [
"MIT"
] | 1 | 2021-02-24T02:06:21.000Z | 2021-02-24T02:06:21.000Z | Email-Sender/email-sender.py | Tanujcbe/Amazing-Python-Scripts | 4904df3b40e06f750b11ba807cf243eac60ebba3 | [
"MIT"
] | 1 | 2021-01-20T08:01:54.000Z | 2021-01-20T08:01:54.000Z | import smtplib
to = input("Enter the Email of recipent:\n")
content = input("Enter the Content for E-Mail:\n")
def sendEmail(to, content):
server = smtplib.SMTP('smtp.gmail.com','587')
server.ehlo()
server.starttls()
server.login('senderemail@gmail.com','12345678')
server.sendmail('senderemail@gma... | 27.285714 | 55 | 0.696335 |
2501038750e578086074bc868a99009ee60a7d7c | 831 | py | Python | TTS.py | MayukhGautam/Microbit-Python-Interface | 56ee9e4f33a871a7ad631d2e31b3bfdb0c93f6cc | [
"MIT"
] | null | null | null | TTS.py | MayukhGautam/Microbit-Python-Interface | 56ee9e4f33a871a7ad631d2e31b3bfdb0c93f6cc | [
"MIT"
] | null | null | null | TTS.py | MayukhGautam/Microbit-Python-Interface | 56ee9e4f33a871a7ad631d2e31b3bfdb0c93f6cc | [
"MIT"
] | 2 | 2019-09-13T18:21:46.000Z | 2019-09-16T01:02:35.000Z | from microbit import * #importing packages
import radio, speech
radio.config(queue=5, length=32, channel=7, power=6, address=0x75626974, group=0, data_rate=radio.RATE_1MBIT) #setting radio's settings
radio.on() #radio is on
while True: #pretty much while microbit is on
speech.say("A for send B for receive", spe... | 39.571429 | 135 | 0.706378 |
615d8b6403daffd7cdabbca42fd4e195c34229d6 | 2,805 | py | Python | annotation-model/tools/make_tests.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 8 | 2019-04-09T21:13:05.000Z | 2021-11-23T17:25:18.000Z | annotation-model/tools/make_tests.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 49 | 2021-03-01T07:28:51.000Z | 2022-03-28T16:06:03.000Z | annotation-model/tools/make_tests.py | ziransun/wpt | ab8f451eb39eb198584d547f5d965ef54df2a86a | [
"BSD-3-Clause"
] | 11 | 2019-04-12T01:20:16.000Z | 2021-11-23T17:25:02.000Z | # Copyright (c) 2016 W3C
# Released under the W3C Test Suite License: see LICENSE.txt
# This tool creates .html test files for the WPT harness from corresponding .test
# files that it finds in the tree for this test collection.
from __future__ import print_function
import re
import time
import json
import fnmatch
im... | 26.462264 | 81 | 0.635651 |
9698708be9c82024aa4ca2061463de50c19bfbbd | 513 | py | Python | 24frame.py | yramsan/MCB-185-Homework | 6c3550aca0397b033d7e4403edda4b99b31fe192 | [
"MIT"
] | null | null | null | 24frame.py | yramsan/MCB-185-Homework | 6c3550aca0397b033d7e4403edda4b99b31fe192 | [
"MIT"
] | null | null | null | 24frame.py | yramsan/MCB-185-Homework | 6c3550aca0397b033d7e4403edda4b99b31fe192 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Write a program that prints out the position, frame, and letter of the DNA
# Try coding this with a single loop
# Try coding this with nested loops
# Credit to my new friend Hongtao for helping with this code!
dna = 'ATGGCCTTT'
# Single Loop
for i in range(len(dna)):
print(i, i % 3, dna[... | 15.545455 | 76 | 0.649123 |
bcc04f42ad1322d61d3147008dbdc90d39de21c5 | 4,672 | py | Python | home_app/feeds.py | Ymirrp/Home-page | 6ac9b5b76cc2b08298086c7e784685dad802c9d6 | [
"MIT"
] | null | null | null | home_app/feeds.py | Ymirrp/Home-page | 6ac9b5b76cc2b08298086c7e784685dad802c9d6 | [
"MIT"
] | 7 | 2020-04-18T04:54:05.000Z | 2020-04-29T14:49:46.000Z | home_app/feeds.py | Ymirrp/Home-page | 6ac9b5b76cc2b08298086c7e784685dad802c9d6 | [
"MIT"
] | null | null | null | import feedparser
import operator
import requests
from datetime import datetime, timedelta
def get_feed():
visir_feeds = feedparser.parse("https://www.visir.is/rss/frettir/")
mblinnlent_feeds = feedparser.parse("https://www.mbl.is/feeds/innlent/")
mblerlent_feeds = feedparser.parse("https://www.m... | 30.337662 | 98 | 0.52012 |
acfc9999ff6ab8bab908d85ee5910be1baa6607a | 2,801 | py | Python | evaluate/eval_cylib/test_cython.py | mondrasovic/reid_baseline_syncbn | 3d21a786fb1a0519caaa0572c649f750036689b5 | [
"MIT"
] | 1 | 2022-01-05T15:42:44.000Z | 2022-01-05T15:42:44.000Z | evaluate/eval_cylib/test_cython.py | mondrasovic/reid_baseline_syncbn | 3d21a786fb1a0519caaa0572c649f750036689b5 | [
"MIT"
] | null | null | null | evaluate/eval_cylib/test_cython.py | mondrasovic/reid_baseline_syncbn | 3d21a786fb1a0519caaa0572c649f750036689b5 | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys
import os.path as osp
import timeit
import numpy as np
sys.path.insert(0, osp.dirname(osp.abspath(__file__)) + '/../..')
from torchreid.eval_metrics import evaluate
"""
Test the speed of cython-based evaluation code. The speed improvements
can be much bigg... | 32.952941 | 113 | 0.695466 |
fed9a11709bbf79b6057ecc2f19bc0b49f583180 | 6,262 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/network/linkset.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/network/linkset.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/network/linkset.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 28.724771 | 109 | 0.6771 |
edc4d46516eece9e14a8692a5eb5e71e76cd3e6d | 204 | py | Python | commands/deviot_remove_library.py | Rod-O/Deviot | 45f59052a6f6f5d462d8dcddbf5836ef3b9f3eec | [
"Apache-2.0"
] | 327 | 2015-12-12T05:09:09.000Z | 2022-03-31T21:36:59.000Z | commands/deviot_remove_library.py | Rod-O/Deviot | 45f59052a6f6f5d462d8dcddbf5836ef3b9f3eec | [
"Apache-2.0"
] | 326 | 2016-01-03T14:03:00.000Z | 2022-03-02T09:35:47.000Z | commands/deviot_remove_library.py | Rod-O/Deviot | 45f59052a6f6f5d462d8dcddbf5836ef3b9f3eec | [
"Apache-2.0"
] | 87 | 2015-12-12T17:31:02.000Z | 2022-03-31T21:37:00.000Z | from sublime_plugin import WindowCommand
from ..libraries.libraries import Libraries
class DeviotRemoveLibraryCommand(WindowCommand):
def run(self):
Libraries().get_installed_list('remove')
| 25.5 | 48 | 0.789216 |
c34b3a9f076ec5bb1db008dd4fabfc85f1672820 | 26,364 | py | Python | tests/func/test_checkout.py | sahilbhosale63/dvc | 999c9e188801f971b75f51ca84f5bad533cb462c | [
"Apache-2.0"
] | null | null | null | tests/func/test_checkout.py | sahilbhosale63/dvc | 999c9e188801f971b75f51ca84f5bad533cb462c | [
"Apache-2.0"
] | null | null | null | tests/func/test_checkout.py | sahilbhosale63/dvc | 999c9e188801f971b75f51ca84f5bad533cb462c | [
"Apache-2.0"
] | null | null | null | import collections
import filecmp
import logging
import os
import shutil
import pytest
from mock import patch
from dvc.dvcfile import DVC_FILE_SUFFIX, PIPELINE_FILE, Dvcfile
from dvc.exceptions import (
CheckoutError,
CheckoutErrorSuggestGit,
ConfirmRemoveError,
DvcException,
NoOutputOrStageError,... | 31.126328 | 79 | 0.620885 |
c4e2838ed3f41668f9aec4223d764bb3f93f241a | 1,417 | py | Python | src/camps/utils.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/camps/utils.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/camps/utils.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | from camps.models import Camp
from django.utils import timezone
from django.contrib import admin
def get_current_camp():
try:
return Camp.objects.get(camp__contains=timezone.now())
except Camp.DoesNotExist:
return False
class CampPropertyListFilter(admin.SimpleListFilter):
"""
Simple... | 28.918367 | 64 | 0.631616 |
4fc1a3524deda8840f81b9ba9ba2c5642e25895b | 15,371 | py | Python | sagemaker/GENIE3-sagemaker.py | cs205-genie3-parallel/genie3-parallel | 6a1348036859e35f1d9bf68083a993ebe601717b | [
"MIT"
] | null | null | null | sagemaker/GENIE3-sagemaker.py | cs205-genie3-parallel/genie3-parallel | 6a1348036859e35f1d9bf68083a993ebe601717b | [
"MIT"
] | null | null | null | sagemaker/GENIE3-sagemaker.py | cs205-genie3-parallel/genie3-parallel | 6a1348036859e35f1d9bf68083a993ebe601717b | [
"MIT"
] | 1 | 2021-04-29T14:59:33.000Z | 2021-04-29T14:59:33.000Z | import argparse
import os
from sklearn.ensemble import RandomForestRegressor, ExtraTreesRegressor
from numpy import *
import time
from operator import itemgetter
from multiprocessing import Pool
import pandas as pd
import boto3
def compute_feature_importances(estimator):
importances = [e.tree_.compute_feature_imp... | 37.490244 | 336 | 0.663457 |
09bb6c945f223835c43a690b4d7339211d2e8936 | 232 | py | Python | app_init/service_trigger/args.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | 18 | 2017-01-09T22:17:49.000Z | 2022-01-24T20:46:42.000Z | app_init/service_trigger/args.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | 84 | 2017-04-11T13:47:49.000Z | 2022-03-21T20:12:57.000Z | app_init/service_trigger/args.py | kdeltared/tcex | 818c0d09256764f871e42d9ca5916f92d941d882 | [
"Apache-2.0"
] | 43 | 2017-01-05T20:40:26.000Z | 2022-03-31T19:18:02.000Z | """Service Args"""
from argparse import ArgumentParser
class Args:
"""Playbook Args"""
def __init__(self, parser: ArgumentParser):
"""Initialize class properties."""
parser.add_argument('--example_input')
| 21.090909 | 47 | 0.668103 |
b261e078c46924794044de24a0b52e13a4b3afdb | 37,690 | py | Python | synapse/http/matrixfederationclient.py | littlebenlittle/synapse | 0eccf531466d762ede0dd365284a8465bfb18d0f | [
"Apache-2.0"
] | null | null | null | synapse/http/matrixfederationclient.py | littlebenlittle/synapse | 0eccf531466d762ede0dd365284a8465bfb18d0f | [
"Apache-2.0"
] | null | null | null | synapse/http/matrixfederationclient.py | littlebenlittle/synapse | 0eccf531466d762ede0dd365284a8465bfb18d0f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
#
# 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... | 35.861085 | 88 | 0.56901 |
afc4357c479d470f2cb639bab1d35798e8044476 | 3,061 | py | Python | eval/substitute_qmltpeq_equality.py | TobiasGleissner/embed_modal | 746e3efb6f4c6cf70cc5b67f9c8f2ea3657328ec | [
"BSD-3-Clause"
] | 5 | 2018-06-20T14:52:55.000Z | 2022-02-21T15:51:56.000Z | eval/substitute_qmltpeq_equality.py | leoprover/embed_modal | 746e3efb6f4c6cf70cc5b67f9c8f2ea3657328ec | [
"BSD-3-Clause"
] | 5 | 2018-04-11T22:05:37.000Z | 2020-04-13T14:30:09.000Z | eval/substitute_qmltpeq_equality.py | leoprover/embed_modal | 746e3efb6f4c6cf70cc5b67f9c8f2ea3657328ec | [
"BSD-3-Clause"
] | 1 | 2018-04-05T20:02:31.000Z | 2018-04-05T20:02:31.000Z | from common import get_problem_file_list, create_tree
import sys
import filters_for_the_qmltp
from pathlib import Path
# first apply formula has children: "qmltpeq@op1","@","op2"
# second apply formula has children: "qmltpeq","@","op1"
def exchangeQmltpEqualities(node):
if node.getRule() == "thf_apply_formula":
... | 43.728571 | 113 | 0.666122 |
0e3b96105c557328be7e4c9c62a56832ae2b0a62 | 184 | py | Python | coding/learn_python/function_object/clockdeco_param_demo1.py | yatao91/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | 3 | 2021-05-25T16:58:52.000Z | 2022-02-05T09:37:17.000Z | coding/learn_python/function_object/clockdeco_param_demo1.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | coding/learn_python/function_object/clockdeco_param_demo1.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import time
from clockdeco_param import clock
@clock('{name}: {elapsed}s')
def snooze(seconds):
time.sleep(seconds)
for i in range(3):
snooze(.123)
| 14.153846 | 33 | 0.652174 |
0e5a610b289b17e88b1851e02bf587cfde059276 | 1,888 | py | Python | examples/ad_manager/v201902/creative_service/get_image_creatives.py | nlynch504/googleads-python-lib | 8f7bd7f987498c4651c969a7dc73e1d5fc965be2 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201902/creative_service/get_image_creatives.py | nlynch504/googleads-python-lib | 8f7bd7f987498c4651c969a7dc73e1d5fc965be2 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201902/creative_service/get_image_creatives.py | nlynch504/googleads-python-lib | 8f7bd7f987498c4651c969a7dc73e1d5fc965be2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2016 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 requir... | 37.019608 | 80 | 0.722458 |
41ed768c90b2bf865396ccea5ffd432e688a9032 | 606 | py | Python | src/main/python/org/broadinstitute/hellbender/vqsr_cnn/__init__.py | yhcheng/gatk | 1ba826c7eded2e76a3c151c6fbc228d44c798b0b | [
"BSD-3-Clause"
] | null | null | null | src/main/python/org/broadinstitute/hellbender/vqsr_cnn/__init__.py | yhcheng/gatk | 1ba826c7eded2e76a3c151c6fbc228d44c798b0b | [
"BSD-3-Clause"
] | null | null | null | src/main/python/org/broadinstitute/hellbender/vqsr_cnn/__init__.py | yhcheng/gatk | 1ba826c7eded2e76a3c151c6fbc228d44c798b0b | [
"BSD-3-Clause"
] | null | null | null | from .vqsr_cnn.models import build_read_tensor_2d_and_annotations_model, build_tiny_2d_annotation_model, build_reference_annotation_model
from .vqsr_cnn.models import args_and_model_from_semantics, train_model_from_generators, build_small_2d_annotation_model
from .vqsr_cnn.tensor_maps import get_tensor_channel_map_from... | 67.333333 | 137 | 0.89769 |
8c32f11ed1720d324c280ea1b80e69e2491da83e | 7,471 | py | Python | crawler/prepare_dataset.py | awant/habr_crawler | b38ec828b075baca1a70408647ed58741be82393 | [
"MIT"
] | 1 | 2021-04-08T07:19:17.000Z | 2021-04-08T07:19:17.000Z | crawler/prepare_dataset.py | awant/habr_crawler | b38ec828b075baca1a70408647ed58741be82393 | [
"MIT"
] | 1 | 2021-11-16T11:49:53.000Z | 2021-11-16T11:49:53.000Z | crawler/prepare_dataset.py | awant/habr_crawler | b38ec828b075baca1a70408647ed58741be82393 | [
"MIT"
] | 2 | 2021-11-27T14:43:18.000Z | 2022-01-09T13:18:31.000Z | import pandas as pd
from bs4 import BeautifulSoup
import json
import re
from nltk.tokenize import sent_tokenize, word_tokenize
import statistics
import string
from nltk.corpus import stopwords
from nltk.stem.snowball import SnowballStemmer
from collections import Counter, defaultdict
from pprint import pprint
import os... | 32.202586 | 108 | 0.631776 |
f3eb001987c3bfe7f29a6f69cab68359c42ebe1e | 893 | py | Python | ethinjest/model.py | agonopol/ethscan | e1c1433458e92a35b4729809bdf8e77f95ef32cd | [
"MIT"
] | null | null | null | ethinjest/model.py | agonopol/ethscan | e1c1433458e92a35b4729809bdf8e77f95ef32cd | [
"MIT"
] | null | null | null | ethinjest/model.py | agonopol/ethscan | e1c1433458e92a35b4729809bdf8e77f95ef32cd | [
"MIT"
] | 2 | 2019-06-04T11:51:34.000Z | 2019-06-04T15:51:38.000Z | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, BigInteger, String, DateTime
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
Base = declarative_base(
)
class Status(Base):
__tablename__ = 'eth_addresses'
id = Column(Integer, primar... | 27.060606 | 112 | 0.709966 |
1bf002e0c9d383ee4fcf7b7e7d9e56ad62ddde86 | 1,979 | py | Python | src/Clustering/decision_tree.py | ai-se/heroes_compsci | 613fd623a6da073b2c62c773ed902acb0c756809 | [
"MIT"
] | null | null | null | src/Clustering/decision_tree.py | ai-se/heroes_compsci | 613fd623a6da073b2c62c773ed902acb0c756809 | [
"MIT"
] | 12 | 2019-12-17T04:04:19.000Z | 2019-12-26T20:23:02.000Z | src/Clustering/decision_tree.py | ai-se/heroes_compsci | 613fd623a6da073b2c62c773ed902acb0c756809 | [
"MIT"
] | 1 | 2020-03-12T22:19:48.000Z | 2020-03-12T22:19:48.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import platform
import pandas as pd
from sklearn import tree
from sklearn.tree.export import export_text
import matplotlib.pyplot as plt
import math
def getDecisionTree(index):
if platform.system() == 'Darwin' or platform.system() == 'Linux':
file_na... | 35.339286 | 140 | 0.663972 |
a6c44db5abe01bf007f0db274dcbc64a537359cd | 344 | py | Python | packages/micropython-official/v1.10/esp8266/stubs/ustruct.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 18 | 2019-07-11T13:31:09.000Z | 2022-01-27T06:38:40.000Z | packages/micropython-official/v1.10/esp8266/stubs/ustruct.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 9 | 2019-09-01T21:44:49.000Z | 2022-02-04T20:55:08.000Z | packages/micropython-official/v1.10/esp8266/stubs/ustruct.py | TheVinhLuong102/micropy-stubs | 55ff1773008f7c4dfc3d70a403986486226eb6b3 | [
"MIT"
] | 6 | 2019-10-08T05:31:21.000Z | 2021-04-22T10:21:01.000Z | """
Module: 'ustruct' on esp8266 v1.10
"""
# MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.10-8-g8b7039d7d on 2019-01-26', machine='ESP module with ESP8266')
# Stubber: 1.2.0
def calcsize():
pass
def pack():
pass
def pack_into():
pass
def unpack():
pass
def u... | 16.380952 | 155 | 0.639535 |
325da4015b8a98ce6e52dadacc7ab59b6fa9df49 | 36,717 | py | Python | desktop/core/src/desktop/api2.py | carlsonp/hue | efbe3a2f45724935816100a2134b7446e81e1981 | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/api2.py | carlsonp/hue | efbe3a2f45724935816100a2134b7446e81e1981 | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/api2.py | carlsonp/hue | efbe3a2f45724935816100a2134b7446e81e1981 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 35.338787 | 161 | 0.685759 |
6912b7811b66826d24bb9c5503519c4677d31166 | 2,487 | py | Python | venv/Lib/site-packages/gevent/resolver/thread.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 13 | 2018-03-28T23:07:01.000Z | 2022-03-12T06:01:21.000Z | venv/Lib/site-packages/gevent/resolver/thread.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 11 | 2018-06-18T15:49:07.000Z | 2021-11-25T01:45:33.000Z | venv/Lib/site-packages/gevent/resolver/thread.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 5 | 2018-03-28T23:07:05.000Z | 2021-12-09T19:02:00.000Z | # Copyright (c) 2012-2015 Denis Bilenko. See LICENSE for details.
"""
Native thread-based hostname resolver.
"""
import _socket
from gevent.hub import get_hub
__all__ = ['Resolver']
class Resolver(object):
"""
Implementation of the resolver API using native threads and native resolution
functions.
... | 35.528571 | 82 | 0.664656 |
10a04c81ca608743765e7ecb1248a21ea1b1cdb8 | 2,519 | py | Python | qradar4py/endpoints/disaster_recovery.py | ryukisec/qradar4py | 958cdea92709778916f0ff8d84d75b18aaad4a66 | [
"MIT"
] | 10 | 2019-11-19T21:13:32.000Z | 2021-11-17T19:35:53.000Z | qradar4py/endpoints/disaster_recovery.py | ryukisec/qradar4py | 958cdea92709778916f0ff8d84d75b18aaad4a66 | [
"MIT"
] | 2 | 2021-05-21T16:15:16.000Z | 2021-07-20T12:34:49.000Z | qradar4py/endpoints/disaster_recovery.py | ryukisec/qradar4py | 958cdea92709778916f0ff8d84d75b18aaad4a66 | [
"MIT"
] | 6 | 2020-09-14T13:44:55.000Z | 2021-11-17T19:35:55.000Z | from urllib.parse import urljoin
from qradar4py.endpoints.api_endpoint import QRadarAPIEndpoint
from qradar4py.endpoints.api_endpoint import request_vars
from qradar4py.endpoints.api_endpoint import header_vars
class DisasterRecovery(QRadarAPIEndpoint):
"""
The QRadar API endpoint group /disaster_recovery an... | 40.629032 | 96 | 0.676459 |
ed0611d6c2a229ec3e2020edd0a31fdc176201a6 | 8,684 | py | Python | utils/scrape_wandb.py | joeybose/vgraphgen | 37df882d6548ef8dc3f251dcfb6ecc6a6a91604d | [
"MIT"
] | null | null | null | utils/scrape_wandb.py | joeybose/vgraphgen | 37df882d6548ef8dc3f251dcfb6ecc6a6a91604d | [
"MIT"
] | null | null | null | utils/scrape_wandb.py | joeybose/vgraphgen | 37df882d6548ef8dc3f251dcfb6ecc6a6a91604d | [
"MIT"
] | null | null | null | import argparse
import csv
import json
import os
from statistics import mean
import wandb
import matplotlib
import numpy as np
from utils import project_name
def get_data(args, wandb_username, wandb_project):
# Accumulate data for all experiments.
data_experiments_auc = []
data_experiments_ap = []
da... | 46.688172 | 117 | 0.61976 |
7e095b06fc1f0bec6139b7f69c27d1f909ed063a | 822 | py | Python | setup.py | frostinassiky/align1d | f4c568ed68876c641bc042614cecb354678673b8 | [
"Apache-2.0"
] | null | null | null | setup.py | frostinassiky/align1d | f4c568ed68876c641bc042614cecb354678673b8 | [
"Apache-2.0"
] | null | null | null | setup.py | frostinassiky/align1d | f4c568ed68876c641bc042614cecb354678673b8 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
from torch.utils.cpp_extension import CppExtension, BuildExtension
setup(
name='Align1D',
version="2.2.0",
author="Frost Mengmeng Xu",
author_email="xu.frost@gmail.com",
description="A small package for 1d aligment in cuda",
long_description="I will write a longer d... | 30.444444 | 66 | 0.596107 |
bba776ff575fc9c549b48fd842242a461bc95101 | 652 | py | Python | shell/options.py | levindoneto/traffic_generator | 884d96893e7d9d09e0981bffac2e564a63344bc3 | [
"MIT"
] | null | null | null | shell/options.py | levindoneto/traffic_generator | 884d96893e7d9d09e0981bffac2e564a63344bc3 | [
"MIT"
] | null | null | null | shell/options.py | levindoneto/traffic_generator | 884d96893e7d9d09e0981bffac2e564a63344bc3 | [
"MIT"
] | null | null | null | def getArgs(argsLst):
"""
Get args from command prompt
@param: list\n
@returns: obj
"""
if (argsLst[1] != "-i" and argsLst[3] != "–p" and argsLst[5] != "–r"):
print("Invalid options given\npython gt.py –i destinationIp –p port -r bandwidth")
return -1
else:
try:
... | 29.636364 | 99 | 0.52454 |
1ff9d0fd409d48ce01c74c2cee4e7c07572b6b98 | 1,484 | py | Python | src/smtphelp.py | jertel/elastalert-slackbot | c3597ce5f6e12ba360d09f19f48444b971d3191a | [
"MIT"
] | 10 | 2018-08-24T12:34:29.000Z | 2021-06-16T09:14:01.000Z | src/smtphelp.py | jertel/elastalert-slackbot | c3597ce5f6e12ba360d09f19f48444b971d3191a | [
"MIT"
] | 1 | 2018-07-20T22:59:32.000Z | 2020-09-01T20:48:25.000Z | src/smtphelp.py | jertel/elastalert-slackbot | c3597ce5f6e12ba360d09f19f48444b971d3191a | [
"MIT"
] | 4 | 2019-02-06T04:43:55.000Z | 2021-01-26T12:02:37.000Z | import logging
import os
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
log = logging.getLogger('smtphelp')
def send(conf, subject, body):
if conf['smtp'].get('secure'):
server = smtplib.SMTP_SSL(host=conf['smtp']['host'], timeout=conf['smtp']['timeoutSeconds'... | 30.916667 | 99 | 0.653639 |
5565943a7ec68077c0400fc63dae3cc68e84b34d | 8,433 | py | Python | web_tool/data_analy/views/views.py | githmy/vnpymy | f6a172629f0961bea13e9f10c8fc47de225094ec | [
"MIT"
] | 1 | 2021-04-09T06:46:35.000Z | 2021-04-09T06:46:35.000Z | web_tool/data_analy/views/views.py | githmy/vnpymy | f6a172629f0961bea13e9f10c8fc47de225094ec | [
"MIT"
] | 1 | 2021-12-31T02:38:36.000Z | 2021-12-31T02:38:36.000Z | web_tool/data_analy/views/views.py | githmy/vnpymy | f6a172629f0961bea13e9f10c8fc47de225094ec | [
"MIT"
] | 1 | 2021-06-27T12:13:47.000Z | 2021-06-27T12:13:47.000Z | from django.shortcuts import render
from django.views.generic import FormView, UpdateView
from django.http import HttpResponse, JsonResponse, HttpResponseRedirect
from common.mixins import JSONResponseMixin, AdminUserRequiredMixin
from common.utils import get_object_or_none
from common.tools.data_fit import iter_regres... | 28.979381 | 97 | 0.588877 |
1c2c6eb508fbb7db0f4bc9542432ad2c73f2504b | 181 | py | Python | modules/__init__.py | trislaz/SimCLR | d7c8950a1afc8adad4e617e7ecd90a0d3828740f | [
"MIT"
] | null | null | null | modules/__init__.py | trislaz/SimCLR | d7c8950a1afc8adad4e617e7ecd90a0d3828740f | [
"MIT"
] | null | null | null | modules/__init__.py | trislaz/SimCLR | d7c8950a1afc8adad4e617e7ecd90a0d3828740f | [
"MIT"
] | null | null | null | from .simclr import SimCLR
from .nt_xent import NT_Xent
from .logistic_regression import LogisticRegression
from .lars import LARS
from .dataloader import dataset, datasetWSI_simple | 36.2 | 51 | 0.856354 |
cde79427ed88701fa6d7a2360d71bc37701560a6 | 6,216 | py | Python | neutron/objects/subnetpool.py | cleo4zheng/neutron | 6d65318308edfd984bdd0ff1ac7fef9486a040f7 | [
"Apache-2.0"
] | 1 | 2019-06-02T06:15:39.000Z | 2019-06-02T06:15:39.000Z | neutron/objects/subnetpool.py | cleo4zheng/neutron | 6d65318308edfd984bdd0ff1ac7fef9486a040f7 | [
"Apache-2.0"
] | 1 | 2019-08-16T14:02:19.000Z | 2019-08-16T14:02:19.000Z | neutron/objects/subnetpool.py | cleo4zheng/neutron | 6d65318308edfd984bdd0ff1ac7fef9486a040f7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 OpenStack Foundation.
# 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... | 38.37037 | 78 | 0.623391 |
f592bcc0d23073c0d33f28b26aa27a43989664eb | 4,451 | py | Python | PRESUBMIT.py | conchoid/gae | a3746d0de863d481ac85e749ff6fae069b1dd119 | [
"Apache-2.0"
] | 1 | 2019-01-14T09:01:26.000Z | 2019-01-14T09:01:26.000Z | PRESUBMIT.py | Acidburn0zzz/gae | 2e2072ed4889f770e6e135554b716fd54a7d0646 | [
"Apache-2.0"
] | null | null | null | PRESUBMIT.py | Acidburn0zzz/gae | 2e2072ed4889f770e6e135554b716fd54a7d0646 | [
"Apache-2.0"
] | 1 | 2021-06-17T14:32:13.000Z | 2021-06-17T14:32:13.000Z | # Copyright 2015 The LUCI Authors.
#
# 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 wr... | 33.466165 | 80 | 0.714222 |
455e2585d7d120e69af0904138f8be5f47c4cc23 | 787 | py | Python | Entrenamiento Algoritmico/comparaciondosnumeros.py | andersonvelasco/Programming-2020B | bd843a406353b55ca83b9684c394aec1556aaddc | [
"Apache-2.0"
] | null | null | null | Entrenamiento Algoritmico/comparaciondosnumeros.py | andersonvelasco/Programming-2020B | bd843a406353b55ca83b9684c394aec1556aaddc | [
"Apache-2.0"
] | null | null | null | Entrenamiento Algoritmico/comparaciondosnumeros.py | andersonvelasco/Programming-2020B | bd843a406353b55ca83b9684c394aec1556aaddc | [
"Apache-2.0"
] | null | null | null | '''Script que compara 2 numeros ingresados por el usuario
y define cual numero es mayor'''
import os
os.system("cls") # thsi kine let you clear screen.
num1=0 #
num2=0 #
print ("Programa para calcular el mayor de dos números ")
num1=int(input("Ingrese primer número:"))
num2=int(input("Ingrese segundo número:"))
'''
E... | 31.48 | 72 | 0.656925 |
56551f3a66bb9d9fe2d00d8c8200da3a44cd73a3 | 3,088 | py | Python | viper/modules/misp_methods/galaxies.py | Mario-Kart-Felix/mal-scrap | bc396a15ea5b144eb1c0f05759d1f9419d6671df | [
"BSD-3-Clause"
] | 2 | 2015-12-17T20:25:09.000Z | 2017-10-08T19:14:57.000Z | viper/modules/misp_methods/galaxies.py | Mario-Kart-Felix/mal-scrap | bc396a15ea5b144eb1c0f05759d1f9419d6671df | [
"BSD-3-Clause"
] | 1 | 2015-01-05T18:07:13.000Z | 2015-01-07T21:43:57.000Z | viper/modules/misp_methods/galaxies.py | Mario-Kart-Felix/mal-scrap | bc396a15ea5b144eb1c0f05759d1f9419d6671df | [
"BSD-3-Clause"
] | 3 | 2017-10-18T00:56:53.000Z | 2020-05-24T09:38:54.000Z | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
try:
from pymispgalaxies import Clusters
HAVE_PYGALAXIES = True
except:
HAVE_PYGALAXIES = False
def _print_cluster_value(self, cluster_value):
self.log('suc... | 39.589744 | 134 | 0.559262 |
5abcda0e341eedd2228328a0f10342718069ea21 | 203 | py | Python | tests/test_tweens.py | ptone/BirdFish | 53633ab95f3c81748398143e6411c127c1b6c76e | [
"BSD-3-Clause"
] | 3 | 2015-11-05T10:25:36.000Z | 2018-12-07T14:44:14.000Z | tests/test_tweens.py | ptone/BirdFish | 53633ab95f3c81748398143e6411c127c1b6c76e | [
"BSD-3-Clause"
] | null | null | null | tests/test_tweens.py | ptone/BirdFish | 53633ab95f3c81748398143e6411c127c1b6c76e | [
"BSD-3-Clause"
] | null | null | null | from birdfish import tween
def test_tween_jump():
b = 0
c = 1
d = 6
target = .5
tween_t = tween.LINEAR
val = tween.jump_time(tween_t, target, b, c, d)
assert int(val) == 3
| 15.615385 | 51 | 0.581281 |
d03d69e57256d66dc2bfba71a1e7ba7b875b46f5 | 2,187 | py | Python | floodsystem/plot.py | butanone/flooddefense | 04585b20389a39dc418756871b361d0ea2eaa871 | [
"MIT"
] | null | null | null | floodsystem/plot.py | butanone/flooddefense | 04585b20389a39dc418756871b361d0ea2eaa871 | [
"MIT"
] | null | null | null | floodsystem/plot.py | butanone/flooddefense | 04585b20389a39dc418756871b361d0ea2eaa871 | [
"MIT"
] | null | null | null | """This module contains functions which can provide plots of the water levels. It includes the module analysis.py."""
import matplotlib.pyplot as plt
from matplotlib.dates import date2num
from datetime import datetime
from floodsystem import analysis
def plot_water_levels(station, dates, levels):
"""This functi... | 28.776316 | 117 | 0.678098 |
0df85c7b6cfcfa0d70765af9c43a7379f56ead71 | 42,418 | py | Python | Configuration/EventContent/python/EventContent_cff.py | RosmarieSchoefbeck/cmssw | 66b151a27eef46ff965508064071091ecb21395c | [
"Apache-2.0"
] | 1 | 2020-04-09T19:05:23.000Z | 2020-04-09T19:05:23.000Z | Configuration/EventContent/python/EventContent_cff.py | RosmarieSchoefbeck/cmssw | 66b151a27eef46ff965508064071091ecb21395c | [
"Apache-2.0"
] | null | null | null | Configuration/EventContent/python/EventContent_cff.py | RosmarieSchoefbeck/cmssw | 66b151a27eef46ff965508064071091ecb21395c | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
#
# Event Content definition
#
# Data Tiers defined:
#
# LHE:
# include pure LHE production
#
# RAW , RECO, AOD:
# include reconstruction content
#
# RAWSIM, RECOSIM, AODSIM:
# include reconstruction and simulation
#
# GENRAW
# slimmed-down version of RAWSIM for... | 45.956663 | 145 | 0.823896 |
7c1200068d8782097646d90441312a73ff9ff3e5 | 7,625 | py | Python | JumpScale9Lib/clients/zero_os/Client.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 2 | 2017-06-07T08:11:47.000Z | 2017-11-10T02:19:48.000Z | JumpScale9Lib/clients/zero_os/Client.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 188 | 2017-06-21T06:16:13.000Z | 2020-06-17T14:20:24.000Z | JumpScale9Lib/clients/zero_os/Client.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 3 | 2018-06-12T05:18:28.000Z | 2019-09-24T06:49:17.000Z | import json
import socket
import time
import uuid
import redis
from js9 import j
from . import typchk
from .AggregatorManager import AggregatorManager
from .BaseClient import BaseClient, DefaultTimeout
from .BridgeManager import BridgeManager
from .BtrfsManager import BtrfsManager
from .CGroupManager import CGroupMan... | 30.378486 | 137 | 0.592656 |
4893752bc4d6b3ae10da660cc7cf7b41a3035449 | 32,612 | py | Python | Agents/PlugloadAgent/plugload/agent.py | bopopescu/TP | 72ae5654d04053810b502366f558e79407b6cea8 | [
"Unlicense"
] | null | null | null | Agents/PlugloadAgent/plugload/agent.py | bopopescu/TP | 72ae5654d04053810b502366f558e79407b6cea8 | [
"Unlicense"
] | null | null | null | Agents/PlugloadAgent/plugload/agent.py | bopopescu/TP | 72ae5654d04053810b502366f558e79407b6cea8 | [
"Unlicense"
] | 1 | 2020-07-22T19:58:44.000Z | 2020-07-22T19:58:44.000Z | # -*- coding: utf-8 -*-
'''
Copyright (c) 2016, Virginia Tech
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of condi... | 51.683043 | 263 | 0.611585 |
03b6d7d3f1443833007b2ef49fd6feb6903fac06 | 218 | py | Python | openktn/native/ktn.py | uibcdf/OpenKinNet | 8ed5d3da561e7a0f62ac80cb02cc09116c08ac25 | [
"MIT"
] | null | null | null | openktn/native/ktn.py | uibcdf/OpenKinNet | 8ed5d3da561e7a0f62ac80cb02cc09116c08ac25 | [
"MIT"
] | null | null | null | openktn/native/ktn.py | uibcdf/OpenKinNet | 8ed5d3da561e7a0f62ac80cb02cc09116c08ac25 | [
"MIT"
] | null | null | null | class KTN():
def __init__(self):
self.temperature = None
self.time = None
self.microstates = {}
self.transitions = {}
self.weight = 0.0
self.symmetrized = False
| 15.571429 | 32 | 0.53211 |
ea604ee8c92f19a7168bf3426cdd8af73b80f0b8 | 1,708 | py | Python | orm/models.py | manukanne/cloudatlas-quiz-api | ccb75305fae23db6f72bd5386d39ae83e798bb62 | [
"Apache-2.0"
] | null | null | null | orm/models.py | manukanne/cloudatlas-quiz-api | ccb75305fae23db6f72bd5386d39ae83e798bb62 | [
"Apache-2.0"
] | null | null | null | orm/models.py | manukanne/cloudatlas-quiz-api | ccb75305fae23db6f72bd5386d39ae83e798bb62 | [
"Apache-2.0"
] | null | null | null | from mongoengine import Document, EmbeddedDocument, EmbeddedDocumentField, StringField, BooleanField, \
SequenceField, ListField, ReferenceField, EmailField, DO_NOTHING as DELETION_RULE_DO_NOTHING
class User(Document):
"""
MongoDB User document
"""
email = EmailField(primary_key=True)
first_na... | 31.054545 | 103 | 0.740047 |
1ad6007afdee6cb2591d28f405a77730f650fadd | 9,187 | py | Python | lib/pymedphys/_experimental/streamlit/utilities/icom.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 207 | 2019-01-29T09:53:04.000Z | 2022-03-26T10:34:03.000Z | lib/pymedphys/_experimental/streamlit/utilities/icom.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 1,209 | 2019-01-29T07:52:27.000Z | 2022-03-31T20:11:24.000Z | lib/pymedphys/_experimental/streamlit/utilities/icom.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 58 | 2019-03-29T09:06:18.000Z | 2022-03-24T07:44:22.000Z | # Copyright (C) 2020 Cancer Care Associates
# 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 ... | 31.67931 | 88 | 0.679112 |
677681d0375668a03814dfad90c791bf6890b1e0 | 1,689 | py | Python | probatus/utils/_utils.py | anilkumarpanda/probatus | a6123b4da664dfc4f182dad1baa00e77decf4789 | [
"MIT"
] | null | null | null | probatus/utils/_utils.py | anilkumarpanda/probatus | a6123b4da664dfc4f182dad1baa00e77decf4789 | [
"MIT"
] | null | null | null | probatus/utils/_utils.py | anilkumarpanda/probatus | a6123b4da664dfc4f182dad1baa00e77decf4789 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 ING Bank N.V.
#
# 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, publish, distr... | 45.648649 | 101 | 0.754885 |
1f80d3e36892460129223c17e3cf423efb9d47ab | 652 | py | Python | adlibre_tms/views.py | adlibre/Adlibre-TMS | 4c8de1e4448203fb267d38ec0f4ec9e64d58a21d | [
"BSD-3-Clause"
] | 26 | 2015-01-06T11:09:18.000Z | 2022-03-16T06:20:53.000Z | adlibre_tms/views.py | adlibre/Adlibre-TMS | 4c8de1e4448203fb267d38ec0f4ec9e64d58a21d | [
"BSD-3-Clause"
] | 4 | 2015-02-26T11:00:35.000Z | 2020-06-05T18:02:02.000Z | adlibre_tms/views.py | adlibre/Adlibre-TMS | 4c8de1e4448203fb267d38ec0f4ec9e64d58a21d | [
"BSD-3-Clause"
] | 16 | 2015-02-08T05:24:38.000Z | 2021-06-13T14:45:30.000Z | from django.conf import settings
from django import http
from django.template import Context, RequestContext, loader
def server_error(request, template_name='500.html'):
"""
500 error handler.
Don't try to render full context. Just minimal.
"""
t = loader.get_template(template_name)
c = Conte... | 25.076923 | 59 | 0.703988 |
00564b8eaf6e8bcc5d672ddd1b49b869e8f92b0e | 8,817 | py | Python | src/planning/recordreplay_planner_nodes/test/recordreplay_planner_node.test.py | QS-L-1992/AutowareAuto | f35a22677cbd2309ecae36d52f83f035cd96b8cb | [
"Apache-2.0"
] | 19 | 2021-05-28T06:14:21.000Z | 2022-03-10T10:03:08.000Z | src/planning/recordreplay_planner_nodes/test/recordreplay_planner_node.test.py | QS-L-1992/AutowareAuto | f35a22677cbd2309ecae36d52f83f035cd96b8cb | [
"Apache-2.0"
] | 222 | 2021-10-29T22:00:27.000Z | 2022-03-29T20:56:34.000Z | src/planning/recordreplay_planner_nodes/test/recordreplay_planner_node.test.py | QS-L-1992/AutowareAuto | f35a22677cbd2309ecae36d52f83f035cd96b8cb | [
"Apache-2.0"
] | 14 | 2021-05-29T14:59:17.000Z | 2022-03-10T10:03:09.000Z | # Copyright 2020 Embotech AG
#
# 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, ... | 39.186667 | 94 | 0.692639 |
066d6487508f081b22df184285c42ef0ad37c7ab | 1,110 | py | Python | chatBOT-Final/chat_app/venv/lib/python3.6/site-packages/py2neo/packages/neo4j/__init__.py | ashokupd81/Django-Chatbot | 0d199390b22b294830c1a68ad270c688517e7b11 | [
"MIT"
] | 2 | 2019-01-31T21:01:36.000Z | 2022-02-23T01:22:01.000Z | chatBOT-Final/chat_app/venv/lib/python3.6/site-packages/py2neo/packages/neo4j/__init__.py | ashokupd81/Django-Chatbot | 0d199390b22b294830c1a68ad270c688517e7b11 | [
"MIT"
] | 3 | 2019-01-31T10:30:39.000Z | 2019-01-31T10:31:46.000Z | chatBOT-Final/chat_app/venv/lib/python3.6/site-packages/py2neo/packages/neo4j/__init__.py | ashokupd81/Django-Chatbot | 0d199390b22b294830c1a68ad270c688517e7b11 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright (c) 2002-2016 "Neo Technology,"
# Network Engine for Objects in Lund AB [http://neotechnology.com]
#
# This file is part of Neo4j.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Li... | 34.6875 | 74 | 0.741441 |
ed9e3bb2dbe1be6fad5cf54dd8fbcaa73f064c47 | 22,615 | py | Python | distributed/deploy/tests/test_local.py | jjerphan/distributed | 0ce8f2bcb84d306e9a095d75497857dce30145b5 | [
"BSD-3-Clause"
] | null | null | null | distributed/deploy/tests/test_local.py | jjerphan/distributed | 0ce8f2bcb84d306e9a095d75497857dce30145b5 | [
"BSD-3-Clause"
] | null | null | null | distributed/deploy/tests/test_local.py | jjerphan/distributed | 0ce8f2bcb84d306e9a095d75497857dce30145b5 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
from functools import partial
import gc
import subprocess
import sys
from time import sleep
from threading import Lock
import unittest
import weakref
from tornado.ioloop import IOLoop
from tornado import gen
import pytest
from distributed import Client... | 28.482368 | 88 | 0.624983 |
b500d10a6555275dc0645e410660fb9d4898d109 | 3,513 | py | Python | ucsmsdk/mometa/policy/PolicyControlledInstance.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/policy/PolicyControlledInstance.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/policy/PolicyControlledInstance.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for PolicyControlledInstance ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class PolicyControlledInstanceConsts:
RESOLVE_TYPE_NAME = "name"
RESOLVE_TYPE_RN = "rn"
clas... | 59.542373 | 479 | 0.66809 |
5ae499b859391390ed5e07585317e4d6fa07939f | 300 | py | Python | paraVerComoFuncionaAlgumasCoisas/alura/1-python3IntroOrientacaoObjetos/cliente.py | jonasht/pythonEstudos | 5e7d28e7bd82b9d1b08e795867fdbaa743f4b747 | [
"MIT"
] | null | null | null | paraVerComoFuncionaAlgumasCoisas/alura/1-python3IntroOrientacaoObjetos/cliente.py | jonasht/pythonEstudos | 5e7d28e7bd82b9d1b08e795867fdbaa743f4b747 | [
"MIT"
] | null | null | null | paraVerComoFuncionaAlgumasCoisas/alura/1-python3IntroOrientacaoObjetos/cliente.py | jonasht/pythonEstudos | 5e7d28e7bd82b9d1b08e795867fdbaa743f4b747 | [
"MIT"
] | null | null | null | class Cliente:
def __init__(self, nome) -> None:
self.__nome = nome
@property
def nome(self):
print('chamando property')
return self.__nome.title()
@nome.setter
def nome(self, novoNome):
print('chamando setter')
self.__nome = novoNome | 23.076923 | 37 | 0.586667 |
eed52d0d905b8fc11f24e0c03a36812f9219377c | 6,603 | py | Python | ode4jax/_src/ODEBase/controllers/controllers.py | PhilipVinc/netket_dynamics | 6e8009098c279271cb0f289ba9e85c039bb284e4 | [
"Apache-2.0"
] | 2 | 2021-10-02T20:29:44.000Z | 2021-10-02T20:38:28.000Z | ode4jax/_src/ODEBase/controllers/controllers.py | PhilipVinc/netket_dynamics | 6e8009098c279271cb0f289ba9e85c039bb284e4 | [
"Apache-2.0"
] | 11 | 2021-10-01T09:15:06.000Z | 2022-03-21T09:19:23.000Z | ode4jax/_src/ODEBase/controllers/controllers.py | PhilipVinc/netket_dynamics | 6e8009098c279271cb0f289ba9e85c039bb284e4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The NetKet Authors - 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 ... | 35.31016 | 90 | 0.685749 |
2ceed0745c1f3eccf9190a4a095693cec3cdcb2e | 2,611 | py | Python | lib/rucio/clis/daemons/reaper/reaper.py | efajardo/rucio | 460f394715568b937584ef671382b2b93add1758 | [
"Apache-2.0"
] | null | null | null | lib/rucio/clis/daemons/reaper/reaper.py | efajardo/rucio | 460f394715568b937584ef671382b2b93add1758 | [
"Apache-2.0"
] | null | null | null | lib/rucio/clis/daemons/reaper/reaper.py | efajardo/rucio | 460f394715568b937584ef671382b2b93add1758 | [
"Apache-2.0"
] | 1 | 2021-06-17T14:15:15.000Z | 2021-06-17T14:15:15.000Z | # Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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... | 45.017241 | 142 | 0.723861 |
abe4a02627c231163599a0c50ab334a6cbbfc7c8 | 18,840 | py | Python | AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py | ganeshbelgur/o3de | cdae80d7f1ac13f21c7b1c03803dca205929ef09 | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py | ganeshbelgur/o3de | cdae80d7f1ac13f21c7b1c03803dca205929ef09 | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py | ganeshbelgur/o3de | cdae80d7f1ac13f21c7b1c03803dca205929ef09 | [
"Apache-2.0",
"MIT"
] | null | null | null | """
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import pytest
import os
import sys
import inspect
from ly_test_tools import LAUNCHERS
from ly_test_tools.o3de.... | 51.195652 | 138 | 0.794321 |
acbff2d72414ffd24ba1254c495ff58bc8e1c2e5 | 884 | py | Python | setup.py | arunanshub/sphinx-nested-apidoc | aa600d311d895ba1b739f946012426aff54bcc4a | [
"MIT"
] | null | null | null | setup.py | arunanshub/sphinx-nested-apidoc | aa600d311d895ba1b739f946012426aff54bcc4a | [
"MIT"
] | 2 | 2021-08-21T22:20:26.000Z | 2022-01-20T18:51:26.000Z | setup.py | arunanshub/sphinx-nested-apidoc | aa600d311d895ba1b739f946012426aff54bcc4a | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name="sphinx-nested-apidoc",
version="0.3.2",
author="Arunanshu Biswas",
author_email="mydellpc07@gmail.com",
description="sphinx-nested-apidoc: When flattened is not enough",
long_description=open("README.md").read(),
long_description_cont... | 31.571429 | 69 | 0.649321 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.