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
f7174cab91de04cda9ea71e938b27612f1038cb9
11,857
py
Python
tests/test_stochatreat_assignment.py
RoyalTS/stochatreat
6e638e748b8638b64a185229f78967cf864cd45e
[ "MIT" ]
null
null
null
tests/test_stochatreat_assignment.py
RoyalTS/stochatreat
6e638e748b8638b64a185229f78967cf864cd45e
[ "MIT" ]
13
2019-07-11T13:13:39.000Z
2019-07-19T14:26:57.000Z
tests/test_stochatreat_assignment.py
RoyalTS/stochatreat
6e638e748b8638b64a185229f78967cf864cd45e
[ "MIT" ]
null
null
null
import pytest from math import gcd import numpy as np import pandas as pd from stochatreat import stochatreat from stochatreat import get_lcm_prob_denominators ################################################################################ # fixtures ###############################################################...
30.017722
80
0.627899
import pytest from math import gcd import numpy as np import pandas as pd from stochatreat import stochatreat from stochatreat import get_lcm_prob_denominators @pytest.fixture(params=[10_000, 100_000]) def df(request): N = request.param df = pd.DataFrame( data={ "id": np.arange(N), ...
true
true
f7174cd8c1d5c09c4cbcb9df7c5490a9c0982657
1,305
py
Python
source/ship.py
seveirbian/Plane-game
96c5377e72d3dfb1c5720a1769e9db8e89624ed5
[ "MIT" ]
1
2018-06-12T08:56:52.000Z
2018-06-12T08:56:52.000Z
source/ship.py
seveirbian/Plane-game
96c5377e72d3dfb1c5720a1769e9db8e89624ed5
[ "MIT" ]
null
null
null
source/ship.py
seveirbian/Plane-game
96c5377e72d3dfb1c5720a1769e9db8e89624ed5
[ "MIT" ]
null
null
null
import pygame from pygame.sprite import Sprite class Ship(Sprite): def __init__(self, ai_settings, screen): super().__init__() '''初始化飞船并设置其初始位置''' self.screen = screen self.ai_settings = ai_settings # 加载飞船图像并获取其外接矩形 self.image = pygame.image.load('../images/ship.png...
29
76
0.622989
import pygame from pygame.sprite import Sprite class Ship(Sprite): def __init__(self, ai_settings, screen): super().__init__() self.screen = screen self.ai_settings = ai_settings self.image = pygame.image.load('../images/ship.png') self.rect = self.image.get_rect() ...
true
true
f7174db2dec152988a0f2418273a7a9086488a8b
4,836
py
Python
pynubank/nubank.py
FlavioMoreiraTec/nubank-flavio
224f483a7c7644116657c4f9e0929010ed511aa4
[ "MIT" ]
null
null
null
pynubank/nubank.py
FlavioMoreiraTec/nubank-flavio
224f483a7c7644116657c4f9e0929010ed511aa4
[ "MIT" ]
null
null
null
pynubank/nubank.py
FlavioMoreiraTec/nubank-flavio
224f483a7c7644116657c4f9e0929010ed511aa4
[ "MIT" ]
null
null
null
import json import os import uuid from typing import Tuple import requests from qrcode import QRCode from requests import Response PAYMENT_EVENT_TYPES = ( 'TransferOutEvent', 'TransferInEvent', 'TransferOutReversalEvent', 'BarcodePaymentEvent', 'DebitPurchaseEvent', 'DebitPurchaseReversalEvent...
35.29927
101
0.651778
import json import os import uuid from typing import Tuple import requests from qrcode import QRCode from requests import Response PAYMENT_EVENT_TYPES = ( 'TransferOutEvent', 'TransferInEvent', 'TransferOutReversalEvent', 'BarcodePaymentEvent', 'DebitPurchaseEvent', 'DebitPurchaseReversalEvent...
true
true
f7174f069101d37e1152c091948b84f7ddc5aa8d
313
py
Python
py_merge/mergeexample.py
mutazag/misc
dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f
[ "MIT" ]
null
null
null
py_merge/mergeexample.py
mutazag/misc
dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f
[ "MIT" ]
null
null
null
py_merge/mergeexample.py
mutazag/misc
dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f
[ "MIT" ]
null
null
null
#%% import pandas as pd #%% df1 = pd.read_csv('df1.csv', index_col=0) # %% df2 = pd.read_csv('df2.csv', index_col=0) # %% df3 = pd.read_csv('df3.csv', index_col=0) # %% df1.merge(df2, on='proj_id').merge(df3, on='doc_id') # %% df1.merge(df2, on='proj_id', how='left').merge(df3, on='doc_id', how='left') # %%
18.411765
76
0.603834
import pandas as pd df1 = pd.read_csv('df1.csv', index_col=0) df2 = pd.read_csv('df2.csv', index_col=0) df3 = pd.read_csv('df3.csv', index_col=0) df1.merge(df2, on='proj_id').merge(df3, on='doc_id') df1.merge(df2, on='proj_id', how='left').merge(df3, on='doc_id', how='left')
true
true
f7175023ba297508308f5f971d92777633745cb2
1,542
py
Python
tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_media_storage.py
BReduardokramer/gaia
c00302cdcd435ab193e8365917cfc6abac9e4f2e
[ "Apache-2.0" ]
1
2021-11-09T00:27:34.000Z
2021-11-09T00:27:34.000Z
tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_media_storage.py
Delphine/gaia
df92f0ebd89efbc63570a61e70c4304c17b8b555
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_media_storage.py
Delphine/gaia
df92f0ebd89efbc63570a61e70c4304c17b8b555
[ "Apache-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaiatest.apps.settings.app import Settings class TestSettingsMediaStorage(GaiaT...
40.578947
80
0.72179
from gaiatest import GaiaTestCase from gaiatest.apps.settings.app import Settings class TestSettingsMediaStorage(GaiaTestCase): def test_settings_media_storage(self): settings = Settings(self.marionette) settings.launch() media_storage_settings = settings.open_media_storage_settings() ...
true
true
f71752ad85213d316ee14113c2e19d7243632bd1
17,836
py
Python
features/eolearn/features/radiometric_normalization.py
mohammadrezabk/eo-learn
8de3cfd64e74c1e4832e585954cdbf0ee9676eb3
[ "MIT" ]
null
null
null
features/eolearn/features/radiometric_normalization.py
mohammadrezabk/eo-learn
8de3cfd64e74c1e4832e585954cdbf0ee9676eb3
[ "MIT" ]
null
null
null
features/eolearn/features/radiometric_normalization.py
mohammadrezabk/eo-learn
8de3cfd64e74c1e4832e585954cdbf0ee9676eb3
[ "MIT" ]
null
null
null
""" Module for radiometric normalization Credits: Copyright (c) 2018-2019 Johannes Schmid (GeoVille) Copyright (c) 2017-2019 Matej Aleksandrov, Matic Lubej, Devis Peresutti (Sinergise) This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import n...
46.569191
120
0.655808
import numpy as np from eolearn.core import EOTask, FeatureType class ReferenceScenes(EOTask): def __init__(self, feature, valid_fraction_feature, max_scene_number=None): self.feature = self._parse_features(feature, new_names=True, default_feature_type=Feature...
true
true
f71754673dd76b5b137364e722d76f8cba4d6ce8
3,160
py
Python
pypureclient/flasharray/FA_2_11/models/software_bundle_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_11/models/software_bundle_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_11/models/software_bundle_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.11 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ...
28.214286
105
0.549051
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_11 import models class SoftwareBundleResponse(object): swagger_types = { 'items': 'list[SoftwareBundle]' } attribute_map = { 'items': 'it...
true
true
f7175555296b859086cc2c753888bdfe21cb502e
936
py
Python
deoldify/save.py
TaktakTaktouk/DeOldify
0ff6139bb09d0abdf535a724f05bdad3ec04dcc1
[ "MIT" ]
14,898
2018-11-01T14:48:38.000Z
2022-03-31T16:28:38.000Z
deoldify/save.py
TaktakTaktouk/DeOldify
0ff6139bb09d0abdf535a724f05bdad3ec04dcc1
[ "MIT" ]
376
2018-11-02T18:22:23.000Z
2022-03-24T21:29:19.000Z
deoldify/save.py
TaktakTaktouk/DeOldify
0ff6139bb09d0abdf535a724f05bdad3ec04dcc1
[ "MIT" ]
2,250
2018-11-02T15:45:39.000Z
2022-03-28T17:08:23.000Z
from fastai.basic_train import Learner, LearnerCallback from fastai.vision.gan import GANLearner class GANSaveCallback(LearnerCallback): """A `LearnerCallback` that saves history of metrics while training `learn` into CSV `filename`.""" def __init__( self, learn: GANLearner, learn_gen...
31.2
103
0.645299
from fastai.basic_train import Learner, LearnerCallback from fastai.vision.gan import GANLearner class GANSaveCallback(LearnerCallback): def __init__( self, learn: GANLearner, learn_gen: Learner, filename: str, save_iters: int = 1000, ): super().__init__(learn)...
true
true
f71756f9227d14924ce1c8f11117e55a80ba40c0
1,904
py
Python
tests/test_args.py
rauljim/passgen
ca55c08b1ab0439d598dc045982b6971bfee1629
[ "MIT" ]
null
null
null
tests/test_args.py
rauljim/passgen
ca55c08b1ab0439d598dc045982b6971bfee1629
[ "MIT" ]
null
null
null
tests/test_args.py
rauljim/passgen
ca55c08b1ab0439d598dc045982b6971bfee1629
[ "MIT" ]
null
null
null
from passgen import args def test_num_words(): mock_argv = ['passgen', '-n', '22'] options = args.get_cli_options(mock_argv) assert 22 == options.num_words mock_argv = ['passgen', '--num-words', '33'] options = args.get_cli_options(mock_argv) assert 33 == options.num_words mock_argv = ['pa...
32.271186
71
0.688025
from passgen import args def test_num_words(): mock_argv = ['passgen', '-n', '22'] options = args.get_cli_options(mock_argv) assert 22 == options.num_words mock_argv = ['passgen', '--num-words', '33'] options = args.get_cli_options(mock_argv) assert 33 == options.num_words mock_argv = ['pa...
true
true
f717576ebe1b232b2fdba0695ea262b2ae5063cc
2,568
py
Python
src/base/base_train.py
MohamedAli1995/Cifar-100-Classifier
924704a81ce13062825a88b90b80e8ac2ba45d63
[ "MIT" ]
2
2019-05-12T16:11:20.000Z
2020-04-10T22:39:57.000Z
src/base/base_train.py
MohamedAli1995/Cifar-100-Classifier
924704a81ce13062825a88b90b80e8ac2ba45d63
[ "MIT" ]
null
null
null
src/base/base_train.py
MohamedAli1995/Cifar-100-Classifier
924704a81ce13062825a88b90b80e8ac2ba45d63
[ "MIT" ]
null
null
null
import tensorflow as tf class BaseTrain: """Standard base_train-class for easy multiple-inheritance. It is responsible for defining the functions to be implemented with any child. Attributes: sess: Tensorflow session to use. model: Model to be trained. data: Data_loader object...
36.169014
115
0.640576
import tensorflow as tf class BaseTrain: def __init__(self, sess, model, data, config, logger): self.model = model self.config = config self.sess = sess self.data = data self.logger = logger if not self.config.pretrain: self.init = tf.group(tf.global_v...
true
true
f7175782c5dfa546dd124965a86fa50da687c7ac
1,267
py
Python
SIGNUS/app/api/signus_v1/post.py
837477/SIGNUS
cd395dfd45d2c36d09ec9a8069e6e52e19f058e8
[ "MIT" ]
null
null
null
SIGNUS/app/api/signus_v1/post.py
837477/SIGNUS
cd395dfd45d2c36d09ec9a8069e6e52e19f058e8
[ "MIT" ]
null
null
null
SIGNUS/app/api/signus_v1/post.py
837477/SIGNUS
cd395dfd45d2c36d09ec9a8069e6e52e19f058e8
[ "MIT" ]
null
null
null
''' SIGNUS V1 post API ''' from flask import g from app.api.signus_v1 import signus_v1 as api from app.api.decorators import timer, login_required, login_optional from app.controllers.post import (post_like, post_unlike, post_view) @api.route("/post/...
24.843137
68
0.556433
from flask import g from app.api.signus_v1 import signus_v1 as api from app.api.decorators import timer, login_required, login_optional from app.controllers.post import (post_like, post_unlike, post_view) @api.route("/post/like/<string:post_oid>", me...
true
true
f71759ee5d329c4385a20b4d6bd880bfb741c347
1,398
py
Python
migrations/versions/f0a99f6b5e5e_.py
CSCfi/pebbles
24b32e8fc538cc8095fda62c892a8221346c2bce
[ "MIT" ]
4
2017-05-11T14:50:32.000Z
2020-01-10T09:02:27.000Z
migrations/versions/f0a99f6b5e5e_.py
CSCfi/pebbles
24b32e8fc538cc8095fda62c892a8221346c2bce
[ "MIT" ]
145
2017-04-07T11:01:58.000Z
2019-12-11T15:30:23.000Z
migrations/versions/f0a99f6b5e5e_.py
CSCfi/pebbles
24b32e8fc538cc8095fda62c892a8221346c2bce
[ "MIT" ]
3
2017-10-25T12:36:16.000Z
2018-04-26T08:49:34.000Z
"""empty message Revision ID: f0a99f6b5e5e Revises: he536vdwh29f Create Date: 2019-05-31 15:57:36.032393 """ # revision identifiers, used by Alembic. revision = 'f0a99f6b5e5e' down_revision = 'he536vdwh29f' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
35.846154
118
0.700286
revision = 'f0a99f6b5e5e' down_revision = 'he536vdwh29f' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table('instance_tokens', sa.Column('token', sa.String(length=32), nullable=False), sa.Column('instance_id', sa.String(length=32), nullable=True), sa.Column('expires_on...
true
true
f71759fb13c6dffdc6c632f41e1c01f82a06b50a
103,166
py
Python
python/pyarrow/tests/test_parquet.py
sparkma/arrow
62fd703a4ef0abbecb02397a06a630a9dee382d9
[ "Apache-2.0" ]
null
null
null
python/pyarrow/tests/test_parquet.py
sparkma/arrow
62fd703a4ef0abbecb02397a06a630a9dee382d9
[ "Apache-2.0" ]
null
null
null
python/pyarrow/tests/test_parquet.py
sparkma/arrow
62fd703a4ef0abbecb02397a06a630a9dee382d9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 # "...
32.513709
79
0.627494
from collections import OrderedDict import datetime import decimal import io import json import os import six import pickle import pytest import numpy as np import pyarrow as pa from pyarrow.compat import guid, u, BytesIO, unichar, PY2 from pyarrow.pandas_compat import _pandas_api from pyarrow.tests import util from...
true
true
f7175c38c11862b31ec72a419e525c555b34bcf3
16,570
py
Python
batch/processor_BondLedger_JP.py
BoostryJP/ibet-Issuer
efc599f8784be06588cf3ad8f239d36f24fdf3fa
[ "Apache-2.0" ]
1
2021-06-16T03:38:07.000Z
2021-06-16T03:38:07.000Z
batch/processor_BondLedger_JP.py
BoostryJP/ibet-Issuer
efc599f8784be06588cf3ad8f239d36f24fdf3fa
[ "Apache-2.0" ]
17
2021-04-26T03:28:40.000Z
2021-11-24T07:15:55.000Z
batch/processor_BondLedger_JP.py
BoostryJP/ibet-Issuer
efc599f8784be06588cf3ad8f239d36f24fdf3fa
[ "Apache-2.0" ]
1
2021-05-30T14:09:11.000Z
2021-05-30T14:09:11.000Z
""" Copyright BOOSTRY Co., Ltd. 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 distr...
34.957806
120
0.559626
import base64 from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA from datetime import ( datetime, timezone, timedelta ) import json import os import sys import time from eth_utils import to_checksum_address from sqlalchemy import ( create_engine, func ) from sqlalchemy.orm import...
true
true
f7175d22337c8b28777d73b05a950345e75f3ce4
1,993
py
Python
app/forms.py
TimothyBenger/top_lists
b3b5895a3a3c525e81fe167eb7d7ba46cfcbd785
[ "MIT" ]
null
null
null
app/forms.py
TimothyBenger/top_lists
b3b5895a3a3c525e81fe167eb7d7ba46cfcbd785
[ "MIT" ]
null
null
null
app/forms.py
TimothyBenger/top_lists
b3b5895a3a3c525e81fe167eb7d7ba46cfcbd785
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, IntegerField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo from app.models import User class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired(...
44.288889
87
0.714501
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, IntegerField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo from app.models import User class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired(...
true
true
f7175d5c72e50e87ef42937e0544adccadf5efa8
452
py
Python
lidi/signup/migrations/0002_user_conf_link.py
campovski/lidi
9699e62e70e679970816e29ca7618c9ed0146c7e
[ "Apache-2.0" ]
null
null
null
lidi/signup/migrations/0002_user_conf_link.py
campovski/lidi
9699e62e70e679970816e29ca7618c9ed0146c7e
[ "Apache-2.0" ]
21
2017-06-03T14:16:14.000Z
2018-05-29T07:28:27.000Z
lidi/signup/migrations/0002_user_conf_link.py
campovski/lidi
9699e62e70e679970816e29ca7618c9ed0146c7e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-02 18:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('signup', '0001_initial'), ] operations = [ migrations.AddField( ...
21.52381
64
0.606195
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('signup', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='conf_link', field=model...
true
true
f7175d75f291571b61c64c017b95e8592d28ea76
424
py
Python
app/moviestore/migrations/0007_alter_movie_user_charge.py
GeorgiosDolias/Movie-Store-REST-API
3a07301e4574071d6edb00d1a8b2c266c1fc8ff1
[ "MIT" ]
null
null
null
app/moviestore/migrations/0007_alter_movie_user_charge.py
GeorgiosDolias/Movie-Store-REST-API
3a07301e4574071d6edb00d1a8b2c266c1fc8ff1
[ "MIT" ]
null
null
null
app/moviestore/migrations/0007_alter_movie_user_charge.py
GeorgiosDolias/Movie-Store-REST-API
3a07301e4574071d6edb00d1a8b2c266c1fc8ff1
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-05 00:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('moviestore', '0006_movie_user_charge'), ] operations = [ migrations.AlterField( model_name='movie', name='user_charg...
22.315789
82
0.620283
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('moviestore', '0006_movie_user_charge'), ] operations = [ migrations.AlterField( model_name='movie', name='user_charge', field=models.DecimalField(blank=...
true
true
f7175f33e2db2534a03ad6bfb8c47d7e1b04f568
486
py
Python
main/strings/slice/words.py
catalinprescure/python-pages
93df3b22df2cfa269127e803a1b6c6a34bae6745
[ "MIT" ]
null
null
null
main/strings/slice/words.py
catalinprescure/python-pages
93df3b22df2cfa269127e803a1b6c6a34bae6745
[ "MIT" ]
null
null
null
main/strings/slice/words.py
catalinprescure/python-pages
93df3b22df2cfa269127e803a1b6c6a34bae6745
[ "MIT" ]
1
2021-12-24T15:58:32.000Z
2021-12-24T15:58:32.000Z
# Open file and search through words list # Return number of words with no e in them import os file = os.path.dirname(__file__) + "/words.txt" rows = open(file) def has_no_e(word): for letter in word: if letter == "e": return False return True W = [] # words E = [] # word with no e for ...
18.692308
47
0.584362
import os file = os.path.dirname(__file__) + "/words.txt" rows = open(file) def has_no_e(word): for letter in word: if letter == "e": return False return True W = [] E = [] for row in rows: word = row.strip() W.append(word) if (has_no_e(word)): E.append(word) ...
true
true
f717606f6302397f6adbcd4ea5ca8a1e1e665802
374
py
Python
setup.py
adamjoshuagray/PredictItPy
4006cb00f38c256765b556b3476c286470555533
[ "MIT" ]
null
null
null
setup.py
adamjoshuagray/PredictItPy
4006cb00f38c256765b556b3476c286470555533
[ "MIT" ]
1
2016-11-08T10:02:31.000Z
2016-11-08T10:02:31.000Z
setup.py
adamjoshuagray/PredictItPy
4006cb00f38c256765b556b3476c286470555533
[ "MIT" ]
1
2019-07-04T10:53:41.000Z
2019-07-04T10:53:41.000Z
from setuptools import setup setup(name='predictitpy', version='0.2', py_modules=['predictitpy'], description='A very light wrapper around the PredictIt.org market data api.', url='https://github.com/adamjoshuagray/predictitpy', author='Adam J. Gray', author_email='adam.joshua.gray@...
34
83
0.671123
from setuptools import setup setup(name='predictitpy', version='0.2', py_modules=['predictitpy'], description='A very light wrapper around the PredictIt.org market data api.', url='https://github.com/adamjoshuagray/predictitpy', author='Adam J. Gray', author_email='adam.joshua.gray@...
true
true
f71763968b7433700606cc9fe3afcf0b874429db
129,676
py
Python
salt/ext/tornado/web.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2020-03-31T22:51:16.000Z
2020-03-31T22:51:16.000Z
salt/ext/tornado/web.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
null
null
null
salt/ext/tornado/web.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2021-09-30T07:00:01.000Z
2021-09-30T07:00:01.000Z
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
39.439173
153
0.61757
from __future__ import absolute_import, division, print_function import base64 import binascii import datetime import email.utils import functools import gzip import hashlib import hmac import mimetypes import numbers import os.path import re import stat import sys import threading import time import salt.ext.tornad...
true
true
f717643a746a127d6805e12ee1e2871ece59b391
231
py
Python
replacefs/colors.py
yoarch/replace
5255810c019141f7de03b96c26a9b732d2218597
[ "MIT" ]
null
null
null
replacefs/colors.py
yoarch/replace
5255810c019141f7de03b96c26a9b732d2218597
[ "MIT" ]
null
null
null
replacefs/colors.py
yoarch/replace
5255810c019141f7de03b96c26a9b732d2218597
[ "MIT" ]
null
null
null
#!/usr/bin/env python RED = '\033[38;5;196;1m' ORANGE = '\033[38;5;202;1m' WHITE = '\033[1;37m' BLUE = '\033[1;34m' BASE_C = '\033[0m' GREEN = '\033[38;5;40;1m' PURPLE = '\033[38;5;135;1m' GREY = '\033[1;30m' YELLOW = '\033[1;33m'
21
27
0.588745
RED = '\033[38;5;196;1m' ORANGE = '\033[38;5;202;1m' WHITE = '\033[1;37m' BLUE = '\033[1;34m' BASE_C = '\033[0m' GREEN = '\033[38;5;40;1m' PURPLE = '\033[38;5;135;1m' GREY = '\033[1;30m' YELLOW = '\033[1;33m'
true
true
f7176531240df0f77d476afe1bbca902bbc7bc3d
2,864
py
Python
src/assets/sd_vaccine_plots/main.py
drvinceknight/amwoss
8b0bf80f0a06dc5cf9bfeef4b9f9e174ccadf06d
[ "MIT" ]
1
2022-03-21T21:35:44.000Z
2022-03-21T21:35:44.000Z
src/assets/sd_vaccine_plots/main.py
drvinceknight/amwoss
8b0bf80f0a06dc5cf9bfeef4b9f9e174ccadf06d
[ "MIT" ]
71
2019-11-18T11:00:25.000Z
2021-10-21T22:49:40.000Z
src/assets/sd_vaccine_plots/main.py
drvinceknight/amwoss
8b0bf80f0a06dc5cf9bfeef4b9f9e174ccadf06d
[ "MIT" ]
1
2020-01-15T12:00:49.000Z
2020-01-15T12:00:49.000Z
from scipy.integrate import solve_ivp import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') def derivatives(t, y, vaccine_rate, birth_rate=0.01): """Defines the system of differential equations that describe the epidemiology model. Args: t: a positive float y: a tuple of three...
31.822222
80
0.62081
from scipy.integrate import solve_ivp import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') def derivatives(t, y, vaccine_rate, birth_rate=0.01): infection_rate = 0.3 recovery_rate = 0.02 death_rate = 0.01 S, I, R = y N = S + I + R dSdt = ( -((infection_rate * S * I) / N) ...
true
true
f717657e62b89fc8eff399b8be1e18a4646e310b
8,981
py
Python
alipay/aop/api/request/AlipayOpenServicemarketOrderCreateRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayOpenServicemarketOrderCreateRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayOpenServicemarketOrderCreateRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayOpenServicemarketOrderCreateRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model sel...
33.262963
176
0.635119
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayOpenServicemarketOrderCreateRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._app_category_ids = None self._app_d...
true
true
f71767ca2c739f1474e2622061bcec8545048d82
18,990
py
Python
plugins/modules/oci_opsi_resource_forecast_trend_facts.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_opsi_resource_forecast_trend_facts.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
plugins/modules/oci_opsi_resource_forecast_trend_facts.py
sagar2938/oci-ansible-collection
5b8ce583a0d5d0aabf14494d61aea4649e18d1e6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
38.99384
157
0.597999
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: oci_opsi_resource_forecast_trend_facts short_description: Fetches details about a R...
true
true
f71767d27ceb9c0a11fa4ade0519de1ef382cf0f
1,385
py
Python
2020/src/day6.py
vionion/advent-of-code-2019
c3389694a42e9b1d978f82c6fb42925465799734
[ "MIT" ]
null
null
null
2020/src/day6.py
vionion/advent-of-code-2019
c3389694a42e9b1d978f82c6fb42925465799734
[ "MIT" ]
null
null
null
2020/src/day6.py
vionion/advent-of-code-2019
c3389694a42e9b1d978f82c6fb42925465799734
[ "MIT" ]
null
null
null
from typing import List, Set from io_utils import read_input_file def day6_1(): input_list = read_input_file("day6.txt", input_type=str) answers = get_all_yes_answers_per_group(input_list) amount_yes_answers = 0 for answers_per_group in answers: amount_yes_answers += len(answers_per_group) ...
26.634615
60
0.61083
from typing import List, Set from io_utils import read_input_file def day6_1(): input_list = read_input_file("day6.txt", input_type=str) answers = get_all_yes_answers_per_group(input_list) amount_yes_answers = 0 for answers_per_group in answers: amount_yes_answers += len(answers_per_group) ...
true
true
f71768dfa296b62f40248813c15aa926044590df
360
py
Python
votes/migrations/0002_auto_20190529_0721.py
isidaruk/eurovision_project
976743e66a2fed17c0513f17a9a7d35850e9cde5
[ "MIT" ]
null
null
null
votes/migrations/0002_auto_20190529_0721.py
isidaruk/eurovision_project
976743e66a2fed17c0513f17a9a7d35850e9cde5
[ "MIT" ]
8
2020-02-12T00:23:27.000Z
2022-03-08T21:10:13.000Z
votes/migrations/0002_auto_20190529_0721.py
isidaruk/eurovision_project
976743e66a2fed17c0513f17a9a7d35850e9cde5
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-05-29 07:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('votes', '0001_initial'), ] operations = [ migrations.RenameField( model_name='vote', old_name='to_country', new_...
18.947368
47
0.580556
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('votes', '0001_initial'), ] operations = [ migrations.RenameField( model_name='vote', old_name='to_country', new_name='to_participant', ), ]
true
true
f717690a322e1a696f5c7c83ea215426620aa34e
673
py
Python
src/data/456.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/456.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/456.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
from collections import deque n, m = map(int, input().split()) graph = [list() for _ in range(n)] for _ in range(n - 1): u, k = [int(x) for x in input().split()] # uは頂点番号、kは隣接頂点の個数 u, k = u - 1, k - 1 graph[u].append(k) graph[k].append(u) # 無向グラフ dist = [-1] * n #距離 dist[0] = 0 #startは0 q = dequ...
21.03125
64
0.499257
from collections import deque n, m = map(int, input().split()) graph = [list() for _ in range(n)] for _ in range(n - 1): u, k = [int(x) for x in input().split()] u, k = u - 1, k - 1 graph[u].append(k) graph[k].append(u) dist = [-1] * n dist[0] = 0 q = deque() q.append(0) while q: v = q.pop...
true
true
f71769abced2b28f75a37afaba30e87febaaf7f8
2,143
py
Python
Tracker/update.py
nordwind80/BT-Tracker
558c15b399871c1ca11d0c4ae1eb598e3060931e
[ "MIT" ]
1
2019-05-05T06:46:27.000Z
2019-05-05T06:46:27.000Z
Tracker/update.py
nordwind80/BT-Tracker
558c15b399871c1ca11d0c4ae1eb598e3060931e
[ "MIT" ]
null
null
null
Tracker/update.py
nordwind80/BT-Tracker
558c15b399871c1ca11d0c4ae1eb598e3060931e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Author: eaglewings # E-Mail: ZWFnbGV3aW5ncy55aUBnbWFpbC5jb20= # Created Time: 2019-04-17 15:17 # Last Modified: # Description: # - Project: BT Trackers Updater # - File Name: update.py # - Trackers Updater import os import re from typing import NoReturn class Filer...
26.45679
95
0.527765
import os import re from typing import NoReturn class Filer(object): def __init__(self): self._aria2_path = "/.aria2/" self._file_name = "aria2.conf" self._file_path = f"{self._get_home}{self._aria2_path}" @property def _get_home(self) -> str: return os.path.expanduser("...
true
true
f7176bc8b9827c81ae4f1e4df6897e9563ad218f
2,628
py
Python
source/boundaryconds.py
agstub/sglake-detectability
5556250a59d7f500bcee86899dd9a497a368faca
[ "MIT" ]
1
2021-05-27T12:24:35.000Z
2021-05-27T12:24:35.000Z
source/boundaryconds.py
ldeo-glaciology/sglake-detectability
5556250a59d7f500bcee86899dd9a497a368faca
[ "MIT" ]
null
null
null
source/boundaryconds.py
ldeo-glaciology/sglake-detectability
5556250a59d7f500bcee86899dd9a497a368faca
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------- # This file contains functions that: # (1) define the boundaries (ice-air,ice-water,ice-bed) of the mesh, AND... # (2) mark the boundaries of the mesh #------------------------------------------------------------------------------- from pa...
35.04
85
0.614916
from params import tol,Lngth,Hght from geometry import bed import numpy as np from dolfin import * class WaterBoundary(SubDomain): def inside(self, x, on_boundary): return (on_boundary and (x[1]<0.5*Hght)) class BedBoundary(SubDomain): def inside(self, x, on_boundary): ...
true
true
f7176c29d3c8975aef635b4e3270b662412a46af
1,825
py
Python
data_mining/dataset/main.py
basantbhandari/LaptopPricePrediction
086cfaf99b7c625345d5d383ba7f7e2109821c43
[ "MIT" ]
null
null
null
data_mining/dataset/main.py
basantbhandari/LaptopPricePrediction
086cfaf99b7c625345d5d383ba7f7e2109821c43
[ "MIT" ]
null
null
null
data_mining/dataset/main.py
basantbhandari/LaptopPricePrediction
086cfaf99b7c625345d5d383ba7f7e2109821c43
[ "MIT" ]
null
null
null
print("Scrape the dataset from...") # import the necessary library from bs4 import BeautifulSoup import requests import pandas as pd # Request to website and download HTML contents url='https://www.gadgetbytenepal.com/category/laptop-price-in-nepal/' # write data in a file. file1 = open("alldata.txt","w") req=req...
19.623656
84
0.447671
print("Scrape the dataset from...") from bs4 import BeautifulSoup import requests import pandas as pd url='https://www.gadgetbytenepal.com/category/laptop-price-in-nepal/' file1 = open("alldata.txt","w") req=requests.get(url) htmlcontent=req.content soup=BeautifulSoup(htmlcontent, 'html.parser') desired_content...
true
true
f7176c890702cb23e4dd9472f56d2732e8d22b76
7,927
py
Python
tests_python/tests_008/test_basic.py
arvidj/tezos
9d9e75425ebd603e9e6b9158d573424cd74e9a30
[ "MIT" ]
null
null
null
tests_python/tests_008/test_basic.py
arvidj/tezos
9d9e75425ebd603e9e6b9158d573424cd74e9a30
[ "MIT" ]
null
null
null
tests_python/tests_008/test_basic.py
arvidj/tezos
9d9e75425ebd603e9e6b9158d573424cd74e9a30
[ "MIT" ]
null
null
null
from os import path import pytest from client.client import Client from tools import utils from tools.paths import ACCOUNT_PATH from tools.utils import assert_run_failure from .contract_paths import CONTRACT_PATH TRANSFER_ARGS = ['--burn-cap', '0.257'] @pytest.mark.incremental class TestRawContext: def test_del...
35.707207
80
0.608931
from os import path import pytest from client.client import Client from tools import utils from tools.paths import ACCOUNT_PATH from tools.utils import assert_run_failure from .contract_paths import CONTRACT_PATH TRANSFER_ARGS = ['--burn-cap', '0.257'] @pytest.mark.incremental class TestRawContext: def test_del...
true
true
f7176e98b7a02c6157bf7280dc45d7ede12e9f2b
2,915
py
Python
Bio/Geo/Record.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
Bio/Geo/Record.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
Bio/Geo/Record.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
# Copyright 2001 by Katharine Lindner. All rights reserved. # Copyright 2006 by PeterC. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Hold GEO data in a straightforward fo...
32.032967
71
0.540995
from __future__ import print_function class Record(object): def __init__(self): self.entity_type = '' self.entity_id = '' self.entity_attributes = {} self.col_defs = {} self.table_rows = [] def __str__(self): output = '' output += 'GEO Type: %s\n' % s...
true
true
f7176eb2dd972a167ede03275af13333e556edee
829
py
Python
setup.py
brandjon/iast
23961536c3bfb5d8fce39c28214ea88b8072450c
[ "PSF-2.0" ]
11
2015-01-04T08:40:09.000Z
2021-03-24T03:56:34.000Z
setup.py
brandjon/iast
23961536c3bfb5d8fce39c28214ea88b8072450c
[ "PSF-2.0" ]
null
null
null
setup.py
brandjon/iast
23961536c3bfb5d8fce39c28214ea88b8072450c
[ "PSF-2.0" ]
null
null
null
from setuptools import setup setup( name = 'iAST', version = '0.2.1', url = 'https://github.com/brandjon/iast', author = 'Jon Brandvein', author_email = 'jon.brandvein@gmail.com', license = 'MIT License', description = 'A library for defining an...
29.607143
71
0.546441
from setuptools import setup setup( name = 'iAST', version = '0.2.1', url = 'https://github.com/brandjon/iast', author = 'Jon Brandvein', author_email = 'jon.brandvein@gmail.com', license = 'MIT License', description = 'A library for defining an...
true
true
f717706b17d80b336156b8f3eb5d703f5a5b7596
3,082
py
Python
airbyte-integrations/connectors/source-paypal-transaction/bin/fixture_helper.py
luizgribeiro/airbyte
71a96f5417b678c39b34e2e92234d8a51529e086
[ "MIT" ]
2
2021-08-04T03:17:38.000Z
2021-11-15T10:16:08.000Z
airbyte-integrations/connectors/source-paypal-transaction/bin/fixture_helper.py
luizgribeiro/airbyte
71a96f5417b678c39b34e2e92234d8a51529e086
[ "MIT" ]
52
2021-06-11T12:39:05.000Z
2022-03-30T04:59:35.000Z
airbyte-integrations/connectors/source-paypal-transaction/bin/fixture_helper.py
luizgribeiro/airbyte
71a96f5417b678c39b34e2e92234d8a51529e086
[ "MIT" ]
2
2021-12-14T17:15:40.000Z
2021-12-14T17:18:03.000Z
# # MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
28.018182
130
0.658014
import logging from pprint import pprint import requests logging.basicConfig(level=logging.DEBUG) specification = { "client_id": "REPLACE_ME", "secret": "REPLACE_ME", "start_date": "2021-06-01T00:00:00+00:00", "end_date": "2021-06-30T00:00:00+00:00", "is_sandbox": True, } client_id = specifica...
true
true
f71770a671bd24aaba89e7db742a94eb08713f1f
2,095
py
Python
test/main_test.py
vaughn-johnson/talkspace-public-api
20eca278e8ac651f610d6afaff8fdc3fce2918fc
[ "MIT" ]
null
null
null
test/main_test.py
vaughn-johnson/talkspace-public-api
20eca278e8ac651f610d6afaff8fdc3fce2918fc
[ "MIT" ]
6
2020-11-19T04:25:05.000Z
2020-11-20T20:53:32.000Z
test/main_test.py
vaughn-johnson/talkspace-public-api
20eca278e8ac651f610d6afaff8fdc3fce2918fc
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock, Mock, patch from .mock_mongo import MockPyMongo import json import sys import os ### TEST SETUP ### EXPECTED_DATA_FRAME_FILENAME = os.path.join(os.path.dirname(__file__), 'expected_response.json') EXPECTED_DATA_FRAME = open(EXPECTED_DATA_FR...
26.858974
70
0.686396
from unittest.mock import MagicMock, Mock, patch from .mock_mongo import MockPyMongo import json import sys import os EXPECTED_DATA_FRAME_FILENAME = os.path.join(os.path.dirname(__file__), 'expected_response.json') EXPECTED_DATA_FRAME = open(EXPECTED_DATA_FRAME_FILENAME).read(...
true
true
f7177131572435ea6057a138ae45fca472fca8a1
50,438
py
Python
train/comms/pt/comms.py
caogao/param
9de2602c894df264a004c352ee16abc14f93da76
[ "MIT" ]
null
null
null
train/comms/pt/comms.py
caogao/param
9de2602c894df264a004c352ee16abc14f93da76
[ "MIT" ]
null
null
null
train/comms/pt/comms.py
caogao/param
9de2602c894df264a004c352ee16abc14f93da76
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import argparse import logging imp...
41.207516
180
0.567865
from __future__ import absolute_import, division, print_function, unicode_literals import argparse import logging import time import comms_utils import numpy as np import torch from comms_utils import paramCommsBench, ensureTensorFlush supportedCollectives = [ "reduce", "all_reduce", "all_to_all", ...
true
true
f717719b096d0afc9e9656a8a3d67b6ed3d90cd0
3,338
py
Python
mime/agent/script_agent_augmented.py
rjgpinel/mime-release
26a850c4ba5b702b86d068995614163338fb01df
[ "MIT" ]
null
null
null
mime/agent/script_agent_augmented.py
rjgpinel/mime-release
26a850c4ba5b702b86d068995614163338fb01df
[ "MIT" ]
null
null
null
mime/agent/script_agent_augmented.py
rjgpinel/mime-release
26a850c4ba5b702b86d068995614163338fb01df
[ "MIT" ]
null
null
null
import itertools import types import numpy as np import torch import click import gym import time import yaml from robos2r.model import build_model from .agent import Agent from .script_agent import ScriptAgent, make_noised from .utils import Rate from PIL import Image from pathlib import Path from einops import rear...
31.490566
107
0.641402
import itertools import types import numpy as np import torch import click import gym import time import yaml from robos2r.model import build_model from .agent import Agent from .script_agent import ScriptAgent, make_noised from .utils import Rate from PIL import Image from pathlib import Path from einops import rear...
true
true
f71771ce6064be5fc44ff24790cce8db6106923c
8,762
py
Python
benchmark_runner/common/clouds/shared/s3/s3_operations.py
kpouget/benchmark-runner
eecdb57d12f8c17268800632722af8fe8046185a
[ "Apache-2.0" ]
10
2021-07-21T21:44:20.000Z
2022-02-24T22:01:13.000Z
benchmark_runner/common/clouds/shared/s3/s3_operations.py
kpouget/benchmark-runner
eecdb57d12f8c17268800632722af8fe8046185a
[ "Apache-2.0" ]
83
2021-07-20T14:37:44.000Z
2022-03-24T13:48:04.000Z
benchmark_runner/common/clouds/shared/s3/s3_operations.py
kpouget/benchmark-runner
eecdb57d12f8c17268800632722af8fe8046185a
[ "Apache-2.0" ]
6
2021-07-14T21:12:48.000Z
2022-02-15T12:48:27.000Z
import os import boto3 import typeguard from botocore.exceptions import ClientError from os import listdir from os.path import isfile, join from benchmark_runner.common.clouds.shared.s3.s3_operations_exceptions import S3FileNotUploaded, S3FileNotDownloaded, S3FileNotDeleted, S3KeyNotCreated, S3FileNotExist, S3Failed...
37.127119
195
0.57738
import os import boto3 import typeguard from botocore.exceptions import ClientError from os import listdir from os.path import isfile, join from benchmark_runner.common.clouds.shared.s3.s3_operations_exceptions import S3FileNotUploaded, S3FileNotDownloaded, S3FileNotDeleted, S3KeyNotCreated, S3FileNotExist, S3Failed...
true
true
f71772584a21b6b069b86c34169c1b8debf5cb25
476
py
Python
erinn/python/models/__init__.py
swcjack6931677/ERINN
a4f3d0ad213515bc86e2a18575537d6affd472ac
[ "MIT" ]
null
null
null
erinn/python/models/__init__.py
swcjack6931677/ERINN
a4f3d0ad213515bc86e2a18575537d6affd472ac
[ "MIT" ]
null
null
null
erinn/python/models/__init__.py
swcjack6931677/ERINN
a4f3d0ad213515bc86e2a18575537d6affd472ac
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from . import CNN from . import CNN1D from . import CNN1D_Rx from . import CNN1D_Tx from . import DFN # Globally-importable models. from .CNN import get_cnn_relu from .CNN1D import get_...
25.052632
39
0.813025
from __future__ import absolute_import from __future__ import division from __future__ import print_function from . import CNN from . import CNN1D from . import CNN1D_Rx from . import CNN1D_Tx from . import DFN from .CNN import get_cnn_relu from .CNN1D import get_cnn1d_relu from .CNN1D_Rx import get_cnn1d_rx_relu fro...
true
true
f717729d6712f5bbd8b1c9f44dde5e6c1bc8107e
411
py
Python
server/config.py
ahnaf-zamil/flask-react-session-authenticaton-tutorial
88c454af9932435d0bd9ad1c16718beb6fc0e1c1
[ "MIT" ]
1
2021-11-01T10:46:16.000Z
2021-11-01T10:46:16.000Z
server/config.py
ahnaf-zamil/flask-react-session-authenticaton-tutorial
88c454af9932435d0bd9ad1c16718beb6fc0e1c1
[ "MIT" ]
null
null
null
server/config.py
ahnaf-zamil/flask-react-session-authenticaton-tutorial
88c454af9932435d0bd9ad1c16718beb6fc0e1c1
[ "MIT" ]
null
null
null
from dotenv import load_dotenv import os import redis load_dotenv() class ApplicationConfig: SECRET_KEY = os.environ["SECRET_KEY"] SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_ECHO = True SQLALCHEMY_DATABASE_URI = r"sqlite:///./db.sqlite" SESSION_TYPE = "redis" SESSION_PERMANENT = False...
24.176471
60
0.734793
from dotenv import load_dotenv import os import redis load_dotenv() class ApplicationConfig: SECRET_KEY = os.environ["SECRET_KEY"] SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_ECHO = True SQLALCHEMY_DATABASE_URI = r"sqlite:///./db.sqlite" SESSION_TYPE = "redis" SESSION_PERMANENT = False...
true
true
f71772cc3a746eb0432c3f9d0877b4f980c06a5f
1,344
py
Python
Embed.py
zhengxiawu/Transformer
8cad013913254ea4e06c4a8d460d9f2cf42df086
[ "Apache-2.0" ]
null
null
null
Embed.py
zhengxiawu/Transformer
8cad013913254ea4e06c4a8d460d9f2cf42df086
[ "Apache-2.0" ]
null
null
null
Embed.py
zhengxiawu/Transformer
8cad013913254ea4e06c4a8d460d9f2cf42df086
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import math from torch.autograd import Variable class Embedder(nn.Module): def __init__(self, vocab_size, d_model): super().__init__() self.d_model = d_model self.embed = nn.Embedding(vocab_size, d_model) def forward(self, x): return self.emb...
30.545455
70
0.563244
import torch import torch.nn as nn import math from torch.autograd import Variable class Embedder(nn.Module): def __init__(self, vocab_size, d_model): super().__init__() self.d_model = d_model self.embed = nn.Embedding(vocab_size, d_model) def forward(self, x): return self.emb...
true
true
f71772d3409ea5f7a2383df7d2159cca0dc08add
8,729
py
Python
rl/train_a2c_mc.py
ds4dm/GraphRL
b5b1519f6dd92b401625d51add9ae5829004a30b
[ "MIT" ]
2
2021-02-26T18:51:01.000Z
2021-07-12T05:20:18.000Z
rl/train_a2c_mc.py
pandat8/GraphRL
b5b1519f6dd92b401625d51add9ae5829004a30b
[ "MIT" ]
3
2019-05-09T20:59:10.000Z
2020-05-13T14:03:50.000Z
rl/train_a2c_mc.py
pandat8/GraphRL
b5b1519f6dd92b401625d51add9ae5829004a30b
[ "MIT" ]
3
2018-08-13T20:43:29.000Z
2020-05-13T14:00:57.000Z
import torch import torch.optim as optm import torch.nn.functional as F import numpy as np from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader from data.graph import Graph from collections import namedtuple SavedAction = namedtuple('SavedAction', ['log_prob', 'value_current']) # Mont...
47.961538
172
0.520907
import torch import torch.optim as optm import torch.nn.functional as F import numpy as np from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader from data.graph import Graph from collections import namedtuple SavedAction = namedtuple('SavedAction', ['log_prob', 'value_current']) class ...
true
true
f71774d3bb18a2b3e70569ab8a10dcf140e26e81
5,989
py
Python
submit_data.py
dimagi/submission_api_example
266eb36c6ef6b331ea894298cbacfd2752410f80
[ "Apache-2.0" ]
null
null
null
submit_data.py
dimagi/submission_api_example
266eb36c6ef6b331ea894298cbacfd2752410f80
[ "Apache-2.0" ]
1
2021-12-06T20:29:54.000Z
2021-12-13T20:32:37.000Z
submit_data.py
dimagi/submission_api_example
266eb36c6ef6b331ea894298cbacfd2752410f80
[ "Apache-2.0" ]
1
2021-12-06T20:27:00.000Z
2021-12-06T20:27:00.000Z
#!/usr/bin/env python3 """ An example script to send data to CommCare using the Submission API Usage: $ export CCHQ_PROJECT_SPACE=my-project-space $ export CCHQ_CASE_TYPE=person $ export CCHQ_USERNAME=user@example.com $ export CCHQ_PASSWORD=MijByG_se3EcKr.t $ export CCHQ_USER_ID=c0ffeeeeeb574eb8b5...
29.357843
79
0.646185
FORM_XMLNS = 'http://example.com/submission-api-example-form/' DEVICE_ID = "submission_api_example" import csv import os import sys import uuid from dataclasses import dataclass from datetime import datetime, timezone from http.client import responses as http_responses from typing import Any, Iterable, List, Optio...
true
true
f717755be13370d96e8eff2b66e83a3b18716be8
515
py
Python
setup.py
Krozark/meteofrance-py
7328a857022f263d1609c939851f612c5ed13d08
[ "MIT" ]
null
null
null
setup.py
Krozark/meteofrance-py
7328a857022f263d1609c939851f612c5ed13d08
[ "MIT" ]
null
null
null
setup.py
Krozark/meteofrance-py
7328a857022f263d1609c939851f612c5ed13d08
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='krozark-meteofrance', version='0.3.9', description = 'Meteo-France weather forecast', author = 'victorcerutti', author_email = 'maxime.barbier1991+meteofrance@gmail.com', url = 'https://github.com/Krozark/meteofrance-py', packages=['meteofrance',], ...
27.105263
85
0.664078
from setuptools import setup setup( name='krozark-meteofrance', version='0.3.9', description = 'Meteo-France weather forecast', author = 'victorcerutti', author_email = 'maxime.barbier1991+meteofrance@gmail.com', url = 'https://github.com/Krozark/meteofrance-py', packages=['meteofrance',], ...
true
true
f7177676b64b016a2006776e619b093446b0ff41
5,353
py
Python
test/language/choice_types/python/UInt64ParamChoiceTest.py
PeachOS/zserio
ea01f6906c125a6baab7e8ed865eeb08cd46c37c
[ "BSD-3-Clause" ]
2
2019-02-06T17:50:24.000Z
2019-11-20T16:51:34.000Z
test/language/choice_types/python/UInt64ParamChoiceTest.py
PeachOS/zserio
ea01f6906c125a6baab7e8ed865eeb08cd46c37c
[ "BSD-3-Clause" ]
1
2019-11-25T16:25:51.000Z
2019-11-25T18:09:39.000Z
test/language/choice_types/python/UInt64ParamChoiceTest.py
PeachOS/zserio
ea01f6906c125a6baab7e8ed865eeb08cd46c37c
[ "BSD-3-Clause" ]
null
null
null
import unittest import zserio from testutils import getZserioApi class UInt64ParamChoiceTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.api = getZserioApi(__file__, "choice_types.zs").uint64_param_choice def testSelectorConstructor(self): uint64ParamChoice = self.api.UInt64...
40.862595
86
0.721838
import unittest import zserio from testutils import getZserioApi class UInt64ParamChoiceTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.api = getZserioApi(__file__, "choice_types.zs").uint64_param_choice def testSelectorConstructor(self): uint64ParamChoice = self.api.UInt64...
true
true
f717772bd33c93521c158ce38b78042fe52c2ff5
52
py
Python
subjects/__init__.py
ankit0tech/Research-Productivity-Tool
c08e39daaaa8dfa08f5eb2607986d9f6bf9f02fa
[ "MIT" ]
1
2021-12-12T04:54:05.000Z
2021-12-12T04:54:05.000Z
subjects/__init__.py
ankit0tech/Research-Productivity-Tool
c08e39daaaa8dfa08f5eb2607986d9f6bf9f02fa
[ "MIT" ]
null
null
null
subjects/__init__.py
ankit0tech/Research-Productivity-Tool
c08e39daaaa8dfa08f5eb2607986d9f6bf9f02fa
[ "MIT" ]
null
null
null
default_app_config = 'subjects.apps.SubjectsConfig'
26
51
0.846154
default_app_config = 'subjects.apps.SubjectsConfig'
true
true
f71777438e6b24d7bdde702a1788bd674bd9b0a3
589
py
Python
Appium_learning/02_ChangeApp.py
yeyuning1/AutoTT
1ce88e9e73d71fa11d4d8ad12bd6741aa71f97d2
[ "MIT" ]
null
null
null
Appium_learning/02_ChangeApp.py
yeyuning1/AutoTT
1ce88e9e73d71fa11d4d8ad12bd6741aa71f97d2
[ "MIT" ]
1
2021-06-02T00:24:41.000Z
2021-06-02T00:24:41.000Z
Appium_learning/02_ChangeApp.py
yeyuning1/AutoTT
1ce88e9e73d71fa11d4d8ad12bd6741aa71f97d2
[ "MIT" ]
null
null
null
import time from appium import webdriver from Appium_learning import app_settings driver = webdriver.Remote('http://localhost:4723/wd/hub', app_settings.desired_caps) print(driver.current_package) print(driver.current_activity) print(driver.context) time.sleep(5) # adb shell dumpsys window windows | findstr(grep) mFo...
31
95
0.814941
import time from appium import webdriver from Appium_learning import app_settings driver = webdriver.Remote('http://localhost:4723/wd/hub', app_settings.desired_caps) print(driver.current_package) print(driver.current_activity) print(driver.context) time.sleep(5) driver.start_activity('com.android.messaging', '.ui.co...
true
true
f717798fa86a8765f50f6a661d1e837315188e97
2,151
py
Python
setup.py
deliri/ChatterBot
8d95c43371bf8b7b1a1c44f77827b239bf38dc4e
[ "BSD-3-Clause" ]
1
2021-03-06T00:28:20.000Z
2021-03-06T00:28:20.000Z
setup.py
deliri/ChatterBot
8d95c43371bf8b7b1a1c44f77827b239bf38dc4e
[ "BSD-3-Clause" ]
null
null
null
setup.py
deliri/ChatterBot
8d95c43371bf8b7b1a1c44f77827b239bf38dc4e
[ "BSD-3-Clause" ]
2
2017-05-30T02:18:30.000Z
2021-02-21T18:15:25.000Z
#!/usr/bin/env python """ ChatterBot setup file. """ from setuptools import setup # Dynamically retrieve the version information from the chatterbot module CHATTERBOT = __import__('chatterbot') VERSION = CHATTERBOT.__version__ AUTHOR = CHATTERBOT.__author__ AUTHOR_EMAIL = CHATTERBOT.__email__ URL = CHATTERBOT.__url__...
31.173913
73
0.653185
from setuptools import setup CHATTERBOT = __import__('chatterbot') VERSION = CHATTERBOT.__version__ AUTHOR = CHATTERBOT.__author__ AUTHOR_EMAIL = CHATTERBOT.__email__ URL = CHATTERBOT.__url__ DESCRIPTION = CHATTERBOT.__doc__ with open('requirements.txt') as requirements: REQUIREMENTS = requirements.readlines() ...
true
true
f71779abb101df0998a79dffc26322edc971e6e8
10,423
py
Python
seleniumbase/core/jqc_helper.py
mdmintz/seleniumspot
f5c225aa4fcd0b4124fc990e3892c36736290ce8
[ "MIT" ]
1
2015-06-17T10:16:26.000Z
2015-06-17T10:16:26.000Z
seleniumbase/core/jqc_helper.py
mdmintz/seleniumspot
f5c225aa4fcd0b4124fc990e3892c36736290ce8
[ "MIT" ]
null
null
null
seleniumbase/core/jqc_helper.py
mdmintz/seleniumspot
f5c225aa4fcd0b4124fc990e3892c36736290ce8
[ "MIT" ]
null
null
null
""" This module contains methods for opening jquery-confirm boxes. These helper methods SHOULD NOT be called directly from tests. """ from seleniumbase.fixtures import constants from seleniumbase.fixtures import js_utils form_code = """'<form align="center" action="" class="jqc_form">' + '<div class="form-group">...
33.300319
75
0.515399
from seleniumbase.fixtures import constants from seleniumbase.fixtures import js_utils form_code = """'<form align="center" action="" class="jqc_form">' + '<div class="form-group">' + '<input style="font-size:20px; background-color: #f8fdfd; ' + ' width: 84%%; border: 1px solid blue; ' + ' box-shadow:...
true
true
f71779ec19d93ec24d41da7b598913f8c5798de5
1,316
py
Python
ShowProcess.py
4a5g0030/line_follow
570e65fb62803f7f5062402a45654809b01b7aaa
[ "MIT" ]
1
2019-06-19T18:32:28.000Z
2019-06-19T18:32:28.000Z
ShowProcess.py
4a5g0030/line_follow
570e65fb62803f7f5062402a45654809b01b7aaa
[ "MIT" ]
null
null
null
ShowProcess.py
4a5g0030/line_follow
570e65fb62803f7f5062402a45654809b01b7aaa
[ "MIT" ]
null
null
null
import time import sys class ShowProcess(): # """ # 显示处理进度的类 # 调用该类相关函数即可实现处理进度的显示 # """ i = 0 # 当前的处理进度 max_steps = 0 # 总共需要处理的次数 max_arrow = 50 #进度条的长度 infoDone = 'done' # 初始化函数,需要知道总共的处理次数 def __init__(self, max_steps, infoDone = 'Done'): self.max_steps = max_steps ...
29.909091
77
0.534195
import time import sys class ShowProcess(): # 显示处理进度的类 # 调用该类相关函数即可实现处理进度的显示 # """ i = 0 max_steps = 0 max_arrow = 50 infoDone = 'done' def __init__(self, max_steps, infoDone = 'Done'): self.max_steps = max_steps self.i = 0 self.infoDone = infoDone ...
true
true
f7177a2b9fd9f213e95853d3176e200b98b80f37
1,793
py
Python
unitest/test_supermesh.py
JeremieMelo/ADEPT
f79f518197798735cb684b373e11cdcc8a80d872
[ "MIT" ]
5
2022-02-26T09:14:47.000Z
2022-03-20T22:57:06.000Z
unitest/test_supermesh.py
JeremieMelo/ADEPT
f79f518197798735cb684b373e11cdcc8a80d872
[ "MIT" ]
null
null
null
unitest/test_supermesh.py
JeremieMelo/ADEPT
f79f518197798735cb684b373e11cdcc8a80d872
[ "MIT" ]
null
null
null
''' Description: Author: Jiaqi Gu (jqgu@utexas.edu) Date: 2021-09-27 23:48:01 LastEditors: Jiaqi Gu (jqgu@utexas.edu) LastEditTime: 2022-02-26 02:22:52 ''' import torch from core.models.layers.super_mesh import super_layer_name_dict def test(): device=torch.device("cuda:0") p, q, k = 2, 2, 4 x = torch.eye(...
28.460317
110
0.644172
import torch from core.models.layers.super_mesh import super_layer_name_dict def test(): device=torch.device("cuda:0") p, q, k = 2, 2, 4 x = torch.eye(k, dtype=torch.cfloat, device=device).unsqueeze(0).repeat(q,1,1).permute(1,0,2).contiguous() sigma = torch.ones(p,q,k, device=device) arch = di...
true
true
f7177a7169c09bf58f9be260fccfe1d0276b2e83
712
py
Python
parsons/google/utitities.py
Tomiiwa/parsons
3886327c197e357ba5342603d8409774a541333b
[ "Apache-2.0" ]
3
2019-09-05T16:57:15.000Z
2019-10-01T19:56:58.000Z
parsons/google/utitities.py
Tomiiwa/parsons
3886327c197e357ba5342603d8409774a541333b
[ "Apache-2.0" ]
22
2019-09-03T13:23:37.000Z
2019-10-03T20:32:48.000Z
parsons/google/utitities.py
Tomiiwa/parsons
3886327c197e357ba5342603d8409774a541333b
[ "Apache-2.0" ]
2
2019-09-01T18:30:10.000Z
2019-10-03T20:07:46.000Z
from parsons.utilities import files from parsons.utilities import check_env import json import os def setup_google_application_credentials(app_creds, env_var_name='GOOGLE_APPLICATION_CREDENTIALS'): # Detect if app_creds is a dict, path string or json string, and if it is a # json string, then convert it to a ...
35.6
99
0.738764
from parsons.utilities import files from parsons.utilities import check_env import json import os def setup_google_application_credentials(app_creds, env_var_name='GOOGLE_APPLICATION_CREDENTIALS'): credentials = check_env.check(env_var_name, app_creds) try: if (type(credentials) is dict): ...
true
true
f7177a79f201b728ccb90ed68b5736930baa2a1a
4,126
py
Python
xsimlab/ipython.py
jvail/xarray-simlab
3e8cb81775868e3e7c6495489ba351567e0d7e42
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
48
2017-06-19T16:31:37.000Z
2021-04-26T04:42:48.000Z
xsimlab/ipython.py
jvail/xarray-simlab
3e8cb81775868e3e7c6495489ba351567e0d7e42
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
108
2017-06-26T12:22:10.000Z
2021-03-09T08:57:02.000Z
xsimlab/ipython.py
jvail/xarray-simlab
3e8cb81775868e3e7c6495489ba351567e0d7e42
[ "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
10
2017-08-11T04:56:20.000Z
2021-03-01T16:46:55.000Z
import textwrap from IPython.core.magic import Magics, magics_class, line_magic from IPython.core import magic_arguments import attr from .formatting import format_var_dims from .model import Model from .utils import variables_dict setup_template = """ import xsimlab as xs ds_in = xs.create_setup( model={model...
27.506667
86
0.574649
import textwrap from IPython.core.magic import Magics, magics_class, line_magic from IPython.core import magic_arguments import attr from .formatting import format_var_dims from .model import Model from .utils import variables_dict setup_template = """ import xsimlab as xs ds_in = xs.create_setup( model={model...
true
true
f7177b1e4046a2c4d8c4f139594073d0ad624f46
752
py
Python
api/tournaments/migrations/0002_auto_20190804_1830.py
individuo7/wololo-tournaments-api
5be6284064373e99346d39c78844e454c41c501d
[ "MIT" ]
2
2019-12-09T10:19:36.000Z
2020-01-11T11:48:41.000Z
api/tournaments/migrations/0002_auto_20190804_1830.py
individuo7/wololo-tournaments-api
5be6284064373e99346d39c78844e454c41c501d
[ "MIT" ]
null
null
null
api/tournaments/migrations/0002_auto_20190804_1830.py
individuo7/wololo-tournaments-api
5be6284064373e99346d39c78844e454c41c501d
[ "MIT" ]
null
null
null
# Generated by Django 2.2.3 on 2019-08-04 18:30 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournaments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='game', ...
28.923077
132
0.630319
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournaments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='game', name='tournament', field=mode...
true
true
f7177be77bf1953daf64f669f1516a9413569e6f
1,785
py
Python
model/contact.py
dorotan/pythontraining
13cd9d5d8b0c772951e9caf98166118e7ffa387c
[ "Apache-2.0" ]
null
null
null
model/contact.py
dorotan/pythontraining
13cd9d5d8b0c772951e9caf98166118e7ffa387c
[ "Apache-2.0" ]
null
null
null
model/contact.py
dorotan/pythontraining
13cd9d5d8b0c772951e9caf98166118e7ffa387c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'dorota' from sys import maxsize class Contact: def __init__(self, first_name=None, middle_name=None, last_name=None, nickname=None, title=None, company=None, address=None, home_number=None, mobile_number=None, work_number=None, fax=None, first_email=None, ...
38.804348
119
0.656022
__author__ = 'dorota' from sys import maxsize class Contact: def __init__(self, first_name=None, middle_name=None, last_name=None, nickname=None, title=None, company=None, address=None, home_number=None, mobile_number=None, work_number=None, fax=None, first_email=None, second_em...
true
true
f7177c158a0506efce3af2ecad52f923c731c8ea
1,903
py
Python
inference_exploration/cpu/main.py
nbortolotti/tflite-tpu-experiences
8f613e059335d1d90886282f005261917fd9cfd3
[ "Apache-2.0" ]
1
2019-12-06T12:58:33.000Z
2019-12-06T12:58:33.000Z
inference_exploration/cpu/main.py
nbortolotti/tflite-tpu-experiences
8f613e059335d1d90886282f005261917fd9cfd3
[ "Apache-2.0" ]
9
2020-10-12T13:57:32.000Z
2021-09-16T19:38:26.000Z
inference_exploration/cpu/main.py
nbortolotti/tflite-tpu-experiences
8f613e059335d1d90886282f005261917fd9cfd3
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import PIL.Image as Image import matplotlib.pylab as plt import time import tensorflow as tf import tensorflow_hub as hub from tensorflow.keras import layers os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def image_analysis(classifier, image_shape, img_array): result = classifier.predict(...
30.206349
123
0.695218
import os import numpy as np import PIL.Image as Image import matplotlib.pylab as plt import time import tensorflow as tf import tensorflow_hub as hub from tensorflow.keras import layers os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def image_analysis(classifier, image_shape, img_array): result = classifier.predict(...
true
true
f7177d19acc9ab604ff8ca8dd4f7629ce32e4671
203
py
Python
EOC/prototype/data/datasets/__init__.py
double-fire-0/SystemNoise
ab042dd54371482a18117eb13f816a7472e51590
[ "Apache-2.0" ]
null
null
null
EOC/prototype/data/datasets/__init__.py
double-fire-0/SystemNoise
ab042dd54371482a18117eb13f816a7472e51590
[ "Apache-2.0" ]
null
null
null
EOC/prototype/data/datasets/__init__.py
double-fire-0/SystemNoise
ab042dd54371482a18117eb13f816a7472e51590
[ "Apache-2.0" ]
null
null
null
from .imagenet_dataset import ImageNetDataset, RankedImageNetDataset, DecoderResizeImageNetDataset # noqa from .custom_dataset import CustomDataset # noqa from .imagnetc import ImageNet_C_Dataset
33.833333
106
0.842365
from .imagenet_dataset import ImageNetDataset, RankedImageNetDataset, DecoderResizeImageNetDataset from .custom_dataset import CustomDataset from .imagnetc import ImageNet_C_Dataset
true
true
f7177d37c526cd723adac7c722303a77bd48abdf
418
py
Python
blog/migrations/0006_auto_20220427_1014.py
ali-abbaszade/mysite
9ef1b1211bd827c178f279e69ddbf4c229c539fa
[ "MIT" ]
null
null
null
blog/migrations/0006_auto_20220427_1014.py
ali-abbaszade/mysite
9ef1b1211bd827c178f279e69ddbf4c229c539fa
[ "MIT" ]
null
null
null
blog/migrations/0006_auto_20220427_1014.py
ali-abbaszade/mysite
9ef1b1211bd827c178f279e69ddbf4c229c539fa
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-04-27 05:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20220427_1002'), ] operations = [ migrations.RemoveField( model_name='post', name='category...
19.904762
49
0.538278
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20220427_1002'), ] operations = [ migrations.RemoveField( model_name='post', name='category', ), migrations.DeleteModel( ...
true
true
f7177e32b5e25c3c506bb440f649164a5758e294
46,139
py
Python
manila/share/drivers/generic.py
vponomaryov/manila
ffe135a5b35a0964179f0dc148d569037f26a929
[ "Apache-2.0" ]
null
null
null
manila/share/drivers/generic.py
vponomaryov/manila
ffe135a5b35a0964179f0dc148d569037f26a929
[ "Apache-2.0" ]
null
null
null
manila/share/drivers/generic.py
vponomaryov/manila
ffe135a5b35a0964179f0dc148d569037f26a929
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 NetApp, 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...
44.067813
79
0.585882
import os import time from oslo_concurrency import processutils from oslo_config import cfg from oslo_log import log from oslo_utils import importutils from oslo_utils import units import retrying import six from manila.common import constants as const from manila import compute from manila import context from mani...
true
true
f7177eeda341fbfbb4601d6a8a82e1d73d1f95ba
17,754
py
Python
acg/custom_widgets/selection_widgets.py
david-fischer/Anki_CardGen
909d088ed4e98b97f65a2c896dc607941b00e4da
[ "MIT" ]
2
2021-01-11T08:59:57.000Z
2021-02-01T12:15:30.000Z
acg/custom_widgets/selection_widgets.py
david-fischer/Anki_CardGen
909d088ed4e98b97f65a2c896dc607941b00e4da
[ "MIT" ]
null
null
null
acg/custom_widgets/selection_widgets.py
david-fischer/Anki_CardGen
909d088ed4e98b97f65a2c896dc607941b00e4da
[ "MIT" ]
null
null
null
"""Implements various elements to get user selection.""" from functools import partial from kivy.animation import Animation from kivy.factory import Factory from kivy.lang import Builder from kivy.properties import ( BooleanProperty, ListProperty, NumericProperty, ObjectProperty, OptionProperty, ...
37.694268
118
0.652529
from functools import partial from kivy.animation import Animation from kivy.factory import Factory from kivy.lang import Builder from kivy.properties import ( BooleanProperty, ListProperty, NumericProperty, ObjectProperty, OptionProperty, StringProperty, ) from kivy.uix.behaviors import Butto...
true
true
f7177f17985f47452311b910b6f0dc8fb2631393
276
py
Python
packaging/setup/plugins/ovirt-engine-setup/ovirt_imageio/__init__.py
jihwahn1018/ovirt-engine
5c8a3d9a9637eefb28e4accc3cbd2b7f530d5ec9
[ "Apache-2.0" ]
347
2015-01-20T14:13:21.000Z
2022-03-31T17:53:11.000Z
packaging/setup/plugins/ovirt-engine-setup/ovirt_imageio/__init__.py
jihwahn1018/ovirt-engine
5c8a3d9a9637eefb28e4accc3cbd2b7f530d5ec9
[ "Apache-2.0" ]
128
2015-05-22T19:14:32.000Z
2022-03-31T08:11:18.000Z
packaging/setup/plugins/ovirt-engine-setup/ovirt_imageio/__init__.py
jihwahn1018/ovirt-engine
5c8a3d9a9637eefb28e4accc3cbd2b7f530d5ec9
[ "Apache-2.0" ]
202
2015-01-04T06:20:49.000Z
2022-03-08T15:30:08.000Z
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # """ovirt-imageio setup plugin.""" from otopi import util from . import config @util.export def createPlugins(context): config.Plugin(context=context)
13.142857
42
0.721014
from otopi import util from . import config @util.export def createPlugins(context): config.Plugin(context=context)
true
true
f71780030f07f5124673cea42eacb5d831327dea
543
py
Python
manage.py
arpitmisraw/Effervescence18-Website
3c510f066986af80aaced566b32c5040310d3107
[ "MIT" ]
2
2018-06-27T20:46:16.000Z
2018-08-02T11:02:26.000Z
manage.py
arpitmisraw/Effervescence18-Website
3c510f066986af80aaced566b32c5040310d3107
[ "MIT" ]
3
2020-06-05T18:15:37.000Z
2021-06-10T20:20:29.000Z
manage.py
arpitmisraw/Effervescence18-Website
3c510f066986af80aaced566b32c5040310d3107
[ "MIT" ]
1
2019-08-01T12:06:35.000Z
2019-08-01T12:06:35.000Z
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "effe_portal.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. ...
33.9375
75
0.688766
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "effe_portal.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's inst...
true
true
f71780c4b08f54dd66b5a1991c6159621e4cec1f
18,071
py
Python
test/cpython/test_audioop.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:28:45.000Z
2020-02-06T14:28:45.000Z
test/cpython/test_audioop.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
test/cpython/test_audioop.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
1
2020-02-06T14:29:00.000Z
2020-02-06T14:29:00.000Z
# expected: fail import audioop import sys import unittest import struct from test.test_support import run_unittest formats = { 1: 'b', 2: 'h', 4: 'i', } def pack(width, data): return struct.pack('=%d%s' % (len(data), formats[width]), *data) packs = { 1: lambda *data: pack(1, data), 2: lambd...
45.749367
88
0.531791
import audioop import sys import unittest import struct from test.test_support import run_unittest formats = { 1: 'b', 2: 'h', 4: 'i', } def pack(width, data): return struct.pack('=%d%s' % (len(data), formats[width]), *data) packs = { 1: lambda *data: pack(1, data), 2: lambda *data: pack(2, ...
true
true
f7178158b29d68a175b0ebeab0012d4e31f2f3e6
2,610
py
Python
boofuzz/requests/http_post.py
youngcraft/boofuzz-modbus
bfeb48345b56797b48079e0620e7b06b27085789
[ "Apache-2.0" ]
23
2018-08-11T12:12:33.000Z
2022-01-28T10:22:49.000Z
boofuzz/requests/http_post.py
ctf-fuzzer/boofuzz-modbus
bfeb48345b56797b48079e0620e7b06b27085789
[ "Apache-2.0" ]
2
2018-07-24T15:15:40.000Z
2020-07-12T13:06:56.000Z
boofuzz/requests/http_post.py
ctf-fuzzer/boofuzz-modbus
bfeb48345b56797b48079e0620e7b06b27085789
[ "Apache-2.0" ]
10
2018-04-02T13:21:36.000Z
2022-01-17T09:20:27.000Z
from boofuzz import * # All POST mimetypes that I could think of/find # List of all blocks defined here (for easy copy/paste) """ sess.connect(s_get("HTTP VERBS POST")) sess.connect(s_get("HTTP VERBS POST ALL")) sess.connect(s_get("HTTP VERBS POST REQ")) """ # Fuzz POST requests with most MIMETypes known s_initial...
23.944954
74
0.650958
from boofuzz import * s_initialize("HTTP VERBS POST ALL") s_static("POST / HTTP/1.1\r\n") s_static("Content-Type: ") s_group("mimetypes", values=[ "audio/basic", "audio/x-mpeg", "drawing/x-dwf", "graphics/x-inventor", "image/x-portable-bitmap", "message/external-body", "message/http", ...
true
true
f71781cb54b95efe9a515ff1e8acbb559ba8adb6
70,600
py
Python
pyspeckit/spectrum/readers/read_class.py
FaceThePirate/pyspeckit
734b9f81d440ca3a6db9bf68e9409dbddb52d08b
[ "MIT", "BSD-3-Clause" ]
null
null
null
pyspeckit/spectrum/readers/read_class.py
FaceThePirate/pyspeckit
734b9f81d440ca3a6db9bf68e9409dbddb52d08b
[ "MIT", "BSD-3-Clause" ]
null
null
null
pyspeckit/spectrum/readers/read_class.py
FaceThePirate/pyspeckit
734b9f81d440ca3a6db9bf68e9409dbddb52d08b
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" ------------------------ GILDAS CLASS file reader ------------------------ Read a CLASS file into an :class:`pyspeckit.spectrum.ObsBlock` """ from __future__ import print_function from six.moves import xrange from six import iteritems import six import astropy.io.fits as pyfits import numpy import numpy as np from...
42.555756
220
0.526813
from __future__ import print_function from six.moves import xrange from six import iteritems import six import astropy.io.fits as pyfits import numpy import numpy as np from numpy import pi from astropy import log from astropy import units as u import pyspeckit import sys import re try: from astropy.utils.console i...
true
true
f71781d481d127f72294f8baec04d9d74461c11a
121
py
Python
okta/models/usergroup/__init__.py
rkhleics/oktasdk-python
da8183444704c6d16831d1edd619390e9120dd70
[ "Apache-2.0" ]
1
2020-09-09T12:59:19.000Z
2020-09-09T12:59:19.000Z
okta/models/usergroup/__init__.py
torchbox/oktasdk-python
da8183444704c6d16831d1edd619390e9120dd70
[ "Apache-2.0" ]
null
null
null
okta/models/usergroup/__init__.py
torchbox/oktasdk-python
da8183444704c6d16831d1edd619390e9120dd70
[ "Apache-2.0" ]
2
2017-11-02T22:12:57.000Z
2019-09-16T08:02:23.000Z
from .UserGroup import UserGroup from .UserGroupProfile import UserGroupProfile from .UserGroupRule import UserGroupRule
30.25
46
0.876033
from .UserGroup import UserGroup from .UserGroupProfile import UserGroupProfile from .UserGroupRule import UserGroupRule
true
true
f717822d090647eb7a44dad23a51405caa178759
1,679
py
Python
stockbot/ticker/sinotrade/session.py
tanlin2013/stockbot
08322ed4d847ea9e58b091985cef5c128a694b12
[ "Apache-2.0" ]
1
2021-07-12T23:55:20.000Z
2021-07-12T23:55:20.000Z
stockbot/ticker/sinotrade/session.py
ajmal017/stockbot-7
08322ed4d847ea9e58b091985cef5c128a694b12
[ "Apache-2.0" ]
null
null
null
stockbot/ticker/sinotrade/session.py
ajmal017/stockbot-7
08322ed4d847ea9e58b091985cef5c128a694b12
[ "Apache-2.0" ]
1
2021-07-12T23:55:12.000Z
2021-07-12T23:55:12.000Z
import os import logging import pandas as pd from datetime import date from shioaji import Shioaji class Session(Shioaji): def __init__(self, simulation: bool = False, timeout: int = 10000) -> None: """ Args: simulation: timeout: Notes: The ID of test account ran...
27.983333
98
0.596784
import os import logging import pandas as pd from datetime import date from shioaji import Shioaji class Session(Shioaji): def __init__(self, simulation: bool = False, timeout: int = 10000) -> None: _person_id = f"PAPIUSER05" \ if simulation else os.environ['SINOTRADE_ID'] _passwd = "...
true
true
f71782577c5c2b9953da5e9ae6c0a019748c14b7
3,361
py
Python
src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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 ...
43.649351
107
0.650997
from .events_result_data import EventsResultData class EventsTraceResult(EventsResultData): _validation = { 'type': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'count': {'key': 'count', 'type': 'long'}, 'timestamp': {'key': 'timestamp', '...
true
true
f71782e87705531559d4a97ca72db46a973a03f6
30,692
py
Python
examples/ner/run_ner_strain.py
Tarpelite/BERT_self_training
f50ff015f0d3669b5d927a6d28d8a08201c101b6
[ "MIT" ]
null
null
null
examples/ner/run_ner_strain.py
Tarpelite/BERT_self_training
f50ff015f0d3669b5d927a6d28d8a08201c101b6
[ "MIT" ]
null
null
null
examples/ner/run_ner_strain.py
Tarpelite/BERT_self_training
f50ff015f0d3669b5d927a6d28d8a08201c101b6
[ "MIT" ]
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...
44.161151
150
0.655741
import argparse import glob import logging import os import random import numpy as np import torch from seqeval.metrics import f1_score, precision_score, recall_score from torch.nn import CrossEntropyLoss from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset from torch.utils.data.d...
true
true
f717830652b40b5662e7d5601be70f7d7dfd33fa
629
py
Python
code/LTI/Demos/Tex_matplotlib.py
chipmuenk/acoustics
c85ac95a10c09d7fa15d63b2bdb24acab89fec60
[ "MIT" ]
null
null
null
code/LTI/Demos/Tex_matplotlib.py
chipmuenk/acoustics
c85ac95a10c09d7fa15d63b2bdb24acab89fec60
[ "MIT" ]
null
null
null
code/LTI/Demos/Tex_matplotlib.py
chipmuenk/acoustics
c85ac95a10c09d7fa15d63b2bdb24acab89fec60
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 14 14:15:52 2012 Plot mit TeX-Formatierung der Labels (LaTeX muss auf dem Rechner installiert sein) """ import numpy as np from matplotlib import rc import matplotlib.pyplot as plt rc('text', usetex=True) plt.figure(1) ax = plt.axes([0.1, 0.1, 0.8, 0.7]) t = np.arange(0...
23.296296
84
0.659777
import numpy as np from matplotlib import rc import matplotlib.pyplot as plt rc('text', usetex=True) plt.figure(1) ax = plt.axes([0.1, 0.1, 0.8, 0.7]) t = np.arange(0.0, 1.0+0.01, 0.01) s = np.cos(2*2*np.pi*t)+2 plt.plot(t, s) plt.xlabel(r'\textbf{Time (s)}') plt.ylabel(r'\textit{Voltage} (mV)',fontsize=16) plt.titl...
true
true
f717831ab43bf5e60f20fa256ffdf13e2b588a99
6,871
py
Python
env/Lib/site-packages/pyttsx/drivers/dummy.py
TrinhAnBinh/covid_vir_assistant_ver_0.0.2
b4471f4894c1bc203980f06b811f63e8e8f6b3ab
[ "MIT" ]
160
2016-10-04T22:45:36.000Z
2022-02-10T06:41:56.000Z
env/Lib/site-packages/pyttsx/drivers/dummy.py
TrinhAnBinh/covid_vir_assistant_ver_0.0.2
b4471f4894c1bc203980f06b811f63e8e8f6b3ab
[ "MIT" ]
27
2016-10-04T02:45:18.000Z
2022-03-09T15:15:54.000Z
env/Lib/site-packages/pyttsx/drivers/dummy.py
TrinhAnBinh/covid_vir_assistant_ver_0.0.2
b4471f4894c1bc203980f06b811f63e8e8f6b3ab
[ "MIT" ]
58
2016-10-06T16:53:43.000Z
2021-10-21T22:17:35.000Z
''' Dummy driver that produces no output but gives all expected callbacks. Useful for testing and as a model for real drivers. Copyright (c) 2009, 2013 Peter Parente Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright n...
35.601036
85
0.625382
from ..voice import Voice import time def buildDriver(proxy): return DummyDriver(proxy) class DummyDriver(object): def __init__(self, proxy): self._proxy = proxy self._looping = False voices = [ Voice('dummy.voice1', 'John Doe', ['en-US', 'en-GB'], 'male', '...
true
true
f71785323c845db207650f7917b7bc72e98e1b96
26,982
py
Python
manila/tests/share/drivers/quobyte/test_quobyte.py
deiter/manila
ba94d20e823d2edad7e9bd01546cf1642b17d212
[ "Apache-2.0" ]
1
2019-05-06T10:33:38.000Z
2019-05-06T10:33:38.000Z
manila/tests/share/drivers/quobyte/test_quobyte.py
deiter/manila
ba94d20e823d2edad7e9bd01546cf1642b17d212
[ "Apache-2.0" ]
4
2019-05-06T11:45:17.000Z
2019-05-09T14:23:28.000Z
manila/tests/share/drivers/quobyte/test_quobyte.py
deiter/manila
ba94d20e823d2edad7e9bd01546cf1642b17d212
[ "Apache-2.0" ]
3
2019-05-03T12:32:47.000Z
2021-01-30T20:26:19.000Z
# Copyright (c) 2015 Quobyte, 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 require...
44.746269
79
0.552998
import mock from oslo_config import cfg import six from manila import context from manila import exception from manila.share import configuration as config from manila.share import driver from manila.share.drivers.quobyte import jsonrpc from manila.share.drivers.quobyte import quobyte from manila import test from man...
true
true
f7178564a143b7e9c9ec5547d04715becbaafd35
1,183
py
Python
scripts/pyqtgraph-develop/examples/MultiPlotWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/examples/MultiPlotWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/examples/MultiPlotWidget.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- ## Add path to library (just for examples; you do not need this) import initExample from scipy import random from numpy import linspace from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg from pyqtgraph import MultiPlotWidget try: from pyqtgraph.meta...
28.166667
103
0.618766
import initExample from scipy import random from numpy import linspace from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg from pyqtgraph import MultiPlotWidget try: from pyqtgraph.metaarray import * except: print("MultiPlot is only used with MetaArray for now (and you do not have the met...
true
true
f71786f5f39627c1fac7f1b3ad0367fe2a1feb53
1,888
py
Python
silk-src/src/pysilk/python/_netsa_silk.py
mjschultz/netsa-pkg
07bf4ff29a73ebc0f58e4aa27d3ad6b1dee7fc83
[ "Apache-2.0" ]
3
2018-06-01T06:55:14.000Z
2021-11-14T22:51:04.000Z
silk-src/src/pysilk/python/_netsa_silk.py
mjschultz/netsa-pkg
07bf4ff29a73ebc0f58e4aa27d3ad6b1dee7fc83
[ "Apache-2.0" ]
3
2017-07-02T17:03:34.000Z
2021-09-09T17:05:31.000Z
silk-src/src/pysilk/python/_netsa_silk.py
mjschultz/netsa-pkg
07bf4ff29a73ebc0f58e4aa27d3ad6b1dee7fc83
[ "Apache-2.0" ]
4
2017-08-14T15:42:31.000Z
2022-01-24T16:24:27.000Z
####################################################################### # Copyright (C) 2011-2020 by Carnegie Mellon University. # # @OPENSOURCE_LICENSE_START@ # See license information in ../../../LICENSE.txt # @OPENSOURCE_LICENSE_END@ # ####################################################################### ########...
31.466667
75
0.632945
from silk import ( ipv6_enabled as has_IPv6Addr, IPAddr, IPv4Addr, IPv6Addr, IPSet as ip_set, IPWildcard, TCPFlags, TCP_FIN, TCP_SYN, TCP_RST, TCP_PSH, TCP_ACK, TCP_URG, TCP_ECE, TCP_CWR, silk_version ) __version__ = "1.0" __impl_version__ = " ".join(["SiLK", silk_version()]) __all__...
true
true
f717870bb59f4f607b6c5181895c66f109cd7bcf
523
py
Python
juriscraper/opinions/united_states/state/calctapp_1st.py
EvandoBlanco/juriscraper
3d16af258620d4ba1b4827f66ef69e8a2c5a0484
[ "BSD-2-Clause" ]
228
2015-01-23T04:41:39.000Z
2022-03-30T09:52:20.000Z
juriscraper/opinions/united_states/state/calctapp_1st.py
EvandoBlanco/juriscraper
3d16af258620d4ba1b4827f66ef69e8a2c5a0484
[ "BSD-2-Clause" ]
331
2015-01-05T18:53:40.000Z
2022-03-29T23:43:30.000Z
juriscraper/opinions/united_states/state/calctapp_1st.py
EvandoBlanco/juriscraper
3d16af258620d4ba1b4827f66ef69e8a2c5a0484
[ "BSD-2-Clause" ]
84
2015-01-03T01:19:21.000Z
2022-03-01T08:09:32.000Z
# Scraper for California's First District Court of Appeal # CourtID: calctapp_1st # Court Short Name: Cal. Ct. App. from juriscraper.opinions.united_states.state import cal class Site(cal.Site): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self....
29.055556
57
0.667304
# CourtID: calctapp_1st # Court Short Name: Cal. Ct. App. from juriscraper.opinions.united_states.state import cal class Site(cal.Site): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self.__module__ self.court_code = "A" self.divi...
true
true
f71787192e7a235fa2e02fbfdcda490a79b3300e
12,258
py
Python
source/deepsecurity/models/anti_malware_computer_extension.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:09.000Z
2021-10-30T16:40:09.000Z
source/deepsecurity/models/anti_malware_computer_extension.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-07-28T20:19:03.000Z
2021-07-28T20:19:03.000Z
source/deepsecurity/models/anti_malware_computer_extension.py
felipecosta09/cloudone-workload-controltower-lifecycle
7927c84d164058b034fc872701b5ee117641f4d1
[ "Apache-2.0" ]
1
2021-10-30T16:40:02.000Z
2021-10-30T16:40:02.000Z
# coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate De...
38.186916
311
0.660548
import pprint import re import six from deepsecurity.models.computer_module_status import ComputerModuleStatus class AntiMalwareComputerExtension(object): swagger_types = { 'state': 'str', 'module_status': 'ComputerModuleStatus', 'real_time_scan_configuration_id': 'in...
true
true
f71787b41422d7fb8b33c9454081d2bd60c5fe8f
1,150
py
Python
cirq/contrib/svg/svg_test.py
lilies/Cirq
519b8b70ba4d2d92d1c034c398161ebdbd23e2e7
[ "Apache-2.0" ]
3
2020-09-26T03:56:28.000Z
2020-09-27T13:21:04.000Z
cirq/contrib/svg/svg_test.py
lilies/Cirq
519b8b70ba4d2d92d1c034c398161ebdbd23e2e7
[ "Apache-2.0" ]
1
2020-08-11T15:45:17.000Z
2020-08-11T15:45:17.000Z
cirq/contrib/svg/svg_test.py
lilies/Cirq
519b8b70ba4d2d92d1c034c398161ebdbd23e2e7
[ "Apache-2.0" ]
1
2020-04-14T15:29:29.000Z
2020-04-14T15:29:29.000Z
import pytest import numpy as np import cirq from cirq.contrib.svg import circuit_to_svg def test_svg(): a, b, c = cirq.LineQubit.range(3) svg_text = circuit_to_svg( cirq.Circuit( cirq.CNOT(a, b), cirq.CZ(b, c), cirq.SWAP(a, c), cirq.PhasedXPowGate(exp...
26.744186
80
0.6
import pytest import numpy as np import cirq from cirq.contrib.svg import circuit_to_svg def test_svg(): a, b, c = cirq.LineQubit.range(3) svg_text = circuit_to_svg( cirq.Circuit( cirq.CNOT(a, b), cirq.CZ(b, c), cirq.SWAP(a, c), cirq.PhasedXPowGate(exp...
true
true
f71788ff490545bb580c7e52b9c71e363cbb8d15
6,165
py
Python
recipes/libtool/all/test_package/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-11T03:07:13.000Z
2021-11-11T03:07:13.000Z
recipes/libtool/all/test_package/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-22T13:54:48.000Z
2021-11-22T14:09:45.000Z
recipes/libtool/all/test_package/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
null
null
null
from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools from contextlib import contextmanager import glob import os import shutil class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" test_type = "explicit" short_paths = True @prop...
40.559211
120
0.610868
from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools from contextlib import contextmanager import glob import os import shutil class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" test_type = "explicit" short_paths = True @prop...
true
true
f71789c0f44a5dca7010d4a66926c97673dff301
4,401
py
Python
models/backbone.py
playerkk/HoiTransformer
b710216d6b338863ebe9d40a96765ab52780cefa
[ "Apache-2.0" ]
107
2021-03-03T13:31:32.000Z
2022-03-31T10:59:45.000Z
models/backbone.py
playerkk/HoiTransformer
b710216d6b338863ebe9d40a96765ab52780cefa
[ "Apache-2.0" ]
37
2021-03-10T11:36:49.000Z
2022-02-22T03:58:12.000Z
models/backbone.py
playerkk/HoiTransformer
b710216d6b338863ebe9d40a96765ab52780cefa
[ "Apache-2.0" ]
19
2021-03-17T13:21:03.000Z
2022-02-09T09:48:58.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backbone modules. """ import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from util.misc import NestedTensor, is_main_p...
37.29661
113
0.656669
import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from util.misc import NestedTensor, is_main_process from .position_encoding import build_position_encoding class FrozenBatchNorm2d(torch.nn...
true
true
f7178a5f0eaaff23bb2efef24ecd4ae204c5ee9e
638
py
Python
src/django_backend_api/manage.py
Adityaraj1711/django-backend-architecture
7f3c270af0cb5dd2ebc097c7436a4958cd48ff7c
[ "MIT" ]
25
2020-04-28T19:25:28.000Z
2021-07-04T17:24:35.000Z
src/django_backend_api/manage.py
Adityaraj1711/django-backend-architecture
7f3c270af0cb5dd2ebc097c7436a4958cd48ff7c
[ "MIT" ]
13
2020-08-05T22:40:37.000Z
2022-03-12T00:24:36.000Z
src/django_backend_api/manage.py
Adityaraj1711/django-backend-architecture
7f3c270af0cb5dd2ebc097c7436a4958cd48ff7c
[ "MIT" ]
2
2020-10-29T13:10:01.000Z
2021-11-22T01:55:14.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_backend_api.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: r...
29
82
0.688088
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_backend_api.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed a...
true
true
f7178a80bd5a4eb44808ea505c773373aa6ce545
102
py
Python
example.py
CJSmekens/code-refinery-bq-1
12cf67033e82176da665156037204eb405a0f6a7
[ "Apache-2.0" ]
null
null
null
example.py
CJSmekens/code-refinery-bq-1
12cf67033e82176da665156037204eb405a0f6a7
[ "Apache-2.0" ]
2
2021-06-07T10:01:32.000Z
2021-06-07T10:10:18.000Z
example.py
CJSmekens/code-refinery-bq-1
12cf67033e82176da665156037204eb405a0f6a7
[ "Apache-2.0" ]
1
2021-06-07T09:53:19.000Z
2021-06-07T09:53:19.000Z
def add(a,b): return a + b def subtract(a,b): return a - b def product(a,b): return a * b
11.333333
18
0.558824
def add(a,b): return a + b def subtract(a,b): return a - b def product(a,b): return a * b
true
true
f7178af25c554b1c64de2dc78db065ca48b7edd5
10,521
py
Python
micro_app_sdk/model/ops_automation/job_tasks_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
micro_app_sdk/model/ops_automation/job_tasks_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
micro_app_sdk/model/ops_automation/job_tasks_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: job_tasks.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
50.581731
1,012
0.737763
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f7178bb0eb777f6aea029f4307dd32ff4cc85674
2,500
py
Python
mobilecoind/strategies/balances.py
mccobr/mobilecoin
cd7753a0aed838097b456d230151fb34e8cff034
[ "Apache-2.0" ]
2
2021-03-13T04:41:04.000Z
2021-03-13T04:42:37.000Z
mobilecoind/strategies/balances.py
mccobr/mobilecoin
cd7753a0aed838097b456d230151fb34e8cff034
[ "Apache-2.0" ]
292
2020-10-22T00:34:35.000Z
2022-03-29T09:29:14.000Z
mobilecoind/strategies/balances.py
mccobr/mobilecoin
cd7753a0aed838097b456d230151fb34e8cff034
[ "Apache-2.0" ]
1
2022-03-26T20:34:00.000Z
2022-03-26T20:34:00.000Z
#!/usr/bin/env python3 # Copyright (c) 2018-2021 The MobileCoin Foundation """ The purpose of this script is to print the balances for all keys in a given account directory. Example setup and usage: ``` python3 balances.py --key-dir ../../../target/sample_data/master/keys/ ``` """ import argparse import grpc imp...
34.246575
97
0.6156
import argparse import grpc import mobilecoind_api_pb2 import mobilecoind_api_pb2_grpc import os from accounts import connect, load_key_and_register from google.protobuf.empty_pb2 import Empty def parse_args() -> argparse.ArgumentParser: parser = argparse.ArgumentParser() parser.add_argument("--mobilecoind-...
true
true
f7178bf35043b3dda373e2b1334ac17197d12419
52,295
py
Python
Lib/test/test_posix.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
1
2018-06-21T18:21:24.000Z
2018-06-21T18:21:24.000Z
Lib/test/test_posix.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
Lib/test/test_posix.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
"Test posix functions" z test zaimportuj support # Skip these tests jeżeli there jest no posix module. posix = support.import_module('posix') zaimportuj errno zaimportuj sys zaimportuj time zaimportuj os zaimportuj platform zaimportuj pwd zaimportuj shutil zaimportuj stat zaimportuj tempfile zaimportuj unittest zaim...
41.836
120
0.604207
"Test posix functions" z test zaimportuj support posix = support.import_module('posix') zaimportuj errno zaimportuj sys zaimportuj time zaimportuj os zaimportuj platform zaimportuj pwd zaimportuj shutil zaimportuj stat zaimportuj tempfile zaimportuj unittest zaimportuj warnings _DUMMY_SYMLINK = os.path.join(tempfil...
false
true
f7178ca40551efa85c6e00fccc36031532a0273f
2,864
py
Python
DataManagement.py
DonCammne/OpenSeesPyAssistant
f380f0f2a2f3d1336320bd8d26fa5efe00a12134
[ "MIT" ]
null
null
null
DataManagement.py
DonCammne/OpenSeesPyAssistant
f380f0f2a2f3d1336320bd8d26fa5efe00a12134
[ "MIT" ]
null
null
null
DataManagement.py
DonCammne/OpenSeesPyAssistant
f380f0f2a2f3d1336320bd8d26fa5efe00a12134
[ "MIT" ]
null
null
null
""" Module with the parent abstract class DataManagement. \n Carmine Schipani, 2021 """ from abc import ABC, abstractmethod from OpenSeesPyAssistant.ErrorHandling import * import numpy as np class DataManagement(ABC): """ Abstract parent class for data management. Using the associated MATLAB class \n ...
39.232877
192
0.631634
from abc import ABC, abstractmethod from OpenSeesPyAssistant.ErrorHandling import * import numpy as np class DataManagement(ABC): def SaveData(self, f): if len(self.data[0]) != 2: raise WrongDimension() delimiter = "##############################" # 30 times # col_delimiter = "...
true
true
f7178e22c6a7b86147f3ad4e697f29a6c67dce4f
826
py
Python
final exam 2/World Tour.py
DiyanKalaydzhiev23/fundamentals---python
7fa032d9a3270648ffa383bb00dad8e51613189d
[ "MIT" ]
null
null
null
final exam 2/World Tour.py
DiyanKalaydzhiev23/fundamentals---python
7fa032d9a3270648ffa383bb00dad8e51613189d
[ "MIT" ]
null
null
null
final exam 2/World Tour.py
DiyanKalaydzhiev23/fundamentals---python
7fa032d9a3270648ffa383bb00dad8e51613189d
[ "MIT" ]
null
null
null
stops = list(input()) command = input().split(":") while command[0] != "Travel": if command[0] == "Add Stop": if 0 <= int(command[1]) < len(stops): index = int(command[1]) for letter in command[2]: stops.insert(index, letter) index += 1 elif comma...
35.913043
91
0.53632
stops = list(input()) command = input().split(":") while command[0] != "Travel": if command[0] == "Add Stop": if 0 <= int(command[1]) < len(stops): index = int(command[1]) for letter in command[2]: stops.insert(index, letter) index += 1 elif comma...
true
true
f7178e9db3fd873fbe00c6932d476c7f06e20608
3,456
py
Python
hydrus/core/HydrusExceptions.py
ReAnzu/hydrus
069f77e1941d13b3bdd969aeeffd7ae003fcb71e
[ "WTFPL" ]
1
2021-02-24T22:12:30.000Z
2021-02-24T22:12:30.000Z
hydrus/core/HydrusExceptions.py
ReAnzu/hydrus
069f77e1941d13b3bdd969aeeffd7ae003fcb71e
[ "WTFPL" ]
null
null
null
hydrus/core/HydrusExceptions.py
ReAnzu/hydrus
069f77e1941d13b3bdd969aeeffd7ae003fcb71e
[ "WTFPL" ]
null
null
null
import collections.abc import os class HydrusException( Exception ): def __str__( self ): if isinstance( self.args, collections.abc.Iterable ): s = [] for arg in self.args: try: ...
35.265306
69
0.732928
import collections.abc import os class HydrusException( Exception ): def __str__( self ): if isinstance( self.args, collections.abc.Iterable ): s = [] for arg in self.args: try: ...
true
true
f7178ea0d3c97e41fedd16e6e263162427023912
8,139
py
Python
synapse/appservice/__init__.py
mweinelt/synapse
42a9ea37e4c6ff9d91b530c40d366446b9fc2234
[ "Apache-2.0" ]
null
null
null
synapse/appservice/__init__.py
mweinelt/synapse
42a9ea37e4c6ff9d91b530c40d366446b9fc2234
[ "Apache-2.0" ]
null
null
null
synapse/appservice/__init__.py
mweinelt/synapse
42a9ea37e4c6ff9d91b530c40d366446b9fc2234
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.854626
80
0.6158
from synapse.api.constants import EventTypes import logging import re logger = logging.getLogger(__name__) class ApplicationServiceState(object): DOWN = "down" UP = "up" class AppServiceTransaction(object): def __init__(self, service, id, events): self.service = service self.id = id ...
true
true
f717904cee8dca9e6d25f6ea498b85acd973ab00
8,645
py
Python
src/extractor/make_bb_info_mats.py
lonelu/Metalprot_learning
8edb2c3e4f6ba129a409d75fd4d15ceb3a9e307b
[ "MIT" ]
null
null
null
src/extractor/make_bb_info_mats.py
lonelu/Metalprot_learning
8edb2c3e4f6ba129a409d75fd4d15ceb3a9e307b
[ "MIT" ]
null
null
null
src/extractor/make_bb_info_mats.py
lonelu/Metalprot_learning
8edb2c3e4f6ba129a409d75fd4d15ceb3a9e307b
[ "MIT" ]
null
null
null
from numpy.core.numeric import full from numpy.lib.function_base import append import prody as pr import os import numpy import matplotlib as mpl import pylab from itertools import combinations, combinations_with_replacement from docopt import docopt import itertools import pickle import sys from scipy.linalg.basic imp...
25.501475
131
0.682244
from numpy.core.numeric import full from numpy.lib.function_base import append import prody as pr import os import numpy import matplotlib as mpl import pylab from itertools import combinations, combinations_with_replacement from docopt import docopt import itertools import pickle import sys from scipy.linalg.basic imp...
true
true
f71791c60cc7fc628325ca20e013c1f715b14cbf
1,168
py
Python
openamundsen/__init__.py
openamundsen/openamundsen
2ac09eb34b0c72c84c421a0dac08d114a05b7b1c
[ "MIT" ]
3
2021-05-28T06:46:36.000Z
2021-06-14T13:39:25.000Z
openamundsen/__init__.py
openamundsen/openamundsen
2ac09eb34b0c72c84c421a0dac08d114a05b7b1c
[ "MIT" ]
22
2021-04-28T12:31:58.000Z
2022-03-09T18:29:12.000Z
openamundsen/__init__.py
openamundsen/openamundsen
2ac09eb34b0c72c84c421a0dac08d114a05b7b1c
[ "MIT" ]
1
2021-06-01T12:48:54.000Z
2021-06-01T12:48:54.000Z
from .conf import Configuration, parse_config, read_config from .model import OpenAmundsen, Model from . import constants, errors, terrain # Get version (method as used by matplotlib: https://github.com/matplotlib/matplotlib/blob/bcc1ce8461f5b6e874baaaa02ef776d0243a4abe/lib/matplotlib/__init__.py#L133-L151) def __get...
33.371429
169
0.626712
from .conf import Configuration, parse_config, read_config from .model import OpenAmundsen, Model from . import constants, errors, terrain def __getattr__(name): if name == '__version__': from pathlib import Path import setuptools_scm global __version__ root = Path(__file__).resolv...
true
true
f71791d678307a538466ef5f55e3423ce32202b3
2,431
py
Python
h2o-py/tests/testdir_jira/pyunit_NOPASS_hex_1897_glm_offset.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_jira/pyunit_NOPASS_hex_1897_glm_offset.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_jira/pyunit_NOPASS_hex_1897_glm_offset.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
1
2020-12-18T19:20:02.000Z
2020-12-18T19:20:02.000Z
import sys sys.path.insert(1, "../../") import h2o def offset_1897(ip, port): h2o.init(ip, port) print 'Checking binomial models for GLM with and without offset' print 'Import prostate dataset into H2O and R...' prostate_hex = h2o.import_frame(h2o.locate("smalldata/prostate/prostate.csv")) print ...
55.25
124
0.661456
import sys sys.path.insert(1, "../../") import h2o def offset_1897(ip, port): h2o.init(ip, port) print 'Checking binomial models for GLM with and without offset' print 'Import prostate dataset into H2O and R...' prostate_hex = h2o.import_frame(h2o.locate("smalldata/prostate/prostate.csv")) print ...
false
true
f71791e019fc01edfa394b5acc7c6d6563b6ea45
35,147
py
Python
tests/components/mqtt/test_light_json.py
jlvaillant/core
ae37f9a1d9c5067957854b3c25dcc73fe9a10bee
[ "Apache-2.0" ]
2
2019-11-20T20:56:59.000Z
2021-01-03T08:52:18.000Z
tests/components/mqtt/test_light_json.py
jlvaillant/core
ae37f9a1d9c5067957854b3c25dcc73fe9a10bee
[ "Apache-2.0" ]
2
2021-06-08T21:54:21.000Z
2022-03-12T00:37:59.000Z
tests/components/mqtt/test_light_json.py
sampou/homeassistant
6c1a5d9e5a72eed3a582457142b1db7867b6ff7b
[ "Apache-2.0" ]
1
2021-04-18T19:36:34.000Z
2021-04-18T19:36:34.000Z
"""The tests for the MQTT JSON light platform. Configuration with RGB, brightness, color temp, effect, white value and XY: light: platform: mqtt_json name: mqtt_json_light_1 state_topic: "home/rgb1" command_topic: "home/rgb1/set" brightness: true color_temp: true effect: true rgb: true white_value: ...
30.912049
88
0.583094
import json from unittest import mock from unittest.mock import patch from homeassistant.components import light from homeassistant.const import ( ATTR_ASSUMED_STATE, ATTR_SUPPORTED_FEATURES, STATE_OFF, STATE_ON, ) import homeassistant.core as ha from homeassistant.setup import async_setup_component f...
true
true
f717922d65b80aab39f063f12af29d0dc7bc2b8a
4,431
py
Python
tests/test_settings.py
lulle2007200/EasyClangComplete
55d2c47d9f1b9f2bc85e6cc6de8b92457d9bbeb6
[ "MIT" ]
648
2016-04-18T16:10:47.000Z
2022-03-30T01:48:53.000Z
tests/test_settings.py
lulle2007200/EasyClangComplete
55d2c47d9f1b9f2bc85e6cc6de8b92457d9bbeb6
[ "MIT" ]
672
2016-04-24T13:55:35.000Z
2022-03-23T06:38:42.000Z
tests/test_settings.py
lulle2007200/EasyClangComplete
55d2c47d9f1b9f2bc85e6cc6de8b92457d9bbeb6
[ "MIT" ]
130
2016-05-26T19:27:00.000Z
2022-01-15T10:24:17.000Z
"""Tests for settings.""" import sublime import imp from os import path from EasyClangComplete.tests.gui_test_wrapper import GuiTestWrapper from EasyClangComplete.plugin.settings import settings_manager from EasyClangComplete.plugin.settings import settings_storage from EasyClangComplete.plugin.utils import flag im...
35.448
75
0.612051
import sublime import imp from os import path from EasyClangComplete.tests.gui_test_wrapper import GuiTestWrapper from EasyClangComplete.plugin.settings import settings_manager from EasyClangComplete.plugin.settings import settings_storage from EasyClangComplete.plugin.utils import flag imp.reload(settings_manager)...
true
true
f71792385df7b999e78480b6b8bb47ec29d5d377
922
py
Python
arrays/countNumberOfPairsWithAbsoluteDifferenceK.py
kushvr7/High-On-DSA
d424bd48e35ebd1a588d96c1c0dcb5a9c47a0ef1
[ "MIT" ]
76
2021-12-12T08:42:20.000Z
2022-03-31T19:48:46.000Z
arrays/countNumberOfPairsWithAbsoluteDifferenceK.py
kushvr7/High-On-DSA
d424bd48e35ebd1a588d96c1c0dcb5a9c47a0ef1
[ "MIT" ]
4
2022-01-04T09:58:39.000Z
2022-03-30T17:00:39.000Z
arrays/countNumberOfPairsWithAbsoluteDifferenceK.py
kushvr7/High-On-DSA
d424bd48e35ebd1a588d96c1c0dcb5a9c47a0ef1
[ "MIT" ]
13
2021-12-12T14:44:41.000Z
2022-03-10T14:08:20.000Z
# https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/ from collections import Counter class Solution(object): # Brute Force Approach # TC : O(N # SC : O(N) def countKDifference(self, nums, k): """ :type nums: List[int] :type k: int ...
23.05
81
0.452278
from collections import Counter class Solution(object): def countKDifference(self, nums, k): count =0 for i in range(len(nums)): for j in range(i, len(nums)): if abs(nums[i]-nums[j])==k: count +=1 return count ...
true
true
f71792d21101ca8f9fdb2b92a64c021d5e816fea
28,771
py
Python
pyspark/bigdl/transform/vision/image.py
twicoder/BigDL
f065db372e1c682fa4a7903e287bba21d5f46750
[ "Apache-2.0" ]
55
2018-01-12T01:43:29.000Z
2021-03-09T02:35:56.000Z
pyspark/bigdl/transform/vision/image.py
jason-hzw/BigDL
ef4f4137965147e2bc59e41f40c4acbb50eeda97
[ "Apache-2.0" ]
4
2018-01-15T07:34:41.000Z
2018-01-16T05:46:12.000Z
pyspark/bigdl/transform/vision/image.py
jason-hzw/BigDL
ef4f4137965147e2bc59e41f40c4acbb50eeda97
[ "Apache-2.0" ]
22
2018-01-15T14:18:15.000Z
2019-12-16T18:51:33.000Z
# # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
38.310253
135
0.652184
import sys from bigdl.util.common import JavaValue from bigdl.util.common import callBigDlFunc from bigdl.util.common import * if sys.version >= '3': long = int unicode = str class FeatureTransformer(JavaValue): def __init__(self, bigdl_type="float", *args): self.value = callBigDlFunc( ...
true
true
f71793b555d90d054bf1905d45ea0235b077f075
2,312
py
Python
pyramid_debugtoolbar/panels/traceback.py
rollbar/pyramid_debugtoolbar
dab4278eb68b801b1d3e9679cf1308096c3f849f
[ "Apache-2.0" ]
null
null
null
pyramid_debugtoolbar/panels/traceback.py
rollbar/pyramid_debugtoolbar
dab4278eb68b801b1d3e9679cf1308096c3f849f
[ "Apache-2.0" ]
null
null
null
pyramid_debugtoolbar/panels/traceback.py
rollbar/pyramid_debugtoolbar
dab4278eb68b801b1d3e9679cf1308096c3f849f
[ "Apache-2.0" ]
1
2021-02-21T12:18:04.000Z
2021-02-21T12:18:04.000Z
import re from pyramid_debugtoolbar.tbtools import Traceback from pyramid_debugtoolbar.panels import DebugPanel from pyramid_debugtoolbar.utils import escape from pyramid_debugtoolbar.utils import STATIC_PATH from pyramid_debugtoolbar.utils import ROOT_ROUTE_NAME from pyramid_debugtoolbar.utils import EXC_ROUTE_NAME ...
32.111111
100
0.588668
import re from pyramid_debugtoolbar.tbtools import Traceback from pyramid_debugtoolbar.panels import DebugPanel from pyramid_debugtoolbar.utils import escape from pyramid_debugtoolbar.utils import STATIC_PATH from pyramid_debugtoolbar.utils import ROOT_ROUTE_NAME from pyramid_debugtoolbar.utils import EXC_ROUTE_NAME ...
true
true
f717942ddd2886f2dcfba64b6e7601b1de639677
571
py
Python
test/api_test.py
kuro2a/kiku
d4e6500970a20d1955f1773e0e2cfb8e2db819ba
[ "MIT" ]
2
2019-08-14T14:32:36.000Z
2019-08-15T08:28:15.000Z
test/api_test.py
kuro2a/kiku
d4e6500970a20d1955f1773e0e2cfb8e2db819ba
[ "MIT" ]
1
2019-10-02T16:35:05.000Z
2019-10-02T16:35:05.000Z
test/api_test.py
kuro2a/kiku
d4e6500970a20d1955f1773e0e2cfb8e2db819ba
[ "MIT" ]
1
2019-08-14T14:33:01.000Z
2019-08-14T14:33:01.000Z
#!/usr/bin/python3 import sys import pathlib from datetime import datetime import pytest from falcon import testing sys.path.append( str(pathlib.Path(__file__).resolve().parent) + '/../' ) import main @pytest.fixture() def client(): return testing.TestClient(main.create_service()) def test_api_version(clien...
18.419355
72
0.623468
import sys import pathlib from datetime import datetime import pytest from falcon import testing sys.path.append( str(pathlib.Path(__file__).resolve().parent) + '/../' ) import main @pytest.fixture() def client(): return testing.TestClient(main.create_service()) def test_api_version(client): doc = { ...
true
true
f7179491275351836a0592d841bc9b9fe7d43c7d
151
py
Python
src/GracefulKiller/__init__.py
MaxMaxoff/GracefulKiller
dab06ecc7573211ae7acf90e5f889e37d48a88d2
[ "MIT" ]
1
2021-10-04T09:09:12.000Z
2021-10-04T09:09:12.000Z
src/GracefulKiller/__init__.py
MaxMaxoff/GracefulKiller
dab06ecc7573211ae7acf90e5f889e37d48a88d2
[ "MIT" ]
null
null
null
src/GracefulKiller/__init__.py
MaxMaxoff/GracefulKiller
dab06ecc7573211ae7acf90e5f889e37d48a88d2
[ "MIT" ]
null
null
null
try: from GracefulKiller.GracefulKiller import GracefulKiller, Loop except: from src.GracefulKiller.GracefulKiller import GracefulKiller, Loop
30.2
70
0.821192
try: from GracefulKiller.GracefulKiller import GracefulKiller, Loop except: from src.GracefulKiller.GracefulKiller import GracefulKiller, Loop
true
true
f71794ea091735736fa90a59266f6bb2161ac032
1,897
py
Python
tests/test_test.py
yehzhang/RapidTest
2302fc10ddafba1d16ef1d7448d46c66f5a05da2
[ "MIT" ]
null
null
null
tests/test_test.py
yehzhang/RapidTest
2302fc10ddafba1d16ef1d7448d46c66f5a05da2
[ "MIT" ]
null
null
null
tests/test_test.py
yehzhang/RapidTest
2302fc10ddafba1d16ef1d7448d46c66f5a05da2
[ "MIT" ]
null
null
null
from unittest import TestCase from rapidtest import Result, Test, Case, TreeNode class TestTest(TestCase): def test_check_result(self): t = Test(list, operation=True) t.add_case(Case('append', [1], 'pop', Result(1), 'append', [2], ...
29.640625
62
0.470216
from unittest import TestCase from rapidtest import Result, Test, Case, TreeNode class TestTest(TestCase): def test_check_result(self): t = Test(list, operation=True) t.add_case(Case('append', [1], 'pop', Result(1), 'append', [2], ...
true
true
f7179508810234674ea1f3cf934a800af733803f
794
py
Python
gaphor/RAAML/modelinglanguage.py
mrmonkington/gaphor
f0fcd4deb90d24b14723840a689fac901f645a43
[ "Apache-2.0" ]
867
2018-01-09T00:19:09.000Z
2022-03-31T02:49:23.000Z
gaphor/RAAML/modelinglanguage.py
mrmonkington/gaphor
f0fcd4deb90d24b14723840a689fac901f645a43
[ "Apache-2.0" ]
790
2018-01-13T23:47:07.000Z
2022-03-31T16:04:27.000Z
gaphor/RAAML/modelinglanguage.py
sitedata/gaphor
c83eff0bd595d1a8e766a157f0268e5206eed22c
[ "Apache-2.0" ]
117
2018-01-09T02:24:49.000Z
2022-03-23T08:07:42.000Z
"""The RAAML Modeling Language module is the entrypoint for RAAML related assets.""" import gaphor.SysML.propertypages # noqa from gaphor.abc import ModelingLanguage from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolboxDefinition from gaphor.RAAML import diagramitems, raaml from gaphor.RAA...
30.538462
73
0.746851
import gaphor.SysML.propertypages from gaphor.abc import ModelingLanguage from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolboxDefinition from gaphor.RAAML import diagramitems, raaml from gaphor.RAAML.toolbox import raaml_toolbox_actions class RAAMLModelingLanguage(ModelingLanguage): ...
true
true