hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e64c50e5e3b01bee5233b429195480822031b6d | 1,407 | py | Python | examples/dopamine/train.py | jurgisp/xmanager | 7c59aed661b93817589bb1904e7d099d26afa62f | [
"Apache-2.0"
] | 392 | 2021-10-07T00:12:17.000Z | 2022-03-30T11:06:35.000Z | examples/dopamine/train.py | jurgisp/xmanager | 7c59aed661b93817589bb1904e7d099d26afa62f | [
"Apache-2.0"
] | 8 | 2021-10-20T14:59:07.000Z | 2022-03-31T10:52:47.000Z | examples/dopamine/train.py | jurgisp/xmanager | 7c59aed661b93817589bb1904e7d099d26afa62f | [
"Apache-2.0"
] | 11 | 2021-11-16T13:54:18.000Z | 2022-03-30T03:13:50.000Z | # Copyright 2021 DeepMind Technologies Limited
#
# 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 agr... | 31.977273 | 74 | 0.766169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 871 | 0.619048 |
2e651a2fe83d07fb048afcf923ef6a66a310e429 | 2,814 | py | Python | APS.py | PabloGramos/APS | a7825628f8ce7ef46da413948c40d03c8118717e | [
"MIT"
] | null | null | null | APS.py | PabloGramos/APS | a7825628f8ce7ef46da413948c40d03c8118717e | [
"MIT"
] | null | null | null | APS.py | PabloGramos/APS | a7825628f8ce7ef46da413948c40d03c8118717e | [
"MIT"
] | null | null | null | def soma():
r=1
while r>0:
n1 = int(input("Valor: "))
n2 = int(input(f"{n1} + "))
soma = n1 + n2
print(f"\n{n1} + {n2} = {soma}\n")
r=int(input("1-Continuar 0-Sair: "))
if r > 1:
print("Opção Inválida!....Saindo")
r=0
def sub():
r = 1
... | 26.299065 | 121 | 0.429638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.351598 |
2e673f4da5b6854fbcd837a5389934a4ea9a7719 | 1,452 | py | Python | day_2.py | kurtrm/advent_of_code_2018 | a3db9df31de730479c8c2b3f2869b274a0e024e9 | [
"MIT"
] | null | null | null | day_2.py | kurtrm/advent_of_code_2018 | a3db9df31de730479c8c2b3f2869b274a0e024e9 | [
"MIT"
] | null | null | null | day_2.py | kurtrm/advent_of_code_2018 | a3db9df31de730479c8c2b3f2869b274a0e024e9 | [
"MIT"
] | null | null | null | """
"""
from collections import Counter
from read_file import read_input
def checksum(filename):
"""
"""
threes = 0
twos = 0
ids = read_input(filename)
for label_id in ids:
counts = {value: key for key, value in Counter(label_id).items()}
try:
count... | 23.419355 | 76 | 0.472452 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 450 | 0.309917 |
2e675938f3d093c0365d3aa398c262cefa7433e0 | 3,357 | py | Python | home-assistant-backup.py | scaarup/home-assistant-backup | 1310054ebd41550292d45329411500cb08b369a1 | [
"MIT"
] | null | null | null | home-assistant-backup.py | scaarup/home-assistant-backup | 1310054ebd41550292d45329411500cb08b369a1 | [
"MIT"
] | null | null | null | home-assistant-backup.py | scaarup/home-assistant-backup | 1310054ebd41550292d45329411500cb08b369a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Created by Søren Christian Aarup, sc@aarup.org
# https://github.com/scaarup/home-assistant-backup
# api ref.: https://developers.home-assistant.io/docs/api/supervisor/endpoints
import requests,json,datetime,gzip,sys,datetime
from datetime import timedelta, date
token = 'Bearer <token>'
host = '... | 34.96875 | 105 | 0.670539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,273 | 0.379095 |
2e6cd67c9f0d05ca91537b7f522e588f70c9a9c4 | 1,319 | py | Python | src/features/build_features.py | mikolajsacha/tweetsclassification | 33756cf6877f9cec328f08a3c728b26bf123bc8f | [
"MIT"
] | 4 | 2016-11-22T11:26:06.000Z | 2017-02-22T12:56:45.000Z | src/features/build_features.py | mikolajsacha/tweetsclassification | 33756cf6877f9cec328f08a3c728b26bf123bc8f | [
"MIT"
] | 26 | 2016-11-08T20:04:37.000Z | 2017-02-18T13:51:39.000Z | src/features/build_features.py | mikolajsacha/tweetsclassification | 33756cf6877f9cec328f08a3c728b26bf123bc8f | [
"MIT"
] | null | null | null | """
Contains class FeatureBuilder for building feature set from given data set and word embedding
"""
import numpy as np
class FeatureBuilder(object):
"""
Class used for building feature matrix.
Field "labels" is a list of categories of sentences
Field "features" is a features matrix of shape (trainin... | 36.638889 | 113 | 0.690675 | 1,194 | 0.905231 | 0 | 0 | 0 | 0 | 0 | 0 | 578 | 0.438211 |
2e6d28bc002be9af0e517b72024d00a394efa949 | 1,624 | py | Python | json/conanfile.py | kapilsh/conan-scripts | 31c55397a2d721c80da5dbd6a6c738accfdbb241 | [
"MIT"
] | null | null | null | json/conanfile.py | kapilsh/conan-scripts | 31c55397a2d721c80da5dbd6a6c738accfdbb241 | [
"MIT"
] | null | null | null | json/conanfile.py | kapilsh/conan-scripts | 31c55397a2d721c80da5dbd6a6c738accfdbb241 | [
"MIT"
] | null | null | null | import os
from conans import ConanFile
from conans.tools import download, check_sha256
class NlohmannJsonConan(ConanFile):
name = "json"
with open(os.path.join(os.path.dirname(os.path.realpath(
__file__)), "VERSION.txt"), 'r') as version_file:
version = version_file.read()
settings = ... | 33.142857 | 79 | 0.633621 | 1,533 | 0.943966 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.307882 |
2e6d68261b931f6d3c99896fa9c575feee129b51 | 5,958 | py | Python | projects/seeker/tasks/dialogue.py | DrMatters/ParlAI | 755b9dcb778deb5a82029d69ae3260579c6450f1 | [
"MIT"
] | null | null | null | projects/seeker/tasks/dialogue.py | DrMatters/ParlAI | 755b9dcb778deb5a82029d69ae3260579c6450f1 | [
"MIT"
] | null | null | null | projects/seeker/tasks/dialogue.py | DrMatters/ParlAI | 755b9dcb778deb5a82029d69ae3260579c6450f1 | [
"MIT"
] | 1 | 2022-01-24T13:22:18.000Z | 2022-01-24T13:22:18.000Z | #!/usr/bin/env python3
# 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.
"""
SeeKeR Dialogue Tasks.
"""
from typing import Optional
from parlai.core.opt import Opt
from parlai.core.params impor... | 34.241379 | 88 | 0.643337 | 4,684 | 0.78617 | 0 | 0 | 686 | 0.115139 | 0 | 0 | 1,678 | 0.281638 |
2e6d9f56ad67c28ab101dfa720b2f55910ca38c7 | 350 | py | Python | chrispile/util.py | FNNDSC/chrispile | 9eb688b17bd3392c23b5cc2a1e11470d78d6029a | [
"MIT"
] | null | null | null | chrispile/util.py | FNNDSC/chrispile | 9eb688b17bd3392c23b5cc2a1e11470d78d6029a | [
"MIT"
] | null | null | null | chrispile/util.py | FNNDSC/chrispile | 9eb688b17bd3392c23b5cc2a1e11470d78d6029a | [
"MIT"
] | null | null | null | import abc
from argparse import ArgumentParser, Namespace
from .config import get_config
class CommandProvider(abc.ABC):
def __init__(self, parser: ArgumentParser):
self.config = get_config()
parser.set_defaults(func=self)
@abc.abstractmethod
def __call__(self, options: Namespace):
... | 25 | 47 | 0.728571 | 258 | 0.737143 | 0 | 0 | 99 | 0.282857 | 0 | 0 | 0 | 0 |
2e6f1afc0f744ac9404e2211aba6de066e7ef17c | 297 | py | Python | Part_1_beginner/07_type_dictionary/rozwiazania/exercise_1.py | Mikma03/InfoShareacademy_Python_Courses | 3df1008c8c92831bebf1625f960f25b39d6987e6 | [
"MIT"
] | null | null | null | Part_1_beginner/07_type_dictionary/rozwiazania/exercise_1.py | Mikma03/InfoShareacademy_Python_Courses | 3df1008c8c92831bebf1625f960f25b39d6987e6 | [
"MIT"
] | null | null | null | Part_1_beginner/07_type_dictionary/rozwiazania/exercise_1.py | Mikma03/InfoShareacademy_Python_Courses | 3df1008c8c92831bebf1625f960f25b39d6987e6 | [
"MIT"
] | 1 | 2021-02-20T08:30:56.000Z | 2021-02-20T08:30:56.000Z |
# Stwórz słownik, w którym kluczami będą różne przedmioty szkolne
# a wartościami oceny uzyskane z tych przedmiotów
grades = {
"Matematyka": [4, 2, 6, 5, 3],
"Fizyka": [5, 5, 2, 4, 3],
"Chemia": [4, 1, 4, 5, 4],
"Biologia": [3, 5, 5, 2, 5],
}
print("Przedmioty i oceny", grades)
| 24.75 | 65 | 0.599327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.591503 |
2e7040e11ae9ee1dfa29a9acc88975d2a9c16bff | 703 | py | Python | paper2/figures/calibration_default.py | dfm/mapping_stellar_surfaces | 52d4ba1a726c65868e4a1290a801fe046fb2155f | [
"MIT"
] | 10 | 2021-01-21T17:03:26.000Z | 2021-12-19T17:49:28.000Z | paper2/figures/calibration_default.py | dfm/mapping_stellar_surfaces | 52d4ba1a726c65868e4a1290a801fe046fb2155f | [
"MIT"
] | 10 | 2021-01-21T15:55:53.000Z | 2021-03-30T14:35:16.000Z | paper2/figures/calibration_default.py | dfm/mapping_stellar_surfaces | 52d4ba1a726c65868e4a1290a801fe046fb2155f | [
"MIT"
] | 2 | 2021-01-21T15:41:58.000Z | 2021-01-25T16:26:15.000Z | from starry_process import calibrate
import numpy as np
import os
import shutil
# Utility funcs to move figures to this directory
abspath = lambda *args: os.path.join(
os.path.dirname(os.path.abspath(__file__)), *args
)
copy = lambda name, src, dest: shutil.copyfile(
abspath("data", name, src), abspath(dest)
)... | 31.954545 | 75 | 0.755334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.482219 |
2e7169ec55a244a64b91496630b7d2210f0c8139 | 5,922 | py | Python | python/ad/spectral_outlier.py | rislam/ad_examples | 20e6dd2dbfd111ed5f69a9018180f7ef5ab627f6 | [
"MIT"
] | 1 | 2019-02-21T02:28:34.000Z | 2019-02-21T02:28:34.000Z | python/ad/spectral_outlier.py | kinect59/ad_examples | bf0bb75faa3f713a2efef04b6b093e6a313825af | [
"MIT"
] | null | null | null | python/ad/spectral_outlier.py | kinect59/ad_examples | bf0bb75faa3f713a2efef04b6b093e6a313825af | [
"MIT"
] | null | null | null | import numpy.random as rnd
from sklearn import manifold
from sklearn.ensemble import IsolationForest
from common.gen_samples import *
"""
pythonw -m ad.spectral_outlier
"""
def euclidean_dist(x1, x2):
dist = np.sqrt(np.sum((x1 - x2) ** 2))
return dist
class LabelDiffusion(object):
"""
IMPORTANT: T... | 33.647727 | 99 | 0.577676 | 2,579 | 0.435495 | 0 | 0 | 0 | 0 | 0 | 0 | 1,268 | 0.214117 |
2e71e3d05682a0aebe1f4b9f321ce88d5da677b1 | 5,042 | py | Python | simchain/vm.py | Frank-gh/simchain | 4dec42b6039730e4dcc0068209dd90200ee6b3d3 | [
"Unlicense"
] | 74 | 2018-11-14T02:36:13.000Z | 2022-03-11T08:24:17.000Z | simchain/vm.py | Frank-gh/simchain | 4dec42b6039730e4dcc0068209dd90200ee6b3d3 | [
"Unlicense"
] | null | null | null | simchain/vm.py | Frank-gh/simchain | 4dec42b6039730e4dcc0068209dd90200ee6b3d3 | [
"Unlicense"
] | 35 | 2019-01-16T04:18:24.000Z | 2022-03-21T09:05:12.000Z |
from .logger import logger
from .ecc import convert_pubkey_to_addr,VerifyingKey,sha256d
class Stack(list):
push = list.append
def peek(self):
return self[-1]
class LittleMachine(object):
def __init__(self):
self.stack = Stack()
self._map = {
"OP_ADD": ... | 24.837438 | 76 | 0.527172 | 3,458 | 0.685839 | 0 | 0 | 0 | 0 | 0 | 0 | 898 | 0.178104 |
2e735a5e613348bc55e8ad80f97e09fd450063e0 | 442 | py | Python | ceol/player/migrations/0003_auto_20200722_1728.py | pythify/backend-pithify | ac845bd96769d3cda1e32ea5c141598f0529db19 | [
"MIT"
] | null | null | null | ceol/player/migrations/0003_auto_20200722_1728.py | pythify/backend-pithify | ac845bd96769d3cda1e32ea5c141598f0529db19 | [
"MIT"
] | null | null | null | ceol/player/migrations/0003_auto_20200722_1728.py | pythify/backend-pithify | ac845bd96769d3cda1e32ea5c141598f0529db19 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-22 17:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('player', '0002_auto_20200722_1725'),
]
operations = [
migrations.AlterField(
model_name='album',
name='total_songs',... | 23.263158 | 103 | 0.628959 | 349 | 0.789593 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.257919 |
2e73ac16adb060cc06fc6f0d2d05cbe18736f6a0 | 5,556 | py | Python | bgx/validator-bgx/sawtooth_validator/journal/consensus/consensus_factory.py | sparsov/DGT-Kawartha-demo | edfbc18f2c70e813805ec23c28fbc35bf7866ffc | [
"Apache-2.0"
] | null | null | null | bgx/validator-bgx/sawtooth_validator/journal/consensus/consensus_factory.py | sparsov/DGT-Kawartha-demo | edfbc18f2c70e813805ec23c28fbc35bf7866ffc | [
"Apache-2.0"
] | 10 | 2020-05-12T06:58:15.000Z | 2022-02-26T23:59:35.000Z | bgx/validator-bgx/sawtooth_validator/journal/consensus/consensus_factory.py | DGT-Network/DGT-Mississauga | 52b5f1f4015db2aa7196e727a25b399de5fbf3c3 | [
"Apache-2.0"
] | 1 | 2021-01-12T21:38:01.000Z | 2021-01-12T21:38:01.000Z | # Copyright 2017 NTRLab
#
# 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, softw... | 42.090909 | 145 | 0.667207 | 4,608 | 0.829374 | 0 | 0 | 4,480 | 0.806335 | 0 | 0 | 3,114 | 0.560475 |
2e7700fe88b3734cb3e81c07b67868f5b2c4220d | 19,554 | py | Python | bin/ensemble_aws_accounts_eai_handler.py | nvonkorff/grand_central | ef8630bb1e717ff542903fd1e067e428fafafc2f | [
"MIT"
] | null | null | null | bin/ensemble_aws_accounts_eai_handler.py | nvonkorff/grand_central | ef8630bb1e717ff542903fd1e067e428fafafc2f | [
"MIT"
] | null | null | null | bin/ensemble_aws_accounts_eai_handler.py | nvonkorff/grand_central | ef8630bb1e717ff542903fd1e067e428fafafc2f | [
"MIT"
] | null | null | null | import logging
import os
import sys
import uuid
import splunk.admin as admin
import ensemble_aws_accounts_schema
import urllib
import hashlib
import base_eai_handler
import log_helper
import boto3
import json
if sys.platform == 'win32':
import msvcrt
# Binary mode is required for persistent mode on Windows.
... | 51.730159 | 270 | 0.668763 | 18,881 | 0.965582 | 0 | 0 | 0 | 0 | 0 | 0 | 7,381 | 0.377468 |
2e7726a4553ba265dc7d5e2d5a2ffbce3ef26f43 | 480 | py | Python | tests/invertible_test_case.py | gregunz/invertransforms | 3b0621c567d309ee054115cc90cb188808bd63b2 | [
"BSD-3-Clause"
] | 5 | 2019-10-14T18:56:08.000Z | 2019-10-17T13:50:11.000Z | tests/invertible_test_case.py | gregunz/invertransforms | 3b0621c567d309ee054115cc90cb188808bd63b2 | [
"BSD-3-Clause"
] | 1 | 2021-04-06T18:05:19.000Z | 2021-04-06T18:05:19.000Z | tests/invertible_test_case.py | gregunz/invertransforms | 3b0621c567d309ee054115cc90cb188808bd63b2 | [
"BSD-3-Clause"
] | null | null | null | import random
import unittest
import torch
import invertransforms as T
class InvertibleTestCase(unittest.TestCase):
def setUp(self) -> None:
self.img_size = (256, 320)
self.h, self.w = self.img_size
self.crop_size = (64, 128)
self.img_tensor = torch.randn((1,) + self.img_size).cl... | 24 | 71 | 0.645833 | 404 | 0.841667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e7810efd3616472cfac0aa367ce42b73363d1b5 | 4,162 | py | Python | nicos_sinq/zebra/setups/monochromator.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2021-03-26T10:30:45.000Z | 2021-03-26T10:30:45.000Z | nicos_sinq/zebra/setups/monochromator.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_sinq/zebra/setups/monochromator.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 3 | 2020-08-04T18:35:05.000Z | 2021-04-16T11:22:08.000Z | description = 'Devices for the ZEBRA monochromator'
mota = 'SQ:ZEBRA:mota:'
motb = 'SQ:ZEBRA:motb:'
motd = 'SQ:ZEBRA:motd:'
devices = dict(
mtvl = device('nicos_ess.devices.epics.motor.EpicsMotor',
epicstimeout = 3.0,
description = 'Lower monochromator vertical translation',
motorpv = mota... | 34.97479 | 75 | 0.592023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,598 | 0.38395 |
2e79db4019af9551976d2be7470794d639b1bb48 | 15,886 | py | Python | scripts/loading/ontology/psimi.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 5 | 2015-11-24T23:09:46.000Z | 2019-11-06T17:48:13.000Z | scripts/loading/ontology/psimi.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 188 | 2017-08-28T22:39:03.000Z | 2022-03-02T14:53:46.000Z | scripts/loading/ontology/psimi.py | dougli1sqrd/SGDBackend-Nex2 | 2ecb2436db142cf08c6f2dbab6b115a394116632 | [
"MIT"
] | 7 | 2018-05-13T01:58:07.000Z | 2021-06-25T19:08:33.000Z | import urllib.request, urllib.parse, urllib.error
import logging
import os
from datetime import datetime
import sys
import importlib
importlib.reload(sys) # Reload does the trick!
from src.helpers import upload_file
from scripts.loading.database_session import get_session
from scripts.loading.ontology import read_owl
... | 39.715 | 165 | 0.585295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,913 | 0.183369 |
2e79f7ea432b2b3d219bca9a079a2d06945e6b96 | 5,312 | py | Python | clac_module/listcalc.py | yourback/OfflineDataConversionAndDrawingSoftware | b50cbcf0fba22e536baaf77464c7aab289afc24f | [
"Apache-2.0"
] | null | null | null | clac_module/listcalc.py | yourback/OfflineDataConversionAndDrawingSoftware | b50cbcf0fba22e536baaf77464c7aab289afc24f | [
"Apache-2.0"
] | null | null | null | clac_module/listcalc.py | yourback/OfflineDataConversionAndDrawingSoftware | b50cbcf0fba22e536baaf77464c7aab289afc24f | [
"Apache-2.0"
] | null | null | null | from data_module.get_source_file import *
import numpy as np
class DataCleaner(object):
def __init__(self):
# 图1数据源
self.data_LD = []
self.data_I = []
self.data_LU = []
self.data_T = []
# 图2数据源
self.data_RD = []
self.data_RU = []
# 图3数据源
... | 32.193939 | 79 | 0.515625 | 5,239 | 0.961637 | 0 | 0 | 0 | 0 | 0 | 0 | 1,241 | 0.22779 |
2e7ad10848efe85c68fbc9621bee7802f36c7718 | 100 | py | Python | saleor/request_order/apps.py | AkioSky/FishMart | 1d01d7e79812dc7cccb1b26ffc6457af6104d9f2 | [
"BSD-3-Clause"
] | null | null | null | saleor/request_order/apps.py | AkioSky/FishMart | 1d01d7e79812dc7cccb1b26ffc6457af6104d9f2 | [
"BSD-3-Clause"
] | null | null | null | saleor/request_order/apps.py | AkioSky/FishMart | 1d01d7e79812dc7cccb1b26ffc6457af6104d9f2 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class RequestOrderConfig(AppConfig):
name = 'request_order'
| 16.666667 | 36 | 0.78 | 63 | 0.63 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.15 |
2e7b7593dba3a850dbee118f9ad9b5841c88cc75 | 293 | py | Python | py3_cookbook/_1_data_structure/find_common_keys_in_two_dicts.py | yellowb/ml-sample | 2f283c39d0d7ed4bafc324632100a17da0088237 | [
"MIT"
] | null | null | null | py3_cookbook/_1_data_structure/find_common_keys_in_two_dicts.py | yellowb/ml-sample | 2f283c39d0d7ed4bafc324632100a17da0088237 | [
"MIT"
] | null | null | null | py3_cookbook/_1_data_structure/find_common_keys_in_two_dicts.py | yellowb/ml-sample | 2f283c39d0d7ed4bafc324632100a17da0088237 | [
"MIT"
] | null | null | null | """ Sample to find common keys between 2 dictionaries """
d1 = {
'a': 1,
'b': 2,
'c': 3,
'd': 4
}
d2 = {
'b': 2,
'c': 3,
'd': 4,
'e': 5
}
print(d1.keys() & d2.keys()) # intersection
print(d1.keys() | d2.keys()) # union
print(d1.keys() - d2.keys()) # diff
| 14.65 | 57 | 0.457338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.368601 |
2e7dc647373335b503a34a2d4a35865fb0a8ce24 | 372 | py | Python | testserver/manage.py | akubera/batavia | b56f2a3f54242f81aea3a5a048356a03f0d49494 | [
"BSD-3-Clause"
] | 1 | 2018-05-17T08:46:16.000Z | 2018-05-17T08:46:16.000Z | testserver/manage.py | akubera/batavia | b56f2a3f54242f81aea3a5a048356a03f0d49494 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:39:56.000Z | 2021-06-10T23:39:56.000Z | testserver/manage.py | akubera/batavia | b56f2a3f54242f81aea3a5a048356a03f0d49494 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
if sys.version_info[0] != 3:
sys.stderr.write('Batavia requires Python 3' + os.linesep)
sys.exit(1)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
from django.core.management import execute_from_co... | 23.25 | 66 | 0.693548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.247312 |
2e7ddad188be683aa53d4150da78432b51cf923a | 120 | py | Python | week-6/flask-api-small/scripts/prediction.py | cgsanders/stat418-tools-in-datascience | 4a86fd15386f47d0a59422226b13834bae5a1387 | [
"MIT"
] | 4 | 2019-04-21T08:49:52.000Z | 2019-09-22T14:07:26.000Z | week-6/flask-api-small/scripts/prediction.py | cgsanders/stat418-tools-in-datascience | 4a86fd15386f47d0a59422226b13834bae5a1387 | [
"MIT"
] | 58 | 2019-04-22T15:44:14.000Z | 2019-06-04T19:50:54.000Z | week-6/flask-api-small/scripts/prediction.py | cgsanders/stat418-tools-in-datascience | 4a86fd15386f47d0a59422226b13834bae5a1387 | [
"MIT"
] | 33 | 2019-04-03T01:48:34.000Z | 2021-04-30T06:36:29.000Z | #!/usr/bin/env python3
def predict(dict_values):
x1 = float(dict_values["x"])
y_pred = 2**x1
return y_pred
| 17.142857 | 32 | 0.641667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.208333 |
2e7e0d9b1faef47626882f56fd831cc608dec063 | 118 | py | Python | src/constants.py | masterbluecompact/boardroom-bot | b903038ee5a9183c81f03e45547642a5f4a757cf | [
"MIT"
] | null | null | null | src/constants.py | masterbluecompact/boardroom-bot | b903038ee5a9183c81f03e45547642a5f4a757cf | [
"MIT"
] | null | null | null | src/constants.py | masterbluecompact/boardroom-bot | b903038ee5a9183c81f03e45547642a5f4a757cf | [
"MIT"
] | null | null | null | TELEGRAM_API_TOKEN = '1978689233:AAGsYEAvbN3ZkrA5a77VTO9yc30VSNZs8lQ'
BOT_USERNAME = 'boardroomv1bot'
WEBHOOK_URL = '' | 39.333333 | 69 | 0.847458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.559322 |
2e7e9c74fb34d9d539ee2c2a737c83639c165ce7 | 1,765 | py | Python | aito/utils/_file_utils.py | AitoDotAI/aito-python-tools | 891d433222b04f4ff8a4eeafbb9268516fd215dc | [
"MIT"
] | 6 | 2019-10-16T02:35:06.000Z | 2021-02-03T13:39:43.000Z | aito/utils/_file_utils.py | AitoDotAI/aito-python-tools | 891d433222b04f4ff8a4eeafbb9268516fd215dc | [
"MIT"
] | 23 | 2020-03-17T13:16:02.000Z | 2021-04-23T15:09:51.000Z | aito/utils/_file_utils.py | AitoDotAI/aito-python-tools | 891d433222b04f4ff8a4eeafbb9268516fd215dc | [
"MIT"
] | null | null | null | import gzip
import json
import os
import shutil
from os import PathLike
from pathlib import Path
from typing import Dict, List
import ndjson
def check_file_is_gzipped(file_path: PathLike):
file_path = Path(file_path)
if file_path.suffixes[-2:] != ['.ndjson', '.gz']:
return False
else:
ret... | 30.964912 | 99 | 0.689518 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.090085 |
2e80dd7978a3db15732cccc6a8f417efe3965c4c | 946 | py | Python | vol4/156.py | EdisonAlgorithms/ProjectEuler | 95025ede2c92dbd3ed2dccc0f8a97e9a3db95ef0 | [
"MIT"
] | null | null | null | vol4/156.py | EdisonAlgorithms/ProjectEuler | 95025ede2c92dbd3ed2dccc0f8a97e9a3db95ef0 | [
"MIT"
] | null | null | null | vol4/156.py | EdisonAlgorithms/ProjectEuler | 95025ede2c92dbd3ed2dccc0f8a97e9a3db95ef0 | [
"MIT"
] | null | null | null | import itertools
import time
def digits(n):
while n:
yield n % 10
n /= 10
def pows(b):
x = 1
while True:
yield x
x *= 10
def f(n, d):
def g(d0, m):
if d0 < d:
return n / (m * 10) * m
elif d0 == d:
return n / (m * 10) * m + n % m ... | 20.12766 | 73 | 0.403805 | 0 | 0 | 134 | 0.141649 | 0 | 0 | 0 | 0 | 19 | 0.020085 |
2e82064a46395a03f52d064607c7f8ac759527bc | 5,770 | py | Python | codelibproj/codelibapp/migrations/0001_initial.py | ahegashira/CodeLibrary | 4dca1eb8ec0c274e8dfb1db62a97920703df3240 | [
"Apache-2.0"
] | null | null | null | codelibproj/codelibapp/migrations/0001_initial.py | ahegashira/CodeLibrary | 4dca1eb8ec0c274e8dfb1db62a97920703df3240 | [
"Apache-2.0"
] | null | null | null | codelibproj/codelibapp/migrations/0001_initial.py | ahegashira/CodeLibrary | 4dca1eb8ec0c274e8dfb1db62a97920703df3240 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2 on 2019-06-04 18:37
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),
... | 49.741379 | 132 | 0.564991 | 5,605 | 0.971404 | 0 | 0 | 0 | 0 | 0 | 0 | 1,092 | 0.189255 |
2e84df5100eb34e590dde3692727724451d660e6 | 186 | py | Python | congregation/codegen/python/libs/external/__init__.py | CCD-HRI/congregation | a552856b03a64a4295792184107c4e529ca3f4ae | [
"MIT"
] | 3 | 2020-10-05T16:30:15.000Z | 2021-01-22T13:38:02.000Z | congregation/codegen/python/libs/external/__init__.py | multiparty/congregation | a552856b03a64a4295792184107c4e529ca3f4ae | [
"MIT"
] | null | null | null | congregation/codegen/python/libs/external/__init__.py | multiparty/congregation | a552856b03a64a4295792184107c4e529ca3f4ae | [
"MIT"
] | 1 | 2021-08-13T07:28:30.000Z | 2021-08-13T07:28:30.000Z | from congregation.codegen.python.libs.external.unary import *
from congregation.codegen.python.libs.external.binary import *
from congregation.codegen.python.libs.external.nary import *
| 46.5 | 62 | 0.83871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e894c57c3b59c59676e670168876de12735924c | 9,107 | py | Python | libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v7.py | Thinklab-SJTU/DCL_RetinaNet_Tensorflow | 1d14c9800c3eb1975e8832978f7a263783d171ec | [
"Apache-2.0"
] | 36 | 2020-11-19T07:23:42.000Z | 2022-03-30T03:35:57.000Z | libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v7.py | Thinklab-SJTU/DCL_RetinaNet_Tensorflow | 1d14c9800c3eb1975e8832978f7a263783d171ec | [
"Apache-2.0"
] | 4 | 2021-01-30T09:49:10.000Z | 2021-12-05T12:49:11.000Z | libs/configs/DOTA1.0/dota_train/cfgs_res50_dotatrain_dcl_v7.py | Thinklab-SJTU/DCL_RetinaNet_Tensorflow | 1d14c9800c3eb1975e8832978f7a263783d171ec | [
"Apache-2.0"
] | 6 | 2020-11-23T07:54:47.000Z | 2021-07-09T07:20:15.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import os
import tensorflow as tf
import math
"""
BCL + OMEGA = 180 / 8.
{'0.7': {'tennis-court': 0.9030146006529745, 'ship': 0.5247147197113373, 'basketball-court': 0.5197288166873728, 'small-vehicle': 0.3876947548806594, 'harbo... | 70.596899 | 581 | 0.726694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,703 | 0.736027 |
2e8a31039b719e32fd9540d0b31a493f407bf660 | 3,081 | py | Python | src/korth_spirit/configuration/input_configuration.py | Korth-Spirit/Korth-Spirit | 1bdaf6f46a4665f4d2a312e61e57d853b9dd5d84 | [
"MIT"
] | null | null | null | src/korth_spirit/configuration/input_configuration.py | Korth-Spirit/Korth-Spirit | 1bdaf6f46a4665f4d2a312e61e57d853b9dd5d84 | [
"MIT"
] | null | null | null | src/korth_spirit/configuration/input_configuration.py | Korth-Spirit/Korth-Spirit | 1bdaf6f46a4665f4d2a312e61e57d853b9dd5d84 | [
"MIT"
] | null | null | null | # Copyright (c) 2021-2022 Johnathan P. Irvin
#
# 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, publ... | 31.762887 | 72 | 0.612788 | 1,946 | 0.631613 | 0 | 0 | 1,886 | 0.612139 | 0 | 0 | 2,120 | 0.688088 |
2e8a599c94ab88b6f514655190020c0bde169a1f | 586 | py | Python | data/data.py | owrior/snakeMach | 1af8ca51badd3e23201ef5cc873e9179ee01c058 | [
"MIT"
] | null | null | null | data/data.py | owrior/snakeMach | 1af8ca51badd3e23201ef5cc873e9179ee01c058 | [
"MIT"
] | null | null | null | data/data.py | owrior/snakeMach | 1af8ca51badd3e23201ef5cc873e9179ee01c058 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.datasets import make_blobs
from sklearn.preprocessing import normalize
class TestData:
def __init__(self, dimensions, points) -> None:
self.dimensions = dimensions
self.points = points
def linearly_separable(self) -> np.array:
x, y = make_blobs(
... | 25.478261 | 70 | 0.583618 | 480 | 0.819113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e8d37dec89478528db6577f4a7c15427ede6234 | 7,013 | py | Python | sahara/tests/unit/plugins/mapr/utils/test_func_utils.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | sahara/tests/unit/plugins/mapr/utils/test_func_utils.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | sahara/tests/unit/plugins/mapr/utils/test_func_utils.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014, MapR Technologies
#
# 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 agree... | 34.546798 | 76 | 0.592756 | 6,326 | 0.902039 | 0 | 0 | 0 | 0 | 0 | 0 | 1,114 | 0.158848 |
2e8e0133f4cc67b5978f48ca2c017cf170b948d8 | 609 | py | Python | astronat/phot/MegaCam_PanSTARRS/MCgen2_PS1/Mixed_MegaCamGen2_PS1.py | nstarman/astronat | 9e1f41c6de1ca6adbd2bf99414a4c9b61838abf6 | [
"BSD-3-Clause"
] | 1 | 2020-11-20T18:25:26.000Z | 2020-11-20T18:25:26.000Z | astronat/phot/MegaCam_PanSTARRS/MCgen2_PS1/Mixed_MegaCamGen2_PS1.py | nstarman/astronat | 9e1f41c6de1ca6adbd2bf99414a4c9b61838abf6 | [
"BSD-3-Clause"
] | 3 | 2020-09-09T06:10:20.000Z | 2020-09-16T05:56:10.000Z | astronat/phot/MegaCam_PanSTARRS/MCgen2_PS1/Mixed_MegaCamGen2_PS1.py | nstarman/astronat | 9e1f41c6de1ca6adbd2bf99414a4c9b61838abf6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Mega-Cam gen2 band and PanSTARRS 1 band Mixed Functions."""
__author__ = "Nathaniel Starkman"
__copyright__ = "Copyright 2018, "
__credits__ = [
"http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/en/megapipe/docs/filt.html"
]
__all__ = []
##################################################... | 23.423077 | 77 | 0.320197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.858785 |
2e8e056676584d6baf6b9485f76064371025e1cf | 8,405 | py | Python | docs/rips/tests/test_cases.py | OPM/ResInsight-UserDocumentation | 2af2c3a5ef297c0061d842944360a83bf8e49c36 | [
"MIT"
] | 1 | 2020-04-25T21:24:45.000Z | 2020-04-25T21:24:45.000Z | docs/rips/tests/test_cases.py | OPM/ResInsight-UserDocumentation | 2af2c3a5ef297c0061d842944360a83bf8e49c36 | [
"MIT"
] | 7 | 2020-02-11T07:42:10.000Z | 2020-09-28T17:18:01.000Z | docs/rips/tests/test_cases.py | OPM/ResInsight-UserDocumentation | 2af2c3a5ef297c0061d842944360a83bf8e49c36 | [
"MIT"
] | 2 | 2020-04-02T09:33:45.000Z | 2020-04-09T19:44:53.000Z | import sys
import os
import math
import pytest
import grpc
import tempfile
sys.path.insert(1, os.path.join(sys.path[0], "../../"))
import rips
import dataroot
def test_Launch(rips_instance, initialize_test):
assert rips_instance is not None
def test_EmptyProject(rips_instance, initialize_test):
cases = ri... | 37.690583 | 87 | 0.723974 | 0 | 0 | 0 | 0 | 2,252 | 0.267936 | 0 | 0 | 1,334 | 0.158715 |
2e8e45f33735173ba981879373ba6646052dcfb9 | 104 | py | Python | fantasyanalyzer/main/main.py | dmowen2/FantasyAnalyzer | b113615ac711560718c595eeef3e771a2a4e2a69 | [
"MIT"
] | null | null | null | fantasyanalyzer/main/main.py | dmowen2/FantasyAnalyzer | b113615ac711560718c595eeef3e771a2a4e2a69 | [
"MIT"
] | null | null | null | fantasyanalyzer/main/main.py | dmowen2/FantasyAnalyzer | b113615ac711560718c595eeef3e771a2a4e2a69 | [
"MIT"
] | null | null | null | #basic file to run the program
import mainApp
startprogram = mainApp.commandLine()
startprogram.run()
| 14.857143 | 36 | 0.788462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.288462 |
2e8e8e12d320aec8142afc42dd8fc9a16e93586d | 6,103 | py | Python | iamim_gt_planner.py | cernodile/py-deltaparser | a1767e0429d8bf4e12364c4dcce41e7433065049 | [
"MIT"
] | 2 | 2021-04-21T22:05:50.000Z | 2021-08-14T21:45:03.000Z | iamim_gt_planner.py | cernodile/py-deltaparser | a1767e0429d8bf4e12364c4dcce41e7433065049 | [
"MIT"
] | 1 | 2021-06-11T14:18:23.000Z | 2021-06-11T15:16:02.000Z | iamim_gt_planner.py | cernodile/py-deltaparser | a1767e0429d8bf4e12364c4dcce41e7433065049 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
@cernodile/py-deltaparser
A Python script to convert Growtopia's items.dat to human-readable indexable format.
File: iamim_gt_planner.py
Purpose: To generate data file for Iamim's GT Planner
License: See LICENSE.txt in project root directory.
"""
import csv
import item_parser
def filter(item):
"... | 35.690058 | 203 | 0.636081 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,497 | 0.245289 |
2e8f0b81bbd9561984ac38ea8dfc729ccec17dd2 | 236 | py | Python | organizerui/model.py | angusmacdonald/gopro-organizer | 6fc77fab231d016186b4bb4df5e24ecf039b72d9 | [
"MIT"
] | 6 | 2016-04-23T23:44:10.000Z | 2020-10-30T07:35:19.000Z | organizerui/model.py | angusmacdonald/gopro-organizer | 6fc77fab231d016186b4bb4df5e24ecf039b72d9 | [
"MIT"
] | null | null | null | organizerui/model.py | angusmacdonald/gopro-organizer | 6fc77fab231d016186b4bb4df5e24ecf039b72d9 | [
"MIT"
] | null | null | null | import sys
sys.path.append('')
from organizercore import organizer
class OrganizerModel:
def start_processing(self, input_dir, output_dir, settings):
organizer.Organizer(settings).process_gopro_dir(input_dir, output_dir)
| 23.6 | 78 | 0.783898 | 166 | 0.70339 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.008475 |
2e903b0c067785052b3d3529823e93eb770c9d80 | 2,959 | py | Python | tests/test_to_human.py | AleCandido/human_dates | 56bb10587b69e84b27a27117b2ecb3b1df09a028 | [
"MIT"
] | 1 | 2020-05-11T12:47:23.000Z | 2020-05-11T12:47:23.000Z | tests/test_to_human.py | AleCandido/human_dates | 56bb10587b69e84b27a27117b2ecb3b1df09a028 | [
"MIT"
] | 9 | 2020-04-30T13:43:30.000Z | 2020-10-19T15:32:54.000Z | tests/test_to_human.py | AleCandido/human_dates | 56bb10587b69e84b27a27117b2ecb3b1df09a028 | [
"MIT"
] | null | null | null | import datetime as dt
import pytest
import human_dates
class TestTimeAgoInWords:
"""
test time_ago_in_words function
"""
@pytest.fixture(autouse=True)
def _import_templates(self, templates):
"""
import templates from conftest local plugin
"""
self.templat... | 30.505155 | 82 | 0.559649 | 2,899 | 0.979723 | 358 | 0.120987 | 580 | 0.196012 | 0 | 0 | 434 | 0.146671 |
2e9074bb1cba53266c6974290d0d2403b768e6ea | 3,124 | py | Python | network_anomaly/code/Basic_features/test.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | 1 | 2022-01-18T01:53:34.000Z | 2022-01-18T01:53:34.000Z | network_anomaly/code/Basic_features/test.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | null | null | null | network_anomaly/code/Basic_features/test.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
import csv
import collections
from pandas import DataFrame as df
def test(data):
print(data['TIME'])
return 100
# data['TIME'] = data['TIME'].astype('float')
# data['TIME'] = data['TIME'].astype('int')
#
# # IP, PORT, IP_PORT 데이터셋 생성 -> new_data
# n... | 28.925926 | 88 | 0.572983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,214 | 0.924626 |
5ce8437b0fec0991f67a078f2016c53fe445b831 | 24,331 | py | Python | security_monkey/auditor.py | bungoume/security_monkey | 90c02638a315c78535869ab71a8859d17e011a6a | [
"Apache-2.0"
] | null | null | null | security_monkey/auditor.py | bungoume/security_monkey | 90c02638a315c78535869ab71a8859d17e011a6a | [
"Apache-2.0"
] | null | null | null | security_monkey/auditor.py | bungoume/security_monkey | 90c02638a315c78535869ab71a8859d17e011a6a | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 43.063717 | 211 | 0.586371 | 22,914 | 0.941762 | 0 | 0 | 0 | 0 | 0 | 0 | 5,711 | 0.234721 |
5ce9c84ffdd6672839d34427b02aa2894b9eec7a | 16,473 | py | Python | rst2reveal/Parser.py | rartino/rst2reveal | c31a0939275f26219aaa19ce4e55c3c08491aac8 | [
"MIT"
] | null | null | null | rst2reveal/Parser.py | rartino/rst2reveal | c31a0939275f26219aaa19ce4e55c3c08491aac8 | [
"MIT"
] | null | null | null | rst2reveal/Parser.py | rartino/rst2reveal | c31a0939275f26219aaa19ce4e55c3c08491aac8 | [
"MIT"
] | null | null | null | try:
import locale
locale.setlocale(locale.LC_ALL, '')
except:
pass
import os, sys, codecs
import docutils.core
from .RevealTranslator import RST2RevealTranslator, RST2RevealWriter
# Import custom directives
from .TwoColumnsDirective import *
from .PygmentsDirective import *
from .VideoDirective import *... | 40.375 | 169 | 0.541249 | 15,804 | 0.959388 | 0 | 0 | 0 | 0 | 0 | 0 | 9,378 | 0.569295 |
5cea000fbf7f6010b16ca5c88addb7c29ae330a8 | 25 | py | Python | src/__init__.py | dmitrijbozhkov/cloudcourseproject | 3e62a5fafef418c1c058587abc5615b03fc2325a | [
"Apache-2.0"
] | null | null | null | src/__init__.py | dmitrijbozhkov/cloudcourseproject | 3e62a5fafef418c1c058587abc5615b03fc2325a | [
"Apache-2.0"
] | 7 | 2021-02-08T20:41:23.000Z | 2022-03-12T00:21:37.000Z | src/__init__.py | dmitrijbozhkov/cloudcourseproject | 3e62a5fafef418c1c058587abc5615b03fc2325a | [
"Apache-2.0"
] | null | null | null | """ Application files """ | 25 | 25 | 0.64 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 1 |
5cecc676be7c87ec7a461eb8220ca39b7ad15690 | 235 | py | Python | PyMOTW/source/webbrowser/webbrowser_get.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | PyMOTW/source/webbrowser/webbrowser_get.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:52:03.000Z | 2020-07-18T04:18:01.000Z | PyMOTW/source/webbrowser/webbrowser_get.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 2 | 2021-03-06T04:28:32.000Z | 2021-03-06T04:59:17.000Z | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""
"""
#end_pymotw_header
import webbrowser
b = webbrowser.get('lynx')
b.open('https://docs.python.org/3/library/webbrowser.html')
| 16.785714 | 59 | 0.710638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.757447 |
5ced01ac9ef8ae3d7716b3b971d1835e202f6024 | 385 | py | Python | notebooks/solutions/01-ex04-solutions.py | tramposh-olo/ml-workshop-intermediate-2-of-2 | a9d81d760f875ff67796190f95818a0f4f0f5d6b | [
"MIT"
] | null | null | null | notebooks/solutions/01-ex04-solutions.py | tramposh-olo/ml-workshop-intermediate-2-of-2 | a9d81d760f875ff67796190f95818a0f4f0f5d6b | [
"MIT"
] | null | null | null | notebooks/solutions/01-ex04-solutions.py | tramposh-olo/ml-workshop-intermediate-2-of-2 | a9d81d760f875ff67796190f95818a0f4f0f5d6b | [
"MIT"
] | null | null | null | from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import r2_score
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_absolute_error
rf = RandomForestRegressor(random_state=42)
rf.fit(X_train, y_train)
rf_pred = rf.predict(X_test)
r2_score(y_test, rf_pred)
mean_squa... | 24.0625 | 50 | 0.844156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5cedb3c2eba19bceedfcaed437eaaaba8aec1a1e | 400 | py | Python | app/api/atleta/migrations/0008_atleta_senha.py | gahhhenrikk/gerenciador-de-equipes | 1418a9ebae6e9b636b4597af9596206aa6cf75c2 | [
"MIT"
] | 1 | 2020-08-13T20:59:33.000Z | 2020-08-13T20:59:33.000Z | app/api/atleta/migrations/0008_atleta_senha.py | AlbericoD/gerenciador-de-equipes | e6e7d084e5980c4ef05a46e0bfa4b70b13fcca4e | [
"MIT"
] | 19 | 2019-09-03T22:49:45.000Z | 2022-02-26T20:06:12.000Z | app/api/atleta/migrations/0008_atleta_senha.py | gahhhenrikk/gerenciador-de-equipes | 1418a9ebae6e9b636b4597af9596206aa6cf75c2 | [
"MIT"
] | 2 | 2019-09-03T20:16:34.000Z | 2019-09-09T12:35:14.000Z | # Generated by Django 2.2.7 on 2019-11-11 23:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('atleta', '0007_remove_atleta_treinador'),
]
operations = [
migrations.AddField(
model_name='atleta',
name='senha',
... | 21.052632 | 63 | 0.6 | 307 | 0.7675 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.255 |
5cee76e061dea1eed3dca0e1ad8fc1077c7c5235 | 214 | py | Python | rameniaapp/forms/create_list.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/forms/create_list.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/forms/create_list.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | from django import forms
from django.forms.widgets import TextInput
class ListCreateForm(forms.Form):
list_name = forms.CharField(label="Name", max_length=60, widget=TextInput(attrs={'class':'form-control'}))
| 35.666667 | 110 | 0.775701 | 144 | 0.672897 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.126168 |
5cee8d9dc6ecef33153612d1cf40e03aa8fb60af | 10,656 | py | Python | toqnets/nn/nltl/functional.py | C-SUNSHINE/TOQ-Nets-PyTorch-Release | 05e06bf633fb3c6b610dda9a5126ecd7af1db02f | [
"MIT"
] | 6 | 2021-08-24T21:46:01.000Z | 2022-03-09T14:34:05.000Z | toqnets/nn/nltl/functional.py | vacancy/TOQ-Nets-PyTorch-Release | 53a712be28e2ecf8d2e04a9f71a2d7e8db5430e1 | [
"MIT"
] | null | null | null | toqnets/nn/nltl/functional.py | vacancy/TOQ-Nets-PyTorch-Release | 53a712be28e2ecf8d2e04a9f71a2d7e8db5430e1 | [
"MIT"
] | 2 | 2021-08-23T03:06:20.000Z | 2021-09-30T14:17:14.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# File : functional.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 04/15/2020
#
# This file is part of TOQ-Nets-PyTorch.
# Distributed under terms of the MIT license.
from typing import List
import jactorch
import torch
from jacinle.utils.enum im... | 41.142857 | 152 | 0.62866 | 217 | 0.020364 | 0 | 0 | 0 | 0 | 0 | 0 | 2,812 | 0.263889 |
5cef3a3627a98fccd21ed376ae079a30c30f5f8d | 194 | py | Python | curso em video/python/mundo 3/aula 21/aula 21.py | KenzoDezotti/cursoemvideo | 6eba03e67192f7384092192ed2cc1a8e59efd9b9 | [
"MIT"
] | null | null | null | curso em video/python/mundo 3/aula 21/aula 21.py | KenzoDezotti/cursoemvideo | 6eba03e67192f7384092192ed2cc1a8e59efd9b9 | [
"MIT"
] | null | null | null | curso em video/python/mundo 3/aula 21/aula 21.py | KenzoDezotti/cursoemvideo | 6eba03e67192f7384092192ed2cc1a8e59efd9b9 | [
"MIT"
] | null | null | null | def teste(b):
global a
b += 4
a=8
c=2
print(a)
print(b)
print(c)
#------------------------------------
#funcionamento do comando global
a=5
print(a)
teste(6)
print(a) | 13.857143 | 37 | 0.453608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.35567 |
5cf060a195dbf7d7e608526fbe61c86808f684c4 | 598 | py | Python | etcdb/execute/dml/use.py | box/etcdb | 0f27846a0ca13efff9750b97a38939f66172debc | [
"Apache-2.0"
] | 12 | 2016-10-25T18:03:49.000Z | 2019-06-27T13:20:22.000Z | etcdb/execute/dml/use.py | box/etcdb | 0f27846a0ca13efff9750b97a38939f66172debc | [
"Apache-2.0"
] | 30 | 2016-10-20T23:27:09.000Z | 2018-12-06T17:23:59.000Z | etcdb/execute/dml/use.py | box/etcdb | 0f27846a0ca13efff9750b97a38939f66172debc | [
"Apache-2.0"
] | 4 | 2016-10-20T23:24:48.000Z | 2022-03-01T09:59:29.000Z | """Implement USE query."""
from pyetcd import EtcdKeyNotFound
from etcdb import OperationalError
def use_database(etcd_client, tree):
"""
Return database name if it exists or raise exception.
:param etcd_client: etcd client
:type etcd_client: pyetcd.client.Client
:param tree: Parsing tree.
:... | 26 | 65 | 0.682274 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 342 | 0.571906 |
5cf0ea4689aa7bc6979159d92505dd9ac4c6f33a | 598 | py | Python | main.py | dminglv/covid19 | 4753f1574c9035c5780c6669e5a9bd3812a4bc10 | [
"MIT"
] | null | null | null | main.py | dminglv/covid19 | 4753f1574c9035c5780c6669e5a9bd3812a4bc10 | [
"MIT"
] | null | null | null | main.py | dminglv/covid19 | 4753f1574c9035c5780c6669e5a9bd3812a4bc10 | [
"MIT"
] | null | null | null | from libs.apis import getCountryInfo, getCountries, getCountriesNames
from libs.charts import visualize
def main():
arr = []
number = 10
# Get top 10 countries
countries = getCountries(number)
countries_names = getCountriesNames(number)
for i in range(len(countries)):
country = coun... | 19.290323 | 69 | 0.623746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.078595 |
5cf19f197631f63c8d9513d8b9abb97666915389 | 1,230 | py | Python | authkit/authenticate/sso/__init__.py | bobrock/AuthKit | ba82501d9dff699be9eef33266aecd03d016cec2 | [
"MIT"
] | null | null | null | authkit/authenticate/sso/__init__.py | bobrock/AuthKit | ba82501d9dff699be9eef33266aecd03d016cec2 | [
"MIT"
] | null | null | null | authkit/authenticate/sso/__init__.py | bobrock/AuthKit | ba82501d9dff699be9eef33266aecd03d016cec2 | [
"MIT"
] | 1 | 2020-06-24T19:20:13.000Z | 2020-06-24T19:20:13.000Z | """Authenticate Single Sign-On Middleware
==============
Single-Sign On
==============
About SSO
---------
Single sign on is a session/user authentication process that allows a user to
provide his or her credentials once in order to access multiple applications.
The single sign on authenticates the user to access a... | 34.166667 | 81 | 0.756911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,229 | 0.999187 |
5cf285d186a6317622d28fa8ce936054a9456a47 | 4,158 | py | Python | app/server.py | DavidRalph/search-mendeley | 64cb3aa353d4a5571db0fb46a5b46b928af1c6b0 | [
"Apache-2.0"
] | 2 | 2020-05-15T02:06:46.000Z | 2020-05-15T02:14:52.000Z | app/server.py | DavidRalph/search-mendeley | 64cb3aa353d4a5571db0fb46a5b46b928af1c6b0 | [
"Apache-2.0"
] | 1 | 2018-05-16T12:55:14.000Z | 2018-05-18T14:29:14.000Z | app/server.py | DavidRalph/search-mendeley | 64cb3aa353d4a5571db0fb46a5b46b928af1c6b0 | [
"Apache-2.0"
] | 1 | 2020-05-15T02:14:55.000Z | 2020-05-15T02:14:55.000Z | from flask import Flask, redirect, render_template, request, session
import yaml
from mendeley import Mendeley
from mendeley.session import MendeleySession
with open('config.yml') as f:
config = yaml.load(f)
REDIRECT_URI = 'http://localhost:5000/oauth'
app = Flask(__name__)
app.debug = True
app.secret_key = co... | 26.316456 | 86 | 0.664262 | 0 | 0 | 0 | 0 | 3,585 | 0.862193 | 0 | 0 | 739 | 0.17773 |
5cf2cde51e543e36e937cb094f4bc31af4b0de5a | 3,429 | py | Python | lib/googlecloudsdk/command_lib/container/gkemulticloud/endpoint_util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/command_lib/container/gkemulticloud/endpoint_util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/container/gkemulticloud/endpoint_util.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. 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... | 34.989796 | 156 | 0.748031 | 0 | 0 | 1,168 | 0.340624 | 1,195 | 0.348498 | 0 | 0 | 1,371 | 0.399825 |
5cf2e08da44d6148a770dc0050be540bbf3f5a61 | 3,025 | py | Python | util/mathUtil.py | herougan/TradeHunter | 1270a1d9807d1f2107db6bc78b98b584431840cc | [
"MIT"
] | null | null | null | util/mathUtil.py | herougan/TradeHunter | 1270a1d9807d1f2107db6bc78b98b584431840cc | [
"MIT"
] | null | null | null | util/mathUtil.py | herougan/TradeHunter | 1270a1d9807d1f2107db6bc78b98b584431840cc | [
"MIT"
] | 1 | 2022-02-09T08:45:05.000Z | 2022-02-09T08:45:05.000Z | from math import floor
import talib
from util.dataRetrievalUtil import try_stdev
from util.langUtil import try_mean, try_int
def quartile_out(quartile, data):
"""Takes out extremities"""
pass
def moving_average(period, data):
avg = []
if len(data) < period:
return avg
for i in range(pe... | 23.632813 | 97 | 0.597686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.170909 |
5cf5f3ec8ad78eb84a1e2c101567b1b3b4dc3a79 | 5,057 | py | Python | 09-gui/terremoto_antiguo.py | Agc96/matplotlib-examples | bc2db2d14c1822b05f99356ebf538ebcd14f262a | [
"MIT"
] | null | null | null | 09-gui/terremoto_antiguo.py | Agc96/matplotlib-examples | bc2db2d14c1822b05f99356ebf538ebcd14f262a | [
"MIT"
] | null | null | null | 09-gui/terremoto_antiguo.py | Agc96/matplotlib-examples | bc2db2d14c1822b05f99356ebf538ebcd14f262a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Oct 25 18:38:21 2019
@author: Agutierrez
"""
# -*- coding: utf-8 -*-
"""
Interfaz gráfica para el movimiento armónico de un edificio, de forma similar
a un terremoto.
"""
import numpy as np
import tkinter as tk
from matplotlib.animation import FuncAnimation
from matplotlib.... | 36.381295 | 87 | 0.693692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,851 | 0.364442 |
5cf67afad445851293cf259134cd16fdc9dcfa88 | 1,914 | py | Python | app/tests/test_questions.py | Gichia/questioner-v2 | b93ffdc521e364c191b770bf1bcb93964e7fa1f3 | [
"MIT"
] | null | null | null | app/tests/test_questions.py | Gichia/questioner-v2 | b93ffdc521e364c191b770bf1bcb93964e7fa1f3 | [
"MIT"
] | 6 | 2019-01-22T17:35:28.000Z | 2022-01-13T01:01:48.000Z | app/tests/test_questions.py | Gichia/questioner-v2 | b93ffdc521e364c191b770bf1bcb93964e7fa1f3 | [
"MIT"
] | null | null | null | """File to test all meetup endpoints"""
import os
import psycopg2 as pg2
import json
from app.tests.basetest import BaseTest
data = {
"title": "Test Title",
"body": "body"
}
comment = {
"comment": "Comment 1"
}
class TestQuestions(BaseTest):
""" Class to test all user endpoints """
def test_post_ques... | 28.147059 | 67 | 0.636886 | 1,692 | 0.884013 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.369906 |
5cf7844c0843b1293636cf8069df2f14c752925e | 392 | py | Python | coinbase_commerce/aio/api_resources/base/create_api_resource.py | nkoshell/coinbase-commerce-python | 94dc57951ac897ffbc7861dc909f413028d6a0b9 | [
"Apache-2.0"
] | null | null | null | coinbase_commerce/aio/api_resources/base/create_api_resource.py | nkoshell/coinbase-commerce-python | 94dc57951ac897ffbc7861dc909f413028d6a0b9 | [
"Apache-2.0"
] | null | null | null | coinbase_commerce/aio/api_resources/base/create_api_resource.py | nkoshell/coinbase-commerce-python | 94dc57951ac897ffbc7861dc909f413028d6a0b9 | [
"Apache-2.0"
] | null | null | null | from coinbase_commerce import util
from . import APIResource
__all__ = (
'CreateAPIResource',
)
class CreateAPIResource(APIResource):
"""
Create operations mixin
"""
@classmethod
async def create(cls, **params):
response = await cls._api_client.post(cls.RESOURCE_PATH, data=params)
... | 21.777778 | 77 | 0.706633 | 288 | 0.734694 | 0 | 0 | 201 | 0.512755 | 184 | 0.469388 | 58 | 0.147959 |
5cf7956415ed6ed6ed0b04f303733e9e61d8fd09 | 3,139 | py | Python | src/torspray/modules/node.py | gergelykalman/torspray | a84c903b71da8c87e9e22d9bce123aaf6797abe8 | [
"MIT"
] | 11 | 2022-02-27T22:19:52.000Z | 2022-03-18T19:57:06.000Z | src/torspray/modules/node.py | gergelykalman/torspray | a84c903b71da8c87e9e22d9bce123aaf6797abe8 | [
"MIT"
] | null | null | null | src/torspray/modules/node.py | gergelykalman/torspray | a84c903b71da8c87e9e22d9bce123aaf6797abe8 | [
"MIT"
] | null | null | null | import paramiko
from .config import CONFIG
class NodeAuthException(Exception):
pass
class NodeTimeoutException(Exception):
pass
# TODO:
# - connection management should be improved, particularly unused connections
# - what happens if connection is lost? this should be handled gracefully
class Node:
d... | 29.895238 | 114 | 0.638738 | 2,926 | 0.932144 | 0 | 0 | 0 | 0 | 0 | 0 | 490 | 0.156101 |
5cf85cc05d2e35117fbd77e06d0033570013d07b | 1,676 | py | Python | tests/test_texture.py | alTeska/ratcave | 954d638544330970c74532339b6696f7ec6376db | [
"MIT"
] | null | null | null | tests/test_texture.py | alTeska/ratcave | 954d638544330970c74532339b6696f7ec6376db | [
"MIT"
] | null | null | null | tests/test_texture.py | alTeska/ratcave | 954d638544330970c74532339b6696f7ec6376db | [
"MIT"
] | null | null | null | from ratcave import texture
import pytest
@pytest.fixture
def tex():
return texture.Texture()
@pytest.fixture
def cubetex():
return texture.TextureCube()
@pytest.fixture
def depthtex():
return texture.DepthTexture()
def test_texture_attributes_created():
old_id = 0
for idx, (w, h) in enumerate([... | 29.403509 | 73 | 0.701074 | 0 | 0 | 0 | 0 | 183 | 0.109189 | 0 | 0 | 244 | 0.145585 |
5cf90931f0e1b598361245b75fb7cb9889936a8b | 1,829 | py | Python | kaggle_environments/envs/identity/identity.py | hubcity/kaggle-environments | 7fe29d7ed96f9d910cbf367f26663a9a8440bfd9 | [
"Apache-2.0"
] | null | null | null | kaggle_environments/envs/identity/identity.py | hubcity/kaggle-environments | 7fe29d7ed96f9d910cbf367f26663a9a8440bfd9 | [
"Apache-2.0"
] | null | null | null | kaggle_environments/envs/identity/identity.py | hubcity/kaggle-environments | 7fe29d7ed96f9d910cbf367f26663a9a8440bfd9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Kaggle Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 25.760563 | 80 | 0.669218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 713 | 0.389831 |
5cfa55d58decf3e1c5433b4c930ab763da369af0 | 392 | py | Python | api/app.py | loudest/vision_zero | 91b094d864fabedbaa56cb9d1639aa75aa19bb00 | [
"MIT"
] | 2 | 2015-03-25T00:51:45.000Z | 2015-06-18T10:54:24.000Z | api/app.py | loudest/vision_zero | 91b094d864fabedbaa56cb9d1639aa75aa19bb00 | [
"MIT"
] | null | null | null | api/app.py | loudest/vision_zero | 91b094d864fabedbaa56cb9d1639aa75aa19bb00 | [
"MIT"
] | null | null | null | #!flask/bin/python
from flask import Flask, jsonify
import requests
app = Flask(__name__)
@app.route('/')
def index():
return "Hello, World!"
@app.route('/signed_data', methods=['GET'])
def signed_map():
r = requests.get('http://data.seattle.gov/resource/kb3s-zi3s.json')
json_data = r.json()
return jsonify({... | 18.666667 | 69 | 0.683673 | 0 | 0 | 0 | 0 | 245 | 0.625 | 0 | 0 | 120 | 0.306122 |
5cfb44436bfafdbb15a5fdebd26adcefad3628c4 | 1,809 | py | Python | Ago-Dic-2021/valera-rangel-pablo/Practica 3/test_calculator_pytest.py | AnhellO/DAS_Sistemas | 07b4eca78357d02d225d570033d05748d91383e3 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2021/valera-rangel-pablo/Practica 3/test_calculator_pytest.py | AnhellO/DAS_Sistemas | 07b4eca78357d02d225d570033d05748d91383e3 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2021/valera-rangel-pablo/Practica 3/test_calculator_pytest.py | AnhellO/DAS_Sistemas | 07b4eca78357d02d225d570033d05748d91383e3 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | import pytest
from calculator import *
@pytest.mark.parametrize("input_a, input_b, expected_result", [
(-5, 2, 'Imposible Raiz de un Negativo')
])
def testRaizDeNegativo(input_a, input_b, expected_result):
assert Calculator(input_a, input_b).raiz() == expected_result
@pytest.mark.parametrize("input_a, input... | 30.661017 | 75 | 0.739635 | 0 | 0 | 0 | 0 | 1,746 | 0.965174 | 0 | 0 | 361 | 0.199558 |
5cfc0222b944d024264d6196a63452889c5cce0e | 5,482 | py | Python | Modules/scan.py | mafiamasterhere/EvilNet | 5b93d69ff9b6b16edfd3053f1f56857173b59eb1 | [
"MIT"
] | 91 | 2020-06-19T22:08:32.000Z | 2022-03-28T08:27:10.000Z | scan.py | lunnar211/CRACK_WIFI | 654af29306dd6582bf3ece38e9dd2de196f09aab | [
"MIT"
] | null | null | null | scan.py | lunnar211/CRACK_WIFI | 654af29306dd6582bf3ece38e9dd2de196f09aab | [
"MIT"
] | 22 | 2020-06-29T13:19:40.000Z | 2021-11-26T11:22:40.000Z | import nmap3
from colored import fg, bg, attr
import colored
import socket as sock
from Modules import intro
class nmap3_Scan() :
def __init__(self):
self.angry1 = colored.fg("green") + colored.attr("bold")
self.angry = colored.fg("white") + colored.attr("bold")
print(f"""{self.angry1}
... | 42.169231 | 91 | 0.506202 | 5,362 | 0.97811 | 0 | 0 | 0 | 0 | 0 | 0 | 1,191 | 0.217256 |
5cfea876092666973d9916499f12af7785c199a1 | 1,524 | py | Python | api/serializers.py | Wholefolio/marketmanager | 5a8314707806a6790c507e1bd817891e8dc88811 | [
"Apache-2.0"
] | null | null | null | api/serializers.py | Wholefolio/marketmanager | 5a8314707806a6790c507e1bd817891e8dc88811 | [
"Apache-2.0"
] | null | null | null | api/serializers.py | Wholefolio/marketmanager | 5a8314707806a6790c507e1bd817891e8dc88811 | [
"Apache-2.0"
] | null | null | null | """Serializers module."""
from rest_framework import serializers
from django_celery_results.models import TaskResult
from api import models
class ExchangeSerializer(serializers.ModelSerializer):
"""Serializer to map the Model instance into JSON format."""
class Meta:
"""Meta class to map serializer'... | 31.75 | 75 | 0.631234 | 1,371 | 0.899606 | 0 | 0 | 0 | 0 | 0 | 0 | 614 | 0.402887 |
5cfff87f1a992e437041fea9fa36fffc753143d6 | 3,228 | py | Python | invenio_oaiserver/views/server.py | ParthS007/invenio-oaiserver | 6fa5d2e2a770377ffe34a44bc60b0a817853da95 | [
"MIT"
] | null | null | null | invenio_oaiserver/views/server.py | ParthS007/invenio-oaiserver | 6fa5d2e2a770377ffe34a44bc60b0a817853da95 | [
"MIT"
] | null | null | null | invenio_oaiserver/views/server.py | ParthS007/invenio-oaiserver | 6fa5d2e2a770377ffe34a44bc60b0a817853da95 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""OAI-PMH 2.0 server."""
from f... | 31.339806 | 77 | 0.629492 | 0 | 0 | 1,024 | 0.317224 | 2,395 | 0.741945 | 0 | 0 | 978 | 0.302974 |
cf01e9ecb22b1e70b4470ec1161d194bd76c4e67 | 6,847 | py | Python | searching/models.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | null | null | null | searching/models.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | 13 | 2019-12-12T03:07:55.000Z | 2022-03-07T12:59:27.000Z | searching/models.py | netvigator/auctions | f88bcce800b60083a5d1a6f272c51bb540b8342a | [
"MIT"
] | null | null | null | from django.db import models
from core.utils import getReverseWithUpdatedQuery
from ebayinfo.models import EbayCategory
from categories.models import Category
from core.dj_import import get_user_model
User = get_user_model()
from searching import ALL_PRIORITIES
from pyPks.Time.Ou... | 47.548611 | 91 | 0.535417 | 6,430 | 0.939097 | 0 | 0 | 0 | 0 | 0 | 0 | 2,266 | 0.330948 |
cf025b07d576f1c46ac2887dea5c3dde0c945bf5 | 367 | py | Python | Maths/fibonacciSeries.py | baiyongzhen/python | a8f367d2136f1aaeab63345e160e59fe16d62a11 | [
"MIT"
] | 1 | 2018-10-16T13:41:06.000Z | 2018-10-16T13:41:06.000Z | Maths/fibonacciSeries.py | baiyongzhen/python | a8f367d2136f1aaeab63345e160e59fe16d62a11 | [
"MIT"
] | null | null | null | Maths/fibonacciSeries.py | baiyongzhen/python | a8f367d2136f1aaeab63345e160e59fe16d62a11 | [
"MIT"
] | 2 | 2018-10-03T15:47:30.000Z | 2019-10-23T16:35:48.000Z | # Fibonacci Sequence Using Recursion
def recur_fibo(n):
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))
limit = int(input("How many terms to include in fionacci series:"))
if limit <= 0:
print("Plese enter a positive integer")
else:
print("Fibonacci series:")
for ... | 21.588235 | 67 | 0.640327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.365123 |
cf02f2ac21df464b0428c1c4c3f886070ec8055f | 6,319 | py | Python | extract_tokens.py | anuprulez/similar_galaxy_tools | 19eefa567fdb56781dc5f42a0bea8af0969f5978 | [
"MIT"
] | 2 | 2018-02-02T18:52:12.000Z | 2018-02-03T08:36:44.000Z | extract_tokens.py | anuprulez/similar_galaxy_tools | 19eefa567fdb56781dc5f42a0bea8af0969f5978 | [
"MIT"
] | null | null | null | extract_tokens.py | anuprulez/similar_galaxy_tools | 19eefa567fdb56781dc5f42a0bea8af0969f5978 | [
"MIT"
] | 1 | 2018-02-03T08:36:57.000Z | 2018-02-03T08:36:57.000Z | """
Extract useful tokens from multiple attributes of Galaxy tools
"""
import os
import numpy as np
import pandas as pd
import operator
import json
import utils
class ExtractTokens:
@classmethod
def __init__( self, tools_data_path ):
self.tools_data_path = tools_data_path
@classmethod
def ... | 42.126667 | 110 | 0.549929 | 6,147 | 0.972781 | 0 | 0 | 6,091 | 0.963918 | 0 | 0 | 1,100 | 0.174078 |
cf064ee4360718e1bf827036501177dcef34c6bd | 2,209 | py | Python | server/gestion/models/product.py | JetLightStudio/Jet-Gest-stock-management | 333cbc3dd1b379f53f67250fbd581cbce8e20ca8 | [
"MIT"
] | 1 | 2021-08-18T18:53:02.000Z | 2021-08-18T18:53:02.000Z | server/gestion/models/product.py | JetLightStudio/Jet-Gest-stock-management | 333cbc3dd1b379f53f67250fbd581cbce8e20ca8 | [
"MIT"
] | null | null | null | server/gestion/models/product.py | JetLightStudio/Jet-Gest-stock-management | 333cbc3dd1b379f53f67250fbd581cbce8e20ca8 | [
"MIT"
] | 1 | 2021-08-04T23:53:52.000Z | 2021-08-04T23:53:52.000Z | from django.core.files import storage
from django.db import models
from gestion.utils import products_path_and_rename
from gestion.models.category import Category
from gestion.models.subCategory import SubCategory
class Product(models.Model):
title = models.CharField(max_length=40, unique=True)
descr... | 37.440678 | 104 | 0.673155 | 1,974 | 0.893617 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.027162 |
cf07119cf6e3bdb2abce6a77371ad7da0041ab09 | 2,260 | py | Python | muk_utils/tests/test_search_parents.py | juazisco/gestion_rifa | bce6b75f17cb5ab2df7e2f7dd5141fc85a1a5bfb | [
"MIT"
] | null | null | null | muk_utils/tests/test_search_parents.py | juazisco/gestion_rifa | bce6b75f17cb5ab2df7e2f7dd5141fc85a1a5bfb | [
"MIT"
] | null | null | null | muk_utils/tests/test_search_parents.py | juazisco/gestion_rifa | bce6b75f17cb5ab2df7e2f7dd5141fc85a1a5bfb | [
"MIT"
] | null | null | null | ##########################################################################
#
# Copyright (C) 2017 MuK IT GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either ve... | 36.451613 | 78 | 0.620354 | 1,160 | 0.513274 | 0 | 0 | 0 | 0 | 0 | 0 | 927 | 0.410177 |
cf07d61453467fdaf7a52e8c01b18b42bfc7226e | 4,514 | py | Python | daal4py/df_regr.py | PivovarA/scikit-learn_bench | 52e96f28eda3ca25d0f51594041fd06ee3f8d4c2 | [
"MIT"
] | null | null | null | daal4py/df_regr.py | PivovarA/scikit-learn_bench | 52e96f28eda3ca25d0f51594041fd06ee3f8d4c2 | [
"MIT"
] | null | null | null | daal4py/df_regr.py | PivovarA/scikit-learn_bench | 52e96f28eda3ca25d0f51594041fd06ee3f8d4c2 | [
"MIT"
] | 2 | 2020-08-07T16:19:32.000Z | 2020-08-07T16:22:12.000Z | # Copyright (C) 2018-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
import argparse
from bench import (
parse_args, measure_function_time, load_data, print_output, rmse_score,
float_or_int, getFPType
)
from daal4py import (
decision_forest_regression_training,
decision_forest_regression_predi... | 36.699187 | 83 | 0.636907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 977 | 0.216438 |
cf0923f79d25f11e0f15404bd9b6b8cdac76eb86 | 8,658 | py | Python | src/feature/eme_data_loader.py | 0shimax/Pytorch-DRN | a5e70784d0097069e9e1cf958a446f819dbdb7f1 | [
"MIT"
] | null | null | null | src/feature/eme_data_loader.py | 0shimax/Pytorch-DRN | a5e70784d0097069e9e1cf958a446f819dbdb7f1 | [
"MIT"
] | null | null | null | src/feature/eme_data_loader.py | 0shimax/Pytorch-DRN | a5e70784d0097069e9e1cf958a446f819dbdb7f1 | [
"MIT"
] | null | null | null | from pathlib import Path
import pandas as pd
import numpy as np
import random
import torch
from torch.utils.data import Dataset
from sklearn.model_selection import train_test_split
def get_id_columns(df):
user_and_target_id_columns = ["user_id", "target_user_id"]
return df[user_and_target_id_column... | 39.176471 | 109 | 0.661354 | 4,360 | 0.501726 | 0 | 0 | 0 | 0 | 0 | 0 | 422 | 0.048562 |
cf09fa6ef4f4a3fb801b920743bebb3502eaa28b | 2,320 | py | Python | mp/plot_process.py | RawPikachu/valor | 02e1eb0e599904d3f0c49b52534fcb6c3762951d | [
"MIT"
] | null | null | null | mp/plot_process.py | RawPikachu/valor | 02e1eb0e599904d3f0c49b52534fcb6c3762951d | [
"MIT"
] | null | null | null | mp/plot_process.py | RawPikachu/valor | 02e1eb0e599904d3f0c49b52534fcb6c3762951d | [
"MIT"
] | null | null | null | from sql import ValorSQL
from util import guild_name_from_tag
import matplotlib.pyplot as plt
import matplotlib.dates as md
from scipy.interpolate import make_interp_spline
from matplotlib.ticker import MaxNLocator
import numpy as np
from datetime import datetime
import time
def plot_process(lock, opt, query):
a =... | 25.494505 | 96 | 0.551293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.09181 |
cf0d0e8e618571c35cece51daafa83cd4f90bede | 47,627 | py | Python | bot.py | SHIA1204/kyaru | c76a5df7c26fb30136ac473bd3f1ca90a2b65739 | [
"Apache-2.0"
] | null | null | null | bot.py | SHIA1204/kyaru | c76a5df7c26fb30136ac473bd3f1ca90a2b65739 | [
"Apache-2.0"
] | null | null | null | bot.py | SHIA1204/kyaru | c76a5df7c26fb30136ac473bd3f1ca90a2b65739 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
from os import system
import discord
import asyncio
import os.path
import linecache
import datetime
import urllib
import requests
from bs4 import BeautifulSoup
from discord.utils import get
from discord.ext import commands
from discord.ext.commands import CommandNotFound
import logging
imp... | 43.140399 | 374 | 0.659752 | 19,279 | 0.377317 | 0 | 0 | 40,182 | 0.786417 | 39,441 | 0.771915 | 18,375 | 0.359624 |
cf0d1e9a030a45715261e6af31490bcb4b8a55b2 | 3,361 | py | Python | tapioca_disqus/resource_mapping/forums.py | marctc/tapioca-disqus | a397d21ad1b6c69f7691015338e491d106e58da4 | [
"MIT"
] | 5 | 2015-08-13T10:21:13.000Z | 2019-01-05T21:12:24.000Z | tapioca_disqus/resource_mapping/forums.py | marctc/tapioca-disqus | a397d21ad1b6c69f7691015338e491d106e58da4 | [
"MIT"
] | 3 | 2015-12-09T05:41:13.000Z | 2016-03-25T17:34:45.000Z | tapioca_disqus/resource_mapping/forums.py | marctc/tapioca-disqus | a397d21ad1b6c69f7691015338e491d106e58da4 | [
"MIT"
] | 4 | 2015-12-09T05:41:18.000Z | 2019-01-05T21:12:27.000Z | FORUMS_MAPPING = {
'forums_add_moderator': {
'resource': 'forums/addModerator.json',
'docs': 'https://disqus.com/api/docs/forums/addModerator/',
'methods': ['POST'],
},
'forums_create': {
'resource': 'forums/create.json',
'docs': 'https://disqus.com/api/docs/forums/cr... | 36.139785 | 85 | 0.580184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,386 | 0.709908 |
cf0dd9eac4b7a622418f1535040a8fa0ae6f0b9d | 50,168 | py | Python | experiment_extra.py | Shihab-Shahriar/500-miles | 49fc9c6d037521f454da4bc02cccd62117c0ac5f | [
"MIT"
] | null | null | null | experiment_extra.py | Shihab-Shahriar/500-miles | 49fc9c6d037521f454da4bc02cccd62117c0ac5f | [
"MIT"
] | null | null | null | experiment_extra.py | Shihab-Shahriar/500-miles | 49fc9c6d037521f454da4bc02cccd62117c0ac5f | [
"MIT"
] | 1 | 2018-10-03T21:17:27.000Z | 2018-10-03T21:17:27.000Z | from __future__ import division, print_function
import pickle
import pdb
import os
import time
from sklearn.cross_validation import StratifiedKFold
from sklearn import svm
from sklearn import metrics
import gensim
import random
from learners import SK_SVM,SK_KNN,SK_LDA
from tuner import DE_Tune_ML
from model import Pap... | 38.296183 | 131 | 0.62514 | 0 | 0 | 0 | 0 | 38,118 | 0.759807 | 0 | 0 | 12,421 | 0.247588 |
cf0de3ba9e20ca39a57f3acbae18add6e56df71b | 70 | py | Python | core/nn/__init__.py | achaiah/awesome-semantic-segmentation-pytorch | 4f945a1989ae8b1bb6b24f1214fa84a7ca8c8e07 | [
"Apache-2.0"
] | 1 | 2019-09-09T16:58:48.000Z | 2019-09-09T16:58:48.000Z | core/nn/__init__.py | achaiah/awesome-semantic-segmentation-pytorch | 4f945a1989ae8b1bb6b24f1214fa84a7ca8c8e07 | [
"Apache-2.0"
] | null | null | null | core/nn/__init__.py | achaiah/awesome-semantic-segmentation-pytorch | 4f945a1989ae8b1bb6b24f1214fa84a7ca8c8e07 | [
"Apache-2.0"
] | 1 | 2019-12-04T03:06:07.000Z | 2019-12-04T03:06:07.000Z | """Seg NN Modules"""
from .sync_bn.syncbn import *
from .loss import * | 23.333333 | 29 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.285714 |
cf0ef43a8bc52fd3f88dd05dc9e8f4a26b23551b | 760 | py | Python | deploy.py | ksksksks-dev/Solidity-Demo | 572f26efdfcaeb8721cf9f98c08205dd344848b3 | [
"MIT"
] | null | null | null | deploy.py | ksksksks-dev/Solidity-Demo | 572f26efdfcaeb8721cf9f98c08205dd344848b3 | [
"MIT"
] | null | null | null | deploy.py | ksksksks-dev/Solidity-Demo | 572f26efdfcaeb8721cf9f98c08205dd344848b3 | [
"MIT"
] | 1 | 2021-10-02T07:23:28.000Z | 2021-10-02T07:23:28.000Z | import json
import solcx
from solcx import compile_standard
# solcx.install_solc()
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
compiled_sol = compile_standard(
{
"language": "Solidity",
"sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
... | 25.333333 | 82 | 0.610526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 323 | 0.425 |
cf0f43f9858fd6194f42e3f825cc15ff13ea7eeb | 1,433 | py | Python | solutions/036.valid-sudoku/valid-sudoku.py | wangsongiam/leetcode | 96ff21bca1871816ae51fccb1fa13587b378dc50 | [
"MIT"
] | 3 | 2018-11-25T15:19:57.000Z | 2019-09-28T03:01:11.000Z | solutions/036.valid-sudoku/valid-sudoku.py | casprwang/leetcode | 96ff21bca1871816ae51fccb1fa13587b378dc50 | [
"MIT"
] | null | null | null | solutions/036.valid-sudoku/valid-sudoku.py | casprwang/leetcode | 96ff21bca1871816ae51fccb1fa13587b378dc50 | [
"MIT"
] | 3 | 2018-02-11T20:23:44.000Z | 2020-06-05T15:39:56.000Z | class Solution:
def isValidSudoku(self, board):
"""
:type board: List[List[str]]
:rtype: bool
00 01 02
10 11 12
20 21 22
divide 3 : 0
mod 3 : < 3
m = {
'row0-8' : set()
'col0-8'
'div3 + mod3'
}
... | 24.288136 | 55 | 0.328681 | 1,432 | 0.999302 | 0 | 0 | 0 | 0 | 0 | 0 | 285 | 0.198883 |
cf10b831b724d9102e64bddbd11566c602b17ffc | 2,185 | py | Python | test_clouddb/test_instance.py | adregner/python-clouddb | 6c77261a0e9cda221980c9240c7fffc93a78f7f7 | [
"X11"
] | 1 | 2018-05-21T23:09:36.000Z | 2018-05-21T23:09:36.000Z | test_clouddb/test_instance.py | adregner/python-clouddb | 6c77261a0e9cda221980c9240c7fffc93a78f7f7 | [
"X11"
] | null | null | null | test_clouddb/test_instance.py | adregner/python-clouddb | 6c77261a0e9cda221980c9240c7fffc93a78f7f7 | [
"X11"
] | null | null | null |
"""Primary testing suite for clouddb.models.instance.
This code is licensed under the MIT license. See COPYING for more details."""
import time
import unittest
import clouddb
import test_clouddb
CLOUDDB_TEST_INSTANCE_OBJECT = None
CLOUDDB_TEST_BASELINE_INSTANCE_COUNT = None
CLOUDDB_TEST_INSTANCE_NAME = "testsuite... | 37.672414 | 88 | 0.769794 | 1,444 | 0.66087 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.073227 |
cf12d221f01553d46a5821f0b5720d8d94341b9e | 3,327 | py | Python | examples/tensorflow/nlp/bert_large_squad/tune_squad.py | kevinintel/neural-compressor | b57645566aeff8d3c18dc49d2739a583c072f940 | [
"Apache-2.0"
] | 100 | 2020-12-01T02:40:12.000Z | 2021-09-09T08:14:22.000Z | examples/tensorflow/nlp/bert_large_squad/tune_squad.py | kevinintel/neural-compressor | b57645566aeff8d3c18dc49d2739a583c072f940 | [
"Apache-2.0"
] | 25 | 2021-01-05T00:16:17.000Z | 2021-09-10T03:24:01.000Z | examples/tensorflow/nlp/bert_large_squad/tune_squad.py | kevinintel/neural-compressor | b57645566aeff8d3c18dc49d2739a583c072f940 | [
"Apache-2.0"
] | 25 | 2020-12-01T19:07:08.000Z | 2021-08-30T14:20:07.000Z | #!/usr/bin/env python
# coding=utf-8
# Copyright 2018 The Google AI Language Team 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
... | 36.56044 | 94 | 0.703937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,352 | 0.406372 |
cf1379541ce40bdf7c286012870b15d463d7defa | 58 | py | Python | gfxlcd/driver/ad7843/__init__.py | bkosciow/gfxlcd | 953d013abb9b695c2226b348093cc64391a01f6c | [
"MIT"
] | 12 | 2018-01-31T18:43:23.000Z | 2021-10-06T10:23:05.000Z | gfxlcd/driver/ad7843/__init__.py | bkosciow/gfxlcd | 953d013abb9b695c2226b348093cc64391a01f6c | [
"MIT"
] | 4 | 2018-04-25T15:15:16.000Z | 2021-03-21T09:21:50.000Z | gfxlcd/driver/ad7843/__init__.py | bkosciow/gfxlcd | 953d013abb9b695c2226b348093cc64391a01f6c | [
"MIT"
] | 4 | 2018-03-15T09:12:09.000Z | 2021-03-19T20:07:33.000Z | """driver/ad7843 module"""
__author__ = 'Bartosz Kosciow'
| 19.333333 | 30 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.741379 |
cf144bab411bff8503d65becf1b966fa838b391b | 286 | py | Python | utils/targetTools.py | brzx/pydataloader | 005c347b8fd9aca0a35ecf8eccce0a35e7e6da52 | [
"BSD-2-Clause"
] | null | null | null | utils/targetTools.py | brzx/pydataloader | 005c347b8fd9aca0a35ecf8eccce0a35e7e6da52 | [
"BSD-2-Clause"
] | null | null | null | utils/targetTools.py | brzx/pydataloader | 005c347b8fd9aca0a35ecf8eccce0a35e7e6da52 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import abc
class TargetTools():
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def getConnection(self, username, password, url):
pass
@abc.abstractmethod
def validTarget(self, target):
pass | 19.066667 | 54 | 0.611888 | 226 | 0.79021 | 0 | 0 | 157 | 0.548951 | 0 | 0 | 42 | 0.146853 |
cf151f0c30a45fd3252d2c9ba1d95617b3dd6f69 | 7,627 | py | Python | psi/app/models/product_inventory.py | lusi1990/betterlifepsi | 8e7f8562967ab1816d8c25db3251c550a357f39c | [
"MIT"
] | 33 | 2018-10-19T03:41:56.000Z | 2022-01-23T16:26:02.000Z | psi/app/models/product_inventory.py | lusi1990/betterlifepsi | 8e7f8562967ab1816d8c25db3251c550a357f39c | [
"MIT"
] | 318 | 2018-09-23T15:16:54.000Z | 2022-03-31T22:58:55.000Z | psi/app/models/product_inventory.py | lusi1990/betterlifepsi | 8e7f8562967ab1816d8c25db3251c550a357f39c | [
"MIT"
] | 19 | 2018-10-22T18:04:18.000Z | 2021-12-06T19:49:05.000Z | from sqlalchemy import select, func, or_
from sqlalchemy.ext.hybrid import hybrid_property
from psi.app import const
from psi.app.models import Product, InventoryTransactionLine, \
InventoryTransaction
from psi.app.service import Info
from psi.app.utils import format_decimal, get_weeks_between
db = Info.get_db()
... | 41.005376 | 136 | 0.64075 | 7,305 | 0.957782 | 0 | 0 | 6,609 | 0.866527 | 0 | 0 | 702 | 0.092041 |
cf18350dca3c8a011e1f04f49243469e79dd2045 | 1,484 | py | Python | run.py | wallarelvo/SmallCartography | 007e621386eb86d904fefef3f518b1d5f1dc7fe6 | [
"Apache-2.0"
] | null | null | null | run.py | wallarelvo/SmallCartography | 007e621386eb86d904fefef3f518b1d5f1dc7fe6 | [
"Apache-2.0"
] | null | null | null | run.py | wallarelvo/SmallCartography | 007e621386eb86d904fefef3f518b1d5f1dc7fe6 | [
"Apache-2.0"
] | null | null | null |
import carto
import argparse
def main():
parser = argparse.ArgumentParser(
description="Runs programs for the carto MapReduce library"
)
parser.add_argument(
"--host", dest="host", type=str, default="localhost",
help="Host of the program"
)
parser.add_argument(
"... | 26.981818 | 67 | 0.607143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.24124 |
cf1bdfaeda3c9d3dd53a3e8c1108702ddef142c8 | 3,623 | py | Python | microservices_miner/control/issue_mgr.py | IBM/microservices-miner | b7befa1c97930b1e7347c9e386a4bb5c5f2d2198 | [
"MIT"
] | null | null | null | microservices_miner/control/issue_mgr.py | IBM/microservices-miner | b7befa1c97930b1e7347c9e386a4bb5c5f2d2198 | [
"MIT"
] | 4 | 2021-06-08T22:11:29.000Z | 2022-01-14T21:21:04.000Z | microservices_miner/control/issue_mgr.py | IBM/microservices-miner | b7befa1c97930b1e7347c9e386a4bb5c5f2d2198 | [
"MIT"
] | 1 | 2020-08-06T14:53:05.000Z | 2020-08-06T14:53:05.000Z | # (C) Copyright IBM Corporation 2017, 2018, 2019
# U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted
# by GSA ADP Schedule Contract with IBM Corp.
#
# Author: Leonardo P. Tizzei <ltizzei@br.ibm.com>
from microservices_miner.control.database_conn import IssueConn, UserConn, RepositoryCo... | 27.44697 | 121 | 0.548993 | 3,118 | 0.860613 | 0 | 0 | 0 | 0 | 0 | 0 | 996 | 0.27491 |
cf1d3c9ee4fa3f3a46513695b9bd7c1714c7aef5 | 10,893 | py | Python | custom_components/skyq/config_flow.py | TomBrien/Home_Assistant_SkyQ_MediaPlayer | 50f9ad0d3b7a3bc2acc652415ff59740bf3ace10 | [
"MIT"
] | null | null | null | custom_components/skyq/config_flow.py | TomBrien/Home_Assistant_SkyQ_MediaPlayer | 50f9ad0d3b7a3bc2acc652415ff59740bf3ace10 | [
"MIT"
] | null | null | null | custom_components/skyq/config_flow.py | TomBrien/Home_Assistant_SkyQ_MediaPlayer | 50f9ad0d3b7a3bc2acc652415ff59740bf3ace10 | [
"MIT"
] | null | null | null | """Configuration flow for the skyq platform."""
import ipaddress
import json
import logging
import re
from operator import attrgetter
import homeassistant.helpers.config_validation as cv
import pycountry
import voluptuous as vol
from homeassistant import config_entries, exceptions
from homeassistant.const import CONF_... | 36.431438 | 88 | 0.597815 | 9,582 | 0.879647 | 0 | 0 | 163 | 0.014964 | 7,236 | 0.66428 | 711 | 0.065271 |
cf1e1fc048aed029497d762bdbe8c8befabdb682 | 2,045 | py | Python | tradssat/out/soilni.py | shreyayadav/traDSSAT | cc9650f896910c0d0a7a382aff36bef89aba70f2 | [
"MIT"
] | null | null | null | tradssat/out/soilni.py | shreyayadav/traDSSAT | cc9650f896910c0d0a7a382aff36bef89aba70f2 | [
"MIT"
] | null | null | null | tradssat/out/soilni.py | shreyayadav/traDSSAT | cc9650f896910c0d0a7a382aff36bef89aba70f2 | [
"MIT"
] | null | null | null | from tradssat.tmpl.output import OutFile
from tradssat.tmpl.var import FloatVar, IntegerVar
class SoilNiOut(OutFile):
"""
Reader for DSSAT soil nitrogen (SOILNI.OUT) files.
"""
filename = 'SoilNi.Out'
def _get_var_info(self):
return vars_
vars_ = {
IntegerVar('YEAR', 4, info='Year')... | 43.510638 | 72 | 0.604401 | 175 | 0.085575 | 0 | 0 | 0 | 0 | 0 | 0 | 974 | 0.476284 |
cf1edbd7a30a852f3ca1224c69d6e47997c186c3 | 4,888 | py | Python | project/scripts/run-cooja.py | nfi/multitrace | 7a043f4c3f580ca87c39f23337322b98594f3a51 | [
"BSD-3-Clause"
] | 4 | 2021-12-20T12:25:56.000Z | 2022-03-23T20:39:16.000Z | project/scripts/run-cooja.py | nfi/multitrace | 7a043f4c3f580ca87c39f23337322b98594f3a51 | [
"BSD-3-Clause"
] | null | null | null | project/scripts/run-cooja.py | nfi/multitrace | 7a043f4c3f580ca87c39f23337322b98594f3a51 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import sys
import os
import time
import traceback
import subprocess
from subprocess import PIPE, STDOUT, CalledProcessError
# Find path to this script
SELF_PATH = os.path.dirname(os.path.abspath(__file__))
# Find path to Contiki-NG relative to this script
CONTIKI_PATH = os.path.... | 33.479452 | 108 | 0.63748 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,419 | 0.290303 |
cf1f3cd2308c871fbca4d806dda3a4b0a43ddbe0 | 711 | py | Python | Recent Excel Documents.lbaction/Contents/Scripts/default.py | nriley/LBOfficeMRU | e2df583cdb32a066f3ab002d4182fa40759839a6 | [
"Apache-2.0"
] | 13 | 2016-08-21T12:18:42.000Z | 2022-02-01T22:03:45.000Z | Recent Excel Documents.lbaction/Contents/Scripts/default.py | nriley/LBOfficeMRU | e2df583cdb32a066f3ab002d4182fa40759839a6 | [
"Apache-2.0"
] | 1 | 2017-02-11T10:46:12.000Z | 2017-03-31T04:20:01.000Z | Recent Excel Documents.lbaction/Contents/Scripts/default.py | nriley/LBOfficeMRU | e2df583cdb32a066f3ab002d4182fa40759839a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import json, operator
import mruservice, mruuserdata
APP_NAME = 'Excel'
APP_BUNDLE_ID = 'com.microsoft.Excel'
APP_URL_PREFIX = 'ms-excel:ofe|u|'
EXTENSION_TO_ICON_NAME = dict(
slk='XLS8', dif='XLS8', ods='ODS', xls='XLS8', xlsx='XLSX', xltx='XLTX', xlsm='XLSM',
xltm='XLTM', xlsb='XLSB',... | 35.55 | 98 | 0.703235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.289733 |
cf1f9a3ecc8549d804dcf2f5aef38297dc7945b8 | 2,458 | py | Python | 3sum_medium.py | victorsemenov1980/LeetCodeDailyFun | f66273a9868ede5e2337f586e21eaf9e771b9b48 | [
"MIT"
] | null | null | null | 3sum_medium.py | victorsemenov1980/LeetCodeDailyFun | f66273a9868ede5e2337f586e21eaf9e771b9b48 | [
"MIT"
] | null | null | null | 3sum_medium.py | victorsemenov1980/LeetCodeDailyFun | f66273a9868ede5e2337f586e21eaf9e771b9b48 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat May 22 12:03:16 2021
@author: user
"""
'''
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
Notice that the solution set must not contain dupli... | 22.550459 | 156 | 0.47559 | 1,530 | 0.622457 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.313263 |
cf2003bb501336b11e7299124a046e9392cff5a7 | 799 | py | Python | trader/lib/definitions.py | ajhenri/trading-simulator | 90738710d50a89be553910bc5d1e0fff80e3c6a1 | [
"MIT"
] | null | null | null | trader/lib/definitions.py | ajhenri/trading-simulator | 90738710d50a89be553910bc5d1e0fff80e3c6a1 | [
"MIT"
] | 4 | 2020-10-12T22:49:02.000Z | 2022-02-27T10:23:56.000Z | trader/lib/definitions.py | ajhenri/trading-simulator | 90738710d50a89be553910bc5d1e0fff80e3c6a1 | [
"MIT"
] | null | null | null | class ResponseErrors:
DEFAULT = 'An unexpected error occurred while processing this request'
INVALID_JSON = 'Unable to parse JSON from the request body'
INVALID_LOGIN = 'The username/password you specified is invalid'
USER_DNE = 'User does not exist'
ACCOUNT_DNE = 'Account does not exist'
ACCOUN... | 53.266667 | 74 | 0.749687 | 799 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 463 | 0.579474 |
cf20204aba78a60c893f6561c24e36c3ce30077f | 651 | py | Python | tests/test_loss.py | MartinXPN/abcde | 13192c5f7dfb32a461b9205aed4b0b21e79d8285 | [
"MIT"
] | 4 | 2021-01-20T09:15:37.000Z | 2022-03-03T13:58:18.000Z | tests/test_loss.py | MartinXPN/abcde | 13192c5f7dfb32a461b9205aed4b0b21e79d8285 | [
"MIT"
] | null | null | null | tests/test_loss.py | MartinXPN/abcde | 13192c5f7dfb32a461b9205aed4b0b21e79d8285 | [
"MIT"
] | null | null | null | from unittest import TestCase
from torch import Tensor
from abcde.loss import PairwiseRankingCrossEntropyLoss
class TestPairwiseRankingLoss(TestCase):
def test_simple_case(self):
loss = PairwiseRankingCrossEntropyLoss()
res = loss(pred_betweenness=Tensor([[0.5], [0.7], [3]]), target_betweenness=... | 40.6875 | 110 | 0.623656 | 536 | 0.823349 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.087558 |
cf21edee740920f2ebaec338a4fef6781808e844 | 1,088 | py | Python | datasets/mvda_peas_raw/__init__.py | ryuzakyl/data-bloodhound | ae0413e748e55a0d2dbae35bbe96a672f313a64b | [
"Apache-2.0"
] | 3 | 2019-03-18T03:22:06.000Z | 2021-04-06T07:53:51.000Z | datasets/mvda_peas_raw/__init__.py | ryuzakyl/data-bloodhound | ae0413e748e55a0d2dbae35bbe96a672f313a64b | [
"Apache-2.0"
] | null | null | null | datasets/mvda_peas_raw/__init__.py | ryuzakyl/data-bloodhound | ae0413e748e55a0d2dbae35bbe96a672f313a64b | [
"Apache-2.0"
] | 2 | 2020-10-05T08:22:25.000Z | 2020-10-05T08:24:02.000Z | #!/usr/bin/env
# -*- coding: utf-8 -*-
# Copyright (C) Victor M. Mendiola Lau - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
# Written by Victor M. Mendiola Lau <ryuzakyl@gmail.com>, January 2017
import os
import scipy.io as sio
import ... | 28.631579 | 82 | 0.649816 | 0 | 0 | 0 | 0 | 354 | 0.325368 | 0 | 0 | 594 | 0.545956 |
cf2226ec55301df910a7704bea76af8d31c1db00 | 472 | py | Python | AULAS/Caixa de entrada/selectionSortEu.py | junioralecrim/Python | a7f716e0e2b3d17ea20c76987788831e102c4765 | [
"MIT"
] | null | null | null | AULAS/Caixa de entrada/selectionSortEu.py | junioralecrim/Python | a7f716e0e2b3d17ea20c76987788831e102c4765 | [
"MIT"
] | null | null | null | AULAS/Caixa de entrada/selectionSortEu.py | junioralecrim/Python | a7f716e0e2b3d17ea20c76987788831e102c4765 | [
"MIT"
] | null | null | null | #selection sort
#Passo a passo:
# 1° Descobrir o menor item da lista
# 2° colocar dentro de uma função
#Rascunho do algoritimo de ordenação para mudar as posições
# if (lista[2] < minimo):
# aux = lista[0]
# minimo = lista[2]
# lista[2] = aux
lista = [7, 5, 1, 3, 8]
n = le... | 17.481481 | 59 | 0.552966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.583333 |
cf248937a1f0ddbbed80fc10763c1ab5067ed373 | 380 | py | Python | tests/test_ffwd_send.py | smstone/ffwd-client-python | 9a904ea9eecea3ab0a9c90160910bba2600d48f0 | [
"Apache-2.0"
] | null | null | null | tests/test_ffwd_send.py | smstone/ffwd-client-python | 9a904ea9eecea3ab0a9c90160910bba2600d48f0 | [
"Apache-2.0"
] | null | null | null | tests/test_ffwd_send.py | smstone/ffwd-client-python | 9a904ea9eecea3ab0a9c90160910bba2600d48f0 | [
"Apache-2.0"
] | null | null | null | import argparse
import unittest
from ffwd.ffwd_send import tag_type
class TestFFWDSend(unittest.TestCase):
def test_tag_type(self):
self.assertEquals(('hello', 'world'), tag_type("hello:world"))
self.assertEquals(('hello', 'world:two'), tag_type("hello:world:two"))
with self.assertRaises... | 27.142857 | 78 | 0.694737 | 308 | 0.810526 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.181579 |
cf252db5b4b95b5dc23031fed96cc1a89f8cd949 | 2,475 | py | Python | openGaussBase/testcase/SECURITY/MODIFY/Opengauss_Function_Security_Mgt_Manamegent_Case0001.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SECURITY/MODIFY/Opengauss_Function_Security_Mgt_Manamegent_Case0001.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SECURITY/MODIFY/Opengauss_Function_Security_Mgt_Manamegent_Case0001.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 33 | 84 | 0.645657 | 1,615 | 0.611511 | 0 | 0 | 0 | 0 | 0 | 0 | 1,470 | 0.556607 |
cf259671523b5fd8d5e44da5a9826f127e7fbc84 | 162 | py | Python | big-meme/src/model/meme.py | neovasili/101_serverless_workshop | a005ab4af620c3c1a522aab8d201378ea7840ab5 | [
"MIT"
] | 4 | 2019-11-13T17:58:15.000Z | 2020-03-12T12:24:10.000Z | big-meme/src/model/meme.py | neovasili/101_serverless_workshop | a005ab4af620c3c1a522aab8d201378ea7840ab5 | [
"MIT"
] | null | null | null | big-meme/src/model/meme.py | neovasili/101_serverless_workshop | a005ab4af620c3c1a522aab8d201378ea7840ab5 | [
"MIT"
] | null | null | null |
class Meme( object ):
def __init__( self, name, image, themes ):
self.__name = name
self.__image = image
self.__themes = themes | 20.25 | 46 | 0.574074 | 160 | 0.987654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cf27715d55b617221f21406b94ab34e0ac04baac | 5,981 | py | Python | lib/surface/compute/instance_groups/managed/abandon_instances.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instance_groups/managed/abandon_instances.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/instance_groups/managed/abandon_instances.py | eyalev/gcloud | 421ee63a0a6d90a097e8530d53a6df5b905a0205 | [
"Apache-2.0"
] | 2 | 2020-11-04T03:08:21.000Z | 2020-11-05T08:14:41.000Z | # 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 by applicable law or ag... | 35.390533 | 80 | 0.69587 | 3,247 | 0.542886 | 0 | 0 | 3,358 | 0.561445 | 0 | 0 | 1,692 | 0.282896 |
cf289c374ee47f4952cddf28f571e3c1c464ba43 | 1,185 | py | Python | day:22/isBinaryTreeSymmetric.py | hawaijar/FireLeetcode | e981e96f6a38a3b08e9b7ef59aec65f6e0e5728a | [
"MIT"
] | 1 | 2020-10-21T12:28:23.000Z | 2020-10-21T12:28:23.000Z | day:22/isBinaryTreeSymmetric.py | hawaijar/FireLeetcode | e981e96f6a38a3b08e9b7ef59aec65f6e0e5728a | [
"MIT"
] | null | null | null | day:22/isBinaryTreeSymmetric.py | hawaijar/FireLeetcode | e981e96f6a38a3b08e9b7ef59aec65f6e0e5728a | [
"MIT"
] | 1 | 2020-10-21T12:28:24.000Z | 2020-10-21T12:28:24.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isSymmetric(self, root: TreeNode) -> bool:
#base case(s)
if(root is None): return True;
... | 28.902439 | 66 | 0.420253 | 983 | 0.829536 | 0 | 0 | 0 | 0 | 0 | 0 | 205 | 0.172996 |