hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3d06b4ab911ac4dcdf7380ebba49a7d481ddeffe | 1,813 | py | Python | python/paddle/framework/__init__.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | 2 | 2020-12-09T16:09:59.000Z | 2020-12-09T16:10:02.000Z | python/paddle/framework/__init__.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | null | null | null | python/paddle/framework/__init__.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 38.574468 | 80 | 0.772201 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 0 | 0 | 0 |
5c7b170332c963d2c748af8230525d7348d1ce37 | 1,851 | py | Python | Toolkits/Discovery/meta/searx/searx/engines/translated.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | Toolkits/Discovery/meta/searx/searx/engines/translated.py | roscopecoltran/SniperKit-Core | 4600dffe1cddff438b948b6c22f586d052971e04 | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | searx/engines/translated.py | xu1991/open | 5398dab4ba669b3ca87d9fe26eb24431c45f153e | [
"CC0-1.0"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | """
MyMemory Translated
@website https://mymemory.translated.net/
@provide-api yes (https://mymemory.translated.net/doc/spec.php)
@using-api yes
@results JSON
@stable yes
@parse url, title, content
"""
import re
from sys import version_info
from searx.utils import is_valid_lang
if version_... | 26.826087 | 93 | 0.590492 | """
MyMemory Translated
@website https://mymemory.translated.net/
@provide-api yes (https://mymemory.translated.net/doc/spec.php)
@using-api yes
@results JSON
@stable yes
@parse url, title, content
"""
import re
from sys import version_info
from searx.utils import is_valid_lang
if version_... | 1,164 | 0 | 46 |
a3ad10fbcabe9ffec09099e0d17108ec8407f036 | 10,854 | py | Python | trainers/saver.py | DorTsur/dine_ndt | 3a07064b1d37da12c36e679a9b1de6a32ae42689 | [
"MIT"
] | 1 | 2022-03-29T03:09:52.000Z | 2022-03-29T03:09:52.000Z | trainers/saver.py | DorTsur/dine_ndt | 3a07064b1d37da12c36e679a9b1de6a32ae42689 | [
"MIT"
] | null | null | null | trainers/saver.py | DorTsur/dine_ndt | 3a07064b1d37da12c36e679a9b1de6a32ae42689 | [
"MIT"
] | null | null | null | import numpy as np
np.set_printoptions(formatter={'float': lambda x: "{0:0.3f}".format(x)})
import matplotlib.pyplot as plt
import tensorflow as tf
import logging
import os
from scipy.io import savemat
from scipy.stats import norm
logger = logging.getLogger("logger")
###################################
####... | 31.46087 | 129 | 0.550028 | import numpy as np
np.set_printoptions(formatter={'float': lambda x: "{0:0.3f}".format(x)})
import matplotlib.pyplot as plt
import tensorflow as tf
import logging
import os
from scipy.io import savemat
from scipy.stats import norm
logger = logging.getLogger("logger")
class Visualizer(object):
def __init__(self,... | 9,193 | 40 | 1,232 |
01663bf4078a66ec2427bcc5e0c3d8ce2b545a84 | 627 | py | Python | src/igvfd/tests/fixtures/schemas/phenotype_term.py | IGVF-DACC/igvfd | 432d711a3a245182fc797eef21580158c1a713e6 | [
"MIT"
] | 1 | 2022-01-20T23:10:34.000Z | 2022-01-20T23:10:34.000Z | src/igvfd/tests/fixtures/schemas/phenotype_term.py | IGVF-DACC/igvfd | 432d711a3a245182fc797eef21580158c1a713e6 | [
"MIT"
] | 8 | 2022-02-24T00:34:29.000Z | 2022-03-30T01:02:47.000Z | src/igvfd/tests/fixtures/schemas/phenotype_term.py | IGVF-DACC/igvfd | 432d711a3a245182fc797eef21580158c1a713e6 | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
@pytest.fixture
@pytest.fixture
| 22.392857 | 83 | 0.653907 | import pytest
@pytest.fixture
def phenotype_term_alzheimers(testapp):
item = {
'term_id': 'DOID:10652',
'term_name': 'Alzheimer\'s disease'
}
return testapp.post_json('/phenotype_term', item, status=201).json['@graph'][0]
@pytest.fixture
def phenotype_term_myocardial_infarction(testapp):... | 493 | 0 | 66 |
8c42c5b8b22563c12121d93d45b7c9495d732cda | 2,013 | py | Python | thundra/wrappers/aws_lambda/lambda_application_info_provider.py | sturmianseq/thundra-agent-python | 4cee02d790eb7b8e4dea4e2e9dcd1f67533b1c56 | [
"Apache-2.0"
] | 22 | 2018-03-05T20:02:46.000Z | 2021-04-09T12:00:18.000Z | thundra/wrappers/aws_lambda/lambda_application_info_provider.py | sturmianseq/thundra-agent-python | 4cee02d790eb7b8e4dea4e2e9dcd1f67533b1c56 | [
"Apache-2.0"
] | 13 | 2018-03-26T07:57:57.000Z | 2021-06-29T14:22:52.000Z | thundra/wrappers/aws_lambda/lambda_application_info_provider.py | thundra-io/thundra-agent-python | 448e18c17d8730c381b2e2a773782cf80c5a7cfb | [
"Apache-2.0"
] | 3 | 2021-08-07T14:19:23.000Z | 2021-12-08T15:35:40.000Z | import uuid
from thundra import constants, utils
from thundra.application.application_info_provider import ApplicationInfoProvider
| 41.9375 | 112 | 0.718828 | import uuid
from thundra import constants, utils
from thundra.application.application_info_provider import ApplicationInfoProvider
class LambdaApplicationInfoProvider(ApplicationInfoProvider):
def __init__(self):
log_stream_name = utils.get_env_variable(constants.AWS_LAMBDA_LOG_STREAM_NAME)
func... | 1,664 | 193 | 23 |
64bb519d49f3762d4ca019caf415129bc32a8609 | 1,539 | py | Python | src/spaceone/inventory/info/resource_group_info.py | xellos00/inventory | e2831f2f09b5b72623f735a186264987d41954ab | [
"Apache-2.0"
] | 9 | 2020-06-04T23:01:38.000Z | 2021-06-03T03:38:59.000Z | src/spaceone/inventory/info/resource_group_info.py | xellos00/inventory | e2831f2f09b5b72623f735a186264987d41954ab | [
"Apache-2.0"
] | 10 | 2020-08-20T01:34:30.000Z | 2022-03-14T04:59:48.000Z | src/spaceone/inventory/info/resource_group_info.py | xellos00/inventory | e2831f2f09b5b72623f735a186264987d41954ab | [
"Apache-2.0"
] | 9 | 2020-06-08T22:03:02.000Z | 2021-12-06T06:12:30.000Z | import functools
import logging
from spaceone.api.inventory.v1 import resource_group_pb2
from spaceone.core.pygrpc.message_type import *
from spaceone.core import utils
from spaceone.inventory.model.resource_group_model import ResourceGroup, Resource
__all__ = ['ResourceGroupInfo', 'ResourceGroupsInfo']
_LOGGER = log... | 34.2 | 113 | 0.665367 | import functools
import logging
from spaceone.api.inventory.v1 import resource_group_pb2
from spaceone.core.pygrpc.message_type import *
from spaceone.core import utils
from spaceone.inventory.model.resource_group_model import ResourceGroup, Resource
__all__ = ['ResourceGroupInfo', 'ResourceGroupsInfo']
_LOGGER = log... | 1,122 | 0 | 69 |
6cce9677a9e96b4643f4b6f0a83e95d7bfdc56ba | 6,825 | py | Python | train.py | WANNA959/TrafficPrediction | 33d350f2d2ccbb9481d453d204e8c087aa493887 | [
"MIT"
] | null | null | null | train.py | WANNA959/TrafficPrediction | 33d350f2d2ccbb9481d453d204e8c087aa493887 | [
"MIT"
] | null | null | null | train.py | WANNA959/TrafficPrediction | 33d350f2d2ccbb9481d453d204e8c087aa493887 | [
"MIT"
] | 1 | 2021-01-06T18:28:01.000Z | 2021-01-06T18:28:01.000Z | """
Train the NN model.
"""
import sys
import _thread
import keras
import warnings
import argparse
import numpy as np
import pandas as pd
from data.data import process_data
from model import model
from keras.models import Model
from keras.callbacks import EarlyStopping
from tkinter import ttk, filedialog, dialog
import... | 32.655502 | 134 | 0.651868 | """
Train the NN model.
"""
import sys
import _thread
import keras
import warnings
import argparse
import numpy as np
import pandas as pd
from data.data import process_data
from model import model
from keras.models import Model
from keras.callbacks import EarlyStopping
from tkinter import ttk, filedialog, dialog
import... | 4,602 | 0 | 68 |
7b3254d16854448bd39eb2e66be0671a02da0391 | 181 | py | Python | alg/ganite/ganite/utils/random.py | DaraOrange/mlforhealthlabpub | 9db861c850c94c6cf1f8bf75ed2ad8dcbd648aa3 | [
"BSD-3-Clause"
] | 171 | 2021-02-12T10:23:19.000Z | 2022-03-29T01:58:52.000Z | alg/ganite/ganite/utils/random.py | DaraOrange/mlforhealthlabpub | 9db861c850c94c6cf1f8bf75ed2ad8dcbd648aa3 | [
"BSD-3-Clause"
] | 4 | 2021-06-01T08:18:33.000Z | 2022-02-20T13:37:30.000Z | alg/ganite/ganite/utils/random.py | DaraOrange/mlforhealthlabpub | 9db861c850c94c6cf1f8bf75ed2ad8dcbd648aa3 | [
"BSD-3-Clause"
] | 93 | 2021-02-10T03:21:59.000Z | 2022-03-30T19:10:37.000Z | # stdlib
import random
# third party
import numpy as np
import torch
| 13.923077 | 42 | 0.712707 | # stdlib
import random
# third party
import numpy as np
import torch
def enable_reproducible_results() -> None:
np.random.seed(0)
torch.manual_seed(0)
random.seed(0)
| 87 | 0 | 23 |
bb5c3f9685695758521bbfa22ed771d05a96abe2 | 925 | py | Python | tests/test_utils.py | awoods/fcrepo-import-export-verify | 40126e69542d039bd52f338ec24bb6975c4939dd | [
"Apache-2.0"
] | 5 | 2017-12-05T17:57:00.000Z | 2018-08-22T18:11:24.000Z | tests/test_utils.py | awoods/fcrepo-import-export-verify | 40126e69542d039bd52f338ec24bb6975c4939dd | [
"Apache-2.0"
] | 31 | 2016-11-09T14:52:16.000Z | 2017-09-07T15:10:53.000Z | tests/test_utils.py | awoods/fcrepo-import-export-verify | 40126e69542d039bd52f338ec24bb6975c4939dd | [
"Apache-2.0"
] | 4 | 2016-11-08T18:54:47.000Z | 2017-05-17T12:47:15.000Z | from fcrepo_verify.utils import get_data_dir, replace_strings_in_file
from fcrepo_verify.constants import BAG_DATA_DIR
import os
import tempfile
config = MockConfig({})
config.dir = "/tmp"
| 23.717949 | 69 | 0.687568 | from fcrepo_verify.utils import get_data_dir, replace_strings_in_file
from fcrepo_verify.constants import BAG_DATA_DIR
import os
import tempfile
class MockConfig(dict):
pass
config = MockConfig({})
config.dir = "/tmp"
def test_get_data_dir():
config.bag = False
data_dir = get_data_dir(config)
asse... | 627 | 11 | 92 |
3bccb8316bd9339d883fc7862dee4e461aeb65f2 | 7,813 | py | Python | phi/vis/_dash/board.py | marc-gav/PhiFlow | b6186fd1503d040997b52d49aa18cd875267c27e | [
"MIT"
] | 556 | 2019-12-04T16:48:54.000Z | 2022-03-31T16:31:59.000Z | phi/vis/_dash/board.py | marc-gav/PhiFlow | b6186fd1503d040997b52d49aa18cd875267c27e | [
"MIT"
] | 26 | 2019-12-12T16:54:06.000Z | 2022-03-14T19:44:36.000Z | phi/vis/_dash/board.py | marc-gav/PhiFlow | b6186fd1503d040997b52d49aa18cd875267c27e | [
"MIT"
] | 93 | 2019-12-08T14:38:27.000Z | 2022-03-29T16:38:37.000Z | import logging
import os
import traceback
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Output, Input
from dash.exceptions import PreventUpdate
from plotly import graph_objects
from .dash_app import DashApp
from ._plotly_plots import plot_scalars
from .player_con... | 42.461957 | 230 | 0.644823 | import logging
import os
import traceback
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Output, Input
from dash.exceptions import PreventUpdate
from plotly import graph_objects
from .dash_app import DashApp
from ._plotly_plots import plot_scalars
from .player_con... | 6,931 | 0 | 115 |
0d2754b160457013efda332fcce1032bc1173de1 | 3,570 | py | Python | bootstrap.py | Jselvam/Unique-files-generator | d4a5a58d89e3fd121b75e2b928c3aea81ed123b3 | [
"MIT"
] | null | null | null | bootstrap.py | Jselvam/Unique-files-generator | d4a5a58d89e3fd121b75e2b928c3aea81ed123b3 | [
"MIT"
] | null | null | null | bootstrap.py | Jselvam/Unique-files-generator | d4a5a58d89e3fd121b75e2b928c3aea81ed123b3 | [
"MIT"
] | null | null | null | from flask import Flask
from filesbuilder import FilesBuilder
from inputoutput import IO
#writeExcelFile
if __name__ == '__main__':
App = Bootstrap()
App.run() | 42 | 109 | 0.606723 | from flask import Flask
from filesbuilder import FilesBuilder
from inputoutput import IO
class Bootstrap:
def __init__(self, request, response):
self.request = request
self.response = response
self.response['logs_messages'].append('File builder initiated...\n')
self.file_builder =... | 3,300 | -5 | 104 |
3ec370bafd4b644cefa70981a0e9399f121e7a3a | 6,874 | py | Python | tests/test_emfetch.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 10 | 2016-08-26T18:57:28.000Z | 2021-09-19T19:21:16.000Z | tests/test_emfetch.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 1 | 2015-01-08T19:54:54.000Z | 2015-01-09T01:24:17.000Z | tests/test_emfetch.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 3 | 2015-01-08T23:32:58.000Z | 2016-09-23T02:38:26.000Z | """
Ax_Metrics - Test io.emfetch package
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------------------------
import pytest
impo... | 39.056818 | 94 | 0.610852 | """
Ax_Metrics - Test io.emfetch package
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------------------------
import pytest
impo... | 5,596 | 0 | 405 |
6b2eda2f899d72071839a00f76cb956aa9624cbe | 269 | py | Python | ex28.py | FernandaMakiHirose/programas-jupyter | 40ebfc820fefceb14293715104641ef184acfff4 | [
"MIT"
] | null | null | null | ex28.py | FernandaMakiHirose/programas-jupyter | 40ebfc820fefceb14293715104641ef184acfff4 | [
"MIT"
] | null | null | null | ex28.py | FernandaMakiHirose/programas-jupyter | 40ebfc820fefceb14293715104641ef184acfff4 | [
"MIT"
] | 1 | 2021-06-09T22:33:11.000Z | 2021-06-09T22:33:11.000Z | # Importando apenas uma funcionalidade da biblioteca - peça a raiz quadrada de um número e arredonde ele para cima.
from math import sqrt, ceil
n = float(input('Digite um número para ver a sua raiz quadrada: '))
print('A raiz quadrada de {} é {}' .format(n, sqrt(n)))
| 44.833333 | 115 | 0.728625 | # Importando apenas uma funcionalidade da biblioteca - peça a raiz quadrada de um número e arredonde ele para cima.
from math import sqrt, ceil
n = float(input('Digite um número para ver a sua raiz quadrada: '))
print('A raiz quadrada de {} é {}' .format(n, sqrt(n)))
| 0 | 0 | 0 |
4edcff1838d61f9aaf382ed08fc5c25c6cbf4f93 | 1,154 | py | Python | tests/test_string_operations.py | nathfroech/flake8_pylint_comparison | 1f6d5063b3055687e880b5b436346ce4b5ae95da | [
"MIT"
] | null | null | null | tests/test_string_operations.py | nathfroech/flake8_pylint_comparison | 1f6d5063b3055687e880b5b436346ce4b5ae95da | [
"MIT"
] | null | null | null | tests/test_string_operations.py | nathfroech/flake8_pylint_comparison | 1f6d5063b3055687e880b5b436346ce4b5ae95da | [
"MIT"
] | null | null | null | import pytest
from hamcrest import assert_that, contains_inanyorder
from tests.testing_utils import param_wrapper, run_flake8, run_pylint
strip_params = [
# code, flake8 rules, pylint rules
param_wrapper("s.strip('abca')", {'B005'}, set(), id='strip_string'),
param_wrapper(r"s.strip(r'\n\t ')", {'B005'}, ... | 44.384615 | 103 | 0.730503 | import pytest
from hamcrest import assert_that, contains_inanyorder
from tests.testing_utils import param_wrapper, run_flake8, run_pylint
strip_params = [
# code, flake8 rules, pylint rules
param_wrapper("s.strip('abca')", {'B005'}, set(), id='strip_string'),
param_wrapper(r"s.strip(r'\n\t ')", {'B005'}, ... | 381 | 0 | 22 |
640dcfd22c816c6be0a699e8918f42f1b1b5baa7 | 1,096 | py | Python | tapis_cli/commands/taccapis/v2/profiles/show.py | bpachev/tapis-cli | c3128fb5b63ef74e06b737bbd95ef28fb24f0d32 | [
"BSD-3-Clause"
] | 8 | 2020-10-18T22:48:23.000Z | 2022-01-10T09:16:14.000Z | tapis_cli/commands/taccapis/v2/profiles/show.py | bpachev/tapis-cli | c3128fb5b63ef74e06b737bbd95ef28fb24f0d32 | [
"BSD-3-Clause"
] | 238 | 2019-09-04T14:37:54.000Z | 2020-04-15T16:24:24.000Z | tapis_cli/commands/taccapis/v2/profiles/show.py | bpachev/tapis-cli | c3128fb5b63ef74e06b737bbd95ef28fb24f0d32 | [
"BSD-3-Clause"
] | 5 | 2019-09-20T04:23:49.000Z | 2020-01-16T17:45:14.000Z | from tapis_cli.display import Verbosity
from tapis_cli.clients.services.mixins import Username
from . import API_NAME, SERVICE_VERSION
from .models import Profile
from .formatters import ProfilesFormatOne
__all__ = ['ProfilesShow']
| 31.314286 | 64 | 0.708029 | from tapis_cli.display import Verbosity
from tapis_cli.clients.services.mixins import Username
from . import API_NAME, SERVICE_VERSION
from .models import Profile
from .formatters import ProfilesFormatOne
__all__ = ['ProfilesShow']
class ProfilesShow(ProfilesFormatOne, Username):
HELP_STRING = 'Show details fo... | 621 | 217 | 23 |
f29230d1f98fa0a6b8a41d157909690cafaca5d2 | 1,546 | py | Python | tests/apps/aspect_rendering.py | T4rk1n/dazzler | 69c49422dc19c910445ab265b1d3481041de8f43 | [
"MIT"
] | 15 | 2019-12-19T11:57:30.000Z | 2021-11-15T23:34:41.000Z | tests/apps/aspect_rendering.py | T4rk1n/dazzler | 69c49422dc19c910445ab265b1d3481041de8f43 | [
"MIT"
] | 196 | 2019-09-21T15:10:14.000Z | 2022-03-31T11:07:48.000Z | tests/apps/aspect_rendering.py | jbampton/dazzler | 4018f6cbcb55a9f482cb5c5cbf6a06b063c15e21 | [
"MIT"
] | 7 | 2019-10-30T19:38:15.000Z | 2021-12-01T04:54:16.000Z | from dazzler import Dazzler
from dazzler.components import core
from dazzler.system import Page, BindingContext, Trigger
from tests.components import spec_components as spec
app = Dazzler(__name__)
aspect_types = {
'array': {
'value': [1, 2, 3],
'json': True,
},
'bool': {
'value':... | 20.891892 | 69 | 0.556921 | from dazzler import Dazzler
from dazzler.components import core
from dazzler.system import Page, BindingContext, Trigger
from tests.components import spec_components as spec
app = Dazzler(__name__)
aspect_types = {
'array': {
'value': [1, 2, 3],
'json': True,
},
'bool': {
'value':... | 218 | 0 | 23 |
5005040f66f1a18691ae929607bcca93f50ed8de | 100 | py | Python | graphene_django/forms/types.py | radekwlsk/graphene-django | b552dcac24364d3ef824f865ba419c74605942b2 | [
"MIT"
] | 2 | 2021-06-14T20:01:22.000Z | 2022-01-07T12:56:53.000Z | graphene_django/forms/types.py | radekwlsk/graphene-django | b552dcac24364d3ef824f865ba419c74605942b2 | [
"MIT"
] | 16 | 2019-01-03T15:21:49.000Z | 2020-12-11T15:11:35.000Z | graphene_django/forms/types.py | radekwlsk/graphene-django | b552dcac24364d3ef824f865ba419c74605942b2 | [
"MIT"
] | 2 | 2021-04-12T18:16:00.000Z | 2021-06-26T05:01:18.000Z | import graphene
from ..types import ErrorType # noqa Import ErrorType for backwards compatability
| 25 | 82 | 0.82 | import graphene
from ..types import ErrorType # noqa Import ErrorType for backwards compatability
| 0 | 0 | 0 |
2b879ac647f07fe391553bcd79a30bc6e3c48f35 | 313 | py | Python | Snippets/segment_access.py | derwind/GlyphsScripts | 37934072b02850b2b84654ed312d75834729f78e | [
"Apache-2.0"
] | null | null | null | Snippets/segment_access.py | derwind/GlyphsScripts | 37934072b02850b2b84654ed312d75834729f78e | [
"Apache-2.0"
] | null | null | null | Snippets/segment_access.py | derwind/GlyphsScripts | 37934072b02850b2b84654ed312d75834729f78e | [
"Apache-2.0"
] | null | null | null | #MenuTitle: Access to segments
# -*- coding: utf-8 -*-
from GlyphsApp.plugins import *
g = Glyphs.font.selectedLayers[0].parent
paths = Glyphs.font.selectedLayers[0].paths
for path in paths:
segments = path.segments
for segment in segments:
print type(segment.points[0]), dir(segment.points[0])
| 26.083333 | 61 | 0.709265 | #MenuTitle: Access to segments
# -*- coding: utf-8 -*-
from GlyphsApp.plugins import *
g = Glyphs.font.selectedLayers[0].parent
paths = Glyphs.font.selectedLayers[0].paths
for path in paths:
segments = path.segments
for segment in segments:
print type(segment.points[0]), dir(segment.points[0])
| 0 | 0 | 0 |
7b50dca36fc41d2437703a4e15155b9083cd3728 | 3,280 | py | Python | Backend/grades_lambda.py | klmahesh/PennGrader | 58cd3ccd6dcd85df0e5438ccf8aad6640033100b | [
"MIT"
] | null | null | null | Backend/grades_lambda.py | klmahesh/PennGrader | 58cd3ccd6dcd85df0e5438ccf8aad6640033100b | [
"MIT"
] | null | null | null | Backend/grades_lambda.py | klmahesh/PennGrader | 58cd3ccd6dcd85df0e5438ccf8aad6640033100b | [
"MIT"
] | null | null | null | import sys
sys.path.append('/opt')
import os
import boto3
import json
import dill
import ast
import base64
import shutil
import time
import pandas as pd
from boto3 import resource
from boto3.dynamodb.conditions import Key, Attr
# Dynamo Config
dynamo_resource = resource('dynamodb')
dynamo = boto3.client('dynamodb')... | 31.238095 | 114 | 0.674085 | import sys
sys.path.append('/opt')
import os
import boto3
import json
import dill
import ast
import base64
import shutil
import time
import pandas as pd
from boto3 import resource
from boto3.dynamodb.conditions import Key, Attr
# Dynamo Config
dynamo_resource = resource('dynamodb')
dynamo = boto3.client('dynamodb')... | 2,498 | 0 | 182 |
4c1e149556d19e3e9a842ee6ad6ef634ab661f77 | 4,900 | py | Python | src/clusterfuzz/_internal/tests/appengine/libs/crash_access_test.py | mspectorgoogle/clusterfuzz | 44df69cbcb94efc212f27758d45d6ff0f36061e5 | [
"Apache-2.0"
] | 5,023 | 2019-02-07T16:57:56.000Z | 2022-03-31T01:08:05.000Z | src/clusterfuzz/_internal/tests/appengine/libs/crash_access_test.py | mspectorgoogle/clusterfuzz | 44df69cbcb94efc212f27758d45d6ff0f36061e5 | [
"Apache-2.0"
] | 2,303 | 2019-02-07T17:36:36.000Z | 2022-03-31T15:44:38.000Z | src/clusterfuzz/_internal/tests/appengine/libs/crash_access_test.py | mspectorgoogle/clusterfuzz | 44df69cbcb94efc212f27758d45d6ff0f36061e5 | [
"Apache-2.0"
] | 564 | 2019-02-07T17:34:24.000Z | 2022-03-26T09:25:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.40458 | 80 | 0.706122 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 828 | 0 | 48 |
b79b812df3f82ca1f88577abb43ebbecffe4a810 | 25,526 | py | Python | ics/services/dataset_collection_service.py | aesuli/ics | ae6753f721f88d6f30ad9a3450feedbd9a7e20c4 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T14:32:54.000Z | 2022-03-31T14:32:54.000Z | ics/services/dataset_collection_service.py | aesuli/ics | ae6753f721f88d6f30ad9a3450feedbd9a7e20c4 | [
"BSD-3-Clause"
] | null | null | null | ics/services/dataset_collection_service.py | aesuli/ics | ae6753f721f88d6f30ad9a3450feedbd9a7e20c4 | [
"BSD-3-Clause"
] | null | null | null | import csv
import os
import shutil
from random import randint
from uuid import uuid4
import cherrypy
import numpy as np
from cherrypy.lib.static import serve_file
from ics.classifier.classifier import NO_LABEL, YES_LABEL
from ics.db.sqlalchemydb import SQLAlchemyDB, Job, ClassificationMode, LabelSource
from ics.util.... | 43.337861 | 201 | 0.595706 | import csv
import os
import shutil
from random import randint
from uuid import uuid4
import cherrypy
import numpy as np
from cherrypy.lib.static import serve_file
from ics.classifier.classifier import NO_LABEL, YES_LABEL
from ics.db.sqlalchemydb import SQLAlchemyDB, Job, ClassificationMode, LabelSource
from ics.util.... | 22,546 | 2,381 | 92 |
8c924cabffc4ee5cc8c89951f0d76a62a643767a | 7,828 | py | Python | custom_one_gallery/custom_one_gallery/report/supplier_backlog_report/supplier_backlog_report.py | AGtechnologies/custom_one_gallery | af081a8e8d81101281a54b20117c43a83e486b69 | [
"MIT"
] | null | null | null | custom_one_gallery/custom_one_gallery/report/supplier_backlog_report/supplier_backlog_report.py | AGtechnologies/custom_one_gallery | af081a8e8d81101281a54b20117c43a83e486b69 | [
"MIT"
] | null | null | null | custom_one_gallery/custom_one_gallery/report/supplier_backlog_report/supplier_backlog_report.py | AGtechnologies/custom_one_gallery | af081a8e8d81101281a54b20117c43a83e486b69 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from datetime import datetime,timedelta
from dateutil.relativedelta import relativedelta
from frappe.utils ... | 35.420814 | 470 | 0.711037 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from datetime import datetime,timedelta
from dateutil.relativedelta import relativedelta
from frappe.utils ... | 7,297 | 0 | 184 |
befe7284b3671cc89b1f93952be62824f00a39e3 | 8,595 | py | Python | graph_partitioning/partitioners/scotch/lib_scotch.py | sbarakat/algorithmshop-graph-partitioning | db575ce585e2de0df4b0d944c24777cabc2146a3 | [
"MIT"
] | 13 | 2017-03-26T13:47:51.000Z | 2021-01-29T14:01:30.000Z | graph_partitioning/partitioners/scotch/lib_scotch.py | sbarakat/algorithmshop-graph-partitioning | db575ce585e2de0df4b0d944c24777cabc2146a3 | [
"MIT"
] | null | null | null | graph_partitioning/partitioners/scotch/lib_scotch.py | sbarakat/algorithmshop-graph-partitioning | db575ce585e2de0df4b0d944c24777cabc2146a3 | [
"MIT"
] | 7 | 2017-03-21T14:01:26.000Z | 2021-07-28T10:26:42.000Z | import ctypes # used for accessing the dynamic library
import graph_partitioning.partitioners.utils as putils # used for some of the utilities functions
| 38.542601 | 259 | 0.665852 | import ctypes # used for accessing the dynamic library
import graph_partitioning.partitioners.utils as putils # used for some of the utilities functions
class LibScotch(putils.CLibInterface):
def __init__(self, libraryPath = None):
super().__init__(libraryPath=libraryPath)
def _getDefaultLibPath(self... | 7,888 | 17 | 535 |
839af60c763401f583944e34ff504a964a34c2ce | 1,055 | py | Python | tool/offline_job_info_generator.py | yamanalab/DAMCREM | 8064613b799efee1a4896b1e60488312368183ab | [
"Apache-2.0"
] | null | null | null | tool/offline_job_info_generator.py | yamanalab/DAMCREM | 8064613b799efee1a4896b1e60488312368183ab | [
"Apache-2.0"
] | null | null | null | tool/offline_job_info_generator.py | yamanalab/DAMCREM | 8064613b799efee1a4896b1e60488312368183ab | [
"Apache-2.0"
] | null | null | null | # coding: UTF-8
import sys
import os
import numpy as np
# unit is [us].
if __name__ == "__main__":
argc = len(sys.argv)
# 単位はus
dirname = sys.argv[1]
mu = int(sys.argv[2])
M = int(sys.argv[3])
N = int(sys.argv[4])
for trial in range(N):
print(run(dirname, mu, M, trial))
p... | 23.444444 | 90 | 0.566825 | # coding: UTF-8
import sys
import os
import numpy as np
# unit is [us].
def generate_dt(mu, M):
return -mu * np.log(1-np.random.random(M))
def generate(mu, M):
dt = generate_dt(mu, M)
result = np.zeros([M], dtype=np.float)
result[0] = dt[0] + 1000000
for i in range(1, M):
result[i] = res... | 657 | 0 | 69 |
be70bdf5c7d2fda78c2ae2cf24b3e324863dde56 | 174 | py | Python | encuestas/encuesta/apps.py | davidbmx/encuestas | 3a80a970fecd477e61ea0a51e4b3787226cbea19 | [
"MIT"
] | null | null | null | encuestas/encuesta/apps.py | davidbmx/encuestas | 3a80a970fecd477e61ea0a51e4b3787226cbea19 | [
"MIT"
] | null | null | null | encuestas/encuesta/apps.py | davidbmx/encuestas | 3a80a970fecd477e61ea0a51e4b3787226cbea19 | [
"MIT"
] | null | null | null | #Django
from django.apps import AppConfig
class EncuestasAppConfig(AppConfig):
"""Encuestas app config"""
name = 'encuestas.encuesta'
verbose_name = 'Encuestas' | 21.75 | 36 | 0.729885 | #Django
from django.apps import AppConfig
class EncuestasAppConfig(AppConfig):
"""Encuestas app config"""
name = 'encuestas.encuesta'
verbose_name = 'Encuestas' | 0 | 0 | 0 |
9ed73e407562b79ec431ff9e6ae1ee26f6ba03da | 402 | py | Python | PyMOTW/source/collections/collections_deque_rotate.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | PyMOTW/source/collections/collections_deque_rotate.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:52:03.000Z | 2020-07-18T04:18:01.000Z | PyMOTW/source/collections/collections_deque_rotate.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 2 | 2021-03-06T04:28:32.000Z | 2021-03-06T04:59:17.000Z | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""Manipulating the order of items in a deque.
"""
#end_pymotw_header
import collections
d = collections.deque(range(10))
print('Normal :', d)
d = collections.deque(range(10))
d.rotate(2)
print('Right rotation... | 18.272727 | 55 | 0.689055 | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""Manipulating the order of items in a deque.
"""
#end_pymotw_header
import collections
d = collections.deque(range(10))
print('Normal :', d)
d = collections.deque(range(10))
d.rotate(2)
print('Right rotation... | 0 | 0 | 0 |
eec9a49cf9c8c2f5bd04068ea05aa3b970a23638 | 4,887 | py | Python | curve_fitting/curve_fitting.py | tufts-ml/covid19-forecasting | b0e3eed6cc03a981598d8f0b7c6fe882310c710d | [
"MIT"
] | 3 | 2020-04-02T23:38:02.000Z | 2020-04-08T18:57:16.000Z | curve_fitting/curve_fitting.py | tufts-ml/covid19-forecasting | b0e3eed6cc03a981598d8f0b7c6fe882310c710d | [
"MIT"
] | 24 | 2020-04-03T13:58:28.000Z | 2021-04-27T02:12:07.000Z | curve_fitting/curve_fitting.py | tufts-ml/covid19-forecasting | b0e3eed6cc03a981598d8f0b7c6fe882310c710d | [
"MIT"
] | null | null | null | import numpy as np
import scipy
import scipy.optimize
import argparse
import sklearn.metrics
import matplotlib.pyplot as plt
import autograd.scipy
import autograd.numpy as ag_np
import autograd
import pandas as pd
## TODO:
# - Need a mapping from timesteps to dates
################## Functions for fitting data ####... | 30.166667 | 112 | 0.565173 | import numpy as np
import scipy
import scipy.optimize
import argparse
import sklearn.metrics
import matplotlib.pyplot as plt
import autograd.scipy
import autograd.numpy as ag_np
import autograd
import pandas as pd
## TODO:
# - Need a mapping from timesteps to dates
################## Functions for fitting data ####... | 1,993 | 0 | 184 |
109ba6a43658288de2594170db4de1ef331a0ed7 | 1,697 | py | Python | docs/source/proposals/np-where-override.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 6,620 | 2015-01-04T08:51:04.000Z | 2022-03-31T12:52:18.000Z | docs/source/proposals/np-where-override.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 6,457 | 2015-01-04T03:18:41.000Z | 2022-03-31T17:38:42.000Z | docs/source/proposals/np-where-override.py | auderson/numba | 3d67c9850ab56457f418cf40af6245fd9c337705 | [
"BSD-2-Clause"
] | 930 | 2015-01-25T02:33:03.000Z | 2022-03-30T14:10:32.000Z | import numpy as np
from numba.core import types
from numba.extending import overload
@overload(np.where)
def where(cond, x, y):
"""
Implement np.where().
"""
# Choose implementation based on argument types.
if isinstance(cond, types.Array):
# Array where() => return an array of the same sh... | 32.634615 | 77 | 0.475545 | import numpy as np
from numba.core import types
from numba.extending import overload
@overload(np.where)
def where(cond, x, y):
"""
Implement np.where().
"""
# Choose implementation based on argument types.
if isinstance(cond, types.Array):
# Array where() => return an array of the same sh... | 0 | 0 | 0 |
bf1d5832a330171a8f98c1fe7bacdfe8b23b8baa | 3,059 | py | Python | debug_tools.py | Obs01ete/pytorch-detection | 4af02e232b38fd202bb348e9bbe7373c7eba165b | [
"MIT"
] | 11 | 2018-07-24T09:31:19.000Z | 2021-04-07T06:20:38.000Z | debug_tools.py | Obs01ete/pytorch-detection | 4af02e232b38fd202bb348e9bbe7373c7eba165b | [
"MIT"
] | null | null | null | debug_tools.py | Obs01ete/pytorch-detection | 4af02e232b38fd202bb348e9bbe7373c7eba165b | [
"MIT"
] | 1 | 2019-07-10T05:48:15.000Z | 2019-07-10T05:48:15.000Z | import os
import cv2
import itertools
import numpy as np
def dump_images(
names, pil_images, annotations, detections, stats,
labelmap, dir):
"""
Dumps images with bbox overlays to disk.
:param names: batch of sample names
:param pil_images: batch of original PIL images
:param anno... | 37.304878 | 107 | 0.459954 | import os
import cv2
import itertools
import numpy as np
def dump_images(
names, pil_images, annotations, detections, stats,
labelmap, dir):
"""
Dumps images with bbox overlays to disk.
:param names: batch of sample names
:param pil_images: batch of original PIL images
:param anno... | 0 | 0 | 0 |
5d1fdef795f2ddcf487065b8229340dd1325c90f | 4,984 | py | Python | playhouse/tests/test_gfk.py | alexlatchford/peewee | f3795767f7b46c8b5335ea0257df2a1d269fc85b | [
"MIT"
] | 1 | 2017-04-27T15:04:48.000Z | 2017-04-27T15:04:48.000Z | playhouse/tests/test_gfk.py | alexlatchford/peewee | f3795767f7b46c8b5335ea0257df2a1d269fc85b | [
"MIT"
] | null | null | null | playhouse/tests/test_gfk.py | alexlatchford/peewee | f3795767f7b46c8b5335ea0257df2a1d269fc85b | [
"MIT"
] | 3 | 2019-02-07T04:16:40.000Z | 2021-05-02T17:07:18.000Z | from peewee import *
from playhouse.gfk import *
from playhouse.tests.base import database_initializer
from playhouse.tests.base import ModelTestCase
db = database_initializer.get_in_memory_database()
| 29.491124 | 90 | 0.57183 | from peewee import *
from playhouse.gfk import *
from playhouse.tests.base import database_initializer
from playhouse.tests.base import ModelTestCase
db = database_initializer.get_in_memory_database()
class BaseModel(Model):
class Meta:
database = db
def add_tag(self, tag):
t = Tag(tag=tag)
... | 3,376 | 1,264 | 138 |
da3ccc219e0c0291ed1548d14f91f164941b5b52 | 3,566 | py | Python | TFTStatsBot/cogs/champions.py | Bmbus/TFTStatsBot | 65da0c871c39b9b8bdabdefbcddbdff27e85fcea | [
"MIT"
] | null | null | null | TFTStatsBot/cogs/champions.py | Bmbus/TFTStatsBot | 65da0c871c39b9b8bdabdefbcddbdff27e85fcea | [
"MIT"
] | null | null | null | TFTStatsBot/cogs/champions.py | Bmbus/TFTStatsBot | 65da0c871c39b9b8bdabdefbcddbdff27e85fcea | [
"MIT"
] | null | null | null | from discord.ext import commands
import requests
from discord import Embed
from disputils import BotEmbedPaginator
| 45.139241 | 128 | 0.568144 | from discord.ext import commands
import requests
from discord import Embed
from disputils import BotEmbedPaginator
class Champions(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.BASEURL = "https://solomid-resources.s3.amazonaws.com/blitz/tft/data/champions.json"
@commands.group(n... | 150 | 3,254 | 46 |
25e8763f549dbe42f23a96b48a41e83507ebf36a | 196 | py | Python | contrib/plugins/example/cranecli_plugin_example/__init__.py | friendliai/crane-public | 6f173ebc676f888f097e1d878b600a91a1637867 | [
"Apache-2.0"
] | 2 | 2022-03-13T16:30:34.000Z | 2022-03-13T17:01:17.000Z | contrib/plugins/example/cranecli_plugin_example/__init__.py | friendliai/crane-public | 6f173ebc676f888f097e1d878b600a91a1637867 | [
"Apache-2.0"
] | 1 | 2022-03-13T16:30:20.000Z | 2022-03-13T16:30:20.000Z | contrib/plugins/example/cranecli_plugin_example/__init__.py | friendliai/crane-public | 6f173ebc676f888f097e1d878b600a91a1637867 | [
"Apache-2.0"
] | null | null | null | import typer
app = typer.Typer()
@app.callback('example_plugin')
def check_cmd_group():
"""Example plugin."""
@app.command("first_command")
def _first_command():
"""Example command."""
| 16.333333 | 31 | 0.683673 | import typer
app = typer.Typer()
@app.callback('example_plugin')
def check_cmd_group():
"""Example plugin."""
@app.command("first_command")
def _first_command():
"""Example command."""
| 0 | 0 | 0 |
8e3971f397a3ef8f4a832739b918a40f05532204 | 8,841 | py | Python | src/state_test.py | mapto/- | 532ec719c44eaad405d1bd7b339e92ecbdbe9021 | [
"MIT"
] | null | null | null | src/state_test.py | mapto/- | 532ec719c44eaad405d1bd7b339e92ecbdbe9021 | [
"MIT"
] | null | null | null | src/state_test.py | mapto/- | 532ec719c44eaad405d1bd7b339e92ecbdbe9021 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
import pytest # type: ignore
from state import Board, Piece, GameState, GameMove
import dataclasses, json
def test_2_players_board_init(monkeypatch):
"""Make sure if we have just two players in a 4 corner board for them
to be at the opposite corners instead of next to... | 29.767677 | 86 | 0.651058 | #!/usr/bin/env python3
# coding: utf-8
import pytest # type: ignore
from state import Board, Piece, GameState, GameMove
import dataclasses, json
def test_default_board_init(monkeypatch):
board = Board.create()
# Defaults asserts
assert board.players == [0, 1, 2, 3]
assert board.pieces_per_player ==... | 5,855 | 0 | 253 |
c2b3c5c10be5ab1bf07ac062a8e5b7ccb3107bd2 | 697 | py | Python | hcipy/atmosphere/__init__.py | kian1377/hcipy | f398e82797b3adbc263e9a35d9389ba7b62342f2 | [
"MIT"
] | 55 | 2018-06-29T01:13:26.000Z | 2022-03-13T09:18:06.000Z | hcipy/atmosphere/__init__.py | kian1377/hcipy | f398e82797b3adbc263e9a35d9389ba7b62342f2 | [
"MIT"
] | 121 | 2018-06-12T05:01:05.000Z | 2022-02-10T20:11:13.000Z | hcipy/atmosphere/__init__.py | kian1377/hcipy | f398e82797b3adbc263e9a35d9389ba7b62342f2 | [
"MIT"
] | 21 | 2018-07-09T11:01:29.000Z | 2022-03-15T02:47:24.000Z | __all__ = [
'MultiLayerAtmosphere',
'AtmosphericLayer',
'phase_covariance_von_karman',
'phase_structure_function_von_karman',
'power_spectral_density_von_karman',
'Cn_squared_from_fried_parameter',
'fried_parameter_from_Cn_squared',
'seeing_to_fried_parameter',
'fried_parameter_to_se... | 30.304348 | 42 | 0.790531 | __all__ = [
'MultiLayerAtmosphere',
'AtmosphericLayer',
'phase_covariance_von_karman',
'phase_structure_function_von_karman',
'power_spectral_density_von_karman',
'Cn_squared_from_fried_parameter',
'fried_parameter_from_Cn_squared',
'seeing_to_fried_parameter',
'fried_parameter_to_se... | 0 | 0 | 0 |
640d992c68c2edd7b063e2365b93402278063ebb | 2,794 | py | Python | trait_documenter/module_trait_documenter.py | enthought/trait-documenter | b1da37986008d2558a0e9b13b13c7a75e7b15c7a | [
"BSD-3-Clause"
] | null | null | null | trait_documenter/module_trait_documenter.py | enthought/trait-documenter | b1da37986008d2558a0e9b13b13c7a75e7b15c7a | [
"BSD-3-Clause"
] | 18 | 2015-07-21T17:35:25.000Z | 2021-06-15T07:15:40.000Z | trait_documenter/module_trait_documenter.py | enthought/trait-documenter | b1da37986008d2558a0e9b13b13c7a75e7b15c7a | [
"BSD-3-Clause"
] | null | null | null | # ---------------------------------------------------------------------------
#
# Copyright (c) 2014, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in /LICENSE.txt and may be redistributed only
# under the conditions described in... | 34.925 | 80 | 0.6267 | # ---------------------------------------------------------------------------
#
# Copyright (c) 2014, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in /LICENSE.txt and may be redistributed only
# under the conditions described in... | 178 | 0 | 27 |
c86e3d3957b37e243483942d1307c1790c27f327 | 1,478 | py | Python | photos/views.py | TracyOgutu/PersonalGallery | e1c856b2ae97beaa9a0d863bf5577566f0561648 | [
"Unlicense"
] | null | null | null | photos/views.py | TracyOgutu/PersonalGallery | e1c856b2ae97beaa9a0d863bf5577566f0561648 | [
"Unlicense"
] | 4 | 2020-06-06T00:18:34.000Z | 2021-09-08T01:32:07.000Z | photos/views.py | TracyOgutu/PersonalGallery | e1c856b2ae97beaa9a0d863bf5577566f0561648 | [
"Unlicense"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from .models import Image
# Create your views here.
| 36.95 | 111 | 0.716509 | from django.shortcuts import render
from django.http import HttpResponse
from .models import Image
# Create your views here.
def welcome(request):
photos = Image.display_photos()
return render(request, 'welcome.html',{"photos":photos})
def singlephoto(request,photoid):
try:
singlephoto=Image.obje... | 1,261 | 0 | 91 |
443055790eec7eadaf8911fdb0558e270c1e2398 | 813 | py | Python | src/dictionaries/frequency/wordfreq/wordfreq-en.py | henge-tech/henge | 33d958cf4e170fe27c92fd6dd426558d81ba46cb | [
"MIT"
] | 2 | 2016-08-13T03:14:37.000Z | 2016-08-21T14:09:13.000Z | src/dictionaries/frequency/wordfreq/wordfreq-en.py | koseki/wordcircle | 17472c450b89fc780765dcb8228b27eb60dd6ea5 | [
"MIT"
] | 9 | 2017-09-18T08:37:47.000Z | 2022-02-26T03:35:15.000Z | src/dictionaries/frequency/wordfreq/wordfreq-en.py | koseki/wordcircle | 17472c450b89fc780765dcb8228b27eb60dd6ea5 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from wordfreq import word_frequency, iter_wordlist
import regex
iter = iter_wordlist('en', 'large')
re_nonlatin = regex.compile('[^-_\p{Latin}\d\.\']')
re_alphabet = regex.compile('[a-z]', regex.IGNORECASE)
re_underscore = regex.compile('_')
last_freq = -1
position = 0
current_line = 0
for wo... | 22.583333 | 54 | 0.635916 | #! /usr/bin/env python
from wordfreq import word_frequency, iter_wordlist
import regex
iter = iter_wordlist('en', 'large')
re_nonlatin = regex.compile('[^-_\p{Latin}\d\.\']')
re_alphabet = regex.compile('[a-z]', regex.IGNORECASE)
re_underscore = regex.compile('_')
last_freq = -1
position = 0
current_line = 0
for wo... | 0 | 0 | 0 |
f751044e28cb4bad581409c61f6d9e220bf09d27 | 3,184 | py | Python | setup.py | unicef/etools-permissions | 7a6da87c9829290af3cea458314e60dd6d1239fd | [
"Apache-2.0"
] | null | null | null | setup.py | unicef/etools-permissions | 7a6da87c9829290af3cea458314e60dd6d1239fd | [
"Apache-2.0"
] | null | null | null | setup.py | unicef/etools-permissions | 7a6da87c9829290af3cea458314e60dd6d1239fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ast
import codecs
import os.path
import re
import subprocess
import sys
from codecs import open
from distutils import log
from distutils.errors import DistutilsError
from setuptools import find_packages, setup
from setuptools.command.install import install
from setu... | 31.524752 | 139 | 0.617148 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ast
import codecs
import os.path
import re
import subprocess
import sys
from codecs import open
from distutils import log
from distutils.errors import DistutilsError
from setuptools import find_packages, setup
from setuptools.command.install import install
from setu... | 1,227 | 16 | 123 |
a29321a5dfee1bcf168d56d8a42fcfb8f629e1cb | 1,123 | py | Python | Python3/Books/Douson/chapter12/rotate_sprite.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Books/Douson/chapter12/rotate_sprite.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Books/Douson/chapter12/rotate_sprite.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | # Rotate Sprite
# Demonstrates rotating a sprite
from livewires import games
games.init(screen_width = 640, screen_height = 480, fps = 50)
class Ship(games.Sprite):
""" A rotating ship. """
def update(self):
""" Rotate based on keys pressed. """
if games.keyboard.is_pressed(games.K_RIGHT):
... | 28.794872 | 70 | 0.606411 | # Rotate Sprite
# Demonstrates rotating a sprite
from livewires import games
games.init(screen_width = 640, screen_height = 480, fps = 50)
class Ship(games.Sprite):
""" A rotating ship. """
def update(self):
""" Rotate based on keys pressed. """
if games.keyboard.is_pressed(games.K_RIGHT):
... | 346 | 0 | 24 |
0e56b0b9402261570a2145b88b4a3fc791c04b2d | 106 | py | Python | Code/data/__init__.py | SimpleLonely/DataIntegration | 7222c5fde66608a8fa68ae398c5f8116fe3776f3 | [
"MIT"
] | null | null | null | Code/data/__init__.py | SimpleLonely/DataIntegration | 7222c5fde66608a8fa68ae398c5f8116fe3776f3 | [
"MIT"
] | 2 | 2021-03-31T19:52:58.000Z | 2021-12-13T20:43:37.000Z | Code/data/__init__.py | SimpleLonely/DataIntegration | 7222c5fde66608a8fa68ae398c5f8116fe3776f3 | [
"MIT"
] | 1 | 2020-07-04T12:26:27.000Z | 2020-07-04T12:26:27.000Z | __all__ = ['get_bond_yields','get_company','get_fund','get_manager','get_stock_holders','return_rate_dao'] | 106 | 106 | 0.792453 | __all__ = ['get_bond_yields','get_company','get_fund','get_manager','get_stock_holders','return_rate_dao'] | 0 | 0 | 0 |
c5d9bcd78d1ba9621a55491bdce0f549cc198d5e | 964 | py | Python | examples/07_compare_extthiem3d_grfsteady.py | JarnoHerr/AnaFlow | a7c56cdadf90d652f80bc1e1d38d3687d0365a63 | [
"MIT"
] | null | null | null | examples/07_compare_extthiem3d_grfsteady.py | JarnoHerr/AnaFlow | a7c56cdadf90d652f80bc1e1d38d3687d0365a63 | [
"MIT"
] | null | null | null | examples/07_compare_extthiem3d_grfsteady.py | JarnoHerr/AnaFlow | a7c56cdadf90d652f80bc1e1d38d3687d0365a63 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
from anaflow import ext_thiem_3d, ext_grf_steady
from anaflow.tools.coarse_graining import K_CG
rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4]
r_ref = 2.0 # reference radius
var = 0.5 ... | 35.703704 | 107 | 0.645228 | # -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
from anaflow import ext_thiem_3d, ext_grf_steady
from anaflow.tools.coarse_graining import K_CG
rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4]
r_ref = 2.0 # reference radius
var = 0.5 ... | 0 | 0 | 0 |
25307647b0c510b3e974b4291d18d6741f2f4c90 | 5,900 | py | Python | source/analysis/analysis_controller.py | JoZimmer/ParOptBeam | 50d15d8d822a2718f2932807e06c4a7e02f866a3 | [
"BSD-3-Clause"
] | 1 | 2021-04-09T14:08:20.000Z | 2021-04-09T14:08:20.000Z | source/analysis/analysis_controller.py | JoZimmer/ParOptBeam | 50d15d8d822a2718f2932807e06c4a7e02f866a3 | [
"BSD-3-Clause"
] | 2 | 2021-04-28T15:05:01.000Z | 2021-11-10T15:12:56.000Z | source/analysis/analysis_controller.py | JoZimmer/ParOptBeam | 50d15d8d822a2718f2932807e06c4a7e02f866a3 | [
"BSD-3-Clause"
] | 2 | 2021-02-01T08:49:45.000Z | 2021-08-10T02:07:36.000Z | from os.path import join, isdir
from os import makedirs
from matplotlib.backends.backend_pdf import PdfPages
from source.model.structure_model import StraightBeam
from source.auxiliary.validate_and_assign_defaults import validate_and_assign_defaults
from source.auxiliary.other_utilities import get_adjusted_path_string... | 44.360902 | 119 | 0.589322 | from os.path import join, isdir
from os import makedirs
from matplotlib.backends.backend_pdf import PdfPages
from source.model.structure_model import StraightBeam
from source.auxiliary.validate_and_assign_defaults import validate_and_assign_defaults
from source.auxiliary.other_utilities import get_adjusted_path_string... | 4,935 | 0 | 81 |
51531174e63cb89f2b96f409e0af0903be0a85f6 | 2,339 | py | Python | trodesnetwork-0.0.9/trodesnetwork-0.0.9/trodesnetwork/trodes/digital.py | JohnLauFoo/clc_packages_Yu | 259f01d9b5c02154ce258734d519ae8995cd0991 | [
"MIT"
] | 1 | 2021-11-13T17:21:44.000Z | 2021-11-13T17:21:44.000Z | trodesnetwork-0.0.9/trodesnetwork-0.0.9/trodesnetwork/trodes/digital.py | JohnLauFoo/clc_packages_Yu | 259f01d9b5c02154ce258734d519ae8995cd0991 | [
"MIT"
] | null | null | null | trodesnetwork-0.0.9/trodesnetwork-0.0.9/trodesnetwork/trodes/digital.py | JohnLauFoo/clc_packages_Yu | 259f01d9b5c02154ce258734d519ae8995cd0991 | [
"MIT"
] | null | null | null | import trodesnetwork.socket as socket
import trodesnetwork.trodes as trodes
import threading
'''
Use this class to subscribe to analog sources
Requires input of a channel map object. The channel map is just
a JSON-like dictionary of the XML HardwareConfiguration node
in the `.trodesconfig` file.
Requires a server_a... | 33.414286 | 98 | 0.690894 | import trodesnetwork.socket as socket
import trodesnetwork.trodes as trodes
import threading
'''
Use this class to subscribe to analog sources
Requires input of a channel map object. The channel map is just
a JSON-like dictionary of the XML HardwareConfiguration node
in the `.trodesconfig` file.
Requires a server_a... | 1,359 | 159 | 173 |
29f49e0b71b6c2f444d13c431f5ac81f00bcac2b | 2,087 | py | Python | tests/resources/responsemock.py | merretbuurman/esgf-pid | df511387904ad215cd84ef29ef0c902ce6cec826 | [
"Apache-2.0"
] | null | null | null | tests/resources/responsemock.py | merretbuurman/esgf-pid | df511387904ad215cd84ef29ef0c902ce6cec826 | [
"Apache-2.0"
] | 7 | 2017-02-22T15:24:54.000Z | 2021-05-06T22:43:15.000Z | tests/resources/responsemock.py | merretbuurman/esgf-pid | df511387904ad215cd84ef29ef0c902ce6cec826 | [
"Apache-2.0"
] | 5 | 2016-08-23T08:52:00.000Z | 2020-03-25T21:28:31.000Z |
class MockRequest(object):
'''
This is a mocked Request object containing only an url,
as this is the only attribute accessed during the tests.
There is a default value for it, but it can also be passed.
'''
class MockSolrResponse(object):
'''
This is a mocked Response object (can be used ... | 35.982759 | 129 | 0.604217 |
class MockRequest(object):
'''
This is a mocked Request object containing only an url,
as this is the only attribute accessed during the tests.
There is a default value for it, but it can also be passed.
'''
def __init__(self, url=None):
if url is not None:
self.url = url
... | 1,292 | 0 | 52 |
38776c3e628fb4fa238fe4f7201f3af52af17c74 | 17,389 | py | Python | qiskit/transpiler/passes/mapping/legacy_swap.py | biplab37/qiskit-aakash | e10b204887606f1f75bdfde182bb0c6d0a322c68 | [
"Apache-2.0"
] | 22 | 2019-08-15T04:39:15.000Z | 2022-03-06T05:17:04.000Z | qiskit/transpiler/passes/mapping/legacy_swap.py | biplab37/qiskit-aakash | e10b204887606f1f75bdfde182bb0c6d0a322c68 | [
"Apache-2.0"
] | 2 | 2020-10-26T07:12:12.000Z | 2021-12-09T16:22:51.000Z | qiskit/transpiler/passes/mapping/legacy_swap.py | biplab37/qiskit-aakash | e10b204887606f1f75bdfde182bb0c6d0a322c68 | [
"Apache-2.0"
] | 9 | 2019-09-05T05:33:00.000Z | 2021-10-09T16:04:53.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 43.690955 | 98 | 0.546782 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 0 | 0 | 0 |
cc0e6a9f0ec7d82d3157a57807c5e477b2c5ecae | 616 | py | Python | src/unicon/plugins/ironware/settings.py | TestingBytes/unicon.plugins | 0600956d805deb4fd790aa3ef591c5d659e85de1 | [
"Apache-2.0"
] | 18 | 2019-11-23T23:14:53.000Z | 2022-01-10T01:17:08.000Z | src/unicon/plugins/ironware/settings.py | TestingBytes/unicon.plugins | 0600956d805deb4fd790aa3ef591c5d659e85de1 | [
"Apache-2.0"
] | 12 | 2020-11-09T20:39:25.000Z | 2022-03-22T12:46:59.000Z | src/unicon/plugins/ironware/settings.py | TestingBytes/unicon.plugins | 0600956d805deb4fd790aa3ef591c5d659e85de1 | [
"Apache-2.0"
] | 32 | 2020-02-12T15:42:22.000Z | 2022-03-15T16:42:10.000Z | """
Module:
unicon.plugins.ironware.settings
Author:
James Di Trapani <james@ditrapani.com.au> - https://github.com/jamesditrapani
Description:
Define/Override Generic Settings specific to the Ironware NOS
"""
from unicon.plugins.generic.settings import GenericSettings
__author__ = "James Di Trapani <ja... | 24.64 | 81 | 0.717532 | """
Module:
unicon.plugins.ironware.settings
Author:
James Di Trapani <james@ditrapani.com.au> - https://github.com/jamesditrapani
Description:
Define/Override Generic Settings specific to the Ironware NOS
"""
from unicon.plugins.generic.settings import GenericSettings
__author__ = "James Di Trapani <ja... | 203 | 19 | 50 |
bcfabb13a4472146d128e09dc0769e2bdd86cab1 | 1,354 | py | Python | exemples/get-leaf-location.py | RenzoF/pycarwings2 | 3fd51b4211fa39bc40b0121f7648fbcb79cab2bc | [
"Apache-2.0"
] | 1 | 2020-10-28T13:59:34.000Z | 2020-10-28T13:59:34.000Z | exemples/get-leaf-location.py | gym22/pycarwings2 | d4dfe9cd198a1207ae18ec17c8345c7e3a545a39 | [
"Apache-2.0"
] | null | null | null | exemples/get-leaf-location.py | gym22/pycarwings2 | d4dfe9cd198a1207ae18ec17c8345c7e3a545a39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#import sys
# sys.path.append('/home/ruben/leaf/pycarwings2/pycarwings2')
import pycarwings2
import time
from ConfigParser import SafeConfigParser
import logging
import sys
import pprint
logging.basicConfig(stream=sys.stdout, level=logging.ERROR)
parser = SafeConfigParser()
candidates = ['config.... | 28.208333 | 101 | 0.717134 | #!/usr/bin/python
#import sys
# sys.path.append('/home/ruben/leaf/pycarwings2/pycarwings2')
import pycarwings2
import time
from ConfigParser import SafeConfigParser
import logging
import sys
import pprint
logging.basicConfig(stream=sys.stdout, level=logging.ERROR)
parser = SafeConfigParser()
candidates = ['config.... | 0 | 0 | 0 |
6a203b222c70a6343746df7be86eaefb49d9a5b6 | 2,622 | py | Python | pypy/translator/oosupport/database.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/translator/oosupport/database.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | null | null | null | pypy/translator/oosupport/database.py | woodrow/pyoac | b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7 | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | from pypy.translator.oosupport.constant import is_primitive
from pypy.rpython.ootypesystem import ootype
| 33.615385 | 75 | 0.685736 | from pypy.translator.oosupport.constant import is_primitive
from pypy.rpython.ootypesystem import ootype
class Database(object):
def __init__(self, genoo):
self.genoo = genoo
self.cts = genoo.TypeSystem(self)
self._pending_nodes = set()
self._rendered_nodes = set()
self._un... | 388 | 2,105 | 23 |
87528d07a78c77bbc785544cc66be4a15f2c6f6b | 521 | py | Python | files/main.py | Jelaque/Topics-on-database | fd9ab659203dbd205b9e255d920b4ebc1cacd2a5 | [
"MIT"
] | null | null | null | files/main.py | Jelaque/Topics-on-database | fd9ab659203dbd205b9e255d920b4ebc1cacd2a5 | [
"MIT"
] | null | null | null | files/main.py | Jelaque/Topics-on-database | fd9ab659203dbd205b9e255d920b4ebc1cacd2a5 | [
"MIT"
] | null | null | null | from ml100k import recommenderMl100k
import time as tm
from distances import recommender
s = recommender(0)
s.readMovies()
'''
s = recommender(0,k=3,metric='manhattan')
s.readBooks()
#print(s.jaccard(s.data['Stephen'],s.data['Amy']))
print(s.ProjectedRanting('Patrick C','Scarface'))
'''
'''
r = recommenderMl100k(0,me... | 26.05 | 53 | 0.706334 | from ml100k import recommenderMl100k
import time as tm
from distances import recommender
s = recommender(0)
s.readMovies()
'''
s = recommender(0,k=3,metric='manhattan')
s.readBooks()
#print(s.jaccard(s.data['Stephen'],s.data['Amy']))
print(s.ProjectedRanting('Patrick C','Scarface'))
'''
'''
r = recommenderMl100k(0,me... | 0 | 0 | 0 |
facc083e9f0d0807df4902b88bbc45dae0e14c0e | 13,750 | py | Python | notebooks/scripts/graphs.py | mtsnel006/covid19za | 5db79ecb616041ff7980230d5995d90d6dbc86f5 | [
"MIT"
] | 266 | 2020-03-13T13:39:38.000Z | 2022-03-18T06:51:57.000Z | notebooks/scripts/graphs.py | mtsnel006/covid19za | 5db79ecb616041ff7980230d5995d90d6dbc86f5 | [
"MIT"
] | 287 | 2020-03-13T12:22:50.000Z | 2022-02-22T16:06:24.000Z | notebooks/scripts/graphs.py | mtsnel006/covid19za | 5db79ecb616041ff7980230d5995d90d6dbc86f5 | [
"MIT"
] | 263 | 2020-03-13T11:44:05.000Z | 2022-03-27T15:11:52.000Z | import os
import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
from textwrap import wrap
### NOTE: `conda install basemap`
import conda
conda_file_dir = conda.__file__
conda_dir = conda_file_dir.split('lib')[0]
proj_lib = os.path.join(os.path.join(co... | 47.250859 | 188 | 0.627564 | import os
import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
from textwrap import wrap
### NOTE: `conda install basemap`
import conda
conda_file_dir = conda.__file__
conda_dir = conda_file_dir.split('lib')[0]
proj_lib = os.path.join(os.path.join(co... | 0 | 0 | 0 |
05cf4149c5c572c18ab5076c38f9371a9b8b39cc | 855 | py | Python | lesson-04/classwork6.py | weibak/lessons | 414f030650427d7167c2e58ecb9f858c2e5edb40 | [
"BSD-3-Clause"
] | null | null | null | lesson-04/classwork6.py | weibak/lessons | 414f030650427d7167c2e58ecb9f858c2e5edb40 | [
"BSD-3-Clause"
] | null | null | null | lesson-04/classwork6.py | weibak/lessons | 414f030650427d7167c2e58ecb9f858c2e5edb40 | [
"BSD-3-Clause"
] | null | null | null | """
Вывести в порядке возрастания все простые числа, расположенные между n и m (включая сами числа n и m),
а также количество x этих чисел.
"""
start_number = int(input("Enter start number:"))
end_number = int(input("Enter end number:"))
# Generate elements from start_number to end_number (including)
my_count = 0
fo... | 29.482759 | 102 | 0.676023 | """
Вывести в порядке возрастания все простые числа, расположенные между n и m (включая сами числа n и m),
а также количество x этих чисел.
"""
start_number = int(input("Enter start number:"))
end_number = int(input("Enter end number:"))
# Generate elements from start_number to end_number (including)
my_count = 0
fo... | 0 | 0 | 0 |
537aa9bfd787ebe3ac95f20a3cad16a9e5582a19 | 1,131 | py | Python | test2.py | Atul-Anand-Jha/Email_Automation_Python | 2bd558ef4d58d2ad9e1807b227872db655dfa0bd | [
"MIT"
] | 2 | 2020-11-07T13:50:33.000Z | 2020-11-09T04:34:52.000Z | test2.py | Atul-Anand-Jha/Email-Automation-Python | 2bd558ef4d58d2ad9e1807b227872db655dfa0bd | [
"MIT"
] | null | null | null | test2.py | Atul-Anand-Jha/Email-Automation-Python | 2bd558ef4d58d2ad9e1807b227872db655dfa0bd | [
"MIT"
] | null | null | null | import pandas as pd
import smtplib
import imghdr
from email.message import EmailMessage
SenderAddress = "XYZ@gmail.com"
password = "ndXX@XX3$#XXX"
e = pd.read_excel("email.xlsx")
emails = e['Emails'].values
names = e["Names"].values
file = "banner.jpg"
msg = EmailMessage()
msg['Subject'] = "Hello world - dynamic"
msg... | 28.275 | 88 | 0.697613 | import pandas as pd
import smtplib
import imghdr
from email.message import EmailMessage
SenderAddress = "XYZ@gmail.com"
password = "ndXX@XX3$#XXX"
e = pd.read_excel("email.xlsx")
emails = e['Emails'].values
names = e["Names"].values
file = "banner.jpg"
msg = EmailMessage()
msg['Subject'] = "Hello world - dynamic"
msg... | 0 | 0 | 0 |
aa61305c266822997c121859d13f0a5ce52bfaef | 737 | py | Python | ocrd_models/ocrd_page_user_methods/set_points.py | hnesk/core | 5a79220bc31572410e705d13ca178cf284cdc9fb | [
"Apache-2.0"
] | 91 | 2018-05-23T12:52:11.000Z | 2022-03-19T20:43:49.000Z | ocrd_models/ocrd_page_user_methods/set_points.py | hnesk/core | 5a79220bc31572410e705d13ca178cf284cdc9fb | [
"Apache-2.0"
] | 636 | 2018-04-23T15:57:31.000Z | 2022-03-31T11:46:11.000Z | ocrd_models/ocrd_page_user_methods/set_points.py | hnesk/core | 5a79220bc31572410e705d13ca178cf284cdc9fb | [
"Apache-2.0"
] | 25 | 2018-05-22T11:53:09.000Z | 2021-07-20T13:07:43.000Z | def set_points(self, points):
"""
Set coordinate polygon by given string.
Moreover, invalidate the parent's ``pc:AlternativeImage``s
(because they will have been cropped with a bbox
of the previous polygon).
"""
if hasattr(self, 'parent_object_'):
parent = self.parent_object_
... | 43.352941 | 113 | 0.693351 | def set_points(self, points):
"""
Set coordinate polygon by given string.
Moreover, invalidate the parent's ``pc:AlternativeImage``s
(because they will have been cropped with a bbox
of the previous polygon).
"""
if hasattr(self, 'parent_object_'):
parent = self.parent_object_
... | 0 | 0 | 0 |
01053b6bf07baa6c1e179859a8d3d680039a21b1 | 3,455 | py | Python | utils.py | JiekaiJia/pettingzoo_comunication | 1e85d5edb87ac867385649616e030284c0b6910f | [
"MIT"
] | 1 | 2021-11-14T13:16:16.000Z | 2021-11-14T13:16:16.000Z | utils.py | JiekaiJia/pettingzoo_comunication | 1e85d5edb87ac867385649616e030284c0b6910f | [
"MIT"
] | null | null | null | utils.py | JiekaiJia/pettingzoo_comunication | 1e85d5edb87ac867385649616e030284c0b6910f | [
"MIT"
] | null | null | null | """This module provides functions that make sure environment to be compatible with RLlib. If Rllib is not used, please
directly use the wrapper in comm_channel.py."""
import numpy as np
from pettingzoo.utils.conversions import to_parallel_wrapper
from pettingzoo.utils.wrappers import AssertOutOfBoundsWrapper, OrderEnf... | 33.221154 | 118 | 0.661939 | """This module provides functions that make sure environment to be compatible with RLlib. If Rllib is not used, please
directly use the wrapper in comm_channel.py."""
import numpy as np
from pettingzoo.utils.conversions import to_parallel_wrapper
from pettingzoo.utils.wrappers import AssertOutOfBoundsWrapper, OrderEnf... | 2,053 | 46 | 279 |
5efadc3c4ba7eb75a402097a914dbfc40578375a | 1,417 | py | Python | src/lektorium/repo/interface.py | sphericalpm/lektorium | 9b3b72c03495f269494a6a83bf102d79b1f5eeb3 | [
"MIT"
] | 18 | 2019-07-16T06:10:05.000Z | 2021-11-27T12:57:47.000Z | src/lektorium/repo/interface.py | sphericalpm/lektorium | 9b3b72c03495f269494a6a83bf102d79b1f5eeb3 | [
"MIT"
] | 34 | 2019-07-15T17:21:38.000Z | 2021-02-09T14:27:39.000Z | src/lektorium/repo/interface.py | sphericalpm/lektorium | 9b3b72c03495f269494a6a83bf102d79b1f5eeb3 | [
"MIT"
] | 6 | 2019-07-16T09:16:46.000Z | 2019-10-16T08:48:50.000Z | import abc
import random
import string
from typing import Generator, Iterable, Mapping, Optional, Tuple
| 20.242857 | 74 | 0.654199 | import abc
import random
import string
from typing import Generator, Iterable, Mapping, Optional, Tuple
class ExceptionBase(Exception):
pass
class DuplicateEditSession(ExceptionBase):
pass
class InvalidSessionState(ExceptionBase):
pass
class SessionNotFound(ExceptionBase):
pass
class Repo(meta... | 538 | 655 | 115 |
0820dda78f060e137ddbdd471c8564150d4f60cc | 1,844 | py | Python | devtest/roles/__init__.py | pycopia/devtest | 9ec93045ba4bab5b20ce99dc61cebd5b5a234d01 | [
"Apache-2.0"
] | null | null | null | devtest/roles/__init__.py | pycopia/devtest | 9ec93045ba4bab5b20ce99dc61cebd5b5a234d01 | [
"Apache-2.0"
] | null | null | null | devtest/roles/__init__.py | pycopia/devtest | 9ec93045ba4bab5b20ce99dc61cebd5b5a234d01 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 27.939394 | 80 | 0.70282 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 311 | 0 | 214 |
4112cc494680d71604be0aece6b9d93ed3587371 | 555 | py | Python | tests/unitary/LiquidityGaugeV3/test_checkpoint.py | AqualisDAO/curve-dao-contracts | beec73a068da8ed01c0f710939dc5adb776d565b | [
"MIT"
] | 217 | 2020-06-24T14:01:21.000Z | 2022-03-29T08:35:24.000Z | tests/unitary/LiquidityGaugeV3/test_checkpoint.py | AqualisDAO/curve-dao-contracts | beec73a068da8ed01c0f710939dc5adb776d565b | [
"MIT"
] | 25 | 2020-06-24T09:39:02.000Z | 2022-03-22T17:03:00.000Z | tests/unitary/LiquidityGaugeV3/test_checkpoint.py | AqualisDAO/curve-dao-contracts | beec73a068da8ed01c0f710939dc5adb776d565b | [
"MIT"
] | 110 | 2020-07-10T22:45:49.000Z | 2022-03-29T02:51:08.000Z | import brownie
YEAR = 86400 * 365
| 29.210526 | 68 | 0.727928 | import brownie
YEAR = 86400 * 365
def test_user_checkpoint(accounts, gauge_v3):
gauge_v3.user_checkpoint(accounts[1], {"from": accounts[1]})
def test_user_checkpoint_new_period(accounts, chain, gauge_v3):
gauge_v3.user_checkpoint(accounts[1], {"from": accounts[1]})
chain.sleep(int(YEAR * 1.1))
gaug... | 448 | 0 | 69 |
19ecc76fe435519b4c3484ec1cf271408e0a23af | 85 | py | Python | src/Paterns/run.py | seyedalirahimi/tehran-stocks | e22950f0534ad4962c9a2f00560675a1d8c8d94d | [
"MIT"
] | null | null | null | src/Paterns/run.py | seyedalirahimi/tehran-stocks | e22950f0534ad4962c9a2f00560675a1d8c8d94d | [
"MIT"
] | null | null | null | src/Paterns/run.py | seyedalirahimi/tehran-stocks | e22950f0534ad4962c9a2f00560675a1d8c8d94d | [
"MIT"
] | null | null | null | from ta.momentum import rsi
if __name__ == "__main__":
_rsi14 = rsi(Closes, 14)
| 17 | 28 | 0.682353 | from ta.momentum import rsi
if __name__ == "__main__":
_rsi14 = rsi(Closes, 14)
| 0 | 0 | 0 |
6aecb23c654ce6f5077ef0135d4d267781e730af | 50 | py | Python | python/testData/refactoring/move/importAs/after/src/b.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/refactoring/move/importAs/after/src/b.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/refactoring/move/importAs/after/src/b.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | import lib1 as iks
| 10 | 19 | 0.62 | import lib1 as iks
def f(x):
return iks.I(x) | 8 | 0 | 23 |
6a17f2469eaf20aab41dc48c7e885593c2f915e8 | 2,322 | py | Python | setup.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | null | null | null | setup.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | null | null | null | setup.py | pberkes/enaml | cbcbee929e3117dfe56c0b06dc2385acc832b0e8 | [
"BSD-3-Clause-Clear"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 25.8 | 79 | 0.518949 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | 0 | 0 | 0 |
9f11efd5d577c1b8e6eeefaf3cd91e56b5e55c1d | 566 | py | Python | python_program/myProject/ProjectTest/TestCase/test_information.py | luei1987kg/July_Learn | 3ac6eab5d4442f9e4c2a254e0933382a52921b99 | [
"MIT"
] | null | null | null | python_program/myProject/ProjectTest/TestCase/test_information.py | luei1987kg/July_Learn | 3ac6eab5d4442f9e4c2a254e0933382a52921b99 | [
"MIT"
] | null | null | null | python_program/myProject/ProjectTest/TestCase/test_information.py | luei1987kg/July_Learn | 3ac6eab5d4442f9e4c2a254e0933382a52921b99 | [
"MIT"
] | null | null | null | __author__='administrator'
# -*- coding:utf-8 -*-
import unittest
import time
# if __name__=="__main__":
# unittest.main()
# tester=Test()
# tester.setUp()
# tester.test01()
# tester.test02()
# tester.test03()
# tester.tearDown() | 20.962963 | 31 | 0.558304 | __author__='administrator'
# -*- coding:utf-8 -*-
import unittest
import time
class Test(unittest.TestCase):
def setUp(self):
print "start!"
def tearDown(self):
time.sleep(1)
print"end!"
def test01(self):
print"执行测试用例01"
def test03(self):
print"执行测试... | 161 | 9 | 162 |
6f50dd888966d3ffd28e4e4c221644a077b33442 | 15,416 | py | Python | lenstronomy/ImSim/Numerics/convolution.py | lucateo/lenstronomy | 3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab | [
"MIT"
] | 107 | 2017-08-25T20:03:51.000Z | 2022-03-30T19:52:21.000Z | lenstronomy/ImSim/Numerics/convolution.py | pierrefleury/lenstronomy | 5973f9b45761bab434bb273a1882ca3b45f5264b | [
"MIT"
] | 235 | 2017-06-07T13:30:53.000Z | 2022-03-28T12:44:04.000Z | lenstronomy/ImSim/Numerics/convolution.py | pierrefleury/lenstronomy | 5973f9b45761bab434bb273a1882ca3b45f5264b | [
"MIT"
] | 68 | 2018-02-01T15:47:20.000Z | 2022-03-27T12:44:32.000Z | from scipy import fftpack, ndimage, signal
import numpy as np
import threading
#from scipy._lib._version import NumpyVersion
_rfft_mt_safe = True # (NumpyVersion(np.__version__) >= '1.9.0.dev-e24486e')
_rfft_lock = threading.Lock()
import lenstronomy.Util.kernel_util as kernel_util
import lenstronomy.Util.util as uti... | 41.219251 | 153 | 0.644006 | from scipy import fftpack, ndimage, signal
import numpy as np
import threading
#from scipy._lib._version import NumpyVersion
_rfft_mt_safe = True # (NumpyVersion(np.__version__) >= '1.9.0.dev-e24486e')
_rfft_lock = threading.Lock()
import lenstronomy.Util.kernel_util as kernel_util
import lenstronomy.Util.util as uti... | 316 | 0 | 23 |
9b6f47641a5011280fdcbe941a421e6f089aa809 | 490 | py | Python | 2_3_plistlib.py | gregneagle/mtc2013_python | 210aa9f216a143f1723d1f9b04dfc79c545f4df6 | [
"Apache-2.0"
] | 4 | 2015-05-23T16:05:45.000Z | 2017-09-17T17:12:56.000Z | 2_3_plistlib.py | gregneagle/mtc2013_python | 210aa9f216a143f1723d1f9b04dfc79c545f4df6 | [
"Apache-2.0"
] | null | null | null | 2_3_plistlib.py | gregneagle/mtc2013_python | 210aa9f216a143f1723d1f9b04dfc79c545f4df6 | [
"Apache-2.0"
] | null | null | null | import plistlib
filename = "/Applications/Safari.app/Contents/Info.plist"
info = plistlib.readPlist(filename)
info["CFBundleGetInfoString"]
version = info["CFBundleShortVersionString"]
print version
print info["CFBundleURLTypes"]
print info["CFBundleURLTypes"][0]
print info["CFBundleURLTypes"][0]["CFBundleURLSchem... | 24.5 | 61 | 0.789796 | import plistlib
filename = "/Applications/Safari.app/Contents/Info.plist"
info = plistlib.readPlist(filename)
info["CFBundleGetInfoString"]
version = info["CFBundleShortVersionString"]
print version
print info["CFBundleURLTypes"]
print info["CFBundleURLTypes"][0]
print info["CFBundleURLTypes"][0]["CFBundleURLSchem... | 0 | 0 | 0 |
64bf82724827db0750f356eef07f3af56df5720b | 668 | py | Python | kpi/unical_accounts/migrations/0008_alter_user_codice_fiscale_alter_user_email.py | UniversitaDellaCalabria/kpiManagement | d045a464298e17f50e005b89ba3b71e53d57f368 | [
"Apache-2.0"
] | null | null | null | kpi/unical_accounts/migrations/0008_alter_user_codice_fiscale_alter_user_email.py | UniversitaDellaCalabria/kpiManagement | d045a464298e17f50e005b89ba3b71e53d57f368 | [
"Apache-2.0"
] | null | null | null | kpi/unical_accounts/migrations/0008_alter_user_codice_fiscale_alter_user_email.py | UniversitaDellaCalabria/kpiManagement | d045a464298e17f50e005b89ba3b71e53d57f368 | [
"Apache-2.0"
] | 1 | 2022-03-28T10:48:38.000Z | 2022-03-28T10:48:38.000Z | # Generated by Django 4.0 on 2022-03-28 09:59
from django.db import migrations, models
| 25.692308 | 75 | 0.579341 | # Generated by Django 4.0 on 2022-03-28 09:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('unical_accounts', '0007_user_created_by'),
]
operations = [
migrations.AlterField(
model_name='user',
name='codice_fis... | 0 | 556 | 23 |
738d2e0e79482160026dbee0a2e0a9bb2f953f8a | 6,255 | py | Python | src/questions/views.py | saadmk11/yourquery | 5bc64f91846908803becb4e0cb6fece417bbe49a | [
"MIT"
] | null | null | null | src/questions/views.py | saadmk11/yourquery | 5bc64f91846908803becb4e0cb6fece417bbe49a | [
"MIT"
] | null | null | null | src/questions/views.py | saadmk11/yourquery | 5bc64f91846908803becb4e0cb6fece417bbe49a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Q
from django.http import Http404
from django.shortcuts impo... | 32.748691 | 72 | 0.639488 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Q
from django.http import Http404
from django.shortcuts impo... | 5,412 | 0 | 225 |
4e31b05eb0d20a8423ef63d1655c310369f5df37 | 261 | py | Python | wotpy/protocols/http/__init__.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 24 | 2019-02-15T09:00:27.000Z | 2021-12-23T05:45:03.000Z | wotpy/protocols/http/__init__.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 20 | 2020-03-17T09:41:51.000Z | 2021-07-14T12:29:02.000Z | wotpy/protocols/http/__init__.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 5 | 2019-10-10T13:38:20.000Z | 2021-12-22T14:22:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTTP Protocol Binding implementation.
.. autosummary::
:toctree: _http
wotpy.protocols.http.handlers
wotpy.protocols.http.client
wotpy.protocols.http.enums
wotpy.protocols.http.server
"""
| 17.4 | 37 | 0.681992 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTTP Protocol Binding implementation.
.. autosummary::
:toctree: _http
wotpy.protocols.http.handlers
wotpy.protocols.http.client
wotpy.protocols.http.enums
wotpy.protocols.http.server
"""
| 0 | 0 | 0 |
d2c0f445720e982d0abf551cb916c5f8646b23fd | 3,588 | py | Python | QCPU_Setup/DWave-library/dist-packages/dwave_networkx2/algorithms/independent_set.py | cogrpar/qcpuWARE | 9b8233e830f8cfacbef787781b2279e42f26fec5 | [
"Apache-2.0"
] | 1 | 2022-02-01T14:40:05.000Z | 2022-02-01T14:40:05.000Z | QCPU_Setup/DWave-library/dist-packages/dwave_networkx2/algorithms/independent_set.py | cogrpar/qcpuWARE | 9b8233e830f8cfacbef787781b2279e42f26fec5 | [
"Apache-2.0"
] | null | null | null | QCPU_Setup/DWave-library/dist-packages/dwave_networkx2/algorithms/independent_set.py | cogrpar/qcpuWARE | 9b8233e830f8cfacbef787781b2279e42f26fec5 | [
"Apache-2.0"
] | 1 | 2022-02-01T14:40:31.000Z | 2022-02-01T14:40:31.000Z | from dwave_networkx.utils import binary_quadratic_model_sampler
__all__ = ["maximum_independent_set", "is_independent_set"]
@binary_quadratic_model_sampler(1)
def maximum_independent_set(G, sampler=None, **sampler_args):
"""Returns an approximate maximum independent set.
Defines a QUBO with ground states co... | 33.53271 | 94 | 0.686734 | from dwave_networkx.utils import binary_quadratic_model_sampler
__all__ = ["maximum_independent_set", "is_independent_set"]
@binary_quadratic_model_sampler(1)
def maximum_independent_set(G, sampler=None, **sampler_args):
"""Returns an approximate maximum independent set.
Defines a QUBO with ground states co... | 0 | 0 | 0 |
a33ac7c4f39b26557ddcab1ab4337752858138d3 | 2,628 | py | Python | 2016/launcher.py | bartmanus/advent_of_code | 8c5a2d639302c95e49e15d011db2df844bc4e010 | [
"Unlicense"
] | null | null | null | 2016/launcher.py | bartmanus/advent_of_code | 8c5a2d639302c95e49e15d011db2df844bc4e010 | [
"Unlicense"
] | null | null | null | 2016/launcher.py | bartmanus/advent_of_code | 8c5a2d639302c95e49e15d011db2df844bc4e010 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
"""
Launcher for AoC 2016 puzzles.
Handles puzzle selection and puzzle input.
"""
import day_1_no_time_for_a_taxicab as d1
import day_2_bathroom_security as d2
if __name__ == '__main__':
AVAILABLE_PUZZLES = {1: run_taxicab, 2:run_keypad}
print('Welcome to inifinity! Try an available so... | 38.086957 | 94 | 0.603501 | #!/usr/bin/env python3
"""
Launcher for AoC 2016 puzzles.
Handles puzzle selection and puzzle input.
"""
import day_1_no_time_for_a_taxicab as d1
import day_2_bathroom_security as d2
def run_taxicab():
while True:
instructions = input('Instructions in <dir><steps>[, <dir><steps>]* format, please: ')
... | 1,596 | 0 | 46 |
38de5d32c8943c365cbee6da4102c8d00d4c821a | 198 | py | Python | finder/forms.py | rc4594/Dbms | 57a160fd4339a884b1ce4ef75fe8489f6ff30fa2 | [
"MIT"
] | null | null | null | finder/forms.py | rc4594/Dbms | 57a160fd4339a884b1ce4ef75fe8489f6ff30fa2 | [
"MIT"
] | null | null | null | finder/forms.py | rc4594/Dbms | 57a160fd4339a884b1ce4ef75fe8489f6ff30fa2 | [
"MIT"
] | null | null | null | from django import forms
from models import Student
| 24.75 | 73 | 0.712121 | from django import forms
from models import Student
class StudentForm(forms.ModelForm) :
class Meta:
model = Student
fields = ['name','RollNo','hostel','status','Genre1','Genre2','Genre3']
| 0 | 120 | 23 |
4973eb261d4ff7581ed865328f3333ba54885730 | 790 | py | Python | node_manager/models.py | Jennypies/catnet | 8c715e1ad638c9843e116b3c3926163b7dde1618 | [
"MIT"
] | null | null | null | node_manager/models.py | Jennypies/catnet | 8c715e1ad638c9843e116b3c3926163b7dde1618 | [
"MIT"
] | null | null | null | node_manager/models.py | Jennypies/catnet | 8c715e1ad638c9843e116b3c3926163b7dde1618 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
| 32.916667 | 83 | 0.696203 | from django.db import models
from django.contrib.auth.models import User
class Node(models.Model):
name = models.CharField(max_length=200)
last_contact = models.DateTimeField('Last contact', null=True, editable=False)
contacts = models.ManyToManyField(User)
email_users = models.BooleanField(de... | 136 | 527 | 48 |
6438cabcc2ee27593e57c71efd247356f05e9634 | 3,980 | py | Python | App.py | tyasvdspree/assignmentNetworking | b61a517c40c449298f173f492c50f24947785944 | [
"MIT"
] | 1 | 2020-10-05T14:54:07.000Z | 2020-10-05T14:54:07.000Z | App.py | tyasvdspree/assignmentNetworking | b61a517c40c449298f173f492c50f24947785944 | [
"MIT"
] | null | null | null | App.py | tyasvdspree/assignmentNetworking | b61a517c40c449298f173f492c50f24947785944 | [
"MIT"
] | 1 | 2020-10-05T15:16:18.000Z | 2020-10-05T15:16:18.000Z | from _thread import *
import threading
import socket
import json
# team: PWA
# member: 0870508 Tyas van de Spree
# member: 0966770 Maarten de Goede
# class: DINF2
BYTE_SIZE = 1024
TEAMNAME = "PWA" # programmers with attitude
CLASSNAME = "DINF2"
TEAMMATESTUDENTNR = ''
STUDENTNR = input("Please provide your student... | 26.711409 | 123 | 0.651759 | from _thread import *
import threading
import socket
import json
# team: PWA
# member: 0870508 Tyas van de Spree
# member: 0966770 Maarten de Goede
# class: DINF2
BYTE_SIZE = 1024
TEAMNAME = "PWA" # programmers with attitude
CLASSNAME = "DINF2"
TEAMMATESTUDENTNR = ''
STUDENTNR = input("Please provide your student... | 2,562 | 1 | 361 |
7a6bc09f03fc1366993dfe34eea65ffbcef063a0 | 1,203 | py | Python | src/astro/dataframe/__init__.py | jlaneve/astro | 4528162c7582f3860d1d21de7af954f20c9f9a6a | [
"Apache-2.0"
] | null | null | null | src/astro/dataframe/__init__.py | jlaneve/astro | 4528162c7582f3860d1d21de7af954f20c9f9a6a | [
"Apache-2.0"
] | null | null | null | src/astro/dataframe/__init__.py | jlaneve/astro | 4528162c7582f3860d1d21de7af954f20c9f9a6a | [
"Apache-2.0"
] | null | null | null | from typing import Callable, Optional
from airflow.decorators.base import task_decorator_factory
from astro.sql.operators.sql_dataframe import SqlDataframeOperator
def dataframe(
python_callable: Optional[Callable] = None,
multiple_outputs: Optional[bool] = None,
conn_id: str = "",
database: Optiona... | 32.513514 | 119 | 0.697423 | from typing import Callable, Optional
from airflow.decorators.base import task_decorator_factory
from astro.sql.operators.sql_dataframe import SqlDataframeOperator
def dataframe(
python_callable: Optional[Callable] = None,
multiple_outputs: Optional[bool] = None,
conn_id: str = "",
database: Optiona... | 0 | 0 | 0 |
1dbf4b7b9733bf48989a9616acea576abb284c79 | 421 | py | Python | core/urls.py | AmoleR/otis-web | afcb1f595675bd1478e231b9de2579d02234a076 | [
"MIT"
] | null | null | null | core/urls.py | AmoleR/otis-web | afcb1f595675bd1478e231b9de2579d02234a076 | [
"MIT"
] | null | null | null | core/urls.py | AmoleR/otis-web | afcb1f595675bd1478e231b9de2579d02234a076 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path(r'classroom/', views.classroom, name='classroom'),
path(r'synopsis/', views.UnitGroupListView.as_view(), name='synopsis'),
path(r'unit/problems/<int:pk>/', views.unit_problems, name='view-problems'),
path(r'unit/tex/<int:pk>/', views.unit_tex, ... | 35.083333 | 80 | 0.714964 | from django.urls import path
from . import views
urlpatterns = [
path(r'classroom/', views.classroom, name='classroom'),
path(r'synopsis/', views.UnitGroupListView.as_view(), name='synopsis'),
path(r'unit/problems/<int:pk>/', views.unit_problems, name='view-problems'),
path(r'unit/tex/<int:pk>/', views.unit_tex, ... | 0 | 0 | 0 |
d795ac9c432f6e0f1f8a67d8417295173eebd7aa | 5,901 | py | Python | src/hannoy/index.py | marijnl/AquilaDB | ff837f135715619e1d09e94f94b3d25b12a8c5db | [
"Apache-2.0"
] | 2 | 2020-04-30T19:47:07.000Z | 2020-05-03T16:58:34.000Z | src/hannoy/index.py | marijnl/AquilaDB | ff837f135715619e1d09e94f94b3d25b12a8c5db | [
"Apache-2.0"
] | null | null | null | src/hannoy/index.py | marijnl/AquilaDB | ff837f135715619e1d09e94f94b3d25b12a8c5db | [
"Apache-2.0"
] | null | null | null | import numpy as np
from annoy import AnnoyIndex
import yaml
import os
import threading
import queue
import time
model_location = '/data/model_ha' | 35.335329 | 102 | 0.534147 | import numpy as np
from annoy import AnnoyIndex
import yaml
import os
import threading
import queue
import time
model_location = '/data/model_ha'
class Annoy:
def __init__(self):
# to keep the thread & queue running
self.process_flag = True
self.q_maxsize = 10100
self.process_thre... | 5,471 | -9 | 292 |
4bb8af7cfebda4f5b9abf228a7db10c33ad3ff2e | 52 | py | Python | salt/returners/__init__.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 111 | 2015-01-16T02:48:12.000Z | 2022-02-08T10:24:56.000Z | salt/returners/__init__.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 60 | 2015-01-06T12:28:44.000Z | 2020-12-01T21:30:38.000Z | salt/returners/__init__.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 163 | 2015-01-06T09:40:31.000Z | 2022-02-03T11:41:23.000Z | # -*- coding: utf-8 -*-
'''
Returners Directory
'''
| 10.4 | 23 | 0.538462 | # -*- coding: utf-8 -*-
'''
Returners Directory
'''
| 0 | 0 | 0 |
eddc16387b276719fe8d1b5a9e83d853a078ea81 | 5,702 | py | Python | app.py | a-tanman/vigil-hotline | 21b73e76c2c3de77f9c93cb11ae47295a064dabd | [
"Apache-2.0"
] | null | null | null | app.py | a-tanman/vigil-hotline | 21b73e76c2c3de77f9c93cb11ae47295a064dabd | [
"Apache-2.0"
] | null | null | null | app.py | a-tanman/vigil-hotline | 21b73e76c2c3de77f9c93cb11ae47295a064dabd | [
"Apache-2.0"
] | null | null | null | #----------------------------------------------------------------------------#
# Imports
#----------------------------------------------------------------------------#
from flask import Flask, render_template, request, jsonify, redirect, url_for
import random
from datetime import datetime
from flask_cors import CORS
f... | 27.023697 | 98 | 0.590845 | #----------------------------------------------------------------------------#
# Imports
#----------------------------------------------------------------------------#
from flask import Flask, render_template, request, jsonify, redirect, url_for
import random
from datetime import datetime
from flask_cors import CORS
f... | 2,591 | 0 | 243 |
1231aef1d097e4a6200ffabfe2739b14b2d58dc5 | 1,396 | py | Python | spark_auto_mapper/automappers/automapper_base.py | icanbwell/SparkAutoMapper | bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4 | [
"Apache-2.0"
] | 2 | 2021-12-27T10:41:59.000Z | 2022-02-24T00:19:40.000Z | spark_auto_mapper/automappers/automapper_base.py | icanbwell/SparkAutoMapper | bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4 | [
"Apache-2.0"
] | 5 | 2020-10-22T01:19:11.000Z | 2021-03-18T16:04:23.000Z | spark_auto_mapper/automappers/automapper_base.py | icanbwell/SparkAutoMapper | bfd5da72f3b55ec48860935228c1ecf6d7c1a2e4 | [
"Apache-2.0"
] | 3 | 2020-12-17T21:23:46.000Z | 2021-07-29T18:08:31.000Z | from typing import List, Dict, Optional
from pyspark.sql import DataFrame, Column
from spark_auto_mapper.automappers.check_schema_result import CheckSchemaResult
class AutoMapperBase:
"""
Abstract Base class for AutoMappers
"""
def transform_with_data_frame(
self, df: DataFrame, source_df: ... | 25.851852 | 84 | 0.649713 | from typing import List, Dict, Optional
from pyspark.sql import DataFrame, Column
from spark_auto_mapper.automappers.check_schema_result import CheckSchemaResult
class AutoMapperBase:
"""
Abstract Base class for AutoMappers
"""
def __init__(self) -> None:
pass
def transform_with_data_f... | 19 | 0 | 27 |
f61d11acc6629c2b63f97227a5134b008acfe309 | 511 | py | Python | sphinx/source/docs/user_guide/examples/interaction_tab_panes.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 12 | 2020-07-20T14:58:31.000Z | 2021-09-04T22:15:14.000Z | sphinx/source/docs/user_guide/examples/interaction_tab_panes.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 1 | 2020-09-05T02:46:20.000Z | 2020-09-05T02:46:20.000Z | sphinx/source/docs/user_guide/examples/interaction_tab_panes.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 3 | 2019-03-27T23:27:05.000Z | 2020-08-05T19:03:19.000Z | from bokeh.models import Panel, Tabs
from bokeh.io import output_file, show
from bokeh.plotting import figure
output_file("slider.html")
p1 = figure(plot_width=300, plot_height=300)
p1.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)
tab1 = Panel(child=p1, title="circle")
p2 = figure(plot_w... | 28.388889 | 80 | 0.675147 | from bokeh.models import Panel, Tabs
from bokeh.io import output_file, show
from bokeh.plotting import figure
output_file("slider.html")
p1 = figure(plot_width=300, plot_height=300)
p1.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)
tab1 = Panel(child=p1, title="circle")
p2 = figure(plot_w... | 0 | 0 | 0 |
a8b1d0d3f419b87fe666dbebbfa8c7d0b7bd9341 | 576 | py | Python | DSA/string/letterCombinations.py | lance-lh/Data-Structures-and-Algorithms | c432654edaeb752536e826e88bcce3ed2ab000fb | [
"MIT"
] | 1 | 2019-03-27T13:00:28.000Z | 2019-03-27T13:00:28.000Z | DSA/string/letterCombinations.py | lance-lh/Data-Structures-and-Algorithms | c432654edaeb752536e826e88bcce3ed2ab000fb | [
"MIT"
] | null | null | null | DSA/string/letterCombinations.py | lance-lh/Data-Structures-and-Algorithms | c432654edaeb752536e826e88bcce3ed2ab000fb | [
"MIT"
] | null | null | null | # @return a list of strings, [s1, s2]
# test
digits = "23"
print(Solution().letterCombinations(digits)) | 25.043478 | 100 | 0.447917 | class Solution:
# @return a list of strings, [s1, s2]
def letterCombinations(self, digits):
from functools import reduce
if digits == '':
return []
mapping = {
'2': 'abc',
'3': 'def',
'4': 'ghi',
'5': 'jkl',
'6': 'm... | 426 | -6 | 48 |
014b2ff73bbee2c8fd077762e2cf0325f04ca8e3 | 1,556 | py | Python | velocyto/segment_match.py | subercui/velocyto.py | 87269d36f9e99650953dd4b1b9c4f505453b6515 | [
"BSD-2-Clause"
] | 119 | 2017-11-06T15:36:51.000Z | 2022-03-29T20:11:28.000Z | velocyto/segment_match.py | subercui/velocyto.py | 87269d36f9e99650953dd4b1b9c4f505453b6515 | [
"BSD-2-Clause"
] | 303 | 2017-10-20T22:48:11.000Z | 2022-03-26T19:17:36.000Z | velocyto/segment_match.py | subercui/velocyto.py | 87269d36f9e99650953dd4b1b9c4f505453b6515 | [
"BSD-2-Clause"
] | 74 | 2017-10-20T21:31:42.000Z | 2022-02-20T09:29:22.000Z | from typing import *
import velocyto as vcy
| 35.363636 | 140 | 0.596401 | from typing import *
import velocyto as vcy
class SegmentMatch:
__slots__ = ["segment", "feature", "is_spliced"]
def __init__(self, segment: Tuple[int, int], feature: vcy.Feature, is_spliced: bool=False) -> None:
self.segment = segment
self.feature = feature
self.is_spliced = is_s... | 715 | 773 | 23 |
3f8c4f5fff8a542b17ea599da32d09636a18443d | 5,767 | py | Python | plastron/pcdm.py | peichman-umd/plastron | 8453b1dc598eaf60e50a4614444a2c713b96190a | [
"Apache-2.0"
] | 3 | 2019-06-12T08:07:52.000Z | 2019-09-13T18:16:30.000Z | plastron/pcdm.py | peichman-umd/plastron | 8453b1dc598eaf60e50a4614444a2c713b96190a | [
"Apache-2.0"
] | 14 | 2018-05-11T15:17:40.000Z | 2022-03-11T23:27:50.000Z | plastron/pcdm.py | peichman-umd/plastron | 8453b1dc598eaf60e50a4614444a2c713b96190a | [
"Apache-2.0"
] | 5 | 2018-04-13T20:58:30.000Z | 2020-03-25T12:59:34.000Z | from plastron import ldp, ore, rdf
from plastron.namespaces import dcterms, dcmitype, ebucore, fabio, pcdm, pcdmuse, premis
from plastron.files import LocalFileSource, RepositoryFileSource
from PIL import Image
# alias the rdflib Namespace
ns = pcdm
@rdf.object_property('members', pcdm.hasMember)
@rdf.object_proper... | 31.342391 | 120 | 0.648344 | from plastron import ldp, ore, rdf
from plastron.namespaces import dcterms, dcmitype, ebucore, fabio, pcdm, pcdmuse, premis
from plastron.files import LocalFileSource, RepositoryFileSource
from PIL import Image
# alias the rdflib Namespace
ns = pcdm
@rdf.object_property('members', pcdm.hasMember)
@rdf.object_proper... | 3,577 | 295 | 337 |
b386075e1018254114f56a24107ff27fd3c4acf4 | 761 | py | Python | intents/config.py | markdeutel/IntentFuzzer | e4d80251d57bd4d10dc7d214818fd54e0e7d3574 | [
"BSD-3-Clause"
] | 5 | 2018-12-02T14:04:22.000Z | 2021-04-08T10:46:58.000Z | intents/config.py | markdeutel/IntentFuzzer | e4d80251d57bd4d10dc7d214818fd54e0e7d3574 | [
"BSD-3-Clause"
] | null | null | null | intents/config.py | markdeutel/IntentFuzzer | e4d80251d57bd4d10dc7d214818fd54e0e7d3574 | [
"BSD-3-Clause"
] | 2 | 2018-12-30T09:35:57.000Z | 2019-07-15T15:17:11.000Z | from os import path
import json
| 47.5625 | 115 | 0.659658 | from os import path
import json
class Config:
def __init__(self):
configPath = path.abspath(path.dirname(__file__)) + "/config.json"
with open(configPath, 'r') as file:
jsonConfig = json.load(file)
self.dataStorePath = path.expanduser(jsonConfig.get("dataStore", path.ab... | 683 | -8 | 54 |
923893bcf3fdc9e6ae96e21578684f8468825b24 | 5,591 | py | Python | gpustats/sampler.py | dukestats/gpustats | 570fdeb4d1da204b1e56717ba29db07a08be8629 | [
"BSD-3-Clause"
] | 23 | 2015-02-01T23:46:52.000Z | 2021-01-13T18:07:47.000Z | gpustats/sampler.py | dukestats/gpustats | 570fdeb4d1da204b1e56717ba29db07a08be8629 | [
"BSD-3-Clause"
] | null | null | null | gpustats/sampler.py | dukestats/gpustats | 570fdeb4d1da204b1e56717ba29db07a08be8629 | [
"BSD-3-Clause"
] | 6 | 2015-06-18T10:23:59.000Z | 2020-05-05T22:32:40.000Z | import numpy as np
import gpustats.kernels as kernels
import gpustats.codegen as codegen
import gpustats.util as util
import pycuda.driver as drv
from pycuda.gpuarray import GPUArray, to_gpu
from pycuda.gpuarray import empty as gpu_empty
from pycuda.curandom import rand as curand
# reload(kernels)
# reload(codegen)
... | 27.541872 | 88 | 0.640315 | import numpy as np
import gpustats.kernels as kernels
import gpustats.codegen as codegen
import gpustats.util as util
import pycuda.driver as drv
from pycuda.gpuarray import GPUArray, to_gpu
from pycuda.gpuarray import empty as gpu_empty
from pycuda.curandom import rand as curand
# reload(kernels)
# reload(codegen)
... | 192 | 0 | 27 |
93ddc216aa03e77588852f7a7e577c8e48d8a891 | 5,544 | py | Python | wandb/sdk/data_types/helper_types/classes.py | soumik12345/client | 31e4c2b143e6c219ea005fe4477e294f383f6888 | [
"MIT"
] | null | null | null | wandb/sdk/data_types/helper_types/classes.py | soumik12345/client | 31e4c2b143e6c219ea005fe4477e294f383f6888 | [
"MIT"
] | null | null | null | wandb/sdk/data_types/helper_types/classes.py | soumik12345/client | 31e4c2b143e6c219ea005fe4477e294f383f6888 | [
"MIT"
] | null | null | null | import os
from typing import Any, Dict, Optional, Sequence, Type, TYPE_CHECKING, Union
from .. import _dtypes
from ..base_types.media import Media
if TYPE_CHECKING: # pragma: no cover
from wandb.apis.public import Artifact as PublicArtifact
from ...wandb_artifacts import Artifact as LocalArtifact
from .... | 34.222222 | 119 | 0.592352 | import os
from typing import Any, Dict, Optional, Sequence, Type, TYPE_CHECKING, Union
from .. import _dtypes
from ..base_types.media import Media
if TYPE_CHECKING: # pragma: no cover
from wandb.apis.public import Artifact as PublicArtifact
from ...wandb_artifacts import Artifact as LocalArtifact
from .... | 4,140 | 958 | 46 |
08c4b55684bc43747f4a9875f98c55d0ce244fb7 | 6,018 | py | Python | test/rest/clienttests.py | geoco84/comodit-client | 4cf47e60a6739ed8b88ce8b955ed57375c4d400d | [
"MIT"
] | 1 | 2015-01-20T17:24:34.000Z | 2015-01-20T17:24:34.000Z | test/rest/clienttests.py | geoco84/comodit-client | 4cf47e60a6739ed8b88ce8b955ed57375c4d400d | [
"MIT"
] | null | null | null | test/rest/clienttests.py | geoco84/comodit-client | 4cf47e60a6739ed8b88ce8b955ed57375c4d400d | [
"MIT"
] | 24 | 2016-09-07T15:28:00.000Z | 2021-12-08T16:03:16.000Z | import unittest, json
from comodit_client.rest.client import HttpClient
from comodit_client.rest.exceptions import ApiException
from test.mock.urllib_mocks import RequestWithMethodMock, RequestResult
# Create tests
# Delete tests
# Read tests
# Update tests
# Helpers
if __name__ == '__m... | 29.5 | 113 | 0.623463 | import unittest, json
from comodit_client.rest.client import HttpClient
from comodit_client.rest.exceptions import ApiException
from test.mock.urllib_mocks import RequestWithMethodMock, RequestResult
class ClientTest(unittest.TestCase):
def setUp(self):
self._url = "url"
self._params = ""
... | 5,066 | 15 | 589 |
f4436d2fd8b94b5828d5d0b7ad6611c0470a1208 | 95 | py | Python | terrascript/chef/__init__.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/chef/__init__.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/chef/__init__.py | hugovk/python-terrascript | 08fe185904a70246822f5cfbdc9e64e9769ec494 | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/chef/__init__.py
import terrascript
| 13.571429 | 33 | 0.778947 | # terrascript/chef/__init__.py
import terrascript
class chef(terrascript.Provider):
pass
| 0 | 21 | 23 |
32200536ad140d2e40509a8f4ea62c17f2e2b660 | 2,018 | py | Python | src/boogie/configurations/django_conf/security.py | pencil-labs/django-boogie | 79b759617785ce33a24cb6013266a0810b24801c | [
"BSD-3-Clause"
] | null | null | null | src/boogie/configurations/django_conf/security.py | pencil-labs/django-boogie | 79b759617785ce33a24cb6013266a0810b24801c | [
"BSD-3-Clause"
] | null | null | null | src/boogie/configurations/django_conf/security.py | pencil-labs/django-boogie | 79b759617785ce33a24cb6013266a0810b24801c | [
"BSD-3-Clause"
] | 2 | 2021-09-16T22:11:35.000Z | 2021-09-25T12:28:27.000Z | from .environment import EnvironmentConf
from ..tools import secret_hash
class SecurityConf(EnvironmentConf):
"""
Security options.
"""
def get_secret_key(self):
"""
WARNING: keep the secret key used in production secret! We generate a
secret from a hash of the current setting... | 35.403509 | 82 | 0.631318 | from .environment import EnvironmentConf
from ..tools import secret_hash
class SecurityConf(EnvironmentConf):
"""
Security options.
"""
def finalize(self, settings):
settings = super().finalize(settings)
if not settings.get("SECRET_KEY"):
settings["SECRET_KEY"] = secret_ha... | 747 | 0 | 81 |
e2daa8f9b242d23b6e640ea90ef23c05a358f900 | 1,670 | py | Python | pybpodgui_plugin/settings.py | ckarageorgkaneen/pybpod-gui-plugin | ef9ca8a7094b9d225dde8e3db58d94ae084aaac5 | [
"MIT"
] | null | null | null | pybpodgui_plugin/settings.py | ckarageorgkaneen/pybpod-gui-plugin | ef9ca8a7094b9d225dde8e3db58d94ae084aaac5 | [
"MIT"
] | null | null | null | pybpodgui_plugin/settings.py | ckarageorgkaneen/pybpod-gui-plugin | ef9ca8a7094b9d225dde8e3db58d94ae084aaac5 | [
"MIT"
] | 1 | 2021-02-22T21:32:03.000Z | 2021-02-22T21:32:03.000Z | # # !/usr/bin/python3
# # -*- coding: utf-8 -*-
import logging, os
SETTINGS_PRIORITY = 100
# THESE SETTINGS ARE NEEDED FOR PYSETTINGS
APP_LOG_FILENAME = 'app.log'
APP_LOG_HANDLER_CONSOLE_LEVEL = logging.WARNING
APP_LOG_HANDLER_FILE_LEVEL = logging.WARNING
CONTROL_EVENTS_GRAPH_DEFAULT_SCALE = 100
BOARD_LOG_WIN... | 27.377049 | 102 | 0.782036 | # # !/usr/bin/python3
# # -*- coding: utf-8 -*-
import logging, os
SETTINGS_PRIORITY = 100
# THESE SETTINGS ARE NEEDED FOR PYSETTINGS
APP_LOG_FILENAME = 'app.log'
APP_LOG_HANDLER_CONSOLE_LEVEL = logging.WARNING
APP_LOG_HANDLER_FILE_LEVEL = logging.WARNING
CONTROL_EVENTS_GRAPH_DEFAULT_SCALE = 100
BOARD_LOG_WIN... | 0 | 0 | 0 |
51b66a26418cbf9c12132319bfeb2cb5131c8eef | 6,798 | py | Python | pdfmajor/interpreter/commands/state/PDFTextState/PDFFont/fonts.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 23 | 2019-01-13T23:32:24.000Z | 2021-07-08T04:29:15.000Z | pdfmajor/interpreter/commands/state/PDFTextState/PDFFont/fonts.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 3 | 2019-08-09T18:42:01.000Z | 2019-12-13T15:43:24.000Z | pdfmajor/interpreter/commands/state/PDFTextState/PDFFont/fonts.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 2 | 2020-01-09T11:18:20.000Z | 2020-03-24T06:02:30.000Z | from io import BytesIO
from pdfmajor.execptions import FontError, UnicodeNotDefined, CMapNotFound
from pdfmajor.parser.PSStackParser import literal_name
from pdfmajor.parser.PDFStream import int_value
from pdfmajor.parser.PDFStream import num_value
from pdfmajor.parser.PDFStream import list_value
from pdfmajor.parser.... | 38.625 | 110 | 0.612533 | from io import BytesIO
from pdfmajor.execptions import FontError, UnicodeNotDefined, CMapNotFound
from pdfmajor.parser.PSStackParser import literal_name
from pdfmajor.parser.PDFStream import int_value
from pdfmajor.parser.PDFStream import num_value
from pdfmajor.parser.PDFStream import list_value
from pdfmajor.parser.... | 5,329 | 372 | 223 |
0d06b0adc2fd7a6757d80b73c268e069d1397b68 | 125 | py | Python | PYTHON/starwars fingers/mixersample.py | arpitarunkumaar/Hacktoberfest2021 | 0af40f90a6c0716caadbbfff44ece947b6146f60 | [
"MIT"
] | 125 | 2021-10-01T19:05:26.000Z | 2021-10-03T13:32:42.000Z | PYTHON/starwars fingers/mixersample.py | arpitarunkumaar/Hacktoberfest2021 | 0af40f90a6c0716caadbbfff44ece947b6146f60 | [
"MIT"
] | 201 | 2021-10-30T20:40:01.000Z | 2022-03-22T17:26:28.000Z | PYTHON/starwars fingers/mixersample.py | arpitarunkumaar/Hacktoberfest2021 | 0af40f90a6c0716caadbbfff44ece947b6146f60 | [
"MIT"
] | 294 | 2021-10-01T18:46:05.000Z | 2021-10-03T14:25:07.000Z | import mixer
import pygame
soun_obj=pygame.mixer.Sound("Star Wars Main Theme (Full).mp3")
soun_obj.play()
soun_obj.stop() | 25 | 63 | 0.76 | import mixer
import pygame
soun_obj=pygame.mixer.Sound("Star Wars Main Theme (Full).mp3")
soun_obj.play()
soun_obj.stop() | 0 | 0 | 0 |
cf8a9ddef46ebe737e00e9f4684a2b26991ee7b0 | 3,111 | py | Python | mols2grid/utils.py | cbouy/mol2grid | 1f0dc632e2b2b471b924f27a441950fe5209823d | [
"Apache-2.0"
] | 105 | 2021-03-22T16:08:51.000Z | 2022-03-07T15:38:32.000Z | mols2grid/utils.py | cbouy/molgrid | 1f0dc632e2b2b471b924f27a441950fe5209823d | [
"Apache-2.0"
] | 19 | 2021-03-24T13:08:05.000Z | 2022-03-30T20:33:47.000Z | mols2grid/utils.py | cbouy/molgrid | 1f0dc632e2b2b471b924f27a441950fe5209823d | [
"Apache-2.0"
] | 13 | 2021-03-22T19:26:24.000Z | 2022-03-22T06:01:10.000Z | from functools import wraps
from importlib.util import find_spec
from jinja2 import Environment, FileSystemLoader
from pathlib import Path
from rdkit import Chem
import pandas as pd
env = Environment(loader=FileSystemLoader(Path(__file__).parent / 'templates'),
autoescape=False)
def tooltip_formatt... | 34.566667 | 79 | 0.627772 | from functools import wraps
from importlib.util import find_spec
from jinja2 import Environment, FileSystemLoader
from pathlib import Path
from rdkit import Chem
import pandas as pd
env = Environment(loader=FileSystemLoader(Path(__file__).parent / 'templates'),
autoescape=False)
def requires(module... | 361 | 0 | 23 |
5c2b633eae20fd8c195dffb3e55c0d408377fe88 | 41,361 | py | Python | pypy/objspace/std/bytesobject.py | akercheval/espy | f8317d2f01ba726ed4f03cab081176c32ae4cac4 | [
"Apache-2.0",
"OpenSSL"
] | 4 | 2019-02-11T06:58:43.000Z | 2020-03-15T14:12:32.000Z | pypy/objspace/std/bytesobject.py | akercheval/espy | f8317d2f01ba726ed4f03cab081176c32ae4cac4 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/objspace/std/bytesobject.py | akercheval/espy | f8317d2f01ba726ed4f03cab081176c32ae4cac4 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | """The builtin str implementation"""
from rpython.rlib import jit
from rpython.rlib.jit import we_are_jitted
from rpython.rlib.objectmodel import (
compute_hash, compute_unique_id, import_from_mixin)
from rpython.rlib.buffer import StringBuffer
from rpython.rlib.rstring import StringBuilder, replace
from pypy.int... | 40.431085 | 80 | 0.677595 | """The builtin str implementation"""
from rpython.rlib import jit
from rpython.rlib.jit import we_are_jitted
from rpython.rlib.objectmodel import (
compute_hash, compute_unique_id, import_from_mixin)
from rpython.rlib.buffer import StringBuffer
from rpython.rlib.rstring import StringBuilder, replace
from pypy.int... | 14,936 | 16,955 | 91 |
ce14eda92e15aefbc025b2c490635a553b714fb5 | 1,506 | py | Python | db/database.py | akhfzz/FastAPI-Shorten-case | eb2dfe6e63182c2cf4e04078d2199a70563756e0 | [
"MIT"
] | null | null | null | db/database.py | akhfzz/FastAPI-Shorten-case | eb2dfe6e63182c2cf4e04078d2199a70563756e0 | [
"MIT"
] | null | null | null | db/database.py | akhfzz/FastAPI-Shorten-case | eb2dfe6e63182c2cf4e04078d2199a70563756e0 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, String, Date
from sqlalchemy.orm import relationship
from sqlalchemy.sql.schema import ForeignKey
from configuration import Base
from datetime import * | 45.636364 | 108 | 0.729748 | from sqlalchemy import Column, Integer, String, Date
from sqlalchemy.orm import relationship
from sqlalchemy.sql.schema import ForeignKey
from configuration import Base
from datetime import *
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True, autoincrement=True)
email = Column... | 0 | 1,245 | 69 |
69f92ecad800dba71ec28c90133f05cd43d2b219 | 2,035 | py | Python | apps/upload/views.py | plsof/tabops_api | 39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8 | [
"MIT"
] | 1 | 2019-07-31T07:34:38.000Z | 2019-07-31T07:34:38.000Z | apps/upload/views.py | plsof/tabops_api | 39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8 | [
"MIT"
] | 9 | 2019-12-05T00:39:29.000Z | 2022-02-10T14:13:29.000Z | apps/upload/views.py | plsof/tabops_api | 39f5d2fd5158ae0c22e43ab6ff7e2b07a68a62d8 | [
"MIT"
] | null | null | null | from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from rest_framework.permissions import IsAdminUser
from common.views import ResponseInfo, MyPageNumber
from .models import File
from .serializers import FileSerializer
| 35.086207 | 104 | 0.678133 | from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from rest_framework.permissions import IsAdminUser
from common.views import ResponseInfo, MyPageNumber
from .models import File
from .serializers import FileSerializer
class FileUploadView(APIView)... | 1,493 | 231 | 46 |
078e765fcfe27de2aa9ef67e4be7f01a4827155c | 569 | py | Python | drive-google-deinit.py | scivision/deprecated-google-drive-public | 33dd090a0be381abd1938ca403d91c6bf9db0b1c | [
"MIT"
] | 4 | 2017-03-19T22:58:20.000Z | 2017-12-02T14:25:53.000Z | drive-google-deinit.py | scivision/deprecated-google-drive-public | 33dd090a0be381abd1938ca403d91c6bf9db0b1c | [
"MIT"
] | 1 | 2017-04-13T09:54:29.000Z | 2017-05-11T07:17:11.000Z | drive-google-deinit.py | scivision/deprecated-google-drive-public | 33dd090a0be381abd1938ca403d91c6bf9db0b1c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
recursive search and deinit (disconnection) for drive-google directories
"""
from pathlib import Path
from gdrivepublic import isgdrive
from subprocess import call
from argparse import ArgumentParser
p = ArgumentParser()
p.add_argument('rdir',help='root directory to search for active drive-g... | 24.73913 | 112 | 0.697715 | #!/usr/bin/env python
"""
recursive search and deinit (disconnection) for drive-google directories
"""
from pathlib import Path
from gdrivepublic import isgdrive
from subprocess import call
from argparse import ArgumentParser
p = ArgumentParser()
p.add_argument('rdir',help='root directory to search for active drive-g... | 0 | 0 | 0 |
dc76a9dbd6dd167c7e2d72d09a02af1f8d079b72 | 3,067 | py | Python | main/cloudfoundry_client/main/tasks_command_domain.py | subhash12/cf-python-client | c0ecbb8ec85040fc2f74b6c52e1f9a6c6c16c4b0 | [
"Apache-2.0"
] | 47 | 2017-12-17T00:54:33.000Z | 2022-02-25T09:54:52.000Z | main/cloudfoundry_client/main/tasks_command_domain.py | subhash12/cf-python-client | c0ecbb8ec85040fc2f74b6c52e1f9a6c6c16c4b0 | [
"Apache-2.0"
] | 125 | 2017-10-27T09:38:10.000Z | 2022-03-10T07:53:35.000Z | main/cloudfoundry_client/main/tasks_command_domain.py | subhash12/cf-python-client | c0ecbb8ec85040fc2f74b6c52e1f9a6c6c16c4b0 | [
"Apache-2.0"
] | 50 | 2018-01-19T07:57:21.000Z | 2022-02-14T14:47:31.000Z | import json
import os
from argparse import Namespace, _SubParsersAction
from cloudfoundry_client.client import CloudFoundryClient
from cloudfoundry_client.json_object import JsonObject
from cloudfoundry_client.main.command_domain import CommandDomain, Command
| 38.822785 | 114 | 0.600587 | import json
import os
from argparse import Namespace, _SubParsersAction
from cloudfoundry_client.client import CloudFoundryClient
from cloudfoundry_client.json_object import JsonObject
from cloudfoundry_client.main.command_domain import CommandDomain, Command
class TaskCommandDomain(CommandDomain):
def __init__(... | 2,603 | 18 | 184 |
b7ec571afdc19b55f0b9873d557e9ca53ed0a12f | 977 | py | Python | data/generateQuickdrawDataset.py | manas-avi/detection-2016-nipsws | b25669dbf1c5d3d1a79638f928c989aca1c32622 | [
"MIT"
] | null | null | null | data/generateQuickdrawDataset.py | manas-avi/detection-2016-nipsws | b25669dbf1c5d3d1a79638f928c989aca1c32622 | [
"MIT"
] | null | null | null | data/generateQuickdrawDataset.py | manas-avi/detection-2016-nipsws | b25669dbf1c5d3d1a79638f928c989aca1c32622 | [
"MIT"
] | 2 | 2018-12-02T08:39:24.000Z | 2018-12-08T15:55:54.000Z | from numpy import random
import gc
import numpy as np
import pdb
import cv2
import os
import sys
import matplotlib.pyplot as plt
dataset_name = sys.argv[1]
data_dir = './quickdraw/' + dataset_name + '/r128/'
save_dir = './quickdraw/' + dataset_name + '/obj-in-image/'
os.makedirs(save_dir + 'test/' , exist_ok=True)
os... | 25.051282 | 68 | 0.684749 | from numpy import random
import gc
import numpy as np
import pdb
import cv2
import os
import sys
import matplotlib.pyplot as plt
dataset_name = sys.argv[1]
data_dir = './quickdraw/' + dataset_name + '/r128/'
save_dir = './quickdraw/' + dataset_name + '/obj-in-image/'
os.makedirs(save_dir + 'test/' , exist_ok=True)
os... | 0 | 0 | 0 |
8ef7c1aa85b2e0042a2dcefa5ce7a98ed26ddaef | 49,547 | py | Python | pytest_cases/main_fixtures.py | keszybz/python-pytest-cases | 424d35108228716d7ea0276f6a89ef72181dd919 | [
"BSD-3-Clause"
] | null | null | null | pytest_cases/main_fixtures.py | keszybz/python-pytest-cases | 424d35108228716d7ea0276f6a89ef72181dd919 | [
"BSD-3-Clause"
] | null | null | null | pytest_cases/main_fixtures.py | keszybz/python-pytest-cases | 424d35108228716d7ea0276f6a89ef72181dd919 | [
"BSD-3-Clause"
] | null | null | null | # Use true division operator always even in old python 2.x (used in `_get_case_getter_s`)
from __future__ import division
from distutils.version import LooseVersion
from enum import Enum
from inspect import isgeneratorfunction, getmodule, currentframe
from itertools import product
from warnings import warn
from decop... | 41.882502 | 125 | 0.653844 | # Use true division operator always even in old python 2.x (used in `_get_case_getter_s`)
from __future__ import division
from distutils.version import LooseVersion
from enum import Enum
from inspect import isgeneratorfunction, getmodule, currentframe
from itertools import product
from warnings import warn
from decop... | 7,116 | -6 | 810 |
da8d8071d750b685956d79ac77bbc0a8b708951e | 5,257 | py | Python | nb/toxin.py | pgniewko/deep-toxin | fa61b06405749e5de7d74eedadb5de7c67981471 | [
"BSD-3-Clause"
] | 1 | 2020-08-20T07:49:10.000Z | 2020-08-20T07:49:10.000Z | nb/toxin.py | pgniewko/deep-toxin | fa61b06405749e5de7d74eedadb5de7c67981471 | [
"BSD-3-Clause"
] | null | null | null | nb/toxin.py | pgniewko/deep-toxin | fa61b06405749e5de7d74eedadb5de7c67981471 | [
"BSD-3-Clause"
] | null | null | null | from pydpi.pypro import PyPro
import logging
AA_MODIFICATIONS = {
"Benzoylphenylalanine": "F",
"C-term amidation": "",
"Sulfotyrosine": "Y",
"4-Hydroxyproline": "P",
"Pyroglutamic acid": "E",
"Gamma carboxylic glutamic acid": "E",
"Any": "G",
"D-leucine": "L",
"D-phenylalanine": "F"... | 27.814815 | 141 | 0.561917 | from pydpi.pypro import PyPro
import logging
AA_MODIFICATIONS = {
"Benzoylphenylalanine": "F",
"C-term amidation": "",
"Sulfotyrosine": "Y",
"4-Hydroxyproline": "P",
"Pyroglutamic acid": "E",
"Gamma carboxylic glutamic acid": "E",
"Any": "G",
"D-leucine": "L",
"D-phenylalanine": "F"... | 2,358 | 1,154 | 23 |
c068615ba5c8b41d1a83e195bf09fa87e4327bd6 | 247 | py | Python | exercicios/ex029.py | RaquelBotelhoof/Python-curso-em-video | 919b2f44e85647c096c6b734c991635f1bfd1af9 | [
"MIT"
] | null | null | null | exercicios/ex029.py | RaquelBotelhoof/Python-curso-em-video | 919b2f44e85647c096c6b734c991635f1bfd1af9 | [
"MIT"
] | null | null | null | exercicios/ex029.py | RaquelBotelhoof/Python-curso-em-video | 919b2f44e85647c096c6b734c991635f1bfd1af9 | [
"MIT"
] | null | null | null | v = int(input('Digite a velocidade do carro: '))
if v<=80:
print('Dirija com segurança. Boa viagem.')
else:
print('Você foi multado por exeder o limite de 80km/h.')
m = (v - 80) * 7
print('A multa vai custar {:.2f} reais'.format(m)) | 35.285714 | 60 | 0.62753 | v = int(input('Digite a velocidade do carro: '))
if v<=80:
print('Dirija com segurança. Boa viagem.')
else:
print('Você foi multado por exeder o limite de 80km/h.')
m = (v - 80) * 7
print('A multa vai custar {:.2f} reais'.format(m)) | 0 | 0 | 0 |