hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7c6cbf4764a2e4e9b78da1978c82aa4f5d7862ce | 3,637 | py | Python | tests/conftest.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | tests/conftest.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | tests/conftest.py | priyatharsan/beyond | 1061b870407d316d43e4d1351a7ec026629685ae | [
"MIT"
] | null | null | null | import numpy as np
from pytest import fixture, mark, skip
from unittest.mock import patch
from pathlib import Path
from beyond.config import config
from beyond.dates.eop import Eop
from beyond.frames.stations import create_station
from beyond.io.tle import Tle
from beyond.propagators.keplernum import KeplerNum
from be... | 27.141791 | 89 | 0.653011 |
7c6cc14ec8ce3c7dc9875cccdf742d57d079973d | 10,181 | py | Python | diofant/tests/integrals/test_heurisch.py | Electric-tric/diofant | 92c4bf0ef301e5d6f0cfab545b036e1cb7de3c0a | [
"BSD-3-Clause"
] | 1 | 2021-08-22T09:34:15.000Z | 2021-08-22T09:34:15.000Z | diofant/tests/integrals/test_heurisch.py | Electric-tric/diofant | 92c4bf0ef301e5d6f0cfab545b036e1cb7de3c0a | [
"BSD-3-Clause"
] | null | null | null | diofant/tests/integrals/test_heurisch.py | Electric-tric/diofant | 92c4bf0ef301e5d6f0cfab545b036e1cb7de3c0a | [
"BSD-3-Clause"
] | null | null | null | import pytest
from diofant import (Add, Derivative, Ei, Eq, Function, I, Integral, LambertW,
Piecewise, Rational, Sum, Symbol, acos, asin, asinh,
besselj, cos, cosh, diff, erf, exp, li, log, pi, ratsimp,
root, simplify, sin, sinh, sqrt, symbols, tan)
from ... | 34.511864 | 112 | 0.534722 |
7c6d185f736a9be6f5e0a171cd9fc68f8a4ce031 | 12,105 | py | Python | kornia/color/adjust.py | carlosb1/kornia | a2b34d497314e7ed65f114401efdd3cc9ba2077c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/color/adjust.py | carlosb1/kornia | a2b34d497314e7ed65f114401efdd3cc9ba2077c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kornia/color/adjust.py | carlosb1/kornia | a2b34d497314e7ed65f114401efdd3cc9ba2077c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import Union
import torch
import torch.nn as nn
from kornia.color.hsv import rgb_to_hsv, hsv_to_rgb
from kornia.constants import pi
def adjust_saturation_raw(input: torch.Tensor, saturation_factor: Union[float, torch.Tensor]) -> torch.Tensor:
r"""Adjust color saturation of an image. Expecting input ... | 34.884726 | 110 | 0.671871 |
7c6ea33d579371cc05a40f107c83af6d179fcd7a | 1,418 | py | Python | pommerman/__init__.py | rmccann01/playground | 354041cd1d9b70ffe82c18fb5b4035fab721eb92 | [
"Apache-2.0"
] | 725 | 2018-02-14T09:48:18.000Z | 2022-03-29T03:04:28.000Z | pommerman/__init__.py | rmccann01/playground | 354041cd1d9b70ffe82c18fb5b4035fab721eb92 | [
"Apache-2.0"
] | 214 | 2018-02-16T22:00:41.000Z | 2022-03-11T23:26:20.000Z | pommerman/__init__.py | rmccann01/playground | 354041cd1d9b70ffe82c18fb5b4035fab721eb92 | [
"Apache-2.0"
] | 265 | 2018-02-15T05:33:46.000Z | 2022-03-11T03:04:17.000Z | '''Entry point into the pommerman module'''
import gym
import inspect
from . import agents
from . import configs
from . import constants
from . import forward_model
from . import helpers
from . import utility
from . import network
gym.logger.set_level(40)
REGISTRY = None
# Register environments with gym
_register()... | 26.754717 | 76 | 0.682652 |
7c7069a54d49756f83e36923521eba70ab74f6c7 | 139 | py | Python | demo/demo/accounts/urls.py | caravancoop/rest-auth-toolkit | 425bf293987f7128d9538f27a5eca7e47ba84217 | [
"MIT"
] | 1 | 2019-12-23T21:51:06.000Z | 2019-12-23T21:51:06.000Z | demo/demo/accounts/urls.py | caravancoop/rest-framework-auth-toolkit | 425bf293987f7128d9538f27a5eca7e47ba84217 | [
"MIT"
] | 127 | 2017-10-27T15:20:01.000Z | 2022-03-07T04:09:15.000Z | demo/demo/accounts/urls.py | caravancoop/rest-auth-toolkit | 425bf293987f7128d9538f27a5eca7e47ba84217 | [
"MIT"
] | 2 | 2018-01-03T16:22:51.000Z | 2019-12-23T21:51:54.000Z | from django.urls import path
from .views import ProfileView
urlpatterns = [
path('', ProfileView.as_view(), name='user-profile'),
]
| 15.444444 | 57 | 0.705036 |
7c70c6e774d6a8ca53417d3cc9999e257be28aad | 1,093 | py | Python | test/test_pipeline/components/classification/test_passive_aggressive.py | vardaan-raj/auto-sklearn | 4597152e3a60cd6f6e32719a3bef26e13951b102 | [
"BSD-3-Clause"
] | 1 | 2021-02-21T16:44:44.000Z | 2021-02-21T16:44:44.000Z | test/test_pipeline/components/classification/test_passive_aggressive.py | vardaan-raj/auto-sklearn | 4597152e3a60cd6f6e32719a3bef26e13951b102 | [
"BSD-3-Clause"
] | 9 | 2021-02-12T17:52:34.000Z | 2021-06-26T11:37:41.000Z | test/test_pipeline/components/classification/test_passive_aggressive.py | vardaan-raj/auto-sklearn | 4597152e3a60cd6f6e32719a3bef26e13951b102 | [
"BSD-3-Clause"
] | 1 | 2021-07-06T23:02:42.000Z | 2021-07-06T23:02:42.000Z | import sklearn.linear_model
from autosklearn.pipeline.components.classification.passive_aggressive import \
PassiveAggressive
from .test_base import BaseClassificationComponentTest
| 30.361111 | 79 | 0.725526 |
7c71eb8f52ad23f62b8d9e0d27dc37cf322f70c3 | 3,148 | py | Python | tensorflow_datasets/structured/dart/dart_test.py | harsh020/datasets | b4ad3617b279ec65356e696c4c860458621976f6 | [
"Apache-2.0"
] | 1 | 2020-12-10T06:37:27.000Z | 2020-12-10T06:37:27.000Z | tensorflow_datasets/structured/dart/dart_test.py | Jinwook-shim/datasets | 815037e87150e3c8a557d91a68b07e8ffb6a2a86 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/structured/dart/dart_test.py | Jinwook-shim/datasets | 815037e87150e3c8a557d91a68b07e8ffb6a2a86 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 28.880734 | 80 | 0.493011 |
7c72f8f31e7cf39a7edd3dbce8585cf8da069b38 | 9,085 | py | Python | exp/exp_informer_dad.py | AdamLohSg/GTA | bf6a745a6e28e365466e76360a15ca10ce61e009 | [
"Apache-2.0"
] | 8 | 2022-01-19T20:47:36.000Z | 2022-03-20T05:11:04.000Z | exp/exp_informer_dad.py | AdamLohSg/GTA | bf6a745a6e28e365466e76360a15ca10ce61e009 | [
"Apache-2.0"
] | 2 | 2022-02-17T06:14:25.000Z | 2022-02-17T08:43:57.000Z | exp/exp_informer_dad.py | AdamLohSg/GTA | bf6a745a6e28e365466e76360a15ca10ce61e009 | [
"Apache-2.0"
] | 5 | 2022-02-15T04:16:27.000Z | 2022-03-29T01:21:41.000Z | from data.data_loader_dad import (
NASA_Anomaly,
WADI
)
from exp.exp_basic import Exp_Basic
from models.model import Informer
from utils.tools import EarlyStopping, adjust_learning_rate
from utils.metrics import metric
from sklearn.metrics import classification_report
import numpy as np
import torch
import t... | 36.051587 | 113 | 0.557292 |
7c73ce1a389f347a8681ff6c30c8fe84612d252e | 9,270 | py | Python | tests/components/mysensors/conftest.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/mysensors/conftest.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | tests/components/mysensors/conftest.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Provide common mysensors fixtures."""
from __future__ import annotations
from collections.abc import AsyncGenerator, Callable, Generator
import json
from typing import Any
from unittest.mock import AsyncMock, MagicMock, patch
from mysensors import BaseSyncGateway
from mysensors.persistence import MySensorsJSONDeco... | 31.530612 | 87 | 0.73247 |
7c7633cae0980db6c9c40b9c34972bdb7f5c0282 | 7,139 | py | Python | Detect.py | SymenYang/Vanish-Point-Detect | 0e83e2b2a86e9523ed4a86f592f3a8dee594d691 | [
"MIT"
] | 2 | 2017-10-17T10:08:25.000Z | 2017-10-17T11:17:39.000Z | Detect.py | SymenYang/Vanish-Point-Detect | 0e83e2b2a86e9523ed4a86f592f3a8dee594d691 | [
"MIT"
] | null | null | null | Detect.py | SymenYang/Vanish-Point-Detect | 0e83e2b2a86e9523ed4a86f592f3a8dee594d691 | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
import copy
import math
import Edges
import INTPoint
eps = 1e-7
votes = {}
Groups = []
VPoints = []
Centers = []
Cluster = []
voters = {}
deal("data/1.jpg",'1') | 26.838346 | 157 | 0.559462 |
7c76c121d957b364e4b6f2fa9125b58b9c909aee | 4,086 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/course_groups/migrations/0001_initial.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/course_groups/migrations/0001_initial.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/course_groups/migrations/0001_initial.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | from django.db import migrations, models
from django.conf import settings
from opaque_keys.edx.django.models import CourseKeyField
| 49.829268 | 159 | 0.618698 |
7c76d6a2f8e354238a96f859815250852db8cda1 | 738 | py | Python | kafka-rockset-integration/generate_customers_data.py | farkaskid/recipes | 8eef799cda899ea266f2849d485917f9b0d83190 | [
"Apache-2.0"
] | 21 | 2019-02-27T22:30:28.000Z | 2021-07-18T17:26:56.000Z | kafka-rockset-integration/generate_customers_data.py | farkaskid/recipes | 8eef799cda899ea266f2849d485917f9b0d83190 | [
"Apache-2.0"
] | 16 | 2019-07-03T22:04:21.000Z | 2022-02-26T18:34:05.000Z | kafka-rockset-integration/generate_customers_data.py | farkaskid/recipes | 8eef799cda899ea266f2849d485917f9b0d83190 | [
"Apache-2.0"
] | 11 | 2019-03-13T08:55:31.000Z | 2022-02-07T08:35:16.000Z | """Generate Customer Data"""
import csv
import random
from config import MIN_CUSTOMER_ID, MAX_CUSTOMER_ID
ACQUISITION_SOURCES = [
'OrganicSearch',
'PaidSearch',
'Email',
'SocialMedia',
'Display',
'Affiliate'
'Referral'
]
if __name__ == '__main__':
main()
| 22.363636 | 85 | 0.617886 |
7c77100c5bc822f15ee0cc031b607fff7a7b2f70 | 899 | py | Python | parsl/tests/test_error_handling/test_resource_spec.py | MatthewBM/parsl | f11417a0255ed290fd0d78ffa1bc52cfe7a06301 | [
"Apache-2.0"
] | null | null | null | parsl/tests/test_error_handling/test_resource_spec.py | MatthewBM/parsl | f11417a0255ed290fd0d78ffa1bc52cfe7a06301 | [
"Apache-2.0"
] | null | null | null | parsl/tests/test_error_handling/test_resource_spec.py | MatthewBM/parsl | f11417a0255ed290fd0d78ffa1bc52cfe7a06301 | [
"Apache-2.0"
] | null | null | null | import parsl
from parsl.app.app import python_app
from parsl.tests.configs.local_threads import config
from parsl.executors.errors import UnsupportedFeatureError
from parsl.executors import WorkQueueExecutor
if __name__ == '__main__':
local_config = config
parsl.load(local_config)
x = test_resource(2)
| 26.441176 | 58 | 0.676307 |
7c78f1b09da753afd4fbe81d818781bc202c7f29 | 9,565 | py | Python | cincan/file_tool.py | cincanproject/cincan-command | b8cde81931b1c8583ac7daa1327520fb9f06856e | [
"MIT"
] | 1 | 2022-03-11T02:37:42.000Z | 2022-03-11T02:37:42.000Z | cincan/file_tool.py | cincanproject/cincan-command | b8cde81931b1c8583ac7daa1327520fb9f06856e | [
"MIT"
] | null | null | null | cincan/file_tool.py | cincanproject/cincan-command | b8cde81931b1c8583ac7daa1327520fb9f06856e | [
"MIT"
] | null | null | null | import pathlib
import re
from typing import List, Optional, Dict, Set, Tuple, Iterable
import shlex
| 41.228448 | 119 | 0.576477 |
7c7958cdc1aac4d3672c25246775beb5da7fc72d | 997 | py | Python | aws_interface/cloud/auth/set_me.py | hubaimaster/aws-interface | 162dd056546d58b6eb29afcae1c3c2d78e4309b2 | [
"Apache-2.0"
] | 53 | 2018-10-02T05:58:54.000Z | 2020-09-15T08:58:26.000Z | aws_interface/cloud/auth/set_me.py | hubaimaster/aws-interface | 162dd056546d58b6eb29afcae1c3c2d78e4309b2 | [
"Apache-2.0"
] | 52 | 2018-09-26T05:16:09.000Z | 2022-03-11T23:51:14.000Z | aws_interface/cloud/auth/set_me.py | hubaimaster/aws-interface | 162dd056546d58b6eb29afcae1c3c2d78e4309b2 | [
"Apache-2.0"
] | 10 | 2019-03-11T16:35:14.000Z | 2019-10-23T08:03:54.000Z |
from cloud.permission import Permission, NeedPermission
from cloud.message import error
# Define the input output format of the function.
# This information is used when creating the *SDK*.
info = {
'input_format': {
'session_id': 'str',
'field': 'str',
'value?': 'str',
},
'output_... | 24.317073 | 83 | 0.608826 |
7c79d2fe84aae88ef213fa559ea2499797887d57 | 959 | py | Python | doc/gallery-src/analysis/run_blockMcnpMaterialCard.py | celikten/armi | 4e100dd514a59caa9c502bd5a0967fd77fdaf00e | [
"Apache-2.0"
] | 1 | 2021-05-29T16:02:31.000Z | 2021-05-29T16:02:31.000Z | doc/gallery-src/analysis/run_blockMcnpMaterialCard.py | celikten/armi | 4e100dd514a59caa9c502bd5a0967fd77fdaf00e | [
"Apache-2.0"
] | null | null | null | doc/gallery-src/analysis/run_blockMcnpMaterialCard.py | celikten/armi | 4e100dd514a59caa9c502bd5a0967fd77fdaf00e | [
"Apache-2.0"
] | null | null | null | """
Write MCNP Material Cards
=========================
Here we load a test reactor and write each component of one fuel block out as
MCNP material cards.
Normally, code-specific utility code would belong in a code-specific ARMI
plugin. But in this case, the need for MCNP materials cards is so pervasive
that it made ... | 31.966667 | 79 | 0.755996 |
7c79e12b0a22b9ba1c999ecbf405c389b15998f7 | 6,612 | py | Python | life_line_chart/_autogenerate_data.py | mustaqimM/life_line_chart | a9bbbbdeb5568aa0cc3b3b585337a3d655f4b2d6 | [
"MIT"
] | null | null | null | life_line_chart/_autogenerate_data.py | mustaqimM/life_line_chart | a9bbbbdeb5568aa0cc3b3b585337a3d655f4b2d6 | [
"MIT"
] | null | null | null | life_line_chart/_autogenerate_data.py | mustaqimM/life_line_chart | a9bbbbdeb5568aa0cc3b3b585337a3d655f4b2d6 | [
"MIT"
] | null | null | null | import names
import os
import datetime
from random import random
def generate_gedcom_file():
"""generate some gedcom file"""
db = {}
db['n_individuals'] = 0
db['max_individuals'] = 8000
db['n_families'] = 0
db['yougest'] = None
gedcom_content = """
0 HEAD
1 SOUR Gramps
2 VERS 3.3.0
2 N... | 35.548387 | 130 | 0.545977 |
7c79e8c0feadf546c1f7ffb56f2c6aded823808d | 4,647 | py | Python | arcade/examples/sprite_bullets_enemy_aims.py | LiorAvrahami/arcade | fce254a9eb89629de1f99d57a63759a2953184e9 | [
"MIT"
] | 1 | 2020-01-18T04:48:38.000Z | 2020-01-18T04:48:38.000Z | arcade/examples/sprite_bullets_enemy_aims.py | LiorAvrahami/arcade | fce254a9eb89629de1f99d57a63759a2953184e9 | [
"MIT"
] | 1 | 2019-08-11T18:47:27.000Z | 2019-08-12T03:02:11.000Z | arcade/examples/sprite_bullets_enemy_aims.py | LiorAvrahami/arcade | fce254a9eb89629de1f99d57a63759a2953184e9 | [
"MIT"
] | null | null | null | """
Show how to have enemies shoot bullets aimed at the player.
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_bullets_enemy_aims
"""
import arcade
import math
import os
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = "Sprites and Bullet... | 32.957447 | 98 | 0.624919 |
7c7a936052804b42678eb433f6f64454107e4317 | 450 | py | Python | app1.py | FreakX23/EBook_Training | de445b0a9e56a1f1ffc51ae3c5e10ebe8297e9b6 | [
"MIT"
] | null | null | null | app1.py | FreakX23/EBook_Training | de445b0a9e56a1f1ffc51ae3c5e10ebe8297e9b6 | [
"MIT"
] | null | null | null | app1.py | FreakX23/EBook_Training | de445b0a9e56a1f1ffc51ae3c5e10ebe8297e9b6 | [
"MIT"
] | null | null | null | # This Part will gather Infos and demonstrate the use of Variables.
usrName = input("What is your Name?")
usrAge = int(input("What is your Age?"))
usrGPA = float(input("What is your GPA?"))
print () #cheap way to get a new line
print ("Hello, %s" % (usrName))
print ("Did you know that in two years you will be %d years ... | 45 | 98 | 0.682222 |
7c7af573be1400de8cf6ff87c171a26f3cda1e1f | 96 | py | Python | borze.py | AmitHasanShuvo/Programming | f47ecc626e518a0bf5f9f749afd15ce67bbe737b | [
"MIT"
] | 8 | 2019-05-26T19:24:13.000Z | 2021-03-24T17:36:14.000Z | borze.py | AmitHasanShuvo/Programming | f47ecc626e518a0bf5f9f749afd15ce67bbe737b | [
"MIT"
] | null | null | null | borze.py | AmitHasanShuvo/Programming | f47ecc626e518a0bf5f9f749afd15ce67bbe737b | [
"MIT"
] | 1 | 2020-04-19T04:59:54.000Z | 2020-04-19T04:59:54.000Z | a = input()
a = a.replace('--', '2')
a = a.replace('-.', '1')
a = a.replace('.', '0')
print(a)
| 16 | 24 | 0.4375 |
7c7ce13176c091aaa43308e8a58ace22a4dd604d | 684 | py | Python | distalg/message.py | charlesemurray/DistributedProgramming | f7b5001a6acb0583cd6b7bb611f27893b830c296 | [
"MIT"
] | null | null | null | distalg/message.py | charlesemurray/DistributedProgramming | f7b5001a6acb0583cd6b7bb611f27893b830c296 | [
"MIT"
] | null | null | null | distalg/message.py | charlesemurray/DistributedProgramming | f7b5001a6acb0583cd6b7bb611f27893b830c296 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
msg = Message(sender="A", receiver="B")
assert msg.sender is "A"
assert msg.receiver is "B"
| 23.586207 | 64 | 0.630117 |
7c7d98835e8aa5d863003dad874d15530ea2ef72 | 7,799 | py | Python | myenv/lib/python3.5/site-packages/tests/handlers/logging/logging_tests.py | rupeshparab/techscan | ce2558602ddad31873d7129f25b1cc61895b9939 | [
"MIT"
] | 1 | 2019-11-01T11:45:22.000Z | 2019-11-01T11:45:22.000Z | myenv/lib/python3.5/site-packages/tests/handlers/logging/logging_tests.py | rupeshparab/techscan | ce2558602ddad31873d7129f25b1cc61895b9939 | [
"MIT"
] | 3 | 2020-02-11T23:03:45.000Z | 2021-06-10T18:05:11.000Z | myenv/lib/python3.5/site-packages/tests/handlers/logging/logging_tests.py | rupeshparab/techscan | ce2558602ddad31873d7129f25b1cc61895b9939 | [
"MIT"
] | 1 | 2019-11-01T11:38:54.000Z | 2019-11-01T11:38:54.000Z | import logging
from opbeat.handlers.logging import OpbeatHandler
from opbeat.utils.stacks import iter_stack_frames
from tests.helpers import get_tempstoreclient
from tests.utils.compat import TestCase
| 43.569832 | 103 | 0.647391 |
7c7e4ec9d240f0bbb6bcb11b797135aad6a43254 | 1,342 | py | Python | amnesia/modules/mime/model.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 4 | 2015-05-08T10:57:56.000Z | 2021-05-17T04:32:11.000Z | amnesia/modules/mime/model.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 6 | 2019-12-26T16:43:41.000Z | 2022-02-28T11:07:54.000Z | amnesia/modules/mime/model.py | silenius/amnesia | ba5e3ac79a89da599c22206ad1fd17541855f74c | [
"BSD-2-Clause"
] | 1 | 2019-09-23T14:08:11.000Z | 2019-09-23T14:08:11.000Z | # -*- coding: utf-8 -*-
# pylint: disable=E1101
from sqlalchemy import sql
from sqlalchemy import orm
from sqlalchemy.orm.exc import NoResultFound
from .. import Base
# http://www.iana.org/assignments/media-types/media-types.xhtml
| 21.645161 | 63 | 0.568554 |
7c7e5ef5e8a7277261b9729c9f251391fd2d29dc | 1,415 | py | Python | apps/goods/views_base.py | sunwei19910119/DjangoShop | 188102dc8ef9f4751f4eeeb7574e95c8cc270484 | [
"MIT"
] | 3 | 2018-08-22T02:41:55.000Z | 2022-03-03T08:49:38.000Z | apps/goods/views_base.py | sunwei19910119/DjangoShop | 188102dc8ef9f4751f4eeeb7574e95c8cc270484 | [
"MIT"
] | null | null | null | apps/goods/views_base.py | sunwei19910119/DjangoShop | 188102dc8ef9f4751f4eeeb7574e95c8cc270484 | [
"MIT"
] | 1 | 2019-10-23T12:24:08.000Z | 2019-10-23T12:24:08.000Z | # encoding: utf-8
from goods.models import Goods
from django.views.generic.base import View
| 32.159091 | 85 | 0.633922 |
7c7ea1a87be56599bff87dd5b87938ba5b672c0b | 14,385 | py | Python | launcher/src/main/scripts/bin/launcher.py | iyersathya/airlift | 27e981a50cee655ff4e1e13801ba5a55991f93ce | [
"Apache-2.0"
] | null | null | null | launcher/src/main/scripts/bin/launcher.py | iyersathya/airlift | 27e981a50cee655ff4e1e13801ba5a55991f93ce | [
"Apache-2.0"
] | 35 | 2019-09-27T23:27:54.000Z | 2021-10-06T14:57:28.000Z | launcher/src/main/scripts/bin/launcher.py | iyersathya/airlift | 27e981a50cee655ff4e1e13801ba5a55991f93ce | [
"Apache-2.0"
] | 21 | 2019-09-21T06:13:58.000Z | 2021-08-10T20:05:09.000Z | #!/usr/bin/env python
import errno
import os
import platform
import sys
import traceback
from fcntl import flock, LOCK_EX, LOCK_NB
from optparse import OptionParser
from os import O_RDWR, O_CREAT, O_WRONLY, O_APPEND
from os.path import basename, dirname, exists, realpath
from os.path import join as pathjoin
from sign... | 31.136364 | 135 | 0.639694 |
7c7f557e50cc992f1ad5414b88efb2c8bf4f59f5 | 1,213 | py | Python | code/sim/test.py | vectorcrumb/Ballbot_IEE2913 | 5ab54825b2bfadae251e2c6bfaaa7f8fcdae77a0 | [
"MIT"
] | null | null | null | code/sim/test.py | vectorcrumb/Ballbot_IEE2913 | 5ab54825b2bfadae251e2c6bfaaa7f8fcdae77a0 | [
"MIT"
] | null | null | null | code/sim/test.py | vectorcrumb/Ballbot_IEE2913 | 5ab54825b2bfadae251e2c6bfaaa7f8fcdae77a0 | [
"MIT"
] | null | null | null | from direct.showbase.ShowBase import ShowBase
from direct.task import Task
from direct.actor.Actor import Actor
import numpy as np
app = MyApp()
app.run() | 32.783784 | 85 | 0.649629 |
7c80c3cc37ddb266e34cc1676cdc4a68cdabc9ff | 32 | py | Python | run_locally.py | nationalarchives/tdr-service-unavailable | fcb5930f57459b1e4e6d2d14244ebeecee2f6907 | [
"MIT"
] | null | null | null | run_locally.py | nationalarchives/tdr-service-unavailable | fcb5930f57459b1e4e6d2d14244ebeecee2f6907 | [
"MIT"
] | null | null | null | run_locally.py | nationalarchives/tdr-service-unavailable | fcb5930f57459b1e4e6d2d14244ebeecee2f6907 | [
"MIT"
] | null | null | null | from app import app
app.run()
| 8 | 20 | 0.6875 |
7c80d22f73704982f5f02b4193bf4d13e0699eda | 5,914 | py | Python | src/pandas_profiling/model/describe.py | briangrahamww/pandas-profiling | 62f8e3fd81720d444041069191c4aacd03d79ad5 | [
"MIT"
] | null | null | null | src/pandas_profiling/model/describe.py | briangrahamww/pandas-profiling | 62f8e3fd81720d444041069191c4aacd03d79ad5 | [
"MIT"
] | 4 | 2021-11-01T15:17:07.000Z | 2022-01-26T15:22:15.000Z | src/pandas_profiling/model/describe.py | briangrahamww/pandas-profiling | 62f8e3fd81720d444041069191c4aacd03d79ad5 | [
"MIT"
] | null | null | null | """Organize the calculation of statistics for each series in this DataFrame."""
import warnings
from datetime import datetime
from typing import Optional
import pandas as pd
from tqdm.auto import tqdm
from visions import VisionsTypeset
from pandas_profiling.config import Settings
from pandas_profiling.model.correlati... | 30.328205 | 88 | 0.615996 |
7c813b2cc84c9caa5444e2c87441c4626db990da | 1,114 | py | Python | maxOfferNum.py | Ruanxingzhi/King-of-Pigeon | 38d6191c93c2d485b2e5cf163f06b9f2a5dacbec | [
"MIT"
] | null | null | null | maxOfferNum.py | Ruanxingzhi/King-of-Pigeon | 38d6191c93c2d485b2e5cf163f06b9f2a5dacbec | [
"MIT"
] | null | null | null | maxOfferNum.py | Ruanxingzhi/King-of-Pigeon | 38d6191c93c2d485b2e5cf163f06b9f2a5dacbec | [
"MIT"
] | null | null | null | import operator
stds = []
stdsDict = {}
index = 0
if __name__ == "__main__":
campers = ['PKUxk','THUsz_ai','THUsz_cs','THUsz_data','USTC_cs']
for camper in campers:
filename = camper + '.txt'
with open('data/%s'%(filename), "r") as f:
data = f.readlines()
for std in dat... | 26.52381 | 68 | 0.56553 |
7c81a099c1328ddb836ac7f6bc808bcec8ce85e6 | 5,525 | py | Python | tabnine-vim/third_party/ycmd/third_party/python-future/setup.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | 2 | 2018-04-16T03:08:42.000Z | 2021-01-06T10:21:49.000Z | tabnine-vim/third_party/ycmd/third_party/python-future/setup.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | null | null | null | tabnine-vim/third_party/ycmd/third_party/python-future/setup.py | MrMonk3y/vimrc | 950230fb3fd7991d1234c2ab516ec03245945677 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import absolute_import, print_function
import os
import os.path
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
NAME = "futur... | 29.864865 | 95 | 0.523439 |
7c81cc51df1ab53c03a469cdc7c5c3c8cd7e2980 | 508 | py | Python | url_shortener/src/__init__.py | Andrelpoj/hire.me | 79428e2094a6b56e762a7f958e1b75f395f59cef | [
"Apache-2.0"
] | null | null | null | url_shortener/src/__init__.py | Andrelpoj/hire.me | 79428e2094a6b56e762a7f958e1b75f395f59cef | [
"Apache-2.0"
] | null | null | null | url_shortener/src/__init__.py | Andrelpoj/hire.me | 79428e2094a6b56e762a7f958e1b75f395f59cef | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from .extensions import db
from .routes import short
from . import config
def create_app():
""" Creates Flask App, connect to Database and register Blueprint of routes"""
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = config.DATABASE_CONNECTION_URI
app.co... | 28.222222 | 83 | 0.690945 |
7c82276d6def1d1d6f137aa1788b787b2da8110f | 3,009 | py | Python | python-百度翻译调用/Baidu_translate/com/translate/baidu/stackoverflow_question_handler.py | wangchuanli001/Project-experience | b563c5c3afc07c913c2e1fd25dff41c70533f8de | [
"Apache-2.0"
] | 12 | 2019-12-07T01:44:55.000Z | 2022-01-27T14:13:30.000Z | python-百度翻译调用/Baidu_translate/com/translate/baidu/stackoverflow_question_handler.py | hujiese/Project-experience | b563c5c3afc07c913c2e1fd25dff41c70533f8de | [
"Apache-2.0"
] | 23 | 2020-05-23T03:56:33.000Z | 2022-02-28T07:54:45.000Z | python-百度翻译调用/Baidu_translate/com/translate/baidu/stackoverflow_question_handler.py | hujiese/Project-experience | b563c5c3afc07c913c2e1fd25dff41c70533f8de | [
"Apache-2.0"
] | 7 | 2019-12-20T04:48:56.000Z | 2021-11-19T02:23:45.000Z | import requests
from bs4 import BeautifulSoup
import urllib.request
import os
import random
import time
if __name__ == '__main__':
html("https://stackoverflow.com/questions/50119673/nginx-fast-cgi-cache-on-error-page-404")
| 42.985714 | 164 | 0.623463 |
7c82c0f597ec23a15334ec51934c9484615b1b1f | 2,541 | py | Python | Research/data_loader.py | ALEXKIRNAS/Kaggle-C-CORE-Iceberg-Classifier-Challenge | d8b06969c9393cfce6d9ac96b58c9d365ff4369d | [
"MIT"
] | null | null | null | Research/data_loader.py | ALEXKIRNAS/Kaggle-C-CORE-Iceberg-Classifier-Challenge | d8b06969c9393cfce6d9ac96b58c9d365ff4369d | [
"MIT"
] | null | null | null | Research/data_loader.py | ALEXKIRNAS/Kaggle-C-CORE-Iceberg-Classifier-Challenge | d8b06969c9393cfce6d9ac96b58c9d365ff4369d | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
from keras.utils import to_categorical
from sklearn.model_selection import KFold, train_test_split
| 34.337838 | 92 | 0.562377 |
7c82fafc5019f5e066e5d9af9ec1a1742645a993 | 27,180 | py | Python | polyaxon_cli/cli/experiment.py | tiagopms/polyaxon-cli | eb13e3b8389ccf069a421a4dabc87aaa506ab61c | [
"MIT"
] | null | null | null | polyaxon_cli/cli/experiment.py | tiagopms/polyaxon-cli | eb13e3b8389ccf069a421a4dabc87aaa506ab61c | [
"MIT"
] | null | null | null | polyaxon_cli/cli/experiment.py | tiagopms/polyaxon-cli | eb13e3b8389ccf069a421a4dabc87aaa506ab61c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import sys
import click
import rhea
from polyaxon_cli.cli.getters.experiment import (
get_experiment_job_or_local,
get_project_experiment_or_local
)
from polyaxon_cli.cli.upload import upload
from polyaxon_cli.client imp... | 33.84807 | 99 | 0.606659 |
7c839f4dc74ac86e89c284ecfbdaf987fd07d858 | 554 | py | Python | Problem_09.py | Habbo3/Project-Euler | 1a01d67f72b9cfb606d13df91af89159b588216e | [
"MIT"
] | null | null | null | Problem_09.py | Habbo3/Project-Euler | 1a01d67f72b9cfb606d13df91af89159b588216e | [
"MIT"
] | null | null | null | Problem_09.py | Habbo3/Project-Euler | 1a01d67f72b9cfb606d13df91af89159b588216e | [
"MIT"
] | null | null | null | """
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a2 + b2 = c2
For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc.
"""
solved = False
for a in range(1, 1000):
for b in range(1, 1000):
for c in range(... | 24.086957 | 78 | 0.601083 |
7c83aa67c0a65ae58c0709d1dc148cd1d75e4a56 | 2,862 | py | Python | fanscribed/apps/transcripts/tests/test_transcripts.py | fanscribed/fanscribed | 89b14496459f81a152df38ed5098fba2b087a1d7 | [
"MIT"
] | 8 | 2015-01-05T07:04:02.000Z | 2016-07-19T17:56:46.000Z | fanscribed/apps/transcripts/tests/test_transcripts.py | fanscribed/fanscribed | 89b14496459f81a152df38ed5098fba2b087a1d7 | [
"MIT"
] | 32 | 2015-03-18T18:51:00.000Z | 2021-06-10T20:37:33.000Z | fanscribed/apps/transcripts/tests/test_transcripts.py | fanscribed/fanscribed | 89b14496459f81a152df38ed5098fba2b087a1d7 | [
"MIT"
] | 5 | 2015-02-10T21:15:32.000Z | 2016-06-02T17:26:14.000Z | from decimal import Decimal
import os
from django.test import TestCase
from unipath import Path
from ....utils import refresh
from ...media import tests
from ..models import Transcript, TranscriptMedia
MEDIA_TESTDATA_PATH = Path(tests.__file__).parent.child('testdata')
RAW_MEDIA_PATH = MEDIA_TESTDATA_PATH.child('r... | 33.27907 | 90 | 0.628931 |
7c83fd89c702ba9d9dcb725c78535f9419ea8d70 | 2,771 | py | Python | buildAncestryFeats.py | BurcinSayin/pf2 | bcd362dc0a750b8ee59cd19ecff9cf5be4f34b19 | [
"MIT"
] | null | null | null | buildAncestryFeats.py | BurcinSayin/pf2 | bcd362dc0a750b8ee59cd19ecff9cf5be4f34b19 | [
"MIT"
] | null | null | null | buildAncestryFeats.py | BurcinSayin/pf2 | bcd362dc0a750b8ee59cd19ecff9cf5be4f34b19 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import json
import datetime
import codecs
import re
featHolder = {}
featHolder['name'] = 'Pathfinder 2.0 Ancestry feat list'
featHolder['date'] = datetime.date.today().strftime("%B %d, %Y")
listOfPages = codecs.open("ancestryFeats.csv", encoding='utf-8')
for ... | 34.209877 | 155 | 0.572717 |
7c84005ad03ff1fb7961f46195db1060fc63cb16 | 861 | py | Python | Random_item_selector_module.py | Jahronimo/public_question_book_framework | 812bd11b104de013e930536713b8134d046642d5 | [
"MIT"
] | null | null | null | Random_item_selector_module.py | Jahronimo/public_question_book_framework | 812bd11b104de013e930536713b8134d046642d5 | [
"MIT"
] | null | null | null | Random_item_selector_module.py | Jahronimo/public_question_book_framework | 812bd11b104de013e930536713b8134d046642d5 | [
"MIT"
] | 1 | 2020-03-07T10:53:30.000Z | 2020-03-07T10:53:30.000Z | import random
| 47.833333 | 86 | 0.682927 |
7c8421979f69cbc7cf5cd9ec5a87a153ab3efc74 | 1,228 | py | Python | python_scrape/test_functions.py | jose-marquez89/tech-job-landscape | 0b509536e7ba22885f50c82da8cf990b65373090 | [
"MIT"
] | null | null | null | python_scrape/test_functions.py | jose-marquez89/tech-job-landscape | 0b509536e7ba22885f50c82da8cf990b65373090 | [
"MIT"
] | null | null | null | python_scrape/test_functions.py | jose-marquez89/tech-job-landscape | 0b509536e7ba22885f50c82da8cf990b65373090 | [
"MIT"
] | null | null | null | import unittest
import scrape
if __name__ == '__main__':
unittest.main()
| 34.111111 | 78 | 0.556189 |
7c84e9b3f92ddbf93482eff72a312c6afff49d17 | 173 | py | Python | Level1_Input_Output/10172.py | jaeheeLee17/BOJ_Algorithms | c14641693d7ef0f5bba0a6637166c7ceadb2a0be | [
"MIT"
] | null | null | null | Level1_Input_Output/10172.py | jaeheeLee17/BOJ_Algorithms | c14641693d7ef0f5bba0a6637166c7ceadb2a0be | [
"MIT"
] | null | null | null | Level1_Input_Output/10172.py | jaeheeLee17/BOJ_Algorithms | c14641693d7ef0f5bba0a6637166c7ceadb2a0be | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
main()
| 17.3 | 26 | 0.352601 |
7c85f2097ce6518402e3aa24b38cc365cc5ffeaa | 4,981 | py | Python | Whats Cooking/KaggleCookingComparison.py | rupakc/Kaggle-Compendium | 61634ba742f9a0239f2d1e45973c4bb477ac6306 | [
"MIT"
] | 17 | 2018-01-11T05:49:06.000Z | 2021-08-22T16:50:10.000Z | Whats Cooking/KaggleCookingComparison.py | Tuanlase02874/Machine-Learning-Kaggle | c31651acd8f2407d8b60774e843a2527ce19b013 | [
"MIT"
] | null | null | null | Whats Cooking/KaggleCookingComparison.py | Tuanlase02874/Machine-Learning-Kaggle | c31651acd8f2407d8b60774e843a2527ce19b013 | [
"MIT"
] | 8 | 2017-11-27T06:58:50.000Z | 2021-08-22T16:50:13.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 26 13:20:45 2015
Code for Kaggle What's Cooking Competition
It uses the following classifiers with tf-idf,hashvectors and bag_of_words approach
1. Adaboost
2. Extratrees
3. Bagging
4. Random Forests
@author: Rupak Chakraborty
"""
import numpy as np
import time
import json... | 32.344156 | 90 | 0.739611 |
7c85f5102089b2dbe1aa3c33bc6b5354992888f4 | 466 | py | Python | pybook/ch10/DeckOfCards.py | YanhaoXu/python-learning | 856687a71635a2ca67dab49d396c238f128e5ec0 | [
"MIT"
] | 2 | 2021-12-06T13:29:48.000Z | 2022-01-20T11:39:45.000Z | pybook/ch10/DeckOfCards.py | YanhaoXu/python-learning | 856687a71635a2ca67dab49d396c238f128e5ec0 | [
"MIT"
] | null | null | null | pybook/ch10/DeckOfCards.py | YanhaoXu/python-learning | 856687a71635a2ca67dab49d396c238f128e5ec0 | [
"MIT"
] | null | null | null | import random
# Create a deck of cards
deck = [x for x in range(52)]
# Create suits and ranks lists
suits = ["Spades", "Hearts", "Diamonds", "Clubs"]
ranks = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9",
"10", "Jack", "Queen", "King"]
# Shuffle the cards
random.shuffle(deck)
# Display the first four card... | 24.526316 | 61 | 0.575107 |
7c8673116b02c8c1dd21b123ad5da8653dbefe4c | 3,410 | py | Python | nlpgnn/gnn/RGCNConv.py | ojipadeson/NLPGNN | 7c43d2f0cb2b16c046c930037fd505c5c4f36db4 | [
"MIT"
] | 263 | 2020-05-19T10:40:26.000Z | 2022-03-25T05:22:49.000Z | nlpgnn/gnn/RGCNConv.py | Kuan-Louis/NLPGNN | b9ecec2c6df1b3e40a54511366dcb6085cf90c34 | [
"MIT"
] | 7 | 2020-05-18T23:02:55.000Z | 2021-04-29T18:27:43.000Z | nlpgnn/gnn/RGCNConv.py | Kuan-Louis/NLPGNN | b9ecec2c6df1b3e40a54511366dcb6085cf90c34 | [
"MIT"
] | 56 | 2020-05-19T05:59:36.000Z | 2022-03-14T06:21:33.000Z | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
@Author:Kaiyin Zhou
Usage:
node_embeddings = tf.random.normal(shape=(5, 3))
adjacency_lists = [
tf.constant([[0, 1], [2, 4], [2, 4]], dtype=tf.int32),
tf.constant([[0, 1], [2, 4], [2, 4]], dtype=tf.int32)
]
layer... | 35.894737 | 97 | 0.575367 |
7c872854a67dcbee173ef18681a5116e43865d52 | 53,677 | py | Python | automl/google/cloud/automl_v1beta1/gapic/auto_ml_client.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 1 | 2019-04-16T08:13:06.000Z | 2019-04-16T08:13:06.000Z | automl/google/cloud/automl_v1beta1/gapic/auto_ml_client.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | null | null | null | automl/google/cloud/automl_v1beta1/gapic/auto_ml_client.py | erikwebb/google-cloud-python | 288a878e9a07239015c78a193eca1cc15e926127 | [
"Apache-2.0"
] | 1 | 2020-11-15T11:44:36.000Z | 2020-11-15T11:44:36.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 42.198899 | 128 | 0.596512 |
7c87af0c38dbd1633d14f5192f2da57d1ebe0d89 | 73,923 | py | Python | addons/project/models/project.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/project/models/project.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/project/models/project.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
from datetime import timedelta, datetime
from random import randint
from odoo import api, fields, models, tools, SUPERUSER_ID, _
from odoo.exceptions import UserError, AccessError, ValidationError, RedirectWa... | 51.550209 | 249 | 0.645577 |
7c8849369fcbb1dad3eb48e7b50645532c6e90e9 | 1,670 | py | Python | app/config.py | Maethorin/pivocram | f1709f5ee76d0280601efa87f3af8e89c2968f43 | [
"MIT"
] | 5 | 2016-04-02T15:07:03.000Z | 2021-06-25T14:48:55.000Z | app/config.py | Maethorin/pivocram | f1709f5ee76d0280601efa87f3af8e89c2968f43 | [
"MIT"
] | 2 | 2016-04-28T20:14:04.000Z | 2016-05-01T18:37:05.000Z | app/config.py | Maethorin/pivocram | f1709f5ee76d0280601efa87f3af8e89c2968f43 | [
"MIT"
] | 1 | 2018-07-27T10:52:04.000Z | 2018-07-27T10:52:04.000Z | # -*- coding: utf-8 -*-
"""
Config File for enviroment variables
"""
import os
from importlib import import_module
def get_config():
"""
Get the Config Class instance defined in APP_SETTINGS environment variable
:return The config class instance
:rtype: Config
"""
config_imports = os.e... | 23.521127 | 115 | 0.671856 |
7c88b8dca0946deb62b53070c85ee8a8bd47974e | 845 | py | Python | initial_load.py | hongyuanChrisLi/RealEstateDBConvert | 0fd04f5213ff3fd3548db3f322828bd80cf41791 | [
"Apache-2.0"
] | null | null | null | initial_load.py | hongyuanChrisLi/RealEstateDBConvert | 0fd04f5213ff3fd3548db3f322828bd80cf41791 | [
"Apache-2.0"
] | null | null | null | initial_load.py | hongyuanChrisLi/RealEstateDBConvert | 0fd04f5213ff3fd3548db3f322828bd80cf41791 | [
"Apache-2.0"
] | null | null | null | from mysql_dao.select_dao import SelectDao as MysqlSelectDao
from postgres_dao.ddl_dao import DdlDao
from postgres_dao.dml_dao import DmlDao as PsqlDmlDao
psql_ddl_dao = DdlDao()
mysql_select_dao = MysqlSelectDao()
psql_dml_dao = PsqlDmlDao()
psql_ddl_dao.create_tables()
county_data = mysql_select_dao.select_all_cou... | 28.166667 | 60 | 0.857988 |
7c88cdba00ccf459ff19909681f6bd97e0741c61 | 6,306 | py | Python | pytests/docs/docs.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | pytests/docs/docs.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | pytests/docs/docs.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | import time
import logger
from basetestcase import BaseTestCase
from couchbase_helper.documentgenerator import DocumentGenerator
from membase.api.rest_client import RestConnection
from couchbase_helper.documentgenerator import BlobGenerator
| 55.80531 | 121 | 0.579607 |
7c898d721c85859465a77ce43f10791adda1d063 | 1,890 | py | Python | lichthi.py | truongaxin123/lichthidtu | 77ba75974769ab1fdd1281b6088a1734dc0a3a83 | [
"MIT"
] | null | null | null | lichthi.py | truongaxin123/lichthidtu | 77ba75974769ab1fdd1281b6088a1734dc0a3a83 | [
"MIT"
] | null | null | null | lichthi.py | truongaxin123/lichthidtu | 77ba75974769ab1fdd1281b6088a1734dc0a3a83 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
from urllib.request import urlretrieve
ROOT = 'http://pdaotao.duytan.edu.vn'
# a = get_excel_url('http://pdaotao.duytan.edu.vn/EXAM_LIST_Detail/?ID=52289&lang=VN')
main()
| 35 | 93 | 0.595767 |
7c8a2cc8e8cd0ae17cdb81c0889eb3b2e10339c2 | 10,998 | py | Python | appengine/uploader/main.py | isabella232/feedloader | c0417480804d406a83d1aedcb7e7d719058fdbfd | [
"Apache-2.0"
] | 5 | 2021-02-15T12:49:12.000Z | 2022-01-12T06:28:41.000Z | appengine/uploader/main.py | google/feedloader | f6a25569bc3d7d4ee326961fd3b01e45fc3858e4 | [
"Apache-2.0"
] | 1 | 2021-06-18T15:30:16.000Z | 2021-06-18T15:30:16.000Z | appengine/uploader/main.py | isabella232/feedloader | c0417480804d406a83d1aedcb7e7d719058fdbfd | [
"Apache-2.0"
] | 4 | 2021-02-16T17:28:00.000Z | 2021-06-18T15:27:52.000Z | # coding=utf-8
# Copyright 2021 Google LLC.
#
# 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 ... | 38.055363 | 148 | 0.738498 |
7c8a6aee7b7a77f1d1c85df07a12dedc044587d5 | 17,730 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/transforms.py | BadDevCode/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/transforms.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/transforms.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | """
Implement transformation on Numba IR
"""
from __future__ import absolute_import, print_function
from collections import namedtuple, defaultdict
import logging
from numba.analysis import compute_cfg_from_blocks, find_top_level_loops
from numba import ir, errors, ir_utils
from numba.analysis import compute_use_def... | 33.579545 | 84 | 0.60846 |
7c8a815c2ee01b343fc690c138951a4c479fece7 | 6,453 | py | Python | tests/test_masked_inference_wsi_dataset.py | HabibMrad/MONAI | 1314701c15623422574b0153d746666dc6004454 | [
"Apache-2.0"
] | 1 | 2022-01-04T21:38:23.000Z | 2022-01-04T21:38:23.000Z | tests/test_masked_inference_wsi_dataset.py | HabibMrad/MONAI | 1314701c15623422574b0153d746666dc6004454 | [
"Apache-2.0"
] | null | null | null | tests/test_masked_inference_wsi_dataset.py | HabibMrad/MONAI | 1314701c15623422574b0153d746666dc6004454 | [
"Apache-2.0"
] | null | null | null | import os
import unittest
from unittest import skipUnless
import numpy as np
from numpy.testing import assert_array_equal
from parameterized import parameterized
from monai.apps.pathology.datasets import MaskedInferenceWSIDataset
from monai.apps.utils import download_url
from monai.utils import optional_import
from t... | 27 | 95 | 0.501937 |
7c8d38953001878c9a523157e3f09b0df0983623 | 913 | py | Python | manga_py/providers/doujins_com.py | paulolimac/manga-py | 3d180846750a4e770b5024eb8cd15629362875b1 | [
"MIT"
] | 1 | 2020-11-19T00:40:49.000Z | 2020-11-19T00:40:49.000Z | manga_py/providers/doujins_com.py | paulolimac/manga-py | 3d180846750a4e770b5024eb8cd15629362875b1 | [
"MIT"
] | null | null | null | manga_py/providers/doujins_com.py | paulolimac/manga-py | 3d180846750a4e770b5024eb8cd15629362875b1 | [
"MIT"
] | null | null | null | from manga_py.provider import Provider
from .helpers.std import Std
main = DoujinsCom
| 23.410256 | 73 | 0.634173 |
7c8e9965cc893f149c68d0938c7cdd288fb5e3a7 | 980 | py | Python | src/urh/ui/delegates/CheckBoxDelegate.py | awesome-archive/urh | c8c3aabc9d637ca660d8c72c3d8372055e0f3ec7 | [
"Apache-2.0"
] | 1 | 2017-06-21T02:37:16.000Z | 2017-06-21T02:37:16.000Z | src/urh/ui/delegates/CheckBoxDelegate.py | dspmandavid/urh | 30643c1a68634b1c97eb9989485a4e96a3b038ae | [
"Apache-2.0"
] | null | null | null | src/urh/ui/delegates/CheckBoxDelegate.py | dspmandavid/urh | 30643c1a68634b1c97eb9989485a4e96a3b038ae | [
"Apache-2.0"
] | null | null | null | from PyQt5.QtCore import QModelIndex, QAbstractItemModel, Qt, pyqtSlot
from PyQt5.QtWidgets import QItemDelegate, QWidget, QStyleOptionViewItem, QCheckBox
| 37.692308 | 94 | 0.715306 |
7c8eb61b685c469f781463c9f7be05e90e8308c7 | 1,408 | py | Python | neural_network/backup_casestudy/denbigh/tf_RNN.py | acceleratedmaterials/AMDworkshop_demo | e7c2b931e023fc00ff7494b8acb2181f5c75bc4e | [
"MIT"
] | 5 | 2019-04-02T03:20:43.000Z | 2021-07-13T18:23:26.000Z | neural_network/backup_casestudy/denbigh/tf_RNN.py | NUS-SSE/AMDworkshop_demo | edbd6c60957dd0d83c3ef43c7e9e28ef1fef3bd9 | [
"MIT"
] | null | null | null | neural_network/backup_casestudy/denbigh/tf_RNN.py | NUS-SSE/AMDworkshop_demo | edbd6c60957dd0d83c3ef43c7e9e28ef1fef3bd9 | [
"MIT"
] | 5 | 2019-05-12T17:41:58.000Z | 2021-06-08T04:38:35.000Z | # -*- coding: utf-8 -*-
'''
Framework: Tensorflow
Training samples: 1600
Validation samples: 400
RNN with 128 units
Optimizer: Adam
Epoch: 100
Loss: Cross Entropy
Activation function: Relu for network and Soft-max for regression
Regularization: Drop-out, keep_prob = 0.8
Accuracy of Validation set: 95%
'''
from __future... | 37.052632 | 76 | 0.769176 |
7c8eba30a07960e7e0f748300f8823eed9acd88c | 5,569 | py | Python | code/tests/test_tile_tf.py | Nocty-chan/cs224n-squad | 0c0b342621e038aba8e20ff411da13dfa173351d | [
"Apache-2.0"
] | 2 | 2018-04-15T06:13:41.000Z | 2019-07-25T20:22:34.000Z | code/tests/test_tile_tf.py | Nocty-chan/cs224n-squad | 0c0b342621e038aba8e20ff411da13dfa173351d | [
"Apache-2.0"
] | 1 | 2020-11-10T04:51:36.000Z | 2020-11-10T04:51:36.000Z | code/tests/test_tile_tf.py | Nocty-chan/cs224n-squad | 0c0b342621e038aba8e20ff411da13dfa173351d | [
"Apache-2.0"
] | 3 | 2018-08-08T08:48:04.000Z | 2020-02-10T09:52:41.000Z | import numpy as np
import tensorflow as tf
H = 2
N = 2
M = 3
BS = 10
def masked_softmax(logits, mask, dim):
"""
Takes masked softmax over given dimension of logits.
Inputs:
logits: Numpy array. We want to take softmax over dimension dim.
mask: Numpy array of same shape as logits.
Has 1... | 41.87218 | 99 | 0.625606 |
7c8edd5a1cedfd0895ce2bb9c6148ce0241c7af7 | 7,174 | py | Python | specutils/tests/test_smoothing.py | hamogu/specutils | b873f2ac9b3c207c9e670246d102f46a9606d6ed | [
"BSD-3-Clause"
] | null | null | null | specutils/tests/test_smoothing.py | hamogu/specutils | b873f2ac9b3c207c9e670246d102f46a9606d6ed | [
"BSD-3-Clause"
] | null | null | null | specutils/tests/test_smoothing.py | hamogu/specutils | b873f2ac9b3c207c9e670246d102f46a9606d6ed | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
from astropy import convolution
from scipy.signal import medfilt
import astropy.units as u
from ..spectra.spectrum1d import Spectrum1D
from ..tests.spectral_examples import simulated_spectra
from ..manipulation.smoothing import (convolution_smooth, box_smooth,
... | 32.609091 | 98 | 0.730694 |
7c909452f19de7c50d60c569038b33d1b55f15c0 | 909 | py | Python | modules/interpolator.py | buulikduong/1d_sgl_solver | 03ce0b362d45acbbd3bb35e7b604ba97982eea92 | [
"BSD-2-Clause"
] | null | null | null | modules/interpolator.py | buulikduong/1d_sgl_solver | 03ce0b362d45acbbd3bb35e7b604ba97982eea92 | [
"BSD-2-Clause"
] | null | null | null | modules/interpolator.py | buulikduong/1d_sgl_solver | 03ce0b362d45acbbd3bb35e7b604ba97982eea92 | [
"BSD-2-Clause"
] | 2 | 2020-09-01T13:02:49.000Z | 2021-08-15T09:10:17.000Z | """Module interpolating mathematical functions out of support points"""
from scipy.interpolate import interp1d, lagrange, CubicSpline
def interpolator(x_sup, y_sup, method):
"""Interpolates a mathematical function from a given set of
points using either linear, polynomial or cubic spline for the
interpol... | 29.322581 | 71 | 0.672167 |
7c9109fd0312f441ea7db6be13582d7563d361c0 | 196 | py | Python | frappe/patches/v13_0/remove_web_view.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 3,755 | 2015-01-06T07:47:43.000Z | 2022-03-31T20:54:23.000Z | frappe/patches/v13_0/remove_web_view.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 7,369 | 2015-01-01T19:59:41.000Z | 2022-03-31T23:02:05.000Z | frappe/patches/v13_0/remove_web_view.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 2,685 | 2015-01-07T17:51:03.000Z | 2022-03-31T23:16:24.000Z | import frappe | 32.666667 | 61 | 0.77551 |
7c9227a3cbdbdfda32f8e1f7af19e23d5f84fca1 | 946 | py | Python | games.py | cpratim/DSA-Research-Paper | ebb856ef62f8a04aa72380e39afdde958eed529a | [
"MIT"
] | null | null | null | games.py | cpratim/DSA-Research-Paper | ebb856ef62f8a04aa72380e39afdde958eed529a | [
"MIT"
] | null | null | null | games.py | cpratim/DSA-Research-Paper | ebb856ef62f8a04aa72380e39afdde958eed529a | [
"MIT"
] | null | null | null | import json
import matplotlib.pyplot as plt
from pprint import pprint
import numpy as np
from scipy.stats import linregress
from util.stats import *
with open('data/game_stats.json', 'r') as f:
df = json.load(f)
X, y = [], []
for match, stats in df.items():
home, away = stats['home'], stats['away']
if home['mp'] !... | 22 | 51 | 0.64482 |
7c924b0af1eb750ce0d3f38bab21b79619b4ba48 | 6,255 | py | Python | src/generate_data.py | gycggd/leaf-classification | b37dd4a6a262562c454038218c1472329e54128b | [
"MIT"
] | null | null | null | src/generate_data.py | gycggd/leaf-classification | b37dd4a6a262562c454038218c1472329e54128b | [
"MIT"
] | null | null | null | src/generate_data.py | gycggd/leaf-classification | b37dd4a6a262562c454038218c1472329e54128b | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import tensorflow as tf
from keras.preprocessing.image import ImageDataGenerator
from keras.preprocessing.image import img_to_array, load_img
from keras.utils.np_utils import to_categorical
from sklearn.model_selection import StratifiedShuffleSplit
from sklearn.preproces... | 36.794118 | 116 | 0.672422 |
7c9293b09122efb5181f7494471359a909feb339 | 201 | py | Python | 2650-construindo-muralhas.py | ErickSimoes/URI-Online-Judge | 7e6f141db2647b1d0d69951b064bd95b0ce4ba1a | [
"MIT"
] | null | null | null | 2650-construindo-muralhas.py | ErickSimoes/URI-Online-Judge | 7e6f141db2647b1d0d69951b064bd95b0ce4ba1a | [
"MIT"
] | null | null | null | 2650-construindo-muralhas.py | ErickSimoes/URI-Online-Judge | 7e6f141db2647b1d0d69951b064bd95b0ce4ba1a | [
"MIT"
] | 1 | 2019-10-29T16:51:29.000Z | 2019-10-29T16:51:29.000Z | # -*- coding: utf-8 -*-
n, w = map(int, input().split())
for _ in range(n):
entrada = input()
last_space = entrada.rfind(' ')
if int(entrada[last_space:]) > w:
print(entrada[:last_space])
| 20.1 | 36 | 0.59204 |
7c938029fd9d5d4852f7e0ef36d2f9a92b855733 | 2,962 | py | Python | tests/assemblers/test_ensemble.py | yarix/m2cgen | f1aa01e4c70a6d1a8893e27bfbe3c36fcb1e8546 | [
"MIT"
] | 1 | 2021-05-28T06:59:21.000Z | 2021-05-28T06:59:21.000Z | tests/assemblers/test_ensemble.py | yarix/m2cgen | f1aa01e4c70a6d1a8893e27bfbe3c36fcb1e8546 | [
"MIT"
] | null | null | null | tests/assemblers/test_ensemble.py | yarix/m2cgen | f1aa01e4c70a6d1a8893e27bfbe3c36fcb1e8546 | [
"MIT"
] | null | null | null | from sklearn import ensemble
from m2cgen import assemblers, ast
from tests import utils
| 29.326733 | 79 | 0.502701 |
7c93f115e357ee6abe4ee6a425a0e90b87246382 | 1,834 | py | Python | setup.py | Parquery/pynumenc | f14abab40b7d08c55824bf1da5b2a7026c0a7282 | [
"MIT"
] | 1 | 2018-11-09T16:16:08.000Z | 2018-11-09T16:16:08.000Z | setup.py | Parquery/numenc-py | f14abab40b7d08c55824bf1da5b2a7026c0a7282 | [
"MIT"
] | 2 | 2018-11-09T12:51:40.000Z | 2018-11-09T12:53:55.000Z | setup.py | Parquery/pynumenc | f14abab40b7d08c55824bf1da5b2a7026c0a7282 | [
"MIT"
] | 2 | 2019-02-26T12:40:11.000Z | 2019-06-17T07:42:35.000Z | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
import os
from setuptools import setup, find_packages, Extension
import pynumenc_meta
# pylint: disable=redefined-builtin
here = os.path.abspath(os.path.dirname(__file__)) # ... | 31.084746 | 81 | 0.630316 |
7c95786ebe742f8164fbbe85994a95220ade7338 | 3,074 | py | Python | Models/License-Plate-Recognition-Nigerian-vehicles-master/License-Plate-Recognition-Nigerian-vehicles-master/ocr.py | nipunjain099/AutoGuard | 8217cd03af7927590ef3a160ecb7d9bc9f50d101 | [
"MIT"
] | 147 | 2018-12-23T09:44:36.000Z | 2022-03-03T15:38:33.000Z | Models/License-Plate-Recognition-Nigerian-vehicles-master/License-Plate-Recognition-Nigerian-vehicles-master/ocr.py | nipunjain099/AutoGuard | 8217cd03af7927590ef3a160ecb7d9bc9f50d101 | [
"MIT"
] | 17 | 2018-12-25T16:04:34.000Z | 2022-01-13T00:44:21.000Z | Models/License-Plate-Recognition-Nigerian-vehicles-master/License-Plate-Recognition-Nigerian-vehicles-master/ocr.py | nipunjain099/AutoGuard | 8217cd03af7927590ef3a160ecb7d9bc9f50d101 | [
"MIT"
] | 77 | 2018-12-19T03:03:14.000Z | 2022-03-13T17:00:38.000Z | import numpy as np
from skimage.transform import resize
from skimage import measure
from skimage.measure import regionprops | 43.914286 | 155 | 0.59987 |
7c9666a6d0704c6c5a1d15ed10e9ce79d7670676 | 3,215 | py | Python | project/server/models.py | mvlima/flask-jwt-auth | 6cb210b50888b1e9a41ea9e63a80eafcbe436560 | [
"MIT"
] | null | null | null | project/server/models.py | mvlima/flask-jwt-auth | 6cb210b50888b1e9a41ea9e63a80eafcbe436560 | [
"MIT"
] | null | null | null | project/server/models.py | mvlima/flask-jwt-auth | 6cb210b50888b1e9a41ea9e63a80eafcbe436560 | [
"MIT"
] | null | null | null | # project/server/models.py
import jwt
import datetime
from project.server import app, db, bcrypt
| 32.806122 | 90 | 0.612753 |
7c974ea9b476fd86b7ac61a4ae4dbd0512a02f64 | 1,711 | py | Python | letsencrypt/setup.py | ccppuu/certbot | 9fead41aaf93dde0d36d4aef6fded8dd306c1ddc | [
"Apache-2.0"
] | 1 | 2017-12-20T20:06:11.000Z | 2017-12-20T20:06:11.000Z | letsencrypt/setup.py | cpu/certbot | 9fead41aaf93dde0d36d4aef6fded8dd306c1ddc | [
"Apache-2.0"
] | null | null | null | letsencrypt/setup.py | cpu/certbot | 9fead41aaf93dde0d36d4aef6fded8dd306c1ddc | [
"Apache-2.0"
] | null | null | null | import codecs
import os
import sys
from setuptools import setup
from setuptools import find_packages
def read_file(filename, encoding='utf8'):
"""Read unicode from given file."""
with codecs.open(filename, encoding=encoding) as fd:
return fd.read()
here = os.path.abspath(os.path.dirname(__file__))
... | 27.15873 | 61 | 0.630625 |
7c98495a22a6d3d8755497c989624d8a5c427192 | 60,943 | py | Python | elastalert/alerts.py | dekhrekh/elastalert | 0c1ce30302c575bd0be404582cd452f38c01c774 | [
"Apache-2.0"
] | null | null | null | elastalert/alerts.py | dekhrekh/elastalert | 0c1ce30302c575bd0be404582cd452f38c01c774 | [
"Apache-2.0"
] | null | null | null | elastalert/alerts.py | dekhrekh/elastalert | 0c1ce30302c575bd0be404582cd452f38c01c774 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import copy
import datetime
import json
import logging
import subprocess
import sys
import warnings
from email.mime.text import MIMEText
from email.utils import formatdate
from smtplib import SMTP
from smtplib import SMTP_SSL
from smtplib import SMTPAuthenticationError
from smtplib import SMTPEx... | 44.289971 | 137 | 0.607814 |
7c9ab847564a9551bd26274412cd272cd155cf72 | 69,601 | py | Python | tests/unit/python/fledge/services/core/scheduler/test_scheduler.py | DDC-NDRS/fledge-iot_fledge | 27a5e66a55daaab1aca14ce6e66f9f1e6efaef51 | [
"Apache-2.0"
] | 69 | 2019-12-03T17:54:33.000Z | 2022-03-13T07:05:23.000Z | tests/unit/python/fledge/services/core/scheduler/test_scheduler.py | DDC-NDRS/fledge-iot_fledge | 27a5e66a55daaab1aca14ce6e66f9f1e6efaef51 | [
"Apache-2.0"
] | 125 | 2020-02-13T15:11:28.000Z | 2022-03-29T14:42:36.000Z | tests/unit/python/fledge/services/core/scheduler/test_scheduler.py | DDC-NDRS/fledge-iot_fledge | 27a5e66a55daaab1aca14ce6e66f9f1e6efaef51 | [
"Apache-2.0"
] | 24 | 2019-12-27T07:48:45.000Z | 2022-03-13T07:05:28.000Z | # -*- coding: utf-8 -*-
# FLEDGE_BEGIN
# See: http://fledge-iot.readthedocs.io/
# FLEDGE_END
import asyncio
import datetime
import uuid
import time
import json
from unittest.mock import MagicMock, call
import sys
import copy
import pytest
from fledge.services.core.scheduler.scheduler import Scheduler, AuditLogger, C... | 42.621555 | 339 | 0.652936 |
7c9af51ba1243be5af3bd0e724c771174bb964d2 | 1,007 | py | Python | problem_solving/python/algorithms/greedy/marcs_cakewalk.py | kcc3/hackerrank-solutions | f862b44b840bd447d99dc148f6bb5e2f5bfb8a86 | [
"MIT"
] | null | null | null | problem_solving/python/algorithms/greedy/marcs_cakewalk.py | kcc3/hackerrank-solutions | f862b44b840bd447d99dc148f6bb5e2f5bfb8a86 | [
"MIT"
] | null | null | null | problem_solving/python/algorithms/greedy/marcs_cakewalk.py | kcc3/hackerrank-solutions | f862b44b840bd447d99dc148f6bb5e2f5bfb8a86 | [
"MIT"
] | 1 | 2020-06-04T09:23:19.000Z | 2020-06-04T09:23:19.000Z | def marcs_cakewalk(calorie):
"""Hackerrank Problem: https://www.hackerrank.com/challenges/marcs-cakewalk/problem
Marc loves cupcakes, but he also likes to stay fit. Each cupcake has a calorie count, and Marc can walk a distance
to expend those calories. If Marc has eaten j cupcakes so far, after eating a c... | 37.296296 | 118 | 0.683217 |
7c9bc57e7e9891072399e9288ee87401c640bfb4 | 1,583 | py | Python | coronaindiatracker/coronatracker/views.py | ankitgoswami23/CoronaIndiaTracker | b2e116a595b3c69ccefa93b60833c09aa07b5eed | [
"Unlicense"
] | 2 | 2020-07-26T05:57:27.000Z | 2020-07-26T07:12:15.000Z | coronaindiatracker/coronatracker/views.py | ankee23/CoronaIndiaTracker | b2e116a595b3c69ccefa93b60833c09aa07b5eed | [
"Unlicense"
] | null | null | null | coronaindiatracker/coronatracker/views.py | ankee23/CoronaIndiaTracker | b2e116a595b3c69ccefa93b60833c09aa07b5eed | [
"Unlicense"
] | 1 | 2020-11-26T08:52:11.000Z | 2020-11-26T08:52:11.000Z | from django.shortcuts import render
import requests
from bs4 import BeautifulSoup
def corona_data(request):
"Testaaaa"
corona_html = requests.get("https://www.mygov.in/covid-19")
soup = BeautifulSoup(corona_html.content, 'html.parser')
state_wise_data = soup.find_all('div', class_='views-row')
inf... | 45.228571 | 113 | 0.642451 |
7c9c1524555fded271e617bca48b5b1e6a1e9ace | 6,082 | py | Python | compare.py | geohackweek/ghw2019_wiggles | 9b636db8d97986e038a301e36b808e820ccc525f | [
"BSD-3-Clause"
] | 3 | 2019-10-09T19:42:12.000Z | 2021-05-28T00:10:54.000Z | compare.py | geohackweek/ghw2019_wiggles | 9b636db8d97986e038a301e36b808e820ccc525f | [
"BSD-3-Clause"
] | 1 | 2019-09-11T16:37:59.000Z | 2019-09-11T16:37:59.000Z | compare.py | geohackweek/ghw2019_wiggles | 9b636db8d97986e038a301e36b808e820ccc525f | [
"BSD-3-Clause"
] | 3 | 2019-09-10T20:41:59.000Z | 2019-09-10T20:42:57.000Z | # Script tests GPD model using UW truth data
# Test outputs:
# - type of event tested [EQS, EQP, SUS, SUP, THS, THP, SNS, SNP, PXS, PXP]
# - phase [P, S, N] Note: N - not detected
# - model time offset (t_truth - t_model_pick)
import numpy
import math
import string
import datetime
import sys
import os
im... | 37.312883 | 132 | 0.561822 |
7c9c7b65355934d322e4085f42e442dbe2ee0d7d | 7,012 | py | Python | ultitrackerapi/ultitrackerapi/extract_and_upload_video.py | atheheath/ultitracker-api | 5d7ea7ae97c53faf02416f17baf11ed09fd55276 | [
"MIT"
] | null | null | null | ultitrackerapi/ultitrackerapi/extract_and_upload_video.py | atheheath/ultitracker-api | 5d7ea7ae97c53faf02416f17baf11ed09fd55276 | [
"MIT"
] | 7 | 2020-03-27T03:33:52.000Z | 2020-03-30T02:33:04.000Z | ultitrackerapi/ultitrackerapi/extract_and_upload_video.py | atheheath/ultitracker-api | 5d7ea7ae97c53faf02416f17baf11ed09fd55276 | [
"MIT"
] | null | null | null | import argparse
import boto3
import datetime
import json
import os
import posixpath
import re
import shutil
import tempfile
import uuid
from concurrent import futures
from multiprocessing import Pool
from ultitrackerapi import get_backend, get_logger, get_s3Client, video
backend_instance = get_backend()
logger = ... | 33.711538 | 138 | 0.673987 |
7c9c87d15e24804e84e87528b8a9f5ba5b08422f | 3,265 | py | Python | Chapter03/scikit_soft_voting_2knn.py | PacktPublishing/Hands-On-Ensemble-Learning-with-Python | db9b90189dbebbc6ab5ebba0e2e173ba80197c35 | [
"MIT"
] | 31 | 2019-07-21T00:36:52.000Z | 2022-02-25T15:38:21.000Z | Chapter03/scikit_soft_voting_2knn.py | tokiran/Hands-On-Ensemble-Learning-with-Python | 739ecda33fb75dc1df1366abf4a79c34cc0c2026 | [
"MIT"
] | null | null | null | Chapter03/scikit_soft_voting_2knn.py | tokiran/Hands-On-Ensemble-Learning-with-Python | 739ecda33fb75dc1df1366abf4a79c34cc0c2026 | [
"MIT"
] | 30 | 2019-07-06T00:22:44.000Z | 2022-02-04T02:44:17.000Z | # --- SECTION 1 ---
# Import the required libraries
from sklearn import datasets, naive_bayes, svm, neighbors
from sklearn.ensemble import VotingClassifier
from sklearn.metrics import accuracy_score
# Load the dataset
breast_cancer = datasets.load_breast_cancer()
x, y = breast_cancer.data, breast_cancer.target
... | 28.640351 | 92 | 0.67902 |
7c9e60fb8b9a1847e8db908d6cfa14b5a53e1aaf | 623 | py | Python | API/migrations/0005_alter_news_date_time_alter_news_headline.py | kgarchie/ReSTful-Django-API | 851c76eb75747042ceac0a6c164266409ca935d4 | [
"MIT"
] | null | null | null | API/migrations/0005_alter_news_date_time_alter_news_headline.py | kgarchie/ReSTful-Django-API | 851c76eb75747042ceac0a6c164266409ca935d4 | [
"MIT"
] | null | null | null | API/migrations/0005_alter_news_date_time_alter_news_headline.py | kgarchie/ReSTful-Django-API | 851c76eb75747042ceac0a6c164266409ca935d4 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-23 14:31
import datetime
from django.db import migrations, models
| 24.92 | 98 | 0.603531 |
7ca170e48f979878209316e327d77080c8c15058 | 2,662 | py | Python | qiskit/ml/datasets/iris.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/ml/datasets/iris.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/ml/datasets/iris.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 38.028571 | 78 | 0.696093 |
7ca18b95086348a6dec0e89454f15ffded086574 | 16,864 | py | Python | tests/h/views/api_auth_test.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | null | null | null | tests/h/views/api_auth_test.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | 5 | 2017-12-26T14:22:20.000Z | 2018-04-02T02:56:38.000Z | tests/h/views/api_auth_test.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | 1 | 2021-03-12T09:45:04.000Z | 2021-03-12T09:45:04.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import json
import mock
import pytest
from oauthlib.oauth2 import InvalidRequestFatalError
from oauthlib.common import Request as OAuthRequest
from pyramid import httpexceptions
from h._compat import urlparse
from h.exceptions import O... | 41.131707 | 147 | 0.694141 |
7ca1d5b32a32a25d088eb63410921b9a5e64742f | 1,306 | py | Python | tools/build/v2/test/conditionals.py | juslee/boost-svn | 6d5a03c1f5ed3e2b23bd0f3ad98d13ff33d4dcbb | [
"BSL-1.0"
] | 1 | 2018-12-15T19:55:56.000Z | 2018-12-15T19:55:56.000Z | tools/build/v2/test/conditionals.py | smart-make/boost | 46509a094f8a844eefd5bb8a0030b739a04d79e1 | [
"BSL-1.0"
] | null | null | null | tools/build/v2/test/conditionals.py | smart-make/boost | 46509a094f8a844eefd5bb8a0030b739a04d79e1 | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003, 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test conditional properties.
import BoostBuild
t = BoostBuild.Tester(... | 26.653061 | 78 | 0.712864 |
7ca33bba047d555eff412922059b6da8837f7980 | 270 | py | Python | examples/setuptools-rust-starter/tests/test_setuptools_rust_starter.py | FriendRat/pyo3 | 5446fe2062cb3bf11bf61bd4a2c58a7ed8b408d2 | [
"Apache-2.0"
] | 1 | 2021-06-18T16:27:31.000Z | 2021-06-18T16:27:31.000Z | examples/setuptools-rust-starter/tests/test_setuptools_rust_starter.py | FriendRat/pyo3 | 5446fe2062cb3bf11bf61bd4a2c58a7ed8b408d2 | [
"Apache-2.0"
] | 5 | 2021-11-08T22:05:41.000Z | 2022-03-28T22:07:04.000Z | examples/setuptools-rust-starter/tests/test_setuptools_rust_starter.py | FriendRat/pyo3 | 5446fe2062cb3bf11bf61bd4a2c58a7ed8b408d2 | [
"Apache-2.0"
] | null | null | null | from setuptools_rust_starter import PythonClass, ExampleClass
| 22.5 | 61 | 0.733333 |
7ca44058ba24c0424d8558e54e0f3abd230491fa | 12,813 | py | Python | spiders/juejin_spider.py | sunhailin-Leo/TeamLeoX_BlogsCrawler | 389ff31e02bdff415c8bc470a3a48da1acb14c4c | [
"MIT"
] | null | null | null | spiders/juejin_spider.py | sunhailin-Leo/TeamLeoX_BlogsCrawler | 389ff31e02bdff415c8bc470a3a48da1acb14c4c | [
"MIT"
] | null | null | null | spiders/juejin_spider.py | sunhailin-Leo/TeamLeoX_BlogsCrawler | 389ff31e02bdff415c8bc470a3a48da1acb14c4c | [
"MIT"
] | null | null | null | import time
from typing import Dict, List, Tuple, Optional
from utils.logger_utils import LogManager
from utils.str_utils import check_is_json
from config import LOG_LEVEL, PROCESS_STATUS_FAIL
from utils.time_utils import datetime_str_change_fmt
from utils.exception_utils import LoginException, ParseDataException
from... | 42.287129 | 157 | 0.558807 |
7ca486af10b1cca3904ea233b441a3077ec0bb6b | 3,653 | py | Python | NAS/PaddleSlim/train_supernet.py | naviocean/SimpleCVReproduction | 61b43e3583977f42e6f91ef176ec5e1701e98d33 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | NAS/PaddleSlim/train_supernet.py | Twenty3hree/SimpleCVReproduction | 9939f8340c54dbd69b0017cecad875dccf428f26 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | NAS/PaddleSlim/train_supernet.py | Twenty3hree/SimpleCVReproduction | 9939f8340c54dbd69b0017cecad875dccf428f26 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | from paddle.vision.transforms import (
ToTensor, RandomHorizontalFlip, RandomResizedCrop, SaturationTransform, Compose,
HueTransform, BrightnessTransform, ContrastTransform, RandomCrop, Normalize, RandomRotation
)
from paddle.vision.datasets import Cifar100
from paddle.io import DataLoader
from paddle.optimizer... | 33.209091 | 108 | 0.680537 |
7ca4b5308f48cb161081920789f0cfaed577f79d | 28,560 | py | Python | slashtags/mixins/commands.py | Myst1c-a/phen-cogs | 672f9022ddbbd9a84b0a05357347e99e64a776fc | [
"MIT"
] | null | null | null | slashtags/mixins/commands.py | Myst1c-a/phen-cogs | 672f9022ddbbd9a84b0a05357347e99e64a776fc | [
"MIT"
] | null | null | null | slashtags/mixins/commands.py | Myst1c-a/phen-cogs | 672f9022ddbbd9a84b0a05357347e99e64a776fc | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020-present phenom4n4n
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, pub... | 37.777778 | 165 | 0.630882 |
7ca4f5192c61086f4f74975da17d1bf4fd80a81d | 184 | py | Python | prgm6.py | pooja-bs-3003/Project_21 | dc46e66ccf10937be6f2f8369ef02eb52e139eff | [
"MIT"
] | null | null | null | prgm6.py | pooja-bs-3003/Project_21 | dc46e66ccf10937be6f2f8369ef02eb52e139eff | [
"MIT"
] | null | null | null | prgm6.py | pooja-bs-3003/Project_21 | dc46e66ccf10937be6f2f8369ef02eb52e139eff | [
"MIT"
] | 1 | 2021-01-22T15:15:02.000Z | 2021-01-22T15:15:02.000Z | str1= input("enter a string :")
l1 =""
for i in str1 [::-1]:
l1 = i+l1
print(l1)
if str1 == l1:
print("string is a palindrome")
else :
print("string is not a palindrome")
| 18.4 | 40 | 0.592391 |
7ca53e88f3dd2e94b942b008b7daf5b989a2b7df | 3,493 | py | Python | product_spider/spiders/jk_spider.py | Pandaaaa906/product_spider | cc7f865f53fd3ed68f4869be3ba917c8373dfcf2 | [
"MIT"
] | null | null | null | product_spider/spiders/jk_spider.py | Pandaaaa906/product_spider | cc7f865f53fd3ed68f4869be3ba917c8373dfcf2 | [
"MIT"
] | null | null | null | product_spider/spiders/jk_spider.py | Pandaaaa906/product_spider | cc7f865f53fd3ed68f4869be3ba917c8373dfcf2 | [
"MIT"
] | null | null | null | import json
import re
from string import ascii_uppercase
from time import time
from urllib.parse import urljoin
import scrapy
from more_itertools import first
from scrapy import Request
from product_spider.items import JkProduct, JKPackage
from product_spider.utils.functions import strip
| 45.960526 | 142 | 0.566562 |
7ca69cf8d56aa0d6b0aa339f56249d7cdfe3ab0c | 15,717 | py | Python | env/LaneChangeEnv_v2.py | byq-luo/Lane_change_RL | 3409238db939e6722441219b4c2dc66033611069 | [
"MIT"
] | 4 | 2021-03-11T03:05:31.000Z | 2022-03-22T08:45:20.000Z | env/LaneChangeEnv_v2.py | byq-luo/Lane_change_RL | 3409238db939e6722441219b4c2dc66033611069 | [
"MIT"
] | null | null | null | env/LaneChangeEnv_v2.py | byq-luo/Lane_change_RL | 3409238db939e6722441219b4c2dc66033611069 | [
"MIT"
] | 5 | 2021-06-18T11:32:34.000Z | 2021-12-31T08:10:51.000Z | import os
import sys
import random
import datetime
import gym
from gym import spaces
import numpy as np
from env.IDM import IDM
from env.Road import Road
from env.Vehicle import Vehicle
import math
# add sumo/tools into python environment
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], ... | 40.507732 | 131 | 0.56283 |
7ca6e02f50310d3c489fa5cfd14dac9866b27eaa | 5,466 | py | Python | cidr/o365/o365.py | jblukach/distillery | 4087debb496d7dfc4c425c2e68246e1b0726168b | [
"Apache-2.0"
] | 1 | 2021-11-10T12:56:09.000Z | 2021-11-10T12:56:09.000Z | cidr/o365/o365.py | jblukach/distillery | 4087debb496d7dfc4c425c2e68246e1b0726168b | [
"Apache-2.0"
] | null | null | null | cidr/o365/o365.py | jblukach/distillery | 4087debb496d7dfc4c425c2e68246e1b0726168b | [
"Apache-2.0"
] | 1 | 2021-11-05T03:16:32.000Z | 2021-11-05T03:16:32.000Z | import boto3
import ipaddress
import json
import logging
import os
import requests
import uuid
logger = logging.getLogger()
logger.setLevel(logging.INFO)
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table(os.environ['DYNAMODB_TABLE'])
client = boto3.client('ssm')
| 47.12069 | 115 | 0.51921 |
7ca783f400a2f552b7d64e3767e01fb3717ef036 | 582 | py | Python | exampleinc.py | zulip/finbot | dcb6bfe54a674f4ff98370677a648b6cc1706e16 | [
"Apache-2.0"
] | 7 | 2017-02-19T16:35:24.000Z | 2022-03-09T20:05:49.000Z | exampleinc.py | zulip/finbot | dcb6bfe54a674f4ff98370677a648b6cc1706e16 | [
"Apache-2.0"
] | null | null | null | exampleinc.py | zulip/finbot | dcb6bfe54a674f4ff98370677a648b6cc1706e16 | [
"Apache-2.0"
] | 3 | 2020-02-13T18:06:46.000Z | 2021-06-10T19:56:30.000Z | #!/usr/bin/python
from money import *
c = Company("Example Inc")
c.add_flow(FixedCost("Initial Cash", -500000))
c.add_flow(FixedCost("Incorporation", 500))
c.add_flow(ConstantCost("Office", 50000))
c.add_flow(PeriodicCost("Subscription", 4000, "2012-01-05", 14))
c.add_flow(DelayedCost("2012-02-01", ConstantCost("Offic... | 36.375 | 68 | 0.730241 |
7ca7926bc8bb9c6d96d0fde91ed69d0cb52091a0 | 847 | py | Python | guardian/validators.py | dawid1stanek/guardian | 89359c93d5f36c8b458428e147000352fa7ad01d | [
"Apache-2.0"
] | null | null | null | guardian/validators.py | dawid1stanek/guardian | 89359c93d5f36c8b458428e147000352fa7ad01d | [
"Apache-2.0"
] | null | null | null | guardian/validators.py | dawid1stanek/guardian | 89359c93d5f36c8b458428e147000352fa7ad01d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import socket
import subprocess
import argparse
import logging
LOGGER = logging.getLogger(__name__)
ping.short_name = 'PING'
port.short_name = 'PORT'
| 24.2 | 112 | 0.663518 |
7ca89ca7169c0f1670fef9182b15d74e96bdbeae | 131 | py | Python | tests/data/udf_noop.py | Open-EO/openeo-geopyspark-driver | afd5902f426d2aa456d70ed6f2d51b6907de1cab | [
"Apache-2.0"
] | 12 | 2018-03-22T15:02:24.000Z | 2022-03-30T20:13:29.000Z | tests/data/udf_noop.py | Open-EO/openeo-geopyspark-driver | afd5902f426d2aa456d70ed6f2d51b6907de1cab | [
"Apache-2.0"
] | 116 | 2018-09-27T17:17:14.000Z | 2022-03-30T18:32:29.000Z | tests/data/udf_noop.py | Open-EO/openeo-geopyspark-driver | afd5902f426d2aa456d70ed6f2d51b6907de1cab | [
"Apache-2.0"
] | 3 | 2019-06-28T15:44:32.000Z | 2021-10-30T07:05:54.000Z | from openeo.udf import XarrayDataCube
| 21.833333 | 74 | 0.78626 |
7caa2f54344b5d827f792813f87cde352f46a120 | 827 | py | Python | StateGoHome.py | LHGames-2017/superintelligence | bd9ea3d444e571a0f9607bf0f6799807f7e644ca | [
"MIT"
] | null | null | null | StateGoHome.py | LHGames-2017/superintelligence | bd9ea3d444e571a0f9607bf0f6799807f7e644ca | [
"MIT"
] | null | null | null | StateGoHome.py | LHGames-2017/superintelligence | bd9ea3d444e571a0f9607bf0f6799807f7e644ca | [
"MIT"
] | null | null | null | from PlayerState import *
from pathFinder import PathFinder
from StateLook4Resources import *
| 31.807692 | 71 | 0.689238 |
7caad7d95f67042bb7aad81b10bf684a91160170 | 9,603 | py | Python | hoomd/mpcd/test-py/stream_slit_test.py | schwendp/hoomd-blue | df7970121b19bc4f8674348ab3241055ac87153b | [
"BSD-3-Clause"
] | 2 | 2020-03-30T14:38:50.000Z | 2020-06-02T05:53:41.000Z | hoomd/mpcd/test-py/stream_slit_test.py | schwendp/hoomd-blue | df7970121b19bc4f8674348ab3241055ac87153b | [
"BSD-3-Clause"
] | null | null | null | hoomd/mpcd/test-py/stream_slit_test.py | schwendp/hoomd-blue | df7970121b19bc4f8674348ab3241055ac87153b | [
"BSD-3-Clause"
] | 1 | 2020-05-20T07:00:08.000Z | 2020-05-20T07:00:08.000Z | # Copyright (c) 2009-2019 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause License.
# Maintainer: mphoward
import unittest
import numpy as np
import hoomd
from hoomd import md
from hoomd import mpcd
# unit tests for mpcd slit streaming geometry
... | 43.06278 | 101 | 0.64157 |
7caae2b0b77242e98f5f62bea314586497fa86a7 | 7,261 | py | Python | tests/functional/model_models.py | haoyuchen1992/CourseBuilder | ba8f0e05c53cc74bb4e46235a7855fdfbd63dff7 | [
"Apache-2.0"
] | 1 | 2015-04-15T08:38:08.000Z | 2015-04-15T08:38:08.000Z | tests/functional/model_models.py | haoyuchen1992/CourseBuilder | ba8f0e05c53cc74bb4e46235a7855fdfbd63dff7 | [
"Apache-2.0"
] | 1 | 2021-06-08T09:49:12.000Z | 2021-06-08T09:49:12.000Z | tests/functional/model_models.py | haoyuchen1992/CourseBuilder | ba8f0e05c53cc74bb4e46235a7855fdfbd63dff7 | [
"Apache-2.0"
] | 3 | 2015-10-25T12:39:07.000Z | 2021-06-08T09:47:34.000Z | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 39.677596 | 80 | 0.700454 |
7cab92b7f1c079530e07c1c01ef7a728efea9d02 | 43,187 | py | Python | torchaudio/functional/functional.py | iseessel/audio | 64551a69186d28db1f499ba373f1b19c6a7ed894 | [
"BSD-2-Clause"
] | null | null | null | torchaudio/functional/functional.py | iseessel/audio | 64551a69186d28db1f499ba373f1b19c6a7ed894 | [
"BSD-2-Clause"
] | null | null | null | torchaudio/functional/functional.py | iseessel/audio | 64551a69186d28db1f499ba373f1b19c6a7ed894 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import io
import math
import warnings
from typing import Optional, Tuple
import torch
from torch import Tensor
from torchaudio._internal import module_utils as _mod_utils
import torchaudio
__all__ = [
"spectrogram",
"griffinlim",
"amplitude_to_DB",
"DB_to_amplitude",
"comp... | 35.39918 | 116 | 0.611666 |
7cabc4e8d6c4275c91322768679e9a68335e86e0 | 12,964 | py | Python | src/status_node.py | Faust-Wang/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 21 | 2021-03-03T10:51:46.000Z | 2022-03-28T11:00:35.000Z | src/status_node.py | Faust-Wang/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 2 | 2021-07-21T07:57:16.000Z | 2022-03-17T12:41:51.000Z | src/status_node.py | hvourtsis/vswarm | d18ce643218c18ef1e762f40562104b2a0926ad7 | [
"MIT"
] | 8 | 2021-02-27T14:29:55.000Z | 2022-01-05T19:40:38.000Z | #!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
import curses
import sys
from collections import deque
from datetime import datetime
import numpy as np
import rospy
from diagnostic_msgs.msg import DiagnosticArray, DiagnosticStatus
from geometry_msgs.msg import PoseStamped
from ... | 35.132791 | 100 | 0.57166 |
7cabe7391066e68e59a6eee1bcca21b689be0897 | 5,010 | py | Python | bin/boxplot_param.py | mo-schmid/MIALab | 8a7e183df7007993e8a28513a73dca20bfd60737 | [
"Apache-2.0"
] | null | null | null | bin/boxplot_param.py | mo-schmid/MIALab | 8a7e183df7007993e8a28513a73dca20bfd60737 | [
"Apache-2.0"
] | null | null | null | bin/boxplot_param.py | mo-schmid/MIALab | 8a7e183df7007993e8a28513a73dca20bfd60737 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import pandas as pd
from pathlib import Path
def main(results: [ResultParam], plot_dir: Path):
"""generates box plots comparing two or more result sets for all labels
Args:
results ([ResultParam])... | 35.531915 | 135 | 0.641916 |
7cae45b970c1385083dad6bbec98b3cd495bf626 | 3,948 | py | Python | EMeRGE/dssmetrics/constants.py | NREL/EMeRGE | 573e86ca8e62080c664998e8cc79e9231e7ad502 | [
"BSD-3-Clause"
] | 6 | 2020-04-11T18:09:00.000Z | 2022-01-23T20:38:38.000Z | EMeRGE/dssmetrics/constants.py | NREL/EMeRGE | 573e86ca8e62080c664998e8cc79e9231e7ad502 | [
"BSD-3-Clause"
] | null | null | null | EMeRGE/dssmetrics/constants.py | NREL/EMeRGE | 573e86ca8e62080c664998e8cc79e9231e7ad502 | [
"BSD-3-Clause"
] | 3 | 2020-06-11T02:48:49.000Z | 2021-08-10T07:13:57.000Z |
""" Default values : DO NOT CHANGE !!!"""
LOG_FORMAT = "%(asctime)s: %(levelname)s: %(message)s"
DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
MAXITERATIONS = 100
LIFE_PARAMETERS = {"theta_i":30,"theta_fl":36,"theta_gfl":28.6,
"R":4.87,"n":1,"tau":3.5,"m":1,"A":-13.391,
"B":6972.15,"num_... | 35.567568 | 108 | 0.472898 |
7cae7acd2ab857e48bf48cfdcc2ed083e6292337 | 12,669 | py | Python | minesweeper/game.py | MathisFederico/Minesweeper | b66b41066e325813b24497d2caca0a11c048e18b | [
"MIT"
] | 1 | 2020-12-23T11:52:40.000Z | 2020-12-23T11:52:40.000Z | minesweeper/game.py | MathisFederico/Minesweeper | b66b41066e325813b24497d2caca0a11c048e18b | [
"MIT"
] | null | null | null | minesweeper/game.py | MathisFederico/Minesweeper | b66b41066e325813b24497d2caca0a11c048e18b | [
"MIT"
] | null | null | null | try:
import importlib.resources as pkg_resources
except ImportError:
# Try backported to PY<37 `importlib_resources`.
import importlib_resources as pkg_resources
from . import images
from gym import Env, spaces
from time import time
import numpy as np
from copy import copy
import colorsys
import pygame
f... | 41.950331 | 136 | 0.582209 |
7caf56de8045038d74971a889dbed39c31d7bb50 | 1,306 | py | Python | tests/python/gaia-ui-tests/gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera_with_passcode.py | BReduardokramer/gaia | c00302cdcd435ab193e8365917cfc6abac9e4f2e | [
"Apache-2.0"
] | 1 | 2021-11-09T00:27:34.000Z | 2021-11-09T00:27:34.000Z | tests/python/gaia-ui-tests/gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera_with_passcode.py | AmyYLee/gaia | a5dbae8235163d7f985bdeb7d649268f02749a8b | [
"Apache-2.0"
] | null | null | null | tests/python/gaia-ui-tests/gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera_with_passcode.py | AmyYLee/gaia | a5dbae8235163d7f985bdeb7d649268f02749a8b | [
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from gaiatest import GaiaTestCase
from gaiatest.apps.lockscreen.app import LockScreen
| 31.095238 | 90 | 0.717458 |
7caf8da8a5f682874ecef410bafcd6662e5de11b | 3,440 | py | Python | models/layers/mesh_conv.py | CallumMcMahon/MeshCNN | 343950a8d69807ed4afa13f1843edb37c4cd042c | [
"MIT"
] | 2 | 2022-01-05T09:21:17.000Z | 2022-03-24T15:20:14.000Z | models/layers/mesh_conv.py | CallumMcMahon/MeshCNN | 343950a8d69807ed4afa13f1843edb37c4cd042c | [
"MIT"
] | null | null | null | models/layers/mesh_conv.py | CallumMcMahon/MeshCNN | 343950a8d69807ed4afa13f1843edb37c4cd042c | [
"MIT"
] | 1 | 2022-03-24T15:20:20.000Z | 2022-03-24T15:20:20.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F | 41.445783 | 123 | 0.585756 |
7cafa8674f41ef3d6dc02a39822b470f9b548e16 | 334 | py | Python | code/0-input/create_hdf5/check_hdf5.py | AvinWangZH/3D-convolutional-speaker-recognition | 61969eb2dba6004bdecb4f7100047015ca665348 | [
"Apache-2.0"
] | 1 | 2021-04-04T17:08:05.000Z | 2021-04-04T17:08:05.000Z | code/0-input/create_hdf5/check_hdf5.py | subvin/3D-convolutional-speaker-recognition | 61969eb2dba6004bdecb4f7100047015ca665348 | [
"Apache-2.0"
] | null | null | null | code/0-input/create_hdf5/check_hdf5.py | subvin/3D-convolutional-speaker-recognition | 61969eb2dba6004bdecb4f7100047015ca665348 | [
"Apache-2.0"
] | null | null | null | import tables
import numpy as np
import matplotlib.pyplot as plt
# Reading the file.
fileh = tables.open_file('development.hdf5', mode='r')
# Dimentionality of the data structure.
print(fileh.root.utterance_test.shape)
print(fileh.root.utterance_train.shape)
print(fileh.root.label_train.shape)
print(fileh.root.label_... | 22.266667 | 54 | 0.796407 |