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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7978eb19addd12c1e117346b29b4347973316b4c | 2,402 | py | Python | setup.py | JoonyoungYi/fancyimpute | 1608f493b26d8418d69c54661ef0688d7c11f78d | [
"Apache-2.0"
] | null | null | null | setup.py | JoonyoungYi/fancyimpute | 1608f493b26d8418d69c54661ef0688d7c11f78d | [
"Apache-2.0"
] | null | null | null | setup.py | JoonyoungYi/fancyimpute | 1608f493b26d8418d69c54661ef0688d7c11f78d | [
"Apache-2.0"
] | null | null | null | # 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, software
# distributed under th... | 33.361111 | 74 | 0.623647 |
7978eceffbd81cbf02df6bfc597f6c1822b24df8 | 6,151 | py | Python | iflow/visualization/visualize_latent_distr.py | WeitaoZC/iflow | 404ffdbeb27d9fae7d1350de6af84ed7bfdaad99 | [
"MIT"
] | null | null | null | iflow/visualization/visualize_latent_distr.py | WeitaoZC/iflow | 404ffdbeb27d9fae7d1350de6af84ed7bfdaad99 | [
"MIT"
] | null | null | null | iflow/visualization/visualize_latent_distr.py | WeitaoZC/iflow | 404ffdbeb27d9fae7d1350de6af84ed7bfdaad99 | [
"MIT"
] | null | null | null | from matplotlib.colors import Normalize, same_color
import torch
import numpy as np
import os
from iflow.utils.generic import to_numpy, to_torch
import matplotlib.pyplot as plt
def visualize_latent_distribution(val_trj, iflow, device, fig_number=1):
n_trj = len(val_trj)
dim = val_trj[0].shape[-1]
## Store... | 36.39645 | 115 | 0.584946 |
7978ecf9bae9cdcd4ce0dfaf2144c3fe33a1799a | 5,825 | py | Python | Models/biGAN/BasicBiganXEntropyHiLatDim.py | Midoriii/Anomaly_Detection_Diploma | 11145e3e5210a4e45a33d98b138213edb7bc5d3d | [
"BSD-3-Clause"
] | null | null | null | Models/biGAN/BasicBiganXEntropyHiLatDim.py | Midoriii/Anomaly_Detection_Diploma | 11145e3e5210a4e45a33d98b138213edb7bc5d3d | [
"BSD-3-Clause"
] | null | null | null | Models/biGAN/BasicBiganXEntropyHiLatDim.py | Midoriii/Anomaly_Detection_Diploma | 11145e3e5210a4e45a33d98b138213edb7bc5d3d | [
"BSD-3-Clause"
] | null | null | null | '''
Copyright (c) 2021, Štěpán Beneš
Basic bigAN net, using cross entropy as loss and higher lat dims
'''
import numpy as np
from Models.biGAN.BaseBiganModel import BaseBiganModel
from Models.Losses.custom_losses import wasserstein_loss
from Models.biGAN.weightclip_constraint import WeightClip
from keras.layers impo... | 34.064327 | 99 | 0.567382 |
7978ed2bf593e355e1eb1bac622fe9ac21cfaea3 | 8,856 | py | Python | crianza/native.py | cslarsen/simple-py-vm | fa044f9d491f37cc06892bad14b2c80b8ac5a7cd | [
"BSD-3-Clause"
] | 56 | 2015-04-17T18:32:59.000Z | 2022-01-12T16:33:12.000Z | crianza/native.py | cslarsen/simple-py-vm | fa044f9d491f37cc06892bad14b2c80b8ac5a7cd | [
"BSD-3-Clause"
] | 1 | 2018-11-08T04:31:15.000Z | 2018-11-24T08:46:07.000Z | crianza/native.py | cslarsen/simple-py-vm | fa044f9d491f37cc06892bad14b2c80b8ac5a7cd | [
"BSD-3-Clause"
] | 10 | 2015-05-13T14:48:29.000Z | 2021-07-25T06:52:07.000Z | """
Contains extremely experimental support for compiling to native Python.
Beware that actually running your code as native Python bytecode may segfault
the interpreter!
TODO:
- Read all jump locations (not entirely possible, actually), convert to
bp.Label.
- In the entire language, require that jumps... | 25.894737 | 79 | 0.592818 |
7978ed6ee27e3e8d31c335002bde96d7163e77d9 | 2,529 | py | Python | codes/preprocess/ct_collect_noise_sp32v160m0_yic_210525.py | yicrane/Real-SR | a6e380b791129b80fe58bf282089c0cfd9159b36 | [
"Apache-2.0"
] | null | null | null | codes/preprocess/ct_collect_noise_sp32v160m0_yic_210525.py | yicrane/Real-SR | a6e380b791129b80fe58bf282089c0cfd9159b36 | [
"Apache-2.0"
] | null | null | null | codes/preprocess/ct_collect_noise_sp32v160m0_yic_210525.py | yicrane/Real-SR | a6e380b791129b80fe58bf282089c0cfd9159b36 | [
"Apache-2.0"
] | 1 | 2021-07-07T13:56:30.000Z | 2021-07-07T13:56:30.000Z | from PIL import Image
import numpy as np
import os.path as osp
import glob
import os
import argparse
import yaml
parser = argparse.ArgumentParser(description='create a dataset')
parser.add_argument('--dataset', default='df2k', type=str, help='selecting different datasets')
parser.add_argument('--artifacts', default=''... | 34.643836 | 113 | 0.627521 |
7978ef1e743ac8a7b41bb68585158fbb585d19ed | 12,197 | py | Python | google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/transports/grpc_asyncio.py | googleapis/python-videointelligence | 8987116fc5aee0d3e9c5bb01a5e7a32d41ce09c0 | [
"Apache-2.0"
] | 33 | 2019-12-23T14:22:10.000Z | 2022-03-16T09:31:08.000Z | google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/transports/grpc_asyncio.py | googleapis/python-videointelligence | 8987116fc5aee0d3e9c5bb01a5e7a32d41ce09c0 | [
"Apache-2.0"
] | 122 | 2020-01-28T13:29:24.000Z | 2022-03-30T22:42:11.000Z | google/cloud/videointelligence_v1p3beta1/services/streaming_video_intelligence_service/transports/grpc_asyncio.py | googleapis/python-videointelligence | 8987116fc5aee0d3e9c5bb01a5e7a32d41ce09c0 | [
"Apache-2.0"
] | 18 | 2019-12-21T21:48:00.000Z | 2022-01-29T08:15:00.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 45.174074 | 117 | 0.648766 |
7978f16ca3f99de3097a72746235bc36abdb4fb4 | 599 | py | Python | examples/biorbd_viz.py | tgouss/biorbd-viz | 0ce7e0beb25f2ee83a2f48d4a7919c076e854473 | [
"Apache-2.0"
] | null | null | null | examples/biorbd_viz.py | tgouss/biorbd-viz | 0ce7e0beb25f2ee83a2f48d4a7919c076e854473 | [
"Apache-2.0"
] | null | null | null | examples/biorbd_viz.py | tgouss/biorbd-viz | 0ce7e0beb25f2ee83a2f48d4a7919c076e854473 | [
"Apache-2.0"
] | null | null | null | # """
# Example script for animating a model
# """
import numpy as np
from BiorbdViz import BiorbdViz
b = BiorbdViz(model_path="pyomecaman.bioMod")
animate_by_hand = 0
if animate_by_hand == 0:
n_frames = 200
all_q = np.zeros((b.nQ, n_frames))
all_q[4, :] = np.linspace(0, np.pi / 2, n_frames)
b.load_... | 21.392857 | 53 | 0.60601 |
7978f193533c63d56b400066f485dab1fe5fc4ea | 1,959 | py | Python | src/flagon/backends/db_django/models.py | ashcrow/flagon | 50e6aa96854468a89399ef08573e4f814a002d26 | [
"MIT"
] | 18 | 2015-08-27T03:49:42.000Z | 2021-05-12T21:48:17.000Z | src/flagon/backends/db_django/models.py | ashcrow/flagon | 50e6aa96854468a89399ef08573e4f814a002d26 | [
"MIT"
] | 2 | 2016-07-18T13:48:46.000Z | 2017-05-20T15:56:03.000Z | src/flagon/backends/db_django/models.py | ashcrow/flagon | 50e6aa96854468a89399ef08573e4f814a002d26 | [
"MIT"
] | 5 | 2015-09-20T08:46:01.000Z | 2021-06-10T03:41:04.000Z | # The MIT License (MIT)
#
# Copyright (c) 2014 Steve Milner
#
# 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, modi... | 32.65 | 78 | 0.712608 |
7978f2a45493017945218987f749ae8b989c5aa4 | 1,469 | py | Python | samples/generated_samples/vmmigration_v1_generated_vm_migration_fetch_inventory_sync.py | renovate-bot/python-vmmigration | 80a2cf46a21f516899da818a7aec0f2a67222047 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/vmmigration_v1_generated_vm_migration_fetch_inventory_sync.py | renovate-bot/python-vmmigration | 80a2cf46a21f516899da818a7aec0f2a67222047 | [
"Apache-2.0"
] | 10 | 2021-11-18T10:47:48.000Z | 2022-03-07T15:48:54.000Z | samples/generated_samples/vmmigration_v1_generated_vm_migration_fetch_inventory_sync.py | renovate-bot/python-vmmigration | 80a2cf46a21f516899da818a7aec0f2a67222047 | [
"Apache-2.0"
] | 1 | 2022-01-29T08:15:02.000Z | 2022-01-29T08:15:02.000Z | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 31.934783 | 85 | 0.761743 |
7978f35ab0ce5ae3eb008482be11a2113239ce13 | 8,511 | py | Python | alexa-lambda-skill/lambda.py | gabrik/zenoh-ifttt-demo | f655326948062afd858741cfbfb468610e4e88d9 | [
"Apache-2.0"
] | 1 | 2021-12-17T07:03:34.000Z | 2021-12-17T07:03:34.000Z | alexa-lambda-skill/lambda.py | gabrik/zenoh-ifttt-demo | f655326948062afd858741cfbfb468610e4e88d9 | [
"Apache-2.0"
] | 2 | 2021-12-16T09:09:05.000Z | 2021-12-17T06:54:11.000Z | alexa-lambda-skill/lambda.py | gabrik/zenoh-iftdt-demo | f655326948062afd858741cfbfb468610e4e88d9 | [
"Apache-2.0"
] | null | null | null | ##
## Copyright (c) 2017, 2021 ADLINK Technology Inc.
##
## This program and the accompanying materials are made available under the
## terms of the Eclipse Public License 2.0 which is available at
## http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
## which is available at https://www.apache.or... | 40.336493 | 127 | 0.600164 |
7978f418be2939be10ed18fd5dd6247856de94eb | 989 | py | Python | azure/mgmt/network/v2016_09_01/models/virtual_network_paged.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2016_09_01/models/virtual_network_paged.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2016_09_01/models/virtual_network_paged.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.
# C... | 35.321429 | 138 | 0.569262 |
7978f5001956e6f1df585f9ed69d1cae35e3916a | 26,208 | py | Python | python/pyspark/sql/context.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 11 | 2016-05-26T12:06:38.000Z | 2020-07-06T20:37:07.000Z | python/pyspark/sql/context.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 2 | 2015-10-22T07:30:24.000Z | 2015-10-28T10:10:06.000Z | python/pyspark/sql/context.py | bopopescu/wso2-spark | 6982456ded39a8fef0ad26600218f8f575aac2a5 | [
"Apache-2.0",
"MIT"
] | 9 | 2016-07-29T01:13:50.000Z | 2020-07-23T16:16:17.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 us... | 38.826667 | 100 | 0.606494 |
7978f51d5d4f76c79f48858870c9f805af068bd9 | 14,278 | py | Python | pycsw/core/util.py | mwengren/pycsw | e0d7a9b42a37a37ce9c792966b62241bf6c1acd9 | [
"MIT"
] | null | null | null | pycsw/core/util.py | mwengren/pycsw | e0d7a9b42a37a37ce9c792966b62241bf6c1acd9 | [
"MIT"
] | null | null | null | pycsw/core/util.py | mwengren/pycsw | e0d7a9b42a37a37ce9c792966b62241bf6c1acd9 | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-15 -*-
# =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
# Angelos Tzotsos <tzotsos@gmail.com>
#
# Copyright (c) 2015 Tom Kralidis
# Copyright (c) 2015 Angelos Tzotsos
#
# Permission is hereby granted, free of charge, to... | 32.45 | 87 | 0.585866 |
7978f5498e261c61281921d5ccd572766ac05c30 | 2,913 | py | Python | subject/tests/functional/test_logging.py | laoyigrace/subject | e6ed989fdc250917a19788112b22322b73b3550f | [
"Apache-2.0"
] | null | null | null | subject/tests/functional/test_logging.py | laoyigrace/subject | e6ed989fdc250917a19788112b22322b73b3550f | [
"Apache-2.0"
] | null | null | null | subject/tests/functional/test_logging.py | laoyigrace/subject | e6ed989fdc250917a19788112b22322b73b3550f | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# 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 requ... | 30.030928 | 78 | 0.671129 |
7978f64363ae8106ad94ceaa124cf69225a95a8b | 18,357 | py | Python | pycdap.py | vhajdari/pycdap | 355983fa5b3f2958758658a78f13fa06fc6d52ea | [
"Apache-2.0"
] | 1 | 2021-09-01T17:42:40.000Z | 2021-09-01T17:42:40.000Z | pycdap.py | vhajdari/pycdap | 355983fa5b3f2958758658a78f13fa06fc6d52ea | [
"Apache-2.0"
] | null | null | null | pycdap.py | vhajdari/pycdap | 355983fa5b3f2958758658a78f13fa06fc6d52ea | [
"Apache-2.0"
] | 2 | 2020-07-18T09:42:17.000Z | 2020-12-08T04:13:09.000Z | import requests
import json
import os
import logging
from urlparse import urlparse
from datetime import datetime
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%m-%d %H:%M',
filename=__name__ + ... | 37.084848 | 118 | 0.527592 |
7978f72db73244cf9c1837331aeba6c4f6adba92 | 121 | py | Python | app.py | Sathish129/python-docs-hello-world | 7ea10d8c002f8c21a632624d92aad6a3cdc5c49b | [
"MIT"
] | null | null | null | app.py | Sathish129/python-docs-hello-world | 7ea10d8c002f8c21a632624d92aad6a3cdc5c49b | [
"MIT"
] | null | null | null | app.py | Sathish129/python-docs-hello-world | 7ea10d8c002f8c21a632624d92aad6a3cdc5c49b | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Welcome to Azure world Sathish!"
| 17.285714 | 44 | 0.694215 |
7978f890de8c695fcfe672ada1c40e32b94b821b | 7,803 | py | Python | sdk/python/pulumi_azure_nextgen/cdn/v20200901/afd_endpoint.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/cdn/v20200901/afd_endpoint.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/cdn/v20200901/afd_endpoint.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 41.951613 | 235 | 0.647571 |
7978f91e5a419a11b39e8b2b265b22d67654454a | 51,989 | py | Python | tests/common/impala_test_suite.py | yx91490/apache-impala | 0ade132f005a9fd9535640714a8d219a12c28d44 | [
"Apache-2.0"
] | null | null | null | tests/common/impala_test_suite.py | yx91490/apache-impala | 0ade132f005a9fd9535640714a8d219a12c28d44 | [
"Apache-2.0"
] | null | null | null | tests/common/impala_test_suite.py | yx91490/apache-impala | 0ade132f005a9fd9535640714a8d219a12c28d44 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 43.761785 | 94 | 0.697205 |
7978f9f296f75307a41b28995cb4c1e57942bd21 | 310 | py | Python | src/build/__init__.py | loftwah/booklet-generator | 4d24518ec070a491885f8e5fdcbcf2b74cd9668a | [
"MIT"
] | null | null | null | src/build/__init__.py | loftwah/booklet-generator | 4d24518ec070a491885f8e5fdcbcf2b74cd9668a | [
"MIT"
] | null | null | null | src/build/__init__.py | loftwah/booklet-generator | 4d24518ec070a491885f8e5fdcbcf2b74cd9668a | [
"MIT"
] | 1 | 2019-12-09T17:09:56.000Z | 2019-12-09T17:09:56.000Z | ### Link to the diferent functions to build each of the mediums
from .ePub import build_epub
from .ePub import build_mobi
from .scribus import build_pdf
from .appAndroid import build_app
build_functions = {
"pdf" : build_pdf,
"epub" : build_epub,
"mobi" : build_mobi,
"android" : build_app,
} | 23.846154 | 63 | 0.719355 |
7978fc740f4127d5b87f30d345e8bd22acc15c7c | 1,224 | py | Python | src/database_manager.py | jonnyk17/Fitbit-Dashboard | cefa1ea9329161abd209220966825ec5ea86cef8 | [
"MIT"
] | null | null | null | src/database_manager.py | jonnyk17/Fitbit-Dashboard | cefa1ea9329161abd209220966825ec5ea86cef8 | [
"MIT"
] | null | null | null | src/database_manager.py | jonnyk17/Fitbit-Dashboard | cefa1ea9329161abd209220966825ec5ea86cef8 | [
"MIT"
] | 1 | 2022-03-16T20:18:19.000Z | 2022-03-16T20:18:19.000Z | import API
import fitbit
class DatabaseManager:
def __init__(self):
CLIENT_ID, CLIENT_SECRET = API.get_credentials()
self.client = API.authorize_user(CLIENT_ID, CLIENT_SECRET)
def query(self, query_type, data_type, date=None, end_date=None, period=None, regen_tokens=True):
data = []
... | 38.25 | 101 | 0.563725 |
7978fc99c50d6f964e903ab8fba82f83be7a7a22 | 24,315 | py | Python | paddlenlp/metrics/glue.py | JunnYu/ConvBERT-Prod | a1351e1e7f9400cb8c71d0a15d23629b4cb055d4 | [
"Apache-2.0"
] | 11 | 2022-01-06T07:39:47.000Z | 2022-03-22T06:18:40.000Z | paddlenlp/metrics/glue.py | JunnYu/ConvBERT-Prod | a1351e1e7f9400cb8c71d0a15d23629b4cb055d4 | [
"Apache-2.0"
] | null | null | null | paddlenlp/metrics/glue.py | JunnYu/ConvBERT-Prod | a1351e1e7f9400cb8c71d0a15d23629b4cb055d4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.23913 | 128 | 0.557968 |
7978fd54f6df86009ef6f7100d8079d5fdd981d7 | 1,342 | py | Python | infra/bots/recipe_modules/upload_nano_results/example.py | henry-luo/skia | 2f2187b66dca1761f590668d3cbdf07453df7b6f | [
"BSD-3-Clause"
] | 1 | 2019-01-16T03:59:15.000Z | 2019-01-16T03:59:15.000Z | infra/bots/recipe_modules/upload_nano_results/example.py | henry-luo/skia | 2f2187b66dca1761f590668d3cbdf07453df7b6f | [
"BSD-3-Clause"
] | null | null | null | infra/bots/recipe_modules/upload_nano_results/example.py | henry-luo/skia | 2f2187b66dca1761f590668d3cbdf07453df7b6f | [
"BSD-3-Clause"
] | 1 | 2019-11-05T01:02:09.000Z | 2019-11-05T01:02:09.000Z | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Example recipe w/ coverage.
DEPS = [
'recipe_engine/properties',
'upload_nano_results',
]
def RunSteps(api):
api.upload_nano_results.run()
def... | 24.851852 | 72 | 0.587928 |
79790148c53872752a811c7aa47542569b94ccc9 | 6,726 | py | Python | nova/tests/unit/virt/xenapi/image/test_vdi_stream.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-08-14T02:20:59.000Z | 2020-08-14T02:20:59.000Z | nova/tests/unit/virt/xenapi/image/test_vdi_stream.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:04:16.000Z | 2021-12-13T20:45:03.000Z | nova/tests/unit/virt/xenapi/image/test_vdi_stream.py | Nexenta/nova | ccecb507ff4bdcdd23d90e7b5b02a22c5a46ecc3 | [
"Apache-2.0"
] | 1 | 2020-07-24T02:31:45.000Z | 2020-07-24T02:31:45.000Z | # Copyright 2017 Citrix System
# 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... | 44.84 | 78 | 0.588611 |
797901b9c7abba52e679f52102afdf94ecaa6494 | 1,482 | py | Python | Assignment7/upload/linear_classifier.py | JavisDaDa/ELEC546 | 813513e6e1d7a75f8ad85f384131be9d36ccfc06 | [
"MIT"
] | null | null | null | Assignment7/upload/linear_classifier.py | JavisDaDa/ELEC546 | 813513e6e1d7a75f8ad85f384131be9d36ccfc06 | [
"MIT"
] | null | null | null | Assignment7/upload/linear_classifier.py | JavisDaDa/ELEC546 | 813513e6e1d7a75f8ad85f384131be9d36ccfc06 | [
"MIT"
] | null | null | null | import numpy as np
from linear_svm import svm_loss_vectorized
class LinearClassifier(object):
def __init__(self):
self.theta = None
def train(self, X, y, learning_rate=1e-3, reg=1e-5, num_iters=100, batch_size=200,
verbose=False):
m, d = X.shape
K = np.max(y) + 1
... | 27.962264 | 86 | 0.526316 |
797901fae05c8d2cfe4bfa8253a9f646acc290f4 | 25,367 | py | Python | RecomandEngine/exactsolvers/linear/SMT_Solver_Z3_RealPBC.py | merascu/test | 812a44673abe28f54e2cfa1ffa7c675d15cf2242 | [
"Apache-2.0"
] | null | null | null | RecomandEngine/exactsolvers/linear/SMT_Solver_Z3_RealPBC.py | merascu/test | 812a44673abe28f54e2cfa1ffa7c675d15cf2242 | [
"Apache-2.0"
] | null | null | null | RecomandEngine/exactsolvers/linear/SMT_Solver_Z3_RealPBC.py | merascu/test | 812a44673abe28f54e2cfa1ffa7c675d15cf2242 | [
"Apache-2.0"
] | null | null | null | from z3 import *
from RecomandEngine.problem.ProblemDefinition import ManeuverProblem
import time
class Z3_Solver(ManeuverProblem):
def __init__(self, nrVm, nrComp, availableConfigurations, problem, solverType):
self.__constMap = {}
self.problem = problem
if solverType == "optimize":
... | 50.531873 | 187 | 0.570268 |
797902baffd4523041a8c4de3cb6b6673c74c507 | 2,024 | py | Python | tests/test_read_protobuf.py | brabadu/hiku | 02604ffa96a76d5b5254ec1b1b7895d99da0a963 | [
"BSD-3-Clause"
] | 58 | 2016-01-20T13:34:56.000Z | 2021-06-08T07:27:14.000Z | tests/test_read_protobuf.py | evo-company/hiku | 9e243a057ee96cbcc9c876463e1fbbd0b1402e96 | [
"BSD-3-Clause"
] | 52 | 2016-01-16T12:40:05.000Z | 2021-07-23T17:52:44.000Z | tests/test_read_protobuf.py | evo-company/hiku | 9e243a057ee96cbcc9c876463e1fbbd0b1402e96 | [
"BSD-3-Clause"
] | 14 | 2016-01-15T12:34:28.000Z | 2021-08-11T12:57:18.000Z | import pytest
from hiku.query import Node, Field, Link
from hiku.protobuf import query_pb2 as t
from hiku.readers.protobuf import read, transform
def check_read(pb_node, expected):
query = read(pb_node.SerializeToString())
assert query == expected
def test_node_field():
node = t.Node()
item = node.... | 26.986667 | 71 | 0.626976 |
797902bc960724801076f0dd4b74b34e5cf5d75d | 525 | py | Python | wildlifecompliance/migrations/0021_auto_20180321_1516.py | sharpeez/ledger | 0ea05669f488336a63e2bdd6390725d00d619e9a | [
"Apache-2.0"
] | null | null | null | wildlifecompliance/migrations/0021_auto_20180321_1516.py | sharpeez/ledger | 0ea05669f488336a63e2bdd6390725d00d619e9a | [
"Apache-2.0"
] | 11 | 2019-03-19T02:03:11.000Z | 2019-05-31T07:20:59.000Z | wildlifecompliance/migrations/0021_auto_20180321_1516.py | sharpeez/ledger | 0ea05669f488336a63e2bdd6390725d00d619e9a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-03-21 07:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wildlifecompliance', '0020_auto_20180321_1516'),
]
operations = [
migration... | 25 | 90 | 0.664762 |
7979030a509e0e2323fc9420aac7bb23396f6dff | 1,891 | py | Python | src/transformers/models/layoutlmv2/__init__.py | Nabu-io/transformers | 7b0e9dd7df055a20f6989bf9faa246c247880e09 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/layoutlmv2/__init__.py | Nabu-io/transformers | 7b0e9dd7df055a20f6989bf9faa246c247880e09 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/layoutlmv2/__init__.py | Nabu-io/transformers | 7b0e9dd7df055a20f6989bf9faa246c247880e09 | [
"Apache-2.0"
] | null | null | null | from .configuration_layoutlmv2 import LayoutLMv2Config
from .modeling_layoutlmv2 import LayoutLMv2ForTokenClassification
from .tokenization_layoutlmv2 import LayoutLMv2Tokenizer
from .tokenization_layoutlmv2_fast import LayoutLMv2TokenizerFast
from typing import TYPE_CHECKING
from ...file_utils import _BaseLazyModule... | 32.603448 | 115 | 0.756214 |
797903cde19b4ac43fbc90bc108d3f550479b3c1 | 840 | py | Python | stager/utils/dark_mode.py | rorymurdock/stager | 331b4eaa174ac6c31c724c02c93c7b8e635ea788 | [
"Apache-2.0"
] | 2 | 2022-02-23T05:57:18.000Z | 2022-03-07T02:46:40.000Z | stager/utils/dark_mode.py | rorymurdock/stager | 331b4eaa174ac6c31c724c02c93c7b8e635ea788 | [
"Apache-2.0"
] | 10 | 2022-02-25T04:33:38.000Z | 2022-02-25T06:46:59.000Z | stager/utils/dark_mode.py | rorymurdock/stager | 331b4eaa174ac6c31c724c02c93c7b8e635ea788 | [
"Apache-2.0"
] | null | null | null | """Dark mode modifier"""
import logging
import stager.utils
from stager.utils.constants import APPLICATION_NAME, HERO_TEXT_ID
import gi # pylint: disable=wrong-import-position
gi.require_version("Gtk", "3.0") # pylint: disable=wrong-import-position
from gi.repository import Gtk, GdkPixbuf, GLib # pylint: disable=... | 35 | 116 | 0.75119 |
7979057ce80f8337a4bb8aaa80b8b0e975b35f2e | 8,101 | py | Python | code/my_plots.py | GiorgiaAuroraAdorni/deep-q-network-atari-games | fb69c18cdb0dd9c46a38d459367f297e51cdef59 | [
"Apache-2.0"
] | null | null | null | code/my_plots.py | GiorgiaAuroraAdorni/deep-q-network-atari-games | fb69c18cdb0dd9c46a38d459367f297e51cdef59 | [
"Apache-2.0"
] | null | null | null | code/my_plots.py | GiorgiaAuroraAdorni/deep-q-network-atari-games | fb69c18cdb0dd9c46a38d459367f297e51cdef59 | [
"Apache-2.0"
] | null | null | null | from collections import Counter
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import EngFormatter
from main import check_dir, moving_average
def plot_step_per_episode(model):
"""
:param model:
:return:
"""
out_dir = 'out/' + model + '/img/'
check_dir(out_dir)
... | 27.838488 | 123 | 0.609431 |
7979057e10486165ee090f891d8b356bec766778 | 2,944 | py | Python | spinup/run_experiments.py | LeoZhengZLY/stackelberg-actor-critic-algos | 180adf0fd34637a74de0ac0719e62ffa1f12d414 | [
"MIT"
] | 8 | 2021-10-03T03:40:52.000Z | 2022-03-30T15:42:32.000Z | spinup/run_experiments.py | LeoZhengZLY/stac | 180adf0fd34637a74de0ac0719e62ffa1f12d414 | [
"MIT"
] | null | null | null | spinup/run_experiments.py | LeoZhengZLY/stac | 180adf0fd34637a74de0ac0719e62ffa1f12d414 | [
"MIT"
] | 1 | 2022-03-18T05:28:57.000Z | 2022-03-18T05:28:57.000Z | from spinup.utils.run_utils import ExperimentGrid
from spinup import stac_pytorch as stac
from spinup import ddpg_pytorch as ddpg
from spinup import stddpg_pytorch as stddpg
from spinup import sac_pytorch as sac
from spinup import stsac_pytorch as stsac
import torch
import time
if __name__ == '__main__':
import ar... | 36.8 | 85 | 0.618886 |
79790690e985cf47831eceda47e72c9c96704517 | 14,385 | py | Python | source/lambda/configuration/instance_schedule.py | ifs-pauljegouic/aws-instance-scheduler | 5713ba9dc5acd96e11b09b389998e73ebb4dbbb0 | [
"Apache-2.0"
] | null | null | null | source/lambda/configuration/instance_schedule.py | ifs-pauljegouic/aws-instance-scheduler | 5713ba9dc5acd96e11b09b389998e73ebb4dbbb0 | [
"Apache-2.0"
] | null | null | null | source/lambda/configuration/instance_schedule.py | ifs-pauljegouic/aws-instance-scheduler | 5713ba9dc5acd96e11b09b389998e73ebb4dbbb0 | [
"Apache-2.0"
] | null | null | null | ######################################################################################################################
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | 54.283019 | 137 | 0.608064 |
797906c68609a86f2554ed86cf092b2fe5448677 | 418 | py | Python | profile_python/networking.py | heroesofcode/profile-python | e4e6ee2f3739ea6edad30999b74b3d42f754a86c | [
"MIT"
] | null | null | null | profile_python/networking.py | heroesofcode/profile-python | e4e6ee2f3739ea6edad30999b74b3d42f754a86c | [
"MIT"
] | 1 | 2021-10-09T01:26:29.000Z | 2021-10-09T01:26:29.000Z | profile_python/networking.py | heroesofcode/profile-python | e4e6ee2f3739ea6edad30999b74b3d42f754a86c | [
"MIT"
] | null | null | null | import requests
import json
class Networking(object):
def request(self, url):
try:
response = requests.get(url)
if response.status_code == 200:
return response.text
except:
print("Error making request")
def parsing(self, value):
tr... | 19.904762 | 43 | 0.547847 |
7979081ee4d4953261aa7030d0a66a386417c968 | 15,975 | py | Python | pyapetnet/command_line_tools.py | gschramm/pyapetnet | 1d88b2e06c40b999360b6dba35823ab5343b3e65 | [
"MIT"
] | 9 | 2020-08-24T15:57:00.000Z | 2021-08-31T15:47:53.000Z | pyapetnet/command_line_tools.py | gschramm/pyapetnet | 1d88b2e06c40b999360b6dba35823ab5343b3e65 | [
"MIT"
] | 4 | 2021-06-14T10:48:34.000Z | 2022-01-14T21:09:06.000Z | pyapetnet/command_line_tools.py | gschramm/pyapetnet | 1d88b2e06c40b999360b6dba35823ab5343b3e65 | [
"MIT"
] | 2 | 2020-10-03T19:43:47.000Z | 2022-01-12T21:04:46.000Z | import os
import argparse
from glob import glob
def list_models():
parser = argparse.ArgumentParser(description= 'list available trained models for pyapetnet')
parser.add_argument('--model_path', help = 'absolute path of directory containing trained models',
default = None)
... | 45.905172 | 163 | 0.576025 |
797908b6eff8f5336f3950586060655fb3aedca9 | 690 | py | Python | gunicorn_config.py | department-of-veterans-affairs/notification-admin | afba831a1e5e407cd7939df991d7438786da8afd | [
"MIT"
] | null | null | null | gunicorn_config.py | department-of-veterans-affairs/notification-admin | afba831a1e5e407cd7939df991d7438786da8afd | [
"MIT"
] | null | null | null | gunicorn_config.py | department-of-veterans-affairs/notification-admin | afba831a1e5e407cd7939df991d7438786da8afd | [
"MIT"
] | null | null | null | # import newrelic.agent # See https://bit.ly/2xBVKBH
# newrelic.agent.initialize()
import os
import sys
import traceback
workers = 5
worker_class = "eventlet"
bind = "0.0.0.0:{}".format(os.getenv("PORT"))
accesslog = '-'
def on_starting(server):
server.log.info("Starting Notifications Admin")
def worker_abort... | 23.793103 | 68 | 0.711594 |
7979098e6ce4c5bc5b79cb5d3804c842d77507c0 | 1,500 | py | Python | django_replicated/utils.py | svetlyak40wt/django_replicated | 464f1a76684df944ab75401870b1228c66243aca | [
"BSD-3-Clause"
] | null | null | null | django_replicated/utils.py | svetlyak40wt/django_replicated | 464f1a76684df944ab75401870b1228c66243aca | [
"BSD-3-Clause"
] | null | null | null | django_replicated/utils.py | svetlyak40wt/django_replicated | 464f1a76684df944ab75401870b1228c66243aca | [
"BSD-3-Clause"
] | 1 | 2019-06-10T16:48:39.000Z | 2019-06-10T16:48:39.000Z | from django import db
def check_state_override(request, state):
'''
Used to check if a web request should use a master
database even if it can use slave one. This override
happens for GET requests that happen upon redirects sent
after successful write operations to show the updated state
of a p... | 34.883721 | 73 | 0.708 |
797909c119378a16ed6018b3c6dbf4f51f603340 | 660 | py | Python | utils/splitlines.py | gmaterni/teimed | b06ba9be71a5a966ac466ef86e56d3551699eaa7 | [
"MIT"
] | null | null | null | utils/splitlines.py | gmaterni/teimed | b06ba9be71a5a966ac466ef86e56d3551699eaa7 | [
"MIT"
] | null | null | null | utils/splitlines.py | gmaterni/teimed | b06ba9be71a5a966ac466ef86e56d3551699eaa7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
import sys
import os
def splitlines(path_in, path_ou, rl):
with open(path_in, "r") as f:
text=f.read()
text=text.replace(os.linesep," ")
fou = open(path_ou, "w")
n = 0
r=list(text)
lst=[]
le=int(rl)
for i, ch in enumerate(r):
lst.... | 19.411765 | 37 | 0.504545 |
79790a278cf54b354ed27723807156bae60d904b | 388 | py | Python | tests/test_root.py | EBI-Metagenomics/deciphon-api | d2435d84aaf4cc0ffe24b6ac7a01d8cb527b3ff2 | [
"MIT"
] | null | null | null | tests/test_root.py | EBI-Metagenomics/deciphon-api | d2435d84aaf4cc0ffe24b6ac7a01d8cb527b3ff2 | [
"MIT"
] | null | null | null | tests/test_root.py | EBI-Metagenomics/deciphon-api | d2435d84aaf4cc0ffe24b6ac7a01d8cb527b3ff2 | [
"MIT"
] | null | null | null | import pytest
from fastapi.testclient import TestClient
from deciphon_api.main import app, settings
api_prefix = settings.api_prefix
api_key = settings.api_key
@pytest.mark.usefixtures("cleandir")
def test_root():
with TestClient(app) as client:
response = client.get(api_prefix)
assert response.... | 24.25 | 48 | 0.744845 |
79790a954335a7ec291ee7f20923fd14abf1b668 | 58 | py | Python | hello_world/__init__.py | jeansaad/hello_world | cb8622575fed38f8e9c4da76f48cd43ee88d0550 | [
"MIT"
] | null | null | null | hello_world/__init__.py | jeansaad/hello_world | cb8622575fed38f8e9c4da76f48cd43ee88d0550 | [
"MIT"
] | 65 | 2017-11-16T07:07:15.000Z | 2022-02-21T12:33:16.000Z | hello_world/__init__.py | jeansaad/hello_world | cb8622575fed38f8e9c4da76f48cd43ee88d0550 | [
"MIT"
] | 2 | 2017-09-16T15:30:54.000Z | 2020-01-27T15:34:58.000Z | from .hello import hello_world
__all__ = ["hello_world"]
| 14.5 | 30 | 0.758621 |
79790af0869e46323a5629080d06a36498853bc6 | 163 | py | Python | preprocess_raw.py | FedericoBottoni/household-poverty-classifier | 7357cc6a6c08e9cf76cdd79a04cce32a5982fa85 | [
"MIT"
] | null | null | null | preprocess_raw.py | FedericoBottoni/household-poverty-classifier | 7357cc6a6c08e9cf76cdd79a04cce32a5982fa85 | [
"MIT"
] | null | null | null | preprocess_raw.py | FedericoBottoni/household-poverty-classifier | 7357cc6a6c08e9cf76cdd79a04cce32a5982fa85 | [
"MIT"
] | null | null | null | import sys
sys.path.append('configs')
sys.path.append('src')
sys.path.append('src\\utils')
from preprocess_dataset import preprocess_dataset
preprocess_dataset() | 20.375 | 49 | 0.797546 |
79790b42e83acb9e0fa2d858e3feb81865c6592f | 46,886 | py | Python | beaverdet/tests/test_tube.py | SoftwareDevEngResearch/BeaverDet | db8d43d3eede07f21a0288d36c72bffbdfe1e28d | [
"MIT"
] | null | null | null | beaverdet/tests/test_tube.py | SoftwareDevEngResearch/BeaverDet | db8d43d3eede07f21a0288d36c72bffbdfe1e28d | [
"MIT"
] | 1 | 2018-09-19T17:34:19.000Z | 2018-09-19T17:34:19.000Z | beaverdet/tests/test_tube.py | SoftwareDevEngResearch/BeaverDet | db8d43d3eede07f21a0288d36c72bffbdfe1e28d | [
"MIT"
] | 1 | 2018-04-18T23:47:57.000Z | 2018-04-18T23:47:57.000Z | # -*- coding: utf-8 -*-
"""
PURPOSE:
Unit tests for tools.py
CREATED BY:
Mick Carter
Oregon State University
CIRE and Propulsion Lab
cartemic@oregonstate.edu
"""
from math import sqrt
import pytest
import pint
import os
import cantera as ct
import numpy as np
import pandas as pd
from mock import ... | 33.088215 | 80 | 0.550911 |
79790bc1285c610cb6e37d0ee4577c83bf3b3fea | 10,450 | py | Python | tests/conftest.py | espenfl/aiida_core | 8dfe6e7f730ce02371011114d7edb7aa2cdf6706 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2020-12-20T08:41:52.000Z | 2020-12-20T08:41:52.000Z | tests/conftest.py | pranjalmish1/aiida-core | 6c60afb1c81b88a4864573803860ef38b9da5e99 | [
"MIT",
"BSD-3-Clause"
] | 17 | 2020-03-11T17:04:05.000Z | 2020-05-01T09:34:45.000Z | tests/conftest.py | csadorf/aiida-core | dffff843e38ff6aa4819e521a1d51bb12e483ada | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 36.925795 | 120 | 0.684498 |
79790c909f3bc6aa2dece84c7354e5c138b1e9fe | 10,134 | py | Python | cinder-14.0.0/cinder/common/config.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | cinder-14.0.0/cinder/common/config.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | cinder-14.0.0/cinder/common/config.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2012 Red Hat, Inc.
# Copyright 2013 NTT corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file exc... | 41.703704 | 79 | 0.587527 |
79790dddeb607955bce980558070b82cb2e51c77 | 2,305 | py | Python | ribbit_scoring.py | icr-ctl/gnatcatcher | ddfdde8442a66d2409d16b7eddb769a579460652 | [
"MIT"
] | 1 | 2022-01-08T04:35:48.000Z | 2022-01-08T04:35:48.000Z | ribbit_scoring.py | icr-ctl/gnatcatcher | ddfdde8442a66d2409d16b7eddb769a579460652 | [
"MIT"
] | null | null | null | ribbit_scoring.py | icr-ctl/gnatcatcher | ddfdde8442a66d2409d16b7eddb769a579460652 | [
"MIT"
] | 1 | 2022-01-29T15:42:29.000Z | 2022-01-29T15:42:29.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 9 12:50:06 2021
@author: amandabreton
A python code used to test out Opensoundscape's RIBBIT.
You don't need to parse anything in, it's supposed to be
set to the great_plains_toad_dataset provided by Opensoundscape.
"""
# suppress warnings
import... | 30.733333 | 71 | 0.727549 |
79790df2ee541c359509174971c238c7eae84d12 | 502 | py | Python | wolsemap/dabangcrawler/migrations/0003_auto_20160901_1610.py | Curzy/Wolsemap | d0c10c1c14e168059faa0d2bdd6a5329c76e174a | [
"MIT"
] | 90 | 2017-01-08T13:32:19.000Z | 2020-09-30T09:01:27.000Z | wolsemap/dabangcrawler/migrations/0003_auto_20160901_1610.py | Curzy/Wolsemap | d0c10c1c14e168059faa0d2bdd6a5329c76e174a | [
"MIT"
] | 19 | 2016-12-11T10:49:06.000Z | 2021-11-15T17:46:45.000Z | wolsemap/dabangcrawler/migrations/0003_auto_20160901_1610.py | Curzy/MonthlyRentalFeeMetroMapSeoul | d0c10c1c14e168059faa0d2bdd6a5329c76e174a | [
"MIT"
] | 3 | 2016-12-26T12:35:27.000Z | 2018-03-01T11:24:09.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dabangcrawler', '0002_auto_20160901_1304'),
]
operations = [
migrations.RenameField(
model_name='price',
... | 20.916667 | 53 | 0.575697 |
79790e4c3cc466aa22c5f6f56e280658957e6900 | 28,545 | py | Python | aiida/orm/computers.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | 1 | 2019-07-31T04:08:13.000Z | 2019-07-31T04:08:13.000Z | aiida/orm/computers.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | aiida/orm/computers.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 35.725907 | 120 | 0.595341 |
79790fecb852a1e080e8200bb2836b77f9923235 | 4,246 | py | Python | repeatTranslation.py | hchiam/cognateLanguage | 8009b88c3dbd8db8a363cb06a269fab601063e7a | [
"MIT"
] | 5 | 2017-09-06T16:11:19.000Z | 2021-09-27T21:06:37.000Z | repeatTranslation.py | hchiam/cognateLanguage | 8009b88c3dbd8db8a363cb06a269fab601063e7a | [
"MIT"
] | 5 | 2017-04-28T16:44:54.000Z | 2017-08-14T19:00:44.000Z | repeatTranslation.py | hchiam/cognateLanguage | 8009b88c3dbd8db8a363cb06a269fab601063e7a | [
"MIT"
] | null | null | null | from getDataRemotely import run # getDataRemotely.py...
import sys # ...but still need this...
data = run() # ...and this.
import string # example use here: to be able to remove punctuation
import re # example use here: to be able to remove repeating spaces
keepGoing = True
while keepGoing:
def justTwoInitSyl... | 37.910714 | 125 | 0.596326 |
7979108bdc3c2bd31e9fedc037066e143bc823aa | 6,779 | py | Python | acm.py | ShahanM/bib-parser | 2f455e4372bed078d892185a7ca145eb0a93dea4 | [
"MIT"
] | 1 | 2022-01-26T05:51:10.000Z | 2022-01-26T05:51:10.000Z | acm.py | ShahanM/bib-parser | 2f455e4372bed078d892185a7ca145eb0a93dea4 | [
"MIT"
] | null | null | null | acm.py | ShahanM/bib-parser | 2f455e4372bed078d892185a7ca145eb0a93dea4 | [
"MIT"
] | null | null | null | import os
import re
import spacy
import logging
from tqdm import tqdm
def setup_required(func):
"""Decorator to ensure respository is setup before being used."""
def wrapper_setup_required(self, *args, **kwargs):
if not self.__setup_flag__:
logging.error('Repository setup required to use {... | 33.895 | 77 | 0.545951 |
7979114382a497109a6035cce6debc1403aaf907 | 1,566 | py | Python | utils.py | leemengtaiwan/tiny-imagenet | c91ea299af4a8eab1ad5f9fd888279251c0147a0 | [
"MIT"
] | 13 | 2018-08-05T08:47:25.000Z | 2020-05-21T23:54:34.000Z | utils.py | leemengtaiwan/tiny-imagenet | c91ea299af4a8eab1ad5f9fd888279251c0147a0 | [
"MIT"
] | 1 | 2020-05-26T03:52:52.000Z | 2020-05-26T03:52:52.000Z | utils.py | leemengtaiwan/tiny-imagenet | c91ea299af4a8eab1ad5f9fd888279251c0147a0 | [
"MIT"
] | 9 | 2018-12-04T04:35:22.000Z | 2021-09-17T20:12:09.000Z | import numpy as np
import matplotlib.pyplot as plt
CLASS_MAPPING_FILE = 'dataset/words.txt'
CLASS_LIST_FILE = 'dataset/wnids.txt'
NUMBER_TO_TEXT_FILE = 'dataset/mapping.json'
def show_images_horizontally(images, labels=[], un_normalize=False, fig_size=(15, 7)):
"""Show images in jupyter notebook horizontally w/ ... | 27 | 86 | 0.621328 |
797912cf016bceb61c6e2ba997505018259c6abb | 3,886 | py | Python | sample_project/sample_project/settings.py | Duke-GCB/gcb-web-auth | 51b74f278a3234e1036cc111407ff2b951354873 | [
"MIT"
] | 1 | 2017-04-26T10:26:01.000Z | 2017-04-26T10:26:01.000Z | sample_project/sample_project/settings.py | Duke-GCB/gcb-web-auth | 51b74f278a3234e1036cc111407ff2b951354873 | [
"MIT"
] | 25 | 2017-04-26T20:08:55.000Z | 2021-06-07T19:14:43.000Z | sample_project/sample_project/settings.py | Duke-GCB/gcb-web-auth | 51b74f278a3234e1036cc111407ff2b951354873 | [
"MIT"
] | null | null | null | """
Django settings for sample_project project.
Generated by 'django-admin startproject' using Django 1.10.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
im... | 26.435374 | 91 | 0.70561 |
797913b34e7dfc044c8da5ab5a6b8608eb7de799 | 21,826 | py | Python | general/mtl_sync/apero_mtl_sync.py | clairem789/apero-utils | 68ed0136a36b6badeaf15eb20d673052ad79a949 | [
"MIT"
] | null | null | null | general/mtl_sync/apero_mtl_sync.py | clairem789/apero-utils | 68ed0136a36b6badeaf15eb20d673052ad79a949 | [
"MIT"
] | null | null | null | general/mtl_sync/apero_mtl_sync.py | clairem789/apero-utils | 68ed0136a36b6badeaf15eb20d673052ad79a949 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# CODE NAME HERE
# CODE DESCRIPTION HERE
Created on 2020-02-19 at 09:30
@author: cook
"""
import numpy as np
import os
import sys
import importlib
# =============================================================================
# Define variables
# =================... | 36.744108 | 85 | 0.488637 |
797913ff7e222dc2da7006416b54559380da2e5b | 9,070 | py | Python | bayes_opt/target_space.py | ZZCer/BayesianOptimization | d188783ac17241cf63c0b4d9484aabce6b2f2188 | [
"MIT"
] | null | null | null | bayes_opt/target_space.py | ZZCer/BayesianOptimization | d188783ac17241cf63c0b4d9484aabce6b2f2188 | [
"MIT"
] | null | null | null | bayes_opt/target_space.py | ZZCer/BayesianOptimization | d188783ac17241cf63c0b4d9484aabce6b2f2188 | [
"MIT"
] | null | null | null | from __future__ import print_function, division
import numpy as np
from .helpers import ensure_rng, unique_rows
def _hashable(x):
""" ensure that an point is hashable by a python dict """
return tuple(map(float, x))
class TargetSpace(object):
"""
Holds the param-space coordinates (X) and target valu... | 30.13289 | 81 | 0.549945 |
79791431105b3d93b1b25187733fcbf4681cd651 | 274 | py | Python | src/gbkfit/psflsf/lsfs/__init__.py | bek0s/gbkf | 2ef56e8554fdf7ee8136141bc16d59bd34efa6c8 | [
"BSD-3-Clause"
] | 6 | 2016-06-26T16:52:25.000Z | 2022-03-22T06:37:13.000Z | src/gbkfit/psflsf/lsfs/__init__.py | bek0s/gbkf | 2ef56e8554fdf7ee8136141bc16d59bd34efa6c8 | [
"BSD-3-Clause"
] | 4 | 2016-07-30T08:11:20.000Z | 2021-02-12T08:33:42.000Z | src/gbkfit/psflsf/lsfs/__init__.py | bek0s/gbkf | 2ef56e8554fdf7ee8136141bc16d59bd34efa6c8 | [
"BSD-3-Clause"
] | 2 | 2015-05-18T03:21:56.000Z | 2015-09-21T06:16:18.000Z |
from .lsfs import *
def _register_lsfs():
from gbkfit.psflsf.core import lsf_parser as parser
parser.register(LSFGauss)
parser.register(LSFGGauss)
parser.register(LSFImage)
parser.register(LSFLorentz)
parser.register(LSFMoffat)
_register_lsfs()
| 18.266667 | 55 | 0.740876 |
7979155a1919a08989f8d6c6a4cc5930494c8ae6 | 185 | py | Python | authentification/urls.py | Louis86/ecommerce | d47f13bfe4772b33a9cb6b8ec08183525fc4655d | [
"MIT"
] | null | null | null | authentification/urls.py | Louis86/ecommerce | d47f13bfe4772b33a9cb6b8ec08183525fc4655d | [
"MIT"
] | null | null | null | authentification/urls.py | Louis86/ecommerce | d47f13bfe4772b33a9cb6b8ec08183525fc4655d | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path("register/", views.register),
path("login/", views.login_view),
path("logout/", views.logout_view),
]
| 20.555556 | 39 | 0.675676 |
79791571ae69c9c2e8649bc4b92805190b88632f | 2,027 | py | Python | pypykatz/lsadecryptor/packages/livessp/templates.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 1 | 2018-08-19T11:53:30.000Z | 2018-08-19T11:53:30.000Z | pypykatz/lsadecryptor/packages/livessp/templates.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | null | null | null | pypykatz/lsadecryptor/packages/livessp/templates.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 2 | 2019-08-04T23:16:05.000Z | 2019-12-05T10:41:50.000Z | #!/usr/bin/env python3
#
# Author:
# Tamas Jos (@skelsec)
#
import io
import logging
from minidump.win_datatypes import *
from pypykatz.commons.common import *
from pypykatz.commons.win_datatypes import *
from pypykatz.lsadecryptor.package_commons import *
class LiveSspTemplate(PackageTemplate):
def __init__(self):
... | 28.549296 | 61 | 0.764677 |
797915dc57413b2476714bd810a00d4f1854fadd | 431 | py | Python | ap/core/migrations/0005_recipe_image.py | Maduflavins/recipe-api | 21b4a63ff2ee54c343db1a6041f9fe045d4c9dc3 | [
"MIT"
] | null | null | null | ap/core/migrations/0005_recipe_image.py | Maduflavins/recipe-api | 21b4a63ff2ee54c343db1a6041f9fe045d4c9dc3 | [
"MIT"
] | null | null | null | ap/core/migrations/0005_recipe_image.py | Maduflavins/recipe-api | 21b4a63ff2ee54c343db1a6041f9fe045d4c9dc3 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-11-05 15:43
import core.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0004_recipe'),
]
operations = [
migrations.AddField(
model_name='recipe',
name='image',
... | 21.55 | 93 | 0.62181 |
7979166305db5c1aad3849cb55793d651dd62cdb | 1,434 | py | Python | pickled_to_indexed.py | TurkuNLP/finngen-tools | 45d95b228ea7044a2d56bd414b8f44e418c42a57 | [
"MIT"
] | null | null | null | pickled_to_indexed.py | TurkuNLP/finngen-tools | 45d95b228ea7044a2d56bd414b8f44e418c42a57 | [
"MIT"
] | null | null | null | pickled_to_indexed.py | TurkuNLP/finngen-tools | 45d95b228ea7044a2d56bd414b8f44e418c42a57 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Convert the pickled format generated by prepare_data_for_gpt.py into
# the indexed format consumed e.g. by Megatron.
import sys
import torch
from argparse import ArgumentParser
from pickled import PickledDataset
from megatron.data import indexed_dataset
def argparser():
ap = Argument... | 22.061538 | 70 | 0.624826 |
797916bcd7900eebe9acb1af52c46e6ea4494e24 | 3,855 | py | Python | tljh/traefik.py | bjorncole/the-littlest-jupyterhub | 46a7efd37e8a90a001f4136dfce529fd61483c15 | [
"BSD-3-Clause"
] | null | null | null | tljh/traefik.py | bjorncole/the-littlest-jupyterhub | 46a7efd37e8a90a001f4136dfce529fd61483c15 | [
"BSD-3-Clause"
] | null | null | null | tljh/traefik.py | bjorncole/the-littlest-jupyterhub | 46a7efd37e8a90a001f4136dfce529fd61483c15 | [
"BSD-3-Clause"
] | null | null | null | """Traefik installation and setup"""
import hashlib
import os
from jinja2 import Template
from passlib.apache import HtpasswdFile
import backoff
import requests
from tljh.configurer import load_config
# FIXME: support more than one platform here
plat = "linux-amd64"
traefik_version = "1.7.18"
# record sha256 hashes... | 32.948718 | 89 | 0.660182 |
797916c1e4a368e685fd83ebeeebba59e00ad5c6 | 511 | py | Python | core/templatetags/core_extras.py | vitorpvcampos/gomenu | e61d9d843a191dfca9c8ce0f587075cbd84319fe | [
"MIT"
] | null | null | null | core/templatetags/core_extras.py | vitorpvcampos/gomenu | e61d9d843a191dfca9c8ce0f587075cbd84319fe | [
"MIT"
] | null | null | null | core/templatetags/core_extras.py | vitorpvcampos/gomenu | e61d9d843a191dfca9c8ce0f587075cbd84319fe | [
"MIT"
] | null | null | null | import locale
from django import template
register = template.Library()
@register.filter(name='has_group')
def has_group(user, group_name):
return user.groups.filter(name=group_name).exists()
@register.filter(name='subtotal')
def subtotal(unity_price, quantity):
return unity_price * quantity
@register.f... | 22.217391 | 62 | 0.755382 |
797916fc41d215f5ea0da757dfaa34b38a07c575 | 4,252 | py | Python | Instaclone/settings.py | NinahMo/Instaclone | 8f9b8554d1efa35a64dd939c267e036857ced9a3 | [
"MIT"
] | null | null | null | Instaclone/settings.py | NinahMo/Instaclone | 8f9b8554d1efa35a64dd939c267e036857ced9a3 | [
"MIT"
] | null | null | null | Instaclone/settings.py | NinahMo/Instaclone | 8f9b8554d1efa35a64dd939c267e036857ced9a3 | [
"MIT"
] | null | null | null | """
Django settings for Instaclone project.
Generated by 'django-admin startproject' using Django 3.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os
i... | 25.614458 | 91 | 0.701552 |
7979177f22d12145da4cf2ebacf8641be3985c02 | 1,082 | py | Python | dataset.py | j1a0m0e4sNTU/Variational-Autoencoder-for-images | f5d4bbd75e09bfcf20fa11b8b895420cc186d2bc | [
"MIT"
] | null | null | null | dataset.py | j1a0m0e4sNTU/Variational-Autoencoder-for-images | f5d4bbd75e09bfcf20fa11b8b895420cc186d2bc | [
"MIT"
] | null | null | null | dataset.py | j1a0m0e4sNTU/Variational-Autoencoder-for-images | f5d4bbd75e09bfcf20fa11b8b895420cc186d2bc | [
"MIT"
] | null | null | null | import numpy as np
import cv2 as cv
import torch
from torch.utils.data import Dataset, DataLoader
import os
from matplotlib import pyplot as plt
from util import *
class Dataset_mine(Dataset):
def __init__(self, root, train = True):
super(Dataset_mine, self).__init__()
data_dir = None
if tr... | 27.74359 | 85 | 0.623845 |
797917a4f9c239b7a8892e7af7adbcd807349c2d | 3,101 | py | Python | src/ece312_clicker/toggle_server.py | tommz9/ece312-clicker | 8c5d2adcb41951acdcd81d41a244bf8066b417dd | [
"MIT"
] | 1 | 2018-02-28T01:50:29.000Z | 2018-02-28T01:50:29.000Z | src/ece312_clicker/toggle_server.py | tommz9/ece312-clicker | 8c5d2adcb41951acdcd81d41a244bf8066b417dd | [
"MIT"
] | null | null | null | src/ece312_clicker/toggle_server.py | tommz9/ece312-clicker | 8c5d2adcb41951acdcd81d41a244bf8066b417dd | [
"MIT"
] | null | null | null | """TCP server.
Multithreaded TCP toggle server.
"""
import socketserver
import logging
import click
import signal
from functools import partial
import threading
import time
class ToggleConnectionHandler(socketserver.StreamRequestHandler):
"""Handler to the TCP connections.
Methods setup(), finish() and han... | 28.190909 | 107 | 0.659787 |
79791a892967c593f18dc277acbcacd77fb10da3 | 161 | py | Python | examples/login.py | Slimakoi/Sankaku.py | 0d8c23413509483cb9e2c51242d5a1fdfbd1bb1b | [
"MIT"
] | 1 | 2022-02-14T18:52:02.000Z | 2022-02-14T18:52:02.000Z | examples/login.py | Slimakoi/Sankaku.py | 0d8c23413509483cb9e2c51242d5a1fdfbd1bb1b | [
"MIT"
] | null | null | null | examples/login.py | Slimakoi/Sankaku.py | 0d8c23413509483cb9e2c51242d5a1fdfbd1bb1b | [
"MIT"
] | null | null | null | import sankaku
sankaku = sankaku.Client()
login = sankaku.login(email = "__email__", password = "__password__")
print(f"Logged in as '{sankaku.profile.name}'") | 26.833333 | 69 | 0.732919 |
79791b094969a76a2199c38d4708cc6375115f36 | 884 | py | Python | src/main/resources/assets/openpython/opos/v1.1/lib/openos/colors.py | fossabot/OpenPython | 8fe3f794f2a6c543d96c1ef5c097ffa18f90b680 | [
"PSF-2.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 41 | 2018-10-25T06:15:31.000Z | 2022-02-20T11:20:43.000Z | src/main/resources/assets/openpython/opos/v1.1/lib/openos/colors.py | fossabot/OpenPython | 8fe3f794f2a6c543d96c1ef5c097ffa18f90b680 | [
"PSF-2.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 16 | 2018-03-20T12:25:27.000Z | 2018-03-25T13:34:44.000Z | src/main/resources/assets/openpython/opos/v1.1/lib/openos/colors.py | fossabot/OpenPython | 8fe3f794f2a6c543d96c1ef5c097ffa18f90b680 | [
"PSF-2.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 8 | 2018-11-04T02:03:15.000Z | 2022-01-13T11:46:28.000Z | # https://github.com/MightyPirates/OpenComputers/blob/master-MC1.12/
# - src/main/resources/assets/opencomputers/loot/openos/lib/colors.lua
from micropython import const
__all__ = ["WHITE", "ORANGE", "MAGENTA", "LIGHTBLUE",
"YELLOW", "LIME", "PINK", "GRAY",
"SILVER", "CYAN", "PURPLE", "BLUE",
... | 19.644444 | 70 | 0.660633 |
79791bc66a160db667148e4ae207a47fa95562b1 | 18,935 | py | Python | qiskit/circuit/parameterexpression.py | ElePT/qiskit-terra | 0afac936bf43d7b54175c80db1706d32c9aa77f9 | [
"Apache-2.0"
] | 1 | 2021-08-04T21:53:02.000Z | 2021-08-04T21:53:02.000Z | qiskit/circuit/parameterexpression.py | ElePT/qiskit-terra | 0afac936bf43d7b54175c80db1706d32c9aa77f9 | [
"Apache-2.0"
] | null | null | null | qiskit/circuit/parameterexpression.py | ElePT/qiskit-terra | 0afac936bf43d7b54175c80db1706d32c9aa77f9 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# 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 derivat... | 36.910331 | 100 | 0.630473 |
79791d47efc49996b889b40ec5bc868d81346d23 | 4,185 | py | Python | M2Crypto/m2urllib.py | quarkness/m2crypto | f8f3969ed6467e5dd9f7c6d4e33dee49f4a00d9f | [
"MIT"
] | null | null | null | M2Crypto/m2urllib.py | quarkness/m2crypto | f8f3969ed6467e5dd9f7c6d4e33dee49f4a00d9f | [
"MIT"
] | null | null | null | M2Crypto/m2urllib.py | quarkness/m2crypto | f8f3969ed6467e5dd9f7c6d4e33dee49f4a00d9f | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function
"""M2Crypto enhancement to Python's urllib for handling
'https' url's.
FIXME: it is questionable whether we need this old-style module at all. urllib
(not urllib2) is in Python 3 support just as a legacy API.
Copyright (c) 1999-2003 Ng Pheng Siong. All rights re... | 34.303279 | 85 | 0.594504 |
79791d6ac89dd667f71a6881cad01a140e2f49be | 150 | py | Python | src/entity/__init__.py | dreaming-coder/RadarSet | c912298d0d6058c6647986524e5d95a205b51c1d | [
"MIT"
] | null | null | null | src/entity/__init__.py | dreaming-coder/RadarSet | c912298d0d6058c6647986524e5d95a205b51c1d | [
"MIT"
] | null | null | null | src/entity/__init__.py | dreaming-coder/RadarSet | c912298d0d6058c6647986524e5d95a205b51c1d | [
"MIT"
] | null | null | null | from type import APV
from utils.io.XLoader import get_rainy_days
__all__ = [
"apv_mapper",
]
apv_mapper: APV = []
rainy_days = get_rainy_days()
| 15 | 43 | 0.726667 |
79791e1901ead0e759217e08a02280f7575a4e88 | 636 | py | Python | invenio_drafts_resources/resources/records/config.py | kprzerwa/invenio-drafts-resources | 8f2a24c696e5531a0388d510ce7d96fa4950d6f5 | [
"MIT"
] | null | null | null | invenio_drafts_resources/resources/records/config.py | kprzerwa/invenio-drafts-resources | 8f2a24c696e5531a0388d510ce7d96fa4950d6f5 | [
"MIT"
] | null | null | null | invenio_drafts_resources/resources/records/config.py | kprzerwa/invenio-drafts-resources | 8f2a24c696e5531a0388d510ce7d96fa4950d6f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
# Copyright (C) 2020 Northwestern University.
#
# Invenio-Drafts-Resources is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Draft aware Record Resource Config override."""
from ... | 26.5 | 75 | 0.746855 |
79791e5dd66ad5e3af9de4b6fb88b1c883bb318d | 21,291 | py | Python | keystone-15.0.0/keystone/models/token_model.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | keystone-15.0.0/keystone/models/token_model.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | keystone-15.0.0/keystone/models/token_model.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # 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, software
# distributed under t... | 35.723154 | 79 | 0.590531 |
79791f1b0eb5188693f419682dd409078bd9062d | 1,172 | py | Python | app/__init__.py | sharonkorir/flask-app-structure | c2cf40ae37e113f04a1ba4be762fecabba8005c8 | [
"MIT"
] | null | null | null | app/__init__.py | sharonkorir/flask-app-structure | c2cf40ae37e113f04a1ba4be762fecabba8005c8 | [
"MIT"
] | null | null | null | app/__init__.py | sharonkorir/flask-app-structure | c2cf40ae37e113f04a1ba4be762fecabba8005c8 | [
"MIT"
] | null | null | null | from flask import Flask
from config import config_options
from flask_bootstrap import Bootstrap
# from flask_sqlalchemy import SQLAlchemy
# from flask_login import LoginManager
# from flask_uploads import UploadSet, configure_uploads, IMAGES
# from flask_mail import Mail
# login_manager = LoginManager()
# login_manage... | 27.255814 | 83 | 0.745734 |
7979201b51dcfc76da0999dd4cd110eca139d486 | 711 | py | Python | retroarch/network_command_socket.py | cout/where-in-zebes | 847fe0ab1eb2f05e58d9c5901a29e1d95322d2ce | [
"MIT"
] | 1 | 2021-08-16T17:47:00.000Z | 2021-08-16T17:47:00.000Z | retroarch/network_command_socket.py | cout/where-in-zebes | 847fe0ab1eb2f05e58d9c5901a29e1d95322d2ce | [
"MIT"
] | null | null | null | retroarch/network_command_socket.py | cout/where-in-zebes | 847fe0ab1eb2f05e58d9c5901a29e1d95322d2ce | [
"MIT"
] | null | null | null | import socket
class NetworkCommandSocket(object):
def __init__(self, port=55355, addr='127.0.0.1'):
try:
self.connect(addr, port)
self.read_core_ram(0, 0)
except:
port = 55354
self.connect(addr, port)
self.read_core_ram(0, 0)
def connect(self, addr, port):
self.port = por... | 27.346154 | 66 | 0.642757 |
79792040f23adb37e33d6fb29e54e83454fdbd37 | 2,692 | py | Python | 05_howler/test.py | FabrizioPe/tiny_python_projects | e130d55d36cac43496a8ad482b6159234b5122f3 | [
"MIT"
] | null | null | null | 05_howler/test.py | FabrizioPe/tiny_python_projects | e130d55d36cac43496a8ad482b6159234b5122f3 | [
"MIT"
] | null | null | null | 05_howler/test.py | FabrizioPe/tiny_python_projects | e130d55d36cac43496a8ad482b6159234b5122f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""tests for howler.py [not for the 'going further' version]"""
import os
import re
import random
import string
from subprocess import getstatusoutput, getoutput
prg = './howler.py'
# --------------------------------------------------
def random_string():
"""generate a random string"""
... | 26.653465 | 77 | 0.481426 |
797920cbcb09ba515dad2c02cacbbd78069bda7b | 8,787 | py | Python | moler/util/moler_test.py | nokia/moler | 13cb3d1329a8904ac074f269b8c9ec1955e3ae30 | [
"BSD-3-Clause"
] | 57 | 2018-02-20T08:16:47.000Z | 2022-03-28T10:36:57.000Z | moler/util/moler_test.py | nokia/moler | 13cb3d1329a8904ac074f269b8c9ec1955e3ae30 | [
"BSD-3-Clause"
] | 377 | 2018-07-19T11:56:27.000Z | 2021-07-09T13:08:12.000Z | moler/util/moler_test.py | nokia/moler | 13cb3d1329a8904ac074f269b8c9ec1955e3ae30 | [
"BSD-3-Clause"
] | 24 | 2018-04-14T20:49:40.000Z | 2022-03-29T10:44:26.000Z | # -*- coding: utf-8 -*-
"""
Utility/common code of library.
"""
__author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst, Tomasz Krol'
__copyright__ = 'Copyright (C) 2018-2021, Nokia'
__email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com, tomasz.krol@nokia.com'
import loggi... | 33.796154 | 117 | 0.610333 |
797920d5f915ae4e5a74ee712a6837cd5a9f7c4c | 11,620 | py | Python | front-end/testsuite-python-lib/Python-2.2/Lib/distutils/unixccompiler.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-2.2/Lib/distutils/unixccompiler.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | null | null | null | front-end/testsuite-python-lib/Python-2.2/Lib/distutils/unixccompiler.py | MalloyPower/parsing-python | b2bca5eed07ea2af7a2001cd4f63becdfb0570be | [
"MIT"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | """distutils.unixccompiler
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
* macros defined with -Dname[=value]
* macros undefined with -Uname
* include search directories specified with -Idir
* libraries specified with -lllib
* library... | 38.349835 | 78 | 0.584337 |
7979212fa8ee067b1fb8d886d922fd39d5797bd7 | 6,371 | py | Python | code/keys.py | joshpearce/knausj_talon | 44c49806c6e53b2e5fe90fc24fd06a1fc5125883 | [
"MIT"
] | null | null | null | code/keys.py | joshpearce/knausj_talon | 44c49806c6e53b2e5fe90fc24fd06a1fc5125883 | [
"MIT"
] | null | null | null | code/keys.py | joshpearce/knausj_talon | 44c49806c6e53b2e5fe90fc24fd06a1fc5125883 | [
"MIT"
] | null | null | null | from typing import Set
from talon import Module, Context, actions, app
import sys
default_alphabet = "air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip".split(
" "
)
letters_string = "abcdefghijklmnopqrstuvwxyz"
default_digits = "zero on... | 25.082677 | 153 | 0.601005 |
797921bb312cb94759500d4af78cab2091535d8a | 52,776 | py | Python | pyds.py | m-a-rahal/Beleif-functions | 1672cb4fab3eedc9059c7273158cef7a28558a2b | [
"BSD-3-Clause"
] | 86 | 2015-03-07T21:14:33.000Z | 2022-03-16T00:37:23.000Z | pyds.py | m-a-rahal/Beleif-functions | 1672cb4fab3eedc9059c7273158cef7a28558a2b | [
"BSD-3-Clause"
] | 6 | 2016-11-10T07:05:48.000Z | 2021-05-16T13:49:04.000Z | pyds.py | m-a-rahal/Beleif-functions | 1672cb4fab3eedc9059c7273158cef7a28558a2b | [
"BSD-3-Clause"
] | 40 | 2015-11-03T17:53:38.000Z | 2022-03-16T00:37:40.000Z | """
A framework for performing computations in the Dempster-Shafer theory.
"""
from __future__ import print_function
from itertools import chain, combinations
from functools import partial, reduce
from operator import mul
from math import log, fsum, sqrt
from random import random, shuffle, uniform
import sys
try:
... | 45.22365 | 172 | 0.599212 |
7979224b50b3490b4a060d152f193347d9ce6f75 | 57,704 | py | Python | gensrc/script/doris_builtins_functions.py | kaiker19/incubator-doris | f4c5c6ccc650012a0db7ddda8a38f4c65cc5c9be | [
"Apache-2.0"
] | 2 | 2021-05-11T01:51:13.000Z | 2021-09-10T17:04:36.000Z | gensrc/script/doris_builtins_functions.py | kaiker19/incubator-doris | f4c5c6ccc650012a0db7ddda8a38f4c65cc5c9be | [
"Apache-2.0"
] | 2 | 2021-07-20T16:38:35.000Z | 2021-07-20T17:28:26.000Z | gensrc/script/doris_builtins_functions.py | kaiker19/incubator-doris | f4c5c6ccc650012a0db7ddda8a38f4c65cc5c9be | [
"Apache-2.0"
] | 1 | 2021-07-20T16:47:47.000Z | 2021-07-20T16:47:47.000Z | #!/usr/bin/env python
# encoding: utf-8
# 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, Ver... | 62.517876 | 134 | 0.719552 |
797923a76e1d9e66e9e912da707e2ae53f7664af | 1,300 | py | Python | experiments/src/evaluate_d2v.py | aseifert/million-post-corpus | 7161a975353c963d3ba697392e4963809e7b0e1b | [
"MIT"
] | 13 | 2017-07-12T12:19:21.000Z | 2020-05-13T13:34:39.000Z | experiments/src/evaluate_d2v.py | aseifert/million-post-corpus | 7161a975353c963d3ba697392e4963809e7b0e1b | [
"MIT"
] | null | null | null | experiments/src/evaluate_d2v.py | aseifert/million-post-corpus | 7161a975353c963d3ba697392e4963809e7b0e1b | [
"MIT"
] | 3 | 2020-12-08T16:34:51.000Z | 2021-08-04T09:56:23.000Z | import os
import sys
from gensim.models.doc2vec import Doc2Vec
import numpy
from sklearn.svm import SVC
from preprocessing import normalize, micro_tokenize
import conf
class D2V_feature_extractor(object):
def __init__(self, d2vfile):
self.d2v = Doc2Vec.load(d2vfile)
def fit(self, *args, **kwargs):
... | 27.659574 | 72 | 0.657692 |
79792421eaf36c7001dddc557c20dfc5f18624e3 | 707 | py | Python | bot/cogs/owners.py | RohanRadia/YukiBot | 9caf35b76681d03b5c5c13126eda38e0a765229f | [
"MIT"
] | 4 | 2019-04-08T16:03:41.000Z | 2019-04-18T09:22:00.000Z | bot/cogs/owners.py | RohanRadia/YukiBot | 9caf35b76681d03b5c5c13126eda38e0a765229f | [
"MIT"
] | 14 | 2019-04-08T16:20:13.000Z | 2019-04-14T05:39:11.000Z | bot/cogs/owners.py | RohanRadia/YukiBot | 9caf35b76681d03b5c5c13126eda38e0a765229f | [
"MIT"
] | 6 | 2019-04-10T07:19:09.000Z | 2019-05-05T22:11:46.000Z | import aiohttp
import logging
from discord.ext import commands
logger = logging.getLogger(__name__)
class Owners(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name='api', aliases=['apicall'])
@commands.is_owner()
async def Api_call(self, ctx, url):
sessio... | 22.806452 | 84 | 0.64215 |
797924621a52dc8c3b3e4227a59a1500873f9cf0 | 944 | py | Python | python/ray/util/collective/examples/nccl_allreduce_example.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 21,382 | 2016-09-26T23:12:52.000Z | 2022-03-31T21:47:45.000Z | python/ray/util/collective/examples/nccl_allreduce_example.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 19,689 | 2016-09-17T08:21:25.000Z | 2022-03-31T23:59:30.000Z | python/ray/util/collective/examples/nccl_allreduce_example.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 4,114 | 2016-09-23T18:54:01.000Z | 2022-03-31T15:07:32.000Z | import ray
import cupy as cp
import ray.util.collective as collective
@ray.remote(num_gpus=1)
class Worker:
def __init__(self):
self.send = cp.ones((4, ), dtype=cp.float32)
self.recv = cp.zeros((4, ), dtype=cp.float32)
def setup(self, world_size, rank):
collective.init_collective_gro... | 24.842105 | 77 | 0.629237 |
79792556e55d0df63f4be8b4d9ad6f38f41676c3 | 168,622 | py | Python | jira/client.py | eagleonhill/jira | d774364c6090662e30171be37b236477d3056aed | [
"BSD-2-Clause"
] | null | null | null | jira/client.py | eagleonhill/jira | d774364c6090662e30171be37b236477d3056aed | [
"BSD-2-Clause"
] | null | null | null | jira/client.py | eagleonhill/jira | d774364c6090662e30171be37b236477d3056aed | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from requests.auth import AuthBase
"""
This module implements a friendly (well, friendlier) interface between the raw JSON
responses from JIRA and the Resource/dict abstractions provided by this library. Users
will construct a JIRA object as described below. Full API documenta... | 38.123898 | 157 | 0.599791 |
79792578bf4164c958a3f41f5b664dfe9167976c | 1,149 | py | Python | tests/test_utils.py | rezan21/Portfolio-Analysis-Library | aaf8f9a18f67231b05d09d41d1fdbb1910e87fd3 | [
"MIT"
] | 3 | 2022-02-26T01:25:28.000Z | 2022-02-26T01:25:48.000Z | tests/test_utils.py | rezan21/Portfolio-Analysis-Library | aaf8f9a18f67231b05d09d41d1fdbb1910e87fd3 | [
"MIT"
] | null | null | null | tests/test_utils.py | rezan21/Portfolio-Analysis-Library | aaf8f9a18f67231b05d09d41d1fdbb1910e87fd3 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pytest
from pal import utils
def test_load_ffme_returns():
df = utils.load_ffme_returns()
assert df.shape == (1110, 2)
assert df.index[0] == pd.Period("1926-07")
assert df.index[-1] == pd.Period("2018-12")
assert df.columns.tolist() == ["smallCap", "la... | 28.725 | 68 | 0.629243 |
7979259181f94352fcd02ff06dd84857582bf2a3 | 5,763 | py | Python | PyFunceble/helpers/file.py | fossabot/PyFunceble | 4335cb31e6cf20cf8e10dd2cc6ac3afa50199ea4 | [
"Apache-2.0"
] | null | null | null | PyFunceble/helpers/file.py | fossabot/PyFunceble | 4335cb31e6cf20cf8e10dd2cc6ac3afa50199ea4 | [
"Apache-2.0"
] | null | null | null | PyFunceble/helpers/file.py | fossabot/PyFunceble | 4335cb31e6cf20cf8e10dd2cc6ac3afa50199ea4 | [
"Apache-2.0"
] | null | null | null | """
The tool to check the availability or syntax of domain, IP or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ █... | 28.112195 | 88 | 0.539823 |
79792959b715eb64979a88b8b08038275e9c54d5 | 236 | py | Python | pip_Down.py | rusy4li/pip_downloader | 539b9b10d0c77faa5fc7dba63f5880c7e26d738b | [
"Apache-2.0"
] | null | null | null | pip_Down.py | rusy4li/pip_downloader | 539b9b10d0c77faa5fc7dba63f5880c7e26d738b | [
"Apache-2.0"
] | null | null | null | pip_Down.py | rusy4li/pip_downloader | 539b9b10d0c77faa5fc7dba63f5880c7e26d738b | [
"Apache-2.0"
] | null | null | null | import os
import time
os.system("cls")
print(">>> Kurmak istediğiniz kütüphanenin adı nedir?")
sorgu = input("-> ")
os.system("pip install --upgrade {}".format(sorgu))
os.system("cls")
print(">>> Yükleme Bitti!")
time.sleep(1)
| 23.6 | 56 | 0.65678 |
797929617e77c257429072c89985a63f017a2833 | 13,512 | py | Python | wechatpy/component.py | xiaohuanshu/wechatpy | a92dfa5a3662baa8456899b5ba62b1d338c7c61d | [
"MIT"
] | null | null | null | wechatpy/component.py | xiaohuanshu/wechatpy | a92dfa5a3662baa8456899b5ba62b1d338c7c61d | [
"MIT"
] | null | null | null | wechatpy/component.py | xiaohuanshu/wechatpy | a92dfa5a3662baa8456899b5ba62b1d338c7c61d | [
"MIT"
] | 1 | 2021-05-01T11:21:56.000Z | 2021-05-01T11:21:56.000Z | # -*- coding: utf-8 -*-
"""
wechatpy.component
~~~~~~~~~~~~~~~
This module provides client library for WeChat Open Platform
:copyright: (c) 2015 by hunter007.
:license: MIT, see LICENSE for more details.
"""
from __future__ import absolute_import, unicode_literals
import time
import logging
impor... | 31.277778 | 96 | 0.579041 |
797929c49a209968940ee05255e96d76aa1d1159 | 4,744 | py | Python | setup.py | vliz-be-opsci/yaml4parms | c0259470485014d66a8342e2c6f1b95873e4b497 | [
"MIT"
] | null | null | null | setup.py | vliz-be-opsci/yaml4parms | c0259470485014d66a8342e2c6f1b95873e4b497 | [
"MIT"
] | null | null | null | setup.py | vliz-be-opsci/yaml4parms | c0259470485014d66a8342e2c6f1b95873e4b497 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note: To use the 'upload' functionality of this file, you must:
# $ pip install twine
import io
import os
import subprocess
import sys
import unittest
from setuptools import find_packages, setup, Command
# conditionally import to allow setup.py install introduce requ... | 30.410256 | 129 | 0.66231 |
79792b3e320efcaf7618d95a3f1c6f0abecf4e26 | 1,153 | py | Python | src/networks/old/twobranch_sum.py | dberga/FACIL | c11dd157bc53cfac91814a52c57bddc385365c61 | [
"MIT"
] | null | null | null | src/networks/old/twobranch_sum.py | dberga/FACIL | c11dd157bc53cfac91814a52c57bddc385365c61 | [
"MIT"
] | null | null | null | src/networks/old/twobranch_sum.py | dberga/FACIL | c11dd157bc53cfac91814a52c57bddc385365c61 | [
"MIT"
] | null | null | null | from networks.twobranch import twobranch
import torch
import utils
from copy import deepcopy
class twobranch_sum(twobranch):
def __init__(self, pretrained=False, backbone='resnet18', num_out=100, togray="mean", scramble=False,select_kernels='all', remove_batchnorm=None):
self.backbone = backbone
... | 44.346154 | 196 | 0.711188 |
79792b4e66582579b8e701612bd72dd4c589d2c3 | 8,862 | py | Python | src/sentry/interfaces/csp.py | kl07/sentry | 427b456f18c4040127f7a05805089f372e920df0 | [
"BSD-3-Clause"
] | 20 | 2016-10-01T04:29:24.000Z | 2020-10-09T07:23:34.000Z | src/sentry/interfaces/csp.py | kl07/sentry | 427b456f18c4040127f7a05805089f372e920df0 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/interfaces/csp.py | kl07/sentry | 427b456f18c4040127f7a05805089f372e920df0 | [
"BSD-3-Clause"
] | 7 | 2016-10-27T05:12:45.000Z | 2021-05-01T14:29:53.000Z | """
sentry.interfaces.csp
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
__all__ = ('Csp',)
from urlparse import urlsplit, urlunsplit
from sentry.interfaces.base import Interfac... | 34.617188 | 98 | 0.629768 |
79792b50583480721091afacd59f68c7de09b95b | 5,545 | py | Python | pre-migration/identer/parse_idents.py | Kortforsyningen/FIRE-DDL | 1fc6405ae3b60ef665cccad68e76dc5ef3b4bf20 | [
"MIT"
] | 4 | 2018-12-05T12:56:25.000Z | 2021-03-17T17:58:04.000Z | pre-migration/identer/parse_idents.py | Kortforsyningen/FIRE-DDL | 1fc6405ae3b60ef665cccad68e76dc5ef3b4bf20 | [
"MIT"
] | 162 | 2018-11-16T13:55:56.000Z | 2021-03-17T17:46:38.000Z | pre-migration/identer/parse_idents.py | Kortforsyningen/FIRE-DDL | 1fc6405ae3b60ef665cccad68e76dc5ef3b4bf20 | [
"MIT"
] | 5 | 2018-11-30T13:48:35.000Z | 2020-10-08T14:16:52.000Z | import sys
import json
import itertools
import re
from collections import namedtuple
from pathlib import Path
import click
Ident = namedtuple("Ident", ["ident", "type"])
BASE = Path(__file__).parents[0]
IDENT_FILE = BASE / Path('idents_clean.txt')
#IDENT_FILE = BASE / Path('identer_test.txt')
JSON_FILE = BASE / Pa... | 31.867816 | 100 | 0.472498 |
79792bed545f60de6bd414d59e4ea51bd07d3c6b | 616 | py | Python | app/Console/Scripts/CRImport.py | JFChicken/photo-cms | 58a96726d704eb3767feeac794bf0783f4237122 | [
"MIT"
] | null | null | null | app/Console/Scripts/CRImport.py | JFChicken/photo-cms | 58a96726d704eb3767feeac794bf0783f4237122 | [
"MIT"
] | 6 | 2020-07-17T01:11:14.000Z | 2022-02-26T10:46:13.000Z | app/Console/Scripts/CRImport.py | JFChicken/photo-cms | 58a96726d704eb3767feeac794bf0783f4237122 | [
"MIT"
] | null | null | null | import sys
import random
from PIL import Image
from resizeimage import resizeimage
try:
arrayString = sys.argv[1].split(",")
final = []
for i in range(len(arrayString)):
final.append(arrayString[i].split("--"))
rootDir = final[0][1]
# look at this folder and create a csv of the... | 22.814815 | 145 | 0.667208 |
79792c75587887bd8779c1a8aa348700e87a445d | 979 | py | Python | 5.0-clases-y-objetos/src/auto_volador.py | zehemz/clases-python-101 | 633cb5f0cbc85e64e242514f0394754a5bed0513 | [
"Apache-2.0"
] | null | null | null | 5.0-clases-y-objetos/src/auto_volador.py | zehemz/clases-python-101 | 633cb5f0cbc85e64e242514f0394754a5bed0513 | [
"Apache-2.0"
] | null | null | null | 5.0-clases-y-objetos/src/auto_volador.py | zehemz/clases-python-101 | 633cb5f0cbc85e64e242514f0394754a5bed0513 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3.5
# -*- coding: utf-8 -*-
from auto import Auto
class AutoVolador(Auto):
ALAS = 2
def __init__(self):
Auto.__init__(self)
self.__enVuelo = False
self.__altitud = 0
def despegar(self):
if not self.__enVuelo and self.cinturonAbrochado and self.encendido and... | 31.580645 | 101 | 0.601634 |
79792cc38bf84ed46d8f505e9245463001b1af0b | 1,295 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/authoring/models/update_metadata_dto_py3.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/authoring/models/update_metadata_dto_py3.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/authoring/models/update_metadata_dto_py3.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 37 | 83 | 0.614672 |
79792cd8dade0238005eda9bc8f5067af6053916 | 1,497 | py | Python | thirdpart/seafobj/commits.py | saukrIppl/newsea | 0fd5ab2ade9a8fb16b1e7b43ba13dac32eb39603 | [
"Apache-2.0"
] | 2 | 2017-06-21T09:46:55.000Z | 2018-05-30T10:07:32.000Z | thirdpart/seafobj/commits.py | saukrIppl/newsea | 0fd5ab2ade9a8fb16b1e7b43ba13dac32eb39603 | [
"Apache-2.0"
] | null | null | null | thirdpart/seafobj/commits.py | saukrIppl/newsea | 0fd5ab2ade9a8fb16b1e7b43ba13dac32eb39603 | [
"Apache-2.0"
] | 1 | 2020-10-01T04:11:41.000Z | 2020-10-01T04:11:41.000Z | from .objstore_factory import objstore_factory
from seafobj.utils import to_utf8
try:
import json
except ImportError:
import simplejson as json
class SeafCommit(object):
def __init__(self, _dict):
self._dict = _dict
def __getattr__(self, key):
if key in self._dict:
return ... | 28.245283 | 66 | 0.651971 |
79792d002dbdab2380a21d87e72cad4aad718aff | 3,025 | py | Python | domain_model/event.py | quepas/ScenarioDomainModel | 005847a4956ac9a4680d230c02ef802ed7a6742a | [
"MIT"
] | 11 | 2019-11-25T08:33:52.000Z | 2021-09-24T10:56:51.000Z | domain_model/event.py | ErwindeGelder/ScenarioRiskQuantification | ee351b7bd3629af0c1d1d800dcc5ac5426b9b804 | [
"MIT"
] | 1 | 2021-01-19T14:15:10.000Z | 2021-01-19T14:15:10.000Z | domain_model/event.py | ErwindeGelder/ScenarioRiskQuantification | ee351b7bd3629af0c1d1d800dcc5ac5426b9b804 | [
"MIT"
] | 3 | 2021-01-14T14:12:16.000Z | 2022-01-24T11:14:05.000Z | """ Class Event
Creation date: 2019 02 28
Author(s): Erwin de Gelder
Modifications:
2019 05 22: Make use of type_checking.py to shorten the initialization.
2019 10 13: Update of terminology.
2020 08 22: Change how an event is created from json code. Result is the same.
2020 08 24: Change superclass from ScenarioEleme... | 35.588235 | 92 | 0.707107 |
79792e05504432db96945d591d8de9acc418c53c | 1,921 | py | Python | Versuch4/task1.3.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch4/task1.3.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch4/task1.3.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | # -------------------------------------
# Task 1.3
# -------------------------------------
import matplotlib.pyplot as plt
import numpy as np
# Einlesen der .npy Datei
data = np.load('data/test.npy')
freq = np.zeros(225280)
# Darstellung des Amplitudenspektrums
plt.plot(data)
plt.grid()
plt.xlabel('Zeit')
plt.ylabel... | 25.613333 | 103 | 0.720979 |
79792e49c5002ae650a8f4768ad0f1f08b92b020 | 3,936 | py | Python | biblionet/build_doi_db.py | humford/EdLabResearch | e6479d731e9d149be0d6cd0e8ed5cd1bf7e9f3c7 | [
"MIT"
] | 1 | 2019-06-17T20:41:32.000Z | 2019-06-17T20:41:32.000Z | biblionet/build_doi_db.py | humford/EdLabResearch | e6479d731e9d149be0d6cd0e8ed5cd1bf7e9f3c7 | [
"MIT"
] | null | null | null | biblionet/build_doi_db.py | humford/EdLabResearch | e6479d731e9d149be0d6cd0e8ed5cd1bf7e9f3c7 | [
"MIT"
] | null | null | null | # Import Configuration
from config import config
output_dir = config["OUTPUT"]["DIRECTORY"]
output_db = config["OUTPUT"]["DATABASE"]
crossref_email = config["API"]["CROSSREF_EMAIL"]
# Import Internal
from db_utils import *
from doi_utils import *
# Import External
from timeit import default_timer as timer
start = t... | 30.75 | 124 | 0.71875 |
79792e68cd2f6091b782e112287ab528c7e8dc30 | 72,762 | py | Python | tests/test_service_v2.py | mnezerka/python-pyodata | 62269d76e6f232200bfb726942a509486944c14d | [
"Apache-2.0"
] | null | null | null | tests/test_service_v2.py | mnezerka/python-pyodata | 62269d76e6f232200bfb726942a509486944c14d | [
"Apache-2.0"
] | null | null | null | tests/test_service_v2.py | mnezerka/python-pyodata | 62269d76e6f232200bfb726942a509486944c14d | [
"Apache-2.0"
] | null | null | null | """Service tests"""
import datetime
import responses
import requests
import pytest
from unittest.mock import patch
from pyodata.utils import RequestObserverLastCall
import pyodata.v2.model
import pyodata.v2.service
from pyodata.exceptions import PyODataException, HttpError, ExpressionError, ProgramError
from pyodata.... | 30.241895 | 189 | 0.648086 |
79792eda8299be5c571d99c4ffcfde482c853392 | 1,149 | py | Python | emailSender.py | SiddiqMohammed/free-games-email-notifier | 5985257868cf32e4879c8a58bde57911490e7d42 | [
"MIT"
] | null | null | null | emailSender.py | SiddiqMohammed/free-games-email-notifier | 5985257868cf32e4879c8a58bde57911490e7d42 | [
"MIT"
] | null | null | null | emailSender.py | SiddiqMohammed/free-games-email-notifier | 5985257868cf32e4879c8a58bde57911490e7d42 | [
"MIT"
] | null | null | null | import smtplib, ssl
from email.mime.text import MIMEText
import os
from dotenv import load_dotenv
load_dotenv()
def send(data):
port = 587 # For starttls
smtp_server = "smtp.gmail.com"
sender_email = os.getenv("senderEmail")
receiver_email = os.getenv("receiverEmail")
password = os.ge... | 29.461538 | 71 | 0.612707 |
79792ee9a2ea5497ded2035e4cb6edfa5f6bfb90 | 682 | py | Python | class6/exercises/ex1_show_ip_arp.py | ksannedhi/pyplus_course | fc3499f2dfef472dc49fe6caddf2e6e2be160f4b | [
"Apache-2.0"
] | 39 | 2019-03-03T18:16:55.000Z | 2022-02-17T17:05:18.000Z | class6/exercises/ex1_show_ip_arp.py | ksannedhi/pyplus_course | fc3499f2dfef472dc49fe6caddf2e6e2be160f4b | [
"Apache-2.0"
] | 1 | 2020-06-17T22:39:28.000Z | 2020-06-17T22:39:28.000Z | class6/exercises/ex1_show_ip_arp.py | ksannedhi/pyplus_course | fc3499f2dfef472dc49fe6caddf2e6e2be160f4b | [
"Apache-2.0"
] | 77 | 2019-01-25T10:41:23.000Z | 2022-03-14T21:35:59.000Z | import os
import pyeapi
from getpass import getpass
password = os.getenv("PYNET_PASSWORD") if os.getenv("PYNET_PASSWORD") else getpass()
arista8 = {
"transport": "https",
"host": "arista8.lasthop.io",
"username": "pyclass",
"password": password,
"port": 443,
}
connection = pyeapi.client.connect(*... | 23.517241 | 84 | 0.667155 |
79792f63b68d752f7b546bfa70e23f8cad0a240d | 3,413 | py | Python | ndlib/models/epidemics/SIModel.py | RaspyThommy/ndlib | 47baa628c5da600a0a7082b61cade53d8f399087 | [
"BSD-2-Clause"
] | null | null | null | ndlib/models/epidemics/SIModel.py | RaspyThommy/ndlib | 47baa628c5da600a0a7082b61cade53d8f399087 | [
"BSD-2-Clause"
] | null | null | null | ndlib/models/epidemics/SIModel.py | RaspyThommy/ndlib | 47baa628c5da600a0a7082b61cade53d8f399087 | [
"BSD-2-Clause"
] | 1 | 2020-11-24T14:21:03.000Z | 2020-11-24T14:21:03.000Z | from ..DiffusionModel import DiffusionModel
import numpy as np
import future.utils
__author__ = "Giulio Rossetti"
__license__ = "BSD-2-Clause"
__email__ = "giulio.rossetti@gmail.com"
class SIModel(DiffusionModel):
"""
Model Parameters to be specified via ModelConfig
:param beta: The infection rate (floa... | 35.185567 | 105 | 0.532669 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.