hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4860134d144acda6c7da14c457e036c472774351 | 3,582 | py | Python | p2os_test/src/test/test0624.py | longhuang318/RL-and-Robot | 1ab525f5c127b064fff5e8de94d016a265ec26c0 | [
"MIT"
] | 28 | 2019-06-07T15:20:55.000Z | 2022-03-23T13:09:17.000Z | p2os_test/src/test/test0624.py | longhuang318/RL-and-Robot | 1ab525f5c127b064fff5e8de94d016a265ec26c0 | [
"MIT"
] | null | null | null | p2os_test/src/test/test0624.py | longhuang318/RL-and-Robot | 1ab525f5c127b064fff5e8de94d016a265ec26c0 | [
"MIT"
] | 6 | 2019-06-13T08:50:24.000Z | 2021-06-02T08:56:56.000Z | # import rospy
# from gazebo_msgs.srv import GetModelState
# from gazebo_msgs.srv import GetModelStateResponse
#
#
# rospy.init_node("test0624")
# print("test1")
# rospy.wait_for_service('gazebo/get_model_state')
# get_state_srv = rospy.ServiceProxy('/gazebo/get_model_state', GetModelState)
# # model_state = GetModelSt... | 30.10084 | 101 | 0.673367 |
e20d3ae57a1d97457adf61f33a8eb3c9766fc2ec | 288 | py | Python | api/main.py | donatosaur/marble-game | dcbc636489a21486c112d2105db8b188a81d1a5f | [
"Apache-2.0"
] | 2 | 2021-09-03T17:20:48.000Z | 2021-09-25T14:56:58.000Z | api/main.py | donatosaur/marble-game | dcbc636489a21486c112d2105db8b188a81d1a5f | [
"Apache-2.0"
] | null | null | null | api/main.py | donatosaur/marble-game | dcbc636489a21486c112d2105db8b188a81d1a5f | [
"Apache-2.0"
] | null | null | null | # Modified: 2021-08-24
# Description: The api's entry point
import uvicorn
from config import settings
# start the server
if __name__ == '__main__':
uvicorn.run(
"app:app",
host=settings.HOST,
port=settings.PORT,
reload=settings.DEBUG_MODE,
)
| 19.2 | 36 | 0.642361 |
0c136cdf0628e001e762909d39e1cb8d625ff0ae | 6,617 | py | Python | amba.py | joaroque/amba | 11b07ffe5473c3b7ee8b30e03d71ab1f3b071273 | [
"MIT"
] | 10 | 2021-05-07T23:32:25.000Z | 2021-07-16T14:33:55.000Z | amba.py | Nurul-GC/amba | 48be3e15640edaf8f480a293e59b360e4b563d11 | [
"MIT"
] | 4 | 2021-05-08T00:14:57.000Z | 2021-05-16T18:09:57.000Z | amba.py | Nurul-GC/amba | 48be3e15640edaf8f480a293e59b360e4b563d11 | [
"MIT"
] | 2 | 2021-05-10T16:33:04.000Z | 2021-05-14T23:07:04.000Z | import requests
import json
from os import system, mkdir, path
class Amba:
def __init__(self, url):
self.url = url
def get_names(self):
link = self.url[19:]
# find "/" in URL
# get username and repo_name in url
f = link.find("/")
# get user & repo name
... | 30.214612 | 171 | 0.59725 |
1cddf899a37bef22f8c516bc6ebae0597f69474a | 1,938 | py | Python | lizard/util/rtl/packers.py | cornell-brg/lizard | 7f9a78a913e64b5cfdee3a26223539ad225bd6da | [
"BSD-3-Clause"
] | 50 | 2019-05-22T08:43:15.000Z | 2022-03-21T23:58:50.000Z | lizard/util/rtl/packers.py | cornell-brg/lizard | 7f9a78a913e64b5cfdee3a26223539ad225bd6da | [
"BSD-3-Clause"
] | 1 | 2019-07-27T18:51:52.000Z | 2019-08-02T01:20:22.000Z | lizard/util/rtl/packers.py | cornell-brg/lizard | 7f9a78a913e64b5cfdee3a26223539ad225bd6da | [
"BSD-3-Clause"
] | 11 | 2019-12-26T06:00:48.000Z | 2022-03-27T02:29:35.000Z | from pymtl import *
from lizard.util.rtl.interface import Interface, UseInterface
from lizard.util.rtl.method import MethodSpec
from lizard.util.rtl.types import Array, canonicalize_type
from lizard.bitutil import clog2
class PackerInterface(Interface):
def __init__(s, dtype, nports):
s.Data = canonicalize_typ... | 23.925926 | 61 | 0.565015 |
e80f2252a376c0609b6a286371bf77689000423a | 2,106 | py | Python | enaml/widgets/api.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/widgets/api.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/widgets/api.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2013, 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.967742 | 79 | 0.773504 |
47a559e3f714d44544d66c6c8307acf330291a74 | 1,578 | py | Python | tests/parquet_test.py | hokiegeek2/arkouda | 1eed2df96aad212b9c6424b0d423d9375604c0ba | [
"MIT"
] | 51 | 2021-05-15T01:35:20.000Z | 2022-03-31T00:41:17.000Z | tests/parquet_test.py | hokiegeek2/arkouda | 1eed2df96aad212b9c6424b0d423d9375604c0ba | [
"MIT"
] | 321 | 2021-05-12T16:02:45.000Z | 2022-03-31T17:10:27.000Z | tests/parquet_test.py | hokiegeek2/arkouda | 1eed2df96aad212b9c6424b0d423d9375604c0ba | [
"MIT"
] | 13 | 2021-06-03T13:44:21.000Z | 2022-03-31T17:38:36.000Z | import glob, os
from context import arkouda as ak
from base_test import ArkoudaTest
import numpy as np
import pytest
SIZE = 100
NUMFILES = 5
verbose = True
@pytest.mark.skipif(not os.getenv('ARKOUDA_SERVER_PARQUET_SUPPORT'), reason="No parquet support")
class ParquetTest(ArkoudaTest):
def test_parquet(self):
... | 32.204082 | 97 | 0.621039 |
5465bad4ee55a8dbaa793d155bcf8c3b7dcf634b | 224 | py | Python | django_handy_utils/views/__init__.py | mfdeux/django-handy-utils | 79e8268d0135372dd1b1094c41d47078fee2711d | [
"MIT"
] | null | null | null | django_handy_utils/views/__init__.py | mfdeux/django-handy-utils | 79e8268d0135372dd1b1094c41d47078fee2711d | [
"MIT"
] | null | null | null | django_handy_utils/views/__init__.py | mfdeux/django-handy-utils | 79e8268d0135372dd1b1094c41d47078fee2711d | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.http.request import HttpRequest
def healthcheck_view(request: HttpRequest):
"""
Healthcheck view returning an empty 200 response
"""
return HttpResponse('')
| 22.4 | 52 | 0.745536 |
41d3f0d30a43f6344850f70661d0ce60ad1d20d8 | 5,964 | py | Python | windows/runfiles.py | ddierschow/cab984 | 108ec0e4358690719ca2dabe0149021cfc7acd93 | [
"MIT"
] | 1 | 2019-06-05T21:13:20.000Z | 2019-06-05T21:13:20.000Z | windows/runfiles.py | ddierschow/cab984 | 108ec0e4358690719ca2dabe0149021cfc7acd93 | [
"MIT"
] | 3 | 2017-04-26T21:15:01.000Z | 2017-04-29T08:19:33.000Z | windows/runfiles.py | ddierschow/bamca | 11b42a1348f22816ca8cc714e7619127af2bcf21 | [
"MIT"
] | null | null | null | import datetime, fnmatch, glob, os, re, sys, time, urllib2
# todo:
# add a start date
inloc = 'http://www.mbxforum.com/11-Catalogs/02-MB75/MB75-Documents'
tmploc = 'tmp'
startword = {
'rtf': 'word.lnk /mrtfconv',
'html': 'word.lnk /mhtmlconv',
}
startscp = '"c:\\Program Files\\pscp"'
outloc = 'b... | 38.980392 | 109 | 0.501509 |
4d67d44d797563a751caa5f0ec5ed4aa78e2c4bd | 897 | py | Python | tests/test_wkipedia.py | maksudsharif/wikifacts | 5290df968bc0b38624f9d669a5c0b21117ea0d34 | [
"MIT"
] | null | null | null | tests/test_wkipedia.py | maksudsharif/wikifacts | 5290df968bc0b38624f9d669a5c0b21117ea0d34 | [
"MIT"
] | null | null | null | tests/test_wkipedia.py | maksudsharif/wikifacts | 5290df968bc0b38624f9d669a5c0b21117ea0d34 | [
"MIT"
] | null | null | null | """Test cases for the wikipedia module."""
from unittest.mock import Mock
import click
import pytest
from wikifacts import wikipedia
def test_random_page_uses_given_language(mock_requests_get: Mock) -> None:
"""It selects the specified Wikipedia language edition."""
wikipedia.random_page(language="de")
... | 32.035714 | 82 | 0.759197 |
426e1bc5ae864ea04a10dd36e48d114e53d2045b | 160 | py | Python | widgets/button/__init__.py | TusharAMD/astar | df3911b6f7ce765dc9964ce8feaf26d3195fe8fc | [
"Apache-2.0"
] | 14 | 2020-01-13T13:20:43.000Z | 2020-04-16T00:03:59.000Z | widgets/button/__init__.py | TusharAMD/astar | df3911b6f7ce765dc9964ce8feaf26d3195fe8fc | [
"Apache-2.0"
] | 1 | 2020-08-06T03:17:30.000Z | 2020-08-06T03:17:30.000Z | widgets/button/__init__.py | mHaisham/sortvis | 91d56acbdd575c129fc88e5ae54aaf5caae55eb0 | [
"Apache-2.0"
] | 1 | 2020-01-13T14:02:44.000Z | 2020-01-13T14:02:44.000Z | from .button import Button
from .hover import DIM_LIGHT, DIM_TRANSPARENCY, ORIGINAL_COLOR, BLACK_TEXT_WHITE_BACKGROUND, \
WHITE_TEXT_TRANSPARENT_BACKGROUND
| 40 | 94 | 0.85 |
1a13cd7bd2bff0a183954f20fa90024cb4d2e61c | 449 | py | Python | archive/macd_strat.py | andymitch/yuzu | 34c67d7a19a9d51a7478050ada6286d97ffa9910 | [
"Apache-2.0"
] | null | null | null | archive/macd_strat.py | andymitch/yuzu | 34c67d7a19a9d51a7478050ada6286d97ffa9910 | [
"Apache-2.0"
] | 10 | 2021-06-01T04:13:15.000Z | 2021-07-07T03:45:20.000Z | archive/macd_strat.py | andymitch/yuzu | 34c67d7a19a9d51a7478050ada6286d97ffa9910 | [
"Apache-2.0"
] | null | null | null | from ta.trend import MACD
from ta.momentum import RSIIndicator
from pandas import DataFrame
def macd_strat(data: DataFrame):
data['hist'] = MACD(data.close).macd_diff()
data['rsi'] = RSIIndicator(data.close).rsi()
data.loc[((data['hist'].shift() < 0) & (data['hist'] > 0) & (data['rsi'] < 50)), 'buy'] = dat... | 44.9 | 105 | 0.619154 |
ab761b6af693026a351a8ebda5ec3ffbc01b7c56 | 1,824 | py | Python | Sfumatura/Sfumatura/Sfumatura.py | lucadalbosco/Sfumatura | be70b5ab596c57bb13dad640f5563a88bdec4cf3 | [
"MIT"
] | null | null | null | Sfumatura/Sfumatura/Sfumatura.py | lucadalbosco/Sfumatura | be70b5ab596c57bb13dad640f5563a88bdec4cf3 | [
"MIT"
] | null | null | null | Sfumatura/Sfumatura/Sfumatura.py | lucadalbosco/Sfumatura | be70b5ab596c57bb13dad640f5563a88bdec4cf3 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import time
rivestimento_lung = 100
sfumatura_lung = 30
angolo = 60
margine_lung = 100
risoluzione = 0.5 #mm per dato
lineare = False
tetta = 15
sig = tetta/risoluzione
x = np.linspace(-3*sig, 3*sig, 6*sig)
plasma_std... | 24.32 | 65 | 0.533991 |
57e6167f76a57dfd8937aa8095ed500545506fb4 | 10,586 | py | Python | uuv_control/uuv_trajectory_control/src/uuv_trajectory_generator/path_generator/lipb_interpolator.py | hust-arms/uuv_simulator-armsauv | 41e4c14a4c3bb19801b6bc7c2c7a3633315177be | [
"Apache-2.0",
"BSD-3-Clause"
] | 470 | 2016-11-11T08:47:00.000Z | 2022-03-22T10:59:27.000Z | uuv_control/uuv_trajectory_control/src/uuv_trajectory_generator/path_generator/lipb_interpolator.py | hust-arms/uuv_simulator-armsauv | 41e4c14a4c3bb19801b6bc7c2c7a3633315177be | [
"Apache-2.0",
"BSD-3-Clause"
] | 219 | 2016-11-08T19:50:29.000Z | 2022-03-25T18:27:35.000Z | uuv_control/uuv_trajectory_control/src/uuv_trajectory_generator/path_generator/lipb_interpolator.py | hust-arms/uuv_simulator-armsauv | 41e4c14a4c3bb19801b6bc7c2c7a3633315177be | [
"Apache-2.0",
"BSD-3-Clause"
] | 292 | 2016-11-11T14:47:55.000Z | 2022-03-29T08:34:39.000Z | # Copyright (c) 2016-2019 The UUV Simulator Authors.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 38.776557 | 118 | 0.597298 |
7c9cd03bbea3a074673ab75165af1370b16876aa | 76,838 | py | Python | ondewo/nlu/entity_type_pb2.py | ondewo/ondewo-nlu-client-python | 9cee30a2678b1badaae644f3a73582ae6ecfea89 | [
"Apache-2.0"
] | null | null | null | ondewo/nlu/entity_type_pb2.py | ondewo/ondewo-nlu-client-python | 9cee30a2678b1badaae644f3a73582ae6ecfea89 | [
"Apache-2.0"
] | 5 | 2021-11-23T09:43:28.000Z | 2021-12-17T15:09:06.000Z | ondewo/nlu/entity_type_pb2.py | ondewo/ondewo-nlu-client-python | 9cee30a2678b1badaae644f3a73582ae6ecfea89 | [
"Apache-2.0"
] | 1 | 2022-02-22T08:54:57.000Z | 2022-02-22T08:54:57.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: ondewo/nlu/entity_type.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... | 45.655377 | 8,147 | 0.780122 |
0290390c21cbd372042f6d2b1ea0793690b97259 | 16,599 | py | Python | Time_series_data/Synthetic_demand_pathflows/demand_v1.py | keremakdemir/ISONE_UCED | 11ce34c5ac5d34dcab771640f41c0d2ce4ab21f9 | [
"MIT"
] | null | null | null | Time_series_data/Synthetic_demand_pathflows/demand_v1.py | keremakdemir/ISONE_UCED | 11ce34c5ac5d34dcab771640f41c0d2ce4ab21f9 | [
"MIT"
] | null | null | null | Time_series_data/Synthetic_demand_pathflows/demand_v1.py | keremakdemir/ISONE_UCED | 11ce34c5ac5d34dcab771640f41c0d2ce4ab21f9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 21 10:00:33 2018
@author: jdkern
"""
from __future__ import division
from sklearn import linear_model
from statsmodels.tsa.api import VAR
import pandas as pd
import numpy as np
######################################################################
# ... | 33.944785 | 180 | 0.519007 |
d1fb4af993c393b5a62c822878aa66e4bf152555 | 9,826 | py | Python | magnify/latent_sde/models.py | jiwoncpark/magnify | 04421d43b9f5340989e8614d961ac9f5988bde0c | [
"MIT"
] | null | null | null | magnify/latent_sde/models.py | jiwoncpark/magnify | 04421d43b9f5340989e8614d961ac9f5988bde0c | [
"MIT"
] | null | null | null | magnify/latent_sde/models.py | jiwoncpark/magnify | 04421d43b9f5340989e8614d961ac9f5988bde0c | [
"MIT"
] | 2 | 2021-09-14T19:14:12.000Z | 2021-11-07T10:29:01.000Z | import torch
from torch import nn
from torch.distributions import Normal
import torchsde
class Encoder(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super(Encoder, self).__init__()
self.gru = nn.GRU(input_size=input_size, hidden_size=hidden_size)
self.lin = nn.Linea... | 39.943089 | 117 | 0.541319 |
87a3752b264dc22e91af07021cc8416556ac1532 | 1,569 | py | Python | tests/test_rand_adjust_contrastd.py | tatuanb/monai_V1 | 41e492b61c78bb3c303f38b03fe9fdc74a3c2e96 | [
"Apache-2.0"
] | 2,971 | 2019-10-16T23:53:16.000Z | 2022-03-31T20:58:24.000Z | tests/test_rand_adjust_contrastd.py | catherine1996cn/MONAI | ff9bbfa82763de46cbac75553e340633e3d84ecb | [
"Apache-2.0"
] | 2,851 | 2020-01-10T16:23:44.000Z | 2022-03-31T22:14:53.000Z | tests/test_rand_adjust_contrastd.py | catherine1996cn/MONAI | ff9bbfa82763de46cbac75553e340633e3d84ecb | [
"Apache-2.0"
] | 614 | 2020-01-14T19:18:01.000Z | 2022-03-31T14:06:14.000Z | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 36.488372 | 120 | 0.697259 |
896cc8d1ee3c4891192fcc24d6ccedcc89538802 | 184 | py | Python | running_modes/configurations/transfer_learning/link_invent_learning_rate_configuration.py | lilleswing/Reinvent-1 | ac4e3e6fa6379c6f4af883478dfd1b3407933ada | [
"Apache-2.0"
] | 183 | 2020-04-04T02:01:15.000Z | 2022-03-30T21:56:56.000Z | running_modes/configurations/transfer_learning/link_invent_learning_rate_configuration.py | lilleswing/Reinvent-1 | ac4e3e6fa6379c6f4af883478dfd1b3407933ada | [
"Apache-2.0"
] | 39 | 2020-04-05T15:19:56.000Z | 2022-03-09T12:58:21.000Z | running_modes/configurations/transfer_learning/link_invent_learning_rate_configuration.py | lilleswing/Reinvent-1 | ac4e3e6fa6379c6f4af883478dfd1b3407933ada | [
"Apache-2.0"
] | 70 | 2020-04-05T19:25:43.000Z | 2022-02-22T12:04:39.000Z | from dataclasses import dataclass
@dataclass
class LinkInventLearningRateConfiguration:
start: float = 0.0001
min: float = 0.000001
gamma: float = 0.95
step: int = 1
| 18.4 | 42 | 0.706522 |
a9a64a4f5a6c08d48c8a6f9a174c924ecf04216c | 1,571 | py | Python | deepdanbooru/project/project.py | fredgido/DeepDanbooru | 044a92472bd153e227287be29c6f32ce7feb28a6 | [
"MIT"
] | null | null | null | deepdanbooru/project/project.py | fredgido/DeepDanbooru | 044a92472bd153e227287be29c6f32ce7feb28a6 | [
"MIT"
] | null | null | null | deepdanbooru/project/project.py | fredgido/DeepDanbooru | 044a92472bd153e227287be29c6f32ce7feb28a6 | [
"MIT"
] | null | null | null | import os
import deepdanbooru as dd
import tensorflow as tf
DEFAULT_PROJECT_CONTEXT = {
'image_width': 299,
'image_height': 299,
'database_path': None,
'minimum_tag_count': 20,
'model': 'resnet_custom_v2',
'minibatch_size': 32,
'epoch_count': 10,
'export_model_per_epoch': 10... | 30.803922 | 74 | 0.697645 |
2f0c42cbff15d9542bc32b1c147d60059a85c8a7 | 977 | py | Python | angular_flask/models/Store.py | saqib-nadeem/sample_python_scripts | 35054816b262a3860ab9db383ab5d9e11ac0ce87 | [
"MIT"
] | null | null | null | angular_flask/models/Store.py | saqib-nadeem/sample_python_scripts | 35054816b262a3860ab9db383ab5d9e11ac0ce87 | [
"MIT"
] | null | null | null | angular_flask/models/Store.py | saqib-nadeem/sample_python_scripts | 35054816b262a3860ab9db383ab5d9e11ac0ce87 | [
"MIT"
] | null | null | null | import datetime
from flask.ext.mongoengine import MongoEngine
from mongoengine import *
from angular_flask import app
from angular_flask.models.User import User
from angular_flask.models.BusinessType import BusinessType
db = MongoEngine(app)
class Store(db.Document):
business_name = StringField(max_length=100... | 29.606061 | 76 | 0.756397 |
5569ed54187face1c1aaf0d80883ca8dc3ba25b9 | 205 | py | Python | MSE.py | masonkadem/mathfunctions | 7733880da524be712ba8bac0632b2ca00557f387 | [
"MIT"
] | null | null | null | MSE.py | masonkadem/mathfunctions | 7733880da524be712ba8bac0632b2ca00557f387 | [
"MIT"
] | null | null | null | MSE.py | masonkadem/mathfunctions | 7733880da524be712ba8bac0632b2ca00557f387 | [
"MIT"
] | null | null | null | import numpy as np
def MSE(y, y_hat):
""" calculates mean squared error (a performance measure for AI models) from an np.array of predicted and observed data.
mse = np.mean((y - y_hat)**2)
return MSE
| 29.285714 | 120 | 0.717073 |
cd758b0d852e182679999ebe3386a5cde3118273 | 105 | py | Python | bcs-ui/backend/container_service/projects/base/constants.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 599 | 2019-06-25T03:20:46.000Z | 2022-03-31T12:14:33.000Z | bcs-ui/backend/container_service/projects/base/constants.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 537 | 2019-06-27T06:03:44.000Z | 2022-03-31T12:10:01.000Z | bcs-ui/backend/container_service/projects/base/constants.py | laodiu/bk-bcs | 2a956a42101ff6487ff521fb3ef429805bfa7e26 | [
"Apache-2.0"
] | 214 | 2019-06-25T03:26:05.000Z | 2022-03-31T07:52:03.000Z | # -*- coding: utf-8 -*-
ProjectKindName = "k8s"
ProjectKindID = 1
# 查询的数量限制
LIMIT_FOR_ALL_DATA = 10000
| 13.125 | 26 | 0.685714 |
0e61124efe0342e51cf1b37e02d96ef985e55faa | 49,841 | py | Python | test/functional/test_framework/test_framework.py | pandagrows/seed2need-farm-coin | d6ccc27c724049665946fed4649ce4902b2b88d8 | [
"MIT"
] | 3 | 2020-06-09T16:29:25.000Z | 2021-01-01T22:48:58.000Z | test/functional/test_framework/test_framework.py | Huynhhung0/seed2need-farm-coin | 0f13811a59673170115395878d2416d1948eab46 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_framework.py | Huynhhung0/seed2need-farm-coin | 0f13811a59673170115395878d2416d1948eab46 | [
"MIT"
] | 4 | 2019-11-21T21:51:05.000Z | 2020-06-13T00:25:32.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
from enum import Enum
from io import BytesIO
import logging
import optp... | 44.660394 | 310 | 0.597219 |
e1bfe2568c2bfa7ee16e6ee957bc752bac16b35b | 6,948 | py | Python | django_plus/cookie/utils.py | BE360/django-plus | 4bd09e2636391fb325da2a5dc5ec87e9280a1318 | [
"MIT"
] | 1 | 2019-09-25T06:48:14.000Z | 2019-09-25T06:48:14.000Z | django_plus/cookie/utils.py | BE360/django-plus | 4bd09e2636391fb325da2a5dc5ec87e9280a1318 | [
"MIT"
] | null | null | null | django_plus/cookie/utils.py | BE360/django-plus | 4bd09e2636391fb325da2a5dc5ec87e9280a1318 | [
"MIT"
] | 1 | 2019-04-22T11:49:16.000Z | 2019-04-22T11:49:16.000Z | from datetime import datetime
from collections import Counter
COOKIE_ENCRYPTION_KEY = "azsecrfbvtuhly0p1234567890~:#|- "
COOKIE_DECRYPTION_KEY = "953684217-*%#@~.azsecrfbvtuhly0k"
COOKIE_TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S"
COOKIE_DATE_FORMAT = "%Y-%m-%d"
SPLITTER = '|'
PAIR_SEPARATOR = '~'
TIME_SEPARATOR = '#'
PAR... | 40.395349 | 110 | 0.643207 |
4275f7bb2678749bf93a11f9de7e4b1f78cb31ea | 8,746 | py | Python | tensorlayer/layers/convolution/simplified_conv.py | TomLouisKeller/tensorlayer | 40114dc8692c77caefcda4f3bfd2b0ddb785f4ab | [
"Apache-2.0"
] | 1 | 2019-03-26T13:16:11.000Z | 2019-03-26T13:16:11.000Z | tensorlayer/layers/convolution/simplified_conv.py | TomLouisKeller/tensorlayer | 40114dc8692c77caefcda4f3bfd2b0ddb785f4ab | [
"Apache-2.0"
] | null | null | null | tensorlayer/layers/convolution/simplified_conv.py | TomLouisKeller/tensorlayer | 40114dc8692c77caefcda4f3bfd2b0ddb785f4ab | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
import tensorflow as tf
from tensorlayer.layers.core import Layer
from tensorlayer.layers.utils import get_collection_trainable
from tensorlayer import logging
from tensorlayer.decorators import deprecated_alias
__all__ = [
'Conv1d',
'Conv2d',
]
class Conv1d(Lay... | 38.19214 | 117 | 0.611022 |
7ce7db2b977649dec6fb1b9ef4de5d28fbb5cde6 | 3,069 | py | Python | services/web/server/src/simcore_service_webserver/diagnostics_plugin.py | KZzizzle/osparc-simcore | 981bc8d193f3f5d507e3225f857e0308c339e163 | [
"MIT"
] | null | null | null | services/web/server/src/simcore_service_webserver/diagnostics_plugin.py | KZzizzle/osparc-simcore | 981bc8d193f3f5d507e3225f857e0308c339e163 | [
"MIT"
] | null | null | null | services/web/server/src/simcore_service_webserver/diagnostics_plugin.py | KZzizzle/osparc-simcore | 981bc8d193f3f5d507e3225f857e0308c339e163 | [
"MIT"
] | null | null | null | import logging
import os
from operator import attrgetter
from typing import Optional
from aiohttp import web
import time
from servicelib import monitor_slow_callbacks
from servicelib.application_setup import ModuleCategory, app_module_setup
from .diagnostics_core import (
IncidentsRegistry,
kINCIDENTS_REGIST... | 29.796117 | 92 | 0.723688 |
e01814821b91187b836af4718ac73a435716a1ff | 16,326 | py | Python | horizon/tabs/base.py | ameoba/horizon | ff9e367c98a8bb79f10914abffaaa04b0a461819 | [
"Apache-2.0"
] | 2 | 2019-12-29T09:20:13.000Z | 2020-01-01T13:12:34.000Z | horizon/tabs/base.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 10 | 2015-02-19T20:27:04.000Z | 2017-05-15T15:04:32.000Z | horizon/tabs/base.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 1 | 2016-05-02T19:21:29.000Z | 2016-05-02T19:21:29.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
#
# ... | 35.491304 | 79 | 0.619196 |
816a42e1a71c55507567c7ddad2340a357dfc61c | 934 | py | Python | Torch_rl/test_file/testtt.py | zachary2wave/Torch-rl | cdf2128c5415b2e3d2c1f4f8861a1346f6c4dcd5 | [
"MIT"
] | 19 | 2020-01-09T01:42:34.000Z | 2022-03-24T09:34:55.000Z | Torch_rl/testtt.py | afei339/Torch-rl | 74bec126943fc4032ff19f23aa2eeb26cad4d439 | [
"MIT"
] | null | null | null | Torch_rl/testtt.py | afei339/Torch-rl | 74bec126943fc4032ff19f23aa2eeb26cad4d439 | [
"MIT"
] | 10 | 2020-01-09T01:42:22.000Z | 2021-08-19T15:12:19.000Z | import torch
from model.Network import DenseNet
from torch import nn
from torch.optim import Adam
actor = DenseNet(5, 2, hidden_activate=nn.ReLU())
critic = DenseNet(7, 1, hidden_activate=nn.ReLU())
class actor_critic(nn.Module):
def __init__(self, actor, critic):
super(actor_critic, self).__init__()
... | 23.35 | 50 | 0.674518 |
e0a50311e9c67d36b77a89feb92ebd6cb3eb895b | 7,981 | py | Python | neurokit2/complexity/fractal_dfa.py | kassyray/NeuroKit | b84d110a71d5d17c0d1efde0d60d00446fda16cb | [
"MIT"
] | null | null | null | neurokit2/complexity/fractal_dfa.py | kassyray/NeuroKit | b84d110a71d5d17c0d1efde0d60d00446fda16cb | [
"MIT"
] | null | null | null | neurokit2/complexity/fractal_dfa.py | kassyray/NeuroKit | b84d110a71d5d17c0d1efde0d60d00446fda16cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
from ..misc import expspace
def fractal_dfa(signal, windows="default", overlap=True, integrate=True, order=1, multifractal=False, q=2, show=False):
"""(Multifractal) Detrended Fluctuation Analysis (DFA or MFDFA)
Python implementation... | 36.442922 | 119 | 0.627365 |
9a7b0da794e2dd21d5272c6446263a1ac3c7c4de | 7,415 | py | Python | lib/datasets/voc_eval.py | dereyly/faster-rcnn-my | 8f30c996102ab59ece8bf683cdbe4bbab4e8a29b | [
"BSD-2-Clause"
] | 1 | 2018-04-05T14:06:48.000Z | 2018-04-05T14:06:48.000Z | lib/datasets/voc_eval.py | dereyly/faster-rcnn-my | 8f30c996102ab59ece8bf683cdbe4bbab4e8a29b | [
"BSD-2-Clause"
] | null | null | null | lib/datasets/voc_eval.py | dereyly/faster-rcnn-my | 8f30c996102ab59ece8bf683cdbe4bbab4e8a29b | [
"BSD-2-Clause"
] | null | null | null | # --------------------------------------------------------
# Fast/er R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Bharath Hariharan
# --------------------------------------------------------
import xml.etree.ElementTree as ET
import os
import cPickle
import numpy as np
# def get_cls2ct... | 34.649533 | 80 | 0.527579 |
56977cc5f440fed6b0270f22522f073a4b222b60 | 1,780 | py | Python | Chapter_16-17/02.py | dpazavalos/AdvPyProg | 7fee8bee019ea3e59778cc307e9dd5abea241a70 | [
"MIT"
] | null | null | null | Chapter_16-17/02.py | dpazavalos/AdvPyProg | 7fee8bee019ea3e59778cc307e9dd5abea241a70 | [
"MIT"
] | null | null | null | Chapter_16-17/02.py | dpazavalos/AdvPyProg | 7fee8bee019ea3e59778cc307e9dd5abea241a70 | [
"MIT"
] | null | null | null | import time
import asyncio
# global perf count time start
start = time.perf_counter()
async def count_down_sleep(name: str, delay):
indents = (ord(name) - ord('A')) * '\t'
n = 3
while n:
time.sleep(delay)
duration = time.perf_counter() - start
print('-'*40)
print(f"{format... | 22.531646 | 62 | 0.590449 |
11f27f6726b21d0c70680860da9ae10d586b108a | 1,619 | py | Python | ps1/simplebh.py | XuMuK1/fastpdehw | 5bb6030fb058f706d03b96bb6d1a3bdeec7ff425 | [
"MIT"
] | null | null | null | ps1/simplebh.py | XuMuK1/fastpdehw | 5bb6030fb058f706d03b96bb6d1a3bdeec7ff425 | [
"MIT"
] | null | null | null | ps1/simplebh.py | XuMuK1/fastpdehw | 5bb6030fb058f706d03b96bb6d1a3bdeec7ff425 | [
"MIT"
] | null | null | null | import numpy as np
import quadtrees as qtrees
#BARNES HUT
#idea is simple: given particle system with interations,
#sum up the interactions on one particular particle
def SumTraverse(root,loc,m,interFun,farParameter=2):
#root is QTree root
#loc is location of particle
#m is its mass
#interF... | 35.195652 | 86 | 0.614577 |
472d2be3f5dba805149a5b2f8fcadaa943db67c4 | 816 | py | Python | profiles_project/urls.py | Ishu-Bhardwaj/profiles-rest-api | 0861cdcd886629a0e516e2664936a0e85a34ab7f | [
"MIT"
] | null | null | null | profiles_project/urls.py | Ishu-Bhardwaj/profiles-rest-api | 0861cdcd886629a0e516e2664936a0e85a34ab7f | [
"MIT"
] | 5 | 2020-06-06T01:41:49.000Z | 2021-06-10T20:06:32.000Z | profiles_project/urls.py | Ishu-Bhardwaj/profiles-rest-api | 0861cdcd886629a0e516e2664936a0e85a34ab7f | [
"MIT"
] | null | null | null | """profiles_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cl... | 35.478261 | 77 | 0.707108 |
5a090a81439ee8c8b408e37bc33e3a187cedbb79 | 405 | py | Python | contents/design-pattern/code/SingletonPython/metaclass_ex.py | skmn3/CS-study | 830643c08333fb6d4df11c7c6c3b8ecf70264e23 | [
"MIT"
] | 738 | 2021-03-21T13:46:44.000Z | 2022-03-31T08:44:25.000Z | contents/design-pattern/code/SingletonPython/metaclass_ex.py | skmn3/CS-study | 830643c08333fb6d4df11c7c6c3b8ecf70264e23 | [
"MIT"
] | 38 | 2021-03-15T08:56:16.000Z | 2021-10-05T12:32:33.000Z | contents/design-pattern/code/SingletonPython/metaclass_ex.py | skmn3/CS-study | 830643c08333fb6d4df11c7c6c3b8ecf70264e23 | [
"MIT"
] | 91 | 2021-03-15T10:51:08.000Z | 2022-03-29T17:28:34.000Z | __author__ = 'Chetan'
class MyInt(type):
def __call__(cls, *args, **kwds):
print("***** Here's My int *****", args)
print("Now do whatever you want with these objects...")
return type.__call__(cls, *args, **kwds)
class int(metaclass=MyInt):
def __init__(self, x, y)... | 22.5 | 64 | 0.51358 |
84ce06b6240ef9578f2951d0133d2d4772bf2a9d | 2,675 | py | Python | IV_semester/os/kernel/process.py | dainiusjocas/labs | 25aa0ae2032681dbaf0afd83f3d80bedddea6407 | [
"Beerware"
] | 1 | 2019-04-16T22:05:42.000Z | 2019-04-16T22:05:42.000Z | IV_semester/os/kernel/process.py | dainiusjocas/labs | 25aa0ae2032681dbaf0afd83f3d80bedddea6407 | [
"Beerware"
] | null | null | null | IV_semester/os/kernel/process.py | dainiusjocas/labs | 25aa0ae2032681dbaf0afd83f3d80bedddea6407 | [
"Beerware"
] | null | null | null | #!/usr/bin/env python
import sys
sys.path.append('.')
import kernel_data
from configs import *
from real import processor
from helpers.resource_list import ResourceList
from helpers import logger
''' Process class '''
class Process:
def __init__(self, opts):
''' Expects one big dictionary full of para... | 34.294872 | 113 | 0.623178 |
26c7daf89ac920a6012f2fb4ffc42755d6aee8c4 | 5,138 | py | Python | app/python/tests/unit/util/test_helper.py | unitasglobal/scalr | d1b440a46a72c4d30be4db022ba8c0e9ef5c5e73 | [
"Apache-2.0"
] | 3 | 2017-08-22T17:39:06.000Z | 2017-12-07T03:49:42.000Z | app/python/tests/unit/util/test_helper.py | unitasglobal/scalr | d1b440a46a72c4d30be4db022ba8c0e9ef5c5e73 | [
"Apache-2.0"
] | 1 | 2021-06-01T21:52:44.000Z | 2021-06-01T21:52:44.000Z | app/python/tests/unit/util/test_helper.py | unitasglobal/scalr | d1b440a46a72c4d30be4db022ba8c0e9ef5c5e73 | [
"Apache-2.0"
] | 7 | 2016-09-19T20:36:36.000Z | 2018-12-04T16:53:41.000Z | from scalrpy.util import helper
def test_get_proxy_settings():
scalr_config = {
'connections': {
'proxy': {
'host': 'host',
'port': 10,
'type': 0,
'user': 'user',
'pass': 'pass',
},
}
}
... | 34.02649 | 71 | 0.415726 |
754f5c03ae627a86514a233dfb1d3c888a3d8b6e | 113 | py | Python | main.py | Omrigan/shiny-language-learner | cfa732a548a1c5dd337143e8493df0e9e4af583c | [
"MIT"
] | 2 | 2017-07-13T01:08:52.000Z | 2019-02-10T21:43:18.000Z | main.py | Omrigan/shiny-language-learner | cfa732a548a1c5dd337143e8493df0e9e4af583c | [
"MIT"
] | 1 | 2016-07-26T20:40:24.000Z | 2016-07-26T20:40:24.000Z | main.py | Omrigan/shiny-language-learner | cfa732a548a1c5dd337143e8493df0e9e4af583c | [
"MIT"
] | null | null | null | from language_learner_env import secret_settings
import learner
app = learner.App(secret_settings)
app.listen()
| 18.833333 | 48 | 0.840708 |
0d8b38d6387a16d90f79072b673fe5922e4f697c | 919 | py | Python | autograph/lib/envs/adversarialenv.py | bb912/MATS-DRS | 6e1ae9ba3b865e321d6a2d100d29693b776e1d36 | [
"MIT"
] | null | null | null | autograph/lib/envs/adversarialenv.py | bb912/MATS-DRS | 6e1ae9ba3b865e321d6a2d100d29693b776e1d36 | [
"MIT"
] | null | null | null | autograph/lib/envs/adversarialenv.py | bb912/MATS-DRS | 6e1ae9ba3b865e321d6a2d100d29693b776e1d36 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from enum import IntEnum
from typing import Tuple, Any, Sequence
from gym import Env
class PlayerID(IntEnum):
Player1 = 1
Player2 = -1
class AdversarialEnv(Env, ABC):
@abstractmethod
def get_current_player(self) -> PlayerID:
"""What player is allowed to ... | 26.257143 | 118 | 0.696409 |
3c54d7767a4a122fab0ae7a43e5864c12cdbd4c3 | 17,866 | py | Python | azure/durable_functions/tasks/task_utilities.py | pblocz/azure-functions-durable-python | 59e77089d4d9934aff4c884b55e3df6f350d03fe | [
"MIT"
] | null | null | null | azure/durable_functions/tasks/task_utilities.py | pblocz/azure-functions-durable-python | 59e77089d4d9934aff4c884b55e3df6f350d03fe | [
"MIT"
] | null | null | null | azure/durable_functions/tasks/task_utilities.py | pblocz/azure-functions-durable-python | 59e77089d4d9934aff4c884b55e3df6f350d03fe | [
"MIT"
] | null | null | null | import json
from ..models.history import HistoryEventType, HistoryEvent
from ..constants import DATETIME_STRING_FORMAT
from azure.functions._durable_functions import _deserialize_custom_object
from datetime import datetime
from typing import List, Optional
from ..models.actions.Action import Action
from ..models.Task i... | 35.238659 | 98 | 0.66467 |
d6e24cbf966f458ea7c5038f956916ca288c807d | 13,897 | py | Python | loopchain/rest_server/rest_server.py | LoopNewtorkInc/Loopchain | ccd9563026c5ac0a3218b1ba2eb26eb2b937903e | [
"Apache-2.0"
] | null | null | null | loopchain/rest_server/rest_server.py | LoopNewtorkInc/Loopchain | ccd9563026c5ac0a3218b1ba2eb26eb2b937903e | [
"Apache-2.0"
] | null | null | null | loopchain/rest_server/rest_server.py | LoopNewtorkInc/Loopchain | ccd9563026c5ac0a3218b1ba2eb26eb2b937903e | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 theloop, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 40.873529 | 135 | 0.653666 |
cde65503beddab55578fde93535135e2af8f149d | 532 | py | Python | setup.py | kozhushman/PrometheusRock | 70e98067e55bcbaef2153156ed26a616dd862ad1 | [
"MIT"
] | 35 | 2020-10-10T16:08:49.000Z | 2022-03-10T20:07:59.000Z | setup.py | kozhushman/PrometheusRock | 70e98067e55bcbaef2153156ed26a616dd862ad1 | [
"MIT"
] | 6 | 2020-10-19T14:04:02.000Z | 2022-03-09T06:23:20.000Z | setup.py | kozhushman/prometheusrock | 70e98067e55bcbaef2153156ed26a616dd862ad1 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='prometheusrock',
version='0.2.0',
author='Nikita Kozhushko (kozhushman)',
author_email='kozhushman@gmail.com',
packages=['prometheusrock'],
license='MIT License',
url="https://github.com/kozhushman/prometheusrock",
description='Prometheus middle... | 28 | 66 | 0.68985 |
d0129e88ae2104b0fd99b2db78c0390207c87983 | 258 | py | Python | tokens/admin.py | clebersonjf83/ethane | cbcd73c180d98089401933b9bfab669ac0013e17 | [
"Apache-2.0"
] | 22 | 2017-07-22T06:09:13.000Z | 2022-01-10T01:13:54.000Z | tokens/admin.py | clebersonjf83/ethane | cbcd73c180d98089401933b9bfab669ac0013e17 | [
"Apache-2.0"
] | 3 | 2017-07-18T22:47:49.000Z | 2018-01-12T08:58:46.000Z | tokens/admin.py | clebersonjf83/ethane | cbcd73c180d98089401933b9bfab669ac0013e17 | [
"Apache-2.0"
] | 14 | 2017-07-18T18:08:55.000Z | 2021-12-20T04:50:02.000Z | from django.contrib import admin
from .models import Token
class TokenAdmin(admin.ModelAdmin):
readonly_fields = ('phase', 'contract_address', 'token_type', 'eth_raised',
'token_address')
admin.site.register(Token, TokenAdmin)
| 23.454545 | 79 | 0.697674 |
6a0661b421a5773984b8009686244d24b4030f3e | 127 | py | Python | model_field_list/__init__.py | andreynovikov/django-mflf | 6c9ae096dc4a55b25c3f20e06b485588eff1fa0e | [
"MIT"
] | null | null | null | model_field_list/__init__.py | andreynovikov/django-mflf | 6c9ae096dc4a55b25c3f20e06b485588eff1fa0e | [
"MIT"
] | null | null | null | model_field_list/__init__.py | andreynovikov/django-mflf | 6c9ae096dc4a55b25c3f20e06b485588eff1fa0e | [
"MIT"
] | null | null | null | from .fields import ModelFieldListField, ModelFieldListFormField
__all__ = ['ModelFieldListField', 'ModelFieldListFormField']
| 31.75 | 64 | 0.84252 |
6125542b481956c58e785245508eea123c5822b9 | 8,186 | py | Python | pypy/jit/backend/x86/runner.py | benoitc/pypy | a3e1b12d1d01dc29056b7badc051ffc034297658 | [
"MIT"
] | 1 | 2020-01-21T11:10:51.000Z | 2020-01-21T11:10:51.000Z | pypy/jit/backend/x86/runner.py | benoitc/pypy | a3e1b12d1d01dc29056b7badc051ffc034297658 | [
"MIT"
] | null | null | null | pypy/jit/backend/x86/runner.py | benoitc/pypy | a3e1b12d1d01dc29056b7badc051ffc034297658 | [
"MIT"
] | null | null | null | import py
from pypy.rpython.lltypesystem import lltype, llmemory, rffi
from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rpython.llinterp import LLInterpreter
from pypy.rlib.objectmodel import we_are_translated
from pypy.jit.codewriter import longlong
from pypy.jit.metainterp import history, compile
from... | 38.613208 | 121 | 0.649035 |
ec80e2566a7bb036137471370be59ac33f4b555a | 980 | py | Python | src/dermclass_models/tests/test_persistence.py | KajetanPrystasz/dermclass | 14e4ea38d83fb0d1f865d96987c2bad7eac32af8 | [
"Apache-2.0"
] | 1 | 2022-03-25T23:13:22.000Z | 2022-03-25T23:13:22.000Z | src/dermclass_models/tests/test_persistence.py | KajetanPrystasz/dermclass | 14e4ea38d83fb0d1f865d96987c2bad7eac32af8 | [
"Apache-2.0"
] | null | null | null | src/dermclass_models/tests/test_persistence.py | KajetanPrystasz/dermclass | 14e4ea38d83fb0d1f865d96987c2bad7eac32af8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import pytest
from dermclass_models.persistence import BasePersistence
class TestBasePersistence:
@pytest.mark.integration
def test_load_pipeline(self):
pass
def test_remove_old_pipelines(self, tmp_path, testing_config):
testing_config.PIPELINE_TYPE = "testing_pi... | 27.222222 | 81 | 0.671429 |
abd9be44b4796cbe44f26d2158555a8a94387285 | 67 | py | Python | Board/Disc.py | y701311/Othello | f8a46ebc0dbc4e9fcac237482aaf8e54babffcef | [
"MIT"
] | 2 | 2022-02-04T15:52:50.000Z | 2022-02-09T01:26:24.000Z | Board/Disc.py | y701311/Othello | f8a46ebc0dbc4e9fcac237482aaf8e54babffcef | [
"MIT"
] | 1 | 2022-02-04T16:05:17.000Z | 2022-02-04T16:30:33.000Z | Board/Disc.py | y701311/Othello | f8a46ebc0dbc4e9fcac237482aaf8e54babffcef | [
"MIT"
] | null | null | null |
# オセロの石のクラス
class Disc:
empty = 0
black = 1
white = 2
| 9.571429 | 13 | 0.537313 |
947aab5ae6d53025c4733d5ed8cb988d07b313c7 | 1,856 | py | Python | get_env_vars.py | RajeshKumar1490/iB_hubs_mini_project | f7126092400fb9a62fb4bff643dae7cda3a8d9d2 | [
"MIT"
] | null | null | null | get_env_vars.py | RajeshKumar1490/iB_hubs_mini_project | f7126092400fb9a62fb4bff643dae7cda3a8d9d2 | [
"MIT"
] | 2 | 2021-09-07T07:06:00.000Z | 2021-09-07T07:24:26.000Z | get_env_vars.py | RajeshKumar1490/iB_hubs_mini_project | f7126092400fb9a62fb4bff643dae7cda3a8d9d2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import boto3
import argparse
import base64
def get_stage_vars(function_name, aws_region='eu-west-1', profile_name=None):
import boto3
if profile_name:
session = boto3.Session(profile_name=profile_name)
else:
session = boto3.Session()
lambda_client = ses... | 28.553846 | 96 | 0.69181 |
8d0d8cc17d0058c346d9f7e61ec9d2532b724f4c | 272 | py | Python | python-experiments/send_whatsapp_messages.py | stambuk-cl/Python-repo | eacc4610b53c55886e897d5191585bb5b8440eb4 | [
"MIT"
] | null | null | null | python-experiments/send_whatsapp_messages.py | stambuk-cl/Python-repo | eacc4610b53c55886e897d5191585bb5b8440eb4 | [
"MIT"
] | null | null | null | python-experiments/send_whatsapp_messages.py | stambuk-cl/Python-repo | eacc4610b53c55886e897d5191585bb5b8440eb4 | [
"MIT"
] | null | null | null | import whatsall.whatsall as whatsall
whatsall.start()
#Add a list of numbers
whatsall.numbers([9888***,89999***])
#Add the menssages that you want to send
whatsall.message(["Hello there"])
#Send the message to the list of numbers that you declare
whatsall.send_message() | 27.2 | 57 | 0.768382 |
9ef46b65d4c48d0feefa832f27bb4ee84bd6b3ef | 3,061 | py | Python | tensor2tensor/data_generators/video_utils_test.py | jinliangwei/tensor2tensor | c42797065738504d7f032d0a13f2dd5190bfb20f | [
"Apache-2.0"
] | 11 | 2019-12-12T17:34:04.000Z | 2022-03-03T11:21:13.000Z | tensor2tensor/data_generators/video_utils_test.py | jinliangwei/tensor2tensor | c42797065738504d7f032d0a13f2dd5190bfb20f | [
"Apache-2.0"
] | 63 | 2017-12-19T20:29:10.000Z | 2021-08-04T21:49:36.000Z | tensor2tensor/data_generators/video_utils_test.py | jinliangwei/tensor2tensor | c42797065738504d7f032d0a13f2dd5190bfb20f | [
"Apache-2.0"
] | 1 | 2021-03-24T09:47:57.000Z | 2021-03-24T09:47:57.000Z | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 36.440476 | 90 | 0.72558 |
abee482765ff0ef66c47477960947b45d55609dd | 3,696 | py | Python | accenv/lib/python3.4/site-packages/allauth/tests.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | 1 | 2016-03-20T18:32:23.000Z | 2016-03-20T18:32:23.000Z | accenv/lib/python3.4/site-packages/allauth/tests.py | adamshamsudeen/clubdin-dj | eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a | [
"MIT"
] | 9 | 2020-06-05T17:18:43.000Z | 2022-03-11T23:15:04.000Z | zubio/allauth/tests.py | tejesh0/Zubio.in | a0a71d2fafd21e97b5a5062215149a9756d46e0b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import requests
from datetime import datetime, date
import django
from django.test import TestCase
from django.db import models
from . import utils
class MockedResponse(object):
def __init__(self, status_code, content, headers=None):
if he... | 34.867925 | 111 | 0.599026 |
543a504ad70bd34f4a7d75ff4f2e3e5851ece810 | 12,212 | py | Python | sdk/python/pulumi_azure_native/apimanagement/v20210101preview/group_user.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20210101preview/group_user.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20210101preview/group_user.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 43.770609 | 1,422 | 0.652227 |
b7ef0cca3ee9653932531991936f930cacca4c4e | 7,154 | py | Python | datasets/dataload.py | LawrenceMMStewart/Optimal_Transport_MIT | a71a0110fa15110692fd383c1e77a6c347ef9ca3 | [
"MIT"
] | 3 | 2020-05-04T09:08:55.000Z | 2020-05-27T05:10:26.000Z | datasets/dataload.py | LawrenceMMStewart/Imputatations-with-Optimal-Transport | a71a0110fa15110692fd383c1e77a6c347ef9ca3 | [
"MIT"
] | null | null | null | datasets/dataload.py | LawrenceMMStewart/Imputatations-with-Optimal-Transport | a71a0110fa15110692fd383c1e77a6c347ef9ca3 | [
"MIT"
] | null | null | null | """
File: dataload
Description: Contains functions to load and preprocess datasets
Author Lawrence Stewart <lawrence.stewart@ens.fr>
License: Mit License
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import preprocessing
from sklearn.preprocessing import MinMaxScaler
from sk... | 27.836576 | 105 | 0.698071 |
3e35b892bda8d345f47d66a52e105fcc1007aa86 | 1,388 | py | Python | infra/libs-400rc2-20190512/examples/tsl2561_simpletest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | 1 | 2020-04-13T16:10:53.000Z | 2020-04-13T16:10:53.000Z | infra/libs-400rc2-20190512/examples/tsl2561_simpletest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | infra/libs-400rc2-20190512/examples/tsl2561_simpletest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | import board
import busio
import adafruit_tsl2561
# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)
# Create the TSL2561 instance, passing in the I2C bus
tsl = adafruit_tsl2561.TSL2561(i2c)
# Print chip info
print("Chip ID = {}".format(tsl.chip_id))
print("Enabled = {}".format(tsl.enabled))
pri... | 26.188679 | 73 | 0.690202 |
b88998695f7cfc15fd464d69c5fff87ca92cb1ed | 66,246 | py | Python | tests/test_tasks_irods.py | bihealth/sodar-taskflow | 0ec4e5a9ea9ee834ebaa3505ade6948cc7667cbc | [
"MIT"
] | null | null | null | tests/test_tasks_irods.py | bihealth/sodar-taskflow | 0ec4e5a9ea9ee834ebaa3505ade6948cc7667cbc | [
"MIT"
] | null | null | null | tests/test_tasks_irods.py | bihealth/sodar-taskflow | 0ec4e5a9ea9ee834ebaa3505ade6948cc7667cbc | [
"MIT"
] | null | null | null | """Tests for iRODS tasks"""
# TODO: Add tests for batch tasks
import uuid
# from irods.access import iRODSAccess
from irods.data_object import iRODSDataObject
from irods.collection import iRODSCollection
from irods.exception import (
CollectionDoesNotExist,
UserDoesNotExist,
UserGroupDoesNotExist,
# ... | 30.346312 | 81 | 0.590088 |
43304a52121447be30d94ff551bb4a0650f18295 | 2,642 | py | Python | bikeshed/shorthands/section.py | ylafon/bikeshed | 76158db7a7495b27c1942d9989aa137ddf2ccafc | [
"CC0-1.0"
] | 1 | 2021-11-11T05:59:00.000Z | 2021-11-11T05:59:00.000Z | bikeshed/shorthands/section.py | ylafon/bikeshed | 76158db7a7495b27c1942d9989aa137ddf2ccafc | [
"CC0-1.0"
] | 60 | 2021-01-10T04:22:46.000Z | 2022-03-30T02:15:04.000Z | bikeshed/shorthands/section.py | frivoal/bikeshed | 132fff3bd80d0059b5a2ac0cd4e3317db34dec12 | [
"CC0-1.0"
] | null | null | null | import re
from ..h import E, outerHTML
from . import steps
class SectionShorthand:
def __init__(self):
self.stage = "start"
self.escapedText = None
self.linkText = []
self.bsAutolink = ""
self.spec = None
self.section = None
self.justPage = None
def re... | 28.106383 | 84 | 0.507949 |
d1f386432fd77f18037f4aece06338468e8d01a6 | 3,099 | py | Python | Plotly/main.py | cppshizoidS/Python | dfde647ba4a6fb828ef9a564924416bebd875929 | [
"MIT"
] | 5 | 2022-03-12T02:44:41.000Z | 2022-03-24T10:33:28.000Z | Plotly/main.py | cppshizoidS/Python | dfde647ba4a6fb828ef9a564924416bebd875929 | [
"MIT"
] | 1 | 2022-03-16T09:19:21.000Z | 2022-03-16T09:19:21.000Z | Plotly/main.py | cppshizoidS/Python | dfde647ba4a6fb828ef9a564924416bebd875929 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import plotly.offline as py
import plotly.graph_objs as go
import json
py.init_notebook_mode(connected=False)
izip = zip
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/globe_contours.csv')
df.head()
contours = []
scl = ['rgb(213,62,79)', 'rgb(244,1... | 26.487179 | 103 | 0.561471 |
2eeb734dc2111558c295a32ec0fa97f6a74ab939 | 7,916 | py | Python | python-client/cloudera/director/v8/provider_metadata_api.py | daanknoope/director-sdk | a099fedd5afe365aedbb50daa75de048ef6f7ab4 | [
"Apache-2.0"
] | 24 | 2015-03-04T01:39:36.000Z | 2020-06-30T13:34:27.000Z | python-client/cloudera/director/v8/provider_metadata_api.py | daanknoope/director-sdk | a099fedd5afe365aedbb50daa75de048ef6f7ab4 | [
"Apache-2.0"
] | 5 | 2015-11-04T08:18:47.000Z | 2019-01-05T11:12:19.000Z | python-client/cloudera/director/v8/provider_metadata_api.py | daanknoope/director-sdk | a099fedd5afe365aedbb50daa75de048ef6f7ab4 | [
"Apache-2.0"
] | 26 | 2015-02-24T21:13:53.000Z | 2020-12-15T06:01:46.000Z | # coding: utf-8
"""
Licensed to Cloudera, Inc. under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. Cloudera, Inc. licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use thi... | 34.872247 | 109 | 0.611673 |
cc73e6214b93ff5f13fbbde826a6302ed6cae694 | 19,503 | py | Python | armi/physics/neutronics/settings.py | crswong888/armi | 4316eb7c9cda213a69d4a2c302c0812ae7e4d96e | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/settings.py | crswong888/armi | 4316eb7c9cda213a69d4a2c302c0812ae7e4d96e | [
"Apache-2.0"
] | null | null | null | armi/physics/neutronics/settings.py | crswong888/armi | 4316eb7c9cda213a69d4a2c302c0812ae7e4d96e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, 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 to in writi... | 32.888702 | 226 | 0.615239 |
c98912af878625858e7e9260404eec2eb8a31251 | 1,573 | py | Python | finished/phase-1-final.py | joshdabosh/autopack | e8617e1ddce77bea212fe46443187824d438efb9 | [
"MIT"
] | null | null | null | finished/phase-1-final.py | joshdabosh/autopack | e8617e1ddce77bea212fe46443187824d438efb9 | [
"MIT"
] | 1 | 2019-02-19T01:17:40.000Z | 2019-07-18T14:19:25.000Z | finished/phase-1-final.py | joshdabosh/autopack | e8617e1ddce77bea212fe46443187824d438efb9 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import movements
import time
import curses
robot = movements.robot()
def move(char):
if char == curses.KEY_UP:
screen.addstr(0,0, 'up ')
robot.forward()
elif char == curses.KEY_DOWN:
screen.addstr(0,0,'down ')
robot.backward()
elif char == curses... | 22.471429 | 64 | 0.639542 |
ca0964303cc59b1bf940e6a8f13f5e40b9a59ce0 | 7,584 | py | Python | TWLight/resources/management/commands/resources_example_data.py | Chinmay-Gurjar/TWLight | 94ff6e1bf0a8dd851e569c592608871de2ad3089 | [
"MIT"
] | null | null | null | TWLight/resources/management/commands/resources_example_data.py | Chinmay-Gurjar/TWLight | 94ff6e1bf0a8dd851e569c592608871de2ad3089 | [
"MIT"
] | null | null | null | TWLight/resources/management/commands/resources_example_data.py | Chinmay-Gurjar/TWLight | 94ff6e1bf0a8dd851e569c592608871de2ad3089 | [
"MIT"
] | null | null | null | import copy
from django_countries import countries
from faker import Faker
import random
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from TWLight.resources.factories import PartnerFactory, StreamFactory, VideoFactory, SuggestionFactory
from TW... | 43.83815 | 103 | 0.605749 |
6565643f990b6d077cad5ef0711771aae1ec535b | 1,029 | py | Python | leetcode/19_remove_nth_node_from_end_of_list/remove_nth_node_from_end_of_list_test.py | codewithrichard/code-samples | fa9bfe7937b4a75188445da4fec3e58ed7957cd3 | [
"MIT"
] | null | null | null | leetcode/19_remove_nth_node_from_end_of_list/remove_nth_node_from_end_of_list_test.py | codewithrichard/code-samples | fa9bfe7937b4a75188445da4fec3e58ed7957cd3 | [
"MIT"
] | null | null | null | leetcode/19_remove_nth_node_from_end_of_list/remove_nth_node_from_end_of_list_test.py | codewithrichard/code-samples | fa9bfe7937b4a75188445da4fec3e58ed7957cd3 | [
"MIT"
] | null | null | null | import unittest
from ddt import ddt, data, unpack
from typing import List
from remove_nth_node_from_end_of_list import Solution, ListNode
@ddt
class Tester(unittest.TestCase):
def setUp(self):
self.s = Solution()
@data(
[[1,2,3,4,5], 1, [1,2,3,4]],
[[1,2,3,4,5], 2, [1,2,3,5]],
... | 26.384615 | 65 | 0.510204 |
f43abcebb5510db9bbc3320ed806ac58ac782949 | 13,588 | py | Python | Real UR5e/real_UR5_gym_v1.py | wq13552463699/UCD_UR5E | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | 5 | 2021-11-02T10:48:54.000Z | 2022-01-10T12:32:51.000Z | Real UR5e/real_UR5_gym_v1.py | wq13552463699/UR5E_robot_gym_env_Real_and_Sim | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | null | null | null | Real UR5e/real_UR5_gym_v1.py | wq13552463699/UR5E_robot_gym_env_Real_and_Sim | 513acb7e235ab940fd03c3038208678e285690f3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 21 16:51:15 2021
@author: 14488
"""
#需要调试:
# 1. ur5_safebox
# 2. UR5_global_position
# 3. Init joint pos
import gym
from gym import spaces
import numpy as np
from math import pi,sqrt
from copy import copy
from gym.utils import seeding
import urx
from IntelRealSense imp... | 38.061625 | 173 | 0.581837 |
401bb2088924072c2b894176aa958fec8ee8eca6 | 505 | py | Python | datasets/RTFM/get_env.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | 7 | 2022-03-03T12:10:46.000Z | 2022-03-08T18:14:40.000Z | datasets/RTFM/get_env.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | datasets/RTFM/get_env.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | 1 | 2022-03-07T08:18:42.000Z | 2022-03-07T08:18:42.000Z | import gym
from rtfm import featurizer as X
import rtfm.tasks
def create_env(env="rtfm:groups_simple_stationary-v0", height=6, width=6, partially_observable=False, max_placement=1, featurizer=None, shuffle_wiki=False, time_penalty=-0.02):
f = featurizer or X.Concat([X.Text(), X.ValidMoves()])
env = gym.make(en... | 63.125 | 191 | 0.790099 |
0c3de14b77d1663b2e2f3411e443fe56b86f8afd | 1,023 | py | Python | account/urls.py | amirbigg/django-social-network | 25013101a253b5b7ab807ba8061db0e054ebc901 | [
"MIT"
] | 4 | 2022-01-19T18:22:16.000Z | 2022-02-07T13:43:38.000Z | account/urls.py | amirbigg/django-social-network | 25013101a253b5b7ab807ba8061db0e054ebc901 | [
"MIT"
] | null | null | null | account/urls.py | amirbigg/django-social-network | 25013101a253b5b7ab807ba8061db0e054ebc901 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'account'
urlpatterns = [
path('register/', views.UserRegisterView.as_view(), name='user_register'),
path('login/', views.UserLoginView.as_view(), name='user_login'),
path('logout/', views.UserLogoutView.as_view(), name='user_logout'),
path('profile/<int... | 56.833333 | 112 | 0.753666 |
7be595b38baa7330eb6ad2034f3a25c2bad97601 | 94,262 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/Crypto/Util/number.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/Crypto/Util/number.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/Crypto/Util/number.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | #
# number.py : Number-theoretic functions
#
# Part of the Python Cryptography Toolkit
#
# Written by Andrew M. Kuchling, Barry A. Warsaw, and others
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedicati... | 65.779484 | 159 | 0.612166 |
57d1ddf528279c8b0a81610eb6a84f37270a0bd2 | 1,017 | py | Python | src/13-disproportional.py | scorphus/PythonChallengeSolutions | a4bc2b08031a416c4a077dd542a1701ef4777c90 | [
"BSD-3-Clause"
] | 6 | 2018-09-08T01:54:30.000Z | 2022-01-27T17:23:14.000Z | src/13-disproportional.py | scorphus/PythonChallenge | a4bc2b08031a416c4a077dd542a1701ef4777c90 | [
"BSD-3-Clause"
] | 2 | 2020-11-19T12:10:52.000Z | 2020-11-19T13:16:44.000Z | src/13-disproportional.py | scorphus/PythonChallengeSolutions | a4bc2b08031a416c4a077dd542a1701ef4777c90 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Python Challenge Solutions
# https://github.com/scorphus/PythonChallengeSolutions
# Licensed under the BSD-3-Clause license:
# https://opensource.org/licenses/BSD-3-Clause
# Copyright (c) 2018-2020, Pablo S. Blum de Aguiar <scorphus@gmail.com>
# ht... | 27.486486 | 74 | 0.735497 |
fe88d431dca9ceb15bc21f689b8e41e382a04a3c | 7,502 | py | Python | tensorflow/contrib/distribute/python/mirrored_strategy.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 9 | 2019-12-29T01:47:37.000Z | 2021-12-21T13:47:41.000Z | tensorflow/contrib/distribute/python/mirrored_strategy.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 1 | 2019-06-18T07:56:15.000Z | 2019-06-18T07:56:15.000Z | tensorflow/contrib/distribute/python/mirrored_strategy.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 5 | 2020-12-22T10:17:47.000Z | 2021-05-06T14:14:52.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.390533 | 87 | 0.726073 |
134791cd28f18fdbe3b81bae2297ce4e81943e96 | 1,681 | py | Python | code/filehandler.py | audreymgu/tune-alexnet | 783d68bcc03f8443167a7c62259cc7d8546f868a | [
"BSD-3-Clause"
] | 1 | 2017-12-10T05:01:10.000Z | 2017-12-10T05:01:10.000Z | code/filehandler.py | georgezgu/tune-alexnet | 783d68bcc03f8443167a7c62259cc7d8546f868a | [
"BSD-3-Clause"
] | null | null | null | code/filehandler.py | georgezgu/tune-alexnet | 783d68bcc03f8443167a7c62259cc7d8546f868a | [
"BSD-3-Clause"
] | null | null | null | import os
def list_files(dir):
r = []
i = 0
dir_list = [x[0] for x in os.walk(dir)]
dir_list = sorted(dir_list, key=str.lower)
dir_list.pop(0)
for subdir in dir_list:
folder_list = []
files = os.walk(subdir).next()[2]
... | 26.265625 | 114 | 0.549673 |
b7b54ca2c73d9ff04e66e77700c5c11fb2ee30b2 | 393 | py | Python | src/agrolink/wsgi.py | BuildForSDG/team-224-BE | e42927fcde9e789365ee32e9198e93bde5258c3f | [
"MIT"
] | null | null | null | src/agrolink/wsgi.py | BuildForSDG/team-224-BE | e42927fcde9e789365ee32e9198e93bde5258c3f | [
"MIT"
] | 10 | 2020-05-24T23:44:44.000Z | 2021-09-22T19:04:56.000Z | src/agrolink/wsgi.py | BuildForSDG/AgroLink-api | e42927fcde9e789365ee32e9198e93bde5258c3f | [
"MIT"
] | 1 | 2020-05-01T22:06:16.000Z | 2020-05-01T22:06:16.000Z | """
WSGI config for agrolink project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
c87f78698116a0ded15264d9e89781326f589170 | 825 | py | Python | test/Continuous_GridWorld/env_test.py | Rowing0914/TF_RL | 68e5e9a23e38ed2d8ac5f97d380567b919a3d2e7 | [
"MIT"
] | 23 | 2019-04-04T17:34:56.000Z | 2021-12-14T19:34:10.000Z | test/Continuous_GridWorld/env_test.py | Rowing0914/TF_RL | 68e5e9a23e38ed2d8ac5f97d380567b919a3d2e7 | [
"MIT"
] | 5 | 2020-11-13T17:40:40.000Z | 2022-03-12T00:11:33.000Z | test/Continuous_GridWorld/env_test.py | Rowing0914/TF_RL | 68e5e9a23e38ed2d8ac5f97d380567b919a3d2e7 | [
"MIT"
] | 3 | 2019-07-17T23:56:36.000Z | 2022-03-13T03:55:21.000Z | import numpy as np
from tf_rl.env.continuous_gridworld.env import GridWorld
dense_goals = [(13.0, 8.0), (18.0, 11.0), (20.0, 15.0), (22.0, 19.0)]
env = GridWorld(max_episode_len=500, num_rooms=1, action_limit_max=1.0, silent_mode=True,
start_position=(8.0, 8.0), goal_position=(22.0, 22.0), goal_reward=... | 35.869565 | 90 | 0.643636 |
b7c32be2e67e2f5d3561c56625bea8414d41c19b | 2,357 | py | Python | aliyun-python-sdk-dbs/aliyunsdkdbs/request/v20190306/DescribeBackupSetDownloadTaskListRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-dbs/aliyunsdkdbs/request/v20190306/DescribeBackupSetDownloadTaskListRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-dbs/aliyunsdkdbs/request/v20190306/DescribeBackupSetDownloadTaskListRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.179104 | 91 | 0.773017 |
3952c6b97a3992badc80a666929e930f3fa2463b | 1,069 | py | Python | web_tables.py | xCodeR01/selenium_testing | 9ec56db55714cc8392e43cfbbfaceee8b257ca8d | [
"MIT"
] | null | null | null | web_tables.py | xCodeR01/selenium_testing | 9ec56db55714cc8392e43cfbbfaceee8b257ca8d | [
"MIT"
] | null | null | null | web_tables.py | xCodeR01/selenium_testing | 9ec56db55714cc8392e43cfbbfaceee8b257ca8d | [
"MIT"
] | null | null | null | import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
# creating chromium driver with custom options
op = webdriver.ChromeOptions()
op.binary_location = "chrome-win\\chrome.exe"
# op.add_argument("--headless")
driver = webdriver.Chrome(
... | 34.483871 | 81 | 0.704397 |
a4fb1144cd23f799f7aef0bc232f52ce56861fa4 | 25,604 | py | Python | Bio/SeqIO/UniprotIO.py | crigg/Biopython | 0008a0dd3b9f482de15704001bb79623c5baed0a | [
"BSD-3-Clause"
] | null | null | null | Bio/SeqIO/UniprotIO.py | crigg/Biopython | 0008a0dd3b9f482de15704001bb79623c5baed0a | [
"BSD-3-Clause"
] | null | null | null | Bio/SeqIO/UniprotIO.py | crigg/Biopython | 0008a0dd3b9f482de15704001bb79623c5baed0a | [
"BSD-3-Clause"
] | 1 | 2021-04-16T09:48:23.000Z | 2021-04-16T09:48:23.000Z | # Copyright 2010 by Andrea Pierleoni
# Revisions copyright 2010, 2016 by Peter Cock
# All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.SeqIO support for the "uniprot-xml"... | 48.309434 | 180 | 0.526285 |
059dfcf3828653a6d41c3b82b46acbabed08a189 | 13,899 | py | Python | pyscf/prop/nmr/rhf.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 1 | 2021-01-24T13:35:42.000Z | 2021-01-24T13:35:42.000Z | pyscf/prop/nmr/rhf.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/prop/nmr/rhf.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 35.27665 | 98 | 0.600403 |
5fcfba7f98997fe1b528d596cd633a2e32dd055e | 1,186 | py | Python | b_subfinder.py | Re13orn/projectfinder | 334bde415c53a706cb4801d66f208b81d028f553 | [
"MIT"
] | null | null | null | b_subfinder.py | Re13orn/projectfinder | 334bde415c53a706cb4801d66f208b81d028f553 | [
"MIT"
] | null | null | null | b_subfinder.py | Re13orn/projectfinder | 334bde415c53a706cb4801d66f208b81d028f553 | [
"MIT"
] | null | null | null | import time
import os
import sqlite3
def get_domain_fromdb():
domains = []
conn = sqlite3.connect('data/main.db')
c = conn.cursor()
flag = c.execute("SELECT domain from INIT_TABLE where SUBFLAGSCAN=0")
for row in flag:
print(row[0])
domains.append(row[0])
conn.close()
retu... | 24.708333 | 78 | 0.65683 |
49bc63cf0323c4e4a5092a746147f02656a8341d | 3,006 | py | Python | sktime/classification/kernel_based/tests/test_rocket_classifier.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | 1 | 2021-09-08T14:24:52.000Z | 2021-09-08T14:24:52.000Z | sktime/classification/kernel_based/tests/test_rocket_classifier.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | sktime/classification/kernel_based/tests/test_rocket_classifier.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""RocketClassifier test code."""
import numpy as np
from numpy import testing
from sktime.classification.kernel_based import RocketClassifier
from sktime.datasets import load_basic_motions, load_unit_test
def test_rocket_on_unit_test_data():
"""Test of RocketClassifier on unit test data.... | 20.04 | 85 | 0.424484 |
83f767821d9af57e2b8a3561ff4fd56667f55c54 | 15,618 | py | Python | tests/cupy_tests/test_cudnn.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | 1 | 2020-03-30T20:56:52.000Z | 2020-03-30T20:56:52.000Z | tests/cupy_tests/test_cudnn.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | null | null | null | tests/cupy_tests/test_cudnn.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | null | null | null | import unittest
import numpy
import cupy
try:
import cupy.cuda.cudnn as libcudnn
cudnn_enabled = True
modes = [
libcudnn.CUDNN_ACTIVATION_SIGMOID,
libcudnn.CUDNN_ACTIVATION_RELU,
libcudnn.CUDNN_ACTIVATION_TANH,
]
coef_modes = [
libcudnn.CUDNN_ACTIVATION_CLIPPED_REL... | 35.903448 | 79 | 0.601742 |
45443026a3e740e341e80c44341e75b3bbab1dae | 707 | py | Python | tests/properties/tests.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2015-09-26T13:33:07.000Z | 2020-03-08T07:34:38.000Z | tests/properties/tests.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2021-03-24T12:21:05.000Z | 2021-03-24T12:31:52.000Z | tests/properties/tests.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 15 | 2016-01-08T14:28:41.000Z | 2019-04-19T08:33:31.000Z | from __future__ import unicode_literals
from django.test import TestCase
from .models import Person
class PropertyTests(TestCase):
def setUp(self):
self.a = Person(first_name='John', last_name='Lennon')
self.a.save()
def test_getter(self):
self.assertEqual(self.a.full_name, 'John L... | 28.28 | 89 | 0.671853 |
ef94eae70cb6971dbe6bd77f397d304963dbb7ec | 404 | py | Python | script.py | thomastaylor1/NoveltySearch | 297cdaf3866d8f66294f624c4218a8b40e8b00e9 | [
"MIT"
] | null | null | null | script.py | thomastaylor1/NoveltySearch | 297cdaf3866d8f66294f624c4218a8b40e8b00e9 | [
"MIT"
] | null | null | null | script.py | thomastaylor1/NoveltySearch | 297cdaf3866d8f66294f624c4218a8b40e8b00e9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
filename = "medium_maze.txtrecord.dat"
lines = [line.rstrip('\n').split() for line in open(filename)]
fitness_max = [k[-2] for k in lines]
indiv = [k[-1] for k in lines]
plt.plot(np.arange(len(indiv), step=1000), fitness_max[0:len(indiv):1000... | 25.25 | 74 | 0.680693 |
7438aaaa15a1396ff8a6e8ad3257ca3a3d1d9d85 | 13,966 | py | Python | head/metrics.py | vladgaus/face.evoLVe.PyTorch | a91d51976961f32a615db91f72c26b6f4ae7b60d | [
"MIT"
] | 3 | 2019-02-23T18:31:15.000Z | 2021-11-08T09:31:50.000Z | head/metrics.py | ashishpatel26/face.evoLVe.PyTorch | a91d51976961f32a615db91f72c26b6f4ae7b60d | [
"MIT"
] | null | null | null | head/metrics.py | ashishpatel26/face.evoLVe.PyTorch | a91d51976961f32a615db91f72c26b6f4ae7b60d | [
"MIT"
] | 1 | 2020-03-16T06:44:36.000Z | 2020-03-16T06:44:36.000Z | from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Parameter
import math
# Support: ['Softmax', 'ArcFace', 'CosFace', 'SphereFace', 'Am_softmax']
class Softmax(nn.Module):
r"""Implement of Softm... | 44.056782 | 134 | 0.550623 |
8b80379604ab3fc142da5b9ca47134f140f2eb3d | 9,372 | py | Python | tests/test_data/test_pipelines/test_indoor_sample.py | xiaobaishu0097/mmdetection3d | f7e6166d3285287a8258df3a46ea9c98f54ad1ce | [
"Apache-2.0"
] | 3 | 2021-08-06T05:35:21.000Z | 2021-11-09T03:30:41.000Z | tests/test_data/test_pipelines/test_indoor_sample.py | xiaobaishu0097/mmdetection3d | f7e6166d3285287a8258df3a46ea9c98f54ad1ce | [
"Apache-2.0"
] | null | null | null | tests/test_data/test_pipelines/test_indoor_sample.py | xiaobaishu0097/mmdetection3d | f7e6166d3285287a8258df3a46ea9c98f54ad1ce | [
"Apache-2.0"
] | null | null | null | import numpy as np
from mmdet3d.core.points import DepthPoints
from mmdet3d.datasets.pipelines import (IndoorPatchPointSample,
IndoorPointSample,
PointSegClassMapping)
def test_indoor_sample():
np.random.seed(0)
scannet_sample_po... | 47.095477 | 78 | 0.652369 |
b52c22eab93e3b48201939a7ed7dc31736512594 | 1,259 | py | Python | app_functions.py | Ryu-J/GUI_Theme | 30c13180a4cc025be5099df73b72f182558cf499 | [
"MIT"
] | null | null | null | app_functions.py | Ryu-J/GUI_Theme | 30c13180a4cc025be5099df73b72f182558cf499 | [
"MIT"
] | null | null | null | app_functions.py | Ryu-J/GUI_Theme | 30c13180a4cc025be5099df73b72f182558cf499 | [
"MIT"
] | null | null | null | ################################################################################
##
## BY: WANDERSON M.PIMENTA
## PROJECT MADE WITH: Qt Designer and PySide2
## V: 1.0.0
##
## This project can be used freely for all uses, as long as they maintain the
## respective credits only in the Python scripts, any information in t... | 30.707317 | 80 | 0.555997 |
0193fd184e0f1869e62733a1b64db2af167ffdec | 611 | py | Python | app/migrations/0006_auto_20210325_1411.py | HarshKumarChoudary/EasyShop-Website | a10c1093da41a526c9513d90c38e49592284ef19 | [
"MIT"
] | 1 | 2021-04-02T04:23:06.000Z | 2021-04-02T04:23:06.000Z | app/migrations/0006_auto_20210325_1411.py | HarshKumarChoudary/EasyShop-Website | a10c1093da41a526c9513d90c38e49592284ef19 | [
"MIT"
] | 3 | 2021-06-29T04:00:38.000Z | 2022-03-19T09:42:26.000Z | app/migrations/0006_auto_20210325_1411.py | HarshKumarChoudary/EasyShop-Website | a10c1093da41a526c9513d90c38e49592284ef19 | [
"MIT"
] | 1 | 2021-10-07T06:29:35.000Z | 2021-10-07T06:29:35.000Z | # Generated by Django 3.1.5 on 2021-03-25 08:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0005_auto_20210325_1406'),
]
operations = [
migrations.AlterField(
model_name='category',
name=... | 32.157895 | 262 | 0.592471 |
7d07d3159340eb09b12714276afff08636e51ee4 | 6,684 | py | Python | script.module.uncoded/lib/resources/lib/sources/pl/cdahd.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:38:10.000Z | 2019-03-05T09:38:10.000Z | script.module.uncoded/lib/resources/lib/sources/pl/cdahd.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | script.module.uncoded/lib/resources/lib/sources/pl/cdahd.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | # -*- coding: utf-8 -*-
'''
Covenant Add-on
Copyright (C) 2017 homik
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any ... | 38.194286 | 151 | 0.557151 |
bb99e0a030b151c9513f273a839a97bacf8d1dd5 | 29,389 | py | Python | rex_gym/envs/rex_gym_env.py | y-prudent/rex-gym | e4d15a022231c9f546effb0e774bb3cd08b841b5 | [
"Apache-2.0"
] | null | null | null | rex_gym/envs/rex_gym_env.py | y-prudent/rex-gym | e4d15a022231c9f546effb0e774bb3cd08b841b5 | [
"Apache-2.0"
] | null | null | null | rex_gym/envs/rex_gym_env.py | y-prudent/rex-gym | e4d15a022231c9f546effb0e774bb3cd08b841b5 | [
"Apache-2.0"
] | null | null | null | """This file implements the gym environment of Rex.
"""
import collections
import math
import time
import gym
import numpy as np
import pybullet
import pybullet_data
from gym import spaces
from gym.utils import seeding
from ..model import rex, motor, mark_constants, rex_constants
from ..model.terrain import Terrain
... | 44.39426 | 121 | 0.637279 |
b7b6605fdadf911cc4afa9c0760ba31191a28e87 | 3,552 | py | Python | machine/clients/slack.py | arusahni/slack-machine | 325c97ad8066a5d63cbf7b03c87fd0a10e8ae756 | [
"MIT"
] | 111 | 2017-09-19T21:12:20.000Z | 2021-12-14T02:30:35.000Z | machine/clients/slack.py | arusahni/slack-machine | 325c97ad8066a5d63cbf7b03c87fd0a10e8ae756 | [
"MIT"
] | 480 | 2017-09-17T21:47:46.000Z | 2022-03-31T17:07:04.000Z | machine/clients/slack.py | arusahni/slack-machine | 325c97ad8066a5d63cbf7b03c87fd0a10e8ae756 | [
"MIT"
] | 41 | 2017-11-14T22:07:44.000Z | 2022-03-13T21:29:51.000Z | import logging
from datetime import datetime
from typing import Dict, Union
from machine.clients.singletons.scheduling import Scheduler
from machine.models import User
from machine.models.channel import Channel
from machine.clients.singletons.slack import LowLevelSlackClient
from slack.web.classes import extract_json... | 36.618557 | 98 | 0.617117 |
391e615377663fbb98e4c64aea05ef4376ecabd2 | 937 | py | Python | iris_check.py | redashu/adhoc_ML_june4th11 | 75b1f3412a06f33d7973f2b92e306cbdd04f87ed | [
"Apache-2.0"
] | 2 | 2018-06-21T08:53:59.000Z | 2018-06-23T06:46:08.000Z | iris_check.py | redashu/adhoc_ML_june4th11 | 75b1f3412a06f33d7973f2b92e306cbdd04f87ed | [
"Apache-2.0"
] | null | null | null | iris_check.py | redashu/adhoc_ML_june4th11 | 75b1f3412a06f33d7973f2b92e306cbdd04f87ed | [
"Apache-2.0"
] | 14 | 2018-06-26T07:34:41.000Z | 2019-09-04T17:22:25.000Z | #!/usr/bin/env python3
from sklearn.datasets import load_iris
from sklearn import tree
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
# loading iris data
iris=load_iris()
# NOW SPLITING
train_iris,test_iris,train_target,test_target=train_test_split(iris.d... | 26.771429 | 150 | 0.800427 |
4ad14cb8be99380810f1bc4588d26eaf4c51a8ae | 4,163 | py | Python | data/genome/create_splits.py | ardapekis/bottom-up-attention | c88401058b36b1bf6fdf6426eb4fa987d519d680 | [
"MIT"
] | 1,311 | 2017-08-14T20:57:36.000Z | 2022-03-31T03:54:41.000Z | data/genome/create_splits.py | ardapekis/bottom-up-attention | c88401058b36b1bf6fdf6426eb4fa987d519d680 | [
"MIT"
] | 109 | 2017-08-23T14:50:07.000Z | 2022-02-28T17:14:56.000Z | data/genome/create_splits.py | idejie/bottom-up-attention-colab | 40064548c0f3017fe971a356b81d1a9fcbb4c7fe | [
"MIT"
] | 391 | 2017-08-19T16:36:59.000Z | 2022-03-24T08:37:37.000Z | #!/usr/bin/python
''' Determine visual genome data splits to avoid contamination of COCO splits.'''
import argparse
import os
import random
from random import shuffle
import shutil
import subprocess
import sys
import json
random.seed(10) # Make dataset splits repeatable
CURDIR = os.path.dirname(os.path.realpath(__... | 30.837037 | 120 | 0.680759 |
06f56f6b4acdf216d0bbc7f0005df08f73b48543 | 16,897 | py | Python | psutils/argumentpasser.py | ehusby/pyscript-utils | 8483037a0836c7292e906e5572eb85e2623ed245 | [
"MIT"
] | 1 | 2022-02-22T01:39:43.000Z | 2022-02-22T01:39:43.000Z | psutils/argumentpasser.py | ehusby/pyscript-utils | 8483037a0836c7292e906e5572eb85e2623ed245 | [
"MIT"
] | null | null | null | psutils/argumentpasser.py | ehusby/pyscript-utils | 8483037a0836c7292e906e5572eb85e2623ed245 | [
"MIT"
] | null | null | null |
import argparse
import copy
import os
import sys
import psutils.custom_errors as cerr
from psutils.scheduler import SCHED_PBS, SCHED_SLURM
class RawTextArgumentDefaultsHelpFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawTextHelpFormatter): pass
class CustomArgumentParser(argparse.ArgumentParser):
... | 44.232984 | 136 | 0.557732 |
00b4e2b27d8bc33114de51cbd69761c8566b59a5 | 3,511 | py | Python | bindings/python/ensmallen/datasets/string/actinoplanesphilippinensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/actinoplanesphilippinensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/actinoplanesphilippinensis.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Actinoplanes philippinensis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--pr... | 33.438095 | 223 | 0.681287 |
3ce5039e9d4ead8c7adbab9664275e23e56380e3 | 3,730 | py | Python | pygluu/kubernetes/terminal/google.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-18T14:51:41.000Z | 2022-03-31T19:59:40.000Z | pygluu/kubernetes/terminal/google.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 236 | 2020-04-22T08:59:27.000Z | 2022-03-31T07:21:12.000Z | pygluu/kubernetes/terminal/google.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-19T15:25:59.000Z | 2022-03-16T17:17:36.000Z | """
pygluu.kubernetes.terminal.google
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains helpers to interact with user's inputs for spanner terminal prompts.
License terms and conditions for Gluu Cloud Native Edition:
https://www.apache.org/licenses/LICENSE-2.0
"""
import click
from pathlib import Path
import bas... | 50.405405 | 118 | 0.56622 |
cb713f7e73d3b2d5d8c8f29771d2255c21cd4ce9 | 4,952 | py | Python | gaphor/application.py | seryafarma/gaphor | f85998ae3a3ec5381b25cda60d89a47383c4fd2e | [
"Apache-2.0"
] | null | null | null | gaphor/application.py | seryafarma/gaphor | f85998ae3a3ec5381b25cda60d89a47383c4fd2e | [
"Apache-2.0"
] | null | null | null | gaphor/application.py | seryafarma/gaphor | f85998ae3a3ec5381b25cda60d89a47383c4fd2e | [
"Apache-2.0"
] | null | null | null | """
The Application object. One application should be available.
An application can host multiple sessions. From a user point of
view a session is represented as a window in which a diagram
can be edited.
"""
from __future__ import annotations
import logging
from typing import Dict, Iterator, Optional, Set, Tuple, T... | 30.012121 | 88 | 0.670436 |
d16851c70677a6241c96a27e4e64cf737504aba0 | 3,022 | py | Python | 08_projects/modeldeploy/test/test.py | aws-samples/amazon-sagemaker-build-train-deploy | 2c6433724286a7d2900af7d7558530dc34f11bbb | [
"Apache-2.0"
] | 80 | 2020-09-16T13:29:43.000Z | 2022-03-28T10:13:52.000Z | 08_projects/modeldeploy/test/test.py | aws-samples/amazon-sagemaker-build-train-deploy | 2c6433724286a7d2900af7d7558530dc34f11bbb | [
"Apache-2.0"
] | 1 | 2021-07-05T08:07:51.000Z | 2021-07-05T08:07:51.000Z | 08_projects/modeldeploy/test/test.py | aws-samples/amazon-sagemaker-build-train-deploy | 2c6433724286a7d2900af7d7558530dc34f11bbb | [
"Apache-2.0"
] | 17 | 2020-12-06T12:40:01.000Z | 2022-03-21T07:23:51.000Z | import argparse
import json
import logging
import os
import boto3
from botocore.exceptions import ClientError
logger = logging.getLogger(__name__)
sm_client = boto3.client("sagemaker")
sm_runtime_client = boto3.client("sagemaker-runtime")
def invoke_endpoint(endpoint_name):
logger.info("Executing test infe... | 35.139535 | 100 | 0.69325 |
17a938d45fe884a305abfc0da92242d7e14d0dc7 | 6,559 | py | Python | custom_components/komfovent_c5/services.py | siku2/hass-komfovent-c5 | 9290af9f925fd6c917772aa96af8bff2a4e44e6b | [
"MIT"
] | null | null | null | custom_components/komfovent_c5/services.py | siku2/hass-komfovent-c5 | 9290af9f925fd6c917772aa96af8bff2a4e44e6b | [
"MIT"
] | 2 | 2022-03-08T05:10:56.000Z | 2022-03-13T14:30:27.000Z | custom_components/komfovent_c5/services.py | siku2/hass-komfovent-c5 | 9290af9f925fd6c917772aa96af8bff2a4e44e6b | [
"MIT"
] | null | null | null | import functools
import logging
from typing import TYPE_CHECKING, Iterable, Iterator, Optional, Tuple
import voluptuous as vol
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import device_registry
from .api import Modes, O... | 35.454054 | 87 | 0.687757 |
10c5fd8ae11868186dc7809308539f014c8b4776 | 2,212 | py | Python | PyPortal_Thingiverse/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | PyPortal_Thingiverse/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | PyPortal_Thingiverse/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2019 Limor Fried for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import random
import board
import adafruit_pyportal
# Get wifi details and more from a settings.py file
try:
from secrets import secrets
except ImportError:
print("WiFi secrets are kept in secrets.p... | 38.807018 | 95 | 0.624774 |
83f603c63e481ea559eeeb267c5c708df3e54993 | 948 | py | Python | test/ext/mypy/files/type_decorator.py | bmacphee/sqlalchemy | c4fb058cae423e04e7131005c55c8826abda68e2 | [
"MIT"
] | null | null | null | test/ext/mypy/files/type_decorator.py | bmacphee/sqlalchemy | c4fb058cae423e04e7131005c55c8826abda68e2 | [
"MIT"
] | null | null | null | test/ext/mypy/files/type_decorator.py | bmacphee/sqlalchemy | c4fb058cae423e04e7131005c55c8826abda68e2 | [
"MIT"
] | null | null | null | from typing import Any
from typing import Optional
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import TypeDecorator
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class IntToStr(TypeDecorator[int]):
impl = String
... | 20.608696 | 57 | 0.67616 |
d45d6dcd9879c79265c349c411980de67f36287a | 14,724 | py | Python | platformio/commands/project.py | Stevenumeh/platformio-core | 8a98e4bcabbbf11301e683fa32f96149300a30b9 | [
"Apache-2.0"
] | 4,744 | 2016-11-28T14:37:47.000Z | 2022-03-31T12:35:56.000Z | platformio/commands/project.py | Stevenumeh/platformio-core | 8a98e4bcabbbf11301e683fa32f96149300a30b9 | [
"Apache-2.0"
] | 3,424 | 2016-11-27T22:45:41.000Z | 2022-03-31T21:40:03.000Z | platformio/commands/project.py | Stevenumeh/platformio-core | 8a98e4bcabbbf11301e683fa32f96149300a30b9 | [
"Apache-2.0"
] | 576 | 2016-12-01T18:48:22.000Z | 2022-03-30T02:27:35.000Z | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.732759 | 119 | 0.64765 |
5fb5d5f1c1886ca2d14bede16f1cbc9c6a86dab6 | 490 | py | Python | fast_autocomplete/__init__.py | insilications/fast-autocomplete-clr | 466def9a8ce3b94bf8ecb3daee9ec1e795a6598e | [
"MIT"
] | 106 | 2020-06-21T00:40:03.000Z | 2022-03-31T15:12:24.000Z | fast_autocomplete/__init__.py | insilications/fast-autocomplete-clr | 466def9a8ce3b94bf8ecb3daee9ec1e795a6598e | [
"MIT"
] | 21 | 2020-06-17T16:52:32.000Z | 2022-02-11T11:37:00.000Z | fast_autocomplete/__init__.py | insilications/fast-autocomplete-clr | 466def9a8ce3b94bf8ecb3daee9ec1e795a6598e | [
"MIT"
] | 20 | 2020-07-28T20:48:26.000Z | 2022-03-19T23:04:54.000Z | # flake8: noqa
import sys
import pkg_resources
if (sys.version_info[0], sys.version_info[1]) < (3, 6):
sys.exit('fast-autocomplete requires Python 3.6 or later.')
__version__ = pkg_resources.get_distribution("fast-autocomplete").version
from fast_autocomplete.dwg import AutoComplete
from fast_autocomplete.draw i... | 32.666667 | 73 | 0.82449 |
db60e0e5130fc81c2a822c58bc4de701d1d4ebd9 | 15,865 | py | Python | tests/test_views.py | Bernardvdv/djangocms-references | 0293403f3ade2d7bbd6e09f8ff24f9f35a083c6c | [
"BSD-3-Clause"
] | null | null | null | tests/test_views.py | Bernardvdv/djangocms-references | 0293403f3ade2d7bbd6e09f8ff24f9f35a083c6c | [
"BSD-3-Clause"
] | null | null | null | tests/test_views.py | Bernardvdv/djangocms-references | 0293403f3ade2d7bbd6e09f8ff24f9f35a083c6c | [
"BSD-3-Clause"
] | null | null | null | from unittest.mock import patch
from django.conf.urls import include
from django.contrib import admin
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import reverse
from django.test import RequestFactory
from django.test.utils import ov... | 39.269802 | 87 | 0.673873 |
d161cc11f63688f04124c906e6a1bd69fc435947 | 2,215 | py | Python | ros2interface/test/test_cli.py | ruffsl/ros2cli | 09b30da15ac9babea30d2c253939c9c45d7f68b7 | [
"Apache-2.0"
] | null | null | null | ros2interface/test/test_cli.py | ruffsl/ros2cli | 09b30da15ac9babea30d2c253939c9c45d7f68b7 | [
"Apache-2.0"
] | 1 | 2019-07-12T02:26:04.000Z | 2019-07-12T02:26:04.000Z | ros2interface/test/test_cli.py | ruffsl/ros2cli | 09b30da15ac9babea30d2c253939c9c45d7f68b7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 41.018519 | 86 | 0.688939 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.