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
f773d94990baa2e0e26e492dc1263d3b63b00b64
843
py
Python
core/main/prefix.py
CaedenPH/JesterBot
0adb838723085599b6a15e3b76855a5f75628d77
[ "MIT" ]
15
2021-07-16T14:08:08.000Z
2022-03-25T17:27:27.000Z
core/main/prefix.py
CaedenPH/JesterBot
0adb838723085599b6a15e3b76855a5f75628d77
[ "MIT" ]
2
2022-02-05T11:24:10.000Z
2022-02-05T22:55:16.000Z
core/main/prefix.py
CaedenPH/JesterBot
0adb838723085599b6a15e3b76855a5f75628d77
[ "MIT" ]
6
2021-07-02T20:52:57.000Z
2022-02-20T11:15:06.000Z
import json from disnake.ext import commands def get_prefix(bot, message): try: with open("./dicts/prefixes.json") as fin: prefixes = json.load(fin) pref = '' if str(message.guild.id) in prefixes: if str(message.author.id) in prefixes: pref = prefi...
27.193548
65
0.540925
import json from disnake.ext import commands def get_prefix(bot, message): try: with open("./dicts/prefixes.json") as fin: prefixes = json.load(fin) pref = '' if str(message.guild.id) in prefixes: if str(message.author.id) in prefixes: pref = prefi...
true
true
f773d97e4719013849e736d010d2ed6cdb3be4eb
298
py
Python
mjt/mjt/doctype/greige_mending_form/greige_mending_form_dashboard.py
hamzaali15/mjt
20ef7812d942644ade9c390d17075deacf1d2757
[ "MIT" ]
null
null
null
mjt/mjt/doctype/greige_mending_form/greige_mending_form_dashboard.py
hamzaali15/mjt
20ef7812d942644ade9c390d17075deacf1d2757
[ "MIT" ]
null
null
null
mjt/mjt/doctype/greige_mending_form/greige_mending_form_dashboard.py
hamzaali15/mjt
20ef7812d942644ade9c390d17075deacf1d2757
[ "MIT" ]
1
2021-08-11T08:15:01.000Z
2021-08-11T08:15:01.000Z
from __future__ import unicode_literals from frappe import _ def get_data(): return { 'fieldname': 'greige_mending_form', 'transactions': [ { 'label': _('Purchase Receipt'), 'items': ['Purchase Receipt'] } ] }
22.923077
47
0.506711
from __future__ import unicode_literals from frappe import _ def get_data(): return { 'fieldname': 'greige_mending_form', 'transactions': [ { 'label': _('Purchase Receipt'), 'items': ['Purchase Receipt'] } ] }
true
true
f773daf75a70b871f404c7f3d0f21e7051f4d9e6
103
py
Python
backend/__init__.py
hawzie197/flask-react-skeleton
18cb4ba5729e6d58e650bfde7b08a37a7bf963e9
[ "MIT" ]
1
2019-02-12T15:30:27.000Z
2019-02-12T15:30:27.000Z
backend/__init__.py
hawzie197/flask-react-skeleton
18cb4ba5729e6d58e650bfde7b08a37a7bf963e9
[ "MIT" ]
null
null
null
backend/__init__.py
hawzie197/flask-react-skeleton
18cb4ba5729e6d58e650bfde7b08a37a7bf963e9
[ "MIT" ]
null
null
null
from flask_io import FlaskIO from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() io = FlaskIO()
17.166667
39
0.796117
from flask_io import FlaskIO from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() io = FlaskIO()
true
true
f773dcb56310ac61f87fc4dfd67d3c9cb88cc194
5,386
py
Python
src/streamlink/plugins/showroom.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
5
2019-07-26T17:03:26.000Z
2020-10-17T23:23:43.000Z
src/streamlink/plugins/showroom.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
9
2018-01-14T15:20:23.000Z
2021-03-08T20:29:51.000Z
src/streamlink/plugins/showroom.py
hymer-up/streamlink
f09bf6e04cddc78eceb9ded655f716ef3ee4b84f
[ "BSD-2-Clause" ]
4
2018-01-14T13:27:25.000Z
2021-11-15T22:28:30.000Z
# -*- coding: utf-8 -*- import re from streamlink.plugin import Plugin from streamlink.plugin.api import validate, useragents from streamlink.stream import HLSStream, RTMPStream from streamlink.stream.hls import HLSStreamReader, HLSStreamWorker _url_re = re.compile(r'''^https?:// (?:\w*.)? showroom-live.com/ ...
29.756906
100
0.601745
import re from streamlink.plugin import Plugin from streamlink.plugin.api import validate, useragents from streamlink.stream import HLSStream, RTMPStream from streamlink.stream.hls import HLSStreamReader, HLSStreamWorker _url_re = re.compile(r'''^https?:// (?:\w*.)? showroom-live.com/ (?: (?P<room...
true
true
f773dcf9f651b7417ebff5fffed43d1ea766f04a
281
py
Python
aisscv/__RepoPath__.py
jo-jstrm/Damaged-Package-Detection
6d15a4122ca1ab992d3cdc88b13a0363baaa91c7
[ "MIT" ]
1
2022-02-19T18:41:33.000Z
2022-02-19T18:41:33.000Z
aisscv/__RepoPath__.py
jo-jstrm/Damaged-Package-Detection
6d15a4122ca1ab992d3cdc88b13a0363baaa91c7
[ "MIT" ]
2
2022-01-05T17:55:15.000Z
2022-01-05T17:55:29.000Z
aisscv/__RepoPath__.py
jo-jstrm/Damaged-Package-Detection
6d15a4122ca1ab992d3cdc88b13a0363baaa91c7
[ "MIT" ]
null
null
null
import os """ Get the current absolute path to the Repository on your system. Usefull for handling data and tests while being agnostic to current work dir """ path = os.path.abspath(os.getcwd()) while 'aisscv' in path: path = os.path.abspath(path+'/..') __RepoPath__ = path
25.545455
76
0.72242
import os path = os.path.abspath(os.getcwd()) while 'aisscv' in path: path = os.path.abspath(path+'/..') __RepoPath__ = path
true
true
f773dd497a87e1511521ff05dc536bcdf9adfe8d
492
py
Python
aoc2019/day22/dealit.py
shoreofwonder/adventofcode
15fd2f761533a48b456e510b0a59f7cbc64e8e91
[ "MIT" ]
null
null
null
aoc2019/day22/dealit.py
shoreofwonder/adventofcode
15fd2f761533a48b456e510b0a59f7cbc64e8e91
[ "MIT" ]
null
null
null
aoc2019/day22/dealit.py
shoreofwonder/adventofcode
15fd2f761533a48b456e510b0a59f7cbc64e8e91
[ "MIT" ]
null
null
null
def deal_day1(src, dest): n = len(src) for i in range(n): dest[n-i-1] = src[i] def deal_one(src_pos, stack_size): return stack_size-src_pos-1 def inv_deal_one(src_pos=None, deck_size=None): # well, that's easy to invert... return deck_size-src_pos-1 def inv_deal_all(src, dest): de...
19.68
58
0.648374
def deal_day1(src, dest): n = len(src) for i in range(n): dest[n-i-1] = src[i] def deal_one(src_pos, stack_size): return stack_size-src_pos-1 def inv_deal_one(src_pos=None, deck_size=None): return deck_size-src_pos-1 def inv_deal_all(src, dest): deal_all(src, dest) # EZ def dea...
true
true
f773de0724ab483806acd5da7ccbbea3d3fb88f5
16,044
py
Python
custom_2.py
Tchiik/CompViz
b0a94cbf360e04cc4bcac261ae435eff462aa625
[ "MIT" ]
null
null
null
custom_2.py
Tchiik/CompViz
b0a94cbf360e04cc4bcac261ae435eff462aa625
[ "MIT" ]
null
null
null
custom_2.py
Tchiik/CompViz
b0a94cbf360e04cc4bcac261ae435eff462aa625
[ "MIT" ]
null
null
null
""" Mask R-CNN Train on the toy bottle dataset and implement color splash effect. Copyright (c) 2018 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla ------------------------------------------------------------ Usage: import the module (see Jupyter notebooks for exampl...
39.420147
132
0.578035
import os import sys import json import datetime import numpy as np import skimage.draw import cv2 from mrcnn.visualize import display_instances import matplotlib.pyplot as plt ROOT_DIR = '/content/drive/My Drive/CompViz/' sys.path.append(ROOT_DIR) from mrcnn.config import Config from mrcnn import model as modellib...
true
true
f773de0a2dbac56c4174570edf1c46495e7a7216
890
py
Python
migrations/versions/4dd64e951c80_.py
jb3rndt/flask-wol-api
e06a59df0638d2f54a37b4d23bf5c07fb038e31e
[ "MIT" ]
null
null
null
migrations/versions/4dd64e951c80_.py
jb3rndt/flask-wol-api
e06a59df0638d2f54a37b4d23bf5c07fb038e31e
[ "MIT" ]
null
null
null
migrations/versions/4dd64e951c80_.py
jb3rndt/flask-wol-api
e06a59df0638d2f54a37b4d23bf5c07fb038e31e
[ "MIT" ]
null
null
null
"""empty message Revision ID: 4dd64e951c80 Revises: Create Date: 2020-09-16 12:37:40.312182 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '4dd64e951c80' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
24.722222
65
0.67191
from alembic import op import sqlalchemy as sa revision = '4dd64e951c80' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('presets', sa.Column('id', sa.Integer(), nullable=False), sa.Column('mac_address', sa.String(), nullable=True), sa.Column('ip_or_hos...
true
true
f773dff75495e37bf0f9a25f7da1ea3ea1bdeeb5
1,556
py
Python
core/nearest.py
CubicZebra/anomalydetect
ec571b47569f491f72abc9736097fb30f9289f46
[ "Apache-2.0" ]
null
null
null
core/nearest.py
CubicZebra/anomalydetect
ec571b47569f491f72abc9736097fb30f9289f46
[ "Apache-2.0" ]
null
null
null
core/nearest.py
CubicZebra/anomalydetect
ec571b47569f491f72abc9736097fb30f9289f46
[ "Apache-2.0" ]
null
null
null
import numpy as np from basic.types import vector, matrix from typing import Optional from basic.tests import dt # print(dt) # print(dt.mean(axis=0)) _ptr = np.array([1, 1, 4, 4, 8]) # print(dt - _ptr) def _is_broadcastable(x: matrix, _x: vector) -> Optional[TypeError]: if x.shape[1] != _x.shape[0]: r...
23.223881
83
0.627249
import numpy as np from basic.types import vector, matrix from typing import Optional from basic.tests import dt _ptr = np.array([1, 1, 4, 4, 8]) def _is_broadcastable(x: matrix, _x: vector) -> Optional[TypeError]: if x.shape[1] != _x.shape[0]: raise TypeError(r'arg {} is not broadcastable to target m...
true
true
f773e0720905a0a7ab932336e6e160f1df9e866d
252
py
Python
05_debugging/solutions/bug_04.py
ASU-CompMethodsPhysics-PHY494/PHY494-resources-2018
635a6678569406e11865c8a583a56f4a3cf2bdc4
[ "CC-BY-4.0" ]
null
null
null
05_debugging/solutions/bug_04.py
ASU-CompMethodsPhysics-PHY494/PHY494-resources-2018
635a6678569406e11865c8a583a56f4a3cf2bdc4
[ "CC-BY-4.0" ]
null
null
null
05_debugging/solutions/bug_04.py
ASU-CompMethodsPhysics-PHY494/PHY494-resources-2018
635a6678569406e11865c8a583a56f4a3cf2bdc4
[ "CC-BY-4.0" ]
null
null
null
# bug 4 # http://asu-compmethodsphysics-phy494.github.io/ASU-PHY494/2018/02/01/05_Debugging/#activity-fix-as-many-bugs-as-possible # Define the sinc-function sinc(x) = \sin(x)/x: import math def sinc(x): return math.sin(x)/x print(sinc(3.145))
19.384615
122
0.714286
import math def sinc(x): return math.sin(x)/x print(sinc(3.145))
true
true
f773e4c42ad7081bb4eba0bbb05d7e1451258293
7,934
py
Python
software/openvisualizer/openvisualizer/BspEmulator/BspSctimer.py
pedrohenriquegomes/openwsn-sw
24761e01dc1e8dbc351e61bd927c57facc64c155
[ "BSD-3-Clause" ]
26
2015-01-31T23:56:36.000Z
2021-04-10T20:26:11.000Z
software/openvisualizer/openvisualizer/BspEmulator/BspSctimer.py
pedrohenriquegomes/openwsn-sw
24761e01dc1e8dbc351e61bd927c57facc64c155
[ "BSD-3-Clause" ]
33
2015-03-18T15:54:01.000Z
2018-03-08T14:28:50.000Z
software/openvisualizer/openvisualizer/BspEmulator/BspSctimer.py
pedrohenriquegomes/openwsn-sw
24761e01dc1e8dbc351e61bd927c57facc64c155
[ "BSD-3-Clause" ]
80
2015-01-07T08:54:58.000Z
2020-05-06T21:33:41.000Z
#!/usr/bin/python # Copyright (c) 2010-2013, Regents of the University of California. # All rights reserved. # # Released under the BSD 3-Clause license as published at the link below. # https://openwsn.atlassian.net/wiki/display/OW/License import logging from openvisualizer.SimEngine import SimEngine import o...
31.991935
129
0.56365
import logging from openvisualizer.SimEngine import SimEngine import openvisualizer.openvisualizer_utils as u import BspModule class BspSctimer(BspModule.BspModule): ''' Emulates the 'sctimer' BSP module. ''' INTR_COMPARE = 'sctimer.compare' INTR_OVERFLOW = 'sctimer.overflow' ROLLOVE...
false
true
f773e4f9b7b5b99b8cac57239124e7256ec40845
377
py
Python
data_acquisition/spotify_api_test.py
marcuusmelo/tendencias_musicais
d48adc53a2428e901712088176608a2a951827a5
[ "MIT" ]
null
null
null
data_acquisition/spotify_api_test.py
marcuusmelo/tendencias_musicais
d48adc53a2428e901712088176608a2a951827a5
[ "MIT" ]
null
null
null
data_acquisition/spotify_api_test.py
marcuusmelo/tendencias_musicais
d48adc53a2428e901712088176608a2a951827a5
[ "MIT" ]
1
2020-06-24T20:34:20.000Z
2020-06-24T20:34:20.000Z
import unittest from spotify_api import SpotifyAPI class TestSpotifyAPI(unittest.TestCase): def test_authentication_bad_credentials(self): spotify_api = SpotifyAPI('', '') received_token = spotify_api.authentication() expected_token = '' self.assertEqual(received_token, expected...
20.944444
56
0.713528
import unittest from spotify_api import SpotifyAPI class TestSpotifyAPI(unittest.TestCase): def test_authentication_bad_credentials(self): spotify_api = SpotifyAPI('', '') received_token = spotify_api.authentication() expected_token = '' self.assertEqual(received_token, expected...
true
true
f773e5a6d133917ecb93fdc0a986f9b26f62890a
2,162
py
Python
lib/sqlalchemy/dialects/sybase/pyodbc.py
smarkets/sqlalchemy
9c96d96d0fe558d625755277e0b23a7bc82cd148
[ "MIT" ]
2
2015-11-05T09:43:45.000Z
2017-05-31T14:22:02.000Z
venv/lib/python2.7/site-packages/sqlalchemy/dialects/sybase/pyodbc.py
wbonack/witty-name
07a4babed5b4ff4846c10268a65975c6c800de2b
[ "BSD-3-Clause" ]
4
2017-10-24T22:44:01.000Z
2017-10-24T22:44:19.000Z
venv/lib/python2.7/site-packages/sqlalchemy/dialects/sybase/pyodbc.py
wbonack/witty-name
07a4babed5b4ff4846c10268a65975c6c800de2b
[ "BSD-3-Clause" ]
1
2021-03-25T00:26:15.000Z
2021-03-25T00:26:15.000Z
# sybase/pyodbc.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sybase+pyodbc :name: PyODBC :dbapi: pyodbc :connectstrin...
25.435294
84
0.654949
from sqlalchemy.dialects.sybase.base import SybaseDialect,\ SybaseExecutionContext from sqlalchemy.connectors.pyodbc import PyODBCConnector from sqlalchemy import types as sqltypes, processors import decimal class _SybNumeric_pyodbc(sqltypes.Numeric): def bind_proces...
true
true
f773e5ca468d23beb9c8a5fe77c7f5d64277e7c8
7,801
py
Python
docs/conf.py
antikytheraton/trading-bot
d364bbc24c7d374962cfc2eebed8d3b88ef57bcf
[ "MIT" ]
null
null
null
docs/conf.py
antikytheraton/trading-bot
d364bbc24c7d374962cfc2eebed8d3b88ef57bcf
[ "MIT" ]
null
null
null
docs/conf.py
antikytheraton/trading-bot
d364bbc24c7d374962cfc2eebed8d3b88ef57bcf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # trading-bot documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values ha...
31.840816
80
0.706832
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'trading-bot' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # The full version, including alp...
true
true
f773e7e5dc3f5ce301cd939bdd4af9b575da0957
732
py
Python
setup.py
PaccMann/reinvent_models
8e5288dc143bc9c99880100801c36aea5a77b912
[ "MIT" ]
null
null
null
setup.py
PaccMann/reinvent_models
8e5288dc143bc9c99880100801c36aea5a77b912
[ "MIT" ]
null
null
null
setup.py
PaccMann/reinvent_models
8e5288dc143bc9c99880100801c36aea5a77b912
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="reinvent_models", version="0.0.7", author="PaccMann Team", description="Generative models for Reinvent adapted for PaccMann", long_description=long_description, long_descrip...
31.826087
71
0.651639
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="reinvent_models", version="0.0.7", author="PaccMann Team", description="Generative models for Reinvent adapted for PaccMann", long_description=long_description, long_descrip...
true
true
f773e98bb3225802b2cc0f0a9b8acfa69b8d86e6
58,506
py
Python
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/nfp_node_driver.py
mr-smart/group-based-policy
e3fac66aa2d1eb3afd713ff763259e85f0e461af
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/nfp_node_driver.py
mr-smart/group-based-policy
e3fac66aa2d1eb3afd713ff763259e85f0e461af
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/services/servicechain/plugins/ncp/node_drivers/nfp_node_driver.py
mr-smart/group-based-policy
e3fac66aa2d1eb3afd713ff763259e85f0e461af
[ "Apache-2.0" ]
1
2019-12-03T15:28:24.000Z
2019-12-03T15:28:24.000Z
# 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 # distributed under the...
45.494557
79
0.610057
import eventlet from eventlet import greenpool import six import sys import threading from keystoneclient import exceptions as k_exceptions from keystoneclient.v2_0 import client as keyclient from neutron.common import rpc as n_rpc from neutron.plugins.common import constants as pconst from neutron_lib.db import mode...
true
true
f773e99a0fdf163b8ffb02431f89d5073d4eb956
48,070
py
Python
django/db/models/expressions.py
hashlash/django
3baf92cf8230ad3a932986170fd07c8feae7ff2f
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
5
2020-07-04T09:43:05.000Z
2022-02-23T12:22:24.000Z
django/db/models/expressions.py
Warlockk/django
e12fea24f06f8911ddc2af1d6cbfb1adb529c1f2
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/db/models/expressions.py
Warlockk/django
e12fea24f06f8911ddc2af1d6cbfb1adb529c1f2
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
1
2020-06-24T10:24:20.000Z
2020-06-24T10:24:20.000Z
import copy import datetime import inspect from decimal import Decimal from django.core.exceptions import EmptyResultSet, FieldError from django.db import NotSupportedError, connection from django.db.models import fields from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import Q from ...
35.980539
110
0.639401
import copy import datetime import inspect from decimal import Decimal from django.core.exceptions import EmptyResultSet, FieldError from django.db import NotSupportedError, connection from django.db.models import fields from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import Q from ...
true
true
f773e9c4e72e8ed892bc814ec56fcbea3569ad7b
1,771
py
Python
databricks_sync/sdk/service/cluster_policies.py
OliverJG/databricks-sync
2a1ebfe8a8462d6e27c93682124cf08b2baea02c
[ "Apache-2.0" ]
20
2020-11-13T22:19:02.000Z
2022-01-21T22:17:31.000Z
databricks_sync/sdk/service/cluster_policies.py
OliverJG/databricks-sync
2a1ebfe8a8462d6e27c93682124cf08b2baea02c
[ "Apache-2.0" ]
54
2020-11-17T19:50:59.000Z
2022-03-29T21:31:34.000Z
databricks_sync/sdk/service/cluster_policies.py
OliverJG/databricks-sync
2a1ebfe8a8462d6e27c93682124cf08b2baea02c
[ "Apache-2.0" ]
6
2020-12-03T18:03:22.000Z
2022-02-19T20:21:26.000Z
class PolicyService(object): def __init__(self, client): self.client = client def list_policies(self, headers=None): _data = {} return self.client.perform_query('GET', '/policies/clusters/list', data=_data, headers=headers) @staticmethod def policy_to_full_dict(policy): ...
36.895833
106
0.636928
class PolicyService(object): def __init__(self, client): self.client = client def list_policies(self, headers=None): _data = {} return self.client.perform_query('GET', '/policies/clusters/list', data=_data, headers=headers) @staticmethod def policy_to_full_dict(policy): ...
true
true
f773eacf4f20808f8967780de7cf282357d0d8dc
173
py
Python
day_2/factorial.py
anishLearnsToCode/ml-workshop-wac-3
062568c9229d9da61c83b0ae343e7834d8e81916
[ "MIT" ]
2
2021-02-02T16:42:58.000Z
2021-11-28T15:42:53.000Z
day_2/factorial.py
anishLearnsToCode/ml-workshop-wac-3
062568c9229d9da61c83b0ae343e7834d8e81916
[ "MIT" ]
null
null
null
day_2/factorial.py
anishLearnsToCode/ml-workshop-wac-3
062568c9229d9da61c83b0ae343e7834d8e81916
[ "MIT" ]
null
null
null
""" N! = 1 * 2 * 3 * ... * N 0! = 1! = 1 """ N = int(input()) i = 1 result = 1 while i <= N: result *= i i += 1 print(result) """ N = 0 i = 1 result = 1 1 """
7.208333
24
0.375723
N = int(input()) i = 1 result = 1 while i <= N: result *= i i += 1 print(result)
true
true
f773eb954f760d5fec4469a44161d24852d896d1
7,070
py
Python
forte/processors/base/writers.py
cz9779/forte
3993835fa7d7f5427f4999d3a6df13a30bf2c73a
[ "Apache-2.0" ]
null
null
null
forte/processors/base/writers.py
cz9779/forte
3993835fa7d7f5427f4999d3a6df13a30bf2c73a
[ "Apache-2.0" ]
null
null
null
forte/processors/base/writers.py
cz9779/forte
3993835fa7d7f5427f4999d3a6df13a30bf2c73a
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Forte Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
33.037383
80
0.645403
import gzip import json import logging import os from abc import abstractmethod, ABC from typing import Optional, Any, Dict import posixpath from forte.common.configuration import Config from forte.common.resources import Resources from forte.data.base_pack import BasePack from forte.data.data_pack import DataPack fro...
true
true
f773ec51ae3f785262e963590a741c92d9fb1383
14,070
py
Python
demo.py
Liang-ZX/Stereo-Mask-RCNN
c7c53062eacca4511fd4d091bea41cd7b5cf100d
[ "MIT" ]
null
null
null
demo.py
Liang-ZX/Stereo-Mask-RCNN
c7c53062eacca4511fd4d091bea41cd7b5cf100d
[ "MIT" ]
null
null
null
demo.py
Liang-ZX/Stereo-Mask-RCNN
c7c53062eacca4511fd4d091bea41cd7b5cf100d
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick # Modified by Peiliang Li for Stereo RCNN demo # -------------------------------------------------------...
40.782609
114
0.655864
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths import os import sys import numpy as np import argparse import shutil import time import cv2 import torch from torch.autograd import Variable import torch.nn as nn import torch.optim as opti...
true
true
f773ecbc960ebf0bc6fa07688c90908c1c0d3f22
1,368
py
Python
python/code_challenges/graph/graph.py
brendanwelzien/data-structures-and-algorithms
0bffe825e34de2e5c072b1e6b6c2cb1d7d1d61f5
[ "MIT" ]
null
null
null
python/code_challenges/graph/graph.py
brendanwelzien/data-structures-and-algorithms
0bffe825e34de2e5c072b1e6b6c2cb1d7d1d61f5
[ "MIT" ]
1
2020-11-10T01:31:39.000Z
2020-11-10T01:31:39.000Z
python/code_challenges/graph/graph.py
brendanwelzien/data-structures-and-algorithms
0bffe825e34de2e5c072b1e6b6c2cb1d7d1d61f5
[ "MIT" ]
null
null
null
class Graph: def __init__(self): self.adjacency_list = {} def __len__(self): return len(self.adjacency_list) # returns number of keys from list def add_node(self, value): node = Vertex(value) self.adjacency_list[node] = [] return node def add_edge(self, ...
26.307692
65
0.61038
class Graph: def __init__(self): self.adjacency_list = {} def __len__(self): return len(self.adjacency_list) def add_node(self, value): node = Vertex(value) self.adjacency_list[node] = [] return node def add_edge(self, starting_vertex, ending_vertex, wei...
false
true
f773eda260687c2884ff272c5768a9628570706f
270
py
Python
confobj/config_dict.py
datasets-org/config
f21f2eefcacc45095210bcb4ddd315bda43481d5
[ "MIT" ]
null
null
null
confobj/config_dict.py
datasets-org/config
f21f2eefcacc45095210bcb4ddd315bda43481d5
[ "MIT" ]
null
null
null
confobj/config_dict.py
datasets-org/config
f21f2eefcacc45095210bcb4ddd315bda43481d5
[ "MIT" ]
null
null
null
from typing import Any from .config_base import ConfigBase class ConfigDict(ConfigBase): def __init__(self, data): # type: (dict) -> None self.__conf = data def get(self, key): # type: (str) -> Any return self.__conf.get(key)
19.285714
35
0.611111
from typing import Any from .config_base import ConfigBase class ConfigDict(ConfigBase): def __init__(self, data): self.__conf = data def get(self, key): return self.__conf.get(key)
true
true
f773f0267da35db1f779896efb42d2ce06c8790a
786
py
Python
ag/vipy/__init__.py
lannocc/vipy
c86f9217430c386f3c650a5c606a60b166f35d95
[ "MIT" ]
null
null
null
ag/vipy/__init__.py
lannocc/vipy
c86f9217430c386f3c650a5c606a60b166f35d95
[ "MIT" ]
null
null
null
ag/vipy/__init__.py
lannocc/vipy
c86f9217430c386f3c650a5c606a60b166f35d95
[ "MIT" ]
null
null
null
# Copyright (C) 2019 Alpha Griffin # @%@~LICENSE~@%@ """A vim-like editor in Python. A Python module providing an interactive text-mode editor that (partially) mimics the vim editor. .. module:: ag.vipy :platform: Unix :synopsis: A vim-like editor in Python .. moduleauthor:: Shawn Wilson <lannocc@alphagriffin....
20.153846
57
0.689567
from .__version__ import __version__ from .buffer import MemoryBuffer from .viewer import TerminalView from .hotmode import read_action def run(filename=None): print("vipy v{} startup".format(__version__)) buf = MemoryBuffer() view = TerminalView() if filename: buf.load(filename) ...
true
true
f773f05dc5e740fd21a0eb862cef1a092efb6308
22,423
py
Python
sympy/geometry/tests/test_ellipse.py
OscarXing/sympy
97cb7b2d02716a7e29514fe5728bb86b5067acb7
[ "BSD-3-Clause" ]
1
2021-06-22T23:27:55.000Z
2021-06-22T23:27:55.000Z
sympy/geometry/tests/test_ellipse.py
QuantumNovice/sympy
8a7dc8ef786cccbd7dc0fe0b0e6beec4dd1f7b49
[ "BSD-3-Clause" ]
null
null
null
sympy/geometry/tests/test_ellipse.py
QuantumNovice/sympy
8a7dc8ef786cccbd7dc0fe0b0e6beec4dd1f7b49
[ "BSD-3-Clause" ]
null
null
null
from sympy import Eq, Rational, S, Symbol, symbols, pi, sqrt, oo, Point2D, Segment2D, Abs from sympy.geometry import (Circle, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, intersection) from sympy.testing.pytest import raise...
42.387524
122
0.585827
from sympy import Eq, Rational, S, Symbol, symbols, pi, sqrt, oo, Point2D, Segment2D, Abs from sympy.geometry import (Circle, Ellipse, GeometryError, Line, Point, Polygon, Ray, RegularPolygon, Segment, Triangle, intersection) from sympy.testing.pytest import raise...
true
true
f773f207f84b0d241c66941990f75d1136fbcea6
581
py
Python
app.py
irth/TaskGraph
43982012e2df891a1c5cbc43dfb97847da707c01
[ "MIT" ]
null
null
null
app.py
irth/TaskGraph
43982012e2df891a1c5cbc43dfb97847da707c01
[ "MIT" ]
3
2021-03-31T20:01:52.000Z
2021-12-13T20:49:15.000Z
app.py
irth/TaskGraph
43982012e2df891a1c5cbc43dfb97847da707c01
[ "MIT" ]
null
null
null
import string from flask import Flask, render_template, request, flash from flask_migrate import Migrate import models import auth import sources app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///dev.sqlite" app.config["SECRET_KEY"] = "2137 papiez" app.register_blueprint(auth.blueprint) app.r...
18.741935
62
0.755594
import string from flask import Flask, render_template, request, flash from flask_migrate import Migrate import models import auth import sources app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///dev.sqlite" app.config["SECRET_KEY"] = "2137 papiez" app.register_blueprint(auth.blueprint) app.r...
true
true
f773f22db5aa0c4abeb0c0e90aa82b85189d6e0d
8,541
py
Python
airflow/_vendor/cgroupspy/trees.py
JGoldman110/airflow
93e2c945b1be5b7c9700e780d2aa67846503763b
[ "Apache-2.0" ]
52
2015-01-12T23:19:40.000Z
2022-01-18T21:22:47.000Z
airflow/_vendor/cgroupspy/trees.py
JGoldman110/airflow
93e2c945b1be5b7c9700e780d2aa67846503763b
[ "Apache-2.0" ]
11
2015-02-03T13:41:38.000Z
2022-03-28T19:27:26.000Z
airflow/_vendor/cgroupspy/trees.py
JGoldman110/airflow
93e2c945b1be5b7c9700e780d2aa67846503763b
[ "Apache-2.0" ]
27
2015-02-03T12:38:57.000Z
2022-03-13T12:34:48.000Z
""" Copyright (c) 2014, CloudSigma AG All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
34.578947
117
0.626859
import os from .nodes import Node, NodeControlGroup, NodeVM from .utils import walk_tree, walk_up_tree, split_path_components class BaseTree(object): def __init__(self, root_path=b"/sys/fs/cgroup/", groups=None, sub_groups=None): if isinstance(root_path, str): root_path = root_path.encode()...
true
true
f773f30f3f759cb12d1dec02316f64e2c9e21ff8
2,292
py
Python
aesara/misc/safe_asarray.py
fshart/aesara
1ddf96a7b8e8503fb8773b09c3ca77483fd884c4
[ "BSD-3-Clause" ]
111
2021-01-29T06:12:58.000Z
2021-06-04T20:27:51.000Z
aesara/misc/safe_asarray.py
fshart/aesara
1ddf96a7b8e8503fb8773b09c3ca77483fd884c4
[ "BSD-3-Clause" ]
253
2020-02-07T15:19:38.000Z
2021-01-27T20:26:55.000Z
aesara/misc/safe_asarray.py
fshart/aesara
1ddf96a7b8e8503fb8773b09c3ca77483fd884c4
[ "BSD-3-Clause" ]
38
2020-07-20T12:09:06.000Z
2021-01-27T13:38:50.000Z
""" Helper function to safely convert an array to a new data type. """ import numpy as np from aesara.configdefaults import config __docformat__ = "restructuredtext en" def _asarray(a, dtype, order=None): """Convert the input to a Numpy array. This function is almost identical to ``numpy.asarray``, but ...
38.847458
90
0.652705
import numpy as np from aesara.configdefaults import config __docformat__ = "restructuredtext en" def _asarray(a, dtype, order=None): if str(dtype) == "floatX": dtype = config.floatX dtype = np.dtype(dtype) rval = np.asarray(a, dtype=dtype, order=order) if rval.dtype.num ...
true
true
f773f31abf40b58faf5b7f6c7df912931e1de683
83
py
Python
krprj/settings/__init__.py
kirchenreich/kirchenreich
b4f9e4c78e440660d73d92ef9895dc09aaa32cae
[ "BSD-3-Clause" ]
3
2016-01-18T03:45:49.000Z
2019-09-12T06:49:40.000Z
krprj/settings/__init__.py
kod3r/kirchenreich
7021d9f8edd8828cbb42f32f7fbfafcdb74353ab
[ "BSD-3-Clause" ]
null
null
null
krprj/settings/__init__.py
kod3r/kirchenreich
7021d9f8edd8828cbb42f32f7fbfafcdb74353ab
[ "BSD-3-Clause" ]
null
null
null
from .default import * try: from .local import * except ImportError: pass
11.857143
24
0.674699
from .default import * try: from .local import * except ImportError: pass
true
true
f773f35df9fa78624afd2c4c8625e3d701169a62
2,984
py
Python
notebooks/stimulus_presentation/spatial_gratings.py
synicalsyntax/eeg-notebooks
1edcaf24d55eabe076f6ba98645fcc09b3459613
[ "BSD-3-Clause" ]
7
2020-08-16T07:51:24.000Z
2022-02-05T16:41:09.000Z
notebooks/stimulus_presentation/spatial_gratings.py
synicalsyntax/eeg-notebooks
1edcaf24d55eabe076f6ba98645fcc09b3459613
[ "BSD-3-Clause" ]
1
2021-01-03T09:11:37.000Z
2021-01-03T09:11:37.000Z
notebooks/stimulus_presentation/spatial_gratings.py
synicalsyntax/eeg-notebooks
1edcaf24d55eabe076f6ba98645fcc09b3459613
[ "BSD-3-Clause" ]
1
2022-01-21T15:49:12.000Z
2022-01-21T15:49:12.000Z
""" Generate spatial gratings ========================= Stimulus presentation based on gratings of different spatial frequencies for generating ERPs, high frequency oscillations, and alpha reset. Inspired from: > Hermes, Dora, K. J. Miller, B. A. Wandell, and Jonathan Winawer. "Stimulus dependence of gamma oscillati...
26.642857
77
0.599866
from time import time from optparse import OptionParser import numpy as np import pandas as pd from psychopy import visual, core, event from pylsl import StreamInfo, StreamOutlet def present(duration=120): info = StreamInfo('Markers', 'Markers', 3, 0, 'float32', 'myuidw43536') channels = info.desc().ap...
true
true
f773f3b85cd56332672d23270d97c5a0ac2a1896
8,150
py
Python
pp/components/waveguide_heater.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
8
2020-08-25T11:25:18.000Z
2022-03-27T11:32:11.000Z
pp/components/waveguide_heater.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
null
null
null
pp/components/waveguide_heater.py
flaport/gdsfactory
1f2e844c1fe27b9c6340e2d51500fd3358fa16e5
[ "MIT" ]
1
2022-03-04T07:03:29.000Z
2022-03-04T07:03:29.000Z
from typing import Callable, Dict, List, Tuple import numpy as np import pp from pp.cell import cell from pp.component import Component from pp.components.electrical.tlm import tlm from pp.components.extension import line from pp.components.hline import hline from pp.components.waveguide import waveguide from pp.laye...
26.375405
84
0.596074
from typing import Callable, Dict, List, Tuple import numpy as np import pp from pp.cell import cell from pp.component import Component from pp.components.electrical.tlm import tlm from pp.components.extension import line from pp.components.hline import hline from pp.components.waveguide import waveguide from pp.laye...
true
true
f773f3cb9fbf92bd23f4b6c759605d7fc3b62668
4,685
py
Python
django_falcon/django_falcon/settings/dev.py
Lukejo2/python-django-falcon
12ac52b6e241bc29a41cf4b6df66e7e2f85b1dd2
[ "MIT" ]
null
null
null
django_falcon/django_falcon/settings/dev.py
Lukejo2/python-django-falcon
12ac52b6e241bc29a41cf4b6df66e7e2f85b1dd2
[ "MIT" ]
null
null
null
django_falcon/django_falcon/settings/dev.py
Lukejo2/python-django-falcon
12ac52b6e241bc29a41cf4b6df66e7e2f85b1dd2
[ "MIT" ]
null
null
null
""" Django settings for django_falcon project. Generated by 'django-admin startproject' using Django 4.0. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ import os...
28.222892
91
0.696265
import os from pathlib import Path from dotenv import load_dotenv load_dotenv() BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.getenv('DJANGO_SECRET') DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'djan...
true
true
f773f3d6dbd08548ed92ed6e9daafa9fbc7caea9
59,710
py
Python
SLU/slu_models.py
LeBenchmark/Interspeech2021
2a3b424389631b317b39973291b7252bbf44a73b
[ "MIT" ]
48
2021-03-25T14:00:04.000Z
2022-03-27T17:00:00.000Z
SLU/fairseq/fairseq/models/slu_models.py
Natalia-T/NeurIPS2021
1b368c6461a9a56a4337f9ee86888e286a55f2f9
[ "MIT" ]
2
2021-04-16T13:21:44.000Z
2021-06-16T15:23:09.000Z
SLU/fairseq/fairseq/models/slu_models.py
Natalia-T/NeurIPS2021
1b368c6461a9a56a4337f9ee86888e286a55f2f9
[ "MIT" ]
8
2021-09-09T14:49:14.000Z
2022-03-03T15:53:09.000Z
# coding: utf8 import os import sys import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict #sys.path.append( os.environ['RNNTAGGERPATH'] ) from fairseq.globals import * #import utils_classes as Cl # ---------- Decoders from LD-RNN tool...
44.861007
272
0.644063
import os import sys import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from collections import OrderedDict from fairseq.globals import * class SimpleDecoder(nn.Module): def __init__(self, nn_params, input_size, direction): super(SimpleDecoder, self)._...
true
true
f773f4a5f8c2a79890c99dfeef1305769e1b42de
3,898
py
Python
soluciones/tipo_cambio_futuro.py
proto-tools-docs/Soluciones
7a619e00572a3496cb08a90702f152f52c6d5e56
[ "MIT" ]
null
null
null
soluciones/tipo_cambio_futuro.py
proto-tools-docs/Soluciones
7a619e00572a3496cb08a90702f152f52c6d5e56
[ "MIT" ]
null
null
null
soluciones/tipo_cambio_futuro.py
proto-tools-docs/Soluciones
7a619e00572a3496cb08a90702f152f52c6d5e56
[ "MIT" ]
null
null
null
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython Elabora un programa en Python que estime el tipo de cambio en el futuro. El programa debe solicitar al usuario: el tipo de cambio actual, la tasa de interés local, la tasa de interés extranjero y los días a futuro. La fórmula para estimar el tipo de cambio ...
33.316239
76
0.544638
from dataclasses import dataclass from unittest import main, TestCase from prototools.entradas import entrada_float from prototools.menu import EzMenu def cambio_a_futuro(tc, tiL, tiE, n): tiL = tiL / 100 tiE = tiE / 100 return round(tc * ((1 + tiL)/(1 + tiE))**(n/365), 4) @dataclass class Conversor: ...
true
true
f773f4d665cbaa4094b2e3c5533265480761ba73
12,979
py
Python
vietocr/model/trainer.py
hisiter97/Transformer_OCR_API
3ffee9e56607e86058a475e69f1b28fc93f5836c
[ "Apache-2.0" ]
2
2021-03-11T07:40:00.000Z
2021-03-16T08:42:57.000Z
ocr_engine/vietocr/model/trainer.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
1
2021-09-05T09:24:50.000Z
2021-09-05T09:24:50.000Z
ocr_engine/vietocr/model/trainer.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
2
2021-02-04T15:17:44.000Z
2021-08-12T13:01:43.000Z
from vietocr.optim.optim import ScheduledOptim from vietocr.optim.labelsmoothingloss import LabelSmoothingLoss from torch.optim import Adam, SGD, AdamW from torch import nn from vietocr.tool.translate import build_model from vietocr.tool.translate import translate, batch_translate_beam_search from vietocr.tool.utils im...
36.560563
160
0.590492
from vietocr.optim.optim import ScheduledOptim from vietocr.optim.labelsmoothingloss import LabelSmoothingLoss from torch.optim import Adam, SGD, AdamW from torch import nn from vietocr.tool.translate import build_model from vietocr.tool.translate import translate, batch_translate_beam_search from vietocr.tool.utils im...
true
true
f773f51b3bab1f33a1d93da744abadf37183175a
6,051
py
Python
docs/conf.py
sukruthG/nimi-python
4f98addb04aea5748c8cac9f635065072e31a867
[ "MIT" ]
null
null
null
docs/conf.py
sukruthG/nimi-python
4f98addb04aea5748c8cac9f635065072e31a867
[ "MIT" ]
null
null
null
docs/conf.py
sukruthG/nimi-python
4f98addb04aea5748c8cac9f635065072e31a867
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # NI Modular Instruments Python API documentation build configuration file, created by # sphinx-quickstart on Fri Jul 14 13:04:36 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration value...
32.18617
104
0.68435
import os import sys sys.path.insert(0, os.path.abspath('../generated')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ex...
true
true
f773f53cea75d7192bd3dcb531d15cdda9060063
7,225
py
Python
tests/sources/tools/perception/object_detection_2d/gem/test_gem.py
ad-daniel/opendr
cc71138ae22ec39b186960ff98c74bc2cdca3623
[ "Apache-2.0" ]
217
2020-04-10T16:39:36.000Z
2022-03-30T15:39:04.000Z
tests/sources/tools/perception/object_detection_2d/gem/test_gem.py
ad-daniel/opendr
cc71138ae22ec39b186960ff98c74bc2cdca3623
[ "Apache-2.0" ]
46
2021-12-16T13:23:04.000Z
2022-03-30T11:36:29.000Z
tests/sources/tools/perception/object_detection_2d/gem/test_gem.py
ad-daniel/opendr
cc71138ae22ec39b186960ff98c74bc2cdca3623
[ "Apache-2.0" ]
29
2021-12-16T09:26:13.000Z
2022-03-29T15:19:18.000Z
# Copyright 2020-2022 OpenDR European Project # # 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 agree...
35.243902
120
0.625744
import sys import unittest import shutil import os import torch import warnings from opendr.engine.datasets import ExternalDataset from opendr.perception.object_detection_2d import GemLearner from PIL import Image DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu" print("Using device:", DEVICE) print("Using ...
true
true
f773f5cb76bb552a8f33c6071ffdbb5ad34ace03
2,657
py
Python
allmusic/__init__.py
fortes/allmusic
7cf66a0a9ef7df3fac7b3b32c1b417e6c8614567
[ "MIT" ]
null
null
null
allmusic/__init__.py
fortes/allmusic
7cf66a0a9ef7df3fac7b3b32c1b417e6c8614567
[ "MIT" ]
null
null
null
allmusic/__init__.py
fortes/allmusic
7cf66a0a9ef7df3fac7b3b32c1b417e6c8614567
[ "MIT" ]
1
2019-10-28T05:55:01.000Z
2019-10-28T05:55:01.000Z
import extruct import requests import w3lib.html SCHEMA_RATING_URL = "https://schema.org/Rating" SCHEMA_MUSIC_ALBUM_URL = "https://schema.org/MusicAlbum" SCHEMA_MUSIC_GROUP_URL = "https://schema.org/MusicGroup" SCHEMA_REVIEW_URL = "https://schema.org/Review" class AlbumReview: """ Class representing the fetc...
30.54023
78
0.60143
import extruct import requests import w3lib.html SCHEMA_RATING_URL = "https://schema.org/Rating" SCHEMA_MUSIC_ALBUM_URL = "https://schema.org/MusicAlbum" SCHEMA_MUSIC_GROUP_URL = "https://schema.org/MusicGroup" SCHEMA_REVIEW_URL = "https://schema.org/Review" class AlbumReview: def __init__(self, microdata): ...
true
true
f773f624236b5436c27c64585c1bf46abcb68b1d
14,589
py
Python
perfkitbenchmarker/traces/mpstat.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
3
2018-04-28T13:06:14.000Z
2020-06-09T02:39:44.000Z
perfkitbenchmarker/traces/mpstat.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
1
2021-09-09T07:43:25.000Z
2021-09-09T10:47:56.000Z
perfkitbenchmarker/traces/mpstat.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
6
2019-06-11T18:59:57.000Z
2021-03-02T19:14:42.000Z
# Copyright 2021 PerfKitBenchmarker 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 appli...
32.78427
80
0.659332
import datetime import json import logging import os from typing import Any, Dict, List, Optional from absl import flags from perfkitbenchmarker import events from perfkitbenchmarker import sample from perfkitbenchmarker import vm_util from perfkitbenchmarker.traces import base_collector import six _MPSTAT = flags....
true
true
f773f6b886d1bc2b971caf69dff10f0f8468c0c6
607
py
Python
Alphabetic Patterns/alphabeticpattern42.py
vaidehisinha1/Python-PatternHouse
49f71bcc5319a838592e69b0e49ef1edba32bf7c
[ "MIT" ]
null
null
null
Alphabetic Patterns/alphabeticpattern42.py
vaidehisinha1/Python-PatternHouse
49f71bcc5319a838592e69b0e49ef1edba32bf7c
[ "MIT" ]
471
2022-01-15T07:07:18.000Z
2022-02-28T16:01:42.000Z
Alphabetic Patterns/alphabeticpattern42.py
vaidehisinha1/Python-PatternHouse
49f71bcc5319a838592e69b0e49ef1edba32bf7c
[ "MIT" ]
2
2022-01-17T09:43:16.000Z
2022-01-29T15:15:47.000Z
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" def pattern(n): count = 0 for i in range(n): for j in range(n - i - 1): print(' ', end='') flag = count wflag = 1 caser = 1 for k in range(2 * i + 1): print(alpha[flag], end='') if(flag == 2*i): ...
23.346154
38
0.420099
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" def pattern(n): count = 0 for i in range(n): for j in range(n - i - 1): print(' ', end='') flag = count wflag = 1 caser = 1 for k in range(2 * i + 1): print(alpha[flag], end='') if(flag == 2*i): ...
true
true
f773f7ec26eb066d08d1d914c581347e2f64acab
1,668
py
Python
heron/shell/src/python/handlers/filedatahandler.py
Clarkkkkk/incubator-heron
c08bb8d2f22565727b55194af2ea71f12f8c5768
[ "Apache-2.0" ]
2
2016-07-04T07:10:31.000Z
2018-03-28T16:59:02.000Z
heron/shell/src/python/handlers/filedatahandler.py
Clarkkkkk/incubator-heron
c08bb8d2f22565727b55194af2ea71f12f8c5768
[ "Apache-2.0" ]
null
null
null
heron/shell/src/python/handlers/filedatahandler.py
Clarkkkkk/incubator-heron
c08bb8d2f22565727b55194af2ea71f12f8c5768
[ "Apache-2.0" ]
1
2017-06-05T17:55:45.000Z
2017-06-05T17:55:45.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- # 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...
32.705882
81
0.710432
import json import os import tornado.web from heron.shell.src.python import utils class FileDataHandler(tornado.web.RequestHandler): @tornado.web.asynchronous def get(self, path): if path is None: return {} if path.startswith("/"): self.write("Only relative paths are allowed") self.se...
true
true
f773f80c3d6670756a7f3048dd777fa3fa19e653
1,756
py
Python
lcmtype/lilylcm/L21DockDetect.py
WeirdCoder/LilyPadOS
8007257746939de3221ebbeb6b03bfd4352a7ff2
[ "MIT" ]
null
null
null
lcmtype/lilylcm/L21DockDetect.py
WeirdCoder/LilyPadOS
8007257746939de3221ebbeb6b03bfd4352a7ff2
[ "MIT" ]
null
null
null
lcmtype/lilylcm/L21DockDetect.py
WeirdCoder/LilyPadOS
8007257746939de3221ebbeb6b03bfd4352a7ff2
[ "MIT" ]
null
null
null
"""LCM type definitions This file automatically generated by lcm. DO NOT MODIFY BY HAND!!!! """ try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct class L21DockDetect(object): __slots__ = ["detected"] def __init__(self): self.detected = False ...
30.275862
104
0.669134
try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct class L21DockDetect(object): __slots__ = ["detected"] def __init__(self): self.detected = False def encode(self): buf = BytesIO() buf.write(L21DockDetect._get_packed_fingerp...
true
true
f773fa33c24dc5381825dd138b18a2351de62db3
1,379
py
Python
examples/multistep_workflow/load_raw_data.py
freefrag/mlflow
b8e74cfc591397290e1c1ba2600be7daa64b4c05
[ "Apache-2.0" ]
1,825
2018-06-05T17:30:39.000Z
2022-03-24T13:39:46.000Z
examples/multistep_workflow/load_raw_data.py
freefrag/mlflow
b8e74cfc591397290e1c1ba2600be7daa64b4c05
[ "Apache-2.0" ]
200
2018-06-06T02:30:57.000Z
2018-07-30T17:06:34.000Z
examples/multistep_workflow/load_raw_data.py
freefrag/mlflow
b8e74cfc591397290e1c1ba2600be7daa64b4c05
[ "Apache-2.0" ]
301
2018-06-05T17:47:48.000Z
2022-03-17T12:09:17.000Z
""" Downloads the MovieLens dataset and saves it as an artifact """ from __future__ import print_function import requests import tempfile import os import zipfile import pyspark import mlflow import click @click.command(help="Downloads the MovieLens dataset and saves it as an mlflow artifact " ...
31.340909
90
0.662799
from __future__ import print_function import requests import tempfile import os import zipfile import pyspark import mlflow import click @click.command(help="Downloads the MovieLens dataset and saves it as an mlflow artifact " " called 'ratings-csv-dir'.") @click.option("--url", default="http:/...
true
true
f773fb029c80645dbf12e696de2351f111b6fba4
9,811
py
Python
configs/example/components-library/parsec_disk_run.py
takekoputa/gem5
590daeb90152df9aee2525851d7332af790220ea
[ "BSD-3-Clause" ]
null
null
null
configs/example/components-library/parsec_disk_run.py
takekoputa/gem5
590daeb90152df9aee2525851d7332af790220ea
[ "BSD-3-Clause" ]
1
2021-04-02T14:25:56.000Z
2021-04-02T14:25:56.000Z
configs/example/components-library/parsec_disk_run.py
takekoputa/gem5
590daeb90152df9aee2525851d7332af790220ea
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this lis...
26.660326
79
0.672001
import m5 import m5.ticks from m5.objects import Root import sys import os sys.path.append( os.path.join( os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir, os.pardir, ) ) from components_library.resources.resource import Resource from components_library.board...
true
true
f773fb4e899a7b6c34ad0cf1befa43d2a79f1ade
1,725
py
Python
rally_openstack/task/contexts/network/networking_agents.py
jogeo/rally-openstack
83437e7c5925d5d647cd28f1821b6d51687b0123
[ "Apache-2.0" ]
null
null
null
rally_openstack/task/contexts/network/networking_agents.py
jogeo/rally-openstack
83437e7c5925d5d647cd28f1821b6d51687b0123
[ "Apache-2.0" ]
null
null
null
rally_openstack/task/contexts/network/networking_agents.py
jogeo/rally-openstack
83437e7c5925d5d647cd28f1821b6d51687b0123
[ "Apache-2.0" ]
1
2021-08-10T03:11:51.000Z
2021-08-10T03:11:51.000Z
# Copyright 2019 Ericsson Software Technology # # 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...
37.5
79
0.729855
from rally.common import logging from rally.common import validation from rally_openstack.common import consts from rally_openstack.common import osclients from rally_openstack.task import context LOG = logging.getLogger(__name__) @validation.add("required_platform", platform="openstack", admin=True) @context.conf...
true
true
f773fb6f19e7d9c18dc3f6e20e4aebf29932ee27
3,250
py
Python
benchmark/startCirq937.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq937.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq937.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=5 # total number=37 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
35.326087
77
0.650462
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np from cirq.contrib.svg import SVGCircuit def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(...
true
true
f773fc81a36f42a5ad96ff731608f0596a9d607b
8,093
py
Python
pl_examples/basic_examples/lightning_module_template.py
ryosukehata/pytorch-lightning
a5bd2edefbafa6e03acffd4ba1a8816bbc1682a3
[ "Apache-2.0" ]
null
null
null
pl_examples/basic_examples/lightning_module_template.py
ryosukehata/pytorch-lightning
a5bd2edefbafa6e03acffd4ba1a8816bbc1682a3
[ "Apache-2.0" ]
null
null
null
pl_examples/basic_examples/lightning_module_template.py
ryosukehata/pytorch-lightning
a5bd2edefbafa6e03acffd4ba1a8816bbc1682a3
[ "Apache-2.0" ]
null
null
null
""" Example template for defining a system """ import os from argparse import ArgumentParser from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F import torchvision.transforms as transforms from torch import optim from torch.utils.data import DataLoader from torch.util...
31.368217
98
0.599654
import os from argparse import ArgumentParser from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F import torchvision.transforms as transforms from torch import optim from torch.utils.data import DataLoader from torch.utils.data.distributed import DistributedSampler fr...
true
true
f773fcc4d3b8c3892733e589fa243853297fe5a6
5,395
py
Python
pytext/config/pytext_config.py
twild-fb/pytext
07cadc0d130dac30d71d9da70380f124b3f5ac59
[ "BSD-3-Clause" ]
1
2019-11-02T05:02:01.000Z
2019-11-02T05:02:01.000Z
pytext/config/pytext_config.py
twild-fb/pytext
07cadc0d130dac30d71d9da70380f124b3f5ac59
[ "BSD-3-Clause" ]
null
null
null
pytext/config/pytext_config.py
twild-fb/pytext
07cadc0d130dac30d71d9da70380f124b3f5ac59
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from collections import OrderedDict from typing import Any, List, Optional, Union class ConfigBaseMeta(type): def annotations_and_defaults(cls): annotations = OrderedDict() defaults = {} for base ...
37.206897
88
0.676367
from collections import OrderedDict from typing import Any, List, Optional, Union class ConfigBaseMeta(type): def annotations_and_defaults(cls): annotations = OrderedDict() defaults = {} for base in reversed(cls.__bases__): if base is ConfigBase: continue ...
true
true
f773fcccc35ee41465b960a9d31de2665891d753
16,795
py
Python
yandex/cloud/containerregistry/v1/repository_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/containerregistry/v1/repository_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/containerregistry/v1/repository_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/containerregistry/v1/repository_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import...
53.148734
2,852
0.792141
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f773fdb95821dcdf47df75fc3a3e5ccb691e593e
20,677
py
Python
reduction/scripts/generate_report.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
reduction/scripts/generate_report.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
reduction/scripts/generate_report.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
"""\ Generate LaTeX report displaying spectra normalized around the H_alpha line. """ import logging import os import os.path from argparse import ArgumentParser from collections import namedtuple, defaultdict import numpy as np from astropy import constants as const from astropy.convolution import Box1DKernel from a...
37.055556
122
0.623495
import logging import os import os.path from argparse import ArgumentParser from collections import namedtuple, defaultdict import numpy as np from astropy import constants as const from astropy.convolution import Box1DKernel from astropy.convolution import convolve from astropy.coordinates import EarthLocation from ...
true
true
f773fdfa3bf05b374a0f54f5daf0120984f4ff89
1,084
py
Python
flag_glyph_name.py
spdd/if3games-noto-emoji
5cdf14d9cd56c25d225d50c8984cd5b9c02d26ec
[ "Apache-2.0" ]
1
2020-06-12T02:16:21.000Z
2020-06-12T02:16:21.000Z
flag_glyph_name.py
spdd/if3games-noto-emoji
5cdf14d9cd56c25d225d50c8984cd5b9c02d26ec
[ "Apache-2.0" ]
null
null
null
flag_glyph_name.py
spdd/if3games-noto-emoji
5cdf14d9cd56c25d225d50c8984cd5b9c02d26ec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
30.111111
78
0.732472
"""Generate a glyph name for flag emojis.""" __author__ = 'roozbeh@google.com (Roozbeh Pournader)' import sys import add_emoji_gsub def two_letter_code_to_glyph_name(iso_code): return 'u%04x_%04x' % ( add_emoji_gsub.reg_indicator(iso_code[0]), add_emoji_gsub.reg_indicator(iso_code[1])) def mai...
false
true
f773fec43d221642fbded944162783ddcc1477df
265
py
Python
boa3_test/test_sc/variable_test/GlobalMultipleAssignments.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/variable_test/GlobalMultipleAssignments.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/variable_test/GlobalMultipleAssignments.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3.builtin import public a = b = c = d = 10 c += 5 @public def get_a() -> int: return a @public def get_c() -> int: return c @public def set_a(value: int): global a a = value @public def set_b(value: int): global b b = value
9.814815
31
0.577358
from boa3.builtin import public a = b = c = d = 10 c += 5 @public def get_a() -> int: return a @public def get_c() -> int: return c @public def set_a(value: int): global a a = value @public def set_b(value: int): global b b = value
true
true
f773fff28c9033c9f09a8d542bbcedef69ab0c55
17,546
py
Python
intersight/model/license_customer_op.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/license_customer_op.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/license_customer_op.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
54.490683
1,678
0.640089
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f7740094a171d31e8e6e7c349882eae48e0b0a83
1,798
py
Python
hackathon_covid_19_Token_System_Server/SendVerificationEmail.py
Tech-Grave/safeus
bfd4ae897cc20130de359a69889653dd112e72e2
[ "MIT" ]
1
2020-10-07T19:52:42.000Z
2020-10-07T19:52:42.000Z
hackathon_covid_19_Token_System_Server/SendVerificationEmail.py
Tech-Grave/safeus
bfd4ae897cc20130de359a69889653dd112e72e2
[ "MIT" ]
null
null
null
hackathon_covid_19_Token_System_Server/SendVerificationEmail.py
Tech-Grave/safeus
bfd4ae897cc20130de359a69889653dd112e72e2
[ "MIT" ]
2
2020-04-16T11:05:58.000Z
2020-09-21T13:49:20.000Z
# this class is used to generate and send OTP to email and update OTP in the Database. import math import random import smtplib def generateOTP(): digits = "0123456789" OTP = "" for i in range(6): OTP += digits[math.floor(random.random() * 10)] return OTP def sendMail(myDB, m...
32.690909
120
0.550612
import math import random import smtplib def generateOTP(): digits = "0123456789" OTP = "" for i in range(6): OTP += digits[math.floor(random.random() * 10)] return OTP def sendMail(myDB, myCursor, phone, email): otp = generateOTP() try: s = smtplib.SMTP('sm...
true
true
f77401d18fc1ae99d850f3d8213f1d63071e3882
12,477
py
Python
mmtbx/regression/ncs/tst_minimization_ncs_constraints.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/regression/ncs/tst_minimization_ncs_constraints.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/regression/ncs/tst_minimization_ncs_constraints.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division import mmtbx.refinement.minimization_ncs_constraints from libtbx.test_utils import approx_equal import mmtbx.refinement.adp_refinement from scitbx.array_family import flex from libtbx import adopt_init_args from libtbx.utils import null_out import mmtbx.ncs.ncs_utils as nu import iotbx.n...
43.024138
100
0.680372
from __future__ import division import mmtbx.refinement.minimization_ncs_constraints from libtbx.test_utils import approx_equal import mmtbx.refinement.adp_refinement from scitbx.array_family import flex from libtbx import adopt_init_args from libtbx.utils import null_out import mmtbx.ncs.ncs_utils as nu import iotbx.n...
false
true
f7740219d66bb69c9ad168cef9f9fab4fc296cdf
5,066
py
Python
fabspec/spectra.py
ajshajib/fabspec
0fec1595a4525215bbabd1f2480d1d31a86d955e
[ "MIT" ]
null
null
null
fabspec/spectra.py
ajshajib/fabspec
0fec1595a4525215bbabd1f2480d1d31a86d955e
[ "MIT" ]
null
null
null
fabspec/spectra.py
ajshajib/fabspec
0fec1595a4525215bbabd1f2480d1d31a86d955e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This module defines the class Spectra() that contains a spectra and relevant information. """ import numpy as np from scipy.interpolate import interp1d from copy import deepcopy class Spectra(object): """ Contains a spectra and relevant information. """ def __init__(self,...
32.474359
78
0.587643
import numpy as np from scipy.interpolate import interp1d from copy import deepcopy class Spectra(object): def __init__(self, wavelengths, spectra, *args, **kwargs): try: assert len(spectra) == len(wavelengths) except: raise ('Error: spectra and wavelength must have same ...
true
true
f77403576166f2835424b7c1bfa5eb557f99ca0d
673
py
Python
lab8.py
Haywarax/IA241
ffd060eaeff65714b3d38bfcf123f2ae362ea9e0
[ "MIT" ]
null
null
null
lab8.py
Haywarax/IA241
ffd060eaeff65714b3d38bfcf123f2ae362ea9e0
[ "MIT" ]
null
null
null
lab8.py
Haywarax/IA241
ffd060eaeff65714b3d38bfcf123f2ae362ea9e0
[ "MIT" ]
null
null
null
# Lab 8 #3.1 def count_words(inpu_str): return len(inpu_str.split( )) #3.2 demo_str = 'hi, hello world!' print(count_words(demo_str)) #3.3 def find_min(input_list): min_item = input_list[0] for num in input_list: if type(num) is not str: if min_item >= num: ...
12.462963
33
0.527489
def count_words(inpu_str): return len(inpu_str.split( )) demo_str = 'hi, hello world!' print(count_words(demo_str)) def find_min(input_list): min_item = input_list[0] for num in input_list: if type(num) is not str: if min_item >= num: min_item...
true
true
f7740450280b656c82030ab046e31d37b2dfba00
1,532
py
Python
settings.py
csemken/otree_iat
e2d90c83daaafb50b00415ef2f8a43a29edf11f8
[ "Apache-2.0" ]
null
null
null
settings.py
csemken/otree_iat
e2d90c83daaafb50b00415ef2f8a43a29edf11f8
[ "Apache-2.0" ]
null
null
null
settings.py
csemken/otree_iat
e2d90c83daaafb50b00415ef2f8a43a29edf11f8
[ "Apache-2.0" ]
null
null
null
from os import environ if environ.get('OTREE_PRODUCTION') not in {None, '', '0'}: DEBUG = False APPS_DEBUG = False else: DEBUG = True APPS_DEBUG = True # also enables random fill in of forms # if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs # in SESSION_CONFIGS...
25.533333
97
0.703655
from os import environ if environ.get('OTREE_PRODUCTION') not in {None, '', '0'}: DEBUG = False APPS_DEBUG = False else: DEBUG = True APPS_DEBUG = True SESSION_CONFIG_DEFAULTS = { 'real_world_currency_per_point': 1.00, 'participation_fee': 0.00, 'doc': "", } SESSION_CONFIGS = [ { ...
true
true
f7740499f27839a2be945b9712629f1064786c96
871
py
Python
server/urls.py
ASL-19/outline-distribution
6ef595d59c0d7d9416cd1d3c0fb263ba83830126
[ "Apache-2.0" ]
5
2020-12-21T21:19:28.000Z
2022-03-28T00:53:45.000Z
server/urls.py
ASL-19/outline-distribution
6ef595d59c0d7d9416cd1d3c0fb263ba83830126
[ "Apache-2.0" ]
5
2021-01-07T02:32:47.000Z
2022-03-28T14:28:52.000Z
server/urls.py
ASL-19/outline-distribution
6ef595d59c0d7d9416cd1d3c0fb263ba83830126
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 ASL19 Organization # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
34.84
78
0.752009
from django.urls import path, re_path, include from server import views urlpatterns = [ path('outlineserver', views.OutlineServerView.as_view()), re_path(r'outlineserver/(?P<pk>\d+)$', views.OutlineServerView.as_view()), ] urlpatterns = [path('server/', include(urlpatterns))]
true
true
f77404d2328713853da73dc607f096595df2112e
1,682
py
Python
spkcspider/apps/spider_keys/migrations/0005_auto_20191230_1355.py
devkral/spkbspider
97e448b4da412acebd66c4469c7fcdd07bf90ed2
[ "MIT" ]
5
2019-06-24T14:15:54.000Z
2021-05-14T23:16:31.000Z
spkcspider/apps/spider_keys/migrations/0005_auto_20191230_1355.py
devkral/spkbspider
97e448b4da412acebd66c4469c7fcdd07bf90ed2
[ "MIT" ]
2
2018-06-19T09:56:18.000Z
2018-11-20T12:02:44.000Z
spkcspider/apps/spider_keys/migrations/0005_auto_20191230_1355.py
devkral/spkbspider
97e448b4da412acebd66c4469c7fcdd07bf90ed2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.1 on 2019-12-30 13:55 from django.db import migrations def move_to_datacontent(apps, schema_editor): AssignedContent = apps.get_model("spider_base", "AssignedContent") AnchorKey = apps.get_model("spider_keys", "AnchorKey") AnchorServer = apps.get_model("spider_keys", "AnchorServ...
31.148148
70
0.662307
from django.db import migrations def move_to_datacontent(apps, schema_editor): AssignedContent = apps.get_model("spider_base", "AssignedContent") AnchorKey = apps.get_model("spider_keys", "AnchorKey") AnchorServer = apps.get_model("spider_keys", "AnchorServer") PublicKey = apps.get_model("spider_keys...
true
true
f77404deefd231243fa94d8c13e03740a0a4db7e
1,950
py
Python
tables/automl/batch_predict_test.py
plamut/python-docs-samples
407fb893d3c56f8b4d54f7288d8d8ecaaf7218fa
[ "Apache-2.0" ]
2
2020-09-19T04:22:52.000Z
2020-09-23T14:04:17.000Z
tables/automl/batch_predict_test.py
plamut/python-docs-samples
407fb893d3c56f8b4d54f7288d8d8ecaaf7218fa
[ "Apache-2.0" ]
1
2020-07-23T10:47:32.000Z
2020-07-23T10:47:32.000Z
tables/automl/batch_predict_test.py
plamut/python-docs-samples
407fb893d3c56f8b4d54f7288d8d8ecaaf7218fa
[ "Apache-2.0" ]
2
2020-09-13T03:47:22.000Z
2020-09-23T14:04:19.000Z
#!/usr/bin/env python # Copyright 2020 Google LLC # # 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 ...
30.952381
77
0.76
import os from google.cloud.automl_v1beta1.gapic import enums import pytest import automl_tables_model import automl_tables_predict import model_test PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] REGION = "us-central1" STATIC_MODEL = model_test.STATIC_MODEL GCS_INPUT = "gs://{}-automl-tables-test/bank-marketing.c...
true
true
f7740547c61048b598f8b8168883ff873a340963
802
py
Python
src/array_as_vcf/utils.py
LUMC/array-as-vcf
b41e72c0296075d02471e208e432873870b6be58
[ "MIT" ]
null
null
null
src/array_as_vcf/utils.py
LUMC/array-as-vcf
b41e72c0296075d02471e208e432873870b6be58
[ "MIT" ]
3
2019-12-03T12:13:32.000Z
2020-11-09T06:23:10.000Z
src/array_as_vcf/utils.py
LUMC/array-as-vcf
b41e72c0296075d02471e208e432873870b6be58
[ "MIT" ]
1
2022-02-01T11:20:57.000Z
2022-02-01T11:20:57.000Z
""" aav.utils ~~~~~~~~~ :copyright: (c) 2018 Sander Bollen :copyright: (c) 2018 Leiden University Medical Center :license: MIT """ from typing import Optional def comma_float(val: str) -> float: """ Get float for a string that may contain commas in stead of dots :param val: the value to be casted to floa...
25.870968
73
0.619701
from typing import Optional def comma_float(val: str) -> float: if "," in val and "." not in val: return float(val.replace(",", ".")) elif "." in val and "," not in val: return float(val) elif "," not in val and "." not in val: return float(val) else: raise ValueError("...
true
true
f77405d6c84fdff733da1be86366704e0bce99db
17,446
py
Python
torch/profiler/profiler.py
edward-io/pytorch
04caef8e1d4f951cc380d6cebb9967b71695de13
[ "Intel" ]
1
2021-09-29T13:45:07.000Z
2021-09-29T13:45:07.000Z
torch/profiler/profiler.py
edward-io/pytorch
04caef8e1d4f951cc380d6cebb9967b71695de13
[ "Intel" ]
null
null
null
torch/profiler/profiler.py
edward-io/pytorch
04caef8e1d4f951cc380d6cebb9967b71695de13
[ "Intel" ]
null
null
null
import gzip import json import os import tempfile from enum import Enum from typing import Any, Callable, Iterable, Optional from warnings import warn import torch import torch.autograd.profiler as prof from torch.autograd import kineto_available, ProfilerActivity class ProfilerAction(Enum): """ Profiler act...
39.204494
118
0.622836
import gzip import json import os import tempfile from enum import Enum from typing import Any, Callable, Iterable, Optional from warnings import warn import torch import torch.autograd.profiler as prof from torch.autograd import kineto_available, ProfilerActivity class ProfilerAction(Enum): NONE = 0 WARMUP ...
true
true
f77406670c1162fd0238f62c696b4cdacf4fd21d
4,807
py
Python
custom_components/aoaws_anws/const.py
tsunglung/TwANWS
032ab7ad6a194c23d3683b02534bb441f7eb511e
[ "MIT" ]
1
2021-07-08T15:49:56.000Z
2021-07-08T15:49:56.000Z
custom_components/aoaws_anws/const.py
tsunglung/TwANWS
032ab7ad6a194c23d3683b02534bb441f7eb511e
[ "MIT" ]
2
2021-05-12T04:13:02.000Z
2022-03-23T17:04:22.000Z
custom_components/aoaws_anws/const.py
tsunglung/TwANWS
032ab7ad6a194c23d3683b02534bb441f7eb511e
[ "MIT" ]
null
null
null
"""Constants for ANWS AOAWS Integration.""" from datetime import timedelta from homeassistant.const import ( DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, LENGTH_KILOMETERS, PERCENTAGE, SPEED_MILES_PER_HOUR, TEMP_CELSIUS, UV_INDEX, ) from homeassistant.components.weather import ( ATTR...
26.26776
91
0.618889
from datetime import timedelta from homeassistant.const import ( DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, LENGTH_KILOMETERS, PERCENTAGE, SPEED_MILES_PER_HOUR, TEMP_CELSIUS, UV_INDEX, ) from homeassistant.components.weather import ( ATTR_CONDITION_CLOUDY, ATTR_CONDITION_EXCEPT...
true
true
f77406c4a0e67e68583bb914d4953b580637ba16
3,637
py
Python
main.py
mingkim/okmi
98f923fc57217a3e082d8d97fd1334bd702f2507
[ "MIT" ]
1
2017-08-18T18:45:29.000Z
2017-08-18T18:45:29.000Z
main.py
mingkim/okmi
98f923fc57217a3e082d8d97fd1334bd702f2507
[ "MIT" ]
1
2017-08-06T04:57:28.000Z
2017-08-06T04:57:28.000Z
main.py
mingkim/okmi
98f923fc57217a3e082d8d97fd1334bd702f2507
[ "MIT" ]
null
null
null
import os import glob from collections import defaultdict from colored import fg, bg, attr TEMP_DIR_NAME = 'sample/materialization' EXCLUDE_FILE_NAME = 'meta.md' def display_relations_tree(): target_dir = os.path.dirname(os.path.abspath(__file__)) + "/" + TEMP_DIR_NAME glob_file_list = glob.glob(target_dir ...
30.057851
99
0.550729
import os import glob from collections import defaultdict from colored import fg, bg, attr TEMP_DIR_NAME = 'sample/materialization' EXCLUDE_FILE_NAME = 'meta.md' def display_relations_tree(): target_dir = os.path.dirname(os.path.abspath(__file__)) + "/" + TEMP_DIR_NAME glob_file_list = glob.glob(target_dir ...
true
true
f7740722d11023ccf20c5a7b6f370b6b3f8a8f86
2,126
py
Python
lib/galaxy/sample_tracking/data_transfer.py
mmiladi/galaxy
7857b152cd10d9490ac2433ff2905ca1a47ee32c
[ "CC-BY-3.0" ]
4
2018-10-29T18:34:38.000Z
2021-09-29T23:30:42.000Z
lib/galaxy/sample_tracking/data_transfer.py
mmiladi/galaxy
7857b152cd10d9490ac2433ff2905ca1a47ee32c
[ "CC-BY-3.0" ]
1
2019-02-04T16:21:27.000Z
2019-02-04T16:45:17.000Z
lib/galaxy/sample_tracking/data_transfer.py
mmiladi/galaxy
7857b152cd10d9490ac2433ff2905ca1a47ee32c
[ "CC-BY-3.0" ]
3
2020-02-12T15:22:24.000Z
2021-08-19T10:27:39.000Z
class DataTransferFactory(object): type = None def parse(self): pass class ScpDataTransferFactory(DataTransferFactory): type = 'scp' def __init__(self): pass def parse(self, config_file, elem): self.config = {} # TODO: The 'automatic_transfer' setting is for futu...
36.033898
166
0.662747
class DataTransferFactory(object): type = None def parse(self): pass class ScpDataTransferFactory(DataTransferFactory): type = 'scp' def __init__(self): pass def parse(self, config_file, elem): self.config = {} self.config['automatic_trans...
true
true
f77409644e02ae519c8590bde8413927f8a81e1b
468
py
Python
mountaintools/mlprocessors/execute.py
mhhennig/spikeforest
5b4507ead724af3de0be5d48a3b23aaedb0be170
[ "Apache-2.0" ]
null
null
null
mountaintools/mlprocessors/execute.py
mhhennig/spikeforest
5b4507ead724af3de0be5d48a3b23aaedb0be170
[ "Apache-2.0" ]
null
null
null
mountaintools/mlprocessors/execute.py
mhhennig/spikeforest
5b4507ead724af3de0be5d48a3b23aaedb0be170
[ "Apache-2.0" ]
null
null
null
from .createjobs import createJob import mtlogging def execute( proc, _container=None, _use_cache=True, _skip_failing=None, _force_run=None, _keep_temp_files=None, _label=None, **kwargs ): job = createJob(proc, _container=_container, _use_cache=_use_cache, _skip_failing=_skip_faili...
26
199
0.739316
from .createjobs import createJob import mtlogging def execute( proc, _container=None, _use_cache=True, _skip_failing=None, _force_run=None, _keep_temp_files=None, _label=None, **kwargs ): job = createJob(proc, _container=_container, _use_cache=_use_cache, _skip_failing=_skip_faili...
true
true
f7740965e74ceb03ba5d25ad485c1292fd0c77ea
2,231
py
Python
bokeh/models/canvas.py
TheLaw1337/bokeh
ca6c4abf3b0cef587136b8431e9d6ee6acbedc2f
[ "BSD-3-Clause" ]
15,193
2015-01-01T05:11:45.000Z
2022-03-31T19:30:20.000Z
bokeh/models/canvas.py
TheLaw1337/bokeh
ca6c4abf3b0cef587136b8431e9d6ee6acbedc2f
[ "BSD-3-Clause" ]
9,554
2015-01-01T03:16:54.000Z
2022-03-31T22:59:39.000Z
bokeh/models/canvas.py
TheLaw1337/bokeh
ca6c4abf3b0cef587136b8431e9d6ee6acbedc2f
[ "BSD-3-Clause" ]
4,829
2015-01-02T03:35:32.000Z
2022-03-30T16:40:26.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
37.813559
78
0.317795
from __future__ import annotations import logging log = logging.getLogger(__name__) from ..core.properties import Instance from ..model import Model from .ranges import DataRange1d, Range from .scales import LinearScale, Scale __all__ = ( "CoordinateMapping", ) class CoordinateMapping(Model): x_source ...
true
true
f7740a64bfa2b42425f2a8e420d7a93359ddf4cb
5,026
bzl
Python
index.bzl
aspect-dev/rules_nodejs
b7917aab251da954f97bbfd4056e0cb9e1484d4f
[ "Apache-2.0" ]
null
null
null
index.bzl
aspect-dev/rules_nodejs
b7917aab251da954f97bbfd4056e0cb9e1484d4f
[ "Apache-2.0" ]
null
null
null
index.bzl
aspect-dev/rules_nodejs
b7917aab251da954f97bbfd4056e0cb9e1484d4f
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
39.265625
192
0.710903
load("//:version.bzl", "VERSION") load("//internal/common:check_bazel_version.bzl", _check_bazel_version = "check_bazel_version") load("//internal/common:check_version.bzl", "check_version") load("//internal/common:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin") load("//internal/common:params_file.bzl", _params_file ...
true
true
f7740b2226a2c89ea35841702b6d17ca9643ff32
1,127
py
Python
main-read-screen-clicker.py
LK00100100/four-map-solver
6797f9779ebfd36d4464e41f52156c9697a681e1
[ "MIT" ]
null
null
null
main-read-screen-clicker.py
LK00100100/four-map-solver
6797f9779ebfd36d4464e41f52156c9697a681e1
[ "MIT" ]
3
2020-03-30T04:25:15.000Z
2021-09-08T01:15:23.000Z
main-read-screen-clicker.py
LK00100100/four-map-solver
6797f9779ebfd36d4464e41f52156c9697a681e1
[ "MIT" ]
null
null
null
# solves the 4-color-map game on Mobaxterm # python 3.7 # reads the screen for a game and clicks the game to solve it # author lk00100100 import sys from Graph import ColorNode from GraphReader.ImageReader import ImageReader from GraphReader.ScreenReader import ScreenReader from GraphSolver.FourMapSolver import FourMap...
27.487805
65
0.794144
import sys from Graph import ColorNode from GraphReader.ImageReader import ImageReader from GraphReader.ScreenReader import ScreenReader from GraphSolver.FourMapSolver import FourMapSolver from GraphWriter.AutoClicker import AutoClicker from Stopwatch import Stopwatch print("\nReading game image from screen: ") with S...
true
true
f7740b2c9d83502a989a9775c0abd973754fc633
44
py
Python
raylink/data/tunnel/rpc/rpc/__init__.py
bytedance/raylink
cd83a4377fede1ac645037df567010f2ddac5a69
[ "Apache-2.0" ]
17
2021-10-11T06:52:09.000Z
2022-01-12T01:04:59.000Z
raylink/data/tunnel/rpc/rpc/__init__.py
bytedance/raylink
cd83a4377fede1ac645037df567010f2ddac5a69
[ "Apache-2.0" ]
null
null
null
raylink/data/tunnel/rpc/rpc/__init__.py
bytedance/raylink
cd83a4377fede1ac645037df567010f2ddac5a69
[ "Apache-2.0" ]
2
2021-10-11T08:19:04.000Z
2021-12-04T02:48:13.000Z
__all__ = ['ttypes', 'constants', 'tunnel']
22
43
0.636364
__all__ = ['ttypes', 'constants', 'tunnel']
true
true
f7740b3937ed4209e2cee7f97abc8bac7b5d5e48
6,182
py
Python
server/gspeedometer/controllers/device.py
gurupras/mobiperf
38769fa4bde7790b0cb791c2b99012ba1f82cd23
[ "Apache-2.0" ]
57
2015-01-17T16:37:35.000Z
2022-03-31T15:40:40.000Z
server/gspeedometer/controllers/device.py
gurupras/mobiperf
38769fa4bde7790b0cb791c2b99012ba1f82cd23
[ "Apache-2.0" ]
9
2019-06-19T11:37:16.000Z
2019-08-05T13:06:16.000Z
server/gspeedometer/controllers/device.py
gurupras/mobiperf
38769fa4bde7790b0cb791c2b99012ba1f82cd23
[ "Apache-2.0" ]
31
2015-01-17T17:02:28.000Z
2021-05-02T09:23:37.000Z
# Copyright 2012 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, ...
34.926554
77
0.654966
__author__ = 'mdw@google.com (Matt Welsh)' import urllib import urlparse from google.appengine.api import users from google.appengine.ext import db from google.appengine.ext import webapp from google.appengine.ext.webapp import template from gspeedometer import config from gspeedometer import model from gspeedomet...
true
true
f7740bbc79bc1ed966b3ca603da9a90c12b13784
366
py
Python
python_level_3_solutions/3_3_get_numbers_from_user_2.py
PacktPublishing/Practical-Python-Learn-Python-Basics-Step-by-Step-Python-3
7e75e27a2da4ffcaf7ab1ed5d32809eccc3b8f9b
[ "MIT" ]
1
2022-01-24T08:37:00.000Z
2022-01-24T08:37:00.000Z
python_level_3_solutions/3_3_get_numbers_from_user_2.py
PacktPublishing/Practical-Python-Learn-Python-Basics-Step-by-Step-Python-3
7e75e27a2da4ffcaf7ab1ed5d32809eccc3b8f9b
[ "MIT" ]
null
null
null
python_level_3_solutions/3_3_get_numbers_from_user_2.py
PacktPublishing/Practical-Python-Learn-Python-Basics-Step-by-Step-Python-3
7e75e27a2da4ffcaf7ab1ed5d32809eccc3b8f9b
[ "MIT" ]
4
2022-01-30T00:13:59.000Z
2022-03-01T05:49:35.000Z
def compute_list_average(number_list): return sum(number_list) / len(number_list) number_list = [] ask_user_for_numbers = True while ask_user_for_numbers: user_input = float(input("Choose a number: ")) if user_input == 0.0: ask_user_for_numbers = False else: number_list.append(user_in...
24.4
50
0.729508
def compute_list_average(number_list): return sum(number_list) / len(number_list) number_list = [] ask_user_for_numbers = True while ask_user_for_numbers: user_input = float(input("Choose a number: ")) if user_input == 0.0: ask_user_for_numbers = False else: number_list.append(user_in...
true
true
f7740c36d8a6c4231d4f2d93dfdbe4280e38ab05
191
py
Python
wikum-env3/lib/python3.7/site-packages/sumy/__init__.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
wikum-env3/lib/python3.7/site-packages/sumy/__init__.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
wikum-env3/lib/python3.7/site-packages/sumy/__init__.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals __author__ = "Michal Belica" __version__ = "0.8.1"
21.222222
66
0.727749
from __future__ import absolute_import from __future__ import division, print_function, unicode_literals __author__ = "Michal Belica" __version__ = "0.8.1"
true
true
f7740c9f7e7d1072b54f7dba630ae9b09c2ef644
24,624
py
Python
src/robot/run.py
silviot/bryanoakley-robotframework-linenumbers
7cc85c1cb8bdbf63d3bb6721ad1ddf8d9420d85e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/run.py
silviot/bryanoakley-robotframework-linenumbers
7cc85c1cb8bdbf63d3bb6721ad1ddf8d9420d85e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/run.py
silviot/bryanoakley-robotframework-linenumbers
7cc85c1cb8bdbf63d3bb6721ad1ddf8d9420d85e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2008-2012 Nokia Siemens Networks Oyj # # 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 req...
56.477064
88
0.585892
USAGE = """Robot Framework -- A keyword-driven test automation framework Version: <VERSION> Usage: pybot|jybot|ipybot [options] data_sources or: python|jython|ipy -m robot.run [options] data_sources or: python|jython|ipy path/to/robot/run.py [options] data_sources or: java -jar robotframework.jar [opt...
true
true
f7740dbd26fa13f3c12c07180a139a17b3adfb36
1,888
py
Python
1.Cnn_Captcha/gen_captcha.py
JhonLiuljs/tensorflow_demo
0757f81a2c8baae41fce586e5d86f7312f46fda6
[ "BSD-2-Clause" ]
null
null
null
1.Cnn_Captcha/gen_captcha.py
JhonLiuljs/tensorflow_demo
0757f81a2c8baae41fce586e5d86f7312f46fda6
[ "BSD-2-Clause" ]
null
null
null
1.Cnn_Captcha/gen_captcha.py
JhonLiuljs/tensorflow_demo
0757f81a2c8baae41fce586e5d86f7312f46fda6
[ "BSD-2-Clause" ]
null
null
null
# coding:utf-8 from captcha.image import ImageCaptcha # pip install captcha import numpy as np import matplotlib.pyplot as plt from PIL import Image import random import time import sys from constants import number from constants import alphabet from constants import ALPHABET # 验证码一般都无视大小写;验证码长度4个字符 def random_capt...
26.591549
81
0.643538
from captcha.image import ImageCaptcha import numpy as np import matplotlib.pyplot as plt from PIL import Image import random import time import sys from constants import number from constants import alphabet from constants import ALPHABET def random_captcha_text(char_set=number + alphabet + ALPHABET, captcha_size=...
true
true
f7740e11f53221026921f2fb6b58b47b9c48e400
5,333
py
Python
data.py
yoheikikuta/a-primer-on-adversarial-examples
1f4bea303b01b140b3a022cc7448ad3daaae3447
[ "MIT" ]
31
2020-02-27T12:40:30.000Z
2020-12-25T17:57:20.000Z
data.py
yoheikikuta/a-primer-on-adversarial-examples
1f4bea303b01b140b3a022cc7448ad3daaae3447
[ "MIT" ]
null
null
null
data.py
yoheikikuta/a-primer-on-adversarial-examples
1f4bea303b01b140b3a022cc7448ad3daaae3447
[ "MIT" ]
null
null
null
import random from abc import ABC, abstractmethod import torch import torchvision import torchvision.transforms as transforms import torchvision.transforms.functional as F class Data(ABC): """Data represents an abstract class providing interfaces. Attributes ---------- base_dit str : base directory ...
32.321212
85
0.585037
import random from abc import ABC, abstractmethod import torch import torchvision import torchvision.transforms as transforms import torchvision.transforms.functional as F class Data(ABC): base_dir = "./data" def __init__(self, batch_size, num_workers): self.batch_size = batch_size self.num_...
true
true
f7740e7ee273ae2c6e73abd12d034d4be4e63333
33,226
py
Python
pysnmp-with-texts/Inverter-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Inverter-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Inverter-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Inverter-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Inverter-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:58:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
117.822695
3,645
0.758442
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.impo...
true
true
f7740f72bbe8a476ad367140235fd9b2a398ed59
7,856
py
Python
clue/clue-thermal-camera.py
dglaude/circuitpython-examples
7ab5b4212be4a7e1baea0e0783c365dd9c35ac4f
[ "MIT" ]
8
2019-02-21T02:55:57.000Z
2022-03-27T00:19:26.000Z
clue/clue-thermal-camera.py
dglaude/circuitpython-examples
7ab5b4212be4a7e1baea0e0783c365dd9c35ac4f
[ "MIT" ]
null
null
null
clue/clue-thermal-camera.py
dglaude/circuitpython-examples
7ab5b4212be4a7e1baea0e0783c365dd9c35ac4f
[ "MIT" ]
1
2020-09-30T20:03:40.000Z
2020-09-30T20:03:40.000Z
### clue-thermal-camera v0.6 ### Thermal camera display on CLUE or PyPortal ### This plots an 8833 8x8 thermal infrared sensor on the CLUE ### using ulab to interpolate the image ### Tested with an Adafruit CLUE (Alpha) and CircuitPython and 5.3.0 ### and PyPortal and 5.3.1 ### copy this file to CLUE board as code.py...
29.204461
94
0.63442
import time import board import busio import terminalio import displayio import array from adafruit_display_text.label import Label import adafruit_amg88xx debug = 1 display = board.DISPLAY DISPLAY_WIDTH = display.width DISPLAY_HEIGHT = display.height i2c = busio.I2C(board.SCL, board.SDA) amg = adafruit_am...
true
true
f77412d9518b239fdbaa24abfa63fe7ab1b4fed2
645
py
Python
setup.py
nopcho/highedin
4a57898b4c2b1823eed78692aa0f8c66ab7398c9
[ "MIT" ]
null
null
null
setup.py
nopcho/highedin
4a57898b4c2b1823eed78692aa0f8c66ab7398c9
[ "MIT" ]
1
2021-11-09T04:48:44.000Z
2021-11-09T04:48:44.000Z
setup.py
nopcho/highedin
4a57898b4c2b1823eed78692aa0f8c66ab7398c9
[ "MIT" ]
1
2022-03-25T05:37:49.000Z
2022-03-25T05:37:49.000Z
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') # get version from __version__ variable in highedin/__init__.py from highedin import __version__ as version setup( name='highedin', version=version, description=...
30.714286
158
0.782946
from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') from highedin import __version__ as version setup( name='highedin', version=version, description='An information system for management of teaching, research, and academic services in hi...
true
true
f774132a2280f7a38993d5b6ee2377e5da3f44c1
548
py
Python
tests/input_files/LoopSMTest/coupling_orders.py
khurtado/MG5_aMC
9cde676b0a1097058c416983017af257385fa375
[ "NCSA" ]
5
2018-10-23T14:37:18.000Z
2021-11-22T20:59:02.000Z
tests/input_files/LoopSMTest/coupling_orders.py
khurtado/MG5_aMC
9cde676b0a1097058c416983017af257385fa375
[ "NCSA" ]
26
2018-10-08T15:49:32.000Z
2020-05-15T13:33:36.000Z
tests/input_files/LoopSMTest/coupling_orders.py
khurtado/MG5_aMC
9cde676b0a1097058c416983017af257385fa375
[ "NCSA" ]
4
2019-02-18T11:42:18.000Z
2021-11-11T20:46:08.000Z
# This file was automatically created by FeynRules $Revision: 623 $ # Mathematica version: 8.0 for Mac OS X x86 (64-bit) (November 6, 2010) # Date: Thu 9 Jun 2011 17:49:34 from object_library import all_orders, CouplingOrder QCD = CouplingOrder(name = 'QCD', hierarchy = 1, exp...
32.235294
71
0.578467
from object_library import all_orders, CouplingOrder QCD = CouplingOrder(name = 'QCD', hierarchy = 1, expansion_order = 99, perturbative_expansion = 99) QED = CouplingOrder(name = 'QED', hierarchy = 2, expansion_orde...
true
true
f77413698dd791f578f38a451ee0d22bf1296e97
2,484
py
Python
Thesis@3.9.1/Lib/site-packages/django/contrib/gis/sitemaps/kml.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/contrib/gis/sitemaps/kml.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
Thesis@3.9.1/Lib/site-packages/django/contrib/gis/sitemaps/kml.py
nverbois/TFE21-232
7113837b5263b5c508bfc6903cb6982b48aa7ee4
[ "MIT" ]
null
null
null
from django.apps import apps from django.contrib.gis.db.models import GeometryField from django.contrib.sitemaps import Sitemap from django.db import models from django.urls import reverse class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = "kml" def __init__(...
33.567568
89
0.561192
from django.apps import apps from django.contrib.gis.db.models import GeometryField from django.contrib.sitemaps import Sitemap from django.db import models from django.urls import reverse class KMLSitemap(Sitemap): geo_format = "kml" def __init__(self, locations=None): self.location...
true
true
f77413a06d29838e5d48650e82ef99ecfe0a3168
16,250
py
Python
DatAnalysis.py
fenning-research-group/sentaurus_ddd
e9e7a9b86c8b87cafff0b69c4a0f83c2fe292a45
[ "MIT" ]
null
null
null
DatAnalysis.py
fenning-research-group/sentaurus_ddd
e9e7a9b86c8b87cafff0b69c4a0f83c2fe292a45
[ "MIT" ]
null
null
null
DatAnalysis.py
fenning-research-group/sentaurus_ddd
e9e7a9b86c8b87cafff0b69c4a0f83c2fe292a45
[ "MIT" ]
null
null
null
# DatAnalysis.py # Module containing data analysis functions used for the DDD model import os import re # Regular Expression package import pdb # debugger import numpy as np import matplotlib.pyplot as plt # plotting package #import readh5conc import csv import h5py from scipy import signal from scipy import interpola...
36.764706
344
0.719508
import os import re import pdb import numpy as np import matplotlib.pyplot as plt import csv import h5py from scipy import signal from scipy import interpolate import matplotlib.animation as manimation from datetime import datetime def analyzedata(filename,plotcond): fid=open(filename,"r") rawdata="" whi...
true
true
f77414a4082ceb4492d1e7db3b595453c0ec4e19
3,021
py
Python
finetune_ernie-ner.py
MilesPoupart/nju-nlp-project-2021
a3d8fe8541a426327b96751c5c4d7e41bc73a248
[ "MIT" ]
null
null
null
finetune_ernie-ner.py
MilesPoupart/nju-nlp-project-2021
a3d8fe8541a426327b96751c5c4d7e41bc73a248
[ "MIT" ]
null
null
null
finetune_ernie-ner.py
MilesPoupart/nju-nlp-project-2021
a3d8fe8541a426327b96751c5c4d7e41bc73a248
[ "MIT" ]
null
null
null
import paddle import paddlehub as hub import ast import argparse from paddlehub.datasets.base_nlp_dataset import SeqLabelingDataset class MyDataset(SeqLabelingDataset): # 数据集存放目录 base_path = 'data/data122751' # 数据集的标签列表 label_list=['B-BANK', 'I-BANK', 'B-PRODUCT', 'I-PRODUCT', 'B-COMMENTS_N', 'I-COMME...
49.52459
134
0.672956
import paddle import paddlehub as hub import ast import argparse from paddlehub.datasets.base_nlp_dataset import SeqLabelingDataset class MyDataset(SeqLabelingDataset): base_path = 'data/data122751' label_list=['B-BANK', 'I-BANK', 'B-PRODUCT', 'I-PRODUCT', 'B-COMMENTS_N', 'I-COMMENTS_N', 'B-COMMENTS_A...
true
true
f77414aa7b3191485fb04961b4b9500d71ea43ed
5,688
py
Python
datasets/setup_urbanscape.py
TOPO-EPFL/CrossLoc-Benchmark-Datasets
310ca9930e59164eecedd3e3575a4473e30a97b7
[ "MIT" ]
6
2021-12-17T05:26:05.000Z
2022-01-23T07:21:41.000Z
datasets/setup_urbanscape.py
TOPO-EPFL/CrossLoc-Benchmark-Datasets
310ca9930e59164eecedd3e3575a4473e30a97b7
[ "MIT" ]
null
null
null
datasets/setup_urbanscape.py
TOPO-EPFL/CrossLoc-Benchmark-Datasets
310ca9930e59164eecedd3e3575a4473e30a97b7
[ "MIT" ]
null
null
null
import argparse import os.path import pdb import random from setup_dataset_utils import * def get_ecef_origin(): """Shift the origin to make the value of coordinates in ECEF smaller and increase training stability""" # Warning: this is dataset specific! ori_lon, ori_lat, ori_alt = 6.5668, 46.5191, 390 ...
45.142857
116
0.67616
import argparse import os.path import pdb import random from setup_dataset_utils import * def get_ecef_origin(): ori_lon, ori_lat, ori_alt = 6.5668, 46.5191, 390 ori_x, ori_y, ori_z = pyproj.Transformer.from_crs("epsg:4979", "epsg:4978").transform(ori_lat, ori_lon, ori_alt) print('Origin XYZ: {}, {}, ...
true
true
f77414e7f834ff1f7589effbc7d92426dfc69c2e
2,665
py
Python
pymbar/tests/test_covariance.py
bdice/pymbar
22c327bcdde20f7c6256b3eb0de2efc4939e77c8
[ "MIT" ]
126
2015-03-08T11:45:51.000Z
2022-03-17T08:16:43.000Z
pymbar/tests/test_covariance.py
bdice/pymbar
22c327bcdde20f7c6256b3eb0de2efc4939e77c8
[ "MIT" ]
294
2015-01-02T17:35:24.000Z
2022-03-24T20:40:30.000Z
pymbar/tests/test_covariance.py
bdice/pymbar
22c327bcdde20f7c6256b3eb0de2efc4939e77c8
[ "MIT" ]
75
2015-01-14T13:10:33.000Z
2022-03-20T21:47:59.000Z
import numpy as np import pymbar from pymbar.utils_for_testing import eq, suppress_derivative_warnings_for_tests def load_oscillators(n_states, n_samples): name = "%dx%d oscillators" % (n_states, n_samples) O_k = np.linspace(1, 5, n_states) k_k = np.linspace(1, 3, n_states) N_k = (np.ones(n_states) * n...
37.013889
96
0.715197
import numpy as np import pymbar from pymbar.utils_for_testing import eq, suppress_derivative_warnings_for_tests def load_oscillators(n_states, n_samples): name = "%dx%d oscillators" % (n_states, n_samples) O_k = np.linspace(1, 5, n_states) k_k = np.linspace(1, 3, n_states) N_k = (np.ones(n_states) * n...
true
true
f774159befb9053978148a86d6e8c3f268419659
5,683
py
Python
_build/jupyter_execute/content/03-operations/tuples.py
ShanEllis/pythonbook
29cbf7045855c7fb281afe47bcbe31c0fce8543b
[ "MIT" ]
1
2020-06-24T21:21:51.000Z
2020-06-24T21:21:51.000Z
_build/jupyter_execute/content/03-operations/tuples.py
ShanEllis/pythonbook
29cbf7045855c7fb281afe47bcbe31c0fce8543b
[ "MIT" ]
1
2020-03-31T01:04:16.000Z
2020-03-31T01:04:16.000Z
_build/jupyter_execute/content/03-operations/tuples.py
ShanEllis/pythonbook
29cbf7045855c7fb281afe47bcbe31c0fce8543b
[ "MIT" ]
null
null
null
# Tuples Lists are not the only variable type that can store a collection of multiple elements. Like lists, **tuples** store elements of mixed type in an ordered manner. However, tuples are *immutable*. Once created, their contents can not be mutated or changed. Syntactically, tuples are specified with *parentheses* ...
32.107345
423
0.733239
Lists are not the only variable type that can store a collection of multiple elements. Like lists, **tuples** store elements of mixed type in an ordered manner. However, tuples are *immutable*. Once created, their contents can not be mutated or changed. Syntactically, tuples are specified with *parentheses* around the...
false
true
f7741631e5e44faa9154a2b21d03d79910282eb4
8,061
py
Python
readthedocs/core/views/serve.py
rainwoodman/readthedocs.org
a8814b3599537a9fa3efb9559ea2f3b652351833
[ "MIT" ]
null
null
null
readthedocs/core/views/serve.py
rainwoodman/readthedocs.org
a8814b3599537a9fa3efb9559ea2f3b652351833
[ "MIT" ]
null
null
null
readthedocs/core/views/serve.py
rainwoodman/readthedocs.org
a8814b3599537a9fa3efb9559ea2f3b652351833
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Doc serving from Python. In production there are two modes, * Serving from public symlinks in nginx (readthedocs.org & readthedocs.com) * Serving from private symlinks in Python (readthedocs.com only) In development, we have two modes: * Serving from public symlinks in Python * Serving fro...
35.668142
123
0.692346
from __future__ import ( absolute_import, division, print_function, unicode_literals) import logging import mimetypes import os from functools import wraps from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import get_object_or_404 from djan...
true
true
f774173c0bf905a476aeb9584f34b605df4596b5
6,607
py
Python
Models/player.py
wodiu188/LoR_Master
90da2da8ce90825cddb548728ea41fb6911ece02
[ "MIT" ]
1
2021-09-23T11:34:10.000Z
2021-09-23T11:34:10.000Z
Models/player.py
wodiu188/LoR_Master
90da2da8ce90825cddb548728ea41fb6911ece02
[ "MIT" ]
null
null
null
Models/player.py
wodiu188/LoR_Master
90da2da8ce90825cddb548728ea41fb6911ece02
[ "MIT" ]
null
null
null
import Models.utility as utility import constants as cs from uiModels import DeckDetail import Models.network from uiModels import OpponentFlask class Player: def __init__(self, riot, leaderboard): self.sortedDecksCode = [] self.riot = riot self.summary = {} self.historyFlask = Opp...
39.327381
119
0.521265
import Models.utility as utility import constants as cs from uiModels import DeckDetail import Models.network from uiModels import OpponentFlask class Player: def __init__(self, riot, leaderboard): self.sortedDecksCode = [] self.riot = riot self.summary = {} self.historyFlask = Opp...
true
true
f7741758beb37eb5b14a8f78c3a1a53a4c795423
405
py
Python
django_webpack/wsgi.py
miliakhaled/django_webpack_react
e130349eadd0058e1a9a75e0ac855f4f1af3455a
[ "MIT" ]
null
null
null
django_webpack/wsgi.py
miliakhaled/django_webpack_react
e130349eadd0058e1a9a75e0ac855f4f1af3455a
[ "MIT" ]
5
2021-03-09T14:20:24.000Z
2022-02-26T16:18:15.000Z
django_webpack/wsgi.py
miliakhaled/django_webpack_react
e130349eadd0058e1a9a75e0ac855f4f1af3455a
[ "MIT" ]
null
null
null
""" WSGI config for django_webpack 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', 'django_webpack.settings') application = get_wsgi_application()
true
true
f77417fb4dd99aeb640a8d59031ed0e65fa13c76
1,229
py
Python
User_Emulation/user_posting_emulation.py
VBamgbaye/Pintrest_project
a07e3f33ccc3b14f57e6b5f03c9304feeadec636
[ "MIT" ]
null
null
null
User_Emulation/user_posting_emulation.py
VBamgbaye/Pintrest_project
a07e3f33ccc3b14f57e6b5f03c9304feeadec636
[ "MIT" ]
null
null
null
User_Emulation/user_posting_emulation.py
VBamgbaye/Pintrest_project
a07e3f33ccc3b14f57e6b5f03c9304feeadec636
[ "MIT" ]
null
null
null
import requests from time import sleep import random from multiprocessing import Process import boto3 import json import sqlalchemy random.seed(100) class AWSDBConnector: def __init__(self): self.HOST = "pinterestdbreadonly.cq2e8zno855e.eu-west-1.rds.amazonaws.com" self.USER =...
25.604167
146
0.655818
import requests from time import sleep import random from multiprocessing import Process import boto3 import json import sqlalchemy random.seed(100) class AWSDBConnector: def __init__(self): self.HOST = "pinterestdbreadonly.cq2e8zno855e.eu-west-1.rds.amazonaws.com" self.USER =...
true
true
f7741816cf3fa458dc63bbfc3c048533b4312bfe
2,761
py
Python
mmdet/ops/nms/setup.py
xunhen/HRNet-Object-Detection
44f641da00810c61e217c1080ef1b45d39df484f
[ "Apache-2.0" ]
null
null
null
mmdet/ops/nms/setup.py
xunhen/HRNet-Object-Detection
44f641da00810c61e217c1080ef1b45d39df484f
[ "Apache-2.0" ]
null
null
null
mmdet/ops/nms/setup.py
xunhen/HRNet-Object-Detection
44f641da00810c61e217c1080ef1b45d39df484f
[ "Apache-2.0" ]
null
null
null
import os.path as osp from setuptools import setup, Extension import numpy as np from Cython.Build import cythonize from Cython.Distutils import build_ext from torch.utils.cpp_extension import BuildExtension, CUDAExtension ext_args = dict( include_dirs=[np.get_include()], language='c++', extra_compile_arg...
31.735632
79
0.668598
import os.path as osp from setuptools import setup, Extension import numpy as np from Cython.Build import cythonize from Cython.Distutils import build_ext from torch.utils.cpp_extension import BuildExtension, CUDAExtension ext_args = dict( include_dirs=[np.get_include()], language='c++', extra_compile_arg...
true
true
f7741841de064af80e17ed0d35d74fd5e9ae5152
1,313
py
Python
azure/mgmt/network/v2017_09_01/models/vpn_device_script_parameters.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/network/v2017_10_01/models/vpn_device_script_parameters.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_10_01/models/vpn_device_script_parameters.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.472222
79
0.618431
from msrest.serialization import Model class VpnDeviceScriptParameters(Model): _attribute_map = { 'vendor': {'key': 'vendor', 'type': 'str'}, 'device_family': {'key': 'deviceFamily', 'type': 'str'}, 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, } def __init__(se...
true
true
f774186a1dc7c0af6502c56180d243394b7567bb
8,979
py
Python
epilines.py
mrsempress/stereo
c7465e92d9d03f73c13011125bdd02c33def6c19
[ "MIT" ]
1
2019-05-05T02:56:26.000Z
2019-05-05T02:56:26.000Z
epilines.py
mrsempress/stereo
c7465e92d9d03f73c13011125bdd02c33def6c19
[ "MIT" ]
null
null
null
epilines.py
mrsempress/stereo
c7465e92d9d03f73c13011125bdd02c33def6c19
[ "MIT" ]
null
null
null
""" It is for Epipolar geometry """ import numpy as np import cv2 from matplotlib import pyplot as plt def Epipolar_geometry(leftpath, rightpath): """ :param leftpath: The path of left images :param rightpath: The path of right images :return: """ # objP = np.zeros((6 * 7, 3), np.float32) ...
36.205645
115
0.633478
import numpy as np import cv2 from matplotlib import pyplot as plt def Epipolar_geometry(leftpath, rightpath): imgl = cv2.imread(leftpath, 0) imgr = cv2.imread(rightpath, 0) id = leftpath[42:] (pts1, pts2) = findMatches(imgl, im...
true
true
f77418bdfe17a0075bdb7763b872f6215d5f5a68
1,389
py
Python
src/peers/server.py
bcgov/switchover-agent
cdd70fc838148c8cfb557ace624ee5ebfb6681d9
[ "Apache-2.0" ]
null
null
null
src/peers/server.py
bcgov/switchover-agent
cdd70fc838148c8cfb557ace624ee5ebfb6681d9
[ "Apache-2.0" ]
3
2021-12-22T12:28:55.000Z
2021-12-22T12:29:18.000Z
src/peers/server.py
bcgov/switchover-agent
cdd70fc838148c8cfb557ace624ee5ebfb6681d9
[ "Apache-2.0" ]
null
null
null
import sys import traceback import json import time import asyncio import logging import pprint import ssl import pathlib import functools import websockets import threading import random logger = logging.getLogger(__name__) async def hello(websocket, path, q): while True: try: message_str...
26.711538
81
0.697624
import sys import traceback import json import time import asyncio import logging import pprint import ssl import pathlib import functools import websockets import threading import random logger = logging.getLogger(__name__) async def hello(websocket, path, q): while True: try: message_str...
true
true
f7741a0e15711d794d01c565931020c369992a23
1,085
py
Python
gui/stats.py
janaSunrise/MNIST-Digit-Recognizer-Tensorflow
7ea1b128bc8cd7d2f59749f7a9882c6551359dc3
[ "Apache-2.0" ]
3
2021-05-07T09:40:55.000Z
2021-05-08T10:31:06.000Z
gui/stats.py
janaSunrise/MNIST-Digit-Recognizer-Tensorflow
7ea1b128bc8cd7d2f59749f7a9882c6551359dc3
[ "Apache-2.0" ]
null
null
null
gui/stats.py
janaSunrise/MNIST-Digit-Recognizer-Tensorflow
7ea1b128bc8cd7d2f59749f7a9882c6551359dc3
[ "Apache-2.0" ]
1
2021-05-11T03:57:58.000Z
2021-05-11T03:57:58.000Z
from tkinter import * from tkinter.ttk import * class Stats: def __init__(self, gui) -> None: self.gui = gui self.bars, self.labels = [None] * 10, [None] * 10 def init(self) -> None: for i in range(10): self.labels[i] = LabelFrame(self.gui, text=str(i)) self.b...
26.463415
71
0.486636
from tkinter import * from tkinter.ttk import * class Stats: def __init__(self, gui) -> None: self.gui = gui self.bars, self.labels = [None] * 10, [None] * 10 def init(self) -> None: for i in range(10): self.labels[i] = LabelFrame(self.gui, text=str(i)) self.b...
true
true
f7741a6e433ae721bb61bdf368dafe2c5a00bc7c
1,532
py
Python
Yearly_Sip_calculator.py
vednatnaik/sip_calculator
84da3c5c314f4da27dea2bccc0c05620cd18ec6c
[ "MIT" ]
null
null
null
Yearly_Sip_calculator.py
vednatnaik/sip_calculator
84da3c5c314f4da27dea2bccc0c05620cd18ec6c
[ "MIT" ]
null
null
null
Yearly_Sip_calculator.py
vednatnaik/sip_calculator
84da3c5c314f4da27dea2bccc0c05620cd18ec6c
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('WebAgg') from matplotlib import pyplot as plt def sip_calculator (sip_amount, years, IntrestRate): current_amount = sip_amount current_amount = sip_amount + (current_amount * IntrestRate) / 100 print(f"first month return {current_amount}") for n in range(...
30.039216
80
0.646214
import matplotlib matplotlib.use('WebAgg') from matplotlib import pyplot as plt def sip_calculator (sip_amount, years, IntrestRate): current_amount = sip_amount current_amount = sip_amount + (current_amount * IntrestRate) / 100 print(f"first month return {current_amount}") for n in range(...
true
true
f7741a8d4c661d42e731c12fe7bfe6d3958e6845
4,801
py
Python
docs/conf.py
djfrancesco/PyInspire
52019cfc4d70a5c4537b5d46619b889739c7bc75
[ "MIT" ]
null
null
null
docs/conf.py
djfrancesco/PyInspire
52019cfc4d70a5c4537b5d46619b889739c7bc75
[ "MIT" ]
11
2020-02-25T10:31:07.000Z
2020-02-27T12:52:05.000Z
docs/conf.py
djfrancesco/PyInspire
52019cfc4d70a5c4537b5d46619b889739c7bc75
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # pymeteofr documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
29.453988
77
0.682774
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'PyMeteoFr' copyright = "2020, Architecture & Performance" author = "Francois Pacull" # for |version| a...
true
true
f7741ab9a16037b73ae4638ee28c1ea84daeae48
1,912
py
Python
openpifpaf_posetrack/transforms/scale.py
vita-epfl/openpifpaf_posetrack
282ba063450d523728637167420d9ade4d9c1e65
[ "MIT" ]
9
2021-03-04T04:47:27.000Z
2021-03-30T01:48:55.000Z
openpifpaf_posetrack/transforms/scale.py
vita-epfl/openpifpaf_posetrack
282ba063450d523728637167420d9ade4d9c1e65
[ "MIT" ]
4
2021-03-16T03:24:27.000Z
2021-04-01T19:22:02.000Z
openpifpaf_posetrack/transforms/scale.py
vita-epfl/openpifpaf_posetrack
282ba063450d523728637167420d9ade4d9c1e65
[ "MIT" ]
null
null
null
import logging import numpy as np import PIL import openpifpaf from openpifpaf.transforms.scale import _scale LOG = logging.getLogger(__name__) class ScaleMix(openpifpaf.transforms.Preprocess): def __init__(self, scale_threshold, *, upscale_factor=2.0, downscale_factor=0.5, ...
33.54386
84
0.592573
import logging import numpy as np import PIL import openpifpaf from openpifpaf.transforms.scale import _scale LOG = logging.getLogger(__name__) class ScaleMix(openpifpaf.transforms.Preprocess): def __init__(self, scale_threshold, *, upscale_factor=2.0, downscale_factor=0.5, ...
true
true
f7741ac14cfac28ebeb66217a0464144b6af5d4f
2,604
py
Python
users/models.py
DistrictDataLabs/minimum-entropy
f27f0bf5d01e122fda76e3cb27bbe4b36f3e782a
[ "Apache-2.0" ]
14
2016-12-28T05:56:38.000Z
2021-04-11T00:12:16.000Z
users/models.py
DistrictDataLabs/minimum-entropy
f27f0bf5d01e122fda76e3cb27bbe4b36f3e782a
[ "Apache-2.0" ]
32
2016-07-05T18:44:46.000Z
2016-08-15T14:46:36.000Z
users/models.py
DistrictDataLabs/minimum-entropy
f27f0bf5d01e122fda76e3cb27bbe4b36f3e782a
[ "Apache-2.0" ]
4
2016-08-09T20:52:13.000Z
2020-03-04T00:38:27.000Z
# users.models # Contains additional User profile data but no authentication # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Thu Jan 15 16:50:01 2015 -0500 # # Copyright (C) 2016 District Data Labs # For license information, see LICENSE.txt # # ID: models.py [70aac9d] benjamin@bengfort.com ...
31.756098
77
0.584869
from django.db import models from minent.utils import nullable from urllib.parse import urlencode from django.contrib.auth.models import User from django.core.urlresolvers import reverse class Profile(models.Model): user = models.OneToOneField(User, editable=False) email_hash = models.CharFiel...
true
true