hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c08c4880eed8892b2d72ad555a1f12d33f377be
2,731
py
Python
cloud-storage/bookshelf/model_datastore.py
stugit/cp100
837260c8572bba49a340f0736b06ae268d6807d8
[ "Apache-2.0" ]
65
2016-07-20T13:58:28.000Z
2022-02-05T01:34:50.000Z
cloud-storage/bookshelf/model_datastore.py
stugit/cp100
837260c8572bba49a340f0736b06ae268d6807d8
[ "Apache-2.0" ]
1
2017-12-13T03:26:34.000Z
2017-12-13T21:02:36.000Z
cloud-storage/bookshelf/model_datastore.py
stugit/cp100
837260c8572bba49a340f0736b06ae268d6807d8
[ "Apache-2.0" ]
101
2016-05-20T16:04:12.000Z
2022-01-31T01:01:08.000Z
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
25.523364
74
0.674112
from flask import current_app from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb builtin_list = list def init_app(app): pass class Book(ndb.Model): author = ndb.StringProperty() description = ndb.StringProperty(indexed=False) imageUrl = ndb.StringPr...
true
true
1c08c4ffcc277fcd366f2d743604250b8ba4ad22
4,654
py
Python
packages/python/plotly/plotly/graph_objs/scatter/_legendgrouptitle.py
labaran1/plotly.py
7ec751e8fed4a570c11ea4bea2231806389d62eb
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/scatter/_legendgrouptitle.py
labaran1/plotly.py
7ec751e8fed4a570c11ea4bea2231806389d62eb
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/scatter/_legendgrouptitle.py
labaran1/plotly.py
7ec751e8fed4a570c11ea4bea2231806389d62eb
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter" _path_str = "scatter.legendgrouptitle" _valid_props = {"font", "text"} ...
30.025806
83
0.52428
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): _parent_path_str = "scatter" _path_str = "scatter.legendgrouptitle" _valid_props = {"font", "text"} @property def font(self): ...
true
true
1c08c5cea56daa342d5997ec0e6c2804134cb8b5
9,466
py
Python
vnpy/trader/ui/mainwindow.py
jerryhe26/vnpy
d7607da780c57a2ab182688f4e52bc3a300acfda
[ "MIT" ]
4
2020-04-01T18:46:56.000Z
2021-08-29T09:45:47.000Z
vnpy/trader/ui/mainwindow.py
jerryhe26/vnpy
d7607da780c57a2ab182688f4e52bc3a300acfda
[ "MIT" ]
2
2019-12-30T11:33:15.000Z
2020-03-26T03:21:27.000Z
vnpy/trader/ui/mainwindow.py
jerryhe26/vnpy
d7607da780c57a2ab182688f4e52bc3a300acfda
[ "MIT" ]
1
2020-10-08T03:44:10.000Z
2020-10-08T03:44:10.000Z
""" Implements main window of VN Trader. """ import webbrowser from functools import partial from importlib import import_module from typing import Callable, Dict, Tuple from PyQt5 import QtCore, QtGui, QtWidgets import vnpy from vnpy.event import EventEngine from .widget import ( TickMonitor, OrderMonitor, ...
28.772036
79
0.591802
import webbrowser from functools import partial from importlib import import_module from typing import Callable, Dict, Tuple from PyQt5 import QtCore, QtGui, QtWidgets import vnpy from vnpy.event import EventEngine from .widget import ( TickMonitor, OrderMonitor, TradeMonitor, PositionMonitor, Ac...
true
true
1c08c6848e6c17b3711aea127d5232b70b242fcc
14,130
py
Python
sdks/python/apache_beam/io/avroio.py
amitsela/beam
a0cfccda4f1fd08ae04aef41c1cc0bc14f00e112
[ "Apache-2.0" ]
2
2017-02-22T03:35:11.000Z
2017-04-05T09:38:16.000Z
sdks/python/apache_beam/io/avroio.py
amitsela/beam
a0cfccda4f1fd08ae04aef41c1cc0bc14f00e112
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/io/avroio.py
amitsela/beam
a0cfccda4f1fd08ae04aef41c1cc0bc14f00e112
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
37.68
80
0.681953
import cStringIO import os import zlib import avro from avro import datafile from avro import io as avroio from avro import schema import apache_beam as beam from apache_beam.io import filebasedsource from apache_beam.io import fileio from apache_beam.io import iobase from apache_beam.io.filesystem import Compressio...
true
true
1c08c6bae0f5a467c679b50254470403e9d70f70
454
py
Python
assignments/05-testing/test_add_student.py
davidhannan/dphgx8
4b8951cd9f9cb48b9688ec1499aaaa20eedd1c76
[ "MIT" ]
null
null
null
assignments/05-testing/test_add_student.py
davidhannan/dphgx8
4b8951cd9f9cb48b9688ec1499aaaa20eedd1c76
[ "MIT" ]
null
null
null
assignments/05-testing/test_add_student.py
davidhannan/dphgx8
4b8951cd9f9cb48b9688ec1499aaaa20eedd1c76
[ "MIT" ]
null
null
null
import System import Professor import json import pytest def test_add_student(grading_system): grading_system.login('goggins', 'augurrox') grading_system.usr.add_student('yted91', 'databases') with open('Data/users.json') as f: data = json.load(f) assert "databases" in data['yted91']['course...
21.619048
57
0.718062
import System import Professor import json import pytest def test_add_student(grading_system): grading_system.login('goggins', 'augurrox') grading_system.usr.add_student('yted91', 'databases') with open('Data/users.json') as f: data = json.load(f) assert "databases" in data['yted91']['course...
true
true
1c08c74550d501b3c9f5bfbf626fd8930caa3a26
1,784
py
Python
src/evtx2es/presenters/Evtx2esPresenter.py
sumeshi/evtx2es
b5ef2bf18c2bd5e95244291007253af076446e87
[ "MIT" ]
65
2019-12-26T22:47:52.000Z
2022-03-10T05:16:22.000Z
src/evtx2es/presenters/Evtx2esPresenter.py
sumeshi/evtx2es
b5ef2bf18c2bd5e95244291007253af076446e87
[ "MIT" ]
7
2019-12-31T21:23:02.000Z
2021-07-10T04:24:10.000Z
src/evtx2es/presenters/Evtx2esPresenter.py
sumeshi/evtx2es
b5ef2bf18c2bd5e95244291007253af076446e87
[ "MIT" ]
16
2019-12-29T23:20:35.000Z
2022-02-21T02:21:02.000Z
# coding: utf-8 import traceback from datetime import datetime from typing import List, Union from pathlib import Path from tqdm import tqdm from evtx2es.models.Evtx2es import Evtx2es from evtx2es.models.ElasticsearchUtils import ElasticsearchUtils class Evtx2esPresenter(object): def __init__( self, ...
27.875
171
0.592489
import traceback from datetime import datetime from typing import List, Union from pathlib import Path from tqdm import tqdm from evtx2es.models.Evtx2es import Evtx2es from evtx2es.models.ElasticsearchUtils import ElasticsearchUtils class Evtx2esPresenter(object): def __init__( self, input_path...
true
true
1c08c8850d4ba19c9f721baa42053e05f1f31fad
3,336
py
Python
manifest/update.py
Acidburn0zzz/wpt-tools
d8cf2cfa62a482a8c53b1e866fa2201afaef4628
[ "BSD-3-Clause" ]
null
null
null
manifest/update.py
Acidburn0zzz/wpt-tools
d8cf2cfa62a482a8c53b1e866fa2201afaef4628
[ "BSD-3-Clause" ]
null
null
null
manifest/update.py
Acidburn0zzz/wpt-tools
d8cf2cfa62a482a8c53b1e866fa2201afaef4628
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import argparse import imp import os import sys import manifest import vcs from log import get_logger from tree import GitTree, NoVCSTree here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) def update(tests...
27.570248
107
0.629796
import argparse import imp import os import sys import manifest import vcs from log import get_logger from tree import GitTree, NoVCSTree here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) def update(tests_root, url_base, manif...
true
true
1c08c8a8aabd2c0a9b40ae674e2de5e9e84c31c4
1,456
py
Python
parsl/tests/test_docs/test_workflow4.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/tests/test_docs/test_workflow4.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/tests/test_docs/test_workflow4.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
import os import parsl from parsl.app.app import bash_app, python_app from parsl.tests.configs.local_threads import config from parsl.data_provider.files import File # parsl.set_stream_logger() @bash_app def generate(outputs=[]): return "echo $(( RANDOM % (10 - 5 + 1 ) + 5 )) &> {o}".format(o=outputs[0]) @bas...
25.103448
91
0.627747
import os import parsl from parsl.app.app import bash_app, python_app from parsl.tests.configs.local_threads import config from parsl.data_provider.files import File @bash_app def generate(outputs=[]): return "echo $(( RANDOM % (10 - 5 + 1 ) + 5 )) &> {o}".format(o=outputs[0]) @bash_app def concat(inputs=[], ...
true
true
1c08c9be4f600f5214471814990df3c20e0f3fcf
773
py
Python
jskit/use_enc/use_enc.py
seed4600/jaseci
d738cb5e9e90d5e3e78f516af15cdd5ad920276a
[ "MIT" ]
null
null
null
jskit/use_enc/use_enc.py
seed4600/jaseci
d738cb5e9e90d5e3e78f516af15cdd5ad920276a
[ "MIT" ]
null
null
null
jskit/use_enc/use_enc.py
seed4600/jaseci
d738cb5e9e90d5e3e78f516af15cdd5ad920276a
[ "MIT" ]
null
null
null
import numpy as np import tensorflow_hub as hub import tensorflow as tf import tensorflow_text # noqa from jaseci.actions.live_actions import jaseci_action from typing import Union module = hub.load("https://tfhub.dev/google/universal-sentence-encoder/4") @jaseci_action(act_group=['use'], aliases=['get_embedding']...
27.607143
79
0.737387
import numpy as np import tensorflow_hub as hub import tensorflow as tf import tensorflow_text from jaseci.actions.live_actions import jaseci_action from typing import Union module = hub.load("https://tfhub.dev/google/universal-sentence-encoder/4") @jaseci_action(act_group=['use'], aliases=['get_embedding'], allow...
true
true
1c08cb4dd5d84802e82a30b16aee91f79e6c6724
3,177
py
Python
RESTProject/RESTProject/settings.py
rzhvn1/REST-API
6bb6620eebff9fa3c53fbaf7569283e4472719c1
[ "MIT" ]
null
null
null
RESTProject/RESTProject/settings.py
rzhvn1/REST-API
6bb6620eebff9fa3c53fbaf7569283e4472719c1
[ "MIT" ]
null
null
null
RESTProject/RESTProject/settings.py
rzhvn1/REST-API
6bb6620eebff9fa3c53fbaf7569283e4472719c1
[ "MIT" ]
null
null
null
""" Django settings for RESTProject project. Generated by 'django-admin startproject' using Django 3.1.7. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pat...
25.015748
91
0.692477
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'sj3z1g1zew4#kcv2c5k6hr!&u_d!grvd*ooo8vq*f)tm2z(+%o' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', ...
true
true
1c08cc0040eea5fc3052bc9eb0868d9aa3025f30
292
py
Python
slurry/sections/__init__.py
andersea/gasio
cc772b2611ac96c307ebc2520471eca32974987e
[ "MIT" ]
null
null
null
slurry/sections/__init__.py
andersea/gasio
cc772b2611ac96c307ebc2520471eca32974987e
[ "MIT" ]
null
null
null
slurry/sections/__init__.py
andersea/gasio
cc772b2611ac96c307ebc2520471eca32974987e
[ "MIT" ]
null
null
null
"""A collection of common stream operations.""" from ._buffers import Window, Group, Delay from ._combiners import Chain, Merge, Zip, ZipLatest from ._filters import Skip, SkipWhile, Filter, Changes, RateLimit from ._producers import Repeat, Metronome, InsertValue from ._refiners import Map
41.714286
65
0.794521
from ._buffers import Window, Group, Delay from ._combiners import Chain, Merge, Zip, ZipLatest from ._filters import Skip, SkipWhile, Filter, Changes, RateLimit from ._producers import Repeat, Metronome, InsertValue from ._refiners import Map
true
true
1c08cc3688270ddac8eb8b52de97598885230555
3,016
py
Python
solartf/data/keypoint/processor.py
solarfresh/solartf
69a5f2ed9990f71e7e19054c4e6e1206396f24e3
[ "Apache-2.0" ]
null
null
null
solartf/data/keypoint/processor.py
solarfresh/solartf
69a5f2ed9990f71e7e19054c4e6e1206396f24e3
[ "Apache-2.0" ]
null
null
null
solartf/data/keypoint/processor.py
solarfresh/solartf
69a5f2ed9990f71e7e19054c4e6e1206396f24e3
[ "Apache-2.0" ]
null
null
null
import cv2 import numpy as np from typing import (Any, List, Tuple) from .type import Keypoint class KeypointProcessor: indexes: np.array labels: np.array points_tensor: np.array scale: Tuple def crop(self, xmin: int, ymin: int, xmax: int, ymax: int): points_tensor = self.points_tensor.co...
31.747368
87
0.611074
import cv2 import numpy as np from typing import (Any, List, Tuple) from .type import Keypoint class KeypointProcessor: indexes: np.array labels: np.array points_tensor: np.array scale: Tuple def crop(self, xmin: int, ymin: int, xmax: int, ymax: int): points_tensor = self.points_tensor.co...
true
true
1c08ccf815749a2c0abb0107a55d29f70dc16b4b
740
py
Python
development/BackEnd/server.py
cdfmlr/readquickly_WeChatSmallApp
e489c507bfbf81a9a43872919000b99b803a079c
[ "MIT" ]
2
2019-04-03T13:19:32.000Z
2019-04-03T23:20:27.000Z
development/BackEnd/server.py
cdfmlr/readquickly_WeChatSmallApp
e489c507bfbf81a9a43872919000b99b803a079c
[ "MIT" ]
1
2019-04-03T16:44:36.000Z
2019-04-03T23:16:35.000Z
development/BackEnd/server.py
A666AHL/readquickly_WeChatSmallApp
7324b7bdd7cf6b7a77e127969077d1c84ada189d
[ "MIT" ]
2
2019-04-03T13:20:20.000Z
2019-04-04T08:27:51.000Z
from flask import Flask, request, abort, redirect import json from . import content ''' 处理来自前端的请求响应 使用:在服务器上: $ export FLASK_APP=server.py $ flask run --host=0.0.0.0 ''' app = Flask(__name__) @app.route('/') def index(): return 'Hello, world!' @app.route('/readquickly/api/getnews', methods=['GET']) def reques...
21.764706
101
0.604054
from flask import Flask, request, abort, redirect import json from . import content app = Flask(__name__) @app.route('/') def index(): return 'Hello, world!' @app.route('/readquickly/api/getnews', methods=['GET']) def requestNews(): error = None city = request.args.get('city', '') if city: ...
true
true
1c08cd1fba91145d235e09a38087527026abd94b
2,293
py
Python
docs/conf.py
amitsharma101/cutter_demo
f6fd75344c3a86821de4f248d84d3c77c83f6ff7
[ "MIT" ]
null
null
null
docs/conf.py
amitsharma101/cutter_demo
f6fd75344c3a86821de4f248d84d3c77c83f6ff7
[ "MIT" ]
null
null
null
docs/conf.py
amitsharma101/cutter_demo
f6fd75344c3a86821de4f248d84d3c77c83f6ff7
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
36.396825
79
0.66812
import os import sys import django if os.getenv("READTHEDOCS", default=False) == "True": sys.path.insert(0, os.path.abspath("..")) os.environ["DJANGO_READ_DOT_ENV_FILE"] = "True" os.environ["USE_DOCKER"] = "no" else: sys.path.insert(0, os.path.abspath("..")) os.environ["DATABASE_URL"] = "sqlite:///r...
true
true
1c08ce461aaed20a0172d278689a2d6f0a2ff56a
3,832
py
Python
aws_fuzzy_finder/tests/test_instances_view.py
dhoeric/aws-fuzzy-finder
50f1773a8f6cd6bc33db48c9e8dcb5a07e7b996b
[ "MIT" ]
null
null
null
aws_fuzzy_finder/tests/test_instances_view.py
dhoeric/aws-fuzzy-finder
50f1773a8f6cd6bc33db48c9e8dcb5a07e7b996b
[ "MIT" ]
null
null
null
aws_fuzzy_finder/tests/test_instances_view.py
dhoeric/aws-fuzzy-finder
50f1773a8f6cd6bc33db48c9e8dcb5a07e7b996b
[ "MIT" ]
null
null
null
from aws_fuzzy_finder.aws_utils import prepare_searchable_instances example_reservations = [{ u'Groups': [], u'Instances': [{ u'PrivateIpAddress': '10.121.111.123', u'InstanceId': 'foo-id', u'PublicDnsName': 'DNS-foobar', u'State': { u'Code': 16, u'Name':...
27.568345
78
0.537839
from aws_fuzzy_finder.aws_utils import prepare_searchable_instances example_reservations = [{ u'Groups': [], u'Instances': [{ u'PrivateIpAddress': '10.121.111.123', u'InstanceId': 'foo-id', u'PublicDnsName': 'DNS-foobar', u'State': { u'Code': 16, u'Name':...
true
true
1c08cfead2abad79339a5278aca9ffe9cb610738
1,480
py
Python
apps/gridportal/base/Grid/.macros/page/adminjumpscripts/3_adminjumpscripts.py
Jumpscale/jumpscale_portal8
3a4d56a1ba985b68fe9b525aed2486a54808332f
[ "Apache-2.0" ]
null
null
null
apps/gridportal/base/Grid/.macros/page/adminjumpscripts/3_adminjumpscripts.py
Jumpscale/jumpscale_portal8
3a4d56a1ba985b68fe9b525aed2486a54808332f
[ "Apache-2.0" ]
74
2015-12-28T16:17:20.000Z
2021-09-08T12:28:59.000Z
apps/gridportal/base/Grid/.macros/page/adminjumpscripts/3_adminjumpscripts.py
Jumpscale/jumpscale_portal8
3a4d56a1ba985b68fe9b525aed2486a54808332f
[ "Apache-2.0" ]
null
null
null
def main(j, args, params, tags, tasklet): def _formatdata(jumpscripts): aaData = list() for name, jumpscript in jumpscripts.items(): itemdata = ['<a href=adminjumpscript?name=%s>%s</a>' % (name, name)] for field in ['organization', 'version', 'descr']: #code i...
37
127
0.653378
def main(j, args, params, tags, tasklet): def _formatdata(jumpscripts): aaData = list() for name, jumpscript in jumpscripts.items(): itemdata = ['<a href=adminjumpscript?name=%s>%s</a>' % (name, name)] for field in ['organization', 'version', 'descr']: itemdat...
true
true
1c08d148fad5c834dcf7a2cc4a9a9bd8507fe0ef
3,480
py
Python
tests/benchmarks/bm_rasterize_meshes.py
janEbert/pytorch3d
accdac80fb29e82f72d4e8e73135ba8fd790b6c0
[ "MIT", "BSD-3-Clause" ]
1
2022-01-24T20:51:16.000Z
2022-01-24T20:51:16.000Z
tests/benchmarks/bm_rasterize_meshes.py
janEbert/pytorch3d
accdac80fb29e82f72d4e8e73135ba8fd790b6c0
[ "MIT", "BSD-3-Clause" ]
null
null
null
tests/benchmarks/bm_rasterize_meshes.py
janEbert/pytorch3d
accdac80fb29e82f72d4e8e73135ba8fd790b6c0
[ "MIT", "BSD-3-Clause" ]
1
2022-03-29T04:29:06.000Z
2022-03-29T04:29:06.000Z
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. from itertools import product import torch from fvcore.common.benchmark import benchmark from test_rasterize_...
27.619048
86
0.527586
from itertools import product import torch from fvcore.common.benchmark import benchmark from test_rasterize_meshes import TestRasterizeMeshes def bm_rasterize_meshes() -> None: kwargs_list = [ { "num_meshes": 1, "ico_level": 0, "image_size": 10, "blur...
true
true
1c08d198200af6428d386b0e61ce2242a657d14c
3,230
py
Python
model.py
danachang/End2EndDecoder
575d6077c5932a2e0a63d5af9691d12e5cb468ef
[ "MIT" ]
null
null
null
model.py
danachang/End2EndDecoder
575d6077c5932a2e0a63d5af9691d12e5cb468ef
[ "MIT" ]
null
null
null
model.py
danachang/End2EndDecoder
575d6077c5932a2e0a63d5af9691d12e5cb468ef
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from util import log from decoder import Decoder from decoder_mdl import Decoder_Mdl class Model(object): def __init__(self, config, debug_info...
30.471698
80
0.550464
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from util import log from decoder import Decoder from decoder_mdl import Decoder_Mdl class Model(object): def __init__(self, config, debug_info...
true
true
1c08d1ff13eaf6eb6fa9ca77e0f76636c06d619c
436
py
Python
env/Lib/site-packages/plotly/validators/volume/surface/_count.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/volume/surface/_count.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/volume/surface/_count.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class CountValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__(self, plotly_name="count", parent_name="volume.surface", **kwargs): super(CountValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
33.538462
84
0.651376
import _plotly_utils.basevalidators class CountValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__(self, plotly_name="count", parent_name="volume.surface", **kwargs): super(CountValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
1c08d270d236cdf9a1e29bd6c337be5a0afc5a4a
2,206
py
Python
jetset/tests/test_functions.py
andreatramacere/jetset
4b7859622db9713b6ee243e2c12ec81321b372bf
[ "BSD-3-Clause" ]
16
2019-02-11T06:58:43.000Z
2021-12-28T13:00:35.000Z
jetset/tests/test_functions.py
andreatramacere/jetset
4b7859622db9713b6ee243e2c12ec81321b372bf
[ "BSD-3-Clause" ]
14
2019-04-14T14:49:55.000Z
2021-12-27T04:18:24.000Z
jetset/tests/test_functions.py
andreatramacere/jetset
4b7859622db9713b6ee243e2c12ec81321b372bf
[ "BSD-3-Clause" ]
10
2019-02-25T14:53:28.000Z
2022-03-02T08:49:19.000Z
import pytest from .test_mcmc import * from .test_jet_model import * from .test_data import * from .test_phenom_constr import * from .test_model_fit import * from .test_emitters import * from .test_ebl import * from .test_mcmc import test_emcee from .test_depending_parameters import * @pytest.mark.integration class ...
26.578313
102
0.727561
import pytest from .test_mcmc import * from .test_jet_model import * from .test_data import * from .test_phenom_constr import * from .test_model_fit import * from .test_emitters import * from .test_ebl import * from .test_mcmc import test_emcee from .test_depending_parameters import * @pytest.mark.integration class ...
true
true
1c08d2bf839e771d2e56fdb9b76c692648bc7815
1,121
py
Python
models/trivia.py
damien-c-d/party-room-bot-v4
4a72c51765cab99058ed768577a35c9997dc96e7
[ "BSD-3-Clause" ]
1
2020-07-23T05:58:53.000Z
2020-07-23T05:58:53.000Z
models/trivia.py
damien-c-d/party-room-bot-v4
4a72c51765cab99058ed768577a35c9997dc96e7
[ "BSD-3-Clause" ]
null
null
null
models/trivia.py
damien-c-d/party-room-bot-v4
4a72c51765cab99058ed768577a35c9997dc96e7
[ "BSD-3-Clause" ]
null
null
null
from difflib import SequenceMatcher from models.db_ops import DBOperation from models.enums import GameTypes from models.game import Game class Trivia(Game): def __init__(self): word_num = None super().__init__(word_num, True) self.question, self.answers = self.get_trivia_question() ...
29.5
98
0.560214
from difflib import SequenceMatcher from models.db_ops import DBOperation from models.enums import GameTypes from models.game import Game class Trivia(Game): def __init__(self): word_num = None super().__init__(word_num, True) self.question, self.answers = self.get_trivia_question() ...
true
true
1c08d3ae4e8bbb6dea38fc4c458290af21ba5ae8
7,619
py
Python
doc/conf.py
bioidiap/bob.ip.gabor
262605112403dd35569b2e36760456649396d6fa
[ "BSD-3-Clause" ]
6
2015-02-19T22:45:22.000Z
2019-08-14T23:58:48.000Z
doc/conf.py
bioidiap/bob.ip.gabor
262605112403dd35569b2e36760456649396d6fa
[ "BSD-3-Clause" ]
null
null
null
doc/conf.py
bioidiap/bob.ip.gabor
262605112403dd35569b2e36760456649396d6fa
[ "BSD-3-Clause" ]
2
2015-03-22T09:50:01.000Z
2016-03-08T11:16:07.000Z
#!/usr/bin/env python # vim: set fileencoding=utf-8 : import os import sys import glob import pkg_resources # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = '1.3' # Add any Sphinx extension module ...
31.483471
106
0.717811
import os import sys import glob import pkg_resources needs_sphinx = '1.3' extensions = [ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.graphviz', 'sphinx.ext.intersphinx', 'sphi...
true
true
1c08d4428223e90c04bb94871140c85802674a5d
807
py
Python
mysite/mysite/urls.py
varin-pierre/moxave
51ffc6974042e6706518d31d25a6a0ae26f91d85
[ "MIT" ]
null
null
null
mysite/mysite/urls.py
varin-pierre/moxave
51ffc6974042e6706518d31d25a6a0ae26f91d85
[ "MIT" ]
null
null
null
mysite/mysite/urls.py
varin-pierre/moxave
51ffc6974042e6706518d31d25a6a0ae26f91d85
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
35.086957
79
0.696406
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'', include('blog.urls')), ]
true
true
1c08d46b58a72785f8c85d3de171d6e7e5f95923
1,720
py
Python
examples/advanced/remote_execution/remote_fit_example.py
vishalbelsare/FEDOT
3a6f06b29cf2f173008d119f7cb5dc705a45f695
[ "BSD-3-Clause" ]
null
null
null
examples/advanced/remote_execution/remote_fit_example.py
vishalbelsare/FEDOT
3a6f06b29cf2f173008d119f7cb5dc705a45f695
[ "BSD-3-Clause" ]
null
null
null
examples/advanced/remote_execution/remote_fit_example.py
vishalbelsare/FEDOT
3a6f06b29cf2f173008d119f7cb5dc705a45f695
[ "BSD-3-Clause" ]
null
null
null
import os import random from datetime import datetime import numpy as np from fedot.core.data.data import InputData from fedot.core.pipelines.node import PrimaryNode from fedot.core.pipelines.pipeline import Pipeline from fedot.core.utils import fedot_project_root from fedot.remote.infrastructure.clients.test_client ...
26.875
92
0.763953
import os import random from datetime import datetime import numpy as np from fedot.core.data.data import InputData from fedot.core.pipelines.node import PrimaryNode from fedot.core.pipelines.pipeline import Pipeline from fedot.core.utils import fedot_project_root from fedot.remote.infrastructure.clients.test_client ...
true
true
1c08d50b0074b511fc380db374aa1fc493cd75f7
47
py
Python
heima/login.py
xiaozhisummer/python_test
1024268c2556a26cdfca9ffd4d9ca5a5c3a2e6e8
[ "MIT" ]
null
null
null
heima/login.py
xiaozhisummer/python_test
1024268c2556a26cdfca9ffd4d9ca5a5c3a2e6e8
[ "MIT" ]
null
null
null
heima/login.py
xiaozhisummer/python_test
1024268c2556a26cdfca9ffd4d9ca5a5c3a2e6e8
[ "MIT" ]
null
null
null
num = 10 num2 = 20 num40 = 40 num3 = 30
5.222222
10
0.510638
num = 10 num2 = 20 num40 = 40 num3 = 30
true
true
1c08d518c53c8a4c9ad2e7696fd2b6040176bc9e
4,591
py
Python
tests/test_analysis/test_eda_utils.py
martins0n/etna
51e9cec5183da2499ca247b0e2db215507246ceb
[ "Apache-2.0" ]
326
2021-11-18T15:30:50.000Z
2022-03-31T09:44:15.000Z
tests/test_analysis/test_eda_utils.py
martins0n/etna
51e9cec5183da2499ca247b0e2db215507246ceb
[ "Apache-2.0" ]
305
2021-11-17T10:28:31.000Z
2022-03-31T18:05:03.000Z
tests/test_analysis/test_eda_utils.py
martins0n/etna
51e9cec5183da2499ca247b0e2db215507246ceb
[ "Apache-2.0" ]
29
2021-11-21T12:10:48.000Z
2022-03-31T22:55:06.000Z
import numpy as np import pandas as pd import pytest from etna.analysis.eda_utils import _resample from etna.analysis.eda_utils import _seasonal_split from etna.analysis.eda_utils import seasonal_plot from etna.datasets import TSDataset @pytest.mark.parametrize( "timestamp, cycle, expected_cycle_names, expected_...
38.579832
117
0.523633
import numpy as np import pandas as pd import pytest from etna.analysis.eda_utils import _resample from etna.analysis.eda_utils import _seasonal_split from etna.analysis.eda_utils import seasonal_plot from etna.datasets import TSDataset @pytest.mark.parametrize( "timestamp, cycle, expected_cycle_names, expected_...
true
true
1c08d56c266b55e91808b138dc909533a747c169
918
py
Python
main/source/main/mlp_diff_solvers.py
Mathiasn21/Traffic_Sign_ML_final_project
17dae41f139d044f73d45493ddb82fb3d4425fa5
[ "Apache-2.0" ]
null
null
null
main/source/main/mlp_diff_solvers.py
Mathiasn21/Traffic_Sign_ML_final_project
17dae41f139d044f73d45493ddb82fb3d4425fa5
[ "Apache-2.0" ]
null
null
null
main/source/main/mlp_diff_solvers.py
Mathiasn21/Traffic_Sign_ML_final_project
17dae41f139d044f73d45493ddb82fb3d4425fa5
[ "Apache-2.0" ]
null
null
null
import joblib import matplotlib.pyplot as plt from sklearn.neural_network import MLPClassifier # Load previously saved models, with different MLP solvers mlp_adam_best: MLPClassifier = joblib.load('D:\\group_projects\\Sign-machine-learning\\main\\source\\models\\mlp_adam_best.joblib') mlp_sgd: MLPClassifier = joblib.l...
48.315789
133
0.787582
import joblib import matplotlib.pyplot as plt from sklearn.neural_network import MLPClassifier mlp_adam_best: MLPClassifier = joblib.load('D:\\group_projects\\Sign-machine-learning\\main\\source\\models\\mlp_adam_best.joblib') mlp_sgd: MLPClassifier = joblib.load('D:\\group_projects\\Sign-machine-learning\\main\\sourc...
true
true
1c08d69c5cfde2ee30568da3096bb4e3bcabfd7d
126
py
Python
albumy/test.py
shidashui/MyFlaskWeb
b861c76813e15250036477fca6570cef1d957af1
[ "MIT" ]
3
2019-06-28T11:51:53.000Z
2019-11-13T05:08:06.000Z
albumy/test.py
shidashui/MyFlaskWeb
b861c76813e15250036477fca6570cef1d957af1
[ "MIT" ]
5
2019-06-28T11:52:35.000Z
2022-03-11T23:58:40.000Z
albumy/test.py
shidashui/MyFlaskWeb
b861c76813e15250036477fca6570cef1d957af1
[ "MIT" ]
null
null
null
from albumy import create_app, whooshee if __name__=='__main__': app = create_app() # print(app.config) app.run()
21
39
0.674603
from albumy import create_app, whooshee if __name__=='__main__': app = create_app() app.run()
true
true
1c08d7e5bbe9ca8e0277dc0274894c87c3348796
557
py
Python
yggdrasil/metaschema/tests/test_encoder.py
ghanashyamchalla/cis_interface
7b59439276eacb66f1f6ea4177d3a85cc061eed5
[ "BSD-3-Clause" ]
null
null
null
yggdrasil/metaschema/tests/test_encoder.py
ghanashyamchalla/cis_interface
7b59439276eacb66f1f6ea4177d3a85cc061eed5
[ "BSD-3-Clause" ]
null
null
null
yggdrasil/metaschema/tests/test_encoder.py
ghanashyamchalla/cis_interface
7b59439276eacb66f1f6ea4177d3a85cc061eed5
[ "BSD-3-Clause" ]
null
null
null
import io as sio from collections import OrderedDict from yggdrasil.metaschema import encoder from yggdrasil.tests import assert_raises class TestClass(object): # pragma: no cover pass def test_JSONEncoder(): r"""Test JSONEncoder error.""" x = TestClass() assert_raises(TypeError, encoder.encode_jso...
24.217391
63
0.705566
import io as sio from collections import OrderedDict from yggdrasil.metaschema import encoder from yggdrasil.tests import assert_raises class TestClass(object): pass def test_JSONEncoder(): x = TestClass() assert_raises(TypeError, encoder.encode_json, x) def test_encode_yaml(): x = OrderedDict([(...
true
true
1c08d84be1eb1d045bc53ed4ea9187631568f135
5,188
py
Python
data/p3BR/R1/benchmark/startQiskit_Class159.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startQiskit_Class159.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startQiskit_Class159.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=29 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
28.822222
140
0.628566
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test.mock import FakeVigo, ...
true
true
1c08dad41ea20dfca16eeec9fb00f3f26b61e177
22,995
py
Python
test/functional/test_framework/mininode.py
Karthik-Jason/UltraBlock
4cc79ee6dc3b0097e337f9ffc47e53816e585d4f
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
Karthik-Jason/UltraBlock
4cc79ee6dc3b0097e337f9ffc47e53816e585d4f
[ "MIT" ]
null
null
null
test/functional/test_framework/mininode.py
Karthik-Jason/UltraBlock
4cc79ee6dc3b0097e337f9ffc47e53816e585d4f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Ultrablock P...
41.209677
413
0.653055
import asyncio from collections import defaultdict from io import BytesIO import logging import struct import sys import threading from test_framework.messages import CBlockHeader, MIN_VERSION_SUPPORTED, msg_addr, msg_block, MSG_BLOCK, msg_blocktxn, msg_cmpctblock, msg_feefilter, msg_getaddr, msg_getblocks, msg_getblo...
true
true
1c08db06afe9c476bf4f902e53352d155d971a85
19,598
py
Python
test/with_dummyserver/test_connectionpool.py
1T/urllib3
7d50b9fb19df3c115a9fad4f54d1f3d971fb2cc7
[ "MIT" ]
null
null
null
test/with_dummyserver/test_connectionpool.py
1T/urllib3
7d50b9fb19df3c115a9fad4f54d1f3d971fb2cc7
[ "MIT" ]
null
null
null
test/with_dummyserver/test_connectionpool.py
1T/urllib3
7d50b9fb19df3c115a9fad4f54d1f3d971fb2cc7
[ "MIT" ]
null
null
null
import logging import socket import sys import unittest import mock try: from urllib.parse import urlencode except: from urllib import urlencode from test import requires_network, onlyPY3 from urllib3 import ( encode_multipart_formdata, HTTPConnectionPool, ) from urllib3.exceptions import ( Conne...
37.258555
111
0.607052
import logging import socket import sys import unittest import mock try: from urllib.parse import urlencode except: from urllib import urlencode from test import requires_network, onlyPY3 from urllib3 import ( encode_multipart_formdata, HTTPConnectionPool, ) from urllib3.exceptions import ( Conne...
true
true
1c08dba4c326ada0c2c97ce295ba521dd47c6315
4,576
py
Python
tests/integration/widgets/test_toggle.py
karen-poon/bokeh
d0ecb0c9089fc0838ca36371814430af51901708
[ "BSD-3-Clause" ]
null
null
null
tests/integration/widgets/test_toggle.py
karen-poon/bokeh
d0ecb0c9089fc0838ca36371814430af51901708
[ "BSD-3-Clause" ]
null
null
null
tests/integration/widgets/test_toggle.py
karen-poon/bokeh
d0ecb0c9089fc0838ca36371814430af51901708
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
33.15942
111
0.549388
from __future__ import annotations import pytest ; pytest from flaky import flaky from bokeh._testing.plugins.project import BokehModelPage, BokehServerPage from bokeh._testing.util.selenium import RECORD, find_element_for from bokeh.core.enums import ButtonType from bokeh.layouts import column from bokeh.models i...
true
true
1c08dc4b1fdd6d893bc5fb23a9d1096f5dd3db7a
6,036
py
Python
hw5/cs285/policies/MLP_policy.py
axelbr/berkeley-cs285-deep-reinforcement-learning
d5d0487e612a0704082951f7b283ca4584430017
[ "MIT" ]
null
null
null
hw5/cs285/policies/MLP_policy.py
axelbr/berkeley-cs285-deep-reinforcement-learning
d5d0487e612a0704082951f7b283ca4584430017
[ "MIT" ]
null
null
null
hw5/cs285/policies/MLP_policy.py
axelbr/berkeley-cs285-deep-reinforcement-learning
d5d0487e612a0704082951f7b283ca4584430017
[ "MIT" ]
null
null
null
import abc import itertools from torch import nn from torch.nn import functional as F from torch import optim import numpy as np import torch from torch import distributions from cs285.infrastructure import pytorch_util as ptu from cs285.policies.base_policy import BasePolicy class MLPPolicy(BasePolicy, nn.Module, ...
34.101695
114
0.526508
import abc import itertools from torch import nn from torch.nn import functional as F from torch import optim import numpy as np import torch from torch import distributions from cs285.infrastructure import pytorch_util as ptu from cs285.policies.base_policy import BasePolicy class MLPPolicy(BasePolicy, nn.Module, ...
true
true
1c08dd714e63d060ee1b2ba84a2ed891c5729b9b
31,662
py
Python
frappe/database/database.py
jimmyrianto/frappe
40051410436b11e0415c8c8f0a8335bdd572ce6e
[ "MIT" ]
2
2020-12-23T09:02:21.000Z
2021-07-30T23:55:38.000Z
frappe/database/database.py
jimmyrianto/frappe
40051410436b11e0415c8c8f0a8335bdd572ce6e
[ "MIT" ]
66
2020-02-28T07:47:09.000Z
2021-07-21T04:53:35.000Z
frappe/database/database.py
jimmyrianto/frappe
40051410436b11e0415c8c8f0a8335bdd572ce6e
[ "MIT" ]
4
2018-01-19T08:59:36.000Z
2020-01-30T08:11:56.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Database Module # -------------------- from __future__ import unicode_literals import re import time import frappe import datetime import frappe.defaults import frappe.model.meta from frappe import _ from time impo...
30.829601
148
0.683153
from __future__ import unicode_literals import re import time import frappe import datetime import frappe.defaults import frappe.model.meta from frappe import _ from time import time from frappe.utils import now, getdate, cast_fieldtype, get_datetime from frappe.utils.background_jobs import execute_job, get_queue f...
true
true
1c08debc72160b25880a72eb8367abc97f4ea065
1,787
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/ARB/vertex_attrib_binding.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/ARB/vertex_attrib_binding.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/ARB/vertex_attrib_binding.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import...
45.820513
123
0.822048
from OpenGL import platform as _p, arrays from OpenGL.raw.GL import _types as _cs from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GL_ARB_vertex_attrib_binding' def _f( function ): return _p.createFunction( fun...
true
true
1c08e0172a83991f873372d8064fca5b72db3d99
5,504
py
Python
litex_boards/targets/xilinx_alveo_u250.py
AEW2015/litex-boards
e98ddd58d3dbe2229d04281d43cb0d13a06527ea
[ "BSD-2-Clause" ]
177
2019-06-13T09:54:49.000Z
2022-03-29T02:25:13.000Z
litex_boards/targets/xilinx_alveo_u250.py
zeldin/litex-boards
d52859d9ef5d8d210118c01ce89e29404ac8d7c6
[ "BSD-2-Clause" ]
347
2019-06-12T17:47:45.000Z
2022-03-30T21:59:01.000Z
litex_boards/targets/xilinx_alveo_u250.py
zeldin/litex-boards
d52859d9ef5d8d210118c01ce89e29404ac8d7c6
[ "BSD-2-Clause" ]
202
2019-06-11T15:01:26.000Z
2022-03-31T16:25:19.000Z
#!/usr/bin/env python3 # # This file is part of LiteX-Boards. # # Copyright (c) 2020 Fei Gao <feig@princeton.edu> # Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr> # Copyright (c) 2020 David Shah <dave@ds0.me> # SPDX-License-Identifier: BSD-2-Clause import argparse, os from migen import * from migen....
41.383459
128
0.555959
import argparse, os from migen import * from migen.genlib.resetsync import AsyncResetSynchronizer from litex_boards.platforms import alveo_u250 from litex.soc.cores.clock import * from litex.soc.integration.soc_core import * from litex.soc.integration.builder import * from litex.soc.cores.led import LedChaser fro...
true
true
1c08e04c3099f3b881a7f9c21a4eba4cf36cd4b0
1,048
py
Python
blog/blog/migrations/0002_comment.py
victorvf/django-3-by-example
fe8a459b4318912abfdbe115cde528a1b192ccc3
[ "MIT" ]
null
null
null
blog/blog/migrations/0002_comment.py
victorvf/django-3-by-example
fe8a459b4318912abfdbe115cde528a1b192ccc3
[ "MIT" ]
null
null
null
blog/blog/migrations/0002_comment.py
victorvf/django-3-by-example
fe8a459b4318912abfdbe115cde528a1b192ccc3
[ "MIT" ]
1
2021-01-05T12:48:39.000Z
2021-01-05T12:48:39.000Z
# Generated by Django 3.1 on 2020-10-03 20:35 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.CreateModel( name='Comment', fiel...
33.806452
130
0.562023
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.CreateModel( name='Comment', fields=[ ('id', models.AutoField(a...
true
true
1c08e05c38110fd368fdae6ceb2ec7c784387ece
2,929
py
Python
server/src/tft/artemis/script.py
testing-farm/artemis
75ac645a7742c35899acfa224234a7b8e6e7ef70
[ "Apache-2.0" ]
null
null
null
server/src/tft/artemis/script.py
testing-farm/artemis
75ac645a7742c35899acfa224234a7b8e6e7ef70
[ "Apache-2.0" ]
null
null
null
server/src/tft/artemis/script.py
testing-farm/artemis
75ac645a7742c35899acfa224234a7b8e6e7ef70
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Testing Farm project. # SPDX-License-Identifier: Apache-2.0 import imp import os from typing import Any, Callable, Dict import gluetool.utils from gluetool.result import Error, Ok, Result from . import Failure class ScriptEngine: def __init__(self) -> None: super(ScriptE...
28.436893
93
0.615227
import imp import os from typing import Any, Callable, Dict import gluetool.utils from gluetool.result import Error, Ok, Result from . import Failure class ScriptEngine: def __init__(self) -> None: super(ScriptEngine, self).__init__() self.functions: Dict[str, Callable[..., Result[Any, Failure...
true
true
1c08e166a8ee540d1db16d6b3e22ac4c288a80c9
5,475
py
Python
flash/lib/waitq.py
pd-giz-dave/fellsafe-uhf
16aebae3ac1d5563d9b172fee3b276170d852bda
[ "MIT" ]
null
null
null
flash/lib/waitq.py
pd-giz-dave/fellsafe-uhf
16aebae3ac1d5563d9b172fee3b276170d852bda
[ "MIT" ]
null
null
null
flash/lib/waitq.py
pd-giz-dave/fellsafe-uhf
16aebae3ac1d5563d9b172fee3b276170d852bda
[ "MIT" ]
null
null
null
""" History 2021-02-01 DCN: Created for use by uasyncio.core 2021-04-05 DCN: Add deque wrapper """ """ Description A wrapper around utimeq.utimeq that copes with time roll-over. Created initially to isolate roll over effects from uasyncio.core It uses a time reference of time.ticks_ms() at syste...
40.555556
132
0.563288
import ucollections import utimeq import utime as time MAX_WAITQ_TIME = 48 * 60 * 60 * 1000 DEBUG = 0 log = None def set_debug(val): global DEBUG, log DEBUG = val if val: import ulogging as logging log = logging.getLogger("waitq") log.info('logging enabled') def dequ...
true
true
1c08e1b3843a0413e7b17629543d8008d04ef3c6
9,689
py
Python
pubsub/tests/unit/pubsub_v1/publisher/batch/test_thread.py
javisantana/google-cloud-python
59cfef1045ac350a21e16c7eccc79141b8dee29e
[ "Apache-2.0" ]
null
null
null
pubsub/tests/unit/pubsub_v1/publisher/batch/test_thread.py
javisantana/google-cloud-python
59cfef1045ac350a21e16c7eccc79141b8dee29e
[ "Apache-2.0" ]
null
null
null
pubsub/tests/unit/pubsub_v1/publisher/batch/test_thread.py
javisantana/google-cloud-python
59cfef1045ac350a21e16c7eccc79141b8dee29e
[ "Apache-2.0" ]
null
null
null
# Copyright 2017, 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...
31.871711
79
0.69326
import threading import time import mock from google.auth import credentials from google.cloud.pubsub_v1 import publisher from google.cloud.pubsub_v1 import types from google.cloud.pubsub_v1.publisher import exceptions from google.cloud.pubsub_v1.publisher.batch.base import BatchStatus from google.cloud.pubsub_v1.pu...
true
true
1c08e1bb4bd830a7f542003c0079908276d62d1f
4,379
py
Python
msticpy/data/drivers/local_data_driver.py
Noezor/msticpy
f0d6d0d0bbaeba1ca060787b9929350804fa6dc5
[ "MIT" ]
4
2021-02-02T19:49:54.000Z
2021-12-09T04:04:13.000Z
msticpy/data/drivers/local_data_driver.py
Noezor/msticpy
f0d6d0d0bbaeba1ca060787b9929350804fa6dc5
[ "MIT" ]
null
null
null
msticpy/data/drivers/local_data_driver.py
Noezor/msticpy
f0d6d0d0bbaeba1ca060787b9929350804fa6dc5
[ "MIT" ]
2
2021-12-06T21:43:14.000Z
2022-03-11T21:45:03.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Local D...
30.838028
84
0.549897
from pathlib import Path from typing import Union, Any, Dict, Optional, List import pandas as pd from .driver_base import DriverBase, QuerySource from ...common.utility import export from ..._version import VERSION __version__ = VERSION __author__ = "Ian Hellen" @export class LocalDataDriver(DriverBase): def ...
true
true
1c08e219fb9685389914fc1033a8f30b13a65ceb
1,653
py
Python
tests/test_validator.py
ausaki/python-validator
c795b038b53cb54adf4acceb223b156eb903002c
[ "MIT" ]
44
2018-07-30T07:09:15.000Z
2021-11-30T02:37:00.000Z
tests/test_validator.py
ausaki/python-validator
c795b038b53cb54adf4acceb223b156eb903002c
[ "MIT" ]
8
2019-02-18T15:00:31.000Z
2021-02-02T07:20:57.000Z
tests/test_validator.py
ausaki/python-validator
c795b038b53cb54adf4acceb223b156eb903002c
[ "MIT" ]
6
2019-03-10T20:34:23.000Z
2022-01-18T05:34:13.000Z
from validator import Validator, StringField, IntegerField, EnumField, FieldValidationError, ValidationError def test_custom_field_validator(): class V(Validator): name = StringField(max_length=50, required=True) age = IntegerField(min_value=1, max_value=120, default=20) sex = EnumField(ch...
25.828125
108
0.567453
from validator import Validator, StringField, IntegerField, EnumField, FieldValidationError, ValidationError def test_custom_field_validator(): class V(Validator): name = StringField(max_length=50, required=True) age = IntegerField(min_value=1, max_value=120, default=20) sex = EnumField(ch...
true
true
1c08e31dee6ffda25768b75d300b04f639eb1579
665
py
Python
xee/__init__.py
Hector47/xee-sdk-python
3ad30b50f8684bd7c6c415d8fb3647f30ace4af6
[ "Apache-2.0" ]
null
null
null
xee/__init__.py
Hector47/xee-sdk-python
3ad30b50f8684bd7c6c415d8fb3647f30ace4af6
[ "Apache-2.0" ]
null
null
null
xee/__init__.py
Hector47/xee-sdk-python
3ad30b50f8684bd7c6c415d8fb3647f30ace4af6
[ "Apache-2.0" ]
1
2021-05-15T21:40:30.000Z
2021-05-15T21:40:30.000Z
#!/usr/bin/env python # coding: utf8 """ This package contains Xee python SDK. This SDK maps the request you can send to Xee APIs (see dev.xee.com). """ from .sdk import Xee from enum import Enum class AuthScope(Enum): """Authorization scopes.""" VEHICLES_MANAGEMENT = "vehicles.management" VEHICL...
30.227273
73
0.733835
from .sdk import Xee from enum import Enum class AuthScope(Enum): VEHICLES_MANAGEMENT = "vehicles.management" VEHICLES_READ = "vehicles.read" VEHICLES_READ_SIGNALS = "vehicles.signals.read" VEHICLES_READ_LOCATIONS = "vehicles.locations.read" VEHICLES_READ_EVENTS = "vehicles.events.read" VEHIC...
true
true
1c08e3b36790fc108c6c3abb29f03c1e622ab1cc
40,459
py
Python
generate.py
uberduck-ai/VQGAN-CLIP
2e103f4076e084ec9774476ede00d68fdd35b35f
[ "MIT" ]
null
null
null
generate.py
uberduck-ai/VQGAN-CLIP
2e103f4076e084ec9774476ede00d68fdd35b35f
[ "MIT" ]
null
null
null
generate.py
uberduck-ai/VQGAN-CLIP
2e103f4076e084ec9774476ede00d68fdd35b35f
[ "MIT" ]
null
null
null
# Originally made by Katherine Crowson (https://github.com/crowsonkb, https://twitter.com/RiversHaveWings) # The original BigGAN+CLIP method was by https://twitter.com/advadnoun import argparse import math import random # from email.policy import default from urllib.request import urlopen from tqdm import tqdm import ...
41.411464
228
0.602116
import argparse import math import random from urllib.request import urlopen from tqdm import tqdm import sys import os sys.path.append('taming-transformers') from omegaconf import OmegaConf from taming.models import cond_transformer, vqgan import torch from torch import nn, optim from torch.nn import functional as...
true
true
1c08e52b765b40c2252e46189f88e5ee759c37af
8,064
py
Python
tensorflow_examples/lite/model_maker/core/task/text_classifier.py
mlhaycck/examples
f27903a2116cb9158b48e36ef5531a836434c2f1
[ "Apache-2.0" ]
1
2020-11-18T11:46:45.000Z
2020-11-18T11:46:45.000Z
tensorflow_examples/lite/model_maker/core/task/text_classifier.py
loneicewolf/examples
f27903a2116cb9158b48e36ef5531a836434c2f1
[ "Apache-2.0" ]
null
null
null
tensorflow_examples/lite/model_maker/core/task/text_classifier.py
loneicewolf/examples
f27903a2116cb9158b48e36ef5531a836434c2f1
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.724138
161
0.702629
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tempfile import tensorflow as tf from tensorflow_examples.lite.model_maker.core import compat from tensorflow_examples.lite.model_maker.core.export_format import ExportFormat from tensorflow...
true
true
1c08e56c5f2863c9ea7ad37c5c2b8ef4c7f122af
405
py
Python
research_/research_paper/wsgi.py
yadavshani67/research_paper
61c22140dff309e4b5d7aee9147cd8547adf7ed2
[ "Apache-2.0" ]
null
null
null
research_/research_paper/wsgi.py
yadavshani67/research_paper
61c22140dff309e4b5d7aee9147cd8547adf7ed2
[ "Apache-2.0" ]
null
null
null
research_/research_paper/wsgi.py
yadavshani67/research_paper
61c22140dff309e4b5d7aee9147cd8547adf7ed2
[ "Apache-2.0" ]
null
null
null
""" WSGI config for research_paper project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'research_paper.settings') application = get_wsgi_application()
true
true
1c08e701ccdec088e044311c0d84b06196d4a3a3
602
py
Python
airflow/dags/mainnet_verify_streaming_dag.py
blockchain-etl/band-protocol-etl
84a0819a89fdcbce75efc9f59e0c1286954397c2
[ "MIT" ]
5
2020-08-27T14:27:10.000Z
2021-08-17T14:15:29.000Z
airflow/dags/mainnet_verify_streaming_dag.py
blockchain-etl/band-protocol-etl
84a0819a89fdcbce75efc9f59e0c1286954397c2
[ "MIT" ]
4
2020-09-09T16:48:46.000Z
2020-09-22T12:14:50.000Z
airflow/dags/mainnet_verify_streaming_dag.py
blockchain-etl/band-etl
84a0819a89fdcbce75efc9f59e0c1286954397c2
[ "MIT" ]
null
null
null
from __future__ import print_function import logging from bandetl_airflow.build_verify_streaming_dag import build_verify_streaming_dag from bandetl_airflow.variables import read_verify_streaming_dag_vars logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) # When searching for DAGs, Airflow will only c...
30.1
115
0.799003
from __future__ import print_function import logging from bandetl_airflow.build_verify_streaming_dag import build_verify_streaming_dag from bandetl_airflow.variables import read_verify_streaming_dag_vars logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) DAG = build_verify_streaming_dag( dag_id='...
true
true
1c08e72d65eef3954f7676a8c39f9475cc0a54d0
11,102
py
Python
openpype/hosts/houdini/api/pipeline.py
fatfish-lab/OpenPype
cfcdc80f74f71b2acfa64e88409e122870581cc9
[ "MIT" ]
null
null
null
openpype/hosts/houdini/api/pipeline.py
fatfish-lab/OpenPype
cfcdc80f74f71b2acfa64e88409e122870581cc9
[ "MIT" ]
null
null
null
openpype/hosts/houdini/api/pipeline.py
fatfish-lab/OpenPype
cfcdc80f74f71b2acfa64e88409e122870581cc9
[ "MIT" ]
null
null
null
import os import sys import logging import contextlib import hou import hdefereval import pyblish.api import avalon.api from avalon.pipeline import AVALON_CONTAINER_ID from avalon.lib import find_submodule import openpype.hosts.houdini from openpype.hosts.houdini.api import lib from openpype.lib import ( any_ou...
29.448276
78
0.652945
import os import sys import logging import contextlib import hou import hdefereval import pyblish.api import avalon.api from avalon.pipeline import AVALON_CONTAINER_ID from avalon.lib import find_submodule import openpype.hosts.houdini from openpype.hosts.houdini.api import lib from openpype.lib import ( any_ou...
true
true
1c08e752ba69f0dc588ebb87d50670b4c3de93b4
2,540
py
Python
forte/data/tests/data_pack_test.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
forte/data/tests/data_pack_test.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
forte/data/tests/data_pack_test.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
""" Unit tests for ner_data pack related operations. """ import logging import os import unittest import forte from ft.onto.base_ontology import ( Token, Sentence, Document, EntityMention, PredicateArgument, PredicateLink, PredicateMention) from forte.data.readers import OntonotesReader logging.basicConfig(le...
33.866667
79
0.59252
import logging import os import unittest import forte from ft.onto.base_ontology import ( Token, Sentence, Document, EntityMention, PredicateArgument, PredicateLink, PredicateMention) from forte.data.readers import OntonotesReader logging.basicConfig(level=logging.DEBUG) class DataPackTest(unittest.TestCase...
true
true
1c08e90858b19071d06e5233dcaa6961bae50f0c
667
py
Python
datahub/event/urls.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
6
2019-12-02T16:11:24.000Z
2022-03-18T10:02:02.000Z
datahub/event/urls.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
1,696
2019-10-31T14:08:37.000Z
2022-03-29T12:35:57.000Z
datahub/event/urls.py
Staberinde/data-hub-api
3d0467dbceaf62a47158eea412a3dba827073300
[ "MIT" ]
9
2019-11-22T12:42:03.000Z
2021-09-03T14:25:05.000Z
from django.urls import path from datahub.event.views import EventViewSet, EventViewSetV4 collection = EventViewSet.as_view({ 'get': 'list', 'post': 'create', }) item = EventViewSet.as_view({ 'get': 'retrieve', 'patch': 'partial_update', }) urls_v3 = [ path('event', collection, name='collection'...
19.617647
60
0.631184
from django.urls import path from datahub.event.views import EventViewSet, EventViewSetV4 collection = EventViewSet.as_view({ 'get': 'list', 'post': 'create', }) item = EventViewSet.as_view({ 'get': 'retrieve', 'patch': 'partial_update', }) urls_v3 = [ path('event', collection, name='collection'...
true
true
1c08e9899e6dbee56cab4f3f53e33dea482d256f
6,400
py
Python
tests/test_classifier/test_class_prediction_error.py
mmorrison1670/yellowbrick
c2028de2b7703e563503f7e85fdd65ad08de1ef6
[ "Apache-2.0" ]
1
2019-09-18T02:34:59.000Z
2019-09-18T02:34:59.000Z
tests/test_classifier/test_class_prediction_error.py
mmorrison1670/yellowbrick
c2028de2b7703e563503f7e85fdd65ad08de1ef6
[ "Apache-2.0" ]
3
2021-02-19T22:28:08.000Z
2021-02-21T18:41:41.000Z
tests/test_classifier/test_class_prediction_error.py
mmorrison1670/yellowbrick
c2028de2b7703e563503f7e85fdd65ad08de1ef6
[ "Apache-2.0" ]
null
null
null
# tests.test_classifier.test_class_prediction_error # Testing for the ClassPredictionError visualizer # # Author: Benjamin Bengfort # Author: Rebecca Bilbro # Author: Larry Gray # Created: Tue May 23 13:41:55 2017 -0700 # # Copyright (C) 2017 The scikit-yb developers # For license information, see LICENSE.txt # ...
33.684211
85
0.63
import pytest import matplotlib.pyplot as plt from yellowbrick.exceptions import ModelError from yellowbrick.datasets import load_occupancy from yellowbrick.classifier.class_prediction_error import * from sklearn.svm import LinearSVC from sklearn.ensemble import RandomForestClassifier from sklearn.datasets import ...
true
true
1c08e9dc3d0751b36ea26cbeca2af42e82bc8266
42,706
py
Python
test/core_tests/test_grids.py
egpbos/amuse
64b3bc5b7fef9496012b023578c4d71cecef92b7
[ "Apache-2.0" ]
null
null
null
test/core_tests/test_grids.py
egpbos/amuse
64b3bc5b7fef9496012b023578c4d71cecef92b7
[ "Apache-2.0" ]
null
null
null
test/core_tests/test_grids.py
egpbos/amuse
64b3bc5b7fef9496012b023578c4d71cecef92b7
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
from amuse.test import amusetest from amuse.support.interface import InCodeComponentImplementation from amuse.datamodel.indexing import * from amuse.datamodel.grids import * import numpy import inspect import collections from amuse.units import units from amuse.units import constants from amuse.units import nbody_s...
45.001054
137
0.567438
from amuse.test import amusetest from amuse.support.interface import InCodeComponentImplementation from amuse.datamodel.indexing import * from amuse.datamodel.grids import * import numpy import inspect import collections from amuse.units import units from amuse.units import constants from amuse.units import nbody_s...
true
true
1c08eb83579e70d7a2192492f7afa01241c98b52
593
py
Python
Week_1/String variables/string_functions.py
StephenXie/ACLSummerCoding
c0f17ea80edeb1f7891bd426acd419016e02b40e
[ "MIT" ]
2
2021-07-08T02:10:50.000Z
2021-07-08T02:13:46.000Z
Week_1/String variables/string_functions.py
StephenXie/ACLSummerCoding
c0f17ea80edeb1f7891bd426acd419016e02b40e
[ "MIT" ]
null
null
null
Week_1/String variables/string_functions.py
StephenXie/ACLSummerCoding
c0f17ea80edeb1f7891bd426acd419016e02b40e
[ "MIT" ]
null
null
null
# There are a number of string functions you can use # on string variables sentence = 'The dog is named Sammy' # upper will return the string in uppercase letters print(sentence.upper()) # lower will return the string in lowercase letters print(sentence.lower()) # capitalize will return the string with the first let...
31.210526
67
0.770658
sentence = 'The dog is named Sammy' print(sentence.upper()) print(sentence.lower()) print(sentence.capitalize()) print(sentence.title()) print(sentence.count('a'))
true
true
1c08ec36c9205a20aa16d5925759fdbe86f5446e
693
py
Python
scene/compare_sets.py
jyf588/pytorch-rl-bullet
3ac1835d01e658b2078126895ffa0eb11304abb4
[ "MIT" ]
null
null
null
scene/compare_sets.py
jyf588/pytorch-rl-bullet
3ac1835d01e658b2078126895ffa0eb11304abb4
[ "MIT" ]
null
null
null
scene/compare_sets.py
jyf588/pytorch-rl-bullet
3ac1835d01e658b2078126895ffa0eb11304abb4
[ "MIT" ]
null
null
null
import os import ns_vqa_dart.bullet.util as util dir1 = "/home/mguo/data/dash/t1" dir2 = "/home/mguo/data/dash/t1_repro_test" for task in ["place", "stack"]: n_diff = 0 t1 = os.path.join(dir1, task) t2 = os.path.join(dir2, task) for fname1 in os.listdir(t1): name, _ = fname1.split(".") ...
25.666667
73
0.575758
import os import ns_vqa_dart.bullet.util as util dir1 = "/home/mguo/data/dash/t1" dir2 = "/home/mguo/data/dash/t1_repro_test" for task in ["place", "stack"]: n_diff = 0 t1 = os.path.join(dir1, task) t2 = os.path.join(dir2, task) for fname1 in os.listdir(t1): name, _ = fname1.split(".") ...
true
true
1c08eca6a23378f8b084ce4798938a0a60561070
986
py
Python
mms/tests/unit_tests/model_service/dummy_model/dummy_model_service.py
andrewfayres/mxnet-model-server
ef4edfef4cfe5234887bf834ec7b82676a36ba02
[ "Apache-2.0" ]
1
2019-01-30T02:57:31.000Z
2019-01-30T02:57:31.000Z
mms/tests/unit_tests/model_service/dummy_model/dummy_model_service.py
DrSnowbird/mxnet-model-server
a0bfd712350545dceb21c8e0b0b21dfa0c9918a7
[ "Apache-2.0" ]
null
null
null
mms/tests/unit_tests/model_service/dummy_model/dummy_model_service.py
DrSnowbird/mxnet-model-server
a0bfd712350545dceb21c8e0b0b21dfa0c9918a7
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # or in the "license" file...
28.171429
81
0.724138
from mms.model_service.model_service import SingleNodeService class DummyNodeService(SingleNodeService): def _inference(self, data): pass def signature(self): pass def ping(self): pass def inference(self): pass class SomeOtherClass: def __init__(self): ...
true
true
1c08ed13a6aa4c0e5d9f274a76b8d52a7a840736
2,537
py
Python
mytb/tests/test_gitlab.py
quentinql/mytb
ba0e9626e6f003a514063a098626a7907c50a711
[ "BSD-3-Clause" ]
null
null
null
mytb/tests/test_gitlab.py
quentinql/mytb
ba0e9626e6f003a514063a098626a7907c50a711
[ "BSD-3-Clause" ]
2
2019-09-13T12:17:53.000Z
2019-10-24T07:09:51.000Z
mytb/tests/test_gitlab.py
quentinql/mytb
ba0e9626e6f003a514063a098626a7907c50a711
[ "BSD-3-Clause" ]
3
2017-08-03T13:20:45.000Z
2021-03-31T13:23:29.000Z
#!/usr/bin/env python # ############################################################################# # Copyright : (C) 2017 by Teledomic.eu All rights reserved # # Name: mytb.tests.tst_gitlab # # Description: test cases for mytb.gitlab.check_ci_cfg # # #########################################################...
30.566265
79
0.59322
import os import unittest import yaml from ddt import data from ddt import ddt from mytb.gitlab.check_ci_cfg import check_cfg_file from mytb.tempfile import mktemp_fname from mytb.tests.gitlab.cicfg_patterns import fail_patterns from mytb.tests.gitlab.cicfg_patterns import pass_patterns @ddt class GitlabCfg(unittes...
true
true
1c08ed6ffa4f8b177c56a947da9b49980ab0a2c2
107
py
Python
mmocr/models/kie/heads/__init__.py
yuexy/mmocr
82488024db159266e66ea6b0d6f84a5a18e87362
[ "Apache-2.0" ]
2,261
2021-04-08T03:45:41.000Z
2022-03-31T23:37:46.000Z
mmocr/models/kie/heads/__init__.py
yuexy/mmocr
82488024db159266e66ea6b0d6f84a5a18e87362
[ "Apache-2.0" ]
789
2021-04-08T05:40:13.000Z
2022-03-31T09:42:39.000Z
mmocr/models/kie/heads/__init__.py
yuexy/mmocr
82488024db159266e66ea6b0d6f84a5a18e87362
[ "Apache-2.0" ]
432
2021-04-08T03:56:16.000Z
2022-03-30T18:44:43.000Z
# Copyright (c) OpenMMLab. All rights reserved. from .sdmgr_head import SDMGRHead __all__ = ['SDMGRHead']
21.4
47
0.757009
from .sdmgr_head import SDMGRHead __all__ = ['SDMGRHead']
true
true
1c08ee1e464cab3ec8cc77920e00a2a0989c4829
32,382
py
Python
lib/techniques/blind/inference.py
danielvvDev/Sqlmap-Reforced2
6780f801471ebfee5424781c548c47e11d272dc9
[ "MIT" ]
1
2018-01-18T03:39:51.000Z
2018-01-18T03:39:51.000Z
lib/techniques/blind/inference.py
danielvvDev/Sqlmap-Reforced2
6780f801471ebfee5424781c548c47e11d272dc9
[ "MIT" ]
null
null
null
lib/techniques/blind/inference.py
danielvvDev/Sqlmap-Reforced2
6780f801471ebfee5424781c548c47e11d272dc9
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'LICENSE' for copying permission """ import re import threading import time from extra.safe2bin.safe2bin import safecharencode from lib.core.agent import agent from lib.core.common import Backend from lib.core.commo...
46.45911
181
0.537768
import re import threading import time from extra.safe2bin.safe2bin import safecharencode from lib.core.agent import agent from lib.core.common import Backend from lib.core.common import calculateDeltaSeconds from lib.core.common import dataToStdout from lib.core.common import decodeHexValue from lib.core.common imp...
true
true
1c08eedd79ea75f4ae50c32f6d6ce8f0ce36b42c
3,480
py
Python
app.py
MMidwinter/sqlalchemy-challenge
df00c4f50f21865181654a6498f821c27c3f238d
[ "ADSL" ]
null
null
null
app.py
MMidwinter/sqlalchemy-challenge
df00c4f50f21865181654a6498f821c27c3f238d
[ "ADSL" ]
null
null
null
app.py
MMidwinter/sqlalchemy-challenge
df00c4f50f21865181654a6498f821c27c3f238d
[ "ADSL" ]
null
null
null
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify ################################################# # Database Setup ################################################# eng...
26.564885
185
0.606897
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify engine = create_engine("sqlite:///hawaii.sqlite") Base = automap_base() Base.prepare(engine, reflect=True) Measurement...
true
true
1c08ef131c34d83ca5584f9cd6e876bf4a733406
7,581
py
Python
airflow/providers/apache/hive/operators/hive_stats.py
khilawar4/airflow
5f3f65b82517f615f31f0c8a7f8ac0facb325235
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2021-07-30T16:26:39.000Z
2021-08-03T13:52:43.000Z
airflow/providers/apache/hive/operators/hive_stats.py
khilawar4/airflow
5f3f65b82517f615f31f0c8a7f8ac0facb325235
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-02-27T17:34:47.000Z
2021-03-24T21:03:30.000Z
airflow/providers/apache/hive/operators/hive_stats.py
khilawar4/airflow
5f3f65b82517f615f31f0c8a7f8ac0facb325235
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-02-03T09:55:26.000Z
2020-02-03T09:55:26.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...
40.540107
107
0.611661
import json import warnings from collections import OrderedDict from typing import Any, Callable, Dict, List, Optional from airflow.exceptions import AirflowException from airflow.models import BaseOperator from airflow.providers.apache.hive.hooks.hive import HiveMetastoreHook from airflow.providers.mysql.hooks.mysql ...
true
true
1c08ef3b57b03c12605c861716de70d7d2fa5a9f
841
py
Python
openai/api_resources/__init__.py
sorinsuciu-msft/openai-python
0b07e1e9457d3a6252431036b725b3e891f95a40
[ "MIT" ]
null
null
null
openai/api_resources/__init__.py
sorinsuciu-msft/openai-python
0b07e1e9457d3a6252431036b725b3e891f95a40
[ "MIT" ]
null
null
null
openai/api_resources/__init__.py
sorinsuciu-msft/openai-python
0b07e1e9457d3a6252431036b725b3e891f95a40
[ "MIT" ]
null
null
null
from openai.api_resources.answer import Answer # noqa: F401 from openai.api_resources.classification import Classification # noqa: F401 from openai.api_resources.completion import Completion # noqa: F401 from openai.api_resources.customer import Customer # noqa: F401 from openai.api_resources.edit import Edit # no...
60.071429
76
0.814507
from openai.api_resources.answer import Answer from openai.api_resources.classification import Classification from openai.api_resources.completion import Completion from openai.api_resources.customer import Customer from openai.api_resources.edit import Edit from openai.api_resources.deployment import Deployment ...
true
true
1c08ef79931db89a3d2fe0f83dbb6c447e64246b
3,611
py
Python
mci/estimators/base_estimator.py
TAU-MLwell/Marginal-Contribution-Feature-Importance
956f401d3af0b9da7a607cc30304669f6b723d7c
[ "MIT" ]
null
null
null
mci/estimators/base_estimator.py
TAU-MLwell/Marginal-Contribution-Feature-Importance
956f401d3af0b9da7a607cc30304669f6b723d7c
[ "MIT" ]
null
null
null
mci/estimators/base_estimator.py
TAU-MLwell/Marginal-Contribution-Feature-Importance
956f401d3af0b9da7a607cc30304669f6b723d7c
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import Optional, Sequence, List, Iterable, Dict, Tuple from tqdm.auto import tqdm from pandas import DataFrame from mci.evaluators.evaluator_function import MultiVariateArray, UniVariateArray, EvaluationFunction from mci.mci_values import MciValues from mci.utils.estimat...
46.294872
113
0.594572
from abc import ABC, abstractmethod from typing import Optional, Sequence, List, Iterable, Dict, Tuple from tqdm.auto import tqdm from pandas import DataFrame from mci.evaluators.evaluator_function import MultiVariateArray, UniVariateArray, EvaluationFunction from mci.mci_values import MciValues from mci.utils.estimat...
true
true
1c08f030c934ade2876c42a9655efa43d0cd4267
4,437
py
Python
qaseio/tests/qaseio/services/test_attachments.py
aleksandr-kotlyar/qase-python
3e6916eb4bf3518651e0a8e2e62281bfe0bfa464
[ "Apache-2.0" ]
null
null
null
qaseio/tests/qaseio/services/test_attachments.py
aleksandr-kotlyar/qase-python
3e6916eb4bf3518651e0a8e2e62281bfe0bfa464
[ "Apache-2.0" ]
null
null
null
qaseio/tests/qaseio/services/test_attachments.py
aleksandr-kotlyar/qase-python
3e6916eb4bf3518651e0a8e2e62281bfe0bfa464
[ "Apache-2.0" ]
null
null
null
import pytest import requests_mock from apitist.constructor import converter from requests_toolbelt.multipart import decoder from tests.data import _attachment, _attachment_created, _list, _status_true from qaseio.client.models import ( AttachmentCreated, AttachmentInfo, AttachmentList, List, Mime...
32.866667
79
0.568177
import pytest import requests_mock from apitist.constructor import converter from requests_toolbelt.multipart import decoder from tests.data import _attachment, _attachment_created, _list, _status_true from qaseio.client.models import ( AttachmentCreated, AttachmentInfo, AttachmentList, List, Mime...
true
true
1c08f049a7dc85382686969ff3123d7d62457f34
5,803
py
Python
scripts/tf_cnn_benchmarks/models/model_config.py
zenanchen21/AI-HPC
5ce79dee898612e7f3fc07e8c569808d649cc97a
[ "Apache-2.0" ]
2
2019-03-18T10:04:20.000Z
2019-08-13T05:50:33.000Z
scripts/tf_cnn_benchmarks/models/model_config.py
zenanchen21/AI-HPC
5ce79dee898612e7f3fc07e8c569808d649cc97a
[ "Apache-2.0" ]
1
2018-10-04T20:44:19.000Z
2018-10-04T20:44:19.000Z
scripts/tf_cnn_benchmarks/models/model_config.py
ganeshmaharaj/benchmarks
ee430b92c131df4ab6816bfdc0ad8227b9d96244
[ "Apache-2.0" ]
1
2019-04-03T14:42:56.000Z
2019-04-03T14:42: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...
40.58042
80
0.760641
from functools import partial from models import alexnet_model from models import densenet_model from models import googlenet_model from models import inception_model from models import lenet_model from models import mobilenet_v2 from models import nasnet_model from models import official_resnet_model from models im...
true
true
1c08f04ec15b39e601e472212131ef502165d68e
10,573
py
Python
smac/epm/base_epm.py
kstrauch94/SMAC3
8e9b33689f8c44270f60c22826e38f0a6bca47d4
[ "BSD-3-Clause" ]
null
null
null
smac/epm/base_epm.py
kstrauch94/SMAC3
8e9b33689f8c44270f60c22826e38f0a6bca47d4
[ "BSD-3-Clause" ]
null
null
null
smac/epm/base_epm.py
kstrauch94/SMAC3
8e9b33689f8c44270f60c22826e38f0a6bca47d4
[ "BSD-3-Clause" ]
null
null
null
import copy import typing import numpy as np from sklearn.decomposition import PCA from sklearn.preprocessing import MinMaxScaler from sklearn.exceptions import NotFittedError from smac.configspace import ConfigurationSpace from smac.utils.constants import VERY_SMALL_NUMBER from smac.utils.logging import PickableLog...
36.711806
119
0.584035
import copy import typing import numpy as np from sklearn.decomposition import PCA from sklearn.preprocessing import MinMaxScaler from sklearn.exceptions import NotFittedError from smac.configspace import ConfigurationSpace from smac.utils.constants import VERY_SMALL_NUMBER from smac.utils.logging import PickableLog...
true
true
1c08f09852244db8bd50cab87dbaf130b91431bc
397
py
Python
school/migrations/0012_alter_student_phone.py
lhggomes/API
4f8383bd9db46a4a90ea9bf64c8d6ca6376d8722
[ "Unlicense" ]
null
null
null
school/migrations/0012_alter_student_phone.py
lhggomes/API
4f8383bd9db46a4a90ea9bf64c8d6ca6376d8722
[ "Unlicense" ]
null
null
null
school/migrations/0012_alter_student_phone.py
lhggomes/API
4f8383bd9db46a4a90ea9bf64c8d6ca6376d8722
[ "Unlicense" ]
null
null
null
# Generated by Django 3.2 on 2021-05-02 00:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('school', '0011_alter_student_phone'), ] operations = [ migrations.AlterField( model_name='student', name='phone', ...
20.894737
63
0.599496
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('school', '0011_alter_student_phone'), ] operations = [ migrations.AlterField( model_name='student', name='phone', field=models.CharField(default='1', ma...
true
true
1c08f10ed1f4bca14484b96d2062b35e63a4743f
2,586
py
Python
Backend/models/hospital.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
15
2020-04-24T20:18:11.000Z
2022-01-31T21:05:05.000Z
Backend/models/hospital.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
2
2021-05-19T07:15:09.000Z
2022-03-07T08:29:34.000Z
Backend/models/hospital.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
4
2020-04-27T16:20:13.000Z
2021-02-23T10:39:42.000Z
import json from collections import Counter from db import db class Hospital(db.Model): """ Hospital data class """ __tablename__ = 'hospitals_current' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), nullable=False) address = db.Column(db.String(255), nullab...
29.386364
71
0.638438
import json from collections import Counter from db import db class Hospital(db.Model): __tablename__ = 'hospitals_current' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), nullable=False) address = db.Column(db.String(255), nullable=False) state = db.Column(db.Strin...
true
true
1c08f124ef93cfe59a7d0b18f9a73c1800958563
512
py
Python
JumpscaleCore/core/BASECLASSES/ThreeBotActorBase.py
grimpy/jumpscaleX_core
c24d6d47fccc0801e578fedb376ef110f7a00bad
[ "Apache-2.0" ]
null
null
null
JumpscaleCore/core/BASECLASSES/ThreeBotActorBase.py
grimpy/jumpscaleX_core
c24d6d47fccc0801e578fedb376ef110f7a00bad
[ "Apache-2.0" ]
null
null
null
JumpscaleCore/core/BASECLASSES/ThreeBotActorBase.py
grimpy/jumpscaleX_core
c24d6d47fccc0801e578fedb376ef110f7a00bad
[ "Apache-2.0" ]
null
null
null
from Jumpscale import j from .JSBase import JSBase class ThreeBotActorBase(JSBase): def _init_actor(self, **kwargs): self._scheduler = None self._schemas = {} assert "package" in kwargs self.package = kwargs["package"] self.bcdb = self.package.bcdb @property def sc...
26.947368
83
0.636719
from Jumpscale import j from .JSBase import JSBase class ThreeBotActorBase(JSBase): def _init_actor(self, **kwargs): self._scheduler = None self._schemas = {} assert "package" in kwargs self.package = kwargs["package"] self.bcdb = self.package.bcdb @property def sc...
true
true
1c08f17501738fbb4285c65b5e31a4124c65a2d6
759
py
Python
django/conf/locale/ta/formats.py
webjunkie/django
5dbca13f3baa2e1bafd77e84a80ad6d8a074712e
[ "BSD-3-Clause" ]
285
2019-12-23T09:50:21.000Z
2021-12-08T09:08:49.000Z
django/conf/locale/ta/formats.py
webjunkie/django
5dbca13f3baa2e1bafd77e84a80ad6d8a074712e
[ "BSD-3-Clause" ]
18
2015-01-14T07:51:48.000Z
2021-10-14T01:19:26.000Z
django/conf/locale/ta/formats.py
webjunkie/django
5dbca13f3baa2e1bafd77e84a80ad6d8a074712e
[ "BSD-3-Clause" ]
70
2015-01-01T00:33:24.000Z
2021-12-10T03:43:07.000Z
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F, Y' TIME_FORMAT = 'g:i:s A' #...
30.36
77
0.752306
from __future__ import unicode_literals DATE_FORMAT = 'j F, Y' TIME_FORMAT = 'g:i:s A' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'j M, Y'
true
true
1c08f1940766a6b7798f6c758da2d311719f3ef9
1,500
py
Python
tests/st/ops/ascend/test_tbe_ops/test_softmax_cross_entropy_with_logits.py
ythlml/mindspore
028ae212624164044cfaa84f347fc502cb7fcb0f
[ "Apache-2.0" ]
7
2020-05-24T03:19:26.000Z
2020-05-24T03:20:00.000Z
tests/st/ops/ascend/test_tbe_ops/test_softmax_cross_entropy_with_logits.py
ythlml/mindspore
028ae212624164044cfaa84f347fc502cb7fcb0f
[ "Apache-2.0" ]
null
null
null
tests/st/ops/ascend/test_tbe_ops/test_softmax_cross_entropy_with_logits.py
ythlml/mindspore
028ae212624164044cfaa84f347fc502cb7fcb0f
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
35.714286
78
0.718
import numpy as np import mindspore.context as context import mindspore.nn as nn from mindspore import Tensor from mindspore.common.api import ms_function from mindspore.ops import operations as P context.set_context(device_target="Ascend") class Net(nn.Cell): def __init__(self, is_grad=False): super(Ne...
true
true
1c08f1a5e0ccad0a7d93e8acea178f8e668962d0
3,709
py
Python
Aufgaben/abgabe2/view.py
JoshuaJoost/GNN_SS20
6b905319f2e51b71569354c347805abce9df3cb1
[ "MIT" ]
null
null
null
Aufgaben/abgabe2/view.py
JoshuaJoost/GNN_SS20
6b905319f2e51b71569354c347805abce9df3cb1
[ "MIT" ]
null
null
null
Aufgaben/abgabe2/view.py
JoshuaJoost/GNN_SS20
6b905319f2e51b71569354c347805abce9df3cb1
[ "MIT" ]
null
null
null
__authors__ = "Rosario Allegro (1813064), Sedat Cakici (1713179), Joshua Joost (1626034)" # maintainer = who fixes buggs? __maintainer = __authors__ __date__ = "2020-04-23" __version__ = "0.0" __status__ = "Development" ##--- TODO # - Graph showing the learning progress of the neural network # - Let the neural network...
29.672
137
0.65759
__authors__ = "Rosario Allegro (1813064), Sedat Cakici (1713179), Joshua Joost (1626034)" __maintainer = __authors__ __date__ = "2020-04-23" __version__ = "0.0" __status__ = "Development" import numpy as np import matplotlib from matplotlib import pyplot as plt WINDOW_X_INCH = 9.0 WINDOW_Y_INCH = 6.5 def printPerfor...
true
true
1c08f1b4e232faef226d0b7db457b49ea01af657
5,228
py
Python
mux_python/models/list_errors_response.py
gts-work/mux-python
826e52730bad7acd08c31a3e1951a281521f1b4f
[ "MIT" ]
null
null
null
mux_python/models/list_errors_response.py
gts-work/mux-python
826e52730bad7acd08c31a3e1951a281521f1b4f
[ "MIT" ]
null
null
null
mux_python/models/list_errors_response.py
gts-work/mux-python
826e52730bad7acd08c31a3e1951a281521f1b4f
[ "MIT" ]
null
null
null
# coding: utf-8 """ Mux API Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-g...
28.883978
205
0.59277
import inspect import pprint import re import six from mux_python.configuration import Configuration class ListErrorsResponse(object): openapi_types = { 'data': 'list[Error]', 'total_row_count': 'int', 'timeframe': 'list[int]' } attribute_map = { 'data': 'data', ...
true
true
1c08f1ef30e53aea912530059834a50e0790a7d3
410
py
Python
posts/migrations/0005_auto_20200413_0601.py
duchungvu/ServEx
83ebdb53fd3e2fba8d575dec66e0edfd5842c45f
[ "MIT" ]
1
2020-03-16T18:57:12.000Z
2020-03-16T18:57:12.000Z
posts/migrations/0005_auto_20200413_0601.py
duchungvu/ServEx
83ebdb53fd3e2fba8d575dec66e0edfd5842c45f
[ "MIT" ]
2
2021-03-30T12:52:17.000Z
2021-06-04T22:37:57.000Z
posts/migrations/0005_auto_20200413_0601.py
duchungvu/ServEx
83ebdb53fd3e2fba8d575dec66e0edfd5842c45f
[ "MIT" ]
1
2021-08-29T21:41:19.000Z
2021-08-29T21:41:19.000Z
# Generated by Django 3.0.4 on 2020-04-13 06:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0004_auto_20200409_0259'), ] operations = [ migrations.AlterField( model_name='post', name='title', ...
21.578947
79
0.604878
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0004_auto_20200409_0259'), ] operations = [ migrations.AlterField( model_name='post', name='title', field=models.CharField(default='Just anothe...
true
true
1c08f23c5774a28313db6bf4fb0255b04e4b9440
559
py
Python
setup.py
SeraphimSerapis/libpyvss
f7076e54631091f95d2f68703376441214f4cb52
[ "MIT" ]
null
null
null
setup.py
SeraphimSerapis/libpyvss
f7076e54631091f95d2f68703376441214f4cb52
[ "MIT" ]
null
null
null
setup.py
SeraphimSerapis/libpyvss
f7076e54631091f95d2f68703376441214f4cb52
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) setup( name='vss-python-api', version='0.9.7', url='https://github.com/SeraphimSerapis/libpyvss', author='Tim Messerschmidt', author_email="ti...
24.304348
54
0.674419
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) setup( name='vss-python-api', version='0.9.7', url='https://github.com/SeraphimSerapis/libpyvss', author='Tim Messerschmidt', author_email="timmesserschmidt+vss@gmai...
true
true
1c08f28396e284634d1f5f684c801392e512572d
8,878
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/user/serializers.py
RignonNoel/django-init
4f00ec5f9ad8083a8dea5483c4e43712fceeba7a
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/user/serializers.py
RignonNoel/django-init
4f00ec5f9ad8083a8dea5483c4e43712fceeba7a
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/user/serializers.py
RignonNoel/django-init
4f00ec5f9ad8083a8dea5483c4e43712fceeba7a
[ "MIT" ]
1
2019-11-20T17:24:33.000Z
2019-11-20T17:24:33.000Z
import re from django.contrib.auth import get_user_model, password_validation from django.contrib.auth.models import Permission from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framewor...
28.546624
76
0.574792
import re from django.contrib.auth import get_user_model, password_validation from django.contrib.auth.models import Permission from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ from rest_framewor...
false
true
1c08f33fed38134ec3369aaa092bd95132fb7ca5
3,749
py
Python
src/pycity_scheduling/algorithms/central_optimization_algorithm.py
ElsevierSoftwareX/SOFTX-D-20-00087
d2d3f1effda2c0499cb05abf87435375a21379e3
[ "MIT" ]
4
2021-11-01T15:13:27.000Z
2022-01-16T18:01:06.000Z
src/pycity_scheduling/algorithms/central_optimization_algorithm.py
ElsevierSoftwareX/SOFTX-D-20-00087
d2d3f1effda2c0499cb05abf87435375a21379e3
[ "MIT" ]
2
2021-11-18T05:58:00.000Z
2022-01-19T16:46:20.000Z
src/pycity_scheduling/algorithms/central_optimization_algorithm.py
ElsevierSoftwareX/SOFTX-D-20-00087
d2d3f1effda2c0499cb05abf87435375a21379e3
[ "MIT" ]
5
2021-11-01T15:13:35.000Z
2022-02-03T21:28:48.000Z
""" The pycity_scheduling framework Copyright (C) 2022, Institute for Automation of Complex Power Systems (ACS), E.ON Energy Research Center (E.ON ERC), RWTH Aachen University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
44.105882
118
0.708189
import numpy as np import pyomo.environ as pyomo from pycity_scheduling.algorithms.algorithm import OptimizationAlgorithm, SolverNode from pycity_scheduling.solvers import DEFAULT_SOLVER, DEFAULT_SOLVER_OPTIONS class CentralOptimization(OptimizationAlgorithm): def __init__(self, city_district, solver=DEFAULT_S...
true
true
1c08f3ab8faa94b39b9c617b30e489e356f30fa2
1,780
py
Python
src/wormhole/test/test_xfer_util.py
Baeumla/magic-wormhole
1197e5fb6d37aef7c57872df71d42ebf1785fd53
[ "MIT" ]
3
2017-07-20T11:26:02.000Z
2021-09-01T22:36:26.000Z
src/wormhole/test/test_xfer_util.py
Baeumla/magic-wormhole
1197e5fb6d37aef7c57872df71d42ebf1785fd53
[ "MIT" ]
null
null
null
src/wormhole/test/test_xfer_util.py
Baeumla/magic-wormhole
1197e5fb6d37aef7c57872df71d42ebf1785fd53
[ "MIT" ]
1
2021-07-13T17:35:02.000Z
2021-07-13T17:35:02.000Z
from twisted.trial import unittest from twisted.internet import reactor, defer from twisted.internet.defer import inlineCallbacks from .. import xfer_util from .common import ServerBase APPID = u"appid" class Xfer(ServerBase, unittest.TestCase): @inlineCallbacks def test_xfer(self): code = u"1-code" ...
35.6
75
0.633708
from twisted.trial import unittest from twisted.internet import reactor, defer from twisted.internet.defer import inlineCallbacks from .. import xfer_util from .common import ServerBase APPID = u"appid" class Xfer(ServerBase, unittest.TestCase): @inlineCallbacks def test_xfer(self): code = u"1-code" ...
true
true
1c08f4ddd7a0584442dcf2e0a562f52777b7e42e
6,917
py
Python
testes_unitarios/tests/test_cobertura.py
Renanrbsc/Teste_unitario_Python
2001f7a69bc6e166c6afb8c073ab722d84d3b73a
[ "MIT" ]
null
null
null
testes_unitarios/tests/test_cobertura.py
Renanrbsc/Teste_unitario_Python
2001f7a69bc6e166c6afb8c073ab722d84d3b73a
[ "MIT" ]
null
null
null
testes_unitarios/tests/test_cobertura.py
Renanrbsc/Teste_unitario_Python
2001f7a69bc6e166c6afb8c073ab722d84d3b73a
[ "MIT" ]
null
null
null
# Começaremos os testes unitários como nas aulas anteriores e depois iremos conhecer um pouco sobre mock # Vamos então importar o framework padrão do python para testes from unittest import TestCase # Com o a classe TestCase, agora podemos herdar dela, tudo que precisamos para começar os testes # Vamos testar a clas...
56.235772
121
0.582044
from unittest import TestCase from app.mock.mock import VendinhaDoZe class TestIntroducaoAoMock(TestCase): def test_init(self): nova_vendinha_do_ze = VendinhaDoZe() self.assertIsIns...
true
true
1c08f64c1805afa30f9efee0f028ca3c7705a9f6
1,529
py
Python
code/clustering.py
valterlej/dvcusi
c886b6f3af783e59994eb934c838fe566ab35dc1
[ "MIT" ]
2
2022-02-13T21:49:48.000Z
2022-02-17T15:09:13.000Z
code/clustering.py
valterlej/dvcusi
c886b6f3af783e59994eb934c838fe566ab35dc1
[ "MIT" ]
1
2022-02-17T15:20:02.000Z
2022-02-17T15:20:02.000Z
code/clustering.py
valterlej/dvcusi
c886b6f3af783e59994eb934c838fe566ab35dc1
[ "MIT" ]
null
null
null
import os import numpy as np import time import pickle from sklearn.cluster import MiniBatchKMeans from tqdm import tqdm def mini_batch_k_means_clustering(inp_data, output_file="./data/cluster.pkl", epochs=5, n_clusters=1000, random_state=0, batch_size=20000, save_file=True): cluster = MiniBatchKMeans(n_clus...
36.404762
155
0.684761
import os import numpy as np import time import pickle from sklearn.cluster import MiniBatchKMeans from tqdm import tqdm def mini_batch_k_means_clustering(inp_data, output_file="./data/cluster.pkl", epochs=5, n_clusters=1000, random_state=0, batch_size=20000, save_file=True): cluster = MiniBatchKMeans(n_clus...
true
true
1c08f727861d10b5d0b9f57be591b0219c7f79f7
12,665
py
Python
huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/__init__.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/__init__.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/__init__.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import # import ProjectManClient from huaweicloudsdkprojectman.v4.projectman_client import ProjectManClient from huaweicloudsdkprojectman.v4.projectman_async_client import ProjectManAsyncClient # import models into sdk package from huaweicloudsdkprojectman.v4.model.add_...
95.94697
151
0.929728
from __future__ import absolute_import from huaweicloudsdkprojectman.v4.projectman_client import ProjectManClient from huaweicloudsdkprojectman.v4.projectman_async_client import ProjectManAsyncClient from huaweicloudsdkprojectman.v4.model.add_apply_join_project_for_agc_request import AddApplyJoinProjectForAgcRequest ...
true
true
1c08f8030c8b57ebd9e9aec5027cf328f9b253ed
2,918
py
Python
nova_plugin/flavor.py
jrzeszutek/cloudify-openstack-plugin
2d71d5b4e10f2eaa793e47f21ac8e9da87462a7a
[ "Apache-2.0" ]
null
null
null
nova_plugin/flavor.py
jrzeszutek/cloudify-openstack-plugin
2d71d5b4e10f2eaa793e47f21ac8e9da87462a7a
[ "Apache-2.0" ]
null
null
null
nova_plugin/flavor.py
jrzeszutek/cloudify-openstack-plugin
2d71d5b4e10f2eaa793e47f21ac8e9da87462a7a
[ "Apache-2.0" ]
null
null
null
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
29.77551
77
0.740918
from cloudify import ctx from cloudify.decorators import operation from openstack_plugin_common import ( with_nova_client, use_external_resource, delete_runtime_properties, delete_resource_and_runtime_properties, create_object_dict, add_list_to_runtime_properties, set_openstack_runtime_pro...
true
true
1c08f80e1506f56ab2cdff85d34452287a5d5de6
662
py
Python
refreshtoken/permissions.py
doordash/django-rest-framework-jwt-refresh-token
32037d253a684d4bad2d2868b51e85af7998b752
[ "MIT" ]
null
null
null
refreshtoken/permissions.py
doordash/django-rest-framework-jwt-refresh-token
32037d253a684d4bad2d2868b51e85af7998b752
[ "MIT" ]
null
null
null
refreshtoken/permissions.py
doordash/django-rest-framework-jwt-refresh-token
32037d253a684d4bad2d2868b51e85af7998b752
[ "MIT" ]
1
2018-03-07T05:56:36.000Z
2018-03-07T05:56:36.000Z
from rest_framework import permissions class IsOwnerOrAdmin(permissions.BasePermission): """ Only admins or owners can have permission """ def has_permission(self, request, view): return request.user and request.user.is_authenticated() def has_object_permission(self, request, view, obj): ...
30.090909
70
0.646526
from rest_framework import permissions class IsOwnerOrAdmin(permissions.BasePermission): def has_permission(self, request, view): return request.user and request.user.is_authenticated() def has_object_permission(self, request, view, obj): if not request.user.is_authenticated(): re...
true
true
1c08f8d26b173cd79716b4704a65b9f34801a6c3
767
py
Python
tests/common/cached_transformers_test.py
ammaddd/allennlp
3aafb927dda66f8efbf38e263e352df48bbad6b6
[ "Apache-2.0" ]
1
2020-09-21T15:31:40.000Z
2020-09-21T15:31:40.000Z
tests/common/cached_transformers_test.py
ammaddd/allennlp
3aafb927dda66f8efbf38e263e352df48bbad6b6
[ "Apache-2.0" ]
56
2020-03-14T21:10:07.000Z
2022-03-28T13:04:57.000Z
tests/common/cached_transformers_test.py
ammaddd/allennlp
3aafb927dda66f8efbf38e263e352df48bbad6b6
[ "Apache-2.0" ]
3
2020-09-22T17:35:53.000Z
2022-02-08T01:03:03.000Z
import pytest from allennlp.common import cached_transformers from allennlp.common.testing import AllenNlpTestCase class TestCachedTransformers(AllenNlpTestCase): def test_get_missing_from_cache_local_files_only(self): with pytest.raises((OSError, ValueError)): cached_transformers.get( ...
31.958333
69
0.642764
import pytest from allennlp.common import cached_transformers from allennlp.common.testing import AllenNlpTestCase class TestCachedTransformers(AllenNlpTestCase): def test_get_missing_from_cache_local_files_only(self): with pytest.raises((OSError, ValueError)): cached_transformers.get( ...
true
true
1c08f9268bb596ffec6561b9a6961b4ee3a6ccba
4,045
py
Python
lib/python3.8/site-packages/ansible_collections/theforeman/foreman/plugins/modules/image.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/theforeman/foreman/plugins/modules/image.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/theforeman/foreman/plugins/modules/image.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
2
2021-03-30T14:26:02.000Z
2021-04-01T18:17:29.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2020 Mark Hlawatschek (ATIX AG) # # 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, either version 3 of the License, or # (at your option) any later...
29.742647
113
0.687268
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: image version_added: 1.0.0 short_description: Manage Images description: - Create, update, and delete Images author: - "Mark Hlawatschek (@hlawatschek) ATIX AG" options: name: description: ...
true
true
1c08f96df493d4faaa5da5e4f84511f40b7773c0
2,009
py
Python
src/test/tests/databases/rect.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
src/test/tests/databases/rect.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
src/test/tests/databases/rect.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: rect.py # # Tests: rect files # # Programmer: Mark C. Miller # Date: May 15, 2008 # # Mark C. Miller, Thu Feb 12 01:30:24 PST 2009 # Added test for rectilinear mesh case. Re-enabled se...
22.829545
78
0.679443
TestSection("Curvilinear grid files") OpenDatabase(data_path("Rect_test_data/curv_data/datafile.rect")) AddPlot("Mesh","Mesh") DrawPlots() v=GetView3D() v.RotateAxis(1, 30.0) SetView3D(v) Test("rect_01") AddPlot("Pseudocolor","pressure") DrawPlots() Test("rect_02") TimeSliderNextState() Test("rect_03") silr = SIL...
true
true
1c08faa33eb85dffa9c559fabd27175389423659
1,216
py
Python
octavia_f5/restclient/as3objects/as3.py
sapcc/octavia-f5-provider-driver
979e19d011997547b4c50055c2834a0505477595
[ "Apache-2.0" ]
15
2020-01-23T16:06:52.000Z
2022-02-16T08:44:35.000Z
octavia_f5/restclient/as3objects/as3.py
sapcc/octavia-f5-provider-driver
979e19d011997547b4c50055c2834a0505477595
[ "Apache-2.0" ]
88
2019-12-09T11:14:40.000Z
2022-02-28T11:51:58.000Z
octavia_f5/restclient/as3objects/as3.py
sapcc/octavia-f5-provider-driver
979e19d011997547b4c50055c2834a0505477595
[ "Apache-2.0" ]
2
2020-03-23T16:21:54.000Z
2022-02-24T15:13:32.000Z
# Copyright 2020 SAP SE # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
27.636364
75
0.712171
import time from oslo_config import cfg from oslo_log import log as logging from octavia_f5.restclient.as3classes import AS3 CONF = cfg.CONF LAST_PERSIST = 0 LOG = logging.getLogger(__name__) def get_as3(): action = 'deploy' persist = False global LAST_PERSIST if CONF.f5_agent.persist_every == 0:...
true
true
1c08faadc63467063c5df64a2186b9656092536d
5,968
py
Python
provision/provision.py
DataBiosphere/dos-azul-lambda
d7def5aa9f77ebcaa558bd0e883d38eebe54ab4b
[ "Apache-2.0" ]
3
2018-04-24T21:14:32.000Z
2021-02-23T17:55:19.000Z
provision/provision.py
DataBiosphere/dos-azul-lambda
d7def5aa9f77ebcaa558bd0e883d38eebe54ab4b
[ "Apache-2.0" ]
106
2018-04-24T03:34:23.000Z
2018-12-07T22:20:27.000Z
provision/provision.py
DataBiosphere/dos-azul-lambda
d7def5aa9f77ebcaa558bd0e883d38eebe54ab4b
[ "Apache-2.0" ]
1
2018-10-04T16:37:58.000Z
2018-10-04T16:37:58.000Z
# -*- coding: utf-8 -*- """ $ provision/provision.py {setup,teardown,populate,raze} <domain> Domain is in the format short-name-here and NOT https://search-short-name-here-... """ import json import logging import os import string import sys import time import boto3 logging.basicConfig(level=logging.INFO) logger = l...
35.52381
83
0.643934
import json import logging import os import string import sys import time import boto3 logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) aws = boto3.client('es') obj_index = os.environ.get('DATA_OBJ_INDEX', 'fb_index') bdl_index = os.environ.get('DATA_BDL_INDEX', 'db_index') def getpath(...
true
true
1c08fb7a3c08c0f8b7f41a965e6ccc1f544c3cc3
191
py
Python
distpy/io_help/__init__.py
billmcchesney1/distpy
fa49d2a910b164514057ee75fa570397b7004159
[ "MIT" ]
23
2020-02-12T13:25:22.000Z
2022-01-19T07:09:39.000Z
distpy/io_help/__init__.py
billmcchesney1/distpy
fa49d2a910b164514057ee75fa570397b7004159
[ "MIT" ]
2
2020-03-09T11:24:00.000Z
2020-09-14T10:50:51.000Z
distpy/io_help/__init__.py
billmcchesney1/distpy
fa49d2a910b164514057ee75fa570397b7004159
[ "MIT" ]
11
2020-03-28T16:40:39.000Z
2021-07-30T16:02:12.000Z
from __future__ import division, absolute_import, print_function __all__ = ['witsmlfbe','io_helpers','h5_helpers', 'dirswap','sgy','directory_services', 'timeshift']
23.875
64
0.680628
from __future__ import division, absolute_import, print_function __all__ = ['witsmlfbe','io_helpers','h5_helpers', 'dirswap','sgy','directory_services', 'timeshift']
true
true
1c08fbe455d81b5693a7a31165f8e15979c0bd70
17,589
py
Python
ocimatic/dataset.py
OCIoficial/ocimatic
8e0a134059b2f2d0a2f3ef68253bb7fc046e6c84
[ "Beerware" ]
null
null
null
ocimatic/dataset.py
OCIoficial/ocimatic
8e0a134059b2f2d0a2f3ef68253bb7fc046e6c84
[ "Beerware" ]
14
2016-11-06T20:22:23.000Z
2021-12-09T21:19:40.000Z
ocimatic/dataset.py
OCIoficial/ocimatic
8e0a134059b2f2d0a2f3ef68253bb7fc046e6c84
[ "Beerware" ]
1
2020-10-11T04:47:41.000Z
2020-10-11T04:47:41.000Z
import os import random import re import shlex import shutil import string import subprocess import tempfile from pathlib import Path from typing import Any, Dict, List, Optional, Tuple from zipfile import ZipFile import ocimatic from ocimatic import ui from ocimatic.checkers import Checker from ocimatic.runnable impo...
40.249428
99
0.551822
import os import random import re import shlex import shutil import string import subprocess import tempfile from pathlib import Path from typing import Any, Dict, List, Optional, Tuple from zipfile import ZipFile import ocimatic from ocimatic import ui from ocimatic.checkers import Checker from ocimatic.runnable impo...
true
true
1c08fc04641e378564d6be08d272ad4642ac612d
1,182
py
Python
endpoints/api/__init__models_interface.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
2,027
2019-11-12T18:05:48.000Z
2022-03-31T22:25:04.000Z
endpoints/api/__init__models_interface.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
496
2019-11-12T18:13:37.000Z
2022-03-31T10:43:45.000Z
endpoints/api/__init__models_interface.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
249
2019-11-12T18:02:27.000Z
2022-03-22T12:19:19.000Z
from abc import ABCMeta, abstractmethod from six import add_metaclass @add_metaclass(ABCMeta) class InitDataInterface(object): """ Interface that represents all data store interactions required by __init__. """ @abstractmethod def is_app_repository(self, namespace_name, repository_name): ...
21.888889
89
0.604061
from abc import ABCMeta, abstractmethod from six import add_metaclass @add_metaclass(ABCMeta) class InitDataInterface(object): @abstractmethod def is_app_repository(self, namespace_name, repository_name): pass @abstractmethod def repository_is_public(self, namespace_name, repository_name): ...
true
true
1c08fc0e4dd189ca1d31a0f81df2f0f6df9c1311
8,996
py
Python
src/genie/libs/parser/viptela/show_system_status.py
jmedina0911/genieparser
2fcd6d3e44891551af4b9d05e2c053218ee25c32
[ "Apache-2.0" ]
4
2020-08-20T12:23:12.000Z
2021-06-15T14:10:02.000Z
src/genie/libs/parser/viptela/show_system_status.py
jmedina0911/genieparser
2fcd6d3e44891551af4b9d05e2c053218ee25c32
[ "Apache-2.0" ]
119
2020-07-10T22:37:51.000Z
2021-03-18T02:40:05.000Z
src/genie/libs/parser/viptela/show_system_status.py
jmedina0911/genieparser
2fcd6d3e44891551af4b9d05e2c053218ee25c32
[ "Apache-2.0" ]
2
2020-07-10T15:33:42.000Z
2021-04-05T09:48:56.000Z
''' * 'show system status' ''' # Metaparser from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Any, Or, Optional import genie.parsergen as pg import re # =========================================== # Schema for 'show system status' # =========================================== cl...
46.854167
258
0.44153
from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Any, Or, Optional import genie.parsergen as pg import re class ShowSystemStatusSchema(MetaParser): schema = { 'boot_loader_version': str, 'build': str, 'chassis_serial_number':...
true
true
1c08fd3c6fed59975489d8b1056d837e34b2ca51
365
py
Python
projects/training/filter-list.py
Valka7a/python-playground
f08d4374f2cec2e8b1afec3753854b1ec10ff480
[ "MIT" ]
null
null
null
projects/training/filter-list.py
Valka7a/python-playground
f08d4374f2cec2e8b1afec3753854b1ec10ff480
[ "MIT" ]
null
null
null
projects/training/filter-list.py
Valka7a/python-playground
f08d4374f2cec2e8b1afec3753854b1ec10ff480
[ "MIT" ]
null
null
null
""" sled nego.. imame slednoto L = ["cat", "dogs", "card", "frogs", "finger"] i trqbva da poluchish 3 koeto e broq na dumite koito imat dyljina koqto e chetna trqbva da se kombinira filter + reduce """ words = ["cat", "dogs", "card", "frogs", "finger"] def words_left(list): return len(filter(lambda word: len(wor...
20.277778
61
0.663014
""" sled nego.. imame slednoto L = ["cat", "dogs", "card", "frogs", "finger"] i trqbva da poluchish 3 koeto e broq na dumite koito imat dyljina koqto e chetna trqbva da se kombinira filter + reduce """ words = ["cat", "dogs", "card", "frogs", "finger"] def words_left(list): return len(filter(lambda word: len(wor...
false
true
1c08fd48c198394b1ce5171c46d8d6aa09e854fc
3,942
py
Python
atores.py
IvanParaty/pythonbirds
1a8aa418ba090d7b98c929a30d9369b029f59a0c
[ "MIT" ]
null
null
null
atores.py
IvanParaty/pythonbirds
1a8aa418ba090d7b98c929a30d9369b029f59a0c
[ "MIT" ]
null
null
null
atores.py
IvanParaty/pythonbirds
1a8aa418ba090d7b98c929a30d9369b029f59a0c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import math DESTRUIDO = 'Destruido' ATIVO = 'Ativo' GRAVIDADE = 10 # m/s^2 class Ator(): """ Classe que representa um ator. Ele representa um ponto cartesiano na tela. """ _caracter_ativo = 'A' _caracter_destruido = ' ' def _...
27.957447
118
0.642314
from __future__ import unicode_literals import math DESTRUIDO = 'Destruido' ATIVO = 'Ativo' GRAVIDADE = 10 class Ator(): _caracter_ativo = 'A' _caracter_destruido = ' ' def __init__(self, x=0, y=0): self.y = y self.x = x self.status = ATIVO def caracter(self): ret...
true
true
1c08fe1a5a88c3b77fd521c11bbfbe4e07446bde
403
py
Python
spotytube/openID.py
iTrollYou/WEB_Spotify_Youtube
5315cdf78361942bba0b52daa8b65d74998d2db5
[ "MIT" ]
null
null
null
spotytube/openID.py
iTrollYou/WEB_Spotify_Youtube
5315cdf78361942bba0b52daa8b65d74998d2db5
[ "MIT" ]
null
null
null
spotytube/openID.py
iTrollYou/WEB_Spotify_Youtube
5315cdf78361942bba0b52daa8b65d74998d2db5
[ "MIT" ]
null
null
null
# coding=utf-8 import sys from flask import Flask, render_template, request, redirect, Response import random, json app = Flask(__name__) @app.route('/logindata', methods = ['POST']) def worker(): data = request.get_json() result = '' for item in data: # loop over every row result += str...
18.318182
69
0.630273
import sys from flask import Flask, render_template, request, redirect, Response import random, json app = Flask(__name__) @app.route('/logindata', methods = ['POST']) def worker(): data = request.get_json() result = '' for item in data: result += str(item['make']) + '\n' return res...
true
true
1c09002de229d488d196277e09b695e098978546
3,429
py
Python
src/sentry/models/user.py
erhuabushuo/sentry
8b3bad10155aaacfdff80910e5972e64304e880c
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/user.py
erhuabushuo/sentry
8b3bad10155aaacfdff80910e5972e64304e880c
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/user.py
erhuabushuo/sentry
8b3bad10155aaacfdff80910e5972e64304e880c
[ "BSD-3-Clause" ]
null
null
null
""" sentry.models.user ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import warnings from django.contrib.auth.models import AbstractBaseUser from django.db import models from djang...
36.870968
78
0.664625
from __future__ import absolute_import import warnings from django.contrib.auth.models import AbstractBaseUser from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from sentry.db.models import Model from sentry.manager import UserManager class User(...
true
true
1c09002e9e40af62bb076c4833f5eb9708b4f78c
11,153
py
Python
conans/test/remote/rest_api_test.py
amatoshka/conan
c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a
[ "MIT" ]
null
null
null
conans/test/remote/rest_api_test.py
amatoshka/conan
c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a
[ "MIT" ]
null
null
null
conans/test/remote/rest_api_test.py
amatoshka/conan
c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a
[ "MIT" ]
null
null
null
import os import platform import unittest import requests from nose.plugins.attrib import attr from conans import DEFAULT_REVISION_V1 from conans.client.rest.rest_client import RestApiClient from conans.client.rest.rest_client_v1 import complete_url from conans.model.info import ConanInfo from conans.model.manifest i...
38.860627
97
0.654981
import os import platform import unittest import requests from nose.plugins.attrib import attr from conans import DEFAULT_REVISION_V1 from conans.client.rest.rest_client import RestApiClient from conans.client.rest.rest_client_v1 import complete_url from conans.model.info import ConanInfo from conans.model.manifest i...
true
true
1c09006f75c5bbf4de2eb7c535060508e21a9bf2
28,330
py
Python
airflow/models/dagbag.py
crhbolao/airflow_learning
59aa2e3b3b9bd54b44c6b620a2773a0078cb062a
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/models/dagbag.py
crhbolao/airflow_learning
59aa2e3b3b9bd54b44c6b620a2773a0078cb062a
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/models/dagbag.py
crhbolao/airflow_learning
59aa2e3b3b9bd54b44c6b620a2773a0078cb062a
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
41.539589
110
0.619202
import hashlib import importlib import importlib.machinery import importlib.util import os import sys import textwrap import traceback import warnings import zipfile from datetime import datetime, timedelta from typing import TYPE_CHECKING, Dict, List, NamedTuple, Optional, Union from croniter import CroniterBadCronE...
true
true
1c09007861e1d977ec7c4cc348af9901a7e79dbd
3,255
py
Python
meuPrimeiroProjeto/settings.py
RicardodeOliveira/meuPrimeiroProjeto
1f7b0c81fd6415184800efeafd51db9d3cddb82a
[ "Apache-2.0" ]
null
null
null
meuPrimeiroProjeto/settings.py
RicardodeOliveira/meuPrimeiroProjeto
1f7b0c81fd6415184800efeafd51db9d3cddb82a
[ "Apache-2.0" ]
null
null
null
meuPrimeiroProjeto/settings.py
RicardodeOliveira/meuPrimeiroProjeto
1f7b0c81fd6415184800efeafd51db9d3cddb82a
[ "Apache-2.0" ]
null
null
null
""" Django settings for meuPrimeiroProjeto project. Generated by 'django-admin startproject' using Django 2.1.7. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ i...
25.232558
91
0.697081
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'hn!ipi*l#v0bez6td3@uoqix#arf-@%p#(hh$o(qodj*)ww+!^' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c09013f3d7248603f4275a0b0e1a4da85f37e18
3,355
py
Python
src/data/gym/environment.py
grozail/faraday
39f6c1442c52ecb7d4a962044c38591ef09eca17
[ "MIT" ]
1
2018-11-23T19:16:29.000Z
2018-11-23T19:16:29.000Z
src/data/gym/environment.py
grozail/faraday
39f6c1442c52ecb7d4a962044c38591ef09eca17
[ "MIT" ]
null
null
null
src/data/gym/environment.py
grozail/faraday
39f6c1442c52ecb7d4a962044c38591ef09eca17
[ "MIT" ]
null
null
null
import numpy as np import gym from .trajectory import RandomTrajectoryGenerationProcess, trajectory_with_current_to_csv from .config import ControlConfiguration from src.visualization.tbx import board class SingleServoEnv(gym.GoalEnv): def __init__(self, process: RandomTrajectoryGenerationProcess,...
42.468354
123
0.626528
import numpy as np import gym from .trajectory import RandomTrajectoryGenerationProcess, trajectory_with_current_to_csv from .config import ControlConfiguration from src.visualization.tbx import board class SingleServoEnv(gym.GoalEnv): def __init__(self, process: RandomTrajectoryGenerationProcess,...
true
true