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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5871f5a275aa84669bc0e830a79b7b0102fb089 | 14,052 | py | Python | gluon/contrib/pyrtf/PropertySets.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 1,573 | 2015-01-01T07:19:06.000Z | 2022-03-30T09:06:06.000Z | gluon/contrib/pyrtf/PropertySets.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 1,691 | 2015-01-03T11:03:23.000Z | 2022-03-30T07:27:28.000Z | gluon/contrib/pyrtf/PropertySets.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 895 | 2015-01-03T19:56:15.000Z | 2022-03-18T18:30:57.000Z | """
PropertySets group common attributes together, each property set is used to control a specific part of the rendering.
PropertySets can be used in different elements of the document.
For example the FramePropertySet is used in paragraphs, tables, cells, etc.
The TextPropertySet can be used for text or in a Paragr... | 28.387879 | 175 | 0.582835 |
d58722ad1187377ba0036cd71b13e54e131688d6 | 945 | py | Python | app/run.py | indera/olass-server | 7e230106f1436ab6e08f90e19435cc20ebdf71ff | [
"MIT"
] | null | null | null | app/run.py | indera/olass-server | 7e230106f1436ab6e08f90e19435cc20ebdf71ff | [
"MIT"
] | null | null | null | app/run.py | indera/olass-server | 7e230106f1436ab6e08f90e19435cc20ebdf71ff | [
"MIT"
] | 1 | 2016-06-28T18:30:42.000Z | 2016-06-28T18:30:42.000Z | #!/usr/bin/env python
"""
Goal: Implement the application entry point for debugging.
Note: This file is *not* used for production deployment.
For production we use run-wsgi.py
@authors:
Andrei Sura <sura.andrei@gmail.com>
"""
import argparse
from olass.main import app
from olass import initializer
from config ... | 29.53125 | 68 | 0.653968 |
d5875dc6a40af7b23ed76f5b721b3004ff1269d8 | 16,557 | py | Python | pycolab/ascii_art.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | null | null | null | pycolab/ascii_art.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | 2 | 2019-06-18T14:12:26.000Z | 2019-06-18T14:55:10.000Z | pycolab/ascii_art.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | 1 | 2019-06-11T15:07:59.000Z | 2019-06-11T15:07:59.000Z | # Copyright 2017 the pycolab 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 45.237705 | 107 | 0.690524 |
d587c00efc99afd81874494cad6708bd3d739cf4 | 3,979 | py | Python | alipay/aop/api/request/AntProdpaasGrmcoreProgramQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AntProdpaasGrmcoreProgramQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AntProdpaasGrmcoreProgramQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AntProdpaasGrmcoreProgramQueryModel import AntProdpaasGrmcoreProgramQueryModel
class AntProdpaasGrmcoreProgramQueryRequest(object):
... | 27.441379 | 148 | 0.645388 |
d587c807a1d702a9c9b98e7ce7a53dd1916395d9 | 39,035 | py | Python | src/sqlfluff/core/parser/grammar/base.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | src/sqlfluff/core/parser/grammar/base.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | src/sqlfluff/core/parser/grammar/base.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | 1 | 2021-03-07T21:49:52.000Z | 2021-03-07T21:49:52.000Z | """Base grammar, Ref, Anything and Nothing."""
import copy
from typing import List, NamedTuple, Optional, Union, Type, Tuple, Any
from sqlfluff.core.errors import SQLParseError
from sqlfluff.core.string_helpers import curtail_string
from sqlfluff.core.parser.segments import BaseSegment, EphemeralSegment
from sqlfluf... | 42.942794 | 139 | 0.537492 |
d58812472c9fdbad065f4d114e23a579b8c099d6 | 13 | py | Python | ilurl/__init__.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | 2 | 2019-10-18T17:04:50.000Z | 2019-10-18T17:05:04.000Z | ilurl/__init__.py | CubeSkyy/ILU-RL | 676d88587e1d8638487de1b5a3f8785a7375ad1a | [
"MIT"
] | 17 | 2019-11-20T09:33:50.000Z | 2020-01-30T14:57:40.000Z | ilurl/__init__.py | gsavarela/ilurl | e4db9744c28f9e04ae82c884f131ee8cd9601cc8 | [
"MIT"
] | 2 | 2021-03-13T15:38:05.000Z | 2021-05-08T22:25:36.000Z | name = "ilu"
| 6.5 | 12 | 0.538462 |
d58840ba19e74c66edc1fd24878cdfcba0b5d320 | 3,870 | py | Python | example/project/settings.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | example/project/settings.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | example/project/settings.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for project project.
Generated by 'django-admin startproject' using Django 1.11.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | 24.807692 | 90 | 0.703101 |
d588489a8b8092ced93208890c4a762e63a3e4a3 | 1,847 | py | Python | tests/h/presenters/organization_json_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | tests/h/presenters/organization_json_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | tests/h/presenters/organization_json_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from h.presenters.organization_json import OrganizationJSONPresenter
from h.models.organization import Organization
from h.traversal import OrganizationContext
class TestOrganizationJSONPresenter:
def test_organization_asdict_no_logo... | 34.203704 | 85 | 0.697347 |
d5886c8656d4c2117a5d5f255336f1a1b10e7e24 | 10,173 | py | Python | adamacs/scan.py | SFB1089/database-main | bbafbd3c499655c5532628a36611b1bb335fb4e6 | [
"MIT"
] | null | null | null | adamacs/scan.py | SFB1089/database-main | bbafbd3c499655c5532628a36611b1bb335fb4e6 | [
"MIT"
] | 1 | 2021-10-05T15:56:40.000Z | 2021-10-05T15:56:40.000Z | adamacs/scan.py | SFB1089/database-main | bbafbd3c499655c5532628a36611b1bb335fb4e6 | [
"MIT"
] | null | null | null | import datajoint as dj
import pathlib
import importlib
import inspect
from adamacs import session, surgery
from . import find_root_directory
schema = dj.schema()
def get_imaging_root_data_dir() -> str:
"""
All data paths, directories in DataJoint Elements are recommended to be stored as
relative paths (po... | 43.105932 | 155 | 0.546053 |
d58884fc7783c8eaebadc46071aaed793fa2c1e8 | 31,940 | py | Python | dev/run-tests.py | xinjinhan/Spark-scheduling-huaweiTest | dfa8232e6117f87a9a4071ebb74b4c46c6d3f629 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | dev/run-tests.py | xinjinhan/Spark-scheduling-huaweiTest | dfa8232e6117f87a9a4071ebb74b4c46c6d3f629 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | dev/run-tests.py | xinjinhan/Spark-scheduling-huaweiTest | dfa8232e6117f87a9a4071ebb74b4c46c6d3f629 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# 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 "L... | 40.328283 | 100 | 0.657326 |
d5889b2c1bc0f09c46d2060812bcbbec87a7b35b | 9,838 | py | Python | pcstac/pcstac/client.py | developmentseed/planetary-computer-apis | 174db793bfe9f572fff13b04e13bac1005d212fc | [
"MIT"
] | 36 | 2021-11-02T16:13:47.000Z | 2022-03-29T16:34:58.000Z | pcstac/pcstac/client.py | microsoft/planetary-computer-apis | 140248f1826f6799f17ace20367a487b31403e49 | [
"MIT"
] | 25 | 2021-11-01T15:27:40.000Z | 2022-03-29T17:53:05.000Z | pcstac/pcstac/client.py | developmentseed/planetary-computer-apis | 174db793bfe9f572fff13b04e13bac1005d212fc | [
"MIT"
] | 10 | 2021-11-02T16:09:58.000Z | 2022-03-25T18:32:15.000Z | import logging
import time
from typing import Any, List, Optional, Type
from urllib.parse import urljoin
import attr
from stac_fastapi.pgstac.core import CoreCrudClient
from stac_fastapi.types.errors import NotFoundError
from stac_fastapi.types.stac import (
Collection,
Collections,
Item,
ItemCollectio... | 36.03663 | 87 | 0.639256 |
d588b24723179133b17b1965e78a73e673a23abd | 1,212 | py | Python | dwave_networkx/algorithms/__init__.py | dwavesystems/dwave_networkx | 4bc824213f9784073261251aa081ae72f42490ba | [
"Apache-2.0"
] | 73 | 2017-09-26T10:59:19.000Z | 2020-11-20T12:02:11.000Z | dwave_networkx/algorithms/__init__.py | dwavesystems/dwave_networkx | 4bc824213f9784073261251aa081ae72f42490ba | [
"Apache-2.0"
] | 140 | 2017-10-20T18:17:51.000Z | 2020-12-02T23:59:41.000Z | dwave_networkx/algorithms/__init__.py | dwavesystems/dwave_networkx | 4bc824213f9784073261251aa081ae72f42490ba | [
"Apache-2.0"
] | 51 | 2017-09-28T12:33:42.000Z | 2020-12-02T23:10:06.000Z | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 44.888889 | 77 | 0.792904 |
d588efe2086262cd02e0228e249b3a7e84cf0b8d | 956 | py | Python | helpcenter/migrations/0002_category.py | smalls12/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | 4 | 2017-07-30T17:43:36.000Z | 2021-09-14T04:26:37.000Z | helpcenter/migrations/0002_category.py | cdriehuys/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | 20 | 2016-06-30T04:52:26.000Z | 2016-09-30T04:52:15.000Z | helpcenter/migrations/0002_category.py | cdriehuys/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-05 11:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('helpcenter', '0001_initial'),
]
operations = [
... | 38.24 | 238 | 0.65795 |
d58998c769d6399cb988c1b3acb822c919035a9c | 40,785 | py | Python | appyters/Bulk_RNA_seq/utils.py | shui02/appyter-catalog | dfa15946d151daeb7d7b1bc9af9e48428474f012 | [
"CC0-1.0"
] | null | null | null | appyters/Bulk_RNA_seq/utils.py | shui02/appyter-catalog | dfa15946d151daeb7d7b1bc9af9e48428474f012 | [
"CC0-1.0"
] | null | null | null | appyters/Bulk_RNA_seq/utils.py | shui02/appyter-catalog | dfa15946d151daeb7d7b1bc9af9e48428474f012 | [
"CC0-1.0"
] | null | null | null | from rpy2 import robjects
from rpy2.robjects import r, pandas2ri
# Basic libraries
import pandas as pd
import os
import urllib3
import requests, json
import sys
import geode
import random
from time import sleep
import time
import numpy as np
import warnings
import base64
# Visualization
import plotly
from plotly imp... | 45.569832 | 626 | 0.644771 |
d589a037968bcf740aed2dcef5dbc252418fcbd4 | 1,782 | py | Python | apollo/components/event/models.py | Aukbit/apollo | 0afd1360f5a102335c55afaf138e0ecb96644128 | [
"MIT"
] | null | null | null | apollo/components/event/models.py | Aukbit/apollo | 0afd1360f5a102335c55afaf138e0ecb96644128 | [
"MIT"
] | null | null | null | apollo/components/event/models.py | Aukbit/apollo | 0afd1360f5a102335c55afaf138e0ecb96644128 | [
"MIT"
] | null | null | null | import uuid
from datetime import datetime
import time
import simplejson as json
from blinker import signal
from cassandra.cqlengine import columns, ValidationError
from cassandra.cqlengine.models import Model
from .general import ACTIONS_MAP
class Event(Model):
"""
Event
"""
__table_name__ = 'event'
... | 26.597015 | 88 | 0.662177 |
d589a0eaa49c5acd1dac8d5466c6e52f798e249f | 1,160 | py | Python | tensorflow/contrib/boosted_trees/python/ops/training_ops.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/boosted_trees/python/ops/training_ops.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/boosted_trees/python/ops/training_ops.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2017 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.615385 | 80 | 0.742241 |
d589ca55becaf04d858cf9facfedd59ee25fd794 | 24,310 | py | Python | gslib/tests/util.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 649 | 2015-01-08T01:50:15.000Z | 2022-03-31T08:33:38.000Z | gslib/tests/util.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 798 | 2015-01-02T07:46:09.000Z | 2022-03-31T20:37:19.000Z | gslib/tests/util.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 315 | 2015-01-02T10:26:53.000Z | 2022-03-27T02:18:58.000Z | # -*- coding: utf-8 -*-
# Copyright 2013 Google 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 require... | 32.851351 | 84 | 0.719745 |
d589e99acfd784b825fb9a119665a1b31a583778 | 6,881 | py | Python | homework_3/heap.py | marcosicklinger/algorithmic_design | 5534904bce5707f62ce9d5bc72790bfb96f2540b | [
"MIT"
] | 1 | 2021-03-25T17:29:14.000Z | 2021-03-25T17:29:14.000Z | homework_3/heap.py | marcosicklinger/algorithmic_design | 5534904bce5707f62ce9d5bc72790bfb96f2540b | [
"MIT"
] | null | null | null | homework_3/heap.py | marcosicklinger/algorithmic_design | 5534904bce5707f62ce9d5bc72790bfb96f2540b | [
"MIT"
] | 1 | 2021-03-23T14:00:39.000Z | 2021-03-23T14:00:39.000Z | from graph import *
#####################
# PARAMETRIC ORDERS #
#####################
def min_order(a, b):
return a <= b
def vertice_order(vertice1, vertice2):
''' Function used for minimum order type comparisons between distances of two nodes
Parameters
----------
vertice1: Node\n
\tle... | 27.8583 | 98 | 0.579858 |
d58a2a31d4ae1069e8fdb7863c8f0e3dcc5edb53 | 23,753 | py | Python | tfx/orchestration/portable/launcher_test.py | SamuelMarks/tfx | 32665cc5bd5a1473cadd543e7af475d15d83a7f5 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/launcher_test.py | SamuelMarks/tfx | 32665cc5bd5a1473cadd543e7af475d15d83a7f5 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/portable/launcher_test.py | SamuelMarks/tfx | 32665cc5bd5a1473cadd543e7af475d15d83a7f5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC. 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 a... | 37.114063 | 110 | 0.672041 |
d58a3174ec1450f44e35eac152797a8ac2c73957 | 1,060 | py | Python | SoftLayer/CLI/nas/list.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/nas/list.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/nas/list.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | """List NAS accounts."""
# :license: MIT, see LICENSE for more details.
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer import utils
import click
@click.command()
@environment.pass_env
def cli(env):
"""List NAS accounts."""
account = env.client['Account']
nas_... | 28.648649 | 68 | 0.598113 |
d58a32bd8aca7690fd15441d845f99298a343b5b | 4,765 | py | Python | src/baselines_catkin/baselines/baselines/a2c/policies.py | jbohg/grasping_sim | dcde7689c2579a1e3e0d71e794b00a8647473a2f | [
"BSD-3-Clause"
] | 23 | 2019-05-29T05:55:14.000Z | 2021-08-17T06:03:05.000Z | src/baselines_catkin/baselines/baselines/a2c/policies.py | jbohg/grasping_sim | dcde7689c2579a1e3e0d71e794b00a8647473a2f | [
"BSD-3-Clause"
] | 1 | 2018-05-03T02:51:56.000Z | 2018-05-03T02:51:56.000Z | src/baselines_catkin/baselines/baselines/a2c/policies.py | jbohg/grasping_sim | dcde7689c2579a1e3e0d71e794b00a8647473a2f | [
"BSD-3-Clause"
] | 4 | 2018-03-17T13:31:37.000Z | 2019-06-01T06:46:24.000Z | import numpy as np
import tensorflow as tf
from baselines.a2c.utils import conv, fc, conv_to_fc, batch_to_seq, seq_to_batch, lstm, lnlstm, sample, check_shape
from baselines.common.distributions import make_pdtype
import baselines.common.tf_util as U
import gym
class LnLstmPolicy(object):
def __init__(self, sess, ... | 38.427419 | 115 | 0.539559 |
d58a3bcc8206a1edfa1f254a627ae0aa1e69270f | 6,291 | py | Python | salt/runners/state.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | salt/runners/state.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/runners/state.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
Execute orchestration functions
'''
# Import pytohn libs
from __future__ import absolute_import, print_function
import logging
# Import salt libs
import salt.loader
import salt.utils
import salt.utils.event
from salt.exceptions import SaltInvocationError
LOGGER = logging.getLogger(__name__... | 30.538835 | 83 | 0.60976 |
d58a40fcefac6d9ef6ac11220b89bd7f2e6aa82f | 8,672 | py | Python | pyzoo/zoo/pipeline/api/keras/layers/embeddings.py | cynthia-liu/analytics-zoo | 48344a49fd9257ba0c414903dcbc8f52a587bd30 | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/pipeline/api/keras/layers/embeddings.py | cynthia-liu/analytics-zoo | 48344a49fd9257ba0c414903dcbc8f52a587bd30 | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/pipeline/api/keras/layers/embeddings.py | cynthia-liu/analytics-zoo | 48344a49fd9257ba0c414903dcbc8f52a587bd30 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 Analytics Zoo 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... | 49.272727 | 99 | 0.616351 |
d58a5d32f575a5b8dd8cfe022dbc188021cde541 | 68 | py | Python | microdevices/__init__.py | lmokto/microdevices | 75a129d1c32f64afe9027338c4be304322ded857 | [
"MIT"
] | null | null | null | microdevices/__init__.py | lmokto/microdevices | 75a129d1c32f64afe9027338c4be304322ded857 | [
"MIT"
] | 1 | 2021-06-02T00:01:14.000Z | 2021-06-02T00:01:14.000Z | microdevices/__init__.py | lmokto/microdevices | 75a129d1c32f64afe9027338c4be304322ded857 | [
"MIT"
] | null | null | null | from .connector import *
from .libs import *
from .celery import app | 22.666667 | 24 | 0.764706 |
d58a7bc34ebe282c90885eda686de4bc9d366aca | 7,149 | py | Python | qiller/what_upload.py | MADindustries/WhatManager2 | d000c53fd993cb526aee85ce2dbc957fa4070ab8 | [
"MIT"
] | 4 | 2015-08-26T05:13:58.000Z | 2022-01-24T07:29:51.000Z | qiller/what_upload.py | MADindustries/WhatManager2 | d000c53fd993cb526aee85ce2dbc957fa4070ab8 | [
"MIT"
] | 21 | 2015-08-14T03:58:43.000Z | 2019-11-14T18:25:37.000Z | qiller/what_upload.py | MADindustries/WhatManager2 | d000c53fd993cb526aee85ce2dbc957fa4070ab8 | [
"MIT"
] | 2 | 2015-10-28T09:02:16.000Z | 2019-09-23T00:21:54.000Z |
import os.path
from pyquery.pyquery import PyQuery
from qiller.what_api import WHAT_CD_DOMAIN
from qobuz2.settings import QILLER_ERROR_OUTPUT
WHAT_UPLOAD_URL = 'https://{0}/upload.php'.format(WHAT_CD_DOMAIN)
WHAT_RELEASE_TYPES = (
(1, 'Album'),
(3, 'Soundtrack'),
(5, 'EP'),
(6, 'Anthology'),
(7... | 38.643243 | 94 | 0.590852 |
d58a7f90ef4f630436477ae33a3a1ed37cb65939 | 3,757 | py | Python | miniworld/__init__.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 5 | 2019-05-11T14:57:15.000Z | 2021-07-05T00:35:25.000Z | miniworld/__init__.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 27 | 2017-03-17T07:11:02.000Z | 2019-05-26T23:36:56.000Z | miniworld/__init__.py | miniworld-project/miniworld_core | c591bad232b78eae99e8f55cb1b907c1e228484b | [
"MIT"
] | 6 | 2017-05-03T12:11:33.000Z | 2020-04-03T11:44:27.000Z | import atexit
import logging
import os
import shutil
import signal
import sys
from miniworld.Config import set_global_config, PATH_GLOBAL_CONFIG, config
from miniworld.Constants import PATH_TMP, PATH_LOGS, PROJECT_NAME, PATH_CLEANUP_SCRIPT
from miniworld.errors import AlreadyRunning
from miniworld.log import log, set_... | 28.9 | 154 | 0.699228 |
d58a96c905e249917fa46c0a7e46a2a508cfba08 | 215 | py | Python | pumas_cube/__version__.py | niess/pumas_cube | 1d44f5fc70c01b6647c06ba332a83e61ebc27aa8 | [
"BSD-3-Clause"
] | 1 | 2021-06-16T07:44:41.000Z | 2021-06-16T07:44:41.000Z | pumas_cube/__version__.py | niess/pumas_cube | 1d44f5fc70c01b6647c06ba332a83e61ebc27aa8 | [
"BSD-3-Clause"
] | null | null | null | pumas_cube/__version__.py | niess/pumas_cube | 1d44f5fc70c01b6647c06ba332a83e61ebc27aa8 | [
"BSD-3-Clause"
] | 1 | 2021-11-11T23:51:18.000Z | 2021-11-11T23:51:18.000Z | # -*- coding: utf-8 -*-
"""
PUMAS_Cube Version
==================
Stores the different versions of the *PUMAS_Cube* package.
"""
# %% VERSIONS
# Default/Latest/Current version
__version__ = '1.3.0'
| 15.357143 | 59 | 0.576744 |
d58aac37a1b385c7445fb8cd7628dd33f498a7f5 | 1,938 | py | Python | src/fidesops/schemas/connection_configuration/connection_secrets_saas.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | 41 | 2021-11-01T23:53:43.000Z | 2022-03-22T23:07:56.000Z | src/fidesops/schemas/connection_configuration/connection_secrets_saas.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | 235 | 2021-11-01T20:31:55.000Z | 2022-03-31T15:40:58.000Z | src/fidesops/schemas/connection_configuration/connection_secrets_saas.py | mohan-pogala/fidesops | 5c686362d4fb3b85253dd7e2898be1131a5071ab | [
"Apache-2.0"
] | 12 | 2021-11-02T00:44:51.000Z | 2022-03-14T16:23:10.000Z | import abc
from typing import Any, Dict, Type
from pydantic import BaseModel, Extra, root_validator, create_model
from fidesops.schemas.saas.saas_config import SaaSConfig
class SaaSSchema(BaseModel, abc.ABC):
"""
Abstract base schema for updating SaaS connection configuration secrets.
Fields are added dur... | 32.847458 | 94 | 0.659959 |
d58abc36579ec37fe94c4f23ad9dc94893ffd1fd | 10,203 | py | Python | solutions/rank-1/meter_split_model/predict.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 48 | 2020-03-18T11:34:49.000Z | 2022-03-31T18:30:00.000Z | solutions/rank-1/meter_split_model/predict.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 40 | 2020-03-24T18:17:51.000Z | 2022-03-12T00:30:30.000Z | solutions/rank-1/meter_split_model/predict.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 24 | 2020-04-18T02:52:47.000Z | 2022-01-22T19:13:16.000Z | #!/usr/bin/env python
# coding: utf-8
# this kernel was based https://www.kaggle.com/corochann/ashrae-training-lgbm-by-meter-type
import argparse
import gc
import os
from pathlib import Path
import random
import sys
from tqdm import tqdm_notebook as tqdm
import numpy as np
import pandas as pd
import matplotlib.pypl... | 33.784768 | 214 | 0.693227 |
d58adfbe3d5f9f02c5e19970c734196b39fc31f3 | 2,591 | py | Python | cms/plugins/file/models.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | null | null | null | cms/plugins/file/models.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 9 | 2015-06-25T10:31:12.000Z | 2022-03-12T00:41:22.000Z | cms/plugins/file/models.py | pbs/django-cms | f230e63f98fafb75beb3956328021f8976564c96 | [
"BSD-3-Clause"
] | 1 | 2017-08-22T07:00:30.000Z | 2017-08-22T07:00:30.000Z | from django.db import models
from django.utils.translation import ugettext_lazy as _
from cms.models import CMSPlugin, get_plugin_media_path
import os
from django.conf import settings
class File(CMSPlugin):
"""
Plugin for storing any type of file.
Default template displays download link with icon (if ava... | 41.790323 | 123 | 0.692397 |
d58af51171be1286f73d3bb882c29fa167aa4e83 | 3,008 | py | Python | Scripts/GenBank/check_output.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:32:44.000Z | 2020-02-13T14:32:44.000Z | Scripts/GenBank/check_output.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | null | null | null | Scripts/GenBank/check_output.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | #!/usr/bin/env python
# Copyright 2000 Brad Chapman. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Check for the ability to read and write identical GenBank records.
This... | 29.203883 | 76 | 0.65359 |
d58afe1127bb9e9aa6e8caeeb07dfce3027b21db | 425 | py | Python | ERation/deliverystaff/migrations/0005_auto_20200531_0933.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/deliverystaff/migrations/0005_auto_20200531_0933.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/deliverystaff/migrations/0005_auto_20200531_0933.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-05-31 04:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('deliverystaff', '0004_auto_20200531_0930'),
]
operations = [
migrations.AlterField(
model_name='deliverystaff',
name... | 22.368421 | 78 | 0.621176 |
d58b0adf2ba4cdfd15e3012882020bca22898f86 | 2,513 | py | Python | events/test/test_serializers.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | events/test/test_serializers.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | events/test/test_serializers.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | import datetime
from pytz import UTC
from django.test import TestCase
from rest_framework.serializers import DateTimeField
from events.serializers import EventSerializer
from events.models import Event
from venues.serializers import VenueSerializer
from venues.test.factories import VenueFactory
class EventSerialize... | 34.424658 | 73 | 0.562276 |
d58b1917a61c330f7be9e05bb6b8f2ae222481e8 | 20,568 | py | Python | src/stk/molecular/topology_graphs/polymer/linear/linear.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | src/stk/molecular/topology_graphs/polymer/linear/linear.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | src/stk/molecular/topology_graphs/polymer/linear/linear.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | """
Linear
======
"""
from __future__ import annotations
from dataclasses import dataclass
import numpy as np
from ....reactions import GenericReactionFactory
from ...topology_graph import (
Edge,
NullOptimizer,
TopologyGraph,
Vertex,
)
from .vertices import (
HeadVertex,
LinearVertex,
... | 31.839009 | 71 | 0.557808 |
d58b232a522a4a32f61e948328cf7d19e8fd9ced | 5,139 | py | Python | doc/examples/cookbook/example03b.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | doc/examples/cookbook/example03b.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | doc/examples/cookbook/example03b.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | from __future__ import division, print_function
##############################################################################
#
# Copyright (c) 2009-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apac... | 39.837209 | 78 | 0.640786 |
d58b240e2faed2789605a23cec28bb8536db346a | 1,151 | py | Python | otp/level/EditorGlobals.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | otp/level/EditorGlobals.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | otp/level/EditorGlobals.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.toonbase.ToonPythonUtil import uniqueElements
EditTargetPostName = 'inGameEditTarget'
EntIdRange = 10000
username2entIdBase = {'darren': 1 * EntIdRange,
'samir': 2 * EntIdRange,
'skyler': 3 * EntIdRange,
'joe': 4 * EntIdRange,
'DrEvil': 5 * EntIdRange,
'asad': 6 * EntIdRange,
'drose': 7 * EntIdRange... | 28.775 | 83 | 0.71503 |
d58b2a2ad420139bc1ccf2df623add0912893eed | 475 | py | Python | functions/observatory/http-observatory/httpobs/database/celeryconfig.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | null | null | null | functions/observatory/http-observatory/httpobs/database/celeryconfig.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 4 | 2021-02-12T09:50:38.000Z | 2021-06-17T10:33:09.000Z | functions/observatory/http-observatory/httpobs/database/celeryconfig.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 2 | 2021-02-22T09:29:28.000Z | 2021-06-12T13:54:18.000Z | from httpobs.conf import BROKER_URL
# Set the Celery task queue
BROKER_URL = BROKER_URL
CELERY_ACCEPT_CONTENT = ['json']
CELERY_IGNORE_RESULTS = True
CELERY_REDIRECT_STDOUTS_LEVEL = 'WARNING'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CELERYD_TASK_SOFT_TIME_LIMIT = 300
CELERYD_TASK_TIME_LIMIT... | 21.590909 | 60 | 0.753684 |
d58b4b59eb891d9dead56a6ab25e3b0506532895 | 517 | py | Python | Easy/1446 Consecutive Characters.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1446 Consecutive Characters.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | Easy/1446 Consecutive Characters.py | raj713335/LeetCode | e60e145d90f45d37e148e8307a3d97f5f0741de0 | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/consecutive-characters/
class Solution:
def maxPower(self, s: str) -> int:
max_count = 1
count = 1
last = s[0]
for i in range(1, len(s)):
if s[i] == last:
count+=1
if max_... | 21.541667 | 55 | 0.373308 |
d58b5c83c0977454096e2a126ae91bdebefa9f68 | 3,849 | py | Python | src/librecatastro/domain/cadaster_entry/cadaster_entry_xml.py | jjmartinez-taiger/libreCatastro | b40bfa375095411814b99ac839959418a83c3071 | [
"MIT"
] | 9 | 2019-11-30T11:14:30.000Z | 2022-03-14T09:41:57.000Z | src/librecatastro/domain/cadaster_entry/cadaster_entry_xml.py | jjmartinez-taiger/libreCatastro | b40bfa375095411814b99ac839959418a83c3071 | [
"MIT"
] | 1 | 2021-04-11T17:15:08.000Z | 2021-04-11T17:15:08.000Z | src/librecatastro/domain/cadaster_entry/cadaster_entry_xml.py | jjmartinez-taiger/libreCatastro | b40bfa375095411814b99ac839959418a83c3071 | [
"MIT"
] | 1 | 2021-08-07T12:15:43.000Z | 2021-08-07T12:15:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
from dotmap import DotMap
from src.librecatastro.domain.address import Address
from src.librecatastro.domain.cadaster_entry.cadaster_entry import CadasterEntry
from src.librecatastro.domain.construction import Construction
from src.librecata... | 38.108911 | 121 | 0.623019 |
d58b6bef0739f08937a8194dcade8543a75a5a52 | 182 | py | Python | lreid/models/__init__.py | TPCD/LifelongReID | cb33f9c29fe398e7546db345fab1c338dda8252f | [
"MIT"
] | 63 | 2021-03-20T15:33:11.000Z | 2022-03-30T03:04:14.000Z | lreid/models/__init__.py | TPCD/LifelongReID | cb33f9c29fe398e7546db345fab1c338dda8252f | [
"MIT"
] | 5 | 2021-03-23T08:04:21.000Z | 2022-03-10T02:28:43.000Z | lreid/models/__init__.py | TPCD/LifelongReID | cb33f9c29fe398e7546db345fab1c338dda8252f | [
"MIT"
] | 10 | 2021-04-30T11:14:10.000Z | 2022-03-18T16:44:55.000Z | from __future__ import print_function, absolute_import
from .LwFnet import LwFNet, LwFNet_without_bn_bias, LwFNet_without_bn
from .metagraph_fd import MetaGraph_fd, FixedMetaGraph
| 30.333333 | 69 | 0.868132 |
d58b86fadb1f8e61fc37136f638d0ed8225e2f15 | 20,150 | py | Python | python/binocs/payst.py | bathompso/BINOCS | 87bc117931915e6d15d8f455dfcbb5ce8ad91973 | [
"MIT"
] | 2 | 2020-02-20T16:07:51.000Z | 2021-02-17T09:21:20.000Z | python/binocs/payst.py | bathompso/BINOCS | 87bc117931915e6d15d8f455dfcbb5ce8ad91973 | [
"MIT"
] | null | null | null | python/binocs/payst.py | bathompso/BINOCS | 87bc117931915e6d15d8f455dfcbb5ce8ad91973 | [
"MIT"
] | 1 | 2015-04-10T19:39:15.000Z | 2015-04-10T19:39:15.000Z | # PAYST subroutines
from __future__ import print_function, division
import pyopencl as cl
import numpy as np
from time import time
import matplotlib.pyplot as plt
import sys, subprocess
def extendarr(id2mass, mag, mempct, memchar, match):
id2mass.append('00000000+0000000')
mempct.append(-1)
memchar.append('U')
mat... | 37.245841 | 215 | 0.61464 |
d58b890d9a41369ffd5ff1ced9f8ea70489c30a3 | 7,917 | py | Python | examples/scripts/csc/implsden_grd_pd_dct.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | examples/scripts/csc/implsden_grd_pd_dct.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | examples/scripts/csc/implsden_grd_pd_dct.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Impulse Noise Restoration via CSC
=================================
This example demonstrates the removal of s... | 39.78392 | 988 | 0.706707 |
d58b9f6f6303f14fc3cb29ce73304f3fc73ee031 | 229 | py | Python | system_swap/datadog_checks/system_swap/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | system_swap/datadog_checks/system_swap/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | system_swap/datadog_checks/system_swap/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2019-03-06T14:30:52.000Z | 2019-03-06T14:30:52.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .system_swap import SystemSwap
__all__ = [
'__version__',
'SystemSwap'
]
| 20.818182 | 59 | 0.729258 |
d58bf5cf79cb561c86b8342a564f4c27ce3d46f2 | 2,278 | py | Python | salt/master/app/app.py | codeminus/saltmaster | 18aec00ee205ca9f3550a1f88f58a74970dfc2a3 | [
"MIT"
] | 1 | 2020-01-01T19:49:28.000Z | 2020-01-01T19:49:28.000Z | salt/master/app/app.py | codeminus/docker-library | 18aec00ee205ca9f3550a1f88f58a74970dfc2a3 | [
"MIT"
] | null | null | null | salt/master/app/app.py | codeminus/docker-library | 18aec00ee205ca9f3550a1f88f58a74970dfc2a3 | [
"MIT"
] | null | null | null | """container entrypoint module"""
import os
import subprocess
import yaml
from time import sleep
SALT_LOG_LEVEL = os.environ.get('SALT_LOG_LEVEL', 'warning')
SALT_LOG_FILE_LEVEL = os.environ.get('SALT_LOG_FILE_LEVEL', 'warning')
SALT_MASTER_LOGFILE = '/var/log/salt/master'
# Salt API
SALT_API_PORT = os.environ.get('S... | 28.835443 | 98 | 0.632572 |
d58c4c3925adaa2c173ef9d6d57fc6f9e6218ca3 | 845 | py | Python | Practica11/grafica.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | 1 | 2021-09-30T20:05:41.000Z | 2021-09-30T20:05:41.000Z | Practica11/grafica.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | Practica11/grafica.py | JosueHernandezR/An-lisis-de-Algoritmos | 9953f2d3fee6b4cfe842fdbbea83b46b62fa123f | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import global_variables as gb
def plot ( ):
# Título de la ventana.
plt.figure ( "Ciclo Hamiltoniano:" )
# Parámetro Tiempo (t) y Cubo (n) del gráfico.
s = list ( map ( lambda x: x [ 0 ], gb.parametros ) )
t = list ( map ( lambda x: x [ 1 ], gb.par... | 42.25 | 86 | 0.525444 |
d58c5ca3482407f60f57c685040542978c1903f8 | 1,250 | py | Python | spider/parse_html.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | 2 | 2018-09-20T06:08:00.000Z | 2018-09-26T13:57:20.000Z | spider/parse_html.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | null | null | null | spider/parse_html.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | 1 | 2019-03-25T05:53:32.000Z | 2019-03-25T05:53:32.000Z | #!/usr/bin/python
# encoding:utf-8
import pprint
import sys
from bs4 import BeautifulSoup
import utils
class HtmlParser:
def __init__(self, url):
self.url = url
self.content = ''
return
def _get_content(self):
if self.content == '':
self.content = utils.get_htm... | 23.148148 | 57 | 0.5872 |
d58c6162d9e7c84f026439e0166d5a7b9a316042 | 357 | py | Python | psy/client/message.py | aharabara/psyduck | e9e8d0b6465d5232f3787dc3988f09916bb93e38 | [
"MIT"
] | 1 | 2018-09-22T10:52:03.000Z | 2018-09-22T10:52:03.000Z | psy/client/message.py | aharabara/psyduck | e9e8d0b6465d5232f3787dc3988f09916bb93e38 | [
"MIT"
] | 2 | 2018-10-20T19:15:54.000Z | 2018-10-21T08:17:56.000Z | psy/client/message.py | aharabara/psyduck | e9e8d0b6465d5232f3787dc3988f09916bb93e38 | [
"MIT"
] | null | null | null | from psy.client.contact import Contact
class Message:
sender: Contact
content: str
was_sent: bool
def __init__(self, sender: Contact, content: str) -> None:
self.sender = sender
self.content = content
self.was_sent = False
def __str__(self) -> str:
return self.sen... | 22.3125 | 62 | 0.630252 |
d58cb8536335647195f2945001993ade05fbd9de | 8,563 | py | Python | build/toolchain/win/setup_toolchain.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | build/toolchain/win/setup_toolchain.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | build/toolchain/win/setup_toolchain.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Copies the given "win tool" (which the toolchain uses to wrap compiler
# invocations) and the environment blocks for the 32-bit and 64-bit builds on
#... | 36.909483 | 79 | 0.653509 |
d58cf84eb8b7f79c7fb9e8d5b6157053b3dd061e | 7,245 | py | Python | model.py | Emma-uestc/Cats-vs-Dogs | a36f8a61467b67b88c7aae6ddcc46ddd17887488 | [
"MIT"
] | null | null | null | model.py | Emma-uestc/Cats-vs-Dogs | a36f8a61467b67b88c7aae6ddcc46ddd17887488 | [
"MIT"
] | null | null | null | model.py | Emma-uestc/Cats-vs-Dogs | a36f8a61467b67b88c7aae6ddcc46ddd17887488 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#The aim of this project is to use TensorFlow to process our own data.
# - input_data.py: read in data and generate batches
# - model: build the model architecture
# - training: train
# data: cats vs. dogs from Kaggle
# Download link: https://www.kaggle.com/c/dogs-vs-cats-redux-kerne... | 42.122093 | 109 | 0.569496 |
d58cffd24965ffdcb5c51226bf774dc84bc0d594 | 627 | py | Python | setup.py | walkermatt/spitslurp | 8216400c59696b1ee0d708cc6e21a7a016966270 | [
"Apache-2.0"
] | 1 | 2017-12-05T21:33:13.000Z | 2017-12-05T21:33:13.000Z | setup.py | walkermatt/spitslurp | 8216400c59696b1ee0d708cc6e21a7a016966270 | [
"Apache-2.0"
] | null | null | null | setup.py | walkermatt/spitslurp | 8216400c59696b1ee0d708cc6e21a7a016966270 | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
import os
base_dir = os.path.dirname(__file__)
with open(os.path.join(base_dir, "README.rst")) as f:
long_description = f.read()
setup(
name='spitslurp',
version='0.4',
description='Write text to a file with `spit` and read from a file with `slurp`.',
author='Matt ... | 29.857143 | 86 | 0.69378 |
d58d17c1c73955122a4b5593d9a28c9196cf821a | 3,877 | py | Python | earlier-2020/TF_codes/tf_new_tutorials/_test_tf_ckpt/two_layer_fc.py | transcendentsky/py_tutorials | fed8e6c8d79f854a1cebcfd5c37297a163846208 | [
"Apache-2.0"
] | 1 | 2018-06-18T12:09:33.000Z | 2018-06-18T12:09:33.000Z | earlier-2020/TF_codes/tf_new_tutorials/_test_tf_ckpt/two_layer_fc.py | transcendentsky/py_tutorials | fed8e6c8d79f854a1cebcfd5c37297a163846208 | [
"Apache-2.0"
] | null | null | null | earlier-2020/TF_codes/tf_new_tutorials/_test_tf_ckpt/two_layer_fc.py | transcendentsky/py_tutorials | fed8e6c8d79f854a1cebcfd5c37297a163846208 | [
"Apache-2.0"
] | 1 | 2018-06-18T12:13:21.000Z | 2018-06-18T12:13:21.000Z | '''Builds a 2-layer fully-connected neural network'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import numpy as np
def inference(images, image_pixels, hidden_units, classes, reg_constant=0):
'''Build the model up to where i... | 31.520325 | 79 | 0.717307 |
d58d1a1f4bff3666a042403ec52446505c7c299e | 45,958 | py | Python | src/plotting_main.py | mourga/transformer-uncertainty | b73ede8629dc8e77541c2c55457dd29a238c1d60 | [
"MIT"
] | 5 | 2021-08-20T15:08:35.000Z | 2021-08-24T13:31:36.000Z | src/plotting_main.py | mourga/transformer-uncertainty | b73ede8629dc8e77541c2c55457dd29a238c1d60 | [
"MIT"
] | null | null | null | src/plotting_main.py | mourga/transformer-uncertainty | b73ede8629dc8e77541c2c55457dd29a238c1d60 | [
"MIT"
] | null | null | null | import json
import os
import sys
import matplotlib
sys.path.append("../../")
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
from src.general import create_dir
from sys_config import RES_DIR, BASE_DIR
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import seaborn as sns
import p... | 47.872917 | 235 | 0.515362 |
d58d1becd2afe4a52ff219a50dae519a8d3e87be | 2,239 | py | Python | tests/api_workflow/test_api_workflow_datasets.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 1,515 | 2020-10-05T13:04:17.000Z | 2022-03-31T16:14:55.000Z | tests/api_workflow/test_api_workflow_datasets.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 628 | 2020-10-14T11:38:51.000Z | 2022-03-31T14:40:54.000Z | tests/api_workflow/test_api_workflow_datasets.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 108 | 2020-10-17T08:31:06.000Z | 2022-03-20T16:44:22.000Z | from lightly.active_learning.config.sampler_config import SamplerConfig
from lightly.openapi_generated.swagger_client import TagData
from tests.api_workflow.mocked_api_workflow_client import MockedApiWorkflowSetup
class TestApiWorkflowDatasets(MockedApiWorkflowSetup):
def test_create_dataset_new(self):
s... | 46.645833 | 101 | 0.776686 |
d58d4c55d76c1043042d872c986cc5a18f235768 | 8,819 | py | Python | chromaprint.py | valpogus/pyacoustid | bfd9be4b8ec710ec1fc65a5c4248aaa3c03669a6 | [
"MIT"
] | null | null | null | chromaprint.py | valpogus/pyacoustid | bfd9be4b8ec710ec1fc65a5c4248aaa3c03669a6 | [
"MIT"
] | null | null | null | chromaprint.py | valpogus/pyacoustid | bfd9be4b8ec710ec1fc65a5c4248aaa3c03669a6 | [
"MIT"
] | null | null | null | # Copyright (C) 2011 Lukas Lalinsky
# (Minor modifications by Adrian Sampson.)
# Distributed under the MIT license, see the LICENSE file for details.
"""Low-level ctypes wrapper from the chromaprint library."""
import sys
import ctypes
import ctypes.util
if sys.version_info[0] >= 3:
BUFFER_TYPES = (memoryview, b... | 34.449219 | 78 | 0.714593 |
d58d5d3eed2a43dcecf60d298ae76032bd69b7ec | 225 | py | Python | github_api/users.py | ECrownofFire/chaos | 0cfbb85ab52654967909aef54eff3a0e62b641bd | [
"MIT"
] | 1,804 | 2017-05-23T02:34:27.000Z | 2017-05-26T00:44:44.000Z | github_api/users.py | ECrownofFire/chaos | 0cfbb85ab52654967909aef54eff3a0e62b641bd | [
"MIT"
] | 345 | 2017-05-20T23:55:12.000Z | 2017-06-19T07:48:58.000Z | github_api/users.py | ECrownofFire/chaos | 0cfbb85ab52654967909aef54eff3a0e62b641bd | [
"MIT"
] | 248 | 2017-05-23T02:00:07.000Z | 2017-05-26T00:00:28.000Z |
def get_user(api, user):
path = "/users/{user}".format(user=user)
return api("get", path)
def follow_user(api, user):
follow_path = "/user/following/{user}".format(user=user)
return api("PUT", follow_path)
| 22.5 | 60 | 0.653333 |
d58d695d106553068a37be3aba0028fddf51566f | 25,915 | py | Python | qcodes/utils/helpers.py | ctschnur/Qcodes | 623e39aa3774da8b7aa062734a85f4e1f79a635b | [
"MIT"
] | 1 | 2020-10-19T08:09:04.000Z | 2020-10-19T08:09:04.000Z | qcodes/utils/helpers.py | ctschnur/Qcodes | 623e39aa3774da8b7aa062734a85f4e1f79a635b | [
"MIT"
] | 206 | 2020-10-01T06:33:56.000Z | 2022-03-29T16:08:08.000Z | qcodes/utils/helpers.py | Akshita07/Qcodes | f75e4786e268f415935aa4658d92526279c7a102 | [
"MIT"
] | null | null | null | import io
import json
import logging
import math
import numbers
import time
import os
from pathlib import Path
import collections
from collections.abc import Iterator, Sequence, Mapping
from copy import deepcopy
from typing import (Dict, Any, Type, List, Tuple, Union, Optional,
cast, Callable, Supp... | 35.30654 | 116 | 0.600695 |
d58d6976fbb63e1acbf768c055be1e9a887b88f1 | 1,691 | py | Python | migrations/versions/123e52b41940_tabela_membros.py | leticiarosemberg/EcoOng | 15c2ec1eabeeb12f3c7491eb22c2663fd10229ed | [
"MIT"
] | 1 | 2022-01-11T20:20:48.000Z | 2022-01-11T20:20:48.000Z | migrations/versions/123e52b41940_tabela_membros.py | leticiarosemberg/EcoOng | 15c2ec1eabeeb12f3c7491eb22c2663fd10229ed | [
"MIT"
] | 1 | 2021-12-16T03:51:01.000Z | 2021-12-16T03:51:01.000Z | migrations/versions/123e52b41940_tabela_membros.py | leticiarosemberg/EcoOng | 15c2ec1eabeeb12f3c7491eb22c2663fd10229ed | [
"MIT"
] | 1 | 2022-02-19T19:11:11.000Z | 2022-02-19T19:11:11.000Z | """tabela Membros
Revision ID: 123e52b41940
Revises: d01364254436
Create Date: 2021-10-15 14:08:47.533648
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '123e52b41940'
down_revision = 'd01364254436'
branch_labels = None
dep... | 32.519231 | 89 | 0.693672 |
d58d6d6dfe3a40ba7d12ea052f6aa186842a382b | 3,311 | py | Python | tests/test_cores/test_tensor2img.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tests/test_cores/test_tensor2img.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tests/test_cores/test_tensor2img.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
import pytest
import torch
from torchvision.utils import make_grid
from mmgen.models.misc import tensor2img
def test_tensor2img():
tensor_4d_1 = torch.FloatTensor(2, 3, 4, 4).uniform_(0, 1)
tensor_4d_2 = torch.FloatTensor(1, 3, 4, 4).uniform_... | 44.146667 | 77 | 0.672908 |
d58d8e021a208d8a35c854ed3cd74e385f5f9589 | 6,297 | py | Python | vpype_cli/transforms.py | duncangeere/vpype | 0b91f16c538cd9d709354652b51a58f8805e6822 | [
"MIT"
] | null | null | null | vpype_cli/transforms.py | duncangeere/vpype | 0b91f16c538cd9d709354652b51a58f8805e6822 | [
"MIT"
] | null | null | null | vpype_cli/transforms.py | duncangeere/vpype | 0b91f16c538cd9d709354652b51a58f8805e6822 | [
"MIT"
] | null | null | null | import logging
import math
from typing import Tuple, Union, List
import click
from vpype import (
global_processor,
VectorData,
LineCollection,
LengthType,
layer_processor,
LayerType,
multiple_to_layer_ids,
)
from .cli import cli
@cli.command(group="Transforms")
@click.argument("offset",... | 25.702041 | 94 | 0.630459 |
d58d9ad30cc3149ae67c8f010d402bbbbb971f0f | 8,702 | py | Python | ThirdParty/Twisted/twisted/lore/lint.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | ThirdParty/Twisted/twisted/lore/lint.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/lore/lint.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Checker for common errors in Lore documents.
"""
from xml.dom import minidom as dom
import parser, urlparse, os.path
from twisted.lore import tree, process
from twisted.web import domhelpers
from twisted.python import reflect
# parser.suit... | 42.44878 | 80 | 0.554355 |
d58dbcb3f117fbb3d42b5dd62a57068b618505d6 | 2,317 | py | Python | datawinners/activitylog/migrations/002_Update_actions_text_in_activity_log.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/activitylog/migrations/002_Update_actions_text_in_activity_log.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/activitylog/migrations/002_Update_actions_text_in_activity_log.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
db.execute("UPDATE activitylog_useractivitylog set action = 'Imported Identification Number(s)' where action = 'Imported Subject(s)'")
db.execute("UPDATE acti... | 74.741935 | 164 | 0.749676 |
d58dd8b515f0d16425e9cd6d1f2a038a1e6b0dc0 | 1,752 | py | Python | qcos_addons/constants.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | qcos_addons/constants.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | qcos_addons/constants.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | import json
import os
# 默认的设备view_cofnig, 单条曲线分析页面的显示内容控制,默认值不建议修改,可以在设备类型模型view_cofnig字段中为不同设备类型单独配置
ENV_DEFAULT_DEVICE_VIEW_CONFIG = os.environ.get('ENV_DEFAULT_DEVICE_VIEW_CONFIG', json.dumps({
"curve_key_map": {
"cur_w": "角度",
"cur_m": "扭矩",
"cur_t": "时间",
"cur_s": "转速"
}, "... | 64.888889 | 108 | 0.519406 |
d58deb2b6c2958adf875a5d3fc96afe609b3e749 | 23,760 | py | Python | keystoneclient/tests/client_fixtures.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/client_fixtures.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/client_fixtures.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.163569 | 79 | 0.49415 |
d58dfadcbed2fc9874b48382fee6bba36fb79ca8 | 1,384 | py | Python | test/test_hmm.py | astex/intelligence | 97516bd48ea9ed6279539a96e6621d7dafa6aece | [
"MIT"
] | null | null | null | test/test_hmm.py | astex/intelligence | 97516bd48ea9ed6279539a96e6621d7dafa6aece | [
"MIT"
] | null | null | null | test/test_hmm.py | astex/intelligence | 97516bd48ea9ed6279539a96e6621d7dafa6aece | [
"MIT"
] | null | null | null | """Unit tests for intelligence.hmm."""
from intelligence import hmm
from test import lib as test_lib
import numpy as np
import unittest
class ViterbiTest(test_lib.TestCase):
"""Unit tests for hmm.Viterbi."""
def test_wrong_priors_len(self):
"""Test that it raises an error if priors is the wrong len... | 33.756098 | 76 | 0.598988 |
d58e10009a9e056571765f242d8636ebb82455c5 | 17,456 | py | Python | tools/codegen/core/gen_static_metadata.py | tomerv/grpc | 27662173e750107a4520d5d6972544d67a6a0203 | [
"Apache-2.0"
] | 4 | 2018-10-12T17:18:41.000Z | 2020-06-21T19:31:47.000Z | tools/codegen/core/gen_static_metadata.py | stanley-cheung/grpc | 7d6000082a0e79a5307d04454a572a924a4d940d | [
"BSD-3-Clause"
] | 9 | 2021-06-01T23:18:19.000Z | 2022-02-22T17:54:02.000Z | tools/codegen/core/gen_static_metadata.py | stanley-cheung/grpc | 7d6000082a0e79a5307d04454a572a924a4d940d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2015 gRPC 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... | 30.840989 | 207 | 0.604892 |
d58e4fba2e996f0c9d53ec3aed74a5cbe9bcf1db | 845 | py | Python | oscar/apps/order/models.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | 1 | 2015-11-07T12:37:50.000Z | 2015-11-07T12:37:50.000Z | oscar/apps/order/models.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/order/models.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | 1 | 2019-07-10T06:32:14.000Z | 2019-07-10T06:32:14.000Z | from oscar.apps.order.abstract_models import *
from oscar.apps.address.abstract_models import AbstractShippingAddress, AbstractBillingAddress
class Order(AbstractOrder):
pass
class OrderNote(AbstractOrderNote):
pass
class CommunicationEvent(AbstractCommunicationEvent):
pass
class ShippingAddress(Abs... | 14.824561 | 94 | 0.783432 |
d58e51388609a850289b3f3a56d493ae71466199 | 9,364 | py | Python | gaphor/plugins/xmiexport/exportmodel.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/plugins/xmiexport/exportmodel.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/plugins/xmiexport/exportmodel.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | import logging
from gaphor.misc.xmlwriter import XMLWriter
logger = logging.getLogger(__name__)
class XMIExport:
XMI_VERSION = "2.1"
XMI_NAMESPACE = "http://schema.omg.org/spec/XMI/2.1"
UML_NAMESPACE = "http://schema.omg.org/spec/UML/2.1"
XMI_PREFIX = "XMI"
UML_PREFIX = "UML"
def __init__(... | 34.426471 | 86 | 0.63616 |
d58e62d9de7a4c394da664127bb69b0953d23278 | 861 | py | Python | Librarium/catalog/migrations/0005_auto_20200319_2327.py | spideyclick/Librarium | 63e96bd90c5ae43c46c87eb3c8ac50883af306bf | [
"MIT"
] | 1 | 2020-03-19T15:49:48.000Z | 2020-03-19T15:49:48.000Z | Librarium/catalog/migrations/0005_auto_20200319_2327.py | spideyclick/Librarium | 63e96bd90c5ae43c46c87eb3c8ac50883af306bf | [
"MIT"
] | null | null | null | Librarium/catalog/migrations/0005_auto_20200319_2327.py | spideyclick/Librarium | 63e96bd90c5ae43c46c87eb3c8ac50883af306bf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-19 23:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('catalog', '0004_book_language'),
]
operations = [
migrations.RemoveField(
model_name='book',
... | 28.7 | 147 | 0.607433 |
d58e69163d69ef695d4bc542c8b78c96f01e32df | 2,128 | py | Python | tuna/parts/storage/nullstorage.py | russellnakamura/thetuna | 0e445baf780fb65e1d92fe1344ebdf21bf81573c | [
"MIT"
] | null | null | null | tuna/parts/storage/nullstorage.py | russellnakamura/thetuna | 0e445baf780fb65e1d92fe1344ebdf21bf81573c | [
"MIT"
] | null | null | null | tuna/parts/storage/nullstorage.py | russellnakamura/thetuna | 0e445baf780fb65e1d92fe1344ebdf21bf81573c | [
"MIT"
] | null | null | null |
# this package
from base_storage import BaseStorage
#from tuna import BaseClass
from tuna import FILE_TIMESTAMP
from tuna import TunaError
class NullStorage(BaseStorage):
"""
A class to store data to a file
"""
def __init__(self, path=None, timestamp=FILE_TIMESTAMP,
name=None, overwr... | 21.069307 | 78 | 0.534774 |
d58e7ac7e2dcf1c6f1359bc2973c86d69fc6726c | 15,068 | py | Python | rlpyt/utils/logging/logger.py | e-271/rlpyt | e90f3d364bae554acf6c12b54249e8f9afcf8c9c | [
"MIT"
] | null | null | null | rlpyt/utils/logging/logger.py | e-271/rlpyt | e90f3d364bae554acf6c12b54249e8f9afcf8c9c | [
"MIT"
] | null | null | null | rlpyt/utils/logging/logger.py | e-271/rlpyt | e90f3d364bae554acf6c12b54249e8f9afcf8c9c | [
"MIT"
] | null | null | null | from enum import Enum
from rlpyt.utils.logging.tabulate import tabulate
from rlpyt.utils.logging.console import mkdir_p, colorize
from rlpyt.utils.logging.autoargs import get_all_parameters
from contextlib import contextmanager
import numpy as np
import os
import os.path as osp
import sys
import datetime
# import date... | 31.856237 | 112 | 0.633528 |
d58e8b7f27a30a2bcd548c37de8d501e1a1e44d2 | 12,351 | py | Python | webdownloader/downloader.py | devstarkes/webdownloader | 20dad4d9c765742ced3966ea801106b1f9ed5671 | [
"MIT"
] | null | null | null | webdownloader/downloader.py | devstarkes/webdownloader | 20dad4d9c765742ced3966ea801106b1f9ed5671 | [
"MIT"
] | null | null | null | webdownloader/downloader.py | devstarkes/webdownloader | 20dad4d9c765742ced3966ea801106b1f9ed5671 | [
"MIT"
] | null | null | null | import validators
import logging
import random
import requests
import requests.utils
import json
class Downloader:
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36'
attempts = 3
default_timeout = 45
http_requests = ... | 39.841935 | 174 | 0.577848 |
d58e8fcb38c6bc276b444b34863dac10f36c90e9 | 8,725 | py | Python | convert_deeplab_resnet.py | li-js/pytorch-deeplab-resnet | a7f67442c923c3412d210041009a0d6298368aec | [
"MIT"
] | 663 | 2017-04-25T04:59:10.000Z | 2022-03-18T08:17:05.000Z | convert_deeplab_resnet.py | li-js/pytorch-deeplab-resnet | a7f67442c923c3412d210041009a0d6298368aec | [
"MIT"
] | 47 | 2017-05-14T08:50:53.000Z | 2021-11-25T17:24:42.000Z | convert_deeplab_resnet.py | li-js/pytorch-deeplab-resnet | a7f67442c923c3412d210041009a0d6298368aec | [
"MIT"
] | 162 | 2017-04-29T16:42:20.000Z | 2022-03-18T08:17:04.000Z | import numpy as np
import os
os.environ["GLOG_minloglevel"] = "2"
import sys
sys.path.insert(0,'/data1/ravikiran/SketchObjPartSegmentation/src/caffe-switch/caffe/python')
#sys.path.insert(0,'/data1/ravikiran/deeplab-public-ver2/python')
import re
import caffe
import numpy as np
import skimage.io
import torch
from torch... | 30.506993 | 111 | 0.641605 |
d58e94c32da364fbf640c47f7503bf32838a4007 | 7,936 | py | Python | ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
'''
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")... | 39.482587 | 253 | 0.595262 |
d58e967b974f72d720562a86153925f02c31f16c | 3,466 | py | Python | datalad/tests/test_direct_mode.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/tests/test_direct_mode.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/tests/test_direct_mode.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ... | 36.87234 | 100 | 0.653203 |
d58ea27d3817c73a5ed1649e52a89c0355de0927 | 681 | py | Python | spa/migrations/0006_auto_20150820_2347.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | spa/migrations/0006_auto_20150820_2347.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | spa/migrations/0006_auto_20150820_2347.py | fergalmoran/dss.api | d1b9fb674b6dbaee9b46b9a3daa2027ab8d28073 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import recurrence.fields
class Migration(migrations.Migration):
dependencies = [
('spa', '0005_show_end_date'),
]
operations = [
migrations.RemoveField(
model_name='recur... | 21.967742 | 54 | 0.565345 |
d58ed0760a6cc5084d462f703db94f1dcf230dd5 | 488 | py | Python | epab/linters/_mypy.py | 132nd-etcher/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 2 | 2018-12-13T06:49:10.000Z | 2018-12-13T07:37:49.000Z | epab/linters/_mypy.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 109 | 2018-08-22T04:25:56.000Z | 2019-10-17T05:10:21.000Z | epab/linters/_mypy.py | etcher-be/epab | 5226d3a36580f8cc50cf5dcac426adb1350a2c9b | [
"MIT"
] | 1 | 2018-02-25T05:53:18.000Z | 2018-02-25T05:53:18.000Z | # coding=utf-8
"""
Pep8 linter
"""
import sys
import click
import elib_run
import epab.utils
from epab.core import config
@epab.utils.run_once
@epab.utils.stashed
def _mypy():
cmd = f'mypy -p {config.PACKAGE_NAME()} --ignore-missing-imports'
if config.MYPY_ARGS():
cmd += ' ' + config.MYPY_ARGS()
... | 15.741935 | 69 | 0.633197 |
d58eeb2073e68760f1b1837cb38a63d7f448df46 | 1,050 | py | Python | py/cidoc_crm_types/entities/e97_monetary_amount.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/entities/e97_monetary_amount.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/entities/e97_monetary_amount.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from .e54_dimension import E54Dimension
from dataclasses import dataclass
@dataclass
class E97MonetaryAmount(E54Dimension):
"""
Scope note:
This class comprises quantities of monetary possessions or obligations in terms of their nominal value with respect to a particular currency. These quantities may be abstract... | 50 | 649 | 0.790476 |
d58eecd34de9c6681c2ee538dc026e2a42c6715b | 4,284 | py | Python | examples/acoustics/vibro_acoustic3d.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 1 | 2021-05-15T16:28:45.000Z | 2021-05-15T16:28:45.000Z | examples/acoustics/vibro_acoustic3d.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | examples/acoustics/vibro_acoustic3d.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | r"""
Vibro-acoustic problem
3D acoustic domain with 2D perforated deforming interface.
*Master problem*: defined in 3D acoustic domain (``vibro_acoustic3d.py``)
*Slave subproblem*: 2D perforated interface (``vibro_acoustic3d_mid.py``)
Master 3D problem - find :math:`p` (acoustic pressure)
and :math:`g` (transversal... | 29.544828 | 73 | 0.538749 |
d58f10ada9b2dc05d2c2933f521baa01b79ea8da | 2,666 | py | Python | examples/django_nyc_demo/hendrix_demo/settings.py | mpasternak/hendrix | 1cc96b9edb3a6760306b80b50001e3dfbf57fceb | [
"MIT"
] | 309 | 2015-08-14T18:54:57.000Z | 2021-12-20T18:53:33.000Z | examples/django_nyc_demo/hendrix_demo/settings.py | mpasternak/hendrix | 1cc96b9edb3a6760306b80b50001e3dfbf57fceb | [
"MIT"
] | 77 | 2015-08-14T21:07:09.000Z | 2021-07-19T21:50:17.000Z | examples/django_nyc_demo/hendrix_demo/settings.py | mpasternak/hendrix | 1cc96b9edb3a6760306b80b50001e3dfbf57fceb | [
"MIT"
] | 40 | 2015-08-14T20:59:38.000Z | 2021-07-18T20:16:36.000Z | """
Django settings for hendrix_demo project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build... | 26.929293 | 71 | 0.7018 |
d58f2867a10dfb64d96712471e7dddfd4fa7099e | 6,895 | py | Python | tests/common/dualtor/tunnel_traffic_utils.py | pra-moh/sonic-mgmt | 26285708eab7428c2b6250be03483d63f94cfb5c | [
"Apache-2.0"
] | null | null | null | tests/common/dualtor/tunnel_traffic_utils.py | pra-moh/sonic-mgmt | 26285708eab7428c2b6250be03483d63f94cfb5c | [
"Apache-2.0"
] | 18 | 2019-01-31T06:54:39.000Z | 2020-04-01T03:50:14.000Z | tests/common/dualtor/tunnel_traffic_utils.py | wangxin/sonic-mgmt | 18dce2d5ccf93b629b9e463ba183f3a13e22b07a | [
"Apache-2.0"
] | 1 | 2020-10-27T13:15:51.000Z | 2020-10-27T13:15:51.000Z | """Tunnel traffic verification utilities."""
import ipaddress
import logging
import operator
import pytest
import sys
from io import BytesIO
from ptf import mask, testutils
from scapy.all import IP, Ether
from tests.common.dualtor import dual_tor_utils
@pytest.fixture(scope="function")
def tunnel_traffic_monitor(ptf... | 42.561728 | 114 | 0.591008 |
d58f41770ad55a5e7ceff6a9603b410f1a848ef7 | 6,016 | py | Python | ParsersClasses/HogParser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | ParsersClasses/HogParser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | ParsersClasses/HogParser.py | UFRGS-CAROL/radiation-benchmarks-parsers | a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b | [
"Apache-2.0"
] | null | null | null | import os
from SupportClasses import Rectangle
from SupportClasses import PrecisionAndRecall
from ObjectDetectionParser import ObjectDetectionParser
# from ObjectDetectionParser import ImageRaw
import re
# LOCAL_GOLD_FOLDER = "/home/fernando/Dropbox/UFRGS/Pesquisa/Teste_12_2016/GOLD_K40/histogram_ori_gradients/" #"/ho... | 36.023952 | 161 | 0.57613 |
d58f4b223fdcafb343cb0f064e5bc12270227cd2 | 6,187 | py | Python | core/migrations/0002_auto_20210312_1241.py | lcbiplove/nepfdb | 56e48bb0dcae34d409b7d75d210d2938e763a953 | [
"MIT"
] | null | null | null | core/migrations/0002_auto_20210312_1241.py | lcbiplove/nepfdb | 56e48bb0dcae34d409b7d75d210d2938e763a953 | [
"MIT"
] | null | null | null | core/migrations/0002_auto_20210312_1241.py | lcbiplove/nepfdb | 56e48bb0dcae34d409b7d75d210d2938e763a953 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-12 12:41
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 41.246667 | 125 | 0.534831 |
d58f4f2ae9ae22b608072ac4104dc76ece98a853 | 4,835 | py | Python | engine/tasks.py | scwall/cocktail_engine | d2cb9aea4e48dad4b01baf722065946f1a485c25 | [
"MIT"
] | 2 | 2020-02-11T21:27:21.000Z | 2020-02-13T21:24:52.000Z | engine/tasks.py | scwall/cocktail_engine | d2cb9aea4e48dad4b01baf722065946f1a485c25 | [
"MIT"
] | null | null | null | engine/tasks.py | scwall/cocktail_engine | d2cb9aea4e48dad4b01baf722065946f1a485c25 | [
"MIT"
] | 1 | 2019-01-23T21:48:28.000Z | 2019-01-23T21:48:28.000Z | #!/usr/bin/python3
import atexit
import time
import Adafruit_MCP3008
import adafruit_mcp230xx
import board
import busio
from Adafruit_MotorHAT import Adafruit_MotorHAT
from RPi import GPIO
from celery import shared_task, current_task
from celery.utils.log import get_task_logger
LOGGER = get_task_logger(__name__)
CLK... | 29.662577 | 95 | 0.602275 |
d58f60c8a8aa7048a21f49b690a9f0fadfc06f2f | 1,651 | py | Python | first_project/seed.py | wakim/django-course | 833534a33e79c6ef4667af5a52823cb5bb3904e9 | [
"MIT"
] | 1 | 2018-07-08T18:10:39.000Z | 2018-07-08T18:10:39.000Z | first_project/seed.py | wakim/python-django-bootcamp | 833534a33e79c6ef4667af5a52823cb5bb3904e9 | [
"MIT"
] | null | null | null | first_project/seed.py | wakim/python-django-bootcamp | 833534a33e79c6ef4667af5a52823cb5bb3904e9 | [
"MIT"
] | null | null | null | import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'first_project.settings')
import django
django.setup()
import random
from first_app.models import AccessRecord, Topic, WebPage
from django.contrib.auth.models import User
from faker import Faker
fakegen = Faker()
topics = ['Search', 'Social', 'Marketplace',... | 29.482143 | 177 | 0.685645 |
d58f6e613ac427b07f20e6244175cff4e0ffd3c2 | 1,945 | py | Python | tests/integration/fit_loader_simple/single_input_single_target.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 2 | 2020-11-28T07:56:09.000Z | 2021-11-08T09:30:39.000Z | tests/integration/fit_loader_simple/single_input_single_target.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | tests/integration/fit_loader_simple/single_input_single_target.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null |
import torch as th
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from pywick.modules import ModuleTrainer
from pywick.datasets.TensorDataset import TensorDataset
import os
from torchvision import datasets
ROOT = '/data/mnist'
dataset = datasets.MNIST(ROOT, train=True, ... | 26.283784 | 79 | 0.683805 |
d58f77bd70025bb8851cc77b834bb8816f636ee0 | 3,255 | py | Python | Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 45.84507 | 201 | 0.733026 |
d58f8d8a6183be9d5f59e7740e6087a0b96d7b24 | 6,144 | py | Python | orchid/project_store.py | Reveal-Energy-Services/orchid | 4c177ac5a511a80a3588ab8da873fc2d74358da8 | [
"Apache-2.0"
] | null | null | null | orchid/project_store.py | Reveal-Energy-Services/orchid | 4c177ac5a511a80a3588ab8da873fc2d74358da8 | [
"Apache-2.0"
] | null | null | null | orchid/project_store.py | Reveal-Energy-Services/orchid | 4c177ac5a511a80a3588ab8da873fc2d74358da8 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-2022 Reveal Energy Services, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 36.141176 | 110 | 0.683594 |
d58f97dc04d91e81d3b2f38792c78dd445117577 | 2,818 | py | Python | downstream/card_example_g.py | alex310110/bmc-proto-20q2 | 7e783595cc493bb56f1db3591dff7dcfb7218d14 | [
"MIT"
] | 1 | 2020-06-22T22:01:17.000Z | 2020-06-22T22:01:17.000Z | downstream/card_example_g.py | alex310110/bmc-proto-20q2 | 7e783595cc493bb56f1db3591dff7dcfb7218d14 | [
"MIT"
] | null | null | null | downstream/card_example_g.py | alex310110/bmc-proto-20q2 | 7e783595cc493bb56f1db3591dff7dcfb7218d14 | [
"MIT"
] | null | null | null | """ An example PCIe card populated on a board.
"""
from .device_xam2730 import XAM2730
from entity import BmcEntity
from sensor import Sensor
from i2c import I2CMux, I2CHwmonDevice
class CardExampleG(BmcEntity):
""" When translating to C/C++ source code, we may declare the device
variables like self.pcie... | 36.597403 | 94 | 0.625266 |
d58fabd709f0a77db8ee9756a48e4274286c8844 | 4,486 | py | Python | tests/data/build-index2-json.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | tests/data/build-index2-json.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | 3 | 2022-03-03T02:36:53.000Z | 2022-03-03T02:42:50.000Z | tests/data/build-index2-json.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
import json
from os.path import abspath, dirname, join
from conda.core.subdir_data import fetch_repodata_remote_request
DATA_DIR = abspath(join(dirname(__file__), "repodata"))
def save_data_source(url, name):
raw_... | 23.243523 | 101 | 0.501115 |
d58fc4ded68509dc8073a091e9f2f90a1a1c6d13 | 30 | py | Python | btd6_memory_info/generated/Antlr/Runtime/Collections/HashList/HashListEnumerator/hash_list_enumerator.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Antlr/Runtime/Collections/HashList/HashListEnumerator/hash_list_enumerator.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Antlr/Runtime/Collections/HashList/HashListEnumerator/hash_list_enumerator.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class HashListEnumerator: pass | 30 | 30 | 0.9 |
d58ff13be239d76d796f77b74b63275a7d90e27a | 5,255 | py | Python | benchml/basic.py | rudolfspetrovs/benchml | 896673f387a6bb9b185664ddd54f569a1ba54e51 | [
"Apache-2.0"
] | 3 | 2021-08-12T13:25:31.000Z | 2022-03-21T21:30:22.000Z | benchml/basic.py | rudolfspetrovs/benchml | 896673f387a6bb9b185664ddd54f569a1ba54e51 | [
"Apache-2.0"
] | 5 | 2020-12-08T08:59:41.000Z | 2022-01-22T06:46:09.000Z | benchml/basic.py | rudolfspetrovs/benchml | 896673f387a6bb9b185664ddd54f569a1ba54e51 | [
"Apache-2.0"
] | 1 | 2021-06-25T11:07:32.000Z | 2021-06-25T11:07:32.000Z | import numpy as np
from benchml.pipeline import FitTransform, Transform
class Add(Transform):
req_args = {
"coeffs",
}
req_inputs = {
"X",
}
allow_stream = {
"y",
}
def _map(self, inputs, stream):
coeffs = self.args["coeffs"]
assert len(coeffs) == ... | 28.101604 | 100 | 0.537583 |
d5901e674fb4fa95fdcebb6933f8deb2848f54eb | 22,050 | py | Python | poli/python/poli/policy_gradient.py | Humhu/percepto | 4a45cce7dd294a8ce0b962bb68cae5c2b48c3b7f | [
"AFL-3.0"
] | 1 | 2021-06-15T09:34:24.000Z | 2021-06-15T09:34:24.000Z | poli/python/poli/policy_gradient.py | Humhu/percepto | 4a45cce7dd294a8ce0b962bb68cae5c2b48c3b7f | [
"AFL-3.0"
] | null | null | null | poli/python/poli/policy_gradient.py | Humhu/percepto | 4a45cce7dd294a8ce0b962bb68cae5c2b48c3b7f | [
"AFL-3.0"
] | null | null | null | """This module contains implementations of algorithms for computing likelihood ratio
policy gradients.
"""
import numpy as np
import poli.sampling as isamp
import scipy.linalg as spl
import scipy.signal as sps
from itertools import izip
from collections import namedtuple
from sklearn.neighbors.kde import KernelDensity... | 41.603774 | 96 | 0.555465 |
d59042ab36b03312eaa3c06342d8ef019eb18d64 | 3,973 | py | Python | scripts/lore.py | vonas/adventofcode | 0c9e4920243c37c4b143e01fe5bd4f78834b4e51 | [
"MIT"
] | null | null | null | scripts/lore.py | vonas/adventofcode | 0c9e4920243c37c4b143e01fe5bd4f78834b4e51 | [
"MIT"
] | null | null | null | scripts/lore.py | vonas/adventofcode | 0c9e4920243c37c4b143e01fe5bd4f78834b4e51 | [
"MIT"
] | 1 | 2020-12-12T01:11:08.000Z | 2020-12-12T01:11:08.000Z | from os import path, getenv
import requests
import re
from sys import argv, exit
from bs4 import BeautifulSoup
YEAR = 2020
BASE_URL = 'https://adventofcode.com'
BASE_URL_DAY = BASE_URL + '/{}/day/'.format(YEAR)
LORE_MD_FORMAT = 'day-{}-{}.md'
REANY = r"(?:.|\n)*?"
BLOCK_PLACE = ('#__BLOCK_START__#', '#__BLOCK_END... | 29.649254 | 107 | 0.6222 |
d59049efcb3ae81256d62e210ea4ec6a4610fca7 | 85 | py | Python | api/admin.py | taqueci/nomoney | 940879ffff0d17724709e642d9c1911ac4e996ce | [
"MIT"
] | null | null | null | api/admin.py | taqueci/nomoney | 940879ffff0d17724709e642d9c1911ac4e996ce | [
"MIT"
] | 2 | 2020-06-06T13:08:38.000Z | 2022-02-10T14:51:16.000Z | api/admin.py | taqueci/nomoney | 940879ffff0d17724709e642d9c1911ac4e996ce | [
"MIT"
] | null | null | null | # Copyright (C) Takeshi Nakamura. All rights reserved.
# Register your models here.
| 21.25 | 54 | 0.752941 |
d5904e492448f3a10948e679bdc5f07214c1915b | 5,594 | py | Python | SuperMario_PPO/NeuralNets.py | learningwithmachines/bookish | f2c698304fcfda8e5acbed91fb7de4cbcea0d11a | [
"Apache-2.0"
] | null | null | null | SuperMario_PPO/NeuralNets.py | learningwithmachines/bookish | f2c698304fcfda8e5acbed91fb7de4cbcea0d11a | [
"Apache-2.0"
] | null | null | null | SuperMario_PPO/NeuralNets.py | learningwithmachines/bookish | f2c698304fcfda8e5acbed91fb7de4cbcea0d11a | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
import Common_constants as CC
obs_shape = CC.obs_shape
num_actions = CC.num_actions
class value_nn( tf.keras.Model ):
def __init__(self):
super( value_nn, self ).__init__( name='Value_Net' )
self.conv1 = tf.keras.layers.Conv2D( filters=32,
... | 50.396396 | 113 | 0.410976 |
d5907eb00db16b7231a89c93bea727ef106bced5 | 1,171 | py | Python | graphite_plugin_agent/plugins/__init__.py | jondkelley/graphite-plugin-agent | 924193262cbd7f6eaa498c33951883473e435c90 | [
"BSD-3-Clause"
] | 1 | 2018-06-20T04:41:15.000Z | 2018-06-20T04:41:15.000Z | graphite_plugin_agent/plugins/__init__.py | jondkelley/graphite-plugin-agent | 924193262cbd7f6eaa498c33951883473e435c90 | [
"BSD-3-Clause"
] | null | null | null | graphite_plugin_agent/plugins/__init__.py | jondkelley/graphite-plugin-agent | 924193262cbd7f6eaa498c33951883473e435c90 | [
"BSD-3-Clause"
] | null | null | null | """
Plugins are responsible for fetching and parsing the stats from the service
being profiled.
"""
available = {
'apache_httpd': 'graphite_plugin_agent.plugins.apache_httpd.ApacheHTTPD',
'couchdb': 'graphite_plugin_agent.plugins.couchdb.CouchDB',
'edgecast': 'graphite_plugin_agent.plugins.edgecast.Edgecas... | 48.791667 | 77 | 0.76345 |
d5907fbc305819fc321fdf9250ba3def41d17898 | 3,125 | py | Python | setup.py | dxiao2003/drf-permission-chain | 8dc4d2a62ffc13a6978d3b7230ce72bdf0a9c681 | [
"MIT"
] | null | null | null | setup.py | dxiao2003/drf-permission-chain | 8dc4d2a62ffc13a6978d3b7230ce72bdf0a9c681 | [
"MIT"
] | 1 | 2021-03-19T21:52:41.000Z | 2021-03-19T21:52:41.000Z | setup.py | dxiao2003/drf-permission-chain | 8dc4d2a62ffc13a6978d3b7230ce72bdf0a9c681 | [
"MIT"
] | null | null | null | import shutil
import sys
import os
import re
from setuptools import setup
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
with open(os.path.join(package, '__init__.py'), 'rb') as init_py:
src = init_py.read().decode('utf-8')
return re.... | 29.205607 | 75 | 0.632 |
d590abca71df4f0f62449008eb5683a235803139 | 1,603 | py | Python | click_creds/classes.py | eshaan7/click-creds | 9dd18fcdd674deb59b1cb8af4e4d822f7cb50614 | [
"BSD-3-Clause"
] | 2 | 2020-12-24T08:47:59.000Z | 2021-03-24T06:57:35.000Z | click_creds/classes.py | Eshaan7/click-creds | 40dcc52b0a9ecc7bea8d9fa580a48ed19784d298 | [
"BSD-3-Clause"
] | 5 | 2021-02-27T16:29:45.000Z | 2021-08-19T15:58:30.000Z | click_creds/classes.py | eshaan7/click-creds | 9dd18fcdd674deb59b1cb8af4e4d822f7cb50614 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T06:57:37.000Z | 2021-03-24T06:57:37.000Z | import pathlib
from tinynetrc import Netrc as _TinyNetrc
from .defaults import DEFAULT_MAPPING
from .utils import ThreadSafeSingleton
class ClickCreds(metaclass=ThreadSafeSingleton):
pass
class NetrcStore(ClickCreds):
"""
A tiny wrapper class over the :class:`tinynetrc.Netrc` class.
"""
__name... | 25.444444 | 67 | 0.611978 |
d590bc4be6d520cbaa000d9802b84cbfbf8e90b9 | 2,165 | py | Python | tensorflow/python/ops/quantized_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/ops/quantized_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/ops/quantized_ops_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... | 35.491803 | 80 | 0.684065 |
d590e26c3443417f5b242cf581b25ca03d14bb31 | 9,844 | py | Python | contrail-snmp-collector/contrail_snmp_collector/snmpcfg.py | biswajit-mandal/contrail-analytics | 393157153c223925d1dabdc2e173da90ab61aa50 | [
"Apache-2.0"
] | null | null | null | contrail-snmp-collector/contrail_snmp_collector/snmpcfg.py | biswajit-mandal/contrail-analytics | 393157153c223925d1dabdc2e173da90ab61aa50 | [
"Apache-2.0"
] | 2 | 2018-12-04T02:20:52.000Z | 2018-12-22T06:16:30.000Z | contrail-snmp-collector/contrail_snmp_collector/snmpcfg.py | biswajit-mandal/contrail-analytics | 393157153c223925d1dabdc2e173da90ab61aa50 | [
"Apache-2.0"
] | 1 | 2018-12-04T02:07:47.000Z | 2018-12-04T02:07:47.000Z | #
# Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
#
import argparse, os, ConfigParser, sys, re
from pysandesh.sandesh_base import *
from pysandesh.gen_py.sandesh.ttypes import SandeshLevel
from device_config import DeviceConfig
from sandesh_common.vns.ttypes import Module
from sandesh_common.vns.consta... | 37.716475 | 79 | 0.619362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.