hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c2d5eaaf1132afd1bc8c11e078a763b26d068d6
8,594
py
Python
sktime/forecasting/online_learning/_prediction_weighted_ensembler.py
BINAYKUMAR943/sktime
f02f656de86da420b1c14e58dc60194261969eb3
[ "BSD-3-Clause" ]
2
2020-12-25T08:08:38.000Z
2021-04-07T08:00:56.000Z
sktime/forecasting/online_learning/_prediction_weighted_ensembler.py
afzal442/sktime
294429e7f2ac5824171bb61ad075e0af0055cb02
[ "BSD-3-Clause" ]
1
2021-05-15T16:24:02.000Z
2021-05-16T05:25:31.000Z
sktime/forecasting/online_learning/_prediction_weighted_ensembler.py
afzal442/sktime
294429e7f2ac5824171bb61ad075e0af0055cb02
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # !/usr/bin/env python3 -u # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Implements online algorithms for prediction weighted ensembles.""" import numpy as np from scipy.optimize import bisect from scipy.optimize import nnls class _PredictionWeightedEnsembler: ...
30.692857
85
0.60647
import numpy as np from scipy.optimize import bisect from scipy.optimize import nnls class _PredictionWeightedEnsembler: _tags = { "univariate-only": True, "requires-fh-in-fit": False, "handles-missing-data": False, } def __init__(self, n_estimators=10, loss_func=None): ...
true
true
1c2d5f2c9df3da18ac55ae059c716cda6d52e5df
1,184
py
Python
IPython/core/ipapi.py
tinyclues/ipython
71e32606b0242772b81c9be0d40751ba47d95f2c
[ "BSD-3-Clause-Clear" ]
1
2016-05-26T10:57:18.000Z
2016-05-26T10:57:18.000Z
IPython/core/ipapi.py
adgaudio/ipython
a924f50c0f7b84127391f1c396326258c2b303e2
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/core/ipapi.py
adgaudio/ipython
a924f50c0f7b84127391f1c396326258c2b303e2
[ "BSD-3-Clause-Clear" ]
null
null
null
# encoding: utf-8 """ This module is *completely* deprecated and should no longer be used for any purpose. Currently, we have a few parts of the core that have not been componentized and thus, still rely on this module. When everything has been made into a component, this module will be sent to deathrow. """ #------...
39.466667
78
0.451014
def get(): from IPython.core.interactiveshell import InteractiveShell return InteractiveShell.instance()
true
true
1c2d5f30fd5127aa23a56b3d35a865db7e43e244
341
py
Python
accounts/models.py
achuthvarghese/django_realtime_chat
922bd1971c7c0102f007581967e6aecf40171e48
[ "MIT" ]
null
null
null
accounts/models.py
achuthvarghese/django_realtime_chat
922bd1971c7c0102f007581967e6aecf40171e48
[ "MIT" ]
null
null
null
accounts/models.py
achuthvarghese/django_realtime_chat
922bd1971c7c0102f007581967e6aecf40171e48
[ "MIT" ]
1
2021-10-02T06:52:09.000Z
2021-10-02T06:52:09.000Z
import uuid from django.contrib.auth.models import AbstractUser from django.db import models from django.utils.translation import gettext_lazy as _ class User(AbstractUser): id = models.UUIDField( _("ID"), primary_key=True, default=uuid.uuid4, editable=False, unique=True ) class Meta: db...
22.733333
82
0.72434
import uuid from django.contrib.auth.models import AbstractUser from django.db import models from django.utils.translation import gettext_lazy as _ class User(AbstractUser): id = models.UUIDField( _("ID"), primary_key=True, default=uuid.uuid4, editable=False, unique=True ) class Meta: db...
true
true
1c2d5fe47862d14ed04c6b7a8abb128338c70732
8,005
py
Python
formulario.py
AtlasGold/Formulario-Abro
f7afb4c6b192c58c6862ef557b15b95cd3205832
[ "MIT" ]
null
null
null
formulario.py
AtlasGold/Formulario-Abro
f7afb4c6b192c58c6862ef557b15b95cd3205832
[ "MIT" ]
null
null
null
formulario.py
AtlasGold/Formulario-Abro
f7afb4c6b192c58c6862ef557b15b95cd3205832
[ "MIT" ]
null
null
null
from logging import exception from PIL import Image from os import write import streamlit as st from streamlit.type_util import Key import os #from conexão.conexao import cnxn,cursor #trocar o nome da pagina e o icone st.set_page_config(page_title = "Abro - Odontologia Especializada", page_icon=":smiley:") #re...
41.910995
889
0.690319
from logging import exception from PIL import Image from os import write import streamlit as st from streamlit.type_util import Key import os st.set_page_config(page_title = "Abro - Odontologia Especializada", page_icon=":smiley:") hide_st_style = """ <style> #MainMenu {visibility: ...
true
true
1c2d5ff1aa83ff5041a74b069d2d258e7e229a6d
2,267
py
Python
reid/insightface/model.py
amirassov/topcoder-facial-marathon
37f6828a589717d0004dd84d51eb7bc6a1b310fd
[ "MIT" ]
11
2019-08-19T11:49:11.000Z
2021-05-21T06:00:08.000Z
reid/insightface/model.py
amirassov/topcoder-facial-marathon
37f6828a589717d0004dd84d51eb7bc6a1b310fd
[ "MIT" ]
null
null
null
reid/insightface/model.py
amirassov/topcoder-facial-marathon
37f6828a589717d0004dd84d51eb7bc6a1b310fd
[ "MIT" ]
3
2019-10-09T09:20:56.000Z
2020-08-28T02:39:01.000Z
import cv2 import numpy as np import mxnet as mx from sklearn.preprocessing import normalize from reid.insightface.mtcnn import MtcnnDetector from reid.insightface.utils import preprocess def get_embedder(ctx, image_size, model_prefix: str, layer): sym, arg_params, aux_params = mx.model.load_checkpoint(model_pre...
36.564516
88
0.664314
import cv2 import numpy as np import mxnet as mx from sklearn.preprocessing import normalize from reid.insightface.mtcnn import MtcnnDetector from reid.insightface.utils import preprocess def get_embedder(ctx, image_size, model_prefix: str, layer): sym, arg_params, aux_params = mx.model.load_checkpoint(model_pre...
true
true
1c2d60629e50286a1c1d72d99a70b5b0dfbf9049
9,690
py
Python
fastai2/text/learner.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
fastai2/text/learner.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
fastai2/text/learner.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/37_text.learner.ipynb (unless otherwise specified). __all__ = ['match_embeds', 'load_ignore_keys', 'TextLearner', 'decode_spec_tokens', 'LMLearner', 'language_model_learner', 'text_classifier_learner'] # Cell from ..basics import * from .core import * from .d...
44.861111
123
0.642724
__all__ = ['match_embeds', 'load_ignore_keys', 'TextLearner', 'decode_spec_tokens', 'LMLearner', 'language_model_learner', 'text_classifier_learner'] from ..basics import * from .core import * from .data import * from .models.core import * from .models.awdlstm import * from ..callback.rnn import * def ...
true
true
1c2d6121c44378aca199f3bf7aee582ad8f74fb8
3,912
py
Python
modules/finance/arrival_and_billing/code/list_arrival_and_billing.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
1
2018-11-27T08:08:07.000Z
2018-11-27T08:08:07.000Z
modules/finance/arrival_and_billing/code/list_arrival_and_billing.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
null
null
null
modules/finance/arrival_and_billing/code/list_arrival_and_billing.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from django.views.generic import ListView from modules.finance.arrival_and_billing.models import * from modules.share_module.formater import * from modules.share_module.permissionMixi...
32.6
112
0.77684
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from django.views.generic import ListView from modules.finance.arrival_and_billing.models import * from modules.share_module.formater import * from modules.share_module.permissionMixin import class...
true
true
1c2d61cbe1d6786da71786c3d16234d6959e6428
2,633
py
Python
ppr-api/test_data/create_test_data.py
pwei1018/ppr
1fdd2f1ad33217045404d7b872d9fad41a4c7da6
[ "Apache-2.0" ]
null
null
null
ppr-api/test_data/create_test_data.py
pwei1018/ppr
1fdd2f1ad33217045404d7b872d9fad41a4c7da6
[ "Apache-2.0" ]
null
null
null
ppr-api/test_data/create_test_data.py
pwei1018/ppr
1fdd2f1ad33217045404d7b872d9fad41a4c7da6
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
34.644737
96
0.631599
import os from sqlalchemy.sql import text from ppr_api import create_app from ppr_api.models import db def execute_script(session, file_name): print('Executing SQL statements in file ' + file_name) with open(file_name, 'r') as sql_file: sql_command = '' for line in sql...
true
true
1c2d62d5d2f34e2b1d7c27b8e207a5bd7ecb9ea2
1,030
py
Python
isi_sdk_7_2/test/test_auth_access_access_item_relevant_ace.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_7_2/test/test_auth_access_access_item_relevant_ace.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_7_2/test/test_auth_access_access_item_relevant_ace.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 2 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_7_2 from isi...
25.121951
121
0.741748
from __future__ import absolute_import import unittest import isi_sdk_7_2 from isi_sdk_7_2.models.auth_access_access_item_relevant_ace import AuthAccessAccessItemRelevantAce from isi_sdk_7_2.rest import ApiException class TestAuthAccessAccessItemRelevantAce(unittest.TestCase): def setUp(self): pa...
true
true
1c2d6449897c82aec7ff4cc6d62161ab56b18cad
2,977
py
Python
run_mypy.py
paper42/meson
f67994476da4bdc5389c558989809df48a172c6e
[ "Apache-2.0" ]
2
2021-12-06T21:07:39.000Z
2021-12-06T21:20:39.000Z
run_mypy.py
eli-schwartz/meson
40343fae9fb0acae6509753a5879bf4964276053
[ "Apache-2.0" ]
1
2021-09-03T18:10:25.000Z
2021-09-03T18:10:25.000Z
run_mypy.py
eli-schwartz/meson
40343fae9fb0acae6509753a5879bf4964276053
[ "Apache-2.0" ]
3
2021-01-08T08:54:47.000Z
2021-03-16T11:55:20.000Z
#!/usr/bin/env python3 from pathlib import Path import argparse import os import subprocess import sys import typing as T from mesonbuild.mesonlib import version_compare modules = [ # fully typed submodules # 'mesonbuild/ast', 'mesonbuild/cmake', 'mesonbuild/compilers', 'mesonbuild/dependencies',...
27.82243
108
0.665771
from pathlib import Path import argparse import os import subprocess import sys import typing as T from mesonbuild.mesonlib import version_compare modules = [ 'mesonbuild/cmake', 'mesonbuild/compilers', 'mesonbuild/dependencies', 'mesonbuild/interpreter/primitives', 'mesonbuild/interpr...
true
true
1c2d6457bac7b4ad1cd1f39f5199fcc8637c5ec7
3,679
py
Python
modules/dials/precommitbx/nagger.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
null
null
null
modules/dials/precommitbx/nagger.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
null
null
null
modules/dials/precommitbx/nagger.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
1
2020-02-04T15:39:06.000Z
2020-02-04T15:39:06.000Z
from __future__ import absolute_import, division, print_function import os import sys try: import stat except ImportError: stat = None def nag(): """ Check if pre-commits should be installed for this repository. If they are not and should be then annoy the developer. To be called in libtbx_r...
35.718447
87
0.65371
from __future__ import absolute_import, division, print_function import os import sys try: import stat except ImportError: stat = None def nag(): if os.name == "nt" or not stat: return try: raise Exception() except Exception: frame = sys.exc_info()[2].tb_frame...
true
true
1c2d65b943ba706213e2cc73d096a3a4131c6d90
6,035
py
Python
influxdump/bin/influxdump.py
gams/influxdump
a17690e72529ef6d5d378089a7d05f8ed2591877
[ "Apache-2.0" ]
4
2017-05-25T12:22:07.000Z
2021-09-04T04:37:55.000Z
influxdump/bin/influxdump.py
gams/influxdump
a17690e72529ef6d5d378089a7d05f8ed2591877
[ "Apache-2.0" ]
16
2018-01-18T05:20:44.000Z
2021-04-30T05:14:20.000Z
influxdump/bin/influxdump.py
gams/influxdump
a17690e72529ef6d5d378089a7d05f8ed2591877
[ "Apache-2.0" ]
2
2017-11-15T09:21:11.000Z
2019-09-14T08:09:40.000Z
# -*- coding: utf-8 -*- import argparse import getpass import json import sys from influxdump.data import dump_data, load_file, load_folder from influxdump.db import get_client from influxdump.exceptions import TypecastError CHUNKSIZE = 50000 def get_args(): parser = argparse.ArgumentParser(description='influx...
32.798913
79
0.556089
import argparse import getpass import json import sys from influxdump.data import dump_data, load_file, load_folder from influxdump.db import get_client from influxdump.exceptions import TypecastError CHUNKSIZE = 50000 def get_args(): parser = argparse.ArgumentParser(description='influxDB data backup tool') ...
true
true
1c2d6640df87b3db1e71e52a5923727b2b0ee65f
46,334
py
Python
Messages.py
accept8605/OOT-Rando-with-working-Navi
84616d081efdc6989acd534676d2400d2bd68f23
[ "MIT" ]
null
null
null
Messages.py
accept8605/OOT-Rando-with-working-Navi
84616d081efdc6989acd534676d2400d2bd68f23
[ "MIT" ]
null
null
null
Messages.py
accept8605/OOT-Rando-with-working-Navi
84616d081efdc6989acd534676d2400d2bd68f23
[ "MIT" ]
null
null
null
# text details: https://wiki.cloudmodding.com/oot/Text_Format import random TABLE_START = 0xB849EC TEXT_START = 0x92D000 TABLE_SIZE_LIMIT = 0x43A8 ENG_TEXT_SIZE_LIMIT = 0x38130 JPN_TEXT_SIZE_LIMIT = 0x3A150 # name of type, followed by number of additional bytes to read, follwed by a function that prints the code C...
52.892694
200
0.66053
import random TABLE_START = 0xB849EC TEXT_START = 0x92D000 TABLE_SIZE_LIMIT = 0x43A8 ENG_TEXT_SIZE_LIMIT = 0x38130 JPN_TEXT_SIZE_LIMIT = 0x3A150 CONTROL_CODES = { 0x00: ('pad', 0, lambda _: '<pad>' ), 0x01: ('line-break', 0, lambda _: '\n' ), 0x02: ('end', 0, lambda _: '' ), 0x04: ('box-break', 0...
true
true
1c2d66ca6f72fce91804ef705bf0a12dad3f4c66
11,297
py
Python
postprocess/contours_image_cdb_extract.py
cinemascienceworkflows/2021-06_E4S-Tutorial
bf97fb65bce73b4f59e2cd26e969c01370fea62c
[ "BSD-3-Clause" ]
null
null
null
postprocess/contours_image_cdb_extract.py
cinemascienceworkflows/2021-06_E4S-Tutorial
bf97fb65bce73b4f59e2cd26e969c01370fea62c
[ "BSD-3-Clause" ]
null
null
null
postprocess/contours_image_cdb_extract.py
cinemascienceworkflows/2021-06_E4S-Tutorial
bf97fb65bce73b4f59e2cd26e969c01370fea62c
[ "BSD-3-Clause" ]
null
null
null
# state file generated using paraview version 5.9.0 #### import the simple module from the paraview from paraview.simple import * import glob import os def create_cinema_csv( db, datadir ): files = sorted(glob.glob(db + "/RenderView*")) cur_image = 0 with open(db + "/data.csv", "w") as f: f.write(...
47.070833
184
0.653713
iew*")) cur_image = 0 with open(db + "/data.csv", "w") as f: f.write("time,FILE\n") for infile in files: path, file_name = os.path.split(infile) print(file_name) f.write(str(cur_image) + "," + file_name + "\n") cur_image = cur_image + 1 def par...
true
true
1c2d68cb6473308dfc2af807e1b06014c9ca446c
47,587
py
Python
astropy/modeling/fitting.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
astropy/modeling/fitting.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
astropy/modeling/fitting.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module implements classes (called Fitters) which combine optimization algorithms (typically from `scipy.optimize`) with statistic functions to perform fitting. Fitters are implemented as callable classes. In addition to the data to fit, the ``__c...
37.293887
157
0.589195
from __future__ import (absolute_import, unicode_literals, division, print_function) import abc import inspect import operator import warnings from functools import reduce, wraps import numpy as np from .utils import poly_map_domain, _combine_equivalency_dict from ..units import Quantity ...
true
true
1c2d692655e59256487700286bbf76b05f2cdd07
2,116
py
Python
examples/albert/utils.py
hivemind-debug/debug
c5b756a6a48532a43cd080d4b3e02e7dd023e317
[ "MIT" ]
null
null
null
examples/albert/utils.py
hivemind-debug/debug
c5b756a6a48532a43cd080d4b3e02e7dd023e317
[ "MIT" ]
null
null
null
examples/albert/utils.py
hivemind-debug/debug
c5b756a6a48532a43cd080d4b3e02e7dd023e317
[ "MIT" ]
null
null
null
from typing import Dict, List, Tuple from multiaddr import Multiaddr from pydantic import BaseModel, StrictFloat, confloat, conint from hivemind import choose_ip_address from hivemind.dht.crypto import RSASignatureValidator from hivemind.dht.schema import BytesWithPublicKey, SchemaValidator from hivemind.dht.validati...
36.482759
105
0.734877
from typing import Dict, List, Tuple from multiaddr import Multiaddr from pydantic import BaseModel, StrictFloat, confloat, conint from hivemind import choose_ip_address from hivemind.dht.crypto import RSASignatureValidator from hivemind.dht.schema import BytesWithPublicKey, SchemaValidator from hivemind.dht.validati...
true
true
1c2d6a5ab20c4467dfe13585058f9cff624d91c4
1,048
py
Python
users/urls.py
utk-dev/Storyteller
4c15daada1948698a5169275e544e714b836a404
[ "MIT" ]
3
2020-11-02T09:13:47.000Z
2020-11-07T06:02:10.000Z
users/urls.py
utk-dev/Storyteller
4c15daada1948698a5169275e544e714b836a404
[ "MIT" ]
null
null
null
users/urls.py
utk-dev/Storyteller
4c15daada1948698a5169275e544e714b836a404
[ "MIT" ]
null
null
null
from django.urls import path from .views import * app_name = 'users' urlpatterns = [ path('signup/', signup_view, name='signup-view'), path('login/', login_view, name='login-view'), path('logout/', logout_view, name='logout-view'), path('settings/', settings_view, name='settings-view'), path('sett...
52.4
101
0.708969
from django.urls import path from .views import * app_name = 'users' urlpatterns = [ path('signup/', signup_view, name='signup-view'), path('login/', login_view, name='login-view'), path('logout/', logout_view, name='logout-view'), path('settings/', settings_view, name='settings-view'), path('sett...
true
true
1c2d6a93b212bc20997528b53f8a81e1cf96b964
436
py
Python
python/ctci-big-o.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
21
2015-02-09T18:08:38.000Z
2021-11-08T15:00:48.000Z
python/ctci-big-o.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
7
2020-04-12T23:00:19.000Z
2021-01-30T23:44:24.000Z
python/ctci-big-o.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
27
2015-07-22T18:08:12.000Z
2022-02-28T19:50:26.000Z
import math def is_prime(test_case): if test_case == 1: return False for factor in range(2, math.ceil(math.sqrt(test_case) + 1)): if test_case != factor and test_case % factor == 0: return False return True NUM_CASES = int(input().strip()) for _ in range(NUM_CASES): test_...
21.8
64
0.603211
import math def is_prime(test_case): if test_case == 1: return False for factor in range(2, math.ceil(math.sqrt(test_case) + 1)): if test_case != factor and test_case % factor == 0: return False return True NUM_CASES = int(input().strip()) for _ in range(NUM_CASES): test_...
true
true
1c2d6a9405b277d357d1ad3e17d00230b246d383
1,551
py
Python
graphgym/models/register.py
tigerneil/GraphGym
77f1e7acb4d08b6647b2cf1d147d86b736ac25e2
[ "MIT" ]
7
2021-03-23T08:10:25.000Z
2022-01-10T05:51:38.000Z
graphgym/models/register.py
batermj/GraphGym
05f749900ef07029a127dc36e74e43f4d0eb1a06
[ "MIT" ]
null
null
null
graphgym/models/register.py
batermj/GraphGym
05f749900ef07029a127dc36e74e43f4d0eb1a06
[ "MIT" ]
2
2020-11-23T21:42:59.000Z
2021-03-10T11:43:27.000Z
import torch import torch.nn as nn def register(key, module, module_dict): if key in module_dict: raise KeyError('Key {} is already pre-defined.'.format(key)) else: module_dict[key] = module act_dict = {} def register_act(key, module): register(key, module, act_dict) node_encoder_dict =...
23.5
68
0.727917
import torch import torch.nn as nn def register(key, module, module_dict): if key in module_dict: raise KeyError('Key {} is already pre-defined.'.format(key)) else: module_dict[key] = module act_dict = {} def register_act(key, module): register(key, module, act_dict) node_encoder_dict =...
true
true
1c2d6b04c3cbbef99c9d3c2801c0377fb7de6248
10,117
py
Python
MeerK40t.py
Sophist-UK/meerk40t
abbbd19796a0d50d90ca553106ac738f618dc19b
[ "MIT" ]
null
null
null
MeerK40t.py
Sophist-UK/meerk40t
abbbd19796a0d50d90ca553106ac738f618dc19b
[ "MIT" ]
null
null
null
MeerK40t.py
Sophist-UK/meerk40t
abbbd19796a0d50d90ca553106ac738f618dc19b
[ "MIT" ]
null
null
null
import argparse import sys from Console import Console from DefaultModules import * from GrblDevice import GrblDevice from LhystudiosDevice import LhystudiosDevice from MoshiboardDevice import MoshiboardDevice from RasterScripts import RasterScripts from RuidaDevice import RuidaDevice from LaserServer import...
39.213178
125
0.583869
import argparse import sys from Console import Console from DefaultModules import * from GrblDevice import GrblDevice from LhystudiosDevice import LhystudiosDevice from MoshiboardDevice import MoshiboardDevice from RasterScripts import RasterScripts from RuidaDevice import RuidaDevice from LaserServer import...
true
true
1c2d6b20355c1a024ee4a79bffc236f44ba72659
5,027
py
Python
pytest_localserver/https.py
kianmeng/pytest-localserver
387eb4a9e2b9a0e116685fd0ed2ace7dd710bb5b
[ "MIT" ]
null
null
null
pytest_localserver/https.py
kianmeng/pytest-localserver
387eb4a9e2b9a0e116685fd0ed2ace7dd710bb5b
[ "MIT" ]
2
2021-09-14T09:06:20.000Z
2021-09-14T17:23:07.000Z
pytest_localserver/https.py
kianmeng/pytest-localserver
387eb4a9e2b9a0e116685fd0ed2ace7dd710bb5b
[ "MIT" ]
null
null
null
# Copyright (C) 2010-2013 Sebastian Rahlf and others (see AUTHORS). # # This program is release under the MIT license. You can find the full text of # the license in the LICENSE file. import os.path from pytest_localserver.http import ContentServer #: default server certificate DEFAULT_CERTIFICATE = os.path.join( ...
32.642857
127
0.623632
import os.path from pytest_localserver.http import ContentServer DEFAULT_CERTIFICATE = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'server.pem') class SecureContentServer (ContentServer): def __init__(self, host='localhost', port=0, key=DEFAULT_CERTIFICATE, cert=DEFAUL...
true
true
1c2d6b234b979e190d0b0b73d6e00747ee6c7c5a
1,319
py
Python
tests/empty_test.py
pkking/waaagh_system
1587a2df863136bb2acb275427300c8e4fda977d
[ "Apache-2.0" ]
null
null
null
tests/empty_test.py
pkking/waaagh_system
1587a2df863136bb2acb275427300c8e4fda977d
[ "Apache-2.0" ]
null
null
null
tests/empty_test.py
pkking/waaagh_system
1587a2df863136bb2acb275427300c8e4fda977d
[ "Apache-2.0" ]
null
null
null
import pytest import json @pytest.mark.usefixtures("db") class TestEmptyResources: def test_empty_post(self): # all the resources should return 404 res = self.app.get('/posts') assert res.status_code == 404 assert 'not any Post exist' in json.loads(res.data.decode('utf-8'))['message...
42.548387
94
0.627748
import pytest import json @pytest.mark.usefixtures("db") class TestEmptyResources: def test_empty_post(self): res = self.app.get('/posts') assert res.status_code == 404 assert 'not any Post exist' in json.loads(res.data.decode('utf-8'))['message'] res = self.app.get('/posts...
true
true
1c2d6b8f79b45992ad7532202bda3be14726f0b1
3,588
py
Python
ic_engine.py
cattech-lab/cantera_examples
13e969b2a767bed5bb0d79adf86187cd9fbd090d
[ "MIT" ]
4
2020-11-27T03:11:07.000Z
2022-02-17T17:09:23.000Z
ic_engine.py
Ohlagrange/cantera_examples
13e969b2a767bed5bb0d79adf86187cd9fbd090d
[ "MIT" ]
null
null
null
ic_engine.py
Ohlagrange/cantera_examples
13e969b2a767bed5bb0d79adf86187cd9fbd090d
[ "MIT" ]
3
2020-11-27T03:11:13.000Z
2022-01-07T13:39:07.000Z
""" Simulation of a internal combustion engine. """ import cantera as ct import numpy as np import csv #------------------------------------------------------ # Input Parameters rpm = 600.0 # engine speed [rpm] bore = 82.55 # bore diameter [mm] stroke = 114.3 # stroke [mm] cratio = 10.0 # compression ratio [-] con...
26
133
0.628763
import cantera as ct import numpy as np import csv rpm = 600.0 bore = 82.55 stroke = 114.3 cratio = 10.0 conrod = 200.0 T_ini = 350.0 p_ini = 1.0e5 phi = 0.33 T_out = 300.0 p_out = 1.0e5 c_out = 'O2:1.0, N2:3.76' reaction_mechanism = 'reduced_247.cti' ca_start = -144.0 ca_end = 180.0 ca_step =...
true
true
1c2d6bee2051e16a5c40b582fca8a67a0f1ad392
427
py
Python
env/Lib/site-packages/plotly/validators/funnel/marker/colorbar/title/_text.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/funnel/marker/colorbar/title/_text.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/funnel/marker/colorbar/title/_text.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_na...
30.5
86
0.65808
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_na...
true
true
1c2d6ce1b5a4e74a3fcafcdee6cf905f17b70757
10,336
py
Python
core/platform/email/mailgun_email_services_test.py
anubhavsinha98/oppia
9a64ea2e91d2f471ce22bd39da77b43dccd5b51f
[ "Apache-2.0" ]
1
2019-08-31T17:06:41.000Z
2019-08-31T17:06:41.000Z
core/platform/email/mailgun_email_services_test.py
anubhavsinha98/oppia
9a64ea2e91d2f471ce22bd39da77b43dccd5b51f
[ "Apache-2.0" ]
null
null
null
core/platform/email/mailgun_email_services_test.py
anubhavsinha98/oppia
9a64ea2e91d2f471ce22bd39da77b43dccd5b51f
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
47.196347
80
0.654605
from __future__ import absolute_import from core.platform.email import mailgun_email_services from core.tests import test_utils import feconf import python_utils class EmailTests(test_utils.GenericTestBase): def test_post_to_mailgun(self): swapped_urlopen = lambda x: x swapped_...
true
true
1c2d6d5e6c094413dfde7eaea42872c1563a08c2
2,332
py
Python
openmdao/core/tests/test_reconf_parallel_group.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_reconf_parallel_group.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_reconf_parallel_group.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
from __future__ import division import numpy as np import unittest from openmdao.api import Problem, Group, IndepVarComp, ExplicitComponent, ExecComp from openmdao.api import NewtonSolver, PETScKrylov, NonlinearBlockGS, LinearBlockGS from openmdao.utils.assert_utils import assert_rel_error try: from openmdao.para...
31.513514
89
0.62307
from __future__ import division import numpy as np import unittest from openmdao.api import Problem, Group, IndepVarComp, ExplicitComponent, ExecComp from openmdao.api import NewtonSolver, PETScKrylov, NonlinearBlockGS, LinearBlockGS from openmdao.utils.assert_utils import assert_rel_error try: from openmdao.para...
true
true
1c2d6d80e0bf81021a0b116517fff0995fc983a1
77,921
py
Python
src/quart/app.py
Dunkledore/quart
803c8678b083895f4ece35fccb6aca56e189ee0a
[ "MIT" ]
null
null
null
src/quart/app.py
Dunkledore/quart
803c8678b083895f4ece35fccb6aca56e189ee0a
[ "MIT" ]
null
null
null
src/quart/app.py
Dunkledore/quart
803c8678b083895f4ece35fccb6aca56e189ee0a
[ "MIT" ]
null
null
null
from __future__ import annotations import asyncio import signal import sys import warnings from collections import defaultdict, OrderedDict from datetime import timedelta from itertools import chain from logging import Logger from pathlib import Path from types import TracebackType from typing import ( Any, An...
36.68597
100
0.619743
from __future__ import annotations import asyncio import signal import sys import warnings from collections import defaultdict, OrderedDict from datetime import timedelta from itertools import chain from logging import Logger from pathlib import Path from types import TracebackType from typing import ( Any, An...
true
true
1c2d6e01456bf2346f5ad723a642aa5a13a6b14a
7,769
py
Python
epic_barcoder/epic_barcoder.py
manutamminen/epic_barcoder
a9055539fe89fb77bb9661926da1da80691b775d
[ "MIT" ]
null
null
null
epic_barcoder/epic_barcoder.py
manutamminen/epic_barcoder
a9055539fe89fb77bb9661926da1da80691b775d
[ "MIT" ]
null
null
null
epic_barcoder/epic_barcoder.py
manutamminen/epic_barcoder
a9055539fe89fb77bb9661926da1da80691b775d
[ "MIT" ]
null
null
null
import os import subprocess import string import random import time from collections import defaultdict, Counter import epride as ep bridges_dict = {"16S": "GWATTACCGCGGCKGCTGCATCTTCTCCAAATGGGTCATGATC", "18S": "AAGAACGGCCATGCACCACCACATCTTCTCCAAATGGGTCATGATC", "narG2": "ACCGACATGCCGWTSC...
33.487069
141
0.61179
import os import subprocess import string import random import time from collections import defaultdict, Counter import epride as ep bridges_dict = {"16S": "GWATTACCGCGGCKGCTGCATCTTCTCCAAATGGGTCATGATC", "18S": "AAGAACGGCCATGCACCACCACATCTTCTCCAAATGGGTCATGATC", "narG2": "ACCGACATGCCGWTSC...
true
true
1c2d6e28c1806da22d3fad7024f4b9259a7a8ef1
80
py
Python
src/waldur_mastermind/notifications/__init__.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_mastermind/notifications/__init__.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_mastermind/notifications/__init__.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
default_app_config = 'waldur_mastermind.notifications.apps.NotificationsConfig'
40
79
0.8875
default_app_config = 'waldur_mastermind.notifications.apps.NotificationsConfig'
true
true
1c2d6eef7384ad3b951f6a4a2afb394083967c06
12,194
py
Python
aiida/cmdline/commands/cmd_code.py
sponce24/aiida-core
a31fdbf1a458c76cc30886a3c296ee859c0d3833
[ "BSD-2-Clause", "MIT" ]
null
null
null
aiida/cmdline/commands/cmd_code.py
sponce24/aiida-core
a31fdbf1a458c76cc30886a3c296ee859c0d3833
[ "BSD-2-Clause", "MIT" ]
null
null
null
aiida/cmdline/commands/cmd_code.py
sponce24/aiida-core
a31fdbf1a458c76cc30886a3c296ee859c0d3833
[ "BSD-2-Clause", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
35.55102
111
0.660243
)) @verdi_code.command() @arguments.CODE() @arguments.LABEL() @with_dbenv() def relabel(code, label): old_label = code.full_label try: code.relabel(label) except InputValidationError as exception: echo.echo_critical('invalid code name: {}'.format(exception)) else: echo.echo_s...
true
true
1c2d703cd9d7ce09514fa83cfca5a0cf5bcf78b9
6,002
py
Python
discord/stage_instance.py
mrvillage/discord.py
15a09772c292a9fc76ba4125c76bdf7cec08fd2e
[ "MIT" ]
3
2021-08-28T04:55:11.000Z
2022-01-26T03:22:08.000Z
discord/stage_instance.py
mrvillage/discord.py2
15a09772c292a9fc76ba4125c76bdf7cec08fd2e
[ "MIT" ]
null
null
null
discord/stage_instance.py
mrvillage/discord.py2
15a09772c292a9fc76ba4125c76bdf7cec08fd2e
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
31.756614
117
0.645452
from __future__ import annotations from typing import TYPE_CHECKING, Optional from .enums import StagePrivacyLevel, try_enum from .errors import InvalidArgument from .mixins import Hashable from .utils import MISSING, cached_slot_property __all__ = ("StageInstance",) if TYPE_CHECKING: from .channel import Stag...
true
true
1c2d704e3aa0894611a77b676b4ac217652f620d
795
py
Python
ex072.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
ex072.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
ex072.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
print(""" Exercício Python 072: Crie um programa que tenha uma dupla totalmente preenchida com uma contagem por extenso, de zero até vinte. Seu programa deverá ler um número pelo teclado (entre 0 e 20) e mostrá-lo por extenso. """) zero = ('zero','um','dois','Tres','quatro','cinco','seis','sete','oito','nove','dez','...
33.125
130
0.615094
print(""" Exercício Python 072: Crie um programa que tenha uma dupla totalmente preenchida com uma contagem por extenso, de zero até vinte. Seu programa deverá ler um número pelo teclado (entre 0 e 20) e mostrá-lo por extenso. """) zero = ('zero','um','dois','Tres','quatro','cinco','seis','sete','oito','nove','dez','...
true
true
1c2d707a1b5ddad68ed53067b735ef86194014f0
1,319
py
Python
code/python/FactSetOwnership/v1/fds/sdk/FactSetOwnership/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/FactSetOwnership/v1/fds/sdk/FactSetOwnership/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/FactSetOwnership/v1/fds/sdk/FactSetOwnership/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
# flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: # from from fds.sdk.FactSetOwnership.model.pet import Pet # or import this package, b...
54.958333
92
0.859742
from fds.sdk.FactSetOwnership.model.asset_type import AssetType from fds.sdk.FactSetOwnership.model.error_response import ErrorResponse from fds.sdk.FactSetOwnership.model.error_response_sub_errors import ErrorResponseSubErrors from fds.sdk.FactSetOwnership.model.fund_holding import FundHolding from fds.sdk....
true
true
1c2d709fffae9e0e4b0c66df3aca50c6e32acd0d
2,906
py
Python
notebooks/model_v2_small.py
deKeijzer/SRON-DCGAN
1ead827ebf549917435e6bc9ddd2d4d5951aa205
[ "MIT" ]
null
null
null
notebooks/model_v2_small.py
deKeijzer/SRON-DCGAN
1ead827ebf549917435e6bc9ddd2d4d5951aa205
[ "MIT" ]
null
null
null
notebooks/model_v2_small.py
deKeijzer/SRON-DCGAN
1ead827ebf549917435e6bc9ddd2d4d5951aa205
[ "MIT" ]
null
null
null
# General imports from __future__ import print_function #%matplotlib inline import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision....
29.958763
101
0.5468
from __future__ import print_function import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torc...
true
true
1c2d715d7003a6f5ae48af76c2dbf46d9fd72999
577
py
Python
Components/student/urls.py
iamTanTan/E-Learning_Lab_Spring_2021
e426ba982cc5044510eb1d8b80b377cb0bd5407a
[ "MIT" ]
2
2021-01-29T22:35:28.000Z
2021-05-13T23:35:54.000Z
Components/student/urls.py
iamTanTan/E-Learning_Lab_Spring_2021
e426ba982cc5044510eb1d8b80b377cb0bd5407a
[ "MIT" ]
8
2021-03-19T11:24:23.000Z
2022-03-12T00:57:13.000Z
Components/student/urls.py
iamTanTan/E-Learning_Lab_Spring_2021
e426ba982cc5044510eb1d8b80b377cb0bd5407a
[ "MIT" ]
1
2021-09-11T15:00:09.000Z
2021-09-11T15:00:09.000Z
from django.urls import path from . import views urlpatterns = [ path("<id_field>/", views.class_index, name="class_index"), path("<id_field>/<int:pk>/", views.class_detail, name="class_detail"), path("welcome/<id_field>", views.welcome_page, name="welcome_page"), path("reading_material/<id_field>", vi...
48.083333
89
0.694974
from django.urls import path from . import views urlpatterns = [ path("<id_field>/", views.class_index, name="class_index"), path("<id_field>/<int:pk>/", views.class_detail, name="class_detail"), path("welcome/<id_field>", views.welcome_page, name="welcome_page"), path("reading_material/<id_field>", vi...
true
true
1c2d7239b1e15d3d0f200c27c24ade50540899cb
1,215
py
Python
mcsrvstats/exceptions/exceptions.py
Darkflame72/mc-server-stats
991020d3bac9aa453fd38546ef3eab914ce250fa
[ "MIT" ]
1
2021-11-24T02:02:34.000Z
2021-11-24T02:02:34.000Z
mcsrvstats/exceptions/exceptions.py
Darkflame72/mc-server-stats
991020d3bac9aa453fd38546ef3eab914ce250fa
[ "MIT" ]
22
2020-08-26T05:12:46.000Z
2021-12-20T15:20:45.000Z
mcsrvstats/exceptions/exceptions.py
Obsidion-dev/mc-server-stats
991020d3bac9aa453fd38546ef3eab914ce250fa
[ "MIT" ]
2
2020-10-31T05:54:56.000Z
2021-02-15T03:11:32.000Z
"""All exceptions for mcsrvstats.""" from typing import Optional class ApiError(Exception): """Raised when a error occurs on the api side.""" def __init__(self, error: str, source: Optional[str] = "unknown source") -> None: """Error raised when api is not succesful. Args: error (...
27
86
0.588477
from typing import Optional class ApiError(Exception): def __init__(self, error: str, source: Optional[str] = "unknown source") -> None: self.message = f"The {source}API had {error}" super().__init__(self.message) def __str__(self) -> str: return self.message class PlayerNotFoundEr...
true
true
1c2d72a65ac2c4d2503dd453f46284e22f26e76e
1,033
py
Python
src/images.py
rafalou38/mangafetch
6bd313f9b9cfb2ea729e49d382a4085c9aaf094e
[ "MIT" ]
1
2021-03-17T07:56:14.000Z
2021-03-17T07:56:14.000Z
src/images.py
rafalou38/mangafetch
6bd313f9b9cfb2ea729e49d382a4085c9aaf094e
[ "MIT" ]
null
null
null
src/images.py
rafalou38/mangafetch
6bd313f9b9cfb2ea729e49d382a4085c9aaf094e
[ "MIT" ]
null
null
null
import PIL.Image import numpy import os def tile(image_path): try: ratio = 1.4 image = PIL.Image.open(image_path) image = numpy.array(image) height = image.shape[1] * ratio if image.shape[1] * 2 < image.shape[0]: # width = image.shape[0] images = []...
25.825
64
0.463698
import PIL.Image import numpy import os def tile(image_path): try: ratio = 1.4 image = PIL.Image.open(image_path) image = numpy.array(image) height = image.shape[1] * ratio if image.shape[1] * 2 < image.shape[0]: images = [] y = 0 ...
true
true
1c2d72d2c42ef715c70ebbdd79ac19337179888d
469
py
Python
data/scripts/templates/object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.iff" resul...
27.588235
95
0.739872
true
true
1c2d7458d6d470582126afdc26881299806f1051
3,454
py
Python
forecasting.py
caegomezji/FORDAT
450dca5a9b0c059429421b773be3e7d54367fdcf
[ "MIT" ]
1
2021-08-28T22:42:11.000Z
2021-08-28T22:42:11.000Z
forecasting.py
caegomezji/FORDAT
450dca5a9b0c059429421b773be3e7d54367fdcf
[ "MIT" ]
null
null
null
forecasting.py
caegomezji/FORDAT
450dca5a9b0c059429421b773be3e7d54367fdcf
[ "MIT" ]
1
2021-08-14T00:58:54.000Z
2021-08-14T00:58:54.000Z
# ARIMA example from statsmodels.tsa.arima.model import ARIMA import numpy as np from statsmodels.tools.eval_measures import rmse import pmdarima as pm from fbprophet import Prophet from time import time import matplotlib.pyplot as plt import pandas as pd import math def BIC(y_real, y_model): n = len(y_real) k...
30.566372
95
0.631152
from statsmodels.tsa.arima.model import ARIMA import numpy as np from statsmodels.tools.eval_measures import rmse import pmdarima as pm from fbprophet import Prophet from time import time import matplotlib.pyplot as plt import pandas as pd import math def BIC(y_real, y_model): n = len(y_real) k = 2 resid ...
true
true
1c2d74c185631f60c1aead669312563eb156e198
1,883
py
Python
package/spack-probconsrna/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-probconsrna/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-probconsrna/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
41.844444
78
0.669145
true
true
1c2d751d07cda34dd2dbbc3db31438df60aa5cd1
6,209
py
Python
tests/many_to_one_null/tests.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-10-21T02:20:06.000Z
2020-10-21T02:20:06.000Z
tests/many_to_one_null/tests.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-07-02T21:10:44.000Z
2020-07-02T21:11:21.000Z
tests/many_to_one_null/tests.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-08-11T18:46:32.000Z
2020-08-11T18:46:32.000Z
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Car, Driver, Reporter class ManyToOneNullTests(TestCase): def setUp(self): # Create a Reporter. self.r = Reporter(name='John Smith') self.r.save() # Create an Article. se...
44.669065
109
0.645515
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Car, Driver, Reporter class ManyToOneNullTests(TestCase): def setUp(self): self.r = Reporter(name='John Smith') self.r.save() self.a = Article(headline="First", reporte...
true
true
1c2d775a3f9fcb6acb760af0a42a51e9c6b4dd17
5,227
py
Python
retweetcascade/rt_cascade_friendships.py
guglielmocola/RetweetCascade
f96319d0107473715104acceb2ff0925d35dd9e3
[ "MIT" ]
null
null
null
retweetcascade/rt_cascade_friendships.py
guglielmocola/RetweetCascade
f96319d0107473715104acceb2ff0925d35dd9e3
[ "MIT" ]
null
null
null
retweetcascade/rt_cascade_friendships.py
guglielmocola/RetweetCascade
f96319d0107473715104acceb2ff0925d35dd9e3
[ "MIT" ]
null
null
null
import pandas as pd from retweetcascade.utility_functions import __convert_to_pandas_list_tw, __explode_dict def rt_cascade_friendships(retweets, followers, friends, **kwargs): """Estimate the retweet cascade based on friendship among retweeters. A retweeter X is linked to the root R (original tweet's author)...
46.256637
111
0.712646
import pandas as pd from retweetcascade.utility_functions import __convert_to_pandas_list_tw, __explode_dict def rt_cascade_friendships(retweets, followers, friends, **kwargs): verbose = False if 'verbose' in kwargs: verbose = kwargs['verbose'] root_id = retweets[0]['retweeted_status']...
true
true
1c2d776b3b17a239f417bf3ed5c557c97f983b74
459
py
Python
src/playerMemory.py
koleberd/goaldependency
b4572758c405c90b33408497429531db82f5d22b
[ "FTL", "CNRI-Python", "CECILL-B", "AAL" ]
1
2018-01-10T21:41:27.000Z
2018-01-10T21:41:27.000Z
src/playerMemory.py
koleberd/goaldependency
b4572758c405c90b33408497429531db82f5d22b
[ "FTL", "CNRI-Python", "CECILL-B", "AAL" ]
null
null
null
src/playerMemory.py
koleberd/goaldependency
b4572758c405c90b33408497429531db82f5d22b
[ "FTL", "CNRI-Python", "CECILL-B", "AAL" ]
null
null
null
### #contains structures used to track the user's path, world snapshots, and things used for rollbacks as well as extra metrics. ### class PlayerMemory: def __init__(self,target=None): self.target = target self.metrics = {'distance traveled':0,'path':[]} self.prev_at = None self.cu...
30.6
124
0.668845
## class PlayerMemory: def __init__(self,target=None): self.target = target self.metrics = {'distance traveled':0,'path':[]} self.prev_at = None self.curr_at = None self.prev_at_parent = None self.prev_at_parent_parent = None self.prev_at_parent_parent_paren...
true
true
1c2d78c536fcf3aa392b79dcf9e8d2ce5bdd8790
2,552
py
Python
ps3api/memutils.py
iMoD1998/PS3API
ba64e6f5c1ed56746309d50c66c906c15045a254
[ "MIT" ]
8
2021-12-30T15:20:36.000Z
2022-03-27T12:22:23.000Z
ps3api/memutils.py
iMoD1998/PS3API
ba64e6f5c1ed56746309d50c66c906c15045a254
[ "MIT" ]
null
null
null
ps3api/memutils.py
iMoD1998/PS3API
ba64e6f5c1ed56746309d50c66c906c15045a254
[ "MIT" ]
null
null
null
import struct ''' Byte Conversions ''' PackInt8BE = struct.Struct('>B').pack PackInt16BE = struct.Struct('>H').pack PackInt32BE = struct.Struct('>L').pack PackInt64BE = struct.Struct('>Q').pack PackFloatBE = struct.Struct('>f').pack PackDoubleBE = struct.Struct('>d').pack UnpackInt8BE = struct.Struct('>B').un...
34.486486
126
0.744122
import struct PackInt8BE = struct.Struct('>B').pack PackInt16BE = struct.Struct('>H').pack PackInt32BE = struct.Struct('>L').pack PackInt64BE = struct.Struct('>Q').pack PackFloatBE = struct.Struct('>f').pack PackDoubleBE = struct.Struct('>d').pack UnpackInt8BE = struct.Struct('>B').unpack UnpackInt16BE = str...
true
true
1c2d7924a444c24c2db6abc56e45ac2e5724a4cd
11,136
py
Python
examples/legacy/seq2seq/seq2seq_trainer.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
1
2019-10-01T17:42:02.000Z
2019-10-01T17:42:02.000Z
examples/legacy/seq2seq/seq2seq_trainer.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
1
2022-03-23T19:49:13.000Z
2022-03-23T19:49:13.000Z
examples/legacy/seq2seq/seq2seq_trainer.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The HuggingFace Team. 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 applicabl...
42.996139
154
0.646911
from typing import Any, Dict, List, Optional, Tuple, Union import torch from torch import nn from torch.utils.data import DistributedSampler, RandomSampler from transformers import PreTrainedModel, Trainer, logging from transformers.integrations import is_fairscale_available from transformers.models.fsm...
true
true
1c2d796a09140eeb79105576d8d176108f33b282
398
py
Python
app/server/migrations/0010_document_priority.py
gong-io/doccano
f649ad39cb7795152253034a4937b0acdd377ee5
[ "MIT" ]
7
2019-05-20T18:41:25.000Z
2021-06-12T14:20:21.000Z
app/server/migrations/0010_document_priority.py
gong-io/doccano
f649ad39cb7795152253034a4937b0acdd377ee5
[ "MIT" ]
2
2019-02-26T18:55:30.000Z
2019-02-28T19:56:38.000Z
app/server/migrations/0010_document_priority.py
gong-io/doccano
f649ad39cb7795152253034a4937b0acdd377ee5
[ "MIT" ]
5
2019-05-30T15:56:29.000Z
2020-08-25T06:58:02.000Z
# Generated by Django 2.1.5 on 2019-03-01 20:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0009_project_use_machine_model_sort'), ] operations = [ migrations.AddField( model_name='document', name='...
20.947368
58
0.610553
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0009_project_use_machine_model_sort'), ] operations = [ migrations.AddField( model_name='document', name='priority', field=models.IntegerFiel...
true
true
1c2d7b1ff5a18e98fb6b0f6e6fb196d5e2f0e367
7,777
py
Python
doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py
baender/gimli
eb9a2204669cf11209b9577472f61ac70217a191
[ "Apache-2.0" ]
224
2015-02-20T21:36:24.000Z
2022-03-30T07:27:43.000Z
doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py
baender/gimli
eb9a2204669cf11209b9577472f61ac70217a191
[ "Apache-2.0" ]
341
2015-05-21T14:39:51.000Z
2022-03-31T01:54:07.000Z
doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py
baender/gimli
eb9a2204669cf11209b9577472f61ac70217a191
[ "Apache-2.0" ]
107
2015-01-24T14:40:21.000Z
2022-02-25T12:12:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Raypaths in layered and gradient models ======================================= This example performs raytracing for a two-layer and a vertical gradient model and compares the resulting traveltimes to existing analytical solutions. An approximation of the raypath is fo...
36.341121
83
0.586087
from math import asin, tan import matplotlib.pyplot as plt import numpy as np import pygimli as pg import pygimli.meshtools as mt from pygimli.viewer.mpl import drawMesh from pygimli.physics import TravelTimeManager
true
true
1c2d7c15637ab69c0e6f2dd5b70dcc76319886ba
1,303
py
Python
osf_tests/test_reviewable.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
osf_tests/test_reviewable.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
osf_tests/test_reviewable.py
Johnetordoff/osf.io
de10bf249c46cede04c78f7e6f7e352c69e6e6b5
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
import mock import pytest from osf.models import Preprint from osf.utils.workflows import DefaultStates from osf_tests.factories import PreprintFactory, AuthUserFactory @pytest.mark.django_db class TestReviewable: @mock.patch('website.identifiers.utils.request_identifiers') def test_state_changes(self, _): ...
38.323529
99
0.743668
import mock import pytest from osf.models import Preprint from osf.utils.workflows import DefaultStates from osf_tests.factories import PreprintFactory, AuthUserFactory @pytest.mark.django_db class TestReviewable: @mock.patch('website.identifiers.utils.request_identifiers') def test_state_changes(self, _): ...
true
true
1c2d7dbc7e352df0cd2a244450e5537e8a1ce9c5
7,229
py
Python
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_security.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
null
null
null
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_security.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
4
2022-02-27T18:59:37.000Z
2022-02-27T18:59:53.000Z
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_security.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
36.510101
94
0.669664
import abc import dataclasses import logging from typing import Any, Dict from google.rpc import code_pb2 import tenacity from framework.infrastructure import gcp logger = logging.getLogger(__name__) GcpResource = gcp.compute.ComputeV1.GcpResource @dataclasses.dataclass(frozen=True) class ServerTls...
true
true
1c2d7df8770200cff1fd47c54db9a07605cd4716
25,342
py
Python
libs/cherrypy/_cpdispatch.py
scambra/HTPC-Manager
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
[ "MIT" ]
674
2015-11-06T04:22:47.000Z
2022-02-26T17:31:43.000Z
libs/cherrypy/_cpdispatch.py
scambra/HTPC-Manager
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
[ "MIT" ]
713
2015-11-06T10:48:58.000Z
2018-11-27T16:32:18.000Z
libs/cherrypy/_cpdispatch.py
scambra/HTPC-Manager
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
[ "MIT" ]
115
2015-01-08T14:41:00.000Z
2022-02-13T12:31:17.000Z
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. The de...
36.887918
82
0.603899
import string import sys import types try: classtype = (type, types.ClassType) except AttributeError: classtype = type import cherrypy from cherrypy._cpcompat import set class PageHandler(object): def __init__(self, callable, *args, **kwargs): self.callable = callable self.args = args ...
true
true
1c2d7f1488771765549ad48122870b4d39690ad8
8,999
py
Python
talos/tools/project.py
royl88/talos
7a803f3e9a3dcf1d16ed6e9cd798a7a401de8cb8
[ "Apache-2.0" ]
1
2021-05-08T09:00:35.000Z
2021-05-08T09:00:35.000Z
talos/tools/project.py
royl88/talos
7a803f3e9a3dcf1d16ed6e9cd798a7a401de8cb8
[ "Apache-2.0" ]
null
null
null
talos/tools/project.py
royl88/talos
7a803f3e9a3dcf1d16ed6e9cd798a7a401de8cb8
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import os import os.path import platform import re import shutil import sys from mako.template import Template import six if six.PY2: reload(sys) if platform.system() == 'Linux': sys.setdefaultencoding('UTF-8') else: sys.setdefaultencoding('GBK') else: raw_input = inpu...
37.495833
111
0.670741
import os import os.path import platform import re import shutil import sys from mako.template import Template import six if six.PY2: reload(sys) if platform.system() == 'Linux': sys.setdefaultencoding('UTF-8') else: sys.setdefaultencoding('GBK') else: raw_input = input def mkdir(...
true
true
1c2d7fc265e46bbef8d4b3b094cfce762bc3d29a
872
py
Python
setup.py
Evgeneus/solo-learn
36782b829736d0216511f8d066631610b52e8663
[ "MIT" ]
null
null
null
setup.py
Evgeneus/solo-learn
36782b829736d0216511f8d066631610b52e8663
[ "MIT" ]
null
null
null
setup.py
Evgeneus/solo-learn
36782b829736d0216511f8d066631610b52e8663
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = [p.strip() for p in f.readlines()] KW = ["artificial intelligence", "deep learning", "unsupervised learning", "contrastive learning"] setup( name="solo", packages=find_packages(exclude=["bash_files"]), vers...
32.296296
98
0.676606
from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = [p.strip() for p in f.readlines()] KW = ["artificial intelligence", "deep learning", "unsupervised learning", "contrastive learning"] setup( name="solo", packages=find_packages(exclude=["bash_files"]), vers...
true
true
1c2d8143e4ac5173be0ac5a9ed07de0c0e298b80
1,700
py
Python
experiments/sampleE/complete_inference.py
neptunes5thmoon/simpleference
96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9
[ "MIT" ]
2
2019-10-13T12:10:00.000Z
2021-10-09T11:49:43.000Z
experiments/sampleE/complete_inference.py
neptunes5thmoon/simpleference
96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9
[ "MIT" ]
null
null
null
experiments/sampleE/complete_inference.py
neptunes5thmoon/simpleference
96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9
[ "MIT" ]
1
2018-05-08T14:10:59.000Z
2018-05-08T14:10:59.000Z
from __future__ import print_function import sys import os from concurrent.futures import ProcessPoolExecutor from subprocess import call from simpleference.inference.util import get_offset_lists sys.path.append('/groups/saalfeld/home/papec/Work/my_projects/z5/bld/python') import z5py def single_inference(gpu, itera...
32.075472
98
0.663529
from __future__ import print_function import sys import os from concurrent.futures import ProcessPoolExecutor from subprocess import call from simpleference.inference.util import get_offset_lists sys.path.append('/groups/saalfeld/home/papec/Work/my_projects/z5/bld/python') import z5py def single_inference(gpu, itera...
true
true
1c2d81675eee247acf8c0c5871d81e85a66bcfe2
31,548
py
Python
pyblp/configurations/integration.py
rebekahanne/pyblp
fe41991c5ec457bb5cfc1bf4d5788d18660a3de2
[ "MIT" ]
1
2021-01-25T01:25:45.000Z
2021-01-25T01:25:45.000Z
pyblp/configurations/integration.py
rebekahanne/pyblp
fe41991c5ec457bb5cfc1bf4d5788d18660a3de2
[ "MIT" ]
null
null
null
pyblp/configurations/integration.py
rebekahanne/pyblp
fe41991c5ec457bb5cfc1bf4d5788d18660a3de2
[ "MIT" ]
null
null
null
"""Construction of nodes and weights for integration.""" import functools import itertools from typing import Iterable, List, Optional, Tuple import numpy as np import scipy.special import scipy.stats from ..utilities.basics import Array, Options, StringRepresentation, format_options class Integration(StringRepres...
54.487047
119
0.66188
import functools import itertools from typing import Iterable, List, Optional, Tuple import numpy as np import scipy.special import scipy.stats from ..utilities.basics import Array, Options, StringRepresentation, format_options class Integration(StringRepresentation): _size: int _seed: Optional[int] _...
true
true
1c2d827baba29302aa7dd11c4233696b7db2ff29
1,549
py
Python
examples/pcrl_example.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
examples/pcrl_example.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
examples/pcrl_example.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
""" Fit to and evaluate PCRL [1] on the Office Amazon dataset. [1] Salah, Aghiles, and Hady W. Lauw. Probabilistic Collaborative Representation Learning\ for Personalized Item Recommendation. In UAI 2018. @author: Aghiles Salah <asalah@smu.edu.sg> """ from cornac.data import GraphModule from cornac.eval_methods i...
30.372549
95
0.657844
from cornac.data import GraphModule from cornac.eval_methods import RatioSplit from cornac.experiment import Experiment from cornac import metrics from cornac.models import PCRL from cornac.datasets import amazon_office as office ratings = office.load_rating() contexts = office.load_context() item_graph_module = Gr...
true
true
1c2d8398405119af5984541e83c831bd2125df6b
3,948
py
Python
ax/modelbridge/transforms/centered_unit_x.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
ax/modelbridge/transforms/centered_unit_x.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
ax/modelbridge/transforms/centered_unit_x.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 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 typing import TYPE_CHECKING, Dict, List, Optional, Tuple from ax.core.observation import ObservationData, Observa...
44.359551
88
0.645897
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from ax.core.observation import ObservationData, ObservationFeatures from ax.core.parameter import ParameterType, RangeParameter from ax.core.search_space import SearchSpace from ax.core.types import TConfig from ax.modelbridge.transforms.base import ...
true
true
1c2d8428b2a25dbbb25160c16277f654c9cffd62
10,641
py
Python
oidc_provider/lib/endpoints/token.py
senzil/django-oidc-provider
b2144ea31f3178d7346809cd45341831830d9e3e
[ "MIT" ]
null
null
null
oidc_provider/lib/endpoints/token.py
senzil/django-oidc-provider
b2144ea31f3178d7346809cd45341831830d9e3e
[ "MIT" ]
1
2021-06-15T11:54:09.000Z
2021-06-15T11:58:47.000Z
oidc_provider/lib/endpoints/token.py
senzil/senzil-django-oidc-provider
b2144ea31f3178d7346809cd45341831830d9e3e
[ "MIT" ]
null
null
null
import inspect from base64 import urlsafe_b64encode import hashlib import logging from django.contrib.auth import authenticate from django.http import JsonResponse from oidc_provider.lib.errors import ( TokenError, UserAuthError, ) from oidc_provider.lib.utils.oauth2 import extract_client_auth from oidc_provi...
34.215434
97
0.575228
import inspect from base64 import urlsafe_b64encode import hashlib import logging from django.contrib.auth import authenticate from django.http import JsonResponse from oidc_provider.lib.errors import ( TokenError, UserAuthError, ) from oidc_provider.lib.utils.oauth2 import extract_client_auth from oidc_provi...
true
true
1c2d84546cc93c9b22053ab15edd6dcb7459cd86
4,274
py
Python
dsgn/utils/torch_utils.py
joshliu11/DSGN
ac693e748ff3a7372b1292c2b7b3796854072030
[ "MIT" ]
166
2020-04-20T09:30:54.000Z
2021-05-16T07:42:15.000Z
dsgn/utils/torch_utils.py
joshliu11/DSGN
ac693e748ff3a7372b1292c2b7b3796854072030
[ "MIT" ]
15
2020-05-12T23:58:01.000Z
2021-05-05T12:03:51.000Z
dsgn/utils/torch_utils.py
joshliu11/DSGN
ac693e748ff3a7372b1292c2b7b3796854072030
[ "MIT" ]
35
2020-04-27T13:11:42.000Z
2021-05-16T07:45:02.000Z
import numpy as np import torch def project_image_to_rect(uv_depth, P): # uv_depth (3, N) c_u = P[0,2] c_v = P[1,2] f_u = P[0,0] f_v = P[1,1] b_x = P[0,3]/(-f_u) # relative b_y = P[1,3]/(-f_v) # use camera coordinate n = uv_depth.shape[1] x = ((uv_depth[0]-c_u)*uv_depth[2])/...
36.529915
98
0.606458
import numpy as np import torch def project_image_to_rect(uv_depth, P): c_u = P[0,2] c_v = P[1,2] f_u = P[0,0] f_v = P[1,1] b_x = P[0,3]/(-f_u) b_y = P[1,3]/(-f_v) n = uv_depth.shape[1] x = ((uv_depth[0]-c_u)*uv_depth[2])/f_u + b_x y = ((uv_depth[1]-c_v)*uv_depth[2])/f...
true
true
1c2d84c0446e87ba738145f6ff8987981568c650
73
py
Python
launcher.py
heffer-dev/proxy-client
df51852c7847771ee84637028280743acdd133a4
[ "MIT" ]
null
null
null
launcher.py
heffer-dev/proxy-client
df51852c7847771ee84637028280743acdd133a4
[ "MIT" ]
null
null
null
launcher.py
heffer-dev/proxy-client
df51852c7847771ee84637028280743acdd133a4
[ "MIT" ]
null
null
null
from lib.bot import bot VERSION = "0.1.1" bot.run(VERSION)
8.111111
25
0.575342
from lib.bot import bot VERSION = "0.1.1" bot.run(VERSION)
true
true
1c2d84c8511a592ba1dd911ec6bd397892a05851
521
py
Python
myGym/envs/__init__.py
gabinsane/myGym
a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a
[ "MIT" ]
1
2021-04-23T20:52:39.000Z
2021-04-23T20:52:39.000Z
myGym/envs/__init__.py
gabinsane/myGym
a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a
[ "MIT" ]
null
null
null
myGym/envs/__init__.py
gabinsane/myGym
a41c6b11a47eaf19d0c69e67aeb48cf7a999d45a
[ "MIT" ]
1
2021-01-22T16:46:48.000Z
2021-01-22T16:46:48.000Z
from gym.envs.registration import register register( id="CrowWorkspaceEnv-v0", entry_point="myGym.envs.crow_workspace_env:CrowWorkspaceEnv", max_episode_steps=8192, ) register( id="Gym-v0", entry_point="myGym.envs.gym_env:GymEnv", max_episode_steps=8192, ) register( id="HackEnv-v0", e...
19.296296
65
0.727447
from gym.envs.registration import register register( id="CrowWorkspaceEnv-v0", entry_point="myGym.envs.crow_workspace_env:CrowWorkspaceEnv", max_episode_steps=8192, ) register( id="Gym-v0", entry_point="myGym.envs.gym_env:GymEnv", max_episode_steps=8192, ) register( id="HackEnv-v0", e...
true
true
1c2d86f9ab621946794bc71ef7bd912fedb02281
1,606
py
Python
kolibri/content/utils/annotation.py
rtibbles/kolibri
7efdf0497738c793f281013f9913f8ecc1a55f10
[ "MIT" ]
null
null
null
kolibri/content/utils/annotation.py
rtibbles/kolibri
7efdf0497738c793f281013f9913f8ecc1a55f10
[ "MIT" ]
7
2016-06-23T16:01:02.000Z
2018-12-01T22:15:13.000Z
kolibri/content/utils/annotation.py
rtibbles/kolibri
7efdf0497738c793f281013f9913f8ecc1a55f10
[ "MIT" ]
1
2021-06-01T23:15:26.000Z
2021-06-01T23:15:26.000Z
from kolibri.utils.time import local_now from django.conf import settings from ..content_db_router import using_content_database from ..models import ChannelMetadata, ChannelMetadataCache from .channels import get_channel_ids_for_content_database_dir def update_channel_metadata_cache(): """ After a channel i...
45.885714
110
0.755293
from kolibri.utils.time import local_now from django.conf import settings from ..content_db_router import using_content_database from ..models import ChannelMetadata, ChannelMetadataCache from .channels import get_channel_ids_for_content_database_dir def update_channel_metadata_cache(): db_names = get_channel_id...
true
true
1c2d87445e38339928f3b6ae5fffb73af6f03885
7,049
py
Python
jack/readers/knowledge_base_population/models.py
mitchelljeff/hack1
990d873cbcd40d2978f44560016d18a76800908e
[ "MIT" ]
1
2018-10-23T12:07:31.000Z
2018-10-23T12:07:31.000Z
jack/readers/knowledge_base_population/models.py
mitchelljeff/hack1
990d873cbcd40d2978f44560016d18a76800908e
[ "MIT" ]
null
null
null
jack/readers/knowledge_base_population/models.py
mitchelljeff/hack1
990d873cbcd40d2978f44560016d18a76800908e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from jack.core import * from jack.core.data_structures import * from jack.readers.knowledge_base_population.shared import KBPPorts from jack.util.map import numpify class KnowledgeGraphEmbeddingInputModule(OnlineInputModule[List[List[int]]]): def __init__(self, shared_resources): s...
42.721212
107
0.643496
from jack.core import * from jack.core.data_structures import * from jack.readers.knowledge_base_population.shared import KBPPorts from jack.util.map import numpify class KnowledgeGraphEmbeddingInputModule(OnlineInputModule[List[List[int]]]): def __init__(self, shared_resources): self.shared_resources = ...
true
true
1c2d8797181f7057d1804ac8c677cac32af39435
13,762
py
Python
ckine/figures/figureC12.py
meyer-lab/type-I-ckine-model
fb2db21f1c476d79467e2bf22e1fdc2cdd6c47a3
[ "MIT" ]
null
null
null
ckine/figures/figureC12.py
meyer-lab/type-I-ckine-model
fb2db21f1c476d79467e2bf22e1fdc2cdd6c47a3
[ "MIT" ]
6
2021-02-01T23:47:16.000Z
2021-04-28T19:56:17.000Z
ckine/figures/figureC12.py
meyer-lab/gc-valent
bc0451610655633483a98ab450d20ef631479d2b
[ "MIT" ]
null
null
null
import os import matplotlib.lines as mlines import pandas as pds import numpy as np from .figureCommon import subplotLabel, getSetup from ..flow import importF from ..PCA import sampleT from ..flow import gating, count_data from ..FCimports import compMatrix, applyMatrix path_here = os.path.dirname(os.path.dirname(__...
50.782288
197
0.516204
import os import matplotlib.lines as mlines import pandas as pds import numpy as np from .figureCommon import subplotLabel, getSetup from ..flow import importF from ..PCA import sampleT from ..flow import gating, count_data from ..FCimports import compMatrix, applyMatrix path_here = os.path.dirname(os.path.dirname(__...
true
true
1c2d8aaadbe5c799d88a5d38cc7f826a82cd8a94
526
py
Python
app/convertfile/uploading/migrations/0002_auto_20200108_1333.py
web-user/django-convert-video-file-docker-nginx
40bd6a67c2d21d91d408d6112fa1756635300e60
[ "MIT" ]
null
null
null
app/convertfile/uploading/migrations/0002_auto_20200108_1333.py
web-user/django-convert-video-file-docker-nginx
40bd6a67c2d21d91d408d6112fa1756635300e60
[ "MIT" ]
3
2021-04-08T21:59:25.000Z
2021-06-09T19:19:25.000Z
app/convertfile/uploading/migrations/0002_auto_20200108_1333.py
web-user/django-convert-video-file-docker-nginx
40bd6a67c2d21d91d408d6112fa1756635300e60
[ "MIT" ]
null
null
null
# Generated by Django 2.2.9 on 2020-01-08 13:33 import convertfile.utils from django.db import migrations, models import uploading.models class Migration(migrations.Migration): dependencies = [ ('uploading', '0001_initial'), ] operations = [ migrations.AlterField( model_name...
25.047619
149
0.6673
import convertfile.utils from django.db import migrations, models import uploading.models class Migration(migrations.Migration): dependencies = [ ('uploading', '0001_initial'), ] operations = [ migrations.AlterField( model_name='mediafile', name='file', ...
true
true
1c2d8bf92c003205fd371162a11dfe4408f8d590
19,624
py
Python
tests/algorithms/profile_model/ellipsoid/test_parameterisation.py
dials-src/dials
25055c1f6164dc33e672e7c5c6a9c5a35e870660
[ "BSD-3-Clause" ]
1
2021-12-10T17:28:16.000Z
2021-12-10T17:28:16.000Z
tests/algorithms/profile_model/ellipsoid/test_parameterisation.py
dials-src/dials
25055c1f6164dc33e672e7c5c6a9c5a35e870660
[ "BSD-3-Clause" ]
null
null
null
tests/algorithms/profile_model/ellipsoid/test_parameterisation.py
dials-src/dials
25055c1f6164dc33e672e7c5c6a9c5a35e870660
[ "BSD-3-Clause" ]
1
2021-12-07T12:39:04.000Z
2021-12-07T12:39:04.000Z
from __future__ import annotations from collections import namedtuple from copy import copy from random import randint, uniform import numpy as np import pytest from scitbx import matrix from dials.algorithms.profile_model.ellipsoid.parameterisation import ( Angular2MosaicityParameterisation, Angular4Mosaic...
32.490066
88
0.623522
from __future__ import annotations from collections import namedtuple from copy import copy from random import randint, uniform import numpy as np import pytest from scitbx import matrix from dials.algorithms.profile_model.ellipsoid.parameterisation import ( Angular2MosaicityParameterisation, Angular4Mosaic...
true
true
1c2d8c2c711bf8ea9496e06fa1fe208338b90f0a
15,600
py
Python
pipelines.py
ufal/augpt
fa8a57961ed1d8fe6099978c489c0b0f8956d64e
[ "MIT" ]
11
2021-02-05T15:37:59.000Z
2022-03-24T14:33:08.000Z
pipelines.py
ufal/augpt
fa8a57961ed1d8fe6099978c489c0b0f8956d64e
[ "MIT" ]
6
2021-03-14T10:55:09.000Z
2021-07-22T09:42:14.000Z
pipelines.py
ufal/augpt
fa8a57961ed1d8fe6099978c489c0b0f8956d64e
[ "MIT" ]
1
2021-02-28T22:22:33.000Z
2021-02-28T22:22:33.000Z
from typing import Union, List, Optional import logging import uuid from uuid import UUID import transformers from functools import partial from collections import OrderedDict from model import ModelPredictor from data import BeliefParser from utils import AutoDatabase, AutoLexicalizer logger = logging.getLogger() ...
44.827586
124
0.633462
from typing import Union, List, Optional import logging import uuid from uuid import UUID import transformers from functools import partial from collections import OrderedDict from model import ModelPredictor from data import BeliefParser from utils import AutoDatabase, AutoLexicalizer logger = logging.getLogger() ...
true
true
1c2d8cafbefd1b3e84db79cf567a91cb465e6fb1
40,871
py
Python
tensorflow/python/keras/layers/core.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
1
2019-07-15T08:40:24.000Z
2019-07-15T08:40:24.000Z
tensorflow/python/keras/layers/core.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
3
2020-10-14T00:35:40.000Z
2022-02-09T22:35:09.000Z
tensorflow/python/keras/layers/core.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
1
2020-01-19T16:33:55.000Z
2020-01-19T16:33:55.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...
36.524576
102
0.695921
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import sys import types as python_types import warnings import numpy as np from tensorflow.python.eager import context from tensorflow.python.framework import dtypes from tensorflow....
true
true
1c2d8d266dac0a3c8e36d4ce58d4dcef2d05bb2b
315
py
Python
mongomail/models/users.py
terrabitz/MongoMail
8c7321540fde534e29451c603d22dcad4d2b77c5
[ "MIT" ]
null
null
null
mongomail/models/users.py
terrabitz/MongoMail
8c7321540fde534e29451c603d22dcad4d2b77c5
[ "MIT" ]
7
2017-07-03T15:31:10.000Z
2017-07-03T19:07:18.000Z
mongomail/models/users.py
terrabitz/MongoMail
8c7321540fde534e29451c603d22dcad4d2b77c5
[ "MIT" ]
null
null
null
import random import string from mongoengine import Document from mongoengine.fields import StringField KEY_SIZE = 32 class ApiKey(Document): key = StringField(required=True, unique=True, default=''.join([random.choice(string.ascii_letters + string.digits) for _ in range(KEY_SIZE)]))
24.230769
118
0.726984
import random import string from mongoengine import Document from mongoengine.fields import StringField KEY_SIZE = 32 class ApiKey(Document): key = StringField(required=True, unique=True, default=''.join([random.choice(string.ascii_letters + string.digits) for _ in range(KEY_SIZE)]))
true
true
1c2d8d5796b88137cbd413287b8438e672ac6586
3,444
py
Python
tests/test_dipdup/test_dipdup.py
spruceid/dipdup-py
adc904196cfd66563938feec0f0afcc5f3df03e3
[ "MIT" ]
null
null
null
tests/test_dipdup/test_dipdup.py
spruceid/dipdup-py
adc904196cfd66563938feec0f0afcc5f3df03e3
[ "MIT" ]
null
null
null
tests/test_dipdup/test_dipdup.py
spruceid/dipdup-py
adc904196cfd66563938feec0f0afcc5f3df03e3
[ "MIT" ]
null
null
null
from contextlib import AsyncExitStack from datetime import datetime from os.path import dirname, join from unittest import IsolatedAsyncioTestCase from pytz import UTC from dipdup.config import DipDupConfig from dipdup.context import pending_indexes from dipdup.dipdup import IndexDispatcher from dipdup.enums import I...
34.787879
90
0.64547
from contextlib import AsyncExitStack from datetime import datetime from os.path import dirname, join from unittest import IsolatedAsyncioTestCase from pytz import UTC from dipdup.config import DipDupConfig from dipdup.context import pending_indexes from dipdup.dipdup import IndexDispatcher from dipdup.enums import I...
true
true
1c2d8d90a17121995310552a973682f2ec38ce4f
2,745
py
Python
tests/test_pyglotaran_alias.py
glotaran/pyglotaran-alias
e8e490a50e70551bf84bdfba0c4aa55c8ac8406b
[ "Apache-2.0" ]
2
2021-03-02T09:23:56.000Z
2021-11-09T11:40:43.000Z
tests/test_pyglotaran_alias.py
glotaran/pyglotaran-alias
e8e490a50e70551bf84bdfba0c4aa55c8ac8406b
[ "Apache-2.0" ]
11
2020-10-04T00:14:04.000Z
2021-06-18T20:45:44.000Z
tests/test_pyglotaran_alias.py
glotaran/pyglotaran-alias
e8e490a50e70551bf84bdfba0c4aa55c8ac8406b
[ "Apache-2.0" ]
2
2020-10-03T23:51:48.000Z
2020-10-18T16:26:36.000Z
import re import subprocess import sys import pytest from _pytest.monkeypatch import MonkeyPatch def test_exception_if_glotaran_is_missing(monkeypatch: MonkeyPatch): """Raise Exception if glotaran isn't installed.""" monkeypatch.setitem(sys.modules, "glotaran", None) with pytest.raises(ImportError, mat...
29.836957
97
0.695811
import re import subprocess import sys import pytest from _pytest.monkeypatch import MonkeyPatch def test_exception_if_glotaran_is_missing(monkeypatch: MonkeyPatch): monkeypatch.setitem(sys.modules, "glotaran", None) with pytest.raises(ImportError, match=r"you need to install pyglotaran"): import p...
true
true
1c2d8dc766507b416a2c61e4bba7204773b5038c
7,431
py
Python
main/hongmeng.py
Andimeo/EverydayWechat
7b36443528442bc90c1b0bb3b1c5f88a6cbf008b
[ "MIT" ]
23
2019-08-14T01:10:16.000Z
2019-08-16T10:17:19.000Z
main/hongmeng.py
Pengjie-Li/EverydayWechat
86648b9b9e8f9e51216bd6f4d630abdd3bf7c2f1
[ "MIT" ]
null
null
null
main/hongmeng.py
Pengjie-Li/EverydayWechat
86648b9b9e8f9e51216bd6f4d630abdd3bf7c2f1
[ "MIT" ]
null
null
null
# coding=utf-8 """ 每天定时给多个女友发给微信暖心话 核心代码。 """ import os import time import json from apscheduler.schedulers.blocking import BlockingScheduler import itchat import random from itchat.content import * from main.common import ( get_yaml ) from main.utils import ( get_bot_info, get_weather_info, get_dictum...
29.141176
106
0.610416
import os import time import json from apscheduler.schedulers.blocking import BlockingScheduler import itchat import random from itchat.content import * from main.common import ( get_yaml ) from main.utils import ( get_bot_info, get_weather_info, get_dictum_info, get_diff_time, get_xzw_info ) ...
true
true
1c2d8e4a5a4f9d4d1449c4145d4add75077b4a01
2,022
py
Python
setup.py
techalchemy/tablib
6b80db8fa806980d342bdf11bc1cd31973371cf3
[ "MIT" ]
null
null
null
setup.py
techalchemy/tablib
6b80db8fa806980d342bdf11bc1cd31973371cf3
[ "MIT" ]
null
null
null
setup.py
techalchemy/tablib
6b80db8fa806980d342bdf11bc1cd31973371cf3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system("python setup.py sdist upload") sys.exit() if sys.argv[-1] == 'speedups': try: __imp...
23.241379
78
0.577151
import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system("python setup.py sdist upload") sys.exit() if sys.argv[-1] == 'speedups': try: __import__('pip') except ImportError: ...
true
true
1c2d8ecc146adf9ed998328f8ab9413613b7009c
998
py
Python
eyey/config.py
dincamihai/eyey
146c75a1c8b4f3da6ced57b4fee43ba3315052e0
[ "Apache-2.0" ]
null
null
null
eyey/config.py
dincamihai/eyey
146c75a1c8b4f3da6ced57b4fee43ba3315052e0
[ "Apache-2.0" ]
null
null
null
eyey/config.py
dincamihai/eyey
146c75a1c8b4f3da6ced57b4fee43ba3315052e0
[ "Apache-2.0" ]
null
null
null
import imaplib from credentials import USER, PASSWORD, SERVER EVAL_INTERVAL = 60 SUBJECT_FEATURES = 10 BODY_FEATURES = 100 BUGZILLA_HEADERS = [ "X-Bugzilla-Reason", # QAcontact "X-Bugzilla-Type", # changed "X-Bugzilla-Watch-Reason", # None "X-Bugzilla-Classification", # SUSE Manager "X-Bugzill...
26.263158
68
0.663327
import imaplib from credentials import USER, PASSWORD, SERVER EVAL_INTERVAL = 60 SUBJECT_FEATURES = 10 BODY_FEATURES = 100 BUGZILLA_HEADERS = [ "X-Bugzilla-Reason", "X-Bugzilla-Type", "X-Bugzilla-Watch-Reason", "X-Bugzilla-Classification", "X-Bugzilla-Product", "X-Bugzilla-Component",...
true
true
1c2d8f41bb0f80e0baf9bb69b37515c206cf19d0
7,278
py
Python
detection/demo_retinanet.py
ravising-h/Grad-CAM.pytorch
e0a1ae3870ea189f9b4cd8782eb77bfb5293c31b
[ "Apache-2.0" ]
null
null
null
detection/demo_retinanet.py
ravising-h/Grad-CAM.pytorch
e0a1ae3870ea189f9b4cd8782eb77bfb5293c31b
[ "Apache-2.0" ]
null
null
null
detection/demo_retinanet.py
ravising-h/Grad-CAM.pytorch
e0a1ae3870ea189f9b4cd8782eb77bfb5293c31b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @File : demo_retinanet.py @Time : 2020/5/16 下午9:59 @Author : yizuotian @Description : """ import argparse import multiprocessing as mp import os from tqdm import tqdm import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import ImageGrid import cv2 import detectron2.da...
34.822967
220
0.657461
import argparse import multiprocessing as mp import os from tqdm import tqdm import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import ImageGrid import cv2 import detectron2.data.transforms as T import numpy as np import torch from detectron2.checkpoint import DetectionCheckpointer from detectron2.config i...
true
true
1c2d907b28e0ff50cdb573cfd9b6d1c8390a419d
12,853
py
Python
tasks/data_utils.py
lcylcy/GLM_copa
dbb28be27cd48905986ab5db6e29620eff05984c
[ "MIT" ]
null
null
null
tasks/data_utils.py
lcylcy/GLM_copa
dbb28be27cd48905986ab5db6e29620eff05984c
[ "MIT" ]
null
null
null
tasks/data_utils.py
lcylcy/GLM_copa
dbb28be27cd48905986ab5db6e29620eff05984c
[ "MIT" ]
null
null
null
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. 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 re...
37.363372
117
0.617755
import copy import json import pickle import re from typing import Dict, List, Optional import numpy as np import torch import torch.utils.data from torch.utils.data.dataloader import default_collate import mpu def clean_text(text): text = text.replace("\n", " ") text = re.sub(r'\s+', ' ', ...
true
true
1c2d90f87f40141af385751a4193713ac88ba775
3,529
py
Python
bindings/python/ensmallen/datasets/string/henriciellamarina.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/henriciellamarina.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/henriciellamarina.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Henriciella marina. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein ass...
32.675926
223
0.675829
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def HenriciellaMarina( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/string"...
true
true
1c2d91349c242b43ed1148546b45cf09e118f038
4,998
py
Python
src/exceptionite/Handler.py
MasoniteFramework/exceptions
ce15da5e9f763c563e9d687771fb0599b875b83f
[ "MIT" ]
6
2019-12-13T05:22:49.000Z
2020-01-02T20:50:24.000Z
src/exceptionite/Handler.py
MasoniteFramework/exceptions
ce15da5e9f763c563e9d687771fb0599b875b83f
[ "MIT" ]
7
2019-12-12T18:02:20.000Z
2020-01-04T19:49:49.000Z
src/exceptionite/Handler.py
MasoniteFramework/exceptions
ce15da5e9f763c563e9d687771fb0599b875b83f
[ "MIT" ]
3
2020-08-11T22:07:46.000Z
2022-02-21T05:22:59.000Z
import sys import traceback from dotty_dict import dotty from typing import Type, TYPE_CHECKING from typing_extensions import Protocol if TYPE_CHECKING: class Renderer(Protocol): handler: "Handler" def __init__(self, handler: "Handler") -> None: ... def render(self) -> str: ...
33.543624
98
0.605242
import sys import traceback from dotty_dict import dotty from typing import Type, TYPE_CHECKING from typing_extensions import Protocol if TYPE_CHECKING: class Renderer(Protocol): handler: "Handler" def __init__(self, handler: "Handler") -> None: ... def render(self) -> str: ...
true
true
1c2d9225dd44601ceefd958f0a2cc9bc2ed2ac90
3,114
py
Python
conductor/conductor/solver/request/generic_objective.py
onap/optf-has
dd06e2675aedd7ae6344f2f51e70bbd468f36ce5
[ "Apache-2.0" ]
4
2019-02-14T19:18:09.000Z
2019-10-21T17:17:59.000Z
conductor/conductor/solver/request/generic_objective.py
onap/optf-has
dd06e2675aedd7ae6344f2f51e70bbd468f36ce5
[ "Apache-2.0" ]
null
null
null
conductor/conductor/solver/request/generic_objective.py
onap/optf-has
dd06e2675aedd7ae6344f2f51e70bbd468f36ce5
[ "Apache-2.0" ]
4
2019-05-09T07:05:54.000Z
2020-11-20T05:56:47.000Z
# # ------------------------------------------------------------------------- # Copyright (C) 2020 Wipro Limited. # # 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....
39.417722
98
0.618818
from conductor.solver.request import functions from conductor.solver.utils.utils import OPERATOR_FUNCTIONS GOALS = {'minimize': 'min', 'maximize': 'max'} def get_method_class(function_name): module_name = getattr(functions, function_name) return getattr(module_name, dir(module_nam...
true
true
1c2d9283d382e048364a6ebcb1d9c183da7ec7f7
218
py
Python
examples/use_as_module_minimal.py
DougBarry/m365-endpoint-api-digester
d1ed1f4223a040cae021aef2e769929682e1aa34
[ "MIT" ]
null
null
null
examples/use_as_module_minimal.py
DougBarry/m365-endpoint-api-digester
d1ed1f4223a040cae021aef2e769929682e1aa34
[ "MIT" ]
1
2021-05-07T17:04:21.000Z
2021-05-07T17:04:21.000Z
examples/use_as_module_minimal.py
DougBarry/m365-endpoint-api-digester
d1ed1f4223a040cae021aef2e769929682e1aa34
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Part of m365-endpoint-api-digester # Use as module example minimal import pprint from m365digester.M365Digester import M365Digester app = M365Digester() app.main() pprint.pprint(app.rule_list)
24.222222
50
0.798165
import pprint from m365digester.M365Digester import M365Digester app = M365Digester() app.main() pprint.pprint(app.rule_list)
true
true
1c2d93f0de31e8fd4ad1ab51951960e6ac32247b
81
py
Python
src/twisted/test/reflect_helper_VE.py
giadram/twisted
4771b1340b822d20d0664bb7d8334e8fb7e52863
[ "MIT", "Unlicense" ]
4,612
2015-01-01T12:57:23.000Z
2022-03-30T01:08:23.000Z
src/twisted/test/reflect_helper_VE.py
giadram/twisted
4771b1340b822d20d0664bb7d8334e8fb7e52863
[ "MIT", "Unlicense" ]
1,243
2015-01-23T17:23:59.000Z
2022-03-28T13:46:17.000Z
src/twisted/test/reflect_helper_VE.py
giadram/twisted
4771b1340b822d20d0664bb7d8334e8fb7e52863
[ "MIT", "Unlicense" ]
1,236
2015-01-13T14:41:26.000Z
2022-03-17T07:12:36.000Z
# Helper for a test_reflect test raise ValueError("Stuff is broken and things")
20.25
46
0.777778
raise ValueError("Stuff is broken and things")
true
true
1c2d94414b183f0621b1473a1c8116496d480455
3,500
py
Python
.leetcode/11.container-with-most-water.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/11.container-with-most-water.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/11.container-with-most-water.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
# @lc app=leetcode id=11 lang=python3 # # [11] Container With Most Water # # https://leetcode.com/problems/container-with-most-water/description/ # # algorithms # Medium (52.91%) # Likes: 9053 # Dislikes: 697 # Total Accepted: 914.4K # Total Submissions: 1.7M # Testcase Example: '[1,8,6,2,5,4,8,3,7]' # # Given n...
21.604938
123
0.545429
from imports import * class Solution: def maxArea(self, height: List[int]) -> int: leftMax = 0 rightMax = len(height) - 1 waterMax = min(height[leftMax], height[rightMax]) * (rightMax ...
true
true
1c2d944ee87236b6114fda1638c31b1d60f9fe3b
297
py
Python
nivlink/__init__.py
szorowi1/NivLink
c5c03f36975a10445e586499fa516e2e38feae2b
[ "MIT" ]
6
2018-08-15T16:58:13.000Z
2021-12-06T04:38:40.000Z
nivlink/__init__.py
nivlab/NivLink
c5c03f36975a10445e586499fa516e2e38feae2b
[ "MIT" ]
13
2018-08-13T21:33:58.000Z
2019-07-04T03:51:12.000Z
nivlink/__init__.py
szorowi1/NivLink
c5c03f36975a10445e586499fa516e2e38feae2b
[ "MIT" ]
2
2018-08-17T19:12:59.000Z
2018-08-31T14:07:37.000Z
"""Niv Lab software for preprocessing eyelink eyetracking data.""" __version__ = '0.2.5' from .raw import (Raw) from .epochs import (Epochs) from .gaze import (align_to_aoi, compute_fixations) from .screen import (Screen) from . import projects from .viz import (plot_raw_blinks, plot_heatmaps)
27
66
0.767677
__version__ = '0.2.5' from .raw import (Raw) from .epochs import (Epochs) from .gaze import (align_to_aoi, compute_fixations) from .screen import (Screen) from . import projects from .viz import (plot_raw_blinks, plot_heatmaps)
true
true
1c2d9620e834b3766a8631177e2f4224cbb3cef4
540
py
Python
dataio/resources/test/zz_cleanup.py
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
1
2020-12-24T22:00:01.000Z
2020-12-24T22:00:01.000Z
dataio/resources/test/zz_cleanup.py
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
null
null
null
dataio/resources/test/zz_cleanup.py
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
3
2020-07-17T09:20:29.000Z
2021-03-30T16:44:18.000Z
#!/usr/bin/env python import os, sys from glob import glob for fname in (["alpha.i3", "alphabet.i3", "catted.i3.gz", "evens.i3", "filtered.i3", "ints.i3", "foo.i3", "noinfo.i3", "test.i3", "tmp2.i3", "tmp.i3", "withnulls.i3", "orphanarium.i3", "pass1.i3", "one_event.i3", "hasmutineer.i3.gz", "split.gcd.i...
36
77
0.581481
import os, sys from glob import glob for fname in (["alpha.i3", "alphabet.i3", "catted.i3.gz", "evens.i3", "filtered.i3", "ints.i3", "foo.i3", "noinfo.i3", "test.i3", "tmp2.i3", "tmp.i3", "withnulls.i3", "orphanarium.i3", "pass1.i3", "one_event.i3", "hasmutineer.i3.gz", "split.gcd.i3", "testmultiD.*.i3"...
true
true
1c2d9812282a94f2c8a881d4aa241ad48e343bf8
54
py
Python
codeplayer-compiler-microservice/test.py
saurass/codeplayer
f6d1309fa56f3ec3a699bf359de9ae58bba89462
[ "MIT" ]
14
2020-07-06T16:56:49.000Z
2020-09-16T17:25:19.000Z
codeplayer-compiler-microservice/test.py
saurass/codeplayer
f6d1309fa56f3ec3a699bf359de9ae58bba89462
[ "MIT" ]
null
null
null
codeplayer-compiler-microservice/test.py
saurass/codeplayer
f6d1309fa56f3ec3a699bf359de9ae58bba89462
[ "MIT" ]
2
2020-07-10T05:23:46.000Z
2020-07-26T21:20:30.000Z
from worker import Worker work = Worker() work.boot()
13.5
25
0.740741
from worker import Worker work = Worker() work.boot()
true
true
1c2d9813c30395a2d4f25e2b7bc28366ada8f869
866
py
Python
src/chat_engine/messages.py
asyncee/django-channels-chat
fe53f48067f98bcb2cc7ebf0d837e66d6b7b388a
[ "MIT" ]
70
2016-04-15T20:57:17.000Z
2020-12-21T19:51:32.000Z
src/chat_engine/messages.py
asyncee/django-channels-chat
fe53f48067f98bcb2cc7ebf0d837e66d6b7b388a
[ "MIT" ]
2
2017-08-03T10:49:30.000Z
2017-11-15T18:13:08.000Z
src/chat_engine/messages.py
asyncee/django-channels-chat
fe53f48067f98bcb2cc7ebf0d837e66d6b7b388a
[ "MIT" ]
19
2016-10-05T17:15:19.000Z
2020-09-25T13:07:59.000Z
import json class Message(dict): def __init__(self, text=None, username=None, **kwargs): defaults = {'type': 'message'} if text: defaults['text'] = text if username: defaults['user'] = username defaults.update(kwargs) self['text'] = json.dumps(defaul...
22.789474
59
0.591224
import json class Message(dict): def __init__(self, text=None, username=None, **kwargs): defaults = {'type': 'message'} if text: defaults['text'] = text if username: defaults['user'] = username defaults.update(kwargs) self['text'] = json.dumps(defaul...
true
true
1c2d98bfe8a8f52475a1a0ad8a10d0e29bc6ba96
120
py
Python
src/csbuilder/errors/scheme.py
huykingsofm/csbuilder
c6ba6f0dd3fd2a0d03c7492de20a7107cb1b9191
[ "MIT" ]
null
null
null
src/csbuilder/errors/scheme.py
huykingsofm/csbuilder
c6ba6f0dd3fd2a0d03c7492de20a7107cb1b9191
[ "MIT" ]
null
null
null
src/csbuilder/errors/scheme.py
huykingsofm/csbuilder
c6ba6f0dd3fd2a0d03c7492de20a7107cb1b9191
[ "MIT" ]
null
null
null
from csbuilder.errors import CSError class SchemeError(CSError): "The exception is raised by failures in scheme."
20
52
0.775
from csbuilder.errors import CSError class SchemeError(CSError):
true
true
1c2d993573b8814f52b948b6d6fd38ede1bf99c4
1,014
py
Python
tests/conftest.py
AABur/python-project-lvl2
5be0fe2ceb56afc7877ff12680fcb29f4b98ce8f
[ "MIT" ]
2
2020-10-03T18:41:00.000Z
2021-09-20T10:07:28.000Z
tests/conftest.py
AABur/python-project-lvl2
5be0fe2ceb56afc7877ff12680fcb29f4b98ce8f
[ "MIT" ]
15
2021-01-14T08:18:42.000Z
2021-06-25T15:49:09.000Z
tests/conftest.py
AABur/python-project-lvl2
5be0fe2ceb56afc7877ff12680fcb29f4b98ce8f
[ "MIT" ]
7
2020-11-22T11:21:24.000Z
2021-12-11T15:38:20.000Z
# -*- coding:utf-8 -*- import pytest @pytest.fixture() def simple_before_path(): return 'tests/fixtures/simple/before.yaml' @pytest.fixture() def simple_after_path(): return 'tests/fixtures/simple/after.yaml' @pytest.fixture() def complex_before_path(): return 'tests/fixtures/complex/before.json' @...
18.777778
54
0.747535
import pytest @pytest.fixture() def simple_before_path(): return 'tests/fixtures/simple/before.yaml' @pytest.fixture() def simple_after_path(): return 'tests/fixtures/simple/after.yaml' @pytest.fixture() def complex_before_path(): return 'tests/fixtures/complex/before.json' @pytest.fixture() def c...
true
true
1c2d9958ab68ed176a35f00797cb9012c552081c
3,186
py
Python
predict_class_sklearn.py
sayan2207/Class-Predictor
191d98ca4d10d75fef24a4b6b78022c57679d4bc
[ "MIT" ]
2
2021-11-22T03:38:49.000Z
2021-11-22T03:38:54.000Z
predict_class_sklearn.py
sayan2207/Class-Predictor
191d98ca4d10d75fef24a4b6b78022c57679d4bc
[ "MIT" ]
null
null
null
predict_class_sklearn.py
sayan2207/Class-Predictor
191d98ca4d10d75fef24a4b6b78022c57679d4bc
[ "MIT" ]
null
null
null
import numpy as np import random import scipy.stats as ss import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap as lcm from sklearn.neighbors import KNeighborsClassifier as knc from time import strftime as stime import os def synthetic_plot(limits=(-5,5,-5,5), unit=0.1, no_of_points=20, no_of_cl...
30.634615
120
0.616133
import numpy as np import random import scipy.stats as ss import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap as lcm from sklearn.neighbors import KNeighborsClassifier as knc from time import strftime as stime import os def synthetic_plot(limits=(-5,5,-5,5), unit=0.1, no_of_points=20, no_of_cl...
true
true
1c2d9aac1cb93c456e03168d1fdf9752271e65c0
3,624
py
Python
schedule/calendars/models.py
Tomatosoup97/schedule
2e7d9b0f49c3d96aed58812cf29866f11ab0fdba
[ "0BSD" ]
null
null
null
schedule/calendars/models.py
Tomatosoup97/schedule
2e7d9b0f49c3d96aed58812cf29866f11ab0fdba
[ "0BSD" ]
null
null
null
schedule/calendars/models.py
Tomatosoup97/schedule
2e7d9b0f49c3d96aed58812cf29866f11ab0fdba
[ "0BSD" ]
null
null
null
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.db import models from slugify import slugify from users.models import ClientProfile, HostProfile from core.models import TimeStampedModel class Meeting(TimeStampedModel): ...
29.950413
79
0.628035
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.db import models from slugify import slugify from users.models import ClientProfile, HostProfile from core.models import TimeStampedModel class Meeting(TimeStampedModel): ...
true
true
1c2d9ab8b133938e8e0dd83bf95decfa58103b9c
1,473
py
Python
mockdown/__init__.py
anandology/mockdown
e37b27c841c8076aad7534fb5e5c480e63645fcf
[ "BSD-3-Clause" ]
4
2015-09-15T21:27:27.000Z
2021-08-17T09:46:14.000Z
mockdown/__init__.py
anandology/mockdown
e37b27c841c8076aad7534fb5e5c480e63645fcf
[ "BSD-3-Clause" ]
3
2015-09-21T06:38:58.000Z
2015-09-23T10:25:14.000Z
mockdown/__init__.py
anandology/mockdown
e37b27c841c8076aad7534fb5e5c480e63645fcf
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Mockdown ~~~~~~~~ Tool to simplify creating HTML mockups. """ from flask import Blueprint, render_template, abort, redirect, url_for import yaml import pathlib from .mockdown import Mockdown mockdown_app = Blueprint("mockdown", __name__, template_folder="t...
28.326923
100
0.648337
from flask import Blueprint, render_template, abort, redirect, url_for import yaml import pathlib from .mockdown import Mockdown mockdown_app = Blueprint("mockdown", __name__, template_folder="templates") _mockdown = Mockdown(root=".") def mockdown_url_for(endpoint, **kwargs): if endpoi...
true
true
1c2d9b171f83136cf0cedeeb9ad7303c8580d9b0
25,328
py
Python
dragg/reformat.py
apigott/dra
c2f24d9ef6d9d8cb78c5a058574cec8e132afd4f
[ "MIT" ]
2
2021-12-02T09:34:01.000Z
2021-12-26T07:51:31.000Z
dragg/reformat.py
wuyou33/dragg
c2f24d9ef6d9d8cb78c5a058574cec8e132afd4f
[ "MIT" ]
7
2020-05-09T15:50:10.000Z
2020-11-12T15:58:56.000Z
dragg/reformat.py
wuyou33/dragg
c2f24d9ef6d9d8cb78c5a058574cec8e132afd4f
[ "MIT" ]
3
2021-03-29T16:00:00.000Z
2021-12-02T09:33:57.000Z
import os import sys import json import toml from datetime import datetime, timedelta import numpy as np import pandas as pd import itertools as it import random import plotly.graph_objects as go import plotly.express as px from plotly.subplots import make_subplots import plotly.io as pio import plotly from prettytabl...
49.662745
297
0.562618
import os import sys import json import toml from datetime import datetime, timedelta import numpy as np import pandas as pd import itertools as it import random import plotly.graph_objects as go import plotly.express as px from plotly.subplots import make_subplots import plotly.io as pio import plotly from prettytabl...
true
true
1c2d9dc8a49a6ca4002890c9e0ada41524f390da
4,229
py
Python
tests/tests_coord.py
macph/easement-curve
e1657682db3bc5b8d59a1fb06816732b784d8314
[ "MIT" ]
1
2019-05-31T03:24:40.000Z
2019-05-31T03:24:40.000Z
tests/tests_coord.py
macph/easement-curve
e1657682db3bc5b8d59a1fb06816732b784d8314
[ "MIT" ]
null
null
null
tests/tests_coord.py
macph/easement-curve
e1657682db3bc5b8d59a1fb06816732b784d8314
[ "MIT" ]
null
null
null
# MIT License, copyright Ewan Macpherson, 2016; see LICENCE in root directory # Test script for the TrackCoord class import math import os import sys import unittest sys.path.insert(0, os.path.abspath('..')) import ec.coord class CoordGeneralTests(unittest.TestCase): def test_position(self): tc = ec.co...
36.456897
88
0.653819
import math import os import sys import unittest sys.path.insert(0, os.path.abspath('..')) import ec.coord class CoordGeneralTests(unittest.TestCase): def test_position(self): tc = ec.coord.TrackCoord(5, 5, 0, ec.coord.Q.NONE, curvature=0) self.assertEqual((tc.pos_x, tc.pos_z), (5, 5)) d...
true
true
1c2d9ea947e157fe845432f224f613ebae49404c
6,518
py
Python
tests/h/services/feature_test.py
julien-cheng/h
36c8ec044725720cf36f0986cdf025395aca8929
[ "BSD-2-Clause" ]
2
2019-08-04T07:22:11.000Z
2020-07-17T05:01:41.000Z
tests/h/services/feature_test.py
fuelpress/i.fuel.press
af7b25895d813af0fef656dcf483afe852a99d76
[ "BSD-2-Clause" ]
null
null
null
tests/h/services/feature_test.py
fuelpress/i.fuel.press
af7b25895d813af0fef656dcf483afe852a99d76
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import mock import pytest from h import models from h.services.feature import ( FeatureRequestProperty, FeatureService, UnknownFeatureError, feature_service_factory, ) class TestFeatureRequestProperty(object): def test_single_featu...
33.425641
87
0.683645
from __future__ import unicode_literals import mock import pytest from h import models from h.services.feature import ( FeatureRequestProperty, FeatureService, UnknownFeatureError, feature_service_factory, ) class TestFeatureRequestProperty(object): def test_single_feature_fetch(self, pyramid_...
true
true
1c2d9ef17af99fb74c0778340b827b7ed380f649
1,155
py
Python
Languages/Python/mcm.py
bluey-crypto/Hacktoberfest
c826d5faf1d1c860dbffe665e6a7cf1e35ba76ba
[ "MIT" ]
1
2020-10-03T03:17:03.000Z
2020-10-03T03:17:03.000Z
Languages/Python/mcm.py
bluey-crypto/Hacktoberfest
c826d5faf1d1c860dbffe665e6a7cf1e35ba76ba
[ "MIT" ]
1
2020-10-01T18:03:45.000Z
2020-10-01T18:03:45.000Z
Languages/Python/mcm.py
bluey-crypto/Hacktoberfest
c826d5faf1d1c860dbffe665e6a7cf1e35ba76ba
[ "MIT" ]
4
2020-10-07T14:58:50.000Z
2020-10-24T10:13:17.000Z
# Dynamic Programming Python implementation of Matrix # Chain Multiplication. See the Cormen book for details # of the following algorithm import sys # Matrix Ai has dimension p[i-1] x p[i] for i = 1..n def MatrixChainOrder(p, n): # For simplicity of the program, one extra row and one # extra column are allocated in...
27.5
60
0.630303
import sys def MatrixChainOrder(p, n): m = [[0 for x in range(n)] for x in range(n)] for i in range(1, n): m[i][i] = 0 for L in range(2, n): for i in range(1, n-L + 1): j = i + L-1 m[i][j] = sys.maxint for k in range(i, j): q = m[i][k] + m[k + 1][j] + p[i-1]*p[k]*p[j] ...
true
true
1c2d9ef1f3d3556468e9fbc47d7384fea9f3c2a0
1,313
py
Python
backend/battles/migrations/0004_battleteam.py
gabrielaleal/pokebattle
3259204eb34f27a5e79f2bbff57994f435b624c1
[ "MIT" ]
1
2020-03-02T18:15:29.000Z
2020-03-02T18:15:29.000Z
backend/battles/migrations/0004_battleteam.py
gabrielaleal/pokebattle
3259204eb34f27a5e79f2bbff57994f435b624c1
[ "MIT" ]
12
2020-03-18T21:50:29.000Z
2022-02-19T00:30:14.000Z
backend/battles/migrations/0004_battleteam.py
gabrielaleal/pokebattle
3259204eb34f27a5e79f2bbff57994f435b624c1
[ "MIT" ]
null
null
null
# Generated by Django 2.2.10 on 2020-02-28 14:20 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('pokemon', '0001_initial...
45.275862
143
0.66032
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('pokemon', '0001_initial'), ('battles', '0003_auto_20200228_1258...
true
true
1c2d9f9ad36e481653364b261c99e4779f4cc65c
2,570
py
Python
entropica_qaoa/tests/test_vqe.py
NunoEdgarGFlowHub/entropica_qaoa
bc9496320dbeadeac1302bda056e9d7b67607e30
[ "Apache-2.0" ]
null
null
null
entropica_qaoa/tests/test_vqe.py
NunoEdgarGFlowHub/entropica_qaoa
bc9496320dbeadeac1302bda056e9d7b67607e30
[ "Apache-2.0" ]
null
null
null
entropica_qaoa/tests/test_vqe.py
NunoEdgarGFlowHub/entropica_qaoa
bc9496320dbeadeac1302bda056e9d7b67607e30
[ "Apache-2.0" ]
null
null
null
""" Test that all the components of vqe play nicely together """ import numpy as np import pytest from scipy.optimize import minimize from pyquil.paulis import PauliSum, PauliTerm from pyquil.api import WavefunctionSimulator, local_qvm, get_qc from pyquil.quil import Program from pyquil.gates import RX, CNOT from en...
36.714286
82
0.585603
import numpy as np import pytest from scipy.optimize import minimize from pyquil.paulis import PauliSum, PauliTerm from pyquil.api import WavefunctionSimulator, local_qvm, get_qc from pyquil.quil import Program from pyquil.gates import RX, CNOT from entropica_qaoa.vqe.cost_function import (PrepareAndMeasureOnWFSim, ...
true
true
1c2da042495ddcdc035511151cc4ab40f8ed1660
2,894
py
Python
shooter_game.py
maria-2302/Proekt
eec5a094afb7ce6aceaf319fdbeda8112026b277
[ "CC0-1.0" ]
null
null
null
shooter_game.py
maria-2302/Proekt
eec5a094afb7ce6aceaf319fdbeda8112026b277
[ "CC0-1.0" ]
null
null
null
shooter_game.py
maria-2302/Proekt
eec5a094afb7ce6aceaf319fdbeda8112026b277
[ "CC0-1.0" ]
null
null
null
#Создай собственный Шутер! from pygame import * okno = display.set_mode((800,600)) bkgd = transform.scale(image.load('galaxy.jpg'),(800,600)) gm = True mixer.init() mixer.music.load('space.ogg') mixer.music.play() class sprit(sprite.Sprite): def __init__(self, imimage, x, y, sspeed): super().__init__() ...
27.561905
67
0.568072
from pygame import * okno = display.set_mode((800,600)) bkgd = transform.scale(image.load('galaxy.jpg'),(800,600)) gm = True mixer.init() mixer.music.load('space.ogg') mixer.music.play() class sprit(sprite.Sprite): def __init__(self, imimage, x, y, sspeed): super().__init__() self.image = transfor...
true
true
1c2da145767d95072bb35ea3a50f1a47c19e0f34
361
py
Python
src/game/game.py
Palaszczuk/clase-23
b5565585f5e3ee177162f4df081f89d2ad31f044
[ "MIT" ]
null
null
null
src/game/game.py
Palaszczuk/clase-23
b5565585f5e3ee177162f4df081f89d2ad31f044
[ "MIT" ]
null
null
null
src/game/game.py
Palaszczuk/clase-23
b5565585f5e3ee177162f4df081f89d2ad31f044
[ "MIT" ]
null
null
null
class Game: player1 = None player2 = None def __init__(self) -> None: """ Solo el constructor """ pass def __str__(self) -> str: return f"Esto es el objeto Game" def start(self) -> bool: pass def end(self) -> bool: pass ...
15.695652
40
0.476454
class Game: player1 = None player2 = None def __init__(self) -> None: pass def __str__(self) -> str: return f"Esto es el objeto Game" def start(self) -> bool: pass def end(self) -> bool: pass def update(self) -> bool: pass
true
true
1c2da1d891b041dc595bc2ace632ef69d4988ab8
233
py
Python
Python/lib/settings.py
MatteoEsposito/ProgettoInItinereI-IngegneriaDegliAlgoritmi-
75da3bb8b3a4189503d67b1b03cc50c14871f9e7
[ "MIT" ]
null
null
null
Python/lib/settings.py
MatteoEsposito/ProgettoInItinereI-IngegneriaDegliAlgoritmi-
75da3bb8b3a4189503d67b1b03cc50c14871f9e7
[ "MIT" ]
null
null
null
Python/lib/settings.py
MatteoEsposito/ProgettoInItinereI-IngegneriaDegliAlgoritmi-
75da3bb8b3a4189503d67b1b03cc50c14871f9e7
[ "MIT" ]
null
null
null
# coding=utf-8 # settings.py # Autore: Matteo Esposito # Versione di Python: 2.6.9 # Variabili Globali per impostare la verbosità dell'algoritmo e facilitarne il DEBUG ed/o il TESTING ed/o il PROFILING DEBUG = False RELEASE = False
25.888889
118
0.763948
DEBUG = False RELEASE = False
true
true
1c2da2abb77d52abeb662a7d3bf4cb9b5ce2ade6
192
py
Python
pywick/models/classification/resnext_features/__init__.py
achaiah/pywick
9d663faf0c1660a9b8359a6472c164f658dfc8cb
[ "MIT" ]
408
2019-05-16T16:12:41.000Z
2022-03-26T17:27:12.000Z
pywick/models/classification/resnext_features/__init__.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
13
2019-05-17T05:47:06.000Z
2021-06-21T19:02:30.000Z
pywick/models/classification/resnext_features/__init__.py
ashishpatel26/pywick
1afffd1c21c2b188836d3599e802146182757bb5
[ "MIT" ]
42
2019-05-16T19:57:12.000Z
2022-03-06T15:23:18.000Z
from .resnext101_32x4d_features import resnext101_32x4d_features from .resnext101_64x4d_features import resnext101_64x4d_features from .resnext50_32x4d_features import resnext50_32x4d_features
64
64
0.927083
from .resnext101_32x4d_features import resnext101_32x4d_features from .resnext101_64x4d_features import resnext101_64x4d_features from .resnext50_32x4d_features import resnext50_32x4d_features
true
true