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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a4d4a478f55b6f61c291806eae0647097756825f | 13,399 | py | Python | PhysicsTools/NanoAOD/python/custom_jme_cff.py | scodella/cmssw | 974479b50b19bd795cb5f91eac872857fd6290f6 | [
"Apache-2.0"
] | 1 | 2021-04-13T13:26:16.000Z | 2021-04-13T13:26:16.000Z | PhysicsTools/NanoAOD/python/custom_jme_cff.py | scodella/cmssw | 974479b50b19bd795cb5f91eac872857fd6290f6 | [
"Apache-2.0"
] | 2 | 2020-11-03T19:02:02.000Z | 2020-11-10T16:44:22.000Z | PhysicsTools/NanoAOD/python/custom_jme_cff.py | scodella/cmssw | 974479b50b19bd795cb5f91eac872857fd6290f6 | [
"Apache-2.0"
] | 1 | 2020-04-01T15:30:45.000Z | 2020-04-01T15:30:45.000Z | import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
from Configuration.Eras.Modifier_run2_nanoAOD_94X2016_cff import run2_nanoAOD_94X2016
from PhysicsTools.NanoAOD.common_cff import Var, P4Vars
from PhysicsTools.NanoAOD.jets_cff import jet... | 31.676123 | 168 | 0.623106 |
e3479d8c737706c04c13f9035e2ba3982c1f87ff | 948 | py | Python | idact/detail/config/validation/validate_non_negative_int.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 5 | 2018-12-06T15:40:34.000Z | 2019-06-19T11:22:58.000Z | idact/detail/config/validation/validate_non_negative_int.py | garstka/idact | b9c8405c94db362c4a51d6bfdf418b14f06f0da1 | [
"MIT"
] | 9 | 2018-12-06T16:35:26.000Z | 2019-04-28T19:01:40.000Z | idact/detail/config/validation/validate_non_negative_int.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 2 | 2019-04-28T19:18:58.000Z | 2019-06-17T06:56:28.000Z | """This module contains a function for validating a non-negative int."""
from idact.detail.config.validation.validation_error_message import \
validation_error_message
VALID_NON_NEGATIVE_INT = "Non-negative int."
def validate_non_negative_int(value, label: str) -> int:
"""Returns the parameter if it's a non... | 27.085714 | 73 | 0.665612 |
b9b158838cb7a3d19b1216deb866e9d440b9b18e | 5,749 | py | Python | gemini/severe_impact.py | raonyguimaraes/gemini | a8d03f5c5eefc6ef725e667130f141dbb63916b3 | [
"MIT"
] | null | null | null | gemini/severe_impact.py | raonyguimaraes/gemini | a8d03f5c5eefc6ef725e667130f141dbb63916b3 | [
"MIT"
] | null | null | null | gemini/severe_impact.py | raonyguimaraes/gemini | a8d03f5c5eefc6ef725e667130f141dbb63916b3 | [
"MIT"
] | null | null | null | import sys
import snpEff
import vep
def interpret_severe_impact(args, var):
"""
Interpret the report from SnpEff or VEP to determine the impact of the variant.
SnpEff examples:
0 NON_SYNONYMOUS_CODING(MODERATE|MISSENSE|Aca/Gca|T/A|OR4F5|protein_coding|CODING|ENST00000335137|exon_1_69091_70008),
... | 47.122951 | 132 | 0.574187 |
eb4d903516b55cff60acdc37962f7a5b0985124e | 6,453 | py | Python | mapproxy/test/unit/test_request_wmts.py | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 347 | 2015-01-19T15:47:08.000Z | 2022-03-23T20:33:17.000Z | mapproxy/test/unit/test_request_wmts.py | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 374 | 2015-01-05T07:54:31.000Z | 2022-03-24T08:23:10.000Z | mapproxy/test/unit/test_request_wmts.py | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 188 | 2015-01-07T00:59:28.000Z | 2022-03-15T09:05:57.000Z | # This file is part of the MapProxy project.
# Copyright (C) 2011 Omniscale <http://omniscale.de>
#
# 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... | 36.050279 | 96 | 0.648071 |
766983ddce7481139bf7afc0780dd13a6f4199ba | 3,181 | py | Python | main_app/coreapp/views.py | KiranGangadhar01/FlipkartScrapping | ea3fe1a316fb1ff591a46ec7b94fd05ac5c40819 | [
"MIT"
] | null | null | null | main_app/coreapp/views.py | KiranGangadhar01/FlipkartScrapping | ea3fe1a316fb1ff591a46ec7b94fd05ac5c40819 | [
"MIT"
] | null | null | null | main_app/coreapp/views.py | KiranGangadhar01/FlipkartScrapping | ea3fe1a316fb1ff591a46ec7b94fd05ac5c40819 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from bs4 import BeautifulSoup as soup
import requests
import re
from .models import Information
def basicScrap(request):
def main():
url_list = ["https://www.flipkart.com/signoraware-best-steel-lunch-box"\
"-blue-500ml-350ml-200ml-tumbler-370ml... | 45.442857 | 101 | 0.546055 |
3d060c0d217dfb19c9a8c86e0947fe4f6bf1a97e | 24,244 | py | Python | sdv/metadata/table.py | argo12/SDV | 7f90bb3a3f9991b34f4c4363edd91e3fa448fd17 | [
"MIT"
] | 1 | 2021-03-07T21:30:40.000Z | 2021-03-07T21:30:40.000Z | sdv/metadata/table.py | ppeddada97/SDV | 6fbddedcd1ed02adcd7a0ec3698f280a9a86e01c | [
"MIT"
] | null | null | null | sdv/metadata/table.py | ppeddada97/SDV | 6fbddedcd1ed02adcd7a0ec3698f280a9a86e01c | [
"MIT"
] | null | null | null | """Metadata for a single table."""
import copy
import json
import logging
import numpy as np
import pandas as pd
import rdt
from faker import Faker
from sdv.constraints.base import Constraint
from sdv.metadata.errors import MetadataError, MetadataNotFittedError
from sdv.metadata.utils import strings_from_regex
LOGG... | 36.789074 | 98 | 0.595611 |
f8103f5dda307ccbcd7d0201268753fe86102d35 | 1,756 | py | Python | cnn.py | archit120/lingatagger | cb3d0e262900dba1fd1ead0a37fad531e37cff9f | [
"Apache-2.0"
] | 1 | 2019-06-29T10:59:22.000Z | 2019-06-29T10:59:22.000Z | cnn.py | archit120/lingatagger | cb3d0e262900dba1fd1ead0a37fad531e37cff9f | [
"Apache-2.0"
] | null | null | null | cnn.py | archit120/lingatagger | cb3d0e262900dba1fd1ead0a37fad531e37cff9f | [
"Apache-2.0"
] | null | null | null | import pickle
with open('X', 'rb') as fp:
X_cnn = pickle.load(fp)
with open('Y', 'rb') as fp:
Y_cnn = pickle.load(fp)
a = set(list(set("ऀँंःऄअआइईउऊऋऌऍऎएऐऑऒओऔकखगघङचछजझञटठडढणतथदधनऩपफबभमयरऱलळऴवशषसहऺऻ़ऽािीुूृॄॅॆेैॉॊोौ्ॎॏॐ॒॑॓॔ॕॖॗक़ख़ग़ज़ड़ढ़फ़य़ॠॡॢॣ।॥॰ॱॲॳॴॵॶॷॸॹॺॻॼॽॾॿ-")))
split1 = int(len(Y_cnn)*0.8)
X_train = X_cnn[:sp... | 40.837209 | 141 | 0.577449 |
8aa4e050e1b4b3a4d70feeb585f91d89b805bca3 | 7,242 | py | Python | gym_molecule/envs/docking_simple.py | AITRICS/FREED | ff75e903808edc57f01ef6d0d198b44a56dcdf4b | [
"Apache-2.0"
] | 29 | 2021-11-03T09:27:41.000Z | 2022-03-29T00:49:00.000Z | gym_molecule/envs/docking_simple.py | doxxitxxyoung/FREED | f7fed79dd98c0ea2ea66ae9b03de63fc57083995 | [
"Apache-2.0"
] | 1 | 2022-01-11T08:02:58.000Z | 2022-03-06T05:49:54.000Z | gym_molecule/envs/docking_simple.py | doxxitxxyoung/FREED | f7fed79dd98c0ea2ea66ae9b03de63fc57083995 | [
"Apache-2.0"
] | 7 | 2021-12-09T07:13:06.000Z | 2022-02-15T11:15:47.000Z | #!/usr/bin/env python
import sys
import os
from multiprocessing import Manager
from multiprocessing import Process
from multiprocessing import Queue
import subprocess
from openbabel import pybel
# import pybel
class DockingVina(object):
"""
python module for Vina
"""
def __init__(self, docking_params):... | 37.329897 | 115 | 0.540597 |
8586980b429d66292b83f2ca4ee18003af5f0695 | 5,318 | py | Python | src/globus_cli/commands/logout.py | globusonline/globus-cli | 696857baafac198141edc3c1c29c72215f217df1 | [
"Apache-2.0"
] | null | null | null | src/globus_cli/commands/logout.py | globusonline/globus-cli | 696857baafac198141edc3c1c29c72215f217df1 | [
"Apache-2.0"
] | 1 | 2016-04-09T17:26:05.000Z | 2016-04-11T16:13:50.000Z | src/globus_cli/commands/logout.py | globusonline/globus-cli | 696857baafac198141edc3c1c29c72215f217df1 | [
"Apache-2.0"
] | null | null | null | import click
import globus_sdk
from globus_sdk import AuthAPIError
from globus_cli.login_manager import (
LoginManager,
delete_templated_client,
internal_native_client,
is_client_login,
token_storage_adapter,
)
from globus_cli.login_manager.auth_flows import _STORE_CONFIG_USERINFO
from globus_cli.p... | 34.986842 | 92 | 0.660211 |
5e16f6ebce5c8337418e9c16385a8d7280bd62b9 | 19,239 | py | Python | tensorflow/python/kernel_tests/split_op_test.py | devsangwoo/tensor | 066592c9f9cdf4acdd1b9b104766271133e9088e | [
"Apache-2.0"
] | 1 | 2020-01-12T14:38:34.000Z | 2020-01-12T14:38:34.000Z | tensorflow/python/kernel_tests/split_op_test.py | devsangwoo/tensor | 066592c9f9cdf4acdd1b9b104766271133e9088e | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/split_op_test.py | devsangwoo/tensor | 066592c9f9cdf4acdd1b9b104766271133e9088e | [
"Apache-2.0"
] | null | null | null | <<<<<<< HEAD
# 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 requir... | 37.069364 | 80 | 0.666979 |
2aa01b24453d5eb7f3a13f0ce05d7f98d34af083 | 12,660 | py | Python | Project/GuiTest_portrait.py | quample/spatial_filter_GUI | e1490fc615f221009e0522c77e53392c009d7ca1 | [
"MIT"
] | 1 | 2019-10-20T01:18:21.000Z | 2019-10-20T01:18:21.000Z | Project/GuiTest_portrait.py | quample/spatial_filter_GUI | e1490fc615f221009e0522c77e53392c009d7ca1 | [
"MIT"
] | null | null | null | Project/GuiTest_portrait.py | quample/spatial_filter_GUI | e1490fc615f221009e0522c77e53392c009d7ca1 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from PIL import Image, ImageTk
import cv2
import os
#from folder_name i3mport python_name as shortcut
from Filter import spatial_filtering_portrait as sf
class Root(Tk):
def __init__(self):
super(Root, self).__init__()
s... | 55.043478 | 181 | 0.674092 |
7968e3851d7c727f0343d757cfe0a21f4f1d2290 | 4,498 | py | Python | zeeguu_api/api/accounts.py | TWEApol/Zeeguu-API | 832f1cb2d0950bd879af72d9e606783698d78b57 | [
"MIT"
] | null | null | null | zeeguu_api/api/accounts.py | TWEApol/Zeeguu-API | 832f1cb2d0950bd879af72d9e606783698d78b57 | [
"MIT"
] | null | null | null | zeeguu_api/api/accounts.py | TWEApol/Zeeguu-API | 832f1cb2d0950bd879af72d9e606783698d78b57 | [
"MIT"
] | null | null | null | import flask
import sqlalchemy
import zeeguu
from flask import request
from zeeguu.model import User, Cohort, Teacher
from zeeguu.model.unique_code import UniqueCode
from zeeguu_api.api.sessions import get_session, get_anon_session
from zeeguu_api.api.utils.abort_handling import make_error
from zeeguu_api.emailer.user_... | 30.808219 | 118 | 0.696087 |
0da6056fce2d1dc474e46a849747974f7760b071 | 1,247 | py | Python | src/bindings/python/tests/test_ngraph/test_ops_multioutput.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 2 | 2021-12-14T15:27:46.000Z | 2021-12-14T15:34:16.000Z | src/bindings/python/tests/test_ngraph/test_ops_multioutput.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 33 | 2021-09-23T04:14:30.000Z | 2022-01-24T13:21:32.000Z | src/bindings/python/tests/test_ngraph/test_ops_multioutput.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 11 | 2021-11-09T00:51:40.000Z | 2021-11-10T12:04:16.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import openvino.runtime.opset8 as ov
from tests.runtime import get_runtime
def test_split():
runtime = get_runtime()
input_tensor = ov.constant(np.array([0, 1, 2, 3, 4, 5], dtype=np.int32))
axis = ov.con... | 33.702703 | 100 | 0.668805 |
18c3c0279f9fde696d746782e5db6ff8cd132415 | 9,970 | py | Python | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/data_generators/gym_utils.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-07T18:52:33.000Z | 2019-07-06T12:48:18.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/data_generators/gym_utils.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 63 | 2017-12-19T20:29:10.000Z | 2021-08-04T21:49:36.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/data_generators/gym_utils.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 32.90429 | 96 | 0.64674 |
b4725928f8386233ac89556d03d03a1a0d1bddbd | 6,268 | py | Python | wabisabi/kwarg_name_change.py | hmaarrfk/deprecation_factory | bc7921425d3136c429845620c8a163eef58d8c49 | [
"BSD-3-Clause"
] | null | null | null | wabisabi/kwarg_name_change.py | hmaarrfk/deprecation_factory | bc7921425d3136c429845620c8a163eef58d8c49 | [
"BSD-3-Clause"
] | 14 | 2018-08-09T04:02:38.000Z | 2018-09-06T23:55:03.000Z | wabisabi/kwarg_name_change.py | hmaarrfk/deprecation_factory | bc7921425d3136c429845620c8a163eef58d8c49 | [
"BSD-3-Clause"
] | null | null | null | """
As this library is still in early development, the API might change.
I suggest you vendor this so that you don't create conflicts if other
libraries decide to use an older, incompatible version
If you are shipping python source code, then I've included the license
at the bottom of this file to make your life easie... | 38.453988 | 84 | 0.651723 |
9baffb1e020d9ab75f1fdabfd47795eb44734ec6 | 3,277 | py | Python | snake.py | farhad-rezazadeh/snake | 1200d9d627b81d3db22a491e7854ea6403988530 | [
"MIT"
] | null | null | null | snake.py | farhad-rezazadeh/snake | 1200d9d627b81d3db22a491e7854ea6403988530 | [
"MIT"
] | null | null | null | snake.py | farhad-rezazadeh/snake | 1200d9d627b81d3db22a491e7854ea6403988530 | [
"MIT"
] | null | null | null | import consts
class Snake:
def __init__(self, keys, game, pos, color, direction):
self.control_keys = keys
self.cells = [pos]
self.game_manager = game
self.color = color
self.game_manager.add_snake(self)
self.direction = direction
def get_head(self):
r... | 35.619565 | 105 | 0.527617 |
bb3101fce035b824cfb5db11d70caee8ca8a809b | 3,736 | py | Python | data/stanfordindoor_dataset.py | aksh1501/DepthAware_CNN_edit | 3f6a859ef3f3b7bba1201dc087c860a22d1cd258 | [
"MIT"
] | null | null | null | data/stanfordindoor_dataset.py | aksh1501/DepthAware_CNN_edit | 3f6a859ef3f3b7bba1201dc087c860a22d1cd258 | [
"MIT"
] | null | null | null | data/stanfordindoor_dataset.py | aksh1501/DepthAware_CNN_edit | 3f6a859ef3f3b7bba1201dc087c860a22d1cd258 | [
"MIT"
] | null | null | null | import os.path
import numpy as np
import torchvision
import torchvision.transforms as transforms
import torch
import h5py
### CHANGES - START
import sys
sys.path.insert(0, '/home/jarvis/DepthAwareCNN')
### CHANGES - END
from data.base_dataset import *
from PIL import Image
import math, random
import time
def make_da... | 36.271845 | 113 | 0.65712 |
99363d36c2e610243a250558b9aace120d96c6e6 | 110,490 | py | Python | campaign/controllers.py | nirvanabear/WeVoteServer | f4a6bceaffa1273cb215cc561831a4aaaff19018 | [
"MIT"
] | 1 | 2021-05-17T07:52:26.000Z | 2021-05-17T07:52:26.000Z | campaign/controllers.py | nirvanabear/WeVoteServer | f4a6bceaffa1273cb215cc561831a4aaaff19018 | [
"MIT"
] | null | null | null | campaign/controllers.py | nirvanabear/WeVoteServer | f4a6bceaffa1273cb215cc561831a4aaaff19018 | [
"MIT"
] | null | null | null | # campaign/controllers.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .models import CampaignX, CampaignXListedByOrganization, CampaignXManager, CampaignXNewsItem, CampaignXOwner, \
CampaignXSupporter, FINAL_ELECTION_DATE_COOL_DOWN
import base64
from image.controllers import cache_campaignx_... | 53.7926 | 120 | 0.644529 |
0f9129f2972743b93a81b88d5d6aa619f469e607 | 1,961 | py | Python | function/python/brightics/function/transform/split_data.py | sharon1321/studio | c5ce7f6db5503f5020b2aa0c6f2e6acfc61c90c5 | [
"Apache-2.0"
] | null | null | null | function/python/brightics/function/transform/split_data.py | sharon1321/studio | c5ce7f6db5503f5020b2aa0c6f2e6acfc61c90c5 | [
"Apache-2.0"
] | null | null | null | function/python/brightics/function/transform/split_data.py | sharon1321/studio | c5ce7f6db5503f5020b2aa0c6f2e6acfc61c90c5 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Samsung SDS
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 applic... | 44.568182 | 144 | 0.734319 |
7f420612d3d82bf85500b922499d1ade341d554d | 763 | py | Python | test_app/test_app/migrations/0001_initial.py | mkalioby/django-query-parser | f87acdf68dab2c78ddf6048b517a0dda194fd6ab | [
"MIT"
] | null | null | null | test_app/test_app/migrations/0001_initial.py | mkalioby/django-query-parser | f87acdf68dab2c78ddf6048b517a0dda194fd6ab | [
"MIT"
] | null | null | null | test_app/test_app/migrations/0001_initial.py | mkalioby/django-query-parser | f87acdf68dab2c78ddf6048b517a0dda194fd6ab | [
"MIT"
] | null | null | null | # Generated by Django 2.2.16 on 2020-10-26 14:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | 28.259259 | 124 | 0.625164 |
c99b37c6add646b664063a4f049252b9ae27feba | 1,669 | py | Python | .venv/lib/python3.7/site-packages/notebook/terminal/api_handlers.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | 11 | 2019-08-29T03:51:09.000Z | 2021-07-13T16:44:08.000Z | .venv/lib/python3.7/site-packages/notebook/terminal/api_handlers.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | 24 | 2020-03-25T19:35:43.000Z | 2022-02-10T11:46:50.000Z | .venv/lib/python3.7/site-packages/notebook/terminal/api_handlers.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | 11 | 2019-01-21T17:51:48.000Z | 2021-08-10T07:04:33.000Z | import json
from tornado import web, gen
from ..base.handlers import APIHandler
from ..prometheus.metrics import TERMINAL_CURRENTLY_RUNNING_TOTAL
class TerminalRootHandler(APIHandler):
@web.authenticated
def get(self):
tm = self.terminal_manager
terms = [{'name': name} for name in tm.terminals... | 30.345455 | 72 | 0.63571 |
286310f46df480ebe94bd5c746cdf3e4614aac01 | 4,635 | py | Python | src/gdb/gdb-7.11/gdb/testsuite/gdb.python/py-completion.py | aps337/unum-sdk | 2de3ae625e474c5064f6a88b720ec2ffdcdefad9 | [
"Apache-2.0"
] | 31 | 2018-08-01T21:25:24.000Z | 2022-02-14T07:52:34.000Z | src/gdb/gdb-7.11/gdb/testsuite/gdb.python/py-completion.py | aps337/unum-sdk | 2de3ae625e474c5064f6a88b720ec2ffdcdefad9 | [
"Apache-2.0"
] | 40 | 2018-12-03T19:48:52.000Z | 2021-03-10T06:34:26.000Z | src/gdb/gdb-7.11/gdb/testsuite/gdb.python/py-completion.py | aps337/unum-sdk | 2de3ae625e474c5064f6a88b720ec2ffdcdefad9 | [
"Apache-2.0"
] | 20 | 2018-11-16T21:19:22.000Z | 2021-10-18T23:08:24.000Z | # Copyright (C) 2014-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This progr... | 31.317568 | 86 | 0.674865 |
7072c7e933063fe320cfeac2d21bacff9f579e0b | 13,974 | py | Python | tensorflow/python/data/ops/multi_device_iterator_ops.py | Sonata-Wang/tensorflow | 8bbef0cd77879d05ed69bf30e76087847a8ca4a2 | [
"Apache-2.0"
] | 6 | 2019-02-05T22:36:51.000Z | 2022-01-14T03:50:57.000Z | tensorflow/python/data/ops/multi_device_iterator_ops.py | YaoYaoZhi/tensorflow | 83903c9dd9b5235996ec9158c30a1607fcfb4c73 | [
"Apache-2.0"
] | 1 | 2019-09-14T04:40:07.000Z | 2020-11-18T18:16:17.000Z | tensorflow/python/data/ops/multi_device_iterator_ops.py | YaoYaoZhi/tensorflow | 83903c9dd9b5235996ec9158c30a1607fcfb4c73 | [
"Apache-2.0"
] | 8 | 2016-01-14T13:12:56.000Z | 2021-04-09T10:20:53.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.1 | 116 | 0.728138 |
d6ad2de6f92dc747b40b1864c3a145851723278f | 3,648 | py | Python | mianjing/google/increasing_paths.py | RENHANFEI/LintCode | d572dee248ba4c2a95b52cd737d76c7297f4e7b4 | [
"CNRI-Python"
] | null | null | null | mianjing/google/increasing_paths.py | RENHANFEI/LintCode | d572dee248ba4c2a95b52cd737d76c7297f4e7b4 | [
"CNRI-Python"
] | null | null | null | mianjing/google/increasing_paths.py | RENHANFEI/LintCode | d572dee248ba4c2a95b52cd737d76c7297f4e7b4 | [
"CNRI-Python"
] | null | null | null | # increasing paths in an array
def f1_3(array): # O(N^2)
if len(array) <= 1:
return
ans = []
start_idx, idx = 0, 1
prenum = array[start_idx]
while idx < len(array):
if array[idx] >= prenum:
for i in range(start_idx, idx):
ans.append(array[i:idx + 1])... | 23.688312 | 63 | 0.553728 |
5aa35d2e76daeb44471ba123d06a44b3a0f45076 | 4,982 | py | Python | test/test_LensModel/test_Profiles/test_nie.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | 1 | 2020-07-31T07:55:17.000Z | 2020-07-31T07:55:17.000Z | test/test_LensModel/test_Profiles/test_nie.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | null | null | null | test/test_LensModel/test_Profiles/test_nie.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | 2 | 2020-10-26T10:45:11.000Z | 2021-03-04T12:25:19.000Z | __author__ = 'sibirrer'
import numpy as np
import numpy.testing as npt
import pytest
import lenstronomy.Util.param_util as param_util
from lenstronomy.Util import util
from lenstronomy.LensModel.Profiles.nie import NIE, NIEMajorAxis
from lenstronomy.LensModel.Profiles.spemd import SPEMD
from lenstronomy.LensModel.Pro... | 35.841727 | 105 | 0.59996 |
7b70d318af47b2b3c8e9aaf3c684b6ab6d013a26 | 703 | py | Python | wjordpress/tests/__init__.py | texastribune/wjordpress | c98759708867091e419fc2b2a8f77568104bac98 | [
"Apache-2.0"
] | 4 | 2015-06-12T18:36:00.000Z | 2016-04-25T14:28:44.000Z | wjordpress/tests/__init__.py | texastribune/wjordpress | c98759708867091e419fc2b2a8f77568104bac98 | [
"Apache-2.0"
] | null | null | null | wjordpress/tests/__init__.py | texastribune/wjordpress | c98759708867091e419fc2b2a8f77568104bac98 | [
"Apache-2.0"
] | null | null | null | from django.db.models.signals import post_save
from django.test import TestCase
from ..models import WPPost
try:
from example_project.content.signals import sync_post
DISCONNECT_SIGNALS = True
except ImportError:
DISCONNECT_SIGNALS = False
class WPTestCase(TestCase):
"""
TestCase with common log... | 23.433333 | 75 | 0.70697 |
2735014b2f6c8e88f41d8728bbca2732f3584485 | 177 | py | Python | edit_earthquake_data.py | swappy208/Artificial-Intelligence-Computational-Model | fbbbf13fe3912243645f22cc9724721ca3c23162 | [
"Apache-2.0"
] | null | null | null | edit_earthquake_data.py | swappy208/Artificial-Intelligence-Computational-Model | fbbbf13fe3912243645f22cc9724721ca3c23162 | [
"Apache-2.0"
] | null | null | null | edit_earthquake_data.py | swappy208/Artificial-Intelligence-Computational-Model | fbbbf13fe3912243645f22cc9724721ca3c23162 | [
"Apache-2.0"
] | null | null | null | import pandas
data = pandas.read_csv("data.csv")
#replace missing ages with mean
data["Age"] = data["Age"].apply(lambda x: "25_39" if x=="don_t_know" or x=="refused" else x)
| 22.125 | 92 | 0.689266 |
cf22407c7dbe0fd0a167b780b1f439be3535594d | 2,676 | py | Python | testscripts/autotest.py | schopin-pro/libyami-utils | c3d25b64b05aeb0c4eecc140aef617cfeced6b8e | [
"Apache-2.0"
] | 13 | 2018-02-22T18:52:04.000Z | 2021-06-30T03:28:40.000Z | testscripts/autotest.py | schopin-pro/libyami-utils | c3d25b64b05aeb0c4eecc140aef617cfeced6b8e | [
"Apache-2.0"
] | 106 | 2016-06-24T01:12:04.000Z | 2018-01-15T13:49:34.000Z | testscripts/autotest.py | schopin-pro/libyami-utils | c3d25b64b05aeb0c4eecc140aef617cfeced6b8e | [
"Apache-2.0"
] | 32 | 2016-06-08T20:36:42.000Z | 2017-11-20T08:23:06.000Z | #! /usr/bin/env python
import os
import sys
import shutil
from yamilib import libyami
if __name__ == '__main__':
if len(sys.argv) < 5:
print('Pls autotest.py file|dirctory decode|encode|v4l2 outdir savemode')
sys.exit(-1)
if not os.path.exists(sys.argv[1]):
print(sys.argv[1] + ' does not... | 50.490566 | 96 | 0.684604 |
4d0e389d23fdc7736f06581fe356199a36c89506 | 8,772 | py | Python | 2.1/faster_rcnn/utils/rpn/proposal_layer.py | waikato-datamining/cntk | 1b626407ef750dfbd4ad66fe9aed28487f2a4441 | [
"MIT"
] | null | null | null | 2.1/faster_rcnn/utils/rpn/proposal_layer.py | waikato-datamining/cntk | 1b626407ef750dfbd4ad66fe9aed28487f2a4441 | [
"MIT"
] | null | null | null | 2.1/faster_rcnn/utils/rpn/proposal_layer.py | waikato-datamining/cntk | 1b626407ef750dfbd4ad66fe9aed28487f2a4441 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
from cntk import output_variable, FreeDimension
from cntk.ops.functions import User... | 41.377358 | 123 | 0.616279 |
895c2540a4feb263539a3a90a7a5e4a9969c3619 | 3,713 | py | Python | contrib/macdeploy/custom_dsstore.py | traficoin/traficoin | f6985559b8c9dfffa97faa77419b9fa672122b71 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | traficoin/traficoin | f6985559b8c9dfffa97faa77419b9fa672122b71 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | traficoin/traficoin | f6985559b8c9dfffa97faa77419b9fa672122b71 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
from ds_store import DSStore
from mac_alias import Alias
import sys
output_file = sys.argv... | 61.883333 | 1,817 | 0.724482 |
d360f8c171aa24d690f2edd4b1eb1426b5ad4d93 | 9,545 | py | Python | courses/machine_learning/deepdive/08_image/flowersmodel/model.py | mikepope-google/training-data-analyst | fe04e605686f8281e7b2adacadf6adb16a1345e6 | [
"Apache-2.0"
] | 1 | 2019-06-06T15:16:30.000Z | 2019-06-06T15:16:30.000Z | courses/machine_learning/deepdive/08_image/flowersmodel/model.py | mikepope-google/training-data-analyst | fe04e605686f8281e7b2adacadf6adb16a1345e6 | [
"Apache-2.0"
] | null | null | null | courses/machine_learning/deepdive/08_image/flowersmodel/model.py | mikepope-google/training-data-analyst | fe04e605686f8281e7b2adacadf6adb16a1345e6 | [
"Apache-2.0"
] | 1 | 2020-03-05T05:40:33.000Z | 2020-03-05T05:40:33.000Z | #!/usr/bin/env python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 41.142241 | 98 | 0.644421 |
e704c7ee2fad793c8e6f0f7dda0ce27cf32ec098 | 30 | py | Python | cookbook/control_plane/register_project.py | mayitbeegh/flytesnacks | 35fe9db45f08fce3d94923b4245b1a9980a915ef | [
"Apache-2.0"
] | null | null | null | cookbook/control_plane/register_project.py | mayitbeegh/flytesnacks | 35fe9db45f08fce3d94923b4245b1a9980a915ef | [
"Apache-2.0"
] | null | null | null | cookbook/control_plane/register_project.py | mayitbeegh/flytesnacks | 35fe9db45f08fce3d94923b4245b1a9980a915ef | [
"Apache-2.0"
] | null | null | null | """
Register a New Project
""" | 10 | 22 | 0.633333 |
c5e007316f8cd4cf3e97aa5d2fb5cb124936ca33 | 7,096 | py | Python | main.py | osucookiezi/gulag | cfb5a4bfbfcd281ca1d572b83d799355b0a9b443 | [
"MIT"
] | null | null | null | main.py | osucookiezi/gulag | cfb5a4bfbfcd281ca1d572b83d799355b0a9b443 | [
"MIT"
] | null | null | null | main.py | osucookiezi/gulag | cfb5a4bfbfcd281ca1d572b83d799355b0a9b443 | [
"MIT"
] | null | null | null | #!/usr/bin/python3.9
# -*- coding: utf-8 -*-
# if you're interested in development, my test server is
# usually up at 51.161.34.235. just switch the ip of any
# switcher to the one above, toggle it off and on again, and
# you should be connected. registration is done ingame with
# osu!'s built-in registration.
# certi... | 34.784314 | 68 | 0.687148 |
6e4428416d964028b6c45bf49d98cc2ebd57bf74 | 1,810 | py | Python | bounded_multi_processing.py | zinob/python_tutorials | a730160d13780360e4c0e407b87a8b090bb2042d | [
"MIT"
] | null | null | null | bounded_multi_processing.py | zinob/python_tutorials | a730160d13780360e4c0e407b87a8b090bb2042d | [
"MIT"
] | null | null | null | bounded_multi_processing.py | zinob/python_tutorials | a730160d13780360e4c0e407b87a8b090bb2042d | [
"MIT"
] | null | null | null | #!/usr/bin/python
## """
## How do i parallelize a retriever function and a sender/saver function when they
## 1: require mpthreads
## 2: The dataammount is significant enough that I don't want the receiver to get to far ahead of the sender.
## """
## This code uses a semaphore to bound the amount of in-flight data.
#... | 31.754386 | 127 | 0.709392 |
67111e3fcadda5601597bb03ba46740c6f0b602f | 4,730 | py | Python | ExcelHandler.py | btminzon/bandcombination | c2e869f3e31e1655b9c22982b7a90580e080dd1d | [
"BSD-2-Clause-FreeBSD"
] | 9 | 2019-04-19T03:19:23.000Z | 2022-02-22T22:08:10.000Z | ExcelHandler.py | btminzon/bandcombination | c2e869f3e31e1655b9c22982b7a90580e080dd1d | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ExcelHandler.py | btminzon/bandcombination | c2e869f3e31e1655b9c22982b7a90580e080dd1d | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2019-04-19T03:19:28.000Z | 2021-01-26T22:53:44.000Z |
import xlsxwriter
def writeBandOnFile(workbook, bandsList, modulationList):
# Add a worksheet to Excel file
BandWorksheet = workbook.add_worksheet('Band Info')
# Header
BandCombinationHeader = ("Band", "256QAM in DL", "64QAM in UL")
# used formats on this worksheet
cellHeaderFormat = workbo... | 43 | 160 | 0.670825 |
2dfb031a36e59666a51582deb13e88481abc0fda | 6,325 | py | Python | climateeconomics/tests/l1_test_gradient_oil_resource_discipline.py | os-climate/witness-core | 3ef9a44d86804c5ad57deec3c9916348cb3bfbb8 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-01-14T06:37:42.000Z | 2022-01-14T06:37:42.000Z | climateeconomics/tests/l1_test_gradient_oil_resource_discipline.py | os-climate/witness-core | 3ef9a44d86804c5ad57deec3c9916348cb3bfbb8 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | climateeconomics/tests/l1_test_gradient_oil_resource_discipline.py | os-climate/witness-core | 3ef9a44d86804c5ad57deec3c9916348cb3bfbb8 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | '''
Copyright 2022 Airbus SAS
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
dis... | 48.653846 | 127 | 0.625455 |
ebf3dbecca0a0aaff02e1679cecb774e09072831 | 6,869 | py | Python | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/ARB/uniform_buffer_object.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/ARB/uniform_buffer_object.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/ARB/uniform_buffer_object.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | '''OpenGL extension ARB.uniform_buffer_object
The official definition of this extension is available here:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/uniform_buffer_object.txt
Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
f... | 60.787611 | 168 | 0.819624 |
78cd41b5c9bdd2df8aaa665b7c853b26ed3f2255 | 3,596 | py | Python | robots/create_robots_resources.py | rrazor/wtop | a8c428d91ed841028d36455317485aaf1eb6dc3b | [
"BSD-3-Clause"
] | 55 | 2015-01-05T17:11:06.000Z | 2021-07-31T14:42:16.000Z | robots/create_robots_resources.py | rrazor/wtop | a8c428d91ed841028d36455317485aaf1eb6dc3b | [
"BSD-3-Clause"
] | 4 | 2015-03-25T21:38:25.000Z | 2018-06-18T19:33:20.000Z | robots/create_robots_resources.py | rrazor/wtop | a8c428d91ed841028d36455317485aaf1eb6dc3b | [
"BSD-3-Clause"
] | 7 | 2015-09-15T10:57:15.000Z | 2019-07-16T14:52:58.000Z | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
"""Create an optimized regex for matching robot user agents based on the data
compiled by http://user-agent-string.info/"""
# Standard library
import argparse
import io
import re
import urllib
from xml.dom.minidom import parse
# Third-party
import trie
uasparser_x... | 32.107143 | 77 | 0.659066 |
f38ed06d537fa8c64e30e55fab4394cd27bb5540 | 7,495 | py | Python | sublime/pymdownx/st3/pymdownx/arithmatex.py | brunobergher/dotfiles | 2b3bfb9cf1b26441514b5565722fb187be2789cc | [
"MIT"
] | 2 | 2018-04-24T10:02:26.000Z | 2019-06-02T13:53:31.000Z | sublime/pymdownx/st3/pymdownx/arithmatex.py | brunobergher/dotfiles | 2b3bfb9cf1b26441514b5565722fb187be2789cc | [
"MIT"
] | null | null | null | sublime/pymdownx/st3/pymdownx/arithmatex.py | brunobergher/dotfiles | 2b3bfb9cf1b26441514b5565722fb187be2789cc | [
"MIT"
] | 2 | 2019-04-11T04:13:02.000Z | 2019-06-02T13:53:33.000Z | r"""
Arithmatex.
pymdownx.arithmatex
Extension that preserves the following for MathJax use:
$Equation$, \(Equation\)
$$
Display Equations
$$
\[
Display Equations
\]
\begin{align}
Display Equations
\end{align}
and $Inline MathJax Equations$
Inline equations are converted to the following form for HTML outp... | 34.380734 | 111 | 0.591194 |
cffb59a2ae6306049d63c6be518aa4f3760ac276 | 12,000 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py | changlong-liu/autorest.python | 1f03e4c6a11934d385fab050dc44041f1e91e9ff | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py | changlong-liu/autorest.python | 1f03e4c6a11934d385fab050dc44041f1e91e9ff | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py | changlong-liu/autorest.python | 1f03e4c6a11934d385fab050dc44041f1e91e9ff | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.553191 | 106 | 0.68 |
a340d7fc12e348d484509c5f32662e368ca8046c | 32,162 | py | Python | toontown/shtiker/OptionsPage.py | drewc5131/epic-toontown | a02862fc325d70820a51fb83458195062f092c96 | [
"BSD-3-Clause"
] | null | null | null | toontown/shtiker/OptionsPage.py | drewc5131/epic-toontown | a02862fc325d70820a51fb83458195062f092c96 | [
"BSD-3-Clause"
] | null | null | null | toontown/shtiker/OptionsPage.py | drewc5131/epic-toontown | a02862fc325d70820a51fb83458195062f092c96 | [
"BSD-3-Clause"
] | null | null | null | from pandac.PandaModules import *
from libotp import *
from . import ShtikerPage
from toontown.toontowngui import TTDialog
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from toontown.toonbase import TTLocalizer
from . import DisplaySettingsDialog
from direct.task import Task
from otp.speedchat im... | 52.552288 | 525 | 0.678503 |
89163c64fe3b118214c02476ffc34bf5b6a4b8ae | 1,311 | py | Python | Utils/ConsoleColors.py | chae03yb/DaeGal | 7451bf372ec3a5a174fd7aede952f81127fa64a2 | [
"MIT"
] | null | null | null | Utils/ConsoleColors.py | chae03yb/DaeGal | 7451bf372ec3a5a174fd7aede952f81127fa64a2 | [
"MIT"
] | null | null | null | Utils/ConsoleColors.py | chae03yb/DaeGal | 7451bf372ec3a5a174fd7aede952f81127fa64a2 | [
"MIT"
] | null | null | null | # For Linux
class EFCT():
CLEAR = "\033[0m"
BOLD = "\033[1m"
ITALIC = "\033[3m"
UNDERLINE = "\033[4m"
STRIKEOUT = "\033[9m"
class TEXT():
BLACK = "\033[30m"
RED = "\033[31m"
GREEN = "\033[32m"
YELLOW = "\033[33"
BLUE = "\033[34m"
PURPLE = "\033[35m"
C... | 22.603448 | 36 | 0.517925 |
8e2665c5150a5aabe2cf4db3e1cd2d742dd86629 | 13,967 | py | Python | pyts/plot/axform.py | JensGM/pyTurbSim | 89357e94607e99e5a27e069975684fe8e6a89a9d | [
"Apache-2.0"
] | 8 | 2017-07-24T23:01:28.000Z | 2021-12-06T04:31:23.000Z | pyts/plot/axform.py | camilledub/pyTurbSim | 69db0d7670afe5b2b386087aa0229a7511ef070d | [
"Apache-2.0"
] | 9 | 2015-04-06T16:01:06.000Z | 2020-06-16T16:51:49.000Z | pyts/plot/axform.py | camilledub/pyTurbSim | 69db0d7670afe5b2b386087aa0229a7511ef070d | [
"Apache-2.0"
] | 17 | 2015-04-22T15:27:28.000Z | 2021-11-20T08:10:16.000Z | from ..main import tsdata, tsrun # used to identify object types
import superaxes as supax
import psd
from base import indx, mpl
import numpy as np
class axesForm(object):
"""A base 'axesForm' class for for quickly plotting TurbSim data.
Parameters
----------
xlim : iterable(2) (default: [None, None... | 31.316143 | 79 | 0.54235 |
7dbc7f9dce4983df8de7270a59ab2927b4522d6a | 368 | py | Python | users/models.py | Joabsonlg/ddm-rest-api | 27d72f5e7dcb061f56b7fd504c76bc7746ecabe2 | [
"MIT"
] | null | null | null | users/models.py | Joabsonlg/ddm-rest-api | 27d72f5e7dcb061f56b7fd504c76bc7746ecabe2 | [
"MIT"
] | null | null | null | users/models.py | Joabsonlg/ddm-rest-api | 27d72f5e7dcb061f56b7fd504c76bc7746ecabe2 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db import models
class User(AbstractUser):
email = models.EmailField(max_length=255, unique=True)
name = models.CharField(max_length=255)
is_active = models.BooleanField(default=True)
def save(self, *args, **kwargs):
self.is_acti... | 28.307692 | 58 | 0.709239 |
4d3069aed98aff2ee71023c842ea1611c3c750cd | 5,466 | py | Python | apps/beat.py | TinlokLee/Django-Celery | 320b36ee2091aa876ecf92003af6b8e11b3041ed | [
"Apache-2.0"
] | null | null | null | apps/beat.py | TinlokLee/Django-Celery | 320b36ee2091aa876ecf92003af6b8e11b3041ed | [
"Apache-2.0"
] | null | null | null | apps/beat.py | TinlokLee/Django-Celery | 320b36ee2091aa876ecf92003af6b8e11b3041ed | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Beat command-line program.
This module is the 'program-version' of :mod:`celery.beat`.
It does everything necessary to run that module
as an actual application, like installing signal handlers
and so on.
"""
from __future__ import absolute_import, print_function, unicode_literals
... | 34.815287 | 79 | 0.594768 |
ba440b0603c0827c61260ea7620830b3bb9f0ed3 | 2,265 | py | Python | fn_incident_utils/fn_incident_utils/components/fn_incident_utils_close_incident.py | lmahoney1/resilient-community-apps | 1f60fb100e6a697df7b901d7a4aad707fea3dfee | [
"MIT"
] | null | null | null | fn_incident_utils/fn_incident_utils/components/fn_incident_utils_close_incident.py | lmahoney1/resilient-community-apps | 1f60fb100e6a697df7b901d7a4aad707fea3dfee | [
"MIT"
] | null | null | null | fn_incident_utils/fn_incident_utils/components/fn_incident_utils_close_incident.py | lmahoney1/resilient-community-apps | 1f60fb100e6a697df7b901d7a4aad707fea3dfee | [
"MIT"
] | null | null | null | # (c) Copyright IBM Corp. 2010, 2020. All Rights Reserved.
# -*- coding: utf-8 -*-
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
import json
from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError
from resil... | 36.532258 | 114 | 0.65298 |
9f2f7e94b40b0d663f204568f1a8c860ce45e38b | 663 | py | Python | _BACKUP/.gitbook/assets/dfs_paths_dict_recur.py | bgoonz/python-gitbook | d3b1321a42064e3cf46d1ac16ec1d7c67e4ae04f | [
"MIT"
] | 2 | 2021-10-01T22:14:38.000Z | 2021-11-29T00:32:52.000Z | _BACKUP/.gitbook/assets/dfs_paths_dict_recur.py | bgoonz/python-gitbook | d3b1321a42064e3cf46d1ac16ec1d7c67e4ae04f | [
"MIT"
] | 14 | 2021-09-04T13:28:28.000Z | 2021-09-22T04:06:35.000Z | _BACKUP/.gitbook/assets/dfs_paths_dict_recur.py | bgoonz/python-gitbook | d3b1321a42064e3cf46d1ac16ec1d7c67e4ae04f | [
"MIT"
] | 1 | 2021-11-27T20:28:11.000Z | 2021-11-27T20:28:11.000Z | """
ID: 3df740e0-34f3-4852-add2-7076c8be47c3
"""
from collections.abc import Iterable, Mapping
from typing import Optional
from src.typehints import Node
def dfs_paths_dict_recur(
graph: Mapping[Node, set[Node]],
start: Node,
goal: Node,
path: Optional[list[Node]] = None,
) -> Iterable[list[Node]]:
... | 26.52 | 78 | 0.656109 |
2fb1d3760cfed5357bbf719f6cd2025092ad9b78 | 2,368 | py | Python | cluster.py | ekrell/nir2watermap | 5253f2cde142a62103eb06fb2931c9aed6431211 | [
"MIT"
] | null | null | null | cluster.py | ekrell/nir2watermap | 5253f2cde142a62103eb06fb2931c9aed6431211 | [
"MIT"
] | null | null | null | cluster.py | ekrell/nir2watermap | 5253f2cde142a62103eb06fb2931c9aed6431211 | [
"MIT"
] | null | null | null | import rasterio
from rasterio.mask import mask
from rasterio.plot import reshape_as_raster, reshape_as_image, adjust_band, show
import geopandas as gpd
import numpy as np
from sklearn.cluster import KMeans, DBSCAN
import matplotlib.pyplot as plt
from optparse import OptionParser
from skimage.transform import resize
de... | 30.358974 | 108 | 0.718328 |
0b20465747723f7fd98fb793e4aafb2101e0e225 | 1,004 | py | Python | examples/python/test.py | MartinNum/HNSW_OPT | c40943154d55bca4c0ebd6ca7bf719fa1e621aa2 | [
"Apache-2.0"
] | 1 | 2022-03-31T10:58:21.000Z | 2022-03-31T10:58:21.000Z | examples/python/test.py | MartinNum/HNSW_OPT | c40943154d55bca4c0ebd6ca7bf719fa1e621aa2 | [
"Apache-2.0"
] | null | null | null | examples/python/test.py | MartinNum/HNSW_OPT | c40943154d55bca4c0ebd6ca7bf719fa1e621aa2 | [
"Apache-2.0"
] | null | null | null | import numpy as np
def ivecs_read(fname):
a = np.fromfile(fname, dtype='int32')
d = a[0]
return a.reshape(-1, d + 1)[:, 1:].copy()
def fvecs_read(fname):
return ivecs_read(fname).view('float32')
if __name__ == "__main__":
source = fvecs_read("/home/martin/Project/experiment/data_set/sift1M_128... | 23.904762 | 108 | 0.645418 |
9cc56eb0cf897582a07707ea11453eac157701a6 | 1,916 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/dialog.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/dialog.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/base/dialog.py | iamgeorgiy/heroku-userbot | 5a92417d16f8ead949d88cb38da213fc2da5d3a4 | [
"Apache-2.0"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 37.568627 | 87 | 0.634656 |
92bb046084b17e9bf251efa0e24f6f31c2dee95c | 3,030 | py | Python | rustici_software_cloud_v2/models/message_schema.py | ryanhope2/scormcloud-api-v2-client-python | fcc392933218d32b70987f8bfb1711f891f31c06 | [
"Apache-2.0"
] | null | null | null | rustici_software_cloud_v2/models/message_schema.py | ryanhope2/scormcloud-api-v2-client-python | fcc392933218d32b70987f8bfb1711f891f31c06 | [
"Apache-2.0"
] | null | null | null | rustici_software_cloud_v2/models/message_schema.py | ryanhope2/scormcloud-api-v2-client-python | fcc392933218d32b70987f8bfb1711f891f31c06 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
SCORM Cloud Rest API
REST API used for SCORM Cloud integrations.
OpenAPI spec version: 2.0
Contact: systems@rusticisoftware.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class Message... | 25.677966 | 79 | 0.533003 |
3c8c62d6e5c2ccb0446d74f93f455faf1e3dae92 | 1,490 | py | Python | app/user/serializers.py | hmoodallahma/recipe-app-api | 13ea22aca5cc2dd1a4e6ed4860f937e46fd2939b | [
"MIT"
] | null | null | null | app/user/serializers.py | hmoodallahma/recipe-app-api | 13ea22aca5cc2dd1a4e6ed4860f937e46fd2939b | [
"MIT"
] | null | null | null | app/user/serializers.py | hmoodallahma/recipe-app-api | 13ea22aca5cc2dd1a4e6ed4860f937e46fd2939b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, authenticate
from rest_framework import serializers
from django.utils.translation import ugettext_lazy as _
class UserSerializer(serializers.ModelSerializer):
"""Serializer for the users object"""
class Meta:
model = get_user_model()
fields = ('... | 31.041667 | 74 | 0.644295 |
7fd6b86e204af136883717eaec052af737ce9961 | 1,704 | py | Python | setup.py | tylershunt/katana | 1afbc755dddc3f88ee0414d0db59d0bf5928f6b3 | [
"BSD-3-Clause"
] | null | null | null | setup.py | tylershunt/katana | 1afbc755dddc3f88ee0414d0db59d0bf5928f6b3 | [
"BSD-3-Clause"
] | null | null | null | setup.py | tylershunt/katana | 1afbc755dddc3f88ee0414d0db59d0bf5928f6b3 | [
"BSD-3-Clause"
] | null | null | null | import sys
import os
import setuptools
from skbuild import setup
# Require pytest-runner only when running tests
pytest_runner = (
["pytest-runner>=2.0,<3dev"] if any(arg in sys.argv for arg in ("pytest", "test")) else []
)
setup_requires = pytest_runner
def find_files(root, suffix):
"""
Find files end... | 27.934426 | 94 | 0.649648 |
9698135c91da53e0bf42587dfbdb3c397b0a5641 | 488 | py | Python | tests/test_smoke/test_non_english.py | souvikg10/rasa-nlu-examples | 553a6461949f57232601e778fccdff74a488e0cd | [
"Apache-2.0"
] | 1 | 2021-04-11T09:17:11.000Z | 2021-04-11T09:17:11.000Z | tests/test_smoke/test_non_english.py | souvikg10/rasa-nlu-examples | 553a6461949f57232601e778fccdff74a488e0cd | [
"Apache-2.0"
] | null | null | null | tests/test_smoke/test_non_english.py | souvikg10/rasa-nlu-examples | 553a6461949f57232601e778fccdff74a488e0cd | [
"Apache-2.0"
] | 2 | 2021-04-12T23:52:51.000Z | 2021-04-13T00:30:55.000Z | import pytest
from rasa.train import train_nlu
# Take heed! Pytest fails if you use a function that starts with "test"
from rasa.test import test_nlu as run_nlu
non_english_files = [("thai-tokenizer-config.yml", "tests/data/nlu/th/nlu-th.md")]
@pytest.mark.parametrize("fp,nlu", non_english_files)
def test_run_tra... | 30.5 | 82 | 0.754098 |
4d24ddff69c9944420703282e1a260af369dc338 | 3,438 | py | Python | lar1nd/run_sbnd.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | lar1nd/run_sbnd.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | lar1nd/run_sbnd.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | import os,sys,time
#os.environ['PYOPENCL_CTX']='0:0'
#os.environ['PYOPENCL_COMPILER_OUTPUT'] = '0'
#os.environ['CUDA_PROFILE'] = '1'
import chroma.api as api
#api.use_opencl()
api.use_cuda()
import numpy as np
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph as pg
import pyqtgraph.opengl as gl
from chroma.disp... | 32.742857 | 147 | 0.636707 |
16e4f99b455ca4d7da1d4038c73c4b91f9aefa4f | 1,946 | py | Python | summary_workflows/differential_usage/diff.usage.barplot.py | chilampoon/APAeval | ed9f86bf76d760bb20b1484e5853de4d4a30d240 | [
"MIT"
] | null | null | null | summary_workflows/differential_usage/diff.usage.barplot.py | chilampoon/APAeval | ed9f86bf76d760bb20b1484e5853de4d4a30d240 | [
"MIT"
] | null | null | null | summary_workflows/differential_usage/diff.usage.barplot.py | chilampoon/APAeval | ed9f86bf76d760bb20b1484e5853de4d4a30d240 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os, re, argparse
import pandas as pd
import matplotlib.pyplot as plt
def bar_plot(files, plot_out):
'''
Inputs:
- files: a list of tsv files containing
gene_id & usage changes (e.g. deltaPPAU in QAPA);
NOTE that these genes have been filtered by FDR/q-value.
File n... | 30.888889 | 111 | 0.67112 |
6d7ad4f003d00b4e64eeca99232999280bbd4a67 | 1,288 | py | Python | src/poetry/console/commands/shell.py | zEdS15B3GCwq/poetry | 2afe9840533aacfe561d3fdf65c6fb2e790d89b1 | [
"MIT"
] | 7,258 | 2018-02-28T16:23:08.000Z | 2019-12-11T18:27:58.000Z | src/poetry/console/commands/shell.py | zEdS15B3GCwq/poetry | 2afe9840533aacfe561d3fdf65c6fb2e790d89b1 | [
"MIT"
] | 1,608 | 2018-02-28T15:31:35.000Z | 2019-12-11T20:00:05.000Z | src/poetry/console/commands/shell.py | zEdS15B3GCwq/poetry | 2afe9840533aacfe561d3fdf65c6fb2e790d89b1 | [
"MIT"
] | 597 | 2018-03-07T15:07:46.000Z | 2019-12-11T16:36:22.000Z | from __future__ import annotations
import sys
from distutils.util import strtobool
from os import environ
from poetry.console.commands.env_command import EnvCommand
class ShellCommand(EnvCommand):
name = "shell"
description = "Spawns a shell within the virtual environment."
help = """The <info>shell<... | 29.272727 | 82 | 0.651398 |
5404a08097f242a1926bb3fea5b9c46fdeb50024 | 1,499 | py | Python | python3/koans/about_none.py | willsheppard/python_koans | e843070518b62a26aae3b71620dd4dfba25d18f9 | [
"MIT"
] | null | null | null | python3/koans/about_none.py | willsheppard/python_koans | e843070518b62a26aae3b71620dd4dfba25d18f9 | [
"MIT"
] | null | null | null | python3/koans/about_none.py | willsheppard/python_koans | e843070518b62a26aae3b71620dd4dfba25d18f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutNil in the Ruby Koans
#
from runner.koan import *
class AboutNone(Koan):
def test_none_is_an_object(self):
"Unlike NULL in a lot of languages"
self.assertEqual(True, isinstance(None, object))
def test_none_is_universal(self):
... | 28.826923 | 81 | 0.632422 |
d3702ff2b84a3f8dc1b9b15098a575fb28dc4f01 | 4,661 | py | Python | osf/utils/datetime_aware_jsonfield.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | osf/utils/datetime_aware_jsonfield.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | osf/utils/datetime_aware_jsonfield.py | alexschiller/osf.io | 4122d4be152c6189142c2ebb19cfdee09c77035d | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import datetime as dt
import json
import logging
from decimal import Decimal
from functools import partial
import pytz
from dateutil import parser
from django.contrib.postgres import lookups
from django.contrib.postgres.fields.jsonb import JSONField
from django.core.serializers... | 40.885965 | 97 | 0.667024 |
af65fdeeed6c6cd5fd7ea66ed6079b367b457dea | 11,517 | py | Python | src/hardware/graph.py | yuezuegu/UBoostNAS | a3ddef3d4b2640eded5858f1a1dd24ec230503b6 | [
"MIT"
] | null | null | null | src/hardware/graph.py | yuezuegu/UBoostNAS | a3ddef3d4b2640eded5858f1a1dd24ec230503b6 | [
"MIT"
] | null | null | null | src/hardware/graph.py | yuezuegu/UBoostNAS | a3ddef3d4b2640eded5858f1a1dd24ec230503b6 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from tensorflow.keras.utils import model_to_dot
class Node:
def __init__(self, layer_name, layer_type):
self.layer_name = layer_name
self.layer_type = layer_type
self.layer_attr = {}
self.src = []
self.dst = []
def add_src(self, ... | 34.585586 | 150 | 0.596075 |
ad0d7664779de98923f4a887930781c4ace6155b | 1,467 | py | Python | aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryCustomerAddressListRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryCustomerAddressListRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-bssopenapi/aliyunsdkbssopenapi/request/v20171214/QueryCustomerAddressListRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"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... | 37.615385 | 84 | 0.766871 |
4bc49efa19b29942b786c0ae1cfd9d264ccc664e | 207 | py | Python | appengine/tictactoe/routing.py | salendron/ai-kindergarten | 02782730753b7d9b70fcff2dcfbff0f7a4ed6e0e | [
"MIT"
] | null | null | null | appengine/tictactoe/routing.py | salendron/ai-kindergarten | 02782730753b7d9b70fcff2dcfbff0f7a4ed6e0e | [
"MIT"
] | null | null | null | appengine/tictactoe/routing.py | salendron/ai-kindergarten | 02782730753b7d9b70fcff2dcfbff0f7a4ed6e0e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
TODO
"""
__author__ = 'Bruno Hautzenberger'
import bottle
from .webhandler import index
def setup_routing():
bottle.route('/', ['GET', 'POST'], index)
| 15.923077 | 45 | 0.642512 |
63668934999a198e71f1a6d365063473a35449ae | 782 | py | Python | p00-python-fundamentals/hermes.py | rahulswarnkar/slides | 6d90c5f1ff9c3c774580af8ac7c2f74b959eb2c2 | [
"MIT"
] | null | null | null | p00-python-fundamentals/hermes.py | rahulswarnkar/slides | 6d90c5f1ff9c3c774580af8ac7c2f74b959eb2c2 | [
"MIT"
] | 1 | 2022-02-10T19:15:46.000Z | 2022-02-10T19:15:46.000Z | p00-python-fundamentals/hermes.py | rahulswarnkar/slides | 6d90c5f1ff9c3c774580af8ac7c2f74b959eb2c2 | [
"MIT"
] | null | null | null | import scraper
def collect_urls(products_url, prefix = ''):
products_html = scraper.content(products_url)
products_hrefs = scraper.get_attrs(products_html, 'div.product-item a', 'href')
product_urls = [(prefix + href) for href in products_hrefs]
return product_urls
def collect_info(product_url):
p... | 39.1 | 89 | 0.699488 |
2ac762fc2b09524279f9639fbe4bb7802dc23833 | 685 | py | Python | cookbook/c07/p7_lambda_value.py | RaiderTcT/python3-cookbook | 4eb7715b9b9d3418897ec08276eabe401e5ce513 | [
"Apache-2.0"
] | null | null | null | cookbook/c07/p7_lambda_value.py | RaiderTcT/python3-cookbook | 4eb7715b9b9d3418897ec08276eabe401e5ce513 | [
"Apache-2.0"
] | null | null | null | cookbook/c07/p7_lambda_value.py | RaiderTcT/python3-cookbook | 4eb7715b9b9d3418897ec08276eabe401e5ce513 | [
"Apache-2.0"
] | null | null | null | # @作者 : Ulysses
# @功能描述 : 在lambda中绑定变量的值
# @修改记录 : 2019/2/14 16:27 创建
x = 10
a = lambda y: x + y
x = 20
b = lambda y: x + y
print(a(10), b(10)) # x是自由变量, 在运行时绑定变量的值
# 30 30
funcs = [lambda x: x+n for n in range(5)]
print(funcs) # 还没有执行
# [<function <listcomp>.<lambda> at 0x00000000029B1598>, <function <listcomp... | 31.136364 | 272 | 0.643796 |
83b631635747e4fe0a374c9c904060708a276aea | 2,378 | py | Python | test_model.py | Ahid-Naif/Breaking-Captchas-with-a-CNN | 81987ce54d8756699812c315bd8725bd2219b9b2 | [
"MIT"
] | 3 | 2020-05-25T15:13:23.000Z | 2022-02-26T21:30:20.000Z | test_model.py | Ahid-Naif/Breaking-Captchas-with-a-CNN | 81987ce54d8756699812c315bd8725bd2219b9b2 | [
"MIT"
] | null | null | null | test_model.py | Ahid-Naif/Breaking-Captchas-with-a-CNN | 81987ce54d8756699812c315bd8725bd2219b9b2 | [
"MIT"
] | 5 | 2020-03-12T00:42:02.000Z | 2020-06-08T16:24:19.000Z | from keras.preprocessing.image import img_to_array
from keras.models import load_model
from utils.captchahelper import preprocess
from imutils import contours, paths
import imutils
import numpy as np
import cv2
modelPath = "lenet.hdf5"
imagesPath = "downloads"
# load the pre-trained network
print("[INFO] loading pr... | 36.030303 | 85 | 0.649706 |
39712fa63f8726101ca851612fb14afaa2194b17 | 2,382 | py | Python | golden_fish_pb2_grpc.py | lablabla/GoldenFishServer | 71eece8c7d340a70a86bc7595699c858cc7a9d30 | [
"Apache-2.0"
] | null | null | null | golden_fish_pb2_grpc.py | lablabla/GoldenFishServer | 71eece8c7d340a70a86bc7595699c858cc7a9d30 | [
"Apache-2.0"
] | null | null | null | golden_fish_pb2_grpc.py | lablabla/GoldenFishServer | 71eece8c7d340a70a86bc7595699c858cc7a9d30 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import golden_fish_pb2 as golden__fish__pb2
class GoldenFishStub(object):
"""Interface exported by the server.
"""
def __init__(self, channel):
... | 34.028571 | 101 | 0.663728 |
e6b40f613202ef1594b5da1025bf67c62a1de21b | 5,526 | py | Python | motion_analysis/gui/dialogs/select_scene_objects_dialog.py | gemlongman/motion_preprocessing_tool | 0d46fc41ff951e7cc4788d1d9355b0346a9df306 | [
"MIT"
] | null | null | null | motion_analysis/gui/dialogs/select_scene_objects_dialog.py | gemlongman/motion_preprocessing_tool | 0d46fc41ff951e7cc4788d1d9355b0346a9df306 | [
"MIT"
] | null | null | null | motion_analysis/gui/dialogs/select_scene_objects_dialog.py | gemlongman/motion_preprocessing_tool | 0d46fc41ff951e7cc4788d1d9355b0346a9df306 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2019 DFKI GmbH.
#
# 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, merg... | 45.669421 | 129 | 0.685306 |
8fe260419699d7296488d77507a9079c5cba983e | 8,261 | py | Python | linprog/matrixtools.py | Napam/JallaResearch | f0ed573f20f050ec0a653bff09068eb11a9c4128 | [
"MIT"
] | 1 | 2021-04-30T20:13:05.000Z | 2021-04-30T20:13:05.000Z | linprog/matrixtools.py | Napam/JallaResearch | f0ed573f20f050ec0a653bff09068eb11a9c4128 | [
"MIT"
] | null | null | null | linprog/matrixtools.py | Napam/JallaResearch | f0ed573f20f050ec0a653bff09068eb11a9c4128 | [
"MIT"
] | null | null | null | import numpy as np
from typing import Callable, Sequence
from numbers import Number
from fractions import Fraction
from numpy.core.fromnumeric import ravel
from sympy.solvers.inequalities import solve_poly_inequality
from sympy.polys import Poly
import sympy as sp
from itertools import combinations
from pprint import ... | 24.807808 | 102 | 0.468708 |
45edaa36251e2b2e1ab4693071a631211aad7277 | 19,886 | py | Python | tests/components/apple_tv/test_config_flow.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | tests/components/apple_tv/test_config_flow.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | tests/components/apple_tv/test_config_flow.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Test config flow."""
from unittest.mock import patch
from pyatv import exceptions
from pyatv.const import Protocol
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.apple_tv.const import CONF_START_OFF, DOMAIN
from tests.common import MockConfigEntry
DMAP_SERV... | 34.05137 | 88 | 0.679272 |
41c6003f18f4f49f78cffbf6ba97cd797590b5a0 | 3,640 | py | Python | pyllars/sklearn_transformers/multicolumn_label_encoder.py | bmmalone/pyllars | e37c2bd6fba91a587e54f0bc6a456cee050a6d00 | [
"MIT"
] | 3 | 2020-04-19T15:22:43.000Z | 2022-01-05T16:06:50.000Z | pyllars/sklearn_transformers/multicolumn_label_encoder.py | bmmalone/pyllars | e37c2bd6fba91a587e54f0bc6a456cee050a6d00 | [
"MIT"
] | 19 | 2018-12-29T13:59:39.000Z | 2021-07-22T11:53:23.000Z | pyllars/sklearn_transformers/multicolumn_label_encoder.py | bmmalone/pymisc-utils | a1000824623d7db4873836864c14b830cc81aeed | [
"MIT"
] | null | null | null | import sklearn.preprocessing
import sklearn.base
from pyllars.validation_utils import check_is_fitted
import numpy as np
import pandas as pd
from pyllars.sklearn_transformers.nan_label_encoder import NaNLabelEncoder
class MultiColumnLabelEncoder(sklearn.base.TransformerMixin):
""" Encode multiple columns using ... | 29.12 | 79 | 0.557143 |
7487322543082c9081637fde6d509cafd61117b8 | 2,876 | py | Python | vehicle/OVMS.V3/components/wolfssl/wrapper/python/wolfssl/src/wolfssl/exceptions.py | qtwre/Open-Vehicle-Monitoring-System-3 | 0ebd21bdff06190c0909c29b215ab63f5792e7d6 | [
"MIT"
] | 322 | 2017-06-12T16:56:49.000Z | 2022-03-27T15:46:38.000Z | vehicle/OVMS.V3/components/wolfssl/wrapper/python/wolfssl/src/wolfssl/exceptions.py | qtwre/Open-Vehicle-Monitoring-System-3 | 0ebd21bdff06190c0909c29b215ab63f5792e7d6 | [
"MIT"
] | 426 | 2017-08-30T04:47:34.000Z | 2022-03-25T21:01:11.000Z | vehicle/OVMS.V3/components/wolfssl/wrapper/python/wolfssl/src/wolfssl/exceptions.py | qtwre/Open-Vehicle-Monitoring-System-3 | 0ebd21bdff06190c0909c29b215ab63f5792e7d6 | [
"MIT"
] | 194 | 2017-07-03T23:34:08.000Z | 2022-03-16T09:09:22.000Z | # -*- coding: utf-8 -*-
#
# exceptions.py
#
# Copyright (C) 2006-2020 wolfSSL Inc.
#
# This file is part of wolfSSL.
#
# wolfSSL is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License,... | 31.955556 | 80 | 0.728442 |
32cb86fe55a49ea9d42e7f8ce75e7756a1326c47 | 2,250 | py | Python | rnacentral_pipeline/databases/quickgo/parser.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 1 | 2018-08-09T14:41:16.000Z | 2018-08-09T14:41:16.000Z | rnacentral_pipeline/databases/quickgo/parser.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | 60 | 2015-02-04T16:43:53.000Z | 2022-01-27T10:28:43.000Z | rnacentral_pipeline/databases/quickgo/parser.py | RNAcentral/rnacentral-import-pipeline | 238e573440c72581a051b16c15f56fcd25bece74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... | 32.608696 | 78 | 0.705333 |
a1de42bca41435ab1fcee6be72dc3c5270cfb068 | 6,178 | py | Python | chemdataextractor/scrape/pub/springer.py | materialsintelligence/deprecated-cde-selfcontained-nodawg | f899d64c7e09be1b56cd1d90ba34b86b4270e78a | [
"MIT"
] | 199 | 2016-10-07T06:55:23.000Z | 2022-03-29T09:50:03.000Z | chemdataextractor/scrape/pub/springer.py | qingtong00/ChemDataExtractor | 349a3bea965f2073141d62043b89319222e46af1 | [
"MIT"
] | 29 | 2016-10-04T08:56:05.000Z | 2022-03-06T19:36:55.000Z | chemdataextractor/scrape/pub/springer.py | qingtong00/ChemDataExtractor | 349a3bea965f2073141d62043b89319222e46af1 | [
"MIT"
] | 95 | 2016-10-10T14:24:27.000Z | 2022-03-16T18:30:00.000Z | # -*- coding: utf-8 -*-
"""
chemdataextractor.scrape.springer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tools for scraping documents from Springer, Biomed Central and Chemistry Central XML files.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ ... | 43.202797 | 191 | 0.673357 |
542625c2cd04c7449ca14f4e6328695b96bcdd6a | 33 | py | Python | elichika/elichika/parser/config.py | kuenishi/chainer-compiler | 942c3b09759d0857ddc7c6bb93b81117d011ff50 | [
"MIT"
] | null | null | null | elichika/elichika/parser/config.py | kuenishi/chainer-compiler | 942c3b09759d0857ddc7c6bb93b81117d011ff50 | [
"MIT"
] | null | null | null | elichika/elichika/parser/config.py | kuenishi/chainer-compiler | 942c3b09759d0857ddc7c6bb93b81117d011ff50 | [
"MIT"
] | null | null | null | import sys
show_warnings = True
| 8.25 | 20 | 0.787879 |
b9ca5a2834c64ac5f95960f021e2046243f97686 | 8,804 | py | Python | examples/STRUMPACK/strumpack_MLA_KRR.py | kadircs/GPTune | 4a6d35f1080a99e85f838ed3180c7221f4600175 | [
"BSD-3-Clause-LBNL"
] | null | null | null | examples/STRUMPACK/strumpack_MLA_KRR.py | kadircs/GPTune | 4a6d35f1080a99e85f838ed3180c7221f4600175 | [
"BSD-3-Clause-LBNL"
] | null | null | null | examples/STRUMPACK/strumpack_MLA_KRR.py | kadircs/GPTune | 4a6d35f1080a99e85f838ed3180c7221f4600175 | [
"BSD-3-Clause-LBNL"
] | null | null | null | #! /usr/bin/env python3
# GPTune Copyright (c) 2019, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S.Dept. of Energy) and the University of
# California, Berkeley. All rights reserved.
#
# If you have questions ab... | 35.788618 | 508 | 0.661745 |
8bbc1b1838beb7829dc5b27804a61604d1bff5d7 | 10,343 | py | Python | utils.py | lihenryhfl/projection_stg | 4affabf6b5c4033a1b636073ed535facc887340c | [
"MIT"
] | null | null | null | utils.py | lihenryhfl/projection_stg | 4affabf6b5c4033a1b636073ed535facc887340c | [
"MIT"
] | null | null | null | utils.py | lihenryhfl/projection_stg | 4affabf6b5c4033a1b636073ed535facc887340c | [
"MIT"
] | null | null | null | # Taken from https://github.com/davebiagioni/pyomp
import numpy as np
from scipy.optimize import nnls
class Result(object):
"""Result object for storing input and output data for omp. When called from
`omp`, runtime parameters are passed as keyword arguments and stored in the
`params` dictionary.
Att... | 33.472492 | 88 | 0.589577 |
0a42aa946eee7d245198517945624ed6ddd3d988 | 2,440 | py | Python | tests/project/packages/test_install.py | drLis/brownie | bf1e1056df70b7696e298ce695b18291fb5f9b2f | [
"MIT"
] | null | null | null | tests/project/packages/test_install.py | drLis/brownie | bf1e1056df70b7696e298ce695b18291fb5f9b2f | [
"MIT"
] | null | null | null | tests/project/packages/test_install.py | drLis/brownie | bf1e1056df70b7696e298ce695b18291fb5f9b2f | [
"MIT"
] | null | null | null | import shutil
import pytest
import yaml
from brownie._config import _get_data_folder
from brownie.exceptions import InvalidPackage
from brownie.project.main import install_package
@pytest.fixture(autouse=True)
def setup(package_test):
yield
path = _get_data_folder().joinpath("packages")
shutil.rmtree(pa... | 27.41573 | 99 | 0.736885 |
96e0378e5068bf415910697ab7e6559173b660d1 | 18,662 | py | Python | synapse/storage/databases/main/state.py | Erethon/synapse | d13863d6eb4b3a1ce1ca4a702ae30d4f8808e51f | [
"Apache-2.0"
] | null | null | null | synapse/storage/databases/main/state.py | Erethon/synapse | d13863d6eb4b3a1ce1ca4a702ae30d4f8808e51f | [
"Apache-2.0"
] | null | null | null | synapse/storage/databases/main/state.py | Erethon/synapse | d13863d6eb4b3a1ce1ca4a702ae30d4f8808e51f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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/li... | 36.592157 | 90 | 0.618583 |
9f3fefedb6574803b8ccb5eb76419d5aa98b80e9 | 12,958 | py | Python | csld/basic_lattice_model.py | jsyony37/csld | b0e6d5845d807174f24ca7b591bc164c608c99c8 | [
"MIT"
] | 16 | 2019-07-22T18:49:33.000Z | 2022-03-04T10:22:05.000Z | csld/basic_lattice_model.py | jsyony37/csld | b0e6d5845d807174f24ca7b591bc164c608c99c8 | [
"MIT"
] | 8 | 2019-07-18T20:49:55.000Z | 2021-09-09T00:47:04.000Z | csld/basic_lattice_model.py | jsyony37/csld | b0e6d5845d807174f24ca7b591bc164c608c99c8 | [
"MIT"
] | 8 | 2019-07-18T17:52:44.000Z | 2020-09-04T11:35:04.000Z | #!/usr/bin/env python3
"""
This module provides the basic lattice model as used in e.g. cluster expansion, lattice dynamics
"""
import numpy as np
import logging
import scipy.sparse
from collections import Counter
from .cluster import Cluster
from .atomic_model import AtomicModel
from .util.mathtool import relative... | 36.708215 | 137 | 0.566677 |
3c6f22f1509518a9ecf30eeca268459e8c5c4c9e | 226 | py | Python | application/KitchenMagician/kitchen_magician/testing/views.py | AsuPaul19/Kitchen-Magician | 8c22bc1a45942d22c183096f8e92f858983d351d | [
"MIT"
] | null | null | null | application/KitchenMagician/kitchen_magician/testing/views.py | AsuPaul19/Kitchen-Magician | 8c22bc1a45942d22c183096f8e92f858983d351d | [
"MIT"
] | 8 | 2021-04-08T20:50:25.000Z | 2022-03-12T00:53:18.000Z | application/KitchenMagician/kitchen_magician/testing/views.py | AsuPaul19/Kitchen-Magician | 8c22bc1a45942d22c183096f8e92f858983d351d | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
def testing(request):
context = {
'title': 'Testing',
'diets': 'Gluten Free'
}
return render(request, 'testing/testing.html', context) | 22.6 | 59 | 0.641593 |
fe8f789a8bbf284e756dec4e6b84a57005d4db61 | 1,774 | py | Python | third_party/blink/web_tests/wpt_internal/prerender/PRESUBMIT.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | third_party/blink/web_tests/wpt_internal/prerender/PRESUBMIT.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | third_party/blink/web_tests/wpt_internal/prerender/PRESUBMIT.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2021 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.
"""Chromium presubmit script for prerender in Web Platform Tests.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more detail... | 31.122807 | 75 | 0.66009 |
a480363595f24f83ac682ff0d566a911850fe4ff | 8,634 | py | Python | conwhat/utils/readers.py | GriffithsLab/conwhat | 282765211cd4da31d7a7ed48e95e29614899cd22 | [
"BSD-3-Clause"
] | 1 | 2021-01-19T22:26:44.000Z | 2021-01-19T22:26:44.000Z | conwhat/utils/readers.py | GriffithsLab/conwhat | 282765211cd4da31d7a7ed48e95e29614899cd22 | [
"BSD-3-Clause"
] | 10 | 2021-01-19T21:24:07.000Z | 2021-06-01T17:51:16.000Z | conwhat/utils/readers.py | GriffithsLab/ConWhAt | 282765211cd4da31d7a7ed48e95e29614899cd22 | [
"BSD-3-Clause"
] | null | null | null | """
Utils for reading ConWhAt and external data files
"""
# Author: John Griffiths
# License: simplified BSD
import os,sys,yaml,h5py
import numpy as np,networkx as nx, pandas as pd
import nibabel as nib, nilearn as nl
from nibabel.affines import apply_affine
from dipy.io import Dpy
import indexed_gzip as igzip
# ... | 25.172012 | 87 | 0.645356 |
9d891bb512e52d9fd6c006686575c07959d44483 | 2,753 | py | Python | corunner/runner.py | thepatrik/corunner | a68ed8e4f9f659b71a03c37833710544532c302d | [
"MIT"
] | null | null | null | corunner/runner.py | thepatrik/corunner | a68ed8e4f9f659b71a03c37833710544532c302d | [
"MIT"
] | null | null | null | corunner/runner.py | thepatrik/corunner | a68ed8e4f9f659b71a03c37833710544532c302d | [
"MIT"
] | null | null | null | import asyncio
import contextlib
import inspect
import time
from typing import Any, Awaitable, Callable, List
import click_spinner
from .exceptions import CancelledError
from .report import Execution, Report
def run(*groups,
users: int = 5,
duration: int = 0,
logger=None,
show_progre... | 29.287234 | 81 | 0.586996 |
901bc7cbba875fcb68fbeeeccac4773ef79bda17 | 5,463 | py | Python | tests/test_types.py | saullocarvalho/angr | 48a7297f70f9420f3a79882b48bf9a682f910a0c | [
"BSD-2-Clause"
] | null | null | null | tests/test_types.py | saullocarvalho/angr | 48a7297f70f9420f3a79882b48bf9a682f910a0c | [
"BSD-2-Clause"
] | null | null | null | tests/test_types.py | saullocarvalho/angr | 48a7297f70f9420f3a79882b48bf9a682f910a0c | [
"BSD-2-Clause"
] | null | null | null | import nose
import claripy
import angr
from angr.sim_type import SimTypeFunction, SimTypeInt, SimTypePointer, SimTypeChar, SimStruct, SimTypeFloat, SimUnion, SimTypeDouble, SimTypeLongLong, SimTypeLong, SimTypeNum
from angr.utils.library import convert_cproto_to_py
def test_type_annotation():
my_ty = angr.sim_t... | 45.907563 | 280 | 0.746842 |
417c98a6c2adee0d04f431a80fd90c5b2c372d0f | 344 | py | Python | example/data/rocketdataset/rocketdatasetresize.py | SeanMabli/aiinpy | bd332fce454c489e236878c9da91bb86ec6dda14 | [
"MIT"
] | 2 | 2021-04-19T21:49:34.000Z | 2021-05-17T21:03:08.000Z | testing/data/rocketdataset/rocketdatasetresize.py | Sean-Mabli/aiinpy | 827e4f85861436c0332046fa8aa84e24153513d6 | [
"MIT"
] | null | null | null | testing/data/rocketdataset/rocketdatasetresize.py | Sean-Mabli/aiinpy | 827e4f85861436c0332046fa8aa84e24153513d6 | [
"MIT"
] | null | null | null | from PIL import Image
numofelectronimages = 23
numoffalcon9images = 72
numofsoyuzimages = 59
numofspaceshuttleimages = 71
for i in range(72):
im = Image.open('testing\\data\\rocketdataset\\960x540\\SoyuzImagesFormated\\Soyuz_' + format(i, "04") + '_Credit=Roscosmos.png')
im.save('testing\\data\\rocketdataset\\soy... | 34.4 | 131 | 0.732558 |
b9885dfec7242cbbbb808f31b466dabae833761f | 2,013 | py | Python | open/Inspur/code/common/lwis_harness.py | fenz-org/mlperf_inference_results_v0.7 | 2e38bec7f8df806283802a69db3d0038a37d026e | [
"Apache-2.0"
] | 19 | 2020-10-26T17:37:22.000Z | 2022-01-20T09:32:38.000Z | open/Inspur/code/common/lwis_harness.py | fenz-org/mlperf_inference_results_v0.7 | 2e38bec7f8df806283802a69db3d0038a37d026e | [
"Apache-2.0"
] | 11 | 2020-10-21T19:18:48.000Z | 2021-03-11T18:50:36.000Z | open/Inspur/code/common/lwis_harness.py | fenz-org/mlperf_inference_results_v0.7 | 2e38bec7f8df806283802a69db3d0038a37d026e | [
"Apache-2.0"
] | 19 | 2020-10-21T19:15:17.000Z | 2022-01-04T08:32:08.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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.706897 | 114 | 0.701937 |
a7ac2e4e6627e3117ff2dce0a8397c8df4a4ed25 | 11,390 | py | Python | run_simulation_yaml.py | larrycameron80/metta | 4a15b790701fe84a6493e52aec95e5788fef1a04 | [
"MIT"
] | 940 | 2018-02-13T00:36:42.000Z | 2022-03-30T20:15:52.000Z | run_simulation_yaml.py | larrycameron80/metta | 4a15b790701fe84a6493e52aec95e5788fef1a04 | [
"MIT"
] | 24 | 2018-02-11T22:02:53.000Z | 2020-10-08T16:32:14.000Z | run_simulation_yaml.py | larrycameron80/metta | 4a15b790701fe84a6493e52aec95e5788fef1a04 | [
"MIT"
] | 140 | 2018-02-13T02:48:56.000Z | 2022-03-09T13:35:18.000Z | # author Chris Gates - Uber
# additions Maus - Uber
# additions author Russ Nolen - Riot Games
# adversarial simulation engine
from __future__ import print_function
import datetime
import json
import logging
import os
import subprocess
import sys
import time
from argparse import ArgumentParser
from random import rand... | 39.686411 | 196 | 0.54504 |
0e4099b5054e5f542b9bd9e68b972db57d955253 | 1,212 | py | Python | store/migrations/0015_order_coupon.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | 3 | 2019-10-22T00:16:49.000Z | 2021-07-15T07:44:43.000Z | store/migrations/0015_order_coupon.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | 1,183 | 2018-04-19T18:40:30.000Z | 2022-03-31T21:05:05.000Z | store/migrations/0015_order_coupon.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | 12 | 2018-04-17T19:16:42.000Z | 2022-01-27T00:19:59.000Z | # Generated by Django 2.0.8 on 2019-01-08 18:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('store', '0014_optional_applicable_anything'),
]
operations = [
migrations.AddField(
model_name=... | 34.628571 | 165 | 0.628713 |
cb089350f29a336069b96da619a104cfbf6753c3 | 4,657 | py | Python | ditto/flickr/fetch/filesfetchers.py | garrettc/django-ditto | fcf15beb8f9b4d61634efd4a88064df12ee16a6f | [
"MIT"
] | 54 | 2016-08-15T17:32:41.000Z | 2022-02-27T03:32:05.000Z | ditto/flickr/fetch/filesfetchers.py | garrettc/django-ditto | fcf15beb8f9b4d61634efd4a88064df12ee16a6f | [
"MIT"
] | 229 | 2015-07-23T12:50:47.000Z | 2022-03-24T10:33:20.000Z | ditto/flickr/fetch/filesfetchers.py | garrettc/django-ditto | fcf15beb8f9b4d61634efd4a88064df12ee16a6f | [
"MIT"
] | 8 | 2015-09-10T17:10:35.000Z | 2022-03-25T13:05:01.000Z | import os
from django.core.files import File
from . import FetchError
from ..models import Photo
from ...core.utils.downloader import DownloadException, filedownloader
# A single class that fetches original photo/video files for existing
# Photo objects. Doesn't use the API.
class OriginalFilesFetcher(object):
... | 31.466216 | 87 | 0.587932 |
9cb136c60f59a551fd2956a0e41b20f978350ef2 | 3,994 | py | Python | analysis/plotting/scripts/2021415_plot_classification.py | zieglerad/damselfly | d0ee9b13aa5981a91f62765cba6a263b584e7f25 | [
"MIT"
] | null | null | null | analysis/plotting/scripts/2021415_plot_classification.py | zieglerad/damselfly | d0ee9b13aa5981a91f62765cba6a263b584e7f25 | [
"MIT"
] | null | null | null | analysis/plotting/scripts/2021415_plot_classification.py | zieglerad/damselfly | d0ee9b13aa5981a91f62765cba6a263b584e7f25 | [
"MIT"
] | null | null | null | import damselfly as df
import numpy as np
import pickle as pkl
import os
import matplotlib.pyplot as plt
temp = 10.0
result_date = '210607'
result_train_dset = '210607_df1_multiclass_ch3'
result_test_dset = '210607_df2_multiclass_test_ch3'
result_model = 'df_conv6_fc2_multiclass_3ch'
result_domain = 'freq'
result_epoc... | 33.283333 | 192 | 0.744367 |
b5a978eabb5441b009825f47e557887543fed6e0 | 31,667 | py | Python | nodes/test_scripts/test_cuda_inference.py | mrfmap/mrfmap_ros | 8c1e108860ff297f39591d97f8f8ce2937b29a51 | [
"BSD-3-Clause"
] | 6 | 2020-07-15T21:00:49.000Z | 2021-05-12T07:16:38.000Z | nodes/test_scripts/test_cuda_inference.py | mrfmap/mrfmap_ros | 8c1e108860ff297f39591d97f8f8ce2937b29a51 | [
"BSD-3-Clause"
] | 2 | 2020-08-14T16:16:21.000Z | 2020-11-12T07:43:22.000Z | nodes/test_scripts/test_cuda_inference.py | mrfmap/mrfmap_ros | 8c1e108860ff297f39591d97f8f8ce2937b29a51 | [
"BSD-3-Clause"
] | 2 | 2020-08-16T15:53:14.000Z | 2021-05-12T07:16:41.000Z | #!/usr/bin/env python
import numpy as np
from mrfmap_ros.MRFMapGenerator import MRFMapGenerator
from mrfmap_ros.GVDBPyModules import GVDBInference, GVDBImage, gvdb_params, PangolinViewer, KeyframeSelector
import pdb
from geometry import se3, SE3
import cv2
import glob
import yaml
dtype=np.float32
from time import tim... | 43.379452 | 121 | 0.504437 |
54045de1587eb5b5b1867e9bc46b52c0dd0c9875 | 1,166 | py | Python | igibson/objects/cube.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/objects/cube.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/objects/cube.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | import pybullet as p
from igibson.objects.stateful_object import StatefulObject
class Cube(StatefulObject):
"""
Cube shape primitive
"""
def __init__(self, pos=[1, 2, 3], dim=[1, 2, 3], visual_only=False, mass=1000, color=[1, 1, 1, 1]):
super(Cube, self).__init__()
self.basePos = pos... | 32.388889 | 105 | 0.64837 |
fc9774b93a9b40cd18b682819d2669ab743b8e89 | 732,002 | py | Python | template_container_mouse/labels/slice_135.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_mouse/labels/slice_135.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_mouse/labels/slice_135.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | coordinates_00FFBF = ((128, 221),
(128, 222), (129, 219), (129, 223), (129, 224), (130, 217), (130, 221), (130, 222), (130, 226), (131, 215), (131, 216), (131, 219), (131, 220), (131, 221), (131, 222), (131, 223), (131, 225), (132, 214), (132, 217), (132, 218), (132, 219), (132, 220), (132, 221), (132, 222), (132, 22... | 854.144691 | 865 | 0.496094 |
9f4d7f91aa95c8b9f2d98da668794b631b28bace | 2,024 | py | Python | examples/dfp/v201511/base_rate_service/create_product_template_base_rates.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | 1 | 2020-05-23T11:32:32.000Z | 2020-05-23T11:32:32.000Z | examples/dfp/v201511/base_rate_service/create_product_template_base_rates.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201511/base_rate_service/create_product_template_base_rates.py | wbrp/googleads-python-lib | c0f8ce6c4acfe88ce8f913a4f0e0e92b548e1022 | [
"Apache-2.0"
] | 2 | 2018-04-20T02:16:33.000Z | 2020-11-12T20:58:54.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 31.625 | 79 | 0.698123 |
d24694ac380d147d06f6628311905a84a58f547e | 548 | py | Python | plotly/validators/sankey/stream/_maxpoints.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/sankey/stream/_maxpoints.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/sankey/stream/_maxpoints.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name='maxpoints', parent_name='sankey.stream', **kwargs
):
super(MaxpointsValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | 30.444444 | 76 | 0.611314 |
b654e636bfbf7fe9134a3251cd1c758d08272587 | 4,241 | py | Python | irqtest.py | danicampora/Micropython-scheduler | 1252b057a8fa6396e0b1ed9e5610c80a4dfa02dd | [
"MIT"
] | 1 | 2022-03-30T16:13:13.000Z | 2022-03-30T16:13:13.000Z | irqtest.py | danicampora/Micropython-scheduler | 1252b057a8fa6396e0b1ed9e5610c80a4dfa02dd | [
"MIT"
] | null | null | null | irqtest.py | danicampora/Micropython-scheduler | 1252b057a8fa6396e0b1ed9e5610c80a4dfa02dd | [
"MIT"
] | 2 | 2020-07-21T16:01:16.000Z | 2020-08-14T10:18:04.000Z | # irqtest.py Demonstrates, with minimal hardware, the use of the scheduler in responding to pin interrupts
# Author: Peter Hinch
# V1.02 6th Sep 2014
# Also demonstrates the debounced switch library (which is threaded)
# A thread sets up initial conditions and blocks pending an interrupt. When it occurs the following... | 49.313953 | 122 | 0.621316 |
940a751dc4cdad41bab1f51e8fb550e200b3520d | 2,858 | py | Python | photoblog_root/settings.py | markableidinger/one-page-photoblog | 5fa0b37a7e6b42fdf356f1d23b262be1fe3bc729 | [
"MIT"
] | null | null | null | photoblog_root/settings.py | markableidinger/one-page-photoblog | 5fa0b37a7e6b42fdf356f1d23b262be1fe3bc729 | [
"MIT"
] | null | null | null | photoblog_root/settings.py | markableidinger/one-page-photoblog | 5fa0b37a7e6b42fdf356f1d23b262be1fe3bc729 | [
"MIT"
] | null | null | null | """Settings file for single page photoblog."""
import os
import json
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
CREDENTIALS = json.load(open(os.path.join(BASE_DIR, 'secrets.json'), 'r'))
SECRET_KEY = CREDENTIALS['secret_key']
# Necessary stuff for django storages with s3
AWS_ACCESS_KEY_I... | 26.462963 | 91 | 0.686494 |
4f95db10a5d228539842f58445a4f3fb08ac10d0 | 3,764 | py | Python | qualitycc.py | rootstrap/NWPU-Crowd-Sample-Code | fe8e986d23e88f7b9defabbd0b3f6f655803152d | [
"MIT"
] | 132 | 2020-01-11T06:04:43.000Z | 2022-03-31T02:51:28.000Z | qualitycc.py | rootstrap/NWPU-Crowd-Sample-Code | fe8e986d23e88f7b9defabbd0b3f6f655803152d | [
"MIT"
] | 25 | 2020-01-14T07:32:48.000Z | 2021-11-16T07:18:48.000Z | qualitycc.py | rootstrap/NWPU-Crowd-Sample-Code | fe8e986d23e88f7b9defabbd0b3f6f655803152d | [
"MIT"
] | 34 | 2020-01-13T02:16:23.000Z | 2022-03-25T15:08:27.000Z | # -*- coding: utf-8 -*-
# import torch
# import torch.nn.functional as F
# from torch.autograd import Variable
# import numpy as np
# from math import exp
# import math
# def gaussian(window_size, sigma):
# gauss = torch.Tensor([exp(-(x - window_size//2)**2/float(2*sigma**2)) for x in range(window_size)])
# r... | 33.017544 | 106 | 0.615569 |
fcd1003e70dd30ec908c5366c16bd9f20d4b2aea | 189 | py | Python | src/accounts/admin.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/accounts/admin.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/accounts/admin.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | from .models import User
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
@admin.register(User)
class UserAdmin(BaseUserAdmin):
pass
| 18.9 | 64 | 0.804233 |
b1720a84d6267182a63fbe5bfb9729da808d4c25 | 867 | py | Python | src/pretalx/submission/migrations/0040_submission_created_data.py | xhub/pretalx | 33bd07ec98ddeb5b7ff35fe7e30c4d38bef57d7e | [
"Apache-2.0"
] | null | null | null | src/pretalx/submission/migrations/0040_submission_created_data.py | xhub/pretalx | 33bd07ec98ddeb5b7ff35fe7e30c4d38bef57d7e | [
"Apache-2.0"
] | 1 | 2019-07-05T20:03:42.000Z | 2019-07-05T20:03:42.000Z | src/pretalx/submission/migrations/0040_submission_created_data.py | xhub/pretalx | 33bd07ec98ddeb5b7ff35fe7e30c4d38bef57d7e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.1 on 2019-05-01 20:36
from django.db import migrations
from django_scopes import scopes_disabled
def fill_created(apps, schema_editor):
with scopes_disabled():
Submission = apps.get_model('submission', 'Submission')
for submission_id in Submission.objects.all().values_li... | 30.964286 | 92 | 0.66436 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.