hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8284aebf3ae9f77f45f4975c72fc2a4d68085f7 | 8,755 | py | Python | mitmproxy/flow.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/flow.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/flow.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | import asyncio
import time
import uuid
from typing import Any, ClassVar, Optional
from mitmproxy import connection
from mitmproxy import exceptions
from mitmproxy import stateobject
from mitmproxy import version
class Error(stateobject.StateObject):
"""
An Error.
This is distinct from an protocol error ... | 31.046099 | 132 | 0.63084 |
e82859e6a38e5de895884fb48e236536d2ced222 | 14,183 | py | Python | qfit_ligand/builders.py | stephaniewanko/qfit_ligand | 1429fff9c1b9d7bf7376ce2414b63ddb0345dd3e | [
"Artistic-2.0",
"MIT"
] | 5 | 2018-05-30T00:29:06.000Z | 2021-09-23T01:28:28.000Z | qfit_ligand/builders.py | stephaniewanko/qfit_ligand | 1429fff9c1b9d7bf7376ce2414b63ddb0345dd3e | [
"Artistic-2.0",
"MIT"
] | 1 | 2018-01-27T06:34:06.000Z | 2018-01-27T06:34:06.000Z | qfit_ligand/builders.py | stephaniewanko/qfit_ligand | 1429fff9c1b9d7bf7376ce2414b63ddb0345dd3e | [
"Artistic-2.0",
"MIT"
] | 3 | 2019-06-20T04:01:11.000Z | 2019-12-03T00:10:39.000Z | from __future__ import division
import itertools
import logging
logger = logging.getLogger(__name__)
import numpy as np
from .structure import Ligand, BondOrder
from .volume import Volume
from .samplers import GlobalRotator, Translator, BondRotator, RotationSets, ClashDetector
from .transformer import Transformer
fro... | 41.837758 | 95 | 0.580131 |
e828b152e43fa5979640aa1d0118469986d16c10 | 3,303 | py | Python | osarchiver/main.py | pcibot/osarchiver | 19f07ba7585c021f03f7928fc0b5614570db75a3 | [
"BSD-3-Clause"
] | 18 | 2019-06-06T09:37:18.000Z | 2022-01-12T12:17:10.000Z | osarchiver/main.py | pcibot/osarchiver | 19f07ba7585c021f03f7928fc0b5614570db75a3 | [
"BSD-3-Clause"
] | 8 | 2019-10-30T16:32:24.000Z | 2022-01-12T12:47:49.000Z | osarchiver/main.py | pcibot/osarchiver | 19f07ba7585c021f03f7928fc0b5614570db75a3 | [
"BSD-3-Clause"
] | 5 | 2019-06-06T12:27:07.000Z | 2022-03-08T19:04:09.000Z | # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Copyright 2019 The OSArchiver Authors. All rights reserved.
"""
main file providing osarchiver program
"""
import sys
import os
import logging
import argparse
import traceback
from osarchiver.config import Config
... | 31.759615 | 79 | 0.605813 |
e828d3f16bcaae319d5db70fd8a2149866270e9e | 709 | py | Python | advent_of_code/year_2021/day_06/day_06.py | mdu-alt/coding_challenges_python | 171876129b17b5eccd8dd20c7f5b61b3e0e6ef90 | [
"MIT"
] | null | null | null | advent_of_code/year_2021/day_06/day_06.py | mdu-alt/coding_challenges_python | 171876129b17b5eccd8dd20c7f5b61b3e0e6ef90 | [
"MIT"
] | null | null | null | advent_of_code/year_2021/day_06/day_06.py | mdu-alt/coding_challenges_python | 171876129b17b5eccd8dd20c7f5b61b3e0e6ef90 | [
"MIT"
] | null | null | null | from typing import List
import numpy as np
"""This module implements the 6th day of 2021 Advent Of Code: 'Lanternfish'
See https://adventofcode.com/2021/day/6"""
def main():
with open('example.txt') as f:
content = f.read().splitlines()
puzzle_input = (list(map(int, content[0].split(','))), int(co... | 22.870968 | 105 | 0.655853 |
e828df339677f8d617ab9d7de654373e3c342bab | 7,642 | py | Python | incasem/utils/n5_to_zarr.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/utils/n5_to_zarr.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/utils/n5_to_zarr.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | import logging
import os
import json
from fibsem_tools.io import read
import dask
import dask.array as da
from dask.distributed import Client
import zarr
from numcodecs import Zlib
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
def n5_to_zarr_raw(n5_path: str,
zarr_path: str... | 30.205534 | 95 | 0.53664 |
e828fef790db58c9e665c00fbb35b0605aa32d10 | 1,248 | py | Python | hs_core/management/commands/set_bag_dirty.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_core/management/commands/set_bag_dirty.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_core/management/commands/set_bag_dirty.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | """
Set resource(s) relevant AVUs to dirty so that resource xml files and resource bag
gets regenerated prior to download
"""
from django.core.management.base import BaseCommand
from hs_core.models import BaseResource
def set_resource_dirty(rid):
try:
resource = BaseResource.objects.get(short_id=rid)
... | 32.842105 | 87 | 0.664263 |
e82902375781307875898882103e71b292243d93 | 602 | py | Python | src/default.py | ludat/lueng | 87d7a47825af73238a44d7808aac4bfc4314d411 | [
"MIT"
] | null | null | null | src/default.py | ludat/lueng | 87d7a47825af73238a44d7808aac4bfc4314d411 | [
"MIT"
] | 2 | 2015-03-06T08:55:02.000Z | 2015-03-12T10:03:54.000Z | src/default.py | ludat/lueng | 87d7a47825af73238a44d7808aac4bfc4314d411 | [
"MIT"
] | null | null | null | {
'MAIN': {
'LOGGING_LEVEL': 10,
'OUTPUT_CMD': [
"dzen2",
"-ta", "r",
"-bg", "#161616",
"-fn", "Terminus:size=8",
"-w", "1300",
"-x", "500",
"-e", "",
"-dock"
]
},
'ENGINE': {
'LOG... | 18.8125 | 37 | 0.363787 |
e8290fbaf2520a2ec4d547d5b275b02390f7e500 | 1,034 | py | Python | api_server/routes/auth.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | api_server/routes/auth.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | 2 | 2020-07-19T15:36:35.000Z | 2022-02-02T20:30:16.000Z | api_server/routes/auth.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | import os, sys
from flask import request, jsonify
from flask_httpauth import HTTPBasicAuth
sys.path.append(os.path.abspath(os.getcwd()))
from api_server.utils.gets import set_user, get_user
from api_server.utils.LoginManager import LoginManager
from api_server.enviroment.enviroment import db
auth = HTTPBasicAuth()
... | 26.512821 | 80 | 0.755319 |
e82926795dcf8a117fc9892649638f6f91344089 | 549 | py | Python | tests/test_helpers.py | runfalk/Flask-Storm | ab615f9e9c769109e517b092c54cbe090decdb76 | [
"MIT"
] | 2 | 2018-10-30T03:07:23.000Z | 2019-06-22T21:46:12.000Z | tests/test_helpers.py | runfalk/Flask-Storm | ab615f9e9c769109e517b092c54cbe090decdb76 | [
"MIT"
] | 2 | 2019-12-05T17:51:40.000Z | 2021-05-24T06:50:58.000Z | tests/test_helpers.py | runfalk/Flask-Storm | ab615f9e9c769109e517b092c54cbe090decdb76 | [
"MIT"
] | 1 | 2019-12-03T21:57:34.000Z | 2019-12-03T21:57:34.000Z | import pytest
def remove_whitespace():
assert pytest.helpers.remove_whitespace("foo bar") == "foobar"
assert pytest.helpers.remove_whitespace("foo\t\tbar") == "foobar"
assert pytest.helpers.remove_whitespace("foo\n\nbar") == "foobar"
assert pytest.helpers.remove_whitespace("foo\r\rbar") == "foobar"
... | 36.6 | 71 | 0.712204 |
e8292d1eb3ee3251a4c10562fd2815c283314663 | 691 | py | Python | table_ocr/ocr_to_csv/__init__.py | sumit-kothari/image-table-ocr | f77c6854f82c621ed3ff6c004fdd17a2d10454bb | [
"MIT"
] | 245 | 2020-04-28T17:57:06.000Z | 2022-03-28T18:19:57.000Z | table_ocr/ocr_to_csv/__init__.py | nehcuh/image-table-ocr | 49205462a3fb68240fd6a3d441ae7cf979b43daa | [
"MIT"
] | 13 | 2020-04-28T13:37:55.000Z | 2022-03-20T19:48:37.000Z | table_ocr/ocr_to_csv/__init__.py | nehcuh/image-table-ocr | 49205462a3fb68240fd6a3d441ae7cf979b43daa | [
"MIT"
] | 66 | 2020-05-22T18:05:09.000Z | 2022-03-10T05:35:27.000Z | import csv
import io
import os
def text_files_to_csv(files):
"""Files must be sorted lexicographically
Filenames must be <row>-<colum>.txt.
000-000.txt
000-001.txt
001-000.txt
etc...
"""
rows = []
for f in files:
directory, filename = os.path.split(f)
with open(f) a... | 22.290323 | 65 | 0.586107 |
e8292f0fcb491263ad128b08754b9d2ea17f67ad | 1,440 | py | Python | cadnano/views/propertyview/abstractproppartitem.py | sherwoodyao/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 69 | 2015-01-13T02:54:40.000Z | 2022-03-27T14:25:51.000Z | cadnano/views/propertyview/abstractproppartitem.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 127 | 2015-01-01T06:26:34.000Z | 2022-03-02T12:48:05.000Z | cadnano/views/propertyview/abstractproppartitem.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 48 | 2015-01-22T19:57:49.000Z | 2022-03-27T14:27:53.000Z | # -*- coding: utf-8 -*-
from typing import Any
from cadnano.views.abstractitems import AbstractPartItem
from .cnpropertyitem import CNPropertyItem
from cadnano.cntypes import (
PartT
)
class AbstractPropertyPartSetItem(CNPropertyItem, AbstractPartItem):
"""Summary
"""
def __init__(self, **kwargs):
... | 26.181818 | 77 | 0.590278 |
e82932e8d67c886839dab323ab3f33b89021b293 | 1,808 | py | Python | online-demo/nrfu-snapshot.py | wasabi222/nanog77-nrfu-tutorial | 43d5cfe488c3a231f03f979b47c3e61b021f2936 | [
"Apache-2.0"
] | 33 | 2019-10-29T18:32:48.000Z | 2022-03-20T19:57:59.000Z | online-demo/nrfu-snapshot.py | wasabi222/nanog77-nrfu-tutorial | 43d5cfe488c3a231f03f979b47c3e61b021f2936 | [
"Apache-2.0"
] | null | null | null | online-demo/nrfu-snapshot.py | wasabi222/nanog77-nrfu-tutorial | 43d5cfe488c3a231f03f979b47c3e61b021f2936 | [
"Apache-2.0"
] | 12 | 2019-10-25T19:36:44.000Z | 2021-12-07T10:21:07.000Z | #!/usr/bin/env python
# Copyright 2019 Jeremy Schulman, nwkautomaniac@gmail.com
#
# 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
#
# U... | 25.828571 | 82 | 0.706305 |
e829496a3fed03537afc0d6a46f3a176f8438622 | 390 | py | Python | py/src/constants.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | 1 | 2020-12-11T12:18:03.000Z | 2020-12-11T12:18:03.000Z | py/src/constants.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | null | null | null | py/src/constants.py | bueler/stokes-implicit | e6f40798c9d441316d1b88a93b9103b8e6cb5e89 | [
"MIT"
] | null | null | null | # module for ice constants
# earth
secpera = 31556926.0
g = 9.81 # m s-2; constants in SI units
# ice
rho = 910.0 # density; kg m-3
n = 3.0 # warning: this value is needed for some parts
An = 1.0e-16/secpera # softness; EISMINT 1 value
# computed constants
Bn = An**(-1.0/n) ... | 24.375 | 68 | 0.561538 |
e8295de41cee957dda00eaa2a12abaeaaa8d618e | 3,058 | py | Python | rhucrl/environment/wrappers/adversarial_wrapper.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-19T11:46:48.000Z | 2021-11-19T11:46:48.000Z | rhucrl/environment/wrappers/adversarial_wrapper.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-22T07:48:03.000Z | 2021-11-22T07:48:03.000Z | rhucrl/environment/wrappers/adversarial_wrapper.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2022-03-26T10:18:01.000Z | 2022-03-26T10:18:01.000Z | """Base Class of an Adversarial Environments."""
from abc import ABCMeta, abstractmethod
import numpy as np
from gym import Wrapper
from gym.spaces import Box
class AdversarialWrapper(Wrapper, metaclass=ABCMeta):
r"""An adversarial environment wrapper.
This is an abstract wrapper that wraps a gym Env.
... | 34.359551 | 88 | 0.635056 |
e82962d7383d2819ed23cf6b40e339285bbf666f | 11,398 | py | Python | skcosmo/linear_model/_ridge.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 16 | 2020-12-07T23:27:11.000Z | 2021-12-17T22:28:33.000Z | skcosmo/linear_model/_ridge.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 74 | 2020-11-30T18:51:41.000Z | 2021-12-06T20:53:31.000Z | skcosmo/linear_model/_ridge.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 4 | 2020-10-15T15:01:00.000Z | 2020-11-06T16:21:53.000Z | import numpy as np
from joblib import (
Parallel,
delayed,
)
from sklearn.base import (
MultiOutputMixin,
RegressorMixin,
)
from sklearn.metrics import check_scoring
from sklearn.model_selection import KFold
class RidgeRegression2FoldCV(MultiOutputMixin, RegressorMixin):
r"""Ridge regression with ... | 42.529851 | 127 | 0.626777 |
e82972abca09ed1a7e83ca33a38e7d775f2851b0 | 5,263 | py | Python | cli/waiter/data_format.py | mokshjawa/waiter | 129d0282e26a2d09dda38a79335c7d7120a1530a | [
"Apache-2.0"
] | null | null | null | cli/waiter/data_format.py | mokshjawa/waiter | 129d0282e26a2d09dda38a79335c7d7120a1530a | [
"Apache-2.0"
] | null | null | null | cli/waiter/data_format.py | mokshjawa/waiter | 129d0282e26a2d09dda38a79335c7d7120a1530a | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
import sys
import yaml
class DataFormat:
def __str__(self):
"""Returns the name of the format in upper case."""
return self.name().upper()
def name(self):
"""Returns the name of the format."""
raise NotImplementedError('Method has not been... | 30.247126 | 100 | 0.641459 |
e8299cf4d04c1a004f3afa074f0deceb355ecc7b | 2,762 | py | Python | autotest/gdrivers/fit.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/gdrivers/fit.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/gdrivers/fit.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test read functionality for FIT driver.
# Author: Even Rouault <even dot rouault @ mines-paris dot org>
#
########################################################... | 34.962025 | 101 | 0.609703 |
e829ac5f4bdf6c0d26b678220958c9afed4109ca | 677 | py | Python | ros2_ws/src/algorithms/utils/odom_noiser/setup.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | null | null | null | ros2_ws/src/algorithms/utils/odom_noiser/setup.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | 2 | 2021-07-05T14:50:09.000Z | 2021-09-14T15:21:11.000Z | ros2_ws/src/algorithms/utils/odom_noiser/setup.py | FastSense/metalbot | 063c897a16129d9aa88c2c7c52bdf6547af894e4 | [
"MIT"
] | null | null | null | from setuptools import setup
package_name = 'odom_noiser'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
ins... | 25.074074 | 53 | 0.629247 |
e829c6379e31ccb07b572f41b58ed0da13213d6c | 49,635 | py | Python | libs/dataset_utils.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | libs/dataset_utils.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | 20 | 2019-07-15T21:49:29.000Z | 2020-01-09T14:35:03.000Z | libs/dataset_utils.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | import os
import math
import warnings
import torch
import torch.nn as nn
import numpy as np
import pandas as pd
import shutil as sh
from glob import glob
from PIL import Image
from copy import copy
from tqdm ... | 38.716849 | 129 | 0.649481 |
e829f5dd69c455c3e00f104966e0634d02cc8b69 | 286 | py | Python | database/task_class/k.py | cozy9/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 2 | 2021-08-01T19:33:44.000Z | 2022-02-14T16:37:34.000Z | database/task_class/k.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | null | null | null | database/task_class/k.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 1 | 2019-05-22T12:44:34.000Z | 2019-05-22T12:44:34.000Z | #!/usr/bin/env python
from os import sys, path
p1 = path.join(path.dirname(path.abspath(__file__)),'../mylib')
print p1
sys.path.insert(0, p1)
import pandas as pd
import util
import db
import urllib
con=db.get_con('GENEGO')
t = db.from_sql('select 1 from dual')
print t
| 19.066667 | 64 | 0.692308 |
e82a0f6906c846b1ed2fb89e2b93da1dd4b80d40 | 488 | py | Python | pyUnderLX/consts.py | dpjrodrigues/pyUnderLX | 3d60e29bb2c2a9435c8086a8f532e57a5e9589e4 | [
"MIT"
] | null | null | null | pyUnderLX/consts.py | dpjrodrigues/pyUnderLX | 3d60e29bb2c2a9435c8086a8f532e57a5e9589e4 | [
"MIT"
] | null | null | null | pyUnderLX/consts.py | dpjrodrigues/pyUnderLX | 3d60e29bb2c2a9435c8086a8f532e57a5e9589e4 | [
"MIT"
] | null | null | null | API_ONGOING = "https://api.perturbacoes.tny.im/v1/disturbances?filter=ongoing&omitduplicatestatus=true"
#API_ONGOING = "https://api.perturbacoes.tny.im/v1/disturbances?start=2018-11-22T15:00:00%2B00:00&end=2018-11-22T18:00:00%2B00:00&omitduplicatestatus=true"
API_BASELINE = "https://api.perturbacoes.tny.im/v1/disturban... | 48.8 | 155 | 0.727459 |
e82a3afcdd103c1fbe0c16cc17d6b4b667c19641 | 5,831 | py | Python | stellar_base/transaction_envelope.py | jimbobhickville/py-stellar-base | 5d989d7b49dbb39f13d58adf3955121e84e28858 | [
"Apache-2.0"
] | null | null | null | stellar_base/transaction_envelope.py | jimbobhickville/py-stellar-base | 5d989d7b49dbb39f13d58adf3955121e84e28858 | [
"Apache-2.0"
] | 4 | 2021-12-13T13:30:36.000Z | 2021-12-13T13:31:35.000Z | stellar_base/transaction_envelope.py | jimbobhickville/py-stellar-base | 5d989d7b49dbb39f13d58adf3955121e84e28858 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import base64
from .keypair import Keypair
from .network import Network, NETWORKS
from .stellarxdr import Xdr
from .transaction import Transaction
from .utils import hashX_sign_decorated, xdr_hash
from .exceptions import SignatureExistError, PreimageLengthError
class TransactionEnvelope(object):
... | 36.217391 | 79 | 0.656663 |
e82a587092decddf158ee0a926ccf207e2e2cc91 | 3,794 | py | Python | scripts/utils/easings.py | Tollanador/alias-free-gan | da7035f478fb396150a3de5c1bd9454aa0778512 | [
"MIT"
] | 59 | 2021-07-29T13:53:00.000Z | 2022-03-26T13:51:46.000Z | scripts/utils/easings.py | Tollanador/alias-free-gan | da7035f478fb396150a3de5c1bd9454aa0778512 | [
"MIT"
] | 18 | 2021-07-29T07:07:17.000Z | 2021-11-11T06:00:13.000Z | scripts/utils/easings.py | Tollanador/alias-free-gan | da7035f478fb396150a3de5c1bd9454aa0778512 | [
"MIT"
] | 8 | 2021-08-02T20:47:11.000Z | 2022-02-17T01:09:03.000Z | # ported from https://easings.net/
import math
def linear(x: float) -> float:
return x
def easeInSine(x: float) -> float:
return 1 - math.cos((x * math.pi) / 2)
def easeOutSine(x: float) -> float:
return math.sin((x * math.pi) / 2)
def easeInOutSine(x: float) -> float:
return -(math.cos(math.pi * ... | 20.73224 | 76 | 0.48893 |
e82a5fa343ac870efe692bddd8f9970792f71b7c | 2,476 | py | Python | py/0547.number-of-provinces.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0547.number-of-provinces.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0547.number-of-provinces.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=547 lang=python3
#
# [547] Number of Provinces
#
# https://leetcode.com/problems/number-of-provinces/description/
#
# algorithms
# Medium (62.44%)
# Likes: 4478
# Dislikes: 218
# Total Accepted: 398.6K
# Total Submissions: 638.2K
# Testcase Example: '[[1,1,0],[1,1,0],[0,0,1]]'
#
# There a... | 26.340426 | 85 | 0.553312 |
e82a630ede555051f1ebecff4698175ee4b0906b | 1,868 | py | Python | augly/utils/asserts.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/utils/asserts.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/utils/asserts.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
import os
from typing import Tuple
import magic
from augly.utils.io import pathmgr
def is_content_type(filename: str, content_type: str) -> bool:
file_type = magic.from_file(filename, mime=True).lower()
return content_type in file_typ... | 29.1875 | 77 | 0.730728 |
e82a6b4113b0da80f6c824c471f77aa0f8e0ba37 | 2,396 | py | Python | showroompodcast/showroom_archiver.py | road-master/showroom-podcast | 71221b361cabd40e70aa4e8710292b20398e0ab5 | [
"MIT"
] | null | null | null | showroompodcast/showroom_archiver.py | road-master/showroom-podcast | 71221b361cabd40e70aa4e8710292b20398e0ab5 | [
"MIT"
] | 1 | 2021-08-22T07:35:13.000Z | 2021-08-22T07:35:13.000Z | showroompodcast/showroom_archiver.py | road-master/showroom-podcast | 71221b361cabd40e70aa4e8710292b20398e0ab5 | [
"MIT"
] | null | null | null | """SHOWROOM archiver."""
import asyncio
import os
from logging import getLogger
from threading import Lock
from asyncffmpeg import FFmpegCoroutineFactory
from asyncffmpeg.exceptions import FFmpegProcessError
from asyncffmpeg.ffmpeg_coroutine import FFmpegCoroutine
from showroompodcast.exceptions import MaxRetriesExce... | 32.821918 | 114 | 0.699917 |
e82a6e33b049f9afb884d8b5d44ad843ffe1ad5f | 3,484 | py | Python | atom/property.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | null | null | null | atom/property.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | 1 | 2020-12-04T10:11:07.000Z | 2020-12-04T10:13:46.000Z | atom/property.py | enthought/atom | 1f194e3550d62c4ca1d79521dff97531ffe3f0ac | [
"BSD-3-Clause"
] | 1 | 2020-12-04T10:05:32.000Z | 2020-12-04T10:05:32.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2013, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
from .catom import Member, MemberChange, null
# XXX move this class to C++
class CachedProperty... | 32.867925 | 79 | 0.547359 |
e82a954a2e596ba5780bd129b7973bc2206744a0 | 43,095 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.427835 | 203 | 0.655389 |
e82aace0993c89467c79e449959438c87eae746d | 20,420 | py | Python | camugo_aws_clients/clients/s3_cl.py | move13-camugo/aws_clients | dc33ee41a8a449ee9998b5172e545e83c6705cf4 | [
"Apache-2.0"
] | null | null | null | camugo_aws_clients/clients/s3_cl.py | move13-camugo/aws_clients | dc33ee41a8a449ee9998b5172e545e83c6705cf4 | [
"Apache-2.0"
] | null | null | null | camugo_aws_clients/clients/s3_cl.py | move13-camugo/aws_clients | dc33ee41a8a449ee9998b5172e545e83c6705cf4 | [
"Apache-2.0"
] | null | null | null | import boto3
from boto3.s3.transfer import TransferConfig
from botocore.exceptions import ClientError
import os
import fnmatch
import re
import logging
import io
client_error = ClientError
class S3BucketManager(object):
"""
Class BucketManager that uses the aws s3 api with boto3 to
manage an s3 Bucket.... | 36.141593 | 131 | 0.556072 |
e82ae7077e1cb9b80ea2d670d134397b08a7bb9b | 3,588 | py | Python | moto/rds2/exceptions.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | moto/rds2/exceptions.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:15:51.000Z | 2021-12-13T20:50:52.000Z | moto/rds2/exceptions.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | from __future__ import unicode_literals
from jinja2 import Template
from werkzeug.exceptions import BadRequest
class RDSClientError(BadRequest):
def __init__(self, code, message):
super(RDSClientError, self).__init__()
template = Template("""
<RDSClientError>
<Error>
... | 34.834951 | 156 | 0.702341 |
e82b0708742eac5b0efe81af91e673accb43f560 | 26,380 | py | Python | vgio/_core/__init__.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2017-11-30T22:13:50.000Z | 2019-12-19T17:56:40.000Z | vgio/_core/__init__.py | joshuaskelly/vgio | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2019-08-11T05:07:26.000Z | 2020-12-30T16:07:04.000Z | vgio/_core/__init__.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 4 | 2018-06-24T14:04:36.000Z | 2019-05-14T06:01:51.000Z | """The _core module provides several base classes for creating binary
serialization classes.
Note:
These classes must be subclassed as the don't do anything useful on
their own.
"""
import io
import os
import shutil
import stat
try:
import threading
except ImportError:
import dummy_threading as thre... | 29.673791 | 99 | 0.581084 |
e82b1c7657c7033fc527543c736a9e3d229f2300 | 346 | py | Python | cli.py | d4interactive/pinterest-api | de368ddd09e811a47359b3cfb3e5010f52d490d0 | [
"MIT"
] | 3 | 2018-08-23T11:55:17.000Z | 2018-09-08T08:46:51.000Z | cli.py | d4interactive/pinterest-api | de368ddd09e811a47359b3cfb3e5010f52d490d0 | [
"MIT"
] | null | null | null | cli.py | d4interactive/pinterest-api | de368ddd09e811a47359b3cfb3e5010f52d490d0 | [
"MIT"
] | null | null | null | from pin_py.pinterest.pinpy import PinPy
from pin_py.utils.config import access_token
if __name__ == "__main__":
pin = PinPy()
pins_list = pin.get_details_of_all_pins(access_token)
boards = pin.get_all_boards_of_user(access_token)
pass
for pin_one in pins_list:
print(pin.get_single_pin_deta... | 34.6 | 63 | 0.763006 |
e82b3777a91b06fab86932f9a9c250cbda07f3cf | 2,898 | py | Python | frenchFrequency.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 3 | 2015-01-06T22:00:22.000Z | 2016-08-14T08:07:32.000Z | frenchFrequency.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 56 | 2015-07-12T10:21:38.000Z | 2020-02-23T18:51:01.000Z | frenchFrequency.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 2 | 2015-01-06T21:25:06.000Z | 2018-01-17T12:03:17.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# missing French words, based on the frequency list from http://corpus.leeds.ac.uk/frqc/internet-fr.num
import codecs
import pywikibot
import datetime
import re
import config
import urllib.request, urllib.error, urllib.parse
from klasa import *
def main():
site = pywikib... | 37.636364 | 408 | 0.523119 |
e82b3b80080f114e2a317cdcf56b75052d2e3fa7 | 322 | py | Python | setup.py | simonemmott/python-k2 | 8c288b9afce7bb917befcfa3339035ba5ba70e6b | [
"MIT"
] | null | null | null | setup.py | simonemmott/python-k2 | 8c288b9afce7bb917befcfa3339035ba5ba70e6b | [
"MIT"
] | null | null | null | setup.py | simonemmott/python-k2 | 8c288b9afce7bb917befcfa3339035ba5ba70e6b | [
"MIT"
] | null | null | null | '''
Created on 30 Jan 2019
@author: simon
'''
from setuptools import setup, find_packages
setup(
name='k2',
version='0.0.16',
packages=find_packages(),
include_package_data=True,
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
k2=k2.cli:k2
''',... | 16.1 | 43 | 0.593168 |
e82b60e591aa8c0a64bb876790e9176adfa16308 | 7,770 | py | Python | models/cite/FastText/model.py | DeepWTO/deepwto-draft | c61dc02e4ce3e72e8423c712ddc5483f851443f5 | [
"Apache-2.0"
] | 34 | 2019-02-04T14:57:08.000Z | 2022-02-07T13:32:35.000Z | models/cite/FastText/model.py | syyunn/DeepWTO | 0e9f206ec2ce24b1afdf895bc81509dd84235b82 | [
"Apache-2.0"
] | 3 | 2020-03-02T05:06:24.000Z | 2020-03-06T08:39:18.000Z | models/cite/FastText/model.py | DeepWTO/deepwto-draft | c61dc02e4ce3e72e8423c712ddc5483f851443f5 | [
"Apache-2.0"
] | 4 | 2020-02-17T04:17:12.000Z | 2022-02-07T14:27:01.000Z | # This code is referenced from https://github.com/RandolphVI
# -*- coding:utf-8 -*-
__author__ = 'Randolph'
import tensorflow as tf
class TextFAST(object):
"""A FASTTEXT for text classification."""
def __init__(self,
sequence_length,
num_classes,
vocab_... | 41.550802 | 79 | 0.442085 |
e82b6cb229cc79ce7a3fbe2486932868526e6592 | 306 | py | Python | hackerrank_algorithm_path/Warmup/very_big_sum.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | hackerrank_algorithm_path/Warmup/very_big_sum.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | hackerrank_algorithm_path/Warmup/very_big_sum.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | #https://www.hackerrank.com/challenges/a-very-big-sum
#!/bin/python3
import sys
def aVeryBigSum(n, ar):
# Complete this function
c = 0
for i in ar:
c = c+i
return c
n = int(input().strip())
ar = list(map(int, input().strip().split(' ')))
result = aVeryBigSum(n, ar)
print(result)
| 19.125 | 53 | 0.620915 |
e82b72bc714344c6afd6d1d182bf0d91b5e69b02 | 7,790 | py | Python | experiments/sasha/testing/vqvae/vqvae-state.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/sasha/testing/vqvae/vqvae-state.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/sasha/testing/vqvae/vqvae-state.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 36.919431 | 138 | 0.582285 |
e82b784b06dd27849ffd2ec82d40f9ba51221d46 | 8,762 | py | Python | cogs/markov.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | null | null | null | cogs/markov.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | null | null | null | cogs/markov.py | etcadinfinitum/CSSBot_Py | 553d2110240e7d643fcaa9f202532ce2bfd77187 | [
"MIT"
] | null | null | null | """
Commands for mocking user's speech using markov chains
"""
import discord
from discord.ext import commands
import sqlite3
import configparser
import datetime
import numpy as np
import random
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# trust me, this contains a zero-width ... | 35.188755 | 176 | 0.593244 |
e82c15ee51bfc8f2e11fe65104b615d736451294 | 1,399 | py | Python | sunpy/io/special/asdf/tags/tests/test_genericmap.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-01-03T16:39:28.000Z | 2020-04-24T15:12:08.000Z | sunpy/io/special/asdf/tags/tests/test_genericmap.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2019-08-13T15:29:13.000Z | 2019-08-13T15:29:13.000Z | sunpy/io/special/asdf/tags/tests/test_genericmap.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 6 | 2017-03-15T07:17:05.000Z | 2020-09-30T18:36:49.000Z | """
isort:skip_file.
"""
# flake8: noqa: E402
import platform
from distutils.version import LooseVersion
import numpy as np
import pytest
import astropy.units as u
asdf = pytest.importorskip('asdf', '2.0')
from asdf.tests.helpers import assert_roundtrip_tree
import sunpy.map
from sunpy.data.test import get_test_file... | 24.54386 | 76 | 0.765547 |
e82c54991a38ad18c18ec94a773007addf4c26cd | 5,416 | py | Python | util.py | nlpcl-lab/argument-reasoning-comprehension | 3b76d990b783f06212abec4640d2734eafc5df14 | [
"Apache-2.0"
] | null | null | null | util.py | nlpcl-lab/argument-reasoning-comprehension | 3b76d990b783f06212abec4640d2734eafc5df14 | [
"Apache-2.0"
] | null | null | null | util.py | nlpcl-lab/argument-reasoning-comprehension | 3b76d990b783f06212abec4640d2734eafc5df14 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import codecs
import tensorflow as tf
class Vocab():
def __init__(self, path='data/vocab.txt'):
self.word2id, self.id2word = {}, {}
self.vocabpath = path
self.read_voca()
def read_voca(self):
assert os.path.exists(self.vocabpath)
with open(s... | 36.348993 | 102 | 0.661743 |
e82d107fcf5d4836a710f0f299ec1298bc36e51b | 4,886 | py | Python | AlphaZero_Gomoku-master/policy_value_net_keras.py | Dancy679/- | 3d4c507cace8df7c566fce080d7ba4bf8838b4ba | [
"MIT"
] | null | null | null | AlphaZero_Gomoku-master/policy_value_net_keras.py | Dancy679/- | 3d4c507cace8df7c566fce080d7ba4bf8838b4ba | [
"MIT"
] | 2 | 2019-01-11T10:47:50.000Z | 2019-01-12T02:00:30.000Z | AlphaZero_Gomoku-master/policy_value_net_keras.py | Dancy679/- | 3d4c507cace8df7c566fce080d7ba4bf8838b4ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
An implementation of the policyValueNet with Keras
Tested under Keras 2.0.5 with tensorflow-gpu 1.2.1 as backend
@author: 某科学的软工小队
"""
from __future__ import print_function
from keras.engine.topology import Input
from keras.engine.training import Model
from keras.layers.convolutional imp... | 43.625 | 169 | 0.679288 |
e82d1f6f987633946644d4d748da9a2254b5b363 | 11,727 | py | Python | catalyst/utils/data.py | ivbelkin/catalyst | 468348d0a9a2c2e34e6e3550adf67275e96ce13d | [
"MIT"
] | null | null | null | catalyst/utils/data.py | ivbelkin/catalyst | 468348d0a9a2c2e34e6e3550adf67275e96ce13d | [
"MIT"
] | null | null | null | catalyst/utils/data.py | ivbelkin/catalyst | 468348d0a9a2c2e34e6e3550adf67275e96ce13d | [
"MIT"
] | null | null | null | from typing import Callable, Tuple, Dict
import os
import glob
import itertools
import numpy as np
import pandas as pd
from collections import defaultdict
from sklearn.utils import shuffle
from sklearn.model_selection import StratifiedKFold
from sklearn.model_selection import train_test_split
DictDataset = Dict[str,... | 31.780488 | 78 | 0.607572 |
e82d37a562962a9452801afe4e1b1c33a8caa114 | 508 | py | Python | aula6/aula6.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | aula6/aula6.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | aula6/aula6.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | # 2
# Mercado tech ----
# Solicitar nome do funcionario
# solicitar idade
# informar se o funcionario pode adquirir produtos alcoolicos
#3
# Cadastro produtos mercado tech
# solicitar o nome do produto
# Solicitar a categoria do produto (alcoolicos e não alcoolicos)
# Exibir o produto cadastrado
print('Mercado Tech')... | 20.32 | 64 | 0.716535 |
e82d422ef2d10ead6ac9b16d4b819e3a8b84a954 | 14,550 | py | Python | core/python/spirit/parameters/llg.py | bck2302000/spirit | 14ed7782bd23f4828bf23ab8136ae31a21037bb3 | [
"MIT"
] | 92 | 2016-10-02T16:17:27.000Z | 2022-02-22T11:23:49.000Z | core/python/spirit/parameters/llg.py | bck2302000/spirit | 14ed7782bd23f4828bf23ab8136ae31a21037bb3 | [
"MIT"
] | 590 | 2016-09-24T12:46:36.000Z | 2022-03-24T18:27:18.000Z | core/python/spirit/parameters/llg.py | bck2302000/spirit | 14ed7782bd23f4828bf23ab8136ae31a21037bb3 | [
"MIT"
] | 46 | 2016-09-26T07:20:17.000Z | 2022-02-17T19:55:17.000Z | """
Landau-Lifshitz-Gilbert (LLG)
-------------------------------------------------------------
"""
import spirit.spiritlib as spiritlib
from spirit.io import FILEFORMAT_OVF_TEXT
import ctypes
### Load Library
_spirit = spiritlib.load_spirit_library()
### ---------------------------------- Set ----------------------... | 56.614786 | 154 | 0.696151 |
e82d4dd64c5f79914c801713e64c6a87ba7f199c | 2,893 | py | Python | builder/mypy_boto3_builder/main.py | jbpratt78/mypy_boto3 | c1cfc39aa5643ca149dd6a4b16124826fcc28fa0 | [
"MIT"
] | null | null | null | builder/mypy_boto3_builder/main.py | jbpratt78/mypy_boto3 | c1cfc39aa5643ca149dd6a4b16124826fcc28fa0 | [
"MIT"
] | null | null | null | builder/mypy_boto3_builder/main.py | jbpratt78/mypy_boto3 | c1cfc39aa5643ca149dd6a4b16124826fcc28fa0 | [
"MIT"
] | null | null | null | """
Main entrypoint for builder.
"""
from typing import List
from boto3 import __version__ as boto3_version
from boto3.session import Session
from mypy_boto3_builder.writers.processors import (
process_boto3_stubs,
process_master,
process_service,
)
from mypy_boto3_builder.version import __version__ as ve... | 32.875 | 98 | 0.709298 |
e82d56827738c88954bf9afc3b4fedbbdedda21b | 1,379 | py | Python | neural_models.py | kkeya1/FCPH | 49ba2f925f81e3fdbe22558961568d809ec5bb83 | [
"Apache-2.0"
] | null | null | null | neural_models.py | kkeya1/FCPH | 49ba2f925f81e3fdbe22558961568d809ec5bb83 | [
"Apache-2.0"
] | null | null | null | neural_models.py | kkeya1/FCPH | 49ba2f925f81e3fdbe22558961568d809ec5bb83 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 27 02:03:17 2020
@author: Kamrun Naher Keya
"""
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
#%% Loss function is the neg log partial likelihood
class negLogLikelihood(nn.Module):
# Source: deepSurv i... | 37.27027 | 118 | 0.681653 |
e82d6de5ea970a3e979110a7ede01f10f6880d34 | 2,356 | py | Python | cm/app/api_v1/my_calculation_module_directory/CM/helper_functions/helper.py | HotMaps/renovation_effect | 469a01b4cc805256768d884a3a2ae4560770b734 | [
"Apache-2.0"
] | 1 | 2021-05-11T06:41:04.000Z | 2021-05-11T06:41:04.000Z | cm/app/api_v1/my_calculation_module_directory/CM/helper_functions/helper.py | mayr-ethink/renovation_effect | 5b1fb81102b3c6ee531b719d8136ed9a343c2598 | [
"Apache-2.0"
] | 2 | 2020-06-04T20:19:36.000Z | 2020-06-04T20:19:36.000Z | cm/app/api_v1/my_calculation_module_directory/CM/helper_functions/helper.py | mayr-ethink/renovation_effect | 5b1fb81102b3c6ee531b719d8136ed9a343c2598 | [
"Apache-2.0"
] | null | null | null | import uuid
import ast
import json
import zipfile
import os
import shutil
from zipfile import ZipFile
from os import path
import zipfile
def generate_output_file_tif(output_directory):
return generate_output_file_with_extension(output_directory,'.tif')
def generate_output_file_zip(output_directory):
return g... | 26.47191 | 96 | 0.697793 |
e82d79cc733bf19167e4102d8dfef08756037108 | 3,741 | py | Python | cogs/welcome.py | fourjr/kairostimebot | b0276b04dcc35e2391f26f6bfbdcc18df37a3690 | [
"MIT"
] | null | null | null | cogs/welcome.py | fourjr/kairostimebot | b0276b04dcc35e2391f26f6bfbdcc18df37a3690 | [
"MIT"
] | null | null | null | cogs/welcome.py | fourjr/kairostimebot | b0276b04dcc35e2391f26f6bfbdcc18df37a3690 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import asyncio
class welcome():
def __init__(self, bot):
self.bot = bot
async def on_member_join(self, member):
try:
await member.send(
'''Welcome to Kairos Kingdom!
You can only chat in a few channels... | 62.35 | 318 | 0.665063 |
e82db0f81226f961f7e51c985bf2a23a0508db80 | 1,414 | py | Python | Farmacia/apps/users/views.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:05:20.000Z | 2020-05-28T23:19:23.000Z | Farmacia/apps/users/views.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | null | null | null | Farmacia/apps/users/views.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:12:17.000Z | 2019-11-21T18:34:26.000Z | from django.shortcuts import render, redirect
from django.contrib.auth import logout
from .forms import UserRegisterForm, LoginForm
from .models import User
from .functions import LogIn
from braces.views import LoginRequiredMixin
from django.views.generic import TemplateView
class Home(LoginRequiredMixin, TemplateVie... | 31.422222 | 79 | 0.74116 |
e82de9a1d50925b8457490f9246b3d36b4665c55 | 1,007 | py | Python | rlkit/envs/half_cheetah.py | lujiayou123/Off-Policy-Meta-Reinforcement-Learning-via-Unsupervised-Domain-Translation | af4c8e96af77cbe84517ce79886a40618b94a56c | [
"MIT"
] | null | null | null | rlkit/envs/half_cheetah.py | lujiayou123/Off-Policy-Meta-Reinforcement-Learning-via-Unsupervised-Domain-Translation | af4c8e96af77cbe84517ce79886a40618b94a56c | [
"MIT"
] | null | null | null | rlkit/envs/half_cheetah.py | lujiayou123/Off-Policy-Meta-Reinforcement-Learning-via-Unsupervised-Domain-Translation | af4c8e96af77cbe84517ce79886a40618b94a56c | [
"MIT"
] | 2 | 2022-01-21T07:49:27.000Z | 2022-02-05T13:23:18.000Z | import numpy as np
from gym.envs.mujoco import HalfCheetahEnv as HalfCheetahEnv_
class HalfCheetahEnv(HalfCheetahEnv_):
def _get_obs(self):
return np.concatenate([
self.sim.data.qpos.flat[1:],
self.sim.data.qvel.flat,
self.get_body_com("torso").flat,
]).astype(np... | 32.483871 | 77 | 0.606753 |
e82e144d2e4917b5e3c23efeb86469bdb2bf08fc | 2,137 | py | Python | appengine/predator/app/backend/handlers/test/rerun_analysis_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/app/backend/handlers/test/rerun_analysis_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/app/backend/handlers/test/rerun_analysis_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 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.
from datetime import datetime
import mock
import webapp2
from google.appengine.api import users
from google.appengine.ext import ndb
from analysis.type_enu... | 41.096154 | 77 | 0.77445 |
e82e31e0023a205cef84f3fb0f078d1f29dfe066 | 5,689 | py | Python | CH9-DGCNN/dgcnn/models/dgcnn.py | HopeCollector/SLAMResearch | 747f26a68c072af00567f8009083fd46550fc56b | [
"MIT"
] | 2 | 2021-01-14T07:53:30.000Z | 2021-01-14T07:58:04.000Z | CH9-DGCNN/dgcnn/models/dgcnn.py | HopeCollector/SLAMResearch | 747f26a68c072af00567f8009083fd46550fc56b | [
"MIT"
] | null | null | null | CH9-DGCNN/dgcnn/models/dgcnn.py | HopeCollector/SLAMResearch | 747f26a68c072af00567f8009083fd46550fc56b | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import tensorflow as tf
import numpy as np
import math
import sys
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(BASE_DIR, '../utils'))
sys.path.append(os.path.join(BASE_DIR, '../../utils'))
import tf_util
from transform_net... | 34.689024 | 96 | 0.656882 |
e82e370d7bc21e3d15bec59adf38715ff0cdde63 | 11,096 | py | Python | datadog/api/api_client.py | charettes/datadogpy | 48edfc24f2f8fa3ca113fb145fa89ec5003e5061 | [
"BSD-3-Clause"
] | null | null | null | datadog/api/api_client.py | charettes/datadogpy | 48edfc24f2f8fa3ca113fb145fa89ec5003e5061 | [
"BSD-3-Clause"
] | null | null | null | datadog/api/api_client.py | charettes/datadogpy | 48edfc24f2f8fa3ca113fb145fa89ec5003e5061 | [
"BSD-3-Clause"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2015-Present Datadog, Inc
# stdlib
import json
import logging
import time
import zlib
# datadog
from datadog.api... | 37.741497 | 118 | 0.583003 |
e82e52751ab429ec25ab1ea85963bcfb8ec8ccac | 3,902 | py | Python | FEBDAQMULTx2/data_analysis/6_rate_and_threshold/compare_dark_rate_vs_threshold.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/6_rate_and_threshold/compare_dark_rate_vs_threshold.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/6_rate_and_threshold/compare_dark_rate_vs_threshold.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
This script is an extension to the "dark_rate_vs_threshold.py" script.
It takes in two sets of dark rate vs. threshold measurements and plots them on the same figure.
'''
import argparse
import glob
import matplotlib.pyplot as plt
import os
import uproot
def easy_savefig(plt, outfpn=None):
... | 37.883495 | 145 | 0.643772 |
e82e5411f4eaf95ad7ab49b1f0cbf41c0dcf947f | 4,987 | py | Python | environments/runner_por_cb.py | dhfromkorea/contextual-bandit-recommender | 60dd39cbd97c2a7dd1a84618f3ab603e763662e1 | [
"MIT"
] | 6 | 2019-11-02T17:17:56.000Z | 2022-03-18T16:09:13.000Z | environments/runner_por_cb.py | dhfromkorea/contextual-bandit-recommender | 60dd39cbd97c2a7dd1a84618f3ab603e763662e1 | [
"MIT"
] | 3 | 2021-03-19T02:28:58.000Z | 2022-01-13T01:27:46.000Z | environments/runner_por_cb.py | dhfromkorea/contextual-bandit-recommender | 60dd39cbd97c2a7dd1a84618f3ab603e763662e1 | [
"MIT"
] | 1 | 2020-10-16T09:46:02.000Z | 2020-10-16T09:46:02.000Z | """
Runner for portially observable reward CB problems.
Currently only supports shared contetxtual policies.
"""
import os
import numpy as np
import pandas as pd
import torch
from datautils.news.sample_data import sample_user_event
from datautils.bandit_data import BanditData
from models.context_free_policy import ... | 28.497143 | 104 | 0.574494 |
e82e69b7d7b8dd5ecda8e67bf319a75ea1fe68be | 3,697 | py | Python | yardstick/benchmark/scenarios/availability/serviceha.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/serviceha.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/serviceha.py | rbbratta/yardstick | 7d1ffcd8eb41e9e4a09ed469b00ae4cbf2715529 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd. and others
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, ... | 29.110236 | 78 | 0.600757 |
e82e7e36a79002bcb5921defa1e122a0876ce20f | 5,643 | py | Python | tools/tests/test_css_parser.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | tools/tests/test_css_parser.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | tools/tests/test_css_parser.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from typing import cast
import sys
import unittest
try:
from tools.lib.css_parser import (
CssParserException,
CssSection,
parse,
)
except ImportError:
print('ERROR!!! You need to run this via tools/test-... | 29.544503 | 131 | 0.538366 |
e82e87e81fe8dd71588c1f163ab1f6b8f2dd80d8 | 430 | py | Python | src/FunctionApps/python/tests/config/config_test.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 3 | 2022-02-24T18:16:39.000Z | 2022-03-29T20:21:41.000Z | src/FunctionApps/python/tests/config/config_test.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 17 | 2022-02-08T17:13:55.000Z | 2022-03-28T16:49:00.000Z | src/FunctionApps/python/tests/config/config_test.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 3 | 2022-02-27T23:12:50.000Z | 2022-03-17T04:51:47.000Z | import pytest
from unittest import mock
from config import get_required_config
@mock.patch.dict("os.environ", {"INTAKE_CONTAINER_PREFIX": "some-prefix"})
def test_get_required_config():
assert get_required_config("INTAKE_CONTAINER_PREFIX") == "some-prefix"
with pytest.raises(Exception):
# Make sure ... | 30.714286 | 74 | 0.765116 |
e82ec68e5281d03b2eb627c0a5350e6d808523c2 | 1,903 | py | Python | basic_utils/dict_helpers.py | Jackevansevo/basic-utils | 5dc6917e889c6b9150f0e0304995c1d1b1c79012 | [
"MIT"
] | null | null | null | basic_utils/dict_helpers.py | Jackevansevo/basic-utils | 5dc6917e889c6b9150f0e0304995c1d1b1c79012 | [
"MIT"
] | 159 | 2017-07-17T13:44:34.000Z | 2020-12-14T16:33:12.000Z | basic_utils/dict_helpers.py | Jackevansevo/basic-utils | 5dc6917e889c6b9150f0e0304995c1d1b1c79012 | [
"MIT"
] | 1 | 2017-04-19T07:03:43.000Z | 2017-04-19T07:03:43.000Z | from functools import reduce
from operator import getitem
from typing import Any, Callable, Sequence, Tuple
from basic_utils.seq_helpers import butlast, last
__all__ = [
'get_in_dict',
'get_keys',
'prune_dict',
'set_in_dict',
]
def get_keys(d: dict, keys: Sequence[Any], default: Callable=None) -> Tu... | 23.7875 | 76 | 0.565949 |
e82f4160bbd966fd9d28fb3c568503715302e424 | 26,526 | py | Python | capstone/capdb/tests/test_models.py | truthiswill/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | null | null | null | capstone/capdb/tests/test_models.py | truthiswill/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | 4 | 2021-09-02T20:54:31.000Z | 2022-02-27T14:04:06.000Z | capstone/capdb/tests/test_models.py | whitemike889/capstone | 61b17611ebee17a5f5e4f64ae4ccaa67ac357478 | [
"MIT"
] | null | null | null | import re
import pytest
from django.utils.encoding import force_bytes
from capdb.models import VolumeMetadata, CaseMetadata, CaseImage, CaseBodyCache, CaseXML, fetch_relations, Jurisdiction, \
Reporter, Court, EditLog
from capdb.tasks import retrieve_images_from_cases
from scripts.helpers import nsmap, parse_xml,... | 41.642072 | 518 | 0.724195 |
e82f4bc0a040139e13e219f43a9e1c477c980efd | 4,436 | py | Python | scripts/plot_load_transient_response.py | turingbirds/howland_vccs | b4d69476f151a05d830396e152d06a93b6bc0e3f | [
"Apache-2.0"
] | 1 | 2022-03-26T17:16:58.000Z | 2022-03-26T17:16:58.000Z | scripts/plot_load_transient_response.py | turingbirds/howland_vccs | b4d69476f151a05d830396e152d06a93b6bc0e3f | [
"Apache-2.0"
] | null | null | null | scripts/plot_load_transient_response.py | turingbirds/howland_vccs | b4d69476f151a05d830396e152d06a93b6bc0e3f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import matplotlib as mpl
import matplotlib.font_manager as fm
mpl.rcParams['font.family'] = 'CMU Serif'
mpl.rcParams["mathtext.fontset"] = "stix"
mpl.rcParams["font.serif"] = [mpl.rcParams['font.family']] + mpl.rcParams["font.serif"]
mpl.rcParams['axes.labelsize'] = 20.
m... | 33.606061 | 126 | 0.694319 |
e82f51fdc1106bc78a093c383fe75a7aae166e68 | 1,595 | py | Python | openpnm/models/phases/electrical_conductivity.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2020-06-08T19:48:00.000Z | 2020-06-08T19:48:00.000Z | openpnm/models/phases/electrical_conductivity.py | Jimmy-INL/OpenPNM | 1546fa1ac2204443bde916f2037fac383c5069ae | [
"MIT"
] | null | null | null | openpnm/models/phases/electrical_conductivity.py | Jimmy-INL/OpenPNM | 1546fa1ac2204443bde916f2037fac383c5069ae | [
"MIT"
] | null | null | null | r"""
.. autofunction:: openpnm.models.phases.electrical_conductivity.percolating_continua
"""
import numpy as _np
def percolating_continua(target, phi_crit, tau,
volume_fraction='pore.volume_fraction',
bulk_property='pore.intrinsic_conductivity'):
r'''
Calcu... | 29 | 84 | 0.678997 |
e82f723aec60e808662f60a99b9358f37a27afc4 | 19,860 | py | Python | tests/test_thermal_conductivity.py | andr1976/thermo | 42d10b3702373aacc88167d4046ea9af92abd570 | [
"MIT"
] | 380 | 2016-07-04T09:45:20.000Z | 2022-03-20T18:09:45.000Z | tests/test_thermal_conductivity.py | andr1976/thermo | 42d10b3702373aacc88167d4046ea9af92abd570 | [
"MIT"
] | 104 | 2016-07-10T20:47:12.000Z | 2022-03-22T20:43:39.000Z | tests/test_thermal_conductivity.py | andr1976/thermo | 42d10b3702373aacc88167d4046ea9af92abd570 | [
"MIT"
] | 96 | 2016-07-05T20:54:05.000Z | 2022-02-23T03:06:02.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | 47.855422 | 299 | 0.710574 |
e82f79a572f8ea0830e055ccde5768385536f25b | 338 | py | Python | python/modules/pymongo/main.py | zhaoace/codecraft | bf06267e86bd7386714911b0df4aa0ca0a91d882 | [
"Unlicense"
] | null | null | null | python/modules/pymongo/main.py | zhaoace/codecraft | bf06267e86bd7386714911b0df4aa0ca0a91d882 | [
"Unlicense"
] | null | null | null | python/modules/pymongo/main.py | zhaoace/codecraft | bf06267e86bd7386714911b0df4aa0ca0a91d882 | [
"Unlicense"
] | null | null | null | import pymongo
client = MongoClient()
db = client.db_name
c = db.collection_name
docs = [{"wid":"cc123", "sid":"sc123"},{"wid":"cc224", "sid":"sc224"}]
c.insert({"wid":"w001", "sid":"s001"})
result = c.insert_many(docs)
result.inserted_ids
c.find_one()
c.find_one({"wid":"cc123"})
for doc in c.find():
print... | 13.52 | 70 | 0.630178 |
e82f96e3f6ddef4f6e5776cd462e6a2829bec7e6 | 1,311 | py | Python | flexget/plugins/output/series_forget.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/output/series_forget.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/output/series_forget.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
from flexget import plugin
from flexget.event import event
try:
from flexget.plugins.filter.series import remove_series_episode
except ImportError:
rais... | 35.432432 | 109 | 0.647597 |
e82fb9cb569e992c71899e19d5ebd39b83cbe743 | 169,455 | py | Python | hops/tests/test_featurestore.py | tabularaza27/hops-util-py | 3e2733ebe4783f88ecf22cbeb4d8f1f8d56c65cd | [
"Apache-2.0"
] | null | null | null | hops/tests/test_featurestore.py | tabularaza27/hops-util-py | 3e2733ebe4783f88ecf22cbeb4d8f1f8d56c65cd | [
"Apache-2.0"
] | null | null | null | hops/tests/test_featurestore.py | tabularaza27/hops-util-py | 3e2733ebe4783f88ecf22cbeb4d8f1f8d56c65cd | [
"Apache-2.0"
] | null | null | null | """
Unit tests for the feature store python client on Hops.
The tests uses spark-local mode in combination with tests to test functionality of feature store client.
HDFS/integration with hopsworks is not tested. The tests are structured as follows:
1. Create sample hive featurestore db locally
2. Create sample traini... | 65.910152 | 121 | 0.677259 |
e83002942383282579a907eff9e06ab3b22b8a81 | 6,344 | py | Python | main/gpbasics/KernelBasics/PartitioningModel.py | Bernsai/GaussianProcessFundamentals | 43631e5161a243e7d79cf26b76bf289276f0c65a | [
"MIT"
] | null | null | null | main/gpbasics/KernelBasics/PartitioningModel.py | Bernsai/GaussianProcessFundamentals | 43631e5161a243e7d79cf26b76bf289276f0c65a | [
"MIT"
] | null | null | null | main/gpbasics/KernelBasics/PartitioningModel.py | Bernsai/GaussianProcessFundamentals | 43631e5161a243e7d79cf26b76bf289276f0c65a | [
"MIT"
] | null | null | null | import gpbasics.global_parameters as global_param
global_param.ensure_init()
from enum import Enum
from typing import List
import logging
import numpy as np
import gpbasics.DataHandling.DataInput as di
import tensorflow as tf
class PartitioningClass(Enum):
# score is 1 for one partition and zero for all the othe... | 41.736842 | 116 | 0.676545 |
e830514c5ffd809bbd325d1da42e808b41c4b520 | 3,815 | py | Python | HackerRank/HashTables_IceCream_Parlor.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 5 | 2019-09-07T17:31:17.000Z | 2022-03-05T09:59:46.000Z | HackerRank/HashTables_IceCream_Parlor.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | null | null | null | HackerRank/HashTables_IceCream_Parlor.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 2 | 2019-09-07T17:31:24.000Z | 2019-10-28T16:10:52.000Z | '''
Each time Sunny and Johnny take a trip to the Ice Cream Parlor, they pool their money to buy ice cream.
On any given day, the parlor offers a line of flavors. Each flavor has a cost associated with it.
Given the value of and the of each flavor for trips to the Ice Cream Parlor, help Sunny and Johnny
choose two ... | 33.761062 | 107 | 0.701704 |
e830b25877c59bde4fe18eaeae8d2e5bb0130fed | 7,658 | py | Python | splunk_helper.py | whikernel/evtx2splunk | 528f49c624eb070a4cc121aed26a8f9c953a64e9 | [
"MIT"
] | 3 | 2021-01-16T11:16:41.000Z | 2021-11-12T00:11:25.000Z | splunk_helper.py | whikernel/evtx2splunk | 528f49c624eb070a4cc121aed26a8f9c953a64e9 | [
"MIT"
] | 1 | 2021-07-21T16:43:40.000Z | 2021-07-23T18:13:35.000Z | splunk_helper.py | whikernel/evtx2splunk | 528f49c624eb070a4cc121aed26a8f9c953a64e9 | [
"MIT"
] | 1 | 2021-01-16T15:44:32.000Z | 2021-01-16T15:44:32.000Z | # -*- coding: utf-8 -*-
# !/usr/bin/env python
"""
Splunk HEC Helper, part of evtx2splunk
"""
__progname__ = "evtx2splunk"
__date__ = "2020-01-10"
__version__ = "0.1"
__author__ = "whitekernel - PAM"
from typing import Any
import requests
import urllib3
from requests.auth import HTTPBasicAuth
import logging as ... | 33.441048 | 113 | 0.548838 |
e830d6e39bdbe7795bb36369b4185e2afed7a3e1 | 1,983 | py | Python | falcon_api/falcon_functions.py | d-v-dlee/code_references | 21d81ac42c7a4f6def58290ceed439915c57e176 | [
"MIT"
] | null | null | null | falcon_api/falcon_functions.py | d-v-dlee/code_references | 21d81ac42c7a4f6def58290ceed439915c57e176 | [
"MIT"
] | null | null | null | falcon_api/falcon_functions.py | d-v-dlee/code_references | 21d81ac42c7a4f6def58290ceed439915c57e176 | [
"MIT"
] | null | null | null | import os
import falcon
import pdb
# health check
service_is_healthy = True
try:
# check for correct passed env variables
credentials_path = os.environ['GOOGLE_APPLICATION_CREDENTIALS']
bucket_name = os.environ['BUCKET']
models_dir = 'ml-models' + os.sep + os.environ['MODELS']
except:
s... | 29.597015 | 97 | 0.609682 |
e830e848e03ceba936dfbef355a99a96f596c9e9 | 49,521 | py | Python | seqio/dataset_providers_test.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | null | null | null | seqio/dataset_providers_test.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | null | null | null | seqio/dataset_providers_test.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The SeqIO Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 38.358637 | 107 | 0.656489 |
e83134d7da64c9eadfd3e049815e9635f2d45368 | 6,450 | py | Python | tests/django_property_filter/filters/test_property_multiple_choice_filter.py | ericziethen/django-filter-property | d7433db657877049d008fa5ad381992ae7904b77 | [
"MIT"
] | 17 | 2020-07-21T10:54:20.000Z | 2021-11-28T12:02:59.000Z | tests/django_property_filter/filters/test_property_multiple_choice_filter.py | ericziethen/django-property-filter | 164e31e189eda7ca0fdedb832edc436cfe50de47 | [
"MIT"
] | 210 | 2020-05-28T04:51:23.000Z | 2022-03-25T10:43:53.000Z | tests/django_property_filter/filters/test_property_multiple_choice_filter.py | ericziethen/django-filter-property | d7433db657877049d008fa5ad381992ae7904b77 | [
"MIT"
] | 3 | 2020-11-25T11:21:20.000Z | 2022-02-17T11:55:49.000Z |
import pytest
from django_filters import FilterSet, MultipleChoiceFilter
from django_property_filter import PropertyFilterSet, PropertyMultipleChoiceFilter
from property_filter.models import MultipleChoiceFilterModel
@pytest.mark.parametrize('lookup', PropertyMultipleChoiceFilter.supported_lookups)
def test_suppor... | 43 | 145 | 0.606667 |
e8315c387967ab896b493e4572eb73d2d93246f3 | 5,457 | py | Python | oscar/lib/python2.7/site-packages/django_extensions/management/email_notifications.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/management/email_notifications.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django_extensions/management/email_notifications.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import traceback
from django.conf import settings
from django.core.mail import send_mail
from django.core.management import BaseCommand
class EmailNotificationCommand(BaseCommand):
"""A BaseCommand subclass which adds sending email fuctionality.
Subclasses will... | 39.832117 | 97 | 0.582555 |
e831673f5da72fb058e4ec9eb6812f1be4c30480 | 3,971 | py | Python | tests/test_Toolchain.py | NVSL/fiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | 2 | 2022-01-22T06:12:52.000Z | 2022-01-24T07:29:44.000Z | tests/test_Toolchain.py | NVSL/cfiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | null | null | null | tests/test_Toolchain.py | NVSL/cfiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | null | null | null | from cfiddle import Toolchain
from cfiddle import *
from cfiddle.Toolchain import GCCToolchain, GoToolchain, ToolchainException, UnknownToolchain
from cfiddle.util import get_native_architecture
import pytest
@pytest.mark.parametrize("lang,parameters,tool,toolchain",
[("c++", dict(ARCH="x86_6... | 52.946667 | 111 | 0.565349 |
e8316c9ac959368151f67993fc369fe9db39fafa | 524 | py | Python | auth_uuid/helper_jwt.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | null | null | null | auth_uuid/helper_jwt.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | 1 | 2019-09-02T15:41:57.000Z | 2019-09-02T15:41:57.000Z | auth_uuid/helper_jwt.py | exolever/django-simple-user | 8c7f4e78b5da434cd3960e59d9b08cf69a636e0a | [
"MIT"
] | null | null | null | from auth_uuid import settings
import jwt
def jwt_get_username_from_payload_handler(payload):
return payload.get('uuid')
def jwt_decode_handler(token):
options = {
'verify_exp': settings.JWT_VERIFY_EXPIRATION,
}
return jwt.decode(
token,
settings.JWT_SECRET_KEY,
sett... | 21.833333 | 53 | 0.679389 |
e8317113ef33d77fdc0a5abb855c3df00cd95f55 | 3,863 | py | Python | contrib/wiki2rst.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | contrib/wiki2rst.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | contrib/wiki2rst.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import io
import os.path
import re
import sys
from contextlib import closing
from pkg_resources import resource_listdir, resource_string
from trac.loader import load_components
from trac.test import EnvironmentStub, Mock, MockPerm
from trac.util.text import... | 32.737288 | 75 | 0.5343 |
e831a32e840a3ac292bad69d456c22a978b35579 | 6,554 | py | Python | Cogs/GameLookup.py | MrAngelDo6pa/MedBotS | 89e19d831507e20d0898114502967b2ad8ecf957 | [
"MIT"
] | 2 | 2021-09-28T10:40:10.000Z | 2021-11-07T14:49:07.000Z | Cogs/GameLookup.py | ddoskid/lol12 | 35c097bbebeca3043a939b902b07474473344a3c | [
"MIT"
] | null | null | null | Cogs/GameLookup.py | ddoskid/lol12 | 35c097bbebeca3043a939b902b07474473344a3c | [
"MIT"
] | null | null | null | import asyncio, discord, time, parsedatetime, os, json
from datetime import datetime
from operator import itemgetter
from discord.ext import commands
from Cogs import Settings, Message, UserTime
try:
from igdb_api_python.igdb import igdb
LOADED = True
except:
# Missing the api
LOADED = False
P... | 29.656109 | 138 | 0.51419 |
e831dc697d95174de411e04e17ddcd28ffa91812 | 464 | py | Python | regparser/web/jobs/migrations/0007_regulationfile_url.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 26 | 2016-06-04T20:48:09.000Z | 2021-07-28T18:13:30.000Z | regparser/web/jobs/migrations/0007_regulationfile_url.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 146 | 2016-04-06T19:07:54.000Z | 2022-01-02T20:09:53.000Z | regparser/web/jobs/migrations/0007_regulationfile_url.py | pkfec/regulations-parser | ff6b29dcce0449a133e7b93dd462ab3110f80a5d | [
"CC0-1.0"
] | 28 | 2016-04-09T20:40:48.000Z | 2021-05-08T17:52:59.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-19 04:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0006_regulationfile_file'),
]
operations = [
migrations.AddField(
... | 22.095238 | 63 | 0.62069 |
e8320b7242c7d908ea470dd9dd7224edbfef75df | 15,736 | py | Python | nova/scheduler/filter_scheduler.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/filter_scheduler.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/filter_scheduler.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 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/licenses/LICENSE-2.0
#
# Unless ... | 43.955307 | 79 | 0.615531 |
e8320cc3931babe50926aa51cfb3234acf9e8273 | 188 | py | Python | sample/tests.py | bdlb77/recipe-app-api | 17cbb7e541612a4fa38d726c710c98ea761d9752 | [
"MIT"
] | null | null | null | sample/tests.py | bdlb77/recipe-app-api | 17cbb7e541612a4fa38d726c710c98ea761d9752 | [
"MIT"
] | null | null | null | sample/tests.py | bdlb77/recipe-app-api | 17cbb7e541612a4fa38d726c710c98ea761d9752 | [
"MIT"
] | null | null | null | from django.test import TestCase
from app.calc import add
class CalcTests(TestCase):
"""tests for Calc file"""
def test_add_number(self):
self.assertEqual(add(1, 3), 4)
| 18.8 | 38 | 0.68617 |
e8324f1f3ec26644b1a28a6e846d142526617c07 | 226 | py | Python | newsletter/admin.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 19 | 2022-02-16T20:00:08.000Z | 2022-03-08T17:38:59.000Z | newsletter/admin.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | 3 | 2022-02-16T20:59:11.000Z | 2022-02-23T20:40:12.000Z | newsletter/admin.py | AminAliH47/PicoStyle | 768daccc6f28f08aa848318d633af1a19544e499 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from newsletter import models
# Register message model in admin panel
admin.site.register(models.Messages)
# Register subscriber model in admin panel
admin.site.register(models.Subscribers)
| 22.6 | 42 | 0.823009 |
e83258848f1e7febaec5c327c6d41f545f93f183 | 10,848 | py | Python | neuro-sdk/tests/test_bucket_persistent_credentials.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-sdk/tests/test_bucket_persistent_credentials.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-sdk/tests/test_bucket_persistent_credentials.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | from typing import Callable
from aiohttp import web
from neuro_sdk import Client, Cluster, PersistentBucketCredentials
from neuro_sdk.buckets import Bucket, BucketCredentials
from tests import _TestServerFactory
_MakeClient = Callable[..., Client]
async def test_list(
aiohttp_server: _TestServerFactory,
m... | 31.172414 | 88 | 0.396663 |
e8325b2ab21298e26fe7e4a1c1975c3874a597e7 | 2,858 | py | Python | usecases/tokenize_folder/tokenize_folder.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | usecases/tokenize_folder/tokenize_folder.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | usecases/tokenize_folder/tokenize_folder.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | from pybo import BoTokenizer
import PySimpleGUI as sg
from pathlib import Path
import yaml
default_config = '''Exec:
profile: Amdo1
tok_profile: POS
vocab_path: vocabs
input_folder: input
output_folder: output
tokenized_suffix: _tokenized
rebuild_trie: False
Profiles:
Amdo1:
-... | 28.29703 | 76 | 0.625962 |
e8325d99e5435e973702ae7348637755d45bc1d0 | 5,513 | py | Python | utils/parsing.py | protabit/protherm-conversion | 30e8f973309e7769f5a7fba9025f04ce3c7670b7 | [
"MIT"
] | 10 | 2019-01-17T18:15:08.000Z | 2022-01-10T12:44:24.000Z | utils/parsing.py | protabit/protherm-conversion | 30e8f973309e7769f5a7fba9025f04ce3c7670b7 | [
"MIT"
] | 2 | 2019-01-17T18:14:59.000Z | 2021-06-01T22:23:45.000Z | utils/parsing.py | protabit/protherm-conversion | 30e8f973309e7769f5a7fba9025f04ce3c7670b7 | [
"MIT"
] | 1 | 2020-12-14T01:57:53.000Z | 2020-12-14T01:57:53.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re, json, io, pickle
from protherm import SequenceStructure, ExperimentalCondition, ThermoData, Literature, ProThermEntry, ProThermStudy
seq_expected_attributes = ['PROTEIN', 'SOURCE', 'LENGTH', 'MOL-WEIGHT', 'PIR_ID', 'SWISSPROT_ID', 'E.C.NUMBER',... | 43.753968 | 290 | 0.638309 |
e832a37c3155f2ad47d5ad9cfc190543d92a9d75 | 459 | py | Python | Python-code-snippets-201-300/286-simple-browser.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-201-300/286-simple-browser.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-201-300/286-simple-browser.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | """Code snippets vol-58
286-pywebview-simple-webbrowser
Download all snippets so far:
https://wp.me/Pa5TU8-1yg
Blog: stevepython.wordpress.com
Requirements:
pip3 install pywebview
origin:
https://github.com/r0x0r/pywebview/blob/master/examples/simple_browser.py
"""
import webview
if __name__ == '__main_... | 22.95 | 73 | 0.681917 |
e832de0623f5dbdf3c8ad0a1a7923f28d4e1e016 | 755 | py | Python | tutorial/stage3/setup.py | omnivore/esky | 39e77deacf3e48d4d5d7a46701d9ef0f5593820d | [
"BSD-3-Clause"
] | 1 | 2019-07-11T14:50:07.000Z | 2019-07-11T14:50:07.000Z | tutorial/stage3/setup.py | omnivore/esky | 39e77deacf3e48d4d5d7a46701d9ef0f5593820d | [
"BSD-3-Clause"
] | null | null | null | tutorial/stage3/setup.py | omnivore/esky | 39e77deacf3e48d4d5d7a46701d9ef0f5593820d | [
"BSD-3-Clause"
] | null | null | null | import sys
from esky import bdist_esky
from distutils.core import setup
# for windows
# > python setup.py bdist_esky
if sys.platform in ['win32','cygwin','win64']:
# Use bdist_esky instead of py2exe
setup(
name = "example-app",
version = "0.3",
# All executables are listed in the "sc... | 23.59375 | 63 | 0.540397 |
e83367caf4a2b6b257daf90feafa63b7d88b98ce | 26,207 | py | Python | pywren/scripts/lightweightcli.py | Pkanjan37/Lightweight_big_data_framework_serverless | 4a1489429a71d488f449f9dffbeca85ead31db14 | [
"Apache-2.0"
] | null | null | null | pywren/scripts/lightweightcli.py | Pkanjan37/Lightweight_big_data_framework_serverless | 4a1489429a71d488f449f9dffbeca85ead31db14 | [
"Apache-2.0"
] | null | null | null | pywren/scripts/lightweightcli.py | Pkanjan37/Lightweight_big_data_framework_serverless | 4a1489429a71d488f449f9dffbeca85ead31db14 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 PyWren Team
#
# 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... | 37.067893 | 104 | 0.653146 |
e8336c1a292256b6d18213e27ecb31b9e1b77d95 | 5,478 | py | Python | src/tests/ftest/util/daos_io_conf.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/util/daos_io_conf.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/util/daos_io_conf.py | Kmannth/daos | 44164ad2582412a24762185d5919b293306cfae3 | [
"BSD-2-Clause-Patent"
] | null | null | null | #!/usr/bin/python
"""
(C) Copyright 2020-2022 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
import os
import random
from apricot import TestWithServers
from command_utils import ExecutableCommand
from command_utils_base import \
CommandFailure, BasicParameter, FormattedParameter
from job... | 35.571429 | 90 | 0.616648 |
e83386b70a68a4ebdcc6f0872a2df0e9781340fd | 13,681 | py | Python | nbconvert/utils/pandoc.py | holzschu/nbconvert | f321d0f8ea7e4a4df099bc6a97cb773cf21018dc | [
"BSD-3-Clause-Clear"
] | 1 | 2021-12-14T18:49:11.000Z | 2021-12-14T18:49:11.000Z | nbconvert/utils/pandoc.py | holzschu/nbconvert | f321d0f8ea7e4a4df099bc6a97cb773cf21018dc | [
"BSD-3-Clause-Clear"
] | null | null | null | nbconvert/utils/pandoc.py | holzschu/nbconvert | f321d0f8ea7e4a4df099bc6a97cb773cf21018dc | [
"BSD-3-Clause-Clear"
] | null | null | null | """Utility for calling pandoc"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import re
import shutil
import subprocess
import warnings
from io import BytesIO, TextIOWrapper
# iOS:
import mistune
from m2r import convert
import sys, os
from nbconvert.utils.versi... | 31.022676 | 108 | 0.566918 |
e8339ee49e66ae243be392654e21a5c83d7e487c | 14,444 | py | Python | scout/build/variant/variant.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | scout/build/variant/variant.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | scout/build/variant/variant.py | bjhall/scout | ea772cf8d233223e0ec5271f61b95d3afcf719ad | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from . import (build_genotype, build_compound, build_gene, build_clnsig)
LOG = logging.getLogger(__name__)
def build_variant(variant, institute_id, gene_to_panels = None,
hgncid_to_gene=None, sample_info=None):
"""Build a variant object based on parsed in... | 35.841191 | 100 | 0.606757 |
e833baee791f97df5829ee289bcaf17c31a17deb | 1,451 | py | Python | tensorflow/contrib/session_bundle/constants.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/session_bundle/constants.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/session_bundle/constants.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2016 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... | 38.184211 | 80 | 0.741558 |
e83415a0dc7a9a0124fed504e2079eb6a8c2b7fe | 2,839 | py | Python | oscar/lib/python2.7/site-packages/pygments/lexers/snobol.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pygments/lexers/snobol.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pygments/lexers/snobol.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.lexers.snobol
~~~~~~~~~~~~~~~~~~~~~~
Lexers for the SNOBOL language.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups
from pygments.token ... | 33.797619 | 80 | 0.482917 |
e83437d145d91cf22f5ffeda7d2f4821ba82e3c7 | 925 | py | Python | tools/python/pytype_helper.py | nala-cub/coda | 581608cfc4d9b485182c6f5f40dd2ab7540cec66 | [
"Apache-2.0"
] | 1 | 2021-11-13T06:19:22.000Z | 2021-11-13T06:19:22.000Z | tools/python/pytype_helper.py | nala-cub/coda | 581608cfc4d9b485182c6f5f40dd2ab7540cec66 | [
"Apache-2.0"
] | 1 | 2021-12-21T17:56:58.000Z | 2021-12-21T18:16:27.000Z | tools/python/pytype_helper.py | nala-cub/coda | 581608cfc4d9b485182c6f5f40dd2ab7540cec66 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Cory Paik. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 38.541667 | 80 | 0.690811 |
e834625a6aa80be85c283c2faa5717eef15cc7e6 | 1,906 | py | Python | probelib/align/block.py | Nanguage/probelib | c9c73d5413e0e159efe6ceac627cc8492f09e3b5 | [
"BSD-3-Clause"
] | null | null | null | probelib/align/block.py | Nanguage/probelib | c9c73d5413e0e159efe6ceac627cc8492f09e3b5 | [
"BSD-3-Clause"
] | null | null | null | probelib/align/block.py | Nanguage/probelib | c9c73d5413e0e159efe6ceac627cc8492f09e3b5 | [
"BSD-3-Clause"
] | null | null | null | import typing as t
import pysam
Aln = t.Tuple[str, int, int]
Block = t.Tuple[str, str, t.List[Aln]]
def read_align_blocks(
sam_path: str
) -> t.Iterable[Block]:
def yield_cond(old, rec, block, end=False):
res = (old is not None) and (len(block) > 0)
if res and not end:
... | 28.029412 | 76 | 0.540399 |
e83469ef8ca7f8541a25ccde386d73cd90bee901 | 2,291 | py | Python | app/resources/v1/mlmodel/supervisionado/classificacao.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/resources/v1/mlmodel/supervisionado/classificacao.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/resources/v1/mlmodel/supervisionado/classificacao.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | """ Controller para fornecer respostas a classificações de modelos treinados """
from flask_restful_swagger_2 import swagger
from flask_restful import Resource
from flask import request
from model.mlmodel.supervisionado.classificacao import Classificacao
# pylint: disable=R0903
class ClassificacaoResource(Resource):
... | 32.728571 | 97 | 0.493671 |
e8347d3ac56d3abe377a980fdfc327a381f20a0b | 4,121 | py | Python | experiments/ashvin/rss/n3/original/rig.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rss/n3/original/rig.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rss/n3/original/rig.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
from multiworld.envs.mujo... | 31.219697 | 87 | 0.525601 |
e8348888d1434dc53ddd0d8c6df142d8a83a7001 | 5,335 | py | Python | ginga/misc/Callback.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/misc/Callback.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/misc/Callback.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | #
# Callback.py -- Mixin class for programmed callbacks.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import sys
import traceback
class CallbackError(Exception):
pass
class Callbacks(object):
def __init__(self):
self.cb = {}
... | 31.017442 | 76 | 0.555201 |
e834a649e4fabd74e216afd11a87b119f82da2c8 | 2,685 | py | Python | Gamle scripts/old tests/test8.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | Gamle scripts/old tests/test8.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | Gamle scripts/old tests/test8.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 26 11:57:35 2018
@author: Simon
"""
import os
from createLargerFeatureMatrix import simpleLargeMatrix
import pickle
from keras.models import Sequential
from keras.layers import Dense
import numpy as np
path = "Saved matrices/11-10-2018 11.36/sorted... | 22.948718 | 137 | 0.774674 |
e834cb514d16f91dffdd98696acbc1dc3401c03f | 408 | py | Python | galah/sheep/utility/suitehelpers.py | brownhead/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | 1 | 2021-01-03T00:23:56.000Z | 2021-01-03T00:23:56.000Z | galah/sheep/utility/suitehelpers.py | itsjohncs/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | null | null | null | galah/sheep/utility/suitehelpers.py | itsjohncs/galah | f4475c49c920fcebbcb96636385f23863dc1e4c2 | [
"MIT"
] | 1 | 2016-12-21T19:54:41.000Z | 2016-12-21T19:54:41.000Z | from galah.base.magic import memoize
@memoize
def get_virtual_suite(suite_name):
suite_name = suite_name.lower()
if suite_name == "openvz":
import galah.sheep.virtualsuites.vz as vz
return vz
elif suite_name == "dummy":
import galah.sheep.virtualsuites.dummy as dummy
return... | 27.2 | 70 | 0.678922 |
e834cb529e48eb5d937532bb0f764b4c01e6fa1a | 559 | py | Python | algorithms/100-199/155. Min Stack.py | USTCLink/LeetcodeSolutions | ec64fea0d6cb3c56ad3d7268982be8701786700b | [
"MIT"
] | 3 | 2020-10-28T20:14:30.000Z | 2020-11-03T01:27:04.000Z | algorithms/100-199/155. Min Stack.py | USTCLink/LeetcodeSolutions | ec64fea0d6cb3c56ad3d7268982be8701786700b | [
"MIT"
] | null | null | null | algorithms/100-199/155. Min Stack.py | USTCLink/LeetcodeSolutions | ec64fea0d6cb3c56ad3d7268982be8701786700b | [
"MIT"
] | null | null | null | class MinStack:
def __init__(self):
"""
initialize your data structure here.
"""
self.stack = []
self.min = []
def push(self, x: int) -> None:
self.stack.append(x)
if not self.min:
self.min.append(x)
else:
self.min.append(... | 19.964286 | 49 | 0.465116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.