hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796e49c9beae5641c8fb886486c32131b56bb0cb | 2,993 | py | Python | monitor/cli/gpu/power.py | glentner/monitor | 7dbbd70ede2630d487d7727e98f2432e5e301151 | [
"Apache-2.0"
] | 1 | 2020-11-15T09:11:31.000Z | 2020-11-15T09:11:31.000Z | monitor/cli/gpu/power.py | glentner/ResourceMonitor | 7dbbd70ede2630d487d7727e98f2432e5e301151 | [
"Apache-2.0"
] | 6 | 2021-12-17T05:43:06.000Z | 2021-12-17T05:43:13.000Z | monitor/cli/gpu/power.py | glentner/monitor | 7dbbd70ede2630d487d7727e98f2432e5e301151 | [
"Apache-2.0"
] | null | null | null | # This program is free software: you can redistribute it and/or modify it under the
# terms of the Apache License (v2.0) as published by the Apache Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or... | 30.85567 | 86 | 0.666221 |
796e4ac33c506fb6e467c4e7cc3f159775c48a38 | 2,695 | py | Python | libact/query_strategies/tests/test_uncertainty_sampling.py | joequant/libact | 4fbf4d59fd0d4e23858b264de2f35f674c50445b | [
"BSD-2-Clause"
] | 1 | 2019-05-09T13:00:45.000Z | 2019-05-09T13:00:45.000Z | libact/query_strategies/tests/test_uncertainty_sampling.py | DunZhang/libact | e37e9ed6c36febe701d84b2d495c958ab02f0bc8 | [
"BSD-2-Clause"
] | null | null | null | libact/query_strategies/tests/test_uncertainty_sampling.py | DunZhang/libact | e37e9ed6c36febe701d84b2d495c958ab02f0bc8 | [
"BSD-2-Clause"
] | 1 | 2021-01-18T20:07:57.000Z | 2021-01-18T20:07:57.000Z | import unittest
import numpy as np
from numpy.testing import assert_array_equal
from libact.base.dataset import Dataset
from libact.models import LogisticRegression, SVM, Perceptron
from libact.query_strategies import UncertaintySampling, QUIRE
from libact.labelers import IdealLabeler
def init_toyexample(X, y):
... | 34.113924 | 79 | 0.624861 |
796e4ad3b122de0f062ccdc6b07938f4417aab23 | 761 | py | Python | molecule/default/tests/test_default.py | Jakski/ansible-role-sshd | 85c3b29c9fcf5069598e32425b046f5a0b6beac2 | [
"MIT"
] | null | null | null | molecule/default/tests/test_default.py | Jakski/ansible-role-sshd | 85c3b29c9fcf5069598e32425b046f5a0b6beac2 | [
"MIT"
] | null | null | null | molecule/default/tests/test_default.py | Jakski/ansible-role-sshd | 85c3b29c9fcf5069598e32425b046f5a0b6beac2 | [
"MIT"
] | null | null | null | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_configuration(host):
sshd = host.file('/etc/ssh/sshd_config')
assert sshd.contains(r'^PermitRootLogin no$')
assert sshd.co... | 28.185185 | 63 | 0.704336 |
796e4bab9d06adbf78a618e5511b49b5ef887904 | 393 | py | Python | trueSite/trueSite/wsgi.py | Alexa201228/math_project | a56cab598aa6a704be6ff54c0102b6a6fcb3c0b7 | [
"bzip2-1.0.6"
] | null | null | null | trueSite/trueSite/wsgi.py | Alexa201228/math_project | a56cab598aa6a704be6ff54c0102b6a6fcb3c0b7 | [
"bzip2-1.0.6"
] | null | null | null | trueSite/trueSite/wsgi.py | Alexa201228/math_project | a56cab598aa6a704be6ff54c0102b6a6fcb3c0b7 | [
"bzip2-1.0.6"
] | null | null | null | """
WSGI config for trueSite project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
796e4cbdcf5ff54c085108340e84840e61561342 | 900 | py | Python | eventvec/utils/timebank_prepositions.py | vedmathai/event-vec | a43cc47c3ce7fc33092ade42f8f3b7a36a84fdf9 | [
"MIT"
] | null | null | null | eventvec/utils/timebank_prepositions.py | vedmathai/event-vec | a43cc47c3ce7fc33092ade42f8f3b7a36a84fdf9 | [
"MIT"
] | null | null | null | eventvec/utils/timebank_prepositions.py | vedmathai/event-vec | a43cc47c3ce7fc33092ade42f8f3b7a36a84fdf9 | [
"MIT"
] | null | null | null | import json
opposite_dict = {}
opposite_pairs = [
("INCLUDES", "IS_INCLUDED"),
("AFTER", "BEFORE"),
("IBEFORE", "IAFTER"),
("ENDS", "BEGINS"),
("IDENTITY", "IDENTITY"),
("SIMULTANEOUS", "SIMULTANEOUS"),
("CULMINATES", "INITIATES"),
("ENDED_BY", "BEGUN_BY"),
("INITIATES", "TERMINATES... | 29.032258 | 93 | 0.68 |
796e4cbfb2b439e96ad1289a5f6bb9a57a27670a | 1,115 | py | Python | examples/doframework_example.py | IBM/doframework | 86fd211a8a71d56b7cd8868e2a8f27bff06fade9 | [
"Apache-2.0"
] | null | null | null | examples/doframework_example.py | IBM/doframework | 86fd211a8a71d56b7cd8868e2a8f27bff06fade9 | [
"Apache-2.0"
] | null | null | null | examples/doframework_example.py | IBM/doframework | 86fd211a8a71d56b7cd8868e2a8f27bff06fade9 | [
"Apache-2.0"
] | null | null | null | #
# Copyright IBM Corporation 2021
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 33.787879 | 79 | 0.753363 |
796e4cf01fbe0fa59cb0fcf5d673e237366ab938 | 76 | py | Python | ABC030/ABC030d.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC030/ABC030d.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ABC030/ABC030d.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | #ABC030d
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
| 15.2 | 28 | 0.789474 |
796e4d5fbf23322911eed51b4f52fdfb7e2c52c7 | 647 | py | Python | cityu-lib/cityu-lib/licenses/make.py | Aahung/cityu-library | 62abddf2a6347d0a5fc4304450fea8fc292c9fb3 | [
"MIT"
] | 1 | 2015-07-14T00:16:39.000Z | 2015-07-14T00:16:39.000Z | licenses/genack.py | buzzcloudau/ConstructCloud | f1526e32806d33896e6b6d37605adfa66149be96 | [
"AML",
"Zlib",
"MIT"
] | null | null | null | licenses/genack.py | buzzcloudau/ConstructCloud | f1526e32806d33896e6b6d37605adfa66149be96 | [
"AML",
"Zlib",
"MIT"
] | null | null | null | import os
import sys
import plistlib
from copy import deepcopy
os.chdir(sys.path[0])
plist = {'PreferenceSpecifiers': [], 'StringsTable': 'Acknowledgements'}
base_group = {'Type': 'PSGroupSpecifier', 'FooterText': '', 'Title': ''}
for filename in os.listdir("."):
if filename.endswith(".license"):
current... | 26.958333 | 72 | 0.659969 |
796e4dc43e1c832009d75e4784c07836c509d31a | 2,747 | py | Python | fdk_client/platform/models/ProductCreateUpdate.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/ProductCreateUpdate.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/ProductCreateUpdate.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Platform Models."""
from marshmallow import fields, Schema
from marshmallow.validate import OneOf
from ..enums import *
from ..models.BaseSchema import BaseSchema
from .OrderQuantity import OrderQuantity
from .CustomOrder import CustomOrder
from .ProductPublish import Produc... | 16.158824 | 79 | 0.682927 |
796e4ee3ac13fb0e1f1d6ae750babfdd72c6b2f3 | 5,472 | py | Python | python/src/pipeline/executors/acquisition_experiment.py | vigenere23/finger-angles-predictions-EMG | b5aa3e5fb0159a18fa909bc4c51f6ee62ef3888d | [
"Apache-2.0"
] | null | null | null | python/src/pipeline/executors/acquisition_experiment.py | vigenere23/finger-angles-predictions-EMG | b5aa3e5fb0159a18fa909bc4c51f6ee62ef3888d | [
"Apache-2.0"
] | 2 | 2021-12-18T18:09:15.000Z | 2021-12-18T18:09:15.000Z | python/src/pipeline/executors/acquisition_experiment.py | vigenere23/finger-angles-predictions-EMG | b5aa3e5fb0159a18fa909bc4c51f6ee62ef3888d | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
import os
from pathlib import Path
from datetime import datetime
from multiprocessing import Queue
from typing import Dict, List
from src.pipeline.executors.base import Executor, ExecutorFactory, ProcessesExecutor
from src.pipeline.executors.csv import CSVExecutorFactory
from src.pipel... | 36.972973 | 103 | 0.64492 |
796e4f2c87956d07e161e0031fa3f8c7ebf5e750 | 7,134 | py | Python | ogr/factory.py | maniis/ogr | 2ca00be36e7103103f743e551adb1358b2ab662a | [
"MIT"
] | null | null | null | ogr/factory.py | maniis/ogr | 2ca00be36e7103103f743e551adb1358b2ab662a | [
"MIT"
] | null | null | null | ogr/factory.py | maniis/ogr | 2ca00be36e7103103f743e551adb1358b2ab662a | [
"MIT"
] | null | null | null | # type: ignore
# MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, ... | 34.970588 | 100 | 0.674657 |
796e500284035342b31b35ae14759edca6043a1c | 350 | py | Python | doc/examples/network_sender_example.py | rec/leds | ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a | [
"MIT"
] | 253 | 2015-01-03T23:17:57.000Z | 2021-12-14T02:31:08.000Z | doc/examples/network_sender_example.py | rec/leds | ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a | [
"MIT"
] | 879 | 2015-01-11T16:07:25.000Z | 2021-12-10T16:24:31.000Z | doc/examples/network_sender_example.py | rec/leds | ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a | [
"MIT"
] | 71 | 2015-01-04T01:02:47.000Z | 2022-03-25T18:30:10.000Z | from bibliopixel.drivers.network import Network
from bibliopixel.led import Strip
#must init with same number of pixels as receiver
driver = Network(10, host = "192.168.1.18")
led = Strip(driver)
from bibliopixel.animation import StripChannelTest
anim = StripChannelTest(led)
try:
anim.run()
except KeyboardInterrupt:... | 23.333333 | 50 | 0.782857 |
796e50d09d8af75934dd6a4fbcf1ed2eec9c19b4 | 3,252 | py | Python | src/models/train_model.py | juliaavaladares/data-science-ethereum | 035cf959123645394e09566092e3529716f83652 | [
"BSD-3-Clause"
] | null | null | null | src/models/train_model.py | juliaavaladares/data-science-ethereum | 035cf959123645394e09566092e3529716f83652 | [
"BSD-3-Clause"
] | null | null | null | src/models/train_model.py | juliaavaladares/data-science-ethereum | 035cf959123645394e09566092e3529716f83652 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import numpy as np
from tqdm import tqdm
from sklearn import preprocessing
from sklearn.model_selection import StratifiedKFold
from sklearn.linear_model import LogisticRegression
from sklearn import metrics
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClass... | 34.595745 | 164 | 0.701415 |
796e50e3ec9372499fc0542c3d2281dee0782bfa | 447 | py | Python | Offer/Python/13.py | AutuanLiu/LeetCode2019 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | [
"MIT"
] | 1 | 2019-06-20T07:43:59.000Z | 2019-06-20T07:43:59.000Z | Offer/Python/13.py | AutuanLiu/Code-Storm2019 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | [
"MIT"
] | null | null | null | Offer/Python/13.py | AutuanLiu/Code-Storm2019 | 8efc7c5475fd888f7d86c3b08a3c1c9e55c1ac30 | [
"MIT"
] | null | null | null | # 双指针
class Solution:
def reOrderArray(self, array):
if len(array) > 0:
for i in range(len(array)):
for j in range(len(array) - 1, i, -1):
if (array[j] & 1 and not array[j - 1] & 1):
array[j], array[j - 1] = array[j - 1], array[j]
... | 26.294118 | 71 | 0.46085 |
796e50f2bb5fa01574922e2bf8cf00163d14f99b | 1,617 | py | Python | gdtoolkit/formatter/context.py | dzil123/godot-gdscript-toolkit | d3687f66390937a4fefd90a508a4899d56fc9f7c | [
"MIT"
] | 361 | 2019-12-01T23:38:13.000Z | 2022-03-30T22:37:16.000Z | gdtoolkit/formatter/context.py | dzil123/godot-gdscript-toolkit | d3687f66390937a4fefd90a508a4899d56fc9f7c | [
"MIT"
] | 143 | 2019-12-21T16:56:14.000Z | 2022-03-20T17:52:24.000Z | gdtoolkit/formatter/context.py | dzil123/godot-gdscript-toolkit | d3687f66390937a4fefd90a508a4899d56fc9f7c | [
"MIT"
] | 36 | 2019-12-21T19:20:12.000Z | 2022-03-17T10:50:43.000Z | from typing import List, Optional
from dataclasses import dataclass
from .constants import INDENT_STRING, INDENT_SIZE
# pylint: disable=too-many-arguments
# pylint: disable=too-many-instance-attributes
class Context:
def __init__(
self,
indent: int,
previously_processed_line_number: int,
... | 35.933333 | 80 | 0.721707 |
796e5153832e395cd6b0ca4669dff014b08e9c38 | 245 | py | Python | examples/map_file_loading.py | J-T-de/sourcehold-maps | 330ab1b3426dbd93b5de3b0c031419e54f6a1618 | [
"MIT"
] | null | null | null | examples/map_file_loading.py | J-T-de/sourcehold-maps | 330ab1b3426dbd93b5de3b0c031419e54f6a1618 | [
"MIT"
] | null | null | null | examples/map_file_loading.py | J-T-de/sourcehold-maps | 330ab1b3426dbd93b5de3b0c031419e54f6a1618 | [
"MIT"
] | null | null | null | from sourcehold import SHC_FILES, load_map, expand_var_path
map = load_map(SHC_FILES.get_all_map_paths()[0])
map2 = load_map(expand_var_path("shcmap~/Close Encounters.map"))
map2 = load_map(expand_var_path("shcusermap~/Close Encounters.map"))
| 35 | 68 | 0.8 |
796e515d9c33a1951c0ea899501f50f2b33a0a1d | 1,558 | py | Python | e2e/scripts/st_set_page_config.py | ChangHoon-Sung/streamlit | 83e0b80d2fa13e29e83d092a9fc4d946460bbf73 | [
"Apache-2.0"
] | 1 | 2019-11-01T08:37:00.000Z | 2019-11-01T08:37:00.000Z | e2e/scripts/st_set_page_config.py | ChangHoon-Sung/streamlit | 83e0b80d2fa13e29e83d092a9fc4d946460bbf73 | [
"Apache-2.0"
] | 35 | 2021-10-12T04:41:39.000Z | 2022-03-28T04:50:45.000Z | e2e/scripts/st_set_page_config.py | AlexRogalskiy/streamlit | d153db37d97faada87bf88972886cda5a624f8c8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2022 Streamlit 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... | 24.730159 | 74 | 0.693838 |
796e51960c7bcc6525b03a6edbc246f72c18cfdf | 4,027 | py | Python | qiskit/extensions/quantum_initializer/ucrx.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 2 | 2021-12-20T05:19:44.000Z | 2021-12-20T05:21:48.000Z | qiskit/extensions/quantum_initializer/ucrx.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 1 | 2019-10-03T12:22:41.000Z | 2019-10-03T12:22:41.000Z | qiskit/extensions/quantum_initializer/ucrx.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 1 | 2021-12-20T05:20:35.000Z | 2021-12-20T05:20:35.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 41.091837 | 100 | 0.694065 |
796e51a279af672a82e370b0e5e56da55ec37c46 | 2,140 | py | Python | molsysmt/thirds/nglview/adaptor.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | molsysmt/thirds/nglview/adaptor.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | molsysmt/thirds/nglview/adaptor.py | uibcdf/MolModSAKs | 02263fb710693f0c41817f1a318459b35fd5462a | [
"MIT"
] | null | null | null | ## This should go here: nglview/nglview/adaptor.py
import os
import warnings
import os.path
import uuid
from functools import partial
from io import StringIO
from tempfile import NamedTemporaryFile
from urllib.request import urlopen
import numpy as np
from nglview import config
from nglview.base_adaptor import Struc... | 28.157895 | 107 | 0.673832 |
796e51df6171e794dc75129eaebf8d1a7958c831 | 6,811 | py | Python | docs/conf.py | uibcdf/Ixtlilton | 1f7e8afe9ca6a2c25646bab0bf1770fe75c8aa5e | [
"MIT"
] | null | null | null | docs/conf.py | uibcdf/Ixtlilton | 1f7e8afe9ca6a2c25646bab0bf1770fe75c8aa5e | [
"MIT"
] | 13 | 2017-08-01T22:31:24.000Z | 2021-12-17T18:56:22.000Z | docs/conf.py | uibcdf/Ixtlilton | 1f7e8afe9ca6a2c25646bab0bf1770fe75c8aa5e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
import os
import sys
# -- Path setup --------------------------------------... | 30.004405 | 100 | 0.665541 |
796e521400a7f93b2b29371d837fa3968885bcf5 | 7,746 | py | Python | test/functional/test_framework/authproxy.py | freelancedeveloper025/MGC | 6a532d9bc6e9cb1b0e0240d2ca6dfcf7a053c2b2 | [
"MIT"
] | null | null | null | test/functional/test_framework/authproxy.py | freelancedeveloper025/MGC | 6a532d9bc6e9cb1b0e0240d2ca6dfcf7a053c2b2 | [
"MIT"
] | null | null | null | test/functional/test_framework/authproxy.py | freelancedeveloper025/MGC | 6a532d9bc6e9cb1b0e0240d2ca6dfcf7a053c2b2 | [
"MIT"
] | 1 | 2021-09-24T11:24:48.000Z | 2021-09-24T11:24:48.000Z | # Copyright (c) 2011 Jeff Garzik
#
# Previous copyright, from python-jsonrpc/jsonrpc/proxy.py:
#
# Copyright (c) 2007 Jan-Klaas Kollhof
#
# This file is part of jsonrpc.
#
# jsonrpc is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# th... | 42.79558 | 155 | 0.643816 |
796e52dcfbbfc780e274bee9a1b28f400a0aff61 | 530 | py | Python | crawlib2/tests/dummy_site_crawler/site/s1_movie/url_builder.py | MacHu-GWU/crawlib2-project | 618d72522d5b36d40607b53b7de7623976460712 | [
"MIT"
] | null | null | null | crawlib2/tests/dummy_site_crawler/site/s1_movie/url_builder.py | MacHu-GWU/crawlib2-project | 618d72522d5b36d40607b53b7de7623976460712 | [
"MIT"
] | null | null | null | crawlib2/tests/dummy_site_crawler/site/s1_movie/url_builder.py | MacHu-GWU/crawlib2-project | 618d72522d5b36d40607b53b7de7623976460712 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from crawlib2.tests.dummy_site.movie.app import PORT
from crawlib2.middleware.url_builder import BaseUrlBuilder
class UrlBuilder(BaseUrlBuilder):
domain = "http://127.0.0.1:{}".format(PORT)
def url_first_listpage(self):
return self.join_all("movie-listpage", str(1))
def ... | 26.5 | 58 | 0.701887 |
796e531f2c30eb8028538a4fcd7e0e1b16b3e9ff | 13,583 | py | Python | anlffr/tfr.py | lennyvarghese/ANLffr | a513713d672d57b8366ab7f1e3e6ea8aad0a064a | [
"BSD-3-Clause"
] | 3 | 2018-09-25T20:10:13.000Z | 2020-02-14T17:37:06.000Z | anlffr/tfr.py | lennyvarghese/ANLffr | a513713d672d57b8366ab7f1e3e6ea8aad0a064a | [
"BSD-3-Clause"
] | 2 | 2016-01-21T21:03:09.000Z | 2016-02-10T13:50:11.000Z | anlffr/tfr.py | lennyvarghese/ANLffr | a513713d672d57b8366ab7f1e3e6ea8aad0a064a | [
"BSD-3-Clause"
] | 11 | 2018-01-15T17:21:19.000Z | 2021-08-04T02:24:20.000Z | """A module which implements the time frequency estimation.
Authors : Hari Bharadwaj <hari@nmr.mgh.harvard.edu>
License : BSD 3-clause
Multitaper wavelet method
"""
import warnings
from math import sqrt
import numpy as np
from scipy import linalg
from scipy.fftpack import fftn, ifftn
from .utils import logger, ver... | 34.042607 | 77 | 0.588603 |
796e53adbce78e46e7ea496b55d5625d97b3f5b3 | 135,761 | py | Python | pysnmp-with-texts/CISCO-IETF-ISIS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-IETF-ISIS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-IETF-ISIS-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-IETF-ISIS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IETF-ISIS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:00:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | 145.822771 | 9,981 | 0.781837 |
796e57456fc37be4ca5d3ff6bbe5c1dc8df2a5c4 | 4,438 | py | Python | country_collator.py | cemac-ccs/DIMCool_data_tool | 7a851a5e95585e041d575c99db0e751fef09d29f | [
"MIT"
] | null | null | null | country_collator.py | cemac-ccs/DIMCool_data_tool | 7a851a5e95585e041d575c99db0e751fef09d29f | [
"MIT"
] | null | null | null | country_collator.py | cemac-ccs/DIMCool_data_tool | 7a851a5e95585e041d575c99db0e751fef09d29f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
iFEED Data consolidation tool Level 2
Name: country_collator.py
Usage: python country_collator.py -d <dir>
Description:
Combine all data for a each country in the iFEED project. This script should only be run after
the year_collator.py script has been succes... | 29.197368 | 164 | 0.655475 |
796e580f5bd2eb69bc2f7e2c463a28262dfc787a | 640 | py | Python | otscrape/core/exporter/file/base.py | SSripilaipong/otscrape | 73ad2ea3d20841cf5d81b37180a1f21c48e87480 | [
"MIT"
] | null | null | null | otscrape/core/exporter/file/base.py | SSripilaipong/otscrape | 73ad2ea3d20841cf5d81b37180a1f21c48e87480 | [
"MIT"
] | null | null | null | otscrape/core/exporter/file/base.py | SSripilaipong/otscrape | 73ad2ea3d20841cf5d81b37180a1f21c48e87480 | [
"MIT"
] | null | null | null | from otscrape.core.base.exporter import Exporter
class FileExporter(Exporter):
def __init__(self, filename, mode='w', encoding=None, **kwargs):
super().__init__(**kwargs)
self.filename = filename
self.mode = mode
self.encoding = encoding
self.file = None
def on_open(... | 24.615385 | 74 | 0.640625 |
796e581ad038a0ccde9b825c46bf5759a0861c37 | 7,483 | bzl | Python | test/convert_shell_script_test.bzl | jlaxson/rules_foreign_cc | 71c89c14fd5aedcae87112f2b773c07118063557 | [
"Apache-2.0"
] | null | null | null | test/convert_shell_script_test.bzl | jlaxson/rules_foreign_cc | 71c89c14fd5aedcae87112f2b773c07118063557 | [
"Apache-2.0"
] | null | null | null | test/convert_shell_script_test.bzl | jlaxson/rules_foreign_cc | 71c89c14fd5aedcae87112f2b773c07118063557 | [
"Apache-2.0"
] | null | null | null | """ Unit tests for shell script conversion """
load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest")
load(
"//tools/build_defs:shell_script_helper.bzl",
"convert_shell_script_by_context",
"do_function_call",
"replace_var_ref",
"split_arguments",
)
load("//tools/build_defs/shell_toolchain/t... | 25.714777 | 109 | 0.596819 |
796e58f989d2f07b275a0370f183787dbb7dea7f | 22,778 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 may ... | 52.726852 | 236 | 0.686232 |
796e5b9f75af574033cf16d4c968899148c43943 | 3,457 | py | Python | agent_dqn.py | doganjr/MarioDQN | 62daa390f8ee0b732275e71675a2b9eae85c43a4 | [
"MIT"
] | 1 | 2021-04-16T05:38:01.000Z | 2021-04-16T05:38:01.000Z | agent_dqn.py | doganjr/MarioDQN | 62daa390f8ee0b732275e71675a2b9eae85c43a4 | [
"MIT"
] | null | null | null | agent_dqn.py | doganjr/MarioDQN | 62daa390f8ee0b732275e71675a2b9eae85c43a4 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from model_dqn import NetworkDQN
from memory_agent import Memory
import os
class Agent():
def __init__(self, gamma, eps, lr, tau, batch_size, max_mem, obs_dim, n_actions, frame_stack):
self.device = torch.device('cuda:0' if t... | 42.679012 | 138 | 0.659531 |
796e5c200e068ac44fcf426b59ebda585ad204e2 | 106 | py | Python | authentication/admin.py | Bernard2030/EcommercePortal | 84b7547a10861cf86634b0107d0622cb89ec3a78 | [
"MIT"
] | 1 | 2021-11-11T23:36:42.000Z | 2021-11-11T23:36:42.000Z | authentication/admin.py | Bernard2030/EcommercePortal | 84b7547a10861cf86634b0107d0622cb89ec3a78 | [
"MIT"
] | 3 | 2021-11-16T10:29:45.000Z | 2022-03-01T01:45:20.000Z | authentication/admin.py | Bernard2030/EcommercePortal | 84b7547a10861cf86634b0107d0622cb89ec3a78 | [
"MIT"
] | 1 | 2021-11-28T10:51:47.000Z | 2021-11-28T10:51:47.000Z | from django.contrib import admin
# Register your models here.
admin.site.site_header = "OneClick Admin"
| 17.666667 | 41 | 0.783019 |
796e5c370c7be2925d6f11f6cd0d90d72eff4416 | 13,727 | py | Python | drivers/make_tess_tuning_scripts_thru_projid_1190.py | lgbouma/cdips-pipeline | 6f4e7462e661b93c6553d233d559598d4c210dfe | [
"MIT"
] | null | null | null | drivers/make_tess_tuning_scripts_thru_projid_1190.py | lgbouma/cdips-pipeline | 6f4e7462e661b93c6553d233d559598d4c210dfe | [
"MIT"
] | 8 | 2020-05-12T19:35:05.000Z | 2022-01-13T15:59:51.000Z | drivers/make_tess_tuning_scripts_thru_projid_1190.py | lgbouma/cdips-pipeline | 6f4e7462e661b93c6553d233d559598d4c210dfe | [
"MIT"
] | 2 | 2020-04-09T03:29:50.000Z | 2021-06-03T17:44:31.000Z | # -*- coding: utf-8 -*-
'''
programmatically generate all the bash files in /scripts/tess_tuning_scripts/
that are executed to explore the parameter space of the photometric reduction.
Usage:
$ cd $PIPETREXDIR/scripts
$ python make_tess_tuning_scripts.py
'''
from __future__ import division, print_function
im... | 35.562176 | 99 | 0.539084 |
796e5c525ba09734c5d68bbaeb7566ef9e32cc6a | 1,912 | py | Python | test/functional/feature_help.py | Tipu-at-decenomy/SUV | 7933919466369baa514056d92482c874cadfa976 | [
"MIT"
] | null | null | null | test/functional/feature_help.py | Tipu-at-decenomy/SUV | 7933919466369baa514056d92482c874cadfa976 | [
"MIT"
] | null | null | null | test/functional/feature_help.py | Tipu-at-decenomy/SUV | 7933919466369baa514056d92482c874cadfa976 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify that starting suvereno with -h works as expected."""
import subprocess
from test_framework.test_fram... | 40.680851 | 100 | 0.67364 |
796e5e3ae82a8bf65ba39dcf27de5a0873dbae78 | 11,152 | py | Python | lib/model/train_model.py | meijianhan/FasterRCNNbyKeras | 5072561bf2d091aa0529e1c78a395f0bc2df63c5 | [
"MIT"
] | 13 | 2018-11-09T13:35:08.000Z | 2020-06-17T09:24:29.000Z | lib/model/train_model.py | ioaniu/keras-faster-rcnn | 86b68e5fc88ec3d7123e73567fd696aefa6d4e7e | [
"MIT"
] | 1 | 2018-12-26T10:03:41.000Z | 2019-01-08T08:53:56.000Z | lib/model/train_model.py | meijianhan/FasterRCNNbyKeras | 5072561bf2d091aa0529e1c78a395f0bc2df63c5 | [
"MIT"
] | 6 | 2018-11-10T09:29:05.000Z | 2020-06-17T09:24:30.000Z | from __future__ import print_function
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# this files are temporary and need update
import keras
import keras.backend as K
from keras.layers import Input
from keras.models import Model
from keras.utils import generic_utils
from keras.optimizers import Adam, Adadelta, SGD
fr... | 39.971326 | 128 | 0.614688 |
796e5e72931015eee10a9ffe915274b849219796 | 1,606 | py | Python | dice_game.py | HeyArtem/python_lesson_9 | 79c99cf173c1a28f8479215bd9eb8ea7c81938d9 | [
"MIT"
] | null | null | null | dice_game.py | HeyArtem/python_lesson_9 | 79c99cf173c1a28f8479215bd9eb8ea7c81938d9 | [
"MIT"
] | null | null | null | dice_game.py | HeyArtem/python_lesson_9 | 79c99cf173c1a28f8479215bd9eb8ea7c81938d9 | [
"MIT"
] | null | null | null | import random
class Dice:
def __init__(self, N):
self.throw_num = N # Броски
self.current_throw = 0 # Параметр отвечает за количество совершенных бросков
def set_hidden_numbers(self): # настройка параметров бросания костей
self._hidden_num_1 = random.randint(1,6) # _'земля' в начале, ... | 47.235294 | 135 | 0.644458 |
796e60788416c8e0d6262b1809e79dc48ecb6bc7 | 4,028 | py | Python | tests/test_convert_data_type.py | MONAI-Project/MONAI | 4c5c388e529ee45b417ee5f206041b8d0a864ab6 | [
"Apache-2.0"
] | null | null | null | tests/test_convert_data_type.py | MONAI-Project/MONAI | 4c5c388e529ee45b417ee5f206041b8d0a864ab6 | [
"Apache-2.0"
] | null | null | null | tests/test_convert_data_type.py | MONAI-Project/MONAI | 4c5c388e529ee45b417ee5f206041b8d0a864ab6 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) MONAI Consortium
# 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, so... | 39.106796 | 116 | 0.678252 |
796e60a770479542cc8f87f161ad067a55ca1d20 | 194,264 | py | Python | Lib/test/test_descr.py | umoqnier/cpython | d8ca2354ed30c12b9ce37c4535222b700a727b32 | [
"CNRI-Python-GPL-Compatible"
] | 2 | 2020-01-04T07:21:53.000Z | 2020-10-02T17:32:24.000Z | Lib/test/test_descr.py | umoqnier/cpython | d8ca2354ed30c12b9ce37c4535222b700a727b32 | [
"CNRI-Python-GPL-Compatible"
] | 2 | 2017-10-26T03:12:40.000Z | 2019-09-19T14:18:12.000Z | Lib/test/test_descr.py | umoqnier/cpython | d8ca2354ed30c12b9ce37c4535222b700a727b32 | [
"CNRI-Python-GPL-Compatible"
] | 2 | 2019-11-16T02:03:51.000Z | 2019-11-16T02:10:57.000Z | import builtins
import copyreg
import gc
import itertools
import math
import pickle
import sys
import types
import unittest
import warnings
import weakref
from copy import deepcopy
from test import support
try:
import _testcapi
except ImportError:
_testcapi = None
class OperatorsTest(unittest.TestCase):
... | 34.383009 | 94 | 0.518346 |
796e612eb22982041cfad870b4d93e936dcc2af4 | 1,899 | py | Python | python/first_algorithm.py | littlekign/comp-think.github.io | 21bce306c7672b6355a6fdaf260824542dbca595 | [
"CC0-1.0",
"CC-BY-4.0"
] | 40 | 2019-01-25T11:14:30.000Z | 2021-12-05T15:04:11.000Z | python/first_algorithm.py | littlekign/comp-think.github.io | 21bce306c7672b6355a6fdaf260824542dbca595 | [
"CC0-1.0",
"CC-BY-4.0"
] | 1 | 2020-11-08T15:18:58.000Z | 2020-11-19T22:44:28.000Z | python/first_algorithm.py | littlekign/comp-think.github.io | 21bce306c7672b6355a6fdaf260824542dbca595 | [
"CC0-1.0",
"CC-BY-4.0"
] | 19 | 2019-12-28T16:06:01.000Z | 2021-12-14T15:52:44.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Silvio Peroni <essepuntato@gmail.com>
#
# 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 I... | 41.282609 | 109 | 0.715113 |
796e61a7ce2e10b98e68cac7af04bd6278864e3c | 579 | py | Python | approximate_string_matching/dont_care.py | pmikolajczyk41/string-algorithms | faa7c7b3ab18a157a27e8c08081f2efebf8be900 | [
"MIT"
] | null | null | null | approximate_string_matching/dont_care.py | pmikolajczyk41/string-algorithms | faa7c7b3ab18a157a27e8c08081f2efebf8be900 | [
"MIT"
] | null | null | null | approximate_string_matching/dont_care.py | pmikolajczyk41/string-algorithms | faa7c7b3ab18a157a27e8c08081f2efebf8be900 | [
"MIT"
] | null | null | null | import scipy.signal
def basic_fft(text, word, n, m):
if n < m:
return
A = set(list(text[1:] + word[1:]))
A.discard('?')
mismatches = [0] * (n - m + 1)
for a in A:
text_a_mask = [int(c == a) for c in text[1:]]
for b in A:
if a != b:
word_b_mask = [int(c == b) for c in reversed(word[1... | 32.166667 | 71 | 0.564767 |
796e620e6679be09ab5fbdd53d34c52e0a3b3ac6 | 1,776 | py | Python | llvm/utils/UpdateTestChecks/isel.py | ornata/llvm-project | 494913b8b4e4bce0b3525e5569d8e486e82b9a52 | [
"Apache-2.0"
] | null | null | null | llvm/utils/UpdateTestChecks/isel.py | ornata/llvm-project | 494913b8b4e4bce0b3525e5569d8e486e82b9a52 | [
"Apache-2.0"
] | null | null | null | llvm/utils/UpdateTestChecks/isel.py | ornata/llvm-project | 494913b8b4e4bce0b3525e5569d8e486e82b9a52 | [
"Apache-2.0"
] | null | null | null | import re
from . import common
import sys
if sys.version_info[0] > 2:
class string:
expandtabs = str.expandtabs
else:
import string
# Support of isel debug checks
# RegEx: this is where the magic happens.
##### iSel parser
# TODO: add function prefix
ISEL_FUNCTION_DEFAULT_RE = re.compile(
r'Selected[\s... | 30.62069 | 81 | 0.681306 |
796e62e21d98920571ae70e2be9bab5da1cbe3f9 | 2,298 | py | Python | third_party/spider/baselines/nl2code/nn/initializations.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 69 | 2021-04-14T06:35:07.000Z | 2022-03-31T18:35:05.000Z | third_party/spider/baselines/nl2code/nn/initializations.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 19 | 2018-12-17T20:42:11.000Z | 2020-02-12T21:29:51.000Z | third_party/spider/baselines/nl2code/nn/initializations.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 22 | 2019-03-16T05:57:27.000Z | 2020-10-25T04:34:54.000Z | import theano
import theano.tensor as T
import numpy as np
from .utils.theano_utils import sharedX, shared_zeros, shared_ones
def get_fans(shape):
fan_in = shape[0] if len(shape) == 2 else np.prod(shape[1:])
fan_out = shape[1] if len(shape) == 2 else shape[0]
return fan_in, fan_out
def uniform(shape, s... | 25.820225 | 97 | 0.660139 |
796e63396a85c3c4de390ef859df525fb8d6b738 | 5,444 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/vpn_connection_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/vpn_connection_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/vpn_connection_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 50.878505 | 374 | 0.691403 |
796e637e8a6ff526943d9af9d1ca3987cfd6a93d | 6,110 | py | Python | tests/test_row_column.py | thoconne/viime | b9d9623daeb345f479903cb84ff46d9e87e433da | [
"Apache-2.0"
] | null | null | null | tests/test_row_column.py | thoconne/viime | b9d9623daeb345f479903cb84ff46d9e87e433da | [
"Apache-2.0"
] | null | null | null | tests/test_row_column.py | thoconne/viime | b9d9623daeb345f479903cb84ff46d9e87e433da | [
"Apache-2.0"
] | null | null | null | from flask import url_for
import pytest
from viime.models import CSVFileSchema, db
csv_file_schema = CSVFileSchema()
table_data = """
id,group,meta,col1,col2
row1,g1,a,0.5,2.0
row2,g1,b,1.5,0
row3,g2,b,4,-2.0
"""
@pytest.fixture
def table(client):
csv_file = csv_file_schema.load({
'table': table_data,
... | 26.681223 | 82 | 0.544354 |
796e63fb5406217e82f79828b2dc849c9d96ec26 | 6,542 | py | Python | mbp/raw_data/parse_noe.py | larsbratholm/cs-proteins | 785815c535e345fc907d3a6c3843374c11908679 | [
"Unlicense"
] | null | null | null | mbp/raw_data/parse_noe.py | larsbratholm/cs-proteins | 785815c535e345fc907d3a6c3843374c11908679 | [
"Unlicense"
] | null | null | null | mbp/raw_data/parse_noe.py | larsbratholm/cs-proteins | 785815c535e345fc907d3a6c3843374c11908679 | [
"Unlicense"
] | null | null | null | import string
import sys
from Bio.PDB import PDBParser
from random import random, seed
filename = sys.argv[1]
lines = open(filename, "r").readlines()
ILVAMT = ["ILE", "LEU", "VAL", "ALA", "MET", "THR"]
debug = False
#debug = False
n = 0
m = 0
if debug: print "Parsed line"
parser = PDBParser(QUIET=True)
filename ... | 29.336323 | 117 | 0.49037 |
796e642e5a0b9934a0cad1ecd3ff39a92bdee4e3 | 887 | py | Python | lab/11/template_11_c.py | reveriess/TarungLabDDP1 | f2298d462a94dfb89a6c6a88ee4de4fff9acd671 | [
"MIT"
] | 29 | 2018-08-25T11:03:31.000Z | 2022-03-29T08:46:17.000Z | lab/11/template_11_c.py | reveriess/TarungLabDDP1 | f2298d462a94dfb89a6c6a88ee4de4fff9acd671 | [
"MIT"
] | 8 | 2017-10-12T21:42:43.000Z | 2018-06-07T09:14:16.000Z | lab/11/template_11_c.py | reveriess/TarungLabDDP1 | f2298d462a94dfb89a6c6a88ee4de4fff9acd671 | [
"MIT"
] | 12 | 2018-06-28T14:41:23.000Z | 2022-03-26T10:46:58.000Z | '''
Template untuk solusi Lab 11 kelas C.
'''
import tkinter as tk
class Kalkulator():
'''
Sebuah kalkulator.
'''
def __init__(self, master):
self.master = master
# TODO: Set title window menjadi "Kalkulator Sederhana" di bawah ini.
# TODO: Buatlah Label, Entry, Button,
... | 19.711111 | 77 | 0.552424 |
796e64632f63022beef5895acb39aa9601d69f56 | 8,480 | py | Python | usaspending_api/idvs/tests/data/idv_test_data.py | gaybro8777/usaspending-api | fe9d730acd632401bbbefa168e3d86d59560314b | [
"CC0-1.0"
] | 1 | 2020-06-15T19:59:52.000Z | 2020-06-15T19:59:52.000Z | usaspending_api/idvs/tests/data/idv_test_data.py | gaybro8777/usaspending-api | fe9d730acd632401bbbefa168e3d86d59560314b | [
"CC0-1.0"
] | null | null | null | usaspending_api/idvs/tests/data/idv_test_data.py | gaybro8777/usaspending-api | fe9d730acd632401bbbefa168e3d86d59560314b | [
"CC0-1.0"
] | null | null | null | """
The goal here is to create test data for ALL IDV TESTS so we don't end up
with a bunch of similar test data creation code floating around.
You'll have to use your imagination a bit with these budget tree drawings.
These are the two hierarchies being built by this function. "I" means IDV.
"C" means contract. The ... | 44.397906 | 117 | 0.647406 |
796e651c3117ac67877bc8cc65ee590e74506b8f | 19,936 | py | Python | leetcode_python/Design/design-twitter.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Design/design-twitter.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Design/design-twitter.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
355. Design Twitter
Medium
Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user's news feed.
Implement the Twitter class:
Twitter() Initializes your twitter object.
void postTweet(int userId, int tweetId) Compo... | 36.181488 | 256 | 0.621539 |
796e6620f3a1ed27178415db41e64635855a1ad0 | 1,855 | py | Python | azure/mgmt/storage/v2016_01_01/models/check_name_availability_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/storage/v2016_01_01/models/check_name_availability_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/storage/v2016_01_01/models/check_name_availability_result.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 37.1 | 79 | 0.628032 |
796e68d298edd1ec811e15e0126ecdff9e3fa274 | 1,083 | py | Python | kubernetes/test/test_v1beta1_custom_resource_definition.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_custom_resource_definition.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_custom_resource_definition.py | scele/kubernetes-client-python | 9e982cbdb5f19dc1a3935a75bdd92288f3b807fb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | 24.066667 | 110 | 0.741459 |
796e693cebd8c12b232340fdc59b33a216720e5e | 247 | py | Python | any_code_is_here/exception_handling.py | borko81/SU_OOP_2021 | 8c38682bd4a2b032ca09f85b0a579be152223a59 | [
"MIT"
] | null | null | null | any_code_is_here/exception_handling.py | borko81/SU_OOP_2021 | 8c38682bd4a2b032ca09f85b0a579be152223a59 | [
"MIT"
] | null | null | null | any_code_is_here/exception_handling.py | borko81/SU_OOP_2021 | 8c38682bd4a2b032ca09f85b0a579be152223a59 | [
"MIT"
] | null | null | null | numbers = [1, 2, 3, 4, 5]
person = {
"name": "Phil",
"city": "Budapest"
}
try:
print(numbers[100])
except LookupError as e:
print(e)
except IndexError as e:
print(e)
try:
print(person[age])
except KeyError as e:
print(e) | 12.35 | 25 | 0.595142 |
796e6a4487786ce889febd72d230f0dcb64b5538 | 61,680 | py | Python | gasp/variations.py | kvs11/GASP-python | 804cdfeb332020ba7b25d713477c7bffea71c6a2 | [
"MIT"
] | 2 | 2019-07-03T15:03:57.000Z | 2021-12-15T17:10:37.000Z | gasp/variations.py | kvs11/GASP-python | 804cdfeb332020ba7b25d713477c7bffea71c6a2 | [
"MIT"
] | null | null | null | gasp/variations.py | kvs11/GASP-python | 804cdfeb332020ba7b25d713477c7bffea71c6a2 | [
"MIT"
] | 1 | 2021-04-05T20:58:02.000Z | 2021-04-05T20:58:02.000Z | # coding: utf-8
# Copyright (c) Henniggroup.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals, print_function
"""
Variations module:
This module contains the classes used to create offspring organisms from parent
organisms. All variation classes must implement a do... | 41.423774 | 79 | 0.619601 |
796e6c3c4af6f6195e825a6d632c59294259300b | 1,312 | py | Python | demo/temporal_content_based_filtering.py | chen0040/keras-recommender | 8d3f1b2aedfd89882190c3cd61e0f3efe6a05ecf | [
"MIT"
] | 39 | 2018-01-24T09:26:39.000Z | 2022-01-16T19:54:14.000Z | demo/temporal_content_based_filtering.py | stalinkay/keras-recommender | 8d3f1b2aedfd89882190c3cd61e0f3efe6a05ecf | [
"MIT"
] | 2 | 2018-09-14T09:17:50.000Z | 2020-04-08T02:01:56.000Z | demo/temporal_content_based_filtering.py | stalinkay/keras-recommender | 8d3f1b2aedfd89882190c3cd61e0f3efe6a05ecf | [
"MIT"
] | 11 | 2018-01-24T09:27:54.000Z | 2021-04-14T06:55:38.000Z | import pandas as pd
from sklearn.model_selection import train_test_split
from keras_recommender.library.content_based_filtering import TemporalContentBasedFiltering
def main():
data_dir_path = './data/ml-latest-small'
output_dir_path = './models'
records = pd.read_csv(data_dir_path + '/ratings.csv')
... | 30.511628 | 91 | 0.688262 |
796e6d3c743fdc76efd7a1ed6b62e838fcd5bd83 | 403 | py | Python | solutions/2021/kws/main.py | kws/AdventOfCode | 8da337ece8a46d070185e1d81592745dae7f6744 | [
"MIT"
] | 1 | 2020-12-04T20:15:47.000Z | 2020-12-04T20:15:47.000Z | solutions/2021/kws/main.py | kws/AdventOfCode | 8da337ece8a46d070185e1d81592745dae7f6744 | [
"MIT"
] | 1 | 2020-12-02T08:31:35.000Z | 2020-12-02T20:24:34.000Z | solutions/2021/kws/main.py | kws/AdventOfCode | 8da337ece8a46d070185e1d81592745dae7f6744 | [
"MIT"
] | 3 | 2018-11-30T18:14:15.000Z | 2018-12-10T20:18:15.000Z | #! /usr/bin/env python
import argparse
import importlib
parser = argparse.ArgumentParser("Advent of Code")
parser.add_argument("day", type=int, help="The day to run")
parser.add_argument("input_id", type=str, help="The input id, e.g. 'sample'")
args = parser.parse_args()
day = f"day{args.day:02}"
module = importli... | 25.1875 | 77 | 0.727047 |
796e6e1ee821dc04a262129cd39eea70ecdfadbe | 1,042 | py | Python | src/collectionish/_ancestor_chain_map.py | leaprovenzano/more-containers | 45d093d24fc8e250236a8e63d25c41cfbb6eef07 | [
"MIT"
] | 1 | 2021-01-23T11:10:23.000Z | 2021-01-23T11:10:23.000Z | src/collectionish/_ancestor_chain_map.py | leaprovenzano/more-containers | 45d093d24fc8e250236a8e63d25c41cfbb6eef07 | [
"MIT"
] | 11 | 2020-01-05T14:36:55.000Z | 2021-01-01T16:07:44.000Z | src/collectionish/_ancestor_chain_map.py | leaprovenzano/more-containers | 45d093d24fc8e250236a8e63d25c41cfbb6eef07 | [
"MIT"
] | 1 | 2021-01-23T11:09:53.000Z | 2021-01-23T11:09:53.000Z | from typing import Union, Dict
from collections import ChainMap
class AncestorChainMap(ChainMap):
"""ChainMap variant that allows for the insertion of parents and ancestors.
Example:
>>> from collectionish import AncestorChainMap
>>>
>>> child = AncestorChainMap({'b': 3, 'c': 3})
... | 28.162162 | 79 | 0.559501 |
796e6ecade55a524ebdced1a48592778c4f89c67 | 2,918 | py | Python | nailgun/nailgun/objects/notification.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/objects/notification.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/objects/notification.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | 31.376344 | 78 | 0.61926 |
796e6ecc95297ceb56ebe52434fb8ccbea611661 | 6,693 | py | Python | analysis/scripts/downloadAndAnalyzeCode.py | fossabot/gitrate | 715c6d60022dcae6127466c4061f55b1b4bd9685 | [
"Apache-2.0"
] | null | null | null | analysis/scripts/downloadAndAnalyzeCode.py | fossabot/gitrate | 715c6d60022dcae6127466c4061f55b1b4bd9685 | [
"Apache-2.0"
] | null | null | null | analysis/scripts/downloadAndAnalyzeCode.py | fossabot/gitrate | 715c6d60022dcae6127466c4061f55b1b4bd9685 | [
"Apache-2.0"
] | 1 | 2019-11-09T22:35:55.000Z | 2019-11-09T22:35:55.000Z | #!/usr/bin/env python3
# usage: ./downloadAndAnalyzeCode.sh {max-archive-size-bytes} {with-cleanup}
# example: ./downloadAndAnalyzeCode.sh 2048 true
# (stdin) input format: "repository_id;repository_name;login;archive_uri;language1,language2,..."
# (stdout) output format: "repository_id;repository_name;language;messag... | 28.974026 | 98 | 0.664426 |
796e708d6ea199964bb795c765b7b923a1b39c5c | 475 | py | Python | therandy/rules/git_pull.py | benmonro/therandy | b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03 | [
"MIT"
] | null | null | null | therandy/rules/git_pull.py | benmonro/therandy | b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03 | [
"MIT"
] | null | null | null | therandy/rules/git_pull.py | benmonro/therandy | b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03 | [
"MIT"
] | null | null | null | from therandy.shells import shell
from therandy.specific.git import git_support
@git_support
def match(command):
return 'pull' in command.script and 'set-upstream' in command.output
@git_support
def get_new_command(command):
line = command.output.split('\n')[-3].strip()
branch = line.split(' ')[-1]
... | 27.941176 | 72 | 0.682105 |
796e717b18926aaa8d9543d7f33a9df2a020f51b | 2,767 | py | Python | harness/determined/tensorboard/fetchers/azure.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | harness/determined/tensorboard/fetchers/azure.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | harness/determined/tensorboard/fetchers/azure.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | import datetime
import logging
import os
import urllib
from typing import Any, Dict, Generator, List, Tuple
from .base import Fetcher
logger = logging.getLogger(__name__)
class AzureFetcher(Fetcher):
def __init__(self, storage_config: Dict[str, Any], storage_paths: List[str], local_dir: str):
from azure... | 37.391892 | 99 | 0.658113 |
796e71cbdc75e262816ace0c9b109b60200cd6be | 1,045 | py | Python | Cura/Cura/cura/LayerData.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | 1 | 2018-10-19T10:08:45.000Z | 2018-10-19T10:08:45.000Z | misc/zip/Cura-master/cura/LayerData.py | criscola/G-Gen | 293d4f46cb40d7917a10a95921040a14a086efc1 | [
"MIT"
] | null | null | null | misc/zip/Cura-master/cura/LayerData.py | criscola/G-Gen | 293d4f46cb40d7917a10a95921040a14a086efc1 | [
"MIT"
] | null | null | null | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from UM.Mesh.MeshData import MeshData
## Class to holds the layer mesh and information about the layers.
# Immutable, use LayerDataBuilder to create one of these.
class LayerData(MeshData):
def __init__(self, vertices... | 38.703704 | 116 | 0.682297 |
796e71e67f79472ff13063a4f16f12bb7959ce37 | 23,569 | py | Python | aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 4 | 2019-07-01T13:12:50.000Z | 2019-07-02T20:01:37.000Z | aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 29 | 2019-06-24T22:48:04.000Z | 2019-07-02T20:52:16.000Z | aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py | kuraakhilesh8230/aries-cloudagent-python | ee384d1330f6a50ff45a507392ce54f92900f23a | [
"Apache-2.0"
] | 12 | 2019-06-24T22:17:44.000Z | 2019-07-02T19:49:31.000Z | """V2.0 issue-credential linked data proof credential format handler."""
from ......vc.ld_proofs.error import LinkedDataProofException
from ......vc.ld_proofs.check import get_properties_without_context
import logging
from typing import Mapping
from marshmallow import EXCLUDE, INCLUDE
from pyld import jsonld
from p... | 37.530255 | 90 | 0.650346 |
796e7267c54f6e18622229489d173d34db4fa524 | 685 | py | Python | tools/leetcode.124.Binary Tree Maximum Path Sum/leetcode.124.Binary Tree Maximum Path Sum.submission1.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | 4 | 2015-10-10T00:30:55.000Z | 2020-07-27T19:45:54.000Z | tools/leetcode.124.Binary Tree Maximum Path Sum/leetcode.124.Binary Tree Maximum Path Sum.submission1.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | null | null | null | tools/leetcode.124.Binary Tree Maximum Path Sum/leetcode.124.Binary Tree Maximum Path Sum.submission1.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | null | null | null | # Definition for a binary tree node
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# @param root, a tree node
# @return an integer
def __init__(self):
self.res = -0x7fffffff
def maxPathSum(self, root)... | 685 | 685 | 0.551825 |
796e7290b38c055ebb284572461c710849e355a3 | 477 | py | Python | exe1007.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | exe1007.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | exe1007.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | while True:
try:
num1 = input('\nDigite um número (S para sair): ')
if num1.upper() == 'S':
break
num1 = int(num1)
num2 = input('Digite outro número (S para sair):')
if num2.upper() == 'S':
break
num2 = int(num2)
except ValueErro... | 25.105263 | 60 | 0.48847 |
796e72f22f11a1fc8a225cf34af2cd4b00c6a552 | 151 | py | Python | recurrent_ics/alarm/__init__.py | Andrei486/class_export | c870d336c39d11306a8a68448b5086b0f4a3abe9 | [
"MIT"
] | null | null | null | recurrent_ics/alarm/__init__.py | Andrei486/class_export | c870d336c39d11306a8a68448b5086b0f4a3abe9 | [
"MIT"
] | null | null | null | recurrent_ics/alarm/__init__.py | Andrei486/class_export | c870d336c39d11306a8a68448b5086b0f4a3abe9 | [
"MIT"
] | null | null | null | from recurrent_ics.alarm.audio import AudioAlarm
from recurrent_ics.alarm.display import DisplayAlarm
from recurrent_ics.alarm.email import EmailAlarm
| 37.75 | 52 | 0.880795 |
796e733691bf7f947f63bd1b34e66158345bf351 | 2,848 | py | Python | src/fosslight_dependency/package_manager/Swift.py | syleeeee/fosslight_dependency_scanner | 2a48768b4be6ed9fd66a5d3d1a4413649bfa5047 | [
"Apache-2.0",
"MIT"
] | 6 | 2021-06-30T10:50:26.000Z | 2022-03-31T08:45:32.000Z | src/fosslight_dependency/package_manager/Swift.py | syleeeee/fosslight_dependency_scanner | 2a48768b4be6ed9fd66a5d3d1a4413649bfa5047 | [
"Apache-2.0",
"MIT"
] | 19 | 2021-06-17T07:20:51.000Z | 2021-12-24T02:21:48.000Z | src/fosslight_dependency/package_manager/Swift.py | syleeeee/fosslight_dependency_scanner | 2a48768b4be6ed9fd66a5d3d1a4413649bfa5047 | [
"Apache-2.0",
"MIT"
] | 18 | 2021-06-30T07:35:49.000Z | 2021-11-24T04:27:45.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 LG Electronics Inc.
# SPDX-License-Identifier: Apache-2.0
import os
import logging
import json
import fosslight_util.constant as constant
import fosslight_dependency.constant as const
from fosslight_dependency._package_manager import PackageManager
fro... | 39.013699 | 107 | 0.628862 |
796e73b4cb9ed5d2332762fe84a08377f2fcd225 | 3,903 | py | Python | app/lib/pdf.py | joelbcastillo/NYCOpenRecords | 001dfa21cc33d75a9067cae78752c5ba5734718b | [
"Apache-2.0"
] | 37 | 2016-01-21T18:33:56.000Z | 2021-10-24T01:43:20.000Z | app/lib/pdf.py | CityOfNewYork/NYCOpenRecords | 476a236a573e6f3a2f96c6537a30ee27b2bd3a2b | [
"Apache-2.0"
] | 179 | 2016-01-21T21:33:31.000Z | 2022-02-15T21:31:35.000Z | app/lib/pdf.py | joelbcastillo/NYCOpenRecords | 001dfa21cc33d75a9067cae78752c5ba5734718b | [
"Apache-2.0"
] | 13 | 2017-05-19T17:27:31.000Z | 2020-07-05T00:55:29.000Z | from flask import current_app
from flask_weasyprint import render_pdf, HTML
import jinja2
import subprocess
import os
from tempfile import gettempdir, _get_candidate_names
from app.constants.pdf import LATEX_TEMPLATE_CONFIG
from app.lib.utils import PDFCreationException
class LatexCompiler:
"""
Generates a ... | 30.97619 | 121 | 0.655906 |
796e74b3f40f965765ef38e327994a1e77ee3ef7 | 3,528 | py | Python | ngraph/test/util/unit-test-execution/conftest.py | monroid/openvino | 8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6 | [
"Apache-2.0"
] | 2,406 | 2020-04-22T15:47:54.000Z | 2022-03-31T10:27:37.000Z | ngraph/test/util/unit-test-execution/conftest.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 4,948 | 2020-04-22T15:12:39.000Z | 2022-03-31T18:45:42.000Z | ngraph/test/util/unit-test-execution/conftest.py | thomas-yanxin/openvino | 031e998a15ec738c64cc2379d7f30fb73087c272 | [
"Apache-2.0"
] | 991 | 2020-04-23T18:21:09.000Z | 2022-03-31T18:40:57.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging as log
import sys
import subprocess
import os
import pytest
def pytest_addoption(parser):
parser.addoption(
"--gtest_filter",
help="Attributes to gtest",
type=str,
required=True,
)... | 36.371134 | 120 | 0.639739 |
796e74ed2ae0ad8a7ec27d9f8c3fb6e1e5ee7976 | 7,615 | py | Python | part_seg/eval_voting.py | JiazeWang/PAConv | c9c634dd5da972819656d1d2a9014145eadaf701 | [
"Apache-2.0"
] | 183 | 2021-03-29T06:22:33.000Z | 2022-03-30T06:02:55.000Z | part_seg/eval_voting.py | JiazeWang/PAConv | c9c634dd5da972819656d1d2a9014145eadaf701 | [
"Apache-2.0"
] | 37 | 2021-03-29T14:34:23.000Z | 2022-03-15T13:37:22.000Z | part_seg/eval_voting.py | JiazeWang/PAConv | c9c634dd5da972819656d1d2a9014145eadaf701 | [
"Apache-2.0"
] | 26 | 2021-03-29T17:41:29.000Z | 2022-03-14T01:52:23.000Z | from __future__ import print_function
import os
import argparse
import torch
from util.data_util import PartNormalDataset
from model.DGCNN_PAConv_vote import PAConv
import numpy as np
from torch.utils.data import DataLoader
from util.util import to_categorical, compute_overall_iou, load_cfg_from_cfg_file, merge_cfg_fro... | 40.721925 | 129 | 0.634668 |
796e751353262a99480548e5bb03fb462790ac92 | 792 | py | Python | extratools/misctools.py | chuanconggao/extratools | 338eb1c96a6a94a7980ff853bb97ef4330c61cc7 | [
"MIT"
] | 150 | 2018-05-14T15:38:30.000Z | 2022-02-27T15:53:19.000Z | extratools/misctools.py | chuanconggao/extratools | 338eb1c96a6a94a7980ff853bb97ef4330c61cc7 | [
"MIT"
] | 3 | 2018-07-02T03:53:45.000Z | 2021-03-25T21:55:47.000Z | extratools/misctools.py | chuanconggao/extratools | 338eb1c96a6a94a7980ff853bb97ef4330c61cc7 | [
"MIT"
] | 12 | 2018-05-18T15:35:09.000Z | 2022-02-27T05:42:12.000Z | #! /usr/bin/env python3
from typing import *
def cmp(a: Any, b: Any) -> int:
"""
Restores the useful `cmp` function previously in Python 2.
- Implemented according to [What's New in Python 3.0](https://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons).
Args:
a: An object.
b... | 20.842105 | 126 | 0.54798 |
796e75410a9030e74870d92029d5f30783cb5059 | 2,564 | py | Python | src/application/command/data_source/add_twitter.py | jagoPG/-restaurant-ml-inspector | 4efc7855401cc8cfa9d5e470c14685158a607448 | [
"Apache-2.0"
] | 1 | 2018-07-10T12:53:35.000Z | 2018-07-10T12:53:35.000Z | src/application/command/data_source/add_twitter.py | jagoPG/-restaurant-ml-inspector | 4efc7855401cc8cfa9d5e470c14685158a607448 | [
"Apache-2.0"
] | null | null | null | src/application/command/data_source/add_twitter.py | jagoPG/-restaurant-ml-inspector | 4efc7855401cc8cfa9d5e470c14685158a607448 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env
# -*- coding: utf-8 -*-
"""
Copyright 2017-2018 Jagoba Pérez-Gómez
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 ... | 35.611111 | 77 | 0.735569 |
796e75726d28d16a614e0feee160414e1fec71ec | 42,655 | py | Python | src/azure-firewall/azext_firewall/custom.py | shrishrirang/azure-cli-extensions | 58aae846e985b8197b1bbd07cced6f480a782aaf | [
"MIT"
] | null | null | null | src/azure-firewall/azext_firewall/custom.py | shrishrirang/azure-cli-extensions | 58aae846e985b8197b1bbd07cced6f480a782aaf | [
"MIT"
] | null | null | null | src/azure-firewall/azext_firewall/custom.py | shrishrirang/azure-cli-extensions | 58aae846e985b8197b1bbd07cced6f480a782aaf | [
"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.
# --------------------------------------------------------------------... | 53.789407 | 172 | 0.654038 |
796e7606fc51053042dad067af5853df273e2dc3 | 684 | py | Python | tests/test_0324-fix-partitionedarray-getitem-string-int.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | 2 | 2019-09-12T03:07:23.000Z | 2019-09-27T05:32:07.000Z | tests/test_0324-fix-partitionedarray-getitem-string-int.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | 1 | 2019-09-26T17:57:45.000Z | 2019-09-26T17:57:45.000Z | tests/test_0324-fix-partitionedarray-getitem-string-int.py | douglasdavis/awkward-1.0 | f00775803a5568efb0a8e2dae3b1a4f23228fa40 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
import pytest # noqa: F401
import numpy as np # noqa: F401
import awkward as ak # noqa: F401
def test():
a = ak.partition.IrregularlyPartitionedArray(
[
ak.Array(
[{"x": 1, "y": 1.1}, {"... | 31.090909 | 87 | 0.445906 |
796e78213f232b3f609a815996d73e220adee415 | 1,717 | py | Python | data/p4VQE/R2/benchmark/startCirq21.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R2/benchmark/startCirq21.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R2/benchmark/startCirq21.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=8
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for ... | 27.693548 | 77 | 0.695399 |
796e78a06f54878db4e8c502aa4295b26990ce47 | 16,212 | py | Python | crds/tests/test_reftypes.py | rendinam/crds | ae5fe72a5548edfe279ec2344b801f4c49c8fe26 | [
"BSD-3-Clause"
] | null | null | null | crds/tests/test_reftypes.py | rendinam/crds | ae5fe72a5548edfe279ec2344b801f4c49c8fe26 | [
"BSD-3-Clause"
] | null | null | null | crds/tests/test_reftypes.py | rendinam/crds | ae5fe72a5548edfe279ec2344b801f4c49c8fe26 | [
"BSD-3-Clause"
] | null | null | null | import os
import tempfile
# ==================================================================================
import numpy as np
from nose.tools import assert_raises, assert_true
# ==================================================================================
from crds.core import utils, log, exceptions
from c... | 60.719101 | 589 | 0.60301 |
796e79169a408697bbbed95308c2b0b82bd1953e | 2,032 | py | Python | src/Navigation/Follower/_02TF_Listener.py | PiyushMahamuni/roslearning | b16655afef685c42b4ae7930c0952080c8895993 | [
"BSD-3-Clause"
] | 1 | 2021-08-17T18:05:13.000Z | 2021-08-17T18:05:13.000Z | src/Navigation/Follower/_02TF_Listener.py | PiyushMahamuni/roslearning | b16655afef685c42b4ae7930c0952080c8895993 | [
"BSD-3-Clause"
] | 2 | 2021-11-14T17:44:35.000Z | 2021-11-16T11:15:39.000Z | src/Navigation/Follower/_02TF_Listener.py | PiyushMahamuni/roslearning | b16655afef685c42b4ae7930c0952080c8895993 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import rospy, tf, turtlesim.srv, math
from geometry_msgs.msg import Twist
# THIS NODE WILL PUBLISH VELOCITY COMMANDS FOR turtle2 AND WILL MAKE IT FOLLOW THE turtle1
# THE FRAMES OF turtle1 AND turtle2 IN world FRAME OF REFERENCE MUST HAVE BEEN PUBLISHED
# THE TF PACKAGE HELP US NOW TO FIND THE ... | 27.835616 | 129 | 0.689961 |
796e7974ff1e5568bb72e5abf3f24246c0d290f6 | 499 | py | Python | tis_catch_weight_extension/__manifest__.py | guadaltech/jdvp-odoo | e399ecf4c66e15a60a8561edec359e75be08140b | [
"ADSL"
] | null | null | null | tis_catch_weight_extension/__manifest__.py | guadaltech/jdvp-odoo | e399ecf4c66e15a60a8561edec359e75be08140b | [
"ADSL"
] | 1 | 2020-04-02T06:39:18.000Z | 2020-04-02T06:39:18.000Z | tis_catch_weight_extension/__manifest__.py | guadaltech/jdvp-odoo | e399ecf4c66e15a60a8561edec359e75be08140b | [
"ADSL"
] | null | null | null | # -*- coding: utf-8 -*-
{
'name': 'Catch Weight Management Extension',
'version': '12.0.0.1',
'author': 'Guadaltech Soluciones Tecnológicas S.L',
'depends': [
'tis_catch_weight',
'point_of_sale'
],
'data': [
'views/view_pos_pos_form.xml',
'views/assets.xml'
]... | 20.791667 | 55 | 0.54509 |
796e7a43a28838e8c37eddea61d1a4a545d374f2 | 2,974 | py | Python | nets/utils/CustomFunction.py | IgoshinLab/pix2pixHD-HE | c40cf62bfa51b7bac91eaa6305770b7d15291a66 | [
"Unlicense"
] | 1 | 2021-12-15T05:38:33.000Z | 2021-12-15T05:38:33.000Z | nets/utils/CustomFunction.py | JiangguoZhang/ELEC576project | f4d61cc101ce8af3f236d578feef3a7a048bb41d | [
"Unlicense"
] | null | null | null | nets/utils/CustomFunction.py | JiangguoZhang/ELEC576project | f4d61cc101ce8af3f236d578feef3a7a048bb41d | [
"Unlicense"
] | 1 | 2021-11-20T05:51:36.000Z | 2021-11-20T05:51:36.000Z | from collections import OrderedDict
import torch.nn as nn
from .Blocks import ConstantBlock, AdaIN, NoiseLayer, Linear, Convolution, Deconvolution, Normalization, Activation, \
Dropout2d, Pad, Downscale
from .Calculations import Reshape, Reparameterize, Concat, Addition
def build_sequential_layer(info_dict, on_... | 43.735294 | 118 | 0.612307 |
796e7a512974275efb7ce16ef5a6718dc71f52fc | 511 | py | Python | Python/oplop/tests/test_algorithm.py | nicenboim/oplop | bc73e179ff9b628cdffa44284ca3e2d9820a04bf | [
"Apache-2.0"
] | 12 | 2015-02-09T18:19:35.000Z | 2021-04-07T03:18:38.000Z | Python/oplop/tests/test_algorithm.py | nicenboim/oplop | bc73e179ff9b628cdffa44284ca3e2d9820a04bf | [
"Apache-2.0"
] | 12 | 2015-04-16T17:29:04.000Z | 2019-05-17T20:21:27.000Z | Python/oplop/tests/test_algorithm.py | nicenboim/oplop | bc73e179ff9b628cdffa44284ca3e2d9820a04bf | [
"Apache-2.0"
] | 6 | 2015-08-16T14:42:15.000Z | 2018-06-25T10:13:28.000Z | from .. import create
from . import testdata
import unittest
class AlgorithmTest(unittest.TestCase):
def test(self):
for data in testdata:
label = data['label']
master = data['master']
expected_password = data['password']
created = create(label, master)
... | 22.217391 | 56 | 0.643836 |
796e7d9ad6ee496f04173790a4a88804ce1ea2ab | 686 | py | Python | traffic_finder_server/secrets.py | CSC301-TTS-Project/TrafficFinderServer | 0294a74f7ccfa46ffec0187baa475b154f65083c | [
"MIT"
] | null | null | null | traffic_finder_server/secrets.py | CSC301-TTS-Project/TrafficFinderServer | 0294a74f7ccfa46ffec0187baa475b154f65083c | [
"MIT"
] | 10 | 2020-12-03T07:30:36.000Z | 2020-12-12T03:14:52.000Z | traffic_finder_server/secrets.py | CSC301-TTS-Project/TrafficFinderServer | 0294a74f7ccfa46ffec0187baa475b154f65083c | [
"MIT"
] | null | null | null | import json
import boto3
from botocore.exceptions import ClientError
def get_secrets_dict():
"""
Get AWS Secret Manager secrets for our application
@return: a dictionary that maps keys to secrets
"""
secret_name = "TrafficFinder/API"
# Create a Secrets Manager client
session = boto3.sessi... | 24.5 | 75 | 0.6793 |
796e7e20bfb42d656d07a43cdb30a68ea2041d22 | 545 | py | Python | main.py | SGlombicki/MicroBit-A-B-Key-mapped | 738695d8f60724ea656f1bb4064a65341a2456a8 | [
"MIT"
] | 1 | 2020-10-29T17:12:12.000Z | 2020-10-29T17:12:12.000Z | main.py | SGlombicki/MicroBit-A-B-Key-mapped | 738695d8f60724ea656f1bb4064a65341a2456a8 | [
"MIT"
] | null | null | null | main.py | SGlombicki/MicroBit-A-B-Key-mapped | 738695d8f60724ea656f1bb4064a65341a2456a8 | [
"MIT"
] | null | null | null | from pynput.keyboard import Listener, Key
import pyautogui
import json
import os
f = open('Settings.json')
Settings = json.load(f)
a = Settings['a']
b = Settings['b']
ab = Settings['ab']
mode = Settings['Mode']
if mode == "arrow":
def on_press(key):
if key == Key.up:
pyautogui.click(a)
if ... | 19.464286 | 68 | 0.651376 |
796e7e29fa50a8e0a1c6370063fc9bea880753f2 | 113,717 | py | Python | assets/src/ba_data/python/_ba.py | booklin/ballistica | c7835388313e2d100a27568aec46a57d938d6839 | [
"MIT"
] | null | null | null | assets/src/ba_data/python/_ba.py | booklin/ballistica | c7835388313e2d100a27568aec46a57d938d6839 | [
"MIT"
] | null | null | null | assets/src/ba_data/python/_ba.py | booklin/ballistica | c7835388313e2d100a27568aec46a57d938d6839 | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2020 Eric Froemling
#
# 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
# to use, copy, modify, merge, publish,... | 28.709164 | 79 | 0.633889 |
796e7f9e7ec8c7cfc9f7a291985a12086a7fc8c9 | 61 | py | Python | code/abc152_a_03.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/abc152_a_03.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/abc152_a_03.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | f=eval(input().replace(" ","=="))
print("Yes" if f else "No") | 30.5 | 33 | 0.557377 |
796e80100e7bce94c162f041da9804a38465f963 | 55 | py | Python | core/src/autogluon/core/task/base/__init__.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 4,462 | 2019-12-09T17:41:07.000Z | 2022-03-31T22:00:41.000Z | core/src/autogluon/core/task/base/__init__.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 1,408 | 2019-12-09T17:48:59.000Z | 2022-03-31T20:24:12.000Z | core/src/autogluon/core/task/base/__init__.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 623 | 2019-12-10T02:04:18.000Z | 2022-03-20T17:11:01.000Z | from .base_task import *
from .base_predictor import *
| 18.333333 | 29 | 0.781818 |
796e804c1a9ed95e4b440c612a2bb3a196c5374d | 870 | py | Python | Dynamic Programming/DP_Word_Wrap.py | adwaita1/ALGORITHMMS | e57086f12422dd53b044fc746935ea3e9a70b9e2 | [
"MIT"
] | 1 | 2018-10-29T06:16:47.000Z | 2018-10-29T06:16:47.000Z | Dynamic Programming/DP_Word_Wrap.py | adwaita1/ALGORITHMMS | e57086f12422dd53b044fc746935ea3e9a70b9e2 | [
"MIT"
] | null | null | null | Dynamic Programming/DP_Word_Wrap.py | adwaita1/ALGORITHMMS | e57086f12422dd53b044fc746935ea3e9a70b9e2 | [
"MIT"
] | null | null | null | import math
memo={}
parent={}
def badness(i,j,m):
totsize=0
extra=0
for x in range(i,j):
totsize+=len(ls[x])
extra+=1
totsize+=extra-1
if m>=totsize:
return ((m-totsize)**3)
else:
return math.inf
def minimum(i,ls,w,n):
p=[]
for j in range(i+1,n+1):
... | 17.4 | 68 | 0.529885 |
796e804de16608e32bbb601223167fe276d49a00 | 2,772 | py | Python | normalise-wav/normalise_sounds.py | CostasAK/cactbot-user | 2f9d55f660480eeeddd04ef6b172b1485ac07109 | [
"Apache-2.0"
] | 1 | 2021-12-15T20:53:55.000Z | 2021-12-15T20:53:55.000Z | normalise-wav/normalise_sounds.py | CostasAK/cactbot-user | 2f9d55f660480eeeddd04ef6b172b1485ac07109 | [
"Apache-2.0"
] | 3 | 2022-01-09T20:31:17.000Z | 2022-01-09T20:34:17.000Z | normalise-wav/normalise_sounds.py | CostasAK/cactbot-user | 2f9d55f660480eeeddd04ef6b172b1485ac07109 | [
"Apache-2.0"
] | null | null | null | import os
import re
import math
import numpy as np
import pyloudnorm as pyln
from pathlib import Path
from scipy.io import wavfile
root_path = Path("../wav/")
minimum_length = 712e-3
def makeWaveFloating(data):
if data.dtype == np.dtype("uint8"):
data = ((data.astype("float32") / 255.0)... | 29.806452 | 99 | 0.55267 |
796e823c0d6a94c4ef99e65efa01567f0b31e5b0 | 166 | py | Python | presence/presence/asgi.py | nav/presence | 1e017d70be6ed2c078fc763c6293175783c2ee9c | [
"MIT"
] | null | null | null | presence/presence/asgi.py | nav/presence | 1e017d70be6ed2c078fc763c6293175783c2ee9c | [
"MIT"
] | null | null | null | presence/presence/asgi.py | nav/presence | 1e017d70be6ed2c078fc763c6293175783c2ee9c | [
"MIT"
] | null | null | null | import os
from channels.asgi import get_channel_layer
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "presence.live_settings")
channel_layer = get_channel_layer()
| 23.714286 | 73 | 0.837349 |
796e8390abdf3b5301386c748cbbcce0b126a111 | 436 | py | Python | examples/fields.py | KirovVerst/qgeneration | 67f2ad0fac21d9a810b11da1eb9300e0f06ccf74 | [
"MIT"
] | 1 | 2017-07-28T18:21:40.000Z | 2017-07-28T18:21:40.000Z | examples/fields.py | KirovVerst/qgeneration | 67f2ad0fac21d9a810b11da1eb9300e0f06ccf74 | [
"MIT"
] | null | null | null | examples/fields.py | KirovVerst/qgeneration | 67f2ad0fac21d9a810b11da1eb9300e0f06ccf74 | [
"MIT"
] | null | null | null | import datetime
from qgeneration.qfields import DateField, FirstNameQField
if __name__ == '__main__':
date_field = DateField('date_field',
start=datetime.date(year=1990, month=1, day=1),
finish=datetime.date(year=2000, month=1, day=1))
date = date_field.gen... | 33.538462 | 75 | 0.633028 |
796e8421bfe3782e379c8915114804159dac2b5a | 2,522 | py | Python | test/acceptance/cypherpunkpay/cypherpunkpay_app_test_case.py | RandyMcMillan/CypherpunkPay | 997fc1e06865d6be75c46b719e673b2f50546f44 | [
"MIT",
"Unlicense"
] | null | null | null | test/acceptance/cypherpunkpay/cypherpunkpay_app_test_case.py | RandyMcMillan/CypherpunkPay | 997fc1e06865d6be75c46b719e673b2f50546f44 | [
"MIT",
"Unlicense"
] | null | null | null | test/acceptance/cypherpunkpay/cypherpunkpay_app_test_case.py | RandyMcMillan/CypherpunkPay | 997fc1e06865d6be75c46b719e673b2f50546f44 | [
"MIT",
"Unlicense"
] | null | null | null | import pyramid
from pyramid import paster, testing
import webtest
import cypherpunkpay
from cypherpunkpay.common import *
from cypherpunkpay import ConfigParser, set_btc_testnet, DummyJobScheduler, ExamplePriceTickers
from cypherpunkpay.app import App
from cypherpunkpay.models.user import User
from cypherpunkpay.tools... | 35.027778 | 101 | 0.700238 |
796e8599a89b1264b89d809dc4c919827d582492 | 73,558 | py | Python | keras/engine/training.py | Bonjugal/keras | 8acde1e82e1572ff4d4ab86d10d6158bcfcc7e30 | [
"MIT"
] | 3 | 2019-10-23T01:35:40.000Z | 2020-06-03T10:28:34.000Z | keras/engine/training.py | Bonjugal/keras | 8acde1e82e1572ff4d4ab86d10d6158bcfcc7e30 | [
"MIT"
] | null | null | null | keras/engine/training.py | Bonjugal/keras | 8acde1e82e1572ff4d4ab86d10d6158bcfcc7e30 | [
"MIT"
] | 2 | 2021-02-02T08:11:28.000Z | 2021-09-01T12:29:40.000Z | """Training-related part of the Keras engine.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import warnings
import copy
import numpy as np
from .network import Network
from .base_layer import Layer
from .training_utils import collect_metrics
from .tra... | 48.140052 | 114 | 0.541287 |
796e859c0fb598160db17271aa716e1dddd0aa25 | 167 | py | Python | plugins/pcr/plugins/pcrjjc/__init__.py | liangzimiao/miyubot | c2788712255e39348c8980c8ace2f6f75fb6621c | [
"Apache-2.0"
] | null | null | null | plugins/pcr/plugins/pcrjjc/__init__.py | liangzimiao/miyubot | c2788712255e39348c8980c8ace2f6f75fb6621c | [
"Apache-2.0"
] | null | null | null | plugins/pcr/plugins/pcrjjc/__init__.py | liangzimiao/miyubot | c2788712255e39348c8980c8ace2f6f75fb6621c | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import nonebot
_sub_plugins = set()
_sub_plugins |= nonebot.load_plugins(
str((Path(__file__).parent / "plugins/").
resolve()))
| 18.555556 | 45 | 0.688623 |
796e85b50d39f6a4de8596537c9ac6f4ce78a44c | 119 | py | Python | money_management_project/settings/__init__.py | farhad0085/django-money-management | d4622192d6b9df3f785abd5f4ef1bfcbf465d045 | [
"MIT"
] | null | null | null | money_management_project/settings/__init__.py | farhad0085/django-money-management | d4622192d6b9df3f785abd5f4ef1bfcbf465d045 | [
"MIT"
] | null | null | null | money_management_project/settings/__init__.py | farhad0085/django-money-management | d4622192d6b9df3f785abd5f4ef1bfcbf465d045 | [
"MIT"
] | null | null | null | from .base import *
if ENVIRONMENT == "production":
from .production import *
else:
from .development import * | 19.833333 | 31 | 0.689076 |
796e85c8b80350b2f861b0d36bfea12f2edc31fb | 2,108 | py | Python | setup.py | fiber-space/jynx | e5dbf3f6c1601fecae9ba131cb7352b43beb0f43 | [
"MIT"
] | 1 | 2019-01-04T17:34:24.000Z | 2019-01-04T17:34:24.000Z | setup.py | fiber-space/jynx | e5dbf3f6c1601fecae9ba131cb7352b43beb0f43 | [
"MIT"
] | null | null | null | setup.py | fiber-space/jynx | e5dbf3f6c1601fecae9ba131cb7352b43beb0f43 | [
"MIT"
] | null | null | null | from distutils.core import setup, Extension
import sys
py_version_t = (2,7)
py_version_s = ".".join([str(x) for x in py_version_t])
if __name__ == '__main__':
version_ext = ""
if 'sdist' in sys.argv:
version_ext = '-py'+py_version_s
setup(
name = 'Jynx',
version = '0.... | 39.773585 | 111 | 0.409393 |
796e86ba60da0d8856964bf480738ee358d42b36 | 160 | py | Python | gffpandas/__init__.py | VivianMonzon/gffpandas-1 | 8d69d56faf526cf953b753cc2916b4fcac47daf5 | [
"ISC"
] | null | null | null | gffpandas/__init__.py | VivianMonzon/gffpandas-1 | 8d69d56faf526cf953b753cc2916b4fcac47daf5 | [
"ISC"
] | null | null | null | gffpandas/__init__.py | VivianMonzon/gffpandas-1 | 8d69d56faf526cf953b753cc2916b4fcac47daf5 | [
"ISC"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for gffpandas."""
__author__ = """Konrad U. Förstner"""
__email__ = 'konrad@foerstner.org'
__version__ = '0.1.0'
| 20 | 38 | 0.64375 |
796e8803e71e98068d348be8a9401b4a50edbf05 | 20,240 | py | Python | _unittest/test_00_GeometryOperators.py | myoung301/pyaedt | e848dabbdd65aada3af1c5389947bb8a1bfe4a6f | [
"MIT"
] | 38 | 2021-10-01T23:15:26.000Z | 2022-03-30T18:14:41.000Z | _unittest/test_00_GeometryOperators.py | myoung301/pyaedt | e848dabbdd65aada3af1c5389947bb8a1bfe4a6f | [
"MIT"
] | 362 | 2021-09-30T17:11:55.000Z | 2022-03-31T13:36:20.000Z | _unittest/test_00_GeometryOperators.py | pyansys/pyaedt | c7b045fede6bc707fb20a8db7d5680c66d8263f6 | [
"MIT"
] | 15 | 2021-09-30T20:21:02.000Z | 2022-02-21T20:22:03.000Z | import math
import clr
from pyaedt.modeler.GeometryOperators import GeometryOperators as go
clr.AddReference("System.Collections")
from pyaedt.generic.constants import AXIS, PLANE, SWEEPDRAFT, unit_converter
from System import Double
from System.Collections.Generic import List
try:
import pytest # noqa: F401
e... | 40.724346 | 120 | 0.568874 |
796e8883c2efb3886edd89f96a240e14c6e83d96 | 22,175 | py | Python | src/toil/provisioners/gceProvisioner.py | ngs-mstb/toil | e14b41e7552e2aa7c161e01f93b8260299590e2d | [
"Apache-2.0"
] | null | null | null | src/toil/provisioners/gceProvisioner.py | ngs-mstb/toil | e14b41e7552e2aa7c161e01f93b8260299590e2d | [
"Apache-2.0"
] | null | null | null | src/toil/provisioners/gceProvisioner.py | ngs-mstb/toil | e14b41e7552e2aa7c161e01f93b8260299590e2d | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | 46.197917 | 124 | 0.613123 |
796e88922618c915e9228d52b41556447f1adbd6 | 1,166 | py | Python | app/core/tests/tests_admin.py | VashieO/recipe-app-api | 10d9004f902f4bc8a6fdb8341a6e14af3a414364 | [
"MIT"
] | null | null | null | app/core/tests/tests_admin.py | VashieO/recipe-app-api | 10d9004f902f4bc8a6fdb8341a6e14af3a414364 | [
"MIT"
] | null | null | null | app/core/tests/tests_admin.py | VashieO/recipe-app-api | 10d9004f902f4bc8a6fdb8341a6e14af3a414364 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='admin@testcompany.com',
... | 30.684211 | 68 | 0.64837 |
796e898849bc278dee6a979e32466d9273daf665 | 11,698 | py | Python | tests/testnotebooks.py | jacquesalice/notebooks-latest | a24ff4357cc5b35e16a844a9d0fc5355957e4ca3 | [
"BSD-3-Clause"
] | null | null | null | tests/testnotebooks.py | jacquesalice/notebooks-latest | a24ff4357cc5b35e16a844a9d0fc5355957e4ca3 | [
"BSD-3-Clause"
] | null | null | null | tests/testnotebooks.py | jacquesalice/notebooks-latest | a24ff4357cc5b35e16a844a9d0fc5355957e4ca3 | [
"BSD-3-Clause"
] | null | null | null | __version__ = '20200712'
__author__ = 'Robert Nikutta <nikutta@noao.edu>'
# imports
# stdlib
import glob
import json
import os
import re
import time
from getpass import getpass
from pprint import PrettyPrinter
pp = PrettyPrinter()
pprint = pp.pprint
# third party
import nbformat
from nbconvert.preprocessors import E... | 30.703412 | 165 | 0.59617 |
796e898d593da34cbe650af8e2cf0376133c11ab | 4,737 | py | Python | color_histogram/core/hist_3d.py | waragai-katsunori/ColorHistogram | f57c1115a94aa72387a6e40aef88b1861eb470ab | [
"MIT"
] | null | null | null | color_histogram/core/hist_3d.py | waragai-katsunori/ColorHistogram | f57c1115a94aa72387a6e40aef88b1861eb470ab | [
"MIT"
] | null | null | null | color_histogram/core/hist_3d.py | waragai-katsunori/ColorHistogram | f57c1115a94aa72387a6e40aef88b1861eb470ab | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
## @package color_histogram.core.hist_3d
#
# Implementation of 3D color histograms.
# @author tody
# @date 2015/08/28
from __future__ import division
import numpy as np
from color_histogram.core.color_pixels import ColorPixels
from color_histogram.core.hist_common import colorC... | 30.960784 | 119 | 0.652523 |
796e89f88665e2ac1b9e8a355928303efc3952e5 | 36,810 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/aio/operations/_virtual_networks_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/aio/operations/_virtual_networks_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/aio/operations/_virtual_networks_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 may ... | 49.878049 | 230 | 0.669573 |
796e8a9289884b28e64427997cfe364c30becb94 | 2,542 | py | Python | src/test/tests/databases/zipwrapper.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/zipwrapper.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/zipwrapper.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: zipwrapper.py
#
# Tests: STSD operation (STL)
# STMD operation (Silo)
# .visit file and .* database
# Operation over time
# Cache pre-emption wo... | 28.244444 | 78 | 0.684894 |
796e8cb4b077b479078972ec5ed3c4d8cb2ab542 | 7,716 | py | Python | main.py | goldblum/AdversariallyRobustDistillation | 779ade36d612bddb0a5a705fdd74efe7571a1381 | [
"MIT"
] | 43 | 2019-05-24T02:12:35.000Z | 2021-12-18T14:04:20.000Z | main.py | goldblum/AdversariallyRobustDistillation | 779ade36d612bddb0a5a705fdd74efe7571a1381 | [
"MIT"
] | 7 | 2019-12-21T08:51:22.000Z | 2022-03-14T06:22:28.000Z | main.py | goldblum/AdversariallyRobustDistillation | 779ade36d612bddb0a5a705fdd74efe7571a1381 | [
"MIT"
] | 10 | 2019-09-24T08:59:16.000Z | 2022-01-21T08:39:45.000Z | from __future__ import print_function
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision
import torchvision.transforms as transforms
import os
import argparse
from tqdm import tqdm
from models import *
parser = argparse... | 43.59322 | 189 | 0.690772 |
796e8d0fba5f8a47a145f8628377d526b73a0734 | 12,468 | py | Python | databricks_cli/jobs/cli.py | testruction/databricks-cli | 4e74b10ed3e3f017f1444fc1b7842c5b25f1fe7c | [
"Apache-2.0"
] | 252 | 2017-06-03T06:08:02.000Z | 2022-03-24T16:43:02.000Z | databricks_cli/jobs/cli.py | testruction/databricks-cli | 4e74b10ed3e3f017f1444fc1b7842c5b25f1fe7c | [
"Apache-2.0"
] | 310 | 2017-06-28T06:00:07.000Z | 2022-03-31T15:23:07.000Z | databricks_cli/jobs/cli.py | testruction/databricks-cli | 4e74b10ed3e3f017f1444fc1b7842c5b25f1fe7c | [
"Apache-2.0"
] | 192 | 2017-07-31T01:00:43.000Z | 2022-03-13T19:19:21.000Z | # Databricks CLI
# Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"), except
# that the use of services to which certain application programming
# interfaces (each, an "API") connect requires that the user first obtain
# a license for the use of the APIs from Databricks,... | 42.408163 | 98 | 0.701877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.