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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22f3a0221d0e140933a57d7b71e0a66cb6793a2d | 5,761 | py | Python | examples/DeepWisdom/Auto_NLP/deepWisdom/transformers_/__init__.py | zichuan-scott-xu/automl-workflow | d108e55da943775953b9f1801311a86ac07e58a0 | [
"Apache-2.0"
] | 3 | 2020-12-15T02:40:43.000Z | 2021-01-14T02:32:13.000Z | examples/DeepWisdom/Auto_NLP/deepWisdom/transformers_/__init__.py | zichuan-scott-xu/automl-workflow | d108e55da943775953b9f1801311a86ac07e58a0 | [
"Apache-2.0"
] | null | null | null | examples/DeepWisdom/Auto_NLP/deepWisdom/transformers_/__init__.py | zichuan-scott-xu/automl-workflow | d108e55da943775953b9f1801311a86ac07e58a0 | [
"Apache-2.0"
] | 4 | 2021-01-07T05:41:38.000Z | 2021-04-07T08:02:22.000Z | __version__ = "2.1.1"
# Work around to update TensorFlow's absl.logging threshold which alters the
# default Python logging output behavior when present.
# see: https://github.com/abseil/abseil-py/issues/99
# and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493
try:
import absl.logging... | 59.391753 | 109 | 0.740844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.095643 |
22f3df9c130fc202edc44714de04e929f4e7eab3 | 91,430 | py | Python | test/model/data/all_foreground_valid_data.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | test/model/data/all_foreground_valid_data.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 2 | 2020-07-31T22:37:30.000Z | 2020-07-31T23:08:55.000Z | test/model/data/all_foreground_valid_data.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
data = r"""cdials_array_family_flex_ext
shoebox
p1
(tRp2
(cscitbx_array_family_flex_ext
grid
p3
((I0
t(I8
tI01
tRp4
(I8
tbS'\x02\x01\x02\x08\x00\x03\\\x01\x03m\x01\x03\x04\x06\x03\x15\x06\x00\x02\x01\x02\x03\x02\x01\x02\x11\x02\x11\x02\x9c\x02\x06\x02\x8... | 5,378.235294 | 91,236 | 0.747971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91,356 | 0.999191 |
22f43bae0fb833bc9d376660819fab38bbd38d60 | 11,830 | py | Python | src/use-model.py | sofieditmer/self-assigned | 3033b64d2848fcf73c44dd79ad4e7f07f8387c65 | [
"MIT"
] | null | null | null | src/use-model.py | sofieditmer/self-assigned | 3033b64d2848fcf73c44dd79ad4e7f07f8387c65 | [
"MIT"
] | null | null | null | src/use-model.py | sofieditmer/self-assigned | 3033b64d2848fcf73c44dd79ad4e7f07f8387c65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Info: This script loads the model trained in the cnn-asl.py script and enables the user to use it for classifying unseen ASL letters. It also visualizes the feature map of the last convolutional layer of the network to enable the user to get an insight into exactly which parts of the original ... | 42.707581 | 421 | 0.623331 | 7,668 | 0.648183 | 0 | 0 | 0 | 0 | 0 | 0 | 6,304 | 0.532883 |
22f45d29bee95fa69837bee8b207676703b1cb59 | 844 | py | Python | examples/hello_world/src/Algorithm.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 4 | 2021-03-15T16:51:27.000Z | 2021-07-25T16:47:00.000Z | examples/hello_world/src/Algorithm.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 2 | 2021-02-25T21:13:30.000Z | 2021-05-03T14:49:41.000Z | examples/hello_world/src/Algorithm.py | algorithmiaio/algorithmia-adk-python | 1e5c6b9de08fe34260f3b4c03eb4596cccb4d070 | [
"MIT"
] | 1 | 2021-03-02T00:06:55.000Z | 2021-03-02T00:06:55.000Z | from Algorithmia import ADK
# API calls will begin at the apply() method, with the request body passed as 'input'
# For more details, see algorithmia.com/developers/algorithm-development/languages
def apply(input):
# If your apply function uses state that's loaded into memory via load, you can pass that loaded s... | 44.421053 | 120 | 0.761848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 706 | 0.836493 |
22f53ccd69bc56b9aef660e968f36d2013f14d05 | 7,899 | py | Python | src/gluonts/nursery/autogluon_tabular/estimator.py | Xiaoxiong-Liu/gluon-ts | 097c492769258dd70b7f223f826b17b0051ceee9 | [
"Apache-2.0"
] | 2,648 | 2019-06-03T17:18:27.000Z | 2022-03-31T08:29:22.000Z | src/gluonts/nursery/autogluon_tabular/estimator.py | Xiaoxiong-Liu/gluon-ts | 097c492769258dd70b7f223f826b17b0051ceee9 | [
"Apache-2.0"
] | 1,220 | 2019-06-04T09:00:14.000Z | 2022-03-31T10:45:43.000Z | src/gluonts/nursery/autogluon_tabular/estimator.py | Xiaoxiong-Liu/gluon-ts | 097c492769258dd70b7f223f826b17b0051ceee9 | [
"Apache-2.0"
] | 595 | 2019-06-04T01:04:31.000Z | 2022-03-30T10:40:26.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 36.233945 | 122 | 0.613622 | 6,723 | 0.85112 | 0 | 0 | 1,848 | 0.233954 | 0 | 0 | 2,788 | 0.352956 |
22f548488d990977359fc60d27c5b1e982176596 | 1,032 | py | Python | src/dcar/errors.py | andreas19/dcar | 31118ac5924b7cb01f8b7da5a84480824c046df2 | [
"BSD-3-Clause"
] | 1 | 2020-11-25T15:04:39.000Z | 2020-11-25T15:04:39.000Z | src/dcar/errors.py | andreas19/dcar | 31118ac5924b7cb01f8b7da5a84480824c046df2 | [
"BSD-3-Clause"
] | null | null | null | src/dcar/errors.py | andreas19/dcar | 31118ac5924b7cb01f8b7da5a84480824c046df2 | [
"BSD-3-Clause"
] | null | null | null | """Errors module."""
__all__ = [
'Error',
'AddressError',
'AuthenticationError',
'TransportError',
'ValidationError',
'RegisterError',
'MessageError',
'DBusError',
'SignatureError',
'TooLongError',
]
class Error(Exception):
"""Base class."""
class AddressError(Error):
... | 18.763636 | 67 | 0.671512 | 761 | 0.737403 | 0 | 0 | 0 | 0 | 0 | 0 | 586 | 0.567829 |
22f66223b5c0420ba407f0ba73a5510c6ae72923 | 31,006 | py | Python | Packs/CortexXDR/Integrations/XDR_iocs/XDR_iocs_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 1 | 2022-03-05T02:23:32.000Z | 2022-03-05T02:23:32.000Z | Packs/CortexXDR/Integrations/XDR_iocs/XDR_iocs_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 42 | 2022-03-11T10:52:26.000Z | 2022-03-31T01:50:42.000Z | Packs/CortexXDR/Integrations/XDR_iocs/XDR_iocs_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 2 | 2021-12-13T13:07:21.000Z | 2022-03-05T02:23:34.000Z | from XDR_iocs import *
import pytest
from freezegun import freeze_time
Client.severity = 'INFO'
client = Client({'url': 'test'})
def d_sort(in_dict):
return sorted(in_dict.items())
class TestGetHeaders:
@freeze_time('2020-06-01T00:00:00Z')
def test_sanity(self, mocker):
"""
Given:
... | 44.042614 | 224 | 0.591111 | 30,790 | 0.993034 | 0 | 0 | 10,894 | 0.351351 | 0 | 0 | 14,764 | 0.476166 |
22f68910ff9dfaa421812c8e74e6090e44df810d | 1,797 | py | Python | project/users/models.py | rchdlps/django-docker | 2c12732264c1f17cd62e20927b5956db498c30b7 | [
"MIT"
] | null | null | null | project/users/models.py | rchdlps/django-docker | 2c12732264c1f17cd62e20927b5956db498c30b7 | [
"MIT"
] | null | null | null | project/users/models.py | rchdlps/django-docker | 2c12732264c1f17cd62e20927b5956db498c30b7 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.db import models
from PIL import Image
class User(AbstractUser):
# First Name and Last Name do not cover name patterns
... | 41.790698 | 82 | 0.673901 | 1,568 | 0.870627 | 0 | 0 | 0 | 0 | 0 | 0 | 545 | 0.30261 |
22f898eb9c872bebbb74a0dcd35cbd3eb8f475a0 | 4,444 | py | Python | cloudify_terminal_sdk/netconf_connection.py | cloudify-incubator/cloudify-plugins-sdk | 9805008e739d31e5f9fe3184411648f9be5e6214 | [
"Apache-2.0"
] | 1 | 2019-04-23T03:06:52.000Z | 2019-04-23T03:06:52.000Z | cloudify_terminal_sdk/netconf_connection.py | cloudify-incubator/cloudify-plugins-sdk | 9805008e739d31e5f9fe3184411648f9be5e6214 | [
"Apache-2.0"
] | 9 | 2018-12-17T14:08:29.000Z | 2022-01-16T17:52:54.000Z | cloudify_terminal_sdk/netconf_connection.py | cloudify-incubator/cloudify-plugins-sdk | 9805008e739d31e5f9fe3184411648f9be5e6214 | [
"Apache-2.0"
] | 3 | 2021-12-13T20:53:37.000Z | 2022-01-20T09:01:47.000Z | # Copyright (c) 2015-2020 Cloudify Platform Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 35.552 | 74 | 0.605761 | 3,499 | 0.787354 | 0 | 0 | 0 | 0 | 0 | 0 | 1,441 | 0.324257 |
22f9659775a0befbb80b23123b166ed4d7384748 | 15,411 | py | Python | Seismic_Conv1D_dec.py | dyt1990/Seis_DCEC | 6cc56a7db10dd87b0ef39ece73578fca8b23c55f | [
"MIT"
] | 1 | 2021-04-05T06:03:16.000Z | 2021-04-05T06:03:16.000Z | Seismic_Conv1D_dec.py | dyt1990/Seis_DCEC | 6cc56a7db10dd87b0ef39ece73578fca8b23c55f | [
"MIT"
] | null | null | null | Seismic_Conv1D_dec.py | dyt1990/Seis_DCEC | 6cc56a7db10dd87b0ef39ece73578fca8b23c55f | [
"MIT"
] | 2 | 2019-06-13T03:34:20.000Z | 2019-12-16T05:57:30.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 19 17:48:13 2018
@author: Sediment
"""
# -*- coding: utf-8 -*-
'''
Keras implementation of deep embedder to improve clustering, inspired by:
"Unsupervised Deep Embedding for Clustering Analysis" (Xie et al, ICML 2016)
Definition can accept somewhat custom ne... | 43.78125 | 138 | 0.594251 | 14,153 | 0.915518 | 0 | 0 | 0 | 0 | 0 | 0 | 3,971 | 0.256873 |
22f9996e35b6cbbaeea6e8c3929b7498dd603017 | 4,471 | py | Python | ppq/utils/round.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | ppq/utils/round.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | ppq/utils/round.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | from decimal import ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_HALF_UP, Decimal
from math import ceil, floor, log2
from typing import Union
import torch
from ppq.core import RoundingPolicy
def ppq_numerical_round(value: float,
policy: RoundingPolicy=RoundingPolicy.ROUND_HALF_EVEN) -> int:
"""
reference... | 45.622449 | 138 | 0.698054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,761 | 0.393872 |
22f9fe832c0a98e82946d0744a46553bfba443ca | 11,944 | py | Python | python/repair/train.py | maropu/scavenger | 03a935968f4aa507d4d98c8ca528195b770757d9 | [
"Apache-2.0"
] | null | null | null | python/repair/train.py | maropu/scavenger | 03a935968f4aa507d4d98c8ca528195b770757d9 | [
"Apache-2.0"
] | 2 | 2019-12-22T13:29:07.000Z | 2020-01-07T11:55:41.000Z | python/repair/train.py | maropu/scavenger | 03a935968f4aa507d4d98c8ca528195b770757d9 | [
"Apache-2.0"
] | 1 | 2020-10-26T20:07:28.000Z | 2020-10-26T20:07:28.000Z | #!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "L... | 40.62585 | 120 | 0.654638 | 0 | 0 | 0 | 0 | 5,698 | 0.47706 | 0 | 0 | 3,751 | 0.314049 |
22fa19437d01af6a56a8a1b30127d97248a1bdcd | 519 | py | Python | howl/roomsensor/urls.py | volzotan/django-howl | 3b11c530da95d152844934da09592619b3d4497f | [
"MIT"
] | null | null | null | howl/roomsensor/urls.py | volzotan/django-howl | 3b11c530da95d152844934da09592619b3d4497f | [
"MIT"
] | null | null | null | howl/roomsensor/urls.py | volzotan/django-howl | 3b11c530da95d152844934da09592619b3d4497f | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, url
from roomsensor import views
urlpatterns = patterns('',
url(r'^$', views.index, name='roomsensor'),
# ex: /roomsensor/name/
url(r'^(?P<roomsensor_name>\w+)/$', views.display, name='roomsensor_display'),
url(r'^(?P<roomsensor_name>\w+)/read/$', views.read, na... | 37.071429 | 138 | 0.672447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.539499 |
22fadcf738c9cad6b1e0cd6d9126f92326318681 | 1,088 | py | Python | main.py | vu-telab/DAKOTA-moga-post-processing-tool | 2f41561bd8ca44c693e5994f7f68a1edc1a82361 | [
"MIT"
] | null | null | null | main.py | vu-telab/DAKOTA-moga-post-processing-tool | 2f41561bd8ca44c693e5994f7f68a1edc1a82361 | [
"MIT"
] | 4 | 2017-02-06T18:20:25.000Z | 2017-02-06T20:50:34.000Z | main.py | caseynbrock/DAKOTA-moga-post-processing-tool | 2f41561bd8ca44c693e5994f7f68a1edc1a82361 | [
"MIT"
] | null | null | null | # main.py
#
# currently just an example script I use to test my optimization_results module
#
# WARNING: design point numbers 0-indexed in pandas database, but
# eval_id column is the original 1-indexed value given by DAKOTA
import optimization_results as optr
def main():
a4 = optr.MogaOptimizationResults()
... | 35.096774 | 97 | 0.596507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 491 | 0.451287 |
22fbfb719886ba73384d6d380084bceb6dabf90b | 2,127 | py | Python | Topaz/Core.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | Topaz/Core.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | Topaz/Core.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2017 Joy Diamond. All rights reserved.
#
@gem('Topaz.Core')
def gem():
require_gem('Gem.Global')
from Gem import gem_global
gem_global.testing = true
require_gem('Gem.Cache2')
require_gem('Gem.DumpCache')
require_gem('Gem.GeneratedConjureQuadruple')
require_gem('Ge... | 35.45 | 97 | 0.661965 | 0 | 0 | 0 | 0 | 2,064 | 0.970381 | 0 | 0 | 608 | 0.285849 |
22fc97fb3dafaa3d0c68a5549bbe8a39af3d15d4 | 7,031 | py | Python | app.py | kosovojs/wikibooster | 70a9d9d7bf41be9fa5e58d40fba216d9b6df008d | [
"MIT"
] | null | null | null | app.py | kosovojs/wikibooster | 70a9d9d7bf41be9fa5e58d40fba216d9b6df008d | [
"MIT"
] | 17 | 2019-07-08T15:32:18.000Z | 2021-01-03T10:30:55.000Z | app.py | kosovojs/wikibooster | 70a9d9d7bf41be9fa5e58d40fba216d9b6df008d | [
"MIT"
] | 1 | 2019-08-28T21:23:48.000Z | 2019-08-28T21:23:48.000Z | import flask
from flask import Flask
from flask import jsonify
from flask import request
from flask_cors import CORS, cross_origin
from flask import render_template
import mwoauth
import requests_oauthlib
import os
import yaml
import mwapi
from tasks.main import Tasks
from save import Save
from db import DB
from typ... | 29.542017 | 156 | 0.729768 | 0 | 0 | 0 | 0 | 4,954 | 0.704193 | 0 | 0 | 1,705 | 0.24236 |
22fcb38b78558c9add6900dca954fd92ecf359b7 | 1,483 | py | Python | pre_embed.py | shelleyyyyu/few_shot | 0fe54444e820fe3201927e6363682913b6d61028 | [
"Apache-2.0"
] | 253 | 2018-08-29T18:59:00.000Z | 2022-03-15T04:53:47.000Z | pre_embed.py | shelleyyyyu/few_shot | 0fe54444e820fe3201927e6363682913b6d61028 | [
"Apache-2.0"
] | 18 | 2018-10-24T09:49:44.000Z | 2022-03-31T14:39:37.000Z | pre_embed.py | shelleyyyyu/few_shot | 0fe54444e820fe3201927e6363682913b6d61028 | [
"Apache-2.0"
] | 38 | 2018-10-17T07:43:25.000Z | 2022-03-05T12:20:33.000Z | import numpy as np
from collections import defaultdict, Counter
import random
import json
from tqdm import tqdm
def transX(dataset):
rel2id = json.load(open(dataset + '/relation2ids'))
ent2id = json.load(open(dataset + '/ent2ids'))
with open('../Fast-TransX/' + dataset + '_base/entity2id.txt', 'w') as... | 32.23913 | 95 | 0.55091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.159137 |
22fd80b994ca4f5c482661c444d74e7a50232ab0 | 7,673 | py | Python | botc/gamemodes/troublebrewing/FortuneTeller.py | Xinverse/BOTC-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-06-21T17:20:17.000Z | 2020-06-21T17:20:17.000Z | botc/gamemodes/troublebrewing/FortuneTeller.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-07-07T03:47:44.000Z | 2020-07-07T03:47:44.000Z | botc/gamemodes/troublebrewing/FortuneTeller.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2022-02-18T00:42:19.000Z | 2022-02-18T00:42:19.000Z | """Contains the Fortune Teller Character class"""
import json
import random
import discord
import datetime
from botc import Action, ActionTypes, Townsfolk, Character, Storyteller, RedHerring, \
RecurringAction, Category, StatusList
from botc.BOTCUtils import GameLogic
from ._utils import TroubleBrewing, TBRole
im... | 41.032086 | 115 | 0.644598 | 6,679 | 0.870001 | 0 | 0 | 679 | 0.088446 | 3,093 | 0.402892 | 2,579 | 0.335939 |
22fdcdf03da29d4d6e3f5e50e7e03925c3c15cdd | 10,849 | py | Python | src/schmetterling/build/tests/test_maven.py | bjuvensjo/schmetterling | 0cdbfe4f379a081d9d4711dd21866b90983365cf | [
"Apache-2.0"
] | null | null | null | src/schmetterling/build/tests/test_maven.py | bjuvensjo/schmetterling | 0cdbfe4f379a081d9d4711dd21866b90983365cf | [
"Apache-2.0"
] | null | null | null | src/schmetterling/build/tests/test_maven.py | bjuvensjo/schmetterling | 0cdbfe4f379a081d9d4711dd21866b90983365cf | [
"Apache-2.0"
] | null | null | null | from unittest.mock import call, MagicMock, patch
from schmetterling.build.maven import build_multi_modules
from schmetterling.build.maven import create_build_result
from schmetterling.build.maven import create_command
from schmetterling.build.maven import create_multi_modules
from schmetterling.build.maven import crea... | 33.381538 | 107 | 0.461702 | 0 | 0 | 0 | 0 | 1,550 | 0.14287 | 0 | 0 | 3,947 | 0.363812 |
22fe0847296c50b27120f9c55084e9eba84b2a5a | 1,753 | py | Python | Copados y Clases/Mastermind_DEBUG.py | FdelMazo/7540rw-Algo1 | 8900604873195df9e902ead6bcb67723a8b654c8 | [
"MIT"
] | 1 | 2021-11-20T18:41:34.000Z | 2021-11-20T18:41:34.000Z | Copados y Clases/Mastermind_DEBUG.py | FdelMazo/7540rw-Algo1 | 8900604873195df9e902ead6bcb67723a8b654c8 | [
"MIT"
] | null | null | null | Copados y Clases/Mastermind_DEBUG.py | FdelMazo/7540rw-Algo1 | 8900604873195df9e902ead6bcb67723a8b654c8 | [
"MIT"
] | null | null | null | #Sacar las lineas con DEBUG para que el juego funcione
import random
DIGITOS = 4
def mastermind():
"""Funcion principal del juego Mastermind"""
print("Bienvenido al Mastermind!")
print("Instrucciones: Tenes que adivinar un codigo de {} digitos distintos. Tu cantidad de aciertos son los numeros que estan corr... | 37.297872 | 263 | 0.697091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 720 | 0.410724 |
22feb380588bd77256d844c8ff999d4f5568fa43 | 1,499 | py | Python | setup.py | ovnicraft/runa | 4834b7467314c51c3e8e010b47a10bdfae597a5b | [
"MIT"
] | 5 | 2018-02-02T13:12:55.000Z | 2019-12-21T04:21:10.000Z | setup.py | ovnicraft/runa | 4834b7467314c51c3e8e010b47a10bdfae597a5b | [
"MIT"
] | 1 | 2017-12-18T15:49:13.000Z | 2017-12-18T15:49:13.000Z | setup.py | ovnicraft/runa | 4834b7467314c51c3e8e010b47a10bdfae597a5b | [
"MIT"
] | 1 | 2020-03-17T03:50:19.000Z | 2020-03-17T03:50:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
requirements = ["Click>=6.0", "suds2==0.7.1"]
setup_... | 28.826923 | 79 | 0.662442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 739 | 0.492667 |
22ffabcfd90f7354812821f61ad46409c8d4a120 | 15,233 | py | Python | PyPortal_User_Interface/code.py | RichardA1/Adafruit_Learning_System_Guides | 7d06d8a126f357a431384c3af73339cb46f44c19 | [
"MIT"
] | 1 | 2022-01-31T21:55:48.000Z | 2022-01-31T21:55:48.000Z | PyPortal_User_Interface/code.py | aadisalimani/Adafruit_Learning_System_Guides | 1b18cfcd6d426bf018545fd7b4102a8196c11c16 | [
"MIT"
] | null | null | null | PyPortal_User_Interface/code.py | aadisalimani/Adafruit_Learning_System_Guides | 1b18cfcd6d426bf018545fd7b4102a8196c11c16 | [
"MIT"
] | null | null | null | import time
import board
import displayio
import busio
from analogio import AnalogIn
import neopixel
import adafruit_adt7410
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text.label import Label
from adafruit_button import Button
import adafruit_touchscreen
from adafruit_pyportal import PyPortal
#... | 35.508159 | 89 | 0.594433 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,597 | 0.236117 |
fe00cf45d1015948865b349bcd27a15e243e3e66 | 7,741 | py | Python | btse_futures/order.py | yottatix/btse-python | 1c5019d0a68dff797afc70c4cc32c1950c28af4e | [
"MIT"
] | null | null | null | btse_futures/order.py | yottatix/btse-python | 1c5019d0a68dff797afc70c4cc32c1950c28af4e | [
"MIT"
] | null | null | null | btse_futures/order.py | yottatix/btse-python | 1c5019d0a68dff797afc70c4cc32c1950c28af4e | [
"MIT"
] | null | null | null | import json
from btse_futures.constants import OrderType, Side, TimeInForce
class Order:
"""
Class to represent a BTSE Order
...
Attributes
----------
size : int
order quantity or size. e.g. 1
price : float
price. e.g. 7000.0
side: str
order side. B... | 33.510823 | 274 | 0.612324 | 7,655 | 0.98889 | 0 | 0 | 2,645 | 0.341687 | 0 | 0 | 2,740 | 0.353959 |
fe00feaeeab5dd9b94bc8b6fc0a0dcbedc801a5d | 2,037 | py | Python | tests/mock_responses.py | md-reddevil/blinkpy | 3c7892385352079227c6251eb88257870bea0bb3 | [
"MIT"
] | null | null | null | tests/mock_responses.py | md-reddevil/blinkpy | 3c7892385352079227c6251eb88257870bea0bb3 | [
"MIT"
] | null | null | null | tests/mock_responses.py | md-reddevil/blinkpy | 3c7892385352079227c6251eb88257870bea0bb3 | [
"MIT"
] | null | null | null | """Simple mock responses definitions."""
from blinkpy.helpers.util import BlinkURLHandler
import blinkpy.helpers.constants as const
LOGIN_RESPONSE = {
'region': {'mock': 'Test'},
'networks': {
'1234': {'name': 'test', 'onboarded': True}
},
'authtoken': {'authtoken': 'foobar123', 'message': 'au... | 28.291667 | 65 | 0.573883 | 583 | 0.286205 | 0 | 0 | 105 | 0.051546 | 0 | 0 | 567 | 0.278351 |
fe01b90ce53e119b08e13770e4500dbf262d962f | 2,061 | py | Python | fits_tools.py | steveschulze/Photometry | 3bc4ce457a270962321176d0e3e288b5a96cd34b | [
"BSD-2-Clause"
] | 6 | 2020-03-05T20:58:35.000Z | 2022-02-13T20:18:46.000Z | fits_tools.py | steveschulze/Photometry | 3bc4ce457a270962321176d0e3e288b5a96cd34b | [
"BSD-2-Clause"
] | 1 | 2020-03-10T00:03:46.000Z | 2020-03-10T00:03:46.000Z | fits_tools.py | steveschulze/Photometry | 3bc4ce457a270962321176d0e3e288b5a96cd34b | [
"BSD-2-Clause"
] | 1 | 2020-11-26T10:38:47.000Z | 2020-11-26T10:38:47.000Z | from astropy import coordinates as coord
from astropy import wcs
from astropy.io import fits
from astropy import units as u
from misc import bcolors
import numpy as np
import os
def convert_hms_dd(RA, DEC):
'''
Convert HMS to DD system
'''
if (':' in RA) and (':' in DEC):
Coord_dd = coord.SkyCoord(RA, DEC... | 21.247423 | 111 | 0.622028 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 401 | 0.194566 |
fe028f3f35a9ad5d36908ec80630b139c6300e3c | 2,155 | py | Python | test_stbp_snn_eval.py | neurom-iot/n3ml | 39c6b50661f293d58b4b37ef613643860724bb24 | [
"MIT"
] | 11 | 2019-03-15T17:20:54.000Z | 2022-03-01T08:25:36.000Z | test_stbp_snn_eval.py | neurom-iot/n3ml | 39c6b50661f293d58b4b37ef613643860724bb24 | [
"MIT"
] | 7 | 2019-03-15T16:02:51.000Z | 2021-12-03T08:17:06.000Z | test_stbp_snn_eval.py | neurom-iot/n3ml | 39c6b50661f293d58b4b37ef613643860724bb24 | [
"MIT"
] | 9 | 2019-10-14T12:38:19.000Z | 2021-12-02T04:49:28.000Z | import argparse
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
from n3ml.model import DynamicModel_STBP_SNN
def validate(val_loader, model, encoder, criterion, opt):
model.eval()
total_images = 0
num_corrects = 0
total_loss = 0
with torch.no_g... | 28.355263 | 86 | 0.647332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.063573 |
fe02b43015e3d0762066c7be3eb1af3c04bff4d4 | 2,757 | py | Python | section_07_(files)/read_csv.py | govex/python-lessons | e692f48b6db008a45df0b941dee1e580f5a6c800 | [
"MIT"
] | 5 | 2019-10-25T20:47:22.000Z | 2021-12-07T06:37:22.000Z | section_07_(files)/read_csv.py | govex/python-lessons | e692f48b6db008a45df0b941dee1e580f5a6c800 | [
"MIT"
] | null | null | null | section_07_(files)/read_csv.py | govex/python-lessons | e692f48b6db008a45df0b941dee1e580f5a6c800 | [
"MIT"
] | 1 | 2021-07-20T18:56:15.000Z | 2021-07-20T18:56:15.000Z | # If you're new to file handling, be sure to check out with_open.py first!
# You'll also want to check out read_text.py before this example. This one is a bit more advanced.
with open('read_csv.csv', 'r') as states_file:
# Instead of leaving the file contents as a string, we're splitting the file into a list... | 48.368421 | 158 | 0.692057 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,348 | 0.85165 |
fe03d9810588ad4d8d061ca21558f5e026141e64 | 2,334 | py | Python | kaggle_melanoma/schedulers.py | tinve/kaggle_melanoma | 6d2d16d62a394fd9cc2498bdf1a19ce60fe047eb | [
"MIT"
] | 8 | 2020-06-01T10:42:40.000Z | 2022-02-17T08:42:49.000Z | kaggle_melanoma/schedulers.py | tinve/kaggle_melanoma | 6d2d16d62a394fd9cc2498bdf1a19ce60fe047eb | [
"MIT"
] | null | null | null | kaggle_melanoma/schedulers.py | tinve/kaggle_melanoma | 6d2d16d62a394fd9cc2498bdf1a19ce60fe047eb | [
"MIT"
] | 2 | 2020-06-08T22:34:38.000Z | 2022-02-24T03:15:59.000Z | import math
from torch.optim.lr_scheduler import _LRScheduler
from torch.optim.optimizer import Optimizer
class PolyLR(_LRScheduler):
"""
Sets the learning rate of each parameter group according to poly learning rate policy
"""
def __init__(self, optimizer, max_iter=90000, power=0.9, last_epoch=-1):... | 35.363636 | 114 | 0.641388 | 2,071 | 0.887318 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.093402 |
fe04e111d5ba3ee739293195694259fc26b56d25 | 30 | py | Python | data/data/__init__.py | PumpkinYing/GAT | 723a20fcd9f915123d46ef4ef03eeadb6910635a | [
"MIT"
] | null | null | null | data/data/__init__.py | PumpkinYing/GAT | 723a20fcd9f915123d46ef4ef03eeadb6910635a | [
"MIT"
] | null | null | null | data/data/__init__.py | PumpkinYing/GAT | 723a20fcd9f915123d46ef4ef03eeadb6910635a | [
"MIT"
] | null | null | null | from .dataset import load_data | 30 | 30 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fe056ef418d151035d2b9bd419b580cf756d0fd1 | 1,099 | py | Python | utils.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | utils.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | utils.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | import json
import logging
logger = logging.getLogger(__name__)
with open('configuration.json') as f:
config = json.load(f)
TELEGRAM_TOKEN = config["telegram-bot-token"]
NOTION_TOKEN = config["notion-token"]
NOTION_TABLE_URL = config["inbox_table"]["table_url"]
def check_allowed_user(user_id):
"""
chec... | 27.475 | 107 | 0.674249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 391 | 0.355778 |
fe05b5a6d987129895e699ef1d4e1c22d1bf1542 | 472 | py | Python | enaml/core/byteplay/__init__.py | timgates42/enaml | 054efe6a4047d84f2fff718d656a64a2363884dc | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/core/byteplay/__init__.py | timgates42/enaml | 054efe6a4047d84f2fff718d656a64a2363884dc | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/core/byteplay/__init__.py | timgates42/enaml | 054efe6a4047d84f2fff718d656a64a2363884dc | [
"BSD-3-Clause-Clear"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2013-2018, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#--------------------------------------------... | 33.714286 | 79 | 0.493644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 348 | 0.737288 |
fe068879b9f1513a9f5e49e88200ed64c8fa16f1 | 12,623 | py | Python | cassiopeia/datastores/riotapi/match.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | 1 | 2021-09-07T05:26:21.000Z | 2021-09-07T05:26:21.000Z | cassiopeia/datastores/riotapi/match.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | null | null | null | cassiopeia/datastores/riotapi/match.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | 1 | 2016-10-20T11:54:20.000Z | 2016-10-20T11:54:20.000Z | from time import time
from typing import Type, TypeVar, MutableMapping, Any, Iterable, Generator, Union
import arrow
import datetime
import math
from datapipelines import DataSource, PipelineContext, Query, NotFoundError, validate_query
from .common import RiotAPIService, APINotFoundError
from ...data import Platform... | 45.735507 | 178 | 0.614751 | 12,002 | 0.950804 | 4,156 | 0.32924 | 10,494 | 0.83134 | 0 | 0 | 2,230 | 0.176662 |
fe073352dbed399802293822986fcaea27535a33 | 10,374 | py | Python | Lib/site-packages/hackedit/vendor/jedi/cache.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 1 | 2017-08-19T08:13:28.000Z | 2017-08-19T08:13:28.000Z | node_modules/nuclide/pkg/nuclide-python-rpc/VendorLib/jedi/cache.py | kevingatera/kgatewebapp | f0dbc50b7af2736e1f6c6f96f0a26fc7ff69db20 | [
"Unlicense"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/hackedit/vendor/jedi/cache.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | """
This caching is very important for speed and memory optimizations. There's
nothing really spectacular, just some decorators. The following cache types are
available:
- module caching (`load_parser` and `save_parser`), which uses pickle and is
really important to assure low load times of modules like ``numpy``.
-... | 29.724928 | 88 | 0.618662 | 3,629 | 0.349817 | 742 | 0.071525 | 1,316 | 0.126856 | 0 | 0 | 3,265 | 0.314729 |
fe07b0d65355435bfe80638b0233d70fcb2d730a | 6,277 | py | Python | sandia_hand/ros/sandia_hand_teleop/simple_grasp/simple_grasp.py | adarshrs/Drone-Simulator-for-ROS-Kinetic | a44eef1bcaacc55539325bba663f0c8abfd7c75b | [
"MIT"
] | null | null | null | sandia_hand/ros/sandia_hand_teleop/simple_grasp/simple_grasp.py | adarshrs/Drone-Simulator-for-ROS-Kinetic | a44eef1bcaacc55539325bba663f0c8abfd7c75b | [
"MIT"
] | null | null | null | sandia_hand/ros/sandia_hand_teleop/simple_grasp/simple_grasp.py | adarshrs/Drone-Simulator-for-ROS-Kinetic | a44eef1bcaacc55539325bba663f0c8abfd7c75b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Software License Agreement (Apache License)
#
# Copyright 2013 Open Source Robotics Foundation
# Author: Morgan Quigley
#
# 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 ... | 37.142012 | 121 | 0.58563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,572 | 0.250438 |
fe07d62ba16713663bde826dc0ce1fe3d2c478fc | 1,680 | py | Python | ui/ui_prestamo_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | ui/ui_prestamo_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | ui/ui_prestamo_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'PrestamoDeLibros.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromU... | 31.111111 | 79 | 0.689881 | 825 | 0.491071 | 0 | 0 | 0 | 0 | 0 | 0 | 284 | 0.169048 |
fe099e17f120425cb619611e6ff40d2da802127d | 3,572 | py | Python | src/zope/app/content/__init__.py | zopefoundation/zope.app.content | d4c0276ff90bceed2156d808ab6b42b85d7b3810 | [
"ZPL-2.1"
] | null | null | null | src/zope/app/content/__init__.py | zopefoundation/zope.app.content | d4c0276ff90bceed2156d808ab6b42b85d7b3810 | [
"ZPL-2.1"
] | 1 | 2017-04-22T19:53:21.000Z | 2017-04-23T16:44:58.000Z | src/zope/app/content/__init__.py | zopefoundation/zope.app.content | d4c0276ff90bceed2156d808ab6b42b85d7b3810 | [
"ZPL-2.1"
] | 1 | 2015-04-03T07:35:01.000Z | 2015-04-03T07:35:01.000Z | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 27.060606 | 78 | 0.606663 | 77 | 0.021557 | 0 | 0 | 107 | 0.029955 | 0 | 0 | 2,824 | 0.790594 |
fe0a261cca22dd0888b296d89b5ce6c47723b470 | 4,569 | py | Python | python-modules/robcoewmrobotconfigurator/robcoewmrobotconfigurator/run.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | null | null | null | python-modules/robcoewmrobotconfigurator/robcoewmrobotconfigurator/run.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | null | null | null | python-modules/robcoewmrobotconfigurator/robcoewmrobotconfigurator/run.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
#
# This file is part of ewm-cloud-robotics
# (see https://github.com/SAP/ewm-cloud-robotics).
#
# This file is licensed under the Apache Software License, v. 2 except as noted
# otherwise in the LIC... | 33.595588 | 98 | 0.661633 | 811 | 0.177501 | 0 | 0 | 0 | 0 | 0 | 0 | 1,770 | 0.387393 |
fe0a42ffd316cd292e323db6162852aaf54d8093 | 37 | py | Python | website/addons/forward/views/__init__.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | website/addons/forward/views/__init__.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | website/addons/forward/views/__init__.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2019-07-16T00:14:49.000Z | 2019-07-16T00:14:49.000Z | from . import config, widget # noqa
| 18.5 | 36 | 0.702703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.162162 |
fe0ae5c8386d6c3d6f937a81ff9888fef7e3e87d | 215 | py | Python | hwtest/automated/usb3_test.py | crvallance/wlanpi-hwtest | 8858ef6e8fa78767238b968b121b4d5ab2155701 | [
"MIT"
] | null | null | null | hwtest/automated/usb3_test.py | crvallance/wlanpi-hwtest | 8858ef6e8fa78767238b968b121b4d5ab2155701 | [
"MIT"
] | null | null | null | hwtest/automated/usb3_test.py | crvallance/wlanpi-hwtest | 8858ef6e8fa78767238b968b121b4d5ab2155701 | [
"MIT"
] | null | null | null | from hwtest.shell_utils import run_command
def test_linux_usb3hub():
"""
Test for Linux Foundation 3.0 root hub in `lsusb` output
"""
resp = run_command(["lsusb"])
assert "1d6b:0003" in resp
| 17.916667 | 60 | 0.665116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.418605 |
fe0d4c9278280b1296bb8358bef8f6502e5d0540 | 82,820 | py | Python | ninjabackend.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | ninjabackend.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | ninjabackend.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2014 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... | 45.630854 | 176 | 0.589942 | 81,734 | 0.986887 | 0 | 0 | 0 | 0 | 0 | 0 | 11,919 | 0.143915 |
fe0def896199f4c5334b061cf90749e18fdcc0bd | 223 | py | Python | tests/strategies/common/test_cputime.py | y-tetsu/othello | 73eabfe22d6b44bbfa0b436e6287e3e7356620f4 | [
"MIT"
] | 10 | 2020-07-24T22:04:51.000Z | 2022-03-25T06:09:48.000Z | tests/strategies/common/test_cputime.py | y-tetsu/othello | 73eabfe22d6b44bbfa0b436e6287e3e7356620f4 | [
"MIT"
] | 12 | 2021-04-30T09:53:18.000Z | 2022-02-25T04:16:02.000Z | tests/strategies/common/test_cputime.py | y-tetsu/othello | 73eabfe22d6b44bbfa0b436e6287e3e7356620f4 | [
"MIT"
] | 1 | 2021-11-25T13:12:32.000Z | 2021-11-25T13:12:32.000Z | """Tests of cputime.py
"""
import unittest
from reversi.strategies.common import CPU_TIME
class TestCputime(unittest.TestCase):
"""cputime
"""
def test_cputime(self):
self.assertEqual(CPU_TIME, 0.5)
| 15.928571 | 46 | 0.690583 | 128 | 0.573991 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.197309 |
fe0ede7a40a877fbc5bae0945b61462c0561098f | 5,249 | py | Python | experiments/cifar10_recon.py | coopersigrist/RecurrentNeuralSystem- | bd5bb680ec7f2166547709195f7bb3cd52cca5e8 | [
"MIT"
] | 3 | 2021-03-03T20:08:34.000Z | 2021-03-19T15:27:58.000Z | experiments/cifar10_recon.py | coopersigrist/RecurrentNeuralSystem- | bd5bb680ec7f2166547709195f7bb3cd52cca5e8 | [
"MIT"
] | null | null | null | experiments/cifar10_recon.py | coopersigrist/RecurrentNeuralSystem- | bd5bb680ec7f2166547709195f7bb3cd52cca5e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""ReNS experiments - CIFAR10
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1byZ4xTfCK2x1Rhkxpl-Vv4sqA-bo4bis
# SETUP
"""
#@title Insatlling Pyorch
# !pip install torch
# !pip install torchvision
#@title Import Dependencies... | 29.994286 | 98 | 0.649076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,128 | 0.214898 |
fe0f496060ed3aa777376eab607ac140da6babfa | 1,400 | py | Python | horizon/forms/__init__.py | ameoba/horizon | ff9e367c98a8bb79f10914abffaaa04b0a461819 | [
"Apache-2.0"
] | 2 | 2019-12-29T09:20:13.000Z | 2020-01-01T13:12:34.000Z | horizon/forms/__init__.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 10 | 2015-02-19T20:27:04.000Z | 2017-05-15T15:04:32.000Z | horizon/forms/__init__.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | 36.842105 | 78 | 0.784286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 785 | 0.560714 |
fe10f333391851cb33d5c6c2715480481922b0d0 | 2,993 | py | Python | heat/tests/test_rpc_listener_client.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 1 | 2015-12-18T21:46:55.000Z | 2015-12-18T21:46:55.000Z | heat/tests/test_rpc_listener_client.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | heat/tests/test_rpc_listener_client.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 3 | 2018-07-19T17:43:37.000Z | 2019-11-15T22:13:30.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 42.15493 | 74 | 0.687604 | 2,279 | 0.761443 | 0 | 0 | 2,221 | 0.742065 | 0 | 0 | 747 | 0.249582 |
fe116c1174a46647c502098395333cc909588b1c | 684 | py | Python | amadeus/travel/trip_parser_jobs/_status.py | akshitsingla/amadeus-python | d8f3595e556b674998156f98d8a318045bb4c21c | [
"MIT"
] | 125 | 2018-04-09T07:27:24.000Z | 2022-02-22T11:45:20.000Z | amadeus/travel/trip_parser_jobs/_status.py | akshitsingla/amadeus-python | d8f3595e556b674998156f98d8a318045bb4c21c | [
"MIT"
] | 58 | 2018-03-29T14:58:01.000Z | 2022-03-17T10:18:07.000Z | amadeus/travel/trip_parser_jobs/_status.py | akshitsingla/amadeus-python | d8f3595e556b674998156f98d8a318045bb4c21c | [
"MIT"
] | 58 | 2018-04-06T10:56:20.000Z | 2022-03-04T01:23:24.000Z | from amadeus.client.decorator import Decorator
class TripParserStatus(Decorator, object):
def __init__(self, client, job_id):
Decorator.__init__(self, client)
self.job_id = job_id
def get(self, **params):
'''
Returns the parsing status and the link to the result
in cas... | 28.5 | 76 | 0.627193 | 634 | 0.926901 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.519006 |
fe12421e5a8c03bfd1fbb0c021c5255e880a14d5 | 7,737 | py | Python | tools/third_party/iniconfig/testing/test_iniconfig.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 2,479 | 2018-05-28T14:51:29.000Z | 2022-03-30T14:41:18.000Z | tools/third_party/iniconfig/testing/test_iniconfig.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 7,642 | 2018-05-28T09:38:03.000Z | 2022-03-31T20:55:48.000Z | tools/third_party/iniconfig/testing/test_iniconfig.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 1,303 | 2018-05-29T14:50:02.000Z | 2022-03-30T17:30:42.000Z | import py
import pytest
from iniconfig import IniConfig, ParseError, __all__ as ALL
from iniconfig import iscommentline
from textwrap import dedent
check_tokens = {
'section': (
'[section]',
[(0, 'section', None, None)]
),
'value': (
'value = 1',
[(0, None, 'value', '1')]
... | 24.561905 | 73 | 0.586145 | 0 | 0 | 0 | 0 | 524 | 0.067727 | 0 | 0 | 2,611 | 0.337469 |
fe13276650bb177fc42299abc71b473c1a0414dc | 3,586 | py | Python | jskparser/jskparser/util.py | natebragg/java-sketch | f5ac26f2cc46ae4556f9a61c55afd37f55c961ff | [
"MIT"
] | 15 | 2015-12-15T18:33:50.000Z | 2021-09-29T11:48:54.000Z | jskparser/jskparser/util.py | natebragg/java-sketch | f5ac26f2cc46ae4556f9a61c55afd37f55c961ff | [
"MIT"
] | 11 | 2015-11-16T22:14:58.000Z | 2021-09-23T05:28:40.000Z | jskparser/jskparser/util.py | natebragg/java-sketch | f5ac26f2cc46ae4556f9a61c55afd37f55c961ff | [
"MIT"
] | 8 | 2015-11-16T21:50:08.000Z | 2021-03-23T15:15:34.000Z | import os
from subprocess import call
from . import glob2
pwd = os.path.dirname(__file__)
def get_files_from_path(path, ext):
# use set to remove duplicate files. weird...but it happens
if os.path.isfile(path): return set([os.path.abspath(path)])
else: # i.e., folder
files = glob2.glob(os.path.a... | 54.333333 | 209 | 0.663971 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,088 | 0.303402 |
fe133101724c39453da53bbd1a90715fd62fd7e1 | 24,301 | py | Python | fiftyone/core/patches.py | SNeugber/fiftyone | a50be47bbbf189e4bbdcd631b93c4c9cbf41c6b7 | [
"Apache-2.0"
] | null | null | null | fiftyone/core/patches.py | SNeugber/fiftyone | a50be47bbbf189e4bbdcd631b93c4c9cbf41c6b7 | [
"Apache-2.0"
] | null | null | null | fiftyone/core/patches.py | SNeugber/fiftyone | a50be47bbbf189e4bbdcd631b93c4c9cbf41c6b7 | [
"Apache-2.0"
] | null | null | null | """
Patches views.
| Copyright 2017-2021, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
from copy import deepcopy
import eta.core.utils as etau
import fiftyone.core.aggregations as foa
import fiftyone.core.dataset as fod
import fiftyone.core.fields as fof
import fiftyone.core.labels as fol
import fifty... | 32.186755 | 104 | 0.607876 | 11,829 | 0.48677 | 0 | 0 | 1,921 | 0.07905 | 0 | 0 | 8,824 | 0.363113 |
fe13f782ba0630659072cb056a27d408b76a7090 | 1,973 | py | Python | {{cookiecutter.repo_name}}/setup.py | ocesaulo/cookiecutter-ocn_sci | d41e826f56ba67cfde878ffc8188d497214a5f5b | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/setup.py | ocesaulo/cookiecutter-ocn_sci | d41e826f56ba67cfde878ffc8188d497214a5f5b | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/setup.py | ocesaulo/cookiecutter-ocn_sci | d41e826f56ba67cfde878ffc8188d497214a5f5b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
{%- set license_classifiers = {
'MIT license': 'License :: OSI Approved :: MIT License',
'BSD license': 'License :: OSI A... | 34.614035 | 103 | 0.667511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 958 | 0.485555 |
fe14a23d28223212d47c4b4e15846d9b001de45c | 6,153 | py | Python | src/zope/app/debug/debug.py | zopefoundation/zope.app.debug | 4f31e98f6a633f089bf132dd55cb3ead0270887b | [
"ZPL-2.1"
] | null | null | null | src/zope/app/debug/debug.py | zopefoundation/zope.app.debug | 4f31e98f6a633f089bf132dd55cb3ead0270887b | [
"ZPL-2.1"
] | 2 | 2017-05-08T10:46:20.000Z | 2021-02-02T07:16:49.000Z | src/zope/app/debug/debug.py | zopefoundation/zope.app.debug | 4f31e98f6a633f089bf132dd55cb3ead0270887b | [
"ZPL-2.1"
] | 1 | 2015-04-03T07:36:10.000Z | 2015-04-03T07:36:10.000Z | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 29.868932 | 78 | 0.57988 | 4,429 | 0.719811 | 0 | 0 | 116 | 0.018853 | 0 | 0 | 1,499 | 0.243621 |
fe1507ff94aad4e4172a286172e136314812d8b6 | 1,855 | py | Python | transfer_learning.py | terryli710/SIIM-ACR-Pneumothorax-Classification | 8b278a9885b71c919d7064b2df42863b53f7adf3 | [
"MIT"
] | null | null | null | transfer_learning.py | terryli710/SIIM-ACR-Pneumothorax-Classification | 8b278a9885b71c919d7064b2df42863b53f7adf3 | [
"MIT"
] | null | null | null | transfer_learning.py | terryli710/SIIM-ACR-Pneumothorax-Classification | 8b278a9885b71c919d7064b2df42863b53f7adf3 | [
"MIT"
] | 1 | 2020-05-14T06:16:12.000Z | 2020-05-14T06:16:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 22:42:54 2020
@author: mike
"""
import numpy as np
import tensorflow as tf
from tensorflow import keras
from sklearn.model_selection import train_test_split
from tensorflow.keras.applications import VGG16
from tensorflow.keras import layers
fro... | 26.884058 | 117 | 0.725067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.119677 |
fe15525a101c45bc65c1049e9b6ece9e4cd29f69 | 2,158 | py | Python | core/tests/test_polyflow/test_workflows/test_hyperband.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_polyflow/test_workflows/test_hyperband.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_polyflow/test_workflows/test_hyperband.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 35.377049 | 79 | 0.672845 | 1,271 | 0.588971 | 0 | 0 | 1,298 | 0.601483 | 0 | 0 | 819 | 0.379518 |
fe1823b5cc5e17b94ed66896e05441088fc1ee56 | 1,503 | py | Python | Class Work oop.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | Class Work oop.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | Class Work oop.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null |
class Student:
studentLevel = 'first year computer science 2020/2021 session'
studentCounter = 0
registeredCourse='csc102'
def __init__(self, thename, thematricno, thesex,thehostelname,theage,thecsc102examscore):
self.name = thename
self.matricno = thematricno
self.sex = thesex
... | 26.368421 | 93 | 0.632069 | 1,322 | 0.879574 | 0 | 0 | 416 | 0.27678 | 0 | 0 | 314 | 0.208916 |
fe185aaa73619017a36f547b25642264993ebd15 | 1,820 | py | Python | clickhouse_sqlalchemy/drivers/reflection.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | clickhouse_sqlalchemy/drivers/reflection.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | clickhouse_sqlalchemy/drivers/reflection.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | from sqlalchemy.engine import reflection
from clickhouse_sqlalchemy import Table, engines
class ClickHouseInspector(reflection.Inspector):
def reflect_table(self, table, *args, **kwargs):
# This check is necessary to support direct instantiation of
# `clickhouse_sqlalchemy.Table` and then reflect... | 33.703704 | 78 | 0.621978 | 1,726 | 0.948352 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.095055 |
fe18f53bb174876b9174543e0887f93aad3f8c21 | 6,686 | py | Python | tests/test_disque.py | abdul-khalid/pydisque | a9b5caa6dac0621a0174d168f4a04c88d0e2f8b5 | [
"MIT"
] | 1 | 2019-02-28T09:48:22.000Z | 2019-02-28T09:48:22.000Z | tests/test_disque.py | abdul-khalid/pydisque | a9b5caa6dac0621a0174d168f4a04c88d0e2f8b5 | [
"MIT"
] | null | null | null | tests/test_disque.py | abdul-khalid/pydisque | a9b5caa6dac0621a0174d168f4a04c88d0e2f8b5 | [
"MIT"
] | null | null | null | """
Unit Tests for the pydisque module.
Currently, most of these tests require a fresh instance of
Disque to be valid and pass.
"""
import unittest
import json
import time
import random
import six
from pydisque.client import Client
from redis.exceptions import ResponseError
class TestDisque(unittest.TestCase):
... | 28.695279 | 76 | 0.588095 | 6,358 | 0.950942 | 0 | 0 | 0 | 0 | 0 | 0 | 1,523 | 0.227789 |
fe190819e431106bd53c08a681b3911ad9502e88 | 6,289 | py | Python | src/runner.py | samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers | 619c5c0b17438d1014f7ca7e4ce13cc44c45de3c | [
"MIT"
] | 1 | 2020-11-17T16:09:13.000Z | 2020-11-17T16:09:13.000Z | src/runner.py | samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers | 619c5c0b17438d1014f7ca7e4ce13cc44c45de3c | [
"MIT"
] | null | null | null | src/runner.py | samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers | 619c5c0b17438d1014f7ca7e4ce13cc44c45de3c | [
"MIT"
] | 4 | 2019-07-05T02:03:02.000Z | 2022-01-21T22:12:16.000Z | # -*- coding: utf-8 -*- #
"""*********************************************************************************************"""
# FileName [ runner.py ]
# Synopsis [ main program that runs the 'Naive Bayes' and 'Decision Tree' training / testing ]
# Author [ Ting-Wei Liu (Andi611) ]
# Copyright [... | 38.582822 | 151 | 0.690253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,656 | 0.422325 |
fe195c652a959304ac79843bfd7f33439351fd89 | 7,393 | py | Python | igibson/metrics/agent.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | igibson/metrics/agent.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | igibson/metrics/agent.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | import copy
import numpy as np
import pybullet as p
from igibson.metrics.metric_base import MetricBase
class BehaviorRobotMetric(MetricBase):
def __init__(self):
self.initialized = False
self.state_cache = {}
self.next_state_cache = {}
self.agent_pos = {part: [] for part in ["l... | 38.305699 | 116 | 0.581631 | 7,282 | 0.984986 | 0 | 0 | 0 | 0 | 0 | 0 | 1,043 | 0.141079 |
fe1a8e41b9a6dd96ffc12066b0bee8e9c0b3b6b6 | 438 | py | Python | fontslice/__init__.py | Arahabica/font-subset-css | 393b9a452af49c2168c7a9f84983e4170937ea67 | [
"MIT"
] | null | null | null | fontslice/__init__.py | Arahabica/font-subset-css | 393b9a452af49c2168c7a9f84983e4170937ea67 | [
"MIT"
] | null | null | null | fontslice/__init__.py | Arahabica/font-subset-css | 393b9a452af49c2168c7a9f84983e4170937ea67 | [
"MIT"
] | null | null | null | import sys
from .main import (
_chunk_list,
_get_unicode_range_hash,
convert_unicode_range,
get_120_unicode_ranges,
get_unicode_ranges_from_text,
generate_css,
main,
)
__all__ = [
"_chunk_list",
"_get_unicode_range_hash",
"convert_unicode_range",
"get_120_unicode_ranges",
... | 17.52 | 35 | 0.687215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.33105 |
fe1c00d5c2481798d64766027364e0e668d8c7bc | 59,866 | py | Python | src/ttkbootstrap/dialogs/dialogs.py | MrJaatt/ttkbootstrap | 4e837d64859e5a230ef0500faddbb2c384f5b9d4 | [
"MIT"
] | 1 | 2022-01-28T09:37:32.000Z | 2022-01-28T09:37:32.000Z | src/ttkbootstrap/dialogs/dialogs.py | MrJaatt/ttkbootstrap | 4e837d64859e5a230ef0500faddbb2c384f5b9d4 | [
"MIT"
] | null | null | null | src/ttkbootstrap/dialogs/dialogs.py | MrJaatt/ttkbootstrap | 4e837d64859e5a230ef0500faddbb2c384f5b9d4 | [
"MIT"
] | null | null | null | """
This module contains various base dialog base classes that can be
used to create custom dialogs for the end user.
These classes serve as the basis for the pre-defined static helper
methods in the `Messagebox`, and `Querybox` container classes.
"""
import calendar
import textwrap
from datetime im... | 33.65149 | 105 | 0.568219 | 59,259 | 0.989828 | 0 | 0 | 21,264 | 0.355181 | 0 | 0 | 28,608 | 0.477851 |
a3a6ae7f4fab920589a878c0b0e9e7fa6a88c26a | 2,504 | py | Python | Google-Play-Store-App-Rating/code.py | venky4121994/ga-learner-dsmp-repo | 1bef03489931eece0d5ecb9ce0501dfeb558dc59 | [
"MIT"
] | null | null | null | Google-Play-Store-App-Rating/code.py | venky4121994/ga-learner-dsmp-repo | 1bef03489931eece0d5ecb9ce0501dfeb558dc59 | [
"MIT"
] | null | null | null | Google-Play-Store-App-Rating/code.py | venky4121994/ga-learner-dsmp-repo | 1bef03489931eece0d5ecb9ce0501dfeb558dc59 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
#Code starts here
data = pd.read_csv(path)
data.hist(['Rating'])
data = data[data['Rating']<=5]
data.hist(['Rating'])
#Code ends here
# --------------
# code starts here
total_null = data.isnull().s... | 25.55102 | 89 | 0.680112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 953 | 0.380591 |
a3a6e52033cd00d1b8f29b49e45d1f519baff3e9 | 6,597 | py | Python | converters/brat2iob.py | Banguiskode/nerds | 366420b2ec57bf790562de62a79f4973cbd6b3ed | [
"BSD-3-Clause"
] | 15 | 2019-12-05T18:40:22.000Z | 2021-02-20T05:34:50.000Z | converters/brat2iob.py | Banguiskode/nerds | 366420b2ec57bf790562de62a79f4973cbd6b3ed | [
"BSD-3-Clause"
] | null | null | null | converters/brat2iob.py | Banguiskode/nerds | 366420b2ec57bf790562de62a79f4973cbd6b3ed | [
"BSD-3-Clause"
] | 4 | 2019-12-30T13:03:05.000Z | 2021-02-16T13:08:09.000Z | import argparse
import operator
import os
import re
import shutil
import spacy
import tempfile
from nerds.utils import spans_to_tokens, get_logger
def segment_text_to_sentences(text_file, sentence_splitter):
""" Segment text into sentences. Text is provided by BRAT in .txt
file.
Args:
... | 36.854749 | 167 | 0.618463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,414 | 0.517508 |
a3a738f0c10019d9229ed8e9b93898831920170d | 2,503 | py | Python | kraken/lib/util.py | zjsteyn/kraken | eaa9f4290db5425ddf80d0aebfa3944713558ab5 | [
"Apache-2.0"
] | 1 | 2022-02-03T14:41:58.000Z | 2022-02-03T14:41:58.000Z | kraken/lib/util.py | ephenum/kraken | 47be8f7ddcb7c7ad63bfc5636df1976a4e84a5f0 | [
"Apache-2.0"
] | null | null | null | kraken/lib/util.py | ephenum/kraken | 47be8f7ddcb7c7ad63bfc5636df1976a4e84a5f0 | [
"Apache-2.0"
] | 1 | 2022-01-19T10:53:20.000Z | 2022-01-19T10:53:20.000Z | """
Ocropus's magic PIL-numpy array conversion routines. They express slightly
different behavior from PIL.Image.toarray().
"""
import unicodedata
import numpy as np
from PIL import Image
__all__ = ['pil2array', 'array2pil']
def pil2array(im: Image.Image, alpha: int = 0) -> np.array:
if im.mode == '1':
... | 27.811111 | 77 | 0.582901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,039 | 0.415102 |
a3a7f40bcb06653665d3b8d30577d4282cd0f05f | 2,877 | py | Python | analysis/calculate_holding_amount.py | hao44le/ico_top_holder_analysis | aeeab01c90e4446b424c52c33a68ccb814123121 | [
"MIT"
] | 538 | 2018-07-04T21:14:52.000Z | 2022-03-26T15:16:08.000Z | analysis/calculate_holding_amount.py | hao44le/ico_top_holder_analysis | aeeab01c90e4446b424c52c33a68ccb814123121 | [
"MIT"
] | 4 | 2018-07-08T22:11:32.000Z | 2021-12-13T19:48:38.000Z | analysis/calculate_holding_amount.py | hao44le/ico_top_holder_analysis | aeeab01c90e4446b424c52c33a68ccb814123121 | [
"MIT"
] | 52 | 2018-07-05T12:07:37.000Z | 2021-04-05T23:34:20.000Z | import sys
sys.path.insert(0,'..')
from data.whale_data import exchnage_accounts
from data.html_helper import check_if_address_name_exists
from data.whale_eth_tx_data import *
from data.whale_token_tx_data import identify_investor_type_token
holding_account = "holding_account"
deposit_account = 'deposit_account'
withd... | 29.96875 | 91 | 0.642336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.091566 |
a3a80291d5fdb7e2a418a7fbbb6542744e0db4d2 | 66,926 | py | Python | textbox/trainer/trainer.py | JBoRu/TextBox-1 | 0dcbaa153acc507e3d55075312d7ca5d23146e03 | [
"MIT"
] | 1 | 2021-08-12T01:08:09.000Z | 2021-08-12T01:08:09.000Z | textbox/trainer/trainer.py | JBoRu/TextBox-1 | 0dcbaa153acc507e3d55075312d7ca5d23146e03 | [
"MIT"
] | null | null | null | textbox/trainer/trainer.py | JBoRu/TextBox-1 | 0dcbaa153acc507e3d55075312d7ca5d23146e03 | [
"MIT"
] | null | null | null | # @Time : 2020/11/14
# @Author : Junyi Li, Gaole He
# @Email : lijunyi@ruc.edu.cn
# UPDATE:
# @Time : 2020/12/2, 2020/11/27, 2020/12/3, 2020/12/26
# @Author : Jinhao Jiang, Xiaoxuan Hu, Tianyi Tang, Jinhao Jiang
# @Email : jiangjinhao@std.uestc.edu.cn, huxiaoxuan@ruc.edu.cn, steventang@ruc.edu.cn, jiangjinhao@st... | 45.997251 | 146 | 0.621836 | 66,076 | 0.987299 | 0 | 0 | 3,094 | 0.04623 | 0 | 0 | 15,412 | 0.230284 |
a3a8234ec61d7794c6426793212657ac24a62f4a | 649 | py | Python | rsserpent/plugins/builtin/__init__.py | EurusEurus/RSSerpent | fd7aaf67b80b2b48c14b1a3efe733374b0012338 | [
"MIT"
] | null | null | null | rsserpent/plugins/builtin/__init__.py | EurusEurus/RSSerpent | fd7aaf67b80b2b48c14b1a3efe733374b0012338 | [
"MIT"
] | null | null | null | rsserpent/plugins/builtin/__init__.py | EurusEurus/RSSerpent | fd7aaf67b80b2b48c14b1a3efe733374b0012338 | [
"MIT"
] | null | null | null | from ...models import Persona, Plugin
from . import example, example_cache, example_ratelimit, example_with_args
plugin = Plugin(
name="rsserpent-plugin-builtin",
author=Persona(
name="queensferryme",
link="https://github.com/queensferryme",
email="queensferry.me@gmail.com",
),
... | 28.217391 | 74 | 0.682589 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.235747 |
a3a86ac522e7ca59c54af2df1492f75fd0ad7b3e | 2,859 | py | Python | data_processing/process_xls.py | luisroel91/libdib_assesment | c969cfecbce1243b457961ffafe5caaea7bb5149 | [
"MIT"
] | null | null | null | data_processing/process_xls.py | luisroel91/libdib_assesment | c969cfecbce1243b457961ffafe5caaea7bb5149 | [
"MIT"
] | null | null | null | data_processing/process_xls.py | luisroel91/libdib_assesment | c969cfecbce1243b457961ffafe5caaea7bb5149 | [
"MIT"
] | null | null | null | import pandas as pd
# Define our header
col_names = [
"year",
"num_males_with_income",
"male_median_income_curr_dollars",
"male_median_income_2019_dollars",
"num_females_with_income",
"female_median_income_curr_dollars",
"female_median_income_2019_dollars",
]
# Load Asian census data XLS, ... | 24.646552 | 82 | 0.671913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,334 | 0.466597 |
a3aa7d175c4008d278417caf82ba36b9fb655fda | 520 | py | Python | Section_1/Exercise_16.py | Szymon-Budziak/WDI_exercises_solutions | 51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460 | [
"MIT"
] | null | null | null | Section_1/Exercise_16.py | Szymon-Budziak/WDI_exercises_solutions | 51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460 | [
"MIT"
] | null | null | null | Section_1/Exercise_16.py | Szymon-Budziak/WDI_exercises_solutions | 51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460 | [
"MIT"
] | 1 | 2021-11-21T09:38:33.000Z | 2021-11-21T09:38:33.000Z | """
Dany jest ciąg określony wzorem: A[n+1] = (A[n] % 2) ∗ (3 ∗ A[n] + 1) + (1 − A[n] % 2) ∗ A[n] / 2.
Startując z dowolnej liczby naturalnej > 1 ciąg ten osiąga wartość 1. Napisać program, który
znajdzie wyraz początkowy z przedziału 2-10000 dla którego wartość 1 jest osiągalna po największej
liczbie kroków.
"""
a0 = ... | 27.368421 | 98 | 0.542308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.622018 |
a3ac4915a74b531c1dc0b8afb60e2d05592076cd | 61,910 | py | Python | SysPy_ver/funcs/_var_declaration.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 4 | 2017-12-28T14:00:16.000Z | 2021-01-21T08:53:14.000Z | SysPy_ver/funcs/_var_declaration.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 1 | 2018-07-31T16:27:00.000Z | 2018-07-31T16:27:37.000Z | SysPy_ver/funcs/_var_declaration.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 2 | 2015-10-12T09:13:13.000Z | 2020-01-06T12:22:55.000Z | """
*****************************************************************************
*
H E A D E R I N F O R M A T I O N *
*
****... | 85.866852 | 356 | 0.37351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,334 | 0.199225 |
a3ac7f877a13b1b1d1be58575a8e398e8062fac9 | 190 | py | Python | Giraffe/Functions.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | Giraffe/Functions.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | Giraffe/Functions.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | 1 | 2022-01-14T17:12:44.000Z | 2022-01-14T17:12:44.000Z | def say_hi(name,age):
print("Hello " + name + ", you are " + age)
say_hi("Mike", "35")
def cube(num): # function
return num*num*num
result = cube(4) # variable
print(result)
| 11.875 | 47 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.263158 |
a3aceb33684c4eb53e7c078943f4c37d7dd1af91 | 4,321 | py | Python | airspace_surgery.py | wipfli/airspaces | c2e01615fa6a065895ed04b8f342a38732e9196b | [
"Apache-2.0"
] | 1 | 2021-12-28T23:40:51.000Z | 2021-12-28T23:40:51.000Z | airspace_surgery.py | wipfli/airspaces | c2e01615fa6a065895ed04b8f342a38732e9196b | [
"Apache-2.0"
] | 1 | 2021-01-30T13:15:14.000Z | 2021-02-07T14:50:27.000Z | airspace_surgery.py | wipfli/aviation | c2e01615fa6a065895ed04b8f342a38732e9196b | [
"Apache-2.0"
] | null | null | null | import glob
import json
path_in = './airspaces/'
path_out = './airspaces_processed/'
filenames = [path.split('/')[-1] for path in glob.glob(path_in + '*')]
remove = {
'france_fr.geojson': [
314327,
314187,
314360,
314359,
314362,
314361,
314364,
314... | 34.023622 | 125 | 0.532053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,186 | 0.505901 |
a3ad80bfdfa53d706abcbf25b9e00b65302a112a | 1,480 | py | Python | AndroidSpider/spider_main.py | lidenghong1/SmallReptileTraining | a1bfb81c9969edfb7554acc50370c0cb036da690 | [
"MIT"
] | 1 | 2018-05-10T01:52:37.000Z | 2018-05-10T01:52:37.000Z | AndroidSpider/spider_main.py | lidenghong1/SmallReptileTraining | a1bfb81c9969edfb7554acc50370c0cb036da690 | [
"MIT"
] | null | null | null | AndroidSpider/spider_main.py | lidenghong1/SmallReptileTraining | a1bfb81c9969edfb7554acc50370c0cb036da690 | [
"MIT"
] | null | null | null | from AndroidSpider import url_manager, html_downloader, html_parser, html_output
'''
爬取百度百科 Android 关键词相关词及简介并输出为一个HTML tab网页
Extra module:
BeautifulSoup
'''
class SpiderMain(object):
def __init__(self):
self.urls = url_manager.UrlManager()
self.downloader = html_downloader.HtmlDownLoader()
... | 36.097561 | 141 | 0.597297 | 1,182 | 0.774574 | 0 | 0 | 0 | 0 | 0 | 0 | 326 | 0.21363 |
a3ae0fed36bd78447d3c9b110c995da7eb0ec44e | 517 | py | Python | trompace/mutations/__init__.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 1 | 2020-06-18T15:43:18.000Z | 2020-06-18T15:43:18.000Z | trompace/mutations/__init__.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 60 | 2019-12-17T11:08:28.000Z | 2021-03-02T16:19:41.000Z | trompace/mutations/__init__.py | trompamusic/trompace-client | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | null | null | null | MUTATION = '''mutation {{
{mutation}
}}'''
def _verify_additional_type(additionaltype):
"""Check that the input to additionaltype is a list of strings.
If it is empty, raise ValueError
If it is a string, convert it to a list of strings."""
if additionaltype is None:
return None
if isins... | 28.722222 | 67 | 0.68472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.450677 |
a3ae4f1aada9f0b92aa00f9f17807bd4f8c072c1 | 951 | py | Python | Web_App/infrastructure/infra.py | CapitalOneDevExchangeHackathon/Financial-Fitness | 54a2203d6b3d96687d822247b040613b644874f2 | [
"MIT"
] | null | null | null | Web_App/infrastructure/infra.py | CapitalOneDevExchangeHackathon/Financial-Fitness | 54a2203d6b3d96687d822247b040613b644874f2 | [
"MIT"
] | null | null | null | Web_App/infrastructure/infra.py | CapitalOneDevExchangeHackathon/Financial-Fitness | 54a2203d6b3d96687d822247b040613b644874f2 | [
"MIT"
] | null | null | null | import boto
import boto3
from config import Config
dynamodb = boto3.resource('dynamodb',
aws_access_key_id=Config.AWS_KEY,
aws_secret_access_key=Config.AWS_SECRET_KEY,
region_name=Config.REGION)
table = dynamodb.Table('user_details')
tables... | 22.116279 | 119 | 0.589905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.100946 |
a3b0b5f68e1084bc860c329219fb7ebd7ec06dcc | 70 | py | Python | numberTheory/natural.py | ndarwin314/symbolicPy | ce2e48bf1557b5995db6c324ada9fbd4767df1e3 | [
"MIT"
] | null | null | null | numberTheory/natural.py | ndarwin314/symbolicPy | ce2e48bf1557b5995db6c324ada9fbd4767df1e3 | [
"MIT"
] | null | null | null | numberTheory/natural.py | ndarwin314/symbolicPy | ce2e48bf1557b5995db6c324ada9fbd4767df1e3 | [
"MIT"
] | null | null | null | # TODO: implement algorithms in c++ or something to make them fast
| 23.333333 | 67 | 0.728571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.957143 |
a3b0debd51a02674a2485fcb5fa43dc82bc97eff | 2,751 | py | Python | SelfTests.py | TeaPackCZ/RobotZed | 7ac8bfb14a6c2e5887f8fed299ad87b384701c54 | [
"MIT"
] | null | null | null | SelfTests.py | TeaPackCZ/RobotZed | 7ac8bfb14a6c2e5887f8fed299ad87b384701c54 | [
"MIT"
] | null | null | null | SelfTests.py | TeaPackCZ/RobotZed | 7ac8bfb14a6c2e5887f8fed299ad87b384701c54 | [
"MIT"
] | null | null | null | import os
import unittest
from Logger import Logger
class TestLogger(unittest.TestCase):
def test_file_handling(self):
testLog = Logger("testLog")
## Check if program can create and open file
self.assertTrue(testLog.opened)
returns = testLog.close()
## Check if logger correc... | 31.988372 | 66 | 0.624137 | 2,601 | 0.945474 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 0.109415 |
a3b19235edf240100e043436d336caa4a2f88321 | 1,986 | py | Python | manga_py/parser.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | null | null | null | manga_py/parser.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | null | null | null | manga_py/parser.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | null | null | null | from logging import warning
from requests import get
from .info import Info
from .provider import Provider
from .providers import get_provider
class Parser:
def __init__(self, args: dict):
self.params = args
def init_provider(
self,
chapter_progress: callable = None,
... | 29.205882 | 74 | 0.618832 | 1,837 | 0.924975 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.077543 |
a3b256695d6b1472ade6817590ffa769163e8848 | 487 | py | Python | src/villages/migrations/0008_auto_20161228_2209.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/villages/migrations/0008_auto_20161228_2209.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/villages/migrations/0008_auto_20161228_2209.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-28 22:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('villages', '0007_village_camp'),
]
operations = [
migrations.AlterField(
... | 22.136364 | 98 | 0.620123 | 335 | 0.687885 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.26078 |
a3b29bffdf2e36c45f804f1c4fc3a56bbdcb9b59 | 1,127 | py | Python | customers/views.py | sindhumadhadi09/CustomerMgmt | db8b27ad6ceb8050843dc33509dc2b6c2ed2c1e2 | [
"MIT"
] | null | null | null | customers/views.py | sindhumadhadi09/CustomerMgmt | db8b27ad6ceb8050843dc33509dc2b6c2ed2c1e2 | [
"MIT"
] | null | null | null | customers/views.py | sindhumadhadi09/CustomerMgmt | db8b27ad6ceb8050843dc33509dc2b6c2ed2c1e2 | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from django.utils import timezone
from .models import Customer
class IndexView(generic.ListView):
template_name = 'customers/index.html'
context_... | 34.151515 | 59 | 0.759539 | 272 | 0.241349 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.120674 |
a3b2f8e0ee7fa10fe388b6e668b6e1e8224ddcfe | 1,531 | py | Python | salt/ext/tornado/test/import_test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | salt/ext/tornado/test/import_test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | salt/ext/tornado/test/import_test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # flake8: noqa
# pylint: skip-file
from __future__ import absolute_import, division, print_function
from salt.ext.tornado.test.util import unittest
class ImportTest(unittest.TestCase):
def test_import_everything(self):
# Some of our modules are not otherwise tested. Import them
# all (unless they... | 31.244898 | 73 | 0.666884 | 1,380 | 0.901372 | 0 | 0 | 0 | 0 | 0 | 0 | 296 | 0.193338 |
a3b315d5551d6efa8a8b5d2f47e368467747b831 | 3,512 | py | Python | butterfree/configs/db/metastore_config.py | fossabot/butterfree | 8a7da8c540b51c6560b2825cb926c40a351f202b | [
"Apache-2.0"
] | null | null | null | butterfree/configs/db/metastore_config.py | fossabot/butterfree | 8a7da8c540b51c6560b2825cb926c40a351f202b | [
"Apache-2.0"
] | null | null | null | butterfree/configs/db/metastore_config.py | fossabot/butterfree | 8a7da8c540b51c6560b2825cb926c40a351f202b | [
"Apache-2.0"
] | null | null | null | """Holds configurations to read and write with Spark to AWS S3."""
import os
from typing import Any, Dict, List, Optional
from pyspark.sql import DataFrame
from butterfree.configs import environment
from butterfree.configs.db import AbstractWriteConfig
from butterfree.dataframe_service import extract_partition_value... | 29.024793 | 82 | 0.611902 | 3,187 | 0.90746 | 0 | 0 | 910 | 0.259112 | 0 | 0 | 1,478 | 0.420843 |
a3b384657bc7cd2ab9ee0a1d8b09ee80039ad894 | 2,401 | py | Python | examples/2-objects.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | 4 | 2020-08-19T04:56:40.000Z | 2022-02-07T22:09:45.000Z | examples/2-objects.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | null | null | null | examples/2-objects.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
import specrel.geom as geom
import specrel.spacetime.physical as phy
import specrel.visualize as vis
# Shared parameters
include_grid = True
include_legend = True
tlim = (0, 2)
xlim = (-2, 2)
# A stationary point object
stationary = phy.MovingObject(0, draw_opt... | 34.797101 | 77 | 0.7197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 961 | 0.40025 |
a3b459175d9e5a84e03ca2cd0f4e7e7f14be6f69 | 3,101 | py | Python | firmware/modulator.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 14 | 2020-02-16T15:36:31.000Z | 2022-03-27T02:24:40.000Z | firmware/modulator.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 1 | 2020-11-23T16:16:33.000Z | 2020-11-23T16:16:33.000Z | firmware/modulator.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 4 | 2021-03-29T16:55:03.000Z | 2022-01-23T16:43:59.000Z | from baremetal import *
from math import pi, sin, cos
import sys
from scale import scale
from settings import *
from ssb import ssb_polar
def modulator(clk, audio, audio_stb, settings):
audio_bits = audio.subtype.bits
#AM modulation
am_mag = Unsigned(12).constant(0) + audio + 2048
am_phase = Signe... | 29.533333 | 117 | 0.633022 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.090293 |
a3b4e8143896f099b74b0a3738681f49e357493f | 4,049 | py | Python | tests/sentry/auth/test_helper.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/auth/test_helper.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/auth/test_helper.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from six.moves.urllib.parse import urlencode
from django.test import RequestFactory
from django.contrib.auth.models import AnonymousUser
from sentry.auth.helper import handle_new_user
from sentry.models import AuthProvider, InviteStatus, OrganizationMember
from sentry.testutils ... | 39.31068 | 100 | 0.674241 | 3,673 | 0.907138 | 0 | 0 | 954 | 0.235614 | 0 | 0 | 562 | 0.1388 |
a3b4f00010ceb5e0331d09eb4a19ef587eba8526 | 348 | py | Python | groundstation/broadcast_events/__init__.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | 26 | 2015-06-18T20:17:07.000Z | 2019-09-26T09:55:35.000Z | groundstation/broadcast_events/__init__.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | null | null | null | groundstation/broadcast_events/__init__.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | 5 | 2015-07-20T01:52:47.000Z | 2017-01-08T09:54:07.000Z | from broadcast_ping import BroadcastPing
EVENT_TYPES = {
"PING": BroadcastPing,
}
class UnknownBroadcastEvent(Exception):
pass
def new_broadcast_event(data):
event_type, payload = data.split(" ", 1)
if event_type not in EVENT_TYPES:
raise UnknownBroadcastEvent(event_type)
return EVENT... | 23.2 | 47 | 0.732759 | 48 | 0.137931 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.025862 |
a3b55358fffe0e7cc61738673a1b1895170d48c3 | 9,891 | py | Python | mbta_python/__init__.py | dougzor/mbta_python | f277f48f8bf8048cb5c9c6307e672c37292e57f7 | [
"MIT"
] | null | null | null | mbta_python/__init__.py | dougzor/mbta_python | f277f48f8bf8048cb5c9c6307e672c37292e57f7 | [
"MIT"
] | null | null | null | mbta_python/__init__.py | dougzor/mbta_python | f277f48f8bf8048cb5c9c6307e672c37292e57f7 | [
"MIT"
] | null | null | null | import datetime
import requests
from mbta_python.models import Stop, Direction, Schedule, Mode, \
TripSchedule, Alert, StopWithMode, Prediction
HOST = "http://realtime.mbta.com/developer/api/v2"
def datetime_to_epoch(dt):
epoch = datetime.datetime.utcfromtimestamp(0)
return int((dt - epoch).total_second... | 37.324528 | 83 | 0.586897 | 9,563 | 0.966839 | 0 | 0 | 0 | 0 | 0 | 0 | 5,314 | 0.537256 |
a3b57d8c1a4088165ce4f67e6fb27850615f9653 | 4,583 | py | Python | density_model_torch_custom.py | piotrwinkler/breast_density_classifier | 4d47dd98bb0a839cea8b9aef242f5af5db84f06f | [
"BSD-2-Clause"
] | null | null | null | density_model_torch_custom.py | piotrwinkler/breast_density_classifier | 4d47dd98bb0a839cea8b9aef242f5af5db84f06f | [
"BSD-2-Clause"
] | null | null | null | density_model_torch_custom.py | piotrwinkler/breast_density_classifier | 4d47dd98bb0a839cea8b9aef242f5af5db84f06f | [
"BSD-2-Clause"
] | null | null | null | import argparse
import glob
import os
import numpy as np
import torch
from sklearn.metrics import accuracy_score
import models_torch as models
import utils
EXPERIMENT_DATA_DIR = "/tmp/mgr"
def inference(parameters, verbose=True) -> int:
# resolve device
device = torch.device(
"cuda:{}".format(par... | 37.565574 | 113 | 0.669212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,512 | 0.329915 |
a3b664d11a53af7fe489af747c1768858a1613a2 | 4,878 | py | Python | esmvaltool/diag_scripts/ensclus/ens_anom.py | yifatdzigan/ESMValTool | 83320b0e0b24ddde965599961bb80428e180a731 | [
"Apache-2.0"
] | 148 | 2017-02-07T13:16:03.000Z | 2022-03-26T02:21:56.000Z | esmvaltool/diag_scripts/ensclus/ens_anom.py | yifatdzigan/ESMValTool | 83320b0e0b24ddde965599961bb80428e180a731 | [
"Apache-2.0"
] | 2,026 | 2017-02-03T12:57:13.000Z | 2022-03-31T15:11:51.000Z | esmvaltool/diag_scripts/ensclus/ens_anom.py | yifatdzigan/ESMValTool | 83320b0e0b24ddde965599961bb80428e180a731 | [
"Apache-2.0"
] | 113 | 2017-01-27T13:10:19.000Z | 2022-02-03T13:42:11.000Z | """Computation of ensemble anomalies based on a desired value."""
import os
import numpy as np
from scipy import stats
# User-defined packages
from read_netcdf import read_iris, save_n_2d_fields
from sel_season_area import sel_area, sel_season
def ens_anom(filenames, dir_output, name_outputs, varname, numens, seaso... | 40.65 | 79 | 0.630381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,684 | 0.345223 |
a3b714ec9b000678e3e81df98484d9da903f0406 | 24,074 | py | Python | pytition/petition/models.py | Te-k/Pytition | 16ebce01b491b72ed387709d9b705f7cb0d5476f | [
"BSD-3-Clause"
] | null | null | null | pytition/petition/models.py | Te-k/Pytition | 16ebce01b491b72ed387709d9b705f7cb0d5476f | [
"BSD-3-Clause"
] | null | null | null | pytition/petition/models.py | Te-k/Pytition | 16ebce01b491b72ed387709d9b705f7cb0d5476f | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.utils.html import mark_safe, strip_tags
from django.utils.text import slugify
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
from django.core.exceptions import ValidationError
from django.db.models.signals import post_save, ... | 40.734349 | 124 | 0.662748 | 22,652 | 0.940854 | 0 | 0 | 3,335 | 0.13852 | 0 | 0 | 1,998 | 0.082987 |
a3b72847ef50516acce4d8d4114c3432f306c66d | 4,026 | py | Python | bin/socialhistory.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | 1 | 2019-11-11T11:21:08.000Z | 2019-11-11T11:21:08.000Z | bin/socialhistory.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | null | null | null | bin/socialhistory.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | 1 | 2020-01-28T03:48:14.000Z | 2020-01-28T03:48:14.000Z | import csv
from testdata import SOCIALHISTORY_FILE
from testdata import rndDate
from patient import Patient
SMOKINGCODES = {
'428041000124106': 'Current some day smoker',
'266919005' : 'Never smoker',
'449868002' : 'Current every day smoker',
'266927001' : 'Unknown if ever smoked',
'... | 35.946429 | 92 | 0.435171 | 3,668 | 0.911078 | 0 | 0 | 380 | 0.094386 | 0 | 0 | 1,341 | 0.333085 |
a3b8b5beaa0f8d8ecd98462fe75b978547dc1472 | 4,248 | py | Python | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# dictionaries, look-up tables & key-value pairs\n",
"# d = {} OR d = dict()\n",
"# e.g. d = {\"George\": 24, \"Tom\": 32}\n",
"\n",
"d = {}\n",
"\n"
]
},
{
"cell_typ... | 18.88 | 354 | 0.439266 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,737 | 0.644152 |
a3b9cafed89d7582e18fd4f82c78858c2882f5b3 | 1,453 | py | Python | lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import pytest
from llnl.util.filesystem import mkdirp, touch
import spack.config
from spack.fetch_strategy im... | 35.439024 | 76 | 0.705437 | 0 | 0 | 0 | 0 | 1,056 | 0.726772 | 0 | 0 | 470 | 0.323469 |
a3bac2f51025032288427c9fc39e3497207cc25d | 2,201 | py | Python | temp_range_sql.py | hanhanwu/Hanhan-Spark-Python | a04c33100742acffa2ad11d1937ea05c44688427 | [
"MIT"
] | 45 | 2016-03-18T07:57:53.000Z | 2022-03-20T07:14:15.000Z | temp_range_sql.py | hanhanwu/Hanhan-Spark-Python | a04c33100742acffa2ad11d1937ea05c44688427 | [
"MIT"
] | null | null | null | temp_range_sql.py | hanhanwu/Hanhan-Spark-Python | a04c33100742acffa2ad11d1937ea05c44688427 | [
"MIT"
] | 16 | 2016-07-07T16:47:46.000Z | 2020-05-04T17:38:40.000Z | __author__ = 'hanhanw'
import sys
from pyspark import SparkConf, SparkContext
from pyspark.sql.context import SQLContext
from pyspark.sql.types import StructType, StructField, StringType, DoubleType
conf = SparkConf().setAppName("temp range sql")
sc = SparkContext(conf=conf)
sqlContext = SQLContext(sc)
assert sc.ver... | 31.898551 | 117 | 0.698319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 871 | 0.395729 |
a3bafb776906d3ce50f018766ee8f4cea08b123b | 1,059 | py | Python | container/pyf/graphqltypes/Event.py | Pompino/react-components-23KB | 3201a417c5160e1b77f29fc1eac74ae9dc10d6ad | [
"MIT"
] | 2 | 2021-10-30T18:18:33.000Z | 2021-12-01T10:21:28.000Z | container/pyf/graphqltypes/Event.py | Pompino/react-components-23KB | 3201a417c5160e1b77f29fc1eac74ae9dc10d6ad | [
"MIT"
] | null | null | null | container/pyf/graphqltypes/Event.py | Pompino/react-components-23KB | 3201a417c5160e1b77f29fc1eac74ae9dc10d6ad | [
"MIT"
] | null | null | null | from typing_extensions import Required
#from sqlalchemy.sql.sqltypes import Boolean
from graphene import ObjectType, String, Field, ID, List, DateTime, Mutation, Boolean, Int
from models.EventsRelated.EventModel import EventModel
from graphqltypes.Utils import extractSession
class EventType(ObjectType):
id = ID(... | 32.090909 | 90 | 0.700661 | 779 | 0.7356 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.122757 |
a3bca9436abafd191ec47379ebb1db10a4043237 | 11,326 | py | Python | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/shape.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 3 | 2018-01-29T14:16:02.000Z | 2019-02-05T21:33:05.000Z | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/shape.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/shape.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2 | 2019-12-05T17:24:36.000Z | 2021-11-22T21:21:32.000Z | from __future__ import absolute_import
# Copyright (c) 2010-2015 openpyxl
from openpyxl.styles.colors import Color, BLACK, WHITE
from openpyxl.utils.units import (
pixels_to_EMU,
EMU_to_pixels,
short_color,
)
from openpyxl.compat import deprecated
from openpyxl.xml.functions import Element, SubElement, t... | 27.160671 | 113 | 0.607099 | 10,816 | 0.954971 | 0 | 0 | 3,000 | 0.264877 | 0 | 0 | 5,068 | 0.447466 |
a3bd2daadf5e4d9e5163b4a0fc7578b8fb655779 | 3,118 | py | Python | scripts/VCF/FILTER/subset_vcf.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 3 | 2018-04-20T15:04:34.000Z | 2022-03-30T06:36:02.000Z | scripts/VCF/FILTER/subset_vcf.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 7 | 2019-06-06T09:22:20.000Z | 2021-11-23T17:41:52.000Z | scripts/VCF/FILTER/subset_vcf.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 5 | 2017-11-02T11:17:35.000Z | 2021-12-11T19:34:09.000Z |
from VcfQC import VcfQC
from ReseqTrackDB import File
from ReseqTrackDB import ReseqTrackDB
import argparse
import os
import logging
import datetime
#get command line arguments
parser = argparse.ArgumentParser(description='Script to subset a VCF by excluding the variants within the regions defined by a BED file')
... | 41.026316 | 275 | 0.735407 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,155 | 0.37043 |
a3bea3b575a46a0bd0557e3e985c4141109eee00 | 266 | py | Python | controllers/restart.py | Acidburn0zzz/helloworld | 9d88357658c55dadf9d4c6f923b63e8cb6207f75 | [
"MIT"
] | null | null | null | controllers/restart.py | Acidburn0zzz/helloworld | 9d88357658c55dadf9d4c6f923b63e8cb6207f75 | [
"MIT"
] | null | null | null | controllers/restart.py | Acidburn0zzz/helloworld | 9d88357658c55dadf9d4c6f923b63e8cb6207f75 | [
"MIT"
] | null | null | null | import os
from base import BaseHandler
class RestartHandler(BaseHandler):
def get(self):
if not self.authenticate(superuser=True):
return
os.system('touch ' + self.application.settings["restart_path"])
self.redirect(self.get_argument("next"))
| 22.166667 | 67 | 0.725564 | 224 | 0.842105 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.105263 |
a3bef41781bb732a7cb06f991f90aba75666a0ca | 4,276 | py | Python | nova/tests/unit/conductor/tasks/test_migrate.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/conductor/tasks/test_migrate.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/conductor/tasks/test_migrate.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 47.511111 | 79 | 0.667212 | 3,296 | 0.770814 | 0 | 0 | 1,561 | 0.365061 | 0 | 0 | 793 | 0.185454 |
a3bf6d02c2f4e332e2c37541b89b9a4e5f82ec94 | 97 | py | Python | CH7_GitCmdAndCtrl/modules/environment.py | maxmac12/BlackHatPython | 60044c65ffc2f1216cbf92c2ec850a4e2e9ca5bf | [
"MIT"
] | null | null | null | CH7_GitCmdAndCtrl/modules/environment.py | maxmac12/BlackHatPython | 60044c65ffc2f1216cbf92c2ec850a4e2e9ca5bf | [
"MIT"
] | null | null | null | CH7_GitCmdAndCtrl/modules/environment.py | maxmac12/BlackHatPython | 60044c65ffc2f1216cbf92c2ec850a4e2e9ca5bf | [
"MIT"
] | null | null | null | import os
def run(**kwargs):
print("[*] In environment module.")
return str(os.environ) | 16.166667 | 39 | 0.639175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.28866 |
a3c068d2dc2c438793e5de5d6de56af20454dc8f | 507 | py | Python | diskcatalog/core/views.py | rywjhzd/Cataloging-and-Visualizing-Cradles-of-Planet-Formation | 6d59ea9d9a07630721e19c554651bae2775962ac | [
"MIT"
] | null | null | null | diskcatalog/core/views.py | rywjhzd/Cataloging-and-Visualizing-Cradles-of-Planet-Formation | 6d59ea9d9a07630721e19c554651bae2775962ac | [
"MIT"
] | null | null | null | diskcatalog/core/views.py | rywjhzd/Cataloging-and-Visualizing-Cradles-of-Planet-Formation | 6d59ea9d9a07630721e19c554651bae2775962ac | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Disk
import os
def index(request):
context = {}
disk_list = Disk.objects.all()
context['disk_list'] = disk_list
return render(request, 'index.html', context)
#def index(request):
# module_dir = os.path.dirname(__file__)
# file_path = os.p... | 25.35 | 53 | 0.672584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.57002 |
a3c17e6746a0528783d5b0c338fdad4e4910e00a | 1,976 | py | Python | misc/python/materialize/checks/insert_select.py | guswynn/materialize | f433173ed71f511d91311769ec58c2d427dd6c3b | [
"MIT"
] | null | null | null | misc/python/materialize/checks/insert_select.py | guswynn/materialize | f433173ed71f511d91311769ec58c2d427dd6c3b | [
"MIT"
] | 157 | 2021-12-28T19:17:45.000Z | 2022-03-31T17:44:27.000Z | misc/python/materialize/checks/insert_select.py | guswynn/materialize | f433173ed71f511d91311769ec58c2d427dd6c3b | [
"MIT"
] | null | null | null | # Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software... | 34.666667 | 119 | 0.598684 | 1,451 | 0.734312 | 0 | 0 | 0 | 0 | 0 | 0 | 1,363 | 0.689777 |