hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
469bf8d9da5f7e85ca99597046844afc1b477cd9 | 213 | py | Python | code/django18/django18/newsletter/forms.py | dvl/celerytalk | 312de04ea24bb073357684a3a35cfd782b2b7aae | [
"MIT"
] | null | null | null | code/django18/django18/newsletter/forms.py | dvl/celerytalk | 312de04ea24bb073357684a3a35cfd782b2b7aae | [
"MIT"
] | null | null | null | code/django18/django18/newsletter/forms.py | dvl/celerytalk | 312de04ea24bb073357684a3a35cfd782b2b7aae | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
| 19.363636 | 53 | 0.737089 |
469d18528989ab40a67eb477eeda37c2533ddfd8 | 5,448 | py | Python | RecoEgamma/ElectronIdentification/python/Identification/mvaElectronID_Fall17_noIso_V1_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoEgamma/ElectronIdentification/python/Identification/mvaElectronID_Fall17_noIso_V1_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoEgamma/ElectronIdentification/python/Identification/mvaElectronID_Fall17_noIso_V1_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from RecoEgamma.ElectronIdentification.Identification.mvaElectronID_tools import *
# Documentation of the MVA
# https://twiki.cern.ch/twiki/bin/viewauth/CMS/MultivariateElectronIdentificationRun2
# https://rembserj.web.cern.ch/rembserj/notes/Electron_MVA_ID_2017_documentation
... | 54.48 | 124 | 0.727423 |
469d299beef21a4f12403e1476091e6f816d16ea | 1,676 | py | Python | dqn_plus/notebooks/code/train_ram.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | dqn_plus/notebooks/code/train_ram.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | dqn_plus/notebooks/code/train_ram.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | import numpy as np
import gym
from utils import *
from agent import *
from config import *
if __name__ == '__main__':
env = gym.make(RAM_ENV_NAME)
agent = Agent(env.observation_space.shape[0], env.action_space.n, BATCH_SIZE, LEARNING_RATE, TAU, GAMMA, DEVICE, False, DUEL, DOUBLE, PRIORITIZED)
rewards_log, ... | 33.52 | 150 | 0.613365 |
469d44404e5e5089163e7fb2cbe8fd08587f00ec | 4,274 | py | Python | tools/parallel_launcher/parallel_launcher.py | Gitman1989/chromium | 2b1cceae1075ef012fb225deec8b4c8bbe4bc897 | [
"BSD-3-Clause"
] | 2 | 2017-09-02T19:08:28.000Z | 2021-11-15T15:15:14.000Z | tools/parallel_launcher/parallel_launcher.py | meego-tablet-ux/meego-app-browser | 0f4ef17bd4b399c9c990a2f6ca939099495c2b9c | [
"BSD-3-Clause"
] | null | null | null | tools/parallel_launcher/parallel_launcher.py | meego-tablet-ux/meego-app-browser | 0f4ef17bd4b399c9c990a2f6ca939099495c2b9c | [
"BSD-3-Clause"
] | 1 | 2020-11-04T07:22:28.000Z | 2020-11-04T07:22:28.000Z | #!/usr/bin/python
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This tool launches several shards of a gtest-based binary
in parallel on a local machine.
Example usage:
parallel_launcher.py pat... | 27.574194 | 78 | 0.656996 |
469e17c0eac34c546af54d506129856bf3802b70 | 83 | py | Python | 05_Practice1/Step06/yj.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | null | null | null | 05_Practice1/Step06/yj.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | 3 | 2020-11-04T05:38:53.000Z | 2021-03-02T02:15:19.000Z | 05_Practice1/Step06/yj.py | StudyForCoding/BEAKJOON | 84e1c5e463255e919ccf6b6a782978c205420dbf | [
"MIT"
] | null | null | null | a = int(input())
for i in range(a):
print('* '*(a-a//2))
print(' *'*(a//2)) | 20.75 | 24 | 0.433735 |
469f233747542475f293cc21f8824a73074353c6 | 7,176 | py | Python | ginga/util/dp.py | kyraikeda/ginga | e0ce979de4a87e12ba7a90eec0517a0be05d14bc | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 76 | 2015-01-05T14:46:14.000Z | 2022-03-23T04:10:54.000Z | ginga/util/dp.py | kyraikeda/ginga | e0ce979de4a87e12ba7a90eec0517a0be05d14bc | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 858 | 2015-01-17T01:55:12.000Z | 2022-03-08T20:20:31.000Z | ginga/util/dp.py | kyraikeda/ginga | e0ce979de4a87e12ba7a90eec0517a0be05d14bc | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 60 | 2015-01-14T21:59:07.000Z | 2022-02-13T03:38:49.000Z | #
# dp.py -- Data pipeline and reduction routines
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import numpy as np
from collections import OrderedDict
from ginga import AstroImage, colors
from ginga.RGBImage import RGBImage
from ginga.util import wcs
... | 27.181818 | 72 | 0.593924 |
469f5e5ed924f088a814fc16a98e14d55994cdf9 | 3,294 | py | Python | jigsaw/datasets/datasets.py | alexvishnevskiy/jigsaw | 7fc2c4cd3700a54e9c5cbc02870bf4057b0a9fe3 | [
"MIT"
] | null | null | null | jigsaw/datasets/datasets.py | alexvishnevskiy/jigsaw | 7fc2c4cd3700a54e9c5cbc02870bf4057b0a9fe3 | [
"MIT"
] | null | null | null | jigsaw/datasets/datasets.py | alexvishnevskiy/jigsaw | 7fc2c4cd3700a54e9c5cbc02870bf4057b0a9fe3 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
from ..utils.optimal_lenght import find_optimal_lenght
| 31.673077 | 70 | 0.532483 |
46a1c447600050372f1c46ddc6ed6f7e8c87b183 | 117 | py | Python | app/api/v2/views/blacklist.py | MaggieChege/STORE-MANAGER-API-V2 | d8b2c7312304df627369721e8e1821cf724431d7 | [
"MIT"
] | null | null | null | app/api/v2/views/blacklist.py | MaggieChege/STORE-MANAGER-API-V2 | d8b2c7312304df627369721e8e1821cf724431d7 | [
"MIT"
] | null | null | null | app/api/v2/views/blacklist.py | MaggieChege/STORE-MANAGER-API-V2 | d8b2c7312304df627369721e8e1821cf724431d7 | [
"MIT"
] | null | null | null | blacklist=set()
| 14.625 | 29 | 0.735043 |
46a2b9041cbdb5a67a2d23664c83d5328cdf8c09 | 260 | py | Python | apps/tasks/api/views.py | dayvidemerson/django-rest-example | 85eabb1e154cfd8ebc0019080b37cd3f1302c206 | [
"MIT"
] | null | null | null | apps/tasks/api/views.py | dayvidemerson/django-rest-example | 85eabb1e154cfd8ebc0019080b37cd3f1302c206 | [
"MIT"
] | null | null | null | apps/tasks/api/views.py | dayvidemerson/django-rest-example | 85eabb1e154cfd8ebc0019080b37cd3f1302c206 | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from rest_framework import generics
from ..models import Task
from .serializers import TaskSerializer
| 21.666667 | 41 | 0.796154 |
46a39565f7364f7f1fb4b269da3328cdcc2b0021 | 97 | py | Python | jarvis/__init__.py | jduncan8142/JARVIS | 387003bc00cea2ca74d7094a92e55eab593a968a | [
"MIT"
] | null | null | null | jarvis/__init__.py | jduncan8142/JARVIS | 387003bc00cea2ca74d7094a92e55eab593a968a | [
"MIT"
] | null | null | null | jarvis/__init__.py | jduncan8142/JARVIS | 387003bc00cea2ca74d7094a92e55eab593a968a | [
"MIT"
] | null | null | null | __version__ = "0.0.3"
__author__ = "Jason Duncan"
__support__ = "jason.matthew.duncan@gmail.com"
| 24.25 | 46 | 0.742268 |
46a4d57f3c07a504c88eba6e3644cc933118a8c3 | 1,798 | py | Python | src/figcli/test/cli/action.py | figtools/figgy-cli | 88f4ccb8221ef9734f95b2637acfacc6e00983e7 | [
"Apache-2.0"
] | 36 | 2020-07-21T21:22:02.000Z | 2021-10-20T06:55:47.000Z | src/figcli/test/cli/action.py | figtools/figgy-cli | 88f4ccb8221ef9734f95b2637acfacc6e00983e7 | [
"Apache-2.0"
] | 2 | 2020-10-29T12:49:15.000Z | 2021-04-29T01:12:05.000Z | src/figcli/test/cli/action.py | figtools/figgy-cli | 88f4ccb8221ef9734f95b2637acfacc6e00983e7 | [
"Apache-2.0"
] | null | null | null | from typing import Union, List
import pexpect
from figcli.utils.utils import Utils
import sys
| 34.576923 | 119 | 0.60178 |
46a4f53ed5b4a611b18a262f155eca68d71783fb | 7,831 | py | Python | test/python/test_elementwise_ops.py | avijit-chakroborty/ngraph-bridge | b691d57412a40582ea93c6e564d80c750b7f2e8e | [
"Apache-2.0"
] | 142 | 2019-02-21T00:53:06.000Z | 2022-03-11T07:46:28.000Z | test/python/test_elementwise_ops.py | tensorflow/ngraph | ea6422491ec75504e78a63db029e7f74ec3479a5 | [
"Apache-2.0"
] | 252 | 2019-03-11T19:27:59.000Z | 2021-03-19T10:58:17.000Z | test/python/test_elementwise_ops.py | tensorflow/ngraph | ea6422491ec75504e78a63db029e7f74ec3479a5 | [
"Apache-2.0"
] | 65 | 2019-03-13T15:27:29.000Z | 2021-07-16T07:09:16.000Z | # ==============================================================================
# Copyright 2018-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | 47.75 | 80 | 0.477461 |
46a58d19b627254c0cc57fea12f1310b8d2e7c37 | 7,453 | py | Python | qc/slips.py | mfkiwl/UREGA-qc | 989e6b59d4fa5259ce48daa6165bdab4e020ba49 | [
"MIT"
] | null | null | null | qc/slips.py | mfkiwl/UREGA-qc | 989e6b59d4fa5259ce48daa6165bdab4e020ba49 | [
"MIT"
] | null | null | null | qc/slips.py | mfkiwl/UREGA-qc | 989e6b59d4fa5259ce48daa6165bdab4e020ba49 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Lars Stenseng.
@mail: lars@stenseng.net
"""
# from qc.__version__ import __version__
import georinex as gr
import numpy as np
from matplotlib.pyplot import figure, show
import matplotlib.pyplot as plt
obs = gr.load(
'tests/test_data/Rinex3/KLSQ00GRL_R_... | 25.611684 | 79 | 0.570643 |
46a68217514e2d9ae5f9e06cbba236282798ed2c | 8,610 | py | Python | tests/test_utils.py | jga/goldfinchsong | 638e166948944a7f027d03bcf8f7c14dc2f4b6f2 | [
"MIT"
] | null | null | null | tests/test_utils.py | jga/goldfinchsong | 638e166948944a7f027d03bcf8f7c14dc2f4b6f2 | [
"MIT"
] | null | null | null | tests/test_utils.py | jga/goldfinchsong | 638e166948944a7f027d03bcf8f7c14dc2f4b6f2 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from datetime import datetime, timezone
import unittest
from os.path import join
from tinydb import TinyDB, storages
from goldfinchsong import utils
IMAGE_NAMES = ['goldfinch1.jpg', 'goldfinch2.jpg', 'goldfinch3.jpg',
'goldfinch4.jpg', 'goldfinch5.jpg']
TEST_TEXT1 = ... | 40.046512 | 121 | 0.616609 |
46a6977e7b919a1d64a9944a2e191bffb62c293c | 2,868 | py | Python | lingvo/tasks/image/input_generator.py | allenwang28/lingvo | 26d3d6672d3f46d8f281c2aa9f57166ef6296738 | [
"Apache-2.0"
] | 2,611 | 2018-10-16T20:14:10.000Z | 2022-03-31T14:48:41.000Z | lingvo/tasks/image/input_generator.py | allenwang28/lingvo | 26d3d6672d3f46d8f281c2aa9f57166ef6296738 | [
"Apache-2.0"
] | 249 | 2018-10-27T06:02:29.000Z | 2022-03-30T18:00:39.000Z | lingvo/tasks/image/input_generator.py | allenwang28/lingvo | 26d3d6672d3f46d8f281c2aa9f57166ef6296738 | [
"Apache-2.0"
] | 436 | 2018-10-25T05:31:45.000Z | 2022-03-31T07:26:03.000Z | # Lint as: python3
# Copyright 2018 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 ... | 27.84466 | 80 | 0.639121 |
46a69a58e97c1c80acfb7499d4de7c5a7c1ed4bb | 875 | py | Python | src/solutions/part1/q389_find_diff.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/solutions/part1/q389_find_diff.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | src/solutions/part1/q389_find_diff.py | hychrisli/PyAlgorithms | 71e537180f3b371d0d2cc47b11cb68ec13a8ac68 | [
"Apache-2.0"
] | null | null | null | from src.base.solution import Solution
from src.tests.part1.q389_test_find_diff import FindDiffTestCases
if __name__ == '__main__':
solution = FindDiff()
solution.run_tests() | 24.305556 | 65 | 0.580571 |
46aa55bc676b909ffd23d501d1007af51f171f16 | 293 | py | Python | mydict.py | zengboming/python | 13018f476554adc3bff831af27c08f7c216d4b09 | [
"Apache-2.0"
] | null | null | null | mydict.py | zengboming/python | 13018f476554adc3bff831af27c08f7c216d4b09 | [
"Apache-2.0"
] | null | null | null | mydict.py | zengboming/python | 13018f476554adc3bff831af27c08f7c216d4b09 | [
"Apache-2.0"
] | null | null | null | #unit
#mydict.py
| 19.533333 | 67 | 0.68942 |
46ab99e6eb8d1fdb04330410131bcc8d1d609369 | 19,623 | py | Python | copy_annotations/conflict.py | abhinav-kumar-thakur/TabularCellTypeClassification | 844029ee59867c41acfa75c8ce12db6713c9960c | [
"MIT"
] | 19 | 2019-06-06T18:23:29.000Z | 2022-01-06T15:30:20.000Z | copy_annotations/conflict.py | abhinav-kumar-thakur/TabularCellTypeClassification | 844029ee59867c41acfa75c8ce12db6713c9960c | [
"MIT"
] | 524 | 2019-07-01T19:18:39.000Z | 2022-02-13T19:33:02.000Z | copy_annotations/conflict.py | abhinav-kumar-thakur/TabularCellTypeClassification | 844029ee59867c41acfa75c8ce12db6713c9960c | [
"MIT"
] | 18 | 2019-06-06T18:23:07.000Z | 2021-07-15T06:01:17.000Z | import contextlib
import os
import tempfile
import warnings
from enum import Enum
import mip
| 42.109442 | 169 | 0.587983 |
46abd7d33dffc8675b1cbcb1f61d7140668df589 | 249 | py | Python | output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_pattern_1_xsd.nistschema_sv_iv_atomic_integer_pattern_1 import NistschemaSvIvAtomicIntegerPattern1
__all__ = [
"NistschemaSvIvAtomicIntegerPattern1",
]
| 41.5 | 190 | 0.891566 |
46ad0929668e5c287bd02c9734950a08fc91328e | 3,919 | py | Python | Dietscheduler/lib/menu_converter.py | floromaer/DietScheduler | 48403f13dbcaa7981f252361819f06435a75333b | [
"MIT"
] | null | null | null | Dietscheduler/lib/menu_converter.py | floromaer/DietScheduler | 48403f13dbcaa7981f252361819f06435a75333b | [
"MIT"
] | null | null | null | Dietscheduler/lib/menu_converter.py | floromaer/DietScheduler | 48403f13dbcaa7981f252361819f06435a75333b | [
"MIT"
] | null | null | null | import re
import xlsxwriter
| 48.382716 | 446 | 0.63307 |
46ad5a9032022b2051fa16df11181281b5f9eae8 | 1,256 | py | Python | example_problems/tutorial/graph_connectivity/services/esempi/check_one_sol_server.py | romeorizzi/TAlight | 2217f8790820d8ec7ab076c836b2d182877d8ee8 | [
"MIT"
] | 3 | 2021-01-08T09:56:46.000Z | 2021-03-02T20:47:29.000Z | example_problems/tutorial/graph_connectivity/services/esempi/check_one_sol_server.py | romeorizzi/TAlight | 2217f8790820d8ec7ab076c836b2d182877d8ee8 | [
"MIT"
] | 1 | 2021-01-23T06:50:31.000Z | 2021-03-17T15:35:18.000Z | example_problems/tutorial/graph_connectivity/services/esempi/check_one_sol_server.py | romeorizzi/TAlight | 2217f8790820d8ec7ab076c836b2d182877d8ee8 | [
"MIT"
] | 4 | 2021-01-06T12:10:23.000Z | 2021-03-16T22:16:07.000Z | #!/usr/bin/env python3
from sys import stderr, exit
from TALinputs import TALinput
from multilanguage import Env, Lang, TALcolors
from parentheses_lib import recognize
# METADATA OF THIS TAL_SERVICE:
problem="parentheses"
service="check_one_sol_server"
args_list = [
('input_formula',str),
('n',s... | 29.904762 | 162 | 0.65207 |
46ad743d904b177a6882bac14c8a5ed867753ee6 | 2,436 | py | Python | app/validation/translator.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | null | null | null | app/validation/translator.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | null | null | null | app/validation/translator.py | codingedward/book-a-meal-api | 36756abc225bf7e8306330f2c3e223dc32af7869 | [
"MIT"
] | 2 | 2018-10-01T17:45:19.000Z | 2020-12-07T13:48:25.000Z | """Translates validation error messages for the response"""
messages = {
'accepted': 'The :field: must be accepted.',
'after': 'The :field: must be a date after :other:.',
'alpha': 'The :field: may contain only letters.',
'alpha_dash': 'The :field: may only contain letters, numbers, and dashes.',
... | 47.764706 | 85 | 0.630542 |
46af16319f2d029f582d103a8745545d6de7422c | 333 | py | Python | chat/main/consumers.py | mlambir/channels_talk_pyconar2016 | 82e54eb914fb005fcdebad1ed07cede898957733 | [
"MIT"
] | 12 | 2016-11-30T15:22:22.000Z | 2018-02-27T23:03:12.000Z | chat/main/consumers.py | mlambir/channels_talk_pyconar2016 | 82e54eb914fb005fcdebad1ed07cede898957733 | [
"MIT"
] | null | null | null | chat/main/consumers.py | mlambir/channels_talk_pyconar2016 | 82e54eb914fb005fcdebad1ed07cede898957733 | [
"MIT"
] | null | null | null | from channels import Group
# websocket.connect
# websocket.receive
# websocket.disconnect | 22.2 | 48 | 0.708709 |
46af2004cde5fbac1f953e967f4311dafcb8c8e2 | 8,154 | py | Python | env/enviroment.py | Dorebom/robot_pybullet | 21e95864da28eb5553266513b1a1a735901395b6 | [
"MIT"
] | null | null | null | env/enviroment.py | Dorebom/robot_pybullet | 21e95864da28eb5553266513b1a1a735901395b6 | [
"MIT"
] | null | null | null | env/enviroment.py | Dorebom/robot_pybullet | 21e95864da28eb5553266513b1a1a735901395b6 | [
"MIT"
] | null | null | null | from copy import deepcopy
import numpy as np
import pybullet as p
import gym
from gym import spaces
from env.robot import Manipulator
from env.work import Work | 38.828571 | 101 | 0.589159 |
46b07861f72e984eb2546daa1dab51801dd00b0a | 1,820 | py | Python | Thread/Threading.py | zxg110/PythonGrammer | 7d07648c62e3d49123688c33d09fe4bb369cf852 | [
"Apache-2.0"
] | null | null | null | Thread/Threading.py | zxg110/PythonGrammer | 7d07648c62e3d49123688c33d09fe4bb369cf852 | [
"Apache-2.0"
] | null | null | null | Thread/Threading.py | zxg110/PythonGrammer | 7d07648c62e3d49123688c33d09fe4bb369cf852 | [
"Apache-2.0"
] | null | null | null | import _thread
import time
import threading
#
# def print_time(threadName,delay):
# count = 0;
# while count < 5:
# time.sleep(delay)
# count += 1;
# print("%s: %s" % (threadName, time.ctime(time.time())))
#
# try:
# _thread.start_new(print_time,("Thread-1",2,))
# _thread.start_n... | 26 | 73 | 0.666484 |
46b1624f4a6a70026386fb13d4c9f4cd8b816721 | 492 | py | Python | server/petsAPI/views.py | StoyanDimStoyanov/ReactDJango | 8c30730fbd3af0064f97444a91e65a9029a1dc0f | [
"MIT"
] | null | null | null | server/petsAPI/views.py | StoyanDimStoyanov/ReactDJango | 8c30730fbd3af0064f97444a91e65a9029a1dc0f | [
"MIT"
] | null | null | null | server/petsAPI/views.py | StoyanDimStoyanov/ReactDJango | 8c30730fbd3af0064f97444a91e65a9029a1dc0f | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework import generics
# Create your views here.
from petsAPI.models import Pets
from petsAPI.serializers import PetSerializer
| 24.6 | 63 | 0.792683 |
46b234a2d05a51f6fb5809df7fa1df618dfd4547 | 2,153 | py | Python | cluster_faces.py | sandhyalaxmiK/faces_clustering | e2da7e057ce5ec749e0c631f450e262f046b8e1d | [
"MIT"
] | null | null | null | cluster_faces.py | sandhyalaxmiK/faces_clustering | e2da7e057ce5ec749e0c631f450e262f046b8e1d | [
"MIT"
] | null | null | null | cluster_faces.py | sandhyalaxmiK/faces_clustering | e2da7e057ce5ec749e0c631f450e262f046b8e1d | [
"MIT"
] | null | null | null | import face_recognition
import sys,os
import re,cv2
input_dir_path=sys.argv[1]
output_dir_path=sys.argv[2]
if not os.path.exists(output_dir_path):
os.mkdir(output_dir_path)
if not os.path.exists(output_dir_path+'/'+str(1)):
os.mkdir(output_dir_path+'/'+str(1))
input_images=sorted_alphanumeric(os.listdir(input_dir_pa... | 39.87037 | 142 | 0.75987 |
46b37f4db1428d7e3e970e352faebde87a24d82f | 7,329 | py | Python | src/bbdata/endpoint/output/objects.py | big-building-data/bbdata-python | 46335c9f8db9ceccbd795c4931db0e3041ba9a50 | [
"MIT"
] | null | null | null | src/bbdata/endpoint/output/objects.py | big-building-data/bbdata-python | 46335c9f8db9ceccbd795c4931db0e3041ba9a50 | [
"MIT"
] | null | null | null | src/bbdata/endpoint/output/objects.py | big-building-data/bbdata-python | 46335c9f8db9ceccbd795c4931db0e3041ba9a50 | [
"MIT"
] | null | null | null | import requests
from bbdata.config import output_api_url
from bbdata.util import handle_response
| 33.619266 | 78 | 0.592714 |
46b3fea476ee5e207c6461dc2f22693adf1376cd | 94 | py | Python | python/tako/client/__init__.py | vyomkeshj/tako | d0906df5cdc0023ee955ad34d9eb4696b5ecec5e | [
"MIT"
] | null | null | null | python/tako/client/__init__.py | vyomkeshj/tako | d0906df5cdc0023ee955ad34d9eb4696b5ecec5e | [
"MIT"
] | null | null | null | python/tako/client/__init__.py | vyomkeshj/tako | d0906df5cdc0023ee955ad34d9eb4696b5ecec5e | [
"MIT"
] | null | null | null | from .exception import TakoException, TaskFailed # noqa
from .session import connect # noqa
| 31.333333 | 56 | 0.787234 |
46b430ceffc244986e1b0a3ab9f0c59e0b7629b0 | 5,533 | py | Python | helpers/parser.py | yasahi-hpc/AMRNet | 5858d464bdfe409a5ab50889104768dda3c70508 | [
"MIT"
] | null | null | null | helpers/parser.py | yasahi-hpc/AMRNet | 5858d464bdfe409a5ab50889104768dda3c70508 | [
"MIT"
] | null | null | null | helpers/parser.py | yasahi-hpc/AMRNet | 5858d464bdfe409a5ab50889104768dda3c70508 | [
"MIT"
] | null | null | null | import argparse
| 39.521429 | 74 | 0.325863 |
46b4aae481a7dcad8401c1fdb98aae95f3b590c6 | 2,207 | py | Python | api/patients/urls.py | Wellheor1/l2 | d980210921c545c68fe9d5522bb693d567995024 | [
"MIT"
] | 10 | 2018-03-14T06:17:06.000Z | 2022-03-10T05:33:34.000Z | api/patients/urls.py | Wellheor1/l2 | d980210921c545c68fe9d5522bb693d567995024 | [
"MIT"
] | 512 | 2018-09-10T07:37:34.000Z | 2022-03-30T02:23:43.000Z | api/patients/urls.py | D00dleman/l2 | 0870144537ee340cd8db053a608d731e186f02fb | [
"MIT"
] | 24 | 2018-07-31T05:52:12.000Z | 2022-02-08T00:39:41.000Z | from django.urls import path
from . import views
urlpatterns = [
path('search-card', views.patients_search_card),
path('search-individual', views.patients_search_individual),
path('search-l2-card', views.patients_search_l2_card),
path('create-l2-individual-from-card', views.create_l2_individual_from_ca... | 53.829268 | 86 | 0.752152 |
46b5e33d3c7311128739c73f9d648a67b6c52c18 | 1,139 | py | Python | resolwe_bio/kb/migrations/0002_alter_field_max_length.py | JureZmrzlikar/resolwe-bio | 54cde9b293abebad2db0564c9fefa33d6d2fe835 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/kb/migrations/0002_alter_field_max_length.py | JureZmrzlikar/resolwe-bio | 54cde9b293abebad2db0564c9fefa33d6d2fe835 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/kb/migrations/0002_alter_field_max_length.py | JureZmrzlikar/resolwe-bio | 54cde9b293abebad2db0564c9fefa33d6d2fe835 | [
"Apache-2.0"
] | 1 | 2021-09-03T08:50:54.000Z | 2021-09-03T08:50:54.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2016-11-15 07:06
from __future__ import unicode_literals
import django.contrib.postgres.fields
from django.db import migrations, models
| 35.59375 | 302 | 0.604039 |
46b6263389154f262f0911cbbda3dfc8ad613ae7 | 3,014 | py | Python | setup.py | conan-hdk/xlwings | 44395c4d18b46f76249279b7d0965e640291499c | [
"BSD-3-Clause"
] | null | null | null | setup.py | conan-hdk/xlwings | 44395c4d18b46f76249279b7d0965e640291499c | [
"BSD-3-Clause"
] | null | null | null | setup.py | conan-hdk/xlwings | 44395c4d18b46f76249279b7d0965e640291499c | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import re
import glob
from setuptools import setup, find_packages
# long_description: Take from README file
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
readme = f.read()
# Version Number
with open(os.path.join(os.path.dirname(__file__), 'xlwings', '__init__.py')) as... | 42.450704 | 214 | 0.651626 |
46b6eaa6075021f6bee39458eda6a940c6b7c8b2 | 2,044 | py | Python | secedgar/tests/test_cli.py | abbadata/sec-edgar | f801d2137a988c928449bf64b44a85c01e80fd3a | [
"Apache-2.0"
] | null | null | null | secedgar/tests/test_cli.py | abbadata/sec-edgar | f801d2137a988c928449bf64b44a85c01e80fd3a | [
"Apache-2.0"
] | null | null | null | secedgar/tests/test_cli.py | abbadata/sec-edgar | f801d2137a988c928449bf64b44a85c01e80fd3a | [
"Apache-2.0"
] | null | null | null | import pytest
from click.testing import CliRunner
from secedgar.cli import daily, filing
from secedgar.utils.exceptions import FilingTypeError
| 34.066667 | 90 | 0.672211 |
46b74e2cb30b2d76500271ee27ada8ec4c26cdc1 | 2,013 | py | Python | hydro.py | garethcmurphy/hydrosolve | ef150a6adcab1e835b4b907c5fed2dd58cd4ba08 | [
"MIT"
] | null | null | null | hydro.py | garethcmurphy/hydrosolve | ef150a6adcab1e835b4b907c5fed2dd58cd4ba08 | [
"MIT"
] | null | null | null | hydro.py | garethcmurphy/hydrosolve | ef150a6adcab1e835b4b907c5fed2dd58cd4ba08 | [
"MIT"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import gridspec
nstep=200
nx=400
nv=3
u=np.zeros((nx,nv))
prim=np.zeros((nx,nv))
gam=5./3.
dx=1./nx
dt=1e-3
time=0
x=np.linspace(0,1,num=nx)
prim[:,0]=1.
prim[:,1]=0.
prim[:,2]=1.
for i in range(int(nx/2),nx):
prim[i,0]=0.1
... | 18.638889 | 42 | 0.516642 |
d3b125d2c7eabb30628cc33826a64ef3ed9c92f4 | 22,179 | py | Python | tests/test_pluralize.py | weixu365/pluralizer-py | 793b2a8ff1320f701e70810038e0902c610aa5b0 | [
"MIT"
] | 4 | 2020-05-10T12:02:57.000Z | 2022-02-02T11:20:02.000Z | tests/test_pluralize.py | weixu365/pluralizer-py | 793b2a8ff1320f701e70810038e0902c610aa5b0 | [
"MIT"
] | 30 | 2020-05-10T10:07:00.000Z | 2022-03-26T18:22:43.000Z | tests/test_pluralize.py | weixu365/pluralizer-py | 793b2a8ff1320f701e70810038e0902c610aa5b0 | [
"MIT"
] | null | null | null |
import unittest
from pluralizer import Pluralizer
import re
# Standard singular/plural matches.
#
# @type {Array}
BASIC_TESTS = [
# Uncountables.
['firmware', 'firmware'],
['fish', 'fish'],
['media', 'media'],
['moose', 'moose'],
['police', 'police'],
['sheep', 'sheep'],
['series', 's... | 28.039191 | 83 | 0.515803 |
d3b146cefcbdfbb497115b74257a2891722524b5 | 1,988 | py | Python | promgen/util.py | sundy-li/promgen | e532bde46b542dd66f46e3dd654bc1ad31deeec7 | [
"MIT"
] | null | null | null | promgen/util.py | sundy-li/promgen | e532bde46b542dd66f46e3dd654bc1ad31deeec7 | [
"MIT"
] | 8 | 2021-04-08T21:59:34.000Z | 2022-02-10T10:42:43.000Z | promgen/util.py | Andreich2010/promgen | dae2b720f30b0c002aa50a74c4c4fc8dfbcbb2b7 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 LINE Corporation
# These sources are released under the terms of the MIT license: see LICENSE
import requests.sessions
from django.db.models import F
from promgen.version import __version__
from django.conf import settings
# Wrappers around request api to ensure we always attach our user agent
#... | 28.811594 | 87 | 0.667505 |
d3b1ab341873d6a614ea74d34b804a1a2793bea2 | 5,478 | py | Python | integration_tests/test_suites/k8s-integration-test-suite/test_utils.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_suites/k8s-integration-test-suite/test_utils.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_suites/k8s-integration-test-suite/test_utils.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | import time
import kubernetes
import pytest
from dagster_k8s.client import DagsterK8sError, WaitForPodState
from dagster_k8s.utils import retrieve_pod_logs, wait_for_job_success, wait_for_pod
from dagster_k8s_test_infra.helm import get_helm_test_namespace
| 41.18797 | 100 | 0.61245 |
d3b2063cf7dc483f806ac22531b14a9333116ffb | 1,092 | py | Python | radioepg/migrations/0001_initial.py | mervij/radiodns | 01543cf1e4de8de335af0301616e089c35fc67f8 | [
"Apache-2.0"
] | null | null | null | radioepg/migrations/0001_initial.py | mervij/radiodns | 01543cf1e4de8de335af0301616e089c35fc67f8 | [
"Apache-2.0"
] | 8 | 2021-05-17T10:54:28.000Z | 2021-06-08T12:02:37.000Z | radioepg/migrations/0001_initial.py | mervij/radiodns | 01543cf1e4de8de335af0301616e089c35fc67f8 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-15 08:52
from django.db import migrations, models
import django.db.models.deletion
| 32.117647 | 115 | 0.571429 |
d3b26049eb155f0068830e3349db9d53a2b93029 | 2,088 | py | Python | uitester/ui/case_manager/tag_names_line_edit.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | 4 | 2016-07-12T09:01:52.000Z | 2016-12-07T03:11:02.000Z | uitester/ui/case_manager/tag_names_line_edit.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | null | null | null | uitester/ui/case_manager/tag_names_line_edit.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | 3 | 2016-11-29T02:13:17.000Z | 2019-10-16T06:25:20.000Z | from PyQt5.QtCore import Qt, QStringListModel
from PyQt5.QtWidgets import QLineEdit, QCompleter
| 34.229508 | 84 | 0.631226 |
d3b26adf9f1c111614b51c252d8d80c26d192abc | 337 | py | Python | utils/__init__.py | millermuttu/torch_soft | 70a692650b6eb8c70000e0f8dc2b22cbb9f94741 | [
"MIT"
] | null | null | null | utils/__init__.py | millermuttu/torch_soft | 70a692650b6eb8c70000e0f8dc2b22cbb9f94741 | [
"MIT"
] | null | null | null | utils/__init__.py | millermuttu/torch_soft | 70a692650b6eb8c70000e0f8dc2b22cbb9f94741 | [
"MIT"
] | null | null | null | # # importing all the modules at once
# from .config import *
# from .normalization import *
# from .others import *
# from .img_reg import *
# from .transformation import *
# from .visualization import *
# importing the modules in a selective way
import utils.config
import utils.normalization
import utils.misc
import... | 24.071429 | 42 | 0.762611 |
d3b2a1b997cbe83aa232f13b17539c3d7b815053 | 434 | py | Python | tasks.py | epu-ntua/QualiChain-mediator | 1d0f848d60861665d95ad0359914add361551763 | [
"MIT"
] | 2 | 2020-03-09T11:10:15.000Z | 2020-03-11T06:11:58.000Z | tasks.py | epu-ntua/QualiChain-mediator | 1d0f848d60861665d95ad0359914add361551763 | [
"MIT"
] | 2 | 2021-03-31T19:43:58.000Z | 2021-12-13T20:34:57.000Z | tasks.py | epu-ntua/QualiChain-mediator | 1d0f848d60861665d95ad0359914add361551763 | [
"MIT"
] | 2 | 2020-03-12T11:14:20.000Z | 2020-07-07T06:17:45.000Z | from celery import Celery
from clients.dobie_client import send_data_to_dobie
app = Celery('qualichain_mediator')
app.config_from_object('settings', namespace='CELERY_')
| 25.529412 | 75 | 0.767281 |
d3b3426ac37ef57bd78d3b9aa39a2ef7e95619d6 | 1,174 | py | Python | ingest/ambit_geo.py | brianhouse/okavango | 4006940ddead3f31eea701efb9b9dcdc7b19402e | [
"MIT"
] | 2 | 2015-01-25T06:20:03.000Z | 2015-02-15T23:54:41.000Z | ingest/ambit_geo.py | brianhouse/okavango_15 | 4006940ddead3f31eea701efb9b9dcdc7b19402e | [
"MIT"
] | null | null | null | ingest/ambit_geo.py | brianhouse/okavango_15 | 4006940ddead3f31eea701efb9b9dcdc7b19402e | [
"MIT"
] | 3 | 2017-11-14T21:18:23.000Z | 2021-06-20T21:08:31.000Z | import json, math
from ingest import ingest_json_body
from housepy import config, log, strings, util | 32.611111 | 87 | 0.537479 |
d3b45e5164e572fbde2110d62cb448013353f1cd | 1,593 | py | Python | gandyndns.py | nim65s/scripts | 2c61bd77bfca6ae6437654e43ad2bc95d611360a | [
"BSD-2-Clause"
] | 1 | 2020-12-17T09:41:42.000Z | 2020-12-17T09:41:42.000Z | gandyndns.py | nim65s/scripts | 2c61bd77bfca6ae6437654e43ad2bc95d611360a | [
"BSD-2-Clause"
] | null | null | null | gandyndns.py | nim65s/scripts | 2c61bd77bfca6ae6437654e43ad2bc95d611360a | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
'''update gandi DNS domain entry, with LiveDNS v5
Cf. https://doc.livedns.gandi.net/#work-with-domains
'''
import argparse
import ipaddress
import json
import os
from subprocess import check_output
import requests
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('-v', '... | 32.510204 | 112 | 0.696171 |
d3b4e36f678d36e360884bedfd448ece0a34ced3 | 1,895 | py | Python | leetcode.com/python/314_Binary_Tree_Vertical_Order_Traversal.py | mamane19/coding-interview-gym | 20ae1a048eddbc9a32c819cf61258e2b57572f05 | [
"MIT"
] | 713 | 2019-11-19T16:11:25.000Z | 2022-03-31T02:27:52.000Z | leetcode.com/python/314_Binary_Tree_Vertical_Order_Traversal.py | arunsank/coding-interview-gym | 8131e3a82795707e144fe55d765b6c15bdb97306 | [
"MIT"
] | 7 | 2020-01-16T17:07:18.000Z | 2021-11-15T18:24:39.000Z | leetcode.com/python/314_Binary_Tree_Vertical_Order_Traversal.py | arunsank/coding-interview-gym | 8131e3a82795707e144fe55d765b6c15bdb97306 | [
"MIT"
] | 393 | 2019-11-18T17:55:45.000Z | 2022-03-28T20:26:32.000Z | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
from collections import deque
from collections import defaultdict
# My solution during mock, getting TLE, don't know ... | 31.583333 | 109 | 0.582058 |
d3b4eac02574fc5ff2fd374b340d31cb4dba25c1 | 3,750 | py | Python | src/sentry/models/pluginhealth.py | ayesha-omarali/sentry | 96f81a1805227c26234e6317771bc0dcb5c176ad | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/pluginhealth.py | ayesha-omarali/sentry | 96f81a1805227c26234e6317771bc0dcb5c176ad | [
"BSD-3-Clause"
] | null | null | null | src/sentry/models/pluginhealth.py | ayesha-omarali/sentry | 96f81a1805227c26234e6317771bc0dcb5c176ad | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.db.models import (
ArrayField, BoundedPositiveIntegerField, Model, FlexibleForeignKey, sane_repr
)
from django.db import models
from jsonfield import JSONField
from django.utils import timezone
from sentry.constants import ObjectStatus
from django.utils.translatio... | 32.327586 | 82 | 0.686133 |
d3b76c1c0fc989bb41ad8f58fabce2395587d211 | 1,615 | py | Python | src/masonite/oauth/drivers/FacebookDriver.py | girardinsamuel/masonite-socialite | 04110601b299d8505ec453b7743124cb88047d9d | [
"MIT"
] | 1 | 2021-05-07T16:37:03.000Z | 2021-05-07T16:37:03.000Z | src/masonite/oauth/drivers/FacebookDriver.py | girardinsamuel/masonite-socialite | 04110601b299d8505ec453b7743124cb88047d9d | [
"MIT"
] | 11 | 2021-05-17T06:45:48.000Z | 2021-10-03T15:16:23.000Z | src/masonite/oauth/drivers/FacebookDriver.py | girardinsamuel/masonite-socialite | 04110601b299d8505ec453b7743124cb88047d9d | [
"MIT"
] | null | null | null | from .BaseDriver import BaseDriver
from ..OAuthUser import OAuthUser
| 28.333333 | 90 | 0.479257 |
d3b8efd54656a0b32ac0c5b886fd7d4ce09f8a83 | 1,266 | py | Python | python/convert_to_readwise.py | t27/highlights-convert | a6c6696ece4fabbbb56e420cb23c0466710e1345 | [
"MIT"
] | null | null | null | python/convert_to_readwise.py | t27/highlights-convert | a6c6696ece4fabbbb56e420cb23c0466710e1345 | [
"MIT"
] | null | null | null | python/convert_to_readwise.py | t27/highlights-convert | a6c6696ece4fabbbb56e420cb23c0466710e1345 | [
"MIT"
] | 1 | 2021-06-29T20:40:06.000Z | 2021-06-29T20:40:06.000Z | import pandas as pd
import json
import glob
columns = ["Highlight","Title","Author","URL","Note","Location"]
# for sample of the input json look at any json in the root of the `results` folder
def convert_to_readwise_df(json_files):
"""Convert the internal json format to a readwise compatible dataframe
Args:... | 32.461538 | 83 | 0.590837 |
d3ba25fae7aacb5e43b639c41eadbd3d14fb7a48 | 303 | py | Python | ms_deisotope/qc/__init__.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 18 | 2017-09-01T12:26:12.000Z | 2022-02-23T02:31:29.000Z | ms_deisotope/qc/__init__.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 19 | 2017-03-12T20:40:36.000Z | 2022-03-31T22:50:47.000Z | ms_deisotope/qc/__init__.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 14 | 2016-05-06T02:25:30.000Z | 2022-03-31T14:40:06.000Z | """A collection of methods for determining whether a given spectrum is
of high quality (likely to produce a high quality interpretation)
"""
from .heuristic import xrea
from .isolation import CoIsolation, PrecursorPurityEstimator
__all__ = [
"xrea",
"CoIsolation", "PrecursorPurityEstimator"
]
| 27.545455 | 70 | 0.772277 |
d3bbc84b4a938b83b84adeff2d313509849c11f6 | 3,855 | py | Python | rpi_animations/message.py | Anski-D/rpi_animations_old | b019a301ba777d76e3cedc6b86359570e2c2f18b | [
"MIT"
] | null | null | null | rpi_animations/message.py | Anski-D/rpi_animations_old | b019a301ba777d76e3cedc6b86359570e2c2f18b | [
"MIT"
] | null | null | null | rpi_animations/message.py | Anski-D/rpi_animations_old | b019a301ba777d76e3cedc6b86359570e2c2f18b | [
"MIT"
] | null | null | null | from .item import Item
| 27.147887 | 107 | 0.575357 |
d3bc12f8ef0d8afa0eabbca33671def2b9e2dfc8 | 4,293 | py | Python | styrobot/cogs/help.py | ThatRedKite/styrobot | c6c449aec99cb59c4695f739d59efe2def0e0064 | [
"MIT"
] | 1 | 2021-08-02T23:19:31.000Z | 2021-08-02T23:19:31.000Z | styrobot/cogs/help.py | ThatRedKite/styrobot | c6c449aec99cb59c4695f739d59efe2def0e0064 | [
"MIT"
] | null | null | null | styrobot/cogs/help.py | ThatRedKite/styrobot | c6c449aec99cb59c4695f739d59efe2def0e0064 | [
"MIT"
] | 1 | 2021-07-28T02:26:54.000Z | 2021-07-28T02:26:54.000Z | import discord
from discord.ext import commands
from styrobot.util.contrib import info
import random
def setup(bot):
bot.add_cog(HelpCog(bot))
| 44.257732 | 109 | 0.610063 |
d3bcd85e84067fe1c97d2fef2c0994e569b7ca18 | 1,527 | py | Python | misc/Queue_hello.py | benhunter/py-stuff | a04f94851370e08a65792a53a6207f3146eb130b | [
"MIT"
] | 3 | 2017-05-22T03:14:21.000Z | 2019-05-24T11:44:15.000Z | misc/Queue_hello.py | benhunter/py-stuff | a04f94851370e08a65792a53a6207f3146eb130b | [
"MIT"
] | null | null | null | misc/Queue_hello.py | benhunter/py-stuff | a04f94851370e08a65792a53a6207f3146eb130b | [
"MIT"
] | null | null | null | # Testing with threading and queue modules for Thread-based parallelism
import threading, queue, time
# The worker thread gets jobs off the queue. When the queue is empty, it
# assumes there will be no more work and exits.
# (Realistically workers will run until terminated.)
# Work function that processes the argu... | 26.327586 | 90 | 0.629339 |
d3bea2de7d4525c6881fb3abdb31815d971e7131 | 506 | py | Python | tests/conftest.py | Beanxx/alonememo | aa90bcca6a5dcaa41305b162ac5d6dbe8d0d2562 | [
"MIT"
] | null | null | null | tests/conftest.py | Beanxx/alonememo | aa90bcca6a5dcaa41305b162ac5d6dbe8d0d2562 | [
"MIT"
] | null | null | null | tests/conftest.py | Beanxx/alonememo | aa90bcca6a5dcaa41305b162ac5d6dbe8d0d2562 | [
"MIT"
] | null | null | null | import pytest
from pymongo import MongoClient
import app as flask_app
test_database_name = 'spartatest'
client = MongoClient('localhost', 27017)
db = client.get_database(test_database_name)
| 20.24 | 55 | 0.727273 |
d3bfaf1d9fa752290f67cc0958281b146d4daff0 | 98 | py | Python | threader/__init__.py | mwoolweaver/threader | fdb4fe9ab71d3c85146969f716d10b78f970323e | [
"MIT"
] | 34 | 2017-07-24T20:54:06.000Z | 2022-03-18T13:10:11.000Z | threader/__init__.py | mwoolweaver/threader | fdb4fe9ab71d3c85146969f716d10b78f970323e | [
"MIT"
] | 2 | 2019-05-28T07:21:15.000Z | 2019-07-23T21:45:43.000Z | threader/__init__.py | mwoolweaver/threader | fdb4fe9ab71d3c85146969f716d10b78f970323e | [
"MIT"
] | 8 | 2019-05-28T06:49:02.000Z | 2022-02-04T22:59:09.000Z | """Tools to quickly create twitter threads."""
from .thread import Threader
__version__ = "0.1.1" | 24.5 | 46 | 0.734694 |
d3bfd6a64622fae1b5dc880f345c000e85f77a5b | 1,080 | py | Python | src/utility/count_pages.py | WikiCommunityHealth/wikimedia-revert | b584044d8b6a61a79d98656db356bf1f74d23ee0 | [
"MIT"
] | null | null | null | src/utility/count_pages.py | WikiCommunityHealth/wikimedia-revert | b584044d8b6a61a79d98656db356bf1f74d23ee0 | [
"MIT"
] | null | null | null | src/utility/count_pages.py | WikiCommunityHealth/wikimedia-revert | b584044d8b6a61a79d98656db356bf1f74d23ee0 | [
"MIT"
] | null | null | null | # count numbers of pages from the Mediawiki history dumps
import bz2
import subprocess
import os
from datetime import datetime
inizio = datetime.now()
dataset_folder = '/home/gandelli/dev/data/it/'
totali = set()
revisioni = set()
revert = set()
ns0 = set()
for year in range(2001, 2021):
dump_in = bz2.open(da... | 23.478261 | 74 | 0.566667 |
d3c078904bb9cd81a5346502975e431e6b94a34e | 6,395 | py | Python | livescore/LivescoreCommon.py | TechplexEngineer/frc-livescore | dedf68218a1a8e2f8a463ded835ea2a7d4b51b78 | [
"MIT"
] | null | null | null | livescore/LivescoreCommon.py | TechplexEngineer/frc-livescore | dedf68218a1a8e2f8a463ded835ea2a7d4b51b78 | [
"MIT"
] | null | null | null | livescore/LivescoreCommon.py | TechplexEngineer/frc-livescore | dedf68218a1a8e2f8a463ded835ea2a7d4b51b78 | [
"MIT"
] | null | null | null | import colorsys
import cv2
from PIL import Image
import pkg_resources
from .LivescoreBase import LivescoreBase
from .details import Alliance, OngoingMatchDetails
| 39.475309 | 124 | 0.603597 |
d3c0c248eab748f6973cc1f7d32930648b9e6320 | 1,825 | py | Python | challenges/challenge.py | Tech-With-Tim/models | 221fce614776df01b151e73071c788c3ce57dc52 | [
"MIT"
] | 2 | 2021-07-09T18:53:15.000Z | 2021-08-06T06:21:14.000Z | challenges/challenge.py | Tech-With-Tim/models | 221fce614776df01b151e73071c788c3ce57dc52 | [
"MIT"
] | 8 | 2021-07-09T13:08:07.000Z | 2021-09-12T20:25:08.000Z | challenges/challenge.py | Tech-With-Tim/models | 221fce614776df01b151e73071c788c3ce57dc52 | [
"MIT"
] | 4 | 2021-07-09T12:32:20.000Z | 2021-07-29T15:19:25.000Z | from postDB import Model, Column, types
from datetime import datetime
import utils
| 40.555556 | 101 | 0.633973 |
d3c2f371f8e9bd53dfa26410d72fcf0c4b952e00 | 1,004 | py | Python | settings.py | embrace-inpe/cycle-slip-correction | c465dd4d45ea7df63a18749e26ba4bf0aa27eb59 | [
"MIT"
] | 6 | 2019-05-20T21:23:41.000Z | 2021-06-23T15:00:30.000Z | settings.py | embrace-inpe/cycle-slip-correction | c465dd4d45ea7df63a18749e26ba4bf0aa27eb59 | [
"MIT"
] | null | null | null | settings.py | embrace-inpe/cycle-slip-correction | c465dd4d45ea7df63a18749e26ba4bf0aa27eb59 | [
"MIT"
] | 5 | 2018-12-27T16:46:45.000Z | 2020-09-14T13:44:00.000Z | """
Commom settings to all applications
"""
A = 40.3
TECU = 1.0e16
C = 299792458
F1 = 1.57542e9
F2 = 1.22760e9
factor_1 = (F1 - F2) / (F1 + F2) / C
factor_2 = (F1 * F2) / (F2 - F1) / C
DIFF_TEC_MAX = 0.05
LIMIT_STD = 7.5
plot_it = True
REQUIRED_VERSION = 3.01
CONSTELLATIONS = ['G', 'R']
COLUMNS_IN_RINEX = {'3.03': ... | 33.466667 | 100 | 0.351594 |
d3c36036476de94ac751c017398b3c5474c873f2 | 51 | py | Python | io_almacen/channel/__init__.py | xyla-io/io_almacen | 76725391b496fe3f778d013fc680ae80637eb74b | [
"MIT"
] | null | null | null | io_almacen/channel/__init__.py | xyla-io/io_almacen | 76725391b496fe3f778d013fc680ae80637eb74b | [
"MIT"
] | null | null | null | io_almacen/channel/__init__.py | xyla-io/io_almacen | 76725391b496fe3f778d013fc680ae80637eb74b | [
"MIT"
] | null | null | null | from .channel_io import Channel, channel_entity_url | 51 | 51 | 0.882353 |
d3c3d276986b71cc9d8aae788f2dcd9c3f2eb96a | 1,009 | py | Python | tests/api/test_libcoap_api.py | ggravlingen/ikeatradfri | 9eef5317ab770de874c407449489604b2fdf35f1 | [
"MIT"
] | 726 | 2017-04-12T22:55:39.000Z | 2020-09-02T20:47:13.000Z | tests/api/test_libcoap_api.py | ggravlingen/ikeatradfri | 9eef5317ab770de874c407449489604b2fdf35f1 | [
"MIT"
] | 248 | 2017-04-12T21:45:10.000Z | 2020-09-03T08:48:37.000Z | tests/api/test_libcoap_api.py | ggravlingen/ikeatradfri | 9eef5317ab770de874c407449489604b2fdf35f1 | [
"MIT"
] | 140 | 2017-04-12T20:02:57.000Z | 2020-09-02T08:54:23.000Z | """Test API utilities."""
import json
from pytradfri.api.libcoap_api import APIFactory
from pytradfri.gateway import Gateway
def test_constructor_timeout_passed_to_subprocess(monkeypatch):
"""Test that original timeout is passed to subprocess."""
capture = {}
monkeypatch.setattr("subprocess.check_output... | 28.027778 | 64 | 0.698712 |
d3c44721938c2e001d9a0ea64b9e887be6780370 | 1,293 | py | Python | scrape_tvz.py | awordforthat/rhymes | b7d47b48a9b641e4736ed04058a183afc0a83b04 | [
"MIT"
] | null | null | null | scrape_tvz.py | awordforthat/rhymes | b7d47b48a9b641e4736ed04058a183afc0a83b04 | [
"MIT"
] | null | null | null | scrape_tvz.py | awordforthat/rhymes | b7d47b48a9b641e4736ed04058a183afc0a83b04 | [
"MIT"
] | 1 | 2021-02-16T03:06:38.000Z | 2021-02-16T03:06:38.000Z | # scrapes Townes van Zandt lyrics
# sample code so I don't have to remember all of this stuff
# the next time I want to source some verses
from bs4 import BeautifulSoup as soup
import requests
import string
punctuation_trans_table = str.maketrans("", "", string.punctuation)
base_url = "http://ippc2.orst.edu/coopl/... | 28.108696 | 67 | 0.657386 |
d3c48e47d2fa33e8114041e17aa2a33b9c9c1809 | 895 | py | Python | chapter04/ifelse.py | persevere-in-coding-persist-in-learning/python2 | b207d0040232abae63638784b34a950b932bef77 | [
"Apache-2.0"
] | 3 | 2020-08-05T01:15:41.000Z | 2020-08-05T09:28:36.000Z | chapter04/ifelse.py | persevere-in-coding-persist-in-learning/python2 | b207d0040232abae63638784b34a950b932bef77 | [
"Apache-2.0"
] | null | null | null | chapter04/ifelse.py | persevere-in-coding-persist-in-learning/python2 | b207d0040232abae63638784b34a950b932bef77 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
"""
if elif else
Version: 0.1
Author: huijz
Date: 2020-08-24
"""
# 1:if
flag = False
name = 'huijz'
if name == 'python': # python
flag = True #
print 'welcome boss' #
else:
print name #
# 2:elif
num = 5
if num == 3: # num
print 'boss'
elif num == 2:
print 'user'
elif num == ... | 16.886792 | 41 | 0.606704 |
d3c5d75262328f54482b5a9f8b47cfdc49c36760 | 445 | py | Python | setup.py | korymath/JANN | 98468a2e90a6b55ccb15e905ee10a1d1130cf5d8 | [
"MIT"
] | 39 | 2018-09-25T21:40:38.000Z | 2022-01-19T23:26:51.000Z | setup.py | korymath/JANN | 98468a2e90a6b55ccb15e905ee10a1d1130cf5d8 | [
"MIT"
] | 22 | 2018-09-25T21:36:46.000Z | 2021-09-07T16:03:41.000Z | setup.py | korymath/JANN | 98468a2e90a6b55ccb15e905ee10a1d1130cf5d8 | [
"MIT"
] | 9 | 2018-09-26T00:38:35.000Z | 2020-02-27T05:59:03.000Z | from setuptools import setup
from setuptools import find_packages
setup(
name="Jann",
version="4.0.0",
description="Jann is a Nearest Neighbour retrieval-based chatbot.",
author="Kory Mathewson",
author_email="korymath@gmail.com",
license="MIT",
url="https://github.com/korymath/jann",
... | 20.227273 | 71 | 0.647191 |
d3c6c4df7fb938e9c1ce540f827eb9b023f7dd26 | 7,895 | py | Python | tests/scanner/scanners/ke_version_scanner_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | 1 | 2018-03-26T08:15:21.000Z | 2018-03-26T08:15:21.000Z | tests/scanner/scanners/ke_version_scanner_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | tests/scanner/scanners/ke_version_scanner_test.py | pombredanne/forseti-security | 68a9a88243460065e00b6c131b3d9abd0331fb37 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 41.119792 | 76 | 0.500823 |
d3c71f0ccce66077dfdcd88c05a9aa625f2426c0 | 1,147 | py | Python | metrics/utils.py | edwardyehuang/iSeg | 256b0f7fdb6e854fe026fa8df41d9a4a55db34d5 | [
"MIT"
] | 4 | 2021-12-13T09:49:26.000Z | 2022-02-19T11:16:50.000Z | metrics/utils.py | edwardyehuang/iSeg | 256b0f7fdb6e854fe026fa8df41d9a4a55db34d5 | [
"MIT"
] | 1 | 2021-07-28T10:40:56.000Z | 2021-08-09T07:14:06.000Z | metrics/utils.py | edwardyehuang/iSeg | 256b0f7fdb6e854fe026fa8df41d9a4a55db34d5 | [
"MIT"
] | null | null | null | # ================================================================
# MIT License
# Copyright (c) 2021 edwardyehuang (https://github.com/edwardyehuang)
# ================================================================
import tensorflow as tf
from iseg.metrics.seg_metric_wrapper import SegMetricWrapper
from iseg.metri... | 26.068182 | 118 | 0.569311 |
d3c7eb72e9d8627f04182ce89238416d18909674 | 1,436 | py | Python | src/core/stats.py | dynaryu/vaws | f6ed9b75408f7ce6100ed59b7754f745e59be152 | [
"BSD-3-Clause"
] | null | null | null | src/core/stats.py | dynaryu/vaws | f6ed9b75408f7ce6100ed59b7754f745e59be152 | [
"BSD-3-Clause"
] | null | null | null | src/core/stats.py | dynaryu/vaws | f6ed9b75408f7ce6100ed59b7754f745e59be152 | [
"BSD-3-Clause"
] | null | null | null | import math
def lognormal_mean(m, stddev):
""" compute mean of log x with mean and std. of x
Args:
m: mean of x
stddev: standard deviation of x
Returns: mean of log x
"""
return math.log(m) - (0.5 * math.log(1.0 + (stddev * stddev) / (m * m)))
def lognormal_stdde... | 23.16129 | 77 | 0.521588 |
d3c82c2d822564092119880c7f993bd3fd1d721b | 5,720 | py | Python | vim.d/vimfiles/bundle/taghighlight/plugin/TagHighlight/module/languages.py | lougxing/gbox | f28402d97cacd22b5e564003af72c4022908cb4d | [
"MIT"
] | null | null | null | vim.d/vimfiles/bundle/taghighlight/plugin/TagHighlight/module/languages.py | lougxing/gbox | f28402d97cacd22b5e564003af72c4022908cb4d | [
"MIT"
] | 13 | 2020-01-28T22:30:33.000Z | 2022-03-02T14:57:16.000Z | vim.d/vimfiles/bundle/taghighlight/plugin/TagHighlight/module/languages.py | lougxing/gbox | f28402d97cacd22b5e564003af72c4022908cb4d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Tag Highlighter:
# Author: A. S. Budden <abudden _at_ gmail _dot_ com>
# Copyright: Copyright (C) 2009-2013 A. S. Budden
# Permission is hereby granted to use and distribute this code,
# with or without modifications, provided that this copyright
# notice is c... | 38.648649 | 110 | 0.544755 |
d3c84323f9dc3dcd909b2c9adb14b8efc078f1c5 | 6,099 | py | Python | archive/bayes_sensor.py | robmarkcole/HASS-data-science | 7edd07a1519682683b42d140d6268a87d91522ec | [
"MIT"
] | 11 | 2018-01-21T02:37:02.000Z | 2022-01-20T03:32:40.000Z | archive/bayes_sensor.py | robmarkcole/HASS-data-science | 7edd07a1519682683b42d140d6268a87d91522ec | [
"MIT"
] | null | null | null | archive/bayes_sensor.py | robmarkcole/HASS-data-science | 7edd07a1519682683b42d140d6268a87d91522ec | [
"MIT"
] | 8 | 2017-12-19T14:05:33.000Z | 2021-12-08T09:54:06.000Z | """
Bayes sensor code split out from
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/binary_sensor/bayesian.py
This module is used to explore the sensor.
"""
from collections import OrderedDict
from const import *
def update_probability(prior, prob_true, prob_false):
"""Update ... | 33.510989 | 108 | 0.643384 |
d3c8f408394af973ef52e2eab96bcf7c6c3f5ac5 | 27,212 | py | Python | CoarseNet/MinutiaeNet_utils.py | khaihp98/minutiae | afb7feff33ef86a673f899006aded486964f18dc | [
"MIT"
] | null | null | null | CoarseNet/MinutiaeNet_utils.py | khaihp98/minutiae | afb7feff33ef86a673f899006aded486964f18dc | [
"MIT"
] | null | null | null | CoarseNet/MinutiaeNet_utils.py | khaihp98/minutiae | afb7feff33ef86a673f899006aded486964f18dc | [
"MIT"
] | null | null | null | import os
import glob
import shutil
import logging
import matplotlib.pyplot as plt
import numpy as np
from scipy import ndimage, misc, signal, spatial
from skimage.filters import gaussian, gabor_kernel
import cv2
import math
def gaussian2d(shape=(5, 5), sigma=0.5):
"""
2D gaussian mask - should giv... | 32.785542 | 118 | 0.561921 |
d3c9a9f08cb2ab991b3fa5be8156332e24b37380 | 52 | py | Python | config/paths.py | fusic-com/flask-todo | 909ce22132ed081feca02e2fb255afa08b59611d | [
"MIT"
] | 34 | 2015-01-08T07:11:54.000Z | 2021-08-28T23:55:25.000Z | config/paths.py | spacecode-live/flask-todo | 909ce22132ed081feca02e2fb255afa08b59611d | [
"MIT"
] | null | null | null | config/paths.py | spacecode-live/flask-todo | 909ce22132ed081feca02e2fb255afa08b59611d | [
"MIT"
] | 13 | 2015-02-10T09:48:53.000Z | 2021-03-02T15:23:21.000Z | from settings import VAR_DIR
CACHE=VAR_DIR/'cache'
| 13 | 28 | 0.807692 |
d3c9f4c940421bb8e75ec41e434f5dfd39d574c9 | 1,687 | py | Python | Android.py | ChakradharG/Sudoku-Core | 5963db235cecec4cc6682380c30b7af10a3c4d11 | [
"MIT"
] | null | null | null | Android.py | ChakradharG/Sudoku-Core | 5963db235cecec4cc6682380c30b7af10a3c4d11 | [
"MIT"
] | 1 | 2022-02-10T07:19:40.000Z | 2022-02-10T07:19:40.000Z | Android.py | ChakradharG/Sudoku-Solver | 5963db235cecec4cc6682380c30b7af10a3c4d11 | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' #To suppress warnings thrown by tensorflow
from time import sleep
import numpy as np
from cv2 import cv2
import pyautogui as pg
import Sudoku_Core as SC
import OCR
s = 513//9 #Size of board//9
fs = 25 #Size of the final image
if __name__ == '__main__':
main()
| 24.449275 | 109 | 0.653231 |
d3cb3a07ae3bcc910cc22e9e664b83887e73f8fe | 3,570 | py | Python | app/model.py | kurapikaaaa/CITS3403Project | 8958219845d5251830f2abd7c58dfd87d97b8c4a | [
"MIT"
] | 1 | 2021-08-04T12:50:57.000Z | 2021-08-04T12:50:57.000Z | app/model.py | kurapikaaaa/CITS3403Project | 8958219845d5251830f2abd7c58dfd87d97b8c4a | [
"MIT"
] | null | null | null | app/model.py | kurapikaaaa/CITS3403Project | 8958219845d5251830f2abd7c58dfd87d97b8c4a | [
"MIT"
] | 1 | 2021-08-12T10:40:28.000Z | 2021-08-12T10:40:28.000Z | from app import db, login
from flask_login import UserMixin
from datetime import datetime
from flask import url_for, redirect
from werkzeug.security import generate_password_hash, check_password_hash
| 30.254237 | 81 | 0.654622 |
d3cb4fc2b23e4f4fb2c765f3d7673f2b43240708 | 19,911 | py | Python | bert_multitask_learning/top.py | akashnd/bert-multitask-learning | aee5be006ef6a3feadf0c751a6f9b42c24c3fd21 | [
"Apache-2.0"
] | 1 | 2021-07-11T14:07:59.000Z | 2021-07-11T14:07:59.000Z | bert_multitask_learning/top.py | akashnd/bert-multitask-learning | aee5be006ef6a3feadf0c751a6f9b42c24c3fd21 | [
"Apache-2.0"
] | null | null | null | bert_multitask_learning/top.py | akashnd/bert-multitask-learning | aee5be006ef6a3feadf0c751a6f9b42c24c3fd21 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: source_nbs/12_top.ipynb (unless otherwise specified).
__all__ = ['empty_tensor_handling_loss', 'nan_loss_handling', 'create_dummy_if_empty', 'BaseTop', 'SequenceLabel',
'Classification', 'PreTrain', 'Seq2Seq', 'MultiLabelClassification', 'MaskLM']
# Cell
import l... | 42.095137 | 138 | 0.638491 |
d3cc0f069903b9e861ac782e53bdcec6efa743dd | 3,332 | py | Python | challenge/utils/cancellation_code.py | AlonViz/IML.HUJI | 107f7c20b8bd64d41452e4a5b66abe843af7eb18 | [
"MIT"
] | null | null | null | challenge/utils/cancellation_code.py | AlonViz/IML.HUJI | 107f7c20b8bd64d41452e4a5b66abe843af7eb18 | [
"MIT"
] | null | null | null | challenge/utils/cancellation_code.py | AlonViz/IML.HUJI | 107f7c20b8bd64d41452e4a5b66abe843af7eb18 | [
"MIT"
] | null | null | null | import re
def evaluate_cancellation_code(cancellation_code: str, booking_time_before: int, stay_duration: int) -> float:
"""
gives a numerical value to given cancellation code, return expected fine in percentage
:return:
"""
cancellations = process_cancellation_code(cancellation_code)
p = min... | 40.634146 | 117 | 0.680972 |
d3cd8f9eafbfda626f2013905a1df1f02a7ae23e | 1,163 | py | Python | acronym/scoring.py | sigma67/acronym | b197d12aa843fbf0e74efb67361f74b8157cc3e1 | [
"MIT"
] | 340 | 2018-03-30T21:00:54.000Z | 2022-03-25T20:05:45.000Z | acronym/scoring.py | sigma67/acronym | b197d12aa843fbf0e74efb67361f74b8157cc3e1 | [
"MIT"
] | 12 | 2018-03-30T15:48:05.000Z | 2020-07-16T08:27:02.000Z | acronym/scoring.py | sigma67/acronym | b197d12aa843fbf0e74efb67361f74b8157cc3e1 | [
"MIT"
] | 29 | 2018-03-30T16:55:34.000Z | 2022-02-25T03:20:26.000Z | import re
regex = re.compile('[^a-zA-Z]')
def score_acronym(capitalized_acronym, corpus=None):
"""
For each capitalized letter in the acronym:
* 10 points if first letter in a word (with exception of first letter)
* 3 point if second or last letter in a word
* 1 point otherwise
*... | 31.432432 | 97 | 0.575236 |
d3ce35364812f96b726436b7cd0cab140d019f97 | 956 | py | Python | e2e_test.py | bartossh/hebbian_mirror | 2d080ae7a707845e0922894e5cee2ad7b0119e8f | [
"MIT"
] | 2 | 2019-11-15T09:10:19.000Z | 2019-12-26T15:05:16.000Z | e2e_test.py | bartOssh/hebbian_mirror | 2d080ae7a707845e0922894e5cee2ad7b0119e8f | [
"MIT"
] | 1 | 2019-11-07T11:06:09.000Z | 2019-11-07T11:06:09.000Z | e2e_test.py | bartOssh/hebbian_mirror | 2d080ae7a707845e0922894e5cee2ad7b0119e8f | [
"MIT"
] | null | null | null | import requests
num_of_iter = 2
data = open('./assets/test.jpg', 'rb').read()
for i in range(0, num_of_iter):
res = requests.get(
url='http://0.0.0.0:8000/recognition/object/boxes_names'
)
print("\n RESPONSE GET boxes names for test number {}: \n {}"
.format(i, res.__dict__))
res = req... | 43.454545 | 94 | 0.58159 |
d3ce5432cde433f90fde37eb3f5e56f8a23b111c | 7,698 | py | Python | appendix/auc_accuracy/train_nn_metric.py | rit-git/tagging | b075ce1553492be7088026b67f525a529bf03770 | [
"Apache-2.0"
] | 7 | 2020-11-21T03:45:34.000Z | 2022-03-25T00:40:20.000Z | appendix/auc_accuracy/train_nn_metric.py | rit-git/tagging | b075ce1553492be7088026b67f525a529bf03770 | [
"Apache-2.0"
] | null | null | null | appendix/auc_accuracy/train_nn_metric.py | rit-git/tagging | b075ce1553492be7088026b67f525a529bf03770 | [
"Apache-2.0"
] | 5 | 2020-09-21T15:07:21.000Z | 2021-06-02T20:25:36.000Z | import argparse
import os
import torch
import torch.nn as nn
from torchtext.data import TabularDataset, BucketIterator
from torchtext.data import Field
from torchtext.vocab import Vectors, GloVe
from tqdm import tqdm, trange
import sys
import os
sys.path.insert(0, "../../pyfunctor")
sys.path.insert(0, "../../model")
f... | 34.990909 | 99 | 0.587685 |
d3ce6f7210df816909e214cda327fef650ba334a | 1,566 | py | Python | setup.py | teamproserve/pinkopy | 48842ac26aff90728482f7cac2977f56d5fc579f | [
"MIT"
] | null | null | null | setup.py | teamproserve/pinkopy | 48842ac26aff90728482f7cac2977f56d5fc579f | [
"MIT"
] | null | null | null | setup.py | teamproserve/pinkopy | 48842ac26aff90728482f7cac2977f56d5fc579f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
try:
import pypandoc
readme = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
with open('README.md') as f:
readme = f.read()
install_requires = [
'cachetools>=1.1.5',
'requests>=2.7.0',
'xm... | 27.964286 | 81 | 0.621328 |
d3cf16476f10f947ae96e115903c726cd418feaf | 24,050 | py | Python | scss/extension/core.py | xen0n/pyScss | 86712d21fe7c3abdd7e593973fb35010422f1a41 | [
"MIT"
] | null | null | null | scss/extension/core.py | xen0n/pyScss | 86712d21fe7c3abdd7e593973fb35010422f1a41 | [
"MIT"
] | null | null | null | scss/extension/core.py | xen0n/pyScss | 86712d21fe7c3abdd7e593973fb35010422f1a41 | [
"MIT"
] | null | null | null | """Extension for built-in Sass functionality."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from itertools import product
import math
import os.path
from pathlib import PurePosixPath
from six.moves import xrange
... | 27.052868 | 80 | 0.614012 |
d3d01a6d5b6d4e91e1847f49e77097d90f67ce9c | 906 | py | Python | pypy/module/cpyext/test/test_iterator.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | 34 | 2015-07-09T04:53:27.000Z | 2021-07-19T05:22:27.000Z | pypy/module/cpyext/test/test_iterator.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | 6 | 2015-05-30T17:20:45.000Z | 2017-06-12T14:29:23.000Z | pypy/module/cpyext/test/test_iterator.py | wdv4758h/mu-client-pypy | d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf | [
"Apache-2.0",
"OpenSSL"
] | 11 | 2015-09-07T14:26:08.000Z | 2020-04-10T07:20:41.000Z | from pypy.module.cpyext.test.test_api import BaseApiTest
| 39.391304 | 62 | 0.684327 |
d3d143abd1287d1ebf9fec072e925b1f0bce15d1 | 21,407 | py | Python | capsule_em/experiment.py | jrmendeshurb/google-research | f9fa8cdd2fb77975b524371fd29df008b9dc6cf4 | [
"Apache-2.0"
] | 6 | 2019-12-16T04:23:57.000Z | 2021-12-09T14:17:14.000Z | capsule_em/experiment.py | jrmendeshurb/google-research | f9fa8cdd2fb77975b524371fd29df008b9dc6cf4 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | capsule_em/experiment.py | ZachT1711/google-research | 662e6837a3efa0c40b11cb4122447c4b028d2115 | [
"Apache-2.0"
] | 1 | 2020-03-05T09:24:01.000Z | 2020-03-05T09:24:01.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 40.390566 | 95 | 0.633998 |
d3d3a5b087e35b140a4cca72077a3d96a9f4d93b | 42,865 | py | Python | grafana/common/dashboards/aggregated/client_subnet_statistics_detail.py | MikeAT/visualizer | 946b98d82eaf7ec508861115585afd683fc49e5c | [
"MIT"
] | 6 | 2021-03-03T17:52:24.000Z | 2022-02-10T11:45:22.000Z | grafana/common/dashboards/aggregated/client_subnet_statistics_detail.py | Acidburn0zzz/visualizer | 20fba91f0d26b98531f97f643c8329640d1c0d11 | [
"MIT"
] | 1 | 2021-04-29T12:34:04.000Z | 2021-04-29T14:50:17.000Z | grafana/common/dashboards/aggregated/client_subnet_statistics_detail.py | Acidburn0zzz/visualizer | 20fba91f0d26b98531f97f643c8329640d1c0d11 | [
"MIT"
] | 2 | 2021-04-27T14:02:03.000Z | 2021-11-12T10:34:32.000Z | # Copyright 2021 Internet Corporation for Assigned Names and Numbers.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# Developed by Sinodun IT (sinodun.com)
#
# Ag... | 46.04189 | 133 | 0.30778 |
d3d41214e53cc3ba9f42c3c82841438366d8ce1d | 2,812 | py | Python | pylearn2/neuroimaging_utils/tutorials/nice/jobman/simple_train.py | rdevon/pylearn2 | f7b9a6ea0e2498176b47202f5bb83aec4976e1dd | [
"BSD-3-Clause"
] | 1 | 2017-10-29T06:18:35.000Z | 2017-10-29T06:18:35.000Z | pylearn2/neuroimaging_utils/tutorials/nice/jobman/simple_train.py | rdevon/pylearn2 | f7b9a6ea0e2498176b47202f5bb83aec4976e1dd | [
"BSD-3-Clause"
] | null | null | null | pylearn2/neuroimaging_utils/tutorials/nice/jobman/simple_train.py | rdevon/pylearn2 | f7b9a6ea0e2498176b47202f5bb83aec4976e1dd | [
"BSD-3-Clause"
] | null | null | null | """
Module to train a simple MLP for demo.
"""
from jobman.tools import expand
from jobman.tools import flatten
import logging
import nice_experiment
import numpy as np
from os import path
from pylearn2.config import yaml_parse
from pylearn2.neuroimaging_utils.datasets import MRI
from pylearn2.neuroimaging_utils.data... | 34.292683 | 91 | 0.629445 |
d3d4d6dda5b57fc2a5aa6672a9cd0393e4d62ee6 | 6,199 | py | Python | _Framework/Layer.py | isfopo/MacroPushScript | 46c440aa3f6325d8767e88252c5520d76a9fa634 | [
"MIT"
] | null | null | null | _Framework/Layer.py | isfopo/MacroPushScript | 46c440aa3f6325d8767e88252c5520d76a9fa634 | [
"MIT"
] | null | null | null | _Framework/Layer.py | isfopo/MacroPushScript | 46c440aa3f6325d8767e88252c5520d76a9fa634 | [
"MIT"
] | null | null | null | #Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/Layer.py
u"""
Module implementing a way to resource-based access to controls in an
unified interface dynamic.
"""
from __future__ import absolute_import, print_function, unicode_literals
fr... | 33.874317 | 139 | 0.658816 |
d3d6cda09c480bcbc5eba0a289993557df421803 | 1,529 | py | Python | src/retrieve_exons_sequence_genomes.py | naturalis/brassicaceae-hybseq-pipeline | b71462d308b8a4adbc370691bf085d44666914d7 | [
"MIT"
] | 5 | 2020-04-22T12:08:07.000Z | 2021-09-03T01:56:44.000Z | src/retrieve_exons_sequence_genomes.py | naturalis/brassicaceae-hybseq-pipeline | b71462d308b8a4adbc370691bf085d44666914d7 | [
"MIT"
] | 1 | 2020-09-16T11:29:15.000Z | 2020-09-16T11:29:15.000Z | src/retrieve_exons_sequence_genomes.py | naturalis/brassicaceae-hybseq-pipeline | b71462d308b8a4adbc370691bf085d44666914d7 | [
"MIT"
] | 1 | 2020-09-16T14:05:08.000Z | 2020-09-16T14:05:08.000Z | # retrieve_exons_sequence_genomes.py
# This script is to retrieve exons from sequenced genomes which are also present in the reference genome (A. thaliana).
# To identify the contigs from the sequenced genomes, each contig has to be retrieved from A. thaliana first.
# Then, for each sequence query of A. thaliana, the q... | 41.324324 | 119 | 0.743623 |
d3d7b8b121c459940512749ce36dcfbad947c964 | 1,136 | py | Python | lexical/lexical.py | xmeng17/Malicious-URL-Detection | f286aeb50570455486b470cbc2db9aa0fae99b8f | [
"MIT"
] | null | null | null | lexical/lexical.py | xmeng17/Malicious-URL-Detection | f286aeb50570455486b470cbc2db9aa0fae99b8f | [
"MIT"
] | null | null | null | lexical/lexical.py | xmeng17/Malicious-URL-Detection | f286aeb50570455486b470cbc2db9aa0fae99b8f | [
"MIT"
] | null | null | null | import re
| 26.418605 | 70 | 0.617958 |
d3d87b798d29e52210031306b4e2f4fee10a8cd2 | 992 | py | Python | stacker/tests/providers/aws/test_interactive.py | GoodRx/stacker | 0cf1df67b4ae5aeda5845442c84905909101c238 | [
"BSD-2-Clause"
] | 1 | 2021-11-06T17:01:01.000Z | 2021-11-06T17:01:01.000Z | stacker/tests/providers/aws/test_interactive.py | GoodRx/stacker | 0cf1df67b4ae5aeda5845442c84905909101c238 | [
"BSD-2-Clause"
] | null | null | null | stacker/tests/providers/aws/test_interactive.py | GoodRx/stacker | 0cf1df67b4ae5aeda5845442c84905909101c238 | [
"BSD-2-Clause"
] | 1 | 2021-11-06T17:00:53.000Z | 2021-11-06T17:00:53.000Z | import unittest
from ....providers.aws.interactive import requires_replacement
| 30.060606 | 79 | 0.634073 |
d3d9152a0002e3e05bd42184c7b5ca8570672123 | 1,046 | py | Python | setup.py | digicert/digicert_express | 292fb4e7f8a39e53c384a79c50a9488c51258f97 | [
"MIT"
] | 2 | 2017-03-03T20:37:29.000Z | 2018-06-01T22:22:15.000Z | setup.py | digicert/digicert_express | 292fb4e7f8a39e53c384a79c50a9488c51258f97 | [
"MIT"
] | null | null | null | setup.py | digicert/digicert_express | 292fb4e7f8a39e53c384a79c50a9488c51258f97 | [
"MIT"
] | 2 | 2018-01-26T07:11:42.000Z | 2019-03-06T23:30:39.000Z | from setuptools import setup, find_packages
setup(
name='digicert-express',
version='1.1dev2',
description='Express Install for DigiCert, Inc.',
long_description=readme(),
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Information Technology',
'Licens... | 29.885714 | 92 | 0.605163 |
d3d9c66d64ebac5543f8099d6066695442fe0072 | 11,392 | py | Python | pytorch/plane.py | NunoEdgarGFlowHub/autoregressive-energy-machines | eb5517a513cf4e99db674fa41170f018e212f1e2 | [
"MIT"
] | 83 | 2019-04-12T10:23:23.000Z | 2022-03-30T12:40:43.000Z | pytorch/plane.py | sten2lu/autoregressive-energy-machines | eb5517a513cf4e99db674fa41170f018e212f1e2 | [
"MIT"
] | null | null | null | pytorch/plane.py | sten2lu/autoregressive-energy-machines | eb5517a513cf4e99db674fa41170f018e212f1e2 | [
"MIT"
] | 11 | 2019-04-12T11:26:00.000Z | 2020-05-12T01:14:21.000Z | import argparse
import json
import numpy as np
import os
import torch
import data_
import models
import utils
from matplotlib import cm, pyplot as plt
from tensorboardX import SummaryWriter
from torch import optim
from torch.utils import data
from tqdm import tqdm
from utils import io
parser = argparse.ArgumentPars... | 39.147766 | 98 | 0.675298 |
d3d9fd962e6f2a91b7a5a73a99c81d54531258d8 | 2,266 | py | Python | music/music.py | spacerunaway/world_recoder | fcafe0d910511cfd043735cf451564febb558e40 | [
"MIT"
] | null | null | null | music/music.py | spacerunaway/world_recoder | fcafe0d910511cfd043735cf451564febb558e40 | [
"MIT"
] | null | null | null | music/music.py | spacerunaway/world_recoder | fcafe0d910511cfd043735cf451564febb558e40 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../utils')
from utils import *
from doubly_linkedlist import *
def link_chords(chordprogression):
"""
Chord progression is a sequences of chords.
A valid linked_chords can be one of the following:
1: the chord name(str) in CHORD dict
2: the key(type Key)
and a music ... | 29.815789 | 98 | 0.573698 |
d3da2efce64cb5f88a134e97d2a4092ee8ea80bb | 5,777 | py | Python | azure-mgmt/tests/test_mgmt_documentdb.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt/tests/test_mgmt_documentdb.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure-mgmt/tests/test_mgmt_documentdb.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------------... | 37.512987 | 101 | 0.570885 |
d3da88558c778364e49a959d5f0d8f942db1cc43 | 3,758 | py | Python | config.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | null | null | null | config.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | null | null | null | config.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | null | null | null | import argparse
PROJROOTDIR = {'mac': '/Users/taehapark/SLAB/speedplusbaseline',
'linux': '/home/somrita/Documents/Satellite_Pose_Estimation/speedplusbaseline'}
DATAROOTDIR = {'mac': '/Users/taehapark/SLAB/speedplus/data/datasets',
'linux': '/home/somrita/Documents/Satellite_Pose_Estim... | 58.71875 | 104 | 0.631453 |
d3dacb32ea41d2fb0546ec04640a3b17315faa08 | 118,963 | py | Python | h1/api/insight_project_journal_api.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | h1/api/insight_project_journal_api.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | h1/api/insight_project_journal_api.py | hyperonecom/h1-client-python | 4ce355852ba3120ec1b8f509ab5894a5c08da730 | [
"MIT"
] | null | null | null | """
HyperOne
HyperOne API # noqa: E501
The version of the OpenAPI document: 0.1.0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from h1.api_client import ApiClient, Endpoint as _Endpoint
from h1.model_utils import ( # noqa: F401
check_allowe... | 37.362751 | 179 | 0.451342 |
d3db48db20a20bc47e28f0062af79ebd64f3fa41 | 811 | py | Python | forms/views.py | urchinpro/L2-forms | 37f33386984efbb2d1e92c73d915256247801109 | [
"MIT"
] | null | null | null | forms/views.py | urchinpro/L2-forms | 37f33386984efbb2d1e92c73d915256247801109 | [
"MIT"
] | null | null | null | forms/views.py | urchinpro/L2-forms | 37f33386984efbb2d1e92c73d915256247801109 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.utils.module_loading import import_string
def pdf(request):
"""
Get form's number (decimal type: 101.15 - where "101" is form's group and "15"-number itsels).
Can't use 1,2,3,4,5,6,7,8,9 for number itsels - which stands after the point.
Bacause in datab... | 38.619048 | 103 | 0.670777 |
d3dcc92c42ee28b5565e1b1bdf3f0bd8727161d9 | 5,087 | py | Python | main.py | code-aifarmer/Python-EXE-maker | 4b7436353c9a0d46b52543304209b057dcac51c1 | [
"MIT"
] | 2 | 2021-01-26T10:19:15.000Z | 2021-06-27T03:38:00.000Z | main.py | code-aifarmer/Python-EXE-maker | 4b7436353c9a0d46b52543304209b057dcac51c1 | [
"MIT"
] | null | null | null | main.py | code-aifarmer/Python-EXE-maker | 4b7436353c9a0d46b52543304209b057dcac51c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import PySimpleGUI as sg
import cv2
import subprocess
import shutil
import os
import sys
# Demonstrates a number of PySimpleGUI features including:
# Default element size
# auto_size_buttons
# Button
# Dictionary return values
# update of elements in form (Text, Input)
def runCommand(cmd... | 38.832061 | 120 | 0.569294 |
d3dd8c075e4b425fd099e7113200bcfa2c88d3c5 | 152 | py | Python | seisflows/system/lsf_sm.py | jpvantassel/seisflows | 5155ec177b5df0218e1fb5204f1fcd6969c66f20 | [
"BSD-2-Clause"
] | 97 | 2016-11-18T21:19:28.000Z | 2022-03-31T15:02:42.000Z | seisflows/system/lsf_sm.py | SuwenJunliu/seisflows | 14d246691acf8e8549487a5db7c7cd877d23a2ae | [
"BSD-2-Clause"
] | 30 | 2017-02-21T14:54:14.000Z | 2021-08-30T01:44:39.000Z | seisflows/system/lsf_sm.py | SuwenJunliu/seisflows | 14d246691acf8e8549487a5db7c7cd877d23a2ae | [
"BSD-2-Clause"
] | 78 | 2017-03-01T15:32:29.000Z | 2022-01-31T09:09:17.000Z | #
# This is Seisflows
#
# See LICENCE file
#
###############################################################################
raise NotImplementedError
| 16.888889 | 79 | 0.348684 |
d3ddd574dde8899b673c876fe79246ef6fe9f23e | 938 | py | Python | data/objects/sample.py | predictive-analytics-lab/tiny-comparison-framework | 8ae482a2e69aa5affe94bcd7982e53ad69228d43 | [
"Apache-2.0"
] | null | null | null | data/objects/sample.py | predictive-analytics-lab/tiny-comparison-framework | 8ae482a2e69aa5affe94bcd7982e53ad69228d43 | [
"Apache-2.0"
] | null | null | null | data/objects/sample.py | predictive-analytics-lab/tiny-comparison-framework | 8ae482a2e69aa5affe94bcd7982e53ad69228d43 | [
"Apache-2.0"
] | null | null | null | from data.objects.data import Data
| 42.636364 | 80 | 0.711087 |
d3de757442c04a58c632f23911d3bb3230eadbab | 572 | py | Python | parkrundata/views.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | parkrundata/views.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | parkrundata/views.py | remarkablerocket/parkrundata | c717b59771629d6308ec093e29fd373981726fde | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from .models import Country, Event
from .serializers import CountrySerializer, EventSerializer
| 28.6 | 64 | 0.798951 |
d3df3020e02d0033dd7ab9554f7528acd2742527 | 21,764 | py | Python | spearmint/models/gp_classifier.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | null | null | null | spearmint/models/gp_classifier.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | null | null | null | spearmint/models/gp_classifier.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | null | null | null | # -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the Software). The Software is
# designed to automatically run experiments (thus the code name
# ... | 43.354582 | 142 | 0.684111 |
d3e0c86fec4a82ec7ab6e46d19afaf6635bc9e88 | 1,125 | py | Python | pycom_lopy4_LoRaBattMonitor/transmitter/main.py | AidanTek/Fab-Cre8_IoT | 3d358a484aea2e2a50d6dbef443e9a2757ef9ab8 | [
"MIT"
] | null | null | null | pycom_lopy4_LoRaBattMonitor/transmitter/main.py | AidanTek/Fab-Cre8_IoT | 3d358a484aea2e2a50d6dbef443e9a2757ef9ab8 | [
"MIT"
] | null | null | null | pycom_lopy4_LoRaBattMonitor/transmitter/main.py | AidanTek/Fab-Cre8_IoT | 3d358a484aea2e2a50d6dbef443e9a2757ef9ab8 | [
"MIT"
] | null | null | null | from machine import Pin, ADC
from network import LoRa
import socket
from utime import sleep
# Use a pin for a 'config' mode
configPin = Pin('P21', Pin.IN, Pin.PULL_UP)
# Create an ADC object
adc = ADC()
# vbatt pin:
vbatt = adc.channel(attn=1, pin='P16')
# Initialise LoRa in LoRa mode
# For Europe, use LoRa.EU868
... | 20.454545 | 59 | 0.686222 |