hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c23bfeb431c13f74220b459df7a6eb694fdd216
7,199
py
Python
hud-menu.py
jamcnaughton/hud-menu
e7651556052cf671800a15cfbd4e631dbabed933
[ "MIT" ]
55
2017-05-24T03:01:14.000Z
2021-09-11T04:15:33.000Z
hud-menu.py
jamcnaughton/hud-menu
e7651556052cf671800a15cfbd4e631dbabed933
[ "MIT" ]
6
2017-05-13T10:28:06.000Z
2017-05-21T16:05:10.000Z
hud-menu.py
jamcnaughton/hud-menu
e7651556052cf671800a15cfbd4e631dbabed933
[ "MIT" ]
8
2017-10-13T10:18:57.000Z
2021-09-09T19:41:19.000Z
#!/usr/bin/env python3 import dbus import subprocess import sys """ format_label_list """ def format_label_list(label_list): head, *tail = label_list result = head for label in tail: result = result + " > " + label result = result.replace("Root > ", "") result = result.replace("_", "") return result...
36.543147
323
0.690929
import dbus import subprocess import sys def format_label_list(label_list): head, *tail = label_list result = head for label in tail: result = result + " > " + label result = result.replace("Root > ", "") result = result.replace("_", "") return result def try_appmenu_interface(window_id): sessi...
true
true
1c23c063f5e741b73b085b7d8f700a7016fdbb60
1,504
py
Python
setup.py
movermeyer/pyup
98d3f42d180a468dcb65487599ad6d02a9cd7247
[ "MIT" ]
null
null
null
setup.py
movermeyer/pyup
98d3f42d180a468dcb65487599ad6d02a9cd7247
[ "MIT" ]
null
null
null
setup.py
movermeyer/pyup
98d3f42d180a468dcb65487599ad6d02a9cd7247
[ "MIT" ]
null
null
null
#!/usr/bin/env python """PyUp - Markup generation tool. :copyright: Copyright (c) 2015 by Robert Pogorzelski. :license: MIT, see LICENSE for more details. """ import sys from setuptools.command.test import test as TestCommand from setuptools import find_packages from setuptools import setup version = __import__(...
26.385965
55
0.644947
import sys from setuptools.command.test import test as TestCommand from setuptools import find_packages from setuptools import setup version = __import__('pyup').__version__ class Tox(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self...
true
true
1c23c1a5d0edc7032793b942aff52d9170b0d1e9
263
py
Python
launcher.py
JurassicHost/jurassic-bot
7d1aca8d3379d1090ebcd8229218bed2afdb7069
[ "MIT" ]
null
null
null
launcher.py
JurassicHost/jurassic-bot
7d1aca8d3379d1090ebcd8229218bed2afdb7069
[ "MIT" ]
null
null
null
launcher.py
JurassicHost/jurassic-bot
7d1aca8d3379d1090ebcd8229218bed2afdb7069
[ "MIT" ]
2
2021-07-13T18:16:50.000Z
2021-07-13T20:33:12.000Z
from JurassicBot import client, cogs import json def main(): with open('config.json', "r") as f: config = json.load(f) for cog in cogs: client.load_extension(cog) client.run(config('token')) if __name__ == '__main__': main()
15.470588
39
0.61597
from JurassicBot import client, cogs import json def main(): with open('config.json', "r") as f: config = json.load(f) for cog in cogs: client.load_extension(cog) client.run(config('token')) if __name__ == '__main__': main()
true
true
1c23c20f00cac91ffadea5e1dc38fb23cb1ff179
1,962
py
Python
tensorwatch/stream.py
sytelus/longview
686e43cf187eaf55df18949359fd63d57dc337b2
[ "MIT" ]
null
null
null
tensorwatch/stream.py
sytelus/longview
686e43cf187eaf55df18949359fd63d57dc337b2
[ "MIT" ]
null
null
null
tensorwatch/stream.py
sytelus/longview
686e43cf187eaf55df18949359fd63d57dc337b2
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import weakref, uuid from typing import Any from . import utils class Stream: def __init__(self, stream_name:str=None, console_debug:bool=False): self._subscribers = weakref.WeakSet() self._subscribed_to = weakref.WeakSet() ...
37.018868
112
0.679409
import weakref, uuid from typing import Any from . import utils class Stream: def __init__(self, stream_name:str=None, console_debug:bool=False): self._subscribers = weakref.WeakSet() self._subscribed_to = weakref.WeakSet() self.held_refs = set() self.closed = False self...
true
true
1c23c28860dac6203ea4ec8e808f63d3e9e467e2
15,087
py
Python
tensorflow/contrib/rpc/python/kernel_tests/rpc_op_test_base.py
Zwysilence/tensorflow
b55001be83da044bb21d539d433dec6231eaec55
[ "Apache-2.0" ]
8
2017-03-20T12:04:21.000Z
2021-06-24T20:34:30.000Z
tensorflow/contrib/rpc/python/kernel_tests/rpc_op_test_base.py
Zwysilence/tensorflow
b55001be83da044bb21d539d433dec6231eaec55
[ "Apache-2.0" ]
4
2019-08-14T22:32:51.000Z
2020-03-09T14:59:18.000Z
tensorflow/contrib/rpc/python/kernel_tests/rpc_op_test_base.py
Zwysilence/tensorflow
b55001be83da044bb21d539d433dec6231eaec55
[ "Apache-2.0" ]
2
2018-11-03T01:19:26.000Z
2021-04-23T02:34:07.000Z
# 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 # # Unless required by applica...
43.478386
80
0.669782
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import numpy as np from tensorflow.contrib.proto.python.ops import decode_proto_op from tensorflow.contrib.proto.python.ops import encode_proto_op from tensorflow.contrib.rpc.p...
true
true
1c23c2d097cc57b9900bbc3cab8a769bcc1f4d48
35,796
py
Python
test/functional/wallet_importdescriptors.py
MrCryptoBeast/WWW
857e860df0aa1bc7fde2ee6f5918ff32933beeb3
[ "MIT" ]
null
null
null
test/functional/wallet_importdescriptors.py
MrCryptoBeast/WWW
857e860df0aa1bc7fde2ee6f5918ff32933beeb3
[ "MIT" ]
null
null
null
test/functional/wallet_importdescriptors.py
MrCryptoBeast/WWW
857e860df0aa1bc7fde2ee6f5918ff32933beeb3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The worldwideweb Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importdescriptors RPC. Test importdescriptors by generating keys on node0, importing the...
53.267857
182
0.579059
from test_framework.address import key_to_p2pkh from test_framework.blocktools import COINBASE_MATURITY from test_framework.test_framework import worldwidewebTestFramework from test_framework.descriptors import descsum_create from test_framework.util import ( assert_equal, assert_raises_rpc_error, find...
true
true
1c23c2d70dc01ee5d0d8312194eae73f1ee6e22a
13,944
py
Python
realtime/monitor.py
janursa/realtime_plotting
936cde4e6d15b1a538712d77398f5c7052a0ce9b
[ "MIT" ]
null
null
null
realtime/monitor.py
janursa/realtime_plotting
936cde4e6d15b1a538712d77398f5c7052a0ce9b
[ "MIT" ]
null
null
null
realtime/monitor.py
janursa/realtime_plotting
936cde4e6d15b1a538712d77398f5c7052a0ce9b
[ "MIT" ]
null
null
null
"""This module is designed to visualize csv files on a browser in a real time fashion. Author: Jalil Nourisa """ import sys, time, os import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import plotly.graph_objs as go import plotly.e...
41.623881
148
0.551348
import sys, time, os import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import plotly.graph_objs as go import plotly.express as px import pandas as pd import plotly import numpy as np from copy import deepcopy from .buildin import pl...
true
true
1c23c5491eabf2bc83829a6c57107facc1149f25
8,423
py
Python
convlab2/policy/mdrg/multiwoz/train.py
Malavikka/ConvLab-2
f2a0d251e4fab9e36e9d9f04df6308623d2d780c
[ "Apache-2.0" ]
339
2020-03-04T09:43:22.000Z
2022-03-26T17:27:38.000Z
convlab2/policy/mdrg/multiwoz/train.py
Malavikka/ConvLab-2
f2a0d251e4fab9e36e9d9f04df6308623d2d780c
[ "Apache-2.0" ]
122
2020-04-12T04:19:06.000Z
2022-03-23T14:20:57.000Z
convlab2/policy/mdrg/multiwoz/train.py
Malavikka/ConvLab-2
f2a0d251e4fab9e36e9d9f04df6308623d2d780c
[ "Apache-2.0" ]
138
2020-02-18T16:48:04.000Z
2022-03-26T17:27:43.000Z
from __future__ import division, print_function, unicode_literals import argparse import json import random import time from io import open import os import numpy as np import torch from torch.optim import Adam from convlab2.policy.mdrg.multiwoz.utils import util from convlab2.policy.mdrg.multiwoz.model import Model...
48.131429
179
0.696783
from __future__ import division, print_function, unicode_literals import argparse import json import random import time from io import open import os import numpy as np import torch from torch.optim import Adam from convlab2.policy.mdrg.multiwoz.utils import util from convlab2.policy.mdrg.multiwoz.model import Model...
true
true
1c23c59044f58625970b106addca1ef30badc811
6,743
py
Python
concept/variables/condition.py
Nachtfeuer/concept-py
64e1f82de144f959cdf3c6dcf0f692bbc0ceb20f
[ "MIT" ]
2
2019-03-02T18:50:24.000Z
2019-12-19T14:15:42.000Z
concept/variables/condition.py
Nachtfeuer/concept-py
64e1f82de144f959cdf3c6dcf0f692bbc0ceb20f
[ "MIT" ]
10
2015-07-27T03:24:57.000Z
2017-03-31T18:11:26.000Z
concept/variables/condition.py
Nachtfeuer/concept-py
64e1f82de144f959cdf3c6dcf0f692bbc0ceb20f
[ "MIT" ]
null
null
null
""" Condition classes behaving like variables. .. module:: condition :platform: Unix, Windows :synopis: represents conditions behaving like variables .. moduleauthor:: Thomas Lehmann <thomas.lehmann.private@googlemail.com> ======= License ======= Copyright (c) 2017 Thomas Lehmann Permissio...
32.263158
98
0.634287
from concept.variables.variable import Var class Condition(Var): def __init__(self, value_a, value_b): if not isinstance(value_a, Var) or not issubclass(value_a.__class__, Var): raise TypeError("wrong type") if value_b: if not isinstance(value_b, Var) or not issubclass(val...
true
true
1c23c7d248873b3c8e120744e2b1921a51e4508b
46,485
py
Python
test/vanilla/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
test/vanilla/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
test/vanilla/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
45.88845
113
0.673701
import datetime from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error, ) from azure.core.pipeline import PipelineResponse from ...
true
true
1c23c91619773d52a1a4966a37cc10b59f8b7f24
87,364
py
Python
tests/python/unittest/test_contrib_control_flow.py
cclauss/incubator-mxnet
5df5467adeb6ede4b3c8d4d027e6a46f8212b5fb
[ "Apache-2.0" ]
11
2015-11-13T18:20:22.000Z
2021-01-01T02:57:28.000Z
tests/python/unittest/test_contrib_control_flow.py
cclauss/incubator-mxnet
5df5467adeb6ede4b3c8d4d027e6a46f8212b5fb
[ "Apache-2.0" ]
1
2016-04-19T16:30:04.000Z
2016-04-19T16:30:04.000Z
tests/python/unittest/test_contrib_control_flow.py
cclauss/incubator-mxnet
5df5467adeb6ede4b3c8d4d027e6a46f8212b5fb
[ "Apache-2.0" ]
7
2015-11-20T18:09:30.000Z
2017-11-24T16:52:25.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
40.577798
138
0.539948
import copy import numpy as np import mxnet as mx from mxnet import gluon from numpy.testing import assert_allclose, assert_array_equal from collections import defaultdict from mxnet.test_utils import * from mxnet.base import _as_list from mxnet.attribute import AttrScope from common import with_seed ...
true
true
1c23ca0c6b8a7fc1c1eb8d625a006d713f1b15d5
1,468
py
Python
repldiscordpy/keep_alive.py
nsde/repldiscordpy
1c4a1a83a510509de91ad4bc63b7423966b50d8b
[ "MIT" ]
null
null
null
repldiscordpy/keep_alive.py
nsde/repldiscordpy
1c4a1a83a510509de91ad4bc63b7423966b50d8b
[ "MIT" ]
null
null
null
repldiscordpy/keep_alive.py
nsde/repldiscordpy
1c4a1a83a510509de91ad4bc63b7423966b50d8b
[ "MIT" ]
1
2021-11-04T05:48:47.000Z
2021-11-04T05:48:47.000Z
import os import logging try: import requests except ModuleNotFoundError: os.system('pip3 install requests') import requests try: from flask import Flask except ModuleNotFoundError: os.system('pip3 install flask') from flask import Flask from threading import Thread # =======================...
20.676056
94
0.558583
import os import logging try: import requests except ModuleNotFoundError: os.system('pip3 install requests') import requests try: from flask import Flask except ModuleNotFoundError: os.system('pip3 install flask') from flask import Flask from threading import Thread app = Flask('discordbo...
true
true
1c23cb9fdd4cc837cd16ece70286d44a699ad3a4
53,772
py
Python
tensorflow_probability/python/distributions/linear_gaussian_ssm_test.py
ykkawana/probability
65bfd91cf6e855674da8dd9976c067f79da46e90
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/linear_gaussian_ssm_test.py
ykkawana/probability
65bfd91cf6e855674da8dd9976c067f79da46e90
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/linear_gaussian_ssm_test.py
ykkawana/probability
65bfd91cf6e855674da8dd9976c067f79da46e90
[ "Apache-2.0" ]
null
null
null
# 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...
42.574822
101
0.653109
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tensorflow_probability.python.distributions.linear_gaussian_ssm import _augment_sample_shape from tensorflow...
true
true
1c23cd8f37d1ab10ef122963afe2b97f59418d58
1,350
py
Python
www/models.py
Herb-Sun/awesome-python-webapp
cdc1c524b69e9e7afad5ba0685b43bc609c71bf1
[ "MIT" ]
null
null
null
www/models.py
Herb-Sun/awesome-python-webapp
cdc1c524b69e9e7afad5ba0685b43bc609c71bf1
[ "MIT" ]
null
null
null
www/models.py
Herb-Sun/awesome-python-webapp
cdc1c524b69e9e7afad5ba0685b43bc609c71bf1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import time, uuid from orm import Model, StringField, BooleanField, FloatField, TextField def next_id(): return '%015d%s000' % (int(time.time() * 1000). uuid.uuid4().hex) class User(Model): __table__ = 'users' id = StringField(ddl='varchar(50)') email = ...
32.926829
74
0.681481
import time, uuid from orm import Model, StringField, BooleanField, FloatField, TextField def next_id(): return '%015d%s000' % (int(time.time() * 1000). uuid.uuid4().hex) class User(Model): __table__ = 'users' id = StringField(ddl='varchar(50)') email = StringField(ddl='varchar(50') passwd = St...
true
true
1c23cd944b77e0208d0320e891661b17e1f27b75
9,674
py
Python
kubernetes/client/models/v1_network_policy_spec.py
henrywu2019/python
fb7214144395c05349e70a58ea129576f6b11fc4
[ "Apache-2.0" ]
4,417
2018-01-13T04:30:48.000Z
2022-03-31T15:33:59.000Z
kubernetes/client/models/v1_network_policy_spec.py
g1f1/python-1
da6076070b2ada0e048e060943b94358213c414b
[ "Apache-2.0" ]
1,414
2018-01-12T19:31:56.000Z
2022-03-31T22:01:02.000Z
kubernetes/client/models/v1_network_policy_spec.py
g1f1/python-1
da6076070b2ada0e048e060943b94358213c414b
[ "Apache-2.0" ]
2,854
2018-01-14T08:57:33.000Z
2022-03-31T01:41:56.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.21 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
46.961165
804
0.674385
import pprint import re import six from kubernetes.client.configuration import Configuration class V1NetworkPolicySpec(object): openapi_types = { 'egress': 'list[V1NetworkPolicyEgressRule]', 'ingress': 'list[V1NetworkPolicyIngressRule]', 'pod_selector': 'V1LabelSelector', ...
true
true
1c23ce6520fa7867dc5d1222990f9ee961dfdd22
4,841
py
Python
chainer/functions/array/broadcast.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2020-05-28T10:07:25.000Z
2020-05-28T10:07:25.000Z
chainer/functions/array/broadcast.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
chainer/functions/array/broadcast.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
import six import chainer from chainer import cuda from chainer import function_node from chainer.utils import type_check def _backward_one(g, shape): if g.shape == shape: return g ndim = len(shape) lead = g.ndim - ndim lead_axis = tuple(six.moves.range(lead)) axis = [i + lead for i, sx i...
31.848684
77
0.571576
import six import chainer from chainer import cuda from chainer import function_node from chainer.utils import type_check def _backward_one(g, shape): if g.shape == shape: return g ndim = len(shape) lead = g.ndim - ndim lead_axis = tuple(six.moves.range(lead)) axis = [i + lead for i, sx i...
true
true
1c23ce918a4e5fce3df8006e27442d9ed9fbfe64
5,517
py
Python
blog/blog/settings.py
Aflie0818/blog
b4985c480860997e3f5eea787495a650894f814f
[ "MIT" ]
null
null
null
blog/blog/settings.py
Aflie0818/blog
b4985c480860997e3f5eea787495a650894f814f
[ "MIT" ]
null
null
null
blog/blog/settings.py
Aflie0818/blog
b4985c480860997e3f5eea787495a650894f814f
[ "MIT" ]
null
null
null
""" Django settings for blog project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # Buil...
26.781553
91
0.629328
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'i45cjg&zb!9&&41^o+teva1#ls_kmze+)j5(m036&s2m__o$jn' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
1c23cf5a54f111b590c09db4201b62d40f3018f9
21,108
py
Python
Bio/SeqIO/PdbIO.py
Zulko/biopython
af73d7e06397c2ce1a9507ea176b3712dd6f0604
[ "BSD-3-Clause" ]
null
null
null
Bio/SeqIO/PdbIO.py
Zulko/biopython
af73d7e06397c2ce1a9507ea176b3712dd6f0604
[ "BSD-3-Clause" ]
null
null
null
Bio/SeqIO/PdbIO.py
Zulko/biopython
af73d7e06397c2ce1a9507ea176b3712dd6f0604
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2012 by Eric Talevich. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Bio.SeqIO support for...
38.23913
95
0.603326
import collections import shutil import warnings from Bio import BiopythonParserWarning from Bio._py3k import StringIO from Bio.Alphabet import generic_protein from Bio.Data.SCOPData import protein_letters_3to1 from Bio.File import as_handle from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord def Ato...
true
true
1c23d0ac8f5e25669ee21a9f28675c1e31564c68
20,801
py
Python
sdk/python/pulumi_google_native/networksecurity/v1/server_tls_policy_iam_policy.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/networksecurity/v1/server_tls_policy_iam_policy.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/networksecurity/v1/server_tls_policy_iam_policy.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
73.762411
1,118
0.705831
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['ServerTlsPolicyIamPolicyArgs', 'ServerTlsPolicyIamPolicy'] @pulumi.input_type class Ser...
true
true
1c23d0c6512559139a3ec6a480bd2187f2ba4d71
160
py
Python
chessgames/admin.py
megatron0000/ces22-xadrez-web
10032f81952e1f816925f5af9c27f235dfbf360c
[ "MIT" ]
null
null
null
chessgames/admin.py
megatron0000/ces22-xadrez-web
10032f81952e1f816925f5af9c27f235dfbf360c
[ "MIT" ]
8
2020-02-11T22:28:16.000Z
2021-06-10T20:16:42.000Z
chessgames/admin.py
megatron0000/ces22-xadrez-web
10032f81952e1f816925f5af9c27f235dfbf360c
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from chessgames.models import * admin.site.register(GameSession) admin.site.register(ChessGame)
20
32
0.8125
from django.contrib import admin from chessgames.models import * admin.site.register(GameSession) admin.site.register(ChessGame)
true
true
1c23d16abb92723fa5b8ed54f701c8e1e7086763
1,364
py
Python
vvlab/models/actor_net.py
yuhuihan/Reinforcement-Learning
02bba66885bcd9cd9e13881c573ba5778cc3b93d
[ "MIT" ]
null
null
null
vvlab/models/actor_net.py
yuhuihan/Reinforcement-Learning
02bba66885bcd9cd9e13881c573ba5778cc3b93d
[ "MIT" ]
null
null
null
vvlab/models/actor_net.py
yuhuihan/Reinforcement-Learning
02bba66885bcd9cd9e13881c573ba5778cc3b93d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 """ @author: Jiawei Wu @create time: 2019-12-06 23:23 @edit time: 2019-12-12 11:11 @desc: DDPG中Actor使用的网络 特点是有一个bound的特殊参数。因为Actor往往只输出一个动作,但是有上下限. """ import torch import torch.nn as nn import torch.nn.functional as F CUDA = torch.cuda.is_available() class SimpleActorNet(nn.Modu...
26.745098
69
0.607771
import torch import torch.nn as nn import torch.nn.functional as F CUDA = torch.cuda.is_available() class SimpleActorNet(nn.Module): def __init__(self, n_states, n_actions, n_neurons=30, a_bound=1): super(SimpleActorNet, self).__init__() self.bound = a_bound self.fc1 = nn.Linear(n_stat...
true
true
1c23d1d0c4d02df0d2167e178f3a88a003b4751b
1,617
py
Python
docScanner.py
Varun487/Open_CV_Intro_Projects
ffb418e03f79d2789cec4e39dfc3d55b9b447912
[ "MIT" ]
null
null
null
docScanner.py
Varun487/Open_CV_Intro_Projects
ffb418e03f79d2789cec4e39dfc3d55b9b447912
[ "MIT" ]
null
null
null
docScanner.py
Varun487/Open_CV_Intro_Projects
ffb418e03f79d2789cec4e39dfc3d55b9b447912
[ "MIT" ]
null
null
null
from intro import * img = cv2.imread("./Resources/page.jpeg") img_contours = img.copy() def get_contours(imgThresh): contours, hierarchy = cv2.findContours(imgThresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) max_area = 0 biggest = [] print(len(contours)) for contour in contours: area = cv...
31.705882
110
0.670996
from intro import * img = cv2.imread("./Resources/page.jpeg") img_contours = img.copy() def get_contours(imgThresh): contours, hierarchy = cv2.findContours(imgThresh, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) max_area = 0 biggest = [] print(len(contours)) for contour in contours: area = cv...
true
true
1c23d1d7dddf71dfa8bcfae86a7f1126955e094d
689
py
Python
authentication/views.py
Debagboola/User-Authentication-And-Registration-With-Django-Rest-Framework
45637d73d8f9ee679e96eb8332c27f0ad8b6b3be
[ "MIT" ]
null
null
null
authentication/views.py
Debagboola/User-Authentication-And-Registration-With-Django-Rest-Framework
45637d73d8f9ee679e96eb8332c27f0ad8b6b3be
[ "MIT" ]
null
null
null
authentication/views.py
Debagboola/User-Authentication-And-Registration-With-Django-Rest-Framework
45637d73d8f9ee679e96eb8332c27f0ad8b6b3be
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. from .serializers import MyTokenObtainPairSerializer from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import AllowAny from rest_framework.permissions import IsAuthenticated from rest_frame...
29.956522
62
0.805515
from django.shortcuts import render from .serializers import MyTokenObtainPairSerializer from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import AllowAny from rest_framework.permissions import IsAuthenticated from rest_framework_simplejwt.views impo...
true
true
1c23d22f62ca32aac000eb87188550440ddfa2ec
8,121
py
Python
qnap_film/dpx_part_whole_move.py
bfidatadigipres/dpx_encoding
4e84f903e1e77ccbd90c7ffe3822cc0f5cd9ec00
[ "MIT" ]
9
2021-05-25T17:05:45.000Z
2022-02-15T13:58:53.000Z
qnap_film/dpx_part_whole_move.py
bfidatadigipres/dpx_encoding
4e84f903e1e77ccbd90c7ffe3822cc0f5cd9ec00
[ "MIT" ]
null
null
null
qnap_film/dpx_part_whole_move.py
bfidatadigipres/dpx_encoding
4e84f903e1e77ccbd90c7ffe3822cc0f5cd9ec00
[ "MIT" ]
1
2021-12-09T16:44:34.000Z
2021-12-09T16:44:34.000Z
#!/usr/bin/env LANG=en_UK.UTF-8 /usr/local/bin/python3 ''' dpx_part_whole_move.py Script functions: 1. Look in part_whole_split/rawcooked and part_whole_split/tar for sequences moved to holding point that are under 1TB encoding size 2. Checks through all folder names, if any appear in left column of CSV then re...
36.093333
111
0.638714
import os import re import shutil import logging import csv import datetime DPX_PATH = os.environ['QNAP_FILM'] SCRIPT_LOG = os.path.join(DPX_PATH, os.environ['DPX_SCRIPT_LOG']) CSV_PATH = os.path.join(SCRIPT_LOG, 'splitting_document.csv') TAR_PATH = os.path.join(DPX_PATH, os.environ['DPX_WRAP']) RAWCOOKED_PATH = o...
true
true
1c23d2e26492645f8cb8da6c384249876564dc10
11,859
py
Python
statefun-sdk-python/statefun/request_reply_v3.py
fransking/flink-statefun
d8a4957892696b434e68e83a42c7e01443a85119
[ "Apache-2.0" ]
null
null
null
statefun-sdk-python/statefun/request_reply_v3.py
fransking/flink-statefun
d8a4957892696b434e68e83a42c7e01443a85119
[ "Apache-2.0" ]
null
null
null
statefun-sdk-python/statefun/request_reply_v3.py
fransking/flink-statefun
d8a4957892696b434e68e83a42c7e01443a85119
[ "Apache-2.0" ]
null
null
null
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
42.505376
118
0.66557
def collect_mutations(cells: typing.Dict[str, Cell], invocation_result): for key, cell in cells.items(): if not cell.dirty: cell.reset() continue mutation = invocation_result.state_mutations.add() mutation.state_name = key val: typing.Optional[TypedValue] = ce...
true
true
1c23d3027b1a8e10fb9021d4ea87b1a5a7a8ad98
2,587
py
Python
model/pytorch/engine.py
tijsmaas/TrafficPrediction
9129faea8fee8c2d90595d2974f0b11030ad2674
[ "MIT" ]
17
2020-08-16T04:17:57.000Z
2022-02-28T01:13:49.000Z
model/pytorch/engine.py
tijsmaas/TrafficPrediction
9129faea8fee8c2d90595d2974f0b11030ad2674
[ "MIT" ]
null
null
null
model/pytorch/engine.py
tijsmaas/TrafficPrediction
9129faea8fee8c2d90595d2974f0b11030ad2674
[ "MIT" ]
5
2020-05-23T07:47:15.000Z
2021-11-16T15:05:05.000Z
import torch import torch.optim as optim from torch import nn from tqdm import tqdm from lib.metrics import metrics_torch from model.pytorch.gwnet_model import gwnet class Evaluator(): def __init__(self, scaler, device, model): self.model = model self.model.to(device) self.scaler = scaler ...
35.930556
91
0.614225
import torch import torch.optim as optim from torch import nn from tqdm import tqdm from lib.metrics import metrics_torch from model.pytorch.gwnet_model import gwnet class Evaluator(): def __init__(self, scaler, device, model): self.model = model self.model.to(device) self.scaler = scaler ...
true
true
1c23d32f02ae13fed2c44341dfc39979f0b07c33
3,393
py
Python
src/_paths.py
acwooding/easydata2_demo
7b8db87e6e1e53f70d6d81a061108b31ff448746
[ "MIT" ]
69
2019-01-23T22:46:05.000Z
2021-03-07T01:56:23.000Z
src/_paths.py
acwooding/easydata2_demo
7b8db87e6e1e53f70d6d81a061108b31ff448746
[ "MIT" ]
81
2018-07-27T00:18:13.000Z
2021-02-26T09:36:28.000Z
src/_paths.py
acwooding/easydata2_demo
7b8db87e6e1e53f70d6d81a061108b31ff448746
[ "MIT" ]
22
2018-10-04T21:36:27.000Z
2021-02-26T00:59:19.000Z
from .decorators import SingletonDecorator from .kvstore import KVStore from .log import logger import pathlib class PathStore(KVStore): """Persistent Key-Value store for project-level paths >>> b = PathStore(config_file='/tmpx/project/catalog/config.ini', \ project_path='${catalog_path}/..', \ ...
32.314286
247
0.63631
from .decorators import SingletonDecorator from .kvstore import KVStore from .log import logger import pathlib class PathStore(KVStore): _protected = ['catalog_path'] def __init__(self, *args, config_section='Paths', config_file=None, **kwargs): if config_f...
true
true
1c23d39c2423a78a248e2d223a60cca72c367d99
3,386
py
Python
hail/python/hail/methods/__init__.py
jmartasek/hail
bc009191a6a159dc7d620e7f573199c0916141fa
[ "MIT" ]
null
null
null
hail/python/hail/methods/__init__.py
jmartasek/hail
bc009191a6a159dc7d620e7f573199c0916141fa
[ "MIT" ]
null
null
null
hail/python/hail/methods/__init__.py
jmartasek/hail
bc009191a6a159dc7d620e7f573199c0916141fa
[ "MIT" ]
null
null
null
from .family_methods import (trio_matrix, mendel_errors, transmission_disequilibrium_test, de_novo) from .impex import (export_elasticsearch, export_gen, export_bgen, export_plink, export_vcf, import_locus_intervals, import_bed, import_fam, grep, impo...
39.372093
99
0.587123
from .family_methods import (trio_matrix, mendel_errors, transmission_disequilibrium_test, de_novo) from .impex import (export_elasticsearch, export_gen, export_bgen, export_plink, export_vcf, import_locus_intervals, import_bed, import_fam, grep, impo...
true
true
1c23d414a748ec518e4377e0cb895a460f553a22
5,496
py
Python
cms_content_patch/views.py
indexofire/django-cms-content
d6b214542ab618b6fa4645483fa5bf58e8212f86
[ "BSD-3-Clause" ]
1
2020-03-22T21:16:27.000Z
2020-03-22T21:16:27.000Z
cms_content_patch/views.py
indexofire/django-cms-content
d6b214542ab618b6fa4645483fa5bf58e8212f86
[ "BSD-3-Clause" ]
null
null
null
cms_content_patch/views.py
indexofire/django-cms-content
d6b214542ab618b6fa4645483fa5bf58e8212f86
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime from django.http import HttpResponseRedirect from django.db.models import F from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.shortcuts import get_list_or_404 from django.template.context import RequestContext...
35.006369
104
0.682678
from datetime import datetime from django.http import HttpResponseRedirect from django.db.models import F from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.shortcuts import get_list_or_404 from django.template.context import RequestContext from django.core.pagin...
true
true
1c23d4eed680f10c5e53376e4ee16860f4cb0ead
3,662
py
Python
languages.py
Ishaangandhi/Jabber
c77d5979ec2c46836251c57bc45e8b2f4fd43996
[ "MIT" ]
null
null
null
languages.py
Ishaangandhi/Jabber
c77d5979ec2c46836251c57bc45e8b2f4fd43996
[ "MIT" ]
null
null
null
languages.py
Ishaangandhi/Jabber
c77d5979ec2c46836251c57bc45e8b2f4fd43996
[ "MIT" ]
null
null
null
langs = { 'ab': 'Abkhaz', 'aa': 'Afar', 'af': 'Afrikaans', 'ak': 'Akan', 'sq': 'Albanian', 'am': 'Amharic', 'ar': 'Arabic', 'an': 'Aragonese', 'hy': 'Armenian', 'as': 'Assamese', 'av': 'Avaric', 'ae': 'Avestan', 'ay': 'Aymara', 'az': 'Azerbaijani', 'bm': 'Bambara', 'ba': 'Bashkir', 'eu': 'Basque', 'be...
18.876289
33
0.519661
langs = { 'ab': 'Abkhaz', 'aa': 'Afar', 'af': 'Afrikaans', 'ak': 'Akan', 'sq': 'Albanian', 'am': 'Amharic', 'ar': 'Arabic', 'an': 'Aragonese', 'hy': 'Armenian', 'as': 'Assamese', 'av': 'Avaric', 'ae': 'Avestan', 'ay': 'Aymara', 'az': 'Azerbaijani', 'bm': 'Bambara', 'ba': 'Bashkir', 'eu': 'Basque', 'be...
true
true
1c23d5928cb33231b1e1b61aee24dbf94e70d18c
1,052
py
Python
testbot/testbot.py
gattma/contest
ab750b59d414f9bd66c734c51bec0da46e792c7c
[ "MIT" ]
null
null
null
testbot/testbot.py
gattma/contest
ab750b59d414f9bd66c734c51bec0da46e792c7c
[ "MIT" ]
null
null
null
testbot/testbot.py
gattma/contest
ab750b59d414f9bd66c734c51bec0da46e792c7c
[ "MIT" ]
null
null
null
from csv import reader, writer from pathlib import Path from datetime import datetime import requests import time BASE_URL = "https://solr-search-service-contest.apps.play.gepaplexx.com" def dict_to_list(dictpath): with open(dictpath, 'r') as read_obj: csv_reader = reader(read_obj) list_of_rows =...
28.432432
107
0.638783
from csv import reader, writer from pathlib import Path from datetime import datetime import requests import time BASE_URL = "https://solr-search-service-contest.apps.play.gepaplexx.com" def dict_to_list(dictpath): with open(dictpath, 'r') as read_obj: csv_reader = reader(read_obj) list_of_rows =...
true
true
1c23d6b79ef82266fe229bcb0344bc80edcafe48
465
py
Python
test/test_message_operators.py
smalbadger/kommander
eefa145cdabce8c8e3afdb1d6d857ebfff7a0735
[ "MIT" ]
1
2021-03-18T00:20:53.000Z
2021-03-18T00:20:53.000Z
test/test_message_operators.py
smalbadger/kommander
eefa145cdabce8c8e3afdb1d6d857ebfff7a0735
[ "MIT" ]
65
2021-02-14T03:36:57.000Z
2022-03-04T08:33:10.000Z
test/test_message_operators.py
smalbadger/pymessagelib
eefa145cdabce8c8e3afdb1d6d857ebfff7a0735
[ "MIT" ]
null
null
null
import unittest from pymessagelib import MessageBuilder, InvalidDataFormatException from msg_definitions import msg_fmts, register_defs class TestMessageOperators(unittest.TestCase): def testRepr(self): builder = MessageBuilder() OUTPUTS = builder.build_message_class("OUTPUTS", register_defs["OUTP...
35.769231
82
0.767742
import unittest from pymessagelib import MessageBuilder, InvalidDataFormatException from msg_definitions import msg_fmts, register_defs class TestMessageOperators(unittest.TestCase): def testRepr(self): builder = MessageBuilder() OUTPUTS = builder.build_message_class("OUTPUTS", register_defs["OUTP...
true
true
1c23d7c8e775996e1de1216ae3013ceb15446121
1,344
py
Python
src/test-apps/happy-tests/wdmv0/set_test_path.py
lanyuwen/openweave-core
fbed1743a7b62657f5d310b98909c59474a6404d
[ "Apache-2.0" ]
null
null
null
src/test-apps/happy-tests/wdmv0/set_test_path.py
lanyuwen/openweave-core
fbed1743a7b62657f5d310b98909c59474a6404d
[ "Apache-2.0" ]
null
null
null
src/test-apps/happy-tests/wdmv0/set_test_path.py
lanyuwen/openweave-core
fbed1743a7b62657f5d310b98909c59474a6404d
[ "Apache-2.0" ]
1
2020-11-04T06:58:12.000Z
2020-11-04T06:58:12.000Z
#!/usr/bin/env python # # Copyright (c) 2017 Nest Labs, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
30.545455
110
0.682292
import os import sys wrapper_home = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "happy")) wrapper_dirs = [ ".", wrapper_home, wrapper_home + "/plugin", wrapper_home + "/bin" ] for wrapper_dir in...
true
true
1c23d7f3c409dab6967321543a15ec0c8bb260e2
2,867
py
Python
salt/states/xmpp.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
12
2015-01-21T00:18:25.000Z
2021-07-11T07:35:26.000Z
salt/states/xmpp.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
salt/states/xmpp.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
12
2015-01-05T09:50:42.000Z
2019-08-19T01:43:40.000Z
# -*- coding: utf-8 -*- ''' Sending Messages over XMPP ========================== .. versionadded:: 2014.1.0 This state is useful for firing messages during state runs, using the XMPP protocol .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' ...
24.504274
74
0.55354
from __future__ import absolute_import, print_function, unicode_literals def __virtual__(): return 'xmpp' if 'xmpp.send_msg' in __salt__ else False def send_msg(name, recipient, profile): ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''} if __opts__['...
true
true
1c23d89506ed06e6c31706b6e521346f6f8ff563
1,239
py
Python
python/graphs/detect_cycle_directed.py
bkpathak/HackerRank-Problems
03e118b7caf3e1f85046dffd5e7cbeb48c60ee83
[ "MIT" ]
null
null
null
python/graphs/detect_cycle_directed.py
bkpathak/HackerRank-Problems
03e118b7caf3e1f85046dffd5e7cbeb48c60ee83
[ "MIT" ]
null
null
null
python/graphs/detect_cycle_directed.py
bkpathak/HackerRank-Problems
03e118b7caf3e1f85046dffd5e7cbeb48c60ee83
[ "MIT" ]
null
null
null
""" The idea on the directed Graph is to keep the track of node which is not visited completely. The used of stack is to keep the track of the node which is still needs to be explored fully.If we reach the node in stack that means we reach the node that is not completely visited, whcih implies that there is a cycle. "...
26.934783
87
0.644875
def is_cycle(node,stack, visited): stack[node] = True visited[node] = True for v in graph[node]: if not visited[v] and is_cycle(v, stack, visited): return True elif stack[v]: return True # Vertex is completely visited, remove it from stack sta...
true
true
1c23d916f2622eb39b75c38a0b1b290f6741f104
24,999
py
Python
osmnx/footprints.py
pmartincalvo/osmnx
15eddc0672f0ec951ada1b89eb417df44d35636e
[ "MIT" ]
2
2020-01-31T21:25:32.000Z
2020-01-31T21:30:15.000Z
osmnx/footprints.py
pmartincalvo/osmnx
15eddc0672f0ec951ada1b89eb417df44d35636e
[ "MIT" ]
null
null
null
osmnx/footprints.py
pmartincalvo/osmnx
15eddc0672f0ec951ada1b89eb417df44d35636e
[ "MIT" ]
1
2020-03-06T21:09:49.000Z
2020-03-06T21:09:49.000Z
################################################################################ # Module: footprints.py # Description: Download and plot footprints from OpenStreetMap # License: MIT, see full license in LICENSE.txt # Web: https://github.com/gboeing/osmnx ################################################################...
40.914894
134
0.651746
for element in response['elements']: if 'type' in element and element['type']=='node': vertices[element['id']] = {'lat' : element['lat'], 'lon' : element['lon']} elif 'type' in element and element['type']=='wa...
true
true
1c23d9e2d4d0eaefa7bb458460f88cb3f0b23916
4,311
py
Python
software/multifluids_icferst/python/fluidity/diagnostics/simplices.py
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
2
2020-05-11T02:39:46.000Z
2020-05-11T03:08:38.000Z
software/multifluids_icferst/python/fluidity/diagnostics/simplices.py
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
null
null
null
software/multifluids_icferst/python/fluidity/diagnostics/simplices.py
msc-acse/acse-9-independent-research-project-Wade003
cfcba990d52ccf535171cf54c0a91b184db6f276
[ "MIT" ]
2
2020-05-21T22:50:19.000Z
2020-10-28T17:16:31.000Z
#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the ...
38.837838
135
0.67293
import unittest import fluidity.diagnostics.calc as calc import fluidity.diagnostics.elements as elements import fluidity.diagnostics.optimise as optimise def SimplexEdgeVectors(nodeCoords): type = elements.ElementType(dim = len(nodeCoords[0]), nodeCount = len(nodeCoords)) assert(type...
true
true
1c23da693473a48136f0941e103d825b2fe5d87b
751
py
Python
prettyplotlib/_fill_between.py
st--/prettyplotlib
a81c75009d71ed903d470a444349cb291d658f66
[ "MIT" ]
1
2018-03-24T17:46:45.000Z
2018-03-24T17:46:45.000Z
prettyplotlib/_fill_between.py
st--/prettyplotlib
a81c75009d71ed903d470a444349cb291d658f66
[ "MIT" ]
null
null
null
prettyplotlib/_fill_between.py
st--/prettyplotlib
a81c75009d71ed903d470a444349cb291d658f66
[ "MIT" ]
null
null
null
from prettyplotlib.utils import remove_chartjunk, maybe_get_ax, maybe_get_linewidth from prettyplotlib.colors import almost_black, pretty @pretty def fill_between(*args, **kwargs): ax, args, kwargs = maybe_get_ax(*args, **kwargs) lw = maybe_get_linewidth(**kwargs) kwargs['linewidths'] = lw if 'color...
31.291667
83
0.695073
from prettyplotlib.utils import remove_chartjunk, maybe_get_ax, maybe_get_linewidth from prettyplotlib.colors import almost_black, pretty @pretty def fill_between(*args, **kwargs): ax, args, kwargs = maybe_get_ax(*args, **kwargs) lw = maybe_get_linewidth(**kwargs) kwargs['linewidths'] = lw if 'color...
true
true
1c23dcd0d17f7f7e10973813fa33d61e0c97c282
1,278
py
Python
www/bigghosthead/bigghosthead/scrapy_redis/BloomfilterOnRedis.py
baijiege9/BigGhostHead
1ffa0bf390bad707e4fc902f9af98a4c73eea554
[ "BSD-3-Clause" ]
null
null
null
www/bigghosthead/bigghosthead/scrapy_redis/BloomfilterOnRedis.py
baijiege9/BigGhostHead
1ffa0bf390bad707e4fc902f9af98a4c73eea554
[ "BSD-3-Clause" ]
null
null
null
www/bigghosthead/bigghosthead/scrapy_redis/BloomfilterOnRedis.py
baijiege9/BigGhostHead
1ffa0bf390bad707e4fc902f9af98a4c73eea554
[ "BSD-3-Clause" ]
null
null
null
# encoding=utf-8 class SimpleHash(object): def __init__(self, cap, seed): self.cap = cap self.seed = seed def hash(self, value): ret = 0 for i in range(len(value)): ret += self.seed * ret + ord(value[i]) return (self.cap - 1) & ret class BloomFilter(object...
29.72093
70
0.555556
class SimpleHash(object): def __init__(self, cap, seed): self.cap = cap self.seed = seed def hash(self, value): ret = 0 for i in range(len(value)): ret += self.seed * ret + ord(value[i]) return (self.cap - 1) & ret class BloomFilter(object): def __ini...
true
true
1c23def8a4b48985f2abf87e968cf30e1168e601
13,917
py
Python
tensorflow_model_analysis/eval_saved_model/exporter.py
ejarkm/model-analysis
ff145c356c89a7bb421b86718a2f50f7c5c1f621
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/eval_saved_model/exporter.py
ejarkm/model-analysis
ff145c356c89a7bb421b86718a2f50f7c5c1f621
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/eval_saved_model/exporter.py
ejarkm/model-analysis
ff145c356c89a7bb421b86718a2f50f7c5c1f621
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 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 # # Unless required by applica...
42.429878
82
0.697708
import collections import contextlib import os import types from typing import Callable, Dict, List, Optional, Union import tensorflow as tf from tensorflow_model_analysis.eval_saved_model import export from tensorflow_model_analysis.utils import util as tfma_util from tensorflow.python.estimator impor...
true
true
1c23df3df5da2610a48e2608f02e94d9d9be2a74
390
py
Python
NewsIT/newsit/newsit/wsgi.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
NewsIT/newsit/newsit/wsgi.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
NewsIT/newsit/newsit/wsgi.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
""" WSGI config for newsit 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/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
22.941176
78
0.784615
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "newsit.settings") application = get_wsgi_application()
true
true
1c23df6aee8bbf9d1da3434fae851ff03469292c
590
py
Python
asaas/my_account.py
marlonjsilva/asaas_sdk_python
871a199e8156d9baa9f78972232feee38b0608bb
[ "MIT" ]
null
null
null
asaas/my_account.py
marlonjsilva/asaas_sdk_python
871a199e8156d9baa9f78972232feee38b0608bb
[ "MIT" ]
4
2022-02-16T13:53:36.000Z
2022-02-16T14:10:40.000Z
asaas/my_account.py
marlonjsilva/asaas_sdk_python
871a199e8156d9baa9f78972232feee38b0608bb
[ "MIT" ]
null
null
null
from asaas.typing import SyncAsync from typing import Any class MyAccount: def __init__(self, parent: Any) -> None: self.parent = parent def get_comercial_data(self, **kwargs: Any) -> SyncAsync[Any]: return self.parent.request( path=f"/myAccount", method="GET", ...
26.818182
66
0.584746
from asaas.typing import SyncAsync from typing import Any class MyAccount: def __init__(self, parent: Any) -> None: self.parent = parent def get_comercial_data(self, **kwargs: Any) -> SyncAsync[Any]: return self.parent.request( path=f"/myAccount", method="GET", ...
true
true
1c23e145f72251c6a2f45c10f032d03725393e35
7,130
py
Python
pants/util/sendfile.py
ecdavis/pants
88129d24020e95b71e8d0260a111dc0b457b0676
[ "Apache-2.0" ]
20
2015-01-21T10:22:19.000Z
2021-03-14T00:45:57.000Z
pants/util/sendfile.py
ecdavis/pants
88129d24020e95b71e8d0260a111dc0b457b0676
[ "Apache-2.0" ]
null
null
null
pants/util/sendfile.py
ecdavis/pants
88129d24020e95b71e8d0260a111dc0b457b0676
[ "Apache-2.0" ]
3
2017-01-15T16:41:32.000Z
2018-06-04T15:29:28.000Z
############################################################################### # # Copyright 2011-2012 Pants Developers (see AUTHORS.txt) # # 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 # # ...
31.973094
89
0.544039
true
true
1c23e1831aa048a43d830d0aa6e7cca301f0ad10
2,880
py
Python
research/seq_flow_lite/export_to_tflite.py
zhaowt96/models
03182253673b0e2666ad9a33839759834c0acebd
[ "Apache-2.0" ]
null
null
null
research/seq_flow_lite/export_to_tflite.py
zhaowt96/models
03182253673b0e2666ad9a33839759834c0acebd
[ "Apache-2.0" ]
null
null
null
research/seq_flow_lite/export_to_tflite.py
zhaowt96/models
03182253673b0e2666ad9a33839759834c0acebd
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 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 # # Unless required by applicab...
37.402597
80
0.676736
import importlib import json import os from absl import app from absl import flags import tensorflow as tf from layers import base_layers from layers import projection_layers from utils import tflite_utils FLAGS = flags.FLAGS flags.DEFINE_string("output_dir", None, "The output or model directory....
true
true
1c23e265e4c7c001f54dff8e009775be7dbae7e9
3,153
py
Python
eval/forms.py
chateval/chatevalv2
7ba96d81842db00427a6d6351d5cea76a8766450
[ "Apache-2.0" ]
5
2018-06-11T19:47:23.000Z
2020-03-04T01:29:15.000Z
eval/forms.py
chateval/app
7ba96d81842db00427a6d6351d5cea76a8766450
[ "Apache-2.0" ]
12
2018-07-11T18:50:13.000Z
2022-02-10T10:45:58.000Z
eval/forms.py
chateval/app
7ba96d81842db00427a6d6351d5cea76a8766450
[ "Apache-2.0" ]
1
2018-06-29T14:52:16.000Z
2018-06-29T14:52:16.000Z
from django import forms from django.utils.safestring import mark_safe class ReadOnlyText(forms.TextInput): input_type = 'text' def render(self, name, value, attrs=None): if value is None: value = '' return value class UploadModelForm(forms.Form): name = forms.CharField(max_length=255, wi...
67.085106
123
0.645417
from django import forms from django.utils.safestring import mark_safe class ReadOnlyText(forms.TextInput): input_type = 'text' def render(self, name, value, attrs=None): if value is None: value = '' return value class UploadModelForm(forms.Form): name = forms.CharField(max_length=255, wi...
true
true
1c23e2a0ec297ea3485a18b257b9d5bf7e11c3ec
1,902
py
Python
mindhome_alpha/erpnext/accounts/doctype/payment_order/test_payment_order.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/accounts/doctype/payment_order/test_payment_order.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/accounts/doctype/payment_order/test_payment_order.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import getdate from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_bank_account from erpn...
38.816327
111
0.805994
from __future__ import unicode_literals import frappe import unittest from frappe.utils import getdate from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_bank_account from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry, make_payment_order from erpnext.a...
true
true
1c23e2ed28c72b6dc5c963549854201cdad5ad6b
306
py
Python
gdp/models.py
Monxun/django_bokeh
022fe5637f04350bfb6e28830f0506aa5ca54884
[ "MIT" ]
null
null
null
gdp/models.py
Monxun/django_bokeh
022fe5637f04350bfb6e28830f0506aa5ca54884
[ "MIT" ]
null
null
null
gdp/models.py
Monxun/django_bokeh
022fe5637f04350bfb6e28830f0506aa5ca54884
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class GDP(models.Model): country = models.CharField(max_length=100) country_code = models.CharField(max_length=4) year = models.PositiveSmallIntegerField() gdp = models.FloatField() def __str__(self): return self.country
27.818182
49
0.722222
from django.db import models class GDP(models.Model): country = models.CharField(max_length=100) country_code = models.CharField(max_length=4) year = models.PositiveSmallIntegerField() gdp = models.FloatField() def __str__(self): return self.country
true
true
1c23e32d23c1425f9fdaddc2bd293497cb5b29a0
391
py
Python
my_site/my_site/wsgi.py
goulartdev/udemy-django-course
f39ab36aacdf47d19f8c286c317cc54d8358dadc
[ "MIT" ]
1
2022-01-08T18:59:29.000Z
2022-01-08T18:59:29.000Z
my_site/wsgi.py
taher356/django-blog
74d302d406aae7f3e2a06a7277e963c4c68249bf
[ "MIT" ]
null
null
null
my_site/wsgi.py
taher356/django-blog
74d302d406aae7f3e2a06a7277e963c4c68249bf
[ "MIT" ]
null
null
null
""" WSGI config for my_site 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.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'my_site.settings') application = get_wsgi_application()
true
true
1c23e349f47a166f74011ba85df4a7a293695ebf
66,345
py
Python
appengine/chromium_rietveld/codereview/models.py
eunchong/infra
ce3728559112bfb3e8b32137eada517aec6d22f9
[ "BSD-3-Clause" ]
null
null
null
appengine/chromium_rietveld/codereview/models.py
eunchong/infra
ce3728559112bfb3e8b32137eada517aec6d22f9
[ "BSD-3-Clause" ]
null
null
null
appengine/chromium_rietveld/codereview/models.py
eunchong/infra
ce3728559112bfb3e8b32137eada517aec6d22f9
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
34.608764
80
0.681543
"""App Engine data model (schema) definition for Rietveld.""" import calendar import datetime import itertools import json import logging import md5 import os import re import sys import time from google.appengine.api import memcache from google.appengine.api import urlfetch from google.appengine.api.us...
false
true
1c23e352b6663e13da1fcb43ddb0fc6c00198269
4,350
py
Python
plugins/commands.py
its-leo-bitch/XeQulsT
5a129aceb7c976dbd6d5b460b1b6d79db20f26ef
[ "MIT" ]
null
null
null
plugins/commands.py
its-leo-bitch/XeQulsT
5a129aceb7c976dbd6d5b460b1b6d79db20f26ef
[ "MIT" ]
null
null
null
plugins/commands.py
its-leo-bitch/XeQulsT
5a129aceb7c976dbd6d5b460b1b6d79db20f26ef
[ "MIT" ]
2
2021-09-05T07:45:53.000Z
2021-09-08T08:46:15.000Z
#MIT License #Copyright (c) 2021 SUBIN #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distr...
37.826087
265
0.696552
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton from pyrogram import Client, filters from utils import USERNAME, mp from config import Config U=USERNAME CHAT=Config.CHAT msg=Config.msg HOME_TEXT = "<b>Helo, [{}](tg://user?id={})\n\nIam MusicPlayer 2.0 which plays music in Chan...
true
true
1c23e473ddb38841cf0826bcf8d91afb968e263c
7,955
py
Python
metaworld/envs/mujoco/sawyer_xyz/base.py
LiCHOTHU/ocean-kp
2102bda2e51233baad0da12a6b1f168a7882564b
[ "MIT" ]
null
null
null
metaworld/envs/mujoco/sawyer_xyz/base.py
LiCHOTHU/ocean-kp
2102bda2e51233baad0da12a6b1f168a7882564b
[ "MIT" ]
12
2021-02-02T22:53:59.000Z
2022-03-12T00:41:30.000Z
metaworld/envs/mujoco/sawyer_xyz/base.py
LiCHOTHU/ocean-kp
2102bda2e51233baad0da12a6b1f168a7882564b
[ "MIT" ]
null
null
null
import abc import copy from gym.spaces import Discrete import mujoco_py import numpy as np from pyquaternion import Quaternion from metaworld.core.serializable import Serializable from metaworld.envs.mujoco.mujoco_env import MujocoEnv from metaworld.envs.env_util import quat_to_zangle, zangle_to_quat OBS_TYPE = ['p...
37
175
0.62313
import abc import copy from gym.spaces import Discrete import mujoco_py import numpy as np from pyquaternion import Quaternion from metaworld.core.serializable import Serializable from metaworld.envs.mujoco.mujoco_env import MujocoEnv from metaworld.envs.env_util import quat_to_zangle, zangle_to_quat OBS_TYPE = ['p...
true
true
1c23e5b05bd6438ea2eebab380b4164842d4dd5a
4,041
py
Python
telegram/buttons.py
ghreps/Horoscope-Telegram-Bot
800dc7d0eade82570aa3cf0f0882f82c36b47eeb
[ "Apache-2.0" ]
null
null
null
telegram/buttons.py
ghreps/Horoscope-Telegram-Bot
800dc7d0eade82570aa3cf0f0882f82c36b47eeb
[ "Apache-2.0" ]
null
null
null
telegram/buttons.py
ghreps/Horoscope-Telegram-Bot
800dc7d0eade82570aa3cf0f0882f82c36b47eeb
[ "Apache-2.0" ]
null
null
null
from aiogram.types import InlineKeyboardButton as Button from aiogram.utils.callback_data import CallbackData from aiogram import types cb = CallbackData('post','params','action') # post:<id>:<action> weekly_menu = [ Button('Обычный', callback_data=cb.new('common', action='get_weekly')), Button('Бизнес', cal...
51.807692
93
0.718139
from aiogram.types import InlineKeyboardButton as Button from aiogram.utils.callback_data import CallbackData from aiogram import types cb = CallbackData('post','params','action') weekly_menu = [ Button('Обычный', callback_data=cb.new('common', action='get_weekly')), Button('Бизнес', callback_data=cb.new('b...
true
true
1c23e6246adc7979d2247c19be2644ed82a0f794
3,992
py
Python
inference.py
alekzieba/tensorflow-deeplab-v3-plus
6562f25564e1c08a1732aeba53a8fa92beae1764
[ "MIT" ]
null
null
null
inference.py
alekzieba/tensorflow-deeplab-v3-plus
6562f25564e1c08a1732aeba53a8fa92beae1764
[ "MIT" ]
null
null
null
inference.py
alekzieba/tensorflow-deeplab-v3-plus
6562f25564e1c08a1732aeba53a8fa92beae1764
[ "MIT" ]
null
null
null
"""Run inference a DeepLab v3 model using tf.estimator API.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import sys import tensorflow as tf import deeplab_model from utils import preprocessing from utils import dataset_util...
35.327434
96
0.684118
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import sys import tensorflow as tf import deeplab_model from utils import preprocessing from utils import dataset_util from PIL import Image import matplotlib.pyplot as plt from t...
true
true
1c23e697f87b95b60d311cc369cb3ec9ddcddd84
11,837
py
Python
tests/full_rpc_image_cycle_simulation.py
aimakerspace/synergos_ttp
f9bff258cf27e77e0a9af10427e7dcc1f05f337a
[ "Apache-2.0" ]
1
2021-09-11T03:53:04.000Z
2021-09-11T03:53:04.000Z
tests/full_rpc_image_cycle_simulation.py
aimakerspace/synergos_ttp
f9bff258cf27e77e0a9af10427e7dcc1f05f337a
[ "Apache-2.0" ]
null
null
null
tests/full_rpc_image_cycle_simulation.py
aimakerspace/synergos_ttp
f9bff258cf27e77e0a9af10427e7dcc1f05f337a
[ "Apache-2.0" ]
2
2022-01-21T00:58:39.000Z
2022-01-26T01:09:45.000Z
#!/usr/bin/env python """ This script is for generating a 2-party end-to-end run of the PySyft REST-RPC service. Detailed here are all the necessary payload submissions that are required to be submitted to `http://<ttp_host>:<ttp_port>/ttp/connect/...` in order to initialise and register for a PySyft REST-RPC project...
28.870732
112
0.55656
ts/{expt_id_1}" expt_retrieval_url_2 = f"{project_retrieval_url}/experiments/{expt_id_2}" run_upload_url_1 = f"{expt_retrieval_url_1}/runs" run_upload_url_2 = f"{expt_retrieval_url_2}/runs" run_retrieval_url_1 = f"{expt_retrieval_url_1}/runs/{run_id_1}" run_retrieval_url_2 = f"{expt_retrieval_url_2}/runs/{run_id_2}...
true
true
1c23e6da51bd129c7b83aa84a643bd9df97623df
23,127
py
Python
py_blackboard/client.py
PaoloRollo/py-blackboard
c8d7f49ff7b21f4eba6914d88cb89521befbd226
[ "MIT" ]
null
null
null
py_blackboard/client.py
PaoloRollo/py-blackboard
c8d7f49ff7b21f4eba6914d88cb89521befbd226
[ "MIT" ]
null
null
null
py_blackboard/client.py
PaoloRollo/py-blackboard
c8d7f49ff7b21f4eba6914d88cb89521befbd226
[ "MIT" ]
null
null
null
import jwt import requests from datetime import datetime, timedelta APPLICATION_JSON = "application/json" APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded" class BlackboardClient: """ BlackboardClient class that handles all the blackboard requests. """ url = None key = None sec...
41.005319
165
0.594586
import jwt import requests from datetime import datetime, timedelta APPLICATION_JSON = "application/json" APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded" class BlackboardClient: url = None key = None secret = None jwt_duration = None session = None access_token = None de...
true
true
1c23e6f50a65a6d9ead2fcfa91311e8566043d66
563
py
Python
solution/1783(병든 나이트).py
OMEGA-Y/Baekjoon-sol
9eaa441e482a0967fb60a9ea1d1373be00272c34
[ "Apache-2.0" ]
null
null
null
solution/1783(병든 나이트).py
OMEGA-Y/Baekjoon-sol
9eaa441e482a0967fb60a9ea1d1373be00272c34
[ "Apache-2.0" ]
null
null
null
solution/1783(병든 나이트).py
OMEGA-Y/Baekjoon-sol
9eaa441e482a0967fb60a9ea1d1373be00272c34
[ "Apache-2.0" ]
null
null
null
import sys input = sys.stdin.readline def knight(N,M): if N == 1 or M == 1: return 1 else: if N < 3: if M == 2: return 1 if M == 3 or M == 4: return 2 if M == 5 or M == 6: return 3 if M >= 7: ...
22.52
86
0.381883
import sys input = sys.stdin.readline def knight(N,M): if N == 1 or M == 1: return 1 else: if N < 3: if M == 2: return 1 if M == 3 or M == 4: return 2 if M == 5 or M == 6: return 3 if M >= 7: ...
true
true
1c23e7200c4934750d3d8fc2cad81cffe4f2d8e6
17,310
py
Python
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/9-sender_receiver_37.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/9-sender_receiver_37.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/9-sender_receiver_37.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet from collections import Iterable from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msa...
39.340909
89
0.572386
from typing import FrozenSet from collections import Iterable from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msa...
true
true
1c23e72855d75ef412ccf810e53a78ebeb55c374
4,798
py
Python
docs/conf.py
emptyewer/yadsa
a0f97babe11b51132fc8a701a5f628551f2930eb
[ "MIT" ]
null
null
null
docs/conf.py
emptyewer/yadsa
a0f97babe11b51132fc8a701a5f628551f2930eb
[ "MIT" ]
null
null
null
docs/conf.py
emptyewer/yadsa
a0f97babe11b51132fc8a701a5f628551f2930eb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # yadsa documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autog...
29.256098
77
0.682368
import os import sys sys.path.insert(0, os.path.abspath('..')) import yadsa extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'yadsa' copyright = u"2018, Venks Krishnamani" author = u...
true
true
1c23e81d87e85dd2979a6403cff34dc3a0e8d9a3
1,387
py
Python
examples/createmediaserviceaccountinrg.py
muralipi/azurerm
cf960ebec5c19b4f8965655dd1fba2f194398449
[ "MIT" ]
44
2016-01-18T22:09:50.000Z
2022-03-01T04:54:48.000Z
examples/createmediaserviceaccountinrg.py
muralipi/azurerm
cf960ebec5c19b4f8965655dd1fba2f194398449
[ "MIT" ]
27
2016-03-16T22:23:28.000Z
2021-11-21T06:47:44.000Z
examples/createmediaserviceaccountinrg.py
muralipi/azurerm
cf960ebec5c19b4f8965655dd1fba2f194398449
[ "MIT" ]
31
2016-02-28T07:59:34.000Z
2021-07-19T15:25:00.000Z
""" Copyright (c) 2016, Marcelo Leal Description: Simple Azure Resource Manager Python library License: MIT (see LICENSE.txt file for details) """ import json import azurerm # Load Azure app defaults try: with open('config.json') as configFile: configData = json.load(configFile) except FileNotFoundError: print("ER...
30.152174
118
0.764239
import json import azurerm try: with open('config.json') as configFile: configData = json.load(configFile) except FileNotFoundError: print("ERROR: Expecting config.json in current folder") sys.exit() tenant_id = configData['tenantId'] app_id = configData['appId'] app_secret = configData['appSecret'] subscriptio...
true
true
1c23e88fa31c3ad12ef65bda521ef3cb17897f93
7,934
py
Python
plugins/microsoft_teams/unit_test/test_azure_ad_utils.py
ax-rpipkin/insightconnect-plugins
7ff7bd829a67ae3020d8d7ecfda3c2dc76ab398c
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/microsoft_teams/unit_test/test_azure_ad_utils.py
ax-rpipkin/insightconnect-plugins
7ff7bd829a67ae3020d8d7ecfda3c2dc76ab398c
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/microsoft_teams/unit_test/test_azure_ad_utils.py
ax-rpipkin/insightconnect-plugins
7ff7bd829a67ae3020d8d7ecfda3c2dc76ab398c
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
import logging import json from time import sleep from unittest import TestCase, mock from icon_microsoft_teams.util.azure_ad_utils import ( get_user_info, add_user_to_group, remove_user_from_group, create_group, get_group_id_from_name, delete_group, enable_teams_for_group, ) from icon_micr...
31.484127
95
0.611293
import logging import json from time import sleep from unittest import TestCase, mock from icon_microsoft_teams.util.azure_ad_utils import ( get_user_info, add_user_to_group, remove_user_from_group, create_group, get_group_id_from_name, delete_group, enable_teams_for_group, ) from icon_micr...
true
true
1c23e8ab12219620e4b58fd4682609b3c4275f90
11,678
py
Python
faucet/valve_packet.py
Bairdo/faucet-copy
edd254d7762a9e6f5260254fe74befdc23fa3eff
[ "Apache-2.0" ]
null
null
null
faucet/valve_packet.py
Bairdo/faucet-copy
edd254d7762a9e6f5260254fe74befdc23fa3eff
[ "Apache-2.0" ]
null
null
null
faucet/valve_packet.py
Bairdo/faucet-copy
edd254d7762a9e6f5260254fe74befdc23fa3eff
[ "Apache-2.0" ]
null
null
null
"""Utility functions for parsing and building Ethernet packet/contents.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2017 The ...
33.751445
95
0.669036
import ipaddress from ryu.lib import mac from ryu.lib.packet import arp, ethernet, icmp, icmpv6, ipv4, ipv6, stream_parser, packet, vlan from ryu.ofproto import ether from ryu.ofproto import inet try: from valve_util import btos except ImportError: from faucet.valve_util import btos IPV6_A...
true
true
1c23e921a00246d50b23fbf0cedd02d4494db141
8,641
py
Python
tests/unit/states/test_archive.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
tests/unit/states/test_archive.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
tests/unit/states/test_archive.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Alexander Schwartz <alexander.schwartz@gmx.net>` ''' # Import python libs from __future__ import absolute_import import os # Import Salt Testing libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.s...
42.99005
112
0.498322
from __future__ import absolute_import import os from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, patch ) import salt.states.archive as archive from salt.ext.six.moves import...
true
true
1c23e985f58f21331820eea166992cb75f632101
2,075
py
Python
app/dashapp/callbacks.py
chicago-array-build/chicago-array-build-ds
b5d10d22be8e1c7c0b407d82471ab126de99eb19
[ "MIT" ]
null
null
null
app/dashapp/callbacks.py
chicago-array-build/chicago-array-build-ds
b5d10d22be8e1c7c0b407d82471ab126de99eb19
[ "MIT" ]
null
null
null
app/dashapp/callbacks.py
chicago-array-build/chicago-array-build-ds
b5d10d22be8e1c7c0b407d82471ab126de99eb19
[ "MIT" ]
2
2019-05-23T15:07:15.000Z
2019-05-23T19:56:29.000Z
import pandas as pd import plotly.graph_objs as go from dash.dependencies import Input, Output from ..aot_feed import SENSOR_DF, query_aot def register_callbacks(app): @app.callback(Output('raw-value-graph', 'figure'), [Input('select-sensor-meas', 'value')]) def update_figure(selected_valu...
31.923077
68
0.460241
import pandas as pd import plotly.graph_objs as go from dash.dependencies import Input, Output from ..aot_feed import SENSOR_DF, query_aot def register_callbacks(app): @app.callback(Output('raw-value-graph', 'figure'), [Input('select-sensor-meas', 'value')]) def update_figure(selected_valu...
true
true
1c23ea4a852c5285ea2b219c0092e8c4608b00f9
4,794
py
Python
tests/contrib/hooks/test_azure_container_instance_hook.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
15
2017-04-06T09:01:50.000Z
2021-10-02T13:54:31.000Z
tests/contrib/hooks/test_azure_container_instance_hook.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
26
2019-08-05T13:44:11.000Z
2022-03-30T10:06:18.000Z
tests/contrib/hooks/test_azure_container_instance_hook.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
21
2017-08-20T03:01:05.000Z
2021-09-07T06:47:51.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
48.918367
102
0.641635
import json import unittest from mock import patch from airflow.models import Connection from airflow.contrib.hooks.azure_container_instance_hook import AzureContainerInstanceHook from airflow.utils import db from azure.mgmt.containerinstance.models import (Container, ...
true
true
1c23ea9e0236dedec527347b6f2fb639145e18d0
2,429
py
Python
models.py
anthill-gaming/promo
7f1f0fed76b08fce8778e5cedc29eb1eecda752d
[ "MIT" ]
null
null
null
models.py
anthill-gaming/promo
7f1f0fed76b08fce8778e5cedc29eb1eecda752d
[ "MIT" ]
null
null
null
models.py
anthill-gaming/promo
7f1f0fed76b08fce8778e5cedc29eb1eecda752d
[ "MIT" ]
null
null
null
# For more details, see # http://docs.sqlalchemy.org/en/latest/orm/tutorial.html#declare-a-mapping from anthill.framework.db import db from anthill.framework.utils import timezone from anthill.framework.utils.translation import translate as _ from anthill.framework.utils.asynchronous import as_future, thread_pool_exec ...
32.824324
91
0.715521
ework.db import db from anthill.framework.utils import timezone from anthill.framework.utils.translation import translate as _ from anthill.framework.utils.asynchronous import as_future, thread_pool_exec as future_exec from anthill.framework.utils.crypto import get_random_string from anthill.framework.core.validators ...
true
true
1c23eb52767cf8355431cba945961d2a157e1990
687
py
Python
adminmgr/media/code/python/red2/BD_0208_1256_1267_reducer.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/python/red2/BD_0208_1256_1267_reducer.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/python/red2/BD_0208_1256_1267_reducer.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
#!/usr/bin/python3 import sys dictionary={} for line in sys.stdin: line = line.strip() row = list(map(str,line.split(","))) extra=int(row[3]) if (row[0],row[1]) in dictionary: dictionary[(row[0],row[1])][0] = dictionary[(row[0],row[1])][0] + int(row[2])+ int(extra) dictionary[(row[0]...
27.48
97
0.577875
import sys dictionary={} for line in sys.stdin: line = line.strip() row = list(map(str,line.split(","))) extra=int(row[3]) if (row[0],row[1]) in dictionary: dictionary[(row[0],row[1])][0] = dictionary[(row[0],row[1])][0] + int(row[2])+ int(extra) dictionary[(row[0],row[1])][1] = dic...
true
true
1c23eb86167a41f7903843ebabb5130555d91077
249
py
Python
shoeapp/admin.py
Ljohns635/drf-shoe-api
73236b63e0f9604cd12722c5e335376807455541
[ "MIT" ]
null
null
null
shoeapp/admin.py
Ljohns635/drf-shoe-api
73236b63e0f9604cd12722c5e335376807455541
[ "MIT" ]
null
null
null
shoeapp/admin.py
Ljohns635/drf-shoe-api
73236b63e0f9604cd12722c5e335376807455541
[ "MIT" ]
null
null
null
from django.contrib import admin from shoeapp.models import Shoe, ShoeColor, ShoeType, Manufacturer # Register your models here. admin.site.register(Shoe) admin.site.register(ShoeType) admin.site.register(ShoeColor) admin.site.register(Manufacturer)
35.571429
66
0.831325
from django.contrib import admin from shoeapp.models import Shoe, ShoeColor, ShoeType, Manufacturer admin.site.register(Shoe) admin.site.register(ShoeType) admin.site.register(ShoeColor) admin.site.register(Manufacturer)
true
true
1c23ec469e281529b3ae7977d4a38256e1be2f60
378
py
Python
text/letter/texture/slant/_slant.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/letter/texture/slant/_slant.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
text/letter/texture/slant/_slant.py
jedhsu/text
8525b602d304ac571a629104c48703443244545c
[ "Apache-2.0" ]
null
null
null
""" *Character Slant* Describes the diagonal slant of character glyphs. """ __all__ = ["FontSlant"] class Syntax: Css = "font-style" Elisp = "font-slant" class FontSlant( Syntax, ): Normal = "Normal" Italic = "Italic" Oblique = "Oblique" Inherit = "Inherit" ReverseItalic ...
13.5
51
0.621693
__all__ = ["FontSlant"] class Syntax: Css = "font-style" Elisp = "font-slant" class FontSlant( Syntax, ): Normal = "Normal" Italic = "Italic" Oblique = "Oblique" Inherit = "Inherit" ReverseItalic = "reverse-italic" ReverseOblique = "reverse-oblique"
true
true
1c23ec4e5a7f6c9302c48f1607836abf0c91d094
767
py
Python
noxfile.py
ranguli/ioccheck
db02d921e2519b77523a200ca2d78417802463db
[ "MIT" ]
19
2021-06-10T23:50:53.000Z
2022-01-30T03:31:08.000Z
noxfile.py
ranguli/hashcheck
db02d921e2519b77523a200ca2d78417802463db
[ "MIT" ]
61
2021-03-24T02:19:13.000Z
2021-11-12T22:59:49.000Z
noxfile.py
ranguli/hashcheck
db02d921e2519b77523a200ca2d78417802463db
[ "MIT" ]
2
2021-03-27T00:13:24.000Z
2021-06-24T17:12:48.000Z
from nox_poetry import session @session(python=["3.7", "3.8", "3.9"]) def test(session): session.run( "pytest", "-vvv", "--cov-report=xml", "--cov=ioccheck", external=True, ) @session(python=["3.9"]) def lint(session): session.run("black", ".", external=True) ...
25.566667
80
0.580183
from nox_poetry import session @session(python=["3.7", "3.8", "3.9"]) def test(session): session.run( "pytest", "-vvv", "--cov-report=xml", "--cov=ioccheck", external=True, ) @session(python=["3.9"]) def lint(session): session.run("black", ".", external=True) ...
true
true
1c23ed065e2159e63bd66eac34f96910384ff7a5
1,116
py
Python
src/BribeNet/gui/classes/tooltip.py
RobMurray98/BribeNet
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
[ "MIT" ]
null
null
null
src/BribeNet/gui/classes/tooltip.py
RobMurray98/BribeNet
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
[ "MIT" ]
null
null
null
src/BribeNet/gui/classes/tooltip.py
RobMurray98/BribeNet
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
[ "MIT" ]
null
null
null
import tkinter as tk # noinspection PyUnusedLocal class ToolTip(object): """ Show a tooltip from https://stackoverflow.com/a/56749167/5539184 """ def __init__(self, widget, text): self.widget = widget self.tip_window = None self.id = None self.x = self.y = 0 ...
31
78
0.564516
import tkinter as tk class ToolTip(object): def __init__(self, widget, text): self.widget = widget self.tip_window = None self.id = None self.x = self.y = 0 self.text = text def show_tip(self, *args): if self.tip_window is not None or not self.text: ...
true
true
1c23ed2f78c5e19fa5570b64e23e571d6c69ec20
3,268
py
Python
hard-gists/5237007/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/5237007/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/5237007/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
#!/usr/bin/env python # coding:utf-8 import _env from time import time from urllib import urlencode from urllib2 import urlopen as urlopen2 from urlparse import parse_qsl from hashlib import md5 from urlgrabber import urlopen import errno from json import loads import socket import time import datetime import httplib f...
29.178571
131
0.511628
import _env from time import time from urllib import urlencode from urllib2 import urlopen as urlopen2 from urlparse import parse_qsl from hashlib import md5 from urlgrabber import urlopen import errno from json import loads import socket import time import datetime import httplib from zapp.SSO.config import OAUTH d...
false
true
1c23ee4b40f20335dc654d48a6f30d957badf908
1,357
py
Python
leetcode/004-median-of-two-sorted-array/solution.py
dantin/poj
812859a982da666daecedbb1197afed21485a432
[ "BSD-3-Clause" ]
null
null
null
leetcode/004-median-of-two-sorted-array/solution.py
dantin/poj
812859a982da666daecedbb1197afed21485a432
[ "BSD-3-Clause" ]
null
null
null
leetcode/004-median-of-two-sorted-array/solution.py
dantin/poj
812859a982da666daecedbb1197afed21485a432
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- class Solution: def findMedianSortedArrays(self, nums1, nums2) -> float: half = (len(nums1) + len(nums2)) // 2 if (len(nums1) + len(nums2)) & 0x1 == 0: lhs = find_kth(nums1, nums2, half) rhs = find_kth(nums1, nums2, half + 1) return (lhs +...
27.14
79
0.520265
class Solution: def findMedianSortedArrays(self, nums1, nums2) -> float: half = (len(nums1) + len(nums2)) // 2 if (len(nums1) + len(nums2)) & 0x1 == 0: lhs = find_kth(nums1, nums2, half) rhs = find_kth(nums1, nums2, half + 1) return (lhs + rhs) / 2 else:...
true
true
1c23ef9d2e84effb7501e209da7dd35cf6a72693
8,168
py
Python
docs/conf.py
marcofucci/feincms-bounds
2609a713e148f49e5fd426b3d92a38f9429cd515
[ "BSD-3-Clause" ]
1
2016-10-04T23:11:56.000Z
2016-10-04T23:11:56.000Z
docs/conf.py
marcofucci/feincms-bounds
2609a713e148f49e5fd426b3d92a38f9429cd515
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
marcofucci/feincms-bounds
2609a713e148f49e5fd426b3d92a38f9429cd515
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
32.031373
80
0.718413
import sys, os cwd = os.getcwd() parent = os.path.dirname(cwd) sys.path.append(parent) import feincms_bounds extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'feincms-bounds' copyright...
true
true
1c23eff6b911f657a218d10442995737dfc8f6f5
14,037
py
Python
pter/utils.py
danielk333/pter
50e2eee5436abe0cf566b1dcebf5279bdca931b2
[ "MIT" ]
null
null
null
pter/utils.py
danielk333/pter
50e2eee5436abe0cf566b1dcebf5279bdca931b2
[ "MIT" ]
null
null
null
pter/utils.py
danielk333/pter
50e2eee5436abe0cf566b1dcebf5279bdca931b2
[ "MIT" ]
null
null
null
import datetime import string import re import webbrowser import pathlib import urllib.parse import subprocess import sys import os from pytodotxt import Task, TodoTxt from pter import common from pter.searcher import get_relative_date from pter.source import Source DATETIME_FMT = '%Y-%m-%d-%H-%M-%S' FORMAT_TOKEN_R...
28.882716
109
0.555603
import datetime import string import re import webbrowser import pathlib import urllib.parse import subprocess import sys import os from pytodotxt import Task, TodoTxt from pter import common from pter.searcher import get_relative_date from pter.source import Source DATETIME_FMT = '%Y-%m-%d-%H-%M-%S' FORMAT_TOKEN_R...
true
true
1c23f0e29ee25f7cc1aba2dc0b911c9e91aa18fb
4,478
py
Python
NN_extended_32/perf_on_all_df.py
Big-Fuzz/AS-MT
85e24feb39608136429843ea02313e628225d72e
[ "MIT" ]
null
null
null
NN_extended_32/perf_on_all_df.py
Big-Fuzz/AS-MT
85e24feb39608136429843ea02313e628225d72e
[ "MIT" ]
null
null
null
NN_extended_32/perf_on_all_df.py
Big-Fuzz/AS-MT
85e24feb39608136429843ea02313e628225d72e
[ "MIT" ]
null
null
null
from utils_tf2 import * import numpy as np import tensorflow as tf import math import pickle import pandas as pd tf.compat.v1.disable_eager_execution() tf.compat.v1.reset_default_graph() # to be able to rerun the model without overwriting tf variables #################################################...
40.342342
229
0.627736
from utils_tf2 import * import numpy as np import tensorflow as tf import math import pickle import pandas as pd tf.compat.v1.disable_eager_execution() tf.compat.v1.reset_default_graph()
true
true
1c23f141436cc41bf4f851f45e0b82edb8b4174a
584
py
Python
modules/get_key.py
FalseG0d/UIPersonalization
23bd35b51688bd8dfae0e389c5642250e2a835b6
[ "MIT" ]
null
null
null
modules/get_key.py
FalseG0d/UIPersonalization
23bd35b51688bd8dfae0e389c5642250e2a835b6
[ "MIT" ]
null
null
null
modules/get_key.py
FalseG0d/UIPersonalization
23bd35b51688bd8dfae0e389c5642250e2a835b6
[ "MIT" ]
7
2020-12-13T15:11:15.000Z
2020-12-17T13:08:23.000Z
from .facecv import FaceCV,get_args from .fuzzy import findClosest from keras import backend as K def get_key(): #Face Recognition args = get_args() depth = args.depth width = args.width face = FaceCV(depth=depth, width=width) #Predicting Age and Gender #K.clear_session() predicted_age...
25.391304
60
0.710616
from .facecv import FaceCV,get_args from .fuzzy import findClosest from keras import backend as K def get_key(): args = get_args() depth = args.depth width = args.width face = FaceCV(depth=depth, width=width) predicted_ages,predicted_genders=face.detect_face() if predicted...
true
true
1c23f188fb73f286e282967c9e1b91aa58229e27
75
py
Python
Data structures/Lists introduction/lists.py
fsierra2000/Python
19c3f52797b366019794ea75508d7317ef492ed5
[ "MIT" ]
null
null
null
Data structures/Lists introduction/lists.py
fsierra2000/Python
19c3f52797b366019794ea75508d7317ef492ed5
[ "MIT" ]
null
null
null
Data structures/Lists introduction/lists.py
fsierra2000/Python
19c3f52797b366019794ea75508d7317ef492ed5
[ "MIT" ]
null
null
null
squares = [1, 4, 9, 16, 25] # Create new list print(squares) print(???)
15
47
0.586667
squares = [1, 4, 9, 16, 25] print(squares) print(???)
false
true
1c23f1b2a46bb78d16bf00b7b98e92967a350f75
1,392
py
Python
src/psiz/trials/experimental/unravel_timestep.py
greenfieldvision/psiz
37068530a78e08792e827ee55cf55e627add115e
[ "Apache-2.0" ]
21
2020-04-03T21:10:05.000Z
2021-12-02T01:31:11.000Z
src/psiz/trials/experimental/unravel_timestep.py
greenfieldvision/psiz
37068530a78e08792e827ee55cf55e627add115e
[ "Apache-2.0" ]
14
2020-04-10T00:48:02.000Z
2021-05-25T18:06:55.000Z
psiz/trials/experimental/unravel_timestep.py
rgerkin/psiz
d540738462b6436a08a472d5e349ca2b813e6d47
[ "Apache-2.0" ]
4
2020-10-13T16:46:14.000Z
2021-11-10T00:08:47.000Z
# -*- coding: utf-8 -*- # Copyright 2020 The PsiZ 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 r...
30.26087
78
0.646552
import numpy as np def unravel_timestep(x): x_shape = x.shape n_sequence = x_shape[0] max_timestep = x_shape[1] new_shape = np.hstack( ([n_sequence * max_timestep], x_shape[2:]) ).astype(dtype=int) return np.reshape(x, new_shape)
true
true
1c23f351060269c35e5cd2e6bf9c6e694f7d7cfc
3,737
py
Python
Demo/Demo.py
liudonghua/pyFormUI
b4ad31d86af792aabe7831c7efb899d4c4649938
[ "MIT" ]
13
2017-03-11T02:02:34.000Z
2021-09-28T20:49:57.000Z
Demo/Demo.py
androidfm/pyFormUI
b4ad31d86af792aabe7831c7efb899d4c4649938
[ "MIT" ]
null
null
null
Demo/Demo.py
androidfm/pyFormUI
b4ad31d86af792aabe7831c7efb899d4c4649938
[ "MIT" ]
6
2017-03-13T11:36:00.000Z
2020-08-16T14:15:16.000Z
#!/usr/bin/env python ## Copyright 2012, En7788.com, Inc. All rights reserved. ## ## FormUI is a easy used GUI framwork for python, which is based on wxpython. ## FormUI is a free software: you can redistribute it and/or modify it under ## the terms of version 3 of the GNU Lesser General Public License as ## published ...
34.284404
77
0.740166
er('id_ok', OkButtonHandler) def cancelButtonHandler(windowHandler, handlerPara): windowHandler.closeWindow() builder.setCtrlHandler('id_cancel', cancelButtonHandler) def button_handler(windowHandler, handlerPara): builder.setCtrlAttribute('id_text', 'value', 'update builder') w...
false
true
1c23f3a34a0d25f9fe74f26448209453ebddb79c
3,846
py
Python
python/ann_minst.py
mathcoding/Programmazione2
09a22ada68fad0797b14cd4776d05bf8a5613e39
[ "MIT" ]
7
2017-03-14T22:58:03.000Z
2022-01-06T06:22:47.000Z
python/ann_minst.py
mathcoding/Programmazione2
09a22ada68fad0797b14cd4776d05bf8a5613e39
[ "MIT" ]
null
null
null
python/ann_minst.py
mathcoding/Programmazione2
09a22ada68fad0797b14cd4776d05bf8a5613e39
[ "MIT" ]
12
2017-03-09T15:49:55.000Z
2020-02-09T22:39:49.000Z
# -*- coding: utf-8 -*- """ Created on Mon May 1 16:43:05 2017 @author: gualandi """ import time import csv import numpy as np from numpy import genfromtxt from matplotlib import plt from sklearn.neural_network import MLPClassifier from sklearn.metrics import accuracy_score def DrawDigit(A, label=''): """ Dra...
30.046875
96
0.615705
import time import csv import numpy as np from numpy import genfromtxt from matplotlib import plt from sklearn.neural_network import MLPClassifier from sklearn.metrics import accuracy_score def DrawDigit(A, label=''): fig = plt.figure(figsize=(6,6)) img = plt.imshow(A, cmap='gray_r') plt.xlabel(la...
true
true
1c23f43f65774d6f7a52e0821b1b88fe6b0673a2
3,623
py
Python
scanner/plugins/cms/inspur/inspur_multi_sqli.py
UgOrange/onlinetools
06205282965395e37fb3a7fed806682196ad9ccc
[ "MIT" ]
1,207
2018-01-31T06:36:34.000Z
2022-03-31T07:35:35.000Z
scanner/plugins/cms/inspur/inspur_multi_sqli.py
UgOrange/onlinetools
06205282965395e37fb3a7fed806682196ad9ccc
[ "MIT" ]
21
2018-07-30T03:01:49.000Z
2022-03-28T08:20:39.000Z
scanner/plugins/cms/inspur/inspur_multi_sqli.py
UgOrange/onlinetools
06205282965395e37fb3a7fed806682196ad9ccc
[ "MIT" ]
310
2018-02-22T01:23:20.000Z
2022-03-28T08:51:37.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' name: 浪潮行政审批系统十八处注入 referer: http://www.wooyun.org/bugs/wooyun-2015-0128477 author: Lucifer description: 多处注入。 ''' import sys import requests class inspur_multi_sqli_BaseVerify: def __init__(self, url): self.url = url def run(self): headers =...
68.358491
204
0.620204
import sys import requests class inspur_multi_sqli_BaseVerify: def __init__(self, url): self.url = url def run(self): headers = { "User-Agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50" ...
true
true
1c23f4ef46140b6d94f696fb3c8db99288ea50a8
561
py
Python
papermerge/core/serializers/node.py
papermerge/papermerge-core
e377441a8e5ddb748fa3861f686fa22c00d407fe
[ "Apache-2.0" ]
45
2021-01-10T14:33:52.000Z
2022-03-27T14:02:56.000Z
papermerge/core/serializers/node.py
papermerge/papermerge-core
e377441a8e5ddb748fa3861f686fa22c00d407fe
[ "Apache-2.0" ]
8
2021-01-08T20:02:21.000Z
2022-02-01T13:12:24.000Z
papermerge/core/serializers/node.py
papermerge/papermerge-core
e377441a8e5ddb748fa3861f686fa22c00d407fe
[ "Apache-2.0" ]
12
2021-01-07T20:03:07.000Z
2022-03-24T04:07:51.000Z
from rest_framework_json_api import serializers from papermerge.core.models import BaseTreeNode from papermerge.core.serializers import ( FolderSerializer, DocumentSerializer ) class NodeSerializer(serializers.PolymorphicModelSerializer): polymorphic_serializers = [ FolderSerializer, Docu...
21.576923
61
0.625668
from rest_framework_json_api import serializers from papermerge.core.models import BaseTreeNode from papermerge.core.serializers import ( FolderSerializer, DocumentSerializer ) class NodeSerializer(serializers.PolymorphicModelSerializer): polymorphic_serializers = [ FolderSerializer, Docu...
true
true
1c23f5ea5f1138f36c38382c18a4cb1f75f178f8
7,826
py
Python
ament_package/package.py
Acidburn0zzz/ament_package
8746846857872e74e1174f610ea3aacb1198ce6e
[ "Apache-2.0" ]
1
2018-01-17T19:18:10.000Z
2018-01-17T19:18:10.000Z
ament_package/package.py
Acidburn0zzz/ament_package
8746846857872e74e1174f610ea3aacb1198ce6e
[ "Apache-2.0" ]
null
null
null
ament_package/package.py
Acidburn0zzz/ament_package
8746846857872e74e1174f610ea3aacb1198ce6e
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
35.899083
94
0.568873
from copy import deepcopy import re from .exceptions import InvalidPackage class Package: __slots__ = [ 'package_format', 'name', 'version', 'version_compatibility', 'description', 'maintainers', 'licenses', 'urls', 'authors',...
true
true
1c23f72fd34bbd64a32cf2dfbf3549fe3b24d910
1,478
py
Python
cogs/benutzerinfo.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
1
2021-04-21T09:01:26.000Z
2021-04-21T09:01:26.000Z
cogs/benutzerinfo.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
null
null
null
cogs/benutzerinfo.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
null
null
null
from discord.ext import commands import discord class Benutzerinfo(commands.Cog): def __init__(self, client): self.client = client @commands.command(name="benutzerinfo") async def benutzerinfo_command(self, ctx, member: discord.Member): embed = discord.Embed(title='Benutzerinfo für {}'.fo...
39.945946
90
0.579838
from discord.ext import commands import discord class Benutzerinfo(commands.Cog): def __init__(self, client): self.client = client @commands.command(name="benutzerinfo") async def benutzerinfo_command(self, ctx, member: discord.Member): embed = discord.Embed(title='Benutzerinfo für {}'.fo...
true
true
1c23f745a4e2aee6db6475a56bca5c36d9a76421
198
py
Python
eahub/profiles/apps.py
walambert/eahub.org
21b6111b2626e4739c249d0881d16fbc818094cb
[ "MIT" ]
36
2019-02-22T23:07:14.000Z
2022-02-10T13:24:27.000Z
eahub/profiles/apps.py
walambert/eahub.org
21b6111b2626e4739c249d0881d16fbc818094cb
[ "MIT" ]
717
2019-02-21T22:07:55.000Z
2022-02-26T15:17:49.000Z
eahub/profiles/apps.py
walambert/eahub.org
21b6111b2626e4739c249d0881d16fbc818094cb
[ "MIT" ]
19
2019-04-14T14:37:56.000Z
2022-02-14T22:05:16.000Z
from django import apps class ProfilesConfig(apps.AppConfig): name = "eahub.profiles" verbose_name = "Profiles" def ready(self): import eahub.profiles.receivers # noqa: F401
19.8
53
0.691919
from django import apps class ProfilesConfig(apps.AppConfig): name = "eahub.profiles" verbose_name = "Profiles" def ready(self): import eahub.profiles.receivers
true
true
1c23f7b3caa5cef9b193467b7b95bfdcc30c8781
4,301
py
Python
ibbd_python3_tools/chinese_fuzzy_match.py
ibbd-dev/python3-tools
7a7676a7a11e2c7c0d73486594c9352f113c9ce0
[ "MIT" ]
2
2020-01-19T01:43:48.000Z
2021-06-28T11:36:19.000Z
ibbd_python3_tools/chinese_fuzzy_match.py
ibbd-dev/python3-tools
7a7676a7a11e2c7c0d73486594c9352f113c9ce0
[ "MIT" ]
null
null
null
ibbd_python3_tools/chinese_fuzzy_match.py
ibbd-dev/python3-tools
7a7676a7a11e2c7c0d73486594c9352f113c9ce0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # 中文模糊匹配 # Author: alex # Created Time: 2019年03月14日 星期四 09时54分14秒 import re from enum import Enum from pypinyin import lazy_pinyin # 拼音的分隔符 py_space = "\\s|\\.|\\,|\\!|\\?|。|,|!|?" # 模糊匹配配置 fuzzy_start = [ ('sh', 'ch', 'zh'), ('s', 'c', 'z'), ] fuzzy_end = [ ('ang', 'eng', 'ing')...
26.066667
77
0.549407
import re from enum import Enum from pypinyin import lazy_pinyin py_space = "\\s|\\.|\\,|\\!|\\?|。|,|!|?" fuzzy_start = [ ('sh', 'ch', 'zh'), ('s', 'c', 'z'), ] fuzzy_end = [ ('ang', 'eng', 'ing'), ('an', 'en', 'in'), ] class MatchType(str, Enum): Full = 'full' Pinyin = 'pinyin' F...
true
true
1c23f7bdf0d7577e4fa5071992a625d5fff37630
13,706
py
Python
{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/settings/base.py
sebastiangithub94/coockietest
f993f39e5d9db5c775a2f8ed047ea7792cf8944e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/settings/base.py
sebastiangithub94/coockietest
f993f39e5d9db5c775a2f8ed047ea7792cf8944e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/settings/base.py
sebastiangithub94/coockietest
f993f39e5d9db5c775a2f8ed047ea7792cf8944e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
""" Django settings for {{ cookiecutter.project_name }} project. """ from os import environ, getenv from os.path import abspath, basename, dirname, join, normpath from sys import path ########## PATH CONFIGURATION BASE_DIR = dirname(dirname(__file__) + "../../../") # Absolute filesystem path to the config directory:...
31.508046
128
0.632059
""" Django settings for {{ cookiecutter.project_name }} project. """ from os import environ, getenv from os.path import abspath, basename, dirname, join, normpath from sys import path ROOT).capitalize() PROJECT_FOLDER = basename(PROJECT_ROOT) PROJECT_DOMAIN = '%s.com' % PROJECT_NAME.lower() # name in our dotted...
false
true
1c23f87dfdd0811fae118b783edc8c2f4895cc42
120
py
Python
dai11shou/code11-1.py
naoshige314/workshop01
5c7be08f99eb164b7901628de26cecfd04fa926f
[ "MIT" ]
null
null
null
dai11shou/code11-1.py
naoshige314/workshop01
5c7be08f99eb164b7901628de26cecfd04fa926f
[ "MIT" ]
null
null
null
dai11shou/code11-1.py
naoshige314/workshop01
5c7be08f99eb164b7901628de26cecfd04fa926f
[ "MIT" ]
2
2021-06-10T11:53:02.000Z
2021-06-20T15:43:39.000Z
#Union-Find,経路圧縮の工夫無しの場合の根の取得 def root(x): if par[x] == -1: return x else: return root(par[x])
15
29
0.55
def root(x): if par[x] == -1: return x else: return root(par[x])
true
true
1c23f972685cb722cc70e621e8f20e88eafc8774
2,231
py
Python
amcrest2mqtt/camera.py
acshef/amcrest2mqtt
162d0cde732dcc3e9590a14681f89e8d328a5723
[ "MIT" ]
null
null
null
amcrest2mqtt/camera.py
acshef/amcrest2mqtt
162d0cde732dcc3e9590a14681f89e8d328a5723
[ "MIT" ]
null
null
null
amcrest2mqtt/camera.py
acshef/amcrest2mqtt
162d0cde732dcc3e9590a14681f89e8d328a5723
[ "MIT" ]
null
null
null
import typing as t from amcrest import AmcrestCamera, AmcrestError from .const import * from .device import Device __all__ = ["Camera", "AmcrestError"] _T = t.TypeVar("_T") class Camera: """ Wrapper for amcrest.AmcrestCamera().camera, which is an instance of amcrest.ApiWrapper() """ def __init_...
31.422535
97
0.608696
import typing as t from amcrest import AmcrestCamera, AmcrestError from .const import * from .device import Device __all__ = ["Camera", "AmcrestError"] _T = t.TypeVar("_T") class Camera: def __init__( self, host: str, port: int, username: str, password: str, ...
true
true
1c23fa883fea423758110c414c292884c2e06038
1,726
py
Python
pythonic_reactive/defs.py
flipcoder/pythonic-reactive
9a9fbcc4d45ffedcbab71aec3fc7bb460c957bbd
[ "MIT" ]
1
2020-12-28T21:18:02.000Z
2020-12-28T21:18:02.000Z
pythonic_reactive/defs.py
flipcoder/pythonic-reactive
9a9fbcc4d45ffedcbab71aec3fc7bb460c957bbd
[ "MIT" ]
null
null
null
pythonic_reactive/defs.py
flipcoder/pythonic-reactive
9a9fbcc4d45ffedcbab71aec3fc7bb460c957bbd
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import webcolors import glm EPSILON = 0.0001 def map_range(val, r1, r2): return (val - r1[0]) / (r1[1] - r1[0]) * (r2[1] - r2[0]) + r2[0] class Color(glm.vec4): def __init__(self, *args, **kwargs): if args: v = args[0] try: a = args[1] ...
31.381818
68
0.407879
import webcolors import glm EPSILON = 0.0001 def map_range(val, r1, r2): return (val - r1[0]) / (r1[1] - r1[0]) * (r2[1] - r2[0]) + r2[0] class Color(glm.vec4): def __init__(self, *args, **kwargs): if args: v = args[0] try: a = args[1] except Index...
true
true
1c23fc1ad944d1e035c89bfb519bf099fc04d9de
568
py
Python
examples/simultaneous_translation/eval/agents/__init__.py
iwamotoyuji/fairseq-nlc
5e82514d687289a73a6dec33b555217acd97cb0d
[ "MIT" ]
23
2020-11-20T12:52:20.000Z
2022-02-28T06:21:01.000Z
examples/simultaneous_translation/eval/agents/__init__.py
iwamotoyuji/fairseq-nlc
5e82514d687289a73a6dec33b555217acd97cb0d
[ "MIT" ]
2
2020-10-17T05:25:59.000Z
2021-01-13T10:23:43.000Z
examples/simultaneous_translation/eval/agents/__init__.py
iwamotoyuji/fairseq-nlc
5e82514d687289a73a6dec33b555217acd97cb0d
[ "MIT" ]
15
2020-11-16T15:33:46.000Z
2022-03-08T12:40:19.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import importlib import os from fairseq import registry build_agent, register_agent, MONOTONIC_AGENT, _ = registry.setup_registry('--agent-ty...
27.047619
89
0.713028
import importlib import os from fairseq import registry build_agent, register_agent, MONOTONIC_AGENT, _ = registry.setup_registry('--agent-type') DEFAULT_EOS = '</s>' GET = 0 SEND = 1 for file in os.listdir(os.path.dirname(__file__)): if file.endswith('.py') and not file.startswith('_'): module = f...
true
true
1c23fd46f014e69ed5c9d10b8eda7be0dd28c860
24,204
py
Python
sunpy/net/attr.py
Octaves0911/sunpy
d3dff03fe6cc404e40f22da90200ffbb3d38c1a7
[ "BSD-2-Clause" ]
null
null
null
sunpy/net/attr.py
Octaves0911/sunpy
d3dff03fe6cc404e40f22da90200ffbb3d38c1a7
[ "BSD-2-Clause" ]
null
null
null
sunpy/net/attr.py
Octaves0911/sunpy
d3dff03fe6cc404e40f22da90200ffbb3d38c1a7
[ "BSD-2-Clause" ]
null
null
null
""" Allow representation of queries as logic expressions. This module makes sure that attributes that are combined using the two logic operations AND (&) and OR (|) always are in disjunctive normal form, that is, there are only two levels ­- the first being disjunction and the second being conjunction. In other words, ...
34.825899
114
0.607255
import re import string import inspect import keyword import textwrap from textwrap import dedent from collections import namedtuple, defaultdict from astropy.table import Table from astropy.utils.misc import isiterable from sunpy.extern import inflect from sunpy.util.functools import seconddispatch from sunpy.util.u...
true
true
1c23fd8d673e6f74db8de3c21191c2f232f499f5
252
py
Python
APIserver/qzone.py
trialley/Tworld
8d4f9b806e490cf76b940190e157d105f928cdf1
[ "MIT" ]
null
null
null
APIserver/qzone.py
trialley/Tworld
8d4f9b806e490cf76b940190e157d105f928cdf1
[ "MIT" ]
null
null
null
APIserver/qzone.py
trialley/Tworld
8d4f9b806e490cf76b940190e157d105f928cdf1
[ "MIT" ]
null
null
null
from flask import Flask, redirect, url_for, request def add_qzone_routes(app): @app.route("/qzone", methods=['GET']) def getqzone(): return 'test' @app.route("/qzone", methods=['POST']) def postqzone(): return 'test'
21
51
0.611111
from flask import Flask, redirect, url_for, request def add_qzone_routes(app): @app.route("/qzone", methods=['GET']) def getqzone(): return 'test' @app.route("/qzone", methods=['POST']) def postqzone(): return 'test'
true
true
1c23fe518b346027543d70effa37bdddcbad8dbc
3,128
py
Python
tests/unittests/test_traditional.py
SaizhuoWang/carefree-learn
3bf7b00286cdef556cc00fa2fcba5c390b5b9d20
[ "MIT" ]
null
null
null
tests/unittests/test_traditional.py
SaizhuoWang/carefree-learn
3bf7b00286cdef556cc00fa2fcba5c390b5b9d20
[ "MIT" ]
null
null
null
tests/unittests/test_traditional.py
SaizhuoWang/carefree-learn
3bf7b00286cdef556cc00fa2fcba5c390b5b9d20
[ "MIT" ]
null
null
null
import cflearn import unittest import numpy as np from typing import Any from typing import Tuple from sklearn.naive_bayes import GaussianNB from sklearn.naive_bayes import MultinomialNB from cftool.ml import ModelPattern from cftool.misc import timestamp from cfdata.tabular import TabularDataset from sklearn.tree im...
35.146067
88
0.621164
import cflearn import unittest import numpy as np from typing import Any from typing import Tuple from sklearn.naive_bayes import GaussianNB from sklearn.naive_bayes import MultinomialNB from cftool.ml import ModelPattern from cftool.misc import timestamp from cfdata.tabular import TabularDataset from sklearn.tree im...
true
true
1c23fe5b6f62b8c555dd16273e10855fa8ce5b02
2,600
py
Python
frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.core.doctype.report.report import is_prepared_report_disabled from frappe.model.document import Document class RolePe...
27.956989
90
0.73
from __future__ import unicode_literals import frappe from frappe.core.doctype.report.report import is_prepared_report_disabled from frappe.model.document import Document class RolePermissionforPageandReport(Document): @frappe.whitelist() def set_report_page_data(self): self.set_custom_roles() self.check_p...
true
true
1c23ff3886d6b19c75ecd7a21358de07f18b96b0
462
py
Python
test.py
mimidbe/kitronik-motor-driver-5620-in-python
ffba54064dff622ffc01c299f0a893f831eded7b
[ "MIT" ]
null
null
null
test.py
mimidbe/kitronik-motor-driver-5620-in-python
ffba54064dff622ffc01c299f0a893f831eded7b
[ "MIT" ]
null
null
null
test.py
mimidbe/kitronik-motor-driver-5620-in-python
ffba54064dff622ffc01c299f0a893f831eded7b
[ "MIT" ]
null
null
null
from microbit import * from kitronik_motor_driver import * theBoard = KMotor() while True: if button_a.is_pressed(): theBoard.motorOn("motor 1", "forward", 10) theBoard.motorOn("motor 2", "reverse", 100) elif button_b.is_pressed(): theBoard.motorOff("motor 1") theBoard...
27.176471
52
0.612554
from microbit import * from kitronik_motor_driver import * theBoard = KMotor() while True: if button_a.is_pressed(): theBoard.motorOn("motor 1", "forward", 10) theBoard.motorOn("motor 2", "reverse", 100) elif button_b.is_pressed(): theBoard.motorOff("motor 1") theBoard...
false
true
1c23ff65cd40a599044823aa3fc408dc511a268b
7,991
py
Python
Use.py
IngeniousCoder/CPU-Monitor
d44e64b73c5723764f412ff8b7dafda9cfc29dbe
[ "MIT" ]
2
2018-12-21T01:10:02.000Z
2019-03-04T02:24:35.000Z
Use.py
IngeniousCoder/CPU-Monitor
d44e64b73c5723764f412ff8b7dafda9cfc29dbe
[ "MIT" ]
null
null
null
Use.py
IngeniousCoder/CPU-Monitor
d44e64b73c5723764f412ff8b7dafda9cfc29dbe
[ "MIT" ]
null
null
null
import os print("Loading Dependencies") os.system("pip install -U git+https://github.com/Rapptz/discord.py@rewrite") os.system("pip install ast") os.system("pip install matplotlib") os.system("pip install numpy") os.system("cls") print("Dependencies Loaded.") import discord from discord.ext import commands...
29.164234
113
0.554249
import os print("Loading Dependencies") os.system("pip install -U git+https://github.com/Rapptz/discord.py@rewrite") os.system("pip install ast") os.system("pip install matplotlib") os.system("pip install numpy") os.system("cls") print("Dependencies Loaded.") import discord from discord.ext import commands...
true
true
1c240099c23305383ddf39081f66a6ec62e3e05c
616
py
Python
python/examples/command_line_arguments.py
andrewguest/code-snippets
cb4bb8c2cf651cd86e3280348e4a4cfb88ad0127
[ "MIT" ]
1
2020-09-13T01:40:19.000Z
2020-09-13T01:40:19.000Z
python/examples/command_line_arguments.py
andrewguest/code-snippets
cb4bb8c2cf651cd86e3280348e4a4cfb88ad0127
[ "MIT" ]
6
2020-11-16T04:11:37.000Z
2021-07-05T01:39:58.000Z
python/examples/command_line_arguments.py
andrewguest/code-snippets
cb4bb8c2cf651cd86e3280348e4a4cfb88ad0127
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Module for parsing arguments import argparse parser = argparse.ArgumentParser() # Add an argument and save it in a variable named "src_dir" # Also add description for -h (help) option parser.add_argument("src_dir", help = "Directory to backup") # Add an argument and save it in a vari...
29.333333
66
0.725649
import argparse parser = argparse.ArgumentParser() parser.add_argument("src_dir", help = "Directory to backup") parser.add_argument("dst_dir", help = "Location to store backup") args = parser.parse_args() print("Source:", args.src_dir) print("Destination:", args.dst_dir)
true
true
1c2400bd7d390a1eca99069c1a93eaebd24a5b19
1,233
py
Python
apps/security/src/security/views.py
Ile2/hue
8739e678e1294037f040c10d74022af2f1820bab
[ "Apache-2.0" ]
null
null
null
apps/security/src/security/views.py
Ile2/hue
8739e678e1294037f040c10d74022af2f1820bab
[ "Apache-2.0" ]
null
null
null
apps/security/src/security/views.py
Ile2/hue
8739e678e1294037f040c10d74022af2f1820bab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
32.447368
74
0.733982
import json from beeswax.api import autocomplete from desktop.lib.django_util import render def hive(request): assist = autocomplete(request, database=None, table=None) return render("hive.mako", request, { 'assist': assist, 'initial': json.dumps({'user': request.user.username}), ...
true
true
1c24010c569ef00c19a05e6bdd3865f1af89946a
1,257
py
Python
sailor/pai/utils.py
gecko17/project-sailor
7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7
[ "Apache-2.0" ]
null
null
null
sailor/pai/utils.py
gecko17/project-sailor
7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7
[ "Apache-2.0" ]
null
null
null
sailor/pai/utils.py
gecko17/project-sailor
7a35eeec2a6a8ec9bc998e39e8ffad4703cec5d7
[ "Apache-2.0" ]
null
null
null
"""Module for various utility functions, in particular those related to fetching data from remote oauth endpoints.""" from sailor import _base from ..utils.config import SailorConfig def _pai_fetch_data(endpoint_url, unbreakable_filters=(), breakable_filters=()): return _base.fetch_data('predictive_asset_insigh...
31.425
117
0.746221
from sailor import _base from ..utils.config import SailorConfig def _pai_fetch_data(endpoint_url, unbreakable_filters=(), breakable_filters=()): return _base.fetch_data('predictive_asset_insights', _pai_response_handler, endpoint_url, unbreakable_filters, breakable_filters) def _p...
true
true