hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f70596fbe9596e1848acaad7aac1ea065663307c
20,363
py
Python
clusterloader2/pkg/prometheus/manifests/dashboards/master-dashboard.dashboard.py
ruquanzhao/perf-tests
e63056acb9ae69d2d0bf6449039b0dfda55d129f
[ "Apache-2.0" ]
1
2021-06-17T07:19:59.000Z
2021-06-17T07:19:59.000Z
clusterloader2/pkg/prometheus/manifests/dashboards/master-dashboard.dashboard.py
yangjunmyfm192085/perf-tests
432229eeb3f74027eab9865ae0eb02078f50238f
[ "Apache-2.0" ]
null
null
null
clusterloader2/pkg/prometheus/manifests/dashboards/master-dashboard.dashboard.py
yangjunmyfm192085/perf-tests
432229eeb3f74027eab9865ae0eb02078f50238f
[ "Apache-2.0" ]
4
2021-01-29T08:31:11.000Z
2021-06-14T06:08:32.000Z
#!/usr/bin/env python3 # Copyright 2019 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
33.60231
149
0.582282
from grafanalib import core as g import defaults as d def api_call_latency_panel(expression): def api_call_latency(title, verb, scope, threshold): return d.Graph( title=title, targets=[ g.Target(expr=str(threshold), legendFormat="threshold"), ...
true
true
f705987652a631c2ebaab205528fe807cc950ac0
2,496
py
Python
consul/std.py
DataDog/python-consul
104c8c4fd6a0aa8ec24dd0fe911af815672602ca
[ "MIT" ]
null
null
null
consul/std.py
DataDog/python-consul
104c8c4fd6a0aa8ec24dd0fe911af815672602ca
[ "MIT" ]
1
2021-01-05T14:46:32.000Z
2021-01-05T14:46:32.000Z
consul/std.py
DataDog/python-consul
104c8c4fd6a0aa8ec24dd0fe911af815672602ca
[ "MIT" ]
null
null
null
import requests import os from consul import base __all__ = ["Consul"] class HTTPClient(base.HTTPClient): def __init__(self, *args, **kwargs): self.timeout = kwargs.pop("timeout", None) super(HTTPClient, self).__init__(*args, **kwargs) self.session = requests.session() self._pid...
30.814815
87
0.567708
import requests import os from consul import base __all__ = ["Consul"] class HTTPClient(base.HTTPClient): def __init__(self, *args, **kwargs): self.timeout = kwargs.pop("timeout", None) super(HTTPClient, self).__init__(*args, **kwargs) self.session = requests.session() self._pid...
true
true
f7059973a4d9a361ba270c09265b9b2266bf6ff4
27,261
py
Python
mindspore/nn/metrics/confusion_matrix.py
kungfu-team/mindspore-bert
71501cf52ae01db9d6a73fb64bcfe68a6509dc32
[ "Apache-2.0" ]
null
null
null
mindspore/nn/metrics/confusion_matrix.py
kungfu-team/mindspore-bert
71501cf52ae01db9d6a73fb64bcfe68a6509dc32
[ "Apache-2.0" ]
null
null
null
mindspore/nn/metrics/confusion_matrix.py
kungfu-team/mindspore-bert
71501cf52ae01db9d6a73fb64bcfe68a6509dc32
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
39.739067
120
0.583874
import numpy as np from mindspore._checkparam import Validator as validator from .metric import Metric class ConfusionMatrix(Metric): TARGET = "target" PREDICTION = "prediction" ALL = "all" NO_NORM = "no_norm" def __init__(self, num_classes, normalize=NO_NORM, threshold=0.5): ...
true
true
f7059c170fbd2ef4ccd70edeaa67879926e52cb0
11,928
py
Python
multiBatelo/multielo.py
Balavignesh/badminton-elo-dashboard
df380afb26c89827111f7316df381408d7d19298
[ "MIT" ]
null
null
null
multiBatelo/multielo.py
Balavignesh/badminton-elo-dashboard
df380afb26c89827111f7316df381408d7d19298
[ "MIT" ]
null
null
null
multiBatelo/multielo.py
Balavignesh/badminton-elo-dashboard
df380afb26c89827111f7316df381408d7d19298
[ "MIT" ]
null
null
null
import numpy as np from typing import Union, List, Callable import logging from multiBatelo.score_functions import create_exponential_score_function DEFAULT_K_VALUE = 32 DEFAULT_D_VALUE = 400 DEFAULT_SCORING_FUNCTION_BASE = 1 _default_logger = logging.getLogger("multielo.multielo") class MultiElo: """ Gen...
44.674157
111
0.655349
import numpy as np from typing import Union, List, Callable import logging from multiBatelo.score_functions import create_exponential_score_function DEFAULT_K_VALUE = 32 DEFAULT_D_VALUE = 400 DEFAULT_SCORING_FUNCTION_BASE = 1 _default_logger = logging.getLogger("multielo.multielo") class MultiElo: def __init...
true
true
f7059d3b8fda64f363f295486c2fbf3de3035548
7,411
py
Python
Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py
LeStarch/lgtm-fprime
904b0311fe647745b29075d44259d1dc1f4284ae
[ "Apache-2.0" ]
null
null
null
Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py
LeStarch/lgtm-fprime
904b0311fe647745b29075d44259d1dc1f4284ae
[ "Apache-2.0" ]
null
null
null
Autocoders/Python/src/fprime_ac/generators/visitors/InstanceTopologyEventsHTMLVisitor.py
LeStarch/lgtm-fprime
904b0311fe647745b29075d44259d1dc1f4284ae
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # NAME: InstanceTopologyHTMLVisitor.py # # DESCRIPTION: A visitor responsible for the generation of HTML tables # of event ID's, etc. # # AUTHOR: reder # EMAIL: reder@jpl.nasa.gov # DATE CREATED : Sep. 13, 2016 # # Copyrigh...
34.793427
93
0.568344
# # AUTHOR: reder # EMAIL: reder@jpl.nasa.gov # DATE CREATED : Sep. 13, 2016 # # Copyright 2016, California Institute of Technology. # ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. # =============================================================================== # # Python standard modules # imp...
true
true
f7059d4b996373df631835952df25f3736b20114
10,386
py
Python
Tests/test_samtools_tool.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
null
null
null
Tests/test_samtools_tool.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
null
null
null
Tests/test_samtools_tool.py
bneron/biopython
2c52e57661c8f6cdf4a191850b2f6871f8582af7
[ "PostgreSQL" ]
null
null
null
# Copyright 2014 by Saket Choudhary. Based on test_Clustalw_tool.py by Peter # Cock . # # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Last Checked with samtools [0.1.18 (r982:295)] from Bio imp...
43.638655
92
0.612074
from Bio import MissingExternalDependencyError import sys import os import unittest from Bio.Sequencing.Applications import SamtoolsViewCommandline from Bio.Sequencing.Applications import SamtoolsCalmdCommandline from Bio.Sequencing.Applications import SamtoolsCatCommandline from Bio.Sequencing.Applications im...
true
true
f7059d75bd3c6acb85c90246d579ae72b76286c1
14,941
py
Python
stable_baselines3/sac/sac.py
squalidux/stable-baselines3
72690b3ed0635c68f037b3dc121bd9987a6e82a8
[ "MIT" ]
3
2022-01-22T21:24:03.000Z
2022-03-31T05:32:54.000Z
stable_baselines3/sac/sac.py
squalidux/stable-baselines3
72690b3ed0635c68f037b3dc121bd9987a6e82a8
[ "MIT" ]
1
2020-07-31T08:19:32.000Z
2020-07-31T08:19:32.000Z
stable_baselines3/sac/sac.py
squalidux/stable-baselines3
72690b3ed0635c68f037b3dc121bd9987a6e82a8
[ "MIT" ]
1
2022-03-10T11:33:06.000Z
2022-03-10T11:33:06.000Z
from typing import Any, Dict, List, Optional, Tuple, Type, Union import gym import numpy as np import torch as th from torch.nn import functional as F from stable_baselines3.common.buffers import ReplayBuffer from stable_baselines3.common.noise import ActionNoise from stable_baselines3.common.off_policy_algorithm imp...
47.431746
116
0.658122
from typing import Any, Dict, List, Optional, Tuple, Type, Union import gym import numpy as np import torch as th from torch.nn import functional as F from stable_baselines3.common.buffers import ReplayBuffer from stable_baselines3.common.noise import ActionNoise from stable_baselines3.common.off_policy_algorithm imp...
true
true
f7059d8c63468534c4d5a45f70eb14aa1a9ab387
1,065
py
Python
constants.py
ra101/Pose2Input-MKKE
11905d19fbc18acc8b577f41d3149013cca76aab
[ "MIT" ]
2
2021-08-16T06:25:04.000Z
2021-08-17T01:28:53.000Z
constants.py
ra101/Pose2Input-MKKE
11905d19fbc18acc8b577f41d3149013cca76aab
[ "MIT" ]
null
null
null
constants.py
ra101/Pose2Input-MKKE
11905d19fbc18acc8b577f41d3149013cca76aab
[ "MIT" ]
null
null
null
# ./constants.py import os import enum from dotenv import load_dotenv load_dotenv() @enum.unique class InputConfig(enum.Enum): ''' Config for the gameplay, Takes input from .env Value should be something tha can be used by pyAutoGUI If not available then, uses default input config (mine) and Y...
30.428571
63
0.62723
import os import enum from dotenv import load_dotenv load_dotenv() @enum.unique class InputConfig(enum.Enum): DEFAULT = '' UP = os.getenv('UP', 'up').lower() DOWN = os.getenv('DOWN', 'down').lower() LEFT = os.getenv('LEFT', 'left').lower() RIGHT = os.getenv('RIGHT', 'right').lower() FRONT...
true
true
f7059f70f021d953948645a9e129f288f86fa8ff
572
py
Python
src/airflow_actionproject/hooks/__init__.py
actionprojecteu/airflow-actionproject
6518e73e5709ebce927e0b463b5e36d80194491c
[ "MIT" ]
null
null
null
src/airflow_actionproject/hooks/__init__.py
actionprojecteu/airflow-actionproject
6518e73e5709ebce927e0b463b5e36d80194491c
[ "MIT" ]
null
null
null
src/airflow_actionproject/hooks/__init__.py
actionprojecteu/airflow-actionproject
6518e73e5709ebce927e0b463b5e36d80194491c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright (c) 2021 # # See the LICENSE file for details # see the AUTHORS file for authors # ---------------------------------------------------------------------- #-------------------- # System wide imports # ----------...
19.724138
72
0.274476
true
true
f7059fa1462d4d297a6397aa32f4f05bb16f2d55
492
py
Python
Programs/Desktop_Notifier.py
Phinix403/Python
64dec2dfb47a966a603dcdf1c65b32a7e3184672
[ "MIT" ]
null
null
null
Programs/Desktop_Notifier.py
Phinix403/Python
64dec2dfb47a966a603dcdf1c65b32a7e3184672
[ "MIT" ]
null
null
null
Programs/Desktop_Notifier.py
Phinix403/Python
64dec2dfb47a966a603dcdf1c65b32a7e3184672
[ "MIT" ]
null
null
null
# Install Notification Module - pip install notify2 import notify2 import time import os notify2.init('Notification') icon_path = os.getcwd() + "/icon.ico" def notiFunc(): noti = notify2.Notification("Welcome to Techix", "Techix is an Tech Dependent Youtube Channel, Please Subscribe to get more Videos Frequentl...
25.894737
164
0.73374
import notify2 import time import os notify2.init('Notification') icon_path = os.getcwd() + "/icon.ico" def notiFunc(): noti = notify2.Notification("Welcome to Techix", "Techix is an Tech Dependent Youtube Channel, Please Subscribe to get more Videos Frequently.", icon=icon_path) noti.set_urgency(notify2.U...
true
true
f705a06c95a7d04645d3ccb50784ff444cc6e934
2,746
py
Python
youtube_dl/extractor/toypics.py
hackarada/youtube-dl
2ba46715a41fe074eab2221170b2ac78fab93fad
[ "Unlicense" ]
66,635
2019-03-10T21:34:18.000Z
2022-03-31T23:50:31.000Z
youtube_dl/extractor/toypics.py
hackarada/youtube-dl
2ba46715a41fe074eab2221170b2ac78fab93fad
[ "Unlicense" ]
10,936
2019-03-10T21:35:47.000Z
2022-03-31T23:46:52.000Z
youtube_dl/extractor/toypics.py
hackarada/youtube-dl
2ba46715a41fe074eab2221170b2ac78fab93fad
[ "Unlicense" ]
15,194
2019-03-10T21:09:27.000Z
2022-03-31T22:13:49.000Z
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor import re class ToypicsIE(InfoExtractor): IE_DESC = 'Toypics video' _VALID_URL = r'https?://videos\.toypics\.net/view/(?P<id>[0-9]+)' _TEST = { 'url': 'http://videos.toypics.net/view/514/chancebulged,-2-1/',...
30.175824
116
0.499636
from __future__ import unicode_literals from .common import InfoExtractor import re class ToypicsIE(InfoExtractor): IE_DESC = 'Toypics video' _VALID_URL = r'https?://videos\.toypics\.net/view/(?P<id>[0-9]+)' _TEST = { 'url': 'http://videos.toypics.net/view/514/chancebulged,-2-1/', 'md5':...
true
true
f705a0bdf5f2e9c98e441ea76e922c6518a8fec9
6,654
py
Python
lingvo/core/wpm_encoder.py
pizzahan/lingvo
9b85b7ba5d037701302efa807841c05223bc7d1d
[ "Apache-2.0" ]
4
2019-06-08T00:19:06.000Z
2020-08-03T16:28:53.000Z
lingvo/core/wpm_encoder.py
pizzahan/lingvo
9b85b7ba5d037701302efa807841c05223bc7d1d
[ "Apache-2.0" ]
null
null
null
lingvo/core/wpm_encoder.py
pizzahan/lingvo
9b85b7ba5d037701302efa807841c05223bc7d1d
[ "Apache-2.0" ]
5
2018-12-11T08:05:16.000Z
2020-05-30T03:40:13.000Z
# -*- coding: utf-8 -*- # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
33.104478
89
0.666366
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import tensorflow as tf from lingvo.core.ops import py_x_ops NO_TOKEN = 1 << 31 - 1 NO_TOKEN_STRING = '<unk>' SENTENCE_START_STRING = '<s>' SENTENCE_END_STRING = '</s>' BOW_STR ...
true
true
f705a1659e4db8d71a128447488a338279e58453
10,720
py
Python
cogs/gachiGASM.py
s0hvaperuna/Not-a-bot
933ae57e70a5c98fed6800205595af21bbf1a10e
[ "MIT" ]
4
2017-03-08T13:38:43.000Z
2018-08-03T13:42:17.000Z
cogs/gachiGASM.py
s0hvaperuna/Not-a-bot
933ae57e70a5c98fed6800205595af21bbf1a10e
[ "MIT" ]
3
2018-08-03T13:14:25.000Z
2018-10-02T16:22:04.000Z
cogs/gachiGASM.py
s0hvaperuna/Not-a-bot
933ae57e70a5c98fed6800205595af21bbf1a10e
[ "MIT" ]
4
2017-04-08T23:22:00.000Z
2018-10-01T12:15:36.000Z
import logging import os import traceback from datetime import datetime, time, timezone from random import Random, choice import disnake from disnake.ext import tasks from disnake.ext.commands import BucketType, cooldown, guild_only from bot.bot import command, group, has_permissions from bot.globals import PLAYLISTS...
54.416244
156
0.648601
import logging import os import traceback from datetime import datetime, time, timezone from random import Random, choice import disnake from disnake.ext import tasks from disnake.ext.commands import BucketType, cooldown, guild_only from bot.bot import command, group, has_permissions from bot.globals import PLAYLISTS...
true
true
f705a3715e94cf0904331d0ec946cb635a00608e
4,169
py
Python
setup.py
igilitschenski/quaternion
44dd138fa7e95e55d0ccd4a7620a3587cf314b4f
[ "MIT" ]
2
2018-08-12T02:01:37.000Z
2020-05-12T11:56:07.000Z
setup.py
igilitschenski/quaternion
44dd138fa7e95e55d0ccd4a7620a3587cf314b4f
[ "MIT" ]
1
2018-08-12T21:05:01.000Z
2018-08-12T21:05:01.000Z
setup.py
igilitschenski/quaternion
44dd138fa7e95e55d0ccd4a7620a3587cf314b4f
[ "MIT" ]
1
2020-10-01T08:49:33.000Z
2020-10-01T08:49:33.000Z
#!/usr/bin/env python # Copyright (c) 2018, Michael Boyle # See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE> # Construct the version number from the date and time this python version was created. from os import environ from sys import platform on_windows = ('win' in platform.low...
49.047059
141
0.656272
from os import environ from sys import platform on_windows = ('win' in platform.lower() and not 'darwin' in platform.lower()) if "package_version" in environ: version = environ["package_version"] print("Setup.py using environment version='{0}'".format(version)) else: print("The variable 'package_versi...
true
true
f705a4cd64c0bf62c1cc3fdc3fdff2a1600a087a
879
py
Python
textworld/challenges/tests/test_coin_collector.py
JohnnySun8/TextWorld
9a54e9d642f7605a0f3ebba3285cdd04047975e2
[ "MIT" ]
307
2019-05-07T01:51:55.000Z
2022-03-31T19:35:47.000Z
textworld/challenges/tests/test_coin_collector.py
JohnnySun8/TextWorld
9a54e9d642f7605a0f3ebba3285cdd04047975e2
[ "MIT" ]
84
2019-05-08T14:24:36.000Z
2022-03-31T14:35:16.000Z
textworld/challenges/tests/test_coin_collector.py
JohnnySun8/TextWorld
9a54e9d642f7605a0f3ebba3285cdd04047975e2
[ "MIT" ]
70
2019-05-21T21:36:56.000Z
2022-02-28T12:04:27.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. import textworld from textworld.challenges import coin_collector def test_making_coin_collector(): expected = { 1: {"quest_length": 1, "nb_rooms": 1}, 100: {"quest_length": 100, "nb_rooms": 100}, ...
35.16
78
0.624573
import textworld from textworld.challenges import coin_collector def test_making_coin_collector(): expected = { 1: {"quest_length": 1, "nb_rooms": 1}, 100: {"quest_length": 100, "nb_rooms": 100}, 101: {"quest_length": 1, "nb_rooms": 2}, 200: {"quest_length": 100, "nb_rooms": 200...
true
true
f705a62076eaad583f13420e3065b76727c22256
2,831
py
Python
core/cooggerapp/forms.py
maksatweb/coogger
480d4cccb2c6876fba116511b72775e2e434245b
[ "MIT" ]
null
null
null
core/cooggerapp/forms.py
maksatweb/coogger
480d4cccb2c6876fba116511b72775e2e434245b
[ "MIT" ]
null
null
null
core/cooggerapp/forms.py
maksatweb/coogger
480d4cccb2c6876fba116511b72775e2e434245b
[ "MIT" ]
1
2019-07-01T10:08:33.000Z
2019-07-01T10:08:33.000Z
# django from django import forms from django.contrib.auth.models import User # choices from core.cooggerapp.choices import * # models from core.cooggerapp.models import ( Content, OtherAddressesOfUsers, UserProfile, ReportModel, UTopic, Issue) from .models.utils import send_mail class UTopicForm(forms.Mod...
23.396694
106
0.607559
from django import forms from django.contrib.auth.models import User from core.cooggerapp.choices import * from core.cooggerapp.models import ( Content, OtherAddressesOfUsers, UserProfile, ReportModel, UTopic, Issue) from .models.utils import send_mail class UTopicForm(forms.ModelForm): class Meta:...
true
true
f705a73863c89acb45d5d05655334e8f3a3a5738
219
py
Python
python/tdd/math/prime.py
xanderyzwich/Playground
3c8bbfc33383f7ac1c88c2093fbe096cc2c44c3a
[ "Apache-2.0" ]
1
2021-08-19T13:40:26.000Z
2021-08-19T13:40:26.000Z
python/tdd/math/prime.py
xanderyzwich/Playground
3c8bbfc33383f7ac1c88c2093fbe096cc2c44c3a
[ "Apache-2.0" ]
null
null
null
python/tdd/math/prime.py
xanderyzwich/Playground
3c8bbfc33383f7ac1c88c2093fbe096cc2c44c3a
[ "Apache-2.0" ]
1
2021-03-31T12:37:14.000Z
2021-03-31T12:37:14.000Z
from math import ceil, sqrt def my_sqrt(input_num): return ceil(sqrt(input_num)) def is_divisible(dividend, divisor): return dividend % divisor == 0 def is_prime(input_num): return True
14.6
37
0.666667
from math import ceil, sqrt def my_sqrt(input_num): return ceil(sqrt(input_num)) def is_divisible(dividend, divisor): return dividend % divisor == 0 def is_prime(input_num): return True
true
true
f705a7e2c833ec94fe1fa23667a30b153375cf95
55
py
Python
pymatgen/phonon/__init__.py
cajfisher/pymatgen
286c304e38102d567723a71f733e0c304b72035d
[ "MIT" ]
921
2015-01-25T22:17:05.000Z
2022-03-27T20:58:38.000Z
pymatgen/phonon/__init__.py
cajfisher/pymatgen
286c304e38102d567723a71f733e0c304b72035d
[ "MIT" ]
1,631
2015-01-05T21:05:04.000Z
2022-03-31T18:40:17.000Z
pymatgen/phonon/__init__.py
cajfisher/pymatgen
286c304e38102d567723a71f733e0c304b72035d
[ "MIT" ]
851
2015-01-01T17:38:00.000Z
2022-03-31T02:14:07.000Z
""" Phonon DOS and bandstructure analysis package. """
13.75
46
0.727273
true
true
f705a8ee33fb9360f9cccd2c289e63ed88006920
6,249
py
Python
applications/welcome/models/menu.py
Gorang-Maniar/DGD
c7b2624c0d0bb0127214ec3804acbe2cc70f8ce0
[ "BSD-3-Clause" ]
8
2018-04-13T14:54:02.000Z
2021-03-04T10:58:09.000Z
webui/applications/grid/models/menu.py
pouyana/teireader
ac0a92d8b2e570eae1c0a03fd35a7b281eccd250
[ "MIT" ]
39
2018-03-23T09:25:38.000Z
2022-03-23T15:22:15.000Z
webui/applications/grid/models/menu.py
pouyana/teireader
ac0a92d8b2e570eae1c0a03fd35a7b281eccd250
[ "MIT" ]
3
2019-04-09T03:49:21.000Z
2020-03-05T03:51:25.000Z
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## Customize your APP title, subtitle and menus here ######################################################################### response.logo...
44.319149
79
0.478957
true
true
f705a92454724dc469a9dcc20bbdf310e2ec08ca
6,419
py
Python
zvt/utils/inform_utils.py
doncat99/zvt
831183bdf7a6d0fc3acd3ea51984df590078eec6
[ "MIT" ]
10
2020-08-08T04:43:00.000Z
2021-07-23T05:38:11.000Z
zvt/utils/inform_utils.py
doncat99/zvt
831183bdf7a6d0fc3acd3ea51984df590078eec6
[ "MIT" ]
1
2021-08-14T12:19:18.000Z
2021-09-30T06:44:04.000Z
zvt/utils/inform_utils.py
doncat99/zvt
831183bdf7a6d0fc3acd3ea51984df590078eec6
[ "MIT" ]
1
2021-12-16T01:57:37.000Z
2021-12-16T01:57:37.000Z
# -*- coding: utf-8 -*- import email import json import logging import smtplib from email.header import Header from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from zvt import zvt_config from zvt.networking.request import get_http_session, sync_get, sync_post class Informer(object)...
37.319767
128
0.572986
import email import json import logging import smtplib from email.header import Header from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from zvt import zvt_config from zvt.networking.request import get_http_session, sync_get, sync_post class Informer(object): logger = logging....
true
true
f705a95dd49f7443385a19b9bb52262d3489eae7
277
py
Python
global_motion_estimation/test scripts/gradient descent tests/dummy.py
Samaretas/global-motion-estimation
798b70ccc23ac6d6c9d25119db22d346c965faca
[ "MIT" ]
null
null
null
global_motion_estimation/test scripts/gradient descent tests/dummy.py
Samaretas/global-motion-estimation
798b70ccc23ac6d6c9d25119db22d346c965faca
[ "MIT" ]
null
null
null
global_motion_estimation/test scripts/gradient descent tests/dummy.py
Samaretas/global-motion-estimation
798b70ccc23ac6d6c9d25119db22d346c965faca
[ "MIT" ]
null
null
null
import numpy as np from scipy import optimize def f(x, a): return x**3 - a def fder(x, a): return 3 * x**2 rng = np.random.default_rng() x = rng.standard_normal(100) a = np.arange(-50, 50) vec_res = optimize.newton(f, x, fprime=fder, args=(a, ), maxiter=200) print(vec_res)
21.307692
69
0.6787
import numpy as np from scipy import optimize def f(x, a): return x**3 - a def fder(x, a): return 3 * x**2 rng = np.random.default_rng() x = rng.standard_normal(100) a = np.arange(-50, 50) vec_res = optimize.newton(f, x, fprime=fder, args=(a, ), maxiter=200) print(vec_res)
true
true
f705a9bd41c3c5d52a4114e43e885fd40f95eb2b
18,618
py
Python
tools/codegen/core/gen_static_metadata.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
1
2020-02-22T04:55:43.000Z
2020-02-22T04:55:43.000Z
tools/codegen/core/gen_static_metadata.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
null
null
null
tools/codegen/core/gen_static_metadata.py
benjaminp/grpc
dfb1a0f20624417bff408a14b12a23713085b999
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
30.773554
204
0.591363
import hashlib import itertools import collections import os import sys import subprocess import re import perfection CONFIG = [ 'host', 'grpc-timeout', 'grpc-internal-encoding-request', 'grpc-internal-stream-encoding-request', 'grpc-payload-bin', ':path', 'grp...
true
true
f705aa0a9cc3013d4d6d764c543ef84eb33c842d
266
py
Python
bulbea/__init__.py
saimohithnaag/StockPredictor
4caba8f042f1d87ec0b41ec8e14d3a458a7409a4
[ "Apache-2.0" ]
1,761
2017-03-09T08:51:28.000Z
2022-03-27T18:15:06.000Z
bulbea/__init__.py
saimohithnaag/StockPredictor
4caba8f042f1d87ec0b41ec8e14d3a458a7409a4
[ "Apache-2.0" ]
38
2017-03-11T11:51:16.000Z
2021-06-27T15:00:07.000Z
bulbea/__init__.py
saimohithnaag/StockPredictor
4caba8f042f1d87ec0b41ec8e14d3a458a7409a4
[ "Apache-2.0" ]
511
2017-03-12T03:49:26.000Z
2022-03-15T23:05:49.000Z
# imports - compatibility packages from __future__ import absolute_import # module imports from bulbea.entity import Share, Stock from bulbea.config import AppConfig from bulbea.app import app from bulbea.learn import sentiment __version__ = AppConfig.VERSION
24.181818
38
0.819549
from __future__ import absolute_import from bulbea.entity import Share, Stock from bulbea.config import AppConfig from bulbea.app import app from bulbea.learn import sentiment __version__ = AppConfig.VERSION
true
true
f705aa3f869f15ac85f262ae3734bf3603f18c56
2,656
bzl
Python
haskell/set.bzl
iphydf/rules_haskell
546c698cb782fd0749a3c91eb41e1f9a19c65646
[ "Apache-2.0" ]
null
null
null
haskell/set.bzl
iphydf/rules_haskell
546c698cb782fd0749a3c91eb41e1f9a19c65646
[ "Apache-2.0" ]
null
null
null
haskell/set.bzl
iphydf/rules_haskell
546c698cb782fd0749a3c91eb41e1f9a19c65646
[ "Apache-2.0" ]
null
null
null
"""Immutable sets that support efficient merging, traversal, and membership check. """ def _empty(): """Create an empty set. Returns: set, new empty set. """ return struct(_set_items = dict()) def _is_member(s, e): """Return true if `e` is in the set `s`. Args: s: The set to inspect. e: The ...
19.386861
75
0.636672
def _empty(): return struct(_set_items = dict()) def _is_member(s, e): return e in s._set_items def _insert(s, e): r = dict(s._set_items) r[e] = None return struct(_set_items = r) def _mutable_insert(s, e): s._set_items[e] = None return s def _union(s0, s1): r = dict(s0._set_items) r.update(s1._s...
true
true
f705aa53c6355389b32f15c7666bdf8d321b755f
5,052
py
Python
singer_encodings/json_schema.py
INGCRENGIFO/singer-encodings
eec3d7276bbc209b3e0d3c5e2a46c223d69e45b1
[ "Apache-2.0" ]
null
null
null
singer_encodings/json_schema.py
INGCRENGIFO/singer-encodings
eec3d7276bbc209b3e0d3c5e2a46c223d69e45b1
[ "Apache-2.0" ]
null
null
null
singer_encodings/json_schema.py
INGCRENGIFO/singer-encodings
eec3d7276bbc209b3e0d3c5e2a46c223d69e45b1
[ "Apache-2.0" ]
1
2021-05-25T14:00:25.000Z
2021-05-25T14:00:25.000Z
import re from . import csv SDC_SOURCE_FILE_COLUMN = "_sdc_source_file" SDC_SOURCE_LINENO_COLUMN = "_sdc_source_lineno" # TODO: Add additional logging # TODO: conn needs get_files and get_file_handle functions def get_schema_for_table(conn, table_spec): files = conn.get_files(table_spec['search_prefix'], table_...
26.87234
86
0.578583
import re from . import csv SDC_SOURCE_FILE_COLUMN = "_sdc_source_file" SDC_SOURCE_LINENO_COLUMN = "_sdc_source_lineno" def get_schema_for_table(conn, table_spec): files = conn.get_files(table_spec['search_prefix'], table_spec['search_pattern']) if not files: return {} samples = sample_files...
true
true
f705aa7a111c288e8e1467878b55832e0ecc8a3a
6,992
py
Python
appdaemontestframework/automation_fixture.py
fhoekstra/Appdaemon-Test-Framework
f4b3ed1145c83228cfe4e7cbc3e351b4ac975f86
[ "MIT" ]
37
2018-08-08T10:48:13.000Z
2022-03-09T22:31:11.000Z
appdaemontestframework/automation_fixture.py
fhoekstra/Appdaemon-Test-Framework
f4b3ed1145c83228cfe4e7cbc3e351b4ac975f86
[ "MIT" ]
58
2018-10-05T13:36:57.000Z
2022-02-06T11:37:20.000Z
appdaemontestframework/automation_fixture.py
fhoekstra/Appdaemon-Test-Framework
f4b3ed1145c83228cfe4e7cbc3e351b4ac975f86
[ "MIT" ]
13
2018-12-04T19:22:23.000Z
2022-02-06T10:32:04.000Z
import warnings from inspect import isfunction, signature import pkg_resources import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemontestframework.common import AppdaemonTestFrameworkError class AutomationFixtureError(AppdaemonTestFrameworkError): pass def _instantiate_and_initialize_aut...
38.844444
149
0.707809
import warnings from inspect import isfunction, signature import pkg_resources import pytest from appdaemon.plugins.hass.hassapi import Hass from appdaemontestframework.common import AppdaemonTestFrameworkError class AutomationFixtureError(AppdaemonTestFrameworkError): pass def _instantiate_and_initialize_aut...
true
true
f705aabf435e5694deac5786cce3a35968d77640
805,471
py
Python
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_ospf_oper.py
CiscoDevNet/ydk-py
073731fea50694d0bc6cd8ebf10fec308dcc0aa9
[ "ECL-2.0", "Apache-2.0" ]
177
2016-03-15T17:03:51.000Z
2022-03-18T16:48:44.000Z
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_ospf_oper.py
CiscoDevNet/ydk-py
073731fea50694d0bc6cd8ebf10fec308dcc0aa9
[ "ECL-2.0", "Apache-2.0" ]
18
2016-03-30T10:45:22.000Z
2020-07-14T16:28:13.000Z
cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_ospf_oper.py
CiscoDevNet/ydk-py
073731fea50694d0bc6cd8ebf10fec308dcc0aa9
[ "ECL-2.0", "Apache-2.0" ]
85
2016-03-16T20:38:57.000Z
2022-02-22T04:26:02.000Z
""" Cisco_IOS_XE_ospf_oper This module contains a collection of YANG definitions for monitoring the operation of ospf protocol in a Network Element. Copyright (c) 2016\-2018 by Cisco Systems, Inc. All rights reserved. """ from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, ...
53.996849
1,779
0.368293
from collections import OrderedDict from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64 from ydk.filters import YFilter from ydk.errors import YError, YModelError from ydk.errors.error_handler import handle_type_error as _handle_type_error c...
true
true
f705ab09a5963cd25258cf441567b8cdaf1b0983
10,096
py
Python
configs/common/CacheConfig.py
seanzw/UCLA-CS259-MachinesThatLearn-TensorCore
aece7fcdf97d2864fbb31e02940bfcdd470db7b9
[ "BSD-3-Clause" ]
3
2019-07-19T22:52:27.000Z
2020-05-26T04:37:46.000Z
configs/common/CacheConfig.py
seanzw/UCLA-CS259-MachinesThatLearn-TensorCore
aece7fcdf97d2864fbb31e02940bfcdd470db7b9
[ "BSD-3-Clause" ]
1
2019-07-22T16:41:56.000Z
2019-07-22T16:41:56.000Z
configs/common/CacheConfig.py
seanzw/UCLA-CS259-MachinesThatLearn-TensorCore
aece7fcdf97d2864fbb31e02940bfcdd470db7b9
[ "BSD-3-Clause" ]
2
2019-06-26T14:33:42.000Z
2019-10-02T02:09:23.000Z
# Copyright (c) 2012-2013, 2015-2016 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the...
44.475771
79
0.639758
from __future__ import print_function from __future__ import absolute_import import m5 from m5.objects import * from .Caches import * from . import HWPConfig def config_cache(options, system): if options.external_memory_system and (options.caches or options.l2cache): ...
true
true
f705ab4544bccecfcecc8f47c620ff3d110450c3
4,475
py
Python
users/user_forms.py
dennisfarmer/texas-hospital-hackathon
dabf80a2c3d78d595280d4ff9475176da4848349
[ "MIT" ]
null
null
null
users/user_forms.py
dennisfarmer/texas-hospital-hackathon
dabf80a2c3d78d595280d4ff9475176da4848349
[ "MIT" ]
null
null
null
users/user_forms.py
dennisfarmer/texas-hospital-hackathon
dabf80a2c3d78d595280d4ff9475176da4848349
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm # from crispy_forms.helper import FormHelper # from crispy_forms.layout import Submit import sys import os from .models import User_Profile sys.path.append(os.path.dirname...
33.646617
97
0.604469
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm import sys import os from .models import User_Profile sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) from orders.models import Location, L...
true
true
f705ab6b22fcd6f8fa7f8f53688eda2185ea5ef3
1,971
py
Python
WebDemo/flask_app/main.py
silenceliang/Cascading-agents-hybridSum
6c127df51bd8cc926878f62ebdb66bc1042bb58c
[ "MIT" ]
1
2020-02-23T15:38:18.000Z
2020-02-23T15:38:18.000Z
WebDemo/flask_app/main.py
silenceliang/CascadingAgentsHybridSum
6c127df51bd8cc926878f62ebdb66bc1042bb58c
[ "MIT" ]
null
null
null
WebDemo/flask_app/main.py
silenceliang/CascadingAgentsHybridSum
6c127df51bd8cc926878f62ebdb66bc1042bb58c
[ "MIT" ]
null
null
null
from flask import render_template, request from flask_script import Manager, Server from app import app from model import Content, Summary, Article import app.static.summ as summarizationModel import os, json, logging @app.route('/', endpoint='ACCESS') @app.route('/index.html', endpoint='ACCESSFILE') def index(): ...
32.311475
94
0.624049
from flask import render_template, request from flask_script import Manager, Server from app import app from model import Content, Summary, Article import app.static.summ as summarizationModel import os, json, logging @app.route('/', endpoint='ACCESS') @app.route('/index.html', endpoint='ACCESSFILE') def index(): ...
true
true
f705abab94d05422bd97d62349625cd2fa0906e4
15,678
py
Python
synapse/http/server.py
theworldbright/synapse
6783534a0f9f34d6972a31af368ee2324e2033f3
[ "Apache-2.0" ]
null
null
null
synapse/http/server.py
theworldbright/synapse
6783534a0f9f34d6972a31af368ee2324e2033f3
[ "Apache-2.0" ]
null
null
null
synapse/http/server.py
theworldbright/synapse
6783534a0f9f34d6972a31af368ee2324e2033f3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
36.124424
88
0.637518
from synapse.api.errors import ( cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError, Codes ) from synapse.util.logcontext import LoggingContext, PreserveLoggingContext from synapse.util.caches import intern_dict import synapse.metrics import synapse.events from canonicaljson...
true
true
f705ae64cdecffa5cafbe9b36e37245e035fb0b5
1,380
py
Python
hackerearth/Algorithms/Feasible relations/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerearth/Algorithms/Feasible relations/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerearth/Algorithms/Feasible relations/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
""" # Sample code to perform I/O: name = input() # Reading input from STDIN print('Hi, %s.' % name) # Writing output to STDOUT # Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail """ # Write your code here from collections import deque, defaultdict ...
27.6
94
0.571739
from collections import deque, defaultdict from sys import stdin def check_connected(x, connected, adjacency): stack = deque([x]) while stack: u = stack.pop() for v in adjacency[u]: if v not in connected: connected[v] = x stack.append(v) t = int(...
true
true
f705ae9c256c532814c09ac996b19cab9acfb4e3
2,527
py
Python
old/apply/apply/settings.py
neonsoftware/yard
5f2fda72c7a3f330d2442002687ff4d1dfb21680
[ "MIT" ]
1
2015-03-11T07:43:09.000Z
2015-03-11T07:43:09.000Z
old/apply/apply/settings.py
neonsoftware/yard
5f2fda72c7a3f330d2442002687ff4d1dfb21680
[ "MIT" ]
5
2015-05-17T18:22:29.000Z
2015-08-15T17:27:03.000Z
old/apply/apply/settings.py
neonsoftware/yard
5f2fda72c7a3f330d2442002687ff4d1dfb21680
[ "MIT" ]
null
null
null
""" Django settings for apply project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
25.019802
103
0.688564
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = '--v$_^*0r5(ok1^2sxdm4w_wwskvuv-z0tcop+yf1-m@+7p#5i' DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.co...
true
true
f705af023850008c9327aaee200ad9ea7dc63b24
405
py
Python
config/wsgi.py
bertini36/boatsandjoy-api
b22d82eb02947218d924b381160d622ded9e1d98
[ "MIT" ]
null
null
null
config/wsgi.py
bertini36/boatsandjoy-api
b22d82eb02947218d924b381160d622ded9e1d98
[ "MIT" ]
12
2021-04-08T21:18:37.000Z
2022-03-12T00:39:39.000Z
config/wsgi.py
bertini36/boatsandjoy-api
b22d82eb02947218d924b381160d622ded9e1d98
[ "MIT" ]
null
null
null
""" WSGI config for Boats & Joy project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
23.823529
78
0.782716
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.production') application = get_wsgi_application()
true
true
f705b09b0a46fccb8f3405bc8e17fc8dd4cacc82
3,609
py
Python
src/third_party/wiredtiger/test/suite/test_lsm01.py
mwhudson/mongo
914bbbd26a686e032fdddec964b109ea78c6e6f6
[ "Apache-2.0" ]
14
2019-01-11T05:01:29.000Z
2021-11-01T00:39:46.000Z
src/third_party/wiredtiger/test/suite/test_lsm01.py
mwhudson/mongo
914bbbd26a686e032fdddec964b109ea78c6e6f6
[ "Apache-2.0" ]
1
2022-03-05T02:55:28.000Z
2022-03-05T05:28:00.000Z
src/third_party/wiredtiger/test/suite/test_lsm01.py
mwhudson/mongo
914bbbd26a686e032fdddec964b109ea78c6e6f6
[ "Apache-2.0" ]
7
2019-02-08T16:28:36.000Z
2021-05-08T14:25:47.000Z
#!/usr/bin/env python # # Public Domain 2014-2016 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compil...
41.011364
76
0.665281
import wiredtiger, wtscenario, wttest from wtdataset import SimpleDataSet class test_lsm01(wttest.WiredTigerTestCase): K = 1024 M = 1024 * K G = 1024 * M uri = "lsm:test_lsm01" chunk_size_scenarios = wtscenario.quick_scenarios('s_chunk_size', [1*M,20*M,None], ...
true
true
f705b0edb87ae2c78f1229ba615f3eb737a2e382
68,829
py
Python
SoftLayer/fixtures/SoftLayer_Product_Package.py
kz6fittycent/softlayer-python
79a06c38bb48bb4d9712fec2d50ec26a7b2e2d72
[ "MIT" ]
null
null
null
SoftLayer/fixtures/SoftLayer_Product_Package.py
kz6fittycent/softlayer-python
79a06c38bb48bb4d9712fec2d50ec26a7b2e2d72
[ "MIT" ]
null
null
null
SoftLayer/fixtures/SoftLayer_Product_Package.py
kz6fittycent/softlayer-python
79a06c38bb48bb4d9712fec2d50ec26a7b2e2d72
[ "MIT" ]
null
null
null
# pylint: skip-file HARDWARE_ITEMS = [ {'attributes': [], 'capacity': '999', 'description': 'Unknown', 'itemCategory': {'categoryCode': 'unknown', 'id': 325}, 'keyName': 'UNKNOWN', 'prices': [{'accountRestrictions': [], 'currentPriceFlag': '', 'hourlyRecurr...
33.444606
106
0.375074
HARDWARE_ITEMS = [ {'attributes': [], 'capacity': '999', 'description': 'Unknown', 'itemCategory': {'categoryCode': 'unknown', 'id': 325}, 'keyName': 'UNKNOWN', 'prices': [{'accountRestrictions': [], 'currentPriceFlag': '', 'hourlyRecurringFee': '0', ...
true
true
f705b13cfc1cd5bcb7ec174f96d2acb2a724ac65
41
py
Python
lectures/code/mr_map.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
4
2015-08-10T17:46:55.000Z
2020-04-18T21:09:03.000Z
lectures/code/mr_map.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
null
null
null
lectures/code/mr_map.py
naskoch/python_course
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
[ "MIT" ]
2
2019-04-24T03:31:02.000Z
2019-05-13T07:36:06.000Z
f = lambda x: x + 1 map(f, [1, 2, 3, 4])
13.666667
20
0.439024
f = lambda x: x + 1 map(f, [1, 2, 3, 4])
true
true
f705b2b334785f83ba36f8f36add6d246c62f860
2,257
py
Python
slackbot_te/slackpi.py
wray/slack_em
ac4bc3c0a5c6c644582d9117a1111d1bfad3bf66
[ "MIT" ]
null
null
null
slackbot_te/slackpi.py
wray/slack_em
ac4bc3c0a5c6c644582d9117a1111d1bfad3bf66
[ "MIT" ]
null
null
null
slackbot_te/slackpi.py
wray/slack_em
ac4bc3c0a5c6c644582d9117a1111d1bfad3bf66
[ "MIT" ]
null
null
null
import os import time from slackclient import SlackClient import bot_id # Instructor and student imports import wray.slacklib import joe.slacklib import chris.slacklib # constants try: AT_BOT = "<@" + bot_id.get_id() + ">" except TypeError: pass # instantiate client slack_client = SlackClient(os.environ.get...
30.5
75
0.658839
import os import time from slackclient import SlackClient import bot_id import wray.slacklib import joe.slacklib import chris.slacklib try: AT_BOT = "<@" + bot_id.get_id() + ">" except TypeError: pass slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) def handle_command(command, channel): ...
true
true
f705b48143f78825bb5ce93336c2b928cbc14651
2,601
py
Python
venv/Lib/site-packages/phonenumbers/data/region_PH.py
HarisHijazi/mojarnik-server
bee7266609cc0bca7cc6a4059086fc0ba7219a33
[ "MIT" ]
null
null
null
venv/Lib/site-packages/phonenumbers/data/region_PH.py
HarisHijazi/mojarnik-server
bee7266609cc0bca7cc6a4059086fc0ba7219a33
[ "MIT" ]
2
2021-06-22T01:34:18.000Z
2021-06-22T01:40:28.000Z
venv/Lib/site-packages/phonenumbers/data/region_PH.py
HarisHijazi/mojarnik-server
bee7266609cc0bca7cc6a4059086fc0ba7219a33
[ "MIT" ]
null
null
null
"""Auto-generated file, do not edit by hand. PH metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_PH = PhoneMetadata(id='PH', country_code=63, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='1800\\d{7,9}|(?:2|[89]\\d{4})\\d{5}|[2-8]...
130.05
325
0.618608
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_PH = PhoneMetadata(id='PH', country_code=63, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='1800\\d{7,9}|(?:2|[89]\\d{4})\\d{5}|[2-8]\\d{8}|[28]\\d{7}', possible_length=(6, 8, 9, 10, 11, 12, 13...
true
true
f705b5f35286918ebf4f6eb85dc49797c87f040f
2,375
py
Python
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/example/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
159
2019-11-13T14:11:39.000Z
2022-03-24T05:47:10.000Z
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/example/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
34
2019-11-06T08:32:48.000Z
2022-01-14T11:31:29.000Z
ch05/myproject_virtualenv/src/django-myproject/myproject/apps/example/views.py
PacktPublishing/Django-3-Web-Development-Cookbook
6ffe6e0add93a43a9abaff62e0147dc1f4f5351a
[ "MIT" ]
103
2019-08-15T21:35:26.000Z
2022-03-20T05:29:11.000Z
# -*- coding: UTF-8 -*- from __future__ import unicode_literals from datetime import timedelta from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.utils.timezone import now as tz_now @login_required def start_page(request): # ...
67.857143
880
0.722947
from __future__ import unicode_literals from datetime import timedelta from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.utils.timezone import now as tz_now @login_required def start_page(request): obj = { "cre...
true
true
f705b6a65b0a1a3cce1c1b27d5be5e9b86cb5570
2,458
py
Python
python/athena/onnx/handler.py
sj1104/Het
81b7e9f0f593108db969fc46a1af3df74b825230
[ "Apache-2.0" ]
2
2021-12-05T07:11:04.000Z
2021-12-15T07:53:48.000Z
python/athena/onnx/handler.py
sj1104/Het
81b7e9f0f593108db969fc46a1af3df74b825230
[ "Apache-2.0" ]
null
null
null
python/athena/onnx/handler.py
sj1104/Het
81b7e9f0f593108db969fc46a1af3df74b825230
[ "Apache-2.0" ]
3
2021-04-01T22:39:13.000Z
2021-04-21T11:51:57.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import inspect from athena.onnx import constants ...
29.97561
92
0.6131
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import inspect from athena.onnx import constants class athena_op: _OPSETS = collections.OrderedDict() _MAPPING = None def __ini...
true
true
f705b7c9ba1ebdfedca5661e5e709e360e52da9e
4,993
py
Python
tutorials/resources/my429_qcomponents.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
167
2021-03-17T20:35:17.000Z
2022-03-31T13:25:04.000Z
tutorials/resources/my429_qcomponents.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
307
2021-03-17T14:07:43.000Z
2022-03-23T14:22:20.000Z
tutorials/resources/my429_qcomponents.py
TomVethaak/qiskit-metal
0fd3049b16a2b28dc6890b696d67329a91da70b9
[ "Apache-2.0" ]
122
2021-03-17T14:21:24.000Z
2022-03-18T10:09:38.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
38.705426
81
0.567795
from qiskit_metal import draw, Dict from qiskit_metal.qlibrary.core import QComponent class MyQComponent1(QComponent): er='1') def make(self): p = self.parse_options( ) rect = draw.rectangle(p.width, p.height, p.pos_x, p.pos_y) self.add_qgeometry('poly', {'my...
true
true
f705b7eb5329fb67c4342d7f6f4f2089a9062d8f
1,324
py
Python
torchfes/colvar/fix.py
AkihideHayashi/torchfes1
83f01525e6071ffd7a884c8e108f9c25ba2b009b
[ "MIT" ]
null
null
null
torchfes/colvar/fix.py
AkihideHayashi/torchfes1
83f01525e6071ffd7a884c8e108f9c25ba2b009b
[ "MIT" ]
null
null
null
torchfes/colvar/fix.py
AkihideHayashi/torchfes1
83f01525e6071ffd7a884c8e108f9c25ba2b009b
[ "MIT" ]
null
null
null
import math from typing import Dict, Union, List import torch from torch import nn, Tensor from .. import properties as p def fix_msk(mol: Dict[str, Tensor], idx: Tensor): _, atm, dim = mol[p.pos].size() msk = torch.zeros([atm, dim], dtype=torch.bool, device=idx.device) msk[idx, :] = True return msk ...
27.020408
70
0.586858
import math from typing import Dict, Union, List import torch from torch import nn, Tensor from .. import properties as p def fix_msk(mol: Dict[str, Tensor], idx: Tensor): _, atm, dim = mol[p.pos].size() msk = torch.zeros([atm, dim], dtype=torch.bool, device=idx.device) msk[idx, :] = True return msk ...
true
true
f705b8a080b3d7d64d5acef4a26a5ac0ae6a0be5
675
py
Python
SfM/Traditional/ExtraCredit/ExtractCameraPose.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
1
2022-03-30T05:03:10.000Z
2022-03-30T05:03:10.000Z
SfM/Traditional/ExtraCredit/ExtractCameraPose.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
null
null
null
SfM/Traditional/ExtraCredit/ExtractCameraPose.py
akathpal/UMD-CMSC733-ComputerVision
f5fa21a0ada8ab8ea08a6c558f6df9676570a2df
[ "MIT" ]
1
2022-03-30T05:03:09.000Z
2022-03-30T05:03:09.000Z
import numpy as np import sys sys.dont_write_bytecode = True def ExtractCameraPose(E, K): U, S, V_T = np.linalg.svd(E) W = np.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]]) # print("E svd U", U) # print("E svd S", S) # print("E svd U[:, 2]", U[:, 2]) R = [] C = [] R.append(np.dot(U, np.do...
21.774194
52
0.463704
import numpy as np import sys sys.dont_write_bytecode = True def ExtractCameraPose(E, K): U, S, V_T = np.linalg.svd(E) W = np.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]]) R = [] C = [] R.append(np.dot(U, np.dot(W, V_T))) R.append(np.dot(U, np.dot(W, V_T))) R.append(np.dot(U, ...
true
true
f705b953a933a6e69681d0fcfe62b07584f75861
1,058
py
Python
app/user/views.py
frankRose1/recipe-app-api
0fff174ecb59bb06e6b631a33e34984e2f12f68a
[ "MIT" ]
null
null
null
app/user/views.py
frankRose1/recipe-app-api
0fff174ecb59bb06e6b631a33e34984e2f12f68a
[ "MIT" ]
null
null
null
app/user/views.py
frankRose1/recipe-app-api
0fff174ecb59bb06e6b631a33e34984e2f12f68a
[ "MIT" ]
null
null
null
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): """Create a new user in the s...
35.266667
74
0.780718
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): serializer_class = UserSerial...
true
true
f705ba86509d02480a6aad1d5e160ac7369c37b3
748
py
Python
myblog/urls.py
kubruslihiga/djangotutorial
c13c5267761a4aaa422271b4220d8e724fccd37a
[ "Apache-2.0" ]
null
null
null
myblog/urls.py
kubruslihiga/djangotutorial
c13c5267761a4aaa422271b4220d8e724fccd37a
[ "Apache-2.0" ]
null
null
null
myblog/urls.py
kubruslihiga/djangotutorial
c13c5267761a4aaa422271b4220d8e724fccd37a
[ "Apache-2.0" ]
null
null
null
"""myblog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
34
77
0.708556
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f705bbab14c4d76328f030a10cda3c1c25aff596
63
py
Python
test.sh.py
MarcAntoineAlex/query-selector-1
f41938e5b4661c7df7d02a2a0ef841921d14d4f6
[ "Apache-2.0" ]
null
null
null
test.sh.py
MarcAntoineAlex/query-selector-1
f41938e5b4661c7df7d02a2a0ef841921d14d4f6
[ "Apache-2.0" ]
null
null
null
test.sh.py
MarcAntoineAlex/query-selector-1
f41938e5b4661c7df7d02a2a0ef841921d14d4f6
[ "Apache-2.0" ]
null
null
null
a = [0, 1, 2] b = [0, 1] for a, b in zip(a, b): print(a, b)
15.75
22
0.412698
a = [0, 1, 2] b = [0, 1] for a, b in zip(a, b): print(a, b)
true
true
f705bbcb1c4c4102c9bcfce19fd7880e846a49e3
3,851
py
Python
python业务代码/地图散点可视化/2/plot_city_machine.py
RobinYaoWenbin/Python-CommonCode
1ee714541f2fd9c8b96d018d3d4eb94f4edc812a
[ "MIT" ]
12
2020-09-28T03:25:03.000Z
2022-03-20T07:44:09.000Z
python业务代码/地图散点可视化/2/plot_city_machine.py
RobinYaoWenbin/Python-CommonCode
1ee714541f2fd9c8b96d018d3d4eb94f4edc812a
[ "MIT" ]
null
null
null
python业务代码/地图散点可视化/2/plot_city_machine.py
RobinYaoWenbin/Python-CommonCode
1ee714541f2fd9c8b96d018d3d4eb94f4edc812a
[ "MIT" ]
21
2020-03-19T00:44:35.000Z
2022-01-30T03:46:18.000Z
# -*- coding: utf-8 -*- """ Created on Wed Aug 7 09:36:45 2019 @author: MyPC """ import pandas as pd import matplotlib.pyplot as plt import matplotlib import math import pymssql import numpy as np import copy import re from sklearn import preprocessing from sklearn.linear_model import LinearRegression...
47.54321
317
0.579849
import pandas as pd import matplotlib.pyplot as plt import matplotlib import math import pymssql import numpy as np import copy import re from sklearn import preprocessing from sklearn.linear_model import LinearRegression from pyecharts import Map, Geo , Timeline def get_data_signalmachine(): df = p...
true
true
f705bf3cfd5f5c6cac8ba32067f41aadcc0e38d6
34,521
py
Python
autodp/rdp_acct.py
jeremy43/autodp-1
0a3626f6e1baaefb46715396998d1e8029a659bb
[ "Apache-2.0" ]
2
2020-06-11T02:48:41.000Z
2020-11-17T07:04:01.000Z
autodp/rdp_acct.py
jeremy43/autodp-1
0a3626f6e1baaefb46715396998d1e8029a659bb
[ "Apache-2.0" ]
null
null
null
autodp/rdp_acct.py
jeremy43/autodp-1
0a3626f6e1baaefb46715396998d1e8029a659bb
[ "Apache-2.0" ]
null
null
null
""" This file contains the implementation of the main class object: anaRDPacct --- an analytical moment accountant that keeps track the effects of a hetereogeneous sequence of randomized algorithms using the RDP technique. In particular it supports amplification of RDP by subsampling without replacement and the ampli...
44.658473
125
0.534312
import numpy as np from scipy.optimize import minimize_scalar import sys sys.path.append('..') import autodp from autodp import utils, rdp_bank from autodp.privacy_calibrator import subsample_epsdelta import scipy import math def general_upperbound(func, mm, prob): def cgf(x): return (x - 1) * func(...
true
true
f705c04fa8bb30cc2be892362cc4af89d3328301
1,297
py
Python
test/test_utils/test_statistical_tests.py
deslay1/CAVE
e4b9abc3812034f49dddd27ffc17dbab39782a1c
[ "BSD-3-Clause" ]
45
2018-01-11T11:26:11.000Z
2021-06-22T06:14:39.000Z
test/test_utils/test_statistical_tests.py
deslay1/CAVE
e4b9abc3812034f49dddd27ffc17dbab39782a1c
[ "BSD-3-Clause" ]
150
2017-12-20T16:14:45.000Z
2021-09-28T11:26:33.000Z
test/test_utils/test_statistical_tests.py
automl/SpySMAC
afcbecd0b9cb97276625c16a89cb6df141e6f6f2
[ "BSD-3-Clause" ]
17
2018-03-17T04:46:09.000Z
2021-02-18T18:31:38.000Z
import logging import unittest import numpy as np from cave.utils.statistical_tests import paired_permutation, paired_t_student class TestStatisticalTests(unittest.TestCase): def setUp(self): self.logger = logging.getLogger("TestStatisticalTests") def test_paired_permutation(self): """ Tes...
37.057143
77
0.651503
import logging import unittest import numpy as np from cave.utils.statistical_tests import paired_permutation, paired_t_student class TestStatisticalTests(unittest.TestCase): def setUp(self): self.logger = logging.getLogger("TestStatisticalTests") def test_paired_permutation(self): rng = n...
true
true
f705c09c479088d7f96725e5df722801a0715965
5,653
py
Python
ibmsecurity/isam/base/network/felb/services/servers.py
ibm-enio/ibmsecurity
81f989678642c3b6a49b2a3fbb5d9ca98804ef17
[ "Apache-2.0" ]
2
2019-12-05T13:51:10.000Z
2019-12-20T08:02:35.000Z
ibmsecurity/isam/base/network/felb/services/servers.py
ibm-enio/ibmsecurity
81f989678642c3b6a49b2a3fbb5d9ca98804ef17
[ "Apache-2.0" ]
null
null
null
ibmsecurity/isam/base/network/felb/services/servers.py
ibm-enio/ibmsecurity
81f989678642c3b6a49b2a3fbb5d9ca98804ef17
[ "Apache-2.0" ]
1
2020-04-03T09:30:01.000Z
2020-04-03T09:30:01.000Z
import ibmsecurity.utilities.tools import logging logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/services/" requires_modulers = None requires_version = None def add(isamAppliance, service_name, address, active, port, weight, secure, ssllabel, check_mode=False, force=False): """ ...
38.195946
120
0.552096
import ibmsecurity.utilities.tools import logging logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/services/" requires_modulers = None requires_version = None def add(isamAppliance, service_name, address, active, port, weight, secure, ssllabel, check_mode=False, force=False): change_r...
true
true
f705c13bef4357c4b974d68a76c4f8617f700d7c
1,417
py
Python
tensorflow_probability/python/version.py
bolcom/probability
4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7
[ "Apache-2.0" ]
1
2019-10-10T06:15:42.000Z
2019-10-10T06:15:42.000Z
tensorflow_probability/python/version.py
bolcom/probability
4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/version.py
bolcom/probability
4a11efad1ecd8a1336e4c9fdb0105efbf2375ad7
[ "Apache-2.0" ]
1
2020-05-27T19:42:06.000Z
2020-05-27T19:42:06.000Z
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
38.297297
80
0.703599
_MAJOR_VERSION = '0' _MINOR_VERSION = '9' _PATCH_VERSION = '0' _VERSION_SUFFIX = 'dev' __version__ = '.'.join([ _MAJOR_VERSION, _MINOR_VERSION, _PATCH_VERSION, ]) if _VERSION_SUFFIX: __version__ = '{}-{}'.format(__version__, _VERSION_SUFFIX)
true
true
f705c143029f1b8fb5a082a334e82961e60babb9
3,371
py
Python
model_zoo/mnist/mnist_functional_api.py
zuston/elasticdl
601609fd44f826a2f5ea209443124b2c9a2f9ccb
[ "MIT" ]
null
null
null
model_zoo/mnist/mnist_functional_api.py
zuston/elasticdl
601609fd44f826a2f5ea209443124b2c9a2f9ccb
[ "MIT" ]
null
null
null
model_zoo/mnist/mnist_functional_api.py
zuston/elasticdl
601609fd44f826a2f5ea209443124b2c9a2f9ccb
[ "MIT" ]
null
null
null
# Copyright 2020 The ElasticDL Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
32.413462
77
0.644616
import numpy as np import PIL.Image import tensorflow as tf from elasticdl.python.common.constants import Mode def custom_model(): inputs = tf.keras.Input(shape=(28, 28), name="image") x = tf.keras.layers.Reshape((28, 28, 1))(inputs) x = tf.keras.layers.Conv2D(32, kernel_size=(3, 3), activat...
true
true
f705c37d2339c79f6a9a632cefaf65a79808d37d
1,720
py
Python
2015/CVE-2015-5688/poc/pocsploit/CVE-2015-5688.py
hjyuan/reapoc
ef515e56c44c2590ff8601582bf6c08e076e7083
[ "Apache-2.0" ]
421
2021-12-07T08:46:40.000Z
2022-03-31T12:42:16.000Z
2015/CVE-2015-5688/poc/pocsploit/CVE-2015-5688.py
hjyuan/reapoc
ef515e56c44c2590ff8601582bf6c08e076e7083
[ "Apache-2.0" ]
5
2022-03-27T07:37:32.000Z
2022-03-31T13:56:11.000Z
2015/CVE-2015-5688/poc/pocsploit/CVE-2015-5688.py
hjyuan/reapoc
ef515e56c44c2590ff8601582bf6c08e076e7083
[ "Apache-2.0" ]
144
2021-12-07T11:06:14.000Z
2022-03-31T07:41:35.000Z
import requests # Vuln Base Info def info(): return { "author": "cckuailong", "name": '''Geddy before v13.0.8 LFI''', "description": '''Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read arbitrary files via a ..%2f (dot ...
26.875
239
0.533721
import requests def info(): return { "author": "cckuailong", "name": '''Geddy before v13.0.8 LFI''', "description": '''Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read arbitrary files via a ..%2f (dot dot encoded slas...
true
true
f705c380c38b745a99107f2f972df3893011b4c5
64
py
Python
Factorial digit sum/main.py
Skogrine/ProjectEuler
40e104ac91852dec66b5b7938d6553d1bbdc590f
[ "Apache-2.0" ]
null
null
null
Factorial digit sum/main.py
Skogrine/ProjectEuler
40e104ac91852dec66b5b7938d6553d1bbdc590f
[ "Apache-2.0" ]
null
null
null
Factorial digit sum/main.py
Skogrine/ProjectEuler
40e104ac91852dec66b5b7938d6553d1bbdc590f
[ "Apache-2.0" ]
null
null
null
import math n = 100 print(sum(map(int, str(math.factorial(n)))))
21.333333
44
0.703125
import math n = 100 print(sum(map(int, str(math.factorial(n)))))
true
true
f705c4e287fb6d6f6989f47abb2afa301f8bd782
2,415
py
Python
blend.py
andrewdownie/BlendAway
daf73b22c29dfa905fbe8e838188d4df5861ae5d
[ "MIT" ]
null
null
null
blend.py
andrewdownie/BlendAway
daf73b22c29dfa905fbe8e838188d4df5861ae5d
[ "MIT" ]
null
null
null
blend.py
andrewdownie/BlendAway
daf73b22c29dfa905fbe8e838188d4df5861ae5d
[ "MIT" ]
null
null
null
import os import sys import numpy as np import cv2 import statistics import datetime def getMedian(arr, x, y): values = [] for a in arr: values.append(a[x][y]) return statistics.median_grouped(values) def getMean(arr, x, y): values = [] for a in arr: values.append(a[x][y]) retu...
25.15625
68
0.59089
import os import sys import numpy as np import cv2 import statistics import datetime def getMedian(arr, x, y): values = [] for a in arr: values.append(a[x][y]) return statistics.median_grouped(values) def getMean(arr, x, y): values = [] for a in arr: values.append(a[x][y]) retu...
true
true
f705c4fc494cdf40b01b01fb964de724d9ee0942
1,205
py
Python
AccessKeysInDictionary.py
Snehasis124/PythonTutorials
133060cd4f2126dbc427a724b831834e90c26fdc
[ "Apache-2.0" ]
null
null
null
AccessKeysInDictionary.py
Snehasis124/PythonTutorials
133060cd4f2126dbc427a724b831834e90c26fdc
[ "Apache-2.0" ]
null
null
null
AccessKeysInDictionary.py
Snehasis124/PythonTutorials
133060cd4f2126dbc427a724b831834e90c26fdc
[ "Apache-2.0" ]
null
null
null
#9TH PROGRAM # THIS PROGRAM WILL HELP IN ACCESSING DICTIONARY ITEMS AND PERFROM CERTAIN OPERATIONS WITH DICTIONARY ages = {} #EMPTY DICTIONARY ages["Micky"] = 24 ages["Lucky"] = 25 print(ages) keys = ages.keys # .keys prints all the keys avaialble in Dictionary print(keys) values = ages.values # .values prints a...
23.173077
101
0.687137
ages = {} ages["Micky"] = 24 ages["Lucky"] = 25 print(ages) keys = ages.keys print(keys) values = ages.values print(values) print(sorted(ages)) print(ages.values) if("Micky" in ages): print("Micky is there") else: print("Micky is not there") print(len(ages)) ages = {"Snehasis" : "24" , "...
true
true
f705c51665ca83673376bc29d03db188df991c5f
2,970
py
Python
PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
PhysicsTools/Heppy/python/analyzers/core/SkimAnalyzerCount.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle from PhysicsTools.HeppyCore.framework.event import Event from PhysicsTools.HeppyCore.statistics.counter import Counter, Counters fr...
40.684932
121
0.619865
from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle from PhysicsTools.HeppyCore.framework.event import Event from PhysicsTools.HeppyCore.statistics.counter import Counter, Counters fr...
true
true
f705c5f7c4974cac5efeddeb4787732c80472742
114
py
Python
blog/admin.py
EvaZogg/DjangoTranslationWebsite
3946c052547deed216332cb316f48fc70c09ff22
[ "BSD-2-Clause" ]
null
null
null
blog/admin.py
EvaZogg/DjangoTranslationWebsite
3946c052547deed216332cb316f48fc70c09ff22
[ "BSD-2-Clause" ]
null
null
null
blog/admin.py
EvaZogg/DjangoTranslationWebsite
3946c052547deed216332cb316f48fc70c09ff22
[ "BSD-2-Clause" ]
null
null
null
from django.contrib import admin from .models import blog # Register your models here. admin.site.register(blog)
19
32
0.798246
from django.contrib import admin from .models import blog admin.site.register(blog)
true
true
f705c6c1705b01df89f15b731ab6fc18b82c61cd
6,579
py
Python
payload/usr/local/sal/checkin_modules/munki_checkin.py
forvitinn/sal-scripts
585934f641732b29c0f0be9072b32606ccc8e96a
[ "Apache-2.0" ]
23
2015-08-04T22:56:55.000Z
2022-02-14T12:41:23.000Z
payload/usr/local/sal/checkin_modules/munki_checkin.py
forvitinn/sal-scripts
585934f641732b29c0f0be9072b32606ccc8e96a
[ "Apache-2.0" ]
40
2016-01-28T17:29:52.000Z
2021-11-12T04:22:48.000Z
payload/usr/local/sal/checkin_modules/munki_checkin.py
forvitinn/sal-scripts
585934f641732b29c0f0be9072b32606ccc8e96a
[ "Apache-2.0" ]
45
2015-08-04T00:12:28.000Z
2022-02-21T20:06:40.000Z
#!/usr/local/sal/Python.framework/Versions/Current/bin/python3 import datetime import pathlib import plistlib import sys import sal sys.path.insert(0, "/usr/local/munki") from munkilib import munkicommon __version__ = "1.2.0" def main(): # If we haven't successfully submitted to Sal, pull the existing #...
35.370968
91
0.622739
import datetime import pathlib import plistlib import sys import sal sys.path.insert(0, "/usr/local/munki") from munkilib import munkicommon __version__ = "1.2.0" def main(): # munki section rather than start from scratch, as we want to # keep any install/removal history that may be there. mun...
true
true
f705c7a4e86112d7fbf69a0db1bd54f293460d18
200
py
Python
jscaller/_compatiable.py
ZSAIm/PyJSCaller
086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d
[ "Apache-2.0" ]
31
2019-05-06T03:07:58.000Z
2022-02-09T02:00:46.000Z
jscaller/_compatiable.py
zackmark29/PyJSCaller
086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d
[ "Apache-2.0" ]
1
2019-07-05T12:43:34.000Z
2019-07-26T08:22:19.000Z
jscaller/_compatiable.py
zackmark29/PyJSCaller
086b3a0bf57f9c42c4d9c3cea6e7cdad5f52059d
[ "Apache-2.0" ]
10
2019-05-07T06:35:21.000Z
2021-09-27T02:48:40.000Z
__all__ = ["PY2", "PY3"] import sys if sys.version_info[0] == 2: PY2 = True PY3 = False elif sys.version_info[0] == 3: PY2 = False PY3 = True else: PY2 = False PY3 = False
12.5
30
0.56
__all__ = ["PY2", "PY3"] import sys if sys.version_info[0] == 2: PY2 = True PY3 = False elif sys.version_info[0] == 3: PY2 = False PY3 = True else: PY2 = False PY3 = False
true
true
f705c7f93432895a83a22e63702790a8a3602602
25,944
py
Python
Platform/ApollolakeBoardPkg/Script/StitchLoader.py
aimanrosli23/slimbootloader
bce49fbc5ac125cccf4f647e786409f49a026769
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
1
2022-03-04T18:23:35.000Z
2022-03-04T18:23:35.000Z
Platform/ApollolakeBoardPkg/Script/StitchLoader.py
aimanrosli23/slimbootloader
bce49fbc5ac125cccf4f647e786409f49a026769
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
Platform/ApollolakeBoardPkg/Script/StitchLoader.py
aimanrosli23/slimbootloader
bce49fbc5ac125cccf4f647e786409f49a026769
[ "BSD-2-Clause-NetBSD", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "MIT", "BSD-2-Clause-Patent" ]
null
null
null
## @ StitchLoader.py # This is a python stitching script for Slim Bootloader APL build # # Copyright (c) 2018 - 2022, Intel Corporation. All rights reserved. <BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## import os import re import sys import struct import argparse import zipfile import shutil from ctypes i...
38.896552
154
0.590772
port re import sys import struct import argparse import zipfile import shutil from ctypes import * from subprocess import check_output from functools import reduce sys.dont_write_bytecode = True sblopen_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../')) if not os.path.exists (sblopen_dir): ...
true
true
f705c96c12e4e0c7f7af29723e12d8fbcdab4c40
907
py
Python
src/mouse_controller.py
NAITTOU/computer_pointer_controller
b36ce51e7638543b54da1abe56f7ae54eb21918f
[ "MIT" ]
1
2020-09-04T06:28:43.000Z
2020-09-04T06:28:43.000Z
src/mouse_controller.py
NAITTOU/computer_pointer_controller
b36ce51e7638543b54da1abe56f7ae54eb21918f
[ "MIT" ]
1
2022-01-13T02:59:41.000Z
2022-01-13T02:59:41.000Z
src/mouse_controller.py
NAITTOU/computer_pointer_controller
b36ce51e7638543b54da1abe56f7ae54eb21918f
[ "MIT" ]
null
null
null
''' This is a sample class that you can use to control the mouse pointer. It uses the pyautogui library. You can set the precision for mouse movement (how much the mouse moves) and the speed (how fast it moves) by changing precision_dict and speed_dict. Calling the move function with the x and y output of the gaze est...
43.190476
122
0.732084
import pyautogui pyautogui.FAILSAFE = False class MouseController: def __init__(self, precision, speed): precision_dict={'high':100, 'low':1000, 'medium':500} speed_dict={'fast':1, 'slow':10, 'medium':5} self.precision=precision_dict[precision] self.speed=speed_dict[speed] def ...
true
true
f705c9972c508fc15446070fc555ad919151b644
1,253
py
Python
alipay/aop/api/domain/AntOcrVehicleplateIdentifyModel.py
alipay/alipay-sdk-python-all
1b63620431d982d30d39ee0adc4b92463cbcee3c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AntOcrVehicleplateIdentifyModel.py
alipay/alipay-sdk-python-all
1b63620431d982d30d39ee0adc4b92463cbcee3c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AntOcrVehicleplateIdentifyModel.py
alipay/alipay-sdk-python-all
1b63620431d982d30d39ee0adc4b92463cbcee3c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AntOcrVehicleplateIdentifyModel(object): def __init__(self): self._image = None self._type = None @property def image(self): return self._image @image.setter...
22.375
61
0.545092
import json from alipay.aop.api.constant.ParamConstants import * class AntOcrVehicleplateIdentifyModel(object): def __init__(self): self._image = None self._type = None @property def image(self): return self._image @image.setter def image(self, value): self._i...
true
true
f705ca0b99c4431c3fdc996319aa370d49c274ac
1,827
py
Python
newDataAnalytics.py
PeterJWei/EnergyFootprinting
0396efba7d4e6863452e322f9f7561c6cd756478
[ "MIT" ]
null
null
null
newDataAnalytics.py
PeterJWei/EnergyFootprinting
0396efba7d4e6863452e322f9f7561c6cd756478
[ "MIT" ]
null
null
null
newDataAnalytics.py
PeterJWei/EnergyFootprinting
0396efba7d4e6863452e322f9f7561c6cd756478
[ "MIT" ]
null
null
null
import json import web import calendar import datetime import cloudserver urls = ( "/BuildingFootprint/", "BuildingFootprint", "/BuildingFootprintDisaggregated/", "BuildingFootprintDisaggregated", "/PersonalConsumption/", "PersonalConsumption", "/HistoricalConsumption/", "HistoricalConsumption") class BuildingFoo...
26.478261
85
0.727422
import json import web import calendar import datetime import cloudserver urls = ( "/BuildingFootprint/", "BuildingFootprint", "/BuildingFootprintDisaggregated/", "BuildingFootprintDisaggregated", "/PersonalConsumption/", "PersonalConsumption", "/HistoricalConsumption/", "HistoricalConsumption") class BuildingFoo...
true
true
f705ca2749b113501167b31f27c6bb73734fd6c0
2,235
py
Python
openpose/model/detector/generalized_rcnn.py
leehsiu/pyopenpose
c4feef04a9e563fb91e18f745bc187c6f2aeb72c
[ "MIT" ]
null
null
null
openpose/model/detector/generalized_rcnn.py
leehsiu/pyopenpose
c4feef04a9e563fb91e18f745bc187c6f2aeb72c
[ "MIT" ]
null
null
null
openpose/model/detector/generalized_rcnn.py
leehsiu/pyopenpose
c4feef04a9e563fb91e18f745bc187c6f2aeb72c
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """ Implements the Generalized R-CNN framework """ import torch from torch import nn from openpose.structures.image_list import to_image_list from ..backbone import build_backbone from ..rpn.rpn import build_rpn from ..roi_heads.roi_heads import...
34.384615
87
0.644295
import torch from torch import nn from openpose.structures.image_list import to_image_list from ..backbone import build_backbone from ..rpn.rpn import build_rpn from ..roi_heads.roi_heads import build_roi_heads class GeneralizedRCNN(nn.Module): def __init__(self, cfg): super(GeneralizedRCNN, self).__...
true
true
f705cb12d2f7098d80c81f26b124cf8f7a03cf9a
1,441
py
Python
deltalanguage/test/runtime/test_runtime.py
riverlane/deltalanguage
41c3cfa88ed3f17956645c18566c2147a4bdd74c
[ "MIT" ]
16
2021-01-06T17:44:51.000Z
2022-01-06T12:07:07.000Z
deltalanguage/test/runtime/test_runtime.py
riverlane/deltalanguage
41c3cfa88ed3f17956645c18566c2147a4bdd74c
[ "MIT" ]
null
null
null
deltalanguage/test/runtime/test_runtime.py
riverlane/deltalanguage
41c3cfa88ed3f17956645c18566c2147a4bdd74c
[ "MIT" ]
4
2021-03-25T20:35:08.000Z
2021-09-06T13:10:58.000Z
"""Test DeltaPySimulator functionality pre-execution.""" import unittest import deltalanguage as dl from deltalanguage.test._graph_lib import (getg_const_chain, getg_optional_queues) class DeltaQueueCreationTest(unittest.TestCase): """Test that the simulator creates q...
33.511628
79
0.651631
import unittest import deltalanguage as dl from deltalanguage.test._graph_lib import (getg_const_chain, getg_optional_queues) class DeltaQueueCreationTest(unittest.TestCase): def test_queue_types(self): graph = getg_const_chain() dl.DeltaPySimulator(g...
true
true
f705ceaa19f72aa3d963f72c85586a1a32e6de9b
101
py
Python
main.py
onkarsherkar/flask-web-app-tutorail
add0fa67c4c02d93b95c90c61671f02ea1b3d029
[ "MIT" ]
null
null
null
main.py
onkarsherkar/flask-web-app-tutorail
add0fa67c4c02d93b95c90c61671f02ea1b3d029
[ "MIT" ]
null
null
null
main.py
onkarsherkar/flask-web-app-tutorail
add0fa67c4c02d93b95c90c61671f02ea1b3d029
[ "MIT" ]
null
null
null
from website import create_app app = create_app() if __name__== '__main__': app.run(debug=True)
14.428571
30
0.722772
from website import create_app app = create_app() if __name__== '__main__': app.run(debug=True)
true
true
f705cf0495bceae4e5ea4f4df95a6ec02a280af1
3,195
py
Python
tools/src/service/entry_pusher.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
null
null
null
tools/src/service/entry_pusher.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
1
2022-01-29T08:28:36.000Z
2022-01-29T08:28:36.000Z
tools/src/service/entry_pusher.py
Symthy/blog-index-manager
d0c2e0b265b35be7cdb5aead1f1543f4b0306bdf
[ "MIT" ]
null
null
null
from typing import List from blogs.api.interface import IBlogApiExecutor from domain.blog.blog_entry import BlogEntry, BlogEntries from domain.doc.doc_entry import DocEntries, DocEntry from dump.blog_to_doc_mapping import BlogDocEntryMapping from dump.interface import IDumpEntriesAccessor from files.conf.category_grou...
59.166667
116
0.746166
from typing import List from blogs.api.interface import IBlogApiExecutor from domain.blog.blog_entry import BlogEntry, BlogEntries from domain.doc.doc_entry import DocEntries, DocEntry from dump.blog_to_doc_mapping import BlogDocEntryMapping from dump.interface import IDumpEntriesAccessor from files.conf.category_grou...
true
true
f705d15166e8684268640b17b721182297f2ea28
330
py
Python
bluebottle/cms/migrations/0015_merge_20161219_0946.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/cms/migrations/0015_merge_20161219_0946.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/cms/migrations/0015_merge_20161219_0946.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-19 08:46 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0014_auto_20161216_1359'), ('cms', '0014_auto_20161216_1424'), ] operations ...
19.411765
48
0.654545
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0014_auto_20161216_1359'), ('cms', '0014_auto_20161216_1424'), ] operations = [ ]
true
true
f705d1668beb8e7029c97be27c6db88af67d97b3
4,213
py
Python
planemo/galaxy/api.py
pvanheus/planemo
12c4256325bb1b274dcd40d64b91c1f832cf49b1
[ "CC-BY-3.0" ]
null
null
null
planemo/galaxy/api.py
pvanheus/planemo
12c4256325bb1b274dcd40d64b91c1f832cf49b1
[ "CC-BY-3.0" ]
1
2016-09-14T18:09:59.000Z
2016-09-14T18:09:59.000Z
planemo/galaxy/api.py
jmchilton/planemo
d352a085fe10cb6b7c1384663b114201da42d97b
[ "CC-BY-3.0" ]
null
null
null
"""A high-level interface to local Galaxy instances using bioblend.""" from six import StringIO from planemo.bioblend import ensure_module from planemo.bioblend import galaxy DEFAULT_MASTER_API_KEY = "test_key" def gi(port=None, url=None, key=None): """Return a bioblend ``GalaxyInstance`` for Galaxy on this por...
36.318966
121
0.635652
from six import StringIO from planemo.bioblend import ensure_module from planemo.bioblend import galaxy DEFAULT_MASTER_API_KEY = "test_key" def gi(port=None, url=None, key=None): ensure_module() if key is None: key = DEFAULT_MASTER_API_KEY if port is None: url = url else: url...
true
true
f705d2280b305e92ead506194e8bf7b9a79b98f6
2,143
py
Python
setup.py
chowmean/DBSheet
3f1c521320cb3564c4ff55cd70c8a1978dd32a4c
[ "Apache-2.0" ]
3
2017-08-18T20:04:12.000Z
2021-01-08T12:23:43.000Z
setup.py
chowmean/DBSheet
3f1c521320cb3564c4ff55cd70c8a1978dd32a4c
[ "Apache-2.0" ]
1
2021-06-01T23:13:57.000Z
2021-06-01T23:13:57.000Z
setup.py
chowmean/DBSheet
3f1c521320cb3564c4ff55cd70c8a1978dd32a4c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Python installation script # Author - @chowmean from __future__ import print_function import os.path import sys import setuptools # Project variables VER_PROP_FILE = os.path.join(os.path.dirname(__file__), 'version.properties') REQUIREMENTS_FILE = os.path.join(os.path.dirname(__file__), 'req...
29.763889
79
0.643957
from __future__ import print_function import os.path import sys import setuptools VER_PROP_FILE = os.path.join(os.path.dirname(__file__), 'version.properties') REQUIREMENTS_FILE = os.path.join(os.path.dirname(__file__), 'requirements.txt') CLASSIFIERS = [ "Programming Language :: Python", "Operating Syst...
true
true
f705d35f606de1dd5f2d3137aa565c331846f652
5,403
py
Python
djangoratings/managers.py
adw0rd/django-ratings
941048e05a14bb997966fe1d4e8fd638ee66d76f
[ "BSD-2-Clause" ]
1
2021-04-29T11:19:47.000Z
2021-04-29T11:19:47.000Z
djangoratings/managers.py
adw0rd/django-ratings
941048e05a14bb997966fe1d4e8fd638ee66d76f
[ "BSD-2-Clause" ]
null
null
null
djangoratings/managers.py
adw0rd/django-ratings
941048e05a14bb997966fe1d4e8fd638ee66d76f
[ "BSD-2-Clause" ]
null
null
null
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): """Handles updating the related `votes` and `score` fields attached to the model."""...
45.403361
145
0.594855
from django.db.models import Manager from django.db.models.query import QuerySet from django.contrib.contenttypes.models import ContentType import itertools class VoteQuerySet(QuerySet): def delete(self, *args, **kwargs): from fields import RatingField qs = self.distinct().values_list('c...
true
true
f705d6c189996ed6849395984a8050289ed6a38d
3,224
py
Python
django_tdd/settings.py
migueleichler/django-tdd
5b8bd6088b5e2de4d70026b761391bce3aa52f32
[ "MIT" ]
null
null
null
django_tdd/settings.py
migueleichler/django-tdd
5b8bd6088b5e2de4d70026b761391bce3aa52f32
[ "MIT" ]
null
null
null
django_tdd/settings.py
migueleichler/django-tdd
5b8bd6088b5e2de4d70026b761391bce3aa52f32
[ "MIT" ]
null
null
null
""" Django settings for django_tdd project. Generated by 'django-admin startproject' using Django 1.9.12. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import o...
26
91
0.700682
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'axh7uu^+yfch=#hjgozv%trd3ai55m%xb83=39o4n-y#gk$y6o' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f705d6ce7500355546b594150038c8315daf1d0a
9,140
py
Python
tests/utils/cpython.py
netcharm/ironclad
5892c43b540b216d638e0fed2e6cf3fd8289fdfc
[ "PSF-2.0" ]
null
null
null
tests/utils/cpython.py
netcharm/ironclad
5892c43b540b216d638e0fed2e6cf3fd8289fdfc
[ "PSF-2.0" ]
null
null
null
tests/utils/cpython.py
netcharm/ironclad
5892c43b540b216d638e0fed2e6cf3fd8289fdfc
[ "PSF-2.0" ]
null
null
null
from System import IntPtr from System.Runtime.InteropServices import Marshal import Ironclad from Ironclad import CPyMarshal from Ironclad.Structs import METH, Py_TPFLAGS, PyGetSetDef, PyMemberDef, PyMethodDef, PyTypeObject from tests.utils.memory import OffsetPtr def _new_struct(type_, fields, *v...
35.426357
110
0.67954
from System import IntPtr from System.Runtime.InteropServices import Marshal import Ironclad from Ironclad import CPyMarshal from Ironclad.Structs import METH, Py_TPFLAGS, PyGetSetDef, PyMemberDef, PyMethodDef, PyTypeObject from tests.utils.memory import OffsetPtr def _new_struct(type_, fields, *v...
true
true
f705d6e28e10770948eaf92986fd5dda9272df1d
19,432
py
Python
model.py
UrusuLambda/pix2pix-tensorflow
9b1e832494f8b8b36ad2d0331cb5feda5bd65ce0
[ "MIT" ]
1,014
2016-11-25T14:03:59.000Z
2022-03-26T14:57:07.000Z
model.py
Chediak/pix2pix-tensorflow
ba40020706ad3a1fbefa1da7bc7a05b7b031fb9e
[ "MIT" ]
35
2016-11-27T14:31:40.000Z
2020-10-19T15:37:14.000Z
model.py
Chediak/pix2pix-tensorflow
ba40020706ad3a1fbefa1da7bc7a05b7b031fb9e
[ "MIT" ]
349
2016-11-25T15:50:09.000Z
2022-02-28T21:16:21.000Z
from __future__ import division import os import time from glob import glob import tensorflow as tf import numpy as np from six.moves import xrange from ops import * from utils import * class pix2pix(object): def __init__(self, sess, image_size=256, batch_size=1, sample_size=1, output_size=256, ...
44.981481
136
0.572715
from __future__ import division import os import time from glob import glob import tensorflow as tf import numpy as np from six.moves import xrange from ops import * from utils import * class pix2pix(object): def __init__(self, sess, image_size=256, batch_size=1, sample_size=1, output_size=256, ...
true
true
f705d82868da78fc4b8e5a14a1c63f8b5d2c006e
39,980
py
Python
pytorch_lightning/trainer/training_loop.py
songwanguw/pytorch-lightning
64da9c9d87ac1c106d94310c4d90668fbafbb2cf
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/training_loop.py
songwanguw/pytorch-lightning
64da9c9d87ac1c106d94310c4d90668fbafbb2cf
[ "Apache-2.0" ]
1
2020-11-11T11:36:38.000Z
2020-11-11T11:36:38.000Z
pytorch_lightning/trainer/training_loop.py
songwanguw/pytorch-lightning
64da9c9d87ac1c106d94310c4d90668fbafbb2cf
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
41.995798
121
0.654402
from contextlib import contextmanager from copy import copy, deepcopy import numpy as np import torch import torch.distributed as torch_distrib from pytorch_lightning.callbacks import ModelCheckpoint from pytorch_lightning.core.lightning import LightningModule from pytorch_lightning.core.memory import M...
true
true
f705d8375b61940c4c02bcdbae22797b6b711bb0
664
py
Python
frappe/core/doctype/role_profile/role_profile.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/core/doctype/role_profile/role_profile.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/core/doctype/role_profile/role_profile.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class RoleProfile(Document): def autoname(self): """set name as Role Profile name""...
27.666667
74
0.721386
from __future__ import unicode_literals import frappe from frappe.model.document import Document class RoleProfile(Document): def autoname(self): self.name = self.role_profile def on_update(self): users = frappe.get_all("User", filters={"role_profile_name": self.name}) roles = [role.role for role in sel...
true
true
f705d8e2048ebd543efcfc2b8d5258b47b62b213
162
py
Python
output/models/ms_data/complex_type/ct_f013_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/complex_type/ct_f013_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/complex_type/ct_f013_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.complex_type.ct_f013_xsd.ct_f013 import ( FooType, MyType, Root, ) __all__ = [ "FooType", "MyType", "Root", ]
13.5
68
0.617284
from output.models.ms_data.complex_type.ct_f013_xsd.ct_f013 import ( FooType, MyType, Root, ) __all__ = [ "FooType", "MyType", "Root", ]
true
true
f705db97cc2202b63ed43321fb14e2dd46519851
1,758
py
Python
amocrm/v2/filters.py
rolldeep/amocrm_api
61111a9736e2893bc4c625bebe5e8a71645e9b25
[ "MIT" ]
null
null
null
amocrm/v2/filters.py
rolldeep/amocrm_api
61111a9736e2893bc4c625bebe5e8a71645e9b25
[ "MIT" ]
null
null
null
amocrm/v2/filters.py
rolldeep/amocrm_api
61111a9736e2893bc4c625bebe5e8a71645e9b25
[ "MIT" ]
null
null
null
import datetime class Filter: def __init__(self, name): self._name = name def _as_params(self): return {} class SingleFilter(Filter): def __call__(self, value): self._value = value return self def _as_params(self): return {"filter[{}]".format(self._name): se...
25.478261
85
0.633106
import datetime class Filter: def __init__(self, name): self._name = name def _as_params(self): return {} class SingleFilter(Filter): def __call__(self, value): self._value = value return self def _as_params(self): return {"filter[{}]".format(self._name): se...
true
true
f705dbc83088bdd8282fa9e38c778f2f552bec1f
6,550
py
Python
src/pip/_internal/self_outdated_check.py
jameshfisher/pip
8365bc3dcc21809f2fb86c4db5e40aaf2384c897
[ "MIT" ]
null
null
null
src/pip/_internal/self_outdated_check.py
jameshfisher/pip
8365bc3dcc21809f2fb86c4db5e40aaf2384c897
[ "MIT" ]
null
null
null
src/pip/_internal/self_outdated_check.py
jameshfisher/pip
8365bc3dcc21809f2fb86c4db5e40aaf2384c897
[ "MIT" ]
null
null
null
import datetime import hashlib import json import logging import os.path import sys from typing import TYPE_CHECKING from pip._vendor.packaging.version import parse as parse_version from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder from pip._internal....
33.937824
87
0.630382
import datetime import hashlib import json import logging import os.path import sys from typing import TYPE_CHECKING from pip._vendor.packaging.version import parse as parse_version from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder from pip._internal....
true
true
f705dc263f4b173513dc6e8e38729cebb3b5b1ae
259
py
Python
Python/treehopper/libraries/displays/led_shift_register.py
ehailey1/treehopper-sdk
c242f939a93d93da11ff79577666130c15aecec7
[ "MIT" ]
3
2018-03-16T07:00:42.000Z
2022-03-27T00:39:55.000Z
Python/treehopper/libraries/displays/led_shift_register.py
ehailey1/treehopper-sdk
c242f939a93d93da11ff79577666130c15aecec7
[ "MIT" ]
16
2016-08-12T18:51:04.000Z
2021-04-16T16:14:07.000Z
Python/treehopper/libraries/displays/led_shift_register.py
ehailey1/treehopper-sdk
c242f939a93d93da11ff79577666130c15aecec7
[ "MIT" ]
6
2015-11-04T15:53:49.000Z
2020-06-25T18:34:47.000Z
from treehopper.libraries.displays import LedDriver from treehopper.libraries.io.expander.shift_register import ChainableShiftRegisterOutput class LedShiftRegister(ChainableShiftRegisterOutput, LedDriver): def __init__(self): super().__init__()
32.375
88
0.822394
from treehopper.libraries.displays import LedDriver from treehopper.libraries.io.expander.shift_register import ChainableShiftRegisterOutput class LedShiftRegister(ChainableShiftRegisterOutput, LedDriver): def __init__(self): super().__init__()
true
true
f705dc6351fae60f5584a9468074494232907552
1,250
py
Python
userbot/plugins/stats.py
NIKHIL5757H/SimbhaUserbot
86bd946a47bd0d74f5ef3c46ef00f9bdb9bf11e0
[ "MIT" ]
2
2020-07-25T17:58:55.000Z
2020-11-26T10:54:46.000Z
userbot/plugins/stats.py
NIKHIL5757H/SimbhaUserbot
86bd946a47bd0d74f5ef3c46ef00f9bdb9bf11e0
[ "MIT" ]
null
null
null
userbot/plugins/stats.py
NIKHIL5757H/SimbhaUserbot
86bd946a47bd0d74f5ef3c46ef00f9bdb9bf11e0
[ "MIT" ]
2
2020-08-03T09:09:06.000Z
2020-08-12T05:05:24.000Z
from userbot import bot from telethon import events import asyncio from datetime import datetime from telethon.tl.types import User, Chat, Channel from uniborg.util import admin_cmd @bot.on(admin_cmd(pattern=r"stats")) async def _(event): if event.fwd_from: return start = datetime.now() u = 0 g...
25.510204
66
0.5312
from userbot import bot from telethon import events import asyncio from datetime import datetime from telethon.tl.types import User, Chat, Channel from uniborg.util import admin_cmd @bot.on(admin_cmd(pattern=r"stats")) async def _(event): if event.fwd_from: return start = datetime.now() u = 0 g...
true
true
f705dd4832b18fd425450cd30cdfb3cf0a126a5e
5,623
py
Python
tracking.py
hnkulkarni/cs231aApproachingOdt
07c68d787442243d653ae72a7e9473b4c3c5c6b4
[ "MIT" ]
null
null
null
tracking.py
hnkulkarni/cs231aApproachingOdt
07c68d787442243d653ae72a7e9473b4c3c5c6b4
[ "MIT" ]
null
null
null
tracking.py
hnkulkarni/cs231aApproachingOdt
07c68d787442243d653ae72a7e9473b4c3c5c6b4
[ "MIT" ]
null
null
null
# This file will track detections import tqdm import cv2 import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.ticker import NullLocator from cs231aApproachingOdt import utils as myutils from PIL import Image import os import torch import torchvision.ops.boxes as bops def match_detectio...
35.588608
119
0.676685
import tqdm import cv2 import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.ticker import NullLocator from cs231aApproachingOdt import utils as myutils from PIL import Image import os import torch import torchvision.ops.boxes as bops def match_detections(prev_path, prev_detection, new...
true
true
f705de5dde82e6bd54b2dfd92a538123dac03a9b
105
py
Python
scripts/quest/q5521e.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/quest/q5521e.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/quest/q5521e.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# Tot's reward lv 40 sm.completeQuest(5521) # Lv. 40 Equipment box sm.giveItem(2431877, 1) sm.dispose()
15
23
0.72381
sm.completeQuest(5521) # Lv. 40 Equipment box sm.giveItem(2431877, 1) sm.dispose()
true
true
f705de767d15e8ccdef551f1fa42f380207c8feb
11,462
py
Python
backend/api/views.py
vadikam100500/foodgram-project-react
11119e11d4919f72b3f104209102048ee38c366a
[ "PostgreSQL", "MIT" ]
1
2021-12-14T14:43:51.000Z
2021-12-14T14:43:51.000Z
backend/api/views.py
vadikam100500/foodgram-project-react
11119e11d4919f72b3f104209102048ee38c366a
[ "PostgreSQL", "MIT" ]
null
null
null
backend/api/views.py
vadikam100500/foodgram-project-react
11119e11d4919f72b3f104209102048ee38c366a
[ "PostgreSQL", "MIT" ]
null
null
null
import csv from django.contrib.auth import get_user_model from django.db.models.aggregates import Sum from django.http.response import HttpResponse from django.utils.decorators import method_decorator from djoser.serializers import SetPasswordSerializer from djoser.views import TokenCreateView from drf_yasg.utils impo...
39.119454
79
0.655819
import csv from django.contrib.auth import get_user_model from django.db.models.aggregates import Sum from django.http.response import HttpResponse from django.utils.decorators import method_decorator from djoser.serializers import SetPasswordSerializer from djoser.views import TokenCreateView from drf_yasg.utils impo...
true
true
f705de9ae40aeb7ac96605765acb1cf9903cb9e3
70,522
py
Python
test/unit/common/middleware/test_copy.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
test/unit/common/middleware/test_copy.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
test/unit/common/middleware/test_copy.py
gyaozhou/swift-read
16fe18ae3be59a095f3bafdd69fe74b48a2771cb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2015 OpenStack Foundation # # 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 applic...
50.193594
79
0.580344
import mock import unittest from hashlib import md5 from six.moves import urllib from swift.common import swob from swift.common.middleware import copy from swift.common.storage_policy import POLICIES from swift.common.swob import Request, HTTPException from swift.common.utils import closing_if_possibl...
true
true
f705def54e26d0238b7f51ef53f14a89af887b66
1,087
py
Python
src/bot/TeamData.py
malmgrens4/TwIOTch
a3e05f5fcb5bcd75aba3cf9533ca7c5308e4a2de
[ "MIT" ]
null
null
null
src/bot/TeamData.py
malmgrens4/TwIOTch
a3e05f5fcb5bcd75aba3cf9533ca7c5308e4a2de
[ "MIT" ]
null
null
null
src/bot/TeamData.py
malmgrens4/TwIOTch
a3e05f5fcb5bcd75aba3cf9533ca7c5308e4a2de
[ "MIT" ]
null
null
null
from typing import Dict from twitchio.dataclasses import Message class TeamData: def __init__(self, num_teams: int = 2): self.num_teams = num_teams self.teams: Dict[int, int] = {} async def handle_join(self, msg: Message) -> None: if msg.author.id in self.teams: # User al...
29.378378
73
0.609016
from typing import Dict from twitchio.dataclasses import Message class TeamData: def __init__(self, num_teams: int = 2): self.num_teams = num_teams self.teams: Dict[int, int] = {} async def handle_join(self, msg: Message) -> None: if msg.author.id in self.teams: ...
true
true
f705df36178023a0b1008fe69f304ba47ddbd2e2
7,661
py
Python
benchmarks/f3_wrong_hints/scaling_nonlinear_software/8-19_33.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_nonlinear_software/8-19_33.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_nonlinear_software/8-19_33.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
34.981735
81
0.530087
from typing import FrozenSet, Tuple import pysmt.typing as types from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
f705dfb5b1b2d9fb7211529c9252df251ac0bfc7
2,270
py
Python
src/compas/datastructures/mesh/core/clean.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
235
2017-11-07T07:33:22.000Z
2022-03-25T16:20:00.000Z
src/compas/datastructures/mesh/core/clean.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
770
2017-09-22T13:42:06.000Z
2022-03-31T21:26:45.000Z
src/compas/datastructures/mesh/core/clean.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
99
2017-11-06T23:15:28.000Z
2022-03-25T16:05:36.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.utilities import geometric_key __all__ = [ 'mesh_delete_duplicate_vertices' ] def mesh_delete_duplicate_vertices(mesh, precision=None): """Cull all duplicate vertices of a mesh and sanit...
28.734177
119
0.584141
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.utilities import geometric_key __all__ = [ 'mesh_delete_duplicate_vertices' ] def mesh_delete_duplicate_vertices(mesh, precision=None): key_gkey = {key: geometric_key(mesh.vertex_attribu...
true
true
f705dfc786bdc45229a3f652451375438bf1d183
2,856
py
Python
qa/rpc-tests/blockchain.py
dnoiz1/ruxcoin
07e30a2b5ebc624ac8a2d92be435e895ede5deae
[ "MIT" ]
null
null
null
qa/rpc-tests/blockchain.py
dnoiz1/ruxcoin
07e30a2b5ebc624ac8a2d92be435e895ede5deae
[ "MIT" ]
null
null
null
qa/rpc-tests/blockchain.py
dnoiz1/ruxcoin
07e30a2b5ebc624ac8a2d92be435e895ede5deae
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Ruxcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test RPC calls related to blockchain state. Tests correspond to code in # rpc/blockchain.cpp. # from...
31.733333
73
0.678221
from decimal import Decimal from test_framework.test_framework import RuxcoinTestFramework from test_framework.authproxy import JSONRPCException from test_framework.util import ( assert_equal, assert_raises, assert_is_hex_string, assert_is_hash_string, start_nodes, connect_nodes_bi, )...
true
true
f705e0706875e8cf396e8b98af019ceeec2c23b1
1,971
py
Python
xlsxwriter/test/comparison/test_button07.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
1
2020-07-01T07:24:37.000Z
2020-07-01T07:24:37.000Z
xlsxwriter/test/comparison/test_button07.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_button07.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
26.28
79
0.598681
true
true
f705e11b73b8ab51a2717f76d0f1699b82a7b0ae
258
py
Python
biot/core/fan.py
AroliantBIoT/biot-orangepi-client
60df602816cdc0c668e58f91512e93eb5bec3c6d
[ "MIT" ]
null
null
null
biot/core/fan.py
AroliantBIoT/biot-orangepi-client
60df602816cdc0c668e58f91512e93eb5bec3c6d
[ "MIT" ]
null
null
null
biot/core/fan.py
AroliantBIoT/biot-orangepi-client
60df602816cdc0c668e58f91512e93eb5bec3c6d
[ "MIT" ]
null
null
null
class Fan(): """Default Device with ON / OFF Functions""" deviceID = None def __init__(self, deviceID): if deviceID is None: print("Provide a Device ID") return self.deviceID = deviceID def setSpeed(self): pass def getSpeed(self): pass
16.125
45
0.678295
class Fan(): deviceID = None def __init__(self, deviceID): if deviceID is None: print("Provide a Device ID") return self.deviceID = deviceID def setSpeed(self): pass def getSpeed(self): pass
true
true
f705e133aa7892ba240c4677420a97b286673317
3,271
py
Python
projects_api/migrations/0001_initial.py
diegoinn/profile-rest-api
a5b8c9dfe5453db24e93d05367d33e6f37c65966
[ "MIT" ]
null
null
null
projects_api/migrations/0001_initial.py
diegoinn/profile-rest-api
a5b8c9dfe5453db24e93d05367d33e6f37c65966
[ "MIT" ]
null
null
null
projects_api/migrations/0001_initial.py
diegoinn/profile-rest-api
a5b8c9dfe5453db24e93d05367d33e6f37c65966
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2020-10-29 04:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ConstructionSystem', fields=...
43.039474
148
0.578416
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ConstructionSystem', fields=[ ('id', models.AutoField(aut...
true
true
f705e1ac415f1541823e90e5a27d3686709724a5
370
py
Python
cryptoxlib/clients/aax/exceptions.py
PetrZufan/cryptoxlib-aio
8fbb817ee7a7a88693804e24877863370d1d53c7
[ "MIT" ]
90
2020-04-09T18:34:49.000Z
2022-03-09T14:29:32.000Z
cryptoxlib/clients/aax/exceptions.py
PetrZufan/cryptoxlib-aio
8fbb817ee7a7a88693804e24877863370d1d53c7
[ "MIT" ]
44
2020-04-03T17:02:20.000Z
2022-01-29T14:51:51.000Z
cryptoxlib/clients/aax/exceptions.py
PetrZufan/cryptoxlib-aio
8fbb817ee7a7a88693804e24877863370d1d53c7
[ "MIT" ]
28
2020-04-25T21:34:53.000Z
2022-03-31T07:20:07.000Z
from typing import Optional from cryptoxlib.exceptions import CryptoXLibException class AAXException(CryptoXLibException): pass class AAXRestException(AAXException): def __init__(self, status_code: int, body: Optional[dict]): super().__init__(f"Rest API exception: status [{status_code}], response [{body}]") ...
24.666667
84
0.778378
from typing import Optional from cryptoxlib.exceptions import CryptoXLibException class AAXException(CryptoXLibException): pass class AAXRestException(AAXException): def __init__(self, status_code: int, body: Optional[dict]): super().__init__(f"Rest API exception: status [{status_code}], response [{body}]") ...
true
true
f705e31f80b4e24a70351eb21bb89c4f68671a24
1,229
py
Python
service_api/domain/redis.py
123456789-dnipro/hackaton
7ad3017d31a1fe6c6cb72f2227e8a108a30a156b
[ "MIT" ]
null
null
null
service_api/domain/redis.py
123456789-dnipro/hackaton
7ad3017d31a1fe6c6cb72f2227e8a108a30a156b
[ "MIT" ]
1
2021-06-01T23:53:20.000Z
2021-06-01T23:53:20.000Z
service_api/domain/redis.py
123456789-dnipro/hackaton
7ad3017d31a1fe6c6cb72f2227e8a108a30a156b
[ "MIT" ]
null
null
null
import aioredis from sanic import Sanic class RedisWorker: def __init__(self): self.__host = None self.__pool = None async def init(self, app: Sanic): self.__host = app.config.REDIS_HOST self.__pool = await aioredis.create_redis(self.__host) async def check_session(self, ...
26.148936
62
0.62083
import aioredis from sanic import Sanic class RedisWorker: def __init__(self): self.__host = None self.__pool = None async def init(self, app: Sanic): self.__host = app.config.REDIS_HOST self.__pool = await aioredis.create_redis(self.__host) async def check_session(self, ...
true
true
f705e3f0d1abe21f5b92ea10cdd8b37a2a9906b1
15,509
py
Python
salt/modules/boto_secgroup.py
Achimh3011/salt
b6e6968c22f840df0d43bea7e99c188c623b850b
[ "Apache-2.0" ]
null
null
null
salt/modules/boto_secgroup.py
Achimh3011/salt
b6e6968c22f840df0d43bea7e99c188c623b850b
[ "Apache-2.0" ]
null
null
null
salt/modules/boto_secgroup.py
Achimh3011/salt
b6e6968c22f840df0d43bea7e99c188c623b850b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Connection module for Amazon Security Groups .. versionadded:: 2014.7.0 :configuration: This module accepts explicit ec2 credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API an...
35.009029
139
0.59488
from __future__ import absolute_import import logging import re from distutils.version import LooseVersion as _LooseVersion import six log = logging.getLogger(__name__) try: import boto import boto.ec2 logging.getLogger('boto').setLevel(logging.CRITICAL) HAS_BOTO = True except ImportError: HAS...
true
true
f705e5539327770cb56ee6c0a5e5510efbddda11
1,677
py
Python
logic2_analyzers/DS1307/Hla.py
martonmiklos/sigrokdecoders_to_logic2_analyzers
9dd9b9a610c17e6ae525829c9112d11a80d016e7
[ "MIT" ]
5
2020-04-15T20:45:06.000Z
2020-05-31T02:45:21.000Z
logic2_analyzers/DS1307/Hla.py
martonmiklos/sigrokdecoders_to_logic2_analyzers
9dd9b9a610c17e6ae525829c9112d11a80d016e7
[ "MIT" ]
1
2020-07-15T09:23:05.000Z
2020-07-15T10:04:48.000Z
logic2_analyzers/DS1307/Hla.py
martonmiklos/sigrokdecoders_to_logic2_analyzers
9dd9b9a610c17e6ae525829c9112d11a80d016e7
[ "MIT" ]
1
2020-04-20T18:49:36.000Z
2020-04-20T18:49:36.000Z
import sys sys.path.insert(0, "../") # our fake sigrokdecode lives one dir upper from pd import Decoder class DS1307(): def __init__(self): self.sigrokDecoder = Decoder() def get_capabilities(self): settings = {} for option in self.sigrokDecoder.options : settingType = '' choices = ...
29.421053
137
0.57901
import sys sys.path.insert(0, "../") from pd import Decoder class DS1307(): def __init__(self): self.sigrokDecoder = Decoder() def get_capabilities(self): settings = {} for option in self.sigrokDecoder.options : settingType = '' choices = [] if ("values" not in option) : ...
true
true
f705e56a5a72c63a6b880ab3f1397c0082a8229a
4,774
py
Python
hotpotqa_utils_joint.py
Captainr22/SAE
f3e370604978a273eb1e1ffdbd342dee3de431c9
[ "MIT" ]
38
2020-01-23T00:46:06.000Z
2022-03-13T13:10:19.000Z
hotpotqa_utils_joint.py
Captainr22/SAE
f3e370604978a273eb1e1ffdbd342dee3de431c9
[ "MIT" ]
7
2020-02-02T02:05:32.000Z
2022-03-06T04:37:06.000Z
hotpotqa_utils_joint.py
Captainr22/SAE
f3e370604978a273eb1e1ffdbd342dee3de431c9
[ "MIT" ]
9
2020-02-12T08:35:23.000Z
2022-02-19T07:29:26.000Z
import torch import numpy as np import json, sys, re, string import collections from collections import Counter from collections import OrderedDict def get_sp_pred(pred_sp_idx, data): """get the prediction of supporting facts in original format Arguments: pred_sp_idx {[type]} -- [description] ...
32.47619
124
0.646418
import torch import numpy as np import json, sys, re, string import collections from collections import Counter from collections import OrderedDict def get_sp_pred(pred_sp_idx, data): pred = [] for p in pred_sp_idx: if p < len(data): pred.append([data[p].doc_title[0], data[p].sent_id]) ...
true
true
f705e584e7382dd36ff080ed8c2d1c45f243aa82
255
py
Python
task/learn-python/pyramid.py
jiangdapeng/netease
032c8f7c60b8afb98bf9674cf3617f614c200a92
[ "MIT" ]
null
null
null
task/learn-python/pyramid.py
jiangdapeng/netease
032c8f7c60b8afb98bf9674cf3617f614c200a92
[ "MIT" ]
null
null
null
task/learn-python/pyramid.py
jiangdapeng/netease
032c8f7c60b8afb98bf9674cf3617f614c200a92
[ "MIT" ]
null
null
null
#!/usr/bin/python #-*-coding=utf-8-*- def pyramid(n): most = 2*n - 1 for i in range(1,n+1): star = 2*i - 1 space = n - i print(" "*space + "*"*star) def test(): pyramid(3) pyramid(4) pyramid(5) if __name__ == "__main__": test()
14.166667
31
0.529412
def pyramid(n): most = 2*n - 1 for i in range(1,n+1): star = 2*i - 1 space = n - i print(" "*space + "*"*star) def test(): pyramid(3) pyramid(4) pyramid(5) if __name__ == "__main__": test()
true
true