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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22d131f503c48f738b5b4902e60813623504e67a | 1,940 | py | Python | Menus/Main/LevelSelectionEdit/DeleteLevel.py | PyRectangle/GreyRectangle | 21c19002f52563a096566e9166040815005b830b | [
"MIT"
] | 3 | 2017-09-28T16:53:09.000Z | 2018-03-18T20:01:41.000Z | Menus/Main/LevelSelectionEdit/DeleteLevel.py | PyRectangle/GreyRectangle | 21c19002f52563a096566e9166040815005b830b | [
"MIT"
] | null | null | null | Menus/Main/LevelSelectionEdit/DeleteLevel.py | PyRectangle/GreyRectangle | 21c19002f52563a096566e9166040815005b830b | [
"MIT"
] | null | null | null | from Frame.gui.Button import Button
from pygameImporter import pygame
from Frame.Render import Render
from Constants import *
from Menu import Menu
class DeleteLevel(Menu):
def __init__(self, menuHandler):
super().__init__()
self.level = None
self.alpha = 0
self.up = True
s... | 45.116279 | 169 | 0.54433 |
e3c6f66ac9d8485c9fef648d232e2b315f862e9d | 6,957 | py | Python | CrossMgrImpinj/Impinj2JChip.py | esitarski/CrossMgr | de33b5ed662556ec659e6e2910f5fd0f88f25fa0 | [
"MIT"
] | 25 | 2015-02-26T01:26:10.000Z | 2022-03-25T15:46:55.000Z | CrossMgrImpinj/Impinj2JChip.py | esitarski/CrossMgr | de33b5ed662556ec659e6e2910f5fd0f88f25fa0 | [
"MIT"
] | 76 | 2015-12-09T04:24:30.000Z | 2022-02-18T16:39:28.000Z | CrossMgrImpinj/Impinj2JChip.py | esitarski/CrossMgr | de33b5ed662556ec659e6e2910f5fd0f88f25fa0 | [
"MIT"
] | 17 | 2015-04-23T07:37:13.000Z | 2020-01-22T17:47:16.000Z | import re
import os
import socket
import time
import threading
import datetime
from six.moves.queue import Empty
#------------------------------------------------------------------------------
# JChip delimiter (CR, **not** LF)
CR = u'\r'
#---------------------------------------------------------------------------... | 35.314721 | 177 | 0.600834 |
814e131b935e732720cb4b9db0ae24fb45d2598d | 3,672 | py | Python | aadnc_benchmarks/benchmark_read_speed.py | telegraphic/fits2hdf | a5d66d104fdc70d67c2dac8103b70e5fe3bb9a01 | [
"MIT"
] | 22 | 2015-03-02T21:38:33.000Z | 2021-05-09T11:30:41.000Z | aadnc_benchmarks/benchmark_read_speed.py | telegraphic/fits2hdf | a5d66d104fdc70d67c2dac8103b70e5fe3bb9a01 | [
"MIT"
] | 16 | 2015-03-01T23:11:49.000Z | 2019-08-08T03:18:30.000Z | aadnc_benchmarks/benchmark_read_speed.py | telegraphic/fits2hdf | a5d66d104fdc70d67c2dac8103b70e5fe3bb9a01 | [
"MIT"
] | 11 | 2015-03-26T14:50:33.000Z | 2021-12-11T13:21:12.000Z | """
benchmark compression
---------------------
Generate benchmarks for AANDC paper.
"""
import numpy as np
from os.path import join,exists
from shutil import copy2
import os
from fits2hdf import idi
from fits2hdf.io import hdfio, fitsio
import time
import h5py
from astropy.io import fits as pf
def create_image(i... | 31.384615 | 103 | 0.64951 |
0079fa08a7707f5ec47be57cfb217679ee2a6b8b | 6,158 | py | Python | pybind/nos/v7_1_0/rbridge_id/router/router_bgp/router_bgp_attributes/neighbor/neighbor_ipv6s/neighbor_ipv6_addr/af_neighbor_capability/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/rbridge_id/router/router_bgp/router_bgp_attributes/neighbor/neighbor_ipv6s/neighbor_ipv6_addr/af_neighbor_capability/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/rbridge_id/router/router_bgp/router_bgp_attributes/neighbor/neighbor_ipv6s/neighbor_ipv6_addr/af_neighbor_capability/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 49.66129 | 472 | 0.714518 |
8faefcf16dad2d9986f2deef07951bb6489a9770 | 10,897 | py | Python | ruidl.py | calebglawson/ruidl | c255e4aff80f36a21ea6df4851544069e3ee54d7 | [
"MIT"
] | null | null | null | ruidl.py | calebglawson/ruidl | c255e4aff80f36a21ea6df4851544069e3ee54d7 | [
"MIT"
] | 1 | 2021-08-07T12:26:00.000Z | 2021-08-07T12:26:00.000Z | ruidl.py | calebglawson/ruidl | c255e4aff80f36a21ea6df4851544069e3ee54d7 | [
"MIT"
] | null | null | null | '''
This file contains the necessary components to download images from a subbreddit or redditor.
'''
from abc import abstractmethod
import os
import re
import json
import hashlib
import sys
import time
import traceback
from glob import glob
from pathlib import Path
from multiprocessing import cpu_count
from multipro... | 30.269444 | 97 | 0.559053 |
a08f64cd508c405efdf4cbebe1afbd3d8c64b7a1 | 3,323 | bzl | Python | google/cloud/google_cloud_cpp_common.bzl | shaffeeullah/google-cloud-cpp | 07396e652e8d738fd51ddd0bbeb04b4ab02ca267 | [
"Apache-2.0"
] | null | null | null | google/cloud/google_cloud_cpp_common.bzl | shaffeeullah/google-cloud-cpp | 07396e652e8d738fd51ddd0bbeb04b4ab02ca267 | [
"Apache-2.0"
] | null | null | null | google/cloud/google_cloud_cpp_common.bzl | shaffeeullah/google-cloud-cpp | 07396e652e8d738fd51ddd0bbeb04b4ab02ca267 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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 or agreed to in writing, s... | 29.40708 | 85 | 0.683419 |
493c85b37c20d135f0dc051cc64b9b6479d6c563 | 64 | py | Python | Task/Arrays/Python/arrays-3.py | LaudateCorpus1/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 5 | 2021-01-29T20:08:05.000Z | 2022-03-22T06:16:05.000Z | Task/Arrays/Python/arrays-3.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | null | null | null | Task/Arrays/Python/arrays-3.py | seanwallawalla-forks/RosettaCodeData | 9ad63ea473a958506c041077f1d810c0c7c8c18d | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | myArray = [[0]* width] * height] # DOES NOT WORK AS INTENDED!!!
| 32 | 63 | 0.625 |
35c24b12f13b68cc002d7f4dc94f45a3d224501c | 351 | py | Python | arxiv_cli/utils.py | jacquerie/arxiv-cli | ba07ba0f2a6ade3fbb2a9b87e79437e55a2fab17 | [
"MIT"
] | 8 | 2017-10-22T15:49:48.000Z | 2020-07-31T22:31:42.000Z | arxiv_cli/utils.py | jacquerie/arxiv-cli | ba07ba0f2a6ade3fbb2a9b87e79437e55a2fab17 | [
"MIT"
] | 2 | 2017-10-22T12:32:26.000Z | 2017-10-22T17:30:27.000Z | arxiv_cli/utils.py | jacquerie/arxiv-cli | ba07ba0f2a6ade3fbb2a9b87e79437e55a2fab17 | [
"MIT"
] | 1 | 2018-02-18T16:28:48.000Z | 2018-02-18T16:28:48.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from time import sleep
def drip(f, l, t=0):
result = []
if l:
for el in l[:-1]:
result.append(f(el))
sleep(t)
result.append(f(l[-1]))
return result
def has(d, k):
retu... | 15.954545 | 64 | 0.555556 |
c843d706a2d39173c8800fe8938fede5cd92ace3 | 10,576 | py | Python | python/ccxt/async_support/luno.py | KaceyBolman/ccxt | d34a0651b209ac77453f05c4ce31883f0cd2d6b8 | [
"MIT"
] | 1 | 2017-10-16T01:59:45.000Z | 2017-10-16T01:59:45.000Z | python/ccxt/async_support/luno.py | rerefreshing/ccxt | 7c50f338dcb282c0aee4d69a1ac4ca47255fdf15 | [
"MIT"
] | null | null | null | python/ccxt/async_support/luno.py | rerefreshing/ccxt | 7c50f338dcb282c0aee4d69a1ac4ca47255fdf15 | [
"MIT"
] | 2 | 2019-03-14T15:17:46.000Z | 2019-09-08T19:26:04.000Z | # -*- 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.async_support.base.exchange import Exchange
import base64
from ccxt.base.errors import ExchangeError
class luno (Exchange):
... | 36.095563 | 126 | 0.480144 |
a47741d10ccb29ce36cf1b59f10e6b6ef47e73e4 | 7,251 | py | Python | tests/test_schema.py | hardbyte/clkhash | b118269a6db3f42f9967786c417a3f03adda125c | [
"Apache-2.0"
] | null | null | null | tests/test_schema.py | hardbyte/clkhash | b118269a6db3f42f9967786c417a3f03adda125c | [
"Apache-2.0"
] | null | null | null | tests/test_schema.py | hardbyte/clkhash | b118269a6db3f42f9967786c417a3f03adda125c | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import io
import json
import os
import unittest
from clkhash import schema
from clkhash.schema import SchemaError, MasterSchemaError
DATA_DIRECTORY = os.path.join(os.path.dirname(__file__),
'..', 'clkhash', 'data')
TEST_DATA_DIRECTORY = os.path.j... | 36.621212 | 75 | 0.481313 |
c5c4dca5e475665cd860725ae4c757cdcf07464c | 1,845 | py | Python | test/python/circuit/test_circuit_multi_registers.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | 1 | 2020-09-03T12:28:44.000Z | 2020-09-03T12:28:44.000Z | test/python/circuit/test_circuit_multi_registers.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | null | null | null | test/python/circuit/test_circuit_multi_registers.py | ismaila-at-za-ibm/qiskit-terra | 08303ec98ac7b33fde55266dc3a74466fbdcae95 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=unused-import
# pylint: disable=redefined-builtin
"""Test Qiskit's QuantumCircuit class for multiple regis... | 27.954545 | 77 | 0.663415 |
c4acf9be2b29cf8f4c1e94757394268d98c28766 | 987 | py | Python | transit-gw-example/transitgw/public_vpc.py | philbasford/adv_networking_demos | 4d00cdbcdc563434f9e57bcb27217ee0d8b787be | [
"Apache-2.0"
] | 1 | 2021-07-17T09:43:21.000Z | 2021-07-17T09:43:21.000Z | transit-gw-example/transitgw/public_vpc.py | philbasford/adv_networking_demos | 4d00cdbcdc563434f9e57bcb27217ee0d8b787be | [
"Apache-2.0"
] | null | null | null | transit-gw-example/transitgw/public_vpc.py | philbasford/adv_networking_demos | 4d00cdbcdc563434f9e57bcb27217ee0d8b787be | [
"Apache-2.0"
] | null | null | null | """The following file is released under the Apache 2 Licence, see LICENCE.txt."""
from aws_cdk import (
aws_ec2 as ec2,
core as cdk
)
from transitgw.jump_server import JumpServer
class PublicVPC(ec2.Vpc):
"""A VPC that only contains 3 public subnets with not NATs but does contain a IGW.
Args:
... | 26.675676 | 86 | 0.561297 |
9e10bb9700c3b1ca49e99f5c08f8c1f9ae30051b | 4,084 | py | Python | travis_pypi_setup.py | vilkasgroup/epages_client | 10e63d957ee45dc5d4df741064806f724fb1be1f | [
"MIT"
] | 3 | 2018-01-26T13:44:26.000Z | 2020-05-13T13:58:19.000Z | travis_pypi_setup.py | vilkasgroup/epages_client | 10e63d957ee45dc5d4df741064806f724fb1be1f | [
"MIT"
] | 53 | 2018-02-05T10:59:22.000Z | 2022-01-01T19:31:08.000Z | travis_pypi_setup.py | vilkasgroup/epages_client | 10e63d957ee45dc5d4df741064806f724fb1be1f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file."""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... | 31.90625 | 79 | 0.701273 |
858e9424f3e9281d8c2a7bc3f08490974af3eb1c | 3,981 | py | Python | setup.py | PierreARM/lisa | e9cfbd63b25821518f1254ed7905b505a5073450 | [
"Apache-2.0"
] | null | null | null | setup.py | PierreARM/lisa | e9cfbd63b25821518f1254ed7905b505a5073450 | [
"Apache-2.0"
] | null | null | null | setup.py | PierreARM/lisa | e9cfbd63b25821518f1254ed7905b505a5073450 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, Arm Limited and contributors.
#
# 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/l... | 29.932331 | 89 | 0.642301 |
e4a9be5224cea88db68cb6008068a5c6ccb0cfaa | 789 | py | Python | django_deployer/paas_templates/gondor/settings_gondor.py | natea/django-deployer | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | [
"MIT"
] | 19 | 2015-02-06T06:14:39.000Z | 2021-01-06T22:27:03.000Z | django_deployer/paas_templates/gondor/settings_gondor.py | natea/django-deployer | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | [
"MIT"
] | null | null | null | django_deployer/paas_templates/gondor/settings_gondor.py | natea/django-deployer | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | [
"MIT"
] | 2 | 2015-12-22T17:22:15.000Z | 2016-03-02T12:15:01.000Z | import os
import dj_database_url
from .settings import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
"default": dj_database_url.config(env="GONDOR_DATABASE_URL"),
}
MEDIA_ROOT = os.path.join(os.environ["GONDOR_DATA_DIR"], "site_media", "media")
LOGGING = {
"version": 1,
"disable_existing_loggers... | 19.725 | 79 | 0.505703 |
aa2904d64fbb70236f86bd6597f6aef941bef118 | 4,278 | py | Python | idf_to_hyetograph.py | yuriishizawa/idf_to_hyetograph | 833040cf08dd9aee676c9aaaf454711322446f36 | [
"MIT"
] | null | null | null | idf_to_hyetograph.py | yuriishizawa/idf_to_hyetograph | 833040cf08dd9aee676c9aaaf454711322446f36 | [
"MIT"
] | null | null | null | idf_to_hyetograph.py | yuriishizawa/idf_to_hyetograph | 833040cf08dd9aee676c9aaaf454711322446f36 | [
"MIT"
] | null | null | null | """
Created by Yuri Ishizawa
e-mail: yuriishizawa@gmail.com
2021
"""
import csv
import matplotlib.pyplot as plt
import pandas as pd
class idf_to_hyetograph:
def __init__(self, K, a, b, c, T, td, dt):
self.K, self.a, self.b, self.c, self.T, self.td, self.dt = K, a, b, c, T, td, dt
if td%dt == 0 and... | 33.952381 | 105 | 0.536466 |
85350882785d007299f4136f498487078ac828f1 | 1,893 | py | Python | src/commands/nickname.py | seisatsu/DennisMUD-ESP32 | b63d4b914c5e8d0f9714042997c64919b20be842 | [
"MIT"
] | 19 | 2018-10-02T03:58:46.000Z | 2021-04-09T13:09:23.000Z | commands/nickname.py | seisatsu/Dennis | 8f1892f21beba6b21b4f7b9ba3062296bb1dc4b9 | [
"MIT"
] | 100 | 2018-09-22T22:54:35.000Z | 2021-04-16T17:46:34.000Z | src/commands/nickname.py | seisatsu/DennisMUD-ESP32 | b63d4b914c5e8d0f9714042997c64919b20be842 | [
"MIT"
] | 1 | 2022-01-03T02:21:56.000Z | 2022-01-03T02:21:56.000Z | #######################
# Dennis MUD #
# nickname.py #
# Copyright 2018-2020 #
# Michael D. Reiley #
#######################
# **********
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal i... | 36.403846 | 84 | 0.699419 |
07f83f42e19aea0b4cb81574380f9f98aec136eb | 236 | py | Python | ocp_resources/installplan.py | kbidarkar/openshift-python-wrapper | 3cd4d6d3b71c82ff87f032a51510d9c9d207f6cb | [
"Apache-2.0"
] | 9 | 2021-07-05T18:35:55.000Z | 2021-12-31T03:09:39.000Z | ocp_resources/installplan.py | kbidarkar/openshift-python-wrapper | 3cd4d6d3b71c82ff87f032a51510d9c9d207f6cb | [
"Apache-2.0"
] | 418 | 2021-07-04T13:12:09.000Z | 2022-03-30T08:37:45.000Z | ocp_resources/installplan.py | kbidarkar/openshift-python-wrapper | 3cd4d6d3b71c82ff87f032a51510d9c9d207f6cb | [
"Apache-2.0"
] | 28 | 2021-07-04T12:48:18.000Z | 2022-02-22T15:19:30.000Z | from ocp_resources.resource import NamespacedResource
class InstallPlan(NamespacedResource):
api_group = NamespacedResource.ApiGroup.OPERATORS_COREOS_COM
class Status(NamespacedResource.Status):
COMPLETE = "Complete"
| 26.222222 | 64 | 0.800847 |
6f505d4b3223a2c863981605191cb408e76fa36a | 319 | py | Python | showdata.py | Telemin/buddhabrot | a7dc257064fc303b11491bc49819b0782139f81b | [
"Unlicense"
] | null | null | null | showdata.py | Telemin/buddhabrot | a7dc257064fc303b11491bc49819b0782139f81b | [
"Unlicense"
] | null | null | null | showdata.py | Telemin/buddhabrot | a7dc257064fc303b11491bc49819b0782139f81b | [
"Unlicense"
] | 1 | 2019-02-25T23:51:50.000Z | 2019-02-25T23:51:50.000Z | #!/usr/bin/env python3
import sys
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors as mc
def main():
data = np.loadtxt(sys.argv[1]) + 1
plt.hist(data.flatten())
plt.show()
plt.pcolor(data, cmap='gray')
plt.show()
return(0)
if __name__ == "__main__":
main()
| 15.95 | 38 | 0.639498 |
e82f1a96bcfb38e8f26dba57a3914d379ac12a42 | 4,176 | py | Python | wts/tests/csp/csp_default-src_cross-origin_style.py | Acidburn0zzz/web-testing-service | 1b46978e27a2e04f322d0f05f606ee96716642aa | [
"BSD-3-Clause"
] | null | null | null | wts/tests/csp/csp_default-src_cross-origin_style.py | Acidburn0zzz/web-testing-service | 1b46978e27a2e04f322d0f05f606ee96716642aa | [
"BSD-3-Clause"
] | null | null | null | wts/tests/csp/csp_default-src_cross-origin_style.py | Acidburn0zzz/web-testing-service | 1b46978e27a2e04f322d0f05f606ee96716642aa | [
"BSD-3-Clause"
] | null | null | null | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
_CSP = "default-src " + url1 ... | 43.957895 | 107 | 0.663314 |
9230a4a58aca6e866f8a29ca06cd77d3f928edfe | 1,932 | py | Python | all_data_norm.py | anikaanzum/NetworkDataAnalysis | 13f008233ccb4e7c16a576a6e068daf9c14510d6 | [
"MIT"
] | null | null | null | all_data_norm.py | anikaanzum/NetworkDataAnalysis | 13f008233ccb4e7c16a576a6e068daf9c14510d6 | [
"MIT"
] | null | null | null | all_data_norm.py | anikaanzum/NetworkDataAnalysis | 13f008233ccb4e7c16a576a6e068daf9c14510d6 | [
"MIT"
] | 1 | 2022-03-16T10:15:06.000Z | 2022-03-16T10:15:06.000Z | import sys
import xlrd
import csv
import pandas
import os
import glob
import os.path
def read_csv(filename):
data=[]
with open(filename) as csvfile:
readCSV = csv.reader(csvfile)
for row in readCSV:
data.append(row)
#print(data)
header=data[0]
#print(header)
ret... | 20.125 | 62 | 0.693064 |
818b395b7b55a334449416eeaca5db9b3ca51cb5 | 34,606 | py | Python | google/appengine/api/images/__init__.py | qsnake/google_appengine | 6efcc6e4dd38fe2d2c210b57d3444c26b428af1f | [
"Apache-2.0"
] | 1 | 2015-10-28T21:28:29.000Z | 2015-10-28T21:28:29.000Z | google/appengine/api/images/__init__.py | lann/python-google-appengine | 2f1fe26e8429f491b034a5417f7c0c8f3a0247ab | [
"Apache-2.0"
] | null | null | null | google/appengine/api/images/__init__.py | lann/python-google-appengine | 2f1fe26e8429f491b034a5417f7c0c8f3a0247ab | [
"Apache-2.0"
] | 5 | 2016-05-26T18:35:17.000Z | 2020-04-15T06:53:24.000Z | #!/usr/bin/env python
#
# Copyright 2007 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 o... | 34.9909 | 81 | 0.683408 |
cb86844490805357512bf0f15acfbb8e8a019e8e | 225 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 24/24.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | 50-Python-Exercises/Exercises/Exercise 24/24.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | 50-Python-Exercises/Exercises/Exercise 24/24.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Complete the script so it prints out the expected output
d = dict(a = list(range(1, 11)), b = list(range(11, 21)), c = list(range(21, 31)))
print(d.items())
for key, value in d.items():
print(key, "has value", value)
| 25 | 82 | 0.64 |
bfe01c3332b83459fe6d42bc4931ef5ad2855b92 | 633 | py | Python | hammr/__init__.py | MaxTakahashi/hammr | cfe593ccfdddb7f98185e561feed6a40a866b585 | [
"Apache-2.0"
] | null | null | null | hammr/__init__.py | MaxTakahashi/hammr | cfe593ccfdddb7f98185e561feed6a40a866b585 | [
"Apache-2.0"
] | null | null | null | hammr/__init__.py | MaxTakahashi/hammr | cfe593ccfdddb7f98185e561feed6a40a866b585 | [
"Apache-2.0"
] | null | null | null | # Copyright 2007-2015 UShareSoft SAS, 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 requi... | 45.214286 | 78 | 0.731438 |
020843088f6293c261fb21ef6b97446c7e3a4e6f | 20,523 | py | Python | sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/synapse/azure-synapse-accesscontrol/azure/synapse/accesscontrol/operations/_access_control_client_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # 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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.222973 | 144 | 0.655411 |
4bb9be3e8038b885810a8d692e4f35e6bec65ccd | 2,118 | py | Python | mooringlicensing/helpers.py | GraemeMuller/mooringlicensing | 2b2594189fb88f4add3fbc979a60a05397aaa491 | [
"Apache-2.0"
] | null | null | null | mooringlicensing/helpers.py | GraemeMuller/mooringlicensing | 2b2594189fb88f4add3fbc979a60a05397aaa491 | [
"Apache-2.0"
] | 2 | 2021-03-05T06:48:11.000Z | 2021-03-26T08:14:17.000Z | mooringlicensing/helpers.py | GraemeMuller/mooringlicensing | 2b2594189fb88f4add3fbc979a60a05397aaa491 | [
"Apache-2.0"
] | 15 | 2021-03-02T01:40:12.000Z | 2022-02-15T08:26:09.000Z | from __future__ import unicode_literals
from ledger.accounts.models import EmailUser
from django.conf import settings
import logging
logger = logging.getLogger(__name__)
def belongs_to(user, group_name):
"""
Check if the user belongs to the given group.
:param user:
:param group_name:
:return:
... | 37.821429 | 154 | 0.752597 |
e5aac0dc5b07eb1018cf4c7046cae715f8f4b3ff | 4,022 | py | Python | test/functional/p2p_zpos_fakestake.py | pacificao/agrarian | 184ece190c9f531f16546f4e9d3f8f2ee5d28a28 | [
"MIT"
] | null | null | null | test/functional/p2p_zpos_fakestake.py | pacificao/agrarian | 184ece190c9f531f16546f4e9d3f8f2ee5d28a28 | [
"MIT"
] | null | null | null | test/functional/p2p_zpos_fakestake.py | pacificao/agrarian | 184ece190c9f531f16546f4e9d3f8f2ee5d28a28 | [
"MIT"
] | 1 | 2022-02-10T12:39:58.000Z | 2022-02-10T12:39:58.000Z | #!/usr/bin/env python3
# Copyright (c) 2019 The PIVX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Covers the scenario of a zPoS block where the coinstake input is a zerocoin spend
of an already spent coin.
'''
f... | 37.588785 | 136 | 0.618846 |
f042407c11c1bc588dc2a12b65909abd5dfb47a4 | 4,913 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20191212/get_sql_resource_sql_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20191212/get_sql_resource_sql_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20191212/get_sql_resource_sql_database.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"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
fro... | 37.219697 | 505 | 0.65113 |
d93b19b41e62c991ed4f600393fd0c2c3ec7da00 | 23,640 | py | Python | tests/test_utils.py | portoise-yin/aihwkit | 856530f7d782046fb094d1dc6ce5d9ce0159d8ff | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | portoise-yin/aihwkit | 856530f7d782046fb094d1dc6ce5d9ce0159d8ff | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | portoise-yin/aihwkit | 856530f7d782046fb094d1dc6ce5d9ce0159d8ff | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# (C) Copyright 2020, 2021 IBM. All Rights Reserved.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modificatio... | 39.20398 | 96 | 0.669712 |
58bb506593c3ae35a98974a457423ccd5ad968e8 | 3,432 | py | Python | main.py | loadedice/brainfuck | 2d069ed54deb5fcae317ff0797568206a050f71f | [
"MIT"
] | 1 | 2017-03-17T17:14:35.000Z | 2017-03-17T17:14:35.000Z | main.py | loadedice/brainfuck | 2d069ed54deb5fcae317ff0797568206a050f71f | [
"MIT"
] | null | null | null | main.py | loadedice/brainfuck | 2d069ed54deb5fcae317ff0797568206a050f71f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from sys import stderr, stdin, argv
from ctypes import c_ubyte
def bf_parse(program, strict=False):
"""
Takes a brainfuck string, if strict == True checks that it's all valid brainfuck
returns a dictionary to help deal with jumping around in the program
I had other ideas about ... | 33.980198 | 116 | 0.593823 |
862b07a91d738f63686acb639bcf957e6e778b47 | 381 | py | Python | ML/ML/asgi.py | Nagababu91768/house-price-prediction-ml-app | 5a7a1e3b6306359f96ed1d9ff7f6ed558d9d3926 | [
"MIT"
] | null | null | null | ML/ML/asgi.py | Nagababu91768/house-price-prediction-ml-app | 5a7a1e3b6306359f96ed1d9ff7f6ed558d9d3926 | [
"MIT"
] | null | null | null | ML/ML/asgi.py | Nagababu91768/house-price-prediction-ml-app | 5a7a1e3b6306359f96ed1d9ff7f6ed558d9d3926 | [
"MIT"
] | null | null | null | """
ASGI config for ML project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_M... | 22.411765 | 78 | 0.779528 |
2c1d1e59ae4fde16cf4f162fca6b47280bd15e85 | 9,350 | py | Python | DataConnectors/ZoomReports/ZoomSentinelConnector/__init__.py | johnbilliris/Azure-Sentinel | ef3c2e3919023e80e15a94544e06e37623e7c1d3 | [
"MIT"
] | 2,227 | 2019-02-25T09:34:46.000Z | 2022-03-31T21:30:59.000Z | DataConnectors/ZoomReports/ZoomSentinelConnector/__init__.py | johnbilliris/Azure-Sentinel | ef3c2e3919023e80e15a94544e06e37623e7c1d3 | [
"MIT"
] | 1,728 | 2019-02-25T17:18:16.000Z | 2022-03-31T23:49:18.000Z | DataConnectors/ZoomReports/ZoomSentinelConnector/__init__.py | johnbilliris/Azure-Sentinel | ef3c2e3919023e80e15a94544e06e37623e7c1d3 | [
"MIT"
] | 1,624 | 2019-02-28T16:17:38.000Z | 2022-03-31T18:00:02.000Z | import azure.functions as func
import jwt
import datetime
import json
import base64
import hashlib
import hmac
import requests
import re
import os
import logging
from .state_manager import StateManager
jwt_api_key = os.environ['ZoomApiKey']
jwt_api_secret = os.environ['ZoomApiSecret']
customer_id = os.e... | 44.52381 | 122 | 0.607059 |
d565b0605e7c547850eea95409bf1708c77d968c | 858 | gyp | Python | lib/mac/binding.gyp | abiatarnt/noble | d9c4748e3d2220c807e33a624b2b719c8d76228d | [
"MIT"
] | 2 | 2021-09-24T13:51:09.000Z | 2021-09-24T14:08:36.000Z | lib/mac/binding.gyp | stoprocent/noble | ff82ecd83978d8be155ce00e36e72fd6f91ca882 | [
"MIT"
] | 1 | 2021-09-28T09:08:15.000Z | 2021-09-28T09:08:15.000Z | lib/mac/binding.gyp | stoprocent/noble | ff82ecd83978d8be155ce00e36e72fd6f91ca882 | [
"MIT"
] | 1 | 2021-09-24T14:05:29.000Z | 2021-09-24T14:05:29.000Z | {
'targets': [
{
'target_name': 'binding',
'sources': [ 'src/noble_mac.mm', 'src/napi_objc.mm', 'src/ble_manager.mm', 'src/objc_cpp.mm', 'src/callbacks.cc' ],
'include_dirs': ["<!@(node -p \"require('node-addon-api').include\")"],
'dependencies': ["<!(node -p \"require('node-addon-a... | 31.777778 | 123 | 0.504662 |
645f0d632772e7027a2bc622b80488e9356b74e0 | 32,198 | py | Python | sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/aio/operations/_registered_servers_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # 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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 54.114286 | 256 | 0.677775 |
a1c9182828de1979359bb4726296393b868639a7 | 1,243 | py | Python | aiozoom/components/recording.py | vladisa88/aiozoom | 5000827650d27c826e895b1b9691377111b3ef6b | [
"MIT"
] | 2 | 2021-02-09T10:40:50.000Z | 2021-02-19T07:53:26.000Z | aiozoom/components/recording.py | vladisa88/aiozoom | 5000827650d27c826e895b1b9691377111b3ef6b | [
"MIT"
] | null | null | null | aiozoom/components/recording.py | vladisa88/aiozoom | 5000827650d27c826e895b1b9691377111b3ef6b | [
"MIT"
] | null | null | null | from aiozoom.components.base import Base
class Recording(Base):
"""
Class describing `Recording` logic of Zoom API
learn more:
https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/
"""
async def get_recording(self, meeting_id: str) -> dict:
"""
Get meeting's... | 31.871795 | 76 | 0.641191 |
bc66fa4b05d98fe77c61ec138056961f93eeb27f | 351 | py | Python | configs/dota_1.5/hbb/retinanet_r50_fpn_1x_dota1.5.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | configs/dota_1.5/hbb/retinanet_r50_fpn_1x_dota1.5.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | configs/dota_1.5/hbb/retinanet_r50_fpn_1x_dota1.5.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../_base_/models/retinanet_r50_fpn.py',
'../../_base_/datasets/dota_detection_v1.5_hbb.py',
'../../_base_/schedules/schedule_2x.py', '../../_base_/default_runtime.py'
]
model = dict(
bbox_head=dict(
num_classes=16,
)
)
optimizer =dict(lr=0.01)
work_dir = './work_d... | 25.071429 | 78 | 0.62963 |
8b8c0fa46dbd651a24431464ff14b52aeacb4abb | 553 | py | Python | cbench/virtual_call/vtable_reuse_uaf.py | vul337/cfi-eval | 7d7801cf44cc650127d692c2a7222434375ac6aa | [
"Apache-2.0"
] | 16 | 2020-11-17T08:17:10.000Z | 2022-03-16T07:47:44.000Z | cbench/virtual_call/vtable_reuse_uaf.py | vul337/cfi-eval | 7d7801cf44cc650127d692c2a7222434375ac6aa | [
"Apache-2.0"
] | null | null | null | cbench/virtual_call/vtable_reuse_uaf.py | vul337/cfi-eval | 7d7801cf44cc650127d692c2a7222434375ac6aa | [
"Apache-2.0"
] | 4 | 2020-12-13T10:44:30.000Z | 2021-12-20T13:34:37.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwn import *
context.log_level = "debug"
r = process('./vtable_reuse_uaf')
def usenote():
r.recvuntil("4. exit\n")
r.sendline("1")
def afternote(_len,_data):
r.recvuntil("4. exit\n")
r.sendline("2")
r.recvuntil("len:")
r.sendline(_len)
r... | 15.8 | 33 | 0.629295 |
be0a00ab69c8436198704dbd8236ce8831555e5f | 613 | py | Python | utils/config.py | recogni/tf-hrnet | 1f21d9b86211de480f01ca1fda2f58e427e93261 | [
"BSD-3-Clause"
] | 83 | 2019-08-19T08:40:35.000Z | 2022-03-31T11:00:21.000Z | utils/config.py | Alabenba/tf-hrnet | 949beb420d4a1af9974700534906184909e219ea | [
"BSD-3-Clause"
] | 14 | 2019-09-02T09:03:32.000Z | 2022-02-09T23:32:18.000Z | netutils/config.py | sramirez/hrnet-pose-tf | 5b7498d5fc86e18171f45ee6acfacbfea34a2339 | [
"BSD-3-Clause"
] | 21 | 2019-08-20T02:38:55.000Z | 2022-01-05T07:13:31.000Z | import configparser
import ast
def load_net_cfg_from_file(cfgfile):
def load_from_options(section, cfg):
options = dict()
xdict = dict(cfg.items(section))
for key, value in xdict.items():
try:
value = ast.literal_eval(value)
except:
v... | 23.576923 | 60 | 0.598695 |
eaa619295d266558568d47f73256caf95bb64bc0 | 1,053 | py | Python | Autonomous Work/AutonomousWork_2/Question4.py | Aujasvi-Moudgil/Classification-and-Representation-Learning | 0ceb461f82d3d92f7d183fa7c8f61e20d53cfb52 | [
"MIT"
] | null | null | null | Autonomous Work/AutonomousWork_2/Question4.py | Aujasvi-Moudgil/Classification-and-Representation-Learning | 0ceb461f82d3d92f7d183fa7c8f61e20d53cfb52 | [
"MIT"
] | null | null | null | Autonomous Work/AutonomousWork_2/Question4.py | Aujasvi-Moudgil/Classification-and-Representation-Learning | 0ceb461f82d3d92f7d183fa7c8f61e20d53cfb52 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 8 13:55:10 2017
@author: Aujasvi
"""
from numpy import*
import matplotlib.pyplot as plt
#Load the dataset
data = loadtxt('polynome.data')
#Seprate the input from the output
X = data[:, 0]
Y = data[:, 1]
#Spliting the data into training & test data
X_train_data = X[:int... | 28.459459 | 83 | 0.690408 |
35698d18f457f905c436b4433f0d40e293fbe3ac | 2,393 | py | Python | collabfilter/databunch.py | manikyabard/DashAI | 723f4c4ced3838e2872ec27848950f92c6c79b3e | [
"Apache-2.0"
] | 7 | 2020-08-26T09:36:54.000Z | 2021-12-21T15:46:32.000Z | collabfilter/databunch.py | JoeRishon/DashAI | 68d1b01088a65e2062d96b47b083fa8f5c82b27c | [
"Apache-2.0"
] | 16 | 2020-08-25T18:44:45.000Z | 2022-03-25T19:12:36.000Z | collabfilter/databunch.py | JoeRishon/DashAI | 68d1b01088a65e2062d96b47b083fa8f5c82b27c | [
"Apache-2.0"
] | 10 | 2020-09-30T19:27:17.000Z | 2021-04-04T14:50:31.000Z | from fastai.collab import *
from core.databunch import DashDatabunch
class DashCollabDatabunch:
"""
Base DataBunch for collaborative filtering.
"""
@staticmethod
def create_collab_databunch(response):
"""
Creates a databunch for collaborative filtering using the values specified in response/Dash... | 41.982456 | 107 | 0.72127 |
c99e8a9b2a001df22e5de8465191094aa37e6bd6 | 18,343 | py | Python | featuretools/tests/entityset_tests/test_serialization.py | ridicolos/featuretools | 0af409da206e0b691ec64a3e0e618a43f1701dd9 | [
"BSD-3-Clause"
] | 942 | 2020-11-10T02:59:39.000Z | 2022-03-31T16:34:33.000Z | featuretools/tests/entityset_tests/test_serialization.py | 167rgc911/featuretools | bbad3f7392b203b7b9c250a93465052e7fc06bbc | [
"BSD-3-Clause"
] | 721 | 2020-11-09T23:12:06.000Z | 2022-03-31T22:33:35.000Z | featuretools/tests/entityset_tests/test_serialization.py | 167rgc911/featuretools | bbad3f7392b203b7b9c250a93465052e7fc06bbc | [
"BSD-3-Clause"
] | 127 | 2020-11-10T10:12:30.000Z | 2022-03-27T08:55:05.000Z | import json
import logging
import os
import tempfile
from urllib.request import urlretrieve
import boto3
import pandas as pd
import pytest
import woodwork.type_sys.type_system as ww_type_system
from woodwork.logical_types import Datetime, LogicalType, Ordinal
from woodwork.serialize import typing_info_to_dict
from woo... | 38.374477 | 126 | 0.71973 |
65f50cd1ab08b668d8b0446b3706294273164321 | 11,701 | py | Python | mmf/common/registry.py | san2597/mmf | c0812e9281c6e679cb7f00af78a5eda267820aab | [
"BSD-3-Clause"
] | 2 | 2021-02-22T12:15:42.000Z | 2021-05-02T15:22:24.000Z | mmf/common/registry.py | san2597/mmf | c0812e9281c6e679cb7f00af78a5eda267820aab | [
"BSD-3-Clause"
] | 7 | 2021-03-01T21:16:26.000Z | 2022-02-27T07:07:11.000Z | mmf/common/registry.py | krantirk/MMF | 2e4acaad7ca8eee4319e1205a560eed81733a0be | [
"BSD-3-Clause"
] | 1 | 2022-03-04T14:19:43.000Z | 2022-03-04T14:19:43.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
"""
Registry is central source of truth in MMF. Inspired from Redux's
concept of global store, Registry maintains mappings of various information
to unique keys. Special functions in registry can be used as decorators to
register different kind of classes.
Import the ... | 28.539024 | 80 | 0.597214 |
a8baa06a1f4f9569c0e3b5773b6e905103f2b117 | 5,467 | py | Python | UCourse/questions/views.py | Natsu1270/UCourse | e8c814d91e54f5f51e4a0fa2df177ebb59544dc2 | [
"MIT"
] | 1 | 2020-08-31T22:40:27.000Z | 2020-08-31T22:40:27.000Z | UCourse/questions/views.py | Natsu1270/UCourse | e8c814d91e54f5f51e4a0fa2df177ebb59544dc2 | [
"MIT"
] | 13 | 2020-08-05T16:17:09.000Z | 2022-03-12T00:18:42.000Z | UCourse/questions/views.py | Natsu1270/UCourse | e8c814d91e54f5f51e4a0fa2df177ebb59544dc2 | [
"MIT"
] | null | null | null | from django.db.models import Q
from rest_framework import generics, permissions, status
from rest_framework.response import Response
from questions import serializers
from questions.models import Question, Choice
from exams.models import Exam
from copy import deepcopy
class QuestionDetailAPI(generics.RetrieveUpdateDe... | 35.5 | 120 | 0.651546 |
4d0dde9e150e96ac17d650e26fcd21708ec64c2f | 98 | py | Python | IAF/layers/__init__.py | MrHuff/DIF-NLDL | 4d032cb0522efd62ea754a6c5d02b7015ef2f62b | [
"MIT"
] | null | null | null | IAF/layers/__init__.py | MrHuff/DIF-NLDL | 4d032cb0522efd62ea754a6c5d02b7015ef2f62b | [
"MIT"
] | null | null | null | IAF/layers/__init__.py | MrHuff/DIF-NLDL | 4d032cb0522efd62ea754a6c5d02b7015ef2f62b | [
"MIT"
] | null | null | null | from IAF.layers.linear import LinearVariational
from IAF.layers.autoregressive import LinearMasked | 49 | 50 | 0.887755 |
77291388aef5b8fe94df0a92ffb88ce80d27746d | 465 | py | Python | minigest/fisco/viewsets/natura_operazione_iva.py | ctrlmaniac/minigest | 2bfceb57e41c872e4112e24d0e6991164846888b | [
"MIT"
] | null | null | null | minigest/fisco/viewsets/natura_operazione_iva.py | ctrlmaniac/minigest | 2bfceb57e41c872e4112e24d0e6991164846888b | [
"MIT"
] | 1 | 2021-09-22T19:10:20.000Z | 2021-09-22T19:10:20.000Z | minigest/fisco/viewsets/natura_operazione_iva.py | ctrlmaniac/minigest | 2bfceb57e41c872e4112e24d0e6991164846888b | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework import permissions, viewsets
from ..models import NaturaOperazioneIVA
from ..serializers import NaturaOperazioneIVASerializer
permission = permissions.AllowAny if settings.DEBUG else permissions.IsAuthenticated
class NaturaOperazioneIVAViewSet(viewsets.ModelViewS... | 33.214286 | 84 | 0.84086 |
ba8484d67d3402df53526f4655dd8c886a795620 | 199 | py | Python | testData/search/grandChildKeywordArgumentWithPythonClass.py | alek-sun/pydantic-pycharm-plugin | 6b07519aadf0ff8b8a644c1f9ede88e09c687c80 | [
"Apache-2.0",
"MIT"
] | 238 | 2019-08-05T12:46:09.000Z | 2022-03-25T08:53:25.000Z | testData/search/grandChildKeywordArgumentWithPythonClass.py | alek-sun/pydantic-pycharm-plugin | 6b07519aadf0ff8b8a644c1f9ede88e09c687c80 | [
"Apache-2.0",
"MIT"
] | 415 | 2019-07-15T17:39:35.000Z | 2022-03-31T01:18:38.000Z | testData/search/grandChildKeywordArgumentWithPythonClass.py | collerek/pydantic-pycharm-plugin | 7068ece42334cc9fbe927d779d199c86d5139888 | [
"Apache-2.0",
"MIT"
] | 7 | 2019-08-09T01:03:16.000Z | 2022-02-08T03:28:19.000Z | from pydantic import BaseModel, validator
class A(BaseModel):
pass
class B(A):
pass
class D:
pass
class C(B, D):
pass
A(abc='cde')
B(abc='cde')
C(ab<caret>c='cde')
## count: 0 | 9.47619 | 41 | 0.603015 |
c4489da0bf4aed6aface1a931557eaff74b55e98 | 3,986 | py | Python | alipay/aop/api/request/ZhimaCreditPeZmgoAgreementQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/ZhimaCreditPeZmgoAgreementQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/ZhimaCreditPeZmgoAgreementQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZhimaCreditPeZmgoAgreementQueryModel import ZhimaCreditPeZmgoAgreementQueryModel
class ZhimaCreditPeZmgoAgreementQueryRequest(object... | 27.489655 | 148 | 0.64576 |
e24ada44bd2fdf1df6a5105db9607918a2b01ace | 2,526 | py | Python | instr.py | frorruchi/HeartCheck | 2e2dd3dfaaad2c1166c10ff6352d4170c3a41604 | [
"CC0-1.0"
] | null | null | null | instr.py | frorruchi/HeartCheck | 2e2dd3dfaaad2c1166c10ff6352d4170c3a41604 | [
"CC0-1.0"
] | null | null | null | instr.py | frorruchi/HeartCheck | 2e2dd3dfaaad2c1166c10ff6352d4170c3a41604 | [
"CC0-1.0"
] | null | null | null | from PyQt5.QtCore import QTime
win_x, win_y = 200, 100
win_width, win_height = 1000, 600
txt_hello = 'Добро пожаловать в программу по определению состояния здоровья!'
txt_next = 'Начать'
txt_instruction = ('Данное приложение позволит вам с помощью теста Руфье провести первичную диагностику вашего здоровья.\n'
... | 60.142857 | 339 | 0.743864 |
81315adf065f888b24ce615f455cdf34ec25c8de | 2,557 | py | Python | mmfashion/models/embed_extractor/embed_extract.py | RyanJiang0416/mmfashion | 89f56e3e631b4f5c1403f7e8897396cc02b5aa91 | [
"Apache-2.0"
] | 952 | 2019-10-31T01:49:07.000Z | 2022-03-29T11:33:27.000Z | mmfashion/models/embed_extractor/embed_extract.py | RyanJiang0416/mmfashion | 89f56e3e631b4f5c1403f7e8897396cc02b5aa91 | [
"Apache-2.0"
] | 135 | 2019-11-02T07:09:04.000Z | 2022-03-17T06:08:11.000Z | mmfashion/models/embed_extractor/embed_extract.py | RyanJiang0416/mmfashion | 89f56e3e631b4f5c1403f7e8897396cc02b5aa91 | [
"Apache-2.0"
] | 239 | 2019-10-31T02:08:40.000Z | 2022-03-22T03:14:38.000Z | import torch.nn as nn
from ..builder import build_loss
from ..registry import EMBEDEXTRACTOR
@EMBEDEXTRACTOR.register_module
class EmbedExtractor(nn.Module):
def __init__(self,
inchannels,
inter_channels,
loss_id=dict(
type='CELoss',
... | 33.644737 | 75 | 0.550645 |
c8361bcef7c06cb1273dbad3f1c02709bf4674b0 | 9,356 | py | Python | tests/integration/popular_repos/popular_repos.py | hiro511/rules_go | a9a8548ceb9abdd7293df1a77e3917238ddfdccd | [
"Apache-2.0"
] | null | null | null | tests/integration/popular_repos/popular_repos.py | hiro511/rules_go | a9a8548ceb9abdd7293df1a77e3917238ddfdccd | [
"Apache-2.0"
] | null | null | null | tests/integration/popular_repos/popular_repos.py | hiro511/rules_go | a9a8548ceb9abdd7293df1a77e3917238ddfdccd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2017 The Bazel 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 req... | 39.476793 | 122 | 0.639376 |
6db641f33d18662a78aff01101cd79de86cf0fcd | 3,566 | py | Python | mantra/mantra_solver.py | durandtibo/mantra-python | a35dfd93f92f7f510a212ee5356ae4d776a27849 | [
"MIT"
] | 1 | 2019-02-22T09:48:04.000Z | 2019-02-22T09:48:04.000Z | mantra/mantra_solver.py | durandtibo/mantra-python | a35dfd93f92f7f510a212ee5356ae4d776a27849 | [
"MIT"
] | null | null | null | mantra/mantra_solver.py | durandtibo/mantra-python | a35dfd93f92f7f510a212ee5356ae4d776a27849 | [
"MIT"
] | null | null | null |
import time
from mantra.util.data.labeled_object import LabeledObject
from mantra.util.solver.loss import Loss
from mantra.util.solver.sgd_solver import SGDSolver
from mantra.util.solver.ssg_solver import SSGSolver
class MantraLoss(Loss):
def __str__(self):
return "MantraLoss"
def evaluate(self, model, x, y)... | 29.966387 | 154 | 0.661526 |
9f1032b25a86a7922e2ba9f8bf85956e1680122c | 922 | py | Python | data_processing/cut_and_remove_stop_words.py | lvyufeng/cnki_h5_papers_auto_downloader | 8b2f92cbee2f3de9afa3754ee971cdc60712310e | [
"MIT"
] | 2 | 2020-10-14T11:44:16.000Z | 2021-08-30T13:43:30.000Z | data_processing/cut_and_remove_stop_words.py | lvyufeng/cnki_h5_papers_auto_downloader | 8b2f92cbee2f3de9afa3754ee971cdc60712310e | [
"MIT"
] | null | null | null | data_processing/cut_and_remove_stop_words.py | lvyufeng/cnki_h5_papers_auto_downloader | 8b2f92cbee2f3de9afa3754ee971cdc60712310e | [
"MIT"
] | null | null | null | import jieba
import pymongo
def stop_words_list():
stop_words = [line.strip() for line in open('stopword.txt','r+',encoding='UTF-8').readlines()]
return stop_words
def cut_words(sentence):
sentence_cut = jieba.cut(sentence.strip())
stop_words = stop_words_list()
output = ''
for word in sent... | 23.641026 | 98 | 0.621475 |
a4b56c8a5c8c22471b9971824ea5601877f8a412 | 914 | py | Python | DAEGC/utils.py | JLUVicent/DAEGC | 9a4cc50e40e8521fafb00960d1adf8216674c8f6 | [
"MIT"
] | 32 | 2021-03-26T13:15:34.000Z | 2022-03-14T06:07:57.000Z | DAEGC/utils.py | JLUVicent/DAEGC | 9a4cc50e40e8521fafb00960d1adf8216674c8f6 | [
"MIT"
] | 3 | 2021-06-05T12:06:57.000Z | 2021-12-10T03:09:20.000Z | DAEGC/utils.py | JLUVicent/DAEGC | 9a4cc50e40e8521fafb00960d1adf8216674c8f6 | [
"MIT"
] | 8 | 2021-04-25T01:32:22.000Z | 2022-03-30T08:16:20.000Z | import numpy as np
import torch
from sklearn.preprocessing import normalize
from torch_geometric.datasets import Planetoid
def get_dataset(dataset):
datasets = Planetoid('./dataset', dataset)
return datasets
def data_preprocessing(dataset):
dataset.adj = torch.sparse_coo_tensor(
dataset.edge_ind... | 27.69697 | 121 | 0.702407 |
081b3b75dd2cf5d1e7ea32e0173a33362e465e5b | 2,173 | py | Python | coogger/cooggerapi/serializers.py | adilkhan8000/coogger | 0d9350116bec29c0c4f5229118e4045c9e64d796 | [
"MIT"
] | null | null | null | coogger/cooggerapi/serializers.py | adilkhan8000/coogger | 0d9350116bec29c0c4f5229118e4045c9e64d796 | [
"MIT"
] | null | null | null | coogger/cooggerapi/serializers.py | adilkhan8000/coogger | 0d9350116bec29c0c4f5229118e4045c9e64d796 | [
"MIT"
] | null | null | null | from rest_framework import serializers
# models
from cooggerapp.models import (
Content, OtherInformationOfUsers,
SearchedWords, UserFollow)
from django_steemconnect.models import SteemConnectUser, Community
class SearchedWordsSerializer(serializers.ModelSerializer):
class Meta:
model = Searched... | 23.619565 | 90 | 0.525541 |
44a686e61455375dc99ff3ab4de0ba790454f6ea | 24,431 | py | Python | neutron/tests/unit/ml2/drivers/test_l2population.py | plumgrid/plumgrid-quantum | dbd7e472ca28d22d694eeeba47e0738985583961 | [
"Apache-2.0"
] | 1 | 2016-04-23T21:33:31.000Z | 2016-04-23T21:33:31.000Z | neutron/tests/unit/ml2/drivers/test_l2population.py | plumgrid/plumgrid-quantum | dbd7e472ca28d22d694eeeba47e0738985583961 | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/ml2/drivers/test_l2population.py | plumgrid/plumgrid-quantum | dbd7e472ca28d22d694eeeba47e0738985583961 | [
"Apache-2.0"
] | 4 | 2015-04-14T10:06:51.000Z | 2019-10-02T01:28:34.000Z | # Copyright (c) 2013 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 ... | 44.179024 | 78 | 0.430396 |
9a7838d1958e4033bd7742faeb1993b416a6a815 | 601 | py | Python | algorithms/symmetric_tree.py | kainonly/leetcode | 83a84ad48d517eb7f1377cb2a3aa3fe763da6627 | [
"MIT"
] | null | null | null | algorithms/symmetric_tree.py | kainonly/leetcode | 83a84ad48d517eb7f1377cb2a3aa3fe763da6627 | [
"MIT"
] | null | null | null | algorithms/symmetric_tree.py | kainonly/leetcode | 83a84ad48d517eb7f1377cb2a3aa3fe763da6627 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def isSymmetric(self, root: TreeNode) -> bool:
def isSame(node1: TreeNode, node2: TreeNode):
if ... | 31.631579 | 113 | 0.605657 |
bba6b30d93593ff8a33d70cad5d3127a62a6dd4c | 349,512 | py | Python | ogc_server.py | timebackzhou/ogc_server | 3355ebfafa4075e700bc9d55dbc727adc3626f09 | [
"MIT"
] | null | null | null | ogc_server.py | timebackzhou/ogc_server | 3355ebfafa4075e700bc9d55dbc727adc3626f09 | [
"MIT"
] | null | null | null | ogc_server.py | timebackzhou/ogc_server | 3355ebfafa4075e700bc9d55dbc727adc3626f09 | [
"MIT"
] | 1 | 2019-09-16T14:02:28.000Z | 2019-09-16T14:02:28.000Z | # -*- coding: utf-8 -*-
import codecs
import os, sys
import copy
import random
import json
import math
import decimal
import datetime
import threading
import exceptions
import time
import base64
import md5
from gevent import socket
import urllib, urllib2, urlparse
from socket import error
import errno
import subproces... | 45.568709 | 273 | 0.569165 |
25bf64e0e63e81ecc1320268515b02375195678f | 13,699 | py | Python | cumulusci/cli/service.py | SFDO-Tooling/CumulusCI | 08bb30eb24eae0b33cff755dfba40760317d7c0f | [
"BSD-3-Clause"
] | 163 | 2018-09-13T18:49:34.000Z | 2022-03-25T08:37:15.000Z | cumulusci/cli/service.py | SFDO-Tooling/CumulusCI | 08bb30eb24eae0b33cff755dfba40760317d7c0f | [
"BSD-3-Clause"
] | 1,280 | 2018-09-11T20:09:37.000Z | 2022-03-31T18:40:21.000Z | cumulusci/cli/service.py | SFDO-Tooling/CumulusCI | 08bb30eb24eae0b33cff755dfba40760317d7c0f | [
"BSD-3-Clause"
] | 93 | 2018-09-13T07:29:22.000Z | 2022-03-26T23:15:48.000Z | import json
import os
from pathlib import Path
from typing import Callable, Optional
import click
from cumulusci.core.config import ServiceConfig
from cumulusci.core.exceptions import CumulusCIException, ServiceNotConfigured
from cumulusci.core.utils import import_class, import_global
from .runtime import pass_runti... | 37.842541 | 163 | 0.628294 |
0532d73c938a1ee33d7f7889b9bf3affbabc5a55 | 2,983 | py | Python | model/sample.py | telatin/qi-irida-uploader | c3e64857dd8d02045062afbf0eb9f9989951a429 | [
"Apache-2.0"
] | 1 | 2019-04-10T12:37:00.000Z | 2019-04-10T12:37:00.000Z | model/sample.py | telatin/qi-irida-uploader | c3e64857dd8d02045062afbf0eb9f9989951a429 | [
"Apache-2.0"
] | null | null | null | model/sample.py | telatin/qi-irida-uploader | c3e64857dd8d02045062afbf0eb9f9989951a429 | [
"Apache-2.0"
] | 2 | 2019-04-10T11:58:24.000Z | 2020-02-07T17:06:17.000Z | """
A Sample will store (key: value) pairs using a dictionary.
Keys from a sequencer include: 'sampleName','description'
Keys from Irida will include these AND many others
"""
from cerberus import Validator, TypeDefinition
from copy import deepcopy
from .sequence_file import SequenceFile
class Sample:
# Defin... | 31.072917 | 93 | 0.552464 |
7786bcfd48c992c2046454a1b9ba51f9cfa0a079 | 3,975 | py | Python | ibis/backends/pandas/tests/test_aggcontext.py | GrapeBaBa/ibis | 507bb14efdcfd719a0487ee23fe1c85c177517f6 | [
"Apache-2.0"
] | 986 | 2017-06-07T07:33:01.000Z | 2022-03-31T13:00:46.000Z | ibis/backends/pandas/tests/test_aggcontext.py | GrapeBaBa/ibis | 507bb14efdcfd719a0487ee23fe1c85c177517f6 | [
"Apache-2.0"
] | 2,623 | 2017-06-07T18:29:11.000Z | 2022-03-31T20:27:31.000Z | ibis/backends/pandas/tests/test_aggcontext.py | GrapeBaBa/ibis | 507bb14efdcfd719a0487ee23fe1c85c177517f6 | [
"Apache-2.0"
] | 238 | 2017-06-26T19:02:58.000Z | 2022-03-31T15:18:29.000Z | import numpy as np
import pandas as pd
import pytest
from pandas.util import testing as tm
from pytest import param
from ..aggcontext import Summarize, window_agg_udf
df = pd.DataFrame(
{
'id': [1, 2, 1, 2],
'v1': [1.0, 2.0, 3.0, 4.0],
'v2': [10.0, 20.0, 30.0, 40.0],
}
)
@pytest.mark... | 23.802395 | 76 | 0.562767 |
c87f883e259e68fae1024be49a65e850a4f4dcd8 | 591 | py | Python | pydle/features/__init__.py | Rixxan/pydle | 6ec21f0167d99fbe1faef02ca03c12c0d7c0db99 | [
"BSD-3-Clause"
] | 150 | 2015-02-18T04:19:16.000Z | 2022-03-29T20:39:45.000Z | pydle/features/__init__.py | Rixxan/pydle | 6ec21f0167d99fbe1faef02ca03c12c0d7c0db99 | [
"BSD-3-Clause"
] | 112 | 2015-04-18T02:48:38.000Z | 2022-03-28T03:50:44.000Z | pydle/features/__init__.py | Rixxan/pydle | 6ec21f0167d99fbe1faef02ca03c12c0d7c0db99 | [
"BSD-3-Clause"
] | 51 | 2015-01-30T19:40:30.000Z | 2022-03-22T07:32:29.000Z | from . import rfc1459, account, ctcp, tls, isupport, whox, ircv3
from .rfc1459 import RFC1459Support
from .account import AccountSupport
from .ctcp import CTCPSupport
from .tls import TLSSupport
from .isupport import ISUPPORTSupport
from .whox import WHOXSupport
from .ircv3 import IRCv3Support, IRCv3_1Support, IRCv3_2... | 39.4 | 107 | 0.824027 |
3e22a833db655b96f026370c6d4f4acfddd327fe | 2,132 | py | Python | yolo_asff/configs.py | HirataYurina/yoloV3-keras-sibyl | 15f6c5f021dfc80d753df6bcdd579ae1139edfb9 | [
"MIT"
] | 6 | 2020-08-30T15:00:24.000Z | 2021-12-08T02:46:45.000Z | yolo_asff/configs.py | HirataYurina/yoloV3-keras-sibyl | 15f6c5f021dfc80d753df6bcdd579ae1139edfb9 | [
"MIT"
] | 1 | 2021-12-21T14:02:34.000Z | 2021-12-21T14:03:06.000Z | yolo_asff/configs.py | HirataYurina/yoloV3-keras-sibyl | 15f6c5f021dfc80d753df6bcdd579ae1139edfb9 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# author:平手友梨奈ii
# e-mail:1353593259@qq.com
# datetime:1993/12/01
# filename:configs.py
# software: PyCharm
import easydict
CONFIG = easydict.EasyDict()
# evaluation
CONFIG.DETECT = easydict.EasyDict()
CONFIG.DETECT.SCORE = 0.3
CONFIG.DETECT.IOU = 0.43
CONFIG.DETECT.RESOLUTION = (416, 416)
CO... | 28.810811 | 88 | 0.755159 |
883b3e35eb4f7eaf9a23f841c2cac77318e6213b | 3,542 | py | Python | jenkinsapi/jenkinsbase.py | Neofonie/jenkinsapi | 5b523ce3141cb196363abf30d2e3308ec29bb988 | [
"MIT"
] | null | null | null | jenkinsapi/jenkinsbase.py | Neofonie/jenkinsapi | 5b523ce3141cb196363abf30d2e3308ec29bb988 | [
"MIT"
] | null | null | null | jenkinsapi/jenkinsbase.py | Neofonie/jenkinsapi | 5b523ce3141cb196363abf30d2e3308ec29bb988 | [
"MIT"
] | null | null | null | """
Module for JenkinsBase class
"""
import ast
import pprint
import logging
from jenkinsapi import config
from jenkinsapi.custom_exceptions import JenkinsAPIException
class JenkinsBase(object):
"""
This appears to be the base object that all other jenkins objects are
inherited from
"""
RETRY_AT... | 28.111111 | 75 | 0.554489 |
015d59b516e94ef0fe322fefda403b7bec7b1804 | 17,913 | py | Python | python/paddle/distributed/fleet/launch.py | jiansowa/Paddle | 488152a6d076eac91ef0921ff6e16c65777f814d | [
"Apache-2.0"
] | null | null | null | python/paddle/distributed/fleet/launch.py | jiansowa/Paddle | 488152a6d076eac91ef0921ff6e16c65777f814d | [
"Apache-2.0"
] | null | null | null | python/paddle/distributed/fleet/launch.py | jiansowa/Paddle | 488152a6d076eac91ef0921ff6e16c65777f814d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle 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 appli... | 37.39666 | 124 | 0.618713 |
911a936e1f61a8ce19e1396e0c088523cb65a74c | 1,768 | py | Python | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/DeleteSkillGroupRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/DeleteSkillGroupRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/DeleteSkillGroupRequest.py | jorsonzen/aliyun-openapi-python-sdk | 0afbfa8e5f9e19455695aa799f7dcc1cd853d827 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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 u... | 35.36 | 75 | 0.763575 |
988cfaaf5a73f32e56dd53617c00638401fb9a4c | 26,620 | py | Python | src/sentry/testutils/fixtures.py | ygnoh/sentry | e34653cac10b63e3c5c732a5c52eaa5bf3484d5b | [
"BSD-3-Clause"
] | null | null | null | src/sentry/testutils/fixtures.py | ygnoh/sentry | e34653cac10b63e3c5c732a5c52eaa5bf3484d5b | [
"BSD-3-Clause"
] | null | null | null | src/sentry/testutils/fixtures.py | ygnoh/sentry | e34653cac10b63e3c5c732a5c52eaa5bf3484d5b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sentry.testutils.fixtures
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function, unicode_literals
import copy
import json
import os
import... | 35.683646 | 324 | 0.502254 |
85f6043b210fe316644b8a71ab52d2f73bd2aa5a | 3,657 | py | Python | tests/test_parser.py | genejiang2012/iTest_httpapi_v2 | 5edfff2e068ce9b031a9c990c1bfcbfca25469d5 | [
"MIT"
] | null | null | null | tests/test_parser.py | genejiang2012/iTest_httpapi_v2 | 5edfff2e068ce9b031a9c990c1bfcbfca25469d5 | [
"MIT"
] | null | null | null | tests/test_parser.py | genejiang2012/iTest_httpapi_v2 | 5edfff2e068ce9b031a9c990c1bfcbfca25469d5 | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2021/1/6 19:29
# @Author : Gene Jiang
# @File : test_parser.py.py
# @Description:
import pytest
from httpapi import parser
from loguru import logger
def test_parse_string_value():
assert parser.parse_string_value("123") == 123
assert parser.pa... | 43.535714 | 84 | 0.604047 |
19b41eb32f2547b422f2cdf98e7d14d99eb88593 | 7,060 | py | Python | testcodes/check_encoding.py | Intel-tensorflow/SSD_tensorflow_VOC | 839c4291926e4c9f2cf5e028d666766daa873b7c | [
"Apache-2.0"
] | 70 | 2017-04-27T03:42:18.000Z | 2022-02-19T06:55:48.000Z | testcodes/check_encoding.py | Intel-tensorflow/SSD_tensorflow_VOC | 839c4291926e4c9f2cf5e028d666766daa873b7c | [
"Apache-2.0"
] | 33 | 2017-04-26T01:48:40.000Z | 2021-06-11T02:21:34.000Z | testcodes/check_encoding.py | Intel-tensorflow/SSD_tensorflow_VOC | 839c4291926e4c9f2cf5e028d666766daa873b7c | [
"Apache-2.0"
] | 32 | 2017-07-13T12:58:04.000Z | 2021-05-17T08:41:46.000Z | from datasets import pascalvoc_datasets
import tensorflow as tf
import matplotlib.pyplot as plt
import tensorflow.contrib.slim as slim
# from nets import nets_factory
from preprocessing import preprocessing_factory
import numpy as np
import cv2
from utility import visualization
from nets.ssd import g_ssd_model
from pre... | 39.222222 | 167 | 0.581586 |
8f6b46fa12249e3c73350c1756f92cbce7eda900 | 8,828 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/applibprofile/applibflow/applibflow.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/applibprofile/applibflow/applibflow.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/applibprofile/applibflow/applibflow.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | 35.740891 | 178 | 0.63763 |
ebaab48b55047f50262ec3ded87c7486a1fd5ca2 | 1,406 | py | Python | test/script/train_embedding_psd_id.py | emorynlp/bert-2018 | 228b2046d92084ea3cd7c900c1d8af1f0a925cfe | [
"Apache-2.0"
] | 17 | 2019-08-15T01:49:10.000Z | 2022-03-28T19:12:04.000Z | test/script/train_embedding_psd_id.py | emorynlp/bert-2018 | 228b2046d92084ea3cd7c900c1d8af1f0a925cfe | [
"Apache-2.0"
] | 2 | 2020-09-09T02:30:23.000Z | 2022-03-28T19:57:21.000Z | test/script/train_embedding_psd_id.py | emorynlp/bert-2018 | 228b2046d92084ea3cd7c900c1d8af1f0a925cfe | [
"Apache-2.0"
] | 1 | 2020-03-12T03:41:13.000Z | 2020-03-12T03:41:13.000Z | # coding: utf-8
# 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... | 42.606061 | 83 | 0.720484 |
a7df44e1e30700bec201dcf9d8da87ea93513b02 | 12,665 | py | Python | core/setup/base.py | fabrickit/fabkit | ca099c7e543efb8f5c1d19453c8ceada0584e563 | [
"MIT"
] | null | null | null | core/setup/base.py | fabrickit/fabkit | ca099c7e543efb8f5c1d19453c8ceada0584e563 | [
"MIT"
] | null | null | null | core/setup/base.py | fabrickit/fabkit | ca099c7e543efb8f5c1d19453c8ceada0584e563 | [
"MIT"
] | null | null | null | # coding: utf-8
from fabkit import env, api, status, log, util
import re
from types import DictType
import inspect
from oslo_config import cfg
CONF = cfg.CONF
@api.task
def manage(*args, **kwargs):
run_func(args, *args, **kwargs)
@api.task
def check(*args, **kwargs):
run_func(['^check.*'], *args, **kwargs... | 41.661184 | 110 | 0.442953 |
85631ca7fe375d1f3bd69210ac4640aedd1bbd8b | 470 | py | Python | titan/react_pkg/uikit/__init__.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_pkg/uikit/__init__.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_pkg/uikit/__init__.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | from pathlib import Path
from moonleap import add, create
from titan.project_pkg.service import Tool
from titan.react_pkg.nodepackage import load_node_package_config
class UIkit(Tool):
pass
base_tags = [("uikit", ["tool"])]
@create("uikit")
def create_uikit(term):
uikit = UIkit(name="uikit")
uikit.ad... | 21.363636 | 64 | 0.738298 |
dcd4702743d09df31d6d98330bb7952de30d9f91 | 3,450 | py | Python | src/oscartest/getcrndetails/models.py | AlexanderPuckhaber/django-oscar-scraper | b58d8f0414572085fdec01aa991852cebb6cb290 | [
"MIT"
] | 1 | 2021-01-12T22:09:39.000Z | 2021-01-12T22:09:39.000Z | src/oscartest/getcrndetails/models.py | AlexanderPuckhaber/django-oscar-scraper | b58d8f0414572085fdec01aa991852cebb6cb290 | [
"MIT"
] | null | null | null | src/oscartest/getcrndetails/models.py | AlexanderPuckhaber/django-oscar-scraper | b58d8f0414572085fdec01aa991852cebb6cb290 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
from django.db.models import UniqueConstraint
class Semester(models.Model):
semester_str = models.CharField(primary_key=True, max_length=200)
semester_str_readable = models.CharField(max_length=200)
phase1_start_date = models.DateTimeField('start of... | 40.588235 | 100 | 0.698841 |
d0ac68f8300ac131674fce185fec79f951a6f8ea | 2,422 | py | Python | Utils/py/RL_ActionSelection/env_0/tools/naoth/math3d.py | BerlinUnited/NaoTH | 02848ac10c16a5349f1735da8122a64d601a5c75 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2015-01-12T10:46:29.000Z | 2022-03-28T05:13:14.000Z | Utils/py/RL_ActionSelection/env_0/tools/naoth/math3d.py | BerlinUnited/NaoTH | 02848ac10c16a5349f1735da8122a64d601a5c75 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-01-20T21:07:50.000Z | 2020-01-22T14:00:28.000Z | Utils/py/RL_ActionSelection/env_0/tools/naoth/math3d.py | BerlinUnited/NaoTH | 02848ac10c16a5349f1735da8122a64d601a5c75 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2018-02-07T18:18:10.000Z | 2019-10-15T17:01:41.000Z | import math
class Vector3:
def __init__(self, x=0, y=0, z=0):
self.x = x
self.y = y
self.z = z
def __add__(self, other):
return Vector3(self.x + other.x, self.y + other.y, self.z + other.z)
def __sub__(self, other):
return Vector3(self.x - other.x, self.y - other.... | 28.494118 | 79 | 0.545417 |
759874c6d87e12fa478595d2b1509e3be00b09a1 | 1,630 | py | Python | kajaas/index/forms.py | bandarupallibnk/azuretest | 9829f603465e2f21811592f3ec1c6f688e0085e4 | [
"MIT"
] | null | null | null | kajaas/index/forms.py | bandarupallibnk/azuretest | 9829f603465e2f21811592f3ec1c6f688e0085e4 | [
"MIT"
] | null | null | null | kajaas/index/forms.py | bandarupallibnk/azuretest | 9829f603465e2f21811592f3ec1c6f688e0085e4 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_wtf import FlaskForm
from wtforms import StringField,SubmitField,BooleanField,PasswordField,RadioField,DateField,SelectField
from wtforms.fields.html5 import EmailField
from wtforms.validators import DataRequired,EqualTo
class clsignup(FlaskForm):
username = StringField("User Na... | 40.75 | 103 | 0.730675 |
29f01d7a1f9792e89bd63c991d8878d664db7d09 | 12,660 | py | Python | py-scripts/test_generic.py | shivamcandela/lanforge-scripts | 285c91d7d414567f9c6a136f1556ab9fe7546efb | [
"BSD-2-Clause-FreeBSD",
"BSD-3-Clause"
] | 1 | 2021-09-27T08:45:56.000Z | 2021-09-27T08:45:56.000Z | py-scripts/test_generic.py | shivamcandela/lanforge-scripts | 285c91d7d414567f9c6a136f1556ab9fe7546efb | [
"BSD-2-Clause-FreeBSD",
"BSD-3-Clause"
] | null | null | null | py-scripts/test_generic.py | shivamcandela/lanforge-scripts | 285c91d7d414567f9c6a136f1556ab9fe7546efb | [
"BSD-2-Clause-FreeBSD",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import pprint
import sys
import os
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit(1)
if 'py-json' not in sys.path:
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
import argparse
from LANforge.lfcli_base import LFCliBase
from LANforge impor... | 46.036364 | 194 | 0.620932 |
fb1e7f914e3409e305df1bdd927295deb9f9e84a | 4,953 | py | Python | cheque_management/api.py | cstkyrilos/cheque_management | d290a5ccda684bb1c7eaab2dcdd9dab7d0a1e4c7 | [
"MIT"
] | null | null | null | cheque_management/api.py | cstkyrilos/cheque_management | d290a5ccda684bb1c7eaab2dcdd9dab7d0a1e4c7 | [
"MIT"
] | null | null | null | cheque_management/api.py | cstkyrilos/cheque_management | d290a5ccda684bb1c7eaab2dcdd9dab7d0a1e4c7 | [
"MIT"
] | 1 | 2021-08-22T16:13:30.000Z | 2021-08-22T16:13:30.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Direction and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import flt, cstr, nowdate, comma_and
from frappe import throw, msgprint, _
def pe_before_submit(self, method):
i... | 43.831858 | 102 | 0.732889 |
d988acf8e010a32416ff96bc7831aab1c3a79e14 | 3,283 | py | Python | config/settings.py | mpita/ox | 04910527c6502c97b87010f833b0ac11294103bd | [
"MIT"
] | null | null | null | config/settings.py | mpita/ox | 04910527c6502c97b87010f833b0ac11294103bd | [
"MIT"
] | 1 | 2020-10-17T00:52:01.000Z | 2020-10-23T23:42:27.000Z | config/settings.py | mpita/ox | 04910527c6502c97b87010f833b0ac11294103bd | [
"MIT"
] | null | null | null | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib ... | 25.061069 | 91 | 0.697228 |
1c17d1a795ad8df50e9817d4e3cd96d147ea8e45 | 6,313 | py | Python | homeassistant/components/notify/__init__.py | EmitKiwi/home-assistant | 0999e2ddc476f4bddf710005168b082f03a7cdc0 | [
"Apache-2.0"
] | 4 | 2019-05-14T20:33:43.000Z | 2021-09-25T14:56:08.000Z | homeassistant/components/notify/__init__.py | EmitKiwi/home-assistant | 0999e2ddc476f4bddf710005168b082f03a7cdc0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/notify/__init__.py | EmitKiwi/home-assistant | 0999e2ddc476f4bddf710005168b082f03a7cdc0 | [
"Apache-2.0"
] | null | null | null | """
Provides functionality to notify people.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/notify/
"""
import asyncio
import logging
import os
from functools import partial
import voluptuous as vol
from homeassistant.setup import async_prepare_setup_... | 31.723618 | 78 | 0.656423 |
3a3a8e1dc760993c607735e7aad62a78c98bba42 | 1,583 | py | Python | src/pretalx/common/console.py | Hydro2shine/sprout | 7dfa5e9fa0a7ef9157517ad0752e393599053873 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/console.py | Hydro2shine/sprout | 7dfa5e9fa0a7ef9157517ad0752e393599053873 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/console.py | Hydro2shine/sprout | 7dfa5e9fa0a7ef9157517ad0752e393599053873 | [
"Apache-2.0"
] | null | null | null | BOLD = '\033[1m'
RESET = '\033[0m'
UD = '│'
LR = '─'
SEPARATORS = {
(False, True, True, False): '┬',
(True, False, False, True): '┴',
(False, False, True, True): '┤',
(True, True, False, False): '├',
(False, True, False, True): '┼',
(True, False, True, False): '┼',
}
def get_seperator(*args):
... | 26.830508 | 79 | 0.527479 |
5e5aef57289562fa0af368906ed3a5a45c46f647 | 24 | py | Python | __init__.py | poloarol/pathway-finder | a43616f581079b065074b5ecf9d20b725fee9ea3 | [
"MIT"
] | 1 | 2019-06-06T19:51:14.000Z | 2019-06-06T19:51:14.000Z | __init__.py | poloarol/pathway-finder | a43616f581079b065074b5ecf9d20b725fee9ea3 | [
"MIT"
] | 1 | 2019-06-13T19:40:23.000Z | 2019-06-13T19:40:23.000Z | __init__.py | poloarol/pathway-finder | a43616f581079b065074b5ecf9d20b725fee9ea3 | [
"MIT"
] | null | null | null | name = 'pathway_finder'
| 12 | 23 | 0.75 |
925dd4e07d2bb09b1faa2fff4046a7ac8f15cafd | 282 | py | Python | tornado/sleep_task.py | dongweiming/speakerdeck | 497352767a6ec57629f28d5c85f70bef38fc1914 | [
"Apache-2.0"
] | 6 | 2015-03-02T06:01:28.000Z | 2016-06-03T09:55:34.000Z | tornado/sleep_task.py | dongweiming/speakerdeck | 497352767a6ec57629f28d5c85f70bef38fc1914 | [
"Apache-2.0"
] | null | null | null | tornado/sleep_task.py | dongweiming/speakerdeck | 497352767a6ec57629f28d5c85f70bef38fc1914 | [
"Apache-2.0"
] | 5 | 2015-02-01T13:48:58.000Z | 2018-11-27T02:10:59.000Z | import time
from celery import Celery
celery = Celery("tasks", broker="amqp://guest:guest@localhost:5672")
celery.conf.CELERY_RESULT_BACKEND = "amqp"
@celery.task
def sleep(seconds):
time.sleep(float(seconds))
return seconds
if __name__ == "__main__":
celery.start()
| 20.142857 | 68 | 0.72695 |
28685d31a768bbb31f2a2ef1fc5e4ba87c4c8dbf | 2,398 | py | Python | src/replaybuffer.py | sheelabhadra/Learning2Drive | f93cb5651c08b87b66b3f2ffc8a3512a9af73db4 | [
"MIT"
] | 6 | 2020-04-09T01:58:07.000Z | 2021-12-10T23:24:13.000Z | src/replaybuffer.py | sheelabhadra/Learning2Drive | f93cb5651c08b87b66b3f2ffc8a3512a9af73db4 | [
"MIT"
] | 7 | 2019-12-28T07:26:43.000Z | 2022-03-30T21:01:59.000Z | src/replaybuffer.py | sheelabhadra/Learning2Drive | f93cb5651c08b87b66b3f2ffc8a3512a9af73db4 | [
"MIT"
] | 2 | 2020-07-08T08:01:48.000Z | 2022-01-06T06:05:43.000Z | """
Data structure for implementing experience replay
"""
from collections import deque, namedtuple
import random
import numpy as np
Transition = namedtuple('Transition', ['state', 'action', 'reward', 'terminal', 'next_state'])
class ReplayBuffer(object):
def __init__(self, buffer_size, random_seed=1234):
... | 31.142857 | 94 | 0.618015 |
1ff7cb94cb612116d0a7da5825f51c5bb086c3e6 | 65,783 | py | Python | sympy/core/power.py | shubhsherl/sympy | b4f1aa3540fe68d078d76e78ba59d022dd6df39f | [
"BSD-3-Clause"
] | null | null | null | sympy/core/power.py | shubhsherl/sympy | b4f1aa3540fe68d078d76e78ba59d022dd6df39f | [
"BSD-3-Clause"
] | null | null | null | sympy/core/power.py | shubhsherl/sympy | b4f1aa3540fe68d078d76e78ba59d022dd6df39f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division
from math import log as _log
from .sympify import _sympify
from .cache import cacheit
from .singleton import S
from .expr import Expr
from .evalf import PrecisionExhausted
from .function import (_coeff_isneg, expand_complex, expand_multinomial,
expand_mul)
from .log... | 37.397953 | 98 | 0.467872 |
e5ac9fe129b72c2c8d5c60b00b11734b8a533d67 | 3,277 | py | Python | tests/contrib/operators/test_emr_add_steps_operator.py | RyanMagnusson/incubator-airflow | ad81412fba2e8510442db73d9c905cac5eed8ebd | [
"Apache-2.0"
] | 2 | 2018-03-07T12:25:05.000Z | 2018-03-19T01:00:10.000Z | tests/contrib/operators/test_emr_add_steps_operator.py | RyanMagnusson/incubator-airflow | ad81412fba2e8510442db73d9c905cac5eed8ebd | [
"Apache-2.0"
] | null | null | null | tests/contrib/operators/test_emr_add_steps_operator.py | RyanMagnusson/incubator-airflow | ad81412fba2e8510442db73d9c905cac5eed8ebd | [
"Apache-2.0"
] | 1 | 2020-07-14T09:45:54.000Z | 2020-07-14T09:45:54.000Z | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | 31.509615 | 87 | 0.627708 |
ce0fe024420e5205c65baac06451da8fc0b538f3 | 2,777 | py | Python | setup.py | jbcurtin/bert | 956e1647b590ac13b679579231b085895778d807 | [
"MIT"
] | 2 | 2019-08-28T21:39:50.000Z | 2019-12-17T10:53:28.000Z | setup.py | jbcurtin/bert | 956e1647b590ac13b679579231b085895778d807 | [
"MIT"
] | 19 | 2019-09-04T21:19:12.000Z | 2021-03-28T22:10:32.000Z | setup.py | jbcurtin/bert | 956e1647b590ac13b679579231b085895778d807 | [
"MIT"
] | 1 | 2019-08-28T21:39:53.000Z | 2019-08-28T21:39:53.000Z | import os
import sys
from setuptools import find_packages, setup
# Hacky, but functional
file_dir: str = os.path.dirname(__file__)
bert_path: str = os.path.join(file_dir, 'bert')
if not os.path.exists(bert_path):
raise NotImplementedError
sys.path.append(file_dir)
import bert
# Always reference code-origin
# ht... | 30.516484 | 68 | 0.656824 |
6c692ab9e6f916ef135ba2435de22443ab86b790 | 10,237 | py | Python | requests_cache/backends/base.py | parkerhancock/requests-cache | e3ae526cba37a4ea2d8a48b05aaeff062847c644 | [
"BSD-2-Clause"
] | 1 | 2021-05-27T17:25:45.000Z | 2021-05-27T17:25:45.000Z | requests_cache/backends/base.py | parkerhancock/requests-cache | e3ae526cba37a4ea2d8a48b05aaeff062847c644 | [
"BSD-2-Clause"
] | null | null | null | requests_cache/backends/base.py | parkerhancock/requests-cache | e3ae526cba37a4ea2d8a48b05aaeff062847c644 | [
"BSD-2-Clause"
] | null | null | null | import pickle
import warnings
from abc import ABC
from collections import UserDict
from collections.abc import MutableMapping
from datetime import datetime
from logging import getLogger
from typing import Iterable, Iterator, Tuple, Union
from ..cache_control import ExpirationTime
from ..cache_keys import create_key, r... | 40.462451 | 113 | 0.654196 |
598cc5c8bff3bf2e2aa26b77d5e292ba6b6145c1 | 522 | py | Python | tests/core/test_bugzilla.py | moisesguimaraes/trellozilla | 09779fbc29df5896c895aaa30e8a49ac57b7c1fc | [
"Apache-2.0"
] | 2 | 2019-09-26T10:04:51.000Z | 2021-01-28T16:18:31.000Z | tests/core/test_bugzilla.py | moisesguimaraes/trellozilla | 09779fbc29df5896c895aaa30e8a49ac57b7c1fc | [
"Apache-2.0"
] | null | null | null | tests/core/test_bugzilla.py | moisesguimaraes/trellozilla | 09779fbc29df5896c895aaa30e8a49ac57b7c1fc | [
"Apache-2.0"
] | 1 | 2021-01-19T14:11:00.000Z | 2021-01-19T14:11:00.000Z | import unittest
from unittest import mock
from trellozilla.core import bugzilla
class TestBugzilla(unittest.TestCase):
"""Tests for `trellozilla.core.bugzilla`."""
def test_get_client_api(self):
with mock.patch("bugzilla.Bugzilla") as trello_client_mock:
conf_mock = mock.Mock()
... | 26.1 | 67 | 0.666667 |
2ebc372b208427233b147f52a7f6450ab23534c5 | 1,832 | py | Python | TestHelper.py | garethsb-sony/nmos-testing | 2436972ff495c5942bb29cd0f440cb848eb04ccd | [
"Apache-2.0"
] | null | null | null | TestHelper.py | garethsb-sony/nmos-testing | 2436972ff495c5942bb29cd0f440cb848eb04ccd | [
"Apache-2.0"
] | null | null | null | TestHelper.py | garethsb-sony/nmos-testing | 2436972ff495c5942bb29cd0f440cb848eb04ccd | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Riedel Communications GmbH & Co. KG
#
# Modifications Copyright 2018 British Broadcasting Corporation
#
# 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... | 33.309091 | 75 | 0.663755 |
af2016a00dc3d30cfb5968d422e424c20d19378e | 3,181 | py | Python | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribePhysicalConnectionsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribePhysicalConnectionsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribePhysicalConnectionsRequest.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... | 34.956044 | 102 | 0.747564 |
1d6fd137c4cf79bd554ca6c1b04cc88669bfa909 | 20,667 | py | Python | lmp/model/_rnn.py | shangrex/language-model-playground | d3aaf768f6cd57c5c2b263da46a36ffd23fcd51b | [
"Beerware"
] | 9 | 2020-07-31T10:27:28.000Z | 2021-12-23T05:58:03.000Z | lmp/model/_rnn.py | shangrex/language-model-playground | d3aaf768f6cd57c5c2b263da46a36ffd23fcd51b | [
"Beerware"
] | 10 | 2020-07-28T05:32:52.000Z | 2022-03-04T06:36:23.000Z | lmp/model/_rnn.py | shangrex/language-model-playground | d3aaf768f6cd57c5c2b263da46a36ffd23fcd51b | [
"Beerware"
] | 20 | 2020-07-08T07:05:39.000Z | 2021-09-22T07:20:46.000Z | r"""Vanilla RNN language model."""
import argparse
from typing import ClassVar, Dict, List, Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
from lmp.model._base import BaseModel
from lmp.tknzr._base import BaseTknzr
class RNNModel(BaseModel):
r"""Vanilla RNN language model.
Use... | 36.578761 | 79 | 0.515217 |
80885fd9ef1392e5c4fcc253964789d5546497fb | 326,332 | py | Python | pandas/core/generic.py | Web-Application-Project/Main-Project | 9183396ec9ab660a49bc6bd41cfd2bbc98f54db7 | [
"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/generic.py | Web-Application-Project/Main-Project | 9183396ec9ab660a49bc6bd41cfd2bbc98f54db7 | [
"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/generic.py | Web-Application-Project/Main-Project | 9183396ec9ab660a49bc6bd41cfd2bbc98f54db7 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # pylint: disable=W0231,E1101
import collections
import functools
import warnings
import operator
import weakref
import gc
import json
import numpy as np
import pandas as pd
from pandas._libs import tslib, properties
from pandas.core.dtypes.common import (
_ensure_int64,
_ensure_object,
is_scalar,
is_... | 34.528833 | 102 | 0.531664 |
4a0595ecf104c35dd89de5d5f675d93575f6480f | 7,411 | py | Python | step.py | andrewpo456/pi-thrum | dcbb3576bdff7784ce6ad04e554209593db73e3e | [
"MIT"
] | 11 | 2017-11-01T01:21:37.000Z | 2021-12-05T15:20:19.000Z | step.py | andrewpo456/pi-thrum | dcbb3576bdff7784ce6ad04e554209593db73e3e | [
"MIT"
] | null | null | null | step.py | andrewpo456/pi-thrum | dcbb3576bdff7784ce6ad04e554209593db73e3e | [
"MIT"
] | 1 | 2020-11-05T18:03:08.000Z | 2020-11-05T18:03:08.000Z | """
This module defines the functionality behind running the 12-step sequencer.
For information regarding the circuit setup please refer to 'pi-thrum-schem'.
@author Andrew Pope
"""
import RPi.GPIO as GPIO
import pygame
import time
class Step:
# Map the GPIO pins to each button
# Note:
# * Buttons 0 - 5, ... | 34.152074 | 77 | 0.564431 |
e4ef6414dcddde5a6be75bae30e4ef05b5fb7b72 | 4,724 | py | Python | python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_spec.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 1 | 2021-04-27T19:49:59.000Z | 2021-04-27T19:49:59.000Z | python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_spec.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 7 | 2022-03-16T06:55:04.000Z | 2022-03-18T07:03:25.000Z | python_modules/dagster/dagster_tests/core_tests/config_types_tests/test_config_spec.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | null | null | null | import pytest
from dagster import (
DagsterInvalidConfigDefinitionError,
Noneable,
Permissive,
Selector,
execute_solid,
solid,
)
def test_kitchen_sink():
@solid(
config_schema={
"str_field": str,
"int_field": int,
"list_int": [int],
... | 30.477419 | 97 | 0.61431 |
2a3745d9f2873d5bc4c1b6a58658316217195fc7 | 3,122 | py | Python | app/app/settings.py | sarathp2409/receipe-app-api | be7245198a25103abfc45daeb3ba022806ee3857 | [
"MIT"
] | null | null | null | app/app/settings.py | sarathp2409/receipe-app-api | be7245198a25103abfc45daeb3ba022806ee3857 | [
"MIT"
] | null | null | null | app/app/settings.py | sarathp2409/receipe-app-api | be7245198a25103abfc45daeb3ba022806ee3857 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Bui... | 25.177419 | 91 | 0.694427 |
af3455583180ef09a57028f1ea36e94d03f3c105 | 822 | py | Python | setup.py | brentyi/nca | a018b26b2ac318d10065dac667498cc30ef844a4 | [
"MIT"
] | null | null | null | setup.py | brentyi/nca | a018b26b2ac318d10065dac667498cc30ef844a4 | [
"MIT"
] | null | null | null | setup.py | brentyi/nca | a018b26b2ac318d10065dac667498cc30ef844a4 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='torchnca',
version='0.1.0',
description='Neighbourhood Components Analysis in PyTorch.',
long_description=long_description,
long_description_content_type='text/markdown',
url='https:/... | 28.344828 | 76 | 0.695864 |
ba55c659a8cb3aaef80c73fa1c64948f7b5dfe2c | 4,988 | py | Python | python/tests/UnicodeSets_test.py | belluzj/sldr | cb7e49476654d915a05e250c406a0f59c49b5827 | [
"MIT"
] | null | null | null | python/tests/UnicodeSets_test.py | belluzj/sldr | cb7e49476654d915a05e250c406a0f59c49b5827 | [
"MIT"
] | null | null | null | python/tests/UnicodeSets_test.py | belluzj/sldr | cb7e49476654d915a05e250c406a0f59c49b5827 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# 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 conditions and the following disclaimer.
# 2. Redistributi... | 40.225806 | 113 | 0.679832 |
5f025d6ec4453cd92532d92879541576a33cd536 | 401 | py | Python | core-python/Core_Python/file/ByteReadAndWrite.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 9 | 2020-04-23T05:24:19.000Z | 2022-02-17T16:37:51.000Z | core-python/Core_Python/file/ByteReadAndWrite.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 5 | 2020-10-01T05:08:37.000Z | 2020-10-12T03:18:10.000Z | core-python/Core_Python/file/ByteReadAndWrite.py | theumang100/tutorials-1 | 497f54c2adb022c316530319a168fca1c007d4b1 | [
"MIT"
] | 9 | 2020-04-28T14:06:41.000Z | 2021-10-19T18:32:28.000Z | import os
# change your parent dir accordingly
parent_dir = "E:/GitHub/1) Git_Tutorials_Repo_Projects/core-python/Core_Python/ExFiles/"
with open(os.path.join(parent_dir,"ByteReadAndWrite.txt"),'wb+') as f:
f.writelines([b'<----This file is for file pointer example---->',b'\n<----After Writing the pointer change ... | 44.555556 | 133 | 0.700748 |
27ec174d935a616f45e0b5fff44a1f3ccadda8c6 | 1,096 | py | Python | saleor/order/migrations/0105_order_total_paid_amount.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/order/migrations/0105_order_total_paid_amount.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/order/migrations/0105_order_total_paid_amount.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | # Generated by Django 3.1.8 on 2021-04-29 07:02
from django.db import migrations, models
from django.db.models.functions import Coalesce
def update_orders_total_paid_in_db(apps, schema_editor):
Order = apps.get_model("order", "Order")
Order.objects.update(
total_paid_amount=models.Subquery(
... | 28.842105 | 88 | 0.604927 |
0daf1cbdab06b8486c89a25039b7b595ec518677 | 1,900 | py | Python | src/cnaas_nms/plugins/nav.py | workfloworchestrator/cnaas-nms | 4d45708ccb74f620cd5e3b7bc6bb0249ef31ce3d | [
"BSD-2-Clause-FreeBSD"
] | 48 | 2019-04-08T11:10:03.000Z | 2022-03-31T10:47:56.000Z | src/cnaas_nms/plugins/nav.py | workfloworchestrator/cnaas-nms | 4d45708ccb74f620cd5e3b7bc6bb0249ef31ce3d | [
"BSD-2-Clause-FreeBSD"
] | 143 | 2019-05-20T13:42:11.000Z | 2022-03-29T07:29:29.000Z | src/cnaas_nms/plugins/nav.py | workfloworchestrator/cnaas-nms | 4d45708ccb74f620cd5e3b7bc6bb0249ef31ce3d | [
"BSD-2-Clause-FreeBSD"
] | 9 | 2019-04-16T06:40:12.000Z | 2021-12-03T09:48:46.000Z | import logging
import requests
from cnaas_nms.plugins.pluginspec import CnaasBasePlugin, hookimpl
from cnaas_nms.tools.log import get_logger
logger = get_logger()
class Plugin(CnaasBasePlugin):
def __init__(self):
self.urlbase = None
self.apitoken = None
self.organizationid = "Undefined... | 32.758621 | 85 | 0.577895 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.