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
f75f32172fae7ccb04fc2d0007736314c616a2a0
7,165
py
Python
aiokubernetes/models/extensions_v1beta1_pod_security_policy.py
tantioch/aiokubernetes
2f332498598ece14d22f8e59ecb02665db6db68d
[ "Apache-2.0" ]
24
2018-07-07T15:12:19.000Z
2021-09-01T07:33:11.000Z
aiokubernetes/models/extensions_v1beta1_pod_security_policy.py
revoteon/aiokubernetes
730eae03e4779563740f07ad3ecef180b511ac18
[ "Apache-2.0" ]
5
2018-07-11T00:09:17.000Z
2018-10-22T16:41:54.000Z
aiokubernetes/models/extensions_v1beta1_pod_security_policy.py
revoteon/aiokubernetes
730eae03e4779563740f07ad3ecef180b511ac18
[ "Apache-2.0" ]
3
2018-07-10T10:16:57.000Z
2018-10-20T19:32:05.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.10.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 from aio...
35.646766
295
0.646057
import pprint import re from aiokubernetes.models.extensions_v1beta1_pod_security_policy_spec import ExtensionsV1beta1PodSecurityPolicySpec from aiokubernetes.models.v1_object_meta import V1ObjectMeta class ExtensionsV1beta1PodSecurityPolicy(object): swagger_types = { 'api_version': 'str', ...
true
true
f75f3235f8f43de42a5519409a46672293a8f9bb
1,674
py
Python
tests/test_utils.py
deejay1/aiozipkin
f2d88f66097eeec703f134c4cbe21a46a3fef020
[ "Apache-2.0" ]
null
null
null
tests/test_utils.py
deejay1/aiozipkin
f2d88f66097eeec703f134c4cbe21a46a3fef020
[ "Apache-2.0" ]
null
null
null
tests/test_utils.py
deejay1/aiozipkin
f2d88f66097eeec703f134c4cbe21a46a3fef020
[ "Apache-2.0" ]
null
null
null
import sys from unittest import mock from aiozipkin import utils @mock.patch('aiozipkin.utils.binascii.hexlify', autospec=True) def test_generate_random_64bit_string(rand): rand.return_value = b'17133d482ba4f605' random_string = utils.generate_random_64bit_string() assert random_string == '17133d482ba4f6...
37.2
78
0.74552
import sys from unittest import mock from aiozipkin import utils @mock.patch('aiozipkin.utils.binascii.hexlify', autospec=True) def test_generate_random_64bit_string(rand): rand.return_value = b'17133d482ba4f605' random_string = utils.generate_random_64bit_string() assert random_string == '17133d482ba4f6...
true
true
f75f3530114c715effeacd8d78fc7c9001700d46
4,332
py
Python
aioxmlrpc/client.py
citronneur/aioxmlrpc
dd97ffa3f51f22847bf932e7fd8382ec82a74818
[ "BSD-3-Clause" ]
2
2020-04-18T13:28:06.000Z
2021-03-26T18:55:39.000Z
aioxmlrpc/client.py
citronneur/aioxmlrpc
dd97ffa3f51f22847bf932e7fd8382ec82a74818
[ "BSD-3-Clause" ]
null
null
null
aioxmlrpc/client.py
citronneur/aioxmlrpc
dd97ffa3f51f22847bf932e7fd8382ec82a74818
[ "BSD-3-Clause" ]
null
null
null
""" XML-RPC Client with asyncio. This module adapt the ``xmlrpc.client`` module of the standard library to work with asyncio. """ import asyncio import logging from xmlrpc import client as xmlrpc import aiohttp __ALL__ = ['ServerProxy', 'Fault', 'ProtocolError'] # you don't have to import xmlrpc.client from your...
30.293706
84
0.593029
import asyncio import logging from xmlrpc import client as xmlrpc import aiohttp __ALL__ = ['ServerProxy', 'Fault', 'ProtocolError'] Fault = xmlrpc.Fault ProtocolError = xmlrpc.ProtocolError log = logging.getLogger(__name__) class _Method: # some magic to bind an XML-RPC method to an RPC server. # suppo...
true
true
f75f3602e27f342e73042a32bc9daa339e6270e7
32,632
py
Python
scripts/redirect.py
luzpaz/pywikibot
c2f1a2b7a972389d01be4fd0c76cb0677be8011a
[ "MIT" ]
null
null
null
scripts/redirect.py
luzpaz/pywikibot
c2f1a2b7a972389d01be4fd0c76cb0677be8011a
[ "MIT" ]
null
null
null
scripts/redirect.py
luzpaz/pywikibot
c2f1a2b7a972389d01be4fd0c76cb0677be8011a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to resolve double redirects, and to delete broken redirects. Requires access to MediaWiki's maintenance pages or to a XML dump file. Delete function requires adminship. Syntax: python pwb.py redirect action [-arguments ...] where action can be one of these: ...
42.324254
78
0.524424
from __future__ import absolute_import, division, unicode_literals import datetime import pywikibot from pywikibot import i18n, xmlreader from pywikibot.bot import (OptionHandler, SingleSiteBot, ExistingPageBot, RedirectPageBot) from pywikibot.exceptions import ArgumentDeprecationWarning f...
true
true
f75f3612b7f412a4fd785822269ebf2b59b69c62
76
py
Python
algos/diffraction/__init__.py
slaclab/lclslib
dbb11cf5f0f671fa0ec16c54b6346e9d1df3b0e0
[ "BSD-3-Clause-LBNL" ]
null
null
null
algos/diffraction/__init__.py
slaclab/lclslib
dbb11cf5f0f671fa0ec16c54b6346e9d1df3b0e0
[ "BSD-3-Clause-LBNL" ]
1
2016-06-23T22:51:33.000Z
2016-06-23T23:27:51.000Z
algos/diffraction/__init__.py
slaclab/lclslib
dbb11cf5f0f671fa0ec16c54b6346e9d1df3b0e0
[ "BSD-3-Clause-LBNL" ]
1
2020-12-13T01:51:19.000Z
2020-12-13T01:51:19.000Z
#print 'in .../lclslib/algos/diffraction/__init__.py' #__all__ = ['algos',]
25.333333
53
0.684211
true
true
f75f367c0ba9c064cb239cb58e7203f95bef1117
10,520
py
Python
Yolo-OCR/extract_info_cedula.py
OpenMLCo/Yolo-OCR
33fdc86316674458285bb78f55dc643e557c2d1c
[ "MIT" ]
null
null
null
Yolo-OCR/extract_info_cedula.py
OpenMLCo/Yolo-OCR
33fdc86316674458285bb78f55dc643e557c2d1c
[ "MIT" ]
null
null
null
Yolo-OCR/extract_info_cedula.py
OpenMLCo/Yolo-OCR
33fdc86316674458285bb78f55dc643e557c2d1c
[ "MIT" ]
null
null
null
# Extraer bounding boxes from pytesseract import Output import pytesseract # import imutils # import argparse import os import glob import random import darknet # import time import cv2 import numpy as np import darknet # import matplotlib.pyplot as plt # def parser(): # parser = argparse.ArgumentParser(descriptio...
40.306513
108
0.647148
from pytesseract import Output import pytesseract import os import glob import random import darknet import cv2 import numpy as np import darknet def check_batch_shape(images, batch_size): shapes = [image.shape for image in images] if len(set(shapes)) > 1: raise ValueError("Images don't have same shap...
true
true
f75f36d44d78cc3ba9991ec0e2ec8d9ab281aefb
5,957
py
Python
python/code_challenges/tree/test_tree.py
kimmyd70/data-structures-and-algorithms
5ddc4ab712a768f5a3772bbcfb60043a9cb19938
[ "MIT" ]
null
null
null
python/code_challenges/tree/test_tree.py
kimmyd70/data-structures-and-algorithms
5ddc4ab712a768f5a3772bbcfb60043a9cb19938
[ "MIT" ]
3
2020-12-11T06:00:43.000Z
2021-09-08T14:43:01.000Z
python/code_challenges/tree/test_tree.py
kimmyd70/data-structures-and-algorithms
5ddc4ab712a768f5a3772bbcfb60043a9cb19938
[ "MIT" ]
1
2021-04-06T02:41:10.000Z
2021-04-06T02:41:10.000Z
from tree import Node, BinaryTree from tree import BinarySearchTree import pytest # 5 tests passing -- CC#16 >>>> # 1. happy path # @pytest.mark.skip("pending") def test_happy_path_max(create_int_tree): tree = create_int_tree actual = tree.find_maximum_value(tree.root) expected = 15 assert actual == ...
26.475556
89
0.677522
from tree import Node, BinaryTree from tree import BinarySearchTree import pytest def test_happy_path_max(create_int_tree): tree = create_int_tree actual = tree.find_maximum_value(tree.root) expected = 15 assert actual == expected def test_empty_BT_max(): tree = BinaryTree() actual = tree.fin...
true
true
f75f36ffaca1de57d1049c1384d3b0f87c78a8a1
1,981
py
Python
tests/mixers/test_mixers.py
earlbabson/torchflare
15db06d313a53a3ec4640869335ba87730562b28
[ "Apache-2.0" ]
1
2021-04-28T19:57:57.000Z
2021-04-28T19:57:57.000Z
tests/mixers/test_mixers.py
earlbabson/torchflare
15db06d313a53a3ec4640869335ba87730562b28
[ "Apache-2.0" ]
null
null
null
tests/mixers/test_mixers.py
earlbabson/torchflare
15db06d313a53a3ec4640869335ba87730562b28
[ "Apache-2.0" ]
null
null
null
from torchflare.batch_mixers.mixers import cutmix, mixup, get_collate_fn import torch x = torch.randn(4, 3, 256, 256) targets = torch.tensor([0, 1, 0, 1]) ds = torch.utils.data.TensorDataset(x, targets) def test_mixup(): dl = torch.utils.data.DataLoader(ds, batch_size=2) batch = next(iter(dl)) op, y = ...
30.015152
83
0.702675
from torchflare.batch_mixers.mixers import cutmix, mixup, get_collate_fn import torch x = torch.randn(4, 3, 256, 256) targets = torch.tensor([0, 1, 0, 1]) ds = torch.utils.data.TensorDataset(x, targets) def test_mixup(): dl = torch.utils.data.DataLoader(ds, batch_size=2) batch = next(iter(dl)) op, y = ...
true
true
f75f37065544cba4a8fe2368e2a952b684ea70b7
1,392
py
Python
insights/client/url_cache.py
dpensi/insights-core
5ca4548f0ad2a53c4282082ad003d5b7573536d7
[ "Apache-2.0" ]
null
null
null
insights/client/url_cache.py
dpensi/insights-core
5ca4548f0ad2a53c4282082ad003d5b7573536d7
[ "Apache-2.0" ]
null
null
null
insights/client/url_cache.py
dpensi/insights-core
5ca4548f0ad2a53c4282082ad003d5b7573536d7
[ "Apache-2.0" ]
null
null
null
import os import pickle import time _KEEPTIME = 300 # 5 minutes class CacheItem(object): def __init__(self, etag, content, cached_at): self.etag = etag self.content = content self.cached_at = cached_at class URLCache(object): """ URLCache is a simple pickle cache, intended ...
27.294118
75
0.542385
import os import pickle import time _KEEPTIME = 300 class CacheItem(object): def __init__(self, etag, content, cached_at): self.etag = etag self.content = content self.cached_at = cached_at class URLCache(object): def __init__(self, path=None): self._path = path sel...
true
true
f75f37b45b130cfa1e84788b809180b944c8cef4
5,773
py
Python
tensorflow_examples/lite/model_maker/core/task/audio_classifier.py
tansaku/examples
cc121d3354ff7f9814b6eee881dce6e6c55d0e68
[ "Apache-2.0" ]
null
null
null
tensorflow_examples/lite/model_maker/core/task/audio_classifier.py
tansaku/examples
cc121d3354ff7f9814b6eee881dce6e6c55d0e68
[ "Apache-2.0" ]
null
null
null
tensorflow_examples/lite/model_maker/core/task/audio_classifier.py
tansaku/examples
cc121d3354ff7f9814b6eee881dce6e6c55d0e68
[ "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 applica...
39.813793
80
0.721808
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow_examples.lite.model_maker.core.api import mm_export from tensorflow_examples.lite.model_maker.core.export_format import ExportFormat from tensorflow_examples.lite.model_...
true
true
f75f3842f15d49963a635f1e47fc551201639d47
9,269
py
Python
conans/model/conan_file.py
nesono/conan
1fd70a2e43ef3cc6eacf9b9f8b802d90bcd92d52
[ "MIT" ]
null
null
null
conans/model/conan_file.py
nesono/conan
1fd70a2e43ef3cc6eacf9b9f8b802d90bcd92d52
[ "MIT" ]
null
null
null
conans/model/conan_file.py
nesono/conan
1fd70a2e43ef3cc6eacf9b9f8b802d90bcd92d52
[ "MIT" ]
null
null
null
from conans.model.options import Options, PackageOptions, OptionsValues from conans.model.requires import Requirements from conans.model.build_info import DepsCppInfo from conans import tools # @UnusedImport KEEP THIS! Needed for pyinstaller to copy to exe. from conans.errors import ConanException from conans.model.en...
35.51341
95
0.627684
from conans.model.options import Options, PackageOptions, OptionsValues from conans.model.requires import Requirements from conans.model.build_info import DepsCppInfo from conans import tools from conans.errors import ConanException from conans.model.env_info import DepsEnvInfo, EnvValues import os from conans.paths i...
true
true
f75f3845e74437d078182f984c779177f4f10ec3
1,179
py
Python
example.py
pedrogengo/TopicBlob
e6a7736d39c7a174d0289b21c152cd8bb02f2669
[ "Apache-2.0" ]
null
null
null
example.py
pedrogengo/TopicBlob
e6a7736d39c7a174d0289b21c152cd8bb02f2669
[ "Apache-2.0" ]
null
null
null
example.py
pedrogengo/TopicBlob
e6a7736d39c7a174d0289b21c152cd8bb02f2669
[ "Apache-2.0" ]
null
null
null
from topicblob import TopicBlob text1 = "The titular threat of The Blob has always struck me as the ultimate moviemonster: an insatiably hungry, amoeba-like mass able to penetrate virtually any safeguard, capable of as a doomed doctor chillingly describes it assimilating flesh on contact. Snide comparisons to gelatin...
35.727273
483
0.745547
from topicblob import TopicBlob text1 = "The titular threat of The Blob has always struck me as the ultimate moviemonster: an insatiably hungry, amoeba-like mass able to penetrate virtually any safeguard, capable of as a doomed doctor chillingly describes it assimilating flesh on contact. Snide comparisons to gelatin...
true
true
f75f39cfd312c9e55325a70188205e73e1f82c57
16,056
py
Python
Professional/96/onlineShop.py
Matthew1906/100DaysOfPython
94ffff8f5535ce5d574f49c0d7971d64a4575aad
[ "MIT" ]
1
2021-12-25T02:19:18.000Z
2021-12-25T02:19:18.000Z
Professional/96/onlineShop.py
Matthew1906/100DaysOfPython
94ffff8f5535ce5d574f49c0d7971d64a4575aad
[ "MIT" ]
null
null
null
Professional/96/onlineShop.py
Matthew1906/100DaysOfPython
94ffff8f5535ce5d574f49c0d7971d64a4575aad
[ "MIT" ]
1
2021-11-25T10:31:47.000Z
2021-11-25T10:31:47.000Z
# Web Development from flask import Flask, render_template, request, redirect, url_for, flash # Login Manager from flask_login import LoginManager, login_user, logout_user, login_required, current_user from werkzeug.security import generate_password_hash, check_password_hash # Forms from forms import LoginForm, Registe...
38.228571
126
0.636896
from flask import Flask, render_template, request, redirect, url_for, flash from flask_login import LoginManager, login_user, logout_user, login_required, current_user from werkzeug.security import generate_password_hash, check_password_hash from forms import LoginForm, RegisterForm, ProductForm, CartForm, TransactionF...
true
true
f75f3ac515da446c70789dc789a27f5bd9ed8068
21,958
py
Python
sympy/assumptions/handlers/sets.py
Geektrovert/sympy
30e7f9f4f2c26ec8f3e1577b9bf163e4851ab3d5
[ "BSD-3-Clause" ]
null
null
null
sympy/assumptions/handlers/sets.py
Geektrovert/sympy
30e7f9f4f2c26ec8f3e1577b9bf163e4851ab3d5
[ "BSD-3-Clause" ]
null
null
null
sympy/assumptions/handlers/sets.py
Geektrovert/sympy
30e7f9f4f2c26ec8f3e1577b9bf163e4851ab3d5
[ "BSD-3-Clause" ]
null
null
null
""" Handlers for predicates related to set membership: integer, rational, etc. """ from __future__ import print_function, division from sympy.assumptions import Q, ask from sympy.assumptions.handlers import CommonHandler, test_closed_group from sympy.core.numbers import pi from sympy.core.logic import fuzzy_bool from ...
31.639769
124
0.57068
from __future__ import print_function, division from sympy.assumptions import Q, ask from sympy.assumptions.handlers import CommonHandler, test_closed_group from sympy.core.numbers import pi from sympy.core.logic import fuzzy_bool from sympy.functions.elementary.exponential import exp, log from sympy.logic.boolalg imp...
true
true
f75f3bb693c5cadc006f5d726727f116ba2cfc59
133
py
Python
accounts/urls.py
andreztz/blog
00242886331b89c3b8a638a649c70b342f5a58b6
[ "MIT" ]
null
null
null
accounts/urls.py
andreztz/blog
00242886331b89c3b8a638a649c70b342f5a58b6
[ "MIT" ]
7
2020-10-12T21:17:12.000Z
2020-10-18T15:06:51.000Z
accounts/urls.py
andreztz/blog
00242886331b89c3b8a638a649c70b342f5a58b6
[ "MIT" ]
3
2020-10-13T15:06:06.000Z
2020-10-17T10:55:36.000Z
from django.urls import path from . import views urlpatterns = [ path("signup/", views.SignUpView.as_view(), name="signup"), ]
16.625
63
0.691729
from django.urls import path from . import views urlpatterns = [ path("signup/", views.SignUpView.as_view(), name="signup"), ]
true
true
f75f3c5ea2e30185878033b634c3fb9319628ef5
5,784
py
Python
rapidmaps/map/shape_lib.py
bug00r/rapid_maps
091e0b917c3f2fc68fd5bb152df27abf1e406478
[ "MIT" ]
null
null
null
rapidmaps/map/shape_lib.py
bug00r/rapid_maps
091e0b917c3f2fc68fd5bb152df27abf1e406478
[ "MIT" ]
null
null
null
rapidmaps/map/shape_lib.py
bug00r/rapid_maps
091e0b917c3f2fc68fd5bb152df27abf1e406478
[ "MIT" ]
null
null
null
from pathlib import Path from lxml import etree import wx from rapidmaps.map.shape import Shape, ImageShape class ShapeExistException(Exception): pass class ShapeNotExistException(Exception): pass class ShapeParameter(object): pass class ShapeCreator(object): def __init__(self, param: ShapePar...
27.542857
101
0.653873
from pathlib import Path from lxml import etree import wx from rapidmaps.map.shape import Shape, ImageShape class ShapeExistException(Exception): pass class ShapeNotExistException(Exception): pass class ShapeParameter(object): pass class ShapeCreator(object): def __init__(self, param: ShapePar...
true
true
f75f3c74e8173e785890d807c1d8eab986305d66
1,824
py
Python
lib/Main.py
delbio/py-automata-cli-runner
f415ec5e23a2513fc36a3e7229bf3f386a1ac6ab
[ "MIT" ]
2
2018-09-14T08:28:35.000Z
2019-10-30T13:18:50.000Z
lib/Main.py
delbio/py-automata-cli-runner
f415ec5e23a2513fc36a3e7229bf3f386a1ac6ab
[ "MIT" ]
null
null
null
lib/Main.py
delbio/py-automata-cli-runner
f415ec5e23a2513fc36a3e7229bf3f386a1ac6ab
[ "MIT" ]
null
null
null
import argparse from defusedxml.ElementTree import parse from automaton.builder.common import allow_local_module_if_requested from automaton.builder.XmlBuilder import AutomatonXmlBuilder from automaton.runner.Runner import Runner from automaton.runner.ErrorHandler import ErrorHandlerXmlBuilder from automaton....
38.808511
86
0.728618
import argparse from defusedxml.ElementTree import parse from automaton.builder.common import allow_local_module_if_requested from automaton.builder.XmlBuilder import AutomatonXmlBuilder from automaton.runner.Runner import Runner from automaton.runner.ErrorHandler import ErrorHandlerXmlBuilder from automaton....
true
true
f75f3d1a882d36313381e7cab01a1af8646480a3
1,351
py
Python
zairachem/utils/logging.py
ersilia-os/ersilia-automl-chem
fabb1f05d17cff11ec0e084495eed4c0152f2f63
[ "MIT" ]
null
null
null
zairachem/utils/logging.py
ersilia-os/ersilia-automl-chem
fabb1f05d17cff11ec0e084495eed4c0152f2f63
[ "MIT" ]
null
null
null
zairachem/utils/logging.py
ersilia-os/ersilia-automl-chem
fabb1f05d17cff11ec0e084495eed4c0152f2f63
[ "MIT" ]
null
null
null
import sys import os from loguru import logger from ..vars import BASE_DIR, LOGGING_FILE ROTATION = "10 MB" class Logger(object): def __init__(self): self.logger = logger self.logger.remove() self._console = None self._file = None self._log_to_file() self._log_to_...
21.790323
67
0.590674
import sys import os from loguru import logger from ..vars import BASE_DIR, LOGGING_FILE ROTATION = "10 MB" class Logger(object): def __init__(self): self.logger = logger self.logger.remove() self._console = None self._file = None self._log_to_file() self._log_to_...
true
true
f75f3d38cd9fe38170ea0802bb299c0e06ce4a88
983
py
Python
djmoney/utils.py
mikeiwi/django-money-fork
e89dfd75ea15be39d8a5c58f887279bcd5257b08
[ "BSD-3-Clause" ]
null
null
null
djmoney/utils.py
mikeiwi/django-money-fork
e89dfd75ea15be39d8a5c58f887279bcd5257b08
[ "BSD-3-Clause" ]
null
null
null
djmoney/utils.py
mikeiwi/django-money-fork
e89dfd75ea15be39d8a5c58f887279bcd5257b08
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.db.models import F from django.db.models.expressions import BaseExpression from djmoney.money import Money from moneyed import Money as OldMoney MONEY_CLASSES = (Money, OldMoney) def get_currency_field_name(name): return '%s_currency' % name def get_amount(value): """ ...
24.575
72
0.669379
from django.db.models import F from django.db.models.expressions import BaseExpression from djmoney.money import Money from moneyed import Money as OldMoney MONEY_CLASSES = (Money, OldMoney) def get_currency_field_name(name): return '%s_currency' % name def get_amount(value): if isinstance(value, MONEY_C...
true
true
f75f3d76cc797882232453f8db12151c15719001
244
py
Python
tds/tokens/alt_row.py
by46/geek
04b08d0dff80c524bd471ead3fe524423eebf123
[ "MIT" ]
null
null
null
tds/tokens/alt_row.py
by46/geek
04b08d0dff80c524bd471ead3fe524423eebf123
[ "MIT" ]
null
null
null
tds/tokens/alt_row.py
by46/geek
04b08d0dff80c524bd471ead3fe524423eebf123
[ "MIT" ]
null
null
null
from io import BytesIO from tds.base import StreamSerializer class ALTRowStream(StreamSerializer): TOKEN_TYPE = 0xD3 def unmarshal(self, buf): """ :param BytesIO buf: :rtype: bool """
16.266667
38
0.581967
from io import BytesIO from tds.base import StreamSerializer class ALTRowStream(StreamSerializer): TOKEN_TYPE = 0xD3 def unmarshal(self, buf):
true
true
f75f3e6396b8cd8c383c7de9e456f30ac23c7df8
1,834
py
Python
vault/quickstart/quickstart.py
slokhorst/python-samples
6e92563136f837786c579535e4b148a1c5bf18a4
[ "Apache-2.0" ]
1
2018-12-12T01:43:46.000Z
2018-12-12T01:43:46.000Z
vault/quickstart/quickstart.py
slokhorst/python-samples
6e92563136f837786c579535e4b148a1c5bf18a4
[ "Apache-2.0" ]
null
null
null
vault/quickstart/quickstart.py
slokhorst/python-samples
6e92563136f837786c579535e4b148a1c5bf18a4
[ "Apache-2.0" ]
1
2019-01-17T23:30:38.000Z
2019-01-17T23:30:38.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
35.269231
79
0.702835
from __future__ import print_function from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, client, tools SCOPES = 'https://www.googleapis.com/auth/ediscovery' def main(): # created automatically when the authorization flow completes for the first # time. ...
true
true
f75f3ecea42ba74aabb7398432a02eef1d983261
231
py
Python
lessons/lesson2/t106.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
lessons/lesson2/t106.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
lessons/lesson2/t106.py
kcfkwok2003/Simp_py
f75e66da01b45dc8688dda602f8b33d4258f0c31
[ "MIT" ]
null
null
null
from simp_py import tft lcd = tft.tft lcd.clear() from machine import Pin btnA = Pin(39, Pin.IN) while True: if btnA.value() == 0: lcd.text(10,10,'A is pressed ') else: lcd.text(10,10,'A is released') time.sleep(0.1)
19.25
35
0.649351
from simp_py import tft lcd = tft.tft lcd.clear() from machine import Pin btnA = Pin(39, Pin.IN) while True: if btnA.value() == 0: lcd.text(10,10,'A is pressed ') else: lcd.text(10,10,'A is released') time.sleep(0.1)
true
true
f75f3f6aafc579877847f0ffc186560da2fdff7d
13,036
py
Python
hg-fast-export.py
ritcheyer/fast-export
7dfb10d828a03a4c56d55c3771fcd62687a1204e
[ "MIT" ]
1
2021-06-03T20:11:23.000Z
2021-06-03T20:11:23.000Z
hg-fast-export.py
ritcheyer/fast-export
7dfb10d828a03a4c56d55c3771fcd62687a1204e
[ "MIT" ]
null
null
null
hg-fast-export.py
ritcheyer/fast-export
7dfb10d828a03a4c56d55c3771fcd62687a1204e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2007, 2008 Rocco Rutte <pdmef@gmx.net> and others. # License: MIT <http://www.opensource.org/licenses/mit-license.php> from mercurial import node from hg2git import setup_repo,fixup_user,get_branch,get_changeset from hg2git import load_cache,save_cache,get_git_sha1,set_default_br...
32.108374
98
0.672522
from mercurial import node from hg2git import setup_repo,fixup_user,get_branch,get_changeset from hg2git import load_cache,save_cache,get_git_sha1,set_default_branch,set_origin_name from optparse import OptionParser import re import sys import os if sys.platform == "win32": import msvcrt msvcrt.setmode(s...
true
true
f75f3f96f55165aaf55499151513294616bb0e08
609
py
Python
plugins/OutputWAV/__init__.py
spongezhang/maskgen
7284e300d1cb326a5349879de0bace9cfa8788a8
[ "BSD-3-Clause" ]
null
null
null
plugins/OutputWAV/__init__.py
spongezhang/maskgen
7284e300d1cb326a5349879de0bace9cfa8788a8
[ "BSD-3-Clause" ]
null
null
null
plugins/OutputWAV/__init__.py
spongezhang/maskgen
7284e300d1cb326a5349879de0bace9cfa8788a8
[ "BSD-3-Clause" ]
null
null
null
import maskgen.video_tools """ Save Audio channels to a WAV file """ def transform(img, source, target, **kwargs): maskgen.video_tools.toAudio(source, outputName=target) return None, None def operation(): return {'name': 'OutputWAV', 'category': 'Output', 'description': 'Extract...
21
64
0.546798
import maskgen.video_tools def transform(img, source, target, **kwargs): maskgen.video_tools.toAudio(source, outputName=target) return None, None def operation(): return {'name': 'OutputWAV', 'category': 'Output', 'description': 'Extract Audio Stream from Video', 'so...
true
true
f75f405b6d7a17688f3a116adf9b3e811c29cadf
1,011
py
Python
guv/__init__.py
timgates42/guv
d7bac2ca6a73cc2059969af08223b82f3e187922
[ "MIT" ]
120
2015-01-05T15:15:26.000Z
2020-07-28T11:25:10.000Z
guv/__init__.py
timgates42/guv
d7bac2ca6a73cc2059969af08223b82f3e187922
[ "MIT" ]
22
2015-01-12T21:52:32.000Z
2017-01-22T18:18:20.000Z
guv/__init__.py
timgates42/guv
d7bac2ca6a73cc2059969af08223b82f3e187922
[ "MIT" ]
13
2015-01-18T11:42:34.000Z
2021-07-15T10:59:22.000Z
version_info = (0, 35, 2) __version__ = '.'.join(map(str, version_info)) try: import pyuv_cffi # only to compile the shared library before monkey-patching from . import greenpool from . import queue from .hubs.switch import gyield, trampoline from .greenthread import sleep, spawn, spawn_n, spawn_...
33.7
99
0.718101
version_info = (0, 35, 2) __version__ = '.'.join(map(str, version_info)) try: import pyuv_cffi from . import greenpool from . import queue from .hubs.switch import gyield, trampoline from .greenthread import sleep, spawn, spawn_n, spawn_after, kill from .greenpool import GreenPool, GreenPile ...
true
true
f75f410caa5451bc7474db69c9e30f5da3be238f
1,033
py
Python
Dangerous/Golismero/tools/sqlmap/plugins/dbms/postgresql/syntax.py
JeyZeta/Dangerous-
824ea6b571eda98bb855f176361e9b35dfda578e
[ "MIT" ]
null
null
null
Dangerous/Golismero/tools/sqlmap/plugins/dbms/postgresql/syntax.py
JeyZeta/Dangerous-
824ea6b571eda98bb855f176361e9b35dfda578e
[ "MIT" ]
null
null
null
Dangerous/Golismero/tools/sqlmap/plugins/dbms/postgresql/syntax.py
JeyZeta/Dangerous-
824ea6b571eda98bb855f176361e9b35dfda578e
[ "MIT" ]
1
2018-07-04T18:35:16.000Z
2018-07-04T18:35:16.000Z
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from plugins.generic.syntax import Syntax as GenericSyntax class Syntax(GenericSyntax): def __init__(self): GenericSyntax.__init__(self) @staticmethod de...
36.892857
151
0.648596
from plugins.generic.syntax import Syntax as GenericSyntax class Syntax(GenericSyntax): def __init__(self): GenericSyntax.__init__(self) @staticmethod def escape(expression, quote=True): def escaper(value): return "(%s)" % "||".join("CHR(%d)" % ord(_) for _ in value) ...
true
true
f75f4159260442d6d8af420e3cd82453f77a22e9
233
py
Python
tests/conftest.py
m-salewski/linkedin_local_scraper
9e49b432b8277f5d7b87b5e4f9e9d458a68b401b
[ "MIT" ]
null
null
null
tests/conftest.py
m-salewski/linkedin_local_scraper
9e49b432b8277f5d7b87b5e4f9e9d458a68b401b
[ "MIT" ]
null
null
null
tests/conftest.py
m-salewski/linkedin_local_scraper
9e49b432b8277f5d7b87b5e4f9e9d458a68b401b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Dummy conftest.py for lilo_scraper. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ # import pytest
21.181818
60
0.656652
true
true
f75f41b8f25febe3a5766927822dea4e8b1fd6b7
2,360
py
Python
lib/createsend/segment.py
imozzila/createsend-python
2cc43db84eb0f6e33042a6cdc4ecbd22fddca204
[ "MIT" ]
25
2015-05-05T09:08:05.000Z
2021-12-28T01:07:19.000Z
lib/createsend/segment.py
imozzila/createsend-python
2cc43db84eb0f6e33042a6cdc4ecbd22fddca204
[ "MIT" ]
47
2015-02-15T16:57:03.000Z
2022-01-06T01:07:08.000Z
lib/createsend/segment.py
imozzila/createsend-python
2cc43db84eb0f6e33042a6cdc4ecbd22fddca204
[ "MIT" ]
41
2015-02-09T16:17:58.000Z
2021-10-30T12:50:16.000Z
from __future__ import absolute_import import json from createsend.createsend import CreateSendBase from createsend.utils import json_to_py class Segment(CreateSendBase): """Represents a subscriber list segment and associated functionality.""" def __init__(self, auth=None, segment_id=None): self.se...
35.223881
139
0.614407
from __future__ import absolute_import import json from createsend.createsend import CreateSendBase from createsend.utils import json_to_py class Segment(CreateSendBase): def __init__(self, auth=None, segment_id=None): self.segment_id = segment_id super(Segment, self).__init__(auth) def cr...
true
true
f75f42b6b75398a4f0888aec3e6639ee22f034e4
5,083
py
Python
fastai/collab.py
EmbraceLife/fastai
85258502eff144708d657aa4b4d2ab4c2a2b3a0b
[ "Apache-2.0" ]
1
2022-03-13T00:09:58.000Z
2022-03-13T00:09:58.000Z
fastai/collab.py
maxpark/fastai
7dd70d4fd9ff1091557e09c9f00c8894b818544e
[ "Apache-2.0" ]
null
null
null
fastai/collab.py
maxpark/fastai
7dd70d4fd9ff1091557e09c9f00c8894b818544e
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/45_collab.ipynb (unless otherwise specified). from __future__ import annotations __all__ = ['TabularCollab', 'CollabDataLoaders', 'EmbeddingDotBias', 'EmbeddingNN', 'collab_learner'] # Cell #nbdev_comment from __future__ import annotations from .tabular.all import * ...
48.409524
132
0.685815
from __future__ import annotations __all__ = ['TabularCollab', 'CollabDataLoaders', 'EmbeddingDotBias', 'EmbeddingNN', 'collab_learner'] from .tabular.all import * class TabularCollab(TabularPandas): with_cont=False class CollabDataLoaders(DataLoaders): @delegates(DataLoaders.from_dblock) @classmetho...
true
true
f75f43360c53f88f41aaa10a364493cb2ada254d
3,001
py
Python
pyroms_toolbox/pyroms_toolbox/Grid_HYCOM/make_remap_grid_file.py
bilgetutak/pyroms
3b0550f26f4ac181b7812e14a7167cd1ca0797f0
[ "BSD-3-Clause" ]
75
2016-04-05T07:15:57.000Z
2022-03-04T22:49:54.000Z
pyroms_toolbox/pyroms_toolbox/Grid_HYCOM/make_remap_grid_file.py
hadfieldnz/pyroms-mgh
cd0fe39075825f97a7caf64e2c4c5a19f23302fd
[ "BSD-3-Clause" ]
27
2017-02-26T04:27:49.000Z
2021-12-01T17:26:56.000Z
pyroms_toolbox/pyroms_toolbox/Grid_HYCOM/make_remap_grid_file.py
hadfieldnz/pyroms-mgh
cd0fe39075825f97a7caf64e2c4c5a19f23302fd
[ "BSD-3-Clause" ]
56
2016-05-11T06:19:14.000Z
2022-03-22T19:04:17.000Z
import numpy as np from mpl_toolkits.basemap import pyproj from datetime import datetime try: import netCDF4 as netCDF except: import netCDF3 as netCDF def make_remap_grid_file(grd): #create remap file remap_filename = 'remap_grid_' + grd.name + '_t.nc' nc = netCDF.Dataset(remap_filename, 'w', format...
36.597561
77
0.665445
import numpy as np from mpl_toolkits.basemap import pyproj from datetime import datetime try: import netCDF4 as netCDF except: import netCDF3 as netCDF def make_remap_grid_file(grd): remap_filename = 'remap_grid_' + grd.name + '_t.nc' nc = netCDF.Dataset(remap_filename, 'w', format='NETCDF3_64BIT') ...
true
true
f75f44131d4b79beb357182e786dd772dc10e657
6,031
py
Python
tools/train_net.py
thanhhvnqb/FCOS
6e089528d909e56bb7348b56a2ab8f788bf9d2ed
[ "BSD-2-Clause" ]
null
null
null
tools/train_net.py
thanhhvnqb/FCOS
6e089528d909e56bb7348b56a2ab8f788bf9d2ed
[ "BSD-2-Clause" ]
null
null
null
tools/train_net.py
thanhhvnqb/FCOS
6e089528d909e56bb7348b56a2ab8f788bf9d2ed
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. r""" Basic training script for PyTorch """ # Set up custom environment before nearly anything else is imported # NOTE: this should be the first import (no not reorder) from fcos_core.utils.env import setup_environment # noqa F401 isort:skip impo...
35.063953
113
0.698226
from fcos_core.utils.env import setup_environment import argparse import os import torch from fcos_core.config import cfg from fcos_core.data import make_data_loader from fcos_core.solver import make_lr_scheduler from fcos_core.solver import make_optimizer from fcos_core.engine.inference import inference from fcos_...
true
true
f75f456627e65686c4b3db466705452e8262ca29
1,228
py
Python
IOXIDResolver.py
mubix/IOXIDResolver-
72d391f7e92913ba1914c68c13fba163c4b160fe
[ "BSD-3-Clause" ]
108
2020-07-29T19:56:24.000Z
2022-03-17T23:46:11.000Z
IOXIDResolver.py
mubix/IOXIDResolver-
72d391f7e92913ba1914c68c13fba163c4b160fe
[ "BSD-3-Clause" ]
1
2021-03-08T03:02:37.000Z
2021-03-08T03:02:37.000Z
IOXIDResolver.py
mubix/IOXIDResolver-
72d391f7e92913ba1914c68c13fba163c4b160fe
[ "BSD-3-Clause" ]
37
2020-07-30T12:53:53.000Z
2022-01-14T02:20:54.000Z
#!/usr/bin/python import sys, getopt from impacket.dcerpc.v5 import transport from impacket.dcerpc.v5.rpcrt import RPC_C_AUTHN_LEVEL_NONE from impacket.dcerpc.v5.dcomrt import IObjectExporter def main(argv): try: opts, args = getopt.getopt(argv,"ht:",["target="]) except getopt.GetoptError: p...
26.12766
66
0.654723
import sys, getopt from impacket.dcerpc.v5 import transport from impacket.dcerpc.v5.rpcrt import RPC_C_AUTHN_LEVEL_NONE from impacket.dcerpc.v5.dcomrt import IObjectExporter def main(argv): try: opts, args = getopt.getopt(argv,"ht:",["target="]) except getopt.GetoptError: print ('IOXIDResolv...
true
true
f75f4723b02c7c54066a25870b266a7ff10972cb
3,743
py
Python
pynosh/magnetic_vector_potentials.py
nschloe/pynosh
331454b29246e6c009878589aad2dccb9fda6c30
[ "MIT" ]
8
2016-01-04T22:49:25.000Z
2021-05-07T17:23:43.000Z
pynosh/magnetic_vector_potentials.py
nschloe/pynosh
331454b29246e6c009878589aad2dccb9fda6c30
[ "MIT" ]
1
2015-11-09T18:39:31.000Z
2015-11-09T18:39:31.000Z
pynosh/magnetic_vector_potentials.py
nschloe/pynosh
331454b29246e6c009878589aad2dccb9fda6c30
[ "MIT" ]
1
2021-03-20T22:01:47.000Z
2021-03-20T22:01:47.000Z
"""Module that provides magnetic vector potentials.""" import numpy def constant_field(X, B): """Converts a spatially constant magnetic field B at X into a corresponding potential. """ # This is one particular choice that works. return 0.5 * numpy.cross(B, X) def magnetic_dipole(x, x0, m): "...
35.647619
86
0.545017
import numpy def constant_field(X, B): return 0.5 * numpy.cross(B, X) def magnetic_dipole(x, x0, m): r = x - x0 return (numpy.cross(m, r).T / numpy.sum(numpy.abs(r) ** 2, axis=-1) ** (3. / 2)).T def magnetic_dot(X, radius, heights): n_phi = 100 n_radius = int(ro...
true
true
f75f4733095f6cf0ecd126d806d06fc8b049a7f2
361
py
Python
dsbox/ml/neural_networks/keras_factory/abstract_model_generator.py
Pandinosaurus/dsbox
aea56049025ed7e6e66427f8636286f8be1b6e03
[ "Apache-2.0" ]
16
2020-05-11T09:10:15.000Z
2021-04-13T08:43:28.000Z
dsbox/ml/neural_networks/keras_factory/abstract_model_generator.py
Pandinosaurus/dsbox
aea56049025ed7e6e66427f8636286f8be1b6e03
[ "Apache-2.0" ]
1
2020-12-03T20:02:32.000Z
2020-12-03T20:02:32.000Z
dsbox/ml/neural_networks/keras_factory/abstract_model_generator.py
Pandinosaurus/dsbox
aea56049025ed7e6e66427f8636286f8be1b6e03
[ "Apache-2.0" ]
1
2020-05-11T17:22:20.000Z
2020-05-11T17:22:20.000Z
from abc import ABCMeta, abstractmethod __author__ = "Vincent Levorato" __credits__ = "https://github.com/octo-technology/bdacore" __license__ = "Apache 2.0" class KerasFactory: """ Abstract class template for all keras neural nets factories """ __metaclass__ = ABCMeta @abstractmethod def cr...
21.235294
63
0.706371
from abc import ABCMeta, abstractmethod __author__ = "Vincent Levorato" __credits__ = "https://github.com/octo-technology/bdacore" __license__ = "Apache 2.0" class KerasFactory: __metaclass__ = ABCMeta @abstractmethod def create_model(self, **kwargs): pass
true
true
f75f483b9fbb5938f0e55956075346f7ec9eedc3
2,546
py
Python
homeassistant/components/knx/sensor.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
1
2021-04-28T09:51:08.000Z
2021-04-28T09:51:08.000Z
homeassistant/components/knx/sensor.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
60
2020-08-03T07:32:56.000Z
2022-03-31T06:02:07.000Z
homeassistant/components/knx/sensor.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
4
2017-01-10T04:17:33.000Z
2021-09-02T16:37:24.000Z
"""Support for KNX/IP sensors.""" from __future__ import annotations from typing import Any, Callable, Iterable from xknx.devices import Sensor as XknxSensor from homeassistant.components.sensor import DEVICE_CLASSES, SensorEntity from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import ...
32.227848
81
0.680676
from __future__ import annotations from typing import Any, Callable, Iterable from xknx.devices import Sensor as XknxSensor from homeassistant.components.sensor import DEVICE_CLASSES, SensorEntity from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity from homeassistant.helpers....
true
true
f75f488e93a632f7d00f9a887d8bdd85ea8e1018
1,458
py
Python
mmdet/models/utils/__init__.py
ruiningTang/mmdetection
100b0b5e0edddc45af0812b9f1474493c61671ef
[ "Apache-2.0" ]
null
null
null
mmdet/models/utils/__init__.py
ruiningTang/mmdetection
100b0b5e0edddc45af0812b9f1474493c61671ef
[ "Apache-2.0" ]
null
null
null
mmdet/models/utils/__init__.py
ruiningTang/mmdetection
100b0b5e0edddc45af0812b9f1474493c61671ef
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. from .builder import build_linear_layer, build_transformer from .conv_upsample import ConvUpsample from .csp_layer import CSPLayer from .gaussian_target import gaussian_radius, gen_gaussian_target from .inverted_residual import InvertedResidual from .make_divisible import...
48.6
82
0.785322
from .builder import build_linear_layer, build_transformer from .conv_upsample import ConvUpsample from .csp_layer import CSPLayer from .gaussian_target import gaussian_radius, gen_gaussian_target from .inverted_residual import InvertedResidual from .make_divisible import make_divisible from .misc import interpolate_as...
true
true
f75f492ed56f43b722a9061627bf66656d32fd88
921
py
Python
difflr/__init__.py
kingspp/differentiable_learning
d1b23b490f6dcef1ebb1d6818c8cda33e70f6a2f
[ "MIT" ]
null
null
null
difflr/__init__.py
kingspp/differentiable_learning
d1b23b490f6dcef1ebb1d6818c8cda33e70f6a2f
[ "MIT" ]
null
null
null
difflr/__init__.py
kingspp/differentiable_learning
d1b23b490f6dcef1ebb1d6818c8cda33e70f6a2f
[ "MIT" ]
null
null
null
import os from abc import ABCMeta from munch import Munch DIFFLR_MODULE_PATH = os.path.dirname(os.path.abspath(__file__)) DIFFLR_DATA_PATH = os.path.dirname(os.path.abspath(__file__)) + '/data/' DIFFLR_EXPERIMENTS_PATH = os.path.dirname(os.path.abspath(__file__)) + '/experiments/' DIFFLR_EXPERIMENTS_RUNS_PATH = os.pat...
29.709677
95
0.69924
import os from abc import ABCMeta from munch import Munch DIFFLR_MODULE_PATH = os.path.dirname(os.path.abspath(__file__)) DIFFLR_DATA_PATH = os.path.dirname(os.path.abspath(__file__)) + '/data/' DIFFLR_EXPERIMENTS_PATH = os.path.dirname(os.path.abspath(__file__)) + '/experiments/' DIFFLR_EXPERIMENTS_RUNS_PATH = os.pat...
true
true
f75f4ad73d99bf6aa8e57fe93bb5742a937a51f1
6,184
py
Python
TicTakToe/game.py
abhishek-geek/Python-mini-projects
ffcb41fb0eeb39f8c174f6d3add76fbe60a283b4
[ "Apache-2.0" ]
7
2022-01-19T10:41:25.000Z
2022-02-22T17:26:12.000Z
TicTakToe/game.py
abhishek-geek/Python-mini-projects
ffcb41fb0eeb39f8c174f6d3add76fbe60a283b4
[ "Apache-2.0" ]
null
null
null
TicTakToe/game.py
abhishek-geek/Python-mini-projects
ffcb41fb0eeb39f8c174f6d3add76fbe60a283b4
[ "Apache-2.0" ]
4
2021-10-31T14:54:40.000Z
2021-11-22T13:39:44.000Z
# Tic Tac Toe game with GUI # using tkinter # importing all necessary libraries import random import tkinter from tkinter import * from functools import partial from tkinter import messagebox from copy import deepcopy # sign variable to decide the turn of which player sign = 0 # Creates an empty board global board b...
27.122807
82
0.614812
import random import tkinter from tkinter import * from functools import partial from tkinter import messagebox from copy import deepcopy sign = 0 global board board = [[" " for x in range(3)] for y in range(3)] def winner(b, l): return ((b[0][0] == l and b[0][1] == l and b[0][2] == l) or (b[1][0] == l and b[1]...
true
true
f75f4b6dfe64f97819ba157655b23a07de93e662
193
py
Python
nano/config/desktop.py
erpcloudsystems/nano
c1656fba12e459a889157eabb72aeb2b739a7633
[ "MIT" ]
null
null
null
nano/config/desktop.py
erpcloudsystems/nano
c1656fba12e459a889157eabb72aeb2b739a7633
[ "MIT" ]
null
null
null
nano/config/desktop.py
erpcloudsystems/nano
c1656fba12e459a889157eabb72aeb2b739a7633
[ "MIT" ]
null
null
null
from frappe import _ def get_data(): return [ { "module_name": "Nano", "color": "grey", "icon": "octicon octicon-file-directory", "type": "module", "label": _("Nano") } ]
14.846154
44
0.564767
from frappe import _ def get_data(): return [ { "module_name": "Nano", "color": "grey", "icon": "octicon octicon-file-directory", "type": "module", "label": _("Nano") } ]
true
true
f75f4ba9f10ac5d3877b7bce9b82de847f9dbb68
1,771
py
Python
app/routers/vote.py
kihtrakinam/fastapi
fe87d8ab7d7b32d51f84e60418c0188ef2952b7b
[ "MIT" ]
null
null
null
app/routers/vote.py
kihtrakinam/fastapi
fe87d8ab7d7b32d51f84e60418c0188ef2952b7b
[ "MIT" ]
null
null
null
app/routers/vote.py
kihtrakinam/fastapi
fe87d8ab7d7b32d51f84e60418c0188ef2952b7b
[ "MIT" ]
null
null
null
from .. import models, schemas, oauth2 from sqlalchemy.orm import Session from fastapi import status, HTTPException, Depends, APIRouter from ..database import get_db router = APIRouter(prefix = "/votes" ,tags = ["Votes"]) @router.post("/", status_code = status.HTTP_201_CREATED) def vote(vote : schemas.VoteData, db : ...
46.605263
143
0.670807
from .. import models, schemas, oauth2 from sqlalchemy.orm import Session from fastapi import status, HTTPException, Depends, APIRouter from ..database import get_db router = APIRouter(prefix = "/votes" ,tags = ["Votes"]) @router.post("/", status_code = status.HTTP_201_CREATED) def vote(vote : schemas.VoteData, db : ...
true
true
f75f4c1a0eb8f4ca583472d83526b5a71e26832a
1,872
py
Python
MPNNR/model/utils.py
naganandy/G-MPNN-R
04564c059e6e8cfc08edb27403dfe6bb89ba8bab
[ "MIT" ]
2
2021-06-13T01:11:20.000Z
2022-03-01T13:16:29.000Z
MPNNR/model/utils.py
naganandy/G-MPNN-R
04564c059e6e8cfc08edb27403dfe6bb89ba8bab
[ "MIT" ]
2
2021-05-12T08:17:47.000Z
2022-03-30T11:48:33.000Z
MPNNR/model/utils.py
naganandy/G-MPNN-R
04564c059e6e8cfc08edb27403dfe6bb89ba8bab
[ "MIT" ]
4
2021-01-08T13:24:24.000Z
2022-03-04T10:11:54.000Z
import torch, numpy as np, scipy.sparse as sp from torch.nn import functional as F from tqdm import tqdm def adjacency(H): """ construct adjacency for recursive hypergraph arguments: H: recursive hypergraph """ A = np.eye(H['n']) E = H['D0'] for k in tqdm(E): e = list(E[k...
20.8
71
0.53312
import torch, numpy as np, scipy.sparse as sp from torch.nn import functional as F from tqdm import tqdm def adjacency(H): A = np.eye(H['n']) E = H['D0'] for k in tqdm(E): e = list(E[k]) for u in e: A[k][u], A[u][k] = 1, 1 for v in e: if u != v...
true
true
f75f4d3fa9db26ddb6004ed18ca6d8c19fad445a
1,368
py
Python
server.py
mrfrosk/tcpmessanger
a0620b10a4900b82295ad4a92c17ac657399a026
[ "MIT" ]
null
null
null
server.py
mrfrosk/tcpmessanger
a0620b10a4900b82295ad4a92c17ac657399a026
[ "MIT" ]
null
null
null
server.py
mrfrosk/tcpmessanger
a0620b10a4900b82295ad4a92c17ac657399a026
[ "MIT" ]
null
null
null
import socket import threading # Connection Data host = '127.0.0.1' port = 3415 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((host, port)) server.listen() clients = [] nicknames = [] def broadcast(message): for client in clients: client.send(message) def handle(client): ...
23.186441
64
0.600877
import socket import threading host = '127.0.0.1' port = 3415 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((host, port)) server.listen() clients = [] nicknames = [] def broadcast(message): for client in clients: client.send(message) def handle(client): while True: ...
true
true
f75f4d81653db8359cb8107e5f7ce842c107de1c
310
py
Python
opencv_learn/charpter02/demo_02.16.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
opencv_learn/charpter02/demo_02.16.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
opencv_learn/charpter02/demo_02.16.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
import cv2 lena = cv2.imread(r"..\lena.jpg") cv2.imshow("cat1", lena) b = lena[:, :, 0] g = lena[:, :, 1] r = lena[:, :, 2] cv2.imshow("b", b) cv2.imshow("g", g) cv2.imshow("r", r) lena[:, :, 0] = 0 cv2.imshow("catb0", lena) lena[:, :, 1] = 0 cv2.imshow("catb0g0", lena) cv2.waitKey() cv2.destroyAllWindows()
18.235294
33
0.574194
import cv2 lena = cv2.imread(r"..\lena.jpg") cv2.imshow("cat1", lena) b = lena[:, :, 0] g = lena[:, :, 1] r = lena[:, :, 2] cv2.imshow("b", b) cv2.imshow("g", g) cv2.imshow("r", r) lena[:, :, 0] = 0 cv2.imshow("catb0", lena) lena[:, :, 1] = 0 cv2.imshow("catb0g0", lena) cv2.waitKey() cv2.destroyAllWindows()
true
true
f75f4f2eecc9ffd1c8a24c8a681566a0769ca012
1,652
py
Python
robosuite/models/grippers/panda_gripper.py
quantumiracle/robolite
b3166a1c51a1118706177f4a4e7401e7c2c6c404
[ "MIT" ]
null
null
null
robosuite/models/grippers/panda_gripper.py
quantumiracle/robolite
b3166a1c51a1118706177f4a4e7401e7c2c6c404
[ "MIT" ]
null
null
null
robosuite/models/grippers/panda_gripper.py
quantumiracle/robolite
b3166a1c51a1118706177f4a4e7401e7c2c6c404
[ "MIT" ]
null
null
null
""" Gripper for Franka's Panda (has two fingers). """ import numpy as np from robosuite.utils.mjcf_utils import xml_path_completion from robosuite.models.grippers.gripper import Gripper class PandaGripperBase(Gripper): """ Gripper for Franka's Panda (has two fingers). """ def __init__(self, path=None...
21.736842
79
0.588378
import numpy as np from robosuite.utils.mjcf_utils import xml_path_completion from robosuite.models.grippers.gripper import Gripper class PandaGripperBase(Gripper): def __init__(self, path=None): if path: super().__init__(path) else: super().__init__(xml_path_completion("g...
true
true
f75f504c636e77f2975edecf0364a47610ab3ef8
2,243
py
Python
parlai/agents/bert_classifier/bert_classifier.py
FrankVerhoef/Persona-Dialogue-Generation
ffd8413c2e8b6446097902dd1c496aeb24b852b4
[ "MIT" ]
1
2022-02-27T23:52:28.000Z
2022-02-27T23:52:28.000Z
parlai/agents/bert_classifier/bert_classifier.py
FrankVerhoef/Persona-Dialogue-Generation
ffd8413c2e8b6446097902dd1c496aeb24b852b4
[ "MIT" ]
null
null
null
parlai/agents/bert_classifier/bert_classifier.py
FrankVerhoef/Persona-Dialogue-Generation
ffd8413c2e8b6446097902dd1c496aeb24b852b4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.agents.bert_ranker.bert_dictionary import BertDictionaryAgent from parlai.agents.bert_ranker.helpers import B...
40.053571
80
0.627285
from parlai.agents.bert_ranker.bert_dictionary import BertDictionaryAgent from parlai.agents.bert_ranker.helpers import BertWrapper, get_bert_optimizer from parlai.core.torch_classifier_agent import TorchClassifierAgent try: from transformers import BertModel except ImportError: raise Exception(("BERT rankers...
true
true
f75f50b39da8cd0ec7491bab4f17def977d13eac
10,799
py
Python
train.py
kalyanramu/WeedDetection
ab8c94391a6faddccfa8760837745f9dcb20a8b8
[ "MIT" ]
2
2019-04-01T13:37:14.000Z
2020-01-31T20:49:45.000Z
train.py
kalyanramu/WeedDetection
ab8c94391a6faddccfa8760837745f9dcb20a8b8
[ "MIT" ]
null
null
null
train.py
kalyanramu/WeedDetection
ab8c94391a6faddccfa8760837745f9dcb20a8b8
[ "MIT" ]
null
null
null
#! /usr/bin/env python import argparse import os import numpy as np import json from voc import parse_voc_annotation from yolo import create_yolov3_model, dummy_loss from generator import BatchGenerator from utils.utils import normalize, evaluate, makedirs from keras.callbacks import EarlyStopping, ReduceLROnPlateau f...
38.430605
120
0.574498
import argparse import os import numpy as np import json from voc import parse_voc_annotation from yolo import create_yolov3_model, dummy_loss from generator import BatchGenerator from utils.utils import normalize, evaluate, makedirs from keras.callbacks import EarlyStopping, ReduceLROnPlateau from keras.optimizers im...
true
true
f75f50cbb629da325cb68e6d5eca191ee9be1677
20,711
py
Python
download_from_google_storage.py
zcm19900902/depot_tools
4f4bec737a705ce46b3448a6fdf97a34fa058272
[ "BSD-3-Clause" ]
null
null
null
download_from_google_storage.py
zcm19900902/depot_tools
4f4bec737a705ce46b3448a6fdf97a34fa058272
[ "BSD-3-Clause" ]
null
null
null
download_from_google_storage.py
zcm19900902/depot_tools
4f4bec737a705ce46b3448a6fdf97a34fa058272
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Download files from Google Storage based on SHA1 sums.""" import hashlib import optparse import os import Queue import re impo...
38.424861
80
0.618029
"""Download files from Google Storage based on SHA1 sums.""" import hashlib import optparse import os import Queue import re import shutil import stat import sys import tarfile import threading import time import subprocess2 GSUTIL_DEFAULT_PATH = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'gsut...
false
true
f75f5215bd8b2d773cf05233c6e5bd0ea00d3d9d
130
py
Python
Python/Whatsapp_SMS_Bomber/mycontacts.py
iamakkkhil/Rotten-Scripts
116ae502271d699db88add5fd1cf733d01134b7d
[ "MIT" ]
1,127
2020-02-16T04:14:00.000Z
2022-03-31T21:37:24.000Z
Python/Whatsapp_SMS_Bomber/mycontacts.py
iamakkkhil/Rotten-Scripts
116ae502271d699db88add5fd1cf733d01134b7d
[ "MIT" ]
1,123
2020-06-20T04:00:11.000Z
2022-03-31T13:23:45.000Z
Python/Whatsapp_SMS_Bomber/mycontacts.py
iamakkkhil/Rotten-Scripts
116ae502271d699db88add5fd1cf733d01134b7d
[ "MIT" ]
669
2020-05-30T16:14:43.000Z
2022-03-31T14:36:11.000Z
my_contacts = ["Ankita", "Bhai"] # Note that the names you add here should match the format of your contact list in your whatsapp
43.333333
96
0.753846
my_contacts = ["Ankita", "Bhai"]
true
true
f75f526f6cf70686a5af6d35a8f93aeb907045a5
2,430
py
Python
zeekofile/_default_config.py
sqlalchemyorg/zeekofile
6592ed8e139fa41b5f70e865b58427eb9fdb8cd8
[ "MIT" ]
1
2022-02-20T08:02:00.000Z
2022-02-20T08:02:00.000Z
zeekofile/_default_config.py
sqlalchemyorg/zeekofile
6592ed8e139fa41b5f70e865b58427eb9fdb8cd8
[ "MIT" ]
1
2021-07-23T19:45:58.000Z
2021-07-23T19:45:58.000Z
zeekofile/_default_config.py
sqlalchemyorg/zeekofile
6592ed8e139fa41b5f70e865b58427eb9fdb8cd8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This is the canonical _config.py with all default settings. Individual sites have a _config.py which can override these settings. """ # site URL site.url = "http://www.yoursite.com" blog = controllers.blog blog.enabled = False # blog path relative to site URL blog.path = "/blog" blog...
22.5
69
0.685185
site.url = "http://www.yoursite.com" blog = controllers.blog blog.enabled = False blog.path = "/blog" blog.name = "Your Blog's Name" blog.description = "Your Blog's short description" blog.timezone = "US/Eastern" blog.posts_per_page = 5 # automatically based on the following format:) # Available string repla...
true
true
f75f5290c0fccd33e3194d8892984d9f37c470b4
3,657
py
Python
MemProfiling/scheduler.py
razkey23/HybridMem-Scheduler
58984c5ce461e21ead02f29f02c3628ab85c70e2
[ "MIT" ]
null
null
null
MemProfiling/scheduler.py
razkey23/HybridMem-Scheduler
58984c5ce461e21ead02f29f02c3628ab85c70e2
[ "MIT" ]
null
null
null
MemProfiling/scheduler.py
razkey23/HybridMem-Scheduler
58984c5ce461e21ead02f29f02c3628ab85c70e2
[ "MIT" ]
null
null
null
''' INFO this class implements the scheduler Uses the AddressSpace for the movement of pages between NVM-DRAM. This class mainly classifies which pages should be moved takes as input: trafficGen , AddressSpace,policy, number of requests per interval ,and DRAM/NVM ratio) After running the scheduler we c...
38.494737
178
0.625103
from trafficGen import * from page import * from addressSpace import * class Scheduler: def __init__(self): self.policy ='' self.memory=None self.traffic=None self.num_reqs_per_ep=0 self.curr_ep=0 self.num_migr=0 self.l1_hits=0 self.num_periods=0 ...
true
true
f75f5359f410d455ce94bfd3a42fabcfba855d6c
217
py
Python
source/sounds/manager.py
Mio-coder/clicer
0387c65f7e6a9467df5c5c27cb70018ed7ec7c72
[ "Apache-2.0" ]
null
null
null
source/sounds/manager.py
Mio-coder/clicer
0387c65f7e6a9467df5c5c27cb70018ed7ec7c72
[ "Apache-2.0" ]
null
null
null
source/sounds/manager.py
Mio-coder/clicer
0387c65f7e6a9467df5c5c27cb70018ed7ec7c72
[ "Apache-2.0" ]
null
null
null
from os.path import join, abspath from pygame.mixer import Sound def get_song(song: str) -> Sound: return Sound(get_path(song)) def get_path(name: str): return join(abspath(""), "source", "sounds", name)
18.083333
54
0.691244
from os.path import join, abspath from pygame.mixer import Sound def get_song(song: str) -> Sound: return Sound(get_path(song)) def get_path(name: str): return join(abspath(""), "source", "sounds", name)
true
true
f75f53ba25a48c7bd462d3e43e2cc39671d8a1a3
136
py
Python
google_problems/problem_86.py
saadaoui-salah/Daily-Coding-Problem
48378fd74e948513a512302003d1f6bed869115b
[ "MIT" ]
null
null
null
google_problems/problem_86.py
saadaoui-salah/Daily-Coding-Problem
48378fd74e948513a512302003d1f6bed869115b
[ "MIT" ]
null
null
null
google_problems/problem_86.py
saadaoui-salah/Daily-Coding-Problem
48378fd74e948513a512302003d1f6bed869115b
[ "MIT" ]
null
null
null
"""This problem was asked by Google. Explain the difference between composition and inheritance. In which cases would you use each? """
34
94
0.779412
true
true
f75f540e8ff5cce613be027263aad2a7f9bf6345
1,293
py
Python
tests/test_basic.py
avramidis/chocolate-distribution
0b8bcf04bc29b82e8cf01fdb99f564662e8e583b
[ "MIT" ]
null
null
null
tests/test_basic.py
avramidis/chocolate-distribution
0b8bcf04bc29b82e8cf01fdb99f564662e8e583b
[ "MIT" ]
null
null
null
tests/test_basic.py
avramidis/chocolate-distribution
0b8bcf04bc29b82e8cf01fdb99f564662e8e583b
[ "MIT" ]
null
null
null
import unittest import sys sys.path.append('..') import chocolatedistribution.getcuts class TestScoreMethod(unittest.TestCase): """Class with the unit tests. """ def test_given(self): chocolates = [2, 5, 7] children = [3, 2, 5, 1] cuts = chocolatedistribution.getcuts.giveChocolate(...
31.536585
80
0.633411
import unittest import sys sys.path.append('..') import chocolatedistribution.getcuts class TestScoreMethod(unittest.TestCase): def test_given(self): chocolates = [2, 5, 7] children = [3, 2, 5, 1] cuts = chocolatedistribution.getcuts.giveChocolate(chocolates, children) self.assertE...
true
true
f75f5450e53ee561cec9ec48ee1fe22859693131
2,014
py
Python
tests/bugs/core_5147_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5147_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5147_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_5147 # title: create trigger fails with ambiguous field name between table B and table A error # decription: # tracker_id: CORE-5147 # min_versions: ['3.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action ...
24.864198
96
0.634558
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) test_script_1 = """ -- Result: OK on build based on sources 18-03-2016 14:40 -- (take sources from github, build No. was wrong - 32400). ...
true
true
f75f54e95d66b909f1f89f201bdca50a8fc5fd19
2,354
py
Python
mannequinchallenge/infer.py
plarr2020-team1/mannequinchallenge
4aff68aedad8619a2ec557f9162cc9692181318c
[ "Apache-2.0" ]
null
null
null
mannequinchallenge/infer.py
plarr2020-team1/mannequinchallenge
4aff68aedad8619a2ec557f9162cc9692181318c
[ "Apache-2.0" ]
1
2020-07-05T10:24:10.000Z
2020-07-06T10:30:17.000Z
mannequinchallenge/infer.py
plarr2020-team1/mannequinchallenge
4aff68aedad8619a2ec557f9162cc9692181318c
[ "Apache-2.0" ]
null
null
null
import torch import numpy as np from mannequinchallenge.options.train_options import TrainOptions from mannequinchallenge.loaders import aligned_data_loader from mannequinchallenge.models import pix2pix_model model = None class DictX(dict): def __getattr__(self, key): try: return self[key] ...
26.155556
82
0.624469
import torch import numpy as np from mannequinchallenge.options.train_options import TrainOptions from mannequinchallenge.loaders import aligned_data_loader from mannequinchallenge.models import pix2pix_model model = None class DictX(dict): def __getattr__(self, key): try: return self[key] ...
true
true
f75f55ae201da24e01a4e4f20124f513de21281c
619
py
Python
suggest_songs.py
DOsinga/marconi
2533725bf30a63c1c2e117b6c8f9414218ceec2f
[ "Apache-2.0" ]
2
2017-05-26T17:32:38.000Z
2017-08-27T07:59:58.000Z
suggest_songs.py
DOsinga/marconi
2533725bf30a63c1c2e117b6c8f9414218ceec2f
[ "Apache-2.0" ]
null
null
null
suggest_songs.py
DOsinga/marconi
2533725bf30a63c1c2e117b6c8f9414218ceec2f
[ "Apache-2.0" ]
2
2017-05-09T05:06:33.000Z
2021-08-03T11:49:11.000Z
#!/usr/bin/env python import pickle from collections import Counter import re import string import gensim, logging import multiprocessing logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) MODEL_PATH = 'songs.model' TRACKS_INFO_PATH = 'tracks-info.pickle' def main(): songs...
26.913043
91
0.74475
import pickle from collections import Counter import re import string import gensim, logging import multiprocessing logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) MODEL_PATH = 'songs.model' TRACKS_INFO_PATH = 'tracks-info.pickle' def main(): songs = pickle.load(open(TR...
true
true
f75f55c80f5c9a322a7ce8057c9cdf35a6898f75
6,126
py
Python
src/prefect/run_configs/ecs.py
BluePoof/prefect
59dc4eb965ee83bdb1157ee41c9423917d1101ea
[ "Apache-2.0" ]
1
2020-12-07T14:26:50.000Z
2020-12-07T14:26:50.000Z
src/prefect/run_configs/ecs.py
BluePoof/prefect
59dc4eb965ee83bdb1157ee41c9423917d1101ea
[ "Apache-2.0" ]
1
2020-05-24T17:04:47.000Z
2020-05-24T17:04:47.000Z
src/prefect/run_configs/ecs.py
BluePoof/prefect
59dc4eb965ee83bdb1157ee41c9423917d1101ea
[ "Apache-2.0" ]
null
null
null
from typing import Union, Iterable import yaml from prefect.run_configs.base import RunConfig from prefect.utilities.filesystems import parse_path class ECSRun(RunConfig): """Configure a flow-run to run as an ECS Task. ECS Tasks are composed of task definitions and runtime parameters. Task definitions...
40.569536
90
0.630754
from typing import Union, Iterable import yaml from prefect.run_configs.base import RunConfig from prefect.utilities.filesystems import parse_path class ECSRun(RunConfig): def __init__( self, *, task_definition: dict = None, task_definition_path: str = None, task_definit...
true
true
f75f56224aa9ee7da5d241747df3b594d7084afe
2,938
py
Python
api/authapp/migrations/0001_initial.py
NicolasQueiroga/django-backend
4bbe8d7b2c7f291af9430a98391df208020b0b34
[ "MIT" ]
null
null
null
api/authapp/migrations/0001_initial.py
NicolasQueiroga/django-backend
4bbe8d7b2c7f291af9430a98391df208020b0b34
[ "MIT" ]
null
null
null
api/authapp/migrations/0001_initial.py
NicolasQueiroga/django-backend
4bbe8d7b2c7f291af9430a98391df208020b0b34
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-11 15:06 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_m...
63.869565
329
0.660994
import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ m...
true
true
f75f56af74f5ef9529f71aa1ca2671889b29b2bb
27,528
py
Python
test/functional/rpc_rawtransaction.py
BitPalnet/BitPal
0cce7aea31a2e45fecec0e2ef42728aa26355704
[ "MIT" ]
1
2021-03-09T22:25:20.000Z
2021-03-09T22:25:20.000Z
test/functional/rpc_rawtransaction.py
BitPalnet/BitPal
0cce7aea31a2e45fecec0e2ef42728aa26355704
[ "MIT" ]
null
null
null
test/functional/rpc_rawtransaction.py
BitPalnet/BitPal
0cce7aea31a2e45fecec0e2ef42728aa26355704
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The BitPal Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransactio...
55.837728
263
0.652172
from collections import OrderedDict from decimal import Decimal from io import BytesIO from test_framework.messages import CTransaction, ToHex from test_framework.test_framework import BitPalTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, connect_nodes, hex_str_to...
true
true
f75f56bb5db6b474850e98955218a5b622ae9d4e
1,576
py
Python
userbot/plugins/tagall.py
LUCKYRAJPUTOP/EllipsUserbot
a995ae32bb895897eedb1c71051c2a8b82366304
[ "MIT" ]
null
null
null
userbot/plugins/tagall.py
LUCKYRAJPUTOP/EllipsUserbot
a995ae32bb895897eedb1c71051c2a8b82366304
[ "MIT" ]
null
null
null
userbot/plugins/tagall.py
LUCKYRAJPUTOP/EllipsUserbot
a995ae32bb895897eedb1c71051c2a8b82366304
[ "MIT" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2 from telethon.tl.types import ChannelParticipantsAdmins from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from us...
35.818182
82
0.695431
from telethon.tl.types import ChannelParticipantsAdmins from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"tagall (.*)", outgoing=True)) @bot.on(sudo_cmd(pattern=r"tagall (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: ...
true
true
f75f56da07863bf68a68f89adfb3a1524d06cf9c
661
py
Python
scripts/spectrogram_example.py
KISMED-TUDa/ECG_Classification
7df7b6d28287f592536cdbf01b6aec73e7b045ef
[ "MIT" ]
3
2021-12-07T17:08:00.000Z
2021-12-08T23:16:57.000Z
scripts/spectrogram_example.py
KISMED-TUDa/ECG_Classification
7df7b6d28287f592536cdbf01b6aec73e7b045ef
[ "MIT" ]
1
2021-12-09T00:33:41.000Z
2021-12-09T15:59:48.000Z
scripts/spectrogram_example.py
KISMED-TUDa/ECG_Classification
7df7b6d28287f592536cdbf01b6aec73e7b045ef
[ "MIT" ]
1
2021-07-30T14:53:48.000Z
2021-07-30T14:53:48.000Z
from scipy.signal import spectrogram import numpy as np import matplotlib.pyplot as plt import torch import torchaudio from wettbewerb import load_references if __name__ == '__main__': ecg_leads = load_references("../data/training/")[0] for ecg_lead_ in ecg_leads: if ecg_lead_.shape[0] == 18000: ...
30.045455
118
0.694402
from scipy.signal import spectrogram import numpy as np import matplotlib.pyplot as plt import torch import torchaudio from wettbewerb import load_references if __name__ == '__main__': ecg_leads = load_references("../data/training/")[0] for ecg_lead_ in ecg_leads: if ecg_lead_.shape[0] == 18000: ...
true
true
f75f5746d43dbd954fcb58763faa0c30f62fd382
52,922
py
Python
venv/Lib/site-packages/music21/analysis/reduction.py
alimirzazadeh/wolfGANg
5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c
[ "MIT" ]
1
2022-01-28T00:03:19.000Z
2022-01-28T00:03:19.000Z
venv/Lib/site-packages/music21/analysis/reduction.py
alimirzazadeh/wolfGANg
5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c
[ "MIT" ]
null
null
null
venv/Lib/site-packages/music21/analysis/reduction.py
alimirzazadeh/wolfGANg
5bf56f7d8e6c1c283edb98bdaecfd5a606b4462c
[ "MIT" ]
1
2021-11-23T00:49:26.000Z
2021-11-23T00:49:26.000Z
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Name: reduction.py # Purpose: Tools for creating a score reduction. # # Authors: Christopher Ariza # Michael Scott Cuthbert # # Copyright: Copyright © 2011-2013 Michael Scott Cut...
40.12282
98
0.513794
import re import unittest import copy from music21 import exceptions21 from music21 import clef from music21 import common from music21 import expressions from music21 import instrument from music21 import note from music21 import pitch from music21 import prebase from music21 import stream from music21 import envir...
true
true
f75f576eab8186e4b1ed1a86ab151680fbf2f5dc
40,471
py
Python
uds/packet/can_packet.py
mdabrowski1990/uds
1aee0c1de446ee3dd461706949504f2c218db1e8
[ "MIT" ]
18
2021-03-28T22:39:18.000Z
2022-02-13T21:50:37.000Z
uds/packet/can_packet.py
mdabrowski1990/uds
1aee0c1de446ee3dd461706949504f2c218db1e8
[ "MIT" ]
153
2021-02-09T09:27:05.000Z
2022-03-29T06:09:15.000Z
uds/packet/can_packet.py
mdabrowski1990/uds
1aee0c1de446ee3dd461706949504f2c218db1e8
[ "MIT" ]
1
2021-05-13T16:01:46.000Z
2021-05-13T16:01:46.000Z
"""CAN bus specific implementation of UDS packets.""" __all__ = ["CanPacket", "AnyCanPacket"] from typing import Optional, Any from warnings import warn from uds.utilities import Nibble, RawByte, RawBytes, RawBytesTuple, validate_raw_bytes, \ AmbiguityError, UnusedArgumentWarning from uds.transmission_attributes...
56.523743
118
0.624101
__all__ = ["CanPacket", "AnyCanPacket"] from typing import Optional, Any from warnings import warn from uds.utilities import Nibble, RawByte, RawBytes, RawBytesTuple, validate_raw_bytes, \ AmbiguityError, UnusedArgumentWarning from uds.transmission_attributes import AddressingType, AddressingTypeAlias from uds.c...
true
true
f75f5807831a7d12fa8899413e9d6ac4805245c2
3,637
py
Python
Examples/python_client/openapi_client/com/h21lab/TS29573_N32_Handshake/handler/callback_name.py
H21lab/5GC_build
bbc8bbd9158a2124ca486572906020a91789733e
[ "Apache-2.0" ]
12
2020-06-04T06:58:13.000Z
2021-12-15T14:26:56.000Z
Examples/python_client/openapi_client/com/h21lab/TS29573_N32_Handshake/handler/callback_name.py
H21lab/5GC_build
bbc8bbd9158a2124ca486572906020a91789733e
[ "Apache-2.0" ]
3
2021-05-27T12:13:58.000Z
2021-12-15T05:45:44.000Z
Examples/python_client/openapi_client/com/h21lab/TS29573_N32_Handshake/handler/callback_name.py
H21lab/5GC_build
bbc8bbd9158a2124ca486572906020a91789733e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ N32 Handshake API N32-c Handshake Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. # noqa: E501 The version of the OpenAPI document: 1.1.0.alpha-3 Generated by: https://openapi-generator.tech """ import pprint impo...
29.811475
146
0.594996
import pprint import re import six from openapi_client.configuration import Configuration class CallbackName(object): openapi_types = { 'callback_type': 'str' } attribute_map = { 'callback_type': 'callbackType' } def __init__(self, callback_type=None, local_vars_configurat...
true
true
f75f58ca15453906213e2e51412d2e9d92887b18
5,186
py
Python
plugins/ldap/girder_ldap/__init__.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
plugins/ldap/girder_ldap/__init__.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
plugins/ldap/girder_ldap/__init__.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import ldap import six from girder import events, logger from girder.api import access from girder.api.describe import autoDescribeRoute, Description from girder.api.rest import boundHandler from girder.exceptions import ValidationException from girder.models.setting import Setting from girder....
34.573333
91
0.620324
import ldap import six from girder import events, logger from girder.api import access from girder.api.describe import autoDescribeRoute, Description from girder.api.rest import boundHandler from girder.exceptions import ValidationException from girder.models.setting import Setting from girder.models.user import User ...
true
true
f75f58e56e9cc6d0e4fd5d953c544f9534dae47a
95,737
py
Python
src/sage/combinat/free_module.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/free_module.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/free_module.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
""" Free modules """ #***************************************************************************** # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>, # 2007-2009 Nicolas M. Thiery <nthiery at users.sf.net> # 2010 Christian Stump <christian.stump@univie.ac.at> ...
35.603198
202
0.521303
from sage.structure.unique_representation import UniqueRepresentation from sage.structure.element import Element, have_same_parent from sage.structure.parent import Parent from sage.structure.element import have_same_parent from sage.structure.indexed_generators import IndexedGenerators from sage.modules.free_module_el...
true
true
f75f5af3afd258d9ede06d3eaad6a157add73c7f
2,528
py
Python
examples/infersent.py
nstfk/SentEval
2bd42ae700fcfc4fb11b0ad55988ac95742d5334
[ "BSD-3-Clause" ]
null
null
null
examples/infersent.py
nstfk/SentEval
2bd42ae700fcfc4fb11b0ad55988ac95742d5334
[ "BSD-3-Clause" ]
null
null
null
examples/infersent.py
nstfk/SentEval
2bd42ae700fcfc4fb11b0ad55988ac95742d5334
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # """ InferSent models. See https://github.com/facebookresearch/InferSent. """ from __future__ import absolute_import, division,...
29.741176
119
0.693829
from __future__ import absolute_import, division, unicode_literals import sys import os import torch import logging import sys print(sys.argv[1:]) from models import InferSent logging.basicConfig(format='%(asctime)s : %(message)s', level=logging.DEBUG) logging.info("\n\n\nPATH_TO_DATA: " + str(sys.argv[1]) + "\nP...
true
true
f75f5af9cdb43b8093c64ff76e61ace5a3bfad33
305
py
Python
voxel_globe/task/urls.py
ngageoint/voxel-globe
91f386de652b704942165889c10468b2c4cf4eec
[ "MIT" ]
28
2015-07-27T23:57:24.000Z
2020-04-05T15:10:52.000Z
voxel_globe/task/urls.py
VisionSystemsInc/voxel_globe
6eb3fca5586726428e9d914f7b730ca164c64a52
[ "MIT" ]
50
2016-02-11T15:50:22.000Z
2016-10-27T22:38:27.000Z
voxel_globe/task/urls.py
ngageoint/voxel-globe
91f386de652b704942165889c10468b2c4cf4eec
[ "MIT" ]
8
2015-07-27T19:22:03.000Z
2021-01-04T09:44:48.000Z
from django.conf.urls import url import voxel_globe.task.views urlpatterns = [ url(r'^status/$', voxel_globe.task.views.status, name='status'), url(r'^revoke/$', voxel_globe.task.views.revoke, name='revoke'), url(r'^mark_as_read/$', voxel_globe.task.views.mark_as_read, name='mark_as_read') ]
38.125
85
0.721311
from django.conf.urls import url import voxel_globe.task.views urlpatterns = [ url(r'^status/$', voxel_globe.task.views.status, name='status'), url(r'^revoke/$', voxel_globe.task.views.revoke, name='revoke'), url(r'^mark_as_read/$', voxel_globe.task.views.mark_as_read, name='mark_as_read') ]
true
true
f75f5c56a9dbaae9c291b02ed6b1cea623d58a69
25,469
py
Python
app/plugin/bca/user_db/journal_handler.py
MU-Software/bca_backend
282db3908ee0b2c95c5e6bd6d6458077e941f343
[ "MIT" ]
null
null
null
app/plugin/bca/user_db/journal_handler.py
MU-Software/bca_backend
282db3908ee0b2c95c5e6bd6d6458077e941f343
[ "MIT" ]
null
null
null
app/plugin/bca/user_db/journal_handler.py
MU-Software/bca_backend
282db3908ee0b2c95c5e6bd6d6458077e941f343
[ "MIT" ]
null
null
null
import datetime import enum import flask_sqlalchemy as fsql import json import os import sqlite3 import typing import uuid import redis import redis_lock import sqlalchemy as sql import sqlalchemy.ext.declarative as sqldec import sqlalchemy.orm as sqlorm import app.common.utils as utils import app.common.firebase_not...
47.87406
117
0.576623
import datetime import enum import flask_sqlalchemy as fsql import json import os import sqlite3 import typing import uuid import redis import redis_lock import sqlalchemy as sql import sqlalchemy.ext.declarative as sqldec import sqlalchemy.orm as sqlorm import app.common.utils as utils import app.common.firebase_not...
true
true
f75f5c5ca4fb77cd0bacd7854d1a38886dc49dd0
13,138
py
Python
safe_exploration/episode_runner.py
oscarkey/safe-exploration
32f0582a7b54ab7d4c1d415afbcf5e9554e8bcec
[ "MIT" ]
null
null
null
safe_exploration/episode_runner.py
oscarkey/safe-exploration
32f0582a7b54ab7d4c1d415afbcf5e9554e8bcec
[ "MIT" ]
null
null
null
safe_exploration/episode_runner.py
oscarkey/safe-exploration
32f0582a7b54ab7d4c1d415afbcf5e9554e8bcec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Sep 29 11:11:23 2017 @author: tkoller """ import time import warnings import numpy as np from scipy.spatial.qhull import ConvexHull from . import utils_ellipsoid from .safempc_cem import MpcResult from .sampling_models import MonteCarloSafetyVerification from .utils import ...
37.008451
114
0.5768
import time import warnings import numpy as np from scipy.spatial.qhull import ConvexHull from . import utils_ellipsoid from .safempc_cem import MpcResult from .sampling_models import MonteCarloSafetyVerification from .utils import generate_initial_samples, unavailable from .utils_config import create_solver, create_...
true
true
f75f5cc0d4a40f2327912627336e9c7e7d5832b2
10,536
py
Python
ptah/tests/test_migrate.py
djedproject/ptah
188c34b906af0e22748e1b0a3a7a841cfeeb4bd3
[ "BSD-3-Clause" ]
13
2015-03-18T16:06:50.000Z
2021-04-27T19:14:35.000Z
ptah/tests/test_migrate.py
djedproject/ptah
188c34b906af0e22748e1b0a3a7a841cfeeb4bd3
[ "BSD-3-Clause" ]
null
null
null
ptah/tests/test_migrate.py
djedproject/ptah
188c34b906af0e22748e1b0a3a7a841cfeeb4bd3
[ "BSD-3-Clause" ]
6
2015-01-07T11:17:32.000Z
2020-04-02T11:35:03.000Z
import os import ptah import shutil import tempfile from pyramid.config import ConfigurationConflictError ptah.register_migration('ptah', 'ptah:tests/migrations') class TestRegisterMigration(ptah.PtahTestCase): _init_ptah = False _auto_commit = False def test_register(self): from ptah.migrate i...
28.945055
80
0.620254
import os import ptah import shutil import tempfile from pyramid.config import ConfigurationConflictError ptah.register_migration('ptah', 'ptah:tests/migrations') class TestRegisterMigration(ptah.PtahTestCase): _init_ptah = False _auto_commit = False def test_register(self): from ptah.migrate i...
true
true
f75f5d31e39106a4568f624cf03810a0d24468c2
2,521
py
Python
compiler/router/supply_grid.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
compiler/router/supply_grid.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
compiler/router/supply_grid.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # from signal_grid import signal_grid from grid_pa...
30.743902
81
0.589052
from signal_grid import signal_grid from grid_path import grid_path class supply_grid(signal_grid): def __init__(self, ll, ur, track_width): signal_grid.__init__(self, ll, ur, track_width) def reinit(self): self.source = set() self.target = set() for...
true
true
f75f5d43e480058d936b9bbd96f70fed69380ded
6,655
py
Python
mne/preprocessing/maxfilter.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
1
2020-11-05T21:30:15.000Z
2020-11-05T21:30:15.000Z
mne/preprocessing/maxfilter.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
1
2020-04-24T15:35:41.000Z
2020-04-24T15:35:41.000Z
mne/preprocessing/maxfilter.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
1
2020-01-07T03:16:59.000Z
2020-01-07T03:16:59.000Z
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import os from ..bem import fit_sphere_to_headshape from ..io import read_raw_fif from ..utils import logger,...
33.275
79
0.594741
import os from ..bem import fit_sphere_to_headshape from ..io import read_raw_fif from ..utils import logger, verbose, warn def _mxwarn(msg): warn('Possible MaxFilter bug: %s, more info: ' 'http://imaging.mrc-cbu.cam.ac.uk/meg/maxbugs' % msg) @verbose def apply_maxfilter(in_fname, out_fname, origin=N...
true
true
f75f5e2ebf2a7835cf802ea564d46b1e66b5ba3f
12,483
py
Python
wes_service/toil_wes.py
gijzelaerr/workflow-service
e2cc4b5ae9a04d4fdd1f86272edb993c0dd0b926
[ "Apache-2.0" ]
null
null
null
wes_service/toil_wes.py
gijzelaerr/workflow-service
e2cc4b5ae9a04d4fdd1f86272edb993c0dd0b926
[ "Apache-2.0" ]
null
null
null
wes_service/toil_wes.py
gijzelaerr/workflow-service
e2cc4b5ae9a04d4fdd1f86272edb993c0dd0b926
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import json import os import subprocess import time import logging import uuid import shutil from multiprocessing import Process from wes_service.util import WESBackend logging.basicConfig(level=logging.INFO) class ToilWorkflow(object): def __init__(self, run_id): "...
36.607038
112
0.557799
from __future__ import print_function import json import os import subprocess import time import logging import uuid import shutil from multiprocessing import Process from wes_service.util import WESBackend logging.basicConfig(level=logging.INFO) class ToilWorkflow(object): def __init__(self, run_id): s...
true
true
f75f5e62e81001b897fb460b33f0689776a225bb
11,034
py
Python
airflow/hooks/S3_hook.py
guanghetv/incubator-airflow
a148043107f147ce7d3617308f119be27810ec5a
[ "Apache-2.0" ]
null
null
null
airflow/hooks/S3_hook.py
guanghetv/incubator-airflow
a148043107f147ce7d3617308f119be27810ec5a
[ "Apache-2.0" ]
null
null
null
airflow/hooks/S3_hook.py
guanghetv/incubator-airflow
a148043107f147ce7d3617308f119be27810ec5a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
35.028571
90
0.588544
from airflow.exceptions import AirflowException from airflow.contrib.hooks.aws_hook import AwsHook from six import BytesIO from urllib.parse import urlparse import re import fnmatch class S3Hook(AwsHook): def get_conn(self): return self.get_client_type('s3') @staticmethod def parse_s3_url(s3url...
true
true
f75f5e8f41c17f73b0093ddab6c84c0c99f333fe
1,376
py
Python
advisor/view_advisor/utils.py
opengauss-mirror/openGauss-AI
449ce3cac81ced74dd56edf76709553411b0814a
[ "MulanPSL-1.0" ]
1
2021-12-22T08:31:07.000Z
2021-12-22T08:31:07.000Z
advisor/view_advisor/utils.py
opengauss-mirror/openGauss-AI
449ce3cac81ced74dd56edf76709553411b0814a
[ "MulanPSL-1.0" ]
null
null
null
advisor/view_advisor/utils.py
opengauss-mirror/openGauss-AI
449ce3cac81ced74dd56edf76709553411b0814a
[ "MulanPSL-1.0" ]
3
2021-12-16T13:55:57.000Z
2022-02-24T09:53:49.000Z
/* * Copyright (c) 2020 Huawei Technologies Co.,Ltd. * * openGauss is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * * http://license.coscl.org.cn/MulanPSL2 * * THIS SOFTWARE IS PROVIDED ...
29.913043
87
0.65625
/* * Copyright (c) 2020 Huawei Technologies Co.,Ltd. * * openGauss is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * * http://license.coscl.org.cn/MulanPSL2 * * THIS SOFTWARE IS PROVIDED ...
false
true
f75f5ea50e8178f93144a64337f926b8f4e16539
5,295
py
Python
models/debug_utils.py
norton-chris/MARS-Net
6f671837d0629422680c78adf9b643894debae70
[ "MIT" ]
null
null
null
models/debug_utils.py
norton-chris/MARS-Net
6f671837d0629422680c78adf9b643894debae70
[ "MIT" ]
null
null
null
models/debug_utils.py
norton-chris/MARS-Net
6f671837d0629422680c78adf9b643894debae70
[ "MIT" ]
null
null
null
''' Author Junbong Jang Date 9/2/2020 Contains debugging functions useful for deep learning research ''' import sys sys.path.append('..') sys.path.append('../data_handle') from UserParams import UserParams from data_processor import get_std_mean_from_images import math import os import cv2 import num...
35.536913
130
0.61322
import sys sys.path.append('..') sys.path.append('../data_handle') from UserParams import UserParams from data_processor import get_std_mean_from_images import math import os import cv2 import numpy as np import h5py import tensorflow as tf from tensorflow.keras import backend as K from functools import w...
true
true
f75f5f309e545e79dad30a6cbf79a8be9e94225f
932
py
Python
package/cisco_connect/telnet.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-05T09:30:23.000Z
2022-03-09T13:27:56.000Z
package/cisco_connect/telnet.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
null
null
null
package/cisco_connect/telnet.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-06T03:44:35.000Z
2022-03-04T21:20:40.000Z
print("telnet") import time import telnetlib __all__ = ["CiscoTelnet"] class CiscoTelnet: def __init__(self, ip, username, password, enable, disable_paging=True): self.telnet = telnetlib.Telnet(ip) self.telnet.read_until(b"Username:") self.telnet.write(username.encode("utf-8") + b"\n") ...
32.137931
76
0.637339
print("telnet") import time import telnetlib __all__ = ["CiscoTelnet"] class CiscoTelnet: def __init__(self, ip, username, password, enable, disable_paging=True): self.telnet = telnetlib.Telnet(ip) self.telnet.read_until(b"Username:") self.telnet.write(username.encode("utf-8") + b"\n") ...
true
true
f75f6107ba028c22bffa86de95304a705b3928b0
830
py
Python
laxy_backend/migrations/0008_auto_20190903_0019.py
MonashBioinformaticsPlatform/laxy
fa9cfc3d9b2738ec0b9f471ddf4a4235cb6eb594
[ "Apache-2.0" ]
1
2020-11-19T15:10:42.000Z
2020-11-19T15:10:42.000Z
laxy_backend/migrations/0008_auto_20190903_0019.py
MonashBioinformaticsPlatform/laxy
fa9cfc3d9b2738ec0b9f471ddf4a4235cb6eb594
[ "Apache-2.0" ]
177
2018-10-28T23:01:24.000Z
2022-02-26T06:35:29.000Z
laxy_backend/migrations/0008_auto_20190903_0019.py
MonashBioinformaticsPlatform/laxy
fa9cfc3d9b2738ec0b9f471ddf4a4235cb6eb594
[ "Apache-2.0" ]
2
2019-03-14T10:06:19.000Z
2020-08-24T19:41:28.000Z
# Generated by Django 2.2.4 on 2019-09-03 00:19 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('laxy_backend', '0007_auto_20190805_0451'), ] operations = [ migrations.Alt...
31.923077
161
0.662651
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('laxy_backend', '0007_auto_20190805_0451'), ] operations = [ migrations.AlterField( model_name='samplecart', ...
true
true
f75f627040a738f9c4ee208c98458fb6f2966ba2
4,674
py
Python
test/test_npu/test_network_ops/test_upsample_bicubic2d_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_upsample_bicubic2d_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_upsample_bicubic2d_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/lice...
50.804348
106
0.589431
import torch import numpy as np import sys import copy from common_utils import TestCase, run_tests from common_device_type import dtypes, instantiate_device_type_tests from util_test import create_common_tensor class TestUpsampleBicubic2dBackward(TestCase): def cpu_op_exec(self, input1, output_size, align_corne...
true
true
f75f62cf52e9d9715f107378de4e9fcdf349a0f8
1,175
py
Python
.history/ClassFiles/OOP/Encapsulation_20210105151519.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/OOP/Encapsulation_20210105151519.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/OOP/Encapsulation_20210105151519.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
''' Encapsulation : Part 1 Encapsulation is the process of restricting access to methods and variables in a class in order to prevent direct data modification so it prevents accidental data modification. Encapsulation basically allows the internal representation of an object to be hidden from the view o...
21.363636
176
0.668085
class Cars: def __init__(self,speed, color): self.speed = speed self.color = color def set_speed(self,value): self.speed = value def get_speed(self): return self.speed ford = Cars(250,"green") nissan = Cars(300,"red") toy
true
true
f75f64a62a2c46a2724450eaab902b46fe931258
10,156
py
Python
tests/test_personnel.py
soccermetrics/marcotti-events
759f3a4ee130fa155fd48e216ef6197a69ee2a33
[ "MIT" ]
22
2015-12-14T20:38:32.000Z
2020-12-26T07:40:26.000Z
tests/test_personnel.py
soccermetrics/marcotti-events
759f3a4ee130fa155fd48e216ef6197a69ee2a33
[ "MIT" ]
null
null
null
tests/test_personnel.py
soccermetrics/marcotti-events
759f3a4ee130fa155fd48e216ef6197a69ee2a33
[ "MIT" ]
6
2015-12-20T05:08:57.000Z
2020-06-28T23:57:31.000Z
# coding=utf-8 from datetime import date import pytest from sqlalchemy.exc import IntegrityError import marcottievents.models.common.enums as enums import marcottievents.models.common.overview as mco import marcottievents.models.common.personnel as mcp def test_person_generic_insert(session, person_data): """Pe...
45.954751
117
0.713371
from datetime import date import pytest from sqlalchemy.exc import IntegrityError import marcottievents.models.common.enums as enums import marcottievents.models.common.overview as mco import marcottievents.models.common.personnel as mcp def test_person_generic_insert(session, person_data): generic_person = mcp...
true
true
f75f65086e282aad5edcc16c1a6a2f8cd8efca4b
6,322
py
Python
plugins/filter/ad_group_conflicts_filters.py
OneIdentity/ansible-authentication-service
7d6ee8a5b2259d6a85e08a9a3be174571bfd4404
[ "Apache-2.0" ]
null
null
null
plugins/filter/ad_group_conflicts_filters.py
OneIdentity/ansible-authentication-service
7d6ee8a5b2259d6a85e08a9a3be174571bfd4404
[ "Apache-2.0" ]
null
null
null
plugins/filter/ad_group_conflicts_filters.py
OneIdentity/ansible-authentication-service
7d6ee8a5b2259d6a85e08a9a3be174571bfd4404
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Copyright (c) 2021, One Identity LLC # File: ad_group_conflicts_filters.py # Desc: Ansible filters for ad_group_conflicts role # Auth: Laszlo Nagy # Note: # -------------------------------------...
38.315152
100
0.562638
from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.errors import AnsibleFilterError def select_conflicting_groups_by_schema(group_objects_list, group_gid_number_attr, group_name_attr): attrs = ['DistinguishedName', group_name_attr, group_gid_number_attr] ...
true
true
f75f65cade7f494a85873b7e03b226ea4016085b
8,656
py
Python
python/paddle/fluid/tests/unittests/dist_fleet_ctr.py
grasswolfs/Paddle
0c2fff447c7d5b0bbad473a1590872c5343e1e56
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/dist_fleet_ctr.py
grasswolfs/Paddle
0c2fff447c7d5b0bbad473a1590872c5343e1e56
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/dist_fleet_ctr.py
grasswolfs/Paddle
0c2fff447c7d5b0bbad473a1590872c5343e1e56
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.945098
99
0.592537
from __future__ import print_function import shutil import tempfile import time import paddle import paddle.fluid as fluid import os import numpy as np import ctr_dataset_reader from test_dist_fleet_base import runtime_main, FleetDistRunnerBase fluid.default_startup_program().random_seed = 1 fluid.default_main_pro...
true
true
f75f6608f9eddf1e730488b5c0da70a9a844f4c1
1,051
py
Python
ddi_search_engine/Bio/Transcribe.py
dbmi-pitt/DIKB-Evidence-analytics
9ffd629db30c41ced224ff2afdf132ce9276ae3f
[ "MIT" ]
3
2015-06-08T17:58:54.000Z
2022-03-10T18:49:44.000Z
ddi_search_engine/Bio/Transcribe.py
dbmi-pitt/DIKB-Evidence-analytics
9ffd629db30c41ced224ff2afdf132ce9276ae3f
[ "MIT" ]
null
null
null
ddi_search_engine/Bio/Transcribe.py
dbmi-pitt/DIKB-Evidence-analytics
9ffd629db30c41ced224ff2afdf132ce9276ae3f
[ "MIT" ]
null
null
null
import string from Bio import Alphabet, Seq from Bio.Alphabet import IUPAC class Transcribe: def __init__(self, dna_alphabet, rna_alphabet): self.dna_alphabet = dna_alphabet self.rna_alphabet = rna_alphabet def transcribe(self, dna): assert dna.alphabet == self.dna_alphabet, \...
37.535714
70
0.629876
import string from Bio import Alphabet, Seq from Bio.Alphabet import IUPAC class Transcribe: def __init__(self, dna_alphabet, rna_alphabet): self.dna_alphabet = dna_alphabet self.rna_alphabet = rna_alphabet def transcribe(self, dna): assert dna.alphabet == self.dna_alphabet, \...
true
true
f75f66bd3b55ab16a19c20e2671c6e512bda5b52
1,104
py
Python
src/notification-hub/azext_notification_hub/vendored_sdks/notificationhubs/models/namespace_patch_parameters.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/notification-hub/azext_notification_hub/vendored_sdks/notificationhubs/models/namespace_patch_parameters.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/notification-hub/azext_notification_hub/vendored_sdks/notificationhubs/models/namespace_patch_parameters.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.454545
76
0.578804
from msrest.serialization import Model class NamespacePatchParameters(Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, } def __init__(self, **kwargs): super(NamespacePatchParameters, self).__init__(**kwargs) self....
true
true
f75f673ba9c02a8b2675415057e362649d2089fd
3,129
py
Python
source/normal_compare/image_classification/base_lr.py
geez0219/ARC
f2176f0d442d4a2d6028f0770b1efc1a9ae982b8
[ "Apache-2.0" ]
1
2021-10-11T07:28:36.000Z
2021-10-11T07:28:36.000Z
source/normal_compare/image_classification/base_lr.py
geez0219/ARC
f2176f0d442d4a2d6028f0770b1efc1a9ae982b8
[ "Apache-2.0" ]
null
null
null
source/normal_compare/image_classification/base_lr.py
geez0219/ARC
f2176f0d442d4a2d6028f0770b1efc1a9ae982b8
[ "Apache-2.0" ]
2
2021-06-15T21:07:53.000Z
2021-06-17T02:41:46.000Z
import fastestimator as fe import tensorflow as tf from fastestimator.op.numpyop.meta import Sometimes from fastestimator.op.numpyop.multivariate import HorizontalFlip, PadIfNeeded, RandomCrop from fastestimator.op.numpyop.univariate import CoarseDropout, Normalize from fastestimator.op.tensorop.loss import CrossEntrop...
39.1125
109
0.660594
import fastestimator as fe import tensorflow as tf from fastestimator.op.numpyop.meta import Sometimes from fastestimator.op.numpyop.multivariate import HorizontalFlip, PadIfNeeded, RandomCrop from fastestimator.op.numpyop.univariate import CoarseDropout, Normalize from fastestimator.op.tensorop.loss import CrossEntrop...
true
true
f75f67a138af39d1dfb6fd606da572792930c3b0
3,012
py
Python
create_neuro_prediction.py
launis/areadata
8cf0e30ec489ce9655fcd9829284d1ec70e7360d
[ "BSD-3-Clause" ]
null
null
null
create_neuro_prediction.py
launis/areadata
8cf0e30ec489ce9655fcd9829284d1ec70e7360d
[ "BSD-3-Clause" ]
null
null
null
create_neuro_prediction.py
launis/areadata
8cf0e30ec489ce9655fcd9829284d1ec70e7360d
[ "BSD-3-Clause" ]
null
null
null
def plot_history(hist): import matplotlib.pyplot as plt plt.figure() plt.xlabel('Epoch') plt.ylabel('Mean Squared Error') plt.plot(hist['epoch'], hist['mean_squared_error'], label='Train Error') plt.plot(hist['epoch'], hist['val_mean_squared_error'], label = 'Val ...
36.731707
150
0.698539
def plot_history(hist): import matplotlib.pyplot as plt plt.figure() plt.xlabel('Epoch') plt.ylabel('Mean Squared Error') plt.plot(hist['epoch'], hist['mean_squared_error'], label='Train Error') plt.plot(hist['epoch'], hist['val_mean_squared_error'], label = 'Val ...
true
true
f75f698645aa7dc9e4ac099575789899c5243806
1,103
py
Python
Modules/multiplication_table.py
Elizandtech/fun_problems
8dee14ee49a10c67ca4470e675d19095725c4d0f
[ "MIT" ]
null
null
null
Modules/multiplication_table.py
Elizandtech/fun_problems
8dee14ee49a10c67ca4470e675d19095725c4d0f
[ "MIT" ]
null
null
null
Modules/multiplication_table.py
Elizandtech/fun_problems
8dee14ee49a10c67ca4470e675d19095725c4d0f
[ "MIT" ]
null
null
null
# Write a program that prints a multiplication table. # Functions are for single unit tasks. Make a function for the printheader and the sequence(innerds of the table). def positiveinteger(N): try: posnum = int(N) except: raise ValueError('Not an integer.') if posnum <0: raise Value...
26.902439
114
0.62738
def positiveinteger(N): try: posnum = int(N) except: raise ValueError('Not an integer.') if posnum <0: raise ValueError('Less than 0') else: return posnum def printsequenceintable(N, I): maxnumber = positiveinteger(N) for column in range(1, maxnumber+1): ...
true
true
f75f6adf27e1f26e3578541864362daf9d58b137
10,052
py
Python
vvmovie/__init__.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
vvmovie/__init__.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
vvmovie/__init__.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # This code is subject to the (new) BSD license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the a...
41.028571
80
0.668424
""" Package vvmovie (visvis-movie) All submodules have been designed to be work independent of each-other (except the image2avi module, which requires the images2ims module). Provides the following functions: * readGif & writeGif -> a movie stored as animated GIF * readSwf & writeSwf -> a movie stored as shoc...
false
true
f75f6ae9bf4468bd6a18ce07cab1892ef9913f66
5,545
py
Python
tests/test_utils/test_sorted_trials.py
ytsmiling/optur
cbc56c60b322ea764592f01758798f745199b455
[ "MIT" ]
1
2022-01-19T09:18:15.000Z
2022-01-19T09:18:15.000Z
tests/test_utils/test_sorted_trials.py
ytsmiling/optur
cbc56c60b322ea764592f01758798f745199b455
[ "MIT" ]
null
null
null
tests/test_utils/test_sorted_trials.py
ytsmiling/optur
cbc56c60b322ea764592f01758798f745199b455
[ "MIT" ]
null
null
null
import math import uuid from optur.proto.study_pb2 import ObjectiveValue, Target, Trial from optur.utils.sorted_trials import ( SortedTrials, TrialKeyGenerator, TrialQualityFilter, ) def test_trial_quality_filter_remove_unknown() -> None: assert not TrialQualityFilter(filter_unknown=True)(Trial(last_...
35.774194
99
0.648873
import math import uuid from optur.proto.study_pb2 import ObjectiveValue, Target, Trial from optur.utils.sorted_trials import ( SortedTrials, TrialKeyGenerator, TrialQualityFilter, ) def test_trial_quality_filter_remove_unknown() -> None: assert not TrialQualityFilter(filter_unknown=True)(Trial(last_...
true
true
f75f6b2eedc9c37a4c9410f6f0347879c3aad265
801
py
Python
python/edna/src/edna/serializers/__init__.py
asuprem/edna
0753105708958117f2491d01f0d542825f64c273
[ "Apache-2.0" ]
3
2020-10-04T22:40:27.000Z
2021-12-14T14:28:11.000Z
python/edna/src/edna/serializers/__init__.py
asuprem/edna
0753105708958117f2491d01f0d542825f64c273
[ "Apache-2.0" ]
1
2020-10-22T19:58:53.000Z
2020-10-22T19:58:53.000Z
python/edna/src/edna/serializers/__init__.py
asuprem/edna
0753105708958117f2491d01f0d542825f64c273
[ "Apache-2.0" ]
4
2020-10-15T03:12:52.000Z
2021-03-25T20:03:54.000Z
from abc import ABCMeta, abstractmethod class Serializable: """Interface for Serialization. """ __metaclass__ = ABCMeta @abstractmethod def read(self, in_stream: bytes): """Convert from bytes to Serializable Args: in_stream (bytes): Input of bytes to deserialize ...
28.607143
66
0.697878
from abc import ABCMeta, abstractmethod class Serializable: __metaclass__ = ABCMeta @abstractmethod def read(self, in_stream: bytes): raise NotImplementedError @abstractmethod def write(self, out_stream): raise NotImplementedError from .StringSerializer import StringSerializer f...
true
true
f75f6c64809bf0241b7575c092826bd61f02a459
3,366
py
Python
server/yubikeys/yubikey_simulator.py
msdrigg/DuoAutoFiller
16245bfc1caa4fd5e0fe15e65e1392beb4d62ddb
[ "Apache-2.0", "MIT" ]
null
null
null
server/yubikeys/yubikey_simulator.py
msdrigg/DuoAutoFiller
16245bfc1caa4fd5e0fe15e65e1392beb4d62ddb
[ "Apache-2.0", "MIT" ]
2
2021-06-09T18:39:48.000Z
2021-06-10T20:37:06.000Z
server/yubikeys/yubikey_simulator.py
msdrigg/DuoAutoFiller
16245bfc1caa4fd5e0fe15e65e1392beb4d62ddb
[ "Apache-2.0", "MIT" ]
null
null
null
import six import random from datetime import datetime from Crypto.Cipher import AES import json from binascii import unhexlify MODHEX_DICT = { "0": "c", "1": "b", "2": "d", "3": 'e', "4": 'f', "5": 'g', "6": 'h', "7": 'i', "8": 'j', "9": 'k', "a": 'l', "b": 'n', "c...
30.880734
157
0.636661
import six import random from datetime import datetime from Crypto.Cipher import AES import json from binascii import unhexlify MODHEX_DICT = { "0": "c", "1": "b", "2": "d", "3": 'e', "4": 'f', "5": 'g', "6": 'h', "7": 'i', "8": 'j', "9": 'k', "a": 'l', "b": 'n', "c...
true
true
f75f6e87344f7a3cd1e339b8678b92b5c1557bca
11,587
py
Python
src/pyinfrabox/tests/test_json.py
AurelienCaille/InfraBox
1e7841b9e921087e462b8eafccb8114a8be864b9
[ "Apache-2.0" ]
1
2019-02-26T13:23:54.000Z
2019-02-26T13:23:54.000Z
src/pyinfrabox/tests/test_json.py
alchemistake/InfraBox
3842ea4529e4740e14df537fb912133766f63c64
[ "Apache-2.0" ]
null
null
null
src/pyinfrabox/tests/test_json.py
alchemistake/InfraBox
3842ea4529e4740e14df537fb912133766f63c64
[ "Apache-2.0" ]
1
2018-09-20T09:16:34.000Z
2018-09-20T09:16:34.000Z
import unittest from pyinfrabox import ValidationError from pyinfrabox.infrabox import validate_json class TestDockerCompose(unittest.TestCase): def raises_expect(self, data, expected): try: validate_json(data) assert False except ValidationError as e: self.asse...
35.542945
108
0.463192
import unittest from pyinfrabox import ValidationError from pyinfrabox.infrabox import validate_json class TestDockerCompose(unittest.TestCase): def raises_expect(self, data, expected): try: validate_json(data) assert False except ValidationError as e: self.asse...
true
true
f75f6f839fc7ca38c7560a63d36e4d51d5855182
7,073
py
Python
aws-inventory/lambda/inventory-dx.py
riamaria/antiope
ff27d7bb7a2f68789dfdbdc080810def4c7c2c32
[ "Apache-2.0" ]
null
null
null
aws-inventory/lambda/inventory-dx.py
riamaria/antiope
ff27d7bb7a2f68789dfdbdc080810def4c7c2c32
[ "Apache-2.0" ]
null
null
null
aws-inventory/lambda/inventory-dx.py
riamaria/antiope
ff27d7bb7a2f68789dfdbdc080810def4c7c2c32
[ "Apache-2.0" ]
null
null
null
import boto3 from botocore.exceptions import ClientError import json import os import time import datetime from dateutil import tz from lib.account import * from lib.common import * import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.WARNING) logg...
45.632258
191
0.649795
import boto3 from botocore.exceptions import ClientError import json import os import time import datetime from dateutil import tz from lib.account import * from lib.common import * import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.WARNING) logg...
true
true
f75f70bb02acd637736cded381d3fb290450513d
7,957
py
Python
model/point_model.py
gregordecristoforo/3ppy
6a86152746d4ac8a707273cc100239b9fe004a54
[ "MIT" ]
2
2022-02-14T08:45:20.000Z
2022-03-07T18:47:01.000Z
model/point_model.py
gregordecristoforo/3ppy
6a86152746d4ac8a707273cc100239b9fe004a54
[ "MIT" ]
6
2022-02-12T08:41:16.000Z
2022-03-29T02:10:36.000Z
model/point_model.py
uit-cosmo/superposed-pulses
6a86152746d4ac8a707273cc100239b9fe004a54
[ "MIT" ]
1
2022-02-10T08:38:45.000Z
2022-02-10T08:38:45.000Z
from typing import Callable, Tuple, Union import numpy as np from tqdm import tqdm from model.forcing import ( Forcing, StandardForcingGenerator, ForcingGenerator, PulseParameters, ) from model.pulse_shape import ( ShortPulseGenerator, ExponentialShortPulseGenerator, PulseGenerator, ) from ...
36.837963
119
0.643836
from typing import Callable, Tuple, Union import numpy as np from tqdm import tqdm from model.forcing import ( Forcing, StandardForcingGenerator, ForcingGenerator, PulseParameters, ) from model.pulse_shape import ( ShortPulseGenerator, ExponentialShortPulseGenerator, PulseGenerator, ) from ...
true
true
f75f71a3a57fe04ebc55becf7c0e747bed936d30
1,616
py
Python
stockrec/model.py
mrunesson/stockrec
9ba7c68626aa3f13c299bca9d59c09a37e85ab0a
[ "Apache-2.0" ]
null
null
null
stockrec/model.py
mrunesson/stockrec
9ba7c68626aa3f13c299bca9d59c09a37e85ab0a
[ "Apache-2.0" ]
null
null
null
stockrec/model.py
mrunesson/stockrec
9ba7c68626aa3f13c299bca9d59c09a37e85ab0a
[ "Apache-2.0" ]
1
2021-06-21T08:33:17.000Z
2021-06-21T08:33:17.000Z
import datetime from decimal import Decimal from typing import Optional, NamedTuple from enum import Enum, unique @unique class Signal(Enum): UNKNOWN = 0 SELL = 1 UNDERPERFORM = 2 NEUTRAL = 3 HOLD = 4 OUTPERFORM = 5 BUY = 6 @classmethod def from_text(cls, value: str) -> Enum: ...
23.085714
62
0.659035
import datetime from decimal import Decimal from typing import Optional, NamedTuple from enum import Enum, unique @unique class Signal(Enum): UNKNOWN = 0 SELL = 1 UNDERPERFORM = 2 NEUTRAL = 3 HOLD = 4 OUTPERFORM = 5 BUY = 6 @classmethod def from_text(cls, value: str) -> Enum: ...
true
true
f75f7272d6fd4b948e3859457a104ac009b4e66b
401
py
Python
mlx90632/pympt/core.py
marcodesilva/SensoreTemperaturaMelexis90632
546fc662bd8c1312e3256924a107e521995545e1
[ "Apache-2.0" ]
7
2020-03-25T13:39:14.000Z
2021-02-21T12:19:53.000Z
mlx90632/pympt/core.py
marcodesilva/SensoreTemperaturaMelexis90632
546fc662bd8c1312e3256924a107e521995545e1
[ "Apache-2.0" ]
8
2020-01-07T13:00:31.000Z
2021-08-14T00:24:46.000Z
mlx90632/pympt/core.py
marcodesilva/SensoreTemperaturaMelexis90632
546fc662bd8c1312e3256924a107e521995545e1
[ "Apache-2.0" ]
6
2020-03-04T22:25:46.000Z
2021-02-21T10:46:13.000Z
"""Core definitions of MPT framework""" class MptException(Exception): pass class BadCrcException(MptException): pass class CommandTooLongException(MptException): def __init__(self): MptException.__init__(self) self.message = "Command is limited to 253 bytes!" class NotConnectedExcep...
16.708333
57
0.730673
class MptException(Exception): pass class BadCrcException(MptException): pass class CommandTooLongException(MptException): def __init__(self): MptException.__init__(self) self.message = "Command is limited to 253 bytes!" class NotConnectedException(MptException): pass class I2C...
true
true
f75f72a70d3154eedbb3f164ebfda1636d71cd47
612
py
Python
tests/parser/types/test_variable_naming.py
Solexplorer/vyper
135edd6a91d47c72de105066d6e6c1bdfe9ea66e
[ "MIT" ]
null
null
null
tests/parser/types/test_variable_naming.py
Solexplorer/vyper
135edd6a91d47c72de105066d6e6c1bdfe9ea66e
[ "MIT" ]
null
null
null
tests/parser/types/test_variable_naming.py
Solexplorer/vyper
135edd6a91d47c72de105066d6e6c1bdfe9ea66e
[ "MIT" ]
null
null
null
import pytest from pytest import ( raises, ) from vyper import ( compiler, ) from vyper.exceptions import ( FunctionDeclarationException, ) fail_list = [ """ @public def foo(max: int128) -> int128: return max """, """ @public def foo(len: int128, sha3: int128) -> int128: return len+sha...
16.540541
50
0.661765
import pytest from pytest import ( raises, ) from vyper import ( compiler, ) from vyper.exceptions import ( FunctionDeclarationException, ) fail_list = [ """ @public def foo(max: int128) -> int128: return max """, """ @public def foo(len: int128, sha3: int128) -> int128: return len+sha...
true
true
f75f7362962957ec5b3366d8e49bc07d9ea96471
85,301
py
Python
grr/server/grr_response_server/databases/db_flows_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
1
2019-08-28T23:48:20.000Z
2019-08-28T23:48:20.000Z
grr/server/grr_response_server/databases/db_flows_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
2
2022-01-15T03:18:12.000Z
2022-02-13T22:02:43.000Z
grr/server/grr_response_server/databases/db_flows_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Tests for the flow database api.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import random import time from future.builtins import range from future.utils import iteritems import mock import queue ...
37.168192
80
0.700074
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import random import time from future.builtins import range from future.utils import iteritems import mock import queue from grr_response_core.lib import rdfvalue from grr_response_core.lib import utils fro...
true
true