hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
441bc16a94d564e780a8d9bd3badab0e2d7b518c | 695 | py | Python | src/imu_interface3/setup.py | crawlerufsc/crawler_ws | 317294ee4f9cd517416e6e298cbb2cf92ef72eaa | [
"MIT"
] | null | null | null | src/imu_interface3/setup.py | crawlerufsc/crawler_ws | 317294ee4f9cd517416e6e298cbb2cf92ef72eaa | [
"MIT"
] | null | null | null | src/imu_interface3/setup.py | crawlerufsc/crawler_ws | 317294ee4f9cd517416e6e298cbb2cf92ef72eaa | [
"MIT"
] | null | null | null | from setuptools import setup
package_name = 'imu_interface3'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
... | 25.740741 | 55 | 0.630216 |
cb522bcdf09aa9e91332a294de3d2e212b165c63 | 82,597 | py | Python | tensorflow/python/client/session_test.py | rsuderman/tensorflow | 99a5672ef0611802e2524b49cd69a17bf07d202c | [
"Apache-2.0"
] | 3 | 2019-11-19T14:07:27.000Z | 2020-10-04T12:57:40.000Z | tensorflow/python/client/session_test.py | rsuderman/tensorflow | 99a5672ef0611802e2524b49cd69a17bf07d202c | [
"Apache-2.0"
] | 1 | 2020-08-28T18:17:58.000Z | 2020-08-28T18:17:58.000Z | tensorflow/python/client/session_test.py | rsuderman/tensorflow | 99a5672ef0611802e2524b49cd69a17bf07d202c | [
"Apache-2.0"
] | 4 | 2022-01-13T11:23:44.000Z | 2022-03-02T11:11:42.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.23848 | 92 | 0.648559 |
13cdeee65c751f63ecf9dde2fb14d394e96fb84c | 9,006 | py | Python | pymc/gp/FullRankCovariance.py | rsumner31/pymc3-23 | 539c0fc04c196679a1cdcbf4bc2dbea4dee10080 | [
"Apache-2.0"
] | 1 | 2019-03-01T02:47:20.000Z | 2019-03-01T02:47:20.000Z | pymc/gp/FullRankCovariance.py | rsumner31/pymc3-23 | 539c0fc04c196679a1cdcbf4bc2dbea4dee10080 | [
"Apache-2.0"
] | 1 | 2019-08-17T06:58:38.000Z | 2019-08-17T06:58:38.000Z | pymc/gp/FullRankCovariance.py | rsumner31/pymc3-23 | 539c0fc04c196679a1cdcbf4bc2dbea4dee10080 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Anand Patil, 2007
__docformat__='reStructuredText'
__all__ = ['FullRankCovariance']
from numpy import *
from numpy.linalg import cholesky, LinAlgError
from GPutils import regularize_array, trisolve
from linalg_utils import dpotrf_wrap
from Covariance import Covariance
from incomplete_chol import icho... | 33.857143 | 169 | 0.584832 |
24574c45216f9cde7ce8bc6e0d69818fac35cd11 | 11,334 | py | Python | BOFdat/core/maintenance.py | jclachance/BOFdat | cf2de074c2d789ad47b890083cbbffadab40f177 | [
"MIT"
] | 21 | 2017-11-21T23:21:14.000Z | 2022-03-27T11:48:17.000Z | BOFdat/core/maintenance.py | jclachance/BOFdat | cf2de074c2d789ad47b890083cbbffadab40f177 | [
"MIT"
] | 21 | 2017-11-21T22:16:44.000Z | 2021-11-02T06:24:33.000Z | BOFdat/core/maintenance.py | jclachance/biomass | cf2de074c2d789ad47b890083cbbffadab40f177 | [
"MIT"
] | 3 | 2018-02-06T13:05:33.000Z | 2018-10-24T12:12:56.000Z | """
Maintenance
===========
Growth associated maintenance (GAM) is defined as the energy cost of growth, namely polymerization of macromolecules.
Non-Growth associated maintenance (NGAM) represent all the extra costs that the cell must overcome to operate.
This package offers two options for the user:
1- Calculate GA... | 33.632047 | 130 | 0.655373 |
c8f888b742efb312e3222b86fa1661ba26647a07 | 6,807 | py | Python | tests/api/test_variant.py | projectssimm/simmweb | 2935af248ee05e8795086d5bab12ff41632722ea | [
"BSD-3-Clause"
] | 9 | 2021-08-08T22:42:18.000Z | 2021-11-23T06:50:14.000Z | tests/api/test_variant.py | projectssimm/simmweb | 2935af248ee05e8795086d5bab12ff41632722ea | [
"BSD-3-Clause"
] | 3 | 2020-03-24T16:21:02.000Z | 2021-02-02T21:57:49.000Z | tests/api/test_variant.py | projectssimm/simmweb | 2935af248ee05e8795086d5bab12ff41632722ea | [
"BSD-3-Clause"
] | null | null | null | import json
import graphene
import pytest
from django.shortcuts import reverse
from tests.utils import get_graphql_content
def test_fetch_variant(admin_api_client, product):
query = """
query ProductVariantDetails($id: ID!) {
productVariant(id: $id) {
id
attributes {
... | 31.082192 | 73 | 0.456883 |
4e990cbe9d56c610c8d033d55136d4e750a702b9 | 1,002 | py | Python | setup.py | Team-95/videolocale | 70b6ca9708838e0c8e0dcb4f56c486af712ab961 | [
"MIT"
] | 3 | 2016-04-25T19:39:00.000Z | 2016-12-13T01:27:41.000Z | setup.py | Team-95/beats-by-region | 70b6ca9708838e0c8e0dcb4f56c486af712ab961 | [
"MIT"
] | 25 | 2016-04-27T19:15:06.000Z | 2016-05-25T00:46:55.000Z | setup.py | Team-95/beats-by-region | 70b6ca9708838e0c8e0dcb4f56c486af712ab961 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.read().splitlines()
readme = ''
with open('README.md') as f:
readme = f.read()
setup(name='Video Locale',
author='Team 95',
url='https://github.com/Team-95/videolocale',
packages=find_packages()... | 31.3125 | 103 | 0.628743 |
d03233f7de45191007913011f75fbd3d7b8fc402 | 25,261 | py | Python | fairseq/utils.py | jm-glowienke/fairseq | ca45353322f92776e34a7308bf3fab75af9c1d50 | [
"MIT"
] | null | null | null | fairseq/utils.py | jm-glowienke/fairseq | ca45353322f92776e34a7308bf3fab75af9c1d50 | [
"MIT"
] | null | null | null | fairseq/utils.py | jm-glowienke/fairseq | ca45353322f92776e34a7308bf3fab75af9c1d50 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import contextlib
import copy
import importlib
import logging
import os
import sys
import tempfile
import warnings
from iterto... | 32.138677 | 127 | 0.637346 |
72a2c0afbb03430ca8ebe01b8f384084841fb28a | 22,366 | py | Python | lib/spack/spack/build_systems/autotools.py | oracleLee/spack | a4786c2043b505ac7d263d949865e77d2314e29c | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | lib/spack/spack/build_systems/autotools.py | oracleLee/spack | a4786c2043b505ac7d263d949865e77d2314e29c | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-19T02:33:37.000Z | 2020-10-19T02:33:37.000Z | lib/spack/spack/build_systems/autotools.py | oracleLee/spack | a4786c2043b505ac7d263d949865e77d2314e29c | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import inspect
import fileinput
import os
import os.path
import shutil
import stat
import sys
import re
from subprocess i... | 42.683206 | 111 | 0.576589 |
e2f03b08d5e19a133ff13b690f92a06feb9657d6 | 3,792 | py | Python | pytype/tests/test_protocols1.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 3,882 | 2015-03-22T12:17:15.000Z | 2022-03-31T17:13:20.000Z | pytype/tests/test_protocols1.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 638 | 2015-11-03T06:34:44.000Z | 2022-03-31T23:41:48.000Z | pytype/tests/test_protocols1.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 301 | 2015-08-14T10:21:17.000Z | 2022-03-08T11:03:40.000Z | """Tests for matching against protocols.
Based on PEP 544 https://www.python.org/dev/peps/pep-0544/.
"""
from pytype import file_utils
from pytype.pytd import pytd_utils
from pytype.tests import test_base
class ProtocolTest(test_base.BaseTest):
"""Tests for protocol implementation."""
def test_use_iterable(sel... | 26.333333 | 80 | 0.564082 |
cbe4e20aacdfcbc5fcbfc627d75fa3f0d4fff98e | 886 | py | Python | shopping_web/focus/forms.py | polegithub/shopping_web_python | 364effc838d9bf39c060065cb8c982efaae2e34c | [
"MIT"
] | null | null | null | shopping_web/focus/forms.py | polegithub/shopping_web_python | 364effc838d9bf39c060065cb8c982efaae2e34c | [
"MIT"
] | null | null | null | shopping_web/focus/forms.py | polegithub/shopping_web_python | 364effc838d9bf39c060065cb8c982efaae2e34c | [
"MIT"
] | null | null | null | from django import forms
class LoginForm(forms.Form):
uid = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control' ,'id':'uid', 'placeholder': 'Username'}))
pwd = forms.CharField(widget=forms.PasswordInput(attrs={'class':'form-control' ,'id':'pwd', 'placeholder': 'Password'}))
class RegisterForm(forms... | 40.272727 | 121 | 0.738149 |
4f5b35ccbba0317dd17acdd57ef6201da95c3384 | 798 | py | Python | project/apps/profiles/models.py | iguanaus/FPG_Website_Backtest | d597dcd291344d7edf97c2db6fdc535d623d47fc | [
"Apache-2.0"
] | null | null | null | project/apps/profiles/models.py | iguanaus/FPG_Website_Backtest | d597dcd291344d7edf97c2db6fdc535d623d47fc | [
"Apache-2.0"
] | 1 | 2019-01-05T14:32:40.000Z | 2019-01-05T14:32:40.000Z | project/apps/profiles/models.py | iguanaus/FPG_Website_Backtest | d597dcd291344d7edf97c2db6fdc535d623d47fc | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.conf import settings
from django.contrib.auth.models import AbstractUser, UserManager
from core.utils import GenerateRandomFilename
image_dir = "profiles"
allowed_ext = ['png', 'jpeg', 'jpg', 'gif', 'bmp']
generate_random_filename = Ge... | 28.5 | 94 | 0.746867 |
6a1c2528ee175d4729b6f619b790a4cb81158e20 | 899 | py | Python | pi/ch_14_charlieplexing.py | qiang-cynthia/Electronics_Cookbook | 05966b5194068249054471b08393e39a41eeab15 | [
"MIT"
] | 42 | 2016-11-02T09:06:06.000Z | 2022-03-20T08:26:57.000Z | pi/ch_14_charlieplexing.py | qiang-cynthia/Electronics_Cookbook | 05966b5194068249054471b08393e39a41eeab15 | [
"MIT"
] | null | null | null | pi/ch_14_charlieplexing.py | qiang-cynthia/Electronics_Cookbook | 05966b5194068249054471b08393e39a41eeab15 | [
"MIT"
] | 14 | 2018-02-02T20:01:45.000Z | 2021-07-14T11:00:37.000Z | import RPi.GPIO as GPIO
import thread, time
GPIO.setmode(GPIO.BCM)
pins = [18, 23, 24]
pin_led_states = [
[1, 0, -1], # LED1
[0, 1, -1], # LED2
[-1, 1, 0], # LED3
[-1, 0, 1], # LED4
[1, -1, 0], # LED5
[0, -1, 1] # LED6
]
led_states = [0, 0, 0, 0, 0, 0]
def set_pins(led):
for pin in range(0, 3):
... | 19.977778 | 58 | 0.559511 |
da32cc7de2c0fd2a5f3f8c7da511e4a164fea9b1 | 2,172 | py | Python | wye/regions/migrations/0001_initial.py | salmanulfarzy/wye | a52c15725f44688243c4b63ff7375553c7002d7b | [
"MIT"
] | 75 | 2015-08-27T04:16:17.000Z | 2022-01-05T13:59:46.000Z | wye/regions/migrations/0001_initial.py | salmanulfarzy/wye | a52c15725f44688243c4b63ff7375553c7002d7b | [
"MIT"
] | 396 | 2015-09-13T04:50:58.000Z | 2022-03-11T23:25:50.000Z | wye/regions/migrations/0001_initial.py | taranjeet/wye | ac4cc23d38cf2e72f87a0c1d26fff0316645c1ea | [
"MIT"
] | 112 | 2015-08-30T12:58:50.000Z | 2021-01-31T17:02:31.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | 37.448276 | 114 | 0.559392 |
6957eff5193da15fe8780511af41d2f58ce45f27 | 3,947 | py | Python | keeper/v2api/builds.py | lsst-sqre/ltd-keeper | c658bcce726764e7416a8a386b418e83912b0f32 | [
"Apache-2.0",
"MIT"
] | 5 | 2016-05-16T18:46:26.000Z | 2019-07-08T15:16:41.000Z | keeper/v2api/builds.py | lsst-sqre/ltd-keeper | c658bcce726764e7416a8a386b418e83912b0f32 | [
"Apache-2.0",
"MIT"
] | 46 | 2016-02-18T16:54:36.000Z | 2022-03-25T19:43:45.000Z | keeper/v2api/builds.py | lsst-sqre/ltd-keeper | c658bcce726764e7416a8a386b418e83912b0f32 | [
"Apache-2.0",
"MIT"
] | 4 | 2016-08-20T23:10:07.000Z | 2022-03-25T19:52:09.000Z | """Handers for v2 build endpoints."""
from __future__ import annotations
from typing import Dict, Tuple
from flask import request
from flask_accept import accept_fallback
from keeper.auth import token_auth
from keeper.logutils import log_route
from keeper.models import Build, Organization, Product, db
from keeper.s... | 28.395683 | 77 | 0.67697 |
17265972fd7688b56dc5c749c7f733e5ba2f75d9 | 1,519 | py | Python | Tools/compute_difference_percentiles.py | nhsx-mirror/riskscore-swift-public | 95b2bbda68112f9f9d912c5faf2dccf9960bf82e | [
"MIT"
] | 1 | 2020-11-23T07:55:21.000Z | 2020-11-23T07:55:21.000Z | Tools/compute_difference_percentiles.py | nhsx-mirror/riskscore-swift-public | 95b2bbda68112f9f9d912c5faf2dccf9960bf82e | [
"MIT"
] | null | null | null | Tools/compute_difference_percentiles.py | nhsx-mirror/riskscore-swift-public | 95b2bbda68112f9f9d912c5faf2dccf9960bf82e | [
"MIT"
] | 1 | 2020-10-29T15:01:23.000Z | 2020-10-29T15:01:23.000Z | #!/usr/bin/env python3
import subprocess
import numpy as np
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-s", "--scan-instances-dir", dest="scanInstancesDir",
help="The directory containing ScanInstances to compare", metavar="DIR_PATH", required=True)
parser.a... | 46.030303 | 195 | 0.712969 |
f4755714a3e31714bb3e96ad82ae05648a978ec7 | 22,613 | py | Python | playbooks/library/repoquery.py | jstuever/oa-testing | 943fcbf13cd48cec87ae95c491b88629be4ea57c | [
"Apache-2.0"
] | null | null | null | playbooks/library/repoquery.py | jstuever/oa-testing | 943fcbf13cd48cec87ae95c491b88629be4ea57c | [
"Apache-2.0"
] | null | null | null | playbooks/library/repoquery.py | jstuever/oa-testing | 943fcbf13cd48cec87ae95c491b88629be4ea57c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# pylint: disable=missing-docstring
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _|
# | |) | (... | 35.113354 | 434 | 0.499049 |
09941d0c2502be1b7585470863a26458c59d0322 | 25,067 | py | Python | blind_walking/envs/sensors/environment_sensors.py | mcx-lab/rl-baselines3-zoo | f89938be3b4d9769d9562e7b3d6d1342461adc5c | [
"MIT"
] | null | null | null | blind_walking/envs/sensors/environment_sensors.py | mcx-lab/rl-baselines3-zoo | f89938be3b4d9769d9562e7b3d6d1342461adc5c | [
"MIT"
] | 19 | 2021-08-23T03:21:10.000Z | 2021-11-26T07:36:42.000Z | blind_walking/envs/sensors/environment_sensors.py | mcx-lab/rl-baselines3-zoo | f89938be3b4d9769d9562e7b3d6d1342461adc5c | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.8637 | 120 | 0.617744 |
ab4e2b73c071f0e59c01ef8c8a28b731a9a0a4f3 | 10,906 | py | Python | SurfaceBrightness/SBCalc_MERGED.py | crhea93/AstronomyTools | b63a6902b36d992ea46e7889f8dd0b59124f4361 | [
"MIT"
] | 8 | 2020-01-08T16:39:06.000Z | 2021-12-19T01:55:04.000Z | SurfaceBrightness/SBCalc_MERGED.py | crhea93/AstronomyTools | b63a6902b36d992ea46e7889f8dd0b59124f4361 | [
"MIT"
] | 13 | 2018-09-21T17:17:03.000Z | 2022-03-11T23:38:09.000Z | SurfaceBrightness/SBCalc_MERGED.py | crhea93/AstronomyTools | b63a6902b36d992ea46e7889f8dd0b59124f4361 | [
"MIT"
] | null | null | null | '''
Calculate Surface Brightness from Scratch for MERGED Images
This involves created merged folders for each region and energy range
PLEASE RUN SPECEXTRACT ON EACH OBSERVATION FOR EACH REGION BEFORE RUNNING
INPUTS:
chandra_dir -- full path to data directory (e.g. '/home/user/Documents/Data')
evt_file -- nam... | 41.154717 | 156 | 0.648725 |
2d2b947113f02b5ef1cd0346e5a1e4a18d8a3d5a | 769 | py | Python | 09-Hot_or_Not/solution.py | alvarogzp/badoo-challenge-2015 | f4e1d8b1837c7cc5ae31bb3fa808a24b60513214 | [
"MIT"
] | 1 | 2016-01-10T16:59:00.000Z | 2016-01-10T16:59:00.000Z | 09-Hot_or_Not/solution.py | alvarogzp/badoo-challenge-2015 | f4e1d8b1837c7cc5ae31bb3fa808a24b60513214 | [
"MIT"
] | null | null | null | 09-Hot_or_Not/solution.py | alvarogzp/badoo-challenge-2015 | f4e1d8b1837c7cc5ae31bb3fa808a24b60513214 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import png # PyPNG: https://github.com/drj11/pypng doc: https://pythonhosted.org/pypng/index.html
png_reader = png.Reader("HoN.png")
width, height, pixels, metadata = png_reader.read()
out_pixels = []
for row in pixels:
out_row = []
for pixel_start_index in range(0, len(row), 3):
... | 26.517241 | 99 | 0.63329 |
78a9f849eccea2d5252fa82c9d9fa7773236da4f | 5,228 | py | Python | fasterai/modules.py | ranihorev/DeOldify | 334030a0983333293f969664f9147a11e8dfd0d4 | [
"MIT"
] | 54 | 2019-05-13T02:36:25.000Z | 2022-03-07T08:48:04.000Z | fasterai/modules.py | wangroot/DeOldify-1 | bc9d4562bf2014f5268f5c616ae31873577d9fde | [
"MIT"
] | 2 | 2021-06-08T23:55:11.000Z | 2021-09-08T03:06:38.000Z | fasterai/modules.py | wangroot/DeOldify-1 | bc9d4562bf2014f5268f5c616ae31873577d9fde | [
"MIT"
] | 10 | 2019-10-15T06:16:02.000Z | 2021-07-06T04:59:52.000Z | from fastai.torch_imports import *
from fastai.conv_learner import *
from torch.nn.utils.spectral_norm import spectral_norm
class ConvBlock(nn.Module):
def __init__(self, ni:int, no:int, ks:int=3, stride:int=1, pad:int=None, actn:bool=True,
bn:bool=True, bias:bool=True, sn:bool=False, leakyReLu:bool=F... | 39.308271 | 130 | 0.609602 |
688962353130fbb80f7d61ef655a7b7d69ac032e | 794 | py | Python | ex39_sql_create/test.py | techieguy007/learn-more-python-the-hard-way-solutions | 7886c860f69d69739a41d6490b8dc3fa777f227b | [
"Zed",
"Unlicense"
] | 466 | 2016-11-01T19:40:59.000Z | 2022-03-23T16:34:13.000Z | ex39_sql_create/test.py | Desperaaado/learn-more-python-the-hard-way-solutions | 7886c860f69d69739a41d6490b8dc3fa777f227b | [
"Zed",
"Unlicense"
] | 2 | 2017-09-20T09:01:53.000Z | 2017-09-21T15:03:56.000Z | ex39_sql_create/test.py | Desperaaado/learn-more-python-the-hard-way-solutions | 7886c860f69d69739a41d6490b8dc3fa777f227b | [
"Zed",
"Unlicense"
] | 241 | 2017-06-17T08:02:26.000Z | 2022-03-30T09:09:39.000Z | class Person(object):
def __init__(self, first_name,
last_name, age, pets):
self.first_name = first_name
self.last_name = last_name
self.age = age
self.pets = pets
class Pet(object):
def __init__(self, name, breed,
age, dead):
self.na... | 22.685714 | 59 | 0.583123 |
9ed017592afdcf6608833458eba192f616c9249d | 3,514 | py | Python | tensorflow/contrib/input_pipeline/python/ops/input_pipeline_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/contrib/input_pipeline/python/ops/input_pipeline_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/input_pipeline/python/ops/input_pipeline_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2016 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... | 39.044444 | 80 | 0.69778 |
5f6e7a738313a4f240ac0bce257385fe5c41ecca | 2,923 | py | Python | eval/generate_visual.py | urasakikeisuke/rigidmask | 4bb781102218dfd11efa767e2d0ba987d9949fd1 | [
"MIT"
] | 138 | 2021-01-12T03:02:04.000Z | 2022-03-30T07:14:15.000Z | eval/generate_visual.py | urasakikeisuke/rigidmask | 4bb781102218dfd11efa767e2d0ba987d9949fd1 | [
"MIT"
] | 12 | 2021-02-02T14:19:30.000Z | 2022-03-28T01:23:44.000Z | eval/generate_visual.py | urasakikeisuke/rigidmask | 4bb781102218dfd11efa767e2d0ba987d9949fd1 | [
"MIT"
] | 14 | 2021-01-13T01:31:34.000Z | 2022-01-30T14:48:06.000Z | import os
import sys
sys.path.insert(0,os.getcwd())
import cv2
import torch
import glob
import numpy as np
import pdb
import imageio
import detectron2
from detectron2.config import get_cfg
from detectron2.engine import DefaultPredictor
from detectron2.utils.visualizer import Visualizer, ColorMode
from detectron2.data ... | 35.216867 | 136 | 0.64728 |
056b8515e46fab8a10ac9dca6110660df686dfd7 | 1,396 | py | Python | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/sqlparse/__init__.py | tchamabe1979/exareme | 462983e4feec7808e1fd447d02901502588a8879 | [
"MIT"
] | null | null | null | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/sqlparse/__init__.py | tchamabe1979/exareme | 462983e4feec7808e1fd447d02901502588a8879 | [
"MIT"
] | null | null | null | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/sqlparse/__init__.py | tchamabe1979/exareme | 462983e4feec7808e1fd447d02901502588a8879 | [
"MIT"
] | null | null | null | # Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
"""Parse SQL statements."""
__version__ = '0.1.1'
class SQLParseError(Exception):
"""Base class for exceptions in th... | 25.381818 | 70 | 0.704871 |
b3679abad6712667ca62ef99ad69ba40e363b492 | 18,836 | py | Python | glide/extract.py | pombredanne/glide | 5c3a6caa157da626281aa9562ef0cba9bc4919e9 | [
"MIT"
] | null | null | null | glide/extract.py | pombredanne/glide | 5c3a6caa157da626281aa9562ef0cba9bc4919e9 | [
"MIT"
] | null | null | null | glide/extract.py | pombredanne/glide | 5c3a6caa157da626281aa9562ef0cba9bc4919e9 | [
"MIT"
] | null | null | null | """A home for common data extraction nodes"""
import codecs
from collections import OrderedDict
from copy import deepcopy
import csv
from email import parser, policy
from io import BytesIO
from imapclient import IMAPClient
from pandas.io.common import get_filepath_or_buffer
import requests
from tlbx import st, read_c... | 32.419966 | 126 | 0.541463 |
e2e5ddd3a32140f7e6ad33ab4b2950d5d551c04b | 53 | py | Python | backend/app/views/extract_features/__init__.py | Edinburgh-Genome-Foundry/CUBA | d57565951ead619ef9263e8b356b451001fb910f | [
"MIT"
] | 15 | 2018-02-12T13:12:13.000Z | 2021-08-15T11:37:59.000Z | backend/app/views/extract_features/__init__.py | Edinburgh-Genome-Foundry/CUBA | d57565951ead619ef9263e8b356b451001fb910f | [
"MIT"
] | 9 | 2020-06-05T17:54:54.000Z | 2022-02-12T12:03:19.000Z | backend/app/views/extract_features/__init__.py | Edinburgh-Genome-Foundry/CUBA | d57565951ead619ef9263e8b356b451001fb910f | [
"MIT"
] | 3 | 2018-10-18T13:08:50.000Z | 2020-08-17T14:09:46.000Z | from .ExtractFeaturesView import ExtractFeaturesView
| 26.5 | 52 | 0.90566 |
f13cbebc74266380adca3761f264869034f2cb8f | 7,023 | py | Python | focalplane/utils.py | Johannes-Sahlmann/focalplane | 39dc5bc7ed817321247f652d4c5d3565efccb022 | [
"BSD-3-Clause"
] | null | null | null | focalplane/utils.py | Johannes-Sahlmann/focalplane | 39dc5bc7ed817321247f652d4c5d3565efccb022 | [
"BSD-3-Clause"
] | 1 | 2019-12-03T16:45:55.000Z | 2019-12-03T16:47:07.000Z | focalplane/utils.py | Johannes-Sahlmann/focalplane | 39dc5bc7ed817321247f652d4c5d3565efccb022 | [
"BSD-3-Clause"
] | 4 | 2019-10-03T14:20:29.000Z | 2021-12-27T19:07:16.000Z | import copy
from astropy.table import Table
import astropy.units as u
from astropy.time import Time
import numpy as np
from pyia.data import GaiaData
from pystrometry import pystrometry
def correct_for_proper_motion(gaia_table, target_epoch, verbose=False, ignore_parallax=True):
"""Apply proper motion correctio... | 48.434483 | 151 | 0.587641 |
691a56fd45b886e37365f6c39c22950ead2196ec | 9,933 | py | Python | Poker.py | guptaronav/python-projects | b70cf63ed5573c5328e7a9c3a1c90d7641044f43 | [
"MIT"
] | null | null | null | Poker.py | guptaronav/python-projects | b70cf63ed5573c5328e7a9c3a1c90d7641044f43 | [
"MIT"
] | null | null | null | Poker.py | guptaronav/python-projects | b70cf63ed5573c5328e7a9c3a1c90d7641044f43 | [
"MIT"
] | null | null | null | import random
import time
from collections import Counter
done = 'false'
#here is the animation
def animate():
Count=0
global done
print('loading… |',end="")
while done == 'false':
time.sleep(0.1)
print('/',end="")
time.sleep(0.1)
print('-',end="")
time.sleep(0.1... | 30.191489 | 170 | 0.651868 |
c53167d083904bf31907c498b55592c8704ad153 | 766 | py | Python | SLMtools/calculators/bramson.py | adlhancock/SLMtools | ad4ad9efbadd37a68d9e48cbd7397124bdde3d2d | [
"MIT"
] | 1 | 2019-03-24T10:48:55.000Z | 2019-03-24T10:48:55.000Z | SLMtools/calculators/bramson.py | chrisheinze/SLMtools | ad4ad9efbadd37a68d9e48cbd7397124bdde3d2d | [
"MIT"
] | 1 | 2020-11-28T15:50:55.000Z | 2020-11-29T16:55:28.000Z | SLMtools/calculators/bramson.py | chrisheinze/SLMtools | ad4ad9efbadd37a68d9e48cbd7397124bdde3d2d | [
"MIT"
] | 1 | 2019-02-18T17:27:41.000Z | 2019-02-18T17:27:41.000Z | # -*- coding: utf-8 -*-
""" bramson laser coupling calculation tools.
Created on Fri Oct 28 15:34:53 2016
@author: dhancock
"""
def absorptivity(rho,wavelength=1070e-9):
"""
calculates absorbtivity based on resistivity and wavelength
"""
A = rho/wavelength
return 0.365*(A)**0.5 - 0.0667*(A)+... | 25.533333 | 109 | 0.617493 |
ff092983aef85bf478e31bbfa75a87727c45c861 | 3,923 | py | Python | custom_components/xiaomi_cloud_map_extractor/xiaomi_vacuum_map_parser/xiaomi/image_handler.py | licheng5625/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor | d1af6a71e8287c6f3f4002367146d42451efa1cb | [
"MIT"
] | null | null | null | custom_components/xiaomi_cloud_map_extractor/xiaomi_vacuum_map_parser/xiaomi/image_handler.py | licheng5625/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor | d1af6a71e8287c6f3f4002367146d42451efa1cb | [
"MIT"
] | null | null | null | custom_components/xiaomi_cloud_map_extractor/xiaomi_vacuum_map_parser/xiaomi/image_handler.py | licheng5625/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor | d1af6a71e8287c6f3f4002367146d42451efa1cb | [
"MIT"
] | null | null | null | import logging
from typing import Tuple
from PIL import Image
from PIL.Image import Image as ImageType
from ..common.image_handler import ImageHandler
from ..const import *
_LOGGER = logging.getLogger(__name__)
class ImageHandlerXiaomi(ImageHandler):
MAP_OUTSIDE = 0x00
MAP_WALL = 0x01
MAP_INSIDE = 0xFF... | 49.658228 | 119 | 0.573031 |
7dc71effbea78afd3ec1020f72f7db166782ff23 | 4,356 | py | Python | train.py | spectrtrec/siim_pneumothorax | 3b16ae482c674c5baf702e64a7c6e19ca9aa71d3 | [
"MIT"
] | null | null | null | train.py | spectrtrec/siim_pneumothorax | 3b16ae482c674c5baf702e64a7c6e19ca9aa71d3 | [
"MIT"
] | null | null | null | train.py | spectrtrec/siim_pneumothorax | 3b16ae482c674c5baf702e64a7c6e19ca9aa71d3 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
import pandas as pd
from keras import backend as K
from keras_radam import RAdam
from augmentations import *
from losses import *
from model import *
from siim_data_loader import *
from utils import *
from segmentation_models import Unet
parser = argparse.ArgumentParser()
parser.a... | 33 | 88 | 0.626263 |
6727135b96adbe92393cbe8c06cd7f9d3da98b9c | 2,454 | py | Python | train.py | sukijelly/wav2vec2_finetune | e89dbe44f126ce161a13a5529cdd4b70bf8d3af2 | [
"Apache-2.0"
] | 33 | 2021-12-27T05:15:37.000Z | 2022-01-09T23:02:18.000Z | train.py | sukijelly/wav2vec2_finetune | e89dbe44f126ce161a13a5529cdd4b70bf8d3af2 | [
"Apache-2.0"
] | null | null | null | train.py | sukijelly/wav2vec2_finetune | e89dbe44f126ce161a13a5529cdd4b70bf8d3af2 | [
"Apache-2.0"
] | 2 | 2022-02-22T00:58:31.000Z | 2022-03-12T13:39:19.000Z | import warnings
import numpy as np
import yaml
from transformers import Trainer, TrainingArguments, Wav2Vec2ForCTC
from dataset import dataset
from utils import DataCollatorCTCWithPadding, compute_metrics
def train():
warnings.filterwarnings("ignore", category=np.VisibleDeprecationWarning)
warnings.filterwa... | 35.057143 | 81 | 0.700081 |
2b5a02bdc1b0c49e9fe6ddf3fdd58d65b6735225 | 3,523 | py | Python | mmdet3d/core/post_processing/merge_augs.py | LJoson/mmdetection3d | ff159fe7ea2a45f9138487c1c4977d2f67676ebc | [
"Apache-2.0"
] | null | null | null | mmdet3d/core/post_processing/merge_augs.py | LJoson/mmdetection3d | ff159fe7ea2a45f9138487c1c4977d2f67676ebc | [
"Apache-2.0"
] | null | null | null | mmdet3d/core/post_processing/merge_augs.py | LJoson/mmdetection3d | ff159fe7ea2a45f9138487c1c4977d2f67676ebc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.ops import nms_bev as nms_gpu
from mmcv.ops import nms_normal_bev as nms_normal_gpu
from ..bbox import bbox3d2result, bbox3d_mapping_back, xywhr2xyxyr
def merge_aug_bboxes_3d(aug_results, img_metas, test_cfg):
"""Merge augmented detection 3D ... | 37.478723 | 78 | 0.682657 |
e4f758fa1796a61d9e4c9f3af860bd8c2e6ff3ae | 1,412 | py | Python | indico/modules/attachments/views.py | salevajo/indico | 6f9cbabc20d1641caea907099388ae2b04965cf8 | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/modules/attachments/views.py | salevajo/indico | 6f9cbabc20d1641caea907099388ae2b04965cf8 | [
"MIT"
] | 5 | 2021-04-08T19:26:47.000Z | 2022-01-24T16:30:18.000Z | indico/modules/attachments/views.py | salevajo/indico | 6f9cbabc20d1641caea907099388ae2b04965cf8 | [
"MIT"
] | 2 | 2019-02-24T17:29:10.000Z | 2021-04-08T19:23:27.000Z | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from indico.modules.events.management.views import WPEventManagement
from indico.modules.events.views impo... | 30.042553 | 89 | 0.786827 |
57b902c6f3789efb75baca6ce357f2f08efbd6fc | 8,684 | py | Python | mindspore/explainer/explanation/_attribution/_perturbation/rise.py | 233-puchi/mindspore | e9d2684cdb7668eac48169feeff778eeffbfa70e | [
"Apache-2.0"
] | null | null | null | mindspore/explainer/explanation/_attribution/_perturbation/rise.py | 233-puchi/mindspore | e9d2684cdb7668eac48169feeff778eeffbfa70e | [
"Apache-2.0"
] | null | null | null | mindspore/explainer/explanation/_attribution/_perturbation/rise.py | 233-puchi/mindspore | e9d2684cdb7668eac48169feeff778eeffbfa70e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 47.195652 | 119 | 0.632427 |
97f739e5843130113d68738ab079dc90b7bb5f7c | 999 | py | Python | Lib/test/test_jython_initializer.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 577 | 2020-06-04T16:34:44.000Z | 2022-03-31T11:46:07.000Z | Lib/test/test_jython_initializer.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 174 | 2015-01-08T20:37:09.000Z | 2020-06-03T16:48:59.000Z | Lib/test/test_jython_initializer.py | jeff5/jython-whinchat | 65d8e5268189f8197295ff2d91be3decb1ee0081 | [
"CNRI-Jython"
] | 162 | 2015-02-07T02:14:38.000Z | 2020-05-30T16:42:03.000Z | import os
import subprocess
import sys
import unittest
from test import test_support
WINDOWS = (os._name if test_support.is_jython else os.name) == 'nt'
class TestUsingInitializer(unittest.TestCase):
def test_syspath_initializer(self):
fn = test_support.findfile('check_for_initializer_in_syspath.py')
... | 32.225806 | 76 | 0.660661 |
3029a3746b38534c2ebd74f22527c303a107e1a6 | 2,203 | py | Python | ckan/views/dashboard.py | salsadigitalauorg/ckan | 7586d78682c30f205027522214f33ee2bf413055 | [
"BSD-3-Clause"
] | null | null | null | ckan/views/dashboard.py | salsadigitalauorg/ckan | 7586d78682c30f205027522214f33ee2bf413055 | [
"BSD-3-Clause"
] | null | null | null | ckan/views/dashboard.py | salsadigitalauorg/ckan | 7586d78682c30f205027522214f33ee2bf413055 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
from __future__ import annotations
import logging
from typing import Any, cast
from flask import Blueprint
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.logic as logic
import ckan.model as model
from ckan.common import _, g
from ckan.views.user import _extra_template_variabl... | 31.471429 | 76 | 0.704494 |
0c0b72291b69e569685817f01fdef608359963ab | 51,596 | py | Python | bayesian/api_v1.py | arajkumar/fabric8-analytics-server | 110767da04da00fefb7e36f9c28624f554835990 | [
"Apache-2.0"
] | null | null | null | bayesian/api_v1.py | arajkumar/fabric8-analytics-server | 110767da04da00fefb7e36f9c28624f554835990 | [
"Apache-2.0"
] | null | null | null | bayesian/api_v1.py | arajkumar/fabric8-analytics-server | 110767da04da00fefb7e36f9c28624f554835990 | [
"Apache-2.0"
] | null | null | null | """Definition of all REST API endpoints of the server module."""
import datetime
import functools
import uuid
import re
import urllib
import tempfile
import json
import time
from collections import defaultdict
import botocore
from requests_futures.sessions import FuturesSession
from flask import Blueprint, current_a... | 41.509252 | 100 | 0.592507 |
ef0e819626fd442b923dfb353403ebd9f939fb4d | 1,019 | py | Python | phone_sensor/test_phone_sensor.py | CallumJHays/mvt-phonesensor-app | f1e9665a22ea85535b9704c3f07f46b486edc81b | [
"MIT"
] | 1 | 2021-09-08T09:30:21.000Z | 2021-09-08T09:30:21.000Z | phone_sensor/test_phone_sensor.py | CallumJHays/machinevision-toolbox-python.phone-sensor | f1e9665a22ea85535b9704c3f07f46b486edc81b | [
"MIT"
] | 2 | 2021-03-02T04:48:08.000Z | 2021-03-15T00:58:07.000Z | phone_sensor/test_phone_sensor.py | CallumJHays/mvt-phonesensor-app | f1e9665a22ea85535b9704c3f07f46b486edc81b | [
"MIT"
] | null | null | null | from http import HTTPStatus
from phone_sensor import PhoneSensor
import unittest
from urllib.request import urlopen
import ssl
class TestPhoneSensor(unittest.TestCase):
def test_constructor(self):
PhoneSensor().close()
def test_server_shutsdown(self):
with PhoneSensor():
pass
... | 26.128205 | 82 | 0.654563 |
83a6b37fe814ffe685a6a31082e7f7f9df05ca46 | 38,302 | py | Python | testdata/bin/generate-schema-statements.py | radford-nguyen/impala | eb95c912cb7e720caf66388942b4e94d95e95658 | [
"Apache-2.0"
] | 1 | 2019-04-22T10:32:39.000Z | 2019-04-22T10:32:39.000Z | testdata/bin/generate-schema-statements.py | grcpeng/impala | 8412c772cb551c59fdb6e9dd59b49043f4aa9ef6 | [
"Apache-2.0"
] | 1 | 2019-05-06T07:23:34.000Z | 2019-05-06T07:23:34.000Z | testdata/bin/generate-schema-statements.py | grcpeng/impala | 8412c772cb551c59fdb6e9dd59b49043f4aa9ef6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env impala-python
#
# 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 (... | 45.870659 | 94 | 0.686622 |
defb137473d817976ff3c17042ed6651f7a9f1f1 | 908 | py | Python | img-shapes-texts.py | martingaido/opencv-python | 22951f77244638795d45b89871ec8911b0cf60d1 | [
"MIT"
] | null | null | null | img-shapes-texts.py | martingaido/opencv-python | 22951f77244638795d45b89871ec8911b0cf60d1 | [
"MIT"
] | null | null | null | img-shapes-texts.py | martingaido/opencv-python | 22951f77244638795d45b89871ec8911b0cf60d1 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
print("OpenCV Version:", cv2.__version__)
# Black Image
img = np.zeros((512, 512, 3), np.uint8)
cv2.imshow("Black Image", img)
# Color Image
img[:] = 255, 0, 0
cv2.imshow("Blue Image", img)
# Create Lines (start, end, color, thickness)
cv2.line(img, (0,0), (300,300), (0,255,0), 3)
cv2... | 26.705882 | 88 | 0.676211 |
20256cb417774ba174cdc661ae45cabf32348e1f | 1,625 | py | Python | aliyun-python-sdk-edas/aliyunsdkedas/request/v20170801/StartApplicationRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-edas/aliyunsdkedas/request/v20170801/StartApplicationRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-edas/aliyunsdkedas/request/v20170801/StartApplicationRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"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... | 36.111111 | 77 | 0.760615 |
5ebc58d9237b659885eb82ae238d4ab5e953af22 | 1,391 | py | Python | lib/streamlit/error_util.py | pohlt/streamlit | 852764f4f7d2bc06ddf932632df06c9104bf0a35 | [
"Apache-2.0"
] | 5 | 2020-07-06T21:29:56.000Z | 2022-03-12T20:04:27.000Z | lib/streamlit/error_util.py | pohlt/streamlit | 852764f4f7d2bc06ddf932632df06c9104bf0a35 | [
"Apache-2.0"
] | 5 | 2021-04-30T21:25:13.000Z | 2022-03-12T00:43:14.000Z | lib/streamlit/error_util.py | pohlt/streamlit | 852764f4f7d2bc06ddf932632df06c9104bf0a35 | [
"Apache-2.0"
] | 3 | 2020-07-14T23:32:51.000Z | 2021-12-04T16:49:29.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2020 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 30.911111 | 87 | 0.741912 |
047032425f65959580e5842444545fde515e867c | 9,157 | py | Python | official/resnet/ctl/ctl_imagenet_benchmark.py | laggingreflex/models | 7212436440eaa11293ca84befcc5d8327109ea76 | [
"Apache-2.0"
] | 2 | 2018-05-08T08:57:52.000Z | 2021-11-17T10:24:18.000Z | official/resnet/ctl/ctl_imagenet_benchmark.py | laggingreflex/models | 7212436440eaa11293ca84befcc5d8327109ea76 | [
"Apache-2.0"
] | 4 | 2018-09-29T14:56:06.000Z | 2018-11-05T05:58:25.000Z | official/resnet/ctl/ctl_imagenet_benchmark.py | laggingreflex/models | 7212436440eaa11293ca84befcc5d8327109ea76 | [
"Apache-2.0"
] | 4 | 2018-10-03T16:10:24.000Z | 2018-11-09T22:48:33.000Z | # Copyright 2019 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.424812 | 80 | 0.683958 |
9740027201dc06af0ca5557da6eb8e9bc3a51a96 | 2,645 | py | Python | iAnnotateSV/AnnotateForDGv.py | rhshah/iAnnotateSV | a2f86543925169219c91fe4e3de5412a69f735a4 | [
"Apache-2.0"
] | 16 | 2015-03-28T19:06:11.000Z | 2021-05-01T17:20:05.000Z | iAnnotateSV/AnnotateForDGv.py | mskcc/iAnnotateSV | eb06fe93c20783a1fead0ca1e02fba2ded97d622 | [
"Apache-2.0"
] | 14 | 2016-10-09T00:50:42.000Z | 2022-01-13T00:42:58.000Z | iAnnotateSV/AnnotateForDGv.py | rhshah/iAnnotateSV | a2f86543925169219c91fe4e3de5412a69f735a4 | [
"Apache-2.0"
] | 10 | 2015-03-09T14:07:41.000Z | 2020-04-13T09:41:02.000Z | '''
Created on 12/23/2015
@Ronak Shah
'''
from collections import defaultdict
import pandas as pd
import logging
import coloredlogs
# Gives elements at particular index in list
getVar = lambda searchList, ind: [searchList[i] for i in ind]
coloredlogs.install(level='DEBUG')
def ReadDGvFile(filename, verbose):
if(v... | 39.477612 | 122 | 0.608696 |
9fa3183606fec259ad5b1b2788c11f9e7959410b | 17,270 | py | Python | mriqc/bin/mriqc_run.py | Jordan-Theriault/mriqc | 7a84b28e17c9f137bde75aa264b6f0e7e5804eed | [
"BSD-3-Clause"
] | null | null | null | mriqc/bin/mriqc_run.py | Jordan-Theriault/mriqc | 7a84b28e17c9f137bde75aa264b6f0e7e5804eed | [
"BSD-3-Clause"
] | null | null | null | mriqc/bin/mriqc_run.py | Jordan-Theriault/mriqc | 7a84b28e17c9f137bde75aa264b6f0e7e5804eed | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: oesteban
# @Date: 2015-11-19 16:44:27
"""
=====
MRIQC
=====
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import os
import os.path as op
from multiprocessing import cpu_count
from .. import __version__
DEFAULT_MEM_GB... | 43.832487 | 98 | 0.596815 |
16c2cf5f55958399fa02f2c6ca5fe0b60cf9f372 | 731 | py | Python | setup.py | saikiran030996/C-Users-KirAI-oops-Project-DVC-NLP-usecase | f18f85bbb4b75cf073529714fc704dedff9de760 | [
"MIT"
] | null | null | null | setup.py | saikiran030996/C-Users-KirAI-oops-Project-DVC-NLP-usecase | f18f85bbb4b75cf073529714fc704dedff9de760 | [
"MIT"
] | null | null | null | setup.py | saikiran030996/C-Users-KirAI-oops-Project-DVC-NLP-usecase | f18f85bbb4b75cf073529714fc704dedff9de760 | [
"MIT"
] | null | null | null | from setuptools import setup
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
## edit below variables as per your requirements -
REPO_NAME = "C-Users-KirAI-oops-Project-DVC-NLP-usecase"
AUTHOR_USER_NAME = "saikiran"
SRC_REPO = "src"
LIST_OF_REQUIREMENTS = []
setup(
name=SRC_RE... | 27.074074 | 61 | 0.715458 |
2ae488bda12794c6a030c60722d894fa522b4666 | 535 | py | Python | packages/pyre/filesystem/BlockDevice.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/filesystem/BlockDevice.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/filesystem/BlockDevice.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2022 all rights reserved
#
# superclass
from .File import File
# class declaration
class BlockDevice(File):
"""
Representation of block devices, a type of unix device driver
"""
# constant
marker = 'b'
# interface
... | 16.212121 | 65 | 0.605607 |
0d47804022bd1e7e7c40d6e4957d7300593b8507 | 992 | py | Python | InfluxDBWriter/InfluxdbWriter.py | ansjin/multi-serverless-deployment | d4bb6f65db01c6b6fd2085de17f8cfad2cba9bb8 | [
"MIT"
] | 1 | 2021-03-08T20:17:46.000Z | 2021-03-08T20:17:46.000Z | InfluxDBWriter/InfluxdbWriter.py | ansjin/multi-serverless-deployment | d4bb6f65db01c6b6fd2085de17f8cfad2cba9bb8 | [
"MIT"
] | null | null | null | InfluxDBWriter/InfluxdbWriter.py | ansjin/multi-serverless-deployment | d4bb6f65db01c6b6fd2085de17f8cfad2cba9bb8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import yaml
logs_file = "Logs/log.log"
from influxdb import DataFrameClient
class InfluxDBWriter:
def __init__(self, configfile: str):
with open(configfile, 'r') as stream:
try:
data = yaml.safe_load(stream)
data = data['influxdb']
... | 34.206897 | 97 | 0.550403 |
7de41f65e064485f54da28a17cdbcc09b4192a2b | 2,671 | py | Python | tests/env/packages/env_test_seaborn.py | patkan/foxbms-2 | 329216a5b0739362512b4c744975a136f674f60c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 47 | 2021-04-01T21:14:55.000Z | 2022-03-30T12:19:18.000Z | tests/env/packages/env_test_seaborn.py | patkan/foxbms-2 | 329216a5b0739362512b4c744975a136f674f60c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 6 | 2021-06-01T08:25:54.000Z | 2021-11-17T07:55:05.000Z | tests/env/packages/env_test_seaborn.py | patkan/foxbms-2 | 329216a5b0739362512b4c744975a136f674f60c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 24 | 2021-04-01T21:15:04.000Z | 2022-03-29T06:18:10.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | 36.589041 | 98 | 0.732684 |
6c3bbb9313bb02215c611545e1f69edd138a32f7 | 184 | py | Python | dog-breed-system/dog-breed.py | campos537/dog-breed-recognition | 30be95bd53074efd8138c228efe99d3978705d30 | [
"Unlicense"
] | null | null | null | dog-breed-system/dog-breed.py | campos537/dog-breed-recognition | 30be95bd53074efd8138c228efe99d3978705d30 | [
"Unlicense"
] | null | null | null | dog-breed-system/dog-breed.py | campos537/dog-breed-recognition | 30be95bd53074efd8138c228efe99d3978705d30 | [
"Unlicense"
] | null | null | null | from tkinter import *
from windows.main_window import MainWindow
window = Tk()
mywin = MainWindow(window)
window.title('Dog Breed')
window.geometry("960x960+10+10")
window.mainloop()
| 20.444444 | 42 | 0.771739 |
9591fb111fadae4fb1a8227283e9eb45b05373b0 | 556 | py | Python | document_model.py | iliaschalkidis/lmtc-emnlp2020 | 55634fda5f118a0476572e674e90b14d3b740501 | [
"Apache-2.0"
] | 11 | 2020-09-16T15:12:42.000Z | 2022-02-09T06:16:31.000Z | document_model.py | iliaschalkidis/lmtc-emnlp2020 | 55634fda5f118a0476572e674e90b14d3b740501 | [
"Apache-2.0"
] | 2 | 2021-04-14T16:59:10.000Z | 2022-01-28T08:11:17.000Z | document_model.py | iliaschalkidis/lmtc-emnlp2020 | 55634fda5f118a0476572e674e90b14d3b740501 | [
"Apache-2.0"
] | 1 | 2021-07-15T18:36:54.000Z | 2021-07-15T18:36:54.000Z | import logging
from spacy_tagger import Tagger
LOGGER = logging.getLogger(__name__)
class Document:
"""
A document is a combination of text and the positions of the tags in that text.
"""
tagger = Tagger()
def __init__(self, text, tags, filename=None):
"""
:param text: document t... | 25.272727 | 83 | 0.634892 |
1b74d1cc1d16d916e23cf1c338b6046e9667f079 | 566 | py | Python | beatmap_collections/migrations/0014_alter_profile_user.py | HelloYeew/beattosetto | f8847fda908b0211c1221ba64854df42274b9db1 | [
"MIT"
] | 5 | 2021-11-02T15:09:24.000Z | 2022-03-24T03:03:57.000Z | beatmap_collections/migrations/0014_alter_profile_user.py | beattosetto/beattosetto | a4bd93fc1ca7530b73f03194847ab8b0dca86806 | [
"MIT"
] | 205 | 2021-10-12T09:13:59.000Z | 2022-03-10T10:09:07.000Z | beatmap_collections/migrations/0014_alter_profile_user.py | pontakornth/beattosetto | b3201922a61a9164659efc26f11dc818aa5705f2 | [
"MIT"
] | 2 | 2021-10-12T13:39:01.000Z | 2021-10-13T08:47:59.000Z | # Generated by Django 3.2.8 on 2021-10-25 02:51
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),
('beatmap_collections', '0... | 25.727273 | 97 | 0.666078 |
6adc2f558dcae2ae470dc5da212f82b3877487e1 | 9,284 | py | Python | missions/examples/movie-review/example/dataset.py | muik/ai-hackathon-2018 | 53fb888bf777b89c1d073acd00a49a3865ca9d1e | [
"MIT"
] | 2 | 2018-05-04T07:28:09.000Z | 2018-06-04T01:15:07.000Z | missions/examples/movie-review/example/dataset.py | muik/ai-hackathon-2018 | 53fb888bf777b89c1d073acd00a49a3865ca9d1e | [
"MIT"
] | null | null | null | missions/examples/movie-review/example/dataset.py | muik/ai-hackathon-2018 | 53fb888bf777b89c1d073acd00a49a3865ca9d1e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright 2018 NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, pu... | 36.407843 | 152 | 0.62193 |
67a78049781af2ad582bc7d5e0d5e4ad95d91845 | 4,634 | py | Python | tests/unit/partner/model_tests.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | null | null | null | tests/unit/partner/model_tests.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | null | null | null | tests/unit/partner/model_tests.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | null | null | null | from decimal import Decimal as D
from django.db.models import get_model
from django.test import TestCase
from oscar.test import factories, decorators
from oscar.apps.partner import abstract_models
Partner = get_model('partner', 'Partner')
PartnerAddress = get_model('partner', 'PartnerAddress')
Country = get_model('a... | 35.106061 | 77 | 0.698748 |
5bc1c1a48ad4d6ac5b07962ac68c8abe52c581ca | 4,075 | py | Python | jobsub/Colorer.py | simonspa/corryvreckan | ffa5d1f7a47341ab6eb1b6208c9e0c472a58f436 | [
"MIT"
] | null | null | null | jobsub/Colorer.py | simonspa/corryvreckan | ffa5d1f7a47341ab6eb1b6208c9e0c472a58f436 | [
"MIT"
] | null | null | null | jobsub/Colorer.py | simonspa/corryvreckan | ffa5d1f7a47341ab6eb1b6208c9e0c472a58f436 | [
"MIT"
] | null | null | null | #This code is taken unchanged from http://stackoverflow.com/a/1336640 and therefore is as is
#under CC BY-SA 3.0
#!/usr/bin/env python
# encoding: utf-8
import logging
# now we patch Python code to add color support to logging.StreamHandler
def add_coloring_to_emit_windows(fn):
# add methods we need to the cla... | 36.061947 | 100 | 0.62454 |
56b8be0a37d3eae1e52c9e15b8c07529f8ef31a1 | 4,275 | py | Python | python_modules/socketpool/util.py | interactiveinstitute/watthappened | 0c7ab7a5ae7f7a0f567c32a524b3c27294d1233f | [
"MIT"
] | null | null | null | python_modules/socketpool/util.py | interactiveinstitute/watthappened | 0c7ab7a5ae7f7a0f567c32a524b3c27294d1233f | [
"MIT"
] | null | null | null | python_modules/socketpool/util.py | interactiveinstitute/watthappened | 0c7ab7a5ae7f7a0f567c32a524b3c27294d1233f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -
#
# This file is part of socketpool.
# See the NOTICE for more information.
import errno
import os
import select
import socket
import sys
try:
from importlib import import_module
except ImportError:
import sys
def _resolve_name(name, package, level):
"""Return the absolute n... | 31.433824 | 82 | 0.531462 |
0bfa4aa11ecdbc6e5a02bf2c0f581af4a6240b8a | 959 | py | Python | evaluation/process_bcb_clones.py | cragkhit/elasticsearch | 05567b30c5bde08badcac1bf421454e5d995eb91 | [
"Apache-2.0"
] | 23 | 2018-10-03T15:02:53.000Z | 2021-09-16T11:07:36.000Z | evaluation/process_bcb_clones.py | LandAndLand/Siamese | 07fb10bec4614f55bcc39e571d1185fc9ce86242 | [
"Apache-2.0"
] | 18 | 2019-02-10T04:52:54.000Z | 2022-01-25T02:14:40.000Z | evaluation/process_bcb_clones.py | LandAndLand/Siamese | 07fb10bec4614f55bcc39e571d1185fc9ce86242 | [
"Apache-2.0"
] | 19 | 2018-11-16T13:39:05.000Z | 2021-09-05T23:59:30.000Z | from __future__ import print_function
import sys
def gen_pairs(line):
parts = line.split(',')
return parts
def format_query(query, prefix):
parts = query.split('#')
return parts[0].replace(prefix, '').strip() + ',' \
+ parts[1].strip() + '.java,' + parts[2].strip() + ',' \
+ pa... | 29.96875 | 92 | 0.603754 |
77202187dece0c78166d4562b13e69078c3d7ecd | 580 | py | Python | tests/models.py | zgoda/pony-factoryboy | 3ca614fd9ae8ff781578dee01851390e20acf752 | [
"Apache-2.0"
] | 1 | 2020-08-30T17:10:07.000Z | 2020-08-30T17:10:07.000Z | tests/models.py | zgoda/pony-factoryboy | 3ca614fd9ae8ff781578dee01851390e20acf752 | [
"Apache-2.0"
] | null | null | null | tests/models.py | zgoda/pony-factoryboy | 3ca614fd9ae8ff781578dee01851390e20acf752 | [
"Apache-2.0"
] | null | null | null | from pony.orm import Database, Optional, Required, PrimaryKey
db = Database()
class StandardModel(db.Entity):
foo = Required(str, 20)
class NonIntegerPK(db.Entity):
foo = PrimaryKey(str, 20)
bar = Optional(str, 20)
class MultifieldModel(db.Entity):
slug = Required(str, 20, unique=True)
text =... | 20.714286 | 61 | 0.694828 |
5e1c88d194b2275be73306aa0384c972ab170518 | 275 | py | Python | revli/lib/plugins/otffragmentorder.py | Akida31/revli | 22ac7da01114916ba1e2eb2f683cd9c346d5d2b1 | [
"MIT"
] | null | null | null | revli/lib/plugins/otffragmentorder.py | Akida31/revli | 22ac7da01114916ba1e2eb2f683cd9c346d5d2b1 | [
"MIT"
] | null | null | null | revli/lib/plugins/otffragmentorder.py | Akida31/revli | 22ac7da01114916ba1e2eb2f683cd9c346d5d2b1 | [
"MIT"
] | null | null | null | from os.path import join
from revli.lib.plugins.plugin import Plugin
class OTFFragmentOrder(Plugin):
def add(self):
self.add_attr_to_initialize("otfFragmentOrder", True)
self.add_dependency(join("otf-fragment-order", "otf-fragment-order.js"))
| 27.5 | 81 | 0.712727 |
467cb20af5be0b546fe311b7c65d93191288a1de | 293 | py | Python | Codes/19 - Packages.py | Muntaha-Islam0019/Hello-World | a650bd32e039076ea10caea850453fdaa4744975 | [
"MIT"
] | 1 | 2019-12-18T09:59:44.000Z | 2019-12-18T09:59:44.000Z | Codes/19 - Packages.py | Muntaha-Islam0019/Hello-World | a650bd32e039076ea10caea850453fdaa4744975 | [
"MIT"
] | null | null | null | Codes/19 - Packages.py | Muntaha-Islam0019/Hello-World | a650bd32e039076ea10caea850453fdaa4744975 | [
"MIT"
] | null | null | null | # This code is related to 'Shop' package.
# Yes, one need to mention the package name before
# importing a module from a package.
from Codes.Shop.Prices import price
cart = ["shirt", "pant", "shoe"]
total_price = 0
for product in cart:
total_price += price(product)
print(total_price)
| 20.928571 | 50 | 0.720137 |
3edaa866587a364ec952d91f4ef0f5ecb6b16cc1 | 3,917 | py | Python | tempest/api/object_storage/test_object_temp_url_negative.py | mail2nsrajesh/tempest | 1a3b3dc50b418d3a15839830d7d1ff88c8c76cff | [
"Apache-2.0"
] | null | null | null | tempest/api/object_storage/test_object_temp_url_negative.py | mail2nsrajesh/tempest | 1a3b3dc50b418d3a15839830d7d1ff88c8c76cff | [
"Apache-2.0"
] | null | null | null | tempest/api/object_storage/test_object_temp_url_negative.py | mail2nsrajesh/tempest | 1a3b3dc50b418d3a15839830d7d1ff88c8c76cff | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 35.288288 | 78 | 0.635946 |
dd39978d66fc6495a211d64480341e0d79ca288e | 24,930 | py | Python | nautobot_golden_config/models.py | progala/nautobot-plugin-golden-config | 63728d56285d8ac2fea3b8f993a481798eef5d12 | [
"Apache-2.0"
] | null | null | null | nautobot_golden_config/models.py | progala/nautobot-plugin-golden-config | 63728d56285d8ac2fea3b8f993a481798eef5d12 | [
"Apache-2.0"
] | null | null | null | nautobot_golden_config/models.py | progala/nautobot-plugin-golden-config | 63728d56285d8ac2fea3b8f993a481798eef5d12 | [
"Apache-2.0"
] | null | null | null | """Django Models for tracking the configuration compliance per feature and device."""
import logging
import json
from deepdiff import DeepDiff
from django.db import models
from django.core.exceptions import ValidationError
from django.core.serializers.json import DjangoJSONEncoder
from django.shortcuts import reverse
... | 36.078148 | 253 | 0.662535 |
032ee13b0a6fc972580451298bc83c2137ee394b | 333 | py | Python | src/webapp/views.py | MaximeRaynal/SimpleNote | aee1eeba5561dbf985bd7349a0528bfed6ceaeda | [
"MIT"
] | null | null | null | src/webapp/views.py | MaximeRaynal/SimpleNote | aee1eeba5561dbf985bd7349a0528bfed6ceaeda | [
"MIT"
] | null | null | null | src/webapp/views.py | MaximeRaynal/SimpleNote | aee1eeba5561dbf985bd7349a0528bfed6ceaeda | [
"MIT"
] | null | null | null | from django.views.decorators.http import require_http_methods
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
@require_http_methods(["GET"])
@login_required
def index(request):
""" Point d'entrée de sert l'application HTML JS CSS """
return render(request, 'webapp... | 33.3 | 61 | 0.786787 |
ae471b99b7813c2c5e308d36ddf815fbdda3cf4a | 693 | py | Python | var/spack/repos/builtin/packages/py-mpmath/package.py | mtmiller/spack | c97c135f1dbe24955048fcc4f0f98281ef0c9300 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-11-16T02:42:57.000Z | 2019-06-06T19:18:50.000Z | var/spack/repos/builtin/packages/py-mpmath/package.py | mtmiller/spack | c97c135f1dbe24955048fcc4f0f98281ef0c9300 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2021-05-12T05:53:01.000Z | 2022-03-18T17:30:25.000Z | var/spack/repos/builtin/packages/py-mpmath/package.py | mtmiller/spack | c97c135f1dbe24955048fcc4f0f98281ef0c9300 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-11-06T06:38:51.000Z | 2020-10-27T07:45:01.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyMpmath(PythonPackage):
"""A Python library for arbitrary-precision floating-point arithm... | 40.764706 | 95 | 0.777778 |
8c92bf00844fbcbea3c7c4b548ebfc3d13a7caad | 47 | py | Python | run.py | voschezang/ABM | 523fcf30000057e73ba93f5a500d8896c945a35f | [
"MIT"
] | null | null | null | run.py | voschezang/ABM | 523fcf30000057e73ba93f5a500d8896c945a35f | [
"MIT"
] | null | null | null | run.py | voschezang/ABM | 523fcf30000057e73ba93f5a500d8896c945a35f | [
"MIT"
] | null | null | null | from src.server import server
server.launch()
| 11.75 | 29 | 0.787234 |
6eaec38fbc05eb1d56b81f177995f4b20dbc4888 | 899 | py | Python | src/nodeconductor_paas_oracle/log.py | opennode/nodeconductor-paas-oracle | 799c05438265da0b328bcaa425af01e9576f57fe | [
"MIT"
] | null | null | null | src/nodeconductor_paas_oracle/log.py | opennode/nodeconductor-paas-oracle | 799c05438265da0b328bcaa425af01e9576f57fe | [
"MIT"
] | null | null | null | src/nodeconductor_paas_oracle/log.py | opennode/nodeconductor-paas-oracle | 799c05438265da0b328bcaa425af01e9576f57fe | [
"MIT"
] | null | null | null | from nodeconductor.logging.loggers import EventLogger, event_logger
from nodeconductor_paas_oracle.models import Deployment
class OracleDeploymentEventLogger(EventLogger):
deployment = Deployment
jira_issue_key = basestring
class Meta:
nullable_fields = ['jira_issue_key']
event_types = (
... | 34.576923 | 71 | 0.718576 |
ae31d1f336665e6427fa20caa6691927beb6117d | 7,569 | py | Python | rssant_common/dns_service.py | lixiupei/rssant | a0602c561fbde3a564b4dadd177a96db64be8a56 | [
"BSD-3-Clause"
] | null | null | null | rssant_common/dns_service.py | lixiupei/rssant | a0602c561fbde3a564b4dadd177a96db64be8a56 | [
"BSD-3-Clause"
] | 5 | 2021-03-19T11:23:24.000Z | 2022-02-10T11:36:33.000Z | rssant_common/dns_service.py | lixiupei/rssant | a0602c561fbde3a564b4dadd177a96db64be8a56 | [
"BSD-3-Clause"
] | null | null | null | from typing import List, Dict, Any
import logging
import random
import ipaddress
import ssl
import socket
import asyncio
from urllib.parse import urlparse
from collections import defaultdict
from urllib3.util import connection
import aiohttp
from rssant_config import CONFIG
from .rss_proxy import RSSProxyClient, Prox... | 32.072034 | 96 | 0.624389 |
2d6f8831b91239fb9a38ff5b71f93aa25d557c4e | 1,181 | py | Python | blog/migrations/0015_blogpage_body.py | dixonary/uwcs-zarya | e982f324c0a6aca156a15c6f597012f47bc070cc | [
"MIT"
] | 7 | 2016-09-30T20:33:46.000Z | 2020-03-16T15:04:20.000Z | blog/migrations/0015_blogpage_body.py | dixonary/uwcs-zarya | e982f324c0a6aca156a15c6f597012f47bc070cc | [
"MIT"
] | 46 | 2016-10-01T17:52:59.000Z | 2022-01-13T00:44:09.000Z | blog/migrations/0015_blogpage_body.py | dixonary/uwcs-zarya | e982f324c0a6aca156a15c6f597012f47bc070cc | [
"MIT"
] | 6 | 2016-10-15T02:51:18.000Z | 2020-10-02T12:47:54.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-14 18:56
from __future__ import unicode_literals
from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.documents.blocks
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies ... | 45.423077 | 643 | 0.695174 |
c42444fcfdf4d88125e1ed0c4995b2b8fc26fc7d | 82,000 | py | Python | tests/trainer/test_trainer.py | alessiobonfiglio/pytorch-lightning | c453caf57e8ee65aaf82d4d42b26d7634dbf7046 | [
"Apache-2.0"
] | 1 | 2021-12-05T09:12:43.000Z | 2021-12-05T09:12:43.000Z | tests/trainer/test_trainer.py | AshleySato899/pytorch-lightning | 854bdc042d12fe4b713de881c58b025de30d0c39 | [
"Apache-2.0"
] | null | null | null | tests/trainer/test_trainer.py | AshleySato899/pytorch-lightning | 854bdc042d12fe4b713de881c58b025de30d0c39 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 37.477148 | 120 | 0.691293 |
014add1f87871527bcbcfc051efd1917f820f5df | 32,903 | py | Python | salt/cloud/clouds/proxmox.py | nielsk/salt | be5d400d903e68d99c216fd63a7146d86a64a55d | [
"Apache-2.0"
] | 1 | 2022-02-09T06:40:14.000Z | 2022-02-09T06:40:14.000Z | salt/cloud/clouds/proxmox.py | nielsk/salt | be5d400d903e68d99c216fd63a7146d86a64a55d | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/proxmox.py | nielsk/salt | be5d400d903e68d99c216fd63a7146d86a64a55d | [
"Apache-2.0"
] | 4 | 2020-11-04T06:28:05.000Z | 2022-02-09T10:54:49.000Z | # -*- coding: utf-8 -*-
'''
Proxmox Cloud Module
======================
.. versionadded:: 2014.7.0
The Proxmox cloud module is used to control access to cloud providers using
the Proxmox system (KVM / OpenVZ / LXC).
Set up the cloud configuration at ``/etc/salt/cloud.providers`` or
``/etc/salt/cloud.providers.d/pro... | 31.276616 | 109 | 0.595873 |
74b8e14774d13fd4425f022840e79457afdbfa4f | 27,389 | py | Python | datmo/core/controller/file/driver/tests/test_local.py | awesome-archive/datmo | 72ea51c28a9947e24a464395bb0136b39eb6001a | [
"Apache-2.0"
] | 331 | 2018-03-30T14:33:59.000Z | 2022-01-10T19:43:32.000Z | datmo/core/controller/file/driver/tests/test_local.py | KIMS-Github/datmo | a456d196006b67ce56af96cb4900682eab747bef | [
"MIT"
] | 274 | 2018-04-08T17:12:44.000Z | 2020-07-29T02:45:22.000Z | datmo/core/controller/file/driver/tests/test_local.py | KIMS-Github/datmo | a456d196006b67ce56af96cb4900682eab747bef | [
"MIT"
] | 28 | 2018-05-03T21:57:22.000Z | 2020-12-31T04:18:42.000Z | """
Tests for local.py
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import shutil
import tempfile
import platform
from io import TextIOWrapper
try:
def to_bytes(val):
return bytes(val)
to_bytes("test")
except TypeError:
... | 44.033762 | 100 | 0.654934 |
20cdfb4b265d6680a5f650353db3eef5eacae3c6 | 1,077 | py | Python | dogia/server/reconnect_task.py | dogia-coin/dogia-blockchain | 16ea0a09777354905150c216e1fab60141296473 | [
"Apache-2.0"
] | null | null | null | dogia/server/reconnect_task.py | dogia-coin/dogia-blockchain | 16ea0a09777354905150c216e1fab60141296473 | [
"Apache-2.0"
] | null | null | null | dogia/server/reconnect_task.py | dogia-coin/dogia-blockchain | 16ea0a09777354905150c216e1fab60141296473 | [
"Apache-2.0"
] | null | null | null | import asyncio
import socket
from dogia.server.server import DogiaServer
from dogia.types.peer_info import PeerInfo
def start_reconnect_task(server: DogiaServer, peer_info_arg: PeerInfo, log, auth: bool):
"""
Start a background task that checks connection and reconnects periodically to a peer.
"""
pe... | 37.137931 | 106 | 0.645311 |
968951c5f2844f875d4799cbc1a0d0e36ff4b20e | 399 | py | Python | advisor_api/asgi.py | MarikIshtar007/User-Advisor-Booking-API | b5b400199fab9572d62b929bbc2a3c89d09feb23 | [
"MIT"
] | null | null | null | advisor_api/asgi.py | MarikIshtar007/User-Advisor-Booking-API | b5b400199fab9572d62b929bbc2a3c89d09feb23 | [
"MIT"
] | null | null | null | advisor_api/asgi.py | MarikIshtar007/User-Advisor-Booking-API | b5b400199fab9572d62b929bbc2a3c89d09feb23 | [
"MIT"
] | null | null | null | """
ASGI config for advisor_api 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_S... | 23.470588 | 78 | 0.789474 |
be834726af20441f3f34784d6b8b7f9b46026234 | 4,747 | py | Python | dashboard/dashboard/pinpoint/models/results2.py | xinghun61/catapult | a120c4f6e011a9830eefdb783b818ab7113aacfd | [
"BSD-3-Clause"
] | null | null | null | dashboard/dashboard/pinpoint/models/results2.py | xinghun61/catapult | a120c4f6e011a9830eefdb783b818ab7113aacfd | [
"BSD-3-Clause"
] | 5 | 2020-09-07T12:36:46.000Z | 2022-03-02T05:49:30.000Z | dashboard/dashboard/pinpoint/models/results2.py | brave-experiments/catapult | 0d8246fe06fb598577f2344efcbc4b4e5b3aa323 | [
"BSD-3-Clause"
] | 1 | 2020-07-25T00:02:48.000Z | 2020-07-25T00:02:48.000Z | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import cloudstorage
import logging
import os
f... | 28.255952 | 78 | 0.728671 |
b28b27c762e7af7c1e66b06f8ac663671d4bd5ad | 1,045 | py | Python | tests/kubernetes/checks/test_ApiServerAuditLogMaxAge.py | vangundy-jason-pfg/checkov | 2fb50908f62390c98dda665f1fa94fe24806b654 | [
"Apache-2.0"
] | null | null | null | tests/kubernetes/checks/test_ApiServerAuditLogMaxAge.py | vangundy-jason-pfg/checkov | 2fb50908f62390c98dda665f1fa94fe24806b654 | [
"Apache-2.0"
] | null | null | null | tests/kubernetes/checks/test_ApiServerAuditLogMaxAge.py | vangundy-jason-pfg/checkov | 2fb50908f62390c98dda665f1fa94fe24806b654 | [
"Apache-2.0"
] | null | null | null | import os
import unittest
from checkov.kubernetes.checks.resource.k8s.ApiServerAuditLogMaxAge import check
from checkov.kubernetes.runner import Runner
from checkov.runner_filter import RunnerFilter
class TestApiServerAuditLogMaxAge(unittest.TestCase):
def test_summary(self):
runner = Runner()
c... | 32.65625 | 101 | 0.712919 |
4032d8d30f8a5cd1862da5df1603b1230846ef62 | 574 | py | Python | lab/refactoring-pep8/indentation2.py | stark276/SPD-2.31-Testing-and-Architecture1 | 8ec4f3a2968a04584f581354925e927ea1bab34d | [
"MIT"
] | null | null | null | lab/refactoring-pep8/indentation2.py | stark276/SPD-2.31-Testing-and-Architecture1 | 8ec4f3a2968a04584f581354925e927ea1bab34d | [
"MIT"
] | null | null | null | lab/refactoring-pep8/indentation2.py | stark276/SPD-2.31-Testing-and-Architecture1 | 8ec4f3a2968a04584f581354925e927ea1bab34d | [
"MIT"
] | null | null | null |
# by Kami Bigdely
# Indentation
def write_to_db():
print('person info are written into db.')
def set_person_info(first_name, last_name, gender, date_of_birth, photo, nationality, place_of_birth):
if not first_name:
print('first name is empty.')
if not last_name:
print('last name is em... | 33.764706 | 115 | 0.69338 |
b6129c5422f4c389138bc08a7c9f4df33dfe6255 | 104,579 | py | Python | tests/test_s3/test_s3.py | sblumin/moto | 6bc07360a1b44b43bc7d22005559168299d2c1da | [
"Apache-2.0"
] | null | null | null | tests/test_s3/test_s3.py | sblumin/moto | 6bc07360a1b44b43bc7d22005559168299d2c1da | [
"Apache-2.0"
] | null | null | null | tests/test_s3/test_s3.py | sblumin/moto | 6bc07360a1b44b43bc7d22005559168299d2c1da | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from six.moves.urllib.request import urlopen
from six.moves.urllib.error import HTTPError
from functools import wraps
from gzip import GzipFile
from io import BytesIO
import zlib
import pickle
import json
import boto
import boto3
from bot... | 35.081852 | 144 | 0.594307 |
87f1fe5256280adb430ea2f4bd1ca062c5e49d47 | 5,267 | py | Python | arch/api/utils/upload.py | chanzhennan/FATE | 26c4285146e249f7746571011c6f9326c5845a57 | [
"Apache-2.0"
] | 1 | 2019-07-29T13:22:36.000Z | 2019-07-29T13:22:36.000Z | arch/api/utils/upload.py | chanzhennan/FATE | 26c4285146e249f7746571011c6f9326c5845a57 | [
"Apache-2.0"
] | null | null | null | arch/api/utils/upload.py | chanzhennan/FATE | 26c4285146e249f7746571011c6f9326c5845a57 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2019 The FATE 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... | 34.424837 | 136 | 0.550598 |
0b6ec0e554f2e765d0bb81952bf59aed2071456b | 4,152 | py | Python | audio_part.py | Mridul9451/Proctoring | 5615ae3191449d302b0d4c42965a665bcc81d407 | [
"MIT"
] | 1 | 2021-07-23T05:58:36.000Z | 2021-07-23T05:58:36.000Z | audio_part.py | Mridul9451/Proctoring | 5615ae3191449d302b0d4c42965a665bcc81d407 | [
"MIT"
] | null | null | null | audio_part.py | Mridul9451/Proctoring | 5615ae3191449d302b0d4c42965a665bcc81d407 | [
"MIT"
] | null | null | null | import speech_recognition as sr
import pyaudio
import wave
import time
import threading
import os
def read_audio(stream, filename):
chunk = 1024 # Record in chunks of 1024 samples
sample_format = pyaudio.paInt16 # 16 bits per sample
channels = 2
fs = 44100 # Record at 44100 samples per se... | 30.755556 | 94 | 0.601879 |
a89b87c86466700a9e157285d1762b71af0639ef | 11,422 | py | Python | map_merge/launch/tb3_simulation/multi_tb3_simulation_launch.py | LuisLechugaRuiz/m-explore-ros2 | f808bc404a35fb47569b2907caac2338f943deca | [
"BSD-3-Clause"
] | 28 | 2021-08-04T06:00:03.000Z | 2022-03-17T18:14:42.000Z | map_merge/launch/tb3_simulation/multi_tb3_simulation_launch.py | LuisLechugaRuiz/m-explore-ros2 | f808bc404a35fb47569b2907caac2338f943deca | [
"BSD-3-Clause"
] | 8 | 2021-11-09T11:33:40.000Z | 2022-02-24T21:54:56.000Z | map_merge/launch/tb3_simulation/multi_tb3_simulation_launch.py | LuisLechugaRuiz/m-explore-ros2 | f808bc404a35fb47569b2907caac2338f943deca | [
"BSD-3-Clause"
] | 4 | 2021-11-09T11:30:19.000Z | 2022-03-12T05:30:09.000Z | # Copyright (c) 2018 Intel 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 38.85034 | 116 | 0.616354 |
818a4e8c8eb20798bf419df35f38eff5ed222e7b | 4,463 | py | Python | .history/instagram/settings_20201122035354.py | Nyash-Mauro/Instagram-clone | 39f3b660b3bdd59996fa88816712c906d0e3fba5 | [
"MIT"
] | null | null | null | .history/instagram/settings_20201122035354.py | Nyash-Mauro/Instagram-clone | 39f3b660b3bdd59996fa88816712c906d0e3fba5 | [
"MIT"
] | null | null | null | .history/instagram/settings_20201122035354.py | Nyash-Mauro/Instagram-clone | 39f3b660b3bdd59996fa88816712c906d0e3fba5 | [
"MIT"
] | null | null | null | """
Django settings for instagram project.
Generated by 'django-admin startproject' using Django 3.1.3.
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/
"""
import os
i... | 25.797688 | 91 | 0.691015 |
e9b9f23254a8327a46a4a1fde875c4649f0e6792 | 1,376 | py | Python | Advance_Python/Database_Connectivity/Update_Data_Using_Parameterized_Query.py | siddharth-143/Python | 293f4643a3a13e3b82d23fd8922db54dbb0f12bc | [
"MIT"
] | null | null | null | Advance_Python/Database_Connectivity/Update_Data_Using_Parameterized_Query.py | siddharth-143/Python | 293f4643a3a13e3b82d23fd8922db54dbb0f12bc | [
"MIT"
] | null | null | null | Advance_Python/Database_Connectivity/Update_Data_Using_Parameterized_Query.py | siddharth-143/Python | 293f4643a3a13e3b82d23fd8922db54dbb0f12bc | [
"MIT"
] | null | null | null | # Update data in table parametrized query
import mysql.connector
def student_data(id, nm, ro, fe):
try:
conn = mysql.connector.connect(
user="root",
password="password",
host="localhost",
database="pdb",
port=3306
)
if conn.is_con... | 29.913043 | 110 | 0.539244 |
08a87560906fb8f4a3a1e0466bbdc770e08cdaaa | 6,243 | py | Python | tools/export_tarball/export_tarball.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2019-11-28T10:46:52.000Z | 2019-11-28T10:46:52.000Z | tools/export_tarball/export_tarball.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/export_tarball/export_tarball.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2015-03-27T11:15:39.000Z | 2016-08-17T14:19:56.000Z | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This tool creates a tarball with all the sources, but without .svn directories.
It can also remove files which are not strictl... | 33.564516 | 80 | 0.690533 |
42defece52744a4c0c59320aec5a356c66428f1b | 27,615 | py | Python | ample/util/pyrvapi_results.py | FilomenoSanchez/ample | e985cdffcb93e574cde782ce579c3bfdcd8b1830 | [
"BSD-3-Clause"
] | null | null | null | ample/util/pyrvapi_results.py | FilomenoSanchez/ample | e985cdffcb93e574cde782ce579c3bfdcd8b1830 | [
"BSD-3-Clause"
] | null | null | null | ample/util/pyrvapi_results.py | FilomenoSanchez/ample | e985cdffcb93e574cde782ce579c3bfdcd8b1830 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env ccp4-python
__author__ = "Jens Thomas"
__date__ = "03 Mar 2015"
__version__ = "1.0"
import logging
import json
import os
import subprocess
import sys
import traceback
if sys.version_info.major < 3:
from urlparse import urljoin
else:
from urllib.parse import urljoin
import uuid
from ample impo... | 41.968085 | 197 | 0.60717 |
bfb92a1255d766a7b64ae8407817632e0c47e493 | 483 | py | Python | one-get/util/hex_tool.py | wenbindu/HungryTools | 7b44d373784246e215e82d6278bf97c7b1afcb95 | [
"MIT"
] | null | null | null | one-get/util/hex_tool.py | wenbindu/HungryTools | 7b44d373784246e215e82d6278bf97c7b1afcb95 | [
"MIT"
] | null | null | null | one-get/util/hex_tool.py | wenbindu/HungryTools | 7b44d373784246e215e82d6278bf97c7b1afcb95 | [
"MIT"
] | null | null | null | import re
def hex_to_char(hex_str):
""" converts a single hex-encoded character 'FFFF' into the corresponding real character """
return chr(int(hex_str, 16))
def parser_hex(hex_str):
"""converts a hex-encoded character '%u****' into the real character string.
Args:
hex_str (str): string cont... | 25.421053 | 96 | 0.660455 |
2d50e8a9f58e49b5325f046a62c3474845ed55f5 | 987 | py | Python | agent/src/agent/pipeline/config/stages/base.py | anodot/daria | d475899309f56cd85347be0f7001a0dd97dd197a | [
"Apache-2.0"
] | 16 | 2019-04-03T08:31:54.000Z | 2021-01-24T17:12:04.000Z | agent/src/agent/pipeline/config/stages/base.py | anodot/daria | d475899309f56cd85347be0f7001a0dd97dd197a | [
"Apache-2.0"
] | 10 | 2020-01-20T14:59:06.000Z | 2022-01-21T10:19:16.000Z | agent/src/agent/pipeline/config/stages/base.py | anodot/daria | d475899309f56cd85347be0f7001a0dd97dd197a | [
"Apache-2.0"
] | 5 | 2021-01-08T19:23:03.000Z | 2021-11-09T14:15:49.000Z | import os
import pytz
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from agent.modules.constants import ROOT_DIR
from agent.pipeline import Pipeline
class Stage(ABC):
JYTHON_SCRIPT = ''
JYTHON_SCRIPTS_PATH = os.path.join('pipeline', 'config', 'jython_scripts')
JS_SCRIPTS_PA... | 31.83871 | 104 | 0.721378 |
342eaf1a609e7f20ed7c93eba055ade8059bb55c | 4,465 | py | Python | RecoEgamma/EgammaElectronProducers/python/lowPtGsfElectronSequence_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | RecoEgamma/EgammaElectronProducers/python/lowPtGsfElectronSequence_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | 3 | 2018-08-23T13:40:24.000Z | 2019-12-05T21:16:03.000Z | RecoEgamma/EgammaElectronProducers/python/lowPtGsfElectronSequence_cff.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
# Modifier for FastSim
from Configuration.Eras.Modifier_fastSim_cff import fastSim
# PFRecTracks from generalTracks
from RecoParticleFlow.PFTracking.pfTrack_cfi import *
lowPtGsfElePfTracks = pfTrack.clone()
lowPtGsfElePfTracks.TkColList = ['generalTracks']
lowPtGsfElePfTracks... | 48.010753 | 165 | 0.81411 |
716009cbc250e11e639b89555b2a488034af1ef1 | 3,780 | py | Python | v6_sqlite/create_db_from_v4.py | carlosal1015/proofofconcept | 579873aff082e6fa497a387e0d0a5f8e5ec3ecd2 | [
"CC-BY-4.0"
] | 14 | 2015-01-02T19:39:36.000Z | 2022-03-09T06:08:10.000Z | v6_sqlite/create_db_from_v4.py | carlosal1015/proofofconcept | 579873aff082e6fa497a387e0d0a5f8e5ec3ecd2 | [
"CC-BY-4.0"
] | 242 | 2015-01-02T13:59:58.000Z | 2022-03-27T17:22:21.000Z | v6_sqlite/create_db_from_v4.py | carlosal1015/proofofconcept | 579873aff082e6fa497a387e0d0a5f8e5ec3ecd2 | [
"CC-BY-4.0"
] | 6 | 2015-02-13T16:00:25.000Z | 2020-08-05T17:51:26.000Z | # to run, use
# python3 v6_sqlite/create_db.py
# https://allofphysicsgraph.github.io/proofofconcept/site/how_to_build_the_physics_derivation.html
# https://docs.python.org/3/library/sqlite3.html
import sqlite3
import csv
import glob
print('sqlite3 version:',sqlite3.version)
db_file = "sqlite.db"
try:
conn = s... | 31.764706 | 185 | 0.646032 |
71b601a40e8fa9aa7dedefd3860ea674e9f8a3bb | 394 | py | Python | private_messages/urls.py | plazix/django-private-messages | e0b2a4821f74da25d8b140501aa20da247a03382 | [
"BSD-3-Clause"
] | 5 | 2015-07-01T13:23:08.000Z | 2017-11-15T09:48:11.000Z | private_messages/urls.py | plazix/django-private-messages | e0b2a4821f74da25d8b140501aa20da247a03382 | [
"BSD-3-Clause"
] | null | null | null | private_messages/urls.py | plazix/django-private-messages | e0b2a4821f74da25d8b140501aa20da247a03382 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
urlpatterns = patterns('private_messages.views',
url(r'^$', 'topics', name='private_messages'),
url(r'^read/(?P<topic_id>[\d]+)/$', 'topic_read', name='private_messages_topic'),
url(r'^new/$', 'topic_new', name='private_messages_new'),
u... | 32.833333 | 85 | 0.662437 |
cb0b956cfdd049f201e315ab1cf6dd3eef39c377 | 3,420 | py | Python | src/formattedcode/output_jsonlines.py | nicoddemus/scancode-toolkit | 58dfec66faa2c8a90f1125861081266594a1e1d7 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/formattedcode/output_jsonlines.py | nicoddemus/scancode-toolkit | 58dfec66faa2c8a90f1125861081266594a1e1d7 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | src/formattedcode/output_jsonlines.py | nicoddemus/scancode-toolkit | 58dfec66faa2c8a90f1125861081266594a1e1d7 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | #
# Copyright (c) 2018 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
# ScanCode is a trademark of nexB Inc.
#
# You may not use... | 38.426966 | 82 | 0.69883 |
86228abc4bb2ff625b2dd78d535a3a481f47cbcd | 5,676 | py | Python | dependencies/ui/tab1/run_button.py | statisticalbiotechnology/quandenser-pipeline | 4175f7d3de29d08dbb53e0e4f1b0f2fba8147df3 | [
"Apache-2.0"
] | 8 | 2019-05-17T14:45:30.000Z | 2021-06-24T15:53:34.000Z | dependencies/ui/tab1/run_button.py | statisticalbiotechnology/quandenser-pipeline | 4175f7d3de29d08dbb53e0e4f1b0f2fba8147df3 | [
"Apache-2.0"
] | 33 | 2019-03-07T09:00:11.000Z | 2021-09-07T07:47:18.000Z | dependencies/ui/tab1/run_button.py | statisticalbiotechnology/quandenser-pipeline | 4175f7d3de29d08dbb53e0e4f1b0f2fba8147df3 | [
"Apache-2.0"
] | 1 | 2019-11-21T12:32:07.000Z | 2019-11-21T12:32:07.000Z | import os
import sys
from PySide2.QtWidgets import QPushButton, QTableWidget, QLineEdit, QMessageBox
from PySide2.QtCore import QCoreApplication
import subprocess
from shutil import copyfile
import time
from colorama import Fore, Back, Style
import secrets
import re
# Custom parser for both sh files and nf configs
fro... | 42.676692 | 135 | 0.604475 |
65d74864ce6b1eed4a68fa285358afabc9245667 | 4,418 | py | Python | tests/geometricFlow.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 1 | 2021-03-15T14:04:19.000Z | 2021-03-15T14:04:19.000Z | tests/geometricFlow.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | 2 | 2021-11-27T11:55:48.000Z | 2021-11-27T11:56:26.000Z | tests/geometricFlow.py | twguest/FELpy | 0ac9dd965b0d8e04dddbf2c9aef5ac137d1f0dfd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 8 14:39:58 2020
@author: twguest
Let's test the geometric flow theory
"""
import sys
sys.path.append("/opt/spytlab")
sys.path.append("/opt/WPG/")
sys.path.append("/opt/spb_model")
import numpy as np
from model.materials.phaseMask import pha... | 27.104294 | 122 | 0.459937 |
4f523a89306206ef6f34328e5a23740f6448a4cf | 116 | py | Python | src/pybind/doc/tutorial/code/test_float_vector.py | aadps/kaldi | cd351bb31c98f9d540c409478cbf2c5fef1853ca | [
"Apache-2.0"
] | null | null | null | src/pybind/doc/tutorial/code/test_float_vector.py | aadps/kaldi | cd351bb31c98f9d540c409478cbf2c5fef1853ca | [
"Apache-2.0"
] | null | null | null | src/pybind/doc/tutorial/code/test_float_vector.py | aadps/kaldi | cd351bb31c98f9d540c409478cbf2c5fef1853ca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import kaldi
f = kaldi.FloatVector(3)
f[0] = 10
print(f)
g = f.numpy()
g[1] = 20
print(f)
| 9.666667 | 24 | 0.62069 |
5d619820d9234da7c28e8aed3cbaa148c4e4e16a | 821 | py | Python | cx_Oracle-doc/samples/DatabaseStartup.py | zaygeee/MASTER | 6e11ec3383a13ae6f86ab1a23613bee7a2fc9ed5 | [
"bzip2-1.0.6"
] | null | null | null | cx_Oracle-doc/samples/DatabaseStartup.py | zaygeee/MASTER | 6e11ec3383a13ae6f86ab1a23613bee7a2fc9ed5 | [
"bzip2-1.0.6"
] | null | null | null | cx_Oracle-doc/samples/DatabaseStartup.py | zaygeee/MASTER | 6e11ec3383a13ae6f86ab1a23613bee7a2fc9ed5 | [
"bzip2-1.0.6"
] | null | null | null | #------------------------------------------------------------------------------
# DatabaseStartup.py
# This script demonstrates starting up a database using Python. It is only
# possible in Oracle 10g Release 2 and higher. The connection used assumes that
# the environment variable ORACLE_SID has been set.
#----... | 39.095238 | 80 | 0.604141 |
7d858a9150de6bb794ce960dd5936b2546bd88b3 | 4,104 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/cloud_jobs.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/cloud_jobs.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/cloud_jobs.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_1.models.cloud_j... | 28.303448 | 170 | 0.572612 |
a062bdd48c2f783bbde07ec2b74fe64b9b8c6ef3 | 7,405 | py | Python | api/client/swagger_client/models/api_credential.py | Ophendy663/my-travel-plans | 3da86c777aba636f930a9b8e19b488d08b0031fa | [
"Apache-2.0"
] | null | null | null | api/client/swagger_client/models/api_credential.py | Ophendy663/my-travel-plans | 3da86c777aba636f930a9b8e19b488d08b0031fa | [
"Apache-2.0"
] | 1 | 2021-09-21T23:31:13.000Z | 2021-09-21T23:31:13.000Z | api/client/swagger_client/models/api_credential.py | Ophendy663/my-travel-plans | 3da86c777aba636f930a9b8e19b488d08b0031fa | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 IBM 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 27.943396 | 130 | 0.588521 |
75a3bd58ff8a50c5f429277333f918ea3beb9521 | 1,463 | py | Python | test/functional/reindex.py | RossClelland/uscbuild | db77df86e94ba4362040d5bedf1c71e5b4f01654 | [
"MIT"
] | null | null | null | test/functional/reindex.py | RossClelland/uscbuild | db77df86e94ba4362040d5bedf1c71e5b4f01654 | [
"MIT"
] | null | null | null | test/functional/reindex.py | RossClelland/uscbuild | db77df86e94ba4362040d5bedf1c71e5b4f01654 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Uscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test running uscoind with -reindex and -reindex-chainstate options.
- Start a single node and generate ... | 35.682927 | 106 | 0.704716 |
97926975567740e756cb41f6b33eb182718cab05 | 2,665 | py | Python | src/pip/_internal/cli/main_parser.py | dwt/pip | 7b2548905db91b584b5f8a11e7d3c87bf807faae | [
"MIT"
] | null | null | null | src/pip/_internal/cli/main_parser.py | dwt/pip | 7b2548905db91b584b5f8a11e7d3c87bf807faae | [
"MIT"
] | null | null | null | src/pip/_internal/cli/main_parser.py | dwt/pip | 7b2548905db91b584b5f8a11e7d3c87bf807faae | [
"MIT"
] | null | null | null | """A single place for constructing and exposing the main parser
"""
import os
import sys
from typing import List, Tuple
from pip._internal.cli import cmdoptions
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip._internal.commands import commands_dict, get_similar_commands... | 29.285714 | 86 | 0.672795 |
7ec5398dd983e77435d8f47f080d32f536784f45 | 18,448 | py | Python | q2cli/_version.py | Oddant1/q2cli | 3ef25ca9979518eec4bed0c3e9cd5ae9c57f2a6d | [
"BSD-3-Clause"
] | 15 | 2016-04-18T22:25:05.000Z | 2022-01-31T06:06:26.000Z | q2cli/_version.py | Oddant1/q2cli | 3ef25ca9979518eec4bed0c3e9cd5ae9c57f2a6d | [
"BSD-3-Clause"
] | 187 | 2016-04-18T22:22:05.000Z | 2022-01-20T22:54:31.000Z | q2cli/_version.py | Oddant1/q2cli | 3ef25ca9979518eec4bed0c3e9cd5ae9c57f2a6d | [
"BSD-3-Clause"
] | 30 | 2016-04-12T19:45:07.000Z | 2022-03-21T14:07:22.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.408829 | 79 | 0.584454 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.