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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f751ebb6373c9df986163fbe6ccc575c9d1be5ab
4,322
py
Python
scripts/python/exposure.py
oliviernocent/AEROLAB
4fd1077c5799b6c6a6b885e7baccf16925d3a36e
[ "MIT" ]
null
null
null
scripts/python/exposure.py
oliviernocent/AEROLAB
4fd1077c5799b6c6a6b885e7baccf16925d3a36e
[ "MIT" ]
null
null
null
scripts/python/exposure.py
oliviernocent/AEROLAB
4fd1077c5799b6c6a6b885e7baccf16925d3a36e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' This script computes the max mean mass concentration of several pollutants from a CSV file containing the following columns: - 'DateTime' : ISO 8601 date and time - 'Timestamp': seconds elapsed since 01/01/1970 - 'PM10 (µg/m3)' (optional) - 'PM2.5 (µg/...
33.503876
125
0.589079
__author__ = "Olivier Nocent and Quentin Martinet" __copyright__ = "Copyright 2021, Université de Reims Champagne Ardenne" __license__ = "MIT" __version__ = "0.0.1" __maintainer__ = "Olivier Nocent" __email__ = "olivier.nocent@univ-reims.fr" __status__ = "Experimental" from os import path import s...
true
true
f751ebeed7aa81709ab8605a0b0a5dd92814f4f5
4,002
py
Python
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Aerodynamics/Common/Fidelity_Zero/Lift/generate_wing_wake_grid.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Aerodynamics/Common/Fidelity_Zero/Lift/generate_wing_wake_grid.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Aerodynamics/Common/Fidelity_Zero/Lift/generate_wing_wake_grid.py
Vinicius-Tanigawa/Undergraduate-Research-Project
e92372f07882484b127d7affe305eeec2238b8a9
[ "MIT" ]
null
null
null
## @ingroup Methods-Aerodynamics-Common-Fidelity_Zero-Lift # generate_wing_wake_grid.py # # Created: April 2021, R. Erhard # Modified: # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- import numpy as np impo...
36.381818
98
0.57996
import numpy as np import pylab as plt from SUAVE.Core import Data def generate_wing_wake_grid(geometry, H, L, hf, x_plane, Nzo=20, Nzf=35, Nyo=20, plot_grid=False): span = geometry.wings.main_wing.spans.projected half_span = span/2 VD = geometry.vortex_distribution breaks = VD.cho...
true
true
f751eda8e8231eaaae0b2737447f638a670e2a66
27
py
Python
vc/service/helper/midas/__init__.py
very-meanly/vc
41f63e8a8b159f3a49430bbee6872162de060901
[ "MIT" ]
null
null
null
vc/service/helper/midas/__init__.py
very-meanly/vc
41f63e8a8b159f3a49430bbee6872162de060901
[ "MIT" ]
null
null
null
vc/service/helper/midas/__init__.py
very-meanly/vc
41f63e8a8b159f3a49430bbee6872162de060901
[ "MIT" ]
null
null
null
from .run import run_depth
13.5
26
0.814815
from .run import run_depth
true
true
f751edb3d34fd7c836f5d4166ba01bf8b7ff0aad
841
py
Python
tests/integration/test_row.py
opus49/py3odb
79a4abceacd124cd0c63441f65c40b41afb3216b
[ "MIT" ]
1
2019-12-12T04:42:06.000Z
2019-12-12T04:42:06.000Z
tests/integration/test_row.py
opus49/py3odb
79a4abceacd124cd0c63441f65c40b41afb3216b
[ "MIT" ]
6
2019-09-26T20:48:10.000Z
2020-11-20T02:52:07.000Z
tests/integration/test_row.py
opus49/py3odb
79a4abceacd124cd0c63441f65c40b41afb3216b
[ "MIT" ]
1
2019-10-09T20:19:13.000Z
2019-10-09T20:19:13.000Z
"""Integration test for Row object.""" from ..context import py3odb def test_row(sample_odb): """Test the iteration capability of the Row object on real data.""" with py3odb.Reader(sample_odb, "SELECT varno,lat,lon,obsvalue FROM <odb>") as odb_reader: for row in odb_reader: assert len(row)...
36.565217
93
0.49346
from ..context import py3odb def test_row(sample_odb): with py3odb.Reader(sample_odb, "SELECT varno,lat,lon,obsvalue FROM <odb>") as odb_reader: for row in odb_reader: assert len(row) == 4 assert repr(row) == \ "Row({'varno@body': 162, 'lat@hdr': -74.678, " \ ...
true
true
f751eee745f9cf040ff0cab3a77037f01cdbd921
88
py
Python
common_helper_encoder/__init__.py
mass-project/common_helper_encoder
ff3e6aeebe0d161b88f363a3afeb2d5b748a5ecc
[ "MIT" ]
null
null
null
common_helper_encoder/__init__.py
mass-project/common_helper_encoder
ff3e6aeebe0d161b88f363a3afeb2d5b748a5ecc
[ "MIT" ]
null
null
null
common_helper_encoder/__init__.py
mass-project/common_helper_encoder
ff3e6aeebe0d161b88f363a3afeb2d5b748a5ecc
[ "MIT" ]
null
null
null
from .json_encoder import ReportEncoder __all__ = [ 'ReportEncoder', ]
14.666667
39
0.625
from .json_encoder import ReportEncoder __all__ = [ 'ReportEncoder', ]
true
true
f751ef25899a8aab7d53a2a17eaf49ecd7be72c7
19,427
py
Python
API/gerrit_api.py
pitchdarkdata/InfluxDays2021_Demo
d5625566cefd983203983e158f3325cfb2c16029
[ "MIT" ]
null
null
null
API/gerrit_api.py
pitchdarkdata/InfluxDays2021_Demo
d5625566cefd983203983e158f3325cfb2c16029
[ "MIT" ]
null
null
null
API/gerrit_api.py
pitchdarkdata/InfluxDays2021_Demo
d5625566cefd983203983e158f3325cfb2c16029
[ "MIT" ]
null
null
null
""" This Module interacts with Gerrit and retrieves Data from Gerrit """ import os import json import logging import argparse import pandas as pd from datetime import datetime, timedelta from json.decoder import JSONDecodeError from urllib.parse import urlunsplit, urlencode from typing import Tuple, Union try: fro...
50.723238
127
0.646111
import os import json import logging import argparse import pandas as pd from datetime import datetime, timedelta from json.decoder import JSONDecodeError from urllib.parse import urlunsplit, urlencode from typing import Tuple, Union try: from requests import __version__, Session, adapters, exceptions, urllib3, st...
true
true
f751efd93b05321928c63c22bf25e81d1477b804
3,101
py
Python
daemon/process/settings/merge_settings.py
jignatius/Dobby
1de36b7e4442b3c10bccb881907fd07368dd463f
[ "Apache-2.0" ]
9
2020-07-17T15:45:29.000Z
2022-01-17T11:17:22.000Z
daemon/process/settings/merge_settings.py
jignatius/Dobby
1de36b7e4442b3c10bccb881907fd07368dd463f
[ "Apache-2.0" ]
63
2020-06-18T07:57:45.000Z
2022-03-25T12:52:50.000Z
daemon/process/settings/merge_settings.py
jignatius/Dobby
1de36b7e4442b3c10bccb881907fd07368dd463f
[ "Apache-2.0" ]
20
2020-07-20T09:51:15.000Z
2022-03-24T09:19:45.000Z
# If not stated otherwise in this file or this component's LICENSE file the # following copyright and licenses apply: # # Copyright 2021 Sky UK # # 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...
29.254717
83
0.653338
# following copyright and licenses apply: # # Copyright 2021 Sky UK # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
true
true
f751f0f45517ac5d7ea883dcc4542134d12eade9
12,564
py
Python
pypy/lib/pysqlite2/test/types.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
1
2019-05-27T00:58:46.000Z
2019-05-27T00:58:46.000Z
pypy/lib/pysqlite2/test/types.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
pypy/lib/pysqlite2/test/types.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- # pysqlite2/test/types.py: tests for type conversion and detection # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any ...
36.312139
134
0.622811
import zlib, datetime import unittest import pysqlite2.dbapi2 as sqlite class SqliteTypeTests(unittest.TestCase): def setUp(self): self.con = sqlite.connect(":memory:") self.cur = self.con.cursor() self.cur.execute("create table test(i integer, s varchar, f number, b blob)") def tearD...
false
true
f751f1381128f231a7e81314c30a877333ddd412
590
py
Python
returnpath/__init__.py
trondhindenes/docker-catchallapi
fec41c7a7648d12678c522bc3feb0879237bc278
[ "MIT" ]
null
null
null
returnpath/__init__.py
trondhindenes/docker-catchallapi
fec41c7a7648d12678c522bc3feb0879237bc278
[ "MIT" ]
null
null
null
returnpath/__init__.py
trondhindenes/docker-catchallapi
fec41c7a7648d12678c522bc3feb0879237bc278
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Api from flask_cors import CORS from returnpath.config_helper import ConfigHelper import sys import returnpath.log this_path = sys.path[0] app = Flask(__name__) app.url_map.strict_slashes = False CORS(app) config = ConfigHelper.get_config_path('config.yml') appconfi...
24.583333
101
0.801695
from flask import Flask from flask_restful import Api from flask_cors import CORS from returnpath.config_helper import ConfigHelper import sys import returnpath.log this_path = sys.path[0] app = Flask(__name__) app.url_map.strict_slashes = False CORS(app) config = ConfigHelper.get_config_path('config.yml') appconfi...
true
true
f751f3032aa60f735621120caa8aacc42125bdcd
19,240
py
Python
python/examples/snippets/__init__.py
carsonharmon/binaryninja-api
f7ad332ad69d370aa29cd54f4c7307da4d9173e2
[ "MIT" ]
1
2021-04-05T15:01:23.000Z
2021-04-05T15:01:23.000Z
python/examples/snippets/__init__.py
carsonharmon/binaryninja-api
f7ad332ad69d370aa29cd54f4c7307da4d9173e2
[ "MIT" ]
null
null
null
python/examples/snippets/__init__.py
carsonharmon/binaryninja-api
f7ad332ad69d370aa29cd54f4c7307da4d9173e2
[ "MIT" ]
1
2021-06-10T04:27:19.000Z
2021-06-10T04:27:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import re import codecs from PySide2.QtWidgets import (QLineEdit, QPushButton, QApplication, QTextEdit, QWidget, QVBoxLayout, QHBoxLayout, QDialog, QFileSystemModel, QTreeView, QLabel, QSplitter, QInputDialog, QMessageBox, QHeaderView, QMenu, ...
43.235955
149
0.659148
import sys import os import re import codecs from PySide2.QtWidgets import (QLineEdit, QPushButton, QApplication, QTextEdit, QWidget, QVBoxLayout, QHBoxLayout, QDialog, QFileSystemModel, QTreeView, QLabel, QSplitter, QInputDialog, QMessageBox, QHeaderView, QMenu, QAction, QKeySequenceEdit, QPlainTextEdit...
true
true
f751f381137e53e40be0138d866c942bd38b56c9
10,098
py
Python
cogdl/models/nn/lightgcn.py
cenyk1230/cogdl
fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce
[ "MIT" ]
1,072
2019-08-02T05:46:21.000Z
2022-03-31T07:51:53.000Z
cogdl/models/nn/lightgcn.py
cenyk1230/cogdl
fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce
[ "MIT" ]
96
2019-08-05T17:27:22.000Z
2022-03-03T08:36:57.000Z
cogdl/models/nn/lightgcn.py
cenyk1230/cogdl
fa1f74d5c3a15b5a52abfc7cd3f04dce4b7dbcce
[ "MIT" ]
299
2019-08-08T07:33:10.000Z
2022-03-31T09:30:07.000Z
""" from from https://github.com/huangtinglin/MixGCF Created on October 1, 2020 @author: Tinglin Huang (huangtinglin@outlook.com) """ import torch import torch.nn as nn from cogdl.models import BaseModel, register_model class GraphConv(nn.Module): """ Graph Convolutional Network """ def __init__(s...
36.989011
120
0.610616
import torch import torch.nn as nn from cogdl.models import BaseModel, register_model class GraphConv(nn.Module): def __init__(self, n_hops, n_users, interact_mat, edge_dropout_rate=0.5, mess_dropout_rate=0.1): super(GraphConv, self).__init__() self.interact_mat = interact_mat self.n_us...
true
true
f751f48919645a89b624b006fd2227c19611e31e
2,583
py
Python
setup.py
maoxingda/dbt-core
d5d16f01f4d18619ec4200728860dc64f5ce70c9
[ "Apache-2.0" ]
null
null
null
setup.py
maoxingda/dbt-core
d5d16f01f4d18619ec4200728860dc64f5ce70c9
[ "Apache-2.0" ]
null
null
null
setup.py
maoxingda/dbt-core
d5d16f01f4d18619ec4200728860dc64f5ce70c9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if 'sdist' not in sys.argv: print('') print('As of v1.0.0, `pip install dbt` is no longer supported.') print('Instead, please use one of the following.') print('') print('**To use dbt with your specific database, platform, or query engine:**') print('...
30.388235
90
0.652729
import os import sys if 'sdist' not in sys.argv: print('') print('As of v1.0.0, `pip install dbt` is no longer supported.') print('Instead, please use one of the following.') print('') print('**To use dbt with your specific database, platform, or query engine:**') print('') print(' pip ...
true
true
f751f549655353ec5d37344c1567c2eb88340d0c
28,933
py
Python
src/transformersX/models/promptbert/modeling_promptbert.py
stevezheng23/fewshot_nlp_pt
aaca4658aaa48a5a45dfd7d5ee7282d7f7c74be2
[ "Apache-2.0" ]
2
2021-08-06T05:43:55.000Z
2022-03-17T22:31:21.000Z
src/transformersX/models/promptbert/modeling_promptbert.py
stevezheng23/fewshot_nlp_pt
aaca4658aaa48a5a45dfd7d5ee7282d7f7c74be2
[ "Apache-2.0" ]
null
null
null
src/transformersX/models/promptbert/modeling_promptbert.py
stevezheng23/fewshot_nlp_pt
aaca4658aaa48a5a45dfd7d5ee7282d7f7c74be2
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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 cop...
43.904401
213
0.666263
import math import os import warnings import numpy as np from dataclasses import dataclass from typing import Optional, Tuple import torch import torch.utils.checkpoint import torch.nn.functional as F from packaging import version from torch import nn from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss...
true
true
f751f57c6187dfd051621ea0b6a369e4b1353c71
6,125
py
Python
seisflows3/tests/test_modules.py
bch0w/seisflows3
5158020d4efc06dae65dc472b59f1f958609348a
[ "BSD-2-Clause" ]
null
null
null
seisflows3/tests/test_modules.py
bch0w/seisflows3
5158020d4efc06dae65dc472b59f1f958609348a
[ "BSD-2-Clause" ]
null
null
null
seisflows3/tests/test_modules.py
bch0w/seisflows3
5158020d4efc06dae65dc472b59f1f958609348a
[ "BSD-2-Clause" ]
null
null
null
""" General test suite for all SeisFlows3 modules. Defines required parameters and functions for each of the modules, tests importing each of the modules and that each of the required parameters and functions exist. A sort of first-pass test which makes sure the package is set up correctly. """ import os import sys imp...
34.60452
79
0.62302
import os import sys import shutil import pytest from unittest.mock import patch from seisflows3 import config from seisflows3.seisflows import SeisFlows, return_modules required_structure = { "system": { "parameters": [], "functions": ["required", "check", "setup", "submit", "run", ...
true
true
f751f5a15419c8625194f9b8363933a44b28df0a
5,139
py
Python
examples/cifar/train_cifar_custom_loop.py
Evanc123/chainer
929af7189b1271683200aa9b0ba6da2dd3dee110
[ "MIT" ]
90
2017-02-23T04:04:47.000Z
2020-04-09T12:06:50.000Z
examples/cifar/train_cifar_custom_loop.py
Evanc123/chainer
929af7189b1271683200aa9b0ba6da2dd3dee110
[ "MIT" ]
7
2017-07-23T13:38:06.000Z
2018-07-10T07:09:03.000Z
examples/cifar/train_cifar_custom_loop.py
Evanc123/chainer
929af7189b1271683200aa9b0ba6da2dd3dee110
[ "MIT" ]
32
2017-02-28T07:40:38.000Z
2021-02-17T11:33:09.000Z
#!/usr/bin/env python """Convnet example using CIFAR10 or CIFAR100 dataset This code is a custom loop version of train_cifar.py. That is, we train models without using the Trainer class in chainer and instead write a training loop that manually computes the loss of minibatches and applies an optimizer to update the mo...
38.639098
77
0.611987
import argparse import chainer from chainer import configuration from chainer.dataset import convert import chainer.links as L from chainer import serializers from chainer.datasets import get_cifar10 from chainer.datasets import get_cifar100 import models.VGG def main(): parser = argparse.ArgumentParser(descri...
true
true
f751f5c7d99eca9abafb3e7869fca5353ee78fd6
705
py
Python
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
3
2021-12-15T04:58:18.000Z
2022-02-06T12:15:37.000Z
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
null
null
null
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/entitlements/migrations/0012_allow_blank_order_number_values.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
1
2019-01-02T14:38:50.000Z
2019-01-02T14:38:50.000Z
# Generated by Django 1.11.25 on 2019-10-23 15:47 from django.db import migrations, models class Migration(migrations.Migration): # lint-amnesty, pylint: disable=missing-class-docstring dependencies = [ ('entitlements', '0011_historicalcourseentitlement'), ] operations = [ migrations....
28.2
95
0.638298
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('entitlements', '0011_historicalcourseentitlement'), ] operations = [ migrations.AlterField( model_name='courseentitlement', name='order_number', field...
true
true
f751f68a9de539bb48e0468f2a1c6d29a2031bd3
558
py
Python
venv/Lib/site-packages/IPython/testing/tests/__init__.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
1,318
2019-07-11T10:34:39.000Z
2022-03-29T15:05:19.000Z
venv/Lib/site-packages/IPython/testing/tests/__init__.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
387
2019-09-05T16:33:09.000Z
2022-03-31T10:43:39.000Z
venv/Lib/site-packages/IPython/testing/tests/__init__.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
66
2019-11-11T15:33:12.000Z
2022-03-01T07:55:55.000Z
# encoding: utf-8 __docformat__ = "restructuredtext en" #------------------------------------------------------------------------------- # Copyright (C) 2005 Fernando Perez <fperez@colorado.edu> # Brian E Granger <ellisonbg@gmail.com> # Benjamin Ragan-Kelley <b...
50.727273
80
0.458781
__docformat__ = "restructuredtext en"
true
true
f751f76b13dd35a26a8a81d19ffc32586e1a61cc
43,349
py
Python
raven/struct/dataframe/_dataframeutils.py
raven-computing/pydf
70b14ad11aa629da6d1abb993a2a4c567db73ca9
[ "Apache-2.0" ]
null
null
null
raven/struct/dataframe/_dataframeutils.py
raven-computing/pydf
70b14ad11aa629da6d1abb993a2a4c567db73ca9
[ "Apache-2.0" ]
null
null
null
raven/struct/dataframe/_dataframeutils.py
raven-computing/pydf
70b14ad11aa629da6d1abb993a2a4c567db73ca9
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2021 Raven Computing # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
40.513084
96
0.557383
import numpy as np import raven.struct.dataframe.core as dataframe import raven.struct.dataframe.column as column import raven.struct.dataframe.bytecolumn as bytecolumn import raven.struct.dataframe.shortcolumn as shortcolumn import raven.struct.dataframe.intcolumn as intcolumn import raven.struct.dataframe.longcolum...
true
true
f751f81eecb985f816885975e85d891cbc717f81
636
py
Python
notif/db/models.py
alexpeits/notif
2055d0eb05f362ebd97f69d5bfe2514bb9fc204f
[ "BSD-3-Clause" ]
null
null
null
notif/db/models.py
alexpeits/notif
2055d0eb05f362ebd97f69d5bfe2514bb9fc204f
[ "BSD-3-Clause" ]
null
null
null
notif/db/models.py
alexpeits/notif
2055d0eb05f362ebd97f69d5bfe2514bb9fc204f
[ "BSD-3-Clause" ]
null
null
null
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, Text, Boolean from sqlalchemy_utils import ArrowType from notif.config import DB_URI Base = declarative_base() class Notification(Base): """Notification database table.""" __tablename__ = 'notifications' i...
26.5
62
0.740566
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, Text, Boolean from sqlalchemy_utils import ArrowType from notif.config import DB_URI Base = declarative_base() class Notification(Base): __tablename__ = 'notifications' if 'sqlite' in DB_URI: __table_a...
true
true
f751f84fcfbf38086a0434fac86394c6c6a79bec
2,418
py
Python
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/AddVodDomainRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/AddVodDomainRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/AddVodDomainRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.675676
74
0.757651
from aliyunsdkcore.request import RpcRequest from aliyunsdkvod.endpoint import endpoint_data class AddVodDomainRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'vod', '2017-03-21', 'AddVodDomain','vod') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(self, "endpoint_map...
true
true
f751f8d8c76ff5cae88fd47e6714fd0343461bc8
4,336
py
Python
multichat/multichat/settings.py
engrost/channels-examples
050a5f3aa5f504fc56aaa4f93195e29a066780e0
[ "BSD-3-Clause" ]
null
null
null
multichat/multichat/settings.py
engrost/channels-examples
050a5f3aa5f504fc56aaa4f93195e29a066780e0
[ "BSD-3-Clause" ]
null
null
null
multichat/multichat/settings.py
engrost/channels-examples
050a5f3aa5f504fc56aaa4f93195e29a066780e0
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for multichat project. Generated by 'django-admin startproject' using Django 1.10.dev20151126161447. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings...
26.439024
106
0.697648
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) redis_host = os.environ.get('REDIS_HOST', 'localhost') CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [(redis_host, 6379)], }, ...
true
true
f751f9143e6a1fe26658d5f32931ce92171c0d18
2,114
py
Python
tests/wallet/test_profitlisp.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
7
2022-03-15T01:33:35.000Z
2022-03-26T21:29:45.000Z
tests/wallet/test_profitlisp.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
3
2022-03-19T23:02:18.000Z
2022-03-19T23:02:19.000Z
tests/wallet/test_profitlisp.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
null
null
null
import pytest from profit.wallet.chialisp import ( apply, args, cons, eval, fail, first, is_zero, make_if, make_list, nth, quote, rest, sexp, ) class TestChialisp: def test_sexp(self): assert sexp() == "()" assert sexp(1) == "(1)" assert...
25.46988
70
0.454588
import pytest from profit.wallet.chialisp import ( apply, args, cons, eval, fail, first, is_zero, make_if, make_list, nth, quote, rest, sexp, ) class TestChialisp: def test_sexp(self): assert sexp() == "()" assert sexp(1) == "(1)" assert...
true
true
f751f922895a5360a2a94b00c23590d364107b9c
2,657
py
Python
brainrender_gui/apputils/add_from_file_control.py
brainglobe/bg-brainrender-gui
4048f789fbdc1a5d4c5c652a4f37222446c8aa2f
[ "BSD-3-Clause" ]
7
2020-07-09T10:27:38.000Z
2020-10-13T13:16:20.000Z
brainrender_gui/apputils/add_from_file_control.py
brainglobe/bg-brainrender-gui
4048f789fbdc1a5d4c5c652a4f37222446c8aa2f
[ "BSD-3-Clause" ]
12
2020-07-31T15:03:49.000Z
2020-12-11T08:00:20.000Z
brainrender_gui/apputils/add_from_file_control.py
brainglobe/bg-brainrender-gui
4048f789fbdc1a5d4c5c652a4f37222446c8aa2f
[ "BSD-3-Clause" ]
null
null
null
from qtpy.QtWidgets import QFileDialog from pathlib import Path from brainrender_gui.widgets.add_from_file import AddFromFileWindow from brainrender_gui.utils import ( get_color_from_string, get_alpha_from_string, ) class AddFromFile: def __init__(self): """ Collection of functions to...
29.197802
100
0.561536
from qtpy.QtWidgets import QFileDialog from pathlib import Path from brainrender_gui.widgets.add_from_file import AddFromFileWindow from brainrender_gui.utils import ( get_color_from_string, get_alpha_from_string, ) class AddFromFile: def __init__(self): return def __add_from_file(self, fun,...
true
true
f751fad68dd31d6a3cb9f3485137658c11822310
31,737
py
Python
analytics/tests/test_views.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
1
2020-03-10T20:09:11.000Z
2020-03-10T20:09:11.000Z
analytics/tests/test_views.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
3
2020-06-06T00:25:00.000Z
2021-05-08T14:30:56.000Z
analytics/tests/test_views.py
DD2480-group7-2020/zulip
9a1e18bcf383c38c35da168563a7345768c6d784
[ "Apache-2.0" ]
1
2019-12-23T05:51:08.000Z
2019-12-23T05:51:08.000Z
from datetime import datetime, timedelta from typing import List, Optional import mock from django.utils.timezone import utc from django.http import HttpResponse import ujson from analytics.lib.counts import COUNT_STATS, CountStat from analytics.lib.time_utils import time_range from analytics.models import FillState,...
51.271405
135
0.590636
from datetime import datetime, timedelta from typing import List, Optional import mock from django.utils.timezone import utc from django.http import HttpResponse import ujson from analytics.lib.counts import COUNT_STATS, CountStat from analytics.lib.time_utils import time_range from analytics.models import FillState,...
true
true
f751fb575b369286a0e83105c634838c4a6c908d
2,608
py
Python
Functions/sensing_utils.py
amitsou/cloud_services
22a2381227ecab8d1626e3dfa961821954188327
[ "MIT" ]
null
null
null
Functions/sensing_utils.py
amitsou/cloud_services
22a2381227ecab8d1626e3dfa961821954188327
[ "MIT" ]
null
null
null
Functions/sensing_utils.py
amitsou/cloud_services
22a2381227ecab8d1626e3dfa961821954188327
[ "MIT" ]
null
null
null
import os import cv2 import sys import json import time import codecs import argparse import logging import numpy as np import warnings try: with warnings.catch_warnings(): warnings.filterwarnings("ignore",category=FutureWarning) from keras.models import load_model from keras.preprocessing ...
27.452632
110
0.682515
import os import cv2 import sys import json import time import codecs import argparse import logging import numpy as np import warnings try: with warnings.catch_warnings(): warnings.filterwarnings("ignore",category=FutureWarning) from keras.models import load_model from keras.preprocessing ...
true
true
f751fc4f34536ad4076528902a1fefdc11b338ca
51,118
py
Python
src/sage/combinat/sf/jack.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/sf/jack.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/sf/jack.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
r""" Jack Symmetric Functions Jack's symmetric functions appear in [Ma1995]_ Chapter VI, section 10. Zonal polynomials are the subject of [Ma1995]_ Chapter VII. The parameter `\alpha` in that reference is the parameter `t` in this implementation in sage. REFERENCES: .. [Jack1970] \H. Jack, *A class of symmetric f...
36.228207
270
0.54202
from __future__ import absolute_import from sage.structure.unique_representation import UniqueRepresentation import sage.categories.all from sage.rings.all import Integer, QQ from sage.arith.all import gcd, lcm from sage.rings.fraction_field import is_FractionField from sage.misc.all import prod from sage.categories....
true
true
f751fd3211e431d41ec7d722617ca8d982062dd7
8,421
py
Python
src/sage/repl/rich_output/pretty_print.py
sloebrich/sage
b8f53f72e817e78722ad1b40d70aa9071426700b
[ "BSL-1.0" ]
1
2020-05-19T22:34:03.000Z
2020-05-19T22:34:03.000Z
src/sage/repl/rich_output/pretty_print.py
sloebrich/sage
b8f53f72e817e78722ad1b40d70aa9071426700b
[ "BSL-1.0" ]
null
null
null
src/sage/repl/rich_output/pretty_print.py
sloebrich/sage
b8f53f72e817e78722ad1b40d70aa9071426700b
[ "BSL-1.0" ]
3
2020-03-29T17:13:36.000Z
2021-05-03T18:11:28.000Z
# -*- encoding: utf-8 -*- r""" The ``pretty_print`` command. Works similar to the ``print`` function, except that it always tries to use a rich output for an object. Only if that is not available it is falling back on the plain text. EXAMPLES:: sage: pretty_print(1, 2, 3) <html><script type="math/tex">\newco...
32.513514
139
0.612041
import types import collections from sage.structure.sage_object import SageObject from sage.repl.rich_output import get_display_manager class SequencePrettyPrinter(SageObject): def __init__(self, *args, **kwds): self.args = args assert len(self.args) >= 2 self.kwds = kwds def is...
true
true
f751fef89025e3ed8f1f79bc706a14652149ca4d
3,407
py
Python
yt/frontends/exodus_ii/simulation_handling.py
mabruzzo/yt
7bf28a70077a52d75dc035c87b6a2ef7ac66b4c3
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/exodus_ii/simulation_handling.py
mabruzzo/yt
7bf28a70077a52d75dc035c87b6a2ef7ac66b4c3
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/exodus_ii/simulation_handling.py
mabruzzo/yt
7bf28a70077a52d75dc035c87b6a2ef7ac66b4c3
[ "BSD-3-Clause-Clear" ]
null
null
null
import glob from yt.data_objects.time_series import DatasetSeries from yt.funcs import only_on_root from yt.loaders import load from yt.utilities.exceptions import YTOutputNotIdentified from yt.utilities.logger import ytLogger as mylog from yt.utilities.parallel_tools.parallel_analysis_interface import parallel_object...
33.07767
84
0.638685
import glob from yt.data_objects.time_series import DatasetSeries from yt.funcs import only_on_root from yt.loaders import load from yt.utilities.exceptions import YTOutputNotIdentified from yt.utilities.logger import ytLogger as mylog from yt.utilities.parallel_tools.parallel_analysis_interface import parallel_object...
true
true
f751ff34cc24b4cf0da023652ae7bac6dafa7342
26,078
py
Python
OpenEdge/pyodbc/base.py
monasysinfo/pyodbcOpenEdge
b6ef2128261f18d64c538ccb3bfe413eb35f8397
[ "MIT" ]
9
2015-05-18T13:51:57.000Z
2020-05-08T13:25:16.000Z
OpenEdge/pyodbc/base.py
monasysinfo/pyodbcOpenEdge
b6ef2128261f18d64c538ccb3bfe413eb35f8397
[ "MIT" ]
null
null
null
OpenEdge/pyodbc/base.py
monasysinfo/pyodbcOpenEdge
b6ef2128261f18d64c538ccb3bfe413eb35f8397
[ "MIT" ]
4
2017-05-01T10:00:46.000Z
2019-09-02T07:56:41.000Z
# -*- coding: utf-8 -*- ''' Created on 1 Septembre 2013 @author: jyp OpenEdge backend for Django. South Apdaptation done 20131102 Extents handling: ----------------- When this backend is used on 4GL Tables, the fields with extents are seen like char fields where each extent value is separated from each other with...
41.858748
154
0.512002
''' Created on 1 Septembre 2013 @author: jyp OpenEdge backend for Django. South Apdaptation done 20131102 Extents handling: ----------------- When this backend is used on 4GL Tables, the fields with extents are seen like char fields where each extent value is separated from each other with the ";" character. If t...
false
true
f751ff6ed6929d42d682b2db380ef2235bf58c82
6,324
py
Python
celery/execute/__init__.py
winhamwr/celery
249a270301ddb9b025cf8d00400bb442df9cae62
[ "BSD-3-Clause" ]
1
2017-12-26T06:29:37.000Z
2017-12-26T06:29:37.000Z
celery/execute/__init__.py
winhamwr/celery
249a270301ddb9b025cf8d00400bb442df9cae62
[ "BSD-3-Clause" ]
null
null
null
celery/execute/__init__.py
winhamwr/celery
249a270301ddb9b025cf8d00400bb442df9cae62
[ "BSD-3-Clause" ]
null
null
null
from celery import conf from celery.utils import gen_unique_id, fun_takes_kwargs, mattrgetter from celery.result import AsyncResult, EagerResult from celery.execute.trace import TaskTrace from celery.registry import tasks from celery.messaging import with_connection from celery.messaging import TaskPublisher extract_e...
38.327273
78
0.653384
from celery import conf from celery.utils import gen_unique_id, fun_takes_kwargs, mattrgetter from celery.result import AsyncResult, EagerResult from celery.execute.trace import TaskTrace from celery.registry import tasks from celery.messaging import with_connection from celery.messaging import TaskPublisher extract_e...
true
true
f751ffc9b2684bad6f9c764046c2f3754e318a56
4,177
py
Python
timgiasu/users/models.py
Hieucaohd/timgiasu
ed3bfad7612e5ac91c3b84455e2fe1a76a4748f9
[ "MIT" ]
null
null
null
timgiasu/users/models.py
Hieucaohd/timgiasu
ed3bfad7612e5ac91c3b84455e2fe1a76a4748f9
[ "MIT" ]
null
null
null
timgiasu/users/models.py
Hieucaohd/timgiasu
ed3bfad7612e5ac91c3b84455e2fe1a76a4748f9
[ "MIT" ]
null
null
null
from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin, ) from django.db import models from django_countries.fields import CountryField from phonenumber_field.modelfields import PhoneNumberField from ..core.choices import AuthFromType, ProfessionType, SexType from ..co...
32.632813
84
0.665071
from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin, ) from django.db import models from django_countries.fields import CountryField from phonenumber_field.modelfields import PhoneNumberField from ..core.choices import AuthFromType, ProfessionType, SexType from ..co...
true
true
f751ffd0ad0e7210acc08c55dbb61c3b449cd9d7
39,361
py
Python
azure-mgmt-resource/azure/mgmt/resource/resources/operations/resources_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:16:34.000Z
2018-11-09T06:16:34.000Z
azure-mgmt-resource/azure/mgmt/resource/resources/operations/resources_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
null
null
null
azure-mgmt-resource/azure/mgmt/resource/resources/operations/resources_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:17:41.000Z
2018-11-09T06:17:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.195444
197
0.665888
from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller import uuid from .. import models class ResourcesOperations(object): def __init__(self, client, config, serializer, deserializer): self._client...
true
true
f75200d87af23bcd230dbfd6b0e7f9dec272814a
1,392
py
Python
extraPackages/matplotlib-3.0.3/examples/subplots_axes_and_figures/zoom_inset_axes.py
dolboBobo/python3_ios
877f8c2c5890f26292ddd14909bea62a04fe2889
[ "BSD-3-Clause" ]
130
2018-02-03T10:25:54.000Z
2022-03-25T22:27:22.000Z
extraPackages/matplotlib-3.0.2/examples/subplots_axes_and_figures/zoom_inset_axes.py
spacetime314/python3_ios
e149f1bc2e50046c8810f83dae7739a8dea939ee
[ "BSD-3-Clause" ]
9
2018-12-14T07:31:42.000Z
2020-12-09T20:29:28.000Z
extraPackages/matplotlib-3.0.2/examples/subplots_axes_and_figures/zoom_inset_axes.py
spacetime314/python3_ios
e149f1bc2e50046c8810f83dae7739a8dea939ee
[ "BSD-3-Clause" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
""" ====================== Zoom region inset axes ====================== Example of an inset axes and a rectangle showing where the zoom is located. """ import matplotlib.pyplot as plt import numpy as np def get_demo_image(): from matplotlib.cbook import get_sample_data import numpy as np f = get_sampl...
22.819672
77
0.618534
import matplotlib.pyplot as plt import numpy as np def get_demo_image(): from matplotlib.cbook import get_sample_data import numpy as np f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False) z = np.load(f) return z, (-3, 4, -4, 3) fig, ax = plt.subplots(figsize=[5, 4]) Z, e...
true
true
f7520198dd272878b3450c7970a71cbadc22d399
2,236
py
Python
dojo/tools/spotbugs/parser.py
joebasirico/django-DefectDojo
da4ab0033329cee4108630e2b7e54a2d073932b6
[ "BSD-3-Clause" ]
2
2021-09-19T23:19:12.000Z
2022-03-26T10:20:49.000Z
dojo/tools/spotbugs/parser.py
joebasirico/django-DefectDojo
da4ab0033329cee4108630e2b7e54a2d073932b6
[ "BSD-3-Clause" ]
167
2021-03-15T13:49:54.000Z
2022-03-31T09:10:30.000Z
dojo/tools/spotbugs/parser.py
Security-Phoenix-demo/django-DefectDojo
645778824ed1db71405343f2d2a6e05a4156c899
[ "BSD-3-Clause" ]
4
2016-09-19T17:33:39.000Z
2018-12-10T07:55:45.000Z
__author__ = 'bakalor' __maintainer__ = "Igor Bakalo" __email__ = "bigorigor.ua@gmail.com" __status__ = "Development" import re from defusedxml import ElementTree as ET from dojo.models import Finding class SpotbugsParser(object): def get_scan_types(self): return ["SpotBugs Scan"] def get_label_f...
29.421053
136
0.528623
__author__ = 'bakalor' __maintainer__ = "Igor Bakalo" __email__ = "bigorigor.ua@gmail.com" __status__ = "Development" import re from defusedxml import ElementTree as ET from dojo.models import Finding class SpotbugsParser(object): def get_scan_types(self): return ["SpotBugs Scan"] def get_label_f...
true
true
f752023756199ff3be598884c7b26e27b6bf8b0f
204
py
Python
app/models/__init__.py
Hansybx/guohe3
53990b92f5d45bac1c2b903fd8df9cb97283697e
[ "Apache-2.0" ]
1
2019-08-18T13:16:14.000Z
2019-08-18T13:16:14.000Z
app/models/__init__.py
Hansybx/guohe3
53990b92f5d45bac1c2b903fd8df9cb97283697e
[ "Apache-2.0" ]
1
2019-08-19T02:05:32.000Z
2022-02-11T07:27:37.000Z
app/models/__init__.py
Hansybx/guohe3
53990b92f5d45bac1c2b903fd8df9cb97283697e
[ "Apache-2.0" ]
1
2019-08-18T09:08:25.000Z
2019-08-18T09:08:25.000Z
""" -*- coding: utf-8 -*- Time : 2019/7/12 14:25 Author : Hansybx """ from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() # from app.models import grade_point, student_info, teacher_class
14.571429
65
0.691176
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
true
true
f75202907cecad0d065ae0b2d43e62737b5c4cfa
33,407
py
Python
stcrestclient/tccsh.py
osgirl/py-stcrestclient
e36c2c36b7fa7ed45f0c1cf94c12742e8e19910a
[ "MIT" ]
null
null
null
stcrestclient/tccsh.py
osgirl/py-stcrestclient
e36c2c36b7fa7ed45f0c1cf94c12742e8e19910a
[ "MIT" ]
null
null
null
stcrestclient/tccsh.py
osgirl/py-stcrestclient
e36c2c36b7fa7ed45f0c1cf94c12742e8e19910a
[ "MIT" ]
null
null
null
""" Spirent TestCenter Command Shell Command shell that provides STC Automation API functionality using an interactive command line interface, or command file. This program accesses a TestCenter Server over its HTTP interface, so no local BLL installation is needed. Type help to see help info. Use <TAB> for command...
30.069307
79
0.542072
from __future__ import absolute_import from __future__ import print_function import os import sys import socket import cmd import shlex import time import getpass if sys.version_info < (2, 7): print("requires python2.7 or later", file=sys.stderr) sys.exit(1) if __name__ == '__main__' and __package__ is None:...
true
true
f75202de21653c31ef33d834f10d7c327c1b3000
6,547
py
Python
dglt/contrib/moses/moses/model/gvae/model_cvae.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
3
2022-02-06T09:13:51.000Z
2022-02-19T15:03:35.000Z
dglt/contrib/moses/moses/model/gvae/model_cvae.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
1
2022-02-14T23:16:27.000Z
2022-02-14T23:16:27.000Z
dglt/contrib/moses/moses/model/gvae/model_cvae.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.distributions.gumbel import Gumbel from dglt.contrib.moses.moses.model.gvae.utils import Flatten class CVAE(nn.Module): """Character Variational Autoencoder.""" def __init__(self, vocab, config): """Constructor function. Args: * vocab: mo...
31.936585
88
0.582404
import torch import torch.nn as nn from torch.distributions.gumbel import Gumbel from dglt.contrib.moses.moses.model.gvae.utils import Flatten class CVAE(nn.Module): def __init__(self, vocab, config): super().__init__() self.eos_symbol = '&' self.vocab = [self.eos_symbol] + voc...
true
true
f75205b64358b62ec4a597bc9ecc92f5225a938f
3,905
py
Python
examples/plot_held_out_lasso.py
svaiter/sparse-ho
8c04ca533e44ecd128dc26b6830a556babf8416f
[ "BSD-3-Clause" ]
null
null
null
examples/plot_held_out_lasso.py
svaiter/sparse-ho
8c04ca533e44ecd128dc26b6830a556babf8416f
[ "BSD-3-Clause" ]
null
null
null
examples/plot_held_out_lasso.py
svaiter/sparse-ho
8c04ca533e44ecd128dc26b6830a556babf8416f
[ "BSD-3-Clause" ]
null
null
null
""" ============================ Lasso with held-out test set ============================ This example shows how to perform hyperparameter optimization for a Lasso using a held-out validation set. """ # Authors: Quentin Bertrand <quentin.bertrand@inria.fr> # Quentin Klopfenstein <quentin.klopfenstein@u-bou...
28.093525
79
0.671959
import time import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn import linear_model from sparse_ho.models import Lasso from sparse_ho.criterion import HeldOutMSE from sparse_ho.forward import Forward from sparse_ho.implicit_forward import ImplicitForward from sparse_ho.utils import ...
true
true
f752068fb99fe4df446bd8f230ab85b53ca2e216
156
py
Python
tests/skl_datasets/BreastCancer/skl_dataset_BreastCancer_BaggingClassifier_14_code_gen.py
antoinecarme/sklearn_model_explanation
feeeb75576931f4a05a786d936babc0a664eef46
[ "BSD-3-Clause" ]
13
2017-12-22T09:12:51.000Z
2021-07-26T06:31:54.000Z
tests/skl_datasets/BreastCancer/skl_dataset_BreastCancer_BaggingClassifier_14_code_gen.py
antoinecarme/sklearn_model_explanation
feeeb75576931f4a05a786d936babc0a664eef46
[ "BSD-3-Clause" ]
11
2017-09-19T20:00:35.000Z
2018-02-05T07:59:06.000Z
tests/skl_datasets/BreastCancer/skl_dataset_BreastCancer_BaggingClassifier_14_code_gen.py
antoinecarme/sklearn_model_explanation
feeeb75576931f4a05a786d936babc0a664eef46
[ "BSD-3-Clause" ]
4
2017-12-11T12:33:32.000Z
2020-02-09T15:08:56.000Z
from sklearn_explain.tests.skl_datasets import skl_datasets_test as skltest skltest.test_class_dataset_and_model("BreastCancer" , "BaggingClassifier_14")
31.2
77
0.865385
from sklearn_explain.tests.skl_datasets import skl_datasets_test as skltest skltest.test_class_dataset_and_model("BreastCancer" , "BaggingClassifier_14")
true
true
f752069233e3794c761a0c20c05e2ccbff1cf3dd
2,347
py
Python
mslib/msui/constants.py
withoutwaxaryan/MSS
8bc06755e592c61d1b418f9a0b582ba0025f3da8
[ "Apache-2.0" ]
null
null
null
mslib/msui/constants.py
withoutwaxaryan/MSS
8bc06755e592c61d1b418f9a0b582ba0025f3da8
[ "Apache-2.0" ]
1
2021-01-26T11:56:31.000Z
2021-02-15T07:34:58.000Z
mslib/msui/constants.py
withoutwaxaryan/MSS
8bc06755e592c61d1b418f9a0b582ba0025f3da8
[ "Apache-2.0" ]
7
2021-01-21T10:40:09.000Z
2021-05-18T15:04:15.000Z
# -*- coding: utf-8 -*- """ mslib.msui.constants ~~~~~~~~~~~~~~~~~~~~ This module provides constants This file is part of mss. :copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. :copyright: Copyright 2011-2014 Marc Rautenhaus (mr), Tongxi Lou (tl) :copyright:...
32.150685
101
0.714103
import fs import os import logging HOME = os.path.expanduser(f"~{os.path.sep}") MSS_CONFIG_PATH = os.getenv("MSS_CONFIG_PATH", os.path.join(HOME, ".config", "mss")) if '://' in MSS_CONFIG_PATH: try: _fs = fs.open_fs(MSS_CONFIG_PATH) except fs.errors.CreateFailed: _fs.makedirs(MSS_CONFIG_PATH)...
true
true
f75206c35d2b5070eaa00f5e8d63d5d6aeb16b70
2,370
py
Python
alipay/aop/api/domain/AlipayPayAppCarPayModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayPayAppCarPayModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayPayAppCarPayModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayPayAppCarPayModel(object): def __init__(self): self._out_trade_no = None self._qr_code = None self._subject = None self._total_amount = None @property ...
27.55814
75
0.583966
import json from alipay.aop.api.constant.ParamConstants import * class AlipayPayAppCarPayModel(object): def __init__(self): self._out_trade_no = None self._qr_code = None self._subject = None self._total_amount = None @property def out_trade_no(self): return self...
true
true
f752076a7a650357d49177bf467576dece9c2642
8,309
py
Python
tests/matrix_conv2d/matrix_conv2d.py
kindsenior/nngen
cba265b1a140f2aef7208926703782b6dac9e8be
[ "Apache-2.0" ]
7
2020-06-08T13:36:13.000Z
2021-12-24T06:55:30.000Z
tests/matrix_conv2d/matrix_conv2d.py
kindsenior/nngen
cba265b1a140f2aef7208926703782b6dac9e8be
[ "Apache-2.0" ]
null
null
null
tests/matrix_conv2d/matrix_conv2d.py
kindsenior/nngen
cba265b1a140f2aef7208926703782b6dac9e8be
[ "Apache-2.0" ]
1
2021-03-12T03:51:56.000Z
2021-03-12T03:51:56.000Z
from __future__ import absolute_import from __future__ import print_function import os import sys import functools import math import numpy as np # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(__file__))))) import nngen as ng ...
34.193416
102
0.55121
from __future__ import absolute_import from __future__ import print_function import os import sys import functools import math import numpy as np sys.path.insert(0, os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(__file__))))) import nngen as ng from veriloggen import * import veriloggen.thread...
true
true
f75208b4d0b0285de4b0ac7292d40f1a2e4d058b
8,512
py
Python
shaker/engine/image_builder.py
performa-labs/shaker
870b20b34ff86c89a9bc25c30b044da023b7fccd
[ "Apache-2.0" ]
null
null
null
shaker/engine/image_builder.py
performa-labs/shaker
870b20b34ff86c89a9bc25c30b044da023b7fccd
[ "Apache-2.0" ]
null
null
null
shaker/engine/image_builder.py
performa-labs/shaker
870b20b34ff86c89a9bc25c30b044da023b7fccd
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
34.461538
79
0.649906
import os import shlex import shutil import sys import tempfile import uuid from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log as logging from shaker.engine import config from shaker.engine import utils from shaker.openstack.clients import glance from shaker.openstack.clie...
true
true
f7520a1554147ffd29a963eebfe0bf0cc0eb7f8f
988
py
Python
kubernetes/test/test_v1_iscsi_volume_source.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
1
2019-04-14T23:51:35.000Z
2019-04-14T23:51:35.000Z
kubernetes/test/test_v1_iscsi_volume_source.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_iscsi_volume_source.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
21.955556
105
0.716599
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_iscsi_volume_source import V1ISCSIVolumeSource class TestV1ISCSIVolumeSource(unittest.TestCase): def setUp(self): pass...
true
true
f7520adfc42b7151865e98f2c06252be3ea6e9d1
4,307
py
Python
Tax-Calculator-3.0.0/taxcalc/tests/test_data.py
grantseiter/Tax-Benefits-Of-Parenthood
5350e832e8b877b46c2a3cab070fc8262b914a52
[ "MIT" ]
null
null
null
Tax-Calculator-3.0.0/taxcalc/tests/test_data.py
grantseiter/Tax-Benefits-Of-Parenthood
5350e832e8b877b46c2a3cab070fc8262b914a52
[ "MIT" ]
null
null
null
Tax-Calculator-3.0.0/taxcalc/tests/test_data.py
grantseiter/Tax-Benefits-Of-Parenthood
5350e832e8b877b46c2a3cab070fc8262b914a52
[ "MIT" ]
null
null
null
# CODING-STYLE CHECKS: # pycodestyle test_data.py import os import tempfile import pytest import numpy as np import pandas as pd from taxcalc import Data, GrowFactors # Test specification and use of simple Data-derived class. # This derived class is called Recs and it contains aged data. # # The follow...
31.903704
79
0.63896
import os import tempfile import pytest import numpy as np import pandas as pd from taxcalc import Data, GrowFactors VARINFO_JSON = """ { "read": { "RECID": { "required": true, "type": "int", "desc": "Unique numeric identifier for record" }, "MARS": { "requ...
true
true
f7520b78ec604dc2c5f9b07f36c07a6c237ad623
3,158
py
Python
tests/test_nodeserver_api.py
sommersoft/RosiePi_Node_Server
2cb46ee8e7e9f1a42f76adc83ea9d17dc4f61335
[ "MIT" ]
null
null
null
tests/test_nodeserver_api.py
sommersoft/RosiePi_Node_Server
2cb46ee8e7e9f1a42f76adc83ea9d17dc4f61335
[ "MIT" ]
1
2020-06-06T16:03:37.000Z
2020-06-06T16:03:37.000Z
tests/test_nodeserver_api.py
sommersoft/RosiePi_Node_Server
2cb46ee8e7e9f1a42f76adc83ea9d17dc4f61335
[ "MIT" ]
1
2020-06-06T15:50:58.000Z
2020-06-06T15:50:58.000Z
# The MIT License (MIT) # # Copyright (c) 2019 Michael Schroeder # # 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,...
30.07619
122
0.714693
from datetime import datetime import json import pytest from flask import jsonify req_headers = { 'Authorization':'Signature key-id=test-key,algorithm="hmac-sha256",headers="(request-target) date",signature=foob4r=', 'Date': datetime.now().strftime('%Y-%m-%dT%H:%M:%S%Z') } def test_node_deny_no_http_signat...
true
true
f7520c303edeaafab584901db4be57895ee71486
5,605
py
Python
cloudroast/compute/instance_actions/admin_api/test_suspend_server.py
bhushan5/cloudroast
60e05df96fe50b3bc511ee1cf1c818329d4360a1
[ "Apache-2.0" ]
null
null
null
cloudroast/compute/instance_actions/admin_api/test_suspend_server.py
bhushan5/cloudroast
60e05df96fe50b3bc511ee1cf1c818329d4360a1
[ "Apache-2.0" ]
null
null
null
cloudroast/compute/instance_actions/admin_api/test_suspend_server.py
bhushan5/cloudroast
60e05df96fe50b3bc511ee1cf1c818329d4360a1
[ "Apache-2.0" ]
null
null
null
""" Copyright 2015 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
38.655172
79
0.705263
import unittest from cafe.drivers.unittest.decorators import tags from cloudcafe.compute.composites import ComputeAdminComposite from cloudcafe.compute.common.types import NovaServerRebootTypes from cloudcafe.compute.common.exceptions import Forbidden from cloudcafe.compute.common.types import NovaServerStatusTypes \...
true
true
f7520c8428b9b4e22ddf8d80e8323a5252a40b23
6,524
py
Python
ucscentralsdk/mometa/sw/SwSystemStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/sw/SwSystemStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/sw/SwSystemStats.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for SwSystemStats ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class SwSystemStatsConsts(): SUSPECT_FALSE = "false" SUSPECT_NO =...
64.594059
273
0.651594
from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class SwSystemStatsConsts(): SUSPECT_FALSE = "false" SUSPECT_NO = "no" SUSPECT_TRUE = "true" SUSPECT_YES = "yes" class SwSystemStats(Manage...
true
true
f7520f5b27f784df8c909defe1aa62357a8b9557
2,816
py
Python
features/steps/api_social_auth.py
asmuratbek/oobamarket
1053976a13ea84b9aabfcbbcbcffd79549ce9538
[ "MIT" ]
null
null
null
features/steps/api_social_auth.py
asmuratbek/oobamarket
1053976a13ea84b9aabfcbbcbcffd79549ce9538
[ "MIT" ]
7
2020-06-05T23:36:01.000Z
2022-01-13T01:42:07.000Z
features/steps/api_social_auth.py
asmuratbek/oobamarket
1053976a13ea84b9aabfcbbcbcffd79549ce9538
[ "MIT" ]
null
null
null
from behave import * from django.urls import reverse from features.steps import * from features.helpers import * use_step_matcher("re") @given("some google and facebook accounts") def step_impl(context): google_client_id = '230288808995-4c5f9sf26l43u1jpcgftv6uh8vcoipsq.apps.googleusercontent.com' google_secr...
44.698413
249
0.747159
from behave import * from django.urls import reverse from features.steps import * from features.helpers import * use_step_matcher("re") @given("some google and facebook accounts") def step_impl(context): google_client_id = '230288808995-4c5f9sf26l43u1jpcgftv6uh8vcoipsq.apps.googleusercontent.com' google_secr...
true
true
f7521030110a6a850d80d08ca3f6ad177f5543ca
1,118
py
Python
venv/lib/python3.8/site-packages/azureml/_restclient/models/batch_iteration_task.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_restclient/models/batch_iteration_task.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_restclient/models/batch_iteration_task.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator 2.3.3...
33.878788
82
0.581395
from msrest.serialization import Model class BatchIterationTask(Model): _attribute_map = { 'iteration_tasks': {'key': 'iteration_tasks', 'type': '[IterationTask]'}, 'version': {'key': 'version', 'type': 'int'}, } def __init__(self, iteration_tasks=None, version=None): ...
true
true
f752110515d030b2597797fc43b416cf23b6fcbd
64,909
py
Python
appengine/swarming/swarming_bot/client/isolateserver.py
amymariaparker2401/luci-py
c5902547adc12390df6b09c825a38370f1034e8b
[ "Apache-2.0" ]
null
null
null
appengine/swarming/swarming_bot/client/isolateserver.py
amymariaparker2401/luci-py
c5902547adc12390df6b09c825a38370f1034e8b
[ "Apache-2.0" ]
1
2022-03-02T11:45:18.000Z
2022-03-02T11:45:18.000Z
appengine/swarming/swarming_bot/client/isolateserver.py
Lees78/luci-py
7b854c55f63e648005ae8aa38e2e41cd8f99feda
[ "Apache-2.0" ]
1
2021-07-23T15:32:55.000Z
2021-07-23T15:32:55.000Z
#!/usr/bin/env python # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Archives a set of files or directories to an Isolate Server.""" from __future__ import print_function import collection...
34.055089
105
0.668551
from __future__ import print_function import collections import errno import functools import logging import optparse import os import re import signal import stat import sys import tarfile import threading import time import zlib from utils import net from utils import tools tools.force_local_third_party() import...
true
true
f752119b6133c4648e5544431749575baf9e9102
14,409
py
Python
litex_setup.py
bl0x/litex
c3b94a347e1e4a14c11b82473a0951de81939477
[ "ADSL" ]
null
null
null
litex_setup.py
bl0x/litex
c3b94a347e1e4a14c11b82473a0951de81939477
[ "ADSL" ]
null
null
null
litex_setup.py
bl0x/litex
c3b94a347e1e4a14c11b82473a0951de81939477
[ "ADSL" ]
null
null
null
#!/usr/bin/env python3 import os import sys import time import subprocess import shutil import hashlib import argparse import urllib.request start_time = time.time() current_path = os.path.abspath(os.curdir) # Helpers ------------------------------------------------------------------------------------------ def ...
39.803867
146
0.59671
import os import sys import time import subprocess import shutil import hashlib import argparse import urllib.request start_time = time.time() current_path = os.path.abspath(os.curdir) def colorer(s, color="bright"): header = { "bright" : "\x1b[1m", "green" : "\x1b[1m\x1b[32m", ...
true
true
f752157b7693147490e07733554cb599d4a3b4cc
1,706
py
Python
profiles_api/migrations/0001_initial.py
vigneshsweekaran/profiles-rest-api-1
8df1fb262f4d00b20cfbc15440747159c85df588
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
vigneshsweekaran/profiles-rest-api-1
8df1fb262f4d00b20cfbc15440747159c85df588
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
vigneshsweekaran/profiles-rest-api-1
8df1fb262f4d00b20cfbc15440747159c85df588
[ "MIT" ]
1
2020-11-22T17:00:42.000Z
2020-11-22T17:00:42.000Z
# Generated by Django 2.2 on 2020-10-17 10:54 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
50.176471
266
0.638921
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.Aut...
true
true
f75216882cb4cc38122759f16aa0eb4b614dae1f
3,204
py
Python
lbry/wallet/orchstr8/cli.py
robd003/lbry-sdk
3fc538104d46c8d83ce1ce9e684b1c602f43f60c
[ "MIT" ]
4,703
2015-09-10T20:49:05.000Z
2019-06-20T01:34:38.000Z
lbry/wallet/orchstr8/cli.py
robd003/lbry-sdk
3fc538104d46c8d83ce1ce9e684b1c602f43f60c
[ "MIT" ]
1,934
2015-11-25T20:40:45.000Z
2019-06-21T00:50:03.000Z
lbry/wallet/orchstr8/cli.py
robd003/lbry-sdk
3fc538104d46c8d83ce1ce9e684b1c602f43f60c
[ "MIT" ]
369
2015-12-05T21:18:07.000Z
2019-06-10T12:40:50.000Z
import logging import argparse import asyncio import aiohttp from lbry import wallet from lbry.wallet.orchstr8.node import ( Conductor, get_lbcd_node_from_ledger, get_lbcwallet_node_from_ledger ) from lbry.wallet.orchstr8.service import ConductorService def get_argument_parser(): parser = argparse.Ar...
33.030928
107
0.669164
import logging import argparse import asyncio import aiohttp from lbry import wallet from lbry.wallet.orchstr8.node import ( Conductor, get_lbcd_node_from_ledger, get_lbcwallet_node_from_ledger ) from lbry.wallet.orchstr8.service import ConductorService def get_argument_parser(): parser = argparse.Ar...
true
true
f75216a2bcb493ed94ff0a0153684ea5035223fd
12,038
py
Python
CryMOS/QV.py
michi7x7/pm-mos-model
394d752b1165f5afd96520f1b6e2dbecc27fdc4b
[ "Apache-2.0" ]
1
2021-11-26T08:40:40.000Z
2021-11-26T08:40:40.000Z
CryMOS/QV.py
michi7x7/pm-mos-model
394d752b1165f5afd96520f1b6e2dbecc27fdc4b
[ "Apache-2.0" ]
null
null
null
CryMOS/QV.py
michi7x7/pm-mos-model
394d752b1165f5afd96520f1b6e2dbecc27fdc4b
[ "Apache-2.0" ]
2
2021-12-06T21:56:27.000Z
2021-12-08T09:58:24.000Z
import numpy as np from .constants import * from .Bulk import BulkModel, BulkModelFD, BulkModelTails from .base import MosModelBase, writeable_property from math import sqrt from scipy.integrate import quad __all__ = ['DefaultQV', 'BeckersQVpy', 'DiracQVpy', 'TailsQVpy', 'GildenblatQVpy', 'Defa...
35.405882
129
0.584233
import numpy as np from .constants import * from .Bulk import BulkModel, BulkModelFD, BulkModelTails from .base import MosModelBase, writeable_property from math import sqrt from scipy.integrate import quad __all__ = ['DefaultQV', 'BeckersQVpy', 'DiracQVpy', 'TailsQVpy', 'GildenblatQVpy', 'Defa...
true
true
f75216e08c1b06b285c13ba21a4499474ed4beab
1,879
py
Python
lib/model/utils/blob.py
K2OKOH/da-faster-RCNN-ChineseComment
b88d1821779b9edc3f0f4a595e1f41c3bfdd7cab
[ "MIT" ]
2
2021-07-03T08:12:15.000Z
2021-11-13T08:19:35.000Z
lib/model/utils/blob.py
K2OKOH/da-faster-RCNN-ChineseComment
b88d1821779b9edc3f0f4a595e1f41c3bfdd7cab
[ "MIT" ]
1
2021-01-21T07:07:47.000Z
2021-01-21T07:07:47.000Z
lib/model/utils/blob.py
K2OKOH/da-faster-RCNN-ChineseComment
b88d1821779b9edc3f0f4a595e1f41c3bfdd7cab
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Blob helper functions.""" import numpy as np # from scipy.misc impo...
30.803279
75
0.601384
import numpy as np import cv2 try: xrange except NameError: xrange = range def im_list_to_blob(ims): max_shape = np.array([im.shape for im in ims]).max(axis=0) num_images = len(ims) blob = np.zeros((num_images, max_shape[0], max_shape[1], 3), dtype=np.f...
true
true
f752170fb726c75bdb804f7c7b0508971424f11c
4,333
py
Python
src/accounts/models.py
jabhishek87/croma
4fff327ea37fba3d5e90215db3a1b6860c309f74
[ "bzip2-1.0.6", "MIT" ]
56
2017-11-25T05:13:17.000Z
2022-01-27T15:14:44.000Z
src/accounts/models.py
jabhishek87/croma
4fff327ea37fba3d5e90215db3a1b6860c309f74
[ "bzip2-1.0.6", "MIT" ]
4
2018-12-10T18:16:36.000Z
2020-06-15T07:34:04.000Z
src/accounts/models.py
jabhishek87/croma
4fff327ea37fba3d5e90215db3a1b6860c309f74
[ "bzip2-1.0.6", "MIT" ]
25
2018-05-03T19:26:27.000Z
2021-12-20T08:38:06.000Z
from django.db import models from django.db import models from django.db.models.signals import pre_save from django.conf import settings from django.utils import timezone from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Hea...
46.591398
113
0.690976
from django.db import models from django.db import models from django.db.models.signals import pre_save from django.conf import settings from django.utils import timezone from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Hea...
true
true
f75217aa3e5cf8dbdcab02fffbfd381ccefef812
12,090
py
Python
main.py
johnnyapol/RPICovidScraper
84a97847c80c320e2eed3fd161e9f175f83d14a5
[ "MIT" ]
13
2020-10-08T15:17:29.000Z
2021-12-21T03:49:31.000Z
main.py
johnnyapol/RPICovidScraper
84a97847c80c320e2eed3fd161e9f175f83d14a5
[ "MIT" ]
19
2020-10-03T19:58:10.000Z
2021-09-28T15:01:57.000Z
main.py
johnnyapol/RPICovidScraper
84a97847c80c320e2eed3fd161e9f175f83d14a5
[ "MIT" ]
8
2020-10-03T19:03:02.000Z
2021-09-02T13:53:43.000Z
#!/usr/bin/env python3 # Usage: ./main.py """ Copyright (C) 2020-2021 John C. Allwein 'johnnyapol' (admin@johnnyapol.me) 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, includ...
34.542857
460
0.643011
import os import pickle import requests from random import choice from subprocess import run import sys import traceback from datetime import date, timedelta, datetime from copy import deepcopy from itertools import chain from io import BytesIO from bs4 import BeautifulSoup from discord_webhook import DiscordEmbed, Di...
true
true
f7521839214cddab80e9fe4afa4ab48819981903
14,325
py
Python
nova/api/metadata/handler.py
zjzh/nova
7bb21723171c59b93e28f5d508c2b6df39220f13
[ "Apache-2.0" ]
1,874
2015-01-04T05:18:34.000Z
2022-03-31T03:30:28.000Z
nova/api/metadata/handler.py
zjzh/nova
7bb21723171c59b93e28f5d508c2b6df39220f13
[ "Apache-2.0" ]
40
2015-04-13T02:32:42.000Z
2022-02-16T02:28:06.000Z
nova/api/metadata/handler.py
zjzh/nova
7bb21723171c59b93e28f5d508c2b6df39220f13
[ "Apache-2.0" ]
1,996
2015-01-04T15:11:51.000Z
2022-03-31T11:03:13.000Z
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
41.642442
79
0.609773
import hashlib import hmac import os from oslo_log import log as logging from oslo_utils import encodeutils from oslo_utils import secretutils as secutils from oslo_utils import strutils import webob.dec import webob.exc from nova.api.metadata import base from nova.api import wsgi from nova import cache_utils import...
true
true
f7521891c764be3fd5a83871dae0a981c71b714e
21,538
py
Python
setuptools/_distutils/command/bdist_rpm.py
hhartzer/setuptools
588f8a944d16eb654183fab561054a80a71893a4
[ "MIT" ]
null
null
null
setuptools/_distutils/command/bdist_rpm.py
hhartzer/setuptools
588f8a944d16eb654183fab561054a80a71893a4
[ "MIT" ]
null
null
null
setuptools/_distutils/command/bdist_rpm.py
hhartzer/setuptools
588f8a944d16eb654183fab561054a80a71893a4
[ "MIT" ]
null
null
null
"""distutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" import subprocess, sys, os from distutils.core import Command from distutils.debug import DEBUG from distutils.file_util import write_file from distutils.errors import * from distutils.sysconfi...
37.134483
82
0.553162
import subprocess, sys, os from distutils.core import Command from distutils.debug import DEBUG from distutils.file_util import write_file from distutils.errors import * from distutils.sysconfig import get_python_version from distutils import log class bdist_rpm(Command): description = "create an RPM distributio...
true
true
f75218c7ae0ec1ef681a2a62189340e506c1f777
11,611
py
Python
src/lib/datasets/dataset/vid_eval.py
nerminsamet/HoughNet-VID
670405e002e1c4d60596434db4790783eaf62846
[ "MIT" ]
5
2021-04-26T12:46:14.000Z
2021-09-15T15:17:35.000Z
src/lib/datasets/dataset/vid_eval.py
nerminsamet/HoughNet-VID
670405e002e1c4d60596434db4790783eaf62846
[ "MIT" ]
1
2021-09-06T05:22:32.000Z
2021-09-07T15:11:18.000Z
src/lib/datasets/dataset/vid_eval.py
nerminsamet/HoughNet-VID
670405e002e1c4d60596434db4790783eaf62846
[ "MIT" ]
1
2021-07-01T13:42:15.000Z
2021-07-01T13:42:15.000Z
import numpy as np import scipy.io as sio from collections import defaultdict BIG_NUM = 1000000 def area(box, mode="xyxy"): if mode == "xyxy": TO_REMOVE = 1 area = (box[:, 2] - box[:, 0] + TO_REMOVE) * (box[:, 3] - box[:, 1] + TO_REMOVE) elif mode == "xywh": area = box[:, 2] * box[:, ...
37.214744
116
0.552838
import numpy as np import scipy.io as sio from collections import defaultdict BIG_NUM = 1000000 def area(box, mode="xyxy"): if mode == "xyxy": TO_REMOVE = 1 area = (box[:, 2] - box[:, 0] + TO_REMOVE) * (box[:, 3] - box[:, 1] + TO_REMOVE) elif mode == "xywh": area = box[:, 2] * box[:, ...
true
true
f7521927f08b17710480608cebcd9ef0a3c5d1db
831
py
Python
q2_treetime/methods.py
ebolyen/q2-treetime
162ebfca9a120391840ed30ddef18fb2b780165e
[ "BSD-3-Clause" ]
1
2020-04-10T22:17:34.000Z
2020-04-10T22:17:34.000Z
q2_treetime/methods.py
ebolyen/q2-treetime
162ebfca9a120391840ed30ddef18fb2b780165e
[ "BSD-3-Clause" ]
null
null
null
q2_treetime/methods.py
ebolyen/q2-treetime
162ebfca9a120391840ed30ddef18fb2b780165e
[ "BSD-3-Clause" ]
null
null
null
import hashlib import skbio import numpy as np def add_node_names(tree: skbio.TreeNode, scheme: str = 'md5-xor') \ -> skbio.TreeNode: HASH_SIZE = 128 // 8 for node in tree.postorder(include_self=True): if not node.children or node.name is not None: continue xor = np.zero...
17.3125
78
0.624549
import hashlib import skbio import numpy as np def add_node_names(tree: skbio.TreeNode, scheme: str = 'md5-xor') \ -> skbio.TreeNode: HASH_SIZE = 128 // 8 for node in tree.postorder(include_self=True): if not node.children or node.name is not None: continue xor = np.zero...
true
true
f7521a750e38437ca6cb060b2fca948ff3b24625
2,242
py
Python
backend/controllers/test_suite_param.py
Li-Vincent/leo-api-auto
a2d3fed97a71c2647af9620a7fa55633ad1d0a69
[ "MIT" ]
11
2020-06-09T07:30:38.000Z
2021-07-14T05:28:25.000Z
backend/controllers/test_suite_param.py
herryshell/leo-api-auto
15a2dabbc50fd2b31d33064320b11dd5cecaa2b1
[ "MIT" ]
3
2020-01-08T03:01:21.000Z
2021-06-02T00:52:17.000Z
backend/controllers/test_suite_param.py
herryshell/leo-api-auto
15a2dabbc50fd2b31d33064320b11dd5cecaa2b1
[ "MIT" ]
5
2020-06-09T14:46:35.000Z
2021-07-28T08:03:27.000Z
from datetime import datetime from bson import ObjectId from flask import jsonify, request, current_app from flask_security import login_required from app import app from models.test_suite_param import TestSuiteParam from utils import common # Not yet used @app.route('/api/project/<project_id>/testEnv/<test_env_id...
43.115385
119
0.707404
from datetime import datetime from bson import ObjectId from flask import jsonify, request, current_app from flask_security import login_required from app import app from models.test_suite_param import TestSuiteParam from utils import common @app.route('/api/project/<project_id>/testEnv/<test_env_id>/paramList', m...
true
true
f7521ac35b7dd291b564abe435564e5f9bcf2c98
1,109
py
Python
setup.py
theelous3/flask-io
39745083a260bdda20d3a0712287aade9e0d8a97
[ "MIT" ]
null
null
null
setup.py
theelous3/flask-io
39745083a260bdda20d3a0712287aade9e0d8a97
[ "MIT" ]
null
null
null
setup.py
theelous3/flask-io
39745083a260bdda20d3a0712287aade9e0d8a97
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='flask-io', version='1.14.1', packages=['flask_io'], url='https://github.com/viniciuschiele/flask-io', license='MIT', author='Vinicius Chiele', author_email='vinicius.chiele@gmail.com', description='Flask-IO is a library for parsing Flask request...
41.074074
154
0.63661
from setuptools import setup setup( name='flask-io', version='1.14.1', packages=['flask_io'], url='https://github.com/viniciuschiele/flask-io', license='MIT', author='Vinicius Chiele', author_email='vinicius.chiele@gmail.com', description='Flask-IO is a library for parsing Flask request...
true
true
f7521baf35f3a8e5f4c030423c0cb1d3e2e87a8f
820
py
Python
setup.py
trendscenter/coinstac_pyprofiler
9a9eae0406a7ee655618993e33844503d48260c2
[ "MIT" ]
null
null
null
setup.py
trendscenter/coinstac_pyprofiler
9a9eae0406a7ee655618993e33844503d48260c2
[ "MIT" ]
null
null
null
setup.py
trendscenter/coinstac_pyprofiler
9a9eae0406a7ee655618993e33844503d48260c2
[ "MIT" ]
null
null
null
""" Created on Mon Oct 26 16:23:24 2020 @author: Sunitha Basodi """ import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt') as f: required_packages = f.read().splitlines() setuptools.setup( name="coinstac_pyprofiler", # Replace with your own user...
24.848485
65
0.682927
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open('requirements.txt') as f: required_packages = f.read().splitlines() setuptools.setup( name="coinstac_pyprofiler", version="0.1.0", author="Sunitha Basodi", author_email="sunitha.basodi@gmail.com", ...
true
true
f7521bf348f36ad2dac39b22df35eacb6d2d381b
817
py
Python
apex/pyprof/prof/randomSample.py
oyj0594/apex
b66ffc1d952d0b20d6706ada783ae5b23e4ee734
[ "BSD-3-Clause" ]
6,523
2018-04-25T17:35:27.000Z
2022-03-31T22:49:45.000Z
apex/pyprof/prof/randomSample.py
oyj0594/apex
b66ffc1d952d0b20d6706ada783ae5b23e4ee734
[ "BSD-3-Clause" ]
1,100
2018-05-18T00:03:34.000Z
2022-03-30T22:00:33.000Z
apex/pyprof/prof/randomSample.py
oyj0594/apex
b66ffc1d952d0b20d6706ada783ae5b23e4ee734
[ "BSD-3-Clause" ]
1,057
2018-05-07T13:53:04.000Z
2022-03-31T09:18:47.000Z
from collections import OrderedDict from .utility import Utility from .base import OperatorLayerBase class RandPerm(OperatorLayerBase): def __init__(self, d): marker = eval(d.argMarker[0]) mod = marker['mod'] op = marker['op'] args = marker['args'] self.marker = marker self.mod_ = mod self.op_ = op ...
18.568182
64
0.651163
from collections import OrderedDict from .utility import Utility from .base import OperatorLayerBase class RandPerm(OperatorLayerBase): def __init__(self, d): marker = eval(d.argMarker[0]) mod = marker['mod'] op = marker['op'] args = marker['args'] self.marker = marker self.mod_ = mod self.op_ = op ...
true
true
f7521bfe0c89eebec7df1fdb89737e19e761229c
3,067
py
Python
koans/about_strings.py
marlitas/python_koans
52d041c09f4d98d9370776dd28f9553c7df03246
[ "MIT" ]
null
null
null
koans/about_strings.py
marlitas/python_koans
52d041c09f4d98d9370776dd28f9553c7df03246
[ "MIT" ]
null
null
null
koans/about_strings.py
marlitas/python_koans
52d041c09f4d98d9370776dd28f9553c7df03246
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string =...
32.284211
85
0.654711
from runner.koan import * class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' self.assertEqual(Tr...
true
true
f7521c56e77254e87f9817a06bebb8c0ef995ec9
6,207
py
Python
codespace/python/examples/pollbot.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
37
2017-10-12T01:50:42.000Z
2022-02-24T02:44:45.000Z
codespace/python/examples/pollbot.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
null
null
null
codespace/python/examples/pollbot.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
12
2018-07-31T10:04:56.000Z
2022-02-07T00:08:06.000Z
#!/usr/bin/env python # pylint: disable=C0116,W0613 # This program is dedicated to the public domain under the CC0 license. """ Basic example for a bot that works with polls. Only 3 people are allowed to interact with each poll/quiz the bot generates. The preview command generates a closed poll/quiz, exactly like the ...
35.067797
96
0.684711
import logging from telegram import ( Poll, ParseMode, KeyboardButton, KeyboardButtonPollType, ReplyKeyboardMarkup, ReplyKeyboardRemove, Update, ) from telegram.ext import ( Updater, CommandHandler, PollAnswerHandler, PollHandler, MessageHandler, Filters, Callba...
true
true
f7521e031242dc25b1529f46150256ac12196a52
554
py
Python
terra_layer/migrations/0012_auto_20190618_1500.py
Terralego/terra-layer
6564a63d389503d3ae1f63ce46e674b228d6764b
[ "MIT" ]
1
2019-08-08T15:17:32.000Z
2019-08-08T15:17:32.000Z
terra_layer/migrations/0012_auto_20190618_1500.py
Terralego/terra-layer
6564a63d389503d3ae1f63ce46e674b228d6764b
[ "MIT" ]
65
2019-10-21T10:05:00.000Z
2022-03-08T14:08:27.000Z
terra_layer/migrations/0012_auto_20190618_1500.py
Terralego/terra-layer
6564a63d389503d3ae1f63ce46e674b228d6764b
[ "MIT" ]
null
null
null
# Generated by Django 2.0.13 on 2019-06-18 13:00 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [("terra_layer", "0011_auto_20190612_1721")] operations = [ migrations.AlterField( model_name="layer", ...
25.181818
63
0.599278
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [("terra_layer", "0011_auto_20190612_1721")] operations = [ migrations.AlterField( model_name="layer", name="source", field=models.Fore...
true
true
f7521ee0f8c71369c0ab4ae4cbeadb942daea49d
126
py
Python
DBweb/store/urls.py
M-jo2/Messagerie-django
8874d6d47fa11df5e84871500e7f534a47fb7b71
[ "MIT" ]
1
2020-10-19T12:35:10.000Z
2020-10-19T12:35:10.000Z
DBweb/store/urls.py
M-jo2/Messagerie-django
8874d6d47fa11df5e84871500e7f534a47fb7b71
[ "MIT" ]
null
null
null
DBweb/store/urls.py
M-jo2/Messagerie-django
8874d6d47fa11df5e84871500e7f534a47fb7b71
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'connect', views.connect, name='connexion') ]
15.75
52
0.706349
from django.conf.urls import url from . import views urlpatterns = [ url(r'connect', views.connect, name='connexion') ]
true
true
f7521f14efc7fdc117df9d96f3b17f430ca13d16
876
py
Python
google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/proto/proto1.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
1
2017-11-29T18:52:27.000Z
2017-11-29T18:52:27.000Z
google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/proto/proto1.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/proto/proto1.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
3
2017-07-27T18:44:13.000Z
2020-07-25T17:48:53.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
46.105263
78
0.785388
class ProtocolBufferDecodeError(Exception): pass class ProtocolBufferEncodeError(Exception): pass class ProtocolBufferReturnError(Exception): pass
true
true
f7521f37f25dfcf0c88e5d123b51ed9c0dbb535b
1,145
py
Python
0/dream.py
JacobFV/Computatrum
6b9c324f4e0e73e8d7af79bb7785d0e86d26bc31
[ "MIT" ]
null
null
null
0/dream.py
JacobFV/Computatrum
6b9c324f4e0e73e8d7af79bb7785d0e86d26bc31
[ "MIT" ]
null
null
null
0/dream.py
JacobFV/Computatrum
6b9c324f4e0e73e8d7af79bb7785d0e86d26bc31
[ "MIT" ]
null
null
null
import tensorflow as tf class Dream: def __init__(self, observers, actors, nna_internal_layer_deminsions, nno_internal_layer_deminsions, nnt_internal_layer_deminsions): self.nna for d in nna_internal_layer_deminsions: self.nno for d in nno_internal_layer_deminsions: ...
32.714286
136
0.71441
import tensorflow as tf class Dream: def __init__(self, observers, actors, nna_internal_layer_deminsions, nno_internal_layer_deminsions, nnt_internal_layer_deminsions): self.nna for d in nna_internal_layer_deminsions: self.nno for d in nno_internal_layer_deminsions: ...
false
true
f7521f7551f29fc0179a4d5c1291d3730f3f3915
5,550
py
Python
nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py
sebastientourbier/nipype
99c5904176481520c5bf42a501aae1a12184e672
[ "Apache-2.0" ]
2
2019-01-25T18:20:51.000Z
2019-07-30T20:51:51.000Z
nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py
sebastientourbier/nipype
99c5904176481520c5bf42a501aae1a12184e672
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/slicer/registration/tests/test_auto_BRAINSFit.py
sebastientourbier/nipype
99c5904176481520c5bf42a501aae1a12184e672
[ "Apache-2.0" ]
2
2018-01-25T19:48:17.000Z
2019-01-25T18:20:52.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..brainsfit import BRAINSFit def test_BRAINSFit_inputs(): input_map = dict(NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_00=dict(argstr='--NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_00 ', ), NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_...
31.896552
114
0.677838
from __future__ import unicode_literals from ..brainsfit import BRAINSFit def test_BRAINSFit_inputs(): input_map = dict(NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_00=dict(argstr='--NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_00 ', ), NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_01=dict(argstr='--NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_0...
true
true
f7521fab65fba7ac2e70de5a56b4e36554fff9e1
624
py
Python
WebAXEL/migrations/squashed_migrations/0053_auto_20200120_1535.py
xhackax47/AXEL_WEB
917cdbdd79ae364327135e09abce9d058dc1271a
[ "MIT" ]
1
2020-01-17T10:51:21.000Z
2020-01-17T10:51:21.000Z
WebAXEL/migrations/squashed_migrations/0053_auto_20200120_1535.py
xhackax47/AXEL_WEB
917cdbdd79ae364327135e09abce9d058dc1271a
[ "MIT" ]
8
2021-03-30T12:35:54.000Z
2022-03-12T00:11:34.000Z
WebAXEL/migrations/squashed_migrations/0053_auto_20200120_1535.py
xhackax47/AXEL_WEB
917cdbdd79ae364327135e09abce9d058dc1271a
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-01-20 14:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('WebAXEL', '0052_auto_20200109_1300'), ] operations = [ migrations.AddField( model_name='dataset', name='nb_vues', ...
26
98
0.599359
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('WebAXEL', '0052_auto_20200109_1300'), ] operations = [ migrations.AddField( model_name='dataset', name='nb_vues', field=models.IntegerField(default=0, v...
true
true
f75220bc367d71dd3a1afcfd50df6e0194725b2b
2,869
py
Python
object oriented programming(class).py
Pallavidighe2/Udemy-Practice-and-Project
fe35cb9fc5495ae5062b91330217e45e0ab68e3e
[ "MIT" ]
null
null
null
object oriented programming(class).py
Pallavidighe2/Udemy-Practice-and-Project
fe35cb9fc5495ae5062b91330217e45e0ab68e3e
[ "MIT" ]
null
null
null
object oriented programming(class).py
Pallavidighe2/Udemy-Practice-and-Project
fe35cb9fc5495ae5062b91330217e45e0ab68e3e
[ "MIT" ]
null
null
null
""" class student: def __init__(self ,name , contact): self.name=name self.contact=contact def getdata(self): print("accept the data") self.name=input("enter name") self.contact=input("entaer contact") def putdata(self): print("the name of student is :"+s...
19.650685
93
0.611363
class computer: def __init(self, company, harddisk): self.company = company self.harddisk = harddisk def getspec(self): print("get specification") self.company = input("enter name of computer company : ") self.harddisk = input("enter capacity of harddisk : ") ...
true
true
f752211ada4c6df1de2e50c45bfacb746af8dde5
920
py
Python
platform/app/models/anomaly.py
mstapfner/fadip
2a68f4a403d1fc0dc717e51910f1bb1446c17f72
[ "MIT" ]
null
null
null
platform/app/models/anomaly.py
mstapfner/fadip
2a68f4a403d1fc0dc717e51910f1bb1446c17f72
[ "MIT" ]
null
null
null
platform/app/models/anomaly.py
mstapfner/fadip
2a68f4a403d1fc0dc717e51910f1bb1446c17f72
[ "MIT" ]
null
null
null
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, Boolean, String, DateTime Base = declarative_base() class Anomaly(Base): __tablename__ = 'anomalies' id = Column(Integer, primary_key=True) query_name = Column(String) datasource_id = Column(String) de...
36.8
85
0.728261
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, Boolean, String, DateTime Base = declarative_base() class Anomaly(Base): __tablename__ = 'anomalies' id = Column(Integer, primary_key=True) query_name = Column(String) datasource_id = Column(String) de...
true
true
f752230068026a8a3b9e80dc19bad25aa25bf57a
7,364
py
Python
desktop/core/ext-py/phoenixdb/phoenixdb/connection.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/phoenixdb/phoenixdb/connection.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/phoenixdb/phoenixdb/connection.py
yetsun/hue
2e48f0cc70e233ee0e1b40733d4b2a18d8836c66
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
35.066667
112
0.657523
import logging import uuid import weakref from phoenixdb import errors from phoenixdb.cursor import Cursor from phoenixdb.errors import ProgrammingError from phoenixdb.meta import Meta __all__ = ['Connection'] logger = logging.getLogger(__name__) AVATICA_PROPERTIES = ('autoCommit', 'autocommit', 'readOnly', 'reado...
true
true
f75224d2463ca2512d7c2d50978dc468718edda4
130
py
Python
wsgi.py
codymlewis/QuantumChess
13d582204e295cb7255e897336a8266592604923
[ "MIT" ]
null
null
null
wsgi.py
codymlewis/QuantumChess
13d582204e295cb7255e897336a8266592604923
[ "MIT" ]
null
null
null
wsgi.py
codymlewis/QuantumChess
13d582204e295cb7255e897336a8266592604923
[ "MIT" ]
null
null
null
from WebApp import RAS_APP as application # move statics to ./ before deployment if __name__ == "__main__": application.run()
32.5
80
0.746154
from WebApp import RAS_APP as application if __name__ == "__main__": application.run()
true
true
f752256975ea939e4d0357fbfa42c12d5ac6c3da
538
py
Python
tests/diff_editor_test.py
ahamilton/diff-edit
eb5254961bbbb30ba4311c846b3347ebad105cf2
[ "Artistic-2.0" ]
null
null
null
tests/diff_editor_test.py
ahamilton/diff-edit
eb5254961bbbb30ba4311c846b3347ebad105cf2
[ "Artistic-2.0" ]
null
null
null
tests/diff_editor_test.py
ahamilton/diff-edit
eb5254961bbbb30ba4311c846b3347ebad105cf2
[ "Artistic-2.0" ]
null
null
null
#!/usr/bin/env python3 import unittest import diff_edit class OverlayListTestCase(unittest.TestCase): def test_overlay_list(self): self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], 0), [5, 6, 3, 4]) self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], 3), [1, 2, 3, 5]) ...
26.9
88
0.604089
import unittest import diff_edit class OverlayListTestCase(unittest.TestCase): def test_overlay_list(self): self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], 0), [5, 6, 3, 4]) self.assertEqual(diff_edit.overlay_list([1, 2, 3, 4], [5, 6], 3), [1, 2, 3, 5]) self.assertEqual(d...
true
true
f7522696b838c564c8a33a014835b5e6988f312f
3,484
py
Python
linux_proc_extras/setup.py
chotiwat/integrations-core
57a4437790cafcb769e120aa64d84aaecbf6a414
[ "BSD-3-Clause" ]
2
2019-04-03T17:21:38.000Z
2020-02-04T16:28:05.000Z
linux_proc_extras/setup.py
chotiwat/integrations-core
57a4437790cafcb769e120aa64d84aaecbf6a414
[ "BSD-3-Clause" ]
10
2018-02-27T19:06:07.000Z
2021-08-30T03:23:26.000Z
linux_proc_extras/setup.py
chotiwat/integrations-core
57a4437790cafcb769e120aa64d84aaecbf6a414
[ "BSD-3-Clause" ]
6
2018-01-09T21:37:20.000Z
2020-05-26T09:28:09.000Z
# Always prefer setuptools over distutils from setuptools import setup # To use a consistent encoding from codecs import open from os import path import json import re here = path.abspath(path.dirname(__file__)) def parse_req_line(line): line = line.strip() if not line or line.startswith('--hash') or line[0]...
28.793388
92
0.637199
from setuptools import setup from codecs import open from os import path import json import re here = path.abspath(path.dirname(__file__)) def parse_req_line(line): line = line.strip() if not line or line.startswith('--hash') or line[0] == '#': return None req = line.rpartition('#') if len(re...
true
true
f75226c39bb67e7adf764614f354109fcf4c57b7
1,226
py
Python
controller.py
AnotherStudent/MVC_Calculator
72fa0f8e060ecee009455b8bd2d2aca9ea064e2f
[ "MIT" ]
null
null
null
controller.py
AnotherStudent/MVC_Calculator
72fa0f8e060ecee009455b8bd2d2aca9ea064e2f
[ "MIT" ]
null
null
null
controller.py
AnotherStudent/MVC_Calculator
72fa0f8e060ecee009455b8bd2d2aca9ea064e2f
[ "MIT" ]
null
null
null
class CalcController: def __init__(self, model, view): self.model = model self.model.OnResult = self.OnResult self.model.OnError = self.OnError self.view = view self.model.AllClear() # interface for view def command(self, command): if command in ['0','1','2'...
31.435897
64
0.545677
class CalcController: def __init__(self, model, view): self.model = model self.model.OnResult = self.OnResult self.model.OnError = self.OnError self.view = view self.model.AllClear() def command(self, command): if command in ['0','1','2','3','4','5','6','7',...
true
true
f75227fe9446d7942bfe0a991bcf80b90a09ac56
26,584
py
Python
sentinelhub/aws.py
vincegeoinfo/sentinelhub-py
7802598c1b0846e26869894d8bee442a2f196b13
[ "MIT" ]
null
null
null
sentinelhub/aws.py
vincegeoinfo/sentinelhub-py
7802598c1b0846e26869894d8bee442a2f196b13
[ "MIT" ]
null
null
null
sentinelhub/aws.py
vincegeoinfo/sentinelhub-py
7802598c1b0846e26869894d8bee442a2f196b13
[ "MIT" ]
null
null
null
""" Module for obtaining data from Amazon Web Service """ from abc import ABC, abstractmethod import logging import os.path from .download import DownloadRequest, get_json, AwsDownloadFailedException from .opensearch import get_tile_info, get_tile_info_id from .time_utils import parse_time from .config import SHConfi...
40.462709
118
0.615445
from abc import ABC, abstractmethod import logging import os.path from .download import DownloadRequest, get_json, AwsDownloadFailedException from .opensearch import get_tile_info, get_tile_info_id from .time_utils import parse_time from .config import SHConfig from .constants import AwsConstants, EsaSafeType, MimeTy...
true
true
f7522a570cceb7e66cd54c894a7a50e3b0cb7da9
2,653
py
Python
configs/implus/cifar100_sk2next29_6x24x4_r48.py
implus/mmclassification
9dea853e3dfd52106e2aea6760fef1107045a3ca
[ "Apache-2.0" ]
null
null
null
configs/implus/cifar100_sk2next29_6x24x4_r48.py
implus/mmclassification
9dea853e3dfd52106e2aea6760fef1107045a3ca
[ "Apache-2.0" ]
null
null
null
configs/implus/cifar100_sk2next29_6x24x4_r48.py
implus/mmclassification
9dea853e3dfd52106e2aea6760fef1107045a3ca
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='CutMixImageClassifier', #type='ImageClassifier', cutmix_prob = 0.5, cutmix_beta = 1., backbone=dict( type='SK2NeXt29', depth=29, cardinality=6, base_width=24, scale=4, ratio=48, #cardinality=8, #bot...
28.223404
76
0.641161
model = dict( type='CutMixImageClassifier', cutmix_prob = 0.5, cutmix_beta = 1., backbone=dict( type='SK2NeXt29', depth=29, cardinality=6, base_width=24, scale=4, ratio=48, ...
true
true
f7522b58fe759ad02beb5ce374a125dcdde42486
2,841
py
Python
sphinx/conf.py
francois-rozet/lampe
50e53c767ee5d98502ec8520b3bca554f2169eb7
[ "MIT" ]
3
2022-03-20T19:23:27.000Z
2022-03-25T06:55:28.000Z
sphinx/conf.py
francois-rozet/lampe
50e53c767ee5d98502ec8520b3bca554f2169eb7
[ "MIT" ]
null
null
null
sphinx/conf.py
francois-rozet/lampe
50e53c767ee5d98502ec8520b3bca554f2169eb7
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder import os import sys import inspect import importlib sys.path.insert(0, os.path.abspath('..')) ## Project package = 'lampe' project = 'LAMPE' copyright = '2021-2022, François Rozet' repository = 'https://github.com/francois-rozet/lampe' ## Extensions exten...
24.491379
80
0.636748
import os import sys import inspect import importlib sys.path.insert(0, os.path.abspath('..')) package = 'lampe' project = 'LAMPE' copyright = '2021-2022, François Rozet' repository = 'https://github.com/francois-rozet/lampe' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.l...
true
true
f7522cb8a6488c3e38ec4a141823c5d654f6386d
453
py
Python
gen_vid_from_images.py
trung6/yolo-object-detection
d13095e7e2f84175d7c14f90bc810c6205356d6c
[ "MIT" ]
null
null
null
gen_vid_from_images.py
trung6/yolo-object-detection
d13095e7e2f84175d7c14f90bc810c6205356d6c
[ "MIT" ]
1
2021-12-13T20:06:40.000Z
2021-12-13T20:06:40.000Z
gen_vid_from_images.py
NguyenDucTrung123/yolo-object-detection
d9658af39455121339b7c6c177b07ef8ded6990c
[ "MIT" ]
null
null
null
import cv2 import os, sys import time import matplotlib.pyplot as plt inputFolder = r'' outPath = os.path.join(inputFolder,'outpy1.avi') w = 1280 h = 960 out = cv2.VideoWriter(outPath, cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), 20, (w, h)) for fileName in os.listdir(inputFolder): imgPath = os.path.join(inputFolder...
25.166667
86
0.686534
import cv2 import os, sys import time import matplotlib.pyplot as plt inputFolder = r'' outPath = os.path.join(inputFolder,'outpy1.avi') w = 1280 h = 960 out = cv2.VideoWriter(outPath, cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), 20, (w, h)) for fileName in os.listdir(inputFolder): imgPath = os.path.join(inputFolder...
true
true
f7522d2ca321ae026aceeb862d016255fdc67539
684
py
Python
integrations/airflow/marquez_airflow/__init__.py
ravwojdyla/marquez
8636604e5dcffe1832ea39d9b72e9bbab7b272db
[ "Apache-2.0" ]
null
null
null
integrations/airflow/marquez_airflow/__init__.py
ravwojdyla/marquez
8636604e5dcffe1832ea39d9b72e9bbab7b272db
[ "Apache-2.0" ]
null
null
null
integrations/airflow/marquez_airflow/__init__.py
ravwojdyla/marquez
8636604e5dcffe1832ea39d9b72e9bbab7b272db
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
34.2
74
0.739766
__author__ = """Marquez Project""" __version__ = "0.13.1" __all__ = ["DAG"] from marquez_airflow.dag import DAG
true
true
f7522de8c27f7df8309c243f170330b1ff30b189
5,174
py
Python
src/config/schema-transformer/logger.py
casek14/contrail-controller
18e2572635370b3cb6da2731af049cbeb934f2bb
[ "Apache-2.0" ]
1
2019-01-11T06:16:10.000Z
2019-01-11T06:16:10.000Z
src/config/schema-transformer/logger.py
casek14/contrail-controller
18e2572635370b3cb6da2731af049cbeb934f2bb
[ "Apache-2.0" ]
null
null
null
src/config/schema-transformer/logger.py
casek14/contrail-controller
18e2572635370b3cb6da2731af049cbeb934f2bb
[ "Apache-2.0" ]
1
2020-06-08T11:50:36.000Z
2020-06-08T11:50:36.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. # """ Schema Transformer monitor logger """ from sandesh_common.vns.ttypes import Module from cfgm_common.vnc_logger import ConfigServiceLogger from schema_transformer.config_db import DBBaseST, VirtualNetw...
40.740157
79
0.667375
from sandesh_common.vns.ttypes import Module from cfgm_common.vnc_logger import ConfigServiceLogger from schema_transformer.config_db import DBBaseST, VirtualNetworkST,\ RoutingInstanceST, ServiceChain from schema_transformer.sandesh.st_introspect import ttypes as sandesh class SchemaTransformerLogger(Conf...
true
true
f7522e4b7e5496ddc315323396c4d2c0daf74a32
564
py
Python
bb8/kulka_testing_.py
CoderAryanAnand/fun_projects
6891320a373bad539b6e7926ca868d56c560bc20
[ "MIT" ]
null
null
null
bb8/kulka_testing_.py
CoderAryanAnand/fun_projects
6891320a373bad539b6e7926ca868d56c560bc20
[ "MIT" ]
null
null
null
bb8/kulka_testing_.py
CoderAryanAnand/fun_projects
6891320a373bad539b6e7926ca868d56c560bc20
[ "MIT" ]
null
null
null
from kulka import Kulka import time ADDR = 'XX:XX:XX:XX:XX:XX' STEPS = 10 SPEED = 0x30 SLEEP_TIME = 0.3 def make_a_step(kulka, current_angle): kulka.roll(SPEED, current_angle) time.sleep(SLEEP_TIME) kulka.roll(0, current_angle) def make_a_circle(kulka, steps): rotate_by = 360 ...
17.090909
48
0.631206
from kulka import Kulka import time ADDR = 'XX:XX:XX:XX:XX:XX' STEPS = 10 SPEED = 0x30 SLEEP_TIME = 0.3 def make_a_step(kulka, current_angle): kulka.roll(SPEED, current_angle) time.sleep(SLEEP_TIME) kulka.roll(0, current_angle) def make_a_circle(kulka, steps): rotate_by = 360 ...
true
true
f7522f55dbcfedb0419d9ef9eebf8578998794db
4,900
py
Python
infinitystone/ui/views/domains.py
HieronymusCrouse/infinitystone
8a4bd9b415c0b2267eba45efc04a00d891b1a8d8
[ "BSD-3-Clause" ]
1
2018-05-17T15:50:45.000Z
2018-05-17T15:50:45.000Z
infinitystone/ui/views/domains.py
HieronymusCrouse/infinitystone
8a4bd9b415c0b2267eba45efc04a00d891b1a8d8
[ "BSD-3-Clause" ]
32
2018-03-22T07:59:29.000Z
2019-06-06T13:12:47.000Z
infinitystone/ui/views/domains.py
HieronymusCrouse/infinitystone
8a4bd9b415c0b2267eba45efc04a00d891b1a8d8
[ "BSD-3-Clause" ]
10
2018-02-26T08:17:31.000Z
2019-12-27T12:10:00.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018-2020 Christiaan Frans Rademan <chris@fwiw.co.za>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the ...
41.880342
79
0.566327
from luxon import g from luxon import router from luxon import register from luxon import render_template from luxon.utils.bootstrap4 import form from infinitystone.ui.models.domains import infinitystone_domain g.nav_menu.add('/System/Domains', href='/system/domains', tag='domains:admin'...
true
true
f7522fa784968e063e91d22b8f8464e041795b1c
2,439
py
Python
mmcv/cnn/__init__.py
Alsasolo/mmcv
6dfc9312fa872c7fd63a5e6971e9ecca8e3d4ef1
[ "Apache-2.0" ]
3
2022-03-09T13:15:15.000Z
2022-03-21T06:59:10.000Z
mmcv/cnn/__init__.py
Alsasolo/mmcv
6dfc9312fa872c7fd63a5e6971e9ecca8e3d4ef1
[ "Apache-2.0" ]
1
2020-08-15T10:11:53.000Z
2020-08-15T10:11:53.000Z
mmcv/cnn/__init__.py
Alsasolo/mmcv
6dfc9312fa872c7fd63a5e6971e9ecca8e3d4ef1
[ "Apache-2.0" ]
1
2022-01-09T15:30:55.000Z
2022-01-09T15:30:55.000Z
# Copyright (c) Open-MMLab. All rights reserved. from .alexnet import AlexNet # yapf: disable from .bricks import (ACTIVATION_LAYERS, CONV_LAYERS, NORM_LAYERS, PADDING_LAYERS, PLUGIN_LAYERS, UPSAMPLE_LAYERS, ContextBlock, Conv2d, Conv3d, ConvAWS2d, ConvModule, ...
58.071429
79
0.685527
from .alexnet import AlexNet from .bricks import (ACTIVATION_LAYERS, CONV_LAYERS, NORM_LAYERS, PADDING_LAYERS, PLUGIN_LAYERS, UPSAMPLE_LAYERS, ContextBlock, Conv2d, Conv3d, ConvAWS2d, ConvModule, ConvTranspose2d, ConvTranspose3d, ConvWS2d, ...
true
true
f75230473845b2e6f62a71405c7ace0e42cf58b6
34,963
py
Python
modules/adb.py
onlinesen/sample
2cebf4b28ec0cde2c087fc12db43173b47c31248
[ "Apache-2.0" ]
null
null
null
modules/adb.py
onlinesen/sample
2cebf4b28ec0cde2c087fc12db43173b47c31248
[ "Apache-2.0" ]
null
null
null
modules/adb.py
onlinesen/sample
2cebf4b28ec0cde2c087fc12db43173b47c31248
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf8 import os import time from modules import android_users #from modules import apktool from modules import command from modules import files #from modules import report from modules import strings from modules import utils from modules.logs import Logs APKSIGNER_ENABLED = False KEY_...
31.669384
125
0.623802
import os import time from modules import android_users from modules import command from modules import files from modules import strings from modules import utils from modules.logs import Logs APKSIGNER_ENABLED = False KEY_CLIENT_ID_BASE = 'client_id_base' KEY_CLIENT_ID = "client_id" KEY_SEARCH_CLIENT_ID = "search_...
true
true
f752309b210d845188e2dd79f4c0b684ee367c35
2,285
py
Python
cryptography/core/ROT.py
Adasumizox/crypto
45cb3cd19007a1b319efea20137a04a83afcf975
[ "MIT" ]
null
null
null
cryptography/core/ROT.py
Adasumizox/crypto
45cb3cd19007a1b319efea20137a04a83afcf975
[ "MIT" ]
null
null
null
cryptography/core/ROT.py
Adasumizox/crypto
45cb3cd19007a1b319efea20137a04a83afcf975
[ "MIT" ]
null
null
null
from hunspell import Hunspell import string class ROT: ALPHABET_LETTER_COUNT = 26 ALPHABET = alphabet = string.ascii_letters def __init__(self, shift: int = 13): # shift cannot be negative assert shift >= 0 self._shift = shift % self.ALPHABET_LETTER_COUNT @property def s...
29.675325
84
0.614004
from hunspell import Hunspell import string class ROT: ALPHABET_LETTER_COUNT = 26 ALPHABET = alphabet = string.ascii_letters def __init__(self, shift: int = 13): assert shift >= 0 self._shift = shift % self.ALPHABET_LETTER_COUNT @property def shift(self): return ...
true
true
f75230a4a89a7b1fe198f7b7a462d809610f4ae6
3,869
py
Python
nni/retiarii/nn/pytorch/mutator.py
Yongxuanzhang/nni
9caf5215d8a8ca8fb0729fc297f947699c1ca710
[ "MIT" ]
null
null
null
nni/retiarii/nn/pytorch/mutator.py
Yongxuanzhang/nni
9caf5215d8a8ca8fb0729fc297f947699c1ca710
[ "MIT" ]
null
null
null
nni/retiarii/nn/pytorch/mutator.py
Yongxuanzhang/nni
9caf5215d8a8ca8fb0729fc297f947699c1ca710
[ "MIT" ]
null
null
null
from typing import Any, List, Optional from ...mutator import Mutator from ...graph import Model, Node class LayerChoiceMutator(Mutator): def __init__(self, nodes: List[Node]): super().__init__() self.nodes = nodes def mutate(self, model): n_candidates = len(self.nodes[0].operation.p...
39.479592
108
0.672008
from typing import Any, List, Optional from ...mutator import Mutator from ...graph import Model, Node class LayerChoiceMutator(Mutator): def __init__(self, nodes: List[Node]): super().__init__() self.nodes = nodes def mutate(self, model): n_candidates = len(self.nodes[0].operation.p...
true
true
f7523114bf99bd77d0a85d83327301ac0e64f3bb
3,183
py
Python
mg/utils/midi2note.py
SJTMusicTeam/MusicGeneration
289c5935da6c4d1cf8c8d2c56ea79971dd82a035
[ "Apache-2.0" ]
6
2021-01-26T05:21:46.000Z
2021-12-10T12:57:29.000Z
mg/utils/midi2note.py
DrWelles/MusicGeneration
2918e151a1b9448e5452179bab70bf565d1eaaf7
[ "Apache-2.0" ]
2
2021-01-31T08:57:43.000Z
2021-02-26T03:43:11.000Z
mg/utils/midi2note.py
DrWelles/MusicGeneration
2918e151a1b9448e5452179bab70bf565d1eaaf7
[ "Apache-2.0" ]
4
2021-01-11T04:53:47.000Z
2022-01-12T04:17:44.000Z
from music21 import converter, instrument, note, chord, stream, midi import numpy as np import pandas as pd # Melody-RNN Format is a sequence of 8-bit integers indicating the following: # MELODY_NOTE_ON = [0, 127] # (note on at that MIDI pitch) MELODY_NOTE_OFF = 128 # (stop playing all previous notes) MELODY_NO_EVENT...
44.208333
147
0.668552
from music21 import converter, instrument, note, chord, stream, midi import numpy as np import pandas as pd MELODY_NOTE_OFF = 128 MELODY_NO_EVENT = 129 def streamToNoteArray(stream): total_length = np.int(np.round(stream.flat.highestTime / 0.25)) stream_list = [] for element in stream.flat: i...
true
true
f752313e0970ca59b83f258bd28df6cfcb2a3979
878
py
Python
instaproject/urls.py
Kerrykogei24/K-Gram
16d9c88996d3d94d0372cf9d27ca0290751e76ec
[ "MIT" ]
null
null
null
instaproject/urls.py
Kerrykogei24/K-Gram
16d9c88996d3d94d0372cf9d27ca0290751e76ec
[ "MIT" ]
null
null
null
instaproject/urls.py
Kerrykogei24/K-Gram
16d9c88996d3d94d0372cf9d27ca0290751e76ec
[ "MIT" ]
null
null
null
"""instaproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
33.769231
77
0.705011
from django.contrib import admin from django.conf.urls import include,url urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'',include('instagram.urls')), url(r'^accounts/',include('registration.backends.simple.urls')), ]
true
true
f75231a558334fdab54ace92773c4a1160259d8c
499
py
Python
homework_01_python/exercise_4.py
haohlin/Pattern-Recognition-Homework
33d478c1fba4547007987485e46d351b51f334b1
[ "Apache-2.0" ]
2
2019-10-30T07:27:16.000Z
2020-06-24T22:48:59.000Z
homework_01_python/exercise_4.py
haohlin/Pattern-Recognition-Homework
33d478c1fba4547007987485e46d351b51f334b1
[ "Apache-2.0" ]
null
null
null
homework_01_python/exercise_4.py
haohlin/Pattern-Recognition-Homework
33d478c1fba4547007987485e46d351b51f334b1
[ "Apache-2.0" ]
1
2020-03-01T09:58:14.000Z
2020-03-01T09:58:14.000Z
a = 1 b = 2 c = 3 d = 4 e = 5 f = 6 g = 7 h = 8 i = 9 list_1 = [a,b,c,d,e,f,g,h,i] print (' ', end='') for j in range(len(list_1)): print (list_1[j], ' ', end='') print('\n') for j in range(len(list_1)): print (j + 1, ' ', end='') for k in range(len(list_1)): print (list_1[j]*list_1[k], ' ', ...
20.791667
49
0.43487
a = 1 b = 2 c = 3 d = 4 e = 5 f = 6 g = 7 h = 8 i = 9 list_1 = [a,b,c,d,e,f,g,h,i] print (' ', end='') for j in range(len(list_1)): print (list_1[j], ' ', end='') print('\n') for j in range(len(list_1)): print (j + 1, ' ', end='') for k in range(len(list_1)): print (list_1[j]*list_1[k], ' ', ...
true
true
f75231a855c040725796976930312f54737d5863
345
py
Python
python/olm/__version__.py
louib/olm
45091c158d956ebb6c23acfe4dcb1f147df55d4a
[ "Apache-2.0" ]
null
null
null
python/olm/__version__.py
louib/olm
45091c158d956ebb6c23acfe4dcb1f147df55d4a
[ "Apache-2.0" ]
null
null
null
python/olm/__version__.py
louib/olm
45091c158d956ebb6c23acfe4dcb1f147df55d4a
[ "Apache-2.0" ]
null
null
null
__title__ = "python-olm" __description__ = ("python CFFI bindings for the olm " "cryptographic ratchet library") __url__ = "https://github.com/poljar/python-olm" __version__ = "3.0.0" __author__ = "Damir Jelić" __author_email__ = "poljar@termina.org.uk" __license__ = "Apache 2.0" __copyright__ = "Cop...
34.5
54
0.713043
__title__ = "python-olm" __description__ = ("python CFFI bindings for the olm " "cryptographic ratchet library") __url__ = "https://github.com/poljar/python-olm" __version__ = "3.0.0" __author__ = "Damir Jelić" __author_email__ = "poljar@termina.org.uk" __license__ = "Apache 2.0" __copyright__ = "Cop...
true
true
f752329dbc8fe300f5d1b56af1d2f8a28e232a16
4,371
py
Python
src/pyneat/stagnation.py
adamtupper/pyneat
12bf2bf936602c0da7c40cfcb99aced2eb981faa
[ "MIT" ]
null
null
null
src/pyneat/stagnation.py
adamtupper/pyneat
12bf2bf936602c0da7c40cfcb99aced2eb981faa
[ "MIT" ]
null
null
null
src/pyneat/stagnation.py
adamtupper/pyneat
12bf2bf936602c0da7c40cfcb99aced2eb981faa
[ "MIT" ]
null
null
null
"""Track the progress of species and remove those that have stalled. TODO: Add stagnation tests. TODO: Update module docstrings, and clean up comments and code. """ import sys from neat.config import ConfigParameter, DefaultClassConfig from neat.math_util import stat_functions # TODO: Add a method for the user to ch...
37.042373
93
0.619767
import sys from neat.config import ConfigParameter, DefaultClassConfig from neat.math_util import stat_functions class Stagnation(DefaultClassConfig): @classmethod def parse_config(cls, param_dict): return DefaultClassConfig(param_dict, [ConfigParameter('species_fit...
true
true
f75234612441254ca155b236cd1e37e8b4339ff3
398
py
Python
mainclone/migrations/0005_auto_20180724_0814.py
newtonkiragu/Not-Instagram
644f3c9fc0a446e3cab86100e0f0da8138c30492
[ "MIT" ]
null
null
null
mainclone/migrations/0005_auto_20180724_0814.py
newtonkiragu/Not-Instagram
644f3c9fc0a446e3cab86100e0f0da8138c30492
[ "MIT" ]
3
2020-06-05T18:48:43.000Z
2021-09-07T23:59:25.000Z
mainclone/migrations/0005_auto_20180724_0814.py
newtonkiragu/Not-Instagram
644f3c9fc0a446e3cab86100e0f0da8138c30492
[ "MIT" ]
3
2018-07-31T08:57:01.000Z
2020-11-03T14:55:24.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-07-24 08:14 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('mainclone', '0004_auto_20180724_0814'), ] operations = [ migrations.RenameModel( ...
19.9
49
0.620603
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('mainclone', '0004_auto_20180724_0814'), ] operations = [ migrations.RenameModel( old_name='Comments', new_name='Comment', ),...
true
true
f75234ea14a5f3ebeb9efa6768f8303862f7e3cb
2,999
py
Python
examples/stock/company.v.py
hwwhww/vyper
28d506c272ddbfd1818a061fd345b5c9657a7e32
[ "MIT" ]
1
2020-07-22T14:51:22.000Z
2020-07-22T14:51:22.000Z
examples/stock/company.v.py
hwwhww/vyper
28d506c272ddbfd1818a061fd345b5c9657a7e32
[ "MIT" ]
null
null
null
examples/stock/company.v.py
hwwhww/vyper
28d506c272ddbfd1818a061fd345b5c9657a7e32
[ "MIT" ]
null
null
null
# Own shares of a company! company: public(address) total_shares: public(currency_value) price: public(num (wei / currency)) # Store ledger of stockholder holdings holdings: currency_value[address] # Setup company def __init__(_company: address, _total_shares: currency_value, initial_price: num(wei / currenc...
32.247312
73
0.719573
company: public(address) total_shares: public(currency_value) price: public(num (wei / currency)) holdings: currency_value[address] def __init__(_company: address, _total_shares: currency_value, initial_price: num(wei / currency) ): assert _total_shares > 0 assert initial_price > 0 self.comp...
true
true