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
fb477a967e80cf718f3ed771f6882921dbc6a434
278
py
Python
model/login.py
ElenaUS/automation
9f1b948590dae5fcc1a2ad247961e92b99d7a88d
[ "Apache-2.0" ]
null
null
null
model/login.py
ElenaUS/automation
9f1b948590dae5fcc1a2ad247961e92b99d7a88d
[ "Apache-2.0" ]
null
null
null
model/login.py
ElenaUS/automation
9f1b948590dae5fcc1a2ad247961e92b99d7a88d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- class Login: def __init__(self, username): self.username = username """у этого класса делаем констурктор, именно конструктор будут принимать все эти многочисленные параметры, а дальше в методы будет передаваться один объект этого класса"""
27.8
68
0.733813
2ce18f2d25729f561d2ab82db95bb4a411a7e8bd
755
py
Python
ensysmod/model/energy_model.py
NOWUM/EnSysMod
18c8a2198db3510e667c1f0298d00a3dfcb0aab7
[ "MIT" ]
1
2021-12-10T19:41:01.000Z
2021-12-10T19:41:01.000Z
ensysmod/model/energy_model.py
NOWUM/EnSysMod
18c8a2198db3510e667c1f0298d00a3dfcb0aab7
[ "MIT" ]
83
2021-10-20T22:54:28.000Z
2022-03-24T19:07:06.000Z
ensysmod/model/energy_model.py
NOWUM/EnSysMod
18c8a2198db3510e667c1f0298d00a3dfcb0aab7
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer, String, ForeignKey, UniqueConstraint from sqlalchemy.orm import relationship from ensysmod.database.base_class import Base from ensysmod.model import Dataset class EnergyModel(Base): id = Column(Integer, primary_key=True, index=True) ref_dataset = Column(Integer, Forei...
34.318182
87
0.748344
54335d9dba3543df065233c086a77744ff652459
4,892
py
Python
characters/req.py
JoyMbugua/marvel-land
b482051240ca3b949bc5ed69f14533a25d265c04
[ "MIT" ]
null
null
null
characters/req.py
JoyMbugua/marvel-land
b482051240ca3b949bc5ed69f14533a25d265c04
[ "MIT" ]
null
null
null
characters/req.py
JoyMbugua/marvel-land
b482051240ca3b949bc5ed69f14533a25d265c04
[ "MIT" ]
null
null
null
import requests import datetime import hashlib from decouple import config import aiohttp import asyncio from .models import Hero, Comic base_url = 'https://gateway.marvel.com:443/v1/public/characters' def getUrl(): ''' method to return the base marvel url ''' global base_url ts = datetime.d...
31.56129
116
0.61018
628b62037ab6be40279380ab9bdcf38fb28c98fb
336
py
Python
utils.py
1170500804/glow
eebe0cfdf1a4f70ac0dc9dc0141bf09de2818ac3
[ "MIT" ]
2,898
2018-07-09T16:24:07.000Z
2022-03-29T23:34:40.000Z
utils.py
1170500804/glow
eebe0cfdf1a4f70ac0dc9dc0141bf09de2818ac3
[ "MIT" ]
98
2018-07-09T17:37:14.000Z
2021-11-02T14:59:35.000Z
utils.py
1170500804/glow
eebe0cfdf1a4f70ac0dc9dc0141bf09de2818ac3
[ "MIT" ]
542
2018-07-09T16:30:06.000Z
2022-03-02T00:26:37.000Z
import json class ResultLogger(object): def __init__(self, path, *args, **kwargs): self.f_log = open(path, 'w') self.f_log.write(json.dumps(kwargs) + '\n') def log(self, **kwargs): self.f_log.write(json.dumps(kwargs) + '\n') self.f_log.flush() def close(self): sel...
22.4
51
0.583333
dae2000b2b10b91e2a154054b7e61703b8eae81a
9,326
py
Python
core/import_primary.py
moshthepitt/shulezote
e903a208948ab5294183e2a8c2dac9360a184654
[ "MIT" ]
2
2015-12-02T08:14:34.000Z
2020-12-16T19:56:46.000Z
core/import_primary.py
moshthepitt/shulezote
e903a208948ab5294183e2a8c2dac9360a184654
[ "MIT" ]
4
2016-10-04T12:15:42.000Z
2021-06-10T19:47:39.000Z
core/import_primary.py
moshthepitt/shulezote
e903a208948ab5294183e2a8c2dac9360a184654
[ "MIT" ]
1
2018-08-20T14:19:32.000Z
2018-08-20T14:19:32.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import datetime from django.conf import settings from django.contrib.gis.geos import Point from schools.models import School from facts.models import Fact from staff.models import Staff from facilities.models import Facility, FacilityRecord from places.models i...
51.524862
156
0.50697
e6eda45b84ced3a76970db3d284222df38160185
476
py
Python
posts/migrations/0003_auto_20200325_0932.py
dragonrathony/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
1
2020-06-17T13:45:54.000Z
2020-06-17T13:45:54.000Z
posts/migrations/0003_auto_20200325_0932.py
Honey4251996/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
11
2021-03-19T07:55:39.000Z
2022-03-12T00:34:55.000Z
posts/migrations/0003_auto_20200325_0932.py
Honey4251996/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 3.0.3 on 2020-03-25 09:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('posts', '0002_auto_20200325_0911'), ] operations = [ migrations.AlterField( model_name='post', ...
23.8
109
0.636555
6f4ef02b0cc7faa6c15867117e6a900caae9c749
5,570
py
Python
LMS_Student/views.py
Noisyfox/LMS
8acb5f4e8b98a6dfbe5f6692d00dd34812fd5101
[ "MIT" ]
null
null
null
LMS_Student/views.py
Noisyfox/LMS
8acb5f4e8b98a6dfbe5f6692d00dd34812fd5101
[ "MIT" ]
null
null
null
LMS_Student/views.py
Noisyfox/LMS
8acb5f4e8b98a6dfbe5f6692d00dd34812fd5101
[ "MIT" ]
null
null
null
import re from django.db.models import Q from django.http import Http404 from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.urls import reverse_lazy from django.views import View from django.views.generic import CreateView from django.views.generic import De...
30.944444
115
0.714363
7c72b64ce7ded30b034f399818d92258e246f233
761
py
Python
factory/matting_converter.py
vuthede/MMNet
b7f10770a16480c3875719a41b4d85ed74e828ee
[ "Apache-2.0" ]
179
2018-11-23T05:46:38.000Z
2022-03-03T14:31:17.000Z
factory/matting_converter.py
vuthede/MMNet
b7f10770a16480c3875719a41b4d85ed74e828ee
[ "Apache-2.0" ]
15
2019-05-01T11:46:48.000Z
2020-10-21T01:55:41.000Z
factory/matting_converter.py
vuthede/MMNet
b7f10770a16480c3875719a41b4d85ed74e828ee
[ "Apache-2.0" ]
38
2018-12-24T09:50:50.000Z
2021-12-29T07:20:09.000Z
from abc import ABC from abc import abstractmethod import tensorflow as tf class ConverterBase(ABC): @classmethod @abstractmethod def convert( cls, logits: tf.Tensor, output_name: str, num_classes: int, ): raise NotImplementedError(f"convert() not defined in {cl...
23.060606
87
0.642576
b1fcbb382d71aff9b72a7f02a79ef8e2234d101a
4,199
py
Python
reley/impl/expr_based_ast.py
thautwarm/reley
17e5730c1afbefaeb22103719c85f08333c65937
[ "MIT" ]
12
2018-09-13T02:32:21.000Z
2021-08-06T04:59:26.000Z
reley/impl/expr_based_ast.py
thautwarm/reley
17e5730c1afbefaeb22103719c85f08333c65937
[ "MIT" ]
null
null
null
reley/impl/expr_based_ast.py
thautwarm/reley
17e5730c1afbefaeb22103719c85f08333c65937
[ "MIT" ]
null
null
null
from typing import NamedTuple, List, Tuple from Redy.Magic.Classic import record from numpy import number from rbnf.easy import Tokenizer globals()['NamedTuple'] = object class Loc: __slots__ = ['lineno', 'colno', 'filename'] lineno: int colno: int filename: str def __init__(self, lineno, colno,...
16.275194
92
0.607287
ca8441cb1bf7e728bfc9a159f47bf8d817afe35b
80
py
Python
VAE/test.py
PL187/idlm_Ben
5ba93da0d9b5d9313a9ce968e3593fefd0a05fc9
[ "MIT" ]
1
2020-07-25T10:26:53.000Z
2020-07-25T10:26:53.000Z
VAE/test.py
PL187/idlm_Ben
5ba93da0d9b5d9313a9ce968e3593fefd0a05fc9
[ "MIT" ]
null
null
null
VAE/test.py
PL187/idlm_Ben
5ba93da0d9b5d9313a9ce968e3593fefd0a05fc9
[ "MIT" ]
null
null
null
import evaluate evaluate.unpack_Xpred("data/test_Xpred_20190826_210307.csv",32)
26.666667
63
0.8625
2e5377fad129785cb5a304add9414be12a22f29f
10,334
py
Python
examples/advanced_operations/add_responsive_search_ad_with_ad_customizer.py
claudiapaveljlp/google-ads-python
c143e81804e237a9549dd5936503d921033c4e5a
[ "Apache-2.0" ]
null
null
null
examples/advanced_operations/add_responsive_search_ad_with_ad_customizer.py
claudiapaveljlp/google-ads-python
c143e81804e237a9549dd5936503d921033c4e5a
[ "Apache-2.0" ]
null
null
null
examples/advanced_operations/add_responsive_search_ad_with_ad_customizer.py
claudiapaveljlp/google-ads-python
c143e81804e237a9549dd5936503d921033c4e5a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2020 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 or ...
39.292776
131
0.72905
d215f5660d06095bfa19474e13bb492e71765463
2,014
py
Python
apps/genres/tests/__init__.py
GiannisClipper/payments
94e08144597b3f4cd0de8485edf3f5535aeb9da6
[ "MIT" ]
null
null
null
apps/genres/tests/__init__.py
GiannisClipper/payments
94e08144597b3f4cd0de8485edf3f5535aeb9da6
[ "MIT" ]
null
null
null
apps/genres/tests/__init__.py
GiannisClipper/payments
94e08144597b3f4cd0de8485edf3f5535aeb9da6
[ "MIT" ]
null
null
null
from django.test import TestCase import copy from django.contrib.auth import get_user_model from funds.models import Fund from genres.models import Genre from users.tests import UserCreateMethods from funds.tests import FundCreateMethods from users.tests import USER_SAMPLES, ADMIN_SAMPLES from funds.tests import F...
31.968254
86
0.602781
695a76be52944eba725cee11ac06597684824c5e
3,376
py
Python
dl_nn_mini.py
stevenwasik/dl
92bd6cff5619f8153f3675dd92d7d2969f2fe31b
[ "MIT" ]
null
null
null
dl_nn_mini.py
stevenwasik/dl
92bd6cff5619f8153f3675dd92d7d2969f2fe31b
[ "MIT" ]
null
null
null
dl_nn_mini.py
stevenwasik/dl
92bd6cff5619f8153f3675dd92d7d2969f2fe31b
[ "MIT" ]
null
null
null
import numpy as np import random import dl_helper_functions as hf def nn_mini(target, predictors, classes, hidden_layer_nodes, hidden_layers, predictor_count, eps=0.001, epochs=100, minibatch_size=50): network_struc = [predictor_count] + [hidden_layer_nodes] * hidden_layers + [classes] num_obs = l...
49.647059
115
0.573164
f7bda1308e8a50757694c2893fe6e4cf0a2073a2
3,918
py
Python
podcatcher.py
quandram/podcatcher
b1d14b10b3e1afd1947e09ddf2006dac37c6fae7
[ "MIT" ]
null
null
null
podcatcher.py
quandram/podcatcher
b1d14b10b3e1afd1947e09ddf2006dac37c6fae7
[ "MIT" ]
null
null
null
podcatcher.py
quandram/podcatcher
b1d14b10b3e1afd1947e09ddf2006dac37c6fae7
[ "MIT" ]
null
null
null
import feedparser import os import requests from datetime import datetime from dateutil.parser import parse from dateutil import tz from pytz import timezone from sanitize_filename import sanitize import configKeys class podcatcher: def __init__(self, podConfig, configSection, configData): self.podCatche...
43.054945
136
0.624043
8441c6433211e70e75343c45786e0382d75a2eea
3,769
py
Python
elimika_backend/users/models.py
bawabu/elimika_backend
d7a3d59454b7bebd09e6950a37532ff86848fb0b
[ "MIT" ]
null
null
null
elimika_backend/users/models.py
bawabu/elimika_backend
d7a3d59454b7bebd09e6950a37532ff86848fb0b
[ "MIT" ]
null
null
null
elimika_backend/users/models.py
bawabu/elimika_backend
d7a3d59454b7bebd09e6950a37532ff86848fb0b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import uuid import math from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.transla...
34.577982
82
0.669674
4de5e1ee206f18f9ce856d6327800a12221ce0b8
2,175
py
Python
crazyflie_t/crazyflie_state_estimate_t.py
joaoolavo/crazyflie-kinect-control
c77134eb3ec654d9c61830c0a1bd20732c1e596a
[ "MIT" ]
73
2015-03-11T05:32:13.000Z
2022-03-25T23:30:17.000Z
crazyflie_t/crazyflie_state_estimate_t.py
joaoolavo/crazyflie-kinect-control
c77134eb3ec654d9c61830c0a1bd20732c1e596a
[ "MIT" ]
18
2015-01-19T20:23:36.000Z
2017-02-14T21:03:07.000Z
crazyflie_t/crazyflie_state_estimate_t.py
joaoolavo/crazyflie-kinect-control
c77134eb3ec654d9c61830c0a1bd20732c1e596a
[ "MIT" ]
49
2015-06-19T03:16:10.000Z
2021-01-13T08:56:02.000Z
"""LCM type definitions This file automatically generated by lcm. DO NOT MODIFY BY HAND!!!! """ try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct class crazyflie_state_estimate_t(object): __slots__ = ["timestamp", "xhat", "t"] def __init__(self): ...
33.984375
130
0.668046
b860a7db3c615f9c2313314f395388db18df959f
17,528
py
Python
pylangacq/tests/test_chat.py
mitjanikolaus/pylangacq
88c327ee5b41af4a7c1a59f1813d52bf49bf3bed
[ "MIT" ]
null
null
null
pylangacq/tests/test_chat.py
mitjanikolaus/pylangacq
88c327ee5b41af4a7c1a59f1813d52bf49bf3bed
[ "MIT" ]
null
null
null
pylangacq/tests/test_chat.py
mitjanikolaus/pylangacq
88c327ee5b41af4a7c1a59f1813d52bf49bf3bed
[ "MIT" ]
null
null
null
import copy import datetime import filecmp import functools import os import tempfile import unittest from unittest import mock import pytest from pylangacq.chat import _clean_word, Reader, cached_data_info, remove_cached_data from pylangacq.objects import Gra, Utterance, Token from pylangacq.tests.test_data import (...
34.777778
87
0.510954
1378df557f0266eb7b0fb0907adb69e72d2b064a
7,796
py
Python
tests/test_data.py
xhochy/rejected
610a3e1401122ecb98d891b6795cca0255e5b044
[ "BSD-3-Clause" ]
null
null
null
tests/test_data.py
xhochy/rejected
610a3e1401122ecb98d891b6795cca0255e5b044
[ "BSD-3-Clause" ]
null
null
null
tests/test_data.py
xhochy/rejected
610a3e1401122ecb98d891b6795cca0255e5b044
[ "BSD-3-Clause" ]
null
null
null
"""Tests for rejected.data""" import random import time import unittest import uuid from rejected import data from . import mocks class TestProperties(unittest.TestCase): def setUp(self): self.properties = data.Properties(mocks.PROPERTIES) def test_app_id(self): self.assertEqual(self.proper...
33.316239
79
0.663417
fde9d6460785cc956169cca65da7f15351ec0fa2
833
py
Python
test/test_acps.py
edose/photrix
ed9b36a86564f4b0389db6b350b8603a0eb82d05
[ "Apache-2.0" ]
3
2018-12-06T11:20:28.000Z
2020-12-16T23:17:40.000Z
test/test_acps.py
edose/photrix
ed9b36a86564f4b0389db6b350b8603a0eb82d05
[ "Apache-2.0" ]
4
2018-10-22T15:30:04.000Z
2018-10-23T01:13:31.000Z
test/test_acps.py
edose/photrix
ed9b36a86564f4b0389db6b350b8603a0eb82d05
[ "Apache-2.0" ]
1
2020-06-13T18:38:36.000Z
2020-06-13T18:38:36.000Z
from photrix import acps # don't include "acps." in calls to functions and classes. __author__ = "Eric Dose :: Bois d'Arc Observatory, Kansas" def test_ACPS_observation(): obs = acps.ACPS_observation("ST Tri", 34.555, 21.334) obs.add_imageset("ST Tri", 3, 120, 'V') obs.add_imageset("ST Tri I filter", 3,...
33.32
93
0.643457
df573495fa62a46d67b008763fa4bd5b5ac56090
10,522
py
Python
jsonfield/tests.py
Petro-Viron/django-jsonfield
df3eceda630b3d741e2a5d38a9f5e056921eac26
[ "MIT" ]
null
null
null
jsonfield/tests.py
Petro-Viron/django-jsonfield
df3eceda630b3d741e2a5d38a9f5e056921eac26
[ "MIT" ]
null
null
null
jsonfield/tests.py
Petro-Viron/django-jsonfield
df3eceda630b3d741e2a5d38a9f5e056921eac26
[ "MIT" ]
1
2016-06-06T10:44:01.000Z
2016-06-06T10:44:01.000Z
from decimal import Decimal from django.core.serializers import deserialize, serialize from django.core.serializers.base import DeserializationError from django.db import models from django.test import TestCase try: import json except ImportError: from django.utils import simplejson as json from .fields import...
36.79021
90
0.64636
0fa65f5409132752a19d26b4e4db9be2368c76fc
5,745
py
Python
test_cifar_iterative.py
GhostofAdam/Adaptive-Diversity-Promoting
0b23f0f507f5c4310cddd35391c5b94673cb1237
[ "Apache-2.0" ]
null
null
null
test_cifar_iterative.py
GhostofAdam/Adaptive-Diversity-Promoting
0b23f0f507f5c4310cddd35391c5b94673cb1237
[ "Apache-2.0" ]
null
null
null
test_cifar_iterative.py
GhostofAdam/Adaptive-Diversity-Promoting
0b23f0f507f5c4310cddd35391c5b94673cb1237
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import keras from keras.layers import AveragePooling2D, Input, Flatten from keras.models import Model, load_model from keras.datasets import cifar10, cifar100 import tensorflow as tf import cleverhans.attacks as attacks from cleverhans.utils_tf import model_eval import os ...
35.90625
191
0.747084
839ddf997348196edda8e3980aa727541fadd835
956
py
Python
script/start.py
pranayaryal/electron
a7052efaf4fc6bb2aeedd6579e662e98aa2237dd
[ "MIT" ]
1,027
2016-12-24T13:05:29.000Z
2022-02-21T11:07:32.000Z
script/start.py
pranayaryal/electron
a7052efaf4fc6bb2aeedd6579e662e98aa2237dd
[ "MIT" ]
366
2016-12-24T05:58:54.000Z
2018-12-31T23:02:03.000Z
script/start.py
pranayaryal/electron
a7052efaf4fc6bb2aeedd6579e662e98aa2237dd
[ "MIT" ]
122
2017-01-14T23:48:49.000Z
2022-03-09T01:51:53.000Z
#!/usr/bin/env python import os import subprocess import sys from lib.util import electron_gyp SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) PROJECT_NAME = electron_gyp()['project_name%'] PRODUCT_NAME = electron_gyp()['product_name%'] def main(): os.chdir(SOURCE_ROOT) config = 'D...
23.317073
73
0.621339
bbd9939de21307e5bfb2340653ed0f30fe6db6c5
810
py
Python
src/patched_flannel/classification/header.py
mannbiher/DeepLearningForHealthCareProject
4692031591bd88c489c9b905e7c340ac76a5366b
[ "MIT" ]
null
null
null
src/patched_flannel/classification/header.py
mannbiher/DeepLearningForHealthCareProject
4692031591bd88c489c9b905e7c340ac76a5366b
[ "MIT" ]
14
2021-05-10T18:00:58.000Z
2021-05-12T00:29:41.000Z
src/patched_flannel/classification/header.py
mannbiher/DeepLearningForHealthCareProject
4692031591bd88c489c9b905e7c340ac76a5366b
[ "MIT" ]
null
null
null
# Test name test_name = 'classifier_newset' # sampling_option = 'oversampling' sampling_option = None # Batch size train_batch_size = 16 val_batch_size = 16 test_batch_size = 1 # Num_classes num_classes = 4 # Model #model = 'resnet' model = 'resnet' # Feature extract or train all parameters feature_extract = False ...
14.464286
54
0.740741
4cb9c81e0ca788f0034f0aa44fb47f09f8bd1d12
20,128
py
Python
research/street/python/vgslspecs.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
1
2019-09-11T09:41:11.000Z
2019-09-11T09:41:11.000Z
research/street/python/vgslspecs.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
null
null
null
research/street/python/vgslspecs.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 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...
37.62243
83
0.618839
432ed35d75e3859864531470ff3c9c6ca38ba7a1
1,212
py
Python
examples/recaptcha/app.py
jace/flask-wtf
bd6cfe07daf0607947c506fbb656e53de04851a1
[ "BSD-3-Clause" ]
1
2015-09-16T16:20:13.000Z
2015-09-16T16:20:13.000Z
examples/recaptcha/app.py
jace/flask-wtf
bd6cfe07daf0607947c506fbb656e53de04851a1
[ "BSD-3-Clause" ]
null
null
null
examples/recaptcha/app.py
jace/flask-wtf
bd6cfe07daf0607947c506fbb656e53de04851a1
[ "BSD-3-Clause" ]
null
null
null
from flask import Flask, render_template, flash, session, redirect, url_for from flask.ext.wtf import Form, TextAreaField, RecaptchaField, Required DEBUG = True SECRET_KEY = 'secret' # keys for localhost. Change as appropriate. RECAPTCHA_PUBLIC_KEY = '6LeYIbsSAAAAACRPIllxA7wvXjIE411PfdB2gt2J' RECAPTCHA_PRIVATE_KEY =...
27.545455
75
0.669142
bcdd3c622218a70bc9fae99c38f47a45298a8747
3,248
py
Python
src/hyperloop/Python/tests/test_cycle_group.py
jcchin/Hyperloop_v2
73861d2207af8738425c1d484909ed0433b9653f
[ "Apache-2.0" ]
1
2021-04-29T00:23:03.000Z
2021-04-29T00:23:03.000Z
src/hyperloop/Python/tests/test_cycle_group.py
jcchin/Hyperloop_v2
73861d2207af8738425c1d484909ed0433b9653f
[ "Apache-2.0" ]
9
2016-11-23T09:10:34.000Z
2016-12-06T01:10:09.000Z
src/hyperloop/Python/tests/test_cycle_group.py
jcchin/Hyperloop_v2
73861d2207af8738425c1d484909ed0433b9653f
[ "Apache-2.0" ]
11
2016-01-19T20:26:35.000Z
2021-02-13T11:16:20.000Z
""" Test for cycle_group.py. Uses test values and outputs given by NPSS """ from __future__ import print_function import numpy as np from openmdao.api import Group, Problem, IndepVarComp from openmdao.core.group import Group, Component, IndepVarComp from openmdao.solvers.newton import Newton from openmdao.api import ...
41.113924
108
0.669643
3e1f14cb7d9e020f593678d8e89a9653140cb311
7,473
py
Python
projects/file_handling/filehandling.py
iannico322/Python-GUI-Project
5e5db3ef0677b5ee9d5378823eaa9f4f34c0b097
[ "Unlicense" ]
null
null
null
projects/file_handling/filehandling.py
iannico322/Python-GUI-Project
5e5db3ef0677b5ee9d5378823eaa9f4f34c0b097
[ "Unlicense" ]
null
null
null
projects/file_handling/filehandling.py
iannico322/Python-GUI-Project
5e5db3ef0677b5ee9d5378823eaa9f4f34c0b097
[ "Unlicense" ]
null
null
null
from tkinter import* import tkinter.ttk as ttk import tkinter.messagebox as tkMessageBox import sqlite3 import os #DEVELOPED by:Author Ian Nico M. Caulin #COURSE : BSIT-1R5 root = Tk() root.title("Python - Save Data To Table (File Handling)") root.iconbitmap('images/logo.ico') screen_width = root.winfo_sc...
47
255
0.623043
590d5e8e9fdee4e32777ed8089f491528417aa5c
13,250
py
Python
luna/gateware/soc/peripheral.py
pimdegroot/luna
16110a59c72279e7272310e81ca4656da11fb1da
[ "BSD-3-Clause" ]
1
2021-02-28T04:35:15.000Z
2021-02-28T04:35:15.000Z
luna/gateware/soc/peripheral.py
pimdegroot/luna
16110a59c72279e7272310e81ca4656da11fb1da
[ "BSD-3-Clause" ]
4
2020-11-11T17:32:33.000Z
2020-11-30T13:08:05.000Z
luna/gateware/soc/peripheral.py
pimdegroot/luna
16110a59c72279e7272310e81ca4656da11fb1da
[ "BSD-3-Clause" ]
null
null
null
# # This file is part of LUNA. # # Adapted from lambdasoc. # This file includes content Copyright (C) 2020 LambdaConcept. # # Per our BSD license, derivative files must include this license disclaimer. # # Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com> # SPDX-License-Identifier: BSD-3-Clause """ P...
34.960422
102
0.598189
985ab442db67c47af5f20c1838feedb6593fb004
678
py
Python
sdks/python/test/test_todays_stats.py
barryw/bjr
de56f22198b34a9d303ee43ac01134b5cf1ce863
[ "BSD-3-Clause" ]
2
2020-06-04T03:04:15.000Z
2020-06-13T12:53:58.000Z
sdks/python/test/test_todays_stats.py
barryw/bjr
de56f22198b34a9d303ee43ac01134b5cf1ce863
[ "BSD-3-Clause" ]
6
2020-05-24T12:56:25.000Z
2022-02-26T07:13:17.000Z
sdks/python/test/test_todays_stats.py
barryw/bjr
de56f22198b34a9d303ee43ac01134b5cf1ce863
[ "BSD-3-Clause" ]
null
null
null
""" BJR API V1 API specification for the BJR job server. # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import sys import unittest import bjr4py from bjr4py.model.todays_stats import TodaysStats class TestTodaysStats(unittest.TestCase): ...
18.833333
79
0.659292
68abe8dc33bbbd11fcda951b888d96631084376b
13,492
py
Python
bin/commonSubroutines/drawFigure/drawFigure.py
Hughes-Genome-Group/CCseqBasicM
d806d0cc9a9a3323b2c486124c1d6002408d57e4
[ "MIT" ]
1
2020-07-16T11:27:47.000Z
2020-07-16T11:27:47.000Z
bin/commonSubroutines/drawFigure/drawFigure.py
Hughes-Genome-Group/CCseqBasicM
d806d0cc9a9a3323b2c486124c1d6002408d57e4
[ "MIT" ]
2
2020-01-30T10:53:38.000Z
2021-05-23T12:59:40.000Z
bin/commonSubroutines/drawFigure/drawFigure.py
Hughes-Genome-Group/CCseqBasicM
d806d0cc9a9a3323b2c486124c1d6002408d57e4
[ "MIT" ]
1
2019-12-02T14:46:09.000Z
2019-12-02T14:46:09.000Z
########################################################################## # Copyright 2017, Jelena Telenius (jelena.telenius@imm.ox.ac.uk) # # # # This file is part of CCseqBasic5 . # # ...
32.827251
303
0.599466
efb942ddde66af7f8ac63c968c06ff4b0485a45b
2,982
py
Python
common/blockchain_util.py
anandrgit/snet-marketplace-service
22dd66e9e34a65580eaffa70928bbdb1f67061e8
[ "MIT" ]
null
null
null
common/blockchain_util.py
anandrgit/snet-marketplace-service
22dd66e9e34a65580eaffa70928bbdb1f67061e8
[ "MIT" ]
null
null
null
common/blockchain_util.py
anandrgit/snet-marketplace-service
22dd66e9e34a65580eaffa70928bbdb1f67061e8
[ "MIT" ]
null
null
null
import json import uuid import web3 from eth_account.messages import defunct_hash_message from web3 import Web3 class BlockChainUtil(object): def __init__(self, provider_type, provider): if provider_type == "HTTP_PROVIDER": self.provider = Web3.HTTPProvider(provider) elif provider_t...
40.849315
119
0.699866
9a55ebabefeaa8b6259a9ccced48feb800dabf86
2,085
py
Python
src/__tests__/screenTestRunner.py
KapJI/PathPicker
3d285f8de9eb43970ae14e0623168b248fbaad6f
[ "MIT" ]
null
null
null
src/__tests__/screenTestRunner.py
KapJI/PathPicker
3d285f8de9eb43970ae14e0623168b248fbaad6f
[ "MIT" ]
null
null
null
src/__tests__/screenTestRunner.py
KapJI/PathPicker
3d285f8de9eb43970ae14e0623168b248fbaad6f
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import print_function import curses import sys import os sys.path.insert(0, '../') from keyBindingsForTest import KeyBinding...
28.958333
83
0.658513
778ddc2a3716926a289ec11b99a800e4888bc0be
4,627
py
Python
dnachisel/builtin_specifications/EnforceSequence.py
Edinburgh-Genome-Foundry/DnaChisel
fed4613cee67c22326a5f654ecf8ff0490298359
[ "MIT" ]
124
2017-11-14T14:42:25.000Z
2022-03-31T08:02:07.000Z
dnachisel/builtin_specifications/EnforceSequence.py
Edinburgh-Genome-Foundry/DnaChisel
fed4613cee67c22326a5f654ecf8ff0490298359
[ "MIT" ]
65
2017-11-15T07:25:38.000Z
2022-01-31T10:38:45.000Z
dnachisel/builtin_specifications/EnforceSequence.py
Edinburgh-Genome-Foundry/DnaChisel
fed4613cee67c22326a5f654ecf8ff0490298359
[ "MIT" ]
31
2018-10-18T12:59:47.000Z
2022-02-11T16:54:43.000Z
"""Implement EnforceSequence (DO NOT USE YET: Work in progress, stabilizing)""" # TODO: factorize with self.sequence ? import numpy as np from ..Specification import Specification, SpecEvaluation from ..Location import Location from ..biotools import group_nearby_indices, reverse_complement, IUPAC_NOTATION class E...
34.529851
87
0.594554
76edad2f5784d5c31f732f9e070b729dbbae3780
12,177
py
Python
tfx/orchestration/portable/mlmd/execution_lib_test.py
Anon-Artist/tfx
2692c9ab437d76b5d9517996bfe2596862e0791d
[ "Apache-2.0" ]
2
2021-05-10T21:39:48.000Z
2021-11-17T11:24:29.000Z
tfx/orchestration/portable/mlmd/execution_lib_test.py
Anon-Artist/tfx
2692c9ab437d76b5d9517996bfe2596862e0791d
[ "Apache-2.0" ]
1
2021-01-28T13:44:51.000Z
2021-04-28T16:15:47.000Z
tfx/orchestration/portable/mlmd/execution_lib_test.py
Anon-Artist/tfx
2692c9ab437d76b5d9517996bfe2596862e0791d
[ "Apache-2.0" ]
1
2021-01-28T13:41:51.000Z
2021-01-28T13:41:51.000Z
# Lint as: python3 # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
38.904153
79
0.668063
e0d5ac2bb5c31874e96840e3207bc1df07ae272c
428
py
Python
testsuite/closure-array/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
1,105
2015-01-02T20:47:19.000Z
2021-01-25T13:20:56.000Z
testsuite/closure-array/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
696
2015-01-07T23:42:08.000Z
2021-01-25T03:55:08.000Z
testsuite/closure-array/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
248
2015-01-05T13:41:28.000Z
2021-01-24T23:29:55.000Z
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage command += testshade ("-layer alayer a -layer dlayer d --layer clayer c --layer blayer b --connect alayer output_closure clay...
53.5
233
0.794393
915a47c7531dd8dfdbdf5bfb6ae18e6870d9038d
1,186
py
Python
oo/pessoa.py
AdemilsonMelo/pythonbirds
f29ea58ad8acb2514b4e6196afd6b268f2c334f9
[ "MIT" ]
null
null
null
oo/pessoa.py
AdemilsonMelo/pythonbirds
f29ea58ad8acb2514b4e6196afd6b268f2c334f9
[ "MIT" ]
null
null
null
oo/pessoa.py
AdemilsonMelo/pythonbirds
f29ea58ad8acb2514b4e6196afd6b268f2c334f9
[ "MIT" ]
null
null
null
class Pessoa: olhos = 2 def __init__(self, *filhos, nome = None, idade = 35): self.idade = idade self.nome = nome self.filhos = list(filhos) def cumprimentar(self): return f'Olá {id(self)}' @staticmethod def metodo_estatico(): return 42 @classmetho...
26.954545
86
0.651771
ecaeac1c9b9266d71a7bfac0ec5b19382960a73d
472
py
Python
trac/versioncontrol/tests/__init__.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
null
null
null
trac/versioncontrol/tests/__init__.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
null
null
null
trac/versioncontrol/tests/__init__.py
wiraqutra/photrackjp
e120cba2a5d5d30f99ad084c6521e61f09694ee6
[ "BSD-3-Clause" ]
null
null
null
import unittest from trac.versioncontrol.tests import cache, diff, svn_authz, svn_fs, api from trac.versioncontrol.tests.functional import functionalSuite def suite(): suite = unittest.TestSuite() suite.addTest(cache.suite()) suite.addTest(diff.suite()) suite.addTest(svn_authz.suite()) ...
26.222222
74
0.701271
ded89d087e25d9e2db8450406731cc12139287d8
10,428
py
Python
src/project_util.py
rrozema12/Data-Mining-Final-Project
4848f3daed4b75879b626c5dc460e8dbd70ae861
[ "MIT" ]
1
2018-02-04T01:10:20.000Z
2018-02-04T01:10:20.000Z
src/project_util.py
rrozema12/Data-Mining-Final-Project
4848f3daed4b75879b626c5dc460e8dbd70ae861
[ "MIT" ]
null
null
null
src/project_util.py
rrozema12/Data-Mining-Final-Project
4848f3daed4b75879b626c5dc460e8dbd70ae861
[ "MIT" ]
null
null
null
import util import constants import table_utils def print_confusion_matrix(labels, class_label_name): """ Prints the confusion matrix of the given labels :param labels: A list of tuples of class labels [(actual, predicted),...] :param class_label_name: The name of the class label """ class_labels ...
28.569863
115
0.60654
aecdde1dfba894df3dabb3922b29c6b230180dca
19,924
py
Python
abstract_metal_wires/abstract_metal_wires.py
qbilius/autoart
e82f0b28848648600e3e61d188231edd26f215b0
[ "MIT" ]
2
2022-03-10T04:12:42.000Z
2022-03-12T02:44:32.000Z
abstract_metal_wires/abstract_metal_wires.py
qbilius/autoart
e82f0b28848648600e3e61d188231edd26f215b0
[ "MIT" ]
null
null
null
abstract_metal_wires/abstract_metal_wires.py
qbilius/autoart
e82f0b28848648600e3e61d188231edd26f215b0
[ "MIT" ]
null
null
null
import sys import psychopy from psychopy import visual, core import numpy as np import scipy.ndimage import matplotlib.pyplot as plt import matplotlib as mpl from PIL import Image # import hmax class Filters(object): def gabor(self, theta=0, gamma=1, sigma=2, lam=5.6, k=10 ...
36.15971
137
0.524995
03da08fca9215585c345e38af24d2e5b59e3ec9d
412
py
Python
647-palindromic-substrings/647-palindromic-substrings.py
tlylt/LeetCodeAnki
9f69504c3762f7895d95c2a592f18ad395199ff4
[ "MIT" ]
1
2022-02-14T08:03:32.000Z
2022-02-14T08:03:32.000Z
647-palindromic-substrings/647-palindromic-substrings.py
tlylt/LeetCodeAnki
9f69504c3762f7895d95c2a592f18ad395199ff4
[ "MIT" ]
null
null
null
647-palindromic-substrings/647-palindromic-substrings.py
tlylt/LeetCodeAnki
9f69504c3762f7895d95c2a592f18ad395199ff4
[ "MIT" ]
null
null
null
class Solution: def countSubstrings(self, s: str) -> int: ans = 0 for i in range(len(s)): ans += self.helper(s, i, i, len(s)) ans += self.helper(s, i, i+1, len(s)) return ans def helper(self, s, l, r, end): ans = 0 while l >= 0 and r < end and...
27.466667
50
0.417476
1444139d9fc93abf885986970a756355c74285ca
3,348
py
Python
discordbot.py
nekosuke1/discordpy-startup
b6680c461c90a06ed8372545e944aad4f3be9203
[ "MIT" ]
null
null
null
discordbot.py
nekosuke1/discordpy-startup
b6680c461c90a06ed8372545e944aad4f3be9203
[ "MIT" ]
null
null
null
discordbot.py
nekosuke1/discordpy-startup
b6680c461c90a06ed8372545e944aad4f3be9203
[ "MIT" ]
null
null
null
import os import traceback import discord import random # おみくじで使用 from datetime import datetime token = os.environ['DISCORD_BOT_TOKEN'] @bot.event async def on_ready(): """起動時に通知してくれる処理""" print('ログインしました') print(client.user.name) # ボットの名前 print(client.user.id) # ボットのID print(discord.__version__...
40.337349
174
0.680108
1286a36a767791fab597432bc8a4adb71dfc32eb
1,050
py
Python
core/tests/test_models.py
gbutrykowska/recipe-app-api
7195d8af81bf3feaf6cf4cc5060dec4e26236203
[ "MIT" ]
null
null
null
core/tests/test_models.py
gbutrykowska/recipe-app-api
7195d8af81bf3feaf6cf4cc5060dec4e26236203
[ "MIT" ]
null
null
null
core/tests/test_models.py
gbutrykowska/recipe-app-api
7195d8af81bf3feaf6cf4cc5060dec4e26236203
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): email = 'test@gmail.com' password = 'Testpass123' user = get_user_model().objects.create_user( email=email, ...
30
69
0.661905
a18b8a73e58ee5b7c4c68e8d5456f41b1863c6da
5,075
py
Python
hyper_parameter_tuning/_v6_build_model_general_u.py
sunway1999/deep_omics
5ceb61aa1555ceed49c85a1b49c99ca9ca48e6b5
[ "MIT" ]
16
2022-01-11T19:58:18.000Z
2022-02-27T14:48:15.000Z
hyper_parameter_tuning/_v6_build_model_general_u.py
sunway1999/deep_omics
5ceb61aa1555ceed49c85a1b49c99ca9ca48e6b5
[ "MIT" ]
null
null
null
hyper_parameter_tuning/_v6_build_model_general_u.py
sunway1999/deep_omics
5ceb61aa1555ceed49c85a1b49c99ca9ca48e6b5
[ "MIT" ]
4
2022-01-15T03:25:29.000Z
2022-03-27T00:21:02.000Z
# change CNN structure to the same as that from the # De novo prediction of cancer-associated T cell receptors # for noninvasive cancer detection # paper # https://github.com/s175573/DeepCAT # all parameters for CNN part are directly carried over from # the inplementation of this repo from tensorflow.keras.activatio...
48.333333
90
0.636256
c280ec56e29c9a2379eedae6b99e2908118f8a4c
8,047
py
Python
demo/HuggingFace/GPT2/frameworks.py
SsisyphusTao/TensorRT
69f5a5093a39184e137a55c908d5c4d1340b009a
[ "Apache-2.0" ]
2
2020-06-17T06:01:27.000Z
2021-07-31T15:47:09.000Z
demo/HuggingFace/GPT2/frameworks.py
SsisyphusTao/TensorRT
69f5a5093a39184e137a55c908d5c4d1340b009a
[ "Apache-2.0" ]
null
null
null
demo/HuggingFace/GPT2/frameworks.py
SsisyphusTao/TensorRT
69f5a5093a39184e137a55c908d5c4d1340b009a
[ "Apache-2.0" ]
null
null
null
# std import os import sys import argparse from typing import List # huggingface from transformers import ( GPT2LMHeadModel, GPT2Tokenizer, GPT2Config, ) # Add syspath for custom library if __name__ == "__main__": filepath = os.path.dirname(os.path.abspath(__file__)) project_root = os.path.join(f...
33.953586
100
0.639617
92b0eb0d7a930eb91ab90f6e7301b618ac6e32b7
4,020
py
Python
dreamcoder/dreaming.py
theosech/ec
7fc34fb9df8d1b34bd4eb11551ca6fa0f574ce0e
[ "Unlicense" ]
6
2020-11-19T14:53:55.000Z
2021-09-27T19:28:51.000Z
dreamcoder/dreaming.py
evelinehong/dreamcoder
9de0434359721c8a4ecc44ae76649e21f1479c3d
[ "MIT" ]
1
2020-10-17T00:51:43.000Z
2020-10-17T00:51:43.000Z
dreamcoder/dreaming.py
evelinehong/dreamcoder
9de0434359721c8a4ecc44ae76649e21f1479c3d
[ "MIT" ]
1
2020-11-18T19:36:56.000Z
2020-11-18T19:36:56.000Z
import json import os import subprocess from pathos.multiprocessing import Pool from dreamcoder.domains.arithmetic.arithmeticPrimitives import k1, k0, addition, subtraction, multiplication from dreamcoder.frontier import Frontier, FrontierEntry from dreamcoder.grammar import Grammar from dreamcoder.program import Pro...
43.695652
108
0.539303
a04cbe32f9a3ccafd75d29ece6f91f0cf273a9aa
35
py
Python
zvgportal/parser/__init__.py
luccalb/zvg-portal
f812132aab657454b9a243dc7a1d1a4b7c3c8e21
[ "MIT" ]
null
null
null
zvgportal/parser/__init__.py
luccalb/zvg-portal
f812132aab657454b9a243dc7a1d1a4b7c3c8e21
[ "MIT" ]
null
null
null
zvgportal/parser/__init__.py
luccalb/zvg-portal
f812132aab657454b9a243dc7a1d1a4b7c3c8e21
[ "MIT" ]
null
null
null
from zvgportal.parser import parser
35
35
0.885714
7cffb8c729fd20d9b30fa8a482b20f424acaa33a
193
py
Python
convertorrr.py
mrtehseen/signal-failure-detection
506f32b47e37227fd90100ab834290bc50ca83d6
[ "MIT" ]
null
null
null
convertorrr.py
mrtehseen/signal-failure-detection
506f32b47e37227fd90100ab834290bc50ca83d6
[ "MIT" ]
null
null
null
convertorrr.py
mrtehseen/signal-failure-detection
506f32b47e37227fd90100ab834290bc50ca83d6
[ "MIT" ]
null
null
null
import tensorflow as tf converter = tf.lite.TFLiteConverter.from_keras_model_file("keras_model.h5") tflite_model = converter.convert() open("converted_model.tflite", "wb").write(tflite_model)
32.166667
75
0.80829
0f8b4a3ad9684b71a88ef150c4930a079fae69c1
8,273
py
Python
common/utilities/tests/test_timing.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
null
null
null
common/utilities/tests/test_timing.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
4
2021-03-31T19:46:30.000Z
2021-03-31T19:55:03.000Z
common/utilities/tests/test_timing.py
tomzo/integration-adaptors
d4f296d3e44475df6f69a78a27fac6ed5b67513b
[ "Apache-2.0" ]
2
2020-04-02T11:22:17.000Z
2021-04-11T07:24:48.000Z
import datetime from unittest import TestCase from unittest.mock import patch, Mock from tornado.testing import AsyncHTTPTestCase from tornado.web import Application, RequestHandler from utilities import timing from utilities.test_utilities import async_test DEFAULT_RETURN = "default" class TestTimeUtilities(TestCa...
38.300926
109
0.634111
13d12864a15fa32990757b2abc2dec8cbb443188
13,681
py
Python
squad2/run_python3.py
arfu2016/DuReader
66934852c508bff5540596aa71d5ce40c828b37d
[ "Apache-2.0" ]
null
null
null
squad2/run_python3.py
arfu2016/DuReader
66934852c508bff5540596aa71d5ce40c828b37d
[ "Apache-2.0" ]
null
null
null
squad2/run_python3.py
arfu2016/DuReader
66934852c508bff5540596aa71d5ce40c828b37d
[ "Apache-2.0" ]
null
null
null
""" @Project : DuReader @Module : run_python3.py @Author : Deco [deco@cubee.com] @Created : 7/23/18 5:47 PM @Desc : """ import argparse import json import os import pickle import random import sys from importlib import import_module import tensorflow as tf base_dir = os.path.dirname( os.path.dirn...
39.088571
163
0.608143
341cf60bedca0d6aee7f9593467203341851043e
1,602
py
Python
applications/easyflow/controllers/workflow.py
zhangjiannan/easyflow
2c9906d3cc2088ed367f887da842a46db5d903ed
[ "BSD-3-Clause" ]
null
null
null
applications/easyflow/controllers/workflow.py
zhangjiannan/easyflow
2c9906d3cc2088ed367f887da842a46db5d903ed
[ "BSD-3-Clause" ]
null
null
null
applications/easyflow/controllers/workflow.py
zhangjiannan/easyflow
2c9906d3cc2088ed367f887da842a46db5d903ed
[ "BSD-3-Clause" ]
1
2021-05-20T10:48:34.000Z
2021-05-20T10:48:34.000Z
# coding: utf8 from gluon.tools import Service service = Service() import json def index(): response.title = "Manage" response.subtitle = None records = db(db.workflow.user_id==auth.user_id).select() if len(records) > 0: records = records else: records = 'No records yet' return dict(title='Workflows...
30.807692
88
0.696629
579453e25bb00036e653b2c1f8d4907314498311
6,310
py
Python
pymeasure/adapters/visa.py
matthias6/pymeasure
f226ab4aaec8265ff442c5baadc27cfdee513ca4
[ "MIT" ]
4
2020-11-13T08:57:16.000Z
2021-09-16T12:45:33.000Z
pymeasure/adapters/visa.py
matthias6/pymeasure
f226ab4aaec8265ff442c5baadc27cfdee513ca4
[ "MIT" ]
2
2021-12-16T16:15:47.000Z
2022-03-27T10:47:13.000Z
pymeasure/adapters/visa.py
matthias6/pymeasure
f226ab4aaec8265ff442c5baadc27cfdee513ca4
[ "MIT" ]
null
null
null
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2021 PyMeasure Developers # # 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 limit...
39.685535
112
0.68859
9529062fad263473db26922382e103a4b8815830
9,213
py
Python
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_alternating_legs_env.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
7
2019-12-19T00:54:18.000Z
2021-03-03T23:34:58.000Z
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_alternating_legs_env.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
null
null
null
examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_alternating_legs_env.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
8
2019-12-18T06:09:25.000Z
2021-09-25T21:51:48.000Z
"""This file implements the gym environment of minitaur alternating legs. """ import math import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0,parentdir) from gym import spaces import n...
36.852
86
0.692934
fd4b1a480e4bb1d400fab0c8b01203c4b02dd856
4,489
py
Python
src/analyzers/MetadefenderCloud.py
lsoumille/file-analyzer
cabc7fb8b8727b35b6359cbcceb089f31228e1ef
[ "Apache-2.0" ]
null
null
null
src/analyzers/MetadefenderCloud.py
lsoumille/file-analyzer
cabc7fb8b8727b35b6359cbcceb089f31228e1ef
[ "Apache-2.0" ]
null
null
null
src/analyzers/MetadefenderCloud.py
lsoumille/file-analyzer
cabc7fb8b8727b35b6359cbcceb089f31228e1ef
[ "Apache-2.0" ]
null
null
null
import json import time import urllib3 from src.analyzers.IAnalyzer import IAnalyzer from src.utils.ConfigHelper import ConfigHelper from src.utils.Constants import Constants from src.utils.FileHelper import FileHelper class MetadefenderCloud(IAnalyzer): def __init__(self): self.name = "Metadefender Cl...
41.183486
148
0.63288
bd4d83c5c6eaafdb57e559c4a611f8ea6811cd59
3,618
py
Python
exercises/ex8-1.py
missgreenwood/twisted-intro
5c178375fb33f038d4262324201da20af213027a
[ "MIT" ]
null
null
null
exercises/ex8-1.py
missgreenwood/twisted-intro
5c178375fb33f038d4262324201da20af213027a
[ "MIT" ]
null
null
null
exercises/ex8-1.py
missgreenwood/twisted-intro
5c178375fb33f038d4262324201da20af213027a
[ "MIT" ]
null
null
null
# Solution to exercise 8-1a: # Timeout if the poem isn't received after a given period of time # Fire the deferred's errback with a custom exeption in that case # Close the connection in that case import optparse, sys from twisted.internet import defer from twisted.internet.protocol import Protocol, ClientFactory ...
27.830769
150
0.63654
f1d0538107fdcaf92c5ab4f500f502655d085824
173
py
Python
regtools/lag/__init__.py
nickderobertis/regtools
f0727195a38716a22e18d4f2c99f3b1cbf48cac8
[ "MIT" ]
null
null
null
regtools/lag/__init__.py
nickderobertis/regtools
f0727195a38716a22e18d4f2c99f3b1cbf48cac8
[ "MIT" ]
11
2020-01-25T23:33:30.000Z
2022-03-12T00:30:36.000Z
regtools/lag/__init__.py
nickderobertis/regtools
f0727195a38716a22e18d4f2c99f3b1cbf48cac8
[ "MIT" ]
null
null
null
from .create import create_lagged_variables, _convert_interaction_tuples, _convert_variable_names, _set_lag_variables from .remove import remove_lag_names_from_reg_results
43.25
117
0.901734
0baef01af0d7f94df25d57fd0a7755ae3bd4831f
3,323
py
Python
image-classification/imagenet/models/resnext.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
228
2017-11-20T06:05:56.000Z
2022-03-23T12:40:05.000Z
image-classification/imagenet/models/resnext.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
36
2018-01-11T23:26:20.000Z
2022-03-12T00:53:38.000Z
image-classification/imagenet/models/resnext.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
76
2017-11-22T22:00:00.000Z
2022-03-28T05:58:57.000Z
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
32.262136
89
0.652723
8d9017e92eee5163fc24782c6069e755e0abd799
962
py
Python
stage1/thread_demo/demo2.py
kaixiang1992/python-review
7f4f82b453f81b47af7ab1e8f3b3d07d1d75cbe4
[ "MIT" ]
null
null
null
stage1/thread_demo/demo2.py
kaixiang1992/python-review
7f4f82b453f81b47af7ab1e8f3b3d07d1d75cbe4
[ "MIT" ]
null
null
null
stage1/thread_demo/demo2.py
kaixiang1992/python-review
7f4f82b453f81b47af7ab1e8f3b3d07d1d75cbe4
[ "MIT" ]
null
null
null
""" 2019/12/12 22:11 150.【多线程】使用Thread类创建多线程(线程) """ """ 查看线程数: 使用`threading.enumerate()`函数可以看到当前线程的数量. 查看当前线程的名字: 使用`threading.currentThread()`可以看到当前线程的信息. 继承自`threading.Thread`类: 为了让线程代码更好的封装。可以使用threading模块下的Thread类,继承自这个类, 然后实现run方法,线程就会自动运行run方法中的代码。 """ import threading import time class codingThread(thread...
19.24
110
0.656965
ac80e80daa00c261cbfeb4767cbb95588286da89
6,583
py
Python
jupytext/languages.py
lclem/jupytext
145ae0ab67e60c46bea26e168c671bebaf98c38c
[ "MIT" ]
null
null
null
jupytext/languages.py
lclem/jupytext
145ae0ab67e60c46bea26e168c671bebaf98c38c
[ "MIT" ]
null
null
null
jupytext/languages.py
lclem/jupytext
145ae0ab67e60c46bea26e168c671bebaf98c38c
[ "MIT" ]
null
null
null
"""Determine notebook or cell language""" # Jupyter magic commands that are also languages _JUPYTER_LANGUAGES = ['R', 'bash', 'sh', 'python', 'python2', 'python3', 'javascript', 'js', 'perl', 'html', 'latex', 'markdown', 'pypy', 'ruby', 'script', 'svg', 'matlab', 'octave', '...
43.026144
114
0.544736
e2120d456b47b78f1867f5c6c24d178132c81702
2,049
py
Python
pypowervm/tests/utils/test_uuid.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
24
2015-12-02T19:49:45.000Z
2021-11-17T11:43:51.000Z
pypowervm/tests/utils/test_uuid.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
18
2017-03-01T05:54:25.000Z
2022-03-14T17:32:47.000Z
pypowervm/tests/utils/test_uuid.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
17
2016-02-10T22:53:04.000Z
2021-11-10T09:47:10.000Z
# Copyright 2015, 2018 IBM Corp. # # 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 require...
37.944444
78
0.676428
0c9e383c44731873cb061f35e8dcf11780037955
1,405
py
Python
crispy_forms/tests/test_utils.py
furkanx007/django-crispy-forms
77f4ea7edd3d8a4cd21f20bbe7fbce1511248e10
[ "MIT" ]
null
null
null
crispy_forms/tests/test_utils.py
furkanx007/django-crispy-forms
77f4ea7edd3d8a4cd21f20bbe7fbce1511248e10
[ "MIT" ]
3
2019-11-22T22:15:28.000Z
2021-04-08T12:42:56.000Z
crispy_forms/tests/test_utils.py
furkanx007/django-crispy-forms
77f4ea7edd3d8a4cd21f20bbe7fbce1511248e10
[ "MIT" ]
null
null
null
import pytest import django from django import forms from django.template.base import Context, Template from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout from crispy_forms.utils import list_difference, list_intersection, render_field def test_list_intersection(): assert list_inte...
27.54902
87
0.680427
db05c50cac396b212a9a7c49d08daac79cf41a0d
22,526
py
Python
withings_api/common.py
ademasi/python_withings_api
374fa985b383dea721a74eb4086a397ff26b45a1
[ "MIT" ]
null
null
null
withings_api/common.py
ademasi/python_withings_api
374fa985b383dea721a74eb4086a397ff26b45a1
[ "MIT" ]
null
null
null
withings_api/common.py
ademasi/python_withings_api
374fa985b383dea721a74eb4086a397ff26b45a1
[ "MIT" ]
null
null
null
"""Common classes and functions.""" from dataclasses import dataclass from datetime import tzinfo from enum import Enum, IntEnum import logging from typing import Any, Dict, Optional, Tuple, Type, TypeVar, Union, cast import arrow from arrow import Arrow from dateutil import tz from dateutil.tz import tzlocal from pyd...
26.752969
142
0.679126
8f6cd83956cbb9f3549d104ee26e92ff91fb49b2
1,701
py
Python
src/tests/test_load_all_grids.py
vineetjnair9/GridCal
5b63cbae45cbe176b015e5e99164a593f450fe71
[ "BSD-3-Clause" ]
null
null
null
src/tests/test_load_all_grids.py
vineetjnair9/GridCal
5b63cbae45cbe176b015e5e99164a593f450fe71
[ "BSD-3-Clause" ]
null
null
null
src/tests/test_load_all_grids.py
vineetjnair9/GridCal
5b63cbae45cbe176b015e5e99164a593f450fe71
[ "BSD-3-Clause" ]
null
null
null
# This file is part of GridCal. # # GridCal 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 later version. # # GridCal is distributed in the hope that...
30.375
86
0.651969
3564ff65e33eb4b88fa47128ea197b2ec96d8dae
9,775
py
Python
Contents/Libraries/Shared/enzyme/parsers/ebml/core.py
luboslavgerliczy/SubZero
6aeca58736ee99803d2e7f52ab00d9f563645a93
[ "MIT" ]
null
null
null
Contents/Libraries/Shared/enzyme/parsers/ebml/core.py
luboslavgerliczy/SubZero
6aeca58736ee99803d2e7f52ab00d9f563645a93
[ "MIT" ]
null
null
null
Contents/Libraries/Shared/enzyme/parsers/ebml/core.py
luboslavgerliczy/SubZero
6aeca58736ee99803d2e7f52ab00d9f563645a93
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ...exceptions import ReadError from .readers import * from pkg_resources import resource_stream # @UnresolvedImport from xml.dom import minidom import logging __all__ = ['INTEGER', 'UINTEGER', 'FLOAT', 'STRING', 'UNICODE', 'DATE', 'MASTER', 'BINARY', 'SPEC_TYPES', 'READERS', '...
41.071429
169
0.662199
e9d3b1bcbf4585a1207d99319aa616988eaddc74
892
py
Python
fimed/config.py
dandobjim/FIMED2.0-BACKEND
1118a1afcf62a2d39de3464dce3929f008dba0ec
[ "MIT" ]
null
null
null
fimed/config.py
dandobjim/FIMED2.0-BACKEND
1118a1afcf62a2d39de3464dce3929f008dba0ec
[ "MIT" ]
2
2021-04-06T18:29:57.000Z
2021-06-02T03:57:43.000Z
fimed/config.py
dandobjim/FIMED2.0-BACKEND
1118a1afcf62a2d39de3464dce3929f008dba0ec
[ "MIT" ]
null
null
null
from pathlib import Path from pydantic import BaseSettings, AnyUrl from fimed.logger import logger class MongoDns(AnyUrl): allowed_schemes = {"mongodb"} user_required = False class _Settings(BaseSettings): # api settings API_HOST: str = "localhost" API_PORT: int = 8080 # for applications s...
24.108108
70
0.651345
f9a7302d51a15d2c6bae57f68546502e33afa46d
4,090
py
Python
train_vgg19.py
SakhriHoussem/image-classification
82cb281eb4b7f114501df5d13cfc4cf00107d055
[ "MIT" ]
20
2018-09-02T09:15:14.000Z
2022-03-24T04:40:42.000Z
train_vgg19.py
SakhriHoussem/image-classification
82cb281eb4b7f114501df5d13cfc4cf00107d055
[ "MIT" ]
3
2018-09-03T11:52:04.000Z
2020-12-28T02:10:08.000Z
train_vgg19.py
SakhriHoussem/image-classification
82cb281eb4b7f114501df5d13cfc4cf00107d055
[ "MIT" ]
13
2018-07-26T17:40:16.000Z
2022-01-25T04:30:26.000Z
""" Simple tester for the vgg19_trainable """ import numpy as np import tensorflow as tf from dataSetGenerator import append,picShow from vgg19 import vgg19_trainable as vgg19 import argparse parser = argparse.ArgumentParser(prog="Train vgg19",description="Simple tester for the vgg19_trainable") parser.add_argument('-...
41.313131
161
0.630318
dc5809c3fdbd031aec4ddd6f4a3751f4dbc4cc73
2,977
gyp
Python
deps/sqlite3.gyp
ibmruntimes/node-sqlite3
221630b1611bfdf9d938e978698989977ec19a79
[ "BSD-3-Clause" ]
null
null
null
deps/sqlite3.gyp
ibmruntimes/node-sqlite3
221630b1611bfdf9d938e978698989977ec19a79
[ "BSD-3-Clause" ]
null
null
null
deps/sqlite3.gyp
ibmruntimes/node-sqlite3
221630b1611bfdf9d938e978698989977ec19a79
[ "BSD-3-Clause" ]
null
null
null
{ 'includes': [ 'common-sqlite.gypi' ], 'target_defaults': { 'default_configuration': 'Release', 'cflags': [ '-std=c99' ], 'configurations': { 'Debug': { 'defines': [ 'DEBUG', '_DEBUG' ], 'msvs_settings': { 'VCCLCompilerTool': { 'RuntimeLibrary': 1, ...
25.228814
173
0.48606
4ba9f09c2369fc68ee8d64c75f2399f4733951b6
7,640
py
Python
helper/args.py
jyothisable/dcscn-super-resolution
3799e5335cd493040d2d00386e93043840713774
[ "MIT" ]
null
null
null
helper/args.py
jyothisable/dcscn-super-resolution
3799e5335cd493040d2d00386e93043840713774
[ "MIT" ]
null
null
null
helper/args.py
jyothisable/dcscn-super-resolution
3799e5335cd493040d2d00386e93043840713774
[ "MIT" ]
null
null
null
""" Paper: "Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network" Ver: 2 functions for sharing arguments and their default values """ import sys import numpy as np import tensorflow.compat.v1 as tf flags = tf.app.flags FLAGS = flags.FLAGS # Model (network) Parameters fla...
51.972789
134
0.696466
9e86574206b6c847b4f1ec334f91d65070f7313e
7,755
py
Python
scripts/west_commands/runners/nrfjprog.py
czeslawmakarski/zephyr
005103739c775fbe929070bf58a07a9a8fb211b1
[ "Apache-2.0" ]
7
2021-07-27T00:12:02.000Z
2022-03-09T14:40:13.000Z
scripts/west_commands/runners/nrfjprog.py
czeslawmakarski/zephyr
005103739c775fbe929070bf58a07a9a8fb211b1
[ "Apache-2.0" ]
null
null
null
scripts/west_commands/runners/nrfjprog.py
czeslawmakarski/zephyr
005103739c775fbe929070bf58a07a9a8fb211b1
[ "Apache-2.0" ]
1
2021-08-06T15:51:17.000Z
2021-08-06T15:51:17.000Z
# Copyright (c) 2017 Linaro Limited. # Copyright (c) 2019 Nordic Semiconductor ASA. # # SPDX-License-Identifier: Apache-2.0 '''Runner for flashing with nrfjprog.''' import os import shlex import sys from re import fullmatch, escape from intelhex import IntelHex from runners.core import ZephyrBinaryRunner, RunnerCaps...
37.105263
82
0.526757
254a7935f3b33a088451180ea9c7cdbddbb8ed49
5,834
py
Python
cardscan/process.py
GroupTraining/BusinessCardReader
b89e9dfa4907937663cb766c6c4cbc4f26e5b540
[ "MIT" ]
52
2016-03-16T15:19:03.000Z
2021-09-07T08:45:43.000Z
cardscan/process.py
GroupTraining/BusinessCardReader
b89e9dfa4907937663cb766c6c4cbc4f26e5b540
[ "MIT" ]
1
2016-06-21T12:32:26.000Z
2019-08-06T08:58:48.000Z
cardscan/process.py
GroupTraining/BusinessCardReader
b89e9dfa4907937663cb766c6c4cbc4f26e5b540
[ "MIT" ]
28
2016-05-06T16:13:40.000Z
2022-01-19T02:53:03.000Z
import numpy as np import cv2 from matplotlib import pyplot as plt import subprocess import utils import findCard DEBUG = False PHONEALIASES = ['ph.', 'phone', 'tel.'] def parseText(text): text = text.strip() # Replace long lines with regular lines text = text.replace('\xe2\x80\x94', '-') # Remove le...
31.031915
87
0.580391
ff408a1458e993c1f93a642ad657ef50627e7df5
9,643
py
Python
aries_cloudagent/protocols/issue_credential/v1_0/messages/tests/test_credential_issue.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
247
2019-07-02T21:10:21.000Z
2022-03-30T13:55:33.000Z
aries_cloudagent/protocols/issue_credential/v1_0/messages/tests/test_credential_issue.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
1,462
2019-07-02T20:57:30.000Z
2022-03-31T23:13:35.000Z
aries_cloudagent/protocols/issue_credential/v1_0/messages/tests/test_credential_issue.py
kuraakhilesh8230/aries-cloudagent-python
ee384d1330f6a50ff45a507392ce54f92900f23a
[ "Apache-2.0" ]
377
2019-06-20T21:01:31.000Z
2022-03-30T08:27:53.000Z
from unittest import mock, TestCase from ......messaging.decorators.attach_decorator import AttachDecorator from .....didcomm_prefix import DIDCommPrefix from ...message_types import ATTACH_DECO_IDS, CREDENTIAL_ISSUE, PROTOCOL_PACKAGE from ..credential_issue import CredentialIssue class TestCredentialIssue(TestCa...
63.860927
844
0.772374
1b632ce197382f4375dd44a121127b2b8aefab47
1,854
py
Python
orio/downloadBinaries.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
6
2017-04-19T08:49:20.000Z
2020-12-18T16:13:28.000Z
orio/downloadBinaries.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
null
null
null
orio/downloadBinaries.py
NIEHS/orio
bf996ebcf41d14b945cd5848460b023376b637ad
[ "MIT" ]
1
2020-12-18T16:14:45.000Z
2020-12-18T16:14:45.000Z
import os import sys import platform from clint.textui import progress import requests import . import utils REQUIRED_SOFTWARE = ('bigWigAverageOverBed', 'validateFiles', ) def binaries_exist(): root = utils.get_bin_path() return all([ os.path.exists(os.path.join(root, fn)) for fn in REQUI...
28.090909
83
0.606257
44ab9432684515a768655ee09d6f9f0b0988927f
2,175
py
Python
setup.py
jklynch/bluesky-kafka-livegrid
1bd316f9e243e005278a9ac9404b32eaa03cb73f
[ "BSD-3-Clause" ]
null
null
null
setup.py
jklynch/bluesky-kafka-livegrid
1bd316f9e243e005278a9ac9404b32eaa03cb73f
[ "BSD-3-Clause" ]
null
null
null
setup.py
jklynch/bluesky-kafka-livegrid
1bd316f9e243e005278a9ac9404b32eaa03cb73f
[ "BSD-3-Clause" ]
null
null
null
from os import path from setuptools import setup, find_packages import sys import versioneer # NOTE: This file must remain Python 2 compatible for the foreseeable future, # to ensure that we error out properly for people with outdated setuptools # and/or pip. min_version = (3, 6) if sys.version_info < min_version: ...
31.985294
77
0.670345
cd0f00a663211ea7a9ee2f780241ab9b762134c3
1,844
py
Python
AlgorithmsDS/ex2.3.4appAnalyzis.py
w1ld/StepikExercies
3efe07819a0456aa3846587b2a23bad9dd9710db
[ "MIT" ]
4
2019-05-11T17:26:24.000Z
2022-01-30T17:48:25.000Z
AlgorithmsDS/ex2.3.4appAnalyzis.py
w1ld/StepikExercises
3efe07819a0456aa3846587b2a23bad9dd9710db
[ "MIT" ]
null
null
null
AlgorithmsDS/ex2.3.4appAnalyzis.py
w1ld/StepikExercises
3efe07819a0456aa3846587b2a23bad9dd9710db
[ "MIT" ]
4
2019-01-24T22:15:21.000Z
2020-12-21T10:23:52.000Z
import sys sys.setrecursionlimit(50000) class DisjointSet: def __init__(self, n): self.a = [i for i in range(n)] self.rank = [0 for i in range(n)] def union(self, l, r): lp = self.find(l) rp = self.find(r) if self.rank[lp] > self.rank[rp]: self.a...
18.626263
66
0.383948
1055d7b55601c24be2fedc4813df69f19511c59b
1,240
py
Python
website/templatetags/reservation.py
jrdbnntt-com/com_jrdbnntt_wedding
101c825f420076e36ea598332abc87da403910be
[ "MIT" ]
null
null
null
website/templatetags/reservation.py
jrdbnntt-com/com_jrdbnntt_wedding
101c825f420076e36ea598332abc87da403910be
[ "MIT" ]
null
null
null
website/templatetags/reservation.py
jrdbnntt-com/com_jrdbnntt_wedding
101c825f420076e36ea598332abc87da403910be
[ "MIT" ]
null
null
null
from django import template from django.utils.html import escape from django.utils.safestring import mark_safe from website.models.guest import Guest from website.models.reservation import Reservation register = template.Library() @register.simple_tag def guest_full_name(guest: Guest) -> str: return guest.full_...
32.631579
116
0.698387
d9eca831f861c0a0c59e92767940fc06d3e8be84
1,201
py
Python
shadow-hunters/tests/class_tests/test_area.py
dolphonie/shadow-hunters
2257a67f965cf43e1e5c9c8e7af87fe9ae16f5c9
[ "MIT" ]
17
2019-05-04T13:25:33.000Z
2022-01-22T14:50:49.000Z
shadow-hunters/tests/class_tests/test_area.py
dolphonie/shadow-hunters
2257a67f965cf43e1e5c9c8e7af87fe9ae16f5c9
[ "MIT" ]
25
2020-05-24T03:29:42.000Z
2021-03-29T07:07:47.000Z
shadow-hunters/tests/class_tests/test_area.py
dolphonie/shadow-hunters
2257a67f965cf43e1e5c9c8e7af87fe9ae16f5c9
[ "MIT" ]
7
2019-05-30T00:15:58.000Z
2022-01-16T14:37:25.000Z
import pytest from area import Area from zone import Zone # test_area.py # Tests for the Area object def test_fields(): # test initialization a = Area( name="area_name", desc="area_desc", domain=[9], action=lambda: 5, resource_id="r_id" ) # test fields a...
19.063492
50
0.535387
1ca162323202f5f9f581f7de1679a6cb12409d32
1,359
py
Python
onepage/models.py
naichilab/onepage
b656ac76fd83d80e45a8d13835436865461432a1
[ "MIT" ]
null
null
null
onepage/models.py
naichilab/onepage
b656ac76fd83d80e45a8d13835436865461432a1
[ "MIT" ]
null
null
null
onepage/models.py
naichilab/onepage
b656ac76fd83d80e45a8d13835436865461432a1
[ "MIT" ]
null
null
null
from math import ceil from orator import DatabaseManager from orator import Model from orator.orm import scope from orator.orm import has_many from orator.orm import belongs_to from orator.orm import belongs_to_many from onepage.db import dbconfig from onepage.db import schema Model.set_connection_resolver(DatabaseM...
21.571429
66
0.688742
2703a253f374f79ec71113a7792cec606a715f36
2,089
py
Python
Demo/pyasn1/psearch.py
reqa/python-ldap
e75c24dd70dcf10c8315d6f30ecf98f2c30f08e8
[ "MIT" ]
299
2017-11-23T14:24:32.000Z
2022-03-25T08:45:24.000Z
Demo/pyasn1/psearch.py
reqa/python-ldap
e75c24dd70dcf10c8315d6f30ecf98f2c30f08e8
[ "MIT" ]
412
2017-11-23T22:21:36.000Z
2022-03-18T11:20:59.000Z
Demo/pyasn1/psearch.py
reqa/python-ldap
e75c24dd70dcf10c8315d6f30ecf98f2c30f08e8
[ "MIT" ]
114
2017-11-23T14:24:37.000Z
2022-03-24T20:55:42.000Z
""" Demo script for Persistent Search Control (see https://tools.ietf.org/html/draft-ietf-ldapext-psearch) See https://www.python-ldap.org/ for project details. This needs the following software: Python pyasn1 pyasn1-modules python-ldap 2.4+ """ import sys,ldap,ldapurl,getpass from ldap.controls.psearch import Persi...
26.443038
132
0.733365
6d200cca3ea103bcf1f1aa0cd39caa76f4d4e06e
4,708
py
Python
Data/basis_converter_jaguar.py
certik/pyquante
f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6
[ "DOC" ]
8
2016-08-26T14:57:01.000Z
2019-12-23T07:39:37.000Z
Data/basis_converter_jaguar.py
nicodgomez/pyquante
483571110b83cab406d3d4d8f2eba5cae0a2da58
[ "DOC" ]
1
2019-02-03T10:44:02.000Z
2019-02-03T10:44:02.000Z
Data/basis_converter_jaguar.py
nicodgomez/pyquante
483571110b83cab406d3d4d8f2eba5cae0a2da58
[ "DOC" ]
8
2016-02-23T19:22:11.000Z
2021-08-28T12:12:59.000Z
#!/usr/bin/env python """\ basis_converter.py Convert a Jaguar basis record to a native python format. This program is part of the PyQuante quantum chemistry suite. PyQuante is copyright (c) 2002 Richard P. Muller. All Rights Reserved. You may contact the author at rpm@wag.caltech.edu. This program is free softw...
34.617647
76
0.481308
0eb89d848120d9018abefbfc5157d132b66f497f
139
py
Python
python_3/aula10a.py
felipesch92/CursoEmVideo
df443e4771adc4506c96d8f419aa7acb97b28366
[ "MIT" ]
null
null
null
python_3/aula10a.py
felipesch92/CursoEmVideo
df443e4771adc4506c96d8f419aa7acb97b28366
[ "MIT" ]
null
null
null
python_3/aula10a.py
felipesch92/CursoEmVideo
df443e4771adc4506c96d8f419aa7acb97b28366
[ "MIT" ]
null
null
null
if 5 > 3: print('5 é maior que 3') else: print('5 não é maior que 3') print('5 é maior que 3' if 5 > 3 else '5 não é maior que 3')
23.166667
60
0.582734
3768e61dd43aba147dd49389e546ec40fc87d8bf
1,419
py
Python
Chapter07/07_fcn_32s_keras.py
PacktPublishing/Practical-Computer-Vision
8cf8ee58d306e0fb1a2e21b6518136bb4c174ff5
[ "MIT" ]
23
2018-02-28T05:00:34.000Z
2022-02-04T13:26:03.000Z
Chapter07/07_fcn_32s_keras.py
PacktPublishing/Practical-Computer-Vision
8cf8ee58d306e0fb1a2e21b6518136bb4c174ff5
[ "MIT" ]
4
2018-03-23T11:35:31.000Z
2022-01-31T14:52:57.000Z
Chapter07/07_fcn_32s_keras.py
PacktPublishing/Practical-Computer-Vision
8cf8ee58d306e0fb1a2e21b6518136bb4c174ff5
[ "MIT" ]
23
2018-02-08T03:17:16.000Z
2022-01-03T09:12:47.000Z
from keras.models import * from keras.layers import * from keras.applications.vgg16 import VGG16 def create_model_fcn32(nb_class, input_w=256): """ Create FCN-32s model for segmentaiton. Input: nb_class: number of detection categories input_w: input width, using square image Returns m...
33.785714
74
0.627907
ea11e6903e2d0696fffa09b8d9d3fa1d9fba8eba
67,569
py
Python
spectractor/fit/fitter.py
LSSTDESC/Spectractor
547f2ed6a6882ddc66030e2be989bee38401f213
[ "BSD-3-Clause" ]
14
2018-04-05T06:55:32.000Z
2021-12-28T09:44:18.000Z
spectractor/fit/fitter.py
LSSTDESC/Spectractor
547f2ed6a6882ddc66030e2be989bee38401f213
[ "BSD-3-Clause" ]
73
2018-04-23T09:39:07.000Z
2022-03-29T14:08:18.000Z
spectractor/fit/fitter.py
LSSTDESC/Spectractor
547f2ed6a6882ddc66030e2be989bee38401f213
[ "BSD-3-Clause" ]
6
2018-07-05T05:36:25.000Z
2020-04-10T10:52:38.000Z
from iminuit import Minuit from scipy import optimize from schwimmbad import MPIPool import emcee import time import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator import numpy as np import sys import os import multiprocessing from spectractor import parameters from spectractor.config import set_lo...
43.14751
181
0.556187
2dd52a741d4c910b5b7360bc99589f35d51f8da3
298
py
Python
tests/kivy_garden/qrcode/test_qrcode.py
AndiEcker/qrcode
79673e9cb57cbc44d9c6a9e7970cb51b80f6df6b
[ "MIT" ]
7
2019-10-25T00:46:16.000Z
2022-03-19T20:47:14.000Z
tests/kivy_garden/qrcode/test_qrcode.py
AndiEcker/qrcode
79673e9cb57cbc44d9c6a9e7970cb51b80f6df6b
[ "MIT" ]
16
2019-10-26T13:30:40.000Z
2021-03-14T11:32:57.000Z
tests/kivy_garden/qrcode/test_qrcode.py
AndiEcker/qrcode
79673e9cb57cbc44d9c6a9e7970cb51b80f6df6b
[ "MIT" ]
4
2019-10-25T00:48:09.000Z
2022-01-27T16:49:24.000Z
from kivy_garden.qrcode import QRCodeWidget class TestQRCodeWidget: def test_init(self): """ Simply initialises the widget and checks a property. """ qrcode_widget = QRCodeWidget() assert qrcode_widget.loading_image == 'data/images/image-loading.gif'
24.833333
77
0.677852
fb1ef459ec8a83cdd8057f7844344e12a67e47b3
6,441
py
Python
tests/alerters/telegram_test.py
konstantin-kornienko/elastalert2
3e34751bf53b49cc12b923e5e6d3438fe5753611
[ "Apache-2.0" ]
null
null
null
tests/alerters/telegram_test.py
konstantin-kornienko/elastalert2
3e34751bf53b49cc12b923e5e6d3438fe5753611
[ "Apache-2.0" ]
null
null
null
tests/alerters/telegram_test.py
konstantin-kornienko/elastalert2
3e34751bf53b49cc12b923e5e6d3438fe5753611
[ "Apache-2.0" ]
null
null
null
import json import logging import pytest from unittest import mock from requests import RequestException from requests.auth import HTTPProxyAuth from elastalert.alerters.telegram import TelegramAlerter from elastalert.loaders import FileRulesLoader from elastalert.util import EAException def test_telegram(caplog):...
31.729064
130
0.613569
10ff1512834ddaca1df0d6277b249f2a8a0d5a76
559
py
Python
randomized_uncertain_social_preferences/rusp/test_env_oasis.py
bglick13/multi-agent-emergence-environments
e02d66f0734d95470d15a4508ff369a75fa093a4
[ "MIT" ]
1,317
2019-09-17T15:50:42.000Z
2022-03-30T18:24:24.000Z
randomized_uncertain_social_preferences/rusp/test_env_oasis.py
jihan1218/multi-agent-predator-prey
ebf11e601de07e80c27c87dc41837d91f53e9465
[ "MIT" ]
35
2019-09-20T11:36:20.000Z
2022-02-10T00:24:27.000Z
randomized_uncertain_social_preferences/rusp/test_env_oasis.py
jihan1218/multi-agent-predator-prey
ebf11e601de07e80c27c87dc41837d91f53e9465
[ "MIT" ]
279
2019-09-18T00:14:19.000Z
2022-03-30T09:39:12.000Z
import subprocess import unittest import os EXAMPLES_DIR = os.path.dirname(os.path.abspath(__file__)) EXAMINE_FILE_PATH = os.path.join(EXAMPLES_DIR, "../../bin/examine.py") class ExamineTest(unittest.TestCase): def test_examine_env(self): envs = [ "env_oasis.py" ] for env in e...
29.421053
99
0.620751
883e71720b9f0c7e4186408e03c38b8755b69591
43,150
py
Python
sdscli/adapters/hysds/fabfile.py
sdskit/sdscli
9bb96e880c8251d1dce56b901c1289ed80f83ce7
[ "Apache-2.0" ]
null
null
null
sdscli/adapters/hysds/fabfile.py
sdskit/sdscli
9bb96e880c8251d1dce56b901c1289ed80f83ce7
[ "Apache-2.0" ]
24
2018-03-14T15:37:38.000Z
2021-11-30T21:59:44.000Z
sdscli/adapters/hysds/fabfile.py
sdskit/sdscli
9bb96e880c8251d1dce56b901c1289ed80f83ce7
[ "Apache-2.0" ]
13
2018-02-22T15:01:35.000Z
2019-02-07T18:58:57.000Z
""" Fabric file for HySDS. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from sdscli.prompt_utils import highlight, blink from sdscli.conf_utils import get_user_config_path, get_user_files_path from sdscli.log_u...
36.018364
176
0.627486
81f1731e3477258d79fb08e4036db0cea44d216c
50
py
Python
src/game/player.py
ziyadedher/ml-game-base
de9e68b385cc5c49c584577df8ea9ce45ef31b4e
[ "MIT" ]
null
null
null
src/game/player.py
ziyadedher/ml-game-base
de9e68b385cc5c49c584577df8ea9ce45ef31b4e
[ "MIT" ]
null
null
null
src/game/player.py
ziyadedher/ml-game-base
de9e68b385cc5c49c584577df8ea9ce45ef31b4e
[ "MIT" ]
null
null
null
"""Manages the player independent of the game."""
25
49
0.72
2301408459fb77e8bffd9a4e251c7f3d2db89c9f
14,297
py
Python
addons/account/tests/test_tax_report.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
addons/account/tests/test_tax_report.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
addons/account/tests/test_tax_report.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged @tagged('post_install', '-at_install') class TaxReportTest(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_tem...
49.98951
222
0.638665
31fde5c69a5219440b7aabd672f18928d88b9d4f
6,082
py
Python
simple_icd_10.py
StefanoTrv/simple_icd_10
4995baacb8a5f5e78c067a5c17734ff1af283704
[ "CC0-1.0" ]
8
2020-12-07T14:41:00.000Z
2022-02-05T09:15:44.000Z
simple_icd_10.py
StefanoTrv/simple-icd-10
c1a0d15ab6a7a924bfaac3d889716380e5441370
[ "CC0-1.0" ]
2
2021-08-16T09:55:18.000Z
2021-09-23T21:00:31.000Z
simple_icd_10.py
StefanoTrv/simple-icd-10
c1a0d15ab6a7a924bfaac3d889716380e5441370
[ "CC0-1.0" ]
null
null
null
import xml.etree.ElementTree as ET try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as pkg_resources import data # relative-import the "package" containing the data chapter_list = [] code_to_node = {} all_c...
28.157407
89
0.643374
43512cc067e70620f4ec0c95779359cf60eea53b
5,572
py
Python
configs/representation/ssb/ssb_r18_ncg_sgd_cos_50e_r2_2x8x1_k400.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
configs/representation/ssb/ssb_r18_ncg_sgd_cos_50e_r2_2x8x1_k400.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
configs/representation/ssb/ssb_r18_ncg_sgd_cos_50e_r2_2x8x1_k400.py
happywu/mmaction2-CycleContrast
019734e471dffd1161b7a9c617ba862d2349a96c
[ "Apache-2.0" ]
null
null
null
# model settings temperature = 0.2 with_norm = True query_dim = 128 model = dict( type='SimSiamBaseTracker', backbone=dict( type='ResNet', pretrained=None, depth=18, out_indices=(3, ), # strides=(1, 2, 1, 1), norm_cfg=dict(type='SyncBN', requires_grad=True), ...
30.78453
78
0.61827
ebf5b5c7e4c142c242656d1f859b26eeb4ce462a
5,555
py
Python
GoogleTTS.py
zisti/79
775cce82c67bf45317f235f5dd2696203de3b21f
[ "MIT" ]
110
2015-01-10T14:11:03.000Z
2022-03-25T14:53:56.000Z
GoogleTTS.py
zisti/79
775cce82c67bf45317f235f5dd2696203de3b21f
[ "MIT" ]
4
2015-02-08T21:55:49.000Z
2018-04-25T18:51:52.000Z
GoogleTTS.py
zisti/79
775cce82c67bf45317f235f5dd2696203de3b21f
[ "MIT" ]
44
2015-01-04T23:18:25.000Z
2022-03-25T14:53:58.000Z
#!/usr/bin/python import sys import argparse import re import urllib, urllib2 import time from collections import namedtuple def split_text(input_text, max_length=100): """ Try to split between sentences to avoid interruptions mid-sentence. Failing that, split between words. See split_text_rec ""...
38.576389
91
0.578398
4dc558e78479f2fc07c46b49a21c0c61024a7498
397
py
Python
DjangoKoan/wsgi.py
sarvex/DjangoKoans
a4ba1e787dc508d1706897f26d3e91219ad5d982
[ "0BSD" ]
null
null
null
DjangoKoan/wsgi.py
sarvex/DjangoKoans
a4ba1e787dc508d1706897f26d3e91219ad5d982
[ "0BSD" ]
null
null
null
DjangoKoan/wsgi.py
sarvex/DjangoKoans
a4ba1e787dc508d1706897f26d3e91219ad5d982
[ "0BSD" ]
null
null
null
""" WSGI config for DjangoKoan 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/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
23.352941
78
0.788413
ac66e9927f71bc58680e077b0dd19f9c2c6ce41a
789
py
Python
src/main.py
lukefav/Reinforcement-Learning-Sandbox
0f705e9f0d663594c7169839c55fd8e6b5d01c7b
[ "MIT" ]
null
null
null
src/main.py
lukefav/Reinforcement-Learning-Sandbox
0f705e9f0d663594c7169839c55fd8e6b5d01c7b
[ "MIT" ]
null
null
null
src/main.py
lukefav/Reinforcement-Learning-Sandbox
0f705e9f0d663594c7169839c55fd8e6b5d01c7b
[ "MIT" ]
null
null
null
import argparse from argparse import RawTextHelpFormatter from q_learning.q_learning import QLearning def main(): help_description = "Choose Project:\n" \ "0: QLearning" parser = argparse.ArgumentParser(description="Choose Reinforcement Learning Project", ...
27.206897
89
0.627376
045617c66a6763adac6a0a732fcb31d244e7bdfb
4,316
py
Python
PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
PhysicsTools/SelectorUtils/python/VIDSelectorValidator.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from __future__ import print_function import md5 import ROOT # load FWLite C++ libraries ROOT.gSystem.Load("libFWCoreFWLite.so") ROOT.gSystem.Load("libDataFormatsFWLite.so") ROOT.FWLiteEnabler.enable() #cms python data types import FWCore.ParameterSet.Config as cms # load FWlite python libraries from DataFormats.FWL...
35.669421
101
0.596386
71dc823685969f017e26e36c4383e28ba3f8196e
2,172
py
Python
nstcentertainmentbot/helpers/database/spotify_sql.py
TharukRenuja/NSTC-ENTERTAINMENT-BOT
683bf584fa8c87c7249ea462fbffb5b0879b8633
[ "MIT" ]
1
2021-10-04T07:48:47.000Z
2021-10-04T07:48:47.000Z
nstcentertainmentbot/helpers/database/spotify_sql.py
TharukRenuja/NSTC-ENTERTAINMENT-BOT
683bf584fa8c87c7249ea462fbffb5b0879b8633
[ "MIT" ]
null
null
null
nstcentertainmentbot/helpers/database/spotify_sql.py
TharukRenuja/NSTC-ENTERTAINMENT-BOT
683bf584fa8c87c7249ea462fbffb5b0879b8633
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # MIT License # Copyright (c) 2021 Tharuk , This is a part of nstcentertainmentbot # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE ...
31.478261
83
0.710866
49d689e7329299832a2abc18d9c46a87998afd36
3,966
py
Python
nodes/skadilance.py
fryougi/farmbot
739511965cdbcba444fd39235da2dbed84809cba
[ "MIT" ]
1
2020-07-02T18:06:41.000Z
2020-07-02T18:06:41.000Z
nodes/skadilance.py
fryougi/farmbot
739511965cdbcba444fd39235da2dbed84809cba
[ "MIT" ]
null
null
null
nodes/skadilance.py
fryougi/farmbot
739511965cdbcba444fd39235da2dbed84809cba
[ "MIT" ]
1
2020-06-29T04:18:42.000Z
2020-06-29T04:18:42.000Z
# -*- coding: utf-8 -*- """ LSS (2k4) Lancelot YourOwnSkader SupportSkader """ # Adding to the system path is needed # because no longer in parent directory # and I want to run this file as a script import sys, os sys.path.append(os.path.abspath('../')) import farmbot as fb class Farmer_DSS(fb.Farmbot): def __init_...
23.607143
81
0.590267
0e8fe5ba20fe2167d28a9366dab7c347244b12a8
2,487
py
Python
deepdrive_zero/experiments/intersection_2_agents_fine_tune_collision_resume_add_comfort1.py
shantanuwadnerkar/deepdrive-zero
3134a5b092a53ff60e4207d7419fd6a19cb5a6e9
[ "MIT" ]
null
null
null
deepdrive_zero/experiments/intersection_2_agents_fine_tune_collision_resume_add_comfort1.py
shantanuwadnerkar/deepdrive-zero
3134a5b092a53ff60e4207d7419fd6a19cb5a6e9
[ "MIT" ]
null
null
null
deepdrive_zero/experiments/intersection_2_agents_fine_tune_collision_resume_add_comfort1.py
shantanuwadnerkar/deepdrive-zero
3134a5b092a53ff60e4207d7419fd6a19cb5a6e9
[ "MIT" ]
null
null
null
import os import sys from deepdrive_zero.experiments import utils from spinup.utils.run_utils import ExperimentGrid from spinup import ppo_pytorch import torch experiment_name = os.path.basename(__file__)[:-3] notes = """Previously, we diverged by forgetting how to avoid collisions. However, g-force/jerk did fall and...
42.87931
231
0.7692
eec9d821076d4e657808a530fe841598fb6097ee
3,883
py
Python
datacube/ui/common.py
Kirill888/datacube-core
996b395e15f975decb77c0ca9fa0555177674b2f
[ "Apache-2.0" ]
2
2019-10-24T15:29:54.000Z
2019-10-24T15:29:58.000Z
datacube/ui/common.py
Kirill888/datacube-core
996b395e15f975decb77c0ca9fa0555177674b2f
[ "Apache-2.0" ]
2
2021-03-26T00:37:36.000Z
2021-03-31T20:05:01.000Z
datacube/ui/common.py
Kirill888/datacube-core
996b395e15f975decb77c0ca9fa0555177674b2f
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ Common methods for UI code. """ from pathlib import Path from typing import Union from toolz.functoolz import identity from datacube.utils import read_documents, InvalidDocException, SimpleDocNav, is_supported_document_type, is_url def get_metadata_path(possible_path: Union[str, Path]): """ ...
32.630252
115
0.68993
56f5dbc9ef3ce178368b9a59a6cb1a180da3b181
5,003
py
Python
datamax_printer/datamax_printer.py
inNETMonitoring/datamax-python-adapter
ca47992a3a1f30577a90e6ea01d5f0aae79f8dfb
[ "MIT" ]
1
2019-05-20T18:48:16.000Z
2019-05-20T18:48:16.000Z
datamax_printer/datamax_printer.py
inNETMonitoring/datamax-python-adapter
ca47992a3a1f30577a90e6ea01d5f0aae79f8dfb
[ "MIT" ]
2
2019-06-19T09:36:23.000Z
2021-10-20T22:33:49.000Z
datamax_printer/datamax_printer.py
inNETMonitoring/datamax-python-adapter
ca47992a3a1f30577a90e6ea01d5f0aae79f8dfb
[ "MIT" ]
3
2019-06-18T12:34:19.000Z
2021-03-17T12:57:39.000Z
import socket class DPLPrinter: SOH = '\x01' STX = '\x02' command_mode = True def __init__(self, printer_ip, printer_port=9100): self.printer = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.connection_info = (printer_ip, printer_port) self.printer.connect(self.connec...
38.782946
120
0.608035
e0ea5ef69acc96ddbf81d992d4bd0d6e4a0f3c53
1,427
py
Python
python/misc/collatz_conjecture.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
null
null
null
python/misc/collatz_conjecture.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
2
2022-03-10T03:49:14.000Z
2022-03-14T00:49:54.000Z
python/misc/collatz_conjecture.py
christopher-burke/warmups
140c96ada87ec5e9faa4622504ddee18840dce4a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Collatz Conjecture. A Collatz sequence is generated like this. Start with a positive number. If it's even, halve it. If it's odd, multiply it by 3 and add one. Repeat the process with the resulting number. The Collatz Conjecture is that every sequence eventually reaches 1 (continuing past ...
27.980392
75
0.673441
c3c3b36b48c0af9437451e9c88202a4b3f891459
1,712
py
Python
src/autoks/core/prior.py
lschlessinger1/MS-project
e1c02d1d1a7a2480ff6f14f30625dc42ee3417e3
[ "MIT" ]
2
2019-04-29T15:18:11.000Z
2019-12-13T18:58:40.000Z
src/autoks/core/prior.py
lschlessinger1/MS-project
e1c02d1d1a7a2480ff6f14f30625dc42ee3417e3
[ "MIT" ]
275
2019-02-19T22:59:39.000Z
2020-10-03T08:56:08.000Z
src/autoks/core/prior.py
lschlessinger1/MS-project
e1c02d1d1a7a2480ff6f14f30625dc42ee3417e3
[ "MIT" ]
null
null
null
import importlib from typing import Type from src.autoks.backend.prior import RawPriorType, PRIOR_DICT from src.evalg.serialization import Serializable class PriorDist(Serializable): """Wrapper for backend prior.""" def __init__(self, raw_prior_cls: Type[RawPriorType], raw_prior_args: dict): self._r...
35.666667
112
0.702687