hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f0c48d44f7d4b3b99dddba0e1b12fbe9a9b75a43 | 3,820 | py | Python | fedot/core/pipelines/tuning/hyperparams.py | vishalbelsare/FEDOT | 3a6f06b29cf2f173008d119f7cb5dc705a45f695 | [
"BSD-3-Clause"
] | null | null | null | fedot/core/pipelines/tuning/hyperparams.py | vishalbelsare/FEDOT | 3a6f06b29cf2f173008d119f7cb5dc705a45f695 | [
"BSD-3-Clause"
] | null | null | null | fedot/core/pipelines/tuning/hyperparams.py | vishalbelsare/FEDOT | 3a6f06b29cf2f173008d119f7cb5dc705a45f695 | [
"BSD-3-Clause"
] | null | null | null | import random
from hyperopt.pyll.stochastic import sample as hp_sample
from fedot.core.log import default_log
from fedot.core.pipelines.tuning.search_space import SearchSpace
class ParametersChanger:
"""
Class for the hyperparameters changing in the operation
:attribute operation_name: name of operatio... | 37.821782 | 112 | 0.644764 |
9962985bfb61935cb799cf56bef4d167a55e052c | 768 | py | Python | offer/59_01_MaxInSlidingWindow.py | DevRoss/python-offer-code | 580b2d7b265b3fa8a598287f42a4ca8d9f834eb1 | [
"MIT"
] | 1 | 2019-09-02T07:14:26.000Z | 2019-09-02T07:14:26.000Z | offer/59_01_MaxInSlidingWindow.py | DevRoss/python-offer-code | 580b2d7b265b3fa8a598287f42a4ca8d9f834eb1 | [
"MIT"
] | 1 | 2019-09-02T07:14:48.000Z | 2019-10-21T14:30:37.000Z | offer/59_01_MaxInSlidingWindow.py | DevRoss/python-offer-code | 580b2d7b265b3fa8a598287f42a4ca8d9f834eb1 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Created by Ross on 19-1-25
def solve(array: list, win_size):
if not array or win_size > len(array) or win_size <= 0:
return None
length = len(array)
cur_sum = max_sum = sum(array[:win_size])
win_start = 0
left = 1
right = win_size
while ... | 24.774194 | 59 | 0.546875 |
d6d2b8635ee42d014116c30e896012d136729228 | 1,206 | py | Python | demo.py | Atomatrons/PlayBot | a32d4943b6829dbf2ebada2aef12c4d2842866da | [
"MIT"
] | null | null | null | demo.py | Atomatrons/PlayBot | a32d4943b6829dbf2ebada2aef12c4d2842866da | [
"MIT"
] | null | null | null | demo.py | Atomatrons/PlayBot | a32d4943b6829dbf2ebada2aef12c4d2842866da | [
"MIT"
] | null | null | null | #!/usr/bin/env micropython
import Robot
import My_block
from sys import stderr
"""
What does this demo do???
"""
Robot.ShivaGyro.compass_point = 0
print("robot ready", stderr)
Robot.steer_pair.off(brake = True)
while True:
Robot.steer_pair.off(brake = True)
front_distance = Robot.ultra.distance_inches
... | 25.659574 | 56 | 0.648425 |
bde51382430e8aeba677080bf1734d8348cb28d4 | 10,199 | py | Python | scripts/beijing_air_quality/bochner.py | IsakFalk/IKML | 9b9c7ee2eccd8021295c47190f55f0c0616ea826 | [
"MIT"
] | null | null | null | scripts/beijing_air_quality/bochner.py | IsakFalk/IKML | 9b9c7ee2eccd8021295c47190f55f0c0616ea826 | [
"MIT"
] | null | null | null | scripts/beijing_air_quality/bochner.py | IsakFalk/IKML | 9b9c7ee2eccd8021295c47190f55f0c0616ea826 | [
"MIT"
] | null | null | null | import argparse
import pickle as pkl
import warnings
from collections import OrderedDict
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from implicit_kernel_meta_learning.algorithms import RidgeRegression
from implicit_kernel_meta_learning.data_utils i... | 33.221498 | 87 | 0.616531 |
6629239db29ece9a6d2ef175e9583fa3c3c586fe | 1,520 | py | Python | examples/src/main/python/ml/rformula_example.py | yqtaowhu/Spark | a381bce7285ec30f58f28f523dfcfe0c13221bbf | [
"Apache-2.0"
] | 2,327 | 2020-03-01T09:47:34.000Z | 2021-11-25T12:38:42.000Z | examples/src/main/python/ml/rformula_example.py | yqtaowhu/Spark | a381bce7285ec30f58f28f523dfcfe0c13221bbf | [
"Apache-2.0"
] | 607 | 2016-12-12T21:56:43.000Z | 2019-11-14T22:21:06.000Z | examples/src/main/python/ml/rformula_example.py | yqtaowhu/Spark | a381bce7285ec30f58f28f523dfcfe0c13221bbf | [
"Apache-2.0"
] | 686 | 2020-03-03T17:24:51.000Z | 2021-11-25T23:39:12.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 31.666667 | 74 | 0.682237 |
10f033e768dd0a29717ab49d399180ae9445d17a | 955 | py | Python | orchard/figlet.py | sk89q/plumeria | 601adffedc745ae7ecc32824e119789a51eaf237 | [
"MIT"
] | 18 | 2018-06-23T13:52:49.000Z | 2021-09-12T09:36:40.000Z | orchard/figlet.py | Tominous/plumeria | 601adffedc745ae7ecc32824e119789a51eaf237 | [
"MIT"
] | 2 | 2018-02-03T16:21:06.000Z | 2020-02-24T22:31:16.000Z | orchard/figlet.py | Tominous/plumeria | 601adffedc745ae7ecc32824e119789a51eaf237 | [
"MIT"
] | 2 | 2019-05-30T13:19:56.000Z | 2019-12-10T02:30:56.000Z | """Render ASCII art from text."""
from pyfiglet import Figlet
from plumeria.command import commands, CommandError
from plumeria.message import Response
from plumeria.util.ratelimit import rate_limit
MAX_LENGTH = 20
@commands.create('figlet', category='Fun')
@rate_limit(burst_size=2)
async def figlet(message):
"... | 23.875 | 80 | 0.557068 |
2c8c5b691eee844a9df7719e504ce038ef94c3d9 | 1,680 | py | Python | pong/migrations/0001_initial.py | vimm0/python_pong_scoreboard | 209ec935615010fb0136cfa8188fed635661a40d | [
"MIT"
] | null | null | null | pong/migrations/0001_initial.py | vimm0/python_pong_scoreboard | 209ec935615010fb0136cfa8188fed635661a40d | [
"MIT"
] | 3 | 2020-02-12T00:32:22.000Z | 2021-06-10T20:08:50.000Z | pong/migrations/0001_initial.py | vimm0/python_pong_scoreboard | 209ec935615010fb0136cfa8188fed635661a40d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-09 08:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | 35.744681 | 126 | 0.58869 |
7aa8e1d259c92af7a52cfe45c58230e3ea135d27 | 1,406 | py | Python | Map, filter, list comprehensions/Filter.py | Gabicolombo/Python-exercicios | 537d46769a3556c2c35c51b335a88a89d03059a9 | [
"MIT"
] | null | null | null | Map, filter, list comprehensions/Filter.py | Gabicolombo/Python-exercicios | 537d46769a3556c2c35c51b335a88a89d03059a9 | [
"MIT"
] | null | null | null | Map, filter, list comprehensions/Filter.py | Gabicolombo/Python-exercicios | 537d46769a3556c2c35c51b335a88a89d03059a9 | [
"MIT"
] | null | null | null | def keep_evens(nums):
new_seq = filter(lambda num: num % 2 == 0, nums)
return list(new_seq)
print(keep_evens([3, 4, 6, 7, 0, 1]))
# Saída [4, 6, 0]
'''
1. Write code to assign to the variable filter_testing all the elements in lst_check that have a w in them using filter.
'''
lst_check = ['plums', 'watermelon... | 42.606061 | 254 | 0.679943 |
071319d2fa5d094782062f4867663b106ddf2e8a | 4,803 | py | Python | pix2pix.py | ruifan831/mnistGANs | 252dd1df4b6ca839896200505c2b79b0551f3564 | [
"MIT"
] | 138 | 2020-10-16T03:58:46.000Z | 2022-03-30T13:09:33.000Z | pix2pix.py | a86612/mnistGANs | ba7e598933010695d75e9ac524fa1d1014022416 | [
"MIT"
] | 2 | 2020-11-15T08:35:04.000Z | 2022-01-24T06:26:03.000Z | pix2pix.py | a86612/mnistGANs | ba7e598933010695d75e9ac524fa1d1014022416 | [
"MIT"
] | 31 | 2020-10-20T03:20:41.000Z | 2022-03-29T14:15:06.000Z | # [Image-to-Image Translation with Conditional Adversarial Networks](https://arxiv.org/pdf/1611.07004.pdf)
import tensorflow as tf
from tensorflow import keras
import numpy as np
from visual import save_gan, cvt_gif
from utils import set_soft_gpu, save_weights
from mnist_ds import get_ds, get_test_x
from gan_cnn impor... | 36.386364 | 231 | 0.62919 |
970e9d73210e34e1c4b628598951363452ea44d4 | 1,022 | py | Python | src/sqlfluff/__init__.py | fbb-oc/sqlfluff | f50e72b748dcf700483d0e937aa2abcfb0a56e9e | [
"MIT"
] | 173 | 2018-11-15T15:39:13.000Z | 2020-09-24T17:34:55.000Z | src/sqlfluff/__init__.py | clairetaylor352/sqlfluff | 62900332228db323da323ce20df0c5e17ba9fcbf | [
"MIT"
] | 412 | 2018-11-15T16:34:59.000Z | 2020-09-29T01:50:00.000Z | src/sqlfluff/__init__.py | derickl/sqlfluff | ea2341ffa5325757acfa02cc9f7a07ac78b7a6c8 | [
"MIT"
] | 41 | 2018-11-23T08:48:50.000Z | 2020-09-19T08:24:30.000Z | """Sqlfluff is a SQL linter for humans."""
import sys
import pytest
# Expose the public API.
from sqlfluff.api import lint, fix, parse, list_rules, list_dialects
# Import metadata (using importlib_metadata backport for python versions <3.8)
if sys.version_info >= (3, 8):
from importlib import metadata
else:
i... | 27.621622 | 87 | 0.72407 |
52c61529f4bd89fea2cb6d03b4e801c922d23001 | 26,697 | py | Python | jina/hubble/hubio.py | Akshat-unt/jina | b0b058f99f3ee4dcbcbbf2acbf04c5d7e7e9c717 | [
"Apache-2.0"
] | 1 | 2021-12-18T06:54:49.000Z | 2021-12-18T06:54:49.000Z | jina/hubble/hubio.py | Akshat-unt/jina | b0b058f99f3ee4dcbcbbf2acbf04c5d7e7e9c717 | [
"Apache-2.0"
] | 2 | 2021-12-17T15:22:12.000Z | 2021-12-18T07:19:06.000Z | jina/hubble/hubio.py | Akshat-unt/jina | b0b058f99f3ee4dcbcbbf2acbf04c5d7e7e9c717 | [
"Apache-2.0"
] | null | null | null | """Module for wrapping Jina Hub API calls."""
import argparse
import hashlib
import json
import os
import random
from pathlib import Path
from typing import Optional, Dict
from urllib.parse import urlencode
from . import HubExecutor
from .helper import (
archive_package,
download_with_resume,
parse_hub_ur... | 34.447742 | 150 | 0.498595 |
2da3bd35afa3b02c6157564b59a2775820555233 | 14,571 | py | Python | segment.py | tnelsen16/OSSP | f4178f0120e21489b87a3a353afaf1dd33f1dee1 | [
"MIT"
] | null | null | null | segment.py | tnelsen16/OSSP | f4178f0120e21489b87a3a353afaf1dd33f1dee1 | [
"MIT"
] | null | null | null | segment.py | tnelsen16/OSSP | f4178f0120e21489b87a3a353afaf1dd33f1dee1 | [
"MIT"
] | null | null | null | #title: Watershed Transform
#author: Nick Wright
#adapted from: Justin Chen, Arnold Song
import argparse
import time
import numpy as np
import os
import h5py
from multiprocessing import Process, Queue
import skimage
from skimage import filters, morphology, feature, exposure
from skimage.future import graph
from scipy... | 37.076336 | 92 | 0.643813 |
340ffa6ff40af14c7c2249f3d23d97534313ca25 | 7,091 | py | Python | python_uiautomator/adb.py | maksonlee/android-uiconductor | 6d24724d670fee3046b31e3cb0cb41c373fe5bf8 | [
"Apache-2.0"
] | 113 | 2019-02-06T00:55:04.000Z | 2022-03-30T17:25:18.000Z | python_uiautomator/adb.py | maksonlee/android-uiconductor | 6d24724d670fee3046b31e3cb0cb41c373fe5bf8 | [
"Apache-2.0"
] | 60 | 2019-02-06T00:18:38.000Z | 2022-02-26T09:49:52.000Z | python_uiautomator/adb.py | maksonlee/android-uiconductor | 6d24724d670fee3046b31e3cb0cb41c373fe5bf8 | [
"Apache-2.0"
] | 30 | 2019-02-05T23:58:22.000Z | 2021-06-15T00:45:01.000Z | #!/usr/bin/python
#
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.515556 | 80 | 0.642364 |
e1e0ac2cbb0f25cbfcd234e1a3be7b0274b49bdd | 2,788 | py | Python | bottle-builder/builder.py | SwankSwashbucklers/bottle-builder | 583b5a9c9196a54b519044b0fd04381c716ba503 | [
"MIT"
] | null | null | null | bottle-builder/builder.py | SwankSwashbucklers/bottle-builder | 583b5a9c9196a54b519044b0fd04381c716ba503 | [
"MIT"
] | null | null | null | bottle-builder/builder.py | SwankSwashbucklers/bottle-builder | 583b5a9c9196a54b519044b0fd04381c716ba503 | [
"MIT"
] | null | null | null | """
"""
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from tempfile import gettempdir
import os
import os.path
import shutil
from stylesheets import StylesheetGenerator
from favicon import FaviconGenerator
from routes import RouteGenerator
from head import HeadGenerator
##########################... | 30.977778 | 100 | 0.626255 |
18f751972fb75b899117d81386e3b9f8185c6cab | 3,054 | py | Python | getXMLNessus.py | djfang/py-nessus-wrapper | 1a906f1fa62544bab521c7c459e5e22d6e47f3be | [
"Apache-2.0"
] | 1 | 2016-10-02T03:46:20.000Z | 2016-10-02T03:46:20.000Z | getXMLNessus.py | djfang/py-nessus-wrapper | 1a906f1fa62544bab521c7c459e5e22d6e47f3be | [
"Apache-2.0"
] | 1 | 2015-02-25T18:10:48.000Z | 2015-02-25T18:10:48.000Z | getXMLNessus.py | djfang/py-nessus-wrapper | 1a906f1fa62544bab521c7c459e5e22d6e47f3be | [
"Apache-2.0"
] | null | null | null | # Script to Download Nessus Formatted XML via Nessus API
# Dependent: https://github.com/metaevolution/py-nessus
from nessus import api
from nessus import util
import sys
import os
# Used for Chowning Files to Splunk User and Group
import pwd
import grp
##### Usage Information ####
# Syntax: getXMLNessus.py <Nessu... | 34.314607 | 122 | 0.656189 |
0380df44d5916c57fce829a1fc0e3897347afab2 | 49 | py | Python | constants.py | debug/reporter_api | 8e53f1f9da1119a9662f478692f1a083371da4dc | [
"MIT"
] | 1 | 2015-12-18T09:26:17.000Z | 2015-12-18T09:26:17.000Z | constants.py | debug/reporter-api | 8e53f1f9da1119a9662f478692f1a083371da4dc | [
"MIT"
] | null | null | null | constants.py | debug/reporter-api | 8e53f1f9da1119a9662f478692f1a083371da4dc | [
"MIT"
] | null | null | null | ACCESS_TOKEN = ""
APP_PATH = "Apps/Reporter-App"
| 16.333333 | 30 | 0.714286 |
3661fcdb4a8044b16e4c98b885c620f8a284fd22 | 3,485 | py | Python | examples/nlp/machine_translation/nmt_webapp/nmt_service.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | 2 | 2021-09-21T07:36:20.000Z | 2022-02-05T15:29:04.000Z | examples/nlp/machine_translation/nmt_webapp/nmt_service.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | null | null | null | examples/nlp/machine_translation/nmt_webapp/nmt_service.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | 12 | 2021-06-20T08:56:10.000Z | 2022-03-16T19:07:10.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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... | 34.50495 | 122 | 0.640172 |
05d151350974a07e32a08b9bd1a59a07dfed3f33 | 1,433 | py | Python | test/test_routes.py | thiwup/thiwup-search | 2eba31032ab44f34bef6bf975a1ab69f49c8b0b4 | [
"MIT"
] | null | null | null | test/test_routes.py | thiwup/thiwup-search | 2eba31032ab44f34bef6bf975a1ab69f49c8b0b4 | [
"MIT"
] | null | null | null | test/test_routes.py | thiwup/thiwup-search | 2eba31032ab44f34bef6bf975a1ab69f49c8b0b4 | [
"MIT"
] | null | null | null | import json
from test.conftest import demo_config
def test_main(client):
rv = client.get('/')
assert rv._status_code == 200
def test_search(client):
rv = client.get('/search?q=test')
assert rv._status_code == 200
def test_feeling_lucky(client):
rv = client.get('/search?q=!%20t... | 27.037736 | 77 | 0.647592 |
b2a45482df46f2e00474d8671389ae6d30fd0381 | 1,566 | py | Python | src/multiple_files_operations/prepend_to_all_names/tests/unit_tests_prepend_to_all_names.py | jolitp/automation_scripts | ba0c94e5212f0069b89f75a48fe2e2aafb5c921c | [
"MIT"
] | null | null | null | src/multiple_files_operations/prepend_to_all_names/tests/unit_tests_prepend_to_all_names.py | jolitp/automation_scripts | ba0c94e5212f0069b89f75a48fe2e2aafb5c921c | [
"MIT"
] | null | null | null | src/multiple_files_operations/prepend_to_all_names/tests/unit_tests_prepend_to_all_names.py | jolitp/automation_scripts | ba0c94e5212f0069b89f75a48fe2e2aafb5c921c | [
"MIT"
] | null | null | null | #! /usr/bin/python3
"""
tests for .py
"""
import unittest
import importlib.util # needed for importing scripts using the scripts path
# cSpell:disable
python_scripts_folder_path : str = "/home/jolitp/Projects/automation_scripts/"
# cSpell:enable
subfolder : str = "CHANGE_ME/"
spec = importlib.util.spec_from_file_... | 26.542373 | 97 | 0.697957 |
1f5cb8a6a61e317e8102f5c18767058bb630c6d9 | 83 | py | Python | final_hyp1/namespace_clearer.py | dhanraj-vedanth/IaaS_VPC_CDN | 262dbc7db63d5e76398dadc8015256fb37986e36 | [
"MIT"
] | null | null | null | final_hyp1/namespace_clearer.py | dhanraj-vedanth/IaaS_VPC_CDN | 262dbc7db63d5e76398dadc8015256fb37986e36 | [
"MIT"
] | null | null | null | final_hyp1/namespace_clearer.py | dhanraj-vedanth/IaaS_VPC_CDN | 262dbc7db63d5e76398dadc8015256fb37986e36 | [
"MIT"
] | null | null | null | f = open("varfile.txt", "w+")
for i in range(1,65536):
f.write(str(i)+"\n")
| 11.857143 | 29 | 0.53012 |
cf543b581fa4f2e3270a2f6e98968fe52bfe4acb | 587 | py | Python | thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t027eof.py | mail2nsrajesh/congress | a724dfb59c43a5e88e2b03e714a5f962d6976762 | [
"Apache-2.0"
] | 50 | 2015-04-21T14:12:01.000Z | 2020-06-01T06:23:13.000Z | thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t027eof.py | mail2nsrajesh/congress | a724dfb59c43a5e88e2b03e714a5f962d6976762 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t027eof.py | mail2nsrajesh/congress | a724dfb59c43a5e88e2b03e714a5f962d6976762 | [
"Apache-2.0"
] | 25 | 2015-05-22T04:02:33.000Z | 2020-01-14T12:15:12.000Z | import antlr3
import testbase
import unittest
class t027eof(testbase.ANTLRTest):
def setUp(self):
self.compileGrammar()
@testbase.broken("That's not how EOF is supposed to be used", Exception)
def testValid1(self):
cStream = antlr3.StringStream(' ')
lexer = self.getLexer(... | 22.576923 | 76 | 0.633731 |
4d6298b715561552d3d127af74cdc24a802cf6dc | 420 | py | Python | individual3.py | ekaterina533/lab3 | 981658a988f9be5d7773ec68f1ffb6d9ae81fd34 | [
"MIT"
] | null | null | null | individual3.py | ekaterina533/lab3 | 981658a988f9be5d7773ec68f1ffb6d9ae81fd34 | [
"MIT"
] | null | null | null | individual3.py | ekaterina533/lab3 | 981658a988f9be5d7773ec68f1ffb6d9ae81fd34 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from array import *
d=int(input("Введите день"))
m=int(input("Введите месяц"))
y=int(input("Введите год"))
if d>31: print("Ошибка")
elif m>12: print("Ошибка")
data = array('i', [31,28,31,30,31,30,31,31,30,31,30,31])
k=0
while m > 1:
k+=data[m-2]
m -= 1
k+=d
if y%4=... | 24.705882 | 56 | 0.62381 |
86f0816b607956acec234c7011d7c0783cbbfc77 | 8,697 | py | Python | lib/modeling/upsample.py | zhaowujie/EFPN-pytorch | 5c8ad3d0439c0168a34f6ec619b8b655813d3e2a | [
"MIT"
] | 2 | 2020-12-08T07:18:52.000Z | 2022-03-06T10:54:31.000Z | lib/modeling/upsample.py | zhaowujie/EFPN-pytorch | 5c8ad3d0439c0168a34f6ec619b8b655813d3e2a | [
"MIT"
] | null | null | null | lib/modeling/upsample.py | zhaowujie/EFPN-pytorch | 5c8ad3d0439c0168a34f6ec619b8b655813d3e2a | [
"MIT"
] | 2 | 2020-07-13T09:28:52.000Z | 2020-11-15T02:19:25.000Z | import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
import nn as mynn
import numpy as np
from torch.autograd import Variable
class SR(nn.Module):
def __init__(self):
super(SR, self).__init__()
self.blocks = nn.ModuleList()
self.blocks.append(Exte... | 31.172043 | 102 | 0.608716 |
11269a80eaafae5fee61588703e7a863a5696e08 | 9,103 | py | Python | htr_utils.py | dali92002/HTRbyMatching | 54a270ba703e35c66ab180d64a9d2b6f83f50d44 | [
"MIT"
] | 1 | 2022-02-10T17:26:25.000Z | 2022-02-10T17:26:25.000Z | htr_utils.py | dali92002/HTRbyMatching | 54a270ba703e35c66ab180d64a9d2b6f83f50d44 | [
"MIT"
] | null | null | null | htr_utils.py | dali92002/HTRbyMatching | 54a270ba703e35c66ab180d64a9d2b6f83f50d44 | [
"MIT"
] | null | null | null | import torch
from tqdm import tqdm
from torchvision.transforms import functional as Fsupp
import os
import numpy as np
from configs import getOptions
from PIL import Image, ImageFont, ImageDraw, ImageEnhance
import editdistance
import random
options = getOptions().parse()
alphabet_path = options.alphabet
threshold ... | 29.944079 | 146 | 0.494672 |
c61ac56bf86df36b51e482dd5f47adf219e2c079 | 1,877 | py | Python | tests/unit/query_builder/test_random_row_builder.py | ajw0100/professional-services-data-validator | b1dc82adf92adf19702f5ef41590c62c7c128c74 | [
"Apache-2.0"
] | 167 | 2021-05-27T19:43:43.000Z | 2022-03-16T02:42:30.000Z | tests/unit/query_builder/test_random_row_builder.py | ajw0100/professional-services-data-validator | b1dc82adf92adf19702f5ef41590c62c7c128c74 | [
"Apache-2.0"
] | 110 | 2021-05-27T14:49:09.000Z | 2022-03-31T11:10:41.000Z | tests/unit/query_builder/test_random_row_builder.py | ajw0100/professional-services-data-validator | b1dc82adf92adf19702f5ef41590c62c7c128c74 | [
"Apache-2.0"
] | 32 | 2021-06-23T22:00:59.000Z | 2022-03-30T03:32:20.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 27.602941 | 83 | 0.725093 |
d73592cb35759300fd649fb2d853229b039c71af | 62,681 | py | Python | ironic/tests/unit/api/controllers/v1/test_allocation.py | inmotionhosting/ironic | 1c7b5f82592e23ab66dddca56e0b059d3cb0710b | [
"Apache-2.0"
] | 1 | 2021-02-27T02:48:59.000Z | 2021-02-27T02:48:59.000Z | ironic/tests/unit/api/controllers/v1/test_allocation.py | inmotionhosting/ironic | 1c7b5f82592e23ab66dddca56e0b059d3cb0710b | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/api/controllers/v1/test_allocation.py | inmotionhosting/ironic | 1c7b5f82592e23ab66dddca56e0b059d3cb0710b | [
"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... | 48.893136 | 79 | 0.601331 |
820e9cff95e1833846cdde4dbdea75efb285caa9 | 8,511 | py | Python | src/problem3.py | yangzhen1/24-Exam3-201920 | 46da1d538b12d1a6a198762bb242e6ceab796e22 | [
"MIT"
] | null | null | null | src/problem3.py | yangzhen1/24-Exam3-201920 | 46da1d538b12d1a6a198762bb242e6ceab796e22 | [
"MIT"
] | null | null | null | src/problem3.py | yangzhen1/24-Exam3-201920 | 46da1d538b12d1a6a198762bb242e6ceab796e22 | [
"MIT"
] | null | null | null | """
Exam 3, problem 3.
Authors: Vibha Alangar, Aaron Wilkin, David Mutchler, Dave Fisher,
Matt Boutell, Amanda Stouder, their colleagues and
Zhen Yang. January 2019.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
import testing_helper
import time
def main():
""" Calls the TEST functi... | 35.169421 | 79 | 0.564329 |
421e6d9a6c8051149dd7447a7a670c0bf6ebf3a3 | 10,216 | py | Python | hydro/txmultibasicpumpedhydro.py | zarppy/MUREIL_2014 | 25ba16554ce8f614b9337e0fffce75da3fa259a4 | [
"MIT"
] | null | null | null | hydro/txmultibasicpumpedhydro.py | zarppy/MUREIL_2014 | 25ba16554ce8f614b9337e0fffce75da3fa259a4 | [
"MIT"
] | null | null | null | hydro/txmultibasicpumpedhydro.py | zarppy/MUREIL_2014 | 25ba16554ce8f614b9337e0fffce75da3fa259a4 | [
"MIT"
] | null | null | null | #
#
# Copyright (C) University of Melbourne 2012
#
#
#
#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... | 43.288136 | 109 | 0.629894 |
64c8046684da522c06e084f4fc821599a1b11326 | 1,438 | py | Python | 08_concurrency/cralwer/server.py | siddheshmhatre/high_performance_python | 4c308dddb400fcd4c4ab7c4d59dc56eb5dd58d1d | [
"RSA-MD"
] | 698 | 2015-01-06T14:10:26.000Z | 2022-03-29T03:05:09.000Z | 08_concurrency/cralwer/server.py | siddheshmhatre/high_performance_python | 4c308dddb400fcd4c4ab7c4d59dc56eb5dd58d1d | [
"RSA-MD"
] | 6 | 2015-01-12T18:03:24.000Z | 2021-06-02T13:05:20.000Z | 08_concurrency/cralwer/server.py | siddheshmhatre/high_performance_python | 4c308dddb400fcd4c4ab7c4d59dc56eb5dd58d1d | [
"RSA-MD"
] | 260 | 2015-01-16T13:58:57.000Z | 2022-03-28T16:49:34.000Z | from tornado import httpserver
from tornado import options
from tornado import ioloop
from tornado import web
from tornado import gen
import ujson as json
import time
from collections import defaultdict
options.define("port", default=8080, help="Port to serve on")
class AddMetric(web.RequestHandler):
metric_dat... | 27.653846 | 87 | 0.602225 |
2d3c2ac4a5416a9e6651223f499f1b76805f339a | 798 | py | Python | config/urls.py | eyobofficial/online-shop-tutorial | fe8f3b7b8c0d1ce9f9f6b019742bfed875e89999 | [
"MIT"
] | null | null | null | config/urls.py | eyobofficial/online-shop-tutorial | fe8f3b7b8c0d1ce9f9f6b019742bfed875e89999 | [
"MIT"
] | null | null | null | config/urls.py | eyobofficial/online-shop-tutorial | fe8f3b7b8c0d1ce9f9f6b019742bfed875e89999 | [
"MIT"
] | null | null | null | """config URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 34.695652 | 77 | 0.701754 |
18ebc409e07f72214afad9ebe024c027f0da7384 | 13,196 | py | Python | algorl/src/grid_environment.py | MattiaCinelli/AlgoRL | 54ca538aaad3f56a7f975c368168fb7ce0429322 | [
"MIT"
] | null | null | null | algorl/src/grid_environment.py | MattiaCinelli/AlgoRL | 54ca538aaad3f56a7f975c368168fb7ce0429322 | [
"MIT"
] | 1 | 2022-02-26T11:15:27.000Z | 2022-02-26T11:15:27.000Z | algorl/src/grid_environment.py | MattiaCinelli/AlgoRL | 54ca538aaad3f56a7f975c368168fb7ce0429322 | [
"MIT"
] | null | null | null | """Simple script to run snips of code"""
# Standard Libraries
import re
import sys
from pathlib import Path
# Third party libraries
import numpy as np
import pandas as pd
from itertools import product
import matplotlib.pyplot as plt
from matplotlib.table import Table
from typing import List, Dict, Tuple, Optional, Se... | 38.360465 | 144 | 0.519324 |
1228788290aef5804cd9f37224c8aee612c218e7 | 8,095 | py | Python | main.py | Kivoie/DanOBD2 | c8535f6a16221349db9bbad7be3e2c0eb00bdf8e | [
"MIT"
] | 2 | 2020-09-18T04:40:59.000Z | 2021-03-08T03:41:19.000Z | main.py | Kivoie/DanOBD2 | c8535f6a16221349db9bbad7be3e2c0eb00bdf8e | [
"MIT"
] | null | null | null | main.py | Kivoie/DanOBD2 | c8535f6a16221349db9bbad7be3e2c0eb00bdf8e | [
"MIT"
] | null | null | null | import obd
from obd import OBDStatus
import math
import time
import sys
import colorama
import re
import os
from tabulate import tabulate
import tkinter
from tkinter import *
from tkinter import messagebox
colorama.init() #initialize colorama
print("\x1b[2J", end="\r") #ASCII escape sequen... | 49.662577 | 170 | 0.618777 |
75e0a4876d85e0dba7da824abff20aab2f573975 | 2,217 | py | Python | ctypes/test_bindings.py | jnadro/howto | 4522f88e8f37b9d7a1f9ff087a693ec2f364c45b | [
"MIT"
] | null | null | null | ctypes/test_bindings.py | jnadro/howto | 4522f88e8f37b9d7a1f9ff087a693ec2f364c45b | [
"MIT"
] | null | null | null | ctypes/test_bindings.py | jnadro/howto | 4522f88e8f37b9d7a1f9ff087a693ec2f364c45b | [
"MIT"
] | null | null | null | import ctypes
# Load up the dll. On Windows the .dll is automatically appended.
lib = ctypes.cdll.LoadLibrary("build/libhowtoctypes.dylib")
# You can access exported functions as attributes of the dll object and
# call them like a Python callable.
print(lib.get())
# All the primitve C data types are here.
# They ca... | 29.56 | 112 | 0.72756 |
820bd598adc3b51224409027bd1d96d620a31bcf | 878 | py | Python | meilisearch_cli/_config.py | sanders41/meilisearch-cli | b691be610e84640fe9877aed23131e995eb717b8 | [
"MIT"
] | 2 | 2022-03-17T02:25:05.000Z | 2022-03-30T07:32:21.000Z | meilisearch_cli/_config.py | sanders41/meilisearch-cli | b691be610e84640fe9877aed23131e995eb717b8 | [
"MIT"
] | 86 | 2021-10-17T19:23:01.000Z | 2022-03-29T00:34:19.000Z | meilisearch_cli/_config.py | sanders41/meilisearch-cli | b691be610e84640fe9877aed23131e995eb717b8 | [
"MIT"
] | 2 | 2021-11-09T17:58:01.000Z | 2021-12-22T00:46:35.000Z | from rich.console import Console
from rich.theme import Theme
from typer import Option
MASTER_KEY_OPTION = Option(
None, envvar="MEILI_MASTER_KEY", help="The master key for the MeiliSearch instance"
)
PANEL_BORDER_COLOR = "sky_blue2"
RAW_OPTION = Option(
False, help="If this flag is set the raw JSON will be di... | 30.275862 | 177 | 0.728929 |
42a07d70473db82d122a7c6106348252aa064215 | 1,653 | py | Python | examples/py/okex-fetch-all-my-trades.py | Dan-krm/ccxt | 2ed8b7b8598e2934559822d81a8d14885b4d4ad3 | [
"MIT"
] | 1 | 2021-11-16T15:45:34.000Z | 2021-11-16T15:45:34.000Z | examples/py/okex-fetch-all-my-trades.py | Dan-krm/ccxt | 2ed8b7b8598e2934559822d81a8d14885b4d4ad3 | [
"MIT"
] | null | null | null | examples/py/okex-fetch-all-my-trades.py | Dan-krm/ccxt | 2ed8b7b8598e2934559822d81a8d14885b4d4ad3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt # noqa: E402
# make sure your version is the latest
print('CCXT Version:', ccxt.__version__)
exchange = ccxt.okx({
'apiKey': 'YOUR_API... | 25.828125 | 109 | 0.601331 |
a58882141c244cb407aeee3bc34281584c1d00c3 | 119 | py | Python | src/const.py | zd6/AA228_FinalProject | e678ea4370ca04ef06e712318ecbbae13976c9e1 | [
"MIT"
] | null | null | null | src/const.py | zd6/AA228_FinalProject | e678ea4370ca04ef06e712318ecbbae13976c9e1 | [
"MIT"
] | null | null | null | src/const.py | zd6/AA228_FinalProject | e678ea4370ca04ef06e712318ecbbae13976c9e1 | [
"MIT"
] | null | null | null | CHANNELS = 3
ROAD = 0
CITY = 1
PACKAGE = 2
DAY = 0
NIGHT = 1
PACKAGE_APPR = 10
directions = [[-1,0],[1,0],[0,-1],[0,1]] | 14.875 | 40 | 0.579832 |
c0607dd3ddf2ec38a28aa36d073d4b0768f4452d | 1,708 | py | Python | app/core/migrations/0001_initial.py | planet-winter/recipe-app-api | 96518a73f6da4dd017d39e7c0fd5d4e2ed599f41 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | planet-winter/recipe-app-api | 96518a73f6da4dd017d39e7c0fd5d4e2ed599f41 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | planet-winter/recipe-app-api | 96518a73f6da4dd017d39e7c0fd5d4e2ed599f41 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-02-10 14:41
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.235294 | 266 | 0.638759 |
965fb63e2e1c10fd234f1f34ec6b04451e71ae14 | 463 | py | Python | pineboolib/q3widgets/qtextstream.py | Aulla/pineboo | 3ad6412d365a6ad65c3bb2bdc03f5798d7c37004 | [
"MIT"
] | 2 | 2017-12-10T23:06:16.000Z | 2017-12-10T23:06:23.000Z | pineboolib/q3widgets/qtextstream.py | Aulla/pineboo | 3ad6412d365a6ad65c3bb2bdc03f5798d7c37004 | [
"MIT"
] | 36 | 2017-11-05T21:13:47.000Z | 2020-08-26T15:56:15.000Z | pineboolib/q3widgets/qtextstream.py | Aulla/pineboo | 3ad6412d365a6ad65c3bb2bdc03f5798d7c37004 | [
"MIT"
] | 8 | 2017-11-05T15:56:31.000Z | 2019-04-25T16:32:28.000Z | """Qtexstream module."""
from PyQt6 import QtCore # type: ignore[import]
class QTextStream(QtCore.QTextStream):
"""QTextStream class."""
def opIn(self, text_):
"""Set value to QTextStream."""
self.device().write(text_.encode())
def read(self, max_len: int = 0) -> str:
"""Read d... | 23.15 | 48 | 0.578834 |
abdc739faf1e1506512f4a825d365d174284ef4c | 336 | py | Python | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/debug/logcontext.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | 1 | 2015-07-12T07:24:17.000Z | 2015-07-12T07:24:17.000Z | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/debug/logcontext.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | null | null | null | pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/debug/logcontext.py | alexus37/AugmentedRealityChess | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | [
"MIT"
] | 1 | 2016-02-19T21:55:53.000Z | 2016-02-19T21:55:53.000Z | import traceback
fh = open( 'callcontext.txt','w')
def logContext():
"""Log the calling context to the context log-file"""
for (file,line,func,lineText) in traceback.extract_stack()[:-1]:
fh.write( "%(func)s %(file)s:%(line)s %(lineText)s\n"%locals())
fh.write('_____________________________________... | 37.333333 | 71 | 0.672619 |
b8b3b631f314fe961dd54cba2b9aa5399201149c | 1,797 | py | Python | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/EnableAlarmRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/EnableAlarmRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/EnableAlarmRequest.py | LittleJober/aliyun-openapi-python-sdk | f45cfa2248a5c8c47b2cebc1d4d1c2516b94df76 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.673469 | 74 | 0.772398 |
46c524dcc09b6d8017737573d3a16819da4fe5be | 5,075 | py | Python | build/lib/regressionmetrics/keras.py | ashishpatel26/regressionmetrics | b70344a78fc08e8f3aa45a88cc6db69064f8f77f | [
"MIT"
] | 6 | 2021-10-31T15:26:20.000Z | 2022-03-14T06:16:54.000Z | regressionmetrics/keras.py | Navaneeth-Sharma/regressionmetrics | b70344a78fc08e8f3aa45a88cc6db69064f8f77f | [
"MIT"
] | 1 | 2021-10-30T13:56:41.000Z | 2021-10-30T13:56:41.000Z | regressionmetrics/keras.py | Navaneeth-Sharma/regressionmetrics | b70344a78fc08e8f3aa45a88cc6db69064f8f77f | [
"MIT"
] | 6 | 2021-10-31T10:10:05.000Z | 2022-01-15T15:04:24.000Z | import tensorflow.keras.backend as K
import tensorflow as tf
def MeanAbsoErr(y_true, y_pred):
"""
Mean absolute error regression loss.
Args:
y_true ([np.array]): test samples
y_pred ([np.array]): predicted samples
Returns:
[float]: mean absolute error
"""
return K.mea... | 28.835227 | 232 | 0.62266 |
23b820bfa9de9ab6703d5507299ab67243adee7a | 2,009 | py | Python | example/config/urls.py | cic79/django-1.6-fine-uploader | 14ed9ca3e01ed9680760368da7c277aedb8dfde2 | [
"MIT"
] | null | null | null | example/config/urls.py | cic79/django-1.6-fine-uploader | 14ed9ca3e01ed9680760368da7c277aedb8dfde2 | [
"MIT"
] | null | null | null | example/config/urls.py | cic79/django-1.6-fine-uploader | 14ed9ca3e01ed9680760368da7c277aedb8dfde2 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# encoding:UTF-8
"""example URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(... | 41.854167 | 100 | 0.705824 |
7f887742cf4cfad3a411d8a219034f9c48c62b52 | 304 | py | Python | qr/ubication/admin.py | luismorenolopera/CIES_app_backend | d9cbd9035fab8dd529ef8daef3aad7e343618c21 | [
"MIT"
] | 4 | 2021-06-16T16:32:33.000Z | 2021-06-17T13:19:33.000Z | qr/ubication/admin.py | luismorenolopera/CIES_app_backend | d9cbd9035fab8dd529ef8daef3aad7e343618c21 | [
"MIT"
] | null | null | null | qr/ubication/admin.py | luismorenolopera/CIES_app_backend | d9cbd9035fab8dd529ef8daef3aad7e343618c21 | [
"MIT"
] | 1 | 2021-07-05T07:11:50.000Z | 2021-07-05T07:11:50.000Z | from django.contrib import admin
from ubication.models import (Country,
Province,
City,
Location)
admin.site.register(Country)
admin.site.register(Province)
admin.site.register(City)
admin.site.register(Location)
| 27.636364 | 39 | 0.575658 |
d64f66957e06f8275bb15ccb8106921aa5aff3de | 3,366 | py | Python | tests/unit_tests/scheduler_test.py | tgly307/mmpy_bot | 0ae52d9db86ac018f3d48dd52c11e4996f549073 | [
"MIT"
] | null | null | null | tests/unit_tests/scheduler_test.py | tgly307/mmpy_bot | 0ae52d9db86ac018f3d48dd52c11e4996f549073 | [
"MIT"
] | 51 | 2021-03-12T07:31:26.000Z | 2022-03-21T18:09:36.000Z | tests/unit_tests/scheduler_test.py | tgly307/mmpy_bot | 0ae52d9db86ac018f3d48dd52c11e4996f549073 | [
"MIT"
] | null | null | null | import tempfile
import time
from datetime import datetime
from pathlib import Path
from typing import Dict
import pytest
from mmpy_bot import schedule
def test_once():
def job(path: str):
print("job executed!")
path = Path(path).write_text(str(time.time()))
with tempfile.NamedTemporaryFile(... | 33 | 85 | 0.632501 |
52203cc8b5b54091c31c5dd3a4715ada05f272f7 | 682 | py | Python | src/_nbdev.py | AlanGanem/nbdev-data-science-template | f788ac41541218634d2dc68e8867256a8b154a55 | [
"Apache-2.0"
] | null | null | null | src/_nbdev.py | AlanGanem/nbdev-data-science-template | f788ac41541218634d2dc68e8867256a8b154a55 | [
"Apache-2.0"
] | null | null | null | src/_nbdev.py | AlanGanem/nbdev-data-science-template | f788ac41541218634d2dc68e8867256a8b154a55 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"func": "MLE_01_serving.ipynb",
"Class": "MLE_01_serving.ipynb"}
modules = ["de__extract.py",
"de__transform.py",
"de__load.py",
"ds__load.py",
"ds__prepr... | 27.28 | 61 | 0.589443 |
894af563dd96234d59ed50e7ec87a399d7d6e949 | 5,040 | py | Python | Wrapping/Python/vtk/__init__.py | Lin1225/vtk_v5.10.0 | b54ac74f4716572862365fbff28cd0ecb8d08c3d | [
"BSD-3-Clause"
] | 1 | 2018-10-01T06:53:32.000Z | 2018-10-01T06:53:32.000Z | Wrapping/Python/vtk/__init__.py | Lin1225/vtk_v5.10.0 | b54ac74f4716572862365fbff28cd0ecb8d08c3d | [
"BSD-3-Clause"
] | null | null | null | Wrapping/Python/vtk/__init__.py | Lin1225/vtk_v5.10.0 | b54ac74f4716572862365fbff28cd0ecb8d08c3d | [
"BSD-3-Clause"
] | 5 | 2015-03-23T21:13:19.000Z | 2022-01-03T11:15:39.000Z | """ This module loads the entire VTK library into its namespace. It
also allows one to use specific packages inside the vtk directory.."""
import os
import sys
# The dl module is used to force the symbols in the loaded VTK modules to
# be global, that is, to force symbols to be shared between modules. This
# used ... | 30.545455 | 79 | 0.684722 |
6e804010280313496e3fd68403a70d7f14469b8d | 3,455 | py | Python | tensorforce/core/objectives/action_value.py | JNC96/tensorforce | f691d1b5cc4a328f18712a14105fd90335bd3d3c | [
"Apache-2.0"
] | 1 | 2019-09-23T18:39:57.000Z | 2019-09-23T18:39:57.000Z | tensorforce/core/objectives/action_value.py | VonRosenchild/tensorforce | 92c987424c89e96238a3689aa4018df0d9d40504 | [
"Apache-2.0"
] | null | null | null | tensorforce/core/objectives/action_value.py | VonRosenchild/tensorforce | 92c987424c89e96238a3689aa4018df0d9d40504 | [
"Apache-2.0"
] | 1 | 2019-09-23T18:40:00.000Z | 2019-09-23T18:40:00.000Z | # Copyright 2018 Tensorforce Team. 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 la... | 42.654321 | 96 | 0.670333 |
9ec89b32d8743bcdbdc250fd11e1d83cb3e722ce | 1,622 | py | Python | app/main/routes.py | fretchen/ArduinoMagnetometerWeb | 1d8bee848e488b7136dbae20172bd8785931dee0 | [
"MIT"
] | null | null | null | app/main/routes.py | fretchen/ArduinoMagnetometerWeb | 1d8bee848e488b7136dbae20172bd8785931dee0 | [
"MIT"
] | null | null | null | app/main/routes.py | fretchen/ArduinoMagnetometerWeb | 1d8bee848e488b7136dbae20172bd8785931dee0 | [
"MIT"
] | null | null | null | from app import app, socketio, db
from app.main import bp
from app.thermocontrol.models import TempControl
from app.serialmonitor.models import ArduinoSerial
from app.cameracontrol.models import Camera
import git
from flask import render_template, flash, redirect, url_for, session
from flask_socketio import emit, dis... | 26.590164 | 84 | 0.692972 |
ceb75cffb13ed5c0b4c43c013f109c1989370ec1 | 129 | py | Python | lnt/server/db/rules/rule_testhook.py | llvm/lnt | 77e0a25f996a5363e23f701c0d995525a5c6484a | [
"Apache-2.0"
] | 19 | 2019-01-15T03:04:00.000Z | 2021-12-08T00:09:01.000Z | lnt/server/db/rules/rule_testhook.py | llvm/lnt | 77e0a25f996a5363e23f701c0d995525a5c6484a | [
"Apache-2.0"
] | 5 | 2019-04-11T06:22:18.000Z | 2021-09-13T17:41:14.000Z | lnt/server/db/rules/rule_testhook.py | llvm/lnt | 77e0a25f996a5363e23f701c0d995525a5c6484a | [
"Apache-2.0"
] | 21 | 2019-02-10T02:47:55.000Z | 2022-03-31T14:16:36.000Z | """
Test rule system. A simple rules, with one hook that can be run.
"""
def test():
return "Foo."
post_test_hook = test
| 11.727273 | 64 | 0.643411 |
e68fb224f7da85a53196d623386fbccdc734d68f | 943 | py | Python | build_an_ai_startup_demo/app/admin.py | bbueno5000/BuildAnAIStartUpDemo | f70371802a2546530c34b7f04e2b644cd1faec8a | [
"MIT"
] | null | null | null | build_an_ai_startup_demo/app/admin.py | bbueno5000/BuildAnAIStartUpDemo | f70371802a2546530c34b7f04e2b644cd1faec8a | [
"MIT"
] | null | null | null | build_an_ai_startup_demo/app/admin.py | bbueno5000/BuildAnAIStartUpDemo | f70371802a2546530c34b7f04e2b644cd1faec8a | [
"MIT"
] | null | null | null | """
DOCSTRING
"""
import app
import flask
import flask_admin
import os
import werkzeug.exceptions
admin = flask_admin.Admin(app.app, name='Admin', template_mode='bootstrap3')
class ModelView(flask.ext.admin.contrib.sqla.ModelView):
"""
DOCSTRING
"""
def is_accessible(self):
"""
DOCSTRI... | 31.433333 | 93 | 0.671262 |
f18126aafc890bf929c1996ed863b442dfa51f06 | 972 | py | Python | SumOfNumbers.py | Williano/Solved-Practice-Questions | 40ab255d0a9270dc2a3072703e534ff551961512 | [
"MIT"
] | null | null | null | SumOfNumbers.py | Williano/Solved-Practice-Questions | 40ab255d0a9270dc2a3072703e534ff551961512 | [
"MIT"
] | null | null | null | SumOfNumbers.py | Williano/Solved-Practice-Questions | 40ab255d0a9270dc2a3072703e534ff551961512 | [
"MIT"
] | null | null | null | # Script: SumOfNumbers.py
# Description: This program uses a loop that asks the user to enter a series of positive numbers.
# The user would enter a negative number to signal the end of the series.
# After all the positive numbers have been entered, the program would display their sum.
# Progr... | 28.588235 | 101 | 0.646091 |
a93a6fcd8412cb19cf8d2b2bf8e867dd4f695d99 | 380 | py | Python | sinoera/tst/ganzhi/test_renzi23.py | sinotradition/sinoera | 1e93482c0a56a8917bc7ceebeef5b63b24ca3651 | [
"Apache-2.0"
] | 1 | 2015-12-14T15:14:35.000Z | 2015-12-14T15:14:35.000Z | sinoera/tst/ganzhi/test_renzi23.py | sinotradition/sinoera | 1e93482c0a56a8917bc7ceebeef5b63b24ca3651 | [
"Apache-2.0"
] | null | null | null | sinoera/tst/ganzhi/test_renzi23.py | sinotradition/sinoera | 1e93482c0a56a8917bc7ceebeef5b63b24ca3651 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#coding=utf-8
'''This is test module
@author: sheng
@contact: sinotradition@gmail.com
@copyright: License according to the project license.
'''
import unittest
from sinoera.ganzhi import renzi23
TestRenzi23Functions(unittest.TestCase):
def setUp(self):
pass
def test_XXX(self):
... | 15.833333 | 53 | 0.7 |
b73941d6247090e9c4e2f33d918ed59718145008 | 432 | py | Python | app/core/migrations/0006_recipe_image.py | frclasso/django_rest_tdd_dockerdvanced | ebd674176473897b0f5d6d1e45c58eda480c325b | [
"MIT"
] | null | null | null | app/core/migrations/0006_recipe_image.py | frclasso/django_rest_tdd_dockerdvanced | ebd674176473897b0f5d6d1e45c58eda480c325b | [
"MIT"
] | null | null | null | app/core/migrations/0006_recipe_image.py | frclasso/django_rest_tdd_dockerdvanced | ebd674176473897b0f5d6d1e45c58eda480c325b | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2020-12-26 16:23
import core.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_recipe'),
]
operations = [
migrations.AddField(
model_name='recipe',
name='image',
... | 21.6 | 94 | 0.622685 |
a84bb02c1250e6dbc99472b0ac9e7e433ffe65d5 | 15,663 | py | Python | python/roboscheduler/fields.py | sdss/roboscheduler | d06000381e379130e54e704e4f2df09326b4dded | [
"BSD-3-Clause"
] | null | null | null | python/roboscheduler/fields.py | sdss/roboscheduler | d06000381e379130e54e704e4f2df09326b4dded | [
"BSD-3-Clause"
] | 3 | 2021-04-17T01:15:01.000Z | 2021-07-01T22:05:58.000Z | python/roboscheduler/fields.py | sdss/roboscheduler | d06000381e379130e54e704e4f2df09326b4dded | [
"BSD-3-Clause"
] | 1 | 2021-12-07T16:25:23.000Z | 2021-12-07T16:25:23.000Z | import numpy as np
import fitsio
import roboscheduler.cadence
import sys
try:
import sdssdb.peewee.sdss5db.opsdb as opsdb
import sdssdb.peewee.sdss5db.targetdb as targetdb
_database = True
except:
_database = False
# Class to define a singleton
class FieldsSingleton(type):
_instances = {}
de... | 31.770791 | 103 | 0.556024 |
638bb830339d94e181895d725a1b205d18770b64 | 7,684 | py | Python | pysteps/postprocessing/probmatching.py | Fangyh09/pysteps | 9eb7f4ead0a946d98b7504d1bd66b18dc405ed51 | [
"BSD-3-Clause"
] | 6 | 2019-01-06T07:42:55.000Z | 2021-02-03T13:59:50.000Z | pysteps/postprocessing/probmatching.py | Fangyh09/pysteps | 9eb7f4ead0a946d98b7504d1bd66b18dc405ed51 | [
"BSD-3-Clause"
] | 5 | 2018-12-23T15:10:27.000Z | 2021-01-06T15:03:03.000Z | pysteps/postprocessing/probmatching.py | Fangyh09/pysteps | 9eb7f4ead0a946d98b7504d1bd66b18dc405ed51 | [
"BSD-3-Clause"
] | 2 | 2019-08-06T14:16:43.000Z | 2019-08-13T00:36:31.000Z | """
pysteps.postprocessing.probmatching
===================================
Methods for matching the probability distribution of two data sets.
.. autosummary::
:toctree: ../generated/
compute_empirical_cdf
nonparam_match_empirical_cdf
pmm_init
pmm_compute
shift_scale
"""
import numpy as np
... | 29.782946 | 98 | 0.639641 |
e0abfb2e26779c07baf071b9141c0c588b4145f5 | 2,798 | py | Python | utils.py | vinthony/depth-distillation | fd53bceda4f317a5ed3832a2932a1eeb7eeb456b | [
"MIT"
] | 44 | 2020-07-17T03:29:47.000Z | 2022-03-14T14:38:12.000Z | utils.py | vinthony/depth-distillation | fd53bceda4f317a5ed3832a2932a1eeb7eeb456b | [
"MIT"
] | 3 | 2020-07-23T16:06:45.000Z | 2022-03-18T12:42:16.000Z | utils.py | vinthony/depth-distillation | fd53bceda4f317a5ed3832a2932a1eeb7eeb456b | [
"MIT"
] | 9 | 2020-11-25T12:39:53.000Z | 2021-11-27T08:32:42.000Z | import glob
import random
import os
import numpy as np
import torch
import torch.nn.functional as F
from sklearn.metrics import confusion_matrix
from skimage import transform
# import pydensecrf.densecrf as dcrf
def _sigmoid(x):
return 1 / (1 + np.exp(-x))
def crf_refine(img, annos):
assert img.dtype == np.... | 24.330435 | 106 | 0.632952 |
63b4f24361c2c59674a9715575db42b5bb402d0e | 3,213 | py | Python | salt/utils/psutil_compat.py | dlanderson/salt | 484266444944cb767535fe3d16d1102e8da855ab | [
"Apache-2.0"
] | null | null | null | salt/utils/psutil_compat.py | dlanderson/salt | 484266444944cb767535fe3d16d1102e8da855ab | [
"Apache-2.0"
] | null | null | null | salt/utils/psutil_compat.py | dlanderson/salt | 484266444944cb767535fe3d16d1102e8da855ab | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Version agnostic psutil hack to fully support both old (<2.0) and new (>=2.0)
psutil versions.
The old <1.0 psutil API is dropped in psutil 3.0
Should be removed once support for psutil <2.0 is dropped. (eg RHEL 6)
Built off of http://grodola.blogspot.com/2014/01/psutil-20-porting.html
''... | 31.811881 | 82 | 0.615935 |
ce99d2afb96c5c74b5f2c414543605a6a4a03788 | 252 | py | Python | mutation/mutators.py | nemoNoboru/GEN0 | 715385f5f243db04c86e6737a8ee93c9af786078 | [
"MIT"
] | 1 | 2017-11-27T09:19:59.000Z | 2017-11-27T09:19:59.000Z | mutation/mutators.py | nemoNoboru/GEN0 | 715385f5f243db04c86e6737a8ee93c9af786078 | [
"MIT"
] | null | null | null | mutation/mutators.py | nemoNoboru/GEN0 | 715385f5f243db04c86e6737a8ee93c9af786078 | [
"MIT"
] | null | null | null | import numpy as np
def cross_with_mutation(genA, genB):
for i in range(len(genA)):
if np.random.random() > 0.5:
genA[i] = genB[i]
if np.random.random() > 0.99:
genA[i] = np.random.normal()
return genA
| 21 | 40 | 0.551587 |
47019f1e7112ea1bff833ed4b18ba907ca11e40b | 2,995 | py | Python | flask_stupe/app.py | numberly/flask-stupe | 1aabda272d84c0f651c6302cb5eefe11c46567ef | [
"MIT"
] | 35 | 2018-03-23T08:51:51.000Z | 2020-08-24T05:18:55.000Z | flask_stupe/app.py | numberly/flask-stupe | 1aabda272d84c0f651c6302cb5eefe11c46567ef | [
"MIT"
] | 25 | 2018-03-23T08:59:04.000Z | 2020-01-03T10:22:45.000Z | flask_stupe/app.py | numberly/flask-stupe | 1aabda272d84c0f651c6302cb5eefe11c46567ef | [
"MIT"
] | 5 | 2018-04-02T08:43:58.000Z | 2019-09-29T15:54:21.000Z | import os
from pkgutil import iter_modules
from flask import Blueprint, Flask
from flask_stupe.config import Config
from flask_stupe.converters import converters
from flask_stupe.logging import log
from flask_stupe.request import Request
class Stupeflask(Flask):
config_class = Config
request_class = Request... | 38.397436 | 77 | 0.656761 |
3315b22cb561425141632513593ab77595972ea6 | 1,070 | py | Python | AplicacionCiclo3/views/userDetailView.py | Dantiteis/P50-G7-MinTIC2022 | 2413bab55ffc0eb023fffc982913082a1f1ceb82 | [
"MIT"
] | null | null | null | AplicacionCiclo3/views/userDetailView.py | Dantiteis/P50-G7-MinTIC2022 | 2413bab55ffc0eb023fffc982913082a1f1ceb82 | [
"MIT"
] | null | null | null | AplicacionCiclo3/views/userDetailView.py | Dantiteis/P50-G7-MinTIC2022 | 2413bab55ffc0eb023fffc982913082a1f1ceb82 | [
"MIT"
] | null | null | null | from django.conf import settings
from AplicacionCiclo3.serializers import userSerializers
from rest_framework import generics, status
from rest_framework.response import Response
from rest_framework_simplejwt.backends import TokenBackend
from rest_framework.permissions import IsAuthenticated
from AplicacionCiclo3.model... | 48.636364 | 80 | 0.770093 |
c2ee42a0e59c2ac51b368b0a1f88c592e2c0eb3f | 415 | py | Python | PycharmProjects/novoPrograma/venv/Scripts/pip-script.py | AldenSB/Exercicios_em_python | 5f2174e9157bdba1ef0bbb5c6fcadc81a803e9da | [
"MIT"
] | null | null | null | PycharmProjects/novoPrograma/venv/Scripts/pip-script.py | AldenSB/Exercicios_em_python | 5f2174e9157bdba1ef0bbb5c6fcadc81a803e9da | [
"MIT"
] | null | null | null | PycharmProjects/novoPrograma/venv/Scripts/pip-script.py | AldenSB/Exercicios_em_python | 5f2174e9157bdba1ef0bbb5c6fcadc81a803e9da | [
"MIT"
] | null | null | null | #!C:\Users\Sony\PycharmProjects\novoPrograma\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.ar... | 31.923077 | 69 | 0.672289 |
c8ece3e0dfdfda36d64e9b84cd3017d2bc459d56 | 1,864 | py | Python | qsr_lib/tests/abstractclass_unittest_monadic.py | yianni/rtd-dbg | 3b730c9122d73c30fbe8fcc4255e6baf82210640 | [
"MIT"
] | 15 | 2015-06-15T16:50:37.000Z | 2022-03-27T09:25:56.000Z | qsr_lib/tests/abstractclass_unittest_monadic.py | yianni/rtd-dbg | 3b730c9122d73c30fbe8fcc4255e6baf82210640 | [
"MIT"
] | 205 | 2015-01-22T12:02:59.000Z | 2022-03-29T11:59:55.000Z | qsr_lib/tests/abstractclass_unittest_monadic.py | yianni/rtd-dbg | 3b730c9122d73c30fbe8fcc4255e6baf82210640 | [
"MIT"
] | 16 | 2015-02-04T23:13:18.000Z | 2022-03-08T13:45:53.000Z | #!/usr/bin/env python
from __future__ import print_function, division
from abc import ABCMeta
from abstractclass_unittest import AbstractClass_UnitTest
from qsrlib.qsrlib import QSRlib_Request_Message
from unittests_utils import *
class Abstractclass_Unittest_Monadic(AbstractClass_UnitTest):
__metaclass__ = ABCMet... | 53.257143 | 92 | 0.697961 |
46fb7867dc2d3f6772772812d99acba5b9c07aa5 | 16,190 | py | Python | package/tests/test_connectivity/test_create_traffic_mirroring.py | DYeag/AWS-Shell | b5318e72373b1a948ac6aced1c0bb4566d5ae46f | [
"0BSD"
] | 3 | 2016-08-22T07:14:56.000Z | 2018-03-16T07:31:44.000Z | package/tests/test_connectivity/test_create_traffic_mirroring.py | DYeag/AWS-Shell | b5318e72373b1a948ac6aced1c0bb4566d5ae46f | [
"0BSD"
] | 470 | 2016-03-24T13:38:08.000Z | 2022-02-05T01:14:05.000Z | package/tests/test_connectivity/test_create_traffic_mirroring.py | DYeag/AWS-Shell | b5318e72373b1a948ac6aced1c0bb4566d5ae46f | [
"0BSD"
] | 9 | 2016-06-20T11:41:54.000Z | 2020-11-21T00:42:45.000Z | import json
import logging
from unittest import TestCase
from uuid import uuid4
import boto3
from cloudshell.api.cloudshell_api import CloudShellAPISession
from jsonschema import validate
from mock import Mock
from cloudshell.cp.aws.domain.common.cancellation_service import CommandCancellationService
from cloudshel... | 45.994318 | 120 | 0.430204 |
0d2f8b9f2a71eff22cc224c99bf2d0fdb805c9c5 | 401 | py | Python | tunacell/__main__.py | LeBarbouze/tunacell | 837d57e1e6caeddf2e6bcdd2db2986fb456dd605 | [
"MIT"
] | null | null | null | tunacell/__main__.py | LeBarbouze/tunacell | 837d57e1e6caeddf2e6bcdd2db2986fb456dd605 | [
"MIT"
] | 3 | 2017-08-10T11:19:01.000Z | 2019-08-11T11:11:00.000Z | tunacell/__main__.py | LeBarbouze/tunacell | 837d57e1e6caeddf2e6bcdd2db2986fb456dd605 | [
"MIT"
] | 5 | 2017-08-08T22:31:24.000Z | 2021-08-06T04:08:08.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
from tunacell import __version__
def main():
argparser = argparse.ArgumentParser()
argparser.add_argument('-V', '--version', action='store_true', help='Print tunacell version')
args = argparser.parse_args... | 25.0625 | 97 | 0.703242 |
34f2f3b54fa58e872c6adc4f8f08b9d69d5bdf05 | 3,383 | py | Python | final_project_2.py | selenberryfinn/right_size_for_online_shopping | 81d9cf849c2c7996bae1a31ada6e87cf1688757c | [
"MIT"
] | null | null | null | final_project_2.py | selenberryfinn/right_size_for_online_shopping | 81d9cf849c2c7996bae1a31ada6e87cf1688757c | [
"MIT"
] | null | null | null | final_project_2.py | selenberryfinn/right_size_for_online_shopping | 81d9cf849c2c7996bae1a31ada6e87cf1688757c | [
"MIT"
] | null | null | null | import pandas as pd
import re
import requests
from bs4 import BeautifulSoup
from sklearn.metrics.pairwise import cosine_similarity, euclidean_distances
from sklearn.feature_extraction.text import TfidfVectorizer
import spacy
from sklearn.linear_model import LinearRegression
import pylab as plt
##translator -- paul
from... | 22.111111 | 152 | 0.700266 |
f2e9446bd25d5545ba46697a6b92084961a107ad | 2,570 | py | Python | adlmagics/adlmagics/magics/adls/adls_file_sampling_magic.py | Azure/Azure-Data-Service-Notebook | 6bd28587c9fa0a7c1f9113f638b790b1773c5585 | [
"MIT"
] | 6 | 2018-06-06T08:37:53.000Z | 2020-06-01T13:13:13.000Z | adlmagics/adlmagics/magics/adls/adls_file_sampling_magic.py | Azure/Azure-Data-Service-Notebook | 6bd28587c9fa0a7c1f9113f638b790b1773c5585 | [
"MIT"
] | 30 | 2018-06-08T02:47:18.000Z | 2018-07-25T07:07:07.000Z | adlmagics/adlmagics/magics/adls/adls_file_sampling_magic.py | Azure/Azure-Data-Service-Notebook | 6bd28587c9fa0a7c1f9113f638b790b1773c5585 | [
"MIT"
] | 5 | 2018-06-06T08:37:55.000Z | 2021-01-07T09:15:15.000Z | from IPython.core.magic_arguments import magic_arguments, argument, parse_argstring
from pathlib import Path
from adlmagics.magics.adls.adls_magic_base import AdlsMagicBase
from adlmagics.session_consts import session_adls_account, session_file_encoding
from adlmagics.exceptions import MagicArgumentMissingError, Magic... | 49.423077 | 161 | 0.694553 |
4fa54072f8d84bcefb6f2217d0aca28ef310793b | 8,092 | py | Python | src/build/build_request.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 11,356 | 2017-12-08T19:42:32.000Z | 2022-03-31T16:55:25.000Z | src/build/build_request.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 2,402 | 2017-12-08T22:31:01.000Z | 2022-03-28T19:25:52.000Z | src/build/build_request.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 1,343 | 2017-12-08T19:47:19.000Z | 2022-03-26T11:31:36.000Z | # Status: being ported by Vladimir Prus
# TODO: need to re-compare with mainline of .jam
# Base revision: 40480
#
# (C) Copyright David Abrahams 2002. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as ... | 36.286996 | 103 | 0.636925 |
32435d0e1cf0817ed40bff54885cadaf7fdafa7b | 59 | py | Python | solo learn.py | priyalbhatewara123/Python-programs | 90b84310101b76c14b89f256ee9206711908a4ae | [
"bzip2-1.0.6"
] | null | null | null | solo learn.py | priyalbhatewara123/Python-programs | 90b84310101b76c14b89f256ee9206711908a4ae | [
"bzip2-1.0.6"
] | null | null | null | solo learn.py | priyalbhatewara123/Python-programs | 90b84310101b76c14b89f256ee9206711908a4ae | [
"bzip2-1.0.6"
] | null | null | null | float("210" * int(input("Enter a number:" )))
print(float)
| 19.666667 | 45 | 0.644068 |
a86e9882c849dc16a896f5440c39ad121da2ac7e | 545 | py | Python | tests_scripts/Sprint1-f19/Sprint1-f19/tests/test_registercampuspartner.py | uno-isqa-8950/uno-cpi | c8fa01eb253e6a56046009c551a84c36c28cd8da | [
"MIT"
] | 13 | 2018-08-30T16:03:18.000Z | 2019-11-25T07:08:43.000Z | tests_scripts/Sprint1-f19/Sprint1-f19/tests/test_registercampuspartner.py | uno-isqa-8950/uno-cpi | c8fa01eb253e6a56046009c551a84c36c28cd8da | [
"MIT"
] | 814 | 2018-08-30T02:28:55.000Z | 2022-03-11T23:31:45.000Z | tests_scripts/Sprint1-f19/Sprint1-f19/tests/test_registercampuspartner.py | uno-isqa-8950/uno-cpi | c8fa01eb253e6a56046009c551a84c36c28cd8da | [
"MIT"
] | 6 | 2018-09-16T05:35:49.000Z | 2019-10-17T02:44:19.000Z | from .campuspartnerpageui import CampusPartnersPageUi
def test_campus_register(browser):
partners = CampusPartnersPageUi(browser)
partners.partners_homepage()
partners.partners_campuspartnerregister()
partners.partners_Campuspartnername()
partners.partners_College()
partners.partners_next()
... | 36.333333 | 53 | 0.801835 |
83ea395bc108ddf8ecd22d0b8167d7290d2c1398 | 1,041 | py | Python | backend/tweets/api/Post.py | manulangat1/twitter_clone_drf_react | 2e3b7fda3b707d7a670a3de7ca70daef9d2ccda2 | [
"MIT"
] | null | null | null | backend/tweets/api/Post.py | manulangat1/twitter_clone_drf_react | 2e3b7fda3b707d7a670a3de7ca70daef9d2ccda2 | [
"MIT"
] | 11 | 2020-09-07T19:21:47.000Z | 2020-09-16T16:56:26.000Z | backend/tweets/api/Post.py | manulangat1/twitter_clone_drf_react | 2e3b7fda3b707d7a670a3de7ca70daef9d2ccda2 | [
"MIT"
] | null | null | null | from rest_framework import generics,permissions
from rest_framework.views import APIView
from ..serializers.Post import PostSerializer,CommentSerializer,PostDetailSerializer
from ..models import Post,Comment
class PostList(generics.ListCreateAPIView):
serializer_class = PostSerializer
queryset = Post.objects... | 34.7 | 91 | 0.790586 |
2a2f84ba7ea3eaae09cdaac1e2e33f60d4bd13f8 | 2,577 | py | Python | thefuck/ui.py | juzim/thefuck | a3b2e6872b9e75b8a259375b9440246fdd181565 | [
"MIT"
] | 1 | 2021-12-13T18:41:46.000Z | 2021-12-13T18:41:46.000Z | thefuck/ui.py | juzim/thefuck | a3b2e6872b9e75b8a259375b9440246fdd181565 | [
"MIT"
] | 4 | 2020-12-23T15:44:08.000Z | 2020-12-23T16:48:59.000Z | thefuck/ui.py | juzim/thefuck | a3b2e6872b9e75b8a259375b9440246fdd181565 | [
"MIT"
] | 1 | 2019-12-08T19:23:06.000Z | 2019-12-08T19:23:06.000Z | # -*- encoding: utf-8 -*-
import sys
from .conf import settings
from .exceptions import NoRuleMatched
from .system import get_key
from . import logs, const
def read_actions():
"""Yields actions for pressed keys."""
while True:
key = get_key()
if key in (const.KEY_UP, 'k'):
yield ... | 27.709677 | 70 | 0.618937 |
c9fc8e475d5807b8a415d49e258401a649de33f0 | 8,938 | py | Python | cowin_project/models/settings/cowin_project_process.py | shangdinvxu/cowinaddons | 4e9d69894cd80e5427ccc9bac6c37b8bd67cadd0 | [
"MIT"
] | null | null | null | cowin_project/models/settings/cowin_project_process.py | shangdinvxu/cowinaddons | 4e9d69894cd80e5427ccc9bac6c37b8bd67cadd0 | [
"MIT"
] | null | null | null | cowin_project/models/settings/cowin_project_process.py | shangdinvxu/cowinaddons | 4e9d69894cd80e5427ccc9bac6c37b8bd67cadd0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import models, fields, api
from odoo.exceptions import UserError
class Cowin_project_process(models.Model):
u'''
每个项目都有自己唯一的一个元配置信息实体的一份实例,
注意: 元数据信息
'''
_name = 'cowin_project.process'
name = fields.Char(string=u'流程名称')
#
meta... | 36.333333 | 162 | 0.584135 |
d1c49ee2fff92c8cb921868efe7c8ebe100951a8 | 851 | py | Python | tests/test_dump.py | mikegribov/filedjson | ee9f8408edcf8a72b8ed415237789a602ee6b579 | [
"MIT"
] | null | null | null | tests/test_dump.py | mikegribov/filedjson | ee9f8408edcf8a72b8ed415237789a602ee6b579 | [
"MIT"
] | null | null | null | tests/test_dump.py | mikegribov/filedjson | ee9f8408edcf8a72b8ed415237789a602ee6b579 | [
"MIT"
] | null | null | null | from ..xjson import XJson
import os
def check(name, value):
xj = XJson(os.path.join("examples", name))
assert xj.dump(xj.structure) == value
def test_empty_file():
check("empty_file", '')
def test_single_file_obj():
check("single_file_obj",". name1: value1\n. name2: value2\n. name3: valu... | 38.681818 | 188 | 0.643948 |
943a3f8119bea0794f69445db79d1213f31aac38 | 5,329 | py | Python | tests/detect_aws_credentials_test.py | cclauss/pre-commit-hooks | 5bf6c09bfa1297d3692cadd621ef95f1284e33c0 | [
"MIT"
] | 1 | 2017-05-15T18:55:25.000Z | 2017-05-15T18:55:25.000Z | tests/detect_aws_credentials_test.py | cclauss/pre-commit-hooks | 5bf6c09bfa1297d3692cadd621ef95f1284e33c0 | [
"MIT"
] | null | null | null | tests/detect_aws_credentials_test.py | cclauss/pre-commit-hooks | 5bf6c09bfa1297d3692cadd621ef95f1284e33c0 | [
"MIT"
] | null | null | null | import pytest
from mock import patch
from pre_commit_hooks.detect_aws_credentials import get_aws_credential_files_from_env
from pre_commit_hooks.detect_aws_credentials import get_aws_secrets_from_env
from pre_commit_hooks.detect_aws_credentials import get_aws_secrets_from_file
from pre_commit_hooks.detect_aws_credenti... | 36.251701 | 87 | 0.642334 |
6083ce7263449fc2bf2b46ed36d9f1d786964ff2 | 124 | py | Python | alerter/src/abstract/__init__.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 41 | 2019-08-23T12:40:42.000Z | 2022-03-28T11:06:02.000Z | alerter/src/abstract/__init__.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 147 | 2019-08-30T22:09:48.000Z | 2022-03-30T08:46:26.000Z | alerter/src/abstract/__init__.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 3 | 2019-09-03T21:12:28.000Z | 2021-08-18T14:27:56.000Z | from .component import Component
from .publisher import PublisherComponent
from .publisher import QueuingPublisherComponent
| 31 | 48 | 0.879032 |
823640b2da5690f009ff99e21112d74bda166e30 | 21,690 | py | Python | mint/consensus/block_creation.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | null | null | null | mint/consensus/block_creation.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | null | null | null | mint/consensus/block_creation.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | null | null | null | import logging
import random
from dataclasses import replace
from typing import Callable, Dict, List, Optional, Tuple
import blspy
from blspy import G1Element, G2Element
from chiabip158 import PyBIP158
from mint.consensus.block_record import BlockRecord
from mint.consensus.block_rewards import calculate_base_farmer_r... | 41.39313 | 117 | 0.696773 |
fa7c44fe9d24b7b063b949e8db51197699dfe32b | 740 | py | Python | BiLSTM/test.py | AndryRafam/Movie-Sentiment-Analysis | fc50145d870c1a904f211f53c1771120153da6d8 | [
"MIT"
] | 1 | 2022-01-14T23:35:34.000Z | 2022-01-14T23:35:34.000Z | BiLSTM/test.py | AndryRafam/Movie-Sentiment-Analysis | fc50145d870c1a904f211f53c1771120153da6d8 | [
"MIT"
] | null | null | null | BiLSTM/test.py | AndryRafam/Movie-Sentiment-Analysis | fc50145d870c1a904f211f53c1771120153da6d8 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.preprocessing.text import Tokenizer
import numpy as np
import pickle
max_words = 20000
max_len = 200
model_best = tf.keras.models.load_model("model_bilstm.hdf5")
sentiment = ["Negative","Positive"]
with op... | 30.833333 | 122 | 0.767568 |
23108dc2b74ca47409d0645078e559fa567eff49 | 172 | py | Python | estimators/test/test_bandits_snips.py | lwu9/estimators | e8253baf78ba6c735d167ac83df775aff0d59e48 | [
"BSD-3-Clause"
] | null | null | null | estimators/test/test_bandits_snips.py | lwu9/estimators | e8253baf78ba6c735d167ac83df775aff0d59e48 | [
"BSD-3-Clause"
] | null | null | null | estimators/test/test_bandits_snips.py | lwu9/estimators | e8253baf78ba6c735d167ac83df775aff0d59e48 | [
"BSD-3-Clause"
] | null | null | null | from estimators.bandits import snips
def test_single_example():
estimator = snips.Estimator()
estimator.add_example(0.3, 1, 0.6)
assert estimator.get() == 1.0 | 24.571429 | 38 | 0.709302 |
2dc1a06cb39f2449e8004b40ccd180aad05779d6 | 2,786 | py | Python | panel/models/perspective.py | douglas-raillard-arm/panel | 8e000f02df2c15d209cb471f7e920517eac2d802 | [
"BSD-3-Clause"
] | null | null | null | panel/models/perspective.py | douglas-raillard-arm/panel | 8e000f02df2c15d209cb471f7e920517eac2d802 | [
"BSD-3-Clause"
] | null | null | null | panel/models/perspective.py | douglas-raillard-arm/panel | 8e000f02df2c15d209cb471f7e920517eac2d802 | [
"BSD-3-Clause"
] | null | null | null | from bokeh.core.properties import (
Any, Bool, Dict, Either, Instance, List, Null, Nullable, String
)
from bokeh.models import ColumnDataSource, HTMLBox
from ..io.resources import bundled_files
from ..util import classproperty
class Perspective(HTMLBox):
aggregates = Either(Dict(String, Any), Null())
c... | 34.395062 | 144 | 0.666547 |
8c1f8096dd679b521048dd5e0500b7c9f9ae8ea8 | 372 | py | Python | Scripts/AddWebMapLocal.py | OndrejSpanel/maperitive-rules-cz-hiking | 424f1d35b91338e72d9649145e6905489d0e9f8c | [
"Unlicense"
] | null | null | null | Scripts/AddWebMapLocal.py | OndrejSpanel/maperitive-rules-cz-hiking | 424f1d35b91338e72d9649145e6905489d0e9f8c | [
"Unlicense"
] | null | null | null | Scripts/AddWebMapLocal.py | OndrejSpanel/maperitive-rules-cz-hiking | 424f1d35b91338e72d9649145e6905489d0e9f8c | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Sample showing how to add a custom web map
from maperipy import Map
from maperipy.webmaps import WebMap
Map.clear()
# the first argument is the name of your custom map
# the second is the base URL of the Web map tiles (or multiple URLs if you have them)
Map.add_web_map_custom("local", ["ht... | 28.615385 | 87 | 0.733871 |
a3017b0277e2dbfa7ff8b301bc40d2104bff92e7 | 680 | py | Python | Mundo1/des34.py | julimoraislima/Python-CursoEmVideo | d21b0485d2f5767039d819cf743255dfd0f27b18 | [
"MIT"
] | 2 | 2021-01-05T12:31:00.000Z | 2021-03-20T00:31:18.000Z | Mundo1/des34.py | julimoraislima/Python-CursoEmVideo | d21b0485d2f5767039d819cf743255dfd0f27b18 | [
"MIT"
] | null | null | null | Mundo1/des34.py | julimoraislima/Python-CursoEmVideo | d21b0485d2f5767039d819cf743255dfd0f27b18 | [
"MIT"
] | 1 | 2020-12-28T22:56:10.000Z | 2020-12-28T22:56:10.000Z | #desafio 34: Aumentos múltiplos. Se salário inicial for <=1250 terá 15% de aumento,
# ao contrário terá um aumento de 10%.
salarioinicial = float(input('Digite o valor do salário atual: R$'))
print()
print('>'*10, end=' ')
if salarioinicial <= 1250.00:
salariofinal = salarioinicial + (salarioinicial * 15/100)
... | 45.333333 | 146 | 0.7 |
0f818d3ad0249018cfcc46d77a3b7f659b8550d2 | 2,501 | py | Python | setup.py | demula/certbot-dns-dinahosting | c1139695e57872d1cf6b102ac9345a2cc43e33a7 | [
"Apache-2.0"
] | null | null | null | setup.py | demula/certbot-dns-dinahosting | c1139695e57872d1cf6b102ac9345a2cc43e33a7 | [
"Apache-2.0"
] | null | null | null | setup.py | demula/certbot-dns-dinahosting | c1139695e57872d1cf6b102ac9345a2cc43e33a7 | [
"Apache-2.0"
] | null | null | null | import os
import sys
from setuptools import find_packages
from setuptools import setup
version = '1.25.0'
install_requires = [
# This version of lexicon is required to address the problem described in
# https://github.com/AnalogJ/lexicon/issues/387.
'dns-lexicon>=3.2.1',
'setuptools>=41.6.0',
]
if n... | 32.480519 | 95 | 0.637345 |
8bf0f7ba1ea3698d0a2da9900d25d24b164c4c46 | 41,971 | py | Python | genpy/generator.py | chippography/simplerosbag | c495bed6cf3c645e55d01152664e51fcf5e4da01 | [
"BSD-3-Clause"
] | null | null | null | genpy/generator.py | chippography/simplerosbag | c495bed6cf3c645e55d01152664e51fcf5e4da01 | [
"BSD-3-Clause"
] | null | null | null | genpy/generator.py | chippography/simplerosbag | c495bed6cf3c645e55d01152664e51fcf5e4da01 | [
"BSD-3-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 38.754386 | 173 | 0.627338 |
c793aa597ef142f96f082a87d01d0e911afc84f9 | 8,568 | py | Python | gspread/v4/client.py | super34man/gspread | 7f73195c73a6d7f887724ed7e60bba14fbd2fb01 | [
"MIT"
] | null | null | null | gspread/v4/client.py | super34man/gspread | 7f73195c73a6d7f887724ed7e60bba14fbd2fb01 | [
"MIT"
] | null | null | null | gspread/v4/client.py | super34man/gspread | 7f73195c73a6d7f887724ed7e60bba14fbd2fb01 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gspread.v4.client
~~~~~~~~~~~~~~
This module contains Client class responsible for communicating with
Google API.
"""
import requests
from ..utils import finditem
from ..base import BaseClient
from ..exceptions import SpreadsheetNotFound
from .exceptions import APIError
from .models im... | 27.818182 | 118 | 0.552288 |
c2f751661d3aa484a06ecc36672940290349d255 | 634 | py | Python | tools/scons-custom/site_tools/doxygen/__init__.py | arcilat-adsk/arnold-usd | 34f1b091221f81d027a0c9fceec10f3cfa3ba141 | [
"Apache-2.0"
] | 171 | 2019-11-08T07:24:03.000Z | 2022-03-31T13:06:03.000Z | tools/scons-custom/site_tools/doxygen/__init__.py | arcilat-adsk/arnold-usd | 34f1b091221f81d027a0c9fceec10f3cfa3ba141 | [
"Apache-2.0"
] | 702 | 2019-11-12T11:23:37.000Z | 2022-03-31T11:04:26.000Z | tools/scons-custom/site_tools/doxygen/__init__.py | arcilat-adsk/arnold-usd | 34f1b091221f81d027a0c9fceec10f3cfa3ba141 | [
"Apache-2.0"
] | 43 | 2019-11-12T22:04:24.000Z | 2022-02-27T14:32:48.000Z | # Copyright 2019 Autodesk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 39.625 | 74 | 0.769716 |
652f25259f90c6574d39f9854e1441061034d269 | 7,438 | py | Python | agent/topology_agent.py | bfitzy2142/NET4901-SP | 908c13332a5356bd6a59879b8d78af76432b807c | [
"MIT"
] | 3 | 2019-08-04T03:09:02.000Z | 2020-06-08T15:48:36.000Z | agent/topology_agent.py | bfitzy2142/NET4901-SP | 908c13332a5356bd6a59879b8d78af76432b807c | [
"MIT"
] | 3 | 2019-09-06T08:30:21.000Z | 2020-06-30T03:24:56.000Z | agent/topology_agent.py | bfitzy2142/NET4901-SP-SDLENS | 908c13332a5356bd6a59879b8d78af76432b807c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Monitoring Agent that discovers topology."""
import mysql.connector
from mysql.connector import errorcode
from abstract_agent import AbstractAgent
from json import dumps
class TopologyAgent(AbstractAgent):
def __init__(self, controller_ip):
""""Initalizer for LinkAgent, initiali... | 35.588517 | 79 | 0.56897 |
7f28b9d26a8bbe732bcc3d9f559668b75ba6fd3d | 9,312 | py | Python | src/evaluation_fns.py | kleag/LISA | 7fa9812577a517d51d0c5006400d292292aefad6 | [
"Apache-2.0"
] | null | null | null | src/evaluation_fns.py | kleag/LISA | 7fa9812577a517d51d0c5006400d292292aefad6 | [
"Apache-2.0"
] | null | null | null | src/evaluation_fns.py | kleag/LISA | 7fa9812577a517d51d0c5006400d292292aefad6 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import evaluation_fns_np
import nn_utils
def create_metric_variable(name, shape, dtype):
tf.logging.log(tf.logging.INFO, f"evaluation_fns.create_metric_variable")
return tf.get_variable(name=name, shape=shape, dtype=dtype, trainable=False,
collections=[tf.GraphKeys... | 50.608696 | 122 | 0.763209 |
ecf58b7f925bed09bec369e562734607959e2459 | 1,558 | py | Python | editor/attributes/player/player_attribute_jaw_type.py | PeterC10/COFPES-OF-Editor-6 | 0a9c9b75fada8264634bdc968c9da209c44b29e2 | [
"MIT"
] | 1 | 2022-03-11T12:25:57.000Z | 2022-03-11T12:25:57.000Z | editor/attributes/player/player_attribute_jaw_type.py | PeterC10/COFPES-OF-Editor-6 | 0a9c9b75fada8264634bdc968c9da209c44b29e2 | [
"MIT"
] | null | null | null | editor/attributes/player/player_attribute_jaw_type.py | PeterC10/COFPES-OF-Editor-6 | 0a9c9b75fada8264634bdc968c9da209c44b29e2 | [
"MIT"
] | null | null | null | from editor.attributes.player.player_attribute import (
PlayerAttribute,
PlayerAttributeTypes,
)
class PlayerAttributeJawType(PlayerAttribute):
@classmethod
def att_class_name(cls):
return "Jaw Type"
@classmethod
def att_class_type(cls):
return PlayerAttributeTypes.Appearance
... | 29.396226 | 67 | 0.657895 |
2f3ff0b6a921cbd529fec767b3fbfd2f05c5717e | 312 | py | Python | manage.py | mitodl/sga-l | 8a0c1e5509f77211897744984d568085a49ac61f | [
"BSD-3-Clause"
] | 3 | 2016-06-11T07:03:05.000Z | 2018-06-19T18:13:18.000Z | manage.py | mitodl/sga-l | 8a0c1e5509f77211897744984d568085a49ac61f | [
"BSD-3-Clause"
] | 58 | 2016-06-10T10:39:32.000Z | 2021-01-16T16:20:25.000Z | manage.py | mitodl/sga-l | 8a0c1e5509f77211897744984d568085a49ac61f | [
"BSD-3-Clause"
] | 5 | 2016-06-09T22:03:03.000Z | 2019-05-02T04:27:12.000Z | #!/usr/bin/env python3
"""
Standard manage.py command from django startproject
"""
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sga_lti.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 20.8 | 71 | 0.766026 |
c55d4e81d8c3e331d586eb8d8b375412ad6b93ac | 4,106 | py | Python | app/config/a_config.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | null | null | null | app/config/a_config.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | null | null | null | app/config/a_config.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019. Partners HealthCare and other members of
# Forome Association
#
# Developed by Sergey Trifonov based on contributions by Joel Krier,
# Michael Bouzinier, Shamil Sunyaev and other members of Division of
# Genetics, Brigham and Women's Hospital
#
# Licensed under the Apache License, Version 2.... | 29.970803 | 75 | 0.58792 |
8fc7a8fbec0be1ae91eae00a880e409c6fae41d6 | 22,640 | py | Python | test/functional/feature_rbf.py | sighttviewliu/michaellaoliu_coin | 5d6d3eb2e2a0d4273bd7108744e1a362339697a9 | [
"MIT"
] | 2 | 2018-12-05T12:47:59.000Z | 2019-06-27T12:01:59.000Z | test/functional/feature_rbf.py | sighttviewliu/michaellaoliu_coin | 5d6d3eb2e2a0d4273bd7108744e1a362339697a9 | [
"MIT"
] | null | null | null | test/functional/feature_rbf.py | sighttviewliu/michaellaoliu_coin | 5d6d3eb2e2a0d4273bd7108744e1a362339697a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Michaellaoliu Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RBF code."""
from test_framework.test_framework import MichaellaoliuTestFramework
from ... | 40 | 127 | 0.625751 |
5b765fd0e9bb99c587c09aa24c44fbe2079a627f | 5,680 | py | Python | pyscf/pbc/mpitools/mpi_pool.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 2 | 2019-05-28T05:25:56.000Z | 2019-11-09T02:16:43.000Z | pyscf/pbc/mpitools/mpi_pool.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/pbc/mpitools/mpi_pool.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | # -*- coding: utf-8 -*-
# Copyright 2014-2018 The PySCF Developers. 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
#
#... | 32.090395 | 80 | 0.604049 |
9aa5d844061a709dd40ebe08ba298f730f5a00ad | 7,056 | py | Python | tekore/_client/api/browse/__init__.py | oroddlokken/tekore | 002498d9f49fd6ae359f0f1a6f0300fd5cbe94b5 | [
"MIT"
] | null | null | null | tekore/_client/api/browse/__init__.py | oroddlokken/tekore | 002498d9f49fd6ae359f0f1a6f0300fd5cbe94b5 | [
"MIT"
] | null | null | null | tekore/_client/api/browse/__init__.py | oroddlokken/tekore | 002498d9f49fd6ae359f0f1a6f0300fd5cbe94b5 | [
"MIT"
] | null | null | null | from typing import List, Tuple
from .validate import validate_attributes
from ...base import SpotifyBase
from ...decor import send_and_process, maximise_limit, scopes
from ...process import single, top_item, multiple
from tekore.model import (
SimplePlaylistPaging,
SimpleAlbumPaging,
CategoryPaging,
Ca... | 28.918033 | 84 | 0.550737 |
4fb55a5f3ba0351a5bdeacd4cf035a9ddf568187 | 125 | py | Python | example.py | allen246/DUKPT-master | a7217221cb58db73cd01df71c4ac4fcf23f1a0c8 | [
"MIT"
] | null | null | null | example.py | allen246/DUKPT-master | a7217221cb58db73cd01df71c4ac4fcf23f1a0c8 | [
"MIT"
] | null | null | null | example.py | allen246/DUKPT-master | a7217221cb58db73cd01df71c4ac4fcf23f1a0c8 | [
"MIT"
] | null | null | null | from dukpt import Server as DukptServer, InvalidDUKPTArguments
from Crypto.Cipher import DES3
from bitstring import BitArray
| 31.25 | 62 | 0.864 |
69a241bff8059dfdd887038c4c4125de2c0fa40d | 2,850 | py | Python | tests/unit/plugins/openstack/scenarios/ec2/test_utils.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | tests/unit/plugins/openstack/scenarios/ec2/test_utils.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | tests/unit/plugins/openstack/scenarios/ec2/test_utils.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in writing, software
#... | 39.583333 | 76 | 0.661404 |
c3161cae6abad98b790c56401d740ee4c75e2666 | 4,554 | py | Python | homeassistant/components/rachio/binary_sensor.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-09-29T20:33:32.000Z | 2021-09-29T20:33:32.000Z | homeassistant/components/rachio/binary_sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/rachio/binary_sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Integration with the Rachio Iro sprinkler system controller."""
from abc import abstractmethod
import logging
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
BinarySensorDevice,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispa... | 32.76259 | 88 | 0.663373 |
e9b6114ed6a8c2b693c3e0d95afb2d9f871356fb | 309 | py | Python | pydis_site/apps/staff/migrations/0003_delete_rolemapping.py | Robin5605/site | 81aa42aa748cb228d7a09e6cf6b211484b654496 | [
"MIT"
] | 700 | 2018-11-17T15:56:51.000Z | 2022-03-30T22:53:17.000Z | pydis_site/apps/staff/migrations/0003_delete_rolemapping.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 542 | 2018-11-17T13:39:42.000Z | 2022-03-31T11:24:00.000Z | pydis_site/apps/staff/migrations/0003_delete_rolemapping.py | foxy4096/site | 63b464b57ea0824570879f24baaaca6fd80393ee | [
"MIT"
] | 178 | 2018-11-21T09:06:56.000Z | 2022-03-31T07:43:28.000Z | # Generated by Django 3.0.9 on 2020-10-04 17:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('staff', '0002_add_is_staff_to_role_mappings'),
]
operations = [
migrations.DeleteModel(
name='RoleMapping',
),
]
| 18.176471 | 56 | 0.621359 |
5122d0f7e5de95428a040d4d6151e75f56ae83c5 | 393 | py | Python | Galleria/asgi.py | Noble-mungu/gallery-app | 840d1abba2d1d97e7e920485a402cf6eb82da285 | [
"Unlicense"
] | null | null | null | Galleria/asgi.py | Noble-mungu/gallery-app | 840d1abba2d1d97e7e920485a402cf6eb82da285 | [
"Unlicense"
] | 6 | 2021-03-30T14:17:57.000Z | 2022-01-13T03:10:49.000Z | Galleria/asgi.py | Noble-mungu/gallery-app | 840d1abba2d1d97e7e920485a402cf6eb82da285 | [
"Unlicense"
] | 1 | 2020-08-11T12:55:40.000Z | 2020-08-11T12:55:40.000Z | """
ASGI config for Galleria project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
92a7d04e35a1f0011930e7fe6716127baae32bd9 | 6,170 | py | Python | python/gtsam/examples/TranslationAveragingExample.py | ywkim0606/gtsam | a2de29aa5a4f6b1b960c473ba1aa3580708dfea6 | [
"BSD-3-Clause"
] | null | null | null | python/gtsam/examples/TranslationAveragingExample.py | ywkim0606/gtsam | a2de29aa5a4f6b1b960c473ba1aa3580708dfea6 | [
"BSD-3-Clause"
] | null | null | null | python/gtsam/examples/TranslationAveragingExample.py | ywkim0606/gtsam | a2de29aa5a4f6b1b960c473ba1aa3580708dfea6 | [
"BSD-3-Clause"
] | null | null | null | """
GTSAM Copyright 2010-2018, Georgia Tech Research Corporation,
Atlanta, Georgia 30332-0415
All Rights Reserved
Authors: Frank Dellaert, et al. (see THANKS for the full author list)
See LICENSE for the license information
This example shows how 1dsfm uses outlier rejection (MFAS) and optimization (translation recov... | 42.551724 | 112 | 0.702593 |
fda0761f03e079c9efbd535611c724e6edde758f | 1,201 | py | Python | tests/test_cli_find.py | pylover/unspy | 6c8e8bfb2eb29ae00cb26a5fdc1c90d151df1d19 | [
"MIT"
] | null | null | null | tests/test_cli_find.py | pylover/unspy | 6c8e8bfb2eb29ae00cb26a5fdc1c90d151df1d19 | [
"MIT"
] | null | null | null | tests/test_cli_find.py | pylover/unspy | 6c8e8bfb2eb29ae00cb26a5fdc1c90d151df1d19 | [
"MIT"
] | null | null | null | import socket
from unittest import mock
cachefile = '''\
10.0.0.1 h.foo
10.0.0.6 h.qux
'''
def test_cli_find(socketclass_mock, findcli):
openmock = mock.mock_open(read_data=cachefile)
with mock.patch('uns.cache.open', openmock), \
mock.patch('os.path.exists') as existsmock:
existsmock.re... | 25.553191 | 55 | 0.567027 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.