hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68f0b59d09d6dd33702f50a05b72a2f38e974c08 | 4,626 | py | Python | hls4ml/converters/keras/core.py | ngpaladi/hls4ml | 54861d0f611ee72f779a8f739b5fac571f3e79c2 | [
"Apache-2.0"
] | 1 | 2021-07-06T12:09:49.000Z | 2021-07-06T12:09:49.000Z | hls4ml/converters/keras/core.py | ngpaladi/hls4ml | 54861d0f611ee72f779a8f739b5fac571f3e79c2 | [
"Apache-2.0"
] | 1 | 2020-11-26T09:45:05.000Z | 2020-11-26T09:45:05.000Z | hls4ml/converters/keras/core.py | ngpaladi/hls4ml | 54861d0f611ee72f779a8f739b5fac571f3e79c2 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from hls4ml.converters.keras_to_hls import parse_default_keras_layer
from hls4ml.converters.keras_to_hls import keras_handler
from hls4ml.model.hls_model import Quantizer
from hls4ml.model.hls_model import IntegerPrecisionType
@keras_handler('InputLayer')
def parse_input_layer(keras_layer, input_n... | 37.609756 | 104 | 0.670774 |
2da84cc3ac40e106c73110543550d50c6262d4ef | 1,990 | py | Python | openpecha/core/annotations.py | OpenPoti/openpecha-toolkit | 8599ea6bf5b1cb3ec6f22c608fab0cf8344c33b2 | [
"Apache-2.0"
] | null | null | null | openpecha/core/annotations.py | OpenPoti/openpecha-toolkit | 8599ea6bf5b1cb3ec6f22c608fab0cf8344c33b2 | [
"Apache-2.0"
] | 10 | 2019-09-09T13:29:31.000Z | 2019-10-18T08:27:26.000Z | openpecha/core/annotations.py | OpenPecha/openpecha | 73359686e2b3a703c6018aecbffe7adb4f485c88 | [
"Apache-2.0"
] | null | null | null | """Module contains all the Annotations classes
"""
from typing import Dict
from pydantic import BaseModel, Extra, Field, validator
from .ids import get_uuid
class Span(BaseModel):
start: int = Field(..., ge=0)
end: int = Field(..., ge=0)
errors: Dict = {}
@validator("start", "end")
def span_mu... | 19.70297 | 81 | 0.656281 |
db70b9b66e81d2627aa8c0675b9e6358c183a960 | 4,449 | py | Python | var/spack/repos/builtin/packages/visit-silo/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/visit-silo/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/visit-silo/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
# Import re module to use regular expression
import re
from spack import *
class VisitSilo(CMakePackage):
... | 43.194175 | 96 | 0.655878 |
108f8db4502df796e4707897ad0dfd7a68ca33e3 | 11,935 | py | Python | dreamer.py | dosssman/dreamer-torch | 7c2331acd4fa6196d140943e977f23fb177398b3 | [
"MIT"
] | null | null | null | dreamer.py | dosssman/dreamer-torch | 7c2331acd4fa6196d140943e977f23fb177398b3 | [
"MIT"
] | null | null | null | dreamer.py | dosssman/dreamer-torch | 7c2331acd4fa6196d140943e977f23fb177398b3 | [
"MIT"
] | null | null | null | import argparse
import collections
import functools
import os
import pathlib
import sys
import warnings
os.environ['MUJOCO_GL'] = 'egl'
import numpy as np
import ruamel.yaml as yaml
sys.path.append(str(pathlib.Path(__file__).parent))
import exploration as expl
import models
import tools
import wrappers
import torc... | 37.531447 | 90 | 0.683536 |
45d50933d4e86cc7efb6914d638693a3832b5419 | 3,306 | py | Python | dojo/tools/appspider/parser.py | mtcolman/django-DefectDojo | 76175aca446e077884bdb5e1d8e2a671a0840775 | [
"BSD-3-Clause"
] | 1,772 | 2018-01-22T23:32:15.000Z | 2022-03-31T14:49:33.000Z | dojo/tools/appspider/parser.py | mtcolman/django-DefectDojo | 76175aca446e077884bdb5e1d8e2a671a0840775 | [
"BSD-3-Clause"
] | 3,461 | 2018-01-20T19:12:28.000Z | 2022-03-31T17:14:39.000Z | dojo/tools/appspider/parser.py | mtcolman/django-DefectDojo | 76175aca446e077884bdb5e1d8e2a671a0840775 | [
"BSD-3-Clause"
] | 1,173 | 2018-01-23T07:10:23.000Z | 2022-03-31T14:40:43.000Z | from xml.dom import NamespaceErr
import html2text
from defusedxml import ElementTree
from dojo.models import Endpoint, Finding
class AppSpiderParser(object):
"""Parser for Rapid7 AppSpider reports"""
def get_scan_types(self):
return ["AppSpider Scan"]
def get_label_for_scan_types(self, scan_ty... | 33.393939 | 115 | 0.550514 |
3ff27bd00e22312beefbf84a5e21eb8fb51f29dc | 4,552 | py | Python | simulation/python2/grasp_proxy_matlab.py | mgualti/PickAndPlace | 15cdf2a6d5a255ecb78488ca75657af559d0c2da | [
"MIT"
] | 12 | 2018-07-26T07:12:05.000Z | 2021-07-07T23:07:17.000Z | simulation/python2/grasp_proxy_matlab.py | mgualti/PickAndPlace | 15cdf2a6d5a255ecb78488ca75657af559d0c2da | [
"MIT"
] | 2 | 2018-07-31T07:11:24.000Z | 2019-05-30T13:06:30.000Z | simulation/python2/grasp_proxy_matlab.py | mgualti/PickAndPlace | 15cdf2a6d5a255ecb78488ca75657af559d0c2da | [
"MIT"
] | null | null | null | '''Provides an interface to the Matlab grasp detector.'''
# python
# scipy
from numpy import array, ascontiguousarray, fromstring, reshape, rollaxis
# matplotlib
from matplotlib import pyplot
# matlab
import matlab
import matlab.engine
# self
from grasp import Grasp
from cylinder import Cylinder
class GraspProxyMatla... | 38.576271 | 98 | 0.704086 |
a56c17a52c151517220527250f9ba36c7d0693f9 | 1,115 | py | Python | tests/test_dataset_utils.py | kipoi/kipoiutils | 8452370eb0a5283fec526fa04a0dd24873022265 | [
"MIT"
] | null | null | null | tests/test_dataset_utils.py | kipoi/kipoiutils | 8452370eb0a5283fec526fa04a0dd24873022265 | [
"MIT"
] | null | null | null | tests/test_dataset_utils.py | kipoi/kipoiutils | 8452370eb0a5283fec526fa04a0dd24873022265 | [
"MIT"
] | 1 | 2019-02-18T14:49:17.000Z | 2019-02-18T14:49:17.000Z | import pytest
from kipoi_utils.external.torchvision.dataset_utils import download_url
def test_download_url_valid_link(tmp_path, capfd):
download_url("https://zenodo.org/record/1466088/files/example_files-hg19.chr22.fa?download=1", tmp_path,
'downloaded.fa', '936544855b253835442a0f253dd4b083')... | 50.681818 | 109 | 0.675336 |
fe5ea5a13edb642aba4fee2a03e541130ba523c9 | 1,508 | py | Python | twitch/bot.py | bani/bot | 6d996ac41889991d94e8a13148a8de56a70b1c94 | [
"MIT"
] | null | null | null | twitch/bot.py | bani/bot | 6d996ac41889991d94e8a13148a8de56a70b1c94 | [
"MIT"
] | null | null | null | twitch/bot.py | bani/bot | 6d996ac41889991d94e8a13148a8de56a70b1c94 | [
"MIT"
] | null | null | null | # bot.py
import os # for importing env vars for the bot to use
import re
from twitchio.ext import commands
from dotenv import load_dotenv
load_dotenv()
bot = commands.Bot(
# set up the bot
irc_token=os.environ['TMI_TOKEN'],
client_id=os.environ['CLIENT_ID'],
nick=os.environ['BOT_NICK'],
prefix=os.e... | 26.45614 | 75 | 0.669761 |
b8b8271404bccb37b675467f9a7f51407a71c7e6 | 2,482 | py | Python | chirun/markdownRenderer/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 5 | 2021-12-06T15:57:24.000Z | 2022-01-24T20:34:00.000Z | chirun/markdownRenderer/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 38 | 2021-12-09T13:16:46.000Z | 2022-03-30T11:42:13.000Z | chirun/markdownRenderer/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 1 | 2022-01-17T17:41:35.000Z | 2022-01-17T17:41:35.000Z | from markdown import markdown
import chirun.markdownRenderer.codemirror
from .markdown_figure.mdfigure import FigureExtension
from .image_processor.imgproc import ImageProcessorExtension
from .link_processor.linkproc import LinkProcessorExtension
from .mdx_outline.mdx_outline import OutlineExtension
from chirun.markdow... | 43.54386 | 99 | 0.585012 |
d4b4f39515bc115c74791abc550fd3d4c845098e | 2,168 | py | Python | util/date_functions.py | hoklet/ScheduleBot | 717c9da06c562418349ab1e4f05c1971661e46c5 | [
"Apache-2.0"
] | null | null | null | util/date_functions.py | hoklet/ScheduleBot | 717c9da06c562418349ab1e4f05c1971661e46c5 | [
"Apache-2.0"
] | null | null | null | util/date_functions.py | hoklet/ScheduleBot | 717c9da06c562418349ab1e4f05c1971661e46c5 | [
"Apache-2.0"
] | null | null | null | import datetime
import requests
from util.date_range_exception import DateRangeException
def convert_date_list_to_date_object(date_list):
if len(date_list) != 3:
raise IndexError
# our command format is DD.MM.YYYY
try:
date_object = datetime.date(int(date_list[2]), int(date_list[1]), int(d... | 38.714286 | 115 | 0.692343 |
e6a2d27cc8c84f137917312bd0a0b5e6858b2bfa | 1,109 | py | Python | pybeerxml/mash.py | boralyl/pybeerxml | 89dd046802d3a8713b7141e077b50af887e95b1d | [
"MIT"
] | 20 | 2015-09-11T01:53:32.000Z | 2021-11-16T11:37:40.000Z | pybeerxml/mash.py | boralyl/pybeerxml | 89dd046802d3a8713b7141e077b50af887e95b1d | [
"MIT"
] | 18 | 2016-01-19T10:52:19.000Z | 2021-12-06T09:37:12.000Z | pybeerxml/mash.py | boralyl/pybeerxml | 89dd046802d3a8713b7141e077b50af887e95b1d | [
"MIT"
] | 23 | 2015-09-16T21:28:05.000Z | 2021-12-13T16:38:12.000Z | from typing import Optional, Text, List
from pybeerxml.mash_step import MashStep
from pybeerxml.utils import cast_to_bool
class Mash:
def __init__(self):
self.name: Optional[Text] = None
self.grain_temp: Optional[float] = None
self.sparge_temp: Optional[float] = None
# pylint: disa... | 32.617647 | 54 | 0.654644 |
7d95a3bd0b5f34f403ce4cd250abc7af456f811f | 3,208 | py | Python | onnxmltools/convert/sklearn/shape_calculators/OneHotEncoder.py | Oewyn/onnxmltools | 8dbd844dab77754971f59d4d533e6763ce0b03c2 | [
"MIT"
] | null | null | null | onnxmltools/convert/sklearn/shape_calculators/OneHotEncoder.py | Oewyn/onnxmltools | 8dbd844dab77754971f59d4d533e6763ce0b03c2 | [
"MIT"
] | null | null | null | onnxmltools/convert/sklearn/shape_calculators/OneHotEncoder.py | Oewyn/onnxmltools | 8dbd844dab77754971f59d4d533e6763ce0b03c2 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import nu... | 49.353846 | 120 | 0.672693 |
68e361b9104375d200152d2b555a4801f41a7276 | 22,654 | py | Python | mvt/train.py | ppst/mvt | b16bd238cfa733db33d5336cf9a8acdce637ddae | [
"MIT"
] | null | null | null | mvt/train.py | ppst/mvt | b16bd238cfa733db33d5336cf9a8acdce637ddae | [
"MIT"
] | null | null | null | mvt/train.py | ppst/mvt | b16bd238cfa733db33d5336cf9a8acdce637ddae | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import argparse
import math
import multiprocessing
import numpy as np
import pandas as pd
import pickle
import random
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report, confusion_matrix, accuracy_score
import sys
if __name__ == 'train':
import... | 35.619497 | 193 | 0.542818 |
e5116859a0119dd21916e0072f961d06328b37e0 | 1,868 | py | Python | GridWebPage/data/csv2geojson/ss_grid_csv2geojson.1.py | Theropod/MLinSiteSelection | dbe0a0912c079558731036be0017042a47d6d5fe | [
"MIT"
] | 1 | 2022-03-12T15:40:56.000Z | 2022-03-12T15:40:56.000Z | GridWebPage/data/csv2geojson/ss_grid_csv2geojson.1.py | Theropod/MLinSiteSelection | dbe0a0912c079558731036be0017042a47d6d5fe | [
"MIT"
] | null | null | null | GridWebPage/data/csv2geojson/ss_grid_csv2geojson.1.py | Theropod/MLinSiteSelection | dbe0a0912c079558731036be0017042a47d6d5fe | [
"MIT"
] | null | null | null | import csv
import json
from geojson import Feature, FeatureCollection, Point
features = []
count=0
with open(r'ss_grid_beijing_wgs84_merged.csv', newline='', encoding='utf-8') as csvfile:
reader = csv.reader(csvfile, delimiter=',')
next(reader, None)
for fnid, ext_min_x, ext_min_y, ext_max_x, ext_max_y, g... | 38.122449 | 221 | 0.520343 |
6d3e5c2621494cb943e75a14c450074703172ef0 | 5,190 | py | Python | vespa/analysis/mrs_user_prior_spectrum.py | vespa-mrs/vespa | 6d3e84a206ec427ac1304e70c7fadf817432956b | [
"BSD-3-Clause"
] | null | null | null | vespa/analysis/mrs_user_prior_spectrum.py | vespa-mrs/vespa | 6d3e84a206ec427ac1304e70c7fadf817432956b | [
"BSD-3-Clause"
] | 4 | 2021-04-17T13:58:31.000Z | 2022-01-20T14:19:57.000Z | vespa/analysis/mrs_user_prior_spectrum.py | vespa-mrs/vespa | 6d3e84a206ec427ac1304e70c7fadf817432956b | [
"BSD-3-Clause"
] | 3 | 2021-06-05T16:34:57.000Z | 2022-01-19T16:13:22.000Z | # Python modules
import copy
# 3rd party modules
import numpy as np
# Our modules
from vespa.common.util.generic_spectral import create_spectrum
from vespa.common.mrs_generic_basis import GenericBasis
from vespa.common.constants import Deflate
# The _values used when UserPriorSpectrum.reset_to_default() is called.
... | 33.269231 | 95 | 0.561272 |
b643fd34ebbcca39d1be4fa0d747b5ee9a3bfdf5 | 13,610 | py | Python | src/main_wordsimilarity.py | somethingx02/topical_wordvec_models | f8b7c6d48db4f9427a545a1f212151da891a796d | [
"MIT"
] | 6 | 2020-08-12T23:25:19.000Z | 2022-03-14T12:30:31.000Z | src/main_wordsimilarity.py | somethingx02/topical_wordvec_models | f8b7c6d48db4f9427a545a1f212151da891a796d | [
"MIT"
] | null | null | null | src/main_wordsimilarity.py | somethingx02/topical_wordvec_models | f8b7c6d48db4f9427a545a1f212151da891a796d | [
"MIT"
] | 2 | 2020-08-17T11:09:13.000Z | 2021-02-18T21:02:56.000Z | # -*- coding: utf8 -*-
# torch is a file named torch.py
import torch
# torch here is a folder named torch
from torch.autograd import Variable
# this is filename, once imported, you can use the classes in it
from models import topicalWordEmbedding
# equal to from models.topicalAttentionGRU import TopicalAttentionGRU
... | 34.987147 | 75 | 0.627333 |
4cce425f930eb089f6221aaabc4f31f24936e317 | 16,587 | py | Python | simulation_code/transmission_simulation-airborne.py | yizhang-code/covid19-spreading-pattern-in-classroom | f8e3b508b13e3390559cd03f18691a95ea3e79e3 | [
"MIT"
] | null | null | null | simulation_code/transmission_simulation-airborne.py | yizhang-code/covid19-spreading-pattern-in-classroom | f8e3b508b13e3390559cd03f18691a95ea3e79e3 | [
"MIT"
] | null | null | null | simulation_code/transmission_simulation-airborne.py | yizhang-code/covid19-spreading-pattern-in-classroom | f8e3b508b13e3390559cd03f18691a95ea3e79e3 | [
"MIT"
] | null | null | null | import concurrent.futures
import numpy as np
import argparse
import itertools
import random
from enum import IntEnum
from pathlib import Path
class Status(IntEnum):
HEALTH = 0
INFECTED = 1
RECOVERED = 2
VACCINATED = -1
MAXNUM = 30
def dot_product(a, b):
return a[0] * b[0] + a[1] * b[1]
cla... | 42.206107 | 145 | 0.584012 |
18bc683069dc8d6000b346de343d292a22c2acfe | 358 | py | Python | salt/returners/local.py | pille/salt | 47322575309faac8c4755287d930469caffc1c65 | [
"Apache-2.0"
] | 1 | 2019-04-16T11:09:50.000Z | 2019-04-16T11:09:50.000Z | salt/returners/local.py | pille/salt | 47322575309faac8c4755287d930469caffc1c65 | [
"Apache-2.0"
] | null | null | null | salt/returners/local.py | pille/salt | 47322575309faac8c4755287d930469caffc1c65 | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
The local returner is used to test the returner interface, it just prints the
return data to the console to verify that it is being passed properly
'''
# Import python libs
from __future__ import print_function
def returner(ret):
'''
Print the return data to the terminal to verify... | 22.375 | 77 | 0.709497 |
aa7e3f6836bf208ced2186f0b1e1c8c7ff8295dd | 2,377 | py | Python | src/ralph_scrooge/plugins/collect/support.py | xliiv/ralph_pricing | 88a295b6f0af66ae03c145205ada99f17ab51dd0 | [
"Apache-2.0"
] | null | null | null | src/ralph_scrooge/plugins/collect/support.py | xliiv/ralph_pricing | 88a295b6f0af66ae03c145205ada99f17ab51dd0 | [
"Apache-2.0"
] | null | null | null | src/ralph_scrooge/plugins/collect/support.py | xliiv/ralph_pricing | 88a295b6f0af66ae03c145205ada99f17ab51dd0 | [
"Apache-2.0"
] | 1 | 2021-11-15T21:21:17.000Z | 2021-11-15T21:21:17.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from ralph.util import plugin
from ralph_assets.api_scrooge import get_supports
from ralph_scrooge.models import (
AssetInfo,... | 28.987805 | 70 | 0.598233 |
51c5911175a68adb3f6ad1bddb8b510ecbb6fb8b | 952 | py | Python | TWAP_VWAP/twap-stock.py | phbrgnomo/CryptoTradingTools | dfe4ef94470e8bc5d44f93461ec4317a04306ae9 | [
"CC0-1.0"
] | null | null | null | TWAP_VWAP/twap-stock.py | phbrgnomo/CryptoTradingTools | dfe4ef94470e8bc5d44f93461ec4317a04306ae9 | [
"CC0-1.0"
] | 1 | 2021-03-23T21:01:39.000Z | 2021-03-23T21:01:39.000Z | TWAP_VWAP/twap-stock.py | phbrgnomo/CryptoTradingTools | dfe4ef94470e8bc5d44f93461ec4317a04306ae9 | [
"CC0-1.0"
] | 1 | 2022-03-31T07:04:55.000Z | 2022-03-31T07:04:55.000Z | import yfinance as yf
import pandas as pd
# code source: https://blog.quantinsti.com/twap/
# import price data for Apple
data=yf.download('AAPL', start='2020-05-18', end='2020-06-18')
# print(data)
# calculate adjustment factor
adjustment_factor = data['Adj Close'] / data['Close']
# print(adjustment_factor)
# calcu... | 23.219512 | 62 | 0.718487 |
3759b877fc6470210f1c3595fba67c41a33eae53 | 15,736 | py | Python | samples/balloon/balloon.py | anish2197/Mask-RCNN | 5cc91e268a07d7f363748780afa5c16b841e9576 | [
"MIT"
] | null | null | null | samples/balloon/balloon.py | anish2197/Mask-RCNN | 5cc91e268a07d7f363748780afa5c16b841e9576 | [
"MIT"
] | null | null | null | samples/balloon/balloon.py | anish2197/Mask-RCNN | 5cc91e268a07d7f363748780afa5c16b841e9576 | [
"MIT"
] | null | null | null | """
Mask R-CNN
Train on the toy Balloon dataset and implement color splash effect.
Copyright (c) 2018 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
------------------------------------------------------------
Usage: import the module (see Jupyter notebooks for ex... | 37.918072 | 104 | 0.579626 |
b4f0403f54aec9952f86a57ffab0152c7b4a2a72 | 954 | py | Python | var/spack/repos/builtin/packages/py-azure-mgmt-network/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-10T13:47:48.000Z | 2019-04-17T13:05:17.000Z | var/spack/repos/builtin/packages/py-azure-mgmt-network/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | var/spack/repos/builtin/packages/py-azure-mgmt-network/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-07-19T20:31:27.000Z | 2021-07-19T21:14:14.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class PyAzureMgmtNetwork(PythonPackage):
"""Microsoft Azure Network Management Client Library for Python."""
hom... | 45.428571 | 96 | 0.722222 |
e8da6331e1838647f0635b4fff94038383568035 | 14,072 | py | Python | modules/fsx.py | nmeier/simscript | 87a2beb2694b754156730de92159d2f4425bd057 | [
"MIT"
] | 10 | 2015-03-16T14:28:36.000Z | 2021-12-21T02:04:14.000Z | modules/fsx.py | nmeier/simscript | 87a2beb2694b754156730de92159d2f4425bd057 | [
"MIT"
] | 4 | 2016-10-17T14:17:39.000Z | 2021-09-18T07:09:55.000Z | modules/fsx.py | nmeier/simscript | 87a2beb2694b754156730de92159d2f4425bd057 | [
"MIT"
] | 7 | 2016-10-05T03:25:00.000Z | 2021-07-30T07:52:09.000Z | import logging,time,ctypes.wintypes,sys,traceback,decimal,tempfile
'''
A FSX Sim Connect abstraction layer that allows simscripts to read and write simulator variables
An understanding of http://msdn.microsoft.com/en-us/library/cc526981.aspx is required.
'''
_SIMCONNECT_OBJECT_ID_USER = 0
_SIMCONNE... | 35.715736 | 205 | 0.641771 |
280d19633cdb74f977bbb16e760207fe8a107e4a | 232 | py | Python | ds2/test/testlistqueue.py | aslisabanci/datastructures | f7952801245bc8d386a03d92a38121f558bdacca | [
"MIT"
] | 159 | 2017-10-02T22:03:14.000Z | 2022-03-10T23:02:22.000Z | ds2/test/testlistqueue.py | aslisabanci/datastructures | f7952801245bc8d386a03d92a38121f558bdacca | [
"MIT"
] | 9 | 2019-02-04T14:55:09.000Z | 2021-06-05T13:30:28.000Z | ds2/test/testlistqueue.py | aslisabanci/datastructures | f7952801245bc8d386a03d92a38121f558bdacca | [
"MIT"
] | 49 | 2017-09-29T17:51:16.000Z | 2022-03-10T23:12:17.000Z | # testlistqueue.py
import unittest
from ds2.test.testqueue import QueueTests
from ds2.queue import ListQueue
class TestListQueue(unittest.TestCase, QueueTests):
Queue = ListQueue
if __name__ == '__main__':
unittest.main()
| 21.090909 | 51 | 0.775862 |
c866dd922ef1e7459aa6dd81608a7573c12b713d | 3,348 | py | Python | tools/refresh_github.py | famoser/famoser.ch | efbc22a1e16e2e9cea0f2cdb2e252b71519cfb19 | [
"MIT"
] | null | null | null | tools/refresh_github.py | famoser/famoser.ch | efbc22a1e16e2e9cea0f2cdb2e252b71519cfb19 | [
"MIT"
] | 1 | 2020-08-18T09:11:58.000Z | 2020-08-18T13:03:34.000Z | tools/refresh_github.py | famoser/famoser.ch | efbc22a1e16e2e9cea0f2cdb2e252b71519cfb19 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
from pathlib import Path
env_path = Path('../') / '.env.local'
load_dotenv(dotenv_path=env_path)
github_token = os.getenv("GITHUB_API_TOKEN")
from loader import ProjectLoader
from normalizer import ProjectNormalizer
loader = ProjectLoader()
projects = loader.load()
github_pro... | 38.930233 | 294 | 0.671744 |
1dfcadec2c37660daf0630fcc8e826c23cdbe251 | 503 | py | Python | python_project/python/DateTime.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | python_project/python/DateTime.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | python_project/python/DateTime.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#coding=utf-8
# 要求输入年月日,然后给出相日期应的月份名称:
months=["January","February","March","April","May","June","July","Auguest","September","October","November","December"]
endings=["st","nd","rd"]+17*["th"]+["st","nd","rd"]+7*["th"]+["st"]
year=raw_input("year:")
month=raw_input("month:")
day=raw_input("day:")
ye... | 29.588235 | 119 | 0.693837 |
8ebc2929f261cf04f886a18c7c98fa89e971e98e | 1,190 | py | Python | laziest/ast_meta.py | brendanator/laziest | 63098402cf7c3b320e0dfd46ca14d2700ed87056 | [
"Apache-2.0"
] | 19 | 2020-02-13T11:46:11.000Z | 2021-06-15T10:29:55.000Z | laziest/ast_meta.py | brendanator/laziest | 63098402cf7c3b320e0dfd46ca14d2700ed87056 | [
"Apache-2.0"
] | null | null | null | laziest/ast_meta.py | brendanator/laziest | 63098402cf7c3b320e0dfd46ca14d2700ed87056 | [
"Apache-2.0"
] | 4 | 2020-02-13T12:40:33.000Z | 2020-10-10T22:16:54.000Z | import _ast
# TODO: need order by popularity
stnd_types = [str, int, list, dict, tuple, set, float, bool]
iterated = {_ast.List: list,
_ast.Set: set,
_ast.Tuple: tuple}
simple = [_ast.Str, _ast.Num]
data_types = [x for x in iterated.keys()] + simple
simple_types = [str, int, float]
ops_pa... | 17 | 60 | 0.442857 |
fd38ec4e4b0df7add6d4f4698d413faf03c4c0d3 | 720 | py | Python | src/mock-gps-publisher/fleet.py | fahmiduldul/gcp-data-engineering | 12b3919f7547a6f06e86da92ed426cb6f4a356a5 | [
"MIT"
] | null | null | null | src/mock-gps-publisher/fleet.py | fahmiduldul/gcp-data-engineering | 12b3919f7547a6f06e86da92ed426cb6f4a356a5 | [
"MIT"
] | null | null | null | src/mock-gps-publisher/fleet.py | fahmiduldul/gcp-data-engineering | 12b3919f7547a6f06e86da92ed426cb6f4a356a5 | [
"MIT"
] | 1 | 2022-01-16T03:40:13.000Z | 2022-01-16T03:40:13.000Z | from typing import List
from connector import Connector
from dto import Payload
from vehicle import Vehicle
class Fleet:
vehicles: List[Vehicle]
connector: Connector
def __init__(self, vehicles: List[Vehicle], connector: Connector) -> None:
self.vehicles = vehicles
self.connector = connec... | 25.714286 | 78 | 0.604167 |
a91bafa45ec9e0b0f73cb981236942748eac1a28 | 3,497 | py | Python | lab8/cse512_lab8.py | Rudy02/CSE512 | ba95b638fcc2f4bd696fc193a06030e945c8d182 | [
"MIT"
] | null | null | null | lab8/cse512_lab8.py | Rudy02/CSE512 | ba95b638fcc2f4bd696fc193a06030e945c8d182 | [
"MIT"
] | null | null | null | lab8/cse512_lab8.py | Rudy02/CSE512 | ba95b638fcc2f4bd696fc193a06030e945c8d182 | [
"MIT"
] | null | null | null | # cse512_lab8.py
# KV, Mar 2018, solution for lab8 and beyond
import copy
import itertools # just to try it out; used once, see below
import random
CLS = [['notP', 'notQ', 'R'], ['P', 'R'], ['Q', 'R'], ['notR']]
# set up to prove that H2CO3 by contradicting notH2CO3
CHEM = [['notCO2', 'notH2O','H2CO3'], ... | 22.856209 | 72 | 0.516443 |
3acea81dbad8aa4f1ac7fbd13dbb47c37012b581 | 458 | py | Python | server/config/production.py | HuaRongSAO/flask-start-kit | 9010941ab1f8502598528a78f348b7fcd8c667b6 | [
"MIT"
] | null | null | null | server/config/production.py | HuaRongSAO/flask-start-kit | 9010941ab1f8502598528a78f348b7fcd8c667b6 | [
"MIT"
] | 6 | 2020-07-21T12:43:29.000Z | 2022-03-02T04:34:22.000Z | server/config/production.py | HuaRongSAO/flask-start-kit | 9010941ab1f8502598528a78f348b7fcd8c667b6 | [
"MIT"
] | null | null | null | # coding: utf-8
from .default import Config
class ProductionConfig(Config):
# App config
SECRET_KEY = "\xb5\xb3}#\xb7A\xcac\x9d0\xb6\x0f\x80z\x97\x00\x1e\xc0\xb8+\xe9)\xf0}"
PERMANENT_SESSION_LIFETIME = 3600 * 24 * 7
SESSION_COOKIE_NAME = 'twtf_session'
# Site domain
SITE_DOMAIN = "http://www... | 25.444444 | 88 | 0.679039 |
60cf8887da9bd44763645deb6426507e8d79c31f | 663 | py | Python | myapp/webserver/views.py | lukeyeager/flask-sqlalchemy-socketio-demo | 7fe63b26043ea99533a70252da20e80600732919 | [
"MIT"
] | 18 | 2016-02-09T21:00:09.000Z | 2020-10-20T13:01:31.000Z | myapp/webserver/views.py | lukeyeager/flask-sqlalchemy-socketio-demo | 7fe63b26043ea99533a70252da20e80600732919 | [
"MIT"
] | 3 | 2016-01-09T18:32:42.000Z | 2016-01-11T22:00:36.000Z | myapp/webserver/views.py | lukeyeager/flask-sqlalchemy-socketio-demo | 7fe63b26043ea99533a70252da20e80600732919 | [
"MIT"
] | 9 | 2016-02-25T23:19:37.000Z | 2020-09-28T13:11:40.000Z | from __future__ import absolute_import
import flask
from myapp.database.models import Update
from myapp.database.adapter import db
blueprint = flask.Blueprint(__name__, __name__)
@blueprint.route('/')
@blueprint.route('/index')
def index():
updates = Update.query.all()
return flask.render_template('index.h... | 22.862069 | 64 | 0.713424 |
b230c52495f1e841f0e782592cba88de0dcc0a7c | 4,063 | py | Python | libqtile/widget/__init__.py | dvzrv/qtile | 464bf7f191e800bcb8a075d465841cde81bc15f8 | [
"MIT"
] | null | null | null | libqtile/widget/__init__.py | dvzrv/qtile | 464bf7f191e800bcb8a075d465841cde81bc15f8 | [
"MIT"
] | null | null | null | libqtile/widget/__init__.py | dvzrv/qtile | 464bf7f191e800bcb8a075d465841cde81bc15f8 | [
"MIT"
] | null | null | null | # Copyright (c) 2014 Rock Neurotiko
# Copyright (c) 2014 roger
# Copyright (c) 2015 David R. Andersen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without ... | 39.067308 | 79 | 0.75363 |
22c32e8900f675fb6a8027d8c252e0644e2ee0aa | 654 | py | Python | smarter/base/migrations/0008_auto_20160621_1555.py | pulkitpahwa/jsm | da6f81cf9d9900c0545abfca867e9ec95ca763f5 | [
"MIT"
] | 3 | 2016-07-13T08:42:46.000Z | 2021-01-06T12:38:46.000Z | smarter/base/migrations/0008_auto_20160621_1555.py | pulkitpahwa/jsm | da6f81cf9d9900c0545abfca867e9ec95ca763f5 | [
"MIT"
] | null | null | null | smarter/base/migrations/0008_auto_20160621_1555.py | pulkitpahwa/jsm | da6f81cf9d9900c0545abfca867e9ec95ca763f5 | [
"MIT"
] | 4 | 2016-07-02T20:56:18.000Z | 2016-08-08T10:23:17.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-21 15:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0007_auto_20160621_1512'),
]
operations = [
migrations.AlterField(
... | 25.153846 | 59 | 0.611621 |
e36f41227295a0b190cedfccf81c5f7324886a9f | 11,679 | py | Python | zoo/utils/utils.py | guyk1971/stable-baselines | ac7a1f3c32851577d5a4fc76e2c42760b9379634 | [
"MIT"
] | null | null | null | zoo/utils/utils.py | guyk1971/stable-baselines | ac7a1f3c32851577d5a4fc76e2c42760b9379634 | [
"MIT"
] | null | null | null | zoo/utils/utils.py | guyk1971/stable-baselines | ac7a1f3c32851577d5a4fc76e2c42760b9379634 | [
"MIT"
] | null | null | null | import time
import os
import inspect
import glob
import yaml
import importlib
import gym
from gym.envs.registration import load
try:
import pybullet_envs
except ImportError:
pybullet_envs = None
try:
import mpi4py
except ImportError:
mpi4py = None
from stable_baselines.deepq.policies import FeedForwar... | 34.149123 | 115 | 0.628136 |
7d8f39899acd999cc29ad5616c5697893e26de89 | 4,425 | py | Python | chb/peformat/PESectionHeader.py | psifertex/CodeHawk-Binary | 1711d7b16d32a2e9ffa9d22af483182b3f9ded77 | [
"MIT"
] | null | null | null | chb/peformat/PESectionHeader.py | psifertex/CodeHawk-Binary | 1711d7b16d32a2e9ffa9d22af483182b3f9ded77 | [
"MIT"
] | null | null | null | chb/peformat/PESectionHeader.py | psifertex/CodeHawk-Binary | 1711d7b16d32a2e9ffa9d22af483182b3f9ded77 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Access to the CodeHawk Binary Analyzer Analysis Results
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
#
#... | 42.548077 | 80 | 0.628023 |
083dfa4e78a6d7aea399fe6a433b09bff91a1d09 | 3,313 | py | Python | pyranges/subset.py | iamjli/pyranges | 52a0979db99c8b4d88e3e8a63558356e8baec70b | [
"MIT"
] | 299 | 2019-03-22T18:28:01.000Z | 2022-03-11T16:14:19.000Z | pyranges/subset.py | iamjli/pyranges | 52a0979db99c8b4d88e3e8a63558356e8baec70b | [
"MIT"
] | 157 | 2019-04-06T18:05:27.000Z | 2022-03-07T14:50:10.000Z | pyranges/subset.py | iamjli/pyranges | 52a0979db99c8b4d88e3e8a63558356e8baec70b | [
"MIT"
] | 33 | 2019-04-12T14:44:53.000Z | 2022-03-16T16:58:06.000Z | from ncls import NCLS
import pandas as pd
def create_ncls(df):
return NCLS(df.Start.values, df.End.values, df.index.values)
def find_overlaps(df, start, end):
n = create_ncls(df)
idxes = []
for r in n.find_overlap(start, end):
idxes.append(r[2])
return idxes
def get_slice(self, val... | 22.691781 | 79 | 0.53607 |
c31ccf0d74062b6b0dfdfd92eef928233d5a1545 | 966 | py | Python | scraper/storage_spiders/kidsbikevn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/kidsbikevn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/kidsbikevn.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='details-right-head']/h1",
'price' : "//tr/td[@class='thongtin'][2]",
'category' : "//li[@class='active-page']/a",
... | 35.777778 | 91 | 0.622153 |
57211e70813e9cb4e25ac21c20cfc3e9898520fc | 8,553 | py | Python | KMLParser.py | flailingsquirrel/asciimapper | 1f83d63912f029b90912fae54073f570be0f3f17 | [
"BSD-3-Clause"
] | null | null | null | KMLParser.py | flailingsquirrel/asciimapper | 1f83d63912f029b90912fae54073f570be0f3f17 | [
"BSD-3-Clause"
] | null | null | null | KMLParser.py | flailingsquirrel/asciimapper | 1f83d63912f029b90912fae54073f570be0f3f17 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
######################################################################
# Ascii TMS Viewer
#
#--------------------------------------------------------------------
# Brian Hone | Initial Release
#--------------------------------------------------------------------
# ... | 37.025974 | 126 | 0.570911 |
f7f2e684a43c8984453ff2f59ed94f18a5706f40 | 257 | py | Python | hooks/hook-Crypto-local.py | fakegit/DEXBot | 44588f0cd7beb5f50508d966054d5f929818bf76 | [
"MIT"
] | 249 | 2018-01-11T09:08:30.000Z | 2022-03-20T23:05:29.000Z | hooks/hook-Crypto.py | g3d/DEXBot | a2b1462d78d7154cb10871a7cec9a44c8d6664de | [
"MIT"
] | 541 | 2018-01-10T12:56:08.000Z | 2021-12-22T02:22:09.000Z | hooks/hook-Crypto.py | g3d/DEXBot | a2b1462d78d7154cb10871a7cec9a44c8d6664de | [
"MIT"
] | 164 | 2018-01-22T07:01:56.000Z | 2022-03-21T06:00:33.000Z | # Hook for pycryptodome extensions
hiddenimports = [
'Crypto.Cipher._chacha20',
'Crypto.Cipher._raw_aes',
'Crypto.Cipher._raw_ecb',
'Crypto.Cipher._raw_cbc',
'Crypto.Hash._SHA256',
'Crypto.Util._cpuid',
'Crypto.Util._strxor',
]
| 21.416667 | 34 | 0.673152 |
04925ea8907e68d45441d2a5569d832f81c15446 | 292 | py | Python | pybamm/models/submodels/electrolyte_conductivity/__init__.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 330 | 2019-04-17T11:36:57.000Z | 2022-03-28T16:49:55.000Z | pybamm/models/submodels/electrolyte_conductivity/__init__.py | masoodtamaddon/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | 1,530 | 2019-03-26T18:13:03.000Z | 2022-03-31T16:12:53.000Z | pybamm/models/submodels/electrolyte_conductivity/__init__.py | masoodtamaddon/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | 178 | 2019-03-27T13:48:04.000Z | 2022-03-31T09:30:11.000Z | from .base_electrolyte_conductivity import BaseElectrolyteConductivity
from .leading_order_conductivity import LeadingOrder
from .composite_conductivity import Composite
from .full_conductivity import Full
from .integrated_conductivity import Integrated
from . import surface_potential_form
| 36.5 | 70 | 0.893836 |
0780104663505c5256eb04ce6ff816058f689eac | 8,808 | py | Python | application.py | diogobaeder/poemage | 4547871c0cf08f2e710ff12ce3710ed5ed09d2e9 | [
"BSD-2-Clause"
] | null | null | null | application.py | diogobaeder/poemage | 4547871c0cf08f2e710ff12ce3710ed5ed09d2e9 | [
"BSD-2-Clause"
] | null | null | null | application.py | diogobaeder/poemage | 4547871c0cf08f2e710ff12ce3710ed5ed09d2e9 | [
"BSD-2-Clause"
] | null | null | null | import base64
import hashlib
import io
import json
import logging
import tempfile
import os
import urllib.request
from collections import OrderedDict
from contextlib import contextmanager
from os.path import dirname, exists, join
from uuid import uuid4
from flask import Flask, redirect, render_template, request, url_f... | 27.018405 | 78 | 0.645436 |
067f560ad0a7afb4322b1397a86d2b95fcc8d368 | 496 | py | Python | zang/domain/list/available_phone_numbers.py | vlastikczech/zang-python | 980f5243071404d6838554500a6955ff7bc2a0c7 | [
"MIT"
] | 1 | 2019-02-18T21:51:58.000Z | 2019-02-18T21:51:58.000Z | zang/domain/list/available_phone_numbers.py | vlastikczech/zang-python | 980f5243071404d6838554500a6955ff7bc2a0c7 | [
"MIT"
] | 6 | 2019-06-26T13:56:22.000Z | 2022-02-17T16:40:48.000Z | zang/domain/list/available_phone_numbers.py | vlastikczech/zang-python | 980f5243071404d6838554500a6955ff7bc2a0c7 | [
"MIT"
] | 6 | 2017-10-17T12:44:32.000Z | 2020-02-07T20:45:00.000Z | # -*- coding: utf-8 -*-
"""
zang.domain.list.recording
~~~~~~~~~~~~~~~~~~~
`AvailablePhoneNumbers` model
"""
from zang.domain.list.base_list import BaseList
from zang.domain.available_phone_number import AvailablePhoneNumber
class AvailablePhoneNumbers(BaseList):
_arrays = {'available_phone_numbers': Available... | 21.565217 | 67 | 0.717742 |
e3a53dd780c4cb894071bc6d47d73a434f925b4b | 2,808 | py | Python | python/pyspark/ml/param/__init__.py | MiguelPeralvo/spark | 979a73f86f77e7ae294979b7962b8ae30d38f1ff | [
"Apache-2.0"
] | 24 | 2017-10-11T02:59:45.000Z | 2021-12-06T05:01:13.000Z | python/pyspark/ml/param/__init__.py | MiguelPeralvo/spark | 979a73f86f77e7ae294979b7962b8ae30d38f1ff | [
"Apache-2.0"
] | 6 | 2019-11-13T07:48:07.000Z | 2022-01-21T23:24:20.000Z | python/pyspark/ml/param/__init__.py | MiguelPeralvo/spark | 979a73f86f77e7ae294979b7962b8ae30d38f1ff | [
"Apache-2.0"
] | 18 | 2017-10-26T14:16:10.000Z | 2022-03-30T02:18:14.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 us... | 30.857143 | 100 | 0.648148 |
33d63ec7650c04817ee6e4b0d1e3320576e1827a | 322 | py | Python | src/igrf_model/__init__.py | skybrush-io/igrf-model | 320c9a9f841a39b7a98cae6c65b67a41a97ca7b5 | [
"MIT"
] | null | null | null | src/igrf_model/__init__.py | skybrush-io/igrf-model | 320c9a9f841a39b7a98cae6c65b67a41a97ca7b5 | [
"MIT"
] | null | null | null | src/igrf_model/__init__.py | skybrush-io/igrf-model | 320c9a9f841a39b7a98cae6c65b67a41a97ca7b5 | [
"MIT"
] | null | null | null | from .model import DateBoundIGRFModel, IGRFModel
from .types import FractionalYearLike
from .vector import MagneticVector
from .version import __version__, __version_info__
__all__ = (
"DateBoundIGRFModel",
"IGRFModel",
"MagneticVector",
"FractionalYearLike",
"__version__",
"__version_info__",
... | 23 | 50 | 0.751553 |
b230b2690ea5ae54fb1dcf7d991ae1b1f7f57eb5 | 7,603 | py | Python | robotarium_node/robotarium_node/utilities/misc.py | zmk5/ros2_robotarium | 6fc31bb6d3cdd89cf0b0b063d674897287ec1f8d | [
"MIT"
] | 22 | 2020-08-16T21:40:17.000Z | 2022-03-10T15:54:55.000Z | robotarium_node/robotarium_node/utilities/misc.py | zmk5/ros2_robotarium | 6fc31bb6d3cdd89cf0b0b063d674897287ec1f8d | [
"MIT"
] | null | null | null | robotarium_node/robotarium_node/utilities/misc.py | zmk5/ros2_robotarium | 6fc31bb6d3cdd89cf0b0b063d674897287ec1f8d | [
"MIT"
] | 1 | 2020-08-26T09:06:12.000Z | 2020-08-26T09:06:12.000Z | """Various other functions to use.
Written by: The Robotarium Team
Modified by: Zahi Kakish (zmk5)
"""
from typing import Tuple
from typing import Union
import numpy as np
def generate_initial_conditions(
N: int,
spacing: Union[int, float] = 0.3,
width: Union[int, float] = 3,
height... | 52.434483 | 328 | 0.697751 |
e8330e81cf5e287cb1121ae02684c214a53fe414 | 55,334 | py | Python | sphinx/domains/python.py | lmmx/sphinx | 10dba797f204bc00d1e170cf024b22bffe241f25 | [
"BSD-2-Clause"
] | 1 | 2022-02-08T23:30:27.000Z | 2022-02-08T23:30:27.000Z | sphinx/domains/python.py | lmmx/sphinx | 10dba797f204bc00d1e170cf024b22bffe241f25 | [
"BSD-2-Clause"
] | 1 | 2022-03-02T11:49:09.000Z | 2022-03-02T11:49:09.000Z | sphinx/domains/python.py | mrmeyagi5/sphinx | f59026865a8c658acbc6d5690c146f4be0851854 | [
"BSD-2-Clause"
] | null | null | null | """
sphinx.domains.python
~~~~~~~~~~~~~~~~~~~~~
The Python domain.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import builtins
import inspect
import re
import sys
import typing
import warnings
from inspect import Parameter
from typi... | 38.940183 | 95 | 0.565999 |
ec67efda7e51cdf8399b6ec0705ac47d2d41319f | 33,735 | py | Python | retopoflow/rftool_contours/contours.py | angjminer/retopoflow | dff40cb22a4bc7bab6d5f9635dbbac8e04807eba | [
"OML"
] | null | null | null | retopoflow/rftool_contours/contours.py | angjminer/retopoflow | dff40cb22a4bc7bab6d5f9635dbbac8e04807eba | [
"OML"
] | null | null | null | retopoflow/rftool_contours/contours.py | angjminer/retopoflow | dff40cb22a4bc7bab6d5f9635dbbac8e04807eba | [
"OML"
] | null | null | null | '''
Copyright (C) 2021 CG Cookie
http://cgcookie.com
hello@cgcookie.com
Created by Jonathan Denning, Jonathan Williamson, and Patrick Moore
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation... | 43.416988 | 138 | 0.609041 |
f2118c13ccedfbbd6fafa292187c3372e0abf2b9 | 171 | py | Python | layers/__init__.py | ryanai3/TooMuchData | 67028d8b2ba92954f27a53cfad6e433d611eb373 | [
"MIT"
] | null | null | null | layers/__init__.py | ryanai3/TooMuchData | 67028d8b2ba92954f27a53cfad6e433d611eb373 | [
"MIT"
] | null | null | null | layers/__init__.py | ryanai3/TooMuchData | 67028d8b2ba92954f27a53cfad6e433d611eb373 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
from os import path
sys.path.append(path.join(path.dirname(__file__), "../"))
kernel_dir = path.join(path.dirname(__file__), "../kernels")
| 21.375 | 60 | 0.71345 |
6c62c841a540c624a2322ba04391c35a0dbfc487 | 15,267 | py | Python | train_reg.py | S-HuaBomb/OBELISK | a8cc1dea491a14af31533b24b3e5c7e6efade9de | [
"MIT"
] | 4 | 2021-12-16T05:22:57.000Z | 2021-12-22T09:50:10.000Z | train_reg.py | S-HuaBomb/OBELISK | a8cc1dea491a14af31533b24b3e5c7e6efade9de | [
"MIT"
] | null | null | null | train_reg.py | S-HuaBomb/OBELISK | a8cc1dea491a14af31533b24b3e5c7e6efade9de | [
"MIT"
] | null | null | null | from __future__ import print_function
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data import DataLoader
import time
import os
import pathlib
import sys
import nibabel as nib
im... | 45.846847 | 124 | 0.592454 |
e3d934e050aee78d6029d81d8a908ea79d637387 | 2,156 | py | Python | cogs/Block.py | kousakirai/Souce | 54dff1dc2f002d3e9ddd27000d52381ebd03bde6 | [
"MIT"
] | null | null | null | cogs/Block.py | kousakirai/Souce | 54dff1dc2f002d3e9ddd27000d52381ebd03bde6 | [
"MIT"
] | null | null | null | cogs/Block.py | kousakirai/Souce | 54dff1dc2f002d3e9ddd27000d52381ebd03bde6 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import os
import aiofile
import json
class block(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.path = os.path.dirname(__file__) + "/txtfiles/Blockinglist.json"
with open(self.path, "r") as f:
content = f.read()
... | 34.222222 | 77 | 0.604824 |
70a846b1c5e05183b67ad3df891bc9db1efb8bbf | 16,370 | py | Python | pydantic/fields.py | Sean1708/pydantic | a704662ae4cde638c0e1b68126a2f89828787641 | [
"MIT"
] | null | null | null | pydantic/fields.py | Sean1708/pydantic | a704662ae4cde638c0e1b68126a2f89828787641 | [
"MIT"
] | null | null | null | pydantic/fields.py | Sean1708/pydantic | a704662ae4cde638c0e1b68126a2f89828787641 | [
"MIT"
] | null | null | null | import warnings
from enum import IntEnum
from typing import (
TYPE_CHECKING,
Any,
Dict,
Generator,
Iterable,
Iterator,
List,
Mapping,
Optional,
Pattern,
Sequence,
Set,
Tuple,
Type,
Union,
cast,
)
from . import errors as errors_
from .class_validators impo... | 35.280172 | 119 | 0.57978 |
a70d9e2d786dba6e6e6c32e0f2d00bdc5c1a8a54 | 23,821 | py | Python | openstack/cloud/meta.py | horion/openstacksdk | cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3 | [
"Apache-2.0"
] | 99 | 2018-03-28T15:41:45.000Z | 2022-01-23T17:22:13.000Z | openstack/cloud/meta.py | horion/openstacksdk | cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3 | [
"Apache-2.0"
] | 5 | 2018-05-25T16:54:23.000Z | 2021-11-21T02:27:16.000Z | openstack/cloud/meta.py | horion/openstacksdk | cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3 | [
"Apache-2.0"
] | 104 | 2018-04-06T14:33:54.000Z | 2022-03-01T01:58:09.000Z | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | 39.373554 | 107 | 0.629319 |
c9a286601dd82a10f8797066dbfc0d0343df5c31 | 469 | py | Python | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_ith_bodysuit_casual_01.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_ith_bodysuit_casual_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_ith_bodysuit_casual_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/clothing/shared_clothing_ith_bodysuit_casual_01.iff"
resul... | 27.588235 | 95 | 0.739872 |
3d6b95b73d409edd06561c879378f53e50293427 | 11 | py | Python | django/tests/auth_tests/templates/registration/password_reset_done.html.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | django/tests/auth_tests/templates/registration/password_reset_done.html.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | django/tests/auth_tests/templates/registration/password_reset_done.html.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | XXXXX XXXX
| 5.5 | 10 | 0.818182 |
01901c3d3c4bec0272019c2d99b63ea05a1e9cf1 | 287 | py | Python | alembic/versions/3b9a3e20e9e9_init.py | atlefren/mineturer2 | e9798f587947e4ef9d54065e5bea4a4af3caf482 | [
"MIT"
] | 8 | 2016-06-06T02:36:31.000Z | 2020-08-26T07:53:06.000Z | alembic/versions/3b9a3e20e9e9_init.py | atlefren/mineturer2 | e9798f587947e4ef9d54065e5bea4a4af3caf482 | [
"MIT"
] | null | null | null | alembic/versions/3b9a3e20e9e9_init.py | atlefren/mineturer2 | e9798f587947e4ef9d54065e5bea4a4af3caf482 | [
"MIT"
] | null | null | null | """init
Revision ID: 3b9a3e20e9e9
Revises: None
Create Date: 2014-07-08 22:22:28.378522
"""
# revision identifiers, used by Alembic.
revision = '3b9a3e20e9e9'
down_revision = None
def upgrade():
print 'run the mineturer_schema.sql manually'
pass
def downgrade():
pass
| 13.666667 | 49 | 0.710801 |
5750f8a62e641960ad04e5251b575117dbc4eae5 | 5,780 | py | Python | hlfbt/serial_console/cli.py | hlfbt/serial-console | f9c770ea841c8ac1283b84f5883326363d4db1a8 | [
"MIT"
] | null | null | null | hlfbt/serial_console/cli.py | hlfbt/serial-console | f9c770ea841c8ac1283b84f5883326363d4db1a8 | [
"MIT"
] | null | null | null | hlfbt/serial_console/cli.py | hlfbt/serial-console | f9c770ea841c8ac1283b84f5883326363d4db1a8 | [
"MIT"
] | null | null | null | from typing import *
from .console import Console
from .console.matching import PromptMatcher, MatcherType
from ._argparse import formatter
import argparse
import codecs
import sys
import re
def escaped_str(_str, enc=sys.getdefaultencoding()):
return codecs.escape_decode(_str.encode(enc))[0].decode(enc)
def get... | 47.377049 | 136 | 0.616436 |
70d1afdef3f1343458597395ed2b06dacc440ad4 | 363 | py | Python | python/iris/setup.py | dougmet/cloudml | 0488a83661232d3c0d59a9c5f5bef93fda6d958e | [
"MIT"
] | 1 | 2019-04-09T19:14:22.000Z | 2019-04-09T19:14:22.000Z | python/iris/setup.py | dougmet/cloudml | 0488a83661232d3c0d59a9c5f5bef93fda6d958e | [
"MIT"
] | null | null | null | python/iris/setup.py | dougmet/cloudml | 0488a83661232d3c0d59a9c5f5bef93fda6d958e | [
"MIT"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['Keras==2.0.4',
'h5py==2.7.0',
'sklearn']
setup(
name='iris',
version='0.1',
install_requires=REQUIRED_PACKAGES,
packages=find_packages(),
include_package_data=True,
... | 22.6875 | 43 | 0.636364 |
e834fb411db1e68a48bc79be01c2dde2964b495d | 6,189 | py | Python | citadel/rpc/client.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | citadel/rpc/client.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | citadel/rpc/client.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import grpc
import wrapt
from grpc import RpcError, StatusCode
from grpc.framework.interfaces.face import face
from more_itertools import peekable
from operator import attrgetter
from citadel.config import ZONE_CONFIG
from citadel.libs.cache import cache, clean_cache, ONE_DAY
from citadel.libs... | 33.274194 | 194 | 0.655518 |
a58c07d8b9567b5fe5dc1dbc5c153ed4d81d3a53 | 5,812 | py | Python | magenta/music/mfcc_mel.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/music/mfcc_mel.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/music/mfcc_mel.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | 1 | 2021-09-09T15:30:36.000Z | 2021-09-09T15:30:36.000Z | # Copyright 2020 The Magenta 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 ... | 48.033058 | 82 | 0.698727 |
1a04b9fe9d1e19686c50e7f54257dd468dfe6b54 | 3,986 | py | Python | eval/evaluate_doubletriplemnist.py | Polarbeartnt/SP-ILC | 07c812dfe40461409c9714936190ba1470f91fc3 | [
"MIT"
] | 1 | 2022-01-13T21:57:31.000Z | 2022-01-13T21:57:31.000Z | eval/evaluate_doubletriplemnist.py | Polarbeartnt/SP-ILC | 07c812dfe40461409c9714936190ba1470f91fc3 | [
"MIT"
] | null | null | null | eval/evaluate_doubletriplemnist.py | Polarbeartnt/SP-ILC | 07c812dfe40461409c9714936190ba1470f91fc3 | [
"MIT"
] | null | null | null | #coding = utf-8
#-------------------------------------#
#-------------------------------------#
from predictor import Predictor
from utils.utils import Precision_Recall
import numpy as np
from mkdir import mkdir
from PIL import Image
import matplotlib.pyplot as plt
from skimage.metrics import peak_signal_noise... | 43.326087 | 119 | 0.593578 |
01576373c4ff0eb1132a4017486c08d0770f4bf5 | 3,558 | py | Python | openstack_dashboard/dashboards/project/routers/ports/tables.py | rackerlabs/horizon | 8914ed95fc8fa44771f5f3ec827e325a5855b60a | [
"Apache-2.0"
] | 2 | 2018-10-21T22:30:29.000Z | 2020-11-21T08:58:31.000Z | openstack_dashboard/dashboards/project/routers/ports/tables.py | e/horizon | abbce256b68178ebf42816eb87303292212c1dfe | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/routers/ports/tables.py | e/horizon | abbce256b68178ebf42816eb87303292212c1dfe | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, 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... | 35.939394 | 78 | 0.637437 |
9e314eb8e0ad07bb7db64aa3d99ffe76aa4267fa | 11,896 | py | Python | src/conf.py | Ginohmk/conda-forge.github.io | 12bcb31207b87d20c092aa7819842ffd989982fb | [
"BSD-3-Clause"
] | null | null | null | src/conf.py | Ginohmk/conda-forge.github.io | 12bcb31207b87d20c092aa7819842ffd989982fb | [
"BSD-3-Clause"
] | null | null | null | src/conf.py | Ginohmk/conda-forge.github.io | 12bcb31207b87d20c092aa7819842ffd989982fb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# conda-forge documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 1 01:44:13 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 33.22905 | 83 | 0.700824 |
4690e51a4490976bfd92c57684b999d511fe3e61 | 17,089 | py | Python | msgraph-cli-extensions/v1_0/identitysignins_v1_0/azext_identitysignins_v1_0/vendored_sdks/identitysignins/operations/_invitations_invitation_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/identitysignins_v1_0/azext_identitysignins_v1_0/vendored_sdks/identitysignins/operations/_invitations_invitation_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/identitysignins_v1_0/azext_identitysignins_v1_0/vendored_sdks/identitysignins/operations/_invitations_invitation_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"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 ... | 45.692513 | 133 | 0.647902 |
634e9597b14bf851a359116d006c46ac71837d19 | 55,657 | py | Python | nova/tests/unit/virt/libvirt/test_host.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-02-08T06:53:51.000Z | 2021-02-08T06:53:51.000Z | nova/tests/unit/virt/libvirt/test_host.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-02-16T10:17:26.000Z | 2021-02-17T17:44:15.000Z | nova/tests/unit/virt/libvirt/test_host.py | wmousa/nova | a7dd1f8881484ba0bf4270dd48109c2be142c333 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
# Copyright 2014 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | 41.227407 | 79 | 0.635302 |
ebb9f2e4dc13c3f6132696df7b49441f9a68935f | 951 | py | Python | resources/dot_PyCharm/system/python_stubs/-762174762/markupsafe/_speedups.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | 1 | 2020-04-20T02:27:20.000Z | 2020-04-20T02:27:20.000Z | resources/dot_PyCharm/system/python_stubs/cache/d1074524a35641ac76c4df11360d9b18d4926adb75fccce45dbdcb23cccfb15f/markupsafe/_speedups.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | resources/dot_PyCharm/system/python_stubs/cache/d1074524a35641ac76c4df11360d9b18d4926adb75fccce45dbdcb23cccfb15f/markupsafe/_speedups.py | basepipe/developer_onboarding | 05b6a776f8974c89517868131b201f11c6c2a5ad | [
"MIT"
] | null | null | null | # encoding: utf-8
# module markupsafe._speedups
# from C:\Python27\lib\site-packages\markupsafe\_speedups.pyd
# by generator 1.147
# no doc
# no imports
# functions
def escape(s): # real signature unknown; restored from __doc__
"""
escape(s) -> markup
Convert the characters &, <, >, ', and " in strin... | 25.026316 | 75 | 0.670873 |
83d1dc79387edbc4570ec6ad26068b5755c9f259 | 4,109 | py | Python | rasmus/rplotting.py | Open-Technology/Computational-Biology | f7628900f2d1d9ade60d7ad94f6b3d1022c92cb7 | [
"MIT"
] | 30 | 2015-05-08T19:21:15.000Z | 2022-03-11T21:30:33.000Z | rasmus/rplotting.py | Open-Technology/Computational-Biology | f7628900f2d1d9ade60d7ad94f6b3d1022c92cb7 | [
"MIT"
] | null | null | null | rasmus/rplotting.py | Open-Technology/Computational-Biology | f7628900f2d1d9ade60d7ad94f6b3d1022c92cb7 | [
"MIT"
] | 8 | 2015-05-08T02:02:33.000Z | 2021-06-10T17:51:03.000Z |
import os
import tempfile as temporaryfile
#=============================================================================
# R plotting
# private global rplot state
_rplot_pdf = None
_rplot_temp = False
_rplot_viewer = "xpdf"
class LazyR (object):
"""Allows lazy loading of rpy"""
def __init__(self, name):... | 22.701657 | 78 | 0.541981 |
62c577dcea455793ee7189452a4b2ad6fb49a935 | 205 | py | Python | pettingzoo/atari/surround_v0.py | MarioJayakumar/PettingZoo | 0673d44c33ae1843a773babf5e6595baf8214664 | [
"MIT"
] | 1 | 2020-08-13T00:09:48.000Z | 2020-08-13T00:09:48.000Z | pettingzoo/atari/surround_v0.py | KonstantinKlepikov/PettingZoo | 34c4d38e8fbc1cd6ecbebe58176e6d39ba1645de | [
"MIT"
] | null | null | null | pettingzoo/atari/surround_v0.py | KonstantinKlepikov/PettingZoo | 34c4d38e8fbc1cd6ecbebe58176e6d39ba1645de | [
"MIT"
] | 1 | 2021-01-25T22:57:41.000Z | 2021-01-25T22:57:41.000Z | from .base_atari_env import BaseAtariEnv, base_env_wrapper_fn
def raw_env(**kwargs):
return BaseAtariEnv(game="surround", num_players=2, mode_num=None, **kwargs)
env = base_env_wrapper_fn(raw_env)
| 22.777778 | 80 | 0.780488 |
330cddfe2b65b0263ac1ea6ac2d886813d5383c2 | 36,012 | py | Python | MinkowskiEngine/SparseTensor.py | rancheng/Minkowski-Engine | 8fcc241839a00caa86964867d09d996620a354b5 | [
"MIT"
] | 1 | 2021-05-23T12:26:16.000Z | 2021-05-23T12:26:16.000Z | MinkowskiEngine/SparseTensor.py | rancheng/Minkowski-Engine | 8fcc241839a00caa86964867d09d996620a354b5 | [
"MIT"
] | null | null | null | MinkowskiEngine/SparseTensor.py | rancheng/Minkowski-Engine | 8fcc241839a00caa86964867d09d996620a354b5 | [
"MIT"
] | null | null | null | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu).
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, ... | 41.203661 | 352 | 0.613795 |
39d5671071e83cf29f949512bc7dae089e00f9b9 | 2,102 | py | Python | utils/filter_utils.py | fancykingstar/feed-sdk-customization | b8b1aec198854510f07af12666506af3c5c4f8d1 | [
"Apache-2.0"
] | null | null | null | utils/filter_utils.py | fancykingstar/feed-sdk-customization | b8b1aec198854510f07af12666506af3c5c4f8d1 | [
"Apache-2.0"
] | null | null | null | utils/filter_utils.py | fancykingstar/feed-sdk-customization | b8b1aec198854510f07af12666506af3c5c4f8d1 | [
"Apache-2.0"
] | null | null | null | # **************************************************************************
# Copyright 2018-2019 eBay Inc.
# Author/Developers: --
# 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:... | 30.028571 | 77 | 0.649382 |
63bc60ac1d59cd503a5bebdb1363caefc7b979e8 | 15,692 | py | Python | ESMF/src/addon/MAPL/MAPL_Base/mapl_tree.py | joeylamcy/gchp | 0e1676300fc91000ecb43539cabf1f342d718fb3 | [
"NCSA",
"Apache-2.0",
"MIT"
] | 1 | 2018-07-05T16:48:58.000Z | 2018-07-05T16:48:58.000Z | ESMF/src/addon/MAPL/MAPL_Base/mapl_tree.py | joeylamcy/gchp | 0e1676300fc91000ecb43539cabf1f342d718fb3 | [
"NCSA",
"Apache-2.0",
"MIT"
] | 1 | 2022-03-04T16:12:02.000Z | 2022-03-04T16:12:02.000Z | ESMF/src/addon/MAPL/MAPL_Base/mapl_tree.py | joeylamcy/gchp | 0e1676300fc91000ecb43539cabf1f342d718fb3 | [
"NCSA",
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
# +-======-+
# Copyright (c) 2003-2007 United States Government as represented by
# the Admistrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE,
# REPRODUCTION, DISTRIBUTION, ... | 37.273159 | 111 | 0.491779 |
37b975c55ff54e1a00c109b2482edb6752639f80 | 12,915 | py | Python | lib/coinchooser.py | surinder83singh/Elymus | 054ba5138da886db0523182101f862961b18e6f7 | [
"MIT"
] | null | null | null | lib/coinchooser.py | surinder83singh/Elymus | 054ba5138da886db0523182101f862961b18e6f7 | [
"MIT"
] | 1 | 2021-06-02T03:23:30.000Z | 2021-06-02T03:23:30.000Z | lib/coinchooser.py | surinder83singh/Elymus | 054ba5138da886db0523182101f862961b18e6f7 | [
"MIT"
] | 4 | 2018-07-07T16:35:50.000Z | 2018-12-25T16:02:52.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 kyuupichan@gmail
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including withou... | 39.861111 | 79 | 0.632288 |
9cf9f48ef78350a4f724125edc4e0e23371f2934 | 2,450 | py | Python | py/main.py | nahcnuj/tenka1-2021-autumn | 84a3a507c36a0b42b1d99e262196a04b8176c449 | [
"Unlicense"
] | null | null | null | py/main.py | nahcnuj/tenka1-2021-autumn | 84a3a507c36a0b42b1d99e262196a04b8176c449 | [
"Unlicense"
] | null | null | null | py/main.py | nahcnuj/tenka1-2021-autumn | 84a3a507c36a0b42b1d99e262196a04b8176c449 | [
"Unlicense"
] | 2 | 2021-09-23T05:13:21.000Z | 2021-09-23T06:36:07.000Z | """
実行には python3 環境が必要です。
TOKEN 変数を書き換えて実行してください。
サンプル初期実装
移動先に資源が無い回収車を、ランダムに選んだ出現中の資源へと移動させる
ただしこのとき2台以上の回収車が同じ資源を選ばないようにする
"""
import os
import random
import time
import json
from typing import Iterable, List, Set, Tuple
from urllib.request import urlopen
# ゲームサーバのアドレス / トークン
GAME_SERVER = os.getenv('GAME_SERVER'... | 27.52809 | 128 | 0.554694 |
d7f820866230d76034a30b6a61fdc2d6e6384daf | 3,388 | py | Python | self_supervised/_nbdev.py | gsganden/self_supervised | b3a536a3af55eeb639f52b280cfa6e7aed82c158 | [
"Apache-2.0"
] | null | null | null | self_supervised/_nbdev.py | gsganden/self_supervised | b3a536a3af55eeb639f52b280cfa6e7aed82c158 | [
"Apache-2.0"
] | null | null | null | self_supervised/_nbdev.py | gsganden/self_supervised | b3a536a3af55eeb639f52b280cfa6e7aed82c158 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"RandomGaussianBlur": "01 - augmentations.ipynb",
"get_kornia_batch_augs": "01 - augmentations.ipynb",
"get_torchvision_batch_augs": "01 - augmentations.ipynb",
"get_fastai_batch_au... | 44 | 71 | 0.588253 |
0b2e630c83db462ab3147cdf99bc6ff88b5c1a66 | 2,777 | py | Python | habu/cli/cmd_tcp_scan.py | riccigrj/habu | 336a5d771edd318b01a94a9b793e2706ad4ccd2e | [
"BSD-3-Clause"
] | 461 | 2017-05-27T15:35:13.000Z | 2019-11-30T23:13:15.000Z | habu/cli/cmd_tcp_scan.py | kobbycyber/habu | cda99c8df97fe669c8e45148615ba546b1f8226e | [
"BSD-3-Clause"
] | 10 | 2017-10-12T09:43:23.000Z | 2019-06-21T17:25:09.000Z | habu/cli/cmd_tcp_scan.py | kobbycyber/habu | cda99c8df97fe669c8e45148615ba546b1f8226e | [
"BSD-3-Clause"
] | 108 | 2017-09-23T19:55:23.000Z | 2019-11-30T19:08:32.000Z | #!/usr/bin/env python3
import logging
import re
import click
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from habu.lib.iface import search_iface
from scapy.all import IP, TCP, conf, sr, sr1
@click.command()
@click.argument('ip')
@click.option('-p', 'port', default='80', help='Ports to use (default:... | 29.542553 | 123 | 0.591646 |
c3a890ee5fae1c6342dc16d86930f86b18225c7f | 11,846 | py | Python | qnarre/run/trafo_std.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/run/trafo_std.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/run/trafo_std.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | import argparse
import time
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import TransformerEncoder, TransformerEncLayer
from io import open
from ..utils import Corpus
parser = argparse.ArgumentParser()
parser.add_argument("--checkpoint", type=str, default="./model.pt")... | 34.841176 | 100 | 0.603157 |
0d2cafa096774e3e5a35d217989cf961fec05ac8 | 2,594 | py | Python | pr_assignment/sample_programms/Step03_TemplateMatching.py | ecoresystems/Kyushu_School_Works | 279ed2fccf78a0822243b5ec969dad11f33aeaee | [
"MIT"
] | null | null | null | pr_assignment/sample_programms/Step03_TemplateMatching.py | ecoresystems/Kyushu_School_Works | 279ed2fccf78a0822243b5ec969dad11f33aeaee | [
"MIT"
] | null | null | null | pr_assignment/sample_programms/Step03_TemplateMatching.py | ecoresystems/Kyushu_School_Works | 279ed2fccf78a0822243b5ec969dad11f33aeaee | [
"MIT"
] | 2 | 2020-02-12T03:15:43.000Z | 2020-06-07T12:23:36.000Z | # coding: utf-8
# ## Step03_TemplateMatching
#
# テストサンプルを1枚ずつ読み出してマッチングする
# 混同行列と各クラスの認識率を表示する
# In[ ]:
from skimage import io
import numpy as np
# In[ ]:
TrainingSampleNum = 2000 # 学習サンプル総数
TestSampleNum = 10000 # テストサンプル総数
ClassNum = 10 # クラス数(今回は10)
ImageSize = 28 # 画像サイズ(今回は縦横ともに28)
TrainingDataFile = '... | 23.798165 | 86 | 0.638782 |
c87bdb38c9bf19c24506fb2c1069813d604d41ce | 10,390 | py | Python | mro/stages/vdj/filter_barcodes_vdj/__init__.py | qiangli/cellranger | 046e24c3275cfbd4516a6ebc064594513a5c45b7 | [
"MIT"
] | 1 | 2019-03-29T04:05:58.000Z | 2019-03-29T04:05:58.000Z | mro/stages/vdj/filter_barcodes_vdj/__init__.py | qiangli/cellranger | 046e24c3275cfbd4516a6ebc064594513a5c45b7 | [
"MIT"
] | null | null | null | mro/stages/vdj/filter_barcodes_vdj/__init__.py | qiangli/cellranger | 046e24c3275cfbd4516a6ebc064594513a5c45b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2017 10X Genomics, Inc. All rights reserved.
#
from collections import defaultdict
import itertools
import json
import numpy as np
import tenkit.safe_json as tk_safe_json
import cellranger.constants as cr_constants
import cellranger.utils as cr_utils
import cellranger.vdj.report ... | 40.428016 | 117 | 0.620789 |
cd8b3ba86f446a160a726815ae9b4f8b82d6d4b4 | 6,530 | py | Python | src/nti/zodb/tests/test_btrees.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | null | null | null | src/nti/zodb/tests/test_btrees.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | 10 | 2017-06-08T12:24:31.000Z | 2021-04-01T16:52:38.000Z | src/nti/zodb/tests/test_btrees.py | NextThought/nti.zodb | 2eb56b6a617fe83c738bfc4651b31d080856e3fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tests for btrees.py
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# disable: accessing protected members, too many methods
# pylint: disable=W0212,R0904
import subprocess
import tempfile
import os
import sys
import operato... | 35.48913 | 91 | 0.604135 |
cdd33699b9e29bee815bbb92f178a8dcf0bf23ab | 4,280 | py | Python | landsat/compare_to_gee.py | XingyuXu-cuhk/Landuse_DL | a993988727387be22e7a88f6f5790de8a88dccd6 | [
"Apache-2.0"
] | null | null | null | landsat/compare_to_gee.py | XingyuXu-cuhk/Landuse_DL | a993988727387be22e7a88f6f5790de8a88dccd6 | [
"Apache-2.0"
] | null | null | null | landsat/compare_to_gee.py | XingyuXu-cuhk/Landuse_DL | a993988727387be22e7a88f6f5790de8a88dccd6 | [
"Apache-2.0"
] | 1 | 2020-06-22T08:52:58.000Z | 2020-06-22T08:52:58.000Z | #!/usr/bin/env python
# Filename:
"""
introduction: Compare the NDVI or other file computed locally to the one from Google Earth Engine.
for double-check purpose
authors: Huang Lingcao
email:huanglingcao@gmail.com
add time: 24 March, 2019
"""
import sys,os
from optparse import OptionParser
import rasterio
import nu... | 29.315068 | 124 | 0.624533 |
891e72b49f71f6ac076a9c4badaced2be932ed97 | 29,868 | py | Python | omegaconf/_utils.py | gleize/omegaconf | ca0fa8e0c2d097879bd84cbe26a389c0e39158cd | [
"BSD-3-Clause"
] | null | null | null | omegaconf/_utils.py | gleize/omegaconf | ca0fa8e0c2d097879bd84cbe26a389c0e39158cd | [
"BSD-3-Clause"
] | null | null | null | omegaconf/_utils.py | gleize/omegaconf | ca0fa8e0c2d097879bd84cbe26a389c0e39158cd | [
"BSD-3-Clause"
] | null | null | null | import copy
import os
import re
import string
import sys
import warnings
from contextlib import contextmanager
from enum import Enum
from textwrap import dedent
from typing import (
Any,
Dict,
Iterator,
List,
Optional,
Tuple,
Type,
Union,
get_type_hints,
)
import yaml
from .errors ... | 30.633846 | 109 | 0.619191 |
827240cefad272c86015dfa647f5206a5d755669 | 7,801 | py | Python | numpy/random/tests/test_randomstate_regression.py | jcw780/numpy | 1912db21e0f5e61739168864f6b1f37dff3b4006 | [
"BSD-3-Clause"
] | null | null | null | numpy/random/tests/test_randomstate_regression.py | jcw780/numpy | 1912db21e0f5e61739168864f6b1f37dff3b4006 | [
"BSD-3-Clause"
] | null | null | null | numpy/random/tests/test_randomstate_regression.py | jcw780/numpy | 1912db21e0f5e61739168864f6b1f37dff3b4006 | [
"BSD-3-Clause"
] | null | null | null | import sys
import pytest
from numpy.testing import (
assert_, assert_array_equal, assert_raises,
)
from numpy.compat import long
import numpy as np
from numpy import random
class TestRegression(object):
def test_VonMises_range(self):
# Make sure generated random variables are in [-pi, pi].
... | 36.79717 | 77 | 0.576336 |
9a44e3083534545be342536a1ff9d47890421d4b | 3,755 | py | Python | frille-lang/lib/python3.6/site-packages/thinc/neural/_classes/layernorm.py | frillecode/CDS-spring-2021-language | a0b2116044cd20d4a34b98f23bd2663256c90c5d | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | frille-lang/lib/python3.6/site-packages/thinc/neural/_classes/layernorm.py | frillecode/CDS-spring-2021-language | a0b2116044cd20d4a34b98f23bd2663256c90c5d | [
"MIT"
] | 3 | 2021-06-08T21:06:32.000Z | 2022-01-13T02:22:38.000Z | frille-lang/lib/python3.6/site-packages/thinc/neural/_classes/layernorm.py | frillecode/CDS-spring-2021-language | a0b2116044cd20d4a34b98f23bd2663256c90c5d | [
"MIT"
] | 2 | 2021-12-09T07:23:21.000Z | 2022-03-31T06:13:10.000Z | # coding: utf8
from __future__ import unicode_literals
from ... import describe
from .model import Model
REPRODUCE_BUG = False
def set_compat_six_eight(flag_value):
"""Allow backwards compatibility with calculations bug from Thinc 6.8"""
global REPRODUCE_BUG
REPRODUCE_BUG = flag_value
def _init_to_on... | 28.884615 | 78 | 0.58269 |
365e4e80245f4f9c2bb25dfcd8b5adf0741b4e72 | 97,605 | py | Python | target/docker-startup/10-initial.startup/gp_startup/plugins/gp_cmdproc_vpn.py | cloudycube/docker-openswan | ba9691532525ed1c4b28a45497ae90a9b6156ebd | [
"MIT"
] | 7 | 2017-10-31T08:30:16.000Z | 2018-08-25T14:43:32.000Z | target/docker-startup/10-initial.startup/gp_startup/plugins/gp_cmdproc_vpn.py | cloudycube/docker-strongswan | ba9691532525ed1c4b28a45497ae90a9b6156ebd | [
"MIT"
] | null | null | null | target/docker-startup/10-initial.startup/gp_startup/plugins/gp_cmdproc_vpn.py | cloudycube/docker-strongswan | ba9691532525ed1c4b28a45497ae90a9b6156ebd | [
"MIT"
] | null | null | null | """
This module contains the command processing plugin handling VPN related commands.
Author: Sascha Falk <sascha@falk-online.eu>
License: MIT License
"""
import os
import shutil
import socket
import sys
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.pr... | 57.246334 | 229 | 0.522473 |
e204a32ab1752f59672a2c76af02c945ed36ae4a | 1,477 | py | Python | pydepend/report/__init__.py | herczy/pydepend | ee64ba30efc3e19d643da2ed22e078ef4a06795d | [
"BSD-3-Clause"
] | 2 | 2019-04-21T06:10:09.000Z | 2020-04-24T23:12:02.000Z | pydepend/report/__init__.py | herczy/pydepend | ee64ba30efc3e19d643da2ed22e078ef4a06795d | [
"BSD-3-Clause"
] | null | null | null | pydepend/report/__init__.py | herczy/pydepend | ee64ba30efc3e19d643da2ed22e078ef4a06795d | [
"BSD-3-Clause"
] | null | null | null | import collections
class Result(object):
def __init__(self, name, metrics):
self.__name = name
self.__metrics = dict(metrics)
@property
def name(self):
return self.__name
@property
def metrics(self):
return dict(self.__metrics)
def __eq__(self, other):
... | 24.213115 | 110 | 0.624915 |
f6e52993021ebda1bc47b58446bfc6381720cd3a | 285 | py | Python | bin/badline_check.py | dayanand12/pyswitchvox | 3655b2b3646b4280d15b78f64b314fc2becb7618 | [
"BSD-3-Clause"
] | null | null | null | bin/badline_check.py | dayanand12/pyswitchvox | 3655b2b3646b4280d15b78f64b314fc2becb7618 | [
"BSD-3-Clause"
] | null | null | null | bin/badline_check.py | dayanand12/pyswitchvox | 3655b2b3646b4280d15b78f64b314fc2becb7618 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import os
sys.path.append(
os.path.abspath(
os.path.join(os.path.dirname(__file__), os.path.pardir)))
from check_outboundCall import BadLineCheck as check
def main():
check().run_nagios_check()
if __name__=="__main__":
main()
| 16.764706 | 66 | 0.694737 |
0100db76c84db0d60525e50d9a60cf0d6ab90f12 | 24,144 | py | Python | tests/cupy_tests/test_cusparse.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | 1 | 2020-03-30T20:56:52.000Z | 2020-03-30T20:56:52.000Z | tests/cupy_tests/test_cusparse.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | null | null | null | tests/cupy_tests/test_cusparse.py | mnicely/cupy | 9ed1d0db1404e9baa3c139032515d6028078bc91 | [
"MIT"
] | null | null | null | import pickle
import unittest
import numpy
import pytest
try:
import scipy.sparse
except ImportError:
pass
import cupy
from cupy import testing
from cupy import cusparse
from cupyx.scipy import sparse
class TestMatDescriptor(unittest.TestCase):
def test_create(self):
md = cusparse.MatDescriptor... | 35.558174 | 79 | 0.610338 |
4a2c9e927336d258b49adfe7d938c2bd1ab837e4 | 4,516 | py | Python | chainer/functions/array/im2col.py | takeratta/chainer | 02686e98cd6dc8f20979a1f3a79130f076cbfc6c | [
"MIT"
] | 2 | 2018-02-05T07:25:48.000Z | 2018-08-28T20:29:45.000Z | chainer/functions/array/im2col.py | takeratta/chainer | 02686e98cd6dc8f20979a1f3a79130f076cbfc6c | [
"MIT"
] | null | null | null | chainer/functions/array/im2col.py | takeratta/chainer | 02686e98cd6dc8f20979a1f3a79130f076cbfc6c | [
"MIT"
] | 1 | 2018-08-23T01:34:57.000Z | 2018-08-23T01:34:57.000Z | import numpy
from chainer import cuda
from chainer import function
from chainer.utils.conv import col2im_cpu
from chainer.utils.conv import col2im_gpu
from chainer.utils.conv import im2col_cpu
from chainer.utils.conv import im2col_gpu
from chainer.utils import type_check
def _pair(x):
if hasattr(x, '__getitem__... | 34.212121 | 79 | 0.582595 |
ff1f25e4f0edc175f61786f887c52ed2218dd0a1 | 5,464 | py | Python | sdk/python/pulumi_azure_native/network/v20181201/get_route.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181201/get_route.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20181201/get_route.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 37.170068 | 161 | 0.660688 |
491cd76b03eea1337f9a00c551e43150a731f9f9 | 2,110 | py | Python | code/ynacc/03 Trying/classify2.py | jfilter/masters-thesis | 39a3d9b862444507982cc4ccd98b6809cab72d82 | [
"MIT"
] | 5 | 2019-04-24T19:45:07.000Z | 2020-12-29T06:40:58.000Z | code/ynacc/03 Trying/classify2.py | jfilter/masters-thesis | 39a3d9b862444507982cc4ccd98b6809cab72d82 | [
"MIT"
] | 2 | 2019-11-05T17:17:38.000Z | 2019-11-05T17:17:39.000Z | code/ynacc/03 Trying/classify2.py | jfilter/masters-thesis | 39a3d9b862444507982cc4ccd98b6809cab72d82 | [
"MIT"
] | null | null | null | from fastai.text import *
from fastai.datasets import *
from pathlib import Path
import pandas as pd
from fastai.metrics import *
from fastai.train import *
from fastai.imports import nn, torch
from fastai.callbacks import *
import random
import math
import datetime
import os
from sacred import Experiment
from sacred... | 29.305556 | 143 | 0.703791 |
f3b7107be7b5330bcae946d2c9aa53379359f8ea | 4,911 | py | Python | makahiki/apps/widgets/bonus_points/migrations/0004_auto__add_field_bonuspoint_claim_date__add_field_bonuspoint_create_dat.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | 1 | 2015-07-22T11:31:20.000Z | 2015-07-22T11:31:20.000Z | makahiki/apps/widgets/bonus_points/migrations/0004_auto__add_field_bonuspoint_claim_date__add_field_bonuspoint_create_dat.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | makahiki/apps/widgets/bonus_points/migrations/0004_auto__add_field_bonuspoint_claim_date__add_field_bonuspoint_create_dat.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'BonusPoint.claim_date'
db.add_column('bonus_points_bonuspoint', 'claim_date', self.gf('dja... | 63.779221 | 182 | 0.583384 |
d57faa508a5e0f699aafab65e1c55db20af9efa4 | 3,900 | py | Python | src/engine/SCons/ErrorsTests.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | null | null | null | src/engine/SCons/ErrorsTests.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | null | null | null | src/engine/SCons/ErrorsTests.py | bdbaddog/scons-gh-migrate | c76589c83ec00650a2d07dce79fc6dc5ca6465fb | [
"MIT"
] | null | null | null | #
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... | 34.821429 | 77 | 0.613333 |
75568bfb85d05b3ea2fed9812ebbdb7013f00028 | 986 | py | Python | setup.py | ttumiel/interpret | aeecb00bf65376668a48895cb707beb6dd8fb7ab | [
"MIT"
] | 14 | 2019-10-28T18:49:31.000Z | 2021-03-25T12:13:35.000Z | setup.py | ttumiel/interpret | aeecb00bf65376668a48895cb707beb6dd8fb7ab | [
"MIT"
] | null | null | null | setup.py | ttumiel/interpret | aeecb00bf65376668a48895cb707beb6dd8fb7ab | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as f:
long_description = f.read()
test_deps = [
'coverage',
'pytest',
'scikit-learn'
]
extras = {
'test': test_deps,
}
setuptools.setup(
name="interpret-pytorch",
version="0.2.1",
author="Thomas Tumiel",
description="Interpreting deep ... | 22.930233 | 64 | 0.606491 |
5b26cd7616b52a0c5fe42fb52c1ae4dfb16585c3 | 65,693 | py | Python | src/ssh/azext_ssh/vendored_sdks/connectedmachine/models/_models_py3.py | bgrainger/azure-cli-extensions | 86680f7a592c659456feb605104809efa5fae353 | [
"MIT"
] | null | null | null | src/ssh/azext_ssh/vendored_sdks/connectedmachine/models/_models_py3.py | bgrainger/azure-cli-extensions | 86680f7a592c659456feb605104809efa5fae353 | [
"MIT"
] | null | null | null | src/ssh/azext_ssh/vendored_sdks/connectedmachine/models/_models_py3.py | bgrainger/azure-cli-extensions | 86680f7a592c659456feb605104809efa5fae353 | [
"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 ... | 35.95676 | 165 | 0.647542 |
b5e95a3cf6edfa0165be425db43a3c8bd615c97d | 5,691 | py | Python | tests/test_tutorial/test_body_fields/test_tutorial001.py | parampavar/fastapi | 4e77737a3f7bf2608132ea170e9ff013b5af6732 | [
"MIT"
] | 2 | 2020-07-17T21:33:28.000Z | 2020-07-17T21:33:38.000Z | tests/test_tutorial/test_body_fields/test_tutorial001.py | parampavar/fastapi | 4e77737a3f7bf2608132ea170e9ff013b5af6732 | [
"MIT"
] | 1 | 2021-07-24T15:25:13.000Z | 2021-07-24T15:25:13.000Z | tests/test_tutorial/test_body_fields/test_tutorial001.py | parampavar/fastapi | 4e77737a3f7bf2608132ea170e9ff013b5af6732 | [
"MIT"
] | 1 | 2022-01-07T13:06:18.000Z | 2022-01-07T13:06:18.000Z | import pytest
from fastapi.testclient import TestClient
from body_fields.tutorial001 import app
# TODO: remove when removing support for Pydantic < 1.0.0
try:
from pydantic import Field # noqa
except ImportError: # pragma: nocover
import pydantic
pydantic.Field = pydantic.Schema
client = TestClient(a... | 31.793296 | 99 | 0.363205 |
3a41b5101aacfdf3032c1d1ffc3d9da12ab4315c | 4,835 | py | Python | pysismo/distaz.py | czdong2001/JointInv | d4327e2cb7332d28f19f06a26662dcbd9215de75 | [
"MIT"
] | 6 | 2021-11-20T14:02:38.000Z | 2021-11-30T03:22:51.000Z | pysismo/distaz.py | SeisPider/JointInv | d4327e2cb7332d28f19f06a26662dcbd9215de75 | [
"MIT"
] | null | null | null | pysismo/distaz.py | SeisPider/JointInv | d4327e2cb7332d28f19f06a26662dcbd9215de75 | [
"MIT"
] | 7 | 2018-06-23T00:29:09.000Z | 2019-12-24T08:21:16.000Z |
import math
class DistAz:
"""c
c Subroutine to calculate the Great Circle Arc distance
c between two sets of geographic coordinates
c
c Equations take from Bullen, pages 154, 155
c
c T. Owens, September 19, 1991
c Sept. 25 -- fixed az and baz calculations
c
P. Cro... | 29.662577 | 83 | 0.494726 |
da3591eff735909bc2fe49f396092414c77f92d2 | 949 | py | Python | var/spack/repos/builtin/packages/impalajit-llvm/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/impalajit-llvm/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/impalajit-llvm/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class ImpalajitLlvm(CMakePackage):
"""Impala is a calculator-like language. This is a f... | 28.757576 | 76 | 0.684932 |
25fcdb3695fb54a18361348568cb32327c8d269d | 6,220 | py | Python | examples/tracking/scan_with_tracking.py | chenxu2394/py_createc | 7de578dd9369677cedc492231d5273aa710ea96c | [
"MIT"
] | null | null | null | examples/tracking/scan_with_tracking.py | chenxu2394/py_createc | 7de578dd9369677cedc492231d5273aa710ea96c | [
"MIT"
] | null | null | null | examples/tracking/scan_with_tracking.py | chenxu2394/py_createc | 7de578dd9369677cedc492231d5273aa710ea96c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 28 18:48:48 2019
@author: xuc1
Scan with tracking
Autofilesave should be OFF
"""
from createc.Createc_pyFile import DAT_IMG
# from skimage.feature import register_translation as rt
from skimage.registration import phase_cross_correlation as pcc
from skimage.exposure imp... | 34.748603 | 105 | 0.634727 |
7d3e2373c86b22b0fc66bbc2889433ad246455a7 | 3,337 | py | Python | coolSite/settings.py | Saturn369/Blog | 489af57d09e9fbd3d5ae279c2cc4ef641ddccae9 | [
"Unlicense"
] | null | null | null | coolSite/settings.py | Saturn369/Blog | 489af57d09e9fbd3d5ae279c2cc4ef641ddccae9 | [
"Unlicense"
] | null | null | null | coolSite/settings.py | Saturn369/Blog | 489af57d09e9fbd3d5ae279c2cc4ef641ddccae9 | [
"Unlicense"
] | null | null | null | """
Django settings for coolSite project.
Generated by 'django-admin startproject' using Django 3.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
... | 27.130081 | 92 | 0.670662 |
071466433e8868a4e370231be32f2f47bd7dd98f | 1,157 | py | Python | pmixvenv/Scripts/rst2html5.py | michelcarvalho22/ecommerce_simples | a2ba147cac5dab054b373c9ebbb752d8f1eb484a | [
"CC0-1.0"
] | 1 | 2020-07-23T15:40:58.000Z | 2020-07-23T15:40:58.000Z | pmixvenv/Scripts/rst2html5.py | michelcarvalho22/ecommerce_simples | a2ba147cac5dab054b373c9ebbb752d8f1eb484a | [
"CC0-1.0"
] | null | null | null | pmixvenv/Scripts/rst2html5.py | michelcarvalho22/ecommerce_simples | a2ba147cac5dab054b373c9ebbb752d8f1eb484a | [
"CC0-1.0"
] | null | null | null | #!d:\pointmix\pmixvenv\scripts\python.exe
# -*- coding: utf8 -*-
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the cop... | 32.138889 | 78 | 0.72083 |
ff8a4a1544a04e511fb1d1311a014f976abf9e4c | 369,256 | py | Python | test/test_torch.py | sdym-test/pytorch | fc3c7fb7566639d0a36af88bbac0c7920f73ee3b | [
"Intel"
] | 1 | 2022-02-23T08:20:59.000Z | 2022-02-23T08:20:59.000Z | test/test_torch.py | sdym-test/pytorch | fc3c7fb7566639d0a36af88bbac0c7920f73ee3b | [
"Intel"
] | null | null | null | test/test_torch.py | sdym-test/pytorch | fc3c7fb7566639d0a36af88bbac0c7920f73ee3b | [
"Intel"
] | null | null | null | # -*- coding: utf-8 -*-
# Owner(s): ["module: tests"]
import torch
import torch.utils.data
import numpy as np
import contextlib
import gc
import io
import inspect
import itertools
import math
import random
import re
import copy
import os
import tempfile
import unittest
import warnings
import types
import pickle
impor... | 44.142977 | 132 | 0.588302 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.