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
1c040ac7a8f7fd90c09ba5a43ff638b9bff2897f
1,788
py
Python
tests/modules/service_directory/test_plan.py
00inboxtest/cloud-foundation-fabric
ee25965c895aa4bc3f62090a08b797d45b82d178
[ "Apache-2.0" ]
null
null
null
tests/modules/service_directory/test_plan.py
00inboxtest/cloud-foundation-fabric
ee25965c895aa4bc3f62090a08b797d45b82d178
[ "Apache-2.0" ]
null
null
null
tests/modules/service_directory/test_plan.py
00inboxtest/cloud-foundation-fabric
ee25965c895aa4bc3f62090a08b797d45b82d178
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
30.827586
78
0.717002
import os import pytest FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') @pytest.fixture def resources(plan_runner): _, resources = plan_runner(FIXTURES_DIR) return resources def test_resource_count(resources): assert len(resources) == 9 def test_iam(resources): bindings = [r['values'...
true
true
1c040b316ccbba42af7be2accdda279097ff1b08
2,520
py
Python
core/domain/object_registry.py
JeeveshGarg/oppia
8d4efdb2b1521eb6432ddc12e7bed55c8e90db06
[ "Apache-2.0" ]
1
2021-12-17T15:21:23.000Z
2021-12-17T15:21:23.000Z
core/domain/object_registry.py
JeeveshGarg/oppia
8d4efdb2b1521eb6432ddc12e7bed55c8e90db06
[ "Apache-2.0" ]
null
null
null
core/domain/object_registry.py
JeeveshGarg/oppia
8d4efdb2b1521eb6432ddc12e7bed55c8e90db06
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 The Oppia 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 applicable ...
31.898734
77
0.685714
from __future__ import annotations import copy import inspect import json from core import constants from core import feconf from extensions.objects.models import objects class Registry: objects_dict = {} @classmethod def _refresh_registry(cls): cls.objects_dict.clear() ...
true
true
1c040b570d8bc54b6fefd216ead2f65abda808ac
5,303
py
Python
python_ToDoApp_Abhishek/example.py
prantoran/cockroachdb-todo-apps
5bbb9009e4cefe56ea13d6205d66c62f61487145
[ "Apache-2.0" ]
64
2020-09-16T14:01:11.000Z
2021-10-12T06:57:09.000Z
python_ToDoApp_Abhishek/example.py
prantoran/cockroachdb-todo-apps
5bbb9009e4cefe56ea13d6205d66c62f61487145
[ "Apache-2.0" ]
23
2020-09-14T23:07:33.000Z
2021-10-08T13:38:45.000Z
python_ToDoApp_Abhishek/example.py
prantoran/cockroachdb-todo-apps
5bbb9009e4cefe56ea13d6205d66c62f61487145
[ "Apache-2.0" ]
114
2020-09-16T17:30:57.000Z
2021-10-08T02:09:31.000Z
""" Test psycopg with CockroachDB. """ import time import random import logging from argparse import ArgumentParser import psycopg2 from psycopg2.errors import SerializationFailure def create_accounts(conn): with conn.cursor() as cur: cur.execute( "CREATE TABLE IF NOT EXISTS accounts (id IN...
31.754491
88
0.625306
import time import random import logging from argparse import ArgumentParser import psycopg2 from psycopg2.errors import SerializationFailure def create_accounts(conn): with conn.cursor() as cur: cur.execute( "CREATE TABLE IF NOT EXISTS accounts (id INT PRIMARY KEY, balance INT)" ) ...
true
true
1c040ba9d1a9e92c5741f8e559eb10157957524e
1,857
py
Python
plugins/trustedcoin/cmdline.py
bitcoinpostquantum/electrumpq
dbbc2a493aff904923cd8112fc5bb07802df272c
[ "MIT" ]
1
2019-04-15T04:30:12.000Z
2019-04-15T04:30:12.000Z
plugins/trustedcoin/cmdline.py
bitcoinpostquantum/electrumpq
dbbc2a493aff904923cd8112fc5bb07802df272c
[ "MIT" ]
3
2019-06-20T11:55:27.000Z
2019-08-03T09:03:41.000Z
plugins/trustedcoin/cmdline.py
bitcoinpostquantum/electrumpq
dbbc2a493aff904923cd8112fc5bb07802df272c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including withou...
40.369565
71
0.720517
from electrumpq.i18n import _ from electrumpq.plugins import hook from .trustedcoin import TrustedCoinPlugin class Plugin(TrustedCoinPlugin): @hook def sign_tx(self, wallet, tx): if not isinstance(wallet, self.wallet_class): return if not wallet.can_sign_without_server(): ...
true
true
1c040bbc0da4a3fcff71f110f88725031480987f
8,642
py
Python
utils/helpers.py
vincekurtz/valkyrie_drake
253cf809db7b00f24a901ac1e4ee8aed0df1d6b2
[ "MIT" ]
5
2020-09-12T15:43:24.000Z
2022-03-23T01:15:49.000Z
utils/helpers.py
vincekurtz/valkyrie_drake
253cf809db7b00f24a901ac1e4ee8aed0df1d6b2
[ "MIT" ]
null
null
null
utils/helpers.py
vincekurtz/valkyrie_drake
253cf809db7b00f24a901ac1e4ee8aed0df1d6b2
[ "MIT" ]
2
2020-09-14T16:00:38.000Z
2020-12-17T10:48:13.000Z
## # # Helper functions related to simulating a Valkyrie Humanoid # ## import time import numpy as np import cdd def AddQuadraticConstraint(mp, Q, b, c, x): """ Add a quadratic constraint to the given Drake mathematical program mp, x'*Q*x + b'*x + c <= 0. Works by reformulating the constraint as...
29.59589
99
0.551724
import time import numpy as np import cdd def AddQuadraticConstraint(mp, Q, b, c, x): n = x.shape[0] assert x.shape == (n,1) , "x must by nx1 numpy array" assert Q.shape == (n,n) , "Q must be nxn numpy array" assert b.shape == (n,1) , "b must be nx1 numpy array" assert isinstance(c, (int, lon...
true
true
1c040bcac0aaddb1b71aa78d77d2117bfbe0b387
255
py
Python
src/bertlv/config.py
philipschoemig/BER-TLV
e116bb5add7c40809e54bca67d9d7ac66f406ce6
[ "BSD-3-Clause" ]
4
2021-01-10T13:22:51.000Z
2022-03-02T10:05:49.000Z
src/bertlv/config.py
philipschoemig/BER-TLV
e116bb5add7c40809e54bca67d9d7ac66f406ce6
[ "BSD-3-Clause" ]
23
2020-07-09T00:21:02.000Z
2021-11-29T20:03:50.000Z
src/bertlv/config.py
philipschoemig/BER-TLV
e116bb5add7c40809e54bca67d9d7ac66f406ce6
[ "BSD-3-Clause" ]
1
2021-05-14T12:12:45.000Z
2021-05-14T12:12:45.000Z
from bertlv.utils import XML_SETTINGS_DEFAULT # Configure strict checking of TLV encoding strict_checking = False # Configure codec for string en-/decoding encoding = "utf-8" # Configure settings for writing XML files xml_settings = XML_SETTINGS_DEFAULT
28.333333
45
0.819608
from bertlv.utils import XML_SETTINGS_DEFAULT strict_checking = False encoding = "utf-8" xml_settings = XML_SETTINGS_DEFAULT
true
true
1c040bfdcae9df1e785c75de8e88a487817e7012
10,775
py
Python
venv/lib/python3.7/site-packages/storages/backends/gcloud.py
maximematerno/energySaver_HVAC
e5f649da622e8421a39e3654fd1cbab1eed38183
[ "MIT" ]
1
2021-09-23T00:06:51.000Z
2021-09-23T00:06:51.000Z
venv/lib/python3.7/site-packages/storages/backends/gcloud.py
maximematerno/energySaver_HVAC
e5f649da622e8421a39e3654fd1cbab1eed38183
[ "MIT" ]
9
2021-03-19T03:06:53.000Z
2022-03-12T00:37:04.000Z
myvenv/lib/python3.6/site-packages/storages/backends/gcloud.py
yog240597/saleor
b75a23827a4ec2ce91637f0afe6808c9d09da00a
[ "CC-BY-4.0" ]
1
2020-11-01T04:03:38.000Z
2020-11-01T04:03:38.000Z
import mimetypes import warnings from datetime import timedelta from tempfile import SpooledTemporaryFile from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files.base import File from django.core.files.storage import Storage from django.utils import timezone from django.util...
36.157718
95
0.631647
import mimetypes import warnings from datetime import timedelta from tempfile import SpooledTemporaryFile from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files.base import File from django.core.files.storage import Storage from django.utils import timezone from django.util...
true
true
1c040ce74eac6e8236370381657627a1f7164526
13,891
py
Python
google/cloud/aiplatform_v1beta1/services/migration_service/transports/grpc.py
kweinmeister/python-aiplatform
ef9fb2b9fa5f5c1dbb74e3d37ee9a7d949892ce0
[ "Apache-2.0" ]
1
2021-11-17T12:07:09.000Z
2021-11-17T12:07:09.000Z
google/cloud/aiplatform_v1beta1/services/migration_service/transports/grpc.py
kweinmeister/python-aiplatform
ef9fb2b9fa5f5c1dbb74e3d37ee9a7d949892ce0
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform_v1beta1/services/migration_service/transports/grpc.py
kweinmeister/python-aiplatform
ef9fb2b9fa5f5c1dbb74e3d37ee9a7d949892ce0
[ "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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
44.380192
102
0.647038
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import grpc_helpers from google.api_core import operations_v1 from google.api_core import gapic_v1 import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc impor...
true
true
1c040d24c8123167abfbc419532e3cb7b60ac573
15,203
py
Python
flaxlight/harvester/harvester_api.py
Flax-Network/flax-light-wallet
1745850a28a47bbbc4b5f3d460f35b34b4ed4f25
[ "Apache-2.0" ]
1
2021-12-02T14:38:11.000Z
2021-12-02T14:38:11.000Z
flaxlight/harvester/harvester_api.py
Flax-Network/flax-light-wallet
1745850a28a47bbbc4b5f3d460f35b34b4ed4f25
[ "Apache-2.0" ]
null
null
null
flaxlight/harvester/harvester_api.py
Flax-Network/flax-light-wallet
1745850a28a47bbbc4b5f3d460f35b34b4ed4f25
[ "Apache-2.0" ]
6
2021-11-21T00:38:27.000Z
2021-12-03T01:25:19.000Z
import asyncio import time from pathlib import Path from typing import Callable, List, Tuple from blspy import AugSchemeMPL, G2Element, G1Element from flaxlight.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters from flaxlight.harvester.harvester import Harvester from flaxlight....
49.521173
117
0.586003
import asyncio import time from pathlib import Path from typing import Callable, List, Tuple from blspy import AugSchemeMPL, G2Element, G1Element from flaxlight.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters from flaxlight.harvester.harvester import Harvester from flaxlight....
true
true
1c040eb24547f3205dee5ed7dfaf1696484b1118
181
py
Python
csa_new/csa_new/doctype/race/race.py
Jishnu70055/user_management
82d3d2c85a62c7f1162633c164cb7d50e229d2fd
[ "MIT" ]
null
null
null
csa_new/csa_new/doctype/race/race.py
Jishnu70055/user_management
82d3d2c85a62c7f1162633c164cb7d50e229d2fd
[ "MIT" ]
null
null
null
csa_new/csa_new/doctype/race/race.py
Jishnu70055/user_management
82d3d2c85a62c7f1162633c164cb7d50e229d2fd
[ "MIT" ]
null
null
null
# Copyright (c) 2021, sd and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class Race(Document): pass
20.111111
49
0.779006
from frappe.model.document import Document class Race(Document): pass
true
true
1c040f1ab0dc1da000d07d8b032af913c6cace90
8,899
py
Python
autoregressive_diffusion/utils/util_fns.py
xxdreck/google-research
dac724bc2b9362d65c26747a8754504fe4c615f8
[ "Apache-2.0" ]
2
2022-01-21T18:15:34.000Z
2022-01-25T15:21:34.000Z
autoregressive_diffusion/utils/util_fns.py
xxdreck/google-research
dac724bc2b9362d65c26747a8754504fe4c615f8
[ "Apache-2.0" ]
110
2021-10-01T18:22:38.000Z
2021-12-27T22:08:31.000Z
autoregressive_diffusion/utils/util_fns.py
admariner/google-research
7cee4b22b925581d912e8d993625c180da2a5a4f
[ "Apache-2.0" ]
1
2022-02-10T10:43:10.000Z
2022-02-10T10:43:10.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...
31.006969
105
0.66794
import io import os from typing import Optional import flax import imageio import jax import jax.numpy as jnp import matplotlib.pyplot as plt import numpy as np import tensorflow as tf Array = jnp.ndarray def get_iterator( ds, prefetch = 3): it = map(lambda x: jax.tree_map(lambda y: y._numpy(), x), it...
true
true
1c040f3ce33cb0871ad9773c9c8bc60d6cf77a36
91
py
Python
abastece/apps.py
lembon/atizar
579ef6212e9b2582beb86c5e14339b0615ec16ee
[ "Apache-2.0" ]
null
null
null
abastece/apps.py
lembon/atizar
579ef6212e9b2582beb86c5e14339b0615ec16ee
[ "Apache-2.0" ]
null
null
null
abastece/apps.py
lembon/atizar
579ef6212e9b2582beb86c5e14339b0615ec16ee
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class AbasteceConfig(AppConfig): name = 'abastece'
15.166667
33
0.758242
from django.apps import AppConfig class AbasteceConfig(AppConfig): name = 'abastece'
true
true
1c040fcf3d56692b7d29692f3fe439b5e6a5669e
930
py
Python
dqn/exercise/model.py
silviomori/udacity-deep-reinforcement-learning-nanodegree
4b217ad39d119361fad84e1eaae6396432de341a
[ "MIT" ]
null
null
null
dqn/exercise/model.py
silviomori/udacity-deep-reinforcement-learning-nanodegree
4b217ad39d119361fad84e1eaae6396432de341a
[ "MIT" ]
7
2019-12-16T22:05:12.000Z
2022-02-10T00:14:16.000Z
dqn/exercise/model.py
silviomori/udacity-deep-reinforcement-learning-nanodegree
4b217ad39d119361fad84e1eaae6396432de341a
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F class QNetwork(nn.Module): """Actor (Policy) Model.""" def __init__(self, state_size, action_size, seed, hidden_nodes=64): """Initialize parameters and build model. Params ====== state_size (int): Dimension ...
33.214286
71
0.592473
import torch import torch.nn as nn import torch.nn.functional as F class QNetwork(nn.Module): def __init__(self, state_size, action_size, seed, hidden_nodes=64): super(QNetwork, self).__init__() self.seed = torch.manual_seed(seed) self.fc1 = nn.Linear(state_size, hidden_nodes) ...
true
true
1c041091fc1619e90080234f0158a28602194d5e
41,111
py
Python
tensorflow/contrib/keras/python/keras/models.py
xincao79/tensorflow
7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64
[ "Apache-2.0" ]
13
2017-02-22T02:20:06.000Z
2018-06-06T04:18:03.000Z
tensorflow/contrib/keras/python/keras/models.py
xincao79/tensorflow
7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64
[ "Apache-2.0" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
tensorflow/contrib/keras/python/keras/models.py
xincao79/tensorflow
7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64
[ "Apache-2.0" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.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...
34.547059
119
0.644377
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import json import os import warnings import numpy as np from tensorflow.contrib.keras.python.keras import backend as K from tensorflow.contrib.keras.python.keras import layers as layer_module fr...
true
true
1c0410c76184a69c37d0d077aa74cf80a0d0c9e4
3,196
py
Python
python/openpyxl/utils/datetime.py
Aragos/tichu-tournament
4cdf727a30af8820ad56fe3097ec9a8e84892068
[ "MIT" ]
7
2016-12-12T02:29:42.000Z
2020-05-12T21:21:21.000Z
python/openpyxl/utils/datetime.py
Aragos/tichu-tournament
4cdf727a30af8820ad56fe3097ec9a8e84892068
[ "MIT" ]
31
2017-01-05T06:07:28.000Z
2018-05-27T13:13:06.000Z
python/openpyxl/utils/datetime.py
Aragos/tichu-tournament
4cdf727a30af8820ad56fe3097ec9a8e84892068
[ "MIT" ]
3
2017-12-21T23:30:12.000Z
2019-01-03T20:51:52.000Z
from __future__ import absolute_import from __future__ import division # Copyright (c) 2010-2016 openpyxl """Manage Excel date weirdness.""" # Python stdlib imports import datetime from datetime import timedelta, tzinfo from math import isnan import re #from jdcal import ( # gcal2jd, # jd2gcal, # MJD_0 #) ...
26.857143
97
0.656133
from __future__ import absolute_import from __future__ import division import datetime from datetime import timedelta, tzinfo from math import isnan import re MAC_EPOCH = datetime.date(1904, 1, 1) WINDOWS_EPOCH = datetime.date(1899, 12, 30) CALENDAR_WINDOWS_1900 = 0 CALENDAR_MAC_1904 = 0 SECS_PER_DAY = 86400 EPOC...
true
true
1c0410e75589e3e61b8f55e3bc3d639405040312
408
py
Python
kite-go/lang/python/testcorpus/hover/buffer.py
kiteco/kiteco-public
74aaf5b9b0592153b92f7ed982d65e15eea885e3
[ "BSD-3-Clause" ]
17
2022-01-10T11:01:50.000Z
2022-03-25T03:21:08.000Z
kite-go/lang/python/testcorpus/hover/buffer.py
kiteco/kiteco-public
74aaf5b9b0592153b92f7ed982d65e15eea885e3
[ "BSD-3-Clause" ]
1
2022-01-13T14:28:47.000Z
2022-01-13T14:28:47.000Z
kite-go/lang/python/testcorpus/hover/buffer.py
kiteco/kiteco-public
74aaf5b9b0592153b92f7ed982d65e15eea885e3
[ "BSD-3-Clause" ]
7
2022-01-07T03:58:10.000Z
2022-03-24T07:38:20.000Z
# # can't resolve things defined in this file for now, since buffer-based symbols aren't yet supported # def foobar(): # pass import main duplicate_function_alias_alias = main.duplicate_function_alias import json dumps_alias = json.dumps # enc = json.JSONEncoder() # instances don't work # myInstance = main.MyCla...
25.5
102
0.745098
import main duplicate_function_alias_alias = main.duplicate_function_alias import json dumps_alias = json.dumps # myInstance = main.MyClass() # instances don't work main.MyClass()
true
true
1c04119f500f58660e5053833ec656bb54822ef9
1,020
py
Python
pyfakefs/tests/fixtures/deprecated_property.py
yarikoptic/pyfakefs
4ff65237e50661a1cd62e77ab529dfe0460c4f99
[ "Apache-2.0" ]
422
2015-03-19T06:03:48.000Z
2022-03-31T00:06:45.000Z
pyfakefs/tests/fixtures/deprecated_property.py
yarikoptic/pyfakefs
4ff65237e50661a1cd62e77ab529dfe0460c4f99
[ "Apache-2.0" ]
510
2015-03-19T18:35:04.000Z
2022-03-28T20:59:01.000Z
pyfakefs/tests/fixtures/deprecated_property.py
yarikoptic/pyfakefs
4ff65237e50661a1cd62e77ab529dfe0460c4f99
[ "Apache-2.0" ]
95
2015-03-17T20:25:57.000Z
2022-03-28T18:04:45.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
34
76
0.748039
import warnings class DeprecatedProperty: def __get__(self, instance, cls): warnings.warn("async is deprecated", DeprecationWarning) warnings.warn("async will be replaced", FutureWarning) return instance class DeprecationTest: locals()['async'] = DeprecatedProperty()
true
true
1c0411d32f95a3e394df70eb9fc314cde33661d9
1,016
py
Python
schooner/jtd/JTDAssignment.py
Jasata/utu-schooner
fc6f23c843160dcc2549762580fb31d6388cd042
[ "MIT" ]
null
null
null
schooner/jtd/JTDAssignment.py
Jasata/utu-schooner
fc6f23c843160dcc2549762580fb31d6388cd042
[ "MIT" ]
null
null
null
schooner/jtd/JTDAssignment.py
Jasata/utu-schooner
fc6f23c843160dcc2549762580fb31d6388cd042
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Schooner - Course Management System # University of Turku / Faculty of Technilogy / Department of Computing # (c) 2021, Jani Tammi <jasata@utu.fi> # # JTDAssignment.py - Jinja Template Data for an assignment # 2021-08-28 Initial version. # class JTDAssignment(dict)...
26.736842
98
0.498031
class JTDAssignment(dict): def __init__(self, cursor, course_id: str, assignment_id: int, uid: str): SQL = """ SELECT * FROM email.jtd_assignment_rec( %(course_id)s, %(assignment_id)s, %(uid)s ) """ ...
true
true
1c0411e68a2bd220840220e6a57eb3370455065c
1,158
py
Python
tests/benchmark_binary.py
AGaliciaMartinez/qutip-tensorflow
1768387250271d6083626c10b83ea86bbb973ebf
[ "BSD-3-Clause" ]
null
null
null
tests/benchmark_binary.py
AGaliciaMartinez/qutip-tensorflow
1768387250271d6083626c10b83ea86bbb973ebf
[ "BSD-3-Clause" ]
null
null
null
tests/benchmark_binary.py
AGaliciaMartinez/qutip-tensorflow
1768387250271d6083626c10b83ea86bbb973ebf
[ "BSD-3-Clause" ]
null
null
null
"""This file contains the unary operations that will be benchmarked. All the functions in this file should return the function that will be tested. The tested funtion must have as inputs: A: input 2D array dtype: data type of A (np, tf, qt.data.Dense ... ) rep: number of times that the operations will be...
23.16
88
0.645941
import warnings import numpy as np import scipy as sc import qutip as qt with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=DeprecationWarning) import tensorflow as tf def get_matmul(dtype): def matmul(A, B, dtype, rep): for _ in range(rep): x = A@B ...
true
true
1c04123745cb0b856a3548e080d9e9c4191b6ced
1,621
py
Python
sfrmaker/test/test_version.py
mnfienen/sfrmaker
f3ee175c67c80df15bff509235d9a6218bfc6b0b
[ "CC0-1.0" ]
17
2015-08-15T02:20:04.000Z
2020-04-30T17:36:21.000Z
sfrmaker/test/test_version.py
rfrederiksen/sfrmaker
7e66d67d6cb0ad84fbb9994402f0baaf5b3fcd01
[ "CC0-1.0" ]
15
2015-03-04T16:57:13.000Z
2020-01-14T16:29:18.000Z
sfrmaker/test/test_version.py
rfrederiksen/sfrmaker
7e66d67d6cb0ad84fbb9994402f0baaf5b3fcd01
[ "CC0-1.0" ]
9
2015-08-18T14:15:07.000Z
2020-04-28T18:45:21.000Z
""" check for consistancy in package version """ import os from packaging import version import pandas as pd import sfrmaker import pytest def get_readme_version(project_root_path): readme_file = os.path.join(project_root_path, 'Readme.md') with open(readme_file) as src: for line in src: i...
34.489362
77
0.639112
import os from packaging import version import pandas as pd import sfrmaker import pytest def get_readme_version(project_root_path): readme_file = os.path.join(project_root_path, 'Readme.md') with open(readme_file) as src: for line in src: if '# version' in line.lower(): ve...
true
true
1c0412dc7adf5b3d3655292b719cf514ebf74a8c
486
py
Python
Account/migrations/0008_auto_20201015_1703.py
oereo/Hackton_8th_test
786bc804f07d9b3b3c1e7785e70b83c570f37450
[ "MIT" ]
3
2020-09-22T00:24:17.000Z
2020-10-11T03:44:57.000Z
Account/migrations/0008_auto_20201015_1703.py
oereo/Hackton_8th_test
786bc804f07d9b3b3c1e7785e70b83c570f37450
[ "MIT" ]
11
2020-09-21T19:04:39.000Z
2020-10-19T18:08:14.000Z
Account/migrations/0008_auto_20201015_1703.py
oereo/Hackton_8th_test
786bc804f07d9b3b3c1e7785e70b83c570f37450
[ "MIT" ]
1
2020-09-22T00:24:23.000Z
2020-09-22T00:24:23.000Z
# Generated by Django 3.1 on 2020-10-15 17:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Account', '0007_auto_20201013_1655'), ] operations = [ migrations.RemoveField( model_name='user', name='env_point', ...
21.130435
49
0.567901
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Account', '0007_auto_20201013_1655'), ] operations = [ migrations.RemoveField( model_name='user', name='env_point', ), migrations.AddField( ...
true
true
1c04146820d1d5dae790e53fc71833b6b884b432
1,321
py
Python
app/core/tests/test_admin.py
minhbk/recipe-app-api
0cba11e7dc33e6ac9be0c372137c5961e6e3146b
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
minhbk/recipe-app-api
0cba11e7dc33e6ac9be0c372137c5961e6e3146b
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
minhbk/recipe-app-api
0cba11e7dc33e6ac9be0c372137c5961e6e3146b
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@gmail.com', ...
31.452381
69
0.639667
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@gmail.com', ...
true
true
1c04148841d39497692f93fc15d8c8396ca2efa6
21,796
py
Python
google/cloud/compute_v1/services/region_operations/transports/rest.py
LaudateCorpus1/python-compute
a36c637f153c7b4ef49bb6a78c8b09f3746e7af1
[ "Apache-2.0" ]
null
null
null
google/cloud/compute_v1/services/region_operations/transports/rest.py
LaudateCorpus1/python-compute
a36c637f153c7b4ef49bb6a78c8b09f3746e7af1
[ "Apache-2.0" ]
null
null
null
google/cloud/compute_v1/services/region_operations/transports/rest.py
LaudateCorpus1/python-compute
a36c637f153c7b4ef49bb6a78c8b09f3746e7af1
[ "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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.85205
105
0.591072
from google.auth.transport.requests import AuthorizedSession import json import grpc from google.auth.transport.grpc import SslCredentials from google.auth import credentials as ga_credentials from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries from google.api_co...
true
true
1c0415e61e234beabbab3b9408ff5edb1a1c575d
1,533
py
Python
theory/stiffpanelbay/bladestiff1d_clt_donnell_bardell/print_expressions_python.py
mrosemeier/compmech
f18f6d0471c72b26a3b014d2df41df3463505eae
[ "BSD-3-Clause" ]
4
2019-02-05T06:12:12.000Z
2022-03-25T14:41:18.000Z
theory/multidomain_panels/bladestiff1d_clt_donnell_bardell/print_expressions_python.py
saullocastro/panels
5387daab1ec656b065f7a9be820e2c234e53764e
[ "BSD-3-Clause" ]
null
null
null
theory/multidomain_panels/bladestiff1d_clt_donnell_bardell/print_expressions_python.py
saullocastro/panels
5387daab1ec656b065f7a9be820e2c234e53764e
[ "BSD-3-Clause" ]
2
2019-06-05T07:19:35.000Z
2020-12-29T00:22:18.000Z
import os import glob from ast import literal_eval import numpy as np import sympy from sympy import pi, sin, cos, var from compmech.conecyl.sympytools import mprint_as_sparse var('fAuxi, fBuxi, gAu, gBu, fAu, fBu, gAueta, gBueta') var('fAvxi, fBvxi, fAv, fBv, gAv, gBv, gAveta, gBveta') var('fAwxixi, fBwxixi, gAw, g...
31.285714
97
0.56621
import os import glob from ast import literal_eval import numpy as np import sympy from sympy import pi, sin, cos, var from compmech.conecyl.sympytools import mprint_as_sparse var('fAuxi, fBuxi, gAu, gBu, fAu, fBu, gAueta, gBueta') var('fAvxi, fBvxi, fAv, fBv, gAv, gBv, gAveta, gBveta') var('fAwxixi, fBwxixi, gAw, g...
true
true
1c041686e5078a23e57682dc59dc6bd2c9431daf
3,464
py
Python
certbot-dns-digitalocean/setup.py
Xebax/certbot
95a6b61cdc630dff91b9e9368914c04bd2a6a146
[ "Apache-2.0" ]
null
null
null
certbot-dns-digitalocean/setup.py
Xebax/certbot
95a6b61cdc630dff91b9e9368914c04bd2a6a146
[ "Apache-2.0" ]
null
null
null
certbot-dns-digitalocean/setup.py
Xebax/certbot
95a6b61cdc630dff91b9e9368914c04bd2a6a146
[ "Apache-2.0" ]
null
null
null
from distutils.version import LooseVersion import os import sys from setuptools import __version__ as setuptools_version from setuptools import find_packages from setuptools import setup from setuptools.command.test import test as TestCommand version = '1.9.0.dev0' # Remember to update local-oldest-requirements.txt ...
32.990476
99
0.652136
from distutils.version import LooseVersion import os import sys from setuptools import __version__ as setuptools_version from setuptools import find_packages from setuptools import setup from setuptools.command.test import test as TestCommand version = '1.9.0.dev0' install_requires = [ 'python-digitalocean>=1.11...
true
true
1c0416a354a6d62351dbcee9c2b3bc90eaf9b3de
956
py
Python
quilt3_local/quilt3_local/context.py
admariner/quilt
e8ff056f6c58b2e54028f45a0b4a14e255df857c
[ "Apache-2.0" ]
null
null
null
quilt3_local/quilt3_local/context.py
admariner/quilt
e8ff056f6c58b2e54028f45a0b4a14e255df857c
[ "Apache-2.0" ]
32
2021-10-06T20:06:16.000Z
2021-12-27T13:22:19.000Z
quilt3_local/quilt3_local/context.py
admariner/quilt
e8ff056f6c58b2e54028f45a0b4a14e255df857c
[ "Apache-2.0" ]
null
null
null
import contextvars from . import async_cache QUILT_CONTEXT = contextvars.ContextVar("quilt_context") class QuiltContext: def __init__(self): self.cache = {} def __enter__(self): self._token = QUILT_CONTEXT.set(self) def __exit__(self, *_): QUILT_CONTEXT.reset(self._token) cla...
22.232558
70
0.658996
import contextvars from . import async_cache QUILT_CONTEXT = contextvars.ContextVar("quilt_context") class QuiltContext: def __init__(self): self.cache = {} def __enter__(self): self._token = QUILT_CONTEXT.set(self) def __exit__(self, *_): QUILT_CONTEXT.reset(self._token) cla...
true
true
1c0416edeea4b5510b8be6aba249c268a814c64d
278
py
Python
app/user/urls.py
JCNapier/recipe-app-api
498ff8b337ba32a077c5e7e4e189d1241239b53b
[ "MIT" ]
null
null
null
app/user/urls.py
JCNapier/recipe-app-api
498ff8b337ba32a077c5e7e4e189d1241239b53b
[ "MIT" ]
null
null
null
app/user/urls.py
JCNapier/recipe-app-api
498ff8b337ba32a077c5e7e4e189d1241239b53b
[ "MIT" ]
null
null
null
#helper funciton from django to help define different paths in our app from django.urls import path #imports views from user import views app_name = 'user' urlpatterns = [ path('create/', views.CreateUserView.as_view(), name='create'), ] #update urls.py in app/app/urls.py
25.272727
70
0.748201
from django.urls import path from user import views app_name = 'user' urlpatterns = [ path('create/', views.CreateUserView.as_view(), name='create'), ]
true
true
1c0417b1961dc5119e2942446e39e825ed30422e
4,252
py
Python
6 objectSwarmObserverAgents_AESOP_turtleLib_NetworkX/$$slapp$$/graphicControl.py
vishalbelsare/SLAPP3
da187b771831aaaabaee16a26ad341db2e968104
[ "CC0-1.0" ]
8
2017-10-18T05:19:17.000Z
2020-03-24T21:23:52.000Z
6 objectSwarmObserverAgents_AESOP_turtleLib_NetworkX/$$slapp$$/graphicControl.py
vishalbelsare/SLAPP3
da187b771831aaaabaee16a26ad341db2e968104
[ "CC0-1.0" ]
null
null
null
6 objectSwarmObserverAgents_AESOP_turtleLib_NetworkX/$$slapp$$/graphicControl.py
vishalbelsare/SLAPP3
da187b771831aaaabaee16a26ad341db2e968104
[ "CC0-1.0" ]
4
2017-10-25T09:07:49.000Z
2019-08-18T09:17:58.000Z
import sys import os import commonVar as common common.graphicStatus = "" def checkRunningIn(): try: __IPYTHON__ return True except NameError: return False def graphicControl(): # IPython/Python IPython = checkRunningIn() # running in Python (not in IPython) if not ...
34.852459
106
0.597131
import sys import os import commonVar as common common.graphicStatus = "" def checkRunningIn(): try: __IPYTHON__ return True except NameError: return False def graphicControl(): IPython = checkRunningIn() if not IPython: # support pylab inte...
true
true
1c0418308dfc94dbf1423489e4117799f3e029bb
1,779
py
Python
test/python/test_connected_components.py
mhaseeb123/TECA
4233bac9dd2a86da3848ae088b462b4544b3ddc7
[ "BSD-3-Clause-LBNL" ]
34
2017-03-28T14:22:25.000Z
2022-01-23T05:02:25.000Z
test/python/test_connected_components.py
mhaseeb123/TECA
4233bac9dd2a86da3848ae088b462b4544b3ddc7
[ "BSD-3-Clause-LBNL" ]
476
2016-11-28T18:06:06.000Z
2022-01-25T05:31:42.000Z
test/python/test_connected_components.py
mhaseeb123/TECA
4233bac9dd2a86da3848ae088b462b4544b3ddc7
[ "BSD-3-Clause-LBNL" ]
19
2017-04-25T18:15:04.000Z
2020-11-28T18:16:05.000Z
from teca import * import sys set_stack_trace_on_error() if not len(sys.argv) == 9: sys.stderr.write('test_conn_comp.py [dataset regex] [z_var] ' \ '[u_var] [v_var] [threshold] [first step] [last step] [out file]\n') sys.exit(-1) data_regex = sys.argv[1] x_var = 'lon' y_var = 'lat' z_var = sys.argv[2...
26.552239
76
0.790894
from teca import * import sys set_stack_trace_on_error() if not len(sys.argv) == 9: sys.stderr.write('test_conn_comp.py [dataset regex] [z_var] ' \ '[u_var] [v_var] [threshold] [first step] [last step] [out file]\n') sys.exit(-1) data_regex = sys.argv[1] x_var = 'lon' y_var = 'lat' z_var = sys.argv[2...
true
true
1c04199ec590c7f4057d26567e51d69c276d87d2
319
py
Python
reporting/config/docs.py
ahmad18189/reporting
bae6e2c81f0ed435a90875c7faf6205c0ea6cfe9
[ "MIT" ]
null
null
null
reporting/config/docs.py
ahmad18189/reporting
bae6e2c81f0ed435a90875c7faf6205c0ea6cfe9
[ "MIT" ]
null
null
null
reporting/config/docs.py
ahmad18189/reporting
bae6e2c81f0ed435a90875c7faf6205c0ea6cfe9
[ "MIT" ]
1
2019-01-30T20:37:17.000Z
2019-01-30T20:37:17.000Z
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/reporting" # docs_base_url = "https://[org_name].github.io/reporting" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "Reporting"
26.583333
68
0.727273
def get_context(context): context.brand_html = "Reporting"
true
true
1c041aff4f323386e8d414de2dd4c26ec29cc182
3,000
py
Python
src/cr/sparse/_src/io/resource.py
carnot-shailesh/cr-sparse
989ebead8a8ac37ade643093e1caa31ae2a3eda1
[ "Apache-2.0" ]
42
2021-06-11T17:11:29.000Z
2022-03-29T11:51:44.000Z
src/cr/sparse/_src/io/resource.py
carnot-shailesh/cr-sparse
989ebead8a8ac37ade643093e1caa31ae2a3eda1
[ "Apache-2.0" ]
19
2021-06-04T11:36:11.000Z
2022-01-22T20:13:39.000Z
src/cr/sparse/_src/io/resource.py
carnot-shailesh/cr-sparse
989ebead8a8ac37ade643093e1caa31ae2a3eda1
[ "Apache-2.0" ]
5
2021-11-21T21:01:11.000Z
2022-02-28T07:20:03.000Z
# Copyright 2021 CR.Sparse Development Team # # 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...
29.411765
124
0.648333
from pathlib import Path import re import urllib from urllib.parse import urlparse import requests from dataclasses import dataclass _INITIALIZED = False CACHE_DIR = '' def is_valid_url(url): regex = re.compile( r'^https?://' r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?|' ...
true
true
1c041be6ce7573a54a205e82f6fc6b26905d91cc
2,163
py
Python
abci/example/python/app.py
n-hutton/cosmos-consensus
5cfe6c1bbc77150f9151683c25b4649170bf8045
[ "Apache-2.0" ]
241
2018-02-14T05:15:31.000Z
2022-02-06T12:21:26.000Z
abci/example/python/app.py
n-hutton/cosmos-consensus
5cfe6c1bbc77150f9151683c25b4649170bf8045
[ "Apache-2.0" ]
423
2021-04-21T05:46:11.000Z
2022-03-31T11:18:55.000Z
abci/example/python/app.py
n-hutton/cosmos-consensus
5cfe6c1bbc77150f9151683c25b4649170bf8045
[ "Apache-2.0" ]
99
2017-01-17T06:05:20.000Z
2022-03-28T06:16:20.000Z
import sys from abci.wire import hex2bytes, decode_big_endian, encode_big_endian from abci.server import ABCIServer from abci.reader import BytesBuffer class CounterApplication(): def __init__(self): sys.exit("The python example is out of date. Upgrading the Python examples is currently left as an exer...
26.060241
126
0.562644
import sys from abci.wire import hex2bytes, decode_big_endian, encode_big_endian from abci.server import ABCIServer from abci.reader import BytesBuffer class CounterApplication(): def __init__(self): sys.exit("The python example is out of date. Upgrading the Python examples is currently left as an exer...
false
true
1c041c1d3115368a621ee03695a788bf164928fe
4,376
py
Python
samples/python/digits_adjust.py
thisisgopalmandal/opencv
4e2ef8c8f57644ccb8e762a37f70a61007c6be1c
[ "BSD-3-Clause" ]
56,632
2016-07-04T16:36:08.000Z
2022-03-31T18:38:14.000Z
samples/python/digits_adjust.py
thisisgopalmandal/opencv
4e2ef8c8f57644ccb8e762a37f70a61007c6be1c
[ "BSD-3-Clause" ]
13,593
2016-07-04T13:59:03.000Z
2022-03-31T21:04:51.000Z
samples/python/digits_adjust.py
thisisgopalmandal/opencv
4e2ef8c8f57644ccb8e762a37f70a61007c6be1c
[ "BSD-3-Clause" ]
54,986
2016-07-04T14:24:38.000Z
2022-03-31T22:51:18.000Z
#!/usr/bin/env python ''' Digit recognition adjustment. Grid search is used to find the best parameters for SVM and KNearest classifiers. SVM adjustment follows the guidelines given in http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf Usage: digits_adjust.py [--model {svm|knearest}] --model {svm|knearest}...
31.035461
81
0.593693
from __future__ import print_function import sys PY3 = sys.version_info[0] == 3 if PY3: xrange = range import numpy as np import cv2 as cv from multiprocessing.pool import ThreadPool from digits import * def cross_validate(model_class, params, samples, labels, kfold = 3, pool = None): n = len(samples) ...
true
true
1c041d92d0e18b646ef8263db0c9ae0702bd9dc6
13,509
py
Python
sisua/analysis/sc_metrics.py
trungnt13/sisua
27c01002aaac5b33947946a483bfb6678273bc83
[ "MIT" ]
18
2019-05-09T14:48:53.000Z
2021-07-05T16:23:58.000Z
sisua/analysis/sc_metrics.py
trungnt13/sisua
27c01002aaac5b33947946a483bfb6678273bc83
[ "MIT" ]
1
2020-04-03T03:28:58.000Z
2020-07-02T13:43:02.000Z
sisua/analysis/sc_metrics.py
trungnt13/sisua
27c01002aaac5b33947946a483bfb6678273bc83
[ "MIT" ]
3
2021-02-23T07:40:42.000Z
2021-09-14T09:36:28.000Z
from __future__ import absolute_import, division, print_function from abc import ABCMeta, abstractmethod from collections import defaultdict from numbers import Number from typing import List, Union import numpy as np import tensorflow as tf from six import add_metaclass from tensorflow.python.keras.callbacks import ...
33.521092
80
0.625435
from __future__ import absolute_import, division, print_function from abc import ABCMeta, abstractmethod from collections import defaultdict from numbers import Number from typing import List, Union import numpy as np import tensorflow as tf from six import add_metaclass from tensorflow.python.keras.callbacks import ...
true
true
1c041fe4bad4132ae75654b26a20565821e1c539
2,437
py
Python
bontofrom/convert_metadata.py
BONSAMURAIS/bontofrom
ff4caa4f2cc8ac898d47a5b44e089a8b5681e556
[ "BSD-3-Clause" ]
null
null
null
bontofrom/convert_metadata.py
BONSAMURAIS/bontofrom
ff4caa4f2cc8ac898d47a5b44e089a8b5681e556
[ "BSD-3-Clause" ]
8
2019-03-27T10:19:59.000Z
2019-03-29T12:17:50.000Z
bontofrom/convert_metadata.py
BONSAMURAIS/bontofrom
ff4caa4f2cc8ac898d47a5b44e089a8b5681e556
[ "BSD-3-Clause" ]
null
null
null
import json from bontofrom.load_metadata import get_metadata from pathlib import Path output_dir = Path(__file__).parent / "output" EXIOBASE_DOCKER = """ Please run the following to convert JSON-LD to TTL: cd "{0}" docker run -it --rm -v `pwd`:/rdf stain/jena riot -out Turtle bontofrom/output/flowobject.js...
33.383562
138
0.593763
import json from bontofrom.load_metadata import get_metadata from pathlib import Path output_dir = Path(__file__).parent / "output" EXIOBASE_DOCKER = """ Please run the following to convert JSON-LD to TTL: cd "{0}" docker run -it --rm -v `pwd`:/rdf stain/jena riot -out Turtle bontofrom/output/flowobject.js...
true
true
1c0420c203e01319106dedefffcd10dad7e5225e
10,360
py
Python
barbante/maintenance/tasks.py
hypermindr/barbante
40056e9e4f4564461294b3a1d9afc855062350ac
[ "MIT" ]
10
2015-06-01T21:48:16.000Z
2021-08-20T20:18:48.000Z
barbante/maintenance/tasks.py
hypermindr/barbante
40056e9e4f4564461294b3a1d9afc855062350ac
[ "MIT" ]
null
null
null
barbante/maintenance/tasks.py
hypermindr/barbante
40056e9e4f4564461294b3a1d9afc855062350ac
[ "MIT" ]
2
2015-06-03T21:54:32.000Z
2015-11-24T23:13:05.000Z
""" Maintenance tasks. """ from time import time import traceback import barbante.config as config import barbante.maintenance.user_templates as ut import barbante.maintenance.product_templates as pt import barbante.maintenance.product_templates_tfidf as pt_tfidf import barbante.maintenance.product as prd import barb...
44.273504
120
0.705598
from time import time import traceback import barbante.config as config import barbante.maintenance.user_templates as ut import barbante.maintenance.product_templates as pt import barbante.maintenance.product_templates_tfidf as pt_tfidf import barbante.maintenance.product as prd import barbante.utils.logging as barba...
true
true
1c04211ac918aac884a4a4590ee67113f9286ff8
2,270
py
Python
setup.py
xLeon-python/pyContabo
9863bd1ab0f95b50186902c90c40ce53d3026afd
[ "MIT" ]
5
2022-01-03T10:34:35.000Z
2022-01-27T10:34:41.000Z
setup.py
xLeon-python/pyContabo
9863bd1ab0f95b50186902c90c40ce53d3026afd
[ "MIT" ]
4
2022-01-14T10:37:57.000Z
2022-01-20T20:44:54.000Z
setup.py
xLeon-python/pyContabo
9863bd1ab0f95b50186902c90c40ce53d3026afd
[ "MIT" ]
1
2022-01-20T14:59:32.000Z
2022-01-20T14:59:32.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package meta-data. NAME = 'pyContabo' DESCRIPTION = 'An (unofficial) Python API client for the Contabo API' URL = 'https://github.com/xLeon-python/pyContabo' E...
28.734177
81
0.666079
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command NAME = 'pyContabo' DESCRIPTION = 'An (unofficial) Python API client for the Contabo API' URL = 'https://github.com/xLeon-python/pyContabo' EMAIL = 'support@contabo.com' AUTHOR = 'xLeon-python' REQUIRES_PYTHO...
true
true
1c04217edc16d968d4f2299b110e07a6e41bb4b6
119,692
py
Python
sympy/solvers/diophantine/diophantine.py
skieffer/sympy
23ab5c14881aef21409918939e0c8b78b7fcb06f
[ "BSD-3-Clause" ]
1
2021-08-06T07:38:42.000Z
2021-08-06T07:38:42.000Z
sympy/solvers/diophantine/diophantine.py
Nbede/sympy
2ead5bfe4716c36e1c0839c25aa6dc87cd85b0f2
[ "BSD-3-Clause" ]
5
2021-09-14T07:51:13.000Z
2021-11-20T19:19:11.000Z
sympy/solvers/diophantine/diophantine.py
sonntagsgesicht/sympy
fd94b018b0266fa9a04f463218a0d424ee11ae10
[ "BSD-3-Clause" ]
null
null
null
from sympy.core.add import Add from sympy.core.assumptions import check_assumptions from sympy.core.containers import Tuple from sympy.core.compatibility import as_int, is_sequence, ordered from sympy.core.exprtools import factor_terms from sympy.core.function import _mexpand from sympy.core.mul import Mul from sympy.c...
29.990479
125
0.527095
from sympy.core.add import Add from sympy.core.assumptions import check_assumptions from sympy.core.containers import Tuple from sympy.core.compatibility import as_int, is_sequence, ordered from sympy.core.exprtools import factor_terms from sympy.core.function import _mexpand from sympy.core.mul import Mul from sympy.c...
true
true
1c0422272149aa757c89ba5c318cbd41c1e5cff8
936
py
Python
app/main/model/post_category.py
jnwanya/online-forum-flask-api
5f9876c970ae838eb9880a3590143e7670b419c6
[ "MIT" ]
null
null
null
app/main/model/post_category.py
jnwanya/online-forum-flask-api
5f9876c970ae838eb9880a3590143e7670b419c6
[ "MIT" ]
null
null
null
app/main/model/post_category.py
jnwanya/online-forum-flask-api
5f9876c970ae838eb9880a3590143e7670b419c6
[ "MIT" ]
null
null
null
from .. import db from .enums import RecordStatus class PostCategory(db.Model): __tablename__ = 'post_category' id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(150), nullable=False, unique=True) description = db.Column(db.Text, nullable=True) status = db...
30.193548
121
0.678419
from .. import db from .enums import RecordStatus class PostCategory(db.Model): __tablename__ = 'post_category' id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(150), nullable=False, unique=True) description = db.Column(db.Text, nullable=True) status = db...
true
true
1c0422e0070b240b96d7edc6635bc389385b90e6
296
py
Python
conan/tools/microsoft/__init__.py
fanStefan/conan
7e9baff749ded0656e19d343a6483bf33cf32086
[ "MIT" ]
1
2022-01-21T05:31:13.000Z
2022-01-21T05:31:13.000Z
conan/tools/microsoft/__init__.py
fanStefan/conan
7e9baff749ded0656e19d343a6483bf33cf32086
[ "MIT" ]
null
null
null
conan/tools/microsoft/__init__.py
fanStefan/conan
7e9baff749ded0656e19d343a6483bf33cf32086
[ "MIT" ]
null
null
null
from conan.tools.microsoft.toolchain import MSBuildToolchain from conan.tools.microsoft.msbuild import MSBuild from conan.tools.microsoft.msbuilddeps import MSBuildDeps from conan.tools.microsoft.visual import msvc_runtime_flag, VCVars from conan.tools.microsoft.subsystems import subsystem_path
49.333333
66
0.875
from conan.tools.microsoft.toolchain import MSBuildToolchain from conan.tools.microsoft.msbuild import MSBuild from conan.tools.microsoft.msbuilddeps import MSBuildDeps from conan.tools.microsoft.visual import msvc_runtime_flag, VCVars from conan.tools.microsoft.subsystems import subsystem_path
true
true
1c0422f09852b84b4cca66b64414c78c80211b24
10,932
py
Python
inferelator/tests/test_crossvalidation_wrapper.py
gs512/inferelator
391223bd8d07476db72c4c7b1cd5fb5bf7494b9c
[ "BSD-2-Clause" ]
1
2019-05-13T23:12:48.000Z
2019-05-13T23:12:48.000Z
inferelator/tests/test_crossvalidation_wrapper.py
gs512/inferelator
391223bd8d07476db72c4c7b1cd5fb5bf7494b9c
[ "BSD-2-Clause" ]
null
null
null
inferelator/tests/test_crossvalidation_wrapper.py
gs512/inferelator
391223bd8d07476db72c4c7b1cd5fb5bf7494b9c
[ "BSD-2-Clause" ]
null
null
null
import unittest import pandas as pd import types import numpy as np import tempfile import os from inferelator import crossvalidation_workflow from inferelator.workflow import WorkflowBase fake_metadata = pd.DataFrame({"CONST": ["A"] * 1000, "VAR": ["A"] * 100 + ["B"] * 200 + ["C"] * 1 +...
33.950311
118
0.647914
import unittest import pandas as pd import types import numpy as np import tempfile import os from inferelator import crossvalidation_workflow from inferelator.workflow import WorkflowBase fake_metadata = pd.DataFrame({"CONST": ["A"] * 1000, "VAR": ["A"] * 100 + ["B"] * 200 + ["C"] * 1 +...
true
true
1c0423a000cff630d63ff7aa399aa72a8306d53c
6,692
py
Python
fastreport_cloud_sdk/models/file_permissions.py
FastReports/FastReport-Cloud-Python
4442e19ef4c980222ede6d9e0597f564d6d85b26
[ "MIT" ]
null
null
null
fastreport_cloud_sdk/models/file_permissions.py
FastReports/FastReport-Cloud-Python
4442e19ef4c980222ede6d9e0597f564d6d85b26
[ "MIT" ]
null
null
null
fastreport_cloud_sdk/models/file_permissions.py
FastReports/FastReport-Cloud-Python
4442e19ef4c980222ede6d9e0597f564d6d85b26
[ "MIT" ]
null
null
null
# coding: utf-8 """ FastReport Cloud No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except I...
28.236287
184
0.575762
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from fastreport_cloud_sdk.configuration import Configuration class FilePermissions(object): openapi_types = { 'owner_id': 'str', 'owner': 'F...
true
true
1c0423bdad0d8fef8455dfc3a455312f5d5a44e2
230
py
Python
src/math6d/geometry/__init__.py
derme302/math6d
309fe03fe6dd57f58589cc0faeb1c061ac599313
[ "Apache-2.0" ]
3
2020-11-24T04:13:05.000Z
2021-12-11T20:26:20.000Z
src/math6d/geometry/__init__.py
derme302/math6d
309fe03fe6dd57f58589cc0faeb1c061ac599313
[ "Apache-2.0" ]
null
null
null
src/math6d/geometry/__init__.py
derme302/math6d
309fe03fe6dd57f58589cc0faeb1c061ac599313
[ "Apache-2.0" ]
1
2021-06-14T08:20:56.000Z
2021-06-14T08:20:56.000Z
from .quaternion import Axis from .quaternion import Quaternion from .transform import Transform from .vector3 import Vector3 __all__ = [ Axis.__name__, Quaternion.__name__, Transform.__name__, Vector3.__name__ ]
19.166667
34
0.76087
from .quaternion import Axis from .quaternion import Quaternion from .transform import Transform from .vector3 import Vector3 __all__ = [ Axis.__name__, Quaternion.__name__, Transform.__name__, Vector3.__name__ ]
true
true
1c042439e78144684266aff7b5606b79f9883d5c
7,442
py
Python
cloudformation/cloudformation.py
pagreene/minerva-cloud
1d574a439cbf58faf47328f46496f24a0d6f2502
[ "MIT" ]
1
2020-08-19T13:40:32.000Z
2020-08-19T13:40:32.000Z
cloudformation/cloudformation.py
pagreene/minerva-cloud
1d574a439cbf58faf47328f46496f24a0d6f2502
[ "MIT" ]
24
2018-07-25T00:29:32.000Z
2018-12-05T08:17:52.000Z
cloudformation/cloudformation.py
labsyspharm/minerva-infrastructure
fc5e1525e554bc3fc0c039264e1d461c3fc28cb3
[ "MIT" ]
4
2018-05-18T21:07:04.000Z
2018-10-05T15:37:59.000Z
import os import sys import time import boto3 import click from ruamel.yaml import YAML def load_config(config): yaml = YAML() try: parsed_config = yaml.load(config) if len(parsed_config["SubnetsPublic"]) != 2: print("Exactly 2 public subnets required") sys.exit(1) ...
29.531746
83
0.631551
import os import sys import time import boto3 import click from ruamel.yaml import YAML def load_config(config): yaml = YAML() try: parsed_config = yaml.load(config) if len(parsed_config["SubnetsPublic"]) != 2: print("Exactly 2 public subnets required") sys.exit(1) ...
true
true
1c0424af3e891ce95ab8bbedfbfec1552218cf78
6,171
py
Python
pyueye_utils.py
buzzCraft/RobTek-prosjekt
12edd1d83a621a10d74421e51cf8dbf861ee9abe
[ "Unlicense", "MIT" ]
null
null
null
pyueye_utils.py
buzzCraft/RobTek-prosjekt
12edd1d83a621a10d74421e51cf8dbf861ee9abe
[ "Unlicense", "MIT" ]
null
null
null
pyueye_utils.py
buzzCraft/RobTek-prosjekt
12edd1d83a621a10d74421e51cf8dbf861ee9abe
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python #------------------------------------------------------------------------------ # PyuEye example - utilities modul # # Copyright (c) 2017 by IDS Imaging Development Systems GmbH. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifi...
36.3
99
0.611894
from pyueye import ueye from threading import Thread from ctypes import byref def get_bits_per_pixel(color_mode): return { ueye.IS_CM_SENSOR_RAW8: 8, ueye.IS_CM_SENSOR_RAW10: 16, ueye.IS_CM_SENSOR_RAW12: 16, ueye.IS_CM_SENSOR_RAW16: 16, ueye.IS_CM_MONO8: 8, ue...
true
true
1c0426a03ca1c9b778b7e27e292b43531bc778a5
1,422
py
Python
sem_seg/configs/_base_/datasets/bdd100k_512x1024.py
danielzhangau/bdd100k-models
10311ad98a111b7a34fbfc84f58776175b251ef0
[ "Apache-2.0" ]
null
null
null
sem_seg/configs/_base_/datasets/bdd100k_512x1024.py
danielzhangau/bdd100k-models
10311ad98a111b7a34fbfc84f58776175b251ef0
[ "Apache-2.0" ]
null
null
null
sem_seg/configs/_base_/datasets/bdd100k_512x1024.py
danielzhangau/bdd100k-models
10311ad98a111b7a34fbfc84f58776175b251ef0
[ "Apache-2.0" ]
null
null
null
"""Base config file for BDD100KSemSegDataset with size 512x1024.""" _base_ = "./bdd100k.py" # pylint: disable=invalid-name img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True ) crop_size = (512, 1024) train_pipeline = [ dict(type="LoadImageFromFile", to_float32=True),...
34.682927
76
0.628692
_base_ = "./bdd100k.py" img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True ) crop_size = (512, 1024) train_pipeline = [ dict(type="LoadImageFromFile", to_float32=True), dict(type="LoadAnnotations"), dict(type="Resize", img_scale=(1280, 720), ratio_range=(0.5,...
true
true
1c0426c03bc1d0d21ad450430bdc85e2f84b71b0
489
py
Python
watchman/integration/trigjson.py
0xgpapad/watchman
71ae8281ca0d583db7c2c8f057a489a86eded406
[ "MIT" ]
3
2022-02-10T10:48:36.000Z
2022-02-21T23:18:10.000Z
watchman/integration/trigjson.py
0xgpapad/watchman
71ae8281ca0d583db7c2c8f057a489a86eded406
[ "MIT" ]
null
null
null
watchman/integration/trigjson.py
0xgpapad/watchman
71ae8281ca0d583db7c2c8f057a489a86eded406
[ "MIT" ]
1
2022-02-06T10:29:46.000Z
2022-02-06T10:29:46.000Z
#!/usr/bin/env python # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # no unicode literals import sys log_file_name = sys.argv[1] # Copy json from stdin to the log file with open(log_...
24.45
65
0.705521
import sys log_file_name = sys.argv[1] with open(log_file_name, "a") as f: print("trigjson.py: Copying STDIN to %s" % log_file_name) json_in = sys.stdin.read() print("stdin: %s" % json_in) f.write(json_in)
true
true
1c0426ce28211c371d022ae5f693052cecedff08
2,158
py
Python
share/qt/extract_strings_qt.py
mackceco/prium
1d7e0b67fb019155f554d8182e8abaaee144a438
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
mackceco/prium
1d7e0b67fb019155f554d8182e8abaaee144a438
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
mackceco/prium
1d7e0b67fb019155f554d8182e8abaaee144a438
[ "MIT" ]
null
null
null
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt stringdefs so that they can be picked up by Qt linguist. ''' from __future__ import division,print_function,unicode_literals from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/priumstrings.cpp"...
25.690476
105
0.618628
from __future__ import division,print_function,unicode_literals from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/priumstrings.cpp" EMPTY=['""'] def parse_po(text): messages = [] msgid = [] msgstr = [] in_msgid = False in_msgstr = False for line i...
true
true
1c0427890d528a6d930d0795951ebab494523679
5,170
py
Python
setup.py
toni-em/videomorph
ccbfeb8402fb6eef028fee8e6d3870e084eab31f
[ "ECL-2.0", "Apache-2.0" ]
67
2018-03-23T17:33:19.000Z
2022-03-24T07:43:37.000Z
setup.py
toni-em/videomorph
ccbfeb8402fb6eef028fee8e6d3870e084eab31f
[ "ECL-2.0", "Apache-2.0" ]
49
2018-06-19T23:37:16.000Z
2021-03-11T17:38:19.000Z
setup.py
toni-em/videomorph
ccbfeb8402fb6eef028fee8e6d3870e084eab31f
[ "ECL-2.0", "Apache-2.0" ]
23
2018-07-31T15:07:31.000Z
2022-03-14T13:30:32.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File _name: setup.py # # VideoMorph - A PyQt5 frontend to ffmpeg. # Copyright 2016-2018 VideoMorph Development Team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
34.697987
77
0.647776
from sys import platform try: from setuptools import setup USE_DISTUTILS = False except ImportError: from distutils.core import setup USE_DISTUTILS = True from videomorph.converter import VERSION from videomorph.converter import APP_NAME from videomorph.converter import VM_PATHS from videomorph.c...
true
true
1c0427b90116c26d5b011a97b59bc9d696ca333a
3,248
py
Python
TheConversationCrawler/settings.py
coderkhaleesi/TheConversationCrawler
4056e4ae3cd0e22605d7146e79b2ed86b79e415b
[ "Apache-2.0" ]
null
null
null
TheConversationCrawler/settings.py
coderkhaleesi/TheConversationCrawler
4056e4ae3cd0e22605d7146e79b2ed86b79e415b
[ "Apache-2.0" ]
null
null
null
TheConversationCrawler/settings.py
coderkhaleesi/TheConversationCrawler
4056e4ae3cd0e22605d7146e79b2ed86b79e415b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for TheConversationCrawler 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/...
35.692308
102
0.784791
BOT_NAME = 'TheConversationCrawler' SPIDER_MODULES = ['TheConversationCrawler.spiders'] NEWSPIDER_MODULE = 'TheConversationCrawler.spiders' ROBOTSTXT_OBEY = True
true
true
1c04281c15480309f1ca7f795123f326eaed1867
5,394
py
Python
test/geometry/test_ransac.py
sh8/kornia
11404e4250a99100d1793405dd51acf4dda05021
[ "ECL-2.0", "Apache-2.0" ]
4,894
2019-10-24T15:51:39.000Z
2022-03-30T22:58:33.000Z
test/geometry/test_ransac.py
sh8/kornia
11404e4250a99100d1793405dd51acf4dda05021
[ "ECL-2.0", "Apache-2.0" ]
912
2019-10-24T16:08:42.000Z
2022-03-31T19:07:09.000Z
test/geometry/test_ransac.py
jatentaki/kornia
b340559dea9c2e01a01fb6062511a23cd175fbde
[ "ECL-2.0", "Apache-2.0" ]
557
2019-10-24T16:02:43.000Z
2022-03-28T07:33:33.000Z
import random import pytest import torch from torch.autograd import gradcheck import kornia import kornia.testing as utils from kornia.geometry import RANSAC from kornia.testing import assert_close class TestRANSACHomography: def test_smoke(self, device, dtype): points1 = torch.rand(4, 2, device=device,...
37.458333
95
0.527994
import random import pytest import torch from torch.autograd import gradcheck import kornia import kornia.testing as utils from kornia.geometry import RANSAC from kornia.testing import assert_close class TestRANSACHomography: def test_smoke(self, device, dtype): points1 = torch.rand(4, 2, device=device,...
true
true
1c04295213c7739fcef415f6da07886e9613bec9
9,229
py
Python
python/pyspark/tests/test_serializers.py
amwufiv/spark
b50d4507f52315d5f6d75c617e845248a1c828a9
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
9
2019-11-20T09:44:22.000Z
2021-04-27T09:45:59.000Z
python/pyspark/tests/test_serializers.py
amwufiv/spark
b50d4507f52315d5f6d75c617e845248a1c828a9
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
27
2021-04-14T16:44:15.000Z
2022-03-13T00:35:17.000Z
python/pyspark/tests/test_serializers.py
amwufiv/spark
b50d4507f52315d5f6d75c617e845248a1c828a9
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
8
2020-04-25T08:20:53.000Z
2022-02-23T07:06:49.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 us...
36.192157
99
0.623795
import math import sys import unittest from pyspark import serializers from pyspark.serializers import ( CloudPickleSerializer, CompressedSerializer, AutoBatchedSerializer, BatchedSerializer, AutoSerializer, NoOpSerializer, PairDeserializer, FlattenedValuesSerializer, CartesianDeser...
true
true
1c0429ba4d573a54346c4fb43a39f7079c18f2ed
419
py
Python
setup_dev.py
stephane-martin/snappyx
3af2ece68dfb438eead1076fd271bc0c76be0c0f
[ "BSD-3-Clause" ]
1
2019-03-22T02:40:03.000Z
2019-03-22T02:40:03.000Z
setup_dev.py
stephane-martin/snappyx
3af2ece68dfb438eead1076fd271bc0c76be0c0f
[ "BSD-3-Clause" ]
null
null
null
setup_dev.py
stephane-martin/snappyx
3af2ece68dfb438eead1076fd271bc0c76be0c0f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from setup import extensions, runsetup, Extension, snappy_source_files, snappy_dir, setup_requires extensions[:] = [] extensions.append( Extension( name="snappyx._snappyx", sources=['snappyx/_snappyx.pyx'] + snappy_source_files, include_dirs=[snappy_dir], l...
19.952381
98
0.658711
from setup import extensions, runsetup, Extension, snappy_source_files, snappy_dir, setup_requires extensions[:] = [] extensions.append( Extension( name="snappyx._snappyx", sources=['snappyx/_snappyx.pyx'] + snappy_source_files, include_dirs=[snappy_dir], language="c++" ) ) s...
true
true
1c0429cc92972b89efc521ccea4cce4c1f6b2977
4,411
py
Python
dataactvalidator/validation_handlers/errorInterface.py
RonSherfey/data-act-broker-backend
d287abda2cac06dd479ecf0127e789cb8e59387d
[ "CC0-1.0" ]
null
null
null
dataactvalidator/validation_handlers/errorInterface.py
RonSherfey/data-act-broker-backend
d287abda2cac06dd479ecf0127e789cb8e59387d
[ "CC0-1.0" ]
3
2021-08-22T11:47:45.000Z
2022-03-29T22:06:49.000Z
dataactvalidator/validation_handlers/errorInterface.py
RonSherfey/data-act-broker-backend
d287abda2cac06dd479ecf0127e789cb8e59387d
[ "CC0-1.0" ]
null
null
null
from dataactcore.models.errorModels import ErrorMetadata from dataactvalidator.validation_handlers.validationError import ValidationError from dataactcore.interfaces.db import GlobalDB from dataactcore.models.lookups import ERROR_TYPE_DICT def record_row_error(error_list, job_id, filename, field_name, error_type, r...
48.472527
119
0.611199
from dataactcore.models.errorModels import ErrorMetadata from dataactvalidator.validation_handlers.validationError import ValidationError from dataactcore.interfaces.db import GlobalDB from dataactcore.models.lookups import ERROR_TYPE_DICT def record_row_error(error_list, job_id, filename, field_name, error_type, r...
true
true
1c042a68d8927321a9ed40fed938e791f8785d30
267
py
Python
AtCoder/BeginnerContest139/c.py
scnsh/CompetitiveProgramming
3f08b4719ffe9511cba6d1ba7909f1899def702b
[ "MIT" ]
1
2019-08-04T23:40:18.000Z
2019-08-04T23:40:18.000Z
AtCoder/BeginnerContest139/c.py
scnsh/CompetitiveProgramming
3f08b4719ffe9511cba6d1ba7909f1899def702b
[ "MIT" ]
null
null
null
AtCoder/BeginnerContest139/c.py
scnsh/CompetitiveProgramming
3f08b4719ffe9511cba6d1ba7909f1899def702b
[ "MIT" ]
null
null
null
N = int(input()) H = list(map(int, input().split())) max_length = length = 0 for i in range(1, N): if H[i-1] >= H[i]: length += 1 else: if max_length < length: max_length = length length = 0 print(max(max_length, length))
20.538462
35
0.535581
N = int(input()) H = list(map(int, input().split())) max_length = length = 0 for i in range(1, N): if H[i-1] >= H[i]: length += 1 else: if max_length < length: max_length = length length = 0 print(max(max_length, length))
true
true
1c042a7c7b19fe0c851c2994917d349be2ac11dd
3,892
py
Python
ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
runningt/ambari
7b91469e68a80bfcabe4b79d855caa684bf51378
[ "Apache-2.0" ]
16
2018-05-24T10:28:24.000Z
2021-08-05T03:13:26.000Z
ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
runningt/ambari
7b91469e68a80bfcabe4b79d855caa684bf51378
[ "Apache-2.0" ]
2
2018-10-24T11:06:24.000Z
2019-09-09T08:51:21.000Z
ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
runningt/ambari
7b91469e68a80bfcabe4b79d855caa684bf51378
[ "Apache-2.0" ]
17
2018-07-06T08:57:00.000Z
2021-11-04T11:00:36.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 use this ...
45.255814
152
0.742035
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
false
true
1c042b6de3985f3864fb4691db9a97b6640d7c29
3,119
py
Python
Image_Generator.py
huhji/License_plate_recognition_CRNN_korean
1f8447f085a0571fead7abdc120db167de048741
[ "MIT" ]
2
2020-09-03T08:19:24.000Z
2022-01-21T05:48:12.000Z
Image_Generator.py
huhji/License_plate_recognition_CRNN_korean
1f8447f085a0571fead7abdc120db167de048741
[ "MIT" ]
null
null
null
Image_Generator.py
huhji/License_plate_recognition_CRNN_korean
1f8447f085a0571fead7abdc120db167de048741
[ "MIT" ]
4
2020-06-16T05:29:20.000Z
2022-01-26T07:56:07.000Z
import cv2 import os, random import numpy as np from parameter import letters # # Input data generator def labels_to_text(labels): # letters의 index -> text (string) return ''.join(list(map(lambda x: letters[int(x)], labels))) def text_to_labels(text): # text를 letters 배열에서의 인덱스 값으로 변환 return list(map(...
41.586667
112
0.556589
import cv2 import os, random import numpy as np from parameter import letters def labels_to_text(labels): return ''.join(list(map(lambda x: letters[int(x)], labels))) def text_to_labels(text): return list(map(lambda x: letters.index(x), text)) class TextImageGenerator: def __init__(self, img_di...
true
true
1c042bafcc9ca0bb3f3faace0b01e1292a172f2c
8,649
py
Python
junction/proposals/forms.py
sks444/junction
ce4e9415f134022acfabeef3eb71278c129de7ef
[ "MIT" ]
null
null
null
junction/proposals/forms.py
sks444/junction
ce4e9415f134022acfabeef3eb71278c129de7ef
[ "MIT" ]
null
null
null
junction/proposals/forms.py
sks444/junction
ce4e9415f134022acfabeef3eb71278c129de7ef
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals # Third Party Stuff from django import forms from django.utils.safestring import mark_safe from django.utils.timezone import now from pagedown.widgets import PagedownWidget # Junction Stuff from junction.base.constants import ( Confe...
39.493151
101
0.657995
from __future__ import absolute_import, unicode_literals from django import forms from django.utils.safestring import mark_safe from django.utils.timezone import now from pagedown.widgets import PagedownWidget from junction.base.constants import ( ConferenceSettingConstants, ProposalReviewerComment, Propo...
true
true
1c042c988df296d76381241dc08760b108b5abe2
20,205
py
Python
src/tankoh2/control_sf.py
sfreund-DLR/tankoh2
92ff080f7034a7eb1cdabed5089c79fd01af4d11
[ "MIT", "BSD-3-Clause" ]
null
null
null
src/tankoh2/control_sf.py
sfreund-DLR/tankoh2
92ff080f7034a7eb1cdabed5089c79fd01af4d11
[ "MIT", "BSD-3-Clause" ]
27
2021-11-03T19:53:00.000Z
2022-03-28T12:43:30.000Z
src/tankoh2/control_sf.py
sfreund-DLR/tankoh2
92ff080f7034a7eb1cdabed5089c79fd01af4d11
[ "MIT", "BSD-3-Clause" ]
null
null
null
"""control a tank optimization""" import os, sys import numpy as np import datetime from tankoh2 import programDir, log, pychain from tankoh2.service import indent, getRunDir, plotStressEpsPuck, plotDataFrame, plotContour, plotThicknesses, getTimeString from tankoh2.utilities import updateName, copyAsJson, getLayerTh...
46.235698
132
0.633655
import os, sys import numpy as np import datetime from tankoh2 import programDir, log, pychain from tankoh2.service import indent, getRunDir, plotStressEpsPuck, plotDataFrame, plotContour, plotThicknesses, getTimeString from tankoh2.utilities import updateName, copyAsJson, getLayerThicknesses, getHydrostaticPressure ...
true
true
1c042dc497b72d38e939af6591e11e30646ca3da
5,215
py
Python
saleor/graphql/core/enums.py
tgarbowski/saleor
11218aeac8649112626c8f971ef3eec8378b5537
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/core/enums.py
tgarbowski/saleor
11218aeac8649112626c8f971ef3eec8378b5537
[ "CC-BY-4.0" ]
8
2022-02-14T04:25:58.000Z
2022-03-28T04:53:16.000Z
saleor/graphql/core/enums.py
tgarbowski/saleor
11218aeac8649112626c8f971ef3eec8378b5537
[ "CC-BY-4.0" ]
null
null
null
import graphene from ...account import error_codes as account_error_codes from ...app import error_codes as app_error_codes from ...checkout import error_codes as checkout_error_codes from ...core import JobStatus, error_codes as core_error_codes from ...core.permissions import get_permissions_enum_list from ...core.w...
45.745614
88
0.793864
import graphene from ...account import error_codes as account_error_codes from ...app import error_codes as app_error_codes from ...checkout import error_codes as checkout_error_codes from ...core import JobStatus, error_codes as core_error_codes from ...core.permissions import get_permissions_enum_list from ...core.w...
true
true
1c042dcd6e45062ac52b20c883d6498a657ad049
45,735
py
Python
pycomscore/pycomscore.py
omnicomdatahousecl/omnicom_libraries
d97447b01d845a12462d5313be31f1debd180770
[ "MIT" ]
null
null
null
pycomscore/pycomscore.py
omnicomdatahousecl/omnicom_libraries
d97447b01d845a12462d5313be31f1debd180770
[ "MIT" ]
null
null
null
pycomscore/pycomscore.py
omnicomdatahousecl/omnicom_libraries
d97447b01d845a12462d5313be31f1debd180770
[ "MIT" ]
null
null
null
""" This is a module that allows you to connect to the Comscore library developed by Annalect and obtain synthesized information. """ __author__ = "Carlos Trujillo, Data analytics Manager" __email__ = "carlos.trujillo@omnicommediagroup.com" __status__ = "planning" from sqlalchemy import create_engine fro...
48.550955
213
0.574724
__author__ = "Carlos Trujillo, Data analytics Manager" __email__ = "carlos.trujillo@omnicommediagroup.com" __status__ = "planning" from sqlalchemy import create_engine from pandas import read_sql, DataFrame import numpy as np import pandas as pd from collections import Counter class comscore_omnicom...
true
true
1c042dd150170c8a7c62028072802c0beae188e3
4,649
py
Python
allennlp/modules/pruner.py
YoPatapon/allennlp
d50964b1f5b6887c74855a4fbbd1e948d406d206
[ "Apache-2.0" ]
6
2019-03-19T02:05:35.000Z
2019-09-25T07:24:52.000Z
allennlp/modules/pruner.py
shanesyy/allennlp
4c99f8e82f7fd70c86652109bfca5282d470e981
[ "Apache-2.0" ]
1
2019-07-08T15:28:04.000Z
2019-07-08T15:28:04.000Z
allennlp/modules/pruner.py
shanesyy/allennlp
4c99f8e82f7fd70c86652109bfca5282d470e981
[ "Apache-2.0" ]
1
2020-03-12T06:53:53.000Z
2020-03-12T06:53:53.000Z
from typing import Tuple from overrides import overrides import torch from allennlp.nn import util class Pruner(torch.nn.Module): """ This module scores and prunes items in a list using a parameterised scoring function and a threshold. Parameters ---------- scorer : ``torch.nn.Module``, requ...
46.029703
98
0.650247
from typing import Tuple from overrides import overrides import torch from allennlp.nn import util class Pruner(torch.nn.Module): def __init__(self, scorer: torch.nn.Module) -> None: super().__init__() self._scorer = scorer @overrides def forward(self, embeddings: torch.F...
true
true
1c042e1a11e6fa57981732e86816b323236d1497
495
py
Python
Fibonacci_alt1.py
staid03/Fibonacci
2e7a7b99b1b3f980b61e9454ac48aa48005ca96c
[ "MIT" ]
null
null
null
Fibonacci_alt1.py
staid03/Fibonacci
2e7a7b99b1b3f980b61e9454ac48aa48005ca96c
[ "MIT" ]
null
null
null
Fibonacci_alt1.py
staid03/Fibonacci
2e7a7b99b1b3f980b61e9454ac48aa48005ca96c
[ "MIT" ]
null
null
null
#Version Date Author Comment # 0.1 02-APR-2017 Staid03 Initial_Alt # #Script Purpose: simple Fibonacci number generation up to *limit* from time import gmtime , strftime aTime = (strftime("%Y%m%d_%H%M%S", gmtime())) outFile = open(("Fibonacci_Python_%s.txt" % (aTime)), "w") limit = 10...
19.038462
65
0.579798
from time import gmtime , strftime aTime = (strftime("%Y%m%d_%H%M%S", gmtime())) outFile = open(("Fibonacci_Python_%s.txt" % (aTime)), "w") limit = 10000 x = 0 y = 1 z = x + y outFile.write(x + "\n") outFile.write(y + "\n") while (z < limit): z = x + y outFile.write(z + "\n") x = y y = z outFile.cl...
true
true
1c042e948a9152eccfcdeb0e5dc2df2802a82d96
10,104
py
Python
proj/pred/app/qd_fe.py
ElofssonLab/web_prodres
682991b5c058316b326dde86ab4ff9f9d0bc9af1
[ "MIT" ]
null
null
null
proj/pred/app/qd_fe.py
ElofssonLab/web_prodres
682991b5c058316b326dde86ab4ff9f9d0bc9af1
[ "MIT" ]
6
2020-03-06T13:35:22.000Z
2022-02-10T20:43:48.000Z
proj/pred/app/qd_fe.py
ElofssonLab/web_prodres
682991b5c058316b326dde86ab4ff9f9d0bc9af1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Description: daemon to submit jobs and retrieve results to/from remote # servers # import os import sys import site from datetime import datetime from dateutil import parser as dtparser from pytz import timezone rundir = os.path.dirname(os.path.realpath(__f...
38.861538
114
0.633017
import os import sys import site from datetime import datetime from dateutil import parser as dtparser from pytz import timezone rundir = os.path.dirname(os.path.realpath(__file__)) webserver_root = os.path.realpath("%s/../../../"%(rundir)) activate_env="%s/env/bin/activate_this.py"%(webserver_root) exec(compile(open...
true
true
1c042ea1375eb6915df1e58c9b0907d58091f7c3
859
py
Python
lambda_code/lambda_function.py
emilsas/aws-microservice-local
140f21f93f3a53aa78a9d9d7e0694794764043bf
[ "MIT" ]
null
null
null
lambda_code/lambda_function.py
emilsas/aws-microservice-local
140f21f93f3a53aa78a9d9d7e0694794764043bf
[ "MIT" ]
null
null
null
lambda_code/lambda_function.py
emilsas/aws-microservice-local
140f21f93f3a53aa78a9d9d7e0694794764043bf
[ "MIT" ]
null
null
null
import os import json import boto3 dynamo_db = boto3.resource('dynamodb', endpoint_url='http://dynamodb-local:8000') table = dynamo_db.Table('dummy-table') def lambda_handler(event, context): if event['httpMethod'] == 'GET': obj_id = event['pathParameters'].get('proxy') if obj_id: res...
24.542857
81
0.585565
import os import json import boto3 dynamo_db = boto3.resource('dynamodb', endpoint_url='http://dynamodb-local:8000') table = dynamo_db.Table('dummy-table') def lambda_handler(event, context): if event['httpMethod'] == 'GET': obj_id = event['pathParameters'].get('proxy') if obj_id: res...
true
true
1c042f004454585d77e7faa819c17bb1cf47e760
11,615
py
Python
wdae/wdae/pheno_tool_api/views.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
null
null
null
wdae/wdae/pheno_tool_api/views.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
82
2019-07-22T11:44:23.000Z
2022-01-13T15:27:33.000Z
wdae/wdae/pheno_tool_api/views.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
null
null
null
import json import math import logging from rest_framework.response import Response from rest_framework import status from django.http.response import StreamingHttpResponse from gene_sets.expand_gene_set_decorator import expand_gene_set from dae.pheno_tool.tool import PhenoTool, PhenoToolHelper from dae.variants.at...
31.648501
79
0.614292
import json import math import logging from rest_framework.response import Response from rest_framework import status from django.http.response import StreamingHttpResponse from gene_sets.expand_gene_set_decorator import expand_gene_set from dae.pheno_tool.tool import PhenoTool, PhenoToolHelper from dae.variants.at...
true
true
1c042f16adba9b89b70acb3392c0409237bb7c8a
1,818
py
Python
tests/extras/logging/test_color_logger.py
moutai/kedro
ebcd659f02948e79e7a7930026ca23776028014c
[ "Apache-2.0" ]
4,923
2019-05-16T17:29:23.000Z
2022-01-10T06:01:02.000Z
tests/extras/logging/test_color_logger.py
moutai/kedro
ebcd659f02948e79e7a7930026ca23776028014c
[ "Apache-2.0" ]
841
2019-05-20T16:58:11.000Z
2022-01-09T09:36:26.000Z
tests/extras/logging/test_color_logger.py
moutai/kedro
ebcd659f02948e79e7a7930026ca23776028014c
[ "Apache-2.0" ]
653
2019-05-19T10:05:22.000Z
2022-01-06T13:48:23.000Z
# Copyright 2021 QuantumBlack Visual Analytics Limited # # 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
40.4
77
0.760176
import logging from kedro.extras.logging import ColorHandler def test_color_logger(caplog): log = logging.getLogger(__name__) for handler in log.handlers: log.removeHandler(handler) log.addHandler(ColorHandler()) log.info("Test") for record in caplog.records: assert record.lev...
true
true
1c042fdebe3074a1d5a7ca6a2a83bdf2bf3b64c3
1,020
py
Python
accelerator_abstract/models/base_criterion_option_spec.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
6
2017-06-14T19:34:01.000Z
2020-03-08T07:16:59.000Z
accelerator_abstract/models/base_criterion_option_spec.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
160
2017-06-20T17:12:13.000Z
2022-03-30T13:53:12.000Z
accelerator_abstract/models/base_criterion_option_spec.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
null
null
null
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from django.db.models import ( CharField, FloatField, ForeignKey, IntegerField, CASCADE, ) from accelerator_abstract.models.accelerator_model import AcceleratorModel class BaseCriterion...
26.842105
74
0.689216
from __future__ import unicode_literals import swapper from django.db.models import ( CharField, FloatField, ForeignKey, IntegerField, CASCADE, ) from accelerator_abstract.models.accelerator_model import AcceleratorModel class BaseCriterionOptionSpec(AcceleratorModel): DEFAULT_COUNT = 1 ...
true
true
1c0431a50d26d27b479440d8f809ddaf4e98e241
1,385
py
Python
textattack/attack_recipes/pwws_ren_2019.py
heytitle/TextAttack
99fedba1046a1c99e01432f97f7fe5a768ae7817
[ "MIT" ]
null
null
null
textattack/attack_recipes/pwws_ren_2019.py
heytitle/TextAttack
99fedba1046a1c99e01432f97f7fe5a768ae7817
[ "MIT" ]
null
null
null
textattack/attack_recipes/pwws_ren_2019.py
heytitle/TextAttack
99fedba1046a1c99e01432f97f7fe5a768ae7817
[ "MIT" ]
null
null
null
from textattack.constraints.pre_transformation import ( RepeatModification, StopwordModification, ) from textattack.goal_functions import UntargetedClassification from textattack.search_methods import GreedyWordSwapWIR from textattack.shared.attack import Attack from textattack.transformations import WordSwapWo...
44.677419
115
0.768953
from textattack.constraints.pre_transformation import ( RepeatModification, StopwordModification, ) from textattack.goal_functions import UntargetedClassification from textattack.search_methods import GreedyWordSwapWIR from textattack.shared.attack import Attack from textattack.transformations import WordSwapWo...
true
true
1c04321c65f319d3d5a072f068b57e6e31cef778
466
py
Python
build.py
A1Liu/const-utils-rs
f1cae7eacdabe6a489d71c566421a3bcd937ba42
[ "MIT" ]
null
null
null
build.py
A1Liu/const-utils-rs
f1cae7eacdabe6a489d71c566421a3bcd937ba42
[ "MIT" ]
null
null
null
build.py
A1Liu/const-utils-rs
f1cae7eacdabe6a489d71c566421a3bcd937ba42
[ "MIT" ]
null
null
null
with open('src/base.rs', 'r') as f: code = f.read() for size in ['8', '16', '32', '64', 'size', '128']: utype = 'u%s' % size itype = 'i%s' % size with open(f'src/{utype}_func.rs','w') as f: f.write(code.replace('u8', utype)) with open(f'src/{itype}_func.rs','w') as f: f.write(code.r...
33.285714
81
0.560086
with open('src/base.rs', 'r') as f: code = f.read() for size in ['8', '16', '32', '64', 'size', '128']: utype = 'u%s' % size itype = 'i%s' % size with open(f'src/{utype}_func.rs','w') as f: f.write(code.replace('u8', utype)) with open(f'src/{itype}_func.rs','w') as f: f.write(code.r...
true
true
1c0432bbeca9f62268672b445362144af0ae00d5
10,423
py
Python
test/functional/rpc_createmultisig.py
adymoloca/bitcoin
2f004bdf52353be7b24842b03e299086d869168b
[ "MIT" ]
null
null
null
test/functional/rpc_createmultisig.py
adymoloca/bitcoin
2f004bdf52353be7b24842b03e299086d869168b
[ "MIT" ]
null
null
null
test/functional/rpc_createmultisig.py
adymoloca/bitcoin
2f004bdf52353be7b24842b03e299086d869168b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Copyright (c) Flo Developers 2013-2021 # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multisig RPCs""" import binascii import decimal import it...
45.121212
174
0.652116
import binascii import decimal import itertools import json import os from test_framework.blocktools import COINBASE_MATURITY from test_framework.authproxy import JSONRPCException from test_framework.descriptors import descsum_create, drop_origins from test_framework.key import ECPubKey, ECKey from test_framework.test...
true
true
1c0433f5640aa7a109f0d2510a0ce0d3b5209747
14,037
py
Python
Importers/build-Importers.py
tclarke/coan
3f3b179a98afaf5b0f16fea452dbe43fe18ab0ad
[ "MIT" ]
1
2016-05-08T08:14:24.000Z
2016-05-08T08:14:24.000Z
Importers/build-Importers.py
tclarke/coan
3f3b179a98afaf5b0f16fea452dbe43fe18ab0ad
[ "MIT" ]
null
null
null
Importers/build-Importers.py
tclarke/coan
3f3b179a98afaf5b0f16fea452dbe43fe18ab0ad
[ "MIT" ]
2
2015-12-03T07:01:44.000Z
2021-04-21T07:35:38.000Z
#!/usr/local/bin/python import sys import subprocess import os import os.path from os.path import join import optparse import traceback import shutil def execute_process(args, bufsize=0, executable=None, preexec_fn=None, close_fds=None, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo...
38.991667
86
0.618295
import sys import subprocess import os import os.path from os.path import join import optparse import traceback import shutil def execute_process(args, bufsize=0, executable=None, preexec_fn=None, close_fds=None, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0):...
false
true
1c043484cc264281a107b97fee608817ae62be40
3,402
py
Python
annotate_docs.py
amarnamarpan/Sequence-Labeling-Model-for-Catchphrase-Identification-from-Legal-Case-Documents
45ea7dd7320b6e387f699c44c8157d4ff0000015
[ "Apache-2.0" ]
4
2021-07-29T07:20:55.000Z
2021-12-15T12:14:55.000Z
annotate_docs.py
amarnamarpan/Sequence-Labeling-Model-for-Catchphrase-Identification-from-Legal-Case-Documents
45ea7dd7320b6e387f699c44c8157d4ff0000015
[ "Apache-2.0" ]
null
null
null
annotate_docs.py
amarnamarpan/Sequence-Labeling-Model-for-Catchphrase-Identification-from-Legal-Case-Documents
45ea7dd7320b6e387f699c44c8157d4ff0000015
[ "Apache-2.0" ]
1
2021-12-15T11:51:14.000Z
2021-12-15T11:51:14.000Z
import os import sys from wrap import Sequence import numpy as np import sentencify import operator import pickle as pic from gensim.models import doc2vec def get_X_test(text): sents = sentencify.get_sents(text) x_arr = [] for sent in sents: sent.append('.') x_arr.append(sent) return x_arr ...
29.842105
155
0.683128
import os import sys from wrap import Sequence import numpy as np import sentencify import operator import pickle as pic from gensim.models import doc2vec def get_X_test(text): sents = sentencify.get_sents(text) x_arr = [] for sent in sents: sent.append('.') x_arr.append(sent) return x_arr ...
true
true
1c04349d6e757bc0df22cafab535f0c62838fb92
1,220
py
Python
model-optimizer/extensions/front/onnx/reduce_sum_ext.py
shinh/dldt
693ab4e79a428e0801f17f4511b129a3fa8f4a62
[ "Apache-2.0" ]
1
2021-02-20T21:48:36.000Z
2021-02-20T21:48:36.000Z
model-optimizer/extensions/front/onnx/reduce_sum_ext.py
erinpark33/dldt
edd86d090592f7779f4dbb2681546e1f4e81284f
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/front/onnx/reduce_sum_ext.py
erinpark33/dldt
edd86d090592f7779f4dbb2681546e1f4e81284f
[ "Apache-2.0" ]
1
2021-02-19T01:06:12.000Z
2021-02-19T01:06:12.000Z
""" Copyright (c) 2018-2019 Intel Corporation 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 i...
36.969697
109
0.739344
import numpy as np from mo.front.extractor import FrontExtractorOp from mo.front.onnx.extractors.utils import onnx_attr from mo.graph.graph import Node from mo.ops.reduce import Reduce class ReduceSumFrontExtractor(FrontExtractorOp): op = 'ReduceSum' enabled = True @staticmethod def extract(node: Nod...
true
true
1c0437920d5a83a889a2e5ddf83e75b7fa60af90
4,205
py
Python
tSNE_analysis/tSNE_RE_space_named_entities.py
LIIR-KULeuven/CLDR_CLNER_models
5fe47a988b88a36d0ccf4484aff5ab70c59f39d6
[ "MIT" ]
12
2021-10-04T11:19:29.000Z
2021-11-29T10:24:41.000Z
tSNE_analysis/tSNE_RE_space_named_entities.py
LIIR-KULeuven/CLDR_CLNER_models
5fe47a988b88a36d0ccf4484aff5ab70c59f39d6
[ "MIT" ]
null
null
null
tSNE_analysis/tSNE_RE_space_named_entities.py
LIIR-KULeuven/CLDR_CLNER_models
5fe47a988b88a36d0ccf4484aff5ab70c59f39d6
[ "MIT" ]
2
2022-01-03T08:18:23.000Z
2022-01-04T14:28:25.000Z
import seaborn as sns import random import os import h5py import matplotlib.pyplot as plt from sklearn.manifold import TSNE import configparser parser = configparser.ConfigParser() parser.read("./../configs/tSNE_analysis.conf") SPLIT_NUM = int(parser.get("config", "split_num")) class tSNE_analysis: def __init__(...
35.635593
122
0.593341
import seaborn as sns import random import os import h5py import matplotlib.pyplot as plt from sklearn.manifold import TSNE import configparser parser = configparser.ConfigParser() parser.read("./../configs/tSNE_analysis.conf") SPLIT_NUM = int(parser.get("config", "split_num")) class tSNE_analysis: def __init__(...
true
true
1c043859ef453ae0fa59417d1f80f1ca424fac9c
163
py
Python
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_ConstantTrend_Seasonal_MonthOfYear_ARX.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_ConstantTrend_Seasonal_MonthOfYear_ARX.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_ConstantTrend_Seasonal_MonthOfYear_ARX.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['ConstantTrend'] , ['Seasonal_MonthOfYear'] , ['ARX'] );
40.75
90
0.760736
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['ConstantTrend'] , ['Seasonal_MonthOfYear'] , ['ARX'] );
true
true
1c0439d6397358a4edec86dda510abe0b0bf821f
336
py
Python
clisops/__version__.py
cehbrecht/clisops
7d80bcbc21ee8a6248f88bb590a1fed33a060bfd
[ "BSD-3-Clause" ]
null
null
null
clisops/__version__.py
cehbrecht/clisops
7d80bcbc21ee8a6248f88bb590a1fed33a060bfd
[ "BSD-3-Clause" ]
null
null
null
clisops/__version__.py
cehbrecht/clisops
7d80bcbc21ee8a6248f88bb590a1fed33a060bfd
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # This information is located in its own file so that it can be loaded # without importing the main package when its dependencies are not installed. # See: https://packaging.python.org/guides/single-sourcing-package-version __author__ = "Elle Smith" __email__ = "eleanor.smith@stfc.ac.uk" __vers...
37.333333
77
0.747024
__author__ = "Elle Smith" __email__ = "eleanor.smith@stfc.ac.uk" __version__ = "0.1.0"
true
true
1c043a159533a15b90c0929ea9062e6d6f2fd545
1,188
py
Python
release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalElementSelector.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalElementSelector.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/AnalyticalElementSelector.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class AnalyticalElementSelector(Enum, IComparable, IFormattable, IConvertible): """ Specifies a portion of an Analytical Element or the whole element. enum AnalyticalElementSelector,values: EndOrTop (1),StartOrBase (0),Whole (2) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx._...
25.276596
221
0.58165
class AnalyticalElementSelector(Enum, IComparable, IFormattable, IConvertible): def __eq__(self, *args): pass def __format__(self, *args): pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): pass ...
true
true
1c043ab40c400a3e66622900d9ae58178aa06040
2,271
py
Python
validator/sawtooth_validator/database/native_lmdb.py
RomarQ/sawtooth-core
b900f4f3a2ffda9f6fb32a57fd4eacc41be86e5a
[ "Apache-2.0" ]
2
2018-09-27T04:43:33.000Z
2019-10-23T14:32:31.000Z
validator/sawtooth_validator/database/native_lmdb.py
RomarQ/sawtooth-core
b900f4f3a2ffda9f6fb32a57fd4eacc41be86e5a
[ "Apache-2.0" ]
24
2021-06-19T14:15:49.000Z
2022-03-11T17:43:55.000Z
validator/sawtooth_validator/database/native_lmdb.py
RomarQ/sawtooth-core
b900f4f3a2ffda9f6fb32a57fd4eacc41be86e5a
[ "Apache-2.0" ]
3
2018-06-20T15:20:30.000Z
2020-07-09T19:52:29.000Z
# Copyright 2018 Intel Corporation # # 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 wri...
37.229508
80
0.679436
import ctypes from enum import IntEnum from sawtooth_validator.ffi import PY_LIBRARY from sawtooth_validator.ffi import CommonErrorCode from sawtooth_validator.ffi import OwnedPointer class NativeLmdbDatabase(OwnedPointer): def __init__(self, path, indexes=None, _size=1024**4): super(NativeLmdbDatabase, ...
true
true
1c043ab56e61ca1498a17e1fc93bb816970d5834
4,307
py
Python
PWI/PWI.py
protopopov1122/PowerIndicator
b5fc582fe339c8bc0f002ff05192f148679988eb
[ "MIT" ]
1
2020-04-09T16:23:36.000Z
2020-04-09T16:23:36.000Z
PWI/PWI.py
protopopov1122/PowerIndicator
b5fc582fe339c8bc0f002ff05192f148679988eb
[ "MIT" ]
null
null
null
PWI/PWI.py
protopopov1122/PowerIndicator
b5fc582fe339c8bc0f002ff05192f148679988eb
[ "MIT" ]
null
null
null
# Copyright (c) 2017 Jevgenijs Protopopovs # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ...
4,307
4,307
0.622243
true
true
1c043ab59ce8ae678c318467a7b076c7e649d667
2,568
py
Python
book4/s1_teorico.py
Felipe-Tommaselli/Python4everbody_Michigan
f4f940c15a4b165b144d14ead79d583bf31b805b
[ "MIT" ]
null
null
null
book4/s1_teorico.py
Felipe-Tommaselli/Python4everbody_Michigan
f4f940c15a4b165b144d14ead79d583bf31b805b
[ "MIT" ]
null
null
null
book4/s1_teorico.py
Felipe-Tommaselli/Python4everbody_Michigan
f4f940c15a4b165b144d14ead79d583bf31b805b
[ "MIT" ]
null
null
null
# Object Oriented Python #! OBJECTS/INSTANCES: # objects: a bit of self-contained Code and Data # ex: lists, strings, ints ... # ______ ________ # | input | <== objects interating between themselfs ==> | output | # ------ ...
22.928571
85
0.629283
class PartyAnimal: x = 0 def party(self): self.x += 1 print('So far', self.x) an = PartyAnimal() an.party() PartyAnimal.party(an) # dir(an) retornara as capabilities da classe (os metodos a serem usados) print('type(an):', type(an)) print('dir(an)', dir(an)) # as coisas com __ __ pe...
true
true
1c043b12e76bd3ae2737eb245b3039fe411944ea
49,658
py
Python
integration/tests/cook/util.py
yueri/Cook
12162ef040c28662e4f3fb259d3d81bda3b59860
[ "Apache-2.0" ]
null
null
null
integration/tests/cook/util.py
yueri/Cook
12162ef040c28662e4f3fb259d3d81bda3b59860
[ "Apache-2.0" ]
null
null
null
integration/tests/cook/util.py
yueri/Cook
12162ef040c28662e4f3fb259d3d81bda3b59860
[ "Apache-2.0" ]
null
null
null
import functools import importlib import itertools import json import logging import os import os.path import subprocess import time import unittest import uuid from datetime import datetime from urllib.parse import urlencode, urlparse import numpy import requests from retrying import retry from tests.cook import mes...
37.449472
127
0.6813
import functools import importlib import itertools import json import logging import os import os.path import subprocess import time import unittest import uuid from datetime import datetime from urllib.parse import urlencode, urlparse import numpy import requests from retrying import retry from tests.cook import mes...
true
true
1c043d5e5fe11ca17bd952188d8115d8a9247a87
14,754
py
Python
treem/cli.py
a1eko/treem
41039b0734bfe84fe637783842849038630ecb7f
[ "MIT" ]
1
2020-10-06T13:09:02.000Z
2020-10-06T13:09:02.000Z
treem/cli.py
a1eko/treem
41039b0734bfe84fe637783842849038630ecb7f
[ "MIT" ]
null
null
null
treem/cli.py
a1eko/treem
41039b0734bfe84fe637783842849038630ecb7f
[ "MIT" ]
1
2021-09-22T14:17:22.000Z
2021-09-22T14:17:22.000Z
"""Command-line interface to package treem.""" # pylint: disable=too-many-statements import argparse import sys from treem.io import SWC from treem.commands.check import check from treem.commands.view import view from treem.commands.find import find from treem.commands.modify import modify from treem.commands.repai...
56.746154
83
0.531178
import argparse import sys from treem.io import SWC from treem.commands.check import check from treem.commands.view import view from treem.commands.find import find from treem.commands.modify import modify from treem.commands.repair import repair from treem.commands.measure import measure from treem.commands.conver...
true
true
1c043e14c2e7f5f6b52c84746989e1330e8cc843
1,493
py
Python
Backtracking/047. Permutations II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Backtracking/047. Permutations II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Backtracking/047. Permutations II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
""" 47. Permutations II Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [ [1,1,2], [1,2,1], [2,1,1] ] """ #2019 class Solution: def permuteUnique(self, nums: List[int]) -> List[List[int]]: ...
26.192982
121
0.494307
class Solution: def permuteUnique(self, nums: List[int]) -> List[List[int]]: def generate(cur, nums): if not nums: yield cur for i, v in enumerate(nums): if i == 0 or v != nums[i-1]: for p in generate(cur+[v], nums[:i]+nums[i+1:]): ...
true
true
1c043e84b41bca6d99790e1d105dca18d71e5b7c
547
py
Python
medvision/util/__init__.py
rouroulee/medvision
dfd392afd4f90b5359d769e6fb5c04ba27b54ab6
[ "Apache-2.0" ]
1
2019-02-19T06:48:28.000Z
2019-02-19T06:48:28.000Z
medvision/util/__init__.py
rouroulee/medvision
dfd392afd4f90b5359d769e6fb5c04ba27b54ab6
[ "Apache-2.0" ]
null
null
null
medvision/util/__init__.py
rouroulee/medvision
dfd392afd4f90b5359d769e6fb5c04ba27b54ab6
[ "Apache-2.0" ]
null
null
null
from .fileutil import (isdir, isfile, listdir, joinpath, basename, parentdir, cp, rm, cptree, rmtree, move, mkdirs, empty_dir, non_overwrite_cp, copyfiles, GlobMode, glob) from .multiprocessutil import tqdm_imap from .typeutil import isarrayinstance __all__ = [ 'isdir...
34.1875
77
0.634369
from .fileutil import (isdir, isfile, listdir, joinpath, basename, parentdir, cp, rm, cptree, rmtree, move, mkdirs, empty_dir, non_overwrite_cp, copyfiles, GlobMode, glob) from .multiprocessutil import tqdm_imap from .typeutil import isarrayinstance __all__ = [ 'isdir...
true
true
1c043f9d3feee84b320f5053304bcdf782baa826
4,825
py
Python
nova/consoleauth/manager.py
bopopescu/OpenStack-DNRM-Nova
7354f378398850113ac93b511547ed05218dc770
[ "Apache-2.0" ]
null
null
null
nova/consoleauth/manager.py
bopopescu/OpenStack-DNRM-Nova
7354f378398850113ac93b511547ed05218dc770
[ "Apache-2.0" ]
null
null
null
nova/consoleauth/manager.py
bopopescu/OpenStack-DNRM-Nova
7354f378398850113ac93b511547ed05218dc770
[ "Apache-2.0" ]
1
2020-07-24T08:49:47.000Z
2020-07-24T08:49:47.000Z
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation # 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 # ...
37.992126
77
0.632953
import time from oslo.config import cfg from nova.cells import rpcapi as cells_rpcapi from nova.compute import rpcapi as compute_rpcapi from nova import manager from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import memorycache LOG = logging...
true
true
1c043fcaf76ea716272fc3c81332d8da4fe3f846
7,809
py
Python
pysnmp/JUNIPER-UTIL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/JUNIPER-UTIL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/JUNIPER-UTIL-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module JUNIPER-UTIL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-UTIL-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:31 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
109.985915
1,117
0.763606
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuilder.impo...
true
true
1c043fe0f01a6f4faabc8eb1f7e2a3a9da8648f1
37
py
Python
tests/__init__.py
sethfischer/mundo-flags
20e5ad68d760b6c736701f6e43551c738456098d
[ "MIT" ]
null
null
null
tests/__init__.py
sethfischer/mundo-flags
20e5ad68d760b6c736701f6e43551c738456098d
[ "MIT" ]
1
2021-09-06T01:48:18.000Z
2021-09-06T08:47:36.000Z
tests/__init__.py
sethfischer/mundo-flags
20e5ad68d760b6c736701f6e43551c738456098d
[ "MIT" ]
null
null
null
"""Tests for manage_flags module."""
18.5
36
0.702703
true
true
1c044039c3a2e6d0c7303712bdb9048049a577a2
992
py
Python
examples/ex_dbg.py
Learner0x5a/idapython
585173f0d49b7deaa5aedc136f73af910a8d4b38
[ "BSD-3-Clause" ]
10
2017-02-15T05:03:25.000Z
2021-01-22T07:20:32.000Z
examples/ex_dbg.py
Learner0x5a/idapython
585173f0d49b7deaa5aedc136f73af910a8d4b38
[ "BSD-3-Clause" ]
null
null
null
examples/ex_dbg.py
Learner0x5a/idapython
585173f0d49b7deaa5aedc136f73af910a8d4b38
[ "BSD-3-Clause" ]
30
2016-01-27T22:47:30.000Z
2022-03-11T19:56:59.000Z
from tempo import *; def test_getmeminfo(): L = tempo.getmeminfo() out = [] # startEA endEA name sclass sbase bitness perm for (startEA, endEA, name, sclass, sbase, bitness, perm) in L: out.append("%x: %x name=<%s> sclass=<%s> sbase=%x bitness=%2x perm=%2x" % (startEA, endEA, name, sclass, sba...
28.342857
135
0.602823
from tempo import *; def test_getmeminfo(): L = tempo.getmeminfo() out = [] for (startEA, endEA, name, sclass, sbase, bitness, perm) in L: out.append("%x: %x name=<%s> sclass=<%s> sbase=%x bitness=%2x perm=%2x" % (startEA, endEA, name, sclass, sbase, bitness, perm)) f = file(r"d:\temp\out...
false
true
1c0441a78986b3009d57e89473af28461403443e
4,125
py
Python
tests/h/services/nipsa_test.py
Manuelinux/kubeh
a549f0d1c09619843290f9b78bce7668ed90853a
[ "BSD-2-Clause" ]
null
null
null
tests/h/services/nipsa_test.py
Manuelinux/kubeh
a549f0d1c09619843290f9b78bce7668ed90853a
[ "BSD-2-Clause" ]
4
2020-03-24T17:38:24.000Z
2022-03-02T05:45:01.000Z
tests/h/services/nipsa_test.py
Manuelinux/kubeh
a549f0d1c09619843290f9b78bce7668ed90853a
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from h.services.nipsa import NipsaService from h.services.nipsa import nipsa_factory @pytest.mark.usefixtures("users", "reindex_user_annotations") class TestNipsaService: def test_fetch_all_flagged_userids_returns_set_of_userids(self...
30.555556
82
0.689212
from __future__ import unicode_literals import pytest from h.services.nipsa import NipsaService from h.services.nipsa import nipsa_factory @pytest.mark.usefixtures("users", "reindex_user_annotations") class TestNipsaService: def test_fetch_all_flagged_userids_returns_set_of_userids(self, db_session): s...
true
true
1c0441be87b29ee14c2efc39180ef89795d3e117
12,392
py
Python
amparex/model/order_by.py
Inch4Tk/amparex_python_api
f372c15a1e67293329bdd8bee8ad66624ed1341f
[ "Apache-2.0" ]
null
null
null
amparex/model/order_by.py
Inch4Tk/amparex_python_api
f372c15a1e67293329bdd8bee8ad66624ed1341f
[ "Apache-2.0" ]
null
null
null
amparex/model/order_by.py
Inch4Tk/amparex_python_api
f372c15a1e67293329bdd8bee8ad66624ed1341f
[ "Apache-2.0" ]
null
null
null
""" AMPAREX Rest API Documentation This is the description of the AMPAREX Rest API. All REST calls plus the corresponding data model are described in this documentation. Direct calls to the server are possible over this page.&lt;br/&gt;Following steps are needed to use the API:&lt;br/&gt;&lt;br/&gt;1. Get the ...
47.661538
1,241
0.584893
import re import sys from amparex.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) from ..model_...
true
true
1c0441c2fe45d95ffccd826e1447f12de6a14d35
559
py
Python
guppe/atividades/secao_8/ex045.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
guppe/atividades/secao_8/ex045.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
guppe/atividades/secao_8/ex045.py
WesleyLucas97/cursos_python
b2cbd393e8fed6e36b84253f7934766f2b4f1de8
[ "MIT" ]
null
null
null
""" Faça uma funcao que calcule o desvio padrao de um vetor v contendo n números Desvio Padrao: onde m é a media do vetor. """ import random import math def media(x: list): med = sum(x)/len(x) return med def desvio(x: list): soma = 0 for i in x: soma += pow(i - media(x), 2) desvio_padr...
18.633333
76
0.627907
import random import math def media(x: list): med = sum(x)/len(x) return med def desvio(x: list): soma = 0 for i in x: soma += pow(i - media(x), 2) desvio_padrao = math.sqrt((1 / (len(x) - 1)) * soma) return f'O desvio padrao do vetor {x} é {desvio_padrao:.5f}' lista = [] for x in ...
true
true
1c04420df9dd38359b64e7cbf257ba356c723caf
2,494
py
Python
monitor-manager/monitor-manager.py
pientaa/opening-black-box
9fa3ecd5298a940893f289550d441a38b0bee71d
[ "Apache-2.0" ]
null
null
null
monitor-manager/monitor-manager.py
pientaa/opening-black-box
9fa3ecd5298a940893f289550d441a38b0bee71d
[ "Apache-2.0" ]
24
2020-12-31T09:21:55.000Z
2021-06-16T12:06:00.000Z
monitor-manager/monitor-manager.py
pientaa/opening-black-box
9fa3ecd5298a940893f289550d441a38b0bee71d
[ "Apache-2.0" ]
null
null
null
import json import logging import pandas as pd import requests import socket import time from csv import reader from flask import Flask app = Flask(__name__) @app.route('/') def health_check(): return "Monitor Manager working" @app.route('/experiments', methods=['post']) def start_experiments...
37.223881
111
0.647955
import json import logging import pandas as pd import requests import socket import time from csv import reader from flask import Flask app = Flask(__name__) @app.route('/') def health_check(): return "Monitor Manager working" @app.route('/experiments', methods=['post']) def start_experiments...
true
true
1c04424b4dcd43507529850c27cb80f474526cd4
6,938
py
Python
pyfibot/modules/available/module_ask.py
egetin/pyfibot
7fe7f0bd61d0c4d5dc52d86927686dc475f44a3e
[ "BSD-3-Clause" ]
null
null
null
pyfibot/modules/available/module_ask.py
egetin/pyfibot
7fe7f0bd61d0c4d5dc52d86927686dc475f44a3e
[ "BSD-3-Clause" ]
null
null
null
pyfibot/modules/available/module_ask.py
egetin/pyfibot
7fe7f0bd61d0c4d5dc52d86927686dc475f44a3e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Pyfibot START Knowledge Parser @author Ville 'tuhoojabotti' Lahdenvuo <tuhoojabotti@gmail.com> (http://www.tuhoojabotti.com/) @copyright Copyright (c) 2011 Ville Lahdenvuo @licence BSD $Id$ $HeadURL$ """ import urllib import re import htmlentitydefs import sys import...
41.795181
168
0.552753
import urllib import re import htmlentitydefs import sys import os import logging import yaml from BeautifulSoup import BeautifulStoneSoup, Comment log = logging.getLogger('ask') def init(botconfig): global askconfig configfile = os.path.join(sys.path[0], 'modules', 'module_ask.conf') askconfig =...
true
true
1c04448aaf5f752a1933d706e3c352eb10fb8927
2,127
py
Python
helpers/sett/resolvers/StrategyBadgerLpMetaFarmResolver.py
EchoDao-BSC/badger-system
d9276c5ce2053f0f5f1eb832f6f13204d1be9489
[ "MIT" ]
null
null
null
helpers/sett/resolvers/StrategyBadgerLpMetaFarmResolver.py
EchoDao-BSC/badger-system
d9276c5ce2053f0f5f1eb832f6f13204d1be9489
[ "MIT" ]
null
null
null
helpers/sett/resolvers/StrategyBadgerLpMetaFarmResolver.py
EchoDao-BSC/badger-system
d9276c5ce2053f0f5f1eb832f6f13204d1be9489
[ "MIT" ]
null
null
null
from helpers.multicall import functions, Call, func, as_wei from helpers.sett.resolvers.StrategyCoreResolver import StrategyCoreResolver from brownie import * def confirm_harvest_badger_lp(before, after): """ Harvest Should; - Increase the balanceOf() underlying asset in the Strategy - Reduce the amoun...
34.306452
90
0.658674
from helpers.multicall import functions, Call, func, as_wei from helpers.sett.resolvers.StrategyCoreResolver import StrategyCoreResolver from brownie import * def confirm_harvest_badger_lp(before, after): assert after.strategy.balanceOf >= before.strategy.balanceOf if before.sett.pricePerFullShare: as...
true
true
1c0446b69f891ffedc7f760dbaced139ff359750
531
py
Python
artellapipe/tools/playblastmanager/__version__.py
ArtellaPipe/artellapipe-tools-playblastmanager
05f1647b6b3b367c9ba9d5e8978cf32b5823f819
[ "MIT" ]
2
2019-11-26T15:59:16.000Z
2020-04-17T23:42:35.000Z
artellapipe/tools/playblastmanager/__version__.py
ArtellaPipe/artellapipe-tools-playblastmanager
05f1647b6b3b367c9ba9d5e8978cf32b5823f819
[ "MIT" ]
2
2020-03-08T20:08:18.000Z
2020-03-08T20:08:26.000Z
artellapipe/tools/playblastmanager/__version__.py
ArtellaPipe/artellapipe-tools-playblastmanager
05f1647b6b3b367c9ba9d5e8978cf32b5823f819
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Version module for artellapipe-tools-playblastmanager """ from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" __version__ = None def get...
18.964286
64
0.723164
from __future__ import print_function, division, absolute_import __author__ = "Tomas Poveda" __license__ = "MIT" __maintainer__ = "Tomas Poveda" __email__ = "tpovedatd@gmail.com" __version__ = None def get_version(): global __version__ if __version__: return __version__ from ._version import ...
true
true
1c0448be3c9c52edf4b4bacdc834db9f91f26f84
212
py
Python
citz/citz/doctype/weekday/test_weekday.py
Lewinta/Citz
98885f5b846b7cef88354fe6e6248c5b27e1f7b7
[ "MIT" ]
1
2021-07-01T18:39:54.000Z
2021-07-01T18:39:54.000Z
citz/citz/doctype/weekday/test_weekday.py
Lewinta/Citz
98885f5b846b7cef88354fe6e6248c5b27e1f7b7
[ "MIT" ]
null
null
null
citz/citz/doctype/weekday/test_weekday.py
Lewinta/Citz
98885f5b846b7cef88354fe6e6248c5b27e1f7b7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Lewin Villar and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestWeekday(unittest.TestCase): pass
19.272727
51
0.759434
from __future__ import unicode_literals import unittest class TestWeekday(unittest.TestCase): pass
true
true
1c0449952394c884b1892481c1642210c31f4770
18,050
py
Python
ibmcloud/vpc/actions.py
IBM/chaostoolkit-ibm
062e271ab92f7860ce78f7b7c6cc73937bbb8df1
[ "Apache-2.0" ]
7
2021-01-30T22:38:08.000Z
2021-08-20T01:03:02.000Z
ibmcloud/vpc/actions.py
newcombest/chaostoolkit-ibm
062e271ab92f7860ce78f7b7c6cc73937bbb8df1
[ "Apache-2.0" ]
8
2021-02-19T00:37:30.000Z
2022-02-09T09:44:06.000Z
ibmcloud/vpc/actions.py
newcombest/chaostoolkit-ibm
062e271ab92f7860ce78f7b7c6cc73937bbb8df1
[ "Apache-2.0" ]
3
2020-10-13T15:19:54.000Z
2021-12-29T20:34:30.000Z
# -*- coding: utf-8 -*- from typing import Any, Dict from chaoslib.types import Configuration from ibmcloud import create_ibmcloud_api_client, tag_virtual_instance from ibmcloud.vpc.constants import REBOOT, START, STOP from ibm_cloud_sdk_core import ApiException from ibm_cloud_sdk_core import BaseService, Detai...
46.163683
205
0.590305
from typing import Any, Dict from chaoslib.types import Configuration from ibmcloud import create_ibmcloud_api_client, tag_virtual_instance from ibmcloud.vpc.constants import REBOOT, START, STOP from ibm_cloud_sdk_core import ApiException from ibm_cloud_sdk_core import BaseService, DetailedResponse from ibm_vpc...
true
true
1c04499ef0f211c628222a1f069571617fc38565
4,499
py
Python
examples/gridding/Wind_SLP_Interpolation.py
shofer16450/MetPy
82fcb11ead3f777047d2d2a25decb11949b81b4b
[ "BSD-3-Clause" ]
null
null
null
examples/gridding/Wind_SLP_Interpolation.py
shofer16450/MetPy
82fcb11ead3f777047d2d2a25decb11949b81b4b
[ "BSD-3-Clause" ]
null
null
null
examples/gridding/Wind_SLP_Interpolation.py
shofer16450/MetPy
82fcb11ead3f777047d2d2a25decb11949b81b4b
[ "BSD-3-Clause" ]
1
2019-10-04T02:30:01.000Z
2019-10-04T02:30:01.000Z
# Copyright (c) 2016,2017 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ Wind and Sea Level Pressure Interpolation ========================================= Interpolate sea level pressure, as well as wind component data, to make a consistent loo...
40.531532
93
0.63792
import cartopy import cartopy.crs as ccrs from matplotlib.colors import BoundaryNorm import matplotlib.pyplot as plt import numpy as np import pandas as pd from metpy.calc import get_wind_components from metpy.cbook import get_test_data from metpy.gridding.gridding_functions import interpolate, remove_nan_observations...
true
true
1c044a681336c7be9f5d8a1560de39a372ed749d
265
py
Python
get_npy.py
vhzy/pythia
8fae4da2b7ad4d047a1a51651407ff1f91745d5f
[ "BSD-3-Clause" ]
null
null
null
get_npy.py
vhzy/pythia
8fae4da2b7ad4d047a1a51651407ff1f91745d5f
[ "BSD-3-Clause" ]
null
null
null
get_npy.py
vhzy/pythia
8fae4da2b7ad4d047a1a51651407ff1f91745d5f
[ "BSD-3-Clause" ]
null
null
null
import numpy as np test=np.load('/home/ubuntu/hzy/pythia/data/m4c_textvqa_ocr_en_frcn_features/train_images/f441f29812b385ad_info.npy',encoding = "latin1",allow_pickle=True) #加载文件 doc = open('contrast9.txt', 'a') #打开一个存储文件,并依次写入 print(test, file=doc) #将打印内容写入文件中
66.25
161
0.788679
import numpy as np test=np.load('/home/ubuntu/hzy/pythia/data/m4c_textvqa_ocr_en_frcn_features/train_images/f441f29812b385ad_info.npy',encoding = "latin1",allow_pickle=True) doc = open('contrast9.txt', 'a') print(test, file=doc)
true
true