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
1c087e981789e44cc6dfccfee6491e76c0d1fd04
2,831
py
Python
safenet/app.py
rid-dim/pySafe
bcecb60b0bfbcdf7b778d45351432e3b8c264901
[ "MIT" ]
9
2018-03-30T21:40:21.000Z
2019-04-29T14:06:51.000Z
safenet/app.py
rid-dim/pySafe
bcecb60b0bfbcdf7b778d45351432e3b8c264901
[ "MIT" ]
null
null
null
safenet/app.py
rid-dim/pySafe
bcecb60b0bfbcdf7b778d45351432e3b8c264901
[ "MIT" ]
null
null
null
######################################################################################################################## # # pySafe - App Interface # # This is really just a stub ... files like this should be able to import the interface and just go, but code structure # really needs some thought # # # ###############...
37.25
120
0.631579
import safenet.base_classes as base import safenet.authenticator as authenticator import safenet.mutabledata as mutabledata import safenet.immutabledata as immutabledata import safenet.sysUri as sysUri import queue class App(base.StandardApp): def __init__(self, name='SAFE_Connection', ...
true
true
1c087f390e3502b2faa95dcb8692f094ef67f3a1
12,796
py
Python
src/openfermion/utils/_low_depth_trotter_error_test.py
sammcardle30/OpenFermion
9eea8de514edea4fd585244898700cceac151b1d
[ "Apache-2.0" ]
3
2018-08-03T22:48:47.000Z
2022-02-10T15:05:35.000Z
src/openfermion/utils/_low_depth_trotter_error_test.py
sammcardle30/OpenFermion
9eea8de514edea4fd585244898700cceac151b1d
[ "Apache-2.0" ]
null
null
null
src/openfermion/utils/_low_depth_trotter_error_test.py
sammcardle30/OpenFermion
9eea8de514edea4fd585244898700cceac151b1d
[ "Apache-2.0" ]
1
2019-03-25T13:39:13.000Z
2019-03-25T13:39:13.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 # distribu...
42.511628
79
0.592607
import unittest from openfermion.hamiltonians import ( jellium_model, hypercube_grid_with_given_wigner_seitz_radius_and_filling, wigner_seitz_length_scale) from openfermion.utils._low_depth_trotter_error import * from openfermion.utils import Grid class ErrorOperatorTest(unittest.TestCase): def test_er...
true
true
1c0880a87264af00737650a290cd3691ff1c6f5f
28,793
py
Python
sscanss/core/instrument/robotics.py
jfkcooper/SScanSS-2
ae50c1d065732a7742eaf1a7b9a9349907c29f8a
[ "BSD-3-Clause" ]
null
null
null
sscanss/core/instrument/robotics.py
jfkcooper/SScanSS-2
ae50c1d065732a7742eaf1a7b9a9349907c29f8a
[ "BSD-3-Clause" ]
null
null
null
sscanss/core/instrument/robotics.py
jfkcooper/SScanSS-2
ae50c1d065732a7742eaf1a7b9a9349907c29f8a
[ "BSD-3-Clause" ]
null
null
null
from enum import Enum, unique import logging import math import time import nlopt import numpy as np from PyQt5 import QtCore from ..geometry.mesh import MeshGroup from ..math.constants import VECTOR_EPS from ..math.matrix import Matrix44 from ..math.misc import trunc from ..math.transform import (rotation_btw_vectors,...
37.786089
119
0.643455
from enum import Enum, unique import logging import math import time import nlopt import numpy as np from PyQt5 import QtCore from ..geometry.mesh import MeshGroup from ..math.constants import VECTOR_EPS from ..math.matrix import Matrix44 from ..math.misc import trunc from ..math.transform import (rotation_btw_vectors,...
true
true
1c08811cb63f2820a9dc59b8ab4f326e1c947422
955
py
Python
pcg_libraries/src/pcg_gazebo/parsers/sdf/k3.py
boschresearch/pcg_gazebo_pkgs
1c112d01847ca4f8da61ce9b273e13d13bc7eb73
[ "Apache-2.0", "BSD-3-Clause" ]
42
2019-06-26T09:46:03.000Z
2022-03-18T17:56:26.000Z
pcg_libraries/src/pcg_gazebo/parsers/sdf/k3.py
boschresearch/pcg_gazebo_pkgs
1c112d01847ca4f8da61ce9b273e13d13bc7eb73
[ "Apache-2.0", "BSD-3-Clause" ]
9
2019-07-18T10:36:05.000Z
2020-10-02T15:26:32.000Z
pcg_libraries/src/pcg_gazebo/parsers/sdf/k3.py
boschresearch/pcg_gazebo_pkgs
1c112d01847ca4f8da61ce9b273e13d13bc7eb73
[ "Apache-2.0", "BSD-3-Clause" ]
2
2019-11-01T03:20:11.000Z
2020-10-15T23:23:44.000Z
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
32.931034
74
0.728796
from ..types import XMLScalar class K3(XMLScalar): _NAME = 'k3' _TYPE = 'sdf' def __init__(self, default=0): XMLScalar.__init__(self, default) def _set_value(self, value): assert value >= 0 XMLScalar._set_value(self, value)
true
true
1c08811d4b95c53870042d455b222b49cd2742b1
6,004
py
Python
python/paddle/fluid/tests/unittests/test_switch_autotune.py
douch/Paddle
81c40722869935d6e897f4b1aeb6e6f67606188a
[ "Apache-2.0" ]
1
2021-12-27T03:07:20.000Z
2021-12-27T03:07:20.000Z
python/paddle/fluid/tests/unittests/test_switch_autotune.py
weishengying/Paddle
9287d5a1e1cec7a628c755080d26bf09e1dfddff
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_switch_autotune.py
weishengying/Paddle
9287d5a1e1cec7a628c755080d26bf09e1dfddff
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2022 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 ap...
33.355556
79
0.612592
import paddle import unittest import numpy class SimpleNet(paddle.nn.Layer): def __init__(self): super(SimpleNet, self).__init__() self.conv = paddle.nn.Conv2D(1, 2, (3, 3)) def forward(self, image, label=None): return self.conv(image) def train_dygraph(net, data): out = net(da...
true
true
1c0882e805c5fe76533ca52224eeb0afe753885c
1,110
py
Python
dream_machine/webgl/renderers.py
Aeva/dream_machine
6f8e913096806bf04d7db257a9033e580d5d46d4
[ "Apache-2.0" ]
3
2020-08-03T15:49:13.000Z
2020-08-08T03:14:00.000Z
dream_machine/webgl/renderers.py
Aeva/dream_machine
6f8e913096806bf04d7db257a9033e580d5d46d4
[ "Apache-2.0" ]
28
2020-08-26T01:45:44.000Z
2020-11-12T03:12:13.000Z
dream_machine/webgl/renderers.py
Aeva/dream_machine
6f8e913096806bf04d7db257a9033e580d5d46d4
[ "Apache-2.0" ]
null
null
null
 # Copyright 2020 Aeva Palecek # # 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 writin...
24.666667
74
0.722523
 from ..expanders import SyntaxExpander class RendererCall(SyntaxExpander): template = """ "「name」" : function(FrameIndex, CurrentTime, DeltaTime) { 「calls」 }, """.strip() indent = ("calls",) class RendererCase(SyntaxExpander): template = """ case 「index」: Renderer["「name」"](FrameIndex, CurrentTime,...
false
true
1c08847a2f4a21b65521c286d70d81e432596c0c
5,067
py
Python
assignments/ass1/http-client-server/http-client.py
nicklambourne/cse3300
34e5d5637db88e8a3abcd79c1b8cd41716b73318
[ "MIT" ]
null
null
null
assignments/ass1/http-client-server/http-client.py
nicklambourne/cse3300
34e5d5637db88e8a3abcd79c1b8cd41716b73318
[ "MIT" ]
null
null
null
assignments/ass1/http-client-server/http-client.py
nicklambourne/cse3300
34e5d5637db88e8a3abcd79c1b8cd41716b73318
[ "MIT" ]
null
null
null
""" Author: Nicholas Lambourne CSE 3300 - Computer Networks and Data Communication Professor: Dr Bing Wang Assignment 1: HTTP Client """ from sys import argv, exit from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR DEFAULT_PORT = 80 CRLF = '\r\n' class BasicHTTPClient(object): """ A ...
38.679389
101
0.587132
from sys import argv, exit from socket import socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR DEFAULT_PORT = 80 CRLF = '\r\n' class BasicHTTPClient(object): def __init__(self): self.host, self.obj, self.port, self.headers = self.parse_arguments() self.request = self.construct_request() ...
true
true
1c08853740f875f96e66fbc9ee54d96c5fbe7174
793
py
Python
helper.py
phykn/smatrix
d23655a5c96500e5a5b8905ff3733baaf89dffdb
[ "MIT" ]
null
null
null
helper.py
phykn/smatrix
d23655a5c96500e5a5b8905ff3733baaf89dffdb
[ "MIT" ]
null
null
null
helper.py
phykn/smatrix
d23655a5c96500e5a5b8905ff3733baaf89dffdb
[ "MIT" ]
null
null
null
import numpy as np def constant_refractive_index(n, ws): ''' Args: n (float): constant refractive index ws (float list): wavenumber Return: refractive_index (complex array): refractive index ''' refractive_index = complex(n, 0) refractive_index = refractive_in...
33.041667
97
0.651955
import numpy as np def constant_refractive_index(n, ws): refractive_index = complex(n, 0) refractive_index = refractive_index + np.array(ws) * 0 return refractive_index def set_layer(refractive_index, thickness=0, coherence=True): return {'refractive_index': refractive_index, 'thickness': thic...
true
true
1c0886cc0693d21faa7a47883465c4e1bd11bb01
10,562
py
Python
src/python/grpcio_tests/tests/unit/_rpc_part_1_test.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
1
2021-12-01T03:10:14.000Z
2021-12-01T03:10:14.000Z
src/python/grpcio_tests/tests/unit/_rpc_part_1_test.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
4
2022-02-27T18:59:37.000Z
2022-02-27T18:59:53.000Z
src/python/grpcio_tests/tests/unit/_rpc_part_1_test.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
44.192469
80
0.710756
from concurrent import futures import itertools import logging import threading import unittest import grpc from grpc.framework.foundation import logging_pool from tests.unit._rpc_test_helpers import BaseRPCTest from tests.unit._rpc_test_helpers import Callback from tests.unit._rpc_test_helpers import TIMEOUT_SHORT ...
true
true
1c08885a7acc0db50695fe50aba4ea5b45b58404
801
py
Python
Bayesian2D/tests/test_acquisition.py
JRaidal/Bayesian2D
67d130d56566e68075317f6f520ac6607604f8fe
[ "MIT" ]
null
null
null
Bayesian2D/tests/test_acquisition.py
JRaidal/Bayesian2D
67d130d56566e68075317f6f520ac6607604f8fe
[ "MIT" ]
null
null
null
Bayesian2D/tests/test_acquisition.py
JRaidal/Bayesian2D
67d130d56566e68075317f6f520ac6607604f8fe
[ "MIT" ]
null
null
null
import unittest from Bayesian2D.tools import acquisition import numpy as np from sklearn.gaussian_process import GaussianProcessRegressor from sklearn import preprocessing from sklearn.gaussian_process.kernels import Matern class TestAcquisition(unittest.TestCase): def setUp(self): self.XY = np.array([[1, 2], [3, ...
25.03125
93
0.710362
import unittest from Bayesian2D.tools import acquisition import numpy as np from sklearn.gaussian_process import GaussianProcessRegressor from sklearn import preprocessing from sklearn.gaussian_process.kernels import Matern class TestAcquisition(unittest.TestCase): def setUp(self): self.XY = np.array([[1, 2], [3, ...
true
true
1c08888aa85fde56b0b79f764f908c1426ed6aa7
93,786
py
Python
pandas/core/internals/blocks.py
austiezr/pandas
4c8d66ecfe2b13607afd254443979b1ff842b6c1
[ "BSD-3-Clause" ]
null
null
null
pandas/core/internals/blocks.py
austiezr/pandas
4c8d66ecfe2b13607afd254443979b1ff842b6c1
[ "BSD-3-Clause" ]
null
null
null
pandas/core/internals/blocks.py
austiezr/pandas
4c8d66ecfe2b13607afd254443979b1ff842b6c1
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime, timedelta import inspect import re from typing import TYPE_CHECKING, Any, List, Optional, Type, Union, cast import warnings import numpy as np from pandas._libs import NaT, algos as libalgos, internals as libinternals, lib, writers from pandas._libs.internals import BlockPlacement from ...
32.757946
88
0.579372
from datetime import datetime, timedelta import inspect import re from typing import TYPE_CHECKING, Any, List, Optional, Type, Union, cast import warnings import numpy as np from pandas._libs import NaT, algos as libalgos, internals as libinternals, lib, writers from pandas._libs.internals import BlockPlacement from ...
true
true
1c08897242cdd1141b7e896aa04c90de4e2395a8
19,381
py
Python
common/pycsp/processes/channel.py
a4/a4
e1de89260cb3894908f1d01dfacea125abc79da9
[ "BSL-1.0" ]
4
2015-04-07T20:25:16.000Z
2019-04-27T15:04:02.000Z
common/pycsp/processes/channel.py
a4/a4
e1de89260cb3894908f1d01dfacea125abc79da9
[ "BSL-1.0" ]
null
null
null
common/pycsp/processes/channel.py
a4/a4
e1de89260cb3894908f1d01dfacea125abc79da9
[ "BSL-1.0" ]
1
2021-06-02T17:22:35.000Z
2021-06-02T17:22:35.000Z
""" Channel module Copyright (c) 2009 John Markus Bjoerndalen <jmb@cs.uit.no>, Brian Vinter <vinter@diku.dk>, Rune M. Friborg <runef@diku.dk>. 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...
35.957328
156
0.625561
""" Channel module Copyright (c) 2009 John Markus Bjoerndalen <jmb@cs.uit.no>, Brian Vinter <vinter@diku.dk>, Rune M. Friborg <runef@diku.dk>. 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...
false
true
1c088ac0352c5b06ad6d3231ae153346057c7f39
1,068
py
Python
codeinthedark/urls.py
SetaHoefnagel/CodeInTheDark
53320e25cf135621bbc143c2f0ac29de46790871
[ "MIT" ]
null
null
null
codeinthedark/urls.py
SetaHoefnagel/CodeInTheDark
53320e25cf135621bbc143c2f0ac29de46790871
[ "MIT" ]
3
2021-04-08T21:08:40.000Z
2021-06-10T19:42:32.000Z
codeinthedark/urls.py
SetaHoefnagel/CodeInTheDark
53320e25cf135621bbc143c2f0ac29de46790871
[ "MIT" ]
null
null
null
"""djangoreact URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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-b...
36.827586
146
0.72191
from django.contrib import admin from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static urlpatterns = [] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += [ ...
true
true
1c088b6dd2e13ba02c0530de5a4b234ba09d560a
93
py
Python
.history/ClassFiles/Control Flow/IfStatements_20210101174904.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/Control Flow/IfStatements_20210101174904.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/Control Flow/IfStatements_20210101174904.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
''' If Statements Used to check conditions before it is '''
4.65
38
0.462366
true
true
1c088bd6abec8315bbf5a5f434dc53a610b8e558
271
py
Python
1_Practice_Python/_PYTHON_LEARNING__Variables.py
CyberThulhu22/Python-Projects
448f7b934e0a316cf87be36c7b294f81b039a008
[ "MIT" ]
null
null
null
1_Practice_Python/_PYTHON_LEARNING__Variables.py
CyberThulhu22/Python-Projects
448f7b934e0a316cf87be36c7b294f81b039a008
[ "MIT" ]
null
null
null
1_Practice_Python/_PYTHON_LEARNING__Variables.py
CyberThulhu22/Python-Projects
448f7b934e0a316cf87be36c7b294f81b039a008
[ "MIT" ]
1
2022-01-05T04:19:44.000Z
2022-01-05T04:19:44.000Z
#!/usr/bin/env python3 #-*- Coding: utf-8 -*- """ NAME: _PYTHON_LEARNING_Variables.py VERSION: None AUTHOR: Jesse Leverett (CyberThulhu) STATUS: Building Initial code framework DESCRIPTION: Collection Learning Variables TO-DO: USAGE: COPYRIGHT © 2021 Jesse Leverett """
19.357143
42
0.760148
true
true
1c088bfa2f52310c40b778220ec4cdbae937c75a
2,875
py
Python
lib/prody/tests/test_proteins/test_wwpdb.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/tests/test_proteins/test_wwpdb.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/tests/test_proteins/test_wwpdb.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
1
2018-12-13T12:15:09.000Z
2018-12-13T12:15:09.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either...
28.75
78
0.607304
__author__ = 'Ahmet Bakan' __copyright__ = 'Copyright (C) 2010-2012 Ahmet Bakan' import os from numpy.testing import * from prody import * from prody import LOGGER from prody.tests import TEMPDIR, unittest from prody.tests.test_datafiles import * LOGGER.verbosity = 'none' class TestFTP(unittest.TestCase): ...
true
true
1c088c64ae3e6abe22cc72678416b3671028b7e7
17,746
py
Python
misc/recstat.py
Penlect/rectangle-packer
52639f09ef0ce84bb1dbd81332554ba33ef2d835
[ "MIT" ]
36
2017-07-23T23:10:42.000Z
2022-03-26T13:48:01.000Z
misc/recstat.py
Penlect/rectangle-packer
52639f09ef0ce84bb1dbd81332554ba33ef2d835
[ "MIT" ]
10
2018-11-05T17:58:55.000Z
2022-03-10T17:32:57.000Z
misc/recstat.py
Penlect/rectangle-packer
52639f09ef0ce84bb1dbd81332554ba33ef2d835
[ "MIT" ]
14
2018-01-13T05:52:14.000Z
2022-01-16T12:24:06.000Z
#!/usr/bin/env python3 """Visualize rpack packing & benchmark results Sync files from Bucket: $ gsutil -m rsync -r gs://bucket.penlect.com/rpack artifacts/ """ # Built-in import argparse import os import re import pickle import math from pathlib import Path # PyPI import matplotlib import matplotlib.pyplot as plt ...
31.188049
88
0.571904
import argparse import os import re import pickle import math from pathlib import Path import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.gridspec as gridspec import matplotlib.ticker as mtick import matplotlib.animation as mani from matplotlib.backends.backend_p...
true
true
1c088ca5a8f8af5f118cc60554d796140176bdcf
2,602
py
Python
EXIF_Dick.py
bbloss/EXIF-Cleanser
f9f002b7b847f18b7b415c1dccca7c18b5881184
[ "MIT" ]
null
null
null
EXIF_Dick.py
bbloss/EXIF-Cleanser
f9f002b7b847f18b7b415c1dccca7c18b5881184
[ "MIT" ]
null
null
null
EXIF_Dick.py
bbloss/EXIF-Cleanser
f9f002b7b847f18b7b415c1dccca7c18b5881184
[ "MIT" ]
null
null
null
import piexif import imghdr import argparse from glob import glob from os.path import isfile # from _version import __version__ __version__ = "0.6" parser = argparse.ArgumentParser() parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + __version__) parser.add_argument('-s', '--s...
36.647887
97
0.581476
import piexif import imghdr import argparse from glob import glob from os.path import isfile __version__ = "0.6" parser = argparse.ArgumentParser() parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + __version__) parser.add_argument('-s', '--snark', help="snarky message to repla...
true
true
1c088cfa4d1a0c114766e7e1ecd047307af745ea
1,085
py
Python
catkin_ws/src/result_evaluate/scripts/log_output.py
biomotion/bnn-localization
c7b92b4e7bb7c569d3c0d1dbb4c8b8fa6f3b6bc2
[ "MIT" ]
null
null
null
catkin_ws/src/result_evaluate/scripts/log_output.py
biomotion/bnn-localization
c7b92b4e7bb7c569d3c0d1dbb4c8b8fa6f3b6bc2
[ "MIT" ]
2
2020-04-22T08:31:09.000Z
2020-04-26T13:11:53.000Z
catkin_ws/src/result_evaluate/scripts/log_output.py
biomotion/bnn-localization
c7b92b4e7bb7c569d3c0d1dbb4c8b8fa6f3b6bc2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import csv import tf from geometry_msgs.msg import PoseStamped output = [] def pose_cb(msg): rospy.loginfo("recieve pose\n%s" % str(msg.pose)) # msg = PoseStamped() data = [msg.header.stamp.to_sec(), msg.pose.position.x, msg.pose.position.y, ...
25.833333
71
0.63871
import rospy import csv import tf from geometry_msgs.msg import PoseStamped output = [] def pose_cb(msg): rospy.loginfo("recieve pose\n%s" % str(msg.pose)) data = [msg.header.stamp.to_sec(), msg.pose.position.x, msg.pose.position.y, msg.pose.position.z] q = (ms...
true
true
1c088d79e47c88db6b11e79bb2b0078cae2244f8
3,666
py
Python
selfdrive/controls/tests/test_lateral_mpc.py
doktorsleepelss/openpilot
d4d21a954245bf534f344ba9de7a4cb055708564
[ "MIT" ]
3
2020-11-26T22:59:25.000Z
2021-06-06T18:21:56.000Z
selfdrive/controls/tests/test_lateral_mpc.py
doktorsleepelss/openpilot
d4d21a954245bf534f344ba9de7a4cb055708564
[ "MIT" ]
null
null
null
selfdrive/controls/tests/test_lateral_mpc.py
doktorsleepelss/openpilot
d4d21a954245bf534f344ba9de7a4cb055708564
[ "MIT" ]
2
2021-02-01T15:14:38.000Z
2021-05-25T22:05:38.000Z
import unittest import numpy as np from selfdrive.car.honda.interface import CarInterface from selfdrive.controls.lib.lateral_mpc import libmpc_py from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.controls.lib.drive_helpers import MPC_N, CAR_ROTATION_RADIUS def run_mpc(v_ref=30., x_init=0.,...
33.633028
97
0.68767
import unittest import numpy as np from selfdrive.car.honda.interface import CarInterface from selfdrive.controls.lib.lateral_mpc import libmpc_py from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.controls.lib.drive_helpers import MPC_N, CAR_ROTATION_RADIUS def run_mpc(v_ref=30., x_init=0.,...
true
true
1c088dffb80d18465a725b79c37519a1b0c23408
30,716
py
Python
qiskit/quantum_info/states/statevector.py
sethmerkel/qiskit-terra
aa2c3e6049adff7a846be5b865d85ac77886b590
[ "Apache-2.0" ]
null
null
null
qiskit/quantum_info/states/statevector.py
sethmerkel/qiskit-terra
aa2c3e6049adff7a846be5b865d85ac77886b590
[ "Apache-2.0" ]
null
null
null
qiskit/quantum_info/states/statevector.py
sethmerkel/qiskit-terra
aa2c3e6049adff7a846be5b865d85ac77886b590
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
38.685139
97
0.588488
import copy import re from numbers import Number import numpy as np from qiskit.circuit.quantumcircuit import QuantumCircuit from qiskit.circuit.instruction import Instruction from qiskit.exceptions import QiskitError from qiskit.quantum_info.states.quantum_state import QuantumState from qiskit.quantum_info.operato...
true
true
1c088f4f9ee005d05501fd8977fdd96ccb273d03
6,051
py
Python
scripts/helper.py
anudeepsekhar/Lane-Detection-Pytorch
cfddda8a0768cf83afd87e29d605fd58aa89df59
[ "MIT" ]
1
2022-01-11T16:43:50.000Z
2022-01-11T16:43:50.000Z
scripts/helper.py
anudeepsekhar/Lane-Detection-Pytorch
cfddda8a0768cf83afd87e29d605fd58aa89df59
[ "MIT" ]
null
null
null
scripts/helper.py
anudeepsekhar/Lane-Detection-Pytorch
cfddda8a0768cf83afd87e29d605fd58aa89df59
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import torchvision import torch import numpy as np import torch.nn.functional as F def images_to_probs(net, images): ''' Generates predictions and corresponding probabilities from a trained network and a list of images ''' output = net(images) # convert output pr...
32.88587
82
0.637415
import matplotlib.pyplot as plt import torchvision import torch import numpy as np import torch.nn.functional as F def images_to_probs(net, images): output = net(images) _, preds_tensor = torch.max(output, 1) preds = np.squeeze(preds_tensor.numpy()) return preds, [F.softmax(el, dim=0)[i].item() for...
true
true
1c088fb739149d02789f4cf1edaddee6684ec3fd
5,053
py
Python
OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeServer.py
defraged/opensim
042c49385f6f3033981f05a6f8f33f73b48fbb7a
[ "BSD-3-Clause" ]
132
2015-01-20T15:17:46.000Z
2022-03-22T21:05:32.000Z
OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeServer.py
defraged/opensim
042c49385f6f3033981f05a6f8f33f73b48fbb7a
[ "BSD-3-Clause" ]
240
2015-09-21T00:23:22.000Z
2018-08-16T00:17:23.000Z
OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeServer.py
defraged/opensim
042c49385f6f3033981f05a6f8f33f73b48fbb7a
[ "BSD-3-Clause" ]
121
2015-01-27T03:51:53.000Z
2022-01-03T17:21:51.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) Contributors, http://opensimulator.org/ # See CONTRIBUTORS.TXT for a full list of copyright holders. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # ...
38.572519
111
0.646547
import logging import BaseHTTPServer import optparse import xml.etree.ElementTree as ET import xml.parsers.expat logging.basicConfig(level = logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s') options = None class ConciergeHandler(BaseHTTPServer.BaseHTTPRequestHandler): def logRe...
false
true
1c08908de57c209ae9f299e5f5cb3a5a27452812
1,857
py
Python
general-problems/general/7/solution.py
michaelmunje/algorithms
3b8da8aa8bb541dcbdc4f408fc51efa043220517
[ "MIT" ]
1
2021-02-12T20:01:58.000Z
2021-02-12T20:01:58.000Z
general-problems/general/7/solution.py
michaelmunje/algorithms
3b8da8aa8bb541dcbdc4f408fc51efa043220517
[ "MIT" ]
null
null
null
general-problems/general/7/solution.py
michaelmunje/algorithms
3b8da8aa8bb541dcbdc4f408fc51efa043220517
[ "MIT" ]
1
2018-09-26T23:54:25.000Z
2018-09-26T23:54:25.000Z
# General Problem 7: # Implement binary search of a sorted array of integers # Solution: # Binary search algorithm # 3 functions: # recursion, specifically divide and conquer recursion # while loop that uses divide and conquer # while loop that doesn't use start and end, uses divide and conquer import math def binar...
23.506329
68
0.619817
import math def binarySearchRec(arr, start, end, value): if (start <= end): mp = (start + end) // 2 if (arr[mp] == value): return mp elif (arr[mp] < value): getBin = binarySearchRec(arr, mp + 1, end, value) if (getBin != -1): return getBin else: return -1 else: getBin = binarySearchRe...
true
true
1c0890979ee795a51d095bd65c32c4ea80404808
182
py
Python
delivery/delivery/app.py
rvilelajr/flask-example
aefaa9f75c838ba33019c2ea5278a621e7f84ff5
[ "Unlicense" ]
null
null
null
delivery/delivery/app.py
rvilelajr/flask-example
aefaa9f75c838ba33019c2ea5278a621e7f84ff5
[ "Unlicense" ]
null
null
null
delivery/delivery/app.py
rvilelajr/flask-example
aefaa9f75c838ba33019c2ea5278a621e7f84ff5
[ "Unlicense" ]
null
null
null
from flask import Flask from delivery.extensions import config def create_app(): """Create main factory""" app = Flask(__name__) config.init_app(app) return app
14
38
0.692308
from flask import Flask from delivery.extensions import config def create_app(): app = Flask(__name__) config.init_app(app) return app
true
true
1c0890e53de671b2a7e8fa8d388df98fc3abe106
550
py
Python
k8s.py
DiptoChakrabarty/diagrams
6efaff8b06b49c071bf243bc266f0be9fdd70afb
[ "MIT" ]
null
null
null
k8s.py
DiptoChakrabarty/diagrams
6efaff8b06b49c071bf243bc266f0be9fdd70afb
[ "MIT" ]
null
null
null
k8s.py
DiptoChakrabarty/diagrams
6efaff8b06b49c071bf243bc266f0be9fdd70afb
[ "MIT" ]
null
null
null
from diagrams import Diagram,Cluster from diagrams.k8s.network import Ingress,Service from diagrams.k8s.compute import Deployment,Pod,ReplicaSet from diagrams.k8s.clusterconfig import HPA with Diagram("K8s",show=True,direction="TB"): net = Ingress("example.com") >> Service("svc") deploy = Deployment("backend"...
30.555556
58
0.66
from diagrams import Diagram,Cluster from diagrams.k8s.network import Ingress,Service from diagrams.k8s.compute import Deployment,Pod,ReplicaSet from diagrams.k8s.clusterconfig import HPA with Diagram("K8s",show=True,direction="TB"): net = Ingress("example.com") >> Service("svc") deploy = Deployment("backend"...
true
true
1c089335f2db2806f159b1b7d5be8ccae9367ef8
20,186
py
Python
detectron2/engine/defaults.py
jkznst/detectron2
790f1894134bb85b897b0912367ee54a24caf2b2
[ "Apache-2.0" ]
null
null
null
detectron2/engine/defaults.py
jkznst/detectron2
790f1894134bb85b897b0912367ee54a24caf2b2
[ "Apache-2.0" ]
1
2020-06-23T13:39:45.000Z
2020-06-23T13:39:45.000Z
detectron2/engine/defaults.py
jkznst/detectron2
790f1894134bb85b897b0912367ee54a24caf2b2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ This file contains components with some default boilerplate logic user may need in training / testing. They will not work for everyone, but many users may find them useful. The behavior of functions/classes in this file...
38.15879
100
0.645745
import argparse import logging import os import sys from collections import OrderedDict import torch from fvcore.common.file_io import PathManager from fvcore.nn.precise_bn import get_bn_modules from torch.nn.parallel import DistributedDataParallel import detectron2.data.transforms as T from detectron2.checkpoint im...
true
true
1c08935d44bb65bc3fd902d0744da3a58c99858d
5,518
py
Python
contrib/seeds/makeseeds.py
pacificao/agrarian
184ece190c9f531f16546f4e9d3f8f2ee5d28a28
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
pacificao/agrarian
184ece190c9f531f16546f4e9d3f8f2ee5d28a28
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
pacificao/agrarian
184ece190c9f531f16546f4e9d3f8f2ee5d28a28
[ "MIT" ]
1
2022-02-10T12:39:58.000Z
2022-02-10T12:39:58.000Z
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 #...
32.081395
186
0.567235
# NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = { "" } import re import sys import dns.resolver import collections PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{...
true
true
1c08946d8f800195ea0620d14410d2df6fa11bd5
10,600
py
Python
forte/data/data_store.py
VincentYaoMBZUAI/forte-1
74d620444ab4cac011726c7073363c66a54be154
[ "Apache-2.0" ]
null
null
null
forte/data/data_store.py
VincentYaoMBZUAI/forte-1
74d620444ab4cac011726c7073363c66a54be154
[ "Apache-2.0" ]
null
null
null
forte/data/data_store.py
VincentYaoMBZUAI/forte-1
74d620444ab4cac011726c7073363c66a54be154
[ "Apache-2.0" ]
null
null
null
from typing import Union, Type, List, Iterator, Tuple import uuid from forte.data.ontology.core import EntryType from forte.data.base_store import BaseStore __all__ = ["DataStore"] class DataStore(BaseStore): # pylint: disable=pointless-string-statement def __init__(self): r"""An implementation fro...
39.849624
99
0.599811
from typing import Union, Type, List, Iterator, Tuple import uuid from forte.data.ontology.core import EntryType from forte.data.base_store import BaseStore __all__ = ["DataStore"] class DataStore(BaseStore): def __init__(self): super().__init__() self._type_attribu...
true
true
1c0896411aee6f2fb94bac81e0bd09bc69e8d6a1
20,819
py
Python
pypeit/par/util.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
107
2018-08-06T07:07:20.000Z
2022-02-28T14:33:42.000Z
pypeit/par/util.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
889
2018-07-26T12:14:33.000Z
2022-03-18T22:49:42.000Z
pypeit/par/util.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
74
2018-09-25T17:03:07.000Z
2022-03-10T23:59:24.000Z
# -*- coding: utf-8 -*- """ Utility functions for PypeIt parameter sets """ import os import time import glob import warnings import textwrap from IPython import embed import numpy as np from astropy.table import Table from configobj import ConfigObj from pypeit import msgs #--------------------------------------...
31.543939
100
0.587588
import os import time import glob import warnings import textwrap from IPython import embed import numpy as np from astropy.table import Table from configobj import ConfigObj from pypeit import msgs def _eval_ignore(): return [ 'open', 'file', 'dict', 'list', 'tuple' ] def recursive_dict_evaluate(d): ig...
true
true
1c08964244d7263f58433e4dcedcd6206491cb46
3,695
py
Python
src/openprocurement/api/views/question.py
Leits/openprocurement.api
9c7cac2f29343d8f184d89551bf0461302b304c8
[ "Apache-2.0" ]
null
null
null
src/openprocurement/api/views/question.py
Leits/openprocurement.api
9c7cac2f29343d8f184d89551bf0461302b304c8
[ "Apache-2.0" ]
2
2021-03-26T00:34:47.000Z
2022-03-21T22:20:52.000Z
src/openprocurement/api/views/question.py
leits/openprocurement.api
9c7cac2f29343d8f184d89551bf0461302b304c8
[ "Apache-2.0" ]
1
2017-08-14T08:05:31.000Z
2017-08-14T08:05:31.000Z
# -*- coding: utf-8 -*- from logging import getLogger from openprocurement.api.models import get_now from openprocurement.api.utils import ( apply_patch, save_tender, opresource, json_view, context_unpack, ) from openprocurement.api.validation import ( validate_question_data, validate_patch_...
45.060976
144
0.65548
from logging import getLogger from openprocurement.api.models import get_now from openprocurement.api.utils import ( apply_patch, save_tender, opresource, json_view, context_unpack, ) from openprocurement.api.validation import ( validate_question_data, validate_patch_question_data, ) LOGGE...
true
true
1c08984c166df03e6e004e91f98e6ec0e9b1a28e
888
py
Python
test/files/init-wrong-fieldname-error.py
Funkschy/kantan-lang
7df361ed646f60bc4f96cc8306bd1488d69a53e8
[ "MIT" ]
15
2020-06-02T17:31:10.000Z
2021-09-08T14:37:52.000Z
test/files/init-wrong-fieldname-error.py
Funkschy/kantan-lang
7df361ed646f60bc4f96cc8306bd1488d69a53e8
[ "MIT" ]
48
2020-06-04T12:50:31.000Z
2020-09-15T14:35:03.000Z
test/files/init-wrong-fieldname-error.py
Funkschy/kantan-lang
7df361ed646f60bc4f96cc8306bd1488d69a53e8
[ "MIT" ]
null
null
null
from typing import Optional from testcase import Code from errors import TestError, Severity from output import KantanOutput class Test(Code): def check(self, output: KantanOutput) -> Optional[TestError]: if len(output.errors) != 1: msg = 'expected 1 error, but got {}'.format(len(output.error...
30.62069
92
0.621622
from typing import Optional from testcase import Code from errors import TestError, Severity from output import KantanOutput class Test(Code): def check(self, output: KantanOutput) -> Optional[TestError]: if len(output.errors) != 1: msg = 'expected 1 error, but got {}'.format(len(output.error...
true
true
1c08987c6be22dce93997cbf68981819822cd96d
632
py
Python
examples/pygame/setup.py
flupke/py2app
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
[ "MIT" ]
193
2020-01-15T09:34:20.000Z
2022-03-18T19:14:16.000Z
examples/pygame/setup.py
flupke/py2app
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
[ "MIT" ]
185
2020-01-15T08:38:27.000Z
2022-03-27T17:29:29.000Z
examples/pygame/setup.py
flupke/py2app
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
[ "MIT" ]
23
2020-01-24T14:47:18.000Z
2022-02-22T17:19:47.000Z
""" Script for building the example. Usage: python setup.py py2app """ from setuptools import setup NAME = 'aliens' VERSION = '0.1' plist = dict( CFBundleIconFile=NAME, CFBundleName=NAME, CFBundleShortVersionString=VERSION, CFBundleGetInfoString=' '.join([NAME, VERSION]), CFBundleExecutable=N...
18.588235
52
0.620253
from setuptools import setup NAME = 'aliens' VERSION = '0.1' plist = dict( CFBundleIconFile=NAME, CFBundleName=NAME, CFBundleShortVersionString=VERSION, CFBundleGetInfoString=' '.join([NAME, VERSION]), CFBundleExecutable=NAME, CFBundleIdentifier='org.pygame.examples.aliens', ) setup( ...
true
true
1c089b506738ee73e2f1e29cf1729a1abc1e0c0b
2,866
py
Python
tools/serve/test_serve.py
Ms2ger/web-platform-tests
645c0e8a5c028a613e7ad1732834100dbe946fc7
[ "BSD-3-Clause" ]
9
2019-04-01T10:57:10.000Z
2021-12-02T11:12:06.000Z
tools/serve/test_serve.py
Ms2ger/web-platform-tests
645c0e8a5c028a613e7ad1732834100dbe946fc7
[ "BSD-3-Clause" ]
33
2019-03-21T10:18:37.000Z
2022-03-23T13:21:40.000Z
tools/serve/test_serve.py
Ms2ger/web-platform-tests
645c0e8a5c028a613e7ad1732834100dbe946fc7
[ "BSD-3-Clause" ]
7
2019-04-24T10:51:15.000Z
2021-12-17T16:53:01.000Z
import pickle import platform import os import pytest import localpaths from . import serve from .serve import ConfigBuilder @pytest.mark.skipif(platform.uname()[0] == "Windows", reason="Expected contents are platform-dependent") def test_make_hosts_file_nix(): with ConfigBuilder(ports={"htt...
36.74359
92
0.491626
import pickle import platform import os import pytest import localpaths from . import serve from .serve import ConfigBuilder @pytest.mark.skipif(platform.uname()[0] == "Windows", reason="Expected contents are platform-dependent") def test_make_hosts_file_nix(): with ConfigBuilder(ports={"htt...
true
true
1c089b6571636ce977d072c5b2f26d23b9882720
541
py
Python
pdb2data.py
mikkkee/Bubble
f9ac318e64aa3e38f199d191fa63ebe645e58a78
[ "MIT" ]
null
null
null
pdb2data.py
mikkkee/Bubble
f9ac318e64aa3e38f199d191fa63ebe645e58a78
[ "MIT" ]
null
null
null
pdb2data.py
mikkkee/Bubble
f9ac318e64aa3e38f199d191fa63ebe645e58a78
[ "MIT" ]
null
null
null
import logging import bubble as bb reload(bb) logging.basicConfig(level=logging.INFO) grofiles = [ r'/Users/jianfeng/Dropbox/structure/60.pdb', r'/Users/jianfeng/Dropbox/structure/70.pdb', r'/Users/jianfeng/Dropbox/structure/80.pdb', r'/Users/jianfeng/Dropbox/structure/90.pdb', ...
33.8125
58
0.680222
import logging import bubble as bb reload(bb) logging.basicConfig(level=logging.INFO) grofiles = [ r'/Users/jianfeng/Dropbox/structure/60.pdb', r'/Users/jianfeng/Dropbox/structure/70.pdb', r'/Users/jianfeng/Dropbox/structure/80.pdb', r'/Users/jianfeng/Dropbox/structure/90.pdb', ...
true
true
1c089cb440bb62210c628931938d6d7323285dd5
456
py
Python
dataladmetadatamodel/connectorlist.py
yarikoptic/metadata-model
fac75a12f1c1ceaf111372dc1d22c8f39ce1481d
[ "MIT" ]
null
null
null
dataladmetadatamodel/connectorlist.py
yarikoptic/metadata-model
fac75a12f1c1ceaf111372dc1d22c8f39ce1481d
[ "MIT" ]
null
null
null
dataladmetadatamodel/connectorlist.py
yarikoptic/metadata-model
fac75a12f1c1ceaf111372dc1d22c8f39ce1481d
[ "MIT" ]
null
null
null
""" A ConnectorList contains a list of connectors, much like a list. The connector list supports saving the bottom half of all its connectors """ from .connector import ConnectedObject as _ConnectedObject class ConnectorList(list, _ConnectedObject): def __init__(self): super(list, self).__init__() ...
22.8
58
0.723684
from .connector import ConnectedObject as _ConnectedObject class ConnectorList(list, _ConnectedObject): def __init__(self): super(list, self).__init__() def save_bottom_half(self, family, realm): for index, connector in enumerate(self): connector.unmap(family, realm)
true
true
1c089cb80663da2f05f8555794afff2b692d4e3c
1,865
py
Python
tests/test_grids/test_surfer6text.py
iod-ine/philoseismos
79240d11cf82c3552c4a49d4e19a79b003fa9929
[ "MIT" ]
3
2020-09-28T17:57:29.000Z
2021-08-18T03:54:46.000Z
tests/test_grids/test_surfer6text.py
iod-ine/philoseismos
79240d11cf82c3552c4a49d4e19a79b003fa9929
[ "MIT" ]
1
2021-04-12T15:18:28.000Z
2021-04-12T15:18:28.000Z
tests/test_grids/test_surfer6text.py
iod-ine/philoseismos
79240d11cf82c3552c4a49d4e19a79b003fa9929
[ "MIT" ]
1
2020-05-12T07:00:59.000Z
2020-05-12T07:00:59.000Z
""" philoseismos: engineering seismologist's toolbox. author: Ivan Dubrovin e-mail: io.dubrovin@icloud.com """ import numpy as np import pytest from philoseismos.grids import Surfer6TextGrid def test_loading_surfer6text(text_grd_file, bad_text_grd_file): """ Test loading process of the grid files. """ # o...
26.267606
76
0.651475
import numpy as np import pytest from philoseismos.grids import Surfer6TextGrid def test_loading_surfer6text(text_grd_file, bad_text_grd_file): with pytest.raises(ValueError): grd = Surfer6TextGrid.load(bad_text_grd_file) grd = Surfer6TextGrid.load(text_grd_file) assert grd.nx == 10 a...
true
true
1c089def5148d37758cde3c75303c3a468288734
3,933
py
Python
pychron/image/pylon_camera.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/image/pylon_camera.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/image/pylon_camera.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2018 ross # # 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/LICE...
33.615385
88
0.516145
from __future__ import absolute_import from __future__ import print_function import os from pychron.core.yaml import yload try: import pypylon except ImportError: print("failed importing pylon") from pychron.loggable import Loggable class PylonCamera(Loggable): def __init__(self, identifier, *args, **...
true
true
1c089f050ea0fa5f20a0f22fa59558ec8a37202b
7,134
py
Python
hxlm/core/util.py
EticaAI/HXL-Data-Science-file-formats
c7c5aa56c452ac1613242ee04cc9ae66f38ec24d
[ "Unlicense" ]
3
2021-01-25T20:44:10.000Z
2021-04-19T22:47:05.000Z
hxlm/core/util.py
fititnt/HXL-Data-Science-file-formats
f4fe9866e53280767f9cb4c8c488ef9c8b9d33cd
[ "Unlicense" ]
24
2021-01-26T00:36:39.000Z
2021-11-13T23:59:56.000Z
hxlm/core/util.py
fititnt/HXL-Data-Science-file-formats
f4fe9866e53280767f9cb4c8c488ef9c8b9d33cd
[ "Unlicense" ]
1
2021-09-05T03:43:37.000Z
2021-09-05T03:43:37.000Z
"""hxlm.core.util provive quick utilitaries for common tasks """ # from functools import reduce, lru_cache from functools import reduce from typing import ( Any, # Union ) # import json # import csv # import yaml import hxl from hxlm.core.constant import ( # HTYPE_TRUE # HTYPE_FALSE HTYPE_UNKNOW...
26.819549
78
0.618867
from functools import reduce from typing import ( Any, ) import hxl from hxlm.core.constant import ( HTYPE_UNKNOW ) from hxlm.core.constant import ( HDSLU, HDSL_DEFAULT ) from hxlm.core.internal.util import _get_submodules from hxlm.core.compliance import verbose_event from hxlm.core...
true
true
1c08a21c22fff228d8771cf822b521cca9b29c97
2,066
py
Python
Snapchat_Filters/Iron Man filter/iron_man.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
175
2020-10-02T13:42:50.000Z
2022-03-30T15:57:12.000Z
Snapchat_Filters/Iron Man filter/iron_man.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
704
2020-09-30T10:44:13.000Z
2022-03-30T07:18:28.000Z
Snapchat_Filters/Iron Man filter/iron_man.py
swapnilgarg7/Face-X
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
[ "MIT" ]
342
2020-10-02T14:04:49.000Z
2022-03-31T10:14:20.000Z
import cv2 import dlib def filter(frame,landmarks): ironManImg = cv2.imread("ironManMask.png",-1) ironManMask = ironManImg[:, :, 3] # binary image ironManMaskInv = cv2.bitwise_not(ironManMask) # inverting the binary img ironManImg = ironManImg[:, :, 0:3] # dimensions of the ironMan i...
32.28125
84
0.654405
import cv2 import dlib def filter(frame,landmarks): ironManImg = cv2.imread("ironManMask.png",-1) ironManMask = ironManImg[:, :, 3] ironManMaskInv = cv2.bitwise_not(ironManMask) ironManImg = ironManImg[:, :, 0:3] ironManHt, ironManWd = ironManImg.shape[:2] ironManWd1 = abs(l...
true
true
1c08a238e5ea80ed2dd192b33e67b924529683be
2,717
py
Python
visualize_detection_result.py
ixhorse/pixel_link
c0000da7b557e7e326fd017538204567c8fdd425
[ "MIT" ]
null
null
null
visualize_detection_result.py
ixhorse/pixel_link
c0000da7b557e7e326fd017538204567c8fdd425
[ "MIT" ]
null
null
null
visualize_detection_result.py
ixhorse/pixel_link
c0000da7b557e7e326fd017538204567c8fdd425
[ "MIT" ]
null
null
null
#encoding utf-8 import numpy as np import util def draw_bbox(image_data, line, color): line = util.str.remove_all(line, '\xef\xbb\xbf') data = line.split(','); points = [int(v) for v in data[0:8]] points = np.reshape(points, (4, 2)) cnts = util.img.points_to_contours(points) util.img.draw_con...
45.283333
112
0.652558
import numpy as np import util def draw_bbox(image_data, line, color): line = util.str.remove_all(line, '\xef\xbb\xbf') data = line.split(','); points = [int(v) for v in data[0:8]] points = np.reshape(points, (4, 2)) cnts = util.img.points_to_contours(points) util.img.draw_contours(image_data...
false
true
1c08a2a2961cc16cde563eb005323bee7a497860
8,345
py
Python
train_instance_classifier.py
xiaobaishu0097/Pointcloud-InstanceSegmentation
072fe748e31d466cb58b202d9bddb37303d07858
[ "Apache-2.0" ]
null
null
null
train_instance_classifier.py
xiaobaishu0097/Pointcloud-InstanceSegmentation
072fe748e31d466cb58b202d9bddb37303d07858
[ "Apache-2.0" ]
null
null
null
train_instance_classifier.py
xiaobaishu0097/Pointcloud-InstanceSegmentation
072fe748e31d466cb58b202d9bddb37303d07858
[ "Apache-2.0" ]
null
null
null
''' PointGroup train.py Written by Li Jiang ''' import torch import torch.optim as optim from torch.utils.data import DataLoader, DistributedSampler import time, sys, os, random, glob from tensorboardX import SummaryWriter import numpy as np import util.utils as utils from util.class_finder import model_class from m...
36.762115
196
0.610905
import torch import torch.optim as optim from torch.utils.data import DataLoader, DistributedSampler import time, sys, os, random, glob from tensorboardX import SummaryWriter import numpy as np import util.utils as utils from util.class_finder import model_class from model.model_functions import model_fn_decorator ...
true
true
1c08a3ab45339abfead5c36e884cf176abffaefd
43,304
py
Python
python/ccxt/hitbtc.py
Nicic92/ccxt
1b5e1c33ae16c1933ce0813fae9e8188ad2b79de
[ "MIT" ]
1
2021-02-08T21:56:13.000Z
2021-02-08T21:56:13.000Z
python/ccxt/hitbtc.py
yucelalbar/ccxt
672510401fba809172fac8272e1af463c778358a
[ "MIT" ]
null
null
null
python/ccxt/hitbtc.py
yucelalbar/ccxt
672510401fba809172fac8272e1af463c778358a
[ "MIT" ]
1
2020-10-26T18:15:43.000Z
2020-10-26T18:15:43.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
40.584817
189
0.500831
from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder ...
true
true
1c08a407f5258d999b23542dcce82169bb0e99f7
4,815
py
Python
effdet/data/dataset_factory.py
SKA-INAF/efficientdet-pytorch
8967bab88288d11e5547a7efa391adc0c987be47
[ "Apache-2.0" ]
null
null
null
effdet/data/dataset_factory.py
SKA-INAF/efficientdet-pytorch
8967bab88288d11e5547a7efa391adc0c987be47
[ "Apache-2.0" ]
null
null
null
effdet/data/dataset_factory.py
SKA-INAF/efficientdet-pytorch
8967bab88288d11e5547a7efa391adc0c987be47
[ "Apache-2.0" ]
null
null
null
""" Dataset factory Copyright 2020 Ross Wightman """ import os from collections import OrderedDict from pathlib import Path from effdet.data.parsers.parser_config import RadioGalaxyParserCfg from effdet.data.parsers.parser_radio_galaxy import RadioGalaxyParser from .dataset_config import * from .parsers import * fro...
41.508621
102
0.58297
import os from collections import OrderedDict from pathlib import Path from effdet.data.parsers.parser_config import RadioGalaxyParserCfg from effdet.data.parsers.parser_radio_galaxy import RadioGalaxyParser from .dataset_config import * from .parsers import * from .dataset import DetectionDatset from .parsers import...
true
true
1c08a4a9f959b8b9f782d5f2e8470dc544e64b55
1,173
py
Python
DQM/SiPixelMonitorTrack/python/SiPixelMonitorEfficiency_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
DQM/SiPixelMonitorTrack/python/SiPixelMonitorEfficiency_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
DQM/SiPixelMonitorTrack/python/SiPixelMonitorEfficiency_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms # # This object is used to make changes for different running scenarios # SiPixelHitEfficiencySource = cms.EDAnalyzer("SiPixelHitEfficiencySource", src = cms.InputTag("siPixelHitEfficiency"), debug = cms.untracked.bool(False), saveFile = c...
39.1
86
0.722933
import FWCore.ParameterSet.Config as cms SiPixelHitEfficiencySource = cms.EDAnalyzer("SiPixelHitEfficiencySource", src = cms.InputTag("siPixelHitEfficiency"), debug = cms.untracked.bool(False), saveFile = cms.untracked.bool(True), outputFile = cms.string('Pixel_DQM_HitEfficie...
true
true
1c08a52477c8fe677d195d2125fd66a5b948eede
7,074
py
Python
venv/Lib/site-packages/TFL_STP/fs_find.py
nasir733/airbnb-clone
9ac746b6f3f3c8fc45f97773266e6f5f182d14b9
[ "MIT" ]
6
2016-12-10T17:51:10.000Z
2021-10-11T07:51:48.000Z
venv/Lib/site-packages/TFL_STP/fs_find.py
nasir733/airbnb-clone
9ac746b6f3f3c8fc45f97773266e6f5f182d14b9
[ "MIT" ]
null
null
null
venv/Lib/site-packages/TFL_STP/fs_find.py
nasir733/airbnb-clone
9ac746b6f3f3c8fc45f97773266e6f5f182d14b9
[ "MIT" ]
3
2020-03-29T07:37:03.000Z
2021-01-21T16:08:40.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2016-2020 Mag. Christian Tanzer All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at # #*** <License> ************************************************************# # This module is part of the package TFL_STP. # # This module is licensed under the ter...
32.449541
92
0.565168
import os import re _cwd = os.curdir _cwd_prefix = os.curdir + os.sep _undef = object () class Filter (object) : all = staticmethod (lambda d : True) @staticmethod def combine (combiner, * predicates) : return lambda x : combiner (tuple (p (x) for p in predicates)) @staticm...
true
true
1c08a54bc82c0af553561790f860aafe472406d2
15,307
py
Python
javus/gppw.py
petrs/javus
6927c824d5e6b574a6a323c87bd5aa117eca5b00
[ "MIT" ]
1
2021-06-04T10:29:31.000Z
2021-06-04T10:29:31.000Z
javus/gppw.py
petrs/javus
6927c824d5e6b574a6a323c87bd5aa117eca5b00
[ "MIT" ]
null
null
null
javus/gppw.py
petrs/javus
6927c824d5e6b574a6a323c87bd5aa117eca5b00
[ "MIT" ]
null
null
null
#!/usr/bin/env python # from jcvmutils.utils import LOG_LEVELS import configparser import enum import logging import os import re import subprocess import tempfile from typing import List, Optional import smartcard from javus.card import CardState from javus.settings import DATA, PROJECT_ROOT from javus.utils import...
33.641758
127
0.574639
import configparser import enum import logging import os import re import subprocess import tempfile from typing import List, Optional import smartcard from javus.card import CardState from javus.settings import DATA, PROJECT_ROOT from javus.utils import Timer log = logging.getLogger(__file__) handler = logging.St...
true
true
1c08a59be8e62de00622563e2371d2cee2cc3f75
7,983
py
Python
tensorpack/models/pool.py
thuzhf/tensorpack
83ef7d05d0a16f82d86323c4e2f9b5d14870affa
[ "Apache-2.0" ]
2
2018-10-23T22:02:59.000Z
2021-06-19T15:14:02.000Z
tensorpack/models/pool.py
thuzhf/tensorpack
83ef7d05d0a16f82d86323c4e2f9b5d14870affa
[ "Apache-2.0" ]
null
null
null
tensorpack/models/pool.py
thuzhf/tensorpack
83ef7d05d0a16f82d86323c4e2f9b5d14870affa
[ "Apache-2.0" ]
1
2018-11-14T05:50:57.000Z
2018-11-14T05:50:57.000Z
# -*- coding: utf-8 -*- # File: pool.py import tensorflow as tf import numpy as np from .shape_utils import StaticDynamicShape from .common import layer_register from ..utils.argtools import shape2d, get_data_format from ..utils.develop import log_deprecated from ._test import TestModel from .tflayer import convert_t...
33.542017
118
0.607666
import tensorflow as tf import numpy as np from .shape_utils import StaticDynamicShape from .common import layer_register from ..utils.argtools import shape2d, get_data_format from ..utils.develop import log_deprecated from ._test import TestModel from .tflayer import convert_to_tflayer_args __all__ = ['MaxPooling'...
true
true
1c08a5e487b2abfc12aaefda8726f3a96e40dc1f
4,065
py
Python
api/models.py
mohammedi-haroune/arabic-historical-dictionary-backend
3fa465fdfefe6665ccb19b1dd2ed0cc5af2174e4
[ "MIT" ]
6
2019-01-25T10:47:22.000Z
2020-08-26T23:16:18.000Z
api/models.py
mohammedi-haroune/arabic-historical-dictionary-backend
3fa465fdfefe6665ccb19b1dd2ed0cc5af2174e4
[ "MIT" ]
null
null
null
api/models.py
mohammedi-haroune/arabic-historical-dictionary-backend
3fa465fdfefe6665ccb19b1dd2ed0cc5af2174e4
[ "MIT" ]
1
2019-06-20T09:08:50.000Z
2019-06-20T09:08:50.000Z
from django.db import models # Create your models here. class Dictionary(models.Model): name = models.CharField(max_length=200, unique=True) def __str__(self): return self.name # class Meta: # order_with_respect_to = 'name' class Entry(models.Model): term = models.CharField(max_length=...
34.159664
85
0.673063
from django.db import models class Dictionary(models.Model): name = models.CharField(max_length=200, unique=True) def __str__(self): return self.name class Entry(models.Model): term = models.CharField(max_length=255) dictionary = models.ForeignKey(Dictionary, on_delete=models.CASCADE) ...
true
true
1c08a6e4654e8b2dd2932f1ba7bf9f66b052b04f
933
py
Python
web_api/api/migrations/0096_auto_20161208_0934.py
IoT-BA/project_noe-backend
4b63b4604dd9f3d53a1bdb6ad8e6ad20fe53ebd9
[ "MIT" ]
2
2017-02-27T07:41:18.000Z
2017-03-05T22:13:39.000Z
web_api/api/migrations/0096_auto_20161208_0934.py
IoT-BA/lorawan-sk-backend
4b63b4604dd9f3d53a1bdb6ad8e6ad20fe53ebd9
[ "MIT" ]
null
null
null
web_api/api/migrations/0096_auto_20161208_0934.py
IoT-BA/lorawan-sk-backend
4b63b4604dd9f3d53a1bdb6ad8e6ad20fe53ebd9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-12-08 09:34 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency...
28.272727
128
0.630225
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('api', '0095_auto_20161208_0933')...
true
true
1c08a87806062c374c6d5031c05b4a6c829f9f12
2,107
py
Python
tests/ui/testcases.py
vCra/Programdom
23d734409102917734e67d233768b494904a5cef
[ "MIT" ]
1
2021-06-14T01:08:55.000Z
2021-06-14T01:08:55.000Z
tests/ui/testcases.py
vCra/Programdom
23d734409102917734e67d233768b494904a5cef
[ "MIT" ]
10
2019-01-28T16:03:12.000Z
2019-01-28T16:09:48.000Z
tests/ui/testcases.py
vCra/Programdom
23d734409102917734e67d233768b494904a5cef
[ "MIT" ]
null
null
null
import os import subprocess from sys import stdout, stderr from channels.testing import ChannelsLiveServerTestCase from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core.cache import cache from splinter import Browser from django.urls import reverse f...
30.1
109
0.698624
import os import subprocess from sys import stdout, stderr from channels.testing import ChannelsLiveServerTestCase from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core.cache import cache from splinter import Browser from django.urls import reverse f...
true
true
1c08a91abde9338db59ebc76d7c75cc6b94e2d87
19,610
py
Python
rlpyt/utils/launching/affinity.py
williamd4112/curiosity_baselines
45939f3f24c53cfff5153ef012486a6a058660be
[ "MIT" ]
5
2021-02-19T01:35:22.000Z
2022-03-29T20:48:34.000Z
rlpyt/utils/launching/affinity.py
Improbable-AI/curiosity_baselines
42dca92b2fb66c0790a72206bf48595d3b5b487f
[ "MIT" ]
3
2021-09-08T03:31:49.000Z
2022-03-12T00:59:45.000Z
rlpyt/utils/launching/affinity.py
williamd4112/curiosity_baselines
45939f3f24c53cfff5153ef012486a6a058660be
[ "MIT" ]
2
2021-04-17T09:11:56.000Z
2022-03-24T04:21:17.000Z
from rlpyt.utils.collections import AttrDict # Readable-to-less-readable abbreviations. N_GPU = "gpu" CONTEXTS_PER_GPU = "cxg" # CUDA contexts. GPU_PER_RUN = "gpr" N_CPU_CORE = "cpu" HYPERTHREAD_OFFSET = "hto" # Can specify if different from n_cpu_core. N_SOCKET = "skt" RUN_SLOT = "slt" CPU_PER_WORKER = "cpw" CPU_P...
40.600414
182
0.648853
from rlpyt.utils.collections import AttrDict N_GPU = "gpu" CONTEXTS_PER_GPU = "cxg" GPU_PER_RUN = "gpr" N_CPU_CORE = "cpu" HYPERTHREAD_OFFSET = "hto" N_SOCKET = "skt" RUN_SLOT = "slt" CPU_PER_WORKER = "cpw" CPU_PER_RUN = "cpr" CPU_RESERVED = "res" ASYNC_SAMPLE = "ass" SAMPLE_GPU_PER_RUN = "sgr" OPTIM_SAMPLE_SHARE...
true
true
1c08a9b4305a4be9900417c2383e32ed3c365448
2,342
py
Python
HW1/HWK_1_Codes/Code/util.py
rockyyyyyygt/Probabilistic-Graphical-Models-PGM-8803-20-Spring
7bdba55695a1f15ae091bbc413e74d04768959eb
[ "MIT" ]
null
null
null
HW1/HWK_1_Codes/Code/util.py
rockyyyyyygt/Probabilistic-Graphical-Models-PGM-8803-20-Spring
7bdba55695a1f15ae091bbc413e74d04768959eb
[ "MIT" ]
null
null
null
HW1/HWK_1_Codes/Code/util.py
rockyyyyyygt/Probabilistic-Graphical-Models-PGM-8803-20-Spring
7bdba55695a1f15ae091bbc413e74d04768959eb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys import re RARE_TAG = '_RARE_' RARE_WORD_THRESHOLD = 5 def is_numeric(word): find_numeric = False if re.match('[0-9]+', word): find_numeric = True return find_numeric def is_all_uppercase(word): ''' The word consists entirely of capitalized letters. ...
24.914894
79
0.575149
import sys import re RARE_TAG = '_RARE_' RARE_WORD_THRESHOLD = 5 def is_numeric(word): find_numeric = False if re.match('[0-9]+', word): find_numeric = True return find_numeric def is_all_uppercase(word): all_uppercase = False if re.match('^[A-Z]+$', word): all_uppercase = True...
true
true
1c08abf95f68462300b6eaa2a3eb7ac095c32f85
136,178
py
Python
airflow/www/views.py
pchtsp/airflow
9702fcb0bfd221038a74c69b2f239040483c030d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/www/views.py
pchtsp/airflow
9702fcb0bfd221038a74c69b2f239040483c030d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/www/views.py
pchtsp/airflow
9702fcb0bfd221038a74c69b2f239040483c030d
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
35.892989
110
0.601705
import copy import itertools import json import logging import math import socket import sys import traceback from collections import defaultdict from datetime import datetime, timedelta from json import JSONDecodeError from operator import itemgetter from typing import Dict, List, Optional, Tuple from urllib.parse imp...
true
true
1c08ac33f1da4f951e0e941c33649b0204412327
2,841
py
Python
src/analytics/video_games/scraper/vgchartz_weekly_sales_data.py
manjotms10/google-trends-analytics
718311ba92d880623eb85cf5c76423116faaade2
[ "MIT" ]
6
2020-03-04T13:33:37.000Z
2021-06-25T12:08:21.000Z
src/analytics/video_games/scraper/vgchartz_weekly_sales_data.py
manjotms10/google-trends-analytics
718311ba92d880623eb85cf5c76423116faaade2
[ "MIT" ]
3
2021-03-31T19:31:51.000Z
2021-12-13T20:26:19.000Z
src/analytics/video_games/scraper/vgchartz_weekly_sales_data.py
manjotms10/google-trends-analytics
718311ba92d880623eb85cf5c76423116faaade2
[ "MIT" ]
null
null
null
import requests import pandas import numpy as np from bs4 import BeautifulSoup def weekly_sales_scrape(weeks): ''' this function is to get the weekly sales data from http://www.vgchartz.com/weekly/(week code)/Global/, where (weekcode) need to be specified by the week you are looking for. This funct...
37.88
122
0.56811
import requests import pandas import numpy as np from bs4 import BeautifulSoup def weekly_sales_scrape(weeks): page_list = [] data = {} rank_of_week =[] name = [] weekly_sales = [] total_sales = [] week = [] for ith_page in range(weeks): page_num = 43464 - ...
true
true
1c08adcabb0d744d40d98196d9f63d3384ec2b9c
1,606
py
Python
tests/explorers_tests/test_additive_gaussian.py
xinyuewang1/chainerrl
49425d09cb0749968f4e364e281670e752a46791
[ "MIT" ]
1
2019-11-16T12:49:39.000Z
2019-11-16T12:49:39.000Z
tests/explorers_tests/test_additive_gaussian.py
xinyuewang1/chainerrl
49425d09cb0749968f4e364e281670e752a46791
[ "MIT" ]
null
null
null
tests/explorers_tests/test_additive_gaussian.py
xinyuewang1/chainerrl
49425d09cb0749968f4e364e281670e752a46791
[ "MIT" ]
1
2019-08-08T19:13:53.000Z
2019-08-08T19:13:53.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() # NOQA import unittest from chainer import testing from chainer.testing import condition import nu...
28.175439
77
0.5934
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() import unittest from chainer import testing from chainer.testing import condition import numpy as ...
true
true
1c08ae0e3b1702ae0c11a0c3d2fdc34a95b2e71d
6,404
py
Python
final/sol/Final2020_analysis.py
rainwaterone/stat656
c582fc8c6a55c377e2b57d1f7b10471d625d79db
[ "MIT" ]
null
null
null
final/sol/Final2020_analysis.py
rainwaterone/stat656
c582fc8c6a55c377e2b57d1f7b10471d625d79db
[ "MIT" ]
null
null
null
final/sol/Final2020_analysis.py
rainwaterone/stat656
c582fc8c6a55c377e2b57d1f7b10471d625d79db
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 4 12:17:34 2020 @author: EJones """ import pandas as pd import numpy as np import matplotlib.pyplot as plt # Classes provided from AdvancedAnalytics ver 1.25 from AdvancedAnalytics.Text import text_plot Analysis = "Covid" filename = "PICKLE/"+Ana...
31.70297
82
0.565116
import pandas as pd import numpy as np import matplotlib.pyplot as plt from AdvancedAnalytics.Text import text_plot Analysis = "Covid" filename = "PICKLE/"+Analysis+"_08-04_df_all_pickle.pkl" if Analysis == "Election": print("{:-<40s}{:->39s}".format('*', '*')) print("{:-<22s} SENTIMENT ANALYSIS OF 202...
true
true
1c08aed06d7d9c17d15d4664e5d339fdfe993907
17,390
py
Python
4yc total light equip hvac 6tc light equip fan infil chiller boiler 4xc/Multi - Bayesian Calibration Gaussian Process.py
SongChao111/Multi-output-GP
35c26f9cce42cab5f45393910f9fba1fa52a3ccc
[ "MIT" ]
null
null
null
4yc total light equip hvac 6tc light equip fan infil chiller boiler 4xc/Multi - Bayesian Calibration Gaussian Process.py
SongChao111/Multi-output-GP
35c26f9cce42cab5f45393910f9fba1fa52a3ccc
[ "MIT" ]
null
null
null
4yc total light equip hvac 6tc light equip fan infil chiller boiler 4xc/Multi - Bayesian Calibration Gaussian Process.py
SongChao111/Multi-output-GP
35c26f9cce42cab5f45393910f9fba1fa52a3ccc
[ "MIT" ]
null
null
null
import numpy as np np.random.seed(206) import scipy import pandas as pd import matplotlib.pyplot as plt from sklearn.cluster import KMeans import theano import theano.tensor as tt import pymc3 as pm from pymc3.gp.cov import Covariance import scipy.stats as st import random class MultiMarginal(pm.gp.gp...
41.208531
140
0.592984
import numpy as np np.random.seed(206) import scipy import pandas as pd import matplotlib.pyplot as plt from sklearn.cluster import KMeans import theano import theano.tensor as tt import pymc3 as pm from pymc3.gp.cov import Covariance import scipy.stats as st import random class MultiMarginal(pm.gp.gp...
false
true
1c08af6139b5e85c55c222648da99b99c1ad2a90
4,274
py
Python
khtools/knn.py
dhimmel/kh-tools
860aa846c6e4458f1270dc62f3317807f17469b7
[ "MIT" ]
null
null
null
khtools/knn.py
dhimmel/kh-tools
860aa846c6e4458f1270dc62f3317807f17469b7
[ "MIT" ]
null
null
null
khtools/knn.py
dhimmel/kh-tools
860aa846c6e4458f1270dc62f3317807f17469b7
[ "MIT" ]
null
null
null
import os import warnings from matplotlib.lines import Line2D import matplotlib.pyplot as plt import networkx as nx import pandas as pd from sklearn.neighbors import NearestNeighbors from . import sourmash_utils from .s3_utils import savefig def _compute_neighbor_adjacencies(data, n_neighbors=5): # Convert to di...
38.160714
93
0.667291
import os import warnings from matplotlib.lines import Line2D import matplotlib.pyplot as plt import networkx as nx import pandas as pd from sklearn.neighbors import NearestNeighbors from . import sourmash_utils from .s3_utils import savefig def _compute_neighbor_adjacencies(data, n_neighbors=5): X = 1 - dat...
true
true
1c08af8a6ac7ca2b824545e988ea49f91b27ec92
28,492
py
Python
osmnx/downloader.py
mattijsstam/osmnx
82fa22e453f5268883864077c8149b2b9e4baafb
[ "MIT" ]
null
null
null
osmnx/downloader.py
mattijsstam/osmnx
82fa22e453f5268883864077c8149b2b9e4baafb
[ "MIT" ]
null
null
null
osmnx/downloader.py
mattijsstam/osmnx
82fa22e453f5268883864077c8149b2b9e4baafb
[ "MIT" ]
null
null
null
"""Interact with the OSM APIs.""" import datetime as dt import json import logging as lg import re import socket import time from collections import OrderedDict from hashlib import sha1 from pathlib import Path from urllib.parse import urlparse import numpy as np import requests from dateutil import parser as date_pa...
35.393789
107
0.654605
import datetime as dt import json import logging as lg import re import socket import time from collections import OrderedDict from hashlib import sha1 from pathlib import Path from urllib.parse import urlparse import numpy as np import requests from dateutil import parser as date_parser from . import projection fro...
true
true
1c08afc69cd04f6963879a73d0b8b7e6c40d799d
827
py
Python
demo/alphaction/modeling/backbone/backbone.py
PANBOHE/Humanpose-fight
36e6218db526d567922fa528fa7e11497c53ad60
[ "Apache-2.0" ]
1
2022-02-24T08:52:15.000Z
2022-02-24T08:52:15.000Z
demo/alphaction/modeling/backbone/backbone.py
PANBOHE/Humanpose-fight
36e6218db526d567922fa528fa7e11497c53ad60
[ "Apache-2.0" ]
null
null
null
demo/alphaction/modeling/backbone/backbone.py
PANBOHE/Humanpose-fight
36e6218db526d567922fa528fa7e11497c53ad60
[ "Apache-2.0" ]
null
null
null
from alphaction.modeling import registry from . import slowfast, i3d @registry.BACKBONES.register("Slowfast-Resnet50") @registry.BACKBONES.register("Slowfast-Resnet101") def build_slowfast_resnet_backbone(cfg): model = slowfast.SlowFast(cfg) return model @registry.BACKBONES.register("I3D-Resnet50") @registry....
35.956522
81
0.759371
from alphaction.modeling import registry from . import slowfast, i3d @registry.BACKBONES.register("Slowfast-Resnet50") @registry.BACKBONES.register("Slowfast-Resnet101") def build_slowfast_resnet_backbone(cfg): model = slowfast.SlowFast(cfg) return model @registry.BACKBONES.register("I3D-Resnet50") @registry....
true
true
1c08afe3cd4bb9dd45e66dfdf0c11dd0efd253e0
1,212
py
Python
python/Alura/lista-encadeada/rota.py
alifoliveira/rep-estudos
73ffb7cfe77890f6cca8b5447db332f88454ef7e
[ "MIT" ]
null
null
null
python/Alura/lista-encadeada/rota.py
alifoliveira/rep-estudos
73ffb7cfe77890f6cca8b5447db332f88454ef7e
[ "MIT" ]
null
null
null
python/Alura/lista-encadeada/rota.py
alifoliveira/rep-estudos
73ffb7cfe77890f6cca8b5447db332f88454ef7e
[ "MIT" ]
null
null
null
from lista_ligada import ListaLigada, Celula class Loja: def __init__(self, nome, endereco): self.nome = nome self.endereco = endereco def __repr__(self): return f'{self.nome}\n {self.endereco}' def main(): loja1 = Loja("Mercadinho", "Rua das Laranjeiras, 12") loja2 = Loja(...
28.857143
57
0.655116
from lista_ligada import ListaLigada, Celula class Loja: def __init__(self, nome, endereco): self.nome = nome self.endereco = endereco def __repr__(self): return f'{self.nome}\n {self.endereco}' def main(): loja1 = Loja("Mercadinho", "Rua das Laranjeiras, 12") loja2 = Loja(...
true
true
1c08b03400855ab65b9011bd7faa5ed89d5f81e1
5,726
py
Python
tools/lister.py
alex784004/patient
a6510c4626392b9a8385cbac82698d9e23df0a55
[ "Apache-2.0" ]
1
2019-01-13T20:47:29.000Z
2019-01-13T20:47:29.000Z
tools/lister.py
alex784004/patient
a6510c4626392b9a8385cbac82698d9e23df0a55
[ "Apache-2.0" ]
null
null
null
tools/lister.py
alex784004/patient
a6510c4626392b9a8385cbac82698d9e23df0a55
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function from __future__ import absolute_import import os import sys import subprocess import re from collections import defaultdict import argparse from six.moves import filter from typing import Union, List, Dict def get_ftype(fpath, use_shebang): # type: (st...
42.731343
111
0.610723
from __future__ import print_function from __future__ import absolute_import import os import sys import subprocess import re from collections import defaultdict import argparse from six.moves import filter from typing import Union, List, Dict def get_ftype(fpath, use_shebang): ext = os.path.splitext(fpath)[...
true
true
1c08b03cfbac7bb0d8146867ae9d06258bfbf587
1,854
py
Python
rl/agent/atari_conv_dqn.py
andacdemir/openai_gym
9e20315268df7a5d36e113d721a8ca960b646646
[ "MIT" ]
null
null
null
rl/agent/atari_conv_dqn.py
andacdemir/openai_gym
9e20315268df7a5d36e113d721a8ca960b646646
[ "MIT" ]
null
null
null
rl/agent/atari_conv_dqn.py
andacdemir/openai_gym
9e20315268df7a5d36e113d721a8ca960b646646
[ "MIT" ]
1
2018-09-06T22:40:02.000Z
2018-09-06T22:40:02.000Z
from rl.agent.dqn import DQN from keras.layers.core import Dense, Flatten from keras.layers.convolutional import Convolution2D from keras.optimizers import RMSprop from keras.constraints import maxnorm from keras import backend as K K.set_image_dim_ordering('tf') class ConvDQN(DQN): def __init__(self, *args, **k...
34.981132
77
0.558792
from rl.agent.dqn import DQN from keras.layers.core import Dense, Flatten from keras.layers.convolutional import Convolution2D from keras.optimizers import RMSprop from keras.constraints import maxnorm from keras import backend as K K.set_image_dim_ordering('tf') class ConvDQN(DQN): def __init__(self, *args, **k...
true
true
1c08b06e150b1fac1b872bf9c147facc8a35f389
1,016
py
Python
{{cookiecutter.project_slug}}/migrations/versions/4357021ada2c_add_the_user_model.py
spacetimelabs/cookiecutter-flask-backend
505f666d19dcab63c50dbc3af760702aa839f913
[ "MIT" ]
1
2020-04-08T12:08:46.000Z
2020-04-08T12:08:46.000Z
{{cookiecutter.project_slug}}/migrations/versions/4357021ada2c_add_the_user_model.py
spacetimelabs/cookiecutter-flask-backend
505f666d19dcab63c50dbc3af760702aa839f913
[ "MIT" ]
3
2020-04-08T12:15:28.000Z
2020-04-10T04:35:17.000Z
{{cookiecutter.project_slug}}/migrations/versions/4357021ada2c_add_the_user_model.py
spacetimelabs/cookiecutter-flask-backend
505f666d19dcab63c50dbc3af760702aa839f913
[ "MIT" ]
2
2020-04-08T09:46:29.000Z
2020-04-08T10:07:22.000Z
"""Add the User model Revision ID: 4357021ada2c Revises: Create Date: 2020-04-07 16:12:08.520751 """ from alembic import op import sqlalchemy as sa revision = '4357021ada2c' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table( 'user', sa.Column('id', sa....
27.459459
75
0.661417
from alembic import op import sqlalchemy as sa revision = '4357021ada2c' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table( 'user', sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('username', sa.String(length=128), nul...
true
true
1c08b07568e65115267a47b617218608bad8191d
1,284
py
Python
api.py
Hacker-YHJ/trend-archive
c8a9eb2e42f3440d7b8acfb4cf4145a0e2be9912
[ "MIT" ]
3
2021-02-21T01:03:20.000Z
2021-09-20T14:20:13.000Z
api.py
Hacker-YHJ/trend-archive
c8a9eb2e42f3440d7b8acfb4cf4145a0e2be9912
[ "MIT" ]
null
null
null
api.py
Hacker-YHJ/trend-archive
c8a9eb2e42f3440d7b8acfb4cf4145a0e2be9912
[ "MIT" ]
null
null
null
from typing import Dict, List, Any import requests import json class BilibiliApi(object): BASE_URL = 'https://api.bilibili.com' RAW_DATA_T = List[Dict[str, Any]] @classmethod def get_highest_ranked(cls) -> RAW_DATA_T: url = f'{cls.BASE_URL}/x/web-interface/ranking' return cls._get_dat...
29.181818
84
0.633956
from typing import Dict, List, Any import requests import json class BilibiliApi(object): BASE_URL = 'https://api.bilibili.com' RAW_DATA_T = List[Dict[str, Any]] @classmethod def get_highest_ranked(cls) -> RAW_DATA_T: url = f'{cls.BASE_URL}/x/web-interface/ranking' return cls._get_dat...
true
true
1c08b0c28ae17c5c9a349c6f727086a9b3709c9e
139
py
Python
property_bag/__init__.py
cbigler/python-property-bag
a877fda91c88731405415e936dd26c6677ee897f
[ "MIT" ]
null
null
null
property_bag/__init__.py
cbigler/python-property-bag
a877fda91c88731405415e936dd26c6677ee897f
[ "MIT" ]
null
null
null
property_bag/__init__.py
cbigler/python-property-bag
a877fda91c88731405415e936dd26c6677ee897f
[ "MIT" ]
null
null
null
from .property_bag import PropertyBag from .property_bag_parser import PropertyBagParser def loads(text: str) -> PropertyBag: pass
15.444444
50
0.784173
from .property_bag import PropertyBag from .property_bag_parser import PropertyBagParser def loads(text: str) -> PropertyBag: pass
true
true
1c08b0f0d3a43a6f88511e1a376508d57c91a770
1,453
py
Python
aliyun-python-sdk-imageseg/aliyunsdkimageseg/request/v20191230/SegmentHDCommonImageRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-imageseg/aliyunsdkimageseg/request/v20191230/SegmentHDCommonImageRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-imageseg/aliyunsdkimageseg/request/v20191230/SegmentHDCommonImageRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.236842
89
0.769443
from aliyunsdkcore.request import RpcRequest from aliyunsdkimageseg.endpoint import endpoint_data class SegmentHDCommonImageRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'imageseg', '2019-12-30', 'SegmentHDCommonImage','imageseg') self.set_method('POST') if hasattr(self, "endpoint_map"):...
true
true
1c08b14ed9e89b9fa4721a7786619faf10772795
418
py
Python
mldictionary_api/models/meanings.py
PabloEmidio/MLDictionaryAPI
501f203802c1f6aafe213c0fb7a5808f9a9ad3ab
[ "MIT" ]
2
2022-01-17T16:17:22.000Z
2022-01-27T13:21:37.000Z
mldictionary_api/models/meanings.py
PabloEmidio/MLDictionaryAPI
501f203802c1f6aafe213c0fb7a5808f9a9ad3ab
[ "MIT" ]
null
null
null
mldictionary_api/models/meanings.py
PabloEmidio/MLDictionaryAPI
501f203802c1f6aafe213c0fb7a5808f9a9ad3ab
[ "MIT" ]
null
null
null
__all__ = ['RedisMeaningsCache'] from mldictionary_api.models.base import RedisBaseModel class RedisMeaningsCache(RedisBaseModel): def __init__(self): super().__init__() def get(self, match: str) -> list: meanings = self.db.smembers(match) or set() return list(meanings) def set(...
24.588235
55
0.655502
__all__ = ['RedisMeaningsCache'] from mldictionary_api.models.base import RedisBaseModel class RedisMeaningsCache(RedisBaseModel): def __init__(self): super().__init__() def get(self, match: str) -> list: meanings = self.db.smembers(match) or set() return list(meanings) def set(...
true
true
1c08b1c01143ba968da2437d6073a3fdc218b8e2
8,458
py
Python
components/relay.py
jdewasseige/Crux
8a3167606d48adf97a2b0551decd837ca6f97516
[ "BSD-2-Clause" ]
11
2015-10-07T11:43:19.000Z
2021-06-04T11:25:14.000Z
components/relay.py
mavroudisv/TorEncStats
64e93baf0e7c0e056ac341c97b53a3c35c18e64a
[ "BSD-2-Clause" ]
1
2015-11-01T21:27:27.000Z
2016-01-08T03:13:08.000Z
components/relay.py
mavroudisv/TorEncStats
64e93baf0e7c0e056ac341c97b53a3c35c18e64a
[ "BSD-2-Clause" ]
2
2015-10-17T21:55:43.000Z
2019-03-26T15:37:01.000Z
import socket import json import sys from petlib.ec import EcGroup, EcPt from petlib.bn import Bn import binascii import SocketServer import json import csv import time import xlrd from itertools import product import datetime from includes import config as conf from includes import utilities from incl...
32.037879
141
0.550485
import socket import json import sys from petlib.ec import EcGroup, EcPt from petlib.bn import Bn import binascii import SocketServer import json import csv import time import xlrd from itertools import product import datetime from includes import config as conf from includes import utilities from incl...
false
true
1c08b1f731eba318d97c024d6c580f46431734d3
10,428
py
Python
projector.py
gbriones1/stylegan2-ada-pytorch
8a3722211f83b39172f04d3a4d0706c935c35a12
[ "BSD-Source-Code" ]
null
null
null
projector.py
gbriones1/stylegan2-ada-pytorch
8a3722211f83b39172f04d3a4d0706c935c35a12
[ "BSD-Source-Code" ]
null
null
null
projector.py
gbriones1/stylegan2-ada-pytorch
8a3722211f83b39172f04d3a4d0706c935c35a12
[ "BSD-Source-Code" ]
null
null
null
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and rel...
42.048387
136
0.621883
import copy import os from time import perf_counter import click import imageio import numpy as np import PIL.Image import torch import torch.nn.functional as F import dnnlib import legacy import lpips from mdf.mdfloss import MDFLoss from pytorch_msssim.pytorch_msssim import SSIM loss_fn_alex = lpips.LPIPS(net='a...
true
true
1c08b217b2c7217bb524cdb9567b81b61b898f3c
2,766
py
Python
fn_cisco_amp4ep/tests/test_fn_amp_get_file_lists.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
65
2017-12-04T13:58:32.000Z
2022-03-24T18:33:17.000Z
fn_cisco_amp4ep/tests/test_fn_amp_get_file_lists.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
48
2018-03-02T19:17:14.000Z
2022-03-09T22:00:38.000Z
fn_cisco_amp4ep/tests/test_fn_amp_get_file_lists.py
nickpartner-goahead/resilient-community-apps
097c0dbefddbd221b31149d82af9809420498134
[ "MIT" ]
95
2018-01-11T16:23:39.000Z
2022-03-21T11:34:29.000Z
# -*- coding: utf-8 -*- """Tests using pytest_resilient_circuits""" from __future__ import print_function import pytest from mock import patch from resilient_circuits.util import get_config_data, get_function_definition from resilient_circuits import SubmitTestFunction, FunctionResult from mock_artifacts import mocked...
40.086957
109
0.718727
from __future__ import print_function import pytest from mock import patch from resilient_circuits.util import get_config_data, get_function_definition from resilient_circuits import SubmitTestFunction, FunctionResult from mock_artifacts import mocked_amp_client, get_mock_config PACKAGE_NAME = "fn_cisco_amp4ep" FUNCT...
true
true
1c08b24b1ddbdb431661a3d26c609574aed436e4
996
py
Python
Day09-Unet/unet/main.py
octopusbrolau/ai-lab
8bc44edf742e29b45f08e0cb0c5a31912bc243d9
[ "MIT" ]
null
null
null
Day09-Unet/unet/main.py
octopusbrolau/ai-lab
8bc44edf742e29b45f08e0cb0c5a31912bc243d9
[ "MIT" ]
null
null
null
Day09-Unet/unet/main.py
octopusbrolau/ai-lab
8bc44edf742e29b45f08e0cb0c5a31912bc243d9
[ "MIT" ]
null
null
null
from model import * from data import * from metrics import * import cv2 from keras.preprocessing.image import random_brightness #os.environ["CUDA_VISIBLE_DEVICES"] = "0" data_gen_args = dict(rotation_range=0.2, width_shift_range=0.05, height_shift_range=0.05, ...
38.307692
105
0.701807
from model import * from data import * from metrics import * import cv2 from keras.preprocessing.image import random_brightness data_gen_args = dict(rotation_range=0.2, width_shift_range=0.05, height_shift_range=0.05, shear_range=0.05, zo...
true
true
1c08b2f3764fa8eb6282b797efe0061b9b47242b
2,131
py
Python
contrib/devtools/clang-format.py
ctwiz/stardust
0d237784267413e4076ec872e34393d26ad9aa03
[ "MIT" ]
null
null
null
contrib/devtools/clang-format.py
ctwiz/stardust
0d237784267413e4076ec872e34393d26ad9aa03
[ "MIT" ]
null
null
null
contrib/devtools/clang-format.py
ctwiz/stardust
0d237784267413e4076ec872e34393d26ad9aa03
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Wrapper script for clang-format Copyright (c) 2015 MarcoFalke Copyright (c) 2015 The Stardust Core developers Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' import os import sys import subprocess teste...
33.825397
139
0.645237
''' Wrapper script for clang-format Copyright (c) 2015 MarcoFalke Copyright (c) 2015 The Stardust Core developers Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' import os import sys import subprocess tested_versions = ['3.6.0',...
false
true
1c08b403b4acf84b20d9b06689ece9bc270089d2
2,965
py
Python
programatic-test/utils.py
Cyphysecurity/CPS-SPC-2019
469c451288fc041aac7efa753a3525651da203a5
[ "Apache-2.0" ]
1
2021-03-28T09:08:04.000Z
2021-03-28T09:08:04.000Z
programatic-test/utils.py
Cyphysecurity/CPS-SPC-2019
469c451288fc041aac7efa753a3525651da203a5
[ "Apache-2.0" ]
null
null
null
programatic-test/utils.py
Cyphysecurity/CPS-SPC-2019
469c451288fc041aac7efa753a3525651da203a5
[ "Apache-2.0" ]
null
null
null
GRAVITATION = 9.81 TANK_DIAMETER = 1.38 TANK_SECTION = 1.5 PUMP_FLOWRATE_IN = 2.55 # Per hour PUMP_FLOWRATE_OUT = 2.45 # Per hour PH_PUMP_FLOWRATE_IN = 0.7 PH_PUMP_FLOWRATE_OUT = 0.7 PUMP_FLOWRATE_OUT_2 = 2.5 LOG_PH201_FILE='./ph201.log' LOG_P201_FILE='./p201.log' LOG_PLC201_FILE='./plc201.log' LOG_FIT201_FILE...
16.291209
76
0.60742
GRAVITATION = 9.81 TANK_DIAMETER = 1.38 TANK_SECTION = 1.5 PUMP_FLOWRATE_IN = 2.55 PUMP_FLOWRATE_OUT = 2.45 PH_PUMP_FLOWRATE_IN = 0.7 PH_PUMP_FLOWRATE_OUT = 0.7 PUMP_FLOWRATE_OUT_2 = 2.5 LOG_PH201_FILE='./ph201.log' LOG_P201_FILE='./p201.log' LOG_PLC201_FILE='./plc201.log' LOG_FIT201_FILE='./fit201.log' PH_20...
true
true
1c08b4f3b967ecb4788f3bb81edfb2f8b6a99692
545
py
Python
tests/test_microdvd_conversion.py
nyuszika7h/pycaption
f0e692a23b8a9526fc906b7b60153ba1281199c0
[ "Apache-2.0" ]
null
null
null
tests/test_microdvd_conversion.py
nyuszika7h/pycaption
f0e692a23b8a9526fc906b7b60153ba1281199c0
[ "Apache-2.0" ]
null
null
null
tests/test_microdvd_conversion.py
nyuszika7h/pycaption
f0e692a23b8a9526fc906b7b60153ba1281199c0
[ "Apache-2.0" ]
null
null
null
import unittest import six from pycaption import MicroDVDReader, MicroDVDWriter from tests.samples.microdvd import SAMPLE_MICRODVD from tests.mixins import MicroDVDTestingMixIn class MicroDVDtoMicroDVDTestCase(unittest.TestCase, MicroDVDTestingMixIn): def test_microdvd_to_microdvd_conversion(self): ca...
30.277778
74
0.8
import unittest import six from pycaption import MicroDVDReader, MicroDVDWriter from tests.samples.microdvd import SAMPLE_MICRODVD from tests.mixins import MicroDVDTestingMixIn class MicroDVDtoMicroDVDTestCase(unittest.TestCase, MicroDVDTestingMixIn): def test_microdvd_to_microdvd_conversion(self): ca...
true
true
1c08b5bee135127676580a2fa74e8aec307e7ec7
162
py
Python
apps/users/apps.py
ansonsry/Freshshop
79ab8beb1aa993f6365182c8d3bb478ee4e028f8
[ "MIT" ]
13
2019-06-30T16:31:54.000Z
2021-02-15T06:15:03.000Z
apps/users/apps.py
tuxi/video-hub
fb64440ec7f84f08cf9cd706bec374fa357d7936
[ "MIT" ]
9
2019-08-06T02:27:10.000Z
2022-03-11T23:51:05.000Z
apps/users/apps.py
ansonsry/Freshshop
79ab8beb1aa993f6365182c8d3bb478ee4e028f8
[ "MIT" ]
2
2019-07-25T04:41:27.000Z
2020-08-27T01:16:54.000Z
from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' verbose_name = '用户管理' def ready(self): import users.signals
16.2
33
0.67284
from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' verbose_name = '用户管理' def ready(self): import users.signals
true
true
1c08b5dd2d00be257b0c612ab2249795701d84b7
947
py
Python
0007.py
reage/pp
7bd4003c64b079ff500b7c52f1b1780da7080cc8
[ "MIT" ]
null
null
null
0007.py
reage/pp
7bd4003c64b079ff500b7c52f1b1780da7080cc8
[ "MIT" ]
null
null
null
0007.py
reage/pp
7bd4003c64b079ff500b7c52f1b1780da7080cc8
[ "MIT" ]
null
null
null
import re def countLines(filePath): codeLine = 0 commentLine = 0 blankLine = 0 flag = 0 try: with open(filePath) as file: for line in file: line = line.strip() if len(line) > 1 and line[0] == "#": commentLine += 1 ...
30.548387
62
0.394931
import re def countLines(filePath): codeLine = 0 commentLine = 0 blankLine = 0 flag = 0 try: with open(filePath) as file: for line in file: line = line.strip() if len(line) > 1 and line[0] == "#": commentLine += 1 ...
true
true
1c08b6949d11429d7d9e4b7d483599858a570684
41,542
py
Python
wagtail/tests/test_page_permissions.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
1
2022-02-09T05:25:30.000Z
2022-02-09T05:25:30.000Z
wagtail/tests/test_page_permissions.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
wagtail/tests/test_page_permissions.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
import json from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.test import Client, TestCase, override_settings from django.utils import timezone from wagtail.models import ( GroupApprovalTask, GroupPagePermission, Locale, Page, UserPagePermissio...
45.252723
117
0.711689
import json from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.test import Client, TestCase, override_settings from django.utils import timezone from wagtail.models import ( GroupApprovalTask, GroupPagePermission, Locale, Page, UserPagePermissio...
true
true
1c08b7264c10153f7ff1dce0ec1754d6d81022ba
5,858
py
Python
regression/test_regression.py
keshavchoudhary87/OG-India
269ee172b837882c826ee7f99507d93f9643128e
[ "CC0-1.0" ]
1
2019-08-17T19:49:22.000Z
2019-08-17T19:49:22.000Z
regression/test_regression.py
keshavchoudhary87/OG-India
269ee172b837882c826ee7f99507d93f9643128e
[ "CC0-1.0" ]
11
2019-08-16T15:40:52.000Z
2019-10-16T07:07:15.000Z
regression/test_regression.py
keshavchoudhary87/OG-India
269ee172b837882c826ee7f99507d93f9643128e
[ "CC0-1.0" ]
44
2019-08-16T15:10:39.000Z
2021-07-08T07:03:26.000Z
from ogindia.macro_output import dump_diff_output from ogindia.utils import safe_read_pickle import numpy as np import pytest import os CURDIR = os.path.abspath(os.path.dirname(__file__)) REG_BASELINE = os.path.join(CURDIR, 'regression_results/REG_OUTPUT_BASELINE') REG_REFORM = os.path.join(CURDIR, 'regression_result...
35.50303
83
0.62325
from ogindia.macro_output import dump_diff_output from ogindia.utils import safe_read_pickle import numpy as np import pytest import os CURDIR = os.path.abspath(os.path.dirname(__file__)) REG_BASELINE = os.path.join(CURDIR, 'regression_results/REG_OUTPUT_BASELINE') REG_REFORM = os.path.join(CURDIR, 'regression_result...
true
true
1c08b735d7595f5f9bbced33f025b16761826022
1,278
py
Python
ics/structures/s_phy_reg_pkt.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
ics/structures/s_phy_reg_pkt.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
ics/structures/s_phy_reg_pkt.py
hollinsky-intrepid/python_ics
b6ec5486ec3cc2548e33845c265faccf293b88f5
[ "Unlicense" ]
null
null
null
# This file was auto generated; Do not modify, if you value your sanity! import ctypes try: # 2 from s_phy_reg_pkt_clause22_mess import s_phy_reg_pkt_clause22_mess from s_phy_reg_pkt_clause45_mess import s_phy_reg_pkt_clause45_mess except: from ics.structures.s_phy_reg_pkt_clause22_mess import s_phy_reg_pk...
27.782609
86
0.678404
import ctypes try: from s_phy_reg_pkt_clause22_mess import s_phy_reg_pkt_clause22_mess from s_phy_reg_pkt_clause45_mess import s_phy_reg_pkt_clause45_mess except: from ics.structures.s_phy_reg_pkt_clause22_mess import s_phy_reg_pkt_clause22_mess from ics.structures.s_phy_reg_pkt_clause45_mess import s_...
true
true
1c08b7838f71711e3eb344805fb7f65637b7ccbd
4,864
py
Python
utilities/pyPlotting/plotPolarizationHilbert.py
LarsHuebner-LHNW/Puffin
36c7e1292f624e40a30e662b94efd4044ad76057
[ "BSD-3-Clause" ]
15
2017-08-29T10:50:13.000Z
2022-01-14T07:21:49.000Z
utilities/pyPlotting/plotPolarizationHilbert.py
LarsHuebner-LHNW/Puffin
36c7e1292f624e40a30e662b94efd4044ad76057
[ "BSD-3-Clause" ]
27
2017-06-20T09:40:33.000Z
2021-03-18T22:35:47.000Z
utilities/pyPlotting/plotPolarizationHilbert.py
LarsHuebner-LHNW/Puffin
36c7e1292f624e40a30e662b94efd4044ad76057
[ "BSD-3-Clause" ]
15
2017-06-21T21:00:13.000Z
2022-03-16T02:15:59.000Z
# Copyright (c) 2012-2018, University of Strathclyde # Authors: Jonathan Smith (Tech-X UK Ltd) # License: BSD-3-Clause import numpy,tables,os,sys from scipy.signal import hilbert import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec #Check input is correct def getMagPhase(h5,xi,yi,component): zLo...
45.457944
143
0.695107
import numpy,tables,os,sys from scipy.signal import hilbert import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec def getMagPhase(h5,xi,yi,component): zLoBounds=h5.root.globalLimits._v_attrs.vsLowerBounds[2] zUpBounds=h5.root.globalLimits._v_attrs.vsUpperBounds[2] zNumCells=h5.root.meshSc...
false
true
1c08b930ff3adba3c74a2062531ac6092fabf0a1
511
py
Python
lpthw/increasemaxcheck.py
seesiva/ML
ba87803cd0bb9e4f48932927cd2da53dc8db5433
[ "MIT" ]
null
null
null
lpthw/increasemaxcheck.py
seesiva/ML
ba87803cd0bb9e4f48932927cd2da53dc8db5433
[ "MIT" ]
null
null
null
lpthw/increasemaxcheck.py
seesiva/ML
ba87803cd0bb9e4f48932927cd2da53dc8db5433
[ "MIT" ]
null
null
null
def almostIncreasingSequence(sequence): if len(sequence)==2: return sequence==sorted(list(sequence)) else: for i in range(0,len(sequence)): newsequence=sequence[:i]+sequence[i+1:] if (newsequence==sorted(list(newsequence))) and len(newsequence)==len(set(newsequence)): ...
34.066667
100
0.590998
def almostIncreasingSequence(sequence): if len(sequence)==2: return sequence==sorted(list(sequence)) else: for i in range(0,len(sequence)): newsequence=sequence[:i]+sequence[i+1:] if (newsequence==sorted(list(newsequence))) and len(newsequence)==len(set(newsequence)): ...
false
true
1c08b976afed8c920e6a6b7d87ce9dab11eb36a1
11,417
py
Python
mos-pytorch1.1/encoder_analysis.py
omerlux/Recurrent_Neural_Network_-_Part_2
afaa4f31fcaf1c9fcf97f6757263c1ed6b0fa4eb
[ "MIT" ]
1
2020-12-15T08:27:30.000Z
2020-12-15T08:27:30.000Z
mos-pytorch1.1/encoder_analysis.py
omerlux/NLP-PTB
afaa4f31fcaf1c9fcf97f6757263c1ed6b0fa4eb
[ "MIT" ]
null
null
null
mos-pytorch1.1/encoder_analysis.py
omerlux/NLP-PTB
afaa4f31fcaf1c9fcf97f6757263c1ed6b0fa4eb
[ "MIT" ]
null
null
null
import argparse import os, sys import pickle import time import math import logging import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import gc import data import model import time import hashlib import scipy import matplotlib.pyplot as plt import pandas as pd import numpy as np fr...
42.442379
134
0.625296
import argparse import os, sys import pickle import time import math import logging import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import gc import data import model import time import hashlib import scipy import matplotlib.pyplot as plt import pandas as pd import numpy as np fr...
true
true
1c08ba428dc8d0f55a76d68a14581d903de8bbcc
55,088
py
Python
app/models.py
itsmechlark/simple-login-app
0121806301493615c052bfe6b254abc780824a99
[ "MIT" ]
null
null
null
app/models.py
itsmechlark/simple-login-app
0121806301493615c052bfe6b254abc780824a99
[ "MIT" ]
1
2021-02-08T21:04:06.000Z
2021-02-08T21:04:06.000Z
app/models.py
itsmechlark/simple-login-app
0121806301493615c052bfe6b254abc780824a99
[ "MIT" ]
null
null
null
import enum import random import uuid from email.utils import formataddr from typing import List, Tuple import arrow import bcrypt from flask import url_for from flask_login import UserMixin from sqlalchemy import text, desc, CheckConstraint from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import joinedlo...
32.790476
113
0.642318
import enum import random import uuid from email.utils import formataddr from typing import List, Tuple import arrow import bcrypt from flask import url_for from flask_login import UserMixin from sqlalchemy import text, desc, CheckConstraint from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import joinedlo...
true
true
1c08bab627a22e15e2f714ceb504634328715d7d
8,608
py
Python
zhaquirks/tuya/ts0044.py
sylvaing/zha-device-handlers
61dedab318a8986b2b0a7bffe5116bbc40bed214
[ "Apache-2.0" ]
null
null
null
zhaquirks/tuya/ts0044.py
sylvaing/zha-device-handlers
61dedab318a8986b2b0a7bffe5116bbc40bed214
[ "Apache-2.0" ]
null
null
null
zhaquirks/tuya/ts0044.py
sylvaing/zha-device-handlers
61dedab318a8986b2b0a7bffe5116bbc40bed214
[ "Apache-2.0" ]
null
null
null
"""Tuya 4 Button Remote.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import Basic, OnOff, Ota, PowerConfiguration, Time from . import TuyaSmartRemoteOnOffCluster from ..const import ( BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4, COMMAND, D...
37.426087
149
0.530437
from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import Basic, OnOff, Ota, PowerConfiguration, Time from . import TuyaSmartRemoteOnOffCluster from ..const import ( BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4, COMMAND, DEVICE_TYPE, DOUBLE_PRESS...
true
true
1c08bad6616eada541f105b143bd2be299d54bf5
1,915
py
Python
tests/test-server-rejects-invalid-ou-or-ca.py
Squarespace/ghostunnel
c9465146f451cdaf4ff3fd3bf7ba0e328ca260af
[ "Apache-2.0" ]
2
2018-12-13T21:07:21.000Z
2019-06-17T18:55:44.000Z
tests/test-server-rejects-invalid-ou-or-ca.py
Squarespace/ghostunnel
c9465146f451cdaf4ff3fd3bf7ba0e328ca260af
[ "Apache-2.0" ]
null
null
null
tests/test-server-rejects-invalid-ou-or-ca.py
Squarespace/ghostunnel
c9465146f451cdaf4ff3fd3bf7ba0e328ca260af
[ "Apache-2.0" ]
1
2021-03-17T17:05:42.000Z
2021-03-17T17:05:42.000Z
#!/usr/bin/env python3 # Creates a ghostunnel. Ensures client1 can connect but that clients with # ou=client2 or ca=other_root can't connect. from subprocess import Popen from test_common import * import socket, ssl if __name__ == "__main__": ghostunnel = None try: # create certs root = RootCert('root') ...
35.462963
84
0.694517
from subprocess import Popen from test_common import * import socket, ssl if __name__ == "__main__": ghostunnel = None try: # create certs root = RootCert('root') root.create_signed_cert('server') root.create_signed_cert('client1') root.create_signed_cert('client2') other_root = RootCert...
true
true
1c08bb6a3ea405576505e31107be1a419ea377ab
4,009
py
Python
alipay/aop/api/request/AlipayOpenServicemarketYcstestQueryRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayOpenServicemarketYcstestQueryRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayOpenServicemarketYcstestQueryRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayOpenServicemarketYcstestQueryModel import AlipayOpenServicemarketYcstestQueryModel class AlipayOpenServicemarketYcstestQueryRe...
27.648276
148
0.648042
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayOpenServicemarketYcstestQueryModel import AlipayOpenServicemarketYcstestQueryModel class AlipayOpenServicemarketYcstestQueryRequest(object): def __init__(self, biz_mod...
true
true
1c08bc5ff7ad1f93d6686a68e7d6579747433b3c
33,594
py
Python
lib-python/3/test/test_deque.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
null
null
null
lib-python/3/test/test_deque.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
null
null
null
lib-python/3/test/test_deque.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
null
null
null
from collections import deque import unittest from test import support, seq_tests import gc import weakref import copy import pickle from io import StringIO import random import struct BIG = 100000 def fail(): raise SyntaxError yield 1 class BadCmp: def __eq__(self, other): raise RuntimeError cl...
31.963844
85
0.517414
from collections import deque import unittest from test import support, seq_tests import gc import weakref import copy import pickle from io import StringIO import random import struct BIG = 100000 def fail(): raise SyntaxError yield 1 class BadCmp: def __eq__(self, other): raise RuntimeError cl...
true
true
1c08bcc11c833251fd90f6cc5c864a8d1b38482e
6,954
py
Python
docs/_theme/_exts/symfonycom/sphinx/__init__.py
rollerworks/search
f53f922b6a3a3280d79c0f4c228c7329fe576f88
[ "MIT" ]
105
2015-12-10T16:32:42.000Z
2022-01-21T15:59:03.000Z
docs/_theme/_exts/symfonycom/sphinx/__init__.py
rollerworks/search
f53f922b6a3a3280d79c0f4c228c7329fe576f88
[ "MIT" ]
120
2015-12-05T13:52:36.000Z
2021-08-13T09:50:14.000Z
docs/_theme/_exts/symfonycom/sphinx/__init__.py
rollerworks/search
f53f922b6a3a3280d79c0f4c228c7329fe576f88
[ "MIT" ]
14
2016-03-11T05:37:44.000Z
2019-08-19T12:14:10.000Z
from sphinx.highlighting import lexers, PygmentsBridge from pygments.style import Style from pygments.formatters import HtmlFormatter from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal from sphinx.writers.html import HTMLTranslato...
41.392857
99
0.601237
from sphinx.highlighting import lexers, PygmentsBridge from pygments.style import Style from pygments.formatters import HtmlFormatter from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal from sphinx.writers.html import HTMLTranslato...
true
true
1c08bde6fa40b8f4e0b0ae6a4deab3692ae273c2
717
py
Python
src/demo/serializers.py
KenanBek/django-rest-skeleton
e9e38d97241f203e131e20de0c1cf11d56f619bc
[ "Apache-2.0" ]
2
2018-05-01T19:09:22.000Z
2018-05-06T23:50:23.000Z
src/demo/serializers.py
KenanBek/django-rest-skeleton
e9e38d97241f203e131e20de0c1cf11d56f619bc
[ "Apache-2.0" ]
6
2018-04-27T13:00:52.000Z
2021-06-10T19:48:05.000Z
src/demo/serializers.py
KenanBek/django-rest-skeleton
e9e38d97241f203e131e20de0c1cf11d56f619bc
[ "Apache-2.0" ]
2
2018-09-04T23:54:44.000Z
2021-09-02T09:39:53.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rest_framework import serializers from demo import models class TagSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for Tag model. """ class Meta: model = models.Tag fields = ('title',) class Cat...
19.916667
65
0.64993
from __future__ import unicode_literals from rest_framework import serializers from demo import models class TagSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Tag fields = ('title',) class CategorySerializer(serializers.HyperlinkedModelSerializer): class Me...
true
true
1c08be4d30c1b61b11db410713f456035a678e51
402
py
Python
3_estrutura_de_repeticao/13_expoente.py
cecilmalone/lista_de_exercicios_pybr
6d7c4aeddf8d1b1d839ad05ef5b5813a8fe611b5
[ "MIT" ]
null
null
null
3_estrutura_de_repeticao/13_expoente.py
cecilmalone/lista_de_exercicios_pybr
6d7c4aeddf8d1b1d839ad05ef5b5813a8fe611b5
[ "MIT" ]
null
null
null
3_estrutura_de_repeticao/13_expoente.py
cecilmalone/lista_de_exercicios_pybr
6d7c4aeddf8d1b1d839ad05ef5b5813a8fe611b5
[ "MIT" ]
null
null
null
""" 13. Faça um programa que peça dois números, base e expoente, calcule e mostre o primeiro número elevado ao segundo número. Não utilize a função de potência da linguagem. """ base = int(input("Informe a base: ")) expoente = int(input("Informe o expoente: ")) resultado = 1 for _ in range(expoente): resultado...
25.125
80
0.699005
base = int(input("Informe a base: ")) expoente = int(input("Informe o expoente: ")) resultado = 1 for _ in range(expoente): resultado *= base print("{} elevado a {} é igual a {}".format(base, expoente, resultado))
true
true
1c08be9fb7891b3e7d141ad4da36f20a1db25531
1,393
py
Python
neighbourhood/forms.py
elvisbkt/Neighbourhood
a2db55ffdccfba606bcf81b5c5f2c5c87aac7683
[ "MIT" ]
null
null
null
neighbourhood/forms.py
elvisbkt/Neighbourhood
a2db55ffdccfba606bcf81b5c5f2c5c87aac7683
[ "MIT" ]
null
null
null
neighbourhood/forms.py
elvisbkt/Neighbourhood
a2db55ffdccfba606bcf81b5c5f2c5c87aac7683
[ "MIT" ]
null
null
null
from django import forms from .models import NeighbourHood,Post,Profile class NewsLetterForm(forms.Form): your_name = forms.CharField(label='First Name',max_length=30) email = forms.EmailField(label='Email') class NewNeighbourHoodForm(forms.ModelForm): class Meta: model = NeighbourHood fi...
37.648649
108
0.685571
from django import forms from .models import NeighbourHood,Post,Profile class NewsLetterForm(forms.Form): your_name = forms.CharField(label='First Name',max_length=30) email = forms.EmailField(label='Email') class NewNeighbourHoodForm(forms.ModelForm): class Meta: model = NeighbourHood fi...
true
true
1c08bfd4b9a6aece19201722cbb1e5afcb212153
1,594
py
Python
test/unit-tests/common/test_util.py
papadeltasierra/sphinxcontrib-confluencebuilder
3a6889b95d6909920fce9ec8c09735ff9af8231e
[ "BSD-2-Clause" ]
null
null
null
test/unit-tests/common/test_util.py
papadeltasierra/sphinxcontrib-confluencebuilder
3a6889b95d6909920fce9ec8c09735ff9af8231e
[ "BSD-2-Clause" ]
null
null
null
test/unit-tests/common/test_util.py
papadeltasierra/sphinxcontrib-confluencebuilder
3a6889b95d6909920fce9ec8c09735ff9af8231e
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ :copyright: Copyright 2018 by the contributors (see AUTHORS file). :license: BSD, see LICENSE for details. """ from sphinxcontrib.confluencebuilder.util import ConfluenceUtil as UTIL import unittest class TestConfluenceUtil(unittest.TestCase): def test_normalize_baseurl(self): ...
54.965517
88
0.676286
from sphinxcontrib.confluencebuilder.util import ConfluenceUtil as UTIL import unittest class TestConfluenceUtil(unittest.TestCase): def test_normalize_baseurl(self): data = { 'https://example.atlassian.net/wiki': 'https://example.atlassian.net/wiki/', 'https://example.atlassian.net/wiki/': ...
true
true
1c08c039edc627279dc064004832af1ee02fa771
88
py
Python
WinPlaceShowAPI/jsonapi/apps.py
jojordan3/winplaceshow-api
eaa8383935339e4b3abb8167d6005290a731f426
[ "MIT" ]
null
null
null
WinPlaceShowAPI/jsonapi/apps.py
jojordan3/winplaceshow-api
eaa8383935339e4b3abb8167d6005290a731f426
[ "MIT" ]
6
2020-02-12T00:08:59.000Z
2021-06-10T17:58:35.000Z
WinPlaceShowAPI/jsonapi/apps.py
jojordan3/winplaceshow-api
eaa8383935339e4b3abb8167d6005290a731f426
[ "MIT" ]
null
null
null
from django.apps import AppConfig class JsonapiConfig(AppConfig): name = 'jsonapi'
17.6
33
0.761364
from django.apps import AppConfig class JsonapiConfig(AppConfig): name = 'jsonapi'
true
true
1c08c130f69dabd2e131d3add3f2a3d8f545fea1
14,563
py
Python
packages/vaex-core/vaex/arrow/dataset.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
337
2016-02-11T07:36:35.000Z
2018-12-10T07:17:35.000Z
packages/vaex-core/vaex/arrow/dataset.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
127
2016-07-06T15:43:14.000Z
2018-12-11T18:46:27.000Z
packages/vaex-core/vaex/arrow/dataset.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
29
2016-10-05T14:15:28.000Z
2018-11-29T10:17:00.000Z
__author__ = 'maartenbreddels' from collections import defaultdict import logging from typing import List from frozendict import frozendict import numpy as np import pyarrow as pa import pyarrow.dataset import pyarrow.parquet as pq import vaex.dataset import vaex.file from vaex.dataset import DatasetSlicedArrays from...
41.9683
131
0.609558
__author__ = 'maartenbreddels' from collections import defaultdict import logging from typing import List from frozendict import frozendict import numpy as np import pyarrow as pa import pyarrow.dataset import pyarrow.parquet as pq import vaex.dataset import vaex.file from vaex.dataset import DatasetSlicedArrays from...
true
true
1c08c27922b60b2c1ed455799adcaaefe3940a11
3,276
py
Python
tools/wptrunner/wptrunner/browsers/chrome.py
loonybear/web-platform-tests
9a18bbb6a0243e39d4e2b569281027b3c832e323
[ "BSD-3-Clause" ]
1
2021-06-03T09:31:09.000Z
2021-06-03T09:31:09.000Z
tools/wptrunner/wptrunner/browsers/chrome.py
loonybear/web-platform-tests
9a18bbb6a0243e39d4e2b569281027b3c832e323
[ "BSD-3-Clause" ]
null
null
null
tools/wptrunner/wptrunner/browsers/chrome.py
loonybear/web-platform-tests
9a18bbb6a0243e39d4e2b569281027b3c832e323
[ "BSD-3-Clause" ]
1
2020-03-31T17:20:54.000Z
2020-03-31T17:20:54.000Z
from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, SeleniumRefTestExecutor) __wptrunne...
34.484211
79
0.61569
from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, SeleniumRefTestExecutor) __wptrunne...
true
true
1c08c30a243ca541171c166327df176647454f23
45,662
py
Python
test/aaa_profiling/test_memusage.py
eseiver/sqlalchemy
d496639613382a0140f2e2260b82979255a28ffd
[ "MIT" ]
1
2020-08-17T13:15:29.000Z
2020-08-17T13:15:29.000Z
test/aaa_profiling/test_memusage.py
eseiver/sqlalchemy
d496639613382a0140f2e2260b82979255a28ffd
[ "MIT" ]
null
null
null
test/aaa_profiling/test_memusage.py
eseiver/sqlalchemy
d496639613382a0140f2e2260b82979255a28ffd
[ "MIT" ]
null
null
null
import decimal import gc import itertools import multiprocessing import weakref import sqlalchemy as sa from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import test...
26.765533
79
0.493518
import decimal import gc import itertools import multiprocessing import weakref import sqlalchemy as sa from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import test...
true
true
1c08c318865ef1f953be9b85a417f954468af739
888
py
Python
demo/serving/Semantic_Segmentation_deeplabv3p_xception65_humanseg/deeplabv3p_xception65_humanseg_serving_demo.py
jayhenry/PaddleHub
c1f0e6ae85b85d4804210129ef6286914bb085aa
[ "Apache-2.0" ]
1
2020-01-07T06:26:01.000Z
2020-01-07T06:26:01.000Z
demo/serving/Semantic_Segmentation_deeplabv3p_xception65_humanseg/deeplabv3p_xception65_humanseg_serving_demo.py
jayhenry/PaddleHub
c1f0e6ae85b85d4804210129ef6286914bb085aa
[ "Apache-2.0" ]
null
null
null
demo/serving/Semantic_Segmentation_deeplabv3p_xception65_humanseg/deeplabv3p_xception65_humanseg_serving_demo.py
jayhenry/PaddleHub
c1f0e6ae85b85d4804210129ef6286914bb085aa
[ "Apache-2.0" ]
null
null
null
# coding: utf8 import requests import json import base64 import os if __name__ == "__main__": # 指定要使用的图片文件并生成列表[("image", img_1), ("image", img_2), ... ] file_list = ["../img/girl.jpg"] files = [("image", (open(item, "rb"))) for item in file_list] # 指定图片分割方法为deeplabv3p_xception65_humanseg并发送post请求 ...
32.888889
78
0.614865
import requests import json import base64 import os if __name__ == "__main__": file_list = ["../img/girl.jpg"] files = [("image", (open(item, "rb"))) for item in file_list] url = "http://127.0.0.1:8866/predict/image/deeplabv3p_xception65_humanseg" r = requests.post(url=url, files=files) re...
true
true
1c08c464513c4a1f3154ad82504f74a098501f2d
4,111
py
Python
torch_geometric/datasets/rel_link_pred_dataset.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
2,350
2021-09-12T08:32:50.000Z
2022-03-31T18:09:36.000Z
torch_geometric/datasets/rel_link_pred_dataset.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
588
2021-09-12T08:49:08.000Z
2022-03-31T21:02:13.000Z
torch_geometric/datasets/rel_link_pred_dataset.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
505
2021-09-13T13:13:32.000Z
2022-03-31T15:54:00.000Z
import os import os.path as osp from typing import Callable, List, Optional import torch from torch_geometric.data import Data, InMemoryDataset, download_url class RelLinkPredDataset(InMemoryDataset): r"""The relational link prediction datasets from the `"Modeling Relational Data with Graph Convolutional Ne...
39.152381
78
0.607881
import os import os.path as osp from typing import Callable, List, Optional import torch from torch_geometric.data import Data, InMemoryDataset, download_url class RelLinkPredDataset(InMemoryDataset): urls = { 'FB15k-237': ('https://raw.githubusercontent.com/MichSchli/' 'RelationP...
true
true