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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7984a6b0b05655a509571197837b22bb77eb8e92 | 4,026 | py | Python | pyutils/data_wrangler/explore.py | Nishant173/pyutils | f9a369b227b3f87d44cafa2a00696462cdc0cc37 | [
"MIT"
] | null | null | null | pyutils/data_wrangler/explore.py | Nishant173/pyutils | f9a369b227b3f87d44cafa2a00696462cdc0cc37 | [
"MIT"
] | null | null | null | pyutils/data_wrangler/explore.py | Nishant173/pyutils | f9a369b227b3f87d44cafa2a00696462cdc0cc37 | [
"MIT"
] | null | null | null | from typing import Dict, List, Optional, Union
import pandas as pd
from pyutils.core.exceptions import InvalidDataFrameError
from pyutils.core.type_annotations import NumberOrString
def is_dataframe_full(data: pd.DataFrame) -> bool:
"""Returns True if there are no missing values in a non-empty DataFrame"""
... | 39.470588 | 137 | 0.711128 |
7984a815e6164e2afc530cb2e8575c3208e73607 | 23,017 | py | Python | tests/test_blueprints.py | fphonor/flask | d8bf589d4835ab03daee3101a91c80ee648e72b6 | [
"BSD-3-Clause"
] | 3 | 2019-11-02T01:32:09.000Z | 2021-08-12T19:48:56.000Z | tests/test_blueprints.py | fphonor/flask | d8bf589d4835ab03daee3101a91c80ee648e72b6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_blueprints.py | fphonor/flask | d8bf589d4835ab03daee3101a91c80ee648e72b6 | [
"BSD-3-Clause"
] | 1 | 2020-10-09T17:54:14.000Z | 2020-10-09T17:54:14.000Z | # -*- coding: utf-8 -*-
"""
tests.blueprints
~~~~~~~~~~~~~~~~
Blueprints (and currently modules)
:copyright: © 2010 by the Pallets team.
:license: BSD, see LICENSE for more details.
"""
import pytest
import flask
from flask._compat import text_type
from werkzeug.http import parse_cache_control_... | 27.303677 | 93 | 0.655646 |
7984a8d228f19a3abdbec7971215bdbee8945a6a | 38 | py | Python | colicoords/minimizers.py | azagajewski/ColiCoords | fa26e46971e24ff582c4d33331c5b8181f605c9f | [
"MIT"
] | 18 | 2018-09-11T01:14:31.000Z | 2021-12-27T10:21:59.000Z | colicoords/minimizers.py | azagajewski/ColiCoords | fa26e46971e24ff582c4d33331c5b8181f605c9f | [
"MIT"
] | 77 | 2018-09-19T09:28:33.000Z | 2021-11-12T13:31:50.000Z | colicoords/minimizers.py | azagajewski/ColiCoords | fa26e46971e24ff582c4d33331c5b8181f605c9f | [
"MIT"
] | 8 | 2019-06-17T16:02:32.000Z | 2021-06-30T23:31:17.000Z | from symfit.core.minimizers import *
| 19 | 37 | 0.789474 |
7984aa08979173c6e2e284dd6a7ca4af1bb8f3c2 | 4,626 | py | Python | pygazebo/msg/log_playback_control_pb2.py | CryptoCopter/pygazebo | f16704f3b59cb50a1390ef92fde283558fd71f8f | [
"Apache-2.0"
] | null | null | null | pygazebo/msg/log_playback_control_pb2.py | CryptoCopter/pygazebo | f16704f3b59cb50a1390ef92fde283558fd71f8f | [
"Apache-2.0"
] | null | null | null | pygazebo/msg/log_playback_control_pb2.py | CryptoCopter/pygazebo | f16704f3b59cb50a1390ef92fde283558fd71f8f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: log_playback_control.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from g... | 42.440367 | 375 | 0.765672 |
7984abaa546e5194a0b04e50ffa793ac1291f3cf | 1,806 | py | Python | bin/reset_all_sequences.py | Bauble/bauble.api | 183c97fda076ea870e21e70ecf89a2a94a7f5722 | [
"BSD-3-Clause"
] | null | null | null | bin/reset_all_sequences.py | Bauble/bauble.api | 183c97fda076ea870e21e70ecf89a2a94a7f5722 | [
"BSD-3-Clause"
] | 1 | 2015-02-05T13:15:00.000Z | 2015-02-05T13:15:00.000Z | bin/reset_all_sequences.py | Bauble/bauble.api | 183c97fda076ea870e21e70ecf89a2a94a7f5722 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import operator as op
import os
import psycopg2
import sqlalchemy as sa
db_url = os.environ.get('BAUBLE_DB_URL')
if db_url is None:
print("** Error: BAUBLE_DB_URL is not defined")
exit(1)
from bauble.model import Model
col_filter = lambda c: isinstance(c.type, sa.Integer) and c.autoi... | 36.12 | 130 | 0.600221 |
7984abb96eab5ea746a7e756aff31cdb467d09f6 | 1,075 | py | Python | numpy/distutils/__config__.py | ar542/SFM-Audio-Analzer | 59a5daae6ec22417824f3853de29f29a74e5f949 | [
"MIT"
] | null | null | null | numpy/distutils/__config__.py | ar542/SFM-Audio-Analzer | 59a5daae6ec22417824f3853de29f29a74e5f949 | [
"MIT"
] | null | null | null | numpy/distutils/__config__.py | ar542/SFM-Audio-Analzer | 59a5daae6ec22417824f3853de29f29a74e5f949 | [
"MIT"
] | null | null | null | # This file is generated by c:\users\ian\appdata\local\temp\pip-build-hethid\numpy\-c
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
blas_info={}
atlas_3_10_blas_info={}
lapack_info={}
atlas_3_10_blas_threads_info={}
atlas_threads_info={}
blas_src_info={}
blas_opt... | 26.875 | 85 | 0.623256 |
7984abf901e18a714aade70102f98c302b898a2c | 41,273 | py | Python | gym_multigrid/multigrid.py | amimem/gym-multigrid | 7fff0316bf1c1d481a93bc131fe8da5f776de979 | [
"Apache-2.0"
] | null | null | null | gym_multigrid/multigrid.py | amimem/gym-multigrid | 7fff0316bf1c1d481a93bc131fe8da5f776de979 | [
"Apache-2.0"
] | null | null | null | gym_multigrid/multigrid.py | amimem/gym-multigrid | 7fff0316bf1c1d481a93bc131fe8da5f776de979 | [
"Apache-2.0"
] | null | null | null | import math
import gym
from enum import IntEnum
import numpy as np
from gym import error, spaces, utils
from gym.utils import seeding
from .rendering import *
from .window import Window
import numpy as np
# Size in pixels of a tile in the full-scale human view
TILE_PIXELS = 32
# Map of color names to RGB values
COLOR... | 28.602218 | 142 | 0.527875 |
7984ac68789c496377f0daddd34198a0718ba0cc | 895 | py | Python | application.py | bgalde-dev/dinism | a8c5c85b446c38f5146766be09e7d4d939c9cf29 | [
"MIT"
] | null | null | null | application.py | bgalde-dev/dinism | a8c5c85b446c38f5146766be09e7d4d939c9cf29 | [
"MIT"
] | null | null | null | application.py | bgalde-dev/dinism | a8c5c85b446c38f5146766be09e7d4d939c9cf29 | [
"MIT"
] | null | null | null | from flask import (Flask, render_template, jsonify, request, redirect)
import os
import logging
# Get the logger
logger = logging.getLogger()
logger.setLevel(logging.INFO)
#################################################
# Flask Setup
#################################################
application = Flask(__name__)
... | 26.323529 | 70 | 0.486034 |
7984ad137f803864722c2d7bb76231f7c94e4792 | 18,539 | py | Python | gloss/views.py | toptal/glossary-bot | 33e8c7fdfd7c1675af27beba7cf534e8bffe60d6 | [
"MIT"
] | 2 | 2019-07-12T10:51:18.000Z | 2020-02-22T09:09:17.000Z | gloss/views.py | toptal/glossary-bot | 33e8c7fdfd7c1675af27beba7cf534e8bffe60d6 | [
"MIT"
] | null | null | null | gloss/views.py | toptal/glossary-bot | 33e8c7fdfd7c1675af27beba7cf534e8bffe60d6 | [
"MIT"
] | 1 | 2020-01-09T16:16:34.000Z | 2020-01-09T16:16:34.000Z | from flask import abort, current_app, request
from . import gloss as app
from . import db
from models import Definition, Interaction
from sqlalchemy import func, distinct, sql
from re import compile, match, search, sub, UNICODE
from requests import post
from datetime import datetime
import json
import random
STATS_CMD... | 43.827423 | 1,301 | 0.670047 |
7984ad2fbd05df89cbb48e9f40d3545c78e8e32d | 4,359 | py | Python | colour/recovery/tests/test_meng2015.py | aurelienpierre/colour | 3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47 | [
"BSD-3-Clause"
] | null | null | null | colour/recovery/tests/test_meng2015.py | aurelienpierre/colour | 3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47 | [
"BSD-3-Clause"
] | null | null | null | colour/recovery/tests/test_meng2015.py | aurelienpierre/colour | 3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47 | [
"BSD-3-Clause"
] | null | null | null | """Defines the unit tests for the :mod:`colour.recovery.meng2015` module."""
import numpy as np
import unittest
from colour.colorimetry import (
MSDS_CMFS,
SDS_ILLUMINANTS,
SpectralShape,
reshape_msds,
reshape_sd,
sd_to_XYZ_integration,
)
from colour.recovery import XYZ_to_sd_Meng2015
from col... | 29.06 | 82 | 0.534985 |
7984ad488e075085a8f4a310902d93aef3eba511 | 1,428 | py | Python | grr/server/grr_response_server/bin/worker.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/bin/worker.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/bin/worker.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""This is a backend analysis worker which will be deployed on the server.
We basically pull a new task from the task master, and run the plugin
it specifies.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import un... | 28.56 | 74 | 0.785714 |
7984ae5a6ff7ef4007e327f281753573b2d86be5 | 2,403 | py | Python | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-nova-compute-0/charm/unit_tests/test_actions_pause_resume.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 6 | 2021-10-01T19:46:14.000Z | 2022-03-31T17:05:08.000Z | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-nova-compute-0/charm/unit_tests/test_actions_pause_resume.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-nova-compute-0/charm/unit_tests/test_actions_pause_resume.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 10 | 2021-09-29T14:47:54.000Z | 2022-03-18T14:52:16.000Z | # Copyright 2016 Canonical 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 in writing, s... | 30.417722 | 74 | 0.688306 |
7984b4905ba46b7813c32eb22c8c304f4099fed7 | 225 | py | Python | package/ValidateStr.py | Jhonahernandez/Git-Test | a04c7005caea24d2d5eec3a7a9f3c28444ce5747 | [
"MIT"
] | null | null | null | package/ValidateStr.py | Jhonahernandez/Git-Test | a04c7005caea24d2d5eec3a7a9f3c28444ce5747 | [
"MIT"
] | null | null | null | package/ValidateStr.py | Jhonahernandez/Git-Test | a04c7005caea24d2d5eec3a7a9f3c28444ce5747 | [
"MIT"
] | null | null | null | def validate_type_str(val):
return isinstance(val, str)
def validate_size_string(val):
try:
if len(val) <= 10:
return True
except TypeError as e:
return False
return len(val) <= 10 | 22.5 | 31 | 0.608889 |
7984b5603a84f2475d613754531bd712b5c60ab3 | 3,992 | py | Python | src/programy/utils/text/dateformat.py | ItsPhant/program-y | c2b211fcaf8cedc7d6d95a8ea9470a913efa1622 | [
"MIT"
] | null | null | null | src/programy/utils/text/dateformat.py | ItsPhant/program-y | c2b211fcaf8cedc7d6d95a8ea9470a913efa1622 | [
"MIT"
] | null | null | null | src/programy/utils/text/dateformat.py | ItsPhant/program-y | c2b211fcaf8cedc7d6d95a8ea9470a913efa1622 | [
"MIT"
] | 1 | 2020-02-21T17:58:05.000Z | 2020-02-21T17:58:05.000Z | """
Copyright (c) 2016-17 Keith Sterling http://www.keithsterling.com
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, mod... | 34.713043 | 120 | 0.682866 |
7984b68a2abc16fc1dfc5409783904863b0c6a1e | 3,565 | py | Python | aoc2021/day04/part2.py | MPonchon/aoc | 3dc2069db690005ec96f69cbce95c319acafa409 | [
"MIT"
] | null | null | null | aoc2021/day04/part2.py | MPonchon/aoc | 3dc2069db690005ec96f69cbce95c319acafa409 | [
"MIT"
] | null | null | null | aoc2021/day04/part2.py | MPonchon/aoc | 3dc2069db690005ec96f69cbce95c319acafa409 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# part2.py
"""
--- Part Two ---
On the other hand, it might be wise to try a different strategy: let the giant squid win.
You aren't sure how many bingo boards a giant squid could play at once,
so rather than waste time counting its arms,
the safe thing to do is to figure out whi... | 33.952381 | 90 | 0.545021 |
7984b909e948c726e540b895226cf3dd7a196a33 | 3,896 | py | Python | src/NL_Transformer_Enc_Dec/fairseq/criterions/sentence_prediction.py | snudatalab/Negotiation_Learning | 7c0f13781aec2d7efe0870c2bcd60eaef5d342de | [
"MIT"
] | null | null | null | src/NL_Transformer_Enc_Dec/fairseq/criterions/sentence_prediction.py | snudatalab/Negotiation_Learning | 7c0f13781aec2d7efe0870c2bcd60eaef5d342de | [
"MIT"
] | null | null | null | src/NL_Transformer_Enc_Dec/fairseq/criterions/sentence_prediction.py | snudatalab/Negotiation_Learning | 7c0f13781aec2d7efe0870c2bcd60eaef5d342de | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import math
import torch
import torch.nn.functional as F
from fairseq import metrics, utils
from fairseq.criterions import FairseqC... | 38.96 | 97 | 0.6173 |
7984b9c49c98bf8421837142230f112d089508a5 | 38,267 | py | Python | barbican/common/validators.py | rajivmucheli/barbican | 1ad43597352b225b6f3a21ef6c4186330cadf660 | [
"Apache-2.0"
] | null | null | null | barbican/common/validators.py | rajivmucheli/barbican | 1ad43597352b225b6f3a21ef6c4186330cadf660 | [
"Apache-2.0"
] | null | null | null | barbican/common/validators.py | rajivmucheli/barbican | 1ad43597352b225b6f3a21ef6c4186330cadf660 | [
"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 u... | 36.830606 | 79 | 0.564742 |
7984b9d71db8082445426f8cecb4753f72c0594c | 1,668 | py | Python | Simple-Autoecnoders/model.py | piyush2896/Autoencoder-Implementations | baf38cff97a4baad4c04ec0b0a98a1b114c32568 | [
"MIT"
] | 7 | 2018-07-23T08:56:01.000Z | 2020-02-24T06:09:49.000Z | Simple-Autoecnoders/model.py | piyush2896/Autoencoder-Implementations | baf38cff97a4baad4c04ec0b0a98a1b114c32568 | [
"MIT"
] | null | null | null | Simple-Autoecnoders/model.py | piyush2896/Autoencoder-Implementations | baf38cff97a4baad4c04ec0b0a98a1b114c32568 | [
"MIT"
] | 1 | 2018-10-15T10:17:48.000Z | 2018-10-15T10:17:48.000Z | import tensorflow as tf
def dense(in_, units, name=None):
return tf.layers.dense(inputs=in_,
units=units,
activation=tf.nn.relu,
kernel_regularizer=tf.contrib.layers.xavier_initializer,
name=name)
def encod... | 37.066667 | 83 | 0.598321 |
7984bb8e7fdd44110b1e348105aeccd7c954131f | 3,061 | py | Python | zucchini/graders/pylc3_grader.py | zucchini/zucchini | eedd3d8020ec3e80b7c218785379ceb32bc05e38 | [
"Apache-2.0"
] | 3 | 2018-03-27T18:09:54.000Z | 2021-04-08T03:03:55.000Z | zucchini/graders/pylc3_grader.py | zucchini/zucchini | eedd3d8020ec3e80b7c218785379ceb32bc05e38 | [
"Apache-2.0"
] | 337 | 2017-12-17T13:22:26.000Z | 2022-03-28T02:05:09.000Z | zucchini/graders/pylc3_grader.py | zucchini/zucchini | eedd3d8020ec3e80b7c218785379ceb32bc05e38 | [
"Apache-2.0"
] | 7 | 2018-01-10T18:46:26.000Z | 2020-10-17T17:47:07.000Z | import json
import os
from fractions import Fraction
from ..submission import BrokenSubmissionError
from ..utils import run_process, PIPE, STDOUT, TimeoutExpired
from ..grades import PartGrade
from . import GraderInterface, Part
"""
Grade a homework using pyLC3 tests
"""
class PyLC3Test(Part):
__slots__ = ('tes... | 33.271739 | 76 | 0.592943 |
7984bc9a71a72a18e834f1a4401b7236157d8406 | 7,178 | py | Python | ssshare/ss/parse.py | 1nfty/ShadowSocksShare | f6ccb71b8084b6ae3add774abfb039438bb08530 | [
"Apache-2.0"
] | 1 | 2020-05-13T17:50:02.000Z | 2020-05-13T17:50:02.000Z | ssshare/ss/parse.py | 1nfty/ShadowSocksShare | f6ccb71b8084b6ae3add774abfb039438bb08530 | [
"Apache-2.0"
] | null | null | null | ssshare/ss/parse.py | 1nfty/ShadowSocksShare | f6ccb71b8084b6ae3add774abfb039438bb08530 | [
"Apache-2.0"
] | 2 | 2020-02-07T06:59:33.000Z | 2020-09-11T07:34:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import zbar
import requests
from PIL import Image
from io import BytesIO
from numpy import array, uint8
import base64
import urllib
import json
import logging
scanner = zbar.Scanner()
def decode(string):
try:
return str(
base64.urlsafe_... | 35.014634 | 114 | 0.482586 |
7984bd6ed1daa672cb6454643cd8231ceac67c6e | 273 | py | Python | plugins/helpers/__init__.py | Abdel-Raouf/Data-Pipeline-With-Airflow | 9ea64ece490719bf52362db954c50d77c6c07571 | [
"ADSL"
] | null | null | null | plugins/helpers/__init__.py | Abdel-Raouf/Data-Pipeline-With-Airflow | 9ea64ece490719bf52362db954c50d77c6c07571 | [
"ADSL"
] | null | null | null | plugins/helpers/__init__.py | Abdel-Raouf/Data-Pipeline-With-Airflow | 9ea64ece490719bf52362db954c50d77c6c07571 | [
"ADSL"
] | 1 | 2021-11-30T07:53:13.000Z | 2021-11-30T07:53:13.000Z | from helpers.sql_queries import SqlQueries
# Python import paths are related to many factors.
# Normally we would include the relative path of the modules to be imported,
# but we may also define global paths or in places like __init__.py.
__all__ = [
'SqlQueries'
]
| 27.3 | 76 | 0.765568 |
7984bed1f6cee6c4e9d8599160bb9765672fc516 | 898 | py | Python | iqoptionapi/http/resource.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 3 | 2021-07-09T18:34:57.000Z | 2021-08-04T18:05:17.000Z | iqoptionapi/http/resource.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 5 | 2022-01-20T00:32:49.000Z | 2022-02-16T23:12:10.000Z | iqoptionapi/http/resource.py | mustx1/MYIQ | 3afb597aa8a8abc278b7d70dad46af81789eae3e | [
"MIT"
] | 2 | 2021-06-15T15:13:07.000Z | 2021-12-08T04:16:36.000Z | """Module for base IQ Option http base resource."""
class Resource(object):
"""Class for base IQ Option API http resource."""
# pylint: disable=too-few-public-methods
def __init__(self, api):
"""
:param api: The instance of :class:`IQOptionAPI
<iqoptionapi.api.IQOptionAPI>`.
... | 34.538462 | 98 | 0.641425 |
7984bfd8d09918bcb7bd92bbca0e2de3eb3c142e | 9,608 | py | Python | mlrun/api/api/endpoints/pipelines.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | mlrun/api/api/endpoints/pipelines.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | mlrun/api/api/endpoints/pipelines.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | null | null | null | import ast
import typing
from datetime import datetime
from http import HTTPStatus
import yaml
from fastapi import APIRouter, Depends, Query, Request
from fastapi.concurrency import run_in_threadpool
from sqlalchemy.orm import Session
import mlrun.api.crud
import mlrun.api.schemas
import mlrun.api.utils.clients.opa
i... | 34.561151 | 120 | 0.67423 |
7984c026d0282ba1393ba03b5aaa35c9441ca6b1 | 1,776 | py | Python | applications/welcome/controllers/default.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | 1 | 2017-08-11T20:37:21.000Z | 2017-08-11T20:37:21.000Z | applications/welcome/controllers/default.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | applications/welcome/controllers/default.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorizatio... | 31.714286 | 79 | 0.610923 |
7984c1e85266f1c639ebe4e3d8facfc0a43fbffb | 11,520 | py | Python | fastai2/data/transforms.py | mrdbarros/fastai2 | 418189d5cef199c175f66d8d31e739edc18eed36 | [
"Apache-2.0"
] | null | null | null | fastai2/data/transforms.py | mrdbarros/fastai2 | 418189d5cef199c175f66d8d31e739edc18eed36 | [
"Apache-2.0"
] | null | null | null | fastai2/data/transforms.py | mrdbarros/fastai2 | 418189d5cef199c175f66d8d31e739edc18eed36 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/05_data.transforms.ipynb (unless otherwise specified).
__all__ = ['get_files', 'FileGetter', 'image_extensions', 'get_image_files', 'ImageGetter', 'get_text_files',
'RandomSplitter', 'IndexSplitter', 'GrandparentSplitter', 'FuncSplitter', 'MaskSplitter', 'File... | 40.139373 | 139 | 0.665972 |
7984c3413914e213799da6856e49a327fdd38f5b | 8,298 | py | Python | clinicadl/clinicadl/tools/tsv/kfold_split.py | yogeshmj/AD-DL | 76b9b564061581effe8f3698992bfea3ffb055fa | [
"MIT"
] | 112 | 2019-10-21T14:50:35.000Z | 2022-03-29T03:15:47.000Z | clinicadl/clinicadl/tools/tsv/kfold_split.py | yogeshmj/AD-DL | 76b9b564061581effe8f3698992bfea3ffb055fa | [
"MIT"
] | 136 | 2019-10-17T17:40:55.000Z | 2021-06-30T14:53:29.000Z | clinicadl/clinicadl/tools/tsv/kfold_split.py | yogeshmj/AD-DL | 76b9b564061581effe8f3698992bfea3ffb055fa | [
"MIT"
] | 49 | 2019-11-26T13:57:52.000Z | 2022-03-20T13:17:42.000Z | # coding: utf8
from .tsv_utils import baseline_df
import shutil
from sklearn.model_selection import StratifiedKFold
from os import path
import os
import pandas as pd
import numpy as np
sex_dict = {'M': 0, 'F': 1}
def split_diagnoses(formatted_data_path,
n_splits=5, subset_name="validation", MCI_... | 47.417143 | 118 | 0.640516 |
7984c4294599455bc120167eedc1bd42fb90a0f7 | 962 | py | Python | exercicios_resolvidos3/exercicios3/capitulo 08/exercicio-08-13.a.py | tiagosm1/Python_Nilo_Ney | b5380dcc8fcf64e9c047ebc353585caba3d7b397 | [
"MIT"
] | null | null | null | exercicios_resolvidos3/exercicios3/capitulo 08/exercicio-08-13.a.py | tiagosm1/Python_Nilo_Ney | b5380dcc8fcf64e9c047ebc353585caba3d7b397 | [
"MIT"
] | null | null | null | exercicios_resolvidos3/exercicios3/capitulo 08/exercicio-08-13.a.py | tiagosm1/Python_Nilo_Ney | b5380dcc8fcf64e9c047ebc353585caba3d7b397 | [
"MIT"
] | null | null | null | ##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2020
# Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8
# Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3
# Terce... | 35.62963 | 78 | 0.5842 |
7984c5c573f357fea672a8920a8b8799d97500a4 | 6,147 | py | Python | alipay/aop/api/domain/ExerciseCourseOpenModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ExerciseCourseOpenModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ExerciseCourseOpenModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class ExerciseCourseOpenModel(object):
def __init__(self):
self._biz_type = None
self._classroom = None
self._course_detail_url = None
self._craftsman_id =... | 32.183246 | 87 | 0.602408 |
7984c766399b57919653186cadcbd9f6bf922098 | 363 | py | Python | backend/test/pecas_teste_python/peca_home_teste.py | Joaohigor/JCUsinagem | c0e48129a9d1607fb896fe9d66975182b9402933 | [
"MIT"
] | null | null | null | backend/test/pecas_teste_python/peca_home_teste.py | Joaohigor/JCUsinagem | c0e48129a9d1607fb896fe9d66975182b9402933 | [
"MIT"
] | null | null | null | backend/test/pecas_teste_python/peca_home_teste.py | Joaohigor/JCUsinagem | c0e48129a9d1607fb896fe9d66975182b9402933 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from base import GAETestCase
from mommygae import mommy
from pecas_app.pecas_model import Peca
from routes import pecas
class HomeTests(GAETestCase):
def test_index(self):
mommy.save_one(Peca)
resposta = pecas.index()... | 24.2 | 56 | 0.743802 |
7984c79a88638936e3d3a7cafa29567944cfa5d5 | 3,799 | py | Python | Human Vs Human/UTTT.py | LucasColas/AI-Ultimate-Tic-Tac-Toe | 1284b457493a4f4b212785b26cfc00898a21f1f6 | [
"Apache-2.0"
] | 6 | 2020-07-16T22:03:22.000Z | 2021-11-01T21:00:53.000Z | Human Vs Human/UTTT.py | LucasColas/AI-Ultimate-Tic-Tac-Toe | 1284b457493a4f4b212785b26cfc00898a21f1f6 | [
"Apache-2.0"
] | null | null | null | Human Vs Human/UTTT.py | LucasColas/AI-Ultimate-Tic-Tac-Toe | 1284b457493a4f4b212785b26cfc00898a21f1f6 | [
"Apache-2.0"
] | null | null | null | import pygame
import os
import random
from Board import new_Board
from Frontend import fill
from Frontend import Draw_pieces
from Frontend import draw_board
from Frontend import draw_big_pieces
from Check_game import Check_horizontally, Check_vertically, Check_diagonals, Check_Big_Board, empty_cells_big_board, Check... | 34.853211 | 165 | 0.648855 |
7984c7d6937eb6f31b90a7ad1b10ac5b01d991f9 | 3,386 | py | Python | geni/OMNI_docker/geni-tools-2.11/src/gcf/geni/am/aggregate.py | cpemberton3/MeasurementFramework | e911d7da93afcc77b29bb8b0ee39e2e4fee4dd9d | [
"MIT"
] | 12 | 2015-04-30T19:24:47.000Z | 2021-01-07T01:45:18.000Z | geni/OMNI_docker/geni-tools-2.11/src/gcf/geni/am/aggregate.py | cpemberton3/MeasurementFramework | e911d7da93afcc77b29bb8b0ee39e2e4fee4dd9d | [
"MIT"
] | 899 | 2015-05-06T12:48:26.000Z | 2021-09-01T12:24:25.000Z | geni/OMNI_docker/geni-tools-2.11/src/gcf/geni/am/aggregate.py | cpemberton3/MeasurementFramework | e911d7da93afcc77b29bb8b0ee39e2e4fee4dd9d | [
"MIT"
] | 22 | 2015-05-04T07:15:11.000Z | 2019-04-16T08:32:31.000Z | #----------------------------------------------------------------------
# Copyright (c) 2011-2015 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | 39.835294 | 72 | 0.624631 |
7984c7f54b6e65ba55cc30c6e07163b10e56159c | 103 | py | Python | voice_recognition/__init__.py | jphacks/C_2113 | d921e4b783aecc724110732b6ebfb98b1c54f02c | [
"MIT"
] | null | null | null | voice_recognition/__init__.py | jphacks/C_2113 | d921e4b783aecc724110732b6ebfb98b1c54f02c | [
"MIT"
] | null | null | null | voice_recognition/__init__.py | jphacks/C_2113 | d921e4b783aecc724110732b6ebfb98b1c54f02c | [
"MIT"
] | null | null | null | from voice_recognition.speech_recognize import main
from voice_recognition.stt_library import stt_main
| 34.333333 | 51 | 0.902913 |
7984c813efaa2dd75c2c00a9c1f9aaeee94e8eec | 264 | py | Python | Curso_de_Python_ Curso_em_Video/PythonTeste/manipulandoTextoEx005.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_de_Python_ Curso_em_Video/PythonTeste/manipulandoTextoEx005.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_de_Python_ Curso_em_Video/PythonTeste/manipulandoTextoEx005.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | frase = input('Digite uma frase: ')
print('A letra "A" aparece {}'.format(frase.upper().count('A')))
print('A aparece a primeira vez na posição {} '.format(frase.lower().find('a')))
print('A aparece a ultima vez na posição {}'.format(frase.upper().rfind(('A'))))
| 44 | 80 | 0.659091 |
7984c82cfbe9c8cbeb9901152f0790d543e5aae8 | 554,885 | py | Python | pandas/tests/test_frame.py | wholmgren/pandas | 608882de01bbc6d08f12c514bb61642c52480774 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_frame.py | wholmgren/pandas | 608882de01bbc6d08f12c514bb61642c52480774 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_frame.py | wholmgren/pandas | 608882de01bbc6d08f12c514bb61642c52480774 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
# pylint: disable-msg=W0612,E1101
from copy import deepcopy
from datetime import datetime, timedelta, time
import sys
import operator
import re
import csv
import nose
import functools
import itertools
from itertools import product, permutations
from distuti... | 37.451741 | 155 | 0.53949 |
7984c8c8cb60082dd7dfc052dabbb138b8ab2b4d | 988 | py | Python | scripts/evaluation/ConInterCal2/metk.py | sirimullalab/kinasepkipred | fbb8833fc511fc1fd9ed8a02c2a3110e90b740a5 | [
"MIT"
] | 10 | 2019-10-31T02:37:42.000Z | 2022-01-26T00:50:26.000Z | scripts/evaluation/ConInterCal2/metk.py | sirimullalab/kinasepkipred | fbb8833fc511fc1fd9ed8a02c2a3110e90b740a5 | [
"MIT"
] | 1 | 2021-09-08T10:29:25.000Z | 2021-09-08T10:29:25.000Z | scripts/evaluation/ConInterCal2/metk.py | sirimullalab/kinasepkipred | fbb8833fc511fc1fd9ed8a02c2a3110e90b740a5 | [
"MIT"
] | 2 | 2020-02-10T05:20:36.000Z | 2021-05-21T07:53:37.000Z | #!/usr/bin/env python
"""Usage: metk.py --in INFILE_NAME --prefix OUTFILE_PREFIX [--units UNIT_NAME] [--example]
--in INFILE_NAME input file name
--prefix OUTFILE_PREFIX prefix for output file names
--units UNIT_NAME units to display (uM (default) or nM)
--example show example command l... | 28.228571 | 90 | 0.730769 |
7984c8d934f6d9af281094bfdf15eb55bdfc7e54 | 1,158 | py | Python | day_10_b.py | Gyaha/AOC2020 | fbabae9acd7d274b84bc0c64f2665dfba9f008ca | [
"MIT"
] | null | null | null | day_10_b.py | Gyaha/AOC2020 | fbabae9acd7d274b84bc0c64f2665dfba9f008ca | [
"MIT"
] | null | null | null | day_10_b.py | Gyaha/AOC2020 | fbabae9acd7d274b84bc0c64f2665dfba9f008ca | [
"MIT"
] | null | null | null | def count_adapter_possibilities(s: str) -> int:
l = sorted([0] + [int(l) for l in s.strip("\n").splitlines()])
return recurve_adapters(l, {}, len(l) - 1)
def recurve_adapters(l: list, m: dict, i: int) -> int:
if i in m:
return m[i]
if i < 1:
return 1
s = 0
for g in range(1, 4):... | 14.846154 | 66 | 0.505181 |
7984ca5571658c96b24acaf49fe6de853bc345b3 | 23,399 | py | Python | python/paddle/fluid/tests/unittests/test_gradient_clip.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 2 | 2021-11-12T11:31:12.000Z | 2021-12-05T10:30:28.000Z | python/paddle/fluid/tests/unittests/test_gradient_clip.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 1 | 2021-11-01T06:28:16.000Z | 2021-11-01T06:28:16.000Z | python/paddle/fluid/tests/unittests/test_gradient_clip.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 5 | 2021-12-10T11:20:06.000Z | 2022-02-18T05:18:12.000Z | # 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... | 38.868771 | 112 | 0.592547 |
7984ca819dd3be92063fc0500590d2c009a3bc67 | 1,483 | py | Python | gs/profile/status/base/tests/utils.py | groupserver/gs.profile.status.base | 68942daf02a3b7310331d66fbd150d4143bb636c | [
"ZPL-2.1"
] | null | null | null | gs/profile/status/base/tests/utils.py | groupserver/gs.profile.status.base | 68942daf02a3b7310331d66fbd150d4143bb636c | [
"ZPL-2.1"
] | null | null | null | gs/profile/status/base/tests/utils.py | groupserver/gs.profile.status.base | 68942daf02a3b7310331d66fbd150d4143bb636c | [
"ZPL-2.1"
] | null | null | null | # -*- coding: utf-8 -*-
############################################################################
#
# Copyright © 2015 OnlineGroups.net and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this dis... | 32.23913 | 76 | 0.621713 |
7984cc91e4bce5bf1b7010c0f416283a4aa2eaf9 | 1,130 | py | Python | setup.py | mainanick/pymemcache | 4147c760ef4df7282c655913c185455ef8ab4b7b | [
"Apache-2.0"
] | null | null | null | setup.py | mainanick/pymemcache | 4147c760ef4df7282c655913c185455ef8ab4b7b | [
"Apache-2.0"
] | null | null | null | setup.py | mainanick/pymemcache | 4147c760ef4df7282c655913c185455ef8ab4b7b | [
"Apache-2.0"
] | 1 | 2020-06-23T18:29:56.000Z | 2020-06-23T18:29:56.000Z | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
from pymemcache import __version__
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
readme = read('README.rst')
changelog = read('ChangeLog.rst')
setup(
name='pymemcache',
version=__version__... | 29.736842 | 70 | 0.650442 |
7984cdca7bef620ac7b5a66b4477d3147234706a | 28,177 | py | Python | monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py | theacodes/google-cloud-python | 57dafcb78540e12c82f7ca0fc77d75edeb269390 | [
"Apache-2.0"
] | 1 | 2020-10-25T04:39:41.000Z | 2020-10-25T04:39:41.000Z | monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py | theacodes/google-cloud-python | 57dafcb78540e12c82f7ca0fc77d75edeb269390 | [
"Apache-2.0"
] | 4 | 2018-11-13T22:15:36.000Z | 2018-12-07T18:31:38.000Z | monitoring/google/cloud/monitoring_v3/gapic/alert_policy_service_client.py | theacodes/google-cloud-python | 57dafcb78540e12c82f7ca0fc77d75edeb269390 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 46.267652 | 155 | 0.6056 |
7984ce243fb34628178f68b2cb91ac5acad3e215 | 15,920 | py | Python | pyW215/pyW215.py | vilsufi/pyW215 | 8d3823b9709da21139a4d3586d003242e4820005 | [
"MIT"
] | 1 | 2021-12-20T02:29:24.000Z | 2021-12-20T02:29:24.000Z | pyW215/pyW215.py | vilsufi/pyW215 | 8d3823b9709da21139a4d3586d003242e4820005 | [
"MIT"
] | null | null | null | pyW215/pyW215.py | vilsufi/pyW215 | 8d3823b9709da21139a4d3586d003242e4820005 | [
"MIT"
] | null | null | null |
try:
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
except ImportError:
# Assume Python 2.x
from urllib2 import Request, urlopen
from urllib2 import URLError, HTTPError
import xml.etree.ElementTree as ET
import hashlib
import hmac
import time
import logging... | 38.086124 | 177 | 0.611307 |
7984cf74659fa1611df3708f640724d44879e790 | 1,054 | py | Python | tests/benchmarkstt/test_decorators.py | ioannisNoukakis/benchmarkstt | 41074c9b89632e8d9ff8e0ee72187211052bfb04 | [
"MIT"
] | 30 | 2019-04-26T14:57:47.000Z | 2022-01-31T13:59:12.000Z | tests/benchmarkstt/test_decorators.py | ioannisNoukakis/benchmarkstt | 41074c9b89632e8d9ff8e0ee72187211052bfb04 | [
"MIT"
] | 86 | 2019-04-24T13:42:48.000Z | 2022-02-22T08:57:10.000Z | tests/benchmarkstt/test_decorators.py | ioannisNoukakis/benchmarkstt | 41074c9b89632e8d9ff8e0ee72187211052bfb04 | [
"MIT"
] | 7 | 2019-06-28T13:08:50.000Z | 2022-02-09T12:37:27.000Z | import logging
from benchmarkstt.decorators import log_call
def test_log_call(caplog):
logger = logging.getLogger()
@log_call(logger, logging.WARNING)
def test(*args, **kwargs):
return 'result'
test('arg1', arg2='someval')
assert caplog.record_tuples == [
('root', logging.WARNING... | 23.422222 | 65 | 0.639469 |
7984cfaf406252297079a73fe565ec805fa37cbf | 1,265 | py | Python | Twitter Data/tweets_scrapper.py | itsayushthada/Scrappers | 66d36b1f207accfaed31c809dc421263ccd6cbc7 | [
"MIT"
] | null | null | null | Twitter Data/tweets_scrapper.py | itsayushthada/Scrappers | 66d36b1f207accfaed31c809dc421263ccd6cbc7 | [
"MIT"
] | null | null | null | Twitter Data/tweets_scrapper.py | itsayushthada/Scrappers | 66d36b1f207accfaed31c809dc421263ccd6cbc7 | [
"MIT"
] | null | null | null | import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
access_secret = ""
def get_all_tweets(screen_name):
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)... | 25.816327 | 102 | 0.651383 |
7984d0e1fea01ec87baaab28b6f538b3ec6f329b | 1,689 | py | Python | homework/24_homework.py | kaixiang1992/python-learning | c74aa4bec0c72e26cf18f138e6faf110ed64d8c0 | [
"MIT"
] | null | null | null | homework/24_homework.py | kaixiang1992/python-learning | c74aa4bec0c72e26cf18f138e6faf110ed64d8c0 | [
"MIT"
] | 7 | 2020-06-05T23:24:41.000Z | 2021-06-10T19:02:09.000Z | homework/24_homework.py | kaixiang1992/python-learning | c74aa4bec0c72e26cf18f138e6faf110ed64d8c0 | [
"MIT"
] | null | null | null | '''
@description 2019/09/03 21:03
'''
# 1.for循环实现九九乘法表
# 循环行:
for rows in range(1,10):
# 循环列
for columns in range(1, rows + 1):
print('%d * %d = %d'%(columns, rows, rows * columns), end=" ")
print("")
# 2.实现一个计算体脂率的程序
# 体脂率计算公式如下:
'''
成年女性的体脂率计算公式:
参数a = 腰围(cm) * 0.74
参数b = 体重(kg) * 0.082 ... | 20.349398 | 82 | 0.549438 |
7984d1b105d3f2ed764d9b64db5a5041239d56af | 18,916 | py | Python | vendor/github.com/elastic/beats/metricbeat/tests/system/test_system.py | dtrv/kstatbeat | 3d9730f0ee946e6c2b1c6fafa2d21b92828e7c6d | [
"Apache-2.0"
] | 11 | 2017-12-07T18:03:30.000Z | 2020-07-29T02:22:40.000Z | vendor/github.com/elastic/beats/metricbeat/tests/system/test_system.py | railroadmanuk/rubrikbeat | af012076d68f64e12092d885257aa5a706453695 | [
"MIT"
] | 3 | 2018-09-06T16:02:08.000Z | 2020-06-24T13:27:55.000Z | metricbeat/tests/system/test_system.py | sure0000/beats | 1690690b3fcbe4a46aedc1121f9aa128497ed22d | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2018-11-01T13:18:24.000Z | 2019-11-12T10:43:45.000Z | import re
import six
import sys
import unittest
import metricbeat
import getpass
import os
SYSTEM_CPU_FIELDS = ["cores", "idle.pct", "iowait.pct", "irq.pct", "nice.pct",
"softirq.pct", "steal.pct", "system.pct", "user.pct", "total.pct"]
SYSTEM_CPU_FIELDS_ALL = ["cores", "idle.pct", "idle.ticks", ... | 38.137097 | 227 | 0.576919 |
7984d3332157046bd5f8a605d653fc264426f151 | 281 | py | Python | aula04.py | melqrozendo/Projeto-codigo-em-Python | 0343e5089ef905e9631c5386bdc2e0d5a3e47d41 | [
"MIT"
] | null | null | null | aula04.py | melqrozendo/Projeto-codigo-em-Python | 0343e5089ef905e9631c5386bdc2e0d5a3e47d41 | [
"MIT"
] | null | null | null | aula04.py | melqrozendo/Projeto-codigo-em-Python | 0343e5089ef905e9631c5386bdc2e0d5a3e47d41 | [
"MIT"
] | null | null | null | #Aula04 - atribuir a função input a uma variavel
nome = input('Qual o seu nome?')
print(nome)
#
idade = input('Qual a sua idade?')
print(idade)
print(idade*2)#teremos um problema pois a variavelesta definida como uma string
#
idade = int(input('Qual a sua idade?'))
print(idade*5) | 28.1 | 79 | 0.725979 |
7984d3dff14c1bdc6d3566882984db76142dffc6 | 2,599 | py | Python | experimentor/views/components/file_selector.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | 4 | 2020-05-15T04:07:25.000Z | 2020-09-30T22:20:46.000Z | experimentor/views/components/file_selector.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | null | null | null | experimentor/views/components/file_selector.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | null | null | null | # ##############################################################################
# Copyright (c) 2021 Aquiles Carattino, Dispertech B.V. #
# file_selector.py is part of Experimentor. #
# This file is released under an MIT license. ... | 39.378788 | 117 | 0.598692 |
7984d49474b7d8fee0ac7edde42071a530915273 | 11,256 | py | Python | cryptotrader/utils.py | mehrdad-shokri/cryptotrader | 65a4b4b502182a3df5ab581fc882edc61185279f | [
"MIT"
] | 32 | 2017-09-24T18:56:56.000Z | 2021-02-15T03:30:04.000Z | cryptotrader/utils.py | mehrdad-shokri/cryptotrader | 65a4b4b502182a3df5ab581fc882edc61185279f | [
"MIT"
] | null | null | null | cryptotrader/utils.py | mehrdad-shokri/cryptotrader | 65a4b4b502182a3df5ab581fc882edc61185279f | [
"MIT"
] | 15 | 2017-11-01T19:16:32.000Z | 2021-12-13T20:06:17.000Z | import logging
from datetime import datetime, timedelta, timezone
from decimal import Decimal, InvalidOperation, DivisionByZero, getcontext, Context
from functools import partialmethod
import zmq
import msgpack
from socket import gaierror
from time import time, sleep
import smtplib
import numpy as np
# from bson impor... | 30.096257 | 119 | 0.601013 |
7984d4a6317814b6c8e82af07e76019fa41aa3ee | 35,430 | py | Python | fec/data/constants.py | cnlucas/fec-cms | aa67a0d4c19a350420d2f8c4b4e6f93acb808639 | [
"CC0-1.0"
] | null | null | null | fec/data/constants.py | cnlucas/fec-cms | aa67a0d4c19a350420d2f8c4b4e6f93acb808639 | [
"CC0-1.0"
] | null | null | null | fec/data/constants.py | cnlucas/fec-cms | aa67a0d4c19a350420d2f8c4b4e6f93acb808639 | [
"CC0-1.0"
] | null | null | null | from collections import OrderedDict
import operator
from data import utils
START_YEAR = 1979
END_YEAR = 2024
DEFAULT_TIME_PERIOD = 2022 # Change after the April quarterly report (4/15/23)
DEFAULT_ELECTION_YEAR = 2022 # Change after election day (11/8/22)
DEFAULT_PRESIDENTIAL_YEAR = 2020 # Change after April quarte... | 42.686747 | 136 | 0.565086 |
7984d56778de9ae2c866c7482039553c7f198f80 | 11,015 | py | Python | timesketch/lib/google_auth.py | toshiro92/timesketch | 3c8f39e2599dfab412412ff6787bc2c40e199f5f | [
"Apache-2.0"
] | null | null | null | timesketch/lib/google_auth.py | toshiro92/timesketch | 3c8f39e2599dfab412412ff6787bc2c40e199f5f | [
"Apache-2.0"
] | null | null | null | timesketch/lib/google_auth.py | toshiro92/timesketch | 3c8f39e2599dfab412412ff6787bc2c40e199f5f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 30.854342 | 78 | 0.679619 |
7984d72e6a404a59ccdecdabc96bd1b403c8c176 | 629 | py | Python | stats/models.py | Ecotrust/formhub | 05033bb5aa152cc2cbcd7382c2c999d82b2c3276 | [
"BSD-2-Clause"
] | 123 | 2015-01-08T09:21:05.000Z | 2021-11-14T19:45:23.000Z | stats/models.py | Ecotrust/formhub | 05033bb5aa152cc2cbcd7382c2c999d82b2c3276 | [
"BSD-2-Clause"
] | 16 | 2015-02-13T16:56:42.000Z | 2021-02-20T23:58:43.000Z | stats/models.py | Ecotrust/formhub | 05033bb5aa152cc2cbcd7382c2c999d82b2c3276 | [
"BSD-2-Clause"
] | 110 | 2015-01-19T14:34:06.000Z | 2021-02-01T14:55:11.000Z | from django.db import models
from django.db.models import Sum
class StatsManager(models.Manager):
def count(self, key=None):
qs = super(StatsManager, self).get_query_set()
if key:
qs = qs.filter(key=key)
return qs.aggregate(Sum('value'))['value__sum']
class StatsCount(models... | 26.208333 | 56 | 0.678855 |
7984d7860b9a4dc1a87ea6955f20310b6a2f3f68 | 1,361 | py | Python | hpobench/container/benchmarks/nas/nasbench_101.py | pfistfl/HPOBench | a7ad8807bd2e058ff99f703ad057b64ecadd4b66 | [
"Apache-2.0"
] | 78 | 2017-01-14T14:25:55.000Z | 2020-09-30T22:57:14.000Z | hpobench/container/benchmarks/nas/nasbench_101.py | pfistfl/HPOBench | a7ad8807bd2e058ff99f703ad057b64ecadd4b66 | [
"Apache-2.0"
] | 84 | 2016-11-24T15:19:20.000Z | 2020-11-09T11:34:19.000Z | hpobench/container/benchmarks/nas/nasbench_101.py | pfistfl/HPOBench | a7ad8807bd2e058ff99f703ad057b64ecadd4b66 | [
"Apache-2.0"
] | 31 | 2016-11-29T19:56:06.000Z | 2020-07-10T04:13:33.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
""" Benchmark for the Tabular Benchmark from hpobench/benchmarks/nas/nasbench_101.py """
from hpobench.container.client_abstract_benchmark import AbstractBenchmarkClient
class NASCifar10ABenchmark(AbstractBenchmarkClient):
def __init__(self, **kwargs):
kwargs['... | 43.903226 | 88 | 0.711976 |
7984d7cc78c05631b8a4a29ab1328fa7d77d249c | 6,689 | py | Python | Gui/CustomWidgets/summaryDialog.py | jpesperidiao/MOPA | 6fbf097a22d42d82eeb36c6f247eb0d8fb6ac586 | [
"MIT"
] | null | null | null | Gui/CustomWidgets/summaryDialog.py | jpesperidiao/MOPA | 6fbf097a22d42d82eeb36c6f247eb0d8fb6ac586 | [
"MIT"
] | 1 | 2020-06-07T00:19:54.000Z | 2020-06-07T00:19:54.000Z | Gui/CustomWidgets/summaryDialog.py | jpesperidiao/MOPA | 6fbf097a22d42d82eeb36c6f247eb0d8fb6ac586 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
MOPA
An independet project
Método de Obtenção da Posição de Atirador
-------------------
begin : 2019-02-02
git sha ... | 44.298013 | 116 | 0.50441 |
7984d85127c819d5f645ff4bdaaeabac9a0c9305 | 1,336 | py | Python | jupiter/use_cases/inbox_tasks/remove.py | horia141/jupiter | 2c721d1d44e1cd2607ad9936e54a20ea254741dc | [
"MIT"
] | 15 | 2019-05-05T14:34:58.000Z | 2022-02-25T09:57:28.000Z | jupiter/use_cases/inbox_tasks/remove.py | horia141/jupiter | 2c721d1d44e1cd2607ad9936e54a20ea254741dc | [
"MIT"
] | 3 | 2020-02-22T16:09:39.000Z | 2021-12-18T21:33:06.000Z | jupiter/use_cases/inbox_tasks/remove.py | horia141/jupiter | 2c721d1d44e1cd2607ad9936e54a20ea254741dc | [
"MIT"
] | null | null | null | """The command for removing a inbox task."""
from dataclasses import dataclass
from typing import Final
from jupiter.domain.inbox_tasks.infra.inbox_task_notion_manager import InboxTaskNotionManager
from jupiter.domain.inbox_tasks.service.remove_service import InboxTaskRemoveService
from jupiter.domain.storage_engine i... | 40.484848 | 113 | 0.767964 |
7984d8d3e44a726b5c018eeb170acd0f1bf1822c | 4,427 | py | Python | playstopaudio/audio_generic.py | tepreece/playstopaudio | d7440547ede86d10ba806e4e4196df4372e4886c | [
"MIT"
] | 1 | 2015-04-12T21:08:17.000Z | 2015-04-12T21:08:17.000Z | playstopaudio/audio_generic.py | tepreece/playstopaudio | d7440547ede86d10ba806e4e4196df4372e4886c | [
"MIT"
] | null | null | null | playstopaudio/audio_generic.py | tepreece/playstopaudio | d7440547ede86d10ba806e4e4196df4372e4886c | [
"MIT"
] | null | null | null | # Copyright (c) 2013 Thomas Preece
#
# 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,
... | 32.07971 | 77 | 0.731195 |
7984d90f2e1f341ba66335829de1f8970a7514da | 144 | py | Python | parsl/tests/low_latency/constants.py | cylondata/parsl | 00ff9372bd841dafef8a0b3566c79ffe68f0e367 | [
"Apache-2.0"
] | 323 | 2017-07-28T21:31:27.000Z | 2022-03-05T13:06:05.000Z | parsl/tests/low_latency/constants.py | cylondata/parsl | 00ff9372bd841dafef8a0b3566c79ffe68f0e367 | [
"Apache-2.0"
] | 1,286 | 2017-06-01T16:50:00.000Z | 2022-03-31T16:45:14.000Z | parsl/tests/low_latency/constants.py | cylondata/parsl | 00ff9372bd841dafef8a0b3566c79ffe68f0e367 | [
"Apache-2.0"
] | 113 | 2017-06-03T11:38:40.000Z | 2022-03-26T16:43:05.000Z | CLIENT_IP_FILE = "/scratch/midway2/rohankumar/parsl/client_ip.txt"
INTERCHANGE_IP_FILE = "/scratch/midway2/rohankumar/parsl/interchange_ip.txt"
| 48 | 76 | 0.833333 |
7984d9dec9548f2d41d9e83bc86bb02737136706 | 4,316 | py | Python | python/frcnn_train/statistics_anchors.py | billy000400/Mu2e_MLTracking | 675e62d844ff8a5ccba9019e316c374c40658101 | [
"MIT"
] | null | null | null | python/frcnn_train/statistics_anchors.py | billy000400/Mu2e_MLTracking | 675e62d844ff8a5ccba9019e316c374c40658101 | [
"MIT"
] | 1 | 2021-01-03T08:57:34.000Z | 2021-01-03T23:41:22.000Z | python/frcnn_train/statistics_anchors.py | billy000400/Mu2e_MLTracking | 675e62d844ff8a5ccba9019e316c374c40658101 | [
"MIT"
] | null | null | null | import sys
from pathlib import Path
import pickle
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
util_dir = Path.cwd().parent.joinpath('Utility')
sys.path.insert(1, str(util_dir))
from Abstract import *
from Information import *
from Configuration import frcnn_config
def anchor_statistics(C):... | 39.962963 | 123 | 0.702734 |
7984db2049e63fb963695c57a0f5a3aace3884ed | 1,604 | py | Python | dj4e-samples/dj4e_projects/mysite/cats/views.py | yummyKnight/dj4e-samples | 587439afa69f8c8b0b52fd727939d4a452add246 | [
"MIT"
] | null | null | null | dj4e-samples/dj4e_projects/mysite/cats/views.py | yummyKnight/dj4e-samples | 587439afa69f8c8b0b52fd727939d4a452add246 | [
"MIT"
] | null | null | null | dj4e-samples/dj4e_projects/mysite/cats/views.py | yummyKnight/dj4e-samples | 587439afa69f8c8b0b52fd727939d4a452add246 | [
"MIT"
] | null | null | null | from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
# Create your views here.
from django.urls import reverse_lazy, reverse
from django.views import View
from django.views.generic import CreateView, DeleteView, UpdateView
from .models import Cat, Breed
class CatsList(LoginR... | 27.186441 | 81 | 0.721322 |
7984dbc56a64a253b4584edf6ad1215f746af2fb | 1,759 | py | Python | userbot/plugins/add.py | azizkziba/FridayUserbot | f77a692f74d1c2da2b6e7ee47f5eee7a9dd9e138 | [
"MIT"
] | 2 | 2020-09-06T20:00:52.000Z | 2020-09-06T20:00:57.000Z | userbot/plugins/add.py | azizkziba/FridayUserbot | f77a692f74d1c2da2b6e7ee47f5eee7a9dd9e138 | [
"MIT"
] | null | null | null | userbot/plugins/add.py | azizkziba/FridayUserbot | f77a692f74d1c2da2b6e7ee47f5eee7a9dd9e138 | [
"MIT"
] | 1 | 2020-10-10T02:50:51.000Z | 2020-10-10T02:50:51.000Z | """Invite the user(s) to the current chat
Syntax: .invite <User(s)>"""
from telethon import functions
from userbot.utils import admin_cmd
"""Invite the user(s) to the current chat
Syntax: .invite <User(s)>"""
from telethon import functions
from userbot.utils import admin_cmd, sudo_cmd, edit_or_reply
@borg.on(admin_... | 38.23913 | 91 | 0.58556 |
7984dc39529e15a98e986eb15c583fa0de2d6b58 | 9,428 | py | Python | aizynthfinder/analysis/tree_analysis.py | ShantamShorewala/aizynthfinder | 6b15d5846558b14c4ce3c353727d9d676af7f6fb | [
"MIT"
] | null | null | null | aizynthfinder/analysis/tree_analysis.py | ShantamShorewala/aizynthfinder | 6b15d5846558b14c4ce3c353727d9d676af7f6fb | [
"MIT"
] | null | null | null | aizynthfinder/analysis/tree_analysis.py | ShantamShorewala/aizynthfinder | 6b15d5846558b14c4ce3c353727d9d676af7f6fb | [
"MIT"
] | null | null | null | """ Module containing classes to perform analysis of the tree search results.
"""
from __future__ import annotations
from collections import defaultdict
from typing import TYPE_CHECKING
from aizynthfinder.chem import (
FixedRetroReaction,
hash_reactions,
)
from aizynthfinder.context.scoring import (
StateS... | 37.863454 | 88 | 0.634175 |
7984dc7ea385ecd9708307f93bf09f1b067f0d19 | 9,973 | py | Python | jam/third_party/sqlalchemy/sql/annotation.py | pubmania/jam-py | 33c930206702dba951fd42783a93127cd7fdc3ac | [
"BSD-3-Clause"
] | 384 | 2015-01-06T15:09:23.000Z | 2022-02-25T19:56:44.000Z | jam/third_party/sqlalchemy/sql/annotation.py | pubmania/jam-py | 33c930206702dba951fd42783a93127cd7fdc3ac | [
"BSD-3-Clause"
] | 222 | 2015-01-06T19:11:08.000Z | 2022-02-16T06:46:39.000Z | jam/third_party/sqlalchemy/sql/annotation.py | pubmania/jam-py | 33c930206702dba951fd42783a93127cd7fdc3ac | [
"BSD-3-Clause"
] | 86 | 2015-01-16T09:50:31.000Z | 2022-02-25T13:27:14.000Z | # sql/annotation.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""The :class:`.Annotated` class and related routines; creates hash-equivalent
cop... | 30.686154 | 79 | 0.635917 |
7984dde1e5d50f6b072af9d26dc7453a04605d67 | 10,271 | py | Python | benchmarks/f3_wrong_hints/scaling_nonlinear_software/17-19_39.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_nonlinear_software/17-19_39.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_nonlinear_software/17-19_39.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet, Tuple
import pysmt.typing as types
from pysmt.environment import Environment as PysmtEnv
from pysmt.fnode import FNode
from utils import symb_to_next
from hint import Hint, Location
def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode,
... | 34.466443 | 81 | 0.549995 |
7984deb87bb549319b7d6a7e1974e4217f94e0ef | 4,525 | py | Python | scripts/coll_avoidance_pot.py | sejavichan/rva_basic_tools | 138d5df854e5869718cd9577cbc9d47f832bfdd2 | [
"MIT"
] | null | null | null | scripts/coll_avoidance_pot.py | sejavichan/rva_basic_tools | 138d5df854e5869718cd9577cbc9d47f832bfdd2 | [
"MIT"
] | null | null | null | scripts/coll_avoidance_pot.py | sejavichan/rva_basic_tools | 138d5df854e5869718cd9577cbc9d47f832bfdd2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import math
import rospy
import tf
import numpy as np
from sensor_msgs.msg import LaserScan
from geometry_msgs.msg import Point
from visualization_msgs.msg import Marker
from geometry_msgs.msg import Twist
class Coll_Avoidance_Pot:
def __init__(self):
rospy.Subscriber('/cmd_vel_coll',... | 39.008621 | 159 | 0.594475 |
7984e0c1eda3efade3c3ab4b8850146fbcef1c15 | 7,546 | py | Python | django_project/views.py | thomascrha/product-database | f561d05850898ce8e3466c79ba664bd576b1fa8c | [
"MIT"
] | null | null | null | django_project/views.py | thomascrha/product-database | f561d05850898ce8e3466c79ba664bd576b1fa8c | [
"MIT"
] | null | null | null | django_project/views.py | thomascrha/product-database | f561d05850898ce8e3466c79ba664bd576b1fa8c | [
"MIT"
] | null | null | null | import logging
import redis
from django.conf import settings
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import password_change
from django.core.urlresolvers import reverse
from django.http import HttpResponseForbi... | 33.838565 | 108 | 0.641797 |
7984e1fa370e35bad4edb14af53abdcdec1ea204 | 1,167 | py | Python | 1Aufgabe/testScripts/event_example.py | ni851ste/6-RechnerNetze | f33120f58a7a7d134acc2493a73d02c827a81448 | [
"MIT"
] | null | null | null | 1Aufgabe/testScripts/event_example.py | ni851ste/6-RechnerNetze | f33120f58a7a7d134acc2493a73d02c827a81448 | [
"MIT"
] | null | null | null | 1Aufgabe/testScripts/event_example.py | ni851ste/6-RechnerNetze | f33120f58a7a7d134acc2493a73d02c827a81448 | [
"MIT"
] | null | null | null | from threading import Thread, Event
n = 0
L = []
global s
sdf = 0
listEv = Event()
sumEv = Event()
addEv = Event()
stopEv = Event()
def copy():
while True:
# listEv must me true
listEv.wait(timeout=1)
if stopEv.is_set():
break
if listEv.is_set():
L.append(... | 16.913043 | 35 | 0.479863 |
7984e302b17e3b8fe815d90e5ecfaf5b1713fd58 | 1,940 | py | Python | real-time-nlp.py | santoshgsk/appliedaicourse | 5f09dcb44f43d2b40e6492c60635cc020d48850b | [
"MIT"
] | 4 | 2020-08-18T18:30:24.000Z | 2021-02-04T19:21:48.000Z | real-time-nlp.py | santoshgsk/appliedaicourse | 5f09dcb44f43d2b40e6492c60635cc020d48850b | [
"MIT"
] | null | null | null | real-time-nlp.py | santoshgsk/appliedaicourse | 5f09dcb44f43d2b40e6492c60635cc020d48850b | [
"MIT"
] | 2 | 2020-05-30T08:05:44.000Z | 2020-12-01T06:41:36.000Z | # The script MUST contain a function named azureml_main
# which is the entry point for this module.
# imports up here can be used to
import re
import pandas as pd
# The entry point function MUST have two input arguments.
# If the input port is not connected, the corresponding
# dataframe argument will be None.
# Pa... | 38.8 | 106 | 0.696907 |
7984e559a7da35fab985becd93dc2c0c95a509dd | 1,674 | py | Python | hail/python/hailtop/aiogoogle/client/base_client.py | sigmarkarl/hail | 11b7c22342a945c61b24c5f8babf4ab411d3d2f1 | [
"MIT"
] | 2 | 2020-12-15T21:20:24.000Z | 2020-12-21T19:46:26.000Z | hail/python/hailtop/aiogoogle/client/base_client.py | Dania-Abuhijleh/hail | a187dc0867801ca1eee774588fe58604a133a0d9 | [
"MIT"
] | 2 | 2016-11-17T03:06:10.000Z | 2017-12-05T19:00:24.000Z | hail/python/hailtop/aiogoogle/client/base_client.py | Dania-Abuhijleh/hail | a187dc0867801ca1eee774588fe58604a133a0d9 | [
"MIT"
] | 2 | 2020-07-28T18:55:19.000Z | 2020-10-19T16:43:03.000Z | from types import TracebackType
from typing import Any, Optional, Type, TypeVar
from hailtop.utils import RateLimit
from hailtop.aiogoogle.auth import Session, RateLimitedSession
ClientType = TypeVar('ClientType', bound='BaseClient')
class BaseClient:
def __init__(self, base_url: str, *, session: Session = None,... | 35.617021 | 80 | 0.605137 |
7984e5bdeb868ea3e2563a125f871364fdc5f0d7 | 854 | py | Python | isi_sdk_8_2_1/test/test_acl_object.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/test/test_acl_object.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/test/test_acl_object.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_1
from i... | 20.829268 | 79 | 0.688525 |
7984e5f1e5a69a77770b089c2903e95570e65d27 | 8,398 | py | Python | Lib/test/test_codeop.py | KKIKING/cpython | c51db0ea40ddabaf5f771ea633b37fcf4c90a495 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2020-08-13T12:08:00.000Z | 2020-08-13T12:08:00.000Z | Lib/test/test_codeop.py | KKIKING/cpython | c51db0ea40ddabaf5f771ea633b37fcf4c90a495 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Lib/test/test_codeop.py | KKIKING/cpython | c51db0ea40ddabaf5f771ea633b37fcf4c90a495 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | """
Test cases for codeop.py
Nick Mathewson
"""
import sys
import unittest
import warnings
from test import support
from test.support import warnings_helper
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
import io
if support.is_jython:
def unify_callables(d):
for n,v in d.items():
... | 26.080745 | 79 | 0.428197 |
7984e683eb6d3dfe892d5534053d93a3be9603d7 | 32,110 | py | Python | trainer/trainer_audio.py | IIT-PAVIS/acoustic-images-self-supervision | 5d4e0e88aecbe49bf14b852a01dc687ce4de1f85 | [
"MIT"
] | 9 | 2020-07-11T09:10:42.000Z | 2020-11-23T14:30:41.000Z | trainer/trainer_audio.py | qpmnh/acoustic-images-self-supervision | 5d4e0e88aecbe49bf14b852a01dc687ce4de1f85 | [
"MIT"
] | null | null | null | trainer/trainer_audio.py | qpmnh/acoustic-images-self-supervision | 5d4e0e88aecbe49bf14b852a01dc687ce4de1f85 | [
"MIT"
] | 2 | 2020-09-15T12:05:44.000Z | 2020-10-19T06:06:26.000Z | from datetime import datetime
import tensorflow as tf
import numpy as np
import tensorflow.contrib.slim as slim
from tensorflow.python.ops import nn_ops
flags = tf.app.flags
FLAGS = flags.FLAGS
_FRAMES_PER_SECOND = 12
class Trainer(object):
def __init__(self, model_1, model_2, model_transfer, logger=None, d... | 55.077187 | 163 | 0.584024 |
7984e72e33bcbf62dc9628e9a6bc2c4261a31dbe | 7,603 | py | Python | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/8-extending_bound_36.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/8-extending_bound_36.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/8-extending_bound_36.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import Tuple, FrozenSet
from collections import Iterable
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_mak... | 36.729469 | 89 | 0.627647 |
7984e834834850b04bb405f241181c9ce4eef5d6 | 13,762 | py | Python | inception_utils.py | PeterouZh/BigGAN-PyTorch-1 | 722fe2e3b721f350c8e9b991d2839b0291f5cea7 | [
"MIT"
] | 56 | 2020-11-24T03:01:23.000Z | 2021-11-13T14:06:45.000Z | inception_utils.py | PeterouZh/BigGAN-PyTorch-1 | 722fe2e3b721f350c8e9b991d2839b0291f5cea7 | [
"MIT"
] | 5 | 2021-01-10T00:56:28.000Z | 2021-12-28T09:55:14.000Z | inception_utils.py | PeterouZh/BigGAN-PyTorch-1 | 722fe2e3b721f350c8e9b991d2839b0291f5cea7 | [
"MIT"
] | 7 | 2020-11-30T10:45:43.000Z | 2022-02-06T17:52:14.000Z | ''' Inception utilities
This file contains methods for calculating IS and FID, using either
the original numpy code or an accelerated fully-pytorch version that
uses a fast newton-schulz approximation for the matrix sqrt. There are also
methods for acquiring a desired number of samples from the Generat... | 39.432665 | 136 | 0.678462 |
7984e8d9df35e315c0dee839ec26a4685062503a | 2,641 | py | Python | src/wheel_inspect/filename.py | pombredanne/wheel-inspect | 0d0d861574e3fca57c6d4a00573e46dec600ae42 | [
"MIT"
] | null | null | null | src/wheel_inspect/filename.py | pombredanne/wheel-inspect | 0d0d861574e3fca57c6d4a00573e46dec600ae42 | [
"MIT"
] | null | null | null | src/wheel_inspect/filename.py | pombredanne/wheel-inspect | 0d0d861574e3fca57c6d4a00573e46dec600ae42 | [
"MIT"
] | null | null | null | import re
import attr
from .errors import InvalidFilenameError
# These patterns are interpreted with re.UNICODE in effect, so there's probably
# some character that matches \d but not \w that needs to be included
PYTHON_TAG_RGX = r'[\w\d]+'
ABI_TAG_RGX = r'[\w\d]+'
PLATFORM_TAG_RGX = r'[\w\d]+'
WHEEL_FILENAM... | 33.0125 | 79 | 0.574025 |
7984ea7af9f9f287b891f9cd990d2b5ac1523476 | 3,371 | py | Python | vendor/kmodules.xyz/client-go/hack/make.py | Charliekenney23/linode-k8s-e2e-tests | 1c31c0b433df76770950953cc9100a077c80fbbe | [
"Apache-2.0"
] | null | null | null | vendor/kmodules.xyz/client-go/hack/make.py | Charliekenney23/linode-k8s-e2e-tests | 1c31c0b433df76770950953cc9100a077c80fbbe | [
"Apache-2.0"
] | null | null | null | vendor/kmodules.xyz/client-go/hack/make.py | Charliekenney23/linode-k8s-e2e-tests | 1c31c0b433df76770950953cc9100a077c80fbbe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# http://stackoverflow.com/a/14050282
def check_antipackage():
from sys import version_info
sys_version = version_info[:2]
found = True
if sys_version < (3, 0):
# 'python 2'
from pkgutil import find_loader
found = find_loader('antipackage') is not None
... | 30.369369 | 228 | 0.643429 |
7984eaaf819ddd29f3a834d2dd018e4d0a5ef23c | 1,645 | py | Python | jitney/feed.py | ultranaut/jitney | 2378686a09c71cc228f0694929f8a02d3cc11f57 | [
"MIT"
] | null | null | null | jitney/feed.py | ultranaut/jitney | 2378686a09c71cc228f0694929f8a02d3cc11f57 | [
"MIT"
] | null | null | null | jitney/feed.py | ultranaut/jitney | 2378686a09c71cc228f0694929f8a02d3cc11f57 | [
"MIT"
] | null | null | null | """Handle the interactions with the GTFS feed."""
from urllib import urlretrieve as retrieve
import zipfile
import os
import csv
class Feed:
def __init__(self):
instance = os.path.realpath(__file__)
self.feed_uri = 'http://www.ultranaut.com/gtfs/rail_data.zip'
self.raw_data = None;
... | 30.462963 | 89 | 0.522796 |
7984ecbdb40659edd1747f9f5caf204b12d14345 | 1,284 | py | Python | test/swig/__init__.py | AyishaR/deepC | 1dc9707ef5ca9000fc13c3da7f1129685a83b494 | [
"Apache-2.0"
] | 223 | 2020-04-15T20:34:33.000Z | 2022-03-28T05:41:49.000Z | test/swig/__init__.py | AyishaR/deepC | 1dc9707ef5ca9000fc13c3da7f1129685a83b494 | [
"Apache-2.0"
] | 42 | 2019-07-29T15:57:12.000Z | 2020-04-08T15:12:48.000Z | test/swig/__init__.py | AyishaR/deepC | 1dc9707ef5ca9000fc13c3da7f1129685a83b494 | [
"Apache-2.0"
] | 58 | 2019-07-22T11:46:19.000Z | 2020-04-09T22:56:41.000Z | import os, sys, importlib
import unittest
# def load_tests(loader, tests, pattern):
def load_tests(loader, tests):
# suite = unittest.TestSuite();
test_file = "swig/passingTests.txt";
if ( os.path.isfile(test_file) == False ):
print("no test file in ", os.getcwd()+"/swig");
# return suite;... | 26.75 | 73 | 0.630062 |
7984ed35bc93c47069b18fab1c59be9efc6c896a | 33,416 | py | Python | core/controllers/editor.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | core/controllers/editor.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | core/controllers/editor.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Copyright 2014 The Oppia 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 requir... | 38.901048 | 80 | 0.675156 |
7984ee06d1fec88083738270951d26e94b3380ed | 2,851 | py | Python | plot.py | LimeThaw/ABM | 73b2e9193f72fb3d0c65be6d35e74eb10f7c5a83 | [
"Unlicense"
] | null | null | null | plot.py | LimeThaw/ABM | 73b2e9193f72fb3d0c65be6d35e74eb10f7c5a83 | [
"Unlicense"
] | null | null | null | plot.py | LimeThaw/ABM | 73b2e9193f72fb3d0c65be6d35e74eb10f7c5a83 | [
"Unlicense"
] | null | null | null | import matplotlib.pyplot as plt
import re
import json
infile = open("out.txt", "r")
values = infile.read()
infile.close()
popCount = []
happiness = []
crimes = []
gunCrimes = []
avgConnectedness = []
gunPossession = []
values = map(lambda x: x.split(", "), values[2:-2].split("), ("))
for val in values:
popCount.appe... | 20.963235 | 110 | 0.673448 |
7984eed373df9a828881c00413c91154516107ec | 906 | py | Python | functionaltests/api/v1/test_service.py | alex/solum | ca61f2844c5187378986c8b1356130b0d8dfa846 | [
"Apache-2.0"
] | 1 | 2015-11-08T13:02:17.000Z | 2015-11-08T13:02:17.000Z | functionaltests/api/v1/test_service.py | alex/solum | ca61f2844c5187378986c8b1356130b0d8dfa846 | [
"Apache-2.0"
] | null | null | null | functionaltests/api/v1/test_service.py | alex/solum | ca61f2844c5187378986c8b1356130b0d8dfa846 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2013 - Noorul Islam K M
#
# 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 applic... | 31.241379 | 75 | 0.722958 |
7984ef0efccb464e834e816b2829bdb5ac4f1bc1 | 19,264 | py | Python | tests/chainerx_tests/unit_tests/routines_tests/test_connection.py | zaltoprofen/chainer | 3b03f9afc80fd67f65d5e0395ef199e9506b6ee1 | [
"MIT"
] | 2 | 2019-08-12T21:48:04.000Z | 2020-08-27T18:04:20.000Z | tests/chainerx_tests/unit_tests/routines_tests/test_connection.py | zaltoprofen/chainer | 3b03f9afc80fd67f65d5e0395ef199e9506b6ee1 | [
"MIT"
] | null | null | null | tests/chainerx_tests/unit_tests/routines_tests/test_connection.py | zaltoprofen/chainer | 3b03f9afc80fd67f65d5e0395ef199e9506b6ee1 | [
"MIT"
] | 2 | 2019-07-16T00:24:47.000Z | 2021-02-26T10:27:27.000Z | import unittest
import chainer
from chainer import functions as F
import numpy
import pytest
import chainerx
from chainerx_tests import array_utils
from chainerx_tests import dtype_utils
from chainerx_tests import op_utils
# A special parameter object used to represent an unspecified argument.
class Unspecified(ob... | 36.904215 | 79 | 0.553416 |
7984f006eb4915dc8c8e1727f96c40daf27ba73c | 852 | py | Python | src/unwetter/config.py | wdr-data/unwetter2 | 72240b0b29e65e660dbf8f47fb79c31c90e990fa | [
"MIT"
] | null | null | null | src/unwetter/config.py | wdr-data/unwetter2 | 72240b0b29e65e660dbf8f47fb79c31c90e990fa | [
"MIT"
] | null | null | null | src/unwetter/config.py | wdr-data/unwetter2 | 72240b0b29e65e660dbf8f47fb79c31c90e990fa | [
"MIT"
] | null | null | null | #!/user/bin/env python3.6
import yaml
COLORS = {
"SEVERITIES": {
"Minor": "#ffcc00a0",
"Moderate": "#ff6600a0",
"Severe": "#ff0000a0",
"Extreme": "#b00087a3",
"Disabled": "#999999e0",
},
}
def severity_key(event):
mapped = {
"Minor": 0,
"Moderate"... | 20.285714 | 81 | 0.583333 |
7984f0fe0c93f991cd25c7a54a41867b342d5220 | 1,309 | py | Python | examples/categories/categories.py | audreylm/sendgrid-python | 79d5ea74108584fa52ad97b12799a27324bda30a | [
"MIT"
] | 1 | 2021-07-21T12:19:14.000Z | 2021-07-21T12:19:14.000Z | examples/categories/categories.py | audreylm/sendgrid-python | 79d5ea74108584fa52ad97b12799a27324bda30a | [
"MIT"
] | null | null | null | examples/categories/categories.py | audreylm/sendgrid-python | 79d5ea74108584fa52ad97b12799a27324bda30a | [
"MIT"
] | 1 | 2020-07-03T01:01:08.000Z | 2020-07-03T01:01:08.000Z | import sendgrid
import json
import os
sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
##################################################
# Retrieve all categories #
# GET /categories #
params = {'category': 'test_string', 'limit': 1, 'offset': 1}
response = sg.client.categories.get(query_... | 34.447368 | 173 | 0.655462 |
7984f17644177353c1b738f0419a63038588ec68 | 1,588 | py | Python | code_jam_counting_sheep.py | banana-coder/python3_snippets | d0142e4620aacd84dcb100feda779f039ceb7ad9 | [
"MIT"
] | null | null | null | code_jam_counting_sheep.py | banana-coder/python3_snippets | d0142e4620aacd84dcb100feda779f039ceb7ad9 | [
"MIT"
] | null | null | null | code_jam_counting_sheep.py | banana-coder/python3_snippets | d0142e4620aacd84dcb100feda779f039ceb7ad9 | [
"MIT"
] | null | null | null | def get_inputs_from_file(file_name):
read_file = open(file_name, "r")
text = read_file.read()
text_list = text.split("\n")
read_file.close()
return text_list
def write_output_file(text):
write_file = open("sheep.out", "w")
write_file.write(text)
write_file.close()
return True
def... | 25.206349 | 75 | 0.582494 |
7984f1de1076110662a5977010fcaa90780a159c | 5,211 | py | Python | indico/modules/events/abstracts/controllers/email_templates.py | andrea-guarino-sonarsource/indico | 2dada1f293daea913dec85ebb33c29a9f2cb92ac | [
"MIT"
] | null | null | null | indico/modules/events/abstracts/controllers/email_templates.py | andrea-guarino-sonarsource/indico | 2dada1f293daea913dec85ebb33c29a9f2cb92ac | [
"MIT"
] | 2 | 2021-05-26T09:16:52.000Z | 2021-05-26T09:28:59.000Z | indico/modules/events/abstracts/controllers/email_templates.py | andrea-guarino-sonarsource/indico | 2dada1f293daea913dec85ebb33c29a9f2cb92ac | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from flask import request
from werkzeug.exceptions import BadRequest
from indico.core.db import db
from i... | 40.395349 | 119 | 0.724813 |
7984f228fc703367a265ea0bbf8aaf8852ca50f7 | 29 | py | Python | actions/cancelTrade.py | crypto-bonds/cryptobonds-web-server | 3364ce237b87626a8b303645cee5348cacac695b | [
"Apache-2.0"
] | 2 | 2019-02-25T22:45:53.000Z | 2019-02-27T07:39:53.000Z | actions/cancelTrade.py | crypto-bonds/cryptobonds-web-server | 3364ce237b87626a8b303645cee5348cacac695b | [
"Apache-2.0"
] | 15 | 2019-02-24T05:39:15.000Z | 2019-02-25T22:34:15.000Z | actions/cancelTrade.py | crypto-bonds/django-client | 3364ce237b87626a8b303645cee5348cacac695b | [
"Apache-2.0"
] | 1 | 2019-12-17T18:30:29.000Z | 2019-12-17T18:30:29.000Z | #trader cancels trade order. | 29 | 29 | 0.793103 |
7984f2663716bd6a26ce56a321428f41df2dc5a1 | 3,031 | py | Python | bayes_race/gp/validate_model_f110.py | DaniMarts/bayesrace | 3d0d2b26dac2e33ad7e38513304cfb259abe351c | [
"MIT"
] | 23 | 2020-03-27T03:28:04.000Z | 2022-02-24T11:21:18.000Z | bayes_race/gp/validate_model_f110.py | DaniMarts/bayesrace | 3d0d2b26dac2e33ad7e38513304cfb259abe351c | [
"MIT"
] | 1 | 2021-07-08T22:02:15.000Z | 2021-07-08T22:02:15.000Z | bayes_race/gp/validate_model_f110.py | DaniMarts/bayesrace | 3d0d2b26dac2e33ad7e38513304cfb259abe351c | [
"MIT"
] | 17 | 2020-10-27T06:09:34.000Z | 2022-03-23T05:28:23.000Z | """ Validate a trained GP model for error discrepancy between kinematic and dynamic models.
"""
__author__ = 'Achin Jain'
__email__ = 'achinj@seas.upenn.edu'
import time
import numpy as np
import _pickle as pickle
import matplotlib.pyplot as plt
from sklearn.gaussian_process import GaussianProcessRegressor
from skl... | 34.443182 | 111 | 0.669416 |
7984f2e925f92f11af04e4974f8663de74611984 | 991 | py | Python | 2015/14/14-python.py | allengarvin/adventofcode | 004719c1721e514e3e8de8e94c25e0f858e96838 | [
"BSD-3-Clause"
] | null | null | null | 2015/14/14-python.py | allengarvin/adventofcode | 004719c1721e514e3e8de8e94c25e0f858e96838 | [
"BSD-3-Clause"
] | null | null | null | 2015/14/14-python.py | allengarvin/adventofcode | 004719c1721e514e3e8de8e94c25e0f858e96838 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/local/bin/python3.7
import sys, argparse, operator, re
def main(args):
deer = {k[0] : [int(k[3])] * int(k[6]) + [0] * int(k[13]) for k in [l.split() for l in open(args.file)]}
most = -1
for k, v in deer.items():
d, r = divmod(2503, len(v))
most = max(most, d * sum(v) + sum(v[:r]))
... | 36.703704 | 108 | 0.579213 |
7984f4d92b39003527d1be7009812cf101fed77a | 2,399 | py | Python | src/app/lenta/cache/redis.py | stas12312/lentacom-bot | 75923358e821ab9e1dd3263e0ed73e83a7e94cb1 | [
"MIT"
] | 6 | 2021-10-05T17:26:53.000Z | 2022-03-10T17:11:37.000Z | src/app/lenta/cache/redis.py | stas12312/lentacom-bot | 75923358e821ab9e1dd3263e0ed73e83a7e94cb1 | [
"MIT"
] | 10 | 2021-10-30T12:52:37.000Z | 2022-01-13T14:35:23.000Z | src/app/lenta/cache/redis.py | stas12312/lentacom-bot | 75923358e821ab9e1dd3263e0ed73e83a7e94cb1 | [
"MIT"
] | 2 | 2021-10-05T17:27:10.000Z | 2021-12-26T13:46:17.000Z | import asyncio
import json
import typing
import aioredis
from .base import BaseCache
class RedisCache(BaseCache):
def __init__(self,
host: str = "localhost",
port: int = 6379,
db: typing.Optional[int] = None,
password: typing.Optional[str] = N... | 33.788732 | 88 | 0.551897 |
7984f68b1dc2aaf6cbfad3226240e95b6c2d7f6a | 34,213 | py | Python | selfdrive/controls/lib/events.py | mechtechteam/openpilot | 5cda10dd8c75df36217252cb50bd8e453757e44f | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | mechtechteam/openpilot | 5cda10dd8c75df36217252cb50bd8e453757e44f | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | mechtechteam/openpilot | 5cda10dd8c75df36217252cb50bd8e453757e44f | [
"MIT"
] | null | null | null | import math
import os
from enum import IntEnum
from typing import Dict, Union, Callable, List, Optional
from cereal import log, car
import cereal.messaging as messaging
from common.conversions import Conversions as CV
from common.realtime import DT_CTRL
from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER
fro... | 36.43557 | 152 | 0.699003 |
7984f808996ef023610adcce0d241758a17443f0 | 13,244 | py | Python | dev/potentially_useful.py | aleksandra-kim/consumption_model_ch | 01d923751aec2880dafab1e4373e694e145d8210 | [
"BSD-3-Clause"
] | 1 | 2021-11-20T19:59:21.000Z | 2021-11-20T19:59:21.000Z | dev/potentially_useful.py | aleksandra-kim/consumption_model_ch | 01d923751aec2880dafab1e4373e694e145d8210 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T08:47:43.000Z | 2021-12-02T08:47:43.000Z | dev/potentially_useful.py | aleksandra-kim/consumption_model_ch | 01d923751aec2880dafab1e4373e694e145d8210 | [
"BSD-3-Clause"
] | null | null | null | import bw2data as bd
import bw2calc as bc
import bw2io as bi
from pypardiso import spsolve
import numpy as np
from pathlib import Path
import json
from consumption_model_ch.strategies.allocation import modify_exchanges
dirpath = Path(__file__).parent.resolve() / "data"
class exiobaseLCA:
def __init__(
... | 42.860841 | 157 | 0.59559 |
7984f808c31b2ce9b86ba5430501048e6c65c474 | 32,895 | py | Python | salt/modules/pacman.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | salt/modules/pacman.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | salt/modules/pacman.py | oba11/salt | ddc0286d57c5ce864b60bf43e5bc3007bf7c2549 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
A module to wrap pacman calls, since Arch is the best
(https://wiki.archlinux.org/index.php/Arch_is_the_best)
.. important::
If you feel that Salt should be using this module to manage packages on a
minion, and it is using a different module (or gives an error similar to
*'pkg.i... | 30.974576 | 128 | 0.58328 |
7984f814721c5b72dd9b2950035c1f88afc6d1f9 | 2,326 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/14_features/numtrees_30/rule_20.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/14_features/numtrees_30/rule_20.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/14_features/numtrees_30/rule_20.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Gender, obj[4]: Age, obj[5]: Children, obj[6]: Education, obj[7]: Occupation, obj[8]: Income, obj[9]: Bar, obj[10]: Coffeehouse, obj[11]: Restaurant20to50, obj[12]: Direction_same, obj[13]: Distance
# {"feature": "Coffeehouse", "instances... | 36.920635 | 279 | 0.548581 |
7984f97943c63f5f77ea56596db87068348164ca | 805 | py | Python | manage.py | RomanOsadchuk/nospoil | 24aee6dafadca41f22d0155cbd35f488b6d1daef | [
"MIT"
] | null | null | null | manage.py | RomanOsadchuk/nospoil | 24aee6dafadca41f22d0155cbd35f488b6d1daef | [
"MIT"
] | null | null | null | manage.py | RomanOsadchuk/nospoil | 24aee6dafadca41f22d0155cbd35f488b6d1daef | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nospoil.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | 35 | 77 | 0.642236 |
7984fa0c888e468d4e9158155a205282788e676e | 9,402 | py | Python | monai/handlers/utils.py | benduffy1/MONAI | 046e625b09262261373d7b8039fb652547201368 | [
"Apache-2.0"
] | 1 | 2022-02-15T09:32:28.000Z | 2022-02-15T09:32:28.000Z | monai/handlers/utils.py | benduffy1/MONAI | 046e625b09262261373d7b8039fb652547201368 | [
"Apache-2.0"
] | null | null | null | monai/handlers/utils.py | benduffy1/MONAI | 046e625b09262261373d7b8039fb652547201368 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 47.725888 | 118 | 0.629972 |
7984fb12dbea503fe3f8a89d473a6a5f9d8cc318 | 42,460 | py | Python | pythologist_reader/formats/inform/frame.py | jason-weirather/pythologist-reader | b1e4fd5fd51b1a2412c81f3d053c4b68be0b991f | [
"Apache-2.0"
] | null | null | null | pythologist_reader/formats/inform/frame.py | jason-weirather/pythologist-reader | b1e4fd5fd51b1a2412c81f3d053c4b68be0b991f | [
"Apache-2.0"
] | 3 | 2019-11-20T15:05:54.000Z | 2021-09-24T19:05:37.000Z | pythologist_reader/formats/inform/frame.py | jason-weirather/pythologist-reader | b1e4fd5fd51b1a2412c81f3d053c4b68be0b991f | [
"Apache-2.0"
] | 2 | 2021-04-06T18:15:02.000Z | 2021-04-07T15:44:52.000Z | import os, re, json, sys
from collections import OrderedDict
import pandas as pd
import numpy as np
from pythologist_reader import CellFrameGeneric
from uuid import uuid4
from pythologist_image_utilities import read_tiff_stack, map_image_ids, \
image_edges, watershed_image, \
... | 53.611111 | 177 | 0.619053 |
7984fc171e8935e9b53650fffba5f0cd69d54c2c | 23,831 | py | Python | prompt_tuning/train/layers_test.py | techthiyanes/prompt-tuning | 9f4d7082aa6dbd955e38488d6d3fa5a7c039f6c7 | [
"Apache-2.0"
] | null | null | null | prompt_tuning/train/layers_test.py | techthiyanes/prompt-tuning | 9f4d7082aa6dbd955e38488d6d3fa5a7c039f6c7 | [
"Apache-2.0"
] | null | null | null | prompt_tuning/train/layers_test.py | techthiyanes/prompt-tuning | 9f4d7082aa6dbd955e38488d6d3fa5a7c039f6c7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google.
#
# 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, soft... | 43.250454 | 83 | 0.676514 |
7984fc70e0e05302c8c176920b51dbea1f713945 | 1,821 | py | Python | src/genie/libs/parser/iosxe/tests/ShowPlatformResources/cli/equal/golden_output_fixed_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxe/tests/ShowPlatformResources/cli/equal/golden_output_fixed_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxe/tests/ShowPlatformResources/cli/equal/golden_output_fixed_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"rp": {
"0": {
"state": "H",
"role": "active",
"control_processer": {
"usage_perc": 2.5,
"max_perc": 100,
"warning_perc": 80,
"critical_perc": 90,
"state": "H",
... | 28.904762 | 41 | 0.27732 |
7984ffd1b9ed9b936c8a06f1125deaeb4578723f | 167 | py | Python | vimfiles/bundle/vim-python/submodules/pylint/tests/regrtest_data/fail_under_minus6.py | OrangeGzY/vimrc | ddcaedce2effbbd1014eddbceebeb8c621cd9f95 | [
"MIT"
] | 1 | 2021-05-08T07:32:20.000Z | 2021-05-08T07:32:20.000Z | vimfiles/bundle/vim-python/submodules/pylint/tests/regrtest_data/fail_under_minus6.py | OrangeGzY/vimrc | ddcaedce2effbbd1014eddbceebeb8c621cd9f95 | [
"MIT"
] | null | null | null | vimfiles/bundle/vim-python/submodules/pylint/tests/regrtest_data/fail_under_minus6.py | OrangeGzY/vimrc | ddcaedce2effbbd1014eddbceebeb8c621cd9f95 | [
"MIT"
] | null | null | null | """
Pylint score: -6
"""
import os
import nonexistent
def loop():
count = 0
for i in range(5):
count += 1
print(count)
path = '/tmp'
os.path.exists(path)
| 9.823529 | 20 | 0.60479 |
798500783d4ead64671980be1a320e2fb8248ddc | 226 | py | Python | app/api_service/services/registry.py | TheRayOfSeasons/worker-heavy-cicd | fa36e89dd68ee2fd8b37bda55d6bb885f31afaa7 | [
"MIT"
] | null | null | null | app/api_service/services/registry.py | TheRayOfSeasons/worker-heavy-cicd | fa36e89dd68ee2fd8b37bda55d6bb885f31afaa7 | [
"MIT"
] | null | null | null | app/api_service/services/registry.py | TheRayOfSeasons/worker-heavy-cicd | fa36e89dd68ee2fd8b37bda55d6bb885f31afaa7 | [
"MIT"
] | null | null | null | """
This python script acts as a registry of
services, much like the urls.py for views.
"""
from .workers import WorkerService
class Services:
"""
An enum of service instances.
"""
Workers = WorkerService()
| 16.142857 | 42 | 0.676991 |
79850161321b8fa65d1c072accd6ff939032e591 | 1,738 | py | Python | courses/01_Building_a_distributed_system_and_monitoring_system_with_Python/chapter03/3.4/practice/financialdata/crawler/taiwan_twse_stock_price.py | FinMind/Class | 74610a45ec169bff2bc841565973545adf57dee4 | [
"MIT"
] | 2 | 2022-03-24T11:17:27.000Z | 2022-03-27T08:41:32.000Z | courses/01_Building_a_distributed_system_and_monitoring_system_with_Python/chapter03/3.4/practice/financialdata/crawler/taiwan_twse_stock_price.py | FinMind/Class | 74610a45ec169bff2bc841565973545adf57dee4 | [
"MIT"
] | null | null | null | courses/01_Building_a_distributed_system_and_monitoring_system_with_Python/chapter03/3.4/practice/financialdata/crawler/taiwan_twse_stock_price.py | FinMind/Class | 74610a45ec169bff2bc841565973545adf57dee4 | [
"MIT"
] | 2 | 2022-03-22T15:27:52.000Z | 2022-03-25T07:17:18.000Z | import datetime
import json
import typing
import pandas as pd
import requests
URL = "https://www.twse.com.tw/exchangeReport/MI_INDEX?response=json&date={}&type=ALLBUT0999&_={}"
# 網頁瀏覽時, 所帶的 request header 參數, 模仿瀏覽器發送 request
HEADER = {
"Accept": "application/json, text/javascript, */*; q=0.01",
"Accept-Encodi... | 32.792453 | 135 | 0.611047 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.