hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
4
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
4
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
d5d0fdb2370c9616641e6f0df9f0b6b27e831f8f
90
py
Python
qiskit/simulators/__init__.py
emmabostian/qiskit-sdk-py
2feba1cba156ba85fc840630c62a793099f208d0
[ "Apache-2.0" ]
2
2020-11-17T18:49:44.000Z
2021-02-16T11:01:41.000Z
qiskit/simulators/__init__.py
emmabostian/qiskit-sdk-py
2feba1cba156ba85fc840630c62a793099f208d0
[ "Apache-2.0" ]
null
null
null
qiskit/simulators/__init__.py
emmabostian/qiskit-sdk-py
2feba1cba156ba85fc840630c62a793099f208d0
[ "Apache-2.0" ]
null
null
null
# just one import. _localsimulator takes care of the rest. from ._localsimulator import *
30
58
0.788889
d5d1262b181fbd297a1413f7ee86bd887f4b631d
9,378
py
Python
tests/test_span.py
jaegertracing/jaeger-client-python
a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b
[ "Apache-2.0" ]
372
2017-10-31T21:51:26.000Z
2022-03-23T10:36:19.000Z
tests/test_span.py
jaegertracing/jaeger-client-python
a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b
[ "Apache-2.0" ]
276
2017-10-10T11:33:50.000Z
2022-03-24T16:36:16.000Z
tests/test_span.py
jaegertracing/jaeger-client-python
a6c973158bf9b02cd7f5a966ccfd29ab86c44a5b
[ "Apache-2.0" ]
157
2017-10-09T07:16:41.000Z
2021-12-29T14:49:26.000Z
# Copyright (c) 2016 Uber Technologies, 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 ...
34.733333
77
0.605353
d5d1765c2801295014df65a1d74d110d18721c09
332
py
Python
Exercicios do curso em video/pythonProject/pythonexercicios/ex018.py
HiCosta/Exercicios-de-Python
1dabbe8764f6742aba1d62a9ea14705534aaf6f7
[ "MIT" ]
null
null
null
Exercicios do curso em video/pythonProject/pythonexercicios/ex018.py
HiCosta/Exercicios-de-Python
1dabbe8764f6742aba1d62a9ea14705534aaf6f7
[ "MIT" ]
null
null
null
Exercicios do curso em video/pythonProject/pythonexercicios/ex018.py
HiCosta/Exercicios-de-Python
1dabbe8764f6742aba1d62a9ea14705534aaf6f7
[ "MIT" ]
null
null
null
import math ang = float(input('Digite um ângulo: ')) seno = math.sin(math.radians(ang)) print('O ângulo {} tem o seno {:.2f}'.format(ang, seno)) cos = math.cos(math.radians(ang)) print('O ângulo {} tem o cosseno {:.2f}'.format(ang, cos)) tan = math.tan(math.radians(ang)) print('O ângulo {} tem a tangente {:.2f}'.format...
36.888889
59
0.662651
d5d17929c1408c16247abe0fc6434eb0cea71122
8,801
py
Python
indico/modules/events/abstracts/fields.py
javfg/indico
2634756ba1e9caf6dd8fc9afc3f47291fda5816d
[ "MIT" ]
null
null
null
indico/modules/events/abstracts/fields.py
javfg/indico
2634756ba1e9caf6dd8fc9afc3f47291fda5816d
[ "MIT" ]
null
null
null
indico/modules/events/abstracts/fields.py
javfg/indico
2634756ba1e9caf6dd8fc9afc3f47291fda5816d
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from operator import attrgetter from flask import request, session from sqlalchemy.orm import joinedload ...
39.823529
118
0.695035
d5d1dcb04dc02da002ebee15a3a9cfced5a7c4e1
4,450
py
Python
Librarium/catalog/models.py
spideyclick/Librarium
63e96bd90c5ae43c46c87eb3c8ac50883af306bf
[ "MIT" ]
1
2020-03-19T15:49:48.000Z
2020-03-19T15:49:48.000Z
Librarium/catalog/models.py
spideyclick/Librarium
63e96bd90c5ae43c46c87eb3c8ac50883af306bf
[ "MIT" ]
null
null
null
Librarium/catalog/models.py
spideyclick/Librarium
63e96bd90c5ae43c46c87eb3c8ac50883af306bf
[ "MIT" ]
null
null
null
import uuid # Required for unique book instances from django.urls import reverse # Used to generate URLs by reversing the URL patterns from django.db import models from django.contrib.auth.models import User from datetime import date # Create your models here. from django.db import models class Genre(models.Model): ...
37.083333
135
0.671011
d5d1eda3d5052a21fd7463dc9667ba591fe4e5f7
1,803
py
Python
algorithms/break_number_to_unordered_sum_of_terms.py
vadymshturkhal/algorithms
7eb6b3b0b8d389fdbbcc9ff48712d398f04c343d
[ "MIT" ]
null
null
null
algorithms/break_number_to_unordered_sum_of_terms.py
vadymshturkhal/algorithms
7eb6b3b0b8d389fdbbcc9ff48712d398f04c343d
[ "MIT" ]
null
null
null
algorithms/break_number_to_unordered_sum_of_terms.py
vadymshturkhal/algorithms
7eb6b3b0b8d389fdbbcc9ff48712d398f04c343d
[ "MIT" ]
null
null
null
def break_number_to_unordered_sum_of_terms(number: int, terms=None, memoize=None): """ Assume number >= 0. Default terms from 1 to number. Returns quantity of unordered sum of terms from "terms". Theorem: F(n: [n1, n2,...,nk]) = F(n - n1: [n1, n2,...,nk]) + F(n: [n2,...,n...
26.130435
114
0.534664
d5d206a94d44c8c202e35d92571bc113fbf7c6ac
266
py
Python
erpnext2alfresco/erpnext2alfresco/doctype/user_mapping/test_user_mapping.py
CWTGMBH/erpnext2alfresco
a6ac05a48b16dff568e670749cfca3b0ceaf049d
[ "MIT" ]
null
null
null
erpnext2alfresco/erpnext2alfresco/doctype/user_mapping/test_user_mapping.py
CWTGMBH/erpnext2alfresco
a6ac05a48b16dff568e670749cfca3b0ceaf049d
[ "MIT" ]
null
null
null
erpnext2alfresco/erpnext2alfresco/doctype/user_mapping/test_user_mapping.py
CWTGMBH/erpnext2alfresco
a6ac05a48b16dff568e670749cfca3b0ceaf049d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Arizem and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('User Mapping') class TestUserMapping(unittest.TestCase): pass
20.461538
56
0.770677
d5d211a551290ab0be3a4f6800d25187094bba4d
25,011
py
Python
dl/step30/train.py
huachao2017/goodsdl
3616d53b90696a97a5d56a064e2a14d484b821d7
[ "Apache-2.0" ]
3
2018-10-16T09:36:12.000Z
2019-04-15T03:12:49.000Z
dl/step30/train.py
huachao2017/goodsdl
3616d53b90696a97a5d56a064e2a14d484b821d7
[ "Apache-2.0" ]
null
null
null
dl/step30/train.py
huachao2017/goodsdl
3616d53b90696a97a5d56a064e2a14d484b821d7
[ "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 applicable ...
38.776744
110
0.616649
d5d26f12d70b2f3e0ec09bf735970c8a8f58a66c
27
py
Python
torchlib/datasets/__init__.py
pedrodiamel/pytorch-classification
0fa9f597ba1e7cf8fcde322e2e9ee924970593aa
[ "MIT" ]
9
2019-03-27T12:40:15.000Z
2021-12-20T12:57:59.000Z
torchlib/datasets/__init__.py
pedrodiamel/pytorch-classification
0fa9f597ba1e7cf8fcde322e2e9ee924970593aa
[ "MIT" ]
null
null
null
torchlib/datasets/__init__.py
pedrodiamel/pytorch-classification
0fa9f597ba1e7cf8fcde322e2e9ee924970593aa
[ "MIT" ]
null
null
null
# from .datasets import *
9
25
0.666667
d5d2c5a7a3b25dd1136ebdcfdb969351ce99ba1e
498
py
Python
app/core/migrations/0009_alter_event_user.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
app/core/migrations/0009_alter_event_user.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
app/core/migrations/0009_alter_event_user.py
Misiaty-Mat/Event-schedule
15ab5ec3d49b1f16e43a8d90709df5d143401c7a
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-01-27 20:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0008_event_user'), ] operations = [ migrations.AlterField( ...
23.714286
110
0.65261
d5d2d7f7f37c20faba899dd183b1d9f96a1f28b0
517
py
Python
ersteops/emergency/migrations/0002_emergency_units.py
Prescrypto/ErsteOps
0b744173fb4f500003c96c4dcb26fb67d6eaa5ec
[ "MIT" ]
null
null
null
ersteops/emergency/migrations/0002_emergency_units.py
Prescrypto/ErsteOps
0b744173fb4f500003c96c4dcb26fb67d6eaa5ec
[ "MIT" ]
33
2017-11-24T19:44:57.000Z
2022-02-12T07:02:53.000Z
ersteops/emergency/migrations/0002_emergency_units.py
Prescrypto/ErsteOps
0b744173fb4f500003c96c4dcb26fb67d6eaa5ec
[ "MIT" ]
1
2017-12-11T09:15:04.000Z
2017-12-11T09:15:04.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-02-08 01:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('unit', '0001_initial'), ('emergency', '0001_initial'), ] operations = [ ...
23.5
91
0.609284
d5d34bc82fb1a36c049367d6b8e1d2b319743911
4,031
py
Python
exercises/04/operator_from_scratch.py
burgerdev/ilastik-tutorial
e037a88e1fb68eac045dbfda44d21ab160e35647
[ "CC0-1.0" ]
null
null
null
exercises/04/operator_from_scratch.py
burgerdev/ilastik-tutorial
e037a88e1fb68eac045dbfda44d21ab160e35647
[ "CC0-1.0" ]
null
null
null
exercises/04/operator_from_scratch.py
burgerdev/ilastik-tutorial
e037a88e1fb68eac045dbfda44d21ab160e35647
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python """ In this exercise, we will write the thresholding operator from exercise 3 without inheriting from OpArrayPiper. Rewriting it from scratch will give us more control about the output we're producing. """ """ In the last exercise, I mentioned that it would be nice if our output would be a bool ...
31.740157
72
0.638799
d5d3650e600ad773d99f21bdaa44355cc82d685a
1,318
py
Python
tensorflow/contrib/tfprof/__init__.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/contrib/tfprof/__init__.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tensorflow/contrib/tfprof/__init__.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# Copyright 2015 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...
35.621622
80
0.754173
d5d3681ddefefec851cb851e3fb8c62ef9f9b7f9
196
py
Python
assignment_dashboard/database.py
osteele/assignment-dashboard
4442587630cd1f55ae3302e96ddef7fd83caba16
[ "MIT" ]
null
null
null
assignment_dashboard/database.py
osteele/assignment-dashboard
4442587630cd1f55ae3302e96ddef7fd83caba16
[ "MIT" ]
12
2017-02-05T23:38:08.000Z
2017-02-07T14:42:16.000Z
assignment_dashboard/database.py
olin-computing/assignment-dashboard
4442587630cd1f55ae3302e96ddef7fd83caba16
[ "MIT" ]
null
null
null
from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy from . import app db = SQLAlchemy(app) migrate = Migrate(app, db) # for re-export session = db.session Base = db.Model
16.333333
39
0.770408
d5d3884ded6f455ca15d9bfe7b99a472356dbdd4
1,363
py
Python
trydjango/urls.py
airinasha/try-django1
a03baea6129a5e5974dedb002bdf405a0385ea55
[ "MIT" ]
null
null
null
trydjango/urls.py
airinasha/try-django1
a03baea6129a5e5974dedb002bdf405a0385ea55
[ "MIT" ]
null
null
null
trydjango/urls.py
airinasha/try-django1
a03baea6129a5e5974dedb002bdf405a0385ea55
[ "MIT" ]
null
null
null
"""trydjango URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.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') Class-bas...
34.075
77
0.685253
d5d3a1b731f8fc0222cc8f9b90711478346cc1a6
4,226
py
Python
utils/isomap_neighbours_pipeline.py
lzamparo/SdA_reduce
1dc11f23b395f316df5f41448542d2d5c2e619ff
[ "BSD-3-Clause" ]
null
null
null
utils/isomap_neighbours_pipeline.py
lzamparo/SdA_reduce
1dc11f23b395f316df5f41448542d2d5c2e619ff
[ "BSD-3-Clause" ]
null
null
null
utils/isomap_neighbours_pipeline.py
lzamparo/SdA_reduce
1dc11f23b395f316df5f41448542d2d5c2e619ff
[ "BSD-3-Clause" ]
null
null
null
""" ========== ISOMAP neighbours parameter CV pipeline ========== Use a pipeline to find the best neighbourhood size parameter for ISOMAP. Adapted from: http://scikit-learn.org/stable/auto_examples/decomposition/plot_kernel_pca.html#example-decomposition-plot-kernel-pca-py http://scikit-learn.org/stable/auto...
32.259542
124
0.729295
d5d3b945c839d535f083f5a3455b79ffecd607af
948
py
Python
tests/conftest.py
ConnectionMaster/robotpy-wpilib-utilities
b62e563c7df113e9e513a36b9039f47f34157be1
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
ConnectionMaster/robotpy-wpilib-utilities
b62e563c7df113e9e513a36b9039f47f34157be1
[ "BSD-3-Clause" ]
1
2022-03-15T18:03:43.000Z
2022-03-15T18:03:43.000Z
tests/conftest.py
ConnectionMaster/robotpy-wpilib-utilities
b62e563c7df113e9e513a36b9039f47f34157be1
[ "BSD-3-Clause" ]
null
null
null
# TODO: remove this once WPILib is public, and use the real thing import sys import pytest from unittest.mock import MagicMock def pytest_runtest_setup(): pass def pytest_runtest_teardown(): pass @pytest.fixture(scope="function") def wpimock(monkeypatch): mock = MagicMock(name="wpimock") monkeyp...
18.230769
65
0.695148
d5d3dbced3b02fbcc07f7caac160d49eca64148b
7,304
py
Python
tests/mechanic/launcher_test.py
alexsapran/rally
6c4164bcc681b267feac969c100809964aac9c8f
[ "Apache-2.0" ]
2
2019-04-11T10:45:11.000Z
2019-06-05T15:24:05.000Z
tests/mechanic/launcher_test.py
alexsapran/rally
6c4164bcc681b267feac969c100809964aac9c8f
[ "Apache-2.0" ]
null
null
null
tests/mechanic/launcher_test.py
alexsapran/rally
6c4164bcc681b267feac969c100809964aac9c8f
[ "Apache-2.0" ]
null
null
null
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
41.265537
119
0.637596
d5d3df625d4fedf2ae2e676d3375a78c694c1660
686
py
Python
py/cidoc_crm_types/properties/p100_was_death_of.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
py/cidoc_crm_types/properties/p100_was_death_of.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
py/cidoc_crm_types/properties/p100_was_death_of.py
minorg/cidoc-crm-types
9018bdbf0658e4d28a87bc94543e467be45d8aa5
[ "Apache-2.0" ]
null
null
null
from .p93_took_out_of_existence import P93TookOutOfExistence from dataclasses import dataclass @dataclass class P100WasDeathOf(P93TookOutOfExistence): """ Scope note: This property links an E69 instance of E69 Death event to the instance of E21 Person that died. An instance of E69 Death may involve multiple peop...
27.44
102
0.752187
d5d3e1f91e9809cc19440ffe59a6d85c5b202b7e
22,020
py
Python
pytests/2i/indexcreatedrop_2i.py
scottwedge/testrunner
eac59d7737e4c3d75cc705dfb7712bb9de69f482
[ "Apache-2.0" ]
1
2020-08-31T18:51:45.000Z
2020-08-31T18:51:45.000Z
pytests/2i/indexcreatedrop_2i.py
scottwedge/testrunner
eac59d7737e4c3d75cc705dfb7712bb9de69f482
[ "Apache-2.0" ]
null
null
null
pytests/2i/indexcreatedrop_2i.py
scottwedge/testrunner
eac59d7737e4c3d75cc705dfb7712bb9de69f482
[ "Apache-2.0" ]
2
2020-07-24T07:12:01.000Z
2022-03-17T23:43:28.000Z
import logging from .base_2i import BaseSecondaryIndexingTests from couchbase_helper.query_definitions import QueryDefinition from membase.api.rest_client import RestConnection from membase.helper.bucket_helper import BucketOperationHelper from remote.remote_util import RemoteMachineShellConnection log = logging.getL...
51.090487
207
0.638011
d5d3eac5b583960bf0e45939d80977c887033d8a
1,791
py
Python
IMLearn/metrics/loss_functions.py
snatchysquid/IML.HUJI
4742dd4a3526577e3c297455440cafd4fb3497e9
[ "MIT" ]
null
null
null
IMLearn/metrics/loss_functions.py
snatchysquid/IML.HUJI
4742dd4a3526577e3c297455440cafd4fb3497e9
[ "MIT" ]
null
null
null
IMLearn/metrics/loss_functions.py
snatchysquid/IML.HUJI
4742dd4a3526577e3c297455440cafd4fb3497e9
[ "MIT" ]
null
null
null
import numpy as np def mean_square_error(y_true: np.ndarray, y_pred: np.ndarray) -> float: """ Calculate MSE loss Parameters ---------- y_true: ndarray of shape (n_samples, ) True response values y_pred: ndarray of shape (n_samples, ) Predicted response values Returns ...
23.88
101
0.629816
d5d3ed37c938c89b793b34870d4f2d6b57664e1c
1,607
py
Python
lawyerd/dbtemplates/migrations/0001_initial.py
loobinsk/customer_project
4f43d4c6db2c99926715ea16451511466569c4ae
[ "MIT" ]
null
null
null
lawyerd/dbtemplates/migrations/0001_initial.py
loobinsk/customer_project
4f43d4c6db2c99926715ea16451511466569c4ae
[ "MIT" ]
null
null
null
lawyerd/dbtemplates/migrations/0001_initial.py
loobinsk/customer_project
4f43d4c6db2c99926715ea16451511466569c4ae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( nam...
36.522727
105
0.543871
d5d40f3efce1d0ec11cffb0ece41cb5e02f7a549
18,687
py
Python
cinder/volume/drivers/nexenta/ns5/nfs.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/nexenta/ns5/nfs.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/nexenta/ns5/nfs.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Nexenta Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
38.609504
79
0.565313
d5d413c56ae55de226ffdc39d62a079c945677e2
26,445
py
Python
tensorflow/contrib/lookup/lookup_ops.py
dongjiewhu/tensorflow
fac9b8830e967bb5dd9adc61f86a9b354c31744d
[ "Apache-2.0" ]
1
2017-09-30T07:16:45.000Z
2017-09-30T07:16:45.000Z
tensorflow/contrib/lookup/lookup_ops.py
dongjiewhu/tensorflow
fac9b8830e967bb5dd9adc61f86a9b354c31744d
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/lookup/lookup_ops.py
dongjiewhu/tensorflow
fac9b8830e967bb5dd9adc61f86a9b354c31744d
[ "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 applica...
38.549563
80
0.685687
d5d4173c40b947b7ea400cf351f6cd449e0cacd1
807
py
Python
srv/examples/learning_flask/models.py
floppyinfant/python_template
a24cbbb291d879d669b78055ff1fc916efa87f58
[ "MIT" ]
null
null
null
srv/examples/learning_flask/models.py
floppyinfant/python_template
a24cbbb291d879d669b78055ff1fc916efa87f58
[ "MIT" ]
null
null
null
srv/examples/learning_flask/models.py
floppyinfant/python_template
a24cbbb291d879d669b78055ff1fc916efa87f58
[ "MIT" ]
null
null
null
""" file ./models.py """ from flask.ext.sqlalchemy import SQLAlchemy from werkzeug import generate_password_hash, check_password_hash db = SQLAlchemy() class User(db.Model): __tablename__ = 'users' uid = db.Column(db.Integer, primary_key = True) firstname = db.Column(db.String(100)) lastname = db.Col...
29.888889
64
0.724907
d5d419e74777b359b028b7363fd7b30ef646f9fc
15,816
py
Python
chillpill/search.py
kevinbache/ritalin
adfe67f82f7e0d8ce07cf8bd1dd6d4f911330155
[ "MIT" ]
2
2019-06-20T21:15:01.000Z
2019-07-16T17:42:12.000Z
chillpill/search.py
kevinbache/ritalin
adfe67f82f7e0d8ce07cf8bd1dd6d4f911330155
[ "MIT" ]
null
null
null
chillpill/search.py
kevinbache/ritalin
adfe67f82f7e0d8ce07cf8bd1dd6d4f911330155
[ "MIT" ]
null
null
null
"""This module implements Google Cloud's Hyperparameter Spec YAML as a set of Python objects. See https://cloud.google.com/ml-engine/reference/rest/v1/projects.jobs#hyperparameterspec """ import abc import enum import time from typing import Text, Optional, Union, List, Dict, Callable, Any, Type import yaml import num...
34.99115
119
0.650291
d5d4372f61b7f6beef1d7737f510ec3e48ca5896
341
py
Python
geohash_cluster/__init__.py
EvgeneOskin/django-geohash-cluster
3b94055e4f1daede7962d2fc6b70075fee338f90
[ "MIT" ]
3
2019-10-05T03:54:57.000Z
2020-12-07T04:06:44.000Z
geohash_cluster/__init__.py
EvgeneOskin/django-geohash-cluster
3b94055e4f1daede7962d2fc6b70075fee338f90
[ "MIT" ]
1
2017-12-01T04:45:16.000Z
2017-12-01T04:45:16.000Z
geohash_cluster/__init__.py
EvgeneOskin/django-geohash-cluster
3b94055e4f1daede7962d2fc6b70075fee338f90
[ "MIT" ]
null
null
null
"""Geohash_cluster library is a Django application that clusters GEO Points. This package provides the following features: * cluster points by geohash; * filtering points by geohash; * Django Rest Framework filter and GIS Serializer for clusters. """ __version__ = '0.1.0' default_app_config = 'geohash_cluster.apps.G...
28.416667
76
0.794721
d5d4b15bf63bf653ca026c9b2fa456736242dd8a
421
py
Python
Python/ex033.py
maurovasconcelos/Ola-Mundo
526c6c271fbe916c4f9f22153828e4d8c726a544
[ "MIT" ]
1
2021-02-16T17:36:53.000Z
2021-02-16T17:36:53.000Z
Python/ex033.py
maurovasconcelos/Ola-Mundo
526c6c271fbe916c4f9f22153828e4d8c726a544
[ "MIT" ]
null
null
null
Python/ex033.py
maurovasconcelos/Ola-Mundo
526c6c271fbe916c4f9f22153828e4d8c726a544
[ "MIT" ]
null
null
null
a = int(input('Escreva o primeiro numero: ')) b = int(input('Escreva o segundo numero: ')) c = int(input('Escreva o terceiro numero: ')) #Verificando quem é menor menor = a if b<a and b<c: menor = b if c<a and c<b: menor = c #Verificando quem é o maior maior = a if b>a and b>c: maior = b if c>a and c>b: ...
21.05
45
0.634204
d5d4c1b1fdf2c2cc4b05407fce976633060a0d09
2,464
py
Python
alipay/aop/api/domain/AlipayOpenMiniInnerclientinfoCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenMiniInnerclientinfoCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenMiniInnerclientinfoCreateModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenMiniInnerclientinfoCreateModel(object): def __init__(self): self._bundle_id = None self._bundle_name = None self._bundle_prefix = None self._inst_code = ...
28.651163
77
0.599838
d5d4ce23e29a80d0110a5790d711a73ce415ea4c
894
py
Python
deeppavlov/core/common/errors.py
ineersa/DeepPavlov
8200bf9a0f0b378baad4ee0eb75b59453f516004
[ "Apache-2.0" ]
3
2020-04-16T04:25:10.000Z
2021-05-07T23:04:43.000Z
deeppavlov/core/common/errors.py
ineersa/DeepPavlov
8200bf9a0f0b378baad4ee0eb75b59453f516004
[ "Apache-2.0" ]
12
2020-01-28T22:14:04.000Z
2022-02-10T00:10:17.000Z
deeppavlov/core/common/errors.py
ineersa/DeepPavlov
8200bf9a0f0b378baad4ee0eb75b59453f516004
[ "Apache-2.0" ]
1
2022-02-08T14:41:28.000Z
2022-02-08T14:41:28.000Z
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
31.928571
74
0.734899
d5d4e2814eb51184cefd7f4e9dc492aad218637f
46
py
Python
btd6_memory_info/generated/System/Threading/Tasks/TaskSchedulerAwaitTaskContinuation/task_scheduler_await_task_continuation.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/System/Threading/Tasks/TaskSchedulerAwaitTaskContinuation/task_scheduler_await_task_continuation.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/System/Threading/Tasks/TaskSchedulerAwaitTaskContinuation/task_scheduler_await_task_continuation.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
class TaskSchedulerAwaitTaskContinuation: pass
46
46
0.934783
d5d50c245ac1468e3621b381000415fb92badbb9
1,697
py
Python
example/public/sling/__init__.py
tml/pyxer
4e3677b3f2c7f23ebf039a9ba9733f68a8460189
[ "MIT" ]
2
2016-01-25T06:01:14.000Z
2016-02-07T20:30:25.000Z
example/public/sling/__init__.py
tml/pyxer
4e3677b3f2c7f23ebf039a9ba9733f68a8460189
[ "MIT" ]
2
2018-03-21T06:27:50.000Z
2018-03-22T12:57:58.000Z
example/public/sling/__init__.py
tml/pyxer
4e3677b3f2c7f23ebf039a9ba9733f68a8460189
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- from pyxer.base import * from pyxer.sling import Sling, quote sling = Sling("127.0.0.1", 7777) router = Router() router.add_re("^content/(?P<path>.*?)$", controller="index", name="_content") @expose def index(path=None): log.debug("Show path %r", path) all = sling.getNodes("wiki") ...
26.936508
77
0.531526
d5d50c411233499e4ac099701e365356f94904ec
8,699
py
Python
jenkins_jobs/modules/hipchat_notif.py
ygversil/jenkins_job_builder
58a69e51ee51edc8eebe0db86eef93f032d231da
[ "Apache-2.0" ]
null
null
null
jenkins_jobs/modules/hipchat_notif.py
ygversil/jenkins_job_builder
58a69e51ee51edc8eebe0db86eef93f032d231da
[ "Apache-2.0" ]
null
null
null
jenkins_jobs/modules/hipchat_notif.py
ygversil/jenkins_job_builder
58a69e51ee51edc8eebe0db86eef93f032d231da
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # 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...
43.713568
79
0.636165
d5d50cb90ffa3c74a0a4570737635125ac0c81dd
2,550
py
Python
redash/query_runner/presto.py
steedos/redash
46d954843f229d74b5712384e74b4b0fdcef621b
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
redash/query_runner/presto.py
steedos/redash
46d954843f229d74b5712384e74b4b0fdcef621b
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
redash/query_runner/presto.py
steedos/redash
46d954843f229d74b5712384e74b4b0fdcef621b
[ "BSD-2-Clause-FreeBSD" ]
1
2021-07-27T06:27:29.000Z
2021-07-27T06:27:29.000Z
import json from redash.utils import JSONEncoder from redash.query_runner import * import logging logger = logging.getLogger(__name__) try: from pyhive import presto enabled = True except ImportError: enabled = False PRESTO_TYPES_MAPPING = { "integer" : TYPE_INTEGER, "long" : TYPE_INTEGER, ...
26.28866
106
0.519216
d5d52c639025cb0ab76757f8678c3e4e0393c3ae
6,498
py
Python
TrainingExtensions/tensorflow/test/python/test_layer_selector.py
lipovsek/aimet
236fb02cc6c45e65c067030416c49a09ace82045
[ "BSD-3-Clause" ]
null
null
null
TrainingExtensions/tensorflow/test/python/test_layer_selector.py
lipovsek/aimet
236fb02cc6c45e65c067030416c49a09ace82045
[ "BSD-3-Clause" ]
null
null
null
TrainingExtensions/tensorflow/test/python/test_layer_selector.py
lipovsek/aimet
236fb02cc6c45e65c067030416c49a09ace82045
[ "BSD-3-Clause" ]
null
null
null
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2017-2018, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
46.085106
93
0.686519
d5d53fd67a1062d1262ea247f9f9f99fc622778e
2,050
py
Python
de_uk_fr_shipping/cookies.py
k0nsta/amazon_shipping_rate
d1ded8c42db7ba3df98900e18640e0058322423c
[ "Unlicense" ]
null
null
null
de_uk_fr_shipping/cookies.py
k0nsta/amazon_shipping_rate
d1ded8c42db7ba3df98900e18640e0058322423c
[ "Unlicense" ]
null
null
null
de_uk_fr_shipping/cookies.py
k0nsta/amazon_shipping_rate
d1ded8c42db7ba3df98900e18640e0058322423c
[ "Unlicense" ]
null
null
null
DE_COOKIE = { # { # 'csm-hit': 'tb:s-FYQA8H2HH0TB8Z627DP5|1542629909223&t:1542629910877&adb:adblk_no', # 'Domain': 'www.amazon.de', # 'Path': '/', # 'Expires': '2020-10-20T09:35:19.000Z', # }, # { # 'session-token': '"B5DF2rMiMp0kZmAL97yreQOCuyTe/FZai22DT7Z5SA/FSgPZqw...
68.333333
503
0.747317
d5d58bc41e1b1764dc3b2fd4bb24822b6f149bb1
7,528
py
Python
src/blobtools/lib/host.py
blobtoolkit/blobtools-add
88717a92b81170b6244b5693eca03689464d2cea
[ "MIT" ]
2
2022-03-11T16:30:17.000Z
2022-03-23T15:18:55.000Z
src/blobtools/lib/host.py
blobtoolkit/blobtools-add
88717a92b81170b6244b5693eca03689464d2cea
[ "MIT" ]
9
2022-03-04T14:58:28.000Z
2022-03-30T20:32:05.000Z
src/blobtools/lib/host.py
blobtoolkit/blobtools-add
88717a92b81170b6244b5693eca03689464d2cea
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # pylint: disable=no-member, too-many-branches, too-many-statements, too-many-locals, W0603, W0703 """ Host a collection of BlobDirs. Usage: blobtools host [--port INT] [--api-port INT] [--hostname STRING] DIRECTORY Arguments: DIRECTORY Directory contai...
29.637795
98
0.558316
d5d59b0c61e3a2091247ca844491742366b0fef9
13,935
py
Python
proposed/security/key.py
swsachith/cm
d99837917f0dafe60c25829cf78ae77bbe02bd85
[ "Apache-2.0" ]
null
null
null
proposed/security/key.py
swsachith/cm
d99837917f0dafe60c25829cf78ae77bbe02bd85
[ "Apache-2.0" ]
null
null
null
proposed/security/key.py
swsachith/cm
d99837917f0dafe60c25829cf78ae77bbe02bd85
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function # # TODO THIS IS CODE FROM THE PREVIOUS CLOUDMESH, WE NEEED TO CLEAN AND POSSIBLY SIMPLIFY # # noinspection PyPep8Naming class Key(ListResource): @classmethod def info(cls, **kwargs): raise NotImplementedError() def get_from_dir(cls, directory=None, store=T...
31.670455
120
0.509724
d5d5c4e0581f3e64f5b2b6713c506cfbc14dad1a
52,758
py
Python
run_squad_GPU.py
mingzhu0527/MASHQA
b7d1e775e9fd96d78fb512ab02357aa2f8177d9b
[ "Apache-2.0" ]
12
2020-11-27T02:20:23.000Z
2022-01-18T07:04:21.000Z
run_squad_GPU.py
mingzhu0527/MASHQA
b7d1e775e9fd96d78fb512ab02357aa2f8177d9b
[ "Apache-2.0" ]
7
2021-03-07T07:36:04.000Z
2022-01-22T16:27:26.000Z
run_squad_GPU.py
mingzhu0527/MASHQA
b7d1e775e9fd96d78fb512ab02357aa2f8177d9b
[ "Apache-2.0" ]
3
2021-06-28T14:26:59.000Z
2022-01-17T18:38:45.000Z
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags import absl.logging as _logging # pylint: disable=unused-import import collections import os import time import math import json import six import random import gc imp...
40.334862
130
0.572217
d5d5f2c793893b7eb49b56f08f0f066f15306325
509
py
Python
boto3facade/s3.py
InnovativeTravel/boto3facade
9ea61fb07981939340db652b4baa5cd23d15e1f8
[ "MIT" ]
1
2016-06-20T00:59:53.000Z
2016-06-20T00:59:53.000Z
boto3facade/s3.py
InnovativeTravel/boto3facade
9ea61fb07981939340db652b4baa5cd23d15e1f8
[ "MIT" ]
null
null
null
boto3facade/s3.py
InnovativeTravel/boto3facade
9ea61fb07981939340db652b4baa5cd23d15e1f8
[ "MIT" ]
1
2022-03-20T07:46:38.000Z
2022-03-20T07:46:38.000Z
"""S3 facade.""" from .aws import AwsFacade from .utils import log_exception from botocore.exceptions import ClientError class S3(AwsFacade): @property def service(self): return 's3' @log_exception(ClientError) def cp(self, local_path, s3_bucket, s3_key): """Uploads a local file to ...
23.136364
69
0.669941
d5d6062b20148474bb8bfb7ad671db98ffd611af
429
py
Python
leetcode/937.reorder-data-in-log-files.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
leetcode/937.reorder-data-in-log-files.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
leetcode/937.reorder-data-in-log-files.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=937 lang=python3 # # [937] Reorder Data in Log Files # # @lc code=start class Solution: def reorderLogFiles(self, logs: List[str]) -> List[str]: lets, digs = [], [] for log in logs: digs.append(log) if log.split()[1].isdigit() else lets.append(log) ...
23.833333
78
0.559441
d5d639e36646a1339b25563e9d4d9b0653575020
2,094
py
Python
python/odml/scripts/rdf_subclass_query.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/odml/scripts/rdf_subclass_query.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/odml/scripts/rdf_subclass_query.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
""" This script tests how to load an RDF file to an rdflib graph and query the content. Meant to test various additional libraries for their RDF inference/reasoning since the basic rdflib implementation does not supply inference. """ import os import pathlib from odml.tools.rdf_converter import ODML_NS from rdflib im...
30.347826
90
0.755969
d5d65cf5b9cb6a1913ae845d2649741cea7a7e5a
14,329
py
Python
threeML/bayesian/dynesty_sampler.py
domeckert/threeML
ea4f53927d568024057f86c7275aa02b35e9c7d8
[ "BSD-3-Clause" ]
2
2019-05-15T21:13:54.000Z
2022-03-15T14:43:11.000Z
threeML/bayesian/dynesty_sampler.py
henrikef/3ML
dd118a106a01f52029da05585fe29affb85b570c
[ "BSD-3-Clause" ]
null
null
null
threeML/bayesian/dynesty_sampler.py
henrikef/3ML
dd118a106a01f52029da05585fe29affb85b570c
[ "BSD-3-Clause" ]
1
2022-03-03T09:05:40.000Z
2022-03-03T09:05:40.000Z
import math import os import time import numpy as np from astromodels import ModelAssertionViolation, use_astromodels_memoization from threeML.bayesian.sampler_base import UnitCubeSampler from threeML.config.config import threeML_config from threeML.parallel.parallel_client import ParallelClient from threeML.io.loggin...
29.483539
85
0.602833
d5d6859757e90090191e6645161c9dbdde0c05c7
28,972
py
Python
filenv/lib/python2.7/site-packages/haystack/query.py
betoesquivel/fil2014
4c2e9188769096391bb206b76ed1ab8bd2ff66a1
[ "MIT" ]
1
2016-05-18T18:46:48.000Z
2016-05-18T18:46:48.000Z
filenv/lib/python2.7/site-packages/haystack/query.py
betoesquivel/fil2014
4c2e9188769096391bb206b76ed1ab8bd2ff66a1
[ "MIT" ]
null
null
null
filenv/lib/python2.7/site-packages/haystack/query.py
betoesquivel/fil2014
4c2e9188769096391bb206b76ed1ab8bd2ff66a1
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import operator import warnings from django.utils import six from haystack import connections, connection_router from haystack.backends import SQ from haystack.constants import REPR_OUTPUT_SIZE, ITERATOR_LOAD_PER_QUERY, DEFAULT_OPERATOR from haystack.exceptions import NotHandled ...
34.655502
115
0.594712
d5d690653124d1ee1688eda4e9bd1affd5a9db70
553
py
Python
augment/baseline_augment.py
wangermeng2021/FastClassification
7937046edbee1018453f9039a665a0d9135ba0fd
[ "MIT" ]
9
2021-06-26T16:01:24.000Z
2021-11-25T18:50:06.000Z
augment/baseline_augment.py
wangermeng2021/FastClassification
7937046edbee1018453f9039a665a0d9135ba0fd
[ "MIT" ]
1
2021-08-18T03:42:18.000Z
2021-08-18T03:42:18.000Z
augment/baseline_augment.py
wangermeng2021/FastClassification
7937046edbee1018453f9039a665a0d9135ba0fd
[ "MIT" ]
null
null
null
import albumentations as A import cv2 class Baseline: def __init__(self,): self.transform = A.Compose([ A.Rotate(limit=20), A.RandomBrightnessContrast(brightness_limit=0.2, contrast_limit=0.2, p=0.5), A.ImageCompression(quality_lower=85, quality_upper=100, p=0.5), ...
34.5625
100
0.63472
d5d6b1488a73e743084edf4fefbc0d1f77fe52fb
5,193
py
Python
problem_5/problem_5.py
informramiz/show-me-the-data-structures
975c0367db3f1a78717bac6b8f64fa9c8f23b8b6
[ "MIT" ]
null
null
null
problem_5/problem_5.py
informramiz/show-me-the-data-structures
975c0367db3f1a78717bac6b8f64fa9c8f23b8b6
[ "MIT" ]
null
null
null
problem_5/problem_5.py
informramiz/show-me-the-data-structures
975c0367db3f1a78717bac6b8f64fa9c8f23b8b6
[ "MIT" ]
null
null
null
""" A Blockchain is a sequential chain of records, similar to a linked list. Each block contains some information and how it is connected related to the other blocks in the chain. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. For our blockchain we will be using a SHA...
28.07027
134
0.614096
d5d6bd63ee788f7ed924ca30e3989e6d05ccb136
702
py
Python
scalpel/any_io/mixins.py
lewoudar/scalpel
455a3ff766c91d02f33957ea17f1cfbec141ab60
[ "Apache-2.0" ]
15
2020-11-02T21:11:03.000Z
2022-03-10T14:17:46.000Z
scalpel/any_io/mixins.py
lewoudar/scalpel
455a3ff766c91d02f33957ea17f1cfbec141ab60
[ "Apache-2.0" ]
4
2020-11-01T17:54:15.000Z
2022-03-04T21:42:41.000Z
scalpel/any_io/mixins.py
lewoudar/scalpel
455a3ff766c91d02f33957ea17f1cfbec141ab60
[ "Apache-2.0" ]
2
2021-05-01T06:59:12.000Z
2021-11-25T07:01:02.000Z
import logging from typing import Tuple import anyio from selenium.common.exceptions import WebDriverException logger = logging.getLogger('scalpel') class SeleniumGetMixin: def _get_resource(self, url: str, error_message: str = '') -> Tuple[bool, float]: fetch_time = 0 unreachable = False ...
27
85
0.649573
d5d6e0b6057a8730d40130b428248da901b4cf64
3,716
py
Python
data-structures/union-find/union_find_general_data_structure.py
andrenbrandao/algorithm-problems
a6413cc7b3810008dd80766ae0d398a7edc58407
[ "MIT" ]
null
null
null
data-structures/union-find/union_find_general_data_structure.py
andrenbrandao/algorithm-problems
a6413cc7b3810008dd80766ae0d398a7edc58407
[ "MIT" ]
null
null
null
data-structures/union-find/union_find_general_data_structure.py
andrenbrandao/algorithm-problems
a6413cc7b3810008dd80766ae0d398a7edc58407
[ "MIT" ]
null
null
null
""" Implement a Union Find data structure. Also, use the following heuristics: - Union by Rank - Path Compression Start with a simple array of integers, then generalize to be used with any type of elements. -- Solution To use Union By Rank, we get the shortest subtree and point to the root of the other with higher...
22.938272
82
0.565662
d5d6e1b081a1c492b3cd4bbdb3995d51cb3b3bc5
1,860
py
Python
attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/pages/notification_message_page.py
Agriad/devops-course
380aa43fa69efd71992933f013fb11a96ce16a74
[ "MIT" ]
null
null
null
attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/pages/notification_message_page.py
Agriad/devops-course
380aa43fa69efd71992933f013fb11a96ce16a74
[ "MIT" ]
51
2021-04-08T11:39:59.000Z
2021-05-07T12:01:27.000Z
attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/pages/notification_message_page.py
Agriad/devops-course
380aa43fa69efd71992933f013fb11a96ce16a74
[ "MIT" ]
null
null
null
""" @author: Kartik Mudaliar @email: mudaliar@kth.se @date: 21-Apr-19 """ import logging from utility.services import Services logging.basicConfig(format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.INFO) class NotificationMessagePage: ...
39.574468
119
0.658602
d5d71c341c947248e7cb39e93d812abc8f6d6f04
6,590
py
Python
p1_navigation/double_Q_agent_base_replay.py
yanlinglin/deep-reinforcement-learning
580f688a2ade9d1af2f42bad02074449c81b42ba
[ "MIT" ]
null
null
null
p1_navigation/double_Q_agent_base_replay.py
yanlinglin/deep-reinforcement-learning
580f688a2ade9d1af2f42bad02074449c81b42ba
[ "MIT" ]
null
null
null
p1_navigation/double_Q_agent_base_replay.py
yanlinglin/deep-reinforcement-learning
580f688a2ade9d1af2f42bad02074449c81b42ba
[ "MIT" ]
null
null
null
import numpy as np import random from collections import namedtuple, deque from baseline_model import QNetwork import torch import torch.nn.functional as F import torch.optim as optim BUFFER_SIZE = int(1e5) # replay buffer size BATCH_SIZE = 64 # minibatch size GAMMA = 0.99 # discount factor TAU =...
39.939394
127
0.624127
d5d728ac2b68687e41a4cb327f5e0fef7f6beee1
2,736
py
Python
openrl/algorithms/bandits/cb_linear_ucb.py
natetsang/open-rl
426723d0d6759672ce77e02afeb55cbeb68fcfb0
[ "MIT" ]
2
2021-09-10T18:52:35.000Z
2022-01-03T19:48:06.000Z
openrl/algorithms/bandits/cb_linear_ucb.py
natetsang/open-rl
426723d0d6759672ce77e02afeb55cbeb68fcfb0
[ "MIT" ]
1
2021-12-28T17:42:23.000Z
2021-12-28T17:42:23.000Z
openrl/algorithms/bandits/cb_linear_ucb.py
natetsang/open-rl
426723d0d6759672ce77e02afeb55cbeb68fcfb0
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt FILENAME = "dataset.txt" n_arms = 10 context_dim = 100 ALPHA = 0.001 def process(record): values = record.split() # Fetch individual values to perform operations on them values = list(map(int, values)) # Convert all strings in the list to integer # N...
30.4
114
0.614766
d5d742781110d3d64a5d4a2e2d9979acbaea3fb9
3,636
py
Python
opt_exp.py
Leonardo-H/DR-PG
dc5467ddd73a7b89938aac9d44735b019a3fd7d7
[ "Apache-2.0" ]
2
2019-11-25T01:56:49.000Z
2021-05-20T03:22:59.000Z
opt_exp.py
Leonardo-H/DR-PG
dc5467ddd73a7b89938aac9d44735b019a3fd7d7
[ "Apache-2.0" ]
null
null
null
opt_exp.py
Leonardo-H/DR-PG
dc5467ddd73a7b89938aac9d44735b019a3fd7d7
[ "Apache-2.0" ]
1
2019-11-24T02:30:38.000Z
2019-11-24T02:30:38.000Z
import argparse import multiprocessing from multiprocessing import Pool # from multiprocessing.pool import ThreadPool as Pool from scripts import configs_cv as C from scripts import ranges_cv as R from scripts.rl_exp_cv_opt import main as main_func import itertools import copy from rl.tools.utils.misc_utils import zip...
38.273684
112
0.59791
d5d744064c995bf846908309a3f176e7adc3a11a
28,615
py
Python
pydmrs/components.py
vishalbelsare/pydmrs
795b35dba4986fa9084eaa81fb16206cb131a752
[ "MIT" ]
14
2015-11-27T14:22:26.000Z
2022-03-02T21:11:28.000Z
pydmrs/components.py
vishalbelsare/pydmrs
795b35dba4986fa9084eaa81fb16206cb131a752
[ "MIT" ]
25
2015-11-27T16:08:19.000Z
2019-08-28T10:13:06.000Z
pydmrs/components.py
vishalbelsare/pydmrs
795b35dba4986fa9084eaa81fb16206cb131a752
[ "MIT" ]
8
2015-11-01T17:57:44.000Z
2021-06-04T05:33:38.000Z
from collections import namedtuple try: from collections.abc import MutableMapping except ImportError: # Python v3.2 or less from collections import MutableMapping from abc import ABCMeta from itertools import chain from warnings import warn from pydmrs._exceptions import * class Pred(object): """ A...
34.269461
129
0.57718
d5d75b2aed8f4ff93fb44217b4b56aed4a73e0eb
10,720
py
Python
volatility/framework/plugins/windows/registry/hivelist.py
orchechik/volatility3
99a536e57e908850a656f8aed6262d56f60e4bdc
[ "Linux-OpenIB" ]
null
null
null
volatility/framework/plugins/windows/registry/hivelist.py
orchechik/volatility3
99a536e57e908850a656f8aed6262d56f60e4bdc
[ "Linux-OpenIB" ]
null
null
null
volatility/framework/plugins/windows/registry/hivelist.py
orchechik/volatility3
99a536e57e908850a656f8aed6262d56f60e4bdc
[ "Linux-OpenIB" ]
null
null
null
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # import logging from typing import Iterator, List, Tuple, Iterable, Optional from volatility.framework import renderers, interfaces, ...
53.069307
120
0.579571
d5d79519cbf0bb5ecca0d25c765d350bdda4b665
120
py
Python
backend/lib/database/postgres/base.py
bayesimpact/tds-frontend
a4f47e384ef4fe4dc43c30423a1713c2c93dc87f
[ "Apache-2.0" ]
15
2018-05-08T23:54:38.000Z
2020-03-07T20:46:37.000Z
backend/lib/database/postgres/base.py
akegan/encompass
85852a91c646c62e8cd05f9c2b0c7cf0079ea7f2
[ "Apache-2.0" ]
297
2018-02-05T19:04:26.000Z
2022-02-12T07:52:37.000Z
backend/lib/database/postgres/base.py
bayesimpact/tds
a4f47e384ef4fe4dc43c30423a1713c2c93dc87f
[ "Apache-2.0" ]
6
2018-05-21T19:51:15.000Z
2019-03-21T19:20:27.000Z
"""Initalize Base for SqlAlchemy.""" from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
24
55
0.8
d5d7a980ccc10956e3e046c83bc2581ae0ec2b68
2,831
py
Python
API/src/main/resources/Lib/robot/result/configurer.py
TagExpress/SikuliX1
de9da11794dd94b3821eddc5c01b534d3f2fe828
[ "MIT" ]
null
null
null
API/src/main/resources/Lib/robot/result/configurer.py
TagExpress/SikuliX1
de9da11794dd94b3821eddc5c01b534d3f2fe828
[ "MIT" ]
null
null
null
API/src/main/resources/Lib/robot/result/configurer.py
TagExpress/SikuliX1
de9da11794dd94b3821eddc5c01b534d3f2fe828
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
37.25
81
0.691982
d5d7aea53bbd84f6475a716f78d77e49dc881fce
6,298
py
Python
custom_components/sonoff/remote.py
aneisch/home-assistant
d8a866d75f512d23ffa7b9e5d82d7c575ece3c76
[ "Apache-2.0" ]
18
2016-08-10T01:02:27.000Z
2017-10-26T04:19:49.000Z
custom_components/sonoff/remote.py
aneisch/home-assistant
d8a866d75f512d23ffa7b9e5d82d7c575ece3c76
[ "Apache-2.0" ]
null
null
null
custom_components/sonoff/remote.py
aneisch/home-assistant
d8a866d75f512d23ffa7b9e5d82d7c575ece3c76
[ "Apache-2.0" ]
4
2017-04-20T19:41:21.000Z
2017-05-16T17:10:05.000Z
import asyncio import logging from typing import Dict, Union from homeassistant.components.remote import RemoteEntity, ATTR_DELAY_SECS, \ DEFAULT_DELAY_SECS from homeassistant.const import ATTR_COMMAND from homeassistant.helpers.entity import Entity from .binary_sensor import XRemoteSensor, XRemoteSensorOff from ...
33.679144
77
0.579867
d5d7eeb1f2a6deac26b17c2665c483310ca39dc0
1,244
py
Python
mhw_analysis/events/io.py
profxj/mwh_analysis
bb3854ee9e6deee7be270967fe5a7e15a7636819
[ "BSD-3-Clause" ]
1
2020-06-22T21:19:41.000Z
2020-06-22T21:19:41.000Z
mhw_analysis/events/io.py
profxj/mwh_analysis
bb3854ee9e6deee7be270967fe5a7e15a7636819
[ "BSD-3-Clause" ]
9
2020-06-05T16:16:48.000Z
2020-10-18T18:58:00.000Z
mhw_analysis/events/io.py
profxj/mwh_analysis
bb3854ee9e6deee7be270967fe5a7e15a7636819
[ "BSD-3-Clause" ]
null
null
null
""" I/O for MHW Events""" import os import numpy as np import datetime import iris from cf_units import Unit from oceanpy.sst import utils as sst_utils def load_event_cube(mhw_ev_cube_file=None): # if mhw_ev_cube_file is None: mhw_ev_cube_file = os.path.join(os.getenv('MHW'), 'db', 'MHWevent_cube.nc'...
27.043478
83
0.60209
d5d7f0faf1e84d953fb1f7ab00ad2e6d8569d284
3,553
py
Python
alectryon/sphinx.py
jjhugues/alectryon
3ef33de5242469b1d0083c20ab7296d70ac248b6
[ "MIT" ]
null
null
null
alectryon/sphinx.py
jjhugues/alectryon
3ef33de5242469b1d0083c20ab7296d70ac248b6
[ "MIT" ]
null
null
null
alectryon/sphinx.py
jjhugues/alectryon
3ef33de5242469b1d0083c20ab7296d70ac248b6
[ "MIT" ]
null
null
null
# Copyright © 2020 Clément Pit-Claudel # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, d...
38.204301
87
0.733746
d5d7f5df9ef9a9ff7128aa1a2fec1d33113cfcca
2,509
py
Python
neuro-cli/tests/unit/formatters/test_buckets.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
11
2020-10-11T15:38:11.000Z
2021-11-09T11:29:50.000Z
neuro-cli/tests/unit/formatters/test_buckets.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
611
2020-09-30T21:27:52.000Z
2022-01-10T10:44:44.000Z
neuro-cli/tests/unit/formatters/test_buckets.py
neuro-inc/platform-client-python
012e355249ea900b76f9ce4209fb9d029652f9b2
[ "Apache-2.0" ]
1
2020-10-05T15:10:24.000Z
2020-10-05T15:10:24.000Z
from typing import Any, List import pytest from dateutil.parser import isoparse from neuro_sdk import Bucket from neuro_cli.formatters.buckets import ( BucketFormatter, BucketsFormatter, SimpleBucketsFormatter, ) from neuro_cli.formatters.utils import format_datetime_human def test_bucket_formatter(ric...
28.511364
85
0.611399
d5d80655e4ed84295c37413c98e4f8154300ab03
9,130
py
Python
diskimage_builder/block_device/config.py
june-yang/diskimage-builder
0b15d2186727b122af4dae1847de8ebcdefc4b4f
[ "Apache-2.0" ]
1
2017-08-30T16:58:33.000Z
2017-08-30T16:58:33.000Z
diskimage_builder/block_device/config.py
june-yang/diskimage-builder
0b15d2186727b122af4dae1847de8ebcdefc4b4f
[ "Apache-2.0" ]
null
null
null
diskimage_builder/block_device/config.py
june-yang/diskimage-builder
0b15d2186727b122af4dae1847de8ebcdefc4b4f
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
33.690037
77
0.621358
d5d8278ac1c707bd4178d7f6dcc046917ab6eaf5
546
py
Python
dvc/repo/tag/add.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
2
2019-06-23T14:24:48.000Z
2019-07-08T12:22:53.000Z
dvc/repo/tag/add.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
null
null
null
dvc/repo/tag/add.py
drorata/dvc
b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0
[ "Apache-2.0" ]
1
2019-09-02T00:29:40.000Z
2019-09-02T00:29:40.000Z
import logging from copy import copy logger = logging.getLogger(__name__) def add(self, tag, target=None, with_deps=False, recursive=False): stages = self.collect(target, with_deps=with_deps, recursive=recursive) for stage in stages: changed = False for out in stage.outs: if not o...
28.736842
76
0.604396
d5d84a3c6d99075b5538ef19675cffc7744aba06
797
py
Python
autocsp/lib/csp.py
qll/autoCSP
39c3040ef7497e2011d1c298b1fb6cabe7db2ad4
[ "MIT" ]
1
2016-06-20T08:47:58.000Z
2016-06-20T08:47:58.000Z
autocsp/lib/csp.py
qll/autoCSP
39c3040ef7497e2011d1c298b1fb6cabe7db2ad4
[ "MIT" ]
null
null
null
autocsp/lib/csp.py
qll/autoCSP
39c3040ef7497e2011d1c298b1fb6cabe7db2ad4
[ "MIT" ]
null
null
null
import lib.utils from settings import ORIGIN directives = ('base-uri', 'connect-src', 'font-src', 'form-action', 'frame-src', 'img-src', 'media-src', 'object-src', 'script-src', 'style-src') def generate_policy(rules): """ Generates policy from a rules dictionary looking like this: {'img-...
34.652174
80
0.574655
d5d85970e0b119fc82ce1b2676fafa5cc2e06f02
948
py
Python
tests/test_trackers.py
Rodrigo-A-Pereira/pykeen
76c5acb707faa524b5951b0d1d85ab1afe806462
[ "MIT" ]
null
null
null
tests/test_trackers.py
Rodrigo-A-Pereira/pykeen
76c5acb707faa524b5951b0d1d85ab1afe806462
[ "MIT" ]
null
null
null
tests/test_trackers.py
Rodrigo-A-Pereira/pykeen
76c5acb707faa524b5951b0d1d85ab1afe806462
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for result trackers.""" import unittest from pykeen.trackers import TensorBoardResultTracker from pykeen.trackers.base import ConsoleResultTracker from pykeen.trackers.file import CSVResultTracker, JSONResultTracker from tests import cases try: import tensorboard except ImportEr...
23.121951
76
0.774262
d5d85a5ba2ff05693b05e5435dfed73ab7db16d9
27,219
py
Python
tests/common/dualtor/dual_tor_utils.py
pra-moh/sonic-mgmt
26285708eab7428c2b6250be03483d63f94cfb5c
[ "Apache-2.0" ]
null
null
null
tests/common/dualtor/dual_tor_utils.py
pra-moh/sonic-mgmt
26285708eab7428c2b6250be03483d63f94cfb5c
[ "Apache-2.0" ]
18
2019-01-31T06:54:39.000Z
2020-04-01T03:50:14.000Z
tests/common/dualtor/dual_tor_utils.py
wangxin/sonic-mgmt
18dce2d5ccf93b629b9e463ba183f3a13e22b07a
[ "Apache-2.0" ]
null
null
null
import contextlib import logging import pytest import random import json from datetime import datetime from tests.ptf_runner import ptf_runner from collections import defaultdict from natsort import natsorted from tests.common.config_reload import config_reload from tests.common.helpers.assertions import pytest_assert...
37.440165
171
0.693743
d5d87dfcab8b347715bdb4c585e858bf0f3c587f
13,740
py
Python
train.py
dasguptap/adversarial-text-perturbation
09b895e4da0171a8ba588a39aa3b28c5b4eb663a
[ "Apache-2.0" ]
1
2018-05-26T06:38:38.000Z
2018-05-26T06:38:38.000Z
train.py
pdasguptauno/adversarial-text-perturbation
09b895e4da0171a8ba588a39aa3b28c5b4eb663a
[ "Apache-2.0" ]
null
null
null
train.py
pdasguptauno/adversarial-text-perturbation
09b895e4da0171a8ba588a39aa3b28c5b4eb663a
[ "Apache-2.0" ]
2
2018-05-18T13:51:18.000Z
2018-09-17T05:56:33.000Z
######################################################### # Original (see notes) train.py code from github # Trains the CNN in text_cnn.py # # Code source: https://github.com/dennybritz/cnn-text-classification-tf # File name: train.py ######################################################### #################...
49.602888
160
0.56099
d5d8b51416f0f81a684e2fadafb2f81e39a9d46a
747
py
Python
goban/modules/rules/move_recorder.py
xxyzzzq/goban
6ebe905a77fa23bacb3b9988825d1c70f5a9c6fe
[ "MIT" ]
null
null
null
goban/modules/rules/move_recorder.py
xxyzzzq/goban
6ebe905a77fa23bacb3b9988825d1c70f5a9c6fe
[ "MIT" ]
null
null
null
goban/modules/rules/move_recorder.py
xxyzzzq/goban
6ebe905a77fa23bacb3b9988825d1c70f5a9c6fe
[ "MIT" ]
null
null
null
# Copyright (C) 2016 Goban authors # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. class MoveRecorder: def __init__(self): self.__undo_history = [] self.__redo_history = [] def put(self, move): self.__redo_histo...
26.678571
63
0.621151
d5d8ca6ba5c62281c55a0afe1271cc24cc6168f9
3,366
py
Python
melody/constraints/on_beat_constraint.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
1
2021-05-06T19:45:54.000Z
2021-05-06T19:45:54.000Z
melody/constraints/on_beat_constraint.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
null
null
null
melody/constraints/on_beat_constraint.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
null
null
null
""" File: on_beat.py Purpose: Defines a class indicating for some actor that it must adhere to a given beat constraint. """ from melody.constraints.abstract_constraint import AbstractConstraint from structure.time_signature import BeatType from timemodel.position import Position from timemodel.time_conversion import...
38.689655
120
0.675282
d5d91bb2e40fb58e5f9e3936cf2972b8ead8cead
30,797
py
Python
megawidget/table/__init__.py
pyrustic/megawidget
2e4c49eec17f73e073887b10f56ae8b31a81479e
[ "MIT" ]
null
null
null
megawidget/table/__init__.py
pyrustic/megawidget
2e4c49eec17f73e073887b10f56ae8b31a81479e
[ "MIT" ]
null
null
null
megawidget/table/__init__.py
pyrustic/megawidget
2e4c49eec17f73e073887b10f56ae8b31a81479e
[ "MIT" ]
1
2022-03-21T20:42:13.000Z
2022-03-21T20:42:13.000Z
import tkinter as tk import operator from viewable import CustomView from tkutil import merge_megaconfig # Allowed Options for columns COLUMN_OPTIONS = ["background", "borderwidth", "cursor", "disabledforeground", "exportselection", "font", "foreground", "height", "highlightbackgro...
39.686856
122
0.593369
d5d920d92631a3a6552bb9abad4adfe34b9f620f
1,505
py
Python
var/spack/repos/builtin/packages/cgdb/package.py
BenWibking/spack
49b3b43a4a9375210b578635d9240875a5f3106b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/cgdb/package.py
BenWibking/spack
49b3b43a4a9375210b578635d9240875a5f3106b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/cgdb/package.py
flatironinstitute/spack
71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Cgdb(AutotoolsPackage): """A curses front-end to GDB""" maintainers = ['tuxfan'] ...
33.444444
95
0.652492
d5d928185911c20de36fe06939fe053de5700aa9
580
py
Python
tql/utils/time/timer.py
Jie-Yuan/1_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
14
2019-06-25T13:46:32.000Z
2020-10-27T02:04:59.000Z
tql/utils/time/timer.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
null
null
null
tql/utils/time/timer.py
Jie-Yuan/2_DataMining
f5338388b4f883233f350d4fb9c5903180883430
[ "Apache-2.0" ]
7
2019-06-25T13:26:16.000Z
2020-10-27T02:05:03.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = 'timer' __author__ = 'JieYuan' __mtime__ = '19-1-14' """ import time from contextlib import contextmanager from .. import cprint @contextmanager def timer(task_name="timer"): # a timer cm from https://www.kaggle.com/lopuhin/mercari-golf-0-3875-cv-in-7...
21.481481
92
0.62931
d5d92e7dbf4967cb1fce937adff6f702043833c5
6,495
py
Python
schemes/longnames_autocheck.py
gold2718/ccpp-framework
66f1a069b6b15748e08adbe940b8ceb9b39619ab
[ "Apache-2.0" ]
null
null
null
schemes/longnames_autocheck.py
gold2718/ccpp-framework
66f1a069b6b15748e08adbe940b8ceb9b39619ab
[ "Apache-2.0" ]
39
2019-01-25T21:50:33.000Z
2021-09-03T16:57:43.000Z
schemes/longnames_autocheck.py
gold2718/ccpp-framework
66f1a069b6b15748e08adbe940b8ceb9b39619ab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Standard modules import os # Local modules from common import execute from parse_fortran import parse_subroutine_call from parse_scheme_table import parse_scheme_tables from process_tables import scheme_type, subroutine_type, parse_xml_files, process_arguments, find_longname_conflicts separa...
38.892216
148
0.54719
d5d9bf35b1e31f5ad51573355506cfd3204b65c5
22,342
py
Python
atropos/util/__init__.py
plijnzaad/atropos
dcc79d0aa89b5d2b87f02ee841525fa154898ae6
[ "CC0-1.0" ]
null
null
null
atropos/util/__init__.py
plijnzaad/atropos
dcc79d0aa89b5d2b87f02ee841525fa154898ae6
[ "CC0-1.0" ]
1
2020-09-23T07:37:32.000Z
2020-09-23T07:37:32.000Z
atropos/util/__init__.py
plijnzaad/atropos
dcc79d0aa89b5d2b87f02ee841525fa154898ae6
[ "CC0-1.0" ]
null
null
null
"""Widely useful utility methods. """ from collections import OrderedDict, Iterable, Sequence from datetime import datetime import errno import functools import logging import math from numbers import Number import time from atropos import AtroposError # TODO: the nucleotide table should be implemented as an alphabet....
30.069987
80
0.598066
d5d9d8f2dfb1ae4201eea9580de9f0fd8097d7a7
5,036
py
Python
foca/foca.py
elixir-cloud-aai/flask-connexion-archetype
8676b93e17c0e33818a83cf5e795d86ce1c2f52c
[ "Apache-2.0" ]
1
2020-02-19T17:47:08.000Z
2020-02-19T17:47:08.000Z
foca/foca.py
elixir-cloud-aai/flask-connexion-archetype
8676b93e17c0e33818a83cf5e795d86ce1c2f52c
[ "Apache-2.0" ]
11
2020-02-09T13:41:28.000Z
2020-03-18T08:34:22.000Z
foca/foca.py
elixir-cloud-aai/flask-connexion-archetype
8676b93e17c0e33818a83cf5e795d86ce1c2f52c
[ "Apache-2.0" ]
1
2020-03-12T18:18:36.000Z
2020-03-12T18:18:36.000Z
"""Class for setting up and initializing a FOCA-based microservice.""" import logging from pathlib import Path from typing import Optional from connexion import App from foca.api.register_openapi import register_openapi from foca.config.config_parser import ConfigParser from foca.database.register_mongodb import reg...
39.34375
79
0.611795
d5d9fef413f8f37502f576d32be62c0498c792a0
53,353
py
Python
katcp/testutils.py
MESAProductSolutions/katcp-python-rta
54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d
[ "BSD-3-Clause" ]
null
null
null
katcp/testutils.py
MESAProductSolutions/katcp-python-rta
54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d
[ "BSD-3-Clause" ]
null
null
null
katcp/testutils.py
MESAProductSolutions/katcp-python-rta
54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d
[ "BSD-3-Clause" ]
null
null
null
# testutils.py # -*- coding: utf8 -*- # vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4 # Copyright 2009 SKA South Africa (http://ska.ac.za/) # BSD license - see COPYING for details """Test utils for katcp package tests. """ import client import logging import re import time import Queue import threading import functo...
38.522022
92
0.599516
d5da01a19b56f26f641d45e2f411d17caeddbfe7
2,086
py
Python
src/ggrc_workflows/migrations/versions/20170124210526_1142135ce819_update_object_states.py
Killswitchz/ggrc-core
2460df94daf66727af248ad821462692917c97a9
[ "ECL-2.0", "Apache-2.0" ]
1
2018-03-30T11:28:48.000Z
2018-03-30T11:28:48.000Z
src/ggrc_workflows/migrations/versions/20170124210526_1142135ce819_update_object_states.py
trevordonnelly/ggrc-core
499cf0d3cce70737b080991b12c203ec22015cea
[ "ECL-2.0", "Apache-2.0" ]
10
2018-07-06T00:04:23.000Z
2021-02-26T21:13:20.000Z
src/ggrc_workflows/migrations/versions/20170124210526_1142135ce819_update_object_states.py
trevordonnelly/ggrc-core
499cf0d3cce70737b080991b12c203ec22015cea
[ "ECL-2.0", "Apache-2.0" ]
1
2017-11-11T22:16:56.000Z
2017-11-11T22:16:56.000Z
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Update object states Create Date: 2017-01-24 21:05:26.781499 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name import sqlalchemy as sa fr...
37.25
79
0.659156
d5da2ae193e2c2632c9f66bfd970789702f7f47a
2,213
py
Python
src/mm_SPINNY/quaternion.py
dragozzine/multimoon
a9886212629ef4020457e1b8a9d12c376ecf0821
[ "MIT" ]
1
2022-01-22T02:11:39.000Z
2022-01-22T02:11:39.000Z
src/mm_SPINNY/quaternion.py
dragozzine/multimoon
a9886212629ef4020457e1b8a9d12c376ecf0821
[ "MIT" ]
2
2022-02-08T08:10:36.000Z
2022-03-22T22:47:04.000Z
src/mm_SPINNY/quaternion.py
dragozzine/multimoon
a9886212629ef4020457e1b8a9d12c376ecf0821
[ "MIT" ]
null
null
null
import numpy as np def quaternion(phi,theta,psi): ### calculations from "Euler Angles Quaternions Transformation Matrices" ### https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf ### Using ZXZ axis rotation sequence (pg.26) ### NOTE: There is an error in the formula given on page 26 ...
29.506667
110
0.558066
d5da4ce666ff1c1d622e0be59b6b597529fa3bee
2,759
py
Python
auditor/auditor/utils/marketdata_client.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
2
2022-03-17T04:50:20.000Z
2022-03-17T04:51:31.000Z
auditor/auditor/utils/marketdata_client.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
null
null
null
auditor/auditor/utils/marketdata_client.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta from decimal import Decimal from typing import Tuple import requests from common.constants import Currency GEMINI_BASE_URL = "https://api.gemini.com/v1" LIMIT_TRADE_HISTORY = 50 class MarketdataClient: @staticmethod def _get_symbol_and_is_selling(*, sell_currency: Cu...
43.109375
117
0.635738
d5da629ab4ccc0ac3f897e1a6d11a2b2e127bc03
8,774
py
Python
sunpy/net/_attrs.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
sunpy/net/_attrs.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
sunpy/net/_attrs.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
""" Implementation of global attrs. These are defined in here to keep the `sunpy.net.attrs` namespace clean, and to prevent circular imports. """ import collections.abc import astropy.units as u from sunpy.time import TimeRange, parse_time from sunpy.time.time import _variables_for_parse_time_docstring from sunpy.ut...
31.003534
97
0.634944
d5da6adf6f1a08bf56f0d82abffa3e6b105b0952
1,072
py
Python
icoscp/__init__.py
ICOS-Carbon-Portal/pylib
3a86c936ee5fa03520384a8e18ed093decdab171
[ "CC-BY-4.0" ]
4
2020-09-27T09:05:56.000Z
2022-01-10T18:11:57.000Z
icoscp/__init__.py
ICOS-Carbon-Portal/pylib
3a86c936ee5fa03520384a8e18ed093decdab171
[ "CC-BY-4.0" ]
26
2020-08-03T13:00:56.000Z
2022-03-31T15:40:26.000Z
icoscp/__init__.py
ICOS-Carbon-Portal/pylib
3a86c936ee5fa03520384a8e18ed093decdab171
[ "CC-BY-4.0" ]
2
2020-07-28T08:35:01.000Z
2021-02-04T21:11:36.000Z
""" The ICOS CarbonPortal package provides access to data hosted at the Carbon Portal. ( https://data.icos-cp.eu/ ) This library will load binary representations of digital data objects directly into memory. If you need store the data locally, we suggest you go to the website and "dowload" ...
44.666667
88
0.706157
d5daa19a95e85d670b453c40c84babab4b79f81f
5,276
py
Python
pgcontents/api_utils.py
amangarg96/pgcontents
1c69b23836ab453ca80b91f50a09fd27ac9650ed
[ "Apache-2.0" ]
2
2016-06-14T11:35:55.000Z
2018-03-28T09:00:54.000Z
pgcontents/api_utils.py
amangarg96/pgcontents
1c69b23836ab453ca80b91f50a09fd27ac9650ed
[ "Apache-2.0" ]
null
null
null
pgcontents/api_utils.py
amangarg96/pgcontents
1c69b23836ab453ca80b91f50a09fd27ac9650ed
[ "Apache-2.0" ]
2
2019-02-07T07:06:41.000Z
2021-07-16T09:12:56.000Z
""" Utilities for implementing the ContentsManager API. """ from __future__ import unicode_literals from base64 import ( b64decode, b64encode, ) from datetime import datetime from functools import wraps import mimetypes import posixpath from tornado.web import HTTPError from .error import PathOutsideRoot from ...
24.539535
79
0.62718
d5daa6fb357f288991e5d9d5b8a4b3111fb67d2b
28,883
py
Python
treeCl/tasks.py
kgori/treeCl
54bdc53b979d0d60c1c5e3f7053c1e82b48e2590
[ "MIT" ]
22
2015-05-13T12:40:28.000Z
2022-03-25T09:56:14.000Z
treeCl/tasks.py
kgori/treeCl
54bdc53b979d0d60c1c5e3f7053c1e82b48e2590
[ "MIT" ]
26
2015-11-13T09:04:42.000Z
2021-06-03T18:24:27.000Z
treeCl/tasks.py
kgori/treeCl
54bdc53b979d0d60c1c5e3f7053c1e82b48e2590
[ "MIT" ]
8
2015-10-10T19:09:19.000Z
2020-10-20T20:59:29.000Z
import itertools import json import tempfile import tree_collection import os import random from abc import ABCMeta, abstractmethod, abstractproperty from functools import reduce import phylo_utils from . import treedist from .tree import Tree from .alignment import Alignment, SequenceSimulator from .parameters impor...
40.171071
245
0.630475
d5daacae727d0c005198d1139d1c3aec503007d0
8,805
py
Python
backend/backend/services/deposit.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
2
2022-03-17T04:50:20.000Z
2022-03-17T04:51:31.000Z
backend/backend/services/deposit.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
null
null
null
backend/backend/services/deposit.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
null
null
null
import logging import uuid from datetime import datetime from decimal import Decimal from typing import List, Mapping, Optional, Sequence import grpc import petlib import sqlalchemy.orm from common.constants import ( ADMIN_UUID, CURRENCY_TO_BLOCKCHAIN, PAGINATION_LIMIT, Currency, ) from common.utils.da...
40.022727
113
0.653606
d5dabd8167244072078895f55e8d64a37710b52f
2,692
py
Python
apollo/components/user/tests.py
Aukbit/apollo
0afd1360f5a102335c55afaf138e0ecb96644128
[ "MIT" ]
null
null
null
apollo/components/user/tests.py
Aukbit/apollo
0afd1360f5a102335c55afaf138e0ecb96644128
[ "MIT" ]
null
null
null
apollo/components/user/tests.py
Aukbit/apollo
0afd1360f5a102335c55afaf138e0ecb96644128
[ "MIT" ]
null
null
null
import datetime import base64 from mock import MagicMock, Mock, patch from flask import url_for from cassandra.cqlengine.management import drop_table from apollo.common.database import init_db, get_db from apollo.tests.mixins import TestAppEngineMixin from apollo.components.user.models import User, Profile, Address ...
35.421053
72
0.606241
d5db02279ff861f2bb3c5bc9dd450c34c5e5fc20
23,837
pyw
Python
source/main.pyw
JonathanMaes/Backupper
b89265a9c4848b19f542095fc15f6460da2b00cb
[ "MIT" ]
null
null
null
source/main.pyw
JonathanMaes/Backupper
b89265a9c4848b19f542095fc15f6460da2b00cb
[ "MIT" ]
null
null
null
source/main.pyw
JonathanMaes/Backupper
b89265a9c4848b19f542095fc15f6460da2b00cb
[ "MIT" ]
null
null
null
# TO DO: # * Move the total copied size to the progress bar: <files_copied>/<total_files> # And make the progress bar dependent on the number of bytes processed instead of the number of files # Problem is: this will further increase the time needed to 'initialize backup' by a factor of 7 # But this can be used t...
45.752399
209
0.614255
d5db1fab3aca0fd0ce818f1d053342157babb8c2
1,297
py
Python
Practica1/Euclides/grafica.py
JosueHernandezR/An-lisis-de-Algoritmos
9953f2d3fee6b4cfe842fdbbea83b46b62fa123f
[ "MIT" ]
1
2021-09-30T20:05:41.000Z
2021-09-30T20:05:41.000Z
Practica1/Euclides/grafica.py
JosueHernandezR/An-lisis-de-Algoritmos
9953f2d3fee6b4cfe842fdbbea83b46b62fa123f
[ "MIT" ]
null
null
null
Practica1/Euclides/grafica.py
JosueHernandezR/An-lisis-de-Algoritmos
9953f2d3fee6b4cfe842fdbbea83b46b62fa123f
[ "MIT" ]
null
null
null
#Análisis de Algoritmos 3CV2 # Alan Romero Lucero # Josué David Hernández Ramírez # Práctica 1 Algoritmo de Euclides # En este archivo se crean las funciones para el graficado del algoritmo import matplotlib.pyplot as plt import numpy as np def grafica ( n, m, count, mcd ): # Título de la ventana. plt.figure ...
43.233333
116
0.544333
d5db48e02152263125619626ac7308168165665a
2,312
py
Python
ceRNA/Calculations.py
VincentLuczkow/cerna
66797c716fc8990e80ecf18d7347b68b0a150baf
[ "MIT" ]
2
2016-07-07T20:18:16.000Z
2017-02-18T19:53:05.000Z
ceRNA/Calculations.py
VincentLuczkow/cerna
66797c716fc8990e80ecf18d7347b68b0a150baf
[ "MIT" ]
10
2016-07-07T19:54:12.000Z
2016-08-03T00:58:52.000Z
ceRNA/Calculations.py
vluzko/cerna
66797c716fc8990e80ecf18d7347b68b0a150baf
[ "MIT" ]
null
null
null
import numpy as np from pdb import set_trace def get_sub_matrix(rows, columns, matrix): x = len(columns) y = len(rows) sub_matrix = np.zeros([y, x]) for i in rows: for j in columns: sub_matrix[rows[i]][columns[j]] = matrix[i][j] return sub_matrix def set_sub_matrix(rows, colu...
35.030303
100
0.704152
d5db7171bdfb5142af0019fb722a497ad53b1b2f
27,592
py
Python
src/containerapp-compose/azext_containerapp_compose/vendored_sdks/azext_containerapp/_help.py
smurawski/azure-cli-extensions
7ac32934bf3a1ec4b100bf7fa2ca5cbd09b5dc03
[ "MIT" ]
null
null
null
src/containerapp-compose/azext_containerapp_compose/vendored_sdks/azext_containerapp/_help.py
smurawski/azure-cli-extensions
7ac32934bf3a1ec4b100bf7fa2ca5cbd09b5dc03
[ "MIT" ]
9
2022-03-25T19:35:49.000Z
2022-03-31T06:09:47.000Z
src/containerapp-compose/azext_containerapp_compose/vendored_sdks/azext_containerapp/_help.py
smurawski/azure-cli-extensions
7ac32934bf3a1ec4b100bf7fa2ca5cbd09b5dc03
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
38.482566
235
0.684764
d5db8c5c8f35446cf75238f6122282a4114a2d00
1,038
py
Python
server/models/label.py
chrispoupart/PlanarAlly
4015621468072fee90a796e7baa0212d9a62c7e5
[ "MIT" ]
300
2018-03-22T12:09:15.000Z
2022-03-30T05:33:39.000Z
server/models/label.py
chrispoupart/PlanarAlly
4015621468072fee90a796e7baa0212d9a62c7e5
[ "MIT" ]
482
2018-03-08T23:44:56.000Z
2022-03-30T18:06:04.000Z
server/models/label.py
chrispoupart/PlanarAlly
4015621468072fee90a796e7baa0212d9a62c7e5
[ "MIT" ]
79
2018-05-12T18:42:59.000Z
2022-03-29T17:12:22.000Z
from uuid import uuid4 from peewee import BooleanField, ForeignKeyField, TextField from playhouse.shortcuts import model_to_dict from .base import BaseModel from .campaign import Room from .user import User __all__ = ["Label", "LabelSelection"] class Label(BaseModel): uuid = TextField(primary_key=True) us...
25.95
71
0.66763
d5db93c36900b139eb28e89be9005c0c0655c4ab
29,940
py
Python
mphys/solver_builders/mphys_dafoam.py
kejacobson/mphys
72ff05a1c444461a9431470d32dcf2a7d51752eb
[ "Apache-2.0" ]
null
null
null
mphys/solver_builders/mphys_dafoam.py
kejacobson/mphys
72ff05a1c444461a9431470d32dcf2a7d51752eb
[ "Apache-2.0" ]
null
null
null
mphys/solver_builders/mphys_dafoam.py
kejacobson/mphys
72ff05a1c444461a9431470d32dcf2a7d51752eb
[ "Apache-2.0" ]
null
null
null
import numpy as np import sys, time, os from mpi4py import MPI from numpy.core.fromnumeric import prod from openmdao.api import Group, ImplicitComponent, ExplicitComponent, AnalysisError from dafoam import PYDAFOAM from idwarp import USMesh from mphys.builder import Builder import petsc4py from petsc4py import PETSc p...
39.086162
119
0.632933
d5dc07f6b481f814d418db2525508c42e00cf49a
601
py
Python
rideshare/rideshare_profile/migrations/0005_auto_20160715_2144.py
RideQuest/ridequest
a2f51d99109f9767c5d2abe7f6fb3f160e5212da
[ "MIT" ]
null
null
null
rideshare/rideshare_profile/migrations/0005_auto_20160715_2144.py
RideQuest/ridequest
a2f51d99109f9767c5d2abe7f6fb3f160e5212da
[ "MIT" ]
12
2016-04-30T02:36:13.000Z
2016-04-30T02:39:45.000Z
rideshare/rideshare_profile/migrations/0005_auto_20160715_2144.py
RideQuest/ridequest
a2f51d99109f9767c5d2abe7f6fb3f160e5212da
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-15 21:44 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('rideshare_profile', '0004_a...
26.130435
136
0.673877
d5dc2a61b685af3d751166862940470f4e19a2a6
7,889
py
Python
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_vcnl4010.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
47
2021-02-15T23:02:36.000Z
2022-03-04T21:30:03.000Z
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_vcnl4010.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
7
2021-02-19T20:00:08.000Z
2022-01-14T10:51:12.000Z
adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_vcnl4010.py
jacoblb64/pico_rgb_keypad_hid
3251ca6a98ef86d9f98c54f639c4d61810601a0b
[ "MIT" ]
14
2021-02-20T17:40:56.000Z
2022-01-01T19:53:38.000Z
# SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_vcnl4010` ==================================================== CircuitPython module for the VCNL4010 proximity and light sensor. See examples/vcnl4010_simpletest.py for an example of the usage. * Author...
37.388626
93
0.68285
d5dc4051fbcb35cf7bc9059956d155492761f780
1,536
py
Python
credential.py
Vitalis-Kirui/Password-Locker
5fd00431039c0306b660220b6cbb62805746b6e3
[ "MIT" ]
null
null
null
credential.py
Vitalis-Kirui/Password-Locker
5fd00431039c0306b660220b6cbb62805746b6e3
[ "MIT" ]
null
null
null
credential.py
Vitalis-Kirui/Password-Locker
5fd00431039c0306b660220b6cbb62805746b6e3
[ "MIT" ]
1
2021-09-07T09:27:44.000Z
2021-09-07T09:27:44.000Z
class Credentials: """ Class for new instances of user credentials """ credentials_list = [] def __init__(self, account_type, username, password): """ Init method for initializing user credentials objects """ self.account_type = account_type self.username = ...
30.117647
122
0.624349
d5dc435a4ead879ffd6d543e1d2a30051170ccdf
1,540
py
Python
std/pytorch/text/13.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
std/pytorch/text/13.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
std/pytorch/text/13.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
import torch import sys import argparse from torchtext.data.utils import get_tokenizer from torchtext.data.utils import ngrams_iterator from torchtext.utils import download_from_url from torchtext.experimental.transforms import ( SentencePieceTokenizer, load_sp_model, PRETRAINED_SP_MODEL, ) def predict(te...
37.560976
106
0.724675
d5dc57791ae7e3e965e66e66895b8e95f0b1f989
4,315
py
Python
datawinners/search/tests/test_submission_header.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
1
2015-11-02T09:11:12.000Z
2015-11-02T09:11:12.000Z
datawinners/search/tests/test_submission_header.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
datawinners/search/tests/test_submission_header.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
import unittest from mock import MagicMock, Mock from datawinners.search.submission_headers import SubmissionAnalysisHeader, AllSubmissionHeader, SuccessSubmissionHeader, ErroredSubmissionHeader, HeaderFactory from mangrove.form_model.field import TextField, IntegerField, UniqueIdField from mangrove.form_model.form_m...
55.320513
203
0.733488
d5dc63d0153985a459d96145415c411b02ecd6e2
1,702
py
Python
osgar/lib/unittest.py
robotika/osgar
6f4f584d5553ab62c08a1c7bb493fefdc9033173
[ "MIT" ]
12
2017-02-16T10:22:59.000Z
2022-03-20T05:48:06.000Z
osgar/lib/unittest.py
robotika/osgar
6f4f584d5553ab62c08a1c7bb493fefdc9033173
[ "MIT" ]
618
2016-08-30T04:46:12.000Z
2022-03-25T16:03:10.000Z
osgar/lib/unittest.py
robotika/osgar
6f4f584d5553ab62c08a1c7bb493fefdc9033173
[ "MIT" ]
11
2016-08-27T20:02:55.000Z
2022-03-07T08:53:53.000Z
import unittest import numpy as np # if this variable is set, stack trace on test failure from this module is not in the output __unittest = True class TestCase(unittest.TestCase): def __init__(self, methodName='runTest'): super().__init__(methodName) self.addTypeEqualityFunc(np.ndarray, 'assert...
48.628571
113
0.685664
d5dc86a27d723db43ec40fc16b5d56d740d35d83
8,531
py
Python
draft.py
HaiDangDang/2020-flatland
abbf2f7f62fabf6da0937f80c2181f1c457ce24a
[ "MIT" ]
null
null
null
draft.py
HaiDangDang/2020-flatland
abbf2f7f62fabf6da0937f80c2181f1c457ce24a
[ "MIT" ]
null
null
null
draft.py
HaiDangDang/2020-flatland
abbf2f7f62fabf6da0937f80c2181f1c457ce24a
[ "MIT" ]
null
null
null
import functools from abc import ABC, abstractmethod import numpy as np import os from typing import Tuple import tensorflow as tf from ray.rllib.models.tf.tf_modelv2 import TFModelV2 from ray.rllib.agents.ppo.ppo import PPOTrainer from ray.rllib.agents.ppo.ppo_tf_policy import KLCoeffMixin, PPOLoss, PPOTFPolicy from ...
34.963115
99
0.62689
d5dc8d378b4b45dd4f767d471ed9e8609bfc913e
13,730
py
Python
graphs/graphs/Bayesian/BayBetaVAE_graph.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
graphs/graphs/Bayesian/BayBetaVAE_graph.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
graphs/graphs/Bayesian/BayBetaVAE_graph.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
""" BayBetaVAE_graph.py: Tensorflow Graph for the Bayesian Beta-Variational Autoencoder """ __author__ = "Khalid M. Kahloot" __copyright__ = "Copyright 2019, Only for professionals" __paper__ = "https://openreview.net/forum?id=Sy2fzU9gl" import tensorflow as tf from bases.base_graph import BaseGrap...
60.219298
163
0.513765
d5dca20b6d7ecfb3ba22cbd5680f5a63896edc0a
482
py
Python
alipay/aop/api/response/AlipayCommerceEducateTrainCourseOfflineResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayCommerceEducateTrainCourseOfflineResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayCommerceEducateTrainCourseOfflineResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayCommerceEducateTrainCourseOfflineResponse(AlipayResponse): def __init__(self): super(AlipayCommerceEducateTrainCourseOfflineResponse, self).__init__() def parse_r...
30.125
120
0.798755
d5dccf5a01c0d4a261dd5b60db3dbd8fd7f521be
16,198
py
Python
pmaf/database/_manifest/_gtdb.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
1
2021-07-02T06:24:17.000Z
2021-07-02T06:24:17.000Z
pmaf/database/_manifest/_gtdb.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
1
2021-06-28T12:02:46.000Z
2021-06-28T12:02:46.000Z
pmaf/database/_manifest/_gtdb.py
mmtechslv/PhyloMAF
bab43dd4a4d2812951b1fdf4f1abb83edb79ea88
[ "BSD-3-Clause" ]
null
null
null
from os import path from pmaf.database._core._base import DatabaseBase from pmaf.database._core._tax_base import DatabaseTaxonomyMixin from pmaf.database._core._seq_base import DatabaseSequenceMixin from pmaf.database._core._phy_base import DatabasePhylogenyMixin from pmaf.database._core._acs_base import DatabaseAccess...
35.213043
88
0.621188