hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70b9f243dd1b2f97a048c91c57187db026d813e
4,939
py
Python
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_associate_group_with_project_permission_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_associate_group_with_project_permission_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_associate_group_with_project_permission_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class KeystoneAssociateGroupWithProjectPermissionRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name ...
30.487654
101
0.617331
import pprint import re import six class KeystoneAssociateGroupWithProjectPermissionRequest: sensitive_list = [] openapi_types = { 'project_id': 'str', 'group_id': 'str', 'role_id': 'str' } attribute_map = { 'project_id': 'project_id', 'group_id': 'gro...
true
true
f70ba056fcad84e17f9e4cbcc182c6fcaf5951d5
5,896
py
Python
tensorflow/python/ops/parallel_for/gradients.py
vixadd/tensorflow
8c624204eb686a91779149dc500e6c8c60096074
[ "Apache-2.0" ]
3
2019-11-19T14:07:27.000Z
2020-10-04T12:57:40.000Z
tensorflow/python/ops/parallel_for/gradients.py
vixadd/tensorflow
8c624204eb686a91779149dc500e6c8c60096074
[ "Apache-2.0" ]
4
2020-04-09T16:22:20.000Z
2021-12-15T13:57:36.000Z
tensorflow/python/ops/parallel_for/gradients.py
vixadd/tensorflow
8c624204eb686a91779149dc500e6c8c60096074
[ "Apache-2.0" ]
4
2022-01-13T11:23:44.000Z
2022-03-02T11:11:42.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...
39.837838
80
0.690807
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import check_ops from tensorflow.python.ops import gradients_impl as gradient_ops from tensorfl...
true
true
f70ba09090c619abec9379a4d93b0b6aea65b856
15,804
py
Python
classification/models/model23.py
anonymous2submit/Pointsformer
0eaa141b3d79d45cd925976bde6097b51e0d3819
[ "MIT" ]
null
null
null
classification/models/model23.py
anonymous2submit/Pointsformer
0eaa141b3d79d45cd925976bde6097b51e0d3819
[ "MIT" ]
null
null
null
classification/models/model23.py
anonymous2submit/Pointsformer
0eaa141b3d79d45cd925976bde6097b51e0d3819
[ "MIT" ]
null
null
null
""" Exactly equals to Model21 (the best results so far), but differnt configurations. Exactly based on Model10, but ReLU to GeLU Based on Model8, add dropout and max, avg combine. Based on Local model, add residual connections. The extraction is doubled for depth. Learning Point Cloud with Progressively Local represen...
35.198218
110
0.590926
import torch import torch.nn as nn import torch.nn.functional as F from torch import einsum from einops import rearrange, repeat from pointnet2_ops import pointnet2_utils def square_distance(src, dst): B, N, _ = src.shape _, M, _ = dst.shape dist = -2 * torch.matmul(src, dst.permute(0, 2, 1)) dist += t...
true
true
f70ba0b9684f17eb9c083521f1cbfc758a822d2e
1,013
py
Python
source/data_preparation/00b-generate_assembly_nochain.py
hui2000ji/masif
70a76c5f4639f70c546d5603612c7cc9f47a35b8
[ "Apache-2.0" ]
null
null
null
source/data_preparation/00b-generate_assembly_nochain.py
hui2000ji/masif
70a76c5f4639f70c546d5603612c7cc9f47a35b8
[ "Apache-2.0" ]
null
null
null
source/data_preparation/00b-generate_assembly_nochain.py
hui2000ji/masif
70a76c5f4639f70c546d5603612c7cc9f47a35b8
[ "Apache-2.0" ]
null
null
null
import os import sys from SBI.structure import PDB from default_config.masif_opts import masif_opts print(masif_opts["ligand"]["assembly_dir"]) if not os.path.exists(masif_opts["ligand"]["assembly_dir"]): os.mkdir(masif_opts["ligand"]["assembly_dir"]) def assemble(pdb_id): # Reads and builds the biological as...
30.69697
104
0.686081
import os import sys from SBI.structure import PDB from default_config.masif_opts import masif_opts print(masif_opts["ligand"]["assembly_dir"]) if not os.path.exists(masif_opts["ligand"]["assembly_dir"]): os.mkdir(masif_opts["ligand"]["assembly_dir"]) def assemble(pdb_id): print(os.path.join(masif_opts["r...
true
true
f70ba0cd1ceec91a3daa39c0d4e996db44d6f725
13,271
py
Python
log_mito_act/model_57.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito_act/model_57.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_mito_act/model_57.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']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', 'X...
79.467066
614
0.809736
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']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', 'Xiap']) Monomer('Fadd', ['Receptor',...
true
true
f70ba1c7f2cb64fa136136f269dd626b70b2a811
13,693
py
Python
tensorflow/python/framework/sparse_tensor_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/framework/sparse_tensor_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/framework/sparse_tensor_test.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2015 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...
38.463483
80
0.693274
from absl.testing import parameterized import numpy as np from tensorflow.python.eager import context from tensorflow.python.eager import def_function from tensorflow.python.framework import dtypes from tensorflow.python.framework import errors from tensorflow.python.framework import ops from tensorflow.python.framew...
true
true
f70ba1fbd0b88f8e278bb8592c895d1b36e75c20
11,615
py
Python
devicely/empatica.py
DigitalBiomarkerDiscoveryPipeline/devicely
9773fead4d3969a32ca2760b8db4ae728c4d5d50
[ "MIT" ]
13
2020-07-13T22:26:25.000Z
2022-03-18T17:40:56.000Z
devicely/empatica.py
DigitalBiomarkerDiscoveryPipeline/devicely
9773fead4d3969a32ca2760b8db4ae728c4d5d50
[ "MIT" ]
26
2020-11-29T11:11:09.000Z
2022-01-12T11:34:19.000Z
devicely/empatica.py
DigitalBiomarkerDiscoveryPipeline/devicely
9773fead4d3969a32ca2760b8db4ae728c4d5d50
[ "MIT" ]
5
2021-07-26T11:01:38.000Z
2022-02-22T18:23:57.000Z
""" Empatica E4 is a wearable device that offers real-time physiological data acquisition such as blood volume pulse, electrodermal activity (EDA), heart rate, interbeat intervals, 3-axis acceleration and skin temperature. """ import os import random import numpy as np import pandas as pd class EmpaticaReader: ...
40.611888
101
0.584245
import os import random import numpy as np import pandas as pd class EmpaticaReader: def __init__(self, path): self.start_times = {} self.sample_freqs = {} files = [f for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))] if files is None: print('Empt...
true
true
f70ba28c0ff01d16d24b0d53e79a3c5456d834b5
7,925
py
Python
thor/filter_orbits.py
moeyensj/thor
ec1150e23ec69944e45f6beddf57cfb46e9e44dc
[ "BSD-3-Clause" ]
11
2019-08-22T18:37:09.000Z
2022-02-28T22:49:25.000Z
thor/filter_orbits.py
moeyensj/thor
ec1150e23ec69944e45f6beddf57cfb46e9e44dc
[ "BSD-3-Clause" ]
57
2019-08-20T19:57:14.000Z
2021-09-16T20:54:59.000Z
thor/filter_orbits.py
moeyensj/thor
ec1150e23ec69944e45f6beddf57cfb46e9e44dc
[ "BSD-3-Clause" ]
7
2021-02-09T21:28:43.000Z
2022-02-01T08:55:29.000Z
import pandas as pd from typing import Tuple from .data_processing import UNKNOWN_ID_REGEX from .utils import calcDeltas __all__ = [ "filterKnownOrbits", "filterOrbits" ] def filterKnownOrbits( orbits: pd.DataFrame, orbit_observations: pd.DataFrame, associations: pd.DataFrame, ...
45.285714
123
0.722145
import pandas as pd from typing import Tuple from .data_processing import UNKNOWN_ID_REGEX from .utils import calcDeltas __all__ = [ "filterKnownOrbits", "filterOrbits" ] def filterKnownOrbits( orbits: pd.DataFrame, orbit_observations: pd.DataFrame, associations: pd.DataFrame, ...
true
true
f70ba298444fd5ee9e0963aa7594d931ec799e5c
2,064
py
Python
Archi/tests/test_esbn_model.py
Near32/Archi
0005713fa4e37c7cd9b34cd257c481d08928db8a
[ "MIT" ]
null
null
null
Archi/tests/test_esbn_model.py
Near32/Archi
0005713fa4e37c7cd9b34cd257c481d08928db8a
[ "MIT" ]
null
null
null
Archi/tests/test_esbn_model.py
Near32/Archi
0005713fa4e37c7cd9b34cd257c481d08928db8a
[ "MIT" ]
null
null
null
import Archi import yaml def test_model_loading(): try: config = yaml.safe_load( open("./esbn_model_test_config.yaml", 'r'), ) except yaml.YANNLError as e: print(e) from Archi import load_model model = load_model(config) assert 'KeyValueMemory' in model....
32.761905
103
0.66376
import Archi import yaml def test_model_loading(): try: config = yaml.safe_load( open("./esbn_model_test_config.yaml", 'r'), ) except yaml.YANNLError as e: print(e) from Archi import load_model model = load_model(config) assert 'KeyValueMemory' in model....
true
true
f70ba2dbbed027a097316912aef62f7e4fca727a
5,378
py
Python
airflow/operators/bash.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
2
2020-05-15T02:40:25.000Z
2020-06-08T04:30:00.000Z
airflow/operators/bash.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
33
2020-06-16T15:12:33.000Z
2021-07-23T07:04:35.000Z
airflow/operators/bash.py
mebelousov/airflow
d99833c9b5be9eafc0c7851343ee86b6c20aed40
[ "Apache-2.0" ]
2
2021-01-11T13:53:03.000Z
2021-10-02T05:06:34.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
38.141844
105
0.649498
import os import signal from subprocess import PIPE, STDOUT, Popen from tempfile import TemporaryDirectory, gettempdir from typing import Dict, Optional from airflow.exceptions import AirflowException from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults from airflow.utils.opera...
true
true
f70ba333ac2eec228f11aaf00c56987a66df3504
2,669
py
Python
api_tests/users/views/test_user_list.py
sf2ne/Playground
95b2d222d7ac43baca0249acbfc34e043d6a95b3
[ "Apache-2.0" ]
null
null
null
api_tests/users/views/test_user_list.py
sf2ne/Playground
95b2d222d7ac43baca0249acbfc34e043d6a95b3
[ "Apache-2.0" ]
13
2020-03-24T15:29:41.000Z
2022-03-11T23:15:28.000Z
api_tests/users/views/test_user_list.py
sf2ne/Playground
95b2d222d7ac43baca0249acbfc34e043d6a95b3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import urlparse from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from tests.factories import AuthUserFactory from api.base.settings.defaults import API_BASE class TestUsers(ApiTestCase): def setUp(self): super(TestUsers, self).setUp() self.user...
32.54878
86
0.630948
import urlparse from nose.tools import * from tests.base import ApiTestCase from tests.factories import AuthUserFactory from api.base.settings.defaults import API_BASE class TestUsers(ApiTestCase): def setUp(self): super(TestUsers, self).setUp() self.user_one = AuthUserFactory() self.u...
true
true
f70ba36f5449e78d850667a6792ccd3d50af645e
155
py
Python
muteria/drivers/testgeneration/testcase_formats/python_unittest/__init__.py
muteria/muteria
2cb72ff04548b011bce9296833bceb295199ae8e
[ "MIT" ]
5
2020-05-06T03:13:01.000Z
2021-12-09T22:39:26.000Z
muteria/drivers/testgeneration/testcase_formats/python_unittest/__init__.py
muteria/muteria
2cb72ff04548b011bce9296833bceb295199ae8e
[ "MIT" ]
6
2019-11-27T18:38:09.000Z
2021-12-16T20:40:50.000Z
muteria/drivers/testgeneration/testcase_formats/python_unittest/__init__.py
muteria/muteria
2cb72ff04548b011bce9296833bceb295199ae8e
[ "MIT" ]
4
2019-06-24T08:54:36.000Z
2022-03-31T15:38:35.000Z
from muteria.drivers.testgeneration.testcase_formats.python_unittest.unittest\ import *
77.5
78
0.496774
from muteria.drivers.testgeneration.testcase_formats.python_unittest.unittest\ import *
true
true
f70ba37efe5a4d8ded4bea670347e317978fe155
4,833
py
Python
pixelprint.py
optoisolator/pixel-print
99ed669bdc47d50c6f9785b7232e97d9b6653467
[ "MIT" ]
null
null
null
pixelprint.py
optoisolator/pixel-print
99ed669bdc47d50c6f9785b7232e97d9b6653467
[ "MIT" ]
null
null
null
pixelprint.py
optoisolator/pixel-print
99ed669bdc47d50c6f9785b7232e97d9b6653467
[ "MIT" ]
null
null
null
#!/usr/bin/python """ -------------------------------------------------------------------------------------------------------------- The MIT License (MIT) Copyright (c) 2016 William Yang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (th...
26.124324
110
0.53652
import time import RPi.GPIO as GPIO import alphanumeric pin_r1 = 5 pin_r2 = 6 pin_r3 = 13 pin_r4 = 19 pin_r5 = 26 pin_c1 = 21 pin_c2 = 20 pin_c3 = 16 pin_c4 = 12 PAUSE_INTERVAL = 300 COL_SCAN = 0.0001 ROW_SCAN = 0.0008 NUM_COLS = 8 class LEDMatrixControl: def __init__(self): self.row_ctrl = [pin_r1, pin...
true
true
f70ba4152c3dda319f435fa092eb83c1d673060f
9,175
py
Python
tests/utils/test_calculate_accuracies.py
RubensZimbres/pytorch-metric-learning
3ff3b9ae6065fdf470f7c19ea8c11f9850d697ea
[ "MIT" ]
1
2020-12-22T01:11:46.000Z
2020-12-22T01:11:46.000Z
tests/utils/test_calculate_accuracies.py
marijnl/pytorch-metric-learning
41e06ef5af398c05d238e0a74ee6c42fa7bd574c
[ "MIT" ]
null
null
null
tests/utils/test_calculate_accuracies.py
marijnl/pytorch-metric-learning
41e06ef5af398c05d238e0a74ee6c42fa7bd574c
[ "MIT" ]
null
null
null
import unittest from pytorch_metric_learning.utils import accuracy_calculator import numpy as np class TestCalculateAccuracies(unittest.TestCase): def test_accuracy_calculator(self): query_labels = np.array([1, 1, 2, 3, 4]) knn_labels1 = np.array( [ [0, 1, 1...
40.597345
87
0.500817
import unittest from pytorch_metric_learning.utils import accuracy_calculator import numpy as np class TestCalculateAccuracies(unittest.TestCase): def test_accuracy_calculator(self): query_labels = np.array([1, 1, 2, 3, 4]) knn_labels1 = np.array( [ [0, 1, 1...
true
true
f70ba52887f184ad281e8caf21f7d1bf136269b9
51,226
py
Python
tensorflow/python/eager/backprop.py
piquark6046/tensorflow
57771c5d008f6d16fd147110213855d145a7e0bc
[ "Apache-2.0" ]
null
null
null
tensorflow/python/eager/backprop.py
piquark6046/tensorflow
57771c5d008f6d16fd147110213855d145a7e0bc
[ "Apache-2.0" ]
null
null
null
tensorflow/python/eager/backprop.py
piquark6046/tensorflow
57771c5d008f6d16fd147110213855d145a7e0bc
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 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...
36.986282
90
0.679011
import functools import operator import sys import six from tensorflow.python import pywrap_tfe from tensorflow.python.eager import backprop_util from tensorflow.python.eager import context from tensorflow.python.eager import execute from tensorflow.python.eager import imperative_grad from tensorflow.python.eager i...
true
true
f70ba52a2bd12e48541dace861de83c615f1e6a9
142,862
py
Python
test/test_fx.py
ammar1510/pytorch
ec8d6777255821bed73b471eadddde068cd60c0b
[ "Intel" ]
1
2022-02-23T08:20:59.000Z
2022-02-23T08:20:59.000Z
test/test_fx.py
ammar1510/pytorch
ec8d6777255821bed73b471eadddde068cd60c0b
[ "Intel" ]
null
null
null
test/test_fx.py
ammar1510/pytorch
ec8d6777255821bed73b471eadddde068cd60c0b
[ "Intel" ]
null
null
null
# Owner(s): ["oncall: fx"] import builtins import contextlib import copy import functools import inspect import math import numbers import operator import os import pickle import sys import torch import traceback import typing import types import warnings import unittest from math import sqrt from torch.multiprocessin...
36.687725
128
0.585348
import builtins import contextlib import copy import functools import inspect import math import numbers import operator import os import pickle import sys import torch import traceback import typing import types import warnings import unittest from math import sqrt from torch.multiprocessing import Process from torch...
true
true
f70ba6b87b169178ffb85b354aeb87156f54dfd1
3,275
py
Python
generator/verify/sim_sram.py
VLSIDA/OpenCache
0e79bf353c68d57dcc49d78178b12fd0b468f19a
[ "BSD-3-Clause" ]
5
2021-09-15T18:29:49.000Z
2022-03-26T04:41:01.000Z
generator/verify/sim_sram.py
VLSIDA/OpenCache
0e79bf353c68d57dcc49d78178b12fd0b468f19a
[ "BSD-3-Clause" ]
null
null
null
generator/verify/sim_sram.py
VLSIDA/OpenCache
0e79bf353c68d57dcc49d78178b12fd0b468f19a
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2021 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # from policy import replacement_policy as rp from glob...
27.521008
110
0.617405
from policy import replacement_policy as rp from globals import OPTS class sim_sram: def __init__(self, num_words, num_ways, num_rows): self.num_words = num_words self.num_ways = num_ways self.num_rows = num_rows def reset(self): self.valid_array = [[0] * self.num_ways for...
true
true
f70ba70746408cde2e2e445a071d007f2f2b62f8
1,369
wsgi
Python
files/config-files/maposmatic.wsgi
chatelao/maposmatic-vagrant
c4864a5da5c40a5755f7432c3e2e77eaa87e99e4
[ "Unlicense" ]
25
2016-03-24T23:24:41.000Z
2022-03-04T16:52:47.000Z
files/config-files/maposmatic.wsgi
chatelao/maposmatic-vagrant
c4864a5da5c40a5755f7432c3e2e77eaa87e99e4
[ "Unlicense" ]
30
2016-03-25T06:53:18.000Z
2022-03-12T18:51:27.000Z
files/config-files/maposmatic.wsgi
chatelao/maposmatic-vagrant
c4864a5da5c40a5755f7432c3e2e77eaa87e99e4
[ "Unlicense" ]
13
2016-03-26T23:36:04.000Z
2021-01-20T18:41:10.000Z
# coding: utf-8 # maposmatic, the web front-end of the MapOSMatic city map generation system # Copyright (C) 2009 David Decotigny # Copyright (C) 2009 Frédéric Lehobey # Copyright (C) 2009 David Mentré # Copyright (C) 2009 Maxime Petazzoni # Copyright (C) 2009 Thomas Petazzoni # Copyright (C) 2009 Gaël Utard # ...
37
89
0.770636
import os, sys sys.path.append("/home/maposmatic/maposmatic") sys.path.append("/home/maposmatic/ocitysmap") os.environ["DJANGO_SETTINGS_MODULE"] = 'www.settings' os.environ["MAPOSMATIC_LOG_FILE"] = "/home/maposmatic/maposmatic/logs/maposmatic-www.log" os.environ["PGCONNECT_TIMEOUT"] = "1" import django.core.han...
true
true
f70ba851bced003f1bd4ef374153c70502f27c10
2,395
py
Python
bam/task_specific/task.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
23,901
2018-10-04T19:48:53.000Z
2022-03-31T21:27:42.000Z
bam/task_specific/task.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
891
2018-11-10T06:16:13.000Z
2022-03-31T10:42:34.000Z
bam/task_specific/task.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
6,047
2018-10-12T06:31:02.000Z
2022-03-31T13:59:28.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
25.752688
74
0.704384
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import csv import os import tensorflow.compat.v1 as tf class Example(object): __metaclass__ = abc.ABCMeta def __init__(self, task_name): self.task_name = task_name class Task(object): ...
true
true
f70ba8cd1beb723b680a53896c7f7d9b27f3178c
3,345
py
Python
amazon_scraper/settings.py
Samyak2/amazon-scraper
f8922e5e9c7e8a1184b59b758757b192f7aa6c29
[ "MIT" ]
1
2019-11-22T13:42:56.000Z
2019-11-22T13:42:56.000Z
amazon_scraper/settings.py
Samyak2/amazon-scraper
f8922e5e9c7e8a1184b59b758757b192f7aa6c29
[ "MIT" ]
null
null
null
amazon_scraper/settings.py
Samyak2/amazon-scraper
f8922e5e9c7e8a1184b59b758757b192f7aa6c29
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for amazon_scraper project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://doc.scrapy.org/en/latest/topics/settings.html # https://doc.scrapy.org/en/lates...
35.210526
102
0.781166
BOT_NAME = 'amazon_scraper' SPIDER_MODULES = ['amazon_scraper.spiders'] NEWSPIDER_MODULE = 'amazon_scraper.spiders' USER_AGENT = 'amazon_scraper_3 (+your@email.here)' ROBOTSTXT_OBEY = True CONCURRENT_REQUESTS = 2 DOWNLOAD_DELAY = 3 ITEM_PIPELINES = { 'amazon_scraper.pipelines.AmazonScraperPipeline': 30...
true
true
f70babde43bff0c8c248591d5b1a2c576b8fd8cb
6,101
py
Python
chainer/functions/pooling/average_pooling_2d.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/functions/pooling/average_pooling_2d.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
null
null
null
chainer/functions/pooling/average_pooling_2d.py
LuoYuanke/PrivChainer
758d765c7903f6913cfd58c21db069d5f2a12203
[ "MIT" ]
1
2022-02-20T10:32:59.000Z
2022-02-20T10:32:59.000Z
import numpy import chainer from chainer.backends import cuda from chainer import function_node from chainer.functions.pooling import pooling_2d from chainer.utils import conv class AveragePooling2D(pooling_2d.Pooling2D): """Average pooling over a set of 2d planes.""" # TODO(beam2d): Support cover_all mode....
37.20122
77
0.532208
import numpy import chainer from chainer.backends import cuda from chainer import function_node from chainer.functions.pooling import pooling_2d from chainer.utils import conv class AveragePooling2D(pooling_2d.Pooling2D): def forward_cpu(self, x): self._in_shape = x[0].shape self._in_dtype ...
true
true
f70bac85c3a38d428186f259f52a297e8e68a3f2
632
py
Python
app/forms.py
YiChengCai1999/DepressionAnnotator
828f505d0f22f7c2337f1b37c7dee3ea23468951
[ "Apache-2.0" ]
null
null
null
app/forms.py
YiChengCai1999/DepressionAnnotator
828f505d0f22f7c2337f1b37c7dee3ea23468951
[ "Apache-2.0" ]
null
null
null
app/forms.py
YiChengCai1999/DepressionAnnotator
828f505d0f22f7c2337f1b37c7dee3ea23468951
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/12/5 19:35 # @Author : cendeavor # @File : forms.py # @Software: PyCharm from flask_wtf import Form, FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import Required, DataRequired, EqualTo class NameForm(...
27.478261
69
0.693038
from flask_wtf import Form, FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import Required, DataRequired, EqualTo class NameForm(Form): name = StringField('What is your name?', validators=[Required()]) submit = SubmitField('注册') class LoginForm(FlaskForm): ...
true
true
f70bacb5720192a7e432abae6a62ee6600ea78fe
13,872
py
Python
label_script/label script.py
rechardchen123/tensorflow_understand
aa271efc7253bd273ce8f7ac76eb50ebb68a4534
[ "Apache-2.0" ]
null
null
null
label_script/label script.py
rechardchen123/tensorflow_understand
aa271efc7253bd273ce8f7ac76eb50ebb68a4534
[ "Apache-2.0" ]
null
null
null
label_script/label script.py
rechardchen123/tensorflow_understand
aa271efc7253bd273ce8f7ac76eb50ebb68a4534
[ "Apache-2.0" ]
null
null
null
from __future__ import division from tkinter import * import tkMessageBox from PIL import Image, ImageTk import os import glob import random w0 = 1 #图片原始宽度 h0 = 1 #图片原始高度 # colors for the bboxes COLORS = ['red','blue','yellow','pink','cyan','green','black'] #image size SIZE = 256,256 #指定缩放后的图像大小 DEST_SIZE = 500,50...
35.118987
118
0.517445
from __future__ import division from tkinter import * import tkMessageBox from PIL import Image, ImageTk import os import glob import random w0 = 1 h0 = 1 COLORS = ['red','blue','yellow','pink','cyan','green','black'] SIZE = 256,256 DEST_SIZE = 500,500 class LabelTool(): def __init__(self,master): ...
true
true
f70bace2128f09dc26c0dcf8ff0f701cb867a582
8,016
py
Python
adafruit_pyportal/network.py
jposada202020/Adafruit_CircuitPython_PyPortal
2c09cc1ba6130de03f3f6d2643af5fcc6c82bb8e
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
adafruit_pyportal/network.py
jposada202020/Adafruit_CircuitPython_PyPortal
2c09cc1ba6130de03f3f6d2643af5fcc6c82bb8e
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
adafruit_pyportal/network.py
jposada202020/Adafruit_CircuitPython_PyPortal
2c09cc1ba6130de03f3f6d2643af5fcc6c82bb8e
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense """ `adafruit_pyportal.network` ================================================================================ CircuitPython driver for Adafruit PyPortal. * Author(s): Limor Fried, Kevin J...
38.171429
253
0.594561
import gc from adafruit_portalbase.network import ( NetworkBase, CONTENT_JSON, CONTENT_TEXT, ) from adafruit_pyportal.wifi import WiFi __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyPortal.git" IMAGE_CONVERTER_SERVICE = ( "https://io.adafruit.com/api/v...
true
true
f70bad7ea69e067caab69fe4854350f67d504f31
5,718
py
Python
src/sadie/renumbering/result.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
src/sadie/renumbering/result.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
src/sadie/renumbering/result.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
import logging import pandas as pd from ast import literal_eval from .constants import NUMBERING_RESULTS from sadie.numbering.scheme_numbering import scheme_numbering logger = logging.getLogger("NUMBERING") class NumberingResults(pd.DataFrame): def __init__(self, *args, scheme="", region_definition="", allowed_...
38.635135
120
0.549668
import logging import pandas as pd from ast import literal_eval from .constants import NUMBERING_RESULTS from sadie.numbering.scheme_numbering import scheme_numbering logger = logging.getLogger("NUMBERING") class NumberingResults(pd.DataFrame): def __init__(self, *args, scheme="", region_definition="", allowed_...
true
true
f70bade14a31fddad9b14b51709da0b4d1094b8f
1,071
py
Python
tests/test_split_settings.py
abdulniyaspm/django-split-settings
9a004ce261ffd16782da08577fb700300f3bd40b
[ "BSD-3-Clause" ]
1
2021-04-21T03:07:15.000Z
2021-04-21T03:07:15.000Z
tests/test_split_settings.py
abdulniyaspm/django-split-settings
9a004ce261ffd16782da08577fb700300f3bd40b
[ "BSD-3-Clause" ]
null
null
null
tests/test_split_settings.py
abdulniyaspm/django-split-settings
9a004ce261ffd16782da08577fb700300f3bd40b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # pylint: disable=no-member """ This file contains tests with base functionality. """ def test_merge(merged): """ Test that all values from settings are present. """ assert hasattr(merged, 'SECRET_KEY') assert hasattr(merged, 'STATIC_ROOT') def test_override(merged, mon...
23.8
73
0.704949
def test_merge(merged): assert hasattr(merged, 'SECRET_KEY') assert hasattr(merged, 'STATIC_ROOT') def test_override(merged, monkeypatch): monkeypatch.setenv('DJANGO_SETTINGS_MODULE', 'tests.settings.merged') from django.conf import settings assert merged.STATIC_ROOT == settings.STATIC_R...
true
true
f70bae9c979732376e4cb729a58df45c13daa528
528
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/share-34244
b4acf167275d5bf120b1f0254aabc2e0e95111a9
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/share-34244
b4acf167275d5bf120b1f0254aabc2e0e95111a9
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/share-34244
b4acf167275d5bf120b1f0254aabc2e0e95111a9
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "share-34244.botics.co" site_params = { "name": "SHARE", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(defau...
20.307692
61
0.651515
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "share-34244.botics.co" site_params = { "name": "SHARE", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(defau...
true
true
f70baf1f4016fb95e12e305e4c79a70b93b9b4a6
3,210
py
Python
do_it_django_prj/settings.py
Eliksny/do_it_django_a_to_z
728d08f11cbed05aa93004d116926df26f681ccf
[ "MIT" ]
null
null
null
do_it_django_prj/settings.py
Eliksny/do_it_django_a_to_z
728d08f11cbed05aa93004d116926df26f681ccf
[ "MIT" ]
null
null
null
do_it_django_prj/settings.py
Eliksny/do_it_django_a_to_z
728d08f11cbed05aa93004d116926df26f681ccf
[ "MIT" ]
null
null
null
""" Django settings for do_it_django_prj project. Generated by 'django-admin startproject' using Django 3.1.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ impo...
25.275591
91
0.697508
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '^il&w&37030%c0kbg@9(h+k(jsps53_)brjyw)mksmj=*c^5vf' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contentty...
true
true
f70baf4ada1e8690727609371f5fe6b0550ce622
1,073
py
Python
run_on_vacuum/my_logger.py
edwios/xiaomiWifiMapper
55a4bafcca9f7d000e5df4360e2c8e4584541942
[ "MIT" ]
6
2019-04-13T07:22:38.000Z
2022-03-30T16:38:07.000Z
run_on_vacuum/my_logger.py
edwios/xiaomiWifiMapper
55a4bafcca9f7d000e5df4360e2c8e4584541942
[ "MIT" ]
null
null
null
run_on_vacuum/my_logger.py
edwios/xiaomiWifiMapper
55a4bafcca9f7d000e5df4360e2c8e4584541942
[ "MIT" ]
1
2022-02-08T16:08:21.000Z
2022-02-08T16:08:21.000Z
import logging import datetime import os def config_logs(): # Logfile logfolder = "logs/" logdate = datetime.datetime.now().strftime("%y-%m-%d_%H:%M") + "_" logfile = "aerodust.log" logpath = logfolder + logfile #logpath = logfolder + logdate + logfile if not os.path.exists(logfolder): ...
29
70
0.691519
import logging import datetime import os def config_logs(): logfolder = "logs/" logdate = datetime.datetime.now().strftime("%y-%m-%d_%H:%M") + "_" logfile = "aerodust.log" logpath = logfolder + logfile if not os.path.exists(logfolder): os.makedirs(logfolder) logformat...
true
true
f70bafa9d216982e080b2ecad32e8a1c7f55bbe2
11,523
py
Python
httpBridge/http_server.py
neilbroadbent/captive-web-view
ff0b541727ab60df6d05cae1eb66dd9d7b572b89
[ "BSD-2-Clause" ]
null
null
null
httpBridge/http_server.py
neilbroadbent/captive-web-view
ff0b541727ab60df6d05cae1eb66dd9d7b572b89
[ "BSD-2-Clause" ]
null
null
null
httpBridge/http_server.py
neilbroadbent/captive-web-view
ff0b541727ab60df6d05cae1eb66dd9d7b572b89
[ "BSD-2-Clause" ]
null
null
null
# Run with Python 3 # Copyright 2019 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause """\ HTTP server that can be used as a back end to Captive Web View applications. The server is based around a Python3 Simple HTTP Server extended to pick files from one of a number of directories. The server will change direc...
38.667785
110
0.586392
import argparse from http.server import HTTPServer, SimpleHTTPRequestHandler import json from os import chdir import os.path from pathlib import Path import shutil from socketserver import ThreadingMixIn import sys import textwrap def project_path(*segments): return Path(__file__).resolve().parents[1].joinpath(*se...
true
true
f70bb050c191468d1bf7ec98d2a0e34ce404620f
1,940
py
Python
environment/controller/ppo_test.py
rafaelcostafrf/UAV_3d_virtual_env
bccaa52ec97fff5c0a17e1351a09f913d91c4c7b
[ "CC0-1.0" ]
7
2020-07-16T08:23:58.000Z
2022-02-03T17:51:13.000Z
environment/controller/ppo_test.py
rafaelcostafrf/UAV_3D_Virtual_Env
bccaa52ec97fff5c0a17e1351a09f913d91c4c7b
[ "CC0-1.0" ]
null
null
null
environment/controller/ppo_test.py
rafaelcostafrf/UAV_3D_Virtual_Env
bccaa52ec97fff5c0a17e1351a09f913d91c4c7b
[ "CC0-1.0" ]
3
2020-09-16T14:24:48.000Z
2021-02-03T10:01:00.000Z
import sys from quadrotor_env import quad, render, animation import numpy as np import torch import torch.nn as nn from torch.distributions import MultivariateNormal import numpy as np from quadrotor_env import quad, render, animation from model import ActorCritic """ MECHANICAL ENGINEERING POST-GRADUATE PROGRAM UNIVE...
28.115942
98
0.716495
import sys from quadrotor_env import quad, render, animation import numpy as np import torch import torch.nn as nn from torch.distributions import MultivariateNormal import numpy as np from quadrotor_env import quad, render, animation from model import ActorCritic time_int_step = 0.01 max_timesteps = 1000 T = 5 devi...
true
true
f70bb0dcace5468cfd76a8c6fc2bbcfa258e969a
926
py
Python
server.py
serchrod/PlotWebService
3d744641e7fa187d46903e71b3da6faa1ca80197
[ "MIT" ]
null
null
null
server.py
serchrod/PlotWebService
3d744641e7fa187d46903e71b3da6faa1ca80197
[ "MIT" ]
null
null
null
server.py
serchrod/PlotWebService
3d744641e7fa187d46903e71b3da6faa1ca80197
[ "MIT" ]
null
null
null
from flask import Flask, escape, request from flask import send_file from Graph.plot import Plot app = Flask(__name__) @app.route('/', methods=["POST"]) def hello(): print(request.method) req_data= request.get_json() print(req_data) name = request.args.get("name", "World") return f'Hello, {escape(name)...
25.027027
63
0.679266
from flask import Flask, escape, request from flask import send_file from Graph.plot import Plot app = Flask(__name__) @app.route('/', methods=["POST"]) def hello(): print(request.method) req_data= request.get_json() print(req_data) name = request.args.get("name", "World") return f'Hello, {escape(name)...
true
true
f70bb2806abe8753fedf0fa824ed6ca2d2632ea8
56
py
Python
django_menus/__init__.py
jonesim/django-menus
11f46eead9dec3c99724d9d5df87ce7eb0bee730
[ "MIT" ]
1
2021-11-20T06:24:41.000Z
2021-11-20T06:24:41.000Z
django_menus/__init__.py
jonesim/django-menus
11f46eead9dec3c99724d9d5df87ce7eb0bee730
[ "MIT" ]
null
null
null
django_menus/__init__.py
jonesim/django-menus
11f46eead9dec3c99724d9d5df87ce7eb0bee730
[ "MIT" ]
null
null
null
DUMMY_MENU_ID = 999999 DUMMY_MENU_SLUG = 'SLUGGOESHERE'
18.666667
32
0.821429
DUMMY_MENU_ID = 999999 DUMMY_MENU_SLUG = 'SLUGGOESHERE'
true
true
f70bb319fc1590c0ee070b2f24afe5ede7e22037
22,466
py
Python
tests/wav2vec2/test_modeling_flax_wav2vec2.py
techthiyanes/transformers
705d65368fb28246534ef636fe62c008f4fb2682
[ "Apache-2.0" ]
2
2020-02-26T08:10:20.000Z
2020-02-28T19:10:01.000Z
tests/wav2vec2/test_modeling_flax_wav2vec2.py
techthiyanes/transformers
705d65368fb28246534ef636fe62c008f4fb2682
[ "Apache-2.0" ]
1
2022-03-26T12:10:11.000Z
2022-03-26T12:10:11.000Z
tests/wav2vec2/test_modeling_flax_wav2vec2.py
techthiyanes/transformers
705d65368fb28246534ef636fe62c008f4fb2682
[ "Apache-2.0" ]
1
2022-01-12T14:45:41.000Z
2022-01-12T14:45:41.000Z
# Copyright 2021 The HuggingFace Team. 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 applicabl...
40.921676
200
0.685658
import inspect import math import unittest import numpy as np from datasets import load_dataset from transformers import Wav2Vec2Config, is_flax_available from transformers.testing_utils import ( is_librosa_available, is_pyctcdecode_available, require_flax, require_librosa, require_pyctcdecode, ...
true
true
f70bb3e18995f3440115fb6135f9b27b8831cd83
157
py
Python
src/silicium/utils/require.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
2
2021-12-12T12:06:46.000Z
2021-12-12T12:21:18.000Z
src/silicium/utils/require.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
1
2021-12-12T12:21:43.000Z
2021-12-12T22:49:46.000Z
src/silicium/utils/require.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
2
2021-12-12T15:13:54.000Z
2021-12-21T09:08:42.000Z
import os def require(file, *args): with open(os.path.join(os.path.dirname(file), *args), "r") as fh: source = fh.read() return source
19.625
69
0.598726
import os def require(file, *args): with open(os.path.join(os.path.dirname(file), *args), "r") as fh: source = fh.read() return source
true
true
f70bb3f0b9097225846ad1f4840fb47c67f84b16
25,331
py
Python
efficientdet/det_model_fn.py
templeblock/automl
0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2
[ "Apache-2.0" ]
null
null
null
efficientdet/det_model_fn.py
templeblock/automl
0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2
[ "Apache-2.0" ]
null
null
null
efficientdet/det_model_fn.py
templeblock/automl
0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
39.641628
80
0.67218
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import re from absl import logging import numpy as np import tensorflow.compat.v1 as tf import coco_metric import efficientdet_arch import hparams_config import iou_utils import nms_np import...
true
true
f70bb51fb5f77dd016a4f81eefdabf218aad321e
2,730
py
Python
app/tests/v1/test_meetup.py
KelynPNjeri/Questioner-API
5d71b169be0db2d18642b13075b2cc4e3904e9ee
[ "MIT" ]
1
2019-01-15T06:12:37.000Z
2019-01-15T06:12:37.000Z
app/tests/v1/test_meetup.py
KelynPNjeri/Questioner-API
5d71b169be0db2d18642b13075b2cc4e3904e9ee
[ "MIT" ]
17
2019-01-08T16:02:37.000Z
2019-10-21T17:38:01.000Z
app/tests/v1/test_meetup.py
KelynPNjeri/Questioner-API
5d71b169be0db2d18642b13075b2cc4e3904e9ee
[ "MIT" ]
null
null
null
"""Module for Testing the Meetup Endpoint.""" import json # Local Import from .basecase import TestBaseCase as base class TestMeetup(base): """Testing the Meetup Endpoints with valid input.""" def setUp(self): base.setUp(self) def test_create_meetup(self): """Testing Creation of a Meetu...
42
172
0.675824
import json from .basecase import TestBaseCase as base class TestMeetup(base): def setUp(self): base.setUp(self) def test_create_meetup(self): response = self.client.post( "/api/v1/meetups", data=json.dumps(self.meetup_payload), content_type=self.content...
true
true
f70bb60cd9a165991bea09f982f2310be199ff23
4,891
py
Python
yolo3/models/yolo3_resnet50.py
holajoa/keras-YOLOv3-model-set
c15b8a2f48371c063f6482b25593dc70d5956323
[ "MIT" ]
601
2019-08-24T10:14:52.000Z
2022-03-29T15:05:33.000Z
yolo3/models/yolo3_resnet50.py
holajoa/keras-YOLOv3-model-set
c15b8a2f48371c063f6482b25593dc70d5956323
[ "MIT" ]
220
2019-10-04T18:57:59.000Z
2022-03-31T15:30:37.000Z
yolo3/models/yolo3_resnet50.py
holajoa/keras-YOLOv3-model-set
c15b8a2f48371c063f6482b25593dc70d5956323
[ "MIT" ]
218
2019-10-31T03:32:11.000Z
2022-03-25T14:44:19.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """YOLO_v3 ResNet50 Model Defined in Keras.""" from tensorflow.keras.layers import UpSampling2D, Concatenate from tensorflow.keras.models import Model from tensorflow.keras.applications.resnet import ResNet50 from yolo3.models.layers import yolo3_predictions, yol...
36.22963
143
0.686363
from tensorflow.keras.layers import UpSampling2D, Concatenate from tensorflow.keras.models import Model from tensorflow.keras.applications.resnet import ResNet50 from yolo3.models.layers import yolo3_predictions, yolo3lite_predictions, tiny_yolo3_predictions, tiny_yolo3lite_predictions def yolo3_resnet50_bo...
true
true
f70bb65474dfcd0bf14ad96f156718369f73d25c
4,069
py
Python
experiments/ashvin/icml2020/hand/sparse/rewards_relocate1.py
Asap7772/rail-rl-franka-eval
4bf99072376828193d05b53cf83c7e8f4efbd3ba
[ "MIT" ]
null
null
null
experiments/ashvin/icml2020/hand/sparse/rewards_relocate1.py
Asap7772/rail-rl-franka-eval
4bf99072376828193d05b53cf83c7e8f4efbd3ba
[ "MIT" ]
null
null
null
experiments/ashvin/icml2020/hand/sparse/rewards_relocate1.py
Asap7772/rail-rl-franka-eval
4bf99072376828193d05b53cf83c7e8f4efbd3ba
[ "MIT" ]
null
null
null
""" AWR + SAC from demo experiment """ from railrl.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader from railrl.demos.source.mdp_path_loader import MDPPathLoader from railrl.launchers.experiments.ashvin.awr_sac_rl import experiment import railrl.misc.hyperparameter as hyp from railrl.launchers.arglaunc...
30.140741
75
0.574343
from railrl.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader from railrl.demos.source.mdp_path_loader import MDPPathLoader from railrl.launchers.experiments.ashvin.awr_sac_rl import experiment import railrl.misc.hyperparameter as hyp from railrl.launchers.arglauncher import run_variants from railrl.to...
true
true
f70bb69e81e881e93a438547dcdd44dc53d59ab5
2,433
py
Python
log_casp_act/run_model_778.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_act/run_model_778.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_casp_act/run_model_778.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
import numpy as np from math import * import pymultinest import sys sys.path.insert(0, '/home/kochenma/pysb') from pysb.integrate import Solver import csv import datetime import time as tm from model_778 import model from pysb.pathfinder import set_path set_path('bng', '/home/kochenma/BioNetGen') data_object = [] wi...
25.610526
237
0.671599
import numpy as np from math import * import pymultinest import sys sys.path.insert(0, '/home/kochenma/pysb') from pysb.integrate import Solver import csv import datetime import time as tm from model_778 import model from pysb.pathfinder import set_path set_path('bng', '/home/kochenma/BioNetGen') data_object = [] wi...
false
true
f70bb6d64ee156cd9362f37bcdaef380680dc2cd
26,277
py
Python
parlai/tasks/blended_skill_talk/agents.py
Misterion777/ParlAI
1a6849d643a30a9a981825d9f50470b6512817c5
[ "MIT" ]
null
null
null
parlai/tasks/blended_skill_talk/agents.py
Misterion777/ParlAI
1a6849d643a30a9a981825d9f50470b6512817c5
[ "MIT" ]
null
null
null
parlai/tasks/blended_skill_talk/agents.py
Misterion777/ParlAI
1a6849d643a30a9a981825d9f50470b6512817c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import os import random import re from collections import defaultdict from typing import List, Optional, Dic...
41.381102
247
0.595464
import copy import os import random import re from collections import defaultdict from typing import List, Optional, Dict, Tuple from parlai.core.opt import Opt from parlai.core.teachers import ParlAIDialogTeacher, create_task_agent_from_taskname from parlai.tasks.convai2.agents import BothTeacher from parlai.tasks....
true
true
f70bb732c7dba05e730ab3f4b6cafea04d163ce2
2,582
py
Python
meiduo_mall02/apps/users/migrations/0003_auto_20190519_1544.py
hongyinwang/meiduo_project02
3f21773d2d98204400ea2c3738969ac2a593b242
[ "MIT" ]
null
null
null
meiduo_mall02/apps/users/migrations/0003_auto_20190519_1544.py
hongyinwang/meiduo_project02
3f21773d2d98204400ea2c3738969ac2a593b242
[ "MIT" ]
null
null
null
meiduo_mall02/apps/users/migrations/0003_auto_20190519_1544.py
hongyinwang/meiduo_project02
3f21773d2d98204400ea2c3738969ac2a593b242
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2019-05-19 15:44 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('areas', '0001_initial'), ...
52.693878
168
0.62316
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('areas', '0001_initial'), ('users', '0002_user_email_active'), ] operations = [ ...
true
true
f70bb8099e8fc99c6b1915a64aa50ef8bc9e551b
466
py
Python
pylearn/assignment/triangle/04.py
wangding/demo-code
ecc225642ba3aa1463f7e15b0f7fd96ecd43f067
[ "MIT" ]
6
2017-10-12T06:17:37.000Z
2022-03-09T13:57:32.000Z
pylearn/assignment/triangle/04.py
wangding/demo-code
ecc225642ba3aa1463f7e15b0f7fd96ecd43f067
[ "MIT" ]
4
2017-06-09T01:31:13.000Z
2020-09-01T20:08:17.000Z
pylearn/assignment/triangle/04.py
wangding/demo-code
ecc225642ba3aa1463f7e15b0f7fd96ecd43f067
[ "MIT" ]
4
2017-10-10T08:57:53.000Z
2018-07-05T09:03:47.000Z
#! /user/bin/env python # _*_ coding: utf-8 _*_ # __author__ = "王顶" # Email: 408542507@qq.com """ 循环切片实现 需求总是改变,一会是4层金字塔,一会儿是5层金子塔 到底要几层,改一下 while 循环的条件变量就行了 """ level = 0 line = '' stars = '*******************************************' spaces = ' ' while level < 4: n ...
19.416667
54
0.450644
level = 0 line = '' stars = '*******************************************' spaces = ' ' while level < 4: n = level * 2 + 1 m = 4 - level line = spaces[:m] + stars[:n] print(line) level = level + 1
true
true
f70bba66989a10c1afc4308f981a114b3aac0610
4,231
py
Python
tests/st/ops/cpu/test_broadcast_to_op.py
PowerOlive/mindspore
bda20724a94113cedd12c3ed9083141012da1f15
[ "Apache-2.0" ]
3,200
2020-02-17T12:45:41.000Z
2022-03-31T20:21:16.000Z
tests/st/ops/cpu/test_broadcast_to_op.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
176
2020-02-12T02:52:11.000Z
2022-03-28T22:15:55.000Z
tests/st/ops/cpu/test_broadcast_to_op.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
621
2020-03-09T01:31:41.000Z
2022-03-30T03:43:19.000Z
# Copyright 2021 Huawei Technologies Co., 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...
35.258333
78
0.670527
import numpy as np import pytest import mindspore.context as context from mindspore.common.tensor import Tensor from mindspore.ops import operations as P @pytest.mark.level0 @pytest.mark.platform_x86_cpu @pytest.mark.env_onecard def test_broadcast(): context.set_context(mode=context.GRAPH_MODE, device_target='C...
true
true
f70bbae8184a4fbe5f16077443f13743bf9bd7ba
3,695
py
Python
huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/update_application_endpoint_request_body.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/update_application_endpoint_request_body.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/update_application_endpoint_request_body.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class UpdateApplicationEndpointRequestBody: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name ...
26.775362
87
0.573748
import pprint import re import six class UpdateApplicationEndpointRequestBody: sensitive_list = [] openapi_types = { 'enabled': 'str', 'user_data': 'str' } attribute_map = { 'enabled': 'enabled', 'user_data': 'user_data' } def __init__(self, enabled=N...
true
true
f70bbd6d1707e41946b26993726d5c4787519f5a
332
py
Python
tests/test_info_ordering.py
aventon1/text-summarizer
d7540bfd862b1222f6ebd7875948bbf20c52f603
[ "MIT" ]
null
null
null
tests/test_info_ordering.py
aventon1/text-summarizer
d7540bfd862b1222f6ebd7875948bbf20c52f603
[ "MIT" ]
null
null
null
tests/test_info_ordering.py
aventon1/text-summarizer
d7540bfd862b1222f6ebd7875948bbf20c52f603
[ "MIT" ]
2
2019-10-09T17:17:40.000Z
2020-11-30T05:05:07.000Z
#!opt/python-3.6/bin/python3 import unittest import sys sys.path.append("../src") from info_ordering import order_info class TestInfoOrdering(unittest.TestCase): def test_order_info(self): # TODO: fix to actually test value = 5 self.assertEqual(value, 5) if __name__ == '__main__': uni...
18.444444
42
0.692771
import unittest import sys sys.path.append("../src") from info_ordering import order_info class TestInfoOrdering(unittest.TestCase): def test_order_info(self): value = 5 self.assertEqual(value, 5) if __name__ == '__main__': unittest.main()
true
true
f70bbe427124f831ca320689a3b1138ac1f62dfa
15,815
py
Python
mypy/semanal_typeddict.py
SwagatSBhuyan/mypy
218b91c5576a69da51e0813abd0fc7c5fd2d627e
[ "PSF-2.0" ]
12,496
2016-02-19T13:38:26.000Z
2022-03-31T23:56:19.000Z
mypy/semanal_typeddict.py
SwagatSBhuyan/mypy
218b91c5576a69da51e0813abd0fc7c5fd2d627e
[ "PSF-2.0" ]
9,429
2016-02-19T13:41:32.000Z
2022-03-31T23:29:38.000Z
mypy/semanal_typeddict.py
SwagatSBhuyan/mypy
218b91c5576a69da51e0813abd0fc7c5fd2d627e
[ "PSF-2.0" ]
2,770
2016-02-19T16:18:19.000Z
2022-03-31T08:12:49.000Z
"""Semantic analysis of TypedDict definitions.""" from mypy.backports import OrderedDict from typing import Optional, List, Set, Tuple from typing_extensions import Final from mypy.types import Type, AnyType, TypeOfAny, TypedDictType, TPDICT_NAMES from mypy.nodes import ( CallExpr, TypedDictExpr, Expression, Name...
47.779456
99
0.583244
from mypy.backports import OrderedDict from typing import Optional, List, Set, Tuple from typing_extensions import Final from mypy.types import Type, AnyType, TypeOfAny, TypedDictType, TPDICT_NAMES from mypy.nodes import ( CallExpr, TypedDictExpr, Expression, NameExpr, Context, StrExpr, BytesExpr, UnicodeExpr, ...
true
true
f70bbe50147981c90239bd8aac6d747789d5ce75
3,673
py
Python
main.py
omergoc/ihbarBotu
a30028be26a65b67e0d5c94547e17ab7f00c2a81
[ "Apache-2.0" ]
null
null
null
main.py
omergoc/ihbarBotu
a30028be26a65b67e0d5c94547e17ab7f00c2a81
[ "Apache-2.0" ]
null
null
null
main.py
omergoc/ihbarBotu
a30028be26a65b67e0d5c94547e17ab7f00c2a81
[ "Apache-2.0" ]
null
null
null
from bs4 import BeautifulSoup import requests import os class App: def __init__(self): self.userlist = [] self.headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"} self.page = 1 ...
39.923913
157
0.494963
from bs4 import BeautifulSoup import requests import os class App: def __init__(self): self.userlist = [] self.headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"} self.page = 1 ...
true
true
f70bbe7af3801fa430e6f0bec3f47ab6459ea35a
4,689
py
Python
esmvaltool/diag_scripts/ocean/diagnostic_profiles.py
ruthlorenz/ESMValTool
c3c61b5341037d01c776c3524c0dd4c767507a3d
[ "Apache-2.0" ]
null
null
null
esmvaltool/diag_scripts/ocean/diagnostic_profiles.py
ruthlorenz/ESMValTool
c3c61b5341037d01c776c3524c0dd4c767507a3d
[ "Apache-2.0" ]
null
null
null
esmvaltool/diag_scripts/ocean/diagnostic_profiles.py
ruthlorenz/ESMValTool
c3c61b5341037d01c776c3524c0dd4c767507a3d
[ "Apache-2.0" ]
null
null
null
""" Diagnostic: Diagnostic to produce images of the profile over time from a cube. These plost show cube value (ie temperature) on the x-axis, and depth/height on the y axis. The colour scale is the annual mean of the cube data. Note that this diagnostic assumes that the preprocessors do the bulk of the hard work, an...
26.794286
78
0.622521
import logging import os import sys import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import iris import iris.quickplot as qplt import diagnostic_tools as diagtools from esmvaltool.diag_scripts.shared import run_diagnostic logger = logging.getLogger(os.path.basename(__file__)) logging.getLogge...
true
true
f70bbe7da9fe3c9d459fd663fd9800dbefafe584
2,122
py
Python
test/python/test_problem_options.py
vlad17/BlitzML
f13e089acf7435416bec17e87e5b3130426fc2cd
[ "BSD-3-Clause" ]
6
2015-06-16T05:17:17.000Z
2018-08-02T05:50:01.000Z
test/python/test_problem_options.py
vlad17/BlitzML
f13e089acf7435416bec17e87e5b3130426fc2cd
[ "BSD-3-Clause" ]
2
2018-05-13T13:53:58.000Z
2019-06-11T14:53:26.000Z
test/python/test_problem_options.py
vlad17/BlitzML
f13e089acf7435416bec17e87e5b3130426fc2cd
[ "BSD-3-Clause" ]
3
2018-08-02T05:50:03.000Z
2021-02-21T04:44:15.000Z
import unittest import blitzml import numpy as np from common import captured_output class TestProblemOptions(unittest.TestCase): def setUp(self): A = np.arange(20).reshape(5, 4) b = np.arange(5).astype(np.float64) self.prob = blitzml.LassoProblem(A, b) def tearDown(self): del self.prob def te...
30.753623
59
0.723845
import unittest import blitzml import numpy as np from common import captured_output class TestProblemOptions(unittest.TestCase): def setUp(self): A = np.arange(20).reshape(5, 4) b = np.arange(5).astype(np.float64) self.prob = blitzml.LassoProblem(A, b) def tearDown(self): del self.prob def te...
true
true
f70bbfa4c46a7b61211c94260b55968ce1dd3e22
5,156
py
Python
webscraping/Tokenize.py
jfmendozam/ontotoutra
bea4ceafa62500b23495a6de120884ca40f785e9
[ "Apache-2.0" ]
null
null
null
webscraping/Tokenize.py
jfmendozam/ontotoutra
bea4ceafa62500b23495a6de120884ca40f785e9
[ "Apache-2.0" ]
null
null
null
webscraping/Tokenize.py
jfmendozam/ontotoutra
bea4ceafa62500b23495a6de120884ca40f785e9
[ "Apache-2.0" ]
null
null
null
import nltk from langdetect import detect import csv class Tokenize: """ Text tokenizer """ def __init__(self): """ Default constructor """ self.language = "en" self.workDirectory = "/run/media/jf/Datos/Tourist Text Mining/datasets/colombia_en/" self.tagFilename = "t...
32.840764
114
0.442591
import nltk from langdetect import detect import csv class Tokenize: def __init__(self): self.language = "en" self.workDirectory = "/run/media/jf/Datos/Tourist Text Mining/datasets/colombia_en/" self.tagFilename = "tags_en.csv" self.wfFilename = "words_freq_en.csv" ...
true
true
f70bbfe4549985072572f1ddf6fb4774ad2ef538
562
py
Python
tests/static/yaff_test_files/sp/yscript.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
null
null
null
tests/static/yaff_test_files/sp/yscript.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
1
2021-11-02T09:22:56.000Z
2021-11-02T09:22:56.000Z
tests/static/yaff_test_files/sp/yscript.py
t-brink/pyiron
c07552b54a39e3f036ba395325cd4b372af0f794
[ "BSD-3-Clause" ]
1
2021-11-02T08:35:47.000Z
2021-11-02T08:35:47.000Z
#! /usr/bin/python from molmod.units import * from yaff import * import h5py, numpy as np #Setting up system and force field system = System.from_file('system.chk') ff = ForceField.generate(system, 'pars.txt', rcut=15.0*angstrom, alpha_scale=3.2, gcut_scale=1.5, smooth_ei=True) #Setting up output f = h5py.File('outp...
23.416667
113
0.717082
from molmod.units import * from yaff import * import h5py, numpy as np system = System.from_file('system.chk') ff = ForceField.generate(system, 'pars.txt', rcut=15.0*angstrom, alpha_scale=3.2, gcut_scale=1.5, smooth_ei=True) f = h5py.File('output.h5', mode='w') hdf5 = HDF5Writer(f, step=1) r = h5py.File('restart.h5'...
true
true
f70bc02a75fa586549688f9970179c4376a1feab
1,410
py
Python
multiprune_plusone/multiprune_plusone.py
5joono/Swin-Transformer
b5b7e85aa11ad72b2bec2d458fa78066e4c3d0f2
[ "MIT" ]
null
null
null
multiprune_plusone/multiprune_plusone.py
5joono/Swin-Transformer
b5b7e85aa11ad72b2bec2d458fa78066e4c3d0f2
[ "MIT" ]
null
null
null
multiprune_plusone/multiprune_plusone.py
5joono/Swin-Transformer
b5b7e85aa11ad72b2bec2d458fa78066e4c3d0f2
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd os.environ['MKL_THREADING_LAYER'] = 'GNU' # df = pd.DataFrame(columns=['multiprune', 'headstr', 'pluslayer', 'plushead', 'acc1']) # df.to_csv("multiprune_plusone.csv",index=False) prevheadlist = [set([7]),set([11]),set([0]),set([7]),set([9]),set([9])] plusheadlist = [s...
45.483871
285
0.656028
import os import numpy as np import pandas as pd os.environ['MKL_THREADING_LAYER'] = 'GNU' prevheadlist = [set([7]),set([11]),set([0]),set([7]),set([9]),set([9])] plusheadlist = [set(range(12))-{7},set(range(12))-{11},set(range(12))-{0},set(range(12))-{7},set(range(12))-{9},set(range(12))-{9}] for multiprune in rang...
true
true
f70bc203e41ad8b576f3082f590f0bd6ff805df1
1,969
py
Python
pythonturtle/my_turtle.py
Cleverect/PythonTurtle
961f8d13cd835e55efa8fd04ebbcb0120ec7dec4
[ "MIT" ]
114
2019-08-27T11:47:21.000Z
2022-02-22T11:50:49.000Z
pythonturtle/my_turtle.py
Cleverect/PythonTurtle
961f8d13cd835e55efa8fd04ebbcb0120ec7dec4
[ "MIT" ]
31
2019-08-26T22:54:26.000Z
2022-01-10T17:13:27.000Z
pythonturtle/my_turtle.py
Cleverect/PythonTurtle
961f8d13cd835e55efa8fd04ebbcb0120ec7dec4
[ "MIT" ]
38
2019-10-05T07:41:33.000Z
2022-01-15T03:32:23.000Z
import wx from .misc.helpers import deg_to_rad, rad_to_deg from .misc.vector import Vector # Size of the turtle canvas. We assume no user will have a screen # so big that the canvas will be bigger than this. BITMAP_SIZE = Vector((2000, 1200)) # Center of the canvas. origin = BITMAP_SIZE / 2.0 def to_my_angle(angle...
25.907895
75
0.643982
import wx from .misc.helpers import deg_to_rad, rad_to_deg from .misc.vector import Vector BITMAP_SIZE = Vector((2000, 1200)) origin = BITMAP_SIZE / 2.0 def to_my_angle(angle): return rad_to_deg(-angle) - 180 def from_my_angle(angle): return deg_to_rad(-angle + 180) def from_my_pos(pos): return -po...
true
true
f70bc44faef09945bde95e95977b11d93d4dcd31
1,698
py
Python
cmsis-svd-parsing/main.py
michael-christen/prototypes
676dbcfc750b7a0b4a88bcd6a9fc8b109d8cd88f
[ "MIT" ]
null
null
null
cmsis-svd-parsing/main.py
michael-christen/prototypes
676dbcfc750b7a0b4a88bcd6a9fc8b109d8cd88f
[ "MIT" ]
9
2021-03-10T14:00:17.000Z
2022-02-27T02:41:57.000Z
cmsis-svd-parsing/main.py
michael-christen/prototypes
676dbcfc750b7a0b4a88bcd6a9fc8b109d8cd88f
[ "MIT" ]
null
null
null
import click from cmsis_svd.parser import SVDParser MCU_OPTIONS = [ 'STM32F0xx', ] MCU2VENDOR_FILE = { 'STM32F0xx': ('STMicro', 'STM32F0xx.svd'), } ALL = 'show_all' def show_register(register): fields = [] for field in register.fields: upper_index = field.bit_offset + field.bit_width - 1 ...
29.789474
112
0.668433
import click from cmsis_svd.parser import SVDParser MCU_OPTIONS = [ 'STM32F0xx', ] MCU2VENDOR_FILE = { 'STM32F0xx': ('STMicro', 'STM32F0xx.svd'), } ALL = 'show_all' def show_register(register): fields = [] for field in register.fields: upper_index = field.bit_offset + field.bit_width - 1 ...
true
true
f70bc45cd14977ecb22dd06d2ffddc212674349a
14,910
py
Python
mycv/train.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
mycv/train.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
mycv/train.py
duanzhiihao/mycv
184b52f7a5c1b6f603122d4f4050952b65ba0ead
[ "MIT" ]
null
null
null
from mycv.utils.general import disable_multithreads disable_multithreads() import os from pathlib import Path import argparse from tqdm import tqdm import math import torch import torch.cuda.amp as amp from torch.optim.lr_scheduler import LambdaLR from torch.nn.parallel import DistributedDataParallel as DDP import wand...
39.340369
93
0.576526
from mycv.utils.general import disable_multithreads disable_multithreads() import os from pathlib import Path import argparse from tqdm import tqdm import math import torch import torch.cuda.amp as amp from torch.optim.lr_scheduler import LambdaLR from torch.nn.parallel import DistributedDataParallel as DDP import wand...
true
true
f70bc4b73a9f5b613ca9d0d69fb70d4dd3db32df
13,451
py
Python
config/settings/base.py
CrazyMath/smcrm
7027026d450279d63b81147e49cc2be2be622550
[ "MIT" ]
null
null
null
config/settings/base.py
CrazyMath/smcrm
7027026d450279d63b81147e49cc2be2be622550
[ "MIT" ]
null
null
null
config/settings/base.py
CrazyMath/smcrm
7027026d450279d63b81147e49cc2be2be622550
[ "MIT" ]
null
null
null
""" Base settings to build other settings files upon. """ from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent # smcrm/ APPS_DIR = ROOT_DIR / "smcrm" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FILE...
42.701587
100
0.647833
from pathlib import Path import environ ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent APPS_DIR = ROOT_DIR / "smcrm" env = environ.Env() READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) if READ_DOT_ENV_FILE: env.read_env(str(ROOT_DIR / ".env")) DEBUG = env.bool("D...
true
true
f70bc4c80a5039b58b01dee499a76cc5f8cb418b
1,693
py
Python
utils/imgs_getter.py
albertschr/wechat_robot_supported_blockchain
27b257bb9cfc491f0c6b8178a0fe0de9e92dd5c5
[ "MIT" ]
7
2019-04-01T01:04:52.000Z
2019-04-30T09:09:30.000Z
utils/imgs_getter.py
albertschr/wechat_robot_supported_blockchain
27b257bb9cfc491f0c6b8178a0fe0de9e92dd5c5
[ "MIT" ]
6
2019-03-09T03:17:02.000Z
2019-04-03T11:51:13.000Z
utils/imgs_getter.py
leeduckgo/wechat_robot_supported_blockchain
27b257bb9cfc491f0c6b8178a0fe0de9e92dd5c5
[ "MIT" ]
6
2019-03-08T01:50:40.000Z
2019-03-22T02:06:02.000Z
# -*- coding: utf-8 -*- """ 获取YCY图片 """ import json import os import requests from settings import PROJECT_PATH class YCYImage(object): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"...
29.189655
158
0.546958
import json import os import requests from settings import PROJECT_PATH class YCYImage(object): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", } def get_img...
true
true
f70bc60d5ef867aef041dfad4d51b7dc3f6c6c3a
4,772
py
Python
dace/transformation/testing.py
targetsm/dace
297b12804a334df8cc6fad5250d5fb0cce20dc6e
[ "BSD-3-Clause" ]
null
null
null
dace/transformation/testing.py
targetsm/dace
297b12804a334df8cc6fad5250d5fb0cce20dc6e
[ "BSD-3-Clause" ]
null
null
null
dace/transformation/testing.py
targetsm/dace
297b12804a334df8cc6fad5250d5fb0cce20dc6e
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved. import copy from io import StringIO import os import sys import traceback from dace.sdfg import SDFG from dace.transformation.optimizer import Optimizer class TransformationTester(Optimizer): """ An SDFG optimizer that consecutively appl...
34.085714
80
0.548617
import copy from io import StringIO import os import sys import traceback from dace.sdfg import SDFG from dace.transformation.optimizer import Optimizer class TransformationTester(Optimizer): def __init__(self, sdfg: SDFG, depth=1, validate=True, ...
true
true
f70bc898982ac2eebdf07a06cfac61453b208b2a
1,639
py
Python
snake/main/point.py
megh-khaire/SnakeAIs
1dbc76a47a3bb4651c426f04671ae8ae12079c97
[ "Apache-2.0" ]
null
null
null
snake/main/point.py
megh-khaire/SnakeAIs
1dbc76a47a3bb4651c426f04671ae8ae12079c97
[ "Apache-2.0" ]
null
null
null
snake/main/point.py
megh-khaire/SnakeAIs
1dbc76a47a3bb4651c426f04671ae8ae12079c97
[ "Apache-2.0" ]
null
null
null
import pygame from snake.resources.constants import BLOCK_SIZE, WIDTH, HEIGHT from snake.resources.directions import Direction class Point: def __init__(self, x, y): self.x = x self.y = y self.f = 0 self.g = 0 self.h = 0 self.neighbors = [] self.origin = Non...
37.25
93
0.611959
import pygame from snake.resources.constants import BLOCK_SIZE, WIDTH, HEIGHT from snake.resources.directions import Direction class Point: def __init__(self, x, y): self.x = x self.y = y self.f = 0 self.g = 0 self.h = 0 self.neighbors = [] self.origin = Non...
true
true
f70bc89ae28e0a1442364b6237ac83deeb24e3ef
3,508
py
Python
examples/01_modelling/plot_06_synthetic_4d.py
geophysics-ubonn/crtomo_tools
a01b4d31d7250bc729605ae4dc035f108168128e
[ "MIT" ]
2
2021-03-05T14:30:20.000Z
2021-04-16T05:31:07.000Z
examples/01_modelling/plot_06_synthetic_4d.py
geophysics-ubonn/crtomo_tools
a01b4d31d7250bc729605ae4dc035f108168128e
[ "MIT" ]
1
2019-06-06T12:22:26.000Z
2019-06-06T12:22:26.000Z
examples/01_modelling/plot_06_synthetic_4d.py
geophysics-ubonn/crtomo_tools
a01b4d31d7250bc729605ae4dc035f108168128e
[ "MIT" ]
9
2019-02-22T12:17:50.000Z
2021-09-01T01:47:55.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generating a 4D synthetic data set with noise. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A 2D space, time and frequency data set is generated for testing purposes in reda. """ ############################################################################### # import...
37.319149
82
0.586374
import os from glob import glob import numpy as np import crtomo import reda frequencies = np.logspace(-3, 3, 5) grid = crtomo.crt_grid( 'data_synthetic_4d/elem.dat', 'data_synthetic_4d/elec.dat' ) with reda.CreateEnterDirectory('output_synthetic_4d'): for nr, anomaly_z_pos in enumerate(range(0, -10, -3)): ...
true
true
f70bc95dea3ed52a2d7c9b3d4c50969f525e91e1
619
py
Python
test/test_add_contact.py
Atush/py_learning
2c25151882eb0fc8864fd868cf20d04311d2bac7
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
Atush/py_learning
2c25151882eb0fc8864fd868cf20d04311d2bac7
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
Atush/py_learning
2c25151882eb0fc8864fd868cf20d04311d2bac7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.contact import Contact def test_add_contact(app, json_contacts, db, check_ui): contact=json_contacts app.open_home_page() old_contacts = db.get_contact_list() app.contact.create(contact) assert len(old_contacts) + 1 == app.contact.count() new_contacts = db.g...
38.6875
123
0.73021
from model.contact import Contact def test_add_contact(app, json_contacts, db, check_ui): contact=json_contacts app.open_home_page() old_contacts = db.get_contact_list() app.contact.create(contact) assert len(old_contacts) + 1 == app.contact.count() new_contacts = db.get_contact_list() ol...
true
true
f70bcacb9fbd7c0eef2a877d9d13e34b3353d545
6,654
py
Python
src/models/model_evaluate.py
singh-karanpal/Capstone
807ca3f70276a0dd17244a123a759a914d358424
[ "MIT" ]
null
null
null
src/models/model_evaluate.py
singh-karanpal/Capstone
807ca3f70276a0dd17244a123a759a914d358424
[ "MIT" ]
null
null
null
src/models/model_evaluate.py
singh-karanpal/Capstone
807ca3f70276a0dd17244a123a759a914d358424
[ "MIT" ]
null
null
null
# author: Carlina Kim, Karanpal Singh, Sukriti Trehan, Victor Cuspinera # date: 2020-06-21 '''This script will read the saved theme/subtheme model(s), padded validation sets and y validation sets for model evaluation, and will save the evaluation results in the specified directory. There are 2 parameters Input Path ...
42.653846
175
0.625338
import pandas as pd import numpy as np from docopt import docopt from sklearn.metrics import precision_score, recall_score, f1_score, accuracy_score, precision_recall_curve import matplotlib.pyplot as plt import tensorflow.compat.v1 as tf tf.disable_v2_behavior() opt = docopt(__doc__) print("\n-----START: model_e...
true
true
f70bccb51593edf285f53782a14711199b469634
6,083
py
Python
applications/graph/node2vec/randproj.py
aj-prime/lbann
a4cf81386b3f43586057b5312192e180b1259add
[ "Apache-2.0" ]
null
null
null
applications/graph/node2vec/randproj.py
aj-prime/lbann
a4cf81386b3f43586057b5312192e180b1259add
[ "Apache-2.0" ]
5
2021-07-15T20:51:21.000Z
2022-01-01T03:18:05.000Z
applications/graph/node2vec/randproj.py
aj-prime/lbann
a4cf81386b3f43586057b5312192e180b1259add
[ "Apache-2.0" ]
null
null
null
"""Learn embedding weights with LBANN.""" import argparse import os.path import numpy as np import lbann import lbann.contrib.launcher import lbann.contrib.args import data.data_readers import model.random_projection import utils import utils.graph import utils.snap root_dir = os.path.dirname(os.path.realpath(__file...
28.293023
75
0.687161
import argparse import os.path import numpy as np import lbann import lbann.contrib.launcher import lbann.contrib.args import data.data_readers import model.random_projection import utils import utils.graph import utils.snap root_dir = os.path.dirname(os.path.realpath(__file__)) parser = argparse.ArgumentParser() ...
true
true
f70bcdde6c2b7e2b286a382114dbe03ea56ebf57
3,005
py
Python
tests/lib/bes/testing/framework/test_unit_test_inspect.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
tests/lib/bes/testing/framework/test_unit_test_inspect.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
tests/lib/bes/testing/framework/test_unit_test_inspect.py
reconstruir/bes
82ff54b2dadcaef6849d7de424787f1dedace85c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import os.path as path from bes.fs.file_util import file_util from bes.fs.temp_file import temp_file from bes.testing.unit_test import unit_test from bes.testing.framework import unit_test_inspect as UTI fr...
26.130435
90
0.671215
import os.path as path from bes.fs.file_util import file_util from bes.fs.temp_file import temp_file from bes.testing.unit_test import unit_test from bes.testing.framework import unit_test_inspect as UTI from bes.testing.unit_test_skip import raise_skip class test_unit_test_inspect(unit_test): @classmethod def...
true
true
f70bcdea0c2a415ada92517635d009ce45a9da67
840
py
Python
vcx/wrappers/python3/aries-test-server/inviter.py
sklump/indy-sdk
ee05a89ddf60b42f7483bebf2d89a936e12730df
[ "Apache-2.0" ]
636
2017-05-25T07:45:43.000Z
2022-03-23T22:30:34.000Z
vcx/wrappers/python3/aries-test-server/inviter.py
Nick-1979/indy-sdk
e5f812e14962f0d51cf96f843033754ff841ce30
[ "Apache-2.0" ]
731
2017-05-29T07:15:08.000Z
2022-03-31T07:55:58.000Z
vcx/wrappers/python3/aries-test-server/inviter.py
Nick-1979/indy-sdk
e5f812e14962f0d51cf96f843033754ff841ce30
[ "Apache-2.0" ]
904
2017-05-25T07:45:49.000Z
2022-03-31T07:43:31.000Z
import json from vcx.api.connection import Connection from utils import init_vcx, run_coroutine_in_new_loop from connection import BaseConnection class Inviter(BaseConnection): async def start(self): await init_vcx() print("Create a connection to alice and print out the invite details") c...
30
78
0.679762
import json from vcx.api.connection import Connection from utils import init_vcx, run_coroutine_in_new_loop from connection import BaseConnection class Inviter(BaseConnection): async def start(self): await init_vcx() print("Create a connection to alice and print out the invite details") c...
true
true
f70bce271d5d7f26a676fc36c142470dd67601e0
5,593
py
Python
server.py
pgneditor/pgneditor
676334e9325a6d48ac6367d35a03fedf44ec2be9
[ "MIT" ]
2
2019-07-15T00:52:13.000Z
2019-08-04T07:46:56.000Z
server.py
pgneditor/pgneditor
676334e9325a6d48ac6367d35a03fedf44ec2be9
[ "MIT" ]
2
2021-02-08T20:48:35.000Z
2021-06-01T23:45:13.000Z
server.py
pgneditor/pgneditor
676334e9325a6d48ac6367d35a03fedf44ec2be9
[ "MIT" ]
1
2019-08-04T07:47:04.000Z
2019-08-04T07:47:04.000Z
################################################################### import logging import tornado.escape import tornado.ioloop import tornado.options import tornado.web import tornado.websocket import os.path import uuid from os import environ import json from tornado.options import define, options import mimetypes ...
33.491018
122
0.576971
import logging import tornado.escape import tornado.ioloop import tornado.options import tornado.web import tornado.websocket import os.path import uuid from os import environ import json from tornado.options import define, options import mimetypes import random from tornadose.handlers import EventSource from torna...
true
true
f70bcec89189e9db37ce50fe1f17d8e2b524dad4
3,994
py
Python
nova/tests/functional/regressions/test_bug_1689692.py
bopopescu/nova-8
768d7cc0a632e1a880f00c5840c1ec8051e161be
[ "Apache-2.0" ]
null
null
null
nova/tests/functional/regressions/test_bug_1689692.py
bopopescu/nova-8
768d7cc0a632e1a880f00c5840c1ec8051e161be
[ "Apache-2.0" ]
2
2015-02-03T06:25:24.000Z
2015-02-04T10:10:36.000Z
nova/tests/functional/regressions/test_bug_1689692.py
bopopescu/nova-8
768d7cc0a632e1a880f00c5840c1ec8051e161be
[ "Apache-2.0" ]
7
2015-01-20T10:30:08.000Z
2020-02-05T10:29:05.000Z
# Copyright 2017 Huawei Technologies Co.,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 agre...
46.988235
79
0.686279
from nova import test from nova.tests import fixtures as nova_fixtures from nova.tests.functional import integrated_helpers from nova.tests.unit import cast_as_call from nova.tests.unit.image import fake as image_fake from nova.tests.unit import policy_fixture class ServerListLimitMarkerCell0Test(test.TestCase, ...
true
true
f70bd07a185c559699661056ded03831035519a5
12,204
py
Python
isic_archive/models/segmentation_helpers/scikit.py
ImageMarkup/isic-archive
7cd8097886d685ec629e2fcba079271fb77d028f
[ "Apache-2.0" ]
42
2015-12-12T14:05:46.000Z
2022-03-26T15:20:39.000Z
isic_archive/models/segmentation_helpers/scikit.py
ImageMarkup/isic-archive
7cd8097886d685ec629e2fcba079271fb77d028f
[ "Apache-2.0" ]
494
2015-07-09T16:14:12.000Z
2021-03-09T09:37:36.000Z
isic_archive/models/segmentation_helpers/scikit.py
ImageMarkup/uda
d221af3368baf3a06ecab67e69e9d0077426c8f9
[ "Apache-2.0" ]
12
2015-08-20T14:20:48.000Z
2020-10-20T01:14:44.000Z
import collections import io from typing import BinaryIO, Tuple, Union import warnings import numpy import skimage.io import skimage.measure import skimage.morphology import skimage.segmentation import skimage.transform from .base import BaseSegmentationHelper class ScikitSegmentationHelper(BaseSegmentationHelper):...
37.207317
100
0.619879
import collections import io from typing import BinaryIO, Tuple, Union import warnings import numpy import skimage.io import skimage.measure import skimage.morphology import skimage.segmentation import skimage.transform from .base import BaseSegmentationHelper class ScikitSegmentationHelper(BaseSegmentationHelper):...
true
true
f70bd2041fc86759e5bde0e6cb049a727675d6f9
13,026
py
Python
mmdet/models/backbones/res2net.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
mmdet/models/backbones/res2net.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
mmdet/models/backbones/res2net.py
yypurpose/mmdetection
ec6bfd96eae0af047c623f3d1ec31b0b3f1f4a6c
[ "Apache-2.0" ]
null
null
null
import math import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.utils import ge...
37.005682
80
0.513511
import math import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.utils import ge...
true
true
f70bd2c627e3404c5ea43791336a763164c6fba4
1,318
py
Python
HDPython/ast/ast_classes/ast_op_stream_out.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
null
null
null
HDPython/ast/ast_classes/ast_op_stream_out.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
null
null
null
HDPython/ast/ast_classes/ast_op_stream_out.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
1
2021-10-20T20:08:16.000Z
2021-10-20T20:08:16.000Z
from HDPython.ast.ast_classes.ast_base import v_ast_base, add_class import HDPython.hdl_converter as hdl from HDPython.ast.ast_hdl_error import HDPython_error from HDPython.base import HDPython_base class v_re_assigne_rhsift(v_ast_base): def __init__(self,lhs, rhs,context=None, astParser=None): self.lhs ...
33.794872
116
0.695751
from HDPython.ast.ast_classes.ast_base import v_ast_base, add_class import HDPython.hdl_converter as hdl from HDPython.ast.ast_hdl_error import HDPython_error from HDPython.base import HDPython_base class v_re_assigne_rhsift(v_ast_base): def __init__(self,lhs, rhs,context=None, astParser=None): self.lhs ...
true
true
f70bd2ee450be0f82157aa65881304ad6a24cb47
1,884
py
Python
dask_kubernetes/conftest.py
ddelange/dask-kubernetes
42bcf9817ea963bf048f9dd06caec1622656302a
[ "BSD-3-Clause" ]
1
2022-01-20T12:38:27.000Z
2022-01-20T12:38:27.000Z
dask_kubernetes/conftest.py
ddelange/dask-kubernetes
42bcf9817ea963bf048f9dd06caec1622656302a
[ "BSD-3-Clause" ]
null
null
null
dask_kubernetes/conftest.py
ddelange/dask-kubernetes
42bcf9817ea963bf048f9dd06caec1622656302a
[ "BSD-3-Clause" ]
null
null
null
import pytest import pathlib import os import subprocess import tempfile from kopf.testing import KopfRunner from dask_kubernetes.common.utils import check_dependency DIR = pathlib.Path(__file__).parent.absolute() check_dependency("helm") check_dependency("kubectl") check_dependency("docker") @pytest.fixture() a...
25.808219
76
0.701168
import pytest import pathlib import os import subprocess import tempfile from kopf.testing import KopfRunner from dask_kubernetes.common.utils import check_dependency DIR = pathlib.Path(__file__).parent.absolute() check_dependency("helm") check_dependency("kubectl") check_dependency("docker") @pytest.fixture() a...
true
true
f70bd49fe5654e00114c7d8e83bb1de6aef33e5b
1,019
py
Python
bigquery/samples/tests/test_query_to_arrow.py
ryanyuan/google-cloud-python
db481bfdd6816d020d99df0d4caa307358ab1141
[ "Apache-2.0" ]
2
2021-11-26T07:08:43.000Z
2022-03-07T20:20:04.000Z
bigquery/samples/tests/test_query_to_arrow.py
ryanyuan/google-cloud-python
db481bfdd6816d020d99df0d4caa307358ab1141
[ "Apache-2.0" ]
null
null
null
bigquery/samples/tests/test_query_to_arrow.py
ryanyuan/google-cloud-python
db481bfdd6816d020d99df0d4caa307358ab1141
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.966667
74
0.75368
import pyarrow from .. import query_to_arrow def test_query_to_arrow(capsys, client): arrow_table = query_to_arrow.query_to_arrow(client) out, err = capsys.readouterr() assert "Downloaded 8 rows, 2 columns." in out arrow_schema = arrow_table.schema assert arrow_schema.names == ["race", "partic...
true
true
f70bd5b228ad260502fad0f468efc7ec516cb86b
4,898
py
Python
src/oci/autoscaling/models/auto_scaling_policy_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/autoscaling/models/auto_scaling_policy_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/autoscaling/models/auto_scaling_policy_summary.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
29.865854
245
0.64067
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class AutoScalingPolicySummary(object): def __init__(self, **kwargs): self.swagger_types = { 'id': 'str', ...
true
true
f70bd624daea884c43b42cf57519b4e3a69a5311
1,413
py
Python
python/consumer.py
vishnuhd/getting-started-with-apache-kafka
7b900fc419cbcda8ab882121c2a72e63bdc8b2c4
[ "Apache-2.0" ]
14
2018-11-01T16:11:41.000Z
2019-06-03T14:52:03.000Z
python/consumer.py
vishnuhd/getting-started-with-apache-kafka
7b900fc419cbcda8ab882121c2a72e63bdc8b2c4
[ "Apache-2.0" ]
1
2018-10-31T15:39:24.000Z
2018-11-30T03:05:10.000Z
python/consumer.py
vishnuhd/getting-started-with-apache-kafka
7b900fc419cbcda8ab882121c2a72e63bdc8b2c4
[ "Apache-2.0" ]
8
2018-10-31T15:39:39.000Z
2019-06-06T12:21:55.000Z
from confluent_kafka import Consumer, KafkaException, KafkaError import sys import logging from pprint import pformat def print_assignment(consumer, partitions): print('Assignment:', partitions) if __name__ == '__main__': conf = { 'bootstrap.servers': 'localhost:9092', 'group.id': 'de...
31.4
82
0.515924
from confluent_kafka import Consumer, KafkaException, KafkaError import sys import logging from pprint import pformat def print_assignment(consumer, partitions): print('Assignment:', partitions) if __name__ == '__main__': conf = { 'bootstrap.servers': 'localhost:9092', 'group.id': 'de...
true
true
f70bd6f163acbc02bb3dfe9ad87f6d700204f840
73,983
py
Python
WrightTools/data/_data.py
untzag/WrightTools
05480d2f91ceeca422d9e5ac381fce1840207cb0
[ "MIT" ]
12
2017-07-11T15:58:12.000Z
2021-05-10T20:33:26.000Z
WrightTools/data/_data.py
untzag/WrightTools
05480d2f91ceeca422d9e5ac381fce1840207cb0
[ "MIT" ]
808
2015-04-12T00:36:08.000Z
2022-03-27T21:06:06.000Z
WrightTools/data/_data.py
untzag/WrightTools
05480d2f91ceeca422d9e5ac381fce1840207cb0
[ "MIT" ]
9
2017-07-22T18:54:23.000Z
2022-02-17T20:31:05.000Z
"""Central data class and associated.""" # --- import -------------------------------------------------------------------------------------- import collections import operator import functools import warnings import numpy as np import h5py import scipy from scipy.interpolate import griddata, interp1d from .._gr...
38.273668
109
0.541989
import collections import operator import functools import warnings import numpy as np import h5py import scipy from scipy.interpolate import griddata, interp1d from .._group import Group from .. import collection as wt_collection from .. import exceptions as wt_exceptions from .. import kit as wt_kit from .. i...
true
true
f70bd75e36b14f005bee3275929a42154f09dfe5
54,196
py
Python
tensorflow/python/framework/func_graph.py
ahmedsabie/tensorflow
1c47355978f562a6a40cd8b0597e2638fb73e07d
[ "Apache-2.0" ]
2
2020-04-02T11:52:00.000Z
2020-05-29T09:02:00.000Z
tensorflow/python/framework/func_graph.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
1
2020-05-16T01:56:36.000Z
2020-05-16T01:56:36.000Z
tensorflow/python/framework/func_graph.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
1
2021-12-06T17:11:35.000Z
2021-12-06T17:11:35.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...
41.721324
97
0.694811
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections as py_collections import itertools import weakref import numpy as np from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.eager import context from tensorflow.python...
true
true
f70bd7df44af8f81da661aee94f5ea0c7b3f53cd
245
py
Python
scripts/project_package_name/setup.py
godzilla-but-nicer/SporeLoss
8159a628e5f17191254583c053891070ba3d6e7f
[ "MIT" ]
null
null
null
scripts/project_package_name/setup.py
godzilla-but-nicer/SporeLoss
8159a628e5f17191254583c053891070ba3d6e7f
[ "MIT" ]
null
null
null
scripts/project_package_name/setup.py
godzilla-but-nicer/SporeLoss
8159a628e5f17191254583c053891070ba3d6e7f
[ "MIT" ]
1
2022-01-10T00:40:05.000Z
2022-01-10T00:40:05.000Z
#!/usr/bin/env python # encoding: utf-8 from distutils.core import setup setup(name='project_package_name', version='0.1', description = 'project description', author = '...', packages = ['project_package_name'], )
20.416667
43
0.636735
from distutils.core import setup setup(name='project_package_name', version='0.1', description = 'project description', author = '...', packages = ['project_package_name'], )
true
true
f70bda91f9c7115e3b24b393a5a89e703a6ef8f7
2,137
py
Python
model.py
JulianNovakovic/Vislice
061a252e6aafd60157b740cfcca9b2d76ff27926
[ "MIT" ]
null
null
null
model.py
JulianNovakovic/Vislice
061a252e6aafd60157b740cfcca9b2d76ff27926
[ "MIT" ]
null
null
null
model.py
JulianNovakovic/Vislice
061a252e6aafd60157b740cfcca9b2d76ff27926
[ "MIT" ]
null
null
null
STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = '+' PONOVLJENA_CRKA = 'o' NAPACNA_CRKA = '-' ZMAGA = 'W' PORAZ = 'X' class Igra: def __init__(self, geslo, crke): self.geslo = geslo self.crke = crke[:] def napacne_crke(self): return [crka for crka in self.crke if crka not in self.gesl...
24.848837
76
0.560131
STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = '+' PONOVLJENA_CRKA = 'o' NAPACNA_CRKA = '-' ZMAGA = 'W' PORAZ = 'X' class Igra: def __init__(self, geslo, crke): self.geslo = geslo self.crke = crke[:] def napacne_crke(self): return [crka for crka in self.crke if crka not in self.gesl...
true
true
f70bdaa5cd1ef8f895b12e61c5190d35da36ec24
9,996
py
Python
tools/yaml-nic-config-2-script.py
smolar/tripleo-heat-templates
6b858eb39f96cc2a81a115246fd4a2ef6a0b0097
[ "Apache-2.0" ]
null
null
null
tools/yaml-nic-config-2-script.py
smolar/tripleo-heat-templates
6b858eb39f96cc2a81a115246fd4a2ef6a0b0097
[ "Apache-2.0" ]
null
null
null
tools/yaml-nic-config-2-script.py
smolar/tripleo-heat-templates
6b858eb39f96cc2a81a115246fd4a2ef6a0b0097
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
33.884746
87
0.560524
import argparse import collections import datetime import os import re import shutil import six import sys import traceback import yaml def parse_opts(argv): parser = argparse.ArgumentParser( description='Convert an old style NIC config file into the new format ' 'using run-os-net-con...
true
true
f70bdc3a15e7b88c2514b1fcf2a401008c840d78
336
py
Python
geekshop/basketapp/urls.py
TonyBrother32/Django-shop
723a1eb9ff5b74fa968e8c09268bbcbb2fed857c
[ "MIT" ]
null
null
null
geekshop/basketapp/urls.py
TonyBrother32/Django-shop
723a1eb9ff5b74fa968e8c09268bbcbb2fed857c
[ "MIT" ]
null
null
null
geekshop/basketapp/urls.py
TonyBrother32/Django-shop
723a1eb9ff5b74fa968e8c09268bbcbb2fed857c
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'basketapp' urlpatterns = [ path('', views.view, name='view'), path('add/<int:product_id>/', views.add, name='add'), path('remove/<int:basket_item_id>)/', views.remove, name='remove'), path('edit/<int:basket_item_id>/<int:quantity>/', views.edit,...
30.545455
78
0.666667
from django.urls import path from . import views app_name = 'basketapp' urlpatterns = [ path('', views.view, name='view'), path('add/<int:product_id>/', views.add, name='add'), path('remove/<int:basket_item_id>)/', views.remove, name='remove'), path('edit/<int:basket_item_id>/<int:quantity>/', views.edit,...
true
true
f70bddf32a2b465ec48d7297b542087af6cbef33
1,441
py
Python
google/cloud/monitoring_dashboard/v1/__init__.py
vam-google/python-monitoring-dashboards
effbff2703ade03269ad8ddacf4ab31637d8a799
[ "Apache-2.0" ]
null
null
null
google/cloud/monitoring_dashboard/v1/__init__.py
vam-google/python-monitoring-dashboards
effbff2703ade03269ad8ddacf4ab31637d8a799
[ "Apache-2.0" ]
null
null
null
google/cloud/monitoring_dashboard/v1/__init__.py
vam-google/python-monitoring-dashboards
effbff2703ade03269ad8ddacf4ab31637d8a799
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
34.309524
81
0.762665
from __future__ import absolute_import import sys import warnings from google.cloud.monitoring_dashboard.v1 import types from google.cloud.monitoring_dashboard.v1.gapic import dashboards_service_client from google.cloud.monitoring_dashboard.v1.gapic import enums if sys.version_info[:2] == (2, 7): message = ( ...
true
true
f70bdf29fab61dd93d8f8216d53970e02f7898fe
170
py
Python
tum/computational-aspects-of-machine-learning/paper/sgd.py
nyxcalamity/classwork
dfe47a40fe57ec5e0ccfd672a8dcaf246386de99
[ "Apache-2.0" ]
8
2017-02-10T19:12:21.000Z
2020-09-03T00:08:40.000Z
tum/computational-aspects-of-machine-learning/paper/sgd.py
nyxcalamity/classwork
dfe47a40fe57ec5e0ccfd672a8dcaf246386de99
[ "Apache-2.0" ]
null
null
null
tum/computational-aspects-of-machine-learning/paper/sgd.py
nyxcalamity/classwork
dfe47a40fe57ec5e0ccfd672a8dcaf246386de99
[ "Apache-2.0" ]
15
2016-05-02T11:00:28.000Z
2022-01-20T03:55:35.000Z
for (x_t,y_t) in data_set: loss_fn = f(w, x_t, y_t) # compute gradient d_loss_fn_wrt_w = ... w -= gamma * d_loss_fn_wrt_w if <stopping condition is met>: return w
21.25
32
0.682353
for (x_t,y_t) in data_set: loss_fn = f(w, x_t, y_t) d_loss_fn_wrt_w = ... w -= gamma * d_loss_fn_wrt_w if <stopping condition is met>: return w
false
true
f70bdf701bbdb41d790f24af7996716a5faf0ff5
7,004
py
Python
python/GafferUI/Editor.py
sebaDesmet/gaffer
47b2d093c40452bd77947e3b5bd0722a366c8d59
[ "BSD-3-Clause" ]
null
null
null
python/GafferUI/Editor.py
sebaDesmet/gaffer
47b2d093c40452bd77947e3b5bd0722a366c8d59
[ "BSD-3-Clause" ]
null
null
null
python/GafferUI/Editor.py
sebaDesmet/gaffer
47b2d093c40452bd77947e3b5bd0722a366c8d59
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
32.276498
121
0.719446
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import types import IECore import Gaffer import GafferUI from Qt import QtCore from Qt import QtWidgets class _EditorMetaclass( Gaffer.Trackable.__class__ ) : def __call__( cls, *args, **kw ) : instance = type.__call__( cls, *args, *...
true
true
f70be103caf3bbb85e059906041c636a547700ab
4,304
py
Python
tests/fixtures/pooldata.py
curvefi/deposit-and-stake-zap
2183cfa03d23b9a1e572d46332d73ad30b39845d
[ "MIT" ]
null
null
null
tests/fixtures/pooldata.py
curvefi/deposit-and-stake-zap
2183cfa03d23b9a1e572d46332d73ad30b39845d
[ "MIT" ]
null
null
null
tests/fixtures/pooldata.py
curvefi/deposit-and-stake-zap
2183cfa03d23b9a1e572d46332d73ad30b39845d
[ "MIT" ]
null
null
null
import pytest import brownie from brownie import Contract, ZERO_ADDRESS # gusd gusd_token_address = "0xD2967f45c4f384DEEa880F807Be904762a3DeA07" gusd_gauge_addresses = "0xC5cfaDA84E902aD92DD40194f0883ad49639b023" # susd susd_token_address = '0xC25a3A3b969415c80451098fa907EC722572917F' susd_gauge_address = '0xA9099689...
31.881481
124
0.766496
import pytest import brownie from brownie import Contract, ZERO_ADDRESS gusd_token_address = "0xD2967f45c4f384DEEa880F807Be904762a3DeA07" gusd_gauge_addresses = "0xC5cfaDA84E902aD92DD40194f0883ad49639b023" susd_token_address = '0xC25a3A3b969415c80451098fa907EC722572917F' susd_gauge_address = '0xA90996896660DEcC6E9976...
true
true
f70be13b3acd2839e94011c785fa155fb31ccdcb
31,880
py
Python
app/weibo/parsers.py
lin5547/cola
10e968ec55babf4d64135922e0c5e20b6a862fca
[ "Apache-2.0" ]
null
null
null
app/weibo/parsers.py
lin5547/cola
10e968ec55babf4d64135922e0c5e20b6a862fca
[ "Apache-2.0" ]
null
null
null
app/weibo/parsers.py
lin5547/cola
10e968ec55babf4d64135922e0c5e20b6a862fca
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright (c) 2013 Qin Xuye <qin@qinxuye.me> 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...
41.892247
109
0.476066
''' Copyright (c) 2013 Qin Xuye <qin@qinxuye.me> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
false
true
f70be16b7667d5ef4e1fe1961c226707b73ee15d
795
py
Python
todo/task/repository.py
matiasjavierlucero/todo-challenge
4c0dbc518a5e8fc9d99b6034163be14246fd6666
[ "MIT" ]
null
null
null
todo/task/repository.py
matiasjavierlucero/todo-challenge
4c0dbc518a5e8fc9d99b6034163be14246fd6666
[ "MIT" ]
null
null
null
todo/task/repository.py
matiasjavierlucero/todo-challenge
4c0dbc518a5e8fc9d99b6034163be14246fd6666
[ "MIT" ]
null
null
null
from decimal import Decimal from django.db.models import Sum from django.shortcuts import get_object_or_404 from datetime import date, timedelta from .models import Task class TaskRepository: """Repository for tasks.""" def list(self): return Task.objects.all() def create(self, title: str, descr...
25.645161
64
0.654088
from decimal import Decimal from django.db.models import Sum from django.shortcuts import get_object_or_404 from datetime import date, timedelta from .models import Task class TaskRepository: def list(self): return Task.objects.all() def create(self, title: str, description: str, status: int): ...
true
true
f70be1a781ef564608b08997e1b98fa857b29328
17,551
py
Python
sdk/python/pulumi_azure_nextgen/network/v20190401/express_route_circuit_peering.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190401/express_route_circuit_peering.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190401/express_route_circuit_peering.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
51.469208
2,845
0.685089
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['ExpressRouteCircuitPeering'] class ExpressRouteCircuitPeering(pulumi.CustomResource): def __init__(__self__,...
true
true
f70be1eb045c7bfc67774263850d50bd2296ed60
1,394
py
Python
mdn/yari/testing/integration/conftest.py
private-face/webextensions-docset
9743056dbb3d3ccd8a20a665fcb0f98d388819a6
[ "MIT" ]
1
2021-11-22T20:01:26.000Z
2021-11-22T20:01:26.000Z
mdn/yari/testing/integration/conftest.py
Kapeli/mdn-offline-build
e700fcc597be32dde7a2cdadeaa56343ccf0a678
[ "MIT" ]
1
2021-07-02T18:35:07.000Z
2021-07-02T18:35:07.000Z
mdn/yari/testing/integration/conftest.py
Kapeli/mdn-offline-build
e700fcc597be32dde7a2cdadeaa56343ccf0a678
[ "MIT" ]
2
2021-06-21T12:09:37.000Z
2021-07-02T12:15:52.000Z
from urllib.parse import urlsplit, urlunsplit import pytest import requests _KUMA_STATUS = None def pytest_configure(config): """Configure pytest for the Kuma deployment under test.""" global _KUMA_STATUS # The pytest-base-url plugin adds --base-url, and sets the default from # environment variab...
27.88
84
0.721664
from urllib.parse import urlsplit, urlunsplit import pytest import requests _KUMA_STATUS = None def pytest_configure(config): global _KUMA_STATUS if config.option.base_url is None: config.option.base_url = "https://developer.allizom.org" base_url = config.getoption("base_url") ...
true
true
f70be1fc76ddddc85e3bee71647489d92784fa4f
74
py
Python
indoorair/foundations/urls.py
juby-gif/indoorair_webapp-b
51f8799e8b124748bec7f1e52a3b73bcb4c119a8
[ "BSD-3-Clause" ]
null
null
null
indoorair/foundations/urls.py
juby-gif/indoorair_webapp-b
51f8799e8b124748bec7f1e52a3b73bcb4c119a8
[ "BSD-3-Clause" ]
null
null
null
indoorair/foundations/urls.py
juby-gif/indoorair_webapp-b
51f8799e8b124748bec7f1e52a3b73bcb4c119a8
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ ]
9.25
28
0.675676
from django.urls import path from . import views urlpatterns = [ ]
true
true
f70be2546519bf0303806a830af9c2a53f69831e
3,946
py
Python
test/functional/feature_minchainwork.py
puzcoin/catcoin
dc3ad8d15b0c3303e8396514dffeb7685f0edf63
[ "MIT" ]
null
null
null
test/functional/feature_minchainwork.py
puzcoin/catcoin
dc3ad8d15b0c3303e8396514dffeb7685f0edf63
[ "MIT" ]
null
null
null
test/functional/feature_minchainwork.py
puzcoin/catcoin
dc3ad8d15b0c3303e8396514dffeb7685f0edf63
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 The Catcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for setting nMinimumChainWork on command line. Nodes don't consider themselves out of "initial b...
43.844444
108
0.701977
import time from test_framework.test_framework import CatcoinTestFramework from test_framework.util import connect_nodes, assert_equal REGTEST_WORK_PER_BLOCK = 2 class MinimumChainWorkTest(CatcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 3 ...
true
true
f70be362165a8cf117cba8d1545702e5e64fc642
783
py
Python
data structures/array/1.4 palindromePermutation.py
iFun/Algo
e9e2d42c72c595e0cd138dcb0150b6a1bdc7c073
[ "MIT" ]
null
null
null
data structures/array/1.4 palindromePermutation.py
iFun/Algo
e9e2d42c72c595e0cd138dcb0150b6a1bdc7c073
[ "MIT" ]
null
null
null
data structures/array/1.4 palindromePermutation.py
iFun/Algo
e9e2d42c72c595e0cd138dcb0150b6a1bdc7c073
[ "MIT" ]
null
null
null
# given a string check if its palindromePermutation def solution(s): s = s.replace(' ','') if len(s) == 0 or len (s) == 1: return True if len(s) == 2: return s[0] == s[1] hashTable = [0] * 128 for i in xrange(0,len(s)): tmp = ord(s[i]) if hashTable[tmp] ...
25.258065
55
0.510856
def solution(s): s = s.replace(' ','') if len(s) == 0 or len (s) == 1: return True if len(s) == 2: return s[0] == s[1] hashTable = [0] * 128 for i in xrange(0,len(s)): tmp = ord(s[i]) if hashTable[tmp] == 0: hashTable[tmp] = 1 else: ...
false
true
f70be36c4203d27c522cdba5e3ca275e4037d7b3
15,955
py
Python
qzone/Qzone.py
lwpdzq/spiders
68f471f3dd92e1a59fe9ccc130fd529f1def3644
[ "MIT" ]
null
null
null
qzone/Qzone.py
lwpdzq/spiders
68f471f3dd92e1a59fe9ccc130fd529f1def3644
[ "MIT" ]
null
null
null
qzone/Qzone.py
lwpdzq/spiders
68f471f3dd92e1a59fe9ccc130fd529f1def3644
[ "MIT" ]
null
null
null
import time import re import random import requests from urllib import parse import qq_init as qq import pymongo from selenium import webdriver from selenium.webdriver.chrome.options import Options class Spider(object): def __init__(self): ''' 初始化 ''' chrome_options...
51.302251
471
0.443936
import time import re import random import requests from urllib import parse import qq_init as qq import pymongo from selenium import webdriver from selenium.webdriver.chrome.options import Options class Spider(object): def __init__(self): chrome_options = Options() s...
true
true
f70be413dfeca425596a01e87c4bbb46375b6a26
1,194
py
Python
src/napalm_digineo_procurve/device.py
digineo/napalm-digineo-procurve
477befcd09b0ce209c42f9742b2c4bb0986fceb8
[ "Apache-2.0" ]
4
2019-06-07T07:59:56.000Z
2020-12-09T19:27:56.000Z
src/napalm_digineo_procurve/device.py
digineo/napalm-digineo-procurve
477befcd09b0ce209c42f9742b2c4bb0986fceb8
[ "Apache-2.0" ]
1
2021-03-31T19:04:16.000Z
2021-03-31T19:04:16.000Z
src/napalm_digineo_procurve/device.py
digineo/napalm-digineo-procurve
477befcd09b0ce209c42f9742b2c4bb0986fceb8
[ "Apache-2.0" ]
1
2019-12-24T11:05:24.000Z
2019-12-24T11:05:24.000Z
import typing import netmiko import napalm_digineo_procurve.queries.interfaces import napalm_digineo_procurve.queries.lldp_neighbors import napalm_digineo_procurve.queries.device_info import napalm_digineo_procurve.queries.system_info import napalm_digineo_procurve.queries.uptime def get_uptime(device: netmiko.Base...
31.421053
75
0.836683
import typing import netmiko import napalm_digineo_procurve.queries.interfaces import napalm_digineo_procurve.queries.lldp_neighbors import napalm_digineo_procurve.queries.device_info import napalm_digineo_procurve.queries.system_info import napalm_digineo_procurve.queries.uptime def get_uptime(device: netmiko.Base...
true
true
f70be4df0b57c7639cd90df01dd882374cfb6959
413
py
Python
test.py
Oversize204/cvbpy_show_cases
ccd352761aa9bfab220feb888e6639f3cb9a5ad7
[ "MIT" ]
null
null
null
test.py
Oversize204/cvbpy_show_cases
ccd352761aa9bfab220feb888e6639f3cb9a5ad7
[ "MIT" ]
null
null
null
test.py
Oversize204/cvbpy_show_cases
ccd352761aa9bfab220feb888e6639f3cb9a5ad7
[ "MIT" ]
null
null
null
import os import cvb print("acquire images from CVMock.vin") device = cvb.DeviceFactory.open("/opt/cvb/drivers/CVMock.vin") stream = device.stream stream.start() for i in range(5): image, status = stream.wait() if status == cvb.WaitStatus.Ok: image_file = os.path.join(".", ".cvb", "test" + str(i) + ...
22.944444
72
0.644068
import os import cvb print("acquire images from CVMock.vin") device = cvb.DeviceFactory.open("/opt/cvb/drivers/CVMock.vin") stream = device.stream stream.start() for i in range(5): image, status = stream.wait() if status == cvb.WaitStatus.Ok: image_file = os.path.join(".", ".cvb", "test" + str(i) + ...
true
true
f70be525727b66a9997338896913e2083a32e400
222
py
Python
MinkowskiEngine/MinkowskiFunctional.py
dendisuhubdy/MinkowskiEngine
a1cdcba68ef925bfefed2fe161f62e1ec78573b9
[ "MIT" ]
1
2019-05-12T00:06:10.000Z
2019-05-12T00:06:10.000Z
MinkowskiEngine/MinkowskiFunctional.py
dendisuhubdy/MinkowskiEngine
a1cdcba68ef925bfefed2fe161f62e1ec78573b9
[ "MIT" ]
null
null
null
MinkowskiEngine/MinkowskiFunctional.py
dendisuhubdy/MinkowskiEngine
a1cdcba68ef925bfefed2fe161f62e1ec78573b9
[ "MIT" ]
null
null
null
import torch.nn.functional as F from SparseTensor import SparseTensor def relu(input): output = F.relu(input.F) return SparseTensor( output, coords_key=input.coords_key, coords_manager=input.coords_man)
22.2
77
0.752252
import torch.nn.functional as F from SparseTensor import SparseTensor def relu(input): output = F.relu(input.F) return SparseTensor( output, coords_key=input.coords_key, coords_manager=input.coords_man)
true
true
f70be67a2d18174e2398b18aa0d130f82252a8f8
994
py
Python
app/core/models.py
shreyask543/Recipe-api
34c43db4ee6cdcd90cdcf8e88a536ef66452ddb6
[ "MIT" ]
null
null
null
app/core/models.py
shreyask543/Recipe-api
34c43db4ee6cdcd90cdcf8e88a536ef66452ddb6
[ "MIT" ]
null
null
null
app/core/models.py
shreyask543/Recipe-api
34c43db4ee6cdcd90cdcf8e88a536ef66452ddb6
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): if not email: raise ValueError('User must have an email address') ...
29.235294
90
0.709256
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): if not email: raise ValueError('User must have an email address') ...
true
true
f70be7041aa102cb22498dc3b3b101939f65d8a3
40,028
py
Python
training/networks_stylegan2_unweighted.py
RuiLiFeng/noise
545c049fbafa8b4edad09286cf631b4c8fb6a251
[ "BSD-Source-Code" ]
null
null
null
training/networks_stylegan2_unweighted.py
RuiLiFeng/noise
545c049fbafa8b4edad09286cf631b4c8fb6a251
[ "BSD-Source-Code" ]
null
null
null
training/networks_stylegan2_unweighted.py
RuiLiFeng/noise
545c049fbafa8b4edad09286cf631b4c8fb6a251
[ "BSD-Source-Code" ]
null
null
null
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html """Network architectures used in the StyleGAN2 paper.""" import numpy as np import tensorfl...
53.228723
238
0.610048
 """Network architectures used in the StyleGAN2 paper.""" import numpy as np import tensorflow as tf import dnnlib import dnnlib.tflib as tflib from dnnlib.tflib.ops.upfirdn_2d import upsample_2d, downsample_2d, upsample_conv_2d, conv_downsample_2d from dnnlib.tflib.ops.fused_bias_act import fused_bias_act def get...
false
true
f70be84014189656325b4993a31615b0adec7c88
3,617
py
Python
rbac/common/role/reject_owner.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
null
null
null
rbac/common/role/reject_owner.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
1
2018-09-10T19:12:31.000Z
2018-09-10T19:12:31.000Z
rbac/common/role/reject_owner.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
34.447619
79
0.656345
import logging from rbac.common import addresser from rbac.common.proposal.proposal_reject import ProposalReject LOGGER = logging.getLogger(__name__) class RejectAddRoleOwner(ProposalReject): def __init__(self): super().__init__() self._register() @property def message_action_type(self)...
true
true
f70be9c29d438c8bd7ae0af6ada925b74f12119d
781
py
Python
src/c3nav/editor/tasks.py
johnjohndoe/c3nav
a17f863a3512e305595c16b0300796b6bae81241
[ "Apache-2.0" ]
132
2016-11-12T01:45:23.000Z
2022-03-08T15:17:10.000Z
src/c3nav/editor/tasks.py
johnjohndoe/c3nav
a17f863a3512e305595c16b0300796b6bae81241
[ "Apache-2.0" ]
66
2016-09-29T09:46:19.000Z
2022-03-11T23:26:18.000Z
src/c3nav/editor/tasks.py
johnjohndoe/c3nav
a17f863a3512e305595c16b0300796b6bae81241
[ "Apache-2.0" ]
42
2016-09-29T08:34:57.000Z
2022-03-08T15:17:15.000Z
import logging from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail from c3nav.celery import app logger = logging.getLogger('c3nav') @app.task(bind=True, max_retries=3) def send_changeset_proposed_notification(self, pk, author, title, description): ...
31.24
79
0.644046
import logging from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail from c3nav.celery import app logger = logging.getLogger('c3nav') @app.task(bind=True, max_retries=3) def send_changeset_proposed_notification(self, pk, author, title, description): ...
true
true