hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
79005721c54601bee3dc334dbf4d7d9489194f1a
398
py
Python
labelmeutils/utils/io.py
narumiruna/labelme-utils
fd0c4e6344c01ed3bc5d040b580a4840334d2459
[ "MIT" ]
null
null
null
labelmeutils/utils/io.py
narumiruna/labelme-utils
fd0c4e6344c01ed3bc5d040b580a4840334d2459
[ "MIT" ]
null
null
null
labelmeutils/utils/io.py
narumiruna/labelme-utils
fd0c4e6344c01ed3bc5d040b580a4840334d2459
[ "MIT" ]
null
null
null
import json import numpy as np from PIL import Image def load_json(f): with open(f, 'r') as fp: return json.load(fp) def save_json(obj, f, ensure_ascii=True, indent=None): with open(f, 'w') as fp: json.dump(obj, fp, ensure_ascii=ensure_ascii, indent=indent) def load_image(f, mode='RGB'): ...
19.9
68
0.658291
import json import numpy as np from PIL import Image def load_json(f): with open(f, 'r') as fp: return json.load(fp) def save_json(obj, f, ensure_ascii=True, indent=None): with open(f, 'w') as fp: json.dump(obj, fp, ensure_ascii=ensure_ascii, indent=indent) def load_image(f, mode='RGB'): ...
true
true
790057e25494057a1840f7b97d2f89c06efa1c56
997
py
Python
src/melange/src/soc/models/expando_base.py
MatthewWilkes/mw4068-packaging
5c5d50eea89372e967994dac3bd8b06d25b4f0fa
[ "Apache-2.0" ]
null
null
null
src/melange/src/soc/models/expando_base.py
MatthewWilkes/mw4068-packaging
5c5d50eea89372e967994dac3bd8b06d25b4f0fa
[ "Apache-2.0" ]
null
null
null
src/melange/src/soc/models/expando_base.py
MatthewWilkes/mw4068-packaging
5c5d50eea89372e967994dac3bd8b06d25b4f0fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 appl...
26.236842
74
0.748245
__authors__ = [ '"Lennard de Rijk" <ljvderijk@gmail.com>', ] from google.appengine.ext import db from soc.logic import dicts class ExpandoBase(db.Expando): toDict = dicts.toDict
true
true
7900586390cc1d2f877f86ec4d5303f3eb4f91eb
4,327
py
Python
tests/layer_tests/common/utils/tf_utils.py
monroid/openvino
8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6
[ "Apache-2.0" ]
2,406
2020-04-22T15:47:54.000Z
2022-03-31T10:27:37.000Z
tests/layer_tests/common/utils/tf_utils.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4,948
2020-04-22T15:12:39.000Z
2022-03-31T18:45:42.000Z
tests/layer_tests/common/utils/tf_utils.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
991
2020-04-23T18:21:09.000Z
2022-03-31T18:40:57.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import re import tensorflow as tf import numpy as np os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def load_graph(model_file, output_nodes_for_freeze=None): is_meta = os.path.splitext(model_file)[-1] == ".meta" tf.comp...
39.336364
130
0.645251
import os import re import tensorflow as tf import numpy as np os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def load_graph(model_file, output_nodes_for_freeze=None): is_meta = os.path.splitext(model_file)[-1] == ".meta" tf.compat.v1.reset_default_graph() graph = tf.Graph() graph_def = tf.compat.v1....
true
true
79005872d06294cf1396ae57aa3929ec0a9c194f
1,047
py
Python
test/test_ezsignformfield_response_compound.py
eZmaxinc/eZmax-SDK-python
5b4d54b69db68aab8ee814a1e26460a0af03784e
[ "MIT" ]
null
null
null
test/test_ezsignformfield_response_compound.py
eZmaxinc/eZmax-SDK-python
5b4d54b69db68aab8ee814a1e26460a0af03784e
[ "MIT" ]
null
null
null
test/test_ezsignformfield_response_compound.py
eZmaxinc/eZmax-SDK-python
5b4d54b69db68aab8ee814a1e26460a0af03784e
[ "MIT" ]
null
null
null
""" eZmax API Definition This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.3 Contact: support-api@ezmax.ca Generated by: https://openapi-generator.tech """ import sys import unittest import eZmaxApi from eZmaxA...
26.846154
97
0.747851
import sys import unittest import eZmaxApi from eZmaxApi.model.ezsignformfield_response import EzsignformfieldResponse globals()['EzsignformfieldResponse'] = EzsignformfieldResponse from eZmaxApi.model.ezsignformfield_response_compound import EzsignformfieldResponseCompound class TestEzsignformfieldResponseCompoun...
true
true
7900588c3a101672c588d3ccad8f07e8763252df
6,202
py
Python
tests/test_test_metadata.py
kbh2o/slash
532b7e3acdf46103ece5b86f21c29f9b58587289
[ "BSD-3-Clause" ]
70
2015-12-05T12:33:10.000Z
2022-03-03T04:56:58.000Z
tests/test_test_metadata.py
kbh2o/slash
532b7e3acdf46103ece5b86f21c29f9b58587289
[ "BSD-3-Clause" ]
711
2015-10-06T11:01:48.000Z
2022-02-09T12:40:47.000Z
tests/test_test_metadata.py
kbh2o/slash
532b7e3acdf46103ece5b86f21c29f9b58587289
[ "BSD-3-Clause" ]
37
2015-10-13T11:00:51.000Z
2022-02-08T07:28:11.000Z
# pylint: disable=redefined-outer-name from .utils import TestCase from .utils import run_tests_assert_success import itertools import os import slash import pytest from .utils.suite_writer import Suite @pytest.mark.parametrize('parametrize', [True, False]) def test_class_name(suite, suite_test, test_type, parametri...
34.842697
123
0.704611
from .utils import TestCase from .utils import run_tests_assert_success import itertools import os import slash import pytest from .utils.suite_writer import Suite @pytest.mark.parametrize('parametrize', [True, False]) def test_class_name(suite, suite_test, test_type, parametrize): if parametrize: suite...
true
true
790058a2de53125b428bf3d765bcb497f29db152
4,871
py
Python
recipe_scrapers/_abstract.py
squat-house/recipe-scrapers
72d2f69196f95210d2ea248f3b5cb446f94fd2b2
[ "MIT" ]
null
null
null
recipe_scrapers/_abstract.py
squat-house/recipe-scrapers
72d2f69196f95210d2ea248f3b5cb446f94fd2b2
[ "MIT" ]
1
2022-01-08T10:49:17.000Z
2022-01-08T10:49:30.000Z
recipe_scrapers/_abstract.py
AlexRogalskiy/recipe-scrapers
ff378b3ba4ae7ff4cbc113ca13991f887c1c70e7
[ "MIT" ]
1
2022-01-08T10:49:09.000Z
2022-01-08T10:49:09.000Z
import inspect from collections import OrderedDict from json.decoder import JSONDecodeError from typing import Optional, Tuple, Union from urllib.parse import urljoin import requests from bs4 import BeautifulSoup from recipe_scrapers.settings import settings from ._schemaorg import SchemaOrg # some sites close thei...
34.302817
110
0.625539
import inspect from collections import OrderedDict from json.decoder import JSONDecodeError from typing import Optional, Tuple, Union from urllib.parse import urljoin import requests from bs4 import BeautifulSoup from recipe_scrapers.settings import settings from ._schemaorg import SchemaOrg HEADERS = { "User-...
true
true
790059ba05d19aa2cc658ad3cad7c078cf5126b7
1,905
py
Python
bin/convertfavourites.py
redmond-penguin/musicplayer
1b342b885e6e97d073b92e624d0ae5dc38f7c687
[ "BSD-3-Clause" ]
null
null
null
bin/convertfavourites.py
redmond-penguin/musicplayer
1b342b885e6e97d073b92e624d0ae5dc38f7c687
[ "BSD-3-Clause" ]
null
null
null
bin/convertfavourites.py
redmond-penguin/musicplayer
1b342b885e6e97d073b92e624d0ae5dc38f7c687
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import sys import os import argparse scriptpath = os.path.abspath(os.path.dirname(__file__)) includepath = os.path.dirname(scriptpath) sys.path.insert(0, includepath) from audio.audiofilefactory import AudioFileFactory from audio.audioconversionservice import AudioConversionService from filesyste...
43.295455
135
0.76378
import sys import os import argparse scriptpath = os.path.abspath(os.path.dirname(__file__)) includepath = os.path.dirname(scriptpath) sys.path.insert(0, includepath) from audio.audiofilefactory import AudioFileFactory from audio.audioconversionservice import AudioConversionService from filesystem.filelist import File...
true
true
79005b6f2e93b9c66058376da6758f50e42b6ef9
801
py
Python
example/example/urls.py
lambdalisue/django-codemirror-widget
23c81b41e59bfe81ea5bfce5dd78e6d93b97d2aa
[ "MIT" ]
39
2015-03-22T21:57:28.000Z
2021-11-04T08:17:15.000Z
example/example/urls.py
lambdalisue/django-codemirror-widget
23c81b41e59bfe81ea5bfce5dd78e6d93b97d2aa
[ "MIT" ]
13
2015-09-09T05:14:11.000Z
2020-03-10T17:00:25.000Z
example/example/urls.py
lambdalisue/django-codemirror-widget
23c81b41e59bfe81ea5bfce5dd78e6d93b97d2aa
[ "MIT" ]
17
2015-09-08T15:52:15.000Z
2020-02-28T03:20:02.000Z
"""example URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
34.826087
77
0.702871
from django.contrib import admin from django.urls import path, include urlpatterns = [ path("polls/", include("polls.urls")), path("admin/", admin.site.urls), ]
true
true
79005b903abc8821d56ee3f0a97a1aa520676826
68,903
py
Python
src/sage_docbuild/__init__.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
1
2021-03-15T21:45:56.000Z
2021-03-15T21:45:56.000Z
src/sage_docbuild/__init__.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
null
null
null
src/sage_docbuild/__init__.py
sensen1/sage
d6c5cd9be78cc448ee4c54bac93385b1244a234c
[ "BSL-1.0" ]
null
null
null
""" The documentation builder It is the starting point for building documentation, and is responsible to figure out what to build and with which options. The actual documentation build for each individual document is then done in a subprocess call to sphinx, see :func:`builder_helper`. * The builder can be configured...
39.082813
148
0.583719
import logging import optparse import os import pickle import re import shutil import subprocess import sys import time import types import warnings logger = logging.getLogger(__name__) import sphinx.util.console import sphinx.ext.intersphinx import sage.all from sage.misc.cachefunc impor...
true
true
79005bff925180ba5ac9843c76f6cf706d5dd96b
1,798
py
Python
python-3.4.4.amd64/Lib/site-packages/numpy/distutils/__config__.py
CSnap/photogate
208272ef39f4e86f40d431da2ca523e21701f789
[ "CC0-1.0" ]
null
null
null
python-3.4.4.amd64/Lib/site-packages/numpy/distutils/__config__.py
CSnap/photogate
208272ef39f4e86f40d431da2ca523e21701f789
[ "CC0-1.0" ]
null
null
null
python-3.4.4.amd64/Lib/site-packages/numpy/distutils/__config__.py
CSnap/photogate
208272ef39f4e86f40d431da2ca523e21701f789
[ "CC0-1.0" ]
null
null
null
# This file is generated by C:\projects\numpy-wheels\numpy\setup.py # It contains system_info results at the time of building this package. __all__ = ["get_info","show"] blas_opt_info={'library_dirs': ['C:\\projects\\numpy-wheels\\windows-wheel-builder\\atlas-builds\\atlas-3.11.38-sse2-64\\lib'], 'language': 'c', ...
62
263
0.609566
__all__ = ["get_info","show"] blas_opt_info={'library_dirs': ['C:\\projects\\numpy-wheels\\windows-wheel-builder\\atlas-builds\\atlas-3.11.38-sse2-64\\lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None), ('ATLAS_INFO', '"\\"None\\""')], 'libraries': ['numpy-atlas']} lapack_mkl_info={} lapack_opt_info=...
true
true
79005cde81aed1e83afdf30198966a648bc86fc4
1,590
py
Python
binho/accessory.py
binhollc/binho-python-package
21ea73b03755c4205e93525ed24b4becba23c93e
[ "BSD-3-Clause" ]
4
2021-03-11T12:40:27.000Z
2022-02-01T10:08:20.000Z
binho/accessory.py
binhollc/binho-python-package
21ea73b03755c4205e93525ed24b4becba23c93e
[ "BSD-3-Clause" ]
1
2021-11-26T10:20:18.000Z
2021-11-30T14:25:56.000Z
binho/accessory.py
binhollc/binho-python-package
21ea73b03755c4205e93525ed24b4becba23c93e
[ "BSD-3-Clause" ]
2
2021-02-28T00:39:39.000Z
2021-04-05T12:45:56.000Z
# from binho.errors import DriverCapabilityError class binhoAccessory: """ Base class for objects representing accessory boards. """ # Optional: subclasses can set this variable to override their accessory name. # If not provided, their name will automatically be taken from their class names. # This ...
34.565217
89
0.657233
from binho.errors import DriverCapabilityError class binhoAccessory: ACCESSORY_NAME = None @classmethod def get_name(cls): # If we have an overridden accessory name, return it. if cls.ACCESSORY_NAME: return cls.ACCESSORY_NAME # Otherwise, return the ...
true
true
79005dbc1f01642e60729d143c901421213469ca
2,732
py
Python
aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/ModifyLaunchTemplateDefaultVersionRequest.py
hetw/aliyun-openapi-python-sdk
7443eacee9fbbaa93c7975c6dbec92d3c364c577
[ "Apache-2.0" ]
1
2020-12-05T03:03:46.000Z
2020-12-05T03:03:46.000Z
aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/ModifyLaunchTemplateDefaultVersionRequest.py
hetw/aliyun-openapi-python-sdk
7443eacee9fbbaa93c7975c6dbec92d3c364c577
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/ModifyLaunchTemplateDefaultVersionRequest.py
hetw/aliyun-openapi-python-sdk
7443eacee9fbbaa93c7975c6dbec92d3c364c577
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.918919
87
0.786603
from aliyunsdkcore.request import RpcRequest from aliyunsdkecs.endpoint import endpoint_data class ModifyLaunchTemplateDefaultVersionRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'ModifyLaunchTemplateDefaultVersion') self.set_method('POST') if hasat...
true
true
79005df4d98ef9f7d776dc6ceae1987c1fcee100
8,010
py
Python
tools/check_target_files_vintf.py
FabriSC/Alioth-SC
bbe9723401b351c2a34b09a30978373d456d20a2
[ "MIT" ]
null
null
null
tools/check_target_files_vintf.py
FabriSC/Alioth-SC
bbe9723401b351c2a34b09a30978373d456d20a2
[ "MIT" ]
null
null
null
tools/check_target_files_vintf.py
FabriSC/Alioth-SC
bbe9723401b351c2a34b09a30978373d456d20a2
[ "MIT" ]
1
2022-03-30T04:47:35.000Z
2022-03-30T04:47:35.000Z
#!/usr/bin/env python # # Copyright (C) 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
32.962963
80
0.705243
import logging import subprocess import sys import os import zipfile import common logger = logging.getLogger(__name__) OPTIONS = common.OPTIONS # paths (VintfObject.cpp). # These paths are stored in different directories in target files package, so # we have to search for the correct path and tel...
true
true
7900604d6ef7fafe622d669f90edbb214fa1197d
3,305
py
Python
hphp/tools/gdb/lookup.py
donsbot/hhvm
ac98a590f75c569e1249b6c1145c7512c7bd240e
[ "PHP-3.01", "Zend-2.0" ]
9,491
2015-01-01T00:30:28.000Z
2022-03-31T20:22:11.000Z
hphp/tools/gdb/lookup.py
donsbot/hhvm
ac98a590f75c569e1249b6c1145c7512c7bd240e
[ "PHP-3.01", "Zend-2.0" ]
4,796
2015-01-01T00:26:31.000Z
2022-03-31T01:09:05.000Z
hphp/tools/gdb/lookup.py
donsbot/hhvm
ac98a590f75c569e1249b6c1145c7512c7bd240e
[ "PHP-3.01", "Zend-2.0" ]
2,126
2015-01-01T11:13:29.000Z
2022-03-28T19:58:15.000Z
#!/usr/bin/env python3 """ GDB commands for various HHVM ID lookups. """ from compatibility import * import gdb import idx import unit from gdbutils import * #------------------------------------------------------------------------------ # `lookup' command. class LookupCommand(gdb.Command): """Lookup HHVM run...
25.037879
89
0.556732
from compatibility import * import gdb import idx import unit from gdbutils import * class LookupCommand(gdb.Command): def __init__(self): super(LookupCommand, self).__init__('lookup', gdb.COMMAND_DATA, gdb.COMPLETE_NONE, True) LookupCommand() #-----...
true
true
7900622f7acf4abfec0043a52ff26e93acf0400d
653
py
Python
packages/openshift/__init__.py
mhcurlee/openshift-client-python
f8013715d51afcd51c5ab8dd95ee0e2f9f21bb15
[ "Apache-2.0" ]
null
null
null
packages/openshift/__init__.py
mhcurlee/openshift-client-python
f8013715d51afcd51c5ab8dd95ee0e2f9f21bb15
[ "Apache-2.0" ]
null
null
null
packages/openshift/__init__.py
mhcurlee/openshift-client-python
f8013715d51afcd51c5ab8dd95ee0e2f9f21bb15
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from .context import * from .base_verbs import * from .model import OpenShiftPythonException from .model import Model, Missing from .selector import * from .apiobject import * from . import naming from . import status from . import config from .ansible import ansible # Single so...
23.321429
66
0.777948
from __future__ import absolute_import from .context import * from .base_verbs import * from .model import OpenShiftPythonException from .model import Model, Missing from .selector import * from .apiobject import * from . import naming from . import status from . import config from .ansible import ansible __VERSION_...
true
true
7900628bbccf6adf32515d2b3107f004af0d0083
3,046
py
Python
pie_pie_chart.py
mmachenry/pie-pie-chart
d5706c85381b58a3990a20021f6c35c28ee51e0b
[ "MIT" ]
10
2019-03-15T17:10:03.000Z
2020-03-15T04:44:55.000Z
pie_pie_chart.py
mmachenry/pie-pie-chart
d5706c85381b58a3990a20021f6c35c28ee51e0b
[ "MIT" ]
null
null
null
pie_pie_chart.py
mmachenry/pie-pie-chart
d5706c85381b58a3990a20021f6c35c28ee51e0b
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO import hx711 import matplotlib.pyplot as plt # Read initial calibration and tare weight data then display the plot. def main(): GPIO.setmode(GPIO.BCM) hx = hx711.HX711(dout_pin=5, pd_sck_pin=6) zero_the_scale(hx) calibrate_scale(hx) (tare_weight, total_weight) = get_tare_an...
33.108696
75
0.645765
import RPi.GPIO as GPIO import hx711 import matplotlib.pyplot as plt def main(): GPIO.setmode(GPIO.BCM) hx = hx711.HX711(dout_pin=5, pd_sck_pin=6) zero_the_scale(hx) calibrate_scale(hx) (tare_weight, total_weight) = get_tare_and_full_weight(hx) plot_reading(hx, tare_weight, total_weight - tar...
true
true
790062ffb0c8b5195bd47e619cf2e6c08a137f45
973
py
Python
examples/local/main.py
francisso/rembrain_robotframework
bd54a8c51775da3517760c4060edda8c28f5e75d
[ "MIT" ]
null
null
null
examples/local/main.py
francisso/rembrain_robotframework
bd54a8c51775da3517760c4060edda8c28f5e75d
[ "MIT" ]
null
null
null
examples/local/main.py
francisso/rembrain_robotframework
bd54a8c51775da3517760c4060edda8c28f5e75d
[ "MIT" ]
null
null
null
import os import sys from envyaml import EnvYAML # Adding the repository root to the sys path so exports work properly sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", ".."))) from examples.common.processes import GUIProcess, ImageCapture, YoloImageProcessor # noqa: E402 from rembrain_robot_framew...
31.387097
96
0.727646
import os import sys from envyaml import EnvYAML sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", ".."))) from examples.common.processes import GUIProcess, ImageCapture, YoloImageProcessor from rembrain_robot_framework import RobotDispatcher def run_dispatcher(): process_map = { ...
true
true
7900636809ad5b945d66bebe9c60870118d93c4b
7,769
py
Python
vumi/transports/xmpp/xmpp.py
rapidsms/vumi
f15c101b599cc1283c84592e8707b6a929f67cbd
[ "BSD-3-Clause" ]
null
null
null
vumi/transports/xmpp/xmpp.py
rapidsms/vumi
f15c101b599cc1283c84592e8707b6a929f67cbd
[ "BSD-3-Clause" ]
null
null
null
vumi/transports/xmpp/xmpp.py
rapidsms/vumi
f15c101b599cc1283c84592e8707b6a929f67cbd
[ "BSD-3-Clause" ]
2
2018-03-05T18:01:45.000Z
2019-11-02T19:34:18.000Z
# -*- test-case-name: vumi.transports.xmpp.tests.test_xmpp -*- # -*- encoding: utf-8 -*- from twisted.python import log from twisted.words.protocols.jabber.jid import JID from twisted.words.xish import domish from twisted.words.xish.domish import Element as DomishElement from twisted.internet.task import LoopingCall f...
36.474178
79
0.671644
from twisted.python import log from twisted.words.protocols.jabber.jid import JID from twisted.words.xish import domish from twisted.words.xish.domish import Element as DomishElement from twisted.internet.task import LoopingCall from twisted.internet.defer import inlineCallbacks from wokkel.client import XMPPClient...
true
true
7900639b26b8274a09dc475e60532db57a8ca3de
1,072
py
Python
model-optimizer/mo/front/kaldi/extractors/affine_component_ext.py
apexxs/dldt
17e66dc5a6631d630da454506902bd7c25d4170b
[ "Apache-2.0" ]
2
2021-04-19T06:08:35.000Z
2021-08-25T02:43:43.000Z
model-optimizer/mo/front/kaldi/extractors/affine_component_ext.py
apexxs/dldt
17e66dc5a6631d630da454506902bd7c25d4170b
[ "Apache-2.0" ]
6
2022-01-11T18:56:22.000Z
2022-02-21T13:20:20.000Z
model-optimizer/mo/front/kaldi/extractors/affine_component_ext.py
apexxs/dldt
17e66dc5a6631d630da454506902bd7c25d4170b
[ "Apache-2.0" ]
3
2021-02-05T17:11:17.000Z
2021-04-19T08:33:31.000Z
""" Copyright (c) 2018 Intel Corporation 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 wri...
35.733333
99
0.785448
from mo.front.extractor import FrontExtractorOp from mo.front.kaldi.extractors.fixed_affine_component_ext import FixedAffineComponentFrontExtractor from mo.front.kaldi.utils import read_learning_info from mo.graph.graph import Node class AffineComponentFrontExtractor(FrontExtractorOp): op = 'affinecomponent' ...
true
true
7900641bd721f65da6126568388a4cf1c97d0c2e
7,465
py
Python
tests/test_load.py
tiosgz/herbstluftwm
2f337ab3d73431b02f31e7d3cfee3a60fe77cdb9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_load.py
tiosgz/herbstluftwm
2f337ab3d73431b02f31e7d3cfee3a60fe77cdb9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_load.py
tiosgz/herbstluftwm
2f337ab3d73431b02f31e7d3cfee3a60fe77cdb9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import pytest from test_layout import verify_frame_objects_via_dump @pytest.mark.parametrize("invalid_layout,error_pos", [ ('(', 1), ('()', 1), ('foo baar', 0), ('(foo baar', 1), ('((clients max:0 ))', 1), ('(clients)', 8), ('(clients )', 9), ('(split max:0.5:1)', 7), ('(split hori...
35.046948
114
0.626256
import pytest from test_layout import verify_frame_objects_via_dump @pytest.mark.parametrize("invalid_layout,error_pos", [ ('(', 1), ('()', 1), ('foo baar', 0), ('(foo baar', 1), ('((clients max:0 ))', 1), ('(clients)', 8), ('(clients )', 9), ('(split max:0.5:1)', 7), ('(split hori...
true
true
7900645ad73aaae7ac7a8634dff8e4f26be3750a
1,432
py
Python
Question_11_20/answers/answer_19.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
Question_11_20/answers/answer_19.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
Question_11_20/answers/answer_19.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
import cv2 import numpy as np # Gray scale def BGR2GRAY(img): b = img[:, :, 0].copy() g = img[:, :, 1].copy() r = img[:, :, 2].copy() # Gray scale out = 0.2126 * r + 0.7152 * g + 0.0722 * b out = out.astype(np.uint8) return out # LoG filter def LoG_filter(img, K_size=5, sigma=3): H, W, C = img.shape ...
23.096774
119
0.511872
import cv2 import numpy as np def BGR2GRAY(img): b = img[:, :, 0].copy() g = img[:, :, 1].copy() r = img[:, :, 2].copy() out = 0.2126 * r + 0.7152 * g + 0.0722 * b out = out.astype(np.uint8) return out def LoG_filter(img, K_size=5, sigma=3): H, W, C = img.shape pad = K_size // 2 ...
false
true
790065560969580d0130bee7b7abb58c557f2eb3
27,857
py
Python
src/dirbs/utils.py
nealmadhu/DIRBS-Core
5afac86233c56d28e1c76d1291c2a1fec302be6f
[ "BSD-3-Clause-Clear" ]
null
null
null
src/dirbs/utils.py
nealmadhu/DIRBS-Core
5afac86233c56d28e1c76d1291c2a1fec302be6f
[ "BSD-3-Clause-Clear" ]
null
null
null
src/dirbs/utils.py
nealmadhu/DIRBS-Core
5afac86233c56d28e1c76d1291c2a1fec302be6f
[ "BSD-3-Clause-Clear" ]
1
2022-02-09T10:55:13.000Z
2022-02-09T10:55:13.000Z
""" DIRBS module for utility classes and functions. Copyright (c) 2018 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are m...
46.044628
119
0.651219
import datetime import logging import hashlib import json import time import copy import io import contextlib import psycopg2 from psycopg2 import sql from psycopg2.extras import NamedTupleCursor from dirbs import db_schema_version as code_db_schema_version import dirbs.metadata as metadata from dirbs.config import ...
true
true
7900669253c901425b542ac7d6c9655a99875a86
351
py
Python
code/blog/tests/test_models.py
elinguiuriel/djangoTDD
67b09f6d345ca085fefa42ac11a6a1c2ee5d03dc
[ "BSD-2-Clause" ]
null
null
null
code/blog/tests/test_models.py
elinguiuriel/djangoTDD
67b09f6d345ca085fefa42ac11a6a1c2ee5d03dc
[ "BSD-2-Clause" ]
null
null
null
code/blog/tests/test_models.py
elinguiuriel/djangoTDD
67b09f6d345ca085fefa42ac11a6a1c2ee5d03dc
[ "BSD-2-Clause" ]
null
null
null
from django.test import TestCase from blog.models import Entry class EntryModelTest(TestCase): def test_string_representation(self): entry = Entry(title="My entry title") self.assertEqual(str(entry), entry.title) def test_verbose_name_plural(self): self.assertEqual(str(Entry._meta.ve...
27
73
0.735043
from django.test import TestCase from blog.models import Entry class EntryModelTest(TestCase): def test_string_representation(self): entry = Entry(title="My entry title") self.assertEqual(str(entry), entry.title) def test_verbose_name_plural(self): self.assertEqual(str(Entry._meta.ve...
true
true
79006754031830659990309ab74928cab97b7b2d
1,625
py
Python
utest/preferences/test_settings.py
veryl-technologies/t24-tests-ide
16cd803895916a785c0e1fec3f71f9388c21edc9
[ "ECL-2.0", "Apache-2.0" ]
1
2019-06-27T08:48:24.000Z
2019-06-27T08:48:24.000Z
utest/preferences/test_settings.py
veryl-technologies/t24-tests-ide
16cd803895916a785c0e1fec3f71f9388c21edc9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
utest/preferences/test_settings.py
veryl-technologies/t24-tests-ide
16cd803895916a785c0e1fec3f71f9388c21edc9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import unittest from robotide.preferences.settings import SettingsMigrator from robotide.utils import overrides class SettingsMigrationTestCase(SettingsMigrator, unittest.TestCase): def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) def setUp(self): ...
33.163265
69
0.721231
import unittest from robotide.preferences.settings import SettingsMigrator from robotide.utils import overrides class SettingsMigrationTestCase(SettingsMigrator, unittest.TestCase): def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) def setUp(self): ...
true
true
790068413a8a60f051fb4e9e6b1e00b0cfcde5e2
633
py
Python
lexicon.py
philipok-1/raspberry-slack
269ad6221e09d22deeb842073c53e33d0edb9c34
[ "MIT" ]
5
2019-04-03T05:55:40.000Z
2020-03-01T13:46:28.000Z
lexicon.py
philipok-1/raspberry-slack
269ad6221e09d22deeb842073c53e33d0edb9c34
[ "MIT" ]
1
2017-05-17T13:13:12.000Z
2017-05-17T15:01:15.000Z
lexicon.py
philipok-1/raspberry-slack
269ad6221e09d22deeb842073c53e33d0edb9c34
[ "MIT" ]
4
2017-12-28T07:48:00.000Z
2020-03-01T13:46:33.000Z
import logging import sys import re import time import random import utils logger = utils.loggerMaster('slack.lexicon') def response(type): phrases={'greetings':[", welcome back", "Hi there", "Good to see you again", "Hello again", "hi"], 'farewells':['bye'] } try: length=len(phrases[typ...
18.617647
102
0.649289
import logging import sys import re import time import random import utils logger = utils.loggerMaster('slack.lexicon') def response(type): phrases={'greetings':[", welcome back", "Hi there", "Good to see you again", "Hello again", "hi"], 'farewells':['bye'] } try: length=len(phrases[typ...
false
true
7900684fdd94602e440c03daa9e2ca792e7b0e55
1,408
py
Python
examples/drawing-circuits/designIFFL2.py
PhilippBoeing/synbioweaver
23efdf79a325885a43e82ba13e6ccefb8eb3d733
[ "MIT" ]
null
null
null
examples/drawing-circuits/designIFFL2.py
PhilippBoeing/synbioweaver
23efdf79a325885a43e82ba13e6ccefb8eb3d733
[ "MIT" ]
null
null
null
examples/drawing-circuits/designIFFL2.py
PhilippBoeing/synbioweaver
23efdf79a325885a43e82ba13e6ccefb8eb3d733
[ "MIT" ]
null
null
null
from synbioweaver.core import * from synbioweaver.aspects.designRulesAspect import * from synbioweaver.aspects.printStackAspect import * from synbioweaver.aspects.pigeonOutputAspect import * declareNewMolecule('A') declareNewMolecule('B') declareNewMolecule('C') declareNewMolecule('In') declareNewPart('t1',Terminator...
30.608696
82
0.725142
from synbioweaver.core import * from synbioweaver.aspects.designRulesAspect import * from synbioweaver.aspects.printStackAspect import * from synbioweaver.aspects.pigeonOutputAspect import * declareNewMolecule('A') declareNewMolecule('B') declareNewMolecule('C') declareNewMolecule('In') declareNewPart('t1',Terminator...
true
true
7900699d2665ed42b62df5e1307db3aeb998a0a8
7,429
py
Python
Repeat/CoMPT/utils_node.py
jcchan23/SAIL
878c59e9f1b4e6df3e2424c8213c1df25459e950
[ "MIT" ]
7
2022-01-11T14:09:31.000Z
2022-03-22T05:39:14.000Z
Repeat/CoMPT/utils_node.py
jcchan23/SAIL
878c59e9f1b4e6df3e2424c8213c1df25459e950
[ "MIT" ]
2
2022-03-01T08:32:56.000Z
2022-03-09T02:58:01.000Z
Repeat/CoMPT/utils_node.py
jcchan23/SAIL
878c59e9f1b4e6df3e2424c8213c1df25459e950
[ "MIT" ]
1
2022-03-09T19:07:45.000Z
2022-03-09T19:07:45.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : utils_node.py @Time : 2022/03/08 14:35:13 @Author : Jianwen Chen @Version : 1.0 @Contact : chenjw48@mail2.sysu.edu.cn @License : (C)Copyright 2021-2022, SAIL-Lab ''' ######################################## import area ######################...
37.331658
133
0.63481
true
true
79006a3ce2268eb089088ec3e60ec1ae5ecf4990
7,902
py
Python
training.py
aasir22/tools_classification
f5a2606f5fa07c1ebc161c467d17f4e7a04c5ebb
[ "MIT" ]
null
null
null
training.py
aasir22/tools_classification
f5a2606f5fa07c1ebc161c467d17f4e7a04c5ebb
[ "MIT" ]
null
null
null
training.py
aasir22/tools_classification
f5a2606f5fa07c1ebc161c467d17f4e7a04c5ebb
[ "MIT" ]
null
null
null
from tensorflow.keras.layers import Dense, Flatten from tensorflow.keras.models import Model from tensorflow.keras.applications.vgg19 import VGG19 from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.callbacks import ModelCheckpoint from datetime import datetime import numpy as np i...
42.945652
160
0.552645
from tensorflow.keras.layers import Dense, Flatten from tensorflow.keras.models import Model from tensorflow.keras.applications.vgg19 import VGG19 from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.callbacks import ModelCheckpoint from datetime import datetime import numpy as np i...
true
true
79006ac2bd85c2402d452700b18cea1ff3b1b152
249
py
Python
gehomesdk/erd/values/advantium/erd_advantium_kitchen_timer_min_max.py
willhayslett/gehome
7e407a1d31cede1453656eaef948332e808484ea
[ "MIT" ]
17
2021-05-18T01:58:06.000Z
2022-03-22T20:49:32.000Z
gehomesdk/erd/values/advantium/erd_advantium_kitchen_timer_min_max.py
willhayslett/gehome
7e407a1d31cede1453656eaef948332e808484ea
[ "MIT" ]
29
2021-05-17T21:43:16.000Z
2022-02-28T22:50:48.000Z
gehomesdk/erd/values/advantium/erd_advantium_kitchen_timer_min_max.py
willhayslett/gehome
7e407a1d31cede1453656eaef948332e808484ea
[ "MIT" ]
9
2021-05-17T04:40:58.000Z
2022-02-02T17:26:13.000Z
from datetime import timedelta from typing import NamedTuple, Optional class ErdAdvantiumKitchenTimerMinMax(NamedTuple): """Defines min/max kitchen timer settings""" min_time: timedelta max_time: timedelta raw_value: Optional[str]
24.9
49
0.7751
from datetime import timedelta from typing import NamedTuple, Optional class ErdAdvantiumKitchenTimerMinMax(NamedTuple): min_time: timedelta max_time: timedelta raw_value: Optional[str]
true
true
79006ae664ef405a71cf1ed65d120de34a6647ad
4,060
py
Python
burclar/__init__.py
The-Special/Burclar
3f36085ff887bdd49c1838e03a8335079dee0e2d
[ "MIT" ]
14
2021-04-04T12:20:35.000Z
2021-11-10T23:59:49.000Z
burclar/__init__.py
The-Special/Burclar
3f36085ff887bdd49c1838e03a8335079dee0e2d
[ "MIT" ]
1
2021-04-03T18:56:21.000Z
2021-04-03T18:56:21.000Z
burclar/__init__.py
The-Special/Burclar
3f36085ff887bdd49c1838e03a8335079dee0e2d
[ "MIT" ]
4
2021-04-04T12:36:40.000Z
2021-09-17T09:18:16.000Z
import requests from bs4 import BeautifulSoup """ Bu modül burçlar ile ilgilenen arkadaşlarımın işine yarayacaktır. Çok basit bir kullanımı mevcuttur. Bir sorunuz olursa seve seve yardım etmek isterim profilimdeki linklerden bana ulaşabilirsiniz. """ def makeAPIRequest(path: str, type: str) -> str: ...
31.71875
96
0.619704
import requests from bs4 import BeautifulSoup def makeAPIRequest(path: str, type: str) -> str: type = type if (type == "gunluk") or (type == "haftalik") else "gunluk" r = requests.get( f"https://www.mynet.com/kadin/burclar-astroloji/{path}-burcu-{type}-yorumu.html") soup = BeautifulSoup(...
true
true
79006bc4d4b1710981f6b6bbeacc52389a5792f7
3,130
py
Python
MxShop/MxShop/urls.py
ScorpioDoctor/DjangoVueShop
a26380e30232f93fead0ebc6b7608b3d7ed2baf4
[ "BSD-2-Clause" ]
null
null
null
MxShop/MxShop/urls.py
ScorpioDoctor/DjangoVueShop
a26380e30232f93fead0ebc6b7608b3d7ed2baf4
[ "BSD-2-Clause" ]
null
null
null
MxShop/MxShop/urls.py
ScorpioDoctor/DjangoVueShop
a26380e30232f93fead0ebc6b7608b3d7ed2baf4
[ "BSD-2-Clause" ]
null
null
null
"""MxShop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
31.938776
91
0.755911
from django.conf.urls import url, include import xadmin from MxShop.settings import MEDIA_ROOT from django.views.static import serve from rest_framework.documentation import include_docs_urls from rest_framework.routers import DefaultRouter from rest_framework.authtoken import views from rest_framework_jwt.views impor...
true
true
79006ded31fe7e9dee49df7e1f8421903387d741
1,935
py
Python
ml-agents/mlagents/trainers/tests/test_barracuda_converter.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
1
2020-10-15T01:28:20.000Z
2020-10-15T01:28:20.000Z
ml-agents/mlagents/trainers/tests/test_barracuda_converter.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
null
null
null
ml-agents/mlagents/trainers/tests/test_barracuda_converter.py
bobcy2015/ml-agents
5d02292ad889f1884fa98bd92f127f17cbfe0112
[ "Apache-2.0" ]
null
null
null
import os import tempfile import pytest import mlagents.trainers.tensorflow_to_barracuda as tf2bc from mlagents.trainers.tests.test_nn_policy import create_policy_mock from mlagents.trainers.settings import TrainerSettings from mlagents.tf_utils import tf from mlagents.model_serialization import SerializationSettings,...
37.211538
86
0.740052
import os import tempfile import pytest import mlagents.trainers.tensorflow_to_barracuda as tf2bc from mlagents.trainers.tests.test_nn_policy import create_policy_mock from mlagents.trainers.settings import TrainerSettings from mlagents.tf_utils import tf from mlagents.model_serialization import SerializationSettings,...
true
true
79006e10d84cb5a0a7213d5ac1823b6efbb6760c
6,254
py
Python
BiblioAlly/ieee.py
gambit4348/BiblioAlly
c04ac378770a3cdcbba863799383103049df22f3
[ "MIT" ]
null
null
null
BiblioAlly/ieee.py
gambit4348/BiblioAlly
c04ac378770a3cdcbba863799383103049df22f3
[ "MIT" ]
null
null
null
BiblioAlly/ieee.py
gambit4348/BiblioAlly
c04ac378770a3cdcbba863799383103049df22f3
[ "MIT" ]
null
null
null
from BiblioAlly import catalog as cat, domain, translator as bibtex class IeeeXTranslator(bibtex.Translator): def _document_from_proto_document(self, proto_document): bibtex.Translator._translate_kind(proto_document) kind = proto_document['type'] fields = proto_document['field'] i...
44.992806
117
0.605373
from BiblioAlly import catalog as cat, domain, translator as bibtex class IeeeXTranslator(bibtex.Translator): def _document_from_proto_document(self, proto_document): bibtex.Translator._translate_kind(proto_document) kind = proto_document['type'] fields = proto_document['field'] i...
true
true
79006e17c04d20eacccb5c41aa9087fdb8d3d8af
7,071
py
Python
clients/keto/python/ory_keto_client/model/delete_ory_access_control_policy_internal_server_error.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
clients/keto/python/ory_keto_client/model/delete_ory_access_control_policy_internal_server_error.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
clients/keto/python/ory_keto_client/model/delete_ory_access_control_policy_internal_server_error.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
""" ORY Keto A cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. # noqa: E501 The version of the OpenAPI document: v0.0.0 Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ import re # ...
40.405714
161
0.606845
import re import sys import nulltype from ory_keto_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_...
true
true
79006f0736af46df78fa4da6843cc9be0bcfc3f4
4,038
py
Python
webcrawler/__init__.py
debugtalk/WebCrawler
256707392a10c71033c4d45e9cb28ea60b3f8014
[ "MIT" ]
37
2017-02-08T13:36:03.000Z
2021-12-23T06:26:43.000Z
webcrawler/__init__.py
debugtalk/WebCrawler
256707392a10c71033c4d45e9cb28ea60b3f8014
[ "MIT" ]
3
2017-03-15T07:09:06.000Z
2022-01-18T15:30:03.000Z
webcrawler/__init__.py
debugtalk/WebCrawler
256707392a10c71033c4d45e9cb28ea60b3f8014
[ "MIT" ]
18
2017-06-09T08:57:18.000Z
2022-01-12T06:59:58.000Z
__version__ = '0.3.3' import os import sys import logging import argparse from .core import WebCrawler from .helpers import color_logging def main(): """ parse command line options and run commands. """ parser = argparse.ArgumentParser( description='A web crawler for testing website links validati...
37.388889
94
0.63794
__version__ = '0.3.3' import os import sys import logging import argparse from .core import WebCrawler from .helpers import color_logging def main(): parser = argparse.ArgumentParser( description='A web crawler for testing website links validation.') parser.add_argument( '-V', '--version', de...
true
true
79006f3d0cfbe4b7e107610605c8491f90670bd9
28,985
py
Python
app/utils/onelogin/saml2/settings.py
nycrecords/intranet
33b11d21246eac983d82483483f9d5257b226e12
[ "MIT" ]
2
2018-07-12T19:14:13.000Z
2022-01-31T03:19:34.000Z
app/utils/onelogin/saml2/settings.py
nycrecords/intranet
33b11d21246eac983d82483483f9d5257b226e12
[ "MIT" ]
19
2018-07-13T15:01:00.000Z
2021-03-31T19:01:30.000Z
app/utils/onelogin/saml2/settings.py
nycrecords/intranet
33b11d21246eac983d82483483f9d5257b226e12
[ "MIT" ]
1
2019-04-10T19:46:00.000Z
2019-04-10T19:46:00.000Z
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Settings class Copyright (c) 2010-2018 OneLogin, Inc. MIT License Setting class of OneLogin's Python Toolkit. """ from time import time import re from os.path import dirname, exists, join, sep from app.utils.onelogin.saml2 import compat from app.utils.onelogin.saml2.const...
36.322055
153
0.583198
from time import time import re from os.path import dirname, exists, join, sep from app.utils.onelogin.saml2 import compat from app.utils.onelogin.saml2.constants import OneLogin_Saml2_Constants from app.utils.onelogin.saml2.errors import OneLogin_Saml2_Error from app.utils.onelogin.saml2.metadata import OneLogin_Sa...
true
true
79006fa5a9c74f484a8bb010a5285a68f277a0a0
23,872
py
Python
sdk/python/pulumi_azure_native/network/v20201101/network_virtual_appliance.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20201101/network_virtual_appliance.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20201101/network_virtual_appliance.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
47.744
1,682
0.680379
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['NetworkVirtualApplianceArgs', 'NetworkVirtualAppliance'] @pulumi.input_type class Netwo...
true
true
790071082ba657366bf960086492ee9ce85e312b
204
py
Python
home/hairygael/GESTURES/giving.py
rv8flyboy/pyrobotlab
4e04fb751614a5cb6044ea15dcfcf885db8be65a
[ "Apache-2.0" ]
63
2015-02-03T18:49:43.000Z
2022-03-29T03:52:24.000Z
home/hairygael/GESTURES/giving.py
hirwaHenryChristian/pyrobotlab
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
[ "Apache-2.0" ]
16
2016-01-26T19:13:29.000Z
2018-11-25T21:20:51.000Z
home/hairygael/GESTURES/giving.py
hirwaHenryChristian/pyrobotlab
2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9
[ "Apache-2.0" ]
151
2015-01-03T18:55:54.000Z
2022-03-04T07:04:23.000Z
def giving() i01.moveHead(44,82) i01.moveArm("left",15,55,68,10) i01.moveArm("right",13,40,74,13) i01.moveHand("left",61,0,14,0,0,180) i01.moveHand("right",0,24,24,19,21,25) i01.moveTorso(90,90,90)
25.5
39
0.681373
def giving() i01.moveHead(44,82) i01.moveArm("left",15,55,68,10) i01.moveArm("right",13,40,74,13) i01.moveHand("left",61,0,14,0,0,180) i01.moveHand("right",0,24,24,19,21,25) i01.moveTorso(90,90,90)
false
true
79007125142bd4d1bda8bc19fe8af633b6825101
2,582
py
Python
ex19/ex19-sd.py
python-practice/lpthw
ad06dfe6a5d2351ee9216b365ff688db820cc035
[ "MIT" ]
1
2015-07-18T15:09:40.000Z
2015-07-18T15:09:40.000Z
ex19/ex19-sd.py
python-practice/lpthw
ad06dfe6a5d2351ee9216b365ff688db820cc035
[ "MIT" ]
null
null
null
ex19/ex19-sd.py
python-practice/lpthw
ad06dfe6a5d2351ee9216b365ff688db820cc035
[ "MIT" ]
null
null
null
# define a function, which accepts 2 arguments def cheese_and_crackers(cheese_count, boxes_of_crackers): # %d is for digit print "You have %d cheeses!" % cheese_count print "You have %d boxes of crackers!" % boxes_of_crackers print "Man that's enough for a party!" # go to a new line after the end print "Get a bla...
27.178947
92
0.717661
def cheese_and_crackers(cheese_count, boxes_of_crackers): print "You have %d cheeses!" % cheese_count print "You have %d boxes of crackers!" % boxes_of_crackers print "Man that's enough for a party!" # go to a new line after the end print "Get a blanket.\n" print "We can just give the function numbers directl...
false
true
790071a7c9f8fb23f63ae74f647204d31255ad40
372
py
Python
mypkg/scripts/twice.py
note032/ROS_robosys
539fb5c2cb5c3da06f696c27d65ac7eb4efbef36
[ "BSD-3-Clause" ]
null
null
null
mypkg/scripts/twice.py
note032/ROS_robosys
539fb5c2cb5c3da06f696c27d65ac7eb4efbef36
[ "BSD-3-Clause" ]
null
null
null
mypkg/scripts/twice.py
note032/ROS_robosys
539fb5c2cb5c3da06f696c27d65ac7eb4efbef36
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python import rospy from std_msgs.msg import Int32 def cb(message): rospy.loginfo(message.data*2) print (rospy.loginfo) if message.data%2 == 0: print ('0') elif message.data%2 != 0 : print('1') if __name__ == '__main__': rospy.init_node('twice') sub = rospy...
18.6
49
0.612903
import rospy from std_msgs.msg import Int32 def cb(message): rospy.loginfo(message.data*2) print (rospy.loginfo) if message.data%2 == 0: print ('0') elif message.data%2 != 0 : print('1') if __name__ == '__main__': rospy.init_node('twice') sub = rospy.Subscriber('count_up'...
true
true
790071b65265c1427d41448669d14b8e49bfef73
13,744
py
Python
2018/15/helpme.py
mark-inderhees/aoc
ac40055faef4875c8446b27f54977105b65e41ad
[ "MIT" ]
null
null
null
2018/15/helpme.py
mark-inderhees/aoc
ac40055faef4875c8446b27f54977105b65e41ad
[ "MIT" ]
null
null
null
2018/15/helpme.py
mark-inderhees/aoc
ac40055faef4875c8446b27f54977105b65e41ad
[ "MIT" ]
null
null
null
def setup_inp(inp): """Convert list of strings into list of lists, with glves/goblins replaced by tuples""" grid = [] for rowI,row in enumerate(inp.split("\n")): grid.append([x for x in row]) for colI,col in enumerate(row): if col in ["G","E"]: #Replace ene...
33.359223
117
0.511641
def setup_inp(inp): grid = [] for rowI,row in enumerate(inp.split("\n")): grid.append([x for x in row]) for colI,col in enumerate(row): if col in ["G","E"]: char_tup = (col, 200, False) grid[rowI][colI] = char_tup return gr...
true
true
790071b75654e0a02778afc0a9aaf770843324b1
5,772
py
Python
ghostwriter/shepherd/filters.py
studebacon/Ghostwriter
1cefcaa4859707ee11b2c3617bc03f8b3b74f57d
[ "BSD-3-Clause" ]
null
null
null
ghostwriter/shepherd/filters.py
studebacon/Ghostwriter
1cefcaa4859707ee11b2c3617bc03f8b3b74f57d
[ "BSD-3-Clause" ]
null
null
null
ghostwriter/shepherd/filters.py
studebacon/Ghostwriter
1cefcaa4859707ee11b2c3617bc03f8b3b74f57d
[ "BSD-3-Clause" ]
null
null
null
"""This contains all of the model filters used by the Shepherd application.""" # Django & Other 3rd Party Libraries import django_filters from crispy_forms.bootstrap import ( Accordion, AccordionGroup, InlineCheckboxes, PrependedText, ) from crispy_forms.helper import FormHelper from crispy_forms.layou...
33.952941
126
0.580388
import django_filters from crispy_forms.bootstrap import ( Accordion, AccordionGroup, InlineCheckboxes, PrependedText, ) from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, ButtonHolder, Column, Layout, Row, Submit from django import forms from django.forms.widgets import ...
true
true
790072f6a0e325433211f8f193bdf2307baf415d
1,708
py
Python
model/polar_inst.py
Tenvence/polar-inst
95b2ef2fbc666469b031367e6aeb471d0465c272
[ "Apache-2.0" ]
null
null
null
model/polar_inst.py
Tenvence/polar-inst
95b2ef2fbc666469b031367e6aeb471d0465c272
[ "Apache-2.0" ]
null
null
null
model/polar_inst.py
Tenvence/polar-inst
95b2ef2fbc666469b031367e6aeb471d0465c272
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from model.modules.stage_backbone import StageBackbone from model.modules.feature_pyramid_net import FeaturePyramidNet from model.modules.polar_head import PolarHead class PolarInst(nn.Module): def __init__(self, num_polars, num_channels, num_classes): super(PolarInst, ...
39.72093
108
0.683255
import torch import torch.nn as nn from model.modules.stage_backbone import StageBackbone from model.modules.feature_pyramid_net import FeaturePyramidNet from model.modules.polar_head import PolarHead class PolarInst(nn.Module): def __init__(self, num_polars, num_channels, num_classes): super(PolarInst, ...
true
true
7900742c8ad5a90154ee4e4191140fe9155766e9
3,742
py
Python
stochastic_to_deterministic/hashing.py
kiss2u/google-research
2cd66234656f9e2f4218ed90a2d8aa9cf3139093
[ "Apache-2.0" ]
7
2020-03-15T12:14:07.000Z
2021-12-01T07:01:09.000Z
stochastic_to_deterministic/hashing.py
JustinDurham/google-research
9049acf9246c1b75170f0c6757e62a8f619a9db6
[ "Apache-2.0" ]
18
2020-09-25T22:45:41.000Z
2022-02-10T02:39:55.000Z
stochastic_to_deterministic/hashing.py
JustinDurham/google-research
9049acf9246c1b75170f0c6757e62a8f619a9db6
[ "Apache-2.0" ]
4
2020-06-15T03:06:53.000Z
2021-08-06T16:38:33.000Z
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
34.330275
80
0.736772
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hashlib from absl import app import numpy as np def compute_hash(features, hash_matrix, hash_vector): def convert_int_to_bin(x, dimension): return '{:b}'.format(x).zfill(d...
true
true
790074975de38fdef6156d6799de04bb8232b16c
991
py
Python
angel-ps/python/pyangel/running_mode.py
weien8899/angel
829ce1a02e147d1f93b6375c2d07208ea31e53a2
[ "Apache-2.0", "BSD-3-Clause" ]
1
2017-11-24T07:40:30.000Z
2017-11-24T07:40:30.000Z
angel-ps/python/pyangel/running_mode.py
weien8899/angel
829ce1a02e147d1f93b6375c2d07208ea31e53a2
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
angel-ps/python/pyangel/running_mode.py
weien8899/angel
829ce1a02e147d1f93b6375c2d07208ea31e53a2
[ "Apache-2.0", "BSD-3-Clause" ]
1
2018-09-28T00:31:04.000Z
2018-09-28T00:31:04.000Z
# # Tencent is pleased to support the open source community by making Angel available. # # Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of ...
31.967742
102
0.744702
from enum import Enum, unique @unique class RunningMode(Enum): ANGEL_PS_PSAGENT = 0 ANGEL_PS = 1 ANGEL_PS_WORKER = 2
true
true
790074a6c9c67ccc8680a8288f75beaf820a25eb
14,135
py
Python
db/sql/dal/regions.py
Otamio/datamart-api
728d5da0ce470a669be314c12c8226123a689aa0
[ "MIT" ]
null
null
null
db/sql/dal/regions.py
Otamio/datamart-api
728d5da0ce470a669be314c12c8226123a689aa0
[ "MIT" ]
null
null
null
db/sql/dal/regions.py
Otamio/datamart-api
728d5da0ce470a669be314c12c8226123a689aa0
[ "MIT" ]
null
null
null
from typing import Dict, List, Optional from db.sql.dal.general import sanitize from db.sql.utils import query_to_dicts class Region: admin: str admin_id: str region_type: str country: str country_id: str admin1: Optional[str] admin1_id: Optional[str] admin2: Optional[str] admin2_i...
44.449686
115
0.678882
from typing import Dict, List, Optional from db.sql.dal.general import sanitize from db.sql.utils import query_to_dicts class Region: admin: str admin_id: str region_type: str country: str country_id: str admin1: Optional[str] admin1_id: Optional[str] admin2: Optional[str] admin2_i...
true
true
79007595ae1796878ebe6ff22b66eacdb323b63f
30,220
py
Python
selfdrive/controls/lib/events.py
gomtings/for_NEXO
8274e4569d96d67d18d458fba48a3254772ea8e0
[ "MIT" ]
null
null
null
selfdrive/controls/lib/events.py
gomtings/for_NEXO
8274e4569d96d67d18d458fba48a3254772ea8e0
[ "MIT" ]
null
null
null
selfdrive/controls/lib/events.py
gomtings/for_NEXO
8274e4569d96d67d18d458fba48a3254772ea8e0
[ "MIT" ]
null
null
null
from enum import IntEnum from typing import Dict, Union, Callable, List, Optional from cereal import log, car import cereal.messaging as messaging from common.realtime import DT_CTRL from selfdrive.config import Conversions as CV from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER AlertSize = log.ControlsSt...
34.815668
152
0.691264
from enum import IntEnum from typing import Dict, Union, Callable, List, Optional from cereal import log, car import cereal.messaging as messaging from common.realtime import DT_CTRL from selfdrive.config import Conversions as CV from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER AlertSize = log.ControlsSt...
true
true
790075bc25c92d36cee667f523411b0518d70602
6,466
py
Python
selfdrive/car/hyundai/hyundaican.py
zzune/openpilot
9f8c6e4b61d00efaaefbe4d2b2c0a65a7976d656
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/hyundaican.py
zzune/openpilot
9f8c6e4b61d00efaaefbe4d2b2c0a65a7976d656
[ "MIT" ]
null
null
null
selfdrive/car/hyundai/hyundaican.py
zzune/openpilot
9f8c6e4b61d00efaaefbe4d2b2c0a65a7976d656
[ "MIT" ]
null
null
null
import crcmod from selfdrive.car.hyundai.values import CAR, CHECKSUM hyundai_checksum = crcmod.mkCrcFun(0x11D, initCrc=0xFD, rev=False, xorOut=0xdf) def create_lkas11(packer, car_fingerprint, bus, apply_steer, steer_req, cnt, enabled, lkas11, hud_alert, lane_visible, left_lane_depar...
43.395973
104
0.689453
import crcmod from selfdrive.car.hyundai.values import CAR, CHECKSUM hyundai_checksum = crcmod.mkCrcFun(0x11D, initCrc=0xFD, rev=False, xorOut=0xdf) def create_lkas11(packer, car_fingerprint, bus, apply_steer, steer_req, cnt, enabled, lkas11, hud_alert, lane_visible, left_lane_depar...
true
true
79007603346930c0b565c6c3b79c52882716d78e
7,293
py
Python
utils/datasets.py
jaingaurav3/ML_sample
4e53de198f7965fa96f0db44717df27032df4b48
[ "MIT" ]
19
2018-06-08T05:33:47.000Z
2021-04-26T16:19:32.000Z
utils/datasets.py
jaingaurav3/ML_sample
4e53de198f7965fa96f0db44717df27032df4b48
[ "MIT" ]
null
null
null
utils/datasets.py
jaingaurav3/ML_sample
4e53de198f7965fa96f0db44717df27032df4b48
[ "MIT" ]
13
2018-09-24T21:52:06.000Z
2021-02-26T10:40:25.000Z
import os import numpy as np import pandas as pd from sklearn.datasets.samples_generator import make_swiss_roll import torch import torchvision from torchvision import transforms import glob import random import config as cfg import utils.metadata as meta from . import csv_loader from . import img_loader # Datasets #...
31.571429
96
0.639106
import os import numpy as np import pandas as pd from sklearn.datasets.samples_generator import make_swiss_roll import torch import torchvision from torchvision import transforms import glob import random import config as cfg import utils.metadata as meta from . import csv_loader from . import img_loader def get...
true
true
7900766802225ae53d0725336087e8a594ca609e
2,870
py
Python
imcsdk/mometa/chassis/ChassisPowerMonitor.py
ecoen66/imcsdk
b10eaa926a5ee57cea7182ae0adc8dd1c818b0ab
[ "Apache-2.0" ]
31
2016-06-14T07:23:59.000Z
2021-09-12T17:17:26.000Z
imcsdk/mometa/chassis/ChassisPowerMonitor.py
sthagen/imcsdk
1831eaecb5960ca03a8624b1579521749762b932
[ "Apache-2.0" ]
109
2016-05-25T03:56:56.000Z
2021-10-18T02:58:12.000Z
imcsdk/mometa/chassis/ChassisPowerMonitor.py
sthagen/imcsdk
1831eaecb5960ca03a8624b1579521749762b932
[ "Apache-2.0" ]
67
2016-05-17T05:53:56.000Z
2022-03-24T15:52:53.000Z
"""This module contains the general information for ChassisPowerMonitor ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class ChassisPowerMonitorConsts: pass class ChassisPowerMonitor(ManagedObject): """This is Chassi...
42.835821
234
0.619164
from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class ChassisPowerMonitorConsts: pass class ChassisPowerMonitor(ManagedObject): consts = ChassisPowerMonitorConsts() naming_props = set([]) mo_meta = { "modular": MoMeta...
true
true
790076a9d9e3131be50c6f478d1bb94c1b83f4b7
4,320
py
Python
gluoncv/model_zoo/model_zoo.py
Ellinier/gluon-cv
66d0efee41faf93a40bc53d890b9b7a5ff8e0d8e
[ "Apache-2.0" ]
null
null
null
gluoncv/model_zoo/model_zoo.py
Ellinier/gluon-cv
66d0efee41faf93a40bc53d890b9b7a5ff8e0d8e
[ "Apache-2.0" ]
null
null
null
gluoncv/model_zoo/model_zoo.py
Ellinier/gluon-cv
66d0efee41faf93a40bc53d890b9b7a5ff8e0d8e
[ "Apache-2.0" ]
null
null
null
# pylint: disable=wildcard-import, unused-wildcard-import """Model store which handles pretrained models from both mxnet.gluon.model_zoo.vision and gluoncv.models """ from mxnet import gluon from .ssd import * from .faster_rcnn import * from .fcn import * from .pspnet import * from .cifarresnet import * from .cifarresn...
38.918919
95
0.693287
from mxnet import gluon from .ssd import * from .faster_rcnn import * from .fcn import * from .pspnet import * from .cifarresnet import * from .cifarresnext import * from .cifarwideresnet import * from .resnetv1b import * from .resnext import * from .senet import * from .se_resnet import * from .yolo import * __all__...
true
true
79007a6d9fdbe416ec0c8aa48e4291efd2ef1356
17,973
py
Python
fairseq/tasks/translation.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
33
2021-01-06T18:03:55.000Z
2022-03-28T12:07:44.000Z
fairseq/tasks/translation.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
8
2021-06-11T03:11:37.000Z
2022-03-08T19:15:42.000Z
fairseq/tasks/translation.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
14
2021-05-17T06:55:01.000Z
2022-03-28T12:07:42.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import itertools import json import logging import os from argparse import Namespace import numpy as np from fairseq import metrics, options,...
40.028953
95
0.587492
import itertools import json import logging import os from argparse import Namespace import numpy as np from fairseq import metrics, options, utils from fairseq.data import ( AppendTokenDataset, ConcatDataset, LanguagePairDataset, PrependTokenDataset, StripTokenDataset, TruncateDataset, ...
true
true
79007ab135d543a36f1977f20c5a713eb3864f01
12,134
py
Python
video_pose_ed.py
hiepnth/people-counting-pose
8cdaab5281847c296b305643842053d496e2e4e8
[ "Apache-2.0" ]
161
2018-02-22T15:15:47.000Z
2022-02-10T16:40:06.000Z
video_pose_ed.py
hiepnth/people-counting-pose
8cdaab5281847c296b305643842053d496e2e4e8
[ "Apache-2.0" ]
15
2018-03-01T23:18:00.000Z
2021-05-15T06:23:15.000Z
video_pose_ed.py
hiepnth/people-counting-pose
8cdaab5281847c296b305643842053d496e2e4e8
[ "Apache-2.0" ]
41
2018-03-01T13:03:54.000Z
2022-02-17T14:32:22.000Z
import sys import os import math import imageio from moviepy.editor import * import time def read_video(video_name): # Read video from file video_name_input = 'testset/' + video_name video = VideoFileClip(video_name_input) return video def video2frame(video_name): video = read_video(video_name)...
41.554795
256
0.659469
import sys import os import math import imageio from moviepy.editor import * import time def read_video(video_name): video_name_input = 'testset/' + video_name video = VideoFileClip(video_name_input) return video def video2frame(video_name): video = read_video(video_name) video_frame_numb...
true
true
79007ac162f88b3758837ebcbe8797a0418c6cbd
13,364
py
Python
pipuchun/jsonuz.py
SarvarRaxmonov/december-2
2242504ebc3d80ef3c3574f360014854ae6b4191
[ "BSD-2-Clause" ]
null
null
null
pipuchun/jsonuz.py
SarvarRaxmonov/december-2
2242504ebc3d80ef3c3574f360014854ae6b4191
[ "BSD-2-Clause" ]
null
null
null
pipuchun/jsonuz.py
SarvarRaxmonov/december-2
2242504ebc3d80ef3c3574f360014854ae6b4191
[ "BSD-2-Clause" ]
null
null
null
from attr import dataclass #s4 teng https://t.me/shuraim1/https:/ #S5 teng https://t.me/alquran30juzsaadalghamidi/5 #s6 teng https://t.me/bandar_abdulaziz_balilah/5 #s7 teng https://t.me/Idriss_Akbar/388 #s8 teng https://t.me/yasseraldosari_mp3/2 sura = { '0': {'s1':'42', 's2':'257', 's3':'18', 's4':...
74.244444
112
0.348623
from attr import dataclass sura = { '0': {'s1':'42', 's2':'257', 's3':'18', 's4':'3', 's5':'5', 's6':'5', 's7':'388', 's8':'2',}, '1': {'s1':'42', 's2':'257', 's3':'18', 's4':'3', 's5':'5', 's6':'5', 's7':'388', 's8':'2',}, '2': {'s1':'43', 's2':'258', 's3':'19', 's4':'4', 's5':'6', 's6':'...
true
true
79007be5a1da74db592812aa109c49a900c86fac
5,830
py
Python
arviz/plots/backends/bokeh/elpdplot.py
StanczakDominik/arviz
ec33b4cc7d4a6d5ba95a87a43ef226a49c2cb287
[ "Apache-2.0" ]
1
2020-08-09T00:16:00.000Z
2020-08-09T00:16:00.000Z
arviz/plots/backends/bokeh/elpdplot.py
StanczakDominik/arviz
ec33b4cc7d4a6d5ba95a87a43ef226a49c2cb287
[ "Apache-2.0" ]
null
null
null
arviz/plots/backends/bokeh/elpdplot.py
StanczakDominik/arviz
ec33b4cc7d4a6d5ba95a87a43ef226a49c2cb287
[ "Apache-2.0" ]
null
null
null
"""Bokeh ELPDPlot.""" import warnings import bokeh.plotting as bkp from bokeh.models.annotations import Title from bokeh.models import ColumnDataSource import bokeh.models.markers as mk import numpy as np from . import backend_kwarg_defaults from .. import show_layout from ...plot_utils import _scale_fig_size from .....
31.857923
100
0.521269
import warnings import bokeh.plotting as bkp from bokeh.models.annotations import Title from bokeh.models import ColumnDataSource import bokeh.models.markers as mk import numpy as np from . import backend_kwarg_defaults from .. import show_layout from ...plot_utils import _scale_fig_size from ....rcparams import rcPa...
true
true
79007c29559197cb19fd892b091706f5a462f53b
1,108
py
Python
models/__init__.py
tom-bird/binary-gen-models
a9311d27d74e25eb55d1b06295ac8a121b5c1d7b
[ "MIT" ]
null
null
null
models/__init__.py
tom-bird/binary-gen-models
a9311d27d74e25eb55d1b06295ac8a121b5c1d7b
[ "MIT" ]
null
null
null
models/__init__.py
tom-bird/binary-gen-models
a9311d27d74e25eb55d1b06295ac8a121b5c1d7b
[ "MIT" ]
1
2021-12-23T07:19:01.000Z
2021-12-23T07:19:01.000Z
from models.flowpp_cifar import CifarFlowPP from models.rvae import RVAE from models.modules import init_mode model_registry = { # MNIST 'rvae_mnist': lambda **kwargs: RVAE(z_size=16, h_size=40, kl_min=0.1, x_channels=1, **kwargs), # CIFAR 'tiny_rvae': lambda *...
48.173913
125
0.611011
from models.flowpp_cifar import CifarFlowPP from models.rvae import RVAE from models.modules import init_mode model_registry = { 'rvae_mnist': lambda **kwargs: RVAE(z_size=16, h_size=40, kl_min=0.1, x_channels=1, **kwargs), 'tiny_rvae': lambda **kwargs: RVAE(...
true
true
79007c38395c17a6662c23f9e9a775f69e266f08
618
py
Python
src/azure-cli/azure/cli/__init__.py
KTH/azure-cli
58aa9e320ea7c5213b4517172eaf71b3f5230fd6
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/__init__.py
KTH/azure-cli
58aa9e320ea7c5213b4517172eaf71b3f5230fd6
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/__init__.py
KTH/azure-cli
58aa9e320ea7c5213b4517172eaf71b3f5230fd6
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
41.2
94
0.548544
import pkg_resources pkg_resources.declare_namespace(__name__) __author__ = "Microsoft Corporation <python@microsoft.com>" __version__ = "2.0.17+dev"
true
true
79007d05640bf10fdc335a8c6baaea6d43ec2d3c
965
py
Python
spinbot/policy/executor.py
rantav/spinnaker
98fb0c77db8fc723fd705ae6b663a8cbbd348fdb
[ "Apache-2.0" ]
null
null
null
spinbot/policy/executor.py
rantav/spinnaker
98fb0c77db8fc723fd705ae6b663a8cbbd348fdb
[ "Apache-2.0" ]
null
null
null
spinbot/policy/executor.py
rantav/spinnaker
98fb0c77db8fc723fd705ae6b663a8cbbd348fdb
[ "Apache-2.0" ]
1
2018-05-27T01:49:01.000Z
2018-05-27T01:49:01.000Z
import policy import traceback import logging import monitoring import itertools from .policy_registry import GetConfig def ApplyPolicies(g): config = GetConfig() enabled = config.get('enabled', True) if enabled is not None and not enabled: return monitoring_db = monitoring.GetDatabase('spinbo...
29.242424
76
0.516062
import policy import traceback import logging import monitoring import itertools from .policy_registry import GetConfig def ApplyPolicies(g): config = GetConfig() enabled = config.get('enabled', True) if enabled is not None and not enabled: return monitoring_db = monitoring.GetDatabase('spinbo...
true
true
79007d4daee3fde52f1097d538b2484e3f5cc41b
257
py
Python
nba_stats/manage.py
sparbz/nba-stats
c62437145551a90c6b4f4d2d8cfc26fb24002ab5
[ "MIT" ]
1
2021-12-13T14:55:42.000Z
2021-12-13T14:55:42.000Z
nba_stats/manage.py
sparbz/nba-stats
c62437145551a90c6b4f4d2d8cfc26fb24002ab5
[ "MIT" ]
null
null
null
nba_stats/manage.py
sparbz/nba-stats
c62437145551a90c6b4f4d2d8cfc26fb24002ab5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nba_stats.settings.base") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
23.363636
78
0.774319
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nba_stats.settings.base") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
79007d5b8ec7c37cab25ce2888d47369bb4eb40a
10,403
py
Python
tutorial/deprecated/tutorial_a2c_with_infinite_env/a2c.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
281
2021-01-13T14:20:23.000Z
2022-03-23T08:46:56.000Z
tutorial/deprecated/tutorial_a2c_with_infinite_env/a2c.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
2
2021-01-22T23:28:34.000Z
2021-04-29T22:05:42.000Z
tutorial/deprecated/tutorial_a2c_with_infinite_env/a2c.py
Purple-PI/rlstructures
9b201b083715bbda2f3534b010c84e11dfc0a1c7
[ "MIT" ]
13
2021-01-15T14:53:32.000Z
2022-03-22T11:12:54.000Z
# # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from rlstructures.logger import Logger, TFLogger from rlstructures import DictTensor, TemporalDictTensor from rlstructures import logging...
42.461224
136
0.612323
from rlstructures.logger import Logger, TFLogger from rlstructures import DictTensor, TemporalDictTensor from rlstructures import logging from rlstructures.tools import weight_init from rlstructures.batchers import EpisodeBatcher, Batcher import torch.nn as nn import copy import torch import time import numpy a...
true
true
79007e3008a8365164b9152fcc8762c21b1520ff
7,922
py
Python
home/blocks.py
edmoss94/iogt
14bf8d412480c56d7df2cbfed73e7f887a423ca0
[ "BSD-2-Clause" ]
null
null
null
home/blocks.py
edmoss94/iogt
14bf8d412480c56d7df2cbfed73e7f887a423ca0
[ "BSD-2-Clause" ]
null
null
null
home/blocks.py
edmoss94/iogt
14bf8d412480c56d7df2cbfed73e7f887a423ca0
[ "BSD-2-Clause" ]
null
null
null
from django.forms.utils import flatatt from django.utils.html import format_html, format_html_join from django.utils.translation import gettext as _ from wagtail.core import blocks from wagtail.core.blocks import PageChooserBlock from wagtail.images.blocks import ImageChooserBlock from wagtailmarkdown.utils import ren...
38.086538
314
0.639611
from django.forms.utils import flatatt from django.utils.html import format_html, format_html_join from django.utils.translation import gettext as _ from wagtail.core import blocks from wagtail.core.blocks import PageChooserBlock from wagtail.images.blocks import ImageChooserBlock from wagtailmarkdown.utils import ren...
true
true
79007e4badd498a950c662525c89abe52545285a
750
py
Python
Chapter16/B07333_16.py
monocilindro/Mastering-Geospatial-Analysis-with-Python
2cee571403aa0d96f6c2eb7400792286a81dc7e9
[ "MIT" ]
64
2018-05-04T16:54:59.000Z
2022-03-22T11:26:21.000Z
Chapter16/B07333_16.py
monocilindro/Mastering-Geospatial-Analysis-with-Python
2cee571403aa0d96f6c2eb7400792286a81dc7e9
[ "MIT" ]
1
2020-05-31T00:45:28.000Z
2020-05-31T18:29:07.000Z
Chapter16/B07333_16.py
monocilindro/Mastering-Geospatial-Analysis-with-Python
2cee571403aa0d96f6c2eb7400792286a81dc7e9
[ "MIT" ]
41
2018-05-10T21:31:44.000Z
2022-03-23T11:12:33.000Z
from pywebhdfs.webhdfs import PyWebHdfsClient as h hdfs=h(host='sandbox.hortonworks.com',port='50070',user_name='raj_ops') ls=hdfs.list_dir('/') ls['FileStatuses']['FileStatus'][0] hdfs.make_dir('/samples',permission=755) f=open('/home/pcrickard/sample.csv') d=f.read() hdfs.create_file('/samples/sample.csv',...
24.193548
108
0.736
from pywebhdfs.webhdfs import PyWebHdfsClient as h hdfs=h(host='sandbox.hortonworks.com',port='50070',user_name='raj_ops') ls=hdfs.list_dir('/') ls['FileStatuses']['FileStatus'][0] hdfs.make_dir('/samples',permission=755) f=open('/home/pcrickard/sample.csv') d=f.read() hdfs.create_file('/samples/sample.csv',...
true
true
79007e94ecd758fc62cd5859d388611b64fbad63
3,475
py
Python
compute_cross_validation_accuracy.py
imatge-upc/sentiment-2015-asm
50cc4793f8dc49fbe6cc9fb489b7bac986ad1769
[ "MIT" ]
23
2016-03-17T01:23:32.000Z
2020-10-20T21:26:52.000Z
compute_cross_validation_accuracy.py
imatge-upc/sentiment-2015-asm
50cc4793f8dc49fbe6cc9fb489b7bac986ad1769
[ "MIT" ]
null
null
null
compute_cross_validation_accuracy.py
imatge-upc/sentiment-2015-asm
50cc4793f8dc49fbe6cc9fb489b7bac986ad1769
[ "MIT" ]
11
2016-03-17T00:29:02.000Z
2020-03-11T10:17:22.000Z
import os import sys import numpy as np import caffe import argparse parser = argparse.ArgumentParser(description='Computes 5-fold cross-validation results over Twitter five-agrees dataset') parser.add_argument('-ov', '--oversampling', help='Enables (1) or disables (0) oversampling') args = parser.parse_args() if ar...
31.590909
160
0.58964
import os import sys import numpy as np import caffe import argparse parser = argparse.ArgumentParser(description='Computes 5-fold cross-validation results over Twitter five-agrees dataset') parser.add_argument('-ov', '--oversampling', help='Enables (1) or disables (0) oversampling') args = parser.parse_args() if ar...
false
true
79007ebec61d88afa730d5d80b21c80553ae66fe
2,849
py
Python
examples/undocumented/python/classifier_multiclass_ecoc.py
shiyi001/shogun
287f02d11d5914ded2d410ab9c6f38712e11ca2b
[ "BSD-3-Clause" ]
1
2019-08-17T21:19:20.000Z
2019-08-17T21:19:20.000Z
examples/undocumented/python/classifier_multiclass_ecoc.py
shiyi001/shogun
287f02d11d5914ded2d410ab9c6f38712e11ca2b
[ "BSD-3-Clause" ]
null
null
null
examples/undocumented/python/classifier_multiclass_ecoc.py
shiyi001/shogun
287f02d11d5914ded2d410ab9c6f38712e11ca2b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import re import time from tools.multiclass_shared import prepare_data # run with toy data [traindat, label_traindat, testdat, label_testdat] = prepare_data() # run with opt-digits if available #[traindat, label_traindat, testdat, label_testdat] = prepare_data(False) parameter_list = [[traindat,...
31.655556
180
0.703054
import re import time from tools.multiclass_shared import prepare_data [traindat, label_traindat, testdat, label_testdat] = prepare_data() parameter_list = [[traindat,testdat,label_traindat,label_testdat,2.1,1,1e-5]] def classifier_multiclass_ecoc (fm_train_real=traindat,fm_test_real=testdat,label_train_multicla...
true
true
79007f2aede10988ac32470b1deeb150a8562e17
304
py
Python
2016/day5/p1.py
CheyenneWills/adventofcode
7ab9e57420225df121c1702a144e659c4aa93abb
[ "MIT" ]
null
null
null
2016/day5/p1.py
CheyenneWills/adventofcode
7ab9e57420225df121c1702a144e659c4aa93abb
[ "MIT" ]
null
null
null
2016/day5/p1.py
CheyenneWills/adventofcode
7ab9e57420225df121c1702a144e659c4aa93abb
[ "MIT" ]
null
null
null
#!/usr/bin/python import hashlib import sys v = sys.argv[1] index = 0 pw = '' i = 0 while True: suffix = str(i) h = hashlib.md5(v+suffix).hexdigest() if h.startswith("00000"): pw += h[5] print(v+suffix,h,pw) if len(pw) == 8: break i += 1 print(pw)
13.818182
41
0.519737
import hashlib import sys v = sys.argv[1] index = 0 pw = '' i = 0 while True: suffix = str(i) h = hashlib.md5(v+suffix).hexdigest() if h.startswith("00000"): pw += h[5] print(v+suffix,h,pw) if len(pw) == 8: break i += 1 print(pw)
true
true
79007f52c35861bbe1c7777310341169d517f95e
1,539
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractMichilunWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractMichilunWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractMichilunWordpressCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractMichilunWordpressCom(item): ''' Parser for 'michilun.wordpress.com' ''' bad = [ 'Recommendations and Reviews', ] if any([tmp in item['tags'] for tmp in bad]): return None vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title...
48.09375
145
0.499675
def extractMichilunWordpressCom(item): bad = [ 'Recommendations and Reviews', ] if any([tmp in item['tags'] for tmp in bad]): return None vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Side...
true
true
790080edbe85d5229310c1da80875e5f0b52e45e
2,381
py
Python
python/venv/lib/python2.7/site-packages/glanceclient/tests/unit/v2/test_tags.py
sjsucohort6/openstack
8471e6e599c3f52319926a582358358ef84cbadb
[ "MIT" ]
null
null
null
python/venv/lib/python2.7/site-packages/glanceclient/tests/unit/v2/test_tags.py
sjsucohort6/openstack
8471e6e599c3f52319926a582358358ef84cbadb
[ "MIT" ]
null
null
null
python/venv/lib/python2.7/site-packages/glanceclient/tests/unit/v2/test_tags.py
sjsucohort6/openstack
8471e6e599c3f52319926a582358358ef84cbadb
[ "MIT" ]
null
null
null
# Copyright 2013 OpenStack Foundation # 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 requ...
29.036585
79
0.563209
import testtools from glanceclient.tests import utils from glanceclient.v2 import image_tags IMAGE = '3a4560a1-e585-443e-9b39-553b46ec92d1' TAG = 'tag01' data_fixtures = { '/v2/images/{image}/tags/{tag_value}'.format(image=IMAGE, tag_value=TAG): { 'DELETE': ( {}, ...
true
true
79008235953bbbe582044bf8ee8caeea5c772543
268
py
Python
reports/urls.py
peachman05/Pwcrew
6aa340a92ed5833c34f7d3d5c27b132ab413aebb
[ "MIT" ]
null
null
null
reports/urls.py
peachman05/Pwcrew
6aa340a92ed5833c34f7d3d5c27b132ab413aebb
[ "MIT" ]
2
2020-02-12T00:20:27.000Z
2020-06-05T18:05:39.000Z
reports/urls.py
peachman05/Pwcrew
6aa340a92ed5833c34f7d3d5c27b132ab413aebb
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views app_name = 'reports' urlpatterns = [ # url(r'^graph/', views.graph, name='graph'), url(r'^graph/', views.statistics, name='graph'), url(r'^csv_export/', views.csv_export, name='csv_export'), ]
19.142857
63
0.641791
from django.conf.urls import url from . import views app_name = 'reports' urlpatterns = [ url(r'^graph/', views.statistics, name='graph'), url(r'^csv_export/', views.csv_export, name='csv_export'), ]
true
true
790082a1c02ad39abeb0db3be487b020fa424e09
7,292
py
Python
gym_collision_avoidance/envs/policies/SOCIALFORCEPolicy.py
meghdeepj/Social-Navigation-Simulator
806d304081bf5ff4fc7a0a58defb050627375865
[ "MIT" ]
3
2021-12-16T05:39:14.000Z
2022-02-25T06:07:51.000Z
gym_collision_avoidance/envs/policies/SOCIALFORCEPolicy.py
meghdeepj/Social-Navigation-Simulator
806d304081bf5ff4fc7a0a58defb050627375865
[ "MIT" ]
null
null
null
gym_collision_avoidance/envs/policies/SOCIALFORCEPolicy.py
meghdeepj/Social-Navigation-Simulator
806d304081bf5ff4fc7a0a58defb050627375865
[ "MIT" ]
1
2021-11-09T18:04:01.000Z
2021-11-09T18:04:01.000Z
import os import math import sys import torch import numpy as np from gym_collision_avoidance.envs.policies.InternalPolicy import InternalPolicy from gym_collision_avoidance.envs import Config from gym_collision_avoidance.envs.util import * from gym_collision_avoidance.envs.policies import socialforce import copy i...
44.193939
242
0.63124
import os import math import sys import torch import numpy as np from gym_collision_avoidance.envs.policies.InternalPolicy import InternalPolicy from gym_collision_avoidance.envs import Config from gym_collision_avoidance.envs.util import * from gym_collision_avoidance.envs.policies import socialforce import copy i...
true
true
7900838e788ae6b4d57aa7073fd1b705cd756d64
3,743
py
Python
deeptutor/scripts/run.py
ManavR123/cs_285_project
2a0496345c2a8de06338ae7e44ca3775a9291f4c
[ "MIT" ]
null
null
null
deeptutor/scripts/run.py
ManavR123/cs_285_project
2a0496345c2a8de06338ae7e44ca3775a9291f4c
[ "MIT" ]
null
null
null
deeptutor/scripts/run.py
ManavR123/cs_285_project
2a0496345c2a8de06338ae7e44ca3775a9291f4c
[ "MIT" ]
null
null
null
import os import pickle import numpy as np from tqdm import tqdm from deeptutor.envs.DashEnv import * from deeptutor.envs.EFCEnv import EFCEnv from deeptutor.envs.HRLEnv import * from deeptutor.infrastructure.utils import * from deeptutor.tutors.LeitnerTutor import LeitnerTutor from deeptutor.tutors.RandTutor import ...
33.419643
94
0.583222
import os import pickle import numpy as np from tqdm import tqdm from deeptutor.envs.DashEnv import * from deeptutor.envs.EFCEnv import EFCEnv from deeptutor.envs.HRLEnv import * from deeptutor.infrastructure.utils import * from deeptutor.tutors.LeitnerTutor import LeitnerTutor from deeptutor.tutors.RandTutor import ...
true
true
790083cffbbe481ab01c97be8c70d2138b48d2bd
765
py
Python
UFV---Python/Trabalho Mat. Disc/grafo_4675.py
Vith-MCB/UFV
9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69
[ "MIT" ]
1
2022-01-25T16:52:26.000Z
2022-01-25T16:52:26.000Z
UFV---Python/Trabalho Mat. Disc/grafo_4675.py
Vith-MCB/UFV
9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69
[ "MIT" ]
null
null
null
UFV---Python/Trabalho Mat. Disc/grafo_4675.py
Vith-MCB/UFV
9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69
[ "MIT" ]
null
null
null
n = int(input()) c = int(input()) lista = input().split() graph = [[0 for i in range(n)] for j in range(n)] cont = 0 for i in range(n): for j in range(n): graph[i][j] = int(lista[cont]) cont += 1 if i == j: graph[i][j] = 0 listaMemoria = [c] contaminados = [] contaminados.append(...
23.181818
49
0.48366
n = int(input()) c = int(input()) lista = input().split() graph = [[0 for i in range(n)] for j in range(n)] cont = 0 for i in range(n): for j in range(n): graph[i][j] = int(lista[cont]) cont += 1 if i == j: graph[i][j] = 0 listaMemoria = [c] contaminados = [] contaminados.append(...
true
true
7900842d1de4c679c0408de823a276a7a34c2f18
514
py
Python
api/migrations/0003_alter_profile_year.py
EricLiclair/testapi
f8a139a0fe4e3ada0256ef62a4603c3e9f682b3e
[ "MIT" ]
1
2021-05-19T18:06:14.000Z
2021-05-19T18:06:14.000Z
api/migrations/0003_alter_profile_year.py
EricLiclair/testapi
f8a139a0fe4e3ada0256ef62a4603c3e9f682b3e
[ "MIT" ]
null
null
null
api/migrations/0003_alter_profile_year.py
EricLiclair/testapi
f8a139a0fe4e3ada0256ef62a4603c3e9f682b3e
[ "MIT" ]
null
null
null
# Generated by Django 3.2.3 on 2021-05-19 08:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0002_auto_20210519_0849'), ] operations = [ migrations.AlterField( model_name='profile', name='year', ...
27.052632
183
0.589494
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0002_auto_20210519_0849'), ] operations = [ migrations.AlterField( model_name='profile', name='year', field=models.CharField(blank=True, choices...
true
true
790084f9ace02acaaccaabb3d8aea61f0232d7d6
6,536
py
Python
WikidataClaims/wikidata_utils.py
gabrielmaia7/WDV
13810bd80e2c64956018b5ae508f6eb582deaf3c
[ "CC0-1.0" ]
null
null
null
WikidataClaims/wikidata_utils.py
gabrielmaia7/WDV
13810bd80e2c64956018b5ae508f6eb582deaf3c
[ "CC0-1.0" ]
null
null
null
WikidataClaims/wikidata_utils.py
gabrielmaia7/WDV
13810bd80e2c64956018b5ae508f6eb582deaf3c
[ "CC0-1.0" ]
null
null
null
import json import random import uuid import numpy as np import time import requests import traceback import pdb import math import ast import pandas as pd import pickle from qwikidata.linked_data_interface import get_entity_dict_from_api from qwikidata.sparql import return_sparql_query_results from urllib3.exceptions...
37.780347
109
0.54896
import json import random import uuid import numpy as np import time import requests import traceback import pdb import math import ast import pandas as pd import pickle from qwikidata.linked_data_interface import get_entity_dict_from_api from qwikidata.sparql import return_sparql_query_results from urllib3.exceptions...
true
true
790085365ebd23f819887fcda5629c8a482ab07c
428
py
Python
python_learn/cli.py
Zhazhanan/python_learn
8eb797ae4f85abbb31a9dadd570172538b05d68f
[ "MIT" ]
null
null
null
python_learn/cli.py
Zhazhanan/python_learn
8eb797ae4f85abbb31a9dadd570172538b05d68f
[ "MIT" ]
null
null
null
python_learn/cli.py
Zhazhanan/python_learn
8eb797ae4f85abbb31a9dadd570172538b05d68f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for python_learn.""" import sys import click @click.command() def main(args=None): """Console script for python_learn.""" click.echo("Replace this message by putting your code into " "python_learn.cli.main") click.echo("See click documentation at h...
22.526316
68
0.649533
import sys import click @click.command() def main(args=None): click.echo("Replace this message by putting your code into " "python_learn.cli.main") click.echo("See click documentation at http://click.pocoo.org/") return 0 if __name__ == "__main__": sys.exit(main())
true
true
7900859c019d2d11547ae17267d55ba82a881c23
1,251
py
Python
froide/georegion/admin.py
lanmarc77/froide
bddc8bb27c8a7c2a959003dda724194948bc381a
[ "MIT" ]
null
null
null
froide/georegion/admin.py
lanmarc77/froide
bddc8bb27c8a7c2a959003dda724194948bc381a
[ "MIT" ]
null
null
null
froide/georegion/admin.py
lanmarc77/froide
bddc8bb27c8a7c2a959003dda724194948bc381a
[ "MIT" ]
null
null
null
from django.contrib.gis import admin from django import forms from django.utils.translation import gettext_lazy as _ from treebeard.forms import movenodeform_factory from froide.helper.admin_utils import ForeignKeyFilter from froide.helper.forms import get_fk_raw_id_widget from .models import GeoRegion class GeoRe...
26.617021
77
0.704237
from django.contrib.gis import admin from django import forms from django.utils.translation import gettext_lazy as _ from treebeard.forms import movenodeform_factory from froide.helper.admin_utils import ForeignKeyFilter from froide.helper.forms import get_fk_raw_id_widget from .models import GeoRegion class GeoRe...
true
true
790086155fac3be5e7a46c4cd0fb18fbd1b1b996
3,702
py
Python
yardstick/dispatcher/http.py
kkltcjk/kklt
5388eb439616a442dde496ef77ba6b71169369e0
[ "Apache-2.0" ]
null
null
null
yardstick/dispatcher/http.py
kkltcjk/kklt
5388eb439616a442dde496ef77ba6b71169369e0
[ "Apache-2.0" ]
null
null
null
yardstick/dispatcher/http.py
kkltcjk/kklt
5388eb439616a442dde496ef77ba6b71169369e0
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 IBM Corp # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.257143
79
0.603998
from __future__ import absolute_import import logging import os from oslo_serialization import jsonutils import requests from oslo_config import cfg from yardstick.dispatcher.base import Base as DispatchBase LOG = logging.getLogger(__name__) CONF = cfg.CONF http_dispatcher_opts = [ cfg.StrOpt...
true
true
7900865b0a88c5c3cbe2f710190bbfd3e535d0ca
1,159
py
Python
test.py
linkinpark213/pytorch-lstm-toy
a89eba74a3606dab125d394e63e4a585319227f1
[ "MIT" ]
1
2019-03-04T12:52:48.000Z
2019-03-04T12:52:48.000Z
test.py
linkinpark213/pytorch-lstm-toy
a89eba74a3606dab125d394e63e4a585319227f1
[ "MIT" ]
null
null
null
test.py
linkinpark213/pytorch-lstm-toy
a89eba74a3606dab125d394e63e4a585319227f1
[ "MIT" ]
null
null
null
import torch import numpy as np import torch.utils.data from net import SurnameLSTM from data import SurnameDataset if __name__ == '__main__': net = SurnameLSTM() state_dict = torch.load('model.pth') net.load_state_dict(state_dict) dataset = SurnameDataset(subset='val') data_loader = torch.utils.d...
36.21875
113
0.670406
import torch import numpy as np import torch.utils.data from net import SurnameLSTM from data import SurnameDataset if __name__ == '__main__': net = SurnameLSTM() state_dict = torch.load('model.pth') net.load_state_dict(state_dict) dataset = SurnameDataset(subset='val') data_loader = torch.utils.d...
true
true
79008666505b0b62a5773e50f987def871a3d604
33
py
Python
snowflake/__init__.py
ronmorgen1/snowflake
f038179c7188021757085938a0de5aadf6dc5e5b
[ "MIT" ]
null
null
null
snowflake/__init__.py
ronmorgen1/snowflake
f038179c7188021757085938a0de5aadf6dc5e5b
[ "MIT" ]
null
null
null
snowflake/__init__.py
ronmorgen1/snowflake
f038179c7188021757085938a0de5aadf6dc5e5b
[ "MIT" ]
null
null
null
from .snowflake import Snowflake
16.5
32
0.848485
from .snowflake import Snowflake
true
true
79008843893bdfe70a74c1a6220f5194a815a42a
7,876
py
Python
djangocms_content_expiry/filters.py
Aiky30/djangocms-content-expiry
da7d348bcdafbf1a9862e4cc69a8363b3305a31a
[ "BSD-3-Clause" ]
null
null
null
djangocms_content_expiry/filters.py
Aiky30/djangocms-content-expiry
da7d348bcdafbf1a9862e4cc69a8363b3305a31a
[ "BSD-3-Clause" ]
null
null
null
djangocms_content_expiry/filters.py
Aiky30/djangocms-content-expiry
da7d348bcdafbf1a9862e4cc69a8363b3305a31a
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from djangocms_versioning.constants import PUBLISHED, VERSION_STATES from djangocms_versioning.versionables import _cms_exte...
39.38
104
0.660995
from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from djangocms_versioning.constants import PUBLISHED, VERSION_STATES from djangocms_versioning.versionables import _cms_exte...
true
true
790088f8725b3e8ddf7030d651106d346da97c47
2,299
py
Python
main.py
ronaldosvieira/rl
01e7ac1a6fabe7a74171ce45e220232fdb23280b
[ "MIT" ]
null
null
null
main.py
ronaldosvieira/rl
01e7ac1a6fabe7a74171ce45e220232fdb23280b
[ "MIT" ]
null
null
null
main.py
ronaldosvieira/rl
01e7ac1a6fabe7a74171ce45e220232fdb23280b
[ "MIT" ]
null
null
null
import numpy as np class Reward: pass class StaticReward(Reward): def __init__(self, value): self.value = value def get(self): return value class NormalReward(Reward): def __init__(self, mean, std): self.mean = mean self.std = std def get(self): return np.random.normal(self.mean, self.std) class Ba...
19
67
0.634624
import numpy as np class Reward: pass class StaticReward(Reward): def __init__(self, value): self.value = value def get(self): return value class NormalReward(Reward): def __init__(self, mean, std): self.mean = mean self.std = std def get(self): return np.random.normal(self.mean, self.std) class Ba...
true
true
7900898f9f8008a4e46806f3f1252a15b99d1937
1,362
py
Python
Scripts/simulation/objects/gardening/gardening_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/objects/gardening/gardening_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/objects/gardening/gardening_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\objects\gardening\gardening_commands.py # Compiled at: 2017-11-18 00:09:10 # Size of source mod 2**3...
59.217391
237
0.769457
from objects.components import types from objects.components.types import GARDENING_COMPONENT from objects.gardening.gardening_component_fruit import GardeningFruitComponent import services, sims4.commands @sims4.commands.Command('gardening.cleanup_gardening_objects') def cleanup_gardening_objects(_connection=No...
true
true
790089f17aaa7dc2c04e2eee9c2f24433b4d5faa
4,326
py
Python
test/sampleData/micropython/MCP4725.py
polfeliu/cyanobyte
94fb8b8ea6c226e7e5f2a42d39356c75693d4093
[ "Apache-2.0" ]
70
2019-03-15T03:38:00.000Z
2022-03-16T20:31:10.000Z
test/sampleData/micropython/MCP4725.py
polfeliu/cyanobyte
94fb8b8ea6c226e7e5f2a42d39356c75693d4093
[ "Apache-2.0" ]
193
2019-03-15T21:33:40.000Z
2021-06-04T22:19:02.000Z
test/sampleData/micropython/MCP4725.py
polfeliu/cyanobyte
94fb8b8ea6c226e7e5f2a42d39356c75693d4093
[ "Apache-2.0" ]
40
2019-03-15T21:41:51.000Z
2021-06-18T14:56:33.000Z
# Copyright (C) 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
25.597633
74
0.561258
from machine import I2C DIGITALOUT_GND = 0 DIGITALOUT_VCC = 4095 def _swap_endian(val, length): if length <= 8: return val if length <= 16: return (val & 0xFF00) >> 8 | (val & 0xFF) << 8 if length <= 32: return ((val & 0xFF000000) >> 24 | (val & ...
true
true
79008a2efedb45c51d08c60502ccbaf1876ca9f7
920
py
Python
Datacamp Assignments/Data Engineer Track/2. Streamlined Data Ingestion with pandas/11_select_multiple_sheets.py
Ali-Parandeh/Data_Science_Playground
c529e9b3692381572de259e7c93938d6611d83da
[ "MIT" ]
null
null
null
Datacamp Assignments/Data Engineer Track/2. Streamlined Data Ingestion with pandas/11_select_multiple_sheets.py
Ali-Parandeh/Data_Science_Playground
c529e9b3692381572de259e7c93938d6611d83da
[ "MIT" ]
null
null
null
Datacamp Assignments/Data Engineer Track/2. Streamlined Data Ingestion with pandas/11_select_multiple_sheets.py
Ali-Parandeh/Data_Science_Playground
c529e9b3692381572de259e7c93938d6611d83da
[ "MIT" ]
1
2021-03-10T09:40:05.000Z
2021-03-10T09:40:05.000Z
# Load both the 2016 and 2017 sheets by name all_survey_data = pd.read_excel("fcc_survey.xlsx", sheet_name = ['2016', '2017']) # View the data type of all_survey_data print(type(all_survey_data)) ''' <script.py> output: <class 'collections.OrderedDict'> ''' # Load all sheets in the Excel file all_survey_data = ...
24.210526
134
0.691304
all_survey_data = pd.read_excel("fcc_survey.xlsx", sheet_name = ['2016', '2017']) print(type(all_survey_data)) all_survey_data = pd.read_excel("fcc_survey.xlsx", sheet_name = [0, '2017']) print(all_survey_data.keys()) all_survey_data = pd.read_excel("fcc_survey.xlsx", sheet_...
true
true
79008c449364184a0d0e8188613d9ef7d1068736
304
py
Python
Jogo_pong/telas/Telas.py
LivioAlvarenga/Tutoriais_Kivy_KivyMD
b6225578e764eaf0312afafbb2f76dc06f92342d
[ "MIT" ]
null
null
null
Jogo_pong/telas/Telas.py
LivioAlvarenga/Tutoriais_Kivy_KivyMD
b6225578e764eaf0312afafbb2f76dc06f92342d
[ "MIT" ]
null
null
null
Jogo_pong/telas/Telas.py
LivioAlvarenga/Tutoriais_Kivy_KivyMD
b6225578e764eaf0312afafbb2f76dc06f92342d
[ "MIT" ]
null
null
null
from kivy.uix.screenmanager import Screen # Declara o Menu do Jogo class TelaMenu(Screen): pass # Declara a Tela do Pong class TelaJogo(Screen): pass # Declara a Tela do Vencedor 3 class TelaVencedor1(Screen): pass # Declara a Tela do Vencedor 2 class TelaVencedor2(Screen): pass
13.818182
41
0.723684
from kivy.uix.screenmanager import Screen class TelaMenu(Screen): pass class TelaJogo(Screen): pass class TelaVencedor1(Screen): pass class TelaVencedor2(Screen): pass
true
true
79008de7f081da56651a4cbca42a20e74befdd80
405
py
Python
cryptocurrency/asgi.py
deepanshu-jain1999/cryptocurrencytracking
1feb8f14e7615406b0658138d23314188f8f0e8b
[ "Apache-2.0" ]
null
null
null
cryptocurrency/asgi.py
deepanshu-jain1999/cryptocurrencytracking
1feb8f14e7615406b0658138d23314188f8f0e8b
[ "Apache-2.0" ]
null
null
null
cryptocurrency/asgi.py
deepanshu-jain1999/cryptocurrencytracking
1feb8f14e7615406b0658138d23314188f8f0e8b
[ "Apache-2.0" ]
null
null
null
""" ASGI config for cryptocurrency project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cryptocurrency.settings') application = get_asgi_application()
true
true
79008def7b93a1c135e4d7e9a69307b976e509be
738
py
Python
task04_a.py
mboehn/aoc2017
1bf5302c6e566e8454d3e567cfac38945c8fe955
[ "MIT" ]
null
null
null
task04_a.py
mboehn/aoc2017
1bf5302c6e566e8454d3e567cfac38945c8fe955
[ "MIT" ]
null
null
null
task04_a.py
mboehn/aoc2017
1bf5302c6e566e8454d3e567cfac38945c8fe955
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math import csv import itertools from pprint import pprint import func INPUTFILE = './task04.input' def main(): accept = 0 with open(INPUTFILE, mode='r') as csvfile: reader = csv.reader(csvfile, delimiter=" ") lines = list(reader) for line in lines: ...
20.5
67
0.533875
import math import csv import itertools from pprint import pprint import func INPUTFILE = './task04.input' def main(): accept = 0 with open(INPUTFILE, mode='r') as csvfile: reader = csv.reader(csvfile, delimiter=" ") lines = list(reader) for line in lines: reject_line...
true
true
79008e11a6fb20f17dc3953d8d2d9eae4c92b402
1,216
py
Python
manager/setup.py
dadiboyena/data-science-toolbox
7ebeb4525eb394e33f60711181d48a42d14dfd15
[ "BSD-2-Clause" ]
3
2016-05-27T15:28:38.000Z
2019-12-21T20:24:31.000Z
manager/setup.py
dadiboyena/data-science-toolbox
7ebeb4525eb394e33f60711181d48a42d14dfd15
[ "BSD-2-Clause" ]
null
null
null
manager/setup.py
dadiboyena/data-science-toolbox
7ebeb4525eb394e33f60711181d48a42d14dfd15
[ "BSD-2-Clause" ]
4
2017-02-25T12:20:26.000Z
2018-08-01T06:26:43.000Z
from setuptools import setup setup( name='dst', version='0.1.5', author='Jeroen Janssens', author_email='jeroen@jeroenjanssens.com', packages=['dst'], url='http://datasciencetoolbox.org', license='BSD', description='Data Science Toolbox -- Start doing data science in minutes.', long_...
34.742857
79
0.60773
from setuptools import setup setup( name='dst', version='0.1.5', author='Jeroen Janssens', author_email='jeroen@jeroenjanssens.com', packages=['dst'], url='http://datasciencetoolbox.org', license='BSD', description='Data Science Toolbox -- Start doing data science in minutes.', long_...
true
true
7900914a31a095a3108d7d97b8d979b136b28f38
3,611
py
Python
setup.py
MilanPecov/drf-yasg
b99306f71c6a5779b62189df7d9c1f5ea1c794ef
[ "BSD-3-Clause" ]
1
2021-05-09T01:28:42.000Z
2021-05-09T01:28:42.000Z
setup.py
MilanPecov/drf-yasg
b99306f71c6a5779b62189df7d9c1f5ea1c794ef
[ "BSD-3-Clause" ]
null
null
null
setup.py
MilanPecov/drf-yasg
b99306f71c6a5779b62189df7d9c1f5ea1c794ef
[ "BSD-3-Clause" ]
1
2021-07-16T09:12:23.000Z
2021-07-16T09:12:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import io import os import sys from setuptools import find_packages, setup def read_req(req_file): with open(os.path.join('requirements', req_file)) as req: return [line.strip() for line in req.readlines() if line.strip(...
33.747664
113
0.649405
from __future__ import print_function import io import os import sys from setuptools import find_packages, setup def read_req(req_file): with open(os.path.join('requirements', req_file)) as req: return [line.strip() for line in req.readlines() if line.strip() and not line.strip().startswith('#')] wi...
true
true
79009201b0e4eff7fec0864ca373b523090333ed
3,107
py
Python
benchmark/startCirq2615.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq2615.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq2615.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=39 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
36.127907
77
0.679112
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np from cirq.contrib.svg import SVGCircuit def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) ...
true
true
790092ce89e8abaddfefcac60002134d71e88e4f
402
py
Python
setup.py
berglen/qualprep
1d1265da1300d301a4f62b6431eefe3d77621115
[ "BSD-2-Clause" ]
null
null
null
setup.py
berglen/qualprep
1d1265da1300d301a4f62b6431eefe3d77621115
[ "BSD-2-Clause" ]
null
null
null
setup.py
berglen/qualprep
1d1265da1300d301a4f62b6431eefe3d77621115
[ "BSD-2-Clause" ]
null
null
null
from setuptools import find_packages, setup setup( name='qualprep', packages=find_packages(include=['qualprep']), version='0.1.1', description='Python library to prepare data', author='Lena Berger', license='MIT', install_requires=['pandas', 'numpy', 'tqdm'], setup_requires=['...
28.714286
50
0.641791
from setuptools import find_packages, setup setup( name='qualprep', packages=find_packages(include=['qualprep']), version='0.1.1', description='Python library to prepare data', author='Lena Berger', license='MIT', install_requires=['pandas', 'numpy', 'tqdm'], setup_requires=['...
true
true
790093ef012f9ba21519a7748f67e9b88ea1a8bc
887
py
Python
static_test/main.py
DefenderOfSockets/Calibration_IMU_MPU6050
46cb142ae4449fcf0f5441ea083713eba8bca884
[ "MIT" ]
null
null
null
static_test/main.py
DefenderOfSockets/Calibration_IMU_MPU6050
46cb142ae4449fcf0f5441ea083713eba8bca884
[ "MIT" ]
null
null
null
static_test/main.py
DefenderOfSockets/Calibration_IMU_MPU6050
46cb142ae4449fcf0f5441ea083713eba8bca884
[ "MIT" ]
null
null
null
from data_processing_calibration import DataProcessingCalibration if __name__ == "__main__": # Start processing dp_ST = DataProcessingCalibration() print("Initialize is successful.") # Open .csv file with data data_from_sensor = dp_ST.openFile('C://static_test.csv') print("Data was ...
36.958333
113
0.722661
from data_processing_calibration import DataProcessingCalibration if __name__ == "__main__": dp_ST = DataProcessingCalibration() print("Initialize is successful.") data_from_sensor = dp_ST.openFile('C://static_test.csv') print("Data was got.") data_orientation_ST = dp_ST...
true
true
790093fca60b14b07965e0139d66480b62804977
4,588
py
Python
nova/console/vmrc.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
7
2017-06-19T19:37:00.000Z
2019-06-16T02:06:14.000Z
nova/console/vmrc.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
null
null
null
nova/console/vmrc.py
bopopescu/nova-master
58809056f3a219c6ea3667003f906eeaf581fa95
[ "Apache-2.0" ]
6
2015-06-20T16:07:28.000Z
2020-08-19T14:57:59.000Z
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # 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...
32.309859
79
0.607672
import base64 from oslo.config import cfg from nova import exception from nova.openstack.common import jsonutils from nova.virt.vmwareapi import vim_util vmrc_opts = [ cfg.IntOpt('console_vmrc_port', default=443, help="Port for VMware VMRC connections"), cfg.Int...
true
true
7900954e9b27e49fd025c56ca1ab18a6e8667b43
14,230
py
Python
train_pose_euler_crop.py
msieb1/LTCN
c9432891327774edf8193e885cc4f10f53fcaa60
[ "MIT" ]
1
2020-08-21T03:47:33.000Z
2020-08-21T03:47:33.000Z
train_pose_euler_crop.py
msieb1/LTCN
c9432891327774edf8193e885cc4f10f53fcaa60
[ "MIT" ]
null
null
null
train_pose_euler_crop.py
msieb1/LTCN
c9432891327774edf8193e885cc4f10f53fcaa60
[ "MIT" ]
null
null
null
import matplotlib matplotlib.use('Agg') import os from os.path import join import argparse import torch import numpy as np import pickle import sys import datetime sys.path.append('./utils') from torch import optim from torch import nn from torch import multiprocessing from torch.optim import lr_scheduler from torch.a...
43.650307
169
0.646381
import matplotlib matplotlib.use('Agg') import os from os.path import join import argparse import torch import numpy as np import pickle import sys import datetime sys.path.append('./utils') from torch import optim from torch import nn from torch import multiprocessing from torch.optim import lr_scheduler from torch.a...
true
true
7900956706440cfd1fba67f66ccbf492b57d7cac
9,991
py
Python
corpus/text_cleaner.py
senisioi/Romanian-Transformers
45f4c4513fd0a5a81f4a20a5d63b4b9cd1d10b43
[ "MIT" ]
null
null
null
corpus/text_cleaner.py
senisioi/Romanian-Transformers
45f4c4513fd0a5a81f4a20a5d63b4b9cd1d10b43
[ "MIT" ]
null
null
null
corpus/text_cleaner.py
senisioi/Romanian-Transformers
45f4c4513fd0a5a81f4a20a5d63b4b9cd1d10b43
[ "MIT" ]
null
null
null
import re, multiprocessing from tqdm import tqdm import numpy as np class Cleaner(): def __init__(self, num_threads=1): # right now, it's single threaded self.num_threads = min(num_threads, int(multiprocessing.cpu_count()/2)) """ S- ar putea să fie necesar să- l recitiţi. """ sel...
40.946721
212
0.586828
import re, multiprocessing from tqdm import tqdm import numpy as np class Cleaner(): def __init__(self, num_threads=1): self.num_threads = min(num_threads, int(multiprocessing.cpu_count()/2)) self.r1 = re.compile(r"([\w]+-)[\s]([\w]+)", re.IGNORECASE) self.r2 = re.compile(r"([\w]+/)\s([\w]+)...
true
true
7900956c420de46505e2863cdb1f71f64a9b7a69
364
py
Python
config.py
weigun/StressTest
10d747556e1b7ac95100b3e4d4b511ac6de45b4f
[ "MIT" ]
null
null
null
config.py
weigun/StressTest
10d747556e1b7ac95100b3e4d4b511ac6de45b4f
[ "MIT" ]
null
null
null
config.py
weigun/StressTest
10d747556e1b7ac95100b3e4d4b511ac6de45b4f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- TIME_OUT = 60 EXCEPT_FILE = ['test.py','login.py','mix.py'] class Api(object): login = "/api/users/login" user_info="/api/users/info" signin = "/api/users/sign/signIn" map = "/api/RedEnvelope/updateUserMap" find_redbag = "/api/RedEnvelope/findReds" get_redbag = "/api/re...
28
45
0.64011
TIME_OUT = 60 EXCEPT_FILE = ['test.py','login.py','mix.py'] class Api(object): login = "/api/users/login" user_info="/api/users/info" signin = "/api/users/sign/signIn" map = "/api/RedEnvelope/updateUserMap" find_redbag = "/api/RedEnvelope/findReds" get_redbag = "/api/redUser/getRed" test=...
true
true
79009598e7fa08dde69be3808af45c94fd029af7
13,112
py
Python
test/simulation_tests.py
gsmcwhirter/simulations
73d8349125d50394ecf126af672c35c703e07aeb
[ "MIT" ]
null
null
null
test/simulation_tests.py
gsmcwhirter/simulations
73d8349125d50394ecf126af672c35c703e07aeb
[ "MIT" ]
null
null
null
test/simulation_tests.py
gsmcwhirter/simulations
73d8349125d50394ecf126af672c35c703e07aeb
[ "MIT" ]
3
2016-08-24T15:40:25.000Z
2019-12-14T17:26:57.000Z
import simulations.simulation as simulation import simulations.simulation_runner as simrunner import cPickle import os import random import re import string import subprocess import sys from simulations.utils.optionparser import OptionParser from nose.tools import assert_equal from nose.tools import assert_raises de...
41.625397
171
0.616306
import simulations.simulation as simulation import simulations.simulation_runner as simrunner import cPickle import os import random import re import string import subprocess import sys from simulations.utils.optionparser import OptionParser from nose.tools import assert_equal from nose.tools import assert_raises de...
true
true
7900959cc131e0703613025abcfc45610938cee5
886
py
Python
dc_plc/dc_plc/report/dc_product_procmap_stats/dc_product_procmap_stats.py
igrekus/dc_plc
76fbb6b1c98ff9d0de46f7979b76cd775834be79
[ "MIT" ]
3
2020-09-06T11:34:42.000Z
2022-03-12T04:52:58.000Z
dc_plc/dc_plc/report/dc_product_procmap_stats/dc_product_procmap_stats.py
igrekus/dc_plc
76fbb6b1c98ff9d0de46f7979b76cd775834be79
[ "MIT" ]
null
null
null
dc_plc/dc_plc/report/dc_product_procmap_stats/dc_product_procmap_stats.py
igrekus/dc_plc
76fbb6b1c98ff9d0de46f7979b76cd775834be79
[ "MIT" ]
5
2020-06-18T07:47:14.000Z
2022-01-13T06:33:46.000Z
# Copyright (c) 2013, igrekus and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from dc_plc.custom.utils import add_completeness, add_query_relevance from dc_plc.controllers.stats_query import get_procmap_stats def execute(f...
21.609756
85
0.749436
from __future__ import unicode_literals import frappe from frappe import _ from dc_plc.custom.utils import add_completeness, add_query_relevance from dc_plc.controllers.stats_query import get_procmap_stats def execute(filters=None): columns = get_columns() data = get_data(filters) return columns, data def g...
true
true
790095f4d4fec55b0efdf9ce1bda4f380bf62a12
3,229
py
Python
examples/semantic_indexing/biencoder_base_model.py
Elvisambition/PaddleNLP
4563c2d531850b92a10379e8c2639e3820762809
[ "Apache-2.0" ]
null
null
null
examples/semantic_indexing/biencoder_base_model.py
Elvisambition/PaddleNLP
4563c2d531850b92a10379e8c2639e3820762809
[ "Apache-2.0" ]
null
null
null
examples/semantic_indexing/biencoder_base_model.py
Elvisambition/PaddleNLP
4563c2d531850b92a10379e8c2639e3820762809
[ "Apache-2.0" ]
null
null
null
import paddle import paddle.nn as nn import paddle.nn.functional as F class BiEncoder(nn.Layer): def __init__(self,question_encoder,context_encoder,dropout,output_emb_size = 768,state=None): super(BiEncoder, self).__init__() self.state = state if self.state == None: self.questio...
37.988235
114
0.633013
import paddle import paddle.nn as nn import paddle.nn.functional as F class BiEncoder(nn.Layer): def __init__(self,question_encoder,context_encoder,dropout,output_emb_size = 768,state=None): super(BiEncoder, self).__init__() self.state = state if self.state == None: self.questio...
true
true
790097688658088fee2608d89e4b51b201dfef2b
421
py
Python
src/tools.py
r3w0p/memeoff
69ef35bbd3949cfeb22b220f297f842ae9f48027
[ "MIT" ]
1
2021-03-23T19:53:09.000Z
2021-03-23T19:53:09.000Z
src/tools.py
r3w0p/memeoff
69ef35bbd3949cfeb22b220f297f842ae9f48027
[ "MIT" ]
22
2021-03-16T22:30:39.000Z
2022-02-07T18:43:18.000Z
src/tools.py
r3w0p/memeoff
69ef35bbd3949cfeb22b220f297f842ae9f48027
[ "MIT" ]
null
null
null
from pathlib import Path def dir_touch(path_file) -> None: Path(path_file).mkdir(parents=True, exist_ok=True) def file_touch(path_file) -> None: p = Path(path_file) p.parents[0].mkdir(parents=True, exist_ok=True) p.touch() def index_or_default(lst, val, default=-1): return lst.index(val) if va...
20.047619
54
0.703088
from pathlib import Path def dir_touch(path_file) -> None: Path(path_file).mkdir(parents=True, exist_ok=True) def file_touch(path_file) -> None: p = Path(path_file) p.parents[0].mkdir(parents=True, exist_ok=True) p.touch() def index_or_default(lst, val, default=-1): return lst.index(val) if va...
true
true
79009926d5e3cc7ab1e1e230bb129c2f66059adb
248
py
Python
pretix_attestation_plugin/urls.py
ayanginet/pretix-attestation-placeholder-plugin
e3c476f21963fd697b0a2be343f4a90dae6e1618
[ "MIT" ]
1
2021-09-07T07:55:09.000Z
2021-09-07T07:55:09.000Z
pretix_attestation_plugin/urls.py
ayanginet/pretix-attestation-placeholder-plugin
e3c476f21963fd697b0a2be343f4a90dae6e1618
[ "MIT" ]
null
null
null
pretix_attestation_plugin/urls.py
ayanginet/pretix-attestation-placeholder-plugin
e3c476f21963fd697b0a2be343f4a90dae6e1618
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url( r"^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/key-file-upload/$", views.KeyFileUploadView.as_view(), name="key_file_upload", ), ]
19.076923
82
0.58871
from django.conf.urls import url from . import views urlpatterns = [ url( r"^control/event/(?P<organizer>[^/]+)/(?P<event>[^/]+)/key-file-upload/$", views.KeyFileUploadView.as_view(), name="key_file_upload", ), ]
true
true