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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7968353dc95dd0cc0627415fc950f1913f440070 | 7,084 | py | Python | src/saml2/mcache.py | JGulic/pysaml2 | 4ae5ee49931f4470ff39f145899ba329df52c36a | [
"Apache-2.0"
] | null | null | null | src/saml2/mcache.py | JGulic/pysaml2 | 4ae5ee49931f4470ff39f145899ba329df52c36a | [
"Apache-2.0"
] | null | null | null | src/saml2/mcache.py | JGulic/pysaml2 | 4ae5ee49931f4470ff39f145899ba329df52c36a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import logging
import memcache
from saml2 import time_util
from saml2.cache import ToOld, CacheError
# The assumption is that any subject may consist of data
# gathered from several different sources, all with their own
# timeout time.
logger = logging.getLogger(__name__)
def _key(prefix, name... | 34.896552 | 83 | 0.59585 |
7968368ecebf4190c8225b85b3b49e03097de9ea | 36,597 | py | Python | heat_integrationtests/functional/test_create_update.py | stackriot/heat | 9ed612906e388eda8bf850420cbceef54e05841c | [
"Apache-2.0"
] | 265 | 2015-01-02T09:33:22.000Z | 2022-03-26T23:19:54.000Z | heat_integrationtests/functional/test_create_update.py | stackriot/heat | 9ed612906e388eda8bf850420cbceef54e05841c | [
"Apache-2.0"
] | 8 | 2015-09-01T15:43:19.000Z | 2021-12-14T05:18:23.000Z | heat_integrationtests/functional/test_create_update.py | stackriot/heat | 9ed612906e388eda8bf850420cbceef54e05841c | [
"Apache-2.0"
] | 295 | 2015-01-06T07:00:40.000Z | 2021-09-06T08:05:06.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 41.166479 | 79 | 0.596032 |
7968378a74513f025fe821d716e0d4786a1f4e29 | 520 | py | Python | setup.py | mallocator/JSONing | 0fe6dd88aa6a6582d47a4c679a22444b4f66b6ab | [
"Apache-2.0"
] | null | null | null | setup.py | mallocator/JSONing | 0fe6dd88aa6a6582d47a4c679a22444b4f66b6ab | [
"Apache-2.0"
] | null | null | null | setup.py | mallocator/JSONing | 0fe6dd88aa6a6582d47a4c679a22444b4f66b6ab | [
"Apache-2.0"
] | null | null | null | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
setup(
name='The JSONing',
version='0.1.0',
packages=['src'],
author='mallocator',
author_email='mallox@pyxzl.net',
url='https://github.com/mallocator/JSONing',
app=['sr... | 19.259259 | 48 | 0.590385 |
796837c139f9ea2b95720de9ff68aa07a7b83f97 | 26,752 | py | Python | models_search/ViT_custom_local544444_256_rp.py | Pragyanstha/SummerCamp2021 | caa8bba64020ba52bdef2b23a7a54de93e93b8af | [
"MIT"
] | null | null | null | models_search/ViT_custom_local544444_256_rp.py | Pragyanstha/SummerCamp2021 | caa8bba64020ba52bdef2b23a7a54de93e93b8af | [
"MIT"
] | null | null | null | models_search/ViT_custom_local544444_256_rp.py | Pragyanstha/SummerCamp2021 | caa8bba64020ba52bdef2b23a7a54de93e93b8af | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import math
import numpy as np
from models_search.ViT_helper import DropPath, to_2tuple, trunc_normal_
from models_search.diff_aug import DiffAugment
import torch.utils.checkpoint as checkpoint
class matmul(nn.Module):
def __init__(self):
super().__init__()
... | 43.078905 | 185 | 0.553977 |
796837ec84b4e84bd60d23fc55b03aa403670869 | 1,029 | py | Python | qiskit/providers/jobstatus.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 3 | 2019-11-20T08:15:28.000Z | 2020-11-01T15:32:57.000Z | qiskit/providers/jobstatus.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 4 | 2019-05-13T15:28:46.000Z | 2019-12-19T20:47:02.000Z | qiskit/providers/jobstatus.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 2 | 2017-12-03T15:48:14.000Z | 2018-03-11T13:08:03.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 27.810811 | 77 | 0.712342 |
79683870f8010bdef165673c51f6c19899cba094 | 12,395 | py | Python | common/utils.py | kimbfs/Proyecto | 3065b2d721365d3e92d93bc449c1cea92bbf4ed8 | [
"MIT"
] | null | null | null | common/utils.py | kimbfs/Proyecto | 3065b2d721365d3e92d93bc449c1cea92bbf4ed8 | [
"MIT"
] | null | null | null | common/utils.py | kimbfs/Proyecto | 3065b2d721365d3e92d93bc449c1cea92bbf4ed8 | [
"MIT"
] | null | null | null | import os
import numpy as np
import time
import cv2, colorsys
from PIL import Image
from matplotlib.colors import rgb_to_hsv, hsv_to_rgb
from common.backbones.efficientnet import swish
from common.backbones.mobilenet_v3 import hard_sigmoid, hard_swish
def optimize_tf_gpu(tf, K):
if tf.__version__.startswith('2')... | 39.727564 | 154 | 0.50004 |
796838e9df69fb3acbd16667db45602c59c65641 | 474 | py | Python | tgappcategories/migration/versions/7e81e2d2f737_enable_multi_level_categories.py | axant/tgapp-categories | 82be90b92276f06f87f2b0fddf45e310cc70962e | [
"MIT"
] | null | null | null | tgappcategories/migration/versions/7e81e2d2f737_enable_multi_level_categories.py | axant/tgapp-categories | 82be90b92276f06f87f2b0fddf45e310cc70962e | [
"MIT"
] | null | null | null | tgappcategories/migration/versions/7e81e2d2f737_enable_multi_level_categories.py | axant/tgapp-categories | 82be90b92276f06f87f2b0fddf45e310cc70962e | [
"MIT"
] | null | null | null | """enable multi level categories"""
revision = '7e81e2d2f737'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('tgappcategories_categories', sa.Column('path', sa.Unicode(255), nullable=True, index=True))
op.add_column('tgappcategories_categories', sa.Column('d... | 26.333333 | 110 | 0.746835 |
79683939b82b98a255c084f07f4d6d914cd7e094 | 24,819 | py | Python | test/functional/feature_csv_activation.py | bitcoinbam/btcbam | b6d6784c3865ab660c5e99a2d1402b0dada77e70 | [
"MIT"
] | 8 | 2020-10-05T14:13:16.000Z | 2021-11-17T20:16:53.000Z | test/functional/feature_csv_activation.py | bitcoinbam/btcbam | b6d6784c3865ab660c5e99a2d1402b0dada77e70 | [
"MIT"
] | 1 | 2021-08-11T21:34:17.000Z | 2021-08-11T21:34:17.000Z | test/functional/feature_csv_activation.py | bitcoinbam/btcbam | b6d6784c3865ab660c5e99a2d1402b0dada77e70 | [
"MIT"
] | 3 | 2020-10-24T22:10:59.000Z | 2022-01-11T14:16:03.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test activation of the first version bits soft fork.
This soft fork will activate the following BIPS:
... | 51.067901 | 169 | 0.696603 |
79683949431574f4d0f668d39e6689f89b127da2 | 5,065 | py | Python | mpunet/image/queue/loading_pool.py | alexsosn/MultiPlanarUNet | 2d1cecdee391be8e9f72da95e33077ed82a2183a | [
"MIT"
] | 156 | 2018-12-19T19:21:30.000Z | 2022-03-10T13:14:52.000Z | mpunet/image/queue/loading_pool.py | alexsosn/MultiPlanarUNet | 2d1cecdee391be8e9f72da95e33077ed82a2183a | [
"MIT"
] | 25 | 2019-07-30T07:45:26.000Z | 2022-02-10T00:38:31.000Z | mpunet/image/queue/loading_pool.py | alexsosn/MultiPlanarUNet | 2d1cecdee391be8e9f72da95e33077ed82a2183a | [
"MIT"
] | 33 | 2019-01-26T16:34:50.000Z | 2022-02-20T13:48:44.000Z | from mpunet.logging.default_logger import ScreenLogger
from threading import Lock, Thread
from queue import Queue
from time import sleep
def _load_func(load_queue, results_queue, load_errors_queue, lock, logger):
"""
Args:
load_queue:
Returns:
"""
while True:
to_load, dataset_id... | 37.242647 | 82 | 0.564462 |
7968398b9bb6b78211558284510bcc6c12ec1e43 | 506 | py | Python | solutions/min_stack/test.py | ansonmiu0214/dsa-worked-solutions | 88801d268b78506edd77e771c29b4c9f4ae0f59a | [
"MIT"
] | null | null | null | solutions/min_stack/test.py | ansonmiu0214/dsa-worked-solutions | 88801d268b78506edd77e771c29b4c9f4ae0f59a | [
"MIT"
] | null | null | null | solutions/min_stack/test.py | ansonmiu0214/dsa-worked-solutions | 88801d268b78506edd77e771c29b4c9f4ae0f59a | [
"MIT"
] | null | null | null | import unittest
from .solution import MinStack
from ..utils import proxyCall
class TestCase(unittest.TestCase):
def setUp(self):
self.stack = MinStack()
def test_example_one(self):
commands = ["push","push","push","getMin","pop","top","getMin"]
args = [[-2],[0],[-3],[],[],[],[]]
... | 29.764706 | 71 | 0.577075 |
796839ce54bd88562afb9987ea4668f46583b14a | 3,682 | py | Python | PyradiomicsExample/myenv/bin/medpy_diff.py | FarnooshKh/JoyOfLearning | 33de11c01388bcaae3bfcc074c2bdb94db447ad0 | [
"MIT"
] | null | null | null | PyradiomicsExample/myenv/bin/medpy_diff.py | FarnooshKh/JoyOfLearning | 33de11c01388bcaae3bfcc074c2bdb94db447ad0 | [
"MIT"
] | null | null | null | PyradiomicsExample/myenv/bin/medpy_diff.py | FarnooshKh/JoyOfLearning | 33de11c01388bcaae3bfcc074c2bdb94db447ad0 | [
"MIT"
] | null | null | null | #!/Users/farnoosh/Projects/PyradiomicsExample/myenv/bin/python3
"""
Compares the pixel values of two images and gives a measure of the difference.
Copyright (C) 2013 Oskar Maier
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
t... | 37.191919 | 127 | 0.693102 |
79683a0fd5e53641672c0831db93793da2fe3ba1 | 39,492 | py | Python | src/zoneTSP_exp.py | blankandwhite1/mit-amazon-last-mile | e760f1d0847b3e2b1ac085f2a2e979093c56d54c | [
"MIT"
] | 1 | 2021-08-25T07:25:01.000Z | 2021-08-25T07:25:01.000Z | src/zoneTSP_exp.py | blankandwhite1/mit-amazon-last-mile | e760f1d0847b3e2b1ac085f2a2e979093c56d54c | [
"MIT"
] | null | null | null | src/zoneTSP_exp.py | blankandwhite1/mit-amazon-last-mile | e760f1d0847b3e2b1ac085f2a2e979093c56d54c | [
"MIT"
] | 1 | 2021-08-25T07:25:04.000Z | 2021-08-25T07:25:04.000Z | import os
import random
from os import path
import numpy as np
from tsp_solver.greedy import solve_tsp
from typing import Dict, List
import time
import random as rng
from sklearn.model_selection import ShuffleSplit
import fy_score
import readData as rd
import zoneTSP as zt
import holdout_exp
from scipy... | 43.160656 | 288 | 0.638079 |
79683a5a7469a0d6f84cdbaeefd3aab302a2609c | 1,656 | py | Python | acme_api/api.py | the-gigi/acme_server | 89838e660b6ce07f6b5b18a9f0e5af09b5b7b97f | [
"MIT"
] | null | null | null | acme_api/api.py | the-gigi/acme_server | 89838e660b6ce07f6b5b18a9f0e5af09b5b7b97f | [
"MIT"
] | 1 | 2019-10-24T20:13:22.000Z | 2019-10-24T20:13:22.000Z | acme_api/api.py | the-gigi/acme_server | 89838e660b6ce07f6b5b18a9f0e5af09b5b7b97f | [
"MIT"
] | null | null | null | from flask import Flask, request, jsonify
from flask.ext import restful
from flask.ext.restful import reqparse
from acme_db import db
from acme_db import models
app = None
def create_app(conf):
global app
app = Flask(__name__)
app.config.from_object(conf)
api = restful.Api(app)
api.add_resource(... | 27.6 | 72 | 0.602053 |
79683ac30c39da709197eeeb13517156946c490b | 6,676 | py | Python | amset/deformation/potentials.py | hackingmaterials/amset | a99a9a9c33fc8d2e2937f3e51c7221e9620a33fc | [
"BSD-3-Clause-LBNL"
] | 67 | 2017-01-13T06:52:59.000Z | 2022-03-16T11:57:46.000Z | amset/deformation/potentials.py | hackingmaterials/Amset | 99d9a7d25f47696820ca704af36c46bad9cc49d4 | [
"BSD-3-Clause-LBNL"
] | 138 | 2017-02-25T22:58:49.000Z | 2022-03-28T14:26:17.000Z | amset/deformation/potentials.py | hackingmaterials/Amset | 99d9a7d25f47696820ca704af36c46bad9cc49d4 | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-02-25T12:10:19.000Z | 2022-01-28T12:01:43.000Z | import logging
import numpy as np
from pymatgen.analysis.elasticity.strain import Deformation
from pymatgen.core.tensors import TensorMapping
from amset.constants import defaults
from amset.electronic_structure.kpoints import (
get_kpoint_indices,
get_kpoints_from_bandstructure,
get_mesh_from_kpoint_diff,... | 36.086486 | 88 | 0.705812 |
79683b2bed950c2cbd676eeee967b6f5ffd26c76 | 649 | py | Python | novel_tools/processors/validators/volume_validator.py | ALMSIVI/novel_tools | d1511607c5055ab293ce6b1294810c127ab9c01d | [
"WTFPL"
] | 1 | 2020-08-03T02:29:20.000Z | 2020-08-03T02:29:20.000Z | novel_tools/processors/validators/volume_validator.py | ALMSIVI/novel_tools | d1511607c5055ab293ce6b1294810c127ab9c01d | [
"WTFPL"
] | null | null | null | novel_tools/processors/validators/volume_validator.py | ALMSIVI/novel_tools | d1511607c5055ab293ce6b1294810c127ab9c01d | [
"WTFPL"
] | null | null | null | from novel_tools.common import NovelData, Type
from .validator import Validator
class VolumeValidator(Validator):
"""
Validates a volume.
"""
def check(self, data: NovelData) -> bool:
return data.type == Type.VOLUME_TITLE and data.index >= 0 and data.get('tag') == self.tag
def _duplicate... | 36.055556 | 97 | 0.694915 |
79683ed8aec554163ca34d7bd4e956026813c939 | 3,061 | py | Python | app/stock/fetch-stock-data.py | aveek22/realtime-stock-analysis | 325103457856aa4cd446af0bd009f6cfe7a69f9a | [
"MIT"
] | null | null | null | app/stock/fetch-stock-data.py | aveek22/realtime-stock-analysis | 325103457856aa4cd446af0bd009f6cfe7a69f9a | [
"MIT"
] | null | null | null | app/stock/fetch-stock-data.py | aveek22/realtime-stock-analysis | 325103457856aa4cd446af0bd009f6cfe7a69f9a | [
"MIT"
] | null | null | null | import websocket
import json
import database as db
import os
# Fetch the API credentials
API_KEY = os.getenv('ALPACA_API_KEY')
SECRET_KEY = os.getenv('ALPACA_SECRET_KEY')
# Function called when web socket connection is opened.
def on_open(ws):
'''
This method is called when the connection to the sock... | 30.61 | 140 | 0.626266 |
796841932ab80533fa8e97895f7a7f09e64d606c | 1,107 | py | Python | test/test_waterfall_info.py | hpcc-systems/uptrends-python | 2e05ba851a4e65bde3c40514f499c475465bef90 | [
"BSD-3-Clause"
] | null | null | null | test/test_waterfall_info.py | hpcc-systems/uptrends-python | 2e05ba851a4e65bde3c40514f499c475465bef90 | [
"BSD-3-Clause"
] | null | null | null | test/test_waterfall_info.py | hpcc-systems/uptrends-python | 2e05ba851a4e65bde3c40514f499c475465bef90 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Uptrends API v4
This document describes Uptrends API version 4. This Swagger environment also lets you execute API methods directly. Please note that this is not a sandbox environment: these API methods operate directly on your actual Uptrends account. For more information, please visit ... | 27 | 321 | 0.719061 |
796842f9f6157e7a1362f230b6646a3049ae1e64 | 1,263 | py | Python | Python/String/Capatilize.py | sanskritilakhmani/Hackerrank | 500694c1e6888fc657becc2c503fb5860bf39ec7 | [
"Apache-2.0"
] | 1 | 2022-02-16T18:37:49.000Z | 2022-02-16T18:37:49.000Z | Python/String/Capatilize.py | TAFFAHACHRAF/Hackerrank | 500694c1e6888fc657becc2c503fb5860bf39ec7 | [
"Apache-2.0"
] | null | null | null | Python/String/Capatilize.py | TAFFAHACHRAF/Hackerrank | 500694c1e6888fc657becc2c503fb5860bf39ec7 | [
"Apache-2.0"
] | 4 | 2021-07-18T16:24:02.000Z | 2022-02-15T21:42:03.000Z | """
You are asked to ensure that the first and last names of people begin with a capital letter in their passports.
For example, alison heck should be capitalised correctly as Alison Heck.
Given a full name, your task is to capitalize the name appropriately.
Input Format
A single line of input containing the full name... | 22.157895 | 112 | 0.697546 |
79684339cd56d950cce4287d7b90cc2cb0d171cc | 6,254 | py | Python | delcom904x.py | linville/delcom904x | 8299f48feb1e346a499d0df332febfb0964b79a3 | [
"0BSD"
] | 4 | 2015-03-17T03:06:48.000Z | 2020-03-16T03:43:19.000Z | delcom904x.py | linville/delcom904x | 8299f48feb1e346a499d0df332febfb0964b79a3 | [
"0BSD"
] | null | null | null | delcom904x.py | linville/delcom904x | 8299f48feb1e346a499d0df332febfb0964b79a3 | [
"0BSD"
] | 4 | 2015-04-21T18:24:27.000Z | 2019-09-27T15:07:59.000Z | # A python class for the Delcom USBLMP 904x multi-color visual signal indicator. This
# has been tested with the 904007-SB but should work with most of the other
# indicators.
#
# Requires the Signal 11 HIDAPI and cython-hidapi.
#
# Copyright (c) 2019 Aaron Linville <aaron@linville.org>
import hid
vendor_id = 0x0FC5
... | 30.507317 | 89 | 0.508315 |
7968434a016ddb4d6fc9857e8967c3c04888f372 | 29,349 | py | Python | demcoreg/dem_mask.py | dlilien/demcoreg | 5618bfeaf891712b5e1c7aef09dde8138af618b8 | [
"MIT"
] | 1 | 2022-03-26T05:31:58.000Z | 2022-03-26T05:31:58.000Z | demcoreg/dem_mask.py | Thubaralei/demcoreg | 9ac182ac4f7d65220efd1ae37f1396a82264fe6b | [
"MIT"
] | null | null | null | demcoreg/dem_mask.py | Thubaralei/demcoreg | 9ac182ac4f7d65220efd1ae37f1396a82264fe6b | [
"MIT"
] | null | null | null | #! /usr/bin/env python
"""
Utility to automate reference surface identification for raster co-registration
Note: Initial run may take a long time to download and process required data (NLCD, global bareground, glacier polygons)
Can control location of these data files with DATADIR environmental variable
export DATAD... | 44.807634 | 224 | 0.640874 |
796843ba9bf3628051ba01fc23eb624e7d2ea43f | 743 | py | Python | Nikki_L/Dictionary_slaapkamer.py | ArtezGDA/text-IO | b9ed7f2433c0eda08fb45d125ea22a5fdeaef667 | [
"MIT"
] | null | null | null | Nikki_L/Dictionary_slaapkamer.py | ArtezGDA/text-IO | b9ed7f2433c0eda08fb45d125ea22a5fdeaef667 | [
"MIT"
] | null | null | null | Nikki_L/Dictionary_slaapkamer.py | ArtezGDA/text-IO | b9ed7f2433c0eda08fb45d125ea22a5fdeaef667 | [
"MIT"
] | null | null | null | mijn_slaapkamer = {
'adres' : "Brouwerijweg 18",
'plafon hoogte' : "4 meter",
'oppervlakte' : "21 m2",
'ramen' : 3,
'deuren' : 1,
'banken' : 1,
'planten' : 12,
'tafels' : 3,
'stoelen' : 5
}
print "Mijn adres is:"
print mijn_slaapkamer["adres... | 26.535714 | 42 | 0.64603 |
79684429daa53560d7348ba5a19f8b4f09e54f92 | 5,398 | py | Python | syne_tune/optimizer/schedulers/searchers/cost_aware_gp_multifidelity_searcher.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 97 | 2021-11-18T17:14:30.000Z | 2022-03-29T00:33:12.000Z | syne_tune/optimizer/schedulers/searchers/cost_aware_gp_multifidelity_searcher.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 54 | 2021-11-18T17:14:12.000Z | 2022-03-22T08:11:48.000Z | syne_tune/optimizer/schedulers/searchers/cost_aware_gp_multifidelity_searcher.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2021-11-29T11:47:32.000Z | 2022-02-24T15:28:11.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 42.503937 | 88 | 0.742497 |
7968444d9960cc349a4609051c9dde8f04f17e8a | 28,051 | py | Python | Bed Tracking System/Bed Tracker/myvenv/Lib/site-packages/pip/utils/__init__.py | ksu-hmi/Hopsital-Bed-Tracker | da3ec3f99c29bb2bd82a41b20a4dfc6c2b9d10c8 | [
"MIT"
] | null | null | null | Bed Tracking System/Bed Tracker/myvenv/Lib/site-packages/pip/utils/__init__.py | ksu-hmi/Hopsital-Bed-Tracker | da3ec3f99c29bb2bd82a41b20a4dfc6c2b9d10c8 | [
"MIT"
] | null | null | null | Bed Tracking System/Bed Tracker/myvenv/Lib/site-packages/pip/utils/__init__.py | ksu-hmi/Hopsital-Bed-Tracker | da3ec3f99c29bb2bd82a41b20a4dfc6c2b9d10c8 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from collections import deque
import contextlib
import errno
import io
import locale
# we have a submodule named 'logging' which would shadow this if we used the
# regular name:
import logging as std_logging
import re
import os
import posixpath
import shutil
import ... | 32.846604 | 80 | 0.584043 |
796844b219282f9688b42bb77cc32c66b73c49a6 | 1,157 | py | Python | tests/test_nn_modules/test_rnn.py | abdallah1097/pytorch_ner | b1729d97ccb168e5796045cf9b387b35536803eb | [
"Apache-2.0"
] | null | null | null | tests/test_nn_modules/test_rnn.py | abdallah1097/pytorch_ner | b1729d97ccb168e5796045cf9b387b35536803eb | [
"Apache-2.0"
] | null | null | null | tests/test_nn_modules/test_rnn.py | abdallah1097/pytorch_ner | b1729d97ccb168e5796045cf9b387b35536803eb | [
"Apache-2.0"
] | null | null | null | import unittest
import torch
import torch.nn as nn
from pytorch_ner.nn_modules.rnn import DynamicRNN
embeddings = torch.randn(10, 20, 128) # [batch_size, seq_len, emb_dim]
lengths = torch.arange(start=20, end=10, step=-1)
rnn = DynamicRNN(
rnn_unit=nn.RNN,
input_size=128,
hidden_size=256,
num_laye... | 19.610169 | 74 | 0.628349 |
796845c68ce2800ef9802901ee32a23a9e197282 | 2,599 | py | Python | Binary_Search/222_count_complete_tree_nodes.py | hren-ron/LeetCode | 3ba2766f8e6ad2bfb5c9686b362f000824e78474 | [
"Apache-2.0"
] | null | null | null | Binary_Search/222_count_complete_tree_nodes.py | hren-ron/LeetCode | 3ba2766f8e6ad2bfb5c9686b362f000824e78474 | [
"Apache-2.0"
] | null | null | null | Binary_Search/222_count_complete_tree_nodes.py | hren-ron/LeetCode | 3ba2766f8e6ad2bfb5c9686b362f000824e78474 | [
"Apache-2.0"
] | null | null | null | '''
Given a complete binary tree, count the number of nodes.
Note:
Definition of a complete binary tree from Wikipedia:
In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at ... | 22.405172 | 247 | 0.493651 |
796845ea075daeee2abf26ff8aefac63186845a8 | 1,455 | py | Python | load_creature.py | VolatilePulse/Castoroides | b3e62d58ec44439cfb853df8c2385a89961e179b | [
"MIT"
] | null | null | null | load_creature.py | VolatilePulse/Castoroides | b3e62d58ec44439cfb853df8c2385a89961e179b | [
"MIT"
] | 5 | 2020-03-24T18:19:49.000Z | 2021-08-23T20:36:42.000Z | load_creature.py | VolatilePulse/Castoroides | b3e62d58ec44439cfb853df8c2385a89961e179b | [
"MIT"
] | null | null | null | from configparser import ConfigParser
from dataclasses import dataclass, field
from enum import IntEnum
from typing import List, Optional
from lib.intervals import Float, I
from utils import possible_inputs_from_rounded
class Status(IntEnum):
Wild = 1
Tamed = 2
Bred = 3
@dataclass(init=F... | 27.45283 | 117 | 0.667354 |
79684625c2668f28cce52e8800bcdd7962d31cd7 | 13,791 | py | Python | tests/script_tests.py | ankitdobhal/pywikibot | d6328a486296c0e8452b9f5334d5467a2c77ec07 | [
"MIT"
] | null | null | null | tests/script_tests.py | ankitdobhal/pywikibot | d6328a486296c0e8452b9f5334d5467a2c77ec07 | [
"MIT"
] | null | null | null | tests/script_tests.py | ankitdobhal/pywikibot | d6328a486296c0e8452b9f5334d5467a2c77ec07 | [
"MIT"
] | null | null | null | """Test that each script can be compiled and executed."""
#
# (C) Pywikibot team, 2014-2021
#
# Distributed under the terms of the MIT license.
#
import os
import sys
import unittest
from contextlib import suppress
from pywikibot.tools import has_module
from tests import join_root_path, unittest_print
from tests.asp... | 35.635659 | 79 | 0.572257 |
7968462839f2ab932330a25cb3a52b3de4e31b18 | 7,698 | py | Python | components/aws/sagemaker/common/_utils.py | xieqihui/pipelines | a39ae8eb779e69e4e85e424abba8ecac3f60435f | [
"Apache-2.0"
] | 1 | 2019-06-20T19:39:39.000Z | 2019-06-20T19:39:39.000Z | components/aws/sagemaker/common/_utils.py | xieqihui/pipelines | a39ae8eb779e69e4e85e424abba8ecac3f60435f | [
"Apache-2.0"
] | 21 | 2020-01-28T22:48:55.000Z | 2022-03-08T22:48:12.000Z | components/aws/sagemaker/common/_utils.py | xieqihui/pipelines | a39ae8eb779e69e4e85e424abba8ecac3f60435f | [
"Apache-2.0"
] | 1 | 2019-07-16T17:47:04.000Z | 2019-07-16T17:47:04.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 34.061947 | 121 | 0.687581 |
79684677ab306a4b595cf8bbc7ff7ff48733acc0 | 29,053 | py | Python | hail/python/hail/backend/service_backend.py | jkgoodrich/hail | 95ce1d792b553a5e97b390d349237a7ed86fbf98 | [
"MIT"
] | null | null | null | hail/python/hail/backend/service_backend.py | jkgoodrich/hail | 95ce1d792b553a5e97b390d349237a7ed86fbf98 | [
"MIT"
] | null | null | null | hail/python/hail/backend/service_backend.py | jkgoodrich/hail | 95ce1d792b553a5e97b390d349237a7ed86fbf98 | [
"MIT"
] | null | null | null | from typing import Dict, Optional, Callable, Awaitable, Mapping, Any, List, Union, Tuple
import abc
import asyncio
import struct
import os
from hail.expr.expressions.base_expression import Expression
import orjson
import logging
import re
import yaml
from pathlib import Path
from hail.context import TemporaryDirectory... | 41.802878 | 141 | 0.601349 |
7968467d6a46e87fe815de2a99a218d24a7ac407 | 6,316 | py | Python | scrapy_news/scrapy_news/spiders/zerozero.py | dcaled/FTR-18 | f9b87f861eeef1e66e33b3f53cf50e7118e9ffc7 | [
"MIT"
] | null | null | null | scrapy_news/scrapy_news/spiders/zerozero.py | dcaled/FTR-18 | f9b87f861eeef1e66e33b3f53cf50e7118e9ffc7 | [
"MIT"
] | null | null | null | scrapy_news/scrapy_news/spiders/zerozero.py | dcaled/FTR-18 | f9b87f861eeef1e66e33b3f53cf50e7118e9ffc7 | [
"MIT"
] | 1 | 2021-04-17T15:29:11.000Z | 2021-04-17T15:29:11.000Z | # -*- coding: utf-8 -*-
import scrapy
from scrapy_news.items import SoccerNewsItem
import scrapy_news.url_selector as url_selector
#to run
#scrapy crawl zerozero
class ZeroZeroSpider(scrapy.Spider):
name = 'zerozero'
allowed_domains = ['zerozero.pt']
start_urls = [
#'http://www.zerozero.pt/news.ph... | 46.785185 | 71 | 0.601488 |
7968468b4d64be7100a6ad6f7d10b88e3cdd1f70 | 191 | py | Python | yandex/task6/task6.py | sdenisen/test | 709bcdd16d0f83f03b04e0bc7918bb3785993c59 | [
"Unlicense"
] | null | null | null | yandex/task6/task6.py | sdenisen/test | 709bcdd16d0f83f03b04e0bc7918bb3785993c59 | [
"Unlicense"
] | 2 | 2017-08-24T18:55:37.000Z | 2017-08-24T18:59:06.000Z | yandex/task6/task6.py | sdenisen/test | 709bcdd16d0f83f03b04e0bc7918bb3785993c59 | [
"Unlicense"
] | null | null | null | s = open("output.txt", "w")
with open("input.txt", "r") as f:
lines = f.readlines()
for l in lines:
a, b = l.split(" ")
s.write(str(int(a) + int(b)) + "\n")
s.close() | 23.875 | 44 | 0.486911 |
796846d565a0f7c7da3a08ddc8c88b9ba2522c75 | 62,147 | py | Python | test/functional/test_object.py | smerritt/swift | c4751d0d551ad193a205c71821f6770a31146421 | [
"Apache-2.0"
] | null | null | null | test/functional/test_object.py | smerritt/swift | c4751d0d551ad193a205c71821f6770a31146421 | [
"Apache-2.0"
] | 12 | 2015-06-23T23:20:17.000Z | 2016-01-27T00:37:12.000Z | test/functional/test_object.py | smerritt/swift | c4751d0d551ad193a205c71821f6770a31146421 | [
"Apache-2.0"
] | 5 | 2015-06-04T19:00:11.000Z | 2015-12-16T21:04:33.000Z | #!/usr/bin/python
# Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 appl... | 37.619249 | 79 | 0.525078 |
796846d71663e5f683c1dd5efd500456d8a50a82 | 7,011 | py | Python | test/gpgmelib.py | jerrykan/herder | 381f51198f21d232cc05d7c458638d78c0f25366 | [
"MIT"
] | 4 | 2020-08-01T00:34:14.000Z | 2022-02-27T06:04:12.000Z | test/gpgmelib.py | jerrykan/herder | 381f51198f21d232cc05d7c458638d78c0f25366 | [
"MIT"
] | 1 | 2021-05-17T22:47:26.000Z | 2021-05-25T14:26:06.000Z | test/gpgmelib.py | jerrykan/herder | 381f51198f21d232cc05d7c458638d78c0f25366 | [
"MIT"
] | 3 | 2020-11-13T17:43:43.000Z | 2022-02-27T06:04:13.000Z | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2011 Ralf Schlatterbeck, rsc@runtux.com.
# This module is free software, and you may redistribute it and/or modify
# under the same terms as Python, so long as this copyright message and
# disclaimer are retained in their original form.
#
# This module is distributed in the h... | 48.351724 | 73 | 0.889602 |
7968476eed28e542f2bd898473078f5496a96431 | 34,586 | py | Python | src/olympia/activity/tests/test_utils.py | Patil2099/addons-server | b1684182a8e0e3d8dfbc1f5b64946580f20de933 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/activity/tests/test_utils.py | Patil2099/addons-server | b1684182a8e0e3d8dfbc1f5b64946580f20de933 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/activity/tests/test_utils.py | Patil2099/addons-server | b1684182a8e0e3d8dfbc1f5b64946580f20de933 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import copy
import json
import os
from datetime import datetime, timedelta
from email.utils import formataddr
from django.conf import settings
from django.core import mail
from unittest import mock
import pytest
from waffle.testutils import override_switch
from olympia import amo
from olymp... | 45.092568 | 79 | 0.665298 |
7968484d2b646068039d5cb80b6cd09656ec9eeb | 153 | py | Python | nose2/tools/__init__.py | ltfish/nose2 | e47363dad10056cf906daf387613c21d74f37e56 | [
"BSD-2-Clause"
] | null | null | null | nose2/tools/__init__.py | ltfish/nose2 | e47363dad10056cf906daf387613c21d74f37e56 | [
"BSD-2-Clause"
] | null | null | null | nose2/tools/__init__.py | ltfish/nose2 | e47363dad10056cf906daf387613c21d74f37e56 | [
"BSD-2-Clause"
] | null | null | null | from .params import params, cartesian_params
from . import such
from . import decorators
__all__ = ['cartesian_params', 'params', 'such', 'decorators']
| 25.5 | 62 | 0.751634 |
796849e622ff230da7d46291fa4b78436ac21c24 | 23,162 | py | Python | pandas/core/window/expanding.py | arushi-08/pandas | 014ea2e5a8a647cfa5e3050a5c1299eb39b293d3 | [
"BSD-3-Clause"
] | 2 | 2021-12-28T09:06:32.000Z | 2022-01-28T06:47:12.000Z | pandas/core/window/expanding.py | arushi-08/pandas | 014ea2e5a8a647cfa5e3050a5c1299eb39b293d3 | [
"BSD-3-Clause"
] | 354 | 2018-05-26T13:28:49.000Z | 2022-03-31T01:11:46.000Z | pandas/core/window/expanding.py | arushi-08/pandas | 014ea2e5a8a647cfa5e3050a5c1299eb39b293d3 | [
"BSD-3-Clause"
] | 1 | 2021-11-17T06:32:30.000Z | 2021-11-17T06:32:30.000Z | from __future__ import annotations
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,
)
from pandas._typing import (
Axis,
WindowingRankType,
)
if TYPE_CHECKING:
from pandas import DataFrame, Series
from pandas.core.generic import NDFrame
from pandas.compat.nu... | 29.393401 | 88 | 0.555911 |
79684aa54ecff02260468235c6736832ada14fda | 403 | py | Python | myproject/wsgi_staging.py | zhukovvlad/django-cookbook | 17abd74868b284c170261e15881a411138fed20e | [
"MIT"
] | 40 | 2020-03-30T22:01:24.000Z | 2022-03-12T03:12:31.000Z | myproject/wsgi_staging.py | zhukovvlad/django-cookbook | 17abd74868b284c170261e15881a411138fed20e | [
"MIT"
] | 10 | 2021-03-30T13:06:53.000Z | 2022-03-12T01:05:30.000Z | myproject/wsgi_staging.py | zhukovvlad/django-cookbook | 17abd74868b284c170261e15881a411138fed20e | [
"MIT"
] | 41 | 2020-03-23T14:50:03.000Z | 2022-03-12T03:12:34.000Z | """
WSGI config for myproject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SET... | 23.705882 | 78 | 0.789082 |
79684bdeb44e81f22669b56d5597987b2bfeb795 | 8,379 | py | Python | tests/components/google_assistant/__init__.py | guiguid/core | d43617c41d6507f2d2b77aadf4fa1ebaf0058b14 | [
"Apache-2.0"
] | 1 | 2020-04-07T15:44:54.000Z | 2020-04-07T15:44:54.000Z | tests/components/google_assistant/__init__.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | tests/components/google_assistant/__init__.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Tests for the Google Assistant integration."""
from asynctest.mock import MagicMock
from homeassistant.components.google_assistant import helpers
def mock_google_config_store(agent_user_ids=None):
"""Fake a storage for google assistant."""
store = MagicMock(spec=helpers.GoogleConfigStore)
if agent_use... | 30.918819 | 84 | 0.562478 |
79684de0f98120930efa1aff6e6a5ab27fc79697 | 7,080 | py | Python | tools/extract_answers_smart.py | osteele/assignment-tools | 10b7b48965ed363c370a05fdf69876f21bb2fafb | [
"MIT"
] | null | null | null | tools/extract_answers_smart.py | osteele/assignment-tools | 10b7b48965ed363c370a05fdf69876f21bb2fafb | [
"MIT"
] | null | null | null | tools/extract_answers_smart.py | osteele/assignment-tools | 10b7b48965ed363c370a05fdf69876f21bb2fafb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" This script is designed to support active reading. It takes as input
a set of ipython notebook as well as some target cells which define a set
of reading exercises. The script processes the collection of notebooks
and builds a notebook which summarizes the responses to each ques... | 40.457143 | 150 | 0.617373 |
79684e9e3758b8a828dddaa8a5745ecb7782ef5f | 1,252 | py | Python | ComRISB/pygtool/gw_gutz/plot_dos.py | comscope/comsuite | d51c43cad0d15dc3b4d1f45e7df777cdddaa9d6c | [
"BSD-3-Clause"
] | 18 | 2019-06-15T18:08:21.000Z | 2022-01-30T05:01:29.000Z | ComRISB/pygtool/gw_gutz/plot_dos.py | comscope/Comsuite | b80ca9f34c519757d337487c489fb655f7598cc2 | [
"BSD-3-Clause"
] | null | null | null | ComRISB/pygtool/gw_gutz/plot_dos.py | comscope/Comsuite | b80ca9f34c519757d337487c489fb655f7598cc2 | [
"BSD-3-Clause"
] | 11 | 2019-06-05T02:57:55.000Z | 2021-12-29T02:54:25.000Z | import numpy as np
import h5py
from pyglib.estructure import dos as _dos
from future_builtins import zip
with h5py.File("../GPARAMBANDS.h5", 'r') as f:
w_k = f["/kptwt"][...]
bnd_ne = f["/NE_LIST"][...]
nsym = f["/symnop"][0]
nkp = f["/kptdim"][0]
nbmax = f["/nbmax"][0]
with h5py.File('GLOG.h5', ... | 27.822222 | 67 | 0.603834 |
79684ea3e86727c064fb0235c72e6dde1cf63670 | 4,180 | py | Python | ceilometer/compute/virt/libvirt/utils.py | cristifalcas/ceilometer | 251eabbf038174c77283649a1e10725796130016 | [
"Apache-2.0"
] | null | null | null | ceilometer/compute/virt/libvirt/utils.py | cristifalcas/ceilometer | 251eabbf038174c77283649a1e10725796130016 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | ceilometer/compute/virt/libvirt/utils.py | cristifalcas/ceilometer | 251eabbf038174c77283649a1e10725796130016 | [
"Apache-2.0"
] | 3 | 2018-08-15T14:35:23.000Z | 2019-01-11T15:57:02.000Z | #
# Copyright 2016 Red Hat, 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 writi... | 32.913386 | 79 | 0.67201 |
79685018222ac6b07e641d90eca79035fefa03b6 | 6,989 | py | Python | Nat_Protocols_Version/PE_BASH_MAKER.py | bkohrn/Duplex-Sequencing | 93aa13c34e3a3b08e4902dab90bfae00785e3f3a | [
"BSD-3-Clause"
] | 51 | 2015-01-02T22:53:41.000Z | 2019-11-08T08:55:47.000Z | Nat_Protocols_Version/PE_BASH_MAKER.py | bkohrn/Duplex-Sequencing | 93aa13c34e3a3b08e4902dab90bfae00785e3f3a | [
"BSD-3-Clause"
] | 36 | 2015-01-15T19:42:01.000Z | 2019-08-21T18:15:58.000Z | Nat_Protocols_Version/PE_BASH_MAKER.py | bkohrn/Duplex-Sequencing | 93aa13c34e3a3b08e4902dab90bfae00785e3f3a | [
"BSD-3-Clause"
] | 41 | 2015-01-15T19:59:03.000Z | 2019-08-26T08:29:26.000Z | #!/usr/bin/env python
"""
PE Bash Maker V 1.11
by Brendan Kohrn
August 11, 2014
Write a bash script to run the process.
This program makes a shell script so that the user will not need to
enter the commands for all the programs himself. When using it,
navigate to the folder with your data, with all the programs ... | 36.025773 | 103 | 0.50465 |
7968506546a83c8ea3d884562c6fcc70c240142a | 32,278 | py | Python | data/config.py | smihael/yolact | 26dd23d55b356a4f4bb04198d984c8796bb68cda | [
"MIT"
] | null | null | null | data/config.py | smihael/yolact | 26dd23d55b356a4f4bb04198d984c8796bb68cda | [
"MIT"
] | null | null | null | data/config.py | smihael/yolact | 26dd23d55b356a4f4bb04198d984c8796bb68cda | [
"MIT"
] | null | null | null | from backbone import ResNetBackbone, VGGBackbone, ResNetBackboneGN, DarkNetBackbone
from math import sqrt
import torch
# for making bounding boxes pretty
COLORS = ((244, 67, 54),
(233, 30, 99),
(156, 39, 176),
(103, 58, 183),
( 63, 81, 181),
( 33, 150, 243),
... | 37.101149 | 140 | 0.627083 |
7968519e962285087b0ee6908da9489a53111bdc | 5,929 | py | Python | main.py | Victorpc98/CE888-Project | 99c20adc78eb53ac4d3c87543ef8da1ef4d10adc | [
"MIT"
] | 1 | 2020-04-18T21:03:28.000Z | 2020-04-18T21:03:28.000Z | main.py | Victorpc98/CE888-Project | 99c20adc78eb53ac4d3c87543ef8da1ef4d10adc | [
"MIT"
] | null | null | null | main.py | Victorpc98/CE888-Project | 99c20adc78eb53ac4d3c87543ef8da1ef4d10adc | [
"MIT"
] | null | null | null | import sys, getopt
from src.uct import OXOState,OthelloState,NimState,UCT
from src.dataCollector import DataCollector
from src.rfc import RandomForest
from src.svm import SVM
from src.mlp import MLPClassifier
import argparse
import pandas as pd
import datetime
from src.definitions import ROOT_DIR,RESULTS_DIR
from itert... | 48.598361 | 316 | 0.545286 |
796851ac5ab458846922cdd2fdd0f2bc2ab1c259 | 5,915 | py | Python | ocempgui/widgets/TwistedRenderer.py | illume/eyestabs | 9ce717743a6a4fe7b561c68599e9352da3acf080 | [
"Unlicense"
] | null | null | null | ocempgui/widgets/TwistedRenderer.py | illume/eyestabs | 9ce717743a6a4fe7b561c68599e9352da3acf080 | [
"Unlicense"
] | null | null | null | ocempgui/widgets/TwistedRenderer.py | illume/eyestabs | 9ce717743a6a4fe7b561c68599e9352da3acf080 | [
"Unlicense"
] | null | null | null | # $Id: TwistedRenderer.py,v 1.7.2.3 2006/12/25 13:05:46 marcusva Exp $
#
# Copyright (c) 2005, Benjamin Olsen
# 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 mu... | 35.419162 | 78 | 0.654607 |
796852e8830b5ae6ecd354a44147062a5592044f | 483 | py | Python | scheduler/migrations/0018_auto_20181224_1127.py | janton42/reservationator | b5f8d64b39dcdd75525f83cf97a59e1c66ea4125 | [
"Unlicense"
] | 1 | 2018-12-28T04:18:14.000Z | 2018-12-28T04:18:14.000Z | scheduler/migrations/0018_auto_20181224_1127.py | janton42/reservationator | b5f8d64b39dcdd75525f83cf97a59e1c66ea4125 | [
"Unlicense"
] | null | null | null | scheduler/migrations/0018_auto_20181224_1127.py | janton42/reservationator | b5f8d64b39dcdd75525f83cf97a59e1c66ea4125 | [
"Unlicense"
] | null | null | null | # Generated by Django 2.1.3 on 2018-12-24 19:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('scheduler', '0017_auto_20181224_1122'),
]
operations = [
migrations.AlterField(
model_name='eve... | 24.15 | 114 | 0.641822 |
796853a86400eca405582102fdbf7f24f4692c6a | 3,380 | py | Python | NetworkLatencyCollector.py | jthiltges/ps-ingest | 1ee2c044bda2331ab0139a546bd442f4988bb569 | [
"MIT"
] | 3 | 2019-09-24T14:44:57.000Z | 2020-01-07T16:05:47.000Z | NetworkLatencyCollector.py | jthiltges/ps-ingest | 1ee2c044bda2331ab0139a546bd442f4988bb569 | [
"MIT"
] | 3 | 2019-12-12T19:43:02.000Z | 2020-08-28T20:05:56.000Z | NetworkLatencyCollector.py | jthiltges/ps-ingest | 1ee2c044bda2331ab0139a546bd442f4988bb569 | [
"MIT"
] | 6 | 2019-04-05T12:48:25.000Z | 2022-02-07T22:00:17.000Z | #!/usr/bin/env python
import threading
from threading import Thread
import copy
import json
import math
import hashlib
import siteMapping
import collector
class NetworkLatencyCollector(collector.Collector):
def __init__(self):
self.TOPIC = "/topic/perfsonar.raw.histogram-owdelay"
self.INDEX = '... | 34.845361 | 105 | 0.508876 |
7968541d3a99be078344a6613516eef4b9900541 | 6,204 | py | Python | hug_server/hug_script_nn_only_without_hug.py | jayvicson/Vote-Goat-Backend | d5880ccbd03e08e69f793f28bd8da74285252c7e | [
"MIT"
] | null | null | null | hug_server/hug_script_nn_only_without_hug.py | jayvicson/Vote-Goat-Backend | d5880ccbd03e08e69f793f28bd8da74285252c7e | [
"MIT"
] | 2 | 2018-06-15T10:44:33.000Z | 2018-06-15T10:44:48.000Z | hug_server/hug_script_nn_only_without_hug.py | jayvicson/Vote-Goat-Backend | d5880ccbd03e08e69f793f28bd8da74285252c7e | [
"MIT"
] | null | null | null | # Required for NN
from tqdm import tqdm
from sklearn import dummy, metrics, cross_validation, ensemble
from keras.models import load_model
import numpy as np
import pandas
import os
import zipfile
import requests
import keras.models as kmodels
import keras.layers as klayers
import keras.backend as K
import ... | 36.280702 | 204 | 0.628627 |
796855358393c73909582afd9ad51de48cc7d008 | 667 | py | Python | tacotron/dataset_precalc_features.py | yweweler/single-speaker-tts | 04aa714e0ba79c932179cc45a0bbfaa28e768cc7 | [
"MIT"
] | 10 | 2018-10-25T07:08:14.000Z | 2022-03-10T21:58:42.000Z | tacotron/dataset_precalc_features.py | yweweler/single-speaker-tts | 04aa714e0ba79c932179cc45a0bbfaa28e768cc7 | [
"MIT"
] | 6 | 2018-11-16T14:31:10.000Z | 2018-12-28T16:13:19.000Z | tacotron/dataset_precalc_features.py | yweweler/single-speaker-tts | 04aa714e0ba79c932179cc45a0bbfaa28e768cc7 | [
"MIT"
] | 2 | 2019-01-09T10:36:58.000Z | 2019-01-21T04:40:08.000Z | from datasets.statistics import collect_decibel_statistics
from tacotron.params.dataset import dataset_params
if __name__ == '__main__':
dataset = dataset_params.dataset_loader(dataset_folder=dataset_params.dataset_folder,
char_dict=dataset_params.vocabulary_dict,
... | 44.466667 | 89 | 0.665667 |
796855bfe1b35f3281b3d55c663a6e0ceca83dca | 4,418 | py | Python | crawler/main.py | remram44/crawler-structure | f5596646fcd957317d56e14f632c47949e433193 | [
"Unlicense"
] | null | null | null | crawler/main.py | remram44/crawler-structure | f5596646fcd957317d56e14f632c47949e433193 | [
"Unlicense"
] | null | null | null | crawler/main.py | remram44/crawler-structure | f5596646fcd957317d56e14f632c47949e433193 | [
"Unlicense"
] | null | null | null | from autobahn.twisted.resource import WebSocketResource
from autobahn.twisted.websocket import WebSocketServerProtocol, \
WebSocketServerFactory
import itertools
from jinja2 import PackageLoader, Environment
import sys
from twisted.internet import reactor
from twisted.python import log
from twisted.web.resource imp... | 32.970149 | 78 | 0.654368 |
796855e2878f199eff1d64d71cf8dac9ac30fe8e | 2,418 | py | Python | convert_torch_to_onnx.py | Sewanex/wav2vec2-service | fe9c5fa61bfe85f3e36c78cf71a3bcbe3959ac13 | [
"MIT"
] | null | null | null | convert_torch_to_onnx.py | Sewanex/wav2vec2-service | fe9c5fa61bfe85f3e36c78cf71a3bcbe3959ac13 | [
"MIT"
] | null | null | null | convert_torch_to_onnx.py | Sewanex/wav2vec2-service | fe9c5fa61bfe85f3e36c78cf71a3bcbe3959ac13 | [
"MIT"
] | null | null | null | from onnxruntime.quantization.quantize import quantize
from transformers import Wav2Vec2ForCTC
import torch
import argparse
def convert_to_onnx(model_id_or_path, onnx_model_name):
print(f"Converting {model_id_or_path} to onnx")
model = Wav2Vec2ForCTC.from_pretrained(model_id_or_path)
audio_len = 250000
... | 45.622642 | 113 | 0.627792 |
796856bd6ef335f748f0c039af347708c06c7327 | 1,381 | py | Python | shops/jcpenney.py | ikp4success/shopasource | 9a9ed5c58a8b37b6ff169b45f7fdfcb44809fd88 | [
"Apache-2.0"
] | 3 | 2019-12-04T07:08:55.000Z | 2020-12-08T01:38:46.000Z | shops/jcpenney.py | ikp4success/shopasource | 9a9ed5c58a8b37b6ff169b45f7fdfcb44809fd88 | [
"Apache-2.0"
] | null | null | null | shops/jcpenney.py | ikp4success/shopasource | 9a9ed5c58a8b37b6ff169b45f7fdfcb44809fd88 | [
"Apache-2.0"
] | null | null | null | # import uuid
from shops.shop_base import ShopBase
class Jcpenney(ShopBase):
name = "JCPENNEY"
def parse_results(self, response):
items = self.safe_grab(
self.safe_json(response.text), ["organicZoneInfo", "products"]
)
for item in items:
item_url = self.safe_gr... | 32.880952 | 88 | 0.559015 |
7968583d83e490755aa073e737f624ec875a8073 | 3,476 | py | Python | tests/management/commands/auto_translate.py | ChanTsune/Django-Boost | 5141605132c1d46aee978ee3cdbc8db5e9d4b8c4 | [
"MIT"
] | 25 | 2019-05-23T11:19:18.000Z | 2022-02-19T15:28:09.000Z | tests/management/commands/auto_translate.py | ChanTsune/Django-Boost | 5141605132c1d46aee978ee3cdbc8db5e9d4b8c4 | [
"MIT"
] | 49 | 2019-09-17T08:40:22.000Z | 2022-03-02T14:08:27.000Z | tests/management/commands/auto_translate.py | ChanTsune/Django-Boost | 5141605132c1d46aee978ee3cdbc8db5e9d4b8c4 | [
"MIT"
] | 4 | 2019-09-17T08:16:55.000Z | 2020-08-24T09:33:16.000Z | import os
from json.decoder import JSONDecodeError
from time import sleep
from urllib import parse
from django.core.management import call_command
from django_boost.core.management import AppCommand
APP_URL = "https://script.google.com/macros/"
APP_URL += "s/AKfycby8YkD_bF_GMmJ4tHjjeH6ah8XRdAAr1ihR5ZTFGsM6dnJNOu0/ex... | 39.5 | 78 | 0.556387 |
7968584cf8e122ae2302d2753e3ce788440dae2f | 5,952 | py | Python | camelot/view/model_thread/__init__.py | FrDeGraux/camelot | 56aa93f774edbb0c31a21109e187cf81f49a68d8 | [
"BSD-3-Clause"
] | 12 | 2020-08-02T17:00:37.000Z | 2022-01-22T17:49:23.000Z | camelot/view/model_thread/__init__.py | FrDeGraux/camelot | 56aa93f774edbb0c31a21109e187cf81f49a68d8 | [
"BSD-3-Clause"
] | 124 | 2020-08-19T15:03:54.000Z | 2022-03-31T07:12:16.000Z | camelot/view/model_thread/__init__.py | FrDeGraux/camelot | 56aa93f774edbb0c31a21109e187cf81f49a68d8 | [
"BSD-3-Clause"
] | 17 | 2020-04-25T19:22:20.000Z | 2022-01-25T08:46:19.000Z | # ============================================================================
#
# Copyright (C) 2007-2016 Conceptive Engineering bvba.
# www.conceptive.be / info@conceptive.be
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition... | 38.901961 | 85 | 0.683972 |
79685891bc4caaf2f8c6529747b6f99ed7845fbe | 859 | py | Python | Applications/ParaView/Testing/Python/TestClipCylinder.py | trickyMan/paraview_view | 3b38670e8259b688093e0d7ba2fe2edd7c5d57a7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | Applications/ParaView/Testing/Python/TestClipCylinder.py | trickyMan/paraview_view | 3b38670e8259b688093e0d7ba2fe2edd7c5d57a7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | Applications/ParaView/Testing/Python/TestClipCylinder.py | trickyMan/paraview_view | 3b38670e8259b688093e0d7ba2fe2edd7c5d57a7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #### import the simple module from the paraview
from paraview.simple import *
# Create a wavelet and clip it with a Cylinder.
wavelet = Wavelet()
Show()
clip = Clip()
clip.ClipType = "Cylinder"
clip.InsideOut = True
cylinder = clip.ClipType
cylinder.Axis = [-1, 1, -1]
cylinder.Center = [8, 4, -3]
cylinder.Radius = 3... | 24.542857 | 79 | 0.718277 |
796858a43f483cb420fb26e946f7e998bddc3ea2 | 8,856 | py | Python | sdk/python/pulumi_aws/dms/event_subscription.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/dms/event_subscription.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/dms/event_subscription.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 41.971564 | 166 | 0.632001 |
796858a46169714d23b9420c0afe7f51be32a9e1 | 1,699 | py | Python | support/exectest.py | sr7cb/spiral-software | 349d9e0abe75bf4b9a4690f2dbee631700f8361a | [
"BSD-2-Clause-FreeBSD"
] | 42 | 2019-09-01T19:29:39.000Z | 2022-01-17T12:26:12.000Z | support/exectest.py | sr7cb/spiral-software | 349d9e0abe75bf4b9a4690f2dbee631700f8361a | [
"BSD-2-Clause-FreeBSD"
] | 12 | 2020-11-20T16:15:52.000Z | 2022-01-07T21:17:28.000Z | support/exectest.py | sr7cb/spiral-software | 349d9e0abe75bf4b9a4690f2dbee631700f8361a | [
"BSD-2-Clause-FreeBSD"
] | 21 | 2019-08-20T19:27:52.000Z | 2022-02-01T22:11:18.000Z | #! python
## Copyright (c) 2018-2021, Carnegie Mellon University
## See LICENSE for details
import sys
import subprocess
import os
if len(sys.argv) < 4:
print ( 'Usage: ' + sys.argv[0] + ' gpu_flag gap_exe_name gap_fil1 ... gap_filN' )
sys.exit ( 'missing argument(s)' )
gpu_flag = sys.argv[1]
gap_exe = sy... | 27.852459 | 132 | 0.621542 |
79685926bd7fc57a912a4221e812b099dea10ae6 | 1,584 | py | Python | osc_lib/cli/format_columns.py | casual-lemon/osc-lib | 415a6c7b191ac665fb7763d12d1b427b7b630586 | [
"Apache-2.0"
] | 21 | 2016-05-25T08:18:17.000Z | 2021-02-27T10:30:21.000Z | osc_lib/cli/format_columns.py | casual-lemon/osc-lib | 415a6c7b191ac665fb7763d12d1b427b7b630586 | [
"Apache-2.0"
] | null | null | null | osc_lib/cli/format_columns.py | casual-lemon/osc-lib | 415a6c7b191ac665fb7763d12d1b427b7b630586 | [
"Apache-2.0"
] | 10 | 2016-09-14T16:44:40.000Z | 2021-07-26T17:58:15.000Z | # Copyright 2017 Huawei, 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 appli... | 28.8 | 77 | 0.722854 |
796859dc5aa4c56cd61a384223de4e7436873a7b | 1,128 | py | Python | aiida/backends/djsite/db/migrations/0012_drop_dblock.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | 1 | 2019-04-29T12:39:31.000Z | 2019-04-29T12:39:31.000Z | aiida/backends/djsite/db/migrations/0012_drop_dblock.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/djsite/db/migrations/0012_drop_dblock.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 34.181818 | 75 | 0.515071 |
79685a455dc9d8ad8741bca13f1f8921718805e0 | 271 | py | Python | tests/artificial/transf_Logit/trend_MovingMedian/cycle_30/ar_12/test_artificial_1024_Logit_MovingMedian_30_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_Logit/trend_MovingMedian/cycle_30/ar_12/test_artificial_1024_Logit_MovingMedian_30_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_Logit/trend_MovingMedian/cycle_30/ar_12/test_artificial_1024_Logit_MovingMedian_30_12_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 30, transform = "Logit", sigma = 0.0, exog_count = 20, ar_order = 12); | 38.714286 | 166 | 0.734317 |
79685bb185ffca09d07ed1a26e8d7213adf09d54 | 1,533 | py | Python | hypergan/samplers/batch_walk_sampler.py | stone3311/HyperGAN | eed4869688ac4273a661cbbd03db0ec1dad89049 | [
"MIT"
] | null | null | null | hypergan/samplers/batch_walk_sampler.py | stone3311/HyperGAN | eed4869688ac4273a661cbbd03db0ec1dad89049 | [
"MIT"
] | null | null | null | hypergan/samplers/batch_walk_sampler.py | stone3311/HyperGAN | eed4869688ac4273a661cbbd03db0ec1dad89049 | [
"MIT"
] | null | null | null | from PIL import Image
from hypergan.samplers.base_sampler import BaseSampler
import numpy as np
import torch
import torch.nn as nn
import time
class BatchWalkSampler(BaseSampler):
def __init__(self, gan, samples_per_row=4, session=None):
BaseSampler.__init__(self, gan, samples_per_row)
self.latent1... | 36.5 | 126 | 0.62818 |
79685bbda302ac4201576893904a9f3f43e16c42 | 20,291 | py | Python | applications/mixed_reality.py | wpeebles/gangealing | 870eab8f1685f62000f98a05d983e2a2ed78e68c | [
"BSD-2-Clause"
] | 605 | 2021-12-10T00:56:58.000Z | 2022-03-31T03:34:08.000Z | applications/mixed_reality.py | wpeebles/gangealing | 870eab8f1685f62000f98a05d983e2a2ed78e68c | [
"BSD-2-Clause"
] | 7 | 2021-12-10T11:40:19.000Z | 2022-03-31T07:05:29.000Z | applications/mixed_reality.py | wpeebles/gangealing | 870eab8f1685f62000f98a05d983e2a2ed78e68c | [
"BSD-2-Clause"
] | 71 | 2021-12-10T01:00:55.000Z | 2022-03-30T04:57:16.000Z | """
This script directly applies our method to video, finding dense correspondences across time in an input video. This works
by applying GANgealing per-frame without using any temporal information.
"""
import torch
import numpy as np
import math
from datasets import img_dataloader
from prepare_data import nchw_center_... | 63.60815 | 175 | 0.643487 |
79685c495319f69c05f9ccf15cb3528921aa1ccd | 853 | py | Python | survol/sources_types/Azure/enumerate_subscription.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | survol/sources_types/Azure/enumerate_subscription.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | survol/sources_types/Azure/enumerate_subscription.py | AugustinMascarelli/survol | 7a822900e82d1e6f016dba014af5741558b78f15 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Azure available subscriptions
"""
import sys
import socket
import lib_util
import lib_common
import lib_credentials
from sources_types.Azure import subscription as azure_subscription
Usable = lib_util.UsableWindows
def Main():
cgiEnv = lib_common.CgiEnv()
grph = cgiEnv.GetGraph()
roo... | 22.447368 | 74 | 0.772567 |
79685cc94f35eebcb0a8da0e6fedbbc20c8a4c5d | 28,233 | py | Python | Bio/KEGG/KGML/KGML_pathway.py | Rizwanabro/biopython1 | b2ac2226eeab01dbdeac4dfd2d24a897589eb56d | [
"BSD-3-Clause"
] | null | null | null | Bio/KEGG/KGML/KGML_pathway.py | Rizwanabro/biopython1 | b2ac2226eeab01dbdeac4dfd2d24a897589eb56d | [
"BSD-3-Clause"
] | null | null | null | Bio/KEGG/KGML/KGML_pathway.py | Rizwanabro/biopython1 | b2ac2226eeab01dbdeac4dfd2d24a897589eb56d | [
"BSD-3-Clause"
] | 1 | 2020-11-06T20:20:12.000Z | 2020-11-06T20:20:12.000Z | # Copyright 2013 by Leighton Pritchard. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""This module provides classes to represent a KGML Pathway Map.
The KGML definition is ... | 35.115672 | 79 | 0.57493 |
79685cfb03e400035fb008da152a6eaada5879c2 | 129 | py | Python | tests/test_utils.py | kirillskor/dedoc | 7793a1be2220a26e7520521306351dfc0a9c8d98 | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | kirillskor/dedoc | 7793a1be2220a26e7520521306351dfc0a9c8d98 | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | kirillskor/dedoc | 7793a1be2220a26e7520521306351dfc0a9c8d98 | [
"Apache-2.0"
] | null | null | null | import os
def get_full_path(path, file=__file__):
dir_path = os.path.dirname(file)
return os.path.join(dir_path, path)
| 18.428571 | 39 | 0.72093 |
79685d54d2cd1fe9aecf331e0e578c69f874fd60 | 806 | py | Python | alembic/versions/2016060611_remove_action_table_4bc4499383aa.py | Matt-F-Wu/codalab_cl | e08e82afbc3d478c52a811065701cf53c9d3891e | [
"Apache-2.0"
] | null | null | null | alembic/versions/2016060611_remove_action_table_4bc4499383aa.py | Matt-F-Wu/codalab_cl | e08e82afbc3d478c52a811065701cf53c9d3891e | [
"Apache-2.0"
] | null | null | null | alembic/versions/2016060611_remove_action_table_4bc4499383aa.py | Matt-F-Wu/codalab_cl | e08e82afbc3d478c52a811065701cf53c9d3891e | [
"Apache-2.0"
] | null | null | null | """Remove action table.
Revision ID: 4bc4499383aa
Revises: 26cf8de18f09
Create Date: 2016-06-06 11:19:31.216291
"""
# revision identifiers, used by Alembic.
revision = '4bc4499383aa'
down_revision = '26cf8de18f09'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():
... | 26 | 93 | 0.730769 |
79685d9e4a85ba9dad9f06f7069a611467159ac2 | 1,690 | py | Python | setup.py | csams/queryable | 62e416dfc8b418d1cc361b59f401accc8c111b52 | [
"Apache-2.0"
] | 1 | 2020-08-11T21:38:24.000Z | 2020-08-11T21:38:24.000Z | setup.py | csams/queryable | 62e416dfc8b418d1cc361b59f401accc8c111b52 | [
"Apache-2.0"
] | null | null | null | setup.py | csams/queryable | 62e416dfc8b418d1cc361b59f401accc8c111b52 | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
runtime = set([
"pyyaml",
])
develop = set([
"coverage",
"flake8",
"pytest",
"pytest-cov",
"setuptools",
"twine",
"wheel",
])
docs = set([
"Sphinx",
"sphinx_rtd_theme",
])... | 25.223881 | 78 | 0.56213 |
79685dccd70f83b71143bc5661560bba0f88a1e6 | 2,366 | py | Python | scripts/exm_multiclass.py | nicococo/tilitools | a9b62e2a6aa10322e2433f399634d3423704ccab | [
"MIT"
] | 38 | 2015-05-06T07:14:08.000Z | 2021-07-21T05:57:57.000Z | scripts/exm_multiclass.py | nicococo/tilitools | a9b62e2a6aa10322e2433f399634d3423704ccab | [
"MIT"
] | 1 | 2015-05-25T22:15:26.000Z | 2015-05-25T22:15:26.000Z | scripts/exm_multiclass.py | nicococo/tilitools | a9b62e2a6aa10322e2433f399634d3423704ccab | [
"MIT"
] | 15 | 2015-05-06T15:44:39.000Z | 2022-01-11T06:25:54.000Z | import numpy as np
import matplotlib.pyplot as plt
from ssvm import SSVM
from latent_svdd import LatentSVDD
from latent_ocsvm import LatentOCSVM
from latent_pca import LatentPCA
from so_multiclass import SOMultiClass
if __name__ == '__main__':
NUM_CLASSES = 3
NUM_DATA = 40 # per class
# generate raw t... | 27.511628 | 129 | 0.585799 |
79685eb8daed40fa8118f167602a017b7d827c79 | 2,261 | py | Python | setup.py | Doradx/luma.examples | d4641281fe18ffc5cfd6c307c79e7d7fefc36ffa | [
"MIT"
] | null | null | null | setup.py | Doradx/luma.examples | d4641281fe18ffc5cfd6c307c79e7d7fefc36ffa | [
"MIT"
] | null | null | null | setup.py | Doradx/luma.examples | d4641281fe18ffc5cfd6c307c79e7d7fefc36ffa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
def check_setuptools_features():
import pkg_resources
try:
list(pkg_resources.parse_requirements('foo~=1.0'))
except ValueError:
exit('Your Python distribution comes with an incompatible versio... | 27.91358 | 90 | 0.597081 |
79686028fed752ddc15955541713ddfd22ed7c90 | 502 | py | Python | main.py | Jachdich/scraper | 6a8c0984d6f3a151080e934ee20c58f7847ad358 | [
"MIT"
] | null | null | null | main.py | Jachdich/scraper | 6a8c0984d6f3a151080e934ee20c58f7847ad358 | [
"MIT"
] | null | null | null | main.py | Jachdich/scraper | 6a8c0984d6f3a151080e934ee20c58f7847ad358 | [
"MIT"
] | null | null | null | from scrapers.poland import scrape_poland_pl, scrape_poland_en, scrape_poland_ua
from scrapers.moldova_ro import scrape_moldova_ro
from scrapers.hungary_hu import scrape_hungary_hu
if __name__=="__main__":
print("Scraping Poland (PL)")
scrape_poland_pl()
print("Scraping Poland (EN)")
scrape_poland_en()... | 26.421053 | 80 | 0.733068 |
79686033463bb3ff7f99c9baf00aa14b0a7e306d | 1,126 | py | Python | pre_work_python_271218/code.py | SabeehaMomin/dsmp-pre-work | 092095f90531e4e98b633dcd8a2df3aff7a9c42c | [
"MIT"
] | null | null | null | pre_work_python_271218/code.py | SabeehaMomin/dsmp-pre-work | 092095f90531e4e98b633dcd8a2df3aff7a9c42c | [
"MIT"
] | null | null | null | pre_work_python_271218/code.py | SabeehaMomin/dsmp-pre-work | 092095f90531e4e98b633dcd8a2df3aff7a9c42c | [
"MIT"
] | null | null | null | # --------------
# Code starts here
class_1=['Geoffrey Hinton','Andrew Ng','Sebastian Raschka','Yoshua Bengio']
class_2=['Hilary Mason','Carla Gentry','Corinna Cortes']
new_class=class_1+class_2
print(new_class)
new_class=new_class+['Peter Warden']
print(new_class)
new_class.remove('Carla Gentry')
print(new_class)
# Co... | 22.52 | 147 | 0.705151 |
79686041cf85956c67ea87d6bd7b27848c992e4a | 3,794 | py | Python | examples/monarch-build-workflow/scripts/main.py | RTXteam/kgx | 902ad8e9ac9069616ded61c8a5a7a61c4467335c | [
"BSD-3-Clause"
] | null | null | null | examples/monarch-build-workflow/scripts/main.py | RTXteam/kgx | 902ad8e9ac9069616ded61c8a5a7a61c4467335c | [
"BSD-3-Clause"
] | null | null | null | examples/monarch-build-workflow/scripts/main.py | RTXteam/kgx | 902ad8e9ac9069616ded61c8a5a7a61c4467335c | [
"BSD-3-Clause"
] | null | null | null | """
Loads all the turtle files with their required ontologies and transforms them to
json. Then loads all these json files, along with the semmeddb edges.csv and
nodes.csv files, into a single NetworkX graph, and performs `clique_merge` on it.
Finally, saves the resulting NetworkX graph as `clique_merged.csv`
"""
impor... | 30.352 | 125 | 0.665261 |
7968610495971d9c6bf118d22a9067fd78023c5a | 976 | py | Python | list_songs/music_names_from_billboard.py | philipperemy/instant-music-playlist-downloader | cf62669a2298ea6835f7e289ec5ce8a9ea2a3573 | [
"MIT"
] | 17 | 2017-10-21T02:11:14.000Z | 2022-03-02T18:50:20.000Z | list_songs/music_names_from_billboard.py | philipperemy/instant-music-playlist-downloader | cf62669a2298ea6835f7e289ec5ce8a9ea2a3573 | [
"MIT"
] | 3 | 2018-02-04T03:35:14.000Z | 2021-06-25T15:20:08.000Z | list_songs/music_names_from_billboard.py | philipperemy/instant-music-playlist-downloader | cf62669a2298ea6835f7e289ec5ce8a9ea2a3573 | [
"MIT"
] | 4 | 2018-02-25T08:17:00.000Z | 2020-09-23T21:53:41.000Z | # http://billboardtop100of.com/1989-2/
import requests
import string
from bs4 import BeautifulSoup
printable = set(string.printable)
output_filename = 'music.txt'
print('Writing to {}.'.format(output_filename))
music_names = open(output_filename, 'w')
for year in range(1995, 2017):
if year == 2013:
cont... | 30.5 | 95 | 0.657787 |
79686144bea113974c98ebc24d6b76e2fc5592e6 | 2,707 | py | Python | repomanager/repo_changes.py | tdunlap607/PyRef | b15a25a9d43a1021e700be78b5c80af0ec9aab7d | [
"MIT"
] | null | null | null | repomanager/repo_changes.py | tdunlap607/PyRef | b15a25a9d43a1021e700be78b5c80af0ec9aab7d | [
"MIT"
] | null | null | null | repomanager/repo_changes.py | tdunlap607/PyRef | b15a25a9d43a1021e700be78b5c80af0ec9aab7d | [
"MIT"
] | null | null | null | import ast
import os
import astunparse
import pandas as pd
from git import Repo
# get the the changes in the latest commits and store them in a dataframe
def last_commit_changes(repo_path):
modified_files = []
repo = Repo(repo_path)
for item in repo.head.commit.diff('HEAD~1').iter_change_type('M'): # TOD... | 38.126761 | 115 | 0.562615 |
7968615775ecb709407ec13d84ebd7355cc5a0e5 | 101,346 | py | Python | tests/acceptance/cli_test.py | chris-crone/compose | 6659e99aff206f88202ad465de6846d3a7d362ed | [
"Apache-2.0"
] | null | null | null | tests/acceptance/cli_test.py | chris-crone/compose | 6659e99aff206f88202ad465de6846d3a7d362ed | [
"Apache-2.0"
] | 1 | 2021-06-01T22:25:11.000Z | 2021-06-01T22:25:11.000Z | tests/acceptance/cli_test.py | chris-crone/compose | 6659e99aff206f88202ad465de6846d3a7d362ed | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import datetime
import json
import os
import os.path
import re
import signal
import subprocess
import time
from collections import Counter
from collections import namedtuple
from operator import attrgetter
import py... | 38.979231 | 101 | 0.601898 |
796862a53eeca58cb92f3740ad28a3cef7ad465b | 70 | py | Python | skulpt/src/lib/inspect.py | kushal4/blockpy | 7da22c735315a1eaa1260be355c552465044ca7a | [
"Apache-2.0"
] | 8 | 2016-07-17T22:17:39.000Z | 2021-01-22T19:03:21.000Z | skulpt/src/lib/inspect.py | kushal4/blockpy | 7da22c735315a1eaa1260be355c552465044ca7a | [
"Apache-2.0"
] | 1 | 2016-07-31T23:42:11.000Z | 2016-07-31T23:42:11.000Z | skulpt/src/lib/inspect.py | kushal4/blockpy | 7da22c735315a1eaa1260be355c552465044ca7a | [
"Apache-2.0"
] | 4 | 2019-10-16T21:50:53.000Z | 2021-01-11T06:25:57.000Z | raise NotImplementedError("inspect is not yet implemented in Skulpt")
| 35 | 69 | 0.828571 |
7968639ca49a991a38d711e4678972526d4c3c13 | 37,359 | py | Python | models/keras_ssd512.py | connorlee77/ssd_keras | 0e1b9cff4300fe6e11a4345aa47d740f76bdcef2 | [
"Apache-2.0"
] | null | null | null | models/keras_ssd512.py | connorlee77/ssd_keras | 0e1b9cff4300fe6e11a4345aa47d740f76bdcef2 | [
"Apache-2.0"
] | null | null | null | models/keras_ssd512.py | connorlee77/ssd_keras | 0e1b9cff4300fe6e11a4345aa47d740f76bdcef2 | [
"Apache-2.0"
] | null | null | null | '''
A Keras port of the original Caffe SSD512 network.
Copyright (C) 2018 Pierluigi Ferrari
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
... | 78.156904 | 218 | 0.654809 |
7968670ebe105ead761822ba5b2c4b2616250526 | 46 | py | Python | GPLT_Python/L1-038.py | upupming/algorithm | 44edcffe886eaf4ce8c7b27a8db50d7ed5d29ef1 | [
"MIT"
] | 107 | 2019-10-25T07:46:59.000Z | 2022-03-29T11:10:56.000Z | GPLT_Python/L1-038.py | upupming/algorithm | 44edcffe886eaf4ce8c7b27a8db50d7ed5d29ef1 | [
"MIT"
] | 1 | 2021-08-13T05:42:27.000Z | 2021-08-13T05:42:27.000Z | GPLT_Python/L1-038.py | upupming/algorithm | 44edcffe886eaf4ce8c7b27a8db50d7ed5d29ef1 | [
"MIT"
] | 18 | 2020-12-09T14:24:22.000Z | 2022-03-30T06:56:01.000Z | print('Hello World')
print('Hello New World')
| 15.333333 | 24 | 0.717391 |
79686809f7a754ff8199d834a3007612f56e19ff | 4,232 | py | Python | torch2trt_dynamic/converters/activation.py | jinfagang/pilgrim_torch2trt | 27a8e6a195cbc3a83b16483ec4c0930da4aa77e6 | [
"MIT"
] | 20 | 2020-10-10T06:14:50.000Z | 2021-09-22T08:50:16.000Z | torch2trt_dynamic/converters/activation.py | jinfagang/pilgrim_torch2trt | 27a8e6a195cbc3a83b16483ec4c0930da4aa77e6 | [
"MIT"
] | 2 | 2020-11-02T11:45:24.000Z | 2021-02-17T15:20:04.000Z | torch2trt_dynamic/converters/activation.py | jinfagang/pilgrim_torch2trt | 27a8e6a195cbc3a83b16483ec4c0930da4aa77e6 | [
"MIT"
] | 4 | 2020-10-10T05:14:18.000Z | 2020-10-27T01:47:30.000Z | from torch2trt_dynamic.torch2trt_dynamic import *
from torch2trt_dynamic.module_test import add_module_test
from .unary import UnaryModule
# | RELU : Rectified Linear activation (impl in relu.py)
# | SIGMOID : Sigmoid activation (impl in sigmoid.py)
# | TANH : Hyperbolic Tangent activation (impl in tanh.... | 34.975207 | 141 | 0.68431 |
7968682627a6db5d6f81e8cd951794e8d9cff557 | 437 | py | Python | warmup/repeatedString.py | silvioedu/HackerRank-InterviewPreparationKit | 728a5a7f898b8f40e1bf55604a00e25494010c28 | [
"MIT"
] | null | null | null | warmup/repeatedString.py | silvioedu/HackerRank-InterviewPreparationKit | 728a5a7f898b8f40e1bf55604a00e25494010c28 | [
"MIT"
] | null | null | null | warmup/repeatedString.py | silvioedu/HackerRank-InterviewPreparationKit | 728a5a7f898b8f40e1bf55604a00e25494010c28 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the repeatedString function below.
def repeatedString(s, n):
return s.count("a") * (n // len(s)) + s[:n % len(s)].count("a")
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
s = input()
n = int... | 16.185185 | 67 | 0.610984 |
796869d85ccdfe1eb05ec7b51bda8280a4d9dba4 | 133 | py | Python | src/app/database.py | samukasmk/api-feiras-livres | 58fb8861844e812b1edcdf51ee1a1bd42eae4e08 | [
"Apache-2.0"
] | 2 | 2017-12-16T00:20:30.000Z | 2018-09-25T00:46:38.000Z | src/app/database.py | samukasmk/api-feiras-livres | 58fb8861844e812b1edcdf51ee1a1bd42eae4e08 | [
"Apache-2.0"
] | null | null | null | src/app/database.py | samukasmk/api-feiras-livres | 58fb8861844e812b1edcdf51ee1a1bd42eae4e08 | [
"Apache-2.0"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy
# Define the database object which is imported by modules and controllers
db = SQLAlchemy()
| 26.6 | 73 | 0.819549 |
79686a75f33de36488a3611157573a767e88b01f | 515 | py | Python | day03.py | matejm/advent-of-code-2016 | d3c40b1ee100be698ee395db94bf09fdc330c809 | [
"MIT"
] | null | null | null | day03.py | matejm/advent-of-code-2016 | d3c40b1ee100be698ee395db94bf09fdc330c809 | [
"MIT"
] | null | null | null | day03.py | matejm/advent-of-code-2016 | d3c40b1ee100be698ee395db94bf09fdc330c809 | [
"MIT"
] | null | null | null | triangles = []
while True:
try: line = input()
except: break
if not line: break
line = [int(i) for i in line.split()]
triangles.append(line)
possible = 0
for a, b, c in triangles:
if a + b > c and a + c > b and b + c > a:
possible += 1
print('#1', possible)
possible = 0
for i in range(... | 24.52381 | 73 | 0.543689 |
79686b0d19ee093a1aa095624ceee34ad28eda51 | 893 | py | Python | VOCgrowth/EarlyOmicronEstimates_UK/bestfit+resid.py | alex1770/Covid-19 | 0212593bf5d9bcbb7009c7d1fb1710116ad8bf32 | [
"MIT"
] | 5 | 2021-06-26T09:22:45.000Z | 2021-12-20T21:29:22.000Z | VOCgrowth/EarlyOmicronEstimates_UK/bestfit+resid.py | alex1770/Covid-19 | 0212593bf5d9bcbb7009c7d1fb1710116ad8bf32 | [
"MIT"
] | 1 | 2021-12-21T09:45:17.000Z | 2021-12-21T09:45:17.000Z | VOCgrowth/EarlyOmicronEstimates_UK/bestfit+resid.py | alex1770/Covid-19 | 0212593bf5d9bcbb7009c7d1fb1710116ad8bf32 | [
"MIT"
] | 2 | 2021-06-25T18:27:56.000Z | 2021-12-12T17:49:31.000Z | # py bestfit2+resid.py < file
# Format: Date, #Oldvariant, #Newvariant
# log(#New/#Old) ~= a + b*day
# Square errors are weighted by 1/(1/#Old+1/#New).
from stuff import *
import numpy as np
import sys
from math import sqrt
A=[];D=[];dt=[]
for x in sys.stdin:
y=x.split()
a,d=float(y[1]),float(y[2])
if a>0 or d>... | 23.5 | 79 | 0.605823 |
79686bca5c19af0a2e521f8a3d403f5d245ba1e6 | 1,244 | py | Python | tests/functional/step_defs/test_call_requests.py | barbosa/scanapi | 82def9d7c9ef19a2b658d9aa6c973790e2c16ddc | [
"MIT"
] | null | null | null | tests/functional/step_defs/test_call_requests.py | barbosa/scanapi | 82def9d7c9ef19a2b658d9aa6c973790e2c16ddc | [
"MIT"
] | null | null | null | tests/functional/step_defs/test_call_requests.py | barbosa/scanapi | 82def9d7c9ef19a2b658d9aa6c973790e2c16ddc | [
"MIT"
] | null | null | null | import pytest
from pytest_bdd import scenario, given, when, then
from scanapi.requests_builder import RequestsBuilder
@pytest.fixture(autouse=True)
def mock_request(mocker):
return mocker.patch("scanapi.requests_builder.requests.request")
@pytest.fixture
def api_spec():
return {"api": {"base_url": "", "req... | 24.392157 | 78 | 0.691318 |
79686c0f9a9b53de418130ffc4629b2f43453282 | 253 | py | Python | groups/serializers.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | 3 | 2020-05-05T12:12:09.000Z | 2020-05-08T08:48:16.000Z | groups/serializers.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | 160 | 2020-05-19T13:03:43.000Z | 2022-03-12T00:35:28.000Z | groups/serializers.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | null | null | null | from django.contrib.auth.models import Group
from rest_framework import serializers
class GroupSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = Group
fields = ('id', 'url', 'name')
| 23 | 51 | 0.70751 |
79686c27aa7a8cffbb3eef144cc78762d481735d | 1,764 | py | Python | photo-exif-date-print.py | karaage0703/denpa-gardening | ed0288b600203e787b5d50f81100a4a738ec2014 | [
"MIT"
] | 11 | 2016-05-06T19:59:55.000Z | 2021-12-29T13:09:44.000Z | photo-exif-date-print.py | karaage0703/denpa-gardening | ed0288b600203e787b5d50f81100a4a738ec2014 | [
"MIT"
] | null | null | null | photo-exif-date-print.py | karaage0703/denpa-gardening | ed0288b600203e787b5d50f81100a4a738ec2014 | [
"MIT"
] | 4 | 2017-11-01T15:52:35.000Z | 2019-12-27T14:58:40.000Z | # -*- coding: utf-8 -*-
import cv2
import sys
import numpy as np
from PIL import Image, ImageDraw, ImageFont
from PIL.ExifTags import TAGS, GPSTAGS
font_color = (255, 255, 255)
def get_exif(file,field):
img = Image.open(file)
exif = img._getexif()
exif_data = []
for id, value in exif.items():
... | 25.941176 | 132 | 0.630952 |
79686c997dc2ce12c988ec60e295cf67e2b5e820 | 6,361 | py | Python | tests/penn_chime/test_models.py | covidcaremap/chime | 4ba3bed63315d8eefae8293f5a51641c12a1daf9 | [
"MIT"
] | null | null | null | tests/penn_chime/test_models.py | covidcaremap/chime | 4ba3bed63315d8eefae8293f5a51641c12a1daf9 | [
"MIT"
] | 1 | 2020-04-14T14:48:20.000Z | 2020-04-14T22:49:29.000Z | tests/penn_chime/test_models.py | covidcaremap/chime | 4ba3bed63315d8eefae8293f5a51641c12a1daf9 | [
"MIT"
] | null | null | null | from datetime import date
import pytest
import pandas as pd
import numpy as np
from datetime import timedelta
from penn_chime.models import (
sir,
sim_sir,
get_growth_rate,
SimSirModel,
)
from src.penn_chime.constants import EPSILON
def test_sir():
"""
Someone who is good at testing, help
... | 31.490099 | 109 | 0.633705 |
79686d5fad5798e6eee6534ece6e83ff0e808a24 | 772 | py | Python | 20.py | Michael-Naguib/ProjectEuler | 702ad04177b6dd2958b6c0b99682e7971612270c | [
"MIT"
] | null | null | null | 20.py | Michael-Naguib/ProjectEuler | 702ad04177b6dd2958b6c0b99682e7971612270c | [
"MIT"
] | 1 | 2019-05-07T04:53:43.000Z | 2019-05-08T19:32:30.000Z | 20.py | Michael-N/ProjectEuler | 702ad04177b6dd2958b6c0b99682e7971612270c | [
"MIT"
] | null | null | null | '''
Author: Michael Sherif Naguib
Date: May 7, 2019
@: University of Tulsa
Question #20:
n! means n × (n − 1) × ... × 3 × 2 × 1
For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
Find the sum of the digits in the numbe... | 20.864865 | 117 | 0.572539 |
79686e613d0f088efdfc00c2b8f309a45948205e | 7,304 | py | Python | src/appearance.py | Antoinehoff/Project_II | 120209e695f4f25ecdc6797f683e2b23894689f4 | [
"MIT"
] | 23 | 2018-02-23T17:47:35.000Z | 2022-02-15T09:03:08.000Z | src/appearance.py | Antoinehoff/Project_II | 120209e695f4f25ecdc6797f683e2b23894689f4 | [
"MIT"
] | 1 | 2021-11-05T02:00:03.000Z | 2021-11-05T02:00:03.000Z | src/appearance.py | Antoinehoff/Project_II | 120209e695f4f25ecdc6797f683e2b23894689f4 | [
"MIT"
] | 5 | 2018-10-13T08:07:47.000Z | 2021-02-17T14:36:12.000Z | import os
import numpy
import pyopencl as cl
class AppearanceCL(object):
def __init__(self, lambda_occ, esim, appearance_norm_weight):
os.environ["PYOPENCL_COMPILER_OUTPUT"] = "1"
self.cl_context = cl.create_some_context(False)
self.queue = cl.CommandQueue(self.cl_context)
program... | 47.428571 | 105 | 0.630887 |
79686fc598bd3481c2d0bd6bb52d323a5e04a9cb | 2,125 | py | Python | hint/01-theo-BTC/02_DQN-5-cations/01_map-wise/Miner-Testing-CodeSample-Approach1/build/TestingAgent.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | hint/01-theo-BTC/02_DQN-5-cations/01_map-wise/Miner-Testing-CodeSample-Approach1/build/TestingAgent.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | 1 | 2022-02-10T02:27:10.000Z | 2022-02-10T02:27:10.000Z | hint/01/Miner-Testing-CodeSample-Approach1/build/TestingAgent.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | from warnings import simplefilter
simplefilter(action='ignore', category=FutureWarning)
import sys
from keras.models import model_from_json
from MinerEnv import MinerEnv
import numpy as np
ACTION_GO_LEFT = 0
ACTION_GO_RIGHT = 1
ACTION_GO_UP = 2
ACTION_GO_DOWN = 3
ACTION_FREE = 4
ACTION_CRAFT = 5
HOST... | 34.836066 | 119 | 0.646588 |
79686fdb876339554b3683b21e5126ca62c5cfce | 838 | py | Python | tests/test_ffn.py | eladrinwizard1/hpff_analysis | 4475c655ba07f1406262b339e6020fa7680e58ad | [
"MIT"
] | null | null | null | tests/test_ffn.py | eladrinwizard1/hpff_analysis | 4475c655ba07f1406262b339e6020fa7680e58ad | [
"MIT"
] | null | null | null | tests/test_ffn.py | eladrinwizard1/hpff_analysis | 4475c655ba07f1406262b339e6020fa7680e58ad | [
"MIT"
] | null | null | null | # Add root of project to path
import sys
sys.path.append("..")
from fanfiction_apis import ffn
PATH = "C:/Users/vijay/Documents/hp_data"
def test_init():
api = ffn.FFN("book", "Harry Potter", PATH)
def test_search():
api = ffn.FFN("book", "Harry-Potter", PATH)
query = ffn.FFNQuery(sort=4)
stories ... | 22.052632 | 47 | 0.667064 |
79687011a7ede7e4f4f93cfef4fcd8cb1f6c8eaf | 257 | py | Python | pypro/task3.py | ganesh-95/python-programs | df4ee1ec1d13ea0cd1ad511827cb0a2e59f55908 | [
"MIT"
] | 1 | 2016-07-20T04:40:48.000Z | 2016-07-20T04:40:48.000Z | pypro/task3.py | ganesh-95/python-programs | df4ee1ec1d13ea0cd1ad511827cb0a2e59f55908 | [
"MIT"
] | null | null | null | pypro/task3.py | ganesh-95/python-programs | df4ee1ec1d13ea0cd1ad511827cb0a2e59f55908 | [
"MIT"
] | null | null | null | '''
Take a list of words(ex: ['python', 'php', 'c', 'java', 'perl']) print words which are starts with p. Note: Try to use for loop.
'''
x = ['python', 'php', 'c', 'java', 'perl']
l= []
for i in x:
if i.startswith('p'):
l.append(i)
print l
| 19.769231 | 129 | 0.540856 |
7968708760143e83338c757de2a507e06c677259 | 3,692 | py | Python | horizon/test/unit/test_exceptions.py | lianggengdino/kolla-build | d6c550eb1150bc8f2ef5bb5557867116e1a59a88 | [
"Apache-2.0"
] | 930 | 2015-01-04T08:06:03.000Z | 2022-03-13T18:47:13.000Z | horizon/test/unit/test_exceptions.py | lianggengdino/kolla-build | d6c550eb1150bc8f2ef5bb5557867116e1a59a88 | [
"Apache-2.0"
] | 26 | 2015-02-23T16:37:31.000Z | 2020-07-02T08:37:41.000Z | horizon/test/unit/test_exceptions.py | lianggengdino/kolla-build | d6c550eb1150bc8f2ef5bb5557867116e1a59a88 | [
"Apache-2.0"
] | 1,040 | 2015-01-01T18:48:28.000Z | 2022-03-19T08:35:18.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 39.276596 | 78 | 0.63597 |
79687122973af2d694b1bfdaadb357325426a679 | 2,588 | py | Python | openml_data_integration/protobuf_generator/openml_1480/server.py | tuix/tutorials | 733d35a8a39df079e8c2432c441b70785ab08440 | [
"Apache-2.0"
] | 8 | 2020-04-21T13:29:04.000Z | 2021-12-13T08:59:09.000Z | openml_data_integration/protobuf_generator/openml_1480/server.py | tuix/tutorials | 733d35a8a39df079e8c2432c441b70785ab08440 | [
"Apache-2.0"
] | 3 | 2021-04-27T11:03:04.000Z | 2021-05-24T18:22:57.000Z | openml_data_integration/protobuf_generator/openml_1480/server.py | tuix/tutorials | 733d35a8a39df079e8c2432c441b70785ab08440 | [
"Apache-2.0"
] | 6 | 2020-07-06T08:23:25.000Z | 2021-11-24T10:39:34.000Z | # date: 2021.07.14
# author: Raul Saavedra raul.saavedra.felipe@iais.fraunhofer.de
import grpc
from concurrent import futures
import time
import numpy
# import constant with the hardcoded openml data ID number
import myconstants
# import the generated grpc related classes for python
import model_pb2
import model_pb2... | 36.450704 | 81 | 0.562597 |
79687163cace24c4a86fea3d9514abc8238fc903 | 28,914 | py | Python | Cython/Compiler/Buffer.py | matham/cython | 4aec02117deb1d9279a81920f21459fc015d1a77 | [
"Apache-2.0"
] | 1 | 2020-09-30T05:39:18.000Z | 2020-09-30T05:39:18.000Z | Cython/Compiler/Buffer.py | holzschu/cython | 8f6c7f707b28cb8e76ecbf5fcd089c6255dacdb8 | [
"Apache-2.0"
] | null | null | null | Cython/Compiler/Buffer.py | holzschu/cython | 8f6c7f707b28cb8e76ecbf5fcd089c6255dacdb8 | [
"Apache-2.0"
] | 1 | 2021-12-30T02:32:57.000Z | 2021-12-30T02:32:57.000Z | from __future__ import absolute_import
from .Visitor import CythonTransform
from .ModuleNode import ModuleNode
from .Errors import CompileError
from .UtilityCode import CythonUtilityCode
from .Code import UtilityCode, TempitaUtilityCode
from . import Options
from . import Interpreter
from . import PyrexTypes
from . i... | 39.072973 | 114 | 0.629522 |
796872b40aa2e858dee612b34274dfdffd16aead | 1,087 | py | Python | tests/test_htmlelement_functions.py | Bystroushaak/pyDHTMLParser | 8444bd9f78f94b0d94ece8115a5f1c23fd71e641 | [
"MIT"
] | 4 | 2017-05-18T00:21:22.000Z | 2022-02-28T02:34:34.000Z | tests/test_htmlelement_functions.py | Bystroushaak/pyDHTMLParser | 8444bd9f78f94b0d94ece8115a5f1c23fd71e641 | [
"MIT"
] | 16 | 2015-02-14T06:27:23.000Z | 2020-06-10T05:54:59.000Z | tests/test_htmlelement_functions.py | Bystroushaak/pyDHTMLParser | 8444bd9f78f94b0d94ece8115a5f1c23fd71e641 | [
"MIT"
] | 2 | 2016-01-25T14:35:05.000Z | 2020-04-12T21:02:30.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
import dhtmlparser
from dhtmlparser import first
from dhtmlparser.htmlelement import _rotate_buff
from dhtmlparser.htmlelement import _closeElements
# Fu... | 23.12766 | 79 | 0.564857 |
796872db48af8e8552a3a2d65370a73fb23d2505 | 1,094 | py | Python | pycorrector/seq2seq/tf/config.py | joey12300/pycorrector | 164163e522d1796eb63dd4189db1b8e53f4bf281 | [
"Apache-2.0"
] | 3,153 | 2018-04-11T10:36:24.000Z | 2022-03-31T10:06:31.000Z | pycorrector/seq2seq/tf/config.py | lingxufeng/pycorrector | 61bc8c1253bfe0784a825d9042c9be7f057a9bff | [
"Apache-2.0"
] | 251 | 2018-04-12T08:44:07.000Z | 2022-03-30T08:50:32.000Z | pycorrector/seq2seq/tf/config.py | lingxufeng/pycorrector | 61bc8c1253bfe0784a825d9042c9be7f057a9bff | [
"Apache-2.0"
] | 784 | 2018-04-19T06:48:39.000Z | 2022-03-31T07:10:18.000Z | # -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
""" Use CGED corpus
import os
pwd_path = os.path.abspath(os.path.dirname(__file__))
# Training data path.
# toy chinese corpus
raw_train_paths = [
os.path.join(pwd_path, '../../data/cn/CGED/CGED18_HSK_TrainingSet.xml'),
os.path.join(pw... | 28.051282 | 78 | 0.721207 |
796874ae5006ce5c7deeaae6fdf647719e3158a3 | 795 | py | Python | masters/master.client.dart/master_site_config.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | masters/master.client.dart/master_site_config.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | masters/master.client.dart/master_site_config.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T09:16:32.000Z | 2020-07-22T09:16:32.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class Dart(Master.Master3):
base_app_url = 'https://dart-status.appspot.com'
tree_st... | 34.565217 | 72 | 0.750943 |
796875a1b732506fb99c8d36150a4e5ef41a3d1d | 14,556 | py | Python | automata.py | booherbg/PyAutomata | 432555806dd68ff6a8c05b525fa25ab8ac0a80fe | [
"Apache-2.0"
] | 1 | 2018-09-19T07:27:31.000Z | 2018-09-19T07:27:31.000Z | automata.py | booherbg/PyAutomata | 432555806dd68ff6a8c05b525fa25ab8ac0a80fe | [
"Apache-2.0"
] | null | null | null | automata.py | booherbg/PyAutomata | 432555806dd68ff6a8c05b525fa25ab8ac0a80fe | [
"Apache-2.0"
] | null | null | null | '''
A ballsy pure python implementation for experimenting with pypy
'''
from __future__ import division
import math
import random
# constants, defined in Automata.h
BITS_PER_SEED_VALUE = 2
kNumberOfRules = 8;
kAutomataGenerationLength = 64;#160 //divisible by 8 please (for byte chunking)
... | 34.088993 | 130 | 0.5687 |
796875a61aa5c8495118acf04afab41a566d18cf | 308 | py | Python | diskord/application/__init__.py | Hype3808/diskord | 46162537152866d28eb85cd4bc3b69d5213adf5a | [
"MIT"
] | 30 | 2021-09-16T10:14:06.000Z | 2022-02-28T07:25:48.000Z | diskord/application/__init__.py | Hype3808/diskord | 46162537152866d28eb85cd4bc3b69d5213adf5a | [
"MIT"
] | 25 | 2021-10-01T10:45:34.000Z | 2022-02-11T01:21:26.000Z | diskord/application/__init__.py | Hype3808/diskord | 46162537152866d28eb85cd4bc3b69d5213adf5a | [
"MIT"
] | 14 | 2021-10-02T17:16:53.000Z | 2022-02-19T17:28:46.000Z | """
diskord.application
~~~~~~~~~~~~~~~~~~~
Helper for building application commands.
:copyright: (c) 2021-present nerdguyahmad
:license: MIT, see LICENSE for more details.
"""
from .command import *
from .context_menus import *
from .slash import *
from .permissions import *
from . import mixins, types | 19.25 | 44 | 0.707792 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.