hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5c122719417b141746298621cd97a233ace933af | 1,029 | py | Python | main.py | marcotessarotto/learnslo | 51bcb75364353f4ae26f33fc613555751c2fa310 | [
"MIT"
] | 1 | 2020-07-08T20:03:10.000Z | 2020-07-08T20:03:10.000Z | main.py | marcotessarotto/learnslo | 51bcb75364353f4ae26f33fc613555751c2fa310 | [
"MIT"
] | null | null | null | main.py | marcotessarotto/learnslo | 51bcb75364353f4ae26f33fc613555751c2fa310 | [
"MIT"
] | null | null | null | import enota1
import enota2
import enota3
import enota4
import enota5
import enota6
import extra
import numbers
import time
import verbs
while 1:
print("a: enota 1")
print("b: enota 2")
# print("c: enota 3")
# print("d: enota 4")
print("e: enota 5")
print("f: enota 6")
print("g: extra")
... | 19.415094 | 41 | 0.515063 |
5c99d478d02da12fef57504dad618519a2d12085 | 3,776 | py | Python | eggdriver/resources/math/linear/__init__.py | PythonForChange/eggdriver | bcf1da6dcb2a8daf3144c7af8d1d04f8844be2fc | [
"MIT"
] | 3 | 2021-09-25T01:22:31.000Z | 2021-11-28T23:25:46.000Z | eggdriver/resources/math/linear/__init__.py | PythonForChange/eggdriver | bcf1da6dcb2a8daf3144c7af8d1d04f8844be2fc | [
"MIT"
] | null | null | null | eggdriver/resources/math/linear/__init__.py | PythonForChange/eggdriver | bcf1da6dcb2a8daf3144c7af8d1d04f8844be2fc | [
"MIT"
] | null | null | null | from eggdriver.resources.structures.lists import List
from eggdriver.resources.utils import indexes
from eggdriver.resources.math.linear.utils import *
class Vector(List):
def __init__(self, vanillaList = []):
if type(vanillaList) == str:
temp = vanillaList.replace("[", "").replace("]", "")
... | 29.968254 | 93 | 0.516949 |
fbfac94a988e33c2d42c8cfcfb4f246884878f37 | 1,074 | py | Python | PfamScripts/adda/lib/testComponents.py | ankitskvmdam/rfam-website | 5b200ab64fa7c70778c991f239b8ddb11dce4ed5 | [
"Apache-2.0"
] | 6 | 2017-01-25T12:53:23.000Z | 2021-03-17T04:52:35.000Z | PfamScripts/adda/lib/testComponents.py | ankitskvmdam/rfam-website | 5b200ab64fa7c70778c991f239b8ddb11dce4ed5 | [
"Apache-2.0"
] | 50 | 2015-11-06T10:31:46.000Z | 2021-12-03T16:17:28.000Z | PfamScripts/adda/lib/testComponents.py | ankitskvmdam/rfam-website | 5b200ab64fa7c70778c991f239b8ddb11dce4ed5 | [
"Apache-2.0"
] | 2 | 2019-05-30T00:10:26.000Z | 2021-04-12T09:42:17.000Z | import unittest, os, glob, re, tempfile, gzip
from Components import *
class MyTest:
links = ( ( 1, 2),
( 1, 3),
( 2, 3),
( 3, 3),
( 4, 5),
( 5, 6),
)
class TestIComponents(unittest.TestCase, MyTest):
def testAdd( self ):
... | 28.263158 | 81 | 0.511173 |
dab08f82a6395386161ee5e87a91e8d671e0314f | 1,700 | py | Python | scripts/find_max_seq_length.py | stianste/BERT-NLI | 7d23c9e8704435ba9f673e66ff4b3eb181671782 | [
"MIT"
] | 4 | 2020-02-17T14:19:48.000Z | 2020-09-15T12:38:24.000Z | scripts/find_max_seq_length.py | stianste/BERT-NLI | 7d23c9e8704435ba9f673e66ff4b3eb181671782 | [
"MIT"
] | null | null | null | scripts/find_max_seq_length.py | stianste/BERT-NLI | 7d23c9e8704435ba9f673e66ff4b3eb181671782 | [
"MIT"
] | null | null | null | import os
from pytorch_pretrained_bert.tokenization import BertTokenizer
def get_toefl_token_sizes():
token_sizes = []
full_path = './data/NLI-shared-task-2017/data/essays/train/original/'
for filename in os.listdir(full_path):
with open(os.path.join(full_path, filename), 'r') as f:
te... | 35.416667 | 82 | 0.668824 |
f8e81a70cebb983f178e00feda1e4950123465ed | 20 | py | Python | mpy/t2.py | jeelabs/monty | add6da22dd446cda5e93e023e90520cfdb3fc712 | [
"Unlicense"
] | 11 | 2021-02-02T02:32:50.000Z | 2021-12-30T12:55:41.000Z | mpy/t2.py | jeelabs/monty | add6da22dd446cda5e93e023e90520cfdb3fc712 | [
"Unlicense"
] | 75 | 2021-01-27T10:53:10.000Z | 2021-06-30T10:59:49.000Z | mpy/t2.py | jeelabs/monty | add6da22dd446cda5e93e023e90520cfdb3fc712 | [
"Unlicense"
] | 1 | 2021-09-25T11:18:38.000Z | 2021-09-25T11:18:38.000Z | assert 42 == 40 + 2
| 10 | 19 | 0.55 |
ff50631f5e741e658bc8b61ee58460d6f64f810f | 386 | py | Python | ocean_lib/models/order.py | LinuxIsCool/ocean.py | da44b96620f5e941583e26e772bbebb3813740dc | [
"Apache-2.0"
] | 89 | 2020-10-27T08:50:47.000Z | 2022-03-21T08:42:23.000Z | ocean_lib/models/order.py | LinuxIsCool/ocean.py | da44b96620f5e941583e26e772bbebb3813740dc | [
"Apache-2.0"
] | 480 | 2020-10-30T07:56:39.000Z | 2022-03-31T20:01:27.000Z | ocean_lib/models/order.py | LinuxIsCool/ocean.py | da44b96620f5e941583e26e772bbebb3813740dc | [
"Apache-2.0"
] | 50 | 2020-11-07T15:01:02.000Z | 2022-03-06T05:49:54.000Z | #
# Copyright 2021 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
"""
Defines namedtuple `Order`
"""
from collections import namedtuple
Order = namedtuple(
"Order",
(
"datatoken",
"amount",
"timestamp",
"transactionId",
"did",
"payer",
... | 15.44 | 42 | 0.546632 |
8bf295f961664614f7d9d6895618772f77aeba80 | 2,841 | py | Python | app/core/tests/test_models.py | DamienPond001/recipe-app-api | 586aa3c37175ef6628da4971120880d2c3c2bae2 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | DamienPond001/recipe-app-api | 586aa3c37175ef6628da4971120880d2c3c2bae2 | [
"MIT"
] | 2 | 2020-08-31T09:25:54.000Z | 2020-08-31T10:30:17.000Z | app/core/tests/test_models.py | DamienPond001/recipe-app-api | 586aa3c37175ef6628da4971120880d2c3c2bae2 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
# note that we can import the User Model directly, but if we ever change our
# user model then we would have to change it everywhere instead of just in the
# settings
from core import models
def sample_us... | 27.317308 | 78 | 0.632172 |
2c414102d448219ba288b3542fc794484e0e623a | 2,105 | py | Python | tests/conftest.py | rnag/wystia | dfe21764a54d2737814157072c3262aa7b1cec7d | [
"MIT"
] | 1 | 2022-02-02T21:22:20.000Z | 2022-02-02T21:22:20.000Z | tests/conftest.py | rnag/wystia | dfe21764a54d2737814157072c3262aa7b1cec7d | [
"MIT"
] | 9 | 2021-06-17T15:11:31.000Z | 2021-12-01T18:49:13.000Z | tests/conftest.py | rnag/wystia | dfe21764a54d2737814157072c3262aa7b1cec7d | [
"MIT"
] | null | null | null | """
Common test fixtures and utilities
"""
import sys
from typing import Union, List
import pytest
from wystia.utils.parse import as_list
# Check if system Python version is 3.6 or greater
PY36 = sys.version_info[0:2] >= (3, 6)
@pytest.fixture(scope='session')
def mock_video_id():
"""Returns a dummy hashed vi... | 26.3125 | 79 | 0.674109 |
4c235d43a8c2da49d22fbe7ee99e7c3153b1c737 | 5,457 | py | Python | pages/migrations/0006_auto_20160403_1849.py | DonaldTrumpHasTinyHands/tiny_hands_pac | 3d7e5daeddbee218cb96f3b88c7c7010620225fd | [
"MIT"
] | null | null | null | pages/migrations/0006_auto_20160403_1849.py | DonaldTrumpHasTinyHands/tiny_hands_pac | 3d7e5daeddbee218cb96f3b88c7c7010620225fd | [
"MIT"
] | null | null | null | pages/migrations/0006_auto_20160403_1849.py | DonaldTrumpHasTinyHands/tiny_hands_pac | 3d7e5daeddbee218cb96f3b88c7c7010620225fd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-03 18:49
from __future__ import unicode_literals
from django.db import migrations
import wagtail.wagtailcore.blocks
import wagtail.wagtailcore.fields
import wagtail.wagtailimages.blocks
class Migration(migrations.Migration):
dependencies = [
... | 227.375 | 4,963 | 0.757009 |
8d1dd91bd2560dc42815f22209c871ecf6222fbb | 610 | py | Python | my_app/blog/migrations/0018_orderitem_user.py | Faisal-Sey/official1 | 49af7a9fd60c980bd5d4ef7075a4c1f27ecc9642 | [
"MIT"
] | 1 | 2021-06-19T00:17:02.000Z | 2021-06-19T00:17:02.000Z | my_app/blog/migrations/0018_orderitem_user.py | Faisal-Sey/official1 | 49af7a9fd60c980bd5d4ef7075a4c1f27ecc9642 | [
"MIT"
] | null | null | null | my_app/blog/migrations/0018_orderitem_user.py | Faisal-Sey/official1 | 49af7a9fd60c980bd5d4ef7075a4c1f27ecc9642 | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-09-13 13:12
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('blog', '0017_remove_orderi... | 26.521739 | 108 | 0.662295 |
297a903034b6135b8efcd813cc32876f6222d8ca | 5,606 | py | Python | colour/plotting/characterisation.py | OmarWagih1/colour | bdc880a2783ff523dafb19f1233212dd03a639bd | [
"BSD-3-Clause"
] | null | null | null | colour/plotting/characterisation.py | OmarWagih1/colour | bdc880a2783ff523dafb19f1233212dd03a639bd | [
"BSD-3-Clause"
] | null | null | null | colour/plotting/characterisation.py | OmarWagih1/colour | bdc880a2783ff523dafb19f1233212dd03a639bd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Characterisation Plotting
=========================
Defines the characterisation plotting objects:
- :func:`colour.plotting.plot_single_colour_checker`
- :func:`colour.plotting.plot_multi_colour_checkers`
"""
from __future__ import division
import numpy as np
from colour.models impo... | 29.505263 | 79 | 0.631645 |
1a426fa85fbb0da0e3f52629b19b56809eaa7ac4 | 1,095 | py | Python | detkit/_functions/_utilities.py | ameli/detkit | 54a1d5116e668f18be57954ba012f6061044668e | [
"BSD-3-Clause"
] | null | null | null | detkit/_functions/_utilities.py | ameli/detkit | 54a1d5116e668f18be57954ba012f6061044668e | [
"BSD-3-Clause"
] | null | null | null | detkit/_functions/_utilities.py | ameli/detkit | 54a1d5116e668f18be57954ba012f6061044668e | [
"BSD-3-Clause"
] | null | null | null | # SPDX-FileCopyrightText: Copyright 2022, Siavash Ameli <sameli@berkeley.edu>
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileType: SOURCE
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the license found in the LICENSE.txt file in the root directory
# of this source ... | 29.594595 | 79 | 0.627397 |
e93d1d3d0a7895c4a2339c2299da650174e01248 | 10,262 | py | Python | Tests/test_mmtf.py | JJTimmons/biopython | 3d96ed0c9047ec0e7987000e6e99d800c515db41 | [
"BSD-3-Clause"
] | 2 | 2019-10-25T18:20:34.000Z | 2019-10-28T15:26:40.000Z | Tests/test_mmtf.py | JJTimmons/biopython | 3d96ed0c9047ec0e7987000e6e99d800c515db41 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_mmtf.py | JJTimmons/biopython | 3d96ed0c9047ec0e7987000e6e99d800c515db41 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 by Anthony Bradley. All rights reserved.
# Revisions copyright 2017 by Peter Cock. All rights reserved.
# Revisions copyright 2019 by Joe Greener. All rights reserved.
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-C... | 47.073394 | 140 | 0.648996 |
d3a8d5cb02d1ab160477ab17bcf2396de3735364 | 2,045 | py | Python | AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_encode_basestring_ascii.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_encode_basestring_ascii.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_encode_basestring_ascii.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | from collections import OrderedDict
from json.tests import PyTest, CTest
CASES = [
(u'/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?"'),
(u'\u0123\u4567\u89ab\ucd... | 48.690476 | 200 | 0.533496 |
c9fe9bdb7707abdcda691279d580c36aff6dcff0 | 1,815 | py | Python | Python/DigitalClock.py | Swarga-codes/Hacktoberfest-Projects | ad58b81908c48a9b80d7aa3c29ba6be448028435 | [
"Apache-2.0"
] | 30 | 2020-10-07T09:16:29.000Z | 2020-10-19T06:50:37.000Z | Python/DigitalClock.py | Swarga-codes/Hacktoberfest-Projects | ad58b81908c48a9b80d7aa3c29ba6be448028435 | [
"Apache-2.0"
] | 70 | 2020-10-07T03:26:13.000Z | 2020-10-25T06:58:07.000Z | Python/DigitalClock.py | Swarga-codes/Hacktoberfest-Projects | ad58b81908c48a9b80d7aa3c29ba6be448028435 | [
"Apache-2.0"
] | 280 | 2020-10-07T03:39:21.000Z | 2020-10-25T07:16:33.000Z | #import all useful module in the program
from tkinter import *
import datetime
import time
# Create a window by using the Tkinter
root = Tk()
# write the Heading on the window
root.title('Digital Clock By HS')
# geomerty of the window
root.geometry('500x300')
# fixed the window
root.resizable(0,0)
# set the colour o... | 40.333333 | 114 | 0.672727 |
22675bb9b82a59f177213da7e0c2ac38b277a68e | 7,965 | py | Python | test/functional/rpc_net.py | SkateFish/Auroracoin | 89d83a0c2980f9eff337c4e9743dc7f0181a78a1 | [
"MIT"
] | 35 | 2016-03-14T02:24:46.000Z | 2021-08-12T16:19:19.000Z | test/functional/rpc_net.py | SkateFish/Auroracoin | 89d83a0c2980f9eff337c4e9743dc7f0181a78a1 | [
"MIT"
] | 40 | 2016-03-11T20:21:12.000Z | 2022-03-29T11:07:54.000Z | test/functional/rpc_net.py | SkateFish/Auroracoin | 89d83a0c2980f9eff337c4e9743dc7f0181a78a1 | [
"MIT"
] | 34 | 2016-03-10T13:31:43.000Z | 2022-01-01T06:05:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC calls related to net.
Tests correspond... | 44.497207 | 134 | 0.684997 |
fdeed698d8cb0b5d1d67cc97daee6a8fad604a47 | 72 | py | Python | python/tests/__main__.py | duijf/boilerplates | a0aecb0de2c2a3f77ae8eeab1a030f4abc38959f | [
"MIT"
] | null | null | null | python/tests/__main__.py | duijf/boilerplates | a0aecb0de2c2a3f77ae8eeab1a030f4abc38959f | [
"MIT"
] | null | null | null | python/tests/__main__.py | duijf/boilerplates | a0aecb0de2c2a3f77ae8eeab1a030f4abc38959f | [
"MIT"
] | null | null | null | import subprocess
import sys
subprocess.run(["pytest"] + sys.argv[1:])
| 14.4 | 41 | 0.722222 |
426153b57c3250c93436936de2fd0a7bc5085673 | 2,332 | py | Python | docs/source/conf.py | caubut-charter/matter-rpi4-nRF52840-dongle | a07de857bc86461d7d396092989fe92c83d03332 | [
"CC0-1.0"
] | 3 | 2021-09-21T19:48:54.000Z | 2021-11-03T22:56:33.000Z | docs/source/conf.py | caubut-charter/matter-rpi4-nRF52840-dongle | a07de857bc86461d7d396092989fe92c83d03332 | [
"CC0-1.0"
] | 8 | 2021-12-28T18:15:59.000Z | 2022-03-28T18:05:28.000Z | docs/source/conf.py | caubut-charter/matter-rpi4-nRF52840-dongle | a07de857bc86461d7d396092989fe92c83d03332 | [
"CC0-1.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.388889 | 79 | 0.677959 |
e6a27c1548a0492ffe890cd66faf51659b62f9ca | 110 | py | Python | wrappers/serial/visibility/visibility_fitting.py | ChrisHad/algorithm-reference-library | bded1b62ea801ea4f4f5bd0794c18cd81d4b2810 | [
"Apache-2.0"
] | 22 | 2016-12-14T11:20:07.000Z | 2021-08-13T15:23:41.000Z | wrappers/serial/visibility/visibility_fitting.py | ChrisHad/algorithm-reference-library | bded1b62ea801ea4f4f5bd0794c18cd81d4b2810 | [
"Apache-2.0"
] | 30 | 2017-06-27T09:15:38.000Z | 2020-09-11T18:16:37.000Z | wrappers/serial/visibility/visibility_fitting.py | ChrisHad/algorithm-reference-library | bded1b62ea801ea4f4f5bd0794c18cd81d4b2810 | [
"Apache-2.0"
] | 20 | 2017-07-02T03:45:49.000Z | 2019-12-11T17:19:01.000Z | """ Visibility operations
"""
from processing_components.visibility.visibility_fitting import fit_visibility | 22 | 78 | 0.845455 |
3532e6f7fa09d85bf5dc3c62b258e86b3286c220 | 979 | py | Python | extensions/vue_backend/object_properties.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | extensions/vue_backend/object_properties.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | 14 | 2020-09-30T21:16:46.000Z | 2021-11-08T18:54:34.000Z | extensions/vue_backend/object_properties.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | 1 | 2020-09-17T12:48:57.000Z | 2020-09-17T12:48:57.000Z | # This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Version 2... | 32.633333 | 112 | 0.743616 |
5b4a69fc6381458174fdce418c24e619418e49e8 | 275 | py | Python | gpytorch/likelihoods/__init__.py | imsrgadich/gpytorch | 6d312392515599e5b79735c8fa3174c1a2a7e698 | [
"MIT"
] | 1 | 2018-05-30T07:32:29.000Z | 2018-05-30T07:32:29.000Z | gpytorch/likelihoods/__init__.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | null | null | null | gpytorch/likelihoods/__init__.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | null | null | null | from .likelihood import Likelihood
from .gaussian_likelihood import GaussianLikelihood
from .bernoulli_likelihood import BernoulliLikelihood
from .softmax_likelihood import SoftmaxLikelihood
__all__ = [Likelihood, GaussianLikelihood, BernoulliLikelihood, SoftmaxLikelihood]
| 39.285714 | 82 | 0.88 |
6400aabbbd279439e7d27b8d6a59c18eb7fab3e2 | 49,260 | py | Python | src/sage/plot/plot3d/plot3d.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | null | null | null | src/sage/plot/plot3d/plot3d.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | null | null | null | src/sage/plot/plot3d/plot3d.py | rekhabiswal/sage | e8633b09919542a65e7e990c8369fee30c7edefd | [
"BSL-1.0"
] | null | null | null | r"""
Plotting Functions
EXAMPLES::
sage: x, y = var('x y')
sage: W = plot3d(sin(pi*((x)^2+(y)^2))/2,(x,-1,1),(y,-1,1), frame=False, color='purple', opacity=0.8)
sage: S = sphere((0,0,0),size=0.3, color='red', aspect_ratio=[1,1,1])
sage: show(W + S, figsize=8)
.. PLOT::
x, y = var('x y')
W =... | 34.960965 | 192 | 0.571681 |
3e10e8db537a09b44ad846eb57b462f43a068618 | 1,630 | py | Python | src/programy/config/section.py | cdoebler1/AIML2 | ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a | [
"MIT"
] | 345 | 2016-11-23T22:37:04.000Z | 2022-03-30T20:44:44.000Z | src/programy/config/section.py | MikeyBeez/program-y | 00d7a0c7d50062f18f0ab6f4a041068e119ef7f0 | [
"MIT"
] | 275 | 2016-12-07T10:30:28.000Z | 2022-02-08T21:28:33.000Z | src/programy/config/section.py | VProgramMist/modified-program-y | f32efcafafd773683b3fe30054d5485fe9002b7d | [
"MIT"
] | 159 | 2016-11-28T18:59:30.000Z | 2022-03-20T18:02:44.000Z | """
Copyright (c) 2016-2020 Keith Sterling http://www.keithsterling.com
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, m... | 49.393939 | 120 | 0.784049 |
1c9f78ae39288f25d8ddd3d379f6ef60bde15620 | 1,143 | py | Python | numpy/_pyinstaller/pyinstaller-smoke.py | sukritingupta/numpy | 2c44c93164c274a5865799eefd3e401effa948a9 | [
"BSD-3-Clause"
] | 1 | 2022-02-24T10:16:43.000Z | 2022-02-24T10:16:43.000Z | numpy/_pyinstaller/pyinstaller-smoke.py | sukritingupta/numpy | 2c44c93164c274a5865799eefd3e401effa948a9 | [
"BSD-3-Clause"
] | 8 | 2021-10-07T10:59:49.000Z | 2021-11-22T20:06:49.000Z | numpy/_pyinstaller/pyinstaller-smoke.py | sukritingupta/numpy | 2c44c93164c274a5865799eefd3e401effa948a9 | [
"BSD-3-Clause"
] | 1 | 2022-03-22T11:47:01.000Z | 2022-03-22T11:47:01.000Z | """A crude *bit of everything* smoke test to verify PyInstaller compatibility.
PyInstaller typically goes wrong by forgetting to package modules, extension
modules or shared libraries. This script should aim to touch as many of those
as possible in an attempt to trip a ModuleNotFoundError or a DLL load failure
due to ... | 34.636364 | 79 | 0.747157 |
da13727c369b97ce81c6e4727264690d11f5f7e2 | 3,709 | py | Python | ontask/models/sqlconnection.py | pinheiroo27/ontask_b | 23fee8caf4e1c5694a710a77f3004ca5d9effeac | [
"MIT"
] | 33 | 2017-12-02T04:09:24.000Z | 2021-11-07T08:41:57.000Z | ontask/models/sqlconnection.py | pinheiroo27/ontask_b | 23fee8caf4e1c5694a710a77f3004ca5d9effeac | [
"MIT"
] | 189 | 2017-11-16T04:06:29.000Z | 2022-03-11T23:35:59.000Z | ontask/models/sqlconnection.py | pinheiroo27/ontask_b | 23fee8caf4e1c5694a710a77f3004ca5d9effeac | [
"MIT"
] | 30 | 2017-11-30T03:35:44.000Z | 2022-01-31T03:08:08.000Z | # -*- coding: utf-8 -*-
"""SQL Connection model."""
from typing import Dict
from django.db import models
from django.utils.translation import ugettext_lazy as _
from fernet_fields import EncryptedCharField
from ontask.models.common import CHAR_FIELD_LONG_SIZE
from ontask.models.connection import Connection
from onta... | 28.530769 | 79 | 0.634672 |
f39523e25a10afef4607dc63ed5f5dff5384d17e | 1,878 | py | Python | nurses_2/widgets/particle_field/graphic_field.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 171 | 2021-06-23T15:29:15.000Z | 2022-03-25T18:53:10.000Z | nurses_2/widgets/particle_field/graphic_field.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 1 | 2022-01-07T05:08:35.000Z | 2022-01-10T04:53:57.000Z | nurses_2/widgets/particle_field/graphic_field.py | salt-die/nurses_2 | 29b76c34b9a28bf7c115998f4e81979966c82df0 | [
"MIT"
] | 3 | 2021-10-01T09:12:15.000Z | 2022-01-14T21:31:11.000Z | import numpy as np
from ...colors import AColor, TRANSPARENT
from ._field_base import _ParticleFieldBase, _ParticleBase
class GraphicParticleField(_ParticleFieldBase):
"""
A widget that only has GraphicParticle children.
"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
se... | 30.290323 | 88 | 0.576145 |
27f6c18c352982155d8539ba7288377e287e6357 | 5,791 | py | Python | resnet-test.py | KellyHwong/Amiya-Is-Not-Donkey | 398fea3282436d2222c409e3fafed7c786db3ea3 | [
"MIT"
] | null | null | null | resnet-test.py | KellyHwong/Amiya-Is-Not-Donkey | 398fea3282436d2222c409e3fafed7c786db3ea3 | [
"MIT"
] | null | null | null | resnet-test.py | KellyHwong/Amiya-Is-Not-Donkey | 398fea3282436d2222c409e3fafed7c786db3ea3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : Feb-03-20 23:44
# @Author : Your Name (you@example.org)
# @Link : https://www.kaggle.com/c/semi-conductor-image-classification-first
import os
import random
import numpy as np
import pandas as pd
from keras.optimizers import Adam
from keras.cal... | 31.994475 | 201 | 0.632533 |
5db442deca04960d77f919ff0276820c81d2d4b1 | 14,529 | py | Python | sdk/python/pulumi_azure_native/datashare/v20181101preview/kusto_cluster_data_set_mapping.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/datashare/v20181101preview/kusto_cluster_data_set_mapping.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/datashare/v20181101preview/kusto_cluster_data_set_mapping.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 45.121118 | 973 | 0.663501 |
649f699e655314525445c397ff96dc397a1897f6 | 4,192 | py | Python | api/managers/auth.py | aarongrisez/bellga.me2API | 324fe95f455f2c8053473202f294a0f1d100305b | [
"MIT"
] | null | null | null | api/managers/auth.py | aarongrisez/bellga.me2API | 324fe95f455f2c8053473202f294a0f1d100305b | [
"MIT"
] | null | null | null | api/managers/auth.py | aarongrisez/bellga.me2API | 324fe95f455f2c8053473202f294a0f1d100305b | [
"MIT"
] | null | null | null | from fastapi import Request
from functools import wraps
from api.config.settings import settings
from api.exceptions.auth import AuthError
from six.moves.urllib.request import urlopen
import json
from jose import jwt
import time
def get_token_auth_header(request: Request):
"""Obtains the access token from the Auth... | 41.92 | 141 | 0.505487 |
a931af27f78593eb5b28a7399dbc764809df83d0 | 456 | py | Python | src/widgets/food.py | oDallas/Snaky | 895ba053f7be150cc6c99ae5aaa7cb31bce46f9c | [
"MIT"
] | null | null | null | src/widgets/food.py | oDallas/Snaky | 895ba053f7be150cc6c99ae5aaa7cb31bce46f9c | [
"MIT"
] | null | null | null | src/widgets/food.py | oDallas/Snaky | 895ba053f7be150cc6c99ae5aaa7cb31bce46f9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from curses import color_pair
from random import randint
from src.conf import MAX_Y, MAX_X
__all__ = ['Food']
class Food:
def __init__(self, window):
self.coor = (randint(1, MAX_Y), randint(1, MAX_X))
self.window = window
def render(self):
... | 21.714286 | 58 | 0.629386 |
e4d57014b32d4386661955821a0c8d13b611dd37 | 2,502 | py | Python | zoomus/components/report.py | peerlearning/zoomus | 471b6a4338f4ce6f44249bafae177f2514a9b672 | [
"Apache-2.0"
] | 1 | 2021-08-19T11:07:06.000Z | 2021-08-19T11:07:06.000Z | zoomus/components/report.py | avantifellows/zoomus | 471b6a4338f4ce6f44249bafae177f2514a9b672 | [
"Apache-2.0"
] | null | null | null | zoomus/components/report.py | avantifellows/zoomus | 471b6a4338f4ce6f44249bafae177f2514a9b672 | [
"Apache-2.0"
] | 1 | 2021-08-19T11:07:05.000Z | 2021-08-19T11:07:05.000Z | """Zoom.us REST API Python Client -- Report component"""
from __future__ import absolute_import
from zoomus import util
from zoomus.components import base
class ReportComponent(base.BaseComponent):
"""Component dealing with all report related matters"""
def get_account_report(self, **kwargs):
util.... | 39.09375 | 94 | 0.654277 |
04d99f8f21bfca4fd3a4c910d45914d28181eab8 | 2,722 | py | Python | mercado_livre_corrigido.py | farofaDeCachorro/myprojects | 607a97f3fe273e6f41fef43da13f47d38632c8ac | [
"CC0-1.0"
] | null | null | null | mercado_livre_corrigido.py | farofaDeCachorro/myprojects | 607a97f3fe273e6f41fef43da13f47d38632c8ac | [
"CC0-1.0"
] | null | null | null | mercado_livre_corrigido.py | farofaDeCachorro/myprojects | 607a97f3fe273e6f41fef43da13f47d38632c8ac | [
"CC0-1.0"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import sys
def pega_items(caixa_produto):
# para cada div produto achado ele faz isso:
for produtos_achados in caixa_produto:
# aqui pega os atributos desejados dos seguintes items
produto_descricao = produtos_achados.find('h2', class_='ui-search-item__ti... | 43.903226 | 140 | 0.695077 |
a67a97e84cf9a9b7c24df9e017f29cfee1a118d8 | 1,133 | py | Python | test/test_timesheet_config.py | MPW1412/kimai-python | 7c89b0866b85fbc4b1092b30eca21f1be48db533 | [
"MIT"
] | 6 | 2019-12-19T16:01:58.000Z | 2022-01-19T18:10:16.000Z | test/test_timesheet_config.py | MPW1412/kimai-python | 7c89b0866b85fbc4b1092b30eca21f1be48db533 | [
"MIT"
] | 4 | 2020-05-16T23:33:15.000Z | 2021-07-06T20:53:32.000Z | test/test_timesheet_config.py | MPW1412/kimai-python | 7c89b0866b85fbc4b1092b30eca21f1be48db533 | [
"MIT"
] | 3 | 2020-05-16T23:14:13.000Z | 2021-06-30T08:53:11.000Z | # coding: utf-8
"""
Kimai 2 - API Docs
JSON API for the Kimai 2 time-tracking software. Read more about its usage in the [API documentation](https://www.kimai.org/documentation/rest-api.html) and then download a [Swagger file](doc.json) for import e.g. in Postman. Be aware: it is not yet considered stable and... | 27.634146 | 314 | 0.714034 |
bd29173e3815e232d49ae2d26396e15bbfd8b5f0 | 1,960 | py | Python | telstar/tests/sqlalchemy_test_consumer.py | Bitspark/telstar | aec3b6b54eb3869fa60e6e3b3066692b1493d37a | [
"MIT"
] | 5 | 2019-06-20T13:55:11.000Z | 2020-10-26T08:55:15.000Z | telstar/tests/sqlalchemy_test_consumer.py | Bitspark/telstar | aec3b6b54eb3869fa60e6e3b3066692b1493d37a | [
"MIT"
] | 146 | 2019-06-23T14:12:51.000Z | 2021-02-01T05:04:18.000Z | telstar/tests/sqlalchemy_test_consumer.py | Bitspark/telstar | aec3b6b54eb3869fa60e6e3b3066692b1493d37a | [
"MIT"
] | 1 | 2019-06-21T18:39:19.000Z | 2019-06-21T18:39:19.000Z | import logging
import os
import random
import sys
from time import sleep
import pymysql
import redis
from sqlalchemy import BIGINT, Column, String, UniqueConstraint, create_engine
from sqlalchemy.orm import sessionmaker
from telstar import config as tlconfig
from telstar.com import Message
from telstar.com.sqla impor... | 30.153846 | 107 | 0.688265 |
fa532060734080ef929cd591258d37af09354c0b | 25,236 | py | Python | src/ms_io.py | statisticalbiotechnology/specpride | 6240dfbb1fcf5df0115512c604f5dc37a003355a | [
"Apache-2.0"
] | 2 | 2020-01-14T12:02:52.000Z | 2020-01-14T14:03:30.000Z | src/ms_io.py | ypriverol/specpride | 9fe9101bd6bb04592aa8f020f93a75ae3a306b26 | [
"Apache-2.0"
] | 5 | 2019-12-09T10:59:10.000Z | 2020-01-16T14:32:00.000Z | src/ms_io.py | statisticalbiotechnology/specpride | 6240dfbb1fcf5df0115512c604f5dc37a003355a | [
"Apache-2.0"
] | 9 | 2020-01-14T12:26:54.000Z | 2020-01-16T08:26:06.000Z | import logging
import os
from typing import Dict, Iterable, List
import numpy as np
import pandas as pd
import pyopenms
import pyteomics.mgf
import pyteomics.mzid
import pyteomics.mzml
import pyteomics.mztab
import pyteomics.mzxml
import spectrum_utils.spectrum as sus
import tqdm
from lxml.etree import LxmlError
log... | 35.493671 | 79 | 0.567404 |
5368ee664fdde6b058f1b67afecf4c5e43f2a303 | 4,028 | py | Python | test/AS/ASPP.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | 1 | 2019-09-18T06:37:02.000Z | 2019-09-18T06:37:02.000Z | test/AS/ASPP.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | test/AS/ASPP.py | EmanueleCannizzaro/scons | 6baa4e65cdf4df6951473545b69435711864e509 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | 24.864198 | 89 | 0.6286 |
795de5c2c8f8b6840e76a6854597b84a6ab81389 | 28,471 | py | Python | reviewboard/accounts/models.py | grimmy/reviewboard | ca673e1ba77985a5dc1f3261595ba0389b48e093 | [
"MIT"
] | 921 | 2015-01-01T15:26:28.000Z | 2022-03-29T11:30:38.000Z | reviewboard/accounts/models.py | grimmy/reviewboard | ca673e1ba77985a5dc1f3261595ba0389b48e093 | [
"MIT"
] | 5 | 2015-03-17T18:57:47.000Z | 2020-10-02T13:24:31.000Z | reviewboard/accounts/models.py | grimmy/reviewboard | ca673e1ba77985a5dc1f3261595ba0389b48e093 | [
"MIT"
] | 285 | 2015-01-12T06:24:36.000Z | 2022-03-29T11:03:50.000Z | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Q
from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from django.utils import timezone
from django.utils.encoding import python_2_unicode_comp... | 37.216993 | 79 | 0.661059 |
07e74546fd1a9510b23d6fb67349009e7a6ab9b2 | 8,370 | py | Python | africanus/model/spectral/spec_model.py | JoshVStaden/codex-africanus | 4a38994431d51510b1749fa0e4b8b6190b8b530f | [
"BSD-3-Clause"
] | 13 | 2018-04-06T09:36:13.000Z | 2021-04-13T13:11:00.000Z | africanus/model/spectral/spec_model.py | JoshVStaden/codex-africanus | 4a38994431d51510b1749fa0e4b8b6190b8b530f | [
"BSD-3-Clause"
] | 153 | 2018-03-28T14:13:48.000Z | 2022-02-03T07:49:17.000Z | africanus/model/spectral/spec_model.py | JoshVStaden/codex-africanus | 4a38994431d51510b1749fa0e4b8b6190b8b530f | [
"BSD-3-Clause"
] | 14 | 2018-03-29T13:30:52.000Z | 2021-06-12T02:56:55.000Z | # -*- coding: utf-8 -*-
from numba import types
import numpy as np
from africanus.util.numba import generated_jit, njit
from africanus.util.docs import DocstringTemplate
def numpy_spectral_model(stokes, spi, ref_freq, frequency, base):
out_shape = (stokes.shape[0], frequency.shape[0]) + stokes.shape[1:]
#... | 31.348315 | 79 | 0.54767 |
923c98f77c231b2987a3c96c10d1deaffc30960c | 3,668 | py | Python | main.py | joelouismarino/variational_rl | 11dc14bfb56f3ebbfccd5de206b78712a8039a9a | [
"MIT"
] | 15 | 2020-10-20T22:09:36.000Z | 2021-12-24T13:40:36.000Z | main.py | joelouismarino/variational_rl | 11dc14bfb56f3ebbfccd5de206b78712a8039a9a | [
"MIT"
] | null | null | null | main.py | joelouismarino/variational_rl | 11dc14bfb56f3ebbfccd5de206b78712a8039a9a | [
"MIT"
] | 1 | 2020-10-23T19:48:06.000Z | 2020-10-23T19:48:06.000Z | from comet_ml import Experiment
import argparse
import torch
import numpy as np
from distutils.util import strtobool
from util.env_util import create_env
from lib import create_agent
from misc.buffer import Buffer
from misc.optimizer import Optimizer
from util.plot_util import Plotter
from util.train_util import train
... | 53.15942 | 137 | 0.751908 |
b4faae8807f418cc618807e2aa1b126a245bbf62 | 242 | py | Python | Python/Warmup-1/missing_char.py | LucasHenrique-dev/exerc-cios-codingbat | ff92db10387757b9a2e3f72be6b7e51824b1ffa6 | [
"MIT"
] | 2 | 2020-12-09T13:36:44.000Z | 2021-08-16T01:17:16.000Z | Python/Warmup-1/missing_char.py | LucasHenrique-dev/exerc-cios-codingbat | ff92db10387757b9a2e3f72be6b7e51824b1ffa6 | [
"MIT"
] | null | null | null | Python/Warmup-1/missing_char.py | LucasHenrique-dev/exerc-cios-codingbat | ff92db10387757b9a2e3f72be6b7e51824b1ffa6 | [
"MIT"
] | null | null | null | """
Dado uma String "str", retorne uma nova onde será removido o caractere indicado por
"n", cujo valor será um válido (0..length-1, inclusive).
"""
def missing_char(str, n):
return str[:n] + str[n+1:]
print(missing_char("hello", 2))
| 20.166667 | 83 | 0.673554 |
10ab732de504f77e0e5e9a69b58956f01fc4ab1a | 310 | py | Python | scnym/__init__.py | jdasam/scnym | 0b506170f4cb944e498d97ba0e086cbe2a62a18e | [
"Apache-2.0"
] | 45 | 2019-07-30T00:13:47.000Z | 2022-03-23T08:04:19.000Z | scnym/__init__.py | jdasam/scnym | 0b506170f4cb944e498d97ba0e086cbe2a62a18e | [
"Apache-2.0"
] | 10 | 2019-09-25T18:03:01.000Z | 2022-03-05T00:31:41.000Z | scnym/__init__.py | jdasam/scnym | 0b506170f4cb944e498d97ba0e086cbe2a62a18e | [
"Apache-2.0"
] | 3 | 2019-08-13T17:59:39.000Z | 2022-01-20T03:22:42.000Z | __author__ = 'Jacob C. Kimmel, David R. Kelley'
__email__ = 'jacobkimmel+scnym@gmail.com, drk@calicolabs.com'
__version__ = '0.3.1'
# populate the namespace so top level imports work
# e.g.
# >> from scnym.model import CellTypeCLF
from . import api, main, dataprep, interpret, model, predict, trainer, utils
| 31 | 76 | 0.73871 |
2968f8f323c5a870deeb201e4c07ac98f482bf39 | 3,322 | py | Python | kubernetes/client/models/v1_session_affinity_config.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_session_affinity_config.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_session_affinity_config.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 26.15748 | 105 | 0.566827 |
c0a21c7de8ad09fa5830d745068295952314c347 | 520 | py | Python | challenge2and3/bareBones/main.py | miam-miam100/SpaceCadets | 92fe1e66a978436ae3d2ed6b092a9fc550150da3 | [
"MIT"
] | null | null | null | challenge2and3/bareBones/main.py | miam-miam100/SpaceCadets | 92fe1e66a978436ae3d2ed6b092a9fc550150da3 | [
"MIT"
] | null | null | null | challenge2and3/bareBones/main.py | miam-miam100/SpaceCadets | 92fe1e66a978436ae3d2ed6b092a9fc550150da3 | [
"MIT"
] | null | null | null | def multiply(X, Y, Total): # tsd
while X != 0: # d
W = 0 # ds
while Y != 0:
Total += 1
W += 1 # sdfaa
Y -= 1
while W != 0:
Y += 1
W -= 1
X -= 1
return X, Y, Total
nine = 0
three0 = 0
three0 += 1
three0 += 1
three0 ... | 16.774194 | 51 | 0.425 |
87d840d7c74e391005fa87f627262d753a873558 | 1,533 | py | Python | products/migrations/0001_initial.py | josygeorge/django-fullstack-milestone-main-project | 8fbcd3617542a7a0f74ad1afb1b806cc42a493c4 | [
"Unlicense"
] | null | null | null | products/migrations/0001_initial.py | josygeorge/django-fullstack-milestone-main-project | 8fbcd3617542a7a0f74ad1afb1b806cc42a493c4 | [
"Unlicense"
] | null | null | null | products/migrations/0001_initial.py | josygeorge/django-fullstack-milestone-main-project | 8fbcd3617542a7a0f74ad1afb1b806cc42a493c4 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.5 on 2021-08-09 08:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | 40.342105 | 141 | 0.592303 |
23113c2455a331a146ab1d43543f63aa1bda683f | 358 | py | Python | pyspark_base/stats.py | miguelgfierro/pybase | de8e4f11ed5c655e748178e65195c7e70a9c98af | [
"BSD-3-Clause"
] | 14 | 2020-02-07T21:36:39.000Z | 2022-03-12T22:37:04.000Z | pyspark_base/stats.py | miguelgfierro/pybase | de8e4f11ed5c655e748178e65195c7e70a9c98af | [
"BSD-3-Clause"
] | 19 | 2019-05-18T23:58:30.000Z | 2022-01-09T16:45:35.000Z | pyspark_base/stats.py | miguelgfierro/pybase | de8e4f11ed5c655e748178e65195c7e70a9c98af | [
"BSD-3-Clause"
] | 5 | 2020-10-06T06:10:27.000Z | 2021-07-08T12:58:46.000Z | if __name__ == "__main__":
df = spark.createDataFrame([("a", 1), ("a", 2), ("c", 3)], ["letters", "numbers"])
print("(rows, columns)={}".format((df.count(), len(df.columns)))) # (rows, columns)=(3,2)
df.describe().show() # Compute summary statistics
df.distinct().count() # Count the number of distinct r... | 51.142857 | 93 | 0.608939 |
1d21d4c9015419501974331ed495ac27b2d1b9e1 | 12,992 | py | Python | implementations/python/mzlib/backends/json.py | wulongict/mzSpecLib | c42b993e025a9c7a48806daa5919611a8ed5807f | [
"Apache-2.0"
] | null | null | null | implementations/python/mzlib/backends/json.py | wulongict/mzSpecLib | c42b993e025a9c7a48806daa5919611a8ed5807f | [
"Apache-2.0"
] | null | null | null | implementations/python/mzlib/backends/json.py | wulongict/mzSpecLib | c42b993e025a9c7a48806daa5919611a8ed5807f | [
"Apache-2.0"
] | null | null | null | import io
import json
import re
from pathlib import Path
from mzlib.index import MemoryIndex
from mzlib.attributes import AttributeManager
from mzlib.annotation import parse_annotation, IonAnnotationBase
from .base import SpectralLibraryBackendBase, SpectralLibraryWriterBase, FORMAT_VERSION_TERM
LIBRARY_METADATA_K... | 38.324484 | 116 | 0.587208 |
fb2c85a4264b025824dd7ce643b8fc09b59925f8 | 30,318 | py | Python | v0.5.0/google/cloud_v3.8/ssd-tpuv3-8/code/ssd/model/tpu/models/experimental/inception/inception_v3.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-07T18:52:33.000Z | 2019-07-06T12:48:18.000Z | v0.5.0/google/cloud_v3.8/ssd-tpuv3-8/code/ssd/model/tpu/models/experimental/inception/inception_v3.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | v0.5.0/google/cloud_v3.8/ssd-tpuv3-8/code/ssd/model/tpu/models/experimental/inception/inception_v3.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # Copyright 2017 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... | 34.180383 | 85 | 0.694373 |
e048df13cca3702197c4730d8952ba8653a41e53 | 5,736 | py | Python | gedl/IDLGenerator.py | gaps-closure/capo | 894d2f6d291ff79e18c77e0ca7073531147cbee8 | [
"BSD-3-Clause"
] | 1 | 2021-04-20T18:43:44.000Z | 2021-04-20T18:43:44.000Z | gedl/IDLGenerator.py | gaps-closure/capo | 894d2f6d291ff79e18c77e0ca7073531147cbee8 | [
"BSD-3-Clause"
] | 1 | 2021-09-23T14:55:43.000Z | 2021-09-23T18:09:35.000Z | gedl/IDLGenerator.py | gaps-closure/capo | 894d2f6d291ff79e18c77e0ca7073531147cbee8 | [
"BSD-3-Clause"
] | 1 | 2020-05-21T03:12:16.000Z | 2020-05-21T03:12:16.000Z | #!/usr/bin/env python3
import json
import sys
import os
import os.path
import jsonschema
from argparse import ArgumentParser
def argparser():
""" Command Line Argument Parsing"""
parser = ArgumentParser(description='CLOSURE IDL File Generator')
parser.add_argument('-g','--gedl', required=True, type=str, h... | 41.565217 | 119 | 0.572176 |
fadd72fe15de3ac9da40e0c05709e29121a88483 | 5,241 | py | Python | third_party/scons/scons-local/SCons/Warnings.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T15:35:17.000Z | 2016-05-08T15:35:17.000Z | third_party/scons/scons-local/SCons/Warnings.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | null | null | null | third_party/scons/scons-local/SCons/Warnings.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# 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... | 27.87766 | 83 | 0.695287 |
cd95f603f882218aec87c082f14f58343d8b56d2 | 6,306 | py | Python | simple_sound_stream.py | frietz58/WoZ4U | 1b3ff95e010c4c321b9efc88be0181e84622ee4f | [
"MIT"
] | 1 | 2020-10-30T18:14:18.000Z | 2020-10-30T18:14:18.000Z | simple_sound_stream.py | frietz58/WoZ4U | 1b3ff95e010c4c321b9efc88be0181e84622ee4f | [
"MIT"
] | 2 | 2021-01-30T14:47:38.000Z | 2021-07-15T08:47:59.000Z | simple_sound_stream.py | frietz58/WoZ4U | 1b3ff95e010c4c321b9efc88be0181e84622ee4f | [
"MIT"
] | 1 | 2021-07-18T07:09:05.000Z | 2021-07-18T07:09:05.000Z | """
Implements a naoqi ALModule for live streaming of Pepper's microphone to default host default audio output device.
Based on: https://github.com/JBramauer/pepperspeechrecognition/blob/master/module_speechrecognition.py
Author: Finn Rietz
"""
import sounddevice as sd
from sounddevice import PortAudioErr... | 35.627119 | 132 | 0.639391 |
e6ebe8325cabfeda2d87afa237d212a83548bd74 | 2,375 | py | Python | 4 Chiffres/4 chiffres.py | Meltwin/Le-Livre-Scolaire | cc621643ca8c081fbe2582f432cb6c3de6811aa6 | [
"MIT"
] | null | null | null | 4 Chiffres/4 chiffres.py | Meltwin/Le-Livre-Scolaire | cc621643ca8c081fbe2582f432cb6c3de6811aa6 | [
"MIT"
] | null | null | null | 4 Chiffres/4 chiffres.py | Meltwin/Le-Livre-Scolaire | cc621643ca8c081fbe2582f432cb6c3de6811aa6 | [
"MIT"
] | null | null | null | ##########################################
# Functions #
##########################################
# Table de correspondance entre le numéro de la combinaison et sa forme
def returnForme(x):
if (x == 0):
return "abcd"
elif (x == 1):
return 'abc + d'
elif (x == 2... | 40.948276 | 153 | 0.325053 |
44926e6f0fd61740bfe9b2eb0a2077744ef752aa | 13,569 | py | Python | p2p/multiplexer.py | indi-ca/trinity | bbf5a5c7359c499f7ef234845364b4d24337d5c1 | [
"MIT"
] | null | null | null | p2p/multiplexer.py | indi-ca/trinity | bbf5a5c7359c499f7ef234845364b4d24337d5c1 | [
"MIT"
] | null | null | null | p2p/multiplexer.py | indi-ca/trinity | bbf5a5c7359c499f7ef234845364b4d24337d5c1 | [
"MIT"
] | null | null | null | import asyncio
import collections
import time
from typing import (
Any,
AsyncIterator,
cast,
DefaultDict,
Dict,
Optional,
Sequence,
Tuple,
Type,
Union,
)
from cached_property import cached_property
from eth_utils import ValidationError
from eth_utils.toolz import cons
import rl... | 33.9225 | 100 | 0.595106 |
2da19ae957b7bd824dcc1a9f19b3573ce4217676 | 36,525 | py | Python | python/ccxt/coss.py | jknight/ccxt | 02cdef0247435a6c6557faad8a1793d3da67c085 | [
"MIT"
] | null | null | null | python/ccxt/coss.py | jknight/ccxt | 02cdef0247435a6c6557faad8a1793d3da67c085 | [
"MIT"
] | null | null | null | python/ccxt/coss.py | jknight/ccxt | 02cdef0247435a6c6557faad8a1793d3da67c085 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
from ccxt.base.errors import ArgumentsRequired
class coss(Exchange):
def describ... | 40.901456 | 126 | 0.425873 |
1793aa69bc80047f6334f6ec60096700a83d537b | 6,253 | py | Python | chaluptests/methods/cond_mixnn.py | danthe96/independence_test | 2236b2c6b8fb87bf40b9b41b03fec76de96a5f26 | [
"MIT"
] | null | null | null | chaluptests/methods/cond_mixnn.py | danthe96/independence_test | 2236b2c6b8fb87bf40b9b41b03fec76de96a5f26 | [
"MIT"
] | null | null | null | chaluptests/methods/cond_mixnn.py | danthe96/independence_test | 2236b2c6b8fb87bf40b9b41b03fec76de96a5f26 | [
"MIT"
] | null | null | null | """ A conditional (and unconditional!) independence test
based on neural network regression. This implementation
uses Tensorflow and sklearn.
Reference:
Chalupka, Krzysztof and Perona, Pietro and Eberhardt, Frederick, 2017.
"""
import sys
import time
import numpy as np
from scipy.stats import ttest_ind
import tensorfl... | 32.910526 | 81 | 0.614265 |
088e9174f29ffec14f5248224d28c5b603262612 | 885 | py | Python | setup.py | KeynesYouDigIt/pyxform | 6ca3484ea56bee2a286ed46f24fa2ef1f88611fe | [
"BSD-2-Clause"
] | null | null | null | setup.py | KeynesYouDigIt/pyxform | 6ca3484ea56bee2a286ed46f24fa2ef1f88611fe | [
"BSD-2-Clause"
] | null | null | null | setup.py | KeynesYouDigIt/pyxform | 6ca3484ea56bee2a286ed46f24fa2ef1f88611fe | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pyxform - Python library that converts XLSForms to XForms.
"""
from setuptools import find_packages, setup
setup(
name="pyxform",
version="1.7.0",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(exclude=["tests", "tests.*"]),
pac... | 27.65625 | 75 | 0.619209 |
063f4853e530f6ba09f967328e10861a6af55b4d | 7,387 | py | Python | PiCN/Layers/ICNLayer/PendingInterestTable/BasePendingInterestTable.py | DimaMansour/PiCN | 90ced1cde2a8fd457e873e8bbad1fd7c21bbe56b | [
"BSD-3-Clause"
] | null | null | null | PiCN/Layers/ICNLayer/PendingInterestTable/BasePendingInterestTable.py | DimaMansour/PiCN | 90ced1cde2a8fd457e873e8bbad1fd7c21bbe56b | [
"BSD-3-Clause"
] | null | null | null | PiCN/Layers/ICNLayer/PendingInterestTable/BasePendingInterestTable.py | DimaMansour/PiCN | 90ced1cde2a8fd457e873e8bbad1fd7c21bbe56b | [
"BSD-3-Clause"
] | null | null | null | """Abstract BasePendingInterestTable for usage in BasicICNLayer"""
import abc
import multiprocessing
import time
from typing import List, Dict
from PiCN.Packets import Interest, Name
from PiCN.Layers.ICNLayer.ForwardingInformationBase import ForwardingInformationBaseEntry
from PiCN.Layers.ICNLayer import BaseICNDataS... | 32.831111 | 157 | 0.672127 |
9fe0f56466f6439f7caded8e690d82a300e951f5 | 5,119 | py | Python | scripts/maintenance/make_i18n_dict.py | masti01/pywikibot | bebd2b77b983581bc302656083e8b283a61e8679 | [
"MIT"
] | 2 | 2021-02-17T11:25:53.000Z | 2021-06-17T19:15:35.000Z | scripts/maintenance/make_i18n_dict.py | masti01/pywikibot | bebd2b77b983581bc302656083e8b283a61e8679 | [
"MIT"
] | 1 | 2021-06-21T03:59:14.000Z | 2021-06-21T07:37:50.000Z | scripts/maintenance/make_i18n_dict.py | masti01/pywikibot | bebd2b77b983581bc302656083e8b283a61e8679 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
Generate an i18n file from a given script.
run IDLE at topmost level:
>>> import pwb
>>> from scripts.maintenance.make_i18n_dict import i18nBot
>>> bot = i18nBot('<scriptname>', '<msg dict>')
>>> bot.run()
If you have more than one message dictionary, give all these names to the bot:
>>> bot =... | 32.605096 | 79 | 0.539363 |
4f4dd20ae6dc5b99203c36b3479581a6986a5031 | 7,144 | py | Python | django-ocr-backend/settings.py | JosephVC/Django_OCR_backend | 9478f5ee165517ff27e9b881b4ed27fcc1f389c1 | [
"MIT"
] | 2 | 2020-09-24T23:04:55.000Z | 2021-03-22T07:48:58.000Z | django-ocr-backend/settings.py | JosephVC/Django_OCR_backend | 9478f5ee165517ff27e9b881b4ed27fcc1f389c1 | [
"MIT"
] | 35 | 2020-05-21T03:45:45.000Z | 2022-02-10T11:30:51.000Z | django-ocr-backend/settings.py | JosephVC/Django_OCR_backend | 9478f5ee165517ff27e9b881b4ed27fcc1f389c1 | [
"MIT"
] | null | null | null |
"""
Django settings for django-ocr-backend project.
Generated by 'django-admin startproject' using Django 2.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
#... | 25.605735 | 91 | 0.698488 |
6578e0e3ed66e1616618ec2e4ea7955efe89896b | 920 | py | Python | tests/opcodes/cases/test_big_map_mem_string_122.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2021-05-20T16:52:08.000Z | 2021-05-20T16:52:08.000Z | tests/opcodes/cases/test_big_map_mem_string_122.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/opcodes/cases/test_big_map_mem_string_122.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import abspath
from pytezos.repl.interpreter import Interpreter
from pytezos.michelson.converter import michelson_to_micheline
from pytezos.repl.parser import parse_expression
class OpcodeTestbig_map_mem_string_122(TestCase):
def setUp(self):
self.maxDiff = None... | 35.384615 | 95 | 0.691304 |
94d628e4efdcf1a568cc50774fb3e5bff55c03f2 | 6,211 | py | Python | afterglow_core/resources/job_plugins/batch_download_job.py | SkynetRTN/afterglow-access-server | 3d8d62f622577fdd1ae7b0076cb536251f7bf0cd | [
"Apache-2.0"
] | 2 | 2021-05-24T15:12:07.000Z | 2022-02-17T19:58:16.000Z | afterglow_core/resources/job_plugins/batch_download_job.py | SkynetRTN/afterglow-access-server | 3d8d62f622577fdd1ae7b0076cb536251f7bf0cd | [
"Apache-2.0"
] | 1 | 2022-02-27T03:01:06.000Z | 2022-02-27T03:01:06.000Z | afterglow_core/resources/job_plugins/batch_download_job.py | SkynetRTN/afterglow-access-server | 3d8d62f622577fdd1ae7b0076cb536251f7bf0cd | [
"Apache-2.0"
] | 2 | 2021-06-08T18:16:40.000Z | 2021-07-09T14:19:49.000Z | """
Afterglow Core: data file and data provider asset batch download job plugins
"""
from io import BytesIO
from zipfile import ZIP_DEFLATED, ZipFile
from typing import List as TList
from marshmallow.fields import Integer, List, String
from ...models import Job
from ...errors import MissingFieldError, ValidationErro... | 37.415663 | 80 | 0.566575 |
77522f21cf5b38a7e93496715eb62f57270bd4b8 | 1,181 | py | Python | streamtest.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | streamtest.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | streamtest.py | fredryce/stocker | 041fbe8348f7a035a607a214477cf423c4259171 | [
"MIT"
] | null | null | null | '''
import yfinance as yf
import streamlit as st
st.write("""
# Simple Stock Price App
Shown are the stock **closing price** and ***volume*** of Google!
""")
# https://towardsdatascience.com/how-to-get-stock-data-using-python-c0de1df17e75
#define the ticker symbol
tickerSymbol = 'GOOGL'
#get data on this ticker
ticke... | 20.016949 | 84 | 0.720576 |
cf45e2194efdc5a242c3049c2c0e6bba4f9e21c4 | 310 | py | Python | program_synthesis/karel/tools/indexed_file.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 123 | 2018-06-09T00:49:39.000Z | 2022-03-09T05:41:20.000Z | program_synthesis/karel/tools/indexed_file.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 9 | 2018-06-12T01:01:17.000Z | 2022-03-18T09:06:39.000Z | program_synthesis/karel/tools/indexed_file.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 24 | 2018-06-09T00:42:46.000Z | 2021-09-29T08:23:32.000Z | import struct
def read_index(filename):
index = []
with open(filename, 'rb') as index_file:
while True:
offset = index_file.read(8)
if not offset:
break
offset, = struct.unpack('<Q', offset)
index.append(offset)
return index
| 23.846154 | 49 | 0.53871 |
aa89191e64da5d884b741268f44ee71d08842b8d | 262 | py | Python | falcon_provider_cache/__init__.py | bcsummers/falcon-provider-cache | 35fd7498d970fc3b836a629710c4a90271dda0a6 | [
"Apache-2.0"
] | 1 | 2020-08-03T18:10:09.000Z | 2020-08-03T18:10:09.000Z | falcon_provider_cache/__init__.py | bcsummers/falcon-provider-cache | 35fd7498d970fc3b836a629710c4a90271dda0a6 | [
"Apache-2.0"
] | null | null | null | falcon_provider_cache/__init__.py | bcsummers/falcon-provider-cache | 35fd7498d970fc3b836a629710c4a90271dda0a6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Falcon cache module."""
# flake8: noqa
from .__metadata__ import (
__author__,
__author_email__,
__description__,
__license__,
__package_name__,
__url__,
__version__,
)
from .utils import RedisCacheProvider
| 18.714286 | 37 | 0.679389 |
3ea7b041d0b3cf74376eb2135f29b0c583537337 | 1,683 | py | Python | src/gagarin/core/predicate.py | kango31/SpaceIsOurs | d54f60e4cf25e5cdabd1463f1c730f9500531838 | [
"MIT"
] | null | null | null | src/gagarin/core/predicate.py | kango31/SpaceIsOurs | d54f60e4cf25e5cdabd1463f1c730f9500531838 | [
"MIT"
] | null | null | null | src/gagarin/core/predicate.py | kango31/SpaceIsOurs | d54f60e4cf25e5cdabd1463f1c730f9500531838 | [
"MIT"
] | null | null | null | #!encoding: utf-8
"""
This module defines a class to interpret predicates from strings.
"""
import re
from .parser import DslInterpreter
class PropertyError(KeyError):
"""
Custom exception when trying to get a non-existing property from component.
"""
def __init__(self, msg):
"""
Con... | 25.892308 | 79 | 0.578134 |
7d8d26c5db3af05aafb181f955ccb7806859932c | 5,005 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_create_composed_model_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_create_composed_model_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_create_composed_model_async.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | null | null | null | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 47.666667 | 122 | 0.722278 |
54a6da630d38b931cb9300ca4cf78620f04fa837 | 3,340 | py | Python | image_classification/resnet.py | xiaoyeye1117/models | 16a2509e34c692e19ccd6b876a0fae1f3c06fa7a | [
"Apache-2.0"
] | null | null | null | image_classification/resnet.py | xiaoyeye1117/models | 16a2509e34c692e19ccd6b876a0fae1f3c06fa7a | [
"Apache-2.0"
] | null | null | null | image_classification/resnet.py | xiaoyeye1117/models | 16a2509e34c692e19ccd6b876a0fae1f3c06fa7a | [
"Apache-2.0"
] | 1 | 2019-01-22T15:40:57.000Z | 2019-01-22T15:40:57.000Z | import paddle.v2 as paddle
__all__ = ['resnet_imagenet', 'resnet_cifar10']
def conv_bn_layer(input,
ch_out,
filter_size,
stride,
padding,
active_type=paddle.activation.Relu(),
ch_in=None):
tmp = paddle.lay... | 34.791667 | 77 | 0.614671 |
d2b4c768eb5ce7b23afd46c5b98cb4abad6be47e | 8,615 | py | Python | src/spaceone/inventory/model/keyvault/data.py | jean1042/plugin-azure-cloud-services | 3a75a516c9a4d1e8a4962988934ead3fd40e8494 | [
"Apache-2.0"
] | 1 | 2020-12-08T11:59:54.000Z | 2020-12-08T11:59:54.000Z | src/spaceone/inventory/model/keyvault/data.py | jean1042/plugin-azure-cloud-services | 3a75a516c9a4d1e8a4962988934ead3fd40e8494 | [
"Apache-2.0"
] | 4 | 2021-01-26T10:43:37.000Z | 2021-12-17T10:13:33.000Z | src/spaceone/inventory/model/keyvault/data.py | jean1042/plugin-azure-cloud-services | 3a75a516c9a4d1e8a4962988934ead3fd40e8494 | [
"Apache-2.0"
] | 2 | 2021-01-13T03:24:05.000Z | 2021-01-19T07:25:45.000Z | from schematics import Model
from schematics.types import ModelType, ListType, StringType, IntType, BooleanType, NumberType, DateTimeType, \
TimestampType, UTCDateTimeType, TimedeltaType, FloatType
class Tags(Model):
key = StringType(serialize_when_none=False)
value = StringType(serialize_when_none=False)... | 46.069519 | 147 | 0.762391 |
23fdcb3a6f0afe304ceebf8b1b6c1d6956339d6b | 4,591 | py | Python | smartva/csmf_grapher.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-23T12:57:47.000Z | 2020-04-18T17:13:08.000Z | smartva/csmf_grapher.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-09T22:10:07.000Z | 2022-02-16T04:57:06.000Z | smartva/csmf_grapher.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 11 | 2018-12-11T22:01:13.000Z | 2022-01-07T11:38:02.000Z | import csv
import os
from collections import OrderedDict, defaultdict
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from smartva.data.common_data import ADULT, CHILD, NEONATE
from smartva.grapher_prep import GrapherPrep
from smartva.loggers import status_logger
from smartv... | 33.757353 | 116 | 0.624483 |
f66646b13b03135b74d14cfcca8a98d51ff7b8d8 | 84 | py | Python | teste.py | cynthiaribcosta/Rep-teste | 7f59b6252833113e77e65f5956b5973271a992b3 | [
"Apache-2.0"
] | null | null | null | teste.py | cynthiaribcosta/Rep-teste | 7f59b6252833113e77e65f5956b5973271a992b3 | [
"Apache-2.0"
] | null | null | null | teste.py | cynthiaribcosta/Rep-teste | 7f59b6252833113e77e65f5956b5973271a992b3 | [
"Apache-2.0"
] | null | null | null | import pytest:
from principal import soma
def teste_soma():
assert soma(2,4)==6 | 16.8 | 26 | 0.72619 |
151f551942d6b4815124ef27236954f9c103a4bf | 121 | py | Python | surfaceChange/__init__.py | SmithB/surfaceChange | 28f2a485203ef1bba95ff8dee48958b8c2dcf63f | [
"MIT"
] | 1 | 2021-01-30T00:01:44.000Z | 2021-01-30T00:01:44.000Z | surfaceChange/__init__.py | SmithB/surfaceChange | 28f2a485203ef1bba95ff8dee48958b8c2dcf63f | [
"MIT"
] | 2 | 2021-01-11T18:43:14.000Z | 2021-06-21T22:32:43.000Z | surfaceChange/__init__.py | SmithB/surfaceChange | 28f2a485203ef1bba95ff8dee48958b8c2dcf63f | [
"MIT"
] | 7 | 2020-08-19T22:26:48.000Z | 2021-12-05T23:11:02.000Z | from .ATL11_to_ATL15 import *
from .ATL14_write import *
from .ATL15_write import *
from .reread_data_from_fits import *
| 24.2 | 36 | 0.801653 |
4861015795ae9efc95ad5879fbc059917e78a8ab | 975 | py | Python | fixture/application.py | ndo1989/pythoncourse2020 | 23c6842476c4b5c4e2b1c7a32f26171dfa7a5622 | [
"Apache-2.0"
] | null | null | null | fixture/application.py | ndo1989/pythoncourse2020 | 23c6842476c4b5c4e2b1c7a32f26171dfa7a5622 | [
"Apache-2.0"
] | null | null | null | fixture/application.py | ndo1989/pythoncourse2020 | 23c6842476c4b5c4e2b1c7a32f26171dfa7a5622 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser, base_url):
if browser == "firefox":
self.wd = webdriver.Firefox()
self.wd.implicit... | 27.083333 | 65 | 0.601026 |
1980508ae2da08d93205af90b2276fdce4d2e25b | 934 | py | Python | Training/pytorch/evaluation/recall.py | QinchengZhang/PathologySegmentation | 7a2c21346739a79c33e7a7ccc081018821868eb7 | [
"MIT"
] | 3 | 2020-10-25T06:18:21.000Z | 2021-12-23T01:42:56.000Z | Training/pytorch/evaluation/recall.py | QinchengZhang/PathologySegmentation | 7a2c21346739a79c33e7a7ccc081018821868eb7 | [
"MIT"
] | null | null | null | Training/pytorch/evaluation/recall.py | QinchengZhang/PathologySegmentation | 7a2c21346739a79c33e7a7ccc081018821868eb7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Author: TJUZQC
Date: 2020-10-27 13:48:29
LastEditors: TJUZQC
LastEditTime: 2020-10-27 14:11:23
Description: None
'''
import torch
from torch.autograd import Function
class Recall(Function):
"""Recall for individual examples"""
def forward(self, input, target):
assert input.... | 26.685714 | 88 | 0.594218 |
d1e1fcb0121d666ac4a021e00926cf27fee3a4f9 | 704 | py | Python | server/plugins/munkiversion/munkiversion.py | nathandarnell/sal | 464414a2666e39bdf5b4b0033a84d5129c93c053 | [
"Apache-2.0"
] | 215 | 2015-05-04T16:57:56.000Z | 2022-03-07T12:58:12.000Z | server/plugins/munkiversion/munkiversion.py | nathandarnell/sal | 464414a2666e39bdf5b4b0033a84d5129c93c053 | [
"Apache-2.0"
] | 243 | 2015-07-04T18:10:56.000Z | 2022-02-27T18:52:40.000Z | server/plugins/munkiversion/munkiversion.py | nathandarnell/sal | 464414a2666e39bdf5b4b0033a84d5129c93c053 | [
"Apache-2.0"
] | 90 | 2015-06-29T19:26:58.000Z | 2022-02-17T19:03:00.000Z | from django.db.models import Count
import sal.plugin
class MunkiVersion(sal.plugin.Widget):
description = 'Chart of installed versions of Munki'
supported_os_families = [sal.plugin.OSFamilies.darwin]
def get_context(self, queryset, **kwargs):
context = self.super_get_context(queryset, **kwargs)... | 32 | 67 | 0.690341 |
3442e5026d30eebf1c62a93cd86036642e4ff862 | 2,735 | py | Python | ltron/geometry/relative_alignment.py | aaronwalsman/ltron | ac82055687e74084a6e42da5c12725c523c5c63c | [
"CC-BY-2.0",
"MIT"
] | 15 | 2021-06-20T20:37:47.000Z | 2022-03-01T00:50:38.000Z | ltron/geometry/relative_alignment.py | aaronwalsman/ltron | ac82055687e74084a6e42da5c12725c523c5c63c | [
"CC-BY-2.0",
"MIT"
] | null | null | null | ltron/geometry/relative_alignment.py | aaronwalsman/ltron | ac82055687e74084a6e42da5c12725c523c5c63c | [
"CC-BY-2.0",
"MIT"
] | 1 | 2021-11-22T03:49:28.000Z | 2021-11-22T03:49:28.000Z | import random
import numpy
from pyquaternion import Quaternion
def relative_alignment(transforms, relative_estimates, iterations):
for i in range(iterations):
new_transforms = []
for i, transform in enumerate(transforms):
estimates = []
for j, other in enumerate(transforms... | 31.079545 | 96 | 0.586837 |
1d4a4f22e0dcd0a83c346e8dcde4f6d63727bd8f | 6,287 | py | Python | src/iiwa_ppo.py | LeonLester/Machin-title-in-progress- | 777479d47b520dcdc6b09c247591b5fe1d6cbe8c | [
"MIT"
] | null | null | null | src/iiwa_ppo.py | LeonLester/Machin-title-in-progress- | 777479d47b520dcdc6b09c247591b5fe1d6cbe8c | [
"MIT"
] | null | null | null | src/iiwa_ppo.py | LeonLester/Machin-title-in-progress- | 777479d47b520dcdc6b09c247591b5fe1d6cbe8c | [
"MIT"
] | null | null | null | import RobotDART as Rd
import numpy as np
from machin.frame.algorithms import PPO
from math import sqrt
import torch
from retry import retry
import pandas as pd
class Actor(torch.nn.Module):
def __init__(self, state_dim, action_num):
super().__init__()
self.fc1 = torch.nn.Linear(state_dim, 32)
... | 29.796209 | 102 | 0.580086 |
984b528ba9f527fef1429e85f8f81fe1f9d8f242 | 85,506 | py | Python | src/genie/libs/parser/junos/show_route.py | filippohronsky/genieparser | 85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df | [
"Apache-2.0"
] | 1 | 2020-01-07T15:34:41.000Z | 2020-01-07T15:34:41.000Z | src/genie/libs/parser/junos/show_route.py | filippohronsky/genieparser | 85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/junos/show_route.py | filippohronsky/genieparser | 85e4b7a8f101e5cd44d4d7116e0e7a1af13fe9df | [
"Apache-2.0"
] | null | null | null | ''' show_route.py
JUNOS parsers for the following commands:
* show route table {table}
* show route table {table} {prefix}
* show route
* show route protocol {protocol} extensive
* show route protocol {protocol} table {table} extensive
* show route protocol {protocol} table {table}
* show r... | 40.219191 | 115 | 0.451068 |
25c2b0fb421fa996abcad52b601f7250c67f6f42 | 1,509 | py | Python | fastaq_stats.py | kharten/Metagenomics17 | 1d180e6da17cb917a7be07fd562b3bd32bc3e7dd | [
"MIT"
] | null | null | null | fastaq_stats.py | kharten/Metagenomics17 | 1d180e6da17cb917a7be07fd562b3bd32bc3e7dd | [
"MIT"
] | null | null | null | fastaq_stats.py | kharten/Metagenomics17 | 1d180e6da17cb917a7be07fd562b3bd32bc3e7dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import gzip
def main():
#create tuples for different file types
fasta_tup = ('.fa', '.fasta')
fastq_tup = ('.fq', '.fastq')
#check for fasta or fastq as first argument
try:
fn = sys.argv[1]
if fn.endswith('.gz'):
open_file = gzip.open(fn, 'rb')
#read_file = open_file.... | 20.12 | 98 | 0.663353 |
4c63832a7f5404f94c1b7a380a9e5463add11ee9 | 3,824 | py | Python | tests/TestPlayerCalls.py | ThiagoVieira/playsomeeuchre | 6ffbc5096f889efa9bcb575ec4ec73b3a6973b6c | [
"MIT"
] | null | null | null | tests/TestPlayerCalls.py | ThiagoVieira/playsomeeuchre | 6ffbc5096f889efa9bcb575ec4ec73b3a6973b6c | [
"MIT"
] | null | null | null | tests/TestPlayerCalls.py | ThiagoVieira/playsomeeuchre | 6ffbc5096f889efa9bcb575ec4ec73b3a6973b6c | [
"MIT"
] | null | null | null | import unittest
from euchre.data_model import PartialRound
from euchre.players.PlayerInterface import PlayerInterface
from euchre.players.RandomPlayer import RandomPlayer
from euchre.players.BasicPlayer import BasicPlayer
from euchre.players.RulePlayer import RulePlayer
from euchre.serializer import json_to_game
clas... | 58.830769 | 112 | 0.555178 |
57e4d5bf9eb13a392a9ed2d67f9234e158e114e3 | 5,706 | py | Python | cirq-core/cirq/ops/fourier_transform_test.py | mkeshita/Cirq | 06b5a5bd929757bf4bafe32b16bc4fabb36f3390 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ops/fourier_transform_test.py | mkeshita/Cirq | 06b5a5bd929757bf4bafe32b16bc4fabb36f3390 | [
"Apache-2.0"
] | null | null | null | cirq-core/cirq/ops/fourier_transform_test.py | mkeshita/Cirq | 06b5a5bd929757bf4bafe32b16bc4fabb36f3390 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 31.524862 | 100 | 0.522257 |
fb87cc56ab8abf8efee5d1f83245abd447ca430d | 5,196 | py | Python | examples/get.py | phate999/api-samples | 3f2b7b35021109a20d231ba073bcf5a00b846af0 | [
"MIT"
] | 12 | 2018-11-09T21:12:26.000Z | 2021-12-07T23:54:55.000Z | examples/get.py | phate999/api-samples | 3f2b7b35021109a20d231ba073bcf5a00b846af0 | [
"MIT"
] | 5 | 2019-09-09T20:45:16.000Z | 2022-01-07T18:23:01.000Z | examples/get.py | phate999/api-samples | 3f2b7b35021109a20d231ba073bcf5a00b846af0 | [
"MIT"
] | 16 | 2019-04-04T17:11:08.000Z | 2022-01-20T21:40:30.000Z | import argparse
import json
import logging
import os
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from datetime import datetime
headers = {
"Content-Type": "application/json",
"X-CP-API-ID": os.environ.get("X_CP_API_ID"),
"X-CP-API-KEY": o... | 29.691429 | 79 | 0.54157 |
2a650aa31293988fb7314c42603b17174ec5c09e | 8,439 | py | Python | src/docker-images/job-exporter/src/dcgm.py | RichardZhaoW/DLWorkspace | 27d3a3a82e59305bdc67dbfd69098d493f8b3cd5 | [
"MIT"
] | null | null | null | src/docker-images/job-exporter/src/dcgm.py | RichardZhaoW/DLWorkspace | 27d3a3a82e59305bdc67dbfd69098d493f8b3cd5 | [
"MIT"
] | null | null | null | src/docker-images/job-exporter/src/dcgm.py | RichardZhaoW/DLWorkspace | 27d3a3a82e59305bdc67dbfd69098d493f8b3cd5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import logging
import collections
import time
import datetime
import threading
from prometheus_client.core import GaugeMetricFamily
import utils
logger = logging.getLogger(__name__)
class nv_host(object):
def __init__(self):
pass
def __enter__(self):
... | 38.889401 | 131 | 0.571513 |
eb4077344f6575c23c8a91b0872e9e72eb59d16e | 1,317 | py | Python | sdks/python/apache_beam/coders/fast_coders_test.py | bschell/beam | 5533acff51cf6157d62a63c60eb3f074f1958df5 | [
"Apache-2.0"
] | 2 | 2020-08-30T14:49:58.000Z | 2020-08-30T15:02:38.000Z | sdks/python/apache_beam/coders/fast_coders_test.py | bschell/beam | 5533acff51cf6157d62a63c60eb3f074f1958df5 | [
"Apache-2.0"
] | 11 | 2018-05-22T06:08:39.000Z | 2018-10-05T15:02:21.000Z | sdks/python/apache_beam/coders/fast_coders_test.py | bschell/beam | 5533acff51cf6157d62a63c60eb3f074f1958df5 | [
"Apache-2.0"
] | 1 | 2018-11-23T11:49:03.000Z | 2018-11-23T11:49:03.000Z | #
# 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 us... | 32.925 | 74 | 0.772969 |
94a4169ac78d6ebae59749cf67ffb9dd190f8e03 | 1,939 | py | Python | nobos_commons/data_structures/constants/color_palette.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | 2 | 2020-06-03T16:28:44.000Z | 2020-10-10T03:07:23.000Z | nobos_commons/data_structures/constants/color_palette.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | null | null | null | nobos_commons/data_structures/constants/color_palette.py | noboevbo/nobos_commons | 471e52e10fd2228c106777c72d8439e58b047003 | [
"MIT"
] | 4 | 2020-10-10T03:07:25.000Z | 2021-09-30T01:11:02.000Z | DETECTION_COLOR_PALETTE = [
(39, 129, 113),
(164, 80, 133),
(83, 122, 114),
(99, 81, 172),
(95, 56, 104),
(37, 84, 86),
(14, 89, 122),
(80, 7, 65),
(10, 102, 25),
(90, 185, 109),
(106, 110, 132),
(169, 158, 85),
(188, 185, 26),
(103, 1, 17),
(82, 144, 81),
... | 18.825243 | 27 | 0.37803 |
c6f5b5402404304ba77cd6c951b9d6372660c1bb | 9,097 | py | Python | pythonBackend/SuperUser.py | sajadgzd/softwareEngineeringProject | b2c4838b01ae4cb790a64e3c0d0a5bc959054bab | [
"MIT"
] | 5 | 2020-06-27T02:57:47.000Z | 2022-01-12T22:14:08.000Z | pythonBackend/SuperUser.py | sajadgzd/softwareEngineeringProject | b2c4838b01ae4cb790a64e3c0d0a5bc959054bab | [
"MIT"
] | null | null | null | pythonBackend/SuperUser.py | sajadgzd/softwareEngineeringProject | b2c4838b01ae4cb790a64e3c0d0a5bc959054bab | [
"MIT"
] | 2 | 2020-05-14T18:29:55.000Z | 2020-05-17T05:59:05.000Z | import sqlite3
import json
from flask import Flask, jsonify, render_template, request, send_from_directory
import uuid
########## SUPER USER CODE ##########
@app.route('/handleApplication', methods = ["POST"])
def handleApplication():
#------Get Data from Front-end-----#
jsonData = request.json
respons... | 35.25969 | 213 | 0.652963 |
d637ce670e1378e1f97e7a93e7aa81ffa6402fb2 | 1,977 | py | Python | lib/linux/get_browsers.py | cinfo-kwoc/Cinfo | 1cdebe7165d687e977004ec2723019adb3b4288b | [
"MIT"
] | null | null | null | lib/linux/get_browsers.py | cinfo-kwoc/Cinfo | 1cdebe7165d687e977004ec2723019adb3b4288b | [
"MIT"
] | null | null | null | lib/linux/get_browsers.py | cinfo-kwoc/Cinfo | 1cdebe7165d687e977004ec2723019adb3b4288b | [
"MIT"
] | null | null | null | import os
class get_browsers:
'''
********* THIS SCRIPT RETURNS A LIST CONTAINING BROWSERS INSTALLED ON USER'S LINUX SYSTEM *********
CLASS get_browsers DOCINFO:
get_browsers HAVE TWO FUNCTIONS I.E.,
1) __init__
2) work()
__init__ DOCFILE:
__init__ BLOCK SERVES THE INITIALIZATION FUNCTION, CONTAINING INITI... | 42.978261 | 145 | 0.699039 |
c161953f5f5c3466d3949a3fba98085566cf51c5 | 1,368 | py | Python | eva/scripts/extract_rosbag_pose.py | epfl-lasa/rds | 574b3881dbaf4fdcd785dd96ba4c451928454b40 | [
"MIT"
] | 12 | 2020-08-18T09:01:50.000Z | 2022-03-17T19:53:30.000Z | eva/scripts/extract_rosbag_pose.py | epfl-lasa/rds | 574b3881dbaf4fdcd785dd96ba4c451928454b40 | [
"MIT"
] | null | null | null | eva/scripts/extract_rosbag_pose.py | epfl-lasa/rds | 574b3881dbaf4fdcd785dd96ba4c451928454b40 | [
"MIT"
] | 1 | 2021-08-25T13:12:55.000Z | 2021-08-25T13:12:55.000Z | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseWithCovarianceStamped
import tf
import numpy as np
import time
import scipy.io as sio
import signal
import sys
n_max = 30*300 # 30 Hz for 5 min
data = np.empty([n_max, 4])
# [[time, x, y, phi]]
counter = 0
start_time = None
previous_t = -100.0
de... | 21.046154 | 78 | 0.707602 |
8e2f46ce220c24596c1d0c1481d04aa4a40db141 | 49 | py | Python | recipe/conda_forge_ci_setup/__init__.py | scopatz/conda-forge-ci-setup-feedstock | 6b81908e35bdecb9e92241b978e626fbd42b7d54 | [
"BSD-3-Clause"
] | 6 | 2020-03-30T23:05:16.000Z | 2021-12-14T15:28:16.000Z | recipe/conda_forge_ci_setup/__init__.py | scopatz/conda-forge-ci-setup-feedstock | 6b81908e35bdecb9e92241b978e626fbd42b7d54 | [
"BSD-3-Clause"
] | null | null | null | recipe/conda_forge_ci_setup/__init__.py | scopatz/conda-forge-ci-setup-feedstock | 6b81908e35bdecb9e92241b978e626fbd42b7d54 | [
"BSD-3-Clause"
] | 3 | 2020-09-03T13:19:47.000Z | 2021-03-04T10:12:09.000Z | """conda-forge-ci-utils"""
__version__ = '2.0.6'
| 16.333333 | 26 | 0.632653 |
35a020fa781dfd60dfcefcb8b1eb1f9db8771525 | 328 | py | Python | nebula2/__init__.py | xiaoronghuang/nebula-python | fe2a85639dd1500133a63bad50f72b3c0370d1de | [
"Apache-2.0"
] | 110 | 2019-10-24T09:21:07.000Z | 2022-03-31T07:06:00.000Z | nebula2/__init__.py | xiaoronghuang/nebula-python | fe2a85639dd1500133a63bad50f72b3c0370d1de | [
"Apache-2.0"
] | 83 | 2019-11-20T07:55:05.000Z | 2022-03-23T10:55:14.000Z | nebula2/__init__.py | xiaoronghuang/nebula-python | fe2a85639dd1500133a63bad50f72b3c0370d1de | [
"Apache-2.0"
] | 56 | 2019-10-11T07:01:05.000Z | 2022-03-11T09:09:15.000Z | #!/usr/bin/env python
# --coding:utf-8--
# Copyright (c) 2020 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License,
# attached with Common Clause Condition 1.0, found in the LICENSES directory.
from nebula2.common.ttypes import Value
Value.__hash__ = lambda self: self.value.__has... | 25.230769 | 77 | 0.746951 |
4b1326cb9e1ab13b114b0692a5985d0c268e468c | 6,579 | py | Python | venv/Lib/site-packages/pyroute2/netns/nslink.py | kalymgr/Project-T-Cryptocurrencies | 5dbb679a76bcf07b913036e7b44ba4247c39482d | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyroute2/netns/nslink.py | kalymgr/Project-T-Cryptocurrencies | 5dbb679a76bcf07b913036e7b44ba4247c39482d | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyroute2/netns/nslink.py | kalymgr/Project-T-Cryptocurrencies | 5dbb679a76bcf07b913036e7b44ba4247c39482d | [
"MIT"
] | null | null | null | '''
NetNS
=====
A NetNS object is IPRoute-like. It runs in the main network
namespace, but also creates a proxy process running in
the required netns. All the netlink requests are done via
that proxy process.
NetNS supports standard IPRoute API, so can be used instead
of IPRoute, e.g., in IPDB::
# start the main... | 29.370536 | 75 | 0.594163 |
cf3020346ffd5fb4d8d77b6be635bca8ee20ec8e | 8,596 | py | Python | src/find_homography_distance_orig (2).py | Charamba/Cross-Ratio-Arrays-Shape-Descriptor | b252814f54bb11c2519a1bd4d0be3f524faba901 | [
"Unlicense"
] | 2 | 2021-09-05T15:50:02.000Z | 2022-01-05T03:10:50.000Z | src/find_homography_distance_orig (2).py | Charamba/Cross-Ratio-Arrays-Shape-Descriptor | b252814f54bb11c2519a1bd4d0be3f524faba901 | [
"Unlicense"
] | null | null | null | src/find_homography_distance_orig (2).py | Charamba/Cross-Ratio-Arrays-Shape-Descriptor | b252814f54bb11c2519a1bd4d0be3f524faba901 | [
"Unlicense"
] | null | null | null | import cv2
import numpy as np
from numpy.linalg import inv
from scipy.spatial.distance import directed_hausdorff
import math
def bbox_dimensions(points):
X = [p.x for p in points]
Y = [p.y for p in points]
min_x = min(X)
min_y = min(Y)
max_x = max(X)
max_y = max(Y)
dbbx = max_x - min_x
... | 69.322581 | 2,942 | 0.629711 |
08fd9f7ab3c71344e11589cee3c694ec396fef54 | 4,130 | py | Python | constraint_generation/python/spice_parse/netlist.py | rbarzic/MAGICAL | 0510550b263913f8c62f46662a9dfa2ae94d2386 | [
"BSD-3-Clause"
] | null | null | null | constraint_generation/python/spice_parse/netlist.py | rbarzic/MAGICAL | 0510550b263913f8c62f46662a9dfa2ae94d2386 | [
"BSD-3-Clause"
] | null | null | null | constraint_generation/python/spice_parse/netlist.py | rbarzic/MAGICAL | 0510550b263913f8c62f46662a9dfa2ae94d2386 | [
"BSD-3-Clause"
] | null | null | null | class netlist_element():
def __init__(self,typeof):
self.typeof = typeof
self.parent = False
def __str__(self):
return(self.typeof)
class subcircuit(netlist_element):
def __init__(self, name, nets, instances):
self.name = name;
self.labels = {}
self.power_net... | 31.769231 | 167 | 0.575787 |
a2ccdecc6979646a022e6b5aa62bcedaf9f091ea | 629 | py | Python | methods/get_and_set.py | kurtgalvin/dunder-mifflin-methods | 69925575d3b9acdd01cea30414e8f01847566bc1 | [
"MIT"
] | null | null | null | methods/get_and_set.py | kurtgalvin/dunder-mifflin-methods | 69925575d3b9acdd01cea30414e8f01847566bc1 | [
"MIT"
] | null | null | null | methods/get_and_set.py | kurtgalvin/dunder-mifflin-methods | 69925575d3b9acdd01cea30414e8f01847566bc1 | [
"MIT"
] | null | null | null | # __get__ and __set__ tutorial
class Hours:
def __init__(self, hours_per_day):
self.hours_per_day = hours_per_day
self.total_hours = 0
self.regular_hours = 0
self.overtime_hours = 0
def __get__(self, instance, owner):
return {
'total': self.total_hours,
... | 22.464286 | 43 | 0.612083 |
738e1e9d005d879b052ec6d7949465e03f99162d | 15,021 | py | Python | src/dataops/tests/test_logic.py | ShizhuZhang/ontask_b | acbf05ff9b18dae0a41c67d1e41774e54a890c40 | [
"MIT"
] | null | null | null | src/dataops/tests/test_logic.py | ShizhuZhang/ontask_b | acbf05ff9b18dae0a41c67d1e41774e54a890c40 | [
"MIT"
] | null | null | null | src/dataops/tests/test_logic.py | ShizhuZhang/ontask_b | acbf05ff9b18dae0a41c67d1e41774e54a890c40 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import StringIO
import datetime
import numpy as np
import pandas as pd
import test
from dataops import pandas_db
from dataops.formula_evaluation import evaluate_top_node, evaluate_node_sql
from dataops.ops import perform_dataframe_upload... | 35.095794 | 80 | 0.446175 |
966670cbfde49dd8515a4113d2a9471777b20fbf | 14,253 | py | Python | dictionary.py | berkegokmen1/dictionary | 8b3b8a8b94ca668136b543805e9614a3c1cb50ea | [
"MIT"
] | 1 | 2021-12-08T10:45:41.000Z | 2021-12-08T10:45:41.000Z | dictionary.py | berkegokmen1/dictionary | 8b3b8a8b94ca668136b543805e9614a3c1cb50ea | [
"MIT"
] | null | null | null | dictionary.py | berkegokmen1/dictionary | 8b3b8a8b94ca668136b543805e9614a3c1cb50ea | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import json
from colorama import init
from termcolor import colored
import csv
import re
import concurrent.futures
init()
tr_definitions = []
en_definition = ""
collocations = []
synonyms = []
word_forms = {
"Noun": [],
"Verb": [],
"Adjective": [],
"Adver... | 36.92487 | 159 | 0.482144 |
b420dfad5b8216c7575ae1dc332f160af58585c9 | 7,085 | py | Python | molsys/util/spacegroups.py | MOFplus/molsys_rel | ff8b181fefc0ba03c5dd14fe2dde613298155203 | [
"MIT"
] | null | null | null | molsys/util/spacegroups.py | MOFplus/molsys_rel | ff8b181fefc0ba03c5dd14fe2dde613298155203 | [
"MIT"
] | null | null | null | molsys/util/spacegroups.py | MOFplus/molsys_rel | ff8b181fefc0ba03c5dd14fe2dde613298155203 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: julian
Minimum set to convert spacegroup symbols to the respective spacegroup number
Much more has to be added here!
"""
spacegroups={
'P1':1,
'P-1':2,
'P2':3,
'P21':4,
'C2':5,
'Pm':6,
'Pc':7,
'Cm':8,
'Cc':9,
'P2/m':10,
'P21/m':11,
'C2/m':12,
'P2/c':13,
'P21/c':14,
'C2/c':15,
'P22... | 14.05754 | 105 | 0.494707 |
02dcef89bd759f31293e683c65f5a688f1e72d10 | 1,508 | py | Python | client2.py | MattPChoy/Doorbell | fd282f2ccaac741b9e553d05219884efd33df56b | [
"MIT"
] | null | null | null | client2.py | MattPChoy/Doorbell | fd282f2ccaac741b9e553d05219884efd33df56b | [
"MIT"
] | null | null | null | client2.py | MattPChoy/Doorbell | fd282f2ccaac741b9e553d05219884efd33df56b | [
"MIT"
] | null | null | null | import io
import socket
import struct
import time
import picamera
client_socket = socket.socket()
client_socket.connect(('192.168.1.42', 8000)) # ADD IP HERE
# Make a file-like object out of the connection
connection = client_socket.makefile('wb')
try:
camera = picamera.PiCamera()
camera.vflip = True
ca... | 32.782609 | 71 | 0.667109 |
fd38176e71e21efe00c28621b97835993c97e7f7 | 8,522 | py | Python | zplib/image/ffmpeg.py | zpincus/zplib | 930b4b88633c95c7f7761d0183aec882484f00bc | [
"MIT"
] | 6 | 2017-03-26T09:28:18.000Z | 2021-07-15T00:09:33.000Z | zplib/image/ffmpeg.py | zpincus/zplib | 930b4b88633c95c7f7761d0183aec882484f00bc | [
"MIT"
] | null | null | null | zplib/image/ffmpeg.py | zpincus/zplib | 930b4b88633c95c7f7761d0183aec882484f00bc | [
"MIT"
] | 5 | 2015-04-21T02:49:01.000Z | 2017-11-13T13:29:35.000Z | import subprocess
import platform
import numpy
import sys
import json
if platform.system() == 'Windows':
FFMPEG_BIN = 'ffmpeg.exe'
FFPROBE_BIN = ''
else:
FFMPEG_BIN = 'ffmpeg'
FFPROBE_BIN = 'ffprobe'
BYTEORDERS = {'<':'le', '>':'be', '=':'le' if sys.byteorder == 'little' else 'be'}
def read_video(inp... | 41.368932 | 144 | 0.661112 |
51f29ab1cbb07f5d0e8a831564cd25b1ebee3264 | 519 | py | Python | server/architext/entities/location_save.py | JimenaAndrea/architext | fb49624f7301902a357815af0ca5d320cfc6ddb6 | [
"MIT"
] | 3 | 2020-08-02T07:14:25.000Z | 2021-04-25T12:22:53.000Z | server/architext/entities/location_save.py | JimenaAndrea/architext | fb49624f7301902a357815af0ca5d320cfc6ddb6 | [
"MIT"
] | 130 | 2020-07-15T12:09:30.000Z | 2021-05-27T15:02:01.000Z | server/architext/entities/location_save.py | JimenaAndrea/architext | fb49624f7301902a357815af0ca5d320cfc6ddb6 | [
"MIT"
] | 1 | 2021-06-10T15:51:49.000Z | 2021-06-10T15:51:49.000Z | import mongoengine
class LocationSave(mongoengine.Document):
user = mongoengine.ReferenceField('User', required=True)
world = mongoengine.ReferenceField('World', required=True)
room = mongoengine.ReferenceField('Room', required=True)
def __init__(self, *args, save_on_creation=True, **kwargs):
... | 34.6 | 63 | 0.672447 |
814dd9d093a729799dbfe0a416b260ae185eb61b | 24,204 | py | Python | google/cloud/security/common/data_access/sql_queries/create_tables.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | 1 | 2018-03-26T08:15:21.000Z | 2018-03-26T08:15:21.000Z | google/cloud/security/common/data_access/sql_queries/create_tables.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | google/cloud/security/common/data_access/sql_queries/create_tables.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 ap... | 41.23339 | 88 | 0.651504 |
331e7484b3bae0322b20d327f133c5d558450e9c | 7,106 | py | Python | test/test_report.py | masino-lab/fairMLHealth | 943ffed5f57997401823bd2afc257f34f76ea157 | [
"MIT"
] | 19 | 2020-10-29T10:14:59.000Z | 2022-03-20T06:27:35.000Z | test/test_report.py | masino-lab/fairMLHealth | 943ffed5f57997401823bd2afc257f34f76ea157 | [
"MIT"
] | 52 | 2020-10-14T19:21:27.000Z | 2021-09-15T19:01:52.000Z | test/test_report.py | masino-lab/fairMLHealth | 943ffed5f57997401823bd2afc257f34f76ea157 | [
"MIT"
] | 9 | 2020-12-02T21:40:27.000Z | 2021-11-01T18:09:10.000Z | """
"""
from fairmlhealth import report
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import BernoulliNB
from sklearn.tree import DecisionTreeClassifier
import pytest
import pandas as pd
from .__utils import synth_dataset
import fairmlhealth.__validation as valid
@... | 30.62931 | 82 | 0.5387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.