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
1c3e67025a83965a9ac3f68cba1fe13e7efbd30d
1,031
py
Python
exercicio 068.py
rayanesousa31/Python-Curso-em-video-Mundo-2
9f962557b5a373bd2b45509d8990d0658effce9c
[ "MIT" ]
null
null
null
exercicio 068.py
rayanesousa31/Python-Curso-em-video-Mundo-2
9f962557b5a373bd2b45509d8990d0658effce9c
[ "MIT" ]
null
null
null
exercicio 068.py
rayanesousa31/Python-Curso-em-video-Mundo-2
9f962557b5a373bd2b45509d8990d0658effce9c
[ "MIT" ]
null
null
null
#Faça um programa que jogue PAR ou IMPAR com o computador. #O jogo será interrompido quando o jogador PERDER,mostrando #o total de vitórias consecutivas que ele conquistou no #final do jogo. from random import randint from time import sleep print('Vamos jogar IMPAR ou par'),sleep(2) cont = 0 while True: jogador...
27.864865
85
0.57711
from random import randint from time import sleep print('Vamos jogar IMPAR ou par'),sleep(2) cont = 0 while True: jogador = int(input('Digite um número ')) comp = randint(1,10) jogo = comp + jogador opção = ' ' while opção not in 'PI': opção = str(input('Você escolhe impar ou par? [I...
true
true
1c3e6793967ef5707643ead3c0be75ed24cd0414
10,245
py
Python
api_tests/nodes/views/test_node_links_detail.py
hmoco/osf.io
a02869f9b5c198bafae7cea0c216674bbcba62f7
[ "Apache-2.0" ]
1
2015-10-02T18:35:53.000Z
2015-10-02T18:35:53.000Z
api_tests/nodes/views/test_node_links_detail.py
hmoco/osf.io
a02869f9b5c198bafae7cea0c216674bbcba62f7
[ "Apache-2.0" ]
4
2016-05-13T14:24:16.000Z
2017-03-30T15:28:31.000Z
api_tests/nodes/views/test_node_links_detail.py
hmoco/osf.io
a02869f9b5c198bafae7cea0c216674bbcba62f7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from nose.tools import * # flake8: noqa from urlparse import urlparse from framework.auth.core import Auth from website.models import NodeLog from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from osf_tests.factories import ( ProjectFactory, Registrat...
48.098592
121
0.686774
from nose.tools import * from urlparse import urlparse from framework.auth.core import Auth from website.models import NodeLog from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from osf_tests.factories import ( ProjectFactory, RegistrationFactory, AuthUserFactory, ) fr...
true
true
1c3e69669f57fe674a926d9ade62e5797dbedaae
1,266
py
Python
polimorfo/datasets/utils.py
chrisPiemonte/polimorfo
79e2178dbc21fe3f98e8d84d23f33b818244ab08
[ "Apache-2.0" ]
null
null
null
polimorfo/datasets/utils.py
chrisPiemonte/polimorfo
79e2178dbc21fe3f98e8d84d23f33b818244ab08
[ "Apache-2.0" ]
null
null
null
polimorfo/datasets/utils.py
chrisPiemonte/polimorfo
79e2178dbc21fe3f98e8d84d23f33b818244ab08
[ "Apache-2.0" ]
null
null
null
from PIL import Image from functools import partial import requests from io import BytesIO import multiprocessing from multiprocessing.dummy import Pool from tqdm.autonotebook import tqdm import logging log = logging.getLogger(__name__) def download_image(url_path): """download an image and save to the destinati...
29.44186
76
0.669036
from PIL import Image from functools import partial import requests from io import BytesIO import multiprocessing from multiprocessing.dummy import Pool from tqdm.autonotebook import tqdm import logging log = logging.getLogger(__name__) def download_image(url_path): url, path = url_path if path.exists(): ...
true
true
1c3e6a3d37aeaa774ede07ce507303532ab60719
888
py
Python
pixelate/__init__.py
useless-tools/pixelate
5e964c1a77780f933db20b1424807e59e899a427
[ "BSD-3-Clause" ]
23
2017-10-18T15:31:30.000Z
2022-02-01T14:50:28.000Z
pixelate/__init__.py
useless-tools/pixelate
5e964c1a77780f933db20b1424807e59e899a427
[ "BSD-3-Clause" ]
1
2021-04-06T05:15:29.000Z
2022-02-18T15:07:06.000Z
pixelate/__init__.py
useless-tools/pixelate
5e964c1a77780f933db20b1424807e59e899a427
[ "BSD-3-Clause" ]
5
2018-11-30T21:05:25.000Z
2021-12-23T23:47:43.000Z
from PIL import Image def pixelate(input_file_path: str, output_file_path: str, pixel_size: int): """ Create a pixel image from the input image. Args: input_file_path: the path to the source image file to be processed. output_file_path: the path to the result file. pixel_size:...
30.62069
75
0.611486
from PIL import Image def pixelate(input_file_path: str, output_file_path: str, pixel_size: int): with Image.open(input_file_path) as image: image = image.resize( (image.size[0] // pixel_size, image.size[1] // pixel_size), Image.NEAREST ) image = image.resize( ...
true
true
1c3e6c6bab0854f4b3751c24a38dc7909dfdff70
5,736
py
Python
src/pop3sf/adapters/DirectoryAdapterBase.py
vitlabuda/pop3sf
3792b98da329fa8091308f3363808a499af58ad7
[ "BSD-3-Clause" ]
1
2022-03-16T18:58:19.000Z
2022-03-16T18:58:19.000Z
src/pop3sf/adapters/DirectoryAdapterBase.py
vitlabuda/pop3sf
3792b98da329fa8091308f3363808a499af58ad7
[ "BSD-3-Clause" ]
null
null
null
src/pop3sf/adapters/DirectoryAdapterBase.py
vitlabuda/pop3sf
3792b98da329fa8091308f3363808a499af58ad7
[ "BSD-3-Clause" ]
1
2022-03-17T18:01:43.000Z
2022-03-17T18:01:43.000Z
# SPDX-License-Identifier: BSD-3-Clause # # Copyright (c) 2021 Vít Labuda. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # 1. Redistributions of source code must retain the above copyright notice...
47.404959
152
0.731695
from __future__ import annotations from typing import List import abc import time import os import os.path import glob import fcntl import hashlib from .AdapterAuxiliaries import AdapterAuxiliaries from .AdapterBase import AdapterBase class DirectoryAdapterBase(AdapterBase, metaclass=abc.ABCMeta...
true
true
1c3e6d3b562e4192a449eec58aedf7c4a9e1563e
2,568
py
Python
environment/script/edit_dot_graph.py
computationalgeography/lue
71993169bae67a9863d7bd7646d207405dc6f767
[ "MIT" ]
2
2021-02-26T22:45:56.000Z
2021-05-02T10:28:48.000Z
environment/script/edit_dot_graph.py
pcraster/lue
e64c18f78a8b6d8a602b7578a2572e9740969202
[ "MIT" ]
262
2016-08-11T10:12:02.000Z
2020-10-13T18:09:16.000Z
environment/script/edit_dot_graph.py
computationalgeography/lue
71993169bae67a9863d7bd7646d207405dc6f767
[ "MIT" ]
1
2020-03-11T09:49:41.000Z
2020-03-11T09:49:41.000Z
#!/usr/bin/env python import functools import os.path import re import sys import traceback import docopt def checked_call( function): @functools.wraps(function) def wrapper( *args, **kwargs): result = 0 try: result = function(*args, **kwargs) ...
26.474227
77
0.608645
import functools import os.path import re import sys import traceback import docopt def checked_call( function): @functools.wraps(function) def wrapper( *args, **kwargs): result = 0 try: result = function(*args, **kwargs) except: ...
true
true
1c3e6de79b1a7d032b4af2b2d0cbd9ee93c15924
300
py
Python
chapter 8/sampleCode5.py
DTAIEB/Thoughtful-Data-Science
8b80e8f3e33b6fdc6672ecee1f27e0b983b28241
[ "Apache-2.0" ]
15
2018-06-01T19:18:32.000Z
2021-11-28T03:31:35.000Z
chapter 8/sampleCode5.py
chshychen/Thoughtful-Data-Science
8b80e8f3e33b6fdc6672ecee1f27e0b983b28241
[ "Apache-2.0" ]
1
2018-12-17T02:01:42.000Z
2018-12-17T02:01:42.000Z
chapter 8/sampleCode5.py
chshychen/Thoughtful-Data-Science
8b80e8f3e33b6fdc6672ecee1f27e0b983b28241
[ "Apache-2.0" ]
10
2018-09-23T02:45:45.000Z
2022-03-12T15:32:05.000Z
import requests databases = [] page = 1 while(page is not None): payload = requests.get("https://www.quandl.com/api/v3/databases?api_key={}&page={}"\ .format(quandl.ApiConfig.api_key, page)).json() databases += payload['databases'] page = payload['meta']['next_page']
33.333333
88
0.636667
import requests databases = [] page = 1 while(page is not None): payload = requests.get("https://www.quandl.com/api/v3/databases?api_key={}&page={}"\ .format(quandl.ApiConfig.api_key, page)).json() databases += payload['databases'] page = payload['meta']['next_page']
true
true
1c3e6f3666a6ca5f3a023941fb3c4c1b80494304
1,399
py
Python
nuke_stubs/nuke/nuke_internal/scripts.py
sisoe24/Nuke-Python-Stubs
79c53cf5cb7b38e15a34fd04f672b143d9d7dc85
[ "MIT" ]
1
2022-01-12T01:29:16.000Z
2022-01-12T01:29:16.000Z
nuke_stubs/nuke/nuke_internal/scripts.py
sisoe24/Nuke-Python-Stubs
79c53cf5cb7b38e15a34fd04f672b143d9d7dc85
[ "MIT" ]
null
null
null
nuke_stubs/nuke/nuke_internal/scripts.py
sisoe24/Nuke-Python-Stubs
79c53cf5cb7b38e15a34fd04f672b143d9d7dc85
[ "MIT" ]
null
null
null
"""This module define the scriptSaveAndClear method for Nuke API. nuke.scriptSaveAndClear will call nuke.scriptSave() if any changes were made and then calls nuke.scriptClear() """ import nuke_internal as nuke def scriptSaveAndClear(filename=None, ignoreUnsavedChanges=False): """ scriptSaveAndClear(filename=None, i...
31.795455
110
0.706934
import nuke_internal as nuke def scriptSaveAndClear(filename=None, ignoreUnsavedChanges=False): root = nuke.Root() if not ignoreUnsavedChanges and root is not None and root.modified() and len(root.nodes()) > 0: runScriptSave = False if filename is None: scriptName = '' try: scriptNa...
true
true
1c3e6f796d22ad4a6d1d7dcf66a8c3466bf58805
427
py
Python
data/__init__.py
pishchalnikov/hacker-news-api-tests
773b3dfbaaa4675fcebb1421ddb9d35ad0bfa65f
[ "MIT" ]
null
null
null
data/__init__.py
pishchalnikov/hacker-news-api-tests
773b3dfbaaa4675fcebb1421ddb9d35ad0bfa65f
[ "MIT" ]
null
null
null
data/__init__.py
pishchalnikov/hacker-news-api-tests
773b3dfbaaa4675fcebb1421ddb9d35ad0bfa65f
[ "MIT" ]
null
null
null
import os import jsonref class DataJsonReader(dict): def __init__(self, file_name): base_path = os.path.dirname(os.path.abspath(__file__)) json_path = os.path.join(base_path, file_name) base_uri = f"file://{base_path}/" with open(json_path) as input_file: self.update(j...
30.5
74
0.620609
import os import jsonref class DataJsonReader(dict): def __init__(self, file_name): base_path = os.path.dirname(os.path.abspath(__file__)) json_path = os.path.join(base_path, file_name) base_uri = f"file://{base_path}/" with open(json_path) as input_file: self.update(j...
true
true
1c3e71024ceb589d01c4523ee29040d20dbbcdaf
1,567
py
Python
Trinket_Question_Block_Sound_Jewelry/code.py
gamblor21/Adafruit_Learning_System_Guides
f5dab4a758bc82d0bfc3c299683fe89dc093912a
[ "MIT" ]
665
2017-09-27T21:20:14.000Z
2022-03-31T09:09:25.000Z
Trinket_Question_Block_Sound_Jewelry/code.py
gamblor21/Adafruit_Learning_System_Guides
f5dab4a758bc82d0bfc3c299683fe89dc093912a
[ "MIT" ]
641
2017-10-03T19:46:37.000Z
2022-03-30T18:28:46.000Z
Trinket_Question_Block_Sound_Jewelry/code.py
gamblor21/Adafruit_Learning_System_Guides
f5dab4a758bc82d0bfc3c299683fe89dc093912a
[ "MIT" ]
734
2017-10-02T22:47:38.000Z
2022-03-30T14:03:51.000Z
# SPDX-FileCopyrightText: 2017 Limor Fried/ladyada for Adafruit Industries # SPDX-FileCopyrightText: 2018 Mikey Sklar for Adafruit Industries # # SPDX-License-Identifier: MIT import time import board import simpleio import pwmio import digitalio # PWM is not available on Trinket D1 vibration_pin = board.D1 # vibra...
33.340426
74
0.668794
import time import board import simpleio import pwmio import digitalio vibration_pin = board.D1 speaker_pin = board.D2 pwm_leds = board.D4 pwm = pwmio.PWMOut(pwm_leds, frequency=256, duty_cycle=50) led_fade_delay = .001 led_fade_step = 1024 vpin = digitalio.DigitalInOut(vibr...
true
true
1c3e71085a82468f1cdb29c08537996c0482b531
8,168
py
Python
vericite_lms_client/models/report_meta_data.py
vericite/vericite_api_python
1ffef5c7900c534c74b681254afe204260e0326c
[ "Apache-2.0" ]
null
null
null
vericite_lms_client/models/report_meta_data.py
vericite/vericite_api_python
1ffef5c7900c534c74b681254afe204260e0326c
[ "Apache-2.0" ]
null
null
null
vericite_lms_client/models/report_meta_data.py
vericite/vericite_api_python
1ffef5c7900c534c74b681254afe204260e0326c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ VeriCiteLmsApiV1 No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "Licens...
28.659649
170
0.60835
from pprint import pformat from six import iteritems import re class ReportMetaData(object): def __init__(self, assignment_title=None, context_title=None, external_content_data=None, user_email=None, user_first_name=None, user_last_name=None, user_role=None): self.swagger_types = { 'assignm...
true
true
1c3e71189d4930286e5f0e16f6b38e6ad810cd26
7,674
py
Python
tests/pytests/functional/states/test_win_certutil.py
tomdoherty/salt
f87d5d7abbf9777773c4d91fdafecb8b1a728e76
[ "Apache-2.0" ]
1
2022-03-12T00:03:19.000Z
2022-03-12T00:03:19.000Z
tests/pytests/functional/states/test_win_certutil.py
tomdoherty/salt
f87d5d7abbf9777773c4d91fdafecb8b1a728e76
[ "Apache-2.0" ]
2
2022-03-02T16:11:35.000Z
2022-03-03T08:04:30.000Z
tests/pytests/functional/states/test_win_certutil.py
tomdoherty/salt
f87d5d7abbf9777773c4d91fdafecb8b1a728e76
[ "Apache-2.0" ]
null
null
null
""" Tests for win_certutil state module """ import pytest import salt.utils.files pytestmark = [ pytest.mark.windows_whitelisted, pytest.mark.skip_unless_on_windows, ] @pytest.fixture(scope="module") def certutil(states): return states.certutil @pytest.fixture(scope="module") def certutil_mod(modules):...
36.542857
84
0.681783
import pytest import salt.utils.files pytestmark = [ pytest.mark.windows_whitelisted, pytest.mark.skip_unless_on_windows, ] @pytest.fixture(scope="module") def certutil(states): return states.certutil @pytest.fixture(scope="module") def certutil_mod(modules): return modules.certutil @pytest.fixtu...
true
true
1c3e713af7c0116ccd04cf76d73556e884f2c1ce
9,120
py
Python
tests/test_data/test_personal.py
el/elizabeth
dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff
[ "MIT" ]
null
null
null
tests/test_data/test_personal.py
el/elizabeth
dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff
[ "MIT" ]
null
null
null
tests/test_data/test_personal.py
el/elizabeth
dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff
[ "MIT" ]
1
2019-12-27T19:34:17.000Z
2019-12-27T19:34:17.000Z
# -*- coding: utf-8 -*- import re from unittest import TestCase from elizabeth import Personal import elizabeth.core.interdata as common from tests.test_data import DummyCase from ._patterns import * class PersonalBaseTest(TestCase): def setUp(self): self.personal = Personal() def tearDown(self): ...
34.285714
99
0.649561
import re from unittest import TestCase from elizabeth import Personal import elizabeth.core.interdata as common from tests.test_data import DummyCase from ._patterns import * class PersonalBaseTest(TestCase): def setUp(self): self.personal = Personal() def tearDown(self): del self.person...
true
true
1c3e7190f63670b6ac954e3ba27387d7957fe2ed
7,366
py
Python
pybind/nos/v7_1_0/hide_routemap_holder/route_map/content/set_/ipv6/next_vrf/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_1_0/hide_routemap_holder/route_map/content/set_/ipv6/next_vrf/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_1_0/hide_routemap_holder/route_map/content/set_/ipv6/next_vrf/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
59.403226
811
0.721423
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
1c3e71a10ea7e6e5d942f2a0f2035b00368692e9
925
py
Python
setup.py
RollingStar/getnative
7c30c882a37b07e54daa7bbddd9de63794d436ef
[ "MIT" ]
null
null
null
setup.py
RollingStar/getnative
7c30c882a37b07e54daa7bbddd9de63794d436ef
[ "MIT" ]
null
null
null
setup.py
RollingStar/getnative
7c30c882a37b07e54daa7bbddd9de63794d436ef
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from setuptools import setup, find_packages with open("README.md") as fh: long_description = fh.read() with open("requirements.txt") as fh: install_requires = fh.read() setup( name="getnative", version='2.2.0', description='Find the native resolution(s) of upscaled materia...
28.90625
84
0.676757
from setuptools import setup, find_packages with open("README.md") as fh: long_description = fh.read() with open("requirements.txt") as fh: install_requires = fh.read() setup( name="getnative", version='2.2.0', description='Find the native resolution(s) of upscaled material (mostly anime)', ...
true
true
1c3e74c023dfd36517727b4164044dbac99e87a4
983
py
Python
MUNDO 3/ex113.py
athavus/Curso-em-video-Python-3
a32be95adbccfcbe512a1ed30d3859141a230b5e
[ "MIT" ]
1
2020-11-12T14:03:32.000Z
2020-11-12T14:03:32.000Z
MUNDO 3/ex113.py
athavus/Curso-em-video-Python-3
a32be95adbccfcbe512a1ed30d3859141a230b5e
[ "MIT" ]
null
null
null
MUNDO 3/ex113.py
athavus/Curso-em-video-Python-3
a32be95adbccfcbe512a1ed30d3859141a230b5e
[ "MIT" ]
1
2021-01-05T22:18:46.000Z
2021-01-05T22:18:46.000Z
def leiaInt(msg): while True: try: num = int(input(msg)) except (ValueError, TypeError): print('\033[1;31mERRO! Por favor digite um número real válido.\033[m') continue except (KeyboardInterrupt): print('\033[1;31mO Usuário resolveu não...
30.71875
86
0.552391
def leiaInt(msg): while True: try: num = int(input(msg)) except (ValueError, TypeError): print('\033[1;31mERRO! Por favor digite um número real válido.\033[m') continue except (KeyboardInterrupt): print('\033[1;31mO Usuário resolveu não...
true
true
1c3e74f1e2e6e4618e63c5d6c908d723ae6b7034
2,572
py
Python
game/node.py
HexDecimal/7drl-2022
755949875cc11e288908eccaee102c7ca0e43777
[ "CC0-1.0" ]
null
null
null
game/node.py
HexDecimal/7drl-2022
755949875cc11e288908eccaee102c7ca0e43777
[ "CC0-1.0" ]
null
null
null
game/node.py
HexDecimal/7drl-2022
755949875cc11e288908eccaee102c7ca0e43777
[ "CC0-1.0" ]
null
null
null
from __future__ import annotations import logging from typing import Any, Iterator, Optional, Set, Type, TypeVar TNode = TypeVar("TNode", bound="Node") logger = logging.getLogger(__name__) class Node: """A mixin that allows instances to be organzied into a scene graph.""" def __init__(self, *, parent: Opt...
32.974359
111
0.586703
from __future__ import annotations import logging from typing import Any, Iterator, Optional, Set, Type, TypeVar TNode = TypeVar("TNode", bound="Node") logger = logging.getLogger(__name__) class Node: def __init__(self, *, parent: Optional[Node] = None) -> None: super().__init__() self._parent...
true
true
1c3e750f020ac4a5d73c3160bb8c244aec04969a
543
py
Python
08_run_wordcount.py
azmikamis/apache-beam-wordcount
be21156a8f5c1ca9b50f28cffe608589e8ce5383
[ "MIT" ]
null
null
null
08_run_wordcount.py
azmikamis/apache-beam-wordcount
be21156a8f5c1ca9b50f28cffe608589e8ce5383
[ "MIT" ]
null
null
null
08_run_wordcount.py
azmikamis/apache-beam-wordcount
be21156a8f5c1ca9b50f28cffe608589e8ce5383
[ "MIT" ]
null
null
null
from googleapiclient.discovery import build from oauth2client.client import GoogleCredentials from datetime import datetime credentials = GoogleCredentials.get_application_default() service = build('dataflow', 'v1b3', credentials=credentials) request = service.projects().templates().launch( projectId='PR...
45.25
106
0.725599
from googleapiclient.discovery import build from oauth2client.client import GoogleCredentials from datetime import datetime credentials = GoogleCredentials.get_application_default() service = build('dataflow', 'v1b3', credentials=credentials) request = service.projects().templates().launch( projectId='PR...
true
true
1c3e760e5296e1d4b6cedd5acd92fda6198682cd
3,187
py
Python
Assignment02/Part01/Graph_udemy.py
saurabhkakade21/AIS_spring2021
784d20670794c405505b09c1feea36e0a504ae5d
[ "MIT" ]
null
null
null
Assignment02/Part01/Graph_udemy.py
saurabhkakade21/AIS_spring2021
784d20670794c405505b09c1feea36e0a504ae5d
[ "MIT" ]
null
null
null
Assignment02/Part01/Graph_udemy.py
saurabhkakade21/AIS_spring2021
784d20670794c405505b09c1feea36e0a504ae5d
[ "MIT" ]
null
null
null
# Created by Elshad Karimov # Copyright © 2021 AppMillers. All rights reserved. class Graph: def __init__(self, gdict=None): if gdict is None: gdict = {} self.gdict = gdict def addEdge(self, vertex, edge): self.gdict[vertex].append(edge) def bfs(self, vert...
23.962406
72
0.503608
class Graph: def __init__(self, gdict=None): if gdict is None: gdict = {} self.gdict = gdict def addEdge(self, vertex, edge): self.gdict[vertex].append(edge) def bfs(self, vertex): visited = [vertex] queue = [vertex] while queue: ...
true
true
1c3e767bdefa9d1ae404e50bbf6bc102d64b8573
4,263
py
Python
adb-connect.py
remylavergne/ADB-Wi-Fi-Connect-GUI
de0a167534485a9ad1c172fe7e275f831e707e5f
[ "MIT" ]
5
2020-03-21T00:15:13.000Z
2021-12-10T07:59:20.000Z
adb-connect.py
remylavergne/ADB-Wi-Fi-Connect-GUI
de0a167534485a9ad1c172fe7e275f831e707e5f
[ "MIT" ]
null
null
null
adb-connect.py
remylavergne/ADB-Wi-Fi-Connect-GUI
de0a167534485a9ad1c172fe7e275f831e707e5f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import subprocess import sys import time from PySide2.QtWidgets import (QLineEdit, QPushButton, QApplication, QDialog, QLabel, QGridLayout) class Form(QDialog): def __init__(self, parent=None): super(Form, self).__init__(parent) self.setWindowTitle("ADB Wi-Fi Connect 0.2"...
34.942623
100
0.571194
import subprocess import sys import time from PySide2.QtWidgets import (QLineEdit, QPushButton, QApplication, QDialog, QLabel, QGridLayout) class Form(QDialog): def __init__(self, parent=None): super(Form, self).__init__(parent) self.setWindowTitle("ADB Wi-Fi Connect 0.2") sel...
true
true
1c3e768600e54d3c1c007e307058c3b2ee2dfba3
4,554
py
Python
board.py
SebBlin/p4
342753a1e9bf018751cf0f4eff69e8f240df53e7
[ "MIT" ]
1
2020-06-14T19:10:35.000Z
2020-06-14T19:10:35.000Z
board.py
SebBlin/p4
342753a1e9bf018751cf0f4eff69e8f240df53e7
[ "MIT" ]
null
null
null
board.py
SebBlin/p4
342753a1e9bf018751cf0f4eff69e8f240df53e7
[ "MIT" ]
null
null
null
import numpy as np import hashlib nbcol = 7 nbligne = 6 pion = [' ', 'X', 'O'] def print_top_line(): print(u'\u250c', end = '') for _ in range(nbcol-1): print(u'\u2500\u252c', sep = '', end = '') print(u'\u2500\u2510') def print_mid_line_empty(tab_line): for i in range(nbcol): print(...
27.433735
107
0.504172
import numpy as np import hashlib nbcol = 7 nbligne = 6 pion = [' ', 'X', 'O'] def print_top_line(): print(u'\u250c', end = '') for _ in range(nbcol-1): print(u'\u2500\u252c', sep = '', end = '') print(u'\u2500\u2510') def print_mid_line_empty(tab_line): for i in range(nbcol): print(...
true
true
1c3e769abaf60b187cfc57bec702401e64629712
6,620
py
Python
phase_classification_features.py
cahya-wirawan/phase-detection
ca65442c4f2a30004a17cf79cbe54cf9c2f6925d
[ "MIT" ]
null
null
null
phase_classification_features.py
cahya-wirawan/phase-detection
ca65442c4f2a30004a17cf79cbe54cf9c2f6925d
[ "MIT" ]
null
null
null
phase_classification_features.py
cahya-wirawan/phase-detection
ca65442c4f2a30004a17cf79cbe54cf9c2f6925d
[ "MIT" ]
null
null
null
import argparse import numpy as np from keras.wrappers.scikit_learn import KerasClassifier from keras.callbacks import ModelCheckpoint, TensorBoard from keras.models import load_model from sklearn.model_selection import cross_val_score from sklearn.model_selection import KFold from sklearn.metrics import confusion_matr...
52.539683
113
0.616163
import argparse import numpy as np from keras.wrappers.scikit_learn import KerasClassifier from keras.callbacks import ModelCheckpoint, TensorBoard from keras.models import load_model from sklearn.model_selection import cross_val_score from sklearn.model_selection import KFold from sklearn.metrics import confusion_matr...
true
true
1c3e769dcf5543050992240a4de1783bd64c6643
15,400
py
Python
devlib/trace/ftrace.py
douglas-raillard-arm/devlib
e3d9c4b2fdf5b878b51204713c34d7fc6dd6b305
[ "Apache-2.0" ]
null
null
null
devlib/trace/ftrace.py
douglas-raillard-arm/devlib
e3d9c4b2fdf5b878b51204713c34d7fc6dd6b305
[ "Apache-2.0" ]
null
null
null
devlib/trace/ftrace.py
douglas-raillard-arm/devlib
e3d9c4b2fdf5b878b51204713c34d7fc6dd6b305
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 ARM Limited # # 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 writin...
44.252874
110
0.603117
from __future__ import division import os import json import time import re import subprocess from devlib.trace import TraceCollector from devlib.host import PACKAGE_BIN_DIRECTORY from devlib.exception import TargetError, HostError from devlib.utils.misc import check_output, which TRACE_MARKER_START =...
true
true
1c3e7755abcfd3bfa2f47c0829731b8bf801a9e2
8,752
py
Python
gammapy/irf/edisp/core.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
1
2017-11-22T17:07:56.000Z
2017-11-22T17:07:56.000Z
gammapy/irf/edisp/core.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
null
null
null
gammapy/irf/edisp/core.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
1
2019-09-04T14:03:33.000Z
2019-09-04T14:03:33.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import scipy.special from astropy import units as u from astropy.coordinates import Angle, SkyCoord from astropy.visualization import quantity_support from gammapy.maps import MapAxes, MapAxis, RegionGeom from ..core import IRF __all__ ...
31.595668
92
0.589808
import numpy as np import scipy.special from astropy import units as u from astropy.coordinates import Angle, SkyCoord from astropy.visualization import quantity_support from gammapy.maps import MapAxes, MapAxis, RegionGeom from ..core import IRF __all__ = ["EnergyDispersion2D"] class EnergyDispersion2D(IRF): ...
true
true
1c3e78fd908e52d77a53d8e59192195a4a3ac042
183
py
Python
assetfiles/management/commands/findstatic.py
localmed/django-assetfiles
34089780126989f49e6b890b85a90047704fde37
[ "MIT" ]
null
null
null
assetfiles/management/commands/findstatic.py
localmed/django-assetfiles
34089780126989f49e6b890b85a90047704fde37
[ "MIT" ]
2
2017-02-11T20:10:46.000Z
2017-02-11T20:10:56.000Z
assetfiles/management/commands/findstatic.py
localmed/django-assetfiles
34089780126989f49e6b890b85a90047704fde37
[ "MIT" ]
null
null
null
from django.contrib.staticfiles.management.commands import findstatic """ `findstatic` is used in exactly the same way as staticfiles' `findstatic`. """ Command = findstatic.Command
26.142857
74
0.786885
from django.contrib.staticfiles.management.commands import findstatic Command = findstatic.Command
true
true
1c3e79916311ed421944b038cd76799d9f019587
2,003
py
Python
osgtest/tests/test_280_gsiopenssh.py
djw8605/osg-test
9cbbd48875863cb30627989c12df40e0daf3985c
[ "Apache-2.0" ]
1
2016-03-09T20:24:07.000Z
2016-03-09T20:24:07.000Z
osgtest/tests/test_280_gsiopenssh.py
djw8605/osg-test
9cbbd48875863cb30627989c12df40e0daf3985c
[ "Apache-2.0" ]
122
2016-03-23T16:59:07.000Z
2022-02-23T18:25:34.000Z
osgtest/tests/test_280_gsiopenssh.py
djw8605/osg-test
9cbbd48875863cb30627989c12df40e0daf3985c
[ "Apache-2.0" ]
14
2016-03-09T17:54:20.000Z
2021-07-02T15:51:23.000Z
from osgtest.library import core from osgtest.library import osgunittest from osgtest.library import files from osgtest.library import service SSHD_CONFIG = "/etc/gsissh/sshd_config" SSHD_CONFIG_TEXT = r''' Port %(port)s AuthorizedKeysFile .ssh/authorized_keys UsePrivilegeSeparation sandbox GSSAPIAuthentication yes ...
33.383333
100
0.673989
from osgtest.library import core from osgtest.library import osgunittest from osgtest.library import files from osgtest.library import service SSHD_CONFIG = "/etc/gsissh/sshd_config" SSHD_CONFIG_TEXT = r''' Port %(port)s AuthorizedKeysFile .ssh/authorized_keys UsePrivilegeSeparation sandbox GSSAPIAuthentication yes ...
true
true
1c3e7a4fba332045a6cc535936322932cb36765b
1,410
py
Python
Examples/example35.py
ZibraMax/FEM
b868c60408a4f83dec4bb424d66be0b20e2ac71b
[ "MIT" ]
10
2021-03-21T18:38:40.000Z
2022-02-22T01:32:06.000Z
Examples/example35.py
ZibraMax/FEM
b868c60408a4f83dec4bb424d66be0b20e2ac71b
[ "MIT" ]
null
null
null
Examples/example35.py
ZibraMax/FEM
b868c60408a4f83dec4bb424d66be0b20e2ac71b
[ "MIT" ]
1
2022-02-08T04:40:59.000Z
2022-02-08T04:40:59.000Z
import numpy as np import matplotlib.pyplot as plt from FEM.Torsion2D import Torsion2D from FEM.Mesh.Delaunay import Delaunay a = 0.3 b = 0.3 tw = 0.05 tf = 0.05 E = 200000 v = 0.27 G = E / (2 * (1 + v)) phi = 1 vertices = [ [0, 0], [a, 0], [a, tf], [a / 2 + tw / 2, tf], [a / 2 + tw / 2, tf + b], ...
27.115385
80
0.574468
import numpy as np import matplotlib.pyplot as plt from FEM.Torsion2D import Torsion2D from FEM.Mesh.Delaunay import Delaunay a = 0.3 b = 0.3 tw = 0.05 tf = 0.05 E = 200000 v = 0.27 G = E / (2 * (1 + v)) phi = 1 vertices = [ [0, 0], [a, 0], [a, tf], [a / 2 + tw / 2, tf], [a / 2 + tw / 2, tf + b], ...
true
true
1c3e7aece6b9e5fafeb3f4141d5fc01faaf56eec
14,849
py
Python
chrome/test/functional/test_utils.py
gavinp/chromium
681563ea0f892a051f4ef3d5e53438e0bb7d2261
[ "BSD-3-Clause" ]
1
2016-03-10T09:13:57.000Z
2016-03-10T09:13:57.000Z
chrome/test/functional/test_utils.py
gavinp/chromium
681563ea0f892a051f4ef3d5e53438e0bb7d2261
[ "BSD-3-Clause" ]
1
2022-03-13T08:39:05.000Z
2022-03-13T08:39:05.000Z
chrome/test/functional/test_utils.py
gavinp/chromium
681563ea0f892a051f4ef3d5e53438e0bb7d2261
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import ctypes import email import logging import os import platform import shutil import smtplib import subprocess import sys import types i...
35.270784
80
0.709947
import copy import ctypes import email import logging import os import platform import shutil import smtplib import subprocess import sys import types import pyauto_functional import pyauto import pyauto_utils def CopyFileFromDataDirToDownloadDir(test, file_path): data_file = os.path.join(test.DataDir(), file...
true
true
1c3e7b52832204ee95f8948fbb41dd0bd1476aab
222
py
Python
importError.py
mkseth4774/ine-guide-to-network-programmability-python-course-files
35c49dfcf8e8f1b69435987a00fb9a236b803d9f
[ "MIT" ]
null
null
null
importError.py
mkseth4774/ine-guide-to-network-programmability-python-course-files
35c49dfcf8e8f1b69435987a00fb9a236b803d9f
[ "MIT" ]
null
null
null
importError.py
mkseth4774/ine-guide-to-network-programmability-python-course-files
35c49dfcf8e8f1b69435987a00fb9a236b803d9f
[ "MIT" ]
null
null
null
## ## try: import sys import os import time import somethingthatdoesnotexist except ImportError: print('Houston, we have an import problem!') print('We are going to run anyway!') ## ## End of file...
14.8
48
0.657658
try: import sys import os import time import somethingthatdoesnotexist except ImportError: print('Houston, we have an import problem!') print('We are going to run anyway!')
true
true
1c3e7cf15ea529432627832a89b418841418949b
2,664
py
Python
exercises/crypto3.py
mbolli/python-scripts
56047ff3612e8268779bdd152cd668ea66110bd5
[ "BSD-2-Clause" ]
null
null
null
exercises/crypto3.py
mbolli/python-scripts
56047ff3612e8268779bdd152cd668ea66110bd5
[ "BSD-2-Clause" ]
null
null
null
exercises/crypto3.py
mbolli/python-scripts
56047ff3612e8268779bdd152cd668ea66110bd5
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Some small exercises for playing around with crypto stuff. # DON'T USE FOR ANY SERIOUS CRYPTOGRAPHIC PURPOSES! # # Copyright (C) 2016, Michael Bolli <http://bolli.us> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
24.666667
144
0.655405
# # Copyright (C) 2016, Michael Bolli <http://bolli.us> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This ...
false
true
1c3e7e00dd940ceea153638844fe30bac5ad49cd
1,687
py
Python
UMSLHackRestAPI/api/migrations/0002_auto_20200222_1833.py
trujivan/climate-impact-changes
609b8197b0ede1c1fdac3aa82b34e73e6f4526e3
[ "MIT" ]
1
2020-03-29T17:52:26.000Z
2020-03-29T17:52:26.000Z
UMSLHackRestAPI/api/migrations/0002_auto_20200222_1833.py
trujivan/climate-impact-changes
609b8197b0ede1c1fdac3aa82b34e73e6f4526e3
[ "MIT" ]
6
2021-03-19T00:01:21.000Z
2021-09-22T18:37:17.000Z
UMSLHackRestAPI/api/migrations/0002_auto_20200222_1833.py
trujivan/climate-impact-changes
609b8197b0ede1c1fdac3aa82b34e73e6f4526e3
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-02-23 00:33 import api.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.CreateModel( name='MLReque...
41.146341
263
0.583284
import api.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.CreateModel( name='MLRequest', fields=[ ('id'...
true
true
1c3e7e4ce8433895dd5660f5df52b956b3fc31ee
2,269
py
Python
Chapter10/01-chapter-content/k_means_color_quantization.py
yaojh01/Mastering-OpenCV-4-with-Python
e8f83e314b8ed638edb6515967cfb24361b787af
[ "MIT" ]
2
2021-06-29T22:00:47.000Z
2021-06-30T02:46:19.000Z
Chapter10/01-chapter-content/k_means_color_quantization.py
yaojh01/Mastering-OpenCV-4-with-Python
e8f83e314b8ed638edb6515967cfb24361b787af
[ "MIT" ]
null
null
null
Chapter10/01-chapter-content/k_means_color_quantization.py
yaojh01/Mastering-OpenCV-4-with-Python
e8f83e314b8ed638edb6515967cfb24361b787af
[ "MIT" ]
1
2019-10-03T20:34:43.000Z
2019-10-03T20:34:43.000Z
""" K-means clustering algorithm applied to color quantization """ # Import required packages: import numpy as np import cv2 from matplotlib import pyplot as plt def show_img_with_matplotlib(color_img, title, pos): """Shows an image using matplotlib capabilities""" # Convert BGR image to RGB img_RGB = c...
31.957746
111
0.72543
import numpy as np import cv2 from matplotlib import pyplot as plt def show_img_with_matplotlib(color_img, title, pos): img_RGB = color_img[:, :, ::-1] ax = plt.subplot(2, 3, pos) plt.imshow(img_RGB) plt.title(title) plt.axis('off') def color_quantization(image, k): data = np....
true
true
1c3e7f168ba1b2c202fb5b181c9780fee159aa25
22,828
py
Python
test/test_md030_ordered.py
jackdewinter/pymarkdown
7ae408ba0b24506fa07552ffe520750bbff38c53
[ "MIT" ]
20
2021-01-14T17:39:09.000Z
2022-03-14T08:35:22.000Z
test/test_md030_ordered.py
jackdewinter/pymarkdown
7ae408ba0b24506fa07552ffe520750bbff38c53
[ "MIT" ]
304
2020-08-15T23:24:00.000Z
2022-03-31T23:34:03.000Z
test/test_md030_ordered.py
jackdewinter/pymarkdown
7ae408ba0b24506fa07552ffe520750bbff38c53
[ "MIT" ]
3
2021-08-11T10:26:26.000Z
2021-11-02T20:41:27.000Z
""" Module to provide tests related to the MD030 rule. """ from test.markdown_scanner import MarkdownScanner import pytest # pylint: disable=too-many-lines @pytest.mark.rules def test_md030_bad_configuration_ol_single(): """ Test to verify that a configuration error is thrown when supplying the ol_singl...
28.714465
123
0.657307
from test.markdown_scanner import MarkdownScanner import pytest @pytest.mark.rules def test_md030_bad_configuration_ol_single(): scanner = MarkdownScanner() supplied_arguments = [ "--set", "plugins.md030.ol_single=not-integer", "--strict-config", "scan", "test/...
true
true
1c3e7fd1b3bed5afdc913af0be1beeb3fd3079e9
4,332
py
Python
analytics/consumer.py
heitorsampaio/analytics-python
517c812a9c10ee369407521e36c155c738932ae5
[ "Unlicense", "MIT" ]
null
null
null
analytics/consumer.py
heitorsampaio/analytics-python
517c812a9c10ee369407521e36c155c738932ae5
[ "Unlicense", "MIT" ]
null
null
null
analytics/consumer.py
heitorsampaio/analytics-python
517c812a9c10ee369407521e36c155c738932ae5
[ "Unlicense", "MIT" ]
null
null
null
import logging from threading import Thread import monotonic import backoff import json from analytics.request import post, APIError, DatetimeSerializer try: from queue import Empty except ImportError: from Queue import Empty MAX_MSG_SIZE = 32 << 10 # Our servers only accept batches less than 500KB. Here li...
32.088889
79
0.559557
import logging from threading import Thread import monotonic import backoff import json from analytics.request import post, APIError, DatetimeSerializer try: from queue import Empty except ImportError: from Queue import Empty MAX_MSG_SIZE = 32 << 10 BATCH_SIZE_LIMIT = 475000 class Consumer(Thread): ...
true
true
1c3e8090dc3d1bdc87269a5e3aa02ad54cb1c41d
276
py
Python
moveMouse.py
helloprasanna/python
1f218ddf84bc082dca5906833238389011ae344b
[ "MIT" ]
null
null
null
moveMouse.py
helloprasanna/python
1f218ddf84bc082dca5906833238389011ae344b
[ "MIT" ]
null
null
null
moveMouse.py
helloprasanna/python
1f218ddf84bc082dca5906833238389011ae344b
[ "MIT" ]
null
null
null
import pyautogui import time print('Press Ctrl-C to quit.') try: while True: x, y = pyautogui.position() pyautogui.moveTo(x+5, y+5) print('X : {}, Y : {} '.format(x, y)) time.sleep(5) except KeyboardInterrupt: print('Terminated \n')
18.4
45
0.57971
import pyautogui import time print('Press Ctrl-C to quit.') try: while True: x, y = pyautogui.position() pyautogui.moveTo(x+5, y+5) print('X : {}, Y : {} '.format(x, y)) time.sleep(5) except KeyboardInterrupt: print('Terminated \n')
true
true
1c3e81161bf35beb9539000f3765d21bce5ca285
2,020
py
Python
code/knn.py
sornalingam/ml-glossary
1ef2d23fb73ed785fda9b5d37d465d6d05c80f37
[ "MIT" ]
4
2020-09-26T01:26:28.000Z
2021-08-05T20:54:04.000Z
code/knn.py
tusharmishra288/ml-glossary
eac8d91097d6f16801d46cf0c68ae667f49f0eda
[ "MIT" ]
null
null
null
code/knn.py
tusharmishra288/ml-glossary
eac8d91097d6f16801d46cf0c68ae667f49f0eda
[ "MIT" ]
null
null
null
from collections import Counter from math import sqrt def euclidean_distance(point1, point2): distance = 0 for i in range(len(point1)): distance +=(point1[i] - point2[i]) ** 2 return sqrt(distance) def mean(labels): return sum(labels) / len(labels) def mode(labels): return Co...
26.933333
89
0.585149
from collections import Counter from math import sqrt def euclidean_distance(point1, point2): distance = 0 for i in range(len(point1)): distance +=(point1[i] - point2[i]) ** 2 return sqrt(distance) def mean(labels): return sum(labels) / len(labels) def mode(labels): return Co...
true
true
1c3e81bc03e97828c120842a812e728cfce91939
838
py
Python
numba/cuda/tests/cudapy/test_userexc.py
uw-ipd/numba
26dde2b28cadda403a5549a84dc1698900b23f74
[ "BSD-2-Clause" ]
3
2019-09-30T20:00:36.000Z
2020-07-13T04:17:15.000Z
numba/cuda/tests/cudapy/test_userexc.py
uw-ipd/numba
26dde2b28cadda403a5549a84dc1698900b23f74
[ "BSD-2-Clause" ]
null
null
null
numba/cuda/tests/cudapy/test_userexc.py
uw-ipd/numba
26dde2b28cadda403a5549a84dc1698900b23f74
[ "BSD-2-Clause" ]
1
2020-05-07T11:36:27.000Z
2020-05-07T11:36:27.000Z
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin from numba import cuda class MyError(Exception): pass class TestUserExc(SerialMixin, unittest.TestCase): def test_user_exception(self): @cuda.jit("void(int32)", debug=True) ...
26.1875
81
0.601432
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin from numba import cuda class MyError(Exception): pass class TestUserExc(SerialMixin, unittest.TestCase): def test_user_exception(self): @cuda.jit("void(int32)", debug=True) ...
true
true
1c3e822ee939e2be140a15ab1d0164a58d5ed646
7,384
py
Python
openpyxl/tests/test_cell.py
Wyss/customarrayformatter
40e395fb272e8e69bf64056748a87c0df716e2a3
[ "MIT" ]
null
null
null
openpyxl/tests/test_cell.py
Wyss/customarrayformatter
40e395fb272e8e69bf64056748a87c0df716e2a3
[ "MIT" ]
null
null
null
openpyxl/tests/test_cell.py
Wyss/customarrayformatter
40e395fb272e8e69bf64056748a87c0df716e2a3
[ "MIT" ]
null
null
null
# file openpyxl/tests/test_cell.py # Copyright (c) 2010-2011 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
28.291188
121
0.676192
from datetime import time, datetime, timedelta from nose.tools import eq_, raises, assert_raises from openpyxl.worksheet import Worksheet from openpyxl.workbook import Workbook from openpyxl.shared.exc import ColumnStringIndexException, \ CellCoordinatesException, DataTypeExceptio...
true
true
1c3e82cc247161ee1625ccb0cabfc3a4f65f897e
14,062
py
Python
tests/providers/google/cloud/hooks/test_kubernetes_engine.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
8
2017-04-20T16:15:44.000Z
2020-10-11T13:44:10.000Z
tests/providers/google/cloud/hooks/test_kubernetes_engine.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
219
2017-03-15T18:40:16.000Z
2022-02-28T22:52:43.000Z
tests/providers/google/cloud/hooks/test_kubernetes_engine.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
3
2016-07-14T21:51:10.000Z
2020-10-12T13:26:36.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
44.359621
107
0.685535
import unittest import mock from google.cloud.container_v1.types import Cluster from mock import PropertyMock from airflow import AirflowException from airflow.providers.google.cloud.hooks.kubernetes_engine import GKEHook TASK_ID = 'test-gke-cluster-operator' CLUSTER_NAME = 'test-cluster' TEST_GCP_...
true
true
1c3e850e69120700b53c04cd15ff2bb0f49eba20
9,662
py
Python
templateMatching.py
AndrewMDelgado/UTA_ChessBot
e57218526102a95db8e9b4892c1c1b63b1322c98
[ "MIT" ]
null
null
null
templateMatching.py
AndrewMDelgado/UTA_ChessBot
e57218526102a95db8e9b4892c1c1b63b1322c98
[ "MIT" ]
null
null
null
templateMatching.py
AndrewMDelgado/UTA_ChessBot
e57218526102a95db8e9b4892c1c1b63b1322c98
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Apr 7 14:48:33 2018 @author: lenangungu """ import numpy as np import time from aruco_detect import detectCode from aruco_detect import detectCode2 import matplotlib.image as mpimg import matplotlib.pyplot as plt import skimage.feature as sk class Ma...
31.472313
161
0.477541
import numpy as np import time from aruco_detect import detectCode from aruco_detect import detectCode2 import matplotlib.image as mpimg import matplotlib.pyplot as plt import skimage.feature as sk class Match: def __init__(self): self.board = self.createBoard() def position(self, corners)...
true
true
1c3e8580a517f6f1347979a29bbe093e7db77cb0
3,627
py
Python
train.py
ChmarsLuo/Charms-Semantic-Segmentation-Models
4a8cdf82a218c3d3e1c8d10ef6a9118c8e6f3f89
[ "Apache-2.0" ]
5
2021-03-09T22:56:03.000Z
2021-06-18T12:20:34.000Z
train.py
ChmarsLuo/Charms-Semantic-Segmentation-Models
4a8cdf82a218c3d3e1c8d10ef6a9118c8e6f3f89
[ "Apache-2.0" ]
null
null
null
train.py
ChmarsLuo/Charms-Semantic-Segmentation-Models
4a8cdf82a218c3d3e1c8d10ef6a9118c8e6f3f89
[ "Apache-2.0" ]
1
2021-01-23T08:32:46.000Z
2021-01-23T08:32:46.000Z
from data import * from keras.models import load_model import os import keras from keras.optimizers import * from lr.lr import scheduler from keras.losses import binary_crossentropy, categorical_crossentropy from models import MobileNext from keras.callbacks import ModelCheckpoint, TensorBoard,\ LearningR...
44.231707
121
0.570168
from data import * from keras.models import load_model import os import keras from keras.optimizers import * from lr.lr import scheduler from keras.losses import binary_crossentropy, categorical_crossentropy from models import MobileNext from keras.callbacks import ModelCheckpoint, TensorBoard,\ LearningR...
true
true
1c3e86182db408ba7ef54aa9b065e364e0d389b0
660
py
Python
gencove/command/s3_imports/autoimports/autoimport_list/cli.py
gncv/gencove-cli
b4bcbe5b6a1506544472542af8b2384d21c7cbe4
[ "Apache-2.0" ]
1
2020-04-28T06:31:53.000Z
2020-04-28T06:31:53.000Z
gencove/command/s3_imports/autoimports/autoimport_list/cli.py
gncv/gencove-cli
b4bcbe5b6a1506544472542af8b2384d21c7cbe4
[ "Apache-2.0" ]
null
null
null
gencove/command/s3_imports/autoimports/autoimport_list/cli.py
gncv/gencove-cli
b4bcbe5b6a1506544472542af8b2384d21c7cbe4
[ "Apache-2.0" ]
1
2021-07-29T08:24:51.000Z
2021-07-29T08:24:51.000Z
"""Project autoimport from S3 URI shell command definition. """ import click from gencove.command.common_cli_options import add_options, common_options from gencove.constants import Credentials, Optionals from .main import S3AutoImportList @click.command("list") @add_options(common_options) def autoimport_list( ...
20.625
74
0.701515
import click from gencove.command.common_cli_options import add_options, common_options from gencove.constants import Credentials, Optionals from .main import S3AutoImportList @click.command("list") @add_options(common_options) def autoimport_list( host, email, password, api_key, ): S3AutoImpor...
true
true
1c3e86a43c2a0d5672cd50f8c9ca4f8573b62144
376
py
Python
DiRa_Software/Reference/Source code final 2018-2019/LHU_The_Walker_Digital_race_2019/build/lhucds/detect/thoi_cds/lhu_odometry/catkin_generated/pkg.installspace.context.pc.py
lamhoangtung/DiRa
6e92f465c0197f3bd60b1e5719c1cc8fa06c5e4c
[ "MIT" ]
34
2019-05-07T08:44:27.000Z
2020-05-26T13:52:32.000Z
DiRa_Software/Reference/Source code final 2018-2019/LHU_The_Walker_Digital_race_2019/build/lhucds/detect/thoi_cds/lhu_odometry/catkin_generated/pkg.installspace.context.pc.py
giangnt071098/DiRa
71da5c9f13f3fb32d4cc1efd96d981139fb66ee5
[ "MIT" ]
3
2019-10-21T04:37:48.000Z
2019-11-11T12:16:04.000Z
DiRa_Software/Reference/Source code final 2018-2019/LHU_The_Walker_Digital_race_2019/build/lhucds/detect/thoi_cds/lhu_odometry/catkin_generated/pkg.installspace.context.pc.py
giangnt071098/DiRa
71da5c9f13f3fb32d4cc1efd96d981139fb66ee5
[ "MIT" ]
58
2019-03-13T09:15:15.000Z
2021-11-19T08:32:27.000Z
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "lhu_odometry" PROJECT_SPACE_DIR = "/h...
41.777778
68
0.707447
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "lhu_odometry" PROJECT_SPACE_DIR = "/home/nvidia/catkin_ws/install" PROJECT_VERSION = "0.0.0"
true
true
1c3e86ef476debf19f99be68c61128b0c63c8b2c
14,045
py
Python
tests/unit/test_redshift_adapter.py
dlb8685/dbt-redshift
c1f02a1931ad6bd9cf0c2eb28bee9bf9e7da3dcf
[ "Apache-2.0" ]
18
2021-10-03T09:15:30.000Z
2022-03-31T20:32:12.000Z
tests/unit/test_redshift_adapter.py
dlb8685/dbt-redshift
c1f02a1931ad6bd9cf0c2eb28bee9bf9e7da3dcf
[ "Apache-2.0" ]
42
2021-10-05T17:03:10.000Z
2022-03-31T14:26:25.000Z
tests/unit/test_redshift_adapter.py
dlb8685/dbt-redshift
c1f02a1931ad6bd9cf0c2eb28bee9bf9e7da3dcf
[ "Apache-2.0" ]
10
2021-11-02T13:16:26.000Z
2022-03-29T07:44:24.000Z
import unittest from unittest import mock from unittest.mock import Mock import agate import boto3 from dbt.adapters.redshift import ( RedshiftAdapter, Plugin as RedshiftPlugin, ) from dbt.clients import agate_helper from dbt.exceptions import FailedToConnectException from .utils import config_from_parts_or_...
38.165761
146
0.61068
import unittest from unittest import mock from unittest.mock import Mock import agate import boto3 from dbt.adapters.redshift import ( RedshiftAdapter, Plugin as RedshiftPlugin, ) from dbt.clients import agate_helper from dbt.exceptions import FailedToConnectException from .utils import config_from_parts_or_...
true
true
1c3e877201199503869f4cb34966b4d0ec86b3f6
277
py
Python
src/workflow/configuration/workflow_configuration.py
piotr-kalanski/service-initializer
1662f9cfce1d7185129063f61d9e4fbd10ec8567
[ "Apache-2.0" ]
1
2020-04-17T10:46:48.000Z
2020-04-17T10:46:48.000Z
src/workflow/configuration/workflow_configuration.py
piotr-kalanski/service-initializer
1662f9cfce1d7185129063f61d9e4fbd10ec8567
[ "Apache-2.0" ]
19
2020-03-17T18:40:58.000Z
2020-03-24T18:35:36.000Z
src/workflow/configuration/workflow_configuration.py
piotr-kalanski/service-initializer
1662f9cfce1d7185129063f61d9e4fbd10ec8567
[ "Apache-2.0" ]
null
null
null
from typing import List from workflow.step import Step class WorkflowConfiguration: def __init__(self): self._steps = [] def add_step(self, step: Step): self._steps.append(step) def get_steps(self) -> List[Step]: return self._steps
18.466667
38
0.649819
from typing import List from workflow.step import Step class WorkflowConfiguration: def __init__(self): self._steps = [] def add_step(self, step: Step): self._steps.append(step) def get_steps(self) -> List[Step]: return self._steps
true
true
1c3e87792f7fd7fb2a6073e2de754f523bdd4629
4,719
py
Python
compare_past_winners.py
pdturney/modeling-symbiosis
54e17f6619475b4678425d916ca8142e214040f0
[ "MIT" ]
null
null
null
compare_past_winners.py
pdturney/modeling-symbiosis
54e17f6619475b4678425d916ca8142e214040f0
[ "MIT" ]
null
null
null
compare_past_winners.py
pdturney/modeling-symbiosis
54e17f6619475b4678425d916ca8142e214040f0
[ "MIT" ]
null
null
null
# # Compare Past Winners # # Peter Turney, February 13, 2020 # # Compare the top seed in generation N with the top seed # from every preceding generation. # import golly as g import model_classes as mclass import model_functions as mfunc import model_parameters as mparam import numpy as np import pickle ...
34.698529
73
0.700996
import golly as g import model_classes as mclass import model_functions as mfunc import model_parameters as mparam import numpy as np import pickle import os import re import sys pickle_dir = mparam.log_directory analysis_dir = mparam.log_directory num_generations = mparam.num_generations width_f...
true
true
1c3e8801d5bccde77ea36af7560697732cf3da40
958
py
Python
isi_sdk_8_0_1/test/test_storagepool_storagepool.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_0_1/test/test_storagepool_storagepool.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_0_1/test/test_storagepool_storagepool.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 4 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_0_1 from i...
23.365854
101
0.722338
from __future__ import absolute_import import unittest import isi_sdk_8_0_1 from isi_sdk_8_0_1.models.storagepool_storagepool import StoragepoolStoragepool from isi_sdk_8_0_1.rest import ApiException class TestStoragepoolStoragepool(unittest.TestCase): def setUp(self): pass def tearDown(self...
true
true
1c3e883ab8dca08529839fc3dda5a2a6b5a432d2
3,389
py
Python
day3/solution.py
GeertLitjens/advent-of-code-2021
4a4f2cfddbd7aeb839498fb4e7a916e1b429b590
[ "Apache-2.0" ]
10
2021-12-14T19:11:54.000Z
2022-02-28T13:44:07.000Z
day3/solution.py
GeertLitjens/advent-of-code-2021
4a4f2cfddbd7aeb839498fb4e7a916e1b429b590
[ "Apache-2.0" ]
null
null
null
day3/solution.py
GeertLitjens/advent-of-code-2021
4a4f2cfddbd7aeb839498fb4e7a916e1b429b590
[ "Apache-2.0" ]
null
null
null
""" This day was slightly more challenging. Initially, I thought I might need to apply some binary arithmetic to solve this problem, however, in the end this was not needed. I did decide to use numpy for fast and easy handling of arrays. Potentially there is a smarter/faster/code-efficient solution that I didn't think ...
52.138462
119
0.660962
from utils import Solution from typing import Any import numpy as np class DaySolution(Solution): def __init__(self, day: int = 3, year: int = 2021) -> None: super().__init__(day, year) def _parse_data(self, input_data: str) -> Any: string_list = [list(x) for x in input_data.split("\n") if x...
true
true
1c3e88eeb6cbbc89bf3d8872735e281a4c5d0264
7,084
py
Python
src/zope/intid/__init__.py
zopefoundation/zope.intid
3ae7ac3232167ae6d54dd920ce7fd179ba128615
[ "ZPL-2.1" ]
null
null
null
src/zope/intid/__init__.py
zopefoundation/zope.intid
3ae7ac3232167ae6d54dd920ce7fd179ba128615
[ "ZPL-2.1" ]
10
2016-03-24T15:24:16.000Z
2021-03-19T11:38:48.000Z
src/zope/intid/__init__.py
zopefoundation/zope.intid
3ae7ac3232167ae6d54dd920ce7fd179ba128615
[ "ZPL-2.1" ]
1
2015-04-03T09:06:50.000Z
2015-04-03T09:06:50.000Z
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
32.2
93
0.644975
true
true
1c3e89df476a8f3325bd09f766c6144661f65418
8,121
py
Python
NHentai/nhentai.py
AlexandreSenpai/NHentai-API
d209b6f1c9bb0a01c605929ce91b1fd360811afb
[ "MIT" ]
33
2020-07-12T04:00:05.000Z
2022-03-27T12:50:57.000Z
NHentai/nhentai.py
AlexandreSenpai/NHentai-API
d209b6f1c9bb0a01c605929ce91b1fd360811afb
[ "MIT" ]
16
2020-07-24T14:37:11.000Z
2022-03-06T01:57:02.000Z
NHentai/nhentai.py
AlexandreSenpai/NHentai-API
d209b6f1c9bb0a01c605929ce91b1fd360811afb
[ "MIT" ]
14
2020-07-09T18:42:13.000Z
2022-03-11T13:30:06.000Z
import logging from typing import Optional, Union from urllib.parse import urljoin from .utils.cache import Cache from .base_wrapper import BaseWrapper from .entities.doujin import Doujin, DoujinThumbnail from .entities.page import (Page, SearchPage, TagListPag...
36.746606
119
0.550794
import logging from typing import Optional, Union from urllib.parse import urljoin from .utils.cache import Cache from .base_wrapper import BaseWrapper from .entities.doujin import Doujin, DoujinThumbnail from .entities.page import (Page, SearchPage, TagListPag...
true
true
1c3e8de387bbb312c047ea617eb3ac0f5779e29a
377
py
Python
WtFrac.py
Lam3name/TKP4120
d433d45841adea50b323d910240a9537e9475b7f
[ "CC0-1.0" ]
null
null
null
WtFrac.py
Lam3name/TKP4120
d433d45841adea50b323d910240a9537e9475b7f
[ "CC0-1.0" ]
null
null
null
WtFrac.py
Lam3name/TKP4120
d433d45841adea50b323d910240a9537e9475b7f
[ "CC0-1.0" ]
null
null
null
import scipy.optimize import numpy as np import matplotlib.pyplot as plt import constants as con def WtFracCO2(alpha): return ((con.Mw[0])*alpha)/((1+(0.7/0.3))*con.MwMEA) def WtFracToAbsMol(tot, percent, molarMass): return((tot*percent)/molarMass*1000) # mol/s def fracMolToFracWt(tot, percent, molarmass...
26.928571
56
0.70557
import scipy.optimize import numpy as np import matplotlib.pyplot as plt import constants as con def WtFracCO2(alpha): return ((con.Mw[0])*alpha)/((1+(0.7/0.3))*con.MwMEA) def WtFracToAbsMol(tot, percent, molarMass): return((tot*percent)/molarMass*1000) def fracMolToFracWt(tot, percent, molarmass): ...
true
true
1c3e8ed1f19607ace9274bfadcb5a2b0fc836964
13,931
py
Python
homeassistant/components/logbook.py
GotoCode/home-assistant
7e39a5c4d50cf5754f5f32a84870ca57a5778b02
[ "Apache-2.0" ]
11
2017-09-25T13:11:33.000Z
2020-05-16T21:54:28.000Z
homeassistant/components/logbook.py
GotoCode/home-assistant
7e39a5c4d50cf5754f5f32a84870ca57a5778b02
[ "Apache-2.0" ]
125
2018-12-11T07:31:20.000Z
2021-07-27T08:20:03.000Z
homeassistant/components/logbook.py
y1ngyang/home-assistant
7e39a5c4d50cf5754f5f32a84870ca57a5778b02
[ "Apache-2.0" ]
3
2018-05-22T18:52:01.000Z
2019-07-18T21:30:45.000Z
""" Event parser and human readable log generator. For more details about this component, please refer to the documentation at https://home-assistant.io/components/logbook/ """ import asyncio import logging from datetime import timedelta from itertools import groupby import voluptuous as vol from homeassistant.core ...
34.397531
79
0.612375
import asyncio import logging from datetime import timedelta from itertools import groupby import voluptuous as vol from homeassistant.core import callback import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt_util from homeassistant.components import sun from homeassistant.component...
true
true
1c3e8f5ccaa603cbef7cff415ec0d35ca6c9628a
829
py
Python
maza/modules/creds/cameras/speco/ssh_default_creds.py
ArturSpirin/maza
56ae6325c08bcedd22c57b9fe11b58f1b38314ca
[ "MIT" ]
2
2020-02-06T20:24:31.000Z
2022-03-08T19:07:16.000Z
maza/modules/creds/cameras/speco/ssh_default_creds.py
ArturSpirin/maza
56ae6325c08bcedd22c57b9fe11b58f1b38314ca
[ "MIT" ]
null
null
null
maza/modules/creds/cameras/speco/ssh_default_creds.py
ArturSpirin/maza
56ae6325c08bcedd22c57b9fe11b58f1b38314ca
[ "MIT" ]
null
null
null
from maza.core.exploit import * from maza.modules.creds.generic.ssh_default import Exploit as SSHDefault class Exploit(SSHDefault): __info__ = { "name": "Speco Camera Default SSH Creds", "description": "Module performs dictionary attack against Speco Camera SSH service. " "I...
36.043478
96
0.624849
from maza.core.exploit import * from maza.modules.creds.generic.ssh_default import Exploit as SSHDefault class Exploit(SSHDefault): __info__ = { "name": "Speco Camera Default SSH Creds", "description": "Module performs dictionary attack against Speco Camera SSH service. " "I...
true
true
1c3e8f781c2f1741b461701bb73d3a842cced438
1,523
py
Python
tests/test_performance.py
manycoding/pytest-performance
f6473d0ac9c6ac58be9a13d2c9955810dc9962e4
[ "MIT" ]
5
2020-09-14T12:18:55.000Z
2022-01-07T11:36:09.000Z
tests/test_performance.py
manycoding/pytest-performance
f6473d0ac9c6ac58be9a13d2c9955810dc9962e4
[ "MIT" ]
1
2021-09-01T15:06:31.000Z
2021-09-01T15:06:31.000Z
tests/test_performance.py
manycoding/pytest-performance
f6473d0ac9c6ac58be9a13d2c9955810dc9962e4
[ "MIT" ]
1
2021-03-11T15:20:05.000Z
2021-03-11T15:20:05.000Z
# -*- coding: utf-8 -*- from _pytest.config import ExitCode from pytest_performance import SKIP_FLAG def test_performance(testdir): # Given testdir.makepyfile(""" def foo(): return 1 def test_sth(performance): assert 1 == performance(foo, unit='s') """) # Whe...
18.802469
59
0.580433
from _pytest.config import ExitCode from pytest_performance import SKIP_FLAG def test_performance(testdir): testdir.makepyfile(""" def foo(): return 1 def test_sth(performance): assert 1 == performance(foo, unit='s') """) result = testdir.runpytest() ...
true
true
1c3e90d3f35f39a658602e8cef7ee1e6154cdd37
709
py
Python
Intents/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
4
2019-03-11T18:05:49.000Z
2021-05-22T21:09:09.000Z
Intents/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
Intents/__init__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2019-03-18T18:53:36.000Z
2019-03-18T18:53:36.000Z
''' Python mapping for the Intents framework. This module does not contain docstrings for the wrapped code, check Apple's documentation for details on how to use these functions and classes. ''' import objc import sys import Foundation from Intents import _metadata from Intents._Intents import * sys.modules['Inten...
24.448276
75
0.705219
import objc import sys import Foundation from Intents import _metadata from Intents._Intents import * sys.modules['Intents'] = mod = objc.ObjCLazyModule( "Intents", "com.apple.Intents", objc.pathForFramework("/System/Library/Frameworks/Intents.framework"), _metadata.__dict__, None, { '__doc_...
true
true
1c3e91ca1ff386eb0061642315e5264fc880d898
609
py
Python
migrations/0002_auto_20180330_1541.py
j-ollivier/sonov-main
78123513fa73deae174363750fd64ab3e92a3d2a
[ "Apache-2.0" ]
null
null
null
migrations/0002_auto_20180330_1541.py
j-ollivier/sonov-main
78123513fa73deae174363750fd64ab3e92a3d2a
[ "Apache-2.0" ]
null
null
null
migrations/0002_auto_20180330_1541.py
j-ollivier/sonov-main
78123513fa73deae174363750fd64ab3e92a3d2a
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.3 on 2018-03-30 13:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.AddField( model_name='son', name='audio_file', field...
24.36
78
0.576355
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.AddField( model_name='son', name='audio_file', field=models.FileField(default='', upload_to='static...
true
true
1c3e93fcc37764a327723d2663f9748a7fb8c3b8
427
py
Python
algorithms/mDSDI/src/models/model_factory.py
VinAIResearch/mDSDI
8ec49085d8389ab490ec633c3ae4bf66be085366
[ "Apache-2.0" ]
9
2021-09-30T12:39:01.000Z
2022-03-17T07:49:59.000Z
algorithms/mDSDI/src/models/model_factory.py
VinAIResearch/mDSDI
8ec49085d8389ab490ec633c3ae4bf66be085366
[ "Apache-2.0" ]
null
null
null
algorithms/mDSDI/src/models/model_factory.py
VinAIResearch/mDSDI
8ec49085d8389ab490ec633c3ae4bf66be085366
[ "Apache-2.0" ]
1
2022-01-13T06:02:04.000Z
2022-01-13T06:02:04.000Z
from algorithms.mDSDI.src.models.mnistnet import MNIST_CNN, Color_MNIST_CNN from algorithms.mDSDI.src.models.resnet import ResNet nets_map = {"mnistnet": MNIST_CNN, "cmnistnet": Color_MNIST_CNN, "resnet50": ResNet} def get_model(name): if name not in nets_map: raise ValueError("Name of model unknown %s"...
26.6875
84
0.728337
from algorithms.mDSDI.src.models.mnistnet import MNIST_CNN, Color_MNIST_CNN from algorithms.mDSDI.src.models.resnet import ResNet nets_map = {"mnistnet": MNIST_CNN, "cmnistnet": Color_MNIST_CNN, "resnet50": ResNet} def get_model(name): if name not in nets_map: raise ValueError("Name of model unknown %s"...
true
true
1c3e9520fb0514245589ee15baf161677033977a
14,397
py
Python
selfdrive/updated.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
null
null
null
selfdrive/updated.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
null
null
null
selfdrive/updated.py
919bot/Tessa
9b48ff9020e8fb6992fc78271f2720fd19e01093
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Safe Update: A simple service that waits for network access and tries to # update every 10 minutes. It's intended to make the OP update process more # robust against Git repository corruption. This service DOES NOT try to fix # an already-corrupt BASEDIR Git repo, only prevent it from happenin...
37.010283
139
0.720845
# robust against Git repository corruption. This service DOES NOT try to fix # an already-corrupt BASEDIR Git repo, only prevent it from happening. # # During normal operation, both onroad and offroad, the update process makes # no changes to the BASEDIR install of OP. All update attempts are performed # in a dispo...
true
true
1c3e9548ed0e3626ec1a8937ed1278f1b9c00411
3,742
py
Python
server/src/test/unit/weblab/experiment/devices/xilinx_impact/test_impact.py
zstars/weblabdeusto
09bd9d93d483671bca67ee5c70a9c412eb5d352f
[ "BSD-2-Clause" ]
null
null
null
server/src/test/unit/weblab/experiment/devices/xilinx_impact/test_impact.py
zstars/weblabdeusto
09bd9d93d483671bca67ee5c70a9c412eb5d352f
[ "BSD-2-Clause" ]
null
null
null
server/src/test/unit/weblab/experiment/devices/xilinx_impact/test_impact.py
zstars/weblabdeusto
09bd9d93d483671bca67ee5c70a9c412eb5d352f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
29.936
72
0.66542
import unittest import test.unit.configuration as configuration_module import voodoo.configuration as ConfigurationManager import weblab.experiment.devices.xilinx_impact.impact as XilinxImpact import weblab.experiment.devices.xilinx_impact.exc as XilinxImpactErrors class XilinxImpactTestCase(unittes...
true
true
1c3e957f964646052cf94f35d12a79cbb6d2862c
16,861
py
Python
tools/mo/unit_tests/mo/back/ReverseInputChannels_test.py
opencv/dldt
c0a2c98a457a08e8853abc18f5bd462169d0b354
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/unit_tests/mo/back/ReverseInputChannels_test.py
opencv/dldt
c0a2c98a457a08e8853abc18f5bd462169d0b354
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/unit_tests/mo/back/ReverseInputChannels_test.py
opencv/dldt
c0a2c98a457a08e8853abc18f5bd462169d0b354
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest from argparse import Namespace import numpy as np from openvino.tools.mo.back.ReverseInputChannels import ReverseChannelsPropagationUp, ReverseChannelsPropagationDown, \ InsertReverseChannels from openvino.tools.mo....
54.041667
120
0.593678
import unittest from argparse import Namespace import numpy as np from openvino.tools.mo.back.ReverseInputChannels import ReverseChannelsPropagationUp, ReverseChannelsPropagationDown, \ InsertReverseChannels from openvino.tools.mo.front.common.partial_infer.utils import int64_array, float32_array from openvino...
true
true
1c3e9590f25c453699d93c4863127de74e780963
7,493
py
Python
starter_code/learner/learners.py
mbchang/societal-decision-making
23fd6de4df33f985d360330a9d5a2c29faeb8e52
[ "MIT" ]
38
2020-08-17T14:18:22.000Z
2022-02-27T13:12:40.000Z
starter_code/learner/learners.py
mbchang/societal-decision-making
23fd6de4df33f985d360330a9d5a2c29faeb8e52
[ "MIT" ]
3
2021-06-08T22:17:35.000Z
2022-03-12T00:46:27.000Z
starter_code/learner/learners.py
mbchang/societal-decision-making
23fd6de4df33f985d360330a9d5a2c29faeb8e52
[ "MIT" ]
3
2020-08-21T05:28:35.000Z
2022-03-31T17:07:48.000Z
from collections import OrderedDict from starter_code.learner.learner import Learner from starter_code.infrastructure.log import log_string, MinigridEnvManager from starter_code.interfaces.transitions import AgentStepInfo, OptionStepInfo, AuctionStepInfo, OptionAuctionStepInfo from starter_code.sampler.decentralized_s...
48.341935
180
0.613506
from collections import OrderedDict from starter_code.learner.learner import Learner from starter_code.infrastructure.log import log_string, MinigridEnvManager from starter_code.interfaces.transitions import AgentStepInfo, OptionStepInfo, AuctionStepInfo, OptionAuctionStepInfo from starter_code.sampler.decentralized_s...
true
true
1c3e966b1c5c70d1bbee3ae15b82d627d6a88bb5
192
py
Python
Mock/Midterm/q1c-unnerfed.py
RussellDash332/practice-makes-perfect
917822b461550a2e3679351e467362f95d9e428d
[ "MIT" ]
2
2021-11-18T06:22:09.000Z
2021-12-25T09:52:57.000Z
Mock/Midterm/q1c-unnerfed.py
RussellDash332/practice-makes-perfect
917822b461550a2e3679351e467362f95d9e428d
[ "MIT" ]
2
2021-11-17T16:28:00.000Z
2021-12-01T09:59:40.000Z
Mock/Midterm/q1c-unnerfed.py
RussellDash332/practice-makes-perfect
917822b461550a2e3679351e467362f95d9e428d
[ "MIT" ]
null
null
null
m, p = "mutton", "python" mp = m+p+"ton" if "on" in mp: if p in mp: p = "p" print("yum") if "on" in p: print("bum") elif mp: print("tum")
17.454545
26
0.390625
m, p = "mutton", "python" mp = m+p+"ton" if "on" in mp: if p in mp: p = "p" print("yum") if "on" in p: print("bum") elif mp: print("tum")
true
true
1c3e96a2f308439d029d90059fce07c86e844515
7,848
py
Python
models/menu.py
juushya/Kvasir
bc9fa5864ed1cf40a3a4fe2dae7f24f754267c78
[ "BSD-3-Clause" ]
null
null
null
models/menu.py
juushya/Kvasir
bc9fa5864ed1cf40a3a4fe2dae7f24f754267c78
[ "BSD-3-Clause" ]
null
null
null
models/menu.py
juushya/Kvasir
bc9fa5864ed1cf40a3a4fe2dae7f24f754267c78
[ "BSD-3-Clause" ]
null
null
null
_a = request.application response.logo = A(B('KVASIR'), _class="brand") response.title = settings.title response.subtitle = settings.subtitle response.meta.author = '%s <%s>' % (settings.author, settings.author_email) response.meta.keywords = settings.keywords response.meta.description = settings.description response...
53.753425
130
0.49554
_a = request.application response.logo = A(B('KVASIR'), _class="brand") response.title = settings.title response.subtitle = settings.subtitle response.meta.author = '%s <%s>' % (settings.author, settings.author_email) response.meta.keywords = settings.keywords response.meta.description = settings.description response...
true
true
1c3e9722782b9f83edcb11429ff520945f9729f7
2,066
py
Python
example/app/settings.py
jbking/django-oidc-provider
f0daed07b2ac7608565b80d4c80ccf04d8c416a8
[ "MIT" ]
370
2015-03-10T03:12:53.000Z
2022-03-13T05:49:40.000Z
example/app/settings.py
jbking/django-oidc-provider
f0daed07b2ac7608565b80d4c80ccf04d8c416a8
[ "MIT" ]
305
2015-02-12T17:58:26.000Z
2022-02-25T19:48:41.000Z
example/app/settings.py
jbking/django-oidc-provider
f0daed07b2ac7608565b80d4c80ccf04d8c416a8
[ "MIT" ]
271
2015-03-17T00:57:22.000Z
2022-02-17T11:21:22.000Z
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'c14d549c574e4d8cf162404ef0b04598' DEBUG = True TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin',...
22.456522
71
0.683446
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'c14d549c574e4d8cf162404ef0b04598' DEBUG = True TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['*'] INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ...
true
true
1c3e998b9342a4dd7b2dce19744c8e34e5d95b7c
180
py
Python
tests/web_platform/css_flexbox_1/test_flexbox_flex_0_1_N_unitless_basis.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/css_flexbox_1/test_flexbox_flex_0_1_N_unitless_basis.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/css_flexbox_1/test_flexbox_flex_0_1_N_unitless_basis.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestFlexbox_Flex01NUnitlessBasis(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'flexbox_flex-0-1-N-unitless-basis'))
30
88
0.811111
from tests.utils import W3CTestCase class TestFlexbox_Flex01NUnitlessBasis(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'flexbox_flex-0-1-N-unitless-basis'))
true
true
1c3e9a29ee05e6cb175f2be801373c64e64750f2
481
py
Python
test/test_db_matches_ui.py
karagioz/python_training
47bdbc550eda347f72aaf75dd3569d2c61106356
[ "Apache-2.0" ]
null
null
null
test/test_db_matches_ui.py
karagioz/python_training
47bdbc550eda347f72aaf75dd3569d2c61106356
[ "Apache-2.0" ]
null
null
null
test/test_db_matches_ui.py
karagioz/python_training
47bdbc550eda347f72aaf75dd3569d2c61106356
[ "Apache-2.0" ]
null
null
null
from model.group import Group from timeit import timeit def test_group_list(app, db): print(timeit(lambda: app.group.get_group_list(), number=1)) ui_list = app.group.get_group_list() def clean(group): return Group(id=group.id, name=group.name.strip()) print(timeit(lambda: map(clean, db.get_gr...
34.357143
87
0.715177
from model.group import Group from timeit import timeit def test_group_list(app, db): print(timeit(lambda: app.group.get_group_list(), number=1)) ui_list = app.group.get_group_list() def clean(group): return Group(id=group.id, name=group.name.strip()) print(timeit(lambda: map(clean, db.get_gr...
true
true
1c3e9a93f3dffeb4d7093c7ec141c50bb1019b1f
4,850
py
Python
zeeb_src/lib/scanner.py
th3cyb3rc0p/Zeebsploit
5d3bee6c3a459f172ef117548c3a895195a249ff
[ "Apache-2.0" ]
186
2019-02-01T16:14:09.000Z
2022-03-10T06:43:16.000Z
zeeb_src/lib/scanner.py
Tonymmm/Zeebsploit
5d3bee6c3a459f172ef117548c3a895195a249ff
[ "Apache-2.0" ]
8
2019-02-02T19:09:07.000Z
2019-10-03T05:06:27.000Z
zeeb_src/lib/scanner.py
Tonymmm/Zeebsploit
5d3bee6c3a459f172ef117548c3a895195a249ff
[ "Apache-2.0" ]
65
2019-02-25T07:28:03.000Z
2021-10-30T19:59:57.000Z
#-*- coding: utf-8 -*- import asyncio,aiohttp,requests,os,urllib3,aiofiles,re urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) class subdomain_enumeration(object): def __init__(self,domain): self.domain = domain self.url = 'https://dnsdumpster.com' self.uag = 'M...
35.925926
117
0.478144
import asyncio,aiohttp,requests,os,urllib3,aiofiles,re urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) class subdomain_enumeration(object): def __init__(self,domain): self.domain = domain self.url = 'https://dnsdumpster.com' self.uag = 'Mozilla/5.0 (compatible...
true
true
1c3e9aa4508a692e561336b57c059caf9056b9b3
2,948
py
Python
process.py
yangliu2/BearNotes_to_Notion
ae06f4c3fbdefe2020899416e5b478ad9d434664
[ "MIT" ]
1
2021-02-07T17:59:26.000Z
2021-02-07T17:59:26.000Z
process.py
yangliu2/BearNotes_to_Notion
ae06f4c3fbdefe2020899416e5b478ad9d434664
[ "MIT" ]
null
null
null
process.py
yangliu2/BearNotes_to_Notion
ae06f4c3fbdefe2020899416e5b478ad9d434664
[ "MIT" ]
null
null
null
from glob import glob from pathlib import Path def bear_to_notion(source_folder: str = 'bear_notes', dst_folder: str = 'changed_notes') -> None: """Convert Bear notes in markdown format to Notion formats. It mainly remove the tags Args: source_folder (str, optional): [descriptio...
33.123596
79
0.500678
from glob import glob from pathlib import Path def bear_to_notion(source_folder: str = 'bear_notes', dst_folder: str = 'changed_notes') -> None: file_list = glob("bear_notes/*.md") for file in file_list: output = "" title = "" with open(file) as input_f...
true
true
1c3e9ab846f7918dcf9e79fdc7c1a3960ef0324e
1,408
py
Python
terrascript/opsgenie/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/opsgenie/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/opsgenie/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/opsgenie/r.py # Automatically generated by tools/makecode.py () import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class opsgenie_alert_policy(terrascript.Resource): pass class opsgenie_api_integration(terrascript.R...
16.372093
79
0.791193
import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class opsgenie_alert_policy(terrascript.Resource): pass class opsgenie_api_integration(terrascript.Resource): pass class opsgenie_custom_role(terrascript.Resource): p...
true
true
1c3e9b4eca04a197b5e9a5aa98e9653eb68cc0da
213
py
Python
rapa/__init__.py
FOXOBioScience/rapa
ab226d0c27a867b43a76f576c98a954de9504360
[ "MIT" ]
1
2021-04-29T16:42:12.000Z
2021-04-29T16:42:12.000Z
rapa/__init__.py
FoxoTech/rapa
ab226d0c27a867b43a76f576c98a954de9504360
[ "MIT" ]
4
2021-02-24T18:24:17.000Z
2021-03-18T17:58:51.000Z
rapa/__init__.py
FOXOBioScience/rapa
ab226d0c27a867b43a76f576c98a954de9504360
[ "MIT" ]
1
2021-11-12T02:04:05.000Z
2021-11-12T02:04:05.000Z
# Warnings from dependencies are suppressed everywhere, propagating into all created loggers import warnings warnings.simplefilter(action='ignore', category=FutureWarning) from . import rapa from . import version
35.5
92
0.830986
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) from . import rapa from . import version
true
true
1c3e9b81fd617497d11f8c7dfa97e3268d0c825b
17,342
py
Python
backend/backend/utils/key_client.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
2
2022-03-17T04:50:20.000Z
2022-03-17T04:51:31.000Z
backend/backend/utils/key_client.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
null
null
null
backend/backend/utils/key_client.py
ravirahman/sancus
6563852b98edeb1068574e2d99e1fc18b815bee3
[ "MIT" ]
null
null
null
import logging import secrets import uuid from decimal import Decimal from typing import List, Optional, Sequence import petlib.ec import sqlalchemy.orm from common.constants import ADMIN_UUID, SECP256K1_ORDER, Blockchain, Currency from common.utils.uuid import generate_uuid4 from common.utils.zk import NIZK from comm...
41.787952
116
0.589897
import logging import secrets import uuid from decimal import Decimal from typing import List, Optional, Sequence import petlib.ec import sqlalchemy.orm from common.constants import ADMIN_UUID, SECP256K1_ORDER, Blockchain, Currency from common.utils.uuid import generate_uuid4 from common.utils.zk import NIZK from comm...
true
true
1c3e9bc31b47a9334ee2b0d528b713b934e10f10
62
py
Python
Python_Code/PRs/num01_Natarajan_Lalgudi.py
abhiramr/ProjectEuler-Abhi
c86a964e5b2dbf79bc494d7d7d28ce7807504cd3
[ "MIT" ]
2
2019-10-20T12:09:10.000Z
2021-02-13T05:51:08.000Z
Python_Code/PRs/num01_Natarajan_Lalgudi.py
abhiramr/ProjectEuler_Solutions
c86a964e5b2dbf79bc494d7d7d28ce7807504cd3
[ "MIT" ]
1
2019-10-20T03:26:55.000Z
2019-10-20T03:26:55.000Z
Python_Code/PRs/num01_Natarajan_Lalgudi.py
abhiramr/ProjectEuler-Abhi
c86a964e5b2dbf79bc494d7d7d28ce7807504cd3
[ "MIT" ]
9
2019-10-20T05:47:02.000Z
2019-10-20T06:06:03.000Z
lst = [x for x in range(1000) if (x%3==0 or x%5==0)] sum(lst)
20.666667
52
0.564516
lst = [x for x in range(1000) if (x%3==0 or x%5==0)] sum(lst)
true
true
1c3e9cb2bbe6ea1bde1164fb502cb7f3dd4932b0
2,290
py
Python
src/moderations/management/commands/send_stats_to_gspread.py
definitelysecure/shipwrecked
3b79c6df63ed3c271ccb1b8a21081c76bcd9f08a
[ "MIT" ]
null
null
null
src/moderations/management/commands/send_stats_to_gspread.py
definitelysecure/shipwrecked
3b79c6df63ed3c271ccb1b8a21081c76bcd9f08a
[ "MIT" ]
null
null
null
src/moderations/management/commands/send_stats_to_gspread.py
definitelysecure/shipwrecked
3b79c6df63ed3c271ccb1b8a21081c76bcd9f08a
[ "MIT" ]
null
null
null
import gspread from oauth2client.service_account import ServiceAccountCredentials from oauth2client import crypt from django.core.management.base import BaseCommand from django.utils import timezone from moderation.settings import GOOGLE_DOCS_API_PRIVATE_KEY, GOOGLE_DOCS_API_SERVICE_ACCOUNT_EMAIL from moderations.stats...
44.901961
102
0.672926
import gspread from oauth2client.service_account import ServiceAccountCredentials from oauth2client import crypt from django.core.management.base import BaseCommand from django.utils import timezone from moderation.settings import GOOGLE_DOCS_API_PRIVATE_KEY, GOOGLE_DOCS_API_SERVICE_ACCOUNT_EMAIL from moderations.stats...
true
true
1c3e9d87a66c6254b00761a40b289424f65ce540
6,097
py
Python
lib/gini/gloader/xml_processor.py
trungams/gini5
ca6b509f6930f55fa51029d2e538d0d8407285b2
[ "MIT" ]
null
null
null
lib/gini/gloader/xml_processor.py
trungams/gini5
ca6b509f6930f55fa51029d2e538d0d8407285b2
[ "MIT" ]
null
null
null
lib/gini/gloader/xml_processor.py
trungams/gini5
ca6b509f6930f55fa51029d2e538d0d8407285b2
[ "MIT" ]
null
null
null
#!/usr/bin/python2 # file: xml_processor.py #from xml.parsers.xmlproc import xmlval #from xml.parsers.xmlproc import xmldtd import xml.dom.minidom import os import utilities from gini_nw import GINI_NW class XMLProcessor: "Processing XML network specification file" xmlFile = "" giniNW = None def __...
36.076923
85
0.568804
import xml.dom.minidom import os import utilities from gini_nw import GINI_NW class XMLProcessor: "Processing XML network specification file" xmlFile = "" giniNW = None def __init__(self,file): "Initiates the class with the XML file and validates it" self.xmlFile = file ...
false
true
1c3e9e2510a719d6ad1d93fce4df6c7e85a8f21a
906
py
Python
examples/pytorch/answer-generator/predictor.py
SSITB/cortex
cb9b64d466fedaceb1cb9171914ffb31409927fe
[ "Apache-2.0" ]
1
2019-11-25T05:47:35.000Z
2019-11-25T05:47:35.000Z
examples/pytorch/answer-generator/predictor.py
SSITB/cortex
cb9b64d466fedaceb1cb9171914ffb31409927fe
[ "Apache-2.0" ]
null
null
null
examples/pytorch/answer-generator/predictor.py
SSITB/cortex
cb9b64d466fedaceb1cb9171914ffb31409927fe
[ "Apache-2.0" ]
null
null
null
import wget import torch from transformers import GPT2Tokenizer, GPT2LMHeadModel, GPT2Config import generator medium_config = GPT2Config(n_embd=1024, n_layer=24, n_head=16) model = GPT2LMHeadModel(medium_config) tokenizer = GPT2Tokenizer.from_pretrained("gpt2") def init(model_path, metadata): wget.download( ...
30.2
99
0.748344
import wget import torch from transformers import GPT2Tokenizer, GPT2LMHeadModel, GPT2Config import generator medium_config = GPT2Config(n_embd=1024, n_layer=24, n_head=16) model = GPT2LMHeadModel(medium_config) tokenizer = GPT2Tokenizer.from_pretrained("gpt2") def init(model_path, metadata): wget.download( ...
true
true
1c3e9e2c60ee00b4900a5d98d0339667c62cd6c3
1,165
py
Python
test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
null
null
null
test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
null
null
null
test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py
cfculhane/autorest.python
8cbca95faee88d933a58bbbd17b76834faa8d387
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
30.657895
94
0.635193
from setuptools import setup, find_packages NAME = "autorestswaggerbatformdataservice" VERSION = "0.1.0" REQUIRES = ["msrest>=0.6.21", "azure-core<2.0.0,>=1.20.0"] setup( name=NAME, version=VERSION, description="AutoRestSwaggerBATFormDataService", author_email="", url="", keyw...
true
true
1c3e9fbeb5e1b10666670d451af1d807c912d958
419
py
Python
learn_python/json/json_read_write.py
Yeasmin-Tasnima/Python
eb172450c66bbc69133cd92290c4027cafef579f
[ "Apache-2.0" ]
null
null
null
learn_python/json/json_read_write.py
Yeasmin-Tasnima/Python
eb172450c66bbc69133cd92290c4027cafef579f
[ "Apache-2.0" ]
null
null
null
learn_python/json/json_read_write.py
Yeasmin-Tasnima/Python
eb172450c66bbc69133cd92290c4027cafef579f
[ "Apache-2.0" ]
null
null
null
import json book = {} book['tom'] = { 'address': 'dhaka', 'phone': 1234 } book['bob'] = { 'address': 'dinajpur', 'phone': 5678 } s = json.dumps(book) # writing with open('book.txt', 'w') as f: f.write(s) # read json file as a string f = open('book.txt', 'r') book = f.read() print(type(book)) p...
13.516129
32
0.594272
import json book = {} book['tom'] = { 'address': 'dhaka', 'phone': 1234 } book['bob'] = { 'address': 'dinajpur', 'phone': 5678 } s = json.dumps(book) with open('book.txt', 'w') as f: f.write(s) f = open('book.txt', 'r') book = f.read() print(type(book)) print(book) book = json.loads(book) ...
true
true
1c3e9fcb412b8bde1a6852ee7411071417babf41
25,595
py
Python
src/sagemaker/fw_utils.py
ram-nadella/sagemaker-python-sdk
0ed415f96483f29c2c8b7a320bb825a993e116b2
[ "Apache-2.0" ]
1
2020-11-20T14:48:24.000Z
2020-11-20T14:48:24.000Z
src/sagemaker/fw_utils.py
ram-nadella/sagemaker-python-sdk
0ed415f96483f29c2c8b7a320bb825a993e116b2
[ "Apache-2.0" ]
null
null
null
src/sagemaker/fw_utils.py
ram-nadella/sagemaker-python-sdk
0ed415f96483f29c2c8b7a320bb825a993e116b2
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
36.986994
186
0.675601
from __future__ import absolute_import import logging import os import re import shutil import tempfile from collections import namedtuple import sagemaker.utils from sagemaker import s3 from sagemaker.utils import get_ecr_image_uri_prefix, ECR_URI_PATTERN logger = logging.getLogger("sagemaker") _TAR_SO...
true
true
1c3e9feb8acf4bdd8e0ad18e90e1fc824b44b79c
2,294
py
Python
sandbox/lib/jumpscale/JumpScale9/clients/tarantool/TarantoolQueue.py
Jumpscale/sandbox_linux
2aacd36b467ef30ac83718abfa82c6883b67a02f
[ "Apache-2.0" ]
null
null
null
sandbox/lib/jumpscale/JumpScale9/clients/tarantool/TarantoolQueue.py
Jumpscale/sandbox_linux
2aacd36b467ef30ac83718abfa82c6883b67a02f
[ "Apache-2.0" ]
1
2018-04-04T12:13:40.000Z
2018-05-03T07:57:52.000Z
sandbox/lib/jumpscale/JumpScale9/clients/tarantool/TarantoolQueue.py
Jumpscale/sandbox_linux
2aacd36b467ef30ac83718abfa82c6883b67a02f
[ "Apache-2.0" ]
null
null
null
from js9 import j import tarantool from .TarantoolDB import TarantoolDB # import itertools # import sys # sys.path.append(".") # from tarantool_queue import * import tarantool JSBASE = j.application.jsbase_get_class() class TarantoolQueue(JSBASE): def __init__(self, tarantoolclient, name, ttl=0, delay=0): ...
29.792208
86
0.576286
from js9 import j import tarantool from .TarantoolDB import TarantoolDB import tarantool JSBASE = j.application.jsbase_get_class() class TarantoolQueue(JSBASE): def __init__(self, tarantoolclient, name, ttl=0, delay=0): JSBASE.__init__(self) self.client = tarantoolclient self.db = ...
true
true
1c3ea22503288aedcd8f44cb6c69cdf7b6831548
1,362
py
Python
config.py
ibbad/dna-lceb-web
b4c1d4e121dfea992e072979bfdc0f313c781e32
[ "Apache-2.0" ]
null
null
null
config.py
ibbad/dna-lceb-web
b4c1d4e121dfea992e072979bfdc0f313c781e32
[ "Apache-2.0" ]
null
null
null
config.py
ibbad/dna-lceb-web
b4c1d4e121dfea992e072979bfdc0f313c781e32
[ "Apache-2.0" ]
null
null
null
""" Configuration file for the application. """ import os from helpers.helper_functions import generate_secret_key basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or generate_secret_key() SSL_DISABLE = False CSRF_ENABLED = False @staticmeth...
21.619048
70
0.69163
import os from helpers.helper_functions import generate_secret_key basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or generate_secret_key() SSL_DISABLE = False CSRF_ENABLED = False @staticmethod def init_app(app): pass class T...
true
true
1c3ea2273509fcdf5847621ef551c86264756c7a
2,224
py
Python
rpython/jit/metainterp/test/test_bytearray.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
381
2018-08-18T03:37:22.000Z
2022-02-06T23:57:36.000Z
rpython/jit/metainterp/test/test_bytearray.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
16
2018-09-22T18:12:47.000Z
2022-02-22T20:03:59.000Z
rpython/jit/metainterp/test/test_bytearray.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
import py from rpython.jit.metainterp.test.support import LLJitMixin from rpython.rlib.jit import JitDriver, dont_look_inside class TestByteArray(LLJitMixin): def test_getitem(self): x = bytearray("foobar") def fn(n): assert n >= 0 return x[n] res = self.interp_oper...
26.795181
58
0.504946
import py from rpython.jit.metainterp.test.support import LLJitMixin from rpython.rlib.jit import JitDriver, dont_look_inside class TestByteArray(LLJitMixin): def test_getitem(self): x = bytearray("foobar") def fn(n): assert n >= 0 return x[n] res = self.interp_oper...
true
true
1c3ea39888e2088ce257dfe36ae474d9f6acca2d
42,615
py
Python
pair_fast_forecast_distributed/pairwise_fusion_kd/train_faf_com_kd.py
Chezacar/CollaborationWithLatency
da06abea16f1ffcafc35d27cb69ae3116a345965
[ "MIT" ]
null
null
null
pair_fast_forecast_distributed/pairwise_fusion_kd/train_faf_com_kd.py
Chezacar/CollaborationWithLatency
da06abea16f1ffcafc35d27cb69ae3116a345965
[ "MIT" ]
null
null
null
pair_fast_forecast_distributed/pairwise_fusion_kd/train_faf_com_kd.py
Chezacar/CollaborationWithLatency
da06abea16f1ffcafc35d27cb69ae3116a345965
[ "MIT" ]
null
null
null
# Copyright 2021 MediaBrain Group of CMIC, Shanghai Jiao Tong University. All right reserved. # The software, documentation and/or data in this file is provided on an "as is" basis, # and MediaBrain Group has no obligations to provide maintenance, support, updates, enhancements or modifications. # MediaBrain Group ...
64.276018
652
0.639962
from utils.model import forcast_lstm import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.nn.parallel import DistributedDataParallel as DDP import torch.distributed as dist import torch.multiprocessing as mp import numpy as np import time imp...
true
true
1c3ea3db82bc9ca8412c76aa081720e97c4c8d00
8,617
py
Python
moler/connection_factory.py
AdamKlekowski/moler
9d032bad402d9863685b2a8624320566512c14cc
[ "BSD-3-Clause" ]
2
2021-03-14T15:17:10.000Z
2021-03-15T07:12:12.000Z
moler/connection_factory.py
Laymer/moler
2d7b89efdc2ca5e9975112b97934b396e24b5505
[ "BSD-3-Clause" ]
null
null
null
moler/connection_factory.py
Laymer/moler
2d7b89efdc2ca5e9975112b97934b396e24b5505
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ One of Moler's goals is to be IO-agnostic. So it can be used under twisted, asyncio, curio any any other IO system. Moler's connection is very thin layer binding Moler's ConnectionObserver with external IO system. Connection responsibilities: - have a means for sending outgoing data via ext...
43.520202
128
0.678542
__author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst' __copyright__ = 'Copyright (C) 2018-2019, Nokia' __email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com' import logging import platform import moler.config.connections as connection_cfg from moler.threaded_moler_con...
true
true
1c3ea5491a186402e9d7e441587dc01568439264
16,337
py
Python
src/azure-cli/azure/cli/command_modules/monitor/operations/autoscale_settings.py
digimaun/azure-cli
298994660f0fde6863cb45a7c3142141ed10f923
[ "MIT" ]
1
2020-12-12T02:53:24.000Z
2020-12-12T02:53:24.000Z
src/azure-cli/azure/cli/command_modules/monitor/operations/autoscale_settings.py
digimaun/azure-cli
298994660f0fde6863cb45a7c3142141ed10f923
[ "MIT" ]
1
2021-03-01T19:31:38.000Z
2021-03-01T19:31:38.000Z
src/azure-cli/azure/cli/command_modules/monitor/operations/autoscale_settings.py
digimaun/azure-cli
298994660f0fde6863cb45a7c3142141ed10f923
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
43.334218
118
0.700863
from knack.log import get_logger logger = get_logger(__name__) DEFAULT_PROFILE_NAME = 'default' def scaffold_autoscale_settings_parameters(client): import os.path from knack.util import CLIError from azure.cli.core.util import get_file_json curr_dir = os.path.dirname(os.path.realpath...
true
true
1c3ea55a9729d4899c05e8ba4f39867721eb3eb4
1,468
py
Python
Src/Nets/KeyPoint/__init__.py
OOXXXXOO/WSNet
b64aa7d80fe0a7aa8a440f2bb6df1f1e497a7620
[ "Apache-2.0" ]
12
2019-08-20T06:27:15.000Z
2022-02-15T05:26:58.000Z
Src/Nets/KeyPoint/__init__.py
OOXXXXOO/WSNet
b64aa7d80fe0a7aa8a440f2bb6df1f1e497a7620
[ "Apache-2.0" ]
null
null
null
Src/Nets/KeyPoint/__init__.py
OOXXXXOO/WSNet
b64aa7d80fe0a7aa8a440f2bb6df1f1e497a7620
[ "Apache-2.0" ]
7
2019-08-26T03:31:26.000Z
2022-03-19T06:17:39.000Z
# Copyright 2020 winshare # # 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, ...
54.37037
80
0.366485
true
true
1c3ea56d42d3313abd71a2446b8e9d75e9fcc94c
96
py
Python
cruw/eval/__init__.py
kanishkaisreal/cruw-devkit
81e2da7de79b112d78c786d7d4be2504704368c7
[ "MIT" ]
29
2020-12-15T07:17:53.000Z
2022-03-28T03:04:21.000Z
cruw/eval/__init__.py
kanishkaisreal/cruw-devkit
81e2da7de79b112d78c786d7d4be2504704368c7
[ "MIT" ]
12
2021-01-07T02:31:50.000Z
2022-03-29T02:19:37.000Z
cruw/eval/__init__.py
kanishkaisreal/cruw-devkit
81e2da7de79b112d78c786d7d4be2504704368c7
[ "MIT" ]
11
2021-01-13T03:39:57.000Z
2022-03-04T04:57:34.000Z
from .rod.eval_rod2021 import evaluate_rod2021 from .rod.eval_rodnet import evaluate_rodnet_seq
32
48
0.875
from .rod.eval_rod2021 import evaluate_rod2021 from .rod.eval_rodnet import evaluate_rodnet_seq
true
true
1c3ea5bd4e61f72df060889b3ddac34e67626514
10,647
py
Python
electrumsv/gui/qt/paytoedit.py
bitcartel/electrumsv
009ea3675292a26a5a197fc8602dafca5453f9c5
[ "MIT" ]
1
2021-12-28T10:52:11.000Z
2021-12-28T10:52:11.000Z
electrumsv/gui/qt/paytoedit.py
bitcartel/electrumsv
009ea3675292a26a5a197fc8602dafca5453f9c5
[ "MIT" ]
null
null
null
electrumsv/gui/qt/paytoedit.py
bitcartel/electrumsv
009ea3675292a26a5a197fc8602dafca5453f9c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
34.234727
100
0.609749
import re import time from decimal import Decimal from PyQt5.QtCore import Qt from PyQt5.QtGui import QFontMetrics, QTextCursor from PyQt5.QtWidgets import QCompleter, QPlainTextEdit from bitcoinx import cashaddr, Script, Address, TxOutput from .qrtextedit import ScanQRTextEdit from electrum...
true
true
1c3ea5c07c06add4518f160f65a5c991fbe69550
878
py
Python
learn2learn-master/JSrc/jutils.py
hikmatkhan/Higher
b47c758dbe194abd98847a0f935b51f09ab772b0
[ "MIT" ]
null
null
null
learn2learn-master/JSrc/jutils.py
hikmatkhan/Higher
b47c758dbe194abd98847a0f935b51f09ab772b0
[ "MIT" ]
null
null
null
learn2learn-master/JSrc/jutils.py
hikmatkhan/Higher
b47c758dbe194abd98847a0f935b51f09ab772b0
[ "MIT" ]
null
null
null
import random import learn2learn import numpy as np import torch import torchvision from learn2learn.data import TaskDataset from learn2learn.data.transforms import NWays, KShots, LoadData import wandb from torch import nn from torchvision.models import resnet18 from torchvision.transforms import transforms def fix_s...
23.72973
76
0.736902
import random import learn2learn import numpy as np import torch import torchvision from learn2learn.data import TaskDataset from learn2learn.data.transforms import NWays, KShots, LoadData import wandb from torch import nn from torchvision.models import resnet18 from torchvision.transforms import transforms def fix_s...
true
true
1c3ea5e937371a3b5efe0501eae3e78cdfc93c6c
4,331
py
Python
da/examples/pingpong/ping.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/examples/pingpong/ping.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/examples/pingpong/ping.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
# -*- generated by 1.0.9 -*- import da PatternExpr_177 = da.pat.TuplePattern([da.pat.ConstantPattern('Ping')]) PatternExpr_182 = da.pat.FreePattern('p') PatternExpr_201 = da.pat.TuplePattern([da.pat.ConstantPattern('Ping')]) PatternExpr_206 = da.pat.FreePattern('p') PatternExpr_249 = da.pat.TuplePattern([da.pat.Constan...
41.644231
413
0.619487
import da PatternExpr_177 = da.pat.TuplePattern([da.pat.ConstantPattern('Ping')]) PatternExpr_182 = da.pat.FreePattern('p') PatternExpr_201 = da.pat.TuplePattern([da.pat.ConstantPattern('Ping')]) PatternExpr_206 = da.pat.FreePattern('p') PatternExpr_249 = da.pat.TuplePattern([da.pat.ConstantPattern('Pong')]) PatternEx...
true
true
1c3ea702689cfcbe442cb760a84ea68038a9b92e
4,138
py
Python
Python/create_example_images.py
markvilar/focal
53b048bc6592b7ad7421ae96c399755570820db6
[ "Apache-2.0" ]
1
2021-08-09T12:31:27.000Z
2021-08-09T12:31:27.000Z
Python/create_example_images.py
markvilar/focal
53b048bc6592b7ad7421ae96c399755570820db6
[ "Apache-2.0" ]
null
null
null
Python/create_example_images.py
markvilar/focal
53b048bc6592b7ad7421ae96c399755570820db6
[ "Apache-2.0" ]
null
null
null
import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as plt plt.style.use("./Styles/Scientific.mplstyle") import cv2 import numpy as np from PIL import Image from skimage.metrics import structural_similarity as ssim from histogram import plot_histogram, plot_histogram_rgb def normalize_image(arr): ...
37.279279
90
0.702997
import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as plt plt.style.use("./Styles/Scientific.mplstyle") import cv2 import numpy as np from PIL import Image from skimage.metrics import structural_similarity as ssim from histogram import plot_histogram, plot_histogram_rgb def normalize_image(arr): ...
true
true
1c3ea740f67d1f5b875602483a82cf37dd383da5
201
py
Python
app/hosts.py
noahbarnette/ugahacks5
72059709cf4e6d25bd2dc2e880f3c3590d583115
[ "MIT" ]
5
2020-07-22T19:18:09.000Z
2021-02-05T21:30:42.000Z
app/hosts.py
noahbarnette/ugahacks5
72059709cf4e6d25bd2dc2e880f3c3590d583115
[ "MIT" ]
9
2021-01-27T21:42:51.000Z
2022-03-12T00:20:25.000Z
app/hosts.py
ugahacks/myugahacks
72059709cf4e6d25bd2dc2e880f3c3590d583115
[ "MIT" ]
1
2020-02-04T23:49:12.000Z
2020-02-04T23:49:12.000Z
from django.conf import settings from django_hosts import patterns, host host_patterns = patterns('', host(r'my', settings.ROOT_URLCONF, name='my'), host(r'blog', 'blog.urls', name='blog'), )
25.125
50
0.701493
from django.conf import settings from django_hosts import patterns, host host_patterns = patterns('', host(r'my', settings.ROOT_URLCONF, name='my'), host(r'blog', 'blog.urls', name='blog'), )
true
true
1c3ea864d959188af0794e432f2e8ea8da76a496
2,763
py
Python
tests/contrib/test_simplejwt.py
bahag-raesenerm/drf-spectacular
fb4c8410357b8a987991888d026167496165e95a
[ "BSD-3-Clause" ]
1,025
2020-03-03T19:29:49.000Z
2022-03-30T03:23:30.000Z
tests/contrib/test_simplejwt.py
bahag-raesenerm/drf-spectacular
fb4c8410357b8a987991888d026167496165e95a
[ "BSD-3-Clause" ]
677
2020-03-06T15:17:31.000Z
2022-03-31T20:59:12.000Z
tests/contrib/test_simplejwt.py
bahag-raesenerm/drf-spectacular
fb4c8410357b8a987991888d026167496165e95a
[ "BSD-3-Clause" ]
145
2020-03-10T09:45:44.000Z
2022-03-26T19:38:43.000Z
from unittest import mock import pytest from django.urls import path from rest_framework import mixins, routers, serializers, viewsets from tests import assert_schema, generate_schema try: from rest_framework_simplejwt.authentication import ( JWTAuthentication, JWTTokenUserAuthentication, ) from ...
32.892857
94
0.704669
from unittest import mock import pytest from django.urls import path from rest_framework import mixins, routers, serializers, viewsets from tests import assert_schema, generate_schema try: from rest_framework_simplejwt.authentication import ( JWTAuthentication, JWTTokenUserAuthentication, ) from ...
true
true
1c3ea900c51ab6a9bddf42c028ecb093a76dbfce
188
py
Python
Estudos/110exercicios/Exercicios/ex011.py
romuloferraz/Python
2e20e7483cf9ea74b0b514f253034002bb56807f
[ "MIT" ]
null
null
null
Estudos/110exercicios/Exercicios/ex011.py
romuloferraz/Python
2e20e7483cf9ea74b0b514f253034002bb56807f
[ "MIT" ]
null
null
null
Estudos/110exercicios/Exercicios/ex011.py
romuloferraz/Python
2e20e7483cf9ea74b0b514f253034002bb56807f
[ "MIT" ]
null
null
null
h = float(input('digite a altura(m) da sua parede:\n')) c = float(input('Digite o comprimento(m) da sua parede:\n')) print(f'Sua parede tem área = {c*h}m² e consumirá {c*h/2}L de tinta!')
47
70
0.670213
h = float(input('digite a altura(m) da sua parede:\n')) c = float(input('Digite o comprimento(m) da sua parede:\n')) print(f'Sua parede tem área = {c*h}m² e consumirá {c*h/2}L de tinta!')
true
true
1c3ea98a7585fb03beb4e762dac750a21ae4a86a
119
py
Python
projects/thesis/continuous/custom/continuous/deform_feature/__init__.py
cpark90/rrrcnn
ba66cc391265be76fa3896b66459ff7241b47972
[ "Apache-2.0" ]
null
null
null
projects/thesis/continuous/custom/continuous/deform_feature/__init__.py
cpark90/rrrcnn
ba66cc391265be76fa3896b66459ff7241b47972
[ "Apache-2.0" ]
null
null
null
projects/thesis/continuous/custom/continuous/deform_feature/__init__.py
cpark90/rrrcnn
ba66cc391265be76fa3896b66459ff7241b47972
[ "Apache-2.0" ]
null
null
null
from .deform_feature_map_layer import * from .deform_orienation_layer import * from .deformable_by_grad_layer import *
29.75
39
0.848739
from .deform_feature_map_layer import * from .deform_orienation_layer import * from .deformable_by_grad_layer import *
true
true
1c3ea9de3eb93f5c90083da7512d23246cd1b525
171
py
Python
tests/project_awesome/b_module.py
ldiary/importlazy
0af9ee818428f6e9e79fb9391b05063e66a00ecd
[ "MIT" ]
null
null
null
tests/project_awesome/b_module.py
ldiary/importlazy
0af9ee818428f6e9e79fb9391b05063e66a00ecd
[ "MIT" ]
null
null
null
tests/project_awesome/b_module.py
ldiary/importlazy
0af9ee818428f6e9e79fb9391b05063e66a00ecd
[ "MIT" ]
null
null
null
class BModuleClassOne: class1_attribute = "Attribute of Class One in module B." class BModuleClassTwo: class2_attribute = "Attribute of Class Two in module B."
21.375
60
0.748538
class BModuleClassOne: class1_attribute = "Attribute of Class One in module B." class BModuleClassTwo: class2_attribute = "Attribute of Class Two in module B."
true
true
1c3eaa7ea6c3c365dda9d17a0d39853324bddd4f
1,030
py
Python
tests/test_otscraper.py
LSDtopotools/lsdviztools
b6012c0013bea7a0af5e7fa283a8a2268be18e25
[ "MIT" ]
2
2021-04-01T13:24:49.000Z
2021-09-15T17:24:19.000Z
tests/test_otscraper.py
LSDtopotools/lsdviztools
b6012c0013bea7a0af5e7fa283a8a2268be18e25
[ "MIT" ]
20
2020-07-28T11:10:36.000Z
2021-08-19T13:10:44.000Z
tests/test_otscraper.py
LSDtopotools/lsdviztools
b6012c0013bea7a0af5e7fa283a8a2268be18e25
[ "MIT" ]
2
2021-04-21T17:40:14.000Z
2021-09-15T17:24:20.000Z
#!/usr/bin/env python ''' A script for testing the ot_scraper object Simon Mudd 06/07/2020 ''' import lsdviztools.lsdbasemaptools as bmt from lsdviztools.lsdplottingtools import lsdmap_gdalio as gio import lsdviztools.lsdplottingtools as lsdplt import rasterio as rio import numpy as np import lsdviztools.lsdmapwrappe...
21.914894
161
0.737864
import lsdviztools.lsdbasemaptools as bmt from lsdviztools.lsdplottingtools import lsdmap_gdalio as gio import lsdviztools.lsdplottingtools as lsdplt import rasterio as rio import numpy as np import lsdviztools.lsdmapwrappers as lsdmw def test_01(): this_DEM = bmt.ot_scraper() this_DEM.print_parameters() ...
true
true
1c3eaac3076c50b3e4bc856465dc5a85d4547c31
49,441
py
Python
src/pymor/reductors/neural_network.py
ullmannsven/pymor
407103ec50efa45d933f0c973314a4d511cae792
[ "Unlicense" ]
null
null
null
src/pymor/reductors/neural_network.py
ullmannsven/pymor
407103ec50efa45d933f0c973314a4d511cae792
[ "Unlicense" ]
14
2022-01-05T09:25:11.000Z
2022-03-31T17:07:10.000Z
src/pymor/reductors/neural_network.py
ullmannsven/pymor
407103ec50efa45d933f0c973314a4d511cae792
[ "Unlicense" ]
null
null
null
# This file is part of the pyMOR project (https://www.pymor.org). # Copyright pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) from pymor.core.config import config config.require('TORCH') from numbers import Number import inspect ...
46.598492
115
0.633806
from pymor.core.config import config config.require('TORCH') from numbers import Number import inspect import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils as utils from pymor.algorithms.pod import pod from pymor.algorithms.projection import project from pymor.co...
true
true
1c3eab124bcb39e762371cb7056763fe10435167
28,138
py
Python
networkx/readwrite/gml.py
nik0sc/networkx
3d5f577f5176950473367c89fc4e2fac5fb49ce7
[ "BSD-3-Clause" ]
null
null
null
networkx/readwrite/gml.py
nik0sc/networkx
3d5f577f5176950473367c89fc4e2fac5fb49ce7
[ "BSD-3-Clause" ]
null
null
null
networkx/readwrite/gml.py
nik0sc/networkx
3d5f577f5176950473367c89fc4e2fac5fb49ce7
[ "BSD-3-Clause" ]
null
null
null
""" Read graphs in GML format. "GML, the Graph Modelling Language, is our proposal for a portable file format for graphs. GML's key features are portability, simple syntax, extensibility and flexibility. A GML file consists of a hierarchical key-value lists. Graphs can be annotated with arbitrary data structures. The ...
34.356532
87
0.55473
from io import StringIO from ast import literal_eval from collections import defaultdict from enum import Enum from typing import Any, NamedTuple import networkx as nx from networkx.exception import NetworkXError from networkx.utils import open_file import warnings import re import html.entities as htmlentitydefs __a...
true
true
1c3eab89ad9c859e5a79f47abfdc6eb5e5425323
8,200
py
Python
gpv2/experiments/trainer_cli.py
allenai/gpv2
dd8162a446963ed2c73eb24708580bbbe4491191
[ "Apache-2.0" ]
13
2022-02-03T00:25:35.000Z
2022-03-20T02:36:05.000Z
gpv2/experiments/trainer_cli.py
allenai/gpv2
dd8162a446963ed2c73eb24708580bbbe4491191
[ "Apache-2.0" ]
null
null
null
gpv2/experiments/trainer_cli.py
allenai/gpv2
dd8162a446963ed2c73eb24708580bbbe4491191
[ "Apache-2.0" ]
3
2022-01-14T19:15:38.000Z
2022-02-11T14:12:52.000Z
import logging from argparse import ArgumentParser from gpv2.data.dataset import Task from gpv2.data.gpv_datasets import GpvDataset, CocoCategories from gpv2.model.model import BeamSearchSpec from gpv2.train import evaluator from gpv2.train.evaluator import ResultKey from gpv2.train.runner import DataLoaderBuilder fro...
34.745763
103
0.682195
import logging from argparse import ArgumentParser from gpv2.data.dataset import Task from gpv2.data.gpv_datasets import GpvDataset, CocoCategories from gpv2.model.model import BeamSearchSpec from gpv2.train import evaluator from gpv2.train.evaluator import ResultKey from gpv2.train.runner import DataLoaderBuilder fro...
true
true
1c3eac835ba7397893099136aa6bcebacad7b24a
1,911
py
Python
Source/utils/labelmaps.py
YacobBY/ICDAR2019-ArT-Recognition-Alchemy
911c572c2aff4599a74b7974d46ef4cfb17078b9
[ "MIT" ]
209
2019-08-28T10:42:54.000Z
2022-01-10T13:49:32.000Z
Source/utils/labelmaps.py
wangxiong101/ICDAR2019-ArT-Recognition-Alchemy
5b03f73386f0a45ecc498f653d96012caa4a0c76
[ "MIT" ]
16
2019-09-01T05:12:39.000Z
2021-03-28T04:00:24.000Z
Source/utils/labelmaps.py
wangxiong101/ICDAR2019-ArT-Recognition-Alchemy
5b03f73386f0a45ecc498f653d96012caa4a0c76
[ "MIT" ]
76
2019-09-02T03:11:09.000Z
2021-11-11T04:42:31.000Z
from __future__ import absolute_import import string from . import to_torch, to_numpy def get_vocabulary(voc_type, EOS='EOS', PADDING='PADDING', UNKNOWN='UNKNOWN'): ''' voc_type: str: one of 'LOWERCASE', 'ALLCASES', 'ALLCASES_SYMBOLS', 'LOWERCASE_SYMBOLS' ''' voc = None types = ['LOW...
28.102941
91
0.600733
from __future__ import absolute_import import string from . import to_torch, to_numpy def get_vocabulary(voc_type, EOS='EOS', PADDING='PADDING', UNKNOWN='UNKNOWN'): voc = None types = ['LOWERCASE', 'ALLCASES', 'ALLCASES_SYMBOLS', 'LOWERCASE_SYMBOLS'] if voc_type == 'LOWERCASE': voc = ...
true
true