hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f12fa62fc743d4dd37cc21d2bcec5a4d4ca38c
12,561
py
Python
eval.py
zyocum/motion-type-classifier
9e73d83910c0b06028a7f2dad6fddb4bc8354ea5
[ "MIT" ]
null
null
null
eval.py
zyocum/motion-type-classifier
9e73d83910c0b06028a7f2dad6fddb4bc8354ea5
[ "MIT" ]
null
null
null
eval.py
zyocum/motion-type-classifier
9e73d83910c0b06028a7f2dad6fddb4bc8354ea5
[ "MIT" ]
null
null
null
"""Module for evaluating (PATH|MANNER|COMPOUND) classifier.""" __author__ = "Zachary Yocum" __email__ = "zyocum@brandeis.edu" import os, warnings from corpus import * import numpy as np from collections import Counter from scipy.stats.stats import pearsonr from sklearn import svm, metrics, cross_validation from sk...
29.907143
100
0.49797
"""Module for evaluating (PATH|MANNER|COMPOUND) classifier.""" __author__ = "Zachary Yocum" __email__ = "zyocum@brandeis.edu" import os, warnings from corpus import * import numpy as np from collections import Counter from scipy.stats.stats import pearsonr from sklearn import svm, metrics, cross_validation from sk...
false
true
08f130f772a2beb312573275e6dafa463a617ddf
502
py
Python
rest/sip-in/update-ip-acl-instance/update-ip-acl-instance.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
2
2017-11-23T11:31:20.000Z
2018-01-22T04:14:02.000Z
rest/sip-in/update-ip-acl-instance/update-ip-acl-instance.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
null
null
null
rest/sip-in/update-ip-acl-instance/update-ip-acl-instance.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
2
2020-05-22T23:31:21.000Z
2021-06-10T18:33:45.000Z
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import TwilioRestClient # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = TwilioRestClient(account_sid, auth_token) ip_acces...
38.615385
75
0.840637
from twilio.rest import TwilioRestClient account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = TwilioRestClient(account_sid, auth_token) ip_access_control_list = client.sip.ip_access_control_lists.update( "AL32a3c49700934481addd5ce1659f04d2", friendly_name="Avons Lieutenants" ...
true
true
08f1342b5af1e833f94ee2abb77b6acb92033c6d
3,934
py
Python
grax/projects/gcn2/modules.py
jackd/grax
99baaea786c59c1f5fe4314ba26d04b9a69499d6
[ "Apache-2.0" ]
6
2021-02-18T08:21:02.000Z
2021-07-29T09:09:30.000Z
grax/projects/gcn2/modules.py
jackd/grax
99baaea786c59c1f5fe4314ba26d04b9a69499d6
[ "Apache-2.0" ]
null
null
null
grax/projects/gcn2/modules.py
jackd/grax
99baaea786c59c1f5fe4314ba26d04b9a69499d6
[ "Apache-2.0" ]
null
null
null
import functools import typing as tp import gin import haiku as hk import jax import jax.numpy as jnp import numpy as np import optax from jax.experimental.sparse.ops import JAXSparse from grax import hk_utils from grax.optax_utils import partition configurable = functools.partial(gin.configurable, module="gcn2") ...
28.507246
83
0.585663
import functools import typing as tp import gin import haiku as hk import jax import jax.numpy as jnp import numpy as np import optax from jax.experimental.sparse.ops import JAXSparse from grax import hk_utils from grax.optax_utils import partition configurable = functools.partial(gin.configurable, module="gcn2") ...
true
true
08f13453368ec4c85793442983908cddc8b0dc8a
12,394
py
Python
configs/example/memtest.py
vovojh/gem5
1ee55788fde4c01ef56c47c4cb2a5b0aa2283d4c
[ "BSD-3-Clause" ]
1
2019-01-26T10:34:02.000Z
2019-01-26T10:34:02.000Z
configs/example/memtest.py
vovojh/gem5
1ee55788fde4c01ef56c47c4cb2a5b0aa2283d4c
[ "BSD-3-Clause" ]
null
null
null
configs/example/memtest.py
vovojh/gem5
1ee55788fde4c01ef56c47c4cb2a5b0aa2283d4c
[ "BSD-3-Clause" ]
1
2021-07-06T10:40:34.000Z
2021-07-06T10:40:34.000Z
# Copyright (c) 2015 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
40.110032
78
0.659997
import optparse import random import sys import m5 from m5.objects import * parser = optparse.OptionParser() parser.add_option("-a", "--atomic", action="store_true", help="Use atomic (non-timing) mode") parser.add_option("-b", "--blocking", action="store_true", help="Use blockin...
false
true
08f13499a4a03b6e17c7b670f73777dbde570d02
8,049
py
Python
elisa/linalg/vec.py
christianbitter/Elisa
efb2e155f42cd0c648a2c6c5c67393284f553c51
[ "MIT" ]
1
2019-07-24T19:57:53.000Z
2019-07-24T19:57:53.000Z
elisa/linalg/vec.py
christianbitter/Elisa
efb2e155f42cd0c648a2c6c5c67393284f553c51
[ "MIT" ]
null
null
null
elisa/linalg/vec.py
christianbitter/Elisa
efb2e155f42cd0c648a2c6c5c67393284f553c51
[ "MIT" ]
null
null
null
from __future__ import annotations import copy from math import sqrt from .linalg import is_numeric class Vec: """A general n-dimensional vector class""" def __init__(self, v=None): super(Vec, self).__init__() if v is None: self._v = [] else: if isinstance(v,...
27.192568
125
0.566654
from __future__ import annotations import copy from math import sqrt from .linalg import is_numeric class Vec: def __init__(self, v=None): super(Vec, self).__init__() if v is None: self._v = [] else: if isinstance(v, Vec): self._v = v.v.copy() ...
true
true
08f134e494304f6fd57daa39b56af3351160f43a
1,792
py
Python
django/conf/locale/cy/formats.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/conf/locale/cy/formats.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/conf/locale/cy/formats.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '25 Hydref 2006' TIME_FORMAT = 'P' # '2:30 y....
49.777778
79
0.465402
DATE_FORMAT = 'j F Y' TIME_FORMAT = 'P' DATETIME_FORMAT = 'j F Y, P' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/m/Y P' FIRST_DAY_OF_WEEK = 1 ...
true
true
08f1350016a83c03f141375482fd5c9761333197
3,114
py
Python
Number_Recog.py
DnyaneshwarIT/Recognizing-Handwritten-Digits
caadb0feea80686fae668557d224ff0fb536f37b
[ "MIT" ]
1
2020-12-05T05:21:35.000Z
2020-12-05T05:21:35.000Z
Number_Recog.py
DnyaneshwarIT/Recognizing-Handwritten-Digits
caadb0feea80686fae668557d224ff0fb536f37b
[ "MIT" ]
null
null
null
Number_Recog.py
DnyaneshwarIT/Recognizing-Handwritten-Digits
caadb0feea80686fae668557d224ff0fb536f37b
[ "MIT" ]
null
null
null
#Recognizing Handwritten Numbers import cv2 import numpy as np # generate the Number set txtSize, baseline = cv2.getTextSize('0123456789', cv2.FONT_HERSHEY_SIMPLEX, 3, 5) ...
40.973684
124
0.522479
import cv2 import numpy as np txtSize, baseline = cv2.getTextSize('0123456789', cv2.FONT_HERSHEY_SIMPLEX, 3, 5) digits_img = np.zeros((txtSize[1] + 7, txtSiz...
true
true
08f136e5ae23192010895ef47efd7ab1c623633d
5,070
py
Python
topi/tests/python/test_topi_group_conv2d_NCHWc_int8.py
optima2005/incubator-tvm
545f6ea3fede7a99f0a1b2c6933875550214a46d
[ "Apache-2.0" ]
3
2020-03-12T10:25:51.000Z
2020-08-05T05:36:23.000Z
topi/tests/python/test_topi_group_conv2d_NCHWc_int8.py
optima2005/incubator-tvm
545f6ea3fede7a99f0a1b2c6933875550214a46d
[ "Apache-2.0" ]
null
null
null
topi/tests/python/test_topi_group_conv2d_NCHWc_int8.py
optima2005/incubator-tvm
545f6ea3fede7a99f0a1b2c6933875550214a46d
[ "Apache-2.0" ]
1
2018-10-19T18:11:41.000Z
2018-10-19T18:11:41.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
42.25
143
0.652465
import numpy as np import tvm from tvm import autotvm import topi import topi.testing from tvm.contrib.pickle_memoize import memoize from topi.util import get_const_tuple import pytest from common import get_all_backend def _transform_data(data, bn): batch_size, channel, height, width = data.shape data ...
true
true
08f136e7f8ea8538f6b0c7b45cbc9e9749194f8e
417
py
Python
djangoherokutemplate/wsgi.py
kirberich/django-heroku-template
425443f6b7d12f0db99a218f6809d9bba5a57443
[ "MIT" ]
null
null
null
djangoherokutemplate/wsgi.py
kirberich/django-heroku-template
425443f6b7d12f0db99a218f6809d9bba5a57443
[ "MIT" ]
null
null
null
djangoherokutemplate/wsgi.py
kirberich/django-heroku-template
425443f6b7d12f0db99a218f6809d9bba5a57443
[ "MIT" ]
null
null
null
""" WSGI config for djangoherokutemplate project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault(...
24.529412
80
0.798561
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoherokutemplate.settings') application = get_wsgi_application()
true
true
08f13818de581b6c2a083e0f8a905de2c39ae203
574
py
Python
config/celery_app.py
kvaldivia/chattenge
c307657a3f91a982882f0942bd27320e0736420e
[ "BSD-3-Clause" ]
null
null
null
config/celery_app.py
kvaldivia/chattenge
c307657a3f91a982882f0942bd27320e0736420e
[ "BSD-3-Clause" ]
2
2022-03-01T04:05:25.000Z
2022-03-02T04:04:56.000Z
config/celery_app.py
kvaldivia/chattenge
c307657a3f91a982882f0942bd27320e0736420e
[ "BSD-3-Clause" ]
null
null
null
import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") app = Celery("chattenge") # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. # ...
31.888889
72
0.78223
import os from celery import Celery os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") app = Celery("chattenge") # the configuration object to child processes. # - namespace='CELERY' means all celery-related configuration keys # should have a `CELERY_` prefix. app.config_from_object("django....
true
true
08f1381cd7f2fb0dd8e435aa00b14c3d9b045528
2,140
py
Python
uxy/uxy_netstat.py
sustrik/uxy
88369e25debeb17d6c76eb027b2db3f69040cc2b
[ "MIT" ]
735
2019-05-18T08:32:17.000Z
2022-03-20T12:51:53.000Z
uxy/uxy_netstat.py
sustrik/uxy
88369e25debeb17d6c76eb027b2db3f69040cc2b
[ "MIT" ]
12
2019-05-20T00:13:07.000Z
2019-07-12T13:07:25.000Z
uxy/uxy_netstat.py
sustrik/uxy
88369e25debeb17d6c76eb027b2db3f69040cc2b
[ "MIT" ]
22
2019-05-18T15:35:29.000Z
2019-10-27T00:05:49.000Z
# Copyright (c) 2019 Martin Sustrik # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish,...
38.909091
94
0.703738
import itertools import re import sys from uxy import base def _linux(args, uxy_args): proc = base.launch(uxy_args, ['netstat', '--inet'] + args[1:]) proc.readline() hdr = proc.readline() parts = re.split("(\s+)", hdr) pos = [len(p) for p in list(itertools.accumulate(parts))] fmt = base.Format("PROTO ...
true
true
08f1397a3d7f2e7990bc776275c6fb52dca7ce03
8,727
py
Python
flare/popup.py
co-dev10/flare
b3b5686fe695097206c9fad17f461f5c9fef5c21
[ "MIT" ]
null
null
null
flare/popup.py
co-dev10/flare
b3b5686fe695097206c9fad17f461f5c9fef5c21
[ "MIT" ]
null
null
null
flare/popup.py
co-dev10/flare
b3b5686fe695097206c9fad17f461f5c9fef5c21
[ "MIT" ]
null
null
null
""" Pre-defined dialog widgets for user interaction. """ from . import html5, utils, icons, i18n from .button import Button class Popup(html5.Div): def __init__( self, title="", id=None, className=None, icon=None, enableShortcuts=True, closeable=True, *args, **kwargs ): # language=HTML super().__init__(...
25.149856
117
0.697605
from . import html5, utils, icons, i18n from .button import Button class Popup(html5.Div): def __init__( self, title="", id=None, className=None, icon=None, enableShortcuts=True, closeable=True, *args, **kwargs ): super().__init__( """ <div class="box" [name]="popupBox" style="height: 100%"> <...
true
true
08f13aaf0fdfa8820fbbe164a1ed2037496b9532
5,761
py
Python
scripts/python3/virtioforwarder_port_control.py
Netronome/virtio-forwarder
f6535c76773ab310c92a6e39af67691168fb51de
[ "BSD-3-Clause" ]
23
2018-04-30T14:35:37.000Z
2021-12-08T01:27:13.000Z
scripts/python3/virtioforwarder_port_control.py
Netronome/virtio-forwarder
f6535c76773ab310c92a6e39af67691168fb51de
[ "BSD-3-Clause" ]
2
2018-12-03T17:53:01.000Z
2019-03-15T08:54:34.000Z
scripts/python3/virtioforwarder_port_control.py
Netronome/virtio-forwarder
f6535c76773ab310c92a6e39af67691168fb51de
[ "BSD-3-Clause" ]
16
2018-04-24T11:38:46.000Z
2021-08-16T07:56:50.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # BSD LICENSE # # Copyright(c) 2016-2017 Netronome. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source cod...
34.088757
78
0.648151
from __future__ import print_function import argparse import zmq import re try: from protobuf.virtioforwarder import virtioforwarder_pb2 as relay except ImportError: import os import sys PWD = os.path.dirname(os.path.abspath(__file__)) sys.path.append(PWD + '/../build/protobuf/virtioforwarder') ...
true
true
08f13b225f48ce026782a594eea099b7ada6bac1
5,244
py
Python
flask_maker/contents.py
shahriyardx/flask-maker
b431ee3f92a866fc382dc8b37db8b724c3a313d4
[ "MIT" ]
4
2021-08-06T13:50:55.000Z
2021-11-21T08:17:35.000Z
flask_maker/contents.py
shahriyardx/flask-maker
b431ee3f92a866fc382dc8b37db8b724c3a313d4
[ "MIT" ]
null
null
null
flask_maker/contents.py
shahriyardx/flask-maker
b431ee3f92a866fc382dc8b37db8b724c3a313d4
[ "MIT" ]
null
null
null
APP_TEXT = """ import click from {app_name} import app @click.group() def cli(): \"\"\"{app_name}'s cli\"\"\" @cli.command(name="start") @click.option("--debug", is_flag=True, help="Run app in debug mode.") @click.option("--port", default=5000, help="Port to start the webserver.") def _start(debug, port): pri...
21.85
120
0.641304
APP_TEXT = """ import click from {app_name} import app @click.group() def cli(): \"\"\"{app_name}'s cli\"\"\" @cli.command(name="start") @click.option("--debug", is_flag=True, help="Run app in debug mode.") @click.option("--port", default=5000, help="Port to start the webserver.") def _start(debug, port): pri...
true
true
08f13ca0f3c49ee347a8bb47911c748d9f4db2ee
5,494
py
Python
50-misc-additional-functionality/obstacle_avoidance/obstacle_avoidance/range_sensors_cmd_switch_node.py
mstuettgen/duckietown2
90595beabda92084e05229661c1d80f188f2ebb1
[ "Apache-2.0" ]
11
2018-06-20T23:43:00.000Z
2020-04-27T08:59:47.000Z
50-misc-additional-functionality/obstacle_avoidance/obstacle_avoidance/range_sensors_cmd_switch_node.py
mstuettgen/duckietown2
90595beabda92084e05229661c1d80f188f2ebb1
[ "Apache-2.0" ]
null
null
null
50-misc-additional-functionality/obstacle_avoidance/obstacle_avoidance/range_sensors_cmd_switch_node.py
mstuettgen/duckietown2
90595beabda92084e05229661c1d80f188f2ebb1
[ "Apache-2.0" ]
12
2018-07-13T18:54:48.000Z
2022-01-25T02:18:17.000Z
# Copyright (c) 2018 LG Electronics, 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 i...
38.964539
117
0.641609
import time import sys import argparse import rclpy from rclpy.node import Node from sensor_msgs.msg import Range from duckietown_msgs.msg import Twist2DStamped, BoolStamped ULTRASOUND_DETECTION_THRESHOLD = 20 OBSTACLE_TIME_THRESHOLD = 0.3 CLIFF_DIST_THRESHOLD = 75 class RangeSensorCmdSwitchNode(N...
true
true
08f13cd1e1f8c8863919abe3fa6e0327b4b3bdcb
654
py
Python
tests/integration_tests/conftest.py
JobtechSwe/castaway
e0917511b20152f0bd7e2802b73a0beae30a96f5
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/conftest.py
JobtechSwe/castaway
e0917511b20152f0bd7e2802b73a0beae30a96f5
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/conftest.py
JobtechSwe/castaway
e0917511b20152f0bd7e2802b73a0beae30a96f5
[ "Apache-2.0" ]
null
null
null
import os import pytest import requests test_api_key = os.getenv('TEST_API_KEY') headers = {'api-key': test_api_key, 'accept': 'application/json'} @pytest.fixture def session(scope="session"): """ creates a Session object which will persist over the entire test run ("session"). http connections will be r...
22.551724
85
0.681957
import os import pytest import requests test_api_key = os.getenv('TEST_API_KEY') headers = {'api-key': test_api_key, 'accept': 'application/json'} @pytest.fixture def session(scope="session"): s = requests.sessions.Session() s.headers.update(headers) return s @pytest.fixture def url(scope="session"): ...
true
true
08f13cf42d9af66422bb5954a2905c7a513722e1
1,189
py
Python
chatbot_tutorial/migrations/0009_auto_20210326_1655.py
Jishin4477/Djangobot
41eda19b683224dcf2efdb80dd178aa03e7bad82
[ "MIT" ]
null
null
null
chatbot_tutorial/migrations/0009_auto_20210326_1655.py
Jishin4477/Djangobot
41eda19b683224dcf2efdb80dd178aa03e7bad82
[ "MIT" ]
null
null
null
chatbot_tutorial/migrations/0009_auto_20210326_1655.py
Jishin4477/Djangobot
41eda19b683224dcf2efdb80dd178aa03e7bad82
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2021-03-26 16:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('chatbot_tutorial', '0008_auto_20210326_1604'), ] operations = [ migrations....
27.651163
76
0.571909
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('chatbot_tutorial', '0008_auto_20210326_1604'), ] operations = [ migrations.RemoveField( model_name='dumbclick', name='no_of_...
true
true
08f13d999577039cee7cd4df16cca386c71bd626
6,673
py
Python
optuna/pruners/successive_halving.py
sushi30/optuna
fb82c3a88c7ec761c9c04a04bceb02ee910df767
[ "MIT" ]
null
null
null
optuna/pruners/successive_halving.py
sushi30/optuna
fb82c3a88c7ec761c9c04a04bceb02ee910df767
[ "MIT" ]
null
null
null
optuna/pruners/successive_halving.py
sushi30/optuna
fb82c3a88c7ec761c9c04a04bceb02ee910df767
[ "MIT" ]
null
null
null
import math from optuna.pruners.base import BasePruner from optuna.structs import StudyDirection from optuna import type_checking if type_checking.TYPE_CHECKING: from typing import List # NOQA from optuna.structs import FrozenTrial # NOQA from optuna.study import Study # NOQA class SuccessiveHalving...
41.447205
100
0.634497
import math from optuna.pruners.base import BasePruner from optuna.structs import StudyDirection from optuna import type_checking if type_checking.TYPE_CHECKING: from typing import List from optuna.structs import FrozenTrial from optuna.study import Study class SuccessiveHalvingPruner(BasePruner): ...
true
true
08f13de31ace03560163840cb81757982f2a9ff6
2,003
py
Python
boot.py
lh70/s-connect-python
5a4ca17690ec700b36faf69ea744c514f532cc48
[ "Apache-2.0" ]
null
null
null
boot.py
lh70/s-connect-python
5a4ca17690ec700b36faf69ea744c514f532cc48
[ "Apache-2.0" ]
null
null
null
boot.py
lh70/s-connect-python
5a4ca17690ec700b36faf69ea744c514f532cc48
[ "Apache-2.0" ]
null
null
null
""" This is the MicroPython boot.py for this projects ESP32 chips. This script gets executed on every startup before main.py. We will activate WiFi station-connection, but not WebREPl (web cli) as it is not reliable """ import network import time import machine # import webrepl WIFI_DEVICE_NAME = 'ESP32-5' WIFI_CR...
28.614286
90
0.611083
import network import time import machine WIFI_DEVICE_NAME = 'ESP32-5' WIFI_CREDENTIALS = { } WEBREPL_PASSWORD = 'esp32batch' wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.config(dhcp_hostname=WIFI_DEVICE_NAME) try: while not wlan.isconnected(): print('scanning for wlan:') wla...
true
true
08f13ecab0caa2202d8c56e7130282f13d4c0836
1,427
py
Python
leetcode/14 LongestCommonPrefix.py
fanbyprinciple/coding_interview_questions
b36c3a54e68c5e1f12c7558baeb84175130047f2
[ "MIT" ]
null
null
null
leetcode/14 LongestCommonPrefix.py
fanbyprinciple/coding_interview_questions
b36c3a54e68c5e1f12c7558baeb84175130047f2
[ "MIT" ]
9
2020-08-17T06:40:46.000Z
2021-01-17T03:30:02.000Z
leetcode/14 LongestCommonPrefix.py
fanbyprinciple/coding_interview_questions
b36c3a54e68c5e1f12c7558baeb84175130047f2
[ "MIT" ]
1
2020-08-18T03:01:19.000Z
2020-08-18T03:01:19.000Z
# Source: https://leetcode.com/problems/longest-common-prefix/ # Type: ?? # Time Complexity: ?? # Space Complexity: ?? # Runtime: 36 ms, faster than 67.64% of Python3 online submissions for Longest Common Prefix. # Memory Usage: 13.8 MB, less than 87.93% of Python3 online submissions for Longest Common Prefix. # MY S...
31.021739
98
0.534688
class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: commonElement = "" i =0 try: while(True): currentElement = strs[0][i] flag = 1 for element i...
true
true
08f140f3471c3d08e1c125f6efb8d430e0e1e0ca
9,009
py
Python
pshell/call.py
crusaderky/pshell
51e3827ac1e1c037777cbdffcddb33b5bb33bcbf
[ "Apache-2.0" ]
6
2019-01-02T15:01:41.000Z
2021-02-03T11:40:50.000Z
pshell/call.py
crusaderky/pshell
51e3827ac1e1c037777cbdffcddb33b5bb33bcbf
[ "Apache-2.0" ]
10
2019-01-02T15:00:06.000Z
2022-03-26T15:30:13.000Z
pshell/call.py
crusaderky/pshell
51e3827ac1e1c037777cbdffcddb33b5bb33bcbf
[ "Apache-2.0" ]
2
2019-01-19T18:36:39.000Z
2019-04-04T09:27:05.000Z
"""Functions to execute shell commands in a subprocess """ import io import os import subprocess import threading from contextlib import contextmanager from typing import IO, List, Optional, Tuple, Union from . import log __all__ = ("real_fh", "call", "check_call", "check_output") _BASH_INIT = "set -o errexit -o pip...
32.290323
79
0.626152
import io import os import subprocess import threading from contextlib import contextmanager from typing import IO, List, Optional, Tuple, Union from . import log __all__ = ("real_fh", "call", "check_call", "check_output") _BASH_INIT = "set -o errexit -o pipefail -o nounset && " @contextmanager def real_fh(fh: Opt...
true
true
08f1410f83943de936284fec9cc55ca3a5f7c4ea
1,822
py
Python
ansible/pico-docker/files/container_prune.py
minhnq1618/picoCTF
f634f0e55be6b1a8552a33e4f94e7487142e8bce
[ "MIT" ]
280
2016-03-23T05:16:07.000Z
2022-03-25T10:45:33.000Z
ansible/pico-docker/files/container_prune.py
minhnq1618/picoCTF
f634f0e55be6b1a8552a33e4f94e7487142e8bce
[ "MIT" ]
384
2016-03-22T05:14:47.000Z
2021-09-13T23:46:14.000Z
ansible/pico-docker/files/container_prune.py
minhnq1618/picoCTF
f634f0e55be6b1a8552a33e4f94e7487142e8bce
[ "MIT" ]
142
2016-03-15T16:27:21.000Z
2022-02-23T23:41:28.000Z
#!/usr/bin/env python3 """ container_prune.py Script to check containers launched by the picoCTF platform and delete those which have passed their time-to-live. The default TTL is 30 minutes or can be set with the CONTAINER_TTL environment variable (seconds). This script intentionally has limited dependencies (e.g....
31.413793
96
0.620198
import os import subprocess import time def find_stale_containers(ttl): cmd = ['docker', 'ps', '-f', 'label=problem', '--format', '{{.ID}} {{.Label "created_at"}}'] containers = subprocess.run(cmd, stdout=subprocess.PIPE, check=True) stale = [] for container_info in containers.stdout.decode().splitli...
true
true
08f1413536f2eeb250d5489d751ec01e71d14776
582
py
Python
usoSets.py
JaviMiot/pythoProfessional
f621ebd58fe2689a9d325157fed937dfeb83b6af
[ "MIT" ]
null
null
null
usoSets.py
JaviMiot/pythoProfessional
f621ebd58fe2689a9d325157fed937dfeb83b6af
[ "MIT" ]
null
null
null
usoSets.py
JaviMiot/pythoProfessional
f621ebd58fe2689a9d325157fed937dfeb83b6af
[ "MIT" ]
null
null
null
"""uso de sets""" #? Union en python se lo hace con | set1 = {1,2,3,4,5,6,7,8} set2 = {8,9,10,11} setUnion = set1 | set2 print('Union sets') print(setUnion) #? Interseccion lo que tien en comun se hace con & setInter = set1 & set2 print('Interseccion sets') print(setInter) #? diferencia se lo hace con - setDiff1 = ...
20.068966
52
0.699313
set1 = {1,2,3,4,5,6,7,8} set2 = {8,9,10,11} setUnion = set1 | set2 print('Union sets') print(setUnion) setInter = set1 & set2 print('Interseccion sets') print(setInter) setDiff1 = set1 - set2 setDiff2 = set2 - set1 print('Diff sets') print(setDiff1) print(setDiff2) setDiffSi = set1 ^ set2 setDiff2 = set2 - set1 pr...
true
true
08f1428b21f05882f67827ba16df7308acb8881f
9,660
py
Python
mighty/monitor/mutual_info/neural_estimation.py
dizcza/pytorch-mighty
942c53b529377c9100bffc2f7f20ec740763e6ae
[ "BSD-3-Clause" ]
1
2020-11-14T20:15:07.000Z
2020-11-14T20:15:07.000Z
mighty/monitor/mutual_info/neural_estimation.py
dizcza/pytorch-mighty
942c53b529377c9100bffc2f7f20ec740763e6ae
[ "BSD-3-Clause" ]
null
null
null
mighty/monitor/mutual_info/neural_estimation.py
dizcza/pytorch-mighty
942c53b529377c9100bffc2f7f20ec740763e6ae
[ "BSD-3-Clause" ]
2
2021-01-15T05:52:53.000Z
2021-03-26T17:41:17.000Z
""" MINE: Mutual Information Neural Estimation M. Belghazi et. al, 2018 https://arxiv.org/abs/1801.04062 """ from typing import List import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data from mighty.models import MLP from mighty.monitor.mutual_info._pca_preproc...
37.011494
108
0.592754
from typing import List import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data from mighty.models import MLP from mighty.monitor.mutual_info._pca_preprocess import MutualInfoPCA from mighty.utils.signal import to_onehot, exponential_moving_average from mighty.ut...
true
true
08f142c7caaa3923a8da755e09c436f2c7de5a8e
783
py
Python
Python_Scripts/predict.py
desti-nation/Easy-diagnose
db8b1f079a0717b2f28f1a2ff645d64e5708f38e
[ "MIT" ]
1
2020-05-22T02:36:50.000Z
2020-05-22T02:36:50.000Z
Python_Scripts/predict.py
desti-nation/EasyDiagnose
db8b1f079a0717b2f28f1a2ff645d64e5708f38e
[ "MIT" ]
null
null
null
Python_Scripts/predict.py
desti-nation/EasyDiagnose
db8b1f079a0717b2f28f1a2ff645d64e5708f38e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Dec 24 14:33:48 2017 @author: 309 """ from keras.models import load_model import numpy as np import os from sys import argv if __name__ == '__main__': INPUT_PATH = argv[1] model_path = argv[2] TEMP_DATA_PATH = INPUT_PATH + "\\TEMP_DATA" data_pa...
27.964286
58
0.606641
from keras.models import load_model import numpy as np import os from sys import argv if __name__ == '__main__': INPUT_PATH = argv[1] model_path = argv[2] TEMP_DATA_PATH = INPUT_PATH + "\\TEMP_DATA" data_path = TEMP_DATA_PATH + "\\muchdata" data_file = os.listdir(data_path) muchdata ...
true
true
08f1432d5c0d95b4933a4284f201ffbc85081827
8,561
py
Python
metric_learning_traffic/reader.py
LJoson/2020_BaiduStar_Developer_Competition
aa796b91e806582dbe70e7e7f52feb50c3f2b753
[ "Apache-2.0" ]
1
2020-10-23T08:53:27.000Z
2020-10-23T08:53:27.000Z
metric_learning_traffic/reader.py
LJoson/2020_BaiduStar_Developer_Competition
aa796b91e806582dbe70e7e7f52feb50c3f2b753
[ "Apache-2.0" ]
null
null
null
metric_learning_traffic/reader.py
LJoson/2020_BaiduStar_Developer_Competition
aa796b91e806582dbe70e7e7f52feb50c3f2b753
[ "Apache-2.0" ]
1
2020-10-21T02:03:20.000Z
2020-10-21T02:03:20.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.230453
133
0.57832
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import math import random import functools import numpy as np import paddle from imgtool import process_image import glob import json import signal random.seed(0) def sign2dict(signs, pic_path): ...
true
true
08f1441b2e66557d78d67193f08050b73d54ac94
70,019
py
Python
script_7/prints.py
Doun92/m-moire
bdb4e9d47670b3c3d54bd437c13d7128b5a06011
[ "MIT" ]
null
null
null
script_7/prints.py
Doun92/m-moire
bdb4e9d47670b3c3d54bd437c13d7128b5a06011
[ "MIT" ]
null
null
null
script_7/prints.py
Doun92/m-moire
bdb4e9d47670b3c3d54bd437c13d7128b5a06011
[ "MIT" ]
null
null
null
""" 1 SYLLABE """ print(EvolutionPhonetique.evolution_phonetique("RĘM")) #rien p.19 print(EvolutionPhonetique.evolution_phonetique("HRỌK")) #froc 1 print(EvolutionPhonetique.evolution_phonetique("HRẸNG")) #renc 1 print(EvolutionPhonetique.evolution_phonetique("SNẸLL")) #isnel 1 p.28 pr...
73.395178
86
0.748211
print(EvolutionPhonetique.evolution_phonetique("RĘM")) print(EvolutionPhonetique.evolution_phonetique("HRỌK")) print(EvolutionPhonetique.evolution_phonetique("HRẸNG")) print(EvolutionPhonetique.evolution_phonetique("SNẸLL")) print(EvolutionPhonetique.evolution_phonetique("HLÁNK")) pri...
true
true
08f145779cf20d7f81f66f26c02f0f47781d6fa6
25,235
py
Python
scripts/setup_test.py
Rijuta-s/oppia
f4f3cd71f90285abee3b0f74062586aaafadce7d
[ "Apache-2.0" ]
null
null
null
scripts/setup_test.py
Rijuta-s/oppia
f4f3cd71f90285abee3b0f74062586aaafadce7d
[ "Apache-2.0" ]
3
2021-02-13T08:35:34.000Z
2021-05-18T12:17:06.000Z
scripts/setup_test.py
Rijuta-s/oppia
f4f3cd71f90285abee3b0f74062586aaafadce7d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2019 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
44.117133
87
0.625599
from __future__ import annotations import collections import os import subprocess import sys import tarfile import urllib.request as urlrequest from core import python_utils from core.tests import test_utils from . import clean from . import common from . import setup RELEASE_TEST_DIR = os.path.join('core', 'test...
true
true
08f145dc7f105b1be477a75d6454cffab03a5a4c
4,449
py
Python
telethon/_events/messageread.py
MrGam-oy/Telethon
acc512683c107f80d47ab0fdaac0d1ac9439d43c
[ "MIT" ]
1
2022-02-12T14:05:57.000Z
2022-02-12T14:05:57.000Z
telethon/_events/messageread.py
MrGam-oy/Telethon
acc512683c107f80d47ab0fdaac0d1ac9439d43c
[ "MIT" ]
null
null
null
telethon/_events/messageread.py
MrGam-oy/Telethon
acc512683c107f80d47ab0fdaac0d1ac9439d43c
[ "MIT" ]
null
null
null
from .base import EventBuilder from .._misc import utils from .. import _tl class MessageRead(EventBuilder): """ Occurs whenever one or more messages are read in a chat. Members: max_id (`int`): Up to which message ID has been read. Every message with an ID equal or lower ...
36.467213
79
0.588222
from .base import EventBuilder from .._misc import utils from .. import _tl class MessageRead(EventBuilder): def __init__(self, peer=None, max_id=None, out=False, contents=False, message_ids=None): self.outbox = out self.contents = contents self._message_ids = message_i...
true
true
08f145f51e14c13518de839cd5187aab0277d017
5,708
py
Python
others/paddlepaddle/lib/models/genotypes.py
shashank3959/NAS-Projects
2c0577231a52375de5ebd7a588750899a8c7bf1c
[ "MIT" ]
3
2020-09-03T14:34:51.000Z
2020-09-03T16:32:56.000Z
others/paddlepaddle/lib/models/genotypes.py
shashank3959/NAS-Projects
2c0577231a52375de5ebd7a588750899a8c7bf1c
[ "MIT" ]
null
null
null
others/paddlepaddle/lib/models/genotypes.py
shashank3959/NAS-Projects
2c0577231a52375de5ebd7a588750899a8c7bf1c
[ "MIT" ]
1
2019-10-19T15:46:12.000Z
2019-10-19T15:46:12.000Z
################################################## # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 # ################################################## from collections import namedtuple Genotype = namedtuple('Genotype', 'normal normal_concat reduce reduce_concat') # Learning Transferable Architectures for Scalable...
32.431818
84
0.553784
from collections import namedtuple Genotype = namedtuple('Genotype', 'normal normal_concat reduce reduce_concat') NASNet = Genotype( normal = [ (('sep_conv_5x5', 1), ('sep_conv_3x3', 0)), (('sep_conv_5x5', 0), ('sep_conv_3x3', 0)), (('avg_pool_3x3', 1), ('skip_connect', 0)), (('avg_pool_3x3', 0), (...
true
true
08f14641f342aac2ed7c3e77ab97951d9d569feb
1,823
py
Python
schedule/neurips19/signum_tuning.py
Soumya-dutta/powersgd
4944fa2c212d8b8201e01c689cde6b21341ed4af
[ "MIT" ]
79
2019-05-31T18:46:57.000Z
2022-03-26T10:25:44.000Z
schedule/neurips19/signum_tuning.py
Soumya-dutta/powersgd
4944fa2c212d8b8201e01c689cde6b21341ed4af
[ "MIT" ]
11
2019-12-02T12:24:00.000Z
2021-11-29T12:14:14.000Z
schedule/neurips19/signum_tuning.py
Soumya-dutta/powersgd
4944fa2c212d8b8201e01c689cde6b21341ed4af
[ "MIT" ]
20
2019-09-18T12:14:51.000Z
2022-01-24T16:14:30.000Z
#!/usr/bin/env python3 import os import numpy as np import shared from jobmonitor.api import ( kubernetes_schedule_job, kubernetes_schedule_job_queue, register_job, upload_code_package, ) from jobmonitor.connections import mongo gpus = 1 seed = 42 basename = os.path.basename(__file__).replace(".py"...
26.42029
92
0.646736
import os import numpy as np import shared from jobmonitor.api import ( kubernetes_schedule_job, kubernetes_schedule_job_queue, register_job, upload_code_package, ) from jobmonitor.connections import mongo gpus = 1 seed = 42 basename = os.path.basename(__file__).replace(".py", "") experiment = f"ne...
true
true
08f147b534f52da84c0545ca1a80759a73e87e68
10,893
py
Python
xl_tensorflow/datasets/tfrecord/create_pascal_tfrecord.py
Lannister-Xiaolin/xl_tensorflow
99e0f458769ee1e45ebf55c789961e40f7d2eeac
[ "Apache-2.0" ]
null
null
null
xl_tensorflow/datasets/tfrecord/create_pascal_tfrecord.py
Lannister-Xiaolin/xl_tensorflow
99e0f458769ee1e45ebf55c789961e40f7d2eeac
[ "Apache-2.0" ]
1
2020-11-13T18:52:23.000Z
2020-11-13T18:52:23.000Z
xl_tensorflow/datasets/tfrecord/create_pascal_tfrecord.py
Lannister-Xiaolin/xl_tensorflow
99e0f458769ee1e45ebf55c789961e40f7d2eeac
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
34.691083
80
0.635454
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hashlib import io import json import os from absl import app from absl import flags from absl import logging from lxml import etree import PIL.Image import tensorflow.compat.v1 as tf from . import tfr...
true
true
08f148e828bef57a9bfb56073cfde3a9f3c9b5b5
9,513
py
Python
hphp/hack/src/hh_codesynthesis/hh_codesynthesis.py
jjergus/hhvm
7f94d3da259c9443792327e0a61af1a6778d53b9
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
hphp/hack/src/hh_codesynthesis/hh_codesynthesis.py
jjergus/hhvm
7f94d3da259c9443792327e0a61af1a6778d53b9
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
hphp/hack/src/hh_codesynthesis/hh_codesynthesis.py
jjergus/hhvm
7f94d3da259c9443792327e0a61af1a6778d53b9
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
#!/usr/bin/env python3 # pyre-strict # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the "hack" directory of this source tree. # # A library/binary take the output from hh_single_type_check --dump-deps. # And synthesis code based o...
33.734043
92
0.657521
import argparse import os import sys from typing import List, Optional, Union import clingo from clingo import Number, Symbol from hphp.hack.src.hh_codesynthesis.codeGenerator import CodeGenerator from hphp.hack.src.hh_codesynthesis.hackGenerator import HackCodeGenerator from libfb.py import parutil class ClingoCont...
true
true
08f1490ded21fe71df922d2dd198110535d7a515
5,304
py
Python
tests/tools/importexport/migration/test_v05_to_v06.py
HaoZeke/aiida-core
1a4cada67fe36353326dcebfe888ebc01a6c5b7b
[ "MIT", "BSD-3-Clause" ]
null
null
null
tests/tools/importexport/migration/test_v05_to_v06.py
HaoZeke/aiida-core
1a4cada67fe36353326dcebfe888ebc01a6c5b7b
[ "MIT", "BSD-3-Clause" ]
2
2019-03-06T11:23:42.000Z
2020-03-09T09:34:07.000Z
tests/tools/importexport/migration/test_v05_to_v06.py
lorisercole/aiida-core
84c2098318bf234641219e55795726f99dc25a16
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
51
118
0.650641
from aiida.backends.general.migrations.calc_state import STATE_MAPPING from aiida.tools.importexport.migration.utils import verify_metadata_version from aiida.tools.importexport.migration.v05_to_v06 import migrate_v5_to_v6 from tests.utils.archives import get_json_files from . import ArchiveMigrationTest class TestM...
true
true
08f1490f3fd3de61cb48be6203a9ba0a3099f428
551
py
Python
Testing/migrations/0010_testingsessionofunautorizeduser_ip_begin.py
DudaEugen/JustTesting
7b62c7f5d1d918c3fe82bf00aff4009212427a6f
[ "MIT" ]
null
null
null
Testing/migrations/0010_testingsessionofunautorizeduser_ip_begin.py
DudaEugen/JustTesting
7b62c7f5d1d918c3fe82bf00aff4009212427a6f
[ "MIT" ]
null
null
null
Testing/migrations/0010_testingsessionofunautorizeduser_ip_begin.py
DudaEugen/JustTesting
7b62c7f5d1d918c3fe82bf00aff4009212427a6f
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-08-24 17:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Testing', '0009_rename_information_testingsessionofunautorizeduser_display_name'), ] operations = [ migrations.AddField( model_n...
29
145
0.682396
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Testing', '0009_rename_information_testingsessionofunautorizeduser_display_name'), ] operations = [ migrations.AddField( model_name='testingsessionofunautorizeduser', ...
true
true
08f14af54abe3c3334978e12e06908b6444b7e84
719
py
Python
brian2/devices/cpp_standalone/GSLcodeobject.py
awillats/brian2
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
[ "BSD-2-Clause" ]
1
2021-06-10T15:28:51.000Z
2021-06-10T15:28:51.000Z
brian2/devices/cpp_standalone/GSLcodeobject.py
awillats/brian2
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
[ "BSD-2-Clause" ]
1
2019-04-11T13:57:13.000Z
2019-04-13T17:41:04.000Z
brian2/devices/cpp_standalone/GSLcodeobject.py
awillats/brian2
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
[ "BSD-2-Clause" ]
null
null
null
''' Module containing CPPStandalone CodeObject for code generation for integration using the ODE solver provided in the GNU Scientific Library ''' from brian2.codegen.codeobject import CodeObject from brian2.devices.cpp_standalone import CPPStandaloneCodeObject from brian2.codegen.generators.cpp_generator import CPPCo...
44.9375
115
0.785814
from brian2.codegen.codeobject import CodeObject from brian2.devices.cpp_standalone import CPPStandaloneCodeObject from brian2.codegen.generators.cpp_generator import CPPCodeGenerator from brian2.codegen.generators.GSL_generator import GSLCPPCodeGenerator class GSLCPPStandaloneCodeObject(CodeObject): templater =...
true
true
08f14bcd0462dfae7a17c7c990ad229673f55c0c
5,307
py
Python
datahub/sql/controllers/aws/model_controller.py
arpitkjain7/synapse
cb4cf28351bde94f4ad7ecc5df0714cfe5d616c6
[ "Apache-2.0" ]
2
2021-08-02T07:56:38.000Z
2022-02-23T04:27:31.000Z
datahub/sql/controllers/aws/model_controller.py
arpitkjain7/synapse
cb4cf28351bde94f4ad7ecc5df0714cfe5d616c6
[ "Apache-2.0" ]
null
null
null
datahub/sql/controllers/aws/model_controller.py
arpitkjain7/synapse
cb4cf28351bde94f4ad7ecc5df0714cfe5d616c6
[ "Apache-2.0" ]
null
null
null
from sql.crud.model_crud import CRUDModel from sql.crud.deployment_crud import CRUDDeployment from sql import config from commons.external_call import APIInterface from datetime import datetime class ModelController: def __init__(self): self.CRUDModel = CRUDModel() self.CRUDDeployment = CRUDDeploy...
39.311111
83
0.616356
from sql.crud.model_crud import CRUDModel from sql.crud.deployment_crud import CRUDDeployment from sql import config from commons.external_call import APIInterface from datetime import datetime class ModelController: def __init__(self): self.CRUDModel = CRUDModel() self.CRUDDeployment = CRUDDeploy...
true
true
08f14cfd41770455cc6c13b98b5aa7724af322e9
3,333
py
Python
tests/test_grids.py
tmistelbauer/poets4SATIDA
50af86a6cda6414831a73bbedcdd075a49b58f4a
[ "BSD-3-Clause" ]
1
2015-10-13T07:09:56.000Z
2015-10-13T07:09:56.000Z
tests/test_grids.py
tmistelbauer/poets4SATIDA
50af86a6cda6414831a73bbedcdd075a49b58f4a
[ "BSD-3-Clause" ]
null
null
null
tests/test_grids.py
tmistelbauer/poets4SATIDA
50af86a6cda6414831a73bbedcdd075a49b58f4a
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2014, Vienna University of Technology (TU Wien), Department # of Geodesy and Geoinformation (GEO). # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source co...
39.211765
79
0.692169
import unittest from poets.grid.grids import ShapeGrid, RegularGrid class Test(unittest.TestCase): def setUp(self): self.region = 'AU' self.sp_res = 0.25 self.sp_res1 = 0.5 def tearDown(self): pass def test_ShapeGrid(self): cgrid = ShapeGrid(self.regio...
true
true
08f14d18e125e0150640449bb3bd782ceff07865
1,630
py
Python
BettingRestAPI/BettingRestAPI/Serializer/CSGOSerializer.py
PatrickKoss/BettingPrediction
8082bb89d00d28ade774a445a1645dc07ac86127
[ "MIT" ]
null
null
null
BettingRestAPI/BettingRestAPI/Serializer/CSGOSerializer.py
PatrickKoss/BettingPrediction
8082bb89d00d28ade774a445a1645dc07ac86127
[ "MIT" ]
null
null
null
BettingRestAPI/BettingRestAPI/Serializer/CSGOSerializer.py
PatrickKoss/BettingPrediction
8082bb89d00d28ade774a445a1645dc07ac86127
[ "MIT" ]
null
null
null
from rest_framework import serializers from csgo_api.models import Player, Team, MatchResult, Match # Serializers define the API representation. class PlayerSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Player fields = ['name', 'dpr', 'kast', 'impact', 'adr', 'kpr'] cl...
30.185185
117
0.695092
from rest_framework import serializers from csgo_api.models import Player, Team, MatchResult, Match class PlayerSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Player fields = ['name', 'dpr', 'kast', 'impact', 'adr', 'kpr'] class TeamSerializerUpcomingMatches(serializers...
true
true
08f14d80a626c5207d233aa944832de92cb00a87
544
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/flying-tomato-30171
23dd885fcacca2a9e4b62a30b621b652a1a5d0ac
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/flying-tomato-30171
23dd885fcacca2a9e4b62a30b621b652a1a5d0ac
[ "FTL", "AML", "RSA-MD" ]
7
2021-09-05T22:18:14.000Z
2021-10-03T17:41:10.000Z
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/flying-tomato-30171
23dd885fcacca2a9e4b62a30b621b652a1a5d0ac
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "flying-tomato-30171.botics.co" site_params = { "name": "Flying Tomato", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update...
20.923077
61
0.658088
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "flying-tomato-30171.botics.co" site_params = { "name": "Flying Tomato", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update...
true
true
08f14e52bc9e218411bacdb9f6e3de1084dce831
2,164
py
Python
mayan/apps/tags/workflow_actions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/tags/workflow_actions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/tags/workflow_actions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
import logging from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.models import AccessControlList from mayan.apps.document_states.classes import WorkflowAction from .models import Tag from .permissions import permission_tag_attach, permission_tag_remove __all__ = ('AttachTagAction', 'Remov...
29.243243
73
0.597043
import logging from django.utils.translation import ugettext_lazy as _ from mayan.apps.acls.models import AccessControlList from mayan.apps.document_states.classes import WorkflowAction from .models import Tag from .permissions import permission_tag_attach, permission_tag_remove __all__ = ('AttachTagAction', 'Remov...
true
true
08f14e86f7fe7ad65618220feb929a8f0c4a38e2
3,204
py
Python
test/widgets/test_memory.py
1kyu/qtile
da93518b2ab924e803552decdb364d64de46088d
[ "MIT" ]
2
2021-07-21T20:07:12.000Z
2021-08-12T18:09:49.000Z
test/widgets/test_memory.py
1kyu/qtile
da93518b2ab924e803552decdb364d64de46088d
[ "MIT" ]
1
2022-02-27T12:17:27.000Z
2022-02-27T12:17:27.000Z
test/widgets/test_memory.py
1kyu/qtile
da93518b2ab924e803552decdb364d64de46088d
[ "MIT" ]
1
2020-04-27T22:20:11.000Z
2020-04-27T22:20:11.000Z
# Copyright (c) 2021 elParaguayo # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
33.375
93
0.686017
import sys from importlib import reload from types import ModuleType import pytest import libqtile.bar import libqtile.config def no_op(*args, **kwargs): pass class FakePsutil(ModuleType): class virtual_memory: def __init__(self): self.used = 2534260736 self.total = 818...
true
true
08f14ebd7ffec62dbbacc1840c63859421f8c877
901
py
Python
estimagic/tests/examples/test_logit.py
RobinMusolff/estimagic
615da47e125e9314c542bda0b55bf92bc6bf1863
[ "BSD-3-Clause" ]
null
null
null
estimagic/tests/examples/test_logit.py
RobinMusolff/estimagic
615da47e125e9314c542bda0b55bf92bc6bf1863
[ "BSD-3-Clause" ]
null
null
null
estimagic/tests/examples/test_logit.py
RobinMusolff/estimagic
615da47e125e9314c542bda0b55bf92bc6bf1863
[ "BSD-3-Clause" ]
null
null
null
"""Tests for the logit example.""" import pickle from pathlib import Path import pytest from numpy.testing import assert_array_almost_equal from estimagic.examples.logit import logit_loglike from estimagic.examples.logit import logit_loglikeobs @pytest.fixture() def statsmodels_fixtures(): fix_path = Path(__fil...
26.5
78
0.710322
import pickle from pathlib import Path import pytest from numpy.testing import assert_array_almost_equal from estimagic.examples.logit import logit_loglike from estimagic.examples.logit import logit_loglikeobs @pytest.fixture() def statsmodels_fixtures(): fix_path = Path(__file__).resolve().parent / "logit_fixt...
true
true
08f14f47a74bc0eacea7c9d871600124c89715e6
12,084
py
Python
tfx/examples/chicago_taxi_pipeline/taxi_utils.py
NunoEdgarGFlowHub/tfx
16038b03b1742ef8f537180907289257221a57b7
[ "Apache-2.0" ]
null
null
null
tfx/examples/chicago_taxi_pipeline/taxi_utils.py
NunoEdgarGFlowHub/tfx
16038b03b1742ef8f537180907289257221a57b7
[ "Apache-2.0" ]
null
null
null
tfx/examples/chicago_taxi_pipeline/taxi_utils.py
NunoEdgarGFlowHub/tfx
16038b03b1742ef8f537180907289257221a57b7
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
33.75419
100
0.744538
from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow_model_analysis as tfma import tensorflow_transform as tft from tensorflow_transform.tf_metadata import schema_utils _MAX_CATEGORICAL_FEATURE_VALUES = [24, 31, 12] _CATEGORICAL_FEATURE_KEYS = [ 'trip_s...
true
true
08f14fd815b00feca40d734cdbb99117b22b8b19
3,348
py
Python
kairon/chat/utils.py
rit1200/kairon
674a491f6deeae4800825ca93e0726e4fb6e0866
[ "Apache-2.0" ]
9
2020-04-22T12:49:29.000Z
2020-06-13T22:23:20.000Z
kairon/chat/utils.py
rit1200/kairon
674a491f6deeae4800825ca93e0726e4fb6e0866
[ "Apache-2.0" ]
18
2020-04-20T12:39:20.000Z
2020-05-21T05:10:51.000Z
kairon/chat/utils.py
rit1200/kairon
674a491f6deeae4800825ca93e0726e4fb6e0866
[ "Apache-2.0" ]
13
2020-04-21T12:12:40.000Z
2020-05-13T07:27:44.000Z
import json from typing import Text from loguru import logger from rasa.core.tracker_store import TrackerStore from .agent_processor import AgentProcessor from .. import Utility from ..live_agent.factory import LiveAgentFactory from ..shared.actions.utils import ActionUtility from ..shared.end_user_metrics.constants ...
45.863014
128
0.701912
import json from typing import Text from loguru import logger from rasa.core.tracker_store import TrackerStore from .agent_processor import AgentProcessor from .. import Utility from ..live_agent.factory import LiveAgentFactory from ..shared.actions.utils import ActionUtility from ..shared.end_user_metrics.constants ...
true
true
08f150c00e6258383b1736cd7a80c91767a78e8c
35
py
Python
agent/src/agent/api/forms/__init__.py
eacherkan-aternity/daria
7c77a2f52c09c852017b16949a848fa51f0fb579
[ "Apache-2.0" ]
16
2019-04-03T08:31:54.000Z
2021-01-24T17:12:04.000Z
agent/src/agent/api/forms/__init__.py
eacherkan-aternity/daria
7c77a2f52c09c852017b16949a848fa51f0fb579
[ "Apache-2.0" ]
10
2020-01-20T14:59:06.000Z
2022-01-21T10:19:16.000Z
agent/src/agent/api/forms/__init__.py
eacherkan-aternity/daria
7c77a2f52c09c852017b16949a848fa51f0fb579
[ "Apache-2.0" ]
5
2021-01-08T19:23:03.000Z
2021-11-09T14:15:49.000Z
import agent.api.forms.destination
17.5
34
0.857143
import agent.api.forms.destination
true
true
08f1515036217495c61f9dca00817ecebfffad04
585
py
Python
robot_prototype/robot_prototype/__init__.py
andyholst/robotic_experimentation
7238051e528ac6dd064a4603cf3789c0e44ad34b
[ "Apache-2.0" ]
1
2021-08-10T08:39:46.000Z
2021-08-10T08:39:46.000Z
robot_prototype/robot_prototype/__init__.py
andyholst/robotic_experimentation
7238051e528ac6dd064a4603cf3789c0e44ad34b
[ "Apache-2.0" ]
null
null
null
robot_prototype/robot_prototype/__init__.py
andyholst/robotic_experimentation
7238051e528ac6dd064a4603cf3789c0e44ad34b
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Andy Holst # # 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 writ...
39
75
0.748718
true
true
08f15181a942a70d9815387ec3392b13c4a875df
3,487
py
Python
bindings/python/ensmallen/datasets/string/blattabacteriumspnci.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/blattabacteriumspnci.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/blattabacteriumspnci.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Blattabacterium sp. Nci. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protei...
33.209524
223
0.677373
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def BlattabacteriumSpNci( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/strin...
true
true
08f151912f10d5934ec3ae4bf48de0fcd9f51d56
617
py
Python
dataset_tools/load_image.py
hangwudy/Mask_RCNN
8b5d896076b994e2f9136054114c551a8cb3119f
[ "MIT" ]
null
null
null
dataset_tools/load_image.py
hangwudy/Mask_RCNN
8b5d896076b994e2f9136054114c551a8cb3119f
[ "MIT" ]
null
null
null
dataset_tools/load_image.py
hangwudy/Mask_RCNN
8b5d896076b994e2f9136054114c551a8cb3119f
[ "MIT" ]
null
null
null
# coding: utf-8 # created by Hang Wu on 2018.10.07 # feedback: h.wu@tum.de import os def loadim(image_path = '', ext = 'png', key_word = 'car_door'): image_list = [] for filename in os.listdir(image_path): if filename.endswith(ext) and filename.find(key_word) != -1: current_p...
26.826087
69
0.625608
import os def loadim(image_path = '', ext = 'png', key_word = 'car_door'): image_list = [] for filename in os.listdir(image_path): if filename.endswith(ext) and filename.find(key_word) != -1: current_path = os.path.abspath(image_path) image_abs_path = os.path.join(c...
true
true
08f151f165e1e5063ea7c4937cf248aa7364c28c
3,676
py
Python
sdk/python/pulumi_azure_nextgen/__init__.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/__init__.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/__init__.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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! *** # Export this package's modules as members: from .provider import * # Make subpackages available: from . import ( aad, aadiam, addons, ...
19.553191
95
0.666757
# Export this package's modules as members: from .provider import * from . import ( aad, aadiam, addons, advisor, alertsmanagement, analysisservices, apimanagement, appconfiguration, appplatform, attestation, authorization, automanage, automation, autonomousdeve...
true
true
08f1520ccc07292835a628ba58db9bd555658e12
75,315
py
Python
src/python/pants/engine/internals/graph_test.py
ryansb/pants
4b335cdccfebcbd1f92caaa5fef7d5ca161c7226
[ "Apache-2.0" ]
null
null
null
src/python/pants/engine/internals/graph_test.py
ryansb/pants
4b335cdccfebcbd1f92caaa5fef7d5ca161c7226
[ "Apache-2.0" ]
null
null
null
src/python/pants/engine/internals/graph_test.py
ryansb/pants
4b335cdccfebcbd1f92caaa5fef7d5ca161c7226
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import itertools import os.path from dataclasses import dataclass from pathlib import PurePath from textwrap import dedent from typing import Iterable, ...
36.174352
111
0.622213
from __future__ import annotations import itertools import os.path from dataclasses import dataclass from pathlib import PurePath from textwrap import dedent from typing import Iterable, List, Set, Tuple, Type, cast import pytest from pants.base.specs import ( AddressLiteralSpec, AddressSpecs, FileGlobS...
true
true
08f152bf1c85283d38dfc5d9ef77a841dd72c5e7
1,744
py
Python
test-framework/test-suites/integration/tests/set/test_set_network_gateway.py
kmcm0/stacki
eb9dff1b45d5725b4986e567876bf61707fec28f
[ "BSD-3-Clause" ]
123
2015-05-12T23:36:45.000Z
2017-07-05T23:26:57.000Z
test-framework/test-suites/integration/tests/set/test_set_network_gateway.py
kmcm0/stacki
eb9dff1b45d5725b4986e567876bf61707fec28f
[ "BSD-3-Clause" ]
177
2015-06-05T19:17:47.000Z
2017-07-07T17:57:24.000Z
test-framework/test-suites/integration/tests/set/test_set_network_gateway.py
kmcm0/stacki
eb9dff1b45d5725b4986e567876bf61707fec28f
[ "BSD-3-Clause" ]
32
2015-06-07T02:25:03.000Z
2017-06-23T07:35:35.000Z
import json from textwrap import dedent class TestSetNetworkGateway: def test_no_networks(self, host): result = host.run('stack set network gateway') assert result.rc == 255 assert result.stderr == dedent('''\ error - "network" argument is required {network} {gateway=string} ''') def test_no_paramete...
29.066667
77
0.675459
import json from textwrap import dedent class TestSetNetworkGateway: def test_no_networks(self, host): result = host.run('stack set network gateway') assert result.rc == 255 assert result.stderr == dedent('''\ error - "network" argument is required {network} {gateway=string} ''') def test_no_paramete...
true
true
08f1538a503921cfd42f94aa33401b9d07cc698e
2,809
py
Python
day3/lab-guide-ans/lab2-problem2.py
WhatTheFar/practical-ai-bootcamp
e2fe013390c00df0a5486795a737d7b777266f35
[ "MIT" ]
null
null
null
day3/lab-guide-ans/lab2-problem2.py
WhatTheFar/practical-ai-bootcamp
e2fe013390c00df0a5486795a737d7b777266f35
[ "MIT" ]
null
null
null
day3/lab-guide-ans/lab2-problem2.py
WhatTheFar/practical-ai-bootcamp
e2fe013390c00df0a5486795a737d7b777266f35
[ "MIT" ]
null
null
null
import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import xlrd ''' Step 0: Suppress warning logs ''' os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' ''' Step 1: Read in data from the .xls file ''' DATA_FILE = 'data/fire_theft.xls' book = xlrd.open_workbook(DATA_FILE, encoding_override='ut...
30.532609
116
0.657885
import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import xlrd os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' DATA_FILE = 'data/fire_theft.xls' book = xlrd.open_workbook(DATA_FILE, encoding_override='utf-8') sheet = book.sheet_by_index(0) number_of_rows = len(list(sheet.get_rows())) data...
true
true
08f1566a9a26713e75a94bafd1f6aa8e28b603ec
12,799
py
Python
chemprop/utils.py
Varal7/chemprop-1
0b41649fb3c79d5d21c9165a345af4e59cfde688
[ "MIT" ]
null
null
null
chemprop/utils.py
Varal7/chemprop-1
0b41649fb3c79d5d21c9165a345af4e59cfde688
[ "MIT" ]
null
null
null
chemprop/utils.py
Varal7/chemprop-1
0b41649fb3c79d5d21c9165a345af4e59cfde688
[ "MIT" ]
null
null
null
from argparse import Namespace import csv import logging import math import os import pickle from typing import Callable, List, Tuple, Union from sklearn.metrics import auc, mean_absolute_error, mean_squared_error, precision_recall_curve, r2_score,\ roc_auc_score, accuracy_score, log_loss import torch import torch...
32.734015
115
0.655598
from argparse import Namespace import csv import logging import math import os import pickle from typing import Callable, List, Tuple, Union from sklearn.metrics import auc, mean_absolute_error, mean_squared_error, precision_recall_curve, r2_score,\ roc_auc_score, accuracy_score, log_loss import torch import torch...
true
true
08f156ee4061e3c8fa07beb0c24e5161590e2ec7
824
py
Python
tests/temporary_test_file.py
ThisIsNima/dwetl
12e06148929ec3ff5946345251c955cb4277d167
[ "Apache-2.0" ]
1
2021-04-08T11:58:51.000Z
2021-04-08T11:58:51.000Z
tests/temporary_test_file.py
tsboom/dwetl
b137b8ad3fa36fcabb6a0de33c23e1328b6e3a19
[ "Apache-2.0" ]
1
2019-12-17T16:41:25.000Z
2019-12-17T16:41:25.000Z
tests/temporary_test_file.py
ThisIsNima/dwetl
12e06148929ec3ff5946345251c955cb4277d167
[ "Apache-2.0" ]
3
2019-04-26T11:47:30.000Z
2022-03-05T06:11:57.000Z
import tempfile import os class TemporaryTestFile: """ ContextManager that creates a temporary file with the given lines that is deleted after use. Usage: lines = ['Line 1', 'Line 2'] with TemporaryTestFile(lines) as tempFilePath: # tempFilePath is the fully-qualified path to the file...
24.235294
77
0.581311
import tempfile import os class TemporaryTestFile: def __init__(self, lines): self.lines = lines def __enter__(self): _fd, path = tempfile.mkstemp() with open(path, 'w') as f: for line in self.lines: if not line.endswith('\n'): line = li...
true
true
08f158dcb1b92257cd320184f5d1d72345934557
3,260
py
Python
src/parsers/props_server.py
gabrielStanovsky/unified-factuality
869fd23ec8fe71ab2b9f30389018615932d27cde
[ "MIT" ]
7
2019-08-01T07:42:45.000Z
2021-12-11T12:51:42.000Z
src/parsers/props_server.py
gabrielStanovsky/unified-factuality
869fd23ec8fe71ab2b9f30389018615932d27cde
[ "MIT" ]
5
2017-08-11T02:37:05.000Z
2018-12-13T20:52:30.000Z
src/parsers/props_server.py
gabrielStanovsky/unified-factuality
869fd23ec8fe71ab2b9f30389018615932d27cde
[ "MIT" ]
2
2020-10-18T10:23:46.000Z
2021-04-14T08:29:13.000Z
#!/usr/bin/env python #coding:utf8 """ Usage: props_server --props=PATH_TO_PROPS [--port=PORT] Run a props instance and answer requests for dependency parsing on the specified port. The props parameter points to the root directory of PropS. Port specifies the port on which to run PropS (default: 8081) """ from bott...
29.908257
91
0.661043
from bottle import route, run, get, post, request, response, static_file import sys import bottle import os.path import codecs from docopt import docopt import logging import requests logging.basicConfig(level = logging.DEBUG) PROPS_PORT = 8081 def post_to_props(sent, hostname = 'http://127.0.0.1', port = PROPS_POR...
true
true
08f1591fda3d7dcdc50d29801c61ac1437b1ff41
1,668
py
Python
generativepy/utils.py
LloydTao/generativepy
8bf6afed57200cbebd3163e4fdc730fc8761e753
[ "MIT" ]
58
2019-06-15T16:09:28.000Z
2022-03-25T03:24:26.000Z
generativepy/utils.py
LloydTao/generativepy
8bf6afed57200cbebd3163e4fdc730fc8761e753
[ "MIT" ]
1
2021-09-09T16:12:18.000Z
2021-09-09T18:13:05.000Z
generativepy/utils.py
LloydTao/generativepy
8bf6afed57200cbebd3163e4fdc730fc8761e753
[ "MIT" ]
4
2020-07-26T10:54:19.000Z
2021-11-17T17:24:13.000Z
# Author: Martin McBride # Created: 2020-11-22 # Copyright (C) 2020, Martin McBride # License: MIT import sys import tempfile import os.path import math def correct_pycairo_byte_order(array, channels): ''' If byte ordering is little endian, bitmap data from Pycairo needs swapping Convert a numpy array fr...
26.0625
78
0.621103
import sys import tempfile import os.path import math def correct_pycairo_byte_order(array, channels): if sys.byteorder == 'little' and array.ndim == 3: if channels==3: array[:, :, [0, 1, 2]] = array[:, :, [2, 1, 0]] elif channels==4: array[:, :, [0, 1, 2, 3]] = array[:, :...
true
true
08f1596a6c334b8509ed86f3cadb43d0a56fdd36
25
py
Python
lf3py/data/config.py
rog-works/lambda-fw
715b36fc2d8d0ea0388aa4ac1336dc8cd5543778
[ "CNRI-Python" ]
null
null
null
lf3py/data/config.py
rog-works/lambda-fw
715b36fc2d8d0ea0388aa4ac1336dc8cd5543778
[ "CNRI-Python" ]
15
2020-12-05T13:52:13.000Z
2020-12-19T10:14:40.000Z
lf3py/data/config.py
rog-works/lambda-fw
715b36fc2d8d0ea0388aa4ac1336dc8cd5543778
[ "CNRI-Python" ]
null
null
null
class Config(dict): pass
12.5
24
0.76
class Config(dict): pass
true
true
08f15b637f8239fa1541505df112d90dd4908a55
882
py
Python
setup.py
ashbellett/linear-algebra
8f0acff9905b2cc2535961ef4e6d87120372d997
[ "MIT" ]
null
null
null
setup.py
ashbellett/linear-algebra
8f0acff9905b2cc2535961ef4e6d87120372d997
[ "MIT" ]
null
null
null
setup.py
ashbellett/linear-algebra
8f0acff9905b2cc2535961ef4e6d87120372d997
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r", encoding="utf-8") as file: long_description = file.read() setuptools.setup( name="linear_algebra", version="0.0.1", author="Ash Bellett", author_email="ash.bellett.ab@gmail.com", description="Implementations of linear algebra algorithms", long_...
31.5
77
0.668934
import setuptools with open("README.md", "r", encoding="utf-8") as file: long_description = file.read() setuptools.setup( name="linear_algebra", version="0.0.1", author="Ash Bellett", author_email="ash.bellett.ab@gmail.com", description="Implementations of linear algebra algorithms", long_...
true
true
08f15be7aaa460ce32ebff3a2f9ba754e0e5211f
28,475
py
Python
pytext/trainers/trainer.py
threefoldo/pytext
41d4041a833b1aa1615418e448ed6e3f08f90025
[ "BSD-3-Clause" ]
null
null
null
pytext/trainers/trainer.py
threefoldo/pytext
41d4041a833b1aa1615418e448ed6e3f08f90025
[ "BSD-3-Clause" ]
null
null
null
pytext/trainers/trainer.py
threefoldo/pytext
41d4041a833b1aa1615418e448ed6e3f08f90025
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import time, re from contextlib import ExitStack as contextlib_ExitStack from typing import Any, Iterable, List, Optional, Tuple import torch from pytext.common.constants import BatchContext, Stage from pyte...
40.736767
99
0.618824
import itertools import time, re from contextlib import ExitStack as contextlib_ExitStack from typing import Any, Iterable, List, Optional, Tuple import torch from pytext.common.constants import BatchContext, Stage from pytext.config import PyTextConfig from pytext.config.component import ( Component, Compone...
true
true
08f15c601b59283e61cedd1f2e14a451d6d2885a
2,229
py
Python
backend/winter_wood_31469/urls.py
crowdbotics-apps/winter-wood-31469
6ba2391bd2f459757bf3bd1ce48ca9e44296e037
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/winter_wood_31469/urls.py
crowdbotics-apps/winter-wood-31469
6ba2391bd2f459757bf3bd1ce48ca9e44296e037
[ "FTL", "AML", "RSA-MD" ]
10
2021-10-16T02:01:46.000Z
2021-10-16T02:01:52.000Z
backend/winter_wood_31469/urls.py
crowdbotics-apps/winter-wood-31469
6ba2391bd2f459757bf3bd1ce48ca9e44296e037
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""winter_wood_31469 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
35.380952
87
0.712427
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
08f15c82a1e2d2e0b54254f60efea2f0019d9f1c
130
py
Python
app/ui/commands.py
ExiledNarwal28/cardbot
1e0fa1e9c08b512056c2af0b408eded224c9adbb
[ "MIT" ]
null
null
null
app/ui/commands.py
ExiledNarwal28/cardbot
1e0fa1e9c08b512056c2af0b408eded224c9adbb
[ "MIT" ]
41
2020-05-10T20:18:19.000Z
2020-12-08T10:42:31.000Z
app/ui/commands.py
ExiledNarwal28/cardbot
1e0fa1e9c08b512056c2af0b408eded224c9adbb
[ "MIT" ]
null
null
null
from app.sessions.ui.commands import register_sessions_commands def register_commands(bot): register_sessions_commands(bot)
21.666667
63
0.838462
from app.sessions.ui.commands import register_sessions_commands def register_commands(bot): register_sessions_commands(bot)
true
true
08f15ca1d046fba1b78362fafb493db4d0d7f93e
3,679
py
Python
ellipses/script_train_radon_unet_jitter_v3.py
jmaces/robust-nets
25d49302f9fa5fcc9ded2727de75e96e25243d09
[ "MIT" ]
14
2020-11-10T07:37:23.000Z
2022-03-21T15:19:22.000Z
ellipses/script_train_radon_unet_jitter_v3.py
jmaces/robust-nets
25d49302f9fa5fcc9ded2727de75e96e25243d09
[ "MIT" ]
null
null
null
ellipses/script_train_radon_unet_jitter_v3.py
jmaces/robust-nets
25d49302f9fa5fcc9ded2727de75e96e25243d09
[ "MIT" ]
2
2021-03-13T14:39:36.000Z
2022-02-17T06:44:29.000Z
import os import matplotlib as mpl import torch import torchvision from data_management import IPDataset, Jitter, SimulateMeasurements from networks import IterativeNet, UNet from operators import Radon # ----- load configuration ----- import config # isort:skip # ----- global configuration ----- mpl.use("agg") d...
27.455224
75
0.616744
import os import matplotlib as mpl import torch import torchvision from data_management import IPDataset, Jitter, SimulateMeasurements from networks import IterativeNet, UNet from operators import Radon import config mpl.use("agg") device = torch.device("cuda:0") torch.cuda.set_device(0) theta = torch.linspace(0...
true
true
08f15dcae28fabf29c12da1f85a605bff4ac6ee9
15,472
py
Python
model.py
fabinsch/fast_human_pose
d2c4d625729f4bec7fd6c1b445cb4c92571ef666
[ "FSFAP" ]
null
null
null
model.py
fabinsch/fast_human_pose
d2c4d625729f4bec7fd6c1b445cb4c92571ef666
[ "FSFAP" ]
null
null
null
model.py
fabinsch/fast_human_pose
d2c4d625729f4bec7fd6c1b445cb4c92571ef666
[ "FSFAP" ]
null
null
null
import math import numpy as np import chainer from chainer.backends.cuda import get_array_module from chainer import reporter import chainer.functions as F import chainer.links as L from chainer import initializers if chainer.backends.cuda.available: import cupy as xp import logging logger = logging.getLogger(__na...
39.070707
144
0.548151
import math import numpy as np import chainer from chainer.backends.cuda import get_array_module from chainer import reporter import chainer.functions as F import chainer.links as L from chainer import initializers if chainer.backends.cuda.available: import cupy as xp import logging logger = logging.getLogger(__na...
true
true
08f15e9b31b18ec9f135f8b6b9b1fb99afe83f24
474
py
Python
intensity_normalization/cli/tissue_membership.py
radmodel/intensity-normalization
b7b39fc6ac74450bf5e19d32b4657dcfe96a9559
[ "Apache-2.0" ]
223
2018-08-03T03:41:45.000Z
2022-03-24T13:55:02.000Z
intensity_normalization/cli/tissue_membership.py
radmodel/intensity-normalization
b7b39fc6ac74450bf5e19d32b4657dcfe96a9559
[ "Apache-2.0" ]
52
2018-09-10T15:38:57.000Z
2022-03-17T19:04:37.000Z
intensity_normalization/cli/tissue_membership.py
radmodel/intensity-normalization
b7b39fc6ac74450bf5e19d32b4657dcfe96a9559
[ "Apache-2.0" ]
50
2018-12-04T06:51:55.000Z
2022-03-26T16:06:11.000Z
# -*- coding: utf-8 -*- """ intensity_normalization.cli.tissue_membership Author: Jacob Reinhold (jcreinhold@gmail.com) Created on: 13 Oct 2021 """ __all__ = ["tissue_membership_main", "tissue_membership_parser"] from intensity_normalization.util.tissue_membership import TissueMembershipFinder # main functions and ...
29.625
81
0.822785
__all__ = ["tissue_membership_main", "tissue_membership_parser"] from intensity_normalization.util.tissue_membership import TissueMembershipFinder tissue_membership_parser = TissueMembershipFinder.parser() tissue_membership_main = TissueMembershipFinder.main(tissue_membership_parser)
true
true
08f15f052fc5931cd8a0f36f68703f07b2cdd7a1
91,038
py
Python
contrib/client-side/svnmerge/svnmerge.py
markphip/subversion
b68ad49667ccd4a3fd3083c24909e6fcca4b8348
[ "Apache-2.0" ]
1
2022-03-07T11:20:02.000Z
2022-03-07T11:20:02.000Z
contrib/client-side/svnmerge/svnmerge.py
jmckaskill/subversion
b127ca427ed0ff175258f0b3e53485fc7652b7a0
[ "Apache-2.0" ]
1
2016-09-14T18:22:43.000Z
2016-09-14T18:22:43.000Z
contrib/client-side/svnmerge/svnmerge.py
jmckaskill/subversion
b127ca427ed0ff175258f0b3e53485fc7652b7a0
[ "Apache-2.0" ]
6
2015-10-24T06:23:10.000Z
2022-03-07T11:25:05.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005, Giovanni Bajo # Copyright (c) 2004-2005, Awarix, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation;...
38.267339
104
0.601913
import sys, os, getopt, re, types, tempfile, time, locale from bisect import bisect from xml.dom import pulldom NAME = "svnmerge" if not hasattr(sys, "version_info") or sys.version_info < (2, 0): error("requires Python 2.0 or newer") LOG_SEPARATOR = 8 * '.' LOG_SEPARATOR_RE = re.compile('^((%s)+)' % re.escape(LO...
false
true
08f15f76a2b11cef2c919504c7423cde1135c9a7
7,927
py
Python
in_progress/GiRaFFE_NRPy/GiRaFFE_NRPy_staggered_A2B.py
stevenrbrandt/nrpytutorial
219af363f810cc46ea8955a9d28cf075f2252582
[ "BSD-2-Clause" ]
66
2018-06-26T22:18:09.000Z
2022-02-09T21:12:33.000Z
in_progress/GiRaFFE_NRPy/GiRaFFE_NRPy_staggered_A2B.py
stevenrbrandt/nrpytutorial
219af363f810cc46ea8955a9d28cf075f2252582
[ "BSD-2-Clause" ]
14
2020-02-13T16:09:29.000Z
2021-11-12T14:59:59.000Z
in_progress/GiRaFFE_NRPy/GiRaFFE_NRPy_staggered_A2B.py
stevenrbrandt/nrpytutorial
219af363f810cc46ea8955a9d28cf075f2252582
[ "BSD-2-Clause" ]
30
2019-01-09T09:57:51.000Z
2022-03-08T18:45:08.000Z
# Step 0: Add NRPy's directory to the path # https://stackoverflow.com/questions/16780014/import-file-from-parent-directory import os,sys nrpy_dir_path = os.path.join("..") if nrpy_dir_path not in sys.path: sys.path.append(nrpy_dir_path) from outputC import outC_function_outdir_dict, outC_function_dict, outC_funct...
44.284916
180
0.611076
# https://stackoverflow.com/questions/16780014/import-file-from-parent-directory import os,sys nrpy_dir_path = os.path.join("..") if nrpy_dir_path not in sys.path: sys.path.append(nrpy_dir_path) from outputC import outC_function_outdir_dict, outC_function_dict, outC_function_prototype_dict, outC_function_master_li...
true
true
08f15fd6c7ad8aa263144bd2b1d7c2342186b587
554
py
Python
tests/integration/test_syntax.py
vladiibine/pygolang
da0f8d7aea32850ad685ffcc06a84285a3c384ca
[ "MIT" ]
null
null
null
tests/integration/test_syntax.py
vladiibine/pygolang
da0f8d7aea32850ad685ffcc06a84285a3c384ca
[ "MIT" ]
1
2020-11-19T08:51:16.000Z
2021-11-30T10:16:11.000Z
tests/integration/test_syntax.py
vladiibine/pygolang
da0f8d7aea32850ad685ffcc06a84285a3c384ca
[ "MIT" ]
null
null
null
from pygolang.interpreter import main from tests.integration.io_callback_fixture import FakeIO def test_grouping_expressions_in_conditionals(): io = FakeIO([ 'x:=1', 'if (!(1 == 2) && !(1 != 1)){x = 2}', 'x', ]) main(io) assert not io.stderr, io.format_stderr_for_debugging() ...
19.785714
58
0.586643
from pygolang.interpreter import main from tests.integration.io_callback_fixture import FakeIO def test_grouping_expressions_in_conditionals(): io = FakeIO([ 'x:=1', 'if (!(1 == 2) && !(1 != 1)){x = 2}', 'x', ]) main(io) assert not io.stderr, io.format_stderr_for_debugging() ...
true
true
08f160d64d8ae7ce4cddd68868089007f86144bc
2,018
bzl
Python
third_party/udpa/bazel/repositories.bzl
ZhifengZhang-CN/grpc-milvus
a77fc41cbd297a9c7fde33db74751c7658e241e3
[ "Apache-2.0" ]
1
2021-01-14T07:22:27.000Z
2021-01-14T07:22:27.000Z
third_party/udpa/bazel/repositories.bzl
ZhifengZhang-CN/grpc-milvus
a77fc41cbd297a9c7fde33db74751c7658e241e3
[ "Apache-2.0" ]
null
null
null
third_party/udpa/bazel/repositories.bzl
ZhifengZhang-CN/grpc-milvus
a77fc41cbd297a9c7fde33db74751c7658e241e3
[ "Apache-2.0" ]
4
2020-08-10T06:05:01.000Z
2021-12-12T09:26:50.000Z
load(":envoy_http_archive.bzl", "udpa_http_archive") load(":repository_locations.bzl", "REPOSITORY_LOCATIONS") # Make all contents of an external repository accessible under a filegroup. Used for external HTTP # archives, e.g. cares. BUILD_ALL_CONTENT = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["/...
30.575758
108
0.634291
load(":envoy_http_archive.bzl", "udpa_http_archive") load(":repository_locations.bzl", "REPOSITORY_LOCATIONS") BUILD_ALL_CONTENT = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])""" def udpa_api_dependencies(): udpa_http_archive( "bazel_gazelle", locations = R...
true
true
08f161798f7ee4cc4d6dcbf78e6a01de0eeaee7a
2,404
py
Python
examples/semmacape.py
Pangoraw/PaDiM
76f757fd51c46abda1ced5a26c2865c6d91a8cca
[ "MIT" ]
15
2021-05-27T09:06:24.000Z
2022-03-08T06:54:09.000Z
examples/semmacape.py
Pangoraw/PaDiM
76f757fd51c46abda1ced5a26c2865c6d91a8cca
[ "MIT" ]
6
2021-06-01T09:52:57.000Z
2021-12-21T13:24:15.000Z
examples/semmacape.py
Pangoraw/PaDiM
76f757fd51c46abda1ced5a26c2865c6d91a8cca
[ "MIT" ]
3
2021-05-27T13:35:29.000Z
2021-12-14T05:06:06.000Z
import os import pickle import torch from tqdm import tqdm import pandas as pd from PIL import Image from torchvision import transforms from torchvision.datasets import ImageFolder from torch.utils.data import DataLoader, Dataset from padim import PaDiM, PaDiMShared from padim.datasets import LimitedDataset class T...
27.318182
87
0.641847
import os import pickle import torch from tqdm import tqdm import pandas as pd from PIL import Image from torchvision import transforms from torchvision.datasets import ImageFolder from torch.utils.data import DataLoader, Dataset from padim import PaDiM, PaDiMShared from padim.datasets import LimitedDataset class T...
true
true
08f161b831e6b5769a1d7ec43a2066c3dd530f4f
626
py
Python
dashboard/migrations/0019_auto_20161210_1611.py
jarifibrahim/ashoka-dashboard
da975b31ba1508ef8b8cf71cbfd2118b572a322d
[ "Apache-2.0" ]
1
2021-11-26T03:41:22.000Z
2021-11-26T03:41:22.000Z
dashboard/migrations/0019_auto_20161210_1611.py
jarifibrahim/ashoka-dashboard
da975b31ba1508ef8b8cf71cbfd2118b572a322d
[ "Apache-2.0" ]
3
2017-02-04T05:12:47.000Z
2017-02-21T14:33:06.000Z
dashboard/migrations/0019_auto_20161210_1611.py
jarifibrahim/ashoka-dashboard
da975b31ba1508ef8b8cf71cbfd2118b572a322d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-10 10:41 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0018_auto_20161210_1559'), ] operations = [ migrations.AlterFi...
29.809524
207
0.670927
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dashboard', '0018_auto_20161210_1559'), ] operations = [ migrations.AlterField( model_name='weekwarning', name='calls_red_wa...
true
true
08f162dd7784901f37b6b7afa8d293255d52b3ff
17,056
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/operations/_local_network_gateways_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/operations/_local_network_gateways_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/operations/_local_network_gateways_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.377778
184
0.67935
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class LocalNetworkGatewaysOperations(object): models = models def __ini...
true
true
08f16420daa7a3535d664ad9d7609ca6b7e8a3a7
5,132
py
Python
sdk/python/pulumi_azure_nextgen/peering/latest/get_registered_asn.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/peering/latest/get_registered_asn.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/peering/latest/get_registered_asn.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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 from ... import _utilities, _tables __a...
37.188406
190
0.665043
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetRegisteredAsnResult', 'AwaitableGetRegisteredAsnResult', 'get_registered_asn', ] warnings.warn("""The 'latest' version is deprecated. Please m...
true
true
08f165744c5f5c783e25945bcad411cff9a0c1d7
8,530
py
Python
SeResnet-visdom-b.py
WangQingjiehello/homework
b81ce855c73b0a2fc7a2f0359cf283bef5582370
[ "Apache-2.0" ]
null
null
null
SeResnet-visdom-b.py
WangQingjiehello/homework
b81ce855c73b0a2fc7a2f0359cf283bef5582370
[ "Apache-2.0" ]
null
null
null
SeResnet-visdom-b.py
WangQingjiehello/homework
b81ce855c73b0a2fc7a2f0359cf283bef5582370
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from torch.utils.data import DataLoader import torch.nn.functional as F import torch.optim as optim import torch.nn.init as init import argparse from torch.nn.utils import clip_grad_norm import torchvision from torch.autograd import Variable import torchvision.transforms as transforms...
35.247934
137
0.605862
import torch import torch.nn as nn from torch.utils.data import DataLoader import torch.nn.functional as F import torch.optim as optim import torch.nn.init as init import argparse from torch.nn.utils import clip_grad_norm import torchvision from torch.autograd import Variable import torchvision.transforms as transforms...
true
true
08f165e937f68e256ddadf16e82bea08fbb5e65e
26,144
py
Python
geotrek/common/parsers.py
jmdecastel/GEOTADMIN
15547c0a99ae4c541ca517cdbc2cf17ab5c96f87
[ "BSD-2-Clause" ]
null
null
null
geotrek/common/parsers.py
jmdecastel/GEOTADMIN
15547c0a99ae4c541ca517cdbc2cf17ab5c96f87
[ "BSD-2-Clause" ]
null
null
null
geotrek/common/parsers.py
jmdecastel/GEOTADMIN
15547c0a99ae4c541ca517cdbc2cf17ab5c96f87
[ "BSD-2-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- import os import re import requests from requests.auth import HTTPBasicAuth import xlrd import xml.etree.ElementTree as ET import urllib2 from ftplib import FTP from os.path import dirname from urlparse import urlparse from django.db import models from django.conf import settings from djang...
39.020896
183
0.580018
import os import re import requests from requests.auth import HTTPBasicAuth import xlrd import xml.etree.ElementTree as ET import urllib2 from ftplib import FTP from os.path import dirname from urlparse import urlparse from django.db import models from django.conf import settings from django.contrib.auth import get_...
false
true
08f1664703b415bd18396d4c3f9ec0ac7c2f1fba
60,646
py
Python
psutil/tests/test_process.py
J-M0/psutil
39dc44bfa5fbb9500166b3480295379602e5bbc5
[ "BSD-3-Clause" ]
null
null
null
psutil/tests/test_process.py
J-M0/psutil
39dc44bfa5fbb9500166b3480295379602e5bbc5
[ "BSD-3-Clause" ]
null
null
null
psutil/tests/test_process.py
J-M0/psutil
39dc44bfa5fbb9500166b3480295379602e5bbc5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tests for psutil.Process class.""" import collections import errno import getpass import itertools import os import signal impo...
38.701978
79
0.570771
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import errno import getpass import itertools import os import signal import socket import stat import subprocess import sys import textwrap import time import types import psutil from psutil impo...
true
true
08f16660cc61b2ce2fc8d934f2575b7ea9f4699c
22,763
py
Python
volttrontesting/platform/dbutils/test_mysqlfuncts.py
gnmerritt/volttron
ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3
[ "Apache-2.0" ]
1
2021-04-06T21:28:38.000Z
2021-04-06T21:28:38.000Z
volttrontesting/platform/dbutils/test_mysqlfuncts.py
gnmerritt/volttron
ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3
[ "Apache-2.0" ]
null
null
null
volttrontesting/platform/dbutils/test_mysqlfuncts.py
gnmerritt/volttron
ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3
[ "Apache-2.0" ]
null
null
null
import contextlib import datetime from time import time import pytest import mysql.connector from volttron.platform.dbutils.mysqlfuncts import MySqlFuncts from volttrontesting.fixtures.docker_wrapper import create_container from volttrontesting.utils.utils import get_rand_port # mysqlfuncts was written for MYSQL 5....
37.07329
111
0.63836
import contextlib import datetime from time import time import pytest import mysql.connector from volttron.platform.dbutils.mysqlfuncts import MySqlFuncts from volttrontesting.fixtures.docker_wrapper import create_container from volttrontesting.utils.utils import get_rand_port IMAGES = ["mysql:5.7", ] TEST_DATABAS...
true
true
08f168380d09e46f86276f961b847fe2fd11f629
5,705
py
Python
TL-ERC/bert_model/data_loader.py
Anshul044/Project-NN
ef080846715a95b735f0381e4f60742e40791630
[ "MIT" ]
null
null
null
TL-ERC/bert_model/data_loader.py
Anshul044/Project-NN
ef080846715a95b735f0381e4f60742e40791630
[ "MIT" ]
null
null
null
TL-ERC/bert_model/data_loader.py
Anshul044/Project-NN
ef080846715a95b735f0381e4f60742e40791630
[ "MIT" ]
null
null
null
import random from collections import defaultdict from torch.utils.data import Dataset, DataLoader import numpy as np from pytorch_pretrained_bert.tokenization import BertTokenizer SEQ_LEN = 30 class DialogDataset(Dataset): def __init__(self, conversations, labels, conversation_length, sentence_length,...
36.107595
114
0.612796
import random from collections import defaultdict from torch.utils.data import Dataset, DataLoader import numpy as np from pytorch_pretrained_bert.tokenization import BertTokenizer SEQ_LEN = 30 class DialogDataset(Dataset): def __init__(self, conversations, labels, conversation_length, sentence_length,...
true
true
08f1689c32cc6f682a7216a6b83d0107e2ae8a61
2,837
py
Python
release/scripts/addons_contrib/amaranth/scene/goto_library.py
noorbeast/BlenderSource
65ebecc5108388965678b04b43463b85f6c69c1d
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
engine/2.80/scripts/addons_contrib/amaranth/scene/goto_library.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
engine/2.80/scripts/addons_contrib/amaranth/scene/goto_library.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful,...
31.175824
74
0.658795
import bpy class AMTH_FILE_PT_libraries(bpy.types.Panel): bl_space_type = "FILE_BROWSER" bl_region_type = "TOOLS" bl_category = "Bookmarks" bl_label = "Libraries" def draw(self, context): layout = self.layout libs = bpy.data.libraries libslist = [] impor...
true
true
08f1693f23e37a967336d7a06112c4f043535913
6,751
py
Python
sideboard/server.py
bitbyt3r/sideboard
45e13011a664543352d51ce073cfa9635c748bb7
[ "BSD-3-Clause" ]
4
2015-02-18T20:38:42.000Z
2021-11-17T10:10:34.000Z
sideboard/server.py
bitbyt3r/sideboard
45e13011a664543352d51ce073cfa9635c748bb7
[ "BSD-3-Clause" ]
84
2015-07-23T12:23:24.000Z
2018-08-04T05:09:30.000Z
sideboard/server.py
bitbyt3r/sideboard
45e13011a664543352d51ce073cfa9635c748bb7
[ "BSD-3-Clause" ]
10
2015-02-10T13:38:18.000Z
2020-05-23T20:01:36.000Z
from __future__ import unicode_literals import os import sys import six import cherrypy from cherrypy.lib import cpstats import sideboard from sideboard.internal import connection_checker from sideboard.jsonrpc import _make_jsonrpc_handler from sideboard.websockets import WebSocketDispatcher, WebSocketRoot, WebSocket...
36.295699
140
0.668049
from __future__ import unicode_literals import os import sys import six import cherrypy from cherrypy.lib import cpstats import sideboard from sideboard.internal import connection_checker from sideboard.jsonrpc import _make_jsonrpc_handler from sideboard.websockets import WebSocketDispatcher, WebSocketRoot, WebSocket...
true
true
08f16999fee96049f489b94aa52fdedc4f21258c
1,139
py
Python
setup.py
utepnetlab/ra
735c286708fe366d73ce260d727d2a9987345e7a
[ "MIT" ]
1
2021-01-01T21:31:35.000Z
2021-01-01T21:31:35.000Z
setup.py
utepnetlab/ra
735c286708fe366d73ce260d727d2a9987345e7a
[ "MIT" ]
null
null
null
setup.py
utepnetlab/ra
735c286708fe366d73ce260d727d2a9987345e7a
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="raViz", version="0.1.0", author="Christopher Mendoza", author_email="camendoza7@miners.utep.edu", description="Package to help create flow visualizations", long_description=''' # Ra Ra...
24.234043
121
0.691835
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="raViz", version="0.1.0", author="Christopher Mendoza", author_email="camendoza7@miners.utep.edu", description="Package to help create flow visualizations", long_description=''' # Ra Ra...
true
true
08f16af1c603206a3faae3d61f98fe9ce65add57
1,815
py
Python
configs/tridentnet/tridentnet_r50_caffe_1x_icdar2021_da.py
TriplePool/mmdetection
f72a87174ef9397b1e9239809bb961c8edbf4239
[ "Apache-2.0" ]
null
null
null
configs/tridentnet/tridentnet_r50_caffe_1x_icdar2021_da.py
TriplePool/mmdetection
f72a87174ef9397b1e9239809bb961c8edbf4239
[ "Apache-2.0" ]
null
null
null
configs/tridentnet/tridentnet_r50_caffe_1x_icdar2021_da.py
TriplePool/mmdetection
f72a87174ef9397b1e9239809bb961c8edbf4239
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../_base_/models/faster_rcnn_r50_caffe_c4_icdar2021.py', '../_base_/datasets/icdar2021_detection_da.py', '../_base_/schedules/schedule_1x_half_batch.py', '../_base_/default_runtime.py' ] model = dict( type='TridentFasterRCNN', pretrained='open-mmlab://detectron2/resnet50_caffe', bac...
33.611111
83
0.640771
_base_ = [ '../_base_/models/faster_rcnn_r50_caffe_c4_icdar2021.py', '../_base_/datasets/icdar2021_detection_da.py', '../_base_/schedules/schedule_1x_half_batch.py', '../_base_/default_runtime.py' ] model = dict( type='TridentFasterRCNN', pretrained='open-mmlab://detectron2/resnet50_caffe', bac...
true
true
08f16c0060148501cfc3bd34eeae53b1e192d5e5
658
py
Python
data/test/python/08f16c0060148501cfc3bd34eeae53b1e192d5e5float_leg_payoff.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/test/python/08f16c0060148501cfc3bd34eeae53b1e192d5e5float_leg_payoff.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/test/python/08f16c0060148501cfc3bd34eeae53b1e192d5e5float_leg_payoff.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
class float_leg_payoff(object): def __call__(self, t, controller): event = controller.get_event() flow = event.flow() id = event.reset_id() obs = flow.observables()[id] model = controller.get_model() env = controller.get_environment() adjuvant_table = controller.get_adjuvant_table() #...
38.705882
76
0.679331
class float_leg_payoff(object): def __call__(self, t, controller): event = controller.get_event() flow = event.flow() id = event.reset_id() obs = flow.observables()[id] model = controller.get_model() env = controller.get_environment() adjuvant_table = controller.get_adjuvant_table() ...
true
true
08f16c3f79fe333bbb639cbb79adde6238aeb9d3
7,780
py
Python
alembic/versions/cd7e3f9a5d64_admin_and_ownership_provisioning_steps.py
albertwo1978/atst
60d0c688b328bf3385b07885ff33d215e42ac395
[ "MIT" ]
1
2020-01-16T16:15:52.000Z
2020-01-16T16:15:52.000Z
alembic/versions/cd7e3f9a5d64_admin_and_ownership_provisioning_steps.py
albertwo1978/atst
60d0c688b328bf3385b07885ff33d215e42ac395
[ "MIT" ]
null
null
null
alembic/versions/cd7e3f9a5d64_admin_and_ownership_provisioning_steps.py
albertwo1978/atst
60d0c688b328bf3385b07885ff33d215e42ac395
[ "MIT" ]
null
null
null
"""Admin and Ownership Provisioning Steps Revision ID: cd7e3f9a5d64 Revises: 508957112ed6 Create Date: 2020-01-30 10:38:04.182953 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "cd7e3f9a5d64" # pragma: allowlist secret down_revision = "508957112ed6" # pragma:...
39.095477
65
0.63419
from alembic import op import sqlalchemy as sa revision = "cd7e3f9a5d64" down_revision = "508957112ed6" branch_labels = None depends_on = None def upgrade(): op.alter_column( "portfolio_state_machines", "state", type_=sa.Enum( "UNSTARTED", "STARTING", ...
true
true
08f16c73f38ed1e5b927e345884bca1f5a681889
1,074
py
Python
pytorch-a2c-ppo-acktr/GatedPixelCNN/core/data/data_test_utils.py
leobix/gym-miniworld
8b84c0370c665eb349512d779cc47b1f1b06a41a
[ "MIT" ]
28
2017-03-08T07:12:22.000Z
2021-09-06T00:43:29.000Z
pytorch-a2c-ppo-acktr/GatedPixelCNN/core/data/data_test_utils.py
leobix/gym-miniworld
8b84c0370c665eb349512d779cc47b1f1b06a41a
[ "MIT" ]
2
2019-05-28T14:55:22.000Z
2020-03-18T01:17:50.000Z
pytorch-a2c-ppo-acktr/GatedPixelCNN/core/data/data_test_utils.py
leobix/gym-miniworld
8b84c0370c665eb349512d779cc47b1f1b06a41a
[ "MIT" ]
9
2018-04-10T07:45:43.000Z
2019-03-25T13:45:33.000Z
import numpy as np def test_dataset(dataset, image=None, label=None): images = dataset.images labels = dataset.labels if image is not None: print(images[0,18,6:22,:]) np.testing.assert_almost_equal(images[0,18,6:22,:], image) if label is not None: if isinstance(label, int): print(labels[0]...
31.588235
101
0.692737
import numpy as np def test_dataset(dataset, image=None, label=None): images = dataset.images labels = dataset.labels if image is not None: print(images[0,18,6:22,:]) np.testing.assert_almost_equal(images[0,18,6:22,:], image) if label is not None: if isinstance(label, int): print(labels[0]...
true
true
08f16c839d78c69e6099874edb8715baefa24cf3
57,490
py
Python
keystone/tests/unit/test_cli.py
lbragstad/keystone
39055dc6a0738519c90c8f6af8a00287eb61c9de
[ "Apache-2.0" ]
null
null
null
keystone/tests/unit/test_cli.py
lbragstad/keystone
39055dc6a0738519c90c8f6af8a00287eb61c9de
[ "Apache-2.0" ]
1
2018-02-28T17:27:41.000Z
2018-02-28T17:27:41.000Z
keystone/tests/unit/test_cli.py
lbragstad/keystone
39055dc6a0738519c90c8f6af8a00287eb61c9de
[ "Apache-2.0" ]
1
2018-01-16T12:18:21.000Z
2018-01-16T12:18:21.000Z
# Copyright 2014 IBM Corp. # # 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, s...
43.68541
79
0.657158
import logging import os import uuid import fixtures import mock import oslo_config.fixture from oslo_db.sqlalchemy import migration from oslo_log import log from six.moves import configparser from six.moves import range from testtools import matchers from keystone.auth import controllers from keystone.cmd import cl...
true
true
08f16cfba5a20c8eb794a54a3efa4e6922db6785
441
py
Python
new_member.py
rrmad/mihir-bot
f7eac3542787593e957e0a66c769ae7202493c60
[ "MIT" ]
null
null
null
new_member.py
rrmad/mihir-bot
f7eac3542787593e957e0a66c769ae7202493c60
[ "MIT" ]
null
null
null
new_member.py
rrmad/mihir-bot
f7eac3542787593e957e0a66c769ae7202493c60
[ "MIT" ]
null
null
null
import discord client = discord.Client() @client.event async def on_member_join(member): server = member.server fmt = 'Welcome {0.mention} to {1.name}!' await client.send_message(server, fmt.format(member, server)) @client.event async def on_ready(): print('Logged in as') print(client.user.name) ...
23.210526
73
0.709751
import discord client = discord.Client() @client.event async def on_member_join(member): server = member.server fmt = 'Welcome {0.mention} to {1.name}!' await client.send_message(server, fmt.format(member, server)) @client.event async def on_ready(): print('Logged in as') print(client.user.name) ...
true
true
08f16d50fcfe611f379a948801aca646ff6eb4ea
13,652
py
Python
lightautoml/dataset/base.py
Cybsloth/LightAutoML
3395608f1ff74b0110dc446af97ac9fc862d1212
[ "Apache-2.0" ]
2
2022-01-27T16:40:04.000Z
2022-03-10T12:57:45.000Z
lightautoml/dataset/base.py
ahmedopolis/LightAutoML
77b49ecb08b4cd655fda7564a7e55c0bf2d124da
[ "Apache-2.0" ]
null
null
null
lightautoml/dataset/base.py
ahmedopolis/LightAutoML
77b49ecb08b4cd655fda7564a7e55c0bf2d124da
[ "Apache-2.0" ]
null
null
null
"""Contains base classes for internal dataset interface.""" from copy import copy # , deepcopy from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Sequence from typing import Tuple from typing import Union from ..tasks.base import Task from .roles imp...
27.249501
129
0.568854
from copy import copy from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Sequence from typing import Tuple from typing import Union from ..tasks.base import Task from .roles import ColumnRole valid_array_attributes = ("target", "group", "folds", "w...
true
true
08f16dd0b2daad75ddb8fd06dd30b20b40516521
194
pyw
Python
VoiceRecorder.pyw
espdev/VoiceRecorder
80c30fffbd4e1e92193acb1b4b860398050bdcbd
[ "MIT" ]
6
2018-07-06T02:51:16.000Z
2021-12-27T18:14:15.000Z
VoiceRecorder.pyw
espdev/VoiceRecorder
80c30fffbd4e1e92193acb1b4b860398050bdcbd
[ "MIT" ]
null
null
null
VoiceRecorder.pyw
espdev/VoiceRecorder
80c30fffbd4e1e92193acb1b4b860398050bdcbd
[ "MIT" ]
3
2021-01-19T13:08:00.000Z
2021-12-27T18:14:16.000Z
# -*- coding: utf-8 -*- """ VoiceRecorder is a simple application for voice recording """ import sys from voicerecorder.__main__ import main if __name__ == '__main__': sys.exit(main())
13.857143
57
0.685567
import sys from voicerecorder.__main__ import main if __name__ == '__main__': sys.exit(main())
true
true
08f16e330db8166e9dae096eaf1afac747ea6f5a
25,878
py
Python
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_kronecker.py
chrism0dwk/probability
ab260f15cae94c6802c2f2769fb448ad213b79cd
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_kronecker.py
chrism0dwk/probability
ab260f15cae94c6802c2f2769fb448ad213b79cd
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_kronecker.py
chrism0dwk/probability
ab260f15cae94c6802c2f2769fb448ad213b79cd
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The TensorFlow Probability Authors. All Rights Reserved. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # THIS FILE IS AUTO-GENERATED BY `gen_linear_operators.py`. # DO NOT MODIFY DIRECTLY. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
41.471154
97
0.682124
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow_probability.python.internal.backend.numpy import ops as common_shapes from tensorflow_probability.python.internal.backend.numpy import errors from tensorflow_probability.python.internal.backen...
true
true
08f170ecc16c1e2ab670b86c02b0ba91ca1134da
1,908
py
Python
Python revisao2020 converter e cores.py
Hipparcus/Python-Learning
a3bd5787ceb67f20a0a053e3db4cf77a18e12112
[ "MIT" ]
null
null
null
Python revisao2020 converter e cores.py
Hipparcus/Python-Learning
a3bd5787ceb67f20a0a053e3db4cf77a18e12112
[ "MIT" ]
null
null
null
Python revisao2020 converter e cores.py
Hipparcus/Python-Learning
a3bd5787ceb67f20a0a053e3db4cf77a18e12112
[ "MIT" ]
null
null
null
##Revisao rapidinha def convertor(): n=int(input("Digite um numero.")) b=int(input("Escolha a base o qual converter.\n(1) Binaria.\n(2) Octal.\n(3) Hexadecimal\n")) if (b==1): print("O numero {} em forma binaria eh {} \n".format(n,bin(n)[2:])) ##Recortando para nao aparecer as letras iniciais (b pra binario, x pra...
31.278689
150
0.611111
def convertor(): n=int(input("Digite um numero.")) b=int(input("Escolha a base o qual converter.\n(1) Binaria.\n(2) Octal.\n(3) Hexadecimal\n")) if (b==1): print("O numero {} em forma binaria eh {} \n".format(n,bin(n)[2:])) elif (b==2): print("O numero {} em forma octal eh {} \n".format(n,oct(n)[2:])) elif (b=...
true
true
08f171437d76b0976141e1099effeb9048ff9f40
876
py
Python
tests/test_calculator.py
GeorgiosGoniotakis/python-hierarchy
991401b80a3938650ec331e9a9a249badf6c918a
[ "MIT" ]
5
2019-09-11T12:51:32.000Z
2022-02-01T04:26:08.000Z
tests/test_calculator.py
GeorgiosGoniotakis/python-hierarchy
991401b80a3938650ec331e9a9a249badf6c918a
[ "MIT" ]
null
null
null
tests/test_calculator.py
GeorgiosGoniotakis/python-hierarchy
991401b80a3938650ec331e9a9a249badf6c918a
[ "MIT" ]
5
2020-02-17T06:15:45.000Z
2022-02-04T20:13:20.000Z
""" This file includes all the Unit Tests of the project. """ from unittest import TestCase from source.utils.calculation import Calculation class TestScript(TestCase): """ Checks the functionality of the Calculator utility. """ def test_addition(self): """ Checks the functionality ...
23.052632
55
0.614155
from unittest import TestCase from source.utils.calculation import Calculation class TestScript(TestCase): def test_addition(self): assert Calculation.addition(1, 1) == 2 def test_subtraction(self): assert Calculation.subtraction(2, 1) == 1 def test_multiplication(self): asser...
true
true
08f17167e47f6eb93df5d803975687ce482fd87e
21,645
py
Python
functorch/_src/aot_autograd.py
zou3519/functorch
48eec0a05bb169cd9e4b699dc191670d47ee61ca
[ "BSD-3-Clause" ]
94
2021-04-27T21:04:42.000Z
2021-05-25T09:44:39.000Z
functorch/_src/aot_autograd.py
zou3519/functorch
48eec0a05bb169cd9e4b699dc191670d47ee61ca
[ "BSD-3-Clause" ]
39
2021-04-28T10:00:22.000Z
2021-05-26T21:31:43.000Z
functorch/_src/aot_autograd.py
zou3519/functorch
48eec0a05bb169cd9e4b699dc191670d47ee61ca
[ "BSD-3-Clause" ]
2
2021-04-27T21:18:42.000Z
2021-05-13T13:30:40.000Z
import os import math import torch import torch.nn as nn from torch import Tensor from functorch import make_functional_with_buffers, make_fx import torch.fx as fx from torch.fx import immutable_collections import torch.utils._pytree as pytree import torch.utils.dlpack from torch.fx.passes import graph_drawer import co...
37.90718
790
0.674059
import os import math import torch import torch.nn as nn from torch import Tensor from functorch import make_functional_with_buffers, make_fx import torch.fx as fx from torch.fx import immutable_collections import torch.utils._pytree as pytree import torch.utils.dlpack from torch.fx.passes import graph_drawer import co...
true
true
08f171b4baf99cf468d9a5a9721d83a4738e01c4
38
py
Python
corefacility/authorizations/cookie/entity/__init__.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
corefacility/authorizations/cookie/entity/__init__.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
corefacility/authorizations/cookie/entity/__init__.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
from .cookie import Cookie, CookieSet
19
37
0.815789
from .cookie import Cookie, CookieSet
true
true
08f1725d3a82b57fb8c99beb62b7358534d972f6
1,250
py
Python
ErrorListener.py
jaredvann/UntitledLanguage
456f3a636d62028a85ee61eb3a9f04214f799e78
[ "MIT" ]
2
2020-02-07T13:20:03.000Z
2020-06-29T15:58:30.000Z
ErrorListener.py
jaredvann/UntitledLanguage
456f3a636d62028a85ee61eb3a9f04214f799e78
[ "MIT" ]
1
2020-05-09T07:22:42.000Z
2020-05-09T07:22:42.000Z
ErrorListener.py
jaredvann/Untitled-Language
456f3a636d62028a85ee61eb3a9f04214f799e78
[ "MIT" ]
null
null
null
from antlr4.error.ErrorListener import ErrorListener as AntlrErrorListener class SyntaxError(Exception): def __init__(self, line: int, column: int, msg: str): self.line = line self.column = column self.msg = msg def __str__(self): return f"[{self.line}:{self.column}]: {self...
35.714286
110
0.7088
from antlr4.error.ErrorListener import ErrorListener as AntlrErrorListener class SyntaxError(Exception): def __init__(self, line: int, column: int, msg: str): self.line = line self.column = column self.msg = msg def __str__(self): return f"[{self.line}:{self.column}]: {self...
true
true
08f17335dba36a7e65eceddb4511b55677b52169
727
py
Python
Geometry/HcalAlgo/python/testGeomHEPhase1_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
1
2018-07-25T03:57:34.000Z
2018-07-25T03:57:34.000Z
Geometry/HcalAlgo/python/testGeomHEPhase1_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
Geometry/HcalAlgo/python/testGeomHEPhase1_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
2
2019-09-27T08:33:22.000Z
2019-11-14T10:52:30.000Z
import FWCore.ParameterSet.Config as cms XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/eta3/etaMax.xml', 'Geom...
42.764706
81
0.700138
import FWCore.ParameterSet.Config as cms XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/eta3/etaMax.xml', 'Geom...
true
true
08f1739e8a71da03c2ae91b24340c73b1e19ecb6
1,596
py
Python
main.py
sbchrist/python-hashmap-implementation
5b2d53a07b8e6ccd058811ee9d51e3a2aa0cf3ef
[ "MIT" ]
null
null
null
main.py
sbchrist/python-hashmap-implementation
5b2d53a07b8e6ccd058811ee9d51e3a2aa0cf3ef
[ "MIT" ]
null
null
null
main.py
sbchrist/python-hashmap-implementation
5b2d53a07b8e6ccd058811ee9d51e3a2aa0cf3ef
[ "MIT" ]
null
null
null
from LinearProbingHash import LinearProbeHashMap from QuadProbingHash import QuadProbeHashMap from DoubleHash import DoubleProbeHashMap def parse_text_file(name): temp_data = [] f = open(name,'r') lines = f.readlines() data = lines[0:] for i in data: temp_data.append(i.strip().split()) ...
31.294118
90
0.649123
from LinearProbingHash import LinearProbeHashMap from QuadProbingHash import QuadProbeHashMap from DoubleHash import DoubleProbeHashMap def parse_text_file(name): temp_data = [] f = open(name,'r') lines = f.readlines() data = lines[0:] for i in data: temp_data.append(i.strip().split()) ...
true
true
08f173d1b9ba2982a71aa60667f4641f75aef0e5
1,548
py
Python
notebooks/tools/glm.py
manjebrinkhuis/attention-priming-decay
067cb8daeebd24dd2726d4d56f7d38ef7185c817
[ "MIT" ]
null
null
null
notebooks/tools/glm.py
manjebrinkhuis/attention-priming-decay
067cb8daeebd24dd2726d4d56f7d38ef7185c817
[ "MIT" ]
null
null
null
notebooks/tools/glm.py
manjebrinkhuis/attention-priming-decay
067cb8daeebd24dd2726d4d56f7d38ef7185c817
[ "MIT" ]
null
null
null
import numpy as np def add_regressors(matrix, regressors): """ Add a regressor to a design matrix """ M = np.array(matrix) return np.vstack((M, regressors)) def array2dummies(arr): """ Returns matrix """ values = sorted(list(set(arr))) values = np.array([[v] for v in values]) return (arr...
25.377049
76
0.604005
import numpy as np def add_regressors(matrix, regressors): M = np.array(matrix) return np.vstack((M, regressors)) def array2dummies(arr): values = sorted(list(set(arr))) values = np.array([[v] for v in values]) return (arr == values) def n_back_array(arr, n_back): arr = np.array(arr) p...
true
true
08f174fbbc3d416d6767555c716c95fb7b224ed8
6,820
py
Python
pysnmp/CISCO-DMN-DSG-TSOUT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-DMN-DSG-TSOUT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-DMN-DSG-TSOUT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-DMN-DSG-TSOUT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DMN-DSG-TSOUT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:37:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 ...
131.153846
648
0.757038
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.impo...
true
true
08f17655b8954bccf1504aa8c317284d3f81ee41
2,154
py
Python
snippets/3DEM/Z_oldscratch/scratch8.py
michielkleinnijenhuis/EM
f46a9b11298919b359e80d9f23a7e824df1356cb
[ "Apache-2.0" ]
null
null
null
snippets/3DEM/Z_oldscratch/scratch8.py
michielkleinnijenhuis/EM
f46a9b11298919b359e80d9f23a7e824df1356cb
[ "Apache-2.0" ]
null
null
null
snippets/3DEM/Z_oldscratch/scratch8.py
michielkleinnijenhuis/EM
f46a9b11298919b359e80d9f23a7e824df1356cb
[ "Apache-2.0" ]
null
null
null
scriptdir="$HOME/workspace/EM" DATA="$HOME/oxdata" datadir="$DATA/P01/EM/M3/M3_S1_GNU" dataset='m000' z=30; Z=460; x=5000 [ $x == 5000 ] && X=5217 || X=$((x+1000)) for y in 0 1000 2000 3000 4000; do [ $y == 4000 ] && Y=4460 || Y=$((y+1000)) datastem=${dataset}_`printf %05d ${x}`-`printf %05d ${X}`_`printf %05d ${y}`-`...
35.311475
133
0.608635
scriptdir="$HOME/workspace/EM" DATA="$HOME/oxdata" datadir="$DATA/P01/EM/M3/M3_S1_GNU" dataset='m000' z=30; Z=460; x=5000 [ $x == 5000 ] && X=5217 || X=$((x+1000)) for y in 0 1000 2000 3000 4000; do [ $y == 4000 ] && Y=4460 || Y=$((y+1000)) datastem=${dataset}_`printf %05d ${x}`-`printf %05d ${X}`_`printf %05d ${y}`-`...
false
true