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
f753da9ab0c864c074b64fa5fd7a3a0beec20a9e
93,502
py
Python
oamap/schema.py
diana-hep/shredtypes
bb7c17eea849f8934c449c3fa260af54b3532736
[ "BSD-3-Clause" ]
1
2017-10-11T17:29:22.000Z
2017-10-11T17:29:22.000Z
oamap/schema.py
diana-hep/shredtypes
bb7c17eea849f8934c449c3fa260af54b3532736
[ "BSD-3-Clause" ]
null
null
null
oamap/schema.py
diana-hep/shredtypes
bb7c17eea849f8934c449c3fa260af54b3532736
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2017, DIANA-HEP # 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 ...
40.794939
406
0.579581
import bisect import codecs import copy import fnmatch import json import numbers import re import sys from types import ModuleType import numpy import oamap.generator import oamap.inference import oamap.backend.packing import oamap.extension.common import oamap.proxy import oamap.util from oamap.util import Ordere...
true
true
f753dabe0c2ebc6d0ae1217b707851ffe4c8fd5f
1,970
py
Python
vistrails/db/versions/v0_3_0/domain/__init__.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
83
2015-01-05T14:50:50.000Z
2021-09-17T19:45:26.000Z
vistrails/db/versions/v0_3_0/domain/__init__.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
254
2015-01-02T20:39:19.000Z
2018-11-28T17:16:44.000Z
vistrails/db/versions/v0_3_0/domain/__init__.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
40
2015-04-17T16:46:36.000Z
2021-09-28T22:43:24.000Z
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
49.25
79
0.698985
## 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 following disclaimer. ## - Redistributions in binary form must reproduce the above copyright ## notice, this list of co...
true
true
f753db33484c4f6964b9258f0acb59742acc2d5d
1,573
py
Python
blog/urls.py
hossshakiba/Django-Personal-Website-Blog
6f75a7b7d8778e556305a883f23b04d526a8d5fd
[ "MIT" ]
2
2021-01-01T08:30:39.000Z
2021-01-01T08:35:39.000Z
blog/urls.py
hossshakiba/Django-Personal-Website-Blog
6f75a7b7d8778e556305a883f23b04d526a8d5fd
[ "MIT" ]
null
null
null
blog/urls.py
hossshakiba/Django-Personal-Website-Blog
6f75a7b7d8778e556305a883f23b04d526a8d5fd
[ "MIT" ]
null
null
null
"""blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
36.581395
79
0.691036
from django.contrib import admin from django.urls import path, include, re_path from .views import home_page, header, footer, resume_page, custom404, custom500 from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', home_page), path('resume', resume_page), path(...
true
true
f753db8d67d4a01abb26ffe1b2c8e5a9aa8e0bb5
2,045
py
Python
autotest/gdrivers/gtx.py
tbonfort/gdal
173e0659bc3f2e6b97c2c07332a3066478afb821
[ "MIT" ]
1
2015-04-21T19:52:03.000Z
2015-04-21T19:52:03.000Z
autotest/gdrivers/gtx.py
tbonfort/gdal
173e0659bc3f2e6b97c2c07332a3066478afb821
[ "MIT" ]
7
2018-04-09T09:35:42.000Z
2018-05-22T06:54:05.000Z
autotest/gdrivers/gtx.py
pramsey/gdal
965421b79fe4d3332b0f2f633b072fdcab2b700a
[ "MIT" ]
2
2018-05-03T15:34:36.000Z
2020-07-13T15:30:20.000Z
#!/usr/bin/env python ############################################################################### # $Id: gsc.py 16265 2009-02-08 11:15:27Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GSC driver # Author: Frank Warmerdam <warmerdam@pobox.com> # #####################################################...
35.877193
79
0.616626
import sys sys.path.append( '../pymod' ) import gdaltest def gtx_1(): tst = gdaltest.GDALTest( 'GTX', 'hydroc1.gtx', 1, 64183 ) gt = (276.725, 0.05, 0.0, 42.775, 0.0, -0.05) return tst.testOpen( check_gt = gt, check_prj = 'WGS84' ) gdaltest_list = [ gtx_1 ] if __name__ == '__main__': gdalte...
true
true
f753dce059b9454c2a984fb6eef6bcc48f6651e1
4,459
py
Python
tests/test_maintainence.py
domoritz/solas
23878fed9efbf14781791dafec26705c6762cfd1
[ "Apache-2.0" ]
2
2021-11-09T17:54:43.000Z
2022-01-28T15:38:58.000Z
tests/test_maintainence.py
domoritz/solas
23878fed9efbf14781791dafec26705c6762cfd1
[ "Apache-2.0" ]
27
2021-04-08T18:58:49.000Z
2021-10-11T02:33:35.000Z
tests/test_maintainence.py
domoritz/solas
23878fed9efbf14781791dafec26705c6762cfd1
[ "Apache-2.0" ]
1
2021-06-18T02:41:48.000Z
2021-06-18T02:41:48.000Z
# Copyright 2019-2020 The Solas Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
41.287037
145
0.726396
from .context import solas import pytest import pandas as pd from solas.vis.Vis import Vis def test_metadata_subsequent_display(global_var): df = pytest.car_df df._ipython_display_() assert df._metadata_fresh == True, "Failed to maintain metadata after display df" df._ipython_display_() assert d...
true
true
f753dd81a8b6908afab669d837c56259a0fabf19
7,868
py
Python
PriceHero/__init__.py
mehtaarn000/PriceHero
ef4429b84c1460532aeca5e9c7f15b110456b989
[ "MIT" ]
8
2020-09-06T23:56:46.000Z
2021-12-12T03:18:51.000Z
PriceHero/__init__.py
mehtaarn000/PriceHero
ef4429b84c1460532aeca5e9c7f15b110456b989
[ "MIT" ]
9
2020-09-27T01:19:58.000Z
2021-11-25T19:53:50.000Z
PriceHero/__init__.py
mehtaarn000/PriceHero
ef4429b84c1460532aeca5e9c7f15b110456b989
[ "MIT" ]
5
2020-09-19T05:16:46.000Z
2021-04-18T22:51:37.000Z
# -*- coding: utf-8 -*- __version__ = "0.5.9" __author__ = "mehtaarn000" __license__ = "MIT" __maintainer__ = "mehtaarn000" __credits__ = ["mehtaarn000", "kilianalias", "nethracookie", "bizzyvinci"] """A python module that will allow users to get product prices information from a multitude of different websites.""" fr...
26.761905
117
0.699288
__version__ = "0.5.9" __author__ = "mehtaarn000" __license__ = "MIT" __maintainer__ = "mehtaarn000" __credits__ = ["mehtaarn000", "kilianalias", "nethracookie", "bizzyvinci"] from . import (_amazon, _bestbuy, _dell, _michaels, _acer, _walmart, _adafruit, _xbox, _joann, _github_shop, _chess_shop, _newegg...
true
true
f753de26921a60e86ed6149eeffc5e2f183fc5d3
76,281
py
Python
zarr/core.py
yetyetanotherusername/zarr-python
e3cdd1a50e1047304be2c91a017da6362f8df533
[ "MIT" ]
1
2020-11-12T15:16:28.000Z
2020-11-12T15:16:28.000Z
zarr/core.py
yetyetanotherusername/zarr-python
e3cdd1a50e1047304be2c91a017da6362f8df533
[ "MIT" ]
null
null
null
zarr/core.py
yetyetanotherusername/zarr-python
e3cdd1a50e1047304be2c91a017da6362f8df533
[ "MIT" ]
null
null
null
import binascii import hashlib import itertools import math import operator import re from functools import reduce import numpy as np from numcodecs.compat import ensure_bytes, ensure_ndarray from zarr.attrs import Attributes from zarr.codecs import AsType, get_codec from zarr.errors import ArrayNotFoundError, ReadOn...
33.093709
93
0.5324
import binascii import hashlib import itertools import math import operator import re from functools import reduce import numpy as np from numcodecs.compat import ensure_bytes, ensure_ndarray from zarr.attrs import Attributes from zarr.codecs import AsType, get_codec from zarr.errors import ArrayNotFoundError, ReadOn...
true
true
f753de988f5e6bf770ca3540afaefcc58a4737a2
117
py
Python
src/kernel/__init__.py
Mimalef/paasta
33c1abddc37e6ecf573beb3ea691a941b082d4c5
[ "MIT" ]
null
null
null
src/kernel/__init__.py
Mimalef/paasta
33c1abddc37e6ecf573beb3ea691a941b082d4c5
[ "MIT" ]
null
null
null
src/kernel/__init__.py
Mimalef/paasta
33c1abddc37e6ecf573beb3ea691a941b082d4c5
[ "MIT" ]
null
null
null
def logged(): from flask import session try: if session['id']: return True except Exception: return False
14.625
26
0.692308
def logged(): from flask import session try: if session['id']: return True except Exception: return False
true
true
f753debb505d2689221ee3e0cd08215b866a5afe
260
py
Python
code/handlers/local_handler.py
hfiuza/ApartmentFinder
476b5364f9ea807037e374934b0b14959143addd
[ "MIT" ]
2
2019-08-28T16:47:21.000Z
2019-09-01T17:01:25.000Z
code/handlers/local_handler.py
hfiuza/ApartmentFinder
476b5364f9ea807037e374934b0b14959143addd
[ "MIT" ]
null
null
null
code/handlers/local_handler.py
hfiuza/ApartmentFinder
476b5364f9ea807037e374934b0b14959143addd
[ "MIT" ]
null
null
null
import pandas as pd import os from constants import LOCAL_PATH, APARTMENTS_FILENAME def basic_write(df): df.to_csv(os.path.join(LOCAL_PATH, APARTMENTS_FILENAME)) def basic_read(): return pd.read_csv(os.path.join(LOCAL_PATH, APARTMENTS_FILENAME))
18.571429
69
0.780769
import pandas as pd import os from constants import LOCAL_PATH, APARTMENTS_FILENAME def basic_write(df): df.to_csv(os.path.join(LOCAL_PATH, APARTMENTS_FILENAME)) def basic_read(): return pd.read_csv(os.path.join(LOCAL_PATH, APARTMENTS_FILENAME))
true
true
f753dec38e61b4ba92214293c5f48ea40cd8a330
896
py
Python
4304486_b/rank_soldiers.py
e-lin/Codejam
b249387b00cba11074b6cb3c7d9100c14b61ee9f
[ "Apache-2.0" ]
null
null
null
4304486_b/rank_soldiers.py
e-lin/Codejam
b249387b00cba11074b6cb3c7d9100c14b61ee9f
[ "Apache-2.0" ]
null
null
null
4304486_b/rank_soldiers.py
e-lin/Codejam
b249387b00cba11074b6cb3c7d9100c14b61ee9f
[ "Apache-2.0" ]
null
null
null
def read_file(filename): with open(filename) as fd: input_list = fd.read().splitlines() print input_list return input_list import sys def main(argv): if not argv: print "Enter filename." sys.exit() filename = argv[0] input_list = read_file(filename + '.in') f = o...
21.333333
48
0.506696
def read_file(filename): with open(filename) as fd: input_list = fd.read().splitlines() print input_list return input_list import sys def main(argv): if not argv: print "Enter filename." sys.exit() filename = argv[0] input_list = read_file(filename + '.in') f = o...
false
true
f753dfd925fba9791c26845f052a9e59590e1a42
609
py
Python
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/a/anomalous_backslash_escape.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
463
2015-01-15T08:17:42.000Z
2022-03-28T15:10:20.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/a/anomalous_backslash_escape.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
52
2015-01-06T02:43:59.000Z
2022-03-14T11:15:21.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/a/anomalous_backslash_escape.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
249
2015-01-07T22:49:49.000Z
2022-03-18T02:32:06.000Z
"""Test for anomalous backslash escapes in strings""" BAD_ESCAPE = '\z' # [anomalous-backslash-in-string] BAD_ESCAPE_NOT_FIRST = 'abc\z' # [anomalous-backslash-in-string] BAD_ESCAPE_WITH_PREFIX = b'abc\z' # [anomalous-backslash-in-string] BAD_ESCAPE_WITH_BACKSLASH = b'a\ \z' # [anomalous-backslash-in-string] ...
27.681818
68
0.681445
BAD_ESCAPE = '\z' BAD_ESCAPE_NOT_FIRST = 'abc\z' BAD_ESCAPE_WITH_PREFIX = b'abc\z' BAD_ESCAPE_WITH_BACKSLASH = b'a\ \z' BAD_ESCAPE_BLOCK = b''' abc \z ''' BAD_ESCAPE_PARENS = (b'abc' b'\z') GOOD_ESCAPE = '\b' BAD_ESCAPE_BUT_RAW = r'\z'
true
true
f753dffc2fb865ec5ac4199a5e21df845c7e2b12
1,244
py
Python
00_LIBRARIES/00_NUMPY/03_numpy_manipulations.py
san99tiago/ML_BASICS
ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f
[ "MIT" ]
2
2021-03-18T06:07:09.000Z
2021-05-08T22:14:14.000Z
00_LIBRARIES/00_NUMPY/03_numpy_manipulations.py
san99tiago/ML_BASICS
ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f
[ "MIT" ]
null
null
null
00_LIBRARIES/00_NUMPY/03_numpy_manipulations.py
san99tiago/ML_BASICS
ebd51827f7dd427c848b5c8e1d4bfd017d2fb56f
[ "MIT" ]
null
null
null
# NUMPY MANIPULATIONS OF ARRAYS # Santiago Garcia Arango # ------------------------------------------------------------------------- import numpy as np my_array = np.arange(1, 11) # [1,2,..,8,9,10] print("my_array=\n", my_array, "\n") # -----------------CHECKING CONDITIONS IN ARRAY ITEMS---------------------- # FIR...
32.736842
75
0.596463
import numpy as np my_array = np.arange(1, 11) print("my_array=\n", my_array, "\n") boolean_array = my_array > 5 print("my_array > 5 --> ", boolean_array, "\n") print("my_array[boolean_array] = ", my_array[boolean_array], "\n") print("my_array[my_array>5] = ", my_array[my_array > 5], "\n") cool_matrix = np.ones...
true
true
f753e1763a267af6ca23320c4cb19fdf7d633911
8,534
py
Python
deepcave/plugins/static_plugin.py
PhMueller/DeepCAVE
2aec109470e667d4bbbe0cd0d9abb11e683a23c4
[ "Apache-2.0" ]
null
null
null
deepcave/plugins/static_plugin.py
PhMueller/DeepCAVE
2aec109470e667d4bbbe0cd0d9abb11e683a23c4
[ "Apache-2.0" ]
null
null
null
deepcave/plugins/static_plugin.py
PhMueller/DeepCAVE
2aec109470e667d4bbbe0cd0d9abb11e683a23c4
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from typing import Dict, List, Any, Type, Union, Optional, Tuple from dash.dash import no_update from dash.dependencies import Input, Output, State from dash import dcc import dash_bootstrap_components as dbc from dash import html from dash.development.base_component import Componen...
34.832653
91
0.515585
from abc import ABC, abstractmethod from typing import Dict, List, Any, Type, Union, Optional, Tuple from dash.dash import no_update from dash.dependencies import Input, Output, State from dash import dcc import dash_bootstrap_components as dbc from dash import html from dash.development.base_component import Componen...
true
true
f753e3c6261a250b36925a736ea0679e6dc8cc62
3,682
py
Python
sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/avro_serializer.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/avro_serializer.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/avro_serializer.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
41.840909
139
0.731668
import os from azure.identity import ClientSecretCredential from azure.schemaregistry import SchemaRegistryClient from azure.schemaregistry.serializer.avroserializer import AvroSerializer TENANT_ID=os.environ['AZURE_TENANT_ID'] CLIENT_ID=os.environ['AZURE_CLIENT_ID'] CLIENT_SECRET=os.environ['AZURE_CLIENT_SECRET'] S...
true
true
f753e46efeb71e959158b882f9354523c5aaf56d
768
py
Python
utils/clean_invalid.py
1105042987/Dominant-Patterns
713b535e80aff0f04e20d1ef56d005e183a5d8a5
[ "MIT" ]
1
2021-06-14T12:01:24.000Z
2021-06-14T12:01:24.000Z
utils/clean_invalid.py
1105042987/Dominant-Patterns
713b535e80aff0f04e20d1ef56d005e183a5d8a5
[ "MIT" ]
null
null
null
utils/clean_invalid.py
1105042987/Dominant-Patterns
713b535e80aff0f04e20d1ef56d005e183a5d8a5
[ "MIT" ]
null
null
null
import sys,os base = sys.path[0] sys.path.append(os.path.abspath(os.path.join(base, ".."))) import json5 import shutil from glob import glob from docker.tool import yellow with open('RootPath.json') as f: root = json5.load(f)[r'%RESULT%'] assert len(sys.argv)>1, 'Project Name Needed!' tars = glob(os.path.join(root...
28.444444
75
0.626302
import sys,os base = sys.path[0] sys.path.append(os.path.abspath(os.path.join(base, ".."))) import json5 import shutil from glob import glob from docker.tool import yellow with open('RootPath.json') as f: root = json5.load(f)[r'%RESULT%'] assert len(sys.argv)>1, 'Project Name Needed!' tars = glob(os.path.join(root...
true
true
f753e56e67e11920f96f1eb323d92363439a14d0
8,227
py
Python
pymo/viz_tools.py
onyalcin/PyMO
1d49620096b7f81b6db0cd4ed427cd7496bd5f99
[ "MIT" ]
224
2017-11-30T19:02:44.000Z
2022-03-19T23:02:47.000Z
pymo/viz_tools.py
onyalcin/PyMO
1d49620096b7f81b6db0cd4ed427cd7496bd5f99
[ "MIT" ]
15
2018-01-12T15:52:43.000Z
2021-12-06T13:55:50.000Z
pymo/viz_tools.py
onyalcin/PyMO
1d49620096b7f81b6db0cd4ed427cd7496bd5f99
[ "MIT" ]
49
2017-12-16T13:32:49.000Z
2021-12-13T15:59:52.000Z
import pandas as pd import numpy as np import matplotlib.pyplot as plt import IPython import os def save_fig(fig_id, tight_layout=True): if tight_layout: plt.tight_layout() plt.savefig(fig_id + '.png', format='png', dpi=300) def draw_stickfigure(mocap_track, frame, data=None, joints=None, dra...
34.71308
131
0.557068
import pandas as pd import numpy as np import matplotlib.pyplot as plt import IPython import os def save_fig(fig_id, tight_layout=True): if tight_layout: plt.tight_layout() plt.savefig(fig_id + '.png', format='png', dpi=300) def draw_stickfigure(mocap_track, frame, data=None, joints=None, dra...
true
true
f753e86b16f5422cb99c62df2ef565445889a32e
2,116
py
Python
about.py
AP2008/novelcovid19tracker
273e9b7184a53e31e888b6ecfc7fe55c0d97e8b6
[ "MIT" ]
null
null
null
about.py
AP2008/novelcovid19tracker
273e9b7184a53e31e888b6ecfc7fe55c0d97e8b6
[ "MIT" ]
null
null
null
about.py
AP2008/novelcovid19tracker
273e9b7184a53e31e888b6ecfc7fe55c0d97e8b6
[ "MIT" ]
null
null
null
from web_scrape import * from modules import * from sidebar import * import extras external_stylesheets = [extras.theme] colors = { 'background': '#111111', 'text': '#FFFFFF' } sn = {'color':'white'} app = dash.Dash(__name__, external_stylesheets=external_stylesheets, request...
34.688525
158
0.502836
from web_scrape import * from modules import * from sidebar import * import extras external_stylesheets = [extras.theme] colors = { 'background': '#111111', 'text': '#FFFFFF' } sn = {'color':'white'} app = dash.Dash(__name__, external_stylesheets=external_stylesheets, request...
true
true
f753e89d802aaec181cac7f2510a29ea56b17b99
956
py
Python
test/test_anchor_target_layer.py
anhlt/faster_rcnn
97bf8a153db704cba9b2d753bf87ec2fa2938c84
[ "MIT" ]
24
2018-01-07T15:15:38.000Z
2021-08-17T03:39:01.000Z
test/test_anchor_target_layer.py
anhlt/faster_rcnn
97bf8a153db704cba9b2d753bf87ec2fa2938c84
[ "MIT" ]
1
2018-11-07T04:32:52.000Z
2018-11-07T04:39:14.000Z
test/test_anchor_target_layer.py
anhlt/faster_rcnn
97bf8a153db704cba9b2d753bf87ec2fa2938c84
[ "MIT" ]
5
2018-07-02T13:30:34.000Z
2021-08-17T03:39:12.000Z
from faster_rcnn.rpn_msr.anchor_target_layer_2 import AnchorTargerLayer import unittest class AnchorTargerLayerTest(unittest.TestCase): """docstring for AnchorTargerLayerTest""" def setUp(self): self.anchor_scales = [8, 16, 32] self.layer = AnchorTargerLayer( [16, ], anchor_scales...
29.875
75
0.65795
from faster_rcnn.rpn_msr.anchor_target_layer_2 import AnchorTargerLayer import unittest class AnchorTargerLayerTest(unittest.TestCase): def setUp(self): self.anchor_scales = [8, 16, 32] self.layer = AnchorTargerLayer( [16, ], anchor_scales=self.anchor_scales) def test_dump(self):...
true
true
f753e90e5df5c9070154328be349717262a72204
1,040
py
Python
app/auth/auth.py
faithngetich/Buckectlist
f7503d2de93d733a8ef44a8c36d9410d40fea4e3
[ "MIT" ]
null
null
null
app/auth/auth.py
faithngetich/Buckectlist
f7503d2de93d733a8ef44a8c36d9410d40fea4e3
[ "MIT" ]
1
2017-05-27T19:52:14.000Z
2017-05-29T08:52:50.000Z
app/auth/auth.py
faithngetich/Buckectlist
f7503d2de93d733a8ef44a8c36d9410d40fea4e3
[ "MIT" ]
null
null
null
from app.models import User from flask_restful import Resource, reqparse from sqlalchemy.orm.exc import NoResultFound from flask import request, jsonify, make_response def identity(payload): username = payload['identity'] return User.query.filter_by(id = username).first() def authenticate(username, password):...
38.518519
103
0.718269
from app.models import User from flask_restful import Resource, reqparse from sqlalchemy.orm.exc import NoResultFound from flask import request, jsonify, make_response def identity(payload): username = payload['identity'] return User.query.filter_by(id = username).first() def authenticate(username, password):...
true
true
f753e94cf6f712ddbec3eacbf5ac5c774a87ae25
8,849
py
Python
peer.py
dcheno/dripdrop
ed8b3b18d0796192d0f8cfa09efd2aece078ea9b
[ "MIT" ]
null
null
null
peer.py
dcheno/dripdrop
ed8b3b18d0796192d0f8cfa09efd2aece078ea9b
[ "MIT" ]
null
null
null
peer.py
dcheno/dripdrop
ed8b3b18d0796192d0f8cfa09efd2aece078ea9b
[ "MIT" ]
null
null
null
from threading import Thread from math import ceil from struct import unpack from twisted.internet.protocol import Protocol, ClientFactory from twisted.internet import reactor from message import Message, MessageParser, MessageType, get_handshake, parse_handshake, \ is_handshake, MessageQueue, message_queue_worke...
35.115079
99
0.652842
from threading import Thread from math import ceil from struct import unpack from twisted.internet.protocol import Protocol, ClientFactory from twisted.internet import reactor from message import Message, MessageParser, MessageType, get_handshake, parse_handshake, \ is_handshake, MessageQueue, message_queue_worke...
true
true
f753e9e5768fe2ce1573d1d7f067fcd70409a27f
4,339
py
Python
src/Replicate/run.py
Dyex719/Battlecode
5ed0932b0ba18ce914725e90839a476328cb9460
[ "MIT" ]
null
null
null
src/Replicate/run.py
Dyex719/Battlecode
5ed0932b0ba18ce914725e90839a476328cb9460
[ "MIT" ]
null
null
null
src/Replicate/run.py
Dyex719/Battlecode
5ed0932b0ba18ce914725e90839a476328cb9460
[ "MIT" ]
null
null
null
# Running into logical errors :( import battlecode as bc import random import sys import traceback print("pystarting") gc = bc.GameController() directions = list(bc.Direction) print("pystarted") random.seed(8078) worker_count = 1 knight_count = 0 factory_count = 0 gc.queue_research(bc.UnitType.Worker) gc.queue_res...
32.871212
127
0.591611
import battlecode as bc import random import sys import traceback print("pystarting") gc = bc.GameController() directions = list(bc.Direction) print("pystarted") random.seed(8078) worker_count = 1 knight_count = 0 factory_count = 0 gc.queue_research(bc.UnitType.Worker) gc.queue_research(bc.UnitType.Rocket) gc.queu...
true
true
f753ea7c076152b53f7959bce657be720257a1ed
3,626
py
Python
com/gionee/ota/apps/gnApps.py
qmxiu531/OtaNeedInstalledApps
45e9d4214c721752651afd3f98b3e2363b380be4
[ "Apache-2.0" ]
1
2020-05-20T12:22:09.000Z
2020-05-20T12:22:09.000Z
com/gionee/ota/apps/gnApps.py
qmxiu531/OtaNeedInstalledApps
45e9d4214c721752651afd3f98b3e2363b380be4
[ "Apache-2.0" ]
null
null
null
com/gionee/ota/apps/gnApps.py
qmxiu531/OtaNeedInstalledApps
45e9d4214c721752651afd3f98b3e2363b380be4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import requests import os from com.gionee.ota import gol import json from com.gionee.ota.util import Util from com.gionee.ota.Base import * __author__ = 'suse' url="http://api.appgionee.com/api/gionee/getDownloadUrl?packageName=" logger = Util.logger class GN_Apps(): def __init__(self): ...
33.88785
84
0.532543
import requests import os from com.gionee.ota import gol import json from com.gionee.ota.util import Util from com.gionee.ota.Base import * __author__ = 'suse' url="http://api.appgionee.com/api/gionee/getDownloadUrl?packageName=" logger = Util.logger class GN_Apps(): def __init__(self): sel...
true
true
f753eb3edd157c89dbc3775a8c1f52f27bcf0abf
3,272
py
Python
cinder/tests/unit/volume/drivers/hpe/fake_hpe_client_exceptions.py
lightsey/cinder
e03d68e42e57a63f8d0f3e177fb4287290612b24
[ "Apache-2.0" ]
571
2015-01-01T17:47:26.000Z
2022-03-23T07:46:36.000Z
cinder/tests/unit/volume/drivers/hpe/fake_hpe_client_exceptions.py
vexata/cinder
7b84c0842b685de7ee012acec40fb4064edde5e9
[ "Apache-2.0" ]
37
2015-01-22T23:27:04.000Z
2021-02-05T16:38:48.000Z
cinder/tests/unit/volume/drivers/hpe/fake_hpe_client_exceptions.py
vexata/cinder
7b84c0842b685de7ee012acec40fb4064edde5e9
[ "Apache-2.0" ]
841
2015-01-04T17:17:11.000Z
2022-03-31T12:06:51.000Z
# (c) Copyright 2014-2015 Hewlett Packard Enterprise Development LP # 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/licens...
27.266667
78
0.629584
class UnsupportedVersion(Exception): pass class ClientException(Exception): _error_code = None _error_desc = None _error_ref = None _debug1 = None _debug2 = None def __init__(self, error=None): if error: if 'code' in error: self._error_code = error['...
true
true
f753ed620d0a7009f877dfe6d8213dc4ecb30332
21
py
Python
frederic/hello_wrapper.py
infelane/python-for-java-devs
56f313f89ad8603598f879f31e0d9a35795e50e3
[ "Apache-2.0" ]
1
2019-10-20T16:05:30.000Z
2019-10-20T16:05:30.000Z
frederic/hello_wrapper.py
infelane/python-for-java-devs
56f313f89ad8603598f879f31e0d9a35795e50e3
[ "Apache-2.0" ]
1
2020-07-10T09:09:58.000Z
2020-07-10T09:09:58.000Z
frederic/hello_wrapper.py
infelane/python-for-java-devs
56f313f89ad8603598f879f31e0d9a35795e50e3
[ "Apache-2.0" ]
3
2020-07-10T07:46:51.000Z
2022-02-21T08:58:45.000Z
import hello_world
5.25
18
0.809524
import hello_world
true
true
f753ed6de8dd644db68198081d0b67ea95645f40
7,607
py
Python
desktop/core/ext-py/Django/django/contrib/auth/views.py
civascu/hue
82f2de44789ff5a981ed725175bae7944832d1e9
[ "Apache-2.0" ]
2
2021-04-27T03:57:00.000Z
2021-06-18T09:39:58.000Z
django/contrib/auth/views.py
joetyson/django
c3699190186561d5c216b2a77ecbfc487d42a734
[ "BSD-3-Clause" ]
null
null
null
django/contrib/auth/views.py
joetyson/django
c3699190186561d5c216b2a77ecbfc487d42a734
[ "BSD-3-Clause" ]
2
2021-09-06T18:44:45.000Z
2022-02-24T04:10:10.000Z
from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm, PasswordChangeForm from django.contrib.auth.to...
46.10303
123
0.710793
from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm, PasswordChangeForm from django.contrib.auth.to...
true
true
f753ed6f8c5349911e251cc14711a2471263356c
194
py
Python
schemalite/deprecated/schemalite/__init__.py
inkmonk/jschema
fc04b5d4870ddfaa582ab04ea033d0e8d584a43a
[ "MIT" ]
1
2020-08-06T13:00:19.000Z
2020-08-06T13:00:19.000Z
schemalite/deprecated/schemalite/__init__.py
SuryaSankar/schemalite
fc04b5d4870ddfaa582ab04ea033d0e8d584a43a
[ "MIT" ]
null
null
null
schemalite/deprecated/schemalite/__init__.py
SuryaSankar/schemalite
fc04b5d4870ddfaa582ab04ea033d0e8d584a43a
[ "MIT" ]
2
2015-08-05T07:26:02.000Z
2015-10-15T09:52:25.000Z
# -*- coding: utf-8 -*- """Deprecated modules""" from .core import Schema, Field, validator, schema_validator, SchemaObjectField, ListOfSchemaObjectsField from .schema_error import SchemaError
32.333333
105
0.778351
from .core import Schema, Field, validator, schema_validator, SchemaObjectField, ListOfSchemaObjectsField from .schema_error import SchemaError
true
true
f753eda8a127fae60dda92f8d180a82e6e5e0842
36,151
py
Python
src/_analyze_semantic_line.py
SunLoveSheep/Sem-LSD
8c085217c372588fbb9ca37c5aef32d66270560f
[ "MIT" ]
5
2020-09-17T12:09:10.000Z
2022-03-09T08:30:19.000Z
src/_analyze_semantic_line.py
SunLoveSheep/Sem-LSD
8c085217c372588fbb9ca37c5aef32d66270560f
[ "MIT" ]
2
2021-04-04T11:53:37.000Z
2022-03-09T15:40:23.000Z
src/_analyze_semantic_line.py
SunLoveSheep/Sem-LSD
8c085217c372588fbb9ca37c5aef32d66270560f
[ "MIT" ]
2
2020-05-12T06:41:08.000Z
2020-06-01T07:08:16.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths # /workspace/tangyang.sy/pytorch_CV/pytorch_CenterNet/src try: from utils_ctdet.lineNMS import do_nms_line, do_acl_line, do_acl_line_v1 except ImportError: from utils.lineNMS import ...
38.788627
120
0.564936
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths try: from utils_ctdet.lineNMS import do_nms_line, do_acl_line, do_acl_line_v1 except ImportError: from utils.lineNMS import do_nms_line, do_acl_line, do_acl_line_v1 from collections...
true
true
f753ee22cdca71156f474c3f224ba3615def6cd3
1,634
py
Python
src/compas_rhino/forms/text.py
yijiangh/compas
a9e86edf6b602f47ca051fccedcaa88a5e5d3600
[ "MIT" ]
1
2019-03-27T22:46:29.000Z
2019-03-27T22:46:29.000Z
src/compas_rhino/forms/text.py
yijiangh/compas
a9e86edf6b602f47ca051fccedcaa88a5e5d3600
[ "MIT" ]
9
2019-09-11T08:53:19.000Z
2019-09-16T08:35:39.000Z
src/compas_rhino/forms/text.py
yijiangh/compas
a9e86edf6b602f47ca051fccedcaa88a5e5d3600
[ "MIT" ]
1
2022-01-16T02:32:43.000Z
2022-01-16T02:32:43.000Z
from __future__ import print_function from __future__ import absolute_import from __future__ import division import compas from compas_rhino.forms import Form try: from System.Windows.Forms import TextBox from System.Windows.Forms import DockStyle from System.Windows.Forms import ScrollBars from Syste...
25.53125
80
0.582619
from __future__ import print_function from __future__ import absolute_import from __future__ import division import compas from compas_rhino.forms import Form try: from System.Windows.Forms import TextBox from System.Windows.Forms import DockStyle from System.Windows.Forms import ScrollBars from Syste...
true
true
f753ee729c747bc8e02b5d4ea15a3a98ac9dd683
8,124
py
Python
21-fs-ias-lec/07-BackEnd/Person/Person.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
21-fs-ias-lec/07-BackEnd/Person/Person.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
21-fs-ias-lec/07-BackEnd/Person/Person.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
import sys import time sys.path.append("../Feed") sys.path.append("../lib") import crypto import feed as fe from generateJson import generate_json from Feed import Feed class Person: name = "" # name of the user id = 0 # BacNet id of the user feed = None # feed of the user (refers to Feed.py) ...
41.44898
115
0.612383
import sys import time sys.path.append("../Feed") sys.path.append("../lib") import crypto import feed as fe from generateJson import generate_json from Feed import Feed class Person: name = "" id = 0 feed = None def __init__(self, id, name, feed): self.id = id self.name = name...
true
true
f753ef4fb8885ad3633eb7a346de6dbf32d8308e
1,717
py
Python
RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusteringSequence_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusteringSequence_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusteringSequence_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms #------------------ #Hybrid clustering: #------------------ # Producer for Box Particle Flow Super Clusters from RecoEcal.EgammaClusterProducers.particleFlowSuperClusterECAL_cfi import * # Producer for energy corrections #from RecoEcal.EgammaClusterProducers.correctedDynamicHyb...
46.405405
116
0.830518
import FWCore.ParameterSet.Config as cms from RecoEcal.EgammaClusterProducers.particleFlowSuperClusterECAL_cfi import * particleFlowSuperClusteringSequence = cms.Sequence(particleFlowSuperClusterECAL) particleFlowSuperClusterHGCal = particleFlowSuperClusterECAL.clone() from Configuration.Eras.Modifier_phase2_hgcal_cf...
true
true
f753ef6ce67a860aedb18ebe21dece5ca3a659ff
1,050
py
Python
segmatch/python/display_matched_segments.py
jidebingfeng/segmatch
c662324d23b9e049fbb49b52cda7895d1a4d2798
[ "BSD-3-Clause" ]
13
2018-11-28T12:02:48.000Z
2021-12-22T01:04:49.000Z
segmatch/python/display_matched_segments.py
yuekaka/segmatch
c662324d23b9e049fbb49b52cda7895d1a4d2798
[ "BSD-3-Clause" ]
2
2019-03-03T01:50:51.000Z
2019-08-19T08:06:41.000Z
segmatch/python/display_matched_segments.py
yuekaka/segmatch
c662324d23b9e049fbb49b52cda7895d1a4d2798
[ "BSD-3-Clause" ]
8
2019-06-18T19:40:35.000Z
2020-06-15T17:43:06.000Z
from __future__ import print_function import numpy as np ## LOAD DATA ## ############### print("Loading segments.") from import_export import load_segments segments, ids = load_segments(folder="/tmp/segment_matcher/") from import_export import load_matches matches = load_matches(folder="/tmp/segment_matcher/") visua...
23.333333
61
0.62
from __future__ import print_function import numpy as np print("Loading segments.") from import_export import load_segments segments, ids = load_segments(folder="/tmp/segment_matcher/") from import_export import load_matches matches = load_matches(folder="/tmp/segment_matcher/") visualize=True print("q<Enter> to qui...
true
true
f753efb6a65817cefc6939ac015da41e58443553
836
py
Python
blog_ruicci/urls.py
nogueirarcz/blog-ruicci
ca4b8bbd31367592535fec49c5efc57f6cb69d14
[ "MIT" ]
null
null
null
blog_ruicci/urls.py
nogueirarcz/blog-ruicci
ca4b8bbd31367592535fec49c5efc57f6cb69d14
[ "MIT" ]
null
null
null
blog_ruicci/urls.py
nogueirarcz/blog-ruicci
ca4b8bbd31367592535fec49c5efc57f6cb69d14
[ "MIT" ]
null
null
null
"""blog_ruicci URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
32.153846
77
0.700957
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('blog/', include('app_blog.urls', namespace='app_blog')), ]
true
true
f753f0463268c8457b06316f94a7e6bf618f541f
69
py
Python
python/subprocess/sub1.py
jtraver/dev
c7cd2181594510a8fa27e7325566ed2d79371624
[ "MIT" ]
null
null
null
python/subprocess/sub1.py
jtraver/dev
c7cd2181594510a8fa27e7325566ed2d79371624
[ "MIT" ]
null
null
null
python/subprocess/sub1.py
jtraver/dev
c7cd2181594510a8fa27e7325566ed2d79371624
[ "MIT" ]
null
null
null
#!/usr/bin/python import subprocess subprocess.call(['echo', ''])
11.5
30
0.666667
import subprocess subprocess.call(['echo', ''])
true
true
f753f060168cc8b0d36633e6ff3f0b2455ddc300
85
py
Python
hydra/__init__.py
knagrecha/hydra
bf0cf55e0b71acd1966e6e9766ac2022b4a39605
[ "Apache-2.0" ]
7
2021-10-16T06:11:39.000Z
2022-03-14T14:21:14.000Z
hydra/__init__.py
knagrecha/hydra
bf0cf55e0b71acd1966e6e9766ac2022b4a39605
[ "Apache-2.0" ]
3
2021-11-11T19:34:00.000Z
2022-03-11T04:33:16.000Z
hydra/__init__.py
knagrecha/hydra
bf0cf55e0b71acd1966e6e9766ac2022b4a39605
[ "Apache-2.0" ]
1
2022-02-10T02:51:26.000Z
2022-02-10T02:51:26.000Z
from .ModelOrchestrator import ModelOrchestrator from .ModelTask import ModelTask
14.166667
48
0.847059
from .ModelOrchestrator import ModelOrchestrator from .ModelTask import ModelTask
true
true
f753f0eac80996b7071abf7c3c5e2755a66099a8
1,403
py
Python
tests/unit/test_balance.py
lukka5/ledger
d3381049504578b3a89771d828e6383d08403625
[ "MIT" ]
null
null
null
tests/unit/test_balance.py
lukka5/ledger
d3381049504578b3a89771d828e6383d08403625
[ "MIT" ]
null
null
null
tests/unit/test_balance.py
lukka5/ledger
d3381049504578b3a89771d828e6383d08403625
[ "MIT" ]
null
null
null
from decimal import Decimal import pytest from ledger.balance import Balance from ledger.transaction import IrrelevantTransactionError class TestBalance: def test_init(self): balance = Balance(entity="mike", total="1.123") assert balance.entity == "mike" assert balance.total == Decimal("...
32.627907
82
0.687812
from decimal import Decimal import pytest from ledger.balance import Balance from ledger.transaction import IrrelevantTransactionError class TestBalance: def test_init(self): balance = Balance(entity="mike", total="1.123") assert balance.entity == "mike" assert balance.total == Decimal("...
true
true
f753f2a115e7ffea550a69231a201fa2a430d689
1,830
py
Python
tests/query/bugs/fixed_update_issue1827.py
wenhaocs/nebula
326b856cdf44fcaf67d3883073dc9412a9e3eebd
[ "Apache-2.0" ]
8,586
2019-05-15T07:25:51.000Z
2022-03-31T13:49:27.000Z
tests/query/bugs/fixed_update_issue1827.py
zzl200012/nebula-graph
c08b248c69d7db40c0ba9011d4429083cf539bbd
[ "Apache-2.0" ]
3,078
2019-05-15T08:14:02.000Z
2022-03-31T11:39:51.000Z
tests/query/bugs/fixed_update_issue1827.py
zzl200012/nebula-graph
c08b248c69d7db40c0ba9011d4429083cf539bbd
[ "Apache-2.0" ]
880
2019-05-15T07:36:10.000Z
2022-03-31T03:43:02.000Z
import time from tests.common.nebula_test_suite import NebulaTestSuite class TestBugUpdate(NebulaTestSuite): @classmethod def prepare(self): resp = self.execute( 'CREATE SPACE IF NOT EXISTS issue1827_update(partition_num={partition_num}, replica_factor={replica_factor})' .forma...
38.93617
121
0.663934
import time from tests.common.nebula_test_suite import NebulaTestSuite class TestBugUpdate(NebulaTestSuite): @classmethod def prepare(self): resp = self.execute( 'CREATE SPACE IF NOT EXISTS issue1827_update(partition_num={partition_num}, replica_factor={replica_factor})' .forma...
true
true
f753f2c8eea5689a42bb020a0739fc96ae4545fa
105
py
Python
High School/9th Grade APCSP (Python)/Unit 7/07.01.03.py
SomewhereOutInSpace/Computer-Science-Class
f5d21850236a7a18dc53b4a650ecbe9a11781f1d
[ "Unlicense" ]
null
null
null
High School/9th Grade APCSP (Python)/Unit 7/07.01.03.py
SomewhereOutInSpace/Computer-Science-Class
f5d21850236a7a18dc53b4a650ecbe9a11781f1d
[ "Unlicense" ]
null
null
null
High School/9th Grade APCSP (Python)/Unit 7/07.01.03.py
SomewhereOutInSpace/Computer-Science-Class
f5d21850236a7a18dc53b4a650ecbe9a11781f1d
[ "Unlicense" ]
null
null
null
sum = 0 for num in range (10): add = int(input("")) sum = sum + add avg = sum / 10 print(avg)
10.5
24
0.52381
sum = 0 for num in range (10): add = int(input("")) sum = sum + add avg = sum / 10 print(avg)
true
true
f753f2f25dc05cc60d90e06e97ea18a785703ef3
440
py
Python
accounts/migrations/0010_auto_20200902_0501.py
samarthkulshrestha/zedway
96fced2bd480ffb4d296cb761cf3d775cf0d0b97
[ "Unlicense" ]
1
2021-08-11T06:45:25.000Z
2021-08-11T06:45:25.000Z
accounts/migrations/0010_auto_20200902_0501.py
samarthkulshrestha/zedway
96fced2bd480ffb4d296cb761cf3d775cf0d0b97
[ "Unlicense" ]
null
null
null
accounts/migrations/0010_auto_20200902_0501.py
samarthkulshrestha/zedway
96fced2bd480ffb4d296cb761cf3d775cf0d0b97
[ "Unlicense" ]
null
null
null
# Generated by Django 3.0.8 on 2020-09-02 05:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0009_auto_20200828_1240'), ] operations = [ migrations.AlterField( model_name='userprofile', name='image...
23.157895
99
0.622727
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0009_auto_20200828_1240'), ] operations = [ migrations.AlterField( model_name='userprofile', name='image', field=models.ImageField(blank=Tru...
true
true
f753f30bf951f6b99d207dcb2512c45d880f198c
7,711
py
Python
docs/conf.py
marksweb/django-import-export
26977ed44ff8f2c9769b14bc69f0b41f3524da6d
[ "BSD-2-Clause" ]
2,020
2015-05-20T02:41:40.000Z
2022-03-31T14:37:50.000Z
docs/conf.py
marksweb/django-import-export
26977ed44ff8f2c9769b14bc69f0b41f3524da6d
[ "BSD-2-Clause" ]
1,195
2015-05-19T15:28:11.000Z
2022-03-31T16:56:16.000Z
docs/conf.py
marksweb/django-import-export
26977ed44ff8f2c9769b14bc69f0b41f3524da6d
[ "BSD-2-Clause" ]
680
2015-05-27T16:54:17.000Z
2022-03-31T07:56:09.000Z
import os import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.append(os.path.abspath('.')) sys.path.append(os.pat...
32.39916
90
0.714693
import os import sys sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('../tests')) os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import django django.setup() extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx'] templates_path = ['_templates...
true
true
f753f33fdab91dc016920f00adcbbea72b2cf715
127,638
py
Python
examples/tof-viewer/external/FSF/src/FSF/test/test_fsf.py
rick-yhchen1013/aditof-sdk-rework
911465dd1e05dd0b1c5107197b3b4dc3a10f77f9
[ "MIT" ]
5
2021-09-22T10:04:47.000Z
2022-02-08T17:55:09.000Z
examples/tof-viewer/external/FSF/src/FSF/test/test_fsf.py
rick-yhchen1013/aditof-sdk-rework
911465dd1e05dd0b1c5107197b3b4dc3a10f77f9
[ "MIT" ]
99
2021-02-01T12:45:09.000Z
2022-03-08T09:54:13.000Z
examples/tof-viewer/external/FSF/src/FSF/test/test_fsf.py
rick-yhchen1013/aditof-sdk-rework
911465dd1e05dd0b1c5107197b3b4dc3a10f77f9
[ "MIT" ]
4
2021-08-09T12:32:55.000Z
2021-12-13T05:38:55.000Z
""" /********************************************************************************/ /* */ /* Copyright (c) 2020 Analog Devices, Inc. All Rights Reserved. */ /* This software is proprietary to Analog Devices, Inc. and its li...
40.84416
162
0.629052
""" /********************************************************************************/ /* */ /* Copyright (c) 2020 Analog Devices, Inc. All Rights Reserved. */ /* This software is proprietary to Analog Devices, Inc. and its li...
false
true
f753f3b71b7ea3886d077cea96776c452fe2a9e9
2,084
py
Python
app/core/migrations/0001_initial.py
C4st3ll4n/recipe-api
af9b22d713c6dae55cd81d5d6f460223f4a79df1
[ "MIT" ]
1
2021-07-01T20:35:11.000Z
2021-07-01T20:35:11.000Z
app/core/migrations/0001_initial.py
C4st3ll4n/recipe-api
af9b22d713c6dae55cd81d5d6f460223f4a79df1
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
C4st3ll4n/recipe-api
af9b22d713c6dae55cd81d5d6f460223f4a79df1
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-12-04 05:33 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
52.1
160
0.523992
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.Auto...
true
true
f753f3f3bdc34e05406b798bd782824e777b1078
3,498
py
Python
backend/rumergy_backend/rumergy/views/access_request_view.py
Firefly-Tech/rumergy-webapp
859054bd9ee710a11b393027bb9cb1bad55d0f00
[ "MIT" ]
1
2021-11-08T00:28:37.000Z
2021-11-08T00:28:37.000Z
backend/rumergy_backend/rumergy/views/access_request_view.py
Firefly-Tech/rumergy-webapp
859054bd9ee710a11b393027bb9cb1bad55d0f00
[ "MIT" ]
1
2021-11-02T02:17:37.000Z
2021-11-02T02:17:37.000Z
backend/rumergy_backend/rumergy/views/access_request_view.py
Firefly-Tech/rumergy-webapp
859054bd9ee710a11b393027bb9cb1bad55d0f00
[ "MIT" ]
1
2021-10-18T22:27:04.000Z
2021-10-18T22:27:04.000Z
from rumergy_backend.rumergy.models import AccessRequest from django.contrib.auth.models import User, Group from rest_framework import viewsets from rest_framework import permissions from rest_framework import status from rest_framework.decorators import action, permission_classes from rest_framework.response import Re...
35.333333
116
0.65952
from rumergy_backend.rumergy.models import AccessRequest from django.contrib.auth.models import User, Group from rest_framework import viewsets from rest_framework import permissions from rest_framework import status from rest_framework.decorators import action, permission_classes from rest_framework.response import Re...
true
true
f753f405bba1f2671a4ac4acbcfb024bd417d6ca
9,031
py
Python
python/paddle/dataset/movielens.py
TingquanGao/Paddle
9b1015d90b4d498ab58df7cff2c3ed27863ce970
[ "Apache-2.0" ]
10
2021-05-12T07:20:32.000Z
2022-03-04T08:21:56.000Z
python/paddle/dataset/movielens.py
AFLee/Paddle
311b3b44fc7d51d4d66d90ab8a3fc0d42231afda
[ "Apache-2.0" ]
1
2021-01-25T09:40:19.000Z
2021-01-25T09:40:19.000Z
python/paddle/dataset/movielens.py
AFLee/Paddle
311b3b44fc7d51d4d66d90ab8a3fc0d42231afda
[ "Apache-2.0" ]
18
2021-05-19T08:01:49.000Z
2022-02-11T03:11:32.000Z
# Copyright (c) 2016 PaddlePaddle 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 applic...
30.003322
80
0.619976
from __future__ import print_function import numpy as np import zipfile import paddle.dataset.common import paddle.utils.deprecated as deprecated import re import random import functools import six import paddle.compat as cpt __all__ = [ 'train', 'test', 'get_movie_title_dict', 'max_movie_id', 'max_user_id', ...
true
true
f753f59c2bd871dca1742a5281a46565f9e9746e
1,526
py
Python
setup.py
devnicg/python-binance
5012e6722530e9976c65456d56d578dbb75c22c7
[ "MIT" ]
null
null
null
setup.py
devnicg/python-binance
5012e6722530e9976c65456d56d578dbb75c22c7
[ "MIT" ]
null
null
null
setup.py
devnicg/python-binance
5012e6722530e9976c65456d56d578dbb75c22c7
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup import codecs import os import re with codecs.open( os.path.join( os.path.abspath(os.path.dirname(__file__)), 'binance', '__init__.py' ), 'r', 'latin1') as fp: try: version = re.findall(r"^__version__ = ...
31.142857
78
0.616645
from setuptools import setup import codecs import os import re with codecs.open( os.path.join( os.path.abspath(os.path.dirname(__file__)), 'binance', '__init__.py' ), 'r', 'latin1') as fp: try: version = re.findall(r"^__version__ = '([^']+)'$", fp.read()...
true
true
f753f5d60f6584a7069e53c5814836cf9ae8d78c
1,788
py
Python
graph_query/main.py
nikitavlaev/formal-languages
4e5212858e7cdaa6f2d5130189f88b66e317d25f
[ "Unlicense" ]
null
null
null
graph_query/main.py
nikitavlaev/formal-languages
4e5212858e7cdaa6f2d5130189f88b66e317d25f
[ "Unlicense" ]
2
2020-09-17T19:11:45.000Z
2020-09-24T08:13:22.000Z
graph_query/main.py
nikitavlaev/formal-languages
4e5212858e7cdaa6f2d5130189f88b66e317d25f
[ "Unlicense" ]
null
null
null
import argparse from graph.graph import Graph from graph.regexp import Regexp from graph_query.algo import algo def main(): parser = argparse.ArgumentParser( description=('Script to execute simple query on graph using ' 'tensor product automata intersection'), ) parser.add_ar...
26.686567
69
0.598434
import argparse from graph.graph import Graph from graph.regexp import Regexp from graph_query.algo import algo def main(): parser = argparse.ArgumentParser( description=('Script to execute simple query on graph using ' 'tensor product automata intersection'), ) parser.add_ar...
true
true
f753f5f107b493c345fab946038af5e23dde8ddf
215
py
Python
apps/raidnight/config.py
zhudotexe/cse183-raidnight-backend
51cab1567ae0f48f41b3be46cf83bbf2afed23a3
[ "MIT" ]
null
null
null
apps/raidnight/config.py
zhudotexe/cse183-raidnight-backend
51cab1567ae0f48f41b3be46cf83bbf2afed23a3
[ "MIT" ]
null
null
null
apps/raidnight/config.py
zhudotexe/cse183-raidnight-backend
51cab1567ae0f48f41b3be46cf83bbf2afed23a3
[ "MIT" ]
null
null
null
import os SESSION_SECRET = os.getenv("SESSION_SECRET") DB_URI = os.getenv("DB_URI", 'sqlite://dev.db') DISCORD_CLIENT_ID = os.getenv("DISCORD_CLIENT_ID") DISCORD_CLIENT_SECRET = os.getenv("DISCORD_CLIENT_SECRET")
26.875
58
0.776744
import os SESSION_SECRET = os.getenv("SESSION_SECRET") DB_URI = os.getenv("DB_URI", 'sqlite://dev.db') DISCORD_CLIENT_ID = os.getenv("DISCORD_CLIENT_ID") DISCORD_CLIENT_SECRET = os.getenv("DISCORD_CLIENT_SECRET")
true
true
f753f66f0ad6668c28f9261d079980c55e6f02f5
205
py
Python
meeting/meeting/doctype/meeting/test_meeting.py
MahMaejah/meeting
60e8445559084cb64f4ed9b3a854ace01b24553a
[ "MIT" ]
null
null
null
meeting/meeting/doctype/meeting/test_meeting.py
MahMaejah/meeting
60e8445559084cb64f4ed9b3a854ace01b24553a
[ "MIT" ]
null
null
null
meeting/meeting/doctype/meeting/test_meeting.py
MahMaejah/meeting
60e8445559084cb64f4ed9b3a854ace01b24553a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020, Maeja and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestMeeting(unittest.TestCase): pass
18.636364
44
0.756098
from __future__ import unicode_literals import unittest class TestMeeting(unittest.TestCase): pass
true
true
f753f67522a63f610654dbae4ff6acdef0a5a72b
12,179
py
Python
amcp_pylib/module/mixer.py
dolejska-daniel/amcp-pylib
3cccfcf263fce938de942a80e07375b17c5f82f9
[ "MIT" ]
5
2020-05-14T18:35:35.000Z
2021-08-10T12:29:36.000Z
amcp_pylib/module/mixer.py
dolejska-daniel/amcp-pylib
3cccfcf263fce938de942a80e07375b17c5f82f9
[ "MIT" ]
3
2020-10-14T16:59:38.000Z
2021-04-30T15:33:24.000Z
amcp_pylib/module/mixer.py
dolejska-daniel/amcp-pylib
3cccfcf263fce938de942a80e07375b17c5f82f9
[ "MIT" ]
null
null
null
from amcp_pylib.core import Command, command_syntax @command_syntax('MIXER [video_channel:int]{-[layer:int]|-0} KEYER {[keyer:0,1]|0}') def MIXER_KEYER(command: Command) -> Command: """ Replaces layer n+1's alpha with the R (red) channel of layer n, and hides the RGB channels of layer n. If keyer equals 1...
41.852234
120
0.699072
from amcp_pylib.core import Command, command_syntax @command_syntax('MIXER [video_channel:int]{-[layer:int]|-0} KEYER {[keyer:0,1]|0}') def MIXER_KEYER(command: Command) -> Command: return command @command_syntax('MIXER [video_channel:int]{-[layer:int]|-0} CHROMA {[enable:0,1] {[target_hue:float] [hue_width:flo...
true
true
f753f7367ccfd1350744e5ca850f42c3bb5b83a6
2,216
py
Python
tests/manage/z_cluster/nodes/test_rolling_shutdown_and_recovery.py
srivickynesh/ocs-ci
994b8635a2f44ec7982585cfb293215aa8b27d2a
[ "MIT" ]
null
null
null
tests/manage/z_cluster/nodes/test_rolling_shutdown_and_recovery.py
srivickynesh/ocs-ci
994b8635a2f44ec7982585cfb293215aa8b27d2a
[ "MIT" ]
null
null
null
tests/manage/z_cluster/nodes/test_rolling_shutdown_and_recovery.py
srivickynesh/ocs-ci
994b8635a2f44ec7982585cfb293215aa8b27d2a
[ "MIT" ]
null
null
null
import logging import time import pytest from ocs_ci.framework.testlib import ( tier4b, ignore_leftovers, ManageTest, bugzilla, skipif_external_mode, skipif_ibm_cloud, ) from ocs_ci.ocs.node import get_ocs_nodes from ocs_ci.ocs.resources.pod import wait_for_pods_to_be_running from ocs_ci.helpe...
27.7
81
0.68231
import logging import time import pytest from ocs_ci.framework.testlib import ( tier4b, ignore_leftovers, ManageTest, bugzilla, skipif_external_mode, skipif_ibm_cloud, ) from ocs_ci.ocs.node import get_ocs_nodes from ocs_ci.ocs.resources.pod import wait_for_pods_to_be_running from ocs_ci.helpe...
true
true
f753f74bb5873a11e18d1696cb38fe91d6f33599
3,229
py
Python
ARIMA1- Air Passengers.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
null
null
null
ARIMA1- Air Passengers.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
5
2020-05-22T14:10:02.000Z
2022-03-25T19:13:05.000Z
ARIMA1- Air Passengers.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Mar 29 11:20:51 2020 @author: 766810 """ import numpy as np import pandas as pd from matplotlib import pyplot as plt from statsmodels.tsa.stattools import adfuller from statsmodels.tsa.seasonal import seasonal_decompose from statsmodels.tsa.arima_model import ARI...
31.970297
95
0.715392
import numpy as np import pandas as pd from matplotlib import pyplot as plt from statsmodels.tsa.stattools import adfuller from statsmodels.tsa.seasonal import seasonal_decompose from statsmodels.tsa.arima_model import ARIMA from pandas.plotting import register_matplotlib_converters register_matplotlib_convert...
true
true
f753f78a836e3c6a16633f4cae364b524fb25c83
5,673
py
Python
src/waldur_openstack/openstack_tenant/migrations/0002_service_properties.py
opennode/waldur-openstack
8a4170c09bdb8367493441016ef06081250fddb8
[ "MIT" ]
1
2017-11-07T19:53:57.000Z
2017-11-07T19:53:57.000Z
src/waldur_openstack/openstack_tenant/migrations/0002_service_properties.py
opennode/waldur-openstack
8a4170c09bdb8367493441016ef06081250fddb8
[ "MIT" ]
null
null
null
src/waldur_openstack/openstack_tenant/migrations/0002_service_properties.py
opennode/waldur-openstack
8a4170c09bdb8367493441016ef06081250fddb8
[ "MIT" ]
3
2017-09-24T03:11:19.000Z
2018-08-12T07:43:13.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import waldur_core.logging.loggers import waldur_core.core.fields import django.core.validators import waldur_core.core.validators class Migration(migrations.Migration): dependencies = [ ('structure'...
50.651786
139
0.590693
from __future__ import unicode_literals from django.db import migrations, models import waldur_core.logging.loggers import waldur_core.core.fields import django.core.validators import waldur_core.core.validators class Migration(migrations.Migration): dependencies = [ ('structure', '0037_remove_customer_...
true
true
f753f9385f55f9119be943eb030e3318c09a606b
3,008
py
Python
heat/tests/test_rpc_listener_client.py
stackriot/heat
9ed612906e388eda8bf850420cbceef54e05841c
[ "Apache-2.0" ]
265
2015-01-02T09:33:22.000Z
2022-03-26T23:19:54.000Z
heat/tests/test_rpc_listener_client.py
HyunJin-Jeong/heat
8353fddf9ebfb0eca67d6f2b2feb529031acff89
[ "Apache-2.0" ]
8
2015-09-01T15:43:19.000Z
2021-12-14T05:18:23.000Z
heat/tests/test_rpc_listener_client.py
HyunJin-Jeong/heat
8353fddf9ebfb0eca67d6f2b2feb529031acff89
[ "Apache-2.0" ]
295
2015-01-06T07:00:40.000Z
2021-09-06T08:05:06.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...
41.777778
74
0.688165
from unittest import mock import oslo_messaging as messaging from heat.rpc import api as rpc_api from heat.rpc import listener_client as rpc_client from heat.tests import common class ListenerClientTest(common.HeatTestCase): @mock.patch('heat.common.messaging.get_rpc_client', return_value=mock...
true
true
f753f93ad733c9ef5ff48b601615352132153f7e
3,083
py
Python
lib/galaxy_test/selenium/test_collection_edit.py
quacksawbones/galaxy-1
65f7259b29d3886e526d9be670c60d9da9fbe038
[ "CC-BY-3.0" ]
1,085
2015-02-18T16:14:38.000Z
2022-03-30T23:52:07.000Z
lib/galaxy_test/selenium/test_collection_edit.py
quacksawbones/galaxy-1
65f7259b29d3886e526d9be670c60d9da9fbe038
[ "CC-BY-3.0" ]
11,253
2015-02-18T17:47:32.000Z
2022-03-31T21:47:03.000Z
lib/galaxy_test/selenium/test_collection_edit.py
quacksawbones/galaxy-1
65f7259b29d3886e526d9be670c60d9da9fbe038
[ "CC-BY-3.0" ]
1,000
2015-02-18T16:18:10.000Z
2022-03-29T08:22:56.000Z
from selenium.webdriver.common.keys import Keys from .framework import ( selenium_test, SeleniumTestCase ) class CollectionEditTestCase(SeleniumTestCase): ensure_registered = True @selenium_test def test_change_dbkey_simple_list(self): self.use_beta_history() self.create_simple_...
41.106667
104
0.738242
from selenium.webdriver.common.keys import Keys from .framework import ( selenium_test, SeleniumTestCase ) class CollectionEditTestCase(SeleniumTestCase): ensure_registered = True @selenium_test def test_change_dbkey_simple_list(self): self.use_beta_history() self.create_simple_...
true
true
f753f9ea21644f97c373bcca4c0a3eff17310310
84
py
Python
src/thug/detect/debug.py
rmoutie/thug-memes
925b1282f7bf60bf0e70f4f0387dd90a8ce91fce
[ "MIT" ]
234
2018-03-17T02:32:55.000Z
2022-03-09T20:50:24.000Z
src/thug/detect/debug.py
rmoutie/thug-memes
925b1282f7bf60bf0e70f4f0387dd90a8ce91fce
[ "MIT" ]
9
2018-03-17T01:27:37.000Z
2020-05-10T18:37:25.000Z
src/thug/detect/debug.py
rmoutie/thug-memes
925b1282f7bf60bf0e70f4f0387dd90a8ce91fce
[ "MIT" ]
15
2018-03-17T08:04:35.000Z
2020-09-17T16:46:41.000Z
import datetime as dt def timestamp(): return dt.datetime.utcnow().isoformat()
16.8
43
0.72619
import datetime as dt def timestamp(): return dt.datetime.utcnow().isoformat()
true
true
f753fa1eb7a4a2060d5cf5a37c9c18f98e18636d
376
py
Python
test/stubs/sublime_plugin.py
jtsternberg/gist
e34d0964c3e3a97858ba226a8789744baa584a1f
[ "MIT" ]
359
2015-01-16T00:25:52.000Z
2021-04-01T11:02:13.000Z
test/stubs/sublime_plugin.py
jtsternberg/gist
e34d0964c3e3a97858ba226a8789744baa584a1f
[ "MIT" ]
57
2015-01-09T22:30:38.000Z
2021-06-10T06:54:40.000Z
test/stubs/sublime_plugin.py
jtsternberg/gist
e34d0964c3e3a97858ba226a8789744baa584a1f
[ "MIT" ]
106
2015-01-29T06:23:54.000Z
2021-09-08T07:36:49.000Z
from abc import abstractmethod from test.stubs.sublime import View class TextCommand: def __init__(self): self.view = View() @abstractmethod def run(self, edit): raise NotImplementedError class EventListener: pass class WindowCommand: def __init__(self, window): self....
15.04
35
0.664894
from abc import abstractmethod from test.stubs.sublime import View class TextCommand: def __init__(self): self.view = View() @abstractmethod def run(self, edit): raise NotImplementedError class EventListener: pass class WindowCommand: def __init__(self, window): self....
true
true
f753fae7f45597d3b3acd782a8d6f096506526c0
1,758
py
Python
salt/proxy/junos.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
salt/proxy/junos.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
salt/proxy/junos.py
vamshi98/salt-formulas
30edeadafd5d173efe4e1f767a8d562547ad128a
[ "Apache-2.0" ]
1
2017-01-27T21:33:36.000Z
2017-01-27T21:33:36.000Z
# -*- coding: utf-8 -*- ''' Interface with a Junos device via proxy-minion. ''' # Import python libs from __future__ import print_function from __future__ import absolute_import import logging # Import 3rd-party libs # import jnpr.junos # import jnpr.junos.utils # import jnpr.junos.utils.config import json HAS_JUNOS...
20.44186
79
0.614903
from __future__ import print_function from __future__ import absolute_import import logging import json HAS_JUNOS = True __proxyenabled__ = ['junos'] thisproxy = {} log = logging.getLogger(__name__) # Open the connection to the Junos device, login, and bind to the # Resource class # ''' def conn():...
true
true
f753faf02f87b3658a7fa90c15240657a3864733
1,024
py
Python
exp_adv/MCPG/mcpg_agent.py
zwc662/disentangling-vae
7eeace2a30f8034e222be6a906f53748b3b2bb6e
[ "MIT" ]
null
null
null
exp_adv/MCPG/mcpg_agent.py
zwc662/disentangling-vae
7eeace2a30f8034e222be6a906f53748b3b2bb6e
[ "MIT" ]
null
null
null
exp_adv/MCPG/mcpg_agent.py
zwc662/disentangling-vae
7eeace2a30f8034e222be6a906f53748b3b2bb6e
[ "MIT" ]
null
null
null
import numpy as np from collections import deque import torch torch.manual_seed(0) # set random seed import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.distributions import Categorical device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") class model(nn.Mo...
27.675676
71
0.666992
import numpy as np from collections import deque import torch torch.manual_seed(0) import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.distributions import Categorical device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") class model(nn.Module): def __i...
false
true
f753fbf3ff60b90fee53bf99ea41acdd1b952379
3,173
py
Python
networkx_mod/algorithms/__init__.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/algorithms/__init__.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
networkx_mod/algorithms/__init__.py
movingpictures83/MATria
d3dbd0d15e00dbc26db39ace0663868180fdc471
[ "BSD-3-Clause", "MIT" ]
null
null
null
from networkx_mod.algorithms.assortativity import * from networkx_mod.algorithms.block import * from networkx_mod.algorithms.boundary import * from networkx_mod.algorithms.centrality import * from networkx_mod.algorithms.cluster import * from networkx_mod.algorithms.clique import * from networkx_mod.algorithms.communit...
43.465753
86
0.86133
from networkx_mod.algorithms.assortativity import * from networkx_mod.algorithms.block import * from networkx_mod.algorithms.boundary import * from networkx_mod.algorithms.centrality import * from networkx_mod.algorithms.cluster import * from networkx_mod.algorithms.clique import * from networkx_mod.algorithms.communit...
true
true
f753fe578f5e0a09cb5ed07959d186d4b544546e
928
py
Python
gamestonk_terminal/etf/wsj_view.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
gamestonk_terminal/etf/wsj_view.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
gamestonk_terminal/etf/wsj_view.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
"""WSJ view""" __docformat__ = "numpy" import os from tabulate import tabulate from gamestonk_terminal.etf import wsj_model from gamestonk_terminal.helper_funcs import ( export_data, ) def show_top_mover(sort_type: str, limit: int = 20, export=""): """ Show top ETF movers from wsj.com Parameters ...
21.581395
75
0.582974
__docformat__ = "numpy" import os from tabulate import tabulate from gamestonk_terminal.etf import wsj_model from gamestonk_terminal.helper_funcs import ( export_data, ) def show_top_mover(sort_type: str, limit: int = 20, export=""): data = wsj_model.etf_movers(sort_type) print( tabulate( ...
true
true
f753fe663fa4dec3c63237cc0707c5ed09ebc1b4
703
py
Python
scripts/host_debug_server.py
gtranche/netboot
472f8de130db9e9bd8982d7c1c5e4bf9c86c30ff
[ "Unlicense" ]
25
2019-09-17T05:15:46.000Z
2022-03-30T07:36:24.000Z
scripts/host_debug_server.py
gtranche/netboot
472f8de130db9e9bd8982d7c1c5e4bf9c86c30ff
[ "Unlicense" ]
12
2020-05-04T01:08:46.000Z
2022-03-14T16:16:20.000Z
scripts/host_debug_server.py
gtranche/netboot
472f8de130db9e9bd8982d7c1c5e4bf9c86c30ff
[ "Unlicense" ]
9
2019-11-11T04:47:48.000Z
2022-03-21T13:21:51.000Z
#!/usr/bin/env python3 import argparse import sys from netboot.web import spawn_app def main() -> int: parser = argparse.ArgumentParser(description="A debug version of the Netboot web services.") parser.add_argument("-p", "--port", help="Port to listen on. Defaults to 80", type=int, default=80) parser.add...
33.47619
126
0.699858
import argparse import sys from netboot.web import spawn_app def main() -> int: parser = argparse.ArgumentParser(description="A debug version of the Netboot web services.") parser.add_argument("-p", "--port", help="Port to listen on. Defaults to 80", type=int, default=80) parser.add_argument("-c", "--conf...
true
true
f753fee33729501c5694cc5c7eb6e7843eb3a3ce
4,222
py
Python
Scripts/TypeRig GUI/Manager/__Instances.py
twardoch/TypeRig
121838d98ed41160dbebf575d0a5623def0ce256
[ "BSD-3-Clause" ]
1
2020-07-11T06:18:49.000Z
2020-07-11T06:18:49.000Z
Scripts/TypeRig GUI/Manager/__Instances.py
twardoch/TypeRig
121838d98ed41160dbebf575d0a5623def0ce256
[ "BSD-3-Clause" ]
null
null
null
Scripts/TypeRig GUI/Manager/__Instances.py
twardoch/TypeRig
121838d98ed41160dbebf575d0a5623def0ce256
[ "BSD-3-Clause" ]
null
null
null
#FLM: Font: Instances # ---------------------------------------- # (C) Vassil Kateliev, 2018 (http://www.kateliev.com) # (C) Karandash Type Foundry (http://www.karandash.eu) #----------------------------------------- # No warranties. By using this you agree # that you use it at your own risk! # - Init global pLayers ...
28.721088
159
0.688063
global pLayers pLayers = None app_name, app_version = 'TypeRig | Font Metrics', '0.11' import os, json import fontlab as fl6 import fontgate as fgt from PythonQt import QtCore from typerig import QtGui from typerig.proxy import pGlyph, pFont class WAxisTable(QtGui.QTableWidget): def __init__(self, data): super(W...
true
true
f753ff0aeacb8096221837705c2474bd747c6065
2,483
py
Python
examples/nlp/cnn_sentence_classification.py
amongstar/https-github.com-tflearn-tflearn
8af77b5aebcb8aba0f1b855201aed732906c6de8
[ "MIT" ]
11
2017-03-12T14:18:52.000Z
2018-12-18T12:15:50.000Z
examples/nlp/cnn_sentence_classification.py
DonJon86/tflearn
af57b1759c0d251313c5bcde8cbb7274bf4b08c3
[ "MIT" ]
null
null
null
examples/nlp/cnn_sentence_classification.py
DonJon86/tflearn
af57b1759c0d251313c5bcde8cbb7274bf4b08c3
[ "MIT" ]
20
2017-03-11T10:38:27.000Z
2020-11-25T05:59:59.000Z
# -*- coding: utf-8 -*- """ Simple example using convolutional neural network to classify IMDB sentiment dataset. References: - Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. (2011). Learning Word Vectors for Sentiment Analysis. The 49th Annual Meeting of th...
41.383333
116
0.751108
from __future__ import division, print_function, absolute_import import tensorflow as tf import tflearn from tflearn.layers.core import input_data, dropout, fully_connected from tflearn.layers.conv import conv_1d, global_max_pool from tflearn.layers.merge_ops import merge from tflearn.layers.estimator import regressio...
true
true
f753ff7b1651052763a9efbba9471bd2e7c23705
13,380
py
Python
test/test_reliability_cutoff.py
ComputationalMechanics/SurfaceTopography
6751be427c89d526ef4857300409596c79119029
[ "MIT" ]
5
2020-06-03T20:01:36.000Z
2021-03-03T09:25:03.000Z
test/test_reliability_cutoff.py
ComputationalMechanics/SurfaceTopography
6751be427c89d526ef4857300409596c79119029
[ "MIT" ]
44
2020-06-02T12:25:15.000Z
2021-03-17T15:18:51.000Z
test/test_reliability_cutoff.py
ComputationalMechanics/SurfaceTopography
6751be427c89d526ef4857300409596c79119029
[ "MIT" ]
1
2021-03-08T13:15:18.000Z
2021-03-08T13:15:18.000Z
# # Copyright 2021 Lars Pastewka # # ### MIT license # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
36.961326
118
0.590209
import os import numpy as np import pytest from SurfaceTopography import (read_container, read_topography, SurfaceContainer, NonuniformLineScan, UniformLineScan, Topography) from SurfaceTopography.Exceptions import NoReliableDataError def test_scanning_probe_reliability_cutoff(file_...
true
true
f753ffa490061027579303cbea9a04e8342e0fed
2,046
py
Python
main.py
mov-huyu/Mochi
5102f89fa6b09ccb2bb06ae56acdf50c9e7b31b6
[ "MIT" ]
1
2021-03-11T00:06:23.000Z
2021-03-11T00:06:23.000Z
main.py
Huyu2239/Mochi
5102f89fa6b09ccb2bb06ae56acdf50c9e7b31b6
[ "MIT" ]
null
null
null
main.py
Huyu2239/Mochi
5102f89fa6b09ccb2bb06ae56acdf50c9e7b31b6
[ "MIT" ]
null
null
null
import os import discord import json from discord.ext import commands import traceback from dotenv import load_dotenv load_dotenv() if os.name == 'nt': data_directory = 'json\\' else: data_directory = 'json/' class Mochi(commands.Bot): def __init__(self, command_prefix, **options): ...
38.603774
116
0.624633
import os import discord import json from discord.ext import commands import traceback from dotenv import load_dotenv load_dotenv() if os.name == 'nt': data_directory = 'json\\' else: data_directory = 'json/' class Mochi(commands.Bot): def __init__(self, command_prefix, **options): ...
true
true
f7540137e9805488e11e8d7fced6c407cc483b7d
1,298
py
Python
talkmap.py
bouzebda/bouzebda.github.io
cabffc4c461ea06542117c532c7799caac94e159
[ "MIT" ]
null
null
null
talkmap.py
bouzebda/bouzebda.github.io
cabffc4c461ea06542117c532c7799caac94e159
[ "MIT" ]
null
null
null
talkmap.py
bouzebda/bouzebda.github.io
cabffc4c461ea06542117c532c7799caac94e159
[ "MIT" ]
null
null
null
# # Leaflet cluster map of talk locations # # (c) 2016-2017 R. Stuart Geiger, released under the MIT license # # Run this from the _talks/ directory, which contains 2020-10-01-Bouzebda-Elhattab-Nemouchi.md files of all your talks. # This scrapes the location YAML field from each 2020-10-01-Bouzebda-Elhattab-Nemouchi....
27.041667
119
0.669492
import glob import getorg from geopy import Nominatim g = glob.glob("*2020-10-01-Bouzebda-Elhattab-Nemouchi.md") geocoder = Nominatim() location_dict = {} location = "" permalink = "" title = "" for file in g: with open(file, 'r') as f: lines = f.read() if lines.find('location: "') > 1: ...
true
true
f754014cb6a73747713f5a9026a705cf5ad041a3
732
py
Python
proto/CV/stop_sign/main.py
nmarks99/aero-capstone
d828ccb80ff9835a40e7b1872e6b5851ad2b5058
[ "MIT" ]
null
null
null
proto/CV/stop_sign/main.py
nmarks99/aero-capstone
d828ccb80ff9835a40e7b1872e6b5851ad2b5058
[ "MIT" ]
null
null
null
proto/CV/stop_sign/main.py
nmarks99/aero-capstone
d828ccb80ff9835a40e7b1872e6b5851ad2b5058
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import cv2 import sys import time import os assert(len(sys.argv) == 2),'No input given. Please input path to image' img_path = str(sys.argv[1]) t0 = time.time() # Load the cascade print('Analyzing image...') cascade = cv2.CascadeClassifier('stop_data.xml') # Read the image img = cv2.imread(im...
20.914286
71
0.687158
import cv2 import sys import time import os assert(len(sys.argv) == 2),'No input given. Please input path to image' img_path = str(sys.argv[1]) t0 = time.time() print('Analyzing image...') cascade = cv2.CascadeClassifier('stop_data.xml') img = cv2.imread(img_path) detected = cascade.detectMultiScale(img, 1.1, 4) ...
true
true
f75401bd5cd4f38be7573f0f893cb3217d37ada7
51,891
py
Python
autotest/gdrivers/hfa.py
roman0yurin/gdal
349a0992c7ebd0c71e8014e00897b098e4ca16fb
[ "MIT" ]
1
2020-02-22T01:28:29.000Z
2020-02-22T01:28:29.000Z
autotest/gdrivers/hfa.py
norBIT/gdal
64855dbee2cd0dff47da11d916c8d2703b4e99b8
[ "MIT" ]
7
2018-04-09T09:35:42.000Z
2018-05-22T06:54:05.000Z
autotest/gdrivers/hfa.py
norBIT/gdal
64855dbee2cd0dff47da11d916c8d2703b4e99b8
[ "MIT" ]
2
2018-05-03T15:34:36.000Z
2020-07-13T15:30:20.000Z
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test some functions of HFA driver. Most testing in ../gcore/hfa_* # Author: Frank Warmerdam <warmerdam@pobox.com> # ##############################################...
35.061486
662
0.602744
import os import sys from osgeo import gdal import array sys.path.append( '../pymod' ) import gdaltest def hfa_histread(): ds = gdal.Open('../gcore/data/utmsmall.img') md = ds.GetRasterBand(1).GetMetadata() ds = None if md['STATISTICS_MINIMUM'] != '8': gdaltest.post_reason( 'STATISTICS_MI...
true
true
f7540256c4b9e6d402f9861a0c6cccefaca1b17f
4,629
py
Python
civil/apps/definitions/models.py
christopinka/django-civil
d134624da9d36c4ba0bea2df8a21698df196bdf6
[ "Apache-2.0" ]
3
2020-06-15T21:01:06.000Z
2022-02-17T17:41:57.000Z
civil/apps/definitions/models.py
christopinka/django-civil
d134624da9d36c4ba0bea2df8a21698df196bdf6
[ "Apache-2.0" ]
null
null
null
civil/apps/definitions/models.py
christopinka/django-civil
d134624da9d36c4ba0bea2df8a21698df196bdf6
[ "Apache-2.0" ]
1
2021-11-06T18:33:29.000Z
2021-11-06T18:33:29.000Z
# -*- coding: utf-8 -*- from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from civil.library.models import BaseModel #============================================================================== class AddressType(BaseModel): name = models.Cha...
29.484076
88
0.544826
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from civil.library.models import BaseModel class AddressType(BaseModel): name = models.CharField(_('name'), max_length=100) class Meta: verbose_name = _('address type') verb...
true
true
f75402cdfd22cee4df685a7ea687ca039237e827
2,059
py
Python
bin/evaluate_step_placement.py
Vivoe/DeepSM
bc35f2bfc3758199466079ec54de1d5297374921
[ "MIT" ]
3
2020-08-09T11:40:54.000Z
2021-07-09T06:14:57.000Z
bin/evaluate_step_placement.py
Vivoe/DeepSM
bc35f2bfc3758199466079ec54de1d5297374921
[ "MIT" ]
null
null
null
bin/evaluate_step_placement.py
Vivoe/DeepSM
bc35f2bfc3758199466079ec54de1d5297374921
[ "MIT" ]
null
null
null
import os import argparse import numpy as np from sklearn import metrics import matplotlib.pyplot as plt import torch import torch.utils.data as datautils from deepSM import StepPlacement from deepSM import SMDUtils from deepSM import post_processing from deepSM import utils parser = argparse.ArgumentParser() par...
25.7375
79
0.737251
import os import argparse import numpy as np from sklearn import metrics import matplotlib.pyplot as plt import torch import torch.utils.data as datautils from deepSM import StepPlacement from deepSM import SMDUtils from deepSM import post_processing from deepSM import utils parser = argparse.ArgumentParser() par...
true
true
f75402f02eaaccccb3f4f580aca4ce077adcae8c
4,696
py
Python
napari_plugin_engine/_testsupport.py
tlambert-forks/napari-plugin-engine
79ee20ff57061f3a4c592601a7bc3faae398cf7b
[ "MIT" ]
6
2021-01-04T10:43:34.000Z
2021-12-20T08:37:30.000Z
napari_plugin_engine/_testsupport.py
tlambert-forks/napari-plugin-engine
79ee20ff57061f3a4c592601a7bc3faae398cf7b
[ "MIT" ]
47
2020-06-26T02:54:24.000Z
2022-03-21T19:54:51.000Z
napari_plugin_engine/_testsupport.py
tlambert-forks/napari-plugin-engine
79ee20ff57061f3a4c592601a7bc3faae398cf7b
[ "MIT" ]
8
2020-04-26T23:10:06.000Z
2021-08-13T18:07:09.000Z
from contextlib import contextmanager import pytest from napari_plugin_engine import ( HookCaller, HookImplementation, HookImplementationMarker, HookSpecification, HookSpecificationMarker, PluginManager, ) @pytest.fixture def test_plugin_manager() -> PluginManager: """A plugin manager fi...
33.784173
87
0.669719
from contextlib import contextmanager import pytest from napari_plugin_engine import ( HookCaller, HookImplementation, HookImplementationMarker, HookSpecification, HookSpecificationMarker, PluginManager, ) @pytest.fixture def test_plugin_manager() -> PluginManager: return PluginManager(p...
true
true
f754038a4d3677f969cfa59e37d8cdb0bbb73d86
1,393
py
Python
crawler/cy/spiders/property_publication_spider.py
g0v/sunshine.cy
17ad8e92c413ba64e586592fbf332ce93672cd65
[ "CC0-1.0" ]
6
2015-05-08T12:30:12.000Z
2021-08-30T09:13:23.000Z
crawler/cy/spiders/property_publication_spider.py
g0v/sunshine.cy
17ad8e92c413ba64e586592fbf332ce93672cd65
[ "CC0-1.0" ]
5
2017-01-26T08:46:44.000Z
2019-02-20T08:44:00.000Z
crawler/cy/spiders/property_publication_spider.py
g0v/sunshine.cy
17ad8e92c413ba64e586592fbf332ce93672cd65
[ "CC0-1.0" ]
1
2018-10-24T04:18:03.000Z
2018-10-24T04:18:03.000Z
# -*- coding: utf-8 -*- import os import re import subprocess import scrapy from scrapy.http import Request, FormRequest from scrapy.selector import Selector from cy.items import PropertyItem class Spider(scrapy.Spider): name = "property" allowed_domains = ["sunshine.cy.gov.tw"] start_urls = ['http://suns...
38.694444
145
0.541278
import os import re import subprocess import scrapy from scrapy.http import Request, FormRequest from scrapy.selector import Selector from cy.items import PropertyItem class Spider(scrapy.Spider): name = "property" allowed_domains = ["sunshine.cy.gov.tw"] start_urls = ['http://sunshine.cy.gov.tw/GipOpenWe...
true
true
f754040bf03851a2b0b6dc7db0be871cc58fda1d
368
py
Python
simp-py-code/task13.py
Michaeloye/python-journey
ff8ce0e8796a129994f9a9a9dbb80340fa5790dc
[ "MIT" ]
null
null
null
simp-py-code/task13.py
Michaeloye/python-journey
ff8ce0e8796a129994f9a9a9dbb80340fa5790dc
[ "MIT" ]
null
null
null
simp-py-code/task13.py
Michaeloye/python-journey
ff8ce0e8796a129994f9a9a9dbb80340fa5790dc
[ "MIT" ]
null
null
null
# Question: If we list all the natural numbers below 10 that are the multiples of 3 or 5, we get 3, 5, 6, 9. The sum of these is 23 Find the sum of all the multiples of 3 or 5 i = 0 num = 1000 count = 0 while i < num: if i%3==0 or i%5==0: print(i) count = count + i # when i satisfies the condition ...
33.454545
175
0.644022
i = 0 num = 1000 count = 0 while i < num: if i%3==0 or i%5==0: print(i) count = count + i i+=1 print(count)
true
true
f75405282baee0b032ed769c84fa33c0ae8135dc
2,760
py
Python
model_builder.py
jhamrak/instrument-recognition-lab
a2fab13b854a3650c437ec65e1cf078067827415
[ "Apache-2.0" ]
null
null
null
model_builder.py
jhamrak/instrument-recognition-lab
a2fab13b854a3650c437ec65e1cf078067827415
[ "Apache-2.0" ]
4
2020-09-03T07:39:07.000Z
2020-09-03T07:40:47.000Z
model_builder.py
jhamrak/instrument-recognition-lab
a2fab13b854a3650c437ec65e1cf078067827415
[ "Apache-2.0" ]
null
null
null
import keras from keras.utils import np_utils from keras import layers from keras import models import os from keras.models import Sequential from keras.layers import Dense, Conv2D, MaxPool2D , Flatten, Dropout from keras.preprocessing.image import ImageDataGenerator import numpy as np def build_vgg(in_shape): model...
56.326531
137
0.751812
import keras from keras.utils import np_utils from keras import layers from keras import models import os from keras.models import Sequential from keras.layers import Dense, Conv2D, MaxPool2D , Flatten, Dropout from keras.preprocessing.image import ImageDataGenerator import numpy as np def build_vgg(in_shape): model...
true
true
f7540632598318efa6db5df56565909a4416b92c
1,557
py
Python
src/prefect/storage/__init__.py
vnsn/prefect
972345597975155dba9e3232bcc430d0a6258a37
[ "Apache-2.0" ]
8,633
2019-03-23T17:51:03.000Z
2022-03-31T22:17:42.000Z
src/prefect/storage/__init__.py
vnsn/prefect
972345597975155dba9e3232bcc430d0a6258a37
[ "Apache-2.0" ]
3,903
2019-03-23T19:11:21.000Z
2022-03-31T23:21:23.000Z
src/prefect/storage/__init__.py
vnsn/prefect
972345597975155dba9e3232bcc430d0a6258a37
[ "Apache-2.0" ]
937
2019-03-23T18:49:44.000Z
2022-03-31T21:45:13.000Z
""" The Prefect Storage interface encapsulates logic for storing flows. Each storage unit is able to store _multiple_ flows (with the constraint of name uniqueness within a given unit). """ from warnings import warn import prefect from prefect import config from prefect.storage.base import Storage from prefect.storag...
34.6
92
0.755299
from warnings import warn import prefect from prefect import config from prefect.storage.base import Storage from prefect.storage.azure import Azure from prefect.storage.bitbucket import Bitbucket from prefect.storage.codecommit import CodeCommit from prefect.storage.docker import Docker from prefect.storage.gcs impo...
true
true
f7540749ffeea8831045a0b74100e7129db47c86
9,357
py
Python
code/LanguageGenChars_Predict.py
craiggua/NaturalLanguageGen
de7c83ed08eded17528f8e55c07a969e0f409e8a
[ "MIT" ]
null
null
null
code/LanguageGenChars_Predict.py
craiggua/NaturalLanguageGen
de7c83ed08eded17528f8e55c07a969e0f409e8a
[ "MIT" ]
null
null
null
code/LanguageGenChars_Predict.py
craiggua/NaturalLanguageGen
de7c83ed08eded17528f8e55c07a969e0f409e8a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Purpose: Character level Natural Language Generation (NLG). This file loads a previously trained character NLG model from LanguageGenChars_train.py, and predicts subsequent chars. To run: 1) Set constants below to be the same as the languagegenchars_train.py fil...
33.537634
124
0.68227
import numpy as np import os from datetime import datetime, timedelta import re import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow import keras from tensorflow.keras.layers import LSTM, Dense, Dropout from tensorflow.keras import utils as keras_utils CURR_DIR =...
true
true
f75407a949521cc4b50e0c5d3a816a5d437eb19b
532
py
Python
sokna/migrations/0007_auto_20200915_2352.py
medram/daira
cf445f1b308b879bb6c852067b162a2a1c1c72d3
[ "MIT" ]
1
2020-11-08T01:37:21.000Z
2020-11-08T01:37:21.000Z
sokna/migrations/0007_auto_20200915_2352.py
medram/daira
cf445f1b308b879bb6c852067b162a2a1c1c72d3
[ "MIT" ]
8
2020-08-30T18:16:08.000Z
2022-01-13T03:01:35.000Z
sokna/migrations/0007_auto_20200915_2352.py
medram/daira
cf445f1b308b879bb6c852067b162a2a1c1c72d3
[ "MIT" ]
null
null
null
# Generated by Django 3.1 on 2020-09-15 22:52 import daira.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sokna', '0006_auto_20200712_1329'), ] operations = [ migrations.AlterField( model_name='soknarequest', ...
26.6
164
0.665414
import daira.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sokna', '0006_auto_20200712_1329'), ] operations = [ migrations.AlterField( model_name='soknarequest', name='terms_of_use', fiel...
true
true
f75407e3e3c46371b6090438bb011e5c0208251f
2,355
py
Python
tests/integration/templatetags/test_currency_filters.py
QueoLda/django-oscar
8dd992d82e31d26c929b3caa0e08b57e9701d097
[ "BSD-3-Clause" ]
4,639
2015-01-01T00:42:33.000Z
2022-03-29T18:32:12.000Z
tests/integration/templatetags/test_currency_filters.py
QueoLda/django-oscar
8dd992d82e31d26c929b3caa0e08b57e9701d097
[ "BSD-3-Clause" ]
2,215
2015-01-02T22:32:51.000Z
2022-03-29T12:16:23.000Z
tests/integration/templatetags/test_currency_filters.py
QueoLda/django-oscar
8dd992d82e31d26c929b3caa0e08b57e9701d097
[ "BSD-3-Clause" ]
2,187
2015-01-02T06:33:31.000Z
2022-03-31T15:32:36.000Z
# -*- coding: utf-8 -*- from decimal import Decimal as D from django import template from django.test import TestCase from django.test.utils import override_settings from django.utils import translation def render(template_string, ctx): tpl = template.Template(template_string) return tpl.render(template.Cont...
28.373494
57
0.546497
from decimal import Decimal as D from django import template from django.test import TestCase from django.test.utils import override_settings from django.utils import translation def render(template_string, ctx): tpl = template.Template(template_string) return tpl.render(template.Context(ctx)) class TestCu...
true
true
f75407f40aa02f81d0fc6c4dbcb1174d19ff8b94
2,933
py
Python
QsWidgets/QsMpl/tools.py
stylekilla/syncmrt
816bb57d80d6595719b8b9d7f027f4f17d0a6c0a
[ "Apache-2.0" ]
null
null
null
QsWidgets/QsMpl/tools.py
stylekilla/syncmrt
816bb57d80d6595719b8b9d7f027f4f17d0a6c0a
[ "Apache-2.0" ]
25
2019-03-05T05:56:35.000Z
2019-07-24T13:11:57.000Z
QsWidgets/QsMpl/tools.py
stylekilla/syncmrt
816bb57d80d6595719b8b9d7f027f4f17d0a6c0a
[ "Apache-2.0" ]
1
2019-11-27T05:10:47.000Z
2019-11-27T05:10:47.000Z
from matplotlib.backend_tools import ToolBase, ToolToggleBase, Cursors from PyQt5.QtCore import QObject, pyqtSignal import logging class ToolPickPoint(ToolToggleBase,QObject): """ Marker selection tool. """ # Tool options for matplotlib. description = 'Pick a point on the image' image = 'pick.png' cursor = Curso...
30.552083
88
0.741562
from matplotlib.backend_tools import ToolBase, ToolToggleBase, Cursors from PyQt5.QtCore import QObject, pyqtSignal import logging class ToolPickPoint(ToolToggleBase,QObject): description = 'Pick a point on the image' image = 'pick.png' cursor = Cursors.SELECT_REGION radio_group = 'default' newPoint = pyqtSign...
true
true
f7540a9810303843806f2c975da07680c7369196
4,433
py
Python
python/util/conf_generator.py
daiwei89/hotbox
11922d0fd23d0b532c0a3842c4c7723e29a166e2
[ "BSD-3-Clause" ]
null
null
null
python/util/conf_generator.py
daiwei89/hotbox
11922d0fd23d0b532c0a3842c4c7723e29a166e2
[ "BSD-3-Clause" ]
null
null
null
python/util/conf_generator.py
daiwei89/hotbox
11922d0fd23d0b532c0a3842c4c7723e29a166e2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import sys import os import argparse from os.path import dirname from os.path import join project_dir = dirname(dirname(dirname(os.path.realpath(__file__)))) sys.path.append(join(project_dir, 'build')) # Path to protobuf build. #sys.path.append(join(project_dir, 'third_party', 'include')) sys.pa...
39.230088
80
0.748026
import sys import os import argparse from os.path import dirname from os.path import join project_dir = dirname(dirname(dirname(os.path.realpath(__file__)))) sys.path.append(join(project_dir, 'build')) sys.path.append(join('/home/wdai/lib', 'third_party', 'include')) import transform.proto.transform_pb2 as transform...
false
true
f7540ab7c69f1a18d1582297ffe2201054b8a959
95
py
Python
enan/process/__init__.py
mizuno-group/enan
3c9dbe60bebf98e384e858db56980928b5897775
[ "MIT" ]
null
null
null
enan/process/__init__.py
mizuno-group/enan
3c9dbe60bebf98e384e858db56980928b5897775
[ "MIT" ]
null
null
null
enan/process/__init__.py
mizuno-group/enan
3c9dbe60bebf98e384e858db56980928b5897775
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Dec 25 15:46:32 2019 @author: tadahaya """
11.875
36
0.536842
true
true
f7540b9f5659d11cb2300905923e9dfe9320234b
1,789
py
Python
spicymeatball.py
KRHS-GameProgramming-2016/Spoonghetti-Man
852cb278da4b04d73b58b9727bd8e3ef1982447c
[ "MIT" ]
null
null
null
spicymeatball.py
KRHS-GameProgramming-2016/Spoonghetti-Man
852cb278da4b04d73b58b9727bd8e3ef1982447c
[ "MIT" ]
3
2017-02-10T16:04:34.000Z
2017-03-20T15:34:41.000Z
spicymeatball.py
KRHS-GameProgramming-2016/Spoonghetti-Man-v2
415c183e06f84e493b4f5774f32bb45aea54c83b
[ "MIT" ]
null
null
null
import pygame, sys, math class Ball(): def __init__(self, image, speed=[0,0], pos=[0,0], size=None): self.image = pygame.image.load("rsc/ball/"+image) if size: self.image = pygame.transform.scale(self.image, [size,size]) self.rect = self.image.get_rect(center = pos) sel...
35.078431
87
0.543879
import pygame, sys, math class Ball(): def __init__(self, image, speed=[0,0], pos=[0,0], size=None): self.image = pygame.image.load("rsc/ball/"+image) if size: self.image = pygame.transform.scale(self.image, [size,size]) self.rect = self.image.get_rect(center = pos) sel...
true
true
f7540cbeeaf8b9779a292689f414336cd74bea26
153
py
Python
ABC_B/ABC145_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_B/ABC145_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_B/ABC145_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
n = int(input()) s = list(input()) if n % 2 != 0: print("No") else: if s[n//2:] == s[:n//2]: print("Yes") else: print("No")
13.909091
28
0.405229
n = int(input()) s = list(input()) if n % 2 != 0: print("No") else: if s[n//2:] == s[:n//2]: print("Yes") else: print("No")
true
true
f7540d82ebd36643222661d7668d6b4d0783cca9
13,958
py
Python
gen3/tools/indexing/manifest_columns.py
andrebriggs/gen3sdk-python
f28687fe13644fd11c2c0d34a220cc5bb4796af1
[ "Apache-2.0" ]
2
2019-05-08T18:49:21.000Z
2020-07-22T18:17:52.000Z
gen3/tools/indexing/manifest_columns.py
andrebriggs/gen3sdk-python
f28687fe13644fd11c2c0d34a220cc5bb4796af1
[ "Apache-2.0" ]
null
null
null
gen3/tools/indexing/manifest_columns.py
andrebriggs/gen3sdk-python
f28687fe13644fd11c2c0d34a220cc5bb4796af1
[ "Apache-2.0" ]
1
2020-07-10T09:05:42.000Z
2020-07-10T09:05:42.000Z
""" Classes to be used in the identification and validation of manifest columns """ import warnings from abc import ABC from enum import Enum, unique import string from urllib.parse import urlparse from base64 import b64encode, b64decode # Pre-defined supported column names GUID_COLUMN_NAMES = ["guid", "GUID"] GUID_S...
33.552885
165
0.612624
import warnings from abc import ABC from enum import Enum, unique import string from urllib.parse import urlparse from base64 import b64encode, b64decode GUID_COLUMN_NAMES = ["guid", "GUID"] GUID_STANDARD_KEY = "guid" FILENAME_COLUMN_NAMES = ["filename", "file_name"] FILENAME_STANDARD_KEY = "file_name" SIZE_COLUMN_...
true
true
f75410579908b75968a44a94d12caec109f6c1ab
601
py
Python
src/webmesh/message_protocols.py
BinarSkugga/webmesh
71e66eaa86729476375b3e99a436b6b1f8de3c40
[ "Apache-2.0" ]
8
2021-07-26T04:59:46.000Z
2021-07-30T13:11:12.000Z
src/webmesh/message_protocols.py
BinarSkugga/webmesh
71e66eaa86729476375b3e99a436b6b1f8de3c40
[ "Apache-2.0" ]
null
null
null
src/webmesh/message_protocols.py
BinarSkugga/webmesh
71e66eaa86729476375b3e99a436b6b1f8de3c40
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from typing import Tuple, Any, Optional class AbstractMessageProtocol(ABC): @abstractmethod def unpack(self, message: Any) -> Tuple[str, Any]: pass @abstractmethod def pack(self, target: Optional[str], message: Any) -> Any: pass class SimpleDictPr...
28.619048
78
0.670549
from abc import ABC, abstractmethod from typing import Tuple, Any, Optional class AbstractMessageProtocol(ABC): @abstractmethod def unpack(self, message: Any) -> Tuple[str, Any]: pass @abstractmethod def pack(self, target: Optional[str], message: Any) -> Any: pass class SimpleDictPr...
true
true
f75411097207ff53137a5f76627b6cbb0f746cad
200
py
Python
fisher.py
ttkltll/fisher
8889705c7bde10304cfde7972b805226ac59d735
[ "MIT" ]
null
null
null
fisher.py
ttkltll/fisher
8889705c7bde10304cfde7972b805226ac59d735
[ "MIT" ]
null
null
null
fisher.py
ttkltll/fisher
8889705c7bde10304cfde7972b805226ac59d735
[ "MIT" ]
null
null
null
from flask import current_app from app import creat_app app = creat_app() if __name__ == '__main__': app.run(debug=app.config['DEBUG'], host='0.0.0.0', port=81, threaded=True) a = current_app
18.181818
78
0.705
from flask import current_app from app import creat_app app = creat_app() if __name__ == '__main__': app.run(debug=app.config['DEBUG'], host='0.0.0.0', port=81, threaded=True) a = current_app
true
true
f754110ed08ed92d52dc6a8bc12346902c83d7ad
6,696
py
Python
aggregate_CDF.py
zhangjq933/HowtoSim_Script
d958cc6cc743106e8f6ddf58dead6551a8ac7784
[ "MIT" ]
79
2019-04-01T04:35:01.000Z
2022-03-30T10:59:32.000Z
aggregate_CDF.py
raflzhang/HowtoSim_Script
90fb8cca87d47d2c45b8ff5d07a35e8a6c846685
[ "MIT" ]
1
2020-03-29T20:52:06.000Z
2020-03-30T05:35:30.000Z
aggregate_CDF.py
raflzhang/HowtoSim_Script
90fb8cca87d47d2c45b8ff5d07a35e8a6c846685
[ "MIT" ]
73
2019-05-07T10:26:53.000Z
2022-03-24T02:25:08.000Z
# -*- coding: utf-8 -*- """ Created on Fri Oct 19 19:24:49 2019 @author: mlin """ import matplotlib.pyplot as plt from collections import OrderedDict import numpy as np import copy class ffd(): def __init__(self, ffd_file, incident_Power_W=1): self.incident_Power_W=incident_Power_W ...
32.504854
103
0.559737
import matplotlib.pyplot as plt from collections import OrderedDict import numpy as np import copy class ffd(): def __init__(self, ffd_file, incident_Power_W=1): self.incident_Power_W=incident_Power_W with open(ffd_file) as f: self.theta=[int(i) for i in f.readlin...
true
true
f7541112a8d11120bd9bab491c4232da49e3929f
284
py
Python
apple/apple/items.py
macchiang/practice-code-on-big-data
e5d06e637b1c4c427b62e2eccf317c12ba0ffe37
[ "MIT" ]
null
null
null
apple/apple/items.py
macchiang/practice-code-on-big-data
e5d06e637b1c4c427b62e2eccf317c12ba0ffe37
[ "MIT" ]
null
null
null
apple/apple/items.py
macchiang/practice-code-on-big-data
e5d06e637b1c4c427b62e2eccf317c12ba0ffe37
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class AppleItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
18.933333
51
0.683099
import scrapy class AppleItem(scrapy.Item): pass
true
true
f75411bc02545dbb0e19e694f8757de9d13ae686
2,307
py
Python
setup.py
juforg/flask-api-sign
90ab5bb4b70175ace5fe101fa89cbde92511ec34
[ "MIT" ]
null
null
null
setup.py
juforg/flask-api-sign
90ab5bb4b70175ace5fe101fa89cbde92511ec34
[ "MIT" ]
null
null
null
setup.py
juforg/flask-api-sign
90ab5bb4b70175ace5fe101fa89cbde92511ec34
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Flask Api Sign Verification ------------- Flask extension of Api Sign Verification. """ from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read(...
29.961039
80
0.606415
from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'Flask>=1.0', ] test_requirements = [ ] setup( name='flask_api_sign', version='0.1....
true
true
f75411f406308e9e785812ec9b97e78f8a583c81
30,718
py
Python
mint/wallet/cc_wallet/cc_wallet.py
MintNetwork/mint-blockchain
65ec05a015a07664ed25f83efa736065a17f7d7a
[ "Apache-2.0" ]
12
2021-08-18T20:53:31.000Z
2022-03-15T21:45:13.000Z
mint/wallet/cc_wallet/cc_wallet.py
MintNetwork/mint-blockchain
65ec05a015a07664ed25f83efa736065a17f7d7a
[ "Apache-2.0" ]
34
2021-08-18T19:12:11.000Z
2022-01-06T17:15:34.000Z
mint/wallet/cc_wallet/cc_wallet.py
MintNetwork/mint-blockchain
65ec05a015a07664ed25f83efa736065a17f7d7a
[ "Apache-2.0" ]
7
2021-08-18T20:53:34.000Z
2022-03-15T08:37:40.000Z
from __future__ import annotations import logging import time from dataclasses import replace from secrets import token_bytes from typing import Any, Dict, List, Optional, Set from blspy import AugSchemeMPL, G2Element from mint.consensus.cost_calculator import calculate_cost_of_program, NPCResult from mint.full_node...
40.740053
118
0.648219
from __future__ import annotations import logging import time from dataclasses import replace from secrets import token_bytes from typing import Any, Dict, List, Optional, Set from blspy import AugSchemeMPL, G2Element from mint.consensus.cost_calculator import calculate_cost_of_program, NPCResult from mint.full_node...
true
true
f75412c7a6302f631b2068d615a4655fc0ac1deb
2,918
py
Python
breveIDE_windows_2.7.2_2/breveIDE_2.7.2/lib/python2.3/token.py
Lamouse/Evolutionary-Creativity
9e9a4094285241d0541e0b87a3bd2c5e4ba804d3
[ "MIT" ]
1
2020-11-26T18:53:46.000Z
2020-11-26T18:53:46.000Z
breveIDE_windows_2.7.2_2/breveIDE_2.7.2/lib/python2.3/token.py
Lamouse/Evolutionary-Creativity
9e9a4094285241d0541e0b87a3bd2c5e4ba804d3
[ "MIT" ]
null
null
null
breveIDE_windows_2.7.2_2/breveIDE_2.7.2/lib/python2.3/token.py
Lamouse/Evolutionary-Creativity
9e9a4094285241d0541e0b87a3bd2c5e4ba804d3
[ "MIT" ]
1
2019-04-11T11:27:01.000Z
2019-04-11T11:27:01.000Z
#! /usr/bin/env python """Token constants (from "token.h").""" # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # python Lib/token.py #--start constants-- ENDM...
20.695035
73
0.596984
"""Token constants (from "token.h").""" # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # python Lib/token.py #--start constants-- ENDMARKER = 0 NAME = 1 NUMBER = 2 STRING = 3 NEWLINE = 4 INDENT = 5 DEDENT = 6 LPAR = 7 RPAR ...
false
true
f7541356b8f93558c9d9a11a985e8568e0465886
2,089
py
Python
wamukap/common/kafka_util.py
rhafer/wamukap
7d1ae3ab3823841a605ee5055a5b3ec2c4ce0080
[ "Apache-2.0" ]
null
null
null
wamukap/common/kafka_util.py
rhafer/wamukap
7d1ae3ab3823841a605ee5055a5b3ec2c4ce0080
[ "Apache-2.0" ]
null
null
null
wamukap/common/kafka_util.py
rhafer/wamukap
7d1ae3ab3823841a605ee5055a5b3ec2c4ce0080
[ "Apache-2.0" ]
null
null
null
# (c) Copyright 2021, Ralf Haferkamp <ralf@h4kamp.de> # # 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 ...
33.15873
79
0.681666
from aiokafka import AIOKafkaProducer, AIOKafkaConsumer from aiokafka.helpers import create_ssl_context import kafka async def get_producer(kafka_cfg, logger): logger.debug("Creating Kafka producer for {}".format(kafka_cfg['servers'])) producer = None context = create_ssl_context( cafile=kafka_cf...
true
true
f754148c59ab7549ea1cf12efe483edc86e53c34
11,393
py
Python
Radiomics/Radiomics MPE images.py
akac0297/PETLAB
950cc153ce230d12d752ad0d11111e7fc22d9e7d
[ "MIT" ]
null
null
null
Radiomics/Radiomics MPE images.py
akac0297/PETLAB
950cc153ce230d12d752ad0d11111e7fc22d9e7d
[ "MIT" ]
null
null
null
Radiomics/Radiomics MPE images.py
akac0297/PETLAB
950cc153ce230d12d752ad0d11111e7fc22d9e7d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import SimpleITK as sitk import pandas as pd import numpy as np import radiomics def radiomics_analysis(image_filepath, mask_filepath,img_label): img = sitk.ReadImage(image_filepath) mask = sitk.ReadImage(mask_filepath) #Z-score normalisation for MRI if img_l...
63.648045
1,760
0.756166
import SimpleITK as sitk import pandas as pd import numpy as np import radiomics def radiomics_analysis(image_filepath, mask_filepath,img_label): img = sitk.ReadImage(image_filepath) mask = sitk.ReadImage(mask_filepath) if img_label==("B50T_CAD_ADC_3000" or "B50_800 ADC" or "MPE"): z_norm...
true
true
f75414ee15dfe0b26a8f8dd72e9b0e4721b0f317
10,904
py
Python
pyeccodes/defs/grib2/tables/6/4_2_0_1_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
7
2020-04-14T09:41:17.000Z
2021-08-06T09:38:19.000Z
pyeccodes/defs/grib2/tables/6/4_2_0_1_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
null
null
null
pyeccodes/defs/grib2/tables/6/4_2_0_1_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
3
2020-04-30T12:44:48.000Z
2020-12-15T08:40:26.000Z
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Specific humidity', 'units': 'kg kg-1'}, {'abbr': 1, 'code': 1, 'title': 'Relative humidity', 'units': '%'}, {'abbr': 2, 'code': 2, 'title': 'Humidity mixing ratio', 'units': 'kg kg-1'}, {'abbr': 3, 'code': 3, 'title': 'Precip...
40.992481
91
0.406731
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Specific humidity', 'units': 'kg kg-1'}, {'abbr': 1, 'code': 1, 'title': 'Relative humidity', 'units': '%'}, {'abbr': 2, 'code': 2, 'title': 'Humidity mixing ratio', 'units': 'kg kg-1'}, {'abbr': 3, 'code': 3, 'title': 'Precip...
true
true
f75415406ef60d7516b8f73ca33fe5d08f683da8
9,772
py
Python
data_cube_wcs/utils.py
ceos-seo/django-datacube-wcs
250742947036763a95b19bdf132b2270d9bb5be9
[ "Apache-2.0" ]
7
2017-10-18T10:00:41.000Z
2019-05-22T10:01:19.000Z
data_cube_wcs/utils.py
ceos-seo/django-datacube-wcs
250742947036763a95b19bdf132b2270d9bb5be9
[ "Apache-2.0" ]
null
null
null
data_cube_wcs/utils.py
ceos-seo/django-datacube-wcs
250742947036763a95b19bdf132b2270d9bb5be9
[ "Apache-2.0" ]
4
2017-10-13T15:11:51.000Z
2019-11-27T21:41:03.000Z
from django.apps import apps from datetime import datetime, date, timedelta from django.conf import settings import xarray as xr import numpy as np import collections from rasterio.io import MemoryFile from datacube.config import LocalConfig import datacube import configparser def form_to_data_cube_parameters(form_...
38.472441
120
0.64255
from django.apps import apps from datetime import datetime, date, timedelta from django.conf import settings import xarray as xr import numpy as np import collections from rasterio.io import MemoryFile from datacube.config import LocalConfig import datacube import configparser def form_to_data_cube_parameters(form_...
true
true
f7541573696b2904ec9be42f9bc44295807898f5
2,711
py
Python
test/connections/mongoconnection_test.py
deeso/service-utilities
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
[ "Apache-2.0" ]
null
null
null
test/connections/mongoconnection_test.py
deeso/service-utilities
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
[ "Apache-2.0" ]
null
null
null
test/connections/mongoconnection_test.py
deeso/service-utilities
9a3ebdcad9a1d0049a23e3486d7ea99a6d08f81a
[ "Apache-2.0" ]
null
null
null
# import docker from service.utilities.connection import ConnectionFactory, MongoConnection import unittest from unittest import TestCase import toml EXAMPLE_TOML = ''' uri = 'mongodb://127.0.0.1:27017' name = "testing" default_dbname = 'mydefault' default_colname = 'mydefault_col' id_key = 'msg2_id' ''' class Te...
32.27381
75
0.627444
from service.utilities.connection import ConnectionFactory, MongoConnection import unittest from unittest import TestCase import toml EXAMPLE_TOML = ''' uri = 'mongodb://127.0.0.1:27017' name = "testing" default_dbname = 'mydefault' default_colname = 'mydefault_col' id_key = 'msg2_id' ''' class TestMongoClientCon...
true
true
f754159779808a1ae99aca09b4e53e0f2f7dad6a
3,658
py
Python
codes/cnn_feature.py
fukun07/neural-image-captioning
e8b699df8bb15577014ce1f0cafe661d3e0709bd
[ "MIT" ]
54
2016-06-01T03:14:52.000Z
2021-05-07T08:52:10.000Z
codes/cnn_feature.py
fukun07/neural-image-captioning
e8b699df8bb15577014ce1f0cafe661d3e0709bd
[ "MIT" ]
15
2017-06-07T11:02:02.000Z
2018-11-30T14:46:06.000Z
codes/cnn_feature.py
fukun07/neural-image-captioning
e8b699df8bb15577014ce1f0cafe661d3e0709bd
[ "MIT" ]
22
2016-10-12T13:30:52.000Z
2020-05-18T15:03:22.000Z
import h5py import json import sys import cv2 import os.path as osp import numpy as np from tools import Timer from config import CAFFE_ROOT, DATA_ROOT sys.path.insert(0, osp.join(CAFFE_ROOT, 'python')) import caffe BS = 1 def cnn_patch_feature(net, transformer, image, bbox, include_whole_image=False): im_list ...
35.862745
97
0.639694
import h5py import json import sys import cv2 import os.path as osp import numpy as np from tools import Timer from config import CAFFE_ROOT, DATA_ROOT sys.path.insert(0, osp.join(CAFFE_ROOT, 'python')) import caffe BS = 1 def cnn_patch_feature(net, transformer, image, bbox, include_whole_image=False): im_list ...
false
true
f75415e2a7cf2a95c0ca2b3df1829b419c3f300c
589
py
Python
beehive/service/bee_hive_service.py
BartekStok/beehive-apiary-sim
b4c3b8ca079710cd3eeb315eedd752384cf2166d
[ "MIT" ]
1
2020-03-21T21:52:37.000Z
2020-03-21T21:52:37.000Z
beehive/service/bee_hive_service.py
BartekStok/beehive-apiary-sim
b4c3b8ca079710cd3eeb315eedd752384cf2166d
[ "MIT" ]
1
2020-03-14T07:03:26.000Z
2020-03-14T07:03:26.000Z
beehive/service/bee_hive_service.py
BartekStok/beehive-apiary-sim
b4c3b8ca079710cd3eeb315eedd752384cf2166d
[ "MIT" ]
null
null
null
from django.utils import timezone from beehive.models import BeeHive class BeeHiveService(): """Sets service date for BeeHive""" @staticmethod def set_beehive_service_date(beehive_id): beehive = BeeHive.objects.get(id=beehive_id) beehive.service_date = timezone.now() beehive.save...
24.541667
52
0.677419
from django.utils import timezone from beehive.models import BeeHive class BeeHiveService(): @staticmethod def set_beehive_service_date(beehive_id): beehive = BeeHive.objects.get(id=beehive_id) beehive.service_date = timezone.now() beehive.save() return beehive @staticm...
true
true
f7541601dfc6867c5be243f4d0b0cc8c2b217a8c
12,729
py
Python
tests/gpflow/posteriors/test_bo_integration.py
uri-granta/GPflow
94b432847cb82c7627a57987f5c5ddd7fc400414
[ "Apache-2.0" ]
null
null
null
tests/gpflow/posteriors/test_bo_integration.py
uri-granta/GPflow
94b432847cb82c7627a57987f5c5ddd7fc400414
[ "Apache-2.0" ]
null
null
null
tests/gpflow/posteriors/test_bo_integration.py
uri-granta/GPflow
94b432847cb82c7627a57987f5c5ddd7fc400414
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The GPflow Contributors. 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 appl...
31.507426
100
0.698719
from typing import Any, Callable, DefaultDict, Dict, Iterator, Mapping, Set, Tuple, Type, TypeVar import numpy as np import pytest import tensorflow as tf from _pytest.fixtures import SubRequest import gpflow from gpflow.base import RegressionData from gpflow.config import default_float from gpflow.inducing_variables...
true
true
f75416612c4826a1b79799d8ba2a0edc1667fd49
1,820
py
Python
test/sanity/issue7305-nwfaketop-cookie/test.py
frank-dspeed/nw.js
18299ec34ed610d75479497e2e21e99db2c0cf20
[ "MIT" ]
27,296
2015-01-14T15:48:22.000Z
2022-03-31T02:09:51.000Z
test/sanity/issue7305-nwfaketop-cookie/test.py
SaulGDev/nw.js
25eea59e189603685d804e0f7383643f8df4ae3c
[ "MIT" ]
5,685
2015-01-14T15:49:29.000Z
2022-03-31T11:27:47.000Z
test/sanity/issue7305-nwfaketop-cookie/test.py
SaulGDev/nw.js
25eea59e189603685d804e0f7383643f8df4ae3c
[ "MIT" ]
3,396
2015-01-14T15:45:54.000Z
2022-03-28T06:48:36.000Z
import time import os import subprocess import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from nw_util import * from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common import utils chrome_options = Options() chrome_optio...
30.847458
152
0.71044
import time import os import subprocess import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from nw_util import * from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common import utils chrome_options = Options() chrome_optio...
false
true
f75416c94f2a6d9b2c4e9486c49c66266db56a19
634
py
Python
apps/bills/migrations/0004_auto_20190219_0757.py
sonnhfit/supermarket
9b455c1354007cccb6cec40c04008c72bd4d7316
[ "MIT" ]
null
null
null
apps/bills/migrations/0004_auto_20190219_0757.py
sonnhfit/supermarket
9b455c1354007cccb6cec40c04008c72bd4d7316
[ "MIT" ]
null
null
null
apps/bills/migrations/0004_auto_20190219_0757.py
sonnhfit/supermarket
9b455c1354007cccb6cec40c04008c72bd4d7316
[ "MIT" ]
null
null
null
# Generated by Django 2.1.4 on 2019-02-19 07:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('bills', '0003_auto_20190219_0709'), ] operations = [ migrations.RemoveField( model_name='bills'...
26.416667
160
0.619874
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('bills', '0003_auto_20190219_0709'), ] operations = [ migrations.RemoveField( model_name='bills', name='bill_detail', ), ...
true
true