hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7332ca069aa2e3e5a2ab0ac6b6ea50d6e8f261c
1,712
py
Python
gibolt/__init__.py
Kozea/gibolt
5af60ada3f611aba3d6a25d61cf060c8f71351eb
[ "MIT" ]
6
2015-04-10T21:30:41.000Z
2021-05-03T21:10:44.000Z
gibolt/__init__.py
Kozea/gibolt
5af60ada3f611aba3d6a25d61cf060c8f71351eb
[ "MIT" ]
138
2015-04-08T09:55:55.000Z
2021-07-27T09:41:37.000Z
gibolt/__init__.py
Kozea/gibolt
5af60ada3f611aba3d6a25d61cf060c8f71351eb
[ "MIT" ]
2
2015-11-01T19:05:48.000Z
2019-04-23T13:00:50.000Z
import os from datetime import datetime from urllib.parse import urlparse from flask import Flask from flask_github import GitHub from markdown2 import markdown as from_markdown from markupsafe import Markup from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker app = Flask(__name__) app.config....
23.135135
78
0.665304
import os from datetime import datetime from urllib.parse import urlparse from flask import Flask from flask_github import GitHub from markdown2 import markdown as from_markdown from markupsafe import Markup from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker app = Flask(__name__) app.config....
true
true
f7332de8f6f8e0ed99eebc5c1512fa34ac1039b2
899
py
Python
numba/cuda/simulator/cudadrv/driver.py
seberg/numba
e617b39a0b4b23d7b69d16f482fd66b4ac6cc307
[ "BSD-2-Clause" ]
6,620
2015-01-04T08:51:04.000Z
2022-03-31T12:52:18.000Z
numba/cuda/simulator/cudadrv/driver.py
Copastr/numba
3884e95bdec70c385291bec820beecc5ab64933a
[ "BSD-2-Clause" ]
6,457
2015-01-04T03:18:41.000Z
2022-03-31T17:38:42.000Z
numba/cuda/simulator/cudadrv/driver.py
Copastr/numba
3884e95bdec70c385291bec820beecc5ab64933a
[ "BSD-2-Clause" ]
930
2015-01-25T02:33:03.000Z
2022-03-30T14:10:32.000Z
''' Most of the driver API is unsupported in the simulator, but some stubs are provided to allow tests to import correctly. ''' def device_memset(dst, val, size, stream=0): dst.view('u1')[:size].fill(bytes([val])[0]) def host_to_device(dst, src, size, stream=0): dst.view('u1')[:size] = src.view('u1')[:size]...
18.729167
74
0.695217
def device_memset(dst, val, size, stream=0): dst.view('u1')[:size].fill(bytes([val])[0]) def host_to_device(dst, src, size, stream=0): dst.view('u1')[:size] = src.view('u1')[:size] def device_to_host(dst, src, size, stream=0): host_to_device(dst, src, size) def device_memory_size(obj): return ob...
true
true
f7332fce6cf86af2864f93388297a3b7768884fa
985
py
Python
testreport/migrations/0031_extuser.py
mikiec84/badger-api
d0764fa0fd35ebfd7581e2a0218b59be9d13e814
[ "MIT" ]
null
null
null
testreport/migrations/0031_extuser.py
mikiec84/badger-api
d0764fa0fd35ebfd7581e2a0218b59be9d13e814
[ "MIT" ]
2
2021-03-19T23:41:57.000Z
2021-06-10T23:08:34.000Z
testreport/migrations/0031_extuser.py
gaybro8777/badger-api
d0764fa0fd35ebfd7581e2a0218b59be9d13e814
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('testreport', '0030_launch_duration'), ...
32.833333
114
0.610152
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('testreport', '0030_launch_duration'), ] operations = [ ...
true
true
f7333015fa83373d779a8e1eebc2dbe56322417d
167
py
Python
Python Pattern Programs/Symbol Patterns/Pattern 60.py
trial1user/Printing-Pattern-Programs
dde29e056b8e067fb3a824edb7ecb7dd9c9a776a
[ "MIT" ]
61
2021-01-07T03:56:25.000Z
2022-02-26T14:39:52.000Z
PythonPatternPrograms/SymbolPatterns/Pattern 60.py
Ankur-586/Printing-Pattern-Programs
33e534ed66a02705e6cd6bc1992d4818a44d1b6b
[ "MIT" ]
51
2020-12-25T17:06:26.000Z
2021-05-07T12:52:56.000Z
PythonPatternPrograms/SymbolPatterns/Pattern 60.py
Ankur-586/Printing-Pattern-Programs
33e534ed66a02705e6cd6bc1992d4818a44d1b6b
[ "MIT" ]
13
2021-01-07T09:50:21.000Z
2021-12-17T11:03:57.000Z
n = 5 for x in range(n, 0, -1): for y in range(n, 0, -1): if y > x: print("*", end=" ") else: print(x, end=" ") print()
20.875
31
0.359281
n = 5 for x in range(n, 0, -1): for y in range(n, 0, -1): if y > x: print("*", end=" ") else: print(x, end=" ") print()
true
true
f73330b38cff9d80573d59c85199da641ef2fb6b
114
py
Python
code_gazay/lenin/lenin/transforms.py
artyompal/kaggle_salt
3c323755730745ac7bbfd106f1f20919cceef0ee
[ "MIT" ]
null
null
null
code_gazay/lenin/lenin/transforms.py
artyompal/kaggle_salt
3c323755730745ac7bbfd106f1f20919cceef0ee
[ "MIT" ]
1
2021-03-25T23:31:26.000Z
2021-03-25T23:31:28.000Z
code_gazay/lenin/lenin/transforms.py
artyompal/kaggle_salt
3c323755730745ac7bbfd106f1f20919cceef0ee
[ "MIT" ]
1
2018-11-08T09:30:38.000Z
2018-11-08T09:30:38.000Z
import numpy as np def hwc_to_chw(image): return np.einsum('hwc->chw', image) # change to pytorch format
22.8
70
0.692982
import numpy as np def hwc_to_chw(image): return np.einsum('hwc->chw', image)
true
true
f73331d5f5cbfc3043d4165144e1118dd13cb4da
601
py
Python
app/main/forms.py
theposter/food-server
d6a1a9e1300d35ff4642463f0a73074b1440c648
[ "MIT" ]
null
null
null
app/main/forms.py
theposter/food-server
d6a1a9e1300d35ff4642463f0a73074b1440c648
[ "MIT" ]
null
null
null
app/main/forms.py
theposter/food-server
d6a1a9e1300d35ff4642463f0a73074b1440c648
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField from wtforms.validators import DataRequired, Length, ValidationError class SearchForm(FlaskForm): search_query = StringField('What cuisine are you in the mood for today?', validators=[DataRequired(), Length...
50.083333
106
0.685524
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField from wtforms.validators import DataRequired, Length, ValidationError class SearchForm(FlaskForm): search_query = StringField('What cuisine are you in the mood for today?', validators=[DataRequired(), Length...
true
true
f73331fcb36a3a70a8bb47fbbad3290ddeab907f
5,914
py
Python
pycdp/cdp/background_service.py
HMaker/python-chrome-devtools-protocol
a9646a1c4e172ce458c15e2fcb3860ca8c9b4599
[ "MIT" ]
null
null
null
pycdp/cdp/background_service.py
HMaker/python-chrome-devtools-protocol
a9646a1c4e172ce458c15e2fcb3860ca8c9b4599
[ "MIT" ]
null
null
null
pycdp/cdp/background_service.py
HMaker/python-chrome-devtools-protocol
a9646a1c4e172ce458c15e2fcb3860ca8c9b4599
[ "MIT" ]
null
null
null
# DO NOT EDIT THIS FILE! # # This file is generated from the CDP specification. If you need to make # changes, edit the generator and regenerate all of the modules. # # CDP domain: BackgroundService (experimental) from __future__ import annotations import enum import typing from dataclasses import dataclass from .util...
28.028436
120
0.670612
from __future__ import annotations import enum import typing from dataclasses import dataclass from .util import event_class, T_JSON_DICT from . import network from . import service_worker class ServiceName(enum.Enum): BACKGROUND_FETCH = "backgroundFetch" BACKGROUND_SYNC = "backgroundSync" PUSH_ME...
true
true
f7333211b1dbb9c47db8c96a6fe432b194c037a1
332
py
Python
portfolio/migrations/0006_remove_resume_categorie.py
gbungbung/django-portfolio-site
7810211e157eac3c76bf139e2b65dc4a73d90cbc
[ "MIT" ]
null
null
null
portfolio/migrations/0006_remove_resume_categorie.py
gbungbung/django-portfolio-site
7810211e157eac3c76bf139e2b65dc4a73d90cbc
[ "MIT" ]
6
2020-06-05T23:31:43.000Z
2022-02-10T09:16:09.000Z
portfolio/migrations/0006_remove_resume_categorie.py
gbungbung/django-portfolio-site
7810211e157eac3c76bf139e2b65dc4a73d90cbc
[ "MIT" ]
null
null
null
# Generated by Django 2.2.5 on 2019-10-07 10:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('portfolio', '0005_cvcategory_resume'), ] operations = [ migrations.RemoveField( model_name='resume', name='categorie', ...
18.444444
48
0.596386
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('portfolio', '0005_cvcategory_resume'), ] operations = [ migrations.RemoveField( model_name='resume', name='categorie', ), ]
true
true
f733343d5415138b283a4b4d7a7af72121bd8e1b
883
py
Python
singa_auto/advisor/__init__.py
FeynmanDNA/singa-auto
e96982adc689335a323a5a32d03b23942e01d09f
[ "Apache-2.0" ]
35
2018-10-07T09:51:42.000Z
2021-09-08T14:13:38.000Z
singa_auto/advisor/__init__.py
FeynmanDNA/singa-auto
e96982adc689335a323a5a32d03b23942e01d09f
[ "Apache-2.0" ]
119
2018-10-05T14:49:39.000Z
2022-03-11T23:49:51.000Z
singa_auto/advisor/__init__.py
FeynmanDNA/singa-auto
e96982adc689335a323a5a32d03b23942e01d09f
[ "Apache-2.0" ]
32
2018-10-18T12:02:55.000Z
2020-03-01T10:27:06.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...
42.047619
68
0.776897
from .constants import * from .advisor import BaseAdvisor, UnsupportedKnobError, make_advisor
true
true
f733353028a2e80e2bc55f69525b458586901db5
20,627
py
Python
azext_iot/central/_help.py
YingXue/azure-iot-cli-extension
efe7897b1ae1d2a9953f501abe7654b84d69372d
[ "MIT" ]
null
null
null
azext_iot/central/_help.py
YingXue/azure-iot-cli-extension
efe7897b1ae1d2a9953f501abe7654b84d69372d
[ "MIT" ]
1
2020-09-02T23:25:39.000Z
2020-09-09T14:18:33.000Z
azext_iot/central/_help.py
YingXue/azure-iot-cli-extension
efe7897b1ae1d2a9953f501abe7654b84d69372d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
34.321131
200
0.575993
from knack.help_files import helps def load_central_help(): helps[ "iot central" ] = """ type: group short-summary: Manage IoT Central resources. long-summary: | IoT Central is an IoT application platform that reduces the burden and cost of developing, ...
true
true
f73335e47e7f6716aa3e2c15913d092a19b8db66
84
py
Python
beluga/codegen/__init__.py
dHannasch/beluga
519e1ca2a43a86bc47737c45484288b2bacc1338
[ "MIT" ]
null
null
null
beluga/codegen/__init__.py
dHannasch/beluga
519e1ca2a43a86bc47737c45484288b2bacc1338
[ "MIT" ]
null
null
null
beluga/codegen/__init__.py
dHannasch/beluga
519e1ca2a43a86bc47737c45484288b2bacc1338
[ "MIT" ]
null
null
null
from .codegen import lambdify_, jit_compile_func, tuplefy, SymBVP, FuncBVP, FuncOCP
42
83
0.821429
from .codegen import lambdify_, jit_compile_func, tuplefy, SymBVP, FuncBVP, FuncOCP
true
true
f733365a20592c65c17f3c07129bb74cad595abf
2,163
py
Python
CIM100/IEC61970/Dynamics/SynchronousMachineDetailed.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM100/IEC61970/Dynamics/SynchronousMachineDetailed.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM100/IEC61970/Dynamics/SynchronousMachineDetailed.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
45.0625
134
0.760518
from CIM100.IEC61970.Dynamics.SynchronousMachineDynamics import SynchronousMachineDynamics class SynchronousMachineDetailed(SynchronousMachineDynamics): def __init__(self, efdBaseRatio=0.0, ifdBaseType=None, saturationFactor120QAxis=0.0, saturationFactorQAxis=0.0, *args, **kw_args): ...
true
true
f733366d79457e17f189a276d7bd177aabb7b273
154
py
Python
board/test_paginator.py
msio900/test_django
5d2077bf00bbdb3b4ed2e1f3d46348639a85191d
[ "Apache-2.0" ]
null
null
null
board/test_paginator.py
msio900/test_django
5d2077bf00bbdb3b4ed2e1f3d46348639a85191d
[ "Apache-2.0" ]
null
null
null
board/test_paginator.py
msio900/test_django
5d2077bf00bbdb3b4ed2e1f3d46348639a85191d
[ "Apache-2.0" ]
null
null
null
from django.core.paginator import Paginator objects = ['john', 'paul', 'george', 'ringo', 'jane', 'mag'] page = Paginator(objects, 2) print(type(page))
22
60
0.681818
from django.core.paginator import Paginator objects = ['john', 'paul', 'george', 'ringo', 'jane', 'mag'] page = Paginator(objects, 2) print(type(page))
true
true
f7333710cd77a3eb913e3f571730db6dc331ea14
12,219
py
Python
ic3net_envs/ic3net_envs/predator_prey_env.py
miniTsl/IC3Net
897ed3bae6ad5f65fb3cc4577d4392af6e456703
[ "MIT" ]
158
2018-11-30T20:20:18.000Z
2022-03-13T07:55:19.000Z
ic3net_envs/ic3net_envs/predator_prey_env.py
miniTsl/IC3Net
897ed3bae6ad5f65fb3cc4577d4392af6e456703
[ "MIT" ]
13
2019-01-26T10:51:39.000Z
2022-01-13T00:58:37.000Z
ic3net_envs/ic3net_envs/predator_prey_env.py
miniTsl/IC3Net
897ed3bae6ad5f65fb3cc4577d4392af6e456703
[ "MIT" ]
36
2019-04-17T12:46:25.000Z
2022-03-27T08:57:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simulate a predator prey environment. Each agent can just observe itself (it's own identity) i.e. s_j = j and vision sqaure around it. Design Decisions: - Memory cheaper than time (compute) - Using Vocab for class of box: -1 out of bound, inde...
35.938235
140
0.561421
import random import math import curses import gym import numpy as np from gym import spaces class PredatorPreyEnv(gym.Env): def __init__(self,): self.__version__ = "0.0.1" self.OUTSIDE_CLASS = 1 self.PREY_CLASS = 2 self.PREDATOR_CLASS = 3 self.TIMESTE...
true
true
f73337bceb1feb3091898172a1811ce26ee50b4a
1,768
py
Python
Geographic2UTM.py
Locottus/Python
8a6a864c54371fff2b9f34c3c2a69a387c6266f1
[ "MIT" ]
null
null
null
Geographic2UTM.py
Locottus/Python
8a6a864c54371fff2b9f34c3c2a69a387c6266f1
[ "MIT" ]
null
null
null
Geographic2UTM.py
Locottus/Python
8a6a864c54371fff2b9f34c3c2a69a387c6266f1
[ "MIT" ]
null
null
null
import pandas as pd import pyproj import glob import os import datetime #first install the following c++ for python library #https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266 #run python setup.py install #https://jswhit.github.io/pyproj/ #program is now ready to be used. #docu #http...
28.516129
143
0.623303
import pandas as pd import pyproj import glob import os import datetime path = "." all_files = glob.glob(os.path.join(path, "*.csv")) now = datetime.datetime.now() f = open('PuntoUTM' + str(now.day) + str(now.month) + str(now.year) + '.txt', 'w') def Point2UTM(x,y): p1 = pyproj.Pro...
false
true
f733396eed94e5d97ff81c8bf98cb921b43fb09d
594
py
Python
pycaret/tests/test_overflow.py
hanaseleb/pycaret
1fe6e1a6bee642351c4b6064d769f97294713f48
[ "MIT" ]
5,541
2019-12-30T13:24:46.000Z
2022-03-31T19:21:37.000Z
pycaret/tests/test_overflow.py
sjoerdteunisse/pycaret
87e3691e8b0253a7eb203bd721916d5b617fad85
[ "MIT" ]
1,616
2019-11-23T20:08:30.000Z
2022-03-31T20:18:21.000Z
pycaret/tests/test_overflow.py
sjoerdteunisse/pycaret
87e3691e8b0253a7eb203bd721916d5b617fad85
[ "MIT" ]
1,471
2019-11-23T20:21:48.000Z
2022-03-31T12:07:39.000Z
import os, sys sys.path.insert(0, os.path.abspath("..")) import pandas as pd import numpy as np import pytest def test(): from pycaret.datasets import get_data data = get_data("boston") from pycaret.regression import setup, create_model, tune_model s = setup(data, target="medv", silent=True, html=...
24.75
86
0.700337
import os, sys sys.path.insert(0, os.path.abspath("..")) import pandas as pd import numpy as np import pytest def test(): from pycaret.datasets import get_data data = get_data("boston") from pycaret.regression import setup, create_model, tune_model s = setup(data, target="medv", silent=True, html=...
true
true
f7333984fc106b555c03a8a42420e08537ea6e09
42,772
py
Python
localstack/utils/aws/aws_stack.py
HugoPelletier/localstack
75f7e3034bd27e1c9a46a70ededcc06bbe2bd5c5
[ "Apache-2.0" ]
null
null
null
localstack/utils/aws/aws_stack.py
HugoPelletier/localstack
75f7e3034bd27e1c9a46a70ededcc06bbe2bd5c5
[ "Apache-2.0" ]
null
null
null
localstack/utils/aws/aws_stack.py
HugoPelletier/localstack
75f7e3034bd27e1c9a46a70ededcc06bbe2bd5c5
[ "Apache-2.0" ]
null
null
null
import json import logging import os import re import socket import sys import threading import time from typing import Dict, Optional, Union from urllib.parse import urlparse if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict import boto3 import botocore...
34.944444
119
0.683485
import json import logging import os import re import socket import sys import threading import time from typing import Dict, Optional, Union from urllib.parse import urlparse if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict import boto3 import botocore...
true
true
f73339a69a504cdce7153fc5c6c634c49da259f2
192
py
Python
bindings/python/pydeck/pydeck/bindings/__init__.py
shitao1988/deck.gl
a4c9ada186eceabdd3bb191309887841384a5843
[ "MIT" ]
1
2022-03-10T09:51:31.000Z
2022-03-10T09:51:31.000Z
bindings/python/pydeck/pydeck/bindings/__init__.py
shitao1988/deck.gl
a4c9ada186eceabdd3bb191309887841384a5843
[ "MIT" ]
null
null
null
bindings/python/pydeck/pydeck/bindings/__init__.py
shitao1988/deck.gl
a4c9ada186eceabdd3bb191309887841384a5843
[ "MIT" ]
2
2020-03-10T05:56:50.000Z
2021-11-26T16:28:49.000Z
from .deck import Deck # noqa from .layer import Layer # noqa from .light_settings import LightSettings # noqa from .view import View # noqa from .view_state import ViewState # noqa
32
50
0.739583
from .deck import Deck from .layer import Layer from .light_settings import LightSettings from .view import View from .view_state import ViewState
true
true
f73339e581354f9272a08d2528eff4ed0f815376
2,277
py
Python
device/enviro_demo.py
ptone/cloud-iot-end-user-demo
519dea13e72ea1e05bac348ef10554b60ea8eaab
[ "Apache-2.0" ]
null
null
null
device/enviro_demo.py
ptone/cloud-iot-end-user-demo
519dea13e72ea1e05bac348ef10554b60ea8eaab
[ "Apache-2.0" ]
null
null
null
device/enviro_demo.py
ptone/cloud-iot-end-user-demo
519dea13e72ea1e05bac348ef10554b60ea8eaab
[ "Apache-2.0" ]
null
null
null
from aiy.enviro import EnviroKit from aiy.cloudiot import CloudIot from luma.core.render import canvas from PIL import ImageDraw from time import sleep import argparse def update_display(display, msg): with canvas(display) as draw: draw.text((0, 5), msg, fill='white') def _none_to_nan(val): return ...
35.578125
96
0.603865
from aiy.enviro import EnviroKit from aiy.cloudiot import CloudIot from luma.core.render import canvas from PIL import ImageDraw from time import sleep import argparse def update_display(display, msg): with canvas(display) as draw: draw.text((0, 5), msg, fill='white') def _none_to_nan(val): return ...
true
true
f73339f01a3b5cc8f2e8048400a9c0b656d84e99
2,651
py
Python
heatclient/common/template_format.py
enterstudio/python-heatclient
954e475a6a0a12432ec325d7579460fabcf3f40a
[ "Apache-2.0" ]
null
null
null
heatclient/common/template_format.py
enterstudio/python-heatclient
954e475a6a0a12432ec325d7579460fabcf3f40a
[ "Apache-2.0" ]
null
null
null
heatclient/common/template_format.py
enterstudio/python-heatclient
954e475a6a0a12432ec325d7579460fabcf3f40a
[ "Apache-2.0" ]
null
null
null
# 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...
36.819444
79
0.688797
import json import yaml from heatclient._i18n import _ if hasattr(yaml, 'CSafeLoader'): yaml_loader = yaml.CSafeLoader else: yaml_loader = yaml.SafeLoader if hasattr(yaml, 'CSafeDumper'): yaml_dumper = yaml.CSafeDumper else: yaml_dumper = yaml.SafeDumper def _construct_yaml_str(self, no...
true
true
f7333a661fec67fc063ced993387787d5367e478
1,816
py
Python
nova/scheduler/filters/core_filter.py
russellb/nova
99c2e02b44a1012c8e26fc7658dc40ec4620a1ee
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/core_filter.py
russellb/nova
99c2e02b44a1012c8e26fc7658dc40ec4620a1ee
[ "Apache-2.0" ]
null
null
null
nova/scheduler/filters/core_filter.py
russellb/nova
99c2e02b44a1012c8e26fc7658dc40ec4620a1ee
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2011 Openstack, LLC. # Copyright (c) 2012 Justin Santa Barbara # # 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....
35.607843
78
0.719163
from nova import flags from nova import log as logging from nova.openstack.common import cfg from nova.scheduler.filters import abstract_filter LOG = logging.getLogger(__name__) cpu_allocation_ratio_opt = cfg.FloatOpt('cpu_allocation_ratio', default=16.0, help='Virtual CPU to Physica...
true
true
f7333b2ed2a9e8f8b0c316ceb06b7159e13d4eec
4,450
py
Python
util/box_ops.py
antoyang/TubeDETR
3c32cc92a0fdaa0c770d95a59d8764e0e212424c
[ "Apache-2.0" ]
4
2022-03-31T04:57:59.000Z
2022-03-31T12:26:34.000Z
util/box_ops.py
antoyang/TubeDETR
3c32cc92a0fdaa0c770d95a59d8764e0e212424c
[ "Apache-2.0" ]
null
null
null
util/box_ops.py
antoyang/TubeDETR
3c32cc92a0fdaa0c770d95a59d8764e0e212424c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Aishwarya Kamath & Nicolas Carion. Licensed under the Apache License 2.0. All Rights Reserved # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Utilities for bounding box manipulation and GIoU. """ import torch import numpy as np from torchvision.ops.boxes import box_area from t...
31.118881
116
0.595056
import torch import numpy as np from torchvision.ops.boxes import box_area from typing import Tuple array) -> Tuple[np.array, np.array]: area1 = np_box_area(boxes1) area2 = np_box_area(boxes2) lt = np.maximum(boxes1[:, None, :2], boxes2[:, :2]) rb = np.minimum(boxes1[:, None, 2:], boxes2[:, 2:]) ...
true
true
f7333c1762010ec0e00ede92c0e22ad172a13a1a
4,607
py
Python
wagtail_webstories/blocks.py
pyneda/wagtail-webstories
92abc2af318e599cb0dc486deba9828379c78f1a
[ "BSD-3-Clause" ]
null
null
null
wagtail_webstories/blocks.py
pyneda/wagtail-webstories
92abc2af318e599cb0dc486deba9828379c78f1a
[ "BSD-3-Clause" ]
null
null
null
wagtail_webstories/blocks.py
pyneda/wagtail-webstories
92abc2af318e599cb0dc486deba9828379c78f1a
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ import requests from wagtail.core import blocks from webstories import Story, StoryPage from .markup import AMPText class AMPCleanHTMLBlock(blocks.RawHTMLBlock): def clean(self, v...
31.993056
99
0.654439
from django.conf import settings from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ import requests from wagtail.core import blocks from webstories import Story, StoryPage from .markup import AMPText class AMPCleanHTMLBlock(blocks.RawHTMLBlock): def clean(self, v...
true
true
f7333c1c38a2f74caebd064ed74ad103c4f85ffa
179
py
Python
src/saturnv_ui/saturnv/ui/fonts/fontmanager.py
epkaz93/saturnv
b8a2c61bb0e833f2e31698050113038bab3ca5a4
[ "MIT" ]
1
2022-03-12T07:38:09.000Z
2022-03-12T07:38:09.000Z
src/saturnv_ui/saturnv/ui/fonts/fontmanager.py
epkaz93/saturnv
b8a2c61bb0e833f2e31698050113038bab3ca5a4
[ "MIT" ]
null
null
null
src/saturnv_ui/saturnv/ui/fonts/fontmanager.py
epkaz93/saturnv
b8a2c61bb0e833f2e31698050113038bab3ca5a4
[ "MIT" ]
null
null
null
from saturnv.ui.managers import FileBasedManager class FontManager(FileBasedManager): def __init__(self, path, extension='*ttf'): super().__init__(path, extension)
22.375
48
0.73743
from saturnv.ui.managers import FileBasedManager class FontManager(FileBasedManager): def __init__(self, path, extension='*ttf'): super().__init__(path, extension)
true
true
f7333c2a62c0c9bca41b5f8b5a6e3d3a26fc5e39
1,279
py
Python
crawler/helpers.py
alatar-/sample-crawler
434d771398d78f1e13a3c46875bde2e2fd763e2c
[ "MIT" ]
null
null
null
crawler/helpers.py
alatar-/sample-crawler
434d771398d78f1e13a3c46875bde2e2fd763e2c
[ "MIT" ]
null
null
null
crawler/helpers.py
alatar-/sample-crawler
434d771398d78f1e13a3c46875bde2e2fd763e2c
[ "MIT" ]
null
null
null
import logging import datetime import json import requests from bs4 import BeautifulSoup from twilio.rest import TwilioRestClient from .config import twilio logger = logging.getLogger(__name__) def translate_timestamp(ts): translation = { 'stycznia': 1, 'lutego': 2, 'grudnia': 12, }...
23.254545
80
0.643471
import logging import datetime import json import requests from bs4 import BeautifulSoup from twilio.rest import TwilioRestClient from .config import twilio logger = logging.getLogger(__name__) def translate_timestamp(ts): translation = { 'stycznia': 1, 'lutego': 2, 'grudnia': 12, }...
true
true
f7333de8a7bc20273f44f37de6e18bf14b09e26d
8,596
py
Python
var/spack/repos/builtin/packages/hydrogen/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/hydrogen/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/hydrogen/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2022-01-18T23:39:24.000Z
2022-01-18T23:39:24.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Hydrogen(CMakePackage, CudaPackage): """Hydrogen: Distributed-memory dense and s...
44.309278
97
0.642275
import os from spack import * class Hydrogen(CMakePackage, CudaPackage): homepage = "http://libelemental.org" url = "https://github.com/LLNL/Elemental/archive/v1.0.1.tar.gz" git = "https://github.com/LLNL/Elemental.git" maintainers = ['bvanessen'] version('develop', branch='hydro...
true
true
f7333e88eaf27abea297faa8629e8771393ddb5a
17,564
py
Python
sktime/contrib/vector_classifiers/_rotation_forest.py
kejsitake/sktime
5c608f09ce0f5216677ce9f6ad61d71584211db9
[ "BSD-3-Clause" ]
2
2021-12-28T10:48:11.000Z
2022-03-06T18:08:01.000Z
sktime/contrib/vector_classifiers/_rotation_forest.py
kejsitake/sktime
5c608f09ce0f5216677ce9f6ad61d71584211db9
[ "BSD-3-Clause" ]
null
null
null
sktime/contrib/vector_classifiers/_rotation_forest.py
kejsitake/sktime
5c608f09ce0f5216677ce9f6ad61d71584211db9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """RotationForest vector classifier. Rotation Forest, sktime implementation for continuous values only. """ __author__ = ["MatthewMiddlehurst"] __all__ = ["RotationForest"] import time import numpy as np from joblib import Parallel, delayed from sklearn.base import BaseEstimator from sklearn...
34.711462
92
0.577317
__author__ = ["MatthewMiddlehurst"] __all__ = ["RotationForest"] import time import numpy as np from joblib import Parallel, delayed from sklearn.base import BaseEstimator from sklearn.decomposition import PCA from sklearn.tree import DecisionTreeClassifier from sklearn.utils import check_random_state, check_X_y f...
true
true
f7333ef3b1155ca6ee86e57360eec802d4647c8c
8,239
py
Python
qa/rpc-tests/test_framework/test_framework.py
cozy-coin/cozycoin
5c0706d819898cc1af0e70f6a955acc2dac524b8
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/test_framework.py
cozy-coin/cozycoin
5c0706d819898cc1af0e70f6a955acc2dac524b8
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/test_framework.py
cozy-coin/cozycoin
5c0706d819898cc1af0e70f6a955acc2dac524b8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Base class for RPC testing import logging import optparse import os import sys import shutil import te...
37.45
142
0.610632
import logging import optparse import os import sys import shutil import tempfile import traceback from .util import ( initialize_chain, start_nodes, connect_nodes_bi, sync_blocks, sync_mempools, stop_nodes, stop_node, enable_coverage, check_json_precision, initialize_cha...
true
true
f733401fe91ac8646d4bdcf18d93dc23aa819bd9
13,003
py
Python
shap/plots/dependence.py
Benjamin15/shap
4b6472c90c89aad403e00dff0cc8a6416f354fea
[ "MIT" ]
null
null
null
shap/plots/dependence.py
Benjamin15/shap
4b6472c90c89aad403e00dff0cc8a6416f354fea
[ "MIT" ]
null
null
null
shap/plots/dependence.py
Benjamin15/shap
4b6472c90c89aad403e00dff0cc8a6416f354fea
[ "MIT" ]
null
null
null
from __future__ import division from io import BytesIO import base64 import numpy as np import warnings try: import matplotlib.pyplot as pl import matplotlib except ImportError: warnings.warn("matplotlib could not be loaded!") pass from . import labels from . import colors from ..common import convert_...
42.217532
125
0.640544
from __future__ import division from io import BytesIO import base64 import numpy as np import warnings try: import matplotlib.pyplot as pl import matplotlib except ImportError: warnings.warn("matplotlib could not be loaded!") pass from . import labels from . import colors from ..common import convert_...
true
true
f73341a9b1861783023e6c29597f6470872dddd4
4,232
py
Python
train_classifier.py
Awesomex005/CarND-Vehicle-Detection
e12068887946605d148284aeea0262695d54743f
[ "MIT" ]
null
null
null
train_classifier.py
Awesomex005/CarND-Vehicle-Detection
e12068887946605d148284aeea0262695d54743f
[ "MIT" ]
null
null
null
train_classifier.py
Awesomex005/CarND-Vehicle-Detection
e12068887946605d148284aeea0262695d54743f
[ "MIT" ]
null
null
null
import matplotlib.image as mpimg import matplotlib.pyplot as plt import numpy as np import cv2 import glob import time from sklearn.svm import LinearSVC from sklearn.preprocessing import StandardScaler from extract_feature import * # NOTE: the next import is only valid for scikit-learn version <= 0.17 # for scikit-lear...
39.924528
161
0.661626
import matplotlib.image as mpimg import matplotlib.pyplot as plt import numpy as np import cv2 import glob import time from sklearn.svm import LinearSVC from sklearn.preprocessing import StandardScaler from extract_feature import * from sklearn.cross_validation import train_test_split import pickle cars = glob.gl...
true
true
f7334209758cbea200cb0c7e05c995573175bd72
20,788
py
Python
monk/pytorch/finetune/level_12_losses_main.py
take2rohit/monk_v1
9c567bf2c8b571021b120d879ba9edf7751b9f92
[ "Apache-2.0" ]
542
2019-11-10T12:09:31.000Z
2022-03-28T11:39:07.000Z
monk/pytorch/finetune/level_12_losses_main.py
take2rohit/monk_v1
9c567bf2c8b571021b120d879ba9edf7751b9f92
[ "Apache-2.0" ]
117
2019-11-12T09:39:24.000Z
2022-03-12T00:20:41.000Z
monk/pytorch/finetune/level_12_losses_main.py
take2rohit/monk_v1
9c567bf2c8b571021b120d879ba9edf7751b9f92
[ "Apache-2.0" ]
246
2019-11-09T21:53:24.000Z
2022-03-29T00:57:07.000Z
from monk.pytorch.finetune.imports import * from monk.system.imports import * from monk.pytorch.finetune.level_11_optimizers_main import prototype_optimizers class prototype_losses(prototype_optimizers): ''' Main class for all parameters in expert mode Args: verbose (int): Set verbosity levels ...
51.328395
147
0.479219
from monk.pytorch.finetune.imports import * from monk.system.imports import * from monk.pytorch.finetune.level_11_optimizers_main import prototype_optimizers class prototype_losses(prototype_optimizers): @accepts("self", verbose=int, post_trace=False) def __init__(self, verbose=1): super().__ini...
true
true
f73342ade8523d343007d9b616bca0d71c3a4c27
4,050
py
Python
ghidra_9.0/Ghidra/Features/Python/data/jython-2.7.1/Lib/distutils/tests/test_check.py
ChristopherMorrison/ghidra
e53aa57d1aff79a1df93728f746705c58fe95ab0
[ "Apache-2.0" ]
577
2020-06-04T16:34:44.000Z
2022-03-31T11:46:07.000Z
ghidra_9.0/Ghidra/Features/Python/data/jython-2.7.1/Lib/distutils/tests/test_check.py
ChristopherMorrison/ghidra
e53aa57d1aff79a1df93728f746705c58fe95ab0
[ "Apache-2.0" ]
174
2015-01-08T20:37:09.000Z
2020-06-03T16:48:59.000Z
ghidra_9.0/Ghidra/Features/Python/data/jython-2.7.1/Lib/distutils/tests/test_check.py
ChristopherMorrison/ghidra
e53aa57d1aff79a1df93728f746705c58fe95ab0
[ "Apache-2.0" ]
299
2015-01-23T10:06:24.000Z
2022-02-02T06:34:51.000Z
# -*- encoding: utf8 -*- """Tests for distutils.command.check.""" import unittest from test.test_support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support from distutils.errors import DistutilsSetupError class CheckTestCase(support.LoggingSilencer, ...
36.818182
78
0.588148
import unittest from test.test_support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support from distutils.errors import DistutilsSetupError class CheckTestCase(support.LoggingSilencer, support.TempdirManager, unittest...
true
true
f73342e88b8291f32ee90a4caf7fbe952853619b
14,615
py
Python
carEducation.py
L0113408/JoyRides
e006f94f3c31317b68566a2bce504ac6a6b702d1
[ "MIT" ]
3
2021-09-01T02:42:52.000Z
2021-09-06T04:14:24.000Z
carEducation.py
sarahnadi/JoyRides
e006f94f3c31317b68566a2bce504ac6a6b702d1
[ "MIT" ]
null
null
null
carEducation.py
sarahnadi/JoyRides
e006f94f3c31317b68566a2bce504ac6a6b702d1
[ "MIT" ]
1
2021-09-01T02:43:00.000Z
2021-09-01T02:43:00.000Z
""" Python Wechaty - https://github.com/wechaty/python-wechaty Authors: Huan LI (李卓桓) <https://github.com/huan> Jingjing WU (吴京京) <https://github.com/wj-Mcat> 2020 @ Copyright Wechaty Contributors <https://github.com/wechaty> Licensed under the Apache License, Version 2.0 (the 'License'); you may n...
33.065611
104
0.5844
import os import asyncio import json import array from operator import methodcaller from user import User from action import Action from wechaty import ( Contact, Room, FileBox, Message, Wechaty, ScanStatus, user, ) with open('./data/data.json', 'r') as f: ...
true
true
f73343b901bf273919dad04a3aaac532772c271a
1,872
py
Python
congress/client.py
giltolley/propublica-congress
03e519341063c5703080b4723112f1831816c77e
[ "MIT" ]
49
2017-02-04T18:37:14.000Z
2022-02-07T02:01:31.000Z
congress/client.py
giltolley/propublica-congress
03e519341063c5703080b4723112f1831816c77e
[ "MIT" ]
29
2017-02-06T17:50:31.000Z
2022-03-29T19:58:12.000Z
congress/client.py
giltolley/propublica-congress
03e519341063c5703080b4723112f1831816c77e
[ "MIT" ]
13
2017-02-11T06:42:26.000Z
2020-08-15T16:20:50.000Z
""" Base client outlining how we fetch and parse responses """ import json import logging import httplib2 from .utils import NotFound, CongressError, u log = logging.getLogger('congress') class Client(object): """ Client classes deal with fetching responses from the ProPublica Congress API and parsing w...
26.366197
91
0.592415
import json import logging import httplib2 from .utils import NotFound, CongressError, u log = logging.getLogger('congress') class Client(object): BASE_URI = "https://api.propublica.org/congress/v1/" def __init__(self, apikey=None, cache='.cache', http=None): self.apikey = apikey if isins...
true
true
f733450b38e896eba9d3f68ecc6ba467ad7a4e20
1,322
py
Python
chemprop/models/FFNetwork.py
DannySalem/chemprop
f99cea2c08f54640ccd8ad3851a93f47badc72dd
[ "MIT" ]
null
null
null
chemprop/models/FFNetwork.py
DannySalem/chemprop
f99cea2c08f54640ccd8ad3851a93f47badc72dd
[ "MIT" ]
null
null
null
chemprop/models/FFNetwork.py
DannySalem/chemprop
f99cea2c08f54640ccd8ad3851a93f47badc72dd
[ "MIT" ]
null
null
null
import torch.nn as nn from chemprop.nn_utils import get_activation_function from chemprop.args import TrainArgs def create_ffn(output_size: int, input_size: int, args: TrainArgs): """ Creates the feed-forward layers for the model. :param args: A :class:`~chemprop.args.TrainArgs` object containing model a...
33.05
93
0.688351
import torch.nn as nn from chemprop.nn_utils import get_activation_function from chemprop.args import TrainArgs def create_ffn(output_size: int, input_size: int, args: TrainArgs): first_linear_dim = args.hidden_size * args.number_of_molecules if args.use_input_features: first_linear_dim += args....
true
true
f73345b124039a1ae853cb686c955e44ccee85b5
3,332
py
Python
rokka_client_codegen/models/list_user_memberships_response.py
rokka-io/rokka-client-python-codegen
63696489531a6f6efc982d3e25d79fbbce433838
[ "MIT" ]
null
null
null
rokka_client_codegen/models/list_user_memberships_response.py
rokka-io/rokka-client-python-codegen
63696489531a6f6efc982d3e25d79fbbce433838
[ "MIT" ]
null
null
null
rokka_client_codegen/models/list_user_memberships_response.py
rokka-io/rokka-client-python-codegen
63696489531a6f6efc982d3e25d79fbbce433838
[ "MIT" ]
null
null
null
# coding: utf-8 """ rokka.io digital image processing done right. [Documentation](https://rokka.io/documentation). [Changelog](https://api.rokka.io/changelog.md). # noqa: E501 OpenAPI spec version: 1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import...
28.237288
151
0.577731
import pprint import re import six from rokka_client_codegen.models.user_membership import UserMembership class ListUserMembershipsResponse(object): swagger_types = { 'items': 'list[UserMembership]' } attribute_map = { 'items': 'items' } def __init__(self, items=None):...
true
true
f7334768fa7f2497dd81db65213f28b75e9d04e9
5,800
py
Python
BESO.py
lucasdornelles/2DBESO
b92a42346ed4945a3668a3277d67ef412e200cbb
[ "MIT" ]
null
null
null
BESO.py
lucasdornelles/2DBESO
b92a42346ed4945a3668a3277d67ef412e200cbb
[ "MIT" ]
2
2018-02-28T04:54:35.000Z
2018-02-28T12:29:44.000Z
BESO.py
lucasdornelles/2DBESO
b92a42346ed4945a3668a3277d67ef412e200cbb
[ "MIT" ]
null
null
null
import numpy as np from FEM import get_element_dof from tqdm import tqdm from scipy.spatial.distance import pdist def get_elements_sensibilities(local_matrix, minimum_density, elements_density, displacements, penalty, connectivity, nodes_dof): # calculate elements sensibil...
37.419355
127
0.683966
import numpy as np from FEM import get_element_dof from tqdm import tqdm from scipy.spatial.distance import pdist def get_elements_sensibilities(local_matrix, minimum_density, elements_density, displacements, penalty, connectivity, nodes_dof): sensibilities = [] ...
true
true
f73347c90037868c8cf888fdd479050d44829a7a
3,808
py
Python
parse1.py
12Me21/markup
c7a5758826d71f5bcd6c39cd8cea10ca75348671
[ "MIT" ]
2
2018-12-06T07:55:02.000Z
2018-12-06T07:55:09.000Z
parse1.py
12Me21/markup
c7a5758826d71f5bcd6c39cd8cea10ca75348671
[ "MIT" ]
3
2019-02-10T23:22:19.000Z
2019-10-03T04:31:47.000Z
parse1.py
12Me21/markup
c7a5758826d71f5bcd6c39cd8cea10ca75348671
[ "MIT" ]
null
null
null
def highlight(code, language): return code def escape_html(code): return code.replace("&","&amp;").replace("<","&lt;").replace("\n","<br>") def escape_html_char(char): if char=="<": return "&lt;" if char=="&": return "&amp;" if char=="\n": return "<br>" if char=="\r": return "" return char def parse(c...
19.528205
98
0.487395
def highlight(code, language): return code def escape_html(code): return code.replace("&","&amp;").replace("<","&lt;").replace("\n","<br>") def escape_html_char(char): if char=="<": return "&lt;" if char=="&": return "&amp;" if char=="\n": return "<br>" if char=="\r": return "" return char def parse(c...
true
true
f73347cf356950b8384baf7b94555e71eb4f33a4
7,574
py
Python
homeassistant/components/fibaro/light.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
homeassistant/components/fibaro/light.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/fibaro/light.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Support for Fibaro lights.""" import asyncio from functools import partial import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_WHITE_VALUE, DOMAIN, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_WHITE_VALUE, LightEntity, ) from homeassistant.c...
36.066667
87
0.619752
import asyncio from functools import partial import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_WHITE_VALUE, DOMAIN, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_WHITE_VALUE, LightEntity, ) from homeassistant.const import CONF_WHITE_VALUE impo...
true
true
f73348ea7381087c33a70e3342341824f109489e
57,462
py
Python
test/functional/feature_futures.py
Sebz84/ain
451abddc7802ac4ee4dbf30117ca074414f4fdca
[ "MIT" ]
null
null
null
test/functional/feature_futures.py
Sebz84/ain
451abddc7802ac4ee4dbf30117ca074414f4fdca
[ "MIT" ]
null
null
null
test/functional/feature_futures.py
Sebz84/ain
451abddc7802ac4ee4dbf30117ca074414f4fdca
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Copyright (c) DeFi Blockchain Developers # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. """Test Futures contract RPC.""" from test_framework.test_fram...
55.896887
314
0.657756
from test_framework.test_framework import DefiTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error from decimal import Decimal import time def sort_history(e): return e['txn'] class FuturesTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 ...
true
true
f733497cf2d5a00cffbf4d74efa080b6f969a44d
754
py
Python
tests/test_model/test_recognizer/test_sknet.py
ZJCV/PyCls
1ef59301646b6134f2ffcc009b4fd76550fa4089
[ "Apache-2.0" ]
null
null
null
tests/test_model/test_recognizer/test_sknet.py
ZJCV/PyCls
1ef59301646b6134f2ffcc009b4fd76550fa4089
[ "Apache-2.0" ]
null
null
null
tests/test_model/test_recognizer/test_sknet.py
ZJCV/PyCls
1ef59301646b6134f2ffcc009b4fd76550fa4089
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @date: 2020/11/21 下午4:16 @file: test_resnest.py @author: zj @description: """ import torch from zcls.config import cfg from zcls.config.key_word import KEY_OUTPUT from zcls.model.recognizers.resnet.resnet import ResNet def test_data(model, input_shape, output_shape): data = torch.r...
20.378378
84
0.696286
import torch from zcls.config import cfg from zcls.config.key_word import KEY_OUTPUT from zcls.model.recognizers.resnet.resnet import ResNet def test_data(model, input_shape, output_shape): data = torch.randn(input_shape) outputs = model(data)[KEY_OUTPUT] print(outputs.shape) assert outputs.shape...
true
true
f7334ab596a90f93b66ce42aeddf328ed698df40
50,455
py
Python
pyUSID/io/hdf_utils/simple.py
rajgiriUW/pyUSID
064dcd81d9c42f4eb4782f0a41fd437b3f56f50c
[ "MIT" ]
25
2018-07-11T21:43:56.000Z
2021-11-17T11:40:00.000Z
pyUSID/io/hdf_utils/simple.py
rajgiriUW/pyUSID
064dcd81d9c42f4eb4782f0a41fd437b3f56f50c
[ "MIT" ]
62
2018-07-05T20:28:52.000Z
2021-12-14T09:49:35.000Z
pyUSID/io/hdf_utils/simple.py
rajgiriUW/pyUSID
064dcd81d9c42f4eb4782f0a41fd437b3f56f50c
[ "MIT" ]
15
2019-03-27T22:28:47.000Z
2021-01-03T20:23:42.000Z
# -*- coding: utf-8 -*- """ Lower-level and simpler USID-specific HDF5 utilities that facilitate higher-level data operations Created on Tue Nov 3 21:14:25 2015 @author: Suhas Somnath, Chris Smith """ from __future__ import division, print_function, absolute_import, unicode_literals import collections from warnings ...
39.325799
133
0.639322
from __future__ import division, print_function, absolute_import, unicode_literals import collections from warnings import warn import sys import h5py import numpy as np import dask.array as da from sidpy.hdf.hdf_utils import get_auxiliary_datasets, link_h5_obj_as_alias, \ write_simple_attrs, is_editable_h5, valid...
true
true
f7334b35d652faa71a488f6a1f1dd8f79a87c2c9
3,704
py
Python
arxivdigest/frontend/database/admin.py
iai-group/arXivDigest
d95f8fdb59aedcc282755f81a6081ca65e7d9450
[ "MIT" ]
13
2019-11-24T23:05:15.000Z
2021-09-02T19:36:33.000Z
arxivdigest/frontend/database/admin.py
iai-group/arXivDigest
d95f8fdb59aedcc282755f81a6081ca65e7d9450
[ "MIT" ]
99
2020-01-08T14:47:57.000Z
2021-02-25T14:29:50.000Z
arxivdigest/frontend/database/admin.py
iai-group/arXivDigest
d95f8fdb59aedcc282755f81a6081ca65e7d9450
[ "MIT" ]
1
2018-08-17T07:03:13.000Z
2018-08-17T07:03:13.000Z
# -*- coding: utf-8 -*- __author__ = 'Øyvind Jekteberg and Kristian Gingstad' __copyright__ = 'Copyright 2020, The arXivDigest project' import datetime from arxivdigest.frontend.database.db import getDb def isAdmin(id): '''Returns True if if the user with user_id of id is an admin and false if not.''' cur =...
30.61157
116
0.615551
__author__ = 'Øyvind Jekteberg and Kristian Gingstad' __copyright__ = 'Copyright 2020, The arXivDigest project' import datetime from arxivdigest.frontend.database.db import getDb def isAdmin(id): cur = getDb().cursor() cur.execute('SELECT admin FROM users where user_id=%s', (id,)) admin = cur.fetchone(...
true
true
f7334b3bd2f4cfcb4525c2972d35d5a9cc2551a1
1,595
py
Python
medium/306-additive-number.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
2
2021-03-14T11:38:26.000Z
2021-03-14T11:38:30.000Z
medium/306-additive-number.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
null
null
null
medium/306-additive-number.py
wanglongjiang/leetcode
c61d2e719e81575cfb5bde9d64e15cee7cf01ef3
[ "MIT" ]
1
2022-01-17T19:33:23.000Z
2022-01-17T19:33:23.000Z
''' 累加数 累加数是一个字符串,组成它的数字可以形成累加序列。 一个有效的累加序列必须至少包含 3 个数。除了最开始的两个数以外,字符串中的其他数都等于它之前两个数相加的和。 给定一个只包含数字 '0'-'9' 的字符串,编写一个算法来判断给定输入是否是累加数。 说明: 累加序列里的数不会以 0 开头,所以不会出现 1, 2, 03 或者 1, 02, 3 的情况。 示例 1: 输入: "112358" 输出: true 解释: 累加序列为: 1, 1, 2, 3, 5, 8 。1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5, 3 + 5 = 8 示例 2: 输入: "199100199" 输出: t...
24.921875
71
0.515361
class Solution: def isAdditiveNumber(self, num: str) -> bool: n = len(num) def backtrack(i, b, target): t = str(target) if n - i < len(t): return False if n - i == len(t): return num[i:] == t if num[i:i + len(t)] ...
true
true
f7334d9a86ea0f032876997ef8c3799223b8e2f0
1,027
py
Python
ann_benchmarks/algorithms/flann.py
maumueller/ann-benchmarks-reproducibility
b66ee6981fefefd4ab6e27bb4aac4ec0bfebed2a
[ "MIT" ]
null
null
null
ann_benchmarks/algorithms/flann.py
maumueller/ann-benchmarks-reproducibility
b66ee6981fefefd4ab6e27bb4aac4ec0bfebed2a
[ "MIT" ]
9
2021-01-22T16:24:31.000Z
2021-11-22T15:10:57.000Z
ann_benchmarks/algorithms/flann.py
maumueller/ann-benchmarks-reproducibility
b66ee6981fefefd4ab6e27bb4aac4ec0bfebed2a
[ "MIT" ]
null
null
null
from __future__ import absolute_import import pyflann import numpy import sklearn.preprocessing from ann_benchmarks.algorithms.base import BaseANN class FLANN(BaseANN): def __init__(self, metric, target_precision): self._target_precision = target_precision self.name = 'FLANN(target_precision=%f)' ...
34.233333
74
0.641675
from __future__ import absolute_import import pyflann import numpy import sklearn.preprocessing from ann_benchmarks.algorithms.base import BaseANN class FLANN(BaseANN): def __init__(self, metric, target_precision): self._target_precision = target_precision self.name = 'FLANN(target_precision=%f)' ...
true
true
f7334db4e8ac315b14751bc952ebf10a769b5821
19,759
py
Python
tests/test_scheduler/test_default_modules.py
zhongtianxie/fm-orchestrator
5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f
[ "MIT" ]
null
null
null
tests/test_scheduler/test_default_modules.py
zhongtianxie/fm-orchestrator
5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f
[ "MIT" ]
null
null
null
tests/test_scheduler/test_default_modules.py
zhongtianxie/fm-orchestrator
5ab39bf1981cf4abdf7ca4c2a7d4a6120f1bea2f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT from __future__ import absolute_import from collections import namedtuple import errno import dnf from mock import call, Mock, patch, PropertyMock import pytest from module_build_service.common.config import conf from module_build_service.common.errors import Unp...
37.708015
100
0.680095
from __future__ import absolute_import from collections import namedtuple import errno import dnf from mock import call, Mock, patch, PropertyMock import pytest from module_build_service.common.config import conf from module_build_service.common.errors import UnprocessableEntity from module_build_service.common.mod...
true
true
f7334dde9ee3f496655e36d1caad886e90dd8fa1
538
py
Python
src/GenPro/genetic_algorithm/crossover.py
Hispar/procedural_generation
ed265637cb5ddf570439ee26263d534e07fac7b1
[ "MIT" ]
null
null
null
src/GenPro/genetic_algorithm/crossover.py
Hispar/procedural_generation
ed265637cb5ddf570439ee26263d534e07fac7b1
[ "MIT" ]
null
null
null
src/GenPro/genetic_algorithm/crossover.py
Hispar/procedural_generation
ed265637cb5ddf570439ee26263d534e07fac7b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Python imports # 3rd Party imports # App imports from .individual import Individual class Crossover: parent_a: Individual parent_b: Individual individual_class: type def __init__(self, individual_class: type = Individual): self.individual_class = individual_class ...
22.416667
70
0.70632
from .individual import Individual class Crossover: parent_a: Individual parent_b: Individual individual_class: type def __init__(self, individual_class: type = Individual): self.individual_class = individual_class def set_parents(self, parent_a: Individual, parent_b: Individual): ...
true
true
f7334dff44a05ce7f3676b02ed83879a5e3aeb65
272
py
Python
backend/app/app/models/team_role.py
saschajullmann/sedotra
aaa38f6d533daa725a7037a8c446da978ffafa7d
[ "MIT" ]
null
null
null
backend/app/app/models/team_role.py
saschajullmann/sedotra
aaa38f6d533daa725a7037a8c446da978ffafa7d
[ "MIT" ]
null
null
null
backend/app/app/models/team_role.py
saschajullmann/sedotra
aaa38f6d533daa725a7037a8c446da978ffafa7d
[ "MIT" ]
null
null
null
from app.db.base_class import Base from app.models import Team, User from sqlalchemy_oso.roles import resource_role_class # ROLE MODELS ## TeamRoleMixin = resource_role_class(Base, User, Team, ["OWNER", "ADMIN", "MEMBER"]) class TeamRole(Base, TeamRoleMixin): pass
24.727273
83
0.764706
from app.db.base_class import Base from app.models import Team, User from sqlalchemy_oso.roles import resource_role_class amRoleMixin = resource_role_class(Base, User, Team, ["OWNER", "ADMIN", "MEMBER"]) class TeamRole(Base, TeamRoleMixin): pass
true
true
f7334e61c25dec469b3715c617f79fc68414c00c
201
py
Python
stella_nav_recognizer/src/stella_nav_recognizer/__init__.py
ymd-stella/stella_nav
b92f2dcaf52d0bb03c9ea4228124dc3444af2681
[ "MIT" ]
null
null
null
stella_nav_recognizer/src/stella_nav_recognizer/__init__.py
ymd-stella/stella_nav
b92f2dcaf52d0bb03c9ea4228124dc3444af2681
[ "MIT" ]
null
null
null
stella_nav_recognizer/src/stella_nav_recognizer/__init__.py
ymd-stella/stella_nav
b92f2dcaf52d0bb03c9ea4228124dc3444af2681
[ "MIT" ]
1
2022-01-14T07:55:22.000Z
2022-01-14T07:55:22.000Z
from .recognizer import Recognizer from .distance_checker import DistanceChecker from .time_checker import TimeChecker from .pass_checker import PassChecker from .stop_recognizer import StopRecognizer
33.5
45
0.875622
from .recognizer import Recognizer from .distance_checker import DistanceChecker from .time_checker import TimeChecker from .pass_checker import PassChecker from .stop_recognizer import StopRecognizer
true
true
f7334ead8c61c9fbd98faca3010788cd7fcc2d1c
3,490
py
Python
test.py
Jovian-Dsouza/Avenger_FaceNet
e8bdffd017c9c27d4dc0f347f6992f760f1af5db
[ "Apache-2.0" ]
null
null
null
test.py
Jovian-Dsouza/Avenger_FaceNet
e8bdffd017c9c27d4dc0f347f6992f760f1af5db
[ "Apache-2.0" ]
null
null
null
test.py
Jovian-Dsouza/Avenger_FaceNet
e8bdffd017c9c27d4dc0f347f6992f760f1af5db
[ "Apache-2.0" ]
null
null
null
import os import torch import numpy as np from torchvision import transforms from torch import nn from torch.nn import Softmax from facenet_pytorch import MTCNN from PIL import Image import matplotlib.pyplot as plt from loadOpenFace import prepareOpenFace from collections import OrderedDict import argparse # Check if...
30.347826
93
0.647851
import os import torch import numpy as np from torchvision import transforms from torch import nn from torch.nn import Softmax from facenet_pytorch import MTCNN from PIL import Image import matplotlib.pyplot as plt from loadOpenFace import prepareOpenFace from collections import OrderedDict import argparse useCuda =...
true
true
f7334f70dc0f8370bceffc1326f413679a27ba14
2,531
py
Python
nuplan/cli/test/test_nuplan_cli.py
motional/nuplan-devkit
e39029e788b17f47f2fcadb774098ef8fbdd0d67
[ "Apache-2.0" ]
128
2021-12-06T15:41:14.000Z
2022-03-29T13:16:32.000Z
nuplan/cli/test/test_nuplan_cli.py
motional/nuplan-devkit
e39029e788b17f47f2fcadb774098ef8fbdd0d67
[ "Apache-2.0" ]
28
2021-12-11T08:11:31.000Z
2022-03-25T02:35:43.000Z
nuplan/cli/test/test_nuplan_cli.py
motional/nuplan-devkit
e39029e788b17f47f2fcadb774098ef8fbdd0d67
[ "Apache-2.0" ]
14
2021-12-11T04:12:26.000Z
2022-03-24T06:38:30.000Z
import unittest from unittest.mock import Mock, PropertyMock, patch from typer.testing import CliRunner from nuplan.cli.nuplan_cli import cli runner = CliRunner() class TestNuPlanCli(unittest.TestCase): """ Test nuplan cli with typer engine """ @patch("nuplan.cli.db_cli.NuPlanDB") def test_db_...
34.671233
97
0.666535
import unittest from unittest.mock import Mock, PropertyMock, patch from typer.testing import CliRunner from nuplan.cli.nuplan_cli import cli runner = CliRunner() class TestNuPlanCli(unittest.TestCase): @patch("nuplan.cli.db_cli.NuPlanDB") def test_db_info_info(self, mock_db: Mock) -> None: mock_d...
true
true
f7334f715d4f0e5fc0a3870bd2e7dcc6b7e0418a
366
py
Python
apps/users/forms.py
stanicavuleta/heyposher
4430bdfb025b0699e840e35cc63f5eb975abb586
[ "Apache-2.0" ]
null
null
null
apps/users/forms.py
stanicavuleta/heyposher
4430bdfb025b0699e840e35cc63f5eb975abb586
[ "Apache-2.0" ]
null
null
null
apps/users/forms.py
stanicavuleta/heyposher
4430bdfb025b0699e840e35cc63f5eb975abb586
[ "Apache-2.0" ]
null
null
null
from django import forms from django.contrib.auth.forms import UserChangeForm from .models import CustomUser class CustomUserChangeForm(UserChangeForm): email = forms.EmailField(required=True) class Meta: model = CustomUser fields = ('email', 'first_name', 'last_name') class UploadAvatarFor...
22.875
53
0.73224
from django import forms from django.contrib.auth.forms import UserChangeForm from .models import CustomUser class CustomUserChangeForm(UserChangeForm): email = forms.EmailField(required=True) class Meta: model = CustomUser fields = ('email', 'first_name', 'last_name') class UploadAvatarFor...
true
true
f7334f72765d730fd9037c4e43280ef5b91c38f5
8,026
py
Python
config/settings/production.py
TobKed/penny_wise
80f35eebf2ad8d062fd9f7cc66087f988377543d
[ "MIT" ]
null
null
null
config/settings/production.py
TobKed/penny_wise
80f35eebf2ad8d062fd9f7cc66087f988377543d
[ "MIT" ]
null
null
null
config/settings/production.py
TobKed/penny_wise
80f35eebf2ad8d062fd9f7cc66087f988377543d
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env("DJANGO_SECRET_KEY") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED...
39.536946
89
0.611139
from .base import * from .base import env = env("DJANGO_SECRET_KEY") = env.list("DJANGO_ALLOWED_HOSTS", default=["penny-wise.men"]) DATABASES["default"] = env.db("DATABASE_URL") DATABASES["default"]["ATOMIC_REQUESTS"] = True DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX_AGE", default=60) C...
true
true
f7334f78e4a3398d17455abcc07112f2602903de
738
py
Python
src/101-symmetric-tree.py
sahilrider/LeetCode-Solutions
9cac844c27b5dbf37a70c2981a09cd92457f7ff1
[ "MIT" ]
2
2020-03-06T11:44:25.000Z
2020-03-13T20:07:48.000Z
src/101-symmetric-tree.py
sahilrider/LeetCode-Solutions
9cac844c27b5dbf37a70c2981a09cd92457f7ff1
[ "MIT" ]
null
null
null
src/101-symmetric-tree.py
sahilrider/LeetCode-Solutions
9cac844c27b5dbf37a70c2981a09cd92457f7ff1
[ "MIT" ]
null
null
null
'''https://leetcode.com/problems/symmetric-tree/''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def isMirror(self, left, right): if left is None and right is None: ...
29.52
98
0.575881
class Solution: def isMirror(self, left, right): if left is None and right is None: return True if left is None or right is None: return False if left.val==right.val: return self.isMirror(left.left, right.right) and self.isMirror(left.right, right....
true
true
f7334f886023c4cf8c863c1eb15747ac6f2c0f0c
36,240
py
Python
ssd_keras/ssd7_training_inferenceonvideo.py
ajinkyakhoche/Object-Detection-Project
3964fd5b445957581205478bb46db58fba3a9fc3
[ "MIT" ]
null
null
null
ssd_keras/ssd7_training_inferenceonvideo.py
ajinkyakhoche/Object-Detection-Project
3964fd5b445957581205478bb46db58fba3a9fc3
[ "MIT" ]
null
null
null
ssd_keras/ssd7_training_inferenceonvideo.py
ajinkyakhoche/Object-Detection-Project
3964fd5b445957581205478bb46db58fba3a9fc3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ssd7_training_inferenceonvideo.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1gMZm_sCuKq7g_cZIGfEcYyKoVw-U7jTX """ # from IPython.display import clear_output # ! rm -rf * # ! wget -O repo.zip https://github.com/pierl...
67.865169
1,322
0.690977
from keras.optimizers import Adam , SGD from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau, TerminateOnNaN, CSVLogger from keras import backend as K from keras.models import load_model from math import ceil import numpy as np from matplotlib import pyplot as plt from models.k...
true
true
f7334fb654c993af0d5fef253b1bfe5bd0c3835d
8,586
py
Python
ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2015-05-04T12:19:05.000Z
2015-05-04T12:19:05.000Z
ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2021-01-07T08:55:01.000Z
2021-01-07T08:55:01.000Z
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
45.189474
161
0.650245
''' 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 use thi...
false
true
f7334fe02b877f67eebc0bb6a56cb5af31511e41
5,547
py
Python
test/test_get_payouts_response_v3_page.py
velopaymentsapi/velo-python
59b39555e9714139b4bf697151cc7d15f6dd510e
[ "Apache-2.0" ]
null
null
null
test/test_get_payouts_response_v3_page.py
velopaymentsapi/velo-python
59b39555e9714139b4bf697151cc7d15f6dd510e
[ "Apache-2.0" ]
null
null
null
test/test_get_payouts_response_v3_page.py
velopaymentsapi/velo-python
59b39555e9714139b4bf697151cc7d15f6dd510e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Velo Payments APIs ## Terms and Definitions Throughout this document and the Velo platform the following terms are used: * **Payor.** An entity (typically a corporation) which wishes to pay funds to one or more payees via a payout. * **Payee.** The recipient of funds paid out by a payor....
138.675
4,651
0.777898
from __future__ import absolute_import import unittest import velo_payments from velo_payments.models.get_payouts_response_v3_page import GetPayoutsResponseV3Page from velo_payments.rest import ApiException class TestGetPayoutsResponseV3Page(unittest.TestCase): def setUp(self): pass def tear...
true
true
f733545472eb5a7e9abeb9f44923f599f25b5296
2,256
py
Python
niapy/problems/zakharov.py
altaregos/NiaPy
74f1b2827778d9086603f4a8cb523f6b5537212a
[ "MIT" ]
202
2018-02-06T12:13:42.000Z
2022-03-18T16:33:20.000Z
niapy/problems/zakharov.py
altaregos/NiaPy
74f1b2827778d9086603f4a8cb523f6b5537212a
[ "MIT" ]
262
2018-02-06T14:49:15.000Z
2022-03-25T19:49:46.000Z
niapy/problems/zakharov.py
altaregos/NiaPy
74f1b2827778d9086603f4a8cb523f6b5537212a
[ "MIT" ]
136
2018-02-06T16:55:32.000Z
2022-03-05T17:49:52.000Z
# encoding=utf8 """Implementations of Zakharov function.""" import numpy as np from niapy.problems.problem import Problem __all__ = ['Zakharov'] class Zakharov(Problem): r"""Implementations of Zakharov functions. Date: 2018 Author: Klemen Berkovič License: MIT Function: **Zakharov Functi...
30.486486
168
0.551862
import numpy as np from niapy.problems.problem import Problem __all__ = ['Zakharov'] class Zakharov(Problem): def __init__(self, dimension=4, lower=-5.0, upper=10.0, *args, **kwargs): super().__init__(dimension, lower, upper, *args, **kwargs) @staticmethod def latex_code(): return r''...
true
true
f733551a5bced026ab87f85689f3f09e21b07880
4,161
py
Python
searchlight-6.0.0/searchlight/tests/unit/test_ironic_node_plugin.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
searchlight-6.0.0/searchlight/tests/unit/test_ironic_node_plugin.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
searchlight-6.0.0/searchlight/tests/unit/test_ironic_node_plugin.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# 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 # distributed under the...
38.88785
79
0.674357
import mock from ironicclient import exceptions as ironic_exc from keystoneclient import exceptions as keystone_exc import searchlight.elasticsearch.plugins.ironic as ironic_plugin from searchlight.elasticsearch.plugins.ironic import nodes as nodes_plugin from searchlight.elasticsearch.plugins.ironic impor...
true
true
f733559859faaadf7e100706f9518dac784382a7
13,000
py
Python
official/nlp/modeling/networks/packed_sequence_embedding.py
patrickbook/models
718fb2c0d478ab6c9906a3dbf44099942a2c6426
[ "Apache-2.0" ]
15
2018-08-15T19:29:39.000Z
2021-11-05T02:14:59.000Z
official/nlp/modeling/networks/packed_sequence_embedding.py
patrickbook/models
718fb2c0d478ab6c9906a3dbf44099942a2c6426
[ "Apache-2.0" ]
null
null
null
official/nlp/modeling/networks/packed_sequence_embedding.py
patrickbook/models
718fb2c0d478ab6c9906a3dbf44099942a2c6426
[ "Apache-2.0" ]
8
2019-06-06T20:37:15.000Z
2022-03-04T13:54:38.000Z
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
40.498442
80
0.694846
import collections import tensorflow as tf from official.modeling import tf_utils from official.nlp import keras_nlp from official.nlp.modeling import layers @tf.keras.utils.register_keras_serializable(package='Text') class PackedSequenceEmbedding(tf.keras.Model): def __init__(self, ...
true
true
f73355edada3c3d79ec02189472eee21b60d88ce
97
py
Python
roomba/__init__.py
Leseratte10/Roomba980-Python
37f4938c957b2710371c1c103d8a0b5130784926
[ "MIT" ]
257
2017-05-15T21:16:32.000Z
2022-03-28T12:25:32.000Z
roomba/__init__.py
Leseratte10/Roomba980-Python
37f4938c957b2710371c1c103d8a0b5130784926
[ "MIT" ]
80
2017-05-17T12:42:11.000Z
2022-02-23T20:26:12.000Z
roomba/__init__.py
Leseratte10/Roomba980-Python
37f4938c957b2710371c1c103d8a0b5130784926
[ "MIT" ]
83
2017-05-16T06:49:07.000Z
2022-02-05T04:36:56.000Z
from __future__ import absolute_import from .roomba import Roomba from .password import Password
24.25
38
0.85567
from __future__ import absolute_import from .roomba import Roomba from .password import Password
true
true
f73355f6cd03cffa0edf5607316f63152c7549c0
19,217
py
Python
src/sentry/api/endpoints/organization_details.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/organization_details.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/organization_details.py
pombredanne/django-sentry
4ad09417fb3cfa3aa4a0d4175ae49fe02837c567
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import logging import six from rest_framework import serializers, status from uuid import uuid4 from sentry import roles from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationEndpoint from sentry.api.decorators import sudo_required from se...
39.62268
100
0.63907
from __future__ import absolute_import import logging import six from rest_framework import serializers, status from uuid import uuid4 from sentry import roles from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationEndpoint from sentry.api.decorators import sudo_required from se...
true
true
f733570b112312f20ec6b5c7261608a8698e4237
5,407
py
Python
great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern_list.py
MeganBeckett/great_expectations
31fca97b53bfefae2b853458ec0e1be87024242c
[ "Apache-2.0" ]
null
null
null
great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern_list.py
MeganBeckett/great_expectations
31fca97b53bfefae2b853458ec0e1be87024242c
[ "Apache-2.0" ]
null
null
null
great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern_list.py
MeganBeckett/great_expectations
31fca97b53bfefae2b853458ec0e1be87024242c
[ "Apache-2.0" ]
null
null
null
from typing import Optional from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.expectations.expectation import ( ColumnMapExpectation, InvalidExpectationConfigurationError, ) from great_expectations.expectations.util import render_evaluation_parameter...
40.350746
115
0.670797
from typing import Optional from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.expectations.expectation import ( ColumnMapExpectation, InvalidExpectationConfigurationError, ) from great_expectations.expectations.util import render_evaluation_parameter...
true
true
f73357a5b2d66ea9f461dd6fb7cc090f85d5ed12
857
py
Python
patreon/schemas/pledge.py
monokrome/patreon-python
09aad6800c6b9f33e026712a43e5f7e7c7a2a391
[ "Apache-2.0" ]
null
null
null
patreon/schemas/pledge.py
monokrome/patreon-python
09aad6800c6b9f33e026712a43e5f7e7c7a2a391
[ "Apache-2.0" ]
null
null
null
patreon/schemas/pledge.py
monokrome/patreon-python
09aad6800c6b9f33e026712a43e5f7e7c7a2a391
[ "Apache-2.0" ]
null
null
null
class Attributes(object): amount_cents = 'amount_cents' total_historical_amount_cents = 'total_historical_amount_cents' declined_since = 'declined_since' created_at = 'created_at' pledge_cap_cents = 'pledge_cap_cents' patron_pays_fees = 'patron_pays_fees' unread_count = 'unread_count' clas...
24.485714
67
0.732789
class Attributes(object): amount_cents = 'amount_cents' total_historical_amount_cents = 'total_historical_amount_cents' declined_since = 'declined_since' created_at = 'created_at' pledge_cap_cents = 'pledge_cap_cents' patron_pays_fees = 'patron_pays_fees' unread_count = 'unread_count' clas...
true
true
f73357eea3449ee1a148448a2b3b6e919e70dae1
3,686
py
Python
python/add_tag.py
CiscoDevNet/stealthwatch-code-examples
b3313ba97008225706ca22c5c417bd40cc1b4f71
[ "MIT" ]
1
2019-08-06T19:13:04.000Z
2019-08-06T19:13:04.000Z
python/add_tag.py
CiscoDevNet/stealthwatch-code-examples
b3313ba97008225706ca22c5c417bd40cc1b4f71
[ "MIT" ]
null
null
null
python/add_tag.py
CiscoDevNet/stealthwatch-code-examples
b3313ba97008225706ca22c5c417bd40cc1b4f71
[ "MIT" ]
1
2022-03-10T16:34:12.000Z
2022-03-10T16:34:12.000Z
#!/usr/bin/env python """ This script will add a new tag (host group) in Stealthwatch using the REST API. For more information on this API, please visit: https://developer.cisco.com/docs/stealthwatch/ - Script Dependencies: requests Depencency Installation: $ pip install requests System Requirements: ...
32.619469
127
0.689908
import json import requests try: requests.packages.urllib3.disable_warnings() except: pass SMC_USER = "" SMC_PASSWORD = "" SMC_HOST = "" SMC_TENANT_ID = "" url = "https://" + SMC_HOST + "/token/v2/authenticate" login_request_data = { "username": SMC_USER, "password": SMC_PASSWORD } # Initia...
true
true
f7335a266a37d8066b45c5d8decfeb65d046060a
4,162
py
Python
schedule/urls.py
westphahl/django-scheduler
ac52eb54145fbd1d585f6ba7e14beb45ac91e0ca
[ "BSD-3-Clause" ]
1
2015-08-31T15:05:26.000Z
2015-08-31T15:05:26.000Z
schedule/urls.py
westphahl/django-scheduler
ac52eb54145fbd1d585f6ba7e14beb45ac91e0ca
[ "BSD-3-Clause" ]
null
null
null
schedule/urls.py
westphahl/django-scheduler
ac52eb54145fbd1d585f6ba7e14beb45ac91e0ca
[ "BSD-3-Clause" ]
null
null
null
try: from django.conf.urls import patterns, url except ImportError: from django.conf.urls.defaults import patterns, url from django.views.generic.list import ListView from schedule.models import Calendar from schedule.feeds import UpcomingEventsFeed from schedule.feeds import CalendarICalendar from schedule.per...
42.040404
138
0.628784
try: from django.conf.urls import patterns, url except ImportError: from django.conf.urls.defaults import patterns, url from django.views.generic.list import ListView from schedule.models import Calendar from schedule.feeds import UpcomingEventsFeed from schedule.feeds import CalendarICalendar from schedule.per...
true
true
f7335bc3ea488aa0b9fe56f25e2850daab4b61ac
1,853
py
Python
foreman/data_refinery_foreman/surveyor/utils.py
cgreene/refinebio
fe75e42f2963d60c4307806cba11520754547190
[ "BSD-3-Clause" ]
null
null
null
foreman/data_refinery_foreman/surveyor/utils.py
cgreene/refinebio
fe75e42f2963d60c4307806cba11520754547190
[ "BSD-3-Clause" ]
null
null
null
foreman/data_refinery_foreman/surveyor/utils.py
cgreene/refinebio
fe75e42f2963d60c4307806cba11520754547190
[ "BSD-3-Clause" ]
null
null
null
import collections import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry def requests_retry_session( retries=3, backoff_factor=0.3, status_forcelist=(500, 502, 504), session=None ): """ Exponential back off for requests. via https...
30.377049
159
0.639504
import collections import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry def requests_retry_session( retries=3, backoff_factor=0.3, status_forcelist=(500, 502, 504), session=None ): session = session or requests.Session() retry = Retry...
true
true
f7335c38c896fcc26e45a5a8bbc3ee31f517d787
256
py
Python
catalog/utils/__init__.py
fbsamples/cp_reference
028b384767d06158a64be8cbb1af613e2f3c881e
[ "MIT" ]
2
2021-09-05T04:21:33.000Z
2021-11-03T20:56:46.000Z
catalog/utils/__init__.py
fbsamples/cp_reference
028b384767d06158a64be8cbb1af613e2f3c881e
[ "MIT" ]
null
null
null
catalog/utils/__init__.py
fbsamples/cp_reference
028b384767d06158a64be8cbb1af613e2f3c881e
[ "MIT" ]
null
null
null
# Copyright 2004-present, Facebook. All Rights Reserved. # flake8: noqa from .catalogs import ( post_item_batch, post_item_batch_by_id, create_product, update_product, create_catalog, ) from .dummy_products import create_dummy_products
23.272727
56
0.765625
from .catalogs import ( post_item_batch, post_item_batch_by_id, create_product, update_product, create_catalog, ) from .dummy_products import create_dummy_products
true
true
f7335d0fb2e6008745cd9a791fbda0096a6ea781
172,534
py
Python
nova/compute/api.py
nkrinner/nova
1372397d4f5f8c155af6f1f4ab5dc68be00c9c01
[ "Apache-2.0" ]
null
null
null
nova/compute/api.py
nkrinner/nova
1372397d4f5f8c155af6f1f4ab5dc68be00c9c01
[ "Apache-2.0" ]
null
null
null
nova/compute/api.py
nkrinner/nova
1372397d4f5f8c155af6f1f4ab5dc68be00c9c01
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
43.890613
79
0.599754
import base64 import functools import re import string import uuid from oslo.config import cfg import six from nova import availability_zones from nova import block_device from nova.cells import opts as cells_opts from nova.compute import flavors from nova.compute import instance_actions from nova....
true
true
f7335d5a4bcd975b1b405e0af50968afb9bf061a
782
py
Python
start_habittracker.py
nasch7kadse/habitTrackerIU
c2dcf1870641b857a130c67393a142140409ee91
[ "MIT" ]
null
null
null
start_habittracker.py
nasch7kadse/habitTrackerIU
c2dcf1870641b857a130c67393a142140409ee91
[ "MIT" ]
null
null
null
start_habittracker.py
nasch7kadse/habitTrackerIU
c2dcf1870641b857a130c67393a142140409ee91
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from habittracker.utils import connect_to_database, init_sqlite_table, check_file_existing from habittracker.commands import get_main_user_choice, display_title_bar, evaluate_main_user_choice def main(): database_name = "habits.db" # Initialize database when data...
27.928571
100
0.713555
from habittracker.utils import connect_to_database, init_sqlite_table, check_file_existing from habittracker.commands import get_main_user_choice, display_title_bar, evaluate_main_user_choice def main(): database_name = "habits.db" if not check_file_existing(database_name): init_sqlite_table(d...
true
true
f7335dca379a3a27904e683451f4ce5b30a570de
16,159
py
Python
raiden/transfer/mediated_transfer/state_change.py
gcarq/raiden
82241c6da9188c4e029aef3bb42f0ab9f055c0e4
[ "MIT" ]
null
null
null
raiden/transfer/mediated_transfer/state_change.py
gcarq/raiden
82241c6da9188c4e029aef3bb42f0ab9f055c0e4
[ "MIT" ]
null
null
null
raiden/transfer/mediated_transfer/state_change.py
gcarq/raiden
82241c6da9188c4e029aef3bb42f0ab9f055c0e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # pylint: disable=too-few-public-methods,too-many-arguments,too-many-instance-attributes from raiden.transfer.architecture import StateChange from raiden.transfer.state import RouteState from raiden.transfer.mediated_transfer.state import ( LockedTransferSignedState, TransferDescription...
31.871795
96
0.633641
from raiden.transfer.architecture import StateChange from raiden.transfer.state import RouteState from raiden.transfer.mediated_transfer.state import ( LockedTransferSignedState, TransferDescriptionWithSecretState, ) from raiden.utils import pex, sha3, typing class ActionInitInitiator(StateChange): ...
true
true
f7335e2c76e6d0dddc224e3f3cac3a81fe26e270
4,465
py
Python
profiles_api/views.py
nahmad33/profiles-rest-api
1bc0123d4494c047cd7fc271349f330296ec7aa1
[ "MIT" ]
null
null
null
profiles_api/views.py
nahmad33/profiles-rest-api
1bc0123d4494c047cd7fc271349f330296ec7aa1
[ "MIT" ]
8
2019-12-04T23:23:13.000Z
2021-06-10T18:15:48.000Z
profiles_api/views.py
nahmad33/profiles-rest-api
1bc0123d4494c047cd7fc271349f330296ec7aa1
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from profiles_api import serializers from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken....
36.900826
80
0.670101
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from profiles_api import serializers from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken....
true
true
f7335ebb44389b47d5b4cbe414212e31ed9b6d99
1,253
py
Python
workflow_scripts/test_generated_backend.py
L-Net-1992/onnx
acc127219b45bc27b0180b1fdc08299eac81b167
[ "Apache-2.0" ]
1
2022-03-04T03:29:37.000Z
2022-03-04T03:29:37.000Z
workflow_scripts/test_generated_backend.py
alsj213/onnx
35092895d9bf3592e58f4710d098f8131afef259
[ "Apache-2.0" ]
null
null
null
workflow_scripts/test_generated_backend.py
alsj213/onnx
35092895d9bf3592e58f4710d098f8131afef259
[ "Apache-2.0" ]
1
2022-03-27T19:17:02.000Z
2022-03-27T19:17:02.000Z
# SPDX-License-Identifier: Apache-2.0 import config import onnx import os import sys def main(): script_dir = os.path.dirname(os.path.abspath(__file__)) directory = os.path.join(script_dir, '../onnx/backend/test/data/node') count = failed_count = 0 for root, _, files in os.walk(directory): for...
33.864865
112
0.561852
import config import onnx import os import sys def main(): script_dir = os.path.dirname(os.path.abspath(__file__)) directory = os.path.join(script_dir, '../onnx/backend/test/data/node') count = failed_count = 0 for root, _, files in os.walk(directory): for file in files: if file.e...
true
true
f7336134fc7d178414150829b94c82c917adf6a3
758
py
Python
multitask/thread/05_mutexlock.py
Leo-super/python_base
733c4177b8fccab88563d91f7f262773d612f7a2
[ "MIT" ]
null
null
null
multitask/thread/05_mutexlock.py
Leo-super/python_base
733c4177b8fccab88563d91f7f262773d612f7a2
[ "MIT" ]
null
null
null
multitask/thread/05_mutexlock.py
Leo-super/python_base
733c4177b8fccab88563d91f7f262773d612f7a2
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import threading import time g_num = 0 def work1(num): global g_num for i in range(num): mutex.acquire() # 上锁 g_num += 1 mutex.release() # 解锁 # print("----in work1, g_num is %d---" % g_num) def work2(num): global g_num fo...
18.487805
55
0.583113
import threading import time g_num = 0 def work1(num): global g_num for i in range(num): mutex.acquire() g_num += 1 mutex.release() def work2(num): global g_num for i in range(num): mutex.acquire() g_num += 1 mutex.release() ...
true
true
f7336155b5a987e374f7ee577fe28f3ad39fd62a
3,303
py
Python
esm/model.py
konstin/esm
a39894c079ce314e1c0aaa607e8ae498111910a0
[ "MIT" ]
null
null
null
esm/model.py
konstin/esm
a39894c079ce314e1c0aaa607e8ae498111910a0
[ "MIT" ]
null
null
null
esm/model.py
konstin/esm
a39894c079ce314e1c0aaa607e8ae498111910a0
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import torch import torch.nn as nn import torch.nn.functional as F from .modules import TransformerLayer, PositionalEmbedding #...
31.759615
91
0.594611
import math import torch import torch.nn as nn import torch.nn.functional as F from .modules import TransformerLayer, PositionalEmbedding class ProteinBertModel(nn.Module): @classmethod def add_args(cls, parser): parser.add_argument( "--num_layers", default=36, type=int, metavar="...
true
true
f733615c76692988cddbcb5a9d2af2e0862a723d
716
py
Python
setup.py
ZeitOnline/bugsnag_exporter
5fccc42f7ae16d25fac086009b8f29a7316e2127
[ "BSD-3-Clause" ]
3
2019-11-29T23:09:54.000Z
2022-03-29T21:41:42.000Z
setup.py
ZeitOnline/bugsnag_exporter
5fccc42f7ae16d25fac086009b8f29a7316e2127
[ "BSD-3-Clause" ]
2
2021-06-24T11:17:26.000Z
2021-07-28T16:13:00.000Z
setup.py
ZeitOnline/bugsnag_exporter
5fccc42f7ae16d25fac086009b8f29a7316e2127
[ "BSD-3-Clause" ]
2
2021-07-27T11:42:45.000Z
2021-09-17T10:47:38.000Z
from setuptools import setup, find_packages setup( name='bugsnag_exporter', version='1.3.0.dev0', author='Wolfgang Schnerring', author_email='wolfgang.schnerring@zeit.de', url='https://github.com/ZeitOnline/bugsnag_exporter', description='', long_description=( open('README.rst').re...
24.689655
57
0.618715
from setuptools import setup, find_packages setup( name='bugsnag_exporter', version='1.3.0.dev0', author='Wolfgang Schnerring', author_email='wolfgang.schnerring@zeit.de', url='https://github.com/ZeitOnline/bugsnag_exporter', description='', long_description=( open('README.rst').re...
true
true
f733624b52386015544bec768023286f7efa8a41
131
py
Python
app/repositories/__init__.py
VadymHutei/ukubuka-back
acd56c545b50fb65ed764c19bdd03a42be969ce4
[ "MIT" ]
null
null
null
app/repositories/__init__.py
VadymHutei/ukubuka-back
acd56c545b50fb65ed764c19bdd03a42be969ce4
[ "MIT" ]
null
null
null
app/repositories/__init__.py
VadymHutei/ukubuka-back
acd56c545b50fb65ed764c19bdd03a42be969ce4
[ "MIT" ]
null
null
null
from repositories.category import CategoryRepo from repositories.product import ProductRepo from repositories.menu import MenuRepo
32.75
46
0.885496
from repositories.category import CategoryRepo from repositories.product import ProductRepo from repositories.menu import MenuRepo
true
true
f733625ac95acffdcaa0b4adec910eb366c92187
4,487
py
Python
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/ModifyCasterLayoutRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/ModifyCasterLayoutRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/ModifyCasterLayoutRequest.py
jia-jerry/aliyun-openapi-python-sdk
e90f3683a250cfec5b681b5f1d73a68f0dc9970d
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
45.785714
159
0.733452
from aliyunsdkcore.request import RpcRequest from aliyunsdklive.endpoint import endpoint_data class ModifyCasterLayoutRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'live', '2016-11-01', 'ModifyCasterLayout','live') self.set_method('POST') if hasattr(self, "endpoint_map"...
true
true
f73363a78664137e9e5f7d5ca28b784582396acd
301
py
Python
bcc/config/docs.py
yuvabedev/Bcc
c62b949d31f9571d99d91439c1ee5e0dc70e3763
[ "MIT" ]
null
null
null
bcc/config/docs.py
yuvabedev/Bcc
c62b949d31f9571d99d91439c1ee5e0dc70e3763
[ "MIT" ]
null
null
null
bcc/config/docs.py
yuvabedev/Bcc
c62b949d31f9571d99d91439c1ee5e0dc70e3763
[ "MIT" ]
null
null
null
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/bcc" # docs_base_url = "https://[org_name].github.io/bcc" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "Bcc"
25.083333
68
0.710963
def get_context(context): context.brand_html = "Bcc"
true
true
f733640869f502ecd9982d60021c2246a22b2fbd
1,689
py
Python
tests/test_workflow_get_version_single.py
Optimally-com/temporal-python-sdk
f636e5234c3b3b7d52cc891c9c40e3d257493806
[ "MIT" ]
null
null
null
tests/test_workflow_get_version_single.py
Optimally-com/temporal-python-sdk
f636e5234c3b3b7d52cc891c9c40e3d257493806
[ "MIT" ]
null
null
null
tests/test_workflow_get_version_single.py
Optimally-com/temporal-python-sdk
f636e5234c3b3b7d52cc891c9c40e3d257493806
[ "MIT" ]
null
null
null
import pytest from temporal import DEFAULT_VERSION from temporal.workflow import workflow_method, WorkflowClient, Workflow TASK_QUEUE = "test_workflow_get_version_single_tq" NAMESPACE = "default" version_found_in_step_1_0 = None version_found_in_step_1_1 = None version_found_in_step_2_0 = None version_found_in_step_...
31.867925
84
0.748372
import pytest from temporal import DEFAULT_VERSION from temporal.workflow import workflow_method, WorkflowClient, Workflow TASK_QUEUE = "test_workflow_get_version_single_tq" NAMESPACE = "default" version_found_in_step_1_0 = None version_found_in_step_1_1 = None version_found_in_step_2_0 = None version_found_in_step_...
true
true
f7336498ebcfe3ed197095006aff2fe2f8850db4
7,743
py
Python
cardinal_pythonlib/django/function_cache.py
bopopescu/pythonlib
9c2187d6092ba133342ca3374eb7c86f9d296c30
[ "Apache-2.0" ]
null
null
null
cardinal_pythonlib/django/function_cache.py
bopopescu/pythonlib
9c2187d6092ba133342ca3374eb7c86f9d296c30
[ "Apache-2.0" ]
null
null
null
cardinal_pythonlib/django/function_cache.py
bopopescu/pythonlib
9c2187d6092ba133342ca3374eb7c86f9d296c30
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # cardinal_pythonlib/django/function_cache.py """ =============================================================================== Original code copyright (C) 2009-2020 Rudolf Cardinal (rudolf@pobox.com). This file is part of cardinal_pythonlib. Licensed under the Apache License, Ve...
42.779006
88
0.62069
import hashlib from typing import Any, Callable, Dict, Tuple from django.core.cache import cache from cardinal_pythonlib.logs import get_brace_style_log_with_null_handler from cardinal_pythonlib.json.serialize import json_encode log = get_brace_style_log_with_null_handler(__name__) FunctionType = Callable[.....
true
true
f733650de6530fb57a4ba3608b453116c353d1ef
13,365
py
Python
BlockServer/synoptic/synoptic_manager.py
ISISComputingGroup/EPICS-inst_servers
056fed778ebd1190421e06b9ac9c8a0bdae0d317
[ "BSD-3-Clause" ]
1
2020-08-20T23:38:53.000Z
2020-08-20T23:38:53.000Z
BlockServer/synoptic/synoptic_manager.py
ISISComputingGroup/EPICS-inst_servers
056fed778ebd1190421e06b9ac9c8a0bdae0d317
[ "BSD-3-Clause" ]
88
2015-09-03T11:50:41.000Z
2021-02-18T19:13:04.000Z
BlockServer/synoptic/synoptic_manager.py
ISISComputingGroup/EPICS-inst_servers
056fed778ebd1190421e06b9ac9c8a0bdae0d317
[ "BSD-3-Clause" ]
1
2020-08-20T23:38:05.000Z
2020-08-20T23:38:05.000Z
# This file is part of the ISIS IBEX application. # Copyright (C) 2012-2016 Science & Technology Facilities Council. # All rights reserved. # # This program is distributed in the hope that it will be useful. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License...
43.676471
157
0.655518
import os from typing import List, TYPE_CHECKING if TYPE_CHECKING: from block_server import BlockServer from BlockServer.core.active_config_holder import ActiveConfigHolder from BlockServer.core.config_list_manager import InvalidDeleteException from BlockServer.core.file_path_manager import FILEPAT...
true
true
f73365e6e3d420feda037f285b058fa882baab4e
1,158
py
Python
jokenpo/jokenpo.py
rhoenkelevra/python_simple_applications
28ceb5f9fe7ecf11d606d49463385e92927e8f98
[ "MIT" ]
null
null
null
jokenpo/jokenpo.py
rhoenkelevra/python_simple_applications
28ceb5f9fe7ecf11d606d49463385e92927e8f98
[ "MIT" ]
null
null
null
jokenpo/jokenpo.py
rhoenkelevra/python_simple_applications
28ceb5f9fe7ecf11d606d49463385e92927e8f98
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jul 7 12:21:28 2021 @author: user15 """ from random import choice counter = 0 def randomize(): jokenpo_value = ['gu', 'choki', 'pa'] machine = choice(jokenpo_value) return machine # get input from user def init_game(counter): if coun...
26.930233
147
0.554404
from random import choice counter = 0 def randomize(): jokenpo_value = ['gu', 'choki', 'pa'] machine = choice(jokenpo_value) return machine def init_game(counter): if counter == 0: user = input("Jokenpo! \n ==>") randomize() check(user, randomize(), count...
true
true
f73366187f0693efac62a3212f465c090331d647
3,102
py
Python
pypureclient/pure1/Pure1_1_1/models/volume_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/pure1/Pure1_1_1/models/volume_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/pure1/Pure1_1_1/models/volume_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ Pure1 Public REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from...
27.696429
105
0.540297
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.pure1.Pure1_1_1 import models class VolumeResponse(object): swagger_types = { 'items': 'list[Volume]' } attribute_map = { 'items': 'items' } re...
true
true
f73367d3c6911639c46868b04d5d6592fa7e6d0e
6,205
py
Python
common/response.py
weicunheng/test-studio
5bff2d94e6252c1689d6ae74529d0fd30fb20c0d
[ "Apache-2.0" ]
1
2020-06-07T04:38:10.000Z
2020-06-07T04:38:10.000Z
common/response.py
weicunheng/test-studio
5bff2d94e6252c1689d6ae74529d0fd30fb20c0d
[ "Apache-2.0" ]
null
null
null
common/response.py
weicunheng/test-studio
5bff2d94e6252c1689d6ae74529d0fd30fb20c0d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import json import logging from collections import OrderedDict from rest_framework import exceptions from rest_framework.views import APIView, exception_handler from common import error_code from django.utils.translation import gettext as _ logger = logging.getLogger("api-request") ...
51.708333
118
0.560193
import json import logging from collections import OrderedDict from rest_framework import exceptions from rest_framework.views import APIView, exception_handler from common import error_code from django.utils.translation import gettext as _ logger = logging.getLogger("api-request") def custom_exception_h...
true
true
f7336916020b5d05bdc314a380e56dece473f4f4
42,589
py
Python
src/m2ee.py
rus-kh/m2ee-tools
70000796a53131bb1cd8d199f48cd5e7aab2c505
[ "BSD-3-Clause" ]
23
2015-11-26T12:05:45.000Z
2022-03-17T10:24:22.000Z
src/m2ee.py
rus-kh/m2ee-tools
70000796a53131bb1cd8d199f48cd5e7aab2c505
[ "BSD-3-Clause" ]
54
2016-07-26T12:44:07.000Z
2022-02-17T10:08:01.000Z
src/m2ee.py
rus-kh/m2ee-tools
70000796a53131bb1cd8d199f48cd5e7aab2c505
[ "BSD-3-Clause" ]
34
2015-01-04T07:05:48.000Z
2022-02-15T10:23:52.000Z
#!/usr/bin/python # # Copyright (C) 2009 Mendix. All rights reserved. # from __future__ import print_function import argparse import atexit import cmd import datetime import getpass import logging import os import pwd import random import shlex import signal import string import subprocess import sys import yaml from...
40.52236
98
0.578248
from __future__ import print_function import argparse import atexit import cmd import datetime import getpass import logging import os import pwd import random import shlex import signal import string import subprocess import sys import yaml from m2ee import pgutil, M2EE, client_errno import m2ee logger = loggin...
true
true
f73369f05498ba862606e49029c1076513b94743
48,777
py
Python
Bot/src/funhouse/image.py
AryamanSrii/Mecha-Karen
4a5c7318f8c458495eee72a13be5db8a0113ed28
[ "Apache-2.0" ]
181
2021-05-26T17:37:40.000Z
2022-02-26T08:36:07.000Z
Bot/src/funhouse/image.py
AryamanSrii/Mecha-Karen
4a5c7318f8c458495eee72a13be5db8a0113ed28
[ "Apache-2.0" ]
24
2021-05-14T19:47:34.000Z
2021-09-06T17:16:17.000Z
Bot/src/funhouse/image.py
AryamanSrii/Mecha-Karen
4a5c7318f8c458495eee72a13be5db8a0113ed28
[ "Apache-2.0" ]
16
2021-07-02T09:40:56.000Z
2022-01-21T10:07:08.000Z
# !/usr/bin/python """ Copyright ©️: 2020 Seniatical / _-*™#7519 License: Apache 2.0 A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under differe...
42.194637
143
0.605101
import typing import discord from discord.ext import commands from discord.ext.commands import BucketType from PIL import Image, ImageDraw from io import BytesIO import aiohttp import MK import numpy as np import random import cv2 from core._ import extract_ from core._.image.effects import * from core._.image._ i...
true
true
f7336aaaab6d57e94457316d900de647ea9d62a5
2,672
py
Python
amt/load/load.py
bellockk/amtool
3650697120ac384ac3a0020c84b790ca734df218
[ "MIT" ]
null
null
null
amt/load/load.py
bellockk/amtool
3650697120ac384ac3a0020c84b790ca734df218
[ "MIT" ]
2
2019-05-30T11:17:51.000Z
2021-11-15T17:48:34.000Z
amt/load/load.py
bellockk/amtool
3650697120ac384ac3a0020c84b790ca734df218
[ "MIT" ]
null
null
null
""" amt-load -- Artifact Management Tool Reader amt is a Tool for managing software artifacts It defines classes_and_methods and a command line interface @author: Kenneth E. Bellock @copyright: @contact: ken@bellock.net """ import os import sys import yaml import logging __all__ = ['load'] SCRIPT_PATH = o...
29.362637
77
0.66729
import os import sys import yaml import logging __all__ = ['load'] SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(os.path.dirname(SCRIPT_PATH), 'meta')) from meta import MetaDict from meta import MetaList def _load_file(filename): logging.debug('Loading File: %s', filen...
true
true
f7336b17920237a1d0b1bc08dd860d5794e243b0
928
py
Python
string_processor.py
Christakou/hand-odds
eb4dd29013af01ec15d806e5c23699174f4f9731
[ "MIT" ]
null
null
null
string_processor.py
Christakou/hand-odds
eb4dd29013af01ec15d806e5c23699174f4f9731
[ "MIT" ]
null
null
null
string_processor.py
Christakou/hand-odds
eb4dd29013af01ec15d806e5c23699174f4f9731
[ "MIT" ]
null
null
null
import re from parallel import hand_odds if __name__ == '__main__': while True: class_string = input('Paste html extract:') split = (class_string.split(',')) number_of_players = int(split[-1]) split = split[:-1] print(split) match_list = [] suits = [] ...
44.190476
128
0.563578
import re from parallel import hand_odds if __name__ == '__main__': while True: class_string = input('Paste html extract:') split = (class_string.split(',')) number_of_players = int(split[-1]) split = split[:-1] print(split) match_list = [] suits = [] ...
true
true
f7336b996d7cef44e383a2beac1901fa21fa9302
34,065
py
Python
pyfolio/tears.py
NunoEdgarGFlowHub/pyfolio
68efdcc2e2d0f140ddbc408a260c6318ac8b06d3
[ "Apache-2.0" ]
null
null
null
pyfolio/tears.py
NunoEdgarGFlowHub/pyfolio
68efdcc2e2d0f140ddbc408a260c6318ac8b06d3
[ "Apache-2.0" ]
null
null
null
pyfolio/tears.py
NunoEdgarGFlowHub/pyfolio
68efdcc2e2d0f140ddbc408a260c6318ac8b06d3
[ "Apache-2.0" ]
null
null
null
# # Copyright 2015 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
38.535068
79
0.632144
from __future__ import division from time import time import warnings import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np import scipy.stats import pandas as pd from . import timeseries from . import utils from . import pos from . import txn from . import round_tri...
true
true
f7336bdf9847143a0d02d85407d6bf32a0fb39a0
3,115
py
Python
qa/rpc-tests/invalidateblock.py
mirzaei-ce/core-kakobit
82912c3843f5b7c2e2bc27ed4e22a54062d9a356
[ "MIT" ]
null
null
null
qa/rpc-tests/invalidateblock.py
mirzaei-ce/core-kakobit
82912c3843f5b7c2e2bc27ed4e22a54062d9a356
[ "MIT" ]
null
null
null
qa/rpc-tests/invalidateblock.py
mirzaei-ce/core-kakobit
82912c3843f5b7c2e2bc27ed4e22a54062d9a356
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test InvalidateBlock code # from test_framework.test_framework import KakobitTestFramework from test...
40.986842
95
0.646549
from test_framework.test_framework import KakobitTestFramework from test_framework.util import * class InvalidateTest(KakobitTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) initialize_chain_clean(self.options.tmpdir, 3) ...
false
true
f7336c722d6dcb3980e9f16f6deb293bb4996a15
5,006
py
Python
sdks/python/pb_client/v1/code_ref_pb2.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
sdks/python/pb_client/v1/code_ref_pb2.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
sdks/python/pb_client/v1/code_ref_pb2.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2019 Polyaxon, 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 o...
34.524138
384
0.754495
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_dat...
true
true
f7336d63b11b71ef3f7925c35364b9ed2482e280
1,499
py
Python
webexteamssdk/config.py
fracaen/webexteamssdk
673312779b8e05cf0535bea8b96599015cccbff1
[ "MIT" ]
118
2018-09-13T18:06:34.000Z
2022-03-30T05:16:36.000Z
webexteamssdk/config.py
fracaen/webexteamssdk
673312779b8e05cf0535bea8b96599015cccbff1
[ "MIT" ]
88
2018-10-08T21:57:02.000Z
2022-02-26T06:33:33.000Z
webexteamssdk/config.py
fracaen/webexteamssdk
673312779b8e05cf0535bea8b96599015cccbff1
[ "MIT" ]
86
2018-09-10T09:42:01.000Z
2022-03-30T05:38:14.000Z
# -*- coding: utf-8 -*- """Package configuration. Copyright (c) 2016-2020 Cisco and/or its affiliates. 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 limit...
36.560976
78
0.791194
DEFAULT_BASE_URL = "https://webexapis.com/v1/" DEFAULT_SINGLE_REQUEST_TIMEOUT = 60 DEFAULT_WAIT_ON_RATE_LIMIT = True ACCESS_TOKEN_ENVIRONMENT_VARIABLE = "WEBEX_TEAMS_ACCESS_TOKEN" LEGACY_ACCESS_TOKEN_ENVIRONMENT_VARIABLES = [ "SPARK_ACCESS_TOKEN", "CISCO_SPARK_ACCESS_TOKEN", ] WEBEX_TEAMS_DATETIME_FORM...
true
true
f7336e1195419937326e1ec785bc38d6a76f9995
2,418
py
Python
attune/_discrete_tune.py
wright-group/WrightTune
e9a4937b6fda24dfd10baf2fc674c15542861aba
[ "MIT" ]
2
2020-08-20T14:26:19.000Z
2021-07-19T22:51:19.000Z
attune/_discrete_tune.py
wright-group/attune
67b7e5590a11e9b09056e7d334fd7d7286a24c5f
[ "MIT" ]
96
2017-10-12T01:16:01.000Z
2022-02-23T19:43:57.000Z
attune/_discrete_tune.py
wright-group/WrightTune
e9a4937b6fda24dfd10baf2fc674c15542861aba
[ "MIT" ]
2
2021-08-17T22:22:06.000Z
2021-09-01T02:30:06.000Z
__all__ = ["DiscreteTune"] from typing import Dict, Tuple, Optional import WrightTools as wt class DiscreteTune: def __init__( self, ranges: Dict[str, Tuple[float, float]], default: Optional[str] = None, **kwargs ): """A Tune which maps one set of inputs to associated output points. ...
34.542857
98
0.62531
__all__ = ["DiscreteTune"] from typing import Dict, Tuple, Optional import WrightTools as wt class DiscreteTune: def __init__( self, ranges: Dict[str, Tuple[float, float]], default: Optional[str] = None, **kwargs ): self._ind_units = "nm" self._ranges = {k: tuple(v) for k, v in range...
true
true
f7336e26b0d826f1fdcbd47cad6a86e63f03e812
51,236
py
Python
btcgreen/timelord/timelord.py
BTChia-Network/btchia-blockchain
2ab991f6b207872b17ce237ebe409defb96cd524
[ "Apache-2.0" ]
19
2021-08-09T21:21:09.000Z
2022-03-18T02:27:13.000Z
btcgreen/timelord/timelord.py
BTChia-Network/btchia-blockchain
2ab991f6b207872b17ce237ebe409defb96cd524
[ "Apache-2.0" ]
29
2021-08-13T12:05:09.000Z
2022-03-20T19:30:36.000Z
btcgreen/timelord/timelord.py
BTChia-Network/btchia-blockchain
2ab991f6b207872b17ce237ebe409defb96cd524
[ "Apache-2.0" ]
4
2021-08-18T16:42:30.000Z
2022-03-15T08:24:58.000Z
import asyncio import dataclasses import io import logging import random import time import traceback from typing import Callable, Dict, List, Optional, Tuple, Set from chiavdf import create_discriminant from btcgreen.consensus.constants import ConsensusConstants from btcgreen.consensus.pot_iterations import calculat...
49.455598
120
0.562905
import asyncio import dataclasses import io import logging import random import time import traceback from typing import Callable, Dict, List, Optional, Tuple, Set from chiavdf import create_discriminant from btcgreen.consensus.constants import ConsensusConstants from btcgreen.consensus.pot_iterations import calculat...
true
true
f7336e48fc87caab09cea47cc49e91a87202fb5f
1,502
py
Python
saarland/saarlouis.py
risklayer/corona-landkreis-crawler
2e82448ff614240365de9493eafa0e6a620ac615
[ "Unlicense" ]
12
2022-02-23T11:06:06.000Z
2022-03-04T17:21:44.000Z
saarland/saarlouis.py
risklayer/corona-landkreis-crawler
2e82448ff614240365de9493eafa0e6a620ac615
[ "Unlicense" ]
null
null
null
saarland/saarlouis.py
risklayer/corona-landkreis-crawler
2e82448ff614240365de9493eafa0e6a620ac615
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 from botbase import * _saarlouis_c = re.compile(r"insgesamt:\s*([0-9.]+)") _saarlouis_d = re.compile(r"Verstorben:\s*([0-9.]+)") _saarlouis_g = re.compile(r"Genesen:\s*([0-9.]+)") def saarlouis(sheets): import bs4 soup = get_soup("https://www.kreis-saarlouis.de/Corona-Virus/Corona-Ticker.ht...
39.526316
153
0.601864
from botbase import * _saarlouis_c = re.compile(r"insgesamt:\s*([0-9.]+)") _saarlouis_d = re.compile(r"Verstorben:\s*([0-9.]+)") _saarlouis_g = re.compile(r"Genesen:\s*([0-9.]+)") def saarlouis(sheets): import bs4 soup = get_soup("https://www.kreis-saarlouis.de/Corona-Virus/Corona-Ticker.htm?") content =...
true
true
f7336ebeb8aababd8d8856c28bbf476489d49a70
6,193
py
Python
bin/circlepack.py
brsr/mapproj
1ec1694149a69da6393ecb94650f7164e3cfd2e1
[ "MIT" ]
null
null
null
bin/circlepack.py
brsr/mapproj
1ec1694149a69da6393ecb94650f7164e3cfd2e1
[ "MIT" ]
null
null
null
bin/circlepack.py
brsr/mapproj
1ec1694149a69da6393ecb94650f7164e3cfd2e1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Feb 14 14:15:06 2021 @author: brsr """ import numpy as np import matplotlib.pyplot as plt import mapproj import fiona from shapely.geometry import Point, LineString, MultiPolygon, Polygon import geopandas import pyproj geod = pyproj.Geod(a=1, f=0) n = ...
32.941489
80
0.596964
import numpy as np import matplotlib.pyplot as plt import mapproj import fiona from shapely.geometry import Point, LineString, MultiPolygon, Polygon import geopandas import pyproj geod = pyproj.Geod(a=1, f=0) n = 9 a = np.arctan(1/2)/np.pi*180 actrlpts3 = np.array([[15+0, 15+36, 15-36], [-a, a,...
true
true
f7336f7066b821195e768f37cb19a037ee3fe872
568
py
Python
src/yaplox/yaplox_callable.py
RoelAdriaans/yaplox
1cfce99cf44318a50838503872b61b2740b010d6
[ "Unlicense" ]
6
2020-11-22T09:42:04.000Z
2021-12-13T02:12:48.000Z
src/yaplox/yaplox_callable.py
cfbolz/yaplox
1efcdfad44890567a4a6c09325e5f1a377431bcc
[ "Unlicense" ]
103
2020-08-13T10:06:41.000Z
2021-06-23T07:14:31.000Z
src/yaplox/yaplox_callable.py
cfbolz/yaplox
1efcdfad44890567a4a6c09325e5f1a377431bcc
[ "Unlicense" ]
1
2021-01-15T10:09:17.000Z
2021-01-15T10:09:17.000Z
from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Any, List # This is a hack to prevent circular imports; since Interpreter imports from this file, # we will only import it during the type_checking run from mypy if TYPE_CHECKING: from yaplox.interpreter impor...
28.4
87
0.762324
from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Any, List if TYPE_CHECKING: from yaplox.interpreter import Interpreter class YaploxCallable(ABC): @abstractmethod def call(self, interpreter: Interpreter, arguments: List[Any]): raise NotIm...
true
true
f7336f81bb070dbec84f33919939245747a64b7a
12,269
py
Python
minitests/opentitan/src.vivado/runme.py
common-config-bot/prjuray
c550b03a26b4c4a9c4453353bd642a21f710b3ec
[ "Apache-2.0" ]
2
2022-03-18T00:17:38.000Z
2022-03-28T22:57:58.000Z
minitests/opentitan/src.vivado/runme.py
common-config-bot/prjuray
c550b03a26b4c4a9c4453353bd642a21f710b3ec
[ "Apache-2.0" ]
null
null
null
minitests/opentitan/src.vivado/runme.py
common-config-bot/prjuray
c550b03a26b4c4a9c4453353bd642a21f710b3ec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2022 F4PGA Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
44.133094
86
0.754666
import edalize import os work_root = 'build' post_imp_file = os.path.realpath(os.path.join(work_root, 'post.tcl')) os.makedirs(work_root, exist_ok=True) synth_tool = 'vivado' srcs = [ 'lowrisc_constants_top_pkg_0/rtl/top_pkg.sv', 'lowrisc_dv_pins_if_0/pins_if.sv', 'lowrisc_prim_gener...
true
true
f7336fab8f9af014b50119e9dc329873ac910b54
3,205
py
Python
main.py
Marco-Cen/cuHack
8e84fc2f49e7ba93d424ae5297980592b2b7f68c
[ "MIT" ]
null
null
null
main.py
Marco-Cen/cuHack
8e84fc2f49e7ba93d424ae5297980592b2b7f68c
[ "MIT" ]
null
null
null
main.py
Marco-Cen/cuHack
8e84fc2f49e7ba93d424ae5297980592b2b7f68c
[ "MIT" ]
null
null
null
######################################################################## # Impoorts Required for Flask Server Functionality ######################################################################## from flask import Flask, render_template, url_for, abort, redirect, request ##############################################...
47.835821
91
0.663027
true
true