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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c13c401217c12d0e3291f65386d9252a05952acb | 2,861 | py | Python | common/xrd-ui-tests-python/tests/xroad_trust_view_details_cs_settings/view_management.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 3 | 2018-03-15T14:22:50.000Z | 2021-11-08T10:30:35.000Z | common/xrd-ui-tests-python/tests/xroad_trust_view_details_cs_settings/view_management.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 11 | 2017-04-06T09:25:41.000Z | 2018-06-04T09:08:48.000Z | common/xrd-ui-tests-python/tests/xroad_trust_view_details_cs_settings/view_management.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 20 | 2017-03-14T07:21:58.000Z | 2019-05-21T09:26:30.000Z | # coding=utf-8
from selenium.webdriver.common.by import By
from view_models import certification_services, sidebar, ss_system_parameters
import re
import time
def test_ca_cs_details_view_cert(case, profile_class=None):
'''
:param case: MainController object
:param profile_class: string The fully qualifie... | 40.295775 | 201 | 0.717581 |
b294f8f6c9cd7847a4cd0ffd68933db492719f39 | 2,456 | py | Python | napari_manual_split_and_merge_labels/_function.py | haesleinhuepf/napari-manual-split-and-merge-labels | b43e3d6bed10b66eb443fd4b0aa686ab2cb66f3c | [
"BSD-3-Clause"
] | 4 | 2021-08-02T13:03:33.000Z | 2021-12-17T19:14:29.000Z | napari_manual_split_and_merge_labels/_function.py | haesleinhuepf/napari-manual-split-and-merge-labels | b43e3d6bed10b66eb443fd4b0aa686ab2cb66f3c | [
"BSD-3-Clause"
] | 1 | 2022-01-18T13:32:07.000Z | 2022-01-18T14:15:19.000Z | napari_manual_split_and_merge_labels/_function.py | haesleinhuepf/napari-manual-split-and-merge-labels | b43e3d6bed10b66eb443fd4b0aa686ab2cb66f3c | [
"BSD-3-Clause"
] | 2 | 2021-07-29T05:22:06.000Z | 2022-01-18T10:43:21.000Z | from typing import TYPE_CHECKING
import numpy as np
from napari_plugin_engine import napari_hook_implementation
from napari_tools_menu import register_function
import napari
# This is the actual plugin function, where we export our function
# (The functions themselves are defined below)
@napari_hook_implementation
d... | 33.643836 | 122 | 0.714984 |
3ffc62aadcfe403e110cc37f069286f306598e52 | 6,089 | py | Python | designate/api/v2/controllers/rest.py | Woody89/designate-private | 0a6ed5a1d7cdac5cb1e9dec8fd3ddfb9a77c58f5 | [
"Apache-2.0"
] | null | null | null | designate/api/v2/controllers/rest.py | Woody89/designate-private | 0a6ed5a1d7cdac5cb1e9dec8fd3ddfb9a77c58f5 | [
"Apache-2.0"
] | null | null | null | designate/api/v2/controllers/rest.py | Woody89/designate-private | 0a6ed5a1d7cdac5cb1e9dec8fd3ddfb9a77c58f5 | [
"Apache-2.0"
] | 1 | 2019-11-16T10:55:49.000Z | 2019-11-16T10:55:49.000Z | # flake8: noqa
# Copyright (c) <2011>, Jonathan LaCour
# 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... | 38.537975 | 79 | 0.66267 |
46772ad7548bd1fffd521432640c8c7904415b2d | 2,275 | py | Python | aloe/aloe/common/plot_2d.py | muell-monster/google-research | 04d2024f4723bc4be3d639a668c19fb1f6a31478 | [
"Apache-2.0"
] | 3 | 2021-01-18T04:46:49.000Z | 2021-03-05T09:21:40.000Z | aloe/aloe/common/plot_2d.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 7 | 2021-11-10T19:44:38.000Z | 2022-02-10T06:48:39.000Z | aloe/aloe/common/plot_2d.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 4 | 2021-02-08T10:25:45.000Z | 2021-04-17T14:46:26.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 30.743243 | 74 | 0.635165 |
597e717a8bd908f602603a195ec1538253c85daa | 257 | py | Python | example.py | TechieDheeraj/clrprint | 7214524fef2441cbd4e4ec37326e2e341e3077e7 | [
"MIT"
] | 32 | 2020-07-15T16:05:33.000Z | 2022-03-16T13:47:37.000Z | example.py | TechieDheeraj/clrprint | 7214524fef2441cbd4e4ec37326e2e341e3077e7 | [
"MIT"
] | 2 | 2021-09-20T14:27:01.000Z | 2022-01-21T16:00:22.000Z | example.py | TechieDheeraj/clrprint | 7214524fef2441cbd4e4ec37326e2e341e3077e7 | [
"MIT"
] | 3 | 2021-07-04T09:54:29.000Z | 2021-09-28T15:52:48.000Z | from clrprint import *
clrhelp()
clr = clrinput("Choose any color: ").strip()
clrprint("This is the color choosen by you",clr=clr)
clr = clrinput("Choose 3 colors separated with <space> :").strip().split(' ')
clrprint("color1","color2","color3",clr=clr)
| 25.7 | 77 | 0.696498 |
773bcd77b68a0daa87ba795796fb741805cae17f | 1,567 | py | Python | tests/test_700_jscall.py | icarito/guy | 9477b548b91ae81bfc327dac7ba1ec80804f4f8d | [
"Apache-2.0"
] | null | null | null | tests/test_700_jscall.py | icarito/guy | 9477b548b91ae81bfc327dac7ba1ec80804f4f8d | [
"Apache-2.0"
] | null | null | null | tests/test_700_jscall.py | icarito/guy | 9477b548b91ae81bfc327dac7ba1ec80804f4f8d | [
"Apache-2.0"
] | null | null | null |
from guy import Guy,JSException
def test_jscall(runner):
class W1(Guy):
__doc__="""
<script>
var ll=[];
function adds(a,b) {
ll.push(a)
ll.push(b)
return a+b
}
function makeAnError() {
callInError(); // raise an exce... | 25.274194 | 112 | 0.45501 |
2affe96a177722fac83160d8521934a2141cb29a | 3,856 | py | Python | tools/mo/openvino/tools/mo/utils/runtime_info.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 1 | 2021-02-01T06:35:55.000Z | 2021-02-01T06:35:55.000Z | tools/mo/openvino/tools/mo/utils/runtime_info.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 58 | 2020-11-06T12:13:45.000Z | 2022-03-28T13:20:11.000Z | tools/mo/openvino/tools/mo/utils/runtime_info.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 2 | 2021-07-14T07:40:50.000Z | 2021-07-27T01:40:03.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import abc
from collections import defaultdict
from typing import Dict
import numpy as np
from openvino.tools.mo.front.common.partial_infer.utils import int64_array
from openvino.tools.mo.middle.passes.convert_data_type import np_data_... | 29.435115 | 119 | 0.647303 |
93679ae8a6346ea3f96daa3d7ada57c8c0246d1c | 2,090 | py | Python | galaxy/util/odict.py | jmchilton/pulsar | 783b90cf0bce893a11c347fcaf6778b98e0bb062 | [
"Apache-2.0"
] | 1 | 2016-08-17T06:36:03.000Z | 2016-08-17T06:36:03.000Z | galaxy/util/odict.py | jmchilton/pulsar | 783b90cf0bce893a11c347fcaf6778b98e0bb062 | [
"Apache-2.0"
] | null | null | null | galaxy/util/odict.py | jmchilton/pulsar | 783b90cf0bce893a11c347fcaf6778b98e0bb062 | [
"Apache-2.0"
] | null | null | null | """
Ordered dictionary implementation.
"""
from UserDict import UserDict
class odict(UserDict):
"""
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
This dictionary class extends UserDict to record the order in which items are
added. Calling keys(), values(), items(), etc. will return ... | 24.022989 | 81 | 0.583254 |
e5df7205188c560831f70698f2e0addaddef4bb4 | 2,928 | py | Python | bigml/anomalytree.py | ayush1208/python-3 | 8b613225142bbe1dce8fda5c7f8d3acf07c181a7 | [
"Apache-2.0"
] | null | null | null | bigml/anomalytree.py | ayush1208/python-3 | 8b613225142bbe1dce8fda5c7f8d3acf07c181a7 | [
"Apache-2.0"
] | null | null | null | bigml/anomalytree.py | ayush1208/python-3 | 8b613225142bbe1dce8fda5c7f8d3acf07c181a7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2014-2018 BigML
#
# 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 requi... | 34.046512 | 79 | 0.633197 |
0a3bbfd9b2ce8010c30ef98b2784572dbd61f0bf | 5,103 | py | Python | jax/_src/lax/fft.py | sarahbton/jax | 4f32a4f236547c8bb389d7b4afcc2d2ce7589a4c | [
"Apache-2.0"
] | null | null | null | jax/_src/lax/fft.py | sarahbton/jax | 4f32a4f236547c8bb389d7b4afcc2d2ce7589a4c | [
"Apache-2.0"
] | null | null | null | jax/_src/lax/fft.py | sarahbton/jax | 4f32a4f236547c8bb389d7b4afcc2d2ce7589a4c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.714286 | 87 | 0.732902 |
cff47720811850c16a46d20888f54c8789fd05aa | 8,229 | py | Python | tests/impls/descriptor_generator/test_pytorch.py | joshanderson-kw/SMQTK-Descriptors | f5ca44be0d9c93779e2b323a28843db28341a2d5 | [
"BSD-3-Clause"
] | null | null | null | tests/impls/descriptor_generator/test_pytorch.py | joshanderson-kw/SMQTK-Descriptors | f5ca44be0d9c93779e2b323a28843db28341a2d5 | [
"BSD-3-Clause"
] | null | null | null | tests/impls/descriptor_generator/test_pytorch.py | joshanderson-kw/SMQTK-Descriptors | f5ca44be0d9c93779e2b323a28843db28341a2d5 | [
"BSD-3-Clause"
] | null | null | null | import os
import pickle
from typing import Any, Dict
import unittest
import unittest.mock as mock
import numpy as np
from smqtk_core.configuration import configuration_test_helper, make_default_config
from smqtk_dataprovider.impls.data_element.file import DataFileElement
from smqtk_image_io import ImageReader
from sm... | 44.967213 | 90 | 0.607972 |
a79f4ae9d23cfddd09607334a80e7766cb4d4a48 | 2,390 | py | Python | venv/Lib/site-packages/tensorflow/_api/v2/saved_model/__init__.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | 2 | 2020-09-30T00:11:09.000Z | 2021-10-04T13:00:38.000Z | venv/lib/python3.6/site-packages/tensorflow_core/_api/v2/saved_model/__init__.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/tensorflow_core/_api/v2/saved_model/__init__.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | 1 | 2020-06-28T11:47:47.000Z | 2020-06-28T11:47:47.000Z | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.saved_model namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from tensorflow.python.saved_model.constants import ASSETS_DIRE... | 58.292683 | 95 | 0.891213 |
fa6592321622c39bf68313ea21a71c0ba96be05c | 921 | py | Python | blogapi/routers.py | mohammadanarul/drf-blog-api | 25d6d72235b2d995639ac1eed5367cf6a8a1535c | [
"MIT"
] | null | null | null | blogapi/routers.py | mohammadanarul/drf-blog-api | 25d6d72235b2d995639ac1eed5367cf6a8a1535c | [
"MIT"
] | null | null | null | blogapi/routers.py | mohammadanarul/drf-blog-api | 25d6d72235b2d995639ac1eed5367cf6a8a1535c | [
"MIT"
] | null | null | null | from rest_framework.routers import DefaultRouter
from accounts.views import AccountModelViewset
from posts.views import PostModelViewset
from comments.views import CommentViewSet
from category.views import CategoryModelViewset
from reports.views import PostReportModelViewset
from likes.views import LikeModelViewset
fro... | 46.05 | 75 | 0.839305 |
6f8aea72e93ea157ae2c4c5815b4039df739b50b | 955 | py | Python | vendor-local/lib/python/celery/loaders/__init__.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 1 | 2015-07-13T03:29:04.000Z | 2015-07-13T03:29:04.000Z | vendor-local/lib/python/celery/loaders/__init__.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 2 | 2015-03-03T23:02:19.000Z | 2019-03-30T04:45:51.000Z | vendor-local/lib/python/celery/loaders/__init__.py | Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695 | bf6a382913901ad193d907f022086931df0de8c4 | [
"BSD-3-Clause"
] | 2 | 2016-04-15T11:43:05.000Z | 2016-04-15T11:43:15.000Z | # -*- coding: utf-8 -*-
"""
celery.loaders
~~~~~~~~~~~~~~
Loaders define how configuration is read, what happens
when workers start, when tasks are executed and so on.
"""
from __future__ import absolute_import
from celery._state import current_app
from celery.utils import deprecated
from celery.util... | 26.527778 | 61 | 0.686911 |
c53ca4e85509ee364361704b88585ccfe4dd9f49 | 757 | py | Python | safe_transaction_service/history/migrations/0026_auto_20201030_1355.py | byteflyfunny/safe-transaction-service | 2a1a855d9881181a57692057aeb91c9fd8ae3de5 | [
"MIT"
] | 67 | 2019-08-16T16:26:42.000Z | 2022-03-21T20:32:43.000Z | safe_transaction_service/history/migrations/0026_auto_20201030_1355.py | byteflyfunny/safe-transaction-service | 2a1a855d9881181a57692057aeb91c9fd8ae3de5 | [
"MIT"
] | 550 | 2019-07-11T12:09:06.000Z | 2022-03-31T16:32:00.000Z | safe_transaction_service/history/migrations/0026_auto_20201030_1355.py | byteflyfunny/safe-transaction-service | 2a1a855d9881181a57692057aeb91c9fd8ae3de5 | [
"MIT"
] | 83 | 2019-12-06T11:22:32.000Z | 2022-03-30T10:09:22.000Z | # Generated by Django 3.1.2 on 2020-10-30 13:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("history", "0025_auto_20201015_1147"),
]
operations = [
# Create btree index for EthereumEvents
migrations.RunSQL(
"CREATE INDEX ... | 32.913043 | 131 | 0.676354 |
8b35ea84035e6e9cc13c47dcba27fb27fac84514 | 507 | py | Python | setup.py | MentalBlood/sharpener | e931bc84cc80a86551388ec267e591513a689ac0 | [
"MIT"
] | null | null | null | setup.py | MentalBlood/sharpener | e931bc84cc80a86551388ec267e591513a689ac0 | [
"MIT"
] | null | null | null | setup.py | MentalBlood/sharpener | e931bc84cc80a86551388ec267e591513a689ac0 | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
if __name__ == '__main__':
long_description = ''
if os.path.exists('README.md'):
with open('README.md', encoding='utf-8') as f:
long_description = f.read()
setup(
name='sharpener',
version='1.0.0',
description='Handy profiling/benchmarking tool',
... | 19.5 | 50 | 0.706114 |
72b01d05af6c2821290c6f04c53dfab973ea22c7 | 6,765 | py | Python | lib/model/test.py | insigh/Faster-RCNN-Tensorflow | 4f446a4c1ebefcf6d92b5e01d2b6396bcbbf1a8d | [
"MIT"
] | null | null | null | lib/model/test.py | insigh/Faster-RCNN-Tensorflow | 4f446a4c1ebefcf6d92b5e01d2b6396bcbbf1a8d | [
"MIT"
] | 1 | 2019-04-04T14:19:40.000Z | 2019-04-06T03:32:22.000Z | lib/model/test.py | insigh/Faster-RCNN-Tensorflow | 4f446a4c1ebefcf6d92b5e01d2b6396bcbbf1a8d | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ impor... | 33.656716 | 101 | 0.597783 |
a13d4fbe17ce14eaec64b3f601a86a6cfc9a9b0f | 17,336 | py | Python | unicom-task/tenscf_rely/Cryptodome/SelfTest/Cipher/common.py | Charles-Hello/myScripts | 07f2d0fe51ab3581d812de64c57110bcad6219cd | [
"MIT"
] | 3 | 2021-12-06T15:35:58.000Z | 2021-12-06T15:57:18.000Z | unicom-task/tenscf_rely/Cryptodome/SelfTest/Cipher/common.py | Charles-Hello/myScripts | 07f2d0fe51ab3581d812de64c57110bcad6219cd | [
"MIT"
] | null | null | null | unicom-task/tenscf_rely/Cryptodome/SelfTest/Cipher/common.py | Charles-Hello/myScripts | 07f2d0fe51ab3581d812de64c57110bcad6219cd | [
"MIT"
] | 2 | 2022-03-21T13:13:50.000Z | 2022-03-24T15:09:59.000Z | # -*- coding: utf-8 -*-
#
# SelfTest/Hash/common.py: Common code for Cryptodome.SelfTest.Hash
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that ded... | 33.925636 | 113 | 0.59039 |
44b85bbe9237b9365ff1bbc9443d799ae82e816c | 4,381 | py | Python | get_lightcurve_data.py | Aparctias/lightcurve_fft | 34b0d25336fa7362d6036309cf2a5129af5d4bf9 | [
"Apache-2.0"
] | null | null | null | get_lightcurve_data.py | Aparctias/lightcurve_fft | 34b0d25336fa7362d6036309cf2a5129af5d4bf9 | [
"Apache-2.0"
] | null | null | null | get_lightcurve_data.py | Aparctias/lightcurve_fft | 34b0d25336fa7362d6036309cf2a5129af5d4bf9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#Get lightcurve points and periods.
import json
import os
MPC_SPINS="mpc_spins"
LIGHTCURVE_DIR="lightcurves"
DATASET_FILE="LIGHTCURVE_DATASET"
ERROR_FILE="light_errors"
def get_spins_dict():
data = []
with open(MPC_SPINS) as f:
data = json.load(f)
return dict((d['number'], d['... | 31.292857 | 78 | 0.55832 |
052d3a2aa78f7de43181a2fed858fe8b8596d355 | 3,233 | py | Python | backend/api/models.py | christian-japan-devs/vietcatholic-jp | 1a800f478584538cc5e21ddd5816894dff8bd90f | [
"MIT"
] | null | null | null | backend/api/models.py | christian-japan-devs/vietcatholic-jp | 1a800f478584538cc5e21ddd5816894dff8bd90f | [
"MIT"
] | 6 | 2021-05-29T04:39:00.000Z | 2021-07-04T00:40:15.000Z | backend/api/models.py | christian-japan-devs/vietcatholic-jp | 1a800f478584538cc5e21ddd5816894dff8bd90f | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
import sys
from PIL import Image
from io import BytesIO
from django.core.files.uploadedfile import InMemoryUploadedFile
from tinymce.models import HTMLField
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
... | 53.883333 | 150 | 0.769255 |
07dcbb1d2c3c582f5f8f83fa4c64d384ab0b1a43 | 3,825 | py | Python | idaes/gas_solid_contactors/properties/oxygen_iron_OC_oxidation/tests/test_CLC_solid_prop.py | eslickj/idaes-pse | 328ed07ffb0b4d98c03e972675ea32c41dd2531a | [
"RSA-MD"
] | 112 | 2019-02-11T23:16:36.000Z | 2022-03-23T20:59:57.000Z | idaes/gas_solid_contactors/properties/oxygen_iron_OC_oxidation/tests/test_CLC_solid_prop.py | eslickj/idaes-pse | 328ed07ffb0b4d98c03e972675ea32c41dd2531a | [
"RSA-MD"
] | 621 | 2019-03-01T14:44:12.000Z | 2022-03-31T19:49:25.000Z | idaes/gas_solid_contactors/properties/oxygen_iron_OC_oxidation/tests/test_CLC_solid_prop.py | eslickj/idaes-pse | 328ed07ffb0b4d98c03e972675ea32c41dd2531a | [
"RSA-MD"
] | 154 | 2019-02-01T23:46:33.000Z | 2022-03-23T15:07:10.000Z | #################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... | 34.459459 | 81 | 0.680261 |
8370ed6304b202b16dcc0dbf5d3965bb884d7053 | 5,328 | py | Python | qcdb/cov_radii.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | 1 | 2019-02-20T20:18:02.000Z | 2019-02-20T20:18:02.000Z | qcdb/cov_radii.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | null | null | null | qcdb/cov_radii.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | null | null | null | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | 41.625 | 80 | 0.468281 |
30f4e30db8de438a26bac6722860a964e982b23a | 1,263 | py | Python | phage/read_ends.py | linsalrob/EdwardsLab | 3d4eef1dda61c31ce8163d94d86f186275a6e4a4 | [
"MIT"
] | 30 | 2015-01-25T16:22:51.000Z | 2022-01-20T15:56:47.000Z | phage/read_ends.py | linsalrob/EdwardsLab | 3d4eef1dda61c31ce8163d94d86f186275a6e4a4 | [
"MIT"
] | 2 | 2020-04-13T15:00:37.000Z | 2020-09-23T12:35:59.000Z | phage/read_ends.py | linsalrob/EdwardsLab | 3d4eef1dda61c31ce8163d94d86f186275a6e4a4 | [
"MIT"
] | 24 | 2015-04-17T00:52:05.000Z | 2021-11-26T17:50:01.000Z | """
Extract the ends of sequences to a separate file
"""
import os
import sys
import argparse
from roblib import colours, stream_fastq
__author__ = 'Rob Edwards'
__copyright__ = 'Copyright 2020, BacterialProteins'
__credits__ = ['Rob Edwards']
__license__ = 'MIT'
__maintainer__ = 'Rob Edwards'
__email__ = 'raedwards@... | 25.77551 | 117 | 0.688836 |
8238fb50025a89ace71e80efecf4bcb3159a76f4 | 830 | py | Python | server/app/views/fits_category.py | Celeo/GETIN-Extra | 95c7b5a85f14c8c9bf1e2c728f36fef7bcafef68 | [
"MIT"
] | null | null | null | server/app/views/fits_category.py | Celeo/GETIN-Extra | 95c7b5a85f14c8c9bf1e2c728f36fef7bcafef68 | [
"MIT"
] | 1 | 2019-10-21T19:46:57.000Z | 2019-10-21T19:46:57.000Z | server/app/views/fits_category.py | Celeo/GETIN-Extras | 95c7b5a85f14c8c9bf1e2c728f36fef7bcafef68 | [
"MIT"
] | null | null | null | from flask import request
from flask_restful import Resource, marshal_with
from ..util import restrict_admin
from ..models import db, FitsCategory
class FitsCategoriesResource(Resource):
method_decorators = [restrict_admin]
@marshal_with(FitsCategory.resource_fields)
def get(self):
return FitsC... | 23.714286 | 69 | 0.674699 |
dd88c481b16d1c7661082548840671225fae7e18 | 1,790 | py | Python | tools/mo/openvino/tools/mo/front/mxnet/extractors/slice_axis.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | tools/mo/openvino/tools/mo/front/mxnet/extractors/slice_axis.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | tools/mo/openvino/tools/mo/front/mxnet/extractors/slice_axis.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.front.caffe.extractors.utils import get_canonical_axis_index
from openvino.tools.mo.utils.error import Error
def slice_axis_ext(attrs):
axis = attrs.int("axis", 0)
begin = attrs.int("begin", 0)
end = ... | 30.862069 | 104 | 0.62514 |
78eb54b650a3d39559843418bef7629dffd8f78e | 3,181 | py | Python | src/compas/datastructures/mesh/operations/weld.py | funkchaser/compas | b58de8771484aa0c6068d43df78b1679503215de | [
"MIT"
] | 235 | 2017-11-07T07:33:22.000Z | 2022-03-25T16:20:00.000Z | src/compas/datastructures/mesh/operations/weld.py | funkchaser/compas | b58de8771484aa0c6068d43df78b1679503215de | [
"MIT"
] | 770 | 2017-09-22T13:42:06.000Z | 2022-03-31T21:26:45.000Z | src/compas/datastructures/mesh/operations/weld.py | funkchaser/compas | b58de8771484aa0c6068d43df78b1679503215de | [
"MIT"
] | 99 | 2017-11-06T23:15:28.000Z | 2022-03-25T16:05:36.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas.topology import adjacency_from_edges
from compas.topology import connected_components
from compas.utilities import pairwise
from .substitute import mesh_substitute_vertex_in_faces
__all__ = [
... | 29.728972 | 114 | 0.643194 |
a561cb936f214a89085db1c383db4690e0c3b15e | 613 | py | Python | proxy/http/server/protocols.py | zanachka/proxy.py | ab5c155213115d1664ce429ec155184d16ca9be6 | [
"BSD-3-Clause"
] | null | null | null | proxy/http/server/protocols.py | zanachka/proxy.py | ab5c155213115d1664ce429ec155184d16ca9be6 | [
"BSD-3-Clause"
] | 9 | 2021-12-10T01:22:33.000Z | 2022-03-31T18:21:07.000Z | proxy/http/server/protocols.py | zanachka/proxy.py | ab5c155213115d1664ce429ec155184d16ca9be6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 22.703704 | 86 | 0.626427 |
944e35f5e9d18bd56ae01ab1de2b9b496c38cc96 | 8,184 | py | Python | packages/qsmstoken/qsmstoken/clients/aliyunsms/api_sdk/aliyun-python-sdk-core/aliyunsdkcore/client.py | lianxiaopang/camel-store-api | b8021250bf3d8cf7adc566deebdba55225148316 | [
"Apache-2.0"
] | 12 | 2020-02-01T01:52:01.000Z | 2021-04-28T15:06:43.000Z | packages/qsmstoken/qsmstoken/clients/aliyunsms/api_sdk/aliyun-python-sdk-core/aliyunsdkcore/client.py | lianxiaopang/camel-store-api | b8021250bf3d8cf7adc566deebdba55225148316 | [
"Apache-2.0"
] | 5 | 2020-02-06T08:07:58.000Z | 2020-06-02T13:03:45.000Z | packages/qsmstoken/qsmstoken/clients/aliyunsms/api_sdk/aliyun-python-sdk-core/aliyunsdkcore/client.py | lianxiaopang/camel-store-api | b8021250bf3d8cf7adc566deebdba55225148316 | [
"Apache-2.0"
] | 11 | 2020-02-03T13:07:46.000Z | 2020-11-29T01:44:06.000Z | from __future__ import absolute_import
# 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, Versi... | 33.958506 | 129 | 0.668622 |
09da3868208d5aa6b589c42be65ccfa247f6adac | 211 | py | Python | bvs/background_verification/doctype/bvs_report_support/test_bvs_report_support.py | vhrspvl/vhrs-bvs | 56667039d9cc09ad0b092e5e6c5dd6598ff41e7b | [
"MIT"
] | 1 | 2021-08-19T11:16:47.000Z | 2021-08-19T11:16:47.000Z | bvs/background_verification/doctype/bvs_report_support/test_bvs_report_support.py | vhrspvl/vhrs-bvs | 56667039d9cc09ad0b092e5e6c5dd6598ff41e7b | [
"MIT"
] | null | null | null | bvs/background_verification/doctype/bvs_report_support/test_bvs_report_support.py | vhrspvl/vhrs-bvs | 56667039d9cc09ad0b092e5e6c5dd6598ff41e7b | [
"MIT"
] | 4 | 2018-03-21T05:57:54.000Z | 2020-11-26T00:37:29.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, VHRS and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestBVSReportSupport(unittest.TestCase):
pass
| 19.181818 | 46 | 0.772512 |
647059ee3c769a6ec4e0d1bbe65b3aa64e202731 | 1,447 | py | Python | tests/transform_for_magma_tests.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/transform_for_magma_tests.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/transform_for_magma_tests.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # SPDX-FileCopyrightText: 2020 The Magma Authors.
# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
#
# SPDX-License-Identifier: BSD-3-Clause
# pylint: disable=protected-access
from unittest import TestCase
from data_models.transform_for_magma import bandwidth, gps_tr181
from exce... | 29.530612 | 86 | 0.642018 |
68f38320b5838bd4de77a768a76b85f663f38249 | 57,113 | py | Python | buildenv/lib/python3.5/site-packages/sphinx/builders/html.py | psarando/cyverse-Visual_Interactive_Computing_Environment | 424467bb16cef04837e02907320c759d45d25a18 | [
"CC-BY-4.0"
] | null | null | null | buildenv/lib/python3.5/site-packages/sphinx/builders/html.py | psarando/cyverse-Visual_Interactive_Computing_Environment | 424467bb16cef04837e02907320c759d45d25a18 | [
"CC-BY-4.0"
] | 4 | 2021-03-04T17:18:36.000Z | 2021-07-14T19:08:18.000Z | buildenv/lib/python3.5/site-packages/sphinx/builders/html.py | psarando/cyverse-Visual_Interactive_Computing_Environment | 424467bb16cef04837e02907320c759d45d25a18 | [
"CC-BY-4.0"
] | 2 | 2021-03-02T10:07:11.000Z | 2021-10-12T23:41:07.000Z | # -*- coding: utf-8 -*-
"""
sphinx.builders.html
~~~~~~~~~~~~~~~~~~~~
Several HTML builders.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import sys
import codecs
import warnings
import posixpath
from os import path
from ha... | 40.82416 | 138 | 0.598375 |
05128b7a74b7d20fd2d972d41a0a8f2382666ae1 | 4,440 | py | Python | model.py | ignaciobaldriz/DeepLearning_CNN_API | 60b4ed7a766a5694cd307e57ac0648f9517aabcb | [
"MIT"
] | 1 | 2021-03-25T15:42:55.000Z | 2021-03-25T15:42:55.000Z | model.py | ignaciobaldriz/DeepLearning_CNN_API | 60b4ed7a766a5694cd307e57ac0648f9517aabcb | [
"MIT"
] | null | null | null | model.py | ignaciobaldriz/DeepLearning_CNN_API | 60b4ed7a766a5694cd307e57ac0648f9517aabcb | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
# Device configuration
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Hyper-parameters
input_size = 784 # 28x28
hidden_size = 500
num_classes = 10
n... | 31.489362 | 109 | 0.571396 |
6af3ec5dbb15224800c1bfbfd4e226ab0aea3c44 | 292 | py | Python | PythonExercicios/ex064.py | lordvinick/Python | c03fd08d4c204104bf0196b0bd129427fd2067ae | [
"MIT"
] | null | null | null | PythonExercicios/ex064.py | lordvinick/Python | c03fd08d4c204104bf0196b0bd129427fd2067ae | [
"MIT"
] | null | null | null | PythonExercicios/ex064.py | lordvinick/Python | c03fd08d4c204104bf0196b0bd129427fd2067ae | [
"MIT"
] | null | null | null | print("{:=^60}".format('Trantando variaveis v1.0'))
num = s = i = 0
num = int(input('Digite um número [999 para parar]: '))
while num != 999:
i += 1
s += num
num = int(input('Digite um número [999 para parar]: '))
print(f'Você digitou {i} números e a soma entre eles foi {s}.')
| 26.545455 | 63 | 0.599315 |
d7dc49068aa22fa5930873be85cb272a4bb627fa | 1,184 | py | Python | clients/kratos/python/test/test_health_not_ready_status.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/kratos/python/test/test_health_not_ready_status.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/kratos/python/test/test_health_not_ready_status.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | """
Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini... | 32 | 446 | 0.744932 |
4aaf5ea5ceac8ebab07db5bc95bedb58196eca39 | 4,939 | bzl | Python | elm/toolchain.bzl | matsubara0507/rules_elm | 80f94ad06b5e3d2703f5a61059ebe046fbe3e7a2 | [
"Apache-2.0"
] | 4 | 2021-09-27T13:38:52.000Z | 2021-12-09T16:59:27.000Z | elm/toolchain.bzl | matsubara0507/rules_elm | 80f94ad06b5e3d2703f5a61059ebe046fbe3e7a2 | [
"Apache-2.0"
] | 1 | 2022-02-12T07:54:15.000Z | 2022-02-16T14:18:29.000Z | elm/toolchain.bzl | matsubara0507/rules_elm | 80f94ad06b5e3d2703f5a61059ebe046fbe3e7a2 | [
"Apache-2.0"
] | null | null | null | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
DEFAULT_VERSION = "0.19.1"
DEFAULT_TEST_VERSION = \
{
"0.19.1": "1.2.1",
}
ELM_COMPILER_BINDIST = \
{
"0.19.1": {
"linux": "e44af52bb27f725a973478e589d990a6428e115fe1bb14f03833134d6c0f155c",
... | 32.281046 | 148 | 0.627252 |
76daae59b872bd1c8d9352ba372f92caaff571af | 1,699 | py | Python | tests/integration/tools/test_custom_action.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/tools/test_custom_action.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/tools/test_custom_action.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 34.673469 | 89 | 0.456151 |
95b7a4f7626e9d44e1915e8881a5d22b9844c16a | 5,036 | py | Python | pyatv/mrp/protobuf/TextInputMessage_pb2.py | stickpin/pyatv | cb45bf5d303593a4e0be05215f21140e2fbbb03d | [
"MIT"
] | null | null | null | pyatv/mrp/protobuf/TextInputMessage_pb2.py | stickpin/pyatv | cb45bf5d303593a4e0be05215f21140e2fbbb03d | [
"MIT"
] | 128 | 2020-04-24T06:42:29.000Z | 2021-02-19T11:34:20.000Z | pyatv/mrp/protobuf/TextInputMessage_pb2.py | stickpin/pyatv | cb45bf5d303593a4e0be05215f21140e2fbbb03d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pyatv/mrp/protobuf/TextInputMessage.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import ... | 37.864662 | 536 | 0.77085 |
3522b04603c86499d7129a9c9e357daf0c761b3b | 142,165 | py | Python | tests/test_edgeql_functions.py | aaronbrighton/edgedb | 4aacd1d4e248ae0d483c075ba93fc462da291ef4 | [
"Apache-2.0"
] | 1 | 2022-01-15T14:05:03.000Z | 2022-01-15T14:05:03.000Z | tests/test_edgeql_functions.py | aaronbrighton/edgedb | 4aacd1d4e248ae0d483c075ba93fc462da291ef4 | [
"Apache-2.0"
] | null | null | null | tests/test_edgeql_functions.py | aaronbrighton/edgedb | 4aacd1d4e248ae0d483c075ba93fc462da291ef4 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2017-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 29.898002 | 79 | 0.463004 |
bc49f9c0bd222ed8db1da2e929bc65fb24774b12 | 13,300 | py | Python | homeassistant/components/zwave/lock.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/zwave/lock.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 383 | 2020-03-06T13:01:14.000Z | 2022-03-11T13:14:13.000Z | homeassistant/components/zwave/lock.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Support for Z-Wave door locks."""
import logging
import voluptuous as vol
from homeassistant.components.lock import DOMAIN, LockEntity
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import ZW... | 34.545455 | 87 | 0.62594 |
00ca088d9f0c9ce23edcc4d08fe27be71a69d0e9 | 1,784 | py | Python | jaxrk/rkhs/conditional_operator.py | ingmarschuster/JaxRK | 1de11e1fe79c1cf14a111b441d9c7b60c3725bf9 | [
"MIT"
] | null | null | null | jaxrk/rkhs/conditional_operator.py | ingmarschuster/JaxRK | 1de11e1fe79c1cf14a111b441d9c7b60c3725bf9 | [
"MIT"
] | null | null | null | jaxrk/rkhs/conditional_operator.py | ingmarschuster/JaxRK | 1de11e1fe79c1cf14a111b441d9c7b60c3725bf9 | [
"MIT"
] | null | null | null | from copy import copy
from ..reduce.centop_reductions import CenterInpFeat, DecenterOutFeat
from ..reduce.lincomb import LinearReduce
from ..reduce.base import Prefactors, Sum
from typing import Generic, TypeVar, Callable, Union
import jax.numpy as np
from jax.interpreters.xla import DeviceArray
from scipy.optimize im... | 45.74359 | 107 | 0.692825 |
fa97e3371fa6aa44575c9b6a8fee7d2d08c66263 | 300 | py | Python | projects/DensePose_wrong/rename_keys_in_checkpoint.py | charliememory/detectron2 | a2a6220068e73c616ee4c84cb52ea023c0203fa0 | [
"Apache-2.0"
] | null | null | null | projects/DensePose_wrong/rename_keys_in_checkpoint.py | charliememory/detectron2 | a2a6220068e73c616ee4c84cb52ea023c0203fa0 | [
"Apache-2.0"
] | null | null | null | projects/DensePose_wrong/rename_keys_in_checkpoint.py | charliememory/detectron2 | a2a6220068e73c616ee4c84cb52ea023c0203fa0 | [
"Apache-2.0"
] | null | null | null | import torch, pdb
path = "./hrnetv2_w48_imagenet_pretrained.pth"
save_path = "./hrnetv2_w48_imagenet_pretrained_renamekeys.pth"
pretrained_dict = torch.load(path)
pdb.set_trace()
pretrained_dict = {"backbone.bottom_up."+k: v for k, v in pretrained_dict.items()}
torch.save(pretrained_dict,save_path) | 37.5 | 82 | 0.8 |
6f597c18686e8d11b14e78d93b9c8a95c0c5cc2f | 1,690 | py | Python | datareactor/atoms/base.py | data-dev/DataReactor | 26cd08129d348cf5ff3596c3e509619c59e300b8 | [
"MIT"
] | 1 | 2022-02-08T11:10:08.000Z | 2022-02-08T11:10:08.000Z | datareactor/atoms/base.py | data-dev/DataReactor | 26cd08129d348cf5ff3596c3e509619c59e300b8 | [
"MIT"
] | null | null | null | datareactor/atoms/base.py | data-dev/DataReactor | 26cd08129d348cf5ff3596c3e509619c59e300b8 | [
"MIT"
] | null | null | null | import logging
from datareactor.dataset import Dataset, DerivedColumn
logger = logging.getLogger(__name__)
class Atom():
"""Generate derived columns for a dataset.
Each `Atom` is responsible for generating one or more derived columns for
the target table.
"""
def transform(self, dataset):
... | 31.296296 | 78 | 0.62426 |
5f0cc94f6cecc3aebc1038d1cebddc0c4c81263c | 4,277 | py | Python | pyransac3d/cylinder.py | jungerm2/pyRANSAC-3D | 88a6c302c31505386f9c51507ab87ef80c49005f | [
"Apache-2.0"
] | null | null | null | pyransac3d/cylinder.py | jungerm2/pyRANSAC-3D | 88a6c302c31505386f9c51507ab87ef80c49005f | [
"Apache-2.0"
] | null | null | null | pyransac3d/cylinder.py | jungerm2/pyRANSAC-3D | 88a6c302c31505386f9c51507ab87ef80c49005f | [
"Apache-2.0"
] | null | null | null | import random
import numpy as np
from .aux_functions import rodrigues_rot
class Cylinder:
"""
!!! warning
The cylinder RANSAC in this library works! but does not present good results on real data on the current version.
We are working to make a better algorithim using normals. If you want to... | 37.517544 | 122 | 0.553659 |
0435d045c65cf116eac0e0ce3a1be3b539ed3ddb | 6,447 | py | Python | lib/services/server/ncloud_server/model/get_instance_tag_list_request.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 12 | 2018-11-20T04:30:49.000Z | 2021-11-09T12:34:26.000Z | lib/services/server/ncloud_server/model/get_instance_tag_list_request.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 1 | 2019-01-24T15:56:15.000Z | 2019-05-31T07:56:55.000Z | lib/services/server/ncloud_server/model/get_instance_tag_list_request.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 6 | 2018-06-29T03:45:50.000Z | 2022-03-18T01:51:45.000Z | # coding: utf-8
"""
server
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class GetInstanceTagListRequest(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manual... | 28.78125 | 130 | 0.602451 |
99661e48b6018e85ae827e486bd32750d325e612 | 430 | py | Python | src/ik_index_lmtd/config.py | jorisvanzundert/lvrmtw | 30d902a90e366812959b6392371578f45d996403 | [
"MIT"
] | null | null | null | src/ik_index_lmtd/config.py | jorisvanzundert/lvrmtw | 30d902a90e366812959b6392371578f45d996403 | [
"MIT"
] | 6 | 2021-04-20T23:44:45.000Z | 2022-03-12T00:56:46.000Z | src/ik_index_lmtd/config.py | jorisvanzundert/riddle_ikindex | 30d902a90e366812959b6392371578f45d996403 | [
"MIT"
] | null | null | null | import sys
from os.path import dirname, abspath, join
work_dir = dirname( dirname( abspath( __file__ ) ) )
sys.path.append( work_dir )
PATH_TO_TEXTS_DIALOGUE_ONLY = 'data/undisclosed/lmtd/dialogue_only'
PATH_TO_TEXTS_NO_DIALOGUE = 'data/undisclosed/lmtd/no_dialogue'
PATH_TO_TEXTS = 'data/undisclosed/lmtd/full_txt'
PAT... | 35.833333 | 67 | 0.802326 |
9f931c7d29b4431e4c7310bce9a2e8bda06c42cc | 525 | py | Python | lightning/MNIST_Lightning_v2/train.py | sachinumrao/pytorch_tutorials | 113b17875e6858ea50ececd29948d0054f3a535c | [
"MIT"
] | null | null | null | lightning/MNIST_Lightning_v2/train.py | sachinumrao/pytorch_tutorials | 113b17875e6858ea50ececd29948d0054f3a535c | [
"MIT"
] | null | null | null | lightning/MNIST_Lightning_v2/train.py | sachinumrao/pytorch_tutorials | 113b17875e6858ea50ececd29948d0054f3a535c | [
"MIT"
] | null | null | null | import pytorch_lightning as pl
from pytorch_lightning.loggers import WandbLogger
from model import Net
from dataset import MNISTDataset
if __name__ == "__main__":
model = Net()
dm = MNISTDataset()
# Create logger
LOG = True
if LOG:
logger = WandbLogger(project="MNIST_Lightning_V2")
... | 21.875 | 58 | 0.626667 |
321f38e8b6c542fe780b77e2ae849e05e224f57c | 6,208 | py | Python | src/sage/interfaces/jmoldata.py | drvinceknight/sage | 00199fb220aa173d8585b9e90654dafd3247d82d | [
"BSL-1.0"
] | 2 | 2015-08-11T05:05:47.000Z | 2019-05-15T17:27:25.000Z | src/sage/interfaces/jmoldata.py | kaushik94/sage | 00199fb220aa173d8585b9e90654dafd3247d82d | [
"BSL-1.0"
] | null | null | null | src/sage/interfaces/jmoldata.py | kaushik94/sage | 00199fb220aa173d8585b9e90654dafd3247d82d | [
"BSL-1.0"
] | 1 | 2020-07-24T11:56:55.000Z | 2020-07-24T11:56:55.000Z | r"""
Interface for extracting data and generating images from Jmol readable files.
JmolData is a no GUI version of Jmol useful for extracting data from files Jmol
reads and for generating image files.
AUTHORS:
- Jonathan Gutow (2012-06-14): complete doctest coverage
- Jonathan Gutow (2012-03-21): initial version
"""... | 38.559006 | 169 | 0.603576 |
ea3cb6799db4584f1a9feb797ed3713b5ca56afa | 5,352 | py | Python | test/test_e2e_st_transformer.py | roshansh-cmu/espnet | 5fa6dcc4e649dc66397c629d0030d09ecef36b80 | [
"Apache-2.0"
] | null | null | null | test/test_e2e_st_transformer.py | roshansh-cmu/espnet | 5fa6dcc4e649dc66397c629d0030d09ecef36b80 | [
"Apache-2.0"
] | null | null | null | test/test_e2e_st_transformer.py | roshansh-cmu/espnet | 5fa6dcc4e649dc66397c629d0030d09ecef36b80 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Copyright 2019 Hirofumi Inaguma
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
import argparse
import pytest
import torch
from espnet.nets.pytorch_backend.e2e_st_transformer import E2E
from espnet.nets.pytorch_backend.transformer import plot
def make_arg(**kwargs):
defaults = dic... | 29.733333 | 85 | 0.621263 |
c8a808d82f5f300c7fed67e73855faf00e8e9c09 | 114 | py | Python | python_docs/08PassagemDeParametro/aula21c.py | Matheus-IT/lang-python-related | dd2e5d9b9f16d3838ba1670fdfcba1fa3fe305e9 | [
"MIT"
] | null | null | null | python_docs/08PassagemDeParametro/aula21c.py | Matheus-IT/lang-python-related | dd2e5d9b9f16d3838ba1670fdfcba1fa3fe305e9 | [
"MIT"
] | null | null | null | python_docs/08PassagemDeParametro/aula21c.py | Matheus-IT/lang-python-related | dd2e5d9b9f16d3838ba1670fdfcba1fa3fe305e9 | [
"MIT"
] | null | null | null | def funcao():
n1 = 4
print(f'N1 dentro vale {n1}')
n1 = 2
funcao()
print(f'N1 fora vale {n1}')
| 12.666667 | 34 | 0.517544 |
115a9757dfa7301d5ea57b72a852f0a93c678928 | 260 | py | Python | codekitchen/py_files/hello-world-dspy.py | ineelhere/pylearn | 14ce12691124ea556845fab36583280d5c7475d8 | [
"MIT"
] | 4 | 2021-08-29T01:46:21.000Z | 2022-01-08T21:45:12.000Z | codekitchen/py_files/hello-world-dspy.py | ineelhere/pylearn | 14ce12691124ea556845fab36583280d5c7475d8 | [
"MIT"
] | 4 | 2021-08-31T13:30:34.000Z | 2021-09-14T02:14:57.000Z | codekitchen/py_files/hello-world-dspy.py | ineelhere/pylearn | 14ce12691124ea556845fab36583280d5c7475d8 | [
"MIT"
] | 7 | 2020-07-22T10:30:50.000Z | 2021-09-14T01:54:01.000Z | print('Hello World!!')
print('Get ready to rock-N-roll ')
# we saw that the lines automatically shifted to new lines.
# although we can do this manually too, in one print statement
print('Hello World!! \nGet ready to rock-N-roll')
# and that's how we do it !!
| 37.142857 | 62 | 0.719231 |
27905e53a673038479afabab788c876d2426abcd | 266 | py | Python | wbb/modules/send.py | Dikatochhawng/lynn | 8ecd2fec5695c892da812886983db1a7c6a10f54 | [
"MIT"
] | null | null | null | wbb/modules/send.py | Dikatochhawng/lynn | 8ecd2fec5695c892da812886983db1a7c6a10f54 | [
"MIT"
] | null | null | null | wbb/modules/send.py | Dikatochhawng/lynn | 8ecd2fec5695c892da812886983db1a7c6a10f54 | [
"MIT"
] | 1 | 2021-11-10T17:32:35.000Z | 2021-11-10T17:32:35.000Z | from pyrogram import filters
from wbb import app
@app.on_message(filters.command("snd"))
async def send(_, message):
rsr = message.text.split(None, 1)[1]
await app.send_message(message.chat.id, text=rsr, disable_web_page_preview=True)
await message.delete()
| 26.6 | 82 | 0.759398 |
0039f53dd3f4b6de71d987d5c62d3f4a4ee9f84c | 6,725 | py | Python | contrib/devtools/symbol-check.py | vivuscoin/vivuscoin | ba0db89712234bf68b2d6b63ef2c420d65c7c25d | [
"MIT"
] | null | null | null | contrib/devtools/symbol-check.py | vivuscoin/vivuscoin | ba0db89712234bf68b2d6b63ef2c420d65c7c25d | [
"MIT"
] | null | null | null | contrib/devtools/symbol-check.py | vivuscoin/vivuscoin | ba0db89712234bf68b2d6b63ef2c420d65c7c25d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
A script to check that the (Linux) executables produced by gitian only contain
allowed gcc, glibc and libstdc+... | 37.780899 | 173 | 0.646394 |
6686ccce4335a36d1d184c6fa88ef70b23dcf206 | 272 | py | Python | tests/artificial/transf_Anscombe/trend_MovingMedian/cycle_5/ar_12/test_artificial_128_Anscombe_MovingMedian_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_Anscombe/trend_MovingMedian/cycle_5/ar_12/test_artificial_128_Anscombe_MovingMedian_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_Anscombe/trend_MovingMedian/cycle_5/ar_12/test_artificial_128_Anscombe_MovingMedian_5_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 5, transform = "Anscombe", sigma = 0.0, exog_count = 20, ar_order = 12); | 38.857143 | 167 | 0.735294 |
7ae5e865beb12452ff018a4de2553cdbcfd7f93d | 3,230 | py | Python | mason/examples/operators/table/merge/__init__.py | kyprifog/mason | bf45672124ef841bc16216c293034f4ccc506621 | [
"Apache-2.0"
] | 4 | 2021-04-12T17:49:34.000Z | 2022-01-23T19:54:29.000Z | mason/examples/operators/table/merge/__init__.py | kyprifog/mason | bf45672124ef841bc16216c293034f4ccc506621 | [
"Apache-2.0"
] | 24 | 2021-04-30T18:40:25.000Z | 2021-05-12T20:52:06.000Z | mason/examples/operators/table/merge/__init__.py | kyprifog/mason | bf45672124ef841bc16216c293034f4ccc506621 | [
"Apache-2.0"
] | 3 | 2021-04-12T19:40:43.000Z | 2021-09-07T21:56:36.000Z | from typing import Set, Union
from mason.clients.response import Response
from mason.configurations.config import Config
from mason.engines.execution.models.jobs import InvalidJob
from mason.engines.execution.models.jobs.executed_job import ExecutedJob
from mason.engines.execution.models.jobs.merge_job import MergeJob... | 53.833333 | 153 | 0.663158 |
b359ffe149b29d288c352c4b9c249f770d0e2ee0 | 989 | py | Python | evaluator.py | shizuo-kaji/PretrainCNNwithNoData | 6d076e4bc2effcd91e9275470db79e0125704087 | [
"MIT"
] | 1 | 2021-11-18T07:18:44.000Z | 2021-11-18T07:18:44.000Z | evaluator.py | shizuo-kaji/PretrainCNNwithNoData | 6d076e4bc2effcd91e9275470db79e0125704087 | [
"MIT"
] | null | null | null | evaluator.py | shizuo-kaji/PretrainCNNwithNoData | 6d076e4bc2effcd91e9275470db79e0125704087 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import torch
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self):
self.reset()
def reset(self):
self.val = 0.
self.avg = 0.
self.sum = 0.
self.count = 0.
def update(self, val, n=1):
... | 28.257143 | 88 | 0.55814 |
e386accbce1e2aa9bd3dcdc11ae9880e6b83279d | 507 | py | Python | pytglib/api/types/mask_point_forehead.py | iTeam-co/pytglib | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 6 | 2019-10-30T08:57:27.000Z | 2021-02-08T14:17:43.000Z | pytglib/api/types/mask_point_forehead.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 1 | 2021-08-19T05:44:10.000Z | 2021-08-19T07:14:56.000Z | pytglib/api/types/mask_point_forehead.py | iTeam-co/python-telegram | e5e75e0a85f89b77762209b32a61b0a883c0ae61 | [
"MIT"
] | 5 | 2019-12-04T05:30:39.000Z | 2021-05-21T18:23:32.000Z |
from ..utils import Object
class MaskPointForehead(Object):
"""
A mask should be placed relatively to the forehead
Attributes:
ID (:obj:`str`): ``MaskPointForehead``
No parameters required.
Returns:
MaskPoint
Raises:
:class:`telegram.Error`
"""
ID = "maskP... | 16.354839 | 54 | 0.587771 |
e978a6e2b9aff63d29158c98057eb55911e68592 | 3,642 | py | Python | funboost/consumers/zeromq_consumer.py | DJMIN/funboost | 7570ca2909bb0b44a1080f5f98aa96c86d3da9d4 | [
"Apache-2.0"
] | 120 | 2021-12-26T03:27:12.000Z | 2022-03-31T16:20:44.000Z | funboost/consumers/zeromq_consumer.py | mooti-barry/funboost | 2cd9530e2c4e5a52fc921070d243d402adbc3a0e | [
"Apache-2.0"
] | 18 | 2021-12-31T06:26:37.000Z | 2022-03-31T16:16:33.000Z | funboost/consumers/zeromq_consumer.py | mooti-barry/funboost | 2cd9530e2c4e5a52fc921070d243d402adbc3a0e | [
"Apache-2.0"
] | 27 | 2021-12-26T16:12:31.000Z | 2022-03-26T17:43:08.000Z | # -*- coding: utf-8 -*-
# @Author : ydf
import os
import socket
import json
# import time
import zmq
import multiprocessing
from funboost.consumers.base_consumer import AbstractConsumer
from nb_log import get_logger
# noinspection PyPep8
def check_port_is_used(ip, port):
s = socket.socket(socket.AF_INET, socket.... | 34.358491 | 117 | 0.646623 |
13cca4cb5610ea4a104e5b2cc59c4b820f175857 | 3,369 | py | Python | neurokit2/stats/fit_error.py | kassyray/NeuroKit | b84d110a71d5d17c0d1efde0d60d00446fda16cb | [
"MIT"
] | null | null | null | neurokit2/stats/fit_error.py | kassyray/NeuroKit | b84d110a71d5d17c0d1efde0d60d00446fda16cb | [
"MIT"
] | null | null | null | neurokit2/stats/fit_error.py | kassyray/NeuroKit | b84d110a71d5d17c0d1efde0d60d00446fda16cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
def fit_error(y, y_predicted, n_parameters=2):
"""Calculate the fit error for a model.
Also specific and direct access functions can be used, such as `fit_mse()`, `fit_rmse()` and `fit_r2()`.
Parameters
----------
y : list, array or Series
The r... | 27.842975 | 108 | 0.554467 |
63c910c56cf8b28b2a219befdbc3a23a7e771598 | 2,878 | py | Python | test/functional/interface_bitcoin_cli.py | CryptoDev-Project/CHTC | 9d2f8a849ac2989fe5514956fbb6b98cc81f0eff | [
"MIT"
] | 4 | 2019-04-06T22:56:04.000Z | 2019-07-27T07:58:03.000Z | test/functional/interface_bitcoin_cli.py | CryptoDev-Project/CHTC | 9d2f8a849ac2989fe5514956fbb6b98cc81f0eff | [
"MIT"
] | 2 | 2020-12-19T14:36:51.000Z | 2020-12-20T16:19:36.000Z | test/functional/interface_bitcoin_cli.py | CryptoDev-Project/CHTC | 9d2f8a849ac2989fe5514956fbb6b98cc81f0eff | [
"MIT"
] | 6 | 2019-03-27T20:02:29.000Z | 2019-05-07T17:49:14.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test chtc-cli"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util imp... | 48.779661 | 104 | 0.714038 |
e1b706f81f9b0f2d2e059f5f330e6dd6089cfa0c | 2,635 | py | Python | examples/json_import_example/import_json.py | fenrisl/cyberwatch_api_toolbox | 5bc691c87446f117a9e52acd3c8590eb3693dcd6 | [
"MIT"
] | 10 | 2018-11-16T14:21:03.000Z | 2022-01-17T13:31:21.000Z | examples/json_import_example/import_json.py | fenrisl/cyberwatch_api_toolbox | 5bc691c87446f117a9e52acd3c8590eb3693dcd6 | [
"MIT"
] | 108 | 2018-12-10T14:49:49.000Z | 2022-02-15T09:45:08.000Z | examples/json_import_example/import_json.py | fenrisl/cyberwatch_api_toolbox | 5bc691c87446f117a9e52acd3c8590eb3693dcd6 | [
"MIT"
] | 26 | 2018-12-06T15:03:24.000Z | 2022-02-14T13:37:55.000Z | """Create remote access"""
import os
import json
from configparser import ConfigParser
from cbw_api_toolbox.cbw_api import CBWApi
CONF = ConfigParser()
CONF.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', '..', 'api.conf'))
CLIENT = CBWApi(CONF.get('cyberwatch', 'url'), CONF.get('cyberwatch', 'api... | 46.22807 | 119 | 0.678937 |
dbcfa3a0a447ef58448d348a0f46eb8c57edd9ec | 821 | py | Python | cleanab/ynab.py | janw/cleanab | 0d97bc976d0a1190d5223ca2eaa0407663e88e59 | [
"Apache-2.0"
] | 2 | 2019-10-06T13:52:33.000Z | 2021-12-31T19:29:30.000Z | cleanab/ynab.py | janw/cleanab | 0d97bc976d0a1190d5223ca2eaa0407663e88e59 | [
"Apache-2.0"
] | null | null | null | cleanab/ynab.py | janw/cleanab | 0d97bc976d0a1190d5223ca2eaa0407663e88e59 | [
"Apache-2.0"
] | null | null | null | from functools import lru_cache
import ynab_api as ynab
@lru_cache(maxsize=1)
def get_ynab_api(access_token):
ynab_conf = ynab.Configuration()
ynab_conf.api_key["Authorization"] = access_token
ynab_conf.api_key_prefix["Authorization"] = "Bearer"
return ynab.TransactionsApi(ynab.ApiClient(ynab_conf))
... | 30.407407 | 74 | 0.773447 |
e88938b8275728b4b0e677eaed13c8c2b595df5d | 4,552 | py | Python | acrobot_simulator/acro_utils.py | dtak/hip-mdp-public | 3deb3fbfd341d572634889cd4c2f8e6c1e8898e3 | [
"MIT"
] | 23 | 2017-10-26T17:26:11.000Z | 2021-09-09T17:48:53.000Z | acrobot_simulator/acro_utils.py | dtak/hip-mdp-public | 3deb3fbfd341d572634889cd4c2f8e6c1e8898e3 | [
"MIT"
] | 1 | 2017-12-26T03:42:47.000Z | 2017-12-28T06:08:27.000Z | acrobot_simulator/acro_utils.py | dtak/hip-mdp-public | 3deb3fbfd341d572634889cd4c2f8e6c1e8898e3 | [
"MIT"
] | 10 | 2017-10-27T19:24:10.000Z | 2022-03-17T03:04:00.000Z | import sys
import os
import numpy as np
import numbers
""" This set of utility functions are adapted from rlpy team."""
# Original attribution information:
__copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy"
__credits__ = ["Alborz Geramifard", "Robert H. Klein", "Christoph Dann",
"William Da... | 29.179487 | 80 | 0.498462 |
09c54d5a06aed2e1188c94497debc7bf5d19b582 | 1,742 | py | Python | src/python/grapl-tests-common/grapl_tests_common/clients/engagement_edge_client.py | wimax-grapl/grapl | be0a49a83f62b84a10182c383d12f911cc555b24 | [
"Apache-2.0"
] | null | null | null | src/python/grapl-tests-common/grapl_tests_common/clients/engagement_edge_client.py | wimax-grapl/grapl | be0a49a83f62b84a10182c383d12f911cc555b24 | [
"Apache-2.0"
] | null | null | null | src/python/grapl-tests-common/grapl_tests_common/clients/engagement_edge_client.py | wimax-grapl/grapl | be0a49a83f62b84a10182c383d12f911cc555b24 | [
"Apache-2.0"
] | null | null | null | from http import HTTPStatus
from typing import Optional
import requests
_JSON_CONTENT_TYPE_HEADERS = {"Content-type": "application/json"}
_ORIGIN = {
"Origin": "https://local-grapl-engagement-ux-bucket.s3.amazonaws.com",
}
class EngagementEdgeException(Exception):
pass
class EngagementEdgeClient:
def ... | 32.259259 | 95 | 0.594719 |
4190feb4f3235203f4a4c7e3ed8d66bf2d1ddc6c | 52,957 | py | Python | CortexPal.py | flynnwastaken/cortex-discord | 2cf8791e25696652262987c3be13e710eaa36313 | [
"MIT"
] | null | null | null | CortexPal.py | flynnwastaken/cortex-discord | 2cf8791e25696652262987c3be13e710eaa36313 | [
"MIT"
] | null | null | null | CortexPal.py | flynnwastaken/cortex-discord | 2cf8791e25696652262987c3be13e710eaa36313 | [
"MIT"
] | null | null | null | import discord
import random
import os
import traceback
import re
import logging
import logging.handlers
import configparser
import datetime
import uuid
import sqlite3
import copy
from discord.ext import commands
from datetime import datetime, timedelta, timezone
PREFIX = '$'
PURGE_DAYS = 180
DICE... | 37.451909 | 219 | 0.554525 |
0a99e79be27418dca49598f46e91b148eb2a23c2 | 84,736 | py | Python | robot/Cumulus/resources/NPSP.py | SFDO-Alliances/NPSP | 3711a3cf8e3124bc2d7e61644d6abecb4042004e | [
"BSD-3-Clause"
] | 413 | 2015-01-02T09:53:04.000Z | 2019-12-05T15:31:25.000Z | robot/Cumulus/resources/NPSP.py | SFDO-Alliances/NPSP | 3711a3cf8e3124bc2d7e61644d6abecb4042004e | [
"BSD-3-Clause"
] | 2,471 | 2015-01-02T03:33:55.000Z | 2019-12-13T17:55:10.000Z | robot/Cumulus/resources/NPSP.py | SFDO-Alliances/NPSP | 3711a3cf8e3124bc2d7e61644d6abecb4042004e | [
"BSD-3-Clause"
] | 296 | 2015-01-06T13:03:33.000Z | 2019-12-11T14:19:31.000Z | import logging
import warnings
import time
import random
import string
import re
from datetime import datetime
from datetime import timedelta
from dateutil.relativedelta import relativedelta
from robot.libraries.BuiltIn import RobotNotRunningError
from selenium.common.exceptions import ElementNotInteractableExceptio... | 48.503721 | 212 | 0.653205 |
41829ce695ff6e9aceef54fa36f63ffb47119104 | 1,402 | py | Python | gokart/zip_client.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | gokart/zip_client.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | gokart/zip_client.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | import os
import shutil
import zipfile
from abc import abstractmethod
from typing import Union, IO
def _unzip_file(fp: Union[str, IO, os.PathLike], extract_dir: str) -> None:
zip_file = zipfile.ZipFile(fp)
zip_file.extractall(extract_dir)
zip_file.close()
class ZipClient(object):
@abstractmethod
... | 24.172414 | 101 | 0.674037 |
d96d04c83879d095af323ee8ee83e91e3c1b50b0 | 745 | py | Python | supcon/python_scripts/run_baseline_a100.py | hanseungwook/google-research | e53a66b9388b34c456b7cbcd276e36099220a26e | [
"Apache-2.0"
] | null | null | null | supcon/python_scripts/run_baseline_a100.py | hanseungwook/google-research | e53a66b9388b34c456b7cbcd276e36099220a26e | [
"Apache-2.0"
] | null | null | null | supcon/python_scripts/run_baseline_a100.py | hanseungwook/google-research | e53a66b9388b34c456b7cbcd276e36099220a26e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
from cvar_pyutils.ccc import submit_job, submit_dependant_jobs
os.environ['PYTHONPATH'] += ':/dccstor/hansri/models/'
os.environ['TPU'] = 'CCC'
os.environ['DATA_DIR'] = '~/dccstor/hansri/data/'
os.environ['MODEL_DIR'] = '~/dccstor/hansri/google-research/supcon/trained_models1/'
submi... | 53.214286 | 378 | 0.771812 |
9ac34f355402aa41d2e5b63095ab4346d438e807 | 4,405 | py | Python | .history/src/data/data_20191019134602.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191019134602.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191019134602.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | import pandas as pd
from typing import Union
from pathlib import Path
from nameparser import HumanName
class ExtractData:
def __init__(self, filename: Union[str, Path], drop_columns=None):
# """Extract Training Data from file or Path
# Arguments:
# filename {[str]} -- Filename of CSV ... | 29.763514 | 114 | 0.558456 |
d5c69b3ec9fd310e3dca9c2c489e5befcbd21617 | 6,855 | py | Python | scripts/backup.py | midoks/mdweb | 06455b094302645d7501c7de02921194ca05f4d6 | [
"Apache-2.0"
] | 26 | 2019-04-07T15:59:52.000Z | 2022-03-30T15:04:26.000Z | scripts/backup.py | midoks/mdweb | 06455b094302645d7501c7de02921194ca05f4d6 | [
"Apache-2.0"
] | 6 | 2020-10-03T13:58:39.000Z | 2021-10-31T16:38:13.000Z | scripts/backup.py | midoks/mdweb | 06455b094302645d7501c7de02921194ca05f4d6 | [
"Apache-2.0"
] | 8 | 2019-09-01T00:00:42.000Z | 2022-03-14T05:23:45.000Z | #!/usr/bin/python
# coding: utf-8
#-----------------------------
# 网站备份工具
#-----------------------------
import sys
import os
if sys.platform != 'darwin':
os.chdir('/www/server/mdserver-web')
chdir = os.getcwd()
sys.path.append(chdir + '/class/core')
reload(sys)
sys.setdefaultencoding('utf-8')
... | 37.054054 | 109 | 0.46229 |
a1f70138934b9e963b4506263549553f67655a19 | 8,157 | py | Python | contrib/devtools/update-translations.py | worldpaycoin/WPAY | 51c2e7fc8c68bf108c44b46909efadfc27f4ce81 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | worldpaycoin/WPAY | 51c2e7fc8c68bf108c44b46909efadfc27f4ce81 | [
"MIT"
] | null | null | null | contrib/devtools/update-translations.py | worldpaycoin/WPAY | 51c2e7fc8c68bf108c44b46909efadfc27f4ce81 | [
"MIT"
] | 1 | 2019-11-08T21:12:01.000Z | 2019-11-08T21:12:01.000Z | #!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | 38.658768 | 124 | 0.634179 |
ed51903dcb452b908d79383334bbdbb0b31b1cb8 | 8,154 | py | Python | zhixuewang/models.py | SherkeyXD/zhixuewang-python | 16c59a3c4bb78269ec8b59f91aff2aab3c8f19e9 | [
"MIT"
] | null | null | null | zhixuewang/models.py | SherkeyXD/zhixuewang-python | 16c59a3c4bb78269ec8b59f91aff2aab3c8f19e9 | [
"MIT"
] | null | null | null | zhixuewang/models.py | SherkeyXD/zhixuewang-python | 16c59a3c4bb78269ec8b59f91aff2aab3c8f19e9 | [
"MIT"
] | null | null | null | from enum import Enum
from typing import List, Callable, TypeVar
from dataclasses import dataclass, field
from zhixuewang.tools.datetime_tool import get_property
T = TypeVar("T")
class ExtendedList(List[T]):
"""扩展列表, 方便找到列表里的元素"""
def __init__(self, l: List[T] = None):
super().__init__(l or list())
... | 28.020619 | 110 | 0.609272 |
7a346e77d80c3dc40a6efd7e4deb5da0052d5938 | 383 | py | Python | hotels/migrations/0003_auto_20190721_1504.py | akramakh/Django-Hotel-Management-System | 75ca308a9fe8d09b89f772acac0400e798a85ee1 | [
"MIT"
] | null | null | null | hotels/migrations/0003_auto_20190721_1504.py | akramakh/Django-Hotel-Management-System | 75ca308a9fe8d09b89f772acac0400e798a85ee1 | [
"MIT"
] | 7 | 2019-12-04T23:47:59.000Z | 2021-06-09T18:07:05.000Z | hotels/migrations/0003_auto_20190721_1504.py | akramakh/Django-Hotel-Management-System | 75ca308a9fe8d09b89f772acac0400e798a85ee1 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-21 12:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hotels', '0002_auto_20190721_1340'),
]
operations = [
migrations.AlterField(
model_name='hotel',
name='name',
... | 20.157895 | 51 | 0.5953 |
14336a3819b59ebf3f2e33df0d6c8d7b77a301d5 | 13,855 | py | Python | monitoring/collectd-extensions/src/mtce_notifier.py | marcelarosalesj/x.stx-integ | 4ac95cc0d0cf64ea09ffe3a3b130b73175f38ee8 | [
"Apache-2.0"
] | null | null | null | monitoring/collectd-extensions/src/mtce_notifier.py | marcelarosalesj/x.stx-integ | 4ac95cc0d0cf64ea09ffe3a3b130b73175f38ee8 | [
"Apache-2.0"
] | null | null | null | monitoring/collectd-extensions/src/mtce_notifier.py | marcelarosalesj/x.stx-integ | 4ac95cc0d0cf64ea09ffe3a3b130b73175f38ee8 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018-2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#############################################################################
#
# This file is the collectd 'Maintenance' Notifier.
#
# Collects provides information about each event as an object passed to the
# notification ... | 36.364829 | 78 | 0.600072 |
2a6e70b8a7ade63410b5b8c8a20e433d0fdfa795 | 1,219 | py | Python | disk/tests/mocks.py | glasser/integrations-core | 1dd515d49b1690a1369ee5195713605b1b072b1f | [
"BSD-3-Clause"
] | null | null | null | disk/tests/mocks.py | glasser/integrations-core | 1dd515d49b1690a1369ee5195713605b1b072b1f | [
"BSD-3-Clause"
] | null | null | null | disk/tests/mocks.py | glasser/integrations-core | 1dd515d49b1690a1369ee5195713605b1b072b1f | [
"BSD-3-Clause"
] | 1 | 2019-12-23T13:35:17.000Z | 2019-12-23T13:35:17.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
from .common import DEFAULT_DEVICE_NAME, DEFAULT_FILE_SYSTEM, DEFAULT_MOUNT_POINT, HERE
def mock_blkid_output():
"""
Load fixtures from tests/fixtures/ folder and return a tuple matching the
... | 23.901961 | 111 | 0.676784 |
c73ca9a1e32c2132fc583dd9970c8cbeb14a65c6 | 1,878 | py | Python | watson/dev/middleware.py | watsonpy/watson-dev | 3021c736da8a70e259f9a42fde98f58eb394996b | [
"BSD-3-Clause"
] | null | null | null | watson/dev/middleware.py | watsonpy/watson-dev | 3021c736da8a70e259f9a42fde98f58eb394996b | [
"BSD-3-Clause"
] | null | null | null | watson/dev/middleware.py | watsonpy/watson-dev | 3021c736da8a70e259f9a42fde98f58eb394996b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import __main__
import os
import mimetypes
import stat
class StaticFileMiddleware(object):
"""
A WSGI compatibile Middleware class that allows content to be retrieved
from the directory that the __main__ is called from.
Example:
.. code-block:: python
def app(en... | 31.830508 | 82 | 0.573482 |
8bda5d2bae72dd9b2fa5408b2d97738e25b9f0ae | 12,836 | py | Python | utils/utils_bbox.py | hito0512/yolov4-tf2 | 97d23a70d0ec3f6ce1d49f85398a584a466a0713 | [
"MIT"
] | 298 | 2020-06-05T14:31:17.000Z | 2022-03-28T02:59:40.000Z | utils/utils_bbox.py | wkc2014/yolov4-tf2 | 97d23a70d0ec3f6ce1d49f85398a584a466a0713 | [
"MIT"
] | 36 | 2020-06-15T11:41:17.000Z | 2022-03-31T15:21:50.000Z | utils/utils_bbox.py | wkc2014/yolov4-tf2 | 97d23a70d0ec3f6ce1d49f85398a584a466a0713 | [
"MIT"
] | 107 | 2020-06-07T10:40:44.000Z | 2022-03-30T11:32:48.000Z | import tensorflow as tf
from tensorflow.keras import backend as K
#---------------------------------------------------#
# 对box进行调整,使其符合真实图片的样子
#---------------------------------------------------#
def yolo_correct_boxes(box_xy, box_wh, input_shape, image_shape, letterbox_image):
#-----------------------... | 47.191176 | 143 | 0.436273 |
304fe78c5e0d5c492f0ce4fc29adbf67aeedb17f | 3,884 | py | Python | tests/test_flaskparser.py | Reskov/webargs | 1ca80a5da13f3d600808fbcca83e9769821865ac | [
"MIT"
] | null | null | null | tests/test_flaskparser.py | Reskov/webargs | 1ca80a5da13f3d600808fbcca83e9769821865ac | [
"MIT"
] | null | null | null | tests/test_flaskparser.py | Reskov/webargs | 1ca80a5da13f3d600808fbcca83e9769821865ac | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import mock
from werkzeug.exceptions import HTTPException
import pytest
from flask import Flask
from webargs import fields, ValidationError, missing
from webargs.flaskparser import parser, abort
from webargs.core import MARSHMALLOW_VERSION_IN... | 37.346154 | 88 | 0.688723 |
23d1ac4719ba8843fe08b5b62e7096579f445167 | 169 | py | Python | mayan/apps/mayan_statistics/__init__.py | prezi/mayan-edms | e9bc10a056c3379b57115c6e83022f48c6298e1d | [
"Apache-2.0"
] | 4 | 2019-02-17T08:35:42.000Z | 2019-03-28T06:02:11.000Z | mayan/apps/mayan_statistics/__init__.py | zhoubear/mayan-edms | e9bc10a056c3379b57115c6e83022f48c6298e1d | [
"Apache-2.0"
] | 1 | 2018-10-11T13:01:34.000Z | 2018-10-11T13:01:34.000Z | mayan/apps/mayan_statistics/__init__.py | prezi/mayan-edms | e9bc10a056c3379b57115c6e83022f48c6298e1d | [
"Apache-2.0"
] | 3 | 2019-01-29T13:21:57.000Z | 2019-10-27T03:20:15.000Z | from __future__ import unicode_literals
from .classes import StatisticLineChart, StatisticNamespace # NOQA
default_app_config = 'mayan_statistics.apps.StatisticsApp'
| 28.166667 | 67 | 0.852071 |
b8f84ce733dfa219965798f72cc8d095933ef358 | 11,789 | py | Python | sdks/python/apache_beam/runners/portability/local_job_service.py | violalyu/beam | dd605e568d70b1a6ebea60c15b2aec3e240f3914 | [
"Apache-2.0"
] | null | null | null | sdks/python/apache_beam/runners/portability/local_job_service.py | violalyu/beam | dd605e568d70b1a6ebea60c15b2aec3e240f3914 | [
"Apache-2.0"
] | 1 | 2019-10-15T00:19:08.000Z | 2019-10-16T22:46:54.000Z | sdks/python/apache_beam/runners/portability/local_job_service.py | violalyu/beam | dd605e568d70b1a6ebea60c15b2aec3e240f3914 | [
"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
# (the "License"); you may not us... | 35.509036 | 79 | 0.731445 |
5d59c4b2d3f1f5030687e3969d85b87d9f89af8f | 1,145 | py | Python | backend/migrations/versions/557da25b46fc_initial_migration.py | Astropilot/BigEye | 4e1c246391c5f6e1c8ea4e4c35ee5fec209960a6 | [
"MIT"
] | null | null | null | backend/migrations/versions/557da25b46fc_initial_migration.py | Astropilot/BigEye | 4e1c246391c5f6e1c8ea4e4c35ee5fec209960a6 | [
"MIT"
] | null | null | null | backend/migrations/versions/557da25b46fc_initial_migration.py | Astropilot/BigEye | 4e1c246391c5f6e1c8ea4e4c35ee5fec209960a6 | [
"MIT"
] | null | null | null | """Initial migration.
Revision ID: 557da25b46fc
Revises:
Create Date: 2022-01-21 13:41:40.574867
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '557da25b46fc'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto... | 29.358974 | 85 | 0.676856 |
77ebab5522e8edfa0169d6094146a56a7c565184 | 5,539 | py | Python | app/server/__init__.py | SSU-NC-22/AirPost_Sink | a867441886a25f2edccb118e5a1e7b5e1ed05891 | [
"Apache-2.0"
] | null | null | null | app/server/__init__.py | SSU-NC-22/AirPost_Sink | a867441886a25f2edccb118e5a1e7b5e1ed05891 | [
"Apache-2.0"
] | 2 | 2021-09-27T13:17:16.000Z | 2021-09-27T13:18:24.000Z | app/server/__init__.py | SSU-NC-22/AirPost_Sink | a867441886a25f2edccb118e5a1e7b5e1ed05891 | [
"Apache-2.0"
] | 1 | 2021-07-20T13:08:19.000Z | 2021-07-20T13:08:19.000Z | import ast
import datetime
import json
import time
import threading
import socket
import paho.mqtt.client as mqtt
from flask import Flask
from flask import request
from kafka import KafkaProducer
from message.mqtt_message import MqttMessages
from .healthcheck import HealthCheck
from .actuator import Actuator
from .ht... | 28.848958 | 151 | 0.722694 |
0329eb3cf280a6ade062eaf80f16b99217383b18 | 3,397 | py | Python | gym_minigrid/envs/keycorridor.py | patras91/gym-minigrid | 8c47bc2685d1070f7b5146685a52d60024bc6349 | [
"Apache-2.0"
] | 1 | 2021-09-28T12:56:56.000Z | 2021-09-28T12:56:56.000Z | gym_minigrid/envs/keycorridor.py | patras91/gym-minigrid | 8c47bc2685d1070f7b5146685a52d60024bc6349 | [
"Apache-2.0"
] | null | null | null | gym_minigrid/envs/keycorridor.py | patras91/gym-minigrid | 8c47bc2685d1070f7b5146685a52d60024bc6349 | [
"Apache-2.0"
] | 1 | 2022-03-31T16:30:39.000Z | 2022-03-31T16:30:39.000Z | from gym_minigrid.roomgrid import RoomGrid
from gym_minigrid.register import register
class KeyCorridor(RoomGrid):
"""
A ball is behind a locked door, the key is placed in a
random room.
"""
def __init__(
self,
num_rows=3,
obj_type="ball",
room_size=6,
seed=... | 24.79562 | 79 | 0.595231 |
a7ba766233597c0d99d704232c4a7c3899fd17bf | 6,789 | py | Python | goji/daemon/client.py | zcomputerwiz/gojiv2-blockchain | 3be896d4dcb48a734f8d2a901ab5648201fbd4d7 | [
"Apache-2.0"
] | 2 | 2022-02-09T04:30:19.000Z | 2022-03-19T14:01:43.000Z | goji/daemon/client.py | zcomputerwiz/goji-blockchain | 3be896d4dcb48a734f8d2a901ab5648201fbd4d7 | [
"Apache-2.0"
] | 1 | 2021-12-30T09:17:47.000Z | 2021-12-30T09:17:47.000Z | goji/daemon/client.py | zcomputerwiz/gojiv2-blockchain | 3be896d4dcb48a734f8d2a901ab5648201fbd4d7 | [
"Apache-2.0"
] | 1 | 2022-03-15T08:42:52.000Z | 2022-03-15T08:42:52.000Z | import asyncio
import json
import ssl
from contextlib import asynccontextmanager
from pathlib import Path
from typing import Any, Dict, Optional
import websockets
from goji.types.blockchain_format.sized_bytes import bytes32
from goji.util.config import load_config
from goji.util.json_util import dict_to_json_str
from... | 37.098361 | 120 | 0.659596 |
7bb48801bd147abe300c5fd6239c2e6a1e97c94d | 1,729 | py | Python | src/outpost/django/campusonline/migrations/0029_indices.py | medunigraz/outpost.django.campusonline | 06776bce7556e438c1e00a96aaa9271a7aac8fe4 | [
"BSD-2-Clause"
] | null | null | null | src/outpost/django/campusonline/migrations/0029_indices.py | medunigraz/outpost.django.campusonline | 06776bce7556e438c1e00a96aaa9271a7aac8fe4 | [
"BSD-2-Clause"
] | null | null | null | src/outpost/django/campusonline/migrations/0029_indices.py | medunigraz/outpost.django.campusonline | 06776bce7556e438c1e00a96aaa9271a7aac8fe4 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-31 09:37
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
forward = [
"""
CREATE UNIQUE INDEX campusonline_distributionlist_id_idx ON "public"."campusonline_distributio... | 35.285714 | 187 | 0.676692 |
d44b5a4425929b5e879e7d623f0597c22627562a | 1,485 | py | Python | scripts/ImageToExcel2.py | elishatofunmi/Image-to-Excel | 8ce636d086999d903305eb3d0d2e0f95d8b8eb6f | [
"Apache-2.0"
] | null | null | null | scripts/ImageToExcel2.py | elishatofunmi/Image-to-Excel | 8ce636d086999d903305eb3d0d2e0f95d8b8eb6f | [
"Apache-2.0"
] | null | null | null | scripts/ImageToExcel2.py | elishatofunmi/Image-to-Excel | 8ce636d086999d903305eb3d0d2e0f95d8b8eb6f | [
"Apache-2.0"
] | 1 | 2021-12-13T09:00:59.000Z | 2021-12-13T09:00:59.000Z | import cv2
import pytesseract
import numpy as np
import os, sys
import pandas as pd
def engageData(out):
DictData = {}
for k in out:
try:
listData = k.strip(' ').split(' / ')
DictData[listData[0]] = listData[1]
except:
DictData[listData[0]] = 'nil'
... | 23.203125 | 85 | 0.612795 |
b89d6a69ac94e2feeab42aae020cb0e14e0558ee | 1,853 | py | Python | bootstrap.py | nanonyme/pypi-mirror | beac1cf639f5bf311060e1a1e0464195b56b2a00 | [
"ZPL-1.1"
] | 1 | 2015-11-08T16:07:54.000Z | 2015-11-08T16:07:54.000Z | bootstrap.py | nanonyme/pypi-mirror | beac1cf639f5bf311060e1a1e0464195b56b2a00 | [
"ZPL-1.1"
] | null | null | null | bootstrap.py | nanonyme/pypi-mirror | beac1cf639f5bf311060e1a1e0464195b56b2a00 | [
"ZPL-1.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | 33.089286 | 78 | 0.654614 |
2b757fd4427f1fee4d775bd40a17283b181e1eef | 2,987 | py | Python | sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_peering_management_client_enums.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2022-03-22T15:02:32.000Z | 2022-03-22T15:02:32.000Z | sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_peering_management_client_enums.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-02-10T22:04:59.000Z | 2021-02-10T22:04:59.000Z | sdk/peering/azure-mgmt-peering/azure/mgmt/peering/models/_peering_management_client_enums.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-03T19:31:10.000Z | 2021-06-03T19:31:10.000Z | # 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) AutoRest Code Generator.
# Changes ... | 21.644928 | 76 | 0.644459 |
097a7d7ae3a339b001871a098616186e85687952 | 334 | py | Python | test/unit/conftest.py | jlhood/timestamp-custom-resource | 69aee2bd3f00c2aff035a34325b5a7e1e7e7d919 | [
"MIT"
] | null | null | null | test/unit/conftest.py | jlhood/timestamp-custom-resource | 69aee2bd3f00c2aff035a34325b5a7e1e7e7d919 | [
"MIT"
] | null | null | null | test/unit/conftest.py | jlhood/timestamp-custom-resource | 69aee2bd3f00c2aff035a34325b5a7e1e7e7d919 | [
"MIT"
] | null | null | null | """Setup unit test environment."""
import sys
import os
import test_constants
# make sure tests can import the app code
my_path = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, my_path + '/../../src/')
# set expected config environment variables to test constants
os.environ['LOG_LEVEL'] = test_consta... | 23.857143 | 61 | 0.751497 |
fefa2fb692ea92cdea3634f55bd54f522bf98b6b | 13,566 | py | Python | comic_dl/honcho.py | alextorquin/comic-dl | f34488e88ab462a83c3e4a169cff441e0192c453 | [
"MIT"
] | null | null | null | comic_dl/honcho.py | alextorquin/comic-dl | f34488e88ab462a83c3e4a169cff441e0192c453 | [
"MIT"
] | null | null | null | comic_dl/honcho.py | alextorquin/comic-dl | f34488e88ab462a83c3e4a169cff441e0192c453 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
import logging
from sites import foolSlide
from sites import readcomicOnlineto
from sites import comicNaver
from sites import mangaHere
from sites import rawSenManga
from sites... | 58.727273 | 126 | 0.571797 |
53171516643b606471cf00e38a3da00a47b17c2e | 535 | py | Python | epaper/question/migrations/0005_question_detail_importance_level.py | ahsanaatir/epaper | 5dbd79dfcebb6951b4729c397124afe6977cad24 | [
"Apache-2.0"
] | null | null | null | epaper/question/migrations/0005_question_detail_importance_level.py | ahsanaatir/epaper | 5dbd79dfcebb6951b4729c397124afe6977cad24 | [
"Apache-2.0"
] | null | null | null | epaper/question/migrations/0005_question_detail_importance_level.py | ahsanaatir/epaper | 5dbd79dfcebb6951b4729c397124afe6977cad24 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-10-16 15:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('question', '0004_auto_20161016_1357'),
]
operations = [
migrations.AddField... | 25.47619 | 116 | 0.624299 |
f044818426ee97c6bd31632ae47f9b6c60f8cbb4 | 2,158 | py | Python | extra/plates/adtag.py | EQXTFL/avare | 6f401ea551b6d51ae6a0adc01915042b200efcc6 | [
"BSD-2-Clause"
] | 113 | 2015-02-21T16:37:51.000Z | 2022-02-21T16:29:03.000Z | extra/plates/adtag.py | EQXTFL/avare | 6f401ea551b6d51ae6a0adc01915042b200efcc6 | [
"BSD-2-Clause"
] | 266 | 2015-02-23T16:11:26.000Z | 2022-03-20T03:21:39.000Z | extra/plates/adtag.py | EQXTFL/avare | 6f401ea551b6d51ae6a0adc01915042b200efcc6 | [
"BSD-2-Clause"
] | 126 | 2015-01-11T21:53:13.000Z | 2022-02-14T05:11:13.000Z | # Copyright (c) 2012-2017, Apps4av Inc. (apps4av@gmail.com)
# Author: Zubair Khan
#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 copyrig... | 55.333333 | 756 | 0.699722 |
f956fe88baaa56bc46ab59d68e50b9921fdf16c6 | 216 | py | Python | modules/module9/9a/rename_files.py | shourya01/power_data_analytics_tools | 7621eaebb5b3bd107238016b07e5ae71c891c4b1 | [
"MIT"
] | 1 | 2021-09-26T17:29:46.000Z | 2021-09-26T17:29:46.000Z | modules/module9/9a/rename_files.py | shourya01/power_data_analytics_tools | 7621eaebb5b3bd107238016b07e5ae71c891c4b1 | [
"MIT"
] | null | null | null | modules/module9/9a/rename_files.py | shourya01/power_data_analytics_tools | 7621eaebb5b3bd107238016b07e5ae71c891c4b1 | [
"MIT"
] | null | null | null | import os
#os.rename("test.txt", "test.csv")
for filename in os.listdir("Data"):
if filename.endswith(".txt"):
os.rename("Data\\" + filename, "Data\\" + filename[:-4] + ".csv")
print("...Done")
| 24 | 73 | 0.564815 |
8d98a5e58372d437fe376dd901ec12418b723167 | 7,637 | py | Python | exps/experimental/GeMOSA/baselines/slbm-ft.py | Joey61Liuyi/AutoDL-Projects | 2092e144920e82d74753a7ac31e1890a150d41cf | [
"MIT"
] | 817 | 2020-01-15T00:23:41.000Z | 2022-03-31T14:52:03.000Z | exps/experimental/GeMOSA/baselines/slbm-ft.py | Joey61Liuyi/AutoDL-Projects | 2092e144920e82d74753a7ac31e1890a150d41cf | [
"MIT"
] | 77 | 2020-01-14T14:02:45.000Z | 2022-03-25T07:06:02.000Z | exps/experimental/GeMOSA/baselines/slbm-ft.py | Joey61Liuyi/AutoDL-Projects | 2092e144920e82d74753a7ac31e1890a150d41cf | [
"MIT"
] | 176 | 2020-01-15T10:39:41.000Z | 2022-03-31T04:24:53.000Z | #####################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021.04 #
#####################################################
# python exps/GeMOSA/baselines/slbm-ft.py --env_version v1 --hidden_dim 16 --epochs 500 --init_lr 0.1 --device cuda
# python exps/GeMOSA/baselines/slbm-ft.py ... | 33.349345 | 117 | 0.590284 |
cda82fe7d883228dbbdd7ff30e759849bce8599a | 4,783 | py | Python | pangtreebuild/mafgraph/sorter.py | meoke/PangTreeBuild | 7cafb76df32c559a76ed1d269699dc0e52313312 | [
"MIT"
] | 2 | 2019-09-04T20:01:28.000Z | 2019-12-23T22:41:57.000Z | pangtreebuild/mafgraph/sorter.py | meoke/PangTreeBuild | 7cafb76df32c559a76ed1d269699dc0e52313312 | [
"MIT"
] | 2 | 2019-08-10T16:18:01.000Z | 2019-10-28T21:40:23.000Z | pangtreebuild/mafgraph/sorter.py | meoke/PangTreeBuild | 7cafb76df32c559a76ed1d269699dc0e52313312 | [
"MIT"
] | 2 | 2020-04-23T23:57:52.000Z | 2020-07-12T17:09:02.000Z | # -*- coding: utf-8 -*-
import networkx as nx
import six
from .mafreader import read_maf
from .weighted_edges import weight, Edge
def _out_edges(v, blocks, ub, G):
# Return a list of nodes connected to node v by edge leaving the vertex v
return [u for u in G[v] if ub >= blocks[u].order() > blocks[v].order()... | 37.960317 | 115 | 0.58018 |
ebdaa8ba513c48c1adfa28f022a03e8a346acaf7 | 1,047 | py | Python | setup.py | paulo-romano/attributetools | b9ca72b74de2e3979b2eabbe1152e33979e7c2a9 | [
"MIT"
] | null | null | null | setup.py | paulo-romano/attributetools | b9ca72b74de2e3979b2eabbe1152e33979e7c2a9 | [
"MIT"
] | null | null | null | setup.py | paulo-romano/attributetools | b9ca72b74de2e3979b2eabbe1152e33979e7c2a9 | [
"MIT"
] | null | null | null | # coding: utf-8
from setuptools import setup
import os
setup(name='attributetools',
version='0.1.4',
description='A decorator to set some attribute to a function.',
long_description='A decorator to set some attribute to a function.',
author="Paulo Romano", author_email="pauloromanocarvalho@gmai... | 38.777778 | 81 | 0.629417 |
e83bd098090845feb0f05486e36a68b109ddc40f | 1,593 | py | Python | notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/LeetCode/RomanToInteger.py | side-projects-42/INTERVIEW-PREP-COMPLETE | 627a3315cee4bbc38a0e81c256f27f928eac2d63 | [
"MIT"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/LeetCode/RomanToInteger.py | side-projects-42/INTERVIEW-PREP-COMPLETE | 627a3315cee4bbc38a0e81c256f27f928eac2d63 | [
"MIT"
] | 160 | 2021-04-26T19:04:15.000Z | 2022-03-26T20:18:37.000Z | notes-n-resources/Data-Structures-N-Algo/_DS-n-Algos/Interview-Problems/LeetCode/RomanToInteger.py | side-projects-42/INTERVIEW-PREP-COMPLETE | 627a3315cee4bbc38a0e81c256f27f928eac2d63 | [
"MIT"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | class Solution:
def romanToInt(self, s: str) -> int:
ans = 0
prev = ""
for i in range(len(s)):
if s[i] == "M":
if prev == "C":
ans += 800
prev = "M"
continue
ans += 1000
pr... | 27.465517 | 40 | 0.234777 |
5e231655f6380553a670b5c5c91d5159e1bc75a6 | 907 | py | Python | setup.py | mirzadelic/django-auditlog | a5dde204cf27b0baadf139f60520bed5896e270e | [
"MIT"
] | null | null | null | setup.py | mirzadelic/django-auditlog | a5dde204cf27b0baadf139f60520bed5896e270e | [
"MIT"
] | 1 | 2020-08-17T20:19:49.000Z | 2020-08-17T20:19:49.000Z | setup.py | mirzadelic/django-auditlog | a5dde204cf27b0baadf139f60520bed5896e270e | [
"MIT"
] | 2 | 2020-08-17T10:22:29.000Z | 2020-08-25T10:59:33.000Z | from distutils.core import setup
setup(
name='django-auditlog',
version='0.4.7',
packages=['auditlog', 'auditlog.migrations', 'auditlog.management', 'auditlog.management.commands'],
package_dir={'': 'src'},
url='https://github.com/jjkester/django-auditlog',
license='MIT',
author='Jan-Jelle ... | 32.392857 | 104 | 0.598677 |
97c76b575796c8154fd5fd0278b2ba245cedfe48 | 36 | py | Python | pureskillgg_dsdk/ds_models/__init__.py | pureskillgg/dsdk | 2e91a815dc06cc37ac8272d87014301c64c1b46e | [
"MIT"
] | null | null | null | pureskillgg_dsdk/ds_models/__init__.py | pureskillgg/dsdk | 2e91a815dc06cc37ac8272d87014301c64c1b46e | [
"MIT"
] | 1 | 2022-03-31T15:16:17.000Z | 2022-03-31T19:38:05.000Z | pureskillgg_dsdk/ds_models/__init__.py | pureskillgg/dsdk | 2e91a815dc06cc37ac8272d87014301c64c1b46e | [
"MIT"
] | null | null | null | from .model import create_ds_models
| 18 | 35 | 0.861111 |
e9306c5588aa383d9ed1912487374de769d024d0 | 12,107 | py | Python | rqalpha/mod/rqalpha_mod_sys_analyser/mod.py | hughkong/ricequantframe | a7823681bb1581427d4a7ca7e47febc5f3ed5482 | [
"Apache-2.0"
] | 17 | 2017-04-20T05:17:25.000Z | 2020-09-30T08:58:03.000Z | rqalpha/mod/rqalpha_mod_sys_analyser/mod.py | vladhj38/InplusTrader_Linux | 5f7eb17004da0b76ceafb93cb314de7a6009cd04 | [
"MIT"
] | 1 | 2017-11-12T01:24:06.000Z | 2019-09-19T08:50:38.000Z | rqalpha/mod/rqalpha_mod_sys_analyser/mod.py | vladhj38/InplusTrader_Linux | 5f7eb17004da0b76ceafb93cb314de7a6009cd04 | [
"MIT"
] | 17 | 2017-04-17T08:17:00.000Z | 2020-10-25T01:56:49.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, 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 ... | 43.239286 | 116 | 0.654084 |
a9cf1f421ec1691902255629229c1bd81b3eb062 | 28,531 | py | Python | zerver/tests/test_docs.py | Pulkit007/zulip | 8a5f6f8d95baa55c4b28972cfc5a498f5f388e0f | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_docs.py | Pulkit007/zulip | 8a5f6f8d95baa55c4b28972cfc5a498f5f388e0f | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_docs.py | Pulkit007/zulip | 8a5f6f8d95baa55c4b28972cfc5a498f5f388e0f | [
"Apache-2.0"
] | null | null | null | import os
import re
from typing import Any, Dict, Sequence
from unittest import mock, skipUnless
from urllib.parse import urlsplit
import orjson
from django.conf import settings
from django.http import HttpResponse
from django.test import override_settings
from django.utils.timezone import now as timezone_now
from co... | 46.316558 | 114 | 0.653219 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.