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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7975afc6f167a90b8542ee791fb014bae044bf5e | 7,390 | py | Python | paper1_examples/shelf1d/adjoint/setrun.py | rjleveque/adjoint | 4f3e0b89b8eb994b6f8ccbbfff33de91f6efac1a | [
"BSD-2-Clause"
] | 3 | 2017-03-03T21:27:33.000Z | 2018-04-04T10:13:40.000Z | paper1_examples/shelf1d/adjoint/setrun.py | rjleveque/adjoint | 4f3e0b89b8eb994b6f8ccbbfff33de91f6efac1a | [
"BSD-2-Clause"
] | null | null | null | paper1_examples/shelf1d/adjoint/setrun.py | rjleveque/adjoint | 4f3e0b89b8eb994b6f8ccbbfff33de91f6efac1a | [
"BSD-2-Clause"
] | 3 | 2015-10-16T16:35:17.000Z | 2017-03-03T21:06:51.000Z | """
Module to set up run time parameters for Clawpack -- classic code.
The values set in the function setrun are then written out to data files
that will be read in by the Fortran code.
"""
import os
import numpy as np
#------------------------------
def setrun(claw_pkg='classic'):
#--------------------------... | 32.555066 | 92 | 0.569553 |
7975b0be49ad1b9951671f3582a1abbaca6da663 | 4,413 | py | Python | recohut/utils/data.py | sparsh-ai/recohut | 4121f665761ffe38c9b6337eaa9293b26bee2376 | [
"Apache-2.0"
] | null | null | null | recohut/utils/data.py | sparsh-ai/recohut | 4121f665761ffe38c9b6337eaa9293b26bee2376 | [
"Apache-2.0"
] | 1 | 2022-01-12T05:40:57.000Z | 2022-01-12T05:40:57.000Z | recohut/utils/data.py | RecoHut-Projects/recohut | 4121f665761ffe38c9b6337eaa9293b26bee2376 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/utils/utils.data.ipynb (unless otherwise specified).
__all__ = ['list_datasets', 'load_dataset', 'generate_time_series', 'generate_abtest_data']
# Cell
import pandas as pd
import numpy as np
import tempfile
import os
import scipy.stats as stats
from .common_utils impor... | 34.476563 | 119 | 0.6431 |
7975b4e368375a60c1c3efa9f2f468447c7b60bc | 18,118 | py | Python | pycog/figtools.py | orgate/pycog | e320fcec80f72ae645e8f2edeca3eefddc93d5bf | [
"MIT"
] | 37 | 2016-02-28T08:50:33.000Z | 2022-01-21T03:09:29.000Z | pycog/figtools.py | orgate/pycog | e320fcec80f72ae645e8f2edeca3eefddc93d5bf | [
"MIT"
] | 1 | 2018-01-04T01:19:50.000Z | 2018-01-04T01:19:50.000Z | pycog/figtools.py | orgate/pycog | e320fcec80f72ae645e8f2edeca3eefddc93d5bf | [
"MIT"
] | 30 | 2016-02-08T18:06:03.000Z | 2022-03-25T16:38:23.000Z | """
A more convenient interface to matplotlib.
Note
----
It appears that matplotlib's savefig has a bug in certain versions. Update your
matplotlib to the latest version and this problem will go away.
"""
from __future__ import absolute_import
from __future__ import division
import os
import subprocess
impo... | 31.400347 | 90 | 0.471851 |
7975b5b9ed8c67ca3d37877103f80b9b45c92ace | 10,449 | py | Python | web/api/v0/__init__.py | JuKu/pycroft | 15595f9b4327da5c52c77174def73660226da7dc | [
"Apache-2.0"
] | null | null | null | web/api/v0/__init__.py | JuKu/pycroft | 15595f9b4327da5c52c77174def73660226da7dc | [
"Apache-2.0"
] | null | null | null | web/api/v0/__init__.py | JuKu/pycroft | 15595f9b4327da5c52c77174def73660226da7dc | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
from functools import wraps
from flask import jsonify, request, current_app
from flask_restful import Api, Resource as FlaskRestfulResource, abort, \
reqparse, inputs
from ipaddr import IPAddress
from sqlalchemy.exc import IntegrityError
from pycroft import config
from pycroft.lib.f... | 33.815534 | 82 | 0.663508 |
7975b5e06289199d2d5b404f9eb0c5ba2e0520df | 2,128 | pyde | Python | mode/examples/Topics/Image Processing/Convolution/Convolution.pyde | katnino/processing.py | ff6450a6606908a014ce795340c06c8f6d90023d | [
"Apache-2.0"
] | null | null | null | mode/examples/Topics/Image Processing/Convolution/Convolution.pyde | katnino/processing.py | ff6450a6606908a014ce795340c06c8f6d90023d | [
"Apache-2.0"
] | null | null | null | mode/examples/Topics/Image Processing/Convolution/Convolution.pyde | katnino/processing.py | ff6450a6606908a014ce795340c06c8f6d90023d | [
"Apache-2.0"
] | null | null | null | """
Convolution
by Daniel Shiffman.
Applies a convolution matrix to a portion of an image. Move mouse to
apply filter to different parts of the image.
"""
img = loadImage("moon-wide.jpg")
w = 120
# It's possible to convolve the image with many different
# matrices to produce different effects. This is a high-pass
# f... | 31.761194 | 75 | 0.593985 |
7975b7460712fdcd4ea04ecdcfe2974b8282c702 | 28,355 | py | Python | src/impetuous/fit.py | rictjo/impetuous | 470deaa5e63046d8a259ec0957f1fb2ec3116df7 | [
"Apache-2.0"
] | null | null | null | src/impetuous/fit.py | rictjo/impetuous | 470deaa5e63046d8a259ec0957f1fb2ec3116df7 | [
"Apache-2.0"
] | null | null | null | src/impetuous/fit.py | rictjo/impetuous | 470deaa5e63046d8a259ec0957f1fb2ec3116df7 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2022 RICHARD TJÖRNHAMMAR
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, sof... | 36.352564 | 171 | 0.524105 |
7975b7fbdfd0dfe61b9e068f8513c3e599adc504 | 14,935 | py | Python | opencontest/contest/pages/judge.py | MBRUN138/open-contest | 2d0f4f0db3da5b59a6e50c8ee3775fba1bf6297c | [
"Apache-2.0"
] | null | null | null | opencontest/contest/pages/judge.py | MBRUN138/open-contest | 2d0f4f0db3da5b59a6e50c8ee3775fba1bf6297c | [
"Apache-2.0"
] | 49 | 2019-04-02T09:35:40.000Z | 2021-03-20T17:15:12.000Z | opencontest/contest/pages/judge.py | MBRUN138/open-contest | 2d0f4f0db3da5b59a6e50c8ee3775fba1bf6297c | [
"Apache-2.0"
] | 22 | 2019-03-29T18:07:06.000Z | 2021-02-24T19:49:50.000Z | import logging, difflib, re
from bs4 import BeautifulSoup
from django.http import HttpResponse, JsonResponse
from contest.auth import admin_required
from contest.models.contest import Contest
from contest.models.submission import Submission
from contest.models.problem import Problem
from contest.models.user import Us... | 35.307329 | 186 | 0.545765 |
7975b8650aac15339138a07cb8b8811988add08e | 5,515 | py | Python | OmniDB/OmniDB_app/views/users.py | credativ/OmniDB | 86a32766388a0679ccbd7e38c560cef7ffd3759f | [
"MIT"
] | 1 | 2019-05-29T19:46:28.000Z | 2019-05-29T19:46:28.000Z | OmniDB/OmniDB_app/views/users.py | credativ/OmniDB | 86a32766388a0679ccbd7e38c560cef7ffd3759f | [
"MIT"
] | null | null | null | OmniDB/OmniDB_app/views/users.py | credativ/OmniDB | 86a32766388a0679ccbd7e38c560cef7ffd3759f | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.template import loader
from django.http import JsonResponse
from django.core import serializers
from django.shortcuts import redirect
import uuid
import json
import sys
import OmniDB_app.include.Spartacus as Spartacus
import OmniDB_app.include.Spartacus.Database as Dat... | 30.302198 | 166 | 0.63427 |
7975b8f1224b3d56d972ce2de03c2ac3802932ef | 1,342 | py | Python | tests/kafkatest/__init__.py | ewasserman/kafka | ac99a3c86d5d8a56b61b1e0d1b2594e627016718 | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/__init__.py | ewasserman/kafka | ac99a3c86d5d8a56b61b1e0d1b2594e627016718 | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/__init__.py | ewasserman/kafka | ac99a3c86d5d8a56b61b1e0d1b2594e627016718 | [
"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 use ... | 51.615385 | 110 | 0.766766 |
7975b8f7e9bde77db0a32c9eb0588c90b2452af2 | 389 | py | Python | utils/decorators.py | abhiabhi94/idea-fare | 9b0819fc999c6f923346b4ac0399bafe58207ab1 | [
"Apache-2.0"
] | null | null | null | utils/decorators.py | abhiabhi94/idea-fare | 9b0819fc999c6f923346b4ac0399bafe58207ab1 | [
"Apache-2.0"
] | 9 | 2020-03-09T05:44:32.000Z | 2021-06-10T18:37:58.000Z | utils/decorators.py | abhiabhi94/idea-fare | 9b0819fc999c6f923346b4ac0399bafe58207ab1 | [
"Apache-2.0"
] | null | null | null | """General purpose project wise useful decorators"""
from functools import wraps
from django.http import Http404
def require_superuser(func):
"""Redirects non superusers to a 404 page"""
@wraps(func)
def wrapper(request, *args, **kwargs):
if not request.user.is_superuser:
raise Http40... | 22.882353 | 52 | 0.678663 |
7975b8ff2935ef18175af49a89da01c2b85253db | 1,536 | py | Python | env/Lib/site-packages/plotly/validators/icicle/legendgrouptitle/_font.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/icicle/legendgrouptitle/_font.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/icicle/legendgrouptitle/_font.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(
self, plotly_name="font", parent_name="icicle.legendgrouptitle", **kwargs
):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | 38.4 | 81 | 0.554036 |
7975b96b906407c55627395938bcc555261b726b | 1,672 | py | Python | waiting/src/lib/mine/cert/bin/helper/Python/my_configuration.py | rdw20170120/workstation | ed19aa930a83885c2a8cb58eb0bb5afe58f95df3 | [
"MIT"
] | null | null | null | waiting/src/lib/mine/cert/bin/helper/Python/my_configuration.py | rdw20170120/workstation | ed19aa930a83885c2a8cb58eb0bb5afe58f95df3 | [
"MIT"
] | 2 | 2021-04-06T18:07:32.000Z | 2021-06-02T01:50:40.000Z | waiting/src/lib/mine/cert/bin/helper/Python/my_configuration.py | rdw20170120/workstation | ed19aa930a83885c2a8cb58eb0bb5afe58f95df3 | [
"MIT"
] | null | null | null | import os
def get_cluster_user_pass():
return os.environ["CB_Cluster_PassSuper"]
def get_cluster_user_name():
return os.environ["CB_Cluster_UserSuper"]
def get_directory_answer():
return os.environ["CB_All_DirAnswer"]
def get_directory_data():
return os.environ["CB_Cluster_DirData"]
def get_di... | 17.061224 | 50 | 0.739234 |
7975ba1db89c35693505570b92432668f9142e41 | 1,919 | py | Python | xlsxwriter/test/comparison/test_print_options04.py | sontek/XlsxWriter | 7f17a52f95be9ecfb9c7f213fc0a02e0f625c6ec | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2015-05-19T22:17:15.000Z | 2015-05-19T22:17:15.000Z | xlsxwriter/test/comparison/test_print_options04.py | sontek/XlsxWriter | 7f17a52f95be9ecfb9c7f213fc0a02e0f625c6ec | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_print_options04.py | sontek/XlsxWriter | 7f17a52f95be9ecfb9c7f213fc0a02e0f625c6ec | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2014, John McNamara, jmcnamara@cpan.org
#
import unittest
import os
from ...workbook import Workbook
from ..helperfunctions import _compare_xlsx_files
class TestCompareXLSXFiles(unittest.... | 28.641791 | 91 | 0.536217 |
7975ba3ec46c140ac51e4449e3fa52f34d2671cc | 14,041 | py | Python | utils/box_utils.py | sukibean163/RetinaFace_Paddle | 8910f4ac2e42058dffdfbaaab323457fe823d00c | [
"MIT"
] | null | null | null | utils/box_utils.py | sukibean163/RetinaFace_Paddle | 8910f4ac2e42058dffdfbaaab323457fe823d00c | [
"MIT"
] | null | null | null | utils/box_utils.py | sukibean163/RetinaFace_Paddle | 8910f4ac2e42058dffdfbaaab323457fe823d00c | [
"MIT"
] | null | null | null | import paddle
import numpy as np
def point_form(boxes):
""" Convert prior_boxes to (xmin, ymin, xmax, ymax)
representation for comparison to point form ground truth data.
Args:
boxes: (tensor) center-size default boxes from priorbox layers.
Return:
boxes: (tensor) Converted xmin, ymin,... | 41.54142 | 127 | 0.617335 |
7975ba77f465bf3926c3c7a250a632dafa1b2a7a | 2,671 | py | Python | convert_to_records.py | joe-antognini/tf-estimator-example | 21428af1777595a9432cb4d795f1ba9541b74c7b | [
"MIT"
] | 1 | 2019-10-23T03:16:04.000Z | 2019-10-23T03:16:04.000Z | convert_to_records.py | joe-antognini/tf-estimator-example | 21428af1777595a9432cb4d795f1ba9541b74c7b | [
"MIT"
] | null | null | null | convert_to_records.py | joe-antognini/tf-estimator-example | 21428af1777595a9432cb4d795f1ba9541b74c7b | [
"MIT"
] | 1 | 2019-04-02T09:54:34.000Z | 2019-04-02T09:54:34.000Z | #! /usr/bin/env python
import argparse
import gzip
import os
import numpy as np
import urllib
import tensorflow as tf
MNIST_URL = 'http://yann.lecun.com/exdb/mnist/'
MNIST_FNAMES = ['train-images-idx3-ubyte.gz',
'train-labels-idx1-ubyte.gz',
't10k-images-idx3-ubyte.gz',
... | 29.032609 | 75 | 0.684388 |
7975bb1b2818f123d43b272aaebc6f21ba48d354 | 1,531 | py | Python | packages/augur-tools/scripts/deploy-merge-addresses.py | joeykrug/augur | d6d52aee324e8c7eeb85c9358094d3a4bcda66bc | [
"MIT"
] | null | null | null | packages/augur-tools/scripts/deploy-merge-addresses.py | joeykrug/augur | d6d52aee324e8c7eeb85c9358094d3a4bcda66bc | [
"MIT"
] | null | null | null | packages/augur-tools/scripts/deploy-merge-addresses.py | joeykrug/augur | d6d52aee324e8c7eeb85c9358094d3a4bcda66bc | [
"MIT"
] | 1 | 2020-04-17T00:41:53.000Z | 2020-04-17T00:41:53.000Z | #!/usr/bin/env python3
import json
import os
from pathlib import Path, PurePath
# packages/augur-artifacts/src/addresses.json
# packages/augur-artifacts/src/local-addresses.json
basepath = PurePath(os.path.split(os.path.realpath(__file__))[0]).parent
addressfile = basepath.joinpath('..', 'augur-artifacts', 'src', '... | 34.022222 | 107 | 0.706074 |
7975bb904fa0e034313958a84382f6ba439569aa | 2,005 | py | Python | reagent/gym/envs/functionality/possible_actions_mask_tester.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | null | null | null | reagent/gym/envs/functionality/possible_actions_mask_tester.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | null | null | null | reagent/gym/envs/functionality/possible_actions_mask_tester.py | dmitryvinn/ReAgent | f98825b9d021ec353a1f9087840a05fea259bf42 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
"""
Simple environment to test possible_actions_mask.
State simply tells you which iteration it is, but doesn't tell anything about
which action to take, so only source of info is possible_actions_mask.
The Q-value of each ac... | 35.175439 | 86 | 0.690773 |
7975bbebfa5fc81de7e0525d136f114f3616578f | 3,463 | py | Python | knox/views.py | GTpyro/django-rest-knox | 19df006c79eb884b710ccd6e8f5107d9da33479e | [
"MIT"
] | 788 | 2015-09-11T14:58:17.000Z | 2022-03-29T20:14:44.000Z | knox/views.py | GTpyro/django-rest-knox | 19df006c79eb884b710ccd6e8f5107d9da33479e | [
"MIT"
] | 189 | 2015-09-12T19:15:25.000Z | 2022-02-11T21:39:25.000Z | knox/views.py | GTpyro/django-rest-knox | 19df006c79eb884b710ccd6e8f5107d9da33479e | [
"MIT"
] | 174 | 2015-11-02T23:56:17.000Z | 2022-03-24T18:34:16.000Z | from django.contrib.auth.signals import user_logged_in, user_logged_out
from django.utils import timezone
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.serializers import DateTimeField
from rest_framework.setting... | 36.840426 | 85 | 0.693329 |
7975bc7f858443a9b99b4bf7a0ea7ac051fa834a | 609 | py | Python | examples/seesaw_simpletest.py | mcauser/Adafruit_CircuitPython_seesaw | 7e39d6fb0744d1ae14bfa56cdaf73398866c83d8 | [
"MIT"
] | 1 | 2020-09-26T18:31:49.000Z | 2020-09-26T18:31:49.000Z | examples/seesaw_simpletest.py | mcauser/Adafruit_CircuitPython_seesaw | 7e39d6fb0744d1ae14bfa56cdaf73398866c83d8 | [
"MIT"
] | null | null | null | examples/seesaw_simpletest.py | mcauser/Adafruit_CircuitPython_seesaw | 7e39d6fb0744d1ae14bfa56cdaf73398866c83d8 | [
"MIT"
] | 1 | 2020-12-07T13:55:58.000Z | 2020-12-07T13:55:58.000Z | # Simple seesaw test using an LED attached to Pin 15.
#
# See the seesaw Learn Guide for wiring details:
# https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout?view=all#circuitpython-wiring-and-test
import time
from board import SCL, SDA
import busio
from adafruit_seesaw.seesaw import Seesaw
i2c_bus = busio.I... | 27.681818 | 101 | 0.740558 |
7975bdccd04d08bd33a22914ba651a440251337b | 443 | py | Python | IPProxyPool/util/compatibility.py | zyhibook/igotolibrary | b35ff3b9b3c5c938dfa0a1b62f6d94faef47925a | [
"MIT"
] | 171 | 2018-08-01T15:05:06.000Z | 2022-03-28T04:14:54.000Z | IPProxyPool/util/compatibility.py | zyhibook/igotolibrary | b35ff3b9b3c5c938dfa0a1b62f6d94faef47925a | [
"MIT"
] | 19 | 2018-09-11T13:29:57.000Z | 2021-12-13T20:31:38.000Z | IPProxyPool/util/compatibility.py | zyhibook/igotolibrary | b35ff3b9b3c5c938dfa0a1b62f6d94faef47925a | [
"MIT"
] | 55 | 2018-08-23T01:11:37.000Z | 2022-03-26T11:31:38.000Z | # coding:utf-8
import sys
PY3 = sys.version_info[0] == 3
if PY3:
text_type = str
binary_type = bytes
else:
text_type = unicode
binary_type = str
def text_(s, encoding='utf-8', errors='strict'):
if isinstance(s, binary_type):
return s.decode(encoding, errors)
return s
def bytes_(s, e... | 19.26087 | 49 | 0.647856 |
7975be78275817a0e29e885700c8eed0326c248f | 166 | py | Python | christmasApp.py | gavinfowler/ChristmasList | 6e00e8e20a8a6deaeb07d1d0e657df0dc8d49e61 | [
"MIT"
] | null | null | null | christmasApp.py | gavinfowler/ChristmasList | 6e00e8e20a8a6deaeb07d1d0e657df0dc8d49e61 | [
"MIT"
] | 16 | 2020-02-12T03:20:41.000Z | 2022-03-08T21:10:19.000Z | christmasApp.py | gavinfowler/ChristmasList | 6e00e8e20a8a6deaeb07d1d0e657df0dc8d49e61 | [
"MIT"
] | null | null | null | from app import app, db
from app.models import User, Post
@app.shell_context_processor
def make_shell_context():
return {"db": db, "User": User, "Post": Post}
| 18.444444 | 49 | 0.710843 |
7975be8b3969fffce5bb2a5231f8acd91d30f9ae | 1,662 | py | Python | data/GQ_MS.py | johnpjust/BNAF_tensorflow_eager | 693a82e8042ca362e728348ed7a3a288d2ab76f3 | [
"MIT"
] | null | null | null | data/GQ_MS.py | johnpjust/BNAF_tensorflow_eager | 693a82e8042ca362e728348ed7a3a288d2ab76f3 | [
"MIT"
] | null | null | null | data/GQ_MS.py | johnpjust/BNAF_tensorflow_eager | 693a82e8042ca362e728348ed7a3a288d2ab76f3 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from sklearn.utils import shuffle
class GQ_MS:
class Data:
def __init__(self, data):
self.x = data.astype(np.float32)
self.N = self.x.shape[0]
def __init__(self, file):
trn, val, tst = load_data_and_clean_and_split(file)
... | 23.742857 | 59 | 0.617329 |
7975c074527547be4435edb01ef17af9710794ea | 465 | py | Python | git/setup.py | emartin-merrill-r7/insightconnect-plugins | a589745dbcc9f01d3e601431e77ab7221a84c117 | [
"MIT"
] | null | null | null | git/setup.py | emartin-merrill-r7/insightconnect-plugins | a589745dbcc9f01d3e601431e77ab7221a84c117 | [
"MIT"
] | null | null | null | git/setup.py | emartin-merrill-r7/insightconnect-plugins | a589745dbcc9f01d3e601431e77ab7221a84c117 | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
from setuptools import setup, find_packages
setup(name='git-rapid7-plugin',
version='1.0.1',
description='Git plugin allows you to add, remove and commit files to Git repository',
author='rapid7',
author_email='',
url='',
packages=find_packag... | 31 | 97 | 0.664516 |
7975c12781d2509202d7a1ba47acdde0208b1c85 | 5,869 | py | Python | pybind/nos/v7_1_0/qos/queue/multicast/scheduler/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/qos/queue/multicast/scheduler/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v7_1_0/qos/queue/multicast/scheduler/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 47.330645 | 503 | 0.708468 |
7975c146418d4a57392a96f0fadb359fbf101c68 | 435 | py | Python | core/enums/default_paths.py | echim/pySteps | c33ac3446593b545aece475062d140527dcb443c | [
"MIT"
] | 8 | 2018-05-15T21:20:40.000Z | 2021-08-19T00:25:18.000Z | core/enums/default_paths.py | echim/pySteps | c33ac3446593b545aece475062d140527dcb443c | [
"MIT"
] | null | null | null | core/enums/default_paths.py | echim/pySteps | c33ac3446593b545aece475062d140527dcb443c | [
"MIT"
] | 2 | 2018-09-12T01:33:54.000Z | 2021-01-25T02:21:58.000Z | from enum import Enum
class DefaultPaths(Enum):
WINDOWS = {
'APPLICATIONS': ['C:\\Program Files (x86)', 'C:\\Program Files'],
'TESSERACT': 'C:\\tesseract\\build\\bin\\Release\\tesseract.exe'
}
LINUX = {
'APPLICATIONS': ['/bin', '/usr/bin', '/usr/share'],
'TESSERACT': ''
... | 25.588235 | 73 | 0.54023 |
7975c1e4c276f7b8ed37f19f45f5f54a4692fe8a | 15,262 | py | Python | Pyrado/pyrado/algorithms/stopping_criteria/rollout_based_criteria.py | theogruner/SimuRLacra | 4893514ccdeb10a736c55de9aa7753fd51c5afec | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/pyrado/algorithms/stopping_criteria/rollout_based_criteria.py | theogruner/SimuRLacra | 4893514ccdeb10a736c55de9aa7753fd51c5afec | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/pyrado/algorithms/stopping_criteria/rollout_based_criteria.py | theogruner/SimuRLacra | 4893514ccdeb10a736c55de9aa7753fd51c5afec | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 49.391586 | 124 | 0.704953 |
7975c291fe3ecd0723ea2038914119884689bce9 | 2,684 | py | Python | tests/components/samsungtv/conftest.py | bbordelon/core | 1a78e18eeb1ebd40fe678dcfef3ab34495db49cb | [
"Apache-2.0"
] | null | null | null | tests/components/samsungtv/conftest.py | bbordelon/core | 1a78e18eeb1ebd40fe678dcfef3ab34495db49cb | [
"Apache-2.0"
] | 2 | 2022-03-03T06:26:44.000Z | 2022-03-31T06:32:50.000Z | tests/components/samsungtv/conftest.py | bbordelon/core | 1a78e18eeb1ebd40fe678dcfef3ab34495db49cb | [
"Apache-2.0"
] | null | null | null | """Fixtures for Samsung TV."""
from datetime import datetime
from unittest.mock import AsyncMock, Mock, patch
import pytest
from samsungctl import Remote
from samsungtvws.async_remote import SamsungTVWSAsyncRemote
import homeassistant.util.dt as dt_util
from .const import SAMPLE_APP_LIST
@pytest.fixture(autouse=Tr... | 29.822222 | 83 | 0.667288 |
7975c2eb5a7e088fe5cae0a74b81e4bb00b6a4a3 | 3,772 | py | Python | evaluation.py | yukitsuji/voxelnet_chainer | 5fc5b42c03ed46a40f3d53703b86c4d7dcccb2e6 | [
"MIT"
] | 26 | 2018-07-12T02:09:52.000Z | 2021-08-19T14:21:29.000Z | evaluation.py | conanhung/voxelnet_chainer | 5fc5b42c03ed46a40f3d53703b86c4d7dcccb2e6 | [
"MIT"
] | null | null | null | evaluation.py | conanhung/voxelnet_chainer | 5fc5b42c03ed46a40f3d53703b86c4d7dcccb2e6 | [
"MIT"
] | 5 | 2018-07-17T08:34:56.000Z | 2019-03-13T11:22:54.000Z | #!/usr/env/bin python3
# -*- coding: utf-8 -*-
import argparse
import numpy as np
import sys
import subprocess
import time
import os
import yaml
import chainer
from chainer import cuda, optimizers, serializers
from chainer import training
subprocess.call(['sh', "setup.sh"])
from voxelnet.config_utils import *
from ... | 36.269231 | 79 | 0.577943 |
7975c45cdab92339485f07d8e3b0c9da001c6dca | 1,161 | py | Python | feature_repo/features.py | qooba/feast-pyspark | 327b0e36bc57f3ebfe2f76cd7625af290942fe33 | [
"MIT"
] | null | null | null | feature_repo/features.py | qooba/feast-pyspark | 327b0e36bc57f3ebfe2f76cd7625af290942fe33 | [
"MIT"
] | null | null | null | feature_repo/features.py | qooba/feast-pyspark | 327b0e36bc57f3ebfe2f76cd7625af290942fe33 | [
"MIT"
] | null | null | null | from google.protobuf.duration_pb2 import Duration
from feast import Entity, Feature, FeatureView, ValueType
from feast_pyspark import DeltaDataSource
from feast.data_format import ParquetFormat
my_stats = DeltaDataSource(
path="/home/jovyan/feast-pyspark/feature_repo/dataset/all",
event_timestamp_column="date... | 40.034483 | 90 | 0.697674 |
7975c463b9559b9e7db512849e67a30f66a8fec1 | 1,214 | py | Python | examples/Biology/StepSystem/StepSystem-explicit.py | siconos/siconos-deb | 2739a23f23d797dbfecec79d409e914e13c45c67 | [
"Apache-2.0"
] | null | null | null | examples/Biology/StepSystem/StepSystem-explicit.py | siconos/siconos-deb | 2739a23f23d797dbfecec79d409e914e13c45c67 | [
"Apache-2.0"
] | null | null | null | examples/Biology/StepSystem/StepSystem-explicit.py | siconos/siconos-deb | 2739a23f23d797dbfecec79d409e914e13c45c67 | [
"Apache-2.0"
] | null | null | null | import numpy
import scipy
import sys
from ComputeOneStep import *
#state
n=2
x=numpy.zeros(n, 'd')
# initial condition
x[0]=10
x[1]=5
gamma1=-1.5
gamma2=-4.5
kappa1=40
kappa2=40
theta1=8.0
theta2=8.0
A= numpy.array([[gamma1,0],[0, gamma2]])
a= numpy.array([kappa1,kappa2])
B= numpy.array([[-kappa1,0],[0, -k... | 14.804878 | 68 | 0.523888 |
7975c77ceb219f5f1c598151b267fcb89e59c5fe | 3,862 | py | Python | bokeh/charts/builder/tests/test_area_builder.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | 1 | 2021-11-07T18:55:59.000Z | 2021-11-07T18:55:59.000Z | bokeh/charts/builder/tests/test_area_builder.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | null | null | null | bokeh/charts/builder/tests/test_area_builder.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | 1 | 2021-08-01T08:38:53.000Z | 2021-08-01T08:38:53.000Z | """ This is the Bokeh charts testing interface.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with thi... | 44.390805 | 97 | 0.565769 |
7975c864161c34391b0e86add3b28a3224db61d1 | 1,850 | py | Python | tests/transforms/test_geometric_transform.py | gmazzamuto/gputools | 73a4dee76a119f94d8163781a85b691fd080d506 | [
"BSD-3-Clause"
] | 89 | 2015-08-28T14:17:33.000Z | 2022-01-20T16:19:34.000Z | tests/transforms/test_geometric_transform.py | gmazzamuto/gputools | 73a4dee76a119f94d8163781a85b691fd080d506 | [
"BSD-3-Clause"
] | 24 | 2015-08-28T19:06:22.000Z | 2022-02-21T21:10:13.000Z | tests/transforms/test_geometric_transform.py | gmazzamuto/gputools | 73a4dee76a119f94d8163781a85b691fd080d506 | [
"BSD-3-Clause"
] | 17 | 2015-08-28T18:56:43.000Z | 2021-09-15T23:15:36.000Z | """ some image manipulation functions like scaling, rotating, etc...
"""
from __future__ import print_function, unicode_literals, absolute_import, division
import numpy as np
from gputools import geometric_transform
from scipy import ndimage
import pytest
def create_shape(shape=(100, 110, 120)):
d = np.zeros(sh... | 29.83871 | 110 | 0.615676 |
7975c9d9a5a45e75ddd7d47a4555c31787d3cbc3 | 3,377 | py | Python | mamba/marketplace/components/simulator/http_flask_server_sim/__init__.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | mamba/marketplace/components/simulator/http_flask_server_sim/__init__.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | mamba/marketplace/components/simulator/http_flask_server_sim/__init__.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | ############################################################################
#
# Copyright (c) Mamba Developers. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
############################################################################
""" Compon... | 31.268519 | 77 | 0.633402 |
7975ca25a253175703ea6bed83a2c65003c720a2 | 29,764 | py | Python | tensor2tensor/rl/trainer_model_based_params.py | byronyi/tensor2tensor | b93fc036fdbacfddcadad8fb781f5b670533384e | [
"Apache-2.0"
] | null | null | null | tensor2tensor/rl/trainer_model_based_params.py | byronyi/tensor2tensor | b93fc036fdbacfddcadad8fb781f5b670533384e | [
"Apache-2.0"
] | null | null | null | tensor2tensor/rl/trainer_model_based_params.py | byronyi/tensor2tensor | b93fc036fdbacfddcadad8fb781f5b670533384e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 32.247021 | 80 | 0.756249 |
7975ca4f2db27244b3a3a3ac8b3abe1aa1d1c2c4 | 2,853 | py | Python | development/server/monitor-server-python-debug/monitor-api-python/monitor.py | jessmaciel/tma-framework-m | 71a3da3c1b3ec8afa56345843cd9d509a6fe1387 | [
"Apache-2.0"
] | null | null | null | development/server/monitor-server-python-debug/monitor-api-python/monitor.py | jessmaciel/tma-framework-m | 71a3da3c1b3ec8afa56345843cd9d509a6fe1387 | [
"Apache-2.0"
] | 33 | 2018-06-08T16:02:46.000Z | 2020-06-18T16:08:12.000Z | development/server/monitor-server-python-debug/monitor-api-python/monitor.py | jessmaciel/tma-framework-m | 71a3da3c1b3ec8afa56345843cd9d509a6fe1387 | [
"Apache-2.0"
] | 3 | 2020-06-03T01:28:03.000Z | 2021-07-19T20:13:26.000Z | from flask import Flask
from flask import request
from flask import send_file
import json
from jsonschema import Draft4Validator
import logging
import logging.config
import os
from kafka import SimpleProducer, KafkaClient
app = Flask(__name__)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger... | 30.031579 | 92 | 0.682089 |
7975cae9dd4248d6e95b53c1edd9cde5c3b396e1 | 540 | py | Python | manage.py | JoseAntpr/mooviest-back | 76feb4211da4cb81506eb6e92e9d17af0bc6be53 | [
"MIT"
] | null | null | null | manage.py | JoseAntpr/mooviest-back | 76feb4211da4cb81506eb6e92e9d17af0bc6be53 | [
"MIT"
] | 1 | 2017-12-30T16:51:34.000Z | 2017-12-30T16:51:34.000Z | manage.py | JoseAntpr/mooviest-back | 76feb4211da4cb81506eb6e92e9d17af0bc6be53 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mooviest.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are... | 33.75 | 73 | 0.687037 |
7975cc18029e9588740c486383c2a16de577e9b6 | 595 | py | Python | testMATLABHeaderLexer.py | dullin/MATLAB-Header-Generator | a1c55fce494c0d31318a37d973645c2a6059a474 | [
"MIT"
] | null | null | null | testMATLABHeaderLexer.py | dullin/MATLAB-Header-Generator | a1c55fce494c0d31318a37d973645c2a6059a474 | [
"MIT"
] | null | null | null | testMATLABHeaderLexer.py | dullin/MATLAB-Header-Generator | a1c55fce494c0d31318a37d973645c2a6059a474 | [
"MIT"
] | null | null | null | from antlr4 import *
from MATLABHeaderLexer import MATLABHeaderLexer
if __name__ == '__main__':
string = '''%FCN1 - ONELINEDESCRIPTION
%MOREDESCRIPTION
%
% Syntax: [outputArg1] = fcn1(inputArg1)
%
% Inputs:
% inputArg1 [TYPE] - DESCRIPTION tesé
%
% Outputs:
% outputArg1 [TYPE] - DESCRIPTION
%
% Example:
% ... | 22.037037 | 67 | 0.709244 |
7975ccddf25308859e9bad9dcdb49f21470f1764 | 13,597 | py | Python | compare_time.py | ifgovh/continual-learning | 21822801934ad68ca311c1c30ae49cdbd7ca53ed | [
"MIT"
] | 891 | 2018-09-30T07:04:20.000Z | 2022-03-30T02:17:42.000Z | compare_time.py | ifgovh/continual-learning | 21822801934ad68ca311c1c30ae49cdbd7ca53ed | [
"MIT"
] | 17 | 2019-04-24T13:03:00.000Z | 2021-12-03T13:11:43.000Z | compare_time.py | ifgovh/continual-learning | 21822801934ad68ca311c1c30ae49cdbd7ca53ed | [
"MIT"
] | 228 | 2018-10-16T19:15:18.000Z | 2022-03-30T08:04:36.000Z | #!/usr/bin/env python3
import argparse
import os
import numpy as np
from param_stamp import get_param_stamp_from_args
import visual_plt
import main
from param_values import set_default_values
description = 'Compare performance & training time of various continual learning methods.'
parser = argparse.ArgumentParser('.... | 40.227811 | 120 | 0.627418 |
7975cd8b5cb3187a522bdf171839d7cc972c4c5f | 731 | py | Python | projects/urls.py | tonyishangu/awwwards | 873729ae71f54266a1c1e9d7934f5dddb746dd69 | [
"MIT"
] | null | null | null | projects/urls.py | tonyishangu/awwwards | 873729ae71f54266a1c1e9d7934f5dddb746dd69 | [
"MIT"
] | null | null | null | projects/urls.py | tonyishangu/awwwards | 873729ae71f54266a1c1e9d7934f5dddb746dd69 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
from django.conf.urls.static import static
from django.conf import settings
urlpatterns=[
url('^$',views.index, name='index'),
url('^signup/', views.signup, name='signup'),
url('^profile/',views.profile, name='profile'),
url('^new_project/',views.sub... | 43 | 81 | 0.709986 |
7975ce1ef89f002ec2f9f5d9c44c2cbfc8f4a8d1 | 18,274 | py | Python | lbrsys/robexec/robot.py | talgball/lbr | ae999b6624d25990c083281516c069d09ce3269c | [
"Apache-2.0"
] | null | null | null | lbrsys/robexec/robot.py | talgball/lbr | ae999b6624d25990c083281516c069d09ce3269c | [
"Apache-2.0"
] | 6 | 2021-04-06T18:29:45.000Z | 2022-03-12T00:54:09.000Z | lbrsys/robexec/robot.py | talgball/lbr | ae999b6624d25990c083281516c069d09ce3269c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
robot.py - main module for the robot
"""
__author__ = "Tal G. Ball"
__copyright__ = "Copyright (C) 2020 Tal G. Ball"
__license__ = "Apache License, Version 2.0"
__version__ = "1.0"
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compli... | 36.991903 | 101 | 0.526869 |
7975ceaa61d10c25747e48b8598686d88f8ff90d | 10,636 | py | Python | pollination_sdk/models/function_boolean_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/function_boolean_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/function_boolean_input.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 33.031056 | 243 | 0.63003 |
7975ceab0092b17b4c8976a84a362f0b8ab912d5 | 8,741 | py | Python | pymatgen/analysis/tests/test_bond_dissociation.py | cajfisher/pymatgen | 286c304e38102d567723a71f733e0c304b72035d | [
"MIT"
] | 6 | 2015-02-06T08:27:09.000Z | 2021-02-28T14:42:52.000Z | pymatgen/analysis/tests/test_bond_dissociation.py | cajfisher/pymatgen | 286c304e38102d567723a71f733e0c304b72035d | [
"MIT"
] | null | null | null | pymatgen/analysis/tests/test_bond_dissociation.py | cajfisher/pymatgen | 286c304e38102d567723a71f733e0c304b72035d | [
"MIT"
] | 3 | 2015-10-21T08:04:40.000Z | 2019-03-19T23:11:15.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
from monty.serialization import loadfn
from pymatgen.analysis.bond_dissociation import BondDissociationEnergies
try:
from openbabel import openbabel as ob
except ImportError:
... | 66.725191 | 120 | 0.571559 |
7975ceee38bc9d047b446afd06fb8938262dc29d | 3,999 | py | Python | tests/test_pubpush.py | prakatmac/zerorpc-python | 46b90d1d7d00bef45d723b41cdf7383853959549 | [
"MIT"
] | 1 | 2018-07-01T09:04:22.000Z | 2018-07-01T09:04:22.000Z | tests/test_pubpush.py | madscheme/zerorpc-python | 3428fdbd615dbc775dca019561a96a5f32638941 | [
"MIT"
] | null | null | null | tests/test_pubpush.py | madscheme/zerorpc-python | 3428fdbd615dbc775dca019561a96a5f32638941 | [
"MIT"
] | 1 | 2021-09-08T09:56:24.000Z | 2021-09-08T09:56:24.000Z | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | 29.404412 | 81 | 0.671668 |
7975d0ae8ed6a1959e49beb1fd3ecfa92c7fc90a | 7,193 | py | Python | docs/source/howto/include/snippets/extend_workflows.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 180 | 2019-07-12T07:45:26.000Z | 2022-03-22T13:16:57.000Z | docs/source/howto/include/snippets/extend_workflows.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 2,325 | 2019-07-04T13:41:44.000Z | 2022-03-31T12:17:10.000Z | docs/source/howto/include/snippets/extend_workflows.py | azadoks/aiida-core | b806b7fef8fc79090deccfe2019b77cb922e0581 | [
"MIT",
"BSD-3-Clause"
] | 88 | 2019-07-06T01:42:39.000Z | 2022-03-18T14:20:09.000Z | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 34.917476 | 103 | 0.617962 |
7975d22cacbc663aea54e2785bc82c52bca3a5fd | 4,643 | py | Python | squid/datadog_checks/squid/squid.py | remicalixte/integrations-core | b115e18c52820fe1a92495f538fdc14ddf83cfe1 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T13:00:14.000Z | 2021-03-24T13:00:14.000Z | squid/datadog_checks/squid/squid.py | remicalixte/integrations-core | b115e18c52820fe1a92495f538fdc14ddf83cfe1 | [
"BSD-3-Clause"
] | null | null | null | squid/datadog_checks/squid/squid.py | remicalixte/integrations-core | b115e18c52820fe1a92495f538fdc14ddf83cfe1 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import re
import requests
from six import iteritems
# project
from datadog_checks.base import AgentCheck
EVENT_TYPE = SOURCE_TYPE_NAME = 'squid'
METRIC_PREFIX = "squid.cachemgr"
SERVICE_CHECK = "squid.can_c... | 29.954839 | 113 | 0.617058 |
7975d30d94c8fd5ede6ed30b01c39f6e0f5045b5 | 265 | py | Python | tests/artificial/transf_Logit/trend_MovingAverage/cycle_12/ar_/test_artificial_1024_Logit_MovingAverage_12__0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Logit/trend_MovingAverage/cycle_12/ar_/test_artificial_1024_Logit_MovingAverage_12__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Logit/trend_MovingAverage/cycle_12/ar_/test_artificial_1024_Logit_MovingAverage_12__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 12, transform = "Logit", sigma = 0.0, exog_count = 0, ar_order = 0); | 37.857143 | 165 | 0.732075 |
7975d386d550e1c47fb32e2e249215cc128b6d03 | 371 | py | Python | examp_for_main.py | DedaLenya/test_stop_push | c96acf223aa4ef89828e55337192116feb4d277b | [
"Unlicense"
] | null | null | null | examp_for_main.py | DedaLenya/test_stop_push | c96acf223aa4ef89828e55337192116feb4d277b | [
"Unlicense"
] | 1 | 2021-02-21T07:06:39.000Z | 2021-02-21T07:06:55.000Z | examp_for_main.py | DedaLenya/test_stop_push | c96acf223aa4ef89828e55337192116feb4d277b | [
"Unlicense"
] | null | null | null | print(345)
# изменения делает владелец в мейн, со снятой галочкой адм
def fibo(num_in_fibo, i=0, fibon=[]):
if i == num_in_fibo + 1:
return max(fibon)
if i > 1:
fibon.append(fibon[i - 1] + fibon[i - 2])
elif i == 1:
fibon.append(i)
else:
fibon.append(i)
i += 1
... | 20.611111 | 58 | 0.571429 |
7975d563c65a99c066572d78e1f0e4f550742d0d | 23,950 | py | Python | tests/keras/layers/wrappers_test.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 3 | 2020-11-13T10:00:32.000Z | 2020-11-23T10:33:29.000Z | tests/keras/layers/wrappers_test.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 1 | 2020-07-15T21:13:01.000Z | 2020-07-15T21:13:48.000Z | tests/keras/layers/wrappers_test.py | ikingye/keras | 1a3ee8441933fc007be6b2beb47af67998d50737 | [
"MIT"
] | 5 | 2020-10-29T09:56:06.000Z | 2021-02-07T10:40:54.000Z | import pytest
import numpy as np
import copy
from numpy.testing import assert_allclose
from keras.utils import CustomObjectScope
from keras.layers import wrappers, Input, Layer
from keras.layers import RNN
from keras import layers
from keras.models import Sequential, Model, model_from_json
from keras import backend as ... | 39.456343 | 84 | 0.628559 |
7975d698185ae8928e001d0e47db8e4b9409d44e | 1,030 | py | Python | notifications/level_starting.py | samuelcouch/the-blue-alliance | 8c7977071dbe9d9745ffdfbb03e37bd016792511 | [
"MIT"
] | null | null | null | notifications/level_starting.py | samuelcouch/the-blue-alliance | 8c7977071dbe9d9745ffdfbb03e37bd016792511 | [
"MIT"
] | null | null | null | notifications/level_starting.py | samuelcouch/the-blue-alliance | 8c7977071dbe9d9745ffdfbb03e37bd016792511 | [
"MIT"
] | null | null | null | import calendar
from consts.notification_type import NotificationType
from notifications.base_notification import BaseNotification
class CompLevelStartingNotification(BaseNotification):
def __init__(self, match, event):
self.match = match
self.event = event
self._event_feed = event.key_n... | 32.1875 | 100 | 0.676699 |
7975d6df8778802f19a3002553842673da60224b | 308 | py | Python | plot_gan_measures.py | drajwer/defensegan | df402360c7a0201b351a4a84af1f37fd47b6da9d | [
"MIT"
] | null | null | null | plot_gan_measures.py | drajwer/defensegan | df402360c7a0201b351a4a84af1f37fd47b6da9d | [
"MIT"
] | null | null | null | plot_gan_measures.py | drajwer/defensegan | df402360c7a0201b351a4a84af1f37fd47b6da9d | [
"MIT"
] | null | null | null | import glob
import os
from pathlib import Path
dir = os.path.join('results', 'train_and_measure_gan', '0_*.txt')
paths = sorted(glob.iglob(dir), key=os.path.getctime)
paths = [paths[-1]] + paths[:-1]
for filepath in paths:
with open(filepath) as f:
#print(filepath)
print(f.read()[:-1]) | 25.666667 | 65 | 0.659091 |
7975d734f226d6a9a1d0c65dee422265234235a3 | 1,422 | py | Python | setup.py | haysengithub/climate_indices | 057190526b083fdd867bcae24cf458305cec63d2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | haysengithub/climate_indices | 057190526b083fdd867bcae24cf458305cec63d2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | haysengithub/climate_indices | 057190526b083fdd867bcae24cf458305cec63d2 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(
name="climate_indices",
version="1.0.0",
url="https://github.com/monocongo/climate_indices",
license="Unlicense",
author="James Adams",
author_email="monocongo@gmail.com",
description=(
"Community reference implementations of climate index "
... | 29.625 | 72 | 0.588608 |
7975d8066002ea7f9da245df1ef00f7366d7039f | 938 | py | Python | My_first_game.py | prasenjitghose36/python_ptojects | 6c7629a55ebd77264651f1b0e12e7a26cab7a912 | [
"MIT"
] | 2 | 2020-10-24T07:27:27.000Z | 2020-11-26T17:50:52.000Z | My_first_game.py | prasenjitghose36/python_ptojects | 6c7629a55ebd77264651f1b0e12e7a26cab7a912 | [
"MIT"
] | null | null | null | My_first_game.py | prasenjitghose36/python_ptojects | 6c7629a55ebd77264651f1b0e12e7a26cab7a912 | [
"MIT"
] | null | null | null | from random import randint as randint
print("Hello Welcome to this rock, paper and scissors game")
print(".....Rock.....\n.....Paper.....\n.....Scissors.....\nBy Prasenjit Ghose")
print("BOOM ^_^")
player = input("Player Enter your choice: ").lower()
rand_num = randint(0,2)
if rand_num == 0:
computer == "ro... | 23.45 | 81 | 0.616205 |
7975d8835fc5a56840dcf2f91376db85a96de97a | 5,066 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_usages_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_usages_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_usages_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"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 may ... | 44.052174 | 134 | 0.648638 |
7975d8d76318250c46f27ea72e794d2a75a0cd34 | 2,671 | py | Python | examples/pruning/xgboost_integration.py | VladSkripniuk/optuna | 81d5b67a81ae14d606e6d6120ce50d02e90b0942 | [
"MIT"
] | 1 | 2020-11-08T17:03:12.000Z | 2020-11-08T17:03:12.000Z | examples/pruning/xgboost_integration.py | VladSkripniuk/optuna | 81d5b67a81ae14d606e6d6120ce50d02e90b0942 | [
"MIT"
] | 2 | 2020-02-13T01:05:40.000Z | 2020-03-12T08:19:02.000Z | examples/pruning/xgboost_integration.py | VladSkripniuk/optuna | 81d5b67a81ae14d606e6d6120ce50d02e90b0942 | [
"MIT"
] | 1 | 2020-12-25T03:27:26.000Z | 2020-12-25T03:27:26.000Z | """
Optuna example that demonstrates a pruner for XGBoost.
In this example, we optimize the validation accuracy of cancer detection using XGBoost.
We optimize both the choice of booster model and their hyperparameters. Throughout
training of models, a pruner observes intermediate results and stop unpromising trials.
... | 41.734375 | 99 | 0.69824 |
7975d98b3dc53b95c74d0cff0cda1e05dbb0c231 | 1,291 | py | Python | recipes/brigand/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/brigand/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/brigand/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | import os
from conans import ConanFile, tools
required_conan_version = ">=1.32.0"
class BrigandConan(ConanFile):
name = "brigand"
url = "https://github.com/conan-io/conan-center-index"
description = "A light-weight, fully functional, instant-compile time meta-programming library."
topics = ("meta-p... | 30.738095 | 100 | 0.664601 |
7975d9d261faf1c16a753d38ea8dc0075cd7f601 | 22,765 | py | Python | nematus/translate.py | cindyxinyiwang/nematus | 30fa0bd4524e9f8b2811b04e1c541e9745131ebb | [
"BSD-3-Clause"
] | null | null | null | nematus/translate.py | cindyxinyiwang/nematus | 30fa0bd4524e9f8b2811b04e1c541e9745131ebb | [
"BSD-3-Clause"
] | null | null | null | nematus/translate.py | cindyxinyiwang/nematus | 30fa0bd4524e9f8b2811b04e1c541e9745131ebb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Translates a source file using a translation model.
'''
import sys
import numpy
import json
import os
import logging
from multiprocessing import Process, Queue
from collections import defaultdict
from Queue import Empty
from util import load_dict, load_config, seqs2wo... | 38.389545 | 165 | 0.582385 |
7975da742ef20799439d3cb40cbd73573f78fc8a | 3,711 | py | Python | fcos_core/data/datasets/coco.py | qilei123/FCOS | 53d355456460a2a45830e3953508f41173ddb9bf | [
"BSD-2-Clause"
] | null | null | null | fcos_core/data/datasets/coco.py | qilei123/FCOS | 53d355456460a2a45830e3953508f41173ddb9bf | [
"BSD-2-Clause"
] | null | null | null | fcos_core/data/datasets/coco.py | qilei123/FCOS | 53d355456460a2a45830e3953508f41173ddb9bf | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
import torchvision
from fcos_core.structures.bounding_box import BoxList
from fcos_core.structures.segmentation_mask import SegmentationMask
from fcos_core.structures.keypoint import PersonKeypoints
min_keypoints_per_image ... | 36.382353 | 81 | 0.638911 |
7975da78f917c3f19d602ca7821239546279823a | 1,775 | py | Python | models_nonconvex_simple/ex1225.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 7 | 2019-05-08T19:14:34.000Z | 2021-12-24T00:00:40.000Z | models_nonconvex_simple/ex1225.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_nonconvex_simple/ex1225.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | 1 | 2019-05-10T18:34:18.000Z | 2019-05-10T18:34:18.000Z | # MINLP written by GAMS Convert at 08/13/20 17:37:43
#
# Equation counts
# Total E G L N X C B
# 11 3 0 8 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 32.272727 | 75 | 0.499155 |
7975da9884cdd8ea8e0977d625dc2b1344b6c383 | 9,493 | py | Python | src/.history/Test/HiwinRT605_test_20190617123729.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/Test/HiwinRT605_test_20190617123729.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | src/.history/Test/HiwinRT605_test_20190617123729.py | SamKaiYang/2019_Hiwin_Shaking | d599f8c87dc4da89eae266990d12eb3a8b0f3e16 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# license removed for brevity
#策略 機械手臂 四點來回跑
import rospy
import os
import numpy as np
from std_msgs.msg import String
from ROS_Socket.srv import *
from ROS_Socket.msg import *
import math
import enum
import Hiwin_RT605_ROS as strategy
pos_feedback_times = 0
mode_feedback_times = 0
msg_feedback ... | 30.622581 | 116 | 0.574107 |
7975dad2347cb0e9f0271d80cb45fc3d7bfce493 | 164 | py | Python | BI_eyes_django/eyes/forms.py | KameniAlexNea/ETL-Python | fd1220a0d22fdecd55c13e6ac33c39c7bab4043f | [
"MIT"
] | null | null | null | BI_eyes_django/eyes/forms.py | KameniAlexNea/ETL-Python | fd1220a0d22fdecd55c13e6ac33c39c7bab4043f | [
"MIT"
] | null | null | null | BI_eyes_django/eyes/forms.py | KameniAlexNea/ETL-Python | fd1220a0d22fdecd55c13e6ac33c39c7bab4043f | [
"MIT"
] | null | null | null | from django import forms
from .models import UploadFile
class UploadFileForm(forms.ModelForm):
class Meta:
model = UploadFile
fields = ['file'] | 23.428571 | 38 | 0.695122 |
7975dae2323adbc4a4c2edb57e0a6aa0befc1efb | 465 | py | Python | learn/migrations/0023_auto_20190504_0825.py | tnisarghu/djreact | 868b5f47d4fa7cb215173e6c186122e65b16c69c | [
"Apache-2.0"
] | null | null | null | learn/migrations/0023_auto_20190504_0825.py | tnisarghu/djreact | 868b5f47d4fa7cb215173e6c186122e65b16c69c | [
"Apache-2.0"
] | 3 | 2019-04-28T05:36:31.000Z | 2022-02-10T09:22:42.000Z | learn/migrations/0023_auto_20190504_0825.py | tnisarghu/djreact | 868b5f47d4fa7cb215173e6c186122e65b16c69c | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2 on 2019-05-04 02:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('learn', '0022_auto_20190504_0820'),
]
operations = [
migrations.AlterField(
model_name='learnname... | 23.25 | 99 | 0.636559 |
7975db6629ef7d733c502c982c8ff9e4c3768660 | 1,903 | py | Python | deeprl_p2/utils.py | ryanxjhan/AI-Space-Invader | 256365ca5e55af93fdf6db45d604d08aa4fad905 | [
"MIT"
] | null | null | null | deeprl_p2/utils.py | ryanxjhan/AI-Space-Invader | 256365ca5e55af93fdf6db45d604d08aa4fad905 | [
"MIT"
] | null | null | null | deeprl_p2/utils.py | ryanxjhan/AI-Space-Invader | 256365ca5e55af93fdf6db45d604d08aa4fad905 | [
"MIT"
] | null | null | null | """Common functions you may find useful in your implementation."""
import semver
import tensorflow as tf
from six.moves import cPickle
def get_uninitialized_variables(variables=None):
"""Return a list of uninitialized tf variables.
Parameters
----------
variables: tf.Variable, list(tf.Variable), opt... | 26.430556 | 73 | 0.659485 |
7975db8f45e99afe3f34edfc1d03a7315d65f46a | 3,899 | py | Python | chapter4/mst.py | lgabs/ClassicComputerScienceProblemsInPython | 505a52a3746dc2b11434f13e00e77a75bf53a182 | [
"MIT"
] | null | null | null | chapter4/mst.py | lgabs/ClassicComputerScienceProblemsInPython | 505a52a3746dc2b11434f13e00e77a75bf53a182 | [
"MIT"
] | null | null | null | chapter4/mst.py | lgabs/ClassicComputerScienceProblemsInPython | 505a52a3746dc2b11434f13e00e77a75bf53a182 | [
"MIT"
] | null | null | null | from typing import TypeVar, List, Optional
from weighted_graph import WeightedGraph
from weighted_edge import WeightedEdge
from priority_queue import PriorityQueue
V = TypeVar("V") # type of the vertices in the graph
WeightedPath = List[WeightedEdge] # type alias for paths
def total_weight(wp: WeightedPath) -> flo... | 38.99 | 78 | 0.666581 |
7975dbdae9d8dd0435220fac36459ea292504a94 | 17,164 | py | Python | experimental/train_deep_embedded.py | tgisaturday/Seq2CNN | 64cb24fba04c375f276621ed54cd67b7151c9797 | [
"Apache-2.0"
] | 21 | 2018-05-30T02:00:31.000Z | 2020-08-04T06:25:49.000Z | experimental/train_deep_embedded.py | tgisaturday/Seq2CNN | 64cb24fba04c375f276621ed54cd67b7151c9797 | [
"Apache-2.0"
] | 3 | 2018-07-12T13:32:17.000Z | 2020-02-20T07:00:38.000Z | experimental/train_deep_embedded.py | tgisaturday/Seq2CNN | 64cb24fba04c375f276621ed54cd67b7151c9797 | [
"Apache-2.0"
] | 3 | 2018-06-15T08:20:56.000Z | 2021-10-03T02:53:16.000Z | import os
import sys
import json
import time
import logging
import data_helper
import numpy as np
import tensorflow as tf
from model_deep_embedded import seq2CNN
from tensorflow.contrib import learn
from sklearn.model_selection import train_test_split
logging.getLogger().setLevel(logging.INFO)
def count_words(count... | 48.349296 | 187 | 0.632195 |
7975dd24472cd5bca03074ba29ae516a3d62eb4d | 422,299 | py | Python | nova/tests/virt/libvirt/test_driver.py | vasart/nova | bca5004d367e0418e35f8a72fe0f2e106e977ab0 | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_driver.py | vasart/nova | bca5004d367e0418e35f8a72fe0f2e106e977ab0 | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_driver.py | vasart/nova | bca5004d367e0418e35f8a72fe0f2e106e977ab0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# 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.... | 42.812145 | 79 | 0.579355 |
7975ddc55d308230b575b4075942900640d35f8e | 4,851 | py | Python | scrapy_selenium/middlewares.py | beckenkamp/scrapy-selenium | 463ab74fde5d350375975306c11000e14df6b8a2 | [
"WTFPL"
] | 1 | 2018-07-08T18:39:41.000Z | 2018-07-08T18:39:41.000Z | scrapy_selenium/middlewares.py | beckenkamp/scrapy-selenium | 463ab74fde5d350375975306c11000e14df6b8a2 | [
"WTFPL"
] | null | null | null | scrapy_selenium/middlewares.py | beckenkamp/scrapy-selenium | 463ab74fde5d350375975306c11000e14df6b8a2 | [
"WTFPL"
] | null | null | null | """This module contains the ``SeleniumMiddleware`` scrapy middleware"""
from importlib import import_module
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.http import HtmlResponse
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.proxy import Pr... | 34.404255 | 94 | 0.64832 |
7975de3c127988a078c1c9cbacffd76b4e6590ea | 687 | py | Python | collect/loveheart/redheart.py | richardmyu/PyDemo | f18a3fab43aa53292409ce03bcf0195f2d066eb0 | [
"MIT"
] | null | null | null | collect/loveheart/redheart.py | richardmyu/PyDemo | f18a3fab43aa53292409ce03bcf0195f2d066eb0 | [
"MIT"
] | null | null | null | collect/loveheart/redheart.py | richardmyu/PyDemo | f18a3fab43aa53292409ce03bcf0195f2d066eb0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
作者:李狗嗨
链接:https://www.zhihu.com/question/466165757/answer/1954034386
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
"""
import numpy as np
from skimage import measure
import matplotlib.pyplot as plt
def fun(x, y, z):
return (x ** 2 + (9 / 4) * y ** 2 + z ** 2 - 1) ** 3 - x ** 2 * z ** 3 - ... | 24.535714 | 102 | 0.604076 |
7975df5a9724e16d0d0a363bdc9f5c793dc5d306 | 910 | py | Python | test/test_alert_action_payload.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | test/test_alert_action_payload.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | test/test_alert_action_payload.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | 1 | 2020-11-07T11:27:13.000Z | 2020-11-07T11:27:13.000Z | # coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import opsgenie_swagger
from opsgenie_swagger.models.aler... | 22.195122 | 97 | 0.716484 |
7975dfae8c7d0be430194638b4f33160f41fcad1 | 309 | py | Python | .history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107191643.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107191643.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107191643.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | """ Opening and Reading Files
Syntax to open file.
f = open("Myfile.txt) # assigned to the variable f.
f = open("Myfile.txt","rt") # if in the same directory.
f = open("c:\\MyFolders\Myfile.txt") # if hot in the same directory.
"""
f = open("quotes.txt")
print(f.readable)
| 19.3125 | 69 | 0.598706 |
7975e01c367438316560e318b3596a5ba7ca0fef | 599 | py | Python | backend/tests/test_clientes.py | rafaelgarrafiel/fullstack-challenge | a88ebe8a40755be7521e41d805e4ad405f59c3f6 | [
"Apache-2.0"
] | null | null | null | backend/tests/test_clientes.py | rafaelgarrafiel/fullstack-challenge | a88ebe8a40755be7521e41d805e4ad405f59c3f6 | [
"Apache-2.0"
] | null | null | null | backend/tests/test_clientes.py | rafaelgarrafiel/fullstack-challenge | a88ebe8a40755be7521e41d805e4ad405f59c3f6 | [
"Apache-2.0"
] | null | null | null | import requests
def test_show_clients(app):
response = requests.get("http://localhost:5000/clientes")
assert response.status_code == 200
def test_show_clients_json(app):
response = requests.get("http://localhost:5000/clientes")
assert response.headers["Content-Type"] == "application/json"
def test_get... | 35.235294 | 65 | 0.734558 |
7975e0483deee540e23250d20e3153807cda4bf9 | 1,749 | py | Python | mlcycle/client.py | cemizm/mlcycle-pyclient | 2494d6eb5b841049e05163edec560627ffe5a197 | [
"MIT"
] | null | null | null | mlcycle/client.py | cemizm/mlcycle-pyclient | 2494d6eb5b841049e05163edec560627ffe5a197 | [
"MIT"
] | null | null | null | mlcycle/client.py | cemizm/mlcycle-pyclient | 2494d6eb5b841049e05163edec560627ffe5a197 | [
"MIT"
] | null | null | null | import requests
import os
from .environment import Environment
from .worker import WorkerCollection
from .project import ProjectCollection
from .job import JobCollection
from .scheduler import Scheduler
from .fragment import FragmentCollection
requests.packages.urllib3.disable_warnings()
def from_env():
"""loa... | 24.291667 | 81 | 0.706118 |
7975e06c449cfa8307bdadca3a326f0f1cd4517e | 12,363 | py | Python | demo/demo_0.py | Zhou1993napolun/Pose_enabler | 669fffd6cea57fec5fa9bd95868cc48347700f42 | [
"MIT"
] | null | null | null | demo/demo_0.py | Zhou1993napolun/Pose_enabler | 669fffd6cea57fec5fa9bd95868cc48347700f42 | [
"MIT"
] | null | null | null | demo/demo_0.py | Zhou1993napolun/Pose_enabler | 669fffd6cea57fec5fa9bd95868cc48347700f42 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import csv
import os
import shutil
from PIL import Image
import torch
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torch.utils... | 35.525862 | 128 | 0.601877 |
7975e1a5d217ec61d1403389454e8fe4e2ec2e45 | 1,283 | py | Python | moviepicker/main.py | mesbah-uddin/pymaze | 528239af258a980d2b527f0433c88827f503fc86 | [
"MIT"
] | null | null | null | moviepicker/main.py | mesbah-uddin/pymaze | 528239af258a980d2b527f0433c88827f503fc86 | [
"MIT"
] | null | null | null | moviepicker/main.py | mesbah-uddin/pymaze | 528239af258a980d2b527f0433c88827f503fc86 | [
"MIT"
] | null | null | null | import random
import requests
from bs4 import BeautifulSoup
# crawl IMDB Top 250 and randomly select a movie
URL = 'http://www.imdb.com/chart/top'
def main():
response = requests.get(URL)
soup = BeautifulSoup(response.text, 'html.parser')
#soup = BeautifulSoup(response.text, 'lxml') # faster
# prin... | 27.891304 | 102 | 0.643804 |
7975e1ce75a814ff5674c3db9e8fae63bcc31cb0 | 3,130 | py | Python | Desafios/Mundo 3/ex073.py | lucasllimati/CursoEmVideo | 01d75626baf8b82f141d62f681e55a9bda0099fd | [
"MIT"
] | null | null | null | Desafios/Mundo 3/ex073.py | lucasllimati/CursoEmVideo | 01d75626baf8b82f141d62f681e55a9bda0099fd | [
"MIT"
] | null | null | null | Desafios/Mundo 3/ex073.py | lucasllimati/CursoEmVideo | 01d75626baf8b82f141d62f681e55a9bda0099fd | [
"MIT"
] | null | null | null | # 73
# Crie uma tupla preenchida com os 20 primeiros colocados da Tabela do Campeonato Brasileiro de Futebol, na ordem de colocação. Depois mostre: a) Os 5 primeiros times. b) Os últimos 4 colocados. c) Times em ordem alfabética. d) Em que posição está o time da Chapecoense.
times = ('Corinthians', 'Palmeiras', 'Santo... | 39.125 | 270 | 0.515016 |
7975e220acba8cff34a67edeb0894d488bd65964 | 8,832 | py | Python | homeassistant/components/auth/login_flow.py | DoctorU/core | 5b218d7e1c4164e32d41473977459cbaf23adf42 | [
"Apache-2.0"
] | 1 | 2021-07-30T21:22:44.000Z | 2021-07-30T21:22:44.000Z | homeassistant/components/auth/login_flow.py | DoctorU/core | 5b218d7e1c4164e32d41473977459cbaf23adf42 | [
"Apache-2.0"
] | 71 | 2020-10-15T06:45:08.000Z | 2022-03-31T06:02:54.000Z | homeassistant/components/auth/login_flow.py | DoctorU/core | 5b218d7e1c4164e32d41473977459cbaf23adf42 | [
"Apache-2.0"
] | 2 | 2020-09-09T05:01:51.000Z | 2020-09-09T05:46:12.000Z | """HTTP views handle login flow.
# GET /auth/providers
Return a list of auth providers. Example:
[
{
"name": "Local",
"id": null,
"type": "local_provider",
}
]
# POST /auth/login_flow
Create a login flow. Will return the first step of the flow.
Pass in parameter 'client_id' and 'r... | 32.470588 | 87 | 0.637228 |
7975e27b1d5f5d5e9f2bb3a99d076d728842835f | 2,826 | py | Python | test_project/test_historycounts.py | futurice/django-history | 8b618c331d50aa821182fed16090792993a1096b | [
"BSD-3-Clause"
] | 4 | 2015-06-09T01:41:43.000Z | 2019-06-02T03:34:42.000Z | test_project/test_historycounts.py | futurice/django-history | 8b618c331d50aa821182fed16090792993a1096b | [
"BSD-3-Clause"
] | 3 | 2015-07-14T12:21:05.000Z | 2020-06-05T16:59:09.000Z | test_project/test_historycounts.py | futurice/django-history | 8b618c331d50aa821182fed16090792993a1096b | [
"BSD-3-Clause"
] | 2 | 2015-07-03T14:07:23.000Z | 2015-10-20T09:48:16.000Z | from test_project.tests import *
class HistoryCountTest(BaseSuite):
def test_delete_no_rels(self):
a = Article.objects.create(headline='Once upon a time')
a.delete()
self.assertEqual(history_count(),
len(['a.create', 'a.delete']))
def test_delete_rels(self):
a =... | 35.325 | 68 | 0.469922 |
7975e36a898f5a569e0afc67e58a78d671758cb2 | 246 | py | Python | mt/common/misc.py | Summer-2077/nlp-machine_translation | 1c69657badb21ef4672c18c712264dac79766703 | [
"Apache-2.0"
] | 2 | 2021-04-05T05:57:24.000Z | 2021-12-13T14:28:45.000Z | mt/common/misc.py | Summer-2077/nlp-machine_translation | 1c69657badb21ef4672c18c712264dac79766703 | [
"Apache-2.0"
] | null | null | null | mt/common/misc.py | Summer-2077/nlp-machine_translation | 1c69657badb21ef4672c18c712264dac79766703 | [
"Apache-2.0"
] | null | null | null | import os
from pathlib import Path
def check_and_create(checkpoint_dir):
chkpt_path = Path(checkpoint_dir)
if not chkpt_path.exists():
os.makedirs(checkpoint_dir, exist_ok=True)
return False
else:
return True | 22.363636 | 50 | 0.699187 |
7975e5a3fbc2492a71c6366673e0dd69a69fdea9 | 2,558 | py | Python | tests/test_09_examples_scope.py | barraponto/pytest-dependency | cab2f65ced816939a9041b9e67169073ef0ee412 | [
"Apache-2.0"
] | null | null | null | tests/test_09_examples_scope.py | barraponto/pytest-dependency | cab2f65ced816939a9041b9e67169073ef0ee412 | [
"Apache-2.0"
] | null | null | null | tests/test_09_examples_scope.py | barraponto/pytest-dependency | cab2f65ced816939a9041b9e67169073ef0ee412 | [
"Apache-2.0"
] | 2 | 2022-03-30T20:40:48.000Z | 2022-03-31T13:24:32.000Z | """Test the included examples.
"""
from pathlib import Path
import pytest
from conftest import get_example
def test_scope_module(ctestdir):
"""Explicitly specifying the scope
"""
with get_example("scope_module.py").open("rt") as f:
ctestdir.makepyfile(f.read())
result = ctestdir.runpytest("--... | 34.567568 | 72 | 0.607506 |
7975e6c1638b2c5f38c1f53579e1fa28c3622464 | 3,362 | py | Python | opencensus/stats/view_data.py | wkiser/opencensus-python | d328d17f48bb71d8ba13a2f6058eb39964377966 | [
"Apache-2.0"
] | null | null | null | opencensus/stats/view_data.py | wkiser/opencensus-python | d328d17f48bb71d8ba13a2f6058eb39964377966 | [
"Apache-2.0"
] | 1 | 2018-04-08T18:01:16.000Z | 2018-04-08T18:01:16.000Z | opencensus/stats/view_data.py | kcooperstein/opencensus-python | d7aab849b263b329dd264dda274b582d2e365634 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 32.019048 | 75 | 0.622546 |
7975e6ded96cbff412859e0ee6911a99c1fb9e98 | 16,558 | py | Python | cellwars.py | mfontanini/cellwars-python | bf378288392874e7e4abe2d0621ef5a9fa3d6db9 | [
"MIT"
] | null | null | null | cellwars.py | mfontanini/cellwars-python | bf378288392874e7e4abe2d0621ef5a9fa3d6db9 | [
"MIT"
] | null | null | null | cellwars.py | mfontanini/cellwars-python | bf378288392874e7e4abe2d0621ef5a9fa3d6db9 | [
"MIT"
] | null | null | null | '''
cellwars.py
===========
The cellwars python bot package.
'''
from enum import Enum
import sys
# Internal classes start here
class InputProcessingException(Exception):
pass
class CommandType(Enum):
INITIALIZE = 0
SPAWN = 1
DIE = 2
SET_CELL_PROPERTIES = 3
CONFLICTING_ACTIONS = 4
RUN_RO... | 30.891791 | 94 | 0.620244 |
7975e8847833d503acfbf921cb5912ab363c2aea | 3,023 | py | Python | diana/toolbox/parse_genecards.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | 3 | 2019-07-11T05:32:13.000Z | 2021-03-12T01:10:21.000Z | diana/toolbox/parse_genecards.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | null | null | null | diana/toolbox/parse_genecards.py | quimaguirre/diana | 930da0ea91ad87e354061af18db6c437a3318366 | [
"MIT"
] | null | null | null | import urllib
import urllib2
from bs4 import BeautifulSoup
from diseasome.src import diseasome
#!
#! Potential bug in fetching gene info from genecards, not all genes are parsed
#!
def main():
base_dir = "/home/emre/data/disease/genecards"
file_name = base_dir + "/download.html"
out_file = base_dir + "/di... | 31.489583 | 79 | 0.64307 |
7975e89d7bb24da32f525c307259398f1ea60960 | 20,434 | py | Python | Instruments/RGA100.py | AndrewOriani/Rodin-MASTER | 45a437b75671bbc9f143da28bd874a064ce12b64 | [
"BSD-3-Clause"
] | null | null | null | Instruments/RGA100.py | AndrewOriani/Rodin-MASTER | 45a437b75671bbc9f143da28bd874a064ce12b64 | [
"BSD-3-Clause"
] | null | null | null | Instruments/RGA100.py | AndrewOriani/Rodin-MASTER | 45a437b75671bbc9f143da28bd874a064ce12b64 | [
"BSD-3-Clause"
] | null | null | null | """
Author: Andrew Oriani
May 2019
This is a driver for the Stanford Research Systems RGA100 residual gas analyzer
UPDATE: 11/2020
Parallel and async functionality added using threading to allow background updating and operation. locks seperate function calls
to the serial handler of the RGA. Would caution it's use ... | 37.701107 | 136 | 0.543848 |
7975e8e080fa16bf05e44eae712a43ff35d9b24b | 18,458 | py | Python | popparsing/_version.py | PhasesResearchLab/popparsing | d6f15f105afed7e912a83482f87350d4fc05c66b | [
"MIT"
] | null | null | null | popparsing/_version.py | PhasesResearchLab/popparsing | d6f15f105afed7e912a83482f87350d4fc05c66b | [
"MIT"
] | null | null | null | popparsing/_version.py | PhasesResearchLab/popparsing | d6f15f105afed7e912a83482f87350d4fc05c66b | [
"MIT"
] | 1 | 2018-02-28T23:44:27.000Z | 2018-02-28T23:44:27.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.428023 | 79 | 0.584679 |
7975e948246d314ad4e44a0cbe45fccdde227518 | 7,130 | py | Python | depot/middleware.py | tcmike/depot | f2999ab18f8bf3f5e6f0c3c3b058b9bd8d936d65 | [
"MIT"
] | 128 | 2015-02-18T05:53:25.000Z | 2022-03-02T10:23:27.000Z | depot/middleware.py | tcmike/depot | f2999ab18f8bf3f5e6f0c3c3b058b9bd8d936d65 | [
"MIT"
] | 68 | 2015-03-19T17:04:24.000Z | 2022-01-13T19:38:34.000Z | depot/middleware.py | tcmike/depot | f2999ab18f8bf3f5e6f0c3c3b058b9bd8d936d65 | [
"MIT"
] | 42 | 2015-04-24T15:05:42.000Z | 2022-01-13T18:23:17.000Z | from datetime import datetime
from email.utils import parsedate_tz, mktime_tz
from time import gmtime, time
from .manager import DepotManager
from ._compat import wsgi_string
from .utils import make_content_disposition
_BLOCK_SIZE = 4096 * 64 # 256K
class _FileIter(object):
def __init__(self, file, block_size):
... | 33.791469 | 92 | 0.612763 |
7975e94e91d8b67eb5d4720ba1ecf58153d9ec34 | 25,679 | py | Python | jedi/api.py | vishen/SublimeJEDI | e77709bff3b48b11b57e80857565bb36dfd660bb | [
"MIT"
] | 1 | 2016-09-20T20:50:53.000Z | 2016-09-20T20:50:53.000Z | jedi/api.py | vishen/SublimeJEDI | e77709bff3b48b11b57e80857565bb36dfd660bb | [
"MIT"
] | null | null | null | jedi/api.py | vishen/SublimeJEDI | e77709bff3b48b11b57e80857565bb36dfd660bb | [
"MIT"
] | null | null | null | """
The API basically only provides one class. You can create a :class:`Script` and
use its methods.
Additionally you can add a debug function with :func:`set_debug_function` and
catch :exc:`NotFoundError` which is being raised if your completion is not
possible.
"""
from __future__ import with_statement
import re
im... | 37.269956 | 81 | 0.581292 |
7975e9e7ef4fc6dd9308797457cf0aa956742c4a | 1,976 | py | Python | scripts/ssc/pairings_visualization/wcpairings_comparison3.py | MrBellamonte/MT-VAEs-TDA | 8881b5db607c673fb558f7b74ece27f244b16b77 | [
"MIT"
] | null | null | null | scripts/ssc/pairings_visualization/wcpairings_comparison3.py | MrBellamonte/MT-VAEs-TDA | 8881b5db607c673fb558f7b74ece27f244b16b77 | [
"MIT"
] | 1 | 2020-09-22T13:04:58.000Z | 2020-09-22T13:05:23.000Z | scripts/ssc/pairings_visualization/wcpairings_comparison3.py | MrBellamonte/AEs-VAEs-TDA | 8881b5db607c673fb558f7b74ece27f244b16b77 | [
"MIT"
] | null | null | null | import random
import torch
import numpy as np
from scripts.ssc.persistence_pairings_visualization.utils_definitions import make_plot
from src.datasets.datasets import SwissRoll
from src.topology.witness_complex import WitnessComplex
if __name__ == "__main__":
dataset_sampler = SwissRoll()
N_WITNESSES = 2048... | 32.393443 | 129 | 0.624494 |
7975ea0ef5e17d01b1e1f2c01982d22a32a52074 | 5,254 | py | Python | Lib/test/test_code.py | KinkowanWinter/Transcendental-Number-Utilization | 5f6d1d32850ad2cd2d03cc6f796d32ba7876fc39 | [
"PSF-2.0"
] | 27 | 2017-04-21T14:57:04.000Z | 2021-11-03T22:10:38.000Z | Lib/test/test_code.py | KinkowanWinter/Transcendental-Number-Utilization | 5f6d1d32850ad2cd2d03cc6f796d32ba7876fc39 | [
"PSF-2.0"
] | 5 | 2021-12-14T20:56:36.000Z | 2021-12-20T14:45:34.000Z | Lib/test/test_code.py | KinkowanWinter/Transcendental-Number-Utilization | 5f6d1d32850ad2cd2d03cc6f796d32ba7876fc39 | [
"PSF-2.0"
] | 11 | 2015-01-12T14:50:00.000Z | 2021-08-18T00:48:02.000Z | """This module includes tests of the code object representation.
>>> def f(x):
... def g(y):
... return x + y
... return g
...
>>> dump(f.__code__)
name: f
argcount: 1
kwonlyargcount: 0
names: ()
varnames: ('x', 'g')
cellvars: ('x',)
freevars: ()
nlocals: 2
flags: 3
consts: ('None', '<code object g>',... | 23.560538 | 80 | 0.604301 |
7975ea8c1ce70d08d45091f8ad06a120134a1881 | 164 | py | Python | debug.py | ploufinou/jsanalyzer | 32055a048eac05ac60cb055b57bd1758aa935e62 | [
"WTFPL"
] | 1 | 2021-12-03T16:24:33.000Z | 2021-12-03T16:24:33.000Z | debug.py | ploufinou/jsanalyzer | 32055a048eac05ac60cb055b57bd1758aa935e62 | [
"WTFPL"
] | null | null | null | debug.py | ploufinou/jsanalyzer | 32055a048eac05ac60cb055b57bd1758aa935e62 | [
"WTFPL"
] | null | null | null |
debug_flag = False
def set_debug(flag):
global debug_flag
debug_flag = flag
def debug(*args, **kwargs):
if debug_flag:
print(*args, **kwargs)
| 16.4 | 30 | 0.646341 |
7975eaf036d7a243dcf4b59e684af405c124394b | 5,900 | py | Python | AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-13T00:01:12.000Z | 2021-09-13T00:01:12.000Z | AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | # coding=utf-8
"""
Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# Test case ID : C5932043
# Test Case Title : Check that force region exerts simple drag force ... | 40.410959 | 155 | 0.687458 |
7975eb2340cb9521cb87261721c689ea5122cd60 | 7,315 | py | Python | pyade/ilshade.py | Dvermetten/DE_TIOBR | b26d0624773d19e178c0eb33350d42356626e10c | [
"BSD-3-Clause"
] | null | null | null | pyade/ilshade.py | Dvermetten/DE_TIOBR | b26d0624773d19e178c0eb33350d42356626e10c | [
"BSD-3-Clause"
] | null | null | null | pyade/ilshade.py | Dvermetten/DE_TIOBR | b26d0624773d19e178c0eb33350d42356626e10c | [
"BSD-3-Clause"
] | null | null | null | import pyade.commons
import numpy as np
import scipy.stats
import random
from typing import Callable, Union, Dict, Any
class ilshade():
def get_default_params(dim: int):
"""
Returns the default parameters of the iL-SHADE Differential Evolution Algorithm
:param dim: Size of the probl... | 42.04023 | 130 | 0.572112 |
7975ec171d8fc1f94f0bf45931438a0561b4f245 | 24,633 | py | Python | Texas/run_functions.py | ka-chang/dssg2021-redistricting | 5b535b464b7a6e9dccdbf63b2c0fc01b9c3b25a2 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T06:22:10.000Z | 2021-07-15T06:22:10.000Z | Texas/run_functions.py | ka-chang/dssg2021-redistricting | 5b535b464b7a6e9dccdbf63b2c0fc01b9c3b25a2 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T22:47:02.000Z | 2021-07-15T22:47:02.000Z | Texas/run_functions.py | ka-chang/dssg2021-redistricting | 5b535b464b7a6e9dccdbf63b2c0fc01b9c3b25a2 | [
"BSD-3-Clause"
] | 3 | 2021-07-16T00:20:30.000Z | 2021-07-21T00:18:28.000Z | # -*- coding: utf-8 -*-
"""
copied from MGGG VRA Analysis Code - https://github.com/mggg/VRA_ensembles/tree/master/TX
Created on Tue Jul 28 15:50:57 2020
@author: darac
"""
import random
import networkx as nx
import csv
import os
import shutil
from functools import partial
import json
import math
import numpy as np
im... | 61.89196 | 285 | 0.688426 |
7975ec9468e76ff8021ce40adced5ad8ccd41b8e | 2,288 | py | Python | samples/use_nasdaq_client.py | areed1192/finance-news-aggregator | 6d66f44292565cf4ccfeab0983fce1dab90fd1ae | [
"MIT"
] | 49 | 2020-07-19T17:53:41.000Z | 2022-03-27T10:36:36.000Z | samples/use_nasdaq_client.py | webclinic017/finance-news-aggregator | 6d66f44292565cf4ccfeab0983fce1dab90fd1ae | [
"MIT"
] | 1 | 2021-09-12T15:06:29.000Z | 2021-09-12T15:06:29.000Z | samples/use_nasdaq_client.py | webclinic017/finance-news-aggregator | 6d66f44292565cf4ccfeab0983fce1dab90fd1ae | [
"MIT"
] | 18 | 2020-08-06T07:39:17.000Z | 2022-01-16T14:59:28.000Z | from pprint import pprint
from finnews.client import News
# Create a new instance of the News Client.
news_client = News()
# Grab the NASDAQ News Client.
nasdaq_news_client = news_client.nasdaq
# Grab the original content news.
content = nasdaq_news_client.original_content()
pprint(content)
# Grab the Commodity ne... | 23.346939 | 62 | 0.798951 |
7975ec9b9177ce06d6f47fd57b5ca32c63601611 | 5,711 | py | Python | RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py | sharmaaash/cmssw | 8247f9a13f239fdd9884982c3550a3f1c8ea31c5 | [
"Apache-2.0"
] | 13 | 2015-11-30T15:49:45.000Z | 2022-02-08T16:11:30.000Z | RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py | sharmaaash/cmssw | 8247f9a13f239fdd9884982c3550a3f1c8ea31c5 | [
"Apache-2.0"
] | 640 | 2015-02-11T18:55:47.000Z | 2022-03-31T14:12:23.000Z | RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py | sharmaaash/cmssw | 8247f9a13f239fdd9884982c3550a3f1c8ea31c5 | [
"Apache-2.0"
] | 51 | 2015-08-11T21:01:40.000Z | 2022-03-30T07:31:34.000Z | import FWCore.ParameterSet.Config as cms
from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import *
from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import *
dEdX = cms.PSet(
# for v10 geometry
weights = cms.vdouble(0.0, # there is no layer zero
8.894541, # MeV
... | 41.992647 | 134 | 0.553318 |
7975ed4c8765622cff6005ff157762ba030b4f93 | 4,127 | py | Python | plugins/commands.py | AlphaEliasPY/VC-Bot- | 088f8efcb70dab24f32349dcc52557786905382a | [
"MIT"
] | null | null | null | plugins/commands.py | AlphaEliasPY/VC-Bot- | 088f8efcb70dab24f32349dcc52557786905382a | [
"MIT"
] | null | null | null | plugins/commands.py | AlphaEliasPY/VC-Bot- | 088f8efcb70dab24f32349dcc52557786905382a | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 UltronRoBo
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, di... | 38.570093 | 254 | 0.698328 |
7975ee19dd861e4f3ececeb008a87f906bdfc6eb | 9,512 | py | Python | nova/tests/unit/policies/test_services.py | hemanthnakkina/nova | 3756f4ffa6ff670bfd6b491a12b833da0a36b017 | [
"Apache-2.0"
] | 1 | 2021-06-10T17:08:14.000Z | 2021-06-10T17:08:14.000Z | nova/tests/unit/policies/test_services.py | hemanthnakkina/nova | 3756f4ffa6ff670bfd6b491a12b833da0a36b017 | [
"Apache-2.0"
] | 1 | 2021-02-16T10:17:26.000Z | 2021-02-17T17:44:15.000Z | nova/tests/unit/policies/test_services.py | hemanthnakkina/nova | 3756f4ffa6ff670bfd6b491a12b833da0a36b017 | [
"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
# d... | 47.089109 | 78 | 0.668944 |
7975ef190baeb17170cb05385615a5b153189a13 | 1,509 | py | Python | tests/st/ops/ascend/test_tbe_ops/test_ReduceMean.py | unseenme/mindspore | 4ba052f0cd9146ac0ccc4880a778706f1b2d0af8 | [
"Apache-2.0"
] | 2 | 2020-04-28T03:49:10.000Z | 2020-04-28T03:49:13.000Z | tests/st/ops/davinci/test_tbe_ops/test_ReduceMean.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 7 | 2020-03-30T08:31:56.000Z | 2020-04-01T09:54:39.000Z | tests/st/ops/davinci/test_tbe_ops/test_ReduceMean.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-03-30T17:07:43.000Z | 2020-03-30T17:07:43.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 35.093023 | 78 | 0.707753 |
7975f105538f4a6c0129576f799068b9ce8f958f | 1,120 | py | Python | _old/tf2/1 basic_tf2/course_3/4.2 fashion_class.py | Jintao-Huang/torch_study | d3a1b25dad1f7906ab16863d387bc370d18be0b6 | [
"MIT"
] | 4 | 2020-05-13T13:41:58.000Z | 2020-06-02T08:51:52.000Z | _old/tf2/1 basic_tf2/course_3/4.2 fashion_class.py | Jintao-Huang/torch_study | d3a1b25dad1f7906ab16863d387bc370d18be0b6 | [
"MIT"
] | null | null | null | _old/tf2/1 basic_tf2/course_3/4.2 fashion_class.py | Jintao-Huang/torch_study | d3a1b25dad1f7906ab16863d387bc370d18be0b6 | [
"MIT"
] | 1 | 2021-08-10T09:12:51.000Z | 2021-08-10T09:12:51.000Z | # Author: Jintao Huang
# Email: hjt_study@qq.com
# Date:
import tensorflow as tf
from tensorflow.keras.layers import Dense, Flatten
from tensorflow.keras import Model
# 控制显存自动增长
gpus = tf.config.list_physical_devices('GPU') # 必须大写
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
fashion = ... | 26.666667 | 105 | 0.683929 |
7975f151f7128228ddf4ab2a2af531021c7fb55b | 4,160 | py | Python | Marlin/src/HAL/LPC1768/upload_extra_script.py | tom-2273/Tronxy_SKR_mini_E3_V20 | bc4a8dc2c6c627e4bd7aa423794246f5b051448d | [
"CC0-1.0"
] | null | null | null | Marlin/src/HAL/LPC1768/upload_extra_script.py | tom-2273/Tronxy_SKR_mini_E3_V20 | bc4a8dc2c6c627e4bd7aa423794246f5b051448d | [
"CC0-1.0"
] | null | null | null | Marlin/src/HAL/LPC1768/upload_extra_script.py | tom-2273/Tronxy_SKR_mini_E3_V20 | bc4a8dc2c6c627e4bd7aa423794246f5b051448d | [
"CC0-1.0"
] | null | null | null | #
# upload_extra_script.py
# set the output_port
# if target_filename is found then that drive is used
# else if target_drive is found then that drive is used
#
from __future__ import print_function
import pioutil
if pioutil.is_pio_build():
target_filename = "FIRMWARE.CUR"
target_drive = "REARM"
import os,getpa... | 32.5 | 114 | 0.671394 |
7975f1b27ded02821a64dd13c13ff9d9bc87e00e | 4,230 | py | Python | crichtonweb/system/admin.py | bpluly/crichton | a2fa09c181ba1e44ee1aae7a57769e1778de7f3a | [
"Apache-2.0"
] | null | null | null | crichtonweb/system/admin.py | bpluly/crichton | a2fa09c181ba1e44ee1aae7a57769e1778de7f3a | [
"Apache-2.0"
] | null | null | null | crichtonweb/system/admin.py | bpluly/crichton | a2fa09c181ba1e44ee1aae7a57769e1778de7f3a | [
"Apache-2.0"
] | null | null | null | # Crichton, Admirable Source Configuration Management
# Copyright 2012 British Broadcasting Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | 38.108108 | 117 | 0.722931 |
7975f24fba0010e007fc1a486fe08f2cd9111ed2 | 16,542 | py | Python | scripts/plane_from_db.py | karaage-pp/karaage_db | f818cfbc6cea3e4efaca42ed50b3b8d56ee055b9 | [
"MIT"
] | null | null | null | scripts/plane_from_db.py | karaage-pp/karaage_db | f818cfbc6cea3e4efaca42ed50b3b8d56ee055b9 | [
"MIT"
] | null | null | null | scripts/plane_from_db.py | karaage-pp/karaage_db | f818cfbc6cea3e4efaca42ed50b3b8d56ee055b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import numpy as np
import pandas as pd
from db_interface import DataBase
from tf_utils import Tf as TF
import rosparam
import rospy
DIS = 0.05
# visualization
import roslib; roslib.load_manifest('visualization_marker_tutorials')
from visualization_msgs.msg impor... | 34.177686 | 160 | 0.578527 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.