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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8a7f3571cb178642df008d0c5562b9905d3d883 | 3,610 | py | Python | core/model/metric/proto_net.py | RuiBai1999/myrepo | 1cf51db063b922ef58ff11da998c3f12f643420d | [
"MIT"
] | 471 | 2021-09-13T11:28:34.000Z | 2022-03-30T07:26:54.000Z | core/model/metric/proto_net.py | liuwenqi528/LibFewShot | ea8d618995a51079c79a6291af2ca02b01b846ea | [
"MIT"
] | 24 | 2021-09-22T02:34:05.000Z | 2022-02-19T07:26:39.000Z | core/model/metric/proto_net.py | liuwenqi528/LibFewShot | ea8d618995a51079c79a6291af2ca02b01b846ea | [
"MIT"
] | 82 | 2021-09-16T12:48:01.000Z | 2022-03-28T06:57:47.000Z | # -*- coding: utf-8 -*-
"""
@inproceedings{DBLP:conf/nips/SnellSZ17,
author = {Jake Snell and
Kevin Swersky and
Richard S. Zemel},
title = {Prototypical Networks for Few-shot Learning},
booktitle = {Advances in Neural Information Processing Systems 30: Annual Conference
... | 33.425926 | 109 | 0.599446 | # -*- coding: utf-8 -*-
"""
@inproceedings{DBLP:conf/nips/SnellSZ17,
author = {Jake Snell and
Kevin Swersky and
Richard S. Zemel},
title = {Prototypical Networks for Few-shot Learning},
booktitle = {Advances in Neural Information Processing Systems 30: Annual Conference
... | 1,162 | 1,483 | 99 |
649554aaf9aaae9d433f8f0efefff7fec94c9eed | 1,611 | py | Python | apps/verizon/events.py | Poseidon-Dev/wadsworth | d02a5c2ab34cabebc571903c907ee5440aac5b2a | [
"MIT"
] | null | null | null | apps/verizon/events.py | Poseidon-Dev/wadsworth | d02a5c2ab34cabebc571903c907ee5440aac5b2a | [
"MIT"
] | 40 | 2021-03-18T21:28:23.000Z | 2021-07-02T05:01:37.000Z | apps/verizon/events.py | Poseidon-Dev/wadsworth | d02a5c2ab34cabebc571903c907ee5440aac5b2a | [
"MIT"
] | null | null | null | import discord, os, platform, asyncio, csv
from discord import channel
from discord.ext import commands
import re
import core.config
from apps.verizon.utils import verizon_csv, OUT_REPORTS
| 38.357143 | 94 | 0.554314 | import discord, os, platform, asyncio, csv
from discord import channel
from discord.ext import commands
import re
import core.config
from apps.verizon.utils import verizon_csv, OUT_REPORTS
class VerizonEvents(commands.Cog, name='verizon_events'):
def __init__(self, bot):
self.bot = bot
if core.con... | 1,267 | 132 | 22 |
2c0168386a31aecebe6e4bac70dbabb40b6a6459 | 12,337 | py | Python | amfast/class_def/__init__.py | limscoder/amfast | e77162615090b6a1ad03565afcc4bec4b46f6a11 | [
"MIT"
] | 4 | 2015-12-12T04:34:34.000Z | 2021-07-30T22:11:26.000Z | amfast/class_def/__init__.py | limscoder/amfast | e77162615090b6a1ad03565afcc4bec4b46f6a11 | [
"MIT"
] | 3 | 2015-03-23T23:45:30.000Z | 2016-08-17T01:32:51.000Z | amfast/class_def/__init__.py | limscoder/amfast | e77162615090b6a1ad03565afcc4bec4b46f6a11 | [
"MIT"
] | 8 | 2015-03-23T23:45:34.000Z | 2018-01-25T16:16:43.000Z | """Provides an interface for determining how Python objects are serialized and de-serialized."""
import threading
from amfast import AmFastError
class ClassDefError(AmFastError):
"""ClassDef related errors."""
pass
class ClassDef(object):
"""Defines how objects of a given class are serialized and de-seri... | 34.752113 | 101 | 0.638162 | """Provides an interface for determining how Python objects are serialized and de-serialized."""
import threading
from amfast import AmFastError
class ClassDefError(AmFastError):
"""ClassDef related errors."""
pass
class ClassDef(object):
"""Defines how objects of a given class are serialized and de-seri... | 684 | 0 | 166 |
af40a8496ad76d848c92c910a587cb63d768c727 | 696 | py | Python | components/mpas-seaice/testing_and_setup/testcases/single_cell/run_testcase.py | katsmith133/E3SM | 996c7e7aa3150822b81b0e34c427b820c74268a2 | [
"BSD-3-Clause"
] | 1 | 2022-03-03T19:09:42.000Z | 2022-03-03T19:09:42.000Z | components/mpas-seaice/testing_and_setup/testcases/single_cell/run_testcase.py | katsmith133/E3SM | 996c7e7aa3150822b81b0e34c427b820c74268a2 | [
"BSD-3-Clause"
] | 7 | 2021-11-16T23:50:53.000Z | 2022-03-21T17:00:30.000Z | components/mpas-seaice/testing_and_setup/testcases/single_cell/run_testcase.py | katsmith133/E3SM | 996c7e7aa3150822b81b0e34c427b820c74268a2 | [
"BSD-3-Clause"
] | null | null | null | import os
from plot_testcase import plot_testcase
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if __name__ == "__main__":
run_testcase()
| 26.769231 | 87 | 0.524425 | import os
from plot_testcase import plot_testcase
#-------------------------------------------------------------------------------
def run_testcase():
# copy namelist and streams file
os.system("cp ../../configurations/standard_physics_single_cell/namelist.seaice .")
os.system("cp ../../configurations/st... | 411 | 0 | 23 |
f50fe79d406abfe3d682d940fe0258fd5f8c1809 | 1,911 | py | Python | audio_split.py | grahamheather/MINT-Speech-Recognition | 51c0a56088b3b2020be2e125e523df25c0e82621 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | audio_split.py | grahamheather/MINT-Speech-Recognition | 51c0a56088b3b2020be2e125e523df25c0e82621 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | audio_split.py | grahamheather/MINT-Speech-Recognition | 51c0a56088b3b2020be2e125e523df25c0e82621 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import os
import argparse
from pydub import AudioSegment
from pydub.silence import split_on_silence
if __name__ == "__main__":
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, description="Split an audio file on silence.")
parser.add_argument('audio_file', help='the audio fi... | 36.75 | 177 | 0.773417 | import os
import argparse
from pydub import AudioSegment
from pydub.silence import split_on_silence
class AudioSettingsContainer:
def __init__(self, min_silence_len, silence_thresh, keep_silence):
self.min_silence_len = min_silence_len
self.silence_thresh = silence_thresh
self.keep_silence = keep_silence
def... | 1,042 | 8 | 69 |
69eb9698f7e39688eb5f844d8b2719e92936aaf2 | 1,794 | py | Python | venv/Lib/site-packages/rest_framework_extras/tests/forms.py | LishenZz/my_project | c2ac8199efb467e303d343ea34ed1969b64280d7 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/rest_framework_extras/tests/forms.py | LishenZz/my_project | c2ac8199efb467e303d343ea34ed1969b64280d7 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/rest_framework_extras/tests/forms.py | LishenZz/my_project | c2ac8199efb467e303d343ea34ed1969b64280d7 | [
"Apache-2.0"
] | null | null | null | from django import forms
from rest_framework_extras.tests import models
| 29.409836 | 91 | 0.613712 | from django import forms
from rest_framework_extras.tests import models
class WithFormForm(forms.ModelForm):
class Meta:
model = models.WithForm
fields = (
"editable_field",
"another_editable_field",
"foreign_field",
"many_field"
)
class ... | 1,075 | 597 | 46 |
c30631a2186e2da2987d31b03216293e8a47c2b1 | 16,866 | py | Python | tests/unit/async_/work/test_result.py | artcg/neo4j-python-driver | 97185f7e435d8f541d8b1445b3164668e56db177 | [
"Apache-2.0"
] | null | null | null | tests/unit/async_/work/test_result.py | artcg/neo4j-python-driver | 97185f7e435d8f541d8b1445b3164668e56db177 | [
"Apache-2.0"
] | null | null | null | tests/unit/async_/work/test_result.py | artcg/neo4j-python-driver | 97185f7e435d8f541d8b1445b3164668e56db177 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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... | 35.733051 | 83 | 0.61206 | # Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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... | 13,457 | 543 | 490 |
a57a576eda6592f977025fc53370d55ab424d53e | 589 | py | Python | project_name/tests/fixtures/apps_settings.py | thnee/django-template | d1e4f8dfe65c86f64c9a06c8cc195dbe6658320e | [
"MIT"
] | 1 | 2018-07-20T23:35:32.000Z | 2018-07-20T23:35:32.000Z | project_name/tests/fixtures/apps_settings.py | thnee/django-template | d1e4f8dfe65c86f64c9a06c8cc195dbe6658320e | [
"MIT"
] | null | null | null | project_name/tests/fixtures/apps_settings.py | thnee/django-template | d1e4f8dfe65c86f64c9a06c8cc195dbe6658320e | [
"MIT"
] | null | null | null |
import importlib
import pytest
@pytest.fixture
@pytest.fixture
| 20.310345 | 70 | 0.716469 |
import importlib
import pytest
def load_settings(app_name, settings):
APP_SETTINGS = [
'INSTALLED_APPS',
'ROOT_URLCONF',
'AUTH_USER_MODEL',
]
module_name = 'settings.apps.{app_name}'.format(app_name=app_name)
app_settings = importlib.import_module(module_name)
for setti... | 452 | 0 | 67 |
296c37c82ec0c80065e417707dc0dac24a4cc265 | 2,484 | py | Python | smtpdfix/smtp.py | jeremysprofile/smtpdfix | 46ead66aafbda18d83b583dff1c4dc0430c85306 | [
"MIT"
] | null | null | null | smtpdfix/smtp.py | jeremysprofile/smtpdfix | 46ead66aafbda18d83b583dff1c4dc0430c85306 | [
"MIT"
] | null | null | null | smtpdfix/smtp.py | jeremysprofile/smtpdfix | 46ead66aafbda18d83b583dff1c4dc0430c85306 | [
"MIT"
] | null | null | null | import logging
from aiosmtpd.smtp import MISSING, SMTP, Session, syntax
from .config import Config
from .handlers import AUTH_REQUIRED
log = logging.getLogger(__name__)
| 34.985915 | 80 | 0.623591 | import logging
from aiosmtpd.smtp import MISSING, SMTP, Session, syntax
from .config import Config
from .handlers import AUTH_REQUIRED
log = logging.getLogger(__name__)
class AuthSession(Session):
def __init__(self, loop):
super().__init__(loop)
self.authenticated = False
clas... | 2,005 | 219 | 76 |
c6f6a44fa1725d55f292b7501c236447623f2d46 | 942 | py | Python | data/external/repositories_2to3/119820/kaggle-seizure-prediction-master/thesis_scripts/params_calc.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/119820/kaggle-seizure-prediction-master/thesis_scripts/params_calc.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories_2to3/119820/kaggle-seizure-prediction-master/thesis_scripts/params_calc.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | nfreq_bands = 7
win_length_sec = 120
stride_sec = 120
n_channels = 16
n_timesteps = (600-win_length_sec)/stride_sec + 1
global_pooling = 1
nkerns = [16, 32, 512]
recept_width = [1, 1]
stride = [1, 1]
pool_width = [1, 1]
n_params = 0
c1_input_width = n_timesteps
print('c1:', nkerns[0], '@', ((n_timeste... | 30.387097 | 99 | 0.653928 | nfreq_bands = 7
win_length_sec = 120
stride_sec = 120
n_channels = 16
n_timesteps = (600-win_length_sec)/stride_sec + 1
global_pooling = 1
nkerns = [16, 32, 512]
recept_width = [1, 1]
stride = [1, 1]
pool_width = [1, 1]
n_params = 0
c1_input_width = n_timesteps
print('c1:', nkerns[0], '@', ((n_timeste... | 0 | 0 | 0 |
4393f5f0ca144b153266589c66804471f7553fc2 | 221 | py | Python | source/gps/algorithm/dynamics/config.py | shercklo/LTO-CMA | 9ce5cf4a07f9d85360de3bc40c0699ea476a0b39 | [
"Apache-2.0"
] | 7 | 2020-08-06T08:59:23.000Z | 2021-06-01T08:46:22.000Z | source/gps/algorithm/dynamics/config.py | shercklo/LTO-CMA | 9ce5cf4a07f9d85360de3bc40c0699ea476a0b39 | [
"Apache-2.0"
] | 4 | 2020-12-08T22:23:16.000Z | 2022-02-10T05:12:05.000Z | source/gps/algorithm/dynamics/config.py | shercklo/LTO-CMA | 9ce5cf4a07f9d85360de3bc40c0699ea476a0b39 | [
"Apache-2.0"
] | 1 | 2021-03-05T14:18:28.000Z | 2021-03-05T14:18:28.000Z | """ Default configuration and hyperparameter values for dynamics objects. """
# DynamicsPriorGMM
DYN_PRIOR_GMM = {
'min_samples_per_cluster': 20,
'max_clusters': 50,
'max_samples': 20,
'strength': 1.0,
}
| 22.1 | 77 | 0.687783 | """ Default configuration and hyperparameter values for dynamics objects. """
# DynamicsPriorGMM
DYN_PRIOR_GMM = {
'min_samples_per_cluster': 20,
'max_clusters': 50,
'max_samples': 20,
'strength': 1.0,
}
| 0 | 0 | 0 |
296f623cabb173a3999c60c4ec4b232e1bd4e2ad | 455 | py | Python | Task1B.py | cued-ia-computing/flood-pj354-ystt2 | d03644430d3a9b6f52d76129a5854d7eb298715b | [
"MIT"
] | null | null | null | Task1B.py | cued-ia-computing/flood-pj354-ystt2 | d03644430d3a9b6f52d76129a5854d7eb298715b | [
"MIT"
] | null | null | null | Task1B.py | cued-ia-computing/flood-pj354-ystt2 | d03644430d3a9b6f52d76129a5854d7eb298715b | [
"MIT"
] | null | null | null | from floodsystem.stationdata import build_station_list
from floodsystem.geo import stations_by_distance, stations_with_radius, rivers_with_stations, stations_by_river
import itertools
stations = build_station_list()
p = (52.2053, 0.1218) # coords of cambridge
print("closest 10 stations from cambridge: {}".format(sta... | 50.555556 | 111 | 0.806593 | from floodsystem.stationdata import build_station_list
from floodsystem.geo import stations_by_distance, stations_with_radius, rivers_with_stations, stations_by_river
import itertools
stations = build_station_list()
p = (52.2053, 0.1218) # coords of cambridge
print("closest 10 stations from cambridge: {}".format(sta... | 0 | 0 | 0 |
e05c17b9367d48d846795ae4d0215a7b2482006d | 811 | py | Python | examples/02_simple_attractor_ring_network.py | marsgr6/ann | 64c051263fd1f80d8f596b217fe733e0e1b4c2fa | [
"MIT"
] | 1 | 2021-05-25T23:43:44.000Z | 2021-05-25T23:43:44.000Z | examples/02_simple_attractor_ring_network.py | marsgr6/ann | 64c051263fd1f80d8f596b217fe733e0e1b4c2fa | [
"MIT"
] | null | null | null | examples/02_simple_attractor_ring_network.py | marsgr6/ann | 64c051263fd1f80d8f596b217fe733e0e1b4c2fa | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from ann import attractor_network as AA
from ann import pattern as p
import numpy as np
N = 1024 # Number of neurons
K = 4 # Degree
a = 0.5 # Sparseness
T = 800 # Steps
# Create network with same parameters as above
activity_net = AA.SimpleAttractor(N, K, a, "ring")
print(activity_net... | 25.34375 | 62 | 0.760789 | import matplotlib.pyplot as plt
from ann import attractor_network as AA
from ann import pattern as p
import numpy as np
N = 1024 # Number of neurons
K = 4 # Degree
a = 0.5 # Sparseness
T = 800 # Steps
# Create network with same parameters as above
activity_net = AA.SimpleAttractor(N, K, a, "ring")
print(activity_net... | 0 | 0 | 0 |
f739c519bdff3ea0513a876d0a9b7c47e6b5da68 | 3,963 | py | Python | ClassifierCode/classifier_builder.py | annaw3558/BankNoteClassifier | 18605b44f949a84bf78b43dec741ca003d17209c | [
"MIT"
] | null | null | null | ClassifierCode/classifier_builder.py | annaw3558/BankNoteClassifier | 18605b44f949a84bf78b43dec741ca003d17209c | [
"MIT"
] | null | null | null | ClassifierCode/classifier_builder.py | annaw3558/BankNoteClassifier | 18605b44f949a84bf78b43dec741ca003d17209c | [
"MIT"
] | null | null | null | '''This program contains the functions averageFinder and midpointFinder. AverageData calculates the averages of the
"columns" of a list of numbers (a list of lists of numbers) for real and fake samples (separately) and midpointFinder
finds the midpoint between the real and fake averages.
Data is either given from the t... | 43.076087 | 123 | 0.685592 | '''This program contains the functions averageFinder and midpointFinder. AverageData calculates the averages of the
"columns" of a list of numbers (a list of lists of numbers) for real and fake samples (separately) and midpointFinder
finds the midpoint between the real and fake averages.
Data is either given from the t... | 0 | 0 | 0 |
818bf3509597a12f4d23f992682047ce4d0bec6f | 7,334 | py | Python | scripts/git_remotes_setting.py | lonsty/gitclk | df70bee793225905053066d3b71380908e883a58 | [
"MIT"
] | null | null | null | scripts/git_remotes_setting.py | lonsty/gitclk | df70bee793225905053066d3b71380908e883a58 | [
"MIT"
] | null | null | null | scripts/git_remotes_setting.py | lonsty/gitclk | df70bee793225905053066d3b71380908e883a58 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
# @Author: allen
# @Date: Nov 29 11:07 2019
import configparser
import json
import locale
import os
import re
import sys
from collections import OrderedDict
import click
from dialog import Dialog
__author__ = 'Allen Shaw'
__version__ = '0.1.1'
CONFIG = os.path.expanduser('~/.config/gitclk/config/c... | 35.95098 | 108 | 0.593128 | #! /usr/bin/python3
# @Author: allen
# @Date: Nov 29 11:07 2019
import configparser
import json
import locale
import os
import re
import sys
from collections import OrderedDict
import click
from dialog import Dialog
__author__ = 'Allen Shaw'
__version__ = '0.1.1'
CONFIG = os.path.expanduser('~/.config/gitclk/config/c... | 5,997 | 0 | 181 |
670abde2985288602ad77426b29b42b8ec93d122 | 7,279 | py | Python | python3/test/test_validators.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | python3/test/test_validators.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | python3/test/test_validators.py | zhudanfei/json-schema-dsl | 26323e8440a404610998a67912ecefb243bf788c | [
"MIT"
] | null | null | null | import unittest
from src import validators
if __name__ == '__main__':
unittest.main()
| 27.996154 | 69 | 0.588955 | import unittest
from src import validators
class TestNotNull(unittest.TestCase):
def test_none(self):
try:
validators.NotNull(None, ['node'])
self.assertTrue(False)
except ValueError as ex:
self.assertEqual('node: Cannot be null', ex.args[0])
def test_not_... | 5,686 | 214 | 1,275 |
84062c4e1a1979d6f1ecbac6fa43902d87783cf9 | 1,635 | py | Python | tvsched/application/exceptions/schedule.py | astsu-dev/tv-schedule | 1cea36147e66b7163df6f7098cfda4d43f3bdde2 | [
"MIT"
] | null | null | null | tvsched/application/exceptions/schedule.py | astsu-dev/tv-schedule | 1cea36147e66b7163df6f7098cfda4d43f3bdde2 | [
"MIT"
] | null | null | null | tvsched/application/exceptions/schedule.py | astsu-dev/tv-schedule | 1cea36147e66b7163df6f7098cfda4d43f3bdde2 | [
"MIT"
] | null | null | null | from tvsched.application.models.schedule import EpisodeInSchedule, ShowInSchedule
class ShowAlreadyExistsInScheduleError(Exception):
"""Will be raised when trying to add already existed in schedule show to schedule"""
@property
class ShowOrScheduleNotFoundError(Exception):
"""Will be raised when trying... | 31.442308 | 88 | 0.744954 | from tvsched.application.models.schedule import EpisodeInSchedule, ShowInSchedule
class ShowAlreadyExistsInScheduleError(Exception):
"""Will be raised when trying to add already existed in schedule show to schedule"""
def __init__(self, show_in_schedule: ShowInSchedule) -> None:
self._show_in_schedul... | 650 | 0 | 212 |
e870b60975769c596ce90fae883ceded04583fdc | 374 | py | Python | tests/unit/backend/corpora/api_server/test_version.py | BuildJet/single-cell-data-portal | 080ad03f4745d59ade75c3480149e83bb76cf39b | [
"MIT"
] | 16 | 2020-05-12T23:25:51.000Z | 2021-06-17T12:04:13.000Z | tests/unit/backend/corpora/api_server/test_version.py | BuildJet/single-cell-data-portal | 080ad03f4745d59ade75c3480149e83bb76cf39b | [
"MIT"
] | 943 | 2020-05-11T18:03:59.000Z | 2021-08-18T21:57:51.000Z | tests/unit/backend/corpora/api_server/test_version.py | BuildJet/single-cell-data-portal | 080ad03f4745d59ade75c3480149e83bb76cf39b | [
"MIT"
] | 2 | 2020-12-19T10:04:24.000Z | 2021-06-19T12:38:23.000Z | import os
from mock import patch
import json
from tests.unit.backend.corpora.api_server.base_api_test import BaseAuthAPITest
| 28.769231 | 79 | 0.73262 | import os
from mock import patch
import json
from tests.unit.backend.corpora.api_server.base_api_test import BaseAuthAPITest
class TestVersion(BaseAuthAPITest):
@patch.dict(os.environ, {"COMMIT_SHA": "test"})
def test_get(self):
response = self.app.get("/dp/v1/deployed_version")
self.assertEq... | 132 | 92 | 23 |
8063e17fbc18f29efe1957e1f96a7741bb9bc633 | 360 | py | Python | idprovider/models.py | acdh-oeaw/gtrans | 6f56b1d09de0cad503273bf8a01cd81e25220524 | [
"MIT"
] | 1 | 2020-03-15T16:14:02.000Z | 2020-03-15T16:14:02.000Z | idprovider/models.py | acdh-oeaw/gtrans | 6f56b1d09de0cad503273bf8a01cd81e25220524 | [
"MIT"
] | 14 | 2018-11-09T08:34:23.000Z | 2022-02-10T08:15:53.000Z | idprovider/models.py | acdh-oeaw/gtrans | 6f56b1d09de0cad503273bf8a01cd81e25220524 | [
"MIT"
] | null | null | null | from django.db import models
| 24 | 56 | 0.669444 | from django.db import models
class IdProvider(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
checked = models.BooleanField(
verbose_name="checked",
help_text="Check if everything is ok",
default=False
)
... | 0 | 307 | 23 |
8823920343f8d62db6c24a665dd5433c43476792 | 4,498 | py | Python | pytilemap/maplegenditem.py | allebacco/PyTileMap | 3e83b11b5e023d7ac0f14dd50515250dd020547e | [
"MIT"
] | 6 | 2018-06-13T00:41:05.000Z | 2020-10-12T19:48:24.000Z | pytilemap/maplegenditem.py | allebacco/PyTileMap | 3e83b11b5e023d7ac0f14dd50515250dd020547e | [
"MIT"
] | 1 | 2017-10-15T20:05:29.000Z | 2017-11-20T16:04:17.000Z | pytilemap/maplegenditem.py | allebacco/PyTileMap | 3e83b11b5e023d7ac0f14dd50515250dd020547e | [
"MIT"
] | 5 | 2016-04-21T11:59:20.000Z | 2020-07-16T03:45:30.000Z | from __future__ import print_function, absolute_import
from qtpy.QtCore import Qt, Slot, QRectF, QPointF
from qtpy.QtGui import QPen, QBrush, QColor
from qtpy.QtWidgets import QGraphicsObject, QGraphicsRectItem, QGraphicsItemGroup, \
QGraphicsSimpleTextItem, QGraphicsEllipseItem, QGraphicsLineItem
from .mapitems ... | 29.592105 | 84 | 0.63695 | from __future__ import print_function, absolute_import
from qtpy.QtCore import Qt, Slot, QRectF, QPointF
from qtpy.QtGui import QPen, QBrush, QColor
from qtpy.QtWidgets import QGraphicsObject, QGraphicsRectItem, QGraphicsItemGroup, \
QGraphicsSimpleTextItem, QGraphicsEllipseItem, QGraphicsLineItem
from .mapitems ... | 2,601 | 1,269 | 208 |
861affe4f349d0e3e1a09843566f499469ee4d61 | 139,634 | py | Python | src/genie/libs/parser/iosxe/show_lisp.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | 2 | 2021-01-27T03:37:39.000Z | 2021-01-27T03:40:50.000Z | src/genie/libs/parser/iosxe/show_lisp.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/show_lisp.py | mirzawaqasahmed/genieparser | d6ce6f0cfd31aa6b0eef042f184e273e48b9d4d7 | [
"Apache-2.0"
] | null | null | null | ''' show_lisp.py
IOSXE parsers for the following show commands:
* show lisp session
* show lisp platform
* show lisp all extranet <extranet> instance-id <instance_id>
* show lisp all instance-id <instance_id> dynamic-eid detail
* show lisp all service ipv4
* show lisp all service ipv6
* sho... | 42.990764 | 105 | 0.406513 | ''' show_lisp.py
IOSXE parsers for the following show commands:
* show lisp session
* show lisp platform
* show lisp all extranet <extranet> instance-id <instance_id>
* show lisp all instance-id <instance_id> dynamic-eid detail
* show lisp all service ipv4
* show lisp all service ipv6
* sho... | 96,030 | 0 | 351 |
5e78f403cc852ace716d8b2f648ee3e2ff373ed8 | 1,771 | py | Python | alipay/aop/api/domain/AftFinsecureRiskplusSecurityPolicyQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AftFinsecureRiskplusSecurityPolicyQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AftFinsecureRiskplusSecurityPolicyQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.EventInfo import EventInfo
| 29.516667 | 89 | 0.644833 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.EventInfo import EventInfo
class AftFinsecureRiskplusSecurityPolicyQueryModel(object):
def __init__(self):
self._event_info = None
self._product... | 1,237 | 328 | 23 |
0aee884f4044f7b6ddda2ef8e3a002ffad99c836 | 1,972 | py | Python | coursecake/scrapers/course.py | nananananate/CourseScraper | 4ef40cb2bd5f42177c8596fd18ead66b4a9d2379 | [
"MIT"
] | 21 | 2020-07-18T01:17:53.000Z | 2021-09-11T08:28:59.000Z | coursecake/scrapers/course.py | AlfiyaZi/CourseCake | be2af4d0025f2963ed83001004f87df2c6d8b71d | [
"MIT"
] | 4 | 2020-10-03T00:22:20.000Z | 2021-03-31T19:54:33.000Z | coursecake/scrapers/course.py | AlfiyaZi/CourseCake | be2af4d0025f2963ed83001004f87df2c6d8b71d | [
"MIT"
] | 4 | 2020-09-05T05:17:26.000Z | 2020-10-16T05:49:34.000Z | import copy
class Course:
"""
All information needed to be collected about a course
"""
def __init__(
self,
course_dict=None,
course=None,
):
"""
All None attributes must be provided
Can be constructed as empty, from a dictionary
"""
... | 23.2 | 78 | 0.533976 | import copy
class Course:
"""
All information needed to be collected about a course
"""
def __init__(
self,
course_dict=None,
course=None,
):
"""
All None attributes must be provided
Can be constructed as empty, from a dictionary
"""
... | 590 | 0 | 108 |
296da7520a82e6b39740ad3971be880ce675dc15 | 265 | py | Python | widget_periodictable/tests/test_example.py | osscar-org/widget-periodictable | 35264ce79e6b9e82dcdfe17558a7a17ac6c24e96 | [
"BSD-3-Clause"
] | 2 | 2020-03-27T04:20:55.000Z | 2020-08-25T18:20:57.000Z | widget_periodictable/tests/test_example.py | osscar-org/widget-periodictable | 35264ce79e6b9e82dcdfe17558a7a17ac6c24e96 | [
"BSD-3-Clause"
] | 15 | 2020-05-06T17:03:16.000Z | 2021-11-08T15:41:51.000Z | widget_periodictable/tests/test_example.py | osscar-org/widget-periodictable | 35264ce79e6b9e82dcdfe17558a7a17ac6c24e96 | [
"BSD-3-Clause"
] | 2 | 2020-07-07T19:07:04.000Z | 2022-03-01T02:52:58.000Z | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Dou Du.
# Distributed under the terms of the Modified BSD License.
import pytest
from ..periodic_table import PTableWidget
| 17.666667 | 58 | 0.724528 | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Dou Du.
# Distributed under the terms of the Modified BSD License.
import pytest
from ..periodic_table import PTableWidget
def test_example_creation_blank():
w = PTableWidget()
assert w.states == 1
| 61 | 0 | 23 |
6d19afbc06ea546d7bf71d5095659e63bc2f564e | 1,634 | py | Python | scripts/datasets/mvsec_convert_night_groundtruth.py | SensorsINI/v2e_exps_public | d3ec8c2ecda29eb8cae8dd47869449f8cdcbd87a | [
"MIT"
] | 3 | 2022-01-03T15:29:24.000Z | 2022-03-04T13:43:37.000Z | scripts/datasets/mvsec_convert_night_groundtruth.py | SensorsINI/v2e_exps_public | d3ec8c2ecda29eb8cae8dd47869449f8cdcbd87a | [
"MIT"
] | null | null | null | scripts/datasets/mvsec_convert_night_groundtruth.py | SensorsINI/v2e_exps_public | d3ec8c2ecda29eb8cae8dd47869449f8cdcbd87a | [
"MIT"
] | null | null | null | """Groundtruth saved in XML, saved as compatible format in txt.
Author: Yuhuang Hu
Email : yuhuang.hu@ini.uch.ch
"""
import argparse
import os
import glob
import json
import xmltodict
from v2e_exps.utils import expandpath
parser = argparse.ArgumentParser()
parser.add_argument("--data_root", type=expandpath)
parser... | 23.681159 | 75 | 0.596083 | """Groundtruth saved in XML, saved as compatible format in txt.
Author: Yuhuang Hu
Email : yuhuang.hu@ini.uch.ch
"""
import argparse
import os
import glob
import json
import xmltodict
from v2e_exps.utils import expandpath
parser = argparse.ArgumentParser()
parser.add_argument("--data_root", type=expandpath)
parser... | 0 | 0 | 0 |
a6ae443d9b80e2602554220cec23dc5bc418d79f | 4,712 | py | Python | xga/models/__init__.py | DavidT3/XGA | cde51c3f29f98b5f1e981fb6d327c04072b0ba38 | [
"BSD-3-Clause"
] | 12 | 2020-05-16T09:45:45.000Z | 2022-02-14T14:41:46.000Z | xga/models/__init__.py | DavidT3/XGA | cde51c3f29f98b5f1e981fb6d327c04072b0ba38 | [
"BSD-3-Clause"
] | 684 | 2020-05-28T08:52:09.000Z | 2022-03-31T10:56:24.000Z | xga/models/__init__.py | DavidT3/XGA | cde51c3f29f98b5f1e981fb6d327c04072b0ba38 | [
"BSD-3-Clause"
] | 2 | 2022-02-04T10:55:55.000Z | 2022-02-04T11:30:56.000Z | # This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (david.turner@sussex.ac.uk) 08/03/2021, 17:29. Copyright (c) David J Turner
import inspect
from types import FunctionType
# Doing star imports just because its more conveni... | 50.666667 | 118 | 0.732598 | # This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (david.turner@sussex.ac.uk) 08/03/2021, 17:29. Copyright (c) David J Turner
import inspect
from types import FunctionType
# Doing star imports just because its more conveni... | 0 | 0 | 0 |
3d8fdf51b23b1b165c83279b6f8d9cd73fbc3e82 | 5,308 | py | Python | os3_rll/operations/challenge.py | Erik-Lamers1/OS3-RRL-Python | c1fbc1f2279f1b43290582ee39ed226d8173a101 | [
"MIT"
] | null | null | null | os3_rll/operations/challenge.py | Erik-Lamers1/OS3-RRL-Python | c1fbc1f2279f1b43290582ee39ed226d8173a101 | [
"MIT"
] | null | null | null | os3_rll/operations/challenge.py | Erik-Lamers1/OS3-RRL-Python | c1fbc1f2279f1b43290582ee39ed226d8173a101 | [
"MIT"
] | null | null | null | from logging import getLogger
from datetime import datetime
from os3_rll.models.challenge import Challenge, ChallengeException
from os3_rll.models.player import Player, PlayerException
from os3_rll.models.db import Database
logger = getLogger(__name__)
def do_challenge_sanity_check(p1, p2, may_already_by_challenged... | 43.508197 | 127 | 0.681424 | from logging import getLogger
from datetime import datetime
from os3_rll.models.challenge import Challenge, ChallengeException
from os3_rll.models.player import Player, PlayerException
from os3_rll.models.db import Database
logger = getLogger(__name__)
def do_challenge_sanity_check(p1, p2, may_already_by_challenged... | 0 | 0 | 0 |
b1654dcf2537d523059b746f07e020438c1477d6 | 10,517 | py | Python | pyod/models/suod.py | BillyGareth/pyod | 4ad1ab8cd88382fe15c237e8db8ad8e3a9302eaf | [
"BSD-2-Clause"
] | 5,126 | 2018-11-09T06:05:38.000Z | 2022-03-31T14:25:14.000Z | pyod/models/suod.py | durgeshsamariya/pyod | dfafc57f74dc3d49d0166f21ab2ddb97e3d1d898 | [
"BSD-2-Clause"
] | 325 | 2018-11-14T20:02:39.000Z | 2022-03-30T22:49:38.000Z | pyod/models/suod.py | durgeshsamariya/pyod | dfafc57f74dc3d49d0166f21ab2ddb97e3d1d898 | [
"BSD-2-Clause"
] | 1,049 | 2018-11-09T06:12:12.000Z | 2022-03-31T06:21:28.000Z | # -*- coding: utf-8 -*-
"""SUOD
"""
# Author: Yue Zhao <zhaoy@cmu.edu>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
import numpy as np
from sklearn.utils import check_array
from sklearn.utils.validation import check_is_fitted
try:
import suod
except ImportError:
... | 38.383212 | 79 | 0.658458 | # -*- coding: utf-8 -*-
"""SUOD
"""
# Author: Yue Zhao <zhaoy@cmu.edu>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
import numpy as np
from sklearn.utils import check_array
from sklearn.utils.validation import check_is_fitted
try:
import suod
except ImportError:
... | 2,629 | 0 | 27 |
0dc105afeb6b53b12ab37cf4662631842f1f18cb | 2,004 | py | Python | model/evaluate/get_errorrates_direct.py | manojakm/sanskrit-ocr-1 | 4a7b58dd68ef30e8a849acde3fff1595b4c607c9 | [
"MIT"
] | 1 | 2021-08-06T15:29:07.000Z | 2021-08-06T15:29:07.000Z | model/evaluate/get_errorrates_direct.py | Sanskrit-Club/sanskrit-ocr | de908c1a62df8539b22a2458b2dfd4bd07462009 | [
"MIT"
] | null | null | null | model/evaluate/get_errorrates_direct.py | Sanskrit-Club/sanskrit-ocr | de908c1a62df8539b22a2458b2dfd4bd07462009 | [
"MIT"
] | 1 | 2020-11-07T08:37:52.000Z | 2020-11-07T08:37:52.000Z | from jiwer import wer
import os
import sys
gt_file = sys.argv[1]
pred_file = sys.argv[2]
with open(gt_file) as f:
gt_lines = f.readlines()
gt_lines = [' '.join(x.strip().split()) for x in gt_lines]
print(len(gt_lines))
with open(pred_file) as f:
pred_lines = f.readlines()
pred_lines = [' '.join(x.strip... | 25.05 | 94 | 0.613772 | from jiwer import wer
def levenshteinDistance(s1, s2):
if len(s1) > len(s2):
s1, s2 = s2, s1
distances = range(len(s1) + 1)
for i2, c2 in enumerate(s2):
distances_ = [i2+1]
for i1, c1 in enumerate(s1):
if c1 == c2:
distances_.append(distances[i1])
... | 1,334 | 0 | 115 |
3eb137437b2d519897daab13ad2a80518b419484 | 396 | py | Python | QQbot/Model/ApiModel/gateway.py | hegugu-ng/qq_guild_bot | dac9b3313f52ed579564a9140dd46212f2249e8b | [
"MIT"
] | 15 | 2021-11-28T03:26:24.000Z | 2022-03-31T17:21:05.000Z | QQbot/Model/ApiModel/gateway.py | hegugu-ng/qq_guild_bot | dac9b3313f52ed579564a9140dd46212f2249e8b | [
"MIT"
] | 2 | 2021-11-28T15:02:57.000Z | 2021-12-01T09:30:58.000Z | QQbot/Model/ApiModel/gateway.py | hegugu-ng/qq_guild_bot | dac9b3313f52ed579564a9140dd46212f2249e8b | [
"MIT"
] | 2 | 2021-11-27T15:21:11.000Z | 2021-12-28T03:21:35.000Z | from pydantic import BaseModel
| 30.461538 | 56 | 0.69697 | from pydantic import BaseModel
class SessionStartLimit(BaseModel):
total:int #每 24 小时可创建 Session 数
remaining:int #目前还可以创建的 Session 数
reset_after:int #重置计数的剩余时间(ms)
max_concurrency:int #每 5s 可以创建的 Session 数
class Shards(BaseModel):
url:str # WebSocket 的连接地址
shards:... | 0 | 413 | 46 |
a020e88f0a5ea67f5eab54d5d815db2c78b66f2b | 6,109 | py | Python | matrix_tree_theorem.py | bekou/eacl-2017-dataset | 34d86f87b76118253e24bfa48aac1afa8771546f | [
"MIT"
] | 4 | 2017-10-09T14:15:59.000Z | 2021-12-28T20:28:56.000Z | matrix_tree_theorem.py | bekou/eacl-2017-dataset | 34d86f87b76118253e24bfa48aac1afa8771546f | [
"MIT"
] | null | null | null | matrix_tree_theorem.py | bekou/eacl-2017-dataset | 34d86f87b76118253e24bfa48aac1afa8771546f | [
"MIT"
] | 2 | 2019-05-26T15:55:36.000Z | 2021-12-28T20:31:26.000Z | import networkx as nx
import numpy as np
import math
import pandas as pd
from networkx.drawing.nx_agraph import graphviz_layout
import matplotlib
from time import gmtime, strftime
import scipy
margFeat=[]
| 28.680751 | 122 | 0.50974 | import networkx as nx
import numpy as np
import math
import pandas as pd
from networkx.drawing.nx_agraph import graphviz_layout
import matplotlib
from time import gmtime, strftime
import scipy
margFeat=[]
def getAdjacency(theta):
adjacency=np.exp(theta)
#print "adjacency max "+str(np.amax(adjacency))
np.f... | 5,689 | 0 | 196 |
a363cb8cd2452287adee8c1d66bd9c7d3d75a36c | 11,631 | py | Python | app/config_tablero.py | diegoag30/ScrabbleAr | e309b21ec60148b290c45f4edc6bf90d391d144a | [
"MIT"
] | 3 | 2020-05-26T21:02:48.000Z | 2020-08-06T03:19:54.000Z | app/config_tablero.py | diegoag30/ScrabbleAr | e309b21ec60148b290c45f4edc6bf90d391d144a | [
"MIT"
] | null | null | null | app/config_tablero.py | diegoag30/ScrabbleAr | e309b21ec60148b290c45f4edc6bf90d391d144a | [
"MIT"
] | null | null | null | class EstadBoton:
'''Esta clase maneja la configuracion del tablero,
ya sea el valor de las casillas, los colores, y el estado de los botones '''
| 42.141304 | 111 | 0.664861 | class EstadBoton:
'''Esta clase maneja la configuracion del tablero,
ya sea el valor de las casillas, los colores, y el estado de los botones '''
def __init__(self,valor=1,color='',estado=False,tipo='L'): # valor es 1 por defecto para multiplicar la L o P
self._estado = estado
self._valor = valor
self._... | 11,191 | 0 | 230 |
53b8cce64b74ac679ed9a39c6abcc9ab434be4f6 | 24,672 | py | Python | pandas/stats/plm.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 652 | 2015-07-26T00:00:17.000Z | 2022-02-24T18:30:04.000Z | pandas/stats/plm.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 8 | 2015-09-07T03:38:19.000Z | 2021-05-23T03:18:51.000Z | pandas/stats/plm.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 40 | 2015-07-24T19:45:08.000Z | 2021-11-01T14:54:56.000Z | """
Linear regression objects for panel data
"""
# pylint: disable-msg=W0231
# pylint: disable-msg=E1101,E1103
from __future__ import division
from pandas.compat import range
from pandas import compat
import warnings
import numpy as np
from pandas.core.panel import Panel
from pandas.core.frame import DataFrame
from... | 29.09434 | 83 | 0.560271 | """
Linear regression objects for panel data
"""
# pylint: disable-msg=W0231
# pylint: disable-msg=E1101,E1103
from __future__ import division
from pandas.compat import range
from pandas import compat
import warnings
import numpy as np
from pandas.core.panel import Panel
from pandas.core.frame import DataFrame
from... | 9,684 | 0 | 747 |
409610d1dd2cdf8851c1ac5fbe9219d4daecb716 | 2,857 | py | Python | lightning_transformers/task/nlp/question_answering/config.py | mariomeissner/lightning-transformers | 4efda7b4e924b37956c7a008ca01819f5c3f98c8 | [
"Apache-2.0"
] | 451 | 2021-04-21T15:53:59.000Z | 2022-03-29T10:39:45.000Z | lightning_transformers/task/nlp/question_answering/config.py | mathemusician/lightning-transformers | b2ef06113433e6a178ce4d3c9df7ede8064e247f | [
"Apache-2.0"
] | 92 | 2021-04-21T18:42:58.000Z | 2022-03-30T05:29:54.000Z | lightning_transformers/task/nlp/question_answering/config.py | mathemusician/lightning-transformers | b2ef06113433e6a178ce4d3c9df7ede8064e247f | [
"Apache-2.0"
] | 51 | 2021-04-22T05:35:28.000Z | 2022-03-17T13:08:12.000Z | # Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 41.405797 | 117 | 0.676234 | # Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 400 | 0 | 27 |
0e4f69138aecd1313f122259efebb214ee565651 | 19,502 | py | Python | venv/Lib/site-packages/tensorboard/uploader/proto/server_info_pb2.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | venv/Lib/site-packages/tensorboard/uploader/proto/server_info_pb2.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | venv/Lib/site-packages/tensorboard/uploader/proto/server_info_pb2.py | masterrey/SmartMachines | e48aff314b1171a13a39c3a41230d900bf090a1f | [
"Apache-2.0"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorboard/uploader/proto/server_info.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor a... | 40.127572 | 1,788 | 0.762383 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorboard/uploader/proto/server_info.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor a... | 0 | 0 | 0 |
5dc6cd1f424f32bce276160e04c696e0871379df | 971 | py | Python | PycharmProjects/PythonExercicios/ex051.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | PycharmProjects/PythonExercicios/ex051.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | PycharmProjects/PythonExercicios/ex051.py | RodrigoMASRamos/Projects.py | ed15981b320914c9667305dcd5fb5b7906fd9b00 | [
"MIT"
] | null | null | null | # Exercício Python #051 - Progressão Aritmética
#
# Desenvolva um programa que leia o PRIMEIRO TERMO e a RAZÃO de uma PA. No final, mostre os 10 primeiros termos dessa
# progressão.
#
# OBS: Eu tentei realizar esse exercicio, fiz o codígo mas ele apresentou ERRO DE LÓGICA! Estude mais P.A e
# esse conteudo!
print('\03... | 38.84 | 117 | 0.677652 | # Exercício Python #051 - Progressão Aritmética
#
# Desenvolva um programa que leia o PRIMEIRO TERMO e a RAZÃO de uma PA. No final, mostre os 10 primeiros termos dessa
# progressão.
#
# OBS: Eu tentei realizar esse exercicio, fiz o codígo mas ele apresentou ERRO DE LÓGICA! Estude mais P.A e
# esse conteudo!
print('\03... | 0 | 0 | 0 |
d65cf02411616f4d20773f38a117a5e0f588a6fa | 8,757 | py | Python | app/main/lib/shared_models/audio_model.py | meedan/alegre | ad28736f53b8905882e196e90cac66d39db341a3 | [
"MIT"
] | 11 | 2018-02-07T00:16:54.000Z | 2021-05-13T22:47:07.000Z | app/main/lib/shared_models/audio_model.py | meedan/alegre | ad28736f53b8905882e196e90cac66d39db341a3 | [
"MIT"
] | 47 | 2018-11-26T23:17:37.000Z | 2022-03-25T16:12:05.000Z | app/main/lib/shared_models/audio_model.py | meedan/alegre | ad28736f53b8905882e196e90cac66d39db341a3 | [
"MIT"
] | 9 | 2019-05-23T22:06:03.000Z | 2020-10-27T20:45:04.000Z | import json
import binascii
import uuid
import os
import tempfile
import pathlib
import urllib.error
import urllib.request
import shutil
from flask import current_app as app
from sqlalchemy.orm.attributes import flag_modified
from sqlalchemy import text
import tenacity
import numpy as np
from sqlalchemy.orm.exc import ... | 40.730233 | 156 | 0.557383 | import json
import binascii
import uuid
import os
import tempfile
import pathlib
import urllib.error
import urllib.request
import shutil
from flask import current_app as app
from sqlalchemy.orm.attributes import flag_modified
from sqlalchemy import text
import tenacity
import numpy as np
from sqlalchemy.orm.exc import ... | 7,601 | 644 | 46 |
95ba0fef43d174338ef023c953eae13b890ae3d8 | 4,353 | py | Python | chronosphere/analysis/ublb.py | chzhong25346/Chronosphere | 2db97939be3415ad508de6abe9ac79f3ee1d1eff | [
"Apache-2.0"
] | null | null | null | chronosphere/analysis/ublb.py | chzhong25346/Chronosphere | 2db97939be3415ad508de6abe9ac79f3ee1d1eff | [
"Apache-2.0"
] | null | null | null | chronosphere/analysis/ublb.py | chzhong25346/Chronosphere | 2db97939be3415ad508de6abe9ac79f3ee1d1eff | [
"Apache-2.0"
] | null | null | null | import logging
import pandas as pd
from datetime import timedelta
from ..models import Index, Quote, Quote_CSI300, Ublb_cross, Rsi_predict_report
from ..utils.utils import gen_id
from stockstats import StockDataFrame
logger = logging.getLogger('main.ublb')
pd.set_option('mode.chained_assignment', None)
| 43.53 | 100 | 0.47875 | import logging
import pandas as pd
from datetime import timedelta
from ..models import Index, Quote, Quote_CSI300, Ublb_cross, Rsi_predict_report
from ..utils.utils import gen_id
from stockstats import StockDataFrame
logger = logging.getLogger('main.ublb')
pd.set_option('mode.chained_assignment', None)
def ublb_cross... | 4,025 | 0 | 23 |
8837c89035b51cf7cab266a420e461edd6e2c565 | 90 | py | Python | wagtailrelevancy/__init__.py | takeflight/wagtail-relevancy | 3f4a9a57ccc19a8c829d67ee0088066b6c8bfc99 | [
"BSD-3-Clause"
] | 6 | 2016-01-11T03:34:51.000Z | 2016-08-09T12:01:49.000Z | wagtailrelevancy/__init__.py | takeflight/wagtail-relevancy | 3f4a9a57ccc19a8c829d67ee0088066b6c8bfc99 | [
"BSD-3-Clause"
] | null | null | null | wagtailrelevancy/__init__.py | takeflight/wagtail-relevancy | 3f4a9a57ccc19a8c829d67ee0088066b6c8bfc99 | [
"BSD-3-Clause"
] | null | null | null | __version__ = '0.1.0'
default_app_config = 'wagtailrelevancy.apps.WagtailRelevancyConfig'
| 30 | 67 | 0.822222 | __version__ = '0.1.0'
default_app_config = 'wagtailrelevancy.apps.WagtailRelevancyConfig'
| 0 | 0 | 0 |
d38d3934c21b6d276a3e00586b7ed8710fbe726f | 7,815 | py | Python | pysnmp/CISCO-BITS-CLOCK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/CISCO-BITS-CLOCK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/CISCO-BITS-CLOCK-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-BITS-CLOCK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-BITS-CLOCK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:34:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 128.114754 | 1,123 | 0.773512 | #
# PySNMP MIB module CISCO-BITS-CLOCK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-BITS-CLOCK-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:34:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 0 | 0 | 0 |
d49f1553d9a98b1b441ec08f4d61a010fb516748 | 582 | py | Python | bin/mining/sendTeamsMiningNoLootPoints.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | null | null | null | bin/mining/sendTeamsMiningNoLootPoints.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | null | null | null | bin/mining/sendTeamsMiningNoLootPoints.py | jgc128/crabada.py | cb50c9d4748786a6abedc822f2e1ee461d65e508 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Crabada script to send mining all available teams for
the given user.
Usage:
python3 -m bin.mining.sendTeamsMining <userAddress>
Author:
@coccoinomane (Twitter)
"""
from src.bot.mining.sendTeamsMining import sendTeamsMining
from src.helpers.general import secondOrNone
from src.mode... | 22.384615 | 66 | 0.773196 | #!/usr/bin/env python3
"""
Crabada script to send mining all available teams for
the given user.
Usage:
python3 -m bin.mining.sendTeamsMining <userAddress>
Author:
@coccoinomane (Twitter)
"""
from src.bot.mining.sendTeamsMining import sendTeamsMining
from src.helpers.general import secondOrNone
from src.mode... | 0 | 0 | 0 |
698ec42b59e7d538b3fb96fafeb9adbd0798c637 | 35 | py | Python | scratchpad/torch/back/__init__.py | danlkv/pywebviz | 5892ef90f28dbd43c33fefbfa5a199d15322a120 | [
"MIT"
] | null | null | null | scratchpad/torch/back/__init__.py | danlkv/pywebviz | 5892ef90f28dbd43c33fefbfa5a199d15322a120 | [
"MIT"
] | 3 | 2019-11-24T21:03:39.000Z | 2019-12-08T04:58:07.000Z | scratchpad/torch/back/__init__.py | DaniloZZZ/pywebviz | 5892ef90f28dbd43c33fefbfa5a199d15322a120 | [
"MIT"
] | null | null | null | from . import model as torchTensor
| 17.5 | 34 | 0.8 | from . import model as torchTensor
| 0 | 0 | 0 |
a11b678a4820dfd9056a9ce6b6e9288239599809 | 1,238 | py | Python | migrations/versions/e88bc62b6e4_event_tweaks.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 2 | 2019-06-11T20:46:43.000Z | 2020-08-27T22:50:32.000Z | migrations/versions/e88bc62b6e4_event_tweaks.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 70 | 2017-05-26T14:04:06.000Z | 2021-06-30T10:21:58.000Z | migrations/versions/e88bc62b6e4_event_tweaks.py | havanhuy1997/pmg-cms-2 | 21571235cf3d9552013bca29ab9af288b08e00d6 | [
"Apache-2.0"
] | 4 | 2017-08-29T10:09:30.000Z | 2021-05-25T11:29:03.000Z | """event_tweaks
Revision ID: e88bc62b6e4
Revises: 4d3c2b4ceacb
Create Date: 2015-03-17 14:04:09.394924
"""
# revision identifiers, used by Alembic.
revision = 'e88bc62b6e4'
down_revision = '4d3c2b4ceacb'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects i... | 30.195122 | 148 | 0.661551 | """event_tweaks
Revision ID: e88bc62b6e4
Revises: 4d3c2b4ceacb
Create Date: 2015-03-17 14:04:09.394924
"""
# revision identifiers, used by Alembic.
revision = 'e88bc62b6e4'
down_revision = '4d3c2b4ceacb'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects i... | 854 | 0 | 46 |
4a0e5d2b3f07b2545c2c72811134dafe9c142f43 | 1,363 | py | Python | tests/test_json.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | tests/test_json.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | tests/test_json.py | ysegorov/jukoro | 8be1d01b471c6091056df77ffacaee5cc8c470d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import decimal
from unittest import TestCase
from jukoro import arrow
from jukoro import json
from jukoro import pg
A = arrow.JuArrow
D = decimal.Decimal
| 23.912281 | 63 | 0.517241 | # -*- coding: utf-8 -*-
import datetime
import decimal
from unittest import TestCase
from jukoro import arrow
from jukoro import json
from jukoro import pg
A = arrow.JuArrow
D = decimal.Decimal
class TestJson(TestCase):
def test_arrow(self):
utcnow = arrow.utcnow()
now = arrow.now()
a... | 1,056 | 4 | 104 |
34d4876a4f197f9fddc9c4a61d9f7fd1c36bdc9e | 106 | py | Python | cdparacord/appinfo.py | fennekki/cdparacord | 483682bd476631202ae135b296425bc340f57173 | [
"BSD-2-Clause"
] | 1 | 2016-12-07T08:38:53.000Z | 2016-12-07T08:38:53.000Z | cdparacord/appinfo.py | fennekki/cdparacord | 483682bd476631202ae135b296425bc340f57173 | [
"BSD-2-Clause"
] | 49 | 2018-02-24T15:30:35.000Z | 2021-03-25T21:35:40.000Z | cdparacord/appinfo.py | fennekki/cdparacord | 483682bd476631202ae135b296425bc340f57173 | [
"BSD-2-Clause"
] | null | null | null | """Information about the app."""
__version__ = '0.5.0'
__url__ = 'https://github.com/fennekki/cdparacord'
| 26.5 | 50 | 0.707547 | """Information about the app."""
__version__ = '0.5.0'
__url__ = 'https://github.com/fennekki/cdparacord'
| 0 | 0 | 0 |
5b653ff48646d4879717136503610ccb87ccf792 | 1,289 | py | Python | download_mem.py | KenArck/WebRCP | d3feec9773c8958651f4b050c8aebc3fca4fa2f0 | [
"MIT"
] | null | null | null | download_mem.py | KenArck/WebRCP | d3feec9773c8958651f4b050c8aebc3fca4fa2f0 | [
"MIT"
] | null | null | null | download_mem.py | KenArck/WebRCP | d3feec9773c8958651f4b050c8aebc3fca4fa2f0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import serial, time, sys, fileinput
#open and configure serial port
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout = .1
)
#first, clear out 210 buffer
count = 0
while (co... | 17.186667 | 81 | 0.626067 | #!/usr/bin/python
import serial, time, sys, fileinput
#open and configure serial port
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout = .1
)
#first, clear out 210 buffer
count = 0
while (co... | 0 | 0 | 0 |
4adb0538bbe460de80c2fc2a9268111004a5b82a | 144 | py | Python | level-6/task-1/task-1-8-1.py | avedensky/python-rush-tasks | 61410816dbb55cce3b518f8d76799c01cdec2aa9 | [
"MIT"
] | 14 | 2019-06-13T09:55:25.000Z | 2022-03-19T15:12:36.000Z | level-6/task-1/task-1-8-1.py | avedensky/python-rush-tasks | 61410816dbb55cce3b518f8d76799c01cdec2aa9 | [
"MIT"
] | 1 | 2021-09-26T16:00:51.000Z | 2021-09-26T16:00:51.000Z | level-6/task-1/task-1-8-1.py | avedensky/python-rush-tasks | 61410816dbb55cce3b518f8d76799c01cdec2aa9 | [
"MIT"
] | 4 | 2020-12-12T16:50:31.000Z | 2022-02-08T12:16:11.000Z | #!/usr/bin/env python3
#coding: utf-8
"""
pythonic way
"""
lst = ['aaabb', 'caca', 'dabc', 'acc', 'abbb']
res = ','.join(lst[1:-1])
print(res)
| 14.4 | 46 | 0.555556 | #!/usr/bin/env python3
#coding: utf-8
"""
pythonic way
"""
lst = ['aaabb', 'caca', 'dabc', 'acc', 'abbb']
res = ','.join(lst[1:-1])
print(res)
| 0 | 0 | 0 |
d89b298120322bb3f2d818e4e9f698ec1a06bc1c | 655 | py | Python | src/neophile/dependency/pre_commit.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | null | null | null | src/neophile/dependency/pre_commit.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | 23 | 2020-07-17T23:27:44.000Z | 2022-03-21T19:39:19.000Z | src/neophile/dependency/pre_commit.py | lsst-sqre/neophile | 0923bd5b58851af13c09f73a05b1a2882434b437 | [
"MIT"
] | null | null | null | """A pre-commit hook dependency."""
from __future__ import annotations
from dataclasses import dataclass
from neophile.dependency.base import Dependency
__all__ = ["PreCommitDependency"]
@dataclass(frozen=True, order=True)
class PreCommitDependency(Dependency):
"""Represents a single pre-commit dependency."""... | 24.259259 | 74 | 0.714504 | """A pre-commit hook dependency."""
from __future__ import annotations
from dataclasses import dataclass
from neophile.dependency.base import Dependency
__all__ = ["PreCommitDependency"]
@dataclass(frozen=True, order=True)
class PreCommitDependency(Dependency):
"""Represents a single pre-commit dependency."""... | 0 | 0 | 0 |
1ccaa327ed60e19d773d59ccf22806c30fd7ccaf | 16,952 | py | Python | iot/nat64-dpkt.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 28 | 2018-08-09T13:10:34.000Z | 2022-01-07T13:39:31.000Z | iot/nat64-dpkt.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 4 | 2018-08-09T13:18:12.000Z | 2021-04-06T19:04:54.000Z | iot/nat64-dpkt.py | eric-erki/ai-smarthome | ca7316ebe72b0ad26f0b59e3186426633807cac8 | [
"BSD-2-Clause"
] | 15 | 2018-12-17T09:17:28.000Z | 2021-03-02T11:25:05.000Z | #!/bin/python3
#
# Copyright (c) 2019 Joakim Eriksson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list o... | 36.852174 | 108 | 0.568487 | #!/bin/python3
#
# Copyright (c) 2019 Joakim Eriksson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list o... | 11,575 | 566 | 300 |
e737c7becea69fa93f8f5ebee467579a3b47506c | 1,559 | py | Python | setup.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | setup.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | setup.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
from setuptools import setup
import os
import re
dependencies = [
'pandas>=0.16.0',
'numpy>=1.9.2',
'scipy>=1.6.0',
'statsmodels>=0.12.2',
'networkx>=2.5',
]
with open(os.path.join(os.path.dirname(__file__), "fixedeffect", "_version.py")) as file:
f... | 30.568627 | 89 | 0.604875 | from setuptools import setup, find_packages
from setuptools import setup
import os
import re
def readme():
with open('README.md') as f:
return f.read()
dependencies = [
'pandas>=0.16.0',
'numpy>=1.9.2',
'scipy>=1.6.0',
'statsmodels>=0.12.2',
'networkx>=2.5',
]
with open(os.path.join(... | 49 | 0 | 23 |
fec798ba9bb59ea1a3fd09c421f4550be10bc182 | 620 | py | Python | check.py | Natali-bali/git_check | 2683b82fd03ddfbaf57f70b9abfa7e954c307534 | [
"MIT"
] | null | null | null | check.py | Natali-bali/git_check | 2683b82fd03ddfbaf57f70b9abfa7e954c307534 | [
"MIT"
] | null | null | null | check.py | Natali-bali/git_check | 2683b82fd03ddfbaf57f70b9abfa7e954c307534 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import matplotlib.pyplot as plt
if os.path.exists("datapoints.csv"):
data = pd.read_csv("datapoints.csv")
else:
print("File does not exist")
dataY = data['y'].copy()
dataX = data['x'].copy()
sumx = sum1(dataX)
sumy = sum1(dataY)
sumxy = sum2(dataX, dataY)
sumxx = sum2(dataX, dataX... | 20.666667 | 45 | 0.617742 | import os
import pandas as pd
import matplotlib.pyplot as plt
if os.path.exists("datapoints.csv"):
data = pd.read_csv("datapoints.csv")
else:
print("File does not exist")
dataY = data['y'].copy()
dataX = data['x'].copy()
def sum1(x):
sum = 0
for i in x:
sum = sum + i
return sum/len(x)
def ... | 152 | 0 | 45 |
7b124f955bad4ce242ac0f6f2341c4c7adf1d555 | 1,029 | py | Python | examples/src/Shapes/AccessOLEObjectFrame.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Shapes/AccessOLEObjectFrame.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Shapes/AccessOLEObjectFrame.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | import aspose.slides as slides
| 35.482759 | 89 | 0.659864 | import aspose.slides as slides
def shapes_accessing_ole_object_frame():
dataDir = "./examples/data/"
outDir = "./examples/out/"
# Load the PPTX to Presentation object
with slides.Presentation(dataDir + "shapes_accessing_ole_object_frame.pptx") as pres:
# Access the first slide
sld = p... | 975 | 0 | 23 |
053ebcc69ca0c3e32127ad7b94767a442a29ee38 | 237 | py | Python | pset_basic_data_types/basics/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 5 | 2019-04-08T20:05:37.000Z | 2019-12-04T20:48:45.000Z | pset_basic_data_types/basics/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 8 | 2019-04-15T15:16:05.000Z | 2022-02-12T10:33:32.000Z | pset_basic_data_types/basics/p1.py | mottaquikarim/pydev-psets | 9749e0d216ee0a5c586d0d3013ef481cc21dee27 | [
"MIT"
] | 2 | 2019-04-10T00:14:42.000Z | 2020-02-26T20:35:21.000Z | """
Placeholders
"""
# You're writing a program, and you don't know what your starting value for your 'initial' variable is yet. The program won't run if you leave it blank, but you don't want to forget you need it! Make a workaround.
| 33.857143 | 213 | 0.734177 | """
Placeholders
"""
# You're writing a program, and you don't know what your starting value for your 'initial' variable is yet. The program won't run if you leave it blank, but you don't want to forget you need it! Make a workaround.
| 0 | 0 | 0 |
ef1f568460f7bcdf8ea7aae64466073bb8a1a04b | 4,077 | py | Python | tests/integration/management_commands/test_oscar_fork_statics.py | QueoLda/django-oscar | 8dd992d82e31d26c929b3caa0e08b57e9701d097 | [
"BSD-3-Clause"
] | 4,639 | 2015-01-01T00:42:33.000Z | 2022-03-29T18:32:12.000Z | tests/integration/management_commands/test_oscar_fork_statics.py | QueoLda/django-oscar | 8dd992d82e31d26c929b3caa0e08b57e9701d097 | [
"BSD-3-Clause"
] | 2,215 | 2015-01-02T22:32:51.000Z | 2022-03-29T12:16:23.000Z | tests/integration/management_commands/test_oscar_fork_statics.py | QueoLda/django-oscar | 8dd992d82e31d26c929b3caa0e08b57e9701d097 | [
"BSD-3-Clause"
] | 2,187 | 2015-01-02T06:33:31.000Z | 2022-03-31T15:32:36.000Z | import io
import os
import pathlib
import tempfile
from django.core.management import call_command
from django.core.management.base import CommandError
from django.test import TestCase
import oscar
from tests import _site
| 45.3 | 119 | 0.706892 | import io
import os
import pathlib
import tempfile
from django.core.management import call_command
from django.core.management.base import CommandError
from django.test import TestCase
import oscar
from tests import _site
class OscarForkStaticsTestCase(TestCase):
def setUp(self):
# Create dummy Oscar s... | 3,647 | 20 | 185 |
8d6673d38f5b42b2da78dda9142c78d85572c8de | 3,520 | py | Python | python_nim.py | dfdeshom/nim_log_perf | 66225d5cbd65900702e0fc7e03377ae51e5889f0 | [
"MIT"
] | null | null | null | python_nim.py | dfdeshom/nim_log_perf | 66225d5cbd65900702e0fc7e03377ae51e5889f0 | [
"MIT"
] | null | null | null | python_nim.py | dfdeshom/nim_log_perf | 66225d5cbd65900702e0fc7e03377ae51e5889f0 | [
"MIT"
] | null | null | null | from ctypes import *
"""
>>> p = parse_log_line('/plogger/ || 50.73.113.242 || - || 21/Mar/2013:13:22:13 +0000 || GET /plogger/?rand=1363872131875&idsite=deadspin.com&url=http%3A%2F%2Fdeadspin.com%2Frecommended&urlref=http%3A%2F%2Fdeadspin.com%2F&screen=1024x768%7C1024x738%7C24&data=%7B%22parsely_uuid%22%3A%22908932B... | 80 | 1,318 | 0.719034 | from ctypes import *
"""
>>> p = parse_log_line('/plogger/ || 50.73.113.242 || - || 21/Mar/2013:13:22:13 +0000 || GET /plogger/?rand=1363872131875&idsite=deadspin.com&url=http%3A%2F%2Fdeadspin.com%2Frecommended&urlref=http%3A%2F%2Fdeadspin.com%2F&screen=1024x768%7C1024x738%7C24&data=%7B%22parsely_uuid%22%3A%22908932B... | 589 | 85 | 92 |
e51930ab1cbcd988963bd7e470dee26c4f76502d | 1,269 | py | Python | day-8/test.py | PeterPrice06/advent-of-code-2021 | d1af22ee2e4778372e626debca1ae9dc7f2ad47c | [
"MIT"
] | null | null | null | day-8/test.py | PeterPrice06/advent-of-code-2021 | d1af22ee2e4778372e626debca1ae9dc7f2ad47c | [
"MIT"
] | null | null | null | day-8/test.py | PeterPrice06/advent-of-code-2021 | d1af22ee2e4778372e626debca1ae9dc7f2ad47c | [
"MIT"
] | null | null | null | import unittest
from typing import List
from decoder import Decoder
if __name__ == '__main__':
unittest.main()
| 31.725 | 68 | 0.686367 | import unittest
from typing import List
from decoder import Decoder
class TestDecode(unittest.TestCase):
def setUp(self) -> None:
pass
def test_decode_count_unique_sample(self) -> None:
lines = file_read_helper('day-8/sample_input.txt')
decoder = Decoder(lines)
self.assertEqual... | 956 | 15 | 180 |
f278bb3662a66ece6d5cf5324b3ba90fbf180efe | 835 | py | Python | service_repository/interfaces/service.py | fndmiranda/service-repository | c0ad42bd0e62b6af9e5019485a37af902a09d210 | [
"MIT"
] | 4 | 2022-02-22T23:54:35.000Z | 2022-02-25T14:48:30.000Z | service_repository/interfaces/service.py | fndmiranda/service-repository | c0ad42bd0e62b6af9e5019485a37af902a09d210 | [
"MIT"
] | null | null | null | service_repository/interfaces/service.py | fndmiranda/service-repository | c0ad42bd0e62b6af9e5019485a37af902a09d210 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from pydantic import BaseModel
class ServiceInterface(metaclass=ABCMeta):
"""Class representing the service interface."""
@abstractmethod
async def create(self, schema_in: BaseModel):
"""
Create new entity and returns the saved instance.
""... | 27.833333 | 70 | 0.668263 | from abc import ABCMeta, abstractmethod
from pydantic import BaseModel
class ServiceInterface(metaclass=ABCMeta):
"""Class representing the service interface."""
@abstractmethod
async def create(self, schema_in: BaseModel):
"""
Create new entity and returns the saved instance.
""... | 0 | 0 | 0 |
425ccd42d489c21633605a6e2026f1ca786d0378 | 1,882 | py | Python | src/ash/gui/checkbox.py | Rolando-Zarate/ash | 6672ec5d2931d39689e712fa476bbadb8733a739 | [
"MIT"
] | 40 | 2020-07-24T06:36:25.000Z | 2022-03-29T11:25:37.000Z | src/ash/gui/checkbox.py | Rolando-Zarate/ash | 6672ec5d2931d39689e712fa476bbadb8733a739 | [
"MIT"
] | 12 | 2020-12-22T02:56:05.000Z | 2022-02-18T17:59:16.000Z | src/ash/gui/checkbox.py | Rolando-Zarate/ash | 6672ec5d2931d39689e712fa476bbadb8733a739 | [
"MIT"
] | 3 | 2021-02-12T11:49:39.000Z | 2021-07-23T21:17:26.000Z | # ---------------------------------------------------------------------------------------------
# Copyright (c) Akash Nag. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license information.
# ------------------------------------------------------------------------------... | 26.138889 | 95 | 0.628055 | # ---------------------------------------------------------------------------------------------
# Copyright (c) Akash Nag. All rights reserved.
# Licensed under the MIT License. See LICENSE.md in the project root for license information.
# ------------------------------------------------------------------------------... | 980 | 2 | 231 |
bde00d5057eb89869a40de202d4fd01b36be6f4a | 65 | py | Python | src/clld/project_template/{{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}/tests/conftest.py | blurks/clld | d9900f88af726eb6a4d2668f517d5af23bcc6f9d | [
"MIT"
] | 32 | 2015-02-22T02:09:29.000Z | 2022-02-18T14:40:16.000Z | src/clld/project_template/{{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}/tests/conftest.py | blurks/clld | d9900f88af726eb6a4d2668f517d5af23bcc6f9d | [
"MIT"
] | 199 | 2015-01-05T11:58:38.000Z | 2022-02-22T14:34:52.000Z | src/clld/project_template/{{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}/tests/conftest.py | blurks/clld | d9900f88af726eb6a4d2668f517d5af23bcc6f9d | [
"MIT"
] | 18 | 2015-01-23T13:00:47.000Z | 2022-02-21T16:32:36.000Z | from {{cookiecutter.directory_name}} import models
import pytest
| 21.666667 | 50 | 0.830769 | from {{cookiecutter.directory_name}} import models
import pytest
| 0 | 0 | 0 |
fc668aaec97e29bc2f9f8b1c73a6d0392ac40431 | 1,137 | py | Python | desafios/des115/lib/arquivo/__init__.py | Ericssm96/python | 764d0d704be685db9e993c4b74d3df78da12cc6f | [
"MIT"
] | null | null | null | desafios/des115/lib/arquivo/__init__.py | Ericssm96/python | 764d0d704be685db9e993c4b74d3df78da12cc6f | [
"MIT"
] | null | null | null | desafios/des115/lib/arquivo/__init__.py | Ericssm96/python | 764d0d704be685db9e993c4b74d3df78da12cc6f | [
"MIT"
] | null | null | null | import optparse
from des115.lib.interface import *
| 21.45283 | 59 | 0.531223 | import optparse
from des115.lib.interface import *
def arquivoexiste(nome):
try:
a = open(nome, 'rt')
a.close()
except FileNotFoundError:
return False
else:
return True
def criararquivo(nome):
try:
a = open(nome, 'wt+')
except:
print('Houve um err... | 993 | 0 | 92 |
d05508d6049c08f93d847981ac32be13e69061d9 | 5,039 | py | Python | haprestio/api_v1/fqdns.py | innofocus/haprestio | 6a9bf3a3d73fb3faa7cf1e5cfc757cc360fbafde | [
"MIT"
] | null | null | null | haprestio/api_v1/fqdns.py | innofocus/haprestio | 6a9bf3a3d73fb3faa7cf1e5cfc757cc360fbafde | [
"MIT"
] | null | null | null | haprestio/api_v1/fqdns.py | innofocus/haprestio | 6a9bf3a3d73fb3faa7cf1e5cfc757cc360fbafde | [
"MIT"
] | null | null | null | from flask_restplus import Resource
from flask_jwt_extended import jwt_required, get_jwt_identity, get_jwt_claims
from . import api_v1, fqdn_ns, fqdn_m, fqdn_mr
from ..data.fqdns import Fqdns, Fqdn
from ..helpers.helpers import Haproxy
@fqdn_ns.route('', endpoint='fqdn')
@fqdn_ns.response(401, "Token has expired, bad... | 40.312 | 91 | 0.652709 | from flask_restplus import Resource
from flask_jwt_extended import jwt_required, get_jwt_identity, get_jwt_claims
from . import api_v1, fqdn_ns, fqdn_m, fqdn_mr
from ..data.fqdns import Fqdns, Fqdn
from ..helpers.helpers import Haproxy
@fqdn_ns.route('', endpoint='fqdn')
@fqdn_ns.response(401, "Token has expired, bad... | 0 | 0 | 0 |
c257fd415c70ef05a60843b0588a4740a133c9f7 | 247 | py | Python | wx/models/location.py | kmarekspartz/wx | 1aa1d5c3fa2c4cb3304d3420e516895623a5e447 | [
"MIT"
] | null | null | null | wx/models/location.py | kmarekspartz/wx | 1aa1d5c3fa2c4cb3304d3420e516895623a5e447 | [
"MIT"
] | null | null | null | wx/models/location.py | kmarekspartz/wx | 1aa1d5c3fa2c4cb3304d3420e516895623a5e447 | [
"MIT"
] | null | null | null | from peewee import DoubleField, CompositeKey
from wx.app import database
| 20.583333 | 60 | 0.712551 | from peewee import DoubleField, CompositeKey
from wx.app import database
class Location(database.Model):
latitude = DoubleField()
longitude = DoubleField()
# class Meta:
# primary_key = CompositeKey('latitude', 'longitude')
| 0 | 149 | 23 |
a66e6dee5ebecb5a3377454d74c3b1873a326bf3 | 1,029 | py | Python | server.py | AlexMout/OptionPricer | 3c95a3758ab9a96027d40c8d7a23c3e4482ff221 | [
"MIT"
] | 1 | 2019-08-21T16:51:59.000Z | 2019-08-21T16:51:59.000Z | server.py | AlexMout/OptionPricer | 3c95a3758ab9a96027d40c8d7a23c3e4482ff221 | [
"MIT"
] | null | null | null | server.py | AlexMout/OptionPricer | 3c95a3758ab9a96027d40c8d7a23c3e4482ff221 | [
"MIT"
] | null | null | null | from flask import Flask, redirect,render_template, request
import json
import view_model as vm
app = Flask(__name__)
@app.route("/")
@app.route("/get_price",methods=['POST'])
if __name__ == "__main__":
app.run(debug=True) | 36.75 | 93 | 0.699708 | from flask import Flask, redirect,render_template, request
import json
import view_model as vm
app = Flask(__name__)
@app.route("/")
def main_page():
return render_template("index.html",page_title="Pricer")
@app.route("/get_price",methods=['POST'])
def get_price():
dict_args = {}
dict_args['strategy'] = ... | 756 | 0 | 44 |
fc5fabe4297bec14191b579e187d61fd0988d9f1 | 999 | py | Python | h/migrations/versions/ef3059e0396_add_staff_column_to_feature_table.py | noscripter/h | a7a4095a46683ea08dae62335bbcd53f7ab313e2 | [
"MIT"
] | null | null | null | h/migrations/versions/ef3059e0396_add_staff_column_to_feature_table.py | noscripter/h | a7a4095a46683ea08dae62335bbcd53f7ab313e2 | [
"MIT"
] | null | null | null | h/migrations/versions/ef3059e0396_add_staff_column_to_feature_table.py | noscripter/h | a7a4095a46683ea08dae62335bbcd53f7ab313e2 | [
"MIT"
] | null | null | null | """Add the staff columns to the feature and user tables.
Revision ID: ef3059e0396
Revises: 3bf1c2289e8d
Create Date: 2015-07-30 16:25:14.837823
"""
# revision identifiers, used by Alembic.
revision = 'ef3059e0396'
down_revision = '3bf1c2289e8d'
from alembic import op
import sqlalchemy as sa
| 27.75 | 74 | 0.638639 | """Add the staff columns to the feature and user tables.
Revision ID: ef3059e0396
Revises: 3bf1c2289e8d
Create Date: 2015-07-30 16:25:14.837823
"""
# revision identifiers, used by Alembic.
revision = 'ef3059e0396'
down_revision = '3bf1c2289e8d'
from alembic import op
import sqlalchemy as sa
def upgrade():
wit... | 655 | 0 | 46 |
4c9f9895d5041cddff5e56a84c182ada7022c5f7 | 4,332 | py | Python | tests/utils_test.py | zhangted/tda-api | 1169c87129b80c120217d420e4996a439c5903dc | [
"MIT"
] | 986 | 2020-04-14T21:50:03.000Z | 2022-03-29T19:09:31.000Z | tests/utils_test.py | zhangted/tda-api | 1169c87129b80c120217d420e4996a439c5903dc | [
"MIT"
] | 243 | 2020-04-26T14:05:34.000Z | 2022-03-12T13:02:51.000Z | tests/utils_test.py | zhangted/tda-api | 1169c87129b80c120217d420e4996a439c5903dc | [
"MIT"
] | 286 | 2020-04-14T22:17:04.000Z | 2022-03-27T07:30:15.000Z | from unittest.mock import MagicMock
from tda.utils import AccountIdMismatchException, Utils
from tda.utils import UnsuccessfulOrderException
from tda.utils import EnumEnforcer
from .utils import no_duplicates, MockResponse
import enum
import unittest
| 35.219512 | 78 | 0.644275 | from unittest.mock import MagicMock
from tda.utils import AccountIdMismatchException, Utils
from tda.utils import UnsuccessfulOrderException
from tda.utils import EnumEnforcer
from .utils import no_duplicates, MockResponse
import enum
import unittest
class EnumEnforcerTest(unittest.TestCase):
class TestClass(En... | 3,272 | 760 | 46 |
18eaab80515f9d58ded2d73661955aaf052c1aef | 36,651 | py | Python | twistedcaldav/extensions.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | twistedcaldav/extensions.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | twistedcaldav/extensions.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | # -*- test-case-name: twistedcaldav.test.test_extensions -*-
##
# Copyright (c) 2005-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | 33.967563 | 153 | 0.587051 | # -*- test-case-name: twistedcaldav.test.test_extensions -*-
##
# Copyright (c) 2005-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... | 12,989 | 13,301 | 910 |
1ec186044470a12f22d40759ef34223c5f8b558c | 1,428 | py | Python | apps/product/urls.py | asmuratbek/oobamarket | 1053976a13ea84b9aabfcbbcbcffd79549ce9538 | [
"MIT"
] | null | null | null | apps/product/urls.py | asmuratbek/oobamarket | 1053976a13ea84b9aabfcbbcbcffd79549ce9538 | [
"MIT"
] | 7 | 2020-06-05T23:36:01.000Z | 2022-01-13T01:42:07.000Z | apps/product/urls.py | asmuratbek/oobamarket | 1053976a13ea84b9aabfcbbcbcffd79549ce9538 | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from .views import ProductCreateView, ProductUpdateView, ProductIndexCreateView, upload_images, \
remove_uploaded_image, ProductDeleteView, change_publish_status, upload_images_product_update, \
delete_product_images, add_product_review, ProductListView, update_product... | 62.086957 | 120 | 0.716387 | from django.conf.urls import url, include
from .views import ProductCreateView, ProductUpdateView, ProductIndexCreateView, upload_images, \
remove_uploaded_image, ProductDeleteView, change_publish_status, upload_images_product_update, \
delete_product_images, add_product_review, ProductListView, update_product... | 0 | 0 | 0 |
c45f7fea9fc7283439b8d96051094b0a4149e1ec | 1,133 | py | Python | account/acct.py | dahanhan/Ad-Insertion-Sample | 12019c70a95f1d83d792e7e03d1dd5f732630558 | [
"BSD-3-Clause"
] | 82 | 2019-04-07T04:27:47.000Z | 2022-02-04T07:35:58.000Z | account/acct.py | dahanhan/Ad-Insertion-Sample | 12019c70a95f1d83d792e7e03d1dd5f732630558 | [
"BSD-3-Clause"
] | 43 | 2019-04-04T22:03:02.000Z | 2020-08-25T10:11:44.000Z | account/acct.py | dahanhan/Ad-Insertion-Sample | 12019c70a95f1d83d792e7e03d1dd5f732630558 | [
"BSD-3-Clause"
] | 54 | 2019-04-04T23:27:05.000Z | 2022-01-30T14:27:16.000Z | #!/usr/bin/python3
from tornado import web
import random
| 33.323529 | 199 | 0.533098 | #!/usr/bin/python3
from tornado import web
import random
class AcctHandler(web.RequestHandler):
def __init__(self, app, request, **kwargs):
super(AcctHandler, self).__init__(app, request, **kwargs)
self._users={
"guest": {
"subscription": "basic",
"ad-pr... | 955 | 17 | 103 |
d11f0cf6415d468e14983474a46033013201acd7 | 504 | py | Python | src/clientsubscription/urls.py | kaizer88/moltrandashboad | 590b3426ecc3a80aa31a08eb07bed224d0c2562d | [
"MIT"
] | null | null | null | src/clientsubscription/urls.py | kaizer88/moltrandashboad | 590b3426ecc3a80aa31a08eb07bed224d0c2562d | [
"MIT"
] | 4 | 2021-04-08T22:01:45.000Z | 2021-09-22T19:50:53.000Z | src/clientsubscription/urls.py | kaizer88/moltrandashboad | 590b3426ecc3a80aa31a08eb07bed224d0c2562d | [
"MIT"
] | null | null | null | from django.urls import path
from .views import clients, edit_client, edit_client_plan
urlpatterns = [
path('clients', clients, name='clients'),
path('add_client', edit_client, name='add_client'),
path('add_client_plan', edit_client_plan, name='add_client_plan'),
path('edit_client/<id>', edit_client... | 29.647059 | 83 | 0.728175 | from django.urls import path
from .views import clients, edit_client, edit_client_plan
urlpatterns = [
path('clients', clients, name='clients'),
path('add_client', edit_client, name='add_client'),
path('add_client_plan', edit_client_plan, name='add_client_plan'),
path('edit_client/<id>', edit_client... | 0 | 0 | 0 |
1374c32f5067399da6487fb75c2e6f20e0f54694 | 2,522 | py | Python | policy/stale_issue_policy.py | kskewes-sf/spinnakerbot | 32a7ad75a0c12e09498d24fe0cc8dd1b810bd6f7 | [
"Apache-2.0"
] | 6 | 2020-03-18T10:33:53.000Z | 2021-05-02T01:58:10.000Z | policy/stale_issue_policy.py | kskewes-sf/spinnakerbot | 32a7ad75a0c12e09498d24fe0cc8dd1b810bd6f7 | [
"Apache-2.0"
] | 8 | 2020-03-28T23:01:00.000Z | 2020-12-01T06:52:00.000Z | policy/stale_issue_policy.py | kskewes-sf/spinnakerbot | 32a7ad75a0c12e09498d24fe0cc8dd1b810bd6f7 | [
"Apache-2.0"
] | 10 | 2020-02-05T16:24:28.000Z | 2022-03-17T21:37:36.000Z | from datetime import datetime
import github.Issue
from gh import HasLabel, AddLabel
from .policy import Policy
StaleIssuePolicy()
| 37.088235 | 104 | 0.593973 | from datetime import datetime
import github.Issue
from gh import HasLabel, AddLabel
from .policy import Policy
class StaleIssuePolicy(Policy):
def __init__(self):
super().__init__()
self.stale_days = self.config.get('stale_days')
self.ignore_lifecycle_label = self.config.get('ignore_life... | 2,275 | 10 | 103 |
8e6e30b241b821e6cd24440aa8eac536f1de48b0 | 385 | py | Python | cogbot/cogs/robo_mod/conditions/author_is_not_self.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 8 | 2016-12-26T14:10:38.000Z | 2021-01-02T03:50:05.000Z | cogbot/cogs/robo_mod/conditions/author_is_not_self.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 28 | 2016-12-12T04:06:53.000Z | 2020-04-23T06:18:55.000Z | cogbot/cogs/robo_mod/conditions/author_is_not_self.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 9 | 2017-06-03T00:33:57.000Z | 2020-10-29T18:16:02.000Z | from cogbot.cogs.robo_mod.robo_mod_condition import RoboModCondition
from cogbot.cogs.robo_mod.robo_mod_trigger import RoboModTrigger
| 35 | 68 | 0.771429 | from cogbot.cogs.robo_mod.robo_mod_condition import RoboModCondition
from cogbot.cogs.robo_mod.robo_mod_trigger import RoboModTrigger
class AuthorIsNotSelfCondition(RoboModCondition):
async def update(self, state: "RoboModServerState", data: dict):
pass
async def check(self, trigger: RoboModTrigger) ... | 146 | 28 | 76 |
f677cf2975804dbb775573b4329825da1295a53d | 3,794 | py | Python | rkqc/tools/gui/ui/PLAFile.py | clairechingching/ScaffCC | 737ae90f85d9fe79819d66219747d27efa4fa5b9 | [
"BSD-2-Clause"
] | 158 | 2016-07-21T10:45:05.000Z | 2022-03-25T00:56:20.000Z | rkqc/tools/gui/ui/PLAFile.py | clairechingching/ScaffCC | 737ae90f85d9fe79819d66219747d27efa4fa5b9 | [
"BSD-2-Clause"
] | 35 | 2016-07-25T01:23:07.000Z | 2021-09-27T16:05:50.000Z | rkqc/tools/gui/ui/PLAFile.py | clairechingching/ScaffCC | 737ae90f85d9fe79819d66219747d27efa4fa5b9 | [
"BSD-2-Clause"
] | 62 | 2016-08-29T17:28:11.000Z | 2021-12-29T17:55:58.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'PLAFile.ui'
#
# Created: Fri Jun 10 09:11:23 2011
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attribu... | 49.921053 | 129 | 0.718239 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'PLAFile.ui'
#
# Created: Fri Jun 10 09:11:23 2011
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attribu... | 3,301 | 4 | 76 |
1ad9a1e9d74f0a233755e761f044ec5a30b35931 | 1,492 | py | Python | idVaildator/core/tests.py | aboueleyes/id-validator | 29ecf517516921f92e9eee85b6f97078a8334509 | [
"MIT"
] | 6 | 2022-03-17T21:18:52.000Z | 2022-03-18T15:57:35.000Z | idVaildator/core/tests.py | aboueleyes/id-validator | 29ecf517516921f92e9eee85b6f97078a8334509 | [
"MIT"
] | 2 | 2022-03-17T20:49:27.000Z | 2022-03-17T22:37:57.000Z | idVaildator/core/tests.py | aboueleyes/id-validator | 29ecf517516921f92e9eee85b6f97078a8334509 | [
"MIT"
] | null | null | null | import datetime
import unittest
from .EgyptianNationalId import EgyptianNationalId
VALID_ID = "30103211203135"
if __name__ == "__main__":
unittest.main()
| 28.692308 | 66 | 0.656836 | import datetime
import unittest
from .EgyptianNationalId import EgyptianNationalId
VALID_ID = "30103211203135"
class TestNationalId(unittest.TestCase):
def setUp(self) -> None:
self.id = EgyptianNationalId(VALID_ID)
def test_validaty(self):
id_2 = "abc123"
id_3 = "301031120135"
... | 1,098 | 19 | 212 |
14651715e8f22cb30846c42b99b85c2b58ee6a19 | 1,333 | py | Python | train.py | tom-doerr/Hindsight-Goal-Generation | 3abd832bcd484da62dcbc72296f9435a3d55397d | [
"MIT"
] | 20 | 2019-09-25T21:20:59.000Z | 2021-12-08T08:32:01.000Z | train.py | tom-doerr/Hindsight-Goal-Generation | 3abd832bcd484da62dcbc72296f9435a3d55397d | [
"MIT"
] | 2 | 2020-01-09T02:52:56.000Z | 2021-05-14T13:23:18.000Z | train.py | tom-doerr/Hindsight-Goal-Generation | 3abd832bcd484da62dcbc72296f9435a3d55397d | [
"MIT"
] | 10 | 2019-12-19T15:37:15.000Z | 2022-03-24T17:21:41.000Z | import numpy as np
import time
from common import get_args,experiment_setup
if __name__=='__main__':
args = get_args()
env, env_test, agent, buffer, learner, tester = experiment_setup(args)
args.logger.summary_init(agent.graph, agent.sess)
# Progress info
args.logger.add_item('Epoch')
args.logger.add_item('Cyc... | 27.204082 | 71 | 0.736684 | import numpy as np
import time
from common import get_args,experiment_setup
if __name__=='__main__':
args = get_args()
env, env_test, agent, buffer, learner, tester = experiment_setup(args)
args.logger.summary_init(agent.graph, agent.sess)
# Progress info
args.logger.add_item('Epoch')
args.logger.add_item('Cyc... | 0 | 0 | 0 |
a25da8c4cf788af26bbd8f7f6206a46740a73edc | 398 | py | Python | lecture5.py | sterbinsky/APSpyLecture5 | 6319017ab1287dc8e29cfe7fd7ef02675fbebba0 | [
"Apache-2.0"
] | null | null | null | lecture5.py | sterbinsky/APSpyLecture5 | 6319017ab1287dc8e29cfe7fd7ef02675fbebba0 | [
"Apache-2.0"
] | null | null | null | lecture5.py | sterbinsky/APSpyLecture5 | 6319017ab1287dc8e29cfe7fd7ef02675fbebba0 | [
"Apache-2.0"
] | null | null | null | '''
Python code used in APS 2016 Python lecture 5
'''
import h5py
import lecture5_lib
f = h5py.File('writer_1_3.hdf5', 'r')
x = f['/Scan/data/two_theta']
y = f['/Scan/data/counts']
print 'file:', f.filename
print 'peak position:', lecture5_lib.peak_position(x, y)
print 'center-of-mass:', lecture5_lib.center_of_mass(x... | 20.947368 | 58 | 0.683417 | '''
Python code used in APS 2016 Python lecture 5
'''
import h5py
import lecture5_lib
f = h5py.File('writer_1_3.hdf5', 'r')
x = f['/Scan/data/two_theta']
y = f['/Scan/data/counts']
print 'file:', f.filename
print 'peak position:', lecture5_lib.peak_position(x, y)
print 'center-of-mass:', lecture5_lib.center_of_mass(x... | 0 | 0 | 0 |
2e248422e9305b21ac686ef4537042f773eec2b5 | 546 | py | Python | 007/test_list_user.py | joeryan/100pythondays2019 | 1d2ae8a75b6614d8aec40dfb8b6bc1268578c049 | [
"MIT"
] | null | null | null | 007/test_list_user.py | joeryan/100pythondays2019 | 1d2ae8a75b6614d8aec40dfb8b6bc1268578c049 | [
"MIT"
] | null | null | null | 007/test_list_user.py | joeryan/100pythondays2019 | 1d2ae8a75b6614d8aec40dfb8b6bc1268578c049 | [
"MIT"
] | null | null | null | import json
import pytest
import requests
@pytest.mark.parametrize("userid, firstname", [(1,"George"),(2,"Janet")])
| 32.117647 | 73 | 0.714286 | import json
import pytest
import requests
@pytest.mark.parametrize("userid, firstname", [(1,"George"),(2,"Janet")])
def test_list_valid_user(supply_url, userid, firstname):
url = supply_url + "/users/" + str(userid)
resp = requests.get(url)
json_resp = json.loads(resp.text)
assert json_resp['data']['id'] == us... | 384 | 0 | 45 |
4ae604f13ca9a87e0ca10ccf04abacaf47194f98 | 7,231 | py | Python | priceprobi/geocoding/geocoder.py | ujjwaln/priceprobi | 73acaca303590ebb3eaa01452c7343e5d72cf836 | [
"Apache-2.0"
] | null | null | null | priceprobi/geocoding/geocoder.py | ujjwaln/priceprobi | 73acaca303590ebb3eaa01452c7343e5d72cf836 | [
"Apache-2.0"
] | null | null | null | priceprobi/geocoding/geocoder.py | ujjwaln/priceprobi | 73acaca303590ebb3eaa01452c7343e5d72cf836 | [
"Apache-2.0"
] | null | null | null | __author__ = "ujjwal"
import os
import json
import requests
import urllib
import xmltodict
from priceprobi.utils import get_env
from priceprobi.config import get_config
from priceprobi.db.mongo_helper import MongoHelper
from priceprobi.config import NOMINATIM, CSIS
from priceprobi import logger
if __name__ == "__mai... | 39.086486 | 113 | 0.511824 | __author__ = "ujjwal"
import os
import json
import requests
import urllib
import xmltodict
from priceprobi.utils import get_env
from priceprobi.config import get_config
from priceprobi.db.mongo_helper import MongoHelper
from priceprobi.config import NOMINATIM, CSIS
from priceprobi import logger
def scrape_cics_data()... | 6,574 | 2 | 181 |
9b786af279c83d145ff4e00615157b0533f35625 | 203 | py | Python | api/admin.py | ilovedarknet/BookShoping | 315d2b9996acb3dc1a0743c29728f1d3affd848d | [
"BSD-3-Clause"
] | null | null | null | api/admin.py | ilovedarknet/BookShoping | 315d2b9996acb3dc1a0743c29728f1d3affd848d | [
"BSD-3-Clause"
] | null | null | null | api/admin.py | ilovedarknet/BookShoping | 315d2b9996acb3dc1a0743c29728f1d3affd848d | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from .models import *
admin.site.register(Book)
admin.site.register(Booking)
admin.site.register(Achievement)
admin.site.register(AboutUs)
admin.site.register(Card)
| 15.615385 | 32 | 0.79803 | from django.contrib import admin
from .models import *
admin.site.register(Book)
admin.site.register(Booking)
admin.site.register(Achievement)
admin.site.register(AboutUs)
admin.site.register(Card)
| 0 | 0 | 0 |
a6b85a9fa5b6a9d33c01490e4df617306ecdb1a1 | 818 | py | Python | Algorithms/014_SPLC.py | ChaoticMarauder/Project_Rosalind | 6c70cd32908f3b11285e8505c3b43f1ea222decb | [
"MIT"
] | null | null | null | Algorithms/014_SPLC.py | ChaoticMarauder/Project_Rosalind | 6c70cd32908f3b11285e8505c3b43f1ea222decb | [
"MIT"
] | null | null | null | Algorithms/014_SPLC.py | ChaoticMarauder/Project_Rosalind | 6c70cd32908f3b11285e8505c3b43f1ea222decb | [
"MIT"
] | null | null | null | from rosalind import parse_fasta
from rosalind import translate
from rosalind import transcribe
if(__name__=='__main__'):
main() | 22.108108 | 65 | 0.655257 | from rosalind import parse_fasta
from rosalind import translate
from rosalind import transcribe
def rna_splicing(dna, intron_list):
for intron in intron_list:
dna=dna.replace(intron,'')
spliced_rna = ''.join(transcribe(dna))
return spliced_rna
def main():
file_name='dataset... | 631 | 0 | 46 |
6cdd182dff528ad72ef2041ff1abe444851d12e2 | 2,658 | py | Python | setup.py | JGoutin/compilertools | f4375238937384a0400cfc618d3b18fc6e7233a9 | [
"BSD-2-Clause"
] | 10 | 2017-09-07T18:53:26.000Z | 2021-02-22T22:05:30.000Z | setup.py | JGoutin/compilertools | f4375238937384a0400cfc618d3b18fc6e7233a9 | [
"BSD-2-Clause"
] | 2 | 2018-08-16T08:42:09.000Z | 2019-01-11T20:20:21.000Z | setup.py | JGoutin/compilertools | f4375238937384a0400cfc618d3b18fc6e7233a9 | [
"BSD-2-Clause"
] | 2 | 2018-05-11T07:44:56.000Z | 2018-05-28T13:08:41.000Z | #! /usr/bin/env python3
"""Setup script
run "./setup.py --help-commands" for help.
"""
from datetime import datetime
from os.path import abspath, dirname, join
PACKAGE_INFO = dict(
name="compilertools",
description="A library for helping optimizing Python extensions compilation.",
long_description_content... | 34.973684 | 82 | 0.640331 | #! /usr/bin/env python3
"""Setup script
run "./setup.py --help-commands" for help.
"""
from datetime import datetime
from os.path import abspath, dirname, join
PACKAGE_INFO = dict(
name="compilertools",
description="A library for helping optimizing Python extensions compilation.",
long_description_content... | 0 | 0 | 0 |
493df341c71de6258d096663ce60490db7df8986 | 6,047 | py | Python | help_func.py | GiladGH/pointcleannet | 1c7f8f00c2062923063de2f796d96e444476d698 | [
"MIT"
] | null | null | null | help_func.py | GiladGH/pointcleannet | 1c7f8f00c2062923063de2f796d96e444476d698 | [
"MIT"
] | null | null | null | help_func.py | GiladGH/pointcleannet | 1c7f8f00c2062923063de2f796d96e444476d698 | [
"MIT"
] | null | null | null | import os
import h5py
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
def load_h5_data_label(h5_filename):
""" load the data from the hdf5 files """
f = h5py.File(h5_filename)
data = f['data'][:]
labels = f['label'][:]
... | 39.266234 | 127 | 0.587729 | import os
import h5py
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
def load_h5_data_label(h5_filename):
""" load the data from the hdf5 files """
f = h5py.File(h5_filename)
data = f['data'][:]
labels = f['label'][:]
... | 534 | 0 | 25 |
ab6875a1e5f03d7dfe00c29b4051c4828e6cf04b | 5,842 | py | Python | canvas.py | zach-king/GlyphyType | dd930730af4396ad7d5ac12d5011a35a1f5ab9bc | [
"MIT"
] | null | null | null | canvas.py | zach-king/GlyphyType | dd930730af4396ad7d5ac12d5011a35a1f5ab9bc | [
"MIT"
] | null | null | null | canvas.py | zach-king/GlyphyType | dd930730af4396ad7d5ac12d5011a35a1f5ab9bc | [
"MIT"
] | null | null | null | '''
File: canvas.py
Description:
Implements the custom GlyphyType canvas widget
for drawing characters/glyphs.
'''
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from tools import brush, line | 31.240642 | 119 | 0.60647 | '''
File: canvas.py
Description:
Implements the custom GlyphyType canvas widget
for drawing characters/glyphs.
'''
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from tools import brush, line
class Canvas(QWidget):
def __init__(self, parent=None):
super(Canvas, self)... | 4,196 | 1,392 | 23 |
cf852852484ccf979e059170505d800849d97458 | 1,807 | py | Python | app/doll/models/doll.py | Younlab/GFS-Backend | 06bd2d14bc1e3226a458089fb99496516273f296 | [
"MIT"
] | 2 | 2019-03-03T10:59:55.000Z | 2019-03-03T11:00:07.000Z | app/doll/models/doll.py | Younlab/GFS-Backend | 06bd2d14bc1e3226a458089fb99496516273f296 | [
"MIT"
] | null | null | null | app/doll/models/doll.py | Younlab/GFS-Backend | 06bd2d14bc1e3226a458089fb99496516273f296 | [
"MIT"
] | null | null | null | from django.contrib.postgres.fields import ArrayField
from django.db import models
__all__ = (
'Doll',
'Status',
)
| 28.234375 | 67 | 0.667405 | from django.contrib.postgres.fields import ArrayField
from django.db import models
__all__ = (
'Doll',
'Status',
)
class Doll(models.Model):
id = models.PositiveIntegerField(unique=True, primary_key=True)
code_name = models.CharField(max_length=50)
rank = models.PositiveSmallIntegerField()
ty... | 27 | 1,608 | 46 |
d5644bcae84f74922c59509dd07adf55a2df2457 | 1,762 | py | Python | check_version_increase.py | elbuco1/fen2png | c64263cb5c53eeb33d2d311328256ffe4f1ac1a2 | [
"MIT"
] | 2 | 2021-12-01T03:28:52.000Z | 2022-01-29T19:58:38.000Z | check_version_increase.py | elbuco1/fen2png | c64263cb5c53eeb33d2d311328256ffe4f1ac1a2 | [
"MIT"
] | 1 | 2021-12-01T03:28:21.000Z | 2021-12-01T03:28:21.000Z | check_version_increase.py | elbuco1/fen2png | c64263cb5c53eeb33d2d311328256ffe4f1ac1a2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import re
import json
def version_increased(former_version, current_version):
"""Check that version in the package is greater than version_master
and that only one int has increased of 1.
Args:
version_master (str): former version
"""
curr... | 30.912281 | 146 | 0.692963 | #!/usr/bin/env python
import argparse
import os
import re
import json
def version_increased(former_version, current_version):
"""Check that version in the package is greater than version_master
and that only one int has increased of 1.
Args:
version_master (str): former version
"""
curr... | 715 | 0 | 23 |
5b7977666f84d8a4ea7e54aea41d21726f3c0d64 | 261 | py | Python | utils.py | lmeaou/teal | e1c0502390cdaa9c62cef04f4c2b94344100666d | [
"MIT"
] | null | null | null | utils.py | lmeaou/teal | e1c0502390cdaa9c62cef04f4c2b94344100666d | [
"MIT"
] | null | null | null | utils.py | lmeaou/teal | e1c0502390cdaa9c62cef04f4c2b94344100666d | [
"MIT"
] | null | null | null | import json
import os
from os import path | 23.727273 | 49 | 0.62069 | import json
import os
from os import path
def get_key_from_db(uuid, key):
data_path = "database/data-" + uuid + ".json"
if path.exists(data_path):
f = open(data_path, "r")
data = json.load(f)
return data[key]
return "nodata" | 197 | 0 | 23 |
dcd65afe1b7d373194d0df45e4433ca60003a021 | 324 | py | Python | testing/urls.py | Joshijax/covidapp | cae6f6fde5c936af2615ff79b6d883f31825a7ee | [
"MIT"
] | null | null | null | testing/urls.py | Joshijax/covidapp | cae6f6fde5c936af2615ff79b6d883f31825a7ee | [
"MIT"
] | null | null | null | testing/urls.py | Joshijax/covidapp | cae6f6fde5c936af2615ff79b6d883f31825a7ee | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
from django.contrib import admin
from django.urls import path, include # add this
from testing import views
urlpatterns = [
path('', views.index, name='tester'),
path('/take', views.tester, name='tester1'),
# add thi... | 20.25 | 49 | 0.654321 | # -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
from django.contrib import admin
from django.urls import path, include # add this
from testing import views
urlpatterns = [
path('', views.index, name='tester'),
path('/take', views.tester, name='tester1'),
# add thi... | 0 | 0 | 0 |
313b0c39616ef4195670de4e815f8d591baba29d | 173 | py | Python | c3i/app/views.py | addinall/python-C3I | be72f026fb7c6b5084404876cd1296d3c3cb9b85 | [
"Unlicense"
] | null | null | null | c3i/app/views.py | addinall/python-C3I | be72f026fb7c6b5084404876cd1296d3c3cb9b85 | [
"Unlicense"
] | null | null | null | c3i/app/views.py | addinall/python-C3I | be72f026fb7c6b5084404876cd1296d3c3cb9b85 | [
"Unlicense"
] | null | null | null | # from django.shortcuts import render
from django.http import HttpResponse
| 21.625 | 74 | 0.780347 | # from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello world - You are in the Python version of C3I")
| 73 | 0 | 23 |
2bebc284726ac0538aa8d5cd151421d4848b75ef | 4,684 | py | Python | data_utils.py | lyeoni/gpt-pytorch | c3ef84edaf5b4c34034e333228bd425da55d2483 | [
"MIT"
] | 49 | 2020-03-17T08:15:49.000Z | 2022-03-23T08:42:16.000Z | data_utils.py | lyeoni/gpt-pytorch | c3ef84edaf5b4c34034e333228bd425da55d2483 | [
"MIT"
] | 2 | 2020-07-01T08:29:59.000Z | 2020-08-17T18:53:48.000Z | data_utils.py | lyeoni/gpt-pytorch | c3ef84edaf5b4c34034e333228bd425da55d2483 | [
"MIT"
] | 4 | 2021-01-14T14:13:48.000Z | 2021-07-06T12:55:53.000Z | from typing import Iterable, Union, List
from pathlib import Path
import json
import torch
import torch.distributed as dist
from torch.utils.data import TensorDataset
class PretrainInputExample:
"""A single example for unsupervised pre-training.
"""
class ClsInputExample:
"""A single example for supervis... | 39.361345 | 152 | 0.648591 | from typing import Iterable, Union, List
from pathlib import Path
import json
import torch
import torch.distributed as dist
from torch.utils.data import TensorDataset
class PretrainInputExample:
"""A single example for unsupervised pre-training.
"""
def __init__(self, text: str):
self.text = text
... | 3,979 | 0 | 150 |
58d550b93e451cd67d33f0ac2c26d92b3d42faae | 2,140 | py | Python | networking_generic_switch/tests/unit/test_config.py | ChameleonCloud/networking-generic-switch | 98ddec1f11eab5197f1443207b13a16f364e5f10 | [
"Apache-2.0"
] | null | null | null | networking_generic_switch/tests/unit/test_config.py | ChameleonCloud/networking-generic-switch | 98ddec1f11eab5197f1443207b13a16f364e5f10 | [
"Apache-2.0"
] | 4 | 2018-11-21T17:54:37.000Z | 2021-10-04T14:40:40.000Z | networking_generic_switch/tests/unit/test_config.py | ChameleonCloud/networking-generic-switch | 98ddec1f11eab5197f1443207b13a16f364e5f10 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 34.516129 | 78 | 0.647664 | # Copyright 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 1,130 | 23 | 103 |
eaea90e08e9efbbcbd75fc8b2ce4c80958a2e515 | 206 | py | Python | src/product_data_types/apps.py | evis-market/web-interface-backend | f8930ff1c009ad18e522ab29680b4bcd50a6020e | [
"MIT"
] | 2 | 2021-08-30T22:58:32.000Z | 2021-12-12T10:47:52.000Z | src/product_data_types/apps.py | evis-market/web-interface-backend | f8930ff1c009ad18e522ab29680b4bcd50a6020e | [
"MIT"
] | null | null | null | src/product_data_types/apps.py | evis-market/web-interface-backend | f8930ff1c009ad18e522ab29680b4bcd50a6020e | [
"MIT"
] | 1 | 2021-08-22T19:12:44.000Z | 2021-08-22T19:12:44.000Z | from django.apps import AppConfig
| 25.75 | 56 | 0.771845 | from django.apps import AppConfig
class ProductDataTypesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'product_data_types'
verbose_name = 'Product data types'
| 0 | 148 | 23 |
7fa4fe2358baef5d84f26905903f3f8b4bb6d5f4 | 12,163 | py | Python | venv/lib/python3.8/site-packages/xdis/load.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Decompiler/xdis/load.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 4 | 2020-10-03T20:37:55.000Z | 2020-10-04T23:11:38.000Z | S4/S4 Decompiler/xdis/load.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | # Copyright (c) 2015-2020 by Rocky Bernstein
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is di... | 33.880223 | 107 | 0.553317 | # Copyright (c) 2015-2020 by Rocky Bernstein
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is di... | 1,569 | 0 | 92 |
be4aedc2ea1f5dae400358c5df45de6791875da8 | 452 | py | Python | envergo/evaluations/migrations/0016_request_parcels.py | MTES-MCT/envergo | 8bb6e4ffa15a39edda51b39401db6cc12e73ad0a | [
"MIT"
] | null | null | null | envergo/evaluations/migrations/0016_request_parcels.py | MTES-MCT/envergo | 8bb6e4ffa15a39edda51b39401db6cc12e73ad0a | [
"MIT"
] | 6 | 2021-07-12T14:33:18.000Z | 2022-02-14T10:36:09.000Z | envergo/evaluations/migrations/0016_request_parcels.py | MTES-MCT/envergo | 8bb6e4ffa15a39edda51b39401db6cc12e73ad0a | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-26 14:49
from django.db import migrations, models
| 22.6 | 86 | 0.599558 | # Generated by Django 3.2.6 on 2021-08-26 14:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('geodata', '0001_initial'),
('evaluations', '0015_request'),
]
operations = [
migrations.AddField(
model_name='request',
... | 0 | 338 | 23 |
d1621eaaee2261fef168153ab19e0c022183ce72 | 830 | py | Python | self_attention/word2vec.py | huangqianfei0916/Attention_classification | a60460771cce640737523d0ea3b9ef22f1c1bcb9 | [
"MIT"
] | 2 | 2021-03-21T02:10:10.000Z | 2021-04-09T09:38:43.000Z | self_attention/word2vec.py | huangqianfei0916/Attention_classification | a60460771cce640737523d0ea3b9ef22f1c1bcb9 | [
"MIT"
] | null | null | null | self_attention/word2vec.py | huangqianfei0916/Attention_classification | a60460771cce640737523d0ea3b9ef22f1c1bcb9 | [
"MIT"
] | 3 | 2020-07-29T05:32:16.000Z | 2022-03-26T07:40:42.000Z |
from gensim.models import word2vec
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-word', required=True,help="word file")
parser.add_argument('-iter', default=3)
parser.add_argument('-sg', default=0)
parser.add_argument('-hs', default=1)
p... | 31.923077 | 105 | 0.691566 |
from gensim.models import word2vec
def tomodel(train_word, iter1, sg, hs, window, size):
sentences = word2vec.LineSentence(train_word)
model = word2vec.Word2Vec(sentences, iter=iter1, sg=sg, hs=hs, min_count=1, window=window, size=size)
model.wv.save_word2vec_format("word2vec.model", binary=False)
impo... | 254 | 0 | 23 |
f905e161591e69fe8cae246049f2bea69e1749a6 | 10,794 | py | Python | shells/backends/azure_tf_backend/src/driver.py | oleksandr-r-q/CloudShell-Terraform-Shell | 8d331cf8eebeae794e4e73a3c70af8064bafa434 | [
"Apache-2.0"
] | 4 | 2021-11-26T05:41:05.000Z | 2022-03-11T20:01:40.000Z | shells/backends/azure_tf_backend/src/driver.py | oleksandr-r-q/CloudShell-Terraform-Shell | 8d331cf8eebeae794e4e73a3c70af8064bafa434 | [
"Apache-2.0"
] | 10 | 2021-07-14T05:19:54.000Z | 2021-11-02T05:37:48.000Z | shells/backends/azure_tf_backend/src/driver.py | oleksandr-r-q/CloudShell-Terraform-Shell | 8d331cf8eebeae794e4e73a3c70af8064bafa434 | [
"Apache-2.0"
] | 1 | 2021-11-01T07:46:59.000Z | 2021-11-01T07:46:59.000Z | import json
from azure.core.exceptions import ClientAuthenticationError
from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface
from cloudshell.shell.core.driver_context import AutoLoadDetails
from cloudshell.shell.core.session.cloudshell_session import CloudShellSessionContext
from cloudsh... | 51.894231 | 118 | 0.693163 | import json
from azure.core.exceptions import ClientAuthenticationError
from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface
from cloudshell.shell.core.driver_context import AutoLoadDetails
from cloudshell.shell.core.session.cloudshell_session import CloudShellSessionContext
from cloudsh... | 8,197 | 1,915 | 23 |
44b0ca69529138fdd86fa4389670400d93e53eb5 | 4,372 | py | Python | tests/test_grow_tree.py | stephleighton/placentagen | 968685955fce7ca5503a85713113f62c1e5c74a4 | [
"Apache-2.0"
] | 2 | 2019-06-11T21:35:54.000Z | 2022-03-10T01:53:43.000Z | tests/test_grow_tree.py | stephleighton/placentagen | 968685955fce7ca5503a85713113f62c1e5c74a4 | [
"Apache-2.0"
] | 31 | 2018-03-14T01:43:19.000Z | 2020-07-23T21:23:27.000Z | tests/test_grow_tree.py | stephleighton/placentagen | 968685955fce7ca5503a85713113f62c1e5c74a4 | [
"Apache-2.0"
] | 6 | 2018-04-29T23:42:48.000Z | 2021-09-14T01:33:53.000Z | from unittest import TestCase
import numpy as np
import unittest
import placentagen
import os
if __name__ == '__main__':
unittest.main()
| 45.541667 | 113 | 0.522187 | from unittest import TestCase
import numpy as np
import unittest
import placentagen
import os
class Test_create_trees(TestCase):
def test_umilical_node(self):
thickness = (3.0 * 1 / (4.0 * np.pi)) ** (1.0 / 3.0) * 2.0
data_input = np.array([[0.0, 0.0, 0.0], [0.0, 0.0, 0.0]])
datapoints = p... | 3,877 | 47 | 304 |
1b959ecde2bf0e549c10dc649b1fc3831d79b54e | 2,104 | py | Python | main.py | MostafaAbuelnoor/Facial-Recognitoin | 43c02c8479120aa67a05699c3ba806338398e07c | [
"MIT"
] | 1 | 2021-05-26T08:20:14.000Z | 2021-05-26T08:20:14.000Z | main.py | MostafaAbuelnoor/Facial-Recognitoin | 43c02c8479120aa67a05699c3ba806338398e07c | [
"MIT"
] | null | null | null | main.py | MostafaAbuelnoor/Facial-Recognitoin | 43c02c8479120aa67a05699c3ba806338398e07c | [
"MIT"
] | 1 | 2022-03-07T07:22:08.000Z | 2022-03-07T07:22:08.000Z | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' ##This is used to suppress the warnings given by tensorflow
import tensorflow as tf
#Comment the above lines if there's an error and the code isn't working as expected
from deepface import DeepFace
import pandas as pd
# Add photos to the photos folder in order to ana... | 40.461538 | 147 | 0.687738 | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' ##This is used to suppress the warnings given by tensorflow
import tensorflow as tf
#Comment the above lines if there's an error and the code isn't working as expected
from deepface import DeepFace
import pandas as pd
# Add photos to the photos folder in order to ana... | 775 | 0 | 111 |
fba9a66135210ef0d62d9141e920c64ff6e57ae8 | 2,130 | py | Python | aries_cloudagent/messaging/federatedlearningmessage/messages/federatedlearningmessage.py | harshkasyap/PyAriesFL | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | 7 | 2020-07-07T15:44:41.000Z | 2022-03-26T21:20:41.000Z | aries_cloudagent/messaging/federatedlearningmessage/messages/federatedlearningmessage.py | totemprotocol/aries-fl | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/messaging/federatedlearningmessage/messages/federatedlearningmessage.py | totemprotocol/aries-fl | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | 2 | 2020-08-11T10:02:03.000Z | 2021-12-12T12:19:21.000Z | """Basic message."""
from datetime import datetime
from typing import Union
from marshmallow import fields
from ...agent_message import AgentMessage, AgentMessageSchema
from ...util import datetime_now, datetime_to_str
from ...valid import INDY_ISO8601_DATETIME
from ..message_types import FEDERATEDLEARNING_MESSAGE
... | 26.962025 | 84 | 0.667606 | """Basic message."""
from datetime import datetime
from typing import Union
from marshmallow import fields
from ...agent_message import AgentMessage, AgentMessageSchema
from ...util import datetime_now, datetime_to_str
from ...valid import INDY_ISO8601_DATETIME
from ..message_types import FEDERATEDLEARNING_MESSAGE
... | 0 | 0 | 0 |
fe951ac780dbde2cba39609a3d5e778c7cb3b4f3 | 626 | py | Python | cms/home/migrations/0007_auto_20201125_1247.py | rkhleics/nhs-ei.website | 9968916a5c442a2b33003f8a48b238df53ebded0 | [
"MIT"
] | 1 | 2021-02-04T13:20:31.000Z | 2021-02-04T13:20:31.000Z | cms/home/migrations/0007_auto_20201125_1247.py | rkhleics/nhs-ei.website | 9968916a5c442a2b33003f8a48b238df53ebded0 | [
"MIT"
] | 77 | 2020-11-29T23:10:16.000Z | 2022-03-23T11:47:51.000Z | cms/home/migrations/0007_auto_20201125_1247.py | rkhleics/nhs-ei.website | 9968916a5c442a2b33003f8a48b238df53ebded0 | [
"MIT"
] | 3 | 2021-03-19T09:23:59.000Z | 2021-08-31T21:49:36.000Z | # Generated by Django 3.1.2 on 2020-11-25 12:47
from django.db import migrations, models
import wagtail.core.fields
| 25.04 | 64 | 0.618211 | # Generated by Django 3.1.2 on 2020-11-25 12:47
from django.db import migrations, models
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('home', '0006_auto_20201125_1244'),
]
operations = [
migrations.AddField(
model_name='homepage',
... | 0 | 485 | 23 |
38e317f3795b434b14359446540d077599e83168 | 1,476 | py | Python | ex_kerasApi.py | DLVIsualizer/dlvis-flask | e1e22028b2d57fb894d105bd716437a3de8e4e7f | [
"MIT"
] | null | null | null | ex_kerasApi.py | DLVIsualizer/dlvis-flask | e1e22028b2d57fb894d105bd716437a3de8e4e7f | [
"MIT"
] | 13 | 2020-01-28T22:20:14.000Z | 2022-03-11T23:20:14.000Z | ex_kerasApi.py | DLVIsualizer/dlvis-flask | e1e22028b2d57fb894d105bd716437a3de8e4e7f | [
"MIT"
] | null | null | null | # import the necessary packages
from keras.applications import ResNet50
from keras.applications import MobileNet
import matplotlib.pyplot as plt
import numpy as np
import cv2
import dlv
if __name__ == "__main__":
test = np.random.rand(500,300)
cv2.imshow('img',test)
cv2.waitKey(0)
resnet50Model = MobileNet(... | 22.707692 | 101 | 0.695122 | # import the necessary packages
from keras.applications import ResNet50
from keras.applications import MobileNet
import matplotlib.pyplot as plt
import numpy as np
import cv2
import dlv
if __name__ == "__main__":
test = np.random.rand(500,300)
cv2.imshow('img',test)
cv2.waitKey(0)
resnet50Model = MobileNet(... | 0 | 0 | 0 |
e3d984eaea5180d35af66b9d17a7e46e5fca15cc | 5,642 | py | Python | python/onos/uenib/__init__.py | ray-milkey/onos-api | 1df48546bba93fc475a080fdb29983c2e36da3c4 | [
"Apache-2.0"
] | null | null | null | python/onos/uenib/__init__.py | ray-milkey/onos-api | 1df48546bba93fc475a080fdb29983c2e36da3c4 | [
"Apache-2.0"
] | null | null | null | python/onos/uenib/__init__.py | ray-milkey/onos-api | 1df48546bba93fc475a080fdb29983c2e36da3c4 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: onos/uenib/ran.proto, onos/uenib/uenib.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import AsyncIterator, Dict, List
import betterproto
import grpclib
@dataclass(eq=False, repr=False)
class CellConnection(bette... | 25.645455 | 86 | 0.684864 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: onos/uenib/ran.proto, onos/uenib/uenib.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import AsyncIterator, Dict, List
import betterproto
import grpclib
class EventType(betterproto.Enum):
NONE = 0
ADDED = ... | 1,942 | 1,433 | 579 |