hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3412fd9852f09c50974a393505e8eb204174c6ec | 5,357 | py | Python | glide_finetune/loader.py | vanga/glide-finetune | f14b5b485bf663034011b8be72e42956a10d904f | [
"MIT"
] | 43 | 2022-01-19T16:47:06.000Z | 2022-03-28T11:11:59.000Z | glide_finetune/loader.py | vanga/glide-finetune | f14b5b485bf663034011b8be72e42956a10d904f | [
"MIT"
] | null | null | null | glide_finetune/loader.py | vanga/glide-finetune | f14b5b485bf663034011b8be72e42956a10d904f | [
"MIT"
] | 9 | 2022-01-23T18:15:46.000Z | 2022-03-21T12:40:29.000Z | import time
from pathlib import Path
from random import randint, choice, random
import PIL
import torch as th
from torch.utils.data import Dataset
from torchvision import transforms as T
from glide_finetune.glide_util import get_tokens_and_mask, get_uncond_tokens_mask
from glide_finetune.train_util import pil_image_t... | 37.461538 | 176 | 0.659324 |
bed8f2e2202243f9ffa11de04fc80e22324e5bd8 | 2,326 | py | Python | utils/space.py | smurf-1119/GameTheoryProject | 5bc230f3a421088d176264584e82e52f2826a8d9 | [
"MIT"
] | 14 | 2021-11-06T11:29:43.000Z | 2022-02-09T04:45:32.000Z | utils/space.py | smurf-1119/GameTheoryProject | 5bc230f3a421088d176264584e82e52f2826a8d9 | [
"MIT"
] | 5 | 2021-11-06T12:02:37.000Z | 2021-12-18T04:12:28.000Z | utils/space.py | smurf-1119/GameTheoryProject | 5bc230f3a421088d176264584e82e52f2826a8d9 | [
"MIT"
] | 7 | 2021-11-12T03:19:54.000Z | 2022-02-21T05:56:32.000Z | from gym.utils import seeding
class Space(object):
"""Defines the observation and action spaces, so you can write generic
code that applies to any Env. For example, you can choose a random
action.
WARNING - Custom observation & action spaces can inherit from the `Space`
class. However, most use-ca... | 38.131148 | 81 | 0.662511 |
2c88ab8a6833125976887abbe9ba7d1d2e1462cb | 9,601 | py | Python | ros_ws/src/crazyswarm/scripts/chooser.py | bma5287/crazyswarm-1 | d609e5c4227e3e62fcf4bd889a63d2aed95c03b7 | [
"MIT"
] | 4 | 2021-02-11T21:39:39.000Z | 2022-02-15T08:47:29.000Z | ros_ws/src/crazyswarm/scripts/chooser.py | bma5287/crazyswarm-1 | d609e5c4227e3e62fcf4bd889a63d2aed95c03b7 | [
"MIT"
] | 1 | 2020-09-22T22:08:30.000Z | 2020-09-26T23:20:19.000Z | ros_ws/src/crazyswarm/scripts/chooser.py | bma5287/crazyswarm-1 | d609e5c4227e3e62fcf4bd889a63d2aed95c03b7 | [
"MIT"
] | 3 | 2020-02-06T09:02:29.000Z | 2021-06-16T11:33:38.000Z | import argparse
import Tkinter
import yaml
import os
import subprocess
import re
import time
import threading
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
"--configpath",
type=str,
default=os.path.join(os.path.dirname(os.path.realpath(__file__)), "../launch/"),
help="Pat... | 34.289286 | 124 | 0.678159 |
a3c98e9205f49cb6cefca5a183f6ed5694fbcd49 | 7,710 | py | Python | open/Inspur/code/resnet50/tensorrt/network_search.py | fenz-org/mlperf_inference_results_v0.7 | 2e38bec7f8df806283802a69db3d0038a37d026e | [
"Apache-2.0"
] | 19 | 2020-10-26T17:37:22.000Z | 2022-01-20T09:32:38.000Z | open/Inspur/code/resnet50/tensorrt/network_search.py | fenz-org/mlperf_inference_results_v0.7 | 2e38bec7f8df806283802a69db3d0038a37d026e | [
"Apache-2.0"
] | 11 | 2020-10-21T19:18:48.000Z | 2021-03-11T18:50:36.000Z | open/Inspur/code/resnet50/tensorrt/network_search.py | fenz-org/mlperf_inference_results_v0.7 | 2e38bec7f8df806283802a69db3d0038a37d026e | [
"Apache-2.0"
] | 19 | 2020-10-21T19:15:17.000Z | 2022-01-04T08:32:08.000Z | # Copyright (c) 2020, NVIDIA 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 by appli... | 38.358209 | 113 | 0.550584 |
0674106680f8f6e4d1cf2e266b8a6c1cd6b25eab | 31,629 | py | Python | examples/tensorflow/question-answering/run_qa.py | danilproger/transformers | 2ba69e3ae561aeb83ca15721dc0fcdc0eec26089 | [
"Apache-2.0"
] | null | null | null | examples/tensorflow/question-answering/run_qa.py | danilproger/transformers | 2ba69e3ae561aeb83ca15721dc0fcdc0eec26089 | [
"Apache-2.0"
] | null | null | null | examples/tensorflow/question-answering/run_qa.py | danilproger/transformers | 2ba69e3ae561aeb83ca15721dc0fcdc0eec26089 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 45.509353 | 124 | 0.665939 |
f66ac863555efe525059542cb517d6daf9910e6a | 148,579 | py | Python | tensorflow/python/ops/math_ops.py | deepaksbmj/tensorflow | a99522070bb53099273ad261265eb50a3d2aaf88 | [
"Apache-2.0"
] | 2 | 2019-12-07T16:18:05.000Z | 2020-02-16T10:39:37.000Z | tensorflow/python/ops/math_ops.py | deepaksbmj/tensorflow | a99522070bb53099273ad261265eb50a3d2aaf88 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/math_ops.py | deepaksbmj/tensorflow | a99522070bb53099273ad261265eb50a3d2aaf88 | [
"Apache-2.0"
] | null | null | null | # 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... | 35.802169 | 121 | 0.66714 |
212282c7793d7578e698d464c366fbcef6ebcbe9 | 3,689 | py | Python | tests/testing_header_functions.py | imcs-compsim/meshpy | b4d8de089567a6ad3be20d54687cc9f141e13847 | [
"MIT"
] | 3 | 2021-09-29T08:26:08.000Z | 2022-02-16T07:44:10.000Z | tests/testing_header_functions.py | imcs-compsim/meshpy | b4d8de089567a6ad3be20d54687cc9f141e13847 | [
"MIT"
] | null | null | null | tests/testing_header_functions.py | imcs-compsim/meshpy | b4d8de089567a6ad3be20d54687cc9f141e13847 | [
"MIT"
] | 1 | 2021-09-29T08:26:07.000Z | 2021-09-29T08:26:07.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# MeshPy: A beam finite element input generator
#
# MIT License
#
# Copyright (c) 2021 Ivo Steinbrecher
# Institute for Mathematics and Computer-Based Simulation
# Universitaet d... | 35.471154 | 79 | 0.656818 |
7709e0011e05e48274ff7b7f1f78072bb1df6af3 | 975 | py | Python | keystone/common/ldap/__init__.py | dtroyer/keystone | ba21db422d4f58c185e1b4414e118f723c33b959 | [
"Apache-2.0"
] | null | null | null | keystone/common/ldap/__init__.py | dtroyer/keystone | ba21db422d4f58c185e1b4414e118f723c33b959 | [
"Apache-2.0"
] | 1 | 2019-08-18T09:25:49.000Z | 2019-08-18T09:25:49.000Z | keystone/common/ldap/__init__.py | dtroyer/keystone | ba21db422d4f58c185e1b4414e118f723c33b959 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 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
#
# Unless required by applicable law or agreed to in... | 36.111111 | 75 | 0.769231 |
9a9c28c72fdcbd4b780f7015d36485bddd31289d | 3,018 | py | Python | tests/advanced.py | seece/cbpp | b6771c7933fa07444e660eafda6f06cf60edce01 | [
"MIT"
] | null | null | null | tests/advanced.py | seece/cbpp | b6771c7933fa07444e660eafda6f06cf60edce01 | [
"MIT"
] | null | null | null | tests/advanced.py | seece/cbpp | b6771c7933fa07444e660eafda6f06cf60edce01 | [
"MIT"
] | null | null | null |
import sys
import inspect
from tests.testcase import *
from processor import *
class basicIfdef(Test):
def setup(self):
self.name = "test normal #ifdef feature"
self.sourcefile = "tests/cb/ifdef.cb"
class negationIfdef(Test):
def setup(self):
self.name = "test #ifndef feature"
self.sourcefile = "tests/cb/i... | 23.76378 | 76 | 0.736249 |
c6823c773df383357698acb6393b3efcd56a9d05 | 14,467 | py | Python | old/run_SS_helpers_edRVFL.py | Yaoc0009/BRVFL_MR | 3865d780953541231825ba1fcd9c2043f80e6d97 | [
"MIT"
] | 1 | 2022-01-10T08:26:29.000Z | 2022-01-10T08:26:29.000Z | old/run_SS_helpers_edRVFL.py | Yaoc0009/BRVFL_MR | 3865d780953541231825ba1fcd9c2043f80e6d97 | [
"MIT"
] | null | null | null | old/run_SS_helpers_edRVFL.py | Yaoc0009/BRVFL_MR | 3865d780953541231825ba1fcd9c2043f80e6d97 | [
"MIT"
] | null | null | null | from sklearn.model_selection import train_test_split, ShuffleSplit
from sklearn.utils import shuffle
import numpy as np
from models_SS_edRVFL import *
from time import time
from Laplacian import laplacian
# set random seed
np.random.seed(42)
# hyperparameters
lams = [10**i for i in range(-6, 7)] # regularization para... | 41.334286 | 150 | 0.63593 |
d00652d090160ce19ca119c158c853bf17559dfc | 61,721 | py | Python | airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py | sdairs/airbyte | 05472b807a03e2acc7ef733624ff5fa6c6e06b89 | [
"MIT"
] | null | null | null | airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py | sdairs/airbyte | 05472b807a03e2acc7ef733624ff5fa6c6e06b89 | [
"MIT"
] | null | null | null | airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py | sdairs/airbyte | 05472b807a03e2acc7ef733624ff5fa6c6e06b89 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
import os
import re
from enum import Enum
from typing import Any, Dict, List, Optional, Tuple, Union
from airbyte_cdk.models import DestinationSyncMode, SyncMode
from jinja2 import Template
from normalization.destination_type import DestinationType
from no... | 46.094847 | 136 | 0.631147 |
4af2d70349febaafde79ac96733490900f403dd1 | 11,874 | py | Python | piecash/core/commodity.py | kapinga/piecash | ec30cf469198cccf35f7ba968f889d360cfe1824 | [
"MIT"
] | 223 | 2015-01-12T22:02:53.000Z | 2022-03-03T22:05:42.000Z | piecash/core/commodity.py | kapinga/piecash | ec30cf469198cccf35f7ba968f889d360cfe1824 | [
"MIT"
] | 158 | 2015-03-16T19:57:29.000Z | 2022-01-31T23:22:57.000Z | piecash/core/commodity.py | kapinga/piecash | ec30cf469198cccf35f7ba968f889d360cfe1824 | [
"MIT"
] | 84 | 2015-02-06T14:17:17.000Z | 2022-03-14T02:13:50.000Z | from __future__ import division
from __future__ import unicode_literals
import pytz
_type = type
import datetime
from decimal import Decimal
from sqlalchemy import Column, VARCHAR, INTEGER, ForeignKey, BIGINT, Index
from sqlalchemy.orm import relation
from sqlalchemy.orm.exc import MultipleResultsFound
from ._comm... | 34.417391 | 135 | 0.619757 |
31cd6d8589e7877634dee9fbeed7392634edd416 | 3,899 | py | Python | examples/text_to_knowledge/nptag/data.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | examples/text_to_knowledge/nptag/data.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | examples/text_to_knowledge/nptag/data.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.783019 | 128 | 0.621185 |
a8ee303e4cb1037c14b953afe978fad5d3ec88ab | 1,639 | py | Python | python-daemon/marvin_python_daemon/engine_base/engine_base_prediction.py | cardosolucas/incubator-marvin-trytravis | 1bd0b4d9fba0ab57cd351a5651a39b1dd9b35c75 | [
"Apache-2.0"
] | 101 | 2018-10-12T20:33:43.000Z | 2022-03-04T08:48:08.000Z | python-daemon/marvin_python_daemon/engine_base/engine_base_prediction.py | cardosolucas/incubator-marvin-trytravis | 1bd0b4d9fba0ab57cd351a5651a39b1dd9b35c75 | [
"Apache-2.0"
] | 54 | 2018-11-05T23:39:59.000Z | 2022-01-18T01:16:12.000Z | python-daemon/marvin_python_daemon/engine_base/engine_base_prediction.py | cardosolucas/incubator-marvin-trytravis | 1bd0b4d9fba0ab57cd351a5651a39b1dd9b35c75 | [
"Apache-2.0"
] | 69 | 2018-10-17T06:02:25.000Z | 2022-03-04T08:48:09.000Z | #!/usr/bin/env python
# coding=utf-8
# Copyright [2019] [Apache Software 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
#
# Unl... | 29.8 | 74 | 0.733984 |
1e10d871e867bf8d725106b829f73988a0d17704 | 2,903 | py | Python | Werewolf/WP/utils.py | etchCHENG/Werewolf | deb5cca3f8395536ad0e00180b249c5d387f50d8 | [
"MIT"
] | null | null | null | Werewolf/WP/utils.py | etchCHENG/Werewolf | deb5cca3f8395536ad0e00180b249c5d387f50d8 | [
"MIT"
] | null | null | null | Werewolf/WP/utils.py | etchCHENG/Werewolf | deb5cca3f8395536ad0e00180b249c5d387f50d8 | [
"MIT"
] | null | null | null | # 判断Python版本
try:
xrange(10)
except NameError:
py2 = False
else:
py2 = True
_packetType = {
# 对于所有的packetType,内容都应包括收发双方的IP+端口号
# 对于Resp类型的packetType,还需要包括对对应请求的ACK
"EncodedData" : 0,
"Establish" : 1, # 客户端建立与服务器的连接时发送
"EstablishResp" : -1, ... | 34.975904 | 125 | 0.430589 |
8e5ca52abda48a1d6b9022286f160e58ccf1c9eb | 5,065 | py | Python | dictconfig/dictconfig.py | abatten/dictconfig | 06b81c5f88c87db5f5452481d2d7e47a9bf1af2a | [
"MIT"
] | null | null | null | dictconfig/dictconfig.py | abatten/dictconfig | 06b81c5f88c87db5f5452481d2d7e47a9bf1af2a | [
"MIT"
] | null | null | null | dictconfig/dictconfig.py | abatten/dictconfig | 06b81c5f88c87db5f5452481d2d7e47a9bf1af2a | [
"MIT"
] | null | null | null | import os
import json
import configparser as cp
def isfloat(string):
"""
Checks if a string can be converted into a float.
Parameters
----------
value : str
Returns
-------
bool:
True/False if the string can/can not be converted into a float.
"""
try:
float(s... | 22.312775 | 90 | 0.588351 |
cec506fb6ccfaaf6eeb906bd0d3622c01cf59551 | 301 | py | Python | backpack/extensions/firstorder/gradient/convtranspose2d.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 395 | 2019-10-04T09:37:52.000Z | 2022-03-29T18:00:56.000Z | backpack/extensions/firstorder/gradient/convtranspose2d.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 78 | 2019-10-11T18:56:43.000Z | 2022-03-23T01:49:54.000Z | backpack/extensions/firstorder/gradient/convtranspose2d.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 50 | 2019-10-03T16:31:10.000Z | 2022-03-15T19:36:14.000Z | from backpack.core.derivatives.conv_transpose2d import ConvTranspose2DDerivatives
from .base import GradBaseModule
class GradConvTranspose2d(GradBaseModule):
def __init__(self):
super().__init__(
derivatives=ConvTranspose2DDerivatives(), params=["bias", "weight"]
)
| 27.363636 | 81 | 0.737542 |
4086ccb2796cbc5049591732ea2c11c3e9835d6b | 9,858 | py | Python | qutip/graph.py | kiuthed/qutip | b6fb8e5bbd9ffeae117b54e56313e8617038deab | [
"BSD-3-Clause"
] | null | null | null | qutip/graph.py | kiuthed/qutip | b6fb8e5bbd9ffeae117b54e56313e8617038deab | [
"BSD-3-Clause"
] | null | null | null | qutip/graph.py | kiuthed/qutip | b6fb8e5bbd9ffeae117b54e56313e8617038deab | [
"BSD-3-Clause"
] | null | null | null | # This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
... | 33.645051 | 79 | 0.673159 |
026d1312775ed55e057e65332ad58ac9c6d9f979 | 1,083 | py | Python | onlinecourse/urls.py | ncontrerass/final_project_db | 5bd9ca1e51fec7695cbdbd64d7ec6fd9caeb4e91 | [
"Apache-2.0"
] | null | null | null | onlinecourse/urls.py | ncontrerass/final_project_db | 5bd9ca1e51fec7695cbdbd64d7ec6fd9caeb4e91 | [
"Apache-2.0"
] | null | null | null | onlinecourse/urls.py | ncontrerass/final_project_db | 5bd9ca1e51fec7695cbdbd64d7ec6fd9caeb4e91 | [
"Apache-2.0"
] | 1 | 2021-11-22T15:39:22.000Z | 2021-11-22T15:39:22.000Z | from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import views
app_name = 'onlinecourse'
urlpatterns = [
# route is a string contains a URL pattern
# view refers to the view function
# name the URL
path(route='', view=views.CourseListView.as... | 43.32 | 123 | 0.707295 |
33868ae09ef8cf3ab46b2ef90286eae72c63a40c | 1,913 | py | Python | setup.py | asteny/aiohttp-s3-client | 348f6e1b7a23fdde87d3609bb2f0eff6fde82bc2 | [
"Apache-2.0"
] | null | null | null | setup.py | asteny/aiohttp-s3-client | 348f6e1b7a23fdde87d3609bb2f0eff6fde82bc2 | [
"Apache-2.0"
] | null | null | null | setup.py | asteny/aiohttp-s3-client | 348f6e1b7a23fdde87d3609bb2f0eff6fde82bc2 | [
"Apache-2.0"
] | null | null | null | import os
from importlib.machinery import SourceFileLoader
from setuptools import find_packages, setup
module = SourceFileLoader(
"version", os.path.join("aiohttp_s3_client", "version.py")
).load_module()
setup(
name="aiohttp-s3-client",
version=module.__version__,
author=module.__author__,
auth... | 31.883333 | 70 | 0.595923 |
53c1d35c47ca09eed813f1d59f551f897c6536f6 | 799 | py | Python | Collection_Resources/Email_Integration.py | data4d/Data_Collect | 1e71c5f0dff1700b518f171abfcd61b327253601 | [
"MIT"
] | null | null | null | Collection_Resources/Email_Integration.py | data4d/Data_Collect | 1e71c5f0dff1700b518f171abfcd61b327253601 | [
"MIT"
] | null | null | null | Collection_Resources/Email_Integration.py | data4d/Data_Collect | 1e71c5f0dff1700b518f171abfcd61b327253601 | [
"MIT"
] | null | null | null | # Email Integration for Notifications
import sys
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
## Import Passwords - Importing Passwords from a file stored elsewhere on my computer
# sys.path.append('C:/Users/GTayl/Desktop/Finance Modeling')
# from passwords impo... | 27.551724 | 85 | 0.709637 |
2c93a8fb3673d01678607094c416c13791cbd88a | 2,648 | py | Python | datasets/residential.py | slothfulxtx/TransLoc3D | 0ac324b1dcec456c76d7db2f87d13c076f2d55e4 | [
"MIT"
] | 5 | 2021-09-30T08:12:26.000Z | 2022-01-19T16:20:10.000Z | datasets/residential.py | slothfulxtx/TransLoc3D | 0ac324b1dcec456c76d7db2f87d13c076f2d55e4 | [
"MIT"
] | null | null | null | datasets/residential.py | slothfulxtx/TransLoc3D | 0ac324b1dcec456c76d7db2f87d13c076f2d55e4 | [
"MIT"
] | null | null | null | import pickle
from tqdm import tqdm
from bitarray import bitarray
import os
from .utils.transformers import Compose
from .utils.dataset import TrainDataset, EvalDataset
class ResidentialDataset(object):
def __init__(self, cfg, log, debug=False):
self.cfg = cfg
self.log = log
self.debug =... | 41.375 | 136 | 0.603097 |
53a713061fc50ff50a40e1818d818a7c385613f9 | 144 | py | Python | py2app/recipes/numpy.py | cclauss/py2app | 954d77199ea4a7176a8520f730b663ebe8f9e6f3 | [
"MIT"
] | 12 | 2020-05-22T17:36:36.000Z | 2020-12-28T04:12:46.000Z | .eggs/py2app-0.21-py3.7.egg/py2app/recipes/numpy.py | mdanisurrahmanrony/Covid-Doctor | 1e0e854d01325c1a18dd52f33064aed4c21b8161 | [
"Apache-2.0"
] | 32 | 2020-06-08T14:26:57.000Z | 2022-03-21T23:13:30.000Z | .eggs/py2app-0.21-py3.7.egg/py2app/recipes/numpy.py | mdanisurrahmanrony/Covid-Doctor | 1e0e854d01325c1a18dd52f33064aed4c21b8161 | [
"Apache-2.0"
] | 10 | 2020-05-22T17:41:21.000Z | 2021-01-06T06:06:11.000Z | def check(cmd, mf):
m = mf.findNode("numpy")
if m is None or m.filename is None:
return None
return {"packages": ["numpy"]}
| 24 | 39 | 0.583333 |
7147b1c956e76617bbe7bc3c91bb87c83df4d019 | 1,832 | py | Python | src/data_utils.py | tuomastiainen/mpr-tools | a7c6dd2a095f57f893340c3949fd05af30b0baae | [
"MIT"
] | 1 | 2020-05-23T11:49:16.000Z | 2020-05-23T11:49:16.000Z | src/data_utils.py | tuomastiainen/mpr-tools | a7c6dd2a095f57f893340c3949fd05af30b0baae | [
"MIT"
] | null | null | null | src/data_utils.py | tuomastiainen/mpr-tools | a7c6dd2a095f57f893340c3949fd05af30b0baae | [
"MIT"
] | 1 | 2020-07-19T08:35:03.000Z | 2020-07-19T08:35:03.000Z | #!/usr/bin/env python
import numpy as np
import lvm_read
import time
SAMPLES_IN_ROUND = 1024
def timing(f):
def wrap(*args, **kwargs):
time1 = time.time()
ret = f(*args, **kwargs)
time2 = time.time()
print('{:s} function took {:.3f} ms'.format(f.__name__, (time2 - time1) * 1000.... | 24.756757 | 92 | 0.609716 |
5ff027fcfa1dce7048a33d75e00af32be1b9f975 | 7,990 | py | Python | setup.py | fresto32/pact-python | 43fedd1e462d881767d025779884f20a5601d7bf | [
"MIT"
] | null | null | null | setup.py | fresto32/pact-python | 43fedd1e462d881767d025779884f20a5601d7bf | [
"MIT"
] | null | null | null | setup.py | fresto32/pact-python | 43fedd1e462d881767d025779884f20a5601d7bf | [
"MIT"
] | null | null | null | """pact-python PyPI Package."""
import os
import platform
import shutil
import sys
import tarfile
from zipfile import ZipFile
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
from distutils.command.sdist import sdist as sdist_orig
IS_64 = sy... | 33.855932 | 105 | 0.653191 |
2df3873860669d1e11d5e270745ef679c29eb9ba | 1,837 | py | Python | Virtual Assistant/API/googleSearch.py | Codingmace/JARVIS | 826d8eeaac9472511ffe5cae6f6924aa041cc723 | [
"MIT"
] | 1 | 2021-02-06T13:08:37.000Z | 2021-02-06T13:08:37.000Z | Virtual Assistant/API/googleSearch.py | Codingmace/JARVIS | 826d8eeaac9472511ffe5cae6f6924aa041cc723 | [
"MIT"
] | null | null | null | Virtual Assistant/API/googleSearch.py | Codingmace/JARVIS | 826d8eeaac9472511ffe5cae6f6924aa041cc723 | [
"MIT"
] | null | null | null | import requests
from variables import rapidApiKey
def search(term, number):
url = "https://google-search3.p.rapidapi.com/api/v1/search/q=" + term + "&num="+ str(number)
headers = {
'x-rapidapi-key': rapidApiKey,
'x-rapidapi-host': "google-search3.p.rapidapi.com"
}
response = reques... | 28.261538 | 118 | 0.619488 |
a02ba5e759c30a6c3c23e1673d81d4a2989d465c | 262 | py | Python | generators/app/templates/python_boilerplate/python_boilerplate.py | toptive/generator-toptive-python | 3ce3e7d836c4d4836127b3d4bd3819379a2720ee | [
"MIT"
] | 1 | 2019-03-09T12:23:47.000Z | 2019-03-09T12:23:47.000Z | generators/app/templates/python_boilerplate/python_boilerplate.py | toptive/generator-toptive-python | 3ce3e7d836c4d4836127b3d4bd3819379a2720ee | [
"MIT"
] | 81 | 2018-12-11T16:05:21.000Z | 2021-05-07T22:59:28.000Z | generators/app/templates/python_boilerplate/python_boilerplate.py | toptive/generator-toptive-python | 3ce3e7d836c4d4836127b3d4bd3819379a2720ee | [
"MIT"
] | 2 | 2019-01-29T21:31:17.000Z | 2019-03-08T18:22:15.000Z | # -*- coding: utf-8 -*-
"""
Module Docstring
"""
def main(args=None):
""" Main entry point of <%= projectName %> """
print('Hello World')
return 0
if __name__ == "__main__":
""" This is executed when run from the command line """
main()
| 15.411765 | 59 | 0.572519 |
678606b27ff62f73ffe07e72f25fe4eae24a5712 | 8,098 | py | Python | network.py | Orri17/2-Stream-Code | a61db918cf629b4f9984dcf34ed9f29dfbb16252 | [
"MIT"
] | null | null | null | network.py | Orri17/2-Stream-Code | a61db918cf629b4f9984dcf34ed9f29dfbb16252 | [
"MIT"
] | null | null | null | network.py | Orri17/2-Stream-Code | a61db918cf629b4f9984dcf34ed9f29dfbb16252 | [
"MIT"
] | null | null | null | import torch.nn as nn
import math
import numpy as np
import torch.utils.model_zoo as model_zoo
import torch
from torch.autograd import Variable
import torch.nn as nn
import math
import torch.utils.model_zoo as model_zoo
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152']
m... | 32.918699 | 106 | 0.626327 |
69373e654150996339b1b72df7b6cd1237cf98a7 | 34,649 | py | Python | sirepo/template/elegant.py | moellep/sirepo | 4fd8b88b3b95921d50e6b225c02a46c00da16a27 | [
"Apache-2.0"
] | null | null | null | sirepo/template/elegant.py | moellep/sirepo | 4fd8b88b3b95921d50e6b225c02a46c00da16a27 | [
"Apache-2.0"
] | null | null | null | sirepo/template/elegant.py | moellep/sirepo | 4fd8b88b3b95921d50e6b225c02a46c00da16a27 | [
"Apache-2.0"
] | 2 | 2020-10-27T20:01:23.000Z | 2020-11-06T23:35:05.000Z | # -*- coding: utf-8 -*-
u"""elegant execution template.
:copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkcompat
from pykern import pkio
from pykern impo... | 35.069838 | 286 | 0.628186 |
9adb2a7e96357c1aeb2e412450abd6235bf9934a | 3,687 | py | Python | Phase-1/Python Basic 1/Day-3.py | elifbayindir/python-challenges | dde6f3cc7891c75ff3bb75f9f9ded85e03dce413 | [
"MIT"
] | 3 | 2020-05-21T20:19:40.000Z | 2022-02-27T08:20:10.000Z | Phase-1/Python Basic 1/Day-3.py | elifbayindir/python-challenges | dde6f3cc7891c75ff3bb75f9f9ded85e03dce413 | [
"MIT"
] | null | null | null | Phase-1/Python Basic 1/Day-3.py | elifbayindir/python-challenges | dde6f3cc7891c75ff3bb75f9f9ded85e03dce413 | [
"MIT"
] | 4 | 2020-05-12T16:41:52.000Z | 2020-05-21T20:17:22.000Z | <<<<<<< HEAD
"""
1. Write a Python program to print the documents (syntax, description etc.) of Python built-in function(s).
Sample function : abs()
Expected Result :
abs(number) -> number
Return the absolute value of the argument.
Tools: help function
2. Write a Python program to p... | 35.451923 | 184 | 0.699756 |
31c181cad3bd221e4c03bd22a41635725255ce70 | 655 | py | Python | ExceptionHandling/ExceptionHandling.py | dsabhrawal/python-examples | 55b3dd6c9fd0b992bcfe3422765dc80fb143a54b | [
"MIT"
] | 1 | 2020-03-01T17:24:20.000Z | 2020-03-01T17:24:20.000Z | ExceptionHandling/ExceptionHandling.py | dsabhrawal/python-examples | 55b3dd6c9fd0b992bcfe3422765dc80fb143a54b | [
"MIT"
] | null | null | null | ExceptionHandling/ExceptionHandling.py | dsabhrawal/python-examples | 55b3dd6c9fd0b992bcfe3422765dc80fb143a54b | [
"MIT"
] | null | null | null | #Common exceptions are
#ImportError | IndexError | NameError | TypeError | ValueError | IOError
# Standard errors are defined in exceptions module
items = [10,20,30,40,50]
print(items[2]) #30
print(items) #Content of List
#------------------------
#Exception handling of IndexError
try:
print(items[10]) #IndexE... | 24.259259 | 83 | 0.714504 |
1ee7ea5f1765c649b78e842a67f6252b45707f37 | 8,215 | py | Python | tests/test_utils.py | refindlyllc/test | 12b9a52ab973cef65cc244ff46ebb96994fceb03 | [
"MIT"
] | 62 | 2017-01-10T06:25:16.000Z | 2022-01-28T17:56:00.000Z | tests/test_utils.py | refindlyllc/test | 12b9a52ab973cef65cc244ff46ebb96994fceb03 | [
"MIT"
] | 106 | 2016-12-19T19:07:58.000Z | 2022-02-09T18:48:52.000Z | tests/test_utils.py | refindlyllc/test | 12b9a52ab973cef65cc244ff46ebb96994fceb03 | [
"MIT"
] | 31 | 2017-01-19T23:01:50.000Z | 2022-02-09T17:03:32.000Z | import datetime
import unittest
from collections import OrderedDict
from rets.utils import DMQLHelper
from rets.utils.get_object import GetObject
class SearchTester(unittest.TestCase):
"""
OrderedDict is used with multiple keys in the tests to ensure consistent expected expression values
"""
def set... | 39.878641 | 103 | 0.635545 |
bb5d7297b3b5d95adbd40944602d90f159f6ae08 | 19,005 | py | Python | selfdrive/manager.py | andy741217/dp | 1fbd6c00e9dd6a7db2ec863cedb6d8fb1230a29a | [
"MIT"
] | 2 | 2021-03-10T04:16:51.000Z | 2021-03-20T13:10:53.000Z | selfdrive/manager.py | dragonpilot-community/dp_devel | 6f4f7e31dd8d505d5dedb7f382f79277940bef36 | [
"MIT"
] | null | null | null | selfdrive/manager.py | dragonpilot-community/dp_devel | 6f4f7e31dd8d505d5dedb7f382f79277940bef36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import datetime
import importlib
import os
import sys
import fcntl
import errno
import signal
import shutil
import subprocess
import textwrap
import time
import traceback
from multiprocessing import Process
from typing import Dict
from common.basedir import BASEDIR
from common.spinner import Sp... | 28.621988 | 116 | 0.653512 |
f23045cbe4c4d2a6a061c0f89113db422c8482ec | 11,293 | py | Python | utilities.py | JoshMayberry/EXE_Generator | 7363f79c849f4a89610f8fb56328ab61d98c4529 | [
"MIT"
] | 1 | 2020-12-21T10:13:23.000Z | 2020-12-21T10:13:23.000Z | utilities.py | JoshMayberry/EXE_Generator | 7363f79c849f4a89610f8fb56328ab61d98c4529 | [
"MIT"
] | null | null | null | utilities.py | JoshMayberry/EXE_Generator | 7363f79c849f4a89610f8fb56328ab61d98c4529 | [
"MIT"
] | null | null | null | import os
import re
import shutil
import abc
import MyUtilities.common
data_files_zip = []
absPath = re.sub("([^\\\\])[\\\\]([^\\\\])", r"\1/\2", os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
class Utilities(MyUtilities.common.EnsureFunctions):
pass
class Exe_Base(Utilities, metaclass = abc.ABCMeta... | 31.72191 | 474 | 0.677942 |
cc94bca9f6aac0c1bdff80cffc5c69ab01b6ec1f | 2,669 | py | Python | spatialpandas/geoseries.py | giancastro/spatialpandas | 7f3fea525bf5007d64e90974290e4910cc027d72 | [
"BSD-2-Clause"
] | null | null | null | spatialpandas/geoseries.py | giancastro/spatialpandas | 7f3fea525bf5007d64e90974290e4910cc027d72 | [
"BSD-2-Clause"
] | null | null | null | spatialpandas/geoseries.py | giancastro/spatialpandas | 7f3fea525bf5007d64e90974290e4910cc027d72 | [
"BSD-2-Clause"
] | null | null | null | import pandas as pd
from .geometry import GeometryDtype, Geometry
class _MaybeGeoSeries(pd.Series):
def __new__(cls, data, *args, **kwargs):
if isinstance(getattr(data, 'dtype', None), GeometryDtype):
series_cls = GeoSeries
else:
series_cls = pd.Series
return serie... | 28.094737 | 81 | 0.621581 |
d5700a312df441eb920b7e37e97c07aa9788429f | 1,917 | py | Python | tests/testBaselineNet.py | borea17/StrImaDec | 711e14d50ff816585b43c1509355983738b45ecb | [
"MIT"
] | null | null | null | tests/testBaselineNet.py | borea17/StrImaDec | 711e14d50ff816585b43c1509355983738b45ecb | [
"MIT"
] | null | null | null | tests/testBaselineNet.py | borea17/StrImaDec | 711e14d50ff816585b43c1509355983738b45ecb | [
"MIT"
] | null | null | null | from unittest import TestCase
import numpy as np
import torch
from strimadec.models.modules import BaselineNet
class testBaselineNet(TestCase):
BATCH_SIZE = 10
SEED = 1
def setUp(self):
np.random.seed(testBaselineNet.SEED)
# (deterministic) random setup of baseline net
self.ran... | 31.42623 | 97 | 0.66145 |
01d5d89dc08c2586d1ebf015f022c583d462a543 | 3,553 | py | Python | old_projects/nn/mnist_loader.py | Magnus01/mertyildirmanim | 27794ea9f8fc887ab27e5f2f080068ec135650f1 | [
"MIT"
] | null | null | null | old_projects/nn/mnist_loader.py | Magnus01/mertyildirmanim | 27794ea9f8fc887ab27e5f2f080068ec135650f1 | [
"MIT"
] | null | null | null | old_projects/nn/mnist_loader.py | Magnus01/mertyildirmanim | 27794ea9f8fc887ab27e5f2f080068ec135650f1 | [
"MIT"
] | null | null | null | """
mnist_loader
~~~~~~~~~~~~
A library to load the MNIST image data. For details of the data
structures that are returned, see the doc strings for ``load_data``
and ``load_data_wrapper``. In practice, ``load_data_wrapper`` is the
function usually called by our neural network code.
"""
#### Libraries
# Standard lib... | 39.477778 | 70 | 0.694343 |
fcc008798f416eae57846364650ab97ab090a973 | 11,393 | py | Python | soccer/gameplay/plays/offense/distraction.py | AniruddhaG123/robocup-software | 0eb3b3957428894f2f39341594800be803665f44 | [
"Apache-2.0"
] | 1 | 2019-09-24T22:59:25.000Z | 2019-09-24T22:59:25.000Z | soccer/gameplay/plays/offense/distraction.py | ananth-kumar01/robocup-software | 4043a7f9590d02f617d8e9a762697e4aaa27f1a6 | [
"Apache-2.0"
] | null | null | null | soccer/gameplay/plays/offense/distraction.py | ananth-kumar01/robocup-software | 4043a7f9590d02f617d8e9a762697e4aaa27f1a6 | [
"Apache-2.0"
] | null | null | null | import main
import robocup
import behavior
import constants
import enum
import standard_play
import evaluation
import tactics.coordinated_pass
import skills.move
import skills.capture
class Distraction(standard_play.StandardPlay):
class State(enum.Enum):
setup = 1, 'capture ball and move distractor and st... | 43.819231 | 138 | 0.641447 |
42a909d47f492182293bec4aa4142f9be2243932 | 1,808 | py | Python | src/main.py | jsalvag/clase-22 | 5b6f959777f724f4575b5b227f42db450acbd6c3 | [
"MIT"
] | null | null | null | src/main.py | jsalvag/clase-22 | 5b6f959777f724f4575b5b227f42db450acbd6c3 | [
"MIT"
] | null | null | null | src/main.py | jsalvag/clase-22 | 5b6f959777f724f4575b5b227f42db450acbd6c3 | [
"MIT"
] | null | null | null | import math
# Escribir una funcion que basado en el radio:
# calcule la sup de un circulo
# calcule la circunferencia
# calcule la sup de una esfera
# calcule el vol de una esfera
def calcularCircunferencia(radio):
"""
calcularCircunferencia() -> float
radio -- radio is in float
"""
circunfer... | 19.652174 | 89 | 0.626659 |
0095654aea1b7c0717ae61cb93180853f8f288d2 | 8,885 | py | Python | tests/test_model_methods/test_load_all.py | naterenegar/ormar | ef3edd4594867569a2fd72971fde9666cff42395 | [
"MIT"
] | 905 | 2020-08-31T19:13:34.000Z | 2022-03-31T08:38:10.000Z | tests/test_model_methods/test_load_all.py | naterenegar/ormar | ef3edd4594867569a2fd72971fde9666cff42395 | [
"MIT"
] | 359 | 2020-08-28T14:14:54.000Z | 2022-03-29T07:40:32.000Z | tests/test_model_methods/test_load_all.py | naterenegar/ormar | ef3edd4594867569a2fd72971fde9666cff42395 | [
"MIT"
] | 56 | 2020-10-26T02:22:14.000Z | 2022-03-20T06:41:31.000Z | from typing import List
import databases
import pytest
import sqlalchemy
import ormar
from tests.settings import DATABASE_URL
database = databases.Database(DATABASE_URL, force_rollback=True)
metadata = sqlalchemy.MetaData()
class BaseMeta(ormar.ModelMeta):
database = database
metadata = metadata
class La... | 35.257937 | 87 | 0.60664 |
18416582fed9b15ec1f8dcc5535c826d4621a205 | 4,208 | py | Python | gpkit/docs/source/examples/sp_to_gp_sweep.py | UCLA-StarAI/LearnFairNB | f922d885399955737bd9f16a104f700004cd3846 | [
"Fair"
] | 3 | 2019-07-07T17:29:49.000Z | 2021-03-20T18:52:28.000Z | docs/source/examples/sp_to_gp_sweep.py | sichu366/gpkit | a8999737980ba45682e6e00770cf4546ca5337af | [
"MIT"
] | 1 | 2019-11-23T22:26:05.000Z | 2019-11-23T22:26:05.000Z | gpkit/docs/source/examples/sp_to_gp_sweep.py | UCLA-StarAI/LearnFairNB | f922d885399955737bd9f16a104f700004cd3846 | [
"Fair"
] | null | null | null | "example of an SP that turns into a GP"
import numpy as np
from gpkit import Model, Variable, SignomialsEnabled, units
from gpkit.constraints.tight import Tight
def SimPleAC():
"Creates SimpleAC model"
# Env. constants
g = Variable("g", 9.81, "m/s^2", "gravitational acceleration")
mu = Variable("\\mu"... | 38.962963 | 78 | 0.548954 |
68e4a2c54b9e35edaa2252b0037f2d7e1d3479c4 | 23,020 | py | Python | mlflow/statsmodels.py | ryan-duve/mlflow | 12186106a92654234ae3d1a9b39e810016e7be95 | [
"Apache-2.0"
] | null | null | null | mlflow/statsmodels.py | ryan-duve/mlflow | 12186106a92654234ae3d1a9b39e810016e7be95 | [
"Apache-2.0"
] | null | null | null | mlflow/statsmodels.py | ryan-duve/mlflow | 12186106a92654234ae3d1a9b39e810016e7be95 | [
"Apache-2.0"
] | null | null | null | """
The ``mlflow.statsmodels`` module provides an API for logging and loading statsmodels models.
This module exports statsmodels models with the following flavors:
statsmodels (native) format
This is the main flavor that can be loaded back into statsmodels, which relies on pickle
internally to serialize a mod... | 42.550832 | 100 | 0.636707 |
8557ab33c3564174708b1465c049b5c177a282ff | 26 | py | Python | kraken/__init__.py | null0pointer/arb-engine | bd54c69b50e4a3da40506b3f1fe25eeb61bbe7b1 | [
"MIT"
] | null | null | null | kraken/__init__.py | null0pointer/arb-engine | bd54c69b50e4a3da40506b3f1fe25eeb61bbe7b1 | [
"MIT"
] | null | null | null | kraken/__init__.py | null0pointer/arb-engine | bd54c69b50e4a3da40506b3f1fe25eeb61bbe7b1 | [
"MIT"
] | null | null | null | from .kraken import Kraken | 26 | 26 | 0.846154 |
0101aa7530e29b162d1b858e0a39b746bfdbc8a0 | 628 | py | Python | photos/migrations/0002_photos.py | MachariaMark/mygallery | 1132abec6325610104fe2a096f889e4c87a634f3 | [
"MIT"
] | null | null | null | photos/migrations/0002_photos.py | MachariaMark/mygallery | 1132abec6325610104fe2a096f889e4c87a634f3 | [
"MIT"
] | null | null | null | photos/migrations/0002_photos.py | MachariaMark/mygallery | 1132abec6325610104fe2a096f889e4c87a634f3 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-12 18:12
import cloudinary.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('photos', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='photos',
fields=[
... | 27.304348 | 114 | 0.597134 |
95778a80c5ce41bf2fca64cdd5c97d81fcb57925 | 532 | py | Python | vujade/utils/SceneChangeDetection/InteractiveProcessing/setup.py | vujadeyoon/PyTorch-CIFAR-10 | 032c7bfd4208f861e0a5716d2c6850a6a89b2310 | [
"MIT"
] | null | null | null | vujade/utils/SceneChangeDetection/InteractiveProcessing/setup.py | vujadeyoon/PyTorch-CIFAR-10 | 032c7bfd4208f861e0a5716d2c6850a6a89b2310 | [
"MIT"
] | null | null | null | vujade/utils/SceneChangeDetection/InteractiveProcessing/setup.py | vujadeyoon/PyTorch-CIFAR-10 | 032c7bfd4208f861e0a5716d2c6850a6a89b2310 | [
"MIT"
] | null | null | null | """
Dveloper: vujadeyoon
E-mail: sjyoon1671@gmail.com
Github: https://github.com/vujadeyoon/vujade
Title: setup.py
Description: A module for installing the cython based scene change detection module
"""
import numpy as np
from distutils.core import setup
from Cython.Build import cythonize
if __name__ == '__main__'... | 22.166667 | 83 | 0.710526 |
604457e32b0618f4b4c242b35e1e7a0a8a6cfaeb | 5,162 | py | Python | levels.py | A-majge-nine/platformer-sidescroll | 9ce3e043cee7e3adf3b9d28d0ae70f3502456f36 | [
"MIT"
] | null | null | null | levels.py | A-majge-nine/platformer-sidescroll | 9ce3e043cee7e3adf3b9d28d0ae70f3502456f36 | [
"MIT"
] | null | null | null | levels.py | A-majge-nine/platformer-sidescroll | 9ce3e043cee7e3adf3b9d28d0ae70f3502456f36 | [
"MIT"
] | null | null | null | platforms = [
[00, 300, 100, 10],
[100, 60, 50, 10],
[100, 100, 50, 10],
[100, 140, 230, 10],
[100, 180, 50, 10],
[130, 300, 200, 10],
[270, 270, 30, 10],
[300, 240, 30, 10],
[340, 200, 30, 10],
[340, 100, 140, 10],
[330, 330, 10, 10],
[330, 370, 30, 10],
[410, 300, 1... | 23.147982 | 27 | 0.426966 |
4a5541ae3be5f52e65d961d8d9643cb48f522b21 | 470 | py | Python | epuap_watchdog/institutions/migrations/0002_auto_20170712_1337.py | ad-m/epuap-watchdog | ff2dbbfe6c999e825dbf3f2bf2a94d8baa0a08ea | [
"MIT"
] | 2 | 2017-07-30T16:41:41.000Z | 2020-03-28T12:20:56.000Z | epuap_watchdog/institutions/migrations/0002_auto_20170712_1337.py | ad-m/epuap-watchdog | ff2dbbfe6c999e825dbf3f2bf2a94d8baa0a08ea | [
"MIT"
] | 5 | 2017-07-18T12:13:46.000Z | 2017-07-28T15:48:38.000Z | epuap_watchdog/institutions/migrations/0002_auto_20170712_1337.py | ad-m/epuap-watchdog | ff2dbbfe6c999e825dbf3f2bf2a94d8baa0a08ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-12 13:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('institutions', '0001_initial'),
]
operations = [
migrations.AlterField(
... | 22.380952 | 72 | 0.621277 |
901e666a554c5669217ab17b91447867d59a0435 | 5,388 | py | Python | monorail/koon/tests/test_cfg.py | mic47/MysticMine | 2fc0a5eaa0ab299c3a23ce17ae1c56a98055a44c | [
"MIT"
] | 28 | 2015-05-28T13:29:02.000Z | 2018-07-29T04:03:19.000Z | monorail/koon/tests/test_cfg.py | mic47/MysticMine | 2fc0a5eaa0ab299c3a23ce17ae1c56a98055a44c | [
"MIT"
] | 8 | 2015-06-28T10:29:14.000Z | 2016-08-03T22:09:36.000Z | monorail/koon/tests/test_cfg.py | mic47/MysticMine | 2fc0a5eaa0ab299c3a23ce17ae1c56a98055a44c | [
"MIT"
] | 11 | 2015-06-17T18:23:31.000Z | 2018-09-07T20:06:36.000Z |
import monorail.koon.cfg as cfg
class TestConfigNode:
def test_get( self ):
root = cfg.ConfigNode("root", "root")
sub1 = cfg.ConfigNode("sub1", "val1")
sub2a = cfg.ConfigNode("sub2a", "val2a")
sub2b = cfg.ConfigNode("sub2b", "val2b")
sub3 = cfg.ConfigNode("sub3", "val3")
... | 26.541872 | 68 | 0.474016 |
88ce884439985dee97df6e2a4480e54734290043 | 8,519 | py | Python | sdk/python/pulumi_azure_native/securityinsights/v20210301preview/get_threat_intelligence_alert_rule.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/securityinsights/v20210301preview/get_threat_intelligence_alert_rule.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/securityinsights/v20210301preview/get_threat_intelligence_alert_rule.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 37.03913 | 233 | 0.646555 |
036f61ef6cc14fe2630daff427d26d68f486ec32 | 1,195 | py | Python | zeus/factories/bundlestat.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 221 | 2017-07-03T17:29:21.000Z | 2021-12-07T19:56:59.000Z | zeus/factories/bundlestat.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 298 | 2017-07-04T18:08:14.000Z | 2022-03-03T22:24:51.000Z | zeus/factories/bundlestat.py | conrad-kronos/zeus | ddb6bc313e51fb22222b30822b82d76f37dbbd35 | [
"Apache-2.0"
] | 24 | 2017-07-15T13:46:45.000Z | 2020-08-16T16:14:45.000Z | import factory
import factory.fuzzy
from faker import Factory
faker = Factory.create()
from zeus import models
from .base import ModelFactory
from .types import GUIDFactory
class BundleFactory(ModelFactory):
id = GUIDFactory()
name = factory.LazyAttribute(lambda o: "{}.{}".format(faker.word(), faker.word(... | 28.452381 | 86 | 0.687866 |
07f74fab9009ce41a4b6b4f783f9b41cf92aa198 | 3,131 | py | Python | dissect/cstruct/types/enum.py | talhaHavadar/dissect.cstruct | f22afb4c0a1b3aa75ebf6e67bcb0ba55dd862ed6 | [
"MIT"
] | 227 | 2018-10-31T14:42:44.000Z | 2022-03-29T04:18:08.000Z | dissect/cstruct/types/enum.py | talhaHavadar/dissect.cstruct | f22afb4c0a1b3aa75ebf6e67bcb0ba55dd862ed6 | [
"MIT"
] | 16 | 2018-11-02T08:53:00.000Z | 2022-02-15T12:18:05.000Z | dissect/cstruct/types/enum.py | talhaHavadar/dissect.cstruct | f22afb4c0a1b3aa75ebf6e67bcb0ba55dd862ed6 | [
"MIT"
] | 26 | 2018-10-31T18:09:05.000Z | 2022-03-24T08:21:05.000Z | from dissect.cstruct.types.base import RawType
class Enum(RawType):
"""Implements an Enum type.
Enums can be made using any type. The API for accessing enums and their
values is very similar to Python 3 native enums.
Example:
When using the default C-style parser, the following syntax is sup... | 27.464912 | 81 | 0.601086 |
8be046ea0436ab36d5aafc06d1f1621d3d86ddf7 | 510 | py | Python | courses/migrations/0004_course_students.py | dogukanteber/cms | 3a5f54bf6b39a19d83f2b6d3755c900d97bb5589 | [
"Unlicense"
] | null | null | null | courses/migrations/0004_course_students.py | dogukanteber/cms | 3a5f54bf6b39a19d83f2b6d3755c900d97bb5589 | [
"Unlicense"
] | null | null | null | courses/migrations/0004_course_students.py | dogukanteber/cms | 3a5f54bf6b39a19d83f2b6d3755c900d97bb5589 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-11 09:48
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('courses', '0003_remove_course_students'),
]
oper... | 24.285714 | 70 | 0.656863 |
c9e3a406b5b44b8a3a395e9fd5b1ce71998fbcce | 2,896 | py | Python | mini-amazon-skeleton/app/users.py | QinHE325/FA22CS516_FinalProject | ecf1bef021049ec24b8beafb2eb3623e88935063 | [
"MIT"
] | null | null | null | mini-amazon-skeleton/app/users.py | QinHE325/FA22CS516_FinalProject | ecf1bef021049ec24b8beafb2eb3623e88935063 | [
"MIT"
] | null | null | null | mini-amazon-skeleton/app/users.py | QinHE325/FA22CS516_FinalProject | ecf1bef021049ec24b8beafb2eb3623e88935063 | [
"MIT"
] | 1 | 2022-02-05T21:29:21.000Z | 2022-02-05T21:29:21.000Z | from flask import render_template, redirect, url_for, flash, request
from werkzeug.urls import url_parse
from flask_login import login_user, logout_user, current_user
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import ValidationError,... | 35.317073 | 76 | 0.663329 |
de4ef0bf18730cc5a9628da1cec005ed6a72f6b3 | 17,977 | py | Python | networkx/linalg/algebraicconnectivity.py | theaverageguy/networkx | b2b74b3ba028ef3788f796aa64b037c8ea446539 | [
"BSD-3-Clause"
] | 1 | 2020-11-10T08:15:23.000Z | 2020-11-10T08:15:23.000Z | networkx/linalg/algebraicconnectivity.py | theaverageguy/networkx | b2b74b3ba028ef3788f796aa64b037c8ea446539 | [
"BSD-3-Clause"
] | null | null | null | networkx/linalg/algebraicconnectivity.py | theaverageguy/networkx | b2b74b3ba028ef3788f796aa64b037c8ea446539 | [
"BSD-3-Clause"
] | 2 | 2016-09-04T10:59:12.000Z | 2020-02-17T07:43:04.000Z | # -*- coding: utf-8 -*-
"""
Algebraic connectivity and Fiedler vectors of undirected graphs.
"""
__author__ = """ysitu <ysitu@users.noreply.github.com>"""
# Copyright (C) 2014 ysitu <ysitu@users.noreply.github.com>
# All rights reserved.
# BSD license.
from functools import partial
import networkx as nx
from networkx... | 32.332734 | 79 | 0.560271 |
6abe17c8ec36cb87f16b9db65a40632431a8029e | 813 | py | Python | OpenCast/domain/event/player.py | Tastyep/Pi-OpenCast | 1ed07130c26e6dd70184446af3c9143094d0c9a0 | [
"MIT"
] | 31 | 2019-10-05T14:23:10.000Z | 2022-02-27T19:38:55.000Z | OpenCast/domain/event/player.py | Tastyep/Pi-OpenCast | 1ed07130c26e6dd70184446af3c9143094d0c9a0 | [
"MIT"
] | 199 | 2020-08-30T16:33:03.000Z | 2022-03-28T04:10:06.000Z | OpenCast/domain/event/player.py | Tastyep/Pi-OpenCast | 1ed07130c26e6dd70184446af3c9143094d0c9a0 | [
"MIT"
] | 1 | 2019-10-05T16:00:49.000Z | 2019-10-05T16:00:49.000Z | """ Events emitted by the player model """
from dataclasses import dataclass
from OpenCast.domain.model.player import State
from .event import Event, ModelId
@dataclass
class PlayerCreated(Event):
queue: ModelId
state: State
sub_state: bool
sub_delay: int
volume: int
@dataclass
class PlayerQu... | 13.779661 | 46 | 0.730627 |
6c150fe6ca8f3bee1221aba83ecb8e5fd3e64ad5 | 2,271 | py | Python | server/swagger_server/models/author_id.py | fabric-testbed/UserInformationService | 3e4a850c67f39e188f7571a044721ad102987e2f | [
"MIT"
] | null | null | null | server/swagger_server/models/author_id.py | fabric-testbed/UserInformationService | 3e4a850c67f39e188f7571a044721ad102987e2f | [
"MIT"
] | 16 | 2021-02-16T19:14:40.000Z | 2022-01-18T15:48:44.000Z | server/swagger_server/models/author_id.py | fabric-testbed/UserInformationService | 3e4a850c67f39e188f7571a044721ad102987e2f | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server.models.author_id_type import AuthorIdType # noqa: F401,E501
from swagger_server import util
c... | 25.233333 | 83 | 0.604139 |
54a3fe7dcb293d6943ff6c30023e57daa25741f0 | 81,138 | py | Python | zipline/testing/fixtures.py | TheTradingAngel/zipline-trader | fdce0641005371f2b523c6faeb551c3d40273902 | [
"Apache-2.0"
] | 274 | 2020-06-08T13:45:50.000Z | 2022-03-29T02:59:11.000Z | zipline/testing/fixtures.py | TheTradingAngel/zipline-trader | fdce0641005371f2b523c6faeb551c3d40273902 | [
"Apache-2.0"
] | 103 | 2020-07-24T04:32:17.000Z | 2022-03-29T06:28:10.000Z | zipline/testing/fixtures.py | TheTradingAngel/zipline-trader | fdce0641005371f2b523c6faeb551c3d40273902 | [
"Apache-2.0"
] | 73 | 2020-06-03T00:34:04.000Z | 2022-03-29T16:57:47.000Z | import os
import sqlite3
from unittest import TestCase
import warnings
from logbook import NullHandler, Logger
import numpy as np
import pandas as pd
from pandas.errors import PerformanceWarning
from six import with_metaclass, iteritems, itervalues, PY2
import responses
from toolz import flip, groupby, merge
from trad... | 35.696436 | 79 | 0.670401 |
d4c97de2b73bbb65ff7cbd9e28445839dd86630b | 1,815 | py | Python | starepandas/tools/stare_join.py | SpatioTemporal/STAREPandas | cb33d0cd8c61d960cd7e5070d8b56d1a8805edae | [
"MIT"
] | 1 | 2021-01-03T18:17:01.000Z | 2021-01-03T18:17:01.000Z | starepandas/tools/stare_join.py | SpatioTemporal/STAREPandas | cb33d0cd8c61d960cd7e5070d8b56d1a8805edae | [
"MIT"
] | 66 | 2020-09-09T21:15:14.000Z | 2022-03-25T21:30:53.000Z | starepandas/tools/stare_join.py | SpatioTemporal/STAREPandas | cb33d0cd8c61d960cd7e5070d8b56d1a8805edae | [
"MIT"
] | 2 | 2020-07-28T14:17:32.000Z | 2021-01-21T19:24:23.000Z | import pystare
import pandas
def stare_join(left_df, right_df, how='left'):
""" STARE join of two STAREDataFrames.
Seminal function to geopandas.sjoin().
At the moment, only the *interesects* predicate is supported.
Parameters
---------------
left_df: STAREDataFrame
left dataframe to ... | 27.923077 | 83 | 0.614325 |
cb4fe006beb2ab4542d7e519380f451e22774af4 | 1,783 | py | Python | src/c3nav/mapdata/migrations/0017_point_to_poi.py | johnjohndoe/c3nav | a17f863a3512e305595c16b0300796b6bae81241 | [
"Apache-2.0"
] | 132 | 2016-11-12T01:45:23.000Z | 2022-03-08T15:17:10.000Z | src/c3nav/mapdata/migrations/0017_point_to_poi.py | johnjohndoe/c3nav | a17f863a3512e305595c16b0300796b6bae81241 | [
"Apache-2.0"
] | 66 | 2016-09-29T09:46:19.000Z | 2022-03-11T23:26:18.000Z | src/c3nav/mapdata/migrations/0017_point_to_poi.py | johnjohndoe/c3nav | a17f863a3512e305595c16b0300796b6bae81241 | [
"Apache-2.0"
] | 42 | 2016-09-29T08:34:57.000Z | 2022-03-08T15:17:15.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-08 14:23
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0016_remove_sou... | 37.145833 | 120 | 0.591139 |
bf77f7852b53254ec28d9e45855074d888f114dc | 95 | py | Python | StreetMuse/lib/python3.4/imp.py | Wojtechnology/Muzit | 41d509ed9c4f42974119c2ee292503c2396bc841 | [
"Apache-2.0"
] | null | null | null | StreetMuse/lib/python3.4/imp.py | Wojtechnology/Muzit | 41d509ed9c4f42974119c2ee292503c2396bc841 | [
"Apache-2.0"
] | null | null | null | StreetMuse/lib/python3.4/imp.py | Wojtechnology/Muzit | 41d509ed9c4f42974119c2ee292503c2396bc841 | [
"Apache-2.0"
] | null | null | null | /usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imp.py | 95 | 95 | 0.810526 |
a5211e97ee28a5a4d15bc1d17f8e9086bb37f91f | 1,683 | py | Python | wsiprocess/annotationparser/WSIDissector_parser.py | tand826/wsiprocess | 5a63f4da536d7074aa15e72b8b1355dbc125744e | [
"Apache-2.0"
] | 10 | 2020-04-09T10:13:46.000Z | 2021-08-16T04:22:34.000Z | wsiprocess/annotationparser/WSIDissector_parser.py | tand826/wsiprocess | 5a63f4da536d7074aa15e72b8b1355dbc125744e | [
"Apache-2.0"
] | 32 | 2020-04-12T00:14:33.000Z | 2022-02-02T08:28:05.000Z | wsiprocess/annotationparser/WSIDissector_parser.py | tand826/wsiprocess | 5a63f4da536d7074aa15e72b8b1355dbc125744e | [
"Apache-2.0"
] | 2 | 2020-10-10T18:16:26.000Z | 2021-04-01T06:44:21.000Z | # -*- coding: utf-8 -*-
import json
from .parser_utils import BaseParser
class WSIDissectorAnnotation(BaseParser):
"""Annotation parser for WSIDissector
Args:
path (str): Path to the annotation file.
Attributes:
path (str): Path to the annotation file.
annotation (dict): Annota... | 31.166667 | 68 | 0.550208 |
cdc571d9d0553a3a68496886eb724ea39c799376 | 53,268 | py | Python | .infra/setup/playbooks/roles/ansible.kubernetes-modules/library/openshift_v1_template_instance.py | cvicens/lab-knative | ef98aa111e566c6d33fd72c61f9c0d93a2c05b2f | [
"Apache-2.0"
] | null | null | null | .infra/setup/playbooks/roles/ansible.kubernetes-modules/library/openshift_v1_template_instance.py | cvicens/lab-knative | ef98aa111e566c6d33fd72c61f9c0d93a2c05b2f | [
"Apache-2.0"
] | null | null | null | .infra/setup/playbooks/roles/ansible.kubernetes-modules/library/openshift_v1_template_instance.py | cvicens/lab-knative | ef98aa111e566c6d33fd72c61f9c0d93a2c05b2f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from ansible.module_utils.openshift_common import OpenShiftAnsibleModule, OpenShiftAnsibleException
DOCUMENTATION = '''
module: openshift_v1_template_instance
short_description: OpenShift TemplateInstance
description:
- Manage the lifecycle of a template_instance object. Supp... | 48.60219 | 100 | 0.555531 |
df86537302d66c36f0fd478e773a1306482fc688 | 24,944 | py | Python | autotest/gcore/numpy_rw.py | heimusharper/gdal | 762a261f32617b506a9fc199040a5dbdc5214716 | [
"MIT"
] | null | null | null | autotest/gcore/numpy_rw.py | heimusharper/gdal | 762a261f32617b506a9fc199040a5dbdc5214716 | [
"MIT"
] | null | null | null | autotest/gcore/numpy_rw.py | heimusharper/gdal | 762a261f32617b506a9fc199040a5dbdc5214716 | [
"MIT"
] | null | null | null | #!/usr/bin/env pytest
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test basic integration with Numeric Python.
# Author: Frank Warmerdam, warmerdam@pobox.com
#
######################################################################... | 33.708108 | 147 | 0.585471 |
1408666da2a23d5d59ac8b0b17f6620d60f9dc4f | 3,353 | py | Python | ChopRNAReadsMP.py | zh3zh/CODA | 028024d41b4ca0f8be56a11bc7831328c9b15818 | [
"MIT"
] | 3 | 2019-12-21T08:55:40.000Z | 2019-12-26T07:07:57.000Z | ChopRNAReadsMP.py | zh3zh/CODA | 028024d41b4ca0f8be56a11bc7831328c9b15818 | [
"MIT"
] | 6 | 2020-11-26T07:07:59.000Z | 2021-12-03T11:23:11.000Z | ChopRNAReadsMP.py | zh3zh/CODA | 028024d41b4ca0f8be56a11bc7831328c9b15818 | [
"MIT"
] | 3 | 2020-01-31T07:54:28.000Z | 2021-12-10T02:21:32.000Z | import os
import regex
import argparse
from collections import defaultdict
import gzip
from multiprocessing import Pool, cpu_count
def reverse_seq(dnaSeq):
rseq = ""
for i in range(len(dnaSeq)):
c = dnaSeq[i]
if c == 'A':
rseq = 'T'+rseq
elif c == 'T':
... | 26.401575 | 98 | 0.524605 |
b1f3857845cbce33a0006406962de4bd8d563476 | 3,722 | py | Python | saga/adaptors/condor/transferdirectives.py | nikmagini/pilot | 1c84fcf6f7e43b669d2357326cdbe06382ac829f | [
"Apache-2.0"
] | 13 | 2015-02-19T17:17:10.000Z | 2021-12-22T06:48:02.000Z | saga/adaptors/condor/transferdirectives.py | nikmagini/pilot | 1c84fcf6f7e43b669d2357326cdbe06382ac829f | [
"Apache-2.0"
] | 85 | 2015-01-06T15:01:51.000Z | 2018-11-29T09:03:35.000Z | saga/adaptors/condor/transferdirectives.py | nikmagini/pilot | 1c84fcf6f7e43b669d2357326cdbe06382ac829f | [
"Apache-2.0"
] | 22 | 2015-06-09T12:08:29.000Z | 2018-11-20T10:07:01.000Z |
__author__ = "Andre Merzky, Ole Weidner"
__copyright__ = "Copyright 2012-2013, The SAGA Project"
__license__ = "MIT"
''' Provides a parser class for the file transfer specification as it is
defined in GFD.90, sction 4.1.3.
'''
import saga.exceptions as se
# 4.1.3 File Transfer Specifications (GFD90 p 176-... | 36.851485 | 82 | 0.6295 |
834eba2c9cfb2c6abfd1415225587ce19468184c | 2,247 | py | Python | contrib/zmq/zmq_test.py | Clotonervo/TestCoin | 16a97b165fba7a0d85d640e534060c60e7623bc2 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_test.py | Clotonervo/TestCoin | 16a97b165fba7a0d85d640e534060c60e7623bc2 | [
"MIT"
] | null | null | null | contrib/zmq/zmq_test.py | Clotonervo/TestCoin | 16a97b165fba7a0d85d640e534060c60e7623bc2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017-2020 The Raven Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Rave... | 29.565789 | 79 | 0.64842 |
3ebee2ac0dfebe668f33243d3dfd991f4805bf95 | 2,810 | py | Python | dataset/shapestack.py | hyenal/relate | 0dcc4ba22240daf0fdba91e36b300e7038e5bef6 | [
"MIT-0"
] | 33 | 2020-10-19T08:16:53.000Z | 2022-03-24T06:44:03.000Z | dataset/shapestack.py | hyenal/relate | 0dcc4ba22240daf0fdba91e36b300e7038e5bef6 | [
"MIT-0"
] | null | null | null | dataset/shapestack.py | hyenal/relate | 0dcc4ba22240daf0fdba91e36b300e7038e5bef6 | [
"MIT-0"
] | 1 | 2020-11-11T05:37:13.000Z | 2020-11-11T05:37:13.000Z | import os
import numpy as np
from PIL import Image
import PIL
import torch
class ShapeStack(object):
"""Data Handler that loads ShapeStack data."""
def __init__(self, data_root, train=True, image_size=64, seq_len=1,
epoch_size=100000, **kwargs):
self.root_dir = data_root
self... | 34.268293 | 80 | 0.531317 |
833e8e7867e31008d930c212a0354516286b67ba | 4,524 | py | Python | sql_storage/utils/sqlutil.py | grecoe/amlsdummy | f83ade8f75bf972f574834eae2535cfda6e2711b | [
"MIT"
] | 1 | 2020-03-20T16:38:39.000Z | 2020-03-20T16:38:39.000Z | sql_storage/utils/sqlutil.py | grecoe/amlsdummy | f83ade8f75bf972f574834eae2535cfda6e2711b | [
"MIT"
] | 1 | 2020-02-28T18:03:42.000Z | 2020-02-28T18:03:42.000Z | sql_storage/utils/sqlutil.py | grecoe/amlsdummy | f83ade8f75bf972f574834eae2535cfda6e2711b | [
"MIT"
] | 2 | 2020-02-12T03:30:20.000Z | 2020-02-28T00:20:06.000Z | # Copyright (c) Microsoft Corporation.
import pyodbc # pylint: disable=E0401,E0611
class SqlData:
def __init__(self, columns, data):
if len(columns) != len(data):
raise Exception("Columns must equal data {} != {}".format(len(columns), len(data)))
for idx in range(len(columns)):
... | 33.761194 | 131 | 0.529178 |
388cba94a0f9e6b306826c3b15d3967a71b3931e | 3,640 | py | Python | parlai/agents/tfidf_retriever/build_db.py | omry/ParlAI | 61703c7b76dce45bc7f7282b20a35be64c6a0880 | [
"MIT"
] | 1 | 2019-12-04T20:00:28.000Z | 2019-12-04T20:00:28.000Z | parlai/agents/tfidf_retriever/build_db.py | omry/ParlAI | 61703c7b76dce45bc7f7282b20a35be64c6a0880 | [
"MIT"
] | 3 | 2021-05-08T09:44:24.000Z | 2021-07-21T14:03:28.000Z | parlai/agents/tfidf_retriever/build_db.py | omry/ParlAI | 61703c7b76dce45bc7f7282b20a35be64c6a0880 | [
"MIT"
] | 1 | 2020-01-16T17:37:16.000Z | 2020-01-16T17:37:16.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""A script to read in and store ParlAI tasks in a sqlite database.
Adapted from Adam Fisch's work at github.com/faceboo... | 34.018692 | 84 | 0.576923 |
87a26dbc51aeb03ba990bbcad431f3fa9ca269ec | 1,706 | py | Python | CondTools/Ecal/python/EcalLaser_prompt_popcon.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | CondTools/Ecal/python/EcalLaser_prompt_popcon.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | CondTools/Ecal/python/EcalLaser_prompt_popcon.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
from CondCore.Utilities.popcon2dropbox_job_conf import options, psetForRecord, setup_popcon
import CondTools.Ecal.db_credentials as auth
recordName = "EcalLaserAPDPNRatiosRcd"
tagTimeType = "timestamp"
process = setup_popcon( recordName, tagTimeType )
process.MessageLogger = ... | 37.086957 | 91 | 0.690504 |
91468f3cea0356bb115a719c4f6167c432c8351b | 8,519 | py | Python | contrib/tsperf/OrangeJuice_Pt_3Weeks_Weekly/DilatedCNN/train_validate.py | cristinanichiforov/forecasting | ea8a9f47eb0bae70e47e292bf858b4b9d06bef9d | [
"MIT"
] | 4 | 2020-07-24T08:12:33.000Z | 2021-07-08T10:24:55.000Z | contrib/tsperf/OrangeJuice_Pt_3Weeks_Weekly/DilatedCNN/train_validate.py | sts-sadr/forecasting | 10352e07c74f7cae2f68629fdfb89877596fcc6d | [
"MIT"
] | 3 | 2020-09-25T22:02:53.000Z | 2022-02-10T01:27:09.000Z | contrib/tsperf/OrangeJuice_Pt_3Weeks_Weekly/DilatedCNN/train_validate.py | sts-sadr/forecasting | 10352e07c74f7cae2f68629fdfb89877596fcc6d | [
"MIT"
] | 2 | 2020-08-24T05:01:12.000Z | 2021-07-08T02:51:45.000Z | # coding: utf-8
# Perform cross validation of a Dilated Convolutional Neural Network (CNN) model on the training data of the 1st forecast round.
import os
import sys
import math
import keras
import argparse
import datetime
import numpy as np
import pandas as pd
from utils import *
from keras.layers import *
from ker... | 39.995305 | 128 | 0.689635 |
205034cd162a6b3f2060242bb24f12e1e93bfcce | 1,535 | py | Python | demo_project/settings.py | blacktorn/django-brookie | b39382a6961e7fc6af6ba62450a63ba34682692c | [
"BSD-3-Clause"
] | 4 | 2016-12-30T19:16:21.000Z | 2020-02-12T04:21:20.000Z | demo_project/settings.py | blacktorn/django-brookie | b39382a6961e7fc6af6ba62450a63ba34682692c | [
"BSD-3-Clause"
] | null | null | null | demo_project/settings.py | blacktorn/django-brookie | b39382a6961e7fc6af6ba62450a63ba34682692c | [
"BSD-3-Clause"
] | null | null | null | import os, sys
abspath = lambda *p: os.path.abspath(os.path.join(*p))
PROJECT_ROOT = abspath(os.path.dirname(__file__))
BROOKIE_MODULE_PATH = abspath(PROJECT_ROOT, '..')
sys.path.insert(0, BROOKIE_MODULE_PATH)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS =... | 22.246377 | 65 | 0.699023 |
f53de1508b61b70a0637b54620b53fd14939f193 | 1,113 | py | Python | setup.py | JordanReiter/pyoai | ee3506f37ca80475e17434706e32c303583ee220 | [
"BSD-3-Clause"
] | null | null | null | setup.py | JordanReiter/pyoai | ee3506f37ca80475e17434706e32c303583ee220 | [
"BSD-3-Clause"
] | null | null | null | setup.py | JordanReiter/pyoai | ee3506f37ca80475e17434706e32c303583ee220 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
from os.path import join, dirname
setup(
name='pyoai',
version='2.4.5dev',
author='Infrae',
author_email='info@infrae.com',
url='http://www.infrae.com/download/oaipmh',
classifiers=["Development Status :: 4 - Beta",
"Programming Langu... | 34.78125 | 80 | 0.644205 |
8d9d3d8a004511f4ae1a49fc095e7a3ccb72ca2b | 6,703 | py | Python | bindings/python/ensmallen_graph/datasets/string/phaeospirillumfulvum.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/phaeospirillumfulvum.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/phaeospirillumfulvum.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Phaeospirillum fulvum.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Datetime: 2021-... | 35.094241 | 223 | 0.704312 |
77fc90e3207d04994980a2b776d04164b06a23e0 | 4,465 | py | Python | data-structures/hash-map.py | subsr97/Data-Structures-and-Algorithms | 7a7168d4f283e4be3cc1cb2656fe10602509ecd9 | [
"MIT"
] | null | null | null | data-structures/hash-map.py | subsr97/Data-Structures-and-Algorithms | 7a7168d4f283e4be3cc1cb2656fe10602509ecd9 | [
"MIT"
] | null | null | null | data-structures/hash-map.py | subsr97/Data-Structures-and-Algorithms | 7a7168d4f283e4be3cc1cb2656fe10602509ecd9 | [
"MIT"
] | null | null | null | class HashMap:
"""
Hash map implementation with Separate Chaining.
"""
def __init__(self, capacity=10, threshold=0.5):
if capacity <= 0:
raise Exception("Invalid capacity.")
elif threshold <= 0:
raise Exception("Invalid threshold.")
self.capacity = capa... | 29.183007 | 151 | 0.543785 |
a77978907edb35f9acbd264bff07b5f8d42056ff | 15,152 | py | Python | services/agglomerative.py | saumyaborwankar/self_supervised_AHC | ae8595c9e33383eacd1172917603c6cc4f34218e | [
"Apache-2.0"
] | null | null | null | services/agglomerative.py | saumyaborwankar/self_supervised_AHC | ae8595c9e33383eacd1172917603c6cc4f34218e | [
"Apache-2.0"
] | null | null | null | services/agglomerative.py | saumyaborwankar/self_supervised_AHC | ae8595c9e33383eacd1172917603c6cc4f34218e | [
"Apache-2.0"
] | 1 | 2020-09-25T03:39:23.000Z | 2020-09-25T03:39:23.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 30 15:51:43 2019
@author: prachi singh
@email: prachisingh@iisc.ac.in
"""
import numpy as np
import argparse
import sys
import os
import matplotlib.pyplot as plt
import pickle
from pdb import set_trace as bp
import subprocess
import scipy.io as s... | 39.664921 | 145 | 0.559068 |
7172cd8b809a14e5609ca8886ddafa23d097ff3e | 9,321 | py | Python | tests/terraform/graph/checks/test_yaml_policies.py | santoshankr/checkov | 1f7f46f38b4317718a7a38dbdd877430d963269f | [
"Apache-2.0"
] | null | null | null | tests/terraform/graph/checks/test_yaml_policies.py | santoshankr/checkov | 1f7f46f38b4317718a7a38dbdd877430d963269f | [
"Apache-2.0"
] | null | null | null | tests/terraform/graph/checks/test_yaml_policies.py | santoshankr/checkov | 1f7f46f38b4317718a7a38dbdd877430d963269f | [
"Apache-2.0"
] | null | null | null | import json
import os
import unittest
import warnings
import yaml
from checkov.terraform import checks
from checkov.common.checks_infra.checks_parser import NXGraphCheckParser
from checkov.common.checks_infra.registry import Registry
from checkov.common.models.enums import CheckResult
from typing import List
from path... | 37.135458 | 119 | 0.719022 |
9f08f319ee4816da5c40e6b9a8458dcb476c8401 | 1,165 | py | Python | 18. Exam Prep/problem_02.py | elenaborisova/Python-Advanced | 4c266d81f294372c3599741e8ba53f59fdc834c5 | [
"MIT"
] | 2 | 2021-04-04T06:26:13.000Z | 2022-02-18T22:21:49.000Z | 18. Exam Prep/problem_02.py | elenaborisova/Python-Advanced | 4c266d81f294372c3599741e8ba53f59fdc834c5 | [
"MIT"
] | null | null | null | 18. Exam Prep/problem_02.py | elenaborisova/Python-Advanced | 4c266d81f294372c3599741e8ba53f59fdc834c5 | [
"MIT"
] | 3 | 2021-02-01T12:32:03.000Z | 2021-04-12T13:45:20.000Z | def search_matrix(matrix, size, search):
for row in range(size):
for col in range(size):
if matrix[row][col] == search:
return row, col
def move(command, curr_pos):
row, col = curr_pos[0], curr_pos[1]
if command == 'up':
row -= 1
elif command == 'down':
... | 22.403846 | 51 | 0.591416 |
426a41d0dba8a381f29b7c9698bb347769327775 | 5,943 | py | Python | io/make_tfrecord_shapenet_onehot.py | zb12138/sph3dR | 8d7cec5fe97ec0e5134c8a0dd2bddddd2a57a1aa | [
"MIT"
] | 153 | 2019-09-23T01:39:08.000Z | 2021-08-19T11:38:20.000Z | io/make_tfrecord_shapenet_onehot.py | zb12138/sph3dR | 8d7cec5fe97ec0e5134c8a0dd2bddddd2a57a1aa | [
"MIT"
] | 16 | 2019-09-23T16:49:36.000Z | 2020-12-08T13:32:54.000Z | io/make_tfrecord_shapenet_onehot.py | zb12138/sph3dR | 8d7cec5fe97ec0e5134c8a0dd2bddddd2a57a1aa | [
"MIT"
] | 30 | 2019-09-25T07:24:07.000Z | 2021-02-13T03:29:04.000Z | import numpy as np
import tensorflow as tf
import os, sys
import glob
import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--data_path', required=True, help='path to the directory of the point cloud dataset')
INFO = parser.parse_args()
dataDir = INFO.data_path
print(INFO,dataDir)
root_d... | 38.843137 | 110 | 0.609961 |
5a28f2a1324af935a3eb1045ca933088df561faf | 621 | py | Python | code/dpp/distributions/mixture_same_family.py | yamacisik/ifl-tpp | 7076f43ed359d4e04816b7cc3c39fdb8d8b97ada | [
"MIT"
] | 53 | 2019-09-27T04:46:01.000Z | 2022-02-25T17:59:49.000Z | code/dpp/distributions/mixture_same_family.py | yamacisik/ifl-tpp | 7076f43ed359d4e04816b7cc3c39fdb8d8b97ada | [
"MIT"
] | 17 | 2019-12-12T18:38:05.000Z | 2022-03-25T00:24:40.000Z | code/dpp/distributions/mixture_same_family.py | yamacisik/ifl-tpp | 7076f43ed359d4e04816b7cc3c39fdb8d8b97ada | [
"MIT"
] | 26 | 2019-10-23T21:53:26.000Z | 2022-03-05T04:03:15.000Z | import torch
from torch.distributions import MixtureSameFamily as TorchMixtureSameFamily
class MixtureSameFamily(TorchMixtureSameFamily):
def log_cdf(self, x):
x = self._pad(x)
log_cdf_x = self.component_distribution.log_cdf(x)
mix_logits = self.mixture_distribution.logits
return t... | 36.529412 | 75 | 0.727858 |
286c85c1ca399c2efeefa73af19764c38abac05f | 4,329 | py | Python | rpxdock/tests/app/test_options.py | willsheffler/tcdock | c7b8614221f4a94750054bfe5dfb12298e8d05b8 | [
"Apache-2.0"
] | 6 | 2020-09-08T09:31:52.000Z | 2022-03-29T09:53:30.000Z | rpxdock/tests/app/test_options.py | willsheffler/tcdock | c7b8614221f4a94750054bfe5dfb12298e8d05b8 | [
"Apache-2.0"
] | 9 | 2020-04-13T21:11:50.000Z | 2022-03-09T00:57:37.000Z | rpxdock/tests/app/test_options.py | willsheffler/tcdock | c7b8614221f4a94750054bfe5dfb12298e8d05b8 | [
"Apache-2.0"
] | 3 | 2020-04-13T20:04:20.000Z | 2021-12-16T22:43:50.000Z | import sys, pytest, rpxdock as rp
from rpxdock.app.options import *
def test_defaults():
kw = defaults()
print(kw)
assert kw.wts.rpx == 1.0
assert kw.wts.hole == 1.0
assert kw.inputs == []
def test_get_cli_args():
sys.argv = "prog --inputs foo bar baz".split()
kw = get_cli_args()
assert kw.inp... | 32.066667 | 89 | 0.63271 |
875df993935aa53d96a5d6ad74f822b7554976a5 | 3,940 | py | Python | opwen_email_server/integration/celery.py | adamsclafani/opwen-cloudserver | e4060f1b4796f41a194b759567a287d6e89b4409 | [
"Apache-2.0"
] | null | null | null | opwen_email_server/integration/celery.py | adamsclafani/opwen-cloudserver | e4060f1b4796f41a194b759567a287d6e89b4409 | [
"Apache-2.0"
] | null | null | null | opwen_email_server/integration/celery.py | adamsclafani/opwen-cloudserver | e4060f1b4796f41a194b759567a287d6e89b4409 | [
"Apache-2.0"
] | null | null | null | from celery import Celery
from opwen_email_server import config
from opwen_email_server.actions import IndexReceivedEmailForMailbox
from opwen_email_server.actions import IndexSentEmailForMailbox
from opwen_email_server.actions import RegisterClient
from opwen_email_server.actions import SendOutboundEmails
from opwen_... | 32.561983 | 85 | 0.770051 |
15eed90cdfc4e5c0d73467179e6ed8a9f4abe3b4 | 1,004 | py | Python | plugins/holland.backup.mysql_lvm/setup.py | crishoj/holland | 77dcfe9f23d4254e4c351cdc18f29a8d34945812 | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.backup.mysql_lvm/setup.py | crishoj/holland | 77dcfe9f23d4254e4c351cdc18f29a8d34945812 | [
"BSD-3-Clause"
] | null | null | null | plugins/holland.backup.mysql_lvm/setup.py | crishoj/holland | 77dcfe9f23d4254e4c351cdc18f29a8d34945812 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import find_packages, setup
version = "1.2.9"
setup(
name="holland.backup.mysql_lvm",
version=version,
description="MySQL/LVM Snapshot Plugin",
long_description="""\
This script provides support for performing safe LVM snapshot backups
for MySQL data... | 30.424242 | 82 | 0.671315 |
c33455cb87f9df05231cb385165dbe5f31ac417c | 482 | py | Python | data/scripts/templates/object/tangible/medicine/crafted/shared_medpack_grenade_damage_c.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/medicine/crafted/shared_medpack_grenade_damage_c.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/medicine/crafted/shared_medpack_grenade_damage_c.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/medicine/crafted/shared_medpack_grenade_damage_c.iff"
result.attrib... | 28.352941 | 89 | 0.746888 |
276a76237793575ce8e0aa5dcbaa591ccc4bfc17 | 456 | py | Python | SSBW/Tareas/Tarea8/restaurantes/appRestaurants/forms.py | jmanday/Master | 388ee71d04a3fb1f64ed4b2d1164f1b5ec45179f | [
"Apache-2.0"
] | 1 | 2017-03-21T17:57:22.000Z | 2017-03-21T17:57:22.000Z | SSBW/Tareas/Tarea8/restaurantes/appRestaurants/forms.py | jmanday/Master | 388ee71d04a3fb1f64ed4b2d1164f1b5ec45179f | [
"Apache-2.0"
] | 28 | 2016-10-16T19:42:37.000Z | 2018-09-14T21:29:48.000Z | SSBW/Tareas/Tarea8/restaurantes/appRestaurants/forms.py | jmanday/Master | 388ee71d04a3fb1f64ed4b2d1164f1b5ec45179f | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.forms import ModelForm
class AddRestaurant(forms.Form):
name = forms.CharField(label='Nombre', max_length=50)
id_restaurant = forms.CharField(label='Identificador', max_length=8)
direc = forms.CharField(label='Dirección', max_length=50)
zipcode = forms.CharField(lab... | 41.454545 | 72 | 0.745614 |
6b27e0b24c3fc798db20b353a4a105437a0afbf6 | 9,413 | py | Python | src/transformers/commands/add_new_model.py | ashokei/transformers | 5e637e6c690e45d13ebf7296e1ea9dcc188d0f07 | [
"Apache-2.0"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | src/transformers/commands/add_new_model.py | tutussss/transformers | 67ff1c314a61a2d5949b3bb48fa3ec7e9b697d7e | [
"Apache-2.0"
] | 1 | 2021-08-03T12:23:01.000Z | 2021-08-10T08:35:22.000Z | src/transformers/commands/add_new_model.py | tutussss/transformers | 67ff1c314a61a2d5949b3bb48fa3ec7e9b697d7e | [
"Apache-2.0"
] | 3 | 2021-09-19T08:20:42.000Z | 2022-02-19T16:32:40.000Z | # Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 40.926087 | 119 | 0.619781 |
08ba5bd9602ec96c9f818e3025281cb9a6a824c3 | 5,921 | py | Python | DCM_Python_Code/VOO.py | abdul-gendy/Pacemaker | 8dc7864fffc936c3324bffac4b1b20bf34b9785b | [
"MIT"
] | null | null | null | DCM_Python_Code/VOO.py | abdul-gendy/Pacemaker | 8dc7864fffc936c3324bffac4b1b20bf34b9785b | [
"MIT"
] | null | null | null | DCM_Python_Code/VOO.py | abdul-gendy/Pacemaker | 8dc7864fffc936c3324bffac4b1b20bf34b9785b | [
"MIT"
] | 1 | 2022-03-11T06:57:01.000Z | 2022-03-11T06:57:01.000Z | from tkinter import *
def VOO(user):
voo = Tk()
voo.title("VOO")
voo.geometry("800x300")
parameters = Label(voo, text="Parameters")
parameters.grid(row=1, column=1, columnspan=2)
f = font.Font(parameters, parameters.cget("font"))
f.configure(underline=True)
parameters.configure(font=... | 30.678756 | 97 | 0.548387 |
e0ac240f12a353a86bbd9bf5aa1c2d52fd20dd44 | 6,467 | py | Python | src/passpredict/observers/orbit_predictor.py | samtx/pass-predictor | 6577f75cd7d64bd3c12a9512880d4b29c2682b4c | [
"MIT"
] | null | null | null | src/passpredict/observers/orbit_predictor.py | samtx/pass-predictor | 6577f75cd7d64bd3c12a9512880d4b29c2682b4c | [
"MIT"
] | null | null | null | src/passpredict/observers/orbit_predictor.py | samtx/pass-predictor | 6577f75cd7d64bd3c12a9512880d4b29c2682b4c | [
"MIT"
] | null | null | null | from __future__ import annotations
import datetime
import typing
from math import radians, pi
import numpy as np
from scipy.optimize import root_scalar
from .core import BasicPassInfo, PassType
from .functions import make_utc, visual_pass_details
from .._time import datetime2mjd
from ..constants import R_EARTH
from .... | 35.338798 | 99 | 0.578475 |
055013bb7616cc2fe5608a8cf98136d1cf9de19d | 3,106 | py | Python | scripts/cluster_fits.py | flaviovdf/phoenix | 59177657f13337b14d1fe27527a9b09c2c1c1419 | [
"BSD-3-Clause"
] | 1 | 2019-06-24T17:42:10.000Z | 2019-06-24T17:42:10.000Z | scripts/cluster_fits.py | flaviovdf/phoenix | 59177657f13337b14d1fe27527a9b09c2c1c1419 | [
"BSD-3-Clause"
] | null | null | null | scripts/cluster_fits.py | flaviovdf/phoenix | 59177657f13337b14d1fe27527a9b09c2c1c1419 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8
from __future__ import division, print_function
from collections import OrderedDict
from matplotlib import pyplot as plt
import json
import numpy as np
import os
import plac
import sys
def get_fits(input_fpath):
parameters = OrderedDict()
with open(input_fpath) as... | 25.048387 | 63 | 0.529942 |
9f128d89778954da92e70f91dd00fb93ac47289e | 3,097 | py | Python | salt/utils/boto_elb_tag.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | salt/utils/boto_elb_tag.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | salt/utils/boto_elb_tag.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
#
# 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... | 36.435294 | 74 | 0.631256 |
bd7208a83cbbf70db8fc27535d30e6b93a9f4345 | 642 | py | Python | session2/parantheses1.py | MrCsabaToth/IK | 713f91c28af7b4a964ba854ede9fec73bf0c4682 | [
"Apache-2.0"
] | null | null | null | session2/parantheses1.py | MrCsabaToth/IK | 713f91c28af7b4a964ba854ede9fec73bf0c4682 | [
"Apache-2.0"
] | null | null | null | session2/parantheses1.py | MrCsabaToth/IK | 713f91c28af7b4a964ba854ede9fec73bf0c4682 | [
"Apache-2.0"
] | null | null | null | def parantheses_helper(opener, closer, n, slate):
# Backtracking
# if closer < opener:
# return []
# Leaf node
if opener == 0 and closer == 0:
return ["".join(slate)]
result = []
# Internal node
# Opener
if opener > 0:
slate.append("(")
result.extend(par... | 22.137931 | 71 | 0.570093 |
ab1283bf413911c4de2beb65c19943fa57ae2192 | 67 | py | Python | xdb/__main__.py | walkerever/pydbx | c8a167eb2aec3b40273feff01b7d8c2edd02034b | [
"MIT"
] | null | null | null | xdb/__main__.py | walkerever/pydbx | c8a167eb2aec3b40273feff01b7d8c2edd02034b | [
"MIT"
] | null | null | null | xdb/__main__.py | walkerever/pydbx | c8a167eb2aec3b40273feff01b7d8c2edd02034b | [
"MIT"
] | null | null | null | from . import xdb_main
if __name__ == "__main__" :
xdb_main()
| 13.4 | 27 | 0.656716 |
36a5beb8d8558f10d659691fc0654a2c508c1335 | 8,945 | py | Python | cumulusci/tests/util.py | SalesforceFoundation/CumulusCI | f7811a881939ef86c10ccb9b2d7ec8d7af73fd1c | [
"BSD-3-Clause"
] | 109 | 2015-01-20T14:28:48.000Z | 2018-08-31T12:12:39.000Z | cumulusci/tests/util.py | SalesforceFoundation/CumulusCI | f7811a881939ef86c10ccb9b2d7ec8d7af73fd1c | [
"BSD-3-Clause"
] | 365 | 2015-01-07T19:54:25.000Z | 2018-09-11T15:10:02.000Z | cumulusci/tests/util.py | SalesforceFoundation/CumulusCI | f7811a881939ef86c10ccb9b2d7ec8d7af73fd1c | [
"BSD-3-Clause"
] | 125 | 2015-01-17T16:05:39.000Z | 2018-09-06T19:05:00.000Z | import copy
import gc
import json
import os
import random
import sys
import tracemalloc
from contextlib import contextmanager, nullcontext
from functools import lru_cache
from pathlib import Path
from unittest import mock
import responses
import yaml
from requests import ReadTimeout
from cumulusci.core.config import ... | 27.608025 | 90 | 0.654779 |
8f1b72a41105b7357461fe0a1e032528737a2da6 | 1,076 | py | Python | python-backend/app/api/applications/resources/application_status_code.py | pdittaro/mds | ecec7f2d1ca91c702043475c615fcc727f287c9d | [
"Apache-2.0"
] | null | null | null | python-backend/app/api/applications/resources/application_status_code.py | pdittaro/mds | ecec7f2d1ca91c702043475c615fcc727f287c9d | [
"Apache-2.0"
] | null | null | null | python-backend/app/api/applications/resources/application_status_code.py | pdittaro/mds | ecec7f2d1ca91c702043475c615fcc727f287c9d | [
"Apache-2.0"
] | 1 | 2020-01-22T14:19:16.000Z | 2020-01-22T14:19:16.000Z | from flask_restplus import Resource, reqparse, fields
from flask import request
from datetime import datetime
from app.extensions import api
from ..models.application_status_code import ApplicationStatusCode
from app.api.utils.resources_mixins import UserMixin, ErrorMixin
from app.api.utils.access_decorators import re... | 35.866667 | 100 | 0.753717 |
ae008275aad4a3c3841e0552079ee9ee6fd8121a | 376 | py | Python | regular_expressions/web_scraper.py | jeffbarnette/Python-One-Liners | 81180bb3a29de09a2a5f91576cbb9e424d23effe | [
"MIT"
] | null | null | null | regular_expressions/web_scraper.py | jeffbarnette/Python-One-Liners | 81180bb3a29de09a2a5f91576cbb9e424d23effe | [
"MIT"
] | null | null | null | regular_expressions/web_scraper.py | jeffbarnette/Python-One-Liners | 81180bb3a29de09a2a5f91576cbb9e424d23effe | [
"MIT"
] | null | null | null | """Example of a Web Scraper using Regular Expressions"""
# Dependencies
import re
# Data
text_1 = "crypto-bot that is trading Bitcoin and other currencies"
text_2 = "cryptographic encryption methods that can be cracked easily with quantum computers"
# One-Liner
pattern = re.compile("crypto(.{1,30})coin")
# Result
p... | 25.066667 | 93 | 0.763298 |
3a03e66c53df3cefb14f13a7a86879f51ec9446e | 53,220 | py | Python | awx/main/management/commands/inventory_import.py | cvick/awx | f7effd82dcacab5f0cedf3f7e5312f4ea7cada0f | [
"Apache-2.0"
] | null | null | null | awx/main/management/commands/inventory_import.py | cvick/awx | f7effd82dcacab5f0cedf3f7e5312f4ea7cada0f | [
"Apache-2.0"
] | null | null | null | awx/main/management/commands/inventory_import.py | cvick/awx | f7effd82dcacab5f0cedf3f7e5312f4ea7cada0f | [
"Apache-2.0"
] | 1 | 2019-09-17T04:35:27.000Z | 2019-09-17T04:35:27.000Z | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import json
import logging
import os
import re
import subprocess
import sys
import time
import traceback
import shutil
# Django
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.core.excepti... | 49.878163 | 143 | 0.6059 |
69e09499409fbbc95dc932b733140d82a41f43e1 | 1,309 | py | Python | fixture/session.py | SergeyTsiganovskiy/python_training | b851da7bac8d3b787358693e7caef6fae0e4b632 | [
"Apache-2.0"
] | null | null | null | fixture/session.py | SergeyTsiganovskiy/python_training | b851da7bac8d3b787358693e7caef6fae0e4b632 | [
"Apache-2.0"
] | null | null | null | fixture/session.py | SergeyTsiganovskiy/python_training | b851da7bac8d3b787358693e7caef6fae0e4b632 | [
"Apache-2.0"
] | null | null | null | class SessionHelper:
def __init__(self, app):
self.app = app
def login(self, username, password):
wd = self.app.wd
self.app.open_home_page()
wd.find_element_by_name("user").click()
wd.find_element_by_name("user").clear()
wd.find_element_by_name("user").send_keys... | 31.926829 | 91 | 0.600458 |
e78fd26caf82d0e056ce789d2d63c9f0d3b94ac7 | 371 | py | Python | RasPi_Dev/ros_ws/build/third_packages/rbx1/rbx1_vision/catkin_generated/pkg.installspace.context.pc.py | QianheYu/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T03:31:15.000Z | 2022-03-11T03:31:15.000Z | RasPi_Dev/ros_ws/build/third_packages/rbx1/rbx1_vision/catkin_generated/pkg.installspace.context.pc.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | RasPi_Dev/ros_ws/build/third_packages/rbx1/rbx1_vision/catkin_generated/pkg.installspace.context.pc.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "rbx1_vision"
PROJECT_SPACE_DIR = "/ho... | 41.222222 | 68 | 0.703504 |
047185dfecc42d9828eaa16724239aa0e64d7a66 | 831 | py | Python | mat/mat/modules/ios/static/prepared_statements.py | minkione/mat | 8aaec2c9abbc1b837749e5fb084df4665e7ec35c | [
"BSD-3-Clause"
] | null | null | null | mat/mat/modules/ios/static/prepared_statements.py | minkione/mat | 8aaec2c9abbc1b837749e5fb084df4665e7ec35c | [
"BSD-3-Clause"
] | null | null | null | mat/mat/modules/ios/static/prepared_statements.py | minkione/mat | 8aaec2c9abbc1b837749e5fb084df4665e7ec35c | [
"BSD-3-Clause"
] | 1 | 2019-09-21T16:12:04.000Z | 2019-09-21T16:12:04.000Z | import re
from mat.utils.utils import Utils, Issue
class Issue(Issue):
TITLE = 'Prepared Statements Check'
DESCRIPTION = 'Checks if the application does not use prepared statements'
ID = 'prepared-statements'
ISSUE_TITLE = 'Application Does Not Use Prepared Statements'
FINDINGS ... | 33.24 | 109 | 0.695548 |
48e3b0ec42c0e1de2ecb6c127ab07dcae5d1d3d3 | 5,418 | py | Python | python/cudf/cudf/tests/test_avro_reader_fastavro_integration.py | gdaisukesuzuki/cudf | aa5c8b686b1513dba7bce168200c1259f1eda908 | [
"Apache-2.0"
] | 1 | 2021-08-19T15:45:01.000Z | 2021-08-19T15:45:01.000Z | python/cudf/cudf/tests/test_avro_reader_fastavro_integration.py | gdaisukesuzuki/cudf | aa5c8b686b1513dba7bce168200c1259f1eda908 | [
"Apache-2.0"
] | 1 | 2020-04-03T20:46:09.000Z | 2020-04-20T15:22:10.000Z | python/cudf/cudf/tests/test_avro_reader_fastavro_integration.py | gdaisukesuzuki/cudf | aa5c8b686b1513dba7bce168200c1259f1eda908 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA 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... | 25.8 | 78 | 0.625508 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.