hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f7600c88052e02f55994e2e8049850c870b700
2,987
py
Python
src/backend/common/models/api_auth_access.py
bovlb/the-blue-alliance
29389649d96fe060688f218d463e642dcebfd6cc
[ "MIT" ]
266
2015-01-04T00:10:48.000Z
2022-03-28T18:42:05.000Z
src/backend/common/models/api_auth_access.py
bovlb/the-blue-alliance
29389649d96fe060688f218d463e642dcebfd6cc
[ "MIT" ]
2,673
2015-01-01T20:14:33.000Z
2022-03-31T18:17:16.000Z
src/backend/common/models/api_auth_access.py
ZachOrr/the-blue-alliance
b9a2e6e07374fb12c70f8fae1948bfe90e34adfe
[ "MIT" ]
230
2015-01-04T00:10:48.000Z
2022-03-26T18:12:04.000Z
import datetime from typing import List, Optional from google.appengine.ext import ndb from backend.common.consts.auth_type import AuthType from backend.common.models.account import Account from backend.common.models.event import Event class ApiAuthAccess(ndb.Model): """ Manages secrets for access to the re...
34.333333
98
0.707734
import datetime from typing import List, Optional from google.appengine.ext import ndb from backend.common.consts.auth_type import AuthType from backend.common.models.account import Account from backend.common.models.event import Event class ApiAuthAccess(ndb.Model): description: str = ndb.TextProperty(ind...
true
true
08f7603b2c420654b34d7109796147fcaadd5eaa
42,159
py
Python
lib/galaxy/web/framework/helpers/grids.py
sneumann/galaxy
f6011bab5b8adbabae4986a45849bb9158ffc8bb
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
lib/galaxy/web/framework/helpers/grids.py
sneumann/galaxy
f6011bab5b8adbabae4986a45849bb9158ffc8bb
[ "CC-BY-3.0" ]
4
2021-02-08T20:28:34.000Z
2022-03-02T02:52:55.000Z
lib/galaxy/web/framework/helpers/grids.py
sneumann/galaxy
f6011bab5b8adbabae4986a45849bb9158ffc8bb
[ "CC-BY-3.0" ]
1
2018-05-30T07:38:54.000Z
2018-05-30T07:38:54.000Z
import logging import math from json import dumps, loads from markupsafe import escape from six import string_types, text_type from sqlalchemy.sql.expression import and_, false, func, null, or_, true from galaxy.model.item_attrs import get_foreign_key, UsesAnnotations, UsesItemRatings from galaxy.util import restore_...
45.332258
207
0.589483
import logging import math from json import dumps, loads from markupsafe import escape from six import string_types, text_type from sqlalchemy.sql.expression import and_, false, func, null, or_, true from galaxy.model.item_attrs import get_foreign_key, UsesAnnotations, UsesItemRatings from galaxy.util import restore_...
true
true
08f760eae7e6887a3755b39992e58f9ec77ffb95
2,535
py
Python
kernel_driver/connect.py
davidbrochart/kernel_driver
10abd553dbeedb3c63ac94a49ac2deff28f65337
[ "MIT" ]
2
2021-04-27T11:11:49.000Z
2021-09-23T08:20:25.000Z
kernel_driver/connect.py
davidbrochart/kernel_driver
10abd553dbeedb3c63ac94a49ac2deff28f65337
[ "MIT" ]
null
null
null
kernel_driver/connect.py
davidbrochart/kernel_driver
10abd553dbeedb3c63ac94a49ac2deff28f65337
[ "MIT" ]
2
2021-06-04T11:11:43.000Z
2021-06-24T10:17:42.000Z
import os import tempfile import socket import json import asyncio import uuid from typing import Dict, Tuple, Union import zmq import zmq.asyncio from zmq.sugar.socket import Socket channel_socket_types = { "hb": zmq.REQ, "shell": zmq.DEALER, "iopub": zmq.SUB, "stdin": zmq.DEALER, "control": zmq...
24.375
86
0.642209
import os import tempfile import socket import json import asyncio import uuid from typing import Dict, Tuple, Union import zmq import zmq.asyncio from zmq.sugar.socket import Socket channel_socket_types = { "hb": zmq.REQ, "shell": zmq.DEALER, "iopub": zmq.SUB, "stdin": zmq.DEALER, "control": zmq...
true
true
08f761add1b7437e58e864d588cc372702c5c286
3,349
py
Python
openprocurement/tender/openua/views/lot.py
raccoongang/openprocurement.tender.openua
dd2dbddf317bdb4bb38443240faf126765ef48c4
[ "Apache-2.0" ]
8
2016-01-28T11:37:09.000Z
2019-03-17T07:18:09.000Z
openprocurement/tender/openua/views/lot.py
raccoongang/openprocurement.tender.openua
dd2dbddf317bdb4bb38443240faf126765ef48c4
[ "Apache-2.0" ]
70
2016-02-11T16:46:22.000Z
2018-03-19T15:42:16.000Z
openprocurement/tender/openua/views/lot.py
raccoongang/openprocurement.tender.openua
dd2dbddf317bdb4bb38443240faf126765ef48c4
[ "Apache-2.0" ]
30
2016-01-27T10:51:00.000Z
2019-03-31T15:56:52.000Z
# -*- coding: utf-8 -*- from openprocurement.tender.belowthreshold.views.lot import TenderLotResource from openprocurement.api.utils import ( get_now, json_view, context_unpack, ) from openprocurement.tender.core.validation import ( validate_lot_data, validate_patch_lot_data, validate_tender_per...
46.513889
191
0.681696
from openprocurement.tender.belowthreshold.views.lot import TenderLotResource from openprocurement.api.utils import ( get_now, json_view, context_unpack, ) from openprocurement.tender.core.validation import ( validate_lot_data, validate_patch_lot_data, validate_tender_period_extension, valid...
true
true
08f762d4afb8eff098877538d12675d82461811a
7,256
py
Python
test/test_mp3d_eqa.py
dhruvbatra/habitat-api
00a0d51c714c3cc64e0214390daeff9ab390f289
[ "MIT" ]
null
null
null
test/test_mp3d_eqa.py
dhruvbatra/habitat-api
00a0d51c714c3cc64e0214390daeff9ab390f289
[ "MIT" ]
null
null
null
test/test_mp3d_eqa.py
dhruvbatra/habitat-api
00a0d51c714c3cc64e0214390daeff9ab390f289
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time import numpy as np import pytest import habitat import habitat.datasets.eqa.mp3d_eqa_dataset as mp3d_datas...
31.964758
78
0.63134
import time import numpy as np import pytest import habitat import habitat.datasets.eqa.mp3d_eqa_dataset as mp3d_dataset from habitat.config.default import get_config from habitat.core.embodied_task import Episode from habitat.core.logging import logger from habitat.datasets import make_dataset CFG_TEST = "test/ha...
true
true
08f762fc52214248f9890e9a90d2a9709af7fe21
2,545
py
Python
src/visualization/visualize.py
Business-Wizard/License_Plate_Reader_App
968217ffaa74ba636ea83f54ec9825567ca8699c
[ "CNRI-Python", "RSA-MD", "Xnet", "FTL", "X11" ]
5
2021-02-11T07:08:39.000Z
2021-10-31T10:10:54.000Z
src/visualization/visualize.py
Business-Wizard/License_Plate_Reader_App
968217ffaa74ba636ea83f54ec9825567ca8699c
[ "CNRI-Python", "RSA-MD", "Xnet", "FTL", "X11" ]
6
2021-02-04T19:19:42.000Z
2022-02-10T03:15:00.000Z
src/visualization/visualize.py
Business-Wizard/License_Plate_Reader_App
968217ffaa74ba636ea83f54ec9825567ca8699c
[ "CNRI-Python", "RSA-MD", "Xnet", "FTL", "X11" ]
1
2021-09-13T17:31:18.000Z
2021-09-13T17:31:18.000Z
import matplotlib.pyplot as plt from tensorflow.keras.models import load_model from src.models.train_model import visualize_history from src.data.imageprocess import (pipeline_single, read_image, grayscale, threshold_image, dilate_image, blur_image, ...
37.426471
78
0.588212
import matplotlib.pyplot as plt from tensorflow.keras.models import load_model from src.models.train_model import visualize_history from src.data.imageprocess import (pipeline_single, read_image, grayscale, threshold_image, dilate_image, blur_image, ...
true
true
08f76364b85d7e04552f6e3ba9f60f3a50d6be98
880
py
Python
bpy_utilities/logging_stub.py
half5life/SourceIO
f3dc6db92daa537acbb487ce09f371866f6e3e7f
[ "MIT" ]
null
null
null
bpy_utilities/logging_stub.py
half5life/SourceIO
f3dc6db92daa537acbb487ce09f371866f6e3e7f
[ "MIT" ]
null
null
null
bpy_utilities/logging_stub.py
half5life/SourceIO
f3dc6db92daa537acbb487ce09f371866f6e3e7f
[ "MIT" ]
null
null
null
from typing import Dict from ..utilities.singleton import SingletonMeta class BPYLoggingManager(metaclass=SingletonMeta): def __init__(self): self.loggers: Dict[str, BPYLogger] = {} def get_logger(self, name): logger = self.loggers[name] = BPYLogger(name) return logger class BPYLog...
26.666667
102
0.643182
from typing import Dict from ..utilities.singleton import SingletonMeta class BPYLoggingManager(metaclass=SingletonMeta): def __init__(self): self.loggers: Dict[str, BPYLogger] = {} def get_logger(self, name): logger = self.loggers[name] = BPYLogger(name) return logger class BPYLog...
true
true
08f76386c388883216482b0891babe65fbdc81f7
1,888
py
Python
src/Data/5. NormaliseFeatures-SA2-3-4.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
3
2019-03-02T01:24:04.000Z
2022-02-18T01:45:57.000Z
src/Data/5. NormaliseFeatures-SA2-3-4.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
null
null
null
src/Data/5. NormaliseFeatures-SA2-3-4.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
1
2019-02-28T08:32:10.000Z
2019-02-28T08:32:10.000Z
import pandas as pd import os os.chdir('Data') data = pd.read_csv('2018-08-28-NSW-SA2Input.csv', index_col = 0) # Filter just those SA1s in the giant component # SA1s = pd.read_csv('Geography/2018-08-28-NSW-SA2s.csv', squeeze = True, header = None) # data = data.loc[SA1s] mean = data.mean() std = data.s...
24.205128
89
0.674258
import pandas as pd import os os.chdir('Data') data = pd.read_csv('2018-08-28-NSW-SA2Input.csv', index_col = 0) mean = data.mean() std = data.std() data_normalised = (data - mean) / std data_normalised['2PP'] = data['2PP'] data_normalised.to_csv('2018-08-28-NSW-SA2Input-Normalised.csv') data = ...
true
true
08f764813d839e0ea4a3f30f9230dbed34b20125
804
py
Python
checkov/common/checks_infra/solvers/complex_solvers/and_solver.py
niradler/checkov
2628c6f28a5604efe3877d6eacc3044d2b66b7b1
[ "Apache-2.0" ]
4,013
2019-12-09T13:16:54.000Z
2022-03-31T14:31:01.000Z
checkov/common/checks_infra/solvers/complex_solvers/and_solver.py
niradler/checkov
2628c6f28a5604efe3877d6eacc3044d2b66b7b1
[ "Apache-2.0" ]
1,258
2019-12-17T09:55:51.000Z
2022-03-31T19:17:17.000Z
checkov/common/checks_infra/solvers/complex_solvers/and_solver.py
niradler/checkov
2628c6f28a5604efe3877d6eacc3044d2b66b7b1
[ "Apache-2.0" ]
638
2019-12-19T08:57:38.000Z
2022-03-30T21:38:37.000Z
from typing import List, Any, Dict from checkov.common.graph.checks_infra.enums import Operators from checkov.common.graph.checks_infra.solvers.base_solver import BaseSolver from checkov.common.checks_infra.solvers.complex_solvers.base_complex_solver import BaseComplexSolver from functools import reduce from operator ...
34.956522
101
0.748756
from typing import List, Any, Dict from checkov.common.graph.checks_infra.enums import Operators from checkov.common.graph.checks_infra.solvers.base_solver import BaseSolver from checkov.common.checks_infra.solvers.complex_solvers.base_complex_solver import BaseComplexSolver from functools import reduce from operator ...
true
true
08f7660b07ec655cd8e63a8fcc4fd1c1468b662b
15,489
py
Python
hybrid_cloud_patches/wsgi/openstack_dashboard/dashboards/project/volumes/volumes/tables.py
Hybrid-Cloud/badam
390ad3a6fc03948008f7c04ed2f9fcc8514cc1eb
[ "Apache-2.0" ]
2
2015-06-15T02:16:33.000Z
2022-02-23T07:10:38.000Z
hybrid_cloud_patches/wsgi/openstack_dashboard/dashboards/project/volumes/volumes/tables.py
Hybrid-Cloud/badam
390ad3a6fc03948008f7c04ed2f9fcc8514cc1eb
[ "Apache-2.0" ]
7
2016-05-13T06:39:45.000Z
2016-05-20T02:55:31.000Z
hybrid_cloud_patches/wsgi/openstack_dashboard/dashboards/project/volumes/volumes/tables.py
Hybrid-Cloud/badam
390ad3a6fc03948008f7c04ed2f9fcc8514cc1eb
[ "Apache-2.0" ]
4
2015-11-02T04:02:50.000Z
2021-05-13T17:06:00.000Z
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
35.525229
79
0.61463
from django.core.urlresolvers import NoReverseMatch from django.core.urlresolvers import reverse from django.http import HttpResponse from django.template import defaultfilters as filters from django.utils import html from django.utils.http import urlencode from django.utils import safestring from django.utils.trans...
true
true
08f767d1f6bdd499715337fd01c117582223fd46
222
py
Python
test.py
erkin98/flask-chatbot
541f8278220c3baa6a56c82a5d1608e679453d21
[ "MIT" ]
null
null
null
test.py
erkin98/flask-chatbot
541f8278220c3baa6a56c82a5d1608e679453d21
[ "MIT" ]
null
null
null
test.py
erkin98/flask-chatbot
541f8278220c3baa6a56c82a5d1608e679453d21
[ "MIT" ]
null
null
null
from twilio.rest import Client account_sid = 'xxx' auth_token = 'xxx' client = Client(account_sid, auth_token) messages = client.messages.list(to='whatsapp:+xxx') x = [record.from_ for record in messages] print(set(x))
20.181818
51
0.743243
from twilio.rest import Client account_sid = 'xxx' auth_token = 'xxx' client = Client(account_sid, auth_token) messages = client.messages.list(to='whatsapp:+xxx') x = [record.from_ for record in messages] print(set(x))
true
true
08f76aab92205f07a498c52a20db10e32310c6a2
1,798
py
Python
runtimes/python/object-read.py
eweiter/package-cloud-object-storage
0b44cc60ce961c947618968bd4039c1609a232dd
[ "Apache-2.0" ]
null
null
null
runtimes/python/object-read.py
eweiter/package-cloud-object-storage
0b44cc60ce961c947618968bd4039c1609a232dd
[ "Apache-2.0" ]
null
null
null
runtimes/python/object-read.py
eweiter/package-cloud-object-storage
0b44cc60ce961c947618968bd4039c1609a232dd
[ "Apache-2.0" ]
null
null
null
# This action will read from Cloud Object Storage. If the Cloud Object Storage # service is not bound to this action or to the package containing this action, # then you must provide the service information as argument input to this function. # Cloud Functions actions accept a single parameter, which must be a JSON ob...
33.296296
179
0.700222
import sys import json import ibm_boto3 from ibm_botocore.client import Config def main(args): resultsGetParams = getParamsCOS(args) cos = resultsGetParams['cos'] params = resultsGetParams['params'] bucket = params['bucket'] key = params['key'] try: object = cos.get_object( Bucket=bucket, Key=...
true
true
08f76bd5b94aab14d41dc1e8f68eaa3de8a988a9
1,811
py
Python
Raspberry/lightcontrols.py
VirtualScope/PiScope
294c90ce90a7d239b98feb8e96f8d056f6bbcf50
[ "MIT" ]
null
null
null
Raspberry/lightcontrols.py
VirtualScope/PiScope
294c90ce90a7d239b98feb8e96f8d056f6bbcf50
[ "MIT" ]
null
null
null
Raspberry/lightcontrols.py
VirtualScope/PiScope
294c90ce90a7d239b98feb8e96f8d056f6bbcf50
[ "MIT" ]
null
null
null
import datetime import time #time used to set sleep between motor commands import RPi.GPIO as GPIO #GPIO lib for Raspberry Pi (RPi3). Needed to use GPIO pins import threading #Threading for locks and spawning new threads GPIO.setmode(GPIO.BOARD) #Set to...
50.305556
104
0.585864
import datetime import time import RPi.GPIO as GPIO import threading GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) light = 21 GPIO.setup(light, GPIO.OUT) class LightControls(object): lock = threading....
true
true
08f76c1177f9c5a2bed2db58e8f12b1ac0539fe4
566
py
Python
python/constants.py
arctrong/md2html
fb8462ab1181dfc26a1ae9988684d381502dc97e
[ "Apache-2.0", "MIT" ]
null
null
null
python/constants.py
arctrong/md2html
fb8462ab1181dfc26a1ae9988684d381502dc97e
[ "Apache-2.0", "MIT" ]
null
null
null
python/constants.py
arctrong/md2html
fb8462ab1181dfc26a1ae9988684d381502dc97e
[ "Apache-2.0", "MIT" ]
null
null
null
from plugins.page_flows_plugin import PageFlowsPlugin from plugins.page_variables_plugin import PageVariablesPlugin from plugins.relative_paths_plugin import RelativePathsPlugin from plugins.variables_plugin import VariablesPlugin DEFAULT_TEMPLATE_PATH = '../doc_src/templates/default.html' DEFAULT_CSS_FILE_PATH ...
43.538462
85
0.786219
from plugins.page_flows_plugin import PageFlowsPlugin from plugins.page_variables_plugin import PageVariablesPlugin from plugins.relative_paths_plugin import RelativePathsPlugin from plugins.variables_plugin import VariablesPlugin DEFAULT_TEMPLATE_PATH = '../doc_src/templates/default.html' DEFAULT_CSS_FILE_PATH ...
true
true
08f76cf86f2295a802f517237f8aa148d51c2328
688
py
Python
setup.py
mujeerhashmi/website-4cs
ef7a5960b475f7d63532708a929764b7a65cbc0f
[ "MIT" ]
null
null
null
setup.py
mujeerhashmi/website-4cs
ef7a5960b475f7d63532708a929764b7a65cbc0f
[ "MIT" ]
null
null
null
setup.py
mujeerhashmi/website-4cs
ef7a5960b475f7d63532708a929764b7a65cbc0f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import re, ast with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') # get version from __version__ variable in website_4cs/__init__.py _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('website_4cs/__init_...
26.461538
66
0.735465
from setuptools import setup, find_packages import re, ast with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('website_4cs/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('u...
true
true
08f76d70b3adcfbabafedf2f1754823ee1acf157
6,411
py
Python
sdk/containerregistry/azure-containerregistry/tests/test_container_repository_async.py
saikrishna563/azure-sdk-for-python
2b280f5175aa690def433e34ec5f3be9e240b137
[ "MIT" ]
null
null
null
sdk/containerregistry/azure-containerregistry/tests/test_container_repository_async.py
saikrishna563/azure-sdk-for-python
2b280f5175aa690def433e34ec5f3be9e240b137
[ "MIT" ]
null
null
null
sdk/containerregistry/azure-containerregistry/tests/test_container_repository_async.py
saikrishna563/azure-sdk-for-python
2b280f5175aa690def433e34ec5f3be9e240b137
[ "MIT" ]
null
null
null
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from datetime import datetime import pytest from azure.containerregistry import ( DeleteRepositoryResult, RepositoryProperties, ContentProper...
42.456954
105
0.7236
from datetime import datetime import pytest from azure.containerregistry import ( DeleteRepositoryResult, RepositoryProperties, ContentProperties, ManifestOrder, ArtifactManifestProperties, TagOrder, ) from azure.containerregistry.aio import ContainerRegistryClient, ContainerRepository from azu...
true
true
08f76dba73d014b6374a4f2d7e9da7bc7cc66ddd
6,381
py
Python
tools/build_command_buffer.py
Decorum-OS/third_party-skia
5561e3ddbbf6c3e051075ada4a11ddc70760f03d
[ "Apache-2.0" ]
null
null
null
tools/build_command_buffer.py
Decorum-OS/third_party-skia
5561e3ddbbf6c3e051075ada4a11ddc70760f03d
[ "Apache-2.0" ]
null
null
null
tools/build_command_buffer.py
Decorum-OS/third_party-skia
5561e3ddbbf6c3e051075ada4a11ddc70760f03d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright 2016 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Script to build the command buffer shared library and copy it to Skia tree """ import argparse import os import shlex import shutil import subprocess import sys...
36.884393
80
0.677637
import argparse import os import shlex import shutil import subprocess import sys def main(): parser = argparse.ArgumentParser(description=('Builds command_buffer_gles2 ' 'library and copies it')) parser.add_argument('-c', '--chrome-dir', required=True, help= ...
true
true
08f76e7fab5536350d31f9bc16d26a36962bd265
1,731
py
Python
main.py
hu-kang/brain
884904eae47600bca036b6e1c066c27bd57490ba
[ "MIT" ]
null
null
null
main.py
hu-kang/brain
884904eae47600bca036b6e1c066c27bd57490ba
[ "MIT" ]
null
null
null
main.py
hu-kang/brain
884904eae47600bca036b6e1c066c27bd57490ba
[ "MIT" ]
null
null
null
import datetime import random from flask import current_app from flask_migrate import MigrateCommand from flask_script import Manager from info import create_app # 调用创建app的工厂函数 app = create_app('dev') # 创建app管理器对象 mgr = Manager(app) # 将迁移命令添加到管理者中 mgr.add_command('mc', MigrateCommand) # 生成超级管理员 @mgr.option("-name"...
24.728571
128
0.644714
import datetime import random from flask import current_app from flask_migrate import MigrateCommand from flask_script import Manager from info import create_app app = create_app('dev') mgr = Manager(app) mgr.add_command('mc', MigrateCommand) @mgr.option("-name", "-n", dest="name") @mgr.option("-password", "-p", d...
true
true
08f76e9320ef0bb4a0c67b1306b5aa5dff43e95d
91,087
py
Python
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
null
null
null
sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/models/__init__.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.936852
94
0.769868
try: from ._models_py3 import Activity from ._models_py3 import ActivityDependency from ._models_py3 import ActivityPolicy from ._models_py3 import ActivityRun from ._models_py3 import ActivityRunsQueryResponse from ._models_py3 import AddDataFlowToDebugSessionResponse from ._models_py3 imp...
true
true
08f76eb07a4303eea545ef24b38253b67bf63b85
1,801
py
Python
test3.py
sinvsmae/car_crash
dec44b34a5e4fc1bdb6156ff0d3bc4c424adf03b
[ "Apache-2.0" ]
null
null
null
test3.py
sinvsmae/car_crash
dec44b34a5e4fc1bdb6156ff0d3bc4c424adf03b
[ "Apache-2.0" ]
null
null
null
test3.py
sinvsmae/car_crash
dec44b34a5e4fc1bdb6156ff0d3bc4c424adf03b
[ "Apache-2.0" ]
null
null
null
""" stopped using 'for' statement stopped loop finally print 'bang' twice, don't konw why """ import math time_delta = 0.1 time_reaction = 20 def vehicle(time_now, name1, m1, v1, brakeJ1, name2, m2, v2, brakeJ2, pos2_now, gap): if gap > 0: if time_now <= time_reaction: time_now += time_del...
40.931818
222
0.508606
import math time_delta = 0.1 time_reaction = 20 def vehicle(time_now, name1, m1, v1, brakeJ1, name2, m2, v2, brakeJ2, pos2_now, gap): if gap > 0: if time_now <= time_reaction: time_now += time_delta E1 = m1 * pow(v1, 2) / 2 E1_delta = brakeJ1 / 10 print(na...
true
true
08f77082ef7f2927414b882bc040712146c87ce3
3,483
py
Python
aliyun-python-sdk-ros/aliyunsdkros/request/v20190910/CreateStackInstancesRequest.py
hetw/aliyun-openapi-python-sdk
7443eacee9fbbaa93c7975c6dbec92d3c364c577
[ "Apache-2.0" ]
1
2020-12-05T03:03:46.000Z
2020-12-05T03:03:46.000Z
aliyun-python-sdk-ros/aliyunsdkros/request/v20190910/CreateStackInstancesRequest.py
hetw/aliyun-openapi-python-sdk
7443eacee9fbbaa93c7975c6dbec92d3c364c577
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ros/aliyunsdkros/request/v20190910/CreateStackInstancesRequest.py
hetw/aliyun-openapi-python-sdk
7443eacee9fbbaa93c7975c6dbec92d3c364c577
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.7
137
0.776916
from aliyunsdkcore.request import RpcRequest from aliyunsdkros.endpoint import endpoint_data class CreateStackInstancesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'ROS', '2019-09-10', 'CreateStackInstances','ros') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(sel...
true
true
08f770d2f019f91af7f724adff679b5c853b6375
3,616
py
Python
test/mpiunittest.py
ejjordan/mpi4py
78f0d240d3f09790e6af8f78c1c33cca55843ff3
[ "BSD-2-Clause" ]
null
null
null
test/mpiunittest.py
ejjordan/mpi4py
78f0d240d3f09790e6af8f78c1c33cca55843ff3
[ "BSD-2-Clause" ]
null
null
null
test/mpiunittest.py
ejjordan/mpi4py
78f0d240d3f09790e6af8f78c1c33cca55843ff3
[ "BSD-2-Clause" ]
null
null
null
import os import sys import glob import unittest from distutils.versionpredicate import VersionPredicate class TestCase(unittest.TestCase): def assertRaisesMPI(self, IErrClass, callableObj, *args, **kwargs): from mpi4py.MPI import Exception as excClass, Get_version try: callableObj(*a...
29.16129
73
0.567754
import os import sys import glob import unittest from distutils.versionpredicate import VersionPredicate class TestCase(unittest.TestCase): def assertRaisesMPI(self, IErrClass, callableObj, *args, **kwargs): from mpi4py.MPI import Exception as excClass, Get_version try: callableObj(*a...
true
true
08f7710e45fc18e78bad6f5571fde193f33a7dfe
3,475
py
Python
alfi/mcmc/gp/gp_kernels.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
3
2021-10-04T11:42:34.000Z
2022-01-24T11:26:42.000Z
alfi/mcmc/gp/gp_kernels.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
1
2022-01-24T11:15:54.000Z
2022-01-24T11:20:23.000Z
alfi/mcmc/gp/gp_kernels.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
1
2022-01-24T11:23:27.000Z
2022-01-24T11:23:27.000Z
from alfi.utilities.tf import get_time_square, FixedDistribution import tensorflow as tf from tensorflow import math as tfm from tensorflow_probability import distributions as tfd import numpy as np f64 = np.float64 class GPKernelSelector(): def __init__(self, data, options): self.kernel = o...
38.611111
93
0.553381
from alfi.utilities.tf import get_time_square, FixedDistribution import tensorflow as tf from tensorflow import math as tfm from tensorflow_probability import distributions as tfd import numpy as np f64 = np.float64 class GPKernelSelector(): def __init__(self, data, options): self.kernel = o...
true
true
08f77125f09dce9571247398a4e34342ec9b5be8
3,966
py
Python
Loan-Defaulters/code.py
eltonlanders/ga-learner-dsmp-repo
750bb4dc8ea0cba8d0411e1e8d80aa036f7eaa38
[ "MIT" ]
null
null
null
Loan-Defaulters/code.py
eltonlanders/ga-learner-dsmp-repo
750bb4dc8ea0cba8d0411e1e8d80aa036f7eaa38
[ "MIT" ]
null
null
null
Loan-Defaulters/code.py
eltonlanders/ga-learner-dsmp-repo
750bb4dc8ea0cba8d0411e1e8d80aa036f7eaa38
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd from sklearn.model_selection import train_test_split # Code starts here data=pd.read_csv(path) X=data.drop(['customer.id','paid.back.loan'],axis=1) y=data['paid.back.loan'] X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.3,random_state=0)...
21.095745
167
0.727181
import pandas as pd from sklearn.model_selection import train_test_split data=pd.read_csv(path) X=data.drop(['customer.id','paid.back.loan'],axis=1) y=data['paid.back.loan'] X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.3,random_state=0) import matplotlib.pyplot as plt fully_paid=y_train.val...
true
true
08f77384a047ba271ef2e6f4a04aebfb168ae468
4,967
py
Python
custom_app/custom_app/doctype/customer_award/customer_award.py
ahmadRagheb/custom_app
f77be7fdb3d8966d653c12c9cf8d7a74cb04b87c
[ "MIT" ]
null
null
null
custom_app/custom_app/doctype/customer_award/customer_award.py
ahmadRagheb/custom_app
f77be7fdb3d8966d653c12c9cf8d7a74cb04b87c
[ "MIT" ]
null
null
null
custom_app/custom_app/doctype/customer_award/customer_award.py
ahmadRagheb/custom_app
f77be7fdb3d8966d653c12c9cf8d7a74cb04b87c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, anas and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ from frappe.utils import today class CustomerAward(Document): def get_customers_i...
27.904494
99
0.694786
from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe import _ from frappe.utils import today class CustomerAward(Document): def get_customers_info(self): conditions = self.prepare_conditions() a= """ select c.name as customer,SUM(si.grand_total) as amoun...
true
true
08f77421bbfa635f09689ab0d2215429567dfc3e
13,665
py
Python
samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py
jackma46/openapi-generator
eeb00e27d13fb0c578c1c4159c0c7bddfcb21082
[ "Apache-2.0" ]
11,868
2018-05-12T02:58:07.000Z
2022-03-31T21:19:39.000Z
samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py
jackma46/openapi-generator
eeb00e27d13fb0c578c1c4159c0c7bddfcb21082
[ "Apache-2.0" ]
9,672
2018-05-12T14:25:43.000Z
2022-03-31T23:59:30.000Z
samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py
jackma46/openapi-generator
eeb00e27d13fb0c578c1c4159c0c7bddfcb21082
[ "Apache-2.0" ]
4,776
2018-05-12T12:06:08.000Z
2022-03-31T19:52:51.000Z
""" OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noq...
42.836991
174
0.586608
import re import sys from petstore_api.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, ) from ..m...
true
true
08f7752c3fa300230012c6ca5b24f5e4b4adc029
4,931
py
Python
fire/helputils_test.py
kemalcanbora/python-fire
b3e390a1ed7012797e7d59081ae352a9e4ba2f56
[ "Apache-2.0" ]
1
2019-05-27T01:38:43.000Z
2019-05-27T01:38:43.000Z
fire/helputils_test.py
mathbonus/python-fire
f006733e982743925069aa9ca98f500702d94e3d
[ "Apache-2.0" ]
null
null
null
fire/helputils_test.py
mathbonus/python-fire
f006733e982743925069aa9ca98f500702d94e3d
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.356061
77
0.664368
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from fire import helputils from fire import test_components as tc from fire import testutils import six class HelpUtilsTest(testutils.BaseTestCase): def testHelpStringClass(self): helpstri...
true
true
08f77564d7c0bba282d442b881a3bb05adcec72a
6,180
py
Python
tests/test_search.py
vjzanne/ChatterbotSpacy
7d264f82d863c493c437138b6b25c2fbb587cf10
[ "BSD-3-Clause" ]
1
2019-12-23T10:04:28.000Z
2019-12-23T10:04:28.000Z
tests/test_search.py
sithivitken/ChatterBot
1a03dcb45cba7bdc24d3db5e750582e0cb1518e2
[ "BSD-3-Clause" ]
null
null
null
tests/test_search.py
sithivitken/ChatterBot
1a03dcb45cba7bdc24d3db5e750582e0cb1518e2
[ "BSD-3-Clause" ]
null
null
null
from tests.base_case import ChatBotTestCase from chatterbot.conversation import Statement from chatterbot.search import IndexedTextSearch from chatterbot import comparisons class SearchTestCase(ChatBotTestCase): def setUp(self): super().setUp() self.search_algorithm = IndexedTextSearch(self.chatb...
36.568047
102
0.657282
from tests.base_case import ChatBotTestCase from chatterbot.conversation import Statement from chatterbot.search import IndexedTextSearch from chatterbot import comparisons class SearchTestCase(ChatBotTestCase): def setUp(self): super().setUp() self.search_algorithm = IndexedTextSearch(self.chatb...
true
true
08f7761ca33ca5c49e0c13962521f711dacec6d2
2,278
py
Python
tests/test_utils.py
joeeeeey/nameko-tracer
0f9e3215134df8e39fed30aebd79e033178df680
[ "Apache-2.0" ]
12
2019-03-15T03:40:27.000Z
2022-02-11T17:21:41.000Z
tests/test_utils.py
joeeeeey/nameko-tracer
0f9e3215134df8e39fed30aebd79e033178df680
[ "Apache-2.0" ]
9
2017-08-21T08:37:43.000Z
2018-09-10T17:06:59.000Z
tests/test_utils.py
joeeeeey/nameko-tracer
0f9e3215134df8e39fed30aebd79e033178df680
[ "Apache-2.0" ]
5
2017-08-25T18:02:57.000Z
2022-01-24T04:11:10.000Z
import pytest from nameko_tracer import utils @pytest.mark.parametrize( ('input_', 'expected_output'), ( ('string', 'string'), ([1, 0.5, 'string'], [1, 0.5, 'string']), ((1, 0.5, 'string'), [1, 0.5, 'string']), ({1: 2, 0.5: 0.5}, {1: 2, 0.5: 0.5}), ({'string': 'string'...
28.475
78
0.535119
import pytest from nameko_tracer import utils @pytest.mark.parametrize( ('input_', 'expected_output'), ( ('string', 'string'), ([1, 0.5, 'string'], [1, 0.5, 'string']), ((1, 0.5, 'string'), [1, 0.5, 'string']), ({1: 2, 0.5: 0.5}, {1: 2, 0.5: 0.5}), ({'string': 'string'...
true
true
08f776a825669be9f32ded233a4fd41a383b1e9c
28,670
py
Python
cyclopts/main.py
gidden/cyclopts
e346b1721c8d8722af2862823844ab2e7864141b
[ "BSD-3-Clause" ]
null
null
null
cyclopts/main.py
gidden/cyclopts
e346b1721c8d8722af2862823844ab2e7864141b
[ "BSD-3-Clause" ]
6
2015-01-26T18:31:36.000Z
2015-02-24T18:28:41.000Z
cyclopts/main.py
gidden/cyclopts
e346b1721c8d8722af2862823844ab2e7864141b
[ "BSD-3-Clause" ]
null
null
null
"""The main entry point for running Cyclopts from the command line. """ from __future__ import print_function import argparse import tables as t import numpy as np from collections import defaultdict import itertools import uuid from datetime import datetime import subprocess import tarfile import os import shutil im...
41.671512
89
0.605755
from __future__ import print_function import argparse import tables as t import numpy as np from collections import defaultdict import itertools import uuid from datetime import datetime import subprocess import tarfile import os import shutil import getpass import ast import sys import gc import io import warnings ...
true
true
08f778eac4eedd02d9d290fa8a22a7cd4b26ca46
34,750
py
Python
tests/v2/test_0447-preserve-regularness-in-reduce.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
2
2019-09-12T03:07:23.000Z
2019-09-27T05:32:07.000Z
tests/v2/test_0447-preserve-regularness-in-reduce.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
1
2019-09-26T17:57:45.000Z
2019-09-26T17:57:45.000Z
tests/v2/test_0447-preserve-regularness-in-reduce.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 to_list = ak._v2.operations.to_list def test_issue434(): a = ak._v2.highlevel.Array([[0.0, 1.1, 2.2], [3.3, 4.4], [5.5]]) b ...
46.087533
88
0.635683
import pytest import numpy as np import awkward as ak to_list = ak._v2.operations.to_list def test_issue434(): a = ak._v2.highlevel.Array([[0.0, 1.1, 2.2], [3.3, 4.4], [5.5]]) b = ak._v2.highlevel.Array([[9.9, 8.8, 7.7], [6.6, 5.5], [4.4]]) assert to_list(b[ak._v2.operations.argmin(a, axis=1, keepdim...
true
true
08f779fbd716a02bcbbecf809f628ef22472ee34
718
py
Python
launch/tf_test.launch.py
airuchen/ydlidar_ros2
5b345510ba26130590a44d92b85e94eca29f58f1
[ "Apache-2.0" ]
null
null
null
launch/tf_test.launch.py
airuchen/ydlidar_ros2
5b345510ba26130590a44d92b85e94eca29f58f1
[ "Apache-2.0" ]
null
null
null
launch/tf_test.launch.py
airuchen/ydlidar_ros2
5b345510ba26130590a44d92b85e94eca29f58f1
[ "Apache-2.0" ]
null
null
null
from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import SetEnvironmentVariable from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ Node( package='tf2_ros', node_...
34.190476
80
0.598886
from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import SetEnvironmentVariable from launch_ros.actions import Node def generate_launch_description(): return LaunchDescription([ Node( package='tf2_ros', node_...
true
true
08f77ab4b58b373f825d806785ae1c9fa9c21b1f
12,051
py
Python
pysat/instruments/templates/template_instrument.py
jklenzing/pysat
e84002e57f8a808d35562f51ce957361d99c4070
[ "BSD-3-Clause" ]
null
null
null
pysat/instruments/templates/template_instrument.py
jklenzing/pysat
e84002e57f8a808d35562f51ce957361d99c4070
[ "BSD-3-Clause" ]
1
2020-01-30T02:35:32.000Z
2020-01-30T02:35:32.000Z
pysat/instruments/templates/template_instrument.py
jklenzing/pysat
e84002e57f8a808d35562f51ce957361d99c4070
[ "BSD-3-Clause" ]
1
2020-01-30T01:46:31.000Z
2020-01-30T01:46:31.000Z
# -*- coding: utf-8 -*- """ This is a template for a pysat.Instrument support file. Modify this file as needed when adding a new Instrument to pysat. This is a good area to introduce the instrument, provide background on the mission, operations, instrumenation, and measurements. Also a good place to provide contact i...
31.139535
79
0.652726
from __future__ import print_function from __future__ import absolute_import import pandas as pds import xarray as xr import pysat platform = '' name = '' tags = {'': 'description 1', 'tag_string': 'description 2'} sat_ids = {'': ['']} _test_dates = {'': {'': pysat.datetime(2019, 1, 1)}} pandas_format =...
true
true
08f77af9bce4e1ebe80616e9c696ff9ec33399ea
3,160
py
Python
holoviews/plotting/links.py
zbarry/holoviews
25505a4470c56a0d62ba5813c1fe9af59f568bcf
[ "BSD-3-Clause" ]
null
null
null
holoviews/plotting/links.py
zbarry/holoviews
25505a4470c56a0d62ba5813c1fe9af59f568bcf
[ "BSD-3-Clause" ]
null
null
null
holoviews/plotting/links.py
zbarry/holoviews
25505a4470c56a0d62ba5813c1fe9af59f568bcf
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict import param from ..core import ViewableElement class Link(param.Parameterized): """ A Link defines some connection between a source and target object in their visualization. It is quite similar to a Stream as it allows defining callbacks in response to some chang...
34.725275
78
0.671519
from collections import defaultdict import param from ..core import ViewableElement class Link(param.Parameterized): source = param.ClassSelector(class_=ViewableElement, doc=""" The source object of the link (required).""") target = param.ClassSelector(class_=ViewableElement, doc=""" The t...
true
true
08f77b00321fdb20e32e30e77bdebc0decbfaf52
418
py
Python
models/__init__.py
gajrajgchouhan/orthohash
4e04cfe1dd32e21ba004e308d5a1ce9c8578ea2b
[ "BSD-3-Clause" ]
51
2021-09-29T04:08:47.000Z
2022-03-21T10:53:14.000Z
models/__init__.py
gajrajgchouhan/orthohash
4e04cfe1dd32e21ba004e308d5a1ce9c8578ea2b
[ "BSD-3-Clause" ]
3
2021-10-02T14:09:56.000Z
2021-12-23T14:04:11.000Z
models/__init__.py
gajrajgchouhan/orthohash
4e04cfe1dd32e21ba004e308d5a1ce9c8578ea2b
[ "BSD-3-Clause" ]
4
2021-12-15T14:00:40.000Z
2022-03-27T13:05:48.000Z
network_names = {} def register_network(name): def f(network): if name in network_names: print(f'Error when registering name for class {network.__class__.__name__}') raise Exception(f'Network name "{name}" is registered with class {network_names[name].__class__.__name__}') ...
26.125
119
0.674641
network_names = {} def register_network(name): def f(network): if name in network_names: print(f'Error when registering name for class {network.__class__.__name__}') raise Exception(f'Network name "{name}" is registered with class {network_names[name].__class__.__name__}') ...
true
true
08f77bc4497b92b5151ad4619abbee565c368543
635
py
Python
lnt/formats/PlistFormat.py
llvm/lnt
77e0a25f996a5363e23f701c0d995525a5c6484a
[ "Apache-2.0" ]
19
2019-01-15T03:04:00.000Z
2021-12-08T00:09:01.000Z
lnt/formats/PlistFormat.py
llvm/lnt
77e0a25f996a5363e23f701c0d995525a5c6484a
[ "Apache-2.0" ]
5
2019-04-11T06:22:18.000Z
2021-09-13T17:41:14.000Z
lnt/formats/PlistFormat.py
llvm/lnt
77e0a25f996a5363e23f701c0d995525a5c6484a
[ "Apache-2.0" ]
21
2019-02-10T02:47:55.000Z
2022-03-31T14:16:36.000Z
import plistlib def _matches_format(path_or_file): try: if isinstance(path_or_file, str): with open(path_or_file, 'rb') as fp: plistlib.load(fp) else: plistlib.load(path_or_file) return True except Exception: return False def _load_form...
21.166667
48
0.604724
import plistlib def _matches_format(path_or_file): try: if isinstance(path_or_file, str): with open(path_or_file, 'rb') as fp: plistlib.load(fp) else: plistlib.load(path_or_file) return True except Exception: return False def _load_form...
true
true
08f77d95e78758b9910047fc87fddb967a563e02
6,348
py
Python
google-cloud-irm/synth.py
naveed-ahmad/google-cloud-ruby
ec86e413a157e09ee0ff1080468dd75556d0908f
[ "Apache-2.0" ]
1
2021-01-02T05:11:13.000Z
2021-01-02T05:11:13.000Z
google-cloud-irm/synth.py
naveed-ahmad/google-cloud-ruby
ec86e413a157e09ee0ff1080468dd75556d0908f
[ "Apache-2.0" ]
null
null
null
google-cloud-irm/synth.py
naveed-ahmad/google-cloud-ruby
ec86e413a157e09ee0ff1080468dd75556d0908f
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
31.425743
130
0.654222
import synthtool as s import synthtool.gcp as gcp import synthtool.languages.ruby as ruby import logging from subprocess import call logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() v1alpha2 = gapic.ruby_library( 'irm', 'v1alpha2', artman_output_name='google-cloud-ruby/google-cloud-irm...
true
true
08f77e9350761f6826938e8b5d70979fb6f5749b
9,161
py
Python
v2.5.7/toontown/coghq/LevelSuitPlannerAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v2.5.7/toontown/coghq/LevelSuitPlannerAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v2.5.7/toontown/coghq/LevelSuitPlannerAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
from panda3d.core import * from direct.showbase import DirectObject from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal import LevelBattleManagerAI, types, random class LevelSuitPlannerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('LevelSuitPla...
38.330544
194
0.603209
from panda3d.core import * from direct.showbase import DirectObject from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal import LevelBattleManagerAI, types, random class LevelSuitPlannerAI(DirectObject.DirectObject): notify = DirectNotifyGlobal.directNotify.newCategory('LevelSuitPla...
true
true
08f77f73d9fb2fbab97ac7125dd37854f4d56e3f
2,118
py
Python
desktop_local_tests/macos/test_macos_packet_capture_disrupt_service.py
UAEKondaya1/expressvpn_leak_testing
9e4cee899ac04f7820ac351fa55efdc0c01370ba
[ "MIT" ]
219
2017-12-12T09:42:46.000Z
2022-03-13T08:25:13.000Z
desktop_local_tests/macos/test_macos_packet_capture_disrupt_service.py
UAEKondaya1/expressvpn_leak_testing
9e4cee899ac04f7820ac351fa55efdc0c01370ba
[ "MIT" ]
11
2017-12-14T08:14:51.000Z
2021-08-09T18:37:45.000Z
desktop_local_tests/macos/test_macos_packet_capture_disrupt_service.py
UAEKondaya1/expressvpn_leak_testing
9e4cee899ac04f7820ac351fa55efdc0c01370ba
[ "MIT" ]
45
2017-12-14T07:26:36.000Z
2022-03-11T09:36:56.000Z
from desktop_local_tests.local_packet_capture_test_case_with_disrupter import LocalPacketCaptureTestCaseWithDisrupter from desktop_local_tests.macos.macos_service_disrupter import MacOSServiceDisrupter class TestMacOSPacketCaptureDisruptService(LocalPacketCaptureTestCaseWithDisrupter): '''Summary: Tests whet...
36.517241
117
0.749292
from desktop_local_tests.local_packet_capture_test_case_with_disrupter import LocalPacketCaptureTestCaseWithDisrupter from desktop_local_tests.macos.macos_service_disrupter import MacOSServiceDisrupter class TestMacOSPacketCaptureDisruptService(LocalPacketCaptureTestCaseWithDisrupter): def __init__(self, device...
true
true
08f781404ae40da40841b7163732dac80acea5d4
4,100
py
Python
lib/rpn_msr/generate_anchors.py
wenlihaoyu/text-detection-ctpn
1b934c07aa8a3774d38883af83532ec6cf2c7f8c
[ "MIT" ]
null
null
null
lib/rpn_msr/generate_anchors.py
wenlihaoyu/text-detection-ctpn
1b934c07aa8a3774d38883af83532ec6cf2c7f8c
[ "MIT" ]
null
null
null
lib/rpn_msr/generate_anchors.py
wenlihaoyu/text-detection-ctpn
1b934c07aa8a3774d38883af83532ec6cf2c7f8c
[ "MIT" ]
1
2020-03-12T06:49:43.000Z
2020-03-12T06:49:43.000Z
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- import numpy as np # Verify that we compute the same a...
29.927007
78
0.530244
import numpy as np # # >> load output/rpn_cachedir/faster_rcnn_VOC2007_ZF_stage1_rpn/anchors.mat # >> anchors # # anchors = # # -83 -39 100 56 # -175 -87 192 104 # -359 -183 376 200 # -55 -55 72 72 # -119 -119 136 136 # -247 -247 264 264 # ...
true
true
08f78148368aacc96112dc5f80654e7249ce7147
12,737
py
Python
src/architectures/UNet.py
andreped/H2G-Net
02ad99e404f547517040c44a637f0170b35b705d
[ "MIT" ]
3
2022-02-09T16:58:57.000Z
2022-02-09T18:17:56.000Z
src/architectures/UNet.py
andreped/H2G-Net
02ad99e404f547517040c44a637f0170b35b705d
[ "MIT" ]
null
null
null
src/architectures/UNet.py
andreped/H2G-Net
02ad99e404f547517040c44a637f0170b35b705d
[ "MIT" ]
1
2022-03-20T14:57:51.000Z
2022-03-20T14:57:51.000Z
from tensorflow.python.keras.layers import Input, Dense, Convolution2D, MaxPooling2D, Dropout, Flatten, SpatialDropout2D, \ ZeroPadding2D, Activation, AveragePooling2D, UpSampling2D, BatchNormalization, ConvLSTM2D, \ TimeDistributed, Concatenate, Lambda, Reshape, UpSampling3D, Convolution3D, MaxPooling3D, Spati...
35.980226
142
0.612389
from tensorflow.python.keras.layers import Input, Dense, Convolution2D, MaxPooling2D, Dropout, Flatten, SpatialDropout2D, \ ZeroPadding2D, Activation, AveragePooling2D, UpSampling2D, BatchNormalization, ConvLSTM2D, \ TimeDistributed, Concatenate, Lambda, Reshape, UpSampling3D, Convolution3D, MaxPooling3D, Spati...
true
true
08f781531e9a0eac4b072e649322f3c7dd5d1dae
7,381
py
Python
mp3_tagger/mp3.py
kk-hiraskar/mp3-tagger
ba8ddbfdf127f60b707d900719b187e257e80c2d
[ "MIT" ]
null
null
null
mp3_tagger/mp3.py
kk-hiraskar/mp3-tagger
ba8ddbfdf127f60b707d900719b187e257e80c2d
[ "MIT" ]
null
null
null
mp3_tagger/mp3.py
kk-hiraskar/mp3-tagger
ba8ddbfdf127f60b707d900719b187e257e80c2d
[ "MIT" ]
null
null
null
"""mp3 module. This module contains the main class-interface for data access ID3 tags and helper functions. """ import os from stat import S_IWRITE from mp3_tagger.id3 import ID3FrameStream, ID3FrameV2, VERSION_2, VERSION_BOTH from mp3_tagger.exceptions import MP3OpenFileError, TagSetError def val_getter(func):...
20.733146
79
0.565642
import os from stat import S_IWRITE from mp3_tagger.id3 import ID3FrameStream, ID3FrameV2, VERSION_2, VERSION_BOTH from mp3_tagger.exceptions import MP3OpenFileError, TagSetError def val_getter(func): def wrapper(self): attr = func.__name__ tags = self._get_tags(attr) if len(tags) == ...
true
true
08f78184070a1c222b82a22787c7218f915999a5
174
py
Python
cny-history/1.py
dancerphil/crawler-collection
d25c076922fb7c00c923cc6f50394dcd7560ac0e
[ "MIT" ]
null
null
null
cny-history/1.py
dancerphil/crawler-collection
d25c076922fb7c00c923cc6f50394dcd7560ac0e
[ "MIT" ]
null
null
null
cny-history/1.py
dancerphil/crawler-collection
d25c076922fb7c00c923cc6f50394dcd7560ac0e
[ "MIT" ]
null
null
null
import pandas as pd df = pd.read_csv('data.csv') df = df[['date', 'USD/CNY']] df.rename(columns={'USD/CNY': 'value'}, inplace=True) df.to_json('usd.json', orient='records')
24.857143
53
0.66092
import pandas as pd df = pd.read_csv('data.csv') df = df[['date', 'USD/CNY']] df.rename(columns={'USD/CNY': 'value'}, inplace=True) df.to_json('usd.json', orient='records')
true
true
08f782d2633fac712e9a47c5185837e75c533bc0
2,011
py
Python
imagenet_dataset.py
fhvilshoj/TorchImageNet
971e22c9469c7a862c4caa46f7d678e14ed9d41c
[ "MIT" ]
1
2021-07-13T07:54:21.000Z
2021-07-13T07:54:21.000Z
imagenet_dataset.py
fhvilshoj/TorchImageNet
971e22c9469c7a862c4caa46f7d678e14ed9d41c
[ "MIT" ]
null
null
null
imagenet_dataset.py
fhvilshoj/TorchImageNet
971e22c9469c7a862c4caa46f7d678e14ed9d41c
[ "MIT" ]
1
2021-08-04T02:25:57.000Z
2021-08-04T02:25:57.000Z
import os import pickle import pathlib import numpy as np from PIL import Image from natsort import natsorted import torch from torch.utils.data import Dataset import torchvision import torchvision.transforms as transforms # Use "[folder of this file]/images" as base path _base_path = (pathlib.Path(__file__).parent....
30.938462
106
0.615614
import os import pickle import pathlib import numpy as np from PIL import Image from natsort import natsorted import torch from torch.utils.data import Dataset import torchvision import torchvision.transforms as transforms _base_path = (pathlib.Path(__file__).parent.absolute() / 'images').as_posix() def _get_additi...
true
true
08f782e81a4ee0d9508df1bff05ae5d22bdb534b
727
py
Python
leetcode/0226.py
mndream/MyOJ
ee92fb657475d998e6c201f222cb20bcbc2bfd64
[ "Apache-2.0" ]
1
2018-12-27T08:06:38.000Z
2018-12-27T08:06:38.000Z
leetcode/0226.py
mndream/MyPythonOJ
ee92fb657475d998e6c201f222cb20bcbc2bfd64
[ "Apache-2.0" ]
null
null
null
leetcode/0226.py
mndream/MyPythonOJ
ee92fb657475d998e6c201f222cb20bcbc2bfd64
[ "Apache-2.0" ]
null
null
null
""" 翻转一棵二叉树。 示例: 输入: 4 / \ 2 7 / \ / \ 1 3 6 9 输出: 4 / \ 7 2 / \ / \ 9 6 3 1 备注: 这个问题是受到 Max Howell 的 原问题 启发的 : 谷歌:我们90%的工程师使用您编写的软件(Homebrew), 但是您却无法在面试时在白板上写出翻转二叉树这道题,这太糟糕了。 """ # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): ...
17.309524
53
0.526823
class Solution(object): def invertTree(self, root): if root is None: return None root.right, root.left = root.left ,root.right self.invertTree(root.left) self.invertTree(root.right) return root
true
true
08f7846480b311b62d280fe6ba4c40f551eadb7f
1,279
py
Python
django/suggestion/templates/suggestion/revision_html.py
mnieber/shared-goal
3ccdec341a3d542dbc108ad5375c309322f91d96
[ "Apache-2.0" ]
null
null
null
django/suggestion/templates/suggestion/revision_html.py
mnieber/shared-goal
3ccdec341a3d542dbc108ad5375c309322f91d96
[ "Apache-2.0" ]
null
null
null
django/suggestion/templates/suggestion/revision_html.py
mnieber/shared-goal
3ccdec341a3d542dbc108ad5375c309322f91d96
[ "Apache-2.0" ]
null
null
null
from django_dominate.django_tags import * from dominate.tags import * from dominate.util import text from goal.templates.dominate_tags import * from suggestion.templates.dominate_tags import * suggestion_url = \ "{% url 'suggestion' request.goal.slug suggestion.slug %}" def result(): with django_block("c...
29.068182
71
0.528538
from django_dominate.django_tags import * from dominate.tags import * from dominate.util import text from goal.templates.dominate_tags import * from suggestion.templates.dominate_tags import * suggestion_url = \ "{% url 'suggestion' request.goal.slug suggestion.slug %}" def result(): with django_block("c...
true
true
08f784ed763987a2a98c832d5b797c7f3c7a7ce6
11,302
py
Python
util/masking.py
elena-pascal/dials
c125d54b0aea4f83bec52918a589c95c45412232
[ "BSD-3-Clause" ]
2
2021-03-17T11:25:46.000Z
2021-11-18T04:20:54.000Z
util/masking.py
elena-pascal/dials
c125d54b0aea4f83bec52918a589c95c45412232
[ "BSD-3-Clause" ]
null
null
null
util/masking.py
elena-pascal/dials
c125d54b0aea4f83bec52918a589c95c45412232
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function import logging import math import warnings from collections import namedtuple from typing import Tuple import libtbx.phil from cctbx import crystal from dxtbx.masking import ( mask_untrusted_circle, mask_untrusted_polygon, mask_untrusted_rec...
33.046784
95
0.564148
from __future__ import absolute_import, division, print_function import logging import math import warnings from collections import namedtuple from typing import Tuple import libtbx.phil from cctbx import crystal from dxtbx.masking import ( mask_untrusted_circle, mask_untrusted_polygon, mask_untrusted_rec...
true
true
08f78551a55e19af0431992e9bdb116e99fbfd6a
3,321
py
Python
utils.py
kevingodlike/char-rnn-tensorflow-master
1bc17d3082eda82d779a4bfc1b44469575bceb43
[ "MIT" ]
2,918
2015-11-28T18:26:05.000Z
2022-03-21T07:19:40.000Z
utils.py
kevingodlike/char-rnn-tensorflow-master
1bc17d3082eda82d779a4bfc1b44469575bceb43
[ "MIT" ]
126
2015-11-29T08:25:08.000Z
2021-07-09T06:42:49.000Z
utils.py
kevingodlike/char-rnn-tensorflow-master
1bc17d3082eda82d779a4bfc1b44469575bceb43
[ "MIT" ]
1,204
2015-11-28T18:23:32.000Z
2022-01-24T20:35:03.000Z
import codecs import os import collections from six.moves import cPickle import numpy as np class TextLoader(): def __init__(self, data_dir, batch_size, seq_length, encoding='utf-8'): self.data_dir = data_dir self.batch_size = batch_size self.seq_length = seq_length self.encoding =...
40.5
121
0.613972
import codecs import os import collections from six.moves import cPickle import numpy as np class TextLoader(): def __init__(self, data_dir, batch_size, seq_length, encoding='utf-8'): self.data_dir = data_dir self.batch_size = batch_size self.seq_length = seq_length self.encoding =...
true
true
08f7859b4b51a2b59f941dc9451e65c38470320b
1,279
py
Python
backup_modules/rsync.py
adorsk/backup_helpers
441b996830fd3424747a1dfd959dbf6335aa48ba
[ "MIT" ]
null
null
null
backup_modules/rsync.py
adorsk/backup_helpers
441b996830fd3424747a1dfd959dbf6335aa48ba
[ "MIT" ]
null
null
null
backup_modules/rsync.py
adorsk/backup_helpers
441b996830fd3424747a1dfd959dbf6335aa48ba
[ "MIT" ]
null
null
null
import os import shutil from . import snapshot_utils DEFAULT_PARAMS = { 'BACKUP_ROOT': os.environ.get('HOME', '') + '/backups/rsync', 'RSYNC_OPTS': '-aR --delete', } def execute_backup_spec(backup_spec=None): params = {**DEFAULT_PARAMS, **backup_spec.get('params', {})} snapshot_utils.default_execute_...
32.794872
82
0.623143
import os import shutil from . import snapshot_utils DEFAULT_PARAMS = { 'BACKUP_ROOT': os.environ.get('HOME', '') + '/backups/rsync', 'RSYNC_OPTS': '-aR --delete', } def execute_backup_spec(backup_spec=None): params = {**DEFAULT_PARAMS, **backup_spec.get('params', {})} snapshot_utils.default_execute_...
true
true
08f785f5020dba7c7e9360f85b60f97e6395ee1d
1,124
py
Python
ledger/payments/invoice/dashboard/views.py
wilsonc86/ledger
a60a681e547f37e4ac81cb93dffaf90aea8c8151
[ "Apache-2.0" ]
null
null
null
ledger/payments/invoice/dashboard/views.py
wilsonc86/ledger
a60a681e547f37e4ac81cb93dffaf90aea8c8151
[ "Apache-2.0" ]
11
2019-03-19T02:03:11.000Z
2019-05-31T07:20:59.000Z
ledger/payments/invoice/dashboard/views.py
dbca-dragon/ledger
6f71699e21c8e502ee805cadc82ee0ec4c004e79
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.views import generic from django.contrib import messages from django.core.urlresolvers import reverse, reverse_lazy from django.conf import settings from django import http from django.utils.translation import ugettext as _ from django.shortcuts import get_object_or_4...
33.058824
71
0.758007
from __future__ import unicode_literals from django.views import generic from django.contrib import messages from django.core.urlresolvers import reverse, reverse_lazy from django.conf import settings from django import http from django.utils.translation import ugettext as _ from django.shortcuts import get_object_or_4...
true
true
08f786bf410366eda80cc01b6861e2c5a70d0403
4,084
py
Python
qa/rpc-tests/zerochecksum.py
MONIMAKER365/BitcoinUnlimited
8aea282c44ee23ca65cdd895c99b3f6347f46dfc
[ "MIT" ]
1
2020-11-11T12:56:55.000Z
2020-11-11T12:56:55.000Z
qa/rpc-tests/zerochecksum.py
MONIMAKER365/BitcoinUnlimited
8aea282c44ee23ca65cdd895c99b3f6347f46dfc
[ "MIT" ]
null
null
null
qa/rpc-tests/zerochecksum.py
MONIMAKER365/BitcoinUnlimited
8aea282c44ee23ca65cdd895c99b3f6347f46dfc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import test_framework.loginit import os import os.path import time import sys if sys.version_info[0] ...
33.47541
108
0.62953
import test_framework.loginit import os import os.path import time import sys if sys.version_info[0] < 3: raise "Use Python 3" import logging from binascii import unhexlify from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import NetworkThr...
true
true
08f787a8cb3d3b1c2d538b216feef78366c5b350
7,966
py
Python
src/wikicfp.py
adrianogil/cfp
e435cf4ece0119a4eac4dfebd75e808bec6b016c
[ "MIT" ]
null
null
null
src/wikicfp.py
adrianogil/cfp
e435cf4ece0119a4eac4dfebd75e808bec6b016c
[ "MIT" ]
null
null
null
src/wikicfp.py
adrianogil/cfp
e435cf4ece0119a4eac4dfebd75e808bec6b016c
[ "MIT" ]
null
null
null
#!/usr/bin/python """ https://github.com/SmartDataAnalytics/OpenResearch/blob/master/wikiCFP/crawlWikiCFP.py This program can be used to extract semantic property with corresponding values for events in WikiCFP run by using command from terminal: "python crawlWikiCFP.py", output will be in current directory named "eve...
56.098592
120
0.493096
""" https://github.com/SmartDataAnalytics/OpenResearch/blob/master/wikiCFP/crawlWikiCFP.py This program can be used to extract semantic property with corresponding values for events in WikiCFP run by using command from terminal: "python crawlWikiCFP.py", output will be in current directory named "events.csv" Author: Y...
false
true
08f7893bc3a2c7f7a00e098290eba1f23f9fd9fa
640
py
Python
spaghetti/tests/test_api_network.py
slumnitz/spaghetti
e608a1b9bcb2d2156607d0d960770a2610f0f4fd
[ "BSD-3-Clause" ]
null
null
null
spaghetti/tests/test_api_network.py
slumnitz/spaghetti
e608a1b9bcb2d2156607d0d960770a2610f0f4fd
[ "BSD-3-Clause" ]
null
null
null
spaghetti/tests/test_api_network.py
slumnitz/spaghetti
e608a1b9bcb2d2156607d0d960770a2610f0f4fd
[ "BSD-3-Clause" ]
null
null
null
""" Testing for the spaghetti api import structure. """ import unittest from .network_unittest_classes import TestNetwork from .network_unittest_classes import TestNetworkPointPattern from .network_unittest_classes import TestNetworkAnalysis # api import structure import spaghetti # run tests on spaghetti.network.Ne...
24.615385
61
0.828125
import unittest from .network_unittest_classes import TestNetwork from .network_unittest_classes import TestNetworkPointPattern from .network_unittest_classes import TestNetworkAnalysis import spaghetti TestNetwork.spaghetti = spaghetti TestNetwork() TestNetworkPointPattern.spaghetti = spaghetti TestNetworkPointPat...
true
true
08f78a16a5413279e017fbb9e9a3bf710b5c3e79
1,862
py
Python
project/server/models/Hospital.py
tafodinho/transfuzol_api
f8a37e4665c746e6a123b26971ba09066f342296
[ "MIT" ]
null
null
null
project/server/models/Hospital.py
tafodinho/transfuzol_api
f8a37e4665c746e6a123b26971ba09066f342296
[ "MIT" ]
null
null
null
project/server/models/Hospital.py
tafodinho/transfuzol_api
f8a37e4665c746e6a123b26971ba09066f342296
[ "MIT" ]
null
null
null
from project.server import app, db, bcrypt class Hospital(db.Model): __tablename__ = "hospitals" id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(100)) city = db.Column(db.String(100)) region = db.Column(db.String(100)) address = db.Column(db.String...
44.333333
97
0.657895
from project.server import app, db, bcrypt class Hospital(db.Model): __tablename__ = "hospitals" id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(100)) city = db.Column(db.String(100)) region = db.Column(db.String(100)) address = db.Column(db.String...
true
true
08f78d9d86f6223f104d841d2be81c08bb966e4f
4,020
py
Python
acos_client/v30/slb/server.py
MitchellMahan/acos-client
163b30247e043e27c0e2ec028a2c8c397ff48e8e
[ "Apache-2.0" ]
33
2015-02-11T16:42:04.000Z
2021-08-24T16:06:23.000Z
acos_client/v30/slb/server.py
MitchellMahan/acos-client
163b30247e043e27c0e2ec028a2c8c397ff48e8e
[ "Apache-2.0" ]
154
2015-01-12T18:46:28.000Z
2022-01-22T13:59:48.000Z
acos_client/v30/slb/server.py
MitchellMahan/acos-client
163b30247e043e27c0e2ec028a2c8c397ff48e8e
[ "Apache-2.0" ]
68
2015-01-12T22:29:57.000Z
2021-07-13T07:21:05.000Z
# Copyright 2014, Jeff Buttars, A10 Networks. # # 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...
44.175824
101
0.640299
from __future__ import absolute_import from __future__ import unicode_literals from acos_client.v30 import base from acos_client.v30.slb.port import Port class Server(base.BaseV30): url_prefix = '/slb/server/' def get(self, name, max_retries=None, timeout=None, **kwargs): return self._get(self.url_...
true
true
08f78f68f453f734ac6aff12d1f29f0439b56e28
434
py
Python
PRINCESSCF/introduce/migrations/0002_alter_member_id.py
KnS-hacks/1-PrincessDFM-BE
44073783c3591305ed93378b24693cf86c7ff1ee
[ "MIT" ]
null
null
null
PRINCESSCF/introduce/migrations/0002_alter_member_id.py
KnS-hacks/1-PrincessDFM-BE
44073783c3591305ed93378b24693cf86c7ff1ee
[ "MIT" ]
3
2021-11-18T10:18:40.000Z
2021-11-19T05:24:10.000Z
PRINCESSCF/introduce/migrations/0002_alter_member_id.py
KnS-hacks/1-PrincessDFM-BE
44073783c3591305ed93378b24693cf86c7ff1ee
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-17 00:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('introduce', '0001_initial'), ] operations = [ migrations.AlterField( model_name='member', name='id', fie...
22.842105
111
0.617512
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('introduce', '0001_initial'), ] operations = [ migrations.AlterField( model_name='member', name='id', field=models.BigAutoField(auto_created=True, primar...
true
true
08f79030d7efbdc1306c536163793380dd1444f8
520
py
Python
old-projects/number guessing game.py
waitblock/gists
3dfe65a4f0f593ab4378eb3b518c98e2e882844d
[ "MIT" ]
3
2021-06-10T18:44:28.000Z
2021-11-19T02:48:38.000Z
old-projects/number guessing game.py
waitblock/side-projects
3dfe65a4f0f593ab4378eb3b518c98e2e882844d
[ "MIT" ]
null
null
null
old-projects/number guessing game.py
waitblock/side-projects
3dfe65a4f0f593ab4378eb3b518c98e2e882844d
[ "MIT" ]
null
null
null
import random as r n=int(r.randint(1, 2048)) answer='y' while answer=='y': x=0 while x==0: g = int(raw_input("\nGuess a number between 1 and 2048: ")) if n == g: print "you guessed it!" x=1 ...
28.888889
76
0.376923
import random as r n=int(r.randint(1, 2048)) answer='y' while answer=='y': x=0 while x==0: g = int(raw_input("\nGuess a number between 1 and 2048: ")) if n == g: print "you guessed it!" x=1 ...
false
true
08f7908f11cfd947a012797c1d77d68529e3afb0
18,503
py
Python
dx_authorization.py
jtamagnan-delphix/delphixpy-examples
441bf8f7eef52fd0b71cf1961cf7aedec9814d99
[ "Apache-2.0" ]
11
2018-02-23T16:48:18.000Z
2022-01-19T23:37:50.000Z
dx_authorization.py
jtamagnan-delphix/delphixpy-examples
441bf8f7eef52fd0b71cf1961cf7aedec9814d99
[ "Apache-2.0" ]
10
2018-10-22T21:10:38.000Z
2021-02-19T20:00:21.000Z
dx_authorization.py
jtamagnan-delphix/delphixpy-examples
441bf8f7eef52fd0b71cf1961cf7aedec9814d99
[ "Apache-2.0" ]
16
2018-06-02T07:02:57.000Z
2021-07-18T05:27:42.000Z
#!/usr/bin/env python # Corey Brune - Oct 2016 # Creates an authorization object # requirements # pip install docopt delphixpy # The below doc follows the POSIX compliant standards and allows us to use # this doc to also define our arguments for the script. """List, create or remove authorizations for a Virtualization...
38.308489
182
0.609307
from __future__ import print_function import sys import traceback from os.path import basename from time import sleep from time import time from docopt import docopt from delphixpy.v1_8_0.exceptions import HttpError from delphixpy.v1_8_0.exceptions import JobError from delphixpy.v1_8_0.exceptions import RequestErro...
true
true
08f79181b9d668faf16c98d62dd8619552a41976
1,747
py
Python
test/conftest.py
timgates42/audioread
3a1c56ec5172f7ecc9633249b7cf4abb431ce9a6
[ "MIT" ]
327
2016-01-10T20:39:20.000Z
2022-03-17T22:29:22.000Z
test/conftest.py
timgates42/audioread
3a1c56ec5172f7ecc9633249b7cf4abb431ce9a6
[ "MIT" ]
95
2016-01-28T17:24:00.000Z
2022-03-28T21:04:26.000Z
test/conftest.py
timgates42/audioread
3a1c56ec5172f7ecc9633249b7cf4abb431ce9a6
[ "MIT" ]
90
2016-01-09T04:22:47.000Z
2022-03-22T21:18:34.000Z
# This file is part of audioread. # Copyright 2018, Sam Thursfield # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, cop...
33.596154
79
0.728105
import json import os import pytest @pytest.fixture() def audiofile(request): spec_path = os.path.join(DATADIR, request.param + '.json') with open(spec_path, 'r') as f: spec = json.load(f) result = AudiofileSpec(**spec) return result TEST_AUDIOFILES = ['test-1', 'test-2'] DATADIR = os.pa...
true
true
08f79230bc551cf097b69e2288f5e37a913ac2f1
1,246
py
Python
Node3D/nodes/utility_nodes.py
ArnoChenFx/Node3D
30fe58cced3a8580eb129475925eb797e6065067
[ "MIT" ]
3
2020-09-09T15:42:46.000Z
2021-07-24T13:58:56.000Z
Node3D/nodes/utility_nodes.py
ArnoChenFx/Node3D
30fe58cced3a8580eb129475925eb797e6065067
[ "MIT" ]
null
null
null
Node3D/nodes/utility_nodes.py
ArnoChenFx/Node3D
30fe58cced3a8580eb129475925eb797e6065067
[ "MIT" ]
1
2021-10-17T12:21:39.000Z
2021-10-17T12:21:39.000Z
from Node3D.base.node import GeometryNode from Node3D.opengl import Mesh from CGAL.CGAL_Kernel import Point_3 from CGAL import CGAL_Convex_hull_3 from CGAL.CGAL_Polyhedron_3 import Polyhedron_3 class ConvexHull(GeometryNode): __identifier__ = 'Utility' NODE_NAME = 'ConvexHull' def __init__(self): ...
25.958333
75
0.551364
from Node3D.base.node import GeometryNode from Node3D.opengl import Mesh from CGAL.CGAL_Kernel import Point_3 from CGAL import CGAL_Convex_hull_3 from CGAL.CGAL_Polyhedron_3 import Polyhedron_3 class ConvexHull(GeometryNode): __identifier__ = 'Utility' NODE_NAME = 'ConvexHull' def __init__(self): ...
true
true
08f792e1d2fb752f4bcb97cb54efe2269f1ad24e
1,695
py
Python
LogSetup/log_test.py
HuiDBK/LogSetupDemo
fd819d0724c2e53614511b6a80f2dfca9d37094e
[ "Apache-2.0" ]
3
2021-06-01T03:49:35.000Z
2022-03-25T00:50:45.000Z
LogSetup/log_test.py
HuiDBK/LogSetupDemo
fd819d0724c2e53614511b6a80f2dfca9d37094e
[ "Apache-2.0" ]
null
null
null
LogSetup/log_test.py
HuiDBK/LogSetupDemo
fd819d0724c2e53614511b6a80f2dfca9d37094e
[ "Apache-2.0" ]
1
2021-06-01T03:50:00.000Z
2021-06-01T03:50:00.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # @Author: Hui # @Desc: { 日志测试模块 } # @Date: 2021/05/27 22:31 import os import yaml import logging import coloredlogs import logging.config # 项目根路径 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # 日志配置文件 LOG_CONF_FILE = os.path.join(BASE_DIR, 'logging.yaml') def setu...
24.926471
94
0.637168
import os import yaml import logging import coloredlogs import logging.config BASE_DIR = os.path.dirname(os.path.abspath(__file__)) LOG_CONF_FILE = os.path.join(BASE_DIR, 'logging.yaml') def setup_logging(default_path=LOG_CONF_FILE, default_level=logging.DEBUG, env_key='LOG_CFG'): path = default_path value...
true
true
08f792ff25fde9e5a11d263b2986f768205668b1
1,843
py
Python
pss1830ssh/pss1830cli.py
trungdtbk/nokia-1830pss-ssh
7d4923c207b1f51953de9355602eeaa8022bd05b
[ "MIT" ]
1
2020-09-29T15:38:34.000Z
2020-09-29T15:38:34.000Z
pss1830ssh/pss1830cli.py
trungdtbk/nokia-1830pss-ssh
7d4923c207b1f51953de9355602eeaa8022bd05b
[ "MIT" ]
null
null
null
pss1830ssh/pss1830cli.py
trungdtbk/nokia-1830pss-ssh
7d4923c207b1f51953de9355602eeaa8022bd05b
[ "MIT" ]
null
null
null
""" Abstraction for a CLI interface of a NE """ from pss1830ssh.pss1830 import PSS1830 from pss1830ssh.pss1830 import PSSException class PSS1830Cli(PSS1830): """Represent a CLI session to a 1830-PSS NE How to use: cli = PSS1830Cli('1.2.3.4', 22, 'admin', 'admin') # create an instance ...
32.333333
79
0.55019
from pss1830ssh.pss1830 import PSS1830 from pss1830ssh.pss1830 import PSSException class PSS1830Cli(PSS1830): PROMPT_RE = '\n[\w-]+# $' def __init__(self, host, port, username, password): super(PSS1830Cli, self).__init__(host, port, 'cli', 'cli') self.cli_user = username sel...
true
true
08f793380365a99b937ff32ac294b407def46d7e
10,952
py
Python
test/functional/wallet_listtransactions.py
synergy-promotions/baddcoin
e536d224874628a44c316d33ac7f2373dd56beaf
[ "MIT" ]
null
null
null
test/functional/wallet_listtransactions.py
synergy-promotions/baddcoin
e536d224874628a44c316d33ac7f2373dd56beaf
[ "MIT" ]
null
null
null
test/functional/wallet_listtransactions.py
synergy-promotions/baddcoin
e536d224874628a44c316d33ac7f2373dd56beaf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the listtransactions API.""" from decimal import Decimal from io import BytesIO from test_framewo...
51.41784
150
0.603999
from decimal import Decimal from io import BytesIO from test_framework.messages import COIN, CTransaction from test_framework.test_framework import BaddcoinTestFramework from test_framework.util import ( assert_array_result, assert_equal, hex_str_to_bytes, ) def tx_from_hex(hexstring): tx = CTransacti...
true
true
08f79373678c582e343f4115957f52a9c20a497c
4,099
py
Python
grid-search/preamble.py
PrincetonUniversity/blockchain-detect
8a17256ac98db19cfe1fb2dcc213a11a1f9b2592
[ "Apache-2.0" ]
1
2019-02-08T00:49:56.000Z
2019-02-08T00:49:56.000Z
grid-search/preamble.py
PrincetonUniversity/blockchain-detect
8a17256ac98db19cfe1fb2dcc213a11a1f9b2592
[ "Apache-2.0" ]
null
null
null
grid-search/preamble.py
PrincetonUniversity/blockchain-detect
8a17256ac98db19cfe1fb2dcc213a11a1f9b2592
[ "Apache-2.0" ]
null
null
null
import numpy as np import pickle import pandas as pd import os, os.path from itertools import * import math import random import scipy.stats import sys import random from joblib import Parallel, delayed import multiprocessing nproc = max(1, multiprocessing.cpu_count()) from scipy.sparse import csr_matrix import scipy...
30.139706
93
0.644547
import numpy as np import pickle import pandas as pd import os, os.path from itertools import * import math import random import scipy.stats import sys import random from joblib import Parallel, delayed import multiprocessing nproc = max(1, multiprocessing.cpu_count()) from scipy.sparse import csr_matrix import scipy...
true
true
08f793a2ec5d1de2b53621d2d7a861d2368cc80c
3,451
py
Python
tools/run-server.py
RAbraham/determined
1161b667ed6d0242f70f9f15d58600f910c8d7f9
[ "Apache-2.0" ]
1
2021-03-29T13:39:45.000Z
2021-03-29T13:39:45.000Z
tools/run-server.py
RAbraham/determined
1161b667ed6d0242f70f9f15d58600f910c8d7f9
[ "Apache-2.0" ]
null
null
null
tools/run-server.py
RAbraham/determined
1161b667ed6d0242f70f9f15d58600f910c8d7f9
[ "Apache-2.0" ]
null
null
null
import multiprocessing as mp import socket import subprocess import sys import time from typing import Callable, List, Optional # While we could use something like requests (or any other 3rd-party module), # this script aims to work with the default Python 3.6+. CLEAR = "\033[39m" MAGENTA = "\033[95m" BLUE = "\033[94...
28.056911
88
0.580701
import multiprocessing as mp import socket import subprocess import sys import time from typing import Callable, List, Optional CLEAR = "\033[39m" MAGENTA = "\033[95m" BLUE = "\033[94m" def kill_process(name: str, process: Optional[mp.Process]) -> None: if process is not None and process.is_alive(): try...
true
true
08f793ea2d8f5b2582c3b2c3d43208505f6cab79
9,393
py
Python
jwtcat.py
bbhunter/jwtcat
cd461fbd2a4cf9393e8e080fb60d8c2fd19e15a6
[ "Apache-2.0" ]
201
2019-09-29T21:51:46.000Z
2022-02-27T13:56:05.000Z
jwtcat.py
bbhunter/jwtcat
cd461fbd2a4cf9393e8e080fb60d8c2fd19e15a6
[ "Apache-2.0" ]
15
2019-10-18T21:09:36.000Z
2021-11-21T20:44:05.000Z
jwtcat.py
bbhunter/jwtcat
cd461fbd2a4cf9393e8e080fb60d8c2fd19e15a6
[ "Apache-2.0" ]
39
2019-10-15T03:17:24.000Z
2021-12-03T07:23:11.000Z
#!/usr/bin/env python3 # Copyright (C) 2017 - 2020 Alexandre Teyar # 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 applic...
29.819048
238
0.609071
import argparse import json import logging import os import signal import sys import time from datetime import datetime, timedelta from itertools import chain, product import coloredlogs import jwt from tqdm import tqdm logger = logging.getLogger(__name__) coloredlogs.install(level='DEBUG', milliseconds=True) d...
true
true
08f7943f602f9b0c9a5db23481f0cc9f59f74d47
10,253
py
Python
svinfer/linear_model/linear_regression.py
facebookresearch/svinfer
14edce1af6c91e622b8691f5d78a490a8585e7b5
[ "Apache-2.0" ]
14
2020-05-29T18:45:16.000Z
2022-03-21T03:30:27.000Z
svinfer/linear_model/linear_regression.py
facebookresearch/svinfer
14edce1af6c91e622b8691f5d78a490a8585e7b5
[ "Apache-2.0" ]
null
null
null
svinfer/linear_model/linear_regression.py
facebookresearch/svinfer
14edce1af6c91e622b8691f5d78a490a8585e7b5
[ "Apache-2.0" ]
1
2020-07-30T17:01:20.000Z
2020-07-30T17:01:20.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # 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 b...
35.600694
84
0.578367
import logging import numpy as np from ..processor.commons import AbstractProcessor from ..processor.matrix import get_result class LinearRegressionCoefficients: def __init__(self, n, xtx, xty, yty, x_s2, df_corrected=True): if xtx.shape[0] != xtx.shape[1]: raise ValueError("xtx should ...
true
true
08f796ddd80489e129f4777f1c4a9c04c642ffba
3,800
py
Python
ingestion/src/metadata/orm_profiler/orm/converter.py
ambassify/OpenMetadata
d959a49f8d997c8e65c4b10309b720b0060e1271
[ "Apache-2.0" ]
null
null
null
ingestion/src/metadata/orm_profiler/orm/converter.py
ambassify/OpenMetadata
d959a49f8d997c8e65c4b10309b720b0060e1271
[ "Apache-2.0" ]
null
null
null
ingestion/src/metadata/orm_profiler/orm/converter.py
ambassify/OpenMetadata
d959a49f8d997c8e65c4b10309b720b0060e1271
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Collate # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software...
33.928571
79
0.709474
import sqlalchemy from sqlalchemy.orm import declarative_base from metadata.generated.schema.entity.data.database import Database from metadata.generated.schema.entity.data.table import Column, DataType, Table from metadata.orm_profiler.orm.registry import CustomTypes Base = declarative_base() _TYPE_MAP = { Dat...
true
true
08f7972d80b780ffd8c043102f2dfd3c241afc30
2,398
py
Python
tests/unit_tests/db_engine_specs/test_drill.py
delorenzosoftware/superset
5403f1ec163a52623f34f459d89f20e4e190371d
[ "Apache-2.0" ]
18,621
2017-06-19T09:57:44.000Z
2021-01-05T06:28:21.000Z
tests/unit_tests/db_engine_specs/test_drill.py
changeiot/superset
299b5dc64448d04abe6b35ee85fbd2b938c781bc
[ "Apache-2.0" ]
9,043
2017-07-05T16:10:48.000Z
2021-01-05T17:58:01.000Z
tests/unit_tests/db_engine_specs/test_drill.py
changeiot/superset
299b5dc64448d04abe6b35ee85fbd2b938c781bc
[ "Apache-2.0" ]
5,527
2017-07-06T01:39:43.000Z
2021-01-05T06:01:11.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.264706
79
0.747706
from flask.ctx import AppContext def test_odbc_impersonation(app_context: AppContext) -> None: from sqlalchemy.engine.url import URL from superset.db_engine_specs.drill import DrillEngineSpec url = URL("drill+odbc") username = "DoAsUser" DrillEngineSpec.modify_url_for_impersonation(url, True, u...
true
true
08f7976c47265b9a79afc1900c1eb02d5f3d16e5
4,796
py
Python
cms/extensions/extension_pool.py
stefanw/django-cms
048ec9e7a529549d51f4805fdfbcd50ea1e624b0
[ "BSD-3-Clause" ]
null
null
null
cms/extensions/extension_pool.py
stefanw/django-cms
048ec9e7a529549d51f4805fdfbcd50ea1e624b0
[ "BSD-3-Clause" ]
null
null
null
cms/extensions/extension_pool.py
stefanw/django-cms
048ec9e7a529549d51f4805fdfbcd50ea1e624b0
[ "BSD-3-Clause" ]
null
null
null
from cms.exceptions import SubClassNeededError from .models import PageExtension, TitleExtension class ExtensionPool(object): def __init__(self): self.page_extensions = set() self.title_extensions = set() self.signaling_activated = False def register(self, extension): """ ...
37.46875
118
0.649291
from cms.exceptions import SubClassNeededError from .models import PageExtension, TitleExtension class ExtensionPool(object): def __init__(self): self.page_extensions = set() self.title_extensions = set() self.signaling_activated = False def register(self, extension): if iss...
true
true
08f797fcb2d9081ebd906a57be9c34ca34d83160
1,485
py
Python
scrapy stuff/tutorial/tutorial/pipelines.py
wangbinyq/my-jupyter-notebook
417a992015e6c6bf7faeb55b441aca62eae5e76d
[ "MIT" ]
1
2018-07-19T02:19:16.000Z
2018-07-19T02:19:16.000Z
scrapy stuff/tutorial/tutorial/pipelines.py
wangbinyq/my-jupyter-notebook
417a992015e6c6bf7faeb55b441aca62eae5e76d
[ "MIT" ]
null
null
null
scrapy stuff/tutorial/tutorial/pipelines.py
wangbinyq/my-jupyter-notebook
417a992015e6c6bf7faeb55b441aca62eae5e76d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html from .models import db, Quote, Tag, QuoteTag, Author from concurrent.futures import ThreadPoolExecutor class TutorialPipeline...
29.7
70
0.647811
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html from .models import db, Quote, Tag, QuoteTag, Author from concurrent.futures import ThreadPoolExecutor class TutorialPipeline(object): def process_item(self, item, spider): return item class Sqlite3Pipeline(object): @classmethod ...
true
true
08f798c3ef859eeaf2fc3c018e7a6463327edbe0
17,632
py
Python
tests/system/python/pair/test_e2e_fledge_pair.py
DDC-NDRS/fledge-iot_fledge
27a5e66a55daaab1aca14ce6e66f9f1e6efaef51
[ "Apache-2.0" ]
69
2019-12-03T17:54:33.000Z
2022-03-13T07:05:23.000Z
tests/system/python/pair/test_e2e_fledge_pair.py
DDC-NDRS/fledge-iot_fledge
27a5e66a55daaab1aca14ce6e66f9f1e6efaef51
[ "Apache-2.0" ]
125
2020-02-13T15:11:28.000Z
2022-03-29T14:42:36.000Z
tests/system/python/pair/test_e2e_fledge_pair.py
DDC-NDRS/fledge-iot_fledge
27a5e66a55daaab1aca14ce6e66f9f1e6efaef51
[ "Apache-2.0" ]
24
2019-12-27T07:48:45.000Z
2022-03-13T07:05:28.000Z
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge-iot.readthedocs.io/ # FLEDGE_END """ Test end to end flow with: 2 fledges, One fledge use programatic south services, sinusoid, expression and playback to send data via http north to send fledge second fledge use PI Server (C) plugin ...
50.52149
267
0.644056
import subprocess import http.client import os import json import time import pytest from collections import Counter import utils __author__ = "Vaibhav Singhal" __copyright__ = "Copyright (c) 2019 Dianomic Systems" __license__ = "Apache 2.0" __version__ = "${VERSION}" CSV_NAME = "sample.csv" CSV_HEADERS = "ivalu...
true
true
08f7991090594295d362afa87d1a6cbab6d3089a
1,722
py
Python
generalgui/properties/funcs.py
Mandera/generalgui
4cc53bc19464d2032d4fb2fee7404cca338c9b5d
[ "MIT" ]
1
2021-03-12T12:48:59.000Z
2021-03-12T12:48:59.000Z
generalgui/properties/funcs.py
Mandera/generalgui
4cc53bc19464d2032d4fb2fee7404cca338c9b5d
[ "MIT" ]
null
null
null
generalgui/properties/funcs.py
Mandera/generalgui
4cc53bc19464d2032d4fb2fee7404cca338c9b5d
[ "MIT" ]
null
null
null
from generallibrary import getBaseClassNames, SigInfo, dict_insert, wrapper_transfer def set_parent_hook(self, parent, _draw=True): """ :param generalgui.MethodGrouper self: :param generalgui.MethodGrouper parent: """ if _draw: for part in self.get_children(depth=-1, include_self=True, gen=Tru...
25.701493
159
0.646341
from generallibrary import getBaseClassNames, SigInfo, dict_insert, wrapper_transfer def set_parent_hook(self, parent, _draw=True): if _draw: for part in self.get_children(depth=-1, include_self=True, gen=True): part.draw_create() assert "Contain" in getBaseClassNames(parent) or parent is ...
true
true
08f799dbddc8a4f7207e29340e373c3c7ed90062
2,784
py
Python
sources/vipnovel.py
hauntty/lightnovel-crawler
d3969bcc88128bb63b16bb7b8358128052f7f815
[ "Apache-2.0" ]
null
null
null
sources/vipnovel.py
hauntty/lightnovel-crawler
d3969bcc88128bb63b16bb7b8358128052f7f815
[ "Apache-2.0" ]
5
2022-03-07T05:02:19.000Z
2022-03-07T05:02:32.000Z
sources/vipnovel.py
BorgSquared/lightnovel-crawler
fba36a8e524437095b294c8f687caa5e6891ea6d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import json import logging import re from lncrawl.core.crawler import Crawler logger = logging.getLogger(__name__) search_url = 'https://vipnovel.com/?s=%s&post_type=wp-manga&author=&artist=&release=' class VipNovel(Crawler): base_url = 'https://vipnovel.com/' def search_novel(self, ...
33.142857
85
0.563578
import json import logging import re from lncrawl.core.crawler import Crawler logger = logging.getLogger(__name__) search_url = 'https://vipnovel.com/?s=%s&post_type=wp-manga&author=&artist=&release=' class VipNovel(Crawler): base_url = 'https://vipnovel.com/' def search_novel(self, query): query = ...
true
true
08f79a106ea7681fc2349ba15aa1b0612aecd9bc
7,457
py
Python
agent/policy_config.py
gaurav-dalvi/deployment-support
9732bb7419897ca27572b55b203fb1b76ecb106b
[ "Apache-2.0" ]
null
null
null
agent/policy_config.py
gaurav-dalvi/deployment-support
9732bb7419897ca27572b55b203fb1b76ecb106b
[ "Apache-2.0" ]
null
null
null
agent/policy_config.py
gaurav-dalvi/deployment-support
9732bb7419897ca27572b55b203fb1b76ecb106b
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Cisco Systems # 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 require...
33.59009
78
0.601717
import json import netaddr class PolicyObject(object): """Opflex Policy Object Opflex JSON policy objects take the form: { "subject": <object type>, "uri": <uri string>, "properties": [ <list of properties> ] "children": [ <list of child objects> ]] "parent_subjec...
false
true
08f79b523f9ea57705fb88ff9b8fc54893bb9574
7,138
py
Python
nni/algorithms/compression/v2/pytorch/pruning/auto_compress_pruner.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
1
2022-03-06T12:57:08.000Z
2022-03-06T12:57:08.000Z
nni/algorithms/compression/v2/pytorch/pruning/auto_compress_pruner.py
soma2000-lang/nni
eaad98528c7aa714c9848800d607d6aa3bdd531d
[ "MIT" ]
null
null
null
nni/algorithms/compression/v2/pytorch/pruning/auto_compress_pruner.py
soma2000-lang/nni
eaad98528c7aa714c9848800d607d6aa3bdd531d
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import logging from pathlib import Path from typing import Dict, List, Callable, Optional from torch import Tensor from torch.nn import Module from nni.algorithms.compression.v2.pytorch.utils import OptimizerConstructHelper from .basic_pruner ...
56.204724
277
0.651163
import logging from pathlib import Path from typing import Dict, List, Callable, Optional from torch import Tensor from torch.nn import Module from nni.algorithms.compression.v2.pytorch.utils import OptimizerConstructHelper from .basic_pruner import ADMMPruner from .iterative_pruner import IterativePruner, Simulate...
true
true
08f79c1717b5f3cb69cb43cd3a9e2c9b92c4b5f8
311
py
Python
demo2.py
soravux/openexrpython
872e631d856f66d8f1f6edf2b81a605d166c3e86
[ "BSD-3-Clause" ]
null
null
null
demo2.py
soravux/openexrpython
872e631d856f66d8f1f6edf2b81a605d166c3e86
[ "BSD-3-Clause" ]
null
null
null
demo2.py
soravux/openexrpython
872e631d856f66d8f1f6edf2b81a605d166c3e86
[ "BSD-3-Clause" ]
null
null
null
import OpenEXR infile = OpenEXR.InputFile("GoldenGate.exr") h = infile.header() channels = list(h['channels'].keys()) newchannels = dict(list(zip(channels, infile.channels(channels)))) h['comments'] = "A picture of some delicious pie" out = OpenEXR.OutputFile("modified.exr", h) out.writePixels(newchannels)
25.916667
66
0.73955
import OpenEXR infile = OpenEXR.InputFile("GoldenGate.exr") h = infile.header() channels = list(h['channels'].keys()) newchannels = dict(list(zip(channels, infile.channels(channels)))) h['comments'] = "A picture of some delicious pie" out = OpenEXR.OutputFile("modified.exr", h) out.writePixels(newchannels)
true
true
08f79c24d9f3cff5b5908f992853ecc40b2451ff
840
py
Python
pinax/forums/conf.py
SALTISES4/pinax-forums
6bd9ef13c7fdda5fcdf2a4ffe6d00fc9f3b48d6c
[ "MIT" ]
1
2019-04-22T16:20:19.000Z
2019-04-22T16:20:19.000Z
pinax/forums/conf.py
ZhengS1011/pinax-forums
43f92d6d99522c599f32f2ef2d8d6e35782e9df2
[ "MIT" ]
null
null
null
pinax/forums/conf.py
ZhengS1011/pinax-forums
43f92d6d99522c599f32f2ef2d8d6e35782e9df2
[ "MIT" ]
null
null
null
import importlib from django.conf import settings # noqa from django.core.exceptions import ImproperlyConfigured from appconf import AppConf def load_path_attr(path): i = path.rfind(".") module, attr = path[:i], path[i + 1:] try: mod = importlib.import_module(module) except ImportError as e...
25.454545
95
0.67619
import importlib from django.conf import settings from django.core.exceptions import ImproperlyConfigured from appconf import AppConf def load_path_attr(path): i = path.rfind(".") module, attr = path[:i], path[i + 1:] try: mod = importlib.import_module(module) except ImportError as e: ...
true
true
08f79c356acb7b33efd4cd52e55a9957fb39b02f
416
py
Python
stubs/loboris-v3_2_9-esp32/utimeq.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/loboris-v3_2_9-esp32/utimeq.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/loboris-v3_2_9-esp32/utimeq.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'utimeq' on esp32_LoBo 3.2.9 """ # MCU: (sysname='esp32_LoBo', nodename='esp32_LoBo', release='3.2.9', version='ESP32_LoBo_v3.2.9 on 2018-04-12', machine='ESP32 board with ESP32') # Stubber: 1.1.2 - updated from typing import Any class utimeq: """""" def peektime(self, *args) -> Any: pass...
20.8
146
0.598558
from typing import Any class utimeq: def peektime(self, *args) -> Any: pass def pop(self, *args) -> Any: pass def push(self, *args) -> Any: pass
true
true
08f79c368b3467186991e44b408e074e603e0a65
1,195
py
Python
checkov/terraform/context_parsers/parsers/provider_context_parser.py
5l1v3r1/checkov
46ef570b797ba496bf54245309155924ecf8f681
[ "Apache-2.0" ]
1
2020-07-19T19:57:50.000Z
2020-07-19T19:57:50.000Z
checkov/terraform/context_parsers/parsers/provider_context_parser.py
5l1v3r1/checkov
46ef570b797ba496bf54245309155924ecf8f681
[ "Apache-2.0" ]
null
null
null
checkov/terraform/context_parsers/parsers/provider_context_parser.py
5l1v3r1/checkov
46ef570b797ba496bf54245309155924ecf8f681
[ "Apache-2.0" ]
null
null
null
import hcl2 from checkov.terraform.context_parsers.base_parser import BaseContextParser class ProviderContextParser(BaseContextParser): def __init__(self): definition_type = "provider" super().__init__(definition_type=definition_type) def get_entity_context_path(self, entity_block): ...
41.206897
124
0.720502
import hcl2 from checkov.terraform.context_parsers.base_parser import BaseContextParser class ProviderContextParser(BaseContextParser): def __init__(self): definition_type = "provider" super().__init__(definition_type=definition_type) def get_entity_context_path(self, entity_block): ...
true
true
08f79c44893ad3eede56faf949d1795ab7b21bd5
798
py
Python
vtrace/tools/win32aslr.py
vEpiphyte/vivisect
14947a53c6781175f0aa83d49cc16c524a2e23a3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vtrace/tools/win32aslr.py
vEpiphyte/vivisect
14947a53c6781175f0aa83d49cc16c524a2e23a3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vtrace/tools/win32aslr.py
vEpiphyte/vivisect
14947a53c6781175f0aa83d49cc16c524a2e23a3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
''' Utilities for windows tracer objects. ''' import PE import vtrace def deAslr(trace, va): ''' Given an address in an ASLR'd library, rebase it back to the address as it would be if the given PE were at it's suggested address... ''' if vtrace.remote: raise Exception('deAslr only wor...
20.461538
65
0.651629
import PE import vtrace def deAslr(trace, va): if vtrace.remote: raise Exception('deAslr only works for local debuggers!') map = trace.getMemoryMap(va) if map is None: return va mapva, mapsize, mapperm, mapfname = map if not mapfname: return va normname = trace.norm...
true
true
08f79cb17be2d0957d79372b41dc1e5204cfd1e8
8,944
py
Python
python/mellanoxconfig/tools.py
Mellanox/config-tools
971781484e287f99a6806a8387daac05fb543fcc
[ "Apache-2.0" ]
4
2016-04-16T03:27:29.000Z
2021-03-18T18:58:18.000Z
python/mellanoxconfig/tools.py
Mellanox/config-tools
971781484e287f99a6806a8387daac05fb543fcc
[ "Apache-2.0" ]
1
2016-07-19T12:44:16.000Z
2016-07-19T12:44:16.000Z
python/mellanoxconfig/tools.py
Mellanox/config-tools
971781484e287f99a6806a8387daac05fb543fcc
[ "Apache-2.0" ]
4
2015-12-21T09:54:35.000Z
2019-10-14T14:56:29.000Z
#!/usr/bin/python # Copyright 2015 Mellanox Technologies, Ltd # # 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...
26.939759
111
0.715675
import os import sys import yaml import subprocess MELLANOX_TOOLS = '' MELLANOX_DEBUG_ENV_VAR = 'MLNX_DEBUG' MELLANOX_TOOLS_LOCATION = [ '/usr/bin/mellanox-config-tools', '/opt/mellanox/bin/mellanox-config-tools', ] for location in MELLANOX_TOOLS_LOCATION: if os.path.exists(location): MELLANOX_TOOLS = lo...
true
true
08f79d8ba03d2d2b7890cf65c20be203decd30c3
2,765
py
Python
setup.py
joaomcteixeira/Protein_Data_Bank_Parameters
b00518f0f89aea15aaa10debd2bc0a28d722f291
[ "MIT" ]
null
null
null
setup.py
joaomcteixeira/Protein_Data_Bank_Parameters
b00518f0f89aea15aaa10debd2bc0a28d722f291
[ "MIT" ]
null
null
null
setup.py
joaomcteixeira/Protein_Data_Bank_Parameters
b00518f0f89aea15aaa10debd2bc0a28d722f291
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Setup dot py.""" from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename, dirname, join, splitext from setuptools import find_packages, setup def read(*names, **kwargs): """Read description f...
34.5625
117
0.611935
from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename, dirname, join, splitext from setuptools import find_packages, setup def read(*names, **kwargs): path = join(dirname(__file__), *names) with io.open(path, encoding=kwargs.get('encodi...
true
true
08f79e3b935f5789445a827bff251d41ee924920
2,914
py
Python
fastreid/data/common.py
ttaalle/fast_assen
8156c1ce8ec7ce8c9acad739da349c545d0ceec7
[ "Apache-2.0" ]
null
null
null
fastreid/data/common.py
ttaalle/fast_assen
8156c1ce8ec7ce8c9acad739da349c545d0ceec7
[ "Apache-2.0" ]
null
null
null
fastreid/data/common.py
ttaalle/fast_assen
8156c1ce8ec7ce8c9acad739da349c545d0ceec7
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 """ @author: liaoxingyu @contact: sherlockliao01@gmail.com """ from torch.utils.data import Dataset from .data_utils import read_image class CommDataset(Dataset): """Image Person ReID Dataset""" def __init__(self, img_items, transform=None, relabel=True): self.img_items = img_ite...
30.354167
79
0.550789
from torch.utils.data import Dataset from .data_utils import read_image class CommDataset(Dataset): def __init__(self, img_items, transform=None, relabel=True): self.img_items = img_items self.transform = transform self.relabel = relabel pid_set = set() cam_set = set() ...
true
true
08f79e9a73aeca43deb27c2420f01517fdb559cf
9,393
py
Python
articlenizer/sentenize.py
BeTKH/articlenizer
7f18a630c71fcb7c80c710b9ef3870e460f49cac
[ "MIT" ]
null
null
null
articlenizer/sentenize.py
BeTKH/articlenizer
7f18a630c71fcb7c80c710b9ef3870e460f49cac
[ "MIT" ]
null
null
null
articlenizer/sentenize.py
BeTKH/articlenizer
7f18a630c71fcb7c80c710b9ef3870e460f49cac
[ "MIT" ]
null
null
null
"""Based structure of the sentence splitter was adapted from the implemention in BRAT (https://brat.nlplab.org/) that is in turn based on GeniaSS (http://www.nactem.ac.uk/y-matsu/geniass/) """ import re from pathlib import Path from articlenizer.util import apply_regex_list from articlenizer import ABBREVIATIONS ...
53.982759
284
0.62834
import re from pathlib import Path from articlenizer.util import apply_regex_list from articlenizer import ABBREVIATIONS NORM_REGEX = [] NORM_REGEX.append((re.compile(r'\n(?P<leading_spaces> +)'), '\n')) NORM_REGEX.append((re.compile(r'^(?P<leading_spaces> +)'), '')) NORM_REGEX.append((re.compile(r'^(?P<leading_new...
true
true
08f79ea58911134b10a4b02d4fc2a0283ccb5969
17,255
py
Python
pybind/nos/v7_1_0/rbridge_id/router/router_bgp/address_family/ipv6/ipv6_unicast/default_vrf/af_ipv6_uc_and_vrf_cmds_call_point_holder/redistribute/ospf/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_1_0/rbridge_id/router/router_bgp/address_family/ipv6/ipv6_unicast/default_vrf/af_ipv6_uc_and_vrf_cmds_call_point_holder/redistribute/ospf/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/nos/v7_1_0/rbridge_id/router/router_bgp/address_family/ipv6/ipv6_unicast/default_vrf/af_ipv6_uc_and_vrf_cmds_call_point_holder/redistribute/ospf/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
75.349345
627
0.734338
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
08f79f27bece19e8bf2dbb228cb68c671999863e
1,160
py
Python
p082m/delete_duplicates.py
l33tdaima/l33tdaima
0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90
[ "MIT" ]
1
2020-02-20T12:04:46.000Z
2020-02-20T12:04:46.000Z
p082m/delete_duplicates.py
l33tdaima/l33tdaima
0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90
[ "MIT" ]
null
null
null
p082m/delete_duplicates.py
l33tdaima/l33tdaima
0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next from local_packages.list import ListNode class Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: sentinal = ListNode(0, next=head) ...
29.74359
80
0.518966
from local_packages.list import ListNode class Solution: def deleteDuplicates(self, head: ListNode) -> ListNode: sentinal = ListNode(0, next=head) p, was_dup = sentinal, False while p and p.next: if p.next.next: is_dup = p.next.val == p.next.next.val ...
true
true
08f79fdc4dd23b6c3dd2c957d34cd346e0a90dab
340
py
Python
webservice/main.py
webg-dev/WebG.backend
fb95a9b4b1162eeec284985c74737689fc744c83
[ "MIT" ]
null
null
null
webservice/main.py
webg-dev/WebG.backend
fb95a9b4b1162eeec284985c74737689fc744c83
[ "MIT" ]
null
null
null
webservice/main.py
webg-dev/WebG.backend
fb95a9b4b1162eeec284985c74737689fc744c83
[ "MIT" ]
null
null
null
from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from webservice.resources import api_router app = FastAPI() app.include_router(api_router) app.add_middleware( CORSMiddleware, allow_origins=["http://localhost:3000"], allow_credentials=True, allow_methods=["*"], all...
21.25
52
0.75
from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from webservice.resources import api_router app = FastAPI() app.include_router(api_router) app.add_middleware( CORSMiddleware, allow_origins=["http://localhost:3000"], allow_credentials=True, allow_methods=["*"], all...
true
true
08f7a01918a42dde4f3132e08fe7f55ebc6a53e5
5,864
py
Python
Monopoly_lite/affichage.py
Charles-Auguste/Monopoly
8fb7d538798129f0e5950cab921e386f33603bcc
[ "MIT" ]
null
null
null
Monopoly_lite/affichage.py
Charles-Auguste/Monopoly
8fb7d538798129f0e5950cab921e386f33603bcc
[ "MIT" ]
null
null
null
Monopoly_lite/affichage.py
Charles-Auguste/Monopoly
8fb7d538798129f0e5950cab921e386f33603bcc
[ "MIT" ]
null
null
null
import os class Caractere: nb_line: int nb_column: int carac: list def __init__(self, _nb_line, _nb_column, _char): self.nb_column = _nb_column self.nb_line = _nb_line self.carac = _char def __str__(self): caractere = "\n" for line in range(self.nb_line): ...
42.80292
117
0.190484
import os class Caractere: nb_line: int nb_column: int carac: list def __init__(self, _nb_line, _nb_column, _char): self.nb_column = _nb_column self.nb_line = _nb_line self.carac = _char def __str__(self): caractere = "\n" for line in range(self.nb_line): ...
true
true
08f7a023cd56541b721141b5667d6b3a6c000c3b
1,640
py
Python
robust_mobo/nsgaii_utils.py
facebookresearch/robust_mobo
39195f5796e3dd19c411d4cd4c8252488ecbd0ec
[ "MIT" ]
5
2022-02-15T17:08:14.000Z
2022-03-25T04:12:30.000Z
robust_mobo/nsgaii_utils.py
facebookresearch/robust_mobo
39195f5796e3dd19c411d4cd4c8252488ecbd0ec
[ "MIT" ]
null
null
null
robust_mobo/nsgaii_utils.py
facebookresearch/robust_mobo
39195f5796e3dd19c411d4cd4c8252488ecbd0ec
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. r""" NSGA-II utilities """ from typing import Dict from torch import Tensor import torch import numpy as np from pymo...
37.272727
88
0.746951
from typing import Dict from torch import Tensor import torch import numpy as np from pymoo.core.problem import Problem from pymoo.core.population import Population from pymoo.algorithms.moo.nsga2 import NSGA2 from botorch.test_functions.base import BaseTestProblem, ConstrainedBaseTestProblem from pymoo.util.terminati...
true
true
08f7a2dcc535d87e09f8a6c7488a3669b4a2a411
3,883
py
Python
pynab/openapi/models/payee_response.py
idwagner/pynab
26e0f2d2adc86374ff5caf5a614778fafa1c19d6
[ "Apache-2.0" ]
null
null
null
pynab/openapi/models/payee_response.py
idwagner/pynab
26e0f2d2adc86374ff5caf5a614778fafa1c19d6
[ "Apache-2.0" ]
null
null
null
pynab/openapi/models/payee_response.py
idwagner/pynab
26e0f2d2adc86374ff5caf5a614778fafa1c19d6
[ "Apache-2.0" ]
1
2020-11-05T22:28:13.000Z
2020-11-05T22:28:13.000Z
# coding: utf-8 """ YNAB API Endpoints Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudge...
29.869231
294
0.583054
import inspect import pprint import re import six from pynab.openapi.configuration import Configuration class PayeeResponse(object): openapi_types = { 'data': 'PayeeResponseData' } attribute_map = { 'data': 'data' } def __init__(self, data=None, local_vars_configuration=Non...
true
true
08f7a3ca0560d7f8d18944e882494d892e3dbdf0
24,730
py
Python
osc_tui/popup.py
outscale-mgo/osc-tui
68889ad657f33bdf7f140bcc8bd491beb9c369fe
[ "BSD-3-Clause" ]
null
null
null
osc_tui/popup.py
outscale-mgo/osc-tui
68889ad657f33bdf7f140bcc8bd491beb9c369fe
[ "BSD-3-Clause" ]
null
null
null
osc_tui/popup.py
outscale-mgo/osc-tui
68889ad657f33bdf7f140bcc8bd491beb9c369fe
[ "BSD-3-Clause" ]
null
null
null
import curses import textwrap from threading import Thread import npyscreen import npyscreen.fmPopup import npyscreen.wgmultiline import pyperclip from npyscreen import * import requests import main import mainForm SUBNETID = None ROUTE = None class ConfirmCancelPopup(npyscreen.fmPopup.ActionPopup): def on_ok(...
25.84117
82
0.580752
import curses import textwrap from threading import Thread import npyscreen import npyscreen.fmPopup import npyscreen.wgmultiline import pyperclip from npyscreen import * import requests import main import mainForm SUBNETID = None ROUTE = None class ConfirmCancelPopup(npyscreen.fmPopup.ActionPopup): def on_ok(...
true
true
08f7a4e600dd4d8a8536e2282db6982882fd3f1f
3,461
py
Python
docs/source/conf.py
ds-wizard/dsw-sdk
8f9e1b33eed7e0f7a9c267699fef66467d718731
[ "Apache-2.0" ]
2
2021-05-06T20:28:39.000Z
2022-01-19T12:03:08.000Z
docs/source/conf.py
ds-wizard/dsw-sdk
8f9e1b33eed7e0f7a9c267699fef66467d718731
[ "Apache-2.0" ]
34
2021-06-30T20:23:37.000Z
2022-02-06T08:40:28.000Z
docs/source/conf.py
ds-wizard/dsw-sdk
8f9e1b33eed7e0f7a9c267699fef66467d718731
[ "Apache-2.0" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
39.329545
82
0.678417
import os import sys sys.path.insert(0, os.path.abspath('../../src')) sys.path.insert(0, os.path.abspath('../../src/dsw_sdk')) sys.path.insert(0, os.path.abspath('../../src/dsw_sdk/http_client/')) sys.path.insert(0, os.path.abspath('../../src/dsw_sdk/http_client/requests_impl')) sys.path.insert(0, os.path.abspath('....
true
true
08f7a4f310b8936573ea9c25391604407317e883
2,165
py
Python
hpfloss.py
Ekko-zn/StegoAdv
2852dbc85d66f30efb7127695c0d75806bf4aa4c
[ "MIT" ]
1
2021-06-21T08:10:30.000Z
2021-06-21T08:10:30.000Z
hpfloss.py
Ekko-zn/StegoAdv
2852dbc85d66f30efb7127695c0d75806bf4aa4c
[ "MIT" ]
null
null
null
hpfloss.py
Ekko-zn/StegoAdv
2852dbc85d66f30efb7127695c0d75806bf4aa4c
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import numpy as np from PIL import Image import os from cfg import * import sys img_size = 256 criterionl1 = torch.nn.L1Loss() SRM_npy = np.load('SRM_Kernels.npy') class HILL(nn.Module): def __init__(self,img_size): super(HILL,self).__init__() self.im...
32.80303
112
0.606005
import torch import torch.nn as nn import numpy as np from PIL import Image import os from cfg import * import sys img_size = 256 criterionl1 = torch.nn.L1Loss() SRM_npy = np.load('SRM_Kernels.npy') class HILL(nn.Module): def __init__(self,img_size): super(HILL,self).__init__() self.im...
true
true
08f7a5864366f530a879eab0bbab46024136b4d8
5,490
py
Python
devel/lib/python2.7/dist-packages/urg_node/msg/_Status.py
lty1994/atuolabor
42b8c52eac93a2e48fbd64275c7dd426a988000c
[ "Apache-2.0" ]
1
2018-10-04T14:37:00.000Z
2018-10-04T14:37:00.000Z
TrekBot2_WS/devel/.private/urg_node/lib/python2.7/dist-packages/urg_node/msg/_Status.py
Rafcin/TrekBot
d3dc63e6c16a040b16170f143556ef358018b7da
[ "Unlicense" ]
null
null
null
TrekBot2_WS/devel/.private/urg_node/lib/python2.7/dist-packages/urg_node/msg/_Status.py
Rafcin/TrekBot
d3dc63e6c16a040b16170f143556ef358018b7da
[ "Unlicense" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from urg_node/Status.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class Status(genpy.Message): _md5sum = "b393072b65230b373302bfe803e80784" _type = "urg_node/Statu...
35.882353
163
0.687432
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class Status(genpy.Message): _md5sum = "b393072b65230b373302bfe803e80784" _type = "urg_node/Status" _has_header = False _full_text = """# Normal vs setting in the UAM manual. uint16 NORMAL=0 uint16 SETTING=1 uint16 ...
true
true
08f7a5a62b20e49d603021d3212995eff6faa23c
16,778
py
Python
server/openslides/core/config_variables.py
FinnStutzenstein/OpenSlides
7dc35dce404339b41c7729eb3de29010ca63f9a0
[ "MIT" ]
null
null
null
server/openslides/core/config_variables.py
FinnStutzenstein/OpenSlides
7dc35dce404339b41c7729eb3de29010ca63f9a0
[ "MIT" ]
null
null
null
server/openslides/core/config_variables.py
FinnStutzenstein/OpenSlides
7dc35dce404339b41c7729eb3de29010ca63f9a0
[ "MIT" ]
null
null
null
import uuid from django.core.validators import MaxLengthValidator from openslides.core.config import ConfigVariable def get_config_variables(): """ Generator which yields all config variables of this app. There are two main groups: 'General' and 'Projector'. The group 'General' has subgroups. The g...
28.389171
119
0.574443
import uuid from django.core.validators import MaxLengthValidator from openslides.core.config import ConfigVariable def get_config_variables(): yield ConfigVariable( name="general_event_name", default_value="OpenSlides", label="Event name", weight=110, subgroup="Event", ...
true
true
08f7a5b06d88bc505c8c121108b508f0b20474e3
162
py
Python
figures_main_text_and_new_network_model/remaining_code/small_netwulf_expon_smallworld.py
benmaier/DigCT
62fc3fddb7600e2a43761e08618b2e3df423569c
[ "MIT" ]
null
null
null
figures_main_text_and_new_network_model/remaining_code/small_netwulf_expon_smallworld.py
benmaier/DigCT
62fc3fddb7600e2a43761e08618b2e3df423569c
[ "MIT" ]
null
null
null
figures_main_text_and_new_network_model/remaining_code/small_netwulf_expon_smallworld.py
benmaier/DigCT
62fc3fddb7600e2a43761e08618b2e3df423569c
[ "MIT" ]
1
2021-07-12T13:50:35.000Z
2021-07-12T13:50:35.000Z
import netwulf as nw from expon_smallworld import get_expon_small_world N = 20 k0 = 3 G = get_expon_small_world(N,k0,node_creation_order='asc') nw.visualize(G)
18
57
0.796296
import netwulf as nw from expon_smallworld import get_expon_small_world N = 20 k0 = 3 G = get_expon_small_world(N,k0,node_creation_order='asc') nw.visualize(G)
true
true
08f7a668e59103de72d749113cc3e3c2a969ff08
69
py
Python
primes.py
nbcl/pyRSA
22220d5beec3848059a0c7ce440a980383ef8213
[ "MIT" ]
1
2020-09-01T05:13:49.000Z
2020-09-01T05:13:49.000Z
primes.py
nbcl/pyRSA
22220d5beec3848059a0c7ce440a980383ef8213
[ "MIT" ]
null
null
null
primes.py
nbcl/pyRSA
22220d5beec3848059a0c7ce440a980383ef8213
[ "MIT" ]
null
null
null
import math p = math.factorial(546) - 1 q = math.factorial(469) - 1
13.8
27
0.666667
import math p = math.factorial(546) - 1 q = math.factorial(469) - 1
true
true
08f7a7ff316b923bb5ebf08d2a960fe9f543752c
781
py
Python
utils/flakey.py
Emiliano978/twarc
36c225228522e7c67de003638c74ecf4878f3a12
[ "MIT" ]
1,011
2016-10-30T00:04:17.000Z
2022-03-31T20:55:03.000Z
utils/flakey.py
johnchristotle/twarc
eb0ced88ef33a48d2f2be0b3c7a015bb760b8f84
[ "MIT" ]
455
2016-11-10T16:33:13.000Z
2022-03-30T18:35:30.000Z
utils/flakey.py
johnchristotle/twarc
eb0ced88ef33a48d2f2be0b3c7a015bb760b8f84
[ "MIT" ]
222
2016-10-28T12:55:29.000Z
2022-03-28T06:13:29.000Z
#!/usr/bin/env python3 # # This program will read tweet ids (Snowflake IDs) from a file or a pipe and # write the tweet ids back out again with their extracted creation time # (RFC 3339) as csv. # # usage: flakey.py ids.txt > ids-times.csv # # For more about Snowflake IDs see: # https://ws-dl.blogspot.com/2019/08/2019...
26.931034
79
0.691421
import fileinput from datetime import datetime def id2time(tweet_id): ms = (tweet_id >> 22) + 1288834974657 dt = datetime.utcfromtimestamp(ms // 1000) return dt.replace(microsecond=ms % 1000 * 1000) print("id,created_at") for line in fileinput.input(): tweet_id = int(line) created_at = id2time...
true
true
08f7a89a1c7c9a60f4d4ebd6d72ce53f8c604865
501
py
Python
website/news/forms.py
adiver26/DailySnaps
1645b0e77b165f85462fc23b13bed78ca5e2de22
[ "MIT" ]
5
2020-03-27T02:40:37.000Z
2020-07-01T05:30:48.000Z
website/news/forms.py
adiver26/DailySnaps
1645b0e77b165f85462fc23b13bed78ca5e2de22
[ "MIT" ]
9
2020-07-01T08:24:57.000Z
2022-01-13T02:57:49.000Z
website/news/forms.py
adiver26/DailySnaps
1645b0e77b165f85462fc23b13bed78ca5e2de22
[ "MIT" ]
9
2020-03-30T06:34:57.000Z
2021-05-29T04:06:20.000Z
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User class SignUpForm(UserCreationForm): first_name = forms.CharField(max_length=100, help_text='First Name') last_name = forms.CharField(max_length=100, help_text='Last Name') email = for...
38.538462
93
0.730539
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User class SignUpForm(UserCreationForm): first_name = forms.CharField(max_length=100, help_text='First Name') last_name = forms.CharField(max_length=100, help_text='Last Name') email = for...
true
true