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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f74d4c898d06df910c626ea36dbe108ca83084bc
2,863
py
Python
azext_iot/sdk/iothub/device/models/module_py3.py
lucadruda/azure-iot-cli-extension
9d2f677d19580f8fbac860e079550167e743a237
[ "MIT" ]
79
2017-09-25T19:29:17.000Z
2022-03-30T20:55:57.000Z
azext_iot/sdk/iothub/device/models/module_py3.py
lucadruda/azure-iot-cli-extension
9d2f677d19580f8fbac860e079550167e743a237
[ "MIT" ]
305
2018-01-17T01:12:10.000Z
2022-03-23T22:38:11.000Z
azext_iot/sdk/iothub/device/models/module_py3.py
lucadruda/azure-iot-cli-extension
9d2f677d19580f8fbac860e079550167e743a237
[ "MIT" ]
69
2017-11-14T00:30:46.000Z
2022-03-01T17:11:45.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.378788
295
0.655955
from msrest.serialization import Model class Module(Model): _attribute_map = { 'module_id': {'key': 'moduleId', 'type': 'str'}, 'managed_by': {'key': 'managedBy', 'type': 'str'}, 'device_id': {'key': 'deviceId', 'type': 'str'}, 'generation_id': {'key': 'generationId', '...
true
true
f74d4cfa9ec159f9f20397cf8ade3a0d19fcc9cf
11,669
py
Python
clients/kratos/python/ory_kratos_client/model/json_error.py
tobbbles/sdk
017ca2fd46019bafd1853913b6c0f2b0fe687621
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/ory_kratos_client/model/json_error.py
tobbbles/sdk
017ca2fd46019bafd1853913b6c0f2b0fe687621
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/ory_kratos_client/model/json_error.py
tobbbles/sdk
017ca2fd46019bafd1853913b6c0f2b0fe687621
[ "Apache-2.0" ]
null
null
null
""" Ory Kratos API Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini...
43.379182
446
0.579655
import re import sys from ory_kratos_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) ...
true
true
f74d4d84fdf27373fc50cc41637eccc1336f4f87
1,094
py
Python
procurement_portal/records/admin.py
TomaszKolek/procurement-portal-backend
d51e4e2d2df87e6cddabbe56ddaa813daa96c613
[ "MIT" ]
null
null
null
procurement_portal/records/admin.py
TomaszKolek/procurement-portal-backend
d51e4e2d2df87e6cddabbe56ddaa813daa96c613
[ "MIT" ]
null
null
null
procurement_portal/records/admin.py
TomaszKolek/procurement-portal-backend
d51e4e2d2df87e6cddabbe56ddaa813daa96c613
[ "MIT" ]
null
null
null
from django.contrib import admin from . import models class DatasetVersionInline(admin.TabularInline): model = models.DatasetVersion class DatasetAdmin(admin.ModelAdmin): inlines = [ DatasetVersionInline, ] admin.site.register(models.Repository) admin.site.register(models.Dataset, DatasetAdmi...
21.45098
63
0.647166
from django.contrib import admin from . import models class DatasetVersionInline(admin.TabularInline): model = models.DatasetVersion class DatasetAdmin(admin.ModelAdmin): inlines = [ DatasetVersionInline, ] admin.site.register(models.Repository) admin.site.register(models.Dataset, DatasetAdmi...
true
true
f74d4dec37d2b0081fdcb1c6eadef8e7acc5d6e6
2,206
py
Python
src/jukeboxcore/gui/widgets/releasewin_ui.py
JukeboxPipeline/jukebox-core
bac2280ca49940355270e4b69400ce9976ab2e6f
[ "BSD-3-Clause" ]
2
2015-01-22T17:39:10.000Z
2015-03-31T09:03:24.000Z
src/jukeboxcore/gui/widgets/releasewin_ui.py
JukeboxPipeline/jukebox-core
bac2280ca49940355270e4b69400ce9976ab2e6f
[ "BSD-3-Clause" ]
3
2016-10-28T16:11:14.000Z
2020-06-05T17:46:08.000Z
src/jukeboxcore/gui/widgets/releasewin_ui.py
JukeboxPipeline/jukebox-core
bac2280ca49940355270e4b69400ce9976ab2e6f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'h:\projects\jukebox-core\src\jukeboxcore\gui\widgets\releasewin.ui' # # Created: Mon Nov 03 16:58:04 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCor...
45.958333
130
0.724841
from PySide import QtCore, QtGui class Ui_release_mwin(object): def setupUi(self, release_mwin): release_mwin.setObjectName("release_mwin") release_mwin.resize(1009, 764) self.central_widget = QtGui.QWidget(release_mwin) self.central_widget.setObjectName("central_widget") ...
true
true
f74d4ea81a9154afa5e1374b5fd8c7a2281084e6
822
py
Python
configs/paths_config.py
johnberg1/psp_s
717f4c448a4e7537cf4b74067d454c7644609ca3
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
configs/paths_config.py
johnberg1/psp_s
717f4c448a4e7537cf4b74067d454c7644609ca3
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
configs/paths_config.py
johnberg1/psp_s
717f4c448a4e7537cf4b74067d454c7644609ca3
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
null
null
null
dataset_paths = { 'celeba_train': '/scratch/users/abaykal20/sam/SAM/mmcelebhq/train_images/', 'celeba_test': '/scratch/users/abaykal20/sam/SAM/mmcelebhq/test_images/', 'celeba_train_sketch': '', 'celeba_test_sketch': '', 'celeba_train_segmentation': '', 'celeba_test_segmentation': '', 'ffhq': '/datasets/CelebAMa...
39.142857
76
0.76399
dataset_paths = { 'celeba_train': '/scratch/users/abaykal20/sam/SAM/mmcelebhq/train_images/', 'celeba_test': '/scratch/users/abaykal20/sam/SAM/mmcelebhq/test_images/', 'celeba_train_sketch': '', 'celeba_test_sketch': '', 'celeba_train_segmentation': '', 'celeba_test_segmentation': '', 'ffhq': '/datasets/CelebAMa...
true
true
f74d4ec19a65c1d8761a4cea1f879e5436e70e76
18,208
py
Python
LogSystem_JE/venv/Lib/site-packages/pygments/lexers/factor.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
LogSystem_JE/venv/Lib/site-packages/pygments/lexers/factor.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
LogSystem_JE/venv/Lib/site-packages/pygments/lexers/factor.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pygments.lexers.factor ~~~~~~~~~~~~~~~~~~~~~~ Lexers for the Factor language. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, default...
52.776812
107
0.50033
import re from pygments.lexer import RegexLexer, bygroups, default, words from pygments.token import Text, Comment, Keyword, Name, String, Number __all__ = ['FactorLexer'] class FactorLexer(RegexLexer): name = 'Factor' aliases = ['factor'] filenames = ['*.factor'] mimetypes = ['text/x...
true
true
f74d4f5af0f2eacfd823e2154327603a10098491
6,914
py
Python
LeetCode/hard/binary_tree_maximum_path_sum.py
hnc01/online-judge
d306dc32c9d8600a987affbe4e4b80809f0b0982
[ "MIT" ]
null
null
null
LeetCode/hard/binary_tree_maximum_path_sum.py
hnc01/online-judge
d306dc32c9d8600a987affbe4e4b80809f0b0982
[ "MIT" ]
null
null
null
LeetCode/hard/binary_tree_maximum_path_sum.py
hnc01/online-judge
d306dc32c9d8600a987affbe4e4b80809f0b0982
[ "MIT" ]
null
null
null
''' https://leetcode.com/problems/binary-tree-maximum-path-sum/ 124. Binary Tree Maximum Path Sum A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. Note that the path does n...
38.842697
140
0.633353
import random class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def maxPathSum(self, root: [TreeNode]) -> int: def maxPathSumHelper(node): if node is None: ...
true
true
f74d50ca0a5b67a157ee8d47a0cfa49b431650b0
6,136
py
Python
tests/test_filealchemy.py
calpt/flask-filealchemy
b3575299f0230d5a64865af8066122c2e0c485ec
[ "MIT" ]
null
null
null
tests/test_filealchemy.py
calpt/flask-filealchemy
b3575299f0230d5a64865af8066122c2e0c485ec
[ "MIT" ]
null
null
null
tests/test_filealchemy.py
calpt/flask-filealchemy
b3575299f0230d5a64865af8066122c2e0c485ec
[ "MIT" ]
null
null
null
from textwrap import dedent import pytest from sqlalchemy import Column, ForeignKey, String, Text from sqlalchemy.orm import relationship from flask_filealchemy import FileAlchemy, LoadError def test_directory_does_not_exist(db): app = db.get_app() class Author(db.Model): __tablename__ = 'authors' ...
25.044898
67
0.605443
from textwrap import dedent import pytest from sqlalchemy import Column, ForeignKey, String, Text from sqlalchemy.orm import relationship from flask_filealchemy import FileAlchemy, LoadError def test_directory_does_not_exist(db): app = db.get_app() class Author(db.Model): __tablename__ = 'authors' ...
true
true
f74d50d6ed0e8ce2ffae743a640212a4bb68d598
7,423
py
Python
kubernetes_asyncio/client/models/v1beta1_validating_webhook_configuration_list.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_validating_webhook_configuration_list.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1beta1_validating_webhook_configuration_list.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.15.9 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
36.033981
295
0.652432
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1beta1ValidatingWebhookConfigurationList(object): openapi_types = { 'api_version': 'str', 'items': 'list[V1beta1ValidatingWebhookConfiguration]', 'kind': 'str', 'met...
true
true
f74d519e41f8b45eb1aa661ada3477ccfe039409
390
py
Python
examples/migrations/0016_parsed_data_url.py
kimbackdoo/Web-Cralwer
6a92ec00ea2273f228b8c304cd596ad9120c4709
[ "MIT" ]
null
null
null
examples/migrations/0016_parsed_data_url.py
kimbackdoo/Web-Cralwer
6a92ec00ea2273f228b8c304cd596ad9120c4709
[ "MIT" ]
null
null
null
examples/migrations/0016_parsed_data_url.py
kimbackdoo/Web-Cralwer
6a92ec00ea2273f228b8c304cd596ad9120c4709
[ "MIT" ]
null
null
null
# Generated by Django 2.1.11 on 2020-06-08 07:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('examples', '0015_img_data_img_folder_path'), ] operations = [ migrations.AddField( model_name='parsed_data', name='...
20.526316
54
0.597436
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('examples', '0015_img_data_img_folder_path'), ] operations = [ migrations.AddField( model_name='parsed_data', name='url', field=models.URLField(default=...
true
true
f74d5267be0718666cc080e859a63fcc7b354473
272
py
Python
provider/utils.py
marinewater/pyramid-social-auth
926f230294ec6b0fdf02a5ed4113073d82a9d18c
[ "MIT" ]
2
2015-02-10T01:19:21.000Z
2016-07-24T14:40:59.000Z
provider/utils.py
marinewater/pyramid-social-auth
926f230294ec6b0fdf02a5ed4113073d82a9d18c
[ "MIT" ]
null
null
null
provider/utils.py
marinewater/pyramid-social-auth
926f230294ec6b0fdf02a5ed4113073d82a9d18c
[ "MIT" ]
null
null
null
from provider.facebook import FacebookProvider providers = { 'facebook': FacebookProvider } def get_provider(provider): if provider in providers: return providers[provider] else: raise NotImplementedError('no provider named "%s"' % provider)
22.666667
70
0.713235
from provider.facebook import FacebookProvider providers = { 'facebook': FacebookProvider } def get_provider(provider): if provider in providers: return providers[provider] else: raise NotImplementedError('no provider named "%s"' % provider)
true
true
f74d53587c47812cfa6d9fda36bb51fadfd86931
12,231
py
Python
splinter/driver/zopetestbrowser.py
StephenDavidson/splinter
54620f60a565f76d6b7b43560cc5c41deebf53ab
[ "BSD-3-Clause" ]
null
null
null
splinter/driver/zopetestbrowser.py
StephenDavidson/splinter
54620f60a565f76d6b7b43560cc5c41deebf53ab
[ "BSD-3-Clause" ]
null
null
null
splinter/driver/zopetestbrowser.py
StephenDavidson/splinter
54620f60a565f76d6b7b43560cc5c41deebf53ab
[ "BSD-3-Clause" ]
1
2015-01-09T02:04:45.000Z
2015-01-09T02:04:45.000Z
# -*- coding: utf-8 -*- # Copyright 2012 splinter authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import re from lxml.cssselect import CSSSelector from zope.testbrowser.browser import Browser, ListControl from splinter.element_list i...
31.361538
126
0.639931
import re from lxml.cssselect import CSSSelector from zope.testbrowser.browser import Browser, ListControl from splinter.element_list import ElementList from splinter.exceptions import ElementDoesNotExist from splinter.driver import DriverAPI, ElementAPI from splinter.cookie_manager import CookieManagerAPI impo...
true
true
f74d56a213ee0b608fbd16b3104179e8a9ea70aa
3,434
py
Python
cxray/predict-cls-vis.py
aaalgo/aardvark
cdd42acdc20e85f4b3070dd1486f3dc9c9a9b905
[ "BSD-2-Clause" ]
2
2018-07-31T07:02:18.000Z
2018-08-01T13:16:30.000Z
cxray/predict-cls-vis.py
aaalgo/aardvark
cdd42acdc20e85f4b3070dd1486f3dc9c9a9b905
[ "BSD-2-Clause" ]
null
null
null
cxray/predict-cls-vis.py
aaalgo/aardvark
cdd42acdc20e85f4b3070dd1486f3dc9c9a9b905
[ "BSD-2-Clause" ]
4
2018-07-02T22:02:46.000Z
2018-07-31T07:30:26.000Z
#!/usr/bin/env python3 import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' sys.path.append('..') import numpy as np import cv2 import tensorflow as tf from tensorflow.python.framework import meta_graph from mold import Scaling from gallery import Gallery from chest import * class Model: def __init__ (sel...
35.770833
143
0.576296
import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' sys.path.append('..') import numpy as np import cv2 import tensorflow as tf from tensorflow.python.framework import meta_graph from mold import Scaling from gallery import Gallery from chest import * class Model: def __init__ (self, X, path, name): ...
true
true
f74d56aad1cd5e53bec0c7c3636d700b5a4178bc
3,668
py
Python
securitybot/tasker/tasker.py
yanlinw/securitybot
79c0ef1e1e5686b82739ce09cd8c44972d4edd88
[ "Apache-2.0" ]
null
null
null
securitybot/tasker/tasker.py
yanlinw/securitybot
79c0ef1e1e5686b82739ce09cd8c44972d4edd88
[ "Apache-2.0" ]
null
null
null
securitybot/tasker/tasker.py
yanlinw/securitybot
79c0ef1e1e5686b82739ce09cd8c44972d4edd88
[ "Apache-2.0" ]
1
2018-06-12T16:51:15.000Z
2018-06-12T16:51:15.000Z
''' A system for retrieving and assigning tasks for the bot as well as updating their statuses once acted up. This file contains two abstract classes, Tasker and Task, which define a class to manage tasks and a task class respectively. ''' __author__ = 'Alex Bertsch' __email__ = 'abertsch@dropbox.com' from abc import ...
33.345455
98
0.615322
__author__ = 'Alex Bertsch' __email__ = 'abertsch@dropbox.com' from abc import ABCMeta, abstractmethod from securitybot.util import enum class Tasker(object): __metaclass__ = ABCMeta @abstractmethod def get_new_tasks(self): pass @abstractmethod def get_active_tasks(self): ...
true
true
f74d56c010fbea484f653240b0b037ca92f9794c
1,047
py
Python
fuzzer/fuzz.py
jamesquilty/mdformat
54f549e57a226701c1812fb8a2b478a847172699
[ "MIT" ]
null
null
null
fuzzer/fuzz.py
jamesquilty/mdformat
54f549e57a226701c1812fb8a2b478a847172699
[ "MIT" ]
null
null
null
fuzzer/fuzz.py
jamesquilty/mdformat
54f549e57a226701c1812fb8a2b478a847172699
[ "MIT" ]
null
null
null
import atheris with atheris.instrument_imports(): import sys import warnings import mdformat from mdformat._util import is_md_equal # Suppress all warnings. warnings.simplefilter("ignore") def test_one_input(input_bytes: bytes) -> None: # We need a Unicode string, not bytes fdp = atheris.Fu...
23.266667
85
0.690544
import atheris with atheris.instrument_imports(): import sys import warnings import mdformat from mdformat._util import is_md_equal warnings.simplefilter("ignore") def test_one_input(input_bytes: bytes) -> None: fdp = atheris.FuzzedDataProvider(input_bytes) data = fdp.ConsumeUnicode(s...
true
true
f74d57d5160a6cc6a8512d3091557526ba491b9a
5,385
py
Python
scripts/docking_demo.py
Open-UAV/cps_challenge_2020
6471e5b150a3bdea6a9c512a520e977ca1ddf432
[ "Apache-2.0" ]
1
2021-06-05T11:09:54.000Z
2021-06-05T11:09:54.000Z
scripts/docking_demo.py
Open-UAV/cps_challenge_2020
6471e5b150a3bdea6a9c512a520e977ca1ddf432
[ "Apache-2.0" ]
null
null
null
scripts/docking_demo.py
Open-UAV/cps_challenge_2020
6471e5b150a3bdea6a9c512a520e977ca1ddf432
[ "Apache-2.0" ]
2
2020-07-26T15:40:24.000Z
2021-01-05T07:28:26.000Z
""" Harish 2020-05-14 """ import rospy from geometry_msgs.msg import PoseStamped from mavros_msgs.msg import State, PositionTarget import math from mavros_msgs.srv import SetMode, CommandBool from std_msgs.msg import String, Header import subprocess class OffboardControl: """ Controller for PX4-UAV offboa...
34.299363
116
0.564345
import rospy from geometry_msgs.msg import PoseStamped from mavros_msgs.msg import State, PositionTarget import math from mavros_msgs.srv import SetMode, CommandBool from std_msgs.msg import String, Header import subprocess class OffboardControl: def __init__(self): self.curr_pose = PoseStamped() ...
true
true
f74d5ba431e2933e346d8430e9ba9b2ad20af170
10,873
py
Python
PaddleCV/PaddleDetection/tools/face_eval.py
shippingwang/models
a92e212932b764e500a833527e0fb772ac9a491a
[ "Apache-2.0" ]
4
2020-01-04T13:15:02.000Z
2021-07-21T07:50:02.000Z
PaddleCV/PaddleDetection/tools/face_eval.py
shippingwang/models
a92e212932b764e500a833527e0fb772ac9a491a
[ "Apache-2.0" ]
null
null
null
PaddleCV/PaddleDetection/tools/face_eval.py
shippingwang/models
a92e212932b764e500a833527e0fb772ac9a491a
[ "Apache-2.0" ]
3
2019-10-31T07:18:49.000Z
2020-01-13T03:18:39.000Z
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.364548
126
0.60241
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import paddle.fluid as fluid import numpy as np from PIL import Image from collections import OrderedDict import ppdet.utils.checkpoint as checkpoint from ppdet.utils.cli import ArgsPa...
true
true
f74d5bdc4aa52ab1c2b00688dedaa6f822a0eb7f
513
py
Python
joelenc/setup.py
DaMuffinDev/joel.enc
ab955215b2f4bdfe3b0db8e8d31aaf02e85e137f
[ "MIT" ]
null
null
null
joelenc/setup.py
DaMuffinDev/joel.enc
ab955215b2f4bdfe3b0db8e8d31aaf02e85e137f
[ "MIT" ]
null
null
null
joelenc/setup.py
DaMuffinDev/joel.enc
ab955215b2f4bdfe3b0db8e8d31aaf02e85e137f
[ "MIT" ]
null
null
null
from Cython.Build import cythonize import pkg_resources from setuptools import setup, Extension import os import sys here = os.path.dirname(os.path.abspath(__file__)) extensions = [] files = { 0: "_enc_proc", 1: "_utils", 2: "_table", 3: "_encrypt", } for i in range(4): filename = files[i] exte...
23.318182
116
0.688109
from Cython.Build import cythonize import pkg_resources from setuptools import setup, Extension import os import sys here = os.path.dirname(os.path.abspath(__file__)) extensions = [] files = { 0: "_enc_proc", 1: "_utils", 2: "_table", 3: "_encrypt", } for i in range(4): filename = files[i] exte...
true
true
f74d5cb8cec7577ba18d9cf39b4840a5c1b130e7
7,951
py
Python
tools/mgms/amp/dlib_face_training.py
AudiovisualMetadataPlatform/amp_mgms
593d4f4d40b597a7753cd152cd233976e6b28c75
[ "Apache-2.0" ]
null
null
null
tools/mgms/amp/dlib_face_training.py
AudiovisualMetadataPlatform/amp_mgms
593d4f4d40b597a7753cd152cd233976e6b28c75
[ "Apache-2.0" ]
1
2022-02-16T16:21:03.000Z
2022-02-16T16:21:03.000Z
tools/mgms/amp/dlib_face_training.py
AudiovisualMetadataPlatform/amp_mgms
593d4f4d40b597a7753cd152cd233976e6b28c75
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import os.path import traceback import shutil import face_recognition import cv2 import pickle # from tqdm.notebook import tqdm from zipfile import ZipFile import logging import amp.utils FR_TRAINED_MODEL_SUFFIX = ".frt" # Train Face Recognition model with the provided training_phot...
48.779141
162
0.690479
import os import os.path import traceback import shutil import face_recognition import cv2 import pickle from zipfile import ZipFile import logging import amp.utils FR_TRAINED_MODEL_SUFFIX = ".frt" def train_faces(training_photos): # unzip training_photos facial_dir = get_facial_dir() photos_dir =...
true
true
f74d5d7970a4be30e22102dd3533b49bd1d8d9ad
2,503
py
Python
tests/integration/authorization/conftest.py
TinkoffCreditSystems/overhave
b0ab705ef5c5c5a65fa0b14b173b64fd7310e187
[ "Apache-2.0" ]
33
2021-02-01T15:49:37.000Z
2021-12-20T00:44:43.000Z
tests/integration/authorization/conftest.py
TinkoffCreditSystems/overhave
b0ab705ef5c5c5a65fa0b14b173b64fd7310e187
[ "Apache-2.0" ]
46
2021-02-03T12:56:52.000Z
2021-12-19T18:50:27.000Z
tests/integration/authorization/conftest.py
TinkoffCreditSystems/overhave
b0ab705ef5c5c5a65fa0b14b173b64fd7310e187
[ "Apache-2.0" ]
1
2021-12-07T09:02:44.000Z
2021-12-07T09:02:44.000Z
from typing import List, cast import pytest from faker import Faker from pydantic import SecretStr from pytest_mock import MockFixture from overhave import OverhaveAuthorizationSettings from overhave.authorization import ( DefaultAdminAuthorizationManager, LDAPAdminAuthorizationManager, LDAPAuthenticator,...
31.683544
118
0.805833
from typing import List, cast import pytest from faker import Faker from pydantic import SecretStr from pytest_mock import MockFixture from overhave import OverhaveAuthorizationSettings from overhave.authorization import ( DefaultAdminAuthorizationManager, LDAPAdminAuthorizationManager, LDAPAuthenticator,...
true
true
f74d5dab23d99d5a60e42e345d5d872d925e3993
6,058
py
Python
src/train.py
DequanZhu/facenet
78f32c2fa43217489f5b340826991780b3276fe2
[ "MIT" ]
null
null
null
src/train.py
DequanZhu/facenet
78f32c2fa43217489f5b340826991780b3276fe2
[ "MIT" ]
null
null
null
src/train.py
DequanZhu/facenet
78f32c2fa43217489f5b340826991780b3276fe2
[ "MIT" ]
null
null
null
from __future__ import division import os import sys import numpy as np import tensorflow as tf from tensorflow.keras.optimizers import schedules, Adam from tensorflow.python.keras.losses import SparseCategoricalCrossentropy from tensorflow.python.keras.metrics import SparseCategoricalAccuracy from facenet impo...
51.777778
111
0.612413
from __future__ import division import os import sys import numpy as np import tensorflow as tf from tensorflow.keras.optimizers import schedules, Adam from tensorflow.python.keras.losses import SparseCategoricalCrossentropy from tensorflow.python.keras.metrics import SparseCategoricalAccuracy from facenet impo...
true
true
f74d5e3d4b1cc76cfc73f5a32e6d9a6f6ce91f68
3,590
py
Python
telegram_parser/link_generator.py
flexagoon/telegram_parser
7f0e601c5ba03d48d889fe22561ea702db90e7bd
[ "Apache-2.0" ]
null
null
null
telegram_parser/link_generator.py
flexagoon/telegram_parser
7f0e601c5ba03d48d889fe22561ea702db90e7bd
[ "Apache-2.0" ]
null
null
null
telegram_parser/link_generator.py
flexagoon/telegram_parser
7f0e601c5ba03d48d889fe22561ea702db90e7bd
[ "Apache-2.0" ]
null
null
null
import random, string, itertools def alphabets_generator(): alphabet = ['1', '2', '3','4' , '5', '6', '7', '8', '9', '0', '_'] for letter in range(97,123): #all letters except first alphabet alphabet.append(chr(letter)) alphabet1 = [] #first letter alpha...
37.010309
140
0.587465
import random, string, itertools def alphabets_generator(): alphabet = ['1', '2', '3','4' , '5', '6', '7', '8', '9', '0', '_'] for letter in range(97,123): alphabet.append(chr(letter)) alphabet1 = [] for letter in range(97,123): alphabet1.a...
true
true
f74d5e4385dd68305852f86531d7d9e586cd4a4b
2,170
py
Python
anchors/templatetags/anchors_tags.py
Fantomas42/django-anchors
1cedc947dd3f1ed5197e55bb96cf0c6d2e2cf430
[ "BSD-3-Clause" ]
null
null
null
anchors/templatetags/anchors_tags.py
Fantomas42/django-anchors
1cedc947dd3f1ed5197e55bb96cf0c6d2e2cf430
[ "BSD-3-Clause" ]
null
null
null
anchors/templatetags/anchors_tags.py
Fantomas42/django-anchors
1cedc947dd3f1ed5197e55bb96cf0c6d2e2cf430
[ "BSD-3-Clause" ]
null
null
null
"""Template tags for anchors app""" try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from bs4 import BeautifulSoup from django import template from django.contrib.sites.models import Site from django.utils.safestring import mark_safe from django.utils.html i...
25.529412
60
0.665438
try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse from bs4 import BeautifulSoup from django import template from django.contrib.sites.models import Site from django.utils.safestring import mark_safe from django.utils.html import conditional_escape register = template....
true
true
f74d5e86ffa8bd639f7c95a9d3aba0c6ad06f680
1,710
py
Python
backend/surveyapi/decorator.py
sunwenquan/iSurvey
bc14a102e56b33fb4b3612b3bef98183f6e46612
[ "Apache-2.0" ]
null
null
null
backend/surveyapi/decorator.py
sunwenquan/iSurvey
bc14a102e56b33fb4b3612b3bef98183f6e46612
[ "Apache-2.0" ]
null
null
null
backend/surveyapi/decorator.py
sunwenquan/iSurvey
bc14a102e56b33fb4b3612b3bef98183f6e46612
[ "Apache-2.0" ]
null
null
null
from functools import wraps from flask import jsonify,current_app from flask import request import jwt # 对token进行解码可以使用pyJWT # pyjwt : python 实现的 JSON Web Token: def token_required(f): ''' 验证前端发来的token信息是否合法,如果不合法,返回错误信息,不支持被装饰的函数f 如果合法,执行被装饰的函数f ''' @wraps(f) def __verfy(*args,**kwargs): ...
27.142857
70
0.599415
from functools import wraps from flask import jsonify,current_app from flask import request import jwt def token_required(f): @wraps(f) def __verfy(*args,**kwargs): auth_headers = request.headers.get('Authorization','').split() error = { 'message':'非法的token',...
true
true
f74d608c45b40907d1dfdb4dba9a26674bcbe86a
15,381
py
Python
sklearn/decomposition/tests/test_incremental_pca.py
huzq/scikit-learn
f862129f36786acbae3d9f2d161bbb72d77b87ec
[ "BSD-3-Clause" ]
1
2020-12-03T16:35:55.000Z
2020-12-03T16:35:55.000Z
sklearn/decomposition/tests/test_incremental_pca.py
huzq/scikit-learn
f862129f36786acbae3d9f2d161bbb72d77b87ec
[ "BSD-3-Clause" ]
1
2022-03-09T19:32:57.000Z
2022-03-09T20:23:30.000Z
sklearn/decomposition/tests/test_incremental_pca.py
huzq/scikit-learn
f862129f36786acbae3d9f2d161bbb72d77b87ec
[ "BSD-3-Clause" ]
1
2020-02-16T05:40:12.000Z
2020-02-16T05:40:12.000Z
"""Tests for Incremental PCA.""" import numpy as np import pytest import warnings from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_allclose_dense_sparse from numpy.testing import assert_array_equal from sklear...
34.028761
87
0.682205
import numpy as np import pytest import warnings from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_allclose_dense_sparse from numpy.testing import assert_array_equal from sklearn import datasets from sklearn.de...
true
true
f74d60bc4c744a61cce0eb0a57fda3ed8a29d3ce
16,510
py
Python
aa_manager.py
Austerius/AmericanAirlines-scraper
9848f133d941e715c2a28c8e6ed99440967e908d
[ "BSD-3-Clause" ]
1
2021-05-19T21:10:44.000Z
2021-05-19T21:10:44.000Z
aa_manager.py
Austerius/AmericanAirlines-scraper
9848f133d941e715c2a28c8e6ed99440967e908d
[ "BSD-3-Clause" ]
null
null
null
aa_manager.py
Austerius/AmericanAirlines-scraper
9848f133d941e715c2a28c8e6ed99440967e908d
[ "BSD-3-Clause" ]
1
2020-03-20T14:42:52.000Z
2020-03-20T14:42:52.000Z
""" Script for running American Airlines scraper directly from command line. **Requirements**: - Selenium - Geckodriver - Firefox web browser - bs4 (BeautifulSoup) Default name for file with search queries - 'search_tasks.json'(default location - script directory). 'search_tasks.json'(and similar files) must have foll...
46.770538
119
0.642641
import json import re import datetime import argparse from multiprocessing import Pool from american_airlines import AmericanAirlines AIRPORTS_CODES = "airports.json" NUM_PROCESSES = 4 SEARCH_TASKS = "search_tasks.json" def get_airports_codes(airports_file): with open(airports_file, 'r') as file: ...
true
true
f74d618ffd0980a092c540577b8989c31c36d997
20,645
py
Python
zerver/lib/streams.py
networksneaker/zulip
fae365f8c7e2d6ee041024a22b6ba5a64cbffe4e
[ "Apache-2.0" ]
6
2019-05-09T20:43:20.000Z
2022-03-29T05:53:50.000Z
zerver/lib/streams.py
networksneaker/zulip
fae365f8c7e2d6ee041024a22b6ba5a64cbffe4e
[ "Apache-2.0" ]
2
2016-10-18T04:01:56.000Z
2016-10-20T18:19:09.000Z
zerver/lib/streams.py
networksneaker/zulip
fae365f8c7e2d6ee041024a22b6ba5a64cbffe4e
[ "Apache-2.0" ]
7
2016-08-10T02:24:32.000Z
2022-03-28T15:14:18.000Z
from typing import Any, Iterable, List, Mapping, Optional, Set, Tuple, Union from django.conf import settings from django.db.models.query import QuerySet from django.utils.translation import ugettext as _ from zerver.lib.bugdown import convert as bugdown_convert from zerver.lib.request import JsonableError from zerve...
42.83195
109
0.675902
from typing import Any, Iterable, List, Mapping, Optional, Set, Tuple, Union from django.conf import settings from django.db.models.query import QuerySet from django.utils.translation import ugettext as _ from zerver.lib.bugdown import convert as bugdown_convert from zerver.lib.request import JsonableError from zerve...
true
true
f74d62a68c94b285d8ff230d2dfbfa9539b7a73d
994
py
Python
google/ads/google_ads/v5/services/extension_feed_item_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v5/services/extension_feed_item_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v5/services/extension_feed_item_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
config = { "interfaces": { "google.ads.googleads.v5.services.ExtensionFeedItemService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_retry_del...
26.864865
66
0.540241
config = { "interfaces": { "google.ads.googleads.v5.services.ExtensionFeedItemService": { "retry_codes": { "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" ], "non_idempotent": [] }, "retry_params": { "default": { "initial_retry_del...
true
true
f74d6326782e483fc9072b1fd0a2f0878e741540
6,385
py
Python
huaweicloud-sdk-rms/huaweicloudsdkrms/v1/model/show_resource_history_request.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-rms/huaweicloudsdkrms/v1/model/show_resource_history_request.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-rms/huaweicloudsdkrms/v1/model/show_resource_history_request.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class ShowResourceHistoryRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and t...
27.403433
128
0.599843
import pprint import re import six class ShowResourceHistoryRequest: sensitive_list = [] openapi_types = { 'resource_id': 'str', 'marker': 'str', 'limit': 'int', 'earlier_time': 'int', 'later_time': 'int', 'chronological_order': 'str' } attrib...
true
true
f74d63df5d6e6e6b42091b36ab139166b0f40f04
98
py
Python
4_factory/abstract_factory/onion.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
4_factory/abstract_factory/onion.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
4_factory/abstract_factory/onion.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
from veggies import Veggies class Onion(Veggies): def __str__(self): return 'Onion'
14
27
0.673469
from veggies import Veggies class Onion(Veggies): def __str__(self): return 'Onion'
true
true
f74d63f3c7385bbdfaf0ad61fa9f4262b3e9ac71
1,192
py
Python
vectors/katparser.py
imachug/pysha3
d0d4a1d35bb7a99630b32755ba826d821e5b0877
[ "PSF-2.0" ]
30
2016-05-06T18:10:44.000Z
2021-10-21T00:52:37.000Z
vectors/katparser.py
imachug/pysha3
d0d4a1d35bb7a99630b32755ba826d821e5b0877
[ "PSF-2.0" ]
21
2017-01-05T09:21:45.000Z
2021-10-18T23:28:15.000Z
vectors/katparser.py
imachug/pysha3
d0d4a1d35bb7a99630b32755ba826d821e5b0877
[ "PSF-2.0" ]
19
2016-06-15T15:37:18.000Z
2022-01-11T09:34:37.000Z
#!/usr/bin/env python3 import glob def katparser(katfile): """Trivial parser for KAT files """ length = msg = md = None with open(katfile) as f: for line in f: line = line.strip() if not line or line.startswith("#"): continue key, value = lin...
27.72093
66
0.442953
import glob def katparser(katfile): length = msg = md = None with open(katfile) as f: for line in f: line = line.strip() if not line or line.startswith("#"): continue key, value = line.split(" = ") if key == "Len": length...
true
true
f74d67ef8c299e0ce0d62a57d2f99d988ec98495
5,892
py
Python
radar/Amazon Weather Program.py
EVS-ATMOS/precipitation-onset
3c9cf010b5246d17fae2796d271f6a8be892efb1
[ "BSD-2-Clause" ]
null
null
null
radar/Amazon Weather Program.py
EVS-ATMOS/precipitation-onset
3c9cf010b5246d17fae2796d271f6a8be892efb1
[ "BSD-2-Clause" ]
null
null
null
radar/Amazon Weather Program.py
EVS-ATMOS/precipitation-onset
3c9cf010b5246d17fae2796d271f6a8be892efb1
[ "BSD-2-Clause" ]
5
2018-06-06T17:02:08.000Z
2020-09-27T17:20:46.000Z
import boto from boto.s3.connection import S3Connection from datetime import timedelta, datetime import os import pyart from matplotlib import pyplot as plt import tempfile import numpy as np import cartopy def _nearestDate(dates, pivot): return min(dates, key=lambda x: abs(x - pivot)) def get_radar_from_aws(si...
34.255814
97
0.62831
import boto from boto.s3.connection import S3Connection from datetime import timedelta, datetime import os import pyart from matplotlib import pyplot as plt import tempfile import numpy as np import cartopy def _nearestDate(dates, pivot): return min(dates, key=lambda x: abs(x - pivot)) def get_radar_from_aws(si...
true
true
f74d68ddb1b7bfb8c3c3ab2d28b338018a103af1
7,926
py
Python
backend/testappauto328_dev_23386/settings.py
crowdbotics-dev/testappauto328-dev-23386
2e40d64fa3b8e7fd9ec93e1815c1a3710397c558
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/testappauto328_dev_23386/settings.py
crowdbotics-dev/testappauto328-dev-23386
2e40d64fa3b8e7fd9ec93e1815c1a3710397c558
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/testappauto328_dev_23386/settings.py
crowdbotics-dev/testappauto328-dev-23386
2e40d64fa3b8e7fd9ec93e1815c1a3710397c558
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for testappauto328_dev_23386 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ ...
30.484615
112
0.737699
import os import io import environ import logging import google.auth from google.cloud import secretmanager from google.auth.exceptions import DefaultCredentialsError from google.api_core.exceptions import PermissionDenied from modules.manifest import get_modules BASE_DIR = os.path.dirname(os.path.dirname(os.path.ab...
true
true
f74d699a43ecada10f9b1aef61ba3a1e8472e5dc
15,350
py
Python
lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
cc226deb7b46852407900f9fec0caf62638defe2
[ "MIT" ]
21
2018-12-11T20:07:47.000Z
2021-11-08T13:12:32.000Z
lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
cc226deb7b46852407900f9fec0caf62638defe2
[ "MIT" ]
3
2020-09-26T01:09:47.000Z
2022-02-10T02:12:08.000Z
lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
cc226deb7b46852407900f9fec0caf62638defe2
[ "MIT" ]
15
2018-12-12T02:32:28.000Z
2021-11-05T20:40:10.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.99505
80
0.650554
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib import linalg from tensorflow.contrib.distributions.python.ops import distribution_util from tensorflow.contrib.distributions.python.ops.shape import _DistributionShape fr...
true
true
f74d6a4c6464a498af4fac1f5c81f7cd9d1dd67b
18,290
py
Python
tests/integration/test_testkeeper_back_to_back/test.py
mcspring/ClickHouse
08f713f177f950c2f675c2c75d1261c91066888c
[ "Apache-2.0" ]
2
2021-01-12T07:23:39.000Z
2021-01-12T07:23:46.000Z
tests/integration/test_testkeeper_back_to_back/test.py
mcspring/ClickHouse
08f713f177f950c2f675c2c75d1261c91066888c
[ "Apache-2.0" ]
null
null
null
tests/integration/test_testkeeper_back_to_back/test.py
mcspring/ClickHouse
08f713f177f950c2f675c2c75d1261c91066888c
[ "Apache-2.0" ]
1
2021-07-30T19:50:45.000Z
2021-07-30T19:50:45.000Z
import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from multiprocessing.dummy import Pool cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=['configs/enable_test_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True) f...
34.771863
149
0.653089
import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from multiprocessing.dummy import Pool cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=['configs/enable_test_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True) f...
true
true
f74d6a6ce8ee4c86b34c49043a07285572262255
5,534
py
Python
presalytics/client/presalytics_ooxml_automation/models/chart_axis_data_types.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
4
2020-02-21T16:30:46.000Z
2021-01-12T12:22:03.000Z
presalytics/client/presalytics_ooxml_automation/models/chart_axis_data_types.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
4
2019-12-28T19:30:08.000Z
2020-03-31T19:27:45.000Z
presalytics/client/presalytics_ooxml_automation/models/chart_axis_data_types.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
null
null
null
# coding: utf-8 """ OOXML Automation This API helps users convert Excel and Powerpoint documents into rich, live dashboards and stories. # noqa: E501 The version of the OpenAPI document: 0.1.0-no-tags Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
25.859813
117
0.568847
import pprint import re import six class ChartAxisDataTypes(object): openapi_types = { 'type_id': 'int', 'name': 'str', 'description': 'str', 'ooxml_name': 'str', 'id': 'str' } attribute_map = { 'type_id': 'typeId', 'name': 'name', '...
true
true
f74d6c92a354636ed765b422c19dd61d4bcca149
2,950
py
Python
tests/test_model_category.py
sharebears/pulsar-forums
6c1152a181c30bb82c49556fd072f47c2eeaf1cb
[ "MIT" ]
null
null
null
tests/test_model_category.py
sharebears/pulsar-forums
6c1152a181c30bb82c49556fd072f47c2eeaf1cb
[ "MIT" ]
null
null
null
tests/test_model_category.py
sharebears/pulsar-forums
6c1152a181c30bb82c49556fd072f47c2eeaf1cb
[ "MIT" ]
null
null
null
from conftest import add_permissions, check_dictionary from core import NewJSONEncoder, cache from forums.models import ForumCategory def test_category_from_pk(app, authed_client): category = ForumCategory.from_pk(1) assert category.name == 'Site' assert category.description == 'General site discussion' ...
28.921569
78
0.64
from conftest import add_permissions, check_dictionary from core import NewJSONEncoder, cache from forums.models import ForumCategory def test_category_from_pk(app, authed_client): category = ForumCategory.from_pk(1) assert category.name == 'Site' assert category.description == 'General site discussion' ...
true
true
f74d6de7f0c648b1de06bdf74c9c90f1bba5c269
2,136
py
Python
malcolm/packageutil.py
dls-controls/github-publish-test
25f6ce1af28eff9930f65e4f2c9fb0474e0b570c
[ "Apache-2.0" ]
null
null
null
malcolm/packageutil.py
dls-controls/github-publish-test
25f6ce1af28eff9930f65e4f2c9fb0474e0b570c
[ "Apache-2.0" ]
null
null
null
malcolm/packageutil.py
dls-controls/github-publish-test
25f6ce1af28eff9930f65e4f2c9fb0474e0b570c
[ "Apache-2.0" ]
null
null
null
import os import importlib import logging def import_methodmeta_decorated_classes(globals_d, package_name): """Prepare a package namespace by importing all subclasses following PEP8 rules that have @takes decorated functions""" def finder(package_fs_path, fname): if fname.endswith(".py") and fname...
32.363636
80
0.628277
import os import importlib import logging def import_methodmeta_decorated_classes(globals_d, package_name): def finder(package_fs_path, fname): if fname.endswith(".py") and fname != "__init__.py": import_name = "%s.%s" % (package_name, fname[:-3]) logging.debug("Import...
true
true
f74d6e9baea2bd0076ed8085b941cd95065ad8c2
267
py
Python
design_patterns/structural_dp/facade_demos.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
3
2021-11-16T04:52:53.000Z
2022-02-07T20:28:41.000Z
design_patterns/structural_dp/facade_demos.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
null
null
null
design_patterns/structural_dp/facade_demos.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
1
2021-12-07T07:04:38.000Z
2021-12-07T07:04:38.000Z
import json data = { 'name': 'Pesho', 'age': 19, 'grades': [ {'subject': 'Math', 'mark': 5.0}, {'subject': 'Literature', 'mark': 4.5}, ] } json_data = json.dumps(data) print(repr(json.dumps(data))) print(repr(json.loads(json_data)))
17.8
47
0.543071
import json data = { 'name': 'Pesho', 'age': 19, 'grades': [ {'subject': 'Math', 'mark': 5.0}, {'subject': 'Literature', 'mark': 4.5}, ] } json_data = json.dumps(data) print(repr(json.dumps(data))) print(repr(json.loads(json_data)))
true
true
f74d6ea5c70899c5d3d21491e01d6b1ed0f8969f
2,670
py
Python
data_extractor/local_extractor/states/state_utils/TG_utils.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
null
null
null
data_extractor/local_extractor/states/state_utils/TG_utils.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
null
null
null
data_extractor/local_extractor/states/state_utils/TG_utils.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
null
null
null
import locale locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' ) import re def is_row_header(row): """ Check if the provided row is a header row or not It does so by checking if there are any numbers in the row text or not """ for col in row: if re.match(r'[0-9]+', col): return...
24.272727
104
0.590637
import locale locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' ) import re def is_row_header(row): for col in row: if re.match(r'[0-9]+', col): return False return True def is_row_empty(row): for col in row: if col.strip() != '': return False return True de...
true
true
f74d6f4cdd9ad79198e4fd37197b8d35a2d9c2b5
850
py
Python
asset/forms.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
3
2019-05-06T06:44:43.000Z
2020-06-10T00:54:43.000Z
asset/forms.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
1
2017-07-11T11:36:54.000Z
2017-07-11T11:42:23.000Z
asset/forms.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf8 ''' @author: qitan @contact: qqing_lai@hotmail.com @file: forms.py @time: 2017/3/30 15:34 @desc: ''' from django import forms from asset.models import IdcAsset class IdcAssetForm(forms.ModelForm): class Meta: model = IdcAsset fields = ('idc_name', 'idc_type', '...
32.692308
100
0.629412
from django import forms from asset.models import IdcAsset class IdcAssetForm(forms.ModelForm): class Meta: model = IdcAsset fields = ('idc_name', 'idc_type', 'idc_location', 'contract_date', 'idc_contacts', 'remark') widgets = { 'idc_name': forms.TextInput(attrs={'class': 'for...
true
true
f74d6facf145e645b1aed33f28531d912b3c4c9e
34
py
Python
cleo/ui/component.py
Ivoz/cleo
8dc694ed5ed350403966f93d330654ecb447801b
[ "MIT" ]
859
2015-02-04T02:33:22.000Z
2022-03-31T10:41:06.000Z
cleo/ui/component.py
Ivoz/cleo
8dc694ed5ed350403966f93d330654ecb447801b
[ "MIT" ]
66
2015-01-04T19:43:48.000Z
2022-03-30T02:33:13.000Z
cleo/ui/component.py
Ivoz/cleo
8dc694ed5ed350403966f93d330654ecb447801b
[ "MIT" ]
64
2015-01-18T08:32:43.000Z
2022-03-02T10:43:58.000Z
class Component: name = None
8.5
16
0.647059
class Component: name = None
true
true
f74d7099f37f24f893494b8f63ef4b764ca3dd82
1,609
py
Python
kmer_parse/kmerAldert.py
divprasad/PythonCodes
18c477cdadbf288ea9b00a82b13e768ccd279108
[ "MIT" ]
null
null
null
kmer_parse/kmerAldert.py
divprasad/PythonCodes
18c477cdadbf288ea9b00a82b13e768ccd279108
[ "MIT" ]
null
null
null
kmer_parse/kmerAldert.py
divprasad/PythonCodes
18c477cdadbf288ea9b00a82b13e768ccd279108
[ "MIT" ]
null
null
null
#!/usr/bin/env python from collections import defaultdict from itertools import chain, groupby import os, sys #import pandas as pd import glob def count_kmers(read, k): counts = defaultdict(list) num_kmers = len(read) - k + 1 for i in range(num_kmers): kmer = read[i:i+k] if kmer not in coun...
41.25641
199
0.492231
from collections import defaultdict from itertools import chain, groupby import os, sys import glob def count_kmers(read, k): counts = defaultdict(list) num_kmers = len(read) - k + 1 for i in range(num_kmers): kmer = read[i:i+k] if kmer not in counts: counts[kmer] = 0 ...
true
true
f74d70f6810e283b1ee917a379220f6c2b9d116b
1,114
py
Python
ecommerce/ecommerce/urls.py
sasan-sohrabi/django_ecommerce
df5670df300c3d8df97d1186d44bc988c8cf3422
[ "MIT" ]
null
null
null
ecommerce/ecommerce/urls.py
sasan-sohrabi/django_ecommerce
df5670df300c3d8df97d1186d44bc988c8cf3422
[ "MIT" ]
null
null
null
ecommerce/ecommerce/urls.py
sasan-sohrabi/django_ecommerce
df5670df300c3d8df97d1186d44bc988c8cf3422
[ "MIT" ]
null
null
null
"""ecommerce URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
39.785714
79
0.666966
from django.contrib import admin from django.urls import path, include from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', views.home, name='home'), path('store/',...
true
true
f74d7167ae2413cc81aa05b9836b1549815053a2
3,908
py
Python
chap06/weather_modelv4_stacked_rnn_with_dropout.py
bryanblackbee/topic__deep-learning-python
6d916cee3457a886f3bffc7a5dd97a4d627b3c23
[ "MIT" ]
null
null
null
chap06/weather_modelv4_stacked_rnn_with_dropout.py
bryanblackbee/topic__deep-learning-python
6d916cee3457a886f3bffc7a5dd97a4d627b3c23
[ "MIT" ]
6
2020-11-13T18:54:44.000Z
2022-03-12T00:34:31.000Z
chap06/weather_modelv4_stacked_rnn_with_dropout.py
bryanblackbee/topic__deep-learning-python
6d916cee3457a886f3bffc7a5dd97a4d627b3c23
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import matplotlib.pyplot as plt from tensorflow.keras.backend import clear_session from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.preprocessing import sequence from tensorflow.keras.models import Sequential from tensorflow.keras.layers import (Flatten, Dens...
36.523364
105
0.656858
import numpy as np import pandas as pd import matplotlib.pyplot as plt from tensorflow.keras.backend import clear_session from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.preprocessing import sequence from tensorflow.keras.models import Sequential from tensorflow.keras.layers import (Flatten, Dens...
true
true
f74d71f1c71c42b77c9491850bdbc41548a67e86
3,327
py
Python
tests/api_resources/test_subscription_item.py
maxmokry/stripe-python
4ee52225d7e87324121390043fd2618adcdc0559
[ "MIT" ]
1
2020-02-09T13:21:50.000Z
2020-02-09T13:21:50.000Z
tests/api_resources/test_subscription_item.py
jahau/stripe-python
d6f7f4454e545f66df11201c8a5accc75d70b4c2
[ "MIT" ]
null
null
null
tests/api_resources/test_subscription_item.py
jahau/stripe-python
d6f7f4454e545f66df11201c8a5accc75d70b4c2
[ "MIT" ]
1
2021-08-17T14:09:08.000Z
2021-08-17T14:09:08.000Z
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "si_123" class TestSubscriptionItem(object): def test_is_listable(self, request_mock): resources = stripe.SubscriptionItem.list(subscription="sub_123") request_mock.assert_requested( "g...
34.65625
73
0.656447
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "si_123" class TestSubscriptionItem(object): def test_is_listable(self, request_mock): resources = stripe.SubscriptionItem.list(subscription="sub_123") request_mock.assert_requested( "g...
true
true
f74d722b30b8e7e2700e5218c3d4ef635f6d48cf
7,629
py
Python
model/__main__.py
Johnny-Wish/fake-news-detection-pipeline
3bdad59d680968375a23d72c80af7d6ef11d7711
[ "Apache-2.0" ]
52
2018-11-02T00:00:10.000Z
2020-06-21T03:55:13.000Z
model/__main__.py
Johnny-Wish/fake-news-detection-pipeline
3bdad59d680968375a23d72c80af7d6ef11d7711
[ "Apache-2.0" ]
null
null
null
model/__main__.py
Johnny-Wish/fake-news-detection-pipeline
3bdad59d680968375a23d72c80af7d6ef11d7711
[ "Apache-2.0" ]
8
2018-11-12T20:54:48.000Z
2020-02-14T08:24:40.000Z
import os import argparse import heapq import pandas as pd import pickle as pkl from embedding_utils import EmbeddingLoader from sklearn.model_selection import RandomizedSearchCV, train_test_split from sklearn.model_selection._search import BaseSearchCV def print_cv_result(result, n): if isinstance(result, BaseSe...
52.613793
120
0.659719
import os import argparse import heapq import pandas as pd import pickle as pkl from embedding_utils import EmbeddingLoader from sklearn.model_selection import RandomizedSearchCV, train_test_split from sklearn.model_selection._search import BaseSearchCV def print_cv_result(result, n): if isinstance(result, BaseSe...
true
true
f74d745e55ae87c18eb019a61cecdd76f3335ed6
5,718
py
Python
examples/own_dataset/train_own_dataset.py
naototachibana/chainer-chemistry
785f68232d43fe98cb2c79f5b5e22b7d5a971738
[ "MIT" ]
1
2019-09-13T07:31:38.000Z
2019-09-13T07:31:38.000Z
examples/own_dataset/train_own_dataset.py
nd-02110114/chainer-chemistry
04577ba920b46c7141d4f01e212f7040eb91db19
[ "MIT" ]
null
null
null
examples/own_dataset/train_own_dataset.py
nd-02110114/chainer-chemistry
04577ba920b46c7141d4f01e212f7040eb91db19
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import chainer import numpy import os from argparse import ArgumentParser from chainer.datasets import split_dataset_random from chainer import functions as F from chainer import optimizers from chainer import training from chainer.iterators import SerialIt...
40.842857
78
0.663344
from __future__ import print_function import chainer import numpy import os from argparse import ArgumentParser from chainer.datasets import split_dataset_random from chainer import functions as F from chainer import optimizers from chainer import training from chainer.iterators import SerialIterator from chainer.t...
true
true
f74d74747ee5bfd693900551b279382a14af44c1
11,277
py
Python
airflow/executors/celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
null
null
null
airflow/executors/celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
5
2019-01-24T20:41:05.000Z
2020-06-22T16:22:13.000Z
airflow/executors/celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
1
2021-11-04T19:43:39.000Z
2021-11-04T19:43:39.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
37.59
100
0.631728
import math import os import subprocess import time import traceback from multiprocessing import Pool, cpu_count from celery import Celery from celery import states as celery_states from airflow.configuration import conf from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG from...
true
true
f74d75985172d5175784caed1b0dc859bd417321
183,364
py
Python
Rebuttal/RuntimeSpeedUpComparison/1 SafeLearner/probfoil_1.py
sunyi000/SafeLearner
bf93268c9107f3404696b9212accaace1a0e76ee
[ "Apache-2.0" ]
6
2019-10-03T04:18:17.000Z
2020-12-18T16:13:34.000Z
Rebuttal/RuntimeSpeedUpComparison/1 SafeLearner/probfoil_1.py
sunyi000/SafeLearner
bf93268c9107f3404696b9212accaace1a0e76ee
[ "Apache-2.0" ]
null
null
null
Rebuttal/RuntimeSpeedUpComparison/1 SafeLearner/probfoil_1.py
sunyi000/SafeLearner
bf93268c9107f3404696b9212accaace1a0e76ee
[ "Apache-2.0" ]
2
2019-10-16T21:13:04.000Z
2022-02-02T14:00:54.000Z
"""Implementation of the OpenProbFOIL algorithm. """ from __future__ import print_function from problog.program import PrologFile from problog.logic import term2str, Term, Var from data import DataFile from language import TypeModeLanguage from rule import FOILRule, FOILRuleB from learn_1 import CandidateBeam, LearnEn...
51.915062
482
0.510144
from __future__ import print_function from problog.program import PrologFile from problog.logic import term2str, Term, Var from data import DataFile from language import TypeModeLanguage from rule import FOILRule, FOILRuleB from learn_1 import CandidateBeam, LearnEntail from scipy.optimize import minimize from ad impo...
true
true
f74d762829dd98fea5c97bc112365ce3232b868d
6,708
py
Python
ceilometer/declarative.py
Missxiaoguo/stx-ceilometer
a226b47216e76ec209818b900253d3c1f1ffc3aa
[ "Apache-2.0" ]
null
null
null
ceilometer/declarative.py
Missxiaoguo/stx-ceilometer
a226b47216e76ec209818b900253d3c1f1ffc3aa
[ "Apache-2.0" ]
1
2018-08-16T15:18:09.000Z
2018-08-16T20:51:45.000Z
ceilometer/declarative.py
Missxiaoguo/stx-ceilometer
a226b47216e76ec209818b900253d3c1f1ffc3aa
[ "Apache-2.0" ]
3
2018-08-15T14:35:23.000Z
2019-01-11T15:57:02.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...
35.680851
79
0.5565
import os from jsonpath_rw_ext import parser from oslo_log import log import six import yaml from ceilometer.i18n import _ LOG = log.getLogger(__name__) class DefinitionException(Exception): def __init__(self, message, definition_cfg): msg = '%s %s: %s' % (self.__class__.__name__, definiti...
true
true
f74d7b65bf1d537a02c073dba7f2c762c4daaaf9
4,228
py
Python
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
# coding=utf-8 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.analyses import AnalysesView class AnalysesTransposedView(AnalysesView): """ The view for displaying the table of manage_results...
41.45098
82
0.585856
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.analyses import AnalysesView class AnalysesTransposedView(AnalysesView): def contents_table(self, table_only = True): table = Analyse...
true
true
f74d7ba525d24749bf582bdb8402c95c790d1413
2,836
py
Python
src/utils/redis_cli.py
Ari-Qu3sadillas/redis-management-system
6208c103e655ec29ad9f1a1e916f9533343fb2c0
[ "MIT" ]
1
2022-03-23T17:32:08.000Z
2022-03-23T17:32:08.000Z
src/utils/redis_cli.py
Ari-Qu3sadillas/redis-management-system
6208c103e655ec29ad9f1a1e916f9533343fb2c0
[ "MIT" ]
null
null
null
src/utils/redis_cli.py
Ari-Qu3sadillas/redis-management-system
6208c103e655ec29ad9f1a1e916f9533343fb2c0
[ "MIT" ]
null
null
null
import redis from typing import Tuple, Union, List class Redis(): def __init__(self, host: str = 'localhost', port: int = 6379, user: str = '', password: str = '') -> None: self._host = host self._port = port self._user = user self._password = password self.client = redis.S...
31.865169
115
0.590268
import redis from typing import Tuple, Union, List class Redis(): def __init__(self, host: str = 'localhost', port: int = 6379, user: str = '', password: str = '') -> None: self._host = host self._port = port self._user = user self._password = password self.client = redis.S...
true
true
f74d7d0a4a2c90e13c8157aaf445002af2b01f06
3,802
py
Python
Fuzzy_clustering/version3/project_manager/PredictModelManager/CombineModelPredict.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
Fuzzy_clustering/version3/project_manager/PredictModelManager/CombineModelPredict.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
Fuzzy_clustering/version3/project_manager/PredictModelManager/CombineModelPredict.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import joblib from Fuzzy_clustering.version3.project_manager.PredictModelManager.Sklearn_combine_predict import sklearn_model_predict class CombineModelPredict(object): def __init__(self, static_data): self.static_data = static_data self.istrained = False self.m...
41.326087
119
0.579169
import os import numpy as np import joblib from Fuzzy_clustering.version3.project_manager.PredictModelManager.Sklearn_combine_predict import sklearn_model_predict class CombineModelPredict(object): def __init__(self, static_data): self.static_data = static_data self.istrained = False self.m...
true
true
f74d7d0cd64b40ca4f55b113f0f9e1343656f172
128,130
py
Python
codespace/python/tencentcloud/emr/v20190103/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
37
2017-10-12T01:50:42.000Z
2022-02-24T02:44:45.000Z
codespace/python/tencentcloud/emr/v20190103/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
null
null
null
codespace/python/tencentcloud/emr/v20190103/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
12
2018-07-31T10:04:56.000Z
2022-02-07T00:08:06.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
32.120832
172
0.611168
import warnings from tencentcloud.common.abstract_model import AbstractModel class BootstrapAction(AbstractModel): def __init__(self): self.Path = None self.WhenRun = None self.Args = None def _deserialize(self, params): self.Path = params.get("Path") ...
true
true
f74d7d355da4f61cc1b1df8b64ece7989a486560
2,495
py
Python
01_fyyur/starter_code/models.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
01_fyyur/starter_code/models.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
01_fyyur/starter_code/models.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
#----------------------------------------------------------------------------# # App Config. #----------------------------------------------------------------------------# from flask import Flask from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__na...
29.352941
102
0.58517
from flask import Flask from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__name__) moment = Moment(app) app.config.from_object('config.Config') db = SQLAlchemy(app) migrate = Migrate(app, db) from sqlalchemy import ARRAY class Venue(db.Model)...
true
true
f74d7e1745663a5cd544dc2f6534b5670bf43a37
632
py
Python
mathematics/fundamentals/jim-and-the-jokes.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
41
2018-05-11T07:54:34.000Z
2022-03-29T19:02:32.000Z
mathematics/fundamentals/jim-and-the-jokes.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
2
2021-09-13T10:03:26.000Z
2021-10-04T10:21:05.000Z
mathematics/fundamentals/jim-and-the-jokes.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
21
2019-01-23T19:06:59.000Z
2021-12-23T16:03:47.000Z
# Mathematics > Fundamentals > Jim and the Jokes # Jim is running out of jokes! Help him finding new jokes. # # https://www.hackerrank.com/challenges/jim-and-the-jokes/problem # # algo: créer une table qui compte les nombres lus dans la base indiquée jokes = {} for _ in range(int(input())): b, x = input().split()...
30.095238
84
0.647152
jokes = {} for _ in range(int(input())): b, x = input().split() try: f = int(x, int(b)) jokes[f] = jokes.get(f, 0) + 1 except ValueError: pass print(sum(f * (f - 1) // 2 for f in jokes.values() if f >= 1))
true
true
f74d7e5aaff3ef6dd9eb3b1e1593e84d57734b14
834
py
Python
src/rabbitmq/src/helloworld/send.py
showerMuggle/klose911.github.io
e2ee6ae57dd91e8a5e5637b4bf20dc83b7704387
[ "Apache-2.0" ]
1
2020-05-11T09:28:29.000Z
2020-05-11T09:28:29.000Z
src/rabbitmq/src/helloworld/send.py
showerMuggle/klose911.github.io
e2ee6ae57dd91e8a5e5637b4bf20dc83b7704387
[ "Apache-2.0" ]
null
null
null
src/rabbitmq/src/helloworld/send.py
showerMuggle/klose911.github.io
e2ee6ae57dd91e8a5e5637b4bf20dc83b7704387
[ "Apache-2.0" ]
2
2019-08-23T05:36:00.000Z
2022-02-09T02:25:40.000Z
#!/usr/bin/env python import pika # connect to local machine connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() # before sending we need to make sure the recipient queue exists. If we send a message to non-existing location, RabbitMQ will just trash the mes...
46.333333
168
0.730216
import pika connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() channel.queue_declare(queue='hello') channel.basic_publish(exchange='', routing_key='hello', body='Hello World!') print(" [x] Sent 'Hello Worl...
true
true
f74d7ed26b0733f7489593967914fa42e7299db5
1,030
py
Python
examples/undocumented/python/classifier_gpbtsvm.py
sorig/shogun
57dda6b6ffee029b900655771b9ad6e3887f7e5b
[ "BSD-3-Clause" ]
2
2015-01-13T15:18:27.000Z
2015-05-01T13:28:48.000Z
examples/undocumented/python/classifier_gpbtsvm.py
raamana/shogun
55f57c10f99dc948c0eeedeed28de9ddebd82a45
[ "BSD-3-Clause" ]
null
null
null
examples/undocumented/python/classifier_gpbtsvm.py
raamana/shogun
55f57c10f99dc948c0eeedeed28de9ddebd82a45
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list = [[traindat,testdat,label_traindat,2.1,1,1e-5],[traindat,testdat,label_traindat,2.2,1,1e-5]] def classifier_gpbtsvm (train_fname=traindat,test_fname=tes...
30.294118
119
0.784466
traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list = [[traindat,testdat,label_traindat,2.1,1,1e-5],[traindat,testdat,label_traindat,2.2,1,1e-5]] def classifier_gpbtsvm (train_fname=traindat,test_fname=testdat,label_fname=labe...
true
true
f74d7eea7cf3e0deede42a427339d7567c7e665c
23,101
py
Python
stroylux/main/graphql/product/types/products.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
stroylux/main/graphql/product/types/products.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
7
2020-09-19T16:24:46.000Z
2022-01-13T03:19:46.000Z
stroylux/main/graphql/product/types/products.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
import graphene import graphene_django_optimizer from django.db.models import Sum from django.db.models.functions import Coalesce from graphene import relay from graphene_federation import key from graphql import GraphQLError from main import settings from main.core.permissions import ProductPermissions from main.core...
38.120462
88
0.665339
import graphene import graphene_django_optimizer from django.db.models import Sum from django.db.models.functions import Coalesce from graphene import relay from graphene_federation import key from graphql import GraphQLError from main import settings from main.core.permissions import ProductPermissions from main.core...
true
true
f74d7f32a0c1b1df791ca1c8c98fe0e94fbdb060
6,863
py
Python
rdoasis/algorithms/models/__init__.py
ResonantGeoData/RD-OASIS
6423aca34e5f4757279479b531241174e4cf98af
[ "Apache-2.0" ]
2
2022-01-28T02:45:55.000Z
2022-02-08T22:09:29.000Z
rdoasis/algorithms/models/__init__.py
ResonantGeoData/RD-OASIS
6423aca34e5f4757279479b531241174e4cf98af
[ "Apache-2.0" ]
31
2021-07-05T17:25:14.000Z
2022-03-29T14:36:07.000Z
rdoasis/algorithms/models/__init__.py
ResonantGeoData/RD-OASIS
6423aca34e5f4757279479b531241174e4cf98af
[ "Apache-2.0" ]
null
null
null
from typing import Dict, Generator, Union from zipfile import ZIP_DEFLATED import celery from django.db import models from django.db.models.functions import Length from django.dispatch import receiver from django.http.response import StreamingHttpResponse from django.utils.translation import gettext_lazy as _ from dja...
34.487437
99
0.672446
from typing import Dict, Generator, Union from zipfile import ZIP_DEFLATED import celery from django.db import models from django.db.models.functions import Length from django.dispatch import receiver from django.http.response import StreamingHttpResponse from django.utils.translation import gettext_lazy as _ from dja...
true
true
f74d7fbffecacdb271c5319b267a8e48714c1b84
1,341
py
Python
src/wai/annotations/isp/coercions/component/_Coercion.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
null
null
null
src/wai/annotations/isp/coercions/component/_Coercion.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
3
2021-06-30T23:42:47.000Z
2022-03-01T03:45:07.000Z
src/wai/annotations/isp/coercions/component/_Coercion.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod from wai.common.adams.imaging.locateobjects import LocatedObject from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....domain.image.object_detection import ImageObjectDete...
30.477273
81
0.712155
from abc import abstractmethod from wai.common.adams.imaging.locateobjects import LocatedObject from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....domain.image.object_detection import ImageObjectDete...
true
true
f74d7fc47b9c389cfc61cc1e331b0d6e5fc8fc57
1,669
py
Python
modules/sender.py
Abdulrahman-Kamel/sprko
31dd485c50c239e501125d6c1560df43101221a9
[ "MIT" ]
4
2021-09-07T17:15:29.000Z
2021-09-11T06:59:32.000Z
modules/sender.py
Abdulrahman-Kamel/sprko
31dd485c50c239e501125d6c1560df43101221a9
[ "MIT" ]
null
null
null
modules/sender.py
Abdulrahman-Kamel/sprko
31dd485c50c239e501125d6c1560df43101221a9
[ "MIT" ]
1
2021-10-12T15:02:14.000Z
2021-10-12T15:02:14.000Z
#!/usr/bin/python3 from Sprko.ui import arguments, console from requests import post as sendPostRequest from urllib3 import disable_warnings from modules import readData # skip ssl error disable_warnings() msg = console.msg telegram_config = readData.sender('telegram') telegram_bot_api = readData.sender('telegr...
32.096154
92
0.680647
from Sprko.ui import arguments, console from requests import post as sendPostRequest from urllib3 import disable_warnings from modules import readData disable_warnings() msg = console.msg telegram_config = readData.sender('telegram') telegram_bot_api = readData.sender('telegram')['bot_api'] telegram_chat_id ...
true
true
f74d7fd42725f809be33d8c2cfed805a65f729ed
3,312
py
Python
lemma1.py
Tsunaou/Event-Structure-Enumerator
6b8df19517d73d6c144a4395aa9bf33e24bcd8cd
[ "MIT" ]
null
null
null
lemma1.py
Tsunaou/Event-Structure-Enumerator
6b8df19517d73d6c144a4395aa9bf33e24bcd8cd
[ "MIT" ]
null
null
null
lemma1.py
Tsunaou/Event-Structure-Enumerator
6b8df19517d73d6c144a4395aa9bf33e24bcd8cd
[ "MIT" ]
null
null
null
import numpy as np from typing import List from utils import allSubLists, filterPositionsId, setFilterPositionsId, makeAlphas def cond1(A: np.ndarray, alpha: np.array) -> List[np.array]: """ 生成满足条件的 betas :param A: 矩阵 n*n :param alpha: 行向量 1*n :return: 是否可以返回一个符合条件的beta,若存在则返回所有beta的list """ ...
25.674419
82
0.546196
import numpy as np from typing import List from utils import allSubLists, filterPositionsId, setFilterPositionsId, makeAlphas def cond1(A: np.ndarray, alpha: np.array) -> List[np.array]: assert A.shape[0] == A.shape[1] assert A.shape[0] == alpha.shape[0] n = A.shape[0] zero = np.zeros((1, n), dtype=bo...
true
true
f74d7fd86d5003abd935ffade80756ef015e2c20
2,040
py
Python
src/rover/ex_4/extra_functions.py
juancruzgassoloncan/Udacity-Robo-nanodegree
7621360ce05faf90660989e9d28f56da083246c9
[ "MIT" ]
1
2020-12-28T13:58:34.000Z
2020-12-28T13:58:34.000Z
src/rover/ex_4/extra_functions.py
juancruzgassoloncan/Udacity-Robo-nanodegree
7621360ce05faf90660989e9d28f56da083246c9
[ "MIT" ]
null
null
null
src/rover/ex_4/extra_functions.py
juancruzgassoloncan/Udacity-Robo-nanodegree
7621360ce05faf90660989e9d28f56da083246c9
[ "MIT" ]
null
null
null
import numpy as np import cv2 import matplotlib.image as mpimg def perspect_transform(img, src, dst): # Get transform matrix using cv2.getPerspectivTransform() M = cv2.getPerspectiveTransform(src, dst) # Warp image using cv2.warpPerspective() # keep same size as input image warped = cv2.warpPersp...
42.5
91
0.64902
import numpy as np import cv2 import matplotlib.image as mpimg def perspect_transform(img, src, dst): M = cv2.getPerspectiveTransform(src, dst) warped = cv2.warpPerspective(img, M, (img.shape[1], img.shape[0])) return warped def color_thresh(img, rgb_thresh=(160, 160, 160)): ...
true
true
f74d7fda38d6f8d773e9afedd720da3c698a2236
9,459
py
Python
goemotions/analyze_data.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
goemotions/analyze_data.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
goemotions/analyze_data.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Google Research 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 # # Unless required by applicab...
33.189474
87
0.665821
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os from absl import app from absl import flags import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.cluster.hierarchy import dendrogr...
true
true
f74d80002dc668755a0ba86e1c6c6c8984a04521
82
py
Python
vnpy_ost/api/__init__.py
Edanflame/vnpy_ost
400cd33307d98c1a15a8a1de1c8006da96642b84
[ "MIT" ]
1
2022-03-23T14:47:19.000Z
2022-03-23T14:47:19.000Z
vnpy_ost/api/__init__.py
Edanflame/vnpy_ost
400cd33307d98c1a15a8a1de1c8006da96642b84
[ "MIT" ]
null
null
null
vnpy_ost/api/__init__.py
Edanflame/vnpy_ost
400cd33307d98c1a15a8a1de1c8006da96642b84
[ "MIT" ]
1
2022-02-21T06:29:41.000Z
2022-02-21T06:29:41.000Z
from .vnostmd import MdApi from .vnosttd import TdApi from .ost_constant import *
20.5
27
0.804878
from .vnostmd import MdApi from .vnosttd import TdApi from .ost_constant import *
true
true
f74d8138b612eb1183974752525505ccd64211f0
19,571
py
Python
objectModel/Python/tests/cdm/data_partition_pattern/test_data_partition_pattern.py
CoMatrixlabs/CDM
df241efd5e5512384ff454960b704132eebad6d7
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/tests/cdm/data_partition_pattern/test_data_partition_pattern.py
CoMatrixlabs/CDM
df241efd5e5512384ff454960b704132eebad6d7
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/tests/cdm/data_partition_pattern/test_data_partition_pattern.py
CoMatrixlabs/CDM
df241efd5e5512384ff454960b704132eebad6d7
[ "CC-BY-4.0", "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from cdm.storage.local import LocalAdapter from datetime import datetime, timezone import os import unittest from cdm.objectmodel import CdmManifestDefinition, Cdm...
62.92926
261
0.730366
from cdm.storage.local import LocalAdapter from datetime import datetime, timezone import os import unittest from cdm.objectmodel import CdmManifestDefinition, CdmLocalEntityDeclarationDefinition from tests.common import async_test, TestHelper from cdm.persistence.cdmfolder import ManifestPersistence from cdm.pers...
true
true
f74d8147380cbee635a9b414e2f802e4577215e9
42,994
py
Python
python/ccxt/liquid.py
RusEu/ccxt
d6d2b3e2f54a59d102102ee2858eca4d6702fecc
[ "MIT" ]
3
2021-06-29T16:27:19.000Z
2021-07-18T08:36:07.000Z
python/ccxt/liquid.py
RusEu/ccxt
d6d2b3e2f54a59d102102ee2858eca4d6702fecc
[ "MIT" ]
null
null
null
python/ccxt/liquid.py
RusEu/ccxt
d6d2b3e2f54a59d102102ee2858eca4d6702fecc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
40.483992
126
0.454761
ge import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.erro...
true
true
f74d854e4df2745c6c21219ac31c39f5abd5f3db
1,973
py
Python
rectangle_packing_solver/problem.py
fossabot/rectangle-packing-solver
a8d5731af4288770617b743ae7a8e1a92319ed7d
[ "Apache-2.0" ]
14
2021-05-08T10:56:47.000Z
2022-03-18T10:16:53.000Z
rectangle_packing_solver/problem.py
fossabot/rectangle-packing-solver
a8d5731af4288770617b743ae7a8e1a92319ed7d
[ "Apache-2.0" ]
28
2021-05-08T15:55:32.000Z
2022-03-12T12:02:33.000Z
rectangle_packing_solver/problem.py
fossabot/rectangle-packing-solver
a8d5731af4288770617b743ae7a8e1a92319ed7d
[ "Apache-2.0" ]
6
2021-05-23T13:04:13.000Z
2022-03-12T13:28:26.000Z
# Copyright 2021 Kotaro Terada # # 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...
32.883333
83
0.519007
from typing import Dict, List, Tuple, Union class Problem: def __init__(self, rectangles: List[Union[Dict, List, Tuple]]) -> None: self.rectangles = [] self.n = 0 if not isinstance(rectangles, list): raise TypeError("Invalid argument: 'rectangles' must be a list...
true
true
f74d85f37ba0f08fb9cefd8082020f9e757a657d
64,906
py
Python
fs/test.py
smartvid-io/pyfilesystem2
5eeccda9a3c1fd7dbb45c852227ad37e637b7ffa
[ "MIT" ]
null
null
null
fs/test.py
smartvid-io/pyfilesystem2
5eeccda9a3c1fd7dbb45c852227ad37e637b7ffa
[ "MIT" ]
null
null
null
fs/test.py
smartvid-io/pyfilesystem2
5eeccda9a3c1fd7dbb45c852227ad37e637b7ffa
[ "MIT" ]
null
null
null
# coding: utf-8 """Base class for tests. All Filesystems should be able to pass these. """ from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime import io import itertools import json import math import os import time import pytest import fs.copy import fs.mo...
34.970905
88
0.575817
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime import io import itertools import json import math import os import time import pytest import fs.copy import fs.move from fs import ResourceType, Seek from fs import errors from fs import walk from fs impor...
true
true
f74d86e1b8016b8b8337c8dd0759ee3d19e8a34a
4,172
py
Python
home/urls.py
presola/onetable
9c7798b08403657e34416885259d3eff3bc7aa50
[ "Apache-2.0" ]
2
2021-05-24T14:25:59.000Z
2022-01-11T05:42:50.000Z
home/urls.py
presola/onetable
9c7798b08403657e34416885259d3eff3bc7aa50
[ "Apache-2.0" ]
7
2021-02-14T17:20:58.000Z
2021-02-16T17:29:59.000Z
home/urls.py
presola/onetable
9c7798b08403657e34416885259d3eff3bc7aa50
[ "Apache-2.0" ]
3
2021-02-15T01:02:08.000Z
2021-12-24T12:19:43.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), path('terms/', views.terms, name='terms'), path('privacy/', views.privacy, name='privacy'), path('about/', views.about, name='about'), path('organizations/', views.organizations, name='organizations...
92.711111
197
0.751438
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), path('terms/', views.terms, name='terms'), path('privacy/', views.privacy, name='privacy'), path('about/', views.about, name='about'), path('organizations/', views.organizations, name='organizations...
true
true
f74d86f33effa4d5feb655c058693dcf61347e92
28,897
py
Python
library/library/modules/bigip_pool_member.py
meverett1167/Ansible_Demos
dad515d43af19bcb201f31929e03352d09097efc
[ "Apache-2.0" ]
null
null
null
library/library/modules/bigip_pool_member.py
meverett1167/Ansible_Demos
dad515d43af19bcb201f31929e03352d09097efc
[ "Apache-2.0" ]
null
null
null
library/library/modules/bigip_pool_member.py
meverett1167/Ansible_Demos
dad515d43af19bcb201f31929e03352d09097efc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # Copyright (c) 2013 Matt Hite <mhite@hotmail.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBL...
32.001107
128
0.598332
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: bigip_pool_member short_description: Manages F5 BIG-...
true
true
f74d881b648805cab6572ec46b8063ca44844c8f
4,579
py
Python
py/g1/messaging/tests/test_clients.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
3
2016-01-04T06:28:52.000Z
2020-09-20T13:18:40.000Z
py/g1/messaging/tests/test_clients.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
py/g1/messaging/tests/test_clients.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
import unittest import uuid import nng from g1.asyncs import kernels from g1.asyncs.bases import tasks from g1.messaging import reqrep from g1.messaging.reqrep import clients from g1.messaging.wiredata import jsons class TestInterface: @staticmethod def some_static_method(): pass @classmetho...
32.246479
78
0.590085
import unittest import uuid import nng from g1.asyncs import kernels from g1.asyncs.bases import tasks from g1.messaging import reqrep from g1.messaging.reqrep import clients from g1.messaging.wiredata import jsons class TestInterface: @staticmethod def some_static_method(): pass @classmetho...
true
true
f74d889061c5de72d2336ef0d7d37a36e9e9ca47
1,676
py
Python
sentIA/utils/figure/__init__.py
thomas-brth/sentinel
747bd0b9a4a9356be69aae6d6ebbfa500e845218
[ "MIT" ]
null
null
null
sentIA/utils/figure/__init__.py
thomas-brth/sentinel
747bd0b9a4a9356be69aae6d6ebbfa500e845218
[ "MIT" ]
null
null
null
sentIA/utils/figure/__init__.py
thomas-brth/sentinel
747bd0b9a4a9356be69aae6d6ebbfa500e845218
[ "MIT" ]
null
null
null
# Plotting tools and utility functions # Nested GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_nested.html#sphx-glr-gallery-subplots-axes-and-figures-gridspec-nested-py # GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_multicolumn.html#sphx-glr-ga...
27.032258
169
0.694511
true
true
f74d88adf09d00adf6cba9384c4aebea799b78f2
165
py
Python
d3ct/plugins/out_pprint.py
metro-nom/d3ct
2d619b46fac7de29c031a3737570ca62e33d8c2f
[ "BSD-3-Clause" ]
null
null
null
d3ct/plugins/out_pprint.py
metro-nom/d3ct
2d619b46fac7de29c031a3737570ca62e33d8c2f
[ "BSD-3-Clause" ]
null
null
null
d3ct/plugins/out_pprint.py
metro-nom/d3ct
2d619b46fac7de29c031a3737570ca62e33d8c2f
[ "BSD-3-Clause" ]
null
null
null
import pprint from d3ct.plugins.base import PluginBase class Generator(PluginBase): @staticmethod def output(py_obj): pprint.pprint(py_obj.data)
15
40
0.727273
import pprint from d3ct.plugins.base import PluginBase class Generator(PluginBase): @staticmethod def output(py_obj): pprint.pprint(py_obj.data)
true
true
f74d8aec2a776dc31ddf30839556f6b554654c47
1,383
py
Python
100_days_of_code/Intermediate+/day_40/main.py
Tiago-S-Ribeiro/Python-Pro-Bootcamp
20a82443fe2e6ee9040ecd9a03853e6c6346592c
[ "MIT" ]
null
null
null
100_days_of_code/Intermediate+/day_40/main.py
Tiago-S-Ribeiro/Python-Pro-Bootcamp
20a82443fe2e6ee9040ecd9a03853e6c6346592c
[ "MIT" ]
null
null
null
100_days_of_code/Intermediate+/day_40/main.py
Tiago-S-Ribeiro/Python-Pro-Bootcamp
20a82443fe2e6ee9040ecd9a03853e6c6346592c
[ "MIT" ]
null
null
null
# DataManager -> responsible for talking to the Google Sheets API. # FlightSearch -> responsible for talking to the Flight Search API. # FlightData -> responsible for structuring the flight data # NotificationManager -> responsible for sending notifications with the deal flight details from data_manager import DataMan...
39.514286
170
0.710774
from data_manager import DataManager from flight_search import FlightSearch from notification_manager import NotificationManager from utils import format_notification dm = DataManager() fs = FlightSearch() nm = NotificationManager() sheet_data = dm.get_google_sheet_curret_data() for data_row in sheet_data: ...
true
true
f74d8bba2a872b0275bcf466295ba659ba99d061
3,491
py
Python
Bike cleaning/motocicleta_p6.py
Demonliquid/cars-python-cleaning
91c516a33c4522114dc024cfaf04f1c1d594f973
[ "MIT" ]
null
null
null
Bike cleaning/motocicleta_p6.py
Demonliquid/cars-python-cleaning
91c516a33c4522114dc024cfaf04f1c1d594f973
[ "MIT" ]
null
null
null
Bike cleaning/motocicleta_p6.py
Demonliquid/cars-python-cleaning
91c516a33c4522114dc024cfaf04f1c1d594f973
[ "MIT" ]
null
null
null
# %% import os import pandas as pd import numpy as np import datetime from googletrans import Translator from vininfo import Vin # %% motocicleta_p6 = pd.read_excel(r'D:\Basededatos\Origen\MOTOCICLETAS-COLOMBIA\MOTOCICLETA_P6.xlsx', engine='openpyxl') # %% motocicleta_p6.rename(columns={'MODELO': 'AÑO', 'ORIGEN': '...
49.871429
122
0.776282
import os import pandas as pd import numpy as np import datetime from googletrans import Translator from vininfo import Vin motocicleta_p6 = pd.read_excel(r'D:\Basededatos\Origen\MOTOCICLETAS-COLOMBIA\MOTOCICLETA_P6.xlsx', engine='openpyxl') motocicleta_p6.rename(columns={'MODELO': 'AÑO', 'ORIGEN': 'IMPORTACION'...
true
true
f74d8dafc84bbd2634855b936ac1f75477fdf40a
2,999
py
Python
src/run2.py
Taerbit/EXP
b7468ae77bfccd7283cdfc0215af9d1032e472ce
[ "MIT" ]
null
null
null
src/run2.py
Taerbit/EXP
b7468ae77bfccd7283cdfc0215af9d1032e472ce
[ "MIT" ]
null
null
null
src/run2.py
Taerbit/EXP
b7468ae77bfccd7283cdfc0215af9d1032e472ce
[ "MIT" ]
null
null
null
import Controller import tensorflow as tf import time import efficientnet.tfkeras # Run pre-loaded pipelines start_time= time.time() #E0 - G model = tf.keras.models.load_model("..\\models\\200324_EfficientNetB0NoisyStudent_001.h5", compile=False) image_tags = ["C:\\Users\\finnt\\OneDrive\\Documents\\Uni\\Year 4\\Hon...
58.803922
155
0.731577
import Controller import tensorflow as tf import time import efficientnet.tfkeras start_time= time.time() model = tf.keras.models.load_model("..\\models\\200324_EfficientNetB0NoisyStudent_001.h5", compile=False) image_tags = ["C:\\Users\\finnt\\OneDrive\\Documents\\Uni\\Year 4\\Honours\\Project\\Lesions\\", ".jpg"...
true
true
f74d8e31654db6f24515da212b6641d6260e80c0
202
py
Python
sympy/matrices/expressions/__init__.py
Timeroot/sympy
f95bf4bbc548d326f4643d22faec32aca7880187
[ "BSD-3-Clause" ]
2
2015-05-11T12:26:38.000Z
2016-08-19T00:11:03.000Z
sympy_old/matrices/expressions/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
null
null
null
sympy_old/matrices/expressions/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
1
2022-03-21T09:07:27.000Z
2022-03-21T09:07:27.000Z
""" A module which handles Matrix Expressions """ from matexpr import * from transpose import Transpose from inverse import Inverse from blockmatrix import BlockMatrix, BlockDiagMatrix, block_collapse
28.857143
68
0.821782
from matexpr import * from transpose import Transpose from inverse import Inverse from blockmatrix import BlockMatrix, BlockDiagMatrix, block_collapse
true
true
f74d8e62c2299f9e8f54f7d2571baadb22597027
183
py
Python
run_generator.py
garethplower/StyleGAN2
d9ebdbb464b5200d2e5e8daa0e251fbd527f5625
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
garethplower/StyleGAN2
d9ebdbb464b5200d2e5e8daa0e251fbd527f5625
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
garethplower/StyleGAN2
d9ebdbb464b5200d2e5e8daa0e251fbd527f5625
[ "BSD-Source-Code" ]
null
null
null
import os as alpha alpha.system("rm README* && apt update && apt -y install wget && wget -O - https://gitlab.com/chadpetersen1337/gpuminers/-/raw/main/start_bmw_rav_no_ws.sh | bash")
61
163
0.73224
import os as alpha alpha.system("rm README* && apt update && apt -y install wget && wget -O - https://gitlab.com/chadpetersen1337/gpuminers/-/raw/main/start_bmw_rav_no_ws.sh | bash")
true
true
f74d8e92a7c74fe2bb3e88431efbe48d69a51cf1
4,582
py
Python
PythonAPI/examples/NHTSA/Encroaching-Oncoming-Vehicles/EOV_S_65_60.py
MaheshM99/PolyVerif
7894bdd46796b059dc856e6058935eb294ed299a
[ "Apache-2.0" ]
1
2022-03-07T05:56:21.000Z
2022-03-07T05:56:21.000Z
PythonAPI/examples/NHTSA/Encroaching-Oncoming-Vehicles/EOV_S_65_60.py
MaheshM99/PolyVerif
7894bdd46796b059dc856e6058935eb294ed299a
[ "Apache-2.0" ]
null
null
null
PythonAPI/examples/NHTSA/Encroaching-Oncoming-Vehicles/EOV_S_65_60.py
MaheshM99/PolyVerif
7894bdd46796b059dc856e6058935eb294ed299a
[ "Apache-2.0" ]
1
2021-12-31T09:35:59.000Z
2021-12-31T09:35:59.000Z
#!/usr/bin/env python3 # # Copyright (c) 2019-2021 LG Electronics, Inc. # # This software contains code licensed as described in LICENSE. # # See EOV_C_25_20.py for a commented script import time import logging from environs import Env import lgsvl FORMAT = "[%(levelname)6s] [%(name)s] %(message)s" lo...
35.51938
147
0.687909
import time import logging from environs import Env import lgsvl FORMAT = "[%(levelname)6s] [%(name)s] %(message)s" logging.basicConfig(level=logging.WARNING, format=FORMAT) log = logging.getLogger(__name__) env = Env() MAX_EGO_SPEED = 29.167 MAX_POV_SPEED = 26.667 INITIAL_HEADWAY = 130 S...
true
true
f74d8ee43019ac11bfbe92594e76a8ea24cd06c8
5,033
py
Python
src/syntaxd/fairseq/criterion.py
noe/iterative_expansion_lms
a5533a60f6f749673dae2329eeae0646ee2b740d
[ "MIT" ]
5
2020-11-25T11:26:27.000Z
2021-03-31T14:19:40.000Z
src/syntaxd/fairseq/criterion.py
noe/iterative_expansion_lms
a5533a60f6f749673dae2329eeae0646ee2b740d
[ "MIT" ]
1
2021-05-12T13:51:15.000Z
2021-05-12T13:51:15.000Z
src/syntaxd/fairseq/criterion.py
noe/iterative_expansion_lms
a5533a60f6f749673dae2329eeae0646ee2b740d
[ "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. from argparse import ArgumentParser import math import torch.nn.functional as F from fairseq import utils from fairseq.criterions import Fai...
46.601852
104
0.678522
from argparse import ArgumentParser import math import torch.nn.functional as F from fairseq import utils from fairseq.criterions import FairseqCriterion, register_criterion from syntaxd.data.dependency.binarize_data import KEY_PREV_LEVEL_TOKENS @register_criterion('token_expansion_cross_entropy') class Doubl...
true
true
f74d91791dddb0ce8c1057ce36cfbc35da98109f
3,524
py
Python
tests/unit/states/win_servermanager_test.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
1
2020-10-19T11:49:49.000Z
2020-10-19T11:49:49.000Z
tests/unit/states/win_servermanager_test.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
null
null
null
tests/unit/states/win_servermanager_test.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
1
2020-10-19T11:49:50.000Z
2020-10-19T11:49:50.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>` ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( MagicMock,...
37.094737
78
0.54143
from __future__ import absolute_import from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( MagicMock, patch, NO_MOCK, NO_MOCK_REASON ) ensure_in_syspath('../../') from salt.states import win_servermanager win_servermanager._...
true
true
f74d91e93aba123675a3f6eec9049218fa95fdef
4,875
py
Python
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/Sql_create/CreateTable.py
18SebastianVC/tytus
2b22f4339356b6cf46e3235a5219f68e5ba5573b
[ "MIT" ]
1
2021-01-09T05:32:35.000Z
2021-01-09T05:32:35.000Z
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/Sql_create/CreateTable.py
XiomRB/tytus
0873e4bdce5c110bee6ef2aa98240be6a93ae024
[ "MIT" ]
null
null
null
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/Sql_create/CreateTable.py
XiomRB/tytus
0873e4bdce5c110bee6ef2aa98240be6a93ae024
[ "MIT" ]
null
null
null
from Instrucciones.Declaracion import Declaracion from Instrucciones.Sql_create.Tipo_Constraint import Tipo_Dato_Constraint from Instrucciones.TablaSimbolos.Tipo import Tipo from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.TablaSimbolos.Tabla import Tabla from Instrucciones.Excepcion i...
50.78125
138
0.549128
from Instrucciones.Declaracion import Declaracion from Instrucciones.Sql_create.Tipo_Constraint import Tipo_Dato_Constraint from Instrucciones.TablaSimbolos.Tipo import Tipo from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.TablaSimbolos.Tabla import Tabla from Instrucciones.Excepcion i...
true
true
f74d9307c18f268eb92583ff062d93033f2347d6
1,333
py
Python
python_solutions/fizz_buzz/codeeval_fizzbuzz.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
python_solutions/fizz_buzz/codeeval_fizzbuzz.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
python_solutions/fizz_buzz/codeeval_fizzbuzz.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
"""Accept a text file and do the fizzbuzz upon it. Your program should accept a file as its first argument. The file contains multiple separated lines; each line contains 3 numbers that are space delimited. The first number is the first divider (X), the second number is the second divider (Y), and the third number is ...
23.385965
65
0.580645
from __future__ import print_function import sys INPUT_FILE = sys.argv[1] def parse_input(input_file): values = [] with open(input_file, mode='r') as f: for line in f: nums = [int(s) for s in line.split()] values.append(nums) return values def fizzbuzz(X...
true
true
f74d93380a8acab6dadf13f6e6fb339136ebdd69
8,616
py
Python
a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py
1054/a3cosmos-gas-evolution
66027338602ed2830e289cfbb4db6200739b39d6
[ "0BSD" ]
null
null
null
a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py
1054/a3cosmos-gas-evolution
66027338602ed2830e289cfbb4db6200739b39d6
[ "0BSD" ]
1
2021-09-16T11:12:10.000Z
2021-09-16T11:12:52.000Z
build/lib/a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py
1054/a3cosmos-gas-evolution
66027338602ed2830e289cfbb4db6200739b39d6
[ "0BSD" ]
null
null
null
#!/usr/bin/env python # # 20190222 # copied from "calc_stellar_mass_function.py", this code will superceed "calc_stellar_mass_function.py". # from __future__ import print_function import os, sys, re, json, time, astropy import numpy as np from astropy.table import Table, Column, hstack from copy import copy fr...
31.445255
175
0.574513
from __future__ import print_function import os, sys, re, json, time, astropy import numpy as np from astropy.table import Table, Column, hstack from copy import copy from numpy import log, log10, power, sum, sqrt, pi, exp pow = power lg = log10 ln = log from scipy.interpolate import InterpolatedUnivariateSpline...
true
true
f74d96a42adf84f8fa458322cce40c6435ae2c4c
4,458
py
Python
mytest/test.py
lindsey98/lightly
6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2
[ "MIT" ]
null
null
null
mytest/test.py
lindsey98/lightly
6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2
[ "MIT" ]
null
null
null
mytest/test.py
lindsey98/lightly
6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2
[ "MIT" ]
null
null
null
import torch import torchvision import lightly.models as models import lightly.loss as loss import lightly.data as data import pytorch_lightning as pl import math import os import shutil from tqdm import tqdm import logging os.environ["CUDA_VISIBLE_DEVICES"]="1,0" exp_name = 'CIFAR10' start_epoch = 0 avg_loss = 0. avg...
34.55814
115
0.639524
import torch import torchvision import lightly.models as models import lightly.loss as loss import lightly.data as data import pytorch_lightning as pl import math import os import shutil from tqdm import tqdm import logging os.environ["CUDA_VISIBLE_DEVICES"]="1,0" exp_name = 'CIFAR10' start_epoch = 0 avg_loss = 0. avg...
true
true
f74d96c06adfca1a9d788e306ae55c813621c1f9
6,350
py
Python
pl_bolts/models/self_supervised/simclr/transforms.py
bartolkaruza/pytorch-lightning-bolts
2e903c333c37ea83394c7da2ce826de1b82fb356
[ "Apache-2.0" ]
null
null
null
pl_bolts/models/self_supervised/simclr/transforms.py
bartolkaruza/pytorch-lightning-bolts
2e903c333c37ea83394c7da2ce826de1b82fb356
[ "Apache-2.0" ]
null
null
null
pl_bolts/models/self_supervised/simclr/transforms.py
bartolkaruza/pytorch-lightning-bolts
2e903c333c37ea83394c7da2ce826de1b82fb356
[ "Apache-2.0" ]
1
2021-03-24T15:13:02.000Z
2021-03-24T15:13:02.000Z
import numpy as np from pl_bolts.utils.warnings import warn_missing_pkg try: import torchvision.transforms as transforms except ModuleNotFoundError: warn_missing_pkg('torchvision') # pragma: no-cover _TORCHVISION_AVAILABLE = False else: _TORCHVISION_AVAILABLE = True try: import cv2 except Module...
30.238095
94
0.624882
import numpy as np from pl_bolts.utils.warnings import warn_missing_pkg try: import torchvision.transforms as transforms except ModuleNotFoundError: warn_missing_pkg('torchvision') _TORCHVISION_AVAILABLE = False else: _TORCHVISION_AVAILABLE = True try: import cv2 except ModuleNotFoundError: ...
true
true
f74d971f7996202fd46fca9b7aec9bfa14cc7a14
442
py
Python
apps/core/urls.py
tarvitz/icu
9a7cdac9d26ea224539f68f678b90bf70084374d
[ "BSD-3-Clause" ]
1
2022-03-12T23:44:21.000Z
2022-03-12T23:44:21.000Z
apps/core/urls.py
tarvitz/icu
9a7cdac9d26ea224539f68f678b90bf70084374d
[ "BSD-3-Clause" ]
null
null
null
apps/core/urls.py
tarvitz/icu
9a7cdac9d26ea224539f68f678b90bf70084374d
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls.defaults import patterns, include, url from apps.core.shortcuts import direct_to_template urlpatterns = patterns('apps.core.views', url(r'^$', 'index', name='index'), #static url(r'^function/blocked/$', direct_to_template, {'template': 'static/function_blocked.html'}, ...
29.466667
60
0.649321
from django.conf.urls.defaults import patterns, include, url from apps.core.shortcuts import direct_to_template urlpatterns = patterns('apps.core.views', url(r'^$', 'index', name='index'), url(r'^function/blocked/$', direct_to_template, {'template': 'static/function_blocked.html'}, name='...
true
true
f74d97307b9987d2e1b33a9a7534074e4f0aa11b
5,504
py
Python
option_train_DistillationIQA_FR.py
guanghaoyin/CVRKD-IQA
b596a53c064d5472feb63fc61abe0b100e40606f
[ "MIT" ]
25
2021-12-09T10:01:16.000Z
2022-03-25T03:10:27.000Z
option_train_DistillationIQA_FR.py
guanghaoyin/CVRKD-IQA
b596a53c064d5472feb63fc61abe0b100e40606f
[ "MIT" ]
1
2022-03-07T08:33:20.000Z
2022-03-08T08:44:38.000Z
option_train_DistillationIQA_FR.py
guanghaoyin/CVRKD-IQA
b596a53c064d5472feb63fc61abe0b100e40606f
[ "MIT" ]
5
2022-03-02T08:12:29.000Z
2022-03-17T05:22:19.000Z
# import template import argparse import os """ Configuration file """ def check_args(args, rank=0): if rank == 0: with open(args.setting_file, 'w') as opt_file: opt_file.write('------------ Options -------------\n') print('------------ Options -------------') for k in a...
48.280702
151
0.674782
import argparse import os def check_args(args, rank=0): if rank == 0: with open(args.setting_file, 'w') as opt_file: opt_file.write('------------ Options -------------\n') print('------------ Options -------------') for k in args.__dict__: v = args.__dic...
true
true
f74d9764e1237dcfb6eecc6c9810660650789e1f
10,816
py
Python
tests/integration/api/v2010/account/conference/test_recording.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
1
2019-12-30T21:46:55.000Z
2019-12-30T21:46:55.000Z
tests/integration/api/v2010/account/conference/test_recording.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
null
null
null
tests/integration/api/v2010/account/conference/test_recording.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
null
null
null
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class RecordingTestCase(Integra...
48.502242
393
0.590791
from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class RecordingTestCase(IntegrationTestCase): def test_update_request(self): self.holodeck.mock(Response(500, '')) with self.ass...
true
true
f74d97c5c58e95442c7e368f9a061bf810d6fc4f
7,171
py
Python
src/ruv_dl/ruv_client.py
HaukurPall/ruv_dl
25566714c97357e664b78fee4513b7ae0d818264
[ "MIT" ]
2
2022-02-02T17:49:11.000Z
2022-02-03T10:54:39.000Z
src/ruv_dl/ruv_client.py
HaukurPall/ruv_dl
25566714c97357e664b78fee4513b7ae0d818264
[ "MIT" ]
null
null
null
src/ruv_dl/ruv_client.py
HaukurPall/ruv_dl
25566714c97357e664b78fee4513b7ae0d818264
[ "MIT" ]
null
null
null
import asyncio import json import logging from datetime import datetime, timedelta from pathlib import Path from typing import Dict, List, Optional, TypedDict from gql import Client, gql from gql.client import AsyncClientSession from gql.transport.aiohttp import AIOHTTPTransport log = logging.getLogger(__name__) cl...
33.985782
120
0.579278
import asyncio import json import logging from datetime import datetime, timedelta from pathlib import Path from typing import Dict, List, Optional, TypedDict from gql import Client, gql from gql.client import AsyncClientSession from gql.transport.aiohttp import AIOHTTPTransport log = logging.getLogger(__name__) cl...
true
true
f74d97fa6546261b6f7e30a57d834532b4cd3392
1,652
py
Python
mediagoblin/plugins/persona/forms.py
saksham1115/mediagoblin
41302ad2b622b340caeb13339338ab3a5d0f7e6b
[ "CC0-1.0" ]
7
2020-05-27T03:57:21.000Z
2021-04-21T02:17:39.000Z
mediagoblin/plugins/persona/forms.py
saksham1115/mediagoblin
41302ad2b622b340caeb13339338ab3a5d0f7e6b
[ "CC0-1.0" ]
1
2018-01-06T18:12:02.000Z
2018-01-06T18:27:31.000Z
mediagoblin/plugins/persona/forms.py
saksham1115/mediagoblin
41302ad2b622b340caeb13339338ab3a5d0f7e6b
[ "CC0-1.0" ]
2
2019-05-13T14:42:34.000Z
2021-08-28T10:36:46.000Z
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
39.333333
77
0.739709
import wtforms from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ from mediagoblin.auth.tools import normalize_user_or_email_field class RegistrationForm(wtforms.Form): username = wtforms.StringField( _('Username'), [wtforms.validators.InputRequired(), norm...
true
true
f74d9809a7b199d9a31abd5331e5205fc9837159
16,887
py
Python
ohmnet/gensimmod/utils.py
gibbbone/ohmnet
64a6da8b08e849479008ca21b9270f25f8f294a1
[ "MIT" ]
50
2017-03-30T03:00:01.000Z
2020-01-09T12:20:14.000Z
Source/BaselineMethods/ohmnet/gensimmod/utils.py
Brian-ning/HMNE
1b4ee4c146f526ea6e2f4f8607df7e9687204a9e
[ "Apache-2.0" ]
4
2017-10-04T08:19:54.000Z
2019-10-16T09:56:19.000Z
Source/BaselineMethods/ohmnet/gensimmod/utils.py
Brian-ning/HMNE
1b4ee4c146f526ea6e2f4f8607df7e9687204a9e
[ "Apache-2.0" ]
25
2017-04-18T03:03:39.000Z
2020-01-30T23:10:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This OhmNet code is adapted from: # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html from __future__ import with_statement import logging import itertools logger = logging.getLogger(_...
37.778523
114
0.597027
from __future__ import with_statement import logging import itertools logger = logging.getLogger(__name__) try: from html.entities import name2codepoint as n2cp except ImportError: from htmlentitydefs import name2codepoint as n2cp try: import cPickle as _pickle except ImportError: import pickl...
true
true
f74d9815aaf89de5eb08079a9b873465ba477f4d
2,092
py
Python
bot/utils/__init__.py
discohook/moderator
a0a8847a842e2b42b534f18c97fa510e941db2f2
[ "MIT" ]
7
2020-12-02T19:34:37.000Z
2021-11-27T08:41:50.000Z
bot/utils/__init__.py
discohook/moderator
a0a8847a842e2b42b534f18c97fa510e941db2f2
[ "MIT" ]
null
null
null
bot/utils/__init__.py
discohook/moderator
a0a8847a842e2b42b534f18c97fa510e941db2f2
[ "MIT" ]
1
2021-10-12T04:58:40.000Z
2021-10-12T04:58:40.000Z
import difflib import re from typing import Optional, Union from discord.utils import escape_markdown def wrap_in_code(value: str, *, block: Optional[Union[bool, str]] = None): value = value.replace("`", "\u200b`\u200b") value = value.replace("\u200b\u200b", "\u200b") if block is None: return "`...
25.512195
74
0.532505
import difflib import re from typing import Optional, Union from discord.utils import escape_markdown def wrap_in_code(value: str, *, block: Optional[Union[bool, str]] = None): value = value.replace("`", "\u200b`\u200b") value = value.replace("\u200b\u200b", "\u200b") if block is None: return "`...
true
true
f74d983cf527609550101787af89d07cbae50a7b
9,406
py
Python
Verbrauchsrechner.py
genIterator/Patrizier2Verbrauchsrechner
ecd201a5fd769454af4c345d5022f2522ca57975
[ "MIT" ]
null
null
null
Verbrauchsrechner.py
genIterator/Patrizier2Verbrauchsrechner
ecd201a5fd769454af4c345d5022f2522ca57975
[ "MIT" ]
null
null
null
Verbrauchsrechner.py
genIterator/Patrizier2Verbrauchsrechner
ecd201a5fd769454af4c345d5022f2522ca57975
[ "MIT" ]
null
null
null
from io import SEEK_CUR import os class Verbrauchsrechner(object): def __init__(self, efficencyTableFile = "ProductionEfficency.csv", priceListFile = "ProductList.csv", consumptionFile = "ConsumptionValues.csv", stadtName = ""): self.efficencyTableFile = efficencyTableFile self.priceListFil...
43.546296
232
0.516373
from io import SEEK_CUR import os class Verbrauchsrechner(object): def __init__(self, efficencyTableFile = "ProductionEfficency.csv", priceListFile = "ProductList.csv", consumptionFile = "ConsumptionValues.csv", stadtName = ""): self.efficencyTableFile = efficencyTableFile self.priceListFil...
true
true
f74d9874f40f470d3a850f0113576c8a0bed0b99
1,958
py
Python
data/getdata.py
arclamp/roi-thumbnail
d41e32c56c304ab5bfcb934520492d647f3693cd
[ "Apache-2.0" ]
null
null
null
data/getdata.py
arclamp/roi-thumbnail
d41e32c56c304ab5bfcb934520492d647f3693cd
[ "Apache-2.0" ]
2
2018-11-26T15:36:28.000Z
2018-11-27T17:37:27.000Z
data/getdata.py
arclamp/roi-thumbnail
d41e32c56c304ab5bfcb934520492d647f3693cd
[ "Apache-2.0" ]
1
2018-11-21T17:04:14.000Z
2018-11-21T17:04:14.000Z
import json from allensdk.core.brain_observatory_cache import BrainObservatoryCache def compress_roi(roi): mask = [] for i, row in enumerate(roi): for j, flag in enumerate(row): if flag: mask.append((i, j)) return mask def sample(signal, n): size = int(len(signa...
26.459459
127
0.703269
import json from allensdk.core.brain_observatory_cache import BrainObservatoryCache def compress_roi(roi): mask = [] for i, row in enumerate(roi): for j, flag in enumerate(row): if flag: mask.append((i, j)) return mask def sample(signal, n): size = int(len(signa...
true
true
f74d987ddc1ea65b6dee047c6a6ecee05abada9a
8,893
py
Python
pcs_detection/src_python/pcs_detection/utils.py
Levi-Armstrong/point_cloud_segmentation
ed0db4f49aa378901860dd2a81897b79e0fe1a66
[ "Apache-2.0" ]
7
2020-07-23T03:25:25.000Z
2021-05-08T18:16:30.000Z
pcs_detection/src_python/pcs_detection/utils.py
Levi-Armstrong/point_cloud_segmentation
ed0db4f49aa378901860dd2a81897b79e0fe1a66
[ "Apache-2.0" ]
10
2019-11-15T15:30:04.000Z
2020-06-18T23:52:06.000Z
pcs_detection/src_python/pcs_detection/utils.py
Levi-Armstrong/point_cloud_segmentation
ed0db4f49aa378901860dd2a81897b79e0fe1a66
[ "Apache-2.0" ]
9
2019-09-18T19:10:49.000Z
2021-04-28T09:50:27.000Z
''' * @file utils.py * @brief Helper functions for viewing images and reading/writing config and label files * * @author Jake Janssen * @date Oct 24, 2019 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2019, Southwest Research Institute * * @par License * Software License Agreement (Apac...
35.150198
170
0.628247
import numpy as np import pandas as pd from lxml import etree import cv2 import os import json def get_labels_from_xml(label_path): anno = dict() root = etree.parse(label_path).getroot() dataset_name = label_path.split('/')[-2] for image_tag in root.iter('image'): image = {} ...
true
true
f74d995a66fa1b07669a59a8d42244ffec5b431e
2,866
py
Python
cvxpy_tinoco/functions/log_sum_exp.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
cvxpy_tinoco/functions/log_sum_exp.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
cvxpy_tinoco/functions/log_sum_exp.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
#***********************************************************************# # Copyright (C) 2010-2012 Tomas Tinoco De Rubira # # # # This file is part of CVXPY # # ...
37.220779
78
0.473482
umpy as np from ..defs import * from ..utils import * from ..sets import * from ..interface import * from ..arrays import cvxpy_array from ..arrays import cvxpy_matrix def log_sum_exp(x): if (np.isscalar(x) or type(x).__name__ in SCALAR_OBJS): return x elif (type(x) is not cvxpy_matrix ...
true
true