hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c339ba67336286373b0d53c302814b598d69ff3
199
py
Python
src/dgl_gcn/gcn/__init__.py
zawaki/nara_revision
28bb42f7ca3a768075748d258c405addc7b28c31
[ "MIT" ]
null
null
null
src/dgl_gcn/gcn/__init__.py
zawaki/nara_revision
28bb42f7ca3a768075748d258c405addc7b28c31
[ "MIT" ]
null
null
null
src/dgl_gcn/gcn/__init__.py
zawaki/nara_revision
28bb42f7ca3a768075748d258c405addc7b28c31
[ "MIT" ]
null
null
null
from gcn.aggregators import * from gcn.model import * from gcn.supervised_train import * from gcn.unsupervised_train import * from gcn.random_walk_train import * from gcn.tensorboard_writer import *
28.428571
36
0.819095
from gcn.aggregators import * from gcn.model import * from gcn.supervised_train import * from gcn.unsupervised_train import * from gcn.random_walk_train import * from gcn.tensorboard_writer import *
true
true
1c339c111d61c125ec834d29e84559a73518fcde
8,544
py
Python
day-28-pomodoro-and-dammits/dammits.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
day-28-pomodoro-and-dammits/dammits.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
day-28-pomodoro-and-dammits/dammits.py
jskolnicki/100-Days-of-Python
146af2b73914a525121f1c91737abd4857dc2f89
[ "CNRI-Python" ]
null
null
null
import tkinter import os import pandas as pd import datetime import csv os.chdir(os.path.dirname(__file__)) window = tkinter.Tk() window.title("Dammit Counter") #variables dammits_db = pd.read_csv("dammits.csv") dammits_db['Week'] = pd.to_datetime(dammits_db['Week']) today = datetime.date.today() today = today + ...
37.473684
199
0.684457
import tkinter import os import pandas as pd import datetime import csv os.chdir(os.path.dirname(__file__)) window = tkinter.Tk() window.title("Dammit Counter") dammits_db = pd.read_csv("dammits.csv") dammits_db['Week'] = pd.to_datetime(dammits_db['Week']) today = datetime.date.today() today = today + datetime.ti...
true
true
1c339c4341e326d02b8fdd14888075414ef08e24
9,385
py
Python
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/learn/models/_psp_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
null
null
null
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/learn/models/_psp_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
9
2020-02-03T15:50:10.000Z
2022-03-02T07:11:34.000Z
CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/learn/models/_psp_utils.py
moazzamwaheed2017/carparkapi
e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2019 Hengshuang Zhao # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge...
40.106838
156
0.636015
import torch import warnings import PIL import numpy as np from pdb import set_trace import torch.nn.functional as F import torch.nn as nn import torch from torchvision import models import math from fastai.callbacks.hooks import hook_output from fastai.vision.learner import create_body from fastai.callbacks.ho...
true
true
1c339d6fee9e1e9192e798a12bd4ddbd28d7495c
1,728
py
Python
e2e_testing/torchscript/xfail_sets.py
edrutte/torch-mlir
87d1af699136452d6f35ff493366d7c872c232ac
[ "Apache-2.0" ]
null
null
null
e2e_testing/torchscript/xfail_sets.py
edrutte/torch-mlir
87d1af699136452d6f35ff493366d7c872c232ac
[ "Apache-2.0" ]
null
null
null
e2e_testing/torchscript/xfail_sets.py
edrutte/torch-mlir
87d1af699136452d6f35ff493366d7c872c232ac
[ "Apache-2.0" ]
null
null
null
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Also available under a BSD-style license. See LICENSE. # This file describes the sets of tests expected to fail for eac...
40.186047
92
0.775463
COMMON_TORCH_MLIR_LOWERING_XFAILS = { "QuantizedMLP_basic", "IouOfModule_basic", } SIZE_ZERO_TENSOR_XFAILS = { "SliceEndSleStartModule_basic", "SliceStartEqEndModule_basic", "SliceOutOfUpperBoundIndexModule_basic", } REFBACKEND_XFAIL_SET = set.union(COMMON_TORCH_MLIR_LOWERING_XFAILS, SIZE_ZERO_TEN...
true
true
1c339d79aaf99ccbb8d865aaf4bbf5c885968a6c
32,566
py
Python
python/cudf/cudf/core/reshape.py
BenikaHall/cudf
d3f5add210293a4832dafb85f04cbb73149b9d54
[ "Apache-2.0" ]
null
null
null
python/cudf/cudf/core/reshape.py
BenikaHall/cudf
d3f5add210293a4832dafb85f04cbb73149b9d54
[ "Apache-2.0" ]
1
2021-02-23T18:05:36.000Z
2021-02-23T18:05:36.000Z
python/cudf/cudf/core/reshape.py
BenikaHall/cudf
d3f5add210293a4832dafb85f04cbb73149b9d54
[ "Apache-2.0" ]
1
2020-11-10T03:19:16.000Z
2020-11-10T03:19:16.000Z
# Copyright (c) 2018-2021, NVIDIA CORPORATION. import itertools import numpy as np import pandas as pd import cudf _axis_map = {0: 0, 1: 1, "index": 0, "columns": 1} def _align_objs(objs, how="outer"): """Align a set of Series or Dataframe objects. Parameters ---------- objs : list of DataFrame, ...
30.578404
79
0.543665
import itertools import numpy as np import pandas as pd import cudf _axis_map = {0: 0, 1: 1, "index": 0, "columns": 1} def _align_objs(objs, how="outer"): i_objs = iter(objs) first = next(i_objs) not_matching_index = any( not first.index.equals(rest.index) for rest in i_objs ) ...
true
true
1c339dfc6796a5e6a419380193c48467dd1213ae
527
py
Python
mlperf/clustering/clustering_dbscan.py
xinyin1990/ml-perf
a5367b41dffe188b3e86fa3e2fcf975bfcd1afb2
[ "MIT" ]
null
null
null
mlperf/clustering/clustering_dbscan.py
xinyin1990/ml-perf
a5367b41dffe188b3e86fa3e2fcf975bfcd1afb2
[ "MIT" ]
null
null
null
mlperf/clustering/clustering_dbscan.py
xinyin1990/ml-perf
a5367b41dffe188b3e86fa3e2fcf975bfcd1afb2
[ "MIT" ]
null
null
null
# This file just defines some values needed for generating tables # cf. Xin for exact implementation # Author: Vincenzo Musco (http://www.vmusco.com) import mlperf.clustering.dbscan.run_base as run from mlperf.clustering.main_clustering import ClusterPipeline from mlperf.tools.static import DBSCAN_ALGO, INCLUDED_ALGO ...
29.277778
65
0.795066
import mlperf.clustering.dbscan.run_base as run from mlperf.clustering.main_clustering import ClusterPipeline from mlperf.tools.static import DBSCAN_ALGO, INCLUDED_ALGO RUN_INFO_BASE = DBSCAN_ALGO AVAIL_ALGOS = INCLUDED_ALGO[RUN_INFO_BASE] class DBSCAN(ClusterPipeline): def __init__(self): super().__ini...
true
true
1c339e6fcb4a63d8ddb674722578078f4d4353c7
2,689
py
Python
DAAQS/utils/preprocess.py
esowc/DAAQS
141b4d97edb319ab67d9f42a1aa54a4555829de2
[ "MIT" ]
2
2020-07-29T13:23:42.000Z
2020-10-24T08:48:13.000Z
DAAQS/utils/preprocess.py
esowc/DAAQS
141b4d97edb319ab67d9f42a1aa54a4555829de2
[ "MIT" ]
null
null
null
DAAQS/utils/preprocess.py
esowc/DAAQS
141b4d97edb319ab67d9f42a1aa54a4555829de2
[ "MIT" ]
1
2022-03-10T16:12:09.000Z
2022-03-10T16:12:09.000Z
import numpy as np from DAAQS.utils.misc import index_to_center def temporal_average(c_data, o_data, index_lat, index_lon): ## Ideally CAMS data is time_step x 3 x 3 ## And openaq_data is list of all stations in that 3x3 grid ## CAMS Data c_grid = c_data[:,index_lat-1:index_lat+2,index_lon-1:index_...
39.544118
179
0.579769
import numpy as np from DAAQS.utils.misc import index_to_center def temporal_average(c_data, o_data, index_lat, index_lon): c_grid = c_data[:,index_lat-1:index_lat+2,index_lon-1:index_lon+2] cams_list = [[] for k in range(8)] for time in range(c_grid.shape[0]): index_time = time%8...
true
true
1c339e8dd4fb94aed0b5e311ce5c943fc6ed1452
529
py
Python
bookmarks/services/tags.py
mindovermiles262/linkding
258c47ee7e7834f466e88ce379d5c2b11d461887
[ "MIT" ]
1
2019-12-26T18:50:21.000Z
2019-12-26T18:50:21.000Z
bookmarks/services/tags.py
mindovermiles262/linkding
258c47ee7e7834f466e88ce379d5c2b11d461887
[ "MIT" ]
null
null
null
bookmarks/services/tags.py
mindovermiles262/linkding
258c47ee7e7834f466e88ce379d5c2b11d461887
[ "MIT" ]
null
null
null
from typing import List from django.contrib.auth.models import User from django.utils import timezone from bookmarks.models import Tag def get_or_create_tags(tag_names: List[str], user: User): return [get_or_create_tag(tag_name, user) for tag_name in tag_names] def get_or_create_tag(name: str, user: User): ...
25.190476
72
0.706994
from typing import List from django.contrib.auth.models import User from django.utils import timezone from bookmarks.models import Tag def get_or_create_tags(tag_names: List[str], user: User): return [get_or_create_tag(tag_name, user) for tag_name in tag_names] def get_or_create_tag(name: str, user: User): ...
true
true
1c339ec89326bd780667ec2cc34b9f8dae8bd876
7,177
py
Python
research/object_detection/predictors/heads/keras_class_head_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
153
2020-10-25T13:58:04.000Z
2022-03-07T06:01:54.000Z
research/object_detection/predictors/heads/keras_class_head_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
12
2020-03-24T17:53:50.000Z
2022-03-12T00:05:19.000Z
research/object_detection/predictors/heads/keras_class_head_test.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
23
2020-10-25T14:44:47.000Z
2021-03-31T02:12:13.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.380208
80
0.704751
import tensorflow as tf from google.protobuf import text_format from object_detection.builders import hyperparams_builder from object_detection.predictors.heads import keras_class_head from object_detection.protos import hyperparams_pb2 from object_detection.utils import test_case class ConvolutionalKerasClassPredi...
true
true
1c339f26fe988d3d0d3c50108569327ce6e8ea57
342
py
Python
employees/serializers.py
rrobles9112/django-rest-framework-crud
88f8e881fd520493beb480cf15e5079db5e26f25
[ "MIT" ]
null
null
null
employees/serializers.py
rrobles9112/django-rest-framework-crud
88f8e881fd520493beb480cf15e5079db5e26f25
[ "MIT" ]
null
null
null
employees/serializers.py
rrobles9112/django-rest-framework-crud
88f8e881fd520493beb480cf15e5079db5e26f25
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Employees from django.contrib.auth.models import User class EmployeeSerializer(serializers.ModelSerializer): # create class to serializer model class Meta: model = Employees fields = ('employee_code', 'salary_per_hour', 'start_data',...
26.307692
90
0.736842
from rest_framework import serializers from .models import Employees from django.contrib.auth.models import User class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employees fields = ('employee_code', 'salary_per_hour', 'start_data', 'departament')
true
true
1c339f77114e97021522ac4ae64937cd92a4e82f
29,153
py
Python
salt/utils/master.py
amaclean199/salt
8aaac011b4616e3c9e74a1daafb4a2146a5a430f
[ "Apache-2.0" ]
null
null
null
salt/utils/master.py
amaclean199/salt
8aaac011b4616e3c9e74a1daafb4a2146a5a430f
[ "Apache-2.0" ]
null
null
null
salt/utils/master.py
amaclean199/salt
8aaac011b4616e3c9e74a1daafb4a2146a5a430f
[ "Apache-2.0" ]
1
2019-06-10T17:42:31.000Z
2019-06-10T17:42:31.000Z
# -*- coding: utf-8 -*- ''' salt.utils.master ----------------- Utilities that can only be used on a salt master. ''' # Import python libs from __future__ import absolute_import, unicode_literals import os import logging import signal from threading import Thread, Event # Import salt libs import salt.lo...
39.663946
142
0.58759
from __future__ import absolute_import, unicode_literals import os import logging import signal from threading import Thread, Event import salt.log import salt.cache import salt.client import salt.pillar import salt.utils.atomicfile import salt.utils.files import salt.utils.minions import salt.utils.platform import s...
true
true
1c33a0ae9bb2ef8611e2ccd924393747b61b9446
7,505
py
Python
create_RU_dataset/RU_doc2vec_baseline.py
OlegDurandin/AuthorStyle
75288df4ad0f88677645c3af00fbd7c0f7f58822
[ "MIT" ]
3
2019-09-29T17:10:43.000Z
2020-09-21T09:58:48.000Z
create_RU_dataset/RU_doc2vec_baseline.py
OlegDurandin/AuthorStyle
75288df4ad0f88677645c3af00fbd7c0f7f58822
[ "MIT" ]
2
2019-07-14T11:14:48.000Z
2019-07-14T11:16:54.000Z
create_RU_dataset/RU_doc2vec_baseline.py
OlegDurandin/AuthorStyle
75288df4ad0f88677645c3af00fbd7c0f7f58822
[ "MIT" ]
null
null
null
from gensim.models import Doc2Vec import pickle import os from src.settings import PATH_TO_OUTPUT_FOLDER from tqdm import tqdm def save_data_from_doc2vec(filename, model, authors_list, novels_list): data_csv = open(filename + '.csv', 'w', encoding='utf-8') print('Save file: {}'.form...
56.007463
139
0.630513
from gensim.models import Doc2Vec import pickle import os from src.settings import PATH_TO_OUTPUT_FOLDER from tqdm import tqdm def save_data_from_doc2vec(filename, model, authors_list, novels_list): data_csv = open(filename + '.csv', 'w', encoding='utf-8') print('Save file: {}'.form...
true
true
1c33a2588ff9ca2ac64905835a1581d4a124f5e7
220
py
Python
Modulo-um/Exercicio15.py
Ribinha740/Exercicios-python
c2af02fedd2f72445abedf3598cb07c74fad326f
[ "MIT" ]
null
null
null
Modulo-um/Exercicio15.py
Ribinha740/Exercicios-python
c2af02fedd2f72445abedf3598cb07c74fad326f
[ "MIT" ]
null
null
null
Modulo-um/Exercicio15.py
Ribinha740/Exercicios-python
c2af02fedd2f72445abedf3598cb07c74fad326f
[ "MIT" ]
null
null
null
print('=========DESAFIO15=========') dias = int(input('Quanto Dias o Carro Foi Alugados? ')) km = float(input('Quantos KM Rodados? ')) pago = (dias * 60) + (km * 0.15) print('O total a pagar é de R${:.2f}'.format(pago))
36.666667
55
0.586364
print('=========DESAFIO15=========') dias = int(input('Quanto Dias o Carro Foi Alugados? ')) km = float(input('Quantos KM Rodados? ')) pago = (dias * 60) + (km * 0.15) print('O total a pagar é de R${:.2f}'.format(pago))
true
true
1c33a3a4cbb41866a0f79ea7c4789a698fa13c56
87,240
py
Python
test/functional/feature_taproot.py
quantumedusa/bitcoin
9fb050720b88f4448547c49841c0c01c92370934
[ "MIT" ]
20
2021-02-24T18:57:12.000Z
2021-06-27T01:20:43.000Z
test/functional/feature_taproot.py
quantumedusa/bitcoin
9fb050720b88f4448547c49841c0c01c92370934
[ "MIT" ]
6
2021-04-08T23:50:08.000Z
2021-12-31T10:53:38.000Z
test/functional/feature_taproot.py
quantumedusa/bitcoin
9fb050720b88f4448547c49841c0c01c92370934
[ "MIT" ]
4
2021-03-14T13:38:48.000Z
2021-06-18T17:11:05.000Z
#!/usr/bin/env python3 # Copyright (c) 2019-2020 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 Taproot softfork (BIPs 340-342) from test_framework.blocktools import ( create_coinbase, c...
58.866397
363
0.670128
from test_framework.blocktools import ( create_coinbase, create_block, add_witness_commitment, MAX_BLOCK_SIGOPS_WEIGHT, NORMAL_GBT_REQUEST_PARAMS, WITNESS_SCALE_FACTOR, ) from test_framework.messages import ( COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, ToHex, )...
true
true
1c33a470cd3d84b5a955d61b336be1ec9d152d1e
3,254
py
Python
utils/tests/test_overpass.py
posm/osm-export-tool2
5a1f4096f1afbe7420363376e6e1e8d42e47e1d1
[ "BSD-3-Clause" ]
2
2018-08-31T18:30:28.000Z
2018-11-27T01:50:06.000Z
utils/tests/test_overpass.py
posm/osm-export-tool2
5a1f4096f1afbe7420363376e6e1e8d42e47e1d1
[ "BSD-3-Clause" ]
null
null
null
utils/tests/test_overpass.py
posm/osm-export-tool2
5a1f4096f1afbe7420363376e6e1e8d42e47e1d1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import logging import os from unittest import skip import mock from mock import patch from django.conf import settings from django.contrib.auth.models import Group, User from django.contrib.gis.geos import GEOSGeometry, Polygon from django.test import TestCase from jobs import presets from jo...
36.561798
102
0.592502
import logging import os from unittest import skip import mock from mock import patch from django.conf import settings from django.contrib.auth.models import Group, User from django.contrib.gis.geos import GEOSGeometry, Polygon from django.test import TestCase from jobs import presets from jobs.models import ExportF...
true
true
1c33a523912e848401b2771ef8932cd156444823
7,439
py
Python
src/headers/__init__.py
joniumGit/headers
0c0e0564445810d4408cafd6cd66ec0e5952179c
[ "MIT" ]
null
null
null
src/headers/__init__.py
joniumGit/headers
0c0e0564445810d4408cafd6cd66ec0e5952179c
[ "MIT" ]
null
null
null
src/headers/__init__.py
joniumGit/headers
0c0e0564445810d4408cafd6cd66ec0e5952179c
[ "MIT" ]
null
null
null
A_IM = "A-IM" ACCEPT = "Accept" ACCEPT_ADDITIONS = "Accept-Additions" ACCEPT_CH = "Accept-CH" ACCEPT_CHARSET = "Accept-Charset" ACCEPT_DATETIME = "Accept-Datetime" ACCEPT_ENCODING = "Accept-Encoding" ACCEPT_FEATURES = "Accept-Features" ACCEPT_LANGUAGE = "Accept-Language" ACCEPT_PATCH = "Accept-Patch" ACCEPT_POST = "Acc...
31.521186
85
0.777524
A_IM = "A-IM" ACCEPT = "Accept" ACCEPT_ADDITIONS = "Accept-Additions" ACCEPT_CH = "Accept-CH" ACCEPT_CHARSET = "Accept-Charset" ACCEPT_DATETIME = "Accept-Datetime" ACCEPT_ENCODING = "Accept-Encoding" ACCEPT_FEATURES = "Accept-Features" ACCEPT_LANGUAGE = "Accept-Language" ACCEPT_PATCH = "Accept-Patch" ACCEPT_POST = "Acc...
true
true
1c33a5b52ee4f37831615da72e58cbf8b4b8979e
1,840
py
Python
commander/thirdparty/covertutils/shells/subshells/controlsubshell.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
1
2020-07-26T01:08:30.000Z
2020-07-26T01:08:30.000Z
commander/thirdparty/covertutils/shells/subshells/controlsubshell.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
null
null
null
commander/thirdparty/covertutils/shells/subshells/controlsubshell.py
how2how/ToyHome
4457b1d28e21ed6fd4ab980a0f7fed345c570ae3
[ "Apache-2.0" ]
null
null
null
import json # from covertutils.payloads.generic.control import Commands as control_commands from covertutils.shells.subshells import SimpleSubShell Commands = { 'reset' : 'RST', 'identity' : 'ID', 'sysinfo' : 'SI', 'kill' : 'KI', 'mute' : 'MU', 'unmute' : 'UM', 'nuke' : 'NK', } def message_handle(message, in...
22.439024
130
0.668478
import json from covertutils.shells.subshells import SimpleSubShell Commands = { 'reset' : 'RST', 'identity' : 'ID', 'sysinfo' : 'SI', 'kill' : 'KI', 'mute' : 'MU', 'unmute' : 'UM', 'nuke' : 'NK', } def message_handle(message, instance) : if instance.sysinfo : sysinfo = message.split('+') instance....
true
true
1c33a6f0962c8eedbd246029b47627afbe7bdab3
1,040
py
Python
lmgtfy/helpers.py
opendata/LMGTDFY
5440d398dd3bdefbdbe5c4f075a0132e6ec9d9c0
[ "MIT" ]
120
2015-02-18T17:02:09.000Z
2021-09-02T22:42:20.000Z
lmgtfy/helpers.py
opendata/LMGTDFY
5440d398dd3bdefbdbe5c4f075a0132e6ec9d9c0
[ "MIT" ]
34
2015-02-12T16:53:47.000Z
2016-05-04T20:17:09.000Z
lmgtfy/helpers.py
opendata/LMGTDFY
5440d398dd3bdefbdbe5c4f075a0132e6ec9d9c0
[ "MIT" ]
14
2015-02-19T16:39:29.000Z
2019-01-21T02:57:02.000Z
from datetime import datetime, timedelta from crispy_forms.layout import Submit from lmgtfy.models import Domain, DomainSearch, TLD from lmgtfy.tasks import search_bing_task class CleanSubmitButton(Submit): field_classes = 'btn btn-default' def search_bing(domain): domain_db_record, _created = Domain.object...
32.5
91
0.735577
from datetime import datetime, timedelta from crispy_forms.layout import Submit from lmgtfy.models import Domain, DomainSearch, TLD from lmgtfy.tasks import search_bing_task class CleanSubmitButton(Submit): field_classes = 'btn btn-default' def search_bing(domain): domain_db_record, _created = Domain.object...
true
true
1c33a846e2842f65c339d069dc91f7a42d82d6da
7,410
py
Python
LaU-reg/experiments/segmentation/option.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
51
2019-11-14T01:48:24.000Z
2021-11-09T02:42:22.000Z
LaU-reg/experiments/segmentation/option.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
4
2019-11-15T10:14:10.000Z
2020-03-17T12:14:50.000Z
LaU-reg/experiments/segmentation/option.py
HolmesShuan/Location-aware-Upsampling-for-Semantic-Segmentation
83822e86570bbff4ca721d80089b5d82f1958852
[ "BSD-2-Clause" ]
9
2019-11-14T12:39:03.000Z
2020-03-03T08:27:19.000Z
########################################################################### # Created by: Hang Zhang # Email: zhang.hang@rutgers.edu # Copyright (c) 2017 ########################################################################### import argparse import torch class Options(): def __init__(self): parser =...
52.928571
83
0.521457
import argparse import torch class Options(): def __init__(self): parser = argparse.ArgumentParser(description='PyTorch \ Segmentation') parser.add_argument('--model', type=str, default='encnet', help='model name (default: encnet)') parser.ad...
true
true
1c33a85214b18127e3cd53a3c1cb7390dd0fa6e1
1,566
py
Python
flags/migrations/0003_rename_variant_classification.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
5
2021-01-14T03:34:42.000Z
2022-03-07T15:34:18.000Z
flags/migrations/0003_rename_variant_classification.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
551
2020-10-19T00:02:38.000Z
2022-03-30T02:18:22.000Z
flags/migrations/0003_rename_variant_classification.py
SACGF/variantgrid
515195e2f03a0da3a3e5f2919d8e0431babfd9c9
[ "RSA-MD" ]
null
null
null
# Generated by Django 3.1 on 2020-10-01 07:38 from django.db import migrations def rename_variant_classification(apps, schema_editor): FlagTypeContext = apps.get_model("flags", "FlagTypeContext") FlagType = apps.get_model("flags", "FlagType") FlagTypeResolution = apps.get_model("flags", "FlagTypeResoluti...
40.153846
119
0.742656
from django.db import migrations def rename_variant_classification(apps, schema_editor): FlagTypeContext = apps.get_model("flags", "FlagTypeContext") FlagType = apps.get_model("flags", "FlagType") FlagTypeResolution = apps.get_model("flags", "FlagTypeResolution") Flag = apps.get_model("flags", "Flag"...
true
true
1c33ac662c0ee6f1d7ca9b77490a9526ccbec4a6
3,049
py
Python
authliboclc/refreshtoken.py
pybrarian/oclc-auth-python
fbc6d396d0d8005dbe29d3c6636d44f02f0d8cd0
[ "Apache-2.0" ]
20
2015-04-08T14:55:32.000Z
2022-03-28T14:40:17.000Z
authliboclc/refreshtoken.py
pybrarian/oclc-auth-python
fbc6d396d0d8005dbe29d3c6636d44f02f0d8cd0
[ "Apache-2.0" ]
4
2016-06-16T13:39:48.000Z
2019-06-04T14:51:08.000Z
authliboclc/refreshtoken.py
pybrarian/oclc-auth-python
fbc6d396d0d8005dbe29d3c6636d44f02f0d8cd0
[ "Apache-2.0" ]
5
2016-10-12T19:22:32.000Z
2019-02-27T21:26:43.000Z
# -*- coding: utf-8 -*- ############################################################################### # Copyright 2014 OCLC # # 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.a...
34.258427
120
0.642834
import time import string class InvalidParameter(Exception): def __init__(self, message): self.message = message class RefreshToken(object): refresh_token = None expires_in = None expires_at = None def __init__(self, tokenValue=None, expires_in=None, expires_at=None): if tok...
true
true
1c33ad31f9732263899e11549699fa7de9573418
29,468
py
Python
tests/sentry/receivers/test_featureadoption.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
tests/sentry/receivers/test_featureadoption.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/receivers/test_featureadoption.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import json from django.utils import timezone from sentry.models import FeatureAdoption, GroupAssignee, GroupTombstone, Rule from sentry.plugins import IssueTrackingPlugin2, NotificationPlugin from sentry.signals import ( alert_rule_created, event_processed, first_ev...
43.335294
324
0.591794
from __future__ import absolute_import import json from django.utils import timezone from sentry.models import FeatureAdoption, GroupAssignee, GroupTombstone, Rule from sentry.plugins import IssueTrackingPlugin2, NotificationPlugin from sentry.signals import ( alert_rule_created, event_processed, first_ev...
true
true
1c33aefdf59902ba2acdb9aad1f915e9bd0231db
1,716
py
Python
examples/dp-sgd-mnist/server.py
andreea-zaharia/flower
c576f0118e5c3d7a7d774dc156fb4b6db194655d
[ "Apache-2.0" ]
null
null
null
examples/dp-sgd-mnist/server.py
andreea-zaharia/flower
c576f0118e5c3d7a7d774dc156fb4b6db194655d
[ "Apache-2.0" ]
null
null
null
examples/dp-sgd-mnist/server.py
andreea-zaharia/flower
c576f0118e5c3d7a7d774dc156fb4b6db194655d
[ "Apache-2.0" ]
null
null
null
import argparse import os import tensorflow as tf import flwr as fl import common # Make TensorFlow logs less verbose os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" def get_eval_fn(model): """Return an evaluation function for server-side evaluation.""" # Load test data here to avoid the overhead of doing it in...
30.642857
80
0.706294
import argparse import os import tensorflow as tf import flwr as fl import common os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" def get_eval_fn(model): _, test = tf.keras.datasets.mnist.load_data() test_data, test_labels = test test_data, test_labels = common.preprocess(test_data, test_labels) ...
true
true
1c33afb249e0a2b024fc113cea6c70dec1148ad2
14
py
Python
example_snippets/multimenus_snippets/NewSnippets/SymPy/Constants/Rational numbers.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/NewSnippets/SymPy/Constants/Rational numbers.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/NewSnippets/SymPy/Constants/Rational numbers.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
Rational(3, 7)
14
14
0.714286
Rational(3, 7)
true
true
1c33b100dd29628c27cade81487d0558c654e802
27,834
py
Python
astromodels/core/model_parser.py
domeckert/astromodels
541e589c55969ce710bcc6eca583a1736b03c7d8
[ "BSD-3-Clause" ]
null
null
null
astromodels/core/model_parser.py
domeckert/astromodels
541e589c55969ce710bcc6eca583a1736b03c7d8
[ "BSD-3-Clause" ]
null
null
null
astromodels/core/model_parser.py
domeckert/astromodels
541e589c55969ce710bcc6eca583a1736b03c7d8
[ "BSD-3-Clause" ]
null
null
null
from builtins import object, str __author__ = "giacomov" import re import warnings from astromodels.core import (model, parameter, polarization, sky_direction, spectral_component) from astromodels.core.my_yaml import my_yaml from astromodels.functions import function from astromodels.so...
29.896885
119
0.578932
from builtins import object, str __author__ = "giacomov" import re import warnings from astromodels.core import (model, parameter, polarization, sky_direction, spectral_component) from astromodels.core.my_yaml import my_yaml from astromodels.functions import function from astromodels.so...
true
true
1c33b274571759e77e6dd52220d80f86a0c0bc06
4,544
py
Python
docusign_esign/models/bulk_send_request.py
joekohlsdorf/docusign-esign-python-client
40407544f79c88716d36fabf36f65c3ef1a5c3ba
[ "MIT" ]
58
2017-10-18T23:06:57.000Z
2021-04-15T23:14:58.000Z
docusign_esign/models/bulk_send_request.py
joekohlsdorf/docusign-esign-python-client
40407544f79c88716d36fabf36f65c3ef1a5c3ba
[ "MIT" ]
49
2017-10-27T05:54:09.000Z
2021-04-29T22:06:17.000Z
docusign_esign/models/bulk_send_request.py
joekohlsdorf/docusign-esign-python-client
40407544f79c88716d36fabf36f65c3ef1a5c3ba
[ "MIT" ]
49
2017-09-16T07:23:41.000Z
2021-05-07T20:21:20.000Z
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
29.894737
140
0.600572
import pprint import re import six from docusign_esign.client.configuration import Configuration class BulkSendRequest(object): swagger_types = { 'batch_name': 'str', 'envelope_or_template_id': 'str' } attribute_map = { 'batch_name': 'batchName', 'envelope_or_templa...
true
true
1c33b2a09b44db5a187a1aef02d537d19d775728
3,601
py
Python
blabber_log_gen.py
markcitron/blabber_log_gen
671e348d8d9c2120b5d99913d0828a724560dd2b
[ "Apache-2.0" ]
null
null
null
blabber_log_gen.py
markcitron/blabber_log_gen
671e348d8d9c2120b5d99913d0828a724560dd2b
[ "Apache-2.0" ]
null
null
null
blabber_log_gen.py
markcitron/blabber_log_gen
671e348d8d9c2120b5d99913d0828a724560dd2b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """ Blabber log gen - This script will generate one or more sample logs This script is called from the start_blabber.py so that it will clean up any logs started, etc. If you start the logs directly from here you can kill the log with cntl-c or whatever :-) The log generator purpose...
35.303922
130
0.579561
import logging, argparse, time def make_parser(): p = argparse.ArgumentParser(description="") p.add_argument("--log_name", "-n", help="Name of log to create. If multiple logs, log number will be appended to this name.") p.add_argument("--log_level", "-l", help="") p.add_argument("--log_id", "-i", hel...
true
true
1c33b603ad9429d7889269b3aeaa7810a1df9cce
6,463
py
Python
opencood/hypes_yaml/yaml_utils.py
CARLAlover/OpenCOOD
dd42cc7a31bc261ea2461b3068ed6111f13ff437
[ "Apache-2.0" ]
null
null
null
opencood/hypes_yaml/yaml_utils.py
CARLAlover/OpenCOOD
dd42cc7a31bc261ea2461b3068ed6111f13ff437
[ "Apache-2.0" ]
null
null
null
opencood/hypes_yaml/yaml_utils.py
CARLAlover/OpenCOOD
dd42cc7a31bc261ea2461b3068ed6111f13ff437
[ "Apache-2.0" ]
null
null
null
import re import yaml import os import numpy as np def load_yaml(file, opt=None): """ Load yaml file and return a dictionary. Parameters ---------- file : string yaml file path. opt : argparser Argparser. Returns ------- param : dict A dictionary that co...
26.929167
79
0.59183
import re import yaml import os import numpy as np def load_yaml(file, opt=None): if opt and opt.model_dir: file = os.path.join(opt.model_dir, 'config.yaml') stream = open(file, 'r') loader = yaml.Loader loader.add_implicit_resolver( u'tag:yaml.org,2002:float', re.compile(u''...
true
true
1c33b6a7978fdbc0bd67a4184ebe877b4f9281f3
6,047
py
Python
mut/flow.py
RPGroup-PBoC/mwc_mutants
35581602c35793fc8ec42c8aff37b8305c5e54e1
[ "MIT" ]
3
2020-11-11T21:33:26.000Z
2021-07-14T21:22:43.000Z
mut/flow.py
RPGroup-PBoC/mwc_mutants
35581602c35793fc8ec42c8aff37b8305c5e54e1
[ "MIT" ]
null
null
null
mut/flow.py
RPGroup-PBoC/mwc_mutants
35581602c35793fc8ec42c8aff37b8305c5e54e1
[ "MIT" ]
1
2021-07-14T21:22:45.000Z
2021-07-14T21:22:45.000Z
import numpy as np import fcsparser import pandas as pd from ._fit_bivariate_normal_AstroML import fit_bivariate_normal import scipy.stats # ####################### # Automated Gating # ####################### def fit_2D_gaussian(df, x_val='FSC-H', y_val='SSC-H', log=False): ''' This function hacks astroML fit...
31.494792
79
0.613031
import numpy as np import fcsparser import pandas as pd from ._fit_bivariate_normal_AstroML import fit_bivariate_normal import scipy.stats def fit_2D_gaussian(df, x_val='FSC-H', y_val='SSC-H', log=False): if log: x = np.log10(df[x_val]) y = np.log10(df[y_val]) else: x = df[x_val] ...
true
true
1c33b6f8041b4f8c936f93105986606a5c958769
2,434
py
Python
tests/linux_benchmarks/resnet_benchmark_test.py
kczauz/PerfKitBenchmarker
66e148a35b54f67f008c7d6e9809d796179a3380
[ "Apache-2.0" ]
null
null
null
tests/linux_benchmarks/resnet_benchmark_test.py
kczauz/PerfKitBenchmarker
66e148a35b54f67f008c7d6e9809d796179a3380
[ "Apache-2.0" ]
null
null
null
tests/linux_benchmarks/resnet_benchmark_test.py
kczauz/PerfKitBenchmarker
66e148a35b54f67f008c7d6e9809d796179a3380
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.634921
77
0.709942
import os import unittest import mock from perfkitbenchmarker import test_util from perfkitbenchmarker.linux_benchmarks import mnist_benchmark from perfkitbenchmarker.linux_benchmarks import resnet_benchmark from perfkitbenchmarker.sample import Sample class ResNetBenchmarkTestCase(unittest.TestCase, test_util.Sampl...
true
true
1c33b801400323fb0a007fa682d7ea3b58a5b5c7
2,244
py
Python
djangocms_baseplugins/download/migrations/0002_downloadsection.py
benzkji/djangocms-baseplugins
7f041a030ed93dcdec70e4ca777b841846b8f2f2
[ "MIT" ]
2
2019-04-14T01:31:22.000Z
2020-03-05T13:06:57.000Z
djangocms_baseplugins/download/migrations/0002_downloadsection.py
benzkji/djangocms-baseplugins
7f041a030ed93dcdec70e4ca777b841846b8f2f2
[ "MIT" ]
32
2017-04-04T09:28:06.000Z
2021-08-18T16:23:02.000Z
djangocms_baseplugins/download/migrations/0002_downloadsection.py
bnzk/djangocms-baseplugins
7f041a030ed93dcdec70e4ca777b841846b8f2f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-08-05 16:02 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ('download', '000...
48.782609
99
0.505348
from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cms', '0016_auto_20160608_1535'), ('download', '0001_initial'), ] operations = [ migrations.CreateModel( ...
true
true
1c33b809346fc82b80b66e12604955377986dc88
659
py
Python
Chase/code/fixSpeed.py
haghish/Chase
8045bce3739cf4cfec63b8fd3387cb1b43904fc3
[ "MIT" ]
2
2020-09-01T13:09:10.000Z
2020-12-17T16:36:42.000Z
Chase/code/fixSpeed.py
haghish/Chase
8045bce3739cf4cfec63b8fd3387cb1b43904fc3
[ "MIT" ]
null
null
null
Chase/code/fixSpeed.py
haghish/Chase
8045bce3739cf4cfec63b8fd3387cb1b43904fc3
[ "MIT" ]
null
null
null
# Written by HAGHISH UG 2016 # ALL RIGHTS RESERVED import math def fixSpeed(speed, dx, dy): # calculate the distance squaredDistance = ((dy)**2) + ((dx)**2) distance = math.sqrt(squaredDistance) # get the ratio between distance and speed ratio = distance/speed # get xHat and yHat (make sure...
21.258065
57
0.564492
import math def fixSpeed(speed, dx, dy): squaredDistance = ((dy)**2) + ((dx)**2) distance = math.sqrt(squaredDistance) ratio = distance/speed if ratio != 0: dxHat = math.sqrt(dx**2/ratio**2) dyHat = math.sqrt(dy ** 2 / ratio ** 2) else: dxHat = 0 dyHa...
true
true
1c33b832812df09e864b29741395873dbedd902b
5,112
py
Python
conans/client/packager.py
xaqq/conan
ab0870336550b7521da71595c6babf42d5690f7b
[ "MIT" ]
null
null
null
conans/client/packager.py
xaqq/conan
ab0870336550b7521da71595c6babf42d5690f7b
[ "MIT" ]
1
2018-06-01T09:34:49.000Z
2018-06-01T13:51:07.000Z
conans/client/packager.py
xaqq/conan
ab0870336550b7521da71595c6babf42d5690f7b
[ "MIT" ]
null
null
null
import os import shutil from conans.client import tools from conans.client.file_copier import FileCopier, report_copied_files from conans.client.output import ScopedOutput from conans.errors import (ConanException, ConanExceptionInUserConanfileMethod, conanfile_exception_formatter) from cona...
40.896
100
0.693075
import os import shutil from conans.client import tools from conans.client.file_copier import FileCopier, report_copied_files from conans.client.output import ScopedOutput from conans.errors import (ConanException, ConanExceptionInUserConanfileMethod, conanfile_exception_formatter) from cona...
true
true
1c33b861ff7df4bb714197bfefe52bd56f66e9fc
8,355
py
Python
bfutils/bfpp-interp.py
borisfaure/bfb
1f019ab580b1e75eaa1eca3c3e87944da148607e
[ "WTFPL" ]
1
2015-04-22T08:23:47.000Z
2015-04-22T08:23:47.000Z
bfutils/bfpp-interp.py
borisfaure/bfb
1f019ab580b1e75eaa1eca3c3e87944da148607e
[ "WTFPL" ]
null
null
null
bfutils/bfpp-interp.py
borisfaure/bfb
1f019ab580b1e75eaa1eca3c3e87944da148607e
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python """ A brainfuck++ interpertor. Based on pybrain4. """ import os import sys import optparse import bfpreprocessor import tty import termios import socket class Interp(): def __init__(self, code): self.cells = [0] * 30000 self.maxint = (2 ** 8) - 1 self.cellpointer = 0 ...
35.553191
94
0.452783
import os import sys import optparse import bfpreprocessor import tty import termios import socket class Interp(): def __init__(self, code): self.cells = [0] * 30000 self.maxint = (2 ** 8) - 1 self.cellpointer = 0 self.codecursor = 0 self.socket = None self.file = No...
true
true
1c33b9cb76fb59d737a1b4f14ac11c663289ecdd
10,541
py
Python
web/SimpleHTTPServerWithUpload.py
laxa/scripts
40bcf3b2090430ab0363d8326aede80a6a3318c1
[ "MIT" ]
1
2018-09-05T13:35:24.000Z
2018-09-05T13:35:24.000Z
web/SimpleHTTPServerWithUpload.py
Laxa/scripts
6eaeb4ac65a62fe098bff45eb9f421560d1a2984
[ "MIT" ]
null
null
null
web/SimpleHTTPServerWithUpload.py
Laxa/scripts
6eaeb4ac65a62fe098bff45eb9f421560d1a2984
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # script sources: https://gist.github.com/UniIsland/3346170 """Simple HTTP Server With Upload. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. """ __version__ = "0.1" __all__ = ["SimpleHTTPRequestHandler"] __author_...
35.611486
97
0.581064
__version__ = "0.1" __all__ = ["SimpleHTTPRequestHandler"] __author__ = "bones7456" __home_page__ = "http://li2z.cn/" import os import posixpath import http.server import urllib import html import shutil import mimetypes import re import io class SimpleHTTPRequestHandler(http.server.BaseHTTPRequestHandler): ...
true
true
1c33ba948c776afd72bc9c5d8ccaf2566e5db1b2
791
py
Python
api/celery_api/signal_handler.py
240325184/KubeOperator
777774050b236abf938a5a9ef505124c26e4916e
[ "Apache-2.0" ]
3
2020-04-05T04:53:24.000Z
2020-04-05T04:53:34.000Z
api/celery_api/signal_handler.py
240325184/KubeOperator
777774050b236abf938a5a9ef505124c26e4916e
[ "Apache-2.0" ]
27
2021-05-05T02:51:26.000Z
2022-01-04T21:30:21.000Z
api/celery_api/signal_handler.py
240325184/KubeOperator
777774050b236abf938a5a9ef505124c26e4916e
[ "Apache-2.0" ]
1
2020-03-04T00:29:29.000Z
2020-03-04T00:29:29.000Z
# -*- coding: utf-8 -*- # import logging from celery.signals import after_setup_logger from celery.utils.log import get_logger from kombu.utils.encoding import safe_str from .logger import CeleryTaskFileHandler safe_str = lambda x: x logger = get_logger(__file__) @after_setup_logger.connect def add_celery_redis_ha...
27.275862
112
0.766119
import logging from celery.signals import after_setup_logger from celery.utils.log import get_logger from kombu.utils.encoding import safe_str from .logger import CeleryTaskFileHandler safe_str = lambda x: x logger = get_logger(__file__) @after_setup_logger.connect def add_celery_redis_handler(sender=None, logger=...
true
true
1c33babc1dbab32440463811c12abe576f496721
638
py
Python
testing/rubik_testing/__init__.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
1
2019-11-13T00:44:09.000Z
2019-11-13T00:44:09.000Z
testing/rubik_testing/__init__.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
null
null
null
testing/rubik_testing/__init__.py
Borsos/rubik
af220a142b81a8f5b5011e4e072be9e3d130e827
[ "Apache-2.0" ]
1
2019-11-13T00:47:16.000Z
2019-11-13T00:47:16.000Z
#!/usr/bin/env python3 # # Copyright 2014 Simone Campagna # # 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 ...
33.578947
74
0.757053
__author__ = "Simone Campagna"
true
true
1c33bb68b5b12b6c3eccc9179009a52e97d4c260
510
py
Python
test/test_data.py
ikamensh/arc-py
5b8d1d44e4602ff029dd77f65882423ee57bf5c1
[ "MIT" ]
3
2021-04-01T21:21:23.000Z
2021-12-24T09:50:28.000Z
test/test_data.py
ikamensh/arc-py
5b8d1d44e4602ff029dd77f65882423ee57bf5c1
[ "MIT" ]
1
2021-04-01T14:32:51.000Z
2021-04-01T14:32:51.000Z
test/test_data.py
ikamensh/arc-py
5b8d1d44e4602ff029dd77f65882423ee57bf5c1
[ "MIT" ]
1
2022-01-18T20:39:33.000Z
2022-01-18T20:39:33.000Z
import os import pytest @pytest.fixture() def no_cache(): from arc.data import cache_file if os.path.isfile(cache_file): os.remove(cache_file) def test_eval_set(no_cache): from arc import validation_problems, describe_task_group assert len(validation_problems) == 400 describe_task_grou...
20.4
60
0.758824
import os import pytest @pytest.fixture() def no_cache(): from arc.data import cache_file if os.path.isfile(cache_file): os.remove(cache_file) def test_eval_set(no_cache): from arc import validation_problems, describe_task_group assert len(validation_problems) == 400 describe_task_grou...
true
true
1c33bd0a99380be85fae7a96440f62e3c0394372
6,644
py
Python
automancy/core/tactical_asserts.py
IAmTheBlurr/Automancy
0c52916cd01dda6bd34ef8d048c37e478dfabbb5
[ "MIT" ]
null
null
null
automancy/core/tactical_asserts.py
IAmTheBlurr/Automancy
0c52916cd01dda6bd34ef8d048c37e478dfabbb5
[ "MIT" ]
null
null
null
automancy/core/tactical_asserts.py
IAmTheBlurr/Automancy
0c52916cd01dda6bd34ef8d048c37e478dfabbb5
[ "MIT" ]
null
null
null
""" ./core/tactical_asserts.py """ from time import sleep import chronomancy import inspect from automancy.core import Elemental from selenium.common.exceptions import WebDriverException class TacticalAsserts(object): def __init__(self, sleep_time: float = 0.25, max_timeout: int = 10): super().__init__...
39.313609
213
0.638471
from time import sleep import chronomancy import inspect from automancy.core import Elemental from selenium.common.exceptions import WebDriverException class TacticalAsserts(object): def __init__(self, sleep_time: float = 0.25, max_timeout: int = 10): super().__init__() self.max_timeout = max_t...
true
true
1c33bd36d7692dffce76f4f41188662a80708b18
18,818
py
Python
log_complete/model_244.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_244.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_244.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.349515
710
0.806515
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', '...
true
true
1c33bd3cd9c3f9a94ceb7cff2cf858c2010efda8
1,068
py
Python
setup.py
Baras64/Scrapera
bbd2f24915767be951acb1fc5fcf4d3d73eedbd4
[ "MIT" ]
300
2021-01-24T05:53:07.000Z
2022-01-10T06:06:41.000Z
setup.py
pratik-choudhari/Scrapera
3d48f2b861849d90aebe85d6e088365de7810c06
[ "MIT" ]
10
2021-01-24T06:37:10.000Z
2021-08-30T16:47:15.000Z
setup.py
pratik-choudhari/Scrapera
3d48f2b861849d90aebe85d6e088365de7810c06
[ "MIT" ]
21
2021-01-24T14:37:42.000Z
2022-01-05T19:33:00.000Z
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = '\n' + f.read() with open('requirements.txt') as f: required = f.read().splitlines() setup( name="scrapera", version="1.1.3",...
30.514286
68
0.655431
from setuptools import setup import os here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = '\n' + f.read() with open('requirements.txt') as f: required = f.read().splitlines() setup( name="scrapera", version="1.1.3",...
true
true
1c33be3154e4fb054abe4a689218686c25115ebe
487
py
Python
lab/migrations/0016_alter_objectgroup_options.py
betagouv/euphrosyne
a67857a8716b5060cd9a2c6fa5f3d45c3fff435a
[ "MIT" ]
1
2022-02-21T19:46:20.000Z
2022-02-21T19:46:20.000Z
lab/migrations/0016_alter_objectgroup_options.py
betagouv/euphrosyne
a67857a8716b5060cd9a2c6fa5f3d45c3fff435a
[ "MIT" ]
37
2021-10-18T18:33:26.000Z
2022-03-31T12:38:38.000Z
lab/migrations/0016_alter_objectgroup_options.py
betagouv/euphrosyne
a67857a8716b5060cd9a2c6fa5f3d45c3fff435a
[ "MIT" ]
2
2022-03-03T15:41:30.000Z
2022-03-07T14:20:26.000Z
# Generated by Django 4.0.1 on 2022-02-14 10:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('lab', '0015_objectgroup_object_count_alter_objectgroup_inventory_and_more_squashed_0016_alter_objectgroup_label'), ] operations = [ migrations.Alter...
27.055556
124
0.677618
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('lab', '0015_objectgroup_object_count_alter_objectgroup_inventory_and_more_squashed_0016_alter_objectgroup_label'), ] operations = [ migrations.AlterModelOptions( name='objectgroup', ...
true
true
1c33be844c886ef505a7fc609351b1c1dceb34b6
99
py
Python
shared/python/__init__.py
carol-hsu/relay-bench
0facffedb3cbb0d5f110769a84bba68718cff72b
[ "Apache-2.0" ]
7
2019-10-03T22:41:18.000Z
2020-05-31T18:52:15.000Z
shared/python/__init__.py
carol-hsu/relay-bench
0facffedb3cbb0d5f110769a84bba68718cff72b
[ "Apache-2.0" ]
14
2019-10-18T19:13:53.000Z
2021-09-08T01:36:37.000Z
shared/python/__init__.py
carol-hsu/relay-bench
0facffedb3cbb0d5f110769a84bba68718cff72b
[ "Apache-2.0" ]
4
2019-10-03T21:34:03.000Z
2022-02-23T10:29:49.000Z
from . import trial_util from . import relay_util from . import analysis_util from . import common
19.8
27
0.79798
from . import trial_util from . import relay_util from . import analysis_util from . import common
true
true
1c33beb67d1b99e22341dd936653d4cf90801b6e
9,407
py
Python
dapper/tools/localization.py
dafeda/DAPPER
fc4ae95a3eb7c65387616f988b75559a9eacc048
[ "MIT" ]
null
null
null
dapper/tools/localization.py
dafeda/DAPPER
fc4ae95a3eb7c65387616f988b75559a9eacc048
[ "MIT" ]
1
2022-02-18T12:29:38.000Z
2022-02-18T12:29:38.000Z
dapper/tools/localization.py
dafeda/DAPPER
fc4ae95a3eb7c65387616f988b75559a9eacc048
[ "MIT" ]
null
null
null
"""Localization tools, including distance and tapering comps. A good introduction to localization: Sakov (2011), Computational Geosciences: 'Relation between two common localisation methods for the EnKF'. """ # NB: Why is the 'order' argument not supported by this module? Because: # 1) Assuming only order (orientati...
30.74183
88
0.582545
# 2) It's not necessary, because the module only communicates to *exterior* via indices import numpy as np def pairwise_distances(A, B=None, domain=None): if B is None: B = A A = np.atleast_2d(A) B = np.atleast_2d(B) mA, nA = A.shape mB, nB = B.shape assert nA == nB, "The last...
true
true
1c33bfb83e4b9c8e2c5f242afa3184bebe3cef27
17,571
py
Python
neutron/openstack/common/gettextutils.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
1
2016-04-19T08:20:19.000Z
2016-04-19T08:20:19.000Z
neutron/openstack/common/gettextutils.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
null
null
null
neutron/openstack/common/gettextutils.py
SnabbCo/neutron
a657c06d10f2171149c6b1863df36522bdc11cd7
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
39.13363
79
0.648341
import copy import functools import gettext import locale from logging import handlers import os from babel import localedata import six _localedir = os.environ.get('neutron'.upper() + '_LOCALEDIR') _t = gettext.translation('neutron', localedir=_localedir, fallback=True) _t_log_levels = dict( (level, gettext.t...
true
true
1c33bfd302e7d66c62c77fcf9ddcf3ff4d552c7b
30,613
py
Python
openaerostruct/geometry/utils.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
null
null
null
openaerostruct/geometry/utils.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
null
null
null
openaerostruct/geometry/utils.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
1
2018-09-24T04:58:37.000Z
2018-09-24T04:58:37.000Z
from __future__ import print_function, division import warnings import numpy as np from numpy import cos, sin, tan from openaerostruct.geometry.CRM_definitions import get_crm_points def rotate(mesh, theta_y, symmetry, rotate_x=True): """ Compute rotation matrices given mesh and rotation angles in d...
34.669309
99
0.575964
from __future__ import print_function, division import warnings import numpy as np from numpy import cos, sin, tan from openaerostruct.geometry.CRM_definitions import get_crm_points def rotate(mesh, theta_y, symmetry, rotate_x=True): te = mesh[-1] le = mesh[ 0] quarter_chord = 0.25 * te + 0.75...
true
true
1c33c028878b8df40f98e39ce8707d77981d1131
4,298
py
Python
lib/editorconfig/handler.py
Twilight0/script.module.jsbeautifier
40b8bbd342788cbd2affaf08921b213252146eaa
[ "MIT" ]
70
2015-01-12T09:55:18.000Z
2022-03-29T06:15:49.000Z
lib/editorconfig/handler.py
Twilight0/script.module.jsbeautifier
40b8bbd342788cbd2affaf08921b213252146eaa
[ "MIT" ]
26
2015-09-15T06:46:51.000Z
2022-03-28T08:56:35.000Z
lib/editorconfig/handler.py
Twilight0/script.module.jsbeautifier
40b8bbd342788cbd2affaf08921b213252146eaa
[ "MIT" ]
28
2015-04-05T18:07:16.000Z
2022-03-28T08:08:00.000Z
"""EditorConfig file handler Provides ``EditorConfigHandler`` class for locating and parsing EditorConfig files relevant to a given filepath. Licensed under Simplified BSD License (see LICENSE.BSD file). """ import os from editorconfig import VERSION from editorconfig.exceptions import PathError, VersionError from...
33.578125
78
0.639832
import os from editorconfig import VERSION from editorconfig.exceptions import PathError, VersionError from editorconfig.ini import EditorConfigParser __all__ = ['EditorConfigHandler'] def get_filenames(path, filename): path_list = [] while True: path_list.append(os.path.join(path, filename)) ...
true
true
1c33c11e620e4693a9ee4e27ae8196c291f627c5
1,086
py
Python
runtimes/actions/riskCalculationFlow/formatData_BulkWrite.py
Hitachi-CTI-Call-For-Code-COVID-19-Team/risk-calculator
96ff4ebe9bfdf3f8b525c65678500ea61260ada3
[ "Apache-2.0" ]
null
null
null
runtimes/actions/riskCalculationFlow/formatData_BulkWrite.py
Hitachi-CTI-Call-For-Code-COVID-19-Team/risk-calculator
96ff4ebe9bfdf3f8b525c65678500ea61260ada3
[ "Apache-2.0" ]
null
null
null
runtimes/actions/riskCalculationFlow/formatData_BulkWrite.py
Hitachi-CTI-Call-For-Code-COVID-19-Team/risk-calculator
96ff4ebe9bfdf3f8b525c65678500ea61260ada3
[ "Apache-2.0" ]
null
null
null
# /* # Copyright 2020 Hitachi 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 applicable law or agreed to in writing, ...
26.487805
88
0.724678
import sys import json def main(jsonified_outputList_dict): docsFormatted = json.dumps( {"docs": json.loads(jsonified_outputList_dict["calulatedRisks"])}) return {'docs': docsFormatted, "dbname": "log_risk_calculation" }
true
true
1c33c148de72f2a2ca14577dee55ad5de602841d
2,997
py
Python
python/2016/day10.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
python/2016/day10.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
python/2016/day10.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
# vi: set shiftwidth=4 tabstop=4 expandtab: import datetime import re import collections def get_instructions_from_file(file_path="../../resources/year2016_day10_input.txt"): with open(file_path) as f: return [l.strip() for l in f] value_goes_re = r"value (\d+) goes to bot (\d+)" bot_gives_re = r"bot (\...
30.896907
85
0.573907
import datetime import re import collections def get_instructions_from_file(file_path="../../resources/year2016_day10_input.txt"): with open(file_path) as f: return [l.strip() for l in f] value_goes_re = r"value (\d+) goes to bot (\d+)" bot_gives_re = r"bot (\d+) gives low to ([a-z]+) (\d+) and high to ...
true
true
1c33c267b7a90b6b1ed9a5308764bf8d3ab08bcf
8,280
py
Python
androguard/session.py
hakimkt/androguard
c16453c70f11df96e4ab3530c212aafe5e1e9e41
[ "Apache-2.0" ]
2
2018-01-28T22:51:12.000Z
2021-02-26T12:02:55.000Z
androguard/session.py
eighthave/androguard
a4f6e7f192f0f21a2f9e063f467775c7b5e36190
[ "Apache-2.0" ]
null
null
null
androguard/session.py
eighthave/androguard
a4f6e7f192f0f21a2f9e063f467775c7b5e36190
[ "Apache-2.0" ]
null
null
null
import hashlib from androguard.core.analysis.analysis import * from androguard.core.bytecodes.dvm import * from androguard.decompiler.decompiler import * from androguard.core import androconf import pickle import logging log = logging.getLogger("androguard.session") def Save(session, filename): """ save yo...
30.666667
97
0.592633
import hashlib from androguard.core.analysis.analysis import * from androguard.core.bytecodes.dvm import * from androguard.decompiler.decompiler import * from androguard.core import androconf import pickle import logging log = logging.getLogger("androguard.session") def Save(session, filename): with open(filen...
true
true
1c33c385b705023e11290137cee26f62b0f93a76
7,695
py
Python
r2d7/slackdroid.py
danrs/r2-d7
d1f7a839f0bcb490954477c592245b5107b8a6aa
[ "MIT" ]
null
null
null
r2d7/slackdroid.py
danrs/r2-d7
d1f7a839f0bcb490954477c592245b5107b8a6aa
[ "MIT" ]
null
null
null
r2d7/slackdroid.py
danrs/r2-d7
d1f7a839f0bcb490954477c592245b5107b8a6aa
[ "MIT" ]
null
null
null
import html import logging import re from urllib.parse import quote from r2d7.core import DroidCore logger = logging.getLogger(__name__) class SlackDroid(DroidCore): def __init__(self): super().__init__() self.load_data() def load_data(self): super().load_data() # Referenc...
42.988827
199
0.555036
import html import logging import re from urllib.parse import quote from r2d7.core import DroidCore logger = logging.getLogger(__name__) class SlackDroid(DroidCore): def __init__(self): super().__init__() self.load_data() def load_data(self): super().load_data() se...
true
true
1c33c3d60a687988f1a25b8804876c5ef86fc7a7
740
py
Python
BuildSimHubAPI/measures/wall_rvalue.py
ruijis/buildsimhub_python_api
67a88a421a5970b9134a97faf3d52a5a8a6c6258
[ "MIT" ]
19
2018-02-27T22:58:04.000Z
2022-02-21T15:03:59.000Z
BuildSimHubAPI/measures/wall_rvalue.py
ruijis/buildsimhub_python_api
67a88a421a5970b9134a97faf3d52a5a8a6c6258
[ "MIT" ]
11
2018-02-15T16:47:53.000Z
2018-12-19T18:33:20.000Z
BuildSimHubAPI/measures/wall_rvalue.py
ruijis/buildsimhub_python_api
67a88a421a5970b9134a97faf3d52a5a8a6c6258
[ "MIT" ]
11
2018-01-26T02:12:38.000Z
2019-09-29T12:05:31.000Z
from .model_action import ModelAction class WallRValue(ModelAction): # this shows the ip to si conversion rate # if unit is 'ip', then multiply this rate. # for window it is the U-value # convert U-value IP to SI CONVERSION_RATE = 5.678 def __init__(self, unit="si"): ModelAction.__ini...
27.407407
81
0.639189
from .model_action import ModelAction class WallRValue(ModelAction): CONVERSION_RATE = 5.678 def __init__(self, unit="si"): ModelAction.__init__(self, 'wall_rvalue', unit) self._measure_name = 'Wall_R' self._lower_limit = 0 self._measure_help = ''' meas...
true
true
1c33c41b5744af5492119fefdab088d76a166432
1,592
py
Python
prereise/gather/demanddata/eia/tests/test_get_eia_data.py
keforres/PreREISE
fcc111fdccc0626d3d34f1749a14035e47991043
[ "MIT" ]
15
2021-03-02T11:54:27.000Z
2022-02-16T13:01:40.000Z
prereise/gather/demanddata/eia/tests/test_get_eia_data.py
keforres/PreREISE
fcc111fdccc0626d3d34f1749a14035e47991043
[ "MIT" ]
90
2021-01-25T19:02:14.000Z
2022-03-31T20:27:28.000Z
prereise/gather/demanddata/eia/tests/test_get_eia_data.py
keforres/PreREISE
fcc111fdccc0626d3d34f1749a14035e47991043
[ "MIT" ]
15
2021-02-08T23:28:21.000Z
2022-01-24T21:59:14.000Z
import getpass import os from datetime import datetime import pandas as pd import pytest from prereise.gather.demanddata.eia import get_eia_data @pytest.mark.skip(reason="Need API key") def test_eia_download(): """Check data frame assembled from data download by API call from EIA. Test checks that the corre...
28.945455
79
0.667714
import getpass import os from datetime import datetime import pandas as pd import pytest from prereise.gather.demanddata.eia import get_eia_data @pytest.mark.skip(reason="Need API key") def test_eia_download(): print( "A API key is required for the API download. The key " "can be obtained by a u...
true
true
1c33c59268836c60403eb41bb948186d544dbbd4
21,742
py
Python
RUNTIME/DNN/python/from_boris/b_dnn.py
subramon/qlu
2fb8a2b3636dd11e2dfeae2a6477bd130316da47
[ "MIT" ]
null
null
null
RUNTIME/DNN/python/from_boris/b_dnn.py
subramon/qlu
2fb8a2b3636dd11e2dfeae2a6477bd130316da47
[ "MIT" ]
7
2020-07-29T16:48:25.000Z
2020-09-26T23:47:22.000Z
RUNTIME/DNN/python/from_boris/b_dnn.py
subramon/qlu
2fb8a2b3636dd11e2dfeae2a6477bd130316da47
[ "MIT" ]
1
2015-05-14T22:34:13.000Z
2015-05-14T22:34:13.000Z
import h5py import numpy as np import pandas as pd from PIL import Image from sklearn.datasets import make_blobs from sklearn.metrics import log_loss from sklearn.preprocessing import MinMaxScaler # ---------------------------------------------------------------------- # Preprocess data # ---------------------------...
33.76087
157
0.554641
import h5py import numpy as np import pandas as pd from PIL import Image from sklearn.datasets import make_blobs from sklearn.metrics import log_loss from sklearn.preprocessing import MinMaxScaler def get_data(debug=False): train_dataset = h5py.File('./data/train_cat_vs_noncat.h5', 'r') train_x_orig = np.ar...
true
true
1c33c6174cf391981bca1a303fe544f975041755
401
py
Python
Protinx_blog/Protinx_blog/wsgi.py
Protinx/Protinx_blog
9f787d483cadfb40821e5374b773f789130c9b5c
[ "MIT" ]
null
null
null
Protinx_blog/Protinx_blog/wsgi.py
Protinx/Protinx_blog
9f787d483cadfb40821e5374b773f789130c9b5c
[ "MIT" ]
null
null
null
Protinx_blog/Protinx_blog/wsgi.py
Protinx/Protinx_blog
9f787d483cadfb40821e5374b773f789130c9b5c
[ "MIT" ]
null
null
null
""" WSGI config for Protinx_blog project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Protinx_blog.settings') application = get_wsgi_application()
true
true
1c33c885d55663f1bbd4cc1fe9b47c5602907c1b
4,484
py
Python
deep3dmap/datasets/pipelines/test_time_aug.py
achao2013/DeepRecon
1c9b0480710212e1fe86ab75dcf0b30bd9f654e7
[ "Apache-2.0" ]
30
2022-02-05T18:35:27.000Z
2022-02-09T09:14:41.000Z
deep3dmap/datasets/pipelines/test_time_aug.py
achao2013/DeepRecon
1c9b0480710212e1fe86ab75dcf0b30bd9f654e7
[ "Apache-2.0" ]
null
null
null
deep3dmap/datasets/pipelines/test_time_aug.py
achao2013/DeepRecon
1c9b0480710212e1fe86ab75dcf0b30bd9f654e7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import warnings import deep3dmap from ..builder import PIPELINES from .compose import Compose @PIPELINES.register_module() class MultiScaleFlipAug: """Test-time augmentation with multiple scales and flipping. An example configuration is as followed: .. c...
36.754098
78
0.575825
import warnings import deep3dmap from ..builder import PIPELINES from .compose import Compose @PIPELINES.register_module() class MultiScaleFlipAug: def __init__(self, transforms, img_scale=None, scale_factor=None, flip=False, ...
true
true
1c33c9ee2203a2b57aac43d54040102017079a16
15,467
py
Python
google/ads/google_ads/v1/proto/common/criterion_category_availability_pb2.py
jiulongw/google-ads-python
6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e
[ "Apache-2.0" ]
1
2019-11-30T23:42:39.000Z
2019-11-30T23:42:39.000Z
google/ads/google_ads/v1/proto/common/criterion_category_availability_pb2.py
jiulongw/google-ads-python
6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v1/proto/common/criterion_category_availability_pb2.py
jiulongw/google-ads-python
6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e
[ "Apache-2.0" ]
1
2020-03-13T00:14:31.000Z
2020-03-13T00:14:31.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v1/proto/common/criterion_category_availability.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google...
59.488462
2,138
0.814444
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
1c33ca6b07df9401deb2a7acc1624f8489ef1b94
11,911
py
Python
dark/html.py
TaliVeith/dark-matter
1548a6e6fbfceb7c8b13556bbf4f7ce7d1ac18a0
[ "MIT" ]
10
2016-03-09T09:43:14.000Z
2021-04-03T21:46:12.000Z
dark/html.py
TaliVeith/dark-matter
1548a6e6fbfceb7c8b13556bbf4f7ce7d1ac18a0
[ "MIT" ]
332
2015-01-07T12:37:30.000Z
2022-01-20T15:48:11.000Z
dark/html.py
TaliVeith/dark-matter
1548a6e6fbfceb7c8b13556bbf4f7ce7d1ac18a0
[ "MIT" ]
4
2016-03-08T14:56:39.000Z
2021-01-27T08:11:27.000Z
from __future__ import print_function from IPython.display import HTML from six.moves.urllib.parse import quote from dark.fastq import FastqReads def NCBISequenceLinkURL(title, field=None, delim='|'): """ Given a sequence title, like "acc|GENBANK|AY516849.1|GENBANK|42768646 Homo sapiens", return...
34.725948
78
0.589455
from __future__ import print_function from IPython.display import HTML from six.moves.urllib.parse import quote from dark.fastq import FastqReads def NCBISequenceLinkURL(title, field=None, delim='|'): if field is None: ref = title else: try: ref = title.split(delim)[field] ...
true
true
1c33ca7586d1155bc27847a4ecd9f840470dc365
4,305
py
Python
api-ref/source/conf.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
3
2015-08-28T04:57:56.000Z
2017-03-27T10:59:56.000Z
api-ref/source/conf.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
21
2015-04-14T22:41:53.000Z
2019-02-20T09:30:10.000Z
api-ref/source/conf.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
12
2015-08-14T02:27:37.000Z
2020-12-31T10:09:21.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
32.862595
79
0.700116
import os import subprocess import sys on_rtd = os.environ.get('READTHEDOCS', None) == 'True' sys.path.insert(0, os.path.abspath('../../')) sys.path.insert(0, os.path.abspath('../')) sys.path.insert(0, os.path.abspath('./')) extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.autohttp.flask', 'sphinxco...
true
true
1c33cae5baaef18f55e1952e5b130f74b97e1f8f
510
py
Python
home/migrations/0073_auto_20201203_2319.py
SCCapstone/C-2319
4ab2b5b5511209dc4d7f9c25b6a4f70843287b77
[ "bzip2-1.0.6" ]
null
null
null
home/migrations/0073_auto_20201203_2319.py
SCCapstone/C-2319
4ab2b5b5511209dc4d7f9c25b6a4f70843287b77
[ "bzip2-1.0.6" ]
null
null
null
home/migrations/0073_auto_20201203_2319.py
SCCapstone/C-2319
4ab2b5b5511209dc4d7f9c25b6a4f70843287b77
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 3.0 on 2020-12-04 04:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0072_auto_20201203_2306'), ] operations = [ migrations.AlterField( model_name='item', name='condition', ...
26.842105
178
0.582353
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0072_auto_20201203_2306'), ] operations = [ migrations.AlterField( model_name='item', name='condition', field=models.IntegerField(choices=[(3, '...
true
true
1c33cafc1861c18e47a486e41801a7c693148de0
5,399
py
Python
arguments.py
zegerk/gym-micropolis
554bf41e9c4001140cdba90c5bbb3cc6bacf4c65
[ "MIT" ]
3
2020-07-13T08:44:36.000Z
2022-03-18T01:17:59.000Z
arguments.py
zegerk/gym-micropolis
554bf41e9c4001140cdba90c5bbb3cc6bacf4c65
[ "MIT" ]
null
null
null
arguments.py
zegerk/gym-micropolis
554bf41e9c4001140cdba90c5bbb3cc6bacf4c65
[ "MIT" ]
null
null
null
import argparse import torch def get_args(): parser = argparse.ArgumentParser(description='RL') parser.add_argument('--algo', default='a2c', help='algorithm to use: a2c | ppo | acktr') parser.add_argument('--lr', type=float, default=7e-4, help='learning rat...
53.99
89
0.588072
import argparse import torch def get_args(): parser = argparse.ArgumentParser(description='RL') parser.add_argument('--algo', default='a2c', help='algorithm to use: a2c | ppo | acktr') parser.add_argument('--lr', type=float, default=7e-4, help='learning rat...
true
true
1c33ccb5f496d7886eed6af7173903ed1970063c
4,641
py
Python
test/functional/wallet_importprunedfunds.py
pexacoin/core
0c6ad31264dde2cbe612d35202e7005a9dae0e1a
[ "MIT" ]
11
2019-07-08T01:45:34.000Z
2020-04-24T22:17:43.000Z
test/functional/wallet_importprunedfunds.py
pexacoin/core
0c6ad31264dde2cbe612d35202e7005a9dae0e1a
[ "MIT" ]
1
2019-10-19T14:52:31.000Z
2019-10-19T14:52:31.000Z
test/functional/wallet_importprunedfunds.py
pexacoin/core
0c6ad31264dde2cbe612d35202e7005a9dae0e1a
[ "MIT" ]
4
2019-07-08T01:45:51.000Z
2021-12-17T18:20:26.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The Pexa Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importprunedfunds and removeprunedfunds RPC...
40.008621
117
0.660203
from test_framework.test_framework import PexaTestFramework from test_framework.util import * class ImportPrunedFundsTest(PexaTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 def run_test(self): self.log.info("Mining blocks...") self.n...
true
true
1c33cd7567a86a3efce192828b9c73c1ad9e3605
1,008
py
Python
src/kid/core/kglobals.py
KidKaboom/Kid-Maya-2022
0daec301a63438d681cc4c3a5df6d4efdc70daef
[ "MIT" ]
null
null
null
src/kid/core/kglobals.py
KidKaboom/Kid-Maya-2022
0daec301a63438d681cc4c3a5df6d4efdc70daef
[ "MIT" ]
null
null
null
src/kid/core/kglobals.py
KidKaboom/Kid-Maya-2022
0daec301a63438d681cc4c3a5df6d4efdc70daef
[ "MIT" ]
null
null
null
# :coding: utf-8 # Python Modules import os import sys # Platforms PLATFORM = sys.platform WINDOWS = "win32" OSX = "darwin" LINUX = "linux" # Paths GLOBALS_PATH = os.path.abspath(__file__) SCRIPTS_PATH = os.path.dirname(os.path.dirname(os.path.dirname(GLOBALS_PATH))) PROJECT_PATH = os.path.dirname(SCRIPTS_PATH) PLU...
24.585366
78
0.738095
import os import sys PLATFORM = sys.platform WINDOWS = "win32" OSX = "darwin" LINUX = "linux" GLOBALS_PATH = os.path.abspath(__file__) SCRIPTS_PATH = os.path.dirname(os.path.dirname(os.path.dirname(GLOBALS_PATH))) PROJECT_PATH = os.path.dirname(SCRIPTS_PATH) PLUGINS_PATH = os.path.join(PROJECT_PATH, "plug-ins") LIB...
true
true
1c33ce100945493873a1dec3a0ea0ac4d0857ad4
919
py
Python
TestingBisection.py
abecker99/Interpolation
0527e6296c98b1c7f6cf512e614090f61754705d
[ "MIT" ]
null
null
null
TestingBisection.py
abecker99/Interpolation
0527e6296c98b1c7f6cf512e614090f61754705d
[ "MIT" ]
null
null
null
TestingBisection.py
abecker99/Interpolation
0527e6296c98b1c7f6cf512e614090f61754705d
[ "MIT" ]
null
null
null
import numpy as np def find_sign_change(f, step, a, b): x = a pairs = [] while (x + step < b): if (f(x + step)/f(x) < 0): pairs.append([x, x+step]) x += step return pairs def bisect(f, pairs, tolerance): zeros = [] for pair in pairs: midpoint = (pair[1] - p...
24.837838
54
0.517954
import numpy as np def find_sign_change(f, step, a, b): x = a pairs = [] while (x + step < b): if (f(x + step)/f(x) < 0): pairs.append([x, x+step]) x += step return pairs def bisect(f, pairs, tolerance): zeros = [] for pair in pairs: midpoint = (pair[1] - p...
true
true
1c33ce82e6d42b041f4b9a88731db0d99ab1c3ab
141
py
Python
setup.py
hepteract/nova
cf0e866aa5c0f59a3528de9d71671c567219c2ee
[ "MIT" ]
null
null
null
setup.py
hepteract/nova
cf0e866aa5c0f59a3528de9d71671c567219c2ee
[ "MIT" ]
null
null
null
setup.py
hepteract/nova
cf0e866aa5c0f59a3528de9d71671c567219c2ee
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name = "nova", version = "0.1", packages = find_packages() )
17.625
43
0.574468
from setuptools import setup, find_packages setup( name = "nova", version = "0.1", packages = find_packages() )
true
true
1c33cebd405dc8f841b48127497e7256268141ab
1,196
py
Python
tests/io/test_unique_path.py
safurrier/data_science_utils
842b025ea3197e8a9946401257b2fa22ef1bf82d
[ "MIT" ]
null
null
null
tests/io/test_unique_path.py
safurrier/data_science_utils
842b025ea3197e8a9946401257b2fa22ef1bf82d
[ "MIT" ]
null
null
null
tests/io/test_unique_path.py
safurrier/data_science_utils
842b025ea3197e8a9946401257b2fa22ef1bf82d
[ "MIT" ]
1
2020-03-30T20:59:04.000Z
2020-03-30T20:59:04.000Z
# %% import os import shutil import pytest import pathlib from data_science_toolbox.io.unique_path import unique_path UNIQUE_FPATH_TEST_CASES = [ ('test_file_{:02d}.txt', 'tests/io/unique_path_files', ['test_file_00.txt', 'test_file_01.txt', ], 'tests/io/unique_path_files/test_file_02.t...
28.47619
89
0.683946
import os import shutil import pytest import pathlib from data_science_toolbox.io.unique_path import unique_path UNIQUE_FPATH_TEST_CASES = [ ('test_file_{:02d}.txt', 'tests/io/unique_path_files', ['test_file_00.txt', 'test_file_01.txt', ], 'tests/io/unique_path_files/test_file_02.txt' ...
true
true
1c33cf617a1e7101deeca5ccbf7535fbaef869c7
288
py
Python
st_marys/items.py
nbanion/blah
cf14d33d6f6222f4ba8e7582f11150a887508fa2
[ "MIT" ]
null
null
null
st_marys/items.py
nbanion/blah
cf14d33d6f6222f4ba8e7582f11150a887508fa2
[ "MIT" ]
8
2019-10-12T16:38:21.000Z
2019-10-21T03:20:56.000Z
st_marys/items.py
nbanion/blah
cf14d33d6f6222f4ba8e7582f11150a887508fa2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class StMarysItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
19.2
53
0.6875
import scrapy class StMarysItem(scrapy.Item): pass
true
true
1c33d09dea733d064f0ffa7d8da13c4cbc5f6edc
7,728
py
Python
marvel_world/migrations/0001_initial.py
xiaoranppp/si664-final
f5545c04452fd674ddf1d078444e79ea58385e7e
[ "MIT" ]
null
null
null
marvel_world/migrations/0001_initial.py
xiaoranppp/si664-final
f5545c04452fd674ddf1d078444e79ea58385e7e
[ "MIT" ]
1
2018-11-25T21:07:37.000Z
2018-11-25T21:07:37.000Z
marvel_world/migrations/0001_initial.py
xiaoranppp/si664-final
f5545c04452fd674ddf1d078444e79ea58385e7e
[ "MIT" ]
1
2018-12-21T12:06:03.000Z
2018-12-21T12:06:03.000Z
# Generated by Django 2.1.4 on 2018-12-12 07:53 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Alignment', fields=[ ('alignment_id', model...
39.835052
92
0.501682
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Alignment', fields=[ ('alignment_id', models.AutoField(primary_key=True, serialize=False)),...
true
true
1c33d1014073d8dbc778a801936790dfc8937be3
3,629
py
Python
google/ads/googleads/v7/services/services/location_view_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
285
2018-10-05T16:47:58.000Z
2022-03-31T00:58:39.000Z
google/ads/googleads/v7/services/services/location_view_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
425
2018-09-10T13:32:41.000Z
2022-03-31T14:50:05.000Z
google/ads/googleads/v7/services/services/location_view_service/transports/base.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
369
2018-11-28T07:01:00.000Z
2022-03-28T09:53:22.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.930693
78
0.675117
import abc import typing import pkg_resources from google import auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials from google.ads.googleads.v7.resources.types import location_view from google.ads.googleads.v7.services.types import location_v...
true
true
1c33d19db4bdd04b747c13b4d844b0ad5ee8ff8b
66,357
py
Python
python/paddle/tensor/manipulation.py
wangxinxin08/Paddle
b9ab838baa3d9cecddc4c2463a7e35038e70ba42
[ "Apache-2.0" ]
2
2021-05-16T08:33:38.000Z
2022-03-14T05:14:14.000Z
python/paddle/tensor/manipulation.py
BMBH/Paddle
1b0c5ef264b52a9d75f971216618ebbbbc7e5931
[ "Apache-2.0" ]
null
null
null
python/paddle/tensor/manipulation.py
BMBH/Paddle
1b0c5ef264b52a9d75f971216618ebbbbc7e5931
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
37.939966
457
0.559308
from __future__ import print_function from ..fluid.layers import core from ..fluid.layer_helper import LayerHelper from ..fluid.framework import Variable, OpProtoHolder, in_dygraph_mode, convert_np_dtype_to_dtype_, device_guard, dygraph_only from ..fluid.data_feeder import convert_dtype, check_variable_and_dtype, che...
true
true
1c33d271d23f367d670aae3f8ea6cabf2bb8701c
563
py
Python
setup.py
fuenfundachtzig/pylhe
07c994d68cef3c4b66792e7668d82a4f274bcb68
[ "Apache-2.0" ]
null
null
null
setup.py
fuenfundachtzig/pylhe
07c994d68cef3c4b66792e7668d82a4f274bcb68
[ "Apache-2.0" ]
null
null
null
setup.py
fuenfundachtzig/pylhe
07c994d68cef3c4b66792e7668d82a4f274bcb68
[ "Apache-2.0" ]
null
null
null
from setuptools import setup extras_require = { "test": ["pytest", "pytest-cov>=2.5.1", "scikit-hep-testdata>=0.3.1", "pydocstyle"], } extras_require["lint"] = sorted(set(["flake8", "black;python_version>='3.6'"])) extras_require["develop"] = sorted( set( extras_require["test"] + ["pre-commit",...
29.631579
88
0.651865
from setuptools import setup extras_require = { "test": ["pytest", "pytest-cov>=2.5.1", "scikit-hep-testdata>=0.3.1", "pydocstyle"], } extras_require["lint"] = sorted(set(["flake8", "black;python_version>='3.6'"])) extras_require["develop"] = sorted( set( extras_require["test"] + ["pre-commit",...
true
true
1c33d2f27cdf6e35e3ed2d176f1d978caa28ecf1
1,474
py
Python
dfc_pkg/commands/nginx_server/install_nginx.py
drc288/dfc
91a64a3adb1ac83fcc26d3978264fe7837fb588c
[ "MIT" ]
1
2020-08-24T17:50:32.000Z
2020-08-24T17:50:32.000Z
dfc_pkg/commands/nginx_server/install_nginx.py
drc288/dfc
91a64a3adb1ac83fcc26d3978264fe7837fb588c
[ "MIT" ]
7
2020-03-06T15:52:30.000Z
2020-03-13T00:02:13.000Z
dfc_pkg/commands/nginx_server/install_nginx.py
drc288/dfc
91a64a3adb1ac83fcc26d3978264fe7837fb588c
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from colored import stylize, fg, attr import paramiko import socket import typer def install_nginx(server): """ This function install NGINX server :param ip: Ip address :param user: User to connect :param server: the connection :return: void """ try: # Updati...
39.837838
87
0.632293
from colored import stylize, fg, attr import paramiko import socket import typer def install_nginx(server): try: typer.echo(stylize("The server is being updated", fg("blue"))) server.run('sudo sed -i "s/^mesg n$/tty -s && mesg n/g" /root/.profile') server.run("sudo apt-get install ...
true
true
1c33d31a67558bb09a580f78c0ed07b8cc869caf
7,267
py
Python
nova/cells/utils.py
nelsnelson/nova
826fe1cc6af2df291d5aaafdc5d498d626475d19
[ "Apache-2.0" ]
null
null
null
nova/cells/utils.py
nelsnelson/nova
826fe1cc6af2df291d5aaafdc5d498d626475d19
[ "Apache-2.0" ]
null
null
null
nova/cells/utils.py
nelsnelson/nova
826fe1cc6af2df291d5aaafdc5d498d626475d19
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 Rackspace Hosting # 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 req...
33.182648
79
0.662447
import random import sys from oslo_config import cfg import six from nova import objects from nova.objects import base as obj_base PATH_CELL_SEP = '!' # an instance save. There are no illegal chars in a cell name so using the # meaningful PATH_CELL_SEP in an invalid way will need to suffice. BLOCK_SYNC_FLAG = '!!...
true
true
1c33d3e19a8e38b624c75bc8d646ae8fb563783d
154
py
Python
hdx_exports/mailer.py
hotosm/hot-exports-two
d60530445e89b2a46bd55ea3b7c2e72409b0f493
[ "BSD-3-Clause" ]
95
2017-09-29T13:20:38.000Z
2022-03-14T06:43:47.000Z
hdx_exports/mailer.py
hotosm/hot-exports-two
d60530445e89b2a46bd55ea3b7c2e72409b0f493
[ "BSD-3-Clause" ]
229
2015-07-29T08:50:27.000Z
2017-09-21T18:05:56.000Z
hdx_exports/mailer.py
hotosm/hot-exports-two
d60530445e89b2a46bd55ea3b7c2e72409b0f493
[ "BSD-3-Clause" ]
30
2017-10-06T23:53:48.000Z
2022-03-10T06:17:07.000Z
# send to a predefined email address like a Google Group # on each successful scheduled export run. # Or report failures. class Mailer(object): pass
22
56
0.753247
class Mailer(object): pass
true
true
1c33d3f65fdbd4a7fed5e6155008227e4c2bc59c
896
py
Python
TestAgentMaps.py
jdong-sw/rbe-swarm-intelligence
7c9cae040f80c7f7f41c81b2d379d214dd0b2f30
[ "MIT" ]
null
null
null
TestAgentMaps.py
jdong-sw/rbe-swarm-intelligence
7c9cae040f80c7f7f41c81b2d379d214dd0b2f30
[ "MIT" ]
null
null
null
TestAgentMaps.py
jdong-sw/rbe-swarm-intelligence
7c9cae040f80c7f7f41c81b2d379d214dd0b2f30
[ "MIT" ]
null
null
null
from swarm_mapping.world import World import cv2 import numpy as np # Display size display_width = 800 display_height = 800 world = World(100, 100, 50, space_fill=0.4, hazard_fill=0.2, fast=False, sensor_range=3, marker_size=3) step = 0 world.step() while True: frame = world.render() ...
33.185185
96
0.677455
from swarm_mapping.world import World import cv2 import numpy as np display_width = 800 display_height = 800 world = World(100, 100, 50, space_fill=0.4, hazard_fill=0.2, fast=False, sensor_range=3, marker_size=3) step = 0 world.step() while True: frame = world.render() frame = cv2.r...
true
true
1c33d405658498b7efd16c4ea00bc0852497d415
10,303
py
Python
test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py
Container-Projects/ansible-provider-docs
100b695b0b0c4d8d08af362069557ffc735d0d7e
[ "PSF-2.0", "BSD-2-Clause", "MIT" ]
37
2017-08-15T15:02:43.000Z
2021-07-23T03:44:31.000Z
test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py
Container-Projects/ansible-provider-docs
100b695b0b0c4d8d08af362069557ffc735d0d7e
[ "PSF-2.0", "BSD-2-Clause", "MIT" ]
12
2018-01-10T05:25:25.000Z
2021-11-28T06:55:48.000Z
test/units/modules/network/f5/test_bigip_monitor_tcp_half_open.py
Container-Projects/ansible-provider-docs
100b695b0b0c4d8d08af362069557ffc735d0d7e
[ "PSF-2.0", "BSD-2-Clause", "MIT" ]
49
2017-08-15T09:52:13.000Z
2022-03-21T17:11:54.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys import pytest from nose.plugins.skip imp...
31.897833
91
0.623217
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import sys import pytest from nose.plugins.skip import SkipTest if sys.version_info < (2, 7): raise SkipTest("F5 Ansible modules require Python >= 2.7") from ansible.compat.tests import unittest from an...
true
true
1c33d43871b7029797fb7d3e58483a66e5a4d9b0
15,446
py
Python
haproxy.py
Pigueiras/collectd-haproxy
c00cf052834b11b742830a1d96865a09877ee14c
[ "MIT" ]
null
null
null
haproxy.py
Pigueiras/collectd-haproxy
c00cf052834b11b742830a1d96865a09877ee14c
[ "MIT" ]
null
null
null
haproxy.py
Pigueiras/collectd-haproxy
c00cf052834b11b742830a1d96865a09877ee14c
[ "MIT" ]
null
null
null
# haproxy-collectd-plugin - haproxy.py # # Author: Michael Leinartas # Description: This is a collectd plugin which runs under the Python plugin to # collect metrics from haproxy. # Plugin structure and logging func taken from # https://github.com/phrawzty/rabbitmq-collectd-plugin # # Modified by "Warren Turkal" <wt@si...
35.345538
120
0.614981
import cStringIO as StringIO import socket import csv import pprint import collectd PLUGIN_NAME = 'haproxy' RECV_SIZE = 1024 DEFAULT_METRICS = { 'ConnRate': ('connection_rate', 'gauge'), 'CumReq': ('requests', 'derive'), 'Idle_pct': ('idle_pct', 'gauge'), 'scur': ('session_current', 'gauge'), 'S...
true
true
1c33d6777841b1659189493027fd375b3ea627d8
2,601
py
Python
alipay/aop/api/domain/AlipayMarketingShowwindowContentSyncModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayMarketingShowwindowContentSyncModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayMarketingShowwindowContentSyncModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IotDeviceInfo import IotDeviceInfo class AlipayMarketingShowwindowContentSyncModel(object): def __init__(self): self._device_info_list = None self._event_tag ...
31.337349
84
0.594002
import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.IotDeviceInfo import IotDeviceInfo class AlipayMarketingShowwindowContentSyncModel(object): def __init__(self): self._device_info_list = None self._event_tag = None self._source = None @prope...
true
true
1c33d6f521723588d60178a1a57730551916112c
6,475
py
Python
pyod/test/test_xgbod.py
BillyGareth/pyod
4ad1ab8cd88382fe15c237e8db8ad8e3a9302eaf
[ "BSD-2-Clause" ]
2
2017-10-07T21:41:48.000Z
2017-10-08T02:51:12.000Z
pyod/test/test_xgbod.py
BillyGareth/pyod
4ad1ab8cd88382fe15c237e8db8ad8e3a9302eaf
[ "BSD-2-Clause" ]
4
2021-11-01T18:40:00.000Z
2022-03-05T19:26:48.000Z
pyod/test/test_xgbod.py
Pandinosaurus/pyod
7aeefcf65ceb0196434b7adb4fd706bfb404e4e2
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import os import sys from os import path import unittest # noinspection PyProtectedMember from numpy.testing import assert_allclose from numpy.testing import assert_array_less from numpy.testing import assert_equal from num...
37.645349
81
0.638456
from __future__ import division from __future__ import print_function import os import sys from os import path import unittest from numpy.testing import assert_allclose from numpy.testing import assert_array_less from numpy.testing import assert_equal from numpy.testing import assert_raises from sklearn.metrics imp...
true
true
1c33d7614c66eed168c8402bfab6770a52275af7
295
py
Python
zapcli/exceptions.py
kiwi-bop/zap-cli
55d3341622074f65af287fe07d43196a55c515f1
[ "MIT" ]
196
2015-06-22T06:23:28.000Z
2022-03-23T08:54:10.000Z
zapcli/exceptions.py
kiwi-bop/zap-cli
55d3341622074f65af287fe07d43196a55c515f1
[ "MIT" ]
89
2015-12-02T17:07:57.000Z
2022-02-03T10:20:50.000Z
zapcli/exceptions.py
kiwi-bop/zap-cli
55d3341622074f65af287fe07d43196a55c515f1
[ "MIT" ]
65
2015-12-14T16:27:59.000Z
2022-02-21T22:59:52.000Z
""" Custom exception classes for the ZAP CLI. .. moduleauthor:: Daniel Grunwell (grunny) """ class ZAPError(Exception): """ Generic exception for ZAP CLI. """ def __init__(self, message, extra=None): super(ZAPError, self).__init__(message) self.extra = extra
18.4375
47
0.644068
class ZAPError(Exception): def __init__(self, message, extra=None): super(ZAPError, self).__init__(message) self.extra = extra
true
true
1c33d78e37721057e2d7e4ee643542dccc9ac883
24,294
py
Python
lib/googlecloudsdk/third_party/apis/redis/v1/redis_v1_client.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/third_party/apis/redis/v1/redis_v1_client.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/apis/redis/v1/redis_v1_client.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
"""Generated client library for redis version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from __future__ import absolute_import from apitools.base.py import base_api from googlecloudsdk.third_party.apis.redis.v1 import redis_v1_messages as messages class RedisV1(base_api.BaseApiClie...
44.576147
615
0.705359
from __future__ import absolute_import from apitools.base.py import base_api from googlecloudsdk.third_party.apis.redis.v1 import redis_v1_messages as messages class RedisV1(base_api.BaseApiClient): MESSAGES_MODULE = messages BASE_URL = 'https://redis.googleapis.com/' MTLS_BASE_URL = 'https://redis.mtls.goog...
true
true
1c33d8356bf4ee30d7d701511d609385cbbbe06c
11,309
py
Python
tzlink/datasets/share_clef/subsets.py
lfurrer/tzlink
0fd09a4c48d73cbd51e8f1628628812a74f209a7
[ "BSD-3-Clause" ]
4
2019-11-08T10:59:08.000Z
2020-03-22T21:47:50.000Z
tzlink/datasets/share_clef/subsets.py
lfurrer/tzlink
0fd09a4c48d73cbd51e8f1628628812a74f209a7
[ "BSD-3-Clause" ]
null
null
null
tzlink/datasets/share_clef/subsets.py
lfurrer/tzlink
0fd09a4c48d73cbd51e8f1628628812a74f209a7
[ "BSD-3-Clause" ]
1
2018-11-08T15:32:12.000Z
2018-11-08T15:32:12.000Z
#!/usr/bin/env python3 # coding: utf8 # Author: Lenz Furrer, 2018 ''' Filename listings for train/dev/test and different folds. ''' import itertools as it def docs(subset): ''' Get document IDs for the given subset. ''' subdir = 'test' if subset == 'test' else 'train' return subdir, _docs(sub...
26.609412
69
0.855867
import itertools as it def docs(subset): subdir = 'test' if subset == 'test' else 'train' return subdir, _docs(subset) def _docs(subset): if subset == 'test': return _test if subset == 'dev': return _dev0 if subset == 'train': exclude = set(_dev0) id...
true
true
1c33d8788746e8e2a77ab79b938d957add5907e2
1,555
py
Python
src/doc/en/installation/conf.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/doc/en/installation/conf.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/doc/en/installation/conf.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
# Sage Installation Guide documentation build configuration file, created by # sphinx-quickstart on Fri Aug 22 15:04:04 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (modul...
37.926829
82
0.758842
# that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default; values that are commented out # serve to show the default. from sage.docs.conf import release from sage.docs.conf import * # NOQA # Add any paths that contain custom static files (such as s...
true
true
1c33da1e2a9e8bdfae24b5cf596e950332e1ca46
1,702
py
Python
interactionviz/cli/viewer/__main__.py
rosshemsley/interactionviz
032eef47667e0748f14cd27f675cbff1a0a1bf37
[ "Apache-2.0" ]
3
2020-09-25T16:13:25.000Z
2021-08-02T01:55:31.000Z
interactionviz/cli/viewer/__main__.py
rosshemsley/interactionviz
032eef47667e0748f14cd27f675cbff1a0a1bf37
[ "Apache-2.0" ]
null
null
null
interactionviz/cli/viewer/__main__.py
rosshemsley/interactionviz
032eef47667e0748f14cd27f675cbff1a0a1bf37
[ "Apache-2.0" ]
null
null
null
import os import pathlib import click from interactionviz.maps import load_map_xml from interactionviz.viewers import ArcadeViewer, WebViewer from interactionviz.tracks import Tracks, load_tracks_files @click.command() @click.option( "--root-dir", required=True, type=click.Path(exists=True, dir_okay=True...
28.847458
82
0.70329
import os import pathlib import click from interactionviz.maps import load_map_xml from interactionviz.viewers import ArcadeViewer, WebViewer from interactionviz.tracks import Tracks, load_tracks_files @click.command() @click.option( "--root-dir", required=True, type=click.Path(exists=True, dir_okay=True...
true
true
1c33da2275a63031e8cbd04fb6ca5bcda2e1d791
33,432
py
Python
pyzoo/zoo/tfpark/tf_optimizer.py
Asjidkalam/analytics-zoo
0afa8437abc3e5cf5289d2cfde68b237a45f9d0d
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/tfpark/tf_optimizer.py
Asjidkalam/analytics-zoo
0afa8437abc3e5cf5289d2cfde68b237a45f9d0d
[ "Apache-2.0" ]
1
2021-01-20T15:41:01.000Z
2021-01-20T15:41:01.000Z
pyzoo/zoo/tfpark/tf_optimizer.py
Asjidkalam/analytics-zoo
0afa8437abc3e5cf5289d2cfde68b237a45f9d0d
[ "Apache-2.0" ]
1
2020-12-21T11:48:49.000Z
2020-12-21T11:48:49.000Z
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
43.53125
100
0.604451
import json import logging import os import sys import tempfile from bigdl.nn.criterion import Criterion from bigdl.nn.layer import Layer from bigdl.optim.optimizer import MaxEpoch, EveryEpoch from bigdl.util.common import to_list, JavaValue from zoo.common.utils import callZooFunc from zoo.pipeline.api.keras.engine...
true
true
1c33da407ad99283d1a971061d91d579fea47eb8
1,831
py
Python
src/101_createIndex.py
hp-db/dev
de0924f791534f554120c6eb74f0409b5b3dc39a
[ "Apache-2.0" ]
null
null
null
src/101_createIndex.py
hp-db/dev
de0924f791534f554120c6eb74f0409b5b3dc39a
[ "Apache-2.0" ]
null
null
null
src/101_createIndex.py
hp-db/dev
de0924f791534f554120c6eb74f0409b5b3dc39a
[ "Apache-2.0" ]
null
null
null
import pandas as pd from rdflib import URIRef, BNode, Literal, Graph from rdflib.namespace import RDF, RDFS, FOAF, XSD from rdflib import Namespace import numpy as np import math import sys import argparse import json import urllib.parse path = "../static/data/curation_old.json" json_open = open(path, 'r') df = json....
24.413333
154
0.602403
import pandas as pd from rdflib import URIRef, BNode, Literal, Graph from rdflib.namespace import RDF, RDFS, FOAF, XSD from rdflib import Namespace import numpy as np import math import sys import argparse import json import urllib.parse path = "../static/data/curation_old.json" json_open = open(path, 'r') df = json....
true
true
1c33dae046d778c2acefa8efab3c4ae7565e1bc3
348
py
Python
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
8
2016-01-19T15:59:36.000Z
2018-04-25T09:00:57.000Z
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
null
null
null
spark_work.py
nszceta/spark-python-celery-demo
c5b03be4bb96699f8e41aa8a42fecd4c25c76331
[ "MIT" ]
null
null
null
import sys from pyspark import SparkContext import json print('spark got python path -> ' + str(sys.executable)) logfile = sys.argv[1] sc = SparkContext() logdata = sc.textFile(logfile).cache() a_count = logdata.filter(lambda s: 'a' in s).count() b_count = logdata.filter(lambda s: 'b' in s).count() print(json.dumps({'a...
31.636364
56
0.70977
import sys from pyspark import SparkContext import json print('spark got python path -> ' + str(sys.executable)) logfile = sys.argv[1] sc = SparkContext() logdata = sc.textFile(logfile).cache() a_count = logdata.filter(lambda s: 'a' in s).count() b_count = logdata.filter(lambda s: 'b' in s).count() print(json.dumps({'a...
true
true
1c33dcbe1bba058258275b69fcc8e6ef20067d3a
18,583
py
Python
pypowervm/tests/test_util.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
24
2015-12-02T19:49:45.000Z
2021-11-17T11:43:51.000Z
pypowervm/tests/test_util.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
18
2017-03-01T05:54:25.000Z
2022-03-14T17:32:47.000Z
pypowervm/tests/test_util.py
stephenfin/pypowervm
68f2b586b4f17489f379534ab52fc56a524b6da5
[ "Apache-2.0" ]
17
2016-02-10T22:53:04.000Z
2021-11-10T09:47:10.000Z
# Copyright 2014, 2016 IBM Corp. # # 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...
46.111663
79
0.617715
import mock import six import unittest from pypowervm import const from pypowervm import util if six.PY2: import __builtin__ as builtins elif six.PY3: import builtins dummyuuid1 = "abcdef01-2345-2345-2345-67890abcdef0" dummyuuid2 = "67890abc-5432-5432-5432-def0abcdef01" class TestUtil(unittest.TestCase):...
true
true
1c33dcfd0c06b3215bcbfd696803bb148de2d0f7
1,780
py
Python
src/logChunk/allRunn.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
null
null
null
src/logChunk/allRunn.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
3
2020-11-12T14:42:22.000Z
2021-01-13T22:30:23.000Z
src/logChunk/allRunn.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
2
2020-11-11T22:27:28.000Z
2021-01-13T21:07:14.000Z
#get the path of directory in which project directories are there. Assume dirsPath #rootdir ='C:\Users\Yagnik\PycharmProjects\Top_Project' import os import sys import ghProc from logChunk import logChunk #print os.listdir(rootdir) # for subdir, dirs, files in os.walk(rootdir): # print dirs def main(): prin...
30.689655
197
0.723034
import os import sys import ghProc from logChunk import logChunk def main(): print("Utility to BULK process github logs") if len(sys.argv) < 2: print("!!! Usage: python allRun.py top_project directory") sys.exit() if not os.path.isdir("../Results"): os.mkdir("../Results") fPtrChangeSu...
true
true
1c33dd43e5aac4729f3611201fbd0862be806dae
625
py
Python
answer.py
ZYSzys/Answer-Assistant
efff7d2949d12f27b7d99cfa0e35f32757cbc8ad
[ "MIT" ]
2
2018-04-17T09:42:41.000Z
2018-04-17T09:57:35.000Z
answer.py
ZYSzys/Answer-Assistant
efff7d2949d12f27b7d99cfa0e35f32757cbc8ad
[ "MIT" ]
null
null
null
answer.py
ZYSzys/Answer-Assistant
efff7d2949d12f27b7d99cfa0e35f32757cbc8ad
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import wda import webbrowser import urllib.parse from PIL import Image from configparser import ConfigParser from ocr import ocr_img def search(question): webbrowser.open('https://baidu.com/s?wd='+urllib.parse.quote(question)) if __name__ == '__main__': c = wda.Client() config = ConfigPa...
16.891892
72
0.688
import wda import webbrowser import urllib.parse from PIL import Image from configparser import ConfigParser from ocr import ocr_img def search(question): webbrowser.open('https://baidu.com/s?wd='+urllib.parse.quote(question)) if __name__ == '__main__': c = wda.Client() config = ConfigParser() config.read('./...
true
true
1c33ddbb2adf6a132487ca1c86cebd1d85abf5e7
16,094
py
Python
crabmeyerpy/ssc.py
tunbehaun273/crabmeyerpy
d36fe3ed9b8591bb92bd9915996dd21d79fc4dad
[ "BSD-3-Clause" ]
null
null
null
crabmeyerpy/ssc.py
tunbehaun273/crabmeyerpy
d36fe3ed9b8591bb92bd9915996dd21d79fc4dad
[ "BSD-3-Clause" ]
null
null
null
crabmeyerpy/ssc.py
tunbehaun273/crabmeyerpy
d36fe3ed9b8591bb92bd9915996dd21d79fc4dad
[ "BSD-3-Clause" ]
2
2021-06-24T10:53:48.000Z
2021-11-03T13:25:15.000Z
import yaml from scipy.special import kv # Bessel function from scipy.integrate import simps from scipy.interpolate import interp1d # imports to speed up integrations: from numpy import meshgrid, linspace, ones, zeros from numpy import log, exp, pi, sqrt, power, tan # import functions for photon fields from .photonf...
32.64503
118
0.555859
import yaml from scipy.special import kv from scipy.integrate import simps from scipy.interpolate import interp1d from numpy import meshgrid, linspace, ones, zeros from numpy import log, exp, pi, sqrt, power, tan from .photonfields import * from astropy import units as u from astropy import constants as c from astro...
true
true
1c33ddc36f8de434473a62f0e05259e807d0838e
743
py
Python
bodyhands/utils/extend_utils_boxes.py
cvlab-stonybrook/BodyHands
dcfe470f6fd31a048d4d17d4ae9a2a524538b380
[ "MIT" ]
1
2022-03-06T08:18:33.000Z
2022-03-06T08:18:33.000Z
bodyhands/utils/extend_utils_boxes.py
cvlab-stonybrook/BodyHands
dcfe470f6fd31a048d4d17d4ae9a2a524538b380
[ "MIT" ]
null
null
null
bodyhands/utils/extend_utils_boxes.py
cvlab-stonybrook/BodyHands
dcfe470f6fd31a048d4d17d4ae9a2a524538b380
[ "MIT" ]
null
null
null
import torch from detectron2.structures import Boxes def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: boxes1, boxes2 = boxes1.tensor, boxes2.tensor width_height = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) - torch.max( boxes1[:, None, :2], boxes2[:, :2] ) # [N,M,2] ...
30.958333
88
0.648721
import torch from detectron2.structures import Boxes def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: boxes1, boxes2 = boxes1.tensor, boxes2.tensor width_height = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) - torch.max( boxes1[:, None, :2], boxes2[:, :2] ) width_hei...
true
true
1c33ddd6685c5cb98b0629eb5a2a360c0975d34b
12,044
py
Python
pyscf/lo/orth.py
maxscheurer/pyscf
162c37942289c0aec70e70ba1ea98ade3ec34da5
[ "Apache-2.0" ]
null
null
null
pyscf/lo/orth.py
maxscheurer/pyscf
162c37942289c0aec70e70ba1ea98ade3ec34da5
[ "Apache-2.0" ]
null
null
null
pyscf/lo/orth.py
maxscheurer/pyscf
162c37942289c0aec70e70ba1ea98ade3ec34da5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
36.607903
103
0.583112
from functools import reduce import numpy import scipy.linalg from pyscf.lib import param from pyscf.lib import logger from pyscf import gto from pyscf import __config__ REF_BASIS = getattr(__config__, 'lo_orth_pre_orth_ao_method', 'ANO') ORTH_METHOD = getattr(__config__, 'lo_orth_orth_ao_method', 'meta_lowdin') PROJ...
true
true
1c33de508aa72facefdf67a50a6c86af3d232f08
17,427
py
Python
ttlock2mqtt/src/ttlock_adapter.py
tonyldo/tonyldo-hassio-addons
3005df8cd58d178bc0452d944d3498820eeacee9
[ "Apache-2.0" ]
6
2020-07-30T08:50:20.000Z
2022-03-01T02:56:53.000Z
ttlock2mqtt/src/ttlock_adapter.py
tonyldo/tonyldo-hassio-addons
3005df8cd58d178bc0452d944d3498820eeacee9
[ "Apache-2.0" ]
10
2020-07-28T17:28:52.000Z
2022-01-10T20:28:16.000Z
ttlock2mqtt/src/ttlock_adapter.py
tonyldo/tonyldo-hassio-addons
3005df8cd58d178bc0452d944d3498820eeacee9
[ "Apache-2.0" ]
9
2020-07-28T17:19:42.000Z
2021-12-18T05:18:56.000Z
import paho.mqtt.client as mqtt import time import threading import concurrent.futures import getopt import sys import logging from ttlockwrapper import TTLock, TTlockAPIError, constants class TTLock2MQTTClient(mqtt.Client): def __init__(self, ttlock, broker, port, broker_user, broker_pass, keepalive): su...
43.5675
321
0.643369
import paho.mqtt.client as mqtt import time import threading import concurrent.futures import getopt import sys import logging from ttlockwrapper import TTLock, TTlockAPIError, constants class TTLock2MQTTClient(mqtt.Client): def __init__(self, ttlock, broker, port, broker_user, broker_pass, keepalive): su...
true
true
1c33e0a5b5b73fab447359be446c4ac32de31484
15,297
py
Python
src/m2_more_sequences.py
kellyzc/16-SequencesAndMutation
92a73f059c85f677ffe497ccef29f613f7172eea
[ "MIT" ]
null
null
null
src/m2_more_sequences.py
kellyzc/16-SequencesAndMutation
92a73f059c85f677ffe497ccef29f613f7172eea
[ "MIT" ]
null
null
null
src/m2_more_sequences.py
kellyzc/16-SequencesAndMutation
92a73f059c85f677ffe497ccef29f613f7172eea
[ "MIT" ]
null
null
null
""" This module lets you practice various patterns for ITERATING through SEQUENCES, including selections from: -- Beginning to end -- Other ranges (e.g., backwards and every-3rd-item) -- The COUNT/SUM/etc pattern -- The FIND pattern (via LINEAR SEARCH) -- The MAX/MIN pattern -- Looking two places in the seq...
37.218978
77
0.541217
def main(): run_test_shortest_string() run_test_index_of_largest_number() run_test_number_of_stutters() run_test_is_palindrome() run_test_count_same() def run_test_shortest_string(): print() print('--------------------------------------------------') print('Testing the shortest_str...
true
true
1c33e1cecd6c05dc0a9806ea1b1352fc1333bd65
1,620
py
Python
test/vpp_bond_interface.py
quantonium/vpp
57612ebcf3b5414c6a2f6153a3338803ac94d759
[ "Apache-2.0" ]
null
null
null
test/vpp_bond_interface.py
quantonium/vpp
57612ebcf3b5414c6a2f6153a3338803ac94d759
[ "Apache-2.0" ]
null
null
null
test/vpp_bond_interface.py
quantonium/vpp
57612ebcf3b5414c6a2f6153a3338803ac94d759
[ "Apache-2.0" ]
null
null
null
from vpp_object import VppObject from vpp_interface import VppInterface class VppBondInterface(VppInterface): """VPP bond interface.""" def __init__(self, test, mode, lb=0, use_custom_mac=0, mac_address=''): """ Create VPP Bond interface """ self._test = test self.mo...
33.061224
59
0.52037
from vpp_object import VppObject from vpp_interface import VppInterface class VppBondInterface(VppInterface): def __init__(self, test, mode, lb=0, use_custom_mac=0, mac_address=''): self._test = test self.mode = mode self.lb = lb self.use_custom_mac = use_custom_...
true
true
1c33e23b40cc904d68669a94274e02ca7608984f
6,240
py
Python
dvc/repo/reproduce.py
sahilbhosale63/dvc
999c9e188801f971b75f51ca84f5bad533cb462c
[ "Apache-2.0" ]
null
null
null
dvc/repo/reproduce.py
sahilbhosale63/dvc
999c9e188801f971b75f51ca84f5bad533cb462c
[ "Apache-2.0" ]
null
null
null
dvc/repo/reproduce.py
sahilbhosale63/dvc
999c9e188801f971b75f51ca84f5bad533cb462c
[ "Apache-2.0" ]
null
null
null
import logging from dvc.exceptions import InvalidArgumentError, ReproductionError from dvc.repo.scm_context import scm_context from . import locked from .graph import get_pipeline, get_pipelines logger = logging.getLogger(__name__) def _reproduce_stage(stage, **kwargs): if stage.frozen and not stage.is_import:...
33.191489
79
0.55609
import logging from dvc.exceptions import InvalidArgumentError, ReproductionError from dvc.repo.scm_context import scm_context from . import locked from .graph import get_pipeline, get_pipelines logger = logging.getLogger(__name__) def _reproduce_stage(stage, **kwargs): if stage.frozen and not stage.is_import:...
true
true
1c33e23fa22cebfd129075adb7e71157f71612ea
344
py
Python
runtests.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
49
2019-03-01T15:50:32.000Z
2022-03-01T10:47:57.000Z
runtests.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
15
2019-08-08T11:47:27.000Z
2022-02-15T06:18:48.000Z
runtests.py
gasman/wagtailmodelchooser
1aef9c0f3589d9ad81fe04dadeacc90a27e315d8
[ "BSD-2-Clause" ]
18
2019-03-11T19:30:49.000Z
2022-03-02T13:07:13.000Z
#!/usr/bin/env python import os import sys def run(): from django.core.management import execute_from_command_line os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' os.environ.setdefault('DATABASE_NAME', ':memory:') execute_from_command_line([sys.argv[0], 'test'] + sys.argv[1:]) if __name__ =...
21.5
67
0.700581
import os import sys def run(): from django.core.management import execute_from_command_line os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' os.environ.setdefault('DATABASE_NAME', ':memory:') execute_from_command_line([sys.argv[0], 'test'] + sys.argv[1:]) if __name__ == '__main__': run(...
true
true
1c33e355dcc8c83d9ee4fe92e664f027b881475a
578
py
Python
pluto/finance/commission/models.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/finance/commission/models.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/finance/commission/models.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
class CommissionModels(object): def __init__(self, commissions_setup): self._models = commissions_setup def get_commission_model(self, asset_type, exchange): return self._models[asset_type][exchange] def __repr__(self): return repr(self._models) def __str__(self): retu...
27.52381
63
0.704152
class CommissionModels(object): def __init__(self, commissions_setup): self._models = commissions_setup def get_commission_model(self, asset_type, exchange): return self._models[asset_type][exchange] def __repr__(self): return repr(self._models) def __str__(self): retu...
true
true
1c33e372b310eff0d626ed6cbbbea55bcce490bb
6,035
py
Python
grr/client/grr_response_client/client_stats.py
dekoder/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
3
2018-09-30T01:31:29.000Z
2019-04-22T11:44:54.000Z
grr/client/grr_response_client/client_stats.py
tomchop/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
1
2022-03-02T09:58:05.000Z
2022-03-02T09:58:05.000Z
grr/client/grr_response_client/client_stats.py
tomchop/grr
27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """CPU/IO stats collector.""" from __future__ import unicode_literals import threading import time import psutil from grr_response_client.client_actions import admin from grr_response_core.lib import rdfvalue from grr_response_core.lib import stats from grr_response_core.lib.rdfvalues import cl...
34.289773
80
0.72792
from __future__ import unicode_literals import threading import time import psutil from grr_response_client.client_actions import admin from grr_response_core.lib import rdfvalue from grr_response_core.lib import stats from grr_response_core.lib.rdfvalues import client_action as rdf_client_action from grr_response_c...
true
true