hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
f7eace30e851dac67cabbc53949d5f1c79a23529
200
py
Python
utils/__init__.py
HapKoM/pyhowfar
b12c248f696dc9bc2b50455b63a2b6ca7a440ba7
[ "BSD-3-Clause" ]
59
2018-12-13T10:14:58.000Z
2021-11-23T19:16:58.000Z
utils/__init__.py
JPlin/pyhowfar
81a9aa1b5969cbe985a592f2908428a7abf4967b
[ "BSD-3-Clause" ]
7
2019-03-29T05:13:39.000Z
2021-02-08T23:00:32.000Z
utils/__init__.py
JPlin/pyhowfar
81a9aa1b5969cbe985a592f2908428a7abf4967b
[ "BSD-3-Clause" ]
14
2017-12-19T09:48:10.000Z
2022-01-10T08:14:43.000Z
from __future__ import absolute_import from .evaluation import * from .imutils import * from .logger import * from .misc import * from .osutils import * from .transforms import * from .loss import *
20
38
0.765
f7eaf17e23e788cab9357bf48e9007572adcf58f
15,725
py
Python
lambdas/helm-helper-lambda/helmHelperLambda.py
Alfresco/acs-deployment-aws
e61df46ad852755cd3be185922254092972abdfa
[ "ADSL" ]
17
2018-12-05T15:53:36.000Z
2021-12-09T18:06:17.000Z
lambdas/helm-helper-lambda/helmHelperLambda.py
Alfresco/acs-deployment-aws
e61df46ad852755cd3be185922254092972abdfa
[ "ADSL" ]
35
2018-09-27T13:53:53.000Z
2019-08-30T09:13:45.000Z
lambdas/helm-helper-lambda/helmHelperLambda.py
Alfresco/acs-deployment-aws
e61df46ad852755cd3be185922254092972abdfa
[ "ADSL" ]
22
2018-10-02T07:59:14.000Z
2021-05-25T14:00:24.000Z
import boto3 import os import json import logging import cfnresponse import uuid import time # Alfresco Enterprise ACS Deployment AWS # Copyright (C) 2005 - 2018 Alfresco Software Limited # License rights for this program may be obtained from Alfresco Software, Ltd. # pursuant to a written agreement and any use of thi...
47.222222
181
0.543466
f7eafc290ad19bf2f2f71bacca8c158a8e86bac3
946
py
Python
testapp/customfields/env.py
stevelittlefish/easyforms
7944b83ec94a29ca55777d16536e13cbf8f6996f
[ "Apache-2.0" ]
5
2017-04-27T09:08:33.000Z
2020-08-25T21:54:56.000Z
testapp/customfields/env.py
stevelittlefish/easyforms
7944b83ec94a29ca55777d16536e13cbf8f6996f
[ "Apache-2.0" ]
8
2021-01-15T15:42:44.000Z
2022-01-13T00:41:20.000Z
testapp/customfields/env.py
stevelittlefish/easyforms
7944b83ec94a29ca55777d16536e13cbf8f6996f
[ "Apache-2.0" ]
null
null
null
""" Contains the jinja2 environment for the custom fields """ import logging import os from jinja2 import Environment, FileSystemLoader import jinja2 from easyforms import formtype from easyforms import styles __author__ = 'Stephen Brown (Little Fish Solutions LTD)' log = logging.getLogger(__name__) def _suppres...
25.567568
92
0.768499
f7eb111f4e47f206f236b8446a3b65134d5b93a7
2,612
py
Python
st2common/tests/unit/test_util_sandboxing.py
UbuntuEvangelist/st2
36af04f2caa03b396fb8ab00fd6d700e827fda8d
[ "Apache-2.0" ]
1
2020-11-21T10:11:25.000Z
2020-11-21T10:11:25.000Z
st2common/tests/unit/test_util_sandboxing.py
UbuntuEvangelist/st2
36af04f2caa03b396fb8ab00fd6d700e827fda8d
[ "Apache-2.0" ]
1
2015-06-08T15:27:11.000Z
2015-06-08T15:27:11.000Z
st2common/tests/unit/test_util_sandboxing.py
UbuntuEvangelist/st2
36af04f2caa03b396fb8ab00fd6d700e827fda8d
[ "Apache-2.0" ]
13
2017-01-12T11:07:20.000Z
2019-04-19T09:55:49.000Z
import os import sys import unittest import mock from st2common.constants.pack import SYSTEM_PACK_NAMES from st2common.util.sandboxing import get_sandbox_python_path from st2common.util.sandboxing import get_sandbox_python_binary_path import st2tests.config as tests_config class SandboxingUtilsTestCase(unittest.Tes...
42.819672
90
0.68415
f7eb23457b2310c0ba87f46581ef2d843fc4c321
84,901
py
Python
arc/species/converterTest.py
amarkpayne/ARC
fcc3bc0050f50a81c02192f72aaa31ea47d29818
[ "MIT" ]
null
null
null
arc/species/converterTest.py
amarkpayne/ARC
fcc3bc0050f50a81c02192f72aaa31ea47d29818
[ "MIT" ]
null
null
null
arc/species/converterTest.py
amarkpayne/ARC
fcc3bc0050f50a81c02192f72aaa31ea47d29818
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # encoding: utf-8 """ This module contains unit tests of the arc.species.converter module """ import unittest from rdkit import Chem from rdkit.Chem import rdMolTransforms as rdMT, rdchem from rmgpy.molecule.molecule import Molecule from rmgpy.species import Species import arc.species.conver...
53.363294
120
0.541266
f7eb26b1b0e262aa1180fe676ef3fa7805a28f35
1,815
py
Python
producers/producer.py
ValntinDragan/dracon-1
a1d98a1ba6f91835d8bb1f48f94311ed7a0569f9
[ "Apache-2.0" ]
72
2019-10-03T08:46:57.000Z
2021-12-31T19:44:37.000Z
producers/producer.py
ValntinDragan/dracon-1
a1d98a1ba6f91835d8bb1f48f94311ed7a0569f9
[ "Apache-2.0" ]
38
2019-12-27T17:11:31.000Z
2021-10-13T22:46:23.000Z
producers/producer.py
ValntinDragan/dracon-1
a1d98a1ba6f91835d8bb1f48f94311ed7a0569f9
[ "Apache-2.0" ]
9
2019-12-14T23:03:00.000Z
2022-02-22T13:50:56.000Z
#!/usr/bin/env python3 import os import logging import json import argparse from gen import engine_pb2 from gen import issue_pb2 logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() __source_dir = "/dracon/source" def parse_flags(args: object) -> object: """ Parses the input flags for ...
25.208333
84
0.663912
f7eb2b43343caf324c351217dda1926c593f0c85
1,668
py
Python
tests/scripts/simple_http_server.py
whileskies/incubator-teaclave
b710a2e97b79e356fe15726b3135fa4ef9132a31
[ "MIT", "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/scripts/simple_http_server.py
whileskies/incubator-teaclave
b710a2e97b79e356fe15726b3135fa4ef9132a31
[ "MIT", "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/scripts/simple_http_server.py
whileskies/incubator-teaclave
b710a2e97b79e356fe15726b3135fa4ef9132a31
[ "MIT", "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # 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 # "...
32.076923
79
0.727218
f7eb3c125db61cd406c0b8fe325ad9bb937f4f07
69,101
py
Python
pandas/tools/tests/test_merge.py
ssalonen/pandas
1929563fdb5358a41420d103a388aa2bd494d543
[ "PSF-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tools/tests/test_merge.py
ssalonen/pandas
1929563fdb5358a41420d103a388aa2bd494d543
[ "PSF-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tools/tests/test_merge.py
ssalonen/pandas
1929563fdb5358a41420d103a388aa2bd494d543
[ "PSF-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# pylint: disable=E1103 import nose import unittest from datetime import datetime from numpy.random import randn from numpy import nan import numpy as np import random from pandas.compat import range, lrange, lzip, zip from pandas import compat from pandas.tseries.index import DatetimeIndex from pandas.tools.merge i...
37.946733
111
0.51322
f7eb55e432ff8c8cdb329d3157e04b439dadb0c7
1,401
py
Python
tb/CRC32/test_CRC32.py
nmk456/fpga-sdr
39588837cf0d765e42c40b9dbaf151ce09315c0c
[ "MIT" ]
8
2021-06-05T05:36:45.000Z
2021-12-24T00:34:17.000Z
tb/CRC32/test_CRC32.py
nmk456/fpga-sdr
39588837cf0d765e42c40b9dbaf151ce09315c0c
[ "MIT" ]
1
2021-07-29T17:35:35.000Z
2021-08-04T18:37:57.000Z
tb/CRC32/test_CRC32.py
nmk456/fpga-sdr
39588837cf0d765e42c40b9dbaf151ce09315c0c
[ "MIT" ]
1
2021-06-03T14:14:21.000Z
2021-06-03T14:14:21.000Z
import cocotb from cocotb.clock import Clock from cocotb.triggers import RisingEdge, FallingEdge, Edge, Timer from cocotb.binary import BinaryValue import random import numpy as np import zlib def randbytes(n): for _ in range(n): yield random.getrandbits(8) async def do_crc(dut, data): dut.rst <= 1 ...
21.553846
132
0.654532
f7eb70681ab997ad731db10fb1608633f484afa1
14,889
py
Python
ForgeImporters/forgeimporters/tests/test_base.py
shalithasuranga/allura
4f7fba13415954d07f602a051ec697329dd3706b
[ "Apache-2.0" ]
1
2019-03-17T04:16:15.000Z
2019-03-17T04:16:15.000Z
ForgeImporters/forgeimporters/tests/test_base.py
DalavanCloud/allura
a25329caed9e6d136a1004c33372e0632a16e352
[ "Apache-2.0" ]
null
null
null
ForgeImporters/forgeimporters/tests/test_base.py
DalavanCloud/allura
a25329caed9e6d136a1004c33372e0632a16e352
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
37.982143
101
0.656189
f7eb91031becbd6c294ae59d0cca7d0667ed4188
10,021
py
Python
clustering/old_patient_clustering_script.py
MarkMoretto/python-examples-main
37b8c41d2f175029f4536ca970f037ff19b4e951
[ "MIT" ]
1
2020-07-21T23:24:25.000Z
2020-07-21T23:24:25.000Z
clustering/old_patient_clustering_script.py
MarkMoretto/python-examples-main
37b8c41d2f175029f4536ca970f037ff19b4e951
[ "MIT" ]
4
2021-06-29T00:38:57.000Z
2022-01-15T00:22:15.000Z
clustering/old_patient_clustering_script.py
MarkMoretto/python-examples-main
37b8c41d2f175029f4536ca970f037ff19b4e951
[ "MIT" ]
null
null
null
""" Topic: Claims Grouping Analysis Exercise Author: Mark Moretto Date Created: 05/10/2018 """ import gc import os import sys import pyodbc import random import textwrap import warnings import numpy as np import pandas as pd from time import time from time import sleep from copy import deepcopy from datetime import ...
29.735905
157
0.613312
f7eb93f1601d6013bb1f1d61a40025e8320d327d
24,104
py
Python
src/pynwb/ecephys.py
q0j0p/pynwb
6c3a864662f2cce63b542f9f614cc632903f9bc1
[ "BSD-3-Clause-LBNL" ]
null
null
null
src/pynwb/ecephys.py
q0j0p/pynwb
6c3a864662f2cce63b542f9f614cc632903f9bc1
[ "BSD-3-Clause-LBNL" ]
1
2021-06-01T22:25:36.000Z
2021-06-01T22:25:36.000Z
src/pynwb/ecephys.py
q0j0p/pynwb
6c3a864662f2cce63b542f9f614cc632903f9bc1
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np from h5py import RegionReference from collections import Iterable from .form.utils import docval, getargs, popargs, call_docval_func from .form.data_utils import DataChunkIterator, ShapeValidator from . import register_class, CORE_NAMESPACE from .base import TimeSeries, _default_resolution, _defaul...
52.743982
118
0.60546
f7eb99b20982ba8959dcaad5b60b1cd47cd773d5
4,170
py
Python
metrics-pusher/src/bai_metrics_pusher/loop.py
gavinmbell/benchmark-ai-1
a697e67d68b843fe9350e55871dad867bab5d51d
[ "Apache-2.0" ]
6
2020-09-29T09:03:04.000Z
2022-03-14T06:52:25.000Z
metrics-pusher/src/bai_metrics_pusher/loop.py
gavinmbell/benchmark-ai-1
a697e67d68b843fe9350e55871dad867bab5d51d
[ "Apache-2.0" ]
null
null
null
metrics-pusher/src/bai_metrics_pusher/loop.py
gavinmbell/benchmark-ai-1
a697e67d68b843fe9350e55871dad867bab5d51d
[ "Apache-2.0" ]
4
2020-10-01T07:49:22.000Z
2021-06-16T19:44:12.000Z
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "l...
40.882353
120
0.696882
f7ebd992a3f502058c48a3ff8be63ecce034a2b9
14,906
py
Python
userbot/plugins/stickers.py
kumar451/CatUserbot
44fab853232fad163fee63565cc4f3e645596527
[ "MIT" ]
null
null
null
userbot/plugins/stickers.py
kumar451/CatUserbot
44fab853232fad163fee63565cc4f3e645596527
[ "MIT" ]
null
null
null
userbot/plugins/stickers.py
kumar451/CatUserbot
44fab853232fad163fee63565cc4f3e645596527
[ "MIT" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. """ Userbot module for kanging stickers or making new ones. Thanks @rupansh""" import io import math import urllib.request...
46.436137
139
0.566148
f7ebe5a60d2ed1bf280d514c3995c55c4d94a61c
858
py
Python
tests/test_confluenceclient.py
cledouarec/confluence-extractor
760911ee82a79ec2c3962107d87e7b00b12b24b4
[ "Apache-2.0" ]
2
2021-12-08T13:16:19.000Z
2022-02-15T14:20:39.000Z
tests/test_confluenceclient.py
cledouarec/confluence-extractor
760911ee82a79ec2c3962107d87e7b00b12b24b4
[ "Apache-2.0" ]
null
null
null
tests/test_confluenceclient.py
cledouarec/confluence-extractor
760911ee82a79ec2c3962107d87e7b00b12b24b4
[ "Apache-2.0" ]
null
null
null
#! python3 """ Unit tests for confluenceclient. """ import pytest from confluenceexport.confluenceclient import ConfluenceClient def test_create_confluence_client_with_empty_url() -> None: """ Confluence client creation with invalid url must raise an exception. """ with pytest.raises(Exception): ...
26
77
0.707459
f7ebe67ac62daf33a9e246cf89b2b4b3d55fe59f
1,528
py
Python
Server/api.py
George35mk/Docker-NGINX-NG5-Flask-Elastic
e49fa97c43d6d9305fae92c3773699c30df9af08
[ "MIT" ]
3
2017-12-31T19:20:59.000Z
2020-01-20T14:07:23.000Z
Server/api.py
George35mk/Docker-NGINX-NG5-Flask-Elastic
e49fa97c43d6d9305fae92c3773699c30df9af08
[ "MIT" ]
null
null
null
Server/api.py
George35mk/Docker-NGINX-NG5-Flask-Elastic
e49fa97c43d6d9305fae92c3773699c30df9af08
[ "MIT" ]
1
2021-02-19T23:02:53.000Z
2021-02-19T23:02:53.000Z
''' Docker + python 3.6.3 and Elasticsearch 6.0.1 ''' from flask import Flask, jsonify from elasticsearch import Elasticsearch from datetime import datetime import os es_host = os.environ['ELASTICSEARCH_HOST'] # 127.0.0.1 es_port = os.environ['ELASTICSEARCH_PORT'] # 9200 # IF ENV DONT WORK TRY THIS. # es_host = 'el...
21.222222
56
0.581152
f7ec22e7d4d33815ae93263a58fa047a392acec4
829
py
Python
detector_block/get_transactions_from_block.py
RightMesh/payment-channel-performance
3abde2d4d32353e212a49c946cb8222f297379e7
[ "MIT" ]
null
null
null
detector_block/get_transactions_from_block.py
RightMesh/payment-channel-performance
3abde2d4d32353e212a49c946cb8222f297379e7
[ "MIT" ]
43
2019-01-25T23:54:27.000Z
2019-04-09T02:36:52.000Z
detector_block/get_transactions_from_block.py
RightMesh/payment-channel-performance
3abde2d4d32353e212a49c946cb8222f297379e7
[ "MIT" ]
1
2019-04-27T00:17:44.000Z
2019-04-27T00:17:44.000Z
from websocket import create_connection def get_transactions_from_block(url, query): ws = create_connection(url) # print("Sending 'Hello, World'...") # print(query) ws.send(query) # print("Sent") # print("Receiving...") result = ws.recv() # print("Received '%s'" % result) ws.close(...
43.631579
153
0.716526
f7ec2ff9fe2b7d3b1bf56d23e6aeb51d20c3c459
26,951
py
Python
nova/virt/xenapi/driver.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/virt/xenapi/driver.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/virt/xenapi/driver.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
1
2020-07-24T01:18:44.000Z
2020-07-24T01:18:44.000Z
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 OpenStack Foundation # # 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...
42.576619
79
0.6389
f7ec3636b532eb2ecfd215d4f719239468e76cf6
1,825
py
Python
tests/util/test_mwi_logger.py
chimmy-changa/dummy-mp-npm-test
0737c988ea569bf05b109721f56b0c3f3a150718
[ "BSD-2-Clause" ]
5
2022-01-13T01:51:44.000Z
2022-03-01T14:32:46.000Z
tests/util/test_mwi_logger.py
chimmy-changa/dummy-mp-npm-test
0737c988ea569bf05b109721f56b0c3f3a150718
[ "BSD-2-Clause" ]
1
2022-02-15T13:39:41.000Z
2022-02-16T10:29:24.000Z
tests/util/test_mwi_logger.py
chimmy-changa/dummy-mp-npm-test
0737c988ea569bf05b109721f56b0c3f3a150718
[ "BSD-2-Clause" ]
1
2022-03-28T22:46:42.000Z
2022-03-28T22:46:42.000Z
# Copyright 2021 The MathWorks, Inc. """This file tests methods present in matlab_proxy/util/mwi_logger.py """ import os import logging from matlab_proxy.util import mwi_logger def test_get(): """This test checks if the get method returns a logger with expected name""" logger = mwi_logger.get() # Okay to...
37.244898
83
0.751233
f7ec372dd008ebb443dc84b799853bf9aa15a868
3,908
py
Python
networks/network.py
CUUATS/cuuatsalg
0066c18c6606df7dede3627b978047fa5974efa9
[ "BSD-3-Clause" ]
null
null
null
networks/network.py
CUUATS/cuuatsalg
0066c18c6606df7dede3627b978047fa5974efa9
[ "BSD-3-Clause" ]
1
2018-02-21T15:43:07.000Z
2018-02-21T15:43:07.000Z
networks/network.py
CUUATS/cuuatsalg
0066c18c6606df7dede3627b978047fa5974efa9
[ "BSD-3-Clause" ]
null
null
null
import math from collections import defaultdict from qgis.core import QgsGeometry, QgsSpatialIndex, QgsFeature, QgsPoint, \ QgsFeatureRequest class Network(object): def __init__(self, network_id, feature_source, index=True): self._id = network_id if isinstance(feature_source, dict): ...
31.264
78
0.581627
f7ec6b6ed59b6b5f7adcaaf5e1e0e976c70cfe28
3,954
py
Python
gnn/utils.py
ytchx1999/MAXP_DGL_Graph
01ea0dc3e6f957b8c7a9b6958df02559f1866b32
[ "MIT" ]
21
2021-12-23T14:03:41.000Z
2022-03-24T06:47:05.000Z
gnn/utils.py
ytchx1999/MAXP_DGL_Graph
01ea0dc3e6f957b8c7a9b6958df02559f1866b32
[ "MIT" ]
null
null
null
gnn/utils.py
ytchx1999/MAXP_DGL_Graph
01ea0dc3e6f957b8c7a9b6958df02559f1866b32
[ "MIT" ]
6
2022-01-14T05:27:13.000Z
2022-01-19T12:59:16.000Z
# -*- coding:utf-8 -*- """ Utilities to handel graph data """ import os import dgl import pickle import numpy as np import torch as th from ogb.nodeproppred import DglNodePropPredDataset def load_dgl_graph(base_path): """ 读取预处理的Graph,Feature和Label文件,并构建相应的数据供训练代码使用。 :param base_path: :return: ...
36.611111
101
0.623925
f7ec71139dcf9cf5b61cadfde344820d467ee637
3,873
py
Python
exception_hierarchy.py
jav4534/repy_v2
64b2e57379ba9f0df9ae4fe3cb3c0cb4c8544ca3
[ "MIT" ]
null
null
null
exception_hierarchy.py
jav4534/repy_v2
64b2e57379ba9f0df9ae4fe3cb3c0cb4c8544ca3
[ "MIT" ]
null
null
null
exception_hierarchy.py
jav4534/repy_v2
64b2e57379ba9f0df9ae4fe3cb3c0cb4c8544ca3
[ "MIT" ]
10
2020-09-10T19:49:29.000Z
2022-02-01T01:58:50.000Z
""" This file contains the exception hierarchy for repy. This allows repy modules to import a single file to have access to all the defined exceptions. """ # This list maintains the exceptions that are exported to the user # If the exception is not listed here, the user cannot explicitly # catch that error. _EXPORTE...
24.055901
77
0.673638
f7ec80a0f49add6cc90fc4e28eb326f29c8372b9
2,879
py
Python
pymag/utils/matching.py
inonchiu/PyMaG
ca6146cd354fd35be1eb21669bf505ff1acd3cb5
[ "MIT" ]
1
2017-04-21T13:27:23.000Z
2017-04-21T13:27:23.000Z
pymag/utils/matching.py
inonchiu/PyMaG
ca6146cd354fd35be1eb21669bf505ff1acd3cb5
[ "MIT" ]
null
null
null
pymag/utils/matching.py
inonchiu/PyMaG
ca6146cd354fd35be1eb21669bf505ff1acd3cb5
[ "MIT" ]
null
null
null
#!/usr/bin/env python ################################## # # Utils for PyMag # ################################## import numpy as np from math import * try: from scipy.spatial import cKDTree as KDT except ImportError: from scipy.spatial import KDTree as KDT # --- # matching unique id # --- def IdMatch(id1...
27.160377
157
0.550538
f7ec84fe64d1414770d52c542792e754b4d58fea
5,317
py
Python
alipay/aop/api/domain/AlipayFincoreComplianceCaasMerchantlevelConsultModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFincoreComplianceCaasMerchantlevelConsultModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFincoreComplianceCaasMerchantlevelConsultModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayFincoreComplianceCaasMerchantlevelConsultModel(object): def __init__(self): self._amount = None self._app_name = None self._app_token = None self._biz_type =...
30.210227
77
0.579838
f7ec9fff657d814413e953aff0bb84138e741df0
46,943
py
Python
napari/layers/points/_tests/test_points.py
mkitti/napari
4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86
[ "BSD-3-Clause" ]
null
null
null
napari/layers/points/_tests/test_points.py
mkitti/napari
4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86
[ "BSD-3-Clause" ]
null
null
null
napari/layers/points/_tests/test_points.py
mkitti/napari
4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86
[ "BSD-3-Clause" ]
null
null
null
from copy import copy from itertools import cycle, islice import numpy as np import pandas as pd import pytest from vispy.color import get_colormap from napari._tests.utils import check_layer_world_data_extent from napari.layers import Points from napari.layers.points._points_utils import points_to_squares from napar...
32.307639
83
0.660375
f7ecaf0e82de6c2a2d481af918c4e030b4e1a71a
1,436
py
Python
embed_loss.py
ahjeongseo/MASN---Attend-What-You-Need-Motion-Appearance-Synergistic-Networks-for-Video-Question-Answering
5ca3fc80cf37f7b6124070b1aae5bc599db8fa29
[ "MIT" ]
18
2021-06-22T01:44:59.000Z
2022-03-23T07:33:50.000Z
embed_loss.py
ahjeongseo/MASN---Attend-What-You-Need-Motion-Appearance-Synergistic-Networks-for-Video-Question-Answering
5ca3fc80cf37f7b6124070b1aae5bc599db8fa29
[ "MIT" ]
4
2021-06-26T02:39:02.000Z
2021-10-23T01:45:37.000Z
embed_loss.py
ahjeongseo/MASN---Attend-What-You-Need-Motion-Appearance-Synergistic-Networks-for-Video-Question-Answering
5ca3fc80cf37f7b6124070b1aae5bc599db8fa29
[ "MIT" ]
3
2021-07-26T11:28:19.000Z
2022-01-07T06:40:01.000Z
# -------------------------------------------------------- # This code is modified from Jumpin2's repository. # https://github.com/Jumpin2/HGA # -------------------------------------------------------- import torch import torch.nn as nn import torch.nn.functional as F # __all__ = ['MultipleChoiceLoss', 'CountLoss'] ...
29.306122
95
0.527855
f7ecafd5a2d9e1a1b1336974dbe774b24e804399
827
py
Python
scons/templates/wheezy_py3_mpi_options.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
scons/templates/wheezy_py3_mpi_options.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
scons/templates/wheezy_py3_mpi_options.py
markendr/esys-escript.github.io
0023eab09cd71f830ab098cb3a468e6139191e8d
[ "Apache-2.0" ]
null
null
null
############################################################################## # # Copyright (c) 2003-2020 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
33.08
78
0.628779
f7ecbe1816f1fbca9b3bb9d3992105ceac94ac7f
7,879
py
Python
scielomanager/journalmanager/templatetags/pagination_tags.py
patymori/scielo-manager
0945f377376de8ef0ada83c35b4e2312062cdf45
[ "BSD-2-Clause" ]
8
2015-07-07T03:09:16.000Z
2019-03-16T04:46:32.000Z
scielomanager/journalmanager/templatetags/pagination_tags.py
DalavanCloud/scielo-manager
0945f377376de8ef0ada83c35b4e2312062cdf45
[ "BSD-2-Clause" ]
245
2015-01-14T13:29:58.000Z
2022-01-13T00:48:44.000Z
scielomanager/journalmanager/templatetags/pagination_tags.py
DalavanCloud/scielo-manager
0945f377376de8ef0ada83c35b4e2312062cdf45
[ "BSD-2-Clause" ]
5
2016-02-19T15:47:08.000Z
2019-03-16T04:46:20.000Z
# coding: utf-8 from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext as __ from django.conf import settings from django import template register = template.Library() GLOSSARY_URL = settings.DOCUMENTATION_BASE_URL +'/glossary.html#' def easy_tag(func): """ De...
35.174107
172
0.574311
f7ecc1c36853bab607921325fcede6af7f7b44ff
1,096
py
Python
mkconfig/core/engine.py
mcfongtw/MkConfig
2015ad46352a1c7b42b510369f410e98c52df53b
[ "MIT" ]
1
2016-11-29T13:41:21.000Z
2016-11-29T13:41:21.000Z
mkconfig/core/engine.py
mcfongtw/MkConfig
2015ad46352a1c7b42b510369f410e98c52df53b
[ "MIT" ]
null
null
null
mkconfig/core/engine.py
mcfongtw/MkConfig
2015ad46352a1c7b42b510369f410e98c52df53b
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod class TemplateEngine(object): """ An abstract class of TemplateEngine """ __metaclass__ = ABCMeta def __init__(self): pass def __str__(self): return 'Abstract Engine class with file path {0}'.format(self._inputTemplatePath) class Tem...
23.319149
89
0.622263
f7ecc9be94d228cc6cca7599c78163d22bd813ad
6,345
py
Python
mmseg/apis/train.py
anushkaray/mmsegmentation
07cb3b809d59bd72cc11afd6a9ce96215e9aaf96
[ "Apache-2.0" ]
null
null
null
mmseg/apis/train.py
anushkaray/mmsegmentation
07cb3b809d59bd72cc11afd6a9ce96215e9aaf96
[ "Apache-2.0" ]
null
null
null
mmseg/apis/train.py
anushkaray/mmsegmentation
07cb3b809d59bd72cc11afd6a9ce96215e9aaf96
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import random import warnings import mmcv import numpy as np import torch import torch.distributed as dist from mmcv.parallel import MMDataParallel, MMDistributedDataParallel from mmcv.runner import HOOKS, build_optimizer, build_runner, get_dist_info from mmcv.utils impo...
36.051136
79
0.636722
f7eccb98dccaf0649167e5feca4ae2e0a3a541bc
685
py
Python
examples/backtest.py
webclinic017/harvest
70c8de717b816fedb32c4d0c88b5544d874083e2
[ "MIT" ]
83
2021-06-25T22:35:46.000Z
2022-03-30T23:34:00.000Z
examples/backtest.py
webclinic017/harvest
70c8de717b816fedb32c4d0c88b5544d874083e2
[ "MIT" ]
169
2021-06-26T03:57:02.000Z
2022-03-11T11:50:09.000Z
examples/backtest.py
webclinic017/harvest
70c8de717b816fedb32c4d0c88b5544d874083e2
[ "MIT" ]
20
2021-06-28T07:00:24.000Z
2022-03-22T21:23:36.000Z
# HARVEST_SKIP from harvest.algo import BaseAlgo from harvest.trader import BackTester class BackTest(BaseAlgo): def config(self): self.watchlist = ["SPY"] self.interval = "5MIN" self.aggregations = [] def main(self): prices = self.get_asset_price_list() sma_short = se...
23.62069
49
0.618978
f7eccedc6580e295788f95c53fa5d25556b9e059
1,338
py
Python
Source/Oyooni/Text Recognition/server.py
Oyooni5245/Oyooni
a00b845ac97eaee74d40cab563b9532fdeca97c8
[ "MIT" ]
null
null
null
Source/Oyooni/Text Recognition/server.py
Oyooni5245/Oyooni
a00b845ac97eaee74d40cab563b9532fdeca97c8
[ "MIT" ]
null
null
null
Source/Oyooni/Text Recognition/server.py
Oyooni5245/Oyooni
a00b845ac97eaee74d40cab563b9532fdeca97c8
[ "MIT" ]
null
null
null
from flask import Flask, request from flask_restful import Resource, Api from test import get_models, getTextFromImage from testDocument import getText from time import time app = Flask(__name__) api = Api(app) net, refine_net = get_models() class TextRecognizerService(Resource): def post(self): try: ...
26.76
73
0.523916
f7ed217fc09fe54a50541c60921eef489013fb82
5,663
py
Python
asposewordscloud/models/requests/unprotect_document_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
asposewordscloud/models/requests/unprotect_document_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
asposewordscloud/models/requests/unprotect_document_request.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="unprotect_document_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a c...
45.304
170
0.656366
f7ed7fdbf38dd336d144a80a580467a153b021ef
10,811
py
Python
letsencrypt/plugins/webroot_test.py
mrudtf/letsencrypt
6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3
[ "Apache-2.0" ]
null
null
null
letsencrypt/plugins/webroot_test.py
mrudtf/letsencrypt
6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3
[ "Apache-2.0" ]
null
null
null
letsencrypt/plugins/webroot_test.py
mrudtf/letsencrypt
6a7b4a8e142eb392a8fe696d9536b52c0fc4b5e3
[ "Apache-2.0" ]
null
null
null
"""Tests for letsencrypt.plugins.webroot.""" from __future__ import print_function import argparse import errno import os import shutil import stat import tempfile import unittest import mock import six from acme import challenges from acme import jose from letsencrypt import achallenges from letsencrypt import er...
39.028881
79
0.664138
f7ed94e60b7dcc2ec985fe139672f529f82f9ecb
5,520
py
Python
tempest/api_schema/compute/v2/servers.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
tempest/api_schema/compute/v2/servers.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
tempest/api_schema/compute/v2/servers.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 NEC Corporation. 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 ...
30.666667
79
0.518116
f7eda21581823ac3d4f877f7acedd61812a09610
3,133
py
Python
app/run.py
nkibrislioglu/NLP_Disaster_Response_Pipelines
d1c8db73d0927b7600991fe5bc11b02967683984
[ "FTL", "CNRI-Python" ]
null
null
null
app/run.py
nkibrislioglu/NLP_Disaster_Response_Pipelines
d1c8db73d0927b7600991fe5bc11b02967683984
[ "FTL", "CNRI-Python" ]
null
null
null
app/run.py
nkibrislioglu/NLP_Disaster_Response_Pipelines
d1c8db73d0927b7600991fe5bc11b02967683984
[ "FTL", "CNRI-Python" ]
null
null
null
import json import plotly import pandas as pd from nltk.stem import WordNetLemmatizer from nltk.tokenize import word_tokenize from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sklearn.externals import joblib from sqlalchemy import create_engine app = ...
26.108333
77
0.575487
f7edaa006d312b3a1a5d2bf3779f217abddaf11d
4,103
py
Python
custom_components/ble_monitor/ble_parser/sensirion.py
avidit/home-assistant-config
c4ea82e7ea75f93ebfb1700b39df5ff9787843b7
[ "MIT" ]
383
2019-11-25T17:13:04.000Z
2020-11-12T08:47:35.000Z
custom_components/ble_monitor/ble_parser/sensirion.py
scrambledleek/ha_hacs_ble_monitor
abafc7a34312e695667325dbe97c309f20dd1527
[ "MIT" ]
142
2019-11-25T21:29:27.000Z
2020-11-12T16:58:01.000Z
custom_components/ble_monitor/ble_parser/sensirion.py
scrambledleek/ha_hacs_ble_monitor
abafc7a34312e695667325dbe97c309f20dd1527
[ "MIT" ]
65
2019-11-26T11:53:44.000Z
2020-11-11T16:37:52.000Z
"""Parser for Sensirion BLE advertisements""" import logging from .helpers import ( to_mac, to_unformatted_mac, ) _LOGGER = logging.getLogger(__name__) SENSIRION_DEVICES = [ "MyCO2", "SHT40 Gadget", "SHT41 Gadget", "SHT45 Gadget", ] def parse_sensirion(self, data, complete_local_name, sourc...
33.909091
127
0.652937
f7edaf63a84d7c27a24c003452123a0bcf030a94
2,163
py
Python
services/api/ner_api.py
snook9/arxiv_intelligence
542de9af27aa5680fa4386ec4c394f7a73a70da2
[ "MIT" ]
1
2021-11-05T07:55:58.000Z
2021-11-05T07:55:58.000Z
services/api/ner_api.py
snook9/arxiv_intelligence
542de9af27aa5680fa4386ec4c394f7a73a70da2
[ "MIT" ]
1
2022-02-24T10:09:15.000Z
2022-03-25T09:57:37.000Z
services/api/ner_api.py
snook9/arxiv_intelligence
542de9af27aa5680fa4386ec4c394f7a73a70da2
[ "MIT" ]
null
null
null
""" Name: arXiv Intelligence Authors: Jonathan CASSAING Highlighting the relationship between authors and scientists """ import json import urllib.request import logging from urllib.error import HTTPError, URLError from socket import timeout from http.client import RemoteDisconnected from entities.message import Messa...
34.887097
88
0.646325
f7edd912b6919e7b13bd744cc21bb63014d76772
14,101
py
Python
detectron_/engine/train_loop.py
TalhaUsuf/RetinaNet_W9_form
2a66bba1de96bebd679775b841d95ac7dcfcbbbe
[ "Apache-2.0" ]
null
null
null
detectron_/engine/train_loop.py
TalhaUsuf/RetinaNet_W9_form
2a66bba1de96bebd679775b841d95ac7dcfcbbbe
[ "Apache-2.0" ]
null
null
null
detectron_/engine/train_loop.py
TalhaUsuf/RetinaNet_W9_form
2a66bba1de96bebd679775b841d95ac7dcfcbbbe
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np import time import weakref from typing import List, Mapping, Optional import torch from torch.nn.parallel import DataParallel, DistributedDataParallel import detectron.utils.comm as comm from detectron.utils.e...
33.73445
96
0.606482
f7edec33b6cc954a29327b56dc4be5a78331c5c3
1,884
py
Python
repos/system_upgrade/el7toel8/actors/checkbootavailspace/tests/unit_test.py
adka1408/leapp-repository
be5a9603b57f86c65d395ba6a02b860cacae0fb6
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/actors/checkbootavailspace/tests/unit_test.py
adka1408/leapp-repository
be5a9603b57f86c65d395ba6a02b860cacae0fb6
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/actors/checkbootavailspace/tests/unit_test.py
adka1408/leapp-repository
be5a9603b57f86c65d395ba6a02b860cacae0fb6
[ "Apache-2.0" ]
null
null
null
from __future__ import division from leapp.libraries.actor.library import (MIN_AVAIL_BYTES_FOR_BOOT, check_avail_space_on_boot, inhibit_upgrade) from leapp.libraries.common import reporting from leapp.libraries.common.testutils impor...
36.230769
109
0.753185
f7ee1e075b54459c862597a1544e52d3c2ffe5b6
1,509
py
Python
tests/test_rlinesearch.py
tao-harald/geoopt
d6fea4d44f146877c5a430e9fd6ba0fb7e821b92
[ "Apache-2.0" ]
null
null
null
tests/test_rlinesearch.py
tao-harald/geoopt
d6fea4d44f146877c5a430e9fd6ba0fb7e821b92
[ "Apache-2.0" ]
null
null
null
tests/test_rlinesearch.py
tao-harald/geoopt
d6fea4d44f146877c5a430e9fd6ba0fb7e821b92
[ "Apache-2.0" ]
null
null
null
import geoopt import torch import pytest @pytest.mark.parametrize( "line_search_params", [dict(), dict(c1=1e-3, c2=0.99), dict(amax=1, amin=1e-12), dict(stabilize=10)], ) @pytest.mark.parametrize("batch_size", [None, 1, 16]) @pytest.mark.parametrize("line_search_method", ["armijo", "wolfe"]) @pytest.mark.para...
30.18
87
0.628231
f7ee220761c2e06ae94f5239c3e13348b48d8c30
1,467
py
Python
fabfile.py
mjem/globexc
e1fd28734cf6c0dfd59535454f1729984bbb3d47
[ "Apache-2.0" ]
2
2016-08-11T03:22:52.000Z
2017-09-13T00:05:42.000Z
fabfile.py
mjem/globexc
e1fd28734cf6c0dfd59535454f1729984bbb3d47
[ "Apache-2.0" ]
null
null
null
fabfile.py
mjem/globexc
e1fd28734cf6c0dfd59535454f1729984bbb3d47
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Utilities for globexc project.""" import os from fabric.api import local def clean(): """Remove temporary .pyc and pyo files, env and dist directories.""" clean_py() local('rm env -rf') local('rm dist -rf') def sdist(): """Make a source distribution.""" local('python setup.py sdist...
20.09589
72
0.65167
f7ee2af4a9f9986967d19afdc1890d4498e588be
1,658
py
Python
invenio_explicit_acls/proxies.py
oarepo/invenio-acls
a649b2e71e729e3bcfa44110afeb73358aa6034a
[ "MIT" ]
null
null
null
invenio_explicit_acls/proxies.py
oarepo/invenio-acls
a649b2e71e729e3bcfa44110afeb73358aa6034a
[ "MIT" ]
7
2019-05-08T08:35:01.000Z
2021-06-25T15:21:34.000Z
invenio_explicit_acls/proxies.py
oarepo/invenio-explicit-acls
a649b2e71e729e3bcfa44110afeb73358aa6034a
[ "MIT" ]
2
2019-03-31T19:07:30.000Z
2019-05-06T08:11:45.000Z
# # Copyright (c) 2019 UCT Prague. # # proxies.py is part of Invenio Explicit ACLs # (see https://github.com/oarepo/invenio-explicit-acls). # # 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 Softwar...
41.45
102
0.782268
f7ee3e689f91b6d298f0dcba284acee28f61a3d5
1,835
py
Python
problem137.py
hubenjm/projecteuler
544596a6693a2e64a88e1d4606ce85480486dab5
[ "MIT" ]
null
null
null
problem137.py
hubenjm/projecteuler
544596a6693a2e64a88e1d4606ce85480486dab5
[ "MIT" ]
null
null
null
problem137.py
hubenjm/projecteuler
544596a6693a2e64a88e1d4606ce85480486dab5
[ "MIT" ]
null
null
null
import math import time import gmpy #recycles some factorization code from problem3.py def smallest_factor(n): m = int(math.sqrt(n)) i = 1 while (i <= m): i += 1 if n%i == 0: return i return n # in this case n is prime def largest_prime_factor(n): p = smallest_factor(n) while(p < n): n = n/p p = smal...
16.990741
74
0.627793
f7ee59be95ddb36500fcce897868722a4fa16634
6,588
py
Python
VMEncryption/main/patch/centosPatching.py
jamvar/azure-linux-extensions
66610daae2ef09f7920d9c4aa2e99a3035fe76a6
[ "Apache-2.0" ]
null
null
null
VMEncryption/main/patch/centosPatching.py
jamvar/azure-linux-extensions
66610daae2ef09f7920d9c4aa2e99a3035fe76a6
[ "Apache-2.0" ]
null
null
null
VMEncryption/main/patch/centosPatching.py
jamvar/azure-linux-extensions
66610daae2ef09f7920d9c4aa2e99a3035fe76a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2015 Microsoft 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...
39.686747
144
0.577869
f7ee89a33665066db46118997e75e1e1f3209dd6
16,260
py
Python
i24/scripts/sacla3_Chip_StartUp_v7.py
beamline-i24/DiamondChips
02fb58a95ad2c1712c41b641eb5f197d688c54c3
[ "Apache-2.0" ]
null
null
null
i24/scripts/sacla3_Chip_StartUp_v7.py
beamline-i24/DiamondChips
02fb58a95ad2c1712c41b641eb5f197d688c54c3
[ "Apache-2.0" ]
null
null
null
i24/scripts/sacla3_Chip_StartUp_v7.py
beamline-i24/DiamondChips
02fb58a95ad2c1712c41b641eb5f197d688c54c3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import pv, os, re, sys import time, math, string, inspect from time import sleep from ca import caput, caget import logging as lg import numpy as np lg.basicConfig(format='%(asctime)s %(levelname)s: \t%(message)s',level=lg.DEBUG, filename='essex_april18.log') ######################################...
39.086538
118
0.562731
f7ee9475f771348fdb3527ffa5ebe8e4693deb2e
9,113
py
Python
jina/logging/logger.py
HarshCasper/jina
81ab098b140b74ad1cfdfde9218cec7a40923749
[ "Apache-2.0" ]
1
2021-02-25T19:28:50.000Z
2021-02-25T19:28:50.000Z
jina/logging/logger.py
HarshCasper/jina
81ab098b140b74ad1cfdfde9218cec7a40923749
[ "Apache-2.0" ]
1
2021-02-27T05:56:45.000Z
2021-02-27T05:57:03.000Z
jina/logging/logger.py
deepampatel/jina
97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import logging import logging.handlers import os import platform import re import sys from typing import Optional from pkg_resources import resource_filename from . import formatter from ..enums import LogVerbosity ...
33.751852
119
0.569297
f7eea8550b3a9eaf1ca3adfe18e6dd0213666b3b
1,107
py
Python
src/feature_shitomasi.py
Herusyahputra/Visual-Odometry
640dda213f93336e88d15ede3e68bfe27a85feb0
[ "MIT" ]
3
2021-07-21T15:45:46.000Z
2022-02-04T20:58:07.000Z
src/feature_shitomasi.py
Herusyahputra/Visual-Odometry
640dda213f93336e88d15ede3e68bfe27a85feb0
[ "MIT" ]
null
null
null
src/feature_shitomasi.py
Herusyahputra/Visual-Odometry
640dda213f93336e88d15ede3e68bfe27a85feb0
[ "MIT" ]
null
null
null
""" Project: Visual Odometry Name : Heru-05 | M09158023 Date : 10/06/2021 """ import math from enum import Enum import numpy as np import cv2 from parameters import Parameters class ShiTomasiDetector(object): def __init__(self, num_features=Parameters.kNumFeatures, quality_level = 0.01, min_coner_distance ...
32.558824
145
0.64589
f7eeae64287fa3ffe3c35225649012cba83949fe
25,019
py
Python
mmsegmentation/mmseg/datasets/custom.py
jfzhuang/ST_Memory
f253c05b7ecb37a1cbe9f312a628ba30b4555230
[ "MIT" ]
null
null
null
mmsegmentation/mmseg/datasets/custom.py
jfzhuang/ST_Memory
f253c05b7ecb37a1cbe9f312a628ba30b4555230
[ "MIT" ]
null
null
null
mmsegmentation/mmseg/datasets/custom.py
jfzhuang/ST_Memory
f253c05b7ecb37a1cbe9f312a628ba30b4555230
[ "MIT" ]
null
null
null
import os import os.path as osp from collections import OrderedDict from functools import reduce import mmcv import numpy as np from mmcv.utils import print_log from prettytable import PrettyTable from torch.utils.data import Dataset from mmseg.core import eval_metrics from mmseg.utils import get_root_logger from .bu...
35.895265
117
0.584596
f7eebbdbb4f893fb11f90023e99eacab4a20dafc
34
py
Python
spikes/utils/__init__.py
akshaybabloo/Spikes
4ff50e2e3a5ed531e8ce5bfce24a7411f52ca0ba
[ "BSD-3-Clause" ]
16
2018-06-21T13:34:58.000Z
2022-03-28T17:09:08.000Z
spikes/utils/__init__.py
akshaybabloo/Spikes
4ff50e2e3a5ed531e8ce5bfce24a7411f52ca0ba
[ "BSD-3-Clause" ]
9
2018-10-06T15:02:33.000Z
2022-01-06T06:55:38.000Z
spikes/utils/__init__.py
akshaybabloo/Spikes
4ff50e2e3a5ed531e8ce5bfce24a7411f52ca0ba
[ "BSD-3-Clause" ]
7
2019-01-26T12:33:20.000Z
2021-11-19T14:10:29.000Z
__all__ = ['errors', 'read_data']
17
33
0.647059
f7eec12e6f13d49ea688de9b7a87511ad1eec454
10,411
py
Python
docs2/source/conf.py
Tristanovsk/grs
ba5da28f6df0438e15404324c3488c799fb81212
[ "MIT" ]
4
2021-06-14T20:43:22.000Z
2021-07-05T09:32:41.000Z
docs2/source/conf.py
Tristanovsk/grs
ba5da28f6df0438e15404324c3488c799fb81212
[ "MIT" ]
null
null
null
docs2/source/conf.py
Tristanovsk/grs
ba5da28f6df0438e15404324c3488c799fb81212
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
33.050794
100
0.6983
f7eed19b22919f87fa59392c7c974a26286ceb08
3,577
py
Python
SMN_MSN/main_utlis.py
yxuansu/HCL
b7a2871e8006d148958bb8dc65670d0491f6a446
[ "MIT" ]
14
2020-12-29T11:22:22.000Z
2022-03-05T15:43:53.000Z
SMN_MSN/main_utlis.py
yxuansu/HCL
b7a2871e8006d148958bb8dc65670d0491f6a446
[ "MIT" ]
null
null
null
SMN_MSN/main_utlis.py
yxuansu/HCL
b7a2871e8006d148958bb8dc65670d0491f6a446
[ "MIT" ]
1
2022-03-05T15:43:55.000Z
2022-03-05T15:43:55.000Z
# -*- coding:utf-8 -*- import torch import pickle import collections import time import numpy as np import os #from modules.msn import MSN # ------------------------------------------------------------------------------------- # # measurement functions def compute_Rn_k(scores,labels, n=2, k=1): total = 0 correc...
32.816514
99
0.522505
f7eee1a65d7a0fb69cdfee640dc02a0c182aafab
1,940
py
Python
src/G_prepare_synthetic_annotations_for_ner/split_synthesised_data_for_train_and_val.py
feiphoon/ner-pipeline
1c343eea458e9c546bb8b53adcd22118d171aa63
[ "MIT" ]
null
null
null
src/G_prepare_synthetic_annotations_for_ner/split_synthesised_data_for_train_and_val.py
feiphoon/ner-pipeline
1c343eea458e9c546bb8b53adcd22118d171aa63
[ "MIT" ]
null
null
null
src/G_prepare_synthetic_annotations_for_ner/split_synthesised_data_for_train_and_val.py
feiphoon/ner-pipeline
1c343eea458e9c546bb8b53adcd22118d171aa63
[ "MIT" ]
null
null
null
import random import json import math from pathlib import Path from src.helpers.train_test_split import TrainTestSplit, check_valid_split def split_for_train_and_val( run_input_filepath: Path, run_output_filepath: Path, train_val_split: TrainTestSplit, seed: int = 42, ) -> None: check_valid_split...
31.290323
93
0.694845
f7ef0467c973aeb78d8d43ae91a2668f2b170669
23,389
py
Python
tests/unit/test_eventfilters.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
2
2018-02-27T18:21:21.000Z
2018-03-16T12:12:12.000Z
tests/unit/test_eventfilters.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
1
2018-06-25T07:14:41.000Z
2018-06-25T07:14:41.000Z
tests/unit/test_eventfilters.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
1
2020-06-25T10:37:21.000Z
2020-06-25T10:37:21.000Z
import logging import os import time import threading import unittest from unittest.mock import Mock, call from performance.driver.core.eventfilters import EventFilter from performance.driver.core.events import Event class FooEvent(Event): def __init__(self, a=None, b=None, *args, **kwargs): super().__init__(*a...
27.712085
81
0.668306
f7ef2259bed09cac703aeb36ca477f1dfb942cd6
845
py
Python
colossalai/utils/__init__.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
1
2021-11-02T14:00:27.000Z
2021-11-02T14:00:27.000Z
colossalai/utils/__init__.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
null
null
null
colossalai/utils/__init__.py
rahulgupta9202/ColossalAI
993088d45eaa032e39cf5959df2a506f0663bc2e
[ "Apache-2.0" ]
null
null
null
from .activation_checkpoint import checkpoint from .common import print_rank_0, sync_model_param_in_dp, is_dp_rank_0, is_tp_rank_0, is_no_pp_or_last_stage from .cuda import get_current_device, synchronize, empty_cache, set_to_cuda from .memory import report_memory_usage from .timer import MultiTimer, Timer _GLOBAL_MUL...
36.73913
108
0.775148
f7ef2a81861a3b6a5c180469e7d1f64cb4969b8d
3,518
py
Python
jai_benchmark/datasets/kitti_lidar_det.py
LaudateCorpus1/edgeai-benchmark
bc7f3c52862133f5fe8409248c21887b3f930a68
[ "BSD-3-Clause" ]
7
2021-07-31T16:41:57.000Z
2022-03-30T23:29:12.000Z
jai_benchmark/datasets/kitti_lidar_det.py
LaudateCorpus1/edgeai-benchmark
bc7f3c52862133f5fe8409248c21887b3f930a68
[ "BSD-3-Clause" ]
3
2022-02-09T17:39:02.000Z
2022-03-30T07:07:06.000Z
jai_benchmark/datasets/kitti_lidar_det.py
LaudateCorpus1/edgeai-benchmark
bc7f3c52862133f5fe8409248c21887b3f930a68
[ "BSD-3-Clause" ]
3
2021-11-15T01:44:32.000Z
2022-01-20T05:19:27.000Z
# Copyright (c) 2018-2021, Texas Instruments # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of condition...
40.906977
117
0.699829
f7ef4ce23c1ae074f37c4adfd026b9c4d06d38d8
609
py
Python
python/03_strings/13_theminiongame.py
jaimiles23/hacker_rank
0580eac82e5d0989afabb5c2e66faf09713f891b
[ "Apache-2.0" ]
null
null
null
python/03_strings/13_theminiongame.py
jaimiles23/hacker_rank
0580eac82e5d0989afabb5c2e66faf09713f891b
[ "Apache-2.0" ]
null
null
null
python/03_strings/13_theminiongame.py
jaimiles23/hacker_rank
0580eac82e5d0989afabb5c2e66faf09713f891b
[ "Apache-2.0" ]
3
2021-09-22T11:06:58.000Z
2022-01-25T09:29:24.000Z
# Solution to [The Minion Game](https://www.hackerrank.com/challenges/the-minion-game) VOWELS = 'AEIOU' def minion_game(word): p1_name, p2_name = 'Kevin', 'Stuart' p1_score, p2_score = 0, 0 for i in range(len(word)): points = len(word) - i if word[i] in VOWELS: p1_score += ...
23.423077
86
0.566502
f7ef61d5d44eb6ed3aee69fae28c433eaaf60f04
463
py
Python
backend/slicedtv/utils.py
suzanpradhan/slicedtv
0d78dae366cd50647d5c40ec921e97a7a03047b2
[ "BSD-3-Clause" ]
1
2020-11-22T11:10:31.000Z
2020-11-22T11:10:31.000Z
backend/slicedtv/utils.py
suzanpradhan/slicedtv
0d78dae366cd50647d5c40ec921e97a7a03047b2
[ "BSD-3-Clause" ]
1
2020-12-08T05:25:54.000Z
2020-12-08T05:42:40.000Z
backend/slicedtv/utils.py
suzanpradhan/slicedtv
0d78dae366cd50647d5c40ec921e97a7a03047b2
[ "BSD-3-Clause" ]
null
null
null
from rest_framework.views import exception_handler def custom_exception_handler(exc, context): # Call REST framework's default exception handler first, # to get the standard error response. response = exception_handler(exc, context) # Now add the HTTP status code to the response. if response is n...
33.071429
60
0.725702
f7ef6e8f099870074b12e3883f3407fdcb74aa26
1,079
py
Python
hfpy_code/chapter10/page372.py
leobarros/use_cabeca_python
4e0897a68fb7ef669ec05eab7cba9412baa0e85e
[ "Apache-2.0" ]
1
2016-04-01T04:31:52.000Z
2016-04-01T04:31:52.000Z
hfpython_code/hfpy_code/chapter10/page372.py
tdean1995/HFPythonSandbox
dc72257e4353c5bca7a2c401d18587c6d799f9a1
[ "Apache-2.0" ]
null
null
null
hfpython_code/hfpy_code/chapter10/page372.py
tdean1995/HFPythonSandbox
dc72257e4353c5bca7a2c401d18587c6d799f9a1
[ "Apache-2.0" ]
1
2020-06-02T17:47:22.000Z
2020-06-02T17:47:22.000Z
from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from google.appengine.ext.webapp import template from google.appengine.ext.db import djangoforms from google.appengine.api import users import hfwwgDB class SightingForm(djangoforms.M...
32.69697
98
0.697868
f7ef7d4e9c1bdd14ad06a5c27eca6e7b8f4e802f
1,333
py
Python
scripts/get_datagrid_ngevents.py
opennetworkinglab/spring-open
7e8a3af4a21674d198ffac462918e79e93f3c348
[ "Apache-2.0" ]
6
2015-01-30T20:44:32.000Z
2021-11-09T10:56:04.000Z
scripts/get_datagrid_ngevents.py
opennetworkinglab/spring-open
7e8a3af4a21674d198ffac462918e79e93f3c348
[ "Apache-2.0" ]
null
null
null
scripts/get_datagrid_ngevents.py
opennetworkinglab/spring-open
7e8a3af4a21674d198ffac462918e79e93f3c348
[ "Apache-2.0" ]
5
2017-04-27T02:27:51.000Z
2020-12-29T05:23:35.000Z
#! /usr/bin/env python # -*- Mode: python; py-indent-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- import pprint import os import sys import subprocess import json import argparse import io import time from flask import Flask, json, Response, render_template, make_response, request ## Global Var ## ControllerIP=...
20.828125
109
0.674419
f7ef8575cfd8abd9e4a89f84c907e38606a930e1
250
py
Python
rony/base_files/etl/lambda_function.py
felipe-cosse/rony
f2bed037ab73c4c74e8f3c585b1b4e0084a1244f
[ "Apache-2.0" ]
1
2021-01-06T18:23:20.000Z
2021-01-06T18:23:20.000Z
rony/base_files/etl/lambda_function.py
gquaresma89/rony
9cc48f102c0bccecc25c6bd8f1e902f14f8331c6
[ "Apache-2.0" ]
null
null
null
rony/base_files/etl/lambda_function.py
gquaresma89/rony
9cc48f102c0bccecc25c6bd8f1e902f14f8331c6
[ "Apache-2.0" ]
null
null
null
import boto3 import os def handler(event, context): bucket_name = os.environ['BUCKET'] region = os.environ['REGION'] return { 'statusCode': 200, 'body': f'Hello World with bucket {bucket_name} on region {region}!' }
20.833333
76
0.628
f7ef8b0038c9687023edad2e0c38f7f02f363f3e
2,620
py
Python
advesarial_text/gen_vocab.py
slowy07/tensorflow-model-research
48ba4ba6240452eb3e3350fe7099f2b045acc530
[ "MIT" ]
null
null
null
advesarial_text/gen_vocab.py
slowy07/tensorflow-model-research
48ba4ba6240452eb3e3350fe7099f2b045acc530
[ "MIT" ]
null
null
null
advesarial_text/gen_vocab.py
slowy07/tensorflow-model-research
48ba4ba6240452eb3e3350fe7099f2b045acc530
[ "MIT" ]
null
null
null
"""Generates vocabulary and term frequency files for datasets.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from six import iteritems from collections import defaultdict # Dependency imports import tensorflow as tf from data import data_utils from d...
26.464646
83
0.710305
f7efadb8bf36029dc70206ec89925914a4742645
11,304
py
Python
finetuning/trainer_old.py
manhhv87/densenet_bottleneck
fd08eb88514dacaff1bcec8bc52a77ea56ab72c7
[ "MIT" ]
null
null
null
finetuning/trainer_old.py
manhhv87/densenet_bottleneck
fd08eb88514dacaff1bcec8bc52a77ea56ab72c7
[ "MIT" ]
null
null
null
finetuning/trainer_old.py
manhhv87/densenet_bottleneck
fd08eb88514dacaff1bcec8bc52a77ea56ab72c7
[ "MIT" ]
null
null
null
import argparse import os from pathlib import Path import numpy as np import tensorflow as tf from sklearn.model_selection import StratifiedKFold from finetuning.utils import ecg_feature_extractor, train_test_split from transplant.evaluation import auc, f1, multi_f1, CustomCheckpoint from transplant.utils import (cr...
51.616438
121
0.581918
f7efeccea6a20ce4e9f2bf8bf836979f7db951ba
607
py
Python
python/greedy/0122_best_time_to_buy_and_sell_stock_ii.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
6
2019-07-15T13:23:57.000Z
2020-01-22T03:12:01.000Z
python/greedy/0122_best_time_to_buy_and_sell_stock_ii.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
null
null
null
python/greedy/0122_best_time_to_buy_and_sell_stock_ii.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
1
2019-07-24T02:15:31.000Z
2019-07-24T02:15:31.000Z
class Solution(object): def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ length = len(prices) if length <= 1: return 0 v = 0 prev = prices[0] for num in prices[1:]: if num > prev: ...
23.346154
47
0.449753
f7efef6cdab5330535f75dc8d3c1e7db5564eaf4
3,051
py
Python
onadata/apps/logger/models/attachment.py
amks1/kobocat
0f36c75cc55345716558e8bece2ef48567896997
[ "BSD-2-Clause" ]
87
2015-02-10T23:36:28.000Z
2022-01-31T00:51:10.000Z
onadata/apps/logger/models/attachment.py
amks1/kobocat
0f36c75cc55345716558e8bece2ef48567896997
[ "BSD-2-Clause" ]
443
2015-04-28T18:50:25.000Z
2022-03-31T03:29:43.000Z
onadata/apps/logger/models/attachment.py
amks1/kobocat
0f36c75cc55345716558e8bece2ef48567896997
[ "BSD-2-Clause" ]
122
2015-01-13T16:27:44.000Z
2022-01-24T09:35:56.000Z
# coding: utf-8 import mimetypes import os from django.conf import settings from django.db import models from django.utils.http import urlencode from onadata.libs.utils.hash import get_hash from .instance import Instance def generate_attachment_filename(instance, filename): xform = instance.xform return os....
34.670455
96
0.666667
f7f000c21d86c3713287b192ded57bcd84e1be5a
454
py
Python
anasymod/sim/sim.py
SubjeBilisim/anasymod
d93f656c21e2aa238f7a5ada50955cc7dc615df1
[ "BSD-3-Clause" ]
20
2019-05-14T10:13:44.000Z
2022-03-29T14:34:50.000Z
anasymod/sim/sim.py
SubjeBilisim/anasymod
d93f656c21e2aa238f7a5ada50955cc7dc615df1
[ "BSD-3-Clause" ]
43
2019-07-16T20:54:22.000Z
2021-08-10T07:06:48.000Z
anasymod/sim/sim.py
SubjeBilisim/anasymod
d93f656c21e2aa238f7a5ada50955cc7dc615df1
[ "BSD-3-Clause" ]
5
2019-10-21T09:53:38.000Z
2021-09-29T18:08:59.000Z
from abc import ABC, abstractmethod from anasymod.targets import CPUTarget from anasymod.config import EmuConfig class Simulator(ABC): def __init__(self, target: CPUTarget, flags=None): # set defaults if flags is None: flags = [] # save settings self.cfg = ta...
23.894737
55
0.610132
f7f0337adddfd2a6f9d4f5a83377295e35f57f33
923
py
Python
model/F1Metric.py
adfoucart/deephisto
f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9
[ "MIT" ]
1
2021-10-05T13:44:43.000Z
2021-10-05T13:44:43.000Z
model/F1Metric.py
adfoucart/deephisto
f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9
[ "MIT" ]
null
null
null
model/F1Metric.py
adfoucart/deephisto
f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9
[ "MIT" ]
1
2021-11-02T14:25:13.000Z
2021-11-02T14:25:13.000Z
import tensorflow as tf class F1Metric(tf.keras.metrics.Metric): def __init__(self, name=None, dtype=None): super(F1Metric, self).__init__(name=name, dtype=dtype) self.tp_ = tf.keras.metrics.TruePositives() self.fp_ = tf.keras.metrics.FalsePositives() self.fn_ = tf.keras.metrics.Fal...
38.458333
78
0.615385
f7f04661a309ca2f0810cf1fdf62ef08ae6df1de
14,468
py
Python
meraki_connector.py
splunk-soar-connectors/meraki
8c86a9392788acccd4ed6363887fd98e55ed29db
[ "Apache-2.0" ]
null
null
null
meraki_connector.py
splunk-soar-connectors/meraki
8c86a9392788acccd4ed6363887fd98e55ed29db
[ "Apache-2.0" ]
null
null
null
meraki_connector.py
splunk-soar-connectors/meraki
8c86a9392788acccd4ed6363887fd98e55ed29db
[ "Apache-2.0" ]
null
null
null
# """ Copyright (c) 2016 World Wide Technology, Inc. All rights reserved. Revision history: 21 April 2016 | 1.0 - initial release 28 April 2016 | 1.1 - added __init__ 29 April 2016 | 1.2 - tested connectivity successfully from UI 4 May 2016 | 1.3 - Running under UI with ou...
47.749175
153
0.628352
f7f05194dc10863b2651a1fe283d775b504a4a48
1,080
py
Python
test_api.py
sushmaakoju/regression-api
d94376e7c7d30f0ee5e0b3a7815371f9cc32c6cd
[ "MIT" ]
null
null
null
test_api.py
sushmaakoju/regression-api
d94376e7c7d30f0ee5e0b3a7815371f9cc32c6cd
[ "MIT" ]
null
null
null
test_api.py
sushmaakoju/regression-api
d94376e7c7d30f0ee5e0b3a7815371f9cc32c6cd
[ "MIT" ]
null
null
null
import unittest import os import json from app import * class RegApiTest(unittest.TestCase): def setUp(self): self.app = api.app self.client = self.app.test_client def test_start(self): result = self.client().post('/') self.assertEqual(result.status_code, 200) prin...
29.189189
77
0.638889
f7f074ea8d2d14fbea343cada823bdf375b79abf
20,925
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_01/operations/_maintenance_configurations_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
42.879098
247
0.67632
f7f099a3d5d24bd192bd6f10b1470e5c95f4875b
6,256
py
Python
google-datacatalog-qlik-connector/tests/google/datacatalog_connectors/qlik/scrape/engine_api_measures_helper_test.py
anugrah86/datacatalog-connectors-bi
58cc57e12632cbd1e237b3d6930e519333c51f4e
[ "Apache-2.0" ]
27
2020-04-27T21:55:49.000Z
2022-02-18T22:09:13.000Z
google-datacatalog-qlik-connector/tests/google/datacatalog_connectors/qlik/scrape/engine_api_measures_helper_test.py
anugrah86/datacatalog-connectors-bi
58cc57e12632cbd1e237b3d6930e519333c51f4e
[ "Apache-2.0" ]
36
2020-05-01T15:26:14.000Z
2022-03-26T00:09:19.000Z
google-datacatalog-qlik-connector/tests/google/datacatalog_connectors/qlik/scrape/engine_api_measures_helper_test.py
anugrah86/datacatalog-connectors-bi
58cc57e12632cbd1e237b3d6930e519333c51f4e
[ "Apache-2.0" ]
18
2020-04-30T22:14:09.000Z
2022-01-13T10:28:03.000Z
#!/usr/bin/python # # Copyright 2021 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 ag...
38.380368
79
0.617807
f7f0c6a224a0060eefa3b9c5212457a9f3d23f22
10,251
py
Python
experiments/state_distance/tdm/ddpg_tdm_launch.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/state_distance/tdm/ddpg_tdm_launch.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/state_distance/tdm/ddpg_tdm_launch.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
import random import numpy as np import torch.nn as nn import rlkit.misc.hyperparameter as hyp import rlkit.torch.pytorch_util as ptu from rlkit.data_management.her_replay_buffer import HerReplayBuffer from rlkit.envs.multitask.ant_env import GoalXYPosAnt, GoalXYPosAndVelAnt # from rlkit.envs.multitask.half_cheetah i...
32.235849
97
0.591162
f7f0d66248c3ce4016d4744d9b093c0c679af8a4
6,723
py
Python
formulae/parser.py
teucer/formulae
a94684a53f58be05ae468226305ef056f177af8e
[ "MIT" ]
null
null
null
formulae/parser.py
teucer/formulae
a94684a53f58be05ae468226305ef056f177af8e
[ "MIT" ]
null
null
null
formulae/parser.py
teucer/formulae
a94684a53f58be05ae468226305ef056f177af8e
[ "MIT" ]
null
null
null
# inconsistently raises this problem # pylint: disable=relative-beyond-top-level from .expr import Assign, Grouping, Binary, Unary, Call, Variable, QuotedName, Literal from .token import Token from .utils import listify class ParseError(Exception): pass class Parser: # pylint: disable=too-many-public-methods ...
32.322115
93
0.559869
f7f0dbe0ba2f79ccd8bcd4243d22bb6c8b4644d2
2,450
py
Python
tests/property_testing/test_engineering_inverses.py
ckp95/xlcalculator
8f3f04a2a0a2ecb12c3d5837a5b13519137ae427
[ "MIT" ]
null
null
null
tests/property_testing/test_engineering_inverses.py
ckp95/xlcalculator
8f3f04a2a0a2ecb12c3d5837a5b13519137ae427
[ "MIT" ]
null
null
null
tests/property_testing/test_engineering_inverses.py
ckp95/xlcalculator
8f3f04a2a0a2ecb12c3d5837a5b13519137ae427
[ "MIT" ]
null
null
null
from hypothesis import given, settings from hypothesis.strategies import integers from xlcalculator.xlfunctions.engineering import ( DEC2BIN, DEC2OCT, DEC2HEX, BIN2OCT, BIN2DEC, BIN2HEX, OCT2BIN, OCT2DEC, OCT2HEX, HEX2BIN, HEX2OCT, HEX2DEC, ) from tests.conftest import ...
30.246914
89
0.766939
f7f0e4f43da8aaac6253ebffb84ff3c58f150bc9
3,383
py
Python
levelheap-micha-4d/levels/conductor.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
2
2020-01-04T23:44:10.000Z
2020-07-12T17:10:09.000Z
levelheap-micha-4d/levels/conductor.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
null
null
null
levelheap-micha-4d/levels/conductor.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
1
2022-03-16T05:43:33.000Z
2022-03-16T05:43:33.000Z
# level design by Michael Abel # ................................................................................................................. def KikiWireWall( c , p): if world.isUnoccupiedPos(KikiPos (p.x,p.y,p.z)): world.addObjectAtPos (KikiWall() , KikiPos (p.x,p.y,p.z)) world.addObjectAtPos (KikiWire ...
41.256098
115
0.498374
f7f0e6150ba33b7e25465fb07eb06eed6f3da630
9,035
py
Python
pyqmc/dasktools.py
YiqingZhouKelly/pyqmc
ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e
[ "MIT" ]
null
null
null
pyqmc/dasktools.py
YiqingZhouKelly/pyqmc
ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e
[ "MIT" ]
null
null
null
pyqmc/dasktools.py
YiqingZhouKelly/pyqmc
ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e
[ "MIT" ]
null
null
null
import os import pyqmc import numpy as np import pandas as pd import h5py import pyqmc import pyqmc.optimize_orthogonal os.environ["MKL_NUM_THREADS"] = "1" os.environ["NUMEXPR_NUM_THREADS"] = "1" os.environ["OMP_NUM_THREADS"] = "1" def distvmc( wf, coords, accumulators=None, nsteps=100, hdf_file=N...
31.371528
149
0.598893
f7f10bf1e9b32cd0c3a32239ba644bdde1780dcd
3,048
py
Python
modules/migrate/vineyard-migrate-to-local.py
TREiop/v6d
9ad80c65c226405b0c7b4ed6b6c9b1229bbf9175
[ "Apache-2.0", "CC0-1.0" ]
417
2020-10-23T12:35:27.000Z
2021-04-15T09:37:00.000Z
modules/migrate/vineyard-migrate-to-local.py
TREiop/v6d
9ad80c65c226405b0c7b4ed6b6c9b1229bbf9175
[ "Apache-2.0", "CC0-1.0" ]
160
2020-10-27T16:27:12.000Z
2021-04-19T01:35:29.000Z
modules/migrate/vineyard-migrate-to-local.py
TREiop/v6d
9ad80c65c226405b0c7b4ed6b6c9b1229bbf9175
[ "Apache-2.0", "CC0-1.0" ]
28
2020-10-27T15:40:48.000Z
2021-04-16T08:03:16.000Z
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2021 Alibaba Group Holding 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/L...
31.102041
101
0.656496
f7f12ce127210aee7340b8bbc3ea68dbb5c0792e
6,449
py
Python
lib/sqlalchemy/orm/evaluator.py
karlicoss/sqlalchemy
402cca8f2ac42a08fba7a200c4e1e086e2081aad
[ "MIT" ]
1
2021-04-04T10:13:08.000Z
2021-04-04T10:13:08.000Z
lib/sqlalchemy/orm/evaluator.py
karlicoss/sqlalchemy
402cca8f2ac42a08fba7a200c4e1e086e2081aad
[ "MIT" ]
null
null
null
lib/sqlalchemy/orm/evaluator.py
karlicoss/sqlalchemy
402cca8f2ac42a08fba7a200c4e1e086e2081aad
[ "MIT" ]
null
null
null
# orm/evaluator.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import operator from .. import inspect from .. import util from ..sql import and_ ...
28.535398
79
0.534812
f7f13b27f3f5754a0ea630e5cecf2f0d7dc31242
716
py
Python
multidoc-stave/simple-backend/nlpviewer_backend/utils.py
adithya7/cdec-ann-tool
263137960d01babdddae48faef9cfef5efef6826
[ "Apache-2.0" ]
null
null
null
multidoc-stave/simple-backend/nlpviewer_backend/utils.py
adithya7/cdec-ann-tool
263137960d01babdddae48faef9cfef5efef6826
[ "Apache-2.0" ]
null
null
null
multidoc-stave/simple-backend/nlpviewer_backend/utils.py
adithya7/cdec-ann-tool
263137960d01babdddae48faef9cfef5efef6826
[ "Apache-2.0" ]
null
null
null
import hashlib from pathlib import PurePath # return a mapping from external id to file names def read_index_file(index_file): extid_to_name = {} with open(index_file) as f: for line in f: pairs = line.strip().split() external_id = int(pairs[0]) file_name = PurePath(...
25.571429
57
0.675978
f7f16657ae4aa499e8ac510ce0b699da0898cc91
1,096
py
Python
src/preprocess_vacancy.py
danilpolkov/jooble
0f29498bc9bdd76179695886024207079f07dacf
[ "MIT" ]
null
null
null
src/preprocess_vacancy.py
danilpolkov/jooble
0f29498bc9bdd76179695886024207079f07dacf
[ "MIT" ]
null
null
null
src/preprocess_vacancy.py
danilpolkov/jooble
0f29498bc9bdd76179695886024207079f07dacf
[ "MIT" ]
null
null
null
import pandas as pd from pathlib import Path import sys import datetime PATH = '/Users/danil/Documents/github/jooble' sys.path.append(str(PATH)) from src.jooble import prepare_csv, preprocess start = datetime.datetime.now() # open train dataset train_features = prepare_csv(path = PATH + '/data/raw/train.tsv') print...
29.621622
114
0.780109
f7f166e8e7c46f36e7939d2777399b9717bc9181
72,466
py
Python
cloud/endagaweb/models.py
vbohinc/CommunityCellularManager
ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c
[ "BSD-3-Clause" ]
null
null
null
cloud/endagaweb/models.py
vbohinc/CommunityCellularManager
ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c
[ "BSD-3-Clause" ]
3
2021-03-20T00:02:37.000Z
2022-02-11T03:46:59.000Z
cloud/endagaweb/models.py
vbohinc/CommunityCellularManager
ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c
[ "BSD-3-Clause" ]
null
null
null
"""Models for the endagaweb django app. Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same direct...
40.825915
95
0.635733
f7f1698512e2ecff7f1a908400ac8aa795a3c66f
1,434
py
Python
source/machine-connector/m2c2-slmp-connector/m2c2_post_handler.py
guikcd/machine-to-cloud-connectivity-framework
83de873d4df58224f73c6263239681fdd5246186
[ "Apache-2.0", "MIT" ]
null
null
null
source/machine-connector/m2c2-slmp-connector/m2c2_post_handler.py
guikcd/machine-to-cloud-connectivity-framework
83de873d4df58224f73c6263239681fdd5246186
[ "Apache-2.0", "MIT" ]
null
null
null
source/machine-connector/m2c2-slmp-connector/m2c2_post_handler.py
guikcd/machine-to-cloud-connectivity-framework
83de873d4df58224f73c6263239681fdd5246186
[ "Apache-2.0", "MIT" ]
null
null
null
## Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. ## SPDX-License-Identifier: Apache-2.0 import json import logging import uuid import datetime from datetime import date import greengrasssdk import m2c2_globals as var import m2c2_utils as utils logger = logging.getLogger() logger.setLevel(l...
29.265306
83
0.626918
f7f17e5180381b921d2d64dd0396f88cb6622b15
1,047
py
Python
tensorflow/examples/adding_an_op/fact_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
680
2016-12-03T14:38:28.000Z
2022-02-16T04:06:45.000Z
tensorflow/examples/adding_an_op/fact_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
188
2016-06-01T08:21:19.000Z
2022-01-30T07:14:08.000Z
tensorflow/examples/adding_an_op/fact_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
277
2016-06-01T07:51:21.000Z
2022-01-04T12:28:43.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...
31.727273
80
0.696275
f7f18440da166c4019bc0f97118b6aabd590a3b5
9,186
py
Python
src/two_heads/ImagePairOverlapFunctionAngleOrientationSequence.py
chienerh/OverlapNet
5e40476444cb0a950ff21f3343017426c6e6415e
[ "MIT" ]
null
null
null
src/two_heads/ImagePairOverlapFunctionAngleOrientationSequence.py
chienerh/OverlapNet
5e40476444cb0a950ff21f3343017426c6e6415e
[ "MIT" ]
null
null
null
src/two_heads/ImagePairOverlapFunctionAngleOrientationSequence.py
chienerh/OverlapNet
5e40476444cb0a950ff21f3343017426c6e6415e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Developed by Xieyuanli Chen and Thomas Läbe # This file is covered by the LICENSE file in the root of this project. # Brief: A generator which generates batches for keras training: Special version import os import random import numpy as np from keras.utils import Sequence class ImagePairOver...
42.331797
122
0.632049
f7f185911414bd3ce415dc6b6ecf2260822e8e5f
50
py
Python
botx/clients/methods/v3/events/__init__.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
13
2021-01-21T12:43:10.000Z
2022-03-23T11:11:59.000Z
botx/clients/methods/v3/events/__init__.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
259
2020-02-26T08:51:03.000Z
2022-03-23T11:08:36.000Z
botx/clients/methods/v3/events/__init__.py
ExpressApp/pybotx
97c8b1ce5d45a05567ed01d545cb43174a2dcbb9
[ "MIT" ]
5
2019-12-02T16:19:22.000Z
2021-11-22T20:33:34.000Z
"""Definition for methods for events resource."""
25
49
0.74
f7f1926183183ef6c5b329b000b6661c7ca0a8a1
2,218
py
Python
alipay/aop/api/response/AlipayMarketingActivityShopBatchqueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/AlipayMarketingActivityShopBatchqueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/AlipayMarketingActivityShopBatchqueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.ActivityShopInfo import ActivityShopInfo class AlipayMarketingActivityShopBatchqueryResponse(AlipayResponse): def __init__(self): super(AlipayMarketingAc...
30.383562
118
0.651939
f7f1a8e1150eadc52ac21d7a3d6f23b75a88b01e
5,788
py
Python
pyglm/utils/io.py
slinderman/theano_pyglm
c7fc11069dfe91b0eb7c96b8464fcd0f57442952
[ "MIT" ]
37
2015-04-08T15:11:51.000Z
2022-01-05T19:32:58.000Z
pyglm/utils/io.py
slinderman/theano_pyglm
c7fc11069dfe91b0eb7c96b8464fcd0f57442952
[ "MIT" ]
2
2016-03-08T02:39:58.000Z
2017-03-29T08:51:08.000Z
pyglm/utils/io.py
slinderman/theano_pyglm
c7fc11069dfe91b0eb7c96b8464fcd0f57442952
[ "MIT" ]
10
2015-02-25T21:47:50.000Z
2020-03-06T00:21:48.000Z
import cPickle import os import numpy as np def parse_cmd_line_args(): """ Parse command line parameters """ from optparse import OptionParser parser = OptionParser() parser.add_option("-m", "--model", dest="model", default='standard_glm', help="Type of model to use. See ...
38.078947
109
0.6085
f7f1b864af7bffc236b2e090da0badb91cdf37ab
393
py
Python
sandbox/apps/checkout/forms.py
django-oscar/django-oscar-docdata
8f95458d4dff7d27ec507bacfede0a19e1f0e6b2
[ "ECL-2.0", "Apache-2.0" ]
15
2017-04-25T10:31:27.000Z
2022-03-01T10:58:10.000Z
sandbox/apps/checkout/forms.py
django-oscar/django-oscar-docdata
8f95458d4dff7d27ec507bacfede0a19e1f0e6b2
[ "ECL-2.0", "Apache-2.0" ]
45
2017-04-26T13:17:51.000Z
2022-02-16T12:27:57.000Z
sandbox/apps/checkout/forms.py
django-oscar/django-oscar-docdata
8f95458d4dff7d27ec507bacfede0a19e1f0e6b2
[ "ECL-2.0", "Apache-2.0" ]
7
2017-07-18T03:43:53.000Z
2020-07-10T16:29:30.000Z
from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ class PaymentMethodForm(forms.Form): """ Extra form for the custom payment method. """ payment_method = forms.ChoiceField( label=_("Choose your payment method"), choices=se...
26.2
55
0.715013
f7f1bae7aabcae71d81a27291b43582ba773309a
314
py
Python
libsoft/book/urls.py
akhil4rajan/library_management
3c8031ba6c8237c26358097005f60cd57b8a0c3f
[ "MIT" ]
null
null
null
libsoft/book/urls.py
akhil4rajan/library_management
3c8031ba6c8237c26358097005f60cd57b8a0c3f
[ "MIT" ]
null
null
null
libsoft/book/urls.py
akhil4rajan/library_management
3c8031ba6c8237c26358097005f60cd57b8a0c3f
[ "MIT" ]
null
null
null
from django.urls import path from .views import BookListView, BookCreateAPIView, BookDetailView, TotalBookView urlpatterns = [ path('', BookListView.as_view()), path('add/', BookCreateAPIView.as_view()), path('<int:pk>/', BookDetailView.as_view()), path('total_books/', TotalBookView.as_view()) ]
31.4
81
0.716561
f7f1c2af131c8da72d32dee72bf9e94e8a6e3f70
3,067
py
Python
sling/nlp/parser/trainer/corpora.py
JDzvonik/sling
3000f6ff7ae5c2d5ddcae13ad3599e35bf375ec5
[ "Apache-2.0" ]
2,023
2017-10-13T01:39:21.000Z
2022-03-27T14:24:09.000Z
sling/nlp/parser/trainer/corpora.py
JDzvonik/sling
3000f6ff7ae5c2d5ddcae13ad3599e35bf375ec5
[ "Apache-2.0" ]
166
2017-10-26T00:36:03.000Z
2021-10-08T13:32:32.000Z
sling/nlp/parser/trainer/corpora.py
JDzvonik/sling
3000f6ff7ae5c2d5ddcae13ad3599e35bf375ec5
[ "Apache-2.0" ]
316
2017-10-12T20:34:28.000Z
2022-02-02T16:03:45.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
29.209524
78
0.71177
f7f1c2c876e98ff47106172bf1932cbf9d2d4500
5,388
py
Python
cloud_snitch/snitchers/git.py
bunchc/FleetDeploymentReporting
a93af06573f2715e14b4d18b7a394c26fc19a32d
[ "Apache-2.0" ]
1
2018-07-11T20:20:21.000Z
2018-07-11T20:20:21.000Z
cloud_snitch/snitchers/git.py
bunchc/FleetDeploymentReporting
a93af06573f2715e14b4d18b7a394c26fc19a32d
[ "Apache-2.0" ]
46
2018-08-08T19:46:15.000Z
2019-02-22T20:33:49.000Z
cloud_snitch/snitchers/git.py
dani4571/FleetDeploymentReporting
8b132a20fa3e9c4e4215feade79f689be6e4b364
[ "Apache-2.0" ]
7
2018-06-26T15:27:55.000Z
2018-12-05T19:41:25.000Z
import hashlib import logging from .base import BaseSnitcher from cloud_snitch.models import EnvironmentEntity from cloud_snitch.models import GitRepoEntity from cloud_snitch.models import GitRemoteEntity from cloud_snitch.models import GitUrlEntity from cloud_snitch.models import GitUntrackedFileEntity logger = logg...
34.76129
77
0.629176
f7f1d5502f6fa8ac816bfdf812b1e4071180d58e
1,164
py
Python
features/steps/asserts.py
cloose/ray-tracer-challenge
5e9dd56fb67c5cba47172986a963fc22a8cbcaa2
[ "MIT" ]
null
null
null
features/steps/asserts.py
cloose/ray-tracer-challenge
5e9dd56fb67c5cba47172986a963fc22a8cbcaa2
[ "MIT" ]
null
null
null
features/steps/asserts.py
cloose/ray-tracer-challenge
5e9dd56fb67c5cba47172986a963fc22a8cbcaa2
[ "MIT" ]
null
null
null
_EPSILON = 0.00001 def assert_count(collection, count): """Asserts number of items in the collection.""" assert len(collection) == count, \ f"count {len(collection)} is not equal to {count}" def assert_float(actual, expected): """Asserts that two floats are equal.""" assert equal(actual,...
29.1
83
0.615979
f7f1f4dd2b44b5899fed6eb3109a7532fb0f4c50
402
py
Python
maths/problems/compute_parity.py
hariharanragothaman/pymaster
b3d033b4d5c75c69f587c94d9d12cd4a349a6a69
[ "Apache-2.0" ]
10
2020-09-21T22:23:09.000Z
2022-01-25T16:58:44.000Z
maths/problems/compute_parity.py
hariharanragothaman/pymaster
b3d033b4d5c75c69f587c94d9d12cd4a349a6a69
[ "Apache-2.0" ]
null
null
null
maths/problems/compute_parity.py
hariharanragothaman/pymaster
b3d033b4d5c75c69f587c94d9d12cd4a349a6a69
[ "Apache-2.0" ]
null
null
null
""" The parity of a binary word is: 1 - if number of 1's is odd 0 - if number of 1's is even - How would you compute for very large binary strings? """ def find_parity_using_string(n: int) -> int: str_n = str(n) if str_n.count("1") % 2 == 0: return 0 return 1 if __name__ == "__main__": res...
19.142857
54
0.624378
f7f22b126a6c0626dfce3f1711bf16c2978f5722
2,130
py
Python
tests/algorithms/test_rna_to_protein.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
3
2017-05-02T10:28:13.000Z
2019-02-06T09:10:11.000Z
tests/algorithms/test_rna_to_protein.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2017-06-21T20:39:14.000Z
2020-02-25T10:28:57.000Z
tests/algorithms/test_rna_to_protein.py
JASTYN/pythonmaster
46638ab09d28b65ce5431cd0759fe6df272fb85d
[ "Apache-2.0", "MIT" ]
2
2016-07-29T04:35:22.000Z
2017-01-18T17:05:36.000Z
import unittest from algorithms.rna_to_protein import protein class RnaTest(unittest.TestCase): def test1(self): self.assertEqual(protein('AUGUGA'), 'M') def test2(self): self.assertEqual(protein('AUG'), 'M') def test3(self): self.assertEqual(protein('AUGGUUAGUUGA'), 'MVS') ...
54.615385
703
0.814554
f7f23dca501f902672d8fe401d1a90139b2b6279
56,982
py
Python
cinder/volume/drivers/hitachi/vsp_horcm.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/hitachi/vsp_horcm.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/hitachi/vsp_horcm.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2016, Hitachi, Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
39.653445
79
0.585957
f7f256e878da0fbe90addce1fbba95b296292863
1,987
py
Python
alipay/aop/api/domain/AlipayOpenMiniAmpeMiniappUnbindModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenMiniAmpeMiniappUnbindModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenMiniAmpeMiniappUnbindModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenMiniAmpeMiniappUnbindModel(object): def __init__(self): self._mini_app_id = None self._mobile_app_id = None self._scene_code = None @property def mini_a...
27.985915
77
0.608455
f7f257f3115bad5ac482d7053894afd5d5533bdb
4,903
py
Python
examples/tutorial/allpairs_example.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
examples/tutorial/allpairs_example.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
examples/tutorial/allpairs_example.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
#!/usr/bin/env python __author__ = "Ioannis Paraskevakos <i.parask@rutgers.edu>" __copyright__ = "Copyright 2014, http://radical.rutgers.edu" __license__ = "MIT" __example_name__ = "All Pairs Example (generic)" import math import sys import os import json from radical.ensemblemd import Kernel from radi...
38.007752
118
0.611666
f7f27746e77464615b26f4232488e3f4caf2d687
3,782
py
Python
strikethrough_identification/src/utils.py
RaphaelaHeil/strikethrough-removal-cyclegans
91555b22cac6b6a379597aa94c23bdf02c9970a7
[ "MIT" ]
3
2021-08-30T12:37:14.000Z
2022-02-09T16:07:14.000Z
strikethrough_identification/src/utils.py
RaphaelaHeil/strikethrough-removal-cyclegans
91555b22cac6b6a379597aa94c23bdf02c9970a7
[ "MIT" ]
null
null
null
strikethrough_identification/src/utils.py
RaphaelaHeil/strikethrough-removal-cyclegans
91555b22cac6b6a379597aa94c23bdf02c9970a7
[ "MIT" ]
1
2021-08-30T12:17:31.000Z
2021-08-30T12:17:31.000Z
""" Utility module. """ from math import ceil import torch from PIL import Image, ImageOps from torchvision import models from torchvision.transforms import Resize, Grayscale, ToTensor, Compose from .configuration import Configuration, ModelName class PadToSize: """ Custom transformation that maintains the ...
37.445545
119
0.636171
f7f2968b5a88420ee3aaba1f5d890e69afabd4c7
1,121
py
Python
masakari_monitors_icmp_plugin/tests/unit/fakes.py
ooneko/masakari-monitors-icmp-plugin
b57309a2590fa5436b197275a77da7f34f691a2e
[ "Apache-2.0" ]
null
null
null
masakari_monitors_icmp_plugin/tests/unit/fakes.py
ooneko/masakari-monitors-icmp-plugin
b57309a2590fa5436b197275a77da7f34f691a2e
[ "Apache-2.0" ]
null
null
null
masakari_monitors_icmp_plugin/tests/unit/fakes.py
ooneko/masakari-monitors-icmp-plugin
b57309a2590fa5436b197275a77da7f34f691a2e
[ "Apache-2.0" ]
null
null
null
# Copyright(c) 2019 UnitedStack 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 ...
32.028571
74
0.696699
f7f2981a85c9a21f8e633b11dff49961433bc4af
6,450
py
Python
tests/regressiontests/localflavor/mk/tests.py
hafeez3000/django
08e1175ac8d683b692ec3c67dc31df149f07dc8f
[ "BSD-3-Clause" ]
4
2015-08-27T22:03:47.000Z
2017-09-04T08:13:44.000Z
tests/regressiontests/localflavor/mk/tests.py
hafeez3000/django
08e1175ac8d683b692ec3c67dc31df149f07dc8f
[ "BSD-3-Clause" ]
null
null
null
tests/regressiontests/localflavor/mk/tests.py
hafeez3000/django
08e1175ac8d683b692ec3c67dc31df149f07dc8f
[ "BSD-3-Clause" ]
1
2020-01-04T14:51:18.000Z
2020-01-04T14:51:18.000Z
from django.test import TestCase from forms import MKPersonForm class MKLocalflavorTests(TestCase): def setUp(self): self.form = MKPersonForm({ 'first_name':'Someone', 'last_name':'Something', 'umcn': '2402983450006', 'municipality':'OD', 'municip...
36.440678
86
0.648837