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
f756b2916b49e5fc286b3277225f79f8a32a362d
597
py
Python
api/tests/e2e/test_add_pet.py
nicfix/monorepo-template
ec265d9e746b70e6a13a7a5e1e82f150b63a7ecf
[ "MIT" ]
7
2020-06-03T06:52:22.000Z
2021-12-27T07:02:45.000Z
api/tests/e2e/test_add_pet.py
nicfix/monorepo-template
ec265d9e746b70e6a13a7a5e1e82f150b63a7ecf
[ "MIT" ]
12
2020-05-23T18:36:41.000Z
2021-05-25T08:16:41.000Z
tests/e2e/test_add_pet.py
nicfix/py-ddd-microservice-boilerplate
1844a8fde57dc5bbaacf6a71163beb7226041a0c
[ "MIT" ]
1
2020-06-02T09:39:00.000Z
2020-06-02T09:39:00.000Z
from starlette.testclient import TestClient from pet_store.entrypoints.api import app from tests.e2e.utils.e2e_test_case import E2ETestCase class PetTestCase(E2ETestCase): def test_add_pet(self): client = TestClient(app) body = { 'age': 12, 'name': 'Milú' } ...
22.111111
54
0.59129
from starlette.testclient import TestClient from pet_store.entrypoints.api import app from tests.e2e.utils.e2e_test_case import E2ETestCase class PetTestCase(E2ETestCase): def test_add_pet(self): client = TestClient(app) body = { 'age': 12, 'name': 'Milú' } ...
true
true
f756b2f829536ba675f9d71ac2404de6de512c24
2,021
py
Python
abosadmin/tutor/migrations/0012_auto_20150331_2042.py
abos5/pythontutor
eba451700def8bd98d74668d1b6cc08c0ccc0d3c
[ "MIT" ]
null
null
null
abosadmin/tutor/migrations/0012_auto_20150331_2042.py
abos5/pythontutor
eba451700def8bd98d74668d1b6cc08c0ccc0d3c
[ "MIT" ]
null
null
null
abosadmin/tutor/migrations/0012_auto_20150331_2042.py
abos5/pythontutor
eba451700def8bd98d74668d1b6cc08c0ccc0d3c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tutor', '0011_auto_20150331_2034'), ] operations = [ migrations.CreateModel( name='Female2', fields=...
32.079365
114
0.512123
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tutor', '0011_auto_20150331_2034'), ] operations = [ migrations.CreateModel( name='Female2', fields=[ ('id',...
true
true
f756b44e2a9c9ca097c828d51d46ce430981b3ae
8,709
py
Python
docs/cookbook/complete-examples/pong/pong.py
tjguk/networkzero
5b40e3a213f22dc82d2ce8d36925019eaaf2c06e
[ "MIT" ]
39
2016-03-31T07:49:45.000Z
2021-09-01T10:34:02.000Z
docs/cookbook/complete-examples/pong/pong.py
tjguk/networkzero
5b40e3a213f22dc82d2ce8d36925019eaaf2c06e
[ "MIT" ]
48
2016-04-07T20:22:44.000Z
2021-09-26T18:12:01.000Z
docs/cookbook/complete-examples/pong/pong.py
tjguk/networkzero
5b40e3a213f22dc82d2ce8d36925019eaaf2c06e
[ "MIT" ]
15
2016-04-07T20:12:18.000Z
2019-10-25T14:31:41.000Z
# Pong is a two-dimensional sports game that simulates table tennis. # The player controls an in-game paddle by moving it vertically across # the left side of the screen, and can compete against either a # computer-controlled opponent or another player controlling a second # paddle on the opposing side. Players use the...
29.224832
78
0.598347
import random WIDTH = 800 HEIGHT = 600 TITLE = 'pong' MAIN_COLOR = 'yellow' PADDLE_WIDTH = 15 PADDLE_HEIGHT = 100 TENNIS_BALL_RADIUS = 10 LEFT_PLAYER = "left" RIGHT_PLAYER = "right" class Paddle(Rect): def __init__(self, start_x, start_y): super().__init__(start_x, start_y, PADDLE_WIDTH, PADDLE_HEIG...
true
true
f756b5260b20045bcdb9a806cc758d03b12a17d7
637
py
Python
tests/requests/valid/pp_02.py
CovenantEyes/gunicorn
86020df41edaf5c085df66edcca521e4b26acae8
[ "MIT" ]
null
null
null
tests/requests/valid/pp_02.py
CovenantEyes/gunicorn
86020df41edaf5c085df66edcca521e4b26acae8
[ "MIT" ]
null
null
null
tests/requests/valid/pp_02.py
CovenantEyes/gunicorn
86020df41edaf5c085df66edcca521e4b26acae8
[ "MIT" ]
null
null
null
from gunicorn.config import Config cfg = Config() cfg.set("proxy_protocol", True) req1 = { "method": "GET", "uri": uri("/stuff/here?foo=bar"), "version": (1, 1), "headers": [ ("SERVER", "http://127.0.0.1:5984"), ("CONTENT-TYPE", "application/json"), ("CONTENT-LENGTH", "14"), ...
20.548387
46
0.519623
from gunicorn.config import Config cfg = Config() cfg.set("proxy_protocol", True) req1 = { "method": "GET", "uri": uri("/stuff/here?foo=bar"), "version": (1, 1), "headers": [ ("SERVER", "http://127.0.0.1:5984"), ("CONTENT-TYPE", "application/json"), ("CONTENT-LENGTH", "14"), ...
true
true
f756b5c3375de7742037aecd04df6bfac42a2911
1,099
py
Python
frc_characterization/logger_analyzer/__init__.py
CodingWithFusion/frc-characterization
fe090ff541fcda1991f3339da91734168a18f1e5
[ "Apache-2.0" ]
30
2019-11-13T01:43:47.000Z
2022-01-09T16:57:42.000Z
frc_characterization/logger_analyzer/__init__.py
CodingWithFusion/frc-characterization
fe090ff541fcda1991f3339da91734168a18f1e5
[ "Apache-2.0" ]
98
2019-11-11T17:13:06.000Z
2021-06-12T18:00:53.000Z
frc_characterization/logger_analyzer/__init__.py
CodingWithFusion/frc-characterization
fe090ff541fcda1991f3339da91734168a18f1e5
[ "Apache-2.0" ]
44
2019-11-16T22:00:17.000Z
2022-03-04T14:43:26.000Z
from mako.template import Template import os from importlib import import_module import pathlib import zipfile # TODO: Replace with Python 3.9's importlib.resources.files() when it becomes min version def files(package): spec = import_module(package).__spec__ if spec.submodule_search_locations is None: ...
31.4
89
0.713376
from mako.template import Template import os from importlib import import_module import pathlib import zipfile def files(package): spec = import_module(package).__spec__ if spec.submodule_search_locations is None: raise TypeError("{!r} is not a package".format(package)) package_directory = pathl...
true
true
f756b7d59d96d928e2c0d076d21cba8b0e6a03e3
19,027
py
Python
fireeye/src/fireeye.py
vxsh4d0w/connectors
d0beecfb1d2c75cc0d6443c48a3a6a4ef53549eb
[ "Apache-2.0" ]
null
null
null
fireeye/src/fireeye.py
vxsh4d0w/connectors
d0beecfb1d2c75cc0d6443c48a3a6a4ef53549eb
[ "Apache-2.0" ]
null
null
null
fireeye/src/fireeye.py
vxsh4d0w/connectors
d0beecfb1d2c75cc0d6443c48a3a6a4ef53549eb
[ "Apache-2.0" ]
null
null
null
import os import yaml import time import requests import json import datetime from urllib.parse import urlparse, parse_qs from dateutil.parser import parse from requests.auth import HTTPBasicAuth from pycti import OpenCTIConnectorHelper, get_config_variable searchable_types = [ "threat-actor", "malware", ...
43.942263
372
0.449467
import os import yaml import time import requests import json import datetime from urllib.parse import urlparse, parse_qs from dateutil.parser import parse from requests.auth import HTTPBasicAuth from pycti import OpenCTIConnectorHelper, get_config_variable searchable_types = [ "threat-actor", "malware", ...
true
true
f756b806f7710298b7620e4659a63d8bf537f3a3
394
py
Python
settings/baker_recipes.py
stanwood/traidoo-api
83e8599f2eb54352988bac27e2d4acd30734816d
[ "MIT" ]
3
2020-05-05T12:12:09.000Z
2020-05-08T08:48:16.000Z
settings/baker_recipes.py
stanwood/traidoo-api
83e8599f2eb54352988bac27e2d4acd30734816d
[ "MIT" ]
160
2020-05-19T13:03:43.000Z
2022-03-12T00:35:28.000Z
settings/baker_recipes.py
stanwood/traidoo-api
83e8599f2eb54352988bac27e2d4acd30734816d
[ "MIT" ]
null
null
null
from faker import Faker from model_bakery.recipe import Recipe, foreign_key from users.baker_recipes import staff_user fake = Faker() setting = Recipe( "settings.Setting", central_logistics_company=True, platform_user=foreign_key(staff_user), deposit_vat=19, mc_swiss_delivery_fee_vat=19, ) glob...
21.888889
77
0.763959
from faker import Faker from model_bakery.recipe import Recipe, foreign_key from users.baker_recipes import staff_user fake = Faker() setting = Recipe( "settings.Setting", central_logistics_company=True, platform_user=foreign_key(staff_user), deposit_vat=19, mc_swiss_delivery_fee_vat=19, ) glob...
true
true
f756b8582173eda0e850ec29e76ce7394021f4fb
585
py
Python
tests/basics/memoryview_itemsize.py
iotctl/pycopy
eeb841afea61b19800d054b3b289729665fc9aa4
[ "MIT" ]
663
2018-12-30T00:17:59.000Z
2022-03-14T05:03:41.000Z
tests/basics/memoryview_itemsize.py
iotctl/pycopy
eeb841afea61b19800d054b3b289729665fc9aa4
[ "MIT" ]
41
2019-06-06T08:31:19.000Z
2022-02-13T16:53:41.000Z
tests/basics/memoryview_itemsize.py
iotctl/pycopy
eeb841afea61b19800d054b3b289729665fc9aa4
[ "MIT" ]
60
2019-06-01T04:25:00.000Z
2022-02-25T01:47:31.000Z
try: from uarray import array except ImportError: try: from array import array except ImportError: print("SKIP") raise SystemExit try: memoryview(b'a').itemsize except: print("SKIP") raise SystemExit for code in ['b', 'h', 'i', 'q', 'f', 'd']: print(memoryview(array...
21.666667
54
0.652991
try: from uarray import array except ImportError: try: from array import array except ImportError: print("SKIP") raise SystemExit try: memoryview(b'a').itemsize except: print("SKIP") raise SystemExit for code in ['b', 'h', 'i', 'q', 'f', 'd']: print(memoryview(array...
true
true
f756b87a4e1e09254d4f9264eef7bc26340982bf
389
py
Python
tests/test_dbobject.py
pyinv/ymldb
4a9d3c027ed08fdb30fcdf7424f732716eb034e8
[ "MIT" ]
1
2021-08-16T02:28:27.000Z
2021-08-16T02:28:27.000Z
tests/test_dbobject.py
pyinv/ymldb
4a9d3c027ed08fdb30fcdf7424f732716eb034e8
[ "MIT" ]
null
null
null
tests/test_dbobject.py
pyinv/ymldb
4a9d3c027ed08fdb30fcdf7424f732716eb034e8
[ "MIT" ]
null
null
null
"""Test that DBObject works as expected.""" from ymldb.dbobject import DBObject from ymldb.location import Location def test_dbobject_instantiation() -> None: """Test that we can create a DB Object.""" dbo = DBObject(raw_data={}, location=Location(container=[], name="")) assert dbo.raw_data == {} as...
27.785714
73
0.686375
from ymldb.dbobject import DBObject from ymldb.location import Location def test_dbobject_instantiation() -> None: dbo = DBObject(raw_data={}, location=Location(container=[], name="")) assert dbo.raw_data == {} assert dbo.location.name == "" assert dbo.location.container == []
true
true
f756b92f495ce97296628b504385d59b12ad224f
820
py
Python
setup.py
bollwyvl/es6-widget-example
0d9d93a8fe663600c2e3627e310a9f99b34af1e3
[ "BSD-3-Clause" ]
null
null
null
setup.py
bollwyvl/es6-widget-example
0d9d93a8fe663600c2e3627e310a9f99b34af1e3
[ "BSD-3-Clause" ]
null
null
null
setup.py
bollwyvl/es6-widget-example
0d9d93a8fe663600c2e3627e310a9f99b34af1e3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup # should be loaded below __version__ = None with open('es6widgetexample/_version.py') as version: exec(version.read()) setup( name="es6widgetexample", version=__version__, description="An evolving approach to creating a Jupyt...
29.285714
86
0.658537
from setuptools import setup __version__ = None with open('es6widgetexample/_version.py') as version: exec(version.read()) setup( name="es6widgetexample", version=__version__, description="An evolving approach to creating a Jupyter widget with ES6 classes.", author="Nicholas Bollweg", author...
true
true
f756b9dac6c901e5b59eb81bdefb465c2d658360
745
py
Python
vectors/cryptography_vectors/__about__.py
graingert/cryptography
39a8385d58dc22fa5f0c7efff712ec12c0e2783a
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
vectors/cryptography_vectors/__about__.py
graingert/cryptography
39a8385d58dc22fa5f0c7efff712ec12c0e2783a
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
vectors/cryptography_vectors/__about__.py
graingert/cryptography
39a8385d58dc22fa5f0c7efff712ec12c0e2783a
[ "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__...
31.041667
79
0.751678
from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", "__copyright__", ] __title__ = "cryptography_vectors" __summary__ = "Test vectors for the cryptography package." __uri__ = "https://git...
true
true
f756b9eb1121a3beaad3fdecece9ddd318a4e69b
1,044
py
Python
H2H/User/admin.py
saefty/happy2help_backend
da4bbd8d18a122ec87fc9ebc655864f3789fd8a7
[ "MIT" ]
null
null
null
H2H/User/admin.py
saefty/happy2help_backend
da4bbd8d18a122ec87fc9ebc655864f3789fd8a7
[ "MIT" ]
3
2020-02-11T23:35:05.000Z
2021-06-10T21:05:39.000Z
H2H/User/admin.py
saefty/happy2help_backend
da4bbd8d18a122ec87fc9ebc655864f3789fd8a7
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import Profile, HasSkill, Skill, Favourite class ProfileInline(admin.StackedInline): model = Profile can_delete = False ...
20.076923
64
0.75
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import Profile, HasSkill, Skill, Favourite class ProfileInline(admin.StackedInline): model = Profile can_delete = False fields = ('birthday', 'credit...
true
true
f756ba17189749f1d07459482322fb7dfa666727
5,508
py
Python
src/cpu/StaticInstFlags.py
MRuan0306/gem5
fa70478413e4650d0058cbfe81fd5ce362101994
[ "BSD-3-Clause" ]
16
2020-09-24T00:17:36.000Z
2021-08-12T06:11:52.000Z
src/cpu/StaticInstFlags.py
MRuan0306/gem5
fa70478413e4650d0058cbfe81fd5ce362101994
[ "BSD-3-Clause" ]
5
2021-01-27T23:09:06.000Z
2022-01-07T03:19:39.000Z
src/cpu/StaticInstFlags.py
MRuan0306/gem5
fa70478413e4650d0058cbfe81fd5ce362101994
[ "BSD-3-Clause" ]
15
2020-11-18T00:15:28.000Z
2021-12-12T03:18:34.000Z
# Copyright (c) 2003-2005 The Regents of The University of Michigan # Copyright (c) 2013 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
48.315789
77
0.674292
from m5.params import * # behavior into the pipeline outside of fetch. Once we go to an exec-in-exec # CPU model we should be able to get rid of these flags and implement this # behavior via the execute() methods. class StaticInstFlags(Enum): wrapper_name = 'StaticInstFlags' wrapper_is_struct = True enu...
true
true
f756ba5f0c458dd71d5902b634a72d4c93345ab5
25,667
py
Python
wwt_data_formats/__init__.py
imbasimba/wwt_data_formats
b8bb0b0643295bc00c97e5c6081f88cef5449e22
[ "MIT" ]
null
null
null
wwt_data_formats/__init__.py
imbasimba/wwt_data_formats
b8bb0b0643295bc00c97e5c6081f88cef5449e22
[ "MIT" ]
null
null
null
wwt_data_formats/__init__.py
imbasimba/wwt_data_formats
b8bb0b0643295bc00c97e5c6081f88cef5449e22
[ "MIT" ]
null
null
null
# -*- mode: python; coding: utf-8 -*- # Copyright 2019-2020 the .NET Foundation # Licensed under the MIT License. from __future__ import absolute_import, division, print_function __all__ = """ indent_xml LockedDownTraits LockedXmlTraits MetaLockedDownTraits stringify_xml_doc write_xml_doc XmlSer """.split() from abc...
34.041114
99
0.576655
from __future__ import absolute_import, division, print_function __all__ = """ indent_xml LockedDownTraits LockedXmlTraits MetaLockedDownTraits stringify_xml_doc write_xml_doc XmlSer """.split() from abc import ABCMeta from argparse import Namespace from enum import Enum from traitlets import ( Bool, Float, ...
true
true
f756bbacaa6d6abc1b3907e5a1b9aba7c7ab3816
7,781
py
Python
main.py
Tuppuraine/Moneyrobot
d7210acd384e869d8a04761937aaf16d65bb48f1
[ "Apache-2.0" ]
null
null
null
main.py
Tuppuraine/Moneyrobot
d7210acd384e869d8a04761937aaf16d65bb48f1
[ "Apache-2.0" ]
3
2021-12-12T12:24:33.000Z
2021-12-13T18:28:28.000Z
main.py
Tuppuraine/Moneyrobot
d7210acd384e869d8a04761937aaf16d65bb48f1
[ "Apache-2.0" ]
1
2021-12-13T20:42:15.000Z
2021-12-13T20:42:15.000Z
# TEE PELI TÄHÄN import pygame import random class Moneyrobot(): def __init__(self): pygame.init() self.lataa_kuvat() self.taso = 0 self.kolikot = 0 self.korkeus = 640 self.leveys = 640 self.peli_ohi = False self.kello = pygame.time.Clock() s...
42.059459
212
0.589898
import pygame import random class Moneyrobot(): def __init__(self): pygame.init() self.lataa_kuvat() self.taso = 0 self.kolikot = 0 self.korkeus = 640 self.leveys = 640 self.peli_ohi = False self.kello = pygame.time.Clock() self.vasemmalle = ...
true
true
f756bc8d61c247848a7abd8a2a5303e269ccd697
308
py
Python
src/2/2941.py
youngdaLee/Baekjoon
7d858d557dbbde6603fe4e8af2891c2b0e1940c0
[ "MIT" ]
11
2020-09-20T15:17:11.000Z
2022-03-17T12:43:33.000Z
src/2/2941.py
youngdaLee/Baekjoon
7d858d557dbbde6603fe4e8af2891c2b0e1940c0
[ "MIT" ]
3
2021-10-30T07:51:36.000Z
2022-03-09T05:19:23.000Z
src/2/2941.py
youngdaLee/Baekjoon
7d858d557dbbde6603fe4e8af2891c2b0e1940c0
[ "MIT" ]
13
2021-01-21T03:19:08.000Z
2022-03-28T10:44:58.000Z
""" 2941. 크로아티아 알파벳 작성자: xCrypt0r 언어: Python 3 사용 메모리: 29,380 KB 소요 시간: 80 ms 해결 날짜: 2020년 9월 23일 """ def main(): croatian = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z='] s = input() for c in croatian: s = s.replace(c, '.') print(len(s)) if __name__ == '__main__': main()
14.666667
64
0.496753
def main(): croatian = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z='] s = input() for c in croatian: s = s.replace(c, '.') print(len(s)) if __name__ == '__main__': main()
true
true
f756beaf4e0b74cbdef887843da1e30a6d960991
108,750
py
Python
pysnmp-with-texts/EPPC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/EPPC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/EPPC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module EPPC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EPPC-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:05:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
143.469657
12,570
0.792809
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.impo...
true
true
f756bf52c7d86eb7a3c475621cea7f31e695b22d
4,946
py
Python
online_annotation_system/views.py
hitchhicker/Online-Annotation-System
df3120cfaf716b8022c76381dc025224fbf67871
[ "MIT" ]
null
null
null
online_annotation_system/views.py
hitchhicker/Online-Annotation-System
df3120cfaf716b8022c76381dc025224fbf67871
[ "MIT" ]
null
null
null
online_annotation_system/views.py
hitchhicker/Online-Annotation-System
df3120cfaf716b8022c76381dc025224fbf67871
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import base64 import os import logging from collections import defaultdict from flask import render_template, jsonify, request, current_app, redirect, session from flask_login import login_user, logout_user, login_required, current_user from flask_principal import Identity, identity_changed, An...
39.887097
134
0.685605
import base64 import os import logging from collections import defaultdict from flask import render_template, jsonify, request, current_app, redirect, session from flask_login import login_user, logout_user, login_required, current_user from flask_principal import Identity, identity_changed, AnonymousIdentity from wt...
true
true
f756bf9e72a6838f55cdfbffd52d193ba7611adb
944
py
Python
tests/fizz_buzz_test.py
Thavarshan/python-code-katas
496d9224bbef3ee83a0e94f3a27b8e03159f84c5
[ "MIT" ]
14
2020-08-03T05:29:13.000Z
2021-08-07T09:53:18.000Z
tests/fizz_buzz_test.py
Thavarshan/python-code-katas
496d9224bbef3ee83a0e94f3a27b8e03159f84c5
[ "MIT" ]
null
null
null
tests/fizz_buzz_test.py
Thavarshan/python-code-katas
496d9224bbef3ee83a0e94f3a27b8e03159f84c5
[ "MIT" ]
null
null
null
from src.katas import fizz_buzz import unittest class FizzBuzzTest(unittest.TestCase): def test_it_return_fizz_for_multiples_of_three(self): converter = fizz_buzz.FizzBuzz() for number in [3, 6, 9, 12]: self.assertEqual('Fizz', converter.convert(number)) def test_it_return_buzz_...
31.466667
84
0.689619
from src.katas import fizz_buzz import unittest class FizzBuzzTest(unittest.TestCase): def test_it_return_fizz_for_multiples_of_three(self): converter = fizz_buzz.FizzBuzz() for number in [3, 6, 9, 12]: self.assertEqual('Fizz', converter.convert(number)) def test_it_return_buzz_...
true
true
f756c17c84e31a15367460638e609fa7f084c7b3
1,944
py
Python
venv/lib/python3.9/site-packages/streamlit/proto/Favicon_pb2.py
CMU-IDS-2022/final-project-the-evaluators
3b9262ad1a0f7315208a94a05ea1ce38e679d01d
[ "BSD-3-Clause" ]
1
2022-01-17T02:58:50.000Z
2022-01-17T02:58:50.000Z
venv/lib/python3.9/site-packages/streamlit/proto/Favicon_pb2.py
CMU-IDS-2022/final-project-the-evaluators
3b9262ad1a0f7315208a94a05ea1ce38e679d01d
[ "BSD-3-Clause" ]
null
null
null
venv/lib/python3.9/site-packages/streamlit/proto/Favicon_pb2.py
CMU-IDS-2022/final-project-the-evaluators
3b9262ad1a0f7315208a94a05ea1ce38e679d01d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: streamlit/proto/Favicon.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_datab...
27.380282
123
0.755658
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='streamli...
true
true
f756c38a2b2ceba143c97fd684c53985837ee62d
1,789
py
Python
azure/servicefabric/models/replica_health_state.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure/servicefabric/models/replica_health_state.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
2
2016-09-30T21:40:24.000Z
2017-11-10T18:16:18.000Z
azure/servicefabric/models/replica_health_state.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.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 ...
37.270833
125
0.645612
from .entity_health_state import EntityHealthState class ReplicaHealthState(EntityHealthState): _validation = { 'service_kind': {'required': True}, } _attribute_map = { 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, 'partition_id': {'key': 'Partition...
true
true
f756c42212d52d37328e60aeda3bdd317d85d6a1
19
py
Python
datumaro/version.py
samrathkumawat1/cvat-json-dataumaro
02e225814aecd54204ec14d6207d2655ff5f6f55
[ "MIT" ]
null
null
null
datumaro/version.py
samrathkumawat1/cvat-json-dataumaro
02e225814aecd54204ec14d6207d2655ff5f6f55
[ "MIT" ]
null
null
null
datumaro/version.py
samrathkumawat1/cvat-json-dataumaro
02e225814aecd54204ec14d6207d2655ff5f6f55
[ "MIT" ]
null
null
null
VERSION = '0.1.6.1'
19
19
0.578947
VERSION = '0.1.6.1'
true
true
f756c47cf3d0056b05b80bcae1d00637be07df89
10,872
py
Python
sdk/python/pulumi_aws_native/panorama/package_version.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
29
2021-09-30T19:32:07.000Z
2022-03-22T21:06:08.000Z
sdk/python/pulumi_aws_native/panorama/package_version.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
232
2021-09-30T19:26:26.000Z
2022-03-31T23:22:06.000Z
sdk/python/pulumi_aws_native/panorama/package_version.py
AaronFriel/pulumi-aws-native
5621690373ac44accdbd20b11bae3be1baf022d1
[ "Apache-2.0" ]
4
2021-11-10T19:42:01.000Z
2022-02-05T10:15:49.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
41.026415
134
0.656733
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from ._enums import * __all__ = ['PackageVersionArgs', 'PackageVersion'] @pulumi.input_type class PackageVersionArgs: def __init__(__self__, *, packa...
true
true
f756c4ebd6089fcee705263e140d7a6a8ec110a6
2,206
py
Python
examples/cdl_example.py
binhtrantt/cornac
2333e2463b1be5568a1c2da43d01401999f2dd3c
[ "Apache-2.0" ]
null
null
null
examples/cdl_example.py
binhtrantt/cornac
2333e2463b1be5568a1c2da43d01401999f2dd3c
[ "Apache-2.0" ]
null
null
null
examples/cdl_example.py
binhtrantt/cornac
2333e2463b1be5568a1c2da43d01401999f2dd3c
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cornac Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
32.925373
111
0.733908
import cornac from cornac.data import Reader from cornac.datasets import citeulike from cornac.eval_methods import RatioSplit from cornac.data import TextModality from cornac.data.text import BaseTokenizer docs, item_ids = citeulike.load_text() feedback = citeulike.load_feedback(reader=Reader(item_set=item_ids)) it...
true
true
f756c51557a978fc88985347d59b003a40ca2e20
13,004
py
Python
extra_foam/gui/ctrl_widgets/correlation_ctrl_widget.py
European-XFEL/EXtra-foam
f8d225db6b8923d0cce9db2b8c8a80613600b64c
[ "BSD-3-Clause" ]
7
2019-11-27T09:31:37.000Z
2022-02-12T21:28:49.000Z
extra_foam/gui/ctrl_widgets/correlation_ctrl_widget.py
European-XFEL/EXtra-foam
f8d225db6b8923d0cce9db2b8c8a80613600b64c
[ "BSD-3-Clause" ]
172
2019-12-03T07:56:02.000Z
2022-03-25T15:46:45.000Z
extra_foam/gui/ctrl_widgets/correlation_ctrl_widget.py
European-XFEL/EXtra-foam
f8d225db6b8923d0cce9db2b8c8a80613600b64c
[ "BSD-3-Clause" ]
9
2019-11-27T09:32:38.000Z
2022-01-05T09:56:10.000Z
""" Distributed under the terms of the BSD 3-Clause License. The full license is in the file LICENSE, distributed with this software. Author: Jun Zhu <jun.zhu@xfel.eu>, Ebad Kamil <ebad.kamil@xfel.eu> Copyright (C) European X-Ray Free-Electron Laser Facility GmbH. All rights reserved. """ import functools from PyQt5...
37.367816
77
0.631575
import functools from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt from PyQt5.QtGui import QDoubleValidator from PyQt5.QtWidgets import ( QCheckBox, QComboBox, QFrame, QGridLayout, QHeaderView, QHBoxLayout, QLabel, QPushButton, QTableWidget ) from .curve_fitting_ctrl_widget import _BaseFittingCtrlWidget from ...
true
true
f756c55dccfee3a433d65bb620750a0fe1694f5e
1,762
py
Python
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tabs.py
dreamhost/horizon
55569d540e6c1a6957d5127f9bae6a699ed60823
[ "Apache-2.0" ]
3
2017-02-13T15:11:01.000Z
2021-07-28T08:28:09.000Z
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tabs.py
dreamhost/horizon
55569d540e6c1a6957d5127f9bae6a699ed60823
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tabs.py
dreamhost/horizon
55569d540e6c1a6957d5127f9bae6a699ed60823
[ "Apache-2.0" ]
2
2018-08-29T10:56:04.000Z
2019-11-11T11:45:20.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
35.24
78
0.677639
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import tabs from openstack_dashboard.api import cinder class OverviewTab(tabs.Tab): name = _("Overview") slug = "overview" template_name = ("project/images_a...
true
true
f756c780d7690100414c6f247a74e6c709449104
697
py
Python
app/translations/check_locale_files.py
stofnun-arna-magnussonar/korp-frontend
36080d7c6626a382a5c7b9d2c8066393aff08858
[ "MIT" ]
1
2018-10-01T19:10:32.000Z
2018-10-01T19:10:32.000Z
app/translations/check_locale_files.py
stofnun-arna-magnussonar/korp-frontend
36080d7c6626a382a5c7b9d2c8066393aff08858
[ "MIT" ]
34
2020-09-17T03:32:08.000Z
2021-03-17T15:33:09.000Z
app/translations/check_locale_files.py
giellatekno/korp-frontend
f6ee2b12f6bbe6e5e54c3dc8c92a46ad5d7eaee4
[ "MIT" ]
1
2018-05-02T13:58:32.000Z
2018-05-02T13:58:32.000Z
from __future__ import unicode_literals import os, json from glob import glob fileset = ("locale", "corpora") def check(setname): print "checking " + setname mapping = dict((fName, set(json.load(open(fName)))) for fName in glob(setname + "*.json")) def check_key(key, fromLang): for fName, js...
26.807692
98
0.606887
from __future__ import unicode_literals import os, json from glob import glob fileset = ("locale", "corpora") def check(setname): print "checking " + setname mapping = dict((fName, set(json.load(open(fName)))) for fName in glob(setname + "*.json")) def check_key(key, fromLang): for fName, js...
false
true
f756c7ef7fad32e0cc03202fa3b2fbc715472a31
18,872
py
Python
tests/test_init.py
scotte/pysma
9c5aee24ee4091f88ce10e06958727a510190267
[ "MIT" ]
null
null
null
tests/test_init.py
scotte/pysma
9c5aee24ee4091f88ce10e06958727a510190267
[ "MIT" ]
null
null
null
tests/test_init.py
scotte/pysma
9c5aee24ee4091f88ce10e06958727a510190267
[ "MIT" ]
null
null
null
"""Test pysma init.""" import logging import re from unittest.mock import patch import aiohttp import pytest from pysma import SMA from pysma.const import ( DEVCLASS_INVERTER, ENERGY_METER_VIA_INVERTER, OPTIMIZERS_VIA_INVERTER, ) from pysma.definitions import device_type as device_type_sensor from pysma.d...
35.274766
91
0.4867
import logging import re from unittest.mock import patch import aiohttp import pytest from pysma import SMA from pysma.const import ( DEVCLASS_INVERTER, ENERGY_METER_VIA_INVERTER, OPTIMIZERS_VIA_INVERTER, ) from pysma.definitions import device_type as device_type_sensor from pysma.definitions import senso...
true
true
f756c8bcdfac2ee15825e29ca9bf25d4b17a6e88
1,533
py
Python
examples/example.py
jamadagni/textattr
a9a1ed34c3fcd3bc1db00530a84df7d5a5599826
[ "BSD-2-Clause" ]
6
2018-11-08T14:48:07.000Z
2021-04-28T21:25:17.000Z
examples/example.py
jamadagni/textattr
a9a1ed34c3fcd3bc1db00530a84df7d5a5599826
[ "BSD-2-Clause" ]
null
null
null
examples/example.py
jamadagni/textattr
a9a1ed34c3fcd3bc1db00530a84df7d5a5599826
[ "BSD-2-Clause" ]
1
2020-09-05T23:36:24.000Z
2020-09-05T23:36:24.000Z
#! /usr/bin/env python3 # Hello! This is a simple example file for textattr. # All you need to do to use textattr is this line at the beginning: from textattr import * # You can get the escape code for a set of attributes using ta() and save it: taYellowOnBlue = ta("y /b") # You can then input it to print() and such...
45.088235
115
0.705153
from textattr import * taYellowOnBlue = ta("y /b") print(taYellowOnBlue, "Hello!", ta("off"), sep = "") tawrite("@g i u", "text", "@w", "attr", "@off", " tries to be helpful by providing different error messages:\n") badSpecs = ("", "c /r m /g y /b k /l c /r m /g y /b k /l", "longerThanAnyValidSpec", "q", "^610",...
true
true
f756c9423bad192a8120a2dff1318b466ba468b1
6,732
py
Python
python/ray/experimental/serve/tests/test_api.py
eisber/ray
94a286ef1d8ad5a3093b7f996a811727fa0e2d3e
[ "Apache-2.0" ]
4
2019-10-18T17:44:58.000Z
2021-04-14T14:37:21.000Z
python/ray/experimental/serve/tests/test_api.py
eisber/ray
94a286ef1d8ad5a3093b7f996a811727fa0e2d3e
[ "Apache-2.0" ]
1
2022-03-30T17:52:44.000Z
2022-03-30T17:52:44.000Z
python/ray/experimental/serve/tests/test_api.py
eisber/ray
94a286ef1d8ad5a3093b7f996a811727fa0e2d3e
[ "Apache-2.0" ]
1
2020-06-26T07:54:25.000Z
2020-06-26T07:54:25.000Z
import time import pytest import requests from ray.experimental import serve from ray.experimental.serve import BackendConfig import ray def test_e2e(serve_instance): serve.init() # so we have access to global state serve.create_endpoint("endpoint", "/api", blocking=True) result = serve.api._get_global_...
33.492537
79
0.677956
import time import pytest import requests from ray.experimental import serve from ray.experimental.serve import BackendConfig import ray def test_e2e(serve_instance): serve.init() serve.create_endpoint("endpoint", "/api", blocking=True) result = serve.api._get_global_state().route_table.list_service() ...
true
true
f756ca9d485f573fb059a623a86acaa4f953f19c
1,232
py
Python
test/sync_tests/test_scopes.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
1
2021-08-13T20:23:56.000Z
2021-08-13T20:23:56.000Z
test/sync_tests/test_scopes.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
null
null
null
test/sync_tests/test_scopes.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
null
null
null
import pytest from dependency_injector import Scope from dependency_injector.errors import InvalidScopeError from ..utils import Context from . import ioc class Service1: pass class Service2: def __init__(self, service1: Service1): self.service1 = service1 def test_inject_transient_into_dependen...
22.4
58
0.750812
import pytest from dependency_injector import Scope from dependency_injector.errors import InvalidScopeError from ..utils import Context from . import ioc class Service1: pass class Service2: def __init__(self, service1: Service1): self.service1 = service1 def test_inject_transient_into_dependen...
true
true
f756ccb0c0a7a66b1a558979946105d11a71e212
3,798
py
Python
src/sentry/plugins/providers/integration_repository.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
null
null
null
src/sentry/plugins/providers/integration_repository.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
null
null
null
src/sentry/plugins/providers/integration_repository.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import six from django.db import IntegrityError, transaction from rest_framework.response import Response from sentry import analytics from sentry.api.serializers import serialize from sentry.integrations.exceptions import IntegrationError from sentry.models import Repository fr...
31.65
88
0.550553
from __future__ import absolute_import import six from django.db import IntegrityError, transaction from rest_framework.response import Response from sentry import analytics from sentry.api.serializers import serialize from sentry.integrations.exceptions import IntegrationError from sentry.models import Repository fr...
true
true
f756cd23bb149795654fbacdc1282beadb855109
615
py
Python
bridge_sim/internal/plot/geometry/node.py
jerbaroo/bridge-sim
c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af
[ "MIT" ]
2
2020-05-12T11:41:49.000Z
2020-08-10T15:00:58.000Z
bridge_sim/internal/plot/geometry/node.py
barischrooneyj/bridge-sim
c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af
[ "MIT" ]
48
2020-05-11T23:58:22.000Z
2020-09-18T20:28:52.000Z
bridge_sim/internal/plot/geometry/node.py
jerbaroo/bridge-sim
c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af
[ "MIT" ]
1
2020-05-27T12:43:37.000Z
2020-05-27T12:43:37.000Z
from typing import List import numpy as np from bridge_sim.internal.plot import plt from bridge_sim.internal.plot.geometry.angles import ax_3d from bridge_sim.sim.model import Node def node_scatter_3d(nodes: List[Node], new_fig: bool = True): # Split into separate arrays of x, y and z position, and colors. ...
26.73913
68
0.660163
from typing import List import numpy as np from bridge_sim.internal.plot import plt from bridge_sim.internal.plot.geometry.angles import ax_3d from bridge_sim.sim.model import Node def node_scatter_3d(nodes: List[Node], new_fig: bool = True): xs = np.array([n.x for n in nodes]) ys = np.array([n.y for n ...
true
true
f756cef41670d3a01f63f161012caba9ca41bdc0
8,424
py
Python
val_code/pol_metrics.py
anahm/inferring-population-preferences
1eec9c6966e65c615f3cf5bd769ab121369b926d
[ "Unlicense" ]
4
2016-10-29T12:10:48.000Z
2016-11-06T02:25:09.000Z
val_code/pol_metrics.py
anahm/inferring-population-preferences
1eec9c6966e65c615f3cf5bd769ab121369b926d
[ "Unlicense" ]
null
null
null
val_code/pol_metrics.py
anahm/inferring-population-preferences
1eec9c6966e65c615f3cf5bd769ab121369b926d
[ "Unlicense" ]
null
null
null
""" pol_metrics.py Scripts to measure 4 polarization metrics (as defined by DiMaggio) of a distribution of preferences. """ import csv import os.path import numpy as np import pandas as pd from scipy.stats import moment, kurtosis, uniform, laplace from scipy.misc import comb, factorialk from sklearn import mixture f...
32.030418
98
0.657289
""" pol_metrics.py Scripts to measure 4 polarization metrics (as defined by DiMaggio) of a distribution of preferences. """ import csv import os.path import numpy as np import pandas as pd from scipy.stats import moment, kurtosis, uniform, laplace from scipy.misc import comb, factorialk from sklearn import mixture f...
false
true
f756d08711874c4f6ea73a9b17c4461eb5821039
808
py
Python
setup.py
carlos-gutier/lambdata
d41129a8f43d741c19db8ccd1fdd001007c969b3
[ "MIT" ]
null
null
null
setup.py
carlos-gutier/lambdata
d41129a8f43d741c19db8ccd1fdd001007c969b3
[ "MIT" ]
4
2020-03-24T16:45:55.000Z
2021-06-01T23:29:49.000Z
setup.py
carlos-gutier/lambdata
d41129a8f43d741c19db8ccd1fdd001007c969b3
[ "MIT" ]
1
2019-02-14T16:06:25.000Z
2019-02-14T16:06:25.000Z
#!/usr/bin/env python """ Package setup/installation and metadata for lambdata """ import setuptools REQUIRED = [ "numpy", "pandas", "sklearn" ] with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setuptools.setup( name="lambdata-carlosgutier", version="0.0.8", author="carlos...
24.484848
64
0.665842
import setuptools REQUIRED = [ "numpy", "pandas", "sklearn" ] with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setuptools.setup( name="lambdata-carlosgutier", version="0.0.8", author="carlos-gutier", description="A collection of Data Science helper functions", long...
true
true
f756d0e72b5214bd19f4c2e3ac20e16c3990c0b1
3,850
py
Python
qtcnc.py
dakoner/qtcnc
0f7246ad9aaaadef1b0d13e54180f995dc7f4202
[ "Apache-2.0" ]
1
2021-03-04T21:44:39.000Z
2021-03-04T21:44:39.000Z
qtcnc.py
dakoner/qtcnc
0f7246ad9aaaadef1b0d13e54180f995dc7f4202
[ "Apache-2.0" ]
null
null
null
qtcnc.py
dakoner/qtcnc
0f7246ad9aaaadef1b0d13e54180f995dc7f4202
[ "Apache-2.0" ]
null
null
null
from PyQt5 import QtWidgets, QtCore, uic import sys import os from mqtt_qobject import MqttClient def distance_for_button(button): on = button.objectName() if on == 'distance_point1': return 0.1 elif on == 'distance_1': return 1 elif on == 'distance_10': return 10 elif on...
33.77193
107
0.656364
from PyQt5 import QtWidgets, QtCore, uic import sys import os from mqtt_qobject import MqttClient def distance_for_button(button): on = button.objectName() if on == 'distance_point1': return 0.1 elif on == 'distance_1': return 1 elif on == 'distance_10': return 10 elif on...
true
true
f756d11b9f8fa11ea125981a153245dc5d978d99
125
py
Python
hooks/post_gen_project.py
claui/cookiecutter-ansible-playbook
8a19523441807e67ea572ffc96f83825766980af
[ "Apache-2.0" ]
2
2021-05-05T21:28:18.000Z
2021-05-09T16:53:17.000Z
hooks/post_gen_project.py
claui/cookiecutter-ansible-playbook
8a19523441807e67ea572ffc96f83825766980af
[ "Apache-2.0" ]
null
null
null
hooks/post_gen_project.py
claui/cookiecutter-ansible-playbook
8a19523441807e67ea572ffc96f83825766980af
[ "Apache-2.0" ]
null
null
null
import os import shutil os.unlink('filter_plugins/.keep') os.unlink('inventory/group_vars/.keep') shutil.rmtree('licenses')
17.857143
39
0.776
import os import shutil os.unlink('filter_plugins/.keep') os.unlink('inventory/group_vars/.keep') shutil.rmtree('licenses')
true
true
f756d199a4d8d730b641971f8f55d5f560f6757f
825
py
Python
copulas/univariate/__init__.py
pvk-developer/Copulas
4de54e946ecb1e2bf831874e6a00a7d04d302804
[ "MIT" ]
71
2018-06-20T12:07:34.000Z
2020-01-03T21:43:01.000Z
copulas/univariate/__init__.py
Hooddi/Copulas
86dc1304fe4ffb51302fc37801d7f18c4ab4d88d
[ "MIT" ]
75
2018-06-20T09:46:07.000Z
2019-12-23T15:04:19.000Z
copulas/univariate/__init__.py
Hooddi/Copulas
86dc1304fe4ffb51302fc37801d7f18c4ab4d88d
[ "MIT" ]
25
2018-06-24T18:01:11.000Z
2020-01-02T14:30:09.000Z
"""Univariate copulas module.""" from copulas.univariate.base import BoundedType, ParametricType, Univariate from copulas.univariate.beta import BetaUnivariate from copulas.univariate.gamma import GammaUnivariate from copulas.univariate.gaussian import GaussianUnivariate from copulas.univariate.gaussian_kde import Gau...
31.730769
75
0.801212
from copulas.univariate.base import BoundedType, ParametricType, Univariate from copulas.univariate.beta import BetaUnivariate from copulas.univariate.gamma import GammaUnivariate from copulas.univariate.gaussian import GaussianUnivariate from copulas.univariate.gaussian_kde import GaussianKDE from copulas.univariate....
true
true
f756d36b3794a1bf28f31821b4e133b6550b5f71
11,830
py
Python
endpoints/api/robot.py
sferich888/quay
4672db1df76874238baf134d04e74112ac9f630d
[ "Apache-2.0" ]
1
2020-10-16T19:30:41.000Z
2020-10-16T19:30:41.000Z
endpoints/api/robot.py
sferich888/quay
4672db1df76874238baf134d04e74112ac9f630d
[ "Apache-2.0" ]
15
2020-06-18T15:32:06.000Z
2022-03-03T23:06:24.000Z
endpoints/api/robot.py
sferich888/quay
4672db1df76874238baf134d04e74112ac9f630d
[ "Apache-2.0" ]
null
null
null
""" Manage user and organization robot accounts. """ from endpoints.api import ( resource, nickname, ApiResource, log_action, related_user_resource, require_user_admin, require_scope, path_param, parse_args, query_param, validate_json_request, max_json_size, ) from endpo...
32.952646
98
0.655368
from endpoints.api import ( resource, nickname, ApiResource, log_action, related_user_resource, require_user_admin, require_scope, path_param, parse_args, query_param, validate_json_request, max_json_size, ) from endpoints.api.robot_models_pre_oci import pre_oci_model as...
true
true
f756d4938ddb12431d7e8a48a141980d78f32678
2,515
py
Python
scripting/cheat_sheets/files/cheat_sheet_files.py
winkste/python_scripts
e32fbbf43e6565d7a944461e19622b2bb633bb1e
[ "MIT" ]
null
null
null
scripting/cheat_sheets/files/cheat_sheet_files.py
winkste/python_scripts
e32fbbf43e6565d7a944461e19622b2bb633bb1e
[ "MIT" ]
null
null
null
scripting/cheat_sheets/files/cheat_sheet_files.py
winkste/python_scripts
e32fbbf43e6565d7a944461e19622b2bb633bb1e
[ "MIT" ]
null
null
null
#This cheat sheet explains several functions to handle files in python #%% import os #%% print('current working path: ' + os.getcwd()) print('absolute path: ' + os.path.abspath('.')) print('is path absolute ? ' + str(os.path.isabs('.'))) # %% print('relative path: ' + os.path.relpath('.')) # %% print('path name of ...
24.656863
74
0.706163
import os print('current working path: ' + os.getcwd()) print('absolute path: ' + os.path.abspath('.')) print('is path absolute ? ' + str(os.path.isabs('.'))) print('relative path: ' + os.path.relpath('.')) print('path name of a file-path construct: ' + os.path.dirname(__file__)) print('file name of a file-path co...
false
true
f756d4d4313a30f55d891f7959d655cbc188e8c8
1,808
py
Python
pandaserver/test/testEvgen17.py
virthead/panda-server
d2b65f788c4539dc103641ca2a8052cb18729d44
[ "Apache-2.0" ]
7
2015-03-30T14:15:35.000Z
2021-12-22T06:48:22.000Z
pandaserver/test/testEvgen17.py
virthead/panda-server
d2b65f788c4539dc103641ca2a8052cb18729d44
[ "Apache-2.0" ]
16
2015-06-01T13:48:01.000Z
2022-02-08T15:03:32.000Z
pandaserver/test/testEvgen17.py
virthead/panda-server
d2b65f788c4539dc103641ca2a8052cb18729d44
[ "Apache-2.0" ]
15
2015-03-02T08:57:35.000Z
2022-03-01T09:48:45.000Z
import sys import time import uuid import pandaserver.userinterface.Client as Client from pandaserver.taskbuffer.JobSpec import JobSpec from pandaserver.taskbuffer.FileSpec import FileSpec site = sys.argv[1] cloud = sys.argv[2] datasetName = 'panda.destDB.%s' % str(uuid.uuid4()) destName = None jobList = [] fo...
30.644068
92
0.646018
import sys import time import uuid import pandaserver.userinterface.Client as Client from pandaserver.taskbuffer.JobSpec import JobSpec from pandaserver.taskbuffer.FileSpec import FileSpec site = sys.argv[1] cloud = sys.argv[2] datasetName = 'panda.destDB.%s' % str(uuid.uuid4()) destName = None jobList = [] fo...
true
true
f756d61597eb5dea8dfc0cfbae0f1c1983047260
823
py
Python
subnet_calculator/modules/validate_ip_input.py
datboyblu3/Subnet_Calculator
f008baec7c28ab0c94e625150261886180a3027f
[ "MIT" ]
null
null
null
subnet_calculator/modules/validate_ip_input.py
datboyblu3/Subnet_Calculator
f008baec7c28ab0c94e625150261886180a3027f
[ "MIT" ]
null
null
null
subnet_calculator/modules/validate_ip_input.py
datboyblu3/Subnet_Calculator
f008baec7c28ab0c94e625150261886180a3027f
[ "MIT" ]
null
null
null
import os.path import argparse #Author: Daniel Edwards #Date: 12-08-2021 #Validate IP file existence parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Specify the file and/or the file\'s path containing IP addresses') parser.add_argument('-i', '--ip', nargs='+', help='Specify IP address(es)...
20.575
108
0.707169
import os.path import argparse parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Specify the file and/or the file\'s path containing IP addresses') parser.add_argument('-i', '--ip', nargs='+', help='Specify IP address(es)') args = parser.parse_args() #Determine def validate_ip_input(): ...
true
true
f756d650995fe564dd688c5026af41062386cb87
1,400
py
Python
actstream/jsonfield.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
actstream/jsonfield.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
actstream/jsonfield.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
''' Decide on a JSONField implementation based on available packages. There are two possible options, preferred in the following order: - JSONField from django-jsonfield with django-jsonfield-compat - JSONField from django-mysql (needs MySQL 5.7+) Raises an ImportError if USE_JSONFIELD is True but none of these ...
27.45098
70
0.702857
from django.db import models from django.core.exceptions import ImproperlyConfigured from actstream.settings import USE_JSONFIELD __all__ = ('DataField', 'register_app') def register_app(app): pass DataField = models.TextField if USE_JSONFIELD: try: from jsonfield_compat import JSONField, regist...
true
true
f756d8f4819b5f77a64a8d1128f1b0142aa9e6a1
1,307
py
Python
jang_src/csi_opencv_tester/src/bridger.py
leesuengyeol/goingHome_project
0c32f9f4194f0294510720ff2302d5d4a1df8ed5
[ "Apache-2.0" ]
null
null
null
jang_src/csi_opencv_tester/src/bridger.py
leesuengyeol/goingHome_project
0c32f9f4194f0294510720ff2302d5d4a1df8ed5
[ "Apache-2.0" ]
null
null
null
jang_src/csi_opencv_tester/src/bridger.py
leesuengyeol/goingHome_project
0c32f9f4194f0294510720ff2302d5d4a1df8ed5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import roslib roslib.load_manifest('csi_opencv_tester') import sys import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init__(self): # sel...
25.134615
94
0.717674
from __future__ import print_function import roslib roslib.load_manifest('csi_opencv_tester') import sys import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init__(self): self.bridge = CvBridge...
true
true
f756da708a9e02ad42537b2ba3ca4bd233adcb4c
8,753
py
Python
releasenotes/source/conf.py
mail2nsrajesh/puppet-ceilometer
7da50571cf98d215c8551b52cacb4f891d5f4207
[ "Apache-2.0" ]
null
null
null
releasenotes/source/conf.py
mail2nsrajesh/puppet-ceilometer
7da50571cf98d215c8551b52cacb4f891d5f4207
[ "Apache-2.0" ]
null
null
null
releasenotes/source/conf.py
mail2nsrajesh/puppet-ceilometer
7da50571cf98d215c8551b52cacb4f891d5f4207
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
33.155303
109
0.722724
import openstackdocstheme extensions = [ 'reno.sphinxext', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'puppet-ceilometer Release Notes' copyright = u'2017, Puppet OpenStack Developers' # |version| and |release|, also used in various other places throughout th...
true
true
f756db772fe9a55d60853169edcbf2a64dd0f79b
2,860
py
Python
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
# Test driver for bsddb package. """ Run all test cases. """ import os import sys import tempfile import time import unittest from test.test_support import requires, run_unittest, import_module # Skip test if _bsddb module was not built. import_module('_bsddb') # Silence Py3k warning import_module('bsddb...
34.878049
81
0.656294
import os import sys import tempfile import time import unittest from test.test_support import requires, run_unittest, import_module import_module('_bsddb') import_module('bsddb', deprecated=True) if __name__ != '__main__': requires('bsddb') verbose = False if 'verbose' in sys.argv: verbose = ...
true
true
f756dca41c72bb8dc4ed9edccf254680ef8ee21d
6,816
py
Python
testing/python/show_fixtures_per_test.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
9,225
2015-06-15T21:56:14.000Z
2022-03-31T20:47:38.000Z
testing/python/show_fixtures_per_test.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
7,794
2015-06-15T21:06:34.000Z
2022-03-31T10:56:54.000Z
testing/python/show_fixtures_per_test.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
2,598
2015-06-15T21:42:39.000Z
2022-03-29T13:48:22.000Z
from _pytest.pytester import Pytester def test_no_items_should_not_show_output(pytester: Pytester) -> None: result = pytester.runpytest("--fixtures-per-test") result.stdout.no_fnmatch_line("*fixtures used by*") assert result.ret == 0 def test_fixtures_in_module(pytester: Pytester) -> None: p = pytes...
26.729412
80
0.527435
from _pytest.pytester import Pytester def test_no_items_should_not_show_output(pytester: Pytester) -> None: result = pytester.runpytest("--fixtures-per-test") result.stdout.no_fnmatch_line("*fixtures used by*") assert result.ret == 0 def test_fixtures_in_module(pytester: Pytester) -> None: p = pytes...
true
true
f756dcf215bf612082a8f00ebc76f549e5e18374
5,060
py
Python
.openshift-ci/runners.py
stackrox/stackrox
3b2929fd5f2bc68d5742bd958a22e03202ae6be4
[ "Apache-2.0" ]
22
2022-03-31T14:32:18.000Z
2022-03-31T22:11:30.000Z
.openshift-ci/runners.py
stackrox/stackrox
3b2929fd5f2bc68d5742bd958a22e03202ae6be4
[ "Apache-2.0" ]
5
2022-03-31T14:35:28.000Z
2022-03-31T22:40:13.000Z
.openshift-ci/runners.py
stackrox/stackrox
3b2929fd5f2bc68d5742bd958a22e03202ae6be4
[ "Apache-2.0" ]
4
2022-03-31T16:33:58.000Z
2022-03-31T22:19:26.000Z
#!/usr/bin/env python3 """ Common test run patterns """ from datetime import datetime from clusters import NullCluster from pre_tests import NullPreTest from ci_tests import NullTest from post_tests import NullPostTest class ClusterTestSetsRunner: """A cluster test runner that runs multiple sets of pre, test & ...
32.435897
85
0.519763
from datetime import datetime from clusters import NullCluster from pre_tests import NullPreTest from ci_tests import NullTest from post_tests import NullPostTest class ClusterTestSetsRunner: def __init__( self, cluster=NullCluster(), final_post=NullPostTest(), sets=None, ):...
true
true
f756ddf67db85cf74cd46b5e90ed19ef6fd17367
32,091
py
Python
gazoo_device/fire_manager.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
gazoo_device/fire_manager.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
1
2021-06-24T19:20:50.000Z
2021-06-24T19:20:50.000Z
gazoo_device/fire_manager.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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, ...
38.249106
109
0.675361
import codecs import enum import inspect import json import logging import os.path import pydoc import re import sys import textwrap import time from typing import Any, Collection, Optional, Type from gazoo_device import config from gazoo_device import decorators from gazoo_device import errors from gazoo_device impo...
true
true
f756de245c2070683bc1690cfe53c5a5df42e448
3,829
py
Python
mythril/ethereum/interface/leveldb/state.py
afuch05/mythril-classic
de562335a62703429e085de7088a3e543f84e94f
[ "MIT" ]
6
2021-02-13T05:03:32.000Z
2021-09-19T14:57:58.000Z
mythril/ethereum/interface/leveldb/state.py
cryptobarbossa/mythril-classic
5dd544d301238db2bc536d7cee69b96e9a15e9c4
[ "MIT" ]
null
null
null
mythril/ethereum/interface/leveldb/state.py
cryptobarbossa/mythril-classic
5dd544d301238db2bc536d7cee69b96e9a15e9c4
[ "MIT" ]
2
2020-05-26T15:03:20.000Z
2021-07-29T09:09:05.000Z
import rlp import binascii from ethereum.utils import ( normalize_address, hash32, trie_root, big_endian_int, address, int256, encode_hex, encode_int, big_endian_to_int, int_to_addr, zpad, parse_as_bin, parse_as_int, decode_hex, sha3, is_string, is_num...
26.047619
85
0.58971
import rlp import binascii from ethereum.utils import ( normalize_address, hash32, trie_root, big_endian_int, address, int256, encode_hex, encode_int, big_endian_to_int, int_to_addr, zpad, parse_as_bin, parse_as_int, decode_hex, sha3, is_string, is_num...
true
true
f756de3c3c132563ef2c9f33c4f282ec7b7d6d98
1,339
py
Python
tests/unit/test_onnx_bert_rerank.py
dravog7/nboost
e0c086db2eaa8601c20244c81d8f5483b7491902
[ "Apache-2.0" ]
5
2020-03-30T12:50:56.000Z
2022-01-20T22:45:29.000Z
tests/unit/test_onnx_bert_rerank.py
dravog7/nboost
e0c086db2eaa8601c20244c81d8f5483b7491902
[ "Apache-2.0" ]
9
2020-11-13T18:41:44.000Z
2022-02-10T01:58:28.000Z
tests/unit/test_onnx_bert_rerank.py
dravog7/nboost
e0c086db2eaa8601c20244c81d8f5483b7491902
[ "Apache-2.0" ]
1
2020-03-30T17:29:05.000Z
2020-03-30T17:29:05.000Z
from nboost.plugins.models import resolve_model from nboost import defaults import unittest import numpy as np class TestPtBertRerankModelPlugin(unittest.TestCase): def setUp(self): self.model = resolve_model( model_dir='onnx-bert-base-msmarco', data_dir=defaults.data_dir, ...
33.475
84
0.652726
from nboost.plugins.models import resolve_model from nboost import defaults import unittest import numpy as np class TestPtBertRerankModelPlugin(unittest.TestCase): def setUp(self): self.model = resolve_model( model_dir='onnx-bert-base-msmarco', data_dir=defaults.data_dir, ...
true
true
f756de837c866b083260fdda782261d0f95e7d90
21,818
py
Python
thermostat_daemon.py
mholgatem/ThermOS
44fc4398d26ee45958228158dd9957262cc81521
[ "MIT" ]
79
2016-09-09T11:18:27.000Z
2022-03-26T03:40:19.000Z
thermostat_daemon.py
mholgatem/ThermOS
44fc4398d26ee45958228158dd9957262cc81521
[ "MIT" ]
21
2016-09-19T16:30:24.000Z
2022-03-02T18:20:51.000Z
thermostat_daemon.py
mholgatem/ThermOS
44fc4398d26ee45958228158dd9957262cc81521
[ "MIT" ]
26
2016-09-09T12:17:22.000Z
2022-01-22T22:53:44.000Z
#! /usr/bin/python -u from __future__ import print_function from datetime import * import os import RPi.GPIO as GPIO import scheduler import signal import smtplib import sqlite3 import subprocess import sys import time import forecastio import tempSensor __version__ = 2.3 # set working directory to where "thermos_da...
45.932632
156
0.504171
from __future__ import print_function from datetime import * import os import RPi.GPIO as GPIO import scheduler import signal import smtplib import sqlite3 import subprocess import sys import time import forecastio import tempSensor __version__ = 2.3 abspath = os.path.abspath(__file__) dname = os.path.dirname(abspat...
true
true
f756de858442a095cd631c5309190df1d108d65f
1,876
py
Python
test/test_grid.py
G-linch/pyecharts
8cee0f9fd9800ea388b1199ec6ac4746dd8e5455
[ "MIT" ]
1
2019-07-02T18:45:29.000Z
2019-07-02T18:45:29.000Z
test/test_grid.py
G-linch/pyecharts
8cee0f9fd9800ea388b1199ec6ac4746dd8e5455
[ "MIT" ]
1
2019-08-16T06:20:23.000Z
2019-08-16T06:20:23.000Z
test/test_grid.py
G-linch/pyecharts
8cee0f9fd9800ea388b1199ec6ac4746dd8e5455
[ "MIT" ]
1
2020-07-06T05:51:14.000Z
2020-07-06T05:51:14.000Z
from nose.tools import eq_ from pyecharts import options as opts from pyecharts.charts import Bar, Grid, Line def _chart_for_grid() -> Bar: x_data = ["{}月".format(i) for i in range(1, 13)] bar = ( Bar() .add_xaxis(x_data) .add_yaxis( "蒸发量", [2.0, 4...
30.754098
87
0.535181
from nose.tools import eq_ from pyecharts import options as opts from pyecharts.charts import Bar, Grid, Line def _chart_for_grid() -> Bar: x_data = ["{}月".format(i) for i in range(1, 13)] bar = ( Bar() .add_xaxis(x_data) .add_yaxis( "蒸发量", [2.0, 4...
true
true
f756dfde4bca406a69d86e29cbf10a3a4b24edf2
22,654
py
Python
civpy/survey/alignment.py
mpewsey/civpy
bbf74b1c04ca9f7604831f5280cc80d796240e67
[ "BSD-3-Clause" ]
9
2019-07-02T01:16:02.000Z
2022-02-10T21:30:32.000Z
civpy/survey/alignment.py
mpewsey/civpy
bbf74b1c04ca9f7604831f5280cc80d796240e67
[ "BSD-3-Clause" ]
2
2019-05-05T02:46:18.000Z
2019-05-05T04:47:11.000Z
civpy/survey/alignment.py
mpewsey/civpy
bbf74b1c04ca9f7604831f5280cc80d796240e67
[ "BSD-3-Clause" ]
1
2019-04-20T05:29:55.000Z
2019-04-20T05:29:55.000Z
""" Copyright (c) 2019, Matt Pewsey """ import attr import numpy as np import matplotlib.pyplot as plt from .spatial_hash import SpatialHash __all__ = ['Alignment'] @attr.s(hash=False) class Alignment(object): """ A class representing a survey alignment. Parameters ---------- name : str ...
31.551532
85
0.51876
import attr import numpy as np import matplotlib.pyplot as plt from .spatial_hash import SpatialHash __all__ = ['Alignment'] @attr.s(hash=False) class Alignment(object): BISC_TOL = 1e-4 name = attr.ib() pis = attr.ib(default=[]) stakes = attr.ib(default=[]) grid = attr.ib(default=10) ...
true
true
f756dfdff5e52b4671981215e6ccb93c117657c3
10,403
py
Python
examples/pytorch/rgcn-hetero-ogbn-mag/model.py
lfchener/dgl
77f4287a4118db64c46f4f413a426e1419a09d53
[ "Apache-2.0" ]
9,516
2018-12-08T22:11:31.000Z
2022-03-31T13:04:33.000Z
examples/pytorch/rgcn-hetero-ogbn-mag/model.py
lfchener/dgl
77f4287a4118db64c46f4f413a426e1419a09d53
[ "Apache-2.0" ]
2,494
2018-12-08T22:43:00.000Z
2022-03-31T21:16:27.000Z
examples/pytorch/rgcn-hetero-ogbn-mag/model.py
lfchener/dgl
77f4287a4118db64c46f4f413a426e1419a09d53
[ "Apache-2.0" ]
2,529
2018-12-08T22:56:14.000Z
2022-03-31T13:07:41.000Z
from typing import Callable, Dict, List, Union import dgl import dgl.nn.pytorch as dglnn import torch import torch.nn as nn class RelGraphEmbedding(nn.Module): def __init__( self, hg: dgl.DGLHeteroGraph, embedding_size: int, num_nodes: Dict[str, int], node_feats: Dict[str,...
31.524242
92
0.537441
from typing import Callable, Dict, List, Union import dgl import dgl.nn.pytorch as dglnn import torch import torch.nn as nn class RelGraphEmbedding(nn.Module): def __init__( self, hg: dgl.DGLHeteroGraph, embedding_size: int, num_nodes: Dict[str, int], node_feats: Dict[str,...
true
true
f756e1cb060aa3df9fc8c9866ac06683a65aec2c
4,435
py
Python
src/oci/vulnerability_scanning/models/host_scan_agent_configuration_oci.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/vulnerability_scanning/models/host_scan_agent_configuration_oci.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/vulnerability_scanning/models/host_scan_agent_configuration_oci.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
42.644231
245
0.733258
from .host_scan_agent_configuration import HostScanAgentConfiguration from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class HostScanAgentConfigurationOCI(HostScanAgentConfiguration): ...
true
true
f756e393d8bf919629514d5501168ff1da73e7ed
204
py
Python
penerimaan_biji/penerimaan_biji/doctype/tambang/test_tambang.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
penerimaan_biji/penerimaan_biji/doctype/tambang/test_tambang.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
penerimaan_biji/penerimaan_biji/doctype/tambang/test_tambang.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, PT DAS and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestTambang(unittest.TestCase): pass
18.545455
45
0.759804
from __future__ import unicode_literals import frappe import unittest class TestTambang(unittest.TestCase): pass
true
true
f756e39f72503e3b3d61640e1653d0cae597d516
1,080
py
Python
tests/switch/test_switch.py
aroberge/ideas
f0c8a49f7030276f629101480be77138db07d881
[ "MIT" ]
36
2020-02-23T19:06:24.000Z
2022-02-20T22:53:02.000Z
tests/switch/test_switch.py
aroberge/ideas
f0c8a49f7030276f629101480be77138db07d881
[ "MIT" ]
13
2020-02-21T15:25:40.000Z
2021-07-01T09:56:35.000Z
tests/switch/test_switch.py
aroberge/ideas
f0c8a49f7030276f629101480be77138db07d881
[ "MIT" ]
1
2020-11-05T13:12:07.000Z
2020-11-05T13:12:07.000Z
from ideas.examples import switch from ideas.import_hook import remove_hook def test_transform(): source = """ switch EXPR: case EXPR_1: SUITE case EXPR_2: SUITE case in (EXPR_3, EXPR_4, ...): SUITE else: ...
21.176471
75
0.524074
from ideas.examples import switch from ideas.import_hook import remove_hook def test_transform(): source = """ switch EXPR: case EXPR_1: SUITE case EXPR_2: SUITE case in (EXPR_3, EXPR_4, ...): SUITE else: ...
true
true
f756e3e02d6dd3f3a3d92dd6ddeec4e467dcfefb
25,216
py
Python
cloudmersive_validate_api_client/api_client.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
3
2018-06-23T21:37:21.000Z
2020-04-20T23:07:36.000Z
cloudmersive_validate_api_client/api_client.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
1
2019-02-04T17:03:35.000Z
2019-03-02T20:16:52.000Z
cloudmersive_validate_api_client/api_client.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
2
2019-03-21T15:54:15.000Z
2020-05-27T17:30:43.000Z
# coding: utf-8 """ validateapi The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501 OpenAPI spec version: v1 Gen...
39.461659
240
0.554965
from __future__ import absolute_import import datetime import json import mimetypes from multiprocessing.pool import ThreadPool import os import re import tempfile import six from six.moves.urllib.parse import quote from cloudmersive_validate_api_client.configuration import Configuration import cloudmersive_validat...
true
true
f756e5327d748cb64fba07bd6b64031c554fc8df
16,874
py
Python
scripts/mgear/maya/transform.py
KRNKRS/mgear
06ddc26c5adb5eab07ca470c7fafa77404c8a1de
[ "MIT" ]
94
2017-12-16T07:42:06.000Z
2022-03-28T07:40:04.000Z
scripts/mgear/maya/transform.py
KRNKRS/mgear
06ddc26c5adb5eab07ca470c7fafa77404c8a1de
[ "MIT" ]
66
2017-12-02T14:30:35.000Z
2019-01-14T01:17:38.000Z
scripts/mgear/maya/transform.py
KRNKRS/mgear
06ddc26c5adb5eab07ca470c7fafa77404c8a1de
[ "MIT" ]
27
2018-06-11T14:16:17.000Z
2022-01-09T15:19:32.000Z
"""Functions to work with matrix and transformations""" import math from pymel import util from pymel.core import datatypes, nodetypes from . import vector ############################################# # TRANSFORM ############################################# def getTranslation(node): """Return the position o...
25.336336
74
0.52329
import math from pymel import util from pymel.core import datatypes, nodetypes from . import vector def getTranslation(node): return node.getTranslation(space="world") def getTransform(node): return node.getMatrix(worldSpace=True) def getTransformLookingAt(pos, lookat, normal, axis="xy", negate=False)...
true
true
f756e58cbbfc3c8865b1e046aa201d8c98c49fce
1,403
py
Python
Easy/589.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
6
2017-09-25T18:05:50.000Z
2019-03-27T00:23:15.000Z
Easy/589.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
1
2017-10-29T12:04:41.000Z
2018-08-16T18:00:37.000Z
Easy/589.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
null
null
null
# ------------------------------ # 589. N-ary Tree Preorder Traversal # # Description: # Given an n-ary tree, return the preorder traversal of its nodes' values. # For example, given a 3-ary tree: # Return its preorder traversal as: [1,3,5,6,2,4]. # Note: Recursive solution is trivial, could you do it iteratively? # ...
28.632653
139
0.564505
# For example, given a 3-ary tree: # Return its preorder traversal as: [1,3,5,6,2,4]. # Note: Recursive solution is trivial, could you do it iteratively? # # Version: 1.0 # 07/20/18 by Jianfa # ------------------------------ class Solution(object): def preorder(self, root): if not root: return...
true
true
f756e5b7f5b1a9393484397ceb2e9e27d7532533
129
py
Python
python-sdk/nuscenes/prediction/tests/test_mtp_loss.py
tanjiangyuan/Classification_nuScence
b94c4b0b6257fc1c048a676e3fd9e71183108d53
[ "Apache-2.0" ]
null
null
null
python-sdk/nuscenes/prediction/tests/test_mtp_loss.py
tanjiangyuan/Classification_nuScence
b94c4b0b6257fc1c048a676e3fd9e71183108d53
[ "Apache-2.0" ]
null
null
null
python-sdk/nuscenes/prediction/tests/test_mtp_loss.py
tanjiangyuan/Classification_nuScence
b94c4b0b6257fc1c048a676e3fd9e71183108d53
[ "Apache-2.0" ]
null
null
null
version https://git-lfs.github.com/spec/v1 oid sha256:3348198148bbe54d8b7ff5d3e8ed868e45a258d2922323ff5915ff307ab28bf0 size 7907
32.25
75
0.883721
version https://git-lfs.github.com/spec/v1 oid sha256:3348198148bbe54d8b7ff5d3e8ed868e45a258d2922323ff5915ff307ab28bf0 size 7907
false
true
f756e63a77c58fdd2f3cc0a68e7bff34b43d8d91
1,948
py
Python
test.py
iptk/iptk-py
356e3a4b1acee05b03d25c14f2545a1d12f83787
[ "MIT" ]
null
null
null
test.py
iptk/iptk-py
356e3a4b1acee05b03d25c14f2545a1d12f83787
[ "MIT" ]
null
null
null
test.py
iptk/iptk-py
356e3a4b1acee05b03d25c14f2545a1d12f83787
[ "MIT" ]
1
2020-05-17T21:45:01.000Z
2020-05-17T21:45:01.000Z
# A DatasetStore can be used to create and retrieve IPTK Datasets from iptk import DatasetStore ds = DatasetStore("test_store/") # Each IPTK dataset needs a unique identifier. Using the SHA1 hash of a unique # descriptor of the files in the dataset is strongly recommended. For DICOM # data, the SeriesInstanceUID field...
43.288889
87
0.771047
from iptk import DatasetStore ds = DatasetStore("test_store/") import hashlib, pydicom dicom_info = pydicom.read_file("test_data/IM-0001-0001.dcm") hash = hashlib.sha1(dicom_info.SeriesInstanceUID.encode('utf-8')).hexdigest().lower() dataset = ds.dataset(hash) # the dataset, copy files to that location. from glob imp...
true
true
f756e7746121602d81f98f64c8fb49f0ec7cb53d
625
py
Python
data_processing/make_regions.py
markloboda/PR21mlfjis
0ebf388236daab02ce1efc514284802b8ab07ef9
[ "MIT" ]
null
null
null
data_processing/make_regions.py
markloboda/PR21mlfjis
0ebf388236daab02ce1efc514284802b8ab07ef9
[ "MIT" ]
null
null
null
data_processing/make_regions.py
markloboda/PR21mlfjis
0ebf388236daab02ce1efc514284802b8ab07ef9
[ "MIT" ]
null
null
null
from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="appleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Mobile Safari/537.36") location = geolocator.geocode("jugovzhodna Slovenija", geometry="wkt") geometry = location.raw["geotext"].replace("POLYGON((", "").replace("))", "") geometry = ge...
32.894737
117
0.6752
from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="appleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Mobile Safari/537.36") location = geolocator.geocode("jugovzhodna Slovenija", geometry="wkt") geometry = location.raw["geotext"].replace("POLYGON((", "").replace("))", "") geometry = ge...
true
true
f756e816f927a7e2b59a49a4342727c6402d275c
790
py
Python
server/util/connector.py
1214367903/CubeOnline
1005847f836352f64ad3f8685d8b7882ff5bbdfe
[ "MIT" ]
null
null
null
server/util/connector.py
1214367903/CubeOnline
1005847f836352f64ad3f8685d8b7882ff5bbdfe
[ "MIT" ]
1
2021-03-03T14:05:56.000Z
2021-03-03T14:10:26.000Z
server/util/connector.py
1214367903/CubeOnline
1005847f836352f64ad3f8685d8b7882ff5bbdfe
[ "MIT" ]
null
null
null
""" 目前的服务主要是请求本地的一个接口,以及微信获取open_id的接口 因此,使用连接池理论上会有更好的性能 tornado没有自带的连接池,只好上aiohttp了 """ from typing import Optional import aiohttp from config import connection_config from util import UtilError _client = None async def init() -> None: global _client if _client is not None: return # client对象...
19.268293
65
0.721519
from typing import Optional import aiohttp from config import connection_config from util import UtilError _client = None async def init() -> None: global _client if _client is not None: return _client = aiohttp.ClientSession(**connection_config) def get_client() -> Optional[aiohttp.Clie...
true
true
f756e92b670506cc7755a944b4cf9ed463b78e8c
22,615
py
Python
graph_class.py
vishalbelsare/GNN_tf_2.x
4b6429ed58f2c0922257600a9287d5cc5a10395b
[ "BSD-3-Clause" ]
3
2021-04-09T08:45:04.000Z
2021-12-06T12:00:18.000Z
graph_class.py
vishalbelsare/GNN_tf_2.x
4b6429ed58f2c0922257600a9287d5cc5a10395b
[ "BSD-3-Clause" ]
null
null
null
graph_class.py
vishalbelsare/GNN_tf_2.x
4b6429ed58f2c0922257600a9287d5cc5a10395b
[ "BSD-3-Clause" ]
2
2020-11-23T09:57:00.000Z
2021-03-24T05:37:13.000Z
# coding=utf-8 import os import shutil import numpy as np import tensorflow as tf from scipy.sparse import coo_matrix ####################################################################################################################### ## GRAPH OBJECT CLASS ########################################################...
60.630027
144
0.593854
import os import shutil import numpy as np import tensorflow as tf from scipy.sparse import coo_matrix class GraphObject: def __init__(self, arcs, nodes, targets, problem_based: str = 'n', set_mask=None, output_mask=None, sample_weights=1, ...
true
true
f756eb427d0acaadb1cc5e83a1207aaafbe679c2
5,436
py
Python
ambari-agent/src/main/python/ambari_agent/DataCleaner.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2015-05-04T12:19:05.000Z
2015-05-04T12:19:05.000Z
ambari-agent/src/main/python/ambari_agent/DataCleaner.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
null
null
null
ambari-agent/src/main/python/ambari_agent/DataCleaner.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2021-01-07T08:55:01.000Z
2021-01-07T08:55:01.000Z
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
40.567164
115
0.697756
import AmbariConfig import threading import os import time import re import logging logger = logging.getLogger() class DataCleaner(threading.Thread): COMMAND_FILE_NAMES_PATTERN = 'errors-\d+.txt|output-\d+.txt|site-\d+.pp|structured-out-\d+.json|command-\d+.json' AUTO_COMMAND_FILE_NAMES_PATTERN = \ 'auto_co...
true
true
f756eb5a002fc4c4ab484a9f3aa7cff66872c828
1,807
py
Python
test/functional/rpc_setban.py
FihlaTV/lbrycrd
c54af21ce2758490ae3f8340c73cf0f2401801cc
[ "MIT" ]
null
null
null
test/functional/rpc_setban.py
FihlaTV/lbrycrd
c54af21ce2758490ae3f8340c73cf0f2401801cc
[ "MIT" ]
null
null
null
test/functional/rpc_setban.py
FihlaTV/lbrycrd
c54af21ce2758490ae3f8340c73cf0f2401801cc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the setban rpc call.""" from test_framework.test_framework import BitcoinTestFramework from test_...
37.645833
96
0.652463
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( connect_nodes, p2p_port ) class SetBanTests(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True self.extra_args = [[],[]] def run_tes...
true
true
f756ed93a57192482f58eea11ff11a79c8787303
9,864
py
Python
bot.py
frizensami/sg-blood-stocks-bot
7783399330dcdf04870be85d004323a5c516a29a
[ "MIT" ]
1
2022-01-25T02:54:31.000Z
2022-01-25T02:54:31.000Z
bot.py
frizensami/sg-blood-stocks-bot
7783399330dcdf04870be85d004323a5c516a29a
[ "MIT" ]
4
2021-06-07T12:19:32.000Z
2021-06-09T05:02:36.000Z
bot.py
frizensami/sgbloodstocksbot
7783399330dcdf04870be85d004323a5c516a29a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from telegram import Update from telegram.ext import ( Updater, CommandHandler, CallbackContext, MessageHandler, Filters, CallbackQueryHandler, ) import telegram import sys from datetime import datetime import pytz # Us from scraper import get_bloodstocks from strings imp...
32.235294
156
0.667985
from telegram import Update from telegram.ext import ( Updater, CommandHandler, CallbackContext, MessageHandler, Filters, CallbackQueryHandler, ) import telegram import sys from datetime import datetime import pytz from scraper import get_bloodstocks from strings import HELLO_MSG, ABOUT_MSG, DO...
true
true
f756ee574f325d7c62c8656ee16219de1b3b9ded
79,835
py
Python
poco/apps/apis/recommender/tests.py
sunliwen/poco
a4b8c4ede63711eea42a444fb9d922c350855364
[ "MIT" ]
null
null
null
poco/apps/apis/recommender/tests.py
sunliwen/poco
a4b8c4ede63711eea42a444fb9d922c350855364
[ "MIT" ]
7
2019-03-22T06:26:39.000Z
2021-06-10T19:36:06.000Z
poco/apps/apis/recommender/tests.py
sunliwen/poco
a4b8c4ede63711eea42a444fb9d922c350855364
[ "MIT" ]
1
2017-10-25T03:43:51.000Z
2017-10-25T03:43:51.000Z
# encoding=utf8 import cgi import urlparse import copy import json import time from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse from django.core.cache import get_cache from django.conf import settings from django.http import HttpResponseRedire...
44.72549
123
0.537696
import cgi import urlparse import copy import json import time from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse from django.core.cache import get_cache from django.conf import settings from django.http import HttpResponseRedirect, HttpResponse...
false
true
f756ef20f76b186984c2dec3985cf25d83c5115d
18,770
py
Python
oss2/auth.py
xkdcc/aliyun-oss-python-sdk
c34c10c830b3a0f884af4bd2a1b501b3d4e52038
[ "MIT" ]
null
null
null
oss2/auth.py
xkdcc/aliyun-oss-python-sdk
c34c10c830b3a0f884af4bd2a1b501b3d4e52038
[ "MIT" ]
null
null
null
oss2/auth.py
xkdcc/aliyun-oss-python-sdk
c34c10c830b3a0f884af4bd2a1b501b3d4e52038
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import hmac import hashlib import time from . import utils from .compat import urlquote, to_bytes, is_py2 from .headers import * import logging from .credentials import StaticCredentialsProvider AUTH_VERSION_1 = 'v1' AUTH_VERSION_2 = 'v2' logger = logging.getLogger(__name__) def make_auth(...
38.861284
132
0.638892
import hmac import hashlib import time from . import utils from .compat import urlquote, to_bytes, is_py2 from .headers import * import logging from .credentials import StaticCredentialsProvider AUTH_VERSION_1 = 'v1' AUTH_VERSION_2 = 'v2' logger = logging.getLogger(__name__) def make_auth(access_key_id, access_ke...
true
true
f756f0c176a620399a4f5919fcce8eda28191c56
1,731
py
Python
tests/test_color.py
stephen-bunn/chalk
8bcaaab309cc4f4b5eee019bce08e2765d72cf02
[ "0BSD" ]
2
2020-12-24T16:38:55.000Z
2021-12-09T21:54:56.000Z
tests/test_color.py
stephen-bunn/chalk
8bcaaab309cc4f4b5eee019bce08e2765d72cf02
[ "0BSD" ]
null
null
null
tests/test_color.py
stephen-bunn/chalk
8bcaaab309cc4f4b5eee019bce08e2765d72cf02
[ "0BSD" ]
null
null
null
# -*- encoding: utf-8 -*- # Copyright (c) 2020 Stephen Bunn <stephen@bunn.io> # ISC License <https://choosealicense.com/licenses/isc> """ """ from string import printable from typing import Optional import pytest from hypothesis import given from hypothesis.strategies import SearchStrategy, composite, from_regex, in...
28.85
87
0.742923
from string import printable from typing import Optional import pytest from hypothesis import given from hypothesis.strategies import SearchStrategy, composite, from_regex, integers, text from chalky.color import TrueColor @composite def hex_color(draw) -> SearchStrategy[str]: return draw(from_regex(r"\A#?[0-...
true
true
f756f180022c94a03551bd57a6fcb7c3984d432a
3,891
py
Python
lego/apps/comments/tests/test_notifications.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
lego/apps/comments/tests/test_notifications.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
lego/apps/comments/tests/test_notifications.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
from unittest.mock import patch from lego.apps.articles.models import Article from lego.apps.comments.models import Comment from lego.apps.comments.notifications import CommentNotification, CommentReplyNotification from lego.apps.users.models import User from lego.utils.test_utils import BaseTestCase @patch('lego.ut...
41.393617
97
0.694937
from unittest.mock import patch from lego.apps.articles.models import Article from lego.apps.comments.models import Comment from lego.apps.comments.notifications import CommentNotification, CommentReplyNotification from lego.apps.users.models import User from lego.utils.test_utils import BaseTestCase @patch('lego.ut...
true
true
f756f2452bbce1420f18fe385ff5da4f983dbf7a
796
py
Python
trabajos_entregas/parcial/pablo_b.py
AgustinParmisano/tecnicatura_analisis_sistemas
e64a1922eaf3685706652a2fb9414671014118fc
[ "PSF-2.0" ]
2
2019-11-05T22:10:02.000Z
2019-12-26T22:24:16.000Z
trabajos_entregas/parcial/pablo_b.py
AgustinParmisano/tecnicatura_analisis_sistemas
e64a1922eaf3685706652a2fb9414671014118fc
[ "PSF-2.0" ]
null
null
null
trabajos_entregas/parcial/pablo_b.py
AgustinParmisano/tecnicatura_analisis_sistemas
e64a1922eaf3685706652a2fb9414671014118fc
[ "PSF-2.0" ]
null
null
null
num1 = input('Ingrese el numero 1 ') num2 = input('Ingrese el numero 2 ') num3 = input('Ingrese el numero 3 ') def multiplicacion(num1,num2,num3): resultado = num1 * num2 if(num3 > num1): print('El numero %s es mayor a %s' %(num3,num1)) elif(num3 < num1): print('El numero %s es men...
23.411765
69
0.603015
num1 = input('Ingrese el numero 1 ') num2 = input('Ingrese el numero 2 ') num3 = input('Ingrese el numero 3 ') def multiplicacion(num1,num2,num3): resultado = num1 * num2 if(num3 > num1): print('El numero %s es mayor a %s' %(num3,num1)) elif(num3 < num1): print('El numero %s es men...
true
true
f756f2beea01972d39c325f9fb132c9a737a8db3
9,372
py
Python
2019/6-azureml-movie-recommendation/reco_utils/dataset/spark_splitters.py
sarkarpr/azure-python-labs
0ceae2d814e1f4af836fb117077f26339c4df026
[ "MIT" ]
116
2019-05-02T23:31:07.000Z
2022-02-07T17:38:27.000Z
2019/6-azureml-movie-recommendation/reco_utils/dataset/spark_splitters.py
luabud/azure-python-labs
10ad5d69175cec7fc8ff465368e9867440d034f3
[ "MIT" ]
39
2019-05-03T16:37:33.000Z
2022-01-13T02:48:34.000Z
2019/6-azureml-movie-recommendation/reco_utils/dataset/spark_splitters.py
luabud/azure-python-labs
10ad5d69175cec7fc8ff465368e9867440d034f3
[ "MIT" ]
85
2019-05-03T15:59:58.000Z
2022-03-14T05:22:32.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np from pyspark.sql import Window from pyspark.sql.functions import col, row_number, broadcast, rand from reco_utils.common.constants import ( DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_TIMESTAM...
36.046154
112
0.652155
import numpy as np from pyspark.sql import Window from pyspark.sql.functions import col, row_number, broadcast, rand from reco_utils.common.constants import ( DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_TIMESTAMP_COL, DEFAULT_RATING_COL, ) from reco_utils.dataset.split_utils import process_split_rati...
true
true
f756f38bf251a4358549eb63ee9ec97790afd966
2,388
py
Python
code.py
Sangeetha8034/python-mini-challenges
703b7f379f1c216b29d31c6ecb86fae4a0a9d940
[ "MIT" ]
null
null
null
code.py
Sangeetha8034/python-mini-challenges
703b7f379f1c216b29d31c6ecb86fae4a0a9d940
[ "MIT" ]
null
null
null
code.py
Sangeetha8034/python-mini-challenges
703b7f379f1c216b29d31c6ecb86fae4a0a9d940
[ "MIT" ]
null
null
null
# -------------- #Code starts here def palindrome(num): l=[] t=num while t>0: l.append(t%10) t=t//10 l.reverse() tlen=len(l) if l.count(9)==tlen: return num+2 else: return smallPalin(l,tlen) def smallPalin(lis,n): mid=n//2 left=mid-1 ...
19.104
46
0.436348
def palindrome(num): l=[] t=num while t>0: l.append(t%10) t=t//10 l.reverse() tlen=len(l) if l.count(9)==tlen: return num+2 else: return smallPalin(l,tlen) def smallPalin(lis,n): mid=n//2 left=mid-1 npalin=False right=mid+1 if...
true
true
f756f4c1b0855ac60bcf15770fbe3cd271ee9817
905
py
Python
loft/helpers.py
dotKom/loft
73a57cf4d2b8bfd90c12911b454e3496502d6e85
[ "MIT" ]
null
null
null
loft/helpers.py
dotKom/loft
73a57cf4d2b8bfd90c12911b454e3496502d6e85
[ "MIT" ]
3
2018-01-25T17:28:20.000Z
2018-03-07T20:53:30.000Z
loft/helpers.py
dotkom/loft
73a57cf4d2b8bfd90c12911b454e3496502d6e85
[ "MIT" ]
null
null
null
import subprocess def du(path): du = subprocess.run(["du", "-sb", path], stdout=subprocess.PIPE) # Decode binary string, split return and fetch first entry # in array which is the size in bytes size = du.stdout.decode().split()[0] return size def du_remote(host, path): du = subprocess.run(["...
27.424242
103
0.636464
import subprocess def du(path): du = subprocess.run(["du", "-sb", path], stdout=subprocess.PIPE) size = du.stdout.decode().split()[0] return size def du_remote(host, path): du = subprocess.run(["ssh", host, "du", "-sb", path], stdout=subprocess.PIPE) size = du.stdout.decode().split()[0] ...
true
true
f756f52f2f693140c0a31d86f25e11be48184acf
3,874
py
Python
pytorch_lightning/plugins/training_type/sharded_spawn.py
calebrob6/pytorch-lightning
4c79b3a5b343866217784c66d122819c59a92c1d
[ "Apache-2.0" ]
1
2021-12-03T03:37:20.000Z
2021-12-03T03:37:20.000Z
pytorch_lightning/plugins/training_type/sharded_spawn.py
calebrob6/pytorch-lightning
4c79b3a5b343866217784c66d122819c59a92c1d
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/plugins/training_type/sharded_spawn.py
calebrob6/pytorch-lightning
4c79b3a5b343866217784c66d122819c59a92c1d
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
41.212766
115
0.729479
from typing import Optional import torch import pytorch_lightning as pl from pytorch_lightning.plugins.precision.sharded_native_amp import ShardedNativeMixedPrecisionPlugin from pytorch_lightning.plugins.training_type.ddp_spawn import DDPSpawnPlugin from pytorch_lightning.trainer.states import TrainerFn from pytorch_...
true
true
f756f71fb27b6a3ff7e3046789d645471f54a086
1,883
py
Python
hummingbot/client/settings.py
peatio-net/hummingbot-tunex
a0c94c46af3d40c456ec0653dbe31ea56b3431ca
[ "Apache-2.0" ]
null
null
null
hummingbot/client/settings.py
peatio-net/hummingbot-tunex
a0c94c46af3d40c456ec0653dbe31ea56b3431ca
[ "Apache-2.0" ]
null
null
null
hummingbot/client/settings.py
peatio-net/hummingbot-tunex
a0c94c46af3d40c456ec0653dbe31ea56b3431ca
[ "Apache-2.0" ]
null
null
null
from os.path import ( realpath, join, ) from typing import List from hummingbot import get_strategy_list # Global variables required_exchanges: List[str] = [] # Global static values KEYFILE_PREFIX = "key_file_" KEYFILE_POSTFIX = ".json" ENCYPTED_CONF_PREFIX = "encrypted_" ENCYPTED_CONF_POSTFIX = ".json" GLOB...
22.416667
95
0.654275
from os.path import ( realpath, join, ) from typing import List from hummingbot import get_strategy_list required_exchanges: List[str] = [] KEYFILE_PREFIX = "key_file_" KEYFILE_POSTFIX = ".json" ENCYPTED_CONF_PREFIX = "encrypted_" ENCYPTED_CONF_POSTFIX = ".json" GLOBAL_CONFIG_PATH = "conf/conf_global.yml" TR...
true
true
f756f9348c904151b7f98588aefd69cb9215833a
472
py
Python
character_tracker/initiate.py
llpk79/motw
30e1782404085834f631725f1df07bacdfb21b9c
[ "MIT" ]
null
null
null
character_tracker/initiate.py
llpk79/motw
30e1782404085834f631725f1df07bacdfb21b9c
[ "MIT" ]
null
null
null
character_tracker/initiate.py
llpk79/motw
30e1782404085834f631725f1df07bacdfb21b9c
[ "MIT" ]
1
2021-01-07T03:00:15.000Z
2021-01-07T03:00:15.000Z
from pprint import pprint as pp from character_tracker.character import Character from character_tracker.utils import validate_option_choice, get_int_input class Initiate(Character): def __init__(self): super().__init__() def get_me_some_gear(self): pass def show_me_the_moves(self): ...
19.666667
73
0.688559
from pprint import pprint as pp from character_tracker.character import Character from character_tracker.utils import validate_option_choice, get_int_input class Initiate(Character): def __init__(self): super().__init__() def get_me_some_gear(self): pass def show_me_the_moves(self): ...
true
true
f756fa523051137b4f38205537796d21dc248009
5,171
py
Python
vendor/utils/encrypt.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
vendor/utils/encrypt.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
vendor/utils/encrypt.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ License SYPH-L. Copyright (c) 2013- SYPH(Shaohan Niu), All Rights Reserved. ----------------------------------------------------------- Author: Date: 2016/12/22 Change Activity: """ import os import base64 import json import pyDes from Crypto.Hash import SHA from C...
32.936306
118
0.589054
import os import base64 import json import pyDes from Crypto.Hash import SHA from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 as pk from Crypto.Cipher import DES from Crypto.Cipher import AES class Cryption(object): block_size = DES.block_size UTILS_DIR = os.path.dirname(__file__) ...
true
true
f756fa6e4a9624e4c30c95806ab6e9955eec58ef
137
py
Python
Configuration/Eras/python/Modifier_run2_HE_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Eras/python/Modifier_run2_HE_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Eras/python/Modifier_run2_HE_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # This modifier is for HE-specific changes for sim, reco, etc. run2_HE_2018 = cms.Modifier()
22.833333
62
0.766423
import FWCore.ParameterSet.Config as cms run2_HE_2018 = cms.Modifier()
true
true
f756faa4ccc0b0f9c4e9be5fc9fc10c860878352
5,191
py
Python
src/scs_core/gas/a4/a4_calibrated_datum_vB.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
3
2019-03-12T01:59:58.000Z
2020-09-12T07:27:42.000Z
src/scs_core/gas/a4/a4_calibrated_datum_vB.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
1
2018-04-20T07:58:38.000Z
2021-03-27T08:52:45.000Z
src/scs_core/gas/a4/a4_calibrated_datum_vB.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
4
2017-09-29T13:08:43.000Z
2019-10-09T09:13:58.000Z
""" Created on 9 Dec 2020 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) The A4CalibratedDatum is designed to provide a model training data set that encapsulates the calibration of the electrochemical sensor - we_v_zero_x_cal is only relevant to sensors with NO2 cross-sensitivity. example document: {"weV...
31.083832
118
0.475824
from collections import OrderedDict from scs_core.data.datum import Datum from scs_core.gas.a4.a4_calib import A4Calib from scs_core.gas.a4.a4_datum import A4Datum class A4Calibrator(object): def __init__(self, calib: A4Calib): self.__calib = calib ...
true
true
f756fb54e3a583308004414176117ced417da710
3,067
py
Python
test_model.py
tkuri/noise2noise
a293f4952d3d1c997f4eb298a20fd5fac50a2dd3
[ "MIT" ]
1
2021-06-10T17:51:09.000Z
2021-06-10T17:51:09.000Z
test_model.py
tkuri/noise2noise
a293f4952d3d1c997f4eb298a20fd5fac50a2dd3
[ "MIT" ]
null
null
null
test_model.py
tkuri/noise2noise
a293f4952d3d1c997f4eb298a20fd5fac50a2dd3
[ "MIT" ]
null
null
null
import argparse import numpy as np from pathlib import Path import cv2 from model import get_model # from noise_model import get_noise_model MAX_8BIT = 255. MAX_16BIT = 65535. def get_args(): parser = argparse.ArgumentParser(description="Test trained model", formatter_class=ar...
33.703297
96
0.605804
import argparse import numpy as np from pathlib import Path import cv2 from model import get_model MAX_8BIT = 255. MAX_16BIT = 65535. def get_args(): parser = argparse.ArgumentParser(description="Test trained model", formatter_class=argparse.ArgumentDefaultsHelpFormatter) ...
true
true
f756fbc8ba9f1dc9b0974cdf6e76563d2b4ea425
5,262
py
Python
NLP/para_match.py
Brian-ZhenLiu/Course_Project
dca53c6385c98f682e217ebd630b673d05e42427
[ "MIT" ]
null
null
null
NLP/para_match.py
Brian-ZhenLiu/Course_Project
dca53c6385c98f682e217ebd630b673d05e42427
[ "MIT" ]
null
null
null
NLP/para_match.py
Brian-ZhenLiu/Course_Project
dca53c6385c98f682e217ebd630b673d05e42427
[ "MIT" ]
null
null
null
import numpy as np from numpy import* import csv # def traceBack(matchList, s, t, src, tgt, dTable, btTable): # if btTable[s][t] == " ": # return # #print(str(s) + ", " + str(t)) # if btTable[s][t] == "DI": # traceBack(matchList, s - 1, t - 1, src, tgt, dTable, btTable) # #if dTab...
33.303797
141
0.461612
import numpy as np from numpy import* import csv def backTrTable(src, tgt, dTable): btTable = [] for i in range(len(src) + 1): btTable.append([]) for i in range(len(src), 0, -1): for j in range(len(tgt), 0, -1): if dTable[i, j] == 0: btTable[i].insert(0, (" "...
true
true
f756fc7dbd97d508668cbc755a086d9f2bcfed51
27,675
py
Python
pytorch/gaugan/gaugan.py
quickgrid/paper-implementations
90de1e93cc664e8f5e1e49c57c030f3d9d14fdf9
[ "Apache-2.0" ]
null
null
null
pytorch/gaugan/gaugan.py
quickgrid/paper-implementations
90de1e93cc664e8f5e1e49c57c030f3d9d14fdf9
[ "Apache-2.0" ]
8
2022-02-12T11:58:24.000Z
2022-02-20T21:29:59.000Z
pytorch/gaugan/gaugan.py
quickgrid/paper-implementations
90de1e93cc664e8f5e1e49c57c030f3d9d14fdf9
[ "Apache-2.0" ]
null
null
null
"""Pytorch GauGAN implementation. Either segmentation one hot mask or rgb mask can be passed to discriminator with little modification. Todo - Modify to try to generate and match mask also as loss. - Try discriminator with either segmentation image or label. - Use multiscale feature from discriminator to ...
38.652235
118
0.584932
import os import pathlib from datetime import datetime from typing import Tuple import torch import torch.nn as nn import torch.optim as optim import torchvision from torchvision.models.feature_extraction import get_graph_node_names, create_feature_extractor from torchvision.transforms import transforms from torchvis...
true
true
f756fce471851f4a87e36f4bb90c38196ed2d6ec
1,300
py
Python
zorro/io.py
codebyzeb/Zorro
bb6e12e7891a6bc3e00891ef0519f48acb3454f9
[ "MIT" ]
2
2021-11-10T12:11:47.000Z
2021-11-12T09:39:55.000Z
zorro/io.py
codebyzeb/Zorro
bb6e12e7891a6bc3e00891ef0519f48acb3454f9
[ "MIT" ]
1
2020-05-06T22:29:27.000Z
2020-05-06T22:29:27.000Z
zorro/io.py
codebyzeb/Zorro
bb6e12e7891a6bc3e00891ef0519f48acb3454f9
[ "MIT" ]
1
2020-04-30T17:10:06.000Z
2020-04-30T17:10:06.000Z
from typing import Dict, List, Optional from pathlib import Path from zorro import configs def get_group2model_output_paths(group_names: List[str], phenomenon: str, paradigm: str, step: str = '*', ...
34.210526
100
0.553846
from typing import Dict, List, Optional from pathlib import Path from zorro import configs def get_group2model_output_paths(group_names: List[str], phenomenon: str, paradigm: str, step: str = '*', ...
true
true
f756fd0ba6459dc77039ccc58d1759ba93b95351
3,165
py
Python
ceee/common/initializing_coclass.py
Gitman1989/chromium
2b1cceae1075ef012fb225deec8b4c8bbe4bc897
[ "BSD-3-Clause" ]
2
2017-09-02T19:08:28.000Z
2021-11-15T15:15:14.000Z
ceee/common/initializing_coclass.py
Gitman1989/chromium
2b1cceae1075ef012fb225deec8b4c8bbe4bc897
[ "BSD-3-Clause" ]
null
null
null
ceee/common/initializing_coclass.py
Gitman1989/chromium
2b1cceae1075ef012fb225deec8b4c8bbe4bc897
[ "BSD-3-Clause" ]
1
2020-04-13T05:45:10.000Z
2020-04-13T05:45:10.000Z
# Copyright (c) 2010 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. """A generator for initializing_coclass.h, which contains a bunch of repeated code that can't be produced through the preprocessor.""" import sys from st...
29.305556
79
0.676461
import sys from string import Template HEADER_ = """\ // This file is autogenerated by initializing_coclass.py, do not edit. #ifndef CEEE_COMMON_INITIALIZING_COCLASS_GEN_INL_ #define CEEE_COMMON_INITIALIZING_COCLASS_GEN_INL_ """ FOOTER_ = """\ #endif // CEEE_COMMON_INITIALIZING_COCLASS_GEN_INL_ """ TEMPLATE_ = Tem...
true
true
f756fe71bf6842b38c42d5f99aceb0303c083979
2,039
py
Python
pandas/tests/io/parser/dialect.py
vimalromeo/pandas
7c14e4f14aff216be558bf5d4d2d00b4838c2360
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
69
2020-03-31T06:40:17.000Z
2022-02-25T11:48:18.000Z
venv/lib/python3.7/site-packages/pandas/tests/io/parser/dialect.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
8
2019-12-04T23:44:11.000Z
2022-02-10T08:31:40.000Z
venv/lib/python3.7/site-packages/pandas/tests/io/parser/dialect.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
28
2020-04-15T15:24:17.000Z
2021-12-26T04:05:02.000Z
# -*- coding: utf-8 -*- """ Tests that dialects are properly handled during parsing for all of the parsers defined in parsers.py """ import csv from pandas import DataFrame from pandas.compat import StringIO from pandas.errors import ParserWarning import pandas.util.testing as tm class DialectTests(object): ...
25.810127
78
0.622364
import csv from pandas import DataFrame from pandas.compat import StringIO from pandas.errors import ParserWarning import pandas.util.testing as tm class DialectTests(object): def test_dialect(self): data = """\ label1,label2,label3 index1,"a,c,e index2,b,d,f """ dia = csv.excel() di...
true
true
f75700070314187ff579d94e29a59a49fe643a46
5,508
py
Python
firststreet/api/adaptation.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
firststreet/api/adaptation.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
firststreet/api/adaptation.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
# Author: Kelvin Lai <kelvin@firststreet.org> # Copyright: This module is owned by First Street Foundation # Standard Imports import logging # Internal Imports from firststreet.api import csv_format from firststreet.api.api import Api from firststreet.errors import InvalidArgument from firststreet.models.adaptation i...
43.03125
119
0.671569
import logging from firststreet.api import csv_format from firststreet.api.api import Api from firststreet.errors import InvalidArgument from firststreet.models.adaptation import AdaptationDetail, AdaptationSummary class Adaptation(Api): def get_detail(self, search_item, csv=False, output_dir=None, extra_param...
true
true
f75700a48c795528f774f9f593d2490f2008b660
34,866
py
Python
pandas/tests/window/test_rolling.py
luijkr/pandas
bc29dfb5bf4c82f8d616857c2316fc8f17d8f2a5
[ "BSD-3-Clause" ]
3
2021-12-13T05:53:26.000Z
2022-03-07T01:38:02.000Z
pandas/tests/window/test_rolling.py
luijkr/pandas
bc29dfb5bf4c82f8d616857c2316fc8f17d8f2a5
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/window/test_rolling.py
luijkr/pandas
bc29dfb5bf4c82f8d616857c2316fc8f17d8f2a5
[ "BSD-3-Clause" ]
1
2021-12-13T05:53:20.000Z
2021-12-13T05:53:20.000Z
from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall from pandas import ( DataFrame, DatetimeIndex, MultiIndex, Series, Timedelta, Timestamp, date_range, period_range, to_datetime, to_timedelta, ) import pa...
30.964476
88
0.518155
from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall from pandas import ( DataFrame, DatetimeIndex, MultiIndex, Series, Timedelta, Timestamp, date_range, period_range, to_datetime, to_timedelta, ) import pa...
true
true
f75700ffe5f83f4b15a357c4bd31de22d08be29a
627
py
Python
src/products_crawler/spiders/bearbrick.py
RyouMon/GoodsCrawer
81a679307adeccb9f0874567848735322023d687
[ "MIT" ]
null
null
null
src/products_crawler/spiders/bearbrick.py
RyouMon/GoodsCrawer
81a679307adeccb9f0874567848735322023d687
[ "MIT" ]
null
null
null
src/products_crawler/spiders/bearbrick.py
RyouMon/GoodsCrawer
81a679307adeccb9f0874567848735322023d687
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from scrapy.linkextractors import LinkExtractor from scrapy.spiders import Rule from . import GenericSpider class BearbrickSpider(GenericSpider): name = 'bearbrick' allowed_domains = ['bearbrick.com'] rules = ( # Match each product in product list. Rule( ...
25.08
59
0.54067
from scrapy.linkextractors import LinkExtractor from scrapy.spiders import Rule from . import GenericSpider class BearbrickSpider(GenericSpider): name = 'bearbrick' allowed_domains = ['bearbrick.com'] rules = ( Rule( LinkExtractor( allow=r'.*html', ...
true
true
f757023bff256369b64a6c6ddf178819e8accb79
3,191
py
Python
chrome/common/extensions/docs/server2/content_provider.py
SlimKatLegacy/android_external_chromium_org
ee480ef5039d7c561fc66ccf52169ead186f1bea
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-04T02:36:53.000Z
2016-06-25T11:22:17.000Z
chrome/common/extensions/docs/server2/content_provider.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/common/extensions/docs/server2/content_provider.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2015-02-09T08:49:30.000Z
2017-08-26T02:03:34.000Z
# Copyright 2013 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. import mimetypes import os from compiled_file_system import SingleFile from directory_zipper import DirectoryZipper from docs_server_utils import ToUnicode ...
34.311828
80
0.689126
import mimetypes import os from compiled_file_system import SingleFile from directory_zipper import DirectoryZipper from docs_server_utils import ToUnicode from future import Gettable, Future from third_party.handlebar import Handlebar class ContentAndType(object): def __init__(self, content, content_type): ...
true
true
f757037366ce618933d8a52295f4160fe9af76cd
7,451
py
Python
chainercmd/train.py
mitmul/chainercmd
1925d7a8c27bdbc8946483090688c45a292e37f7
[ "MIT" ]
10
2017-07-18T12:29:05.000Z
2018-07-18T17:49:24.000Z
chainercmd/train.py
mitmul/chainercmd
1925d7a8c27bdbc8946483090688c45a292e37f7
[ "MIT" ]
null
null
null
chainercmd/train.py
mitmul/chainercmd
1925d7a8c27bdbc8946483090688c45a292e37f7
[ "MIT" ]
2
2021-01-08T01:17:04.000Z
2021-01-23T09:28:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import shutil import time from importlib import import_module import chainer import yaml from chainer import iterators from chainer import serializers from chainer import training from chainer.training import extensions from chainer.training import tri...
36.886139
79
0.652798
import os import re import shutil import time from importlib import import_module import chainer import yaml from chainer import iterators from chainer import serializers from chainer import training from chainer.training import extensions from chainer.training import triggers from chainer.training import updaters f...
true
true
f75705e86138a389ec24fc9d031cbe134091be40
1,640
py
Python
lightning_plus/urls.py
twocucao/lightning-plus
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
1
2021-04-15T14:52:12.000Z
2021-04-15T14:52:12.000Z
lightning_plus/urls.py
twocucao/lightning
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
null
null
null
lightning_plus/urls.py
twocucao/lightning
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views import defaults as default_views from lightning_plus.puzzle.urls import urlpatterns as puzzle_urls from lightning_plus.graphql.admin.view import graph...
32.156863
85
0.627439
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views import defaults as default_views from lightning_plus.puzzle.urls import urlpatterns as puzzle_urls from lightning_plus.graphql.admin.view import graph...
true
true
f75706dd3eabacb82d30091636d33133617e163e
2,072
py
Python
PRYMETIME/nucmer4.py
tyler-e-marshall/prymetime
c1daa783c8091adbc5900a51d98522b1269d0107
[ "MIT" ]
null
null
null
PRYMETIME/nucmer4.py
tyler-e-marshall/prymetime
c1daa783c8091adbc5900a51d98522b1269d0107
[ "MIT" ]
null
null
null
PRYMETIME/nucmer4.py
tyler-e-marshall/prymetime
c1daa783c8091adbc5900a51d98522b1269d0107
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Title: Sending Contigs to Nucmer Created on Tue Aug 13 2019 @author: Eric @email: ericyoung7@gmail.com """ import glob, os import pandas as pd from Bio import SeqIO from pymummer import nucmer from pathlib import Path path_to_file = "pilon.fasta" path = Path(path_to_file) short_contigs = ...
25.268293
111
0.620656
import glob, os import pandas as pd from Bio import SeqIO from pymummer import nucmer from pathlib import Path path_to_file = "pilon.fasta" path = Path(path_to_file) short_contigs = [] contigs = [] if path.is_file(): for x in SeqIO.parse(open("pilon.fasta"),'fasta'): if len(x.seq) < 50000: ...
true
true
f757080eadc72c3e6472bb9d4b079640e9e1a675
8,329
py
Python
tests/components/locative/test_init.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
2
2017-10-26T19:43:55.000Z
2017-12-30T23:29:00.000Z
tests/components/locative/test_init.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2021-09-08T03:34:57.000Z
2022-03-12T00:59:48.000Z
tests/components/locative/test_init.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-06-19T07:43:11.000Z
2019-06-19T07:43:11.000Z
"""The tests the for Locative device tracker platform.""" from unittest.mock import patch, Mock import pytest from homeassistant import data_entry_flow from homeassistant.components import locative from homeassistant.components.device_tracker import \ DOMAIN as DEVICE_TRACKER_DOMAIN from homeassistant.components....
30.509158
76
0.626726
from unittest.mock import patch, Mock import pytest from homeassistant import data_entry_flow from homeassistant.components import locative from homeassistant.components.device_tracker import \ DOMAIN as DEVICE_TRACKER_DOMAIN from homeassistant.components.locative import DOMAIN, TRACKER_UPDATE from homeassistant....
true
true
f757085b639966a0e159575f9ab3793a64412562
49,176
py
Python
idem_azurerm/exec/azurerm/compute/virtual_machine.py
johnoneill98/idem-azurerm
37e0743fd236f758b093f5898cc99e95ffde9889
[ "Apache-2.0" ]
null
null
null
idem_azurerm/exec/azurerm/compute/virtual_machine.py
johnoneill98/idem-azurerm
37e0743fd236f758b093f5898cc99e95ffde9889
[ "Apache-2.0" ]
null
null
null
idem_azurerm/exec/azurerm/compute/virtual_machine.py
johnoneill98/idem-azurerm
37e0743fd236f758b093f5898cc99e95ffde9889
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Azure Resource Manager (ARM) Compute Virtual Machine Execution Module .. versionadded:: 1.0.0 .. versionchanged:: 2.0.0 :maintainer: <devops@eitr.tech> :configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function or via ac...
37.827692
120
0.632707
from __future__ import absolute_import import logging import os HAS_LIBS = False try: import azure.mgmt.compute.models from msrest.exceptions import SerializationError from msrestazure.azure_exceptions import CloudError from msrestazure.tools import is_valid_resource_id, parse_resource_id HAS_LIB...
true
true
f757087b4b1ae435518aa3d5b018f637646dd1c4
540
py
Python
study_algorithm/python/Sort/Selection Sort.py
AlphaSunny/study
4e65127fefa9078b7ae6b9db92369c93e61e4327
[ "MIT" ]
null
null
null
study_algorithm/python/Sort/Selection Sort.py
AlphaSunny/study
4e65127fefa9078b7ae6b9db92369c93e61e4327
[ "MIT" ]
null
null
null
study_algorithm/python/Sort/Selection Sort.py
AlphaSunny/study
4e65127fefa9078b7ae6b9db92369c93e61e4327
[ "MIT" ]
null
null
null
def selection_sort(arr): # For every slot in array for fillslot in range(len(arr)-1,0,-1): positionOfMax=0 # For every set of 0 to fillslot+1 for location in range(1,fillslot+1): # Set maximum's location if arr[location]>arr[positionOfMax]: ...
25.714286
49
0.553704
def selection_sort(arr): for fillslot in range(len(arr)-1,0,-1): positionOfMax=0 for location in range(1,fillslot+1): if arr[location]>arr[positionOfMax]: positionOfMax = location temp = arr[fillslot] arr[fi...
true
true
f7570945aebc5967e767c3f6ca863f9a03c344f0
5,006
py
Python
python/example_code/kinesis/kinesisanalyticsv2_demo.py
iconara/aws-doc-sdk-examples
52706b31b4fce8fb89468e56743edf5369e69628
[ "Apache-2.0" ]
5,166
2016-09-02T08:48:38.000Z
2022-03-31T19:12:43.000Z
python/example_code/kinesis/kinesisanalyticsv2_demo.py
iconara/aws-doc-sdk-examples
52706b31b4fce8fb89468e56743edf5369e69628
[ "Apache-2.0" ]
1,186
2016-09-28T23:05:19.000Z
2022-03-31T18:07:47.000Z
python/example_code/kinesis/kinesisanalyticsv2_demo.py
iconara/aws-doc-sdk-examples
52706b31b4fce8fb89468e56743edf5369e69628
[ "Apache-2.0" ]
4,003
2016-08-29T19:51:40.000Z
2022-03-31T16:40:02.000Z
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with Amazon Kinesis and version 2 of the Amazon Kinesis Data Analytics API to create an application that reads data from an input stream, uses SQL code...
36.540146
87
0.726328
import logging from pprint import pprint import sys import threading import time import boto3 from analyticsv2.analytics_application import KinesisAnalyticsApplicationV2 from streams.kinesis_stream import KinesisStream from streams.dg_anomaly import generate sys.path.append('../..') from demo_tools.custom_waiter im...
true
true