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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1de563b92d535ea3c61f072ad0c470a3b0c133be | 17,293 | py | Python | app/model/base.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/model/base.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/model/base.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Base Model '''
import json
import requests
import yaml
import numpy as np
import pandas as pd
from flask import current_app as app
from service.qry_options_builder import QueryOptionsBuilder
from service.pandas_operator import PandasOperator
from service.template_helper import TemplateHelper
#pylint: disable=R090... | 40.404206 | 100 | 0.579541 |
1de5692bd98d198dbbf4dcf0a12f69786e14de3c | 18,127 | py | Python | trac/timeline/web_ui.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | 1 | 2017-08-03T07:04:28.000Z | 2017-08-03T07:04:28.000Z | trac/timeline/web_ui.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | trac/timeline/web_ui.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2005-2006 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described ... | 44.980149 | 79 | 0.559056 |
1de594a791d78b935b8aa4c49745243a992a7333 | 89,407 | py | Python | nova/tests/compute/test_compute_mgr.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/compute/test_compute_mgr.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/compute/test_compute_mgr.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 47.305291 | 79 | 0.636818 |
1de59ca74ab9798a65035cfc2befc0306ec48718 | 458 | py | Python | models/tinydb/tinymodel.py | jrhunter3/Basic_Dockerized_PoW | af0f80f7373ed0a3878aadcb79ff54c37dbf3fa6 | [
"MIT"
] | null | null | null | models/tinydb/tinymodel.py | jrhunter3/Basic_Dockerized_PoW | af0f80f7373ed0a3878aadcb79ff54c37dbf3fa6 | [
"MIT"
] | null | null | null | models/tinydb/tinymodel.py | jrhunter3/Basic_Dockerized_PoW | af0f80f7373ed0a3878aadcb79ff54c37dbf3fa6 | [
"MIT"
] | null | null | null | from models.tinydb.basemodel import TinyBaseModel
class TinyModel(TinyBaseModel):
"""
This is the basic class for extensions to put their code
which is relevant for all models of this type.abs
Hierarchy:
scope: all db specific db specific free
cont... | 30.533333 | 70 | 0.552402 |
1de5c8478c30adf97d22fae55118bcc093db90da | 620 | py | Python | osgar/drivers/timer.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | osgar/drivers/timer.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | osgar/drivers/timer.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | from threading import Thread
import time
class Timer:
def __init__(self, config, bus):
self.bus = bus
bus.register('tick')
self.sleep = config['sleep']
self.thread = Thread(target=self.run)
self.time_zero = time.monotonic()
def start(self):
self.thread.start()
... | 23.846154 | 71 | 0.604839 |
1de5d2261070cc732b35ed6afd2588e583f22273 | 12,839 | py | Python | mslib/utils/netCDF4tools.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | mslib/utils/netCDF4tools.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | mslib/utils/netCDF4tools.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | # -*- coding: utf-8 -*-
"""
mslib.utils.netCDF4tools
~~~~~~~~~~~~~~~~~~
Some useful functions for handling NetCDF files with the netCDF4 library.
This file is part of mss.
:copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V.
:copyright: Copyright 2011-2014 Marc Rau... | 39.262997 | 104 | 0.650674 |
1de5dc38040f0f502e80409703ca4be9858557f6 | 605 | py | Python | examples/lines.py | maartenbreddels/kaplot | 305026209f8026094d54373e14541f4f039501d5 | [
"MIT"
] | null | null | null | examples/lines.py | maartenbreddels/kaplot | 305026209f8026094d54373e14541f4f039501d5 | [
"MIT"
] | null | null | null | examples/lines.py | maartenbreddels/kaplot | 305026209f8026094d54373e14541f4f039501d5 | [
"MIT"
] | null | null | null | import kaplot
import kaplot.objects
import kaplot.astro
from numpy import *
m1 = kaplot.Matrix(2,3, 0, 0)
m2 = kaplot.Matrix(1,1, 10, 10)
print m1
print m2
print m1 * m2
plot = kaplot.objects.Plot()
page = kaplot.objects.Page(plot)
box = kaplot.objects.Box(page, viewport=((0.1, 0.1), (0.9, 0.9)))
line = kaplot.object... | 24.2 | 65 | 0.68595 |
1de5dd5e9e13d18d1c6d9cb77011b30feee5c9ce | 14,344 | py | Python | ginga/examples/gw/clocks.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/examples/gw/clocks.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/examples/gw/clocks.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
#
# clocks.py -- Ginga clocks
#
# eric@naoj.org
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
"""
"clocks" displays a grid of clocks in different time zones.
Usage:
$ clock.py HST Asia/Tokyo UTC US/Eastern US/Pacific Hongkong Po... | 32.899083 | 87 | 0.601506 |
1de6069387952fa4ce5f6be3190cb24427ddb439 | 4,405 | py | Python | examples/adaptive_simulation_analysis_loop.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | null | null | null | examples/adaptive_simulation_analysis_loop.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | null | null | null | examples/adaptive_simulation_analysis_loop.py | chemlove/radical.ensemblemd | 0ec4b127760d2fee88d4eae1768fecec4bdd6b21 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
This script is an example of how the simulation adaptivity can be used. In the first iteration,
the number of simulations is the same as that set while pattern creation ('simulation_instances').
NOTE: There is an extra parameter during pattern creation, "adaptive_simulation=True". If this is... | 35.813008 | 114 | 0.706016 |
1de6094d483ca8166b5cf5d23d7e2378f4b85420 | 169 | py | Python | panda_prospecting/prospecting/insights/countries.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | null | null | null | panda_prospecting/prospecting/insights/countries.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | 10 | 2017-06-09T18:47:26.000Z | 2019-11-28T15:53:48.000Z | panda_prospecting/prospecting/insights/countries.py | helanan/Panda_Prospecting | 501b8188bfc135bf0499a0377a30361b48dbfbe0 | [
"MIT"
] | null | null | null | from pygal.maps.world import COUNTRIES
from pygal_maps_world import i18n
for country_code in sorted(COUNTRIES.keys()):
print(country_code, COUNTRIES[country_code])
| 28.166667 | 48 | 0.810651 |
1de6347c98de587b3be96b605aaa045122a72053 | 12,110 | py | Python | tests/st/calico_upgrade/test_calico_upgrade.py | mkumatag/calico-upgrade | 2370474c2eb0bd50facbcde85a63e14d2231372e | [
"Apache-2.0"
] | 6 | 2018-04-17T10:26:22.000Z | 2020-07-15T13:05:22.000Z | tests/st/calico_upgrade/test_calico_upgrade.py | mkumatag/calico-upgrade | 2370474c2eb0bd50facbcde85a63e14d2231372e | [
"Apache-2.0"
] | 12 | 2017-12-18T09:54:50.000Z | 2021-04-28T02:47:33.000Z | tests/st/calico_upgrade/test_calico_upgrade.py | mkumatag/calico-upgrade | 2370474c2eb0bd50facbcde85a63e14d2231372e | [
"Apache-2.0"
] | 14 | 2017-12-14T23:35:01.000Z | 2019-08-27T11:30:34.000Z | # Copyright (c) 2015-2017 Tigera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 36.586103 | 149 | 0.653179 |
1de63639fd23dc046060646a00725eafa9027572 | 7,566 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_shared_galleries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_shared_galleries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_shared_galleries_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 ... | 43.482759 | 162 | 0.666667 |
1de666401caf6e9266e3c12b8eb4d32d6d844498 | 1,399 | py | Python | src/fastapi_aad_auth/utilities/urls.py | Alex-Chekh/fastapi_aad_auth | 4ad21fa76e7422da5d0799695bb547cd3e6224e0 | [
"MIT"
] | 29 | 2020-09-04T08:39:42.000Z | 2022-01-21T08:43:48.000Z | src/fastapi_aad_auth/utilities/urls.py | Alex-Chekh/fastapi_aad_auth | 4ad21fa76e7422da5d0799695bb547cd3e6224e0 | [
"MIT"
] | 86 | 2020-07-30T20:51:19.000Z | 2022-03-30T16:55:24.000Z | src/fastapi_aad_auth/utilities/urls.py | Alex-Chekh/fastapi_aad_auth | 4ad21fa76e7422da5d0799695bb547cd3e6224e0 | [
"MIT"
] | 11 | 2020-10-16T07:17:16.000Z | 2022-02-09T17:13:55.000Z | """URL utilities."""
import logging
from starlette.datastructures import parse_qsl, URL
logger = logging.getLogger(__name__)
def with_redirect(url, post_redirect=None):
"""Append a redirect query parameter."""
if post_redirect is not None:
url = with_query_params(url, redirect=post_redirect)
re... | 26.903846 | 61 | 0.679056 |
1de66af69a982000e7445b0b975b9230e6001ab0 | 2,155 | py | Python | test/llc/version-tolerant/Expected/AcceptanceTests/LLCServiceDrivenUpdateOneVersionTolerant/llcservicedrivenupdateoneversiontolerant/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/llc/version-tolerant/Expected/AcceptanceTests/LLCServiceDrivenUpdateOneVersionTolerant/llcservicedrivenupdateoneversiontolerant/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/llc/version-tolerant/Expected/AcceptanceTests/LLCServiceDrivenUpdateOneVersionTolerant/llcservicedrivenupdateoneversiontolerant/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | # 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 ... | 43.1 | 108 | 0.671926 |
1de674b4e83ae047cea7c0452467c55f89537a9e | 7,784 | py | Python | src/python/pants/engine/mapper.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/engine/mapper.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/engine/mapper.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import re
from dataclasses import dataclass
from typing import Any, Dict, Iterable, Optional, Tuple, Union
from pants.build_graph.address import BuildFileAddress
from pants.engine.objects... | 39.917949 | 101 | 0.698869 |
1de6782e01902aac612771639acf6c976274040f | 144 | py | Python | src/refactory/namespacing/alias.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | null | null | null | src/refactory/namespacing/alias.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | 1 | 2022-02-07T22:18:30.000Z | 2022-02-07T22:18:30.000Z | src/refactory/namespacing/alias.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | null | null | null | from __future__ import annotations
from .sym_counter import SymbolCounter
__all__ = ["Alias"]
class Alias(SymbolCounter):
_symbol = "!"
| 14.4 | 38 | 0.743056 |
1de6b2245a68de31060b24651e7a5ca6bb065995 | 998 | py | Python | src/oscar/apps/dashboard/offers/reports.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/dashboard/offers/reports.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/dashboard/offers/reports.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
from oscar.core.loading import get_class
ReportCSVFormatter = get_class(
'dashboard.reports.reports', 'ReportCSVFormatter')
class OrderDiscountCSVFormatter(ReportCSVFormatter):
filename_template = 'order-discounts-for-offer-%s.csv'
def ... | 34.413793 | 60 | 0.606212 |
1de6cb962ad94059a6f61702da565b35fbca8ef1 | 2,668 | py | Python | padl/breadth_first_search_paths.py | elinsky/padl | 7f10be00a799d0a19eaa552f060f2cf9f4bcf3ef | [
"MIT"
] | null | null | null | padl/breadth_first_search_paths.py | elinsky/padl | 7f10be00a799d0a19eaa552f060f2cf9f4bcf3ef | [
"MIT"
] | 20 | 2020-11-02T14:47:42.000Z | 2021-06-12T13:01:07.000Z | padl/breadth_first_search_paths.py | elinsky/padl | 7f10be00a799d0a19eaa552f060f2cf9f4bcf3ef | [
"MIT"
] | null | null | null | import typing
from collections import deque
from queue import Queue
from padl.depth_first_search_paths import PathDoesNotExistError
from padl.graph import Graph
from padl.paths import Paths
from padl.search import Search
# TODO WRITE DOCSTRINGS
class BreadthFirstSearchPaths(Paths, Search):
"""Given an undirecte... | 39.820896 | 119 | 0.66042 |
1de6cfb99b0873ee42d796c83e41dc3a2ea35e72 | 20,280 | py | Python | great_expectations/expectations/metrics/util.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-11-22T12:51:08.000Z | 2021-11-22T12:51:08.000Z | great_expectations/expectations/metrics/util.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | null | null | null | great_expectations/expectations/metrics/util.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-10-08T01:24:50.000Z | 2021-10-08T01:24:50.000Z | import logging
from typing import Any, Dict, List, Optional
import numpy as np
from dateutil.parser import parse
from great_expectations.execution_engine.util import check_sql_engine_dialect
try:
import psycopg2
import sqlalchemy.dialects.postgresql.psycopg2 as sqlalchemy_psycopg2
except (ImportError, KeyErr... | 35.957447 | 143 | 0.632594 |
1de6dd5da3c742f1370e7effce94e2089ea83292 | 6,617 | py | Python | data/datasets/MARS.py | jackie840129/CF-AAN | 2b357bf5823837908f0fe04a22b47deaf9e3da4e | [
"MIT"
] | 16 | 2021-05-31T09:15:55.000Z | 2022-03-04T14:24:54.000Z | data/datasets/MARS.py | jackie840129/CF-AAN | 2b357bf5823837908f0fe04a22b47deaf9e3da4e | [
"MIT"
] | 2 | 2021-06-09T07:15:00.000Z | 2022-03-16T09:42:03.000Z | data/datasets/MARS.py | jackie840129/CF-AAN | 2b357bf5823837908f0fe04a22b47deaf9e3da4e | [
"MIT"
] | 4 | 2021-06-29T04:14:24.000Z | 2022-03-04T14:24:57.000Z | # encoding: utf-8
import glob
import re
import os.path as osp
from scipy.io import loadmat
from .bases import BaseVideoDataset
import pandas as pd
class MARS(BaseVideoDataset):
# dataset_dir = 'MARS'
dataset_dir = 'MARS-DL'
info_dir = 'info'
def __init__(self, root='/home/mediax/Dataset', verbose=Tr... | 47.949275 | 147 | 0.641832 |
1de722e8f8986c2e79dfdfb2907505273327a78a | 112 | py | Python | motorecycles.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | motorecycles.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | motorecycles.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | motorecycles = ['honda', 'yamaha', 'suzuki']
print(motorecycles)
motorecycles[0] = 'ducati'
print(motorecycles) | 22.4 | 44 | 0.732143 |
1de7419ee117e6181ac148998da5a4e213627f72 | 10,341 | py | Python | legal-api/tests/unit/models/__init__.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | 1 | 2019-11-07T20:32:59.000Z | 2019-11-07T20:32:59.000Z | legal-api/tests/unit/models/__init__.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | legal-api/tests/unit/models/__init__.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 31.916667 | 118 | 0.600425 |
1de74c860951704053120ebdafa9c0301a1935ec | 153 | py | Python | dalec_prime/apps.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | dalec_prime/apps.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | dalec_prime/apps.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class DalecPrimeConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "dalec_prime"
| 21.857143 | 56 | 0.771242 |
1de784b8f8015c1a3bbcdb4fffaa066664ce9390 | 6,485 | py | Python | CHECK_FILE_NAMES/check_file_names.py | spacetelescope/MAST_HLSP | 48c1df2e6bef3e03f6eefe9f52808b345e1587b4 | [
"MIT"
] | 1 | 2017-10-16T15:30:08.000Z | 2017-10-16T15:30:08.000Z | CHECK_FILE_NAMES/check_file_names.py | spacetelescope/MAST_HLSP | 48c1df2e6bef3e03f6eefe9f52808b345e1587b4 | [
"MIT"
] | 18 | 2018-05-11T16:07:48.000Z | 2018-11-19T19:45:40.000Z | CHECK_FILE_NAMES/check_file_names.py | spacetelescope/MAST_HLSP | 48c1df2e6bef3e03f6eefe9f52808b345e1587b4 | [
"MIT"
] | 1 | 2017-10-03T19:38:59.000Z | 2017-10-03T19:38:59.000Z | """
.. module:: check_file_names
:synopsis: Given a directory, will search for all files within it and all
sub-directories to check that file names follow MAST HLSP guidelines.
It will identify any files that do not follow the convention, and will
produce warnings for files that might have s... | 35.244565 | 81 | 0.649807 |
1de78c4f77a1891369b46802ee03539e6ffdab98 | 59,253 | py | Python | Projects/Scripting/Python/SimpleGUI/Workspace/modules/gui/tkwrap.py | Thanatisia/SharedSpace | 8c410c05a46a6d7505b3217831096759d142b3d4 | [
"curl"
] | 2 | 2021-09-09T15:25:24.000Z | 2022-03-06T03:03:30.000Z | Projects/Scripting/Python/SimpleGUI/Workspace/modules/gui/tkwrap.py | Thanatisia/SharedSpace | 8c410c05a46a6d7505b3217831096759d142b3d4 | [
"curl"
] | null | null | null | Projects/Scripting/Python/SimpleGUI/Workspace/modules/gui/tkwrap.py | Thanatisia/SharedSpace | 8c410c05a46a6d7505b3217831096759d142b3d4 | [
"curl"
] | null | null | null | ### In-built Modules ###
import os
import sys
import subprocess
import math
# Database Modules
import sqlite3 as sqlite
### External Modules ###
import setup
# setup.install_pip()
# setup.install_if_not_exist("tk")
# if not (setup.linux_distro == "N/A"):
# # ArchLinux
# setup = setup.Setup()
# try:
# ... | 43.568382 | 292 | 0.39971 |
1de7aa7174a90b662ae0d41e4af7027ba10e28d7 | 2,825 | py | Python | linux/rest/usefules/setupthingwine.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | linux/rest/usefules/setupthingwine.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | linux/rest/usefules/setupthingwine.py | petergyorgy/virtue | 3b4dbfbdf9f5e121d9c9887d675fdd3065ecdd3b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
import urllib.request, urllib.parse
import pprint
import json
import sys
import time
from pathlib import Path
#for ignoring invalid certs
#https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error
import ssl
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # Only for ... | 27.970297 | 162 | 0.697345 |
1de7b9237562c3d58b8ee7242334c77f25958c06 | 2,127 | py | Python | src/main/python/programmingtheiot/cda/emulated/HumidifierEmulatorTask.py | Nitinsd96/Air-Pollution-Monitoring-System | 4870223ce7b40b4ea465620a4c3d39cf617c6eff | [
"MIT"
] | null | null | null | src/main/python/programmingtheiot/cda/emulated/HumidifierEmulatorTask.py | Nitinsd96/Air-Pollution-Monitoring-System | 4870223ce7b40b4ea465620a4c3d39cf617c6eff | [
"MIT"
] | null | null | null | src/main/python/programmingtheiot/cda/emulated/HumidifierEmulatorTask.py | Nitinsd96/Air-Pollution-Monitoring-System | 4870223ce7b40b4ea465620a4c3d39cf617c6eff | [
"MIT"
] | null | null | null | #####
#
# This class is part of the Programming the Internet of Things project.
#
# It is provided as a simple shell to guide the student and assist with
# implementation for the Programming the Internet of Things exercises,
# and designed to be modified by the student as needed.
#
import logging
from time import s... | 33.761905 | 127 | 0.759285 |
1de7c7e8aafe2600b03748501faae341e4affbf6 | 8,397 | py | Python | metacyc_build.py | qiyunzhu/utils | a0b6447c860593f4103d003af25849cca4c18324 | [
"BSD-3-Clause"
] | 1 | 2021-09-30T02:15:15.000Z | 2021-09-30T02:15:15.000Z | metacyc_build.py | qiyunzhu/utils | a0b6447c860593f4103d003af25849cca4c18324 | [
"BSD-3-Clause"
] | null | null | null | metacyc_build.py | qiyunzhu/utils | a0b6447c860593f4103d003af25849cca4c18324 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Extract hierarchical mappings and descriptions from the MetaCyc database.
Usage:
python me.py metacyc_data_dir <protein.list>
Notes:
A local copy of the MetaCyc database is needed for running this script.
- metacyc_data_dir: The "data" directory in a MetaCyc release.
- protei... | 32.172414 | 79 | 0.597475 |
1de7cdf30ebb7235eb55d55b86319897df695c0c | 7,662 | py | Python | oscar/apps/partner/utils.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | 1 | 2015-11-07T12:37:50.000Z | 2015-11-07T12:37:50.000Z | oscar/apps/partner/utils.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/partner/utils.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | import os
from decimal import Decimal as D
from django.db.transaction import commit_on_success
from django.utils.translation import ugettext_lazy as _
from oscar.apps.catalogue.categories import create_from_breadcrumbs
from oscar.apps.dashboard.reports.csv_utils import CsvUnicodeReader
from oscar.core.loading import ... | 36.836538 | 158 | 0.609371 |
1de87009668a64804932412c9429696125adebab | 985 | py | Python | sdks/python/test/test_NotifyReleasesContainer.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_NotifyReleasesContainer.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_NotifyReleasesContainer.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 24.625 | 105 | 0.736041 |
1de8778ff94b1a6978109d25863995a1f035c387 | 2,178 | py | Python | superset/__init__.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 7 | 2017-11-01T06:00:12.000Z | 2019-01-05T13:31:48.000Z | superset/__init__.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 7 | 2020-03-24T18:17:39.000Z | 2022-03-29T22:28:10.000Z | superset/__init__.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.884615 | 78 | 0.804867 |
1de88b48b2105f398913b781ef26b95bbef74235 | 313 | py | Python | wheelchair/api/__init__.py | vd2org/wheelchair | 94f833a0f977a94547d1783d57ca7ed61db870b6 | [
"MIT"
] | 3 | 2020-06-17T07:59:08.000Z | 2020-07-05T08:59:11.000Z | wheelchair/api/__init__.py | vd2org/wheelchair | 94f833a0f977a94547d1783d57ca7ed61db870b6 | [
"MIT"
] | null | null | null | wheelchair/api/__init__.py | vd2org/wheelchair | 94f833a0f977a94547d1783d57ca7ed61db870b6 | [
"MIT"
] | null | null | null | # Copyright (C) 2019-2021 by Vd.
# This file is part of Wheelchair, the async CouchDB connector.
# Wheelchair is released under the MIT License (see LICENSE).
from .connection import Connection
from .database import Database, ViewQuery
from .exceptions import *
from .utils import StreamRequest, StreamResponse
| 31.3 | 63 | 0.789137 |
1de89d786ee21b700d6a1340354f153034857d10 | 4,140 | py | Python | utils/common.py | jrasero/fmriprep | cec2db5ae8b94ba7d26de15da0793eb1d1b1afd9 | [
"Info-ZIP"
] | 1 | 2018-10-27T02:46:11.000Z | 2018-10-27T02:46:11.000Z | utils/common.py | jrasero/fmriprep | cec2db5ae8b94ba7d26de15da0793eb1d1b1afd9 | [
"Info-ZIP"
] | 32 | 2017-09-13T15:56:50.000Z | 2021-10-04T15:21:06.000Z | utils/common.py | jrasero/fmriprep | cec2db5ae8b94ba7d26de15da0793eb1d1b1afd9 | [
"Info-ZIP"
] | 4 | 2019-01-17T20:13:08.000Z | 2021-01-14T16:04:26.000Z | """
This module, utils.args.common, hosts the functionality used by all modules in
utils.args. They streamline the 'execute' functionality of the build/validate/execute
paradigm followed in each of the other module-scripts in args.
"""
import os, os.path as op
import subprocess as sp
import re
import logging
log = lo... | 40.194175 | 85 | 0.573188 |
1de8b179601efded9ae8c26a98a9e572f9d30c21 | 3,735 | py | Python | myenv/lib/python3.7/site-packages/google/protobuf/unittest_mset_wire_format_pb2.py | theCydonian/AudioEyes | 3dece4529b31e6c63771c4358457962999bda3b4 | [
"MIT"
] | 4,768 | 2015-01-08T04:45:33.000Z | 2022-03-28T07:32:59.000Z | myenv/lib/python3.7/site-packages/google/protobuf/unittest_mset_wire_format_pb2.py | theCydonian/AudioEyes | 3dece4529b31e6c63771c4358457962999bda3b4 | [
"MIT"
] | 2,599 | 2015-01-06T21:51:28.000Z | 2022-03-30T12:40:09.000Z | venv/Lib/site-packages/google/protobuf/unittest_mset_wire_format_pb2.py | Ammar-Raneez/Craigslist_Scraper | 4d8ef7d65f6cb4bbc7a461828ab02ec9e3006f71 | [
"MIT"
] | 878 | 2015-01-10T00:03:30.000Z | 2022-03-31T22:54:15.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/unittest_mset_wire_format.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf i... | 34.906542 | 366 | 0.802677 |
1de9119ac7823ebddc4858308d1f0dc87896cb95 | 834 | py | Python | pyradio/del_vlc_log.py | jirikrepl/pyradio | 6fae44aafc24acab3e33cf6b2918709a2c4548cb | [
"MIT"
] | 427 | 2015-01-11T18:40:08.000Z | 2022-03-29T03:31:24.000Z | pyradio/del_vlc_log.py | jirikrepl/pyradio | 6fae44aafc24acab3e33cf6b2918709a2c4548cb | [
"MIT"
] | 111 | 2015-03-22T22:40:37.000Z | 2022-03-22T12:04:10.000Z | pyradio/del_vlc_log.py | jirikrepl/pyradio | 6fae44aafc24acab3e33cf6b2918709a2c4548cb | [
"MIT"
] | 93 | 2015-02-20T11:57:04.000Z | 2022-03-07T12:14:04.000Z | import os
from sys import platform
def RemoveWinVlcLogFiles(*args):
''' Removes all VLC log files within pyradio config
directory on Windows.
Files currently in use will not be deleted.
'''
if platform.startswith('win'):
adir = args[0]
# print('config = "{}"'.format(adir))... | 28.758621 | 105 | 0.556355 |
1de92e99b393bd4c08e25cc9e67ba4e2875a060b | 484 | py | Python | referentiel/models/mail_type.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | 1 | 2017-12-13T20:28:32.000Z | 2017-12-13T20:28:32.000Z | referentiel/models/mail_type.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | null | null | null | referentiel/models/mail_type.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
class MailType_Manager(models.Manager):
def web_filter(self, GET):
"""Simple filter used by web request."""
return self.get_query_set().filter(name__icontains=GET['q'])
class MailType(models.Model):
"""
Class events by type which will be show in mail.
"""
name = models.CharField(... | 24.2 | 72 | 0.735537 |
1de9942af930320f84dc23e949602d80042eac44 | 818 | py | Python | automate_openfast/git.py | rafmudaf/automate_openfast | 43e97ffc3d68e5ae4c8e4d95563b8b449de2d984 | [
"Apache-2.0"
] | null | null | null | automate_openfast/git.py | rafmudaf/automate_openfast | 43e97ffc3d68e5ae4c8e4d95563b8b449de2d984 | [
"Apache-2.0"
] | null | null | null | automate_openfast/git.py | rafmudaf/automate_openfast | 43e97ffc3d68e5ae4c8e4d95563b8b449de2d984 | [
"Apache-2.0"
] | null | null | null |
import os
import shutil
import subprocess
class Repo():
def __init__(self, url, local_directory):
self.url = url
self.local_directory = local_directory
def clone(self, branch="master", force=False, shallow=False):
if os.path.isdir(self.local_directory) and not force:
... | 27.266667 | 68 | 0.57335 |
1de9ab705655db9863d9c7d2630f24283c83d44d | 51,490 | py | Python | tensorflow/contrib/layers/python/layers/feature_column_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/layers/python/layers/feature_column_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/layers/python/layers/feature_column_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2015 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... | 44.311532 | 80 | 0.697106 |
1de9bdc2062369032e4c92b1e5cf6cbb8f11d3bb | 5,922 | py | Python | numba/tests/test_print.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | 6 | 2021-10-30T09:00:55.000Z | 2022-03-07T16:33:25.000Z | numba/tests/test_print.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | null | null | null | numba/tests/test_print.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | 1 | 2022-03-16T11:33:50.000Z | 2022-03-16T11:33:50.000Z | from __future__ import print_function
import sys
import numpy as np
import numba.unittest_support as unittest
from numba.compiler import compile_isolated, Flags
from numba import jit, types, errors
from .support import captured_stdout, tag, TestCase
enable_pyobj_flags = Flags()
enable_pyobj_flags.set("enable_pyobj... | 30.525773 | 80 | 0.575988 |
1de9c0dfbc7c115b66b2c64258c5dfc7d4c42550 | 544 | py | Python | KristaBackup/web/webapp/WebAppConfig.py | javister/krista-backup | f8852c20afdf483e842ff22497bdd80eedc30c78 | [
"Apache-2.0"
] | 7 | 2020-07-28T06:53:02.000Z | 2022-03-18T05:23:03.000Z | KristaBackup/web/webapp/WebAppConfig.py | javister/krista-backup | f8852c20afdf483e842ff22497bdd80eedc30c78 | [
"Apache-2.0"
] | 1 | 2020-11-25T16:13:26.000Z | 2020-11-25T16:13:26.000Z | KristaBackup/web/webapp/WebAppConfig.py | javister/krista-backup | f8852c20afdf483e842ff22497bdd80eedc30c78 | [
"Apache-2.0"
] | 1 | 2020-07-28T13:47:09.000Z | 2020-07-28T13:47:09.000Z | # -*- coding: UTF-8 -*-
from common.YamlConfig import AppConfig
class webappconf:
HOST = '127.0.0.1'
if 'web' in AppConfig.conf().keys():
HOST = AppConfig.conf().get('web').get('host', '127.0.0.1')
PORT = 5555
if AppConfig.conf().get('web') and 'port' in AppConfig.conf().get('web', {}).keys():... | 34 | 88 | 0.621324 |
1de9c2635ef87c1388fdb7e1200a5bb111d48bad | 15,477 | py | Python | chroma_core/models/pacemaker.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | chroma_core/models/pacemaker.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | chroma_core/models/pacemaker.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import logging
from django.db import models
from chroma_core.models import AlertStateBase
from chroma_core.models import AlertEvent
from chroma_... | 35.175 | 212 | 0.686309 |
1de9dbe4169827962bd6a87630a16116254d62fe | 295 | py | Python | src/views/simplepage/admin.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | src/views/simplepage/admin.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | src/views/simplepage/admin.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from cms.extensions import PageExtensionAdmin
from .models import SimplePageExtension
class SimplePageExtensionAdmin(PageExtensionAdmin):
"""
A generic website page.
"""
pass
admin.site.register(SimplePageExtension, SimplePageExtensionAdmin)
| 21.071429 | 66 | 0.79322 |
1de9dfd2f97c0a91d9e4faa6e00b8e110e9d4802 | 2,291 | py | Python | superset/models/annotations.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 1 | 2019-12-04T01:30:42.000Z | 2019-12-04T01:30:42.000Z | superset/models/annotations.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 16 | 2021-03-20T05:43:23.000Z | 2022-03-29T22:29:08.000Z | superset/models/annotations.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 3 | 2019-10-28T02:28:58.000Z | 2020-05-21T10:00:32.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.267606 | 81 | 0.704059 |
1de9e2cb928709ca2b475e9688a98c8d397fd224 | 2,099 | py | Python | lapis/models.py | movermeyer/lapis | 623a3fc623a7a8fa8c292912b4172787f772f807 | [
"CC0-1.0"
] | 3 | 2015-02-21T05:32:35.000Z | 2017-04-22T21:18:32.000Z | lapis/models.py | movermeyer/lapis | 623a3fc623a7a8fa8c292912b4172787f772f807 | [
"CC0-1.0"
] | 32 | 2015-02-04T00:52:32.000Z | 2017-03-05T17:17:57.000Z | lapis/models.py | dandesousa/Lapis | 623a3fc623a7a8fa8c292912b4172787f772f807 | [
"CC0-1.0"
] | 1 | 2018-03-05T17:16:16.000Z | 2018-03-05T17:16:16.000Z | from sqlalchemy import Column, ForeignKey, Integer, String, Table, Enum, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
# from sqlalchemy import create_engine
PATH_LEN = 500
VERSION_LEN = 50
STATUS_LEN = 50
Base = declarative_base()
class Site(Base):
__ta... | 31.80303 | 219 | 0.677942 |
1de9e7faf66426883b7755a48e1a9a191989a001 | 9,671 | py | Python | clts/SeedwordExtractor.py | gkaramanolakis/clts | 14356e96910caf2b1c2262cf390873f3dedaa783 | [
"Apache-2.0"
] | 5 | 2020-10-17T17:37:04.000Z | 2021-04-16T02:03:17.000Z | clts/SeedwordExtractor.py | gkaramanolakis/clts | 14356e96910caf2b1c2262cf390873f3dedaa783 | [
"Apache-2.0"
] | 1 | 2021-06-16T15:09:52.000Z | 2021-09-18T04:28:50.000Z | clts/SeedwordExtractor.py | gkaramanolakis/clts | 14356e96910caf2b1c2262cf390873f3dedaa783 | [
"Apache-2.0"
] | 1 | 2021-11-23T16:27:13.000Z | 2021-11-23T16:27:13.000Z | import os
import joblib
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer,TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import StratifiedKFold
from collections import defaultdict
from util import identity_fn
from scipy.special import rel_en... | 52.559783 | 175 | 0.662393 |
1de9eb1f6d0d5489f79943f2b9a9fc07386a139e | 568 | py | Python | 1_code/aux_data/std_tuple_lists.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | 1_code/aux_data/std_tuple_lists.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | 1_code/aux_data/std_tuple_lists.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | """"/**
* @author [Jai Miles]
* @email [jaimiles23@gmail.com]
* @create date 2020-05-06 14:51:07
* @modify date 2020-05-06 14:51:07
* @desc [
Contains standardized tuple lists to reference in the skill.
NOTE:
This module was intended to contain cross-module data message tuples (MTs).
During impl... | 21.846154 | 84 | 0.639085 |
1dea4f06c4aefac29576d710f687899fed17fe10 | 907 | py | Python | source/machine-connector/m2c2-opcda-connector/messages.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/machine-connector/m2c2-opcda-connector/messages.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/machine-connector/m2c2-opcda-connector/messages.py | guikcd/machine-to-cloud-connectivity-framework | 83de873d4df58224f73c6263239681fdd5246186 | [
"Apache-2.0",
"MIT"
] | null | null | null | ## Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0
# Info messages
INF_MSG_JOB_STARTED = "Job started."
INF_MSG_JOB_STOPPED = "Job stopped."
INF_MSG_JOB_UPDATED = "Job updated."
INF_MSG_SERVER_NAME = "Available server: {}"
INF_MSG_PUBLISH_DATA_TO_TOPIC = "... | 50.388889 | 128 | 0.776185 |
1dea5d0743b9498d0284c47084ee77e561a4fc5e | 9,696 | py | Python | QuadrupedalRobots/ETGRL/deployment/utilities/SpotOL.py | WorldEditors/PaddleRobotics | d02efd74662c6f78dfb964e8beb93f1914dcb2f3 | [
"Apache-2.0"
] | 146 | 2020-12-08T11:51:38.000Z | 2022-03-23T12:58:43.000Z | QuadrupedalRobots/ETGRL/deployment/utilities/SpotOL.py | WorldEditors/PaddleRobotics | d02efd74662c6f78dfb964e8beb93f1914dcb2f3 | [
"Apache-2.0"
] | 10 | 2020-12-23T03:00:31.000Z | 2022-03-23T09:55:30.000Z | QuadrupedalRobots/ETGRL/deployment/utilities/SpotOL.py | WorldEditors/PaddleRobotics | d02efd74662c6f78dfb964e8beb93f1914dcb2f3 | [
"Apache-2.0"
] | 43 | 2020-12-21T09:40:39.000Z | 2022-03-31T06:41:32.000Z | # Third party code
#
# The following code are copied or modified from:
# https://github.com/OpenQuadruped/spot_mini_mini/blob/spot/spotmicro/GaitGenerator/Bezier.py
""" Open Loop Controller for Spot Micro. Takes GUI params or uses default
"""
import numpy as np
from random import shuffle
import copy
# Ensuring totally... | 37.436293 | 93 | 0.555074 |
1dea6f53071178d05a953eb23c32d6609a27d012 | 1,786 | py | Python | rls/algorithms/single/ddqn.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/algorithms/single/ddqn.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/algorithms/single/ddqn.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
import torch.nn.functional as F
from rls.algorithms.single.dqn import DQN
from rls.common.decorator import iton
from rls.utils.torch_utils import n_step_return
class DDQN(DQN):
"""
Double DQN, https://arxiv.org/abs/1509.06461
Double DQN + LSTM, https... | 39.688889 | 105 | 0.558231 |
1deaa550160a1a978ddc57b9a0f8d4038a7d6c13 | 346 | py | Python | credoscript/models/chemcompmolstring.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/models/chemcompmolstring.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/models/chemcompmolstring.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from sqlalchemy.orm import deferred
from credoscript import Base, schema
class ChemCompMolString(Base):
'''
'''
__table__ = Base.metadata.tables['%s.chem_comp_structures' % schema['pdbchem']]
# DEFERRED COLUMNS
sdf = deferred(__table__.c.sdf)
pdb = deferred(__table__.c.pdb)
oeb = de... | 26.615385 | 83 | 0.682081 |
1deaa8d756a93dcd5dc2e0a256fb52778c432a02 | 998 | py | Python | widgets/import_data/import_dxf.py | arxitaqu/Importer2OSMbasemap | a373d1dbab3bd7de28461e73f334d93f39a9beb8 | [
"MIT"
] | null | null | null | widgets/import_data/import_dxf.py | arxitaqu/Importer2OSMbasemap | a373d1dbab3bd7de28461e73f334d93f39a9beb8 | [
"MIT"
] | null | null | null | widgets/import_data/import_dxf.py | arxitaqu/Importer2OSMbasemap | a373d1dbab3bd7de28461e73f334d93f39a9beb8 | [
"MIT"
] | null | null | null | '''
Created on 05 nov. 2022
@author: arxit
'''
from __future__ import absolute_import
from builtins import object
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import *
from ... import main
from .import_dxf_dialog import ImportDxfDialog
class ImportDXF(object):
'''
Main class for the DXF imp... | 24.341463 | 136 | 0.602204 |
1deabeb7e48f5b6503da2ab29fcc8bff838f65a1 | 2,278 | py | Python | execution_workflows/DaPars/bin/create_config_file.py | iRNA-COSI/APAeval | cf1032d23ff3020e0b5ba50b3217b94d2b2d728d | [
"MIT"
] | 9 | 2021-05-25T17:01:09.000Z | 2022-02-11T22:07:46.000Z | execution_workflows/DaPars/bin/create_config_file.py | iRNA-COSI/APAeval | cf1032d23ff3020e0b5ba50b3217b94d2b2d728d | [
"MIT"
] | 146 | 2021-05-18T23:55:56.000Z | 2022-03-31T14:34:06.000Z | execution_workflows/DaPars/bin/create_config_file.py | iRNA-COSI/APAeval | cf1032d23ff3020e0b5ba50b3217b94d2b2d728d | [
"MIT"
] | 14 | 2021-05-03T14:38:33.000Z | 2021-08-21T21:21:22.000Z | #!/usr/bin/env python3
import sys
import argparse
import configparser
import os
def parse_args(args=None):
Description = "Create config file for step 2 of DaPars."
Epilog = "Example usage: python create_config_file.py" + \
" <ANNOTATED_3UTR> <BEDGRAPHS_DIR> <OUTPUT_DIR> <NUM_LEAST_IN_GROUP1> <NUM_LEAST_IN... | 29.973684 | 105 | 0.746708 |
1dead3c86f9b4bff450257d651232bcda61b4921 | 9,869 | py | Python | api/wheel_participant.py | craighagan/aws-ops-wheel | aff82e5800dc48a744976bb20e41b18e089897ca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | api/wheel_participant.py | craighagan/aws-ops-wheel | aff82e5800dc48a744976bb20e41b18e089897ca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | api/wheel_participant.py | craighagan/aws-ops-wheel | aff82e5800dc48a744976bb20e41b18e089897ca | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2017 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" fi... | 37.101504 | 118 | 0.667342 |
1deade054a5f19355bd4bac3af76983acc1cb5c4 | 7,742 | py | Python | code/dataset/megadepth_sgp.py | theNded/SGP | 63d33cc8bffde53676d9c4800f4b11804b53b360 | [
"MIT"
] | 137 | 2021-03-05T03:24:30.000Z | 2022-03-30T03:37:57.000Z | code/dataset/megadepth_sgp.py | theNded/SGP | 63d33cc8bffde53676d9c4800f4b11804b53b360 | [
"MIT"
] | 2 | 2021-06-06T20:59:47.000Z | 2021-09-30T03:37:41.000Z | code/dataset/megadepth_sgp.py | theNded/SGP | 63d33cc8bffde53676d9c4800f4b11804b53b360 | [
"MIT"
] | 2 | 2021-04-18T14:47:16.000Z | 2021-04-23T06:43:27.000Z | import os, sys
file_path = os.path.abspath(__file__)
project_path = os.path.dirname(os.path.dirname(file_path))
sys.path.append(project_path)
import cv2
import numpy as np
import open3d as o3d
from dataset.base import DatasetBase
from geometry.image import skew, detect_keypoints, extract_feats, match_feats, estimate... | 33.227468 | 111 | 0.544691 |
1deb0c727d9e2c246ed73a54fc578e7396e7704e | 25,939 | py | Python | forte/models/srl/model.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | forte/models/srl/model.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | forte/models/srl/model.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte 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 applicable ... | 44.416096 | 80 | 0.587494 |
1deb148119562b0f21b8644382b4ca39b401ef0c | 1,015 | py | Python | apischema/conversions/__init__.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | 118 | 2020-05-24T20:22:27.000Z | 2022-03-23T23:04:50.000Z | apischema/conversions/__init__.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | 89 | 2021-02-26T14:22:41.000Z | 2022-03-30T22:17:06.000Z | apischema/conversions/__init__.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | 13 | 2020-12-24T22:43:50.000Z | 2022-03-13T15:03:44.000Z | __all__ = [
"AnyConversion",
"Conversion",
"LazyConversion",
"as_names",
"as_str",
"dataclass_input_wrapper",
"deserializer",
"reset_deserializers",
"reset_serializer",
"serializer",
]
import sys
import warnings
from .conversions import AnyConversion, Conversion, LazyConversion... | 22.555556 | 74 | 0.639409 |
1deb4372d8b2e86678d61a16c27b1b6c5b11bd9f | 45 | py | Python | src/utils/__init__.py | DIAGNijmegen/pathology-artifact-detection | ec614ad74ae161e839fe24ccb23fe98fcbb27cde | [
"Apache-2.0"
] | 6 | 2021-05-26T08:22:42.000Z | 2022-03-07T09:45:30.000Z | src/utils/__init__.py | DIAGNijmegen/pathology-artifact-detection | ec614ad74ae161e839fe24ccb23fe98fcbb27cde | [
"Apache-2.0"
] | 1 | 2021-10-05T06:32:55.000Z | 2021-10-05T06:32:55.000Z | src/utils/__init__.py | DIAGNijmegen/pathology-artifact-detection | ec614ad74ae161e839fe24ccb23fe98fcbb27cde | [
"Apache-2.0"
] | 1 | 2021-09-13T20:24:18.000Z | 2021-09-13T20:24:18.000Z | from .helpers import *
from .labels import *
| 15 | 22 | 0.733333 |
1deb4662470d3163ba3582a17fc069e2d4f8c6cb | 5,325 | py | Python | influxdb_client/domain/range_threshold.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/range_threshold.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/range_threshold.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxd... | 26.492537 | 124 | 0.554178 |
1deb504cea3a51fa52f3f4ea72b29480a7cf6279 | 1,793 | py | Python | playground/fsdet/coco/retentive_rcnn/30shot/seed3/config.py | Megvii-BaseDetection/GFSD | 78c0a938d794584f44d60afab66debd43773d4f7 | [
"Apache-2.0"
] | 23 | 2021-06-25T05:34:31.000Z | 2022-02-08T03:32:00.000Z | playground/fsdet/coco/retentive_rcnn/30shot/seed3/config.py | Megvii-BaseDetection/GFSD | 78c0a938d794584f44d60afab66debd43773d4f7 | [
"Apache-2.0"
] | 6 | 2021-06-30T13:10:21.000Z | 2021-11-04T13:26:39.000Z | playground/fsdet/coco/retentive_rcnn/30shot/seed3/config.py | Megvii-BaseDetection/GFSD | 78c0a938d794584f44d60afab66debd43773d4f7 | [
"Apache-2.0"
] | 1 | 2021-10-12T11:58:14.000Z | 2021-10-12T11:58:14.000Z | import os.path as osp
from cvpods.configs.rcnn_fpn_config import RCNNFPNConfig
_config_dict = dict(
MODEL=dict(
WEIGHTS="/path/to/your/model.pth",
MASK_ON=False,
RESNETS=dict(DEPTH=101),
ROI_HEADS=dict(
NUM_CLASSES=80,
COSINE_ON=True,
COSINE_SCAL... | 27.584615 | 84 | 0.559955 |
1deb5a76ab85dc1d0149aeb0dae07bedec3290af | 1,720 | py | Python | tests/common/test_run/ascend/logical_not_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/logical_not_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/logical_not_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 39.090909 | 112 | 0.698837 |
1deb65b6c7e158ab1947d5d54dff7a957307f176 | 135 | py | Python | gitapi/__init__.py | hoangpt2991/gitapi | 26dfef45987a73aff5b71bbec6b85f039a0b7be7 | [
"MIT",
"Unlicense"
] | 1 | 2017-07-31T09:43:14.000Z | 2017-07-31T09:43:14.000Z | gitapi/__init__.py | hoangpt2991/gitapi | 26dfef45987a73aff5b71bbec6b85f039a0b7be7 | [
"MIT",
"Unlicense"
] | null | null | null | gitapi/__init__.py | hoangpt2991/gitapi | 26dfef45987a73aff5b71bbec6b85f039a0b7be7 | [
"MIT",
"Unlicense"
] | 1 | 2020-12-09T08:46:11.000Z | 2020-12-09T08:46:11.000Z | """Python API to Git
"""
from . import gitapi as _gitapi
Repo = _gitapi.Repo
git_clone = Repo.git_clone
git_command = Repo.command | 22.5 | 32 | 0.725926 |
1deb867b8db98f4c6e7a362900d91308e6e6b925 | 4,977 | py | Python | appengine/swarming/swarming_bot/bot_code/remote_client_grpc_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/swarming/swarming_bot/bot_code/remote_client_grpc_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/swarming/swarming_bot/bot_code/remote_client_grpc_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | #!/usr/bin/env python
# Copyright 2016 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import logging
import sys
import time
import unittest
import test_env_bot_code
test_env_bot_code.setup_test_env()
from dep... | 32.318182 | 80 | 0.690376 |
1debcfe1aa319ad7a9d1bf2a00c314edbdd7a2ed | 399 | py | Python | dl_data_validation_toolset/data_tests/consistency.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 1 | 2017-08-24T00:46:47.000Z | 2017-08-24T00:46:47.000Z | dl_data_validation_toolset/data_tests/consistency.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 177 | 2017-04-10T23:03:27.000Z | 2022-03-28T22:07:54.000Z | dl_data_validation_toolset/data_tests/consistency.py | HEP-DL/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | null | null | null | import logging
from dl_data_validation_toolset.framework import base_test
class ConsistencyTests(base_test.BaseTest):
logger = logging.getLogger('data_tests.labels')
def test_consistent_labels_wires(self):
labels = self._file['label/type']
wires = self._file['image/wires']
valid = int(len(labels) == ... | 30.692308 | 62 | 0.729323 |
1debf68d67d37ad5608a8889c31eea89eb23c576 | 1,676 | py | Python | modl/datasets/image.py | johnbanq/modl | dcabb6b4793db57b858221a1c184741255b6396d | [
"BSD-2-Clause"
] | 135 | 2016-05-04T01:52:44.000Z | 2022-03-01T18:38:13.000Z | modl/datasets/image.py | johnbanq/modl | dcabb6b4793db57b858221a1c184741255b6396d | [
"BSD-2-Clause"
] | 20 | 2016-06-03T12:53:27.000Z | 2020-05-12T22:35:52.000Z | modl/datasets/image.py | johnbanq/modl | dcabb6b4793db57b858221a1c184741255b6396d | [
"BSD-2-Clause"
] | 49 | 2016-05-09T02:48:04.000Z | 2022-03-01T18:40:55.000Z | from sklearn.externals.joblib import Memory
from modl.datasets import get_data_dirs
from os.path import join
from scipy.misc import face
from skimage.io import imread
from skimage.transform import rescale
import numpy as np
def load_image(source,
scale=1,
gray=False,
mem... | 32.230769 | 76 | 0.582339 |
1debfe8a6fa830d234f7f38c115435fcb60ed88d | 154 | py | Python | torchlib/__init__.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | torchlib/__init__.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null | torchlib/__init__.py | CarlosPena00/pytorch-unet | 8365bace23e4b04b9c5b75cd6720807ea8cac5ab | [
"MIT"
] | null | null | null |
__version__ = "0.0"
from torchlib import models
from torchlib import datasets
from torchlib import transforms
from torchlib import post_processing_func
| 19.25 | 41 | 0.837662 |
1dec0ccaf32991476ec4f74eecbbb48d03966b10 | 18,480 | py | Python | tests/bot/cogs/test_snekbox.py | Savant-Dev/bot | cfc5720925b6bbc40c45507f8579145a0014a6eb | [
"MIT"
] | 1 | 2020-05-12T08:26:06.000Z | 2020-05-12T08:26:06.000Z | tests/bot/cogs/test_snekbox.py | Savant-Dev/bot | cfc5720925b6bbc40c45507f8579145a0014a6eb | [
"MIT"
] | null | null | null | tests/bot/cogs/test_snekbox.py | Savant-Dev/bot | cfc5720925b6bbc40c45507f8579145a0014a6eb | [
"MIT"
] | null | null | null | import asyncio
import logging
import unittest
from unittest.mock import AsyncMock, MagicMock, Mock, call, create_autospec, patch
from discord.ext import commands
from bot import constants
from bot.cogs import snekbox
from bot.cogs.snekbox import Snekbox
from tests.helpers import MockBot, MockContext, MockMessage, Moc... | 47.875648 | 113 | 0.63869 |
1dec0eb9d109b539c7aeb7607b4db58865c7bb84 | 6,154 | py | Python | futurefish/dashboard.py | naiyar2000/uwseds-group-nw-climate-crew | c63e49ec0b4fbb08dca71e5d45f5be6e2e0d7147 | [
"MIT"
] | 3 | 2017-10-31T01:25:45.000Z | 2018-02-05T08:12:38.000Z | futurefish/dashboard.py | naiyar2000/uwseds-group-nw-climate-crew | c63e49ec0b4fbb08dca71e5d45f5be6e2e0d7147 | [
"MIT"
] | 17 | 2017-11-16T05:06:57.000Z | 2017-12-14T17:52:35.000Z | futurefish/dashboard.py | naiyar2000/uwseds-group-nw-climate-crew | c63e49ec0b4fbb08dca71e5d45f5be6e2e0d7147 | [
"MIT"
] | 6 | 2017-12-13T04:45:19.000Z | 2022-02-15T01:49:54.000Z | import os
import base64
import futurefish as ff
import dash_core_components as dcc
import dash_html_components as html
APP_STYLE = {}
FULL_WIDTH = {'width': '100%'}
FULL_HEIGHT = {'height': '1000px'}
LEFT_JUSTIFY = {'width': '30%', 'float': 'left'}
RIGHT_JUSTIFY = {'width': '30%', 'float': 'right'}
INFORMATION = """
... | 37.987654 | 78 | 0.574423 |
1dec18e2d9260deac05370aa9bcec668461ced38 | 4,107 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/async_samples/sample_train_model_with_labels_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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.
# --------------------------------------------------------------------... | 44.16129 | 128 | 0.654005 |
1dec3bbf149580370055161876c2dd2e268cf748 | 1,465 | py | Python | parse_dataset.py | DavideTonin99/tesi_forecasting | 394a3854dad1b6ba9ff677b6dd7f7a28d59c79a0 | [
"MIT"
] | null | null | null | parse_dataset.py | DavideTonin99/tesi_forecasting | 394a3854dad1b6ba9ff677b6dd7f7a28d59c79a0 | [
"MIT"
] | null | null | null | parse_dataset.py | DavideTonin99/tesi_forecasting | 394a3854dad1b6ba9ff677b6dd7f7a28d59c79a0 | [
"MIT"
] | null | null | null | import pandas as pd
import os
import sys
from tqdm import tqdm
FOLDER = os.path.join(os.path.dirname(
os.path.realpath(__file__)), "dataset/moscot")
END_DATE = pd.to_datetime('2021-01-01')
START_DATE = pd.to_datetime('2021-01-01') - pd.DateOffset(weeks=104)
def load_csv_timestamp(fname, start_date=None, end_dat... | 29.897959 | 132 | 0.647099 |
1dec5493c9bbbde0d29eef0fd153da868f9f6307 | 5,706 | py | Python | src/azul/service/responseobjects/collection_data_access.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/service/responseobjects/collection_data_access.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/service/responseobjects/collection_data_access.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | from logging import getLogger
from time import sleep
from typing import Dict, List, Optional, Any
from uuid import uuid4
import requests
from azul import config
logger = getLogger(__name__)
class CollectionDataAccess:
DEFAULT_MAX_BACKOFF_TIME = 60
def __init__(self, access_token:str):
self.access_to... | 39.902098 | 117 | 0.563792 |
1dec708dc25f9ee040264337f3ab312549d963b8 | 10,494 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/SEGAPNet/DenseNet121/1/train_f0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/SEGAPNet/DenseNet121/1/train_f0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/SEGAPNet/DenseNet121/1/train_f0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="1"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 36.311419 | 120 | 0.688393 |
1dec86a43de150391d95cf54a988fb5b2accf5e1 | 6,429 | py | Python | vault.py | dsschult/vault | 445f4fe086a054a2cbf3b9cdc485d12c032ed2eb | [
"MIT"
] | null | null | null | vault.py | dsschult/vault | 445f4fe086a054a2cbf3b9cdc485d12c032ed2eb | [
"MIT"
] | null | null | null | vault.py | dsschult/vault | 445f4fe086a054a2cbf3b9cdc485d12c032ed2eb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
A simple password manager.
See README.md or docstrings in classes for details.
"""
import os
import sys
import base64
import pickle
import argparse
import getpass
import string
import secrets
from cryptography.fernet import Fernet
from cryptography.hazmat.backends import default_backend
fr... | 29.763889 | 82 | 0.573184 |
1dec8acf22158f9335c5bd97d717b8ba280d9c40 | 6,582 | py | Python | connectfour/agents/agent_student.py | rmit-s3607407-Tony-Huang/ai1901-connectfour | 3faf58296f8bcb6b99e9707d1e17c5a107c39094 | [
"MIT"
] | 2 | 2019-04-17T07:42:28.000Z | 2019-04-24T08:55:17.000Z | connectfour/agents/agent_student.py | rmit-s3607407-Tony-Huang/ai1901-connectfour | 3faf58296f8bcb6b99e9707d1e17c5a107c39094 | [
"MIT"
] | null | null | null | connectfour/agents/agent_student.py | rmit-s3607407-Tony-Huang/ai1901-connectfour | 3faf58296f8bcb6b99e9707d1e17c5a107c39094 | [
"MIT"
] | null | null | null | from connectfour.agents.computer_player import Agent
import math
PLAYER0 = 0
PLAYER1 = 1
PLAYER2 = 2
WINDOW_LENGTH = 4
class StudentAgent(Agent):
def __init__(self, name):
super().__init__(name)
self.MaxDepth = 5
def get_move(self, board):
valid_moves = board.valid_mov... | 35.387097 | 120 | 0.528411 |
1dec97dc82478cfe7849c0a10d58503e3bb3fcac | 36,717 | py | Python | cdkk/cdkkColours.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | cdkk/cdkkColours.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | cdkk/cdkkColours.py | BrianDunneKK/cdkk | 31444b23b64be92d77ba82cbbdbc0b289bf39524 | [
"MIT"
] | null | null | null | # To Do: Add support for CSS styles
# To Do: Add support for style dictionary - set style based on key - global dictionary?
from cdkk.cdkkUtils import *
class Style(dict):
# Key = Style attribute
# Value = Style value
def get_rgb(self, attribute, default=None):
val = self.get(attribute, default)
... | 30.98481 | 87 | 0.706457 |
1dec9caa6d9945e9c53b922ecf23548a53e10564 | 193 | py | Python | project/sound_store/serializers.py | katesmr/SoundGeneration | d4e5892eedea69fcf2f4fbde75069f2002196a52 | [
"MIT"
] | null | null | null | project/sound_store/serializers.py | katesmr/SoundGeneration | d4e5892eedea69fcf2f4fbde75069f2002196a52 | [
"MIT"
] | null | null | null | project/sound_store/serializers.py | katesmr/SoundGeneration | d4e5892eedea69fcf2f4fbde75069f2002196a52 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import User
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('username', 'email')
| 21.444444 | 50 | 0.709845 |
1decefd78c7de4a1c2a9d3c1ccecc30fe3faa131 | 3,979 | py | Python | tests/base_hdl_test.py | tobygomersall/Ovenbird | b709699fedd23dc510584c8338ad178ede6b8d1e | [
"BSD-3-Clause"
] | 18 | 2015-03-24T16:45:21.000Z | 2022-02-28T09:03:12.000Z | tests/base_hdl_test.py | tobygomersall/Ovenbird | b709699fedd23dc510584c8338ad178ede6b8d1e | [
"BSD-3-Clause"
] | 2 | 2016-08-12T11:09:06.000Z | 2020-09-21T09:21:53.000Z | tests/base_hdl_test.py | tobygomersall/Ovenbird | b709699fedd23dc510584c8338ad178ede6b8d1e | [
"BSD-3-Clause"
] | 3 | 2016-08-09T08:30:47.000Z | 2021-01-13T17:59:08.000Z |
import unittest
from random import randrange
from myhdl import Signal, intbv
from mock import patch, call
def get_signed_intbv_rand_signal(width, val_range=None, init_value=0):
'''Create a signed intbv random signal.
'''
if val_range is not None:
min_val = val_range[0]
max_val = val_range... | 34.301724 | 80 | 0.629053 |
1ded1889b358e2a992891f8a7d0420fbc6ff98f0 | 1,696 | py | Python | setup.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 159 | 2015-07-26T15:14:44.000Z | 2022-03-31T03:29:25.000Z | setup.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 77 | 2016-06-12T21:44:43.000Z | 2022-03-31T19:33:49.000Z | setup.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 64 | 2015-10-26T01:34:32.000Z | 2022-03-14T14:43:08.000Z | #!/usr/bin/env python3
from setuptools import setup, find_packages
from somaticseq._version import __version__ as version
print(version)
setup(
name='SomaticSeq',
version=version,
description='SomaticSeq: An ensemble approach to accurately detect somatic mutations using SomaticSeq',
author='Li Tai F... | 43.487179 | 107 | 0.680425 |
1ded24188d5d64b24a35d44c47294227514252ab | 11,176 | py | Python | msoffcrypto/format/doc97.py | DidierStevens/msoffcrypto-tool | f746a38ed174910195ed3b9bdff4ea5b075a2055 | [
"MIT"
] | 6 | 2018-06-06T12:22:33.000Z | 2021-02-04T19:19:44.000Z | msoffcrypto/format/doc97.py | DidierStevens/msoffcrypto-tool | f746a38ed174910195ed3b9bdff4ea5b075a2055 | [
"MIT"
] | null | null | null | msoffcrypto/format/doc97.py | DidierStevens/msoffcrypto-tool | f746a38ed174910195ed3b9bdff4ea5b075a2055 | [
"MIT"
] | 4 | 2018-07-24T13:38:12.000Z | 2021-05-23T22:20:55.000Z | import logging, io, shutil, tempfile
from struct import pack, unpack_from
from collections import namedtuple
import olefile
from . import base
from ..method.rc4 import DocumentRC4
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
FibBase = namedtuple('FibBase', [
'wIdent',
'nFib'... | 30.958449 | 101 | 0.590014 |
1ded3abca78785d45355b6567cfe9c53dde9ceb4 | 1,454 | py | Python | homesensing_app_project/homesensing/alembic/env.py | matteoferla/Somewhat-Smart-Home | aa3b3855648b1732c733e8cc604ab2f0124d12c4 | [
"MIT"
] | null | null | null | homesensing_app_project/homesensing/alembic/env.py | matteoferla/Somewhat-Smart-Home | aa3b3855648b1732c733e8cc604ab2f0124d12c4 | [
"MIT"
] | null | null | null | homesensing_app_project/homesensing/alembic/env.py | matteoferla/Somewhat-Smart-Home | aa3b3855648b1732c733e8cc604ab2f0124d12c4 | [
"MIT"
] | null | null | null | """Pyramid bootstrap environment. """
from alembic import context
from pyramid.paster import get_appsettings, setup_logging
from sqlalchemy import engine_from_config
from homesensing.models.meta import Base
config = context.config
setup_logging(config.config_file_name)
settings = get_appsettings(config.config_file_... | 24.644068 | 64 | 0.722834 |
1ded594c602de8e3c290271ab21c4a3440e5655e | 3,544 | py | Python | src/broadcaster/broadcaster.py | vt-sailbot/sailbot-19 | a9252e9415d3fef62e4baf813306bdc07fb69781 | [
"MIT"
] | 1 | 2019-05-29T19:32:48.000Z | 2019-05-29T19:32:48.000Z | src/broadcaster/broadcaster.py | vt-sailbot/sailbot-19 | a9252e9415d3fef62e4baf813306bdc07fb69781 | [
"MIT"
] | 3 | 2019-02-23T13:33:47.000Z | 2019-08-18T12:54:56.000Z | src/broadcaster/broadcaster.py | vt-sailbot/sailbot-19 | a9252e9415d3fef62e4baf813306bdc07fb69781 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from datetime import datetime
from enum import Enum
from pubsub import pub
class BroadcasterType(Enum):
Testable = 0,
Messenger = 1,
FileWriter = 2
class Broadcaster(ABC):
"""An abstract class to hide the interface required to notify the rest of the system of air... | 29.533333 | 112 | 0.639673 |
1ded64026909b5fd03f2766781202fe32e4f380d | 29,137 | py | Python | python/ray/serve/master.py | jody3t/ray-jo | 94dc11b6fb2b077ca0a2d4d0d376adfb2002c795 | [
"Apache-2.0"
] | 78 | 2022-02-02T00:23:02.000Z | 2022-03-15T11:44:02.000Z | python/ray/serve/master.py | jody3t/ray-jo | 94dc11b6fb2b077ca0a2d4d0d376adfb2002c795 | [
"Apache-2.0"
] | null | null | null | python/ray/serve/master.py | jody3t/ray-jo | 94dc11b6fb2b077ca0a2d4d0d376adfb2002c795 | [
"Apache-2.0"
] | 3 | 2022-01-30T05:10:14.000Z | 2022-03-04T21:18:44.000Z | import asyncio
from collections import defaultdict
import os
import random
import time
import ray
import ray.cloudpickle as pickle
from ray.serve.backend_worker import create_backend_worker
from ray.serve.constants import (ASYNC_CONCURRENCY, SERVE_ROUTER_NAME,
SERVE_PROXY_NAME, SERVE_M... | 43.358631 | 79 | 0.630916 |
1ded6f89e06191e261a207f1f41348888dabcec8 | 623 | py | Python | server/SudokuStep.py | wjl57/SudokuApp | c83f6dbd001bb4fceeb809475e72dbcee63592b0 | [
"MIT"
] | 1 | 2016-01-22T15:00:26.000Z | 2016-01-22T15:00:26.000Z | server/SudokuStep.py | wjl57/SudokuApp | c83f6dbd001bb4fceeb809475e72dbcee63592b0 | [
"MIT"
] | null | null | null | server/SudokuStep.py | wjl57/SudokuApp | c83f6dbd001bb4fceeb809475e72dbcee63592b0 | [
"MIT"
] | null | null | null | __author__ = 'william'
class SudokuStep:
def __init__(self, filled_cell, updated_cells, reason):
# A (cell_name, val) tuple set by this method
self.filled_cell = filled_cell
# A set of (cell name, removed possibility) tuples for the cells with possibilities removed
self.updated_ce... | 31.15 | 99 | 0.645265 |
1dedc4192efb02780f4846cae588804f04782aa8 | 27 | py | Python | rusentrel/default.py | nicolay-r/are-networks-experiments | 3831bfda75fae1d3a336fc808af2b671df0efb45 | [
"MIT"
] | 2 | 2021-06-30T18:58:32.000Z | 2021-12-01T07:02:32.000Z | rusentrel/default.py | nicolay-r/are-networks-experiments | 3831bfda75fae1d3a336fc808af2b671df0efb45 | [
"MIT"
] | 16 | 2020-10-20T20:22:27.000Z | 2021-02-21T11:46:07.000Z | rusentrel/default.py | nicolay-r/are-networks-experiments | 3831bfda75fae1d3a336fc808af2b671df0efb45 | [
"MIT"
] | 1 | 2021-03-29T20:58:26.000Z | 2021-03-29T20:58:26.000Z | MI_CONTEXTS_PER_OPINION = 3 | 27 | 27 | 0.888889 |
1dedd8e1ef283788f1184f2e1f3c3c03332215bf | 4,832 | py | Python | test_full_parallel_cleanup.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | test_full_parallel_cleanup.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | test_full_parallel_cleanup.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | import os
import shutil
import pandas as pd
from splitter.dataflow.agg import count, counts
from splitter.full_manager.condition import Condition
from splitter.full_manager.full_manager import FullStorageManager
from splitter.full_manager.full_video_processing import CropSplitter
from splitter.constants import *
from ... | 38.656 | 190 | 0.63721 |
1deddb8bc64169c329ec22df884605bedab4bbd1 | 3,826 | py | Python | aaaaaa/InputHandler.py | ROYALBEFF/aaaaaa_arcade_game | 36eb8e9a9cdc54f13d54c28fd4ba990faa14f7c0 | [
"MIT"
] | null | null | null | aaaaaa/InputHandler.py | ROYALBEFF/aaaaaa_arcade_game | 36eb8e9a9cdc54f13d54c28fd4ba990faa14f7c0 | [
"MIT"
] | 3 | 2019-02-26T18:06:50.000Z | 2019-05-10T08:33:35.000Z | aaaaaa/InputHandler.py | ROYALBEFF/aaaaaa_arcade_game | 36eb8e9a9cdc54f13d54c28fd4ba990faa14f7c0 | [
"MIT"
] | null | null | null | import pygame
class InputHandler:
def __init__(self):
pass
@staticmethod
def in_game_input(state, player, screen):
"""
Handle keyboard input while in-game.
Handles movement, use of items and pause.
:param state:
Current game state.
:param play... | 31.619835 | 68 | 0.485625 |
1dede03fcf19c7cd46aeb65cfb352eeedde6e7fc | 1,430 | py | Python | setup.py | Koodous/python-sdk | 987a8d48d1fb1ba599375dc55cb2d283a8cd34c8 | [
"Apache-2.0"
] | 19 | 2016-11-24T06:13:20.000Z | 2021-07-02T05:06:38.000Z | setup.py | Koodous/python-sdk | 987a8d48d1fb1ba599375dc55cb2d283a8cd34c8 | [
"Apache-2.0"
] | 18 | 2015-12-05T14:09:24.000Z | 2021-06-07T11:55:53.000Z | setup.py | Koodous/python-sdk | 987a8d48d1fb1ba599375dc55cb2d283a8cd34c8 | [
"Apache-2.0"
] | 10 | 2015-12-04T20:01:53.000Z | 2020-12-02T07:30:03.000Z | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = ['Click>=7.0', ]
test_requirements = [ ]
setup(
author="... | 28.6 | 86 | 0.635664 |
1deded4e7cfc994632440c00c4d080c476045dc4 | 14,557 | py | Python | synapse/models/geospace.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | 1 | 2021-02-15T22:07:05.000Z | 2021-02-15T22:07:05.000Z | synapse/models/geospace.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | synapse/models/geospace.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | import synapse.exc as s_exc
import synapse.lib.gis as s_gis
import synapse.lib.layer as s_layer
import synapse.lib.types as s_types
import synapse.lib.module as s_module
import synapse.lib.grammar as s_grammar
units = {
'mm': 1,
'cm': 10,
'm': 1000,
'meters': 1000,
'km': 1000000,
}
distrepr = (... | 37.518041 | 122 | 0.438071 |
1dee32d080c3ca7bca11a9260f2bb901e3e1c085 | 6,466 | py | Python | fugue/dataframe/dataframe_iterable_dataframe.py | LaurentErreca/fugue | 73d551b4d25b50b3d9051dd765e6111db2e3fc76 | [
"Apache-2.0"
] | null | null | null | fugue/dataframe/dataframe_iterable_dataframe.py | LaurentErreca/fugue | 73d551b4d25b50b3d9051dd765e6111db2e3fc76 | [
"Apache-2.0"
] | null | null | null | fugue/dataframe/dataframe_iterable_dataframe.py | LaurentErreca/fugue | 73d551b4d25b50b3d9051dd765e6111db2e3fc76 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, Iterable, List, Optional
import pandas as pd
import pyarrow as pa
from fugue.dataframe.array_dataframe import ArrayDataFrame
from fugue.dataframe.dataframe import DataFrame, LocalDataFrame, LocalUnboundedDataFrame
from fugue.exceptions import FugueDataFrameInitError
from triad import Sche... | 36.325843 | 88 | 0.613826 |
1dee589ed55c0f83c186352a9a713e2bf65ecee3 | 2,578 | py | Python | leetcode_python/Hash_table/strobogrammatic-number.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Hash_table/strobogrammatic-number.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Hash_table/strobogrammatic-number.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | """
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).
Write a function to determine if a number is strobogrammatic. The number is represented as a string.
For example, the numbers "69", "88", and "818" are all strobogrammatic.
"""
# V0
class Solution(object):... | 27.72043 | 106 | 0.484872 |
1dee7278089a87c1431e298f6a5b0a478e4a94bb | 5,690 | py | Python | reports/tests.py | tiagocordeiro/zumaq-partners | ba2c5d4257438ec062ef034096cd203efe58ef4a | [
"MIT"
] | 1 | 2019-02-13T11:01:25.000Z | 2019-02-13T11:01:25.000Z | reports/tests.py | tiagocordeiro/zumaq-partners | ba2c5d4257438ec062ef034096cd203efe58ef4a | [
"MIT"
] | 619 | 2018-11-26T06:11:05.000Z | 2022-03-31T22:56:13.000Z | reports/tests.py | tiagocordeiro/zumaq-partners | ba2c5d4257438ec062ef034096cd203efe58ef4a | [
"MIT"
] | 1 | 2020-03-12T16:34:13.000Z | 2020-03-12T16:34:13.000Z | from django.contrib.auth.models import AnonymousUser, User, Group
from django.test import RequestFactory, TestCase, Client
from .views import reports_dashboard, products_report, pedidos_report, parceiros_report, download_excel_products_data
class ReportsViewsTests(TestCase):
def setUp(self):
# Every test... | 37.189542 | 117 | 0.704745 |
1dee81b7a75af71d88da2cf9344a100f27f762d5 | 4,848 | py | Python | scripts/autoroutes.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | 1 | 2017-08-11T20:37:21.000Z | 2017-08-11T20:37:21.000Z | scripts/autoroutes.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | scripts/autoroutes.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
autoroutes writes routes for you based on a simpler routing
configuration file called routes.conf. Example:
----- BEGIN routes.conf-------
127.0.0.1 /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/default
----- END ----------
It m... | 35.647059 | 116 | 0.615512 |
1deeaa26a0864b3e8d172109489c90b8040aa478 | 276 | py | Python | tests/helpers.py | bfontaine/didelcli | c3f36d8597819c9dec40318c220e86cb9c87d4c3 | [
"MIT"
] | null | null | null | tests/helpers.py | bfontaine/didelcli | c3f36d8597819c9dec40318c220e86cb9c87d4c3 | [
"MIT"
] | 4 | 2015-01-30T22:28:15.000Z | 2019-10-03T05:29:27.000Z | tests/helpers.py | bfontaine/didelcli | c3f36d8597819c9dec40318c220e86cb9c87d4c3 | [
"MIT"
] | 1 | 2015-01-28T14:08:15.000Z | 2015-01-28T14:08:15.000Z | # -*- coding: UTF-8 -*-
import platform
# builtin (before 3.0) function 'reload(<module>)'
# from https://github.com/bfontaine/term2048/blob/3e36f1b0/tests/helpers.py#L26
if platform.python_version() < '3.0':
reload = reload
else:
import imp
reload = imp.reload
| 23 | 79 | 0.684783 |
1deeae5a0d6982a57c0dc11d0baaf6c0f886613b | 6,306 | py | Python | src/SourceCatalogProvider.py | LCOGT/lcowcstools | e5db536647dbb143a1f75293ec4f2a4acb68182b | [
"BSD-3-Clause"
] | null | null | null | src/SourceCatalogProvider.py | LCOGT/lcowcstools | e5db536647dbb143a1f75293ec4f2a4acb68182b | [
"BSD-3-Clause"
] | null | null | null | src/SourceCatalogProvider.py | LCOGT/lcowcstools | e5db536647dbb143a1f75293ec4f2a4acb68182b | [
"BSD-3-Clause"
] | null | null | null | import abc
import re
import numpy as np
from astropy.io import fits
from astropy.wcs import WCS
from astropy.table import Table
import sep
import os
import logging
from gaiaastrometryservicetools import astrometryServiceRefineWCSFromCatalog
import matplotlib.pyplot as plt
__author__ = 'drharbeck@gmail.com'
log = log... | 36.877193 | 118 | 0.603235 |
1deeb1be4efa474c2eb3f0c829f56da586db1aef | 4,874 | py | Python | pyrcon/rcon.py | texnofobix/pyrcon | fa9eddb57dc4ee4cbdb2cf90925397dfaa9d8d32 | [
"MIT"
] | 1 | 2021-12-20T16:52:12.000Z | 2021-12-20T16:52:12.000Z | pyrcon/rcon.py | texnofobix/pyrcon | fa9eddb57dc4ee4cbdb2cf90925397dfaa9d8d32 | [
"MIT"
] | null | null | null | pyrcon/rcon.py | texnofobix/pyrcon | fa9eddb57dc4ee4cbdb2cf90925397dfaa9d8d32 | [
"MIT"
] | 1 | 2021-12-20T16:52:27.000Z | 2021-12-20T16:52:27.000Z | """
Multipurpose RCON library in Python
by Anthony Nguyen
updated to Python3 by Dustin S (texnofobix)
MIT Licensed, see LICENSE
"""
import threading as thread
import socket
import time
class RconError(Exception):
"""Raised whenever a RCON command cannot be evaluated"""
pass
class RConnection(object):
"... | 30.654088 | 76 | 0.583299 |
1deebc9b54829cde12220be8025f6d57f9f9950a | 2,458 | py | Python | loss/LADELoss.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 78 | 2020-11-30T09:46:01.000Z | 2022-03-30T02:42:48.000Z | loss/LADELoss.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 18 | 2020-12-30T10:39:11.000Z | 2022-03-21T07:27:27.000Z | loss/LADELoss.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 8 | 2020-12-02T15:41:23.000Z | 2022-02-26T11:57:37.000Z | """Copyright (c) Hyperconnect, Inc. and its affiliates.
All rights reserved.
"""
import functools
import numpy as np
import torch
from torch import nn
import torch.nn.functional as F
from utils import *
class LADELoss(nn.Module):
def __init__(self, num_classes=10, img_max=None, prior=None, prior_txt=None, remin... | 38.40625 | 129 | 0.669243 |
1deebce22fc7e95ba0d2bbcd716984fc88afe11f | 4,595 | py | Python | delfin/tests/unit/task_manager/test_alert_task.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 19 | 2020-07-28T00:13:43.000Z | 2022-02-15T16:44:21.000Z | delfin/tests/unit/task_manager/test_alert_task.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 581 | 2020-06-22T15:20:58.000Z | 2022-03-31T04:06:14.000Z | delfin/tests/unit/task_manager/test_alert_task.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 153 | 2021-03-10T09:32:08.000Z | 2022-02-22T01:32:32.000Z | # Copyright 2021 The SODA 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 wri... | 39.612069 | 78 | 0.682263 |
1deef46a22b6705c88ba8ab7850cebd894f6ac08 | 4,556 | py | Python | wavetorch/core/train.py | NunoEdgarGFlowHub/wavetorch | e6171b69e66e16a2ba4c76869d4e0b15a3e9861f | [
"MIT"
] | 1 | 2019-09-17T06:15:16.000Z | 2019-09-17T06:15:16.000Z | wavetorch/core/train.py | NunoEdgarGFlowHub/wavetorch | e6171b69e66e16a2ba4c76869d4e0b15a3e9861f | [
"MIT"
] | null | null | null | wavetorch/core/train.py | NunoEdgarGFlowHub/wavetorch | e6171b69e66e16a2ba4c76869d4e0b15a3e9861f | [
"MIT"
] | null | null | null | import torch
import time
import numpy as np
from .utils import accuracy_onehot, save_model
from sklearn.metrics import confusion_matrix
import pandas as pd
import copy
def train(model, optimizer, criterion, train_dl, test_dl,
N_epochs : int, batch_size : int, history=None, history_model_state=[],
... | 35.874016 | 159 | 0.532046 |
1def02d4d700c81a12028c3a2051754fe0c21dd6 | 5,205 | py | Python | listen/test/event_based_scan/test_data/event_payload_port_update.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/test/event_based_scan/test_data/event_payload_port_update.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/test/event_based_scan/test_data/event_payload_port_update.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 50.048077 | 116 | 0.62536 |
1defac0222ad763e0f97918baf4ce76d43515bc6 | 5,126 | py | Python | src/spn/structure/leaves/histogram/Histograms.py | SwarajPawar/SPFlow | ac128935a901359679a098b51ac70ba0f9d7d687 | [
"Apache-2.0"
] | 2 | 2021-09-29T19:51:25.000Z | 2021-09-29T19:51:27.000Z | src/spn/structure/leaves/histogram/Histograms.py | minimum-LaytonC/SPFlow | 6890436c9b9ebd2cac02e9fe8e902f3b82b6abbc | [
"Apache-2.0"
] | null | null | null | src/spn/structure/leaves/histogram/Histograms.py | minimum-LaytonC/SPFlow | 6890436c9b9ebd2cac02e9fe8e902f3b82b6abbc | [
"Apache-2.0"
] | 1 | 2022-03-01T20:14:19.000Z | 2022-03-01T20:14:19.000Z | """
Created on March 20, 2018
@author: Alejandro Molina
"""
from collections import namedtuple
import numpy as np
from spn.structure.Base import Leaf
from spn.structure.StatisticalTypes import MetaType, Type
import logging
logger = logging.getLogger(__name__)
rpy_initialized = False
def init_rpy():
if rpy_ini... | 32.238994 | 112 | 0.634803 |
1defdfa5c5e4285bfdbeb9cf1a6774cd84f44fb4 | 762 | py | Python | data_maker.py | klingj3/RCOS-Microfossil-Sorter | 26b5906913dda60b4c9c0de10eee201d3512befd | [
"MIT"
] | 3 | 2018-12-11T21:30:59.000Z | 2020-11-01T07:54:51.000Z | data_maker.py | klingj3/RCOS-Microfossil-Sorter | 26b5906913dda60b4c9c0de10eee201d3512befd | [
"MIT"
] | 16 | 2018-01-30T21:42:41.000Z | 2018-01-30T21:51:31.000Z | data_maker.py | klingj3/RCOS-Microfossil-Sorter | 26b5906913dda60b4c9c0de10eee201d3512befd | [
"MIT"
] | 1 | 2019-01-22T21:44:10.000Z | 2019-01-22T21:44:10.000Z |
import comp_vis.calibration_tools as ct
import comp_vis.img_tools as it
import comp_vis.live_tools as lt
import sys
def main():
# Check that requisite arguments have been provided
if len(sys.argv) < 4:
sys.stderr.write("ERROR: Not all arguments provided. Should follow format:\n" +
... | 31.75 | 104 | 0.711286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.