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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795961ba2b06f18424853086302e6fd2fe707e52 | 4,036 | py | Python | strappy/pipelines/base_pipeline.py | Strabes/strappy | f897e2635b8eb308341b87451a7e9839cddedc7e | [
"BSD-3-Clause"
] | null | null | null | strappy/pipelines/base_pipeline.py | Strabes/strappy | f897e2635b8eb308341b87451a7e9839cddedc7e | [
"BSD-3-Clause"
] | 13 | 2021-05-23T12:11:55.000Z | 2021-06-27T12:05:00.000Z | strappy/pipelines/base_pipeline.py | Strabes/strappy | f897e2635b8eb308341b87451a7e9839cddedc7e | [
"BSD-3-Clause"
] | null | null | null | """
Base pipeline constructs a pipeline of
generic transformations for easy EDA
"""
from typing import Union
import numpy as np
import pandas as pd
from feature_engine.imputation import (
ArbitraryNumberImputer,
AddMissingIndicator,
CategoricalImputer
)
from feature_engine.encoding import (
RareLabel... | 27.834483 | 95 | 0.611992 |
795961e68f66115246143a55cbfbabbd6a76a079 | 50 | py | Python | booking/__init__.py | pincoin/withthai-old | 10e6248f14faba4c4ce3e387e93e28dabb76a2f7 | [
"MIT"
] | null | null | null | booking/__init__.py | pincoin/withthai-old | 10e6248f14faba4c4ce3e387e93e28dabb76a2f7 | [
"MIT"
] | 3 | 2021-03-30T12:56:11.000Z | 2021-09-22T18:47:42.000Z | booking/__init__.py | pincoin/withthai-old | 10e6248f14faba4c4ce3e387e93e28dabb76a2f7 | [
"MIT"
] | null | null | null | default_app_config = 'booking.apps.BookingConfig'
| 25 | 49 | 0.84 |
795961fa722523696f727d570ef6701003b0193e | 16,515 | py | Python | catkit/hardware/sbig/SbigCamera.py | aidancgray/catkit | c789f20a327faf91f5b34b6818670732eab24040 | [
"BSD-3-Clause"
] | 1 | 2020-09-04T22:50:21.000Z | 2020-09-04T22:50:21.000Z | catkit/hardware/sbig/SbigCamera.py | aidancgray/catkit | c789f20a327faf91f5b34b6818670732eab24040 | [
"BSD-3-Clause"
] | 2 | 2020-09-08T20:50:39.000Z | 2020-09-14T17:52:27.000Z | catkit/hardware/sbig/SbigCamera.py | aidancgray/catkit | c789f20a327faf91f5b34b6818670732eab24040 | [
"BSD-3-Clause"
] | null | null | null | from catkit.catkit_types import MetaDataEntry
from catkit.interfaces.Camera import Camera
from catkit.config import CONFIG_INI
from catkit.catkit_types import units, quantity
import catkit.util
from astropy.io import fits
import numpy as np
import logging
import os
import requests
import sys
import catkit.util
# imp... | 49.151786 | 125 | 0.630518 |
79596227dd3f8b04f243ad83ac3fda5e8f7425f2 | 407 | py | Python | register_search/wsgi.py | sHalnes/register_search | cb9cd4f287c82e0319eb45dc474340f2567fa35b | [
"MIT"
] | null | null | null | register_search/wsgi.py | sHalnes/register_search | cb9cd4f287c82e0319eb45dc474340f2567fa35b | [
"MIT"
] | null | null | null | register_search/wsgi.py | sHalnes/register_search | cb9cd4f287c82e0319eb45dc474340f2567fa35b | [
"MIT"
] | null | null | null | """
WSGI config for register_search 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.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJAN... | 23.941176 | 78 | 0.793612 |
795962c0027739c3411dab6366b3e1c4af16695b | 5,457 | py | Python | tests/model_connectors/test_time_series_heating_indirect.py | mingzhe37/geojson-modelica-translator | 23c969fa5a1b776dfd6dd773b9dd8f6e3a0ce28b | [
"BSD-3-Clause-LBNL"
] | 11 | 2019-08-19T16:58:23.000Z | 2022-01-25T14:23:49.000Z | tests/model_connectors/test_time_series_heating_indirect.py | mingzhe37/geojson-modelica-translator | 23c969fa5a1b776dfd6dd773b9dd8f6e3a0ce28b | [
"BSD-3-Clause-LBNL"
] | 331 | 2019-07-24T16:15:52.000Z | 2022-03-10T04:58:15.000Z | tests/model_connectors/test_time_series_heating_indirect.py | mingzhe37/geojson-modelica-translator | 23c969fa5a1b776dfd6dd773b9dd8f6e3a0ce28b | [
"BSD-3-Clause-LBNL"
] | 10 | 2019-07-12T22:21:32.000Z | 2022-02-22T06:30:25.000Z | """
****************************************************************************************************
:copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
... | 45.857143 | 102 | 0.741983 |
79596548e60d7470c297dc2a06e2ffd498928bf0 | 173 | py | Python | grampower/__init__.py | kmrigendra/grampowerapp | 1cd44a7defad8007b38805759b9f3ffe995e3698 | [
"MIT"
] | null | null | null | grampower/__init__.py | kmrigendra/grampowerapp | 1cd44a7defad8007b38805759b9f3ffe995e3698 | [
"MIT"
] | null | null | null | grampower/__init__.py | kmrigendra/grampowerapp | 1cd44a7defad8007b38805759b9f3ffe995e3698 | [
"MIT"
] | null | null | null | import os
import json
from flask.app import Flask
app = Flask(__name__)
app.config.from_object('config')
app.url_map.strict_slashes = False
import grampower.controllers | 14.416667 | 34 | 0.797688 |
79596555742bbe706fe3a1a3b84f065855557644 | 636 | py | Python | src/products/migrations/0001_initial.py | bluemonkey9241/django-js-frontend | ae5379766b2327738e0c23ff044ae550fd44cc2d | [
"MIT"
] | 61 | 2018-04-05T04:49:28.000Z | 2021-08-24T11:54:33.000Z | src/products/migrations/0001_initial.py | bluemonkey9241/django-js-frontend | ae5379766b2327738e0c23ff044ae550fd44cc2d | [
"MIT"
] | null | null | null | src/products/migrations/0001_initial.py | bluemonkey9241/django-js-frontend | ae5379766b2327738e0c23ff044ae550fd44cc2d | [
"MIT"
] | 35 | 2018-05-11T10:39:25.000Z | 2022-03-02T21:03:08.000Z | # Generated by Django 2.0.4 on 2018-04-04 21:21
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(... | 26.5 | 114 | 0.577044 |
795965653549373842eca389c4308a83f934aef6 | 43,832 | py | Python | src/sagemaker/estimator.py | Shuhuasong/Sage-Maker | 32534662acf290d7f9748f2008e6ded4f4e32660 | [
"Apache-2.0"
] | null | null | null | src/sagemaker/estimator.py | Shuhuasong/Sage-Maker | 32534662acf290d7f9748f2008e6ded4f4e32660 | [
"Apache-2.0"
] | null | null | null | src/sagemaker/estimator.py | Shuhuasong/Sage-Maker | 32534662acf290d7f9748f2008e6ded4f4e32660 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2018 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://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 53.649939 | 120 | 0.676811 |
79596a626e24d95057acfc7502f1fdad80902f1c | 18,808 | py | Python | General/data_conversions.py | ElgaSalvadore/watools | daaaad474add572f32dd6a45a4230ccf636c479a | [
"Apache-2.0"
] | 1 | 2019-08-09T12:59:27.000Z | 2019-08-09T12:59:27.000Z | General/data_conversions.py | ElgaSalvadore/watools | daaaad474add572f32dd6a45a4230ccf636c479a | [
"Apache-2.0"
] | 2 | 2019-07-25T06:10:40.000Z | 2019-07-25T07:09:27.000Z | General/data_conversions.py | ElgaSalvadore/watools | daaaad474add572f32dd6a45a4230ccf636c479a | [
"Apache-2.0"
] | 2 | 2019-07-25T06:03:05.000Z | 2019-10-07T08:50:51.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Dec 18 13:07:32 2016
@author: tih
"""
from __future__ import division
from builtins import range
import gzip
import zipfile
import tarfile
from osgeo import gdal, osr
#import osr
import os
import pandas as pd
import numpy as np
import netCDF4
import time
def Convert_nc_to_ti... | 33.112676 | 129 | 0.634836 |
79596b1f424e10bd737db036505c096dfe391519 | 7,038 | py | Python | agents/maze_agents/toy_maze/skill_discovery/edl.py | victorcampos7/edl | ffdf23d4e102ca7d69a1408bafa267b0c7d8bfa0 | [
"MIT"
] | 30 | 2020-02-16T15:52:59.000Z | 2022-03-22T10:54:54.000Z | agents/maze_agents/toy_maze/skill_discovery/edl.py | imatge-upc/edl | ffdf23d4e102ca7d69a1408bafa267b0c7d8bfa0 | [
"MIT"
] | null | null | null | agents/maze_agents/toy_maze/skill_discovery/edl.py | imatge-upc/edl | ffdf23d4e102ca7d69a1408bafa267b0c7d8bfa0 | [
"MIT"
] | 7 | 2020-02-16T15:53:05.000Z | 2022-01-18T03:41:03.000Z | # Copyright (c) 2019, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: MIT
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
import os
import json
import torch
import torch.nn as nn
from .base import StochasticAgent
from agents.maze_agents.toy_m... | 39.1 | 119 | 0.657289 |
79596bc321386986ab075c95ccc9797d98eca52e | 1,787 | py | Python | timings/benchmark_truncated_ek1_vs_ref_ek1_brusselator.py | pnkraemer/tornadox | 86a1d22ab53220627c7c504c937b0185f825db6f | [
"MIT"
] | 9 | 2022-02-18T14:39:25.000Z | 2022-03-10T11:56:42.000Z | timings/benchmark_truncated_ek1_vs_ref_ek1_brusselator.py | pnkraemer/tornadox | 86a1d22ab53220627c7c504c937b0185f825db6f | [
"MIT"
] | 2 | 2022-03-01T06:55:45.000Z | 2022-03-10T06:25:12.000Z | timings/benchmark_truncated_ek1_vs_ref_ek1_brusselator.py | pnkraemer/tornadox | 86a1d22ab53220627c7c504c937b0185f825db6f | [
"MIT"
] | null | null | null | """Does truncation in the EK1 do something for high-ish dimensional problems?"""
import jax.numpy as jnp
import tornadox
def solve(ivp, solver):
"""Convenience access"""
for idx, state in enumerate(solver.solution_generator(ivp=ivp)):
pass
return state, idx
def error(m1, m2):
"""Check disc... | 29.783333 | 80 | 0.740907 |
79596bf588fe650f132f18ac32ccd7693e857ed6 | 35,911 | py | Python | core/storage/user/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | core/storage/user/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | core/storage/user/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 42.347877 | 80 | 0.673192 |
79596bfb0b1f28b882f9d92293d2eb6f7ec25062 | 258 | py | Python | website/urls.py | bartels/satchless | 4d333014333dc4fd5815f9e0bbea565959919a30 | [
"BSD-4-Clause"
] | 1 | 2015-11-05T05:09:27.000Z | 2015-11-05T05:09:27.000Z | website/urls.py | bartels/satchless | 4d333014333dc4fd5815f9e0bbea565959919a30 | [
"BSD-4-Clause"
] | null | null | null | website/urls.py | bartels/satchless | 4d333014333dc4fd5815f9e0bbea565959919a30 | [
"BSD-4-Clause"
] | null | null | null | from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}),
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'static/'}),
)
| 36.857143 | 93 | 0.658915 |
79596ccf0eeac21507b24c47c435958283cdf307 | 6,410 | py | Python | scrapthor/maping.py | walogo/web_scrap | 909660c096b3e0e931c2b6b37bfc971650123fa0 | [
"MIT"
] | null | null | null | scrapthor/maping.py | walogo/web_scrap | 909660c096b3e0e931c2b6b37bfc971650123fa0 | [
"MIT"
] | 1 | 2018-12-05T20:48:46.000Z | 2018-12-05T22:45:00.000Z | scrapthor/maping.py | walogo/web_scrap | 909660c096b3e0e931c2b6b37bfc971650123fa0 | [
"MIT"
] | null | null | null | from asyncio import sleep
from os import mkdir, getcwd
from os.path import join
from sys import platform
from .logger import logger
from .criptografia import fingerprint
from .descargar import _extraer_links, aio_descargar, filtro, _crear_archivo, Reglas
from csv import writer
# Crear loop paraa async
# Create loop fo... | 39.813665 | 123 | 0.634321 |
79596d3dac4396d21bccd1767367f08f3ba78b54 | 155 | py | Python | examples/bot.py | BaySchoolCS2/WPAW | 8ff05cda94ba7c8dc74b52c6624e266b22154cce | [
"MIT"
] | null | null | null | examples/bot.py | BaySchoolCS2/WPAW | 8ff05cda94ba7c8dc74b52c6624e266b22154cce | [
"MIT"
] | null | null | null | examples/bot.py | BaySchoolCS2/WPAW | 8ff05cda94ba7c8dc74b52c6624e266b22154cce | [
"MIT"
] | null | null | null | from pwrapper import Wrapper
b = Wrapper(user_agent="test_bot")
b.token = "vjdOXdRyF52j"
b.me()
print b.raw
print b.new_post("test", "testtest").text
| 12.916667 | 41 | 0.716129 |
79596de2d5b560dbbe7e108e56770b106b1e5985 | 1,073 | py | Python | src/mdp/frozen_lake_levels/frozen_lake_level_4x4_B.py | Gnosling/RLASP | e4da8c72e295fbebeebe3bc20857fb1cd4e5814a | [
"MIT"
] | null | null | null | src/mdp/frozen_lake_levels/frozen_lake_level_4x4_B.py | Gnosling/RLASP | e4da8c72e295fbebeebe3bc20857fb1cd4e5814a | [
"MIT"
] | null | null | null | src/mdp/frozen_lake_levels/frozen_lake_level_4x4_B.py | Gnosling/RLASP | e4da8c72e295fbebeebe3bc20857fb1cd4e5814a | [
"MIT"
] | null | null | null | from .frozen_lake_level import FrozenLakeLevel
"""
Fixed 4x4-level for a frozen-lake:
_____________
|S F F F |
|H F F F |
|H H F F |
|H H H G |
|___________|
Whereby:
S = START
F = FROZEN
H = HOLE
G = GOAL
(S and G must be frozen)
"""
class FrozenLak... | 29.805556 | 83 | 0.469711 |
79596df9ce000500c59aa24cb8ef2b9ee5b47b89 | 8,566 | py | Python | cinder/tests/unit/db/test_qos_specs.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-08-25T13:11:18.000Z | 2020-10-15T11:29:20.000Z | cinder/tests/unit/db/test_qos_specs.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 5 | 2018-01-25T11:31:56.000Z | 2019-05-06T23:13:35.000Z | cinder/tests/unit/db/test_qos_specs.py | aarunsai81/netapp | 8f0f7bf9be7f4d9fb9c3846bfc639c90a05f86ba | [
"Apache-2.0"
] | 11 | 2015-02-20T18:48:24.000Z | 2021-01-30T20:26:18.000Z | # Copyright (C) 2013 eBay Inc.
# Copyright (C) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lice... | 41.381643 | 78 | 0.618959 |
795971d1034dd4ec6594c57fa1598339f7cfa18a | 4,840 | py | Python | pygmm/atkinson_boore_2006.py | arkottke/pygmm | e3b37ea3f81ffb847e040292c6731e36627ac9aa | [
"MIT"
] | 15 | 2016-03-29T05:01:09.000Z | 2022-02-09T08:26:07.000Z | pygmm/atkinson_boore_2006.py | arkottke/pygmm | e3b37ea3f81ffb847e040292c6731e36627ac9aa | [
"MIT"
] | 3 | 2016-03-29T05:12:28.000Z | 2017-08-18T21:49:34.000Z | pygmm/atkinson_boore_2006.py | arkottke/pygmm | e3b37ea3f81ffb847e040292c6731e36627ac9aa | [
"MIT"
] | 13 | 2016-03-29T05:18:39.000Z | 2022-01-26T03:37:08.000Z | # -*- coding: utf-8 -*-
"""Atkinson and Boore (2006, :cite:`atkinson06`) model."""
import numpy as np
from . import model
__author__ = "Albert Kottke"
class AtkinsonBoore2006(model.GroundMotionModel):
"""Atkinson and Boore (2006, :cite:`atkinson06`) model.
Developed for the Eastern North America with a ref... | 28.639053 | 87 | 0.559711 |
795972205e261e2484f1a20c5f9feefd5669d7da | 415 | py | Python | easy/pascal triangle/solution.py | ilya-sokolov/leetcode | ad421111d0d7c5ec5245f33552e94a373b6fd426 | [
"MIT"
] | 4 | 2021-06-03T22:19:13.000Z | 2021-10-05T18:14:12.000Z | easy/pascal triangle/solution.py | ilya-sokolov/leetcode | ad421111d0d7c5ec5245f33552e94a373b6fd426 | [
"MIT"
] | null | null | null | easy/pascal triangle/solution.py | ilya-sokolov/leetcode | ad421111d0d7c5ec5245f33552e94a373b6fd426 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def generate(self, numRows: int) -> List[List[int]]:
row = [1]
triangle = []
for i in range(numRows):
triangle.append(row)
row = [sum(x) for x in zip([0] + row, row + [0])]
return triangle
s = Solution()
print(s.gene... | 20.75 | 61 | 0.578313 |
795972c0553573adf71c1976091de08abede2afe | 1,703 | py | Python | server_main.py | TAViT2022/TAViT | 6ea42150c57af0e0618675565440df85121cf50a | [
"Apache-2.0"
] | null | null | null | server_main.py | TAViT2022/TAViT | 6ea42150c57af0e0618675565440df85121cf50a | [
"Apache-2.0"
] | null | null | null | server_main.py | TAViT2022/TAViT | 6ea42150c57af0e0618675565440df85121cf50a | [
"Apache-2.0"
] | null | null | null | import argparse
import torch
from omegaconf import OmegaConf
import src.server.app as app
from src.server.client_manager import TAViTClientManager
from src.server.tavit_server import TAViTServer
from src.server.strategy import CustomStrategy, FedAvg, Strategy
from src.server.torch_model.transformer.transformer import ... | 41.536585 | 118 | 0.652378 |
795972d482012f59b88577ff3d5c0c95f50e14b7 | 6,586 | py | Python | test/sampleData/micropython/BMP180.py | chloeyutianyi/cyanobyte | e6462b892d22d1cb51ab460ad98b509ba905f39a | [
"Apache-2.0"
] | null | null | null | test/sampleData/micropython/BMP180.py | chloeyutianyi/cyanobyte | e6462b892d22d1cb51ab460ad98b509ba905f39a | [
"Apache-2.0"
] | null | null | null | test/sampleData/micropython/BMP180.py | chloeyutianyi/cyanobyte | e6462b892d22d1cb51ab460ad98b509ba905f39a | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 Google 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 writing, ... | 24.392593 | 74 | 0.538263 |
795972dfed129112894f663be442bffa99afff99 | 16,683 | py | Python | salt/utils/win_runas.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | salt/utils/win_runas.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/utils/win_runas.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
Implements the ability to run processes as another user in Windows for salt
'''
from __future__ import absolute_import
# Import Python Libraries
import os
import logging
# Import Third Party Libs
try:
import win32con
import win32api
import win32process
import win32security
... | 36.50547 | 95 | 0.598394 |
7959735b4e492ac6a9a6051f71b39c3d67384cb7 | 3,561 | py | Python | dpctl/tensor/_device.py | reazulhoque/dpctl | 27634efff7bcaf2096d3e236d9739e1a25e0d99e | [
"Apache-2.0"
] | null | null | null | dpctl/tensor/_device.py | reazulhoque/dpctl | 27634efff7bcaf2096d3e236d9739e1a25e0d99e | [
"Apache-2.0"
] | 6 | 2021-07-08T08:08:25.000Z | 2021-09-10T13:55:55.000Z | dpctl/tensor/_device.py | 1e-to/dpctl | 29c2cbc34a82f7007f8e170d9b2548ab3e2b48d4 | [
"Apache-2.0"
] | null | null | null | # Data Parallel Control (dpctl)
#
# Copyright 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICE... | 32.972222 | 80 | 0.590284 |
795973b7ca99aafd206d9a8f79b933b27e6313d2 | 9,587 | py | Python | jishaku/features/python.py | Murilobeluco/DisnakeWavelinkBot | 51fb2931883f9f9c262de6028c339d10bbc761d7 | [
"MIT"
] | null | null | null | jishaku/features/python.py | Murilobeluco/DisnakeWavelinkBot | 51fb2931883f9f9c262de6028c339d10bbc761d7 | [
"MIT"
] | null | null | null | jishaku/features/python.py | Murilobeluco/DisnakeWavelinkBot | 51fb2931883f9f9c262de6028c339d10bbc761d7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jishaku.features.python
~~~~~~~~~~~~~~~~~~~~~~~~
The jishaku Python evaluation/execution commands.
:copyright: (c) 2021 Devon (Gorialis) R
:license: MIT, see LICENSE for more details.
"""
import io
import disnake
import mystbin
from disnake.ext import commands
from jishaku.codeblocks ... | 34.861818 | 102 | 0.543027 |
795973c13c39aee874cbc35fae7d3e51ed6a689c | 2,333 | py | Python | backend/core/models/configurations.py | google/co-op-4-all | 6bf68ea902da552e01c3647787f7212c541050e6 | [
"Apache-2.0"
] | 3 | 2022-01-28T18:30:56.000Z | 2022-03-30T17:39:05.000Z | backend/core/models/configurations.py | google/co-op-4-all | 6bf68ea902da552e01c3647787f7212c541050e6 | [
"Apache-2.0"
] | null | null | null | backend/core/models/configurations.py | google/co-op-4-all | 6bf68ea902da552e01c3647787f7212c541050e6 | [
"Apache-2.0"
] | 1 | 2022-02-21T12:49:01.000Z | 2022-02-21T12:49:01.000Z | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.892308 | 93 | 0.704243 |
795974d0f50b851a49e32f4973d82086fb2a4476 | 2,848 | py | Python | es_rnn/data_loading.py | petercwill/temp | 5988f169744b50e138c9e764c93e6606f9906dd7 | [
"MIT"
] | null | null | null | es_rnn/data_loading.py | petercwill/temp | 5988f169744b50e138c9e764c93e6606f9906dd7 | [
"MIT"
] | null | null | null | es_rnn/data_loading.py | petercwill/temp | 5988f169744b50e138c9e764c93e6606f9906dd7 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch.utils.data import Dataset
import pandas as pd
def read_file(file_location):
series = []
ids = []
with open(file_location, 'r') as file:
data = file.read().split("\n")
for i in range(1, len(data) - 1):
# for i in range(1, len(data)):
row =... | 34.731707 | 119 | 0.651334 |
795975da64fb4115ce1069ec2a42cf5c8ed05ee6 | 5,512 | py | Python | models/official/detection/executor/tpu_executor.py | DanielDimanov/tpu | 883065e163e4f7745a60aa726b426cdca35d38aa | [
"Apache-2.0"
] | 1 | 2019-08-09T10:23:53.000Z | 2019-08-09T10:23:53.000Z | models/official/detection/executor/tpu_executor.py | DanielDimanov/tpu | 883065e163e4f7745a60aa726b426cdca35d38aa | [
"Apache-2.0"
] | null | null | null | models/official/detection/executor/tpu_executor.py | DanielDimanov/tpu | 883065e163e4f7745a60aa726b426cdca35d38aa | [
"Apache-2.0"
] | 1 | 2019-08-09T10:26:24.000Z | 2019-08-09T10:26:24.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.496599 | 115 | 0.693578 |
795976fe67067806b05e4f4eb0cc2668e0be0e47 | 5,477 | py | Python | trade/utils/timeseriessplit.py | khoppa/cryptotrade | ee932b1cda5578ddcad60caf930f46cf86b132b6 | [
"Apache-2.0"
] | 3 | 2018-01-04T00:46:12.000Z | 2022-01-01T21:41:16.000Z | trade/utils/timeseriessplit.py | khoppa/cryptotrade | ee932b1cda5578ddcad60caf930f46cf86b132b6 | [
"Apache-2.0"
] | null | null | null | trade/utils/timeseriessplit.py | khoppa/cryptotrade | ee932b1cda5578ddcad60caf930f46cf86b132b6 | [
"Apache-2.0"
] | 1 | 2022-01-01T21:39:15.000Z | 2022-01-01T21:39:15.000Z | from sklearn.model_selection import TimeSeriesSplit
from sklearn.utils import indexable
from sklearn.utils.validation import _num_samples
import numpy as np
class TimeSeriesSplitCustom(TimeSeriesSplit):
"""Time Series cross-validator
Provides train/test indices to split time series data samples
that are o... | 44.893443 | 78 | 0.596494 |
7959794640b2628017f1cafd29a4d60766e1a50a | 30,711 | py | Python | nltk/corpus/reader/util.py | SamuraiT/nltk3-alpha | 18a1a0ff8697eaeeb5d3c0bc6dad251d5b8fe931 | [
"Apache-2.0"
] | 1 | 2018-08-09T14:30:50.000Z | 2018-08-09T14:30:50.000Z | nltk/corpus/reader/util.py | wangz10/nltk | 171b2cd0061955de0794db4fae5381e47bf450ae | [
"Apache-2.0"
] | null | null | null | nltk/corpus/reader/util.py | wangz10/nltk | 171b2cd0061955de0794db4fae5381e47bf450ae | [
"Apache-2.0"
] | 2 | 2019-10-28T01:33:22.000Z | 2019-10-30T06:43:43.000Z | # Natural Language Toolkit: Corpus Reader Utilities
#
# Copyright (C) 2001-2014 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
# Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
import os
import bisect
import re
import tempfile
from functools imp... | 38.484962 | 84 | 0.595389 |
795979cba2727d2b4c558b401e2b1666a62e079e | 5,982 | py | Python | contrib/zmq/zmq_sub.py | mytitanium/Titanium-Core-1.0 | 470e6a0a23de1ea867d693e362d1a0f6ccc12aa7 | [
"MIT"
] | 2 | 2020-12-01T17:15:50.000Z | 2020-12-11T13:29:54.000Z | contrib/zmq/zmq_sub.py | mytitanium/Titanium-Core-1.0 | 470e6a0a23de1ea867d693e362d1a0f6ccc12aa7 | [
"MIT"
] | 1 | 2020-07-27T10:54:07.000Z | 2020-08-28T05:37:26.000Z | contrib/zmq/zmq_sub.py | mytitanium/Titanium-Core-1.0 | 470e6a0a23de1ea867d693e362d1a0f6ccc12aa7 | [
"MIT"
] | 2 | 2020-11-09T16:38:04.000Z | 2021-04-02T05:27:36.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Ttm should be started with the command line arguments:
... | 44.311111 | 107 | 0.634069 |
795979de9e341510530270bc3a53ef3fc4532879 | 5,146 | py | Python | tagging.py | doggo404/sowsbetter | 3d23317f755821d4215caa0398449ec94230d711 | [
"MIT"
] | 14 | 2021-02-15T21:38:24.000Z | 2022-02-03T00:13:32.000Z | tagging.py | doggo404/sowsbetter | 3d23317f755821d4215caa0398449ec94230d711 | [
"MIT"
] | null | null | null | tagging.py | doggo404/sowsbetter | 3d23317f755821d4215caa0398449ec94230d711 | [
"MIT"
] | 1 | 2022-01-17T00:32:37.000Z | 2022-01-17T00:32:37.000Z | """Simple tagging for sowsbetter.
"""
import os.path
import re
import mutagen
import mutagen.flac
import mutagen.mp3
from mutagen.easyid3 import EasyID3
numeric_tags = set([
'tracknumber',
'discnumber',
'tracktotal',
'totaltracks',
'disctotal',
'totaldiscs',
])
... | 33.415584 | 108 | 0.629615 |
79597abb266962ec0e2f6dcfc150341cb8434a46 | 21,187 | py | Python | sdk/python/pulumi_aws/elasticloadbalancing/load_balancer.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elasticloadbalancing/load_balancer.py | sibuthomasmathew/pulumi-aws | 6351f2182eb6f693d4e09e4136c385adfa0ab674 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/elasticloadbalancing/load_balancer.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... | 47.611236 | 163 | 0.64667 |
79597abc608bdb7689f1c48a1763ff8d7a4d1c66 | 251 | py | Python | problem/10000~19999/15828/15828.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-19T16:37:44.000Z | 2019-04-19T16:37:44.000Z | problem/10000~19999/15828/15828.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 1 | 2019-04-20T11:42:44.000Z | 2019-04-20T11:42:44.000Z | problem/10000~19999/15828/15828.py3.py | njw1204/BOJ-AC | 1de41685725ae4657a7ff94e413febd97a888567 | [
"MIT"
] | 3 | 2019-04-19T16:37:47.000Z | 2021-10-25T00:45:00.000Z | import sys
from collections import *
input=sys.stdin.readline
n=int(input())
q=deque()
while 1:
x=int(input())
if x==-1: break
if x==0: q.popleft()
if x and len(q)<n: q.append(x)
if not q:
print('empty')
else:
while q: print(q.popleft(),end=' ') | 17.928571 | 36 | 0.649402 |
79597b1199eaa280e720345d72580bb9d6d610a7 | 1,135 | py | Python | Kimberley ter Heerdt/Poster/Visual-1:2/visualisatie1-birthjan1.py | ArtezGDA/MappingTheCity-Maps | a29377af7878907d30b4199d0859f007ba08b5e6 | [
"MIT"
] | null | null | null | Kimberley ter Heerdt/Poster/Visual-1:2/visualisatie1-birthjan1.py | ArtezGDA/MappingTheCity-Maps | a29377af7878907d30b4199d0859f007ba08b5e6 | [
"MIT"
] | null | null | null | Kimberley ter Heerdt/Poster/Visual-1:2/visualisatie1-birthjan1.py | ArtezGDA/MappingTheCity-Maps | a29377af7878907d30b4199d0859f007ba08b5e6 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import json
def visual_file(file_name , life_color, death_color):
with open(file_name, 'r') as f:
data = json.load(f)
for d in data:
cur_biths = d['birth']
date = d['date'].split(' ')
date = int(date[1])
for cut_birth... | 29.868421 | 75 | 0.518943 |
79597b4e3c4a57c30b777c95daddaf7259de5a66 | 6,654 | py | Python | adacrowd/trainer_baselines.py | maheshkkumar/adacrowd | c171fdb3674908fb06d5838fcba12c90b78bdbe4 | [
"MIT"
] | 7 | 2021-01-21T06:25:16.000Z | 2021-11-17T02:42:07.000Z | adacrowd/trainer_baselines.py | maheshkkumar/adacrowd | c171fdb3674908fb06d5838fcba12c90b78bdbe4 | [
"MIT"
] | 3 | 2021-03-03T12:17:11.000Z | 2021-12-31T09:11:59.000Z | adacrowd/trainer_baselines.py | maheshkkumar/adacrowd | c171fdb3674908fb06d5838fcba12c90b78bdbe4 | [
"MIT"
] | 3 | 2021-05-22T10:46:37.000Z | 2021-11-13T13:26:41.000Z | import numpy as np
import torch
from torch import optim
from torch.autograd import Variable
from torch.optim.lr_scheduler import StepLR
from config.baselines import cfg
from misc.utils import (AverageMeter, Timer, logger, print_summary,
update_model, vis_results)
from models.cc_baselines import... | 35.393617 | 92 | 0.481966 |
79597c37ca89ef3da68ce20182329e28c0f0278a | 2,412 | py | Python | playground/warehouse/config.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | playground/warehouse/config.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | playground/warehouse/config.py | murlokito/playground | 405a7091bbfd6705db967e872ed6c4591bd892e6 | [
"MIT"
] | null | null | null | __title__ = "simulation"
__author__ = "murlux"
__copyright__ = "Copyright 2019, " + __author__
__credits__ = (__author__, )
__license__ = "MIT"
__email__ = "murlux@protonmail.com"
# Global imports
from typing import Any, Dict, List, Optional
# Local imports
from playground.util import setup_logger
from playground.mes... | 31.324675 | 98 | 0.691542 |
79597d7241dcd603a368651c45fcec14a26301ec | 821 | py | Python | setup.py | phi1010/decorated-paho-mqtt | 7414e2313cc3a7aa31e5f94ffb266554f56a1843 | [
"BSD-3-Clause"
] | null | null | null | setup.py | phi1010/decorated-paho-mqtt | 7414e2313cc3a7aa31e5f94ffb266554f56a1843 | [
"BSD-3-Clause"
] | null | null | null | setup.py | phi1010/decorated-paho-mqtt | 7414e2313cc3a7aa31e5f94ffb266554f56a1843 | [
"BSD-3-Clause"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name='decorated_paho_mqtt',
version='1.0.5',
url='https://github.com/phi1010/decorated-paho-mqtt',
author='Phillip Kuhrt',
author_email='mail@phi1010.com',
description='Wrap... | 30.407407 | 99 | 0.663825 |
79597dee0efa89ce832d04df7ea0aaa65d8a854e | 1,349 | py | Python | python/ql/test/library-tests/PointsTo/guarded/type_test.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 4,036 | 2020-04-29T00:09:57.000Z | 2022-03-31T14:16:38.000Z | python/ql/test/library-tests/PointsTo/guarded/type_test.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 2,970 | 2020-04-28T17:24:18.000Z | 2022-03-31T22:40:46.000Z | python/ql/test/library-tests/PointsTo/guarded/type_test.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 794 | 2020-04-29T00:28:25.000Z | 2022-03-30T08:21:46.000Z |
def f(d = {}):
if isinstance(d, dict):
use(d)
else:
use(d)
def g(cond):
x = 0 if cond else 1.0
if isinstance(x, int):
use(x)
elif isinstance(x, float):
use(x)
else:
use(x)
def h(arg=int):
if issubclass(arg, int):
use(arg)
else:
... | 13.765306 | 55 | 0.49444 |
79597e85ac0a7bdda597fe67d42966de1363d3a0 | 66,805 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_06_01/operations/_managed_clusters_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.348962 | 253 | 0.668648 |
79597eb04ca7042eaa6ddb75bd8509ef679a0438 | 760 | py | Python | Prototipo avl/cnavas.py | 3lyalvarado/Metodos-basicos | e670fa9bfb85000f9eaba516643750d324f005f2 | [
"MIT"
] | null | null | null | Prototipo avl/cnavas.py | 3lyalvarado/Metodos-basicos | e670fa9bfb85000f9eaba516643750d324f005f2 | [
"MIT"
] | null | null | null | Prototipo avl/cnavas.py | 3lyalvarado/Metodos-basicos | e670fa9bfb85000f9eaba516643750d324f005f2 | [
"MIT"
] | null | null | null | import tkinter as tk
from PIL import Image
from tkinter import ttk
from graphviz import render
import time
class Aplicacion:
def __init__(self):
self.ventana1=tk.Tk()
self.canvas1=tk.Canvas(self.ventana1, width=700, height=500, background="black")
self.canvas1.grid(column=0,... | 33.043478 | 95 | 0.584211 |
79597ef93fe2b0f2cffa17ad16b470b2eeccdca9 | 6,501 | py | Python | src/datasets/fingerprint.py | joeddav/datasets | f955fa2d4785a1cea381a7999e0c5d0c0314046b | [
"Apache-2.0"
] | 1 | 2020-09-11T14:27:41.000Z | 2020-09-11T14:27:41.000Z | src/nlp/fingerprint.py | vinayya/nlp | 115d65db3f68f92be79063a4333552eccfc0df68 | [
"Apache-2.0"
] | null | null | null | src/nlp/fingerprint.py | vinayya/nlp | 115d65db3f68f92be79063a4333552eccfc0df68 | [
"Apache-2.0"
] | null | null | null | import json
import os
from copy import deepcopy
from dataclasses import asdict
from functools import wraps
from typing import TYPE_CHECKING
import numpy as np
import pyarrow as pa
import xxhash
from .info import DatasetInfo
from .utils.py_utils import dumps
if TYPE_CHECKING:
from .arrow_dataset import Dataset
... | 36.522472 | 116 | 0.65713 |
79597f10c1b833219fd1dd87ef480b903f4709da | 973 | py | Python | clamav.py | NVISOsecurity/assemblyline-service-clamav | 41772ff197cf61d296ef4e4ca6af0a9ca4789e1d | [
"MIT"
] | 1 | 2021-08-30T15:57:56.000Z | 2021-08-30T15:57:56.000Z | clamav.py | x1mus/assemblyline-service-clamav | a4fc43421f4cf9a704762d809122e7013eeceb44 | [
"MIT"
] | null | null | null | clamav.py | x1mus/assemblyline-service-clamav | a4fc43421f4cf9a704762d809122e7013eeceb44 | [
"MIT"
] | 1 | 2022-03-23T08:20:23.000Z | 2022-03-23T08:20:23.000Z | import subprocess
from assemblyline_v4_service.common.base import ServiceBase
from assemblyline_v4_service.common.result import Result, ResultSection
class ClamAV(ServiceBase):
def __init__(self, config=None):
super(ClamAV, self).__init__(config)
def start(self):
self.log.debug("ClamAV service starte... | 27.027778 | 119 | 0.711202 |
79597f7164767826bbb53aee52c4b77fa0f4dc2d | 475 | py | Python | dots/adamiak.py | HakierGrzonzo/syncing | 28d1f0e809b7597c18ec075ac29e90d6b766b9f9 | [
"MIT"
] | null | null | null | dots/adamiak.py | HakierGrzonzo/syncing | 28d1f0e809b7597c18ec075ac29e90d6b766b9f9 | [
"MIT"
] | null | null | null | dots/adamiak.py | HakierGrzonzo/syncing | 28d1f0e809b7597c18ec075ac29e90d6b766b9f9 | [
"MIT"
] | null | null | null | import itertools
def f1(a, b, c):
a = 10
b += 5
c += a
return a, b, c
def f2(a, b, c):
b += c
a += b
return a, b, c
def f3(a, b, c):
c = b + 10
a *= 2
b += a
return a, b, c
threadies = [f1, f2, f3]
for possibility in itertools.permutations(threadies):
print(list([x.__q... | 17.592593 | 54 | 0.486316 |
79597fc4d86127788960e780ee2fcfc43d81c716 | 15,803 | py | Python | qmsk/backup/rsync.py | funidata/qmsk-backup | 47e991a195136b28767eae7d51f6cfd448441884 | [
"MIT"
] | 1 | 2021-07-08T20:56:00.000Z | 2021-07-08T20:56:00.000Z | qmsk/backup/rsync.py | funidata/qmsk-backup | 47e991a195136b28767eae7d51f6cfd448441884 | [
"MIT"
] | 1 | 2021-04-30T14:30:30.000Z | 2021-09-22T12:18:30.000Z | qmsk/backup/rsync.py | funidata/qmsk-backup | 47e991a195136b28767eae7d51f6cfd448441884 | [
"MIT"
] | 1 | 2019-12-19T08:45:21.000Z | 2019-12-19T08:45:21.000Z | """
rsync handling.
Apologies for the 'RSync' nomenclature
"""
import contextlib
import datetime
import logging
import os.path
import qmsk.backup.mount
import qmsk.invoke
import re
from qmsk.backup.lvm import LVM, LVMVolume, LVMSnapshot
from qmsk.backup import zfs
log = logging.getLogger('qmsk.backup.rsync'... | 27.246552 | 150 | 0.530153 |
795980c95f91b7fe1804cd9ed8dedf307b02d651 | 419 | py | Python | iris_sdk/models/maps/telephone_number.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/telephone_number.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/telephone_number.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class TelephoneNumberMap(BaseMap):
account_id = None
city = None
full_number = None
last_modified = None
lata = None
order_create_date = None
order_id = None
order_type = None
rate_center = None
site_id = ... | 19.952381 | 49 | 0.663484 |
79598101ee4277d807f667fbbe8fed85a34be2e3 | 2,783 | py | Python | examples/0234-provider.py | dnoneill/pyIIIFpres | 600b8ff323677b7851c2f420f06ac5bf00d4ca8c | [
"MIT"
] | 12 | 2021-02-23T07:49:02.000Z | 2021-12-28T09:37:39.000Z | examples/0234-provider.py | dnoneill/pyIIIFpres | 600b8ff323677b7851c2f420f06ac5bf00d4ca8c | [
"MIT"
] | 11 | 2021-06-03T06:24:10.000Z | 2022-03-29T18:30:47.000Z | examples/0234-provider.py | dnoneill/pyIIIFpres | 600b8ff323677b7851c2f420f06ac5bf00d4ca8c | [
"MIT"
] | 1 | 2021-09-02T19:21:12.000Z | 2021-09-02T19:21:12.000Z | # https://iiif.io/api/cookbook/recipe/0234-provider/
from IIIFpres import iiifpapi3
iiifpapi3.BASE_URL = r"https://iiif.io/api/cookbook/recipe/0234-provider/"
manifest = iiifpapi3.Manifest()
manifest.set_id(extendbase_url="manifest.json")
manifest.add_label("en","Playbill Cover")
manifest.add_summary("en","Cover of pla... | 47.982759 | 396 | 0.789077 |
79598445dc4ecd42e6165e49aade26242df36fd8 | 405 | py | Python | halici/wsgi.py | matua34/villageMarket | bdd183300f748afcd72ce3f87e3891bd2ed823a4 | [
"BSL-1.0"
] | null | null | null | halici/wsgi.py | matua34/villageMarket | bdd183300f748afcd72ce3f87e3891bd2ed823a4 | [
"BSL-1.0"
] | null | null | null | halici/wsgi.py | matua34/villageMarket | bdd183300f748afcd72ce3f87e3891bd2ed823a4 | [
"BSL-1.0"
] | null | null | null | """
WSGI config for halici 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/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('... | 23.823529 | 79 | 0.753086 |
795984dfe94cdb4d6b146694c60021d457c964e3 | 775 | py | Python | db_repository/versions/002_migration.py | Happyxianyueveryday/vjcs-web | 3b33ee6a6a0f24f770ec45dc4552ee1cd21b4f28 | [
"MIT"
] | 3 | 2019-04-22T14:12:21.000Z | 2020-12-09T05:23:16.000Z | db_repository/versions/002_migration.py | Happyxianyueveryday/vjcs-web | 3b33ee6a6a0f24f770ec45dc4552ee1cd21b4f28 | [
"MIT"
] | null | null | null | db_repository/versions/002_migration.py | Happyxianyueveryday/vjcs-web | 3b33ee6a6a0f24f770ec45dc4552ee1cd21b4f28 | [
"MIT"
] | 1 | 2020-12-09T05:24:03.000Z | 2020-12-09T05:24:03.000Z | from sqlalchemy import *
from migrate import *
from migrate.changeset import schema
pre_meta = MetaData()
post_meta = MetaData()
post = Table('post', post_meta,
Column('id', Integer, primary_key=True, nullable=False),
Column('body', String(length=160)),
Column('timestamp', DateTime),
Column('user_id',... | 26.724138 | 68 | 0.71871 |
7959852140671d8fdfa4dd6a2381e802a36cb352 | 4,082 | py | Python | CVLab9/orangeball.py | ReneeDress/19Sp-CVLab | ed7474f80c11a8755b69c0f0a3bbbb285ff8781d | [
"WTFPL"
] | null | null | null | CVLab9/orangeball.py | ReneeDress/19Sp-CVLab | ed7474f80c11a8755b69c0f0a3bbbb285ff8781d | [
"WTFPL"
] | null | null | null | CVLab9/orangeball.py | ReneeDress/19Sp-CVLab | ed7474f80c11a8755b69c0f0a3bbbb285ff8781d | [
"WTFPL"
] | null | null | null | # USAGE
# python ball_tracking.py --video ball_tracking_example.mp4
# python ball_tracking.py
# import the necessary packages
from collections import deque
from imutils.video import VideoStream
import numpy as np
import argparse
import cv2
import imutils
import time
# construct the argument parse and parse the argume... | 28.950355 | 90 | 0.703577 |
795985def1fca990b97834950d289c11912b0e57 | 6,458 | py | Python | robosuite/wrappers/data_collection_wrapper.py | junjungoal/robosuite | 14a9a8672bb14145dd4586a0c0080e1d0d3ff74e | [
"MIT"
] | null | null | null | robosuite/wrappers/data_collection_wrapper.py | junjungoal/robosuite | 14a9a8672bb14145dd4586a0c0080e1d0d3ff74e | [
"MIT"
] | null | null | null | robosuite/wrappers/data_collection_wrapper.py | junjungoal/robosuite | 14a9a8672bb14145dd4586a0c0080e1d0d3ff74e | [
"MIT"
] | null | null | null | """
This file implements a wrapper for saving simulation states to disk.
This data collection wrapper is useful for collecting demonstrations.
"""
import os
import time
import numpy as np
from robosuite.wrappers import Wrapper
from robosuite.utils.mjcf_utils import save_sim_model
class DataCollectionWrapper(Wrapper... | 33.989474 | 98 | 0.623877 |
795986127cde7348198435975cf2a6671335fa3c | 90,227 | py | Python | pandas/core/arrays/categorical.py | gbaychev/pandas | 04893a954b91574279c402e8730a4b5fae2ae9e1 | [
"BSD-3-Clause"
] | 1 | 2020-01-06T06:50:30.000Z | 2020-01-06T06:50:30.000Z | pandas/core/arrays/categorical.py | gbaychev/pandas | 04893a954b91574279c402e8730a4b5fae2ae9e1 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/arrays/categorical.py | gbaychev/pandas | 04893a954b91574279c402e8730a4b5fae2ae9e1 | [
"BSD-3-Clause"
] | null | null | null | import operator
from shutil import get_terminal_size
import textwrap
from typing import Type, Union, cast
from warnings import warn
import numpy as np
from pandas._config import get_option
from pandas._libs import algos as libalgos, hashtable as htable, lib
from pandas.compat.numpy import function as nv
from pandas.... | 32.809818 | 88 | 0.581234 |
7959861914a22184c6ec2a204dd80c4dde66e050 | 10,686 | py | Python | main_test.py | zkcys001/distracting_feature | 508c4f7a1b2e6a99407a44e33e630803a3d0c89d | [
"Apache-1.1"
] | 25 | 2019-11-28T13:39:09.000Z | 2021-11-25T05:30:47.000Z | main_test.py | zkcys001/distracting_feature | 508c4f7a1b2e6a99407a44e33e630803a3d0c89d | [
"Apache-1.1"
] | 2 | 2020-01-11T15:36:12.000Z | 2020-02-27T06:57:59.000Z | main_test.py | zkcys001/distracting_feature | 508c4f7a1b2e6a99407a44e33e630803a3d0c89d | [
"Apache-1.1"
] | 4 | 2019-12-25T07:57:40.000Z | 2021-09-21T16:42:51.000Z | import misc
import os
import torch.utils.data
import time
import math
from argparse import ArgumentParser
from model.model_resnet import resnet50
from model.model_wresnet import wresnet50
from model.model_b3_p import Reab3p16
from model.model_b3_plstm import b3_plstm
from model.model_b3_palstm import b3palstm
from mode... | 37.363636 | 112 | 0.642897 |
7959867c6336fcc8232949274d25ef578649d3cf | 381 | py | Python | generate_train.py | samarthanand12/Custom-Object-Detection-using-Yolo | d293c73db84aa989d65aed5881bd76958f1d3740 | [
"MIT"
] | 40 | 2020-08-27T13:44:40.000Z | 2022-03-04T13:50:21.000Z | generate_train.py | samarthanand12/Custom-Object-Detection-using-Yolo | d293c73db84aa989d65aed5881bd76958f1d3740 | [
"MIT"
] | 8 | 2020-11-13T17:46:08.000Z | 2022-02-10T02:19:36.000Z | generate_train.py | samarthanand12/Custom-Object-Detection-using-Yolo | d293c73db84aa989d65aed5881bd76958f1d3740 | [
"MIT"
] | 18 | 2021-01-19T07:34:07.000Z | 2022-03-20T10:20:41.000Z | import os
image_files = []
os.chdir(os.path.join("data", "obj"))
for filename in os.listdir(os.getcwd()):
if filename.endswith(".jpg"):
image_files.append("data/obj/" + filename)
os.chdir("..")
with open("train.txt", "w") as outfile:
for image in image_files:
outfile.write(image)
... | 27.214286 | 51 | 0.60105 |
79598700a61867388cae882da8211df58a347318 | 843 | py | Python | tasksupervisor/api/tasksupervisor_info.py | iml130/mod.sw.tp.ts | 4cda3ef0d3791eb204d5510631fdb9ec7ec57aab | [
"Apache-2.0"
] | null | null | null | tasksupervisor/api/tasksupervisor_info.py | iml130/mod.sw.tp.ts | 4cda3ef0d3791eb204d5510631fdb9ec7ec57aab | [
"Apache-2.0"
] | 1 | 2021-04-24T08:43:59.000Z | 2021-04-24T08:43:59.000Z | tasksupervisor/api/tasksupervisor_info.py | iml130/mod.sw.tp.ts | 4cda3ef0d3791eb204d5510631fdb9ec7ec57aab | [
"Apache-2.0"
] | 1 | 2021-03-04T10:32:52.000Z | 2021-03-04T10:32:52.000Z | """ Contains TaskSupervisorInfo API class """
import uuid
class TaskSupervisorInfo():
"""
Gets created at the start of the Supervisor and provides information
about the total number of started materialflows.
"""
def __init__(self):
self.id = uuid.uuid4()
self.used_materialf... | 33.72 | 76 | 0.676157 |
795987b1e13cf361fbabea3e8aa1ff5e5d3f7c5a | 1,409 | py | Python | ooobuild/lo/beans/property_set_info_change.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/beans/property_set_info_change.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/beans/property_set_info_change.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 30.630435 | 146 | 0.730305 |
795988c364cf1ce7ca726fc9411ad5695574f21e | 1,558 | py | Python | pckt/cli.py | Allaman/pckt | e04d8c08c05b095f5e76d8bca02c8f17a2e79827 | [
"MIT"
] | null | null | null | pckt/cli.py | Allaman/pckt | e04d8c08c05b095f5e76d8bca02c8f17a2e79827 | [
"MIT"
] | null | null | null | pckt/cli.py | Allaman/pckt | e04d8c08c05b095f5e76d8bca02c8f17a2e79827 | [
"MIT"
] | null | null | null | """
cli defines command line argument options for pckt application
"""
import click
from db import clear_db, update_db
from fetch import get_data, fetch_items, get_pocket
from read import get_tags_stats, select_col, list_entries, view_entries
@click.group()
def main():
"""CLI for interacting with the Pocket API... | 34.622222 | 85 | 0.712452 |
795989241a0d7172a602160703f9fbac1d434dad | 16,811 | py | Python | mit_semseg/models/hrnet.py | starkgines/PDI | dd6908c022179f935ae25d3afee9ea44bb49f162 | [
"BSD-3-Clause"
] | 4,303 | 2018-04-08T00:48:44.000Z | 2022-03-31T12:54:08.000Z | mit_semseg/models/hrnet.py | starkgines/PDI | dd6908c022179f935ae25d3afee9ea44bb49f162 | [
"BSD-3-Clause"
] | 212 | 2018-04-08T16:02:59.000Z | 2022-03-16T14:52:44.000Z | mit_semseg/models/hrnet.py | starkgines/PDI | dd6908c022179f935ae25d3afee9ea44bb49f162 | [
"BSD-3-Clause"
] | 1,057 | 2018-04-08T03:29:26.000Z | 2022-03-30T17:36:12.000Z | """
This HRNet implementation is modified from the following repository:
https://github.com/HRNet/HRNet-Semantic-Segmentation
"""
import logging
import torch
import torch.nn as nn
import torch.nn.functional as F
from .utils import load_url
from mit_semseg.lib.nn import SynchronizedBatchNorm2d
BatchNorm2d = Synchroniz... | 37.692825 | 164 | 0.551484 |
79598992fb86fbccaca1b789cd24b6e690fb6594 | 212 | py | Python | src/setup.py | siboles/bioMultiScale | 34fb96cd1f08c85b94fdb025b16eb8de23bba602 | [
"BSD-3-Clause"
] | null | null | null | src/setup.py | siboles/bioMultiScale | 34fb96cd1f08c85b94fdb025b16eb8de23bba602 | [
"BSD-3-Clause"
] | null | null | null | src/setup.py | siboles/bioMultiScale | 34fb96cd1f08c85b94fdb025b16eb8de23bba602 | [
"BSD-3-Clause"
] | null | null | null | try:
from setuptools.core import setup
except ImportError:
from distutils.core import setup
setup(
name='bioMultiScale',
version='0.0',
author='Scott Sibole',
packages=['bioMultiScale'])
| 19.272727 | 37 | 0.688679 |
79598c12d873d706c3783f909e5a611f7851d928 | 13,735 | py | Python | ocempgui/widgets/Table.py | djkool/OcempGUI3 | 43a68033cb0dbad10654231299cb762cd18b7c25 | [
"BSD-2-Clause"
] | null | null | null | ocempgui/widgets/Table.py | djkool/OcempGUI3 | 43a68033cb0dbad10654231299cb762cd18b7c25 | [
"BSD-2-Clause"
] | null | null | null | ocempgui/widgets/Table.py | djkool/OcempGUI3 | 43a68033cb0dbad10654231299cb762cd18b7c25 | [
"BSD-2-Clause"
] | null | null | null | # $Id: Table.py,v 1.26.2.8 2007/03/23 11:57:14 marcusva Exp $
#
# Copyright (c) 2004-2007, Marcus von Appen
# 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... | 36.432361 | 80 | 0.593811 |
79598c31a8e33ced577feb6eebaf2917bbf4511a | 3,925 | py | Python | backend/applications/user/migrations/0001_initial.py | relsi/muutoca | 8db8c7783558ac1f71cd0a257c23ddc8737e1cdf | [
"MIT"
] | 1 | 2021-03-06T23:27:47.000Z | 2021-03-06T23:27:47.000Z | backend/applications/user/migrations/0001_initial.py | relsi/muutoca | 8db8c7783558ac1f71cd0a257c23ddc8737e1cdf | [
"MIT"
] | 1 | 2021-03-09T23:06:24.000Z | 2021-03-09T23:06:24.000Z | backend/applications/user/migrations/0001_initial.py | relsi/muutoca | 8db8c7783558ac1f71cd0a257c23ddc8737e1cdf | [
"MIT"
] | 1 | 2021-03-06T18:49:10.000Z | 2021-03-06T18:49:10.000Z | # Generated by Django 3.1.7 on 2021-03-08 17:47
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_m... | 66.525424 | 329 | 0.647898 |
79598c5df6af7ebdb1f484f0ac743e9e51e0efa7 | 1,331 | py | Python | ps1/ps1a.py | ghidalgo93/mit_python | 3664a6059d37e93566ececd94ba78e6382abfc87 | [
"MIT"
] | null | null | null | ps1/ps1a.py | ghidalgo93/mit_python | 3664a6059d37e93566ececd94ba78e6382abfc87 | [
"MIT"
] | null | null | null | ps1/ps1a.py | ghidalgo93/mit_python | 3664a6059d37e93566ececd94ba78e6382abfc87 | [
"MIT"
] | null | null | null |
# Float, Float, Float -> Int
# Given a starting annual salary (Float), a portion of salary to be saved (Float), and total cost of a dream home (Float), return the months it will take you to save up enough money for a down payment
# ask for user input
# calculate months it will take to save up
# stub
# def calc_mont... | 38.028571 | 200 | 0.703982 |
79598eb9fd529e76bd3473780c59f56878ea8419 | 4,390 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/v1_flink.py | AdamHillier/polyaxon | a6407f4b22eddcd970bb4be17e111cbc8d6bca6d | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_flink.py | AdamHillier/polyaxon | a6407f4b22eddcd970bb4be17e111cbc8d6bca6d | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_flink.py | AdamHillier/polyaxon | a6407f4b22eddcd970bb4be17e111cbc8d6bca6d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | 26.768293 | 93 | 0.579499 |
795990c427e5ca12058d81883f066c33f498e2d4 | 5,036 | py | Python | project_redss/auto_code_show_messages.py | AfricasVoices/Project-REDSS | 64999c5240fe8f1c839ccafccfa1e75b155c4787 | [
"MIT"
] | null | null | null | project_redss/auto_code_show_messages.py | AfricasVoices/Project-REDSS | 64999c5240fe8f1c839ccafccfa1e75b155c4787 | [
"MIT"
] | 20 | 2018-11-21T15:58:36.000Z | 2019-03-12T11:19:59.000Z | project_redss/auto_code_show_messages.py | AfricasVoices/Project-REDSS | 64999c5240fe8f1c839ccafccfa1e75b155c4787 | [
"MIT"
] | null | null | null | import random
import time
from os import path
from core_data_modules.cleaners import somali, Codes
from core_data_modules.cleaners.cleaning_utils import CleaningUtils
from core_data_modules.traced_data import Metadata
from core_data_modules.traced_data.io import TracedDataCSVIO, TracedDataCodaV2IO
from core_data_modul... | 45.781818 | 124 | 0.662629 |
795990c9a3436c095fb91bd0e943960499ba1b40 | 4,754 | py | Python | .kodi/addons/plugin.video.p2p-streams/resources/core/parsers/livefootballws/main.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | null | null | null | .kodi/addons/plugin.video.p2p-streams/resources/core/parsers/livefootballws/main.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | null | null | null | .kodi/addons/plugin.video.p2p-streams/resources/core/parsers/livefootballws/main.py | C6SUMMER/allinclusive-kodi-pi | 8baf247c79526849c640c6e56ca57a708a65bd11 | [
"Apache-2.0"
] | 2 | 2018-04-17T17:34:39.000Z | 2020-07-26T03:43:33.000Z | # -*- coding: utf-8 -*-
"""
This plugin is 3rd party and not part of p2p-streams addon
livefootball.ws
"""
import sys,os
current_dir = os.path.dirname(os.path.realpath(__file__))
basename = os.path.basename(current_dir)
core_dir = current_dir.replace(basename,'').replace('parsers','')
sys.path.append(core_dir)
fro... | 51.11828 | 243 | 0.588136 |
795990e21efd013a7e023105fab405b39b9f48aa | 4,434 | py | Python | Code/Build/Models/DAISY/Training/SVMTraining.py | IliaBahmutov/ArtML | e44bdf03428c3984a76f556417bf47d90793dc2d | [
"BSD-3-Clause"
] | null | null | null | Code/Build/Models/DAISY/Training/SVMTraining.py | IliaBahmutov/ArtML | e44bdf03428c3984a76f556417bf47d90793dc2d | [
"BSD-3-Clause"
] | null | null | null | Code/Build/Models/DAISY/Training/SVMTraining.py | IliaBahmutov/ArtML | e44bdf03428c3984a76f556417bf47d90793dc2d | [
"BSD-3-Clause"
] | null | null | null | import numpy #for numpy storage
import os #to find files
import time #for time to complete
from sklearn import svm
import pickle
start = time.time()
from sklearn.calibration import CalibratedClassifierCV
from statistics import mean
#Import Training Data & Labels
odata = numpy.load("Data/20ImpTrainingData.npy")
data = ... | 33.338346 | 100 | 0.707713 |
79599128dd99424536ac66090ac5ffad8d6881c2 | 874 | py | Python | nbgrader/preprocessors/computechecksums.py | FrattisUC/nbgrader | f6402dcbb875e41ee3317be9e7af518afda9f72c | [
"BSD-3-Clause-Clear"
] | 2 | 2021-09-11T20:32:18.000Z | 2021-09-11T20:32:37.000Z | nbgrader/preprocessors/computechecksums.py | FrattisUC/nbgrader | f6402dcbb875e41ee3317be9e7af518afda9f72c | [
"BSD-3-Clause-Clear"
] | 4 | 2019-03-02T11:49:46.000Z | 2020-09-07T10:17:52.000Z | nbgrader/preprocessors/computechecksums.py | FrattisUC/nbgrader | f6402dcbb875e41ee3317be9e7af518afda9f72c | [
"BSD-3-Clause-Clear"
] | 2 | 2019-05-31T08:53:48.000Z | 2019-05-31T09:42:26.000Z | from .. import utils
from . import NbGraderPreprocessor
class ComputeChecksums(NbGraderPreprocessor):
"""A preprocessor to compute checksums of grade cells."""
def preprocess_cell(self, cell, resources, cell_index):
# compute checksums of grade cell and solution cells
if utils.is_grade(cell) o... | 39.727273 | 84 | 0.624714 |
7959917bf69e54336c2e70db1716b91f5ab409b6 | 3,348 | py | Python | src/backend/mec/routes/meetings/crud.py | rollsroycedev/MEC | d9a342059f56d199acba1968659b9d440a764278 | [
"MIT"
] | 1 | 2021-09-07T14:53:16.000Z | 2021-09-07T14:53:16.000Z | src/backend/mec/routes/meetings/crud.py | rollsroycedev/MEC | d9a342059f56d199acba1968659b9d440a764278 | [
"MIT"
] | 24 | 2021-07-22T14:17:26.000Z | 2022-02-14T09:42:12.000Z | src/backend/mec/routes/meetings/crud.py | rropen/MEC | d9a342059f56d199acba1968659b9d440a764278 | [
"MIT"
] | null | null | null | from decimal import Decimal
from sqlalchemy.sql.functions import grouping_sets
from mec.models import Meeting
from mec.schemas import MeetingBase
from sqlalchemy.orm import Session
def get_all(db: Session, skip: int = 0, limit: int = 25):
"""Get all the meetings and return the them."""
return db.query(Meeti... | 33.48 | 97 | 0.678017 |
795993798a64145d7691a67cf4ff1b682bef5ab4 | 2,728 | py | Python | dnnv/verifiers/eran/utils.py | Felipetoledo4815/DNNV | b94147d7dec8e7b50943e616e57c7a1a2b8ed517 | [
"MIT"
] | null | null | null | dnnv/verifiers/eran/utils.py | Felipetoledo4815/DNNV | b94147d7dec8e7b50943e616e57c7a1a2b8ed517 | [
"MIT"
] | null | null | null | dnnv/verifiers/eran/utils.py | Felipetoledo4815/DNNV | b94147d7dec8e7b50943e616e57c7a1a2b8ed517 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow.compat.v1 as tf
from typing import List, Type
from dnnv.nn.layers import Convolutional, FullyConnected, InputLayer, Layer
from dnnv.verifiers.common import HyperRectangle, VerifierTranslatorError
from .layers import conv_as_tf
def as_tf(
layers: List[Layer],
translator_... | 38.422535 | 88 | 0.547654 |
795993b3d43dd4c1023450b89e7d2616cbc110df | 9,286 | py | Python | engine/doc/grit_book/translate_xml.py | AugustoMoura/GritEnginePR | 0f8303df7f70972036d9b555dffe08cadb473926 | [
"MIT"
] | null | null | null | engine/doc/grit_book/translate_xml.py | AugustoMoura/GritEnginePR | 0f8303df7f70972036d9b555dffe08cadb473926 | [
"MIT"
] | null | null | null | engine/doc/grit_book/translate_xml.py | AugustoMoura/GritEnginePR | 0f8303df7f70972036d9b555dffe08cadb473926 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os.path
import re
import textwrap
import lxml.etree as ET
class TranslateError:
def __init__(self, el, problem):
self.filename = el.base
self.line = el.sourceline
self.problem = problem
def __str__(self):
return '%s:%d: %s' % (self.filename, self.line,... | 33.890511 | 121 | 0.553629 |
7959944703301245e6ccf3e2f97b433032f2f3c6 | 514 | py | Python | manage.py | mirest/stylist-api | 6687b807bd0ead95eca110f95e1fb8efcea847ae | [
"MIT"
] | 1 | 2019-05-02T15:37:14.000Z | 2019-05-02T15:37:14.000Z | manage.py | mirest/stylist-api | 6687b807bd0ead95eca110f95e1fb8efcea847ae | [
"MIT"
] | 4 | 2019-04-01T13:28:51.000Z | 2019-04-07T17:38:13.000Z | manage.py | mirest/stylist-api | 6687b807bd0ead95eca110f95e1fb8efcea847ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.get('DJANGO_SETTINGS_MODULE', 'config.default')
try:
from django.core.management import execute_from_command_line
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's in... | 32.125 | 73 | 0.678988 |
79599463a091b951938e0cc78113a493452b162c | 536 | py | Python | anibot/extractors/RSSExtractor.py | iddqd0/anibot | 2f72bc6d624706078dece81aac6c215f1f559b9d | [
"MIT"
] | null | null | null | anibot/extractors/RSSExtractor.py | iddqd0/anibot | 2f72bc6d624706078dece81aac6c215f1f559b9d | [
"MIT"
] | null | null | null | anibot/extractors/RSSExtractor.py | iddqd0/anibot | 2f72bc6d624706078dece81aac6c215f1f559b9d | [
"MIT"
] | null | null | null | import time, feedparser
from ..util import AnibotEvent
from .Extractor import Extractor
class RSSExtractor(Extractor):
name, url = "Dummy RSS Extractor", ""
polling = 600
def raw(self):
if self.url:
feed = feedparser.parse(self.url)
return feed.entries
def run(self):
... | 28.210526 | 108 | 0.613806 |
79599521d59197c67fb64eaf68b14a6b1ec6846e | 43,755 | py | Python | test/pecos/xmc/xlinear/test_xlinear.py | yuhchenlin/pecos | 0085d92b09a83a0d81b67ce2b2e0b4b51d163992 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-07-28T21:09:58.000Z | 2021-09-24T03:37:45.000Z | test/pecos/xmc/xlinear/test_xlinear.py | yuhchenlin/pecos | 0085d92b09a83a0d81b67ce2b2e0b4b51d163992 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | test/pecos/xmc/xlinear/test_xlinear.py | yuhchenlin/pecos | 0085d92b09a83a0d81b67ce2b2e0b4b51d163992 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-09-24T04:00:47.000Z | 2021-09-24T04:00:47.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://aws.amazon.com/apache2.0/
#
# or in the "license" file acco... | 44.466463 | 205 | 0.622489 |
7959956341ab9c68d2e8078c12dd9bb30e722d65 | 7,283 | py | Python | scripts/exp_scripts/src/ec2_scripts/generate_ec2_config_file.py | MobilityFirst/GNS | 1eb5524457e0075dc9f451bd66e39f9291052eb8 | [
"Apache-2.0"
] | 17 | 2015-11-16T18:02:47.000Z | 2020-08-02T08:53:11.000Z | scripts/exp_scripts/src/ec2_scripts/generate_ec2_config_file.py | MobilityFirst/GNS | 1eb5524457e0075dc9f451bd66e39f9291052eb8 | [
"Apache-2.0"
] | 63 | 2015-12-22T20:52:28.000Z | 2019-03-06T02:44:20.000Z | scripts/exp_scripts/src/ec2_scripts/generate_ec2_config_file.py | MobilityFirst/GNS | 1eb5524457e0075dc9f451bd66e39f9291052eb8 | [
"Apache-2.0"
] | 62 | 2015-11-13T20:04:47.000Z | 2020-01-10T12:20:44.000Z | #!/usr/bin/env python
import os
import sys
from read_pl_latencies import read_pl_latencies
import exp_config
from trace_generator import trace_generator
pl_lns_workload = exp_config.pl_lns_workload
hosts_file_ns = '/home/abhigyan/gnrs/ec2_scripts/pl_ns'
hosts_file_lns = '/home/abhigyan/gnrs/ec2_scripts/pl_lns'
confi... | 37.932292 | 111 | 0.658108 |
7959968ae42119ff4bfcb14c33bec8f613d4792f | 2,516 | py | Python | tests/test_check_redcap_event.py | utsw-bicf/nacculator | 1e8eb9b4029c7c52b242c76f941a1572577d300e | [
"BSD-2-Clause"
] | null | null | null | tests/test_check_redcap_event.py | utsw-bicf/nacculator | 1e8eb9b4029c7c52b242c76f941a1572577d300e | [
"BSD-2-Clause"
] | 20 | 2020-05-20T16:04:13.000Z | 2020-07-28T16:10:15.000Z | tests/test_check_redcap_event.py | utsw-bicf/nacculator | 1e8eb9b4029c7c52b242c76f941a1572577d300e | [
"BSD-2-Clause"
] | null | null | null | import unittest
from nacc.redcap2nacc import check_redcap_event
class option():
lbd = False
ftld = False
csf = False
np = False
m = False
ivp = False
fvp = False
class TestRedcapEvent(unittest.TestCase):
'''
These tests are meant to ensure that the check_redcap_event function is... | 32.25641 | 79 | 0.630763 |
795996cd662a5513a1f62652ea9456ba3d931357 | 5,869 | py | Python | tests/test_24_env_db.py | bfclarke/kipoi | 992b41eee8e35b39ae61262d988db974d8583759 | [
"MIT"
] | null | null | null | tests/test_24_env_db.py | bfclarke/kipoi | 992b41eee8e35b39ae61262d988db974d8583759 | [
"MIT"
] | null | null | null | tests/test_24_env_db.py | bfclarke/kipoi | 992b41eee8e35b39ae61262d988db974d8583759 | [
"MIT"
] | null | null | null | import json
import os
import kipoi
from kipoi.cli.env import generate_env_db_entry, get_envs_by_model
from kipoi.env_db import EnvDb
def get_args(def_kwargs):
class dummy_args:
kwargs = def_kwargs
model = kwargs["model"]
source = kwargs["source"]
def _get_kwargs(self):
... | 35.786585 | 115 | 0.654796 |
79599785cb290f9e1f132df6f0fe2c5785525236 | 3,605 | py | Python | examples/intraday_mean.py | prutskov/Bodo-examples | 7c96e89f3ac9062eb598b99da2729718007b8e4d | [
"Apache-2.0"
] | 17 | 2020-09-27T04:31:33.000Z | 2022-02-24T12:02:56.000Z | examples/intraday_mean.py | prutskov/Bodo-examples | 7c96e89f3ac9062eb598b99da2729718007b8e4d | [
"Apache-2.0"
] | 12 | 2021-09-08T21:30:40.000Z | 2022-03-25T13:20:29.000Z | examples/intraday_mean.py | prutskov/Bodo-examples | 7c96e89f3ac9062eb598b99da2729718007b8e4d | [
"Apache-2.0"
] | 5 | 2020-09-02T23:48:40.000Z | 2022-03-01T19:34:38.000Z | """
Intraday example to demonstrate Pandas functionality.
Usage:
mpiexec -n [cores] python intraday_mean.py --file [file] --maxDays [max_num_days]
# adapted from:
# http://www.pythonforfinance.net/2017/02/20/intraday-stock-mean-reversion-trading-backtest-in-python/
See data generation script in data/stock_dat... | 33.073394 | 119 | 0.613592 |
79599791a96a1abe563b9cd817b144090e328106 | 4,343 | py | Python | chatbot_env/Lib/site-packages/sklearn/neighbors/_unsupervised.py | rakmakan/Chatbot | d04bc1526b56961a16c25148d9ef18c4f157e9c4 | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | chatbot_env/Lib/site-packages/sklearn/neighbors/_unsupervised.py | rakmakan/Chatbot | d04bc1526b56961a16c25148d9ef18c4f157e9c4 | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | chatbot_env/Lib/site-packages/sklearn/neighbors/_unsupervised.py | rakmakan/Chatbot | d04bc1526b56961a16c25148d9ef18c4f157e9c4 | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """Unsupervised nearest neighbors learner"""
from ._base import NeighborsBase
from ._base import KNeighborsMixin
from ._base import RadiusNeighborsMixin
from ._base import UnsupervisedMixin
class NearestNeighbors(NeighborsBase, KNeighborsMixin,
RadiusNeighborsMixin, UnsupervisedMixin):
"""U... | 37.119658 | 82 | 0.652544 |
79599832fa39dfef8bbf89a9bcfb5d4617c7f21d | 9,096 | py | Python | misc/config_tools/static_allocators/memory_allocator.py | jackwhich/acrn-hypervisor-1 | 2ff11c2ef04a2668979b3e363e25f13cf48376ac | [
"BSD-3-Clause"
] | null | null | null | misc/config_tools/static_allocators/memory_allocator.py | jackwhich/acrn-hypervisor-1 | 2ff11c2ef04a2668979b3e363e25f13cf48376ac | [
"BSD-3-Clause"
] | null | null | null | misc/config_tools/static_allocators/memory_allocator.py | jackwhich/acrn-hypervisor-1 | 2ff11c2ef04a2668979b3e363e25f13cf48376ac | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2022 Intel Corporation.
#
# SPDX-License-Identifier: BSD-3-Clause
#
import os
import sys
import lib.error
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'library'))
import common, math, logging
def import_memory_info(board_etree):
ram_range ... | 48.382979 | 155 | 0.659631 |
795998e04f6a260acd626434ea03c5f61c04bd5e | 4,133 | py | Python | main.py | gigae-Cyon/PearlAbyssNewsArchive | f929d90dc32d807de28fc48ed3d4966b5e8a5471 | [
"MIT"
] | null | null | null | main.py | gigae-Cyon/PearlAbyssNewsArchive | f929d90dc32d807de28fc48ed3d4966b5e8a5471 | [
"MIT"
] | null | null | null | main.py | gigae-Cyon/PearlAbyssNewsArchive | f929d90dc32d807de28fc48ed3d4966b5e8a5471 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import pickle
import re, datetime
# 뉴스 중복 확인
def duplication_check(new_news, saved_news_list):
if new_news in saved_news_list:
return False
else:
saved_news_list.append(new_news)
return True
# 기사 날짜, 시간 표현 (시간정보가 '~전'인 경우)
def get_released_time1(current_ti... | 33.330645 | 142 | 0.663199 |
795999976f9cd352322a3ed99857547f7ae7772d | 1,994 | py | Python | tests/py/test_for_community_json.py | webmaven/gratipay.com | 31f6bcf903029895a4c56290aedde755e852c82f | [
"CC0-1.0"
] | 1 | 2019-10-09T10:13:53.000Z | 2019-10-09T10:13:53.000Z | tests/py/test_for_community_json.py | webmaven/gratipay.com | 31f6bcf903029895a4c56290aedde755e852c82f | [
"CC0-1.0"
] | null | null | null | tests/py/test_for_community_json.py | webmaven/gratipay.com | 31f6bcf903029895a4c56290aedde755e852c82f | [
"CC0-1.0"
] | null | null | null | import json
from gratipay.models.community import slugize
from gratipay.testing import Harness
class TestForCommunityJson(Harness):
def setUp(self):
Harness.setUp(self)
self.add_participant('alice')
self.add_participant('bob')
carl = self.add_participant('carl')
carl.inse... | 33.79661 | 74 | 0.653962 |
795999b8a086d2a92c7c0d0019a508d781dcdb36 | 4,889 | py | Python | code/visualization/2020/04/0_0_compression_tucker_sparse_facto_select_lr.py | lucgiffon/psm-nets | dec43c26281febf6e5c8b8f42bfb78098ae7101d | [
"MIT"
] | 1 | 2021-07-15T07:05:18.000Z | 2021-07-15T07:05:18.000Z | code/visualization/2020/04/0_0_compression_tucker_sparse_facto_select_lr.py | lucgiffon/psm-nets | dec43c26281febf6e5c8b8f42bfb78098ae7101d | [
"MIT"
] | 2 | 2021-07-15T06:12:47.000Z | 2021-07-16T10:05:36.000Z | code/visualization/2020/04/0_0_compression_tucker_sparse_facto_select_lr.py | lucgiffon/psm-nets | dec43c26281febf6e5c8b8f42bfb78098ae7101d | [
"MIT"
] | null | null | null | import pathlib
import pandas as pd
from palmnet.visualization.utils import get_palminized_model_and_df, get_df
import matplotlib.pyplot as plt
import numpy as np
import logging
import plotly.graph_objects as go
import plotly.express as px
from pprint import pprint as pprint
mpl_logger = logging.getLogger('matplotlib'... | 40.07377 | 178 | 0.607895 |
79599a1fd5e5704b5861c125ebec485dcace616e | 13,283 | py | Python | chia/cmds/init_funcs.py | namelessperson0/silicoin-blockchain | 85db78631f9ea5571a840a226d503fd2bda20356 | [
"Apache-2.0"
] | null | null | null | chia/cmds/init_funcs.py | namelessperson0/silicoin-blockchain | 85db78631f9ea5571a840a226d503fd2bda20356 | [
"Apache-2.0"
] | null | null | null | chia/cmds/init_funcs.py | namelessperson0/silicoin-blockchain | 85db78631f9ea5571a840a226d503fd2bda20356 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
import yaml
from chia import __version__
from chia.consensus.coinbase import create_puzzlehash_for_pk
from chia.ssl.create_ssl import generate_ca_signed_cert, get_chia_ca_crt_key, make_ca_cert
from chia.util.bech32m i... | 39.182891 | 116 | 0.669126 |
79599a44cc658e29653c5313a69357554683f2a6 | 1,844 | py | Python | warehouse/migrations/versions/590c513f1c74_new_psf_staff_boolean_flag.py | fairhopeweb/warehouse | 7d8ef742e8fe6b401190c28ce56761848041c89f | [
"Apache-2.0"
] | 3,103 | 2015-01-30T00:24:10.000Z | 2022-03-31T23:21:39.000Z | warehouse/migrations/versions/590c513f1c74_new_psf_staff_boolean_flag.py | fairhopeweb/warehouse | 7d8ef742e8fe6b401190c28ce56761848041c89f | [
"Apache-2.0"
] | 6,709 | 2015-01-05T01:23:20.000Z | 2022-03-31T14:49:46.000Z | warehouse/migrations/versions/590c513f1c74_new_psf_staff_boolean_flag.py | fairhopeweb/warehouse | 7d8ef742e8fe6b401190c28ce56761848041c89f | [
"Apache-2.0"
] | 959 | 2015-01-12T22:22:40.000Z | 2022-03-31T22:21:51.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... | 33.527273 | 79 | 0.697397 |
79599c7b764f03a1731f4d840e697ef3da6d99ac | 11,447 | py | Python | src/acousticfield/process.py | meguia/acousticfield | 4028aab25ae62ea9018868c57ee44b3e4c51ff85 | [
"MIT"
] | null | null | null | src/acousticfield/process.py | meguia/acousticfield | 4028aab25ae62ea9018868c57ee44b3e4c51ff85 | [
"MIT"
] | null | null | null | src/acousticfield/process.py | meguia/acousticfield | 4028aab25ae62ea9018868c57ee44b3e4c51ff85 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import signal
from scipy.io import wavfile
from scipy.interpolate import interp1d
from scipy.fft import next_fast_len, rfft, irfft, fft, ifft
from numpy.fft.helper import fftfreq
def ir_extract(rec,fileinv,fileout='ir_out',loopback=None,dur=None,fs=48000):
'''
extrae la respuesta ... | 35.439628 | 132 | 0.599284 |
79599c7eb79335c5fab84c682dfa9ed084dee572 | 12,837 | py | Python | src/view/MainDialog.py | slavi010/random_dice_bot | 68742314dddcc06b03f961b7da66a6cd65e01c2e | [
"MIT"
] | 1 | 2020-05-28T20:31:36.000Z | 2020-05-28T20:31:36.000Z | src/view/MainDialog.py | slavi010/random_dice_bot | 68742314dddcc06b03f961b7da66a6cd65e01c2e | [
"MIT"
] | 8 | 2020-05-28T14:15:00.000Z | 2022-01-13T02:47:35.000Z | src/view/MainDialog.py | slavi010/random_dice_bot | 68742314dddcc06b03f961b7da66a6cd65e01c2e | [
"MIT"
] | 1 | 2021-10-13T21:47:00.000Z | 2021-10-13T21:47:00.000Z | #################################################################################
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ... | 34.883152 | 120 | 0.616188 |
79599daef5acd8d5a2d506647961f126f2d07395 | 36,134 | py | Python | backend/api/tests/test_team.py | Savage-Aim/app | ecb3b7635caba552ded17172c0aa3535b5f3b98b | [
"MIT"
] | null | null | null | backend/api/tests/test_team.py | Savage-Aim/app | ecb3b7635caba552ded17172c0aa3535b5f3b98b | [
"MIT"
] | 1 | 2022-02-07T02:58:14.000Z | 2022-02-07T02:58:14.000Z | backend/api/tests/test_team.py | Savage-Aim/app | ecb3b7635caba552ded17172c0aa3535b5f3b98b | [
"MIT"
] | null | null | null | # stdlib
from io import StringIO
# lib
from django.core.management import call_command
from django.urls import reverse
from rest_framework import status
# local
from api.models import BISList, Character, Gear, Notification, Job, Team, TeamMember, Tier
from api.serializers import TeamSerializer
from .test_base import Sa... | 40.059867 | 119 | 0.608208 |
79599dc37b7e442bba189c1cd4fc1b2e6d05454f | 96 | py | Python | venv/lib/python3.8/site-packages/setuptools/_distutils/command/config.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/setuptools/_distutils/command/config.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/setuptools/_distutils/command/config.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/d9/a4/e3/c30dcfc23301f3e6626c27b83fb07ea86d61335827feb257632c51cfa7 | 96 | 96 | 0.895833 |
79599ef91ed81b290b1e0958a48dfba9289106f5 | 13,148 | py | Python | test/functional/llmq-is-cl-conflicts.py | INTICOIN/SolD | cfa2f3a96b0f8831fee63c70203af17732181fe5 | [
"MIT"
] | null | null | null | test/functional/llmq-is-cl-conflicts.py | INTICOIN/SolD | cfa2f3a96b0f8831fee63c70203af17732181fe5 | [
"MIT"
] | null | null | null | test/functional/llmq-is-cl-conflicts.py | INTICOIN/SolD | cfa2f3a96b0f8831fee63c70203af17732181fe5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The SolD Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import time
from decimal import Decimal
from test_framework import mininode
from test_framework.blocktools i... | 39.483483 | 127 | 0.635458 |
79599f741328d8152fbd298d347f8c7bea8550a8 | 11,227 | py | Python | src/tests/ftest/util/nvme_utils.py | grom72/daos | 88f57e0ab29222565dfdd1e23f2103f0ad2e0670 | [
"BSD-2-Clause-Patent"
] | 429 | 2016-09-28T20:43:20.000Z | 2022-03-25T01:22:50.000Z | src/tests/ftest/util/nvme_utils.py | grom72/daos | 88f57e0ab29222565dfdd1e23f2103f0ad2e0670 | [
"BSD-2-Clause-Patent"
] | 6,341 | 2016-11-24T12:34:26.000Z | 2022-03-31T23:53:46.000Z | src/tests/ftest/util/nvme_utils.py | grom72/daos | 88f57e0ab29222565dfdd1e23f2103f0ad2e0670 | [
"BSD-2-Clause-Patent"
] | 202 | 2016-10-30T14:47:53.000Z | 2022-03-30T21:29:11.000Z | #!/usr/bin/python
"""
(C) Copyright 2020-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
import threading
import re
import time
import queue
from command_utils_base import CommandFailure
from avocado.core.exceptions import TestFail
from ior_test_base import IorTestBase
from ior_utils impor... | 38.44863 | 80 | 0.610314 |
7959a20e63df9c85e85417113dce07a0abb8e256 | 3,527 | py | Python | goldy_smart_house/commands.py | THEGOLDENPRO/Goldy-Smart-House | 1745ed8f2aa60d77ba2031d2ee1a679bd771214b | [
"MIT"
] | null | null | null | goldy_smart_house/commands.py | THEGOLDENPRO/Goldy-Smart-House | 1745ed8f2aa60d77ba2031d2ee1a679bd771214b | [
"MIT"
] | null | null | null | goldy_smart_house/commands.py | THEGOLDENPRO/Goldy-Smart-House | 1745ed8f2aa60d77ba2031d2ee1a679bd771214b | [
"MIT"
] | null | null | null | import threading
import time
import goldy_smart_house
import datetime
MODULE_NAME = "COMMANDS"
class Command(object):
"""Formats a plain unformatted command in commands.txt into a command class object."""
def __init__(self, unformatted_command_string:str):
self.unformatted_command_string = unformatted... | 40.54023 | 133 | 0.624043 |
7959a2146cd1c016160d52d784d4c1863c85de25 | 2,350 | py | Python | applications/tensorflow/cnns/inference/data.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/inference/data.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/inference/data.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
from functools import partial
from typing import Callable, Tuple
import tensorflow as tf
def load_and_preprocess_data(img_path: str, img_width: int, img_height: int,
preprocess_fn: Callable, dtype: tf.DType) -> tf.Tensor:
"""Read and pre-process image.... | 35.606061 | 114 | 0.693617 |
7959a2489cd3ec4f82574827f0b93ce0f3c9b057 | 110 | py | Python | deepfryer/batcheffect/__init__.py | guigolab/DeepFryer | 83ddde69134c28a662735f153f568b247cb4d091 | [
"MIT"
] | 1 | 2018-06-18T02:15:50.000Z | 2018-06-18T02:15:50.000Z | deepfryer/batcheffect/__init__.py | guigolab/DeepFryer | 83ddde69134c28a662735f153f568b247cb4d091 | [
"MIT"
] | null | null | null | deepfryer/batcheffect/__init__.py | guigolab/DeepFryer | 83ddde69134c28a662735f153f568b247cb4d091 | [
"MIT"
] | 4 | 2018-09-25T18:36:14.000Z | 2020-01-04T12:47:31.000Z | from __future__ import absolute_import
from .covariate import *
from .plot import *
from .correction import * | 22 | 38 | 0.8 |
7959a558de61ee1b10e17473fe1a641baf340444 | 2,904 | py | Python | operator_api/ledger/integrity/transfer.py | liquidity-network/nocust-hub | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | [
"MIT"
] | 1 | 2021-08-04T06:09:46.000Z | 2021-08-04T06:09:46.000Z | operator_api/ledger/integrity/transfer.py | liquidity-network/nocust-hub | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | [
"MIT"
] | 8 | 2020-11-01T19:48:21.000Z | 2022-02-10T14:12:25.000Z | operator_api/ledger/integrity/transfer.py | liquidity-network/nocust-hub | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | [
"MIT"
] | 3 | 2020-11-01T15:59:56.000Z | 2021-09-16T07:18:18.000Z | # Transfer amount must be non-negative
non_negative_transfer_amount = \
"""
ALTER TABLE ledger_transfer DROP CONSTRAINT IF EXISTS non_negative_transfer_amount;
ALTER TABLE ledger_transfer ADD CONSTRAINT non_negative_transfer_amount CHECK ("amount" >= 0);
ALTER TABLE ledger_transfer VALIDATE CONSTRAINT non_negative_... | 39.243243 | 148 | 0.748623 |
7959a5a0dba989acbbd811ca68095455076c1ab1 | 2,115 | py | Python | fillplots/inequalities.py | wwwennie/miu_maps | f73398e731c1973b052c444afa0912ec48e335b3 | [
"MIT"
] | 3 | 2016-05-12T19:14:16.000Z | 2021-02-04T07:27:08.000Z | fillplots/inequalities.py | wwwennie/miu_maps | f73398e731c1973b052c444afa0912ec48e335b3 | [
"MIT"
] | 3 | 2015-05-20T17:29:05.000Z | 2021-02-04T07:29:29.000Z | fillplots/inequalities.py | wwwennie/miu_maps | f73398e731c1973b052c444afa0912ec48e335b3 | [
"MIT"
] | 4 | 2016-01-28T18:37:34.000Z | 2019-03-06T12:42:54.000Z | import numpy
from .core import Configurable
from .boundaries import (
BaseBoundary, YFunctionBoundary, XConstBoundary, to_boundary)
class BaseInequality(Configurable):
def __init__(self, baseconfig, data, less=False, domain=None):
super(BaseInequality, self).__init__(baseconfig)
bclass = sel... | 29.375 | 72 | 0.645863 |
7959a79d729b128b5250428f26f1bf0596015ff1 | 2,119 | py | Python | tests/test_cfpq.py | bozhnyukAlex/formal-lang-course | 07615803fc79afa2ab8e28e8aea1e0692631bb5a | [
"Apache-2.0"
] | null | null | null | tests/test_cfpq.py | bozhnyukAlex/formal-lang-course | 07615803fc79afa2ab8e28e8aea1e0692631bb5a | [
"Apache-2.0"
] | 2 | 2021-09-06T13:20:39.000Z | 2022-01-23T10:24:49.000Z | tests/test_cfpq.py | bozhnyukAlex/formal-lang-course | 07615803fc79afa2ab8e28e8aea1e0692631bb5a | [
"Apache-2.0"
] | null | null | null | from collections import namedtuple
from itertools import product
import pytest
from cfpq_data import labeled_cycle_graph
from pyformlang.cfg import CFG
from project import generate_two_cycles_graph, matrix_cfpq, hellings_cfpq, tensor_cfpq
Config = namedtuple("Config", ["start_var", "start_nodes", "final_nodes", "exp... | 27.881579 | 86 | 0.409627 |
7959a8d9690eacad079e0582c956e03248ff7f84 | 412 | py | Python | back/account/migrations/0004_auto_20200812_2314.py | LEEJ0NGWAN/FreeChart | 8769aea07079fe3a5af4aab701028e6aa9cb6598 | [
"MIT"
] | null | null | null | back/account/migrations/0004_auto_20200812_2314.py | LEEJ0NGWAN/FreeChart | 8769aea07079fe3a5af4aab701028e6aa9cb6598 | [
"MIT"
] | 6 | 2021-04-08T19:48:40.000Z | 2022-02-27T08:27:06.000Z | back/account/migrations/0004_auto_20200812_2314.py | LEEJ0NGWAN/FreeList | 8769aea07079fe3a5af4aab701028e6aa9cb6598 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-12 14:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0003_auto_20200709_1826'),
]
operations = [
migrations.AlterField(
model_name='user',
name='username',
... | 21.684211 | 76 | 0.61165 |
7959a912bc80695460dab70eb56a87cb92e5762a | 61 | py | Python | fable_py/__init__.py | dbrattli/Fable.Jupyter | 44e4f0d01889714db6d227f51aefe3308fbd00ed | [
"MIT"
] | 21 | 2021-01-18T02:12:46.000Z | 2021-10-21T08:57:59.000Z | fable_py/__init__.py | dbrattli/Fable.Jupyter | 44e4f0d01889714db6d227f51aefe3308fbd00ed | [
"MIT"
] | 1 | 2021-11-08T06:48:17.000Z | 2021-11-08T06:48:17.000Z | fable_py/__init__.py | fable-compiler/Fable.Jupyter | 54e1fe9160f9174148963f226abafaed03be3574 | [
"MIT"
] | 1 | 2021-07-30T01:26:38.000Z | 2021-07-30T01:26:38.000Z |
from .kernel import Fable
from .version import __version__
| 12.2 | 32 | 0.803279 |
7959a96c7d78c247d05de0c6019e9774e43e1e47 | 158 | py | Python | src/collective/solr/browser/interfaces.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | null | null | null | src/collective/solr/browser/interfaces.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | null | null | null | src/collective/solr/browser/interfaces.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | null | null | null | # -*- coding: utf-8 -*-
from zope.interface import Interface
class IThemeSpecific(Interface):
"""marker interface that defines a zope3 browser layer"""
| 22.571429 | 61 | 0.721519 |
7959a9de8f0bf74598997a60dc7e0b877a957a23 | 1,260 | py | Python | lib_analyza.py | SamuelAmrich/SpearPy | 7011644a9bf440d082bf12425b1ee146567304ec | [
"MIT"
] | null | null | null | lib_analyza.py | SamuelAmrich/SpearPy | 7011644a9bf440d082bf12425b1ee146567304ec | [
"MIT"
] | null | null | null | lib_analyza.py | SamuelAmrich/SpearPy | 7011644a9bf440d082bf12425b1ee146567304ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Analyza knižnica na prácu so signalom pre Kopija_Finder_6.0
import numpy as np
# from scipy import signal
def info():
print("Analyza knižnica na prácu so signalom pre Kopija_Finder_6.0 ")
# Znormovanie všetkých dát
def norm(zaznam):
zaznam_max = np.nanm... | 24.705882 | 82 | 0.649206 |
7959aae6929379ed7330e721956e6fbb587bc0f2 | 221 | py | Python | Online-Judges/HackerRank/Python/Python_If_Else.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/HackerRank/Python/Python_If_Else.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/HackerRank/Python/Python_If_Else.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
if __name__ == '__main__':
n = int(input().strip())
if n % 2 or 6 <= n <= 20:
print("Weird")
else:
print("Not Weird")
| 13.8125 | 29 | 0.570136 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.