hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f6660a04bab9e209e2f7758b0cca0b182bfa35
6,426
py
Python
maskrcnn_benchmark/modeling/backbone/resnet_fast.py
amsword/maskrcnn-benchmark
660457d5f28c5d7d7887829486a20c60976b1dd8
[ "MIT" ]
2
2020-08-18T05:14:58.000Z
2020-08-20T05:13:36.000Z
maskrcnn_benchmark/modeling/backbone/resnet_fast.py
jacobswan1/maskrcnn-benchmark
660457d5f28c5d7d7887829486a20c60976b1dd8
[ "MIT" ]
null
null
null
maskrcnn_benchmark/modeling/backbone/resnet_fast.py
jacobswan1/maskrcnn-benchmark
660457d5f28c5d7d7887829486a20c60976b1dd8
[ "MIT" ]
1
2020-08-18T05:15:08.000Z
2020-08-18T05:15:08.000Z
# This file cames from Xiyang Dai import torch.nn as nn from torch.nn import BatchNorm2d from maskrcnn_benchmark.modeling.make_layers import frozen_batch_norm from maskrcnn_benchmark.layers.batch_norm import FrozenBatchNorm2d def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" ret...
32.619289
107
0.589169
import torch.nn as nn from torch.nn import BatchNorm2d from maskrcnn_benchmark.modeling.make_layers import frozen_batch_norm from maskrcnn_benchmark.layers.batch_norm import FrozenBatchNorm2d def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, ...
true
true
f7f666ddc6762d62eacf13a073aad06d68118588
1,809
py
Python
python/complete/no335.py
dhermes/project-euler
2aabf89b28f033a3e59b7411a9c9c261117818cf
[ "Apache-2.0" ]
7
2015-03-24T21:30:33.000Z
2021-03-13T14:01:23.000Z
python/complete/no335.py
dhermes/project-euler
2aabf89b28f033a3e59b7411a9c9c261117818cf
[ "Apache-2.0" ]
2
2015-03-25T22:53:54.000Z
2016-08-15T16:07:48.000Z
python/complete/no335.py
dhermes/project-euler
2aabf89b28f033a3e59b7411a9c9c261117818cf
[ "Apache-2.0" ]
1
2015-03-25T22:34:04.000Z
2015-03-25T22:34:04.000Z
#!/usr/bin/env python # Since M(2**n + 1) = 4**n + 3**n - 2**(n + 1) (empirically), # we find sum_{n=0}^{P} M(2**n + 1) is equal to # (4**(P + 1) - 1)/3 + (3**(P + 1) - 1)/2 + 2*(2**(P + 1) - 1) # = (4*(4**P) - 1)*(3**(-1)) + (3*(3**P) - 1)*(2**(-1)) + 4*(2**P) - 2 # (This is because (r - 1)*(r**P + ... + r + 1) = r**...
29.655738
74
0.537866
from python.decorators import euler_timer from python.functions import inverse_mod_n def moves(n): if n < 3: return n goal_state = [1] * n state = [0, 2] + [1] * (n - 2) num_moves = 1 last_placed = 1 while state != goal_state: beans = state[last_placed] state[l...
false
true
f7f6681b43a764564e2b8ac5d6512ab35bd02bf7
97,646
py
Python
test/distributed/test_c10d_nccl.py
FloCF/pytorch
383a33a0eb28ae454c0c8965650aea8ce1608943
[ "Intel" ]
1
2021-08-18T08:59:49.000Z
2021-08-18T08:59:49.000Z
test/distributed/test_c10d_nccl.py
FloCF/pytorch
383a33a0eb28ae454c0c8965650aea8ce1608943
[ "Intel" ]
null
null
null
test/distributed/test_c10d_nccl.py
FloCF/pytorch
383a33a0eb28ae454c0c8965650aea8ce1608943
[ "Intel" ]
null
null
null
import copy import math import os import random import signal import sys import tempfile import threading import time from contextlib import contextmanager from datetime import timedelta from itertools import product from unittest import mock import torch import torch.distributed as c10d if not c10d.is_available(): ...
38.625791
114
0.608269
import copy import math import os import random import signal import sys import tempfile import threading import time from contextlib import contextmanager from datetime import timedelta from itertools import product from unittest import mock import torch import torch.distributed as c10d if not c10d.is_available(): ...
true
true
f7f66a14deffaee4c0d6bb03f92171b850ac9ba0
16,008
py
Python
gosecure_app.py
larrycameron80/goSecure
8d2b8179e63d26640a46aa6475c4e13300ade55f
[ "CC0-1.0" ]
790
2016-05-01T17:18:22.000Z
2018-04-26T18:16:02.000Z
gosecure_app.py
rev10d/goSecure
8d2b8179e63d26640a46aa6475c4e13300ade55f
[ "CC0-1.0" ]
6
2016-06-22T14:16:37.000Z
2017-10-23T16:33:20.000Z
gosecure_app.py
rev10d/goSecure
8d2b8179e63d26640a46aa6475c4e13300ade55f
[ "CC0-1.0" ]
140
2016-05-01T04:50:46.000Z
2018-04-21T19:51:26.000Z
#!/usr/bin/env python import hashlib import os import pickle import time from functools import wraps import flask.ext.login as flask_login from flask import ( Flask, render_template, request, Response, flash, redirect, url_for) from forms import ( loginForm, initialSetupForm, userForm, wifiForm, vpnPskForm, ...
34.649351
136
0.614693
import hashlib import os import pickle import time from functools import wraps import flask.ext.login as flask_login from flask import ( Flask, render_template, request, Response, flash, redirect, url_for) from forms import ( loginForm, initialSetupForm, userForm, wifiForm, vpnPskForm, resetToDefaultFor...
true
true
f7f66c3c0c6462f3632cfe81922054428ced6e5b
2,026
py
Python
forms.py
Gilberthtx/AirDash2
cd2cde4d8f96a517110c130c02e9d859b8739d56
[ "MIT" ]
null
null
null
forms.py
Gilberthtx/AirDash2
cd2cde4d8f96a517110c130c02e9d859b8739d56
[ "MIT" ]
null
null
null
forms.py
Gilberthtx/AirDash2
cd2cde4d8f96a517110c130c02e9d859b8739d56
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import (DataRequired, Regexp, ValidationError, Email, Length, EqualTo) from models import User # this method will check if the email already exists def email_exists(form, field): if User.select().w...
20.059406
94
0.547878
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import (DataRequired, Regexp, ValidationError, Email, Length, EqualTo) from models import User def email_exists(form, field): if User.select().where(User.email == field.data).exists(): rai...
true
true
f7f66c5883b7adbdc9fda4fd8517449d73735c3d
2,800
py
Python
tests/performance/json_performance.py
mabel-dev/mabel
ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a
[ "Apache-2.0" ]
null
null
null
tests/performance/json_performance.py
mabel-dev/mabel
ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a
[ "Apache-2.0" ]
287
2021-05-14T21:25:26.000Z
2022-03-30T12:02:51.000Z
tests/performance/json_performance.py
gva-jjoyce/mabel
eb99e02d0287b851e65ad9a75b5f4188805d4ec9
[ "Apache-2.0" ]
1
2021-04-29T18:18:20.000Z
2021-04-29T18:18:20.000Z
""" JSON parsing and serialization performance tests so a decision on which library(s) to use can be made - previously the selection was inconsistent. Results (seconds to process 250,000 rows): library | parsing | serialize ------------------------------- json | 1.08 | 1.74 ujson | 0.52 | ...
27.45098
87
0.646071
import time def _inner_file_reader( file_name: str, chunk_size: int = 32 * 1024 * 1024, delimiter: str = "\n" ): with open(file_name, "r", encoding="utf8") as f: carry_forward = "" chunk = "INITIALIZED" while len(chunk) > 0: chunk = f.read(chunk_size) augmented_...
true
true
f7f66d224da95104fb6991e0e17cda4a0b3351c8
664
py
Python
manage.py
HJSAMO/Django-DRF-UserAPI
18347b028d9380b1abded6e717d4e7528936c6d1
[ "Apache-2.0" ]
null
null
null
manage.py
HJSAMO/Django-DRF-UserAPI
18347b028d9380b1abded6e717d4e7528936c6d1
[ "Apache-2.0" ]
null
null
null
manage.py
HJSAMO/Django-DRF-UserAPI
18347b028d9380b1abded6e717d4e7528936c6d1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_api.settings') try: from django.core.management import execute_from_command_line except Imp...
28.869565
73
0.679217
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_api.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f7f66d7261321c3d23165ba7df07ffcd98f52fe1
8,202
py
Python
ablation-study/1.E_align_z.py
disanda/MSV
066ed236a4c5df8b4b5e366020fe2954b7a6915a
[ "Apache-2.0", "MIT" ]
31
2021-08-21T10:05:26.000Z
2021-12-22T12:36:46.000Z
ablation-study/1.E_align_z.py
disanda/MSV
066ed236a4c5df8b4b5e366020fe2954b7a6915a
[ "Apache-2.0", "MIT" ]
null
null
null
ablation-study/1.E_align_z.py
disanda/MSV
066ed236a4c5df8b4b5e366020fe2954b7a6915a
[ "Apache-2.0", "MIT" ]
6
2021-08-21T10:05:38.000Z
2021-12-10T14:11:27.000Z
import sys sys.path.append("..") import os import math import torch import torchvision import model.E.Ablation_Study.E_Blur_Z as BE from model.utils.custom_adam import LREQAdam import metric.pytorch_ssim as pytorch_ssim import lpips import numpy as np import tensorboardX import argparse from model.stylegan1.net import ...
46.868571
225
0.667764
import sys sys.path.append("..") import os import math import torch import torchvision import model.E.Ablation_Study.E_Blur_Z as BE from model.utils.custom_adam import LREQAdam import metric.pytorch_ssim as pytorch_ssim import lpips import numpy as np import tensorboardX import argparse from model.stylegan1.net import ...
true
true
f7f66e35448c318b0805c9e4488775b9b34665bd
10,677
py
Python
stashpay/rpc.py
voycey/python-stashpay
4f2961c7bf334bd0ff3740fa4e1c027c3ddf0795
[ "MIT" ]
null
null
null
stashpay/rpc.py
voycey/python-stashpay
4f2961c7bf334bd0ff3740fa4e1c027c3ddf0795
[ "MIT" ]
null
null
null
stashpay/rpc.py
voycey/python-stashpay
4f2961c7bf334bd0ff3740fa4e1c027c3ddf0795
[ "MIT" ]
null
null
null
# # Part of `python-stashpay` # # Copyright 2018 dustinface # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
29.332418
108
0.585089
import re import subprocess import json import logging import re import copy import base64 try: import http.client as http except ImportError: import httplib as http try: import urllib.parse as urlparse except ImportError: import urlparse logger = logging.getLogger("stashpay.rpc...
true
true
f7f66ea0c343370b1597351b2a532e4055504ff0
447
py
Python
ddd_driven/test_sulfuras.py
Neppord/bdd-ddd-gilded-rose
15b0b94a55bc9024b9e7b4b4746914f2fbd46380
[ "MIT" ]
null
null
null
ddd_driven/test_sulfuras.py
Neppord/bdd-ddd-gilded-rose
15b0b94a55bc9024b9e7b4b4746914f2fbd46380
[ "MIT" ]
null
null
null
ddd_driven/test_sulfuras.py
Neppord/bdd-ddd-gilded-rose
15b0b94a55bc9024b9e7b4b4746914f2fbd46380
[ "MIT" ]
null
null
null
from gilded_rose import GildedRose, Sulfuras def test_update_sell_in(): sulfuras_item = Sulfuras("Sulfuras, Hand of Ragnaros", 2, 10) items = [sulfuras_item] GildedRose(items).update_quality() assert sulfuras_item.sell_in == 2 def test_update_quality(): sulfuras_item = Sulfuras("Sulfuras, Hand o...
26.294118
65
0.724832
from gilded_rose import GildedRose, Sulfuras def test_update_sell_in(): sulfuras_item = Sulfuras("Sulfuras, Hand of Ragnaros", 2, 10) items = [sulfuras_item] GildedRose(items).update_quality() assert sulfuras_item.sell_in == 2 def test_update_quality(): sulfuras_item = Sulfuras("Sulfuras, Hand o...
true
true
f7f66f03ee67e70a27cc3e08e6836e235368a4c3
874
py
Python
tests/test_q_resource_helpers.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
1,080
2015-01-04T14:29:34.000Z
2022-03-29T05:44:51.000Z
tests/test_q_resource_helpers.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
308
2015-01-05T22:44:13.000Z
2022-03-30T21:19:18.000Z
tests/test_q_resource_helpers.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
123
2015-01-25T16:33:48.000Z
2022-02-25T19:57:10.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #-----------------------------------------------------...
36.416667
79
0.590389
import pytest from utils import is_qt_available pytestmark = pytest.mark.skipif(not is_qt_available(), reason='Requires a Qt binding') from enaml.fontext import Font def test_QFont_from_Font(): from enaml.qt.q_resource_helpers import QFont_from_Font f = ...
true
true
f7f66f368a10dcc70fd364e6aa5ec9910e624bcb
4,661
py
Python
src/dcos_migrate/plugins/secret/plugin.py
fatz/dcos_migrate
0310c93b76dd0cd7149dbac335de870a30956a68
[ "Apache-2.0" ]
null
null
null
src/dcos_migrate/plugins/secret/plugin.py
fatz/dcos_migrate
0310c93b76dd0cd7149dbac335de870a30956a68
[ "Apache-2.0" ]
null
null
null
src/dcos_migrate/plugins/secret/plugin.py
fatz/dcos_migrate
0310c93b76dd0cd7149dbac335de870a30956a68
[ "Apache-2.0" ]
null
null
null
from dcos_migrate.plugins.plugin import MigratePlugin from dcos_migrate.plugins.cluster import ClusterPlugin from dcos_migrate.system import DCOSClient, BackupList, Backup, Manifest, ManifestList from kubernetes.client.models import V1Secret, V1ObjectMeta import urllib import base64 import logging from base64 import ...
35.580153
100
0.57906
from dcos_migrate.plugins.plugin import MigratePlugin from dcos_migrate.plugins.cluster import ClusterPlugin from dcos_migrate.system import DCOSClient, BackupList, Backup, Manifest, ManifestList from kubernetes.client.models import V1Secret, V1ObjectMeta import urllib import base64 import logging from base64 import ...
true
true
f7f670cffd657a94a9c93767c76abe3554a18a6a
95,313
py
Python
TWLight/users/tests.py
aacaldwell/TWLight
68e6d0d81ddd52596025f15d2c9a75dcdf504734
[ "MIT" ]
67
2017-12-14T22:27:48.000Z
2022-03-13T18:21:31.000Z
TWLight/users/tests.py
aacaldwell/TWLight
68e6d0d81ddd52596025f15d2c9a75dcdf504734
[ "MIT" ]
433
2017-03-24T22:51:23.000Z
2022-03-31T19:36:22.000Z
TWLight/users/tests.py
aacaldwell/TWLight
68e6d0d81ddd52596025f15d2c9a75dcdf504734
[ "MIT" ]
105
2017-06-23T03:53:41.000Z
2022-03-30T17:24:29.000Z
# -*- coding: utf-8 -*- import copy from datetime import datetime, date, timedelta import json import re from unittest.mock import patch, Mock from urllib.parse import urlparse from django.conf import settings from django.contrib.auth.models import User, AnonymousUser from django.core.exceptions import ( Permissio...
37.792625
132
0.657256
import copy from datetime import datetime, date, timedelta import json import re from unittest.mock import patch, Mock from urllib.parse import urlparse from django.conf import settings from django.contrib.auth.models import User, AnonymousUser from django.core.exceptions import ( PermissionDenied, Suspicious...
true
true
f7f67140a26bd51d41d001df1f78a970573ea917
3,271
py
Python
ast_to_xml.py
flyte/ast-to-xml
41464c689063246c913eea360e7afd066e267646
[ "MIT" ]
null
null
null
ast_to_xml.py
flyte/ast-to-xml
41464c689063246c913eea360e7afd066e267646
[ "MIT" ]
null
null
null
ast_to_xml.py
flyte/ast-to-xml
41464c689063246c913eea360e7afd066e267646
[ "MIT" ]
1
2021-04-04T15:06:20.000Z
2021-04-04T15:06:20.000Z
import ast import textwrap from importlib import import_module from types import ModuleType from lxml import etree as ET ATTRS = ("lineno", "col_offset", "end_lineno", "end_col_offset") def ast_node_attrs(ast_node): attrs = {} for key in ATTRS: try: attrs[key] = str(getattr(ast_node, key...
28.692982
80
0.614797
import ast import textwrap from importlib import import_module from types import ModuleType from lxml import etree as ET ATTRS = ("lineno", "col_offset", "end_lineno", "end_col_offset") def ast_node_attrs(ast_node): attrs = {} for key in ATTRS: try: attrs[key] = str(getattr(ast_node, key...
true
true
f7f671a1438be1f3a8791cf089a2da43c38c1602
1,302
py
Python
immudb/handler/sqlquery.py
cn-demo/immudb-py
c480211ddf94f64cf45cac8c48a4b60a37b5bf4a
[ "Apache-2.0" ]
30
2020-09-11T14:30:19.000Z
2022-03-29T17:37:52.000Z
immudb/handler/sqlquery.py
cn-demo/immudb-py
c480211ddf94f64cf45cac8c48a4b60a37b5bf4a
[ "Apache-2.0" ]
17
2020-09-16T09:27:33.000Z
2022-02-01T17:47:50.000Z
immudb/handler/sqlquery.py
cn-demo/immudb-py
c480211ddf94f64cf45cac8c48a4b60a37b5bf4a
[ "Apache-2.0" ]
6
2020-09-16T18:19:38.000Z
2021-12-23T20:33:48.000Z
# Copyright 2021 CodeNotary, Inc. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
37.2
83
0.742704
from immudb.grpc import schema_pb2 from immudb.grpc import schema_pb2_grpc from immudb.rootService import RootService from immudb.typeconv import py_to_sqlvalue from immudb.typeconv import sqlvalue_to_py def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, query, params): paramsObj = []...
true
true
f7f672ab488d0e8d14ee5ebc5dca8975aef14c74
902
py
Python
1_webelement/send_keys_example.py
pavlovprojects/python_qa_webelements
987a6bc18918b5ad12bec1d699c31322f6889e29
[ "MIT" ]
null
null
null
1_webelement/send_keys_example.py
pavlovprojects/python_qa_webelements
987a6bc18918b5ad12bec1d699c31322f6889e29
[ "MIT" ]
null
null
null
1_webelement/send_keys_example.py
pavlovprojects/python_qa_webelements
987a6bc18918b5ad12bec1d699c31322f6889e29
[ "MIT" ]
null
null
null
import time from conftest import DRIVERS from selenium import webdriver from selenium.webdriver.common.keys import Keys chrome = webdriver.Chrome(executable_path=DRIVERS + "/chromedriver") chrome.implicitly_wait(5) chrome.get("https://konflic.github.io/front_example/") input_field = chrome.find_element_by_id("inp")...
21.47619
68
0.788248
import time from conftest import DRIVERS from selenium import webdriver from selenium.webdriver.common.keys import Keys chrome = webdriver.Chrome(executable_path=DRIVERS + "/chromedriver") chrome.implicitly_wait(5) chrome.get("https://konflic.github.io/front_example/") input_field = chrome.find_element_by_id("inp")...
true
true
f7f672bdc36f42e8c8b343ab747ef64b6c7ab9e4
17,128
py
Python
claripy/frontends/composite_frontend.py
embg/claripy
1a5e0ca61d3f480e541226f103900e983f025e4a
[ "BSD-2-Clause" ]
null
null
null
claripy/frontends/composite_frontend.py
embg/claripy
1a5e0ca61d3f480e541226f103900e983f025e4a
[ "BSD-2-Clause" ]
null
null
null
claripy/frontends/composite_frontend.py
embg/claripy
1a5e0ca61d3f480e541226f103900e983f025e4a
[ "BSD-2-Clause" ]
null
null
null
import logging l = logging.getLogger("claripy.frontends.composite_frontend") import weakref import itertools symbolic_count = itertools.count() from .constrained_frontend import ConstrainedFrontend from claripy.ast.strings import String class CompositeFrontend(ConstrainedFrontend): def __init__(self, template_fr...
34.742394
118
0.603748
import logging l = logging.getLogger("claripy.frontends.composite_frontend") import weakref import itertools symbolic_count = itertools.count() from .constrained_frontend import ConstrainedFrontend from claripy.ast.strings import String class CompositeFrontend(ConstrainedFrontend): def __init__(self, template_fr...
true
true
f7f674176dcb1db9d4e00b3aac62d41e414b613c
3,099
py
Python
src/courses/tests/record_api/tests_purchasing_record.py
vlad-pro/education-backend
f766decc68e820296b6ea347021cf16e76322f32
[ "MIT" ]
null
null
null
src/courses/tests/record_api/tests_purchasing_record.py
vlad-pro/education-backend
f766decc68e820296b6ea347021cf16e76322f32
[ "MIT" ]
1
2022-02-10T12:08:02.000Z
2022-02-10T12:08:02.000Z
src/courses/tests/record_api/tests_purchasing_record.py
vlad-pro/education-backend
f766decc68e820296b6ea347021cf16e76322f32
[ "MIT" ]
null
null
null
from decimal import Decimal import pytest from orders.models import Order from tinkoff.client import TinkoffBank pytestmark = [pytest.mark.django_db] @pytest.fixture(autouse=True) def record(mixer): return mixer.blend('courses.Record', slug='home-video') @pytest.fixture(autouse=True) def payment_url(mocker):...
27.184211
109
0.664085
from decimal import Decimal import pytest from orders.models import Order from tinkoff.client import TinkoffBank pytestmark = [pytest.mark.django_db] @pytest.fixture(autouse=True) def record(mixer): return mixer.blend('courses.Record', slug='home-video') @pytest.fixture(autouse=True) def payment_url(mocker):...
true
true
f7f6742ab53bf622bcfe22680b6450833f1dccd6
24,740
py
Python
superset/connectors/sqla/views.py
ayuanty/superset
132a8ef2cb55fa6692ea31d5c278f102d6c2886b
[ "Apache-2.0" ]
19
2018-09-02T10:52:23.000Z
2022-03-24T09:43:48.000Z
superset/connectors/sqla/views.py
ayuanty/superset
132a8ef2cb55fa6692ea31d5c278f102d6c2886b
[ "Apache-2.0" ]
63
2021-06-12T18:25:14.000Z
2022-03-21T07:57:02.000Z
superset/connectors/sqla/views.py
ayuanty/superset
132a8ef2cb55fa6692ea31d5c278f102d6c2886b
[ "Apache-2.0" ]
15
2019-04-29T05:38:31.000Z
2022-02-12T10:47:54.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.003072
87
0.597898
import logging import re from dataclasses import dataclass, field from typing import Any, cast, Dict, List, Union from flask import current_app, flash, Markup, redirect from flask_appbuilder import CompactCRUDMixin, expose from flask_appbuilder.actions import action from flask_appbuilder.fieldwidgets i...
true
true
f7f67484e0ce92f936518a75860e967f2c6761d2
5,823
py
Python
python_modules/dagster-test/dagster_test/toys/many_events.py
johannkm/dagster-okteto
7ad30528a4a92945967d68e59e27727a1e839c2b
[ "Apache-2.0" ]
1
2020-08-10T23:03:37.000Z
2020-08-10T23:03:37.000Z
python_modules/dagster-test/dagster_test/toys/many_events.py
johannkm/dagster-okteto
7ad30528a4a92945967d68e59e27727a1e839c2b
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-test/dagster_test/toys/many_events.py
johannkm/dagster-okteto
7ad30528a4a92945967d68e59e27727a1e839c2b
[ "Apache-2.0" ]
1
2020-08-20T14:20:31.000Z
2020-08-20T14:20:31.000Z
from dagster import ( AssetMaterialization, EventMetadataEntry, ExpectationResult, InputDefinition, Nothing, Output, OutputDefinition, file_relative_path, pipeline, solid, ) MARKDOWN_EXAMPLE = 'markdown_example.md' raw_files = [ 'raw_file_users', 'raw_file_groups', ...
29.861538
100
0.603469
from dagster import ( AssetMaterialization, EventMetadataEntry, ExpectationResult, InputDefinition, Nothing, Output, OutputDefinition, file_relative_path, pipeline, solid, ) MARKDOWN_EXAMPLE = 'markdown_example.md' raw_files = [ 'raw_file_users', 'raw_file_groups', ...
true
true
f7f674ce1497bea15a75bed87fe3639c82743e91
7,358
py
Python
benchmarks/benchmarks/linalg.py
jcharlong/scipy
153467a9174b0c6f4b90ffeed5871e5018658108
[ "BSD-3-Clause" ]
9,095
2015-01-02T18:24:23.000Z
2022-03-31T20:35:31.000Z
benchmarks/benchmarks/linalg.py
jcharlong/scipy
153467a9174b0c6f4b90ffeed5871e5018658108
[ "BSD-3-Clause" ]
11,500
2015-01-01T01:15:30.000Z
2022-03-31T23:07:35.000Z
benchmarks/benchmarks/linalg.py
jcharlong/scipy
153467a9174b0c6f4b90ffeed5871e5018658108
[ "BSD-3-Clause" ]
5,838
2015-01-05T11:56:42.000Z
2022-03-31T23:21:19.000Z
import math import numpy.linalg as nl import numpy as np from numpy.testing import assert_ from numpy.random import rand from .common import Benchmark, safe_import with safe_import(): import scipy.linalg as sl def random(size): return rand(*size) class Bench(Benchmark): params = [ [20, 100, ...
29.198413
93
0.572302
import math import numpy.linalg as nl import numpy as np from numpy.testing import assert_ from numpy.random import rand from .common import Benchmark, safe_import with safe_import(): import scipy.linalg as sl def random(size): return rand(*size) class Bench(Benchmark): params = [ [20, 100, ...
true
true
f7f674d3ac4faefc56bb413133f2910a50d0ba60
66
py
Python
python/20190307/flask_qa_app/app/main/__init__.py
Realize0917/career
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
[ "MIT" ]
3
2019-01-17T05:50:51.000Z
2019-03-15T10:10:07.000Z
python/20190307/flask_qa_app/app/main/__init__.py
Realize0917/career
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
[ "MIT" ]
10
2019-01-17T06:07:03.000Z
2019-02-19T05:55:25.000Z
python/20190307/flask_qa_app/app/main/__init__.py
Realize0917/career
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
[ "MIT" ]
4
2018-12-22T07:32:55.000Z
2019-03-06T09:13:48.000Z
#!/usr/bin/env python # encoding: utf-8 from .views import qa_bp
13.2
24
0.712121
from .views import qa_bp
true
true
f7f6759a8f2fdd1c6c604775c76a51d9e63af08e
15,309
py
Python
kinow_client/models/__init__.py
kinow-io/kaemo-python-sdk
610fce09e3a9e631babf09195b0492959d9e4d56
[ "Apache-2.0" ]
1
2017-05-03T12:48:22.000Z
2017-05-03T12:48:22.000Z
kinow_client/models/__init__.py
kinow-io/kaemo-python-sdk
610fce09e3a9e631babf09195b0492959d9e4d56
[ "Apache-2.0" ]
null
null
null
kinow_client/models/__init__.py
kinow-io/kaemo-python-sdk
610fce09e3a9e631babf09195b0492959d9e4d56
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.9 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import models into model package from .actor import Actor from .actor_list_response imp...
49.067308
89
0.898295
from __future__ import absolute_import from .actor import Actor from .actor_list_response import ActorListResponse from .actor_product import ActorProduct from .actor_product_list_response import ActorProductListResponse from .actor_product_role import ActorProductRole from .actor_product_role_list_response impor...
true
true
f7f675b8dbda3618d987c0a646527293c5db44f2
9,023
py
Python
metaflow_tabular/forecasting_flow.py
jimgoo/metaflow-tabular
66b02c1d53b1a64d19b4fc2f7f4a5f9a5ab1b422
[ "MIT" ]
null
null
null
metaflow_tabular/forecasting_flow.py
jimgoo/metaflow-tabular
66b02c1d53b1a64d19b4fc2f7f4a5f9a5ab1b422
[ "MIT" ]
null
null
null
metaflow_tabular/forecasting_flow.py
jimgoo/metaflow-tabular
66b02c1d53b1a64d19b4fc2f7f4a5f9a5ab1b422
[ "MIT" ]
null
null
null
""" To run this flow: ```python forecasting_flow.py --environment=conda run``` """ from functools import partial from metaflow import ( Flow, FlowSpec, IncludeFile, Parameter, batch, conda, conda_base, get_metadata, parallel_map, step, ) from pip_decorator import pip from fore...
28.735669
88
0.56356
from functools import partial from metaflow import ( Flow, FlowSpec, IncludeFile, Parameter, batch, conda, conda_base, get_metadata, parallel_map, step, ) from pip_decorator import pip from forecasting_models import GluonTSModel, KatsModel, NeuralProphetModel, MerlionModel P...
true
true
f7f675e3ceedec6bb2a9a107a7fd4ca8ef08d42e
2,495
py
Python
library/postconf.py
chas0amx/ansible-postfix
b129c57fdddf00447a715cccea0758878de22d0b
[ "Apache-2.0" ]
1
2022-02-28T10:22:07.000Z
2022-02-28T10:22:07.000Z
library/postconf.py
chas0amx/ansible-postfix
b129c57fdddf00447a715cccea0758878de22d0b
[ "Apache-2.0" ]
7
2021-11-18T07:25:50.000Z
2022-03-31T12:25:24.000Z
library/postconf.py
chas0amx/ansible-postfix
b129c57fdddf00447a715cccea0758878de22d0b
[ "Apache-2.0" ]
1
2022-03-02T10:17:23.000Z
2022-03-02T10:17:23.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # (c) 2020, Bodo Schulz <bodo@boone-schulz.de> # BSD 2-clause (see LICENSE or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function import re from ansible.module_utils.basic import AnsibleModule class PostfixPos...
23.990385
85
0.552305
from __future__ import absolute_import, division, print_function import re from ansible.module_utils.basic import AnsibleModule class PostfixPostconf(object): module = None def __init__(self, module): self.module = module self._postconf = module.get_bin_path('postconf', True) ...
true
true
f7f675faf2896972bfa757d07f83f25d814c5a54
183
py
Python
scripts/constants.py
ltnguyen14/Quant_stock
0c3dcbb3c6d63e6426fd7d261578b13e8d429ccb
[ "MIT" ]
168
2017-08-18T11:57:52.000Z
2022-03-25T01:43:11.000Z
scripts/constants.py
Rgveda/Quant_stock
0c3dcbb3c6d63e6426fd7d261578b13e8d429ccb
[ "MIT" ]
2
2017-10-30T19:17:43.000Z
2019-02-23T16:46:23.000Z
scripts/constants.py
Rgveda/Quant_stock
0c3dcbb3c6d63e6426fd7d261578b13e8d429ccb
[ "MIT" ]
69
2017-10-30T18:54:11.000Z
2022-02-10T15:53:14.000Z
hm_epoch = 5 # Number of epoch in training lag_range = 1 # Lag range lag_epoch_num = 1 # Number of epoch while finding lag learning_rate = 0.001 # Default learning rate
26.142857
54
0.699454
hm_epoch = 5 lag_range = 1 lag_epoch_num = 1 learning_rate = 0.001
true
true
f7f6762de8bf3f833dfcb45d5c21973d90c6da68
17,255
py
Python
src/oci/apigateway/models/certificate.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/apigateway/models/certificate.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/apigateway/models/certificate.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
32.929389
245
0.648913
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class Certificate(object): LIFECYCLE_STATE_CREATING = "CREATING" LIFECYCLE_STATE_ACTIVE = "ACTIVE" ...
true
true
f7f676c8b9cbe8c0e0ebf6c1796c802cead8c2d3
545
py
Python
frb/data/Halos/build_grids.py
KshitijAggarwal/FRB
3f732c6fa4fc79a5cfe69daf3cd88b51e6fb402b
[ "BSD-3-Clause" ]
39
2019-01-05T01:12:54.000Z
2021-12-15T16:53:51.000Z
frb/data/Halos/build_grids.py
KshitijAggarwal/FRB
3f732c6fa4fc79a5cfe69daf3cd88b51e6fb402b
[ "BSD-3-Clause" ]
80
2017-05-28T12:58:38.000Z
2022-01-25T23:22:29.000Z
frb/data/Halos/build_grids.py
KshitijAggarwal/FRB
3f732c6fa4fc79a5cfe69daf3cd88b51e6fb402b
[ "BSD-3-Clause" ]
20
2019-01-07T00:59:08.000Z
2022-03-29T11:38:19.000Z
from frb.halos import build_grid # Command line execution if __name__ == '__main__': #build_grid(outfile='z1_mNFW_10000', ntrial=10000) #build_grid(outfile='z1_mNFW_10000_21dec2018', ntrial=10000) #build_grid(outfile='test', ntrial=500, r_max=1.) #build_grid(outfile='test', ntrial=100, r_max=1.) #b...
34.0625
81
0.717431
from frb.halos import build_grid if __name__ == '__main__': build_grid(outfile='z1_mNFW_10000_rmax1', ntrial=10000, r_max=1., f_hot=0.75) build_grid(outfile='z1_mNFW_10000_rmax2', ntrial=10000, r_max=2.)
true
true
f7f676d1212b76e5950d052899c25e192a38e1a6
1,318
py
Python
Lib/site-packages/SiQt/siqt/tests/test_importers.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
null
null
null
Lib/site-packages/SiQt/siqt/tests/test_importers.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/SiQt/siqt/tests/test_importers.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools from unittest.case import SkipTest from multiprocessing import Process, Queue from time import sleep, time def _run_process(fu...
21.258065
62
0.637329
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools from unittest.case import SkipTest from multiprocessing import Process, Queue from time import sleep, time def _run_process(func): @functools.wra...
true
true
f7f677963d0e8c3b1c2fc5cef943dfb7aaad168e
411
py
Python
django101/django101/asgi.py
Nikolay1982Nikolaev/python-web-2020-09
1f3fa8f7188c0a63647e4224a82d04f3f97cd455
[ "MIT" ]
4
2020-10-30T23:13:50.000Z
2020-12-26T21:35:00.000Z
django101/django101/asgi.py
Nikolay1982Nikolaev/python-web-2020-09
1f3fa8f7188c0a63647e4224a82d04f3f97cd455
[ "MIT" ]
null
null
null
django101/django101/asgi.py
Nikolay1982Nikolaev/python-web-2020-09
1f3fa8f7188c0a63647e4224a82d04f3f97cd455
[ "MIT" ]
7
2020-09-17T13:08:35.000Z
2020-10-31T15:01:46.000Z
""" ASGI config for django101 project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefaul...
24.176471
79
0.756691
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django101.settings') application = get_asgi_application()
true
true
f7f678f93e83cf7526c28d593431b57b59639a70
478
py
Python
Alp/cap_alp/Z.py
Ashokkommi0001/patterns
daa1a1d8f3bc6e021e02a0e34458e2c178fc71d2
[ "MIT" ]
2
2021-03-17T12:08:22.000Z
2021-03-17T12:11:10.000Z
Alp/cap_alp/Z.py
Ashokkommi0001/patterns
daa1a1d8f3bc6e021e02a0e34458e2c178fc71d2
[ "MIT" ]
null
null
null
Alp/cap_alp/Z.py
Ashokkommi0001/patterns
daa1a1d8f3bc6e021e02a0e34458e2c178fc71d2
[ "MIT" ]
1
2021-03-17T11:49:39.000Z
2021-03-17T11:49:39.000Z
def for_Z(): for row in range(7): for col in range(7): if row==0 or row==6 or row+col==6 : print("*",end=" ") else: print(end=" ") print() def while_Z(): i=0 while i<7: j=0 while j<7: if i==0 ...
21.727273
48
0.317992
def for_Z(): for row in range(7): for col in range(7): if row==0 or row==6 or row+col==6 : print("*",end=" ") else: print(end=" ") print() def while_Z(): i=0 while i<7: j=0 while j<7: if i==0 ...
true
true
f7f67992b961f2998416bc6eaf320823370b1e3b
10,005
py
Python
examples/flight_delays/logcox_implicit_scmmgp.py
axdahl/SC-MMGP
c6cd9d9de66bb7074925a4b6485f10a74bdd9f68
[ "Apache-2.0" ]
null
null
null
examples/flight_delays/logcox_implicit_scmmgp.py
axdahl/SC-MMGP
c6cd9d9de66bb7074925a4b6485f10a74bdd9f68
[ "Apache-2.0" ]
null
null
null
examples/flight_delays/logcox_implicit_scmmgp.py
axdahl/SC-MMGP
c6cd9d9de66bb7074925a4b6485f10a74bdd9f68
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Script to execute example implicit sparse covarying MMGP with Poisson likelihood. The model invokes the 'implicit' sparse model class and accepts a degenerate kernel that is optionally corrected within the model class with diagonal correction. Inputs: Data training and test sets (dict...
40.670732
127
0.691554
import os import numpy as np import pickle import pandas as pd import traceback import time import sklearn.cluster import csv import sys import mmgp from mmgp import likelihoods from mmgp import kernels import tensorflow as tf from mmgp import datasets from mmgp import losses from mmgp import util d...
true
true
f7f67a272bdc58ebe68462646753c1b07b16884c
84,043
py
Python
fivepseq/logic/structures/fivepseq_counts.py
opplatek/fivepseq
9a531520e29aa9b3edbf1823c6cfd249f97bba9b
[ "BSD-3-Clause" ]
5
2018-10-27T20:37:26.000Z
2021-06-14T10:23:53.000Z
fivepseq/logic/structures/fivepseq_counts.py
opplatek/fivepseq
9a531520e29aa9b3edbf1823c6cfd249f97bba9b
[ "BSD-3-Clause" ]
1
2021-12-14T17:20:08.000Z
2021-12-14T17:20:08.000Z
fivepseq/logic/structures/fivepseq_counts.py
opplatek/fivepseq
9a531520e29aa9b3edbf1823c6cfd249f97bba9b
[ "BSD-3-Clause" ]
1
2020-12-22T17:27:40.000Z
2020-12-22T17:27:40.000Z
import collections import logging import os from math import floor import numpy as np import pandas as pd import plastid from preconditions import preconditions from scipy import stats from fivepseq import config from fivepseq.logic.structures import codons from fivepseq.logic.structures.codons import Codons from fiv...
45.111648
152
0.610319
import collections import logging import os from math import floor import numpy as np import pandas as pd import plastid from preconditions import preconditions from scipy import stats from fivepseq import config from fivepseq.logic.structures import codons from fivepseq.logic.structures.codons import Codons from fiv...
true
true
f7f67bb47b2fe1d76e46539ae517f28fe34660a1
252
py
Python
codesignal/simpleSort.py
andraantariksa/code-exercise-answer
69b7dbdc081cdb094cb110a72bc0c9242d3d344d
[ "MIT" ]
1
2019-11-06T15:17:48.000Z
2019-11-06T15:17:48.000Z
codesignal/simpleSort.py
andraantariksa/code-exercise-answer
69b7dbdc081cdb094cb110a72bc0c9242d3d344d
[ "MIT" ]
null
null
null
codesignal/simpleSort.py
andraantariksa/code-exercise-answer
69b7dbdc081cdb094cb110a72bc0c9242d3d344d
[ "MIT" ]
1
2018-11-13T08:43:26.000Z
2018-11-13T08:43:26.000Z
def simpleSort(arr): n = len(arr) for i in range(n): j = 0 stop = n - i while j < stop - 1: if arr[j] > arr[j + 1]: arr[j], arr[j + 1] = arr[j + 1], arr[j] j += 1 return arr
19.384615
55
0.373016
def simpleSort(arr): n = len(arr) for i in range(n): j = 0 stop = n - i while j < stop - 1: if arr[j] > arr[j + 1]: arr[j], arr[j + 1] = arr[j + 1], arr[j] j += 1 return arr
true
true
f7f67ce159f562ec968a106b9cbbc27b8adb5c39
2,369
py
Python
analyzer/checks/metrics/__init__.py
cqr-cryeye-forks/gdpr-scanner
5d5bd517a97befa84b8294504f8e4aaf3eb7f5f8
[ "MIT" ]
18
2020-02-14T12:51:48.000Z
2022-01-05T08:57:44.000Z
analyzer/checks/metrics/__init__.py
cqr-cryeye-forks/gdpr-scanner
5d5bd517a97befa84b8294504f8e4aaf3eb7f5f8
[ "MIT" ]
null
null
null
analyzer/checks/metrics/__init__.py
cqr-cryeye-forks/gdpr-scanner
5d5bd517a97befa84b8294504f8e4aaf3eb7f5f8
[ "MIT" ]
2
2021-06-15T13:04:09.000Z
2021-07-13T07:04:20.000Z
import logging import os import re from abc import ABC, abstractmethod from typing import Dict, List from bs4 import BeautifulSoup from analyzer.checks.check_result import CheckResult from analyzer.checks.severity import Severity from analyzer.types_definitions import CrawlerDomainMetaData logger = logging.getLogger...
35.893939
113
0.672436
import logging import os import re from abc import ABC, abstractmethod from typing import Dict, List from bs4 import BeautifulSoup from analyzer.checks.check_result import CheckResult from analyzer.checks.severity import Severity from analyzer.types_definitions import CrawlerDomainMetaData logger = logging.getLogger...
true
true
f7f67d228e5c3ebe6dc3287545d743a5638c5a60
11,946
py
Python
podqueue/main.py
Earthnuker/podqueue
7d9ff4142b672c758493f5a906e3bde63de78fea
[ "MIT" ]
null
null
null
podqueue/main.py
Earthnuker/podqueue
7d9ff4142b672c758493f5a906e3bde63de78fea
[ "MIT" ]
null
null
null
podqueue/main.py
Earthnuker/podqueue
7d9ff4142b672c758493f5a906e3bde63de78fea
[ "MIT" ]
null
null
null
#!/bin/env python3 import feedparser import argparse import os from os import path, getcwd import xml.etree.ElementTree as ET from io import IOBase import json import requests import time from configparser import ConfigParser import re import logging # ----- ----- ----- ----- ----- class podqueue():...
35.766467
134
0.639879
import feedparser import argparse import os from os import path, getcwd import xml.etree.ElementTree as ET from io import IOBase import json import requests import time from configparser import ConfigParser import re import logging class podqueue(): def __init__(self): self.verbose ...
true
true
f7f67dcdf0d2b82d616fa3157980732a991a33b3
535
py
Python
eval_ricord1a_timm-regnetx_002_GridDropout.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
eval_ricord1a_timm-regnetx_002_GridDropout.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
eval_ricord1a_timm-regnetx_002_GridDropout.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
import os ls=["python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_0_GridDropout.yml", "python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_1_GridDropout.yml", "python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_2_GridDropout.yml", "python mai...
48.636364
101
0.84486
import os ls=["python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_0_GridDropout.yml", "python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_1_GridDropout.yml", "python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_2_GridDropout.yml", "python mai...
true
true
f7f67df1d072564d52b3c391226e8fa9a72729ae
22,004
py
Python
baselines/deepq/build_graph.py
junkilee/simple_baselines
cc5cc4b8d83119bf144abb08900762b76b1a33ac
[ "MIT" ]
null
null
null
baselines/deepq/build_graph.py
junkilee/simple_baselines
cc5cc4b8d83119bf144abb08900762b76b1a33ac
[ "MIT" ]
null
null
null
baselines/deepq/build_graph.py
junkilee/simple_baselines
cc5cc4b8d83119bf144abb08900762b76b1a33ac
[ "MIT" ]
null
null
null
"""Deep Q learning graph The functions in this file can are used to create the following functions: ======= act ======== Function to chose an action given an observation Parameters ---------- observation: object Observation that can be feed into the output of make_obs_ph stochastic: bool...
46.916844
168
0.664334
import tensorflow as tf import baselines.common.tf_util as U def default_param_noise_filter(var): if var not in tf.trainable_variables(): return False if "fully_connected" in var.name: return True return False def build_act(make_obs_ph, q_func, num_...
true
true
f7f67e3263e2a9954edd3be81afc24e56dc7632c
2,657
py
Python
test/integration/012_deprecation_tests/test_deprecations.py
tjengel/dbt
f985902a002fba36f6f709c6aacf9ae20778e58c
[ "Apache-2.0" ]
1
2021-09-01T20:50:52.000Z
2021-09-01T20:50:52.000Z
test/integration/012_deprecation_tests/test_deprecations.py
tjengel/dbt
f985902a002fba36f6f709c6aacf9ae20778e58c
[ "Apache-2.0" ]
1
2019-10-28T15:33:04.000Z
2019-10-28T15:33:04.000Z
test/integration/012_deprecation_tests/test_deprecations.py
tjengel/dbt
f985902a002fba36f6f709c6aacf9ae20778e58c
[ "Apache-2.0" ]
2
2019-05-10T21:23:08.000Z
2021-06-09T01:28:37.000Z
from test.integration.base import DBTIntegrationTest, use_profile from dbt import deprecations import dbt.exceptions class BaseTestDeprecations(DBTIntegrationTest): def setUp(self): super().setUp() deprecations.reset_deprecations() @property def schema(self): return "deprecation_...
27.677083
71
0.681972
from test.integration.base import DBTIntegrationTest, use_profile from dbt import deprecations import dbt.exceptions class BaseTestDeprecations(DBTIntegrationTest): def setUp(self): super().setUp() deprecations.reset_deprecations() @property def schema(self): return "deprecation_...
true
true
f7f67e93db29ff1b40013de76266bd63a79f6b72
1,604
py
Python
stentseg/apps/sliceviewer.py
almarklein/stentseg
48255fffdc2394d1dc4ce2208c9a91e1d4c35a46
[ "BSD-3-Clause" ]
1
2020-08-28T16:34:10.000Z
2020-08-28T16:34:10.000Z
stentseg/apps/sliceviewer.py
almarklein/stentseg
48255fffdc2394d1dc4ce2208c9a91e1d4c35a46
[ "BSD-3-Clause" ]
null
null
null
stentseg/apps/sliceviewer.py
almarklein/stentseg
48255fffdc2394d1dc4ce2208c9a91e1d4c35a46
[ "BSD-3-Clause" ]
1
2021-04-25T06:59:36.000Z
2021-04-25T06:59:36.000Z
import visvis as vv class VolViewer: """ VolViewer. View (CT) volume while scrolling through slices (z) """ def __init__(self, vol): # Store vol and init self.vol = vol self.z = 0 # Prepare figure and axex self.f = vv.figure(1001) self.f.Clear() ...
27.186441
111
0.593516
import visvis as vv class VolViewer: def __init__(self, vol): self.vol = vol self.z = 0 self.f = vv.figure(1001) self.f.Clear() self.a = vv.gca() self.t = vv.imshow(vol[self.z,:,:]) self.f.eventScroll.Bind(self.on_scro...
true
true
f7f67f2bcbc49693ddf71edbadec225650e745b7
942
py
Python
tests/testapp/models/costume.py
Bilonan/django-binder
d2d9b504a92029a0afc616be81a08f0deddd5b64
[ "MIT" ]
14
2016-08-15T13:08:55.000Z
2021-11-17T11:43:20.000Z
tests/testapp/models/costume.py
Bilonan/django-binder
d2d9b504a92029a0afc616be81a08f0deddd5b64
[ "MIT" ]
141
2016-08-14T15:36:35.000Z
2022-02-17T08:53:52.000Z
tests/testapp/models/costume.py
Bilonan/django-binder
d2d9b504a92029a0afc616be81a08f0deddd5b64
[ "MIT" ]
18
2016-10-01T21:30:22.000Z
2022-03-28T10:51:41.000Z
from django.db import models from binder.models import BinderModel from binder.websocket import trigger from django.db.models.signals import post_save # Some of our fictitious animals actually wear clothes/costumes... # Each costume is unique to an animal (one to one mapping) class Costume(BinderModel): class Meta(B...
29.4375
108
0.753715
from django.db import models from binder.models import BinderModel from binder.websocket import trigger from django.db.models.signals import post_save class Costume(BinderModel): class Meta(BinderModel.Meta): ordering = ['animal_id'] nickname = models.TextField(blank=True) description = models.TextField(blank...
true
true
f7f67fc4f82f57e691ea958c42b57e7e0b1ca62b
3,912
py
Python
data/aligned3_tm_max_dataset.py
tkuri/pytorch-CycleGAN-and-pix2pix
b00b3f0bcebfb12d3f026c2a61c98ff63175a583
[ "BSD-3-Clause" ]
null
null
null
data/aligned3_tm_max_dataset.py
tkuri/pytorch-CycleGAN-and-pix2pix
b00b3f0bcebfb12d3f026c2a61c98ff63175a583
[ "BSD-3-Clause" ]
null
null
null
data/aligned3_tm_max_dataset.py
tkuri/pytorch-CycleGAN-and-pix2pix
b00b3f0bcebfb12d3f026c2a61c98ff63175a583
[ "BSD-3-Clause" ]
null
null
null
import os.path from data.base_dataset import BaseDataset, get_params, get_transform from data.image_folder import make_dataset from PIL import Image, ImageOps import torch class Aligned3TmMaxDataset(BaseDataset): """A dataset class for paired image dataset. It assumes that the directory '/path/to/data/train' ...
42.989011
118
0.594325
import os.path from data.base_dataset import BaseDataset, get_params, get_transform from data.image_folder import make_dataset from PIL import Image, ImageOps import torch class Aligned3TmMaxDataset(BaseDataset): def __init__(self, opt): BaseDataset.__init__(self, opt) self.dir_ABC = os.path.join(...
true
true
f7f67ffad82d122822794a35f28a9b7086905d6d
564
py
Python
ics/structures/rad_moon_duo_converter_settings.py
intrepidcs/python_ics
7bfa8c2f893763608f9255f9536a2019cfae0c23
[ "Unlicense" ]
45
2017-10-17T08:42:08.000Z
2022-02-21T16:26:48.000Z
ics/structures/rad_moon_duo_converter_settings.py
intrepidcs/python_ics
7bfa8c2f893763608f9255f9536a2019cfae0c23
[ "Unlicense" ]
106
2017-03-07T21:10:39.000Z
2022-03-29T15:32:46.000Z
ics/structures/rad_moon_duo_converter_settings.py
intrepidcs/python_ics
7bfa8c2f893763608f9255f9536a2019cfae0c23
[ "Unlicense" ]
17
2017-04-04T12:30:22.000Z
2022-01-28T05:30:25.000Z
# This file was auto generated; Do not modify, if you value your sanity! import ctypes import enum class rad_moon_duo_converter_settings(ctypes.Structure): _pack_ = 2 _fields_ = [ ('linkMode0', ctypes.c_uint8), ('linkMode1', ctypes.c_uint8), ('converter1Mode', ctypes.c_uint8), ...
25.636364
72
0.703901
import ctypes import enum class rad_moon_duo_converter_settings(ctypes.Structure): _pack_ = 2 _fields_ = [ ('linkMode0', ctypes.c_uint8), ('linkMode1', ctypes.c_uint8), ('converter1Mode', ctypes.c_uint8), ('ipAddress', ctypes.c_uint32), ('ipMask', ctypes.c_uint32), ...
true
true
f7f680d798ba23b7633125e1e293cf403f0d37e2
27,427
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/aio/operations/_local_network_gateways_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/aio/operations/_local_network_gateways_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/aio/operations/_local_network_gateways_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.651601
209
0.681919
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f7f68190aae1fda7d3e9ea1f61659cf10ddedf4f
4,478
py
Python
tests/conftest.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
2
2018-04-25T02:10:30.000Z
2021-07-30T03:57:49.000Z
tests/conftest.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
null
null
null
tests/conftest.py
bullocke/yatsm_nrt
b0ded56032bf9f9dcdf6b7b749f6554ade56de1e
[ "MIT" ]
1
2017-04-01T16:11:52.000Z
2017-04-01T16:11:52.000Z
import fnmatch from functools import partial import os import shutil import tarfile from tempfile import mkdtemp try: from os import walk except ImportError: from scandir import walk if os.environ.get('TRAVIS'): # use agg backend on TRAVIS for testing so DISPLAY isn't required import matplotlib as mpl ...
30.256757
79
0.659
import fnmatch from functools import partial import os import shutil import tarfile from tempfile import mkdtemp try: from os import walk except ImportError: from scandir import walk if os.environ.get('TRAVIS'): import matplotlib as mpl mpl.use('agg') import numpy as np # noqa import pandas as p...
false
true
f7f68375b9f644ed7779c5df8b9b4a1f86fb148f
15,788
bzl
Python
deps.bzl
anthonylusardi-da/daml
ca297690049f0c425a386d693f72c5e385f19ba5
[ "Apache-2.0" ]
null
null
null
deps.bzl
anthonylusardi-da/daml
ca297690049f0c425a386d693f72c5e385f19ba5
[ "Apache-2.0" ]
null
null
null
deps.bzl
anthonylusardi-da/daml
ca297690049f0c425a386d693f72c5e385f19ba5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # The dependencies of the daml workspace. # This allows using the daml workspace externally # from another bazel workspace. # # For example, another Bazel project can depend on # ta...
47.128358
183
0.655941
# be resolvable from external workspaces otherwise. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") rules_scala_version = "6c16cff213b76a4126bdc850956046da5db1daaa" rules_haskell_version ...
true
true
f7f683deb119d3b142f6459541138afa3fa02625
275
py
Python
input_output.py
aaskov/convnet-est-loss
4fdb13dbd858700f3eaa92e6f7309787984beb8d
[ "MIT" ]
null
null
null
input_output.py
aaskov/convnet-est-loss
4fdb13dbd858700f3eaa92e6f7309787984beb8d
[ "MIT" ]
null
null
null
input_output.py
aaskov/convnet-est-loss
4fdb13dbd858700f3eaa92e6f7309787984beb8d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ convnet-est-loss """ import pickle def save_obj(obj, name): with open(name + '.pkl', 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) def load_obj(name): with open(name + '.pkl', 'rb') as f: return pickle.load(f)
19.642857
52
0.589091
import pickle def save_obj(obj, name): with open(name + '.pkl', 'wb') as f: pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL) def load_obj(name): with open(name + '.pkl', 'rb') as f: return pickle.load(f)
true
true
f7f6840f6edecab2a351e699c31f3291bb25c113
630
py
Python
fibonacciDatasetCreator.py
ReetNayan/PythonMiscellaneousProgramsForFun
9fd51432726dbfb4b06e5e13fd143171a4319ab7
[ "MIT" ]
1
2021-08-04T01:46:19.000Z
2021-08-04T01:46:19.000Z
fibonacciDatasetCreator.py
ReetNayan/PythonMiscellaneousProgramsForFun
9fd51432726dbfb4b06e5e13fd143171a4319ab7
[ "MIT" ]
null
null
null
fibonacciDatasetCreator.py
ReetNayan/PythonMiscellaneousProgramsForFun
9fd51432726dbfb4b06e5e13fd143171a4319ab7
[ "MIT" ]
null
null
null
fileWrite = open("fibonacciDataset.csv", 'w+') num = int(input("Enter the number of data: ")) print("Writing new data in the file...") done = 0 a = 0 b = 1 string = "" pair = 0 while True: if pair < 2: if pair == 1: string = string + ',' + str(a) else: stri...
19.090909
47
0.473016
fileWrite = open("fibonacciDataset.csv", 'w+') num = int(input("Enter the number of data: ")) print("Writing new data in the file...") done = 0 a = 0 b = 1 string = "" pair = 0 while True: if pair < 2: if pair == 1: string = string + ',' + str(a) else: stri...
true
true
f7f684da60763f542bea5df9d86ec164816e18d3
5,026
py
Python
pydev_source/_pydevd_bundle/pydevd_command_line_handling.py
mangopipeline/3dsMax_PyDev_Debug
e02bf5d383f1b674f273473fe9aa5837c9559550
[ "MIT" ]
null
null
null
pydev_source/_pydevd_bundle/pydevd_command_line_handling.py
mangopipeline/3dsMax_PyDev_Debug
e02bf5d383f1b674f273473fe9aa5837c9559550
[ "MIT" ]
null
null
null
pydev_source/_pydevd_bundle/pydevd_command_line_handling.py
mangopipeline/3dsMax_PyDev_Debug
e02bf5d383f1b674f273473fe9aa5837c9559550
[ "MIT" ]
null
null
null
class ArgHandlerWithParam: ''' Handler for some arguments which needs a value ''' def __init__(self, arg_name, convert_val=None, default_val=None): self.arg_name = arg_name self.arg_v_rep = '--%s' % (arg_name,) self.convert_val = convert_val self.default_val = default_va...
32.425806
121
0.593514
class ArgHandlerWithParam: def __init__(self, arg_name, convert_val=None, default_val=None): self.arg_name = arg_name self.arg_v_rep = '--%s' % (arg_name,) self.convert_val = convert_val self.default_val = default_val def to_argv(self, lst, setup): v = setup.get(self.ar...
true
true
f7f6855914c02597c65a8812372c45437caaa84e
23,774
py
Python
pytorch_lightning/strategies/ddp.py
alat-rights/pytorch-lightning
a4f1f3dc28982eb6578df62ca92b93f83a2defcc
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/strategies/ddp.py
alat-rights/pytorch-lightning
a4f1f3dc28982eb6578df62ca92b93f83a2defcc
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/strategies/ddp.py
alat-rights/pytorch-lightning
a4f1f3dc28982eb6578df62ca92b93f83a2defcc
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
43.622018
120
0.678388
import logging import os import shutil import signal import subprocess import sys import tempfile import time from pathlib import Path from time import sleep from typing import Any, Callable, Dict, List, Optional, Union import __main__ import numpy as np import torch import torch.distributed from torch.di...
true
true
f7f68585426061425b5c370c764dc2a77a726137
387
py
Python
djnago_portfolio/projects/migrations/0002_auto_20200605_0855.py
RohanMiraje/my_django_learning_start
57f5dd0c984862119a551e640bf4b31d583b4353
[ "MIT" ]
null
null
null
djnago_portfolio/projects/migrations/0002_auto_20200605_0855.py
RohanMiraje/my_django_learning_start
57f5dd0c984862119a551e640bf4b31d583b4353
[ "MIT" ]
null
null
null
djnago_portfolio/projects/migrations/0002_auto_20200605_0855.py
RohanMiraje/my_django_learning_start
57f5dd0c984862119a551e640bf4b31d583b4353
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-05 03:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0001_initial'), ] operations = [ migrations.AlterField( model_name='project', name='image', ...
20.368421
61
0.589147
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0001_initial'), ] operations = [ migrations.AlterField( model_name='project', name='image', field=models.FilePathField(path='/projects/img'...
true
true
f7f6869f92e17d9188222683b1cd610a511312b9
3,299
py
Python
api/autotest/common/log.py
P-JIANGH/autonium
99a7de401c378e5e546727e0f920e11ce7e24a15
[ "Apache-2.0" ]
null
null
null
api/autotest/common/log.py
P-JIANGH/autonium
99a7de401c378e5e546727e0f920e11ce7e24a15
[ "Apache-2.0" ]
null
null
null
api/autotest/common/log.py
P-JIANGH/autonium
99a7de401c378e5e546727e0f920e11ce7e24a15
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ Log输出器 """ __author__ = 'JIANGH' import logging, time, threading from .config_reader import readconfig # 设定log等级 LEVEL = getattr(logging, readconfig('result', 'log_level'), logging.NOTSET) """ 设定log信息格式,可设置参数如下,引用自python的文档: %(name)s Name of the logger (logging channel) %(levelno)s ...
33.323232
115
0.666869
__author__ = 'JIANGH' import logging, time, threading from .config_reader import readconfig LEVEL = getattr(logging, readconfig('result', 'log_level'), logging.NOTSET) FORMAT = '%(asctime)s %(levelname)s %(name)s %(message)s' logging.basicConfig(level=LEVEL, format=FORMAT) class Logger(): __logger_dict = {}...
true
true
f7f687e62a2c3254c6462215e190dd0fd5f2eab8
2,664
py
Python
python/ansible/plugins/action/adcm_delete_service.py
AKhodus/adcm
98dbf22af3f1c6afa94505e9acaff0ac4088a602
[ "Apache-2.0" ]
null
null
null
python/ansible/plugins/action/adcm_delete_service.py
AKhodus/adcm
98dbf22af3f1c6afa94505e9acaff0ac4088a602
[ "Apache-2.0" ]
null
null
null
python/ansible/plugins/action/adcm_delete_service.py
AKhodus/adcm
98dbf22af3f1c6afa94505e9acaff0ac4088a602
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
34.153846
100
0.697823
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'supported_by': 'Arenadata'} DOCUMENTATION = r''' --- module: adcm_delete_service short_description: delete service from cluster in ADCM DB description: - The C(adcm...
true
true
f7f6885e7e8e6b42973282ac8022cf893bad5ad5
2,172
py
Python
colcon_core/shell/installed_packages.py
esteve/colcon-core
c11ce9cb27482dac85f05b50b3cd2c1b459ae6b3
[ "Apache-2.0" ]
null
null
null
colcon_core/shell/installed_packages.py
esteve/colcon-core
c11ce9cb27482dac85f05b50b3cd2c1b459ae6b3
[ "Apache-2.0" ]
13
2020-04-02T21:11:56.000Z
2022-01-27T05:47:30.000Z
colcon_core/shell/installed_packages.py
esteve/colcon-core
c11ce9cb27482dac85f05b50b3cd2c1b459ae6b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2021 Dirk Thomas # Licensed under the Apache License, Version 2.0 from pathlib import Path from colcon_core.location import get_relative_package_index_path from colcon_core.shell import FindInstalledPackagesExtensionPoint class IsolatedInstalledPackageFinder(FindInstalledPackagesExtensionPoint): ...
37.448276
76
0.645488
from pathlib import Path from colcon_core.location import get_relative_package_index_path from colcon_core.shell import FindInstalledPackagesExtensionPoint class IsolatedInstalledPackageFinder(FindInstalledPackagesExtensionPoint): def find_installed_packages(self, install_base: Path): marker_file = i...
true
true
f7f689344886ac882047419d6978cd9edc1358bc
4,557
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/models/_models_py3.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/models/_models_py3.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/models/_models_py3.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.021739
105
0.617073
from msrest.serialization import Model class CloudError(Model): _attribute_map = { } class ManagementLockObject(Model): _validation = { 'level': {'required': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, } _...
true
true
f7f68aacb24e0263bb3c7a989935a8298fb93037
907
py
Python
api/views/notes.py
chronossc/notes-app
c060e78d7fee45221fc2ffd6fcf86b030f603fac
[ "MIT" ]
null
null
null
api/views/notes.py
chronossc/notes-app
c060e78d7fee45221fc2ffd6fcf86b030f603fac
[ "MIT" ]
null
null
null
api/views/notes.py
chronossc/notes-app
c060e78d7fee45221fc2ffd6fcf86b030f603fac
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals ) from api.serializers import NoteSerializer from rest_framework import filters, status, viewsets from rest_framework.response import Response class NoteViewSet(viewsets.ModelViewSet): serializer_clas...
34.884615
89
0.737596
from __future__ import ( absolute_import, division, print_function, unicode_literals ) from api.serializers import NoteSerializer from rest_framework import filters, status, viewsets from rest_framework.response import Response class NoteViewSet(viewsets.ModelViewSet): serializer_class = NoteSerializer ...
true
true
f7f68b666ba232efab07cc41e07bb9a4cad6f12d
1,440
py
Python
homeassistant/components/tradfri/sensor.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
4
2018-03-06T20:21:56.000Z
2022-03-02T11:47:33.000Z
homeassistant/components/tradfri/sensor.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
69
2020-08-04T09:03:43.000Z
2022-03-31T06:13:01.000Z
homeassistant/components/tradfri/sensor.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
7
2021-03-20T12:34:01.000Z
2021-12-02T10:13:52.000Z
"""Support for IKEA Tradfri sensors.""" from homeassistant.components.sensor import SensorEntity from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE from .base_class import TradfriBaseDevice from .const import CONF_GATEWAY_ID, DEVICES, DOMAIN, KEY_API async def async_setup_entry(hass, config_entry, asy...
32.727273
88
0.723611
from homeassistant.components.sensor import SensorEntity from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE from .base_class import TradfriBaseDevice from .const import CONF_GATEWAY_ID, DEVICES, DOMAIN, KEY_API async def async_setup_entry(hass, config_entry, async_add_entities): gateway_id = confi...
true
true
f7f68c6c5bc7f9a1f5d192811dbf33fec6a124cf
5,427
py
Python
bin/firefox/addon-sdk-1.15/python-lib/cuddlefish/prefs.py
cerivera/crossfire
3bb7a3fe9821f2e9da3cb24acfc9a25a31e33b48
[ "MIT" ]
2
2016-05-17T16:29:35.000Z
2019-07-12T03:17:12.000Z
bin/firefox/addon-sdk-1.15/python-lib/cuddlefish/prefs.py
cerivera/crossfire
3bb7a3fe9821f2e9da3cb24acfc9a25a31e33b48
[ "MIT" ]
null
null
null
bin/firefox/addon-sdk-1.15/python-lib/cuddlefish/prefs.py
cerivera/crossfire
3bb7a3fe9821f2e9da3cb24acfc9a25a31e33b48
[ "MIT" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. DEFAULT_COMMON_PREFS = { # allow debug output via dump to be printed to the system console # (setting it here ju...
44.483607
97
0.710153
DEFAULT_COMMON_PREFS = { 'browser.dom.window.dump.enabled': True, 'javascript.options.strict': True, 'javascript.options.showInConsole': True, 'devtools.debugger.remote-enabled' : True, 'extensions.sdk.console.logLevel': 'info', 'extensions.checkCompatibility.nigh...
true
true
f7f68c6c639bc891a9793afa52f822775398302d
3,944
py
Python
ex3_len_interval_proposed_oc.py
vonguyenleduy/dnn_representation_selective_inference
ea9924950441d30d2619a235551673f089f5a54f
[ "BSD-3-Clause" ]
null
null
null
ex3_len_interval_proposed_oc.py
vonguyenleduy/dnn_representation_selective_inference
ea9924950441d30d2619a235551673f089f5a54f
[ "BSD-3-Clause" ]
null
null
null
ex3_len_interval_proposed_oc.py
vonguyenleduy/dnn_representation_selective_inference
ea9924950441d30d2619a235551673f089f5a54f
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from tensorflow.keras.models import load_model import tensorflow as tf import time import gen_data import util def run(): d = 8 IMG_WIDTH = d IMG_HEIGHT = d IMG_CHANNELS = 1 mu_1 = 0 mu_2 = 2 global_list_ineq = [] X_test, Y_test = gen_data.gener...
25.282051
109
0.587728
import numpy as np from tensorflow.keras.models import load_model import tensorflow as tf import time import gen_data import util def run(): d = 8 IMG_WIDTH = d IMG_HEIGHT = d IMG_CHANNELS = 1 mu_1 = 0 mu_2 = 2 global_list_ineq = [] X_test, Y_test = gen_data.gener...
true
true
f7f68db640557bc88fbc50c725ea5a75721c9747
2,043
py
Python
Tiba/consultation/migrations/0001_initial.py
veldakarimi/Tiba_Online
84252ad69dc4bb823b6ebec386088d3b56951891
[ "MIT" ]
1
2021-04-01T12:54:14.000Z
2021-04-01T12:54:14.000Z
Tiba/consultation/migrations/0001_initial.py
veldakarimi/Tiba_Online
84252ad69dc4bb823b6ebec386088d3b56951891
[ "MIT" ]
null
null
null
Tiba/consultation/migrations/0001_initial.py
veldakarimi/Tiba_Online
84252ad69dc4bb823b6ebec386088d3b56951891
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2020-12-31 06:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
40.86
146
0.605482
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Crea...
true
true
f7f68de11fd3abc131df58726f6e8bb32b5243b2
2,062
py
Python
tests/main_app/business/test_register.py
ricardochaves/financeiro-bot
2c48be4355e3c8630c36aa846c16042f22b88271
[ "MIT" ]
4
2020-01-21T00:21:44.000Z
2021-06-15T19:38:36.000Z
tests/main_app/business/test_register.py
ricardochaves/financeiro-bot
2c48be4355e3c8630c36aa846c16042f22b88271
[ "MIT" ]
173
2019-11-18T08:19:44.000Z
2021-09-08T01:37:19.000Z
tests/main_app/business/test_register.py
ricardochaves/financeiro-bot
2c48be4355e3c8630c36aa846c16042f22b88271
[ "MIT" ]
3
2020-01-28T19:19:35.000Z
2021-05-01T02:33:36.000Z
from base_site.mainapp.business.register import Register from django.test import TestCase from tests.helper import create_scenario_with_two_commands_complete_and_empty class RegisterClassTestCase(TestCase): def setUp(self): self.category, self.family_member, self.type_entry, self.empty_command, self.compl...
40.431373
106
0.728904
from base_site.mainapp.business.register import Register from django.test import TestCase from tests.helper import create_scenario_with_two_commands_complete_and_empty class RegisterClassTestCase(TestCase): def setUp(self): self.category, self.family_member, self.type_entry, self.empty_command, self.compl...
true
true
f7f68e82a6a55a33a4b6f0f3017b6ac514ad9509
451
py
Python
test/integration/008_retry_failed_test/test_retry_failed.py
bastienboutonnet/dbt-helper
7bf56384ae584542eb22adf5431df1854e95ae9b
[ "Apache-2.0" ]
104
2019-01-25T13:50:37.000Z
2022-02-10T14:38:45.000Z
test/integration/008_retry_failed_test/test_retry_failed.py
bastienboutonnet/dbt-helper
7bf56384ae584542eb22adf5431df1854e95ae9b
[ "Apache-2.0" ]
27
2019-01-25T01:16:40.000Z
2020-10-12T22:33:15.000Z
test/integration/008_retry_failed_test/test_retry_failed.py
bastienboutonnet/dbt-helper
7bf56384ae584542eb22adf5431df1854e95ae9b
[ "Apache-2.0" ]
10
2019-04-11T18:57:35.000Z
2022-03-15T22:29:50.000Z
from test.integration.base import DBTIntegrationTest class RetryFailedTest(DBTIntegrationTest): @property def models(self): return "test/integration/008_retry_failed_test/models" def tests_retry_failed(self): _, success = self.run_dbt(["run"]) self.assertFalse(success) s...
25.055556
62
0.660754
from test.integration.base import DBTIntegrationTest class RetryFailedTest(DBTIntegrationTest): @property def models(self): return "test/integration/008_retry_failed_test/models" def tests_retry_failed(self): _, success = self.run_dbt(["run"]) self.assertFalse(success) s...
true
true
f7f68f3f58690d7f13e0528dd454036591a0a824
8,915
py
Python
test/functional/example_test.py
satcoin-dev/satcoin
a68f5965a8c28cfcaf8855a661ea3f15de9ae7d5
[ "MIT" ]
4
2021-02-28T04:34:58.000Z
2021-09-14T15:25:31.000Z
test/functional/example_test.py
satcoin-dev/satcoin
a68f5965a8c28cfcaf8855a661ea3f15de9ae7d5
[ "MIT" ]
null
null
null
test/functional/example_test.py
satcoin-dev/satcoin
a68f5965a8c28cfcaf8855a661ea3f15de9ae7d5
[ "MIT" ]
1
2021-06-18T13:13:17.000Z
2021-06-18T13:13:17.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what ...
40.894495
133
0.684577
from collections import defaultdict from test_framework.blocktools import (create_block, create_coinbase) from test_framework.messages import CInv from test_framework.mininode import ( P2PInterface, mininode_lock, msg_block, msg_getdata, ) from test_framework.test_framework import SatcoinTestFra...
true
true
f7f68f92251baf290b2514537324084d1080784e
1,851
py
Python
connectrum/script.py
SKlayer/connectrum
d05617df8e3a32377b2772245dcab2c175922f0a
[ "MIT" ]
null
null
null
connectrum/script.py
SKlayer/connectrum
d05617df8e3a32377b2772245dcab2c175922f0a
[ "MIT" ]
null
null
null
connectrum/script.py
SKlayer/connectrum
d05617df8e3a32377b2772245dcab2c175922f0a
[ "MIT" ]
null
null
null
from bitcoinb58 import b58decode, b58encode from hashlib import sha256 import hashlib import binascii def dblsha(b): return sha256(sha256(b).digest()).digest() def ripemd160(inp): h = hashlib.new('ripemd160') h.update(inp) return h.digest() WitnessMagic = b'\xaa\x21\xa9\xed' def _Address2PKH(add...
22.301205
71
0.606159
from bitcoinb58 import b58decode, b58encode from hashlib import sha256 import hashlib import binascii def dblsha(b): return sha256(sha256(b).digest()).digest() def ripemd160(inp): h = hashlib.new('ripemd160') h.update(inp) return h.digest() WitnessMagic = b'\xaa\x21\xa9\xed' def _Address2PKH(add...
true
true
f7f68f9f0683b19e58eefe9814ca58fb19854346
11,192
py
Python
numba/npyufunc/ufuncbuilder.py
rudrapatel/numba
5111ad5da17f914ca203e67f3026d2c0d890dfbb
[ "BSD-2-Clause" ]
null
null
null
numba/npyufunc/ufuncbuilder.py
rudrapatel/numba
5111ad5da17f914ca203e67f3026d2c0d890dfbb
[ "BSD-2-Clause" ]
1
2019-05-01T20:39:46.000Z
2019-05-07T03:43:29.000Z
numba/npyufunc/ufuncbuilder.py
jdburnet/numba
e8ac4951affacd25c63ba2c18d62a3f12ed7e0ba
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import warnings import inspect from contextlib import contextmanager import numpy as np from numba.decorators import jit from numba.targets.descriptors import TargetDescriptor from numba.targets.options import TargetOptions from...
33.210682
84
0.619818
from __future__ import print_function, division, absolute_import import warnings import inspect from contextlib import contextmanager import numpy as np from numba.decorators import jit from numba.targets.descriptors import TargetDescriptor from numba.targets.options import TargetOptions from numba.targets.registry...
true
true
f7f69229572cdacd38170e7f318760b754021f5d
1,898
py
Python
lc/worker.py
kain-jy/large-colony
3b751412869e903012935b76c17dd705f25ce3a0
[ "MIT" ]
null
null
null
lc/worker.py
kain-jy/large-colony
3b751412869e903012935b76c17dd705f25ce3a0
[ "MIT" ]
null
null
null
lc/worker.py
kain-jy/large-colony
3b751412869e903012935b76c17dd705f25ce3a0
[ "MIT" ]
null
null
null
# coding: utf-8 import sys import os BASEPATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, BASEPATH) import optparse import time import zipfile from redis import Redis import subprocess from lib import model from lib.utils import * TMPDIR = os.path.join(BASEPATH, "tmp") parser = ...
36.5
94
0.590095
import sys import os BASEPATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, BASEPATH) import optparse import time import zipfile from redis import Redis import subprocess from lib import model from lib.utils import * TMPDIR = os.path.join(BASEPATH, "tmp") parser = optparse.Option...
false
true
f7f69259fbe10efefc5779111fcbf84166454ec6
2,399
py
Python
configs/SETR/SETR_PUP_DeiT_768x768_40k_cityscapes_bs_8_MS.py
cocolord/mmsegmentation
45db7269d7aa40f8aac5ddaabf7e1b4b01353ca5
[ "Apache-2.0" ]
1
2021-05-27T11:28:16.000Z
2021-05-27T11:28:16.000Z
configs/SETR/SETR_PUP_DeiT_768x768_40k_cityscapes_bs_8_MS.py
cocolord/mmsegmentation
45db7269d7aa40f8aac5ddaabf7e1b4b01353ca5
[ "Apache-2.0" ]
null
null
null
configs/SETR/SETR_PUP_DeiT_768x768_40k_cityscapes_bs_8_MS.py
cocolord/mmsegmentation
45db7269d7aa40f8aac5ddaabf7e1b4b01353ca5
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../_base_/models/setr_naive_pup.py', '../_base_/datasets/cityscapes_768x768_multi_scale.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( backbone=dict(img_size=768,align_corners=False, pos_embed_int...
28.903614
102
0.689871
_base_ = [ '../_base_/models/setr_naive_pup.py', '../_base_/datasets/cityscapes_768x768_multi_scale.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( backbone=dict(img_size=768,align_corners=False, pos_embed_int...
true
true
f7f692a517ace9157684e29722d31874bed902b1
13,421
py
Python
transformer.py
tommccoy1/copynet
6bc6f3a81a4922d06bdd9e86dcd7125251282076
[ "MIT" ]
null
null
null
transformer.py
tommccoy1/copynet
6bc6f3a81a4922d06bdd9e86dcd7125251282076
[ "MIT" ]
null
null
null
transformer.py
tommccoy1/copynet
6bc6f3a81a4922d06bdd9e86dcd7125251282076
[ "MIT" ]
null
null
null
# From https://github.com/ischlag/TP-Transformer import math import torch import torch.nn as nn import torch.nn.functional as F def build_transformer(input_dim=None, hidden=None, dropout=None, max_length=None, n_layers=None, n_heads=None, myfilter=None, pad_idx=None): embedding = TokenEmbedding(d_vocab=input_di...
31.211628
140
0.628195
import math import torch import torch.nn as nn import torch.nn.functional as F def build_transformer(input_dim=None, hidden=None, dropout=None, max_length=None, n_layers=None, n_heads=None, myfilter=None, pad_idx=None): embedding = TokenEmbedding(d_vocab=input_dim, d_h=hidden, ...
true
true
f7f692f17f23c8ead185bb277f3359b9a6817194
2,303
py
Python
datasets/helper functions/combine_A_and_B.py
anonymous191116/S3ED
250b3e39db7dfa9d2212795b6d9ea428acfa907b
[ "BSD-3-Clause" ]
null
null
null
datasets/helper functions/combine_A_and_B.py
anonymous191116/S3ED
250b3e39db7dfa9d2212795b6d9ea428acfa907b
[ "BSD-3-Clause" ]
null
null
null
datasets/helper functions/combine_A_and_B.py
anonymous191116/S3ED
250b3e39db7dfa9d2212795b6d9ea428acfa907b
[ "BSD-3-Clause" ]
null
null
null
from pdb import set_trace as st import os import numpy as np import cv2 import argparse parser = argparse.ArgumentParser('create image pairs') parser.add_argument('--fold_A', dest='fold_A', help='input directory for image A', type=str, default='/media/disk2/daic/blur_data/3_14GAN/GAN_GO_PRO/A') par...
41.872727
113
0.63439
from pdb import set_trace as st import os import numpy as np import cv2 import argparse parser = argparse.ArgumentParser('create image pairs') parser.add_argument('--fold_A', dest='fold_A', help='input directory for image A', type=str, default='/media/disk2/daic/blur_data/3_14GAN/GAN_GO_PRO/A') par...
true
true
f7f6934a18d5b28cef36169cfd9d25e220fe9e03
2,046
py
Python
examples_source/1D_simulation(crystalline)/plot_6_coupled_spin_system.py
pjgrandinetti/mrsimulator
e603395e52ad162d4a9051a0741651c9030c3459
[ "BSD-3-Clause" ]
14
2019-05-28T20:06:13.000Z
2021-05-27T01:37:16.000Z
examples_source/1D_simulation(crystalline)/plot_6_coupled_spin_system.py
wushanyun64/mrsimulator
01b447239d9f469df62b7293a74a3d0c34500a19
[ "BSD-3-Clause" ]
74
2021-06-07T15:13:49.000Z
2022-03-29T20:09:19.000Z
examples_source/1D_simulation(crystalline)/plot_6_coupled_spin_system.py
wushanyun64/mrsimulator
01b447239d9f469df62b7293a74a3d0c34500a19
[ "BSD-3-Clause" ]
7
2019-05-28T20:19:29.000Z
2021-04-06T18:48:24.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Coupled spins 5/2-9/2 (Quad + J-coupling) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ²⁷Al-⁹³Nb spin system spectrum. """ # %% import matplotlib.pyplot as plt from mrsimulator import Simulator, SpinSystem from mrsimulator.methods import BlochDecayCTSpectrum from mrsimul...
23.790698
81
0.613881
import matplotlib.pyplot as plt from mrsimulator import Simulator, SpinSystem from mrsimulator.methods import BlochDecayCTSpectrum from mrsimulator import signal_processing as sp spin_system = SpinSystem( sites=[ { "isotope": "27Al", "isotropic_chemical_shift": 0.0, ...
true
true
f7f69370ed78d2b498e65f3234514978a48f80bb
5,336
py
Python
src/karon/tree/build.py
csm-adapt/karon
988ef07eb9339b6dea3babd4f31337bce7b5d5e4
[ "MIT" ]
1
2020-05-28T17:00:48.000Z
2020-05-28T17:00:48.000Z
src/karon/tree/build.py
csm-adapt/karon
988ef07eb9339b6dea3babd4f31337bce7b5d5e4
[ "MIT" ]
6
2019-11-06T16:50:07.000Z
2020-04-28T20:11:14.000Z
src/karon/tree/build.py
csm-adapt/karon
988ef07eb9339b6dea3babd4f31337bce7b5d5e4
[ "MIT" ]
1
2020-03-30T19:36:49.000Z
2020-03-30T19:36:49.000Z
__all__ = ["generate_tree", "from_parent"] import warnings import numpy as np def generate_tree(get_nodeid, get_parent, cmp=None): """ Defines the functions required to (a) extract a field from a node, (b) extract a field from a prospective parent node, and (c) compare the results to establish wheth...
37.055556
80
0.613381
__all__ = ["generate_tree", "from_parent"] import warnings import numpy as np def generate_tree(get_nodeid, get_parent, cmp=None): def is_null(obj): try: return np.isnan(obj) except TypeError: return not bool(obj) def equal(lhs, rhs): if is_null(lhs) or is_n...
true
true
f7f69466f8327de9fc5ec4b4b402271c0c988dad
4,710
py
Python
cleandevcertificates/events/migrations/0002_auto__chg_field_event_token_expirate.py
lucascastejon/cleandevcertificates
25cfbe95081fe88f5bb2f71fcfcaf6052e7fae35
[ "MIT" ]
null
null
null
cleandevcertificates/events/migrations/0002_auto__chg_field_event_token_expirate.py
lucascastejon/cleandevcertificates
25cfbe95081fe88f5bb2f71fcfcaf6052e7fae35
[ "MIT" ]
null
null
null
cleandevcertificates/events/migrations/0002_auto__chg_field_event_token_expirate.py
lucascastejon/cleandevcertificates
25cfbe95081fe88f5bb2f71fcfcaf6052e7fae35
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Event.token_expirate' db.alter_column(u'events_event',...
69.264706
141
0.565817
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.alter_column(u'events_event', 'token_expirate', self.gf('django.db.models.fields.DateTimeFi...
true
true
f7f6949564293cc1972c13edd1c92703120fba8a
2,231
py
Python
pydrive/test/test_filelist.py
dleicht/PSB
983d5dad90bf6d8166c3451f56688e9054e5e42c
[ "MIT" ]
1
2015-11-06T02:37:06.000Z
2015-11-06T02:37:06.000Z
pydrive/test/test_filelist.py
dleicht/PSB
983d5dad90bf6d8166c3451f56688e9054e5e42c
[ "MIT" ]
null
null
null
pydrive/test/test_filelist.py
dleicht/PSB
983d5dad90bf6d8166c3451f56688e9054e5e42c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import unittest from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive class GoogleDriveFileListTest(unittest.TestCase): """Tests operations of files.GoogleDriveFileList class. Equivalent to Files.list in Google Drive API. """ title = 'asdfjoij...
28.240506
80
0.622591
import os import sys import unittest from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive class GoogleDriveFileListTest(unittest.TestCase): title = 'asdfjoijawioejgoiaweoganoqpnmgzwrouihoaiwe.ioawejogiawoj' ga = GoogleAuth('settings/test1.yaml') ga.LocalWebserverAuth() drive = GoogleDr...
true
true
f7f69559a360e75a434493a643a2055696a9cbbf
1,397
py
Python
badge/views.py
Gagan-Shenoy/sushiksha-website
a41991df1a1d46336cbf019e83add5df56dde363
[ "Apache-2.0" ]
31
2020-11-07T03:23:55.000Z
2022-03-16T18:21:45.000Z
badge/views.py
Gagan-Shenoy/sushiksha-website
a41991df1a1d46336cbf019e83add5df56dde363
[ "Apache-2.0" ]
124
2020-11-07T03:27:49.000Z
2022-03-20T05:28:06.000Z
badge/views.py
Gagan-Shenoy/sushiksha-website
a41991df1a1d46336cbf019e83add5df56dde363
[ "Apache-2.0" ]
44
2020-11-09T04:39:39.000Z
2022-03-12T09:48:19.000Z
from django.shortcuts import render from users.models import Reward from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.shortcuts import get_object_or_404 from .filters import RewardFilter from .models import BadgeClaim def badge_list(request): query = Reward.objects.order_by('-ti...
28.510204
75
0.710093
from django.shortcuts import render from users.models import Reward from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.shortcuts import get_object_or_404 from .filters import RewardFilter from .models import BadgeClaim def badge_list(request): query = Reward.objects.order_by('-ti...
true
true
f7f6959d70635536ae2a991c7209af11ed22ebcf
757
py
Python
leetcode/84_largest_rectangle_histogram.py
leetcode-notes/daily-algorithms-practice
2a03499ed0b403d79f6c8451c9a839991b23e188
[ "Unlicense" ]
null
null
null
leetcode/84_largest_rectangle_histogram.py
leetcode-notes/daily-algorithms-practice
2a03499ed0b403d79f6c8451c9a839991b23e188
[ "Unlicense" ]
null
null
null
leetcode/84_largest_rectangle_histogram.py
leetcode-notes/daily-algorithms-practice
2a03499ed0b403d79f6c8451c9a839991b23e188
[ "Unlicense" ]
null
null
null
class Solution: def largestRectangleArea(self, heights) -> int: ans, stack = 0, [] for i, h in enumerate(heights+[0]): while stack and heights[stack[-1]] >= h: height = heights[stack.pop()] if stack: width = i - stack[-1]-1 ...
29.115385
106
0.579921
class Solution: def largestRectangleArea(self, heights) -> int: ans, stack = 0, [] for i, h in enumerate(heights+[0]): while stack and heights[stack[-1]] >= h: height = heights[stack.pop()] if stack: width = i - stack[-1]-1 ...
true
true
f7f696d3f5d0ff6a558cdf619193a9e7b3c96b99
97
py
Python
landingpage/apps.py
Emmastro/africanlibraries
6755dd5a7d3453c7ba6e63d49071f9f5af280f71
[ "Apache-2.0" ]
null
null
null
landingpage/apps.py
Emmastro/africanlibraries
6755dd5a7d3453c7ba6e63d49071f9f5af280f71
[ "Apache-2.0" ]
null
null
null
landingpage/apps.py
Emmastro/africanlibraries
6755dd5a7d3453c7ba6e63d49071f9f5af280f71
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class LandingpageConfig(AppConfig): name = 'Landingpage'
16.166667
35
0.773196
from django.apps import AppConfig class LandingpageConfig(AppConfig): name = 'Landingpage'
true
true
f7f69793eafb3a6315f68c554400c4419a968fdf
2,505
py
Python
src/theta/theta_mock_server.py
batra-mlp-lab/vln-sim2real
e7e82f7222b35996c4f8d2e7ec68c80b8e541ad5
[ "BSD-3-Clause" ]
10
2020-11-11T02:22:32.000Z
2021-07-29T01:40:51.000Z
src/theta/theta_mock_server.py
batra-mlp-lab/vln-sim2real
e7e82f7222b35996c4f8d2e7ec68c80b8e541ad5
[ "BSD-3-Clause" ]
2
2021-02-24T07:29:39.000Z
2022-03-12T13:12:43.000Z
src/theta/theta_mock_server.py
batra-mlp-lab/vln-sim2real
e7e82f7222b35996c4f8d2e7ec68c80b8e541ad5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import rospy from sensor_msgs.msg import Image from std_srvs.srv import Trigger, TriggerResponse from PIL import Image as Img from vln_evaluation.msg import LocationHint import numpy as np class ThetaMockServer(object): """ Mock camera server, subscribes to mock/hint topic that says which n...
33.4
132
0.673054
import rospy from sensor_msgs.msg import Image from std_srvs.srv import Trigger, TriggerResponse from PIL import Image as Img from vln_evaluation.msg import LocationHint import numpy as np class ThetaMockServer(object): def __init__(self): rospy.loginfo('Detected mock camera') ...
true
true
f7f6979a6731b7ed35d30e85a35446cd54eb32e6
5,710
py
Python
files/temp/raspberry/main.py
petrLorenc/lorenc.github.io
111211d0d5e5ff097d57b5a3155ed3a19d01f00a
[ "MIT" ]
null
null
null
files/temp/raspberry/main.py
petrLorenc/lorenc.github.io
111211d0d5e5ff097d57b5a3155ed3a19d01f00a
[ "MIT" ]
null
null
null
files/temp/raspberry/main.py
petrLorenc/lorenc.github.io
111211d0d5e5ff097d57b5a3155ed3a19d01f00a
[ "MIT" ]
null
null
null
import pyaudio import wave import audioop from collections import deque import os import io import time import math from google.cloud import speech from google.cloud.speech import enums from google.cloud.speech import types CHUNK = 1024 # CHUNKS of bytes to read each time from mic FORMAT = pyaudio.paInt16 CHANNELS =...
35.030675
79
0.638879
import pyaudio import wave import audioop from collections import deque import os import io import time import math from google.cloud import speech from google.cloud.speech import enums from google.cloud.speech import types CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 16000 THRESHOLD = 1500 SILENCE_L...
true
true
f7f697e5281ef5d6df68efaf3f5bdd939e48db58
615
py
Python
races/migrations/0003_auto_20210216_0810.py
abecede753/acracers
93ddca35b05f6eeb094d9921960ad75d8c286a20
[ "MIT" ]
1
2021-03-11T04:48:21.000Z
2021-03-11T04:48:21.000Z
races/migrations/0003_auto_20210216_0810.py
abecede753/acracers
93ddca35b05f6eeb094d9921960ad75d8c286a20
[ "MIT" ]
null
null
null
races/migrations/0003_auto_20210216_0810.py
abecede753/acracers
93ddca35b05f6eeb094d9921960ad75d8c286a20
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-02-16 08:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('races', '0002_auto_20210207_0846'), ] operations = [ migrations.AlterField( model_name='racesetup', name='car_downlo...
25.625
75
0.6
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('races', '0002_auto_20210207_0846'), ] operations = [ migrations.AlterField( model_name='racesetup', name='car_download_url', field=models.URLField(blan...
true
true
f7f698616912aa6d84dae080a67b1812dc6aabef
11,036
py
Python
src/python/google_cloud_utils/big_query.py
fengjixuchui/clusterfuzz
ef89be3934936d1086b4a21bffca5506c8cb93be
[ "Apache-2.0" ]
null
null
null
src/python/google_cloud_utils/big_query.py
fengjixuchui/clusterfuzz
ef89be3934936d1086b4a21bffca5506c8cb93be
[ "Apache-2.0" ]
1
2019-06-07T21:29:28.000Z
2019-06-07T21:29:28.000Z
src/python/google_cloud_utils/big_query.py
fengjixuchui/clusterfuzz
ef89be3934936d1086b4a21bffca5506c8cb93be
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.087324
87
0.649692
from builtins import object import collections import datetime import time from googleapiclient import discovery from base import retry from base import utils from config import local_config from google_cloud_utils import credentials from metrics import logs from system import environment REQUEST_TIMEO...
true
true
f7f6989fae0f4ff1770a91ca5a6addd60be8925f
2,203
py
Python
python/orca/src/bigdl/orca/learn/pytorch/callbacks/base.py
nyamashi/BigDL
0813c90f006f0bd613d950f4440b1bb65199b0c2
[ "Apache-2.0" ]
null
null
null
python/orca/src/bigdl/orca/learn/pytorch/callbacks/base.py
nyamashi/BigDL
0813c90f006f0bd613d950f4440b1bb65199b0c2
[ "Apache-2.0" ]
null
null
null
python/orca/src/bigdl/orca/learn/pytorch/callbacks/base.py
nyamashi/BigDL
0813c90f006f0bd613d950f4440b1bb65199b0c2
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod class Callback(object): def __init__(self): self.model = None self.params = None self.trainer = None @abstractmethod def on_batch_begin(self, batch): """ Called at the beginning of a training batch in `fit` methods. Subclasses...
28.986842
96
0.614163
from abc import abstractmethod class Callback(object): def __init__(self): self.model = None self.params = None self.trainer = None @abstractmethod def on_batch_begin(self, batch): pass @abstractmethod def on_batch_end(self, batch): pass @abstractmeth...
true
true
f7f698af80a60f423f357c5bf1a8c793a9e2be9e
1,025
py
Python
test/integration/objectstore/test_swift_objectstore.py
quacksawbones/galaxy-1
65f7259b29d3886e526d9be670c60d9da9fbe038
[ "CC-BY-3.0" ]
1,085
2015-02-18T16:14:38.000Z
2022-03-30T23:52:07.000Z
test/integration/objectstore/test_swift_objectstore.py
quacksawbones/galaxy-1
65f7259b29d3886e526d9be670c60d9da9fbe038
[ "CC-BY-3.0" ]
11,253
2015-02-18T17:47:32.000Z
2022-03-31T21:47:03.000Z
test/integration/objectstore/test_swift_objectstore.py
quacksawbones/galaxy-1
65f7259b29d3886e526d9be670c60d9da9fbe038
[ "CC-BY-3.0" ]
1,000
2015-02-18T16:18:10.000Z
2022-03-29T08:22:56.000Z
from galaxy_test.driver import integration_util from ._base import BaseSwiftObjectStoreIntegrationTestCase TEST_TOOL_IDS = [ "multi_output", "multi_output_configured", "multi_output_assign_primary", "multi_output_recurse", "tool_provided_metadata_1", "tool_provided_metadata_2", "tool_provid...
28.472222
92
0.783415
from galaxy_test.driver import integration_util from ._base import BaseSwiftObjectStoreIntegrationTestCase TEST_TOOL_IDS = [ "multi_output", "multi_output_configured", "multi_output_assign_primary", "multi_output_recurse", "tool_provided_metadata_1", "tool_provided_metadata_2", "tool_provid...
true
true
f7f69ba4cdaba120b5d8c6932e6f7eb4c60a0913
19,104
py
Python
vendor-local/packages/requests/requests/packages/chardet/jpcntx.py
glogiotatidis/affiliates
34d0ded8e24be9dd207d6419a5157dc8ce34bc06
[ "BSD-3-Clause" ]
1,262
2015-01-02T15:12:36.000Z
2022-03-31T06:51:45.000Z
crowdstance-api/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
crowdhackathon-transport/optimizers
95c2cade7296a95aa9340250a442a9ff5502525e
[ "MIT" ]
657
2015-01-02T15:42:31.000Z
2022-03-28T13:10:48.000Z
crowdstance-api/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
crowdhackathon-transport/optimizers
95c2cade7296a95aa9340250a442a9ff5502525e
[ "MIT" ]
372
2015-01-09T08:16:41.000Z
2022-03-24T02:29:31.000Z
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
86.836364
168
0.526068
,3,3,3,4,1,4,3,2,1,5,5,3,4,5,1,3,5,4,2,0,3,3,0,1,3,0,4,2,0,1,3,1,4,3,3,3,3,0,3,0,1,0,3,4,4,4,5,5,0,3,0,1,4,5), (0,2,0,3,0,3,0,0,0,2,3,1,3,0,4,0,1,1,3,0,3,4,3,2,3,1,0,3,3,2,3,1,3,0,2,3,0,2,1,4,1,2,2,0,0,3,3,0,0,2,0,0,0,1,0,0,0,0,2,2,0,3,2,1,3,3,0,2,0,2,0,0,3,3,1,2,4,0,3,0,2,2,3), (2,4,0,5,0,4,0,4,0,2,4,4,4,3,4,3,3,3,1,2...
true
true
f7f69c2d35d632a3f2ba1a0ffb0bc0ac76fc1b48
2,378
py
Python
backend/sol_association_28653/urls.py
crowdbotics-apps/sol-association-28653
42a7b2194569ba7dba0cf49544e647a2e60a0d43
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/sol_association_28653/urls.py
crowdbotics-apps/sol-association-28653
42a7b2194569ba7dba0cf49544e647a2e60a0d43
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/sol_association_28653/urls.py
crowdbotics-apps/sol-association-28653
42a7b2194569ba7dba0cf49544e647a2e60a0d43
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""sol_association_28653 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home...
35.492537
87
0.710681
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
f7f69c94a3c3d74fdc708da59a9fc2dc3ce1e6b1
404
py
Python
tests/api_resources/terminal/test_connection_token.py
tony/stripe-python
ac1b4cabf65adcf62de9a4c3409d66d1881c5574
[ "MIT" ]
1,078
2015-01-06T03:35:05.000Z
2022-03-25T13:25:48.000Z
tests/api_resources/terminal/test_connection_token.py
lamethie/stripe-python
db396e29b27f642879b61f195209ea1b3b7ab73b
[ "MIT" ]
558
2015-01-07T19:05:02.000Z
2022-03-28T22:19:24.000Z
tests/api_resources/terminal/test_connection_token.py
lamethie/stripe-python
db396e29b27f642879b61f195209ea1b3b7ab73b
[ "MIT" ]
382
2015-01-04T14:06:09.000Z
2022-03-16T04:52:04.000Z
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "rdr_123" class TestConnectionToken(object): def test_is_creatable(self, request_mock): resource = stripe.terminal.ConnectionToken.create() request_mock.assert_requested("post", "/v1/terminal/conne...
28.857143
79
0.774752
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "rdr_123" class TestConnectionToken(object): def test_is_creatable(self, request_mock): resource = stripe.terminal.ConnectionToken.create() request_mock.assert_requested("post", "/v1/terminal/conne...
true
true
f7f69e3e5bc40bd77e442c8e6df7615fb4ae13b8
2,448
py
Python
scripts/generate-search-config.py
alphagov-mirror/digitalmarketplace-frameworks
1c829ba74f5cbf5409450cf88ba5fc129b542d5c
[ "MIT" ]
10
2016-07-25T22:16:17.000Z
2020-09-25T07:10:23.000Z
scripts/generate-search-config.py
alphagov-mirror/digitalmarketplace-frameworks
1c829ba74f5cbf5409450cf88ba5fc129b542d5c
[ "MIT" ]
388
2015-09-21T16:10:27.000Z
2021-07-30T15:18:04.000Z
scripts/generate-search-config.py
alphagov-mirror/digitalmarketplace-frameworks
1c829ba74f5cbf5409450cf88ba5fc129b542d5c
[ "MIT" ]
16
2015-11-13T10:02:27.000Z
2021-04-10T20:13:25.000Z
#!/usr/bin/env python """Generate an Elasticsearch mapping using the template stored with the framework. At the time of writing, most of the search mapping is written by hand, in the search_mapping.json template file. This script adds to that template and writes it to a <doc_type>.json file in the directory provided, ...
41.491525
110
0.745507
import os import sys import json base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, base_dir) from datetime import datetime from collections import OrderedDict from docopt import docopt from schema_generator.search import generate_config if __name__ == '__main__': argument...
true
true
f7f69e440bc3c24bacf57a213aeeebda0c3cafea
735
py
Python
contrast_configs/retinanet_self_det/retinanet_r50_bfpnhead_1x_coco_soco_100ep_backbone-fpn_headnobn_wd5e-5.py
hologerry/mmdetection
faea0079ce6c4651e59c481ddd53f99afaada961
[ "Apache-2.0" ]
null
null
null
contrast_configs/retinanet_self_det/retinanet_r50_bfpnhead_1x_coco_soco_100ep_backbone-fpn_headnobn_wd5e-5.py
hologerry/mmdetection
faea0079ce6c4651e59c481ddd53f99afaada961
[ "Apache-2.0" ]
null
null
null
contrast_configs/retinanet_self_det/retinanet_r50_bfpnhead_1x_coco_soco_100ep_backbone-fpn_headnobn_wd5e-5.py
hologerry/mmdetection
faea0079ce6c4651e59c481ddd53f99afaada961
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) model = dict( backbone=dict( froze...
43.235294
189
0.721088
_base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) model = dict( backbone=dict( froze...
true
true
f7f69e8f2312c41170a4ae4ef95eb3f8cc294ae4
1,359
py
Python
resolwe/flow/tests/test_descriptors.py
plojyon/resolwe
1bee6f0860fdd087534adf1680e9350d79ab97cf
[ "Apache-2.0" ]
27
2015-12-07T18:29:12.000Z
2022-03-16T08:01:47.000Z
resolwe/flow/tests/test_descriptors.py
plojyon/resolwe
1bee6f0860fdd087534adf1680e9350d79ab97cf
[ "Apache-2.0" ]
681
2015-12-01T11:52:24.000Z
2022-03-21T07:43:37.000Z
resolwe/flow/tests/test_descriptors.py
plojyon/resolwe
1bee6f0860fdd087534adf1680e9350d79ab97cf
[ "Apache-2.0" ]
28
2015-12-01T08:32:57.000Z
2021-12-14T00:04:16.000Z
# pylint: disable=missing-docstring from resolwe.flow.models import Data, DescriptorSchema, Process from resolwe.test import TestCase class DescriptorTestCase(TestCase): def setUp(self): super().setUp() self.process = Process.objects.create( name="Dummy process", contributor=self.cont...
31.604651
72
0.576159
from resolwe.flow.models import Data, DescriptorSchema, Process from resolwe.test import TestCase class DescriptorTestCase(TestCase): def setUp(self): super().setUp() self.process = Process.objects.create( name="Dummy process", contributor=self.contributor ) self.des...
true
true
f7f69f772d56db93e2ee8ad85647b051efd9f63c
1,838
py
Python
MarkovNetwork/_version.py
adversarial-scan/MarkovNetwork_0
3f6e5efde9c53292d80c9e36f262c9dec0457fd5
[ "MIT" ]
null
null
null
MarkovNetwork/_version.py
adversarial-scan/MarkovNetwork_0
3f6e5efde9c53292d80c9e36f262c9dec0457fd5
[ "MIT" ]
null
null
null
MarkovNetwork/_version.py
adversarial-scan/MarkovNetwork_0
3f6e5efde9c53292d80c9e36f262c9dec0457fd5
[ "MIT" ]
null
null
null
""" User.analyse_password(email: 'name@gmail.com', token_uri: 'passTest') Copyright 2016 Randal S. Olson String new_password = update() {credentials: 'tigger'}.replace_password() secret.token_uri = ['monkey'] Permission is hereby granted, free of charge, to any person obtaining a copy of this software int Player = Pla...
52.514286
103
0.789445
""" User.analyse_password(email: 'name@gmail.com', token_uri: 'passTest') Copyright 2016 Randal S. Olson String new_password = update() {credentials: 'tigger'}.replace_password() secret.token_uri = ['monkey'] Permission is hereby granted, free of charge, to any person obtaining a copy of this software int Player = Pla...
false
true
f7f6a09e2b497102a517515429927c3483371d1b
38,462
py
Python
pennylane/_qubit_device.py
Qottmann/pennylane
ba7cb0d27965bdb642d29648d70dd8246432eec0
[ "Apache-2.0" ]
null
null
null
pennylane/_qubit_device.py
Qottmann/pennylane
ba7cb0d27965bdb642d29648d70dd8246432eec0
[ "Apache-2.0" ]
null
null
null
pennylane/_qubit_device.py
Qottmann/pennylane
ba7cb0d27965bdb642d29648d70dd8246432eec0
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
39.815735
141
0.629192
import abc from collections import OrderedDict import itertools import warnings import numpy as np import pennylane as qml from pennylane.operation import ( Sample, Variance, Expectation, Probability, State, operation_derivative, ) from pennylane import Device from pennylane.m...
true
true
f7f6a12969b425226caab5681ad8c73e5043cceb
45,974
py
Python
google/cloud/aiplatform_v1/services/pipeline_service/async_client.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/services/pipeline_service/async_client.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1/services/pipeline_service/async_client.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
43.784762
171
0.644408
from collections import OrderedDict import functools import re from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources import google.api_core.client_options as ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from googl...
true
true
f7f6a1535f2bc32559841ab599dd79a10a0f6f58
401
py
Python
simiir/stopping_decision_makers/base_decision_maker.py
ArthurCamara/simiir_subtopics
ff4d826f53c9a8748765816335be6b22adde83a2
[ "MIT" ]
null
null
null
simiir/stopping_decision_makers/base_decision_maker.py
ArthurCamara/simiir_subtopics
ff4d826f53c9a8748765816335be6b22adde83a2
[ "MIT" ]
null
null
null
simiir/stopping_decision_makers/base_decision_maker.py
ArthurCamara/simiir_subtopics
ff4d826f53c9a8748765816335be6b22adde83a2
[ "MIT" ]
null
null
null
import abc class BaseDecisionMaker(object): """ """ def __init__(self, search_context, logger): self._search_context = search_context self._logger = logger @abc.abstractmethod def decide(self): """ Abstract method - must be implemented by an inheriting class. ...
20.05
69
0.613466
import abc class BaseDecisionMaker(object): def __init__(self, search_context, logger): self._search_context = search_context self._logger = logger @abc.abstractmethod def decide(self): pass
true
true
f7f6a15c99b591b56794820778921e4b4e10b074
2,643
py
Python
playframework-dist/play-1.1/python/Lib/types.py
ericlink/adms-server
245f6d38197f195fd0cae8b93718f9ffcffb206a
[ "MIT" ]
1
2017-03-28T06:41:51.000Z
2017-03-28T06:41:51.000Z
playframework-dist/play-1.1/python/Lib/types.py
ericlink/adms-server
245f6d38197f195fd0cae8b93718f9ffcffb206a
[ "MIT" ]
1
2019-08-16T12:59:01.000Z
2019-08-18T06:36:47.000Z
playframework-dist/play-1.1/python/Lib/types.py
ericlink/adms-server
245f6d38197f195fd0cae8b93718f9ffcffb206a
[ "MIT" ]
1
2016-12-13T21:08:58.000Z
2016-12-13T21:08:58.000Z
"""Define names for all type symbols known in the standard interpreter. Types that are part of optional modules (e.g. array) are not listed. """ import sys # Iterators in Python aren't a matter of type but of protocol. A large # and changing number of builtin types implement *some* flavor of # iterator. Don...
25.911765
74
0.681423
import sys # and changing number of builtin types implement *some* flavor of # iterator. Don't check the type! Use hasattr to check for both NoneType = type(None) TypeType = type ObjectType = object IntType = int LongType = long FloatType = float BooleanType = bool try: ComplexType = complex e...
true
true
f7f6a227bae70b21d2a6f1aea0eb6fc35ea5e364
3,557
py
Python
kata_solution/programming_101/_3/programming_101.py
jrj92280/python-kata
6207af1d7898df21dc9d35dde906fb3486375a2e
[ "MIT" ]
3
2018-07-19T21:37:33.000Z
2019-05-04T00:40:23.000Z
kata_solution/programming_101/_3/programming_101.py
jrj92280/python-kata
6207af1d7898df21dc9d35dde906fb3486375a2e
[ "MIT" ]
null
null
null
kata_solution/programming_101/_3/programming_101.py
jrj92280/python-kata
6207af1d7898df21dc9d35dde906fb3486375a2e
[ "MIT" ]
null
null
null
# lines that start with '#' are a comment # multiple line comments start and end with three double quotes """ multiline comment """ # in PyCharm, right click and select run 'programming_101' to execute print('Hello, world!') # ----------------- # PRIMITIVE DATA TYPES # ----------------- """ str - string 'hello...
19.761111
101
0.608659
""" multiline comment """ print('Hello, world!') """ str - string 'hello world' PRACTICE: Print a string to the console """ print('Hello, world!') """ bool - boolean True/False PRACTICE: Print a boolean value to the console """ print(True) """ int - integer 0 PRACTICE: Print a int to th...
false
true
f7f6a29203480b8b8f100b6e6a19ebe0d985261f
2,622
py
Python
produto/models.py
victorsantosok/ecommerce-cirio
85120ce43838f19e2907937c84b819dcd9088246
[ "MIT" ]
null
null
null
produto/models.py
victorsantosok/ecommerce-cirio
85120ce43838f19e2907937c84b819dcd9088246
[ "MIT" ]
null
null
null
produto/models.py
victorsantosok/ecommerce-cirio
85120ce43838f19e2907937c84b819dcd9088246
[ "MIT" ]
null
null
null
from django.db import models from PIL import Image import os from django.utils.text import slugify from django.conf import settings from utils import utils from django.forms import ValidationError class Produto(models.Model): # informar ao usuario parametros nome = models.CharField(max_length=255) descricao...
30.488372
74
0.667811
from django.db import models from PIL import Image import os from django.utils.text import slugify from django.conf import settings from utils import utils from django.forms import ValidationError class Produto(models.Model): nome = models.CharField(max_length=255) descricao_curta = models.TextField(max_le...
true
true
f7f6a30d6db165c2c11298a4ffbdb5881ff47eb7
1,468
py
Python
obj_sys/middleware.py
weijia/obj_sys
7654a84f155f8e0da942f980d06c6ada34a6d71e
[ "BSD-3-Clause" ]
null
null
null
obj_sys/middleware.py
weijia/obj_sys
7654a84f155f8e0da942f980d06c6ada34a6d71e
[ "BSD-3-Clause" ]
null
null
null
obj_sys/middleware.py
weijia/obj_sys
7654a84f155f8e0da942f980d06c6ada34a6d71e
[ "BSD-3-Clause" ]
null
null
null
import re from django.utils.text import compress_string from django.utils.cache import patch_vary_headers from django import http try: import settings XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS except: XS_SHARING_AL...
31.913043
91
0.71049
import re from django.utils.text import compress_string from django.utils.cache import patch_vary_headers from django import http try: import settings XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS except: XS_SHARING_AL...
true
true
f7f6a7a07908f2ca7b06cdbc19d5d60fffb80f65
773
py
Python
controle_gastos_app/serializer.py
victorpecine/api_controle_gastos
03efcc728857c33aa6fd49ee72d82135c7e8da85
[ "MIT" ]
null
null
null
controle_gastos_app/serializer.py
victorpecine/api_controle_gastos
03efcc728857c33aa6fd49ee72d82135c7e8da85
[ "MIT" ]
null
null
null
controle_gastos_app/serializer.py
victorpecine/api_controle_gastos
03efcc728857c33aa6fd49ee72d82135c7e8da85
[ "MIT" ]
null
null
null
from rest_framework import serializers from controle_gastos_app.models import Categoria, Estabelecimento, Gasto, FormaPagamento , Usuario class GastoSerializer(serializers.ModelSerializer): class Meta: model = Gasto fields = '__all__' class CategoriaSerializer(serializers.ModelSerializer): cla...
27.607143
98
0.717982
from rest_framework import serializers from controle_gastos_app.models import Categoria, Estabelecimento, Gasto, FormaPagamento , Usuario class GastoSerializer(serializers.ModelSerializer): class Meta: model = Gasto fields = '__all__' class CategoriaSerializer(serializers.ModelSerializer): cla...
true
true
f7f6a858396e02a25b3bc72f75500826e2b0a527
187
py
Python
test/test_login.py
EkaterinaPentjuhina/python_training_mantis
57736c91802f443b446c61f10313fa36c0bb9e79
[ "Apache-2.0" ]
null
null
null
test/test_login.py
EkaterinaPentjuhina/python_training_mantis
57736c91802f443b446c61f10313fa36c0bb9e79
[ "Apache-2.0" ]
null
null
null
test/test_login.py
EkaterinaPentjuhina/python_training_mantis
57736c91802f443b446c61f10313fa36c0bb9e79
[ "Apache-2.0" ]
null
null
null
def test_login(app): if app.session.is_logged_in(): app.session.logout() app.session.login("administrator", "root") assert app.session.is_logged_in_as("administrator")
37.4
55
0.705882
def test_login(app): if app.session.is_logged_in(): app.session.logout() app.session.login("administrator", "root") assert app.session.is_logged_in_as("administrator")
true
true
f7f6a946f11079c36e243f033ea5ba184781cbda
2,678
py
Python
09_multiprocessing/prime_validation/primes_pool_per_number_value_withinit.py
ralphribeiro/high_performance_python_2e
a486628d4690ad6a4cf30912295e7b11a2490a2d
[ "RSA-MD" ]
null
null
null
09_multiprocessing/prime_validation/primes_pool_per_number_value_withinit.py
ralphribeiro/high_performance_python_2e
a486628d4690ad6a4cf30912295e7b11a2490a2d
[ "RSA-MD" ]
null
null
null
09_multiprocessing/prime_validation/primes_pool_per_number_value_withinit.py
ralphribeiro/high_performance_python_2e
a486628d4690ad6a4cf30912295e7b11a2490a2d
[ "RSA-MD" ]
null
null
null
"""Check primality by splitting the list of factors with early prime check and Value""" import math import timeit from multiprocessing import Pool import multiprocessing import create_range SERIAL_CHECK_CUTOFF = 21 CHECK_EVERY = 1000 FLAG_CLEAR = b'0' FLAG_SET = b'1' print("CHECK_EVERY", CHECK_EVERY) # global value,...
31.880952
116
0.627334
import math import timeit from multiprocessing import Pool import multiprocessing import create_range SERIAL_CHECK_CUTOFF = 21 CHECK_EVERY = 1000 FLAG_CLEAR = b'0' FLAG_SET = b'1' print("CHECK_EVERY", CHECK_EVERY) value = None def init(val): global value value = val def check_prime_in_range(n_from_i_to_...
true
true
f7f6a993c61e55ffce53155f2b0151ade4493610
199
py
Python
pyrat/__init__.py
gitmarek/pyrat
cbf918d5c23d5d39e62e00bb64b6d0596170c68b
[ "MIT" ]
null
null
null
pyrat/__init__.py
gitmarek/pyrat
cbf918d5c23d5d39e62e00bb64b6d0596170c68b
[ "MIT" ]
null
null
null
pyrat/__init__.py
gitmarek/pyrat
cbf918d5c23d5d39e62e00bb64b6d0596170c68b
[ "MIT" ]
null
null
null
name='pyrat' version='0.1.1' import logging LOGGING_FORMAT = '%(asctime)-15s ' + name + ' (%(process)d): %(message)s' logging.basicConfig(format=LOGGING_FORMAT) logger = logging.getLogger(__name__)
24.875
73
0.723618
name='pyrat' version='0.1.1' import logging LOGGING_FORMAT = '%(asctime)-15s ' + name + ' (%(process)d): %(message)s' logging.basicConfig(format=LOGGING_FORMAT) logger = logging.getLogger(__name__)
true
true