hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d694261614244cdcd722d871732847e1a98e9435 | 1,425 | py | Python | WeXinCrawler/items.py | lihuafeng/WechatSpider | d8eac0182b2d3175dc689d901246cffa4f355c3c | [
"Apache-2.0"
] | 3 | 2019-01-18T05:06:55.000Z | 2019-09-26T09:29:27.000Z | WeXinCrawler/items.py | lihuafeng/WechatSpider | d8eac0182b2d3175dc689d901246cffa4f355c3c | [
"Apache-2.0"
] | null | null | null | WeXinCrawler/items.py | lihuafeng/WechatSpider | d8eac0182b2d3175dc689d901246cffa4f355c3c | [
"Apache-2.0"
] | 2 | 2019-02-21T09:08:00.000Z | 2019-12-23T15:51:38.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import datetime
import scrapy
from scrapy.loader import ItemLoader
from scrapy.loader.processors import MapCompose, TakeFirst
class WeixinItemLoader(ItemLoader):
... | 25.909091 | 135 | 0.665965 |
416ec9847d8beb28fd58dfed24f0898b601b1255 | 7,722 | py | Python | mmtbx/regression/ncs/tst_minimization_ncs_constraints_real_space.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | mmtbx/regression/ncs/tst_minimization_ncs_constraints_real_space.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | mmtbx/regression/ncs/tst_minimization_ncs_constraints_real_space.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
import time
import mmtbx.refinement.minimization_ncs_constraints
#import mmtbx.refinement.real_space.weight
from scitbx.array_family import flex
import mmtbx.ncs.ncs_utils as nu
import iotbx.ncs as ncs
import mmtbx.utils
import iotbx.pdb
import mmtbx.ncs... | 46.8 | 88 | 0.572002 |
84472b5b650301ff17aa25f4832116cd33e0adac | 1,161 | py | Python | tests/test_upload_download_artifact.py | UETAILab/uetai | ea065d51e7724cd07e215c9098bfcdddbe530481 | [
"MIT"
] | 19 | 2021-09-25T05:08:56.000Z | 2021-12-12T04:46:09.000Z | tests/test_upload_download_artifact.py | UETAILab/uetai | ea065d51e7724cd07e215c9098bfcdddbe530481 | [
"MIT"
] | 19 | 2021-08-17T08:43:30.000Z | 2021-11-10T07:34:14.000Z | tests/test_upload_download_artifact.py | UETAILab/uetai | ea065d51e7724cd07e215c9098bfcdddbe530481 | [
"MIT"
] | null | null | null | """CLI unit-test"""
import os
import shutil
import time
from unittest import TestCase
import torch
from wandb.sdk.wandb_artifacts import Artifact
from uetai.logger.summary_writer import SummaryWriter
class TestSummaryWriterWandb(TestCase):
"""artifact upload/download tests"""
def __init__(self, *args, **kwa... | 33.171429 | 83 | 0.683032 |
b63f97f78a429f5a181f3b9a31e78d4e2ac53e8e | 53 | py | Python | pyjo_mongo/__init__.py | marcopaz/pyjo_mongo | 3d30d7272f7a74eca55716816f4e0da8ba1cc2e8 | [
"MIT"
] | 3 | 2018-03-24T07:36:37.000Z | 2019-04-25T15:17:11.000Z | pyjo_mongo/__init__.py | marcopaz/pyjo_mongo | 3d30d7272f7a74eca55716816f4e0da8ba1cc2e8 | [
"MIT"
] | 1 | 2018-01-31T13:25:20.000Z | 2018-01-31T13:25:20.000Z | pyjo_mongo/__init__.py | marcopaz/pyjo_mongo | 3d30d7272f7a74eca55716816f4e0da8ba1cc2e8 | [
"MIT"
] | 3 | 2018-01-25T14:07:35.000Z | 2018-05-10T12:27:47.000Z | __version__ = '0.9.1'
from .document import Document
| 17.666667 | 30 | 0.754717 |
a784ba89bae1db295170663a7e7f316e2c05ffba | 2,623 | py | Python | poppy/cmd/akamai_update_papi_property_for_mod_san.py | satroutr/poppy | 27417f86854d9e0a04726acc263ef0a2ce9f8f6e | [
"Apache-2.0"
] | 3 | 2017-07-05T20:09:59.000Z | 2018-11-27T22:02:57.000Z | poppy/cmd/akamai_update_papi_property_for_mod_san.py | satroutr/poppy | 27417f86854d9e0a04726acc263ef0a2ce9f8f6e | [
"Apache-2.0"
] | 24 | 2017-04-18T15:14:04.000Z | 2019-03-20T19:09:07.000Z | poppy/cmd/akamai_update_papi_property_for_mod_san.py | satroutr/poppy | 27417f86854d9e0a04726acc263ef0a2ce9f8f6e | [
"Apache-2.0"
] | 8 | 2017-04-03T13:24:27.000Z | 2021-11-08T20:28:10.000Z | # Copyright (c) 2015 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 33.202532 | 75 | 0.635151 |
f5fa4273252097512890b89745fdf70dcfb11d6c | 3,550 | py | Python | run.py | anonymous-rev/review | 2cf8ef091ef4efc33752a184ab54ea95f1c921e5 | [
"MIT"
] | null | null | null | run.py | anonymous-rev/review | 2cf8ef091ef4efc33752a184ab54ea95f1c921e5 | [
"MIT"
] | null | null | null | run.py | anonymous-rev/review | 2cf8ef091ef4efc33752a184ab54ea95f1c921e5 | [
"MIT"
] | null | null | null | import os
import subprocess
SEEDS = range(10)
ALGORITHMS = ["m2td3", "soft_m2td3"]
ENVIRONMENTS_1_1 = ["Antv2-1_3", "HalfCheetahv2-1_4", "Hopperv2-1_3"]
ENVIRONMENTS_1_2 = [
"HumanoidStandupv2-1_16",
"InvertedPendulumv2-1_31",
"Walker2dv2-1_4",
]
ENVIRONMENTS_2_1 = ["Antv2-2_3_3", "HalfCheetahv2-2_4_7",... | 26.893939 | 84 | 0.644789 |
d303c609c59dc3b54a82868bf196e8ef84d6d7c7 | 27,727 | py | Python | wlmData.py | shiragolda/highfinesse_wavemeter_webapp | 5f9dadd44c51efd229e2df6a0e8b7f378b85b245 | [
"MIT"
] | null | null | null | wlmData.py | shiragolda/highfinesse_wavemeter_webapp | 5f9dadd44c51efd229e2df6a0e8b7f378b85b245 | [
"MIT"
] | null | null | null | wlmData.py | shiragolda/highfinesse_wavemeter_webapp | 5f9dadd44c51efd229e2df6a0e8b7f378b85b245 | [
"MIT"
] | null | null | null | ######################################################################################################
# @package wlmData
# @file wlmData.py
# @copyright HighFinesse GmbH.
# @author Lovas Szilard <lovas@highfinesse.de>
# @date 2018.09.14
# @version 0.2
#
# Homepage: http://www.highfinesse.com/
#
# @brief Pyth... | 40.715125 | 201 | 0.711364 |
4792c99c5eb3c7ec94067cf58fe32deb1be04462 | 5,787 | py | Python | pyeit/mesh/utils.py | DavidMetzIMT/pyEIT | a3c64f7b869e7a00a102fc93feea4999c8bed6d1 | [
"BSD-3-Clause"
] | null | null | null | pyeit/mesh/utils.py | DavidMetzIMT/pyEIT | a3c64f7b869e7a00a102fc93feea4999c8bed6d1 | [
"BSD-3-Clause"
] | null | null | null | pyeit/mesh/utils.py | DavidMetzIMT/pyEIT | a3c64f7b869e7a00a102fc93feea4999c8bed6d1 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# pylint: disable=invalid-name, no-member, no-name-in-module
""" post process for distmesh 2d and 3d """
# Copyright (c) Benyuan Liu. All rights reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division, absolute_import, print_function
import nu... | 23.913223 | 79 | 0.551236 |
bb2da422850392562a6cfc6d13599d1b52ab7c33 | 2,315 | py | Python | airflow/upgrade/rules/airflow_macro_plugin_removed.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 15 | 2017-04-06T09:01:50.000Z | 2021-10-02T13:54:31.000Z | airflow/upgrade/rules/airflow_macro_plugin_removed.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 36 | 2021-11-26T00:08:49.000Z | 2021-11-26T00:09:33.000Z | airflow/upgrade/rules/airflow_macro_plugin_removed.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | 21 | 2017-08-20T03:01:05.000Z | 2021-09-07T06:47:51.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.237288 | 85 | 0.700648 |
c73facaa61f713c6e6a4f9a286d22a3b1e67d527 | 7,671 | py | Python | setup.py | methane/python-doc-ja.sphinx-ja | b911f63318ac715733b5c10dfbc197549c85044f | [
"BSD-2-Clause"
] | null | null | null | setup.py | methane/python-doc-ja.sphinx-ja | b911f63318ac715733b5c10dfbc197549c85044f | [
"BSD-2-Clause"
] | null | null | null | setup.py | methane/python-doc-ja.sphinx-ja | b911f63318ac715733b5c10dfbc197549c85044f | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
import distribute_setup
distribute_setup.use_setuptools()
from setuptools import setup, find_packages
import os
import sys
from distutils import log
import sphinx
long_desc = '''
Sphinx is a tool that makes i... | 36.879808 | 80 | 0.575805 |
db4830eab6f19d2bed26fa392b50e3d68e0f8b44 | 4,853 | py | Python | benchmark/startQiskit_noisy1786.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1786.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1786.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=70
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 33.239726 | 82 | 0.60952 |
3e679b5e9375139c1a637104c57e68ab8ec01244 | 1,796 | py | Python | dao/ToLakeExerciseBrkdn.py | mbromberek/mdb_site | 89cb0ed87071287a947aee8f1022668c78a3f59b | [
"BSD-3-Clause"
] | null | null | null | dao/ToLakeExerciseBrkdn.py | mbromberek/mdb_site | 89cb0ed87071287a947aee8f1022668c78a3f59b | [
"BSD-3-Clause"
] | null | null | null | dao/ToLakeExerciseBrkdn.py | mbromberek/mdb_site | 89cb0ed87071287a947aee8f1022668c78a3f59b | [
"BSD-3-Clause"
] | null | null | null | #! /Users/mikeyb/Applications/python3
# -*- coding: utf-8 -*-
'''
BSD 3-Clause License
Copyright (c) 2020, Mike Bromberek
All rights reserved.
'''
'''
Used for Insert, Update, Delete for LAKE.EXERCISE_SHEET table
'''
# First party classes
import os, sys
import logging
import logging.config
import copy
# Third party ... | 28.0625 | 105 | 0.66147 |
1b8a1bfb5739e22ddc06770568245b1e946d7bbe | 3,086 | py | Python | LEDtester/LEDsimulator.py | crotty-d/led-tester | f6e91bd7a5512896d434ad586e32b6ac01ff7f3f | [
"MIT"
] | null | null | null | LEDtester/LEDsimulator.py | crotty-d/led-tester | f6e91bd7a5512896d434ad586e32b6ac01ff7f3f | [
"MIT"
] | null | null | null | LEDtester/LEDsimulator.py | crotty-d/led-tester | f6e91bd7a5512896d434ad586e32b6ac01ff7f3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import re
class LEDgrid:
"""
Class to represent grid of LEDs that be turned on and off in response to certain instructions
"""
# Class variables
lights = None
# Constructor
def __init__(self, L):
"""Creates an instance of the LED ligh... | 38.098765 | 135 | 0.488983 |
cae1d2159607b39b7ba471be4bfd0a9a9f027171 | 115 | py | Python | Cal_tool/web/cal_tool/calendar/tests/test_datetime.py | Ale763/PSOPV_GROEP3_CALTOOL | d79d7fa5e680aafa05564b0d21c9a5e079170214 | [
"MIT"
] | null | null | null | Cal_tool/web/cal_tool/calendar/tests/test_datetime.py | Ale763/PSOPV_GROEP3_CALTOOL | d79d7fa5e680aafa05564b0d21c9a5e079170214 | [
"MIT"
] | null | null | null | Cal_tool/web/cal_tool/calendar/tests/test_datetime.py | Ale763/PSOPV_GROEP3_CALTOOL | d79d7fa5e680aafa05564b0d21c9a5e079170214 | [
"MIT"
] | null | null | null | import datetime
now = datetime.datetime.now()
print(now)
future = now + datetime.timedelta(weeks=1)
print(future) | 16.428571 | 42 | 0.756522 |
08cbdf539e479d164a7a18fe653258bb8b617c6e | 9,323 | py | Python | python/how-tos/05-issue-credential/issue_credential.py | Decker-Russell/Indy-dev | 8e08dd4f538d59d41e6ca5dcdf5b577c687c48fd | [
"Apache-2.0"
] | null | null | null | python/how-tos/05-issue-credential/issue_credential.py | Decker-Russell/Indy-dev | 8e08dd4f538d59d41e6ca5dcdf5b577c687c48fd | [
"Apache-2.0"
] | null | null | null | python/how-tos/05-issue-credential/issue_credential.py | Decker-Russell/Indy-dev | 8e08dd4f538d59d41e6ca5dcdf5b577c687c48fd | [
"Apache-2.0"
] | null | null | null | """
This sample is extensions of "write_schema_and_cred_def.py"
Shows how to issue a credential as a Trust Anchor which has created a Cred Definition
for an existing Schema.
After Trust Anchor has successfully created and stored a Cred Definition using Anonymous Credentials,
Prover's wallet is created and opened, and... | 44.184834 | 178 | 0.648396 |
71f5ecfbb0a3b96527c082c26dbe0d17a75cfa68 | 17,054 | py | Python | front-end/testsuite-python-lib/Python-3.1/Lib/test/test_zlib.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2020-11-26T18:53:46.000Z | 2020-11-26T18:53:46.000Z | front-end/testsuite-python-lib/Python-3.1/Lib/test/test_zlib.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | null | null | null | front-end/testsuite-python-lib/Python-3.1/Lib/test/test_zlib.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | import unittest
from test import support
import binascii
import random
zlib = support.import_module('zlib')
class ChecksumTestCase(unittest.TestCase):
# checksum test cases
def test_crc32start(self):
self.assertEqual(zlib.crc32(b""), zlib.crc32(b"", 0))
self.assert_(zlib.crc32(b"abc", 0xfffff... | 35.235537 | 79 | 0.593116 |
30a5a6d2f9ce2f833528ef42af425818236ab850 | 5,319 | py | Python | docs/source/conf.py | robertovillarejo/DADS-Knowledge-Base | a7a2e18d5a2d416b2ea321ffdf020ad63ad6e450 | [
"MIT"
] | null | null | null | docs/source/conf.py | robertovillarejo/DADS-Knowledge-Base | a7a2e18d5a2d416b2ea321ffdf020ad63ad6e450 | [
"MIT"
] | null | null | null | docs/source/conf.py | robertovillarejo/DADS-Knowledge-Base | a7a2e18d5a2d416b2ea321ffdf020ad63ad6e450 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Base de conocimientos documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 21 17:58:30 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerat... | 30.050847 | 83 | 0.688475 |
294fd2ff2c76ea6a2e7624aa973c6f534b23b22a | 1,382 | py | Python | qtip/loader/qpi.py | hashnfv/hashnfv-qtip | 2c79d3361fdb1fcbe67682f8a205011b3ccf5e72 | [
"Apache-2.0"
] | 4 | 2016-11-27T19:21:48.000Z | 2018-01-08T21:49:03.000Z | qtip/loader/qpi.py | hashnfv/hashnfv-qtip | 2c79d3361fdb1fcbe67682f8a205011b3ccf5e72 | [
"Apache-2.0"
] | null | null | null | qtip/loader/qpi.py | hashnfv/hashnfv-qtip | 2c79d3361fdb1fcbe67682f8a205011b3ccf5e72 | [
"Apache-2.0"
] | 10 | 2017-03-19T07:38:40.000Z | 2018-01-08T21:49:09.000Z | ##############################################################################
# Copyright (c) 2016 ZTE Corp and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at... | 37.351351 | 90 | 0.636758 |
5111f883330f1a04b0e67a9815c366827a930ced | 634 | py | Python | manage.py | prasenjitaich/HotelBookingApp | a53c54fdd70f2c00c1787af681587e752248ee7c | [
"MIT"
] | null | null | null | manage.py | prasenjitaich/HotelBookingApp | a53c54fdd70f2c00c1787af681587e752248ee7c | [
"MIT"
] | null | null | null | manage.py | prasenjitaich/HotelBookingApp | a53c54fdd70f2c00c1787af681587e752248ee7c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'booking_engine.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise... | 28.818182 | 78 | 0.68612 |
e74dec0739b4a853542fc1a2f2afeb2ded1c4be9 | 814 | py | Python | src/python/grpcio_tests/tests_aio/_sanity/_sanity_test.py | mpminardi/grpc | ce9e6eeded3b9d4d7f17a5432bc79008929cb8b7 | [
"Apache-2.0"
] | 36,552 | 2015-02-26T17:30:13.000Z | 2022-03-31T22:41:33.000Z | src/python/grpcio_tests/tests_aio/_sanity/_sanity_test.py | SanjanaSingh897/grpc | 2d858866eb95ce5de8ccc8c35189a12733d8ca79 | [
"Apache-2.0"
] | 23,536 | 2015-02-26T17:50:56.000Z | 2022-03-31T23:39:42.000Z | src/python/grpcio_tests/tests_aio/_sanity/_sanity_test.py | SanjanaSingh897/grpc | 2d858866eb95ce5de8ccc8c35189a12733d8ca79 | [
"Apache-2.0"
] | 11,050 | 2015-02-26T17:22:10.000Z | 2022-03-31T10:12:35.000Z | # Copyright 2019 gRPC 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 applicable law or agreed to in writing... | 29.071429 | 74 | 0.760442 |
289a223720e73741d95ff77a7faca61021f290b3 | 6,196 | py | Python | bertrpc/client.py | mjrusso/python-bertrpc | 312aba536925206c8e50a1da9f3e6c80d4580246 | [
"MIT"
] | 15 | 2015-04-05T07:21:46.000Z | 2021-01-25T01:46:25.000Z | bertrpc/client.py | mjrusso/python-bertrpc | 312aba536925206c8e50a1da9f3e6c80d4580246 | [
"MIT"
] | 1 | 2017-01-27T10:50:10.000Z | 2017-01-27T10:50:10.000Z | bertrpc/client.py | mjrusso/python-bertrpc | 312aba536925206c8e50a1da9f3e6c80d4580246 | [
"MIT"
] | 5 | 2015-10-08T09:23:50.000Z | 2021-01-25T01:46:09.000Z | import bert
import error
import socket
import struct
class Service(object):
def __init__(self, host, port, timeout = None):
self.host = host
self.port = port
self.timeout = timeout
def request(self, kind, options=None):
if kind in ['call', 'cast']:
self._verify_opt... | 37.551515 | 113 | 0.580213 |
f15a7ff96a74084d72074d6c16d68803044f0dff | 2,601 | py | Python | meltingpot/python/utils/scenarios/wrappers/base.py | jagapiou/meltingpot | b3c07f2de74e4f2577749cfd3b3173cfe5cfdc30 | [
"Apache-2.0"
] | null | null | null | meltingpot/python/utils/scenarios/wrappers/base.py | jagapiou/meltingpot | b3c07f2de74e4f2577749cfd3b3173cfe5cfdc30 | [
"Apache-2.0"
] | null | null | null | meltingpot/python/utils/scenarios/wrappers/base.py | jagapiou/meltingpot | b3c07f2de74e4f2577749cfd3b3173cfe5cfdc30 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 30.964286 | 76 | 0.645521 |
5a6d2766eb9930a37b526a7a3e8d73e3fe87c567 | 6,790 | py | Python | src/repositories/room_messages_repository.py | WebisD/chat-irc-protocol | 6720d1789a366bfd7943b81c7c84cb0941c66e80 | [
"MIT"
] | null | null | null | src/repositories/room_messages_repository.py | WebisD/chat-irc-protocol | 6720d1789a366bfd7943b81c7c84cb0941c66e80 | [
"MIT"
] | null | null | null | src/repositories/room_messages_repository.py | WebisD/chat-irc-protocol | 6720d1789a366bfd7943b81c7c84cb0941c66e80 | [
"MIT"
] | 3 | 2021-06-03T12:27:27.000Z | 2021-06-14T22:48:36.000Z | from typing import List, Tuple
from repositories import *
from dtos.dto_room_messages import RoomMessages
__all__ = ['RoomMessagesRepository']
class RoomMessagesRepository(RepositoryInterface):
def __init__(self, db_name: str = "concord.db") -> None:
super().__init__(db_name)
self.table_name: str... | 31.004566 | 88 | 0.529161 |
651ffe53868ff5b7fc01fd3b1b7a395b1f57fae5 | 2,280 | py | Python | observatory/dashboard/models/Contributor.py | natestedman/Observatory | 6e810b22d844416b2a3057e99ef23baa0d122ab4 | [
"0BSD"
] | 1 | 2015-01-16T04:17:54.000Z | 2015-01-16T04:17:54.000Z | observatory/dashboard/models/Contributor.py | natestedman/Observatory | 6e810b22d844416b2a3057e99ef23baa0d122ab4 | [
"0BSD"
] | null | null | null | observatory/dashboard/models/Contributor.py | natestedman/Observatory | 6e810b22d844416b2a3057e99ef23baa0d122ab4 | [
"0BSD"
] | null | null | null | # Copyright (c) 2010, individual contributors (see AUTHORS file)
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" ... | 40 | 76 | 0.719298 |
d39f6776a4751d875bd81a29ed7a924ba68a64bf | 3,500 | py | Python | mailase/tests/functional/test_mail.py | greghaynes/Mailase | 23915b8aff6ac2c5b0cbc969441fd02a86048c08 | [
"Apache-2.0"
] | 1 | 2015-02-23T20:13:01.000Z | 2015-02-23T20:13:01.000Z | mailase/tests/functional/test_mail.py | greghaynes/Mailase | 23915b8aff6ac2c5b0cbc969441fd02a86048c08 | [
"Apache-2.0"
] | null | null | null | mailase/tests/functional/test_mail.py | greghaynes/Mailase | 23915b8aff6ac2c5b0cbc969441fd02a86048c08 | [
"Apache-2.0"
] | null | null | null | from testtools.matchers import Contains, Equals
from webtest.app import AppError
from mailase.tests.functional import base
class TestRootController(base.FunctionalTest):
def test_get_not_found(self):
response = self.app.get('/a/bogus/url', expect_errors=True)
assert response.status_int == 404
c... | 42.168675 | 82 | 0.575429 |
097d82d07be26b66b27252d4d95e5d82a9c0d463 | 2,700 | py | Python | footing/setup.py | Opus10/footing | 358b644a5f80d2c6a49092b719050ccd9bcfaec1 | [
"BSD-3-Clause"
] | 3 | 2022-01-31T13:56:31.000Z | 2022-03-30T01:11:08.000Z | footing/setup.py | Opus10/footing | 358b644a5f80d2c6a49092b719050ccd9bcfaec1 | [
"BSD-3-Clause"
] | null | null | null | footing/setup.py | Opus10/footing | 358b644a5f80d2c6a49092b719050ccd9bcfaec1 | [
"BSD-3-Clause"
] | null | null | null | """
footing.setup
~~~~~~~~~~~~~
Creates and initializes a project from a template
"""
import subprocess
import unittest.mock
import cookiecutter.generate as cc_generate
import cookiecutter.hooks as cc_hooks
import footing.check
import footing.constants
import footing.utils
def _patched_run_hook(hook_name, project_... | 32.53012 | 94 | 0.674444 |
d599b463f6c2b587fb24cd096131a95c9434ecff | 3,135 | py | Python | autogluon/utils/tabular/ml/models/tabular_nn/hyperparameters/searchspaces.py | zhanghang1989/autogluon | 8bfe6b0da8915020eeb9895fd18d7688c0d604c1 | [
"Apache-2.0"
] | 2 | 2021-09-14T21:28:54.000Z | 2021-11-17T09:52:41.000Z | autogluon/utils/tabular/ml/models/tabular_nn/hyperparameters/searchspaces.py | zhanghang1989/autogluon | 8bfe6b0da8915020eeb9895fd18d7688c0d604c1 | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/ml/models/tabular_nn/hyperparameters/searchspaces.py | zhanghang1989/autogluon | 8bfe6b0da8915020eeb9895fd18d7688c0d604c1 | [
"Apache-2.0"
] | 1 | 2021-02-04T23:29:47.000Z | 2021-02-04T23:29:47.000Z | """ Default hyperparameter search spaces used in Neural network model """
from .......core import Categorical, Real
from ....constants import BINARY, MULTICLASS, REGRESSION
def get_default_searchspace(problem_type, num_classes=None):
if problem_type == BINARY:
return get_searchspace_binary().copy()
el... | 48.984375 | 114 | 0.628708 |
7ebe8b55937fa9a2f0d8887aa13b77d46b58be98 | 449 | py | Python | window/__init__.py | fredi-68/OWWvisualScripting | 0123222ef9eb2a69504eb046ce250bc667922ae0 | [
"MIT"
] | 2 | 2019-07-13T23:01:05.000Z | 2021-04-28T22:11:18.000Z | window/__init__.py | fredi-68/OWWvisualScripting | 0123222ef9eb2a69504eb046ce250bc667922ae0 | [
"MIT"
] | 1 | 2019-10-06T09:34:58.000Z | 2019-10-06T09:34:58.000Z | window/__init__.py | fredi-68/OWWvisualScripting | 0123222ef9eb2a69504eb046ce250bc667922ae0 | [
"MIT"
] | null | null | null |
"""
Window Framework 3.0
"""
__title__ = "window"
__author__ = "fredi_68"
__version__ = "3.0.0"
from .window import Window, ApplicationHandle, EventHandle
from .enums import SDLFlags, SDLDrivers
from .components import Background, Image, Text, HorizontalGradient, VerticalGradient, Surface
from .style import Style, D... | 26.411765 | 94 | 0.786192 |
2c2fe66a998afeed6902018ce0aff57ab5ee81db | 3,875 | py | Python | src/test_emb.py | anhnt170489/FunMOT | 6eb794bd485be42270eaee3804e13d38a897a945 | [
"MIT"
] | null | null | null | src/test_emb.py | anhnt170489/FunMOT | 6eb794bd485be42270eaee3804e13d38a897a945 | [
"MIT"
] | null | null | null | src/test_emb.py | anhnt170489/FunMOT | 6eb794bd485be42270eaee3804e13d38a897a945 | [
"MIT"
] | 1 | 2021-11-09T02:50:19.000Z | 2021-11-09T02:50:19.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import _init_paths
import argparse
import torch
import json
import time
import os
import cv2
import math
from sklearn import metrics
from scipy import interpolate
import numpy as np
from torchvision.transforms... | 34.598214 | 120 | 0.63329 |
34059d6df06fc1cfa0e27638c93a0a0077eafc99 | 4,606 | py | Python | DSKM.py | ehsansherkat/DSKM | aacca3d7f8a5a4f352f8104aea6237e296c176e6 | [
"CC-BY-3.0"
] | null | null | null | DSKM.py | ehsansherkat/DSKM | aacca3d7f8a5a4f352f8104aea6237e296c176e6 | [
"CC-BY-3.0"
] | null | null | null | DSKM.py | ehsansherkat/DSKM | aacca3d7f8a5a4f352f8104aea6237e296c176e6 | [
"CC-BY-3.0"
] | null | null | null | """
Author: Ehsan Sherkat
Last modification date: August 30, 2018
"""
import numpy as np
import sys
import util
def DSKM(data, k):
"""
Deterministic Seeding KMeans (DSKM)
:param data
:param k: number of clusters
"""
initialCenters = np.zeros((k, data.shape[1]))
initialCentersIndex = []
... | 34.118519 | 133 | 0.6066 |
992d3f1fed7e9bdcbc8a56f3c409224eddd16616 | 1,058 | py | Python | tests_without_pytest/lesson2.2_step7.py | adilgereev/selenium_course | 7b7ca68bb7d915c3e973292ec18d8dbaf4dc363e | [
"Apache-2.0"
] | null | null | null | tests_without_pytest/lesson2.2_step7.py | adilgereev/selenium_course | 7b7ca68bb7d915c3e973292ec18d8dbaf4dc363e | [
"Apache-2.0"
] | null | null | null | tests_without_pytest/lesson2.2_step7.py | adilgereev/selenium_course | 7b7ca68bb7d915c3e973292ec18d8dbaf4dc363e | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
import time
import os
link = "http://suninjuly.github.io/file_input.html"
browser = webdriver.Chrome()
browser.get(link)
# Заполнение текстовых полей
browser.find_element_by_css_selector("body > div > form > div > input:nth-child(2)").send_keys("Шарап")
browser.find_element_by_css_selec... | 36.482759 | 109 | 0.775047 |
8b7624bc16f3e7166c768300d6bfb3f9c9645b69 | 6,170 | py | Python | hf/load/routines/settings.py | HashFast/hashfast-tools | 9617691ac997f12085b688c3ecc6746e8510976d | [
"BSD-3-Clause"
] | 1 | 2020-12-15T02:49:36.000Z | 2020-12-15T02:49:36.000Z | hf/load/routines/settings.py | HashFast/hashfast-tools | 9617691ac997f12085b688c3ecc6746e8510976d | [
"BSD-3-Clause"
] | null | null | null | hf/load/routines/settings.py | HashFast/hashfast-tools | 9617691ac997f12085b688c3ecc6746e8510976d | [
"BSD-3-Clause"
] | 3 | 2015-09-02T00:31:06.000Z | 2020-12-15T02:52:06.000Z | # Copyright (c) 2014, HashFast Technologies LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of... | 38.5625 | 121 | 0.666126 |
9e6521a63ae439e33cdb80c08ec1a9e119763c8b | 1,092 | py | Python | examples/twisted/wamp/work/newapi/test_newapi_multiple_connections.py | meejah/AutobahnPython | 54da8882eea3f4b1da62a6d3481556ab77720d41 | [
"MIT"
] | null | null | null | examples/twisted/wamp/work/newapi/test_newapi_multiple_connections.py | meejah/AutobahnPython | 54da8882eea3f4b1da62a6d3481556ab77720d41 | [
"MIT"
] | null | null | null | examples/twisted/wamp/work/newapi/test_newapi_multiple_connections.py | meejah/AutobahnPython | 54da8882eea3f4b1da62a6d3481556ab77720d41 | [
"MIT"
] | null | null | null | from twisted.internet import reactor
import txaio
from autobahn.twisted.wamp import Connection
def main1(connection):
print('main1 created', connection)
def on_join(session):
print('main1 joined', session)
session.leave()
connection.on_join(on_join)
def main2(connection):
print('ma... | 19.5 | 55 | 0.620879 |
0d6435b01a9a2d9f5b1aec4525e81de834503045 | 104 | py | Python | autodepgraph/node_functions/check_functions.py | jorgemfm27/AutoDepGraph | 2a49613dbd01a9a49a274246d79ba84387be127b | [
"MIT"
] | 2 | 2019-10-14T17:55:03.000Z | 2021-08-30T15:16:09.000Z | autodepgraph/node_functions/check_functions.py | jorgemfm27/AutoDepGraph | 2a49613dbd01a9a49a274246d79ba84387be127b | [
"MIT"
] | 51 | 2017-04-26T14:35:59.000Z | 2021-03-30T02:49:35.000Z | autodepgraph/node_functions/check_functions.py | jorgemfm27/AutoDepGraph | 2a49613dbd01a9a49a274246d79ba84387be127b | [
"MIT"
] | 9 | 2017-09-18T18:41:20.000Z | 2022-02-26T03:31:28.000Z | def return_fixed_value():
'''
Always return 1.0,
useful as a default
'''
return 1.0
| 14.857143 | 25 | 0.567308 |
659cb2cd696a8a37e4e8f9e8f6fc5a0aa05f0c63 | 1,789 | py | Python | src/sagemaker_inference/utils.py | ericangelokim/sagemaker-inference-toolkit | 24db871b1b193ac1a924c21be8c3ec48853b3263 | [
"Apache-2.0"
] | null | null | null | src/sagemaker_inference/utils.py | ericangelokim/sagemaker-inference-toolkit | 24db871b1b193ac1a924c21be8c3ec48853b3263 | [
"Apache-2.0"
] | null | null | null | src/sagemaker_inference/utils.py | ericangelokim/sagemaker-inference-toolkit | 24db871b1b193ac1a924c21be8c3ec48853b3263 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License'). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the 'license' file acc... | 27.953125 | 85 | 0.671884 |
ad0bd96d35d3f9e698ca4c1a71aa3e20ca6d2491 | 6,977 | py | Python | lambda/python/project_start_trip.py | ankushjain2001/SecuroDrive | 16ba110436d91ec657c409484797cbac7a392002 | [
"MIT"
] | null | null | null | lambda/python/project_start_trip.py | ankushjain2001/SecuroDrive | 16ba110436d91ec657c409484797cbac7a392002 | [
"MIT"
] | 1 | 2020-12-28T06:12:27.000Z | 2020-12-28T06:12:27.000Z | lambda/python/project_start_trip.py | ankushjain2001/SecuroDrive | 16ba110436d91ec657c409484797cbac7a392002 | [
"MIT"
] | 2 | 2020-12-28T06:11:23.000Z | 2021-01-10T07:04:17.000Z | import json
import paramiko
import boto3
import uuid
from random import randint
import os
import sys
import random, string
import time
import datetime
import math
import cv2
import base64
sns_client = boto3.client('sns')
ec_client = boto3.client('ec2')
db_client = boto3.client('dynamodb')
s3_client = boto3.client('s3'... | 34.711443 | 153 | 0.517988 |
d7b51163be7e7a93e15f27a342d2bed11b83da6a | 1,300 | py | Python | docs/example_erd.py | wmvanvliet/psychic | 4ab75fb655795df0272c1bb0eb0dfeb232ffe143 | [
"BSD-3-Clause"
] | 3 | 2015-06-13T16:51:36.000Z | 2017-07-02T21:06:06.000Z | docs/example_erd.py | breuderink/psychic | a89dd821b801e315df785f633e88689f4f5a93bf | [
"BSD-3-Clause"
] | null | null | null | docs/example_erd.py | breuderink/psychic | a89dd821b801e315df785f633e88689f4f5a93bf | [
"BSD-3-Clause"
] | null | null | null | import logging, glob
import golem, psychic
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal
def logvar_feat(x):
return np.log(np.var(x, axis=0))
def window(x):
return x * np.hanning(x.shape[0]).reshape(-1, 1)
# Define preprocessing pipeline
preprocessing = golem.nodes.Chain([
# Clip ... | 24.528302 | 78 | 0.716923 |
b423014243456089ecd5aad37973fde04f1c6b99 | 14,334 | py | Python | databench/analysis.py | springcoil/databench | dba2cb412da099a3eb970e4b0cf257a62b012958 | [
"MIT"
] | null | null | null | databench/analysis.py | springcoil/databench | dba2cb412da099a3eb970e4b0cf257a62b012958 | [
"MIT"
] | null | null | null | databench/analysis.py | springcoil/databench | dba2cb412da099a3eb970e4b0cf257a62b012958 | [
"MIT"
] | null | null | null | """Analysis module for Databench."""
import os
import json
import time
import gevent
import logging
import zipstream
import subprocess
import geventwebsocket
import zmq.green as zmq
from flask import Blueprint, render_template, Response
class Analysis(object):
"""Databench's analysis class.
This contains th... | 33.966825 | 78 | 0.570183 |
99747e04a3c7b93269c6c152c52fd212cabea800 | 1,492 | py | Python | tests/python/testing.py | xhuang4/xgboost | 37ba0c8c2ecc569c747456ac6f802397e6ace65d | [
"Apache-2.0"
] | 18 | 2020-08-11T08:52:29.000Z | 2021-11-14T03:30:03.000Z | tests/python/testing.py | xhuang4/xgboost | 37ba0c8c2ecc569c747456ac6f802397e6ace65d | [
"Apache-2.0"
] | null | null | null | tests/python/testing.py | xhuang4/xgboost | 37ba0c8c2ecc569c747456ac6f802397e6ace65d | [
"Apache-2.0"
] | 5 | 2020-09-14T10:58:09.000Z | 2021-08-17T13:12:59.000Z | # coding: utf-8
from xgboost.compat import SKLEARN_INSTALLED, PANDAS_INSTALLED, DT_INSTALLED
from xgboost.compat import CUDF_INSTALLED, DASK_INSTALLED
def no_sklearn():
return {'condition': not SKLEARN_INSTALLED,
'reason': 'Scikit-Learn is not installed'}
def no_dask():
return {'condition': not ... | 25.724138 | 76 | 0.626676 |
18524e7ce1368f0c1b14f5cf0a29af45cbb7e7e5 | 2,393 | py | Python | src/model/CrevNet/i_RevNet_Block.py | dreaming-coder/DeepLab | 3020544e2f9e139dde7bd04f6ff59e6f44d49c6e | [
"Apache-2.0"
] | 3 | 2021-05-31T09:25:59.000Z | 2022-03-10T08:09:51.000Z | src/model/CrevNet/i_RevNet_Block.py | dreaming-coder/DeepLab | 3020544e2f9e139dde7bd04f6ff59e6f44d49c6e | [
"Apache-2.0"
] | 1 | 2021-09-26T16:37:39.000Z | 2021-09-28T00:43:05.000Z | src/model/CrevNet/i_RevNet_Block.py | dreaming-coder/DeepLab | 3020544e2f9e139dde7bd04f6ff59e6f44d49c6e | [
"Apache-2.0"
] | null | null | null | from typing import Sequence
from torch import nn, Tensor
__all__ = ["i_RevNet_Block"]
# noinspection PyShadowingNames
class i_RevNet_Block(nn.Module):
"""
经过 i-RevNet 后,通道数和尺寸相等
"""
def __init__(self, channels: int):
super(i_RevNet_Block, self).__init__()
self.channels = channels
... | 27.505747 | 75 | 0.559131 |
f611fbdb93ab39dba3c4ba441cb4d7f7fb42a86c | 260 | py | Python | config.py | dacerb/pywords-challenge | 0a6604d14c60a6e5de2df17d30cd4421628a2ea0 | [
"MIT"
] | null | null | null | config.py | dacerb/pywords-challenge | 0a6604d14c60a6e5de2df17d30cd4421628a2ea0 | [
"MIT"
] | null | null | null | config.py | dacerb/pywords-challenge | 0a6604d14c60a6e5de2df17d30cd4421628a2ea0 | [
"MIT"
] | null | null | null |
## Ruta donde se encuentran las colecciones
FILE_PATH = "../collection/"
## Configuracion para la conexion a MongoDB
MONGO_HOST ="localhost"
MONGO_PORT = 27017
MONGO_DB ="test"
MONGO_USER ="test_usr"
MONGO_PASS ="SuperTest"
MONGO_COLLECTION ="collection" | 23.636364 | 43 | 0.761538 |
45ae92bd4b6765aa039c1ea404339e7f6e897e49 | 7,174 | py | Python | train.py | WeiweiDuan/TOD | d3005eecef1f1dcb08fce99cb56f09ba46e36e82 | [
"Unlicense"
] | null | null | null | train.py | WeiweiDuan/TOD | d3005eecef1f1dcb08fce99cb56f09ba46e36e82 | [
"Unlicense"
] | null | null | null | train.py | WeiweiDuan/TOD | d3005eecef1f1dcb08fce99cb56f09ba46e36e82 | [
"Unlicense"
] | null | null | null | from keras.layers import Lambda, Input, Dense, Merge, Concatenate,Multiply, Add, add, Activation
from keras.models import Model
from keras.datasets import mnist
from keras.losses import mse, binary_crossentropy
from keras.utils import plot_model
from keras import backend as K
from keras.optimizers import *
from keras.c... | 37.957672 | 103 | 0.727628 |
bc8f6b5f3ad2ea1c4ec69f1e6d9529683dfd5b33 | 29,788 | py | Python | few_nlu/few_nlu.py | duzx16/P-tuning-v2 | b62f4581e45d7975bd3b6554449bffb87d43f101 | [
"Apache-2.0"
] | null | null | null | few_nlu/few_nlu.py | duzx16/P-tuning-v2 | b62f4581e45d7975bd3b6554449bffb87d43f101 | [
"Apache-2.0"
] | null | null | null | few_nlu/few_nlu.py | duzx16/P-tuning-v2 | b62f4581e45d7975bd3b6554449bffb87d43f101 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets 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/LI... | 47.357711 | 159 | 0.664596 |
03536fb8297daba960bdb5d674f5b1ef2b83f196 | 1,893 | py | Python | pype/tools/pyblish_pype/constants.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | 87 | 2021-05-07T08:40:46.000Z | 2022-03-19T00:36:25.000Z | openpype/tools/pyblish_pype/constants.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 1,019 | 2021-04-26T06:22:56.000Z | 2022-03-31T16:30:43.000Z | openpype/tools/pyblish_pype/constants.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 33 | 2021-04-29T12:35:54.000Z | 2022-03-25T14:48:42.000Z | from Qt import QtCore
EXPANDER_WIDTH = 20
def flags(*args, **kwargs):
type_name = kwargs.pop("type_name", "Flags")
with_base = kwargs.pop("with_base", False)
enums = {}
for idx, attr_name in enumerate(args):
if with_base:
if idx == 0:
enums[attr_name] = 0
... | 19.316327 | 48 | 0.601162 |
b8623ba8e2e5a099b8470b56d8586c05c387eebb | 2,585 | py | Python | Tests/test_bigint.py | dsonbill/IronPython3-NETCore | 8c76bdbec1754233f04b41ecd28e9bae2c862fd0 | [
"Apache-2.0"
] | 2 | 2019-09-21T22:22:30.000Z | 2020-05-09T12:45:51.000Z | Tests/test_bigint.py | dsonbill/IronPython3-NETCore | 8c76bdbec1754233f04b41ecd28e9bae2c862fd0 | [
"Apache-2.0"
] | null | null | null | Tests/test_bigint.py | dsonbill/IronPython3-NETCore | 8c76bdbec1754233f04b41ecd28e9bae2c862fd0 | [
"Apache-2.0"
] | null | null | null | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of th... | 35.902778 | 155 | 0.599613 |
e6b608aea4b9bb6b1fd9bd18d2a233fffe68fc54 | 738 | py | Python | env_flag.py | paulmelnikow/env-flag | be074534896af557f54caef4f8d1cf64228f3aee | [
"BSD-2-Clause"
] | null | null | null | env_flag.py | paulmelnikow/env-flag | be074534896af557f54caef4f8d1cf64228f3aee | [
"BSD-2-Clause"
] | 7 | 2018-11-26T10:21:18.000Z | 2019-04-03T10:37:15.000Z | env_flag.py | paulmelnikow/env-flag-fork | be074534896af557f54caef4f8d1cf64228f3aee | [
"BSD-2-Clause"
] | null | null | null | __version__ = '1.1.0'
def env_flag(env_var, default=False):
"""
Return the specified environment variable coerced to a bool, as follows:
- When the variable is unset, or set to the empty string, return `default`.
- When the variable is set to a truthy value, returns `True`.
These are the truthy ... | 32.086957 | 79 | 0.624661 |
48d85ef46246873b21fc464b8ee01432399f6bc9 | 11,040 | py | Python | bnpy/allocmodel/topics/LocalStepSingleDoc.py | co2meal/-bnpy-dev | 74f69afde6c9dac8de4c074842df53ae87a15ac1 | [
"BSD-3-Clause"
] | null | null | null | bnpy/allocmodel/topics/LocalStepSingleDoc.py | co2meal/-bnpy-dev | 74f69afde6c9dac8de4c074842df53ae87a15ac1 | [
"BSD-3-Clause"
] | null | null | null | bnpy/allocmodel/topics/LocalStepSingleDoc.py | co2meal/-bnpy-dev | 74f69afde6c9dac8de4c074842df53ae87a15ac1 | [
"BSD-3-Clause"
] | null | null | null | from scipy.special import digamma, gammaln
import numpy as np
def calcLocalParams_SingleDoc(
wc_d, Lik_d, alphaEbeta, alphaEbetaRem=None,
DocTopicCount_d=None, sumResp_d=None,
nCoordAscentItersLP=10, convThrLP=0.001,
restartLP=0,
**kwargs):
''' Infer local parameters for a ... | 35.612903 | 78 | 0.656884 |
29b5efbdc95a6c51e3142f8305541dfb270c96fa | 6,763 | py | Python | shellpartylib/lib/messages/shellpay.py | satoshichain/satoshiparty-lib | 87b99678e5498b1f536f9be589b1b0cde6f21ad0 | [
"MIT"
] | null | null | null | shellpartylib/lib/messages/shellpay.py | satoshichain/satoshiparty-lib | 87b99678e5498b1f536f9be589b1b0cde6f21ad0 | [
"MIT"
] | null | null | null | shellpartylib/lib/messages/shellpay.py | satoshichain/satoshiparty-lib | 87b99678e5498b1f536f9be589b1b0cde6f21ad0 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import binascii
import struct
import logging
logger = logging.getLogger(__name__)
from shellpartylib.lib import config
from shellpartylib.lib import exceptions
from shellpartylib.lib import util
from shellpartylib.lib import log
FORMAT = '>32s32s'
LENGTH = 32 + 32
ID = 11
def initialise(db):
... | 42.006211 | 157 | 0.640248 |
bb9e8e6a380aac2b42a120a11ed1a8e292a0efe7 | 3,526 | py | Python | virtual/lib/python3.8/site-packages/pip/_internal/commands/uninstall.py | Jamesmwangi245/flask-3 | fb5bdb44cc55a45a27a206d08cb811bedfc6b21e | [
"MIT"
] | 7,089 | 2015-01-01T10:48:04.000Z | 2022-03-31T08:47:02.000Z | virtual/lib/python3.8/site-packages/pip/_internal/commands/uninstall.py | Jamesmwangi245/flask-3 | fb5bdb44cc55a45a27a206d08cb811bedfc6b21e | [
"MIT"
] | 8,417 | 2015-01-01T13:03:16.000Z | 2022-03-31T17:40:27.000Z | virtual/lib/python3.8/site-packages/pip/_internal/commands/uninstall.py | Jamesmwangi245/flask-3 | fb5bdb44cc55a45a27a206d08cb811bedfc6b21e | [
"MIT"
] | 2,663 | 2015-01-02T04:02:12.000Z | 2022-03-30T02:30:46.000Z | import logging
from optparse import Values
from typing import List
from pip._vendor.packaging.utils import canonicalize_name
from pip._internal.cli.base_command import Command
from pip._internal.cli.req_command import SessionCommandMixin, warn_if_run_as_root
from pip._internal.cli.status_codes import SUCCESS
from pip... | 33.264151 | 82 | 0.598128 |
e572e794ab0a85a2882e51223807e73b6f05cfea | 13,306 | py | Python | sdk/attestation/azure-security-attestation/azure/security/attestation/_administration_client.py | lynshi/azure-sdk-for-python | 40c530f2e9a6d93025b01cc8f6c94829c7fe95fc | [
"MIT"
] | null | null | null | sdk/attestation/azure-security-attestation/azure/security/attestation/_administration_client.py | lynshi/azure-sdk-for-python | 40c530f2e9a6d93025b01cc8f6c94829c7fe95fc | [
"MIT"
] | null | null | null | sdk/attestation/azure-security-attestation/azure/security/attestation/_administration_client.py | lynshi/azure-sdk-for-python | 40c530f2e9a6d93025b01cc8f6c94829c7fe95fc | [
"MIT"
] | null | null | null | # 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.
# -----------------------------------------------------------------------... | 52.180392 | 223 | 0.713888 |
6d6353e8ab5a417c54b97d05deee4f9b291f98a0 | 18,092 | py | Python | examples/entity_disambiguation/utils.py | Raabia-Asif/luke | 9323b216dd5f72b61545bc4133f7709fd19bfa95 | [
"Apache-2.0"
] | null | null | null | examples/entity_disambiguation/utils.py | Raabia-Asif/luke | 9323b216dd5f72b61545bc4133f7709fd19bfa95 | [
"Apache-2.0"
] | null | null | null | examples/entity_disambiguation/utils.py | Raabia-Asif/luke | 9323b216dd5f72b61545bc4133f7709fd19bfa95 | [
"Apache-2.0"
] | null | null | null | # This code is based on the code obtained from here:
# https://github.com/lephong/mulrel-nel/blob/db14942450f72c87a4d46349860e96ef2edf353d/nel/dataset.py
import copy
import logging
import math
import os
import re
from collections import defaultdict
import numpy as np
logger = logging.getLogger(__name__)
punc_remover... | 39.588621 | 120 | 0.569368 |
becdd5f65cb0b3e70266abfc15a4dbdc41f63157 | 1,167 | py | Python | test/test_deployment_template_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | test/test_deployment_template_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | test/test_deployment_template_resource.py | cvent/octopus-deploy-api-client | 0e03e842e1beb29b132776aee077df570b88366a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | 28.463415 | 126 | 0.760069 |
30d33ee88e62767835fb63e2577a3a5c0cfa9e16 | 131,771 | py | Python | venv/Lib/site-packages/sqlalchemy/orm/session.py | YunJaePark3908/BaseAPIServer | 17ab922917541406a3c2d75b428614ce97152a16 | [
"Apache-2.0"
] | 2 | 2021-02-20T22:43:47.000Z | 2021-05-06T03:43:20.000Z | venv/Lib/site-packages/sqlalchemy/orm/session.py | YunJaePark3908/BaseAPIServer | 17ab922917541406a3c2d75b428614ce97152a16 | [
"Apache-2.0"
] | 8 | 2021-03-26T19:13:07.000Z | 2021-04-19T18:34:33.000Z | venv/Lib/site-packages/sqlalchemy/orm/session.py | YunJaePark3908/BaseAPIServer | 17ab922917541406a3c2d75b428614ce97152a16 | [
"Apache-2.0"
] | 3 | 2021-11-30T11:10:26.000Z | 2021-12-08T05:59:31.000Z | # orm/session.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Provides the Session class and related utilities."""
import itertools
import sys
... | 37.941549 | 79 | 0.611804 |
084c6c9f212abe1ee4f1b0134832af80d9d67817 | 1,938 | py | Python | Tools/Recon/Network/vulnerability_scanner.py | Apollo-o/Whistle | f6df3b67be81fe36f0ecb8b4831bc5dc9cdc4a52 | [
"CC0-1.0"
] | null | null | null | Tools/Recon/Network/vulnerability_scanner.py | Apollo-o/Whistle | f6df3b67be81fe36f0ecb8b4831bc5dc9cdc4a52 | [
"CC0-1.0"
] | null | null | null | Tools/Recon/Network/vulnerability_scanner.py | Apollo-o/Whistle | f6df3b67be81fe36f0ecb8b4831bc5dc9cdc4a52 | [
"CC0-1.0"
] | null | null | null | # Author: o-o
# Date: 8/24/2020
# Description: A Simple Vulnerability Scanner.
import random
import nmap
import os
# Vulnerability Scanner.
# Precondition: None.
# Postcondition: Vulnerable Device.
def scanner():
# Scan IP Addresses.
nm = nmap.PortScannerAsync()
while True:
# Await Results.... | 34.607143 | 202 | 0.509804 |
d6ed8246560e9a927b6391f2f98eeb841ae2218a | 4,090 | py | Python | dfirtrack_main/tests/taskstatus/test_taskstatus_views.py | blackhatethicalhacking/dfirtrack | 9c2e13015291f2981d14d63c9683e7c447e91f3a | [
"MIT"
] | 4 | 2020-03-06T17:37:09.000Z | 2020-03-17T07:50:55.000Z | dfirtrack_main/tests/taskstatus/test_taskstatus_views.py | blackhatethicalhacking/dfirtrack | 9c2e13015291f2981d14d63c9683e7c447e91f3a | [
"MIT"
] | null | null | null | dfirtrack_main/tests/taskstatus/test_taskstatus_views.py | blackhatethicalhacking/dfirtrack | 9c2e13015291f2981d14d63c9683e7c447e91f3a | [
"MIT"
] | 1 | 2020-03-06T20:54:52.000Z | 2020-03-06T20:54:52.000Z | from django.contrib.auth.models import User
from django.test import TestCase
from dfirtrack_main.models import Taskstatus
import urllib.parse
class TaskstatusViewTestCase(TestCase):
""" taskstatus view tests """
@classmethod
def setUpTestData(cls):
# create object
Taskstatus.objects.creat... | 39.326923 | 118 | 0.675306 |
62841e254fabfa0cca5714a96165dda0f1c43ccb | 225 | py | Python | openinterface/__init__.py | uibcdf/Pynterpred | 05fc100712b9fa894d604fb82e0a0fcd488dccc7 | [
"MIT"
] | 1 | 2020-06-02T04:02:15.000Z | 2020-06-02T04:02:15.000Z | openinterface/__init__.py | uibcdf/OpenInterface | 05fc100712b9fa894d604fb82e0a0fcd488dccc7 | [
"MIT"
] | 1 | 2018-05-14T15:27:00.000Z | 2018-05-14T15:29:23.000Z | openinterface/__init__.py | uibcdf/OpenInterface | 05fc100712b9fa894d604fb82e0a0fcd488dccc7 | [
"MIT"
] | null | null | null | from .methods import buried_factors
from .methods import contact_map
from .methods import connectivity
from .methods import nearby_connectivity
from .methods import contacting_residues
from .methods import sasa, sasa_buried
| 28.125 | 40 | 0.853333 |
16ae2dea0fb354931eef2afeb6edbb7c9337a1af | 3,801 | py | Python | action/example/linear.py | JayMiao/MLAction | fec1c08fa33ed1f5d9b0befecc6dac551cc02302 | [
"MIT"
] | 1 | 2017-02-13T10:25:11.000Z | 2017-02-13T10:25:11.000Z | action/example/linear.py | JayMiao/MLAction | fec1c08fa33ed1f5d9b0befecc6dac551cc02302 | [
"MIT"
] | null | null | null | action/example/linear.py | JayMiao/MLAction | fec1c08fa33ed1f5d9b0befecc6dac551cc02302 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from autograd import grad
import autograd.numpy as np
from sklearn.model_selection import train_test_split
from sklearn.datasets import make_classification
# Change to DEBUG to see convergence
logging.basicConfig(level=logging.ERROR)
np.random.seed(1000)
EPS = 1e-15
def unhot(... | 31.941176 | 112 | 0.624836 |
f395127902101da886fe54862d539467df3e8468 | 15,860 | py | Python | pandas/io/excel/_openpyxl.py | ylin00/pandas | dc1c849f0cf4f1b8c5602a54f5231f6b57d1d913 | [
"BSD-3-Clause"
] | 1 | 2020-10-08T00:29:41.000Z | 2020-10-08T00:29:41.000Z | pandas/io/excel/_openpyxl.py | ylin00/pandas | dc1c849f0cf4f1b8c5602a54f5231f6b57d1d913 | [
"BSD-3-Clause"
] | null | null | null | pandas/io/excel/_openpyxl.py | ylin00/pandas | dc1c849f0cf4f1b8c5602a54f5231f6b57d1d913 | [
"BSD-3-Clause"
] | null | null | null | from typing import TYPE_CHECKING, Dict, List, Optional
import numpy as np
from pandas._typing import FilePathOrBuffer, Scalar, StorageOptions
from pandas.compat._optional import import_optional_dependency
from pandas.io.excel._base import BaseExcelReader, ExcelWriter
from pandas.io.excel._util import validate_freeze... | 30.676983 | 86 | 0.527112 |
4e102321fc7fcc789e03195eee31cd5296b57415 | 960 | py | Python | evolving_NN/task2.py | gister9000/Combining-fuzzy-logic-neural-networks-and-genetic-algorithm | 918431f54898592efc877af347a780bcfce50835 | [
"MIT"
] | null | null | null | evolving_NN/task2.py | gister9000/Combining-fuzzy-logic-neural-networks-and-genetic-algorithm | 918431f54898592efc877af347a780bcfce50835 | [
"MIT"
] | null | null | null | evolving_NN/task2.py | gister9000/Combining-fuzzy-logic-neural-networks-and-genetic-algorithm | 918431f54898592efc877af347a780bcfce50835 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# Neural network dataset preparation
# inputs: x, y
# outputs: 100 | 010 | 001
lines = open("zad7-dataset.txt", "r").readlines()
class_100x = []
class_010x = []
class_001x = []
class_100y = []
class_010y = []
class_001y = []
for line in lines:
values = line.replac... | 29.090909 | 54 | 0.644792 |
44cca340b0ba7220fb7815c5d7f0abd73b8a5877 | 2,352 | py | Python | virtual/lib/python3.6/site-packages/django_settings_export.py | Irene-nandy/hello_gallery | 964f85828aba20ef795f8c9d826ba08a8c688462 | [
"MIT"
] | null | null | null | virtual/lib/python3.6/site-packages/django_settings_export.py | Irene-nandy/hello_gallery | 964f85828aba20ef795f8c9d826ba08a8c688462 | [
"MIT"
] | null | null | null | virtual/lib/python3.6/site-packages/django_settings_export.py | Irene-nandy/hello_gallery | 964f85828aba20ef795f8c9d826ba08a8c688462 | [
"MIT"
] | null | null | null | """
Export Django settings to templates
https://github.com/jkbrzt/django-settings-export
"""
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
__version__ = '1.2.1'
VARIABLE_NAME = getattr(django_settings,
'SETTINGS_EXPORT_VARIABLE_... | 29.772152 | 77 | 0.630527 |
8376e4b804b72319a03fcddd8a01bb1e1f17ee13 | 9,125 | py | Python | gui/mem_dixy/tag/alphabet.py | Mem-Dixy/web | e5373ec86e3b7048c353071dc3555a96340b035e | [
"MIT"
] | null | null | null | gui/mem_dixy/tag/alphabet.py | Mem-Dixy/web | e5373ec86e3b7048c353071dc3555a96340b035e | [
"MIT"
] | 1 | 2021-05-09T23:36:35.000Z | 2021-05-09T23:36:35.000Z | gui/mem_dixy/tag/alphabet.py | Mem-Dixy/web | e5373ec86e3b7048c353071dc3555a96340b035e | [
"MIT"
] | null | null | null | from mem_dixy.Unicode.U0000 import *
from mem_dixy.Unicode.U0080 import *
from mem_dixy.Unicode_Encoding.U0000 import encoding as Basic_Latin
from mem_dixy.Unicode_Encoding.U0080 import encoding as Latin_1_Supplement
# convert = Basic_Latin | Latin_1_Supplement # NOTE: 3.9+ ONLY
convert = {**Basic_Latin, **Latin_1_S... | 28.076923 | 608 | 0.761973 |
6737586dac2520ab5a1c6291aef2b8db4d0dcebf | 914 | py | Python | A5T5SQLite.py | qasimy123/assignment5-CMPUT291 | 5082dc251cd7ffb484fbde8dce9d2bfe607fa19e | [
"Apache-2.0"
] | null | null | null | A5T5SQLite.py | qasimy123/assignment5-CMPUT291 | 5082dc251cd7ffb484fbde8dce9d2bfe607fa19e | [
"Apache-2.0"
] | null | null | null | A5T5SQLite.py | qasimy123/assignment5-CMPUT291 | 5082dc251cd7ffb484fbde8dce9d2bfe607fa19e | [
"Apache-2.0"
] | null | null | null | from util import connect
import time
QUERY_5 = '''
select
round(avg(price), 2)
from
listings
where
neighbourhood = :entry;
'''
def main():
neighbourhood = input("Specify the neighbourhood: ")
task5(neighbourhood)
def task5(neighbourhood: str):
connection = connect()
... | 20.311111 | 72 | 0.610503 |
f761c1c9b3c02a9061c67c09ee61ef9728f11fd4 | 8,889 | py | Python | apps/pretrained_compound/pretrain_gnns/pretrain_contextpred.py | WorldEditors/PaddleHelix | 7dbe947417538d7478fbab4438905b30c1d709c3 | [
"Apache-2.0"
] | null | null | null | apps/pretrained_compound/pretrain_gnns/pretrain_contextpred.py | WorldEditors/PaddleHelix | 7dbe947417538d7478fbab4438905b30c1d709c3 | [
"Apache-2.0"
] | null | null | null | apps/pretrained_compound/pretrain_gnns/pretrain_contextpred.py | WorldEditors/PaddleHelix | 7dbe947417538d7478fbab4438905b30c1d709c3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#-*-coding:utf-8-*-
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apa... | 40.404545 | 326 | 0.684666 |
be0238b714eca8a49893c84d1c6fda0730388931 | 30,176 | py | Python | desktop/core/src/desktop/settings.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/settings.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | null | null | null | desktop/core/src/desktop/settings.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 36.356627 | 130 | 0.727399 |
c97cd8336f7d7980911d0bdea93137e7bc95ba24 | 2,585 | py | Python | script/build.py | sam444/electron-nodejs | efeabfe3effc4503c0852b5dc47ebfdd6c0326a2 | [
"MIT"
] | 2 | 2018-09-16T02:38:30.000Z | 2019-01-21T15:09:48.000Z | script/build.py | sam444/electron-nodejs | efeabfe3effc4503c0852b5dc47ebfdd6c0326a2 | [
"MIT"
] | null | null | null | script/build.py | sam444/electron-nodejs | efeabfe3effc4503c0852b5dc47ebfdd6c0326a2 | [
"MIT"
] | 1 | 2021-06-22T21:00:15.000Z | 2021-06-22T21:00:15.000Z | #!/usr/bin/env python
import argparse
import os
import subprocess
import sys
from lib.config import MIPS64EL_GCC, get_target_arch, build_env
from lib.util import electron_gyp, import_vs_env
CONFIGURATIONS = ['Release', 'Debug']
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
VENDOR_DIR = o... | 34.466667 | 78 | 0.613926 |
3ac5a4bd857064649f6b9ff7383c04ec9b9b7d8b | 1,814 | py | Python | socialism.py | CT-Yao/crypto-tools | d6d0ae4d744205bb108d8cddde8bc98e8a37567f | [
"CC0-1.0"
] | 1 | 2021-10-08T15:06:30.000Z | 2021-10-08T15:06:30.000Z | socialism.py | CT-Yao/crypto-tools | d6d0ae4d744205bb108d8cddde8bc98e8a37567f | [
"CC0-1.0"
] | null | null | null | socialism.py | CT-Yao/crypto-tools | d6d0ae4d744205bb108d8cddde8bc98e8a37567f | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# File : socialism.py
# Author : Chengtao Yao
# Email : chengtao.yao@outlook.com
# Created Time : 2021/10/10 0:07
# Description :
import random
key_lst = ['富强', '民主', '文明', '和谐',
'自由', '平等', '公正', '法治',
'爱国', '敬业', '诚信', '友善']
def socialism_enc... | 25.549296 | 89 | 0.495039 |
8ec5e1f39e68f4e59054e241ed4209aa8acc27d4 | 1,487 | py | Python | helx/typing.py | epignatelli/helx | 3dbbf228a63b79169e80f890b97db3d7473e956e | [
"Apache-2.0"
] | 1 | 2021-07-27T00:03:47.000Z | 2021-07-27T00:03:47.000Z | helx/typing.py | epignatelli/helx | 3dbbf228a63b79169e80f890b97db3d7473e956e | [
"Apache-2.0"
] | 10 | 2021-06-16T08:42:25.000Z | 2021-07-05T08:41:51.000Z | helx/typing.py | epignatelli/helx | 3dbbf228a63b79169e80f890b97db3d7473e956e | [
"Apache-2.0"
] | null | null | null | import functools
from typing import Any, Callable, Dict, NamedTuple, Tuple, TypeVar, Union
import jax.numpy as jnp
Key = TypeVar("Key", bound=jnp.ndarray)
Shape = TypeVar("Shape", bound=Tuple[int, ...])
Size = TypeVar("Size", bound=Tuple[int, int])
Params = TypeVar("Params", bound=Any)
# Init = TypeVar("Init", Callab... | 30.346939 | 97 | 0.709482 |
84902d7c38ab64190805ed0df814a3ddc1b8c371 | 14,616 | py | Python | lib/jnpr/junos/factory/factory_loader.py | a-v-popov/py-junos-eznc | fc5debc6ff181f7a4c83780b5981dd89394f7c92 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2016-02-23T09:49:46.000Z | 2019-06-18T15:59:01.000Z | lib/jnpr/junos/factory/factory_loader.py | a-v-popov/py-junos-eznc | fc5debc6ff181f7a4c83780b5981dd89394f7c92 | [
"Apache-2.0",
"BSD-3-Clause"
] | 12 | 2017-11-09T09:49:03.000Z | 2018-01-08T09:50:54.000Z | lib/jnpr/junos/factory/factory_loader.py | a-v-popov/py-junos-eznc | fc5debc6ff181f7a4c83780b5981dd89394f7c92 | [
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2015-05-13T11:05:42.000Z | 2017-11-09T09:32:07.000Z | """
This file contains the FactoryLoader class that is used to dynamically
create Runstat Table and View objects from a <dict> of data. The <dict> can
originate from any kind of source: YAML, JSON, program. For examples of YAML
refer to the .yml files in this jnpr.junos.op directory.
"""
# stdlib
from copy import dee... | 36 | 89 | 0.552956 |
d01ed85920df3b4e23c898a9dbb5c8468e22d5b7 | 302 | py | Python | microutil/tests/test_segmentation.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | 2 | 2021-07-06T05:31:51.000Z | 2021-10-05T13:29:59.000Z | microutil/tests/test_segmentation.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | 16 | 2021-02-08T22:36:42.000Z | 2021-11-01T22:36:02.000Z | microutil/tests/test_segmentation.py | Hekstra-Lab/microutil | ab3b7b51754bf90ef35d6eea1c7b35cece638f0e | [
"BSD-3-Clause"
] | null | null | null | from microutil.segmentation import individualize
from .utils import open_zarr
def test_individualize():
input = open_zarr('test-data/individualize/input')
expected = open_zarr('test-data/individualize/expected')
individualize(input, min_distance=10)
assert expected.identical(input)
| 27.454545 | 60 | 0.778146 |
1fec7dd0b2058483397b0933bf66ba5d4055b8a1 | 1,125 | py | Python | day2/day2.py | jberends/aoc2021 | 063a0b19bb13b3a084f367e7c279afddc4f39113 | [
"MIT"
] | null | null | null | day2/day2.py | jberends/aoc2021 | 063a0b19bb13b3a084f367e7c279afddc4f39113 | [
"MIT"
] | null | null | null | day2/day2.py | jberends/aoc2021 | 063a0b19bb13b3a084f367e7c279afddc4f39113 | [
"MIT"
] | null | null | null | # uri: https://adventofcode.com/2021/day/2
from ..base import get_input
inputs_string = """forward 5
down 5
forward 8
up 3
down 8
forward 2
"""
file_path = get_input(2, ".txt")
with file_path.open() as fd:
inputs = [row.split(" ") for row in fd.readlines()]
# inputs = [row.split(" ") for row in inputs_string.spl... | 19.396552 | 79 | 0.592889 |
d6ffcd5f75ef01f61f45f7cb6a47875f2bfc3e5d | 919 | py | Python | pytorch/autograd.py | tianqizhao-louis/nlp-research | e513d84a02ecd50a0d48418fca7d33c74cc0c9a4 | [
"MIT"
] | null | null | null | pytorch/autograd.py | tianqizhao-louis/nlp-research | e513d84a02ecd50a0d48418fca7d33c74cc0c9a4 | [
"MIT"
] | null | null | null | pytorch/autograd.py | tianqizhao-louis/nlp-research | e513d84a02ecd50a0d48418fca7d33c74cc0c9a4 | [
"MIT"
] | null | null | null | import torch
x = torch.ones(5)
y = torch.zeros(3)
w = torch.randn(5, 3, requires_grad=True)
b = torch.randn(3, requires_grad=True)
z = torch.matmul(x, w)+b
loss = torch.nn.functional.binary_cross_entropy_with_logits(z, y)
print('Gradient function for z =',z.grad_fn)
print('Gradient function for loss =', loss.grad_fn)... | 26.257143 | 65 | 0.729053 |
acda14538a13843fcd80cefaf866483fd9420255 | 255 | py | Python | DjangoGit/tasks/views.py | PlainestAmigo/Web-Programming | 9e875b32227196e7bea218e0c3e5998b2fc20f19 | [
"MIT"
] | null | null | null | DjangoGit/tasks/views.py | PlainestAmigo/Web-Programming | 9e875b32227196e7bea218e0c3e5998b2fc20f19 | [
"MIT"
] | null | null | null | DjangoGit/tasks/views.py | PlainestAmigo/Web-Programming | 9e875b32227196e7bea218e0c3e5998b2fc20f19 | [
"MIT"
] | null | null | null | from django.shortcuts import render
tasks = ["foo", "bar", "baz"]
# Create your views here.
def index(request):
return render(request, "tasks/index.html", {
"tasks": tasks
})
def add(request):
return render(request, "tasks/add.html") | 23.181818 | 48 | 0.65098 |
c43ca6b0565f368da1fa42ccb5d282b5e70fb396 | 7,399 | py | Python | pandas/core/window/expanding.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-02-18T00:47:14.000Z | 2019-02-18T00:47:14.000Z | pandas/core/window/expanding.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-08-18T16:00:45.000Z | 2019-08-18T16:00:45.000Z | pandas/core/window/expanding.py | mtrbean/pandas | c0ff67a22df9c18da1172766e313732ed2ab6c30 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-12-01T23:32:18.000Z | 2019-12-01T23:32:18.000Z | from textwrap import dedent
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender, Substitution
from pandas.core.window.common import _doc_template, _GroupByMixin, _shared_docs
from pandas.core.window.rolling import _Rolling_and_Expanding
class Expanding(_Rolling_and_Expanding)... | 28.348659 | 84 | 0.605893 |
20e0ef1633e6b97ab69f8d657d87a365bf0f892b | 8,739 | py | Python | minpy/core.py | hotpxl/minpy-jit | fdf968ebe526f1e3f1d7fd7b5c3595d70a4b851d | [
"Apache-2.0"
] | 1 | 2019-09-13T20:23:14.000Z | 2019-09-13T20:23:14.000Z | minpy/core.py | hotpxl/minpy-jit | fdf968ebe526f1e3f1d7fd7b5c3595d70a4b851d | [
"Apache-2.0"
] | null | null | null | minpy/core.py | hotpxl/minpy-jit | fdf968ebe526f1e3f1d7fd7b5c3595d70a4b851d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast
import copy
import inspect
import textwrap
import functools
import contextlib
def parse_function_definition(func):
source_code = textwrap.dedent(in... | 30.771127 | 79 | 0.57581 |
8a2651029dcbc2b4986ae2f14af920e33843f8fe | 428 | py | Python | ics/structures/op_eth_link_mode.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 45 | 2017-10-17T08:42:08.000Z | 2022-02-21T16:26:48.000Z | ics/structures/op_eth_link_mode.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 106 | 2017-03-07T21:10:39.000Z | 2022-03-29T15:32:46.000Z | ics/structures/op_eth_link_mode.py | intrepidcs/python_ics | 7bfa8c2f893763608f9255f9536a2019cfae0c23 | [
"Unlicense"
] | 17 | 2017-04-04T12:30:22.000Z | 2022-01-28T05:30:25.000Z | # This file was auto generated; Do not modify, if you value your sanity!
import ctypes
import enum
class op_eth_link_mode(enum.IntEnum):
"""A ctypes-compatible IntEnum superclass."""
@classmethod
def from_param(cls, obj):
return int(obj)
OPETH_LINK_AUTO = 0
OPETH_LINK_MASTER = enum.auto... | 20.380952 | 72 | 0.721963 |
0ce9b49dd83c0f1d0128604b4be41783f71efbaf | 3,058 | py | Python | pyami/projects.py | ayush4921/pyami | eb296c6dfbbd162239918370cf58d98076b31d5d | [
"Apache-2.0"
] | null | null | null | pyami/projects.py | ayush4921/pyami | eb296c6dfbbd162239918370cf58d98076b31d5d | [
"Apache-2.0"
] | null | null | null | pyami/projects.py | ayush4921/pyami | eb296c6dfbbd162239918370cf58d98076b31d5d | [
"Apache-2.0"
] | null | null | null | import logging
logging.warning("loading projects.py")
import os
from util import Util
from constants import PHYSCHEM_RESOURCES, DIAGRAMS_DIR, MINIPROJ, PROJECTS, MINICORPORA
class AmiProjects:
"""project files"""
CCT = "cct"
DIFFPROT = "diffprot"
DISEASE = "disease"
FFML = "ffml"
FFML20 = "... | 43.685714 | 126 | 0.686069 |
0d7eddcd928352b3c9a111bc6e57796c19256bcf | 20,407 | py | Python | src/biokbase/narrative/tests/test_appmanager.py | Tianhao-Gu/narrative-jupyterlab | 94a4b4a6bbb583f65ce50c8f8343083aceafff05 | [
"MIT"
] | 2 | 2019-05-03T10:12:56.000Z | 2020-10-26T05:35:16.000Z | src/biokbase/narrative/tests/test_appmanager.py | Tianhao-Gu/narrative-jupyterlab | 94a4b4a6bbb583f65ce50c8f8343083aceafff05 | [
"MIT"
] | 9 | 2019-05-19T04:13:55.000Z | 2022-03-23T19:18:44.000Z | src/biokbase/narrative/tests/test_appmanager.py | Tianhao-Gu/narrative-jupyterlab | 94a4b4a6bbb583f65ce50c8f8343083aceafff05 | [
"MIT"
] | 2 | 2019-03-12T17:41:10.000Z | 2019-04-24T15:33:50.000Z | """
Tests for the app manager.
"""
from biokbase.narrative.jobs.appmanager import AppManager
import biokbase.narrative.jobs.specmanager as specmanager
import biokbase.narrative.app_util as app_util
from biokbase.narrative.jobs.job import Job
from IPython.display import HTML
import unittest
import mock
from .narrative_m... | 40.409901 | 104 | 0.563973 |
9a3ecce6e575b63417dd588e31c0f442bdcfaf5d | 1,638 | py | Python | unchaind/sink.py | cdanis/unchaind | 88973d0bb732ebe4074204091562307e34581576 | [
"MIT"
] | 2 | 2019-01-02T20:43:50.000Z | 2019-01-28T10:15:13.000Z | unchaind/sink.py | supakeen/kaart-killbot | 88973d0bb732ebe4074204091562307e34581576 | [
"MIT"
] | 40 | 2018-12-26T16:20:57.000Z | 2019-03-31T13:47:32.000Z | unchaind/sink.py | supakeen/kaart-killbot | 88973d0bb732ebe4074204091562307e34581576 | [
"MIT"
] | 4 | 2018-12-25T22:53:51.000Z | 2021-02-20T19:54:51.000Z | """Functions to talk to chat programs such as Slack and Discord."""
import json
import logging
from typing import Dict, Any, Optional
from unchaind.http import HTTPSession
log = logging.getLogger(__name__)
async def discord(
notifier: Dict[str, Any],
message: str,
*,
payload: Optional[Dict[str, A... | 24.088235 | 84 | 0.611722 |
eebbb05a57322251f7034718c7a9486054e7503d | 1,829 | py | Python | hc2002/plugin/user_data.py | biochimia/hc2000 | ec12df0326f368dde424bab861fc8fd1c673c010 | [
"Apache-2.0"
] | null | null | null | hc2002/plugin/user_data.py | biochimia/hc2000 | ec12df0326f368dde424bab861fc8fd1c673c010 | [
"Apache-2.0"
] | null | null | null | hc2002/plugin/user_data.py | biochimia/hc2000 | ec12df0326f368dde424bab861fc8fd1c673c010 | [
"Apache-2.0"
] | null | null | null | import hc2002.plugin as plugin
import os.path
import email.mime.base
import email.mime.multipart
import email.mime.text
plugin.register_for_resource(__name__, 'hc2002.resource.instance')
_magic_to_mime = {
'#!': ('text', 'x-shellscript'),
'#cloud-boothook': ('text', 'cloud-boothook'),
'#clo... | 30.483333 | 78 | 0.630399 |
d1fc6bc34e22dd92a597363d8b28e1dd2044d705 | 2,499 | py | Python | test/android_protocol_test/mqtt_communicator.py | NCLPhD/FedML | ffa15262ee963b9c856f34f0b2202f4dfeb3a76b | [
"Apache-2.0"
] | null | null | null | test/android_protocol_test/mqtt_communicator.py | NCLPhD/FedML | ffa15262ee963b9c856f34f0b2202f4dfeb3a76b | [
"Apache-2.0"
] | null | null | null | test/android_protocol_test/mqtt_communicator.py | NCLPhD/FedML | ffa15262ee963b9c856f34f0b2202f4dfeb3a76b | [
"Apache-2.0"
] | null | null | null | import json
import uuid
import paho.mqtt.client as mqtt
import fedml
BROKER_HOST = "mqtt.fedml.ai"
BROKER_PORT = 1883
MQTT_KEEPALIVE = 60
EDGE_ID = "EDGE-%s" % uuid.uuid4().hex
MQTT_USER = "admin"
MQTT_PWD = "password"
class EdgeCommunicator(object):
def __init__(self, host=BROKER_HOST, port=BROKER_PORT, clien... | 34.232877 | 78 | 0.666267 |
c10358dbe91b094ae78ef0880312fbb011039c73 | 1,527 | py | Python | magenta/models/basic_rnn/basic_rnn_generator.py | Sprog-gle/Magenta | 55bfd53f8112cf34952e67efc646b98523837f8f | [
"Apache-2.0"
] | null | null | null | magenta/models/basic_rnn/basic_rnn_generator.py | Sprog-gle/Magenta | 55bfd53f8112cf34952e67efc646b98523837f8f | [
"Apache-2.0"
] | null | null | null | magenta/models/basic_rnn/basic_rnn_generator.py | Sprog-gle/Magenta | 55bfd53f8112cf34952e67efc646b98523837f8f | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 37.243902 | 75 | 0.740668 |
460c15724f528a2d2428ec575ad8af192bba1250 | 5,531 | py | Python | python/test/perf_metric_test.py | jayholman/vmaf | 0bba4faf68ab89e38314cc596e6908b4fb83984d | [
"Apache-2.0"
] | 2 | 2019-07-26T03:49:07.000Z | 2021-06-17T12:16:46.000Z | python/test/perf_metric_test.py | jayholman/vmaf | 0bba4faf68ab89e38314cc596e6908b4fb83984d | [
"Apache-2.0"
] | null | null | null | python/test/perf_metric_test.py | jayholman/vmaf | 0bba4faf68ab89e38314cc596e6908b4fb83984d | [
"Apache-2.0"
] | null | null | null | import sys
import unittest
import numpy as np
import scipy.io
from vmaf.config import VmafConfig
from vmaf.core.perf_metric import RmsePerfMetric, SrccPerfMetric, PccPerfMetric, \
KendallPerfMetric, AucPerfMetric, ResolvingPowerPerfMetric
__copyright__ = "Copyright 2016-2019, Netflix, Inc."
__license__ = "Apache... | 42.546154 | 106 | 0.661725 |
02defeb64fc7e3b22a4459b787f46e1f65bb010d | 1,303 | py | Python | sections/7.1-comprehensions.py | Cygnut/python-tutorial | 9a8049cf2a8239bfd0fe7e2cb33fdf134b7d7e16 | [
"MIT"
] | null | null | null | sections/7.1-comprehensions.py | Cygnut/python-tutorial | 9a8049cf2a8239bfd0fe7e2cb33fdf134b7d7e16 | [
"MIT"
] | null | null | null | sections/7.1-comprehensions.py | Cygnut/python-tutorial | 9a8049cf2a8239bfd0fe7e2cb33fdf134b7d7e16 | [
"MIT"
] | null | null | null | """list comprehensions are a very powerful tool, which creates a new list based on another list, in
a single, readable line.
For example, let's say we need to create a list of integers which specify the length of each word in
a certain sentence, but only if the word is not the word "the".
"""
# %%
sentence = "the qu... | 23.267857 | 100 | 0.704528 |
8bc5801a3c2698d299810dbdfd110ddf48e02a55 | 1,044 | py | Python | twitoff/db_model.py | charlie-may86/twitoff2 | fbe0bb30d9111d69f91a87be176e60c6c359daec | [
"MIT"
] | null | null | null | twitoff/db_model.py | charlie-may86/twitoff2 | fbe0bb30d9111d69f91a87be176e60c6c359daec | [
"MIT"
] | null | null | null | twitoff/db_model.py | charlie-may86/twitoff2 | fbe0bb30d9111d69f91a87be176e60c6c359daec | [
"MIT"
] | null | null | null | '''SQLAlchemy models for Twitoff'''
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
# follower_count = db.Column(db.Integer, nullable=False)
# tweet IDS are ord... | 37.285714 | 81 | 0.699234 |
41487df334fc555bef564be7e424581fd05c8ad1 | 16,393 | py | Python | src/paypal/express/gateway.py | aarticianpc/greenpointtrees | 52afcb20c77fb3ee454ed0d1271a596031cffff6 | [
"MIT"
] | null | null | null | src/paypal/express/gateway.py | aarticianpc/greenpointtrees | 52afcb20c77fb3ee454ed0d1271a596031cffff6 | [
"MIT"
] | null | null | null | src/paypal/express/gateway.py | aarticianpc/greenpointtrees | 52afcb20c77fb3ee454ed0d1271a596031cffff6 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import logging
from decimal import Decimal as D
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.http import urlencode
from django.utils import six
from django.utils.translation import ugettext as _
from django.template.d... | 38.662736 | 113 | 0.666016 |
2d8fd25e267468010456eb172db412dda294a20d | 1,938 | py | Python | douglas/memcache.py | willkg/douglas | 7e46919d0baefecba414f41980cbe9c0529a884e | [
"MIT"
] | 1 | 2016-02-12T15:26:24.000Z | 2016-02-12T15:26:24.000Z | douglas/memcache.py | willkg/douglas | 7e46919d0baefecba414f41980cbe9c0529a884e | [
"MIT"
] | 1 | 2015-04-20T13:33:39.000Z | 2015-04-20T13:33:39.000Z | douglas/memcache.py | willkg/douglas | 7e46919d0baefecba414f41980cbe9c0529a884e | [
"MIT"
] | null | null | null | # Whether or not to use memcache.
usecache = False
_memcache_cache = {}
def get_cache(scope, key):
return _memcache_cache.setdefault(scope, {})[key]
def set_cache(scope, key, value):
_memcache_cache.setdefault(scope, {})[key] = value
def memcache_decorator(scope, instance=False):
"""Caches function r... | 28.5 | 73 | 0.595459 |
235454fcaf4603c01156647864c942b5077d1953 | 707 | py | Python | July21/EssentialPython/functions/morefunctions.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | 2 | 2021-05-29T18:21:50.000Z | 2021-07-24T13:03:30.000Z | July21/EssentialPython/functions/morefunctions.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | null | null | null | July21/EssentialPython/functions/morefunctions.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | 2 | 2021-05-25T10:19:54.000Z | 2021-09-21T12:20:48.000Z | #def sum(number1, number2):
# pass
def sum(*args):
print(type(args))
result = 0
for arg in args:
result += arg
return result
result = sum(1,2)
print(result)
result = sum(1,2,3,4,5,6,7,8,9)
print(result)
result = sum()
print(result)
def explain_kwargs(**kwargs):
print(type(kwargs))
... | 18.128205 | 79 | 0.640736 |
f729bdf98d041be17618159f1292cff87ad80dce | 23,247 | py | Python | Application/ryu-lagopus-ext-lagopus-general-tunnel-ext/ryu/ofproto/nx_actions.py | okinawaopenlabs/SD-WAN | 5d8ed92620f07907b89f373f2d93f41e1a265268 | [
"Apache-2.0"
] | 9 | 2019-12-12T06:57:51.000Z | 2022-01-10T04:01:49.000Z | Application/ryu-lagopus-ext-lagopus-general-tunnel-ext/ryu/ofproto/nx_actions.py | okinawaopenlabs/SD-WAN | 5d8ed92620f07907b89f373f2d93f41e1a265268 | [
"Apache-2.0"
] | null | null | null | Application/ryu-lagopus-ext-lagopus-general-tunnel-ext/ryu/ofproto/nx_actions.py | okinawaopenlabs/SD-WAN | 5d8ed92620f07907b89f373f2d93f41e1a265268 | [
"Apache-2.0"
] | 1 | 2020-03-26T17:58:28.000Z | 2020-03-26T17:58:28.000Z | # Copyright (C) 2015 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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:... | 37.616505 | 79 | 0.534392 |
bc24ee6e2180e68e5d3a04d27d633522342fcaad | 1,926 | py | Python | mother_map.py | dimelab-public/MTConnect-Testbed-Simulator-Public | 4b42052953d042418ddecbd5ed8608ccbdbaa189 | [
"MIT"
] | null | null | null | mother_map.py | dimelab-public/MTConnect-Testbed-Simulator-Public | 4b42052953d042418ddecbd5ed8608ccbdbaa189 | [
"MIT"
] | null | null | null | mother_map.py | dimelab-public/MTConnect-Testbed-Simulator-Public | 4b42052953d042418ddecbd5ed8608ccbdbaa189 | [
"MIT"
] | 1 | 2019-12-09T14:52:18.000Z | 2019-12-09T14:52:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 17 13:32:51 2019
@author: smehdi@ncsu.edu
"""
import folium
import pandas as pd
master = pd.read_csv('dbs\master.csv')
lat=list(master['latitude'])
lon=list(master['longitude'])
orgs = list(master['names'])
machs = list(master['machines'])
cu = list(master['CapacityU... | 25.012987 | 200 | 0.636033 |
78ffa878e6c22d0e8fcd0280583f1711954e1ef5 | 3,418 | py | Python | apache/setup.py | chotiwat/integrations-core | 57a4437790cafcb769e120aa64d84aaecbf6a414 | [
"BSD-3-Clause"
] | 2 | 2019-04-03T17:21:38.000Z | 2020-02-04T16:28:05.000Z | apache/setup.py | chotiwat/integrations-core | 57a4437790cafcb769e120aa64d84aaecbf6a414 | [
"BSD-3-Clause"
] | 10 | 2018-02-27T19:06:07.000Z | 2021-08-30T03:23:26.000Z | apache/setup.py | chotiwat/integrations-core | 57a4437790cafcb769e120aa64d84aaecbf6a414 | [
"BSD-3-Clause"
] | 6 | 2018-01-09T21:37:20.000Z | 2020-05-26T09:28:09.000Z | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.247934 | 92 | 0.630778 |
6a13667456a5bd369871d09c0dd2ca844aaadd85 | 5,987 | py | Python | github3_utils/check_labels.py | domdfcoding/github3-utils | f71797293606d09f7fc7b052045cf95efde2fc3e | [
"MIT"
] | 1 | 2021-08-16T18:39:12.000Z | 2021-08-16T18:39:12.000Z | github3_utils/check_labels.py | domdfcoding/github3-utils | f71797293606d09f7fc7b052045cf95efde2fc3e | [
"MIT"
] | 15 | 2021-01-04T18:29:30.000Z | 2021-03-29T19:03:58.000Z | github3_utils/check_labels.py | domdfcoding/github3-utils | f71797293606d09f7fc7b052045cf95efde2fc3e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# check_labels.py
"""
Helpers for creating labels to mark pull requests with which tests are failing.
.. versionadded:: 0.4.0
"""
#
# Copyright © 2021 Dominic Davis-Foster <dominic@davis-foster.co.uk>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of thi... | 28.509524 | 95 | 0.72173 |
74b5ad65af191c7caf0e33ba56ff18385148ba6b | 91,792 | py | Python | lib/wallet.py | zakurai/electrum-xsh3 | cec82adcfa3acacc1af806f5eec8aeb97592e919 | [
"MIT"
] | 1 | 2021-05-29T02:35:02.000Z | 2021-05-29T02:35:02.000Z | lib/wallet.py | zakurai/electrum-xsh3 | cec82adcfa3acacc1af806f5eec8aeb97592e919 | [
"MIT"
] | 1 | 2021-11-15T17:48:00.000Z | 2021-11-15T17:48:00.000Z | lib/wallet.py | zakurai/electrum-xsh3 | cec82adcfa3acacc1af806f5eec8aeb97592e919 | [
"MIT"
] | 1 | 2019-02-27T20:56:22.000Z | 2019-02-27T20:56:22.000Z | # Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights t... | 38.551869 | 150 | 0.587023 |
40aa2dca22ddd651bd4f80c6bfa204554df39d2c | 4,909 | py | Python | talon_one/models/inline_response20015.py | talon-one/talon_one.py | f863bb3c2cc5ddc94d9227adcf14947b2ea7db41 | [
"MIT"
] | 1 | 2021-03-05T06:41:26.000Z | 2021-03-05T06:41:26.000Z | talon_one/models/inline_response20015.py | talon-one/talon_one.py | f863bb3c2cc5ddc94d9227adcf14947b2ea7db41 | [
"MIT"
] | 1 | 2021-09-07T08:56:58.000Z | 2021-09-07T08:56:58.000Z | talon_one/models/inline_response20015.py | talon-one/talon_one.py | f863bb3c2cc5ddc94d9227adcf14947b2ea7db41 | [
"MIT"
] | 1 | 2019-05-21T10:27:54.000Z | 2019-05-21T10:27:54.000Z | # coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | 32.946309 | 647 | 0.614382 |
14134f0108c740e30fb4ea423a032590f49fa6f3 | 1,967 | py | Python | examples/optimal_time_ocp/pendulum_min_time_Mayer.py | vennand/BiorbdOptim | 9c741da6366e0c9d5d727da6297a17a599759eb1 | [
"MIT"
] | null | null | null | examples/optimal_time_ocp/pendulum_min_time_Mayer.py | vennand/BiorbdOptim | 9c741da6366e0c9d5d727da6297a17a599759eb1 | [
"MIT"
] | null | null | null | examples/optimal_time_ocp/pendulum_min_time_Mayer.py | vennand/BiorbdOptim | 9c741da6366e0c9d5d727da6297a17a599759eb1 | [
"MIT"
] | null | null | null | import biorbd
from bioptim import (
OptimalControlProgram,
DynamicsTypeList,
DynamicsType,
ObjectiveList,
Objective,
BoundsList,
QAndQDotBounds,
InitialGuessList,
ShowResult,
Data,
)
def prepare_ocp(biorbd_model_path, final_time, number_shooting_points):
# --- Options --- ... | 25.217949 | 99 | 0.648195 |
b8ed8d951e93628e877377ee276bce31f1889b1e | 1,028 | py | Python | stubs.min/System/Windows/Media/__init___parts/TileMode.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Media/__init___parts/TileMode.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Media/__init___parts/TileMode.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class TileMode(Enum,IComparable,IFormattable,IConvertible):
"""
Describes how a System.Windows.Media.TileBrush paints tiles onto an output area.
enum TileMode,values: FlipX (1),FlipXY (3),FlipY (2),None (0),Tile (4)
"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) ... | 27.783784 | 215 | 0.660506 |
77c9b1262e28e99e277ed8ddb3f0512b09c81605 | 17,198 | py | Python | sdk/python/pulumi_gcp/compute/get_backend_service.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/compute/get_backend_service.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/compute/get_backend_service.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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... | 44.210797 | 606 | 0.690662 |
22c91c0c6eb375339fc4bfae421afa9164d012ce | 886 | py | Python | tests/integration_tests/builder_tests/test_init_beach_line.py | lycantropos/voronoi | 977e0b3e5eff2dd294e2e6ce1a8030c763e86233 | [
"MIT"
] | null | null | null | tests/integration_tests/builder_tests/test_init_beach_line.py | lycantropos/voronoi | 977e0b3e5eff2dd294e2e6ce1a8030c763e86233 | [
"MIT"
] | null | null | null | tests/integration_tests/builder_tests/test_init_beach_line.py | lycantropos/voronoi | 977e0b3e5eff2dd294e2e6ce1a8030c763e86233 | [
"MIT"
] | null | null | null | from hypothesis import given
from tests.integration_tests.hints import BoundPortedBuildersWithDiagramsPair
from tests.integration_tests.utils import (are_bound_ported_builders_equal,
are_bound_ported_diagrams_equal)
from tests.utils import equivalence
from . import strategies... | 40.272727 | 79 | 0.788939 |
2fa6caeb21388891f99d20a7dd7d05fc250fac17 | 3,442 | bzl | Python | bazel/bison.bzl | snsokolov/verible | 7c59a17b975c9e87fb5d675540dc788d389edac9 | [
"Apache-2.0"
] | null | null | null | bazel/bison.bzl | snsokolov/verible | 7c59a17b975c9e87fb5d675540dc788d389edac9 | [
"Apache-2.0"
] | null | null | null | bazel/bison.bzl | snsokolov/verible | 7c59a17b975c9e87fb5d675540dc788d389edac9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2019 The Verible 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 applicable law or agreed ... | 34.42 | 88 | 0.551424 |
a8ee3a33c2129ab23691836ef9413a79749633a8 | 18,711 | py | Python | sdk/tables/azure-data-tables/azure/data/tables/_table_client.py | KarishmaGhiya/azure-sdk-for-python | 1216acf1caa13575d3b8cfa0b401e42eefa9f17f | [
"MIT"
] | null | null | null | sdk/tables/azure-data-tables/azure/data/tables/_table_client.py | KarishmaGhiya/azure-sdk-for-python | 1216acf1caa13575d3b8cfa0b401e42eefa9f17f | [
"MIT"
] | null | null | null | sdk/tables/azure-data-tables/azure/data/tables/_table_client.py | KarishmaGhiya/azure-sdk-for-python | 1216acf1caa13575d3b8cfa0b401e42eefa9f17f | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import fu... | 39.895522 | 117 | 0.593501 |
857af7246de1c36a5bc6142305fc36c3fb7f7f06 | 18,814 | py | Python | UnityEngine/Collider2D/__init__.py | Grim-es/udon-pie-auto-completion | c2cd86554ed615cdbbb01e19fa40665eafdfaedc | [
"MIT"
] | null | null | null | UnityEngine/Collider2D/__init__.py | Grim-es/udon-pie-auto-completion | c2cd86554ed615cdbbb01e19fa40665eafdfaedc | [
"MIT"
] | null | null | null | UnityEngine/Collider2D/__init__.py | Grim-es/udon-pie-auto-completion | c2cd86554ed615cdbbb01e19fa40665eafdfaedc | [
"MIT"
] | null | null | null | from typing import overload
from UdonPie import System
from UdonPie import UnityEngine
from UdonPie.Undefined import *
class Collider2D:
def __new__(cls, arg1=None):
'''
:returns: Collider2D
:rtype: UnityEngine.Collider2D
'''
pass
@staticmethod
def op_Implicit(arg... | 22.344418 | 82 | 0.550601 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.