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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f720841a7564a5f85416ab65a54983fa155787e0
282
py
Python
Seguranca/Ping/pingmultiplo.py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
1
2022-03-24T21:30:53.000Z
2022-03-24T21:30:53.000Z
Seguranca-com-python/Ping/pingmultiplo.py
Luis12368/Bootcamp-Cognizant-Cloud-Data-Engineer
789216a6fa76e4cb1336a73ed861bcf2e9d03751
[ "MIT" ]
null
null
null
Seguranca-com-python/Ping/pingmultiplo.py
Luis12368/Bootcamp-Cognizant-Cloud-Data-Engineer
789216a6fa76e4cb1336a73ed861bcf2e9d03751
[ "MIT" ]
null
null
null
import os import time with open('hosts.txt') as file: dump = file.read() dump = dump.splitlines() for ip in dump: print("Verificando o IP", ip) print("-" * 60) os.system('ping -n 2 {}'.format(ip)) print("-" * 60) time.sleep(5)
18.8
44
0.524823
import os import time with open('hosts.txt') as file: dump = file.read() dump = dump.splitlines() for ip in dump: print("Verificando o IP", ip) print("-" * 60) os.system('ping -n 2 {}'.format(ip)) print("-" * 60) time.sleep(5)
true
true
f72084785a53b5effc7e214a1463c10da25fda6e
58,018
py
Python
salt/utils/schema.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
2
2018-11-08T02:59:24.000Z
2021-01-04T00:30:50.000Z
salt/utils/schema.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
4
2020-09-04T10:19:34.000Z
2020-11-09T12:55:59.000Z
salt/utils/schema.py
johnskopis/salt
86adb6b0fe40230b8be4c74229e897a7a08f81a6
[ "Apache-2.0" ]
5
2017-06-16T23:48:13.000Z
2021-04-08T17:43:48.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Pedro Algarvio (pedro@algarvio.me) :codeauthor: Alexandru Bleotu (alexandru.bleotu@morganstanley.com) salt.utils.schema ~~~~~~~~~~~~~~~~~ Object Oriented Configuration - JSON Schema compatible generator This code was inspired by `jsl`__, "A Python DSL...
36.466373
122
0.561688
from __future__ import absolute_import, print_function, unicode_literals import sys import inspect import textwrap import functools import salt.utils.args from salt.utils.odict import OrderedDict from salt.ext import six BASE_SCHEMA_URL = 'https://non-existing.saltstack.com/schemas' RENDER_COMMENT_YAML_MAX_LINE...
true
true
f720868bb7566cf137aaa7665b5dbd671fef24fb
2,738
py
Python
skfem/element/element_tet/element_tet_p2.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element_tet/element_tet_p2.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element_tet/element_tet_p2.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from ..element_h1 import ElementH1 class ElementTetP2(ElementH1): nodal_dofs = 1 edge_dofs = 1 dim = 3 maxdeg = 2 dofnames = ['u', 'u'] doflocs = np.array([[0., 0., 0.], [1., 0., 0.], [0., 1., 0.], [0., ...
27.38
62
0.233382
import numpy as np from ..element_h1 import ElementH1 class ElementTetP2(ElementH1): nodal_dofs = 1 edge_dofs = 1 dim = 3 maxdeg = 2 dofnames = ['u', 'u'] doflocs = np.array([[0., 0., 0.], [1., 0., 0.], [0., 1., 0.], [0., ...
true
true
f720884f949f265d08ef7c4e59ff5312172239dc
5,043
py
Python
back/Hera/utils.py
pingPoltergeist/Hera
519336cebbcf14ff3da6299e946407788121a0b7
[ "MIT" ]
1
2021-12-09T11:37:20.000Z
2021-12-09T11:37:20.000Z
back/Hera/utils.py
pingPoltergeist/Hera
519336cebbcf14ff3da6299e946407788121a0b7
[ "MIT" ]
1
2021-11-05T09:14:50.000Z
2021-11-05T09:14:50.000Z
back/Hera/utils.py
pingPoltergeist/Hera
519336cebbcf14ff3da6299e946407788121a0b7
[ "MIT" ]
2
2022-01-13T15:12:36.000Z
2022-03-10T01:35:25.000Z
import traceback from pathlib import Path import hashlib import yaml def get_media_dirs(media_dir_stream): result = dict() movie_dir_map = dict() for media_location in media_dir_stream[0].replace('\n', '').replace('\r', '').split(','): movie_dir_map[hashlib.md5(media_location.encode('utf-8')).hexd...
39.398438
112
0.584969
import traceback from pathlib import Path import hashlib import yaml def get_media_dirs(media_dir_stream): result = dict() movie_dir_map = dict() for media_location in media_dir_stream[0].replace('\n', '').replace('\r', '').split(','): movie_dir_map[hashlib.md5(media_location.encode('utf-8')).hexd...
true
true
f7208878a3eceaf4d90f7cc71177db7ce94487d3
6,366
py
Python
son.py
nathanmartins/Son-Of-Anton
d45eec2b9263dbd981f468219c9d0fb049bd481d
[ "MIT" ]
null
null
null
son.py
nathanmartins/Son-Of-Anton
d45eec2b9263dbd981f468219c9d0fb049bd481d
[ "MIT" ]
null
null
null
son.py
nathanmartins/Son-Of-Anton
d45eec2b9263dbd981f468219c9d0fb049bd481d
[ "MIT" ]
null
null
null
import logging import math import os import pickle import re import PIL.Image import numpy as np from mtcnn import MTCNN from numpy import expand_dims from sklearn import preprocessing, neighbors from tensorflow_core.python.keras.models import load_model BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATASET_D...
30.028302
112
0.600377
import logging import math import os import pickle import re import PIL.Image import numpy as np from mtcnn import MTCNN from numpy import expand_dims from sklearn import preprocessing, neighbors from tensorflow_core.python.keras.models import load_model BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATASET_D...
true
true
f72088a05bdf713d0b6f36ecd12b25eb950976d1
12,785
py
Python
raiden/exceptions.py
luehrsFred/raiden
a1b118ebe14badb1acd0744b2d7f2b39f8ba5313
[ "MIT" ]
null
null
null
raiden/exceptions.py
luehrsFred/raiden
a1b118ebe14badb1acd0744b2d7f2b39f8ba5313
[ "MIT" ]
69
2020-07-21T05:49:21.000Z
2022-03-08T18:09:44.000Z
raiden/exceptions.py
luehrsFred/raiden
a1b118ebe14badb1acd0744b2d7f2b39f8ba5313
[ "MIT" ]
null
null
null
""" What do you want from this file? 1. I need to look up when to raise what. Then read on the docstrings. 2. I have to add a new exception. Make sure you catch it somewhere. Sometimes you'll realize you cannot catch it. Especially, if your new exception indicates bug in the Raiden codebase, you are no...
31.882793
97
0.732264
import enum from typing import Any, Dict, List @enum.unique class PFSError(enum.IntEnum): INVALID_REQUEST = 2000 INVALID_SIGNATURE = 2001 REQUEST_OUTDATED = 2002 BAD_IOU = 2100 MISSING_IOU = 2101 WRONG_IOU_RECIPIENT = 2102 IOU_EXPIRED_TOO_EARLY = 2103 INSUFFICIENT_SER...
true
true
f7208908dd0f530934afcd736f133ab23168b854
1,172
py
Python
setup.py
njdanielsen/aws-data-wrangler
5cdb316224370e952dfb3a701825e1b1ab331105
[ "Apache-2.0" ]
null
null
null
setup.py
njdanielsen/aws-data-wrangler
5cdb316224370e952dfb3a701825e1b1ab331105
[ "Apache-2.0" ]
null
null
null
setup.py
njdanielsen/aws-data-wrangler
5cdb316224370e952dfb3a701825e1b1ab331105
[ "Apache-2.0" ]
null
null
null
import os from io import open from typing import Dict from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) about: Dict[str, str] = {} path = os.path.join(here, "awswrangler", "__metadata__.py") with open(file=path, mode="r", encoding="utf-8") as f: exec(f.read(), about) w...
31.675676
73
0.664676
import os from io import open from typing import Dict from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) about: Dict[str, str] = {} path = os.path.join(here, "awswrangler", "__metadata__.py") with open(file=path, mode="r", encoding="utf-8") as f: exec(f.read(), about) w...
true
true
f72089bdffb1bfe66db8bea55840dc0bef158c5f
18,291
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_web_application_firewall_policies_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-05-12T23:29:15.000Z
2020-05-12T23:29:15.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_web_application_firewall_policies_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/v2019_12_01/operations/_web_application_firewall_policies_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
46.780051
199
0.668526
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 WebApplicationFirewallPoliciesOperations(object): models = m...
true
true
f7208a0bce6ed5a17f46fdcb513416605ec0135f
3,249
py
Python
cfgov/v1/models/browse_page.py
atuggle/cfgov-refresh
5a9cfd92b460b9be7befb39f5845abf56857aeac
[ "CC0-1.0" ]
null
null
null
cfgov/v1/models/browse_page.py
atuggle/cfgov-refresh
5a9cfd92b460b9be7befb39f5845abf56857aeac
[ "CC0-1.0" ]
1
2016-09-14T21:11:19.000Z
2016-09-14T21:11:19.000Z
cfgov/v1/models/browse_page.py
atuggle/cfgov-refresh
5a9cfd92b460b9be7befb39f5845abf56857aeac
[ "CC0-1.0" ]
null
null
null
from django.db import models from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, ObjectList, StreamFieldPanel, TabbedInterface ) from wagtail.wagtailcore import blocks from wagtail.wagtailcore.fields import StreamField from wagtail.wagtailcore.models import PageManager from data_research.blocks import ( ...
37.77907
79
0.6996
from django.db import models from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, ObjectList, StreamFieldPanel, TabbedInterface ) from wagtail.wagtailcore import blocks from wagtail.wagtailcore.fields import StreamField from wagtail.wagtailcore.models import PageManager from data_research.blocks import ( ...
true
true
f7208bc906110bb2c8cae40a156edcf4c7547c8c
7,727
py
Python
plugins/opencv/src/opencv/__init__.py
IGx89/scrypted
577b00a090393f31aaa81de67f5fd4555995921a
[ "MIT" ]
null
null
null
plugins/opencv/src/opencv/__init__.py
IGx89/scrypted
577b00a090393f31aaa81de67f5fd4555995921a
[ "MIT" ]
null
null
null
plugins/opencv/src/opencv/__init__.py
IGx89/scrypted
577b00a090393f31aaa81de67f5fd4555995921a
[ "MIT" ]
null
null
null
from __future__ import annotations from time import sleep from detect import DetectionSession, DetectPlugin from typing import Any, List import numpy as np import cv2 import imutils from gi.repository import GLib, Gst from scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetected class Ope...
38.442786
184
0.608645
from __future__ import annotations from time import sleep from detect import DetectionSession, DetectPlugin from typing import Any, List import numpy as np import cv2 import imutils from gi.repository import GLib, Gst from scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetected class Ope...
true
true
f7208be42fc87aa1346f3bb00981d1c67e5429aa
1,457
py
Python
manager.py
Hugh-wong/hydra
5f2c4770e655d41d3c535f6e3c29ec4848d5d60e
[ "MIT" ]
3
2017-02-03T01:44:30.000Z
2019-02-27T12:00:00.000Z
manager.py
Hugh-wong/hydra
5f2c4770e655d41d3c535f6e3c29ec4848d5d60e
[ "MIT" ]
null
null
null
manager.py
Hugh-wong/hydra
5f2c4770e655d41d3c535f6e3c29ec4848d5d60e
[ "MIT" ]
1
2021-07-12T07:41:07.000Z
2021-07-12T07:41:07.000Z
# coding=utf-8 import sys import signal import time from multiprocessing import Process from allocator import Allocator, Event class Manager(object): """A manager manage multi allocators, when told to stop, manager would tell the allocator to stop.""" def __init__(self, cfg_list): self.allocator_li...
28.019231
105
0.617021
import sys import signal import time from multiprocessing import Process from allocator import Allocator, Event class Manager(object): def __init__(self, cfg_list): self.allocator_list = [] self.event_list = [] for cfg in cfg_list: event = Event() cfg.update({'p...
true
true
f7208c7f6012bde16b47b8b7a1531f00d2196076
1,084
py
Python
tests/test_creational/test_prototype.py
smartlegionlab/python-patterns
be898272e4358fa2e60ed9f61ce5ed10aa367e77
[ "BSD-3-Clause" ]
2
2021-11-17T21:35:49.000Z
2022-02-09T16:47:20.000Z
tests/test_creational/test_prototype.py
smartlegionlab/python-patterns
be898272e4358fa2e60ed9f61ce5ed10aa367e77
[ "BSD-3-Clause" ]
null
null
null
tests/test_creational/test_prototype.py
smartlegionlab/python-patterns
be898272e4358fa2e60ed9f61ce5ed10aa367e77
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # -------------------------------------------------------- # Licensed under the terms of the BSD 3-Clause License # (see LICENSE for details). # Copyright © 2018-2021, A.A Suvorov # All rights reserved. # -------------------------------------------------------- """Tests prototype.py""" from patt...
33.875
58
0.580258
from patterns.creational.prototype import Bird class TestPrototype: def test_register(self, prototype, bird): prototype.register('Bird', bird) assert 'Bird' in prototype._objects def test_unregister(self, prototype, bird): prototype.register('Bird', bird) prototype.unre...
true
true
f7208ce7bbb8661f4bd13d02bdc81b7510d9775a
195
py
Python
Demo/log/example_log_error_file.py
quecpython/EC100Y-SDK
712c7eb7b54a3971009d94f6d6b21a6011d56f68
[ "MIT" ]
4
2021-01-28T01:30:59.000Z
2021-06-15T07:13:41.000Z
Demo/log/example_log_error_file.py
QuePython/EC100Y-SDK
712c7eb7b54a3971009d94f6d6b21a6011d56f68
[ "MIT" ]
null
null
null
Demo/log/example_log_error_file.py
QuePython/EC100Y-SDK
712c7eb7b54a3971009d94f6d6b21a6011d56f68
[ "MIT" ]
3
2021-04-07T09:55:59.000Z
2022-01-08T15:15:23.000Z
import log log.basicConfig(level=log.ERROR) # 设置日志输出级别 # 获取logger对象,如果不指定name则返回root对象,多次使用相同的name调用getLogger方法返回同一个logger对象 log = log.getLogger("error") log.error("Test error message!!")
21.666667
69
0.784615
import log log.basicConfig(level=log.ERROR) log = log.getLogger("error") log.error("Test error message!!")
true
true
f7208d45b1bd9c79cf4bba8f873334a67415881d
2,026
py
Python
Python3_Data_Structure/32_Python_Amortized_Analysis/00_Python_PAA.py
jmmedel/Python3-Data-Structure-References
3a607da2b67b5b80810d7084339e0602288c4f6b
[ "MIT" ]
null
null
null
Python3_Data_Structure/32_Python_Amortized_Analysis/00_Python_PAA.py
jmmedel/Python3-Data-Structure-References
3a607da2b67b5b80810d7084339e0602288c4f6b
[ "MIT" ]
null
null
null
Python3_Data_Structure/32_Python_Amortized_Analysis/00_Python_PAA.py
jmmedel/Python3-Data-Structure-References
3a607da2b67b5b80810d7084339e0602288c4f6b
[ "MIT" ]
null
null
null
""" Python - Amortized Analysis Amortized analysis involves estimating the run time for the sequence of operations in a program without taking into consideration the span of the data distribution in the input values. A simple example is finding a value in a sorted list is quicker than in an unsorted list. If the l...
106.631579
595
0.80306
true
true
f7208d73df1d4b1e754b10c36ce77d84bdc0b130
7,009
py
Python
loadgen/generate_load.py
hythloda/ecommerce-demo
83d23475677d546db59879452f3e388581ab88de
[ "Apache-2.0" ]
null
null
null
loadgen/generate_load.py
hythloda/ecommerce-demo
83d23475677d546db59879452f3e388581ab88de
[ "Apache-2.0" ]
null
null
null
loadgen/generate_load.py
hythloda/ecommerce-demo
83d23475677d546db59879452f3e388581ab88de
[ "Apache-2.0" ]
null
null
null
import barnum, random, time, json, requests, math, os from mysql.connector import connect, Error from kafka import KafkaProducer # CONFIG userSeedCount = 10000 itemSeedCount = 1000 purchaseGenCount = 500000 purchaseGenEveryMS = 100 pageviewMultiplier = 75 # Translates to 75x purchases, currently 750/...
40.75
171
0.541304
import barnum, random, time, json, requests, math, os from mysql.connector import connect, Error from kafka import KafkaProducer userSeedCount = 10000 itemSeedCount = 1000 purchaseGenCount = 500000 purchaseGenEveryMS = 100 pageviewMultiplier = 75 itemInventoryMin = 1000 itemInventoryMax = 5000 ...
true
true
f7208e835090cc50acccc601a70a34153f65abaf
549
py
Python
gcn/lp.py
liqimai/GraphConvForSSL
ef94a897292275680b1058685f2de9d4a8a6449c
[ "MIT" ]
74
2019-04-09T11:53:27.000Z
2022-03-24T09:22:30.000Z
gcn/lp.py
liqimai/GraphConvForSSL
ef94a897292275680b1058685f2de9d4a8a6449c
[ "MIT" ]
4
2019-07-11T08:47:29.000Z
2020-06-15T03:19:31.000Z
gcn/lp.py
liqimai/GraphConvForSSL
ef94a897292275680b1058685f2de9d4a8a6449c
[ "MIT" ]
16
2019-04-15T16:20:07.000Z
2022-03-07T08:42:26.000Z
import numpy as np from gcn.graphconv import ap_approximate def Model17(adj, alpha, y_train, y_test): k = int(np.ceil(4 * alpha)) prediction, time = ap_approximate(adj, y_train, alpha, k) predicted_labels = np.argmax(prediction, axis=1) prediction = np.zeros(prediction.shape) prediction[np.arange(...
36.6
84
0.717668
import numpy as np from gcn.graphconv import ap_approximate def Model17(adj, alpha, y_train, y_test): k = int(np.ceil(4 * alpha)) prediction, time = ap_approximate(adj, y_train, alpha, k) predicted_labels = np.argmax(prediction, axis=1) prediction = np.zeros(prediction.shape) prediction[np.arange(...
true
true
f7208e8a4a26e682a31e9e84d47b5e97601f74d8
173
py
Python
learning_greek/signals.py
lucafavatella/learning-greek
b29a96668992823e2ec89547b6c82fbbbb9af9f3
[ "MIT" ]
10
2015-04-10T06:35:01.000Z
2021-07-19T01:40:22.000Z
learning_greek/signals.py
lucafavatella/learning-greek
b29a96668992823e2ec89547b6c82fbbbb9af9f3
[ "MIT" ]
16
2015-02-08T16:39:01.000Z
2018-06-10T16:14:44.000Z
learning_greek/signals.py
lucafavatella/learning-greek
b29a96668992823e2ec89547b6c82fbbbb9af9f3
[ "MIT" ]
6
2015-02-12T18:56:40.000Z
2020-10-11T18:59:37.000Z
import django.dispatch adoption_level_change = django.dispatch.Signal(providing_args=["level", "request"]) blurb_read = django.dispatch.Signal(providing_args=["request"])
28.833333
83
0.797688
import django.dispatch adoption_level_change = django.dispatch.Signal(providing_args=["level", "request"]) blurb_read = django.dispatch.Signal(providing_args=["request"])
true
true
f7208edc797411262aa09c8538bfe7878909fc92
1,273
py
Python
test/test_sync_reports_rotate.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_sync_reports_rotate.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_sync_reports_rotate.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 l...
25.979592
77
0.735271
from __future__ import absolute_import import os import sys import unittest import swagger_client from swagger_client.rest import ApiException from swagger_client.models.sync_reports_rotate import SyncReportsRotate class TestSyncReportsRotate(unittest.TestCase): def setUp(self): pass def tearDo...
true
true
f7208fe4ecb7d3a8e41c130280425906b33dd803
47,072
py
Python
BioSTEAM 2.x.x/biorefineries/TAL/system_TAL_glucose.py
yoelcortes/Bioindustrial-Complex
d39edfec88e443ef7a62218ca0215e3b105f4b96
[ "MIT" ]
2
2020-01-03T21:04:41.000Z
2020-01-09T01:15:48.000Z
BioSTEAM 2.x.x/biorefineries/TAL/system_TAL_glucose.py
yoelcortes/Bioindustrial-Complex
d39edfec88e443ef7a62218ca0215e3b105f4b96
[ "MIT" ]
6
2020-01-03T21:31:27.000Z
2020-02-28T13:53:56.000Z
BioSTEAM 2.x.x/biorefineries/TAL/system_TAL_glucose.py
yoelcortes/Bioindustrial-Complex
d39edfec88e443ef7a62218ca0215e3b105f4b96
[ "MIT" ]
2
2020-01-07T14:04:06.000Z
2020-01-08T23:05:25.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Bioindustrial-Park: BioSTEAM's Premier Biorefinery Models and Results # Copyright (C) 2022-2023, Sarang Bhagwat <sarangb2@illinois.edu> (this biorefinery) # # This module is under the UIUC open-source license. See # github.com/BioSTEAMDevelopmentGroup/biosteam/blob/mas...
42.560579
252
0.574312
# Copyright (C) 2022-2023, Sarang Bhagwat <sarangb2@illinois.edu> (this biorefinery) # # This module is under the UIUC open-source license. See # github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt # for license details. # %% Setup import biosteam as bst import thermosteam as tmo import flexso...
true
true
f720915b2ad6e84b10d393f7c627605ab0f69c7f
2,018
py
Python
tools/Polygraphy/polygraphy/config.py
spradius/TensorRT
eb5de99b523c76c2f3ae997855ad86d3a1e86a31
[ "Apache-2.0" ]
1
2021-08-23T01:15:16.000Z
2021-08-23T01:15:16.000Z
tools/Polygraphy/polygraphy/config.py
spradius/TensorRT
eb5de99b523c76c2f3ae997855ad86d3a1e86a31
[ "Apache-2.0" ]
null
null
null
tools/Polygraphy/polygraphy/config.py
spradius/TensorRT
eb5de99b523c76c2f3ae997855ad86d3a1e86a31
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
43.869565
109
0.77552
import os import sys INTERNAL_CORRECTNESS_CHECKS = bool(os.environ.get("POLYGRAPHY_INTERNAL_CORRECTNESS_CHECKS", "0") != "0") AUTOINSTALL_DEPS = bool(os.environ.get("POLYGRAPHY_AUTOINSTALL_DEPS", "0") != "0") INSTALL_CMD = os.environ.get("POLYGRAPHY_INSTALL_CMD", "{:} -m pip install".format(sys.execut...
true
true
f720930247112fff9273c3101072dae9279f6fa7
4,606
py
Python
tasks/trace_agent.py
charyveer75/datadog-agent
fdf4d2028b0dccd485eb280f4fefda84931927bc
[ "Apache-2.0" ]
2
2020-02-11T16:05:23.000Z
2022-03-30T19:50:28.000Z
tasks/trace_agent.py
charyveer75/datadog-agent
fdf4d2028b0dccd485eb280f4fefda84931927bc
[ "Apache-2.0" ]
2
2021-08-11T15:24:27.000Z
2021-08-23T22:13:05.000Z
tasks/trace_agent.py
charyveer75/datadog-agent
fdf4d2028b0dccd485eb280f4fefda84931927bc
[ "Apache-2.0" ]
null
null
null
import os import sys import shutil import invoke from invoke import task from .utils import bin_name, get_build_flags, get_version_numeric_only, load_release_versions from .utils import REPO_PATH from .build_tags import get_build_tags, get_default_build_tags, LINUX_ONLY_TAGS, REDHAT_AND_DEBIAN_ONLY_TAGS, REDHAT_AND_D...
35.430769
230
0.650673
import os import sys import shutil import invoke from invoke import task from .utils import bin_name, get_build_flags, get_version_numeric_only, load_release_versions from .utils import REPO_PATH from .build_tags import get_build_tags, get_default_build_tags, LINUX_ONLY_TAGS, REDHAT_AND_DEBIAN_ONLY_TAGS, REDHAT_AND_D...
true
true
f7209497e72c208305cb4e1cce93a790ea4e4114
328
py
Python
emoji_chengyu/main.py
alingse/emoji-chengyu
2d4436212c1d2899dfc12a1c965ea2ddce9a4aab
[ "MIT" ]
3
2020-04-28T03:25:36.000Z
2022-01-24T04:52:01.000Z
emoji_chengyu/main.py
alingse/emoji-chengyu
2d4436212c1d2899dfc12a1c965ea2ddce9a4aab
[ "MIT" ]
null
null
null
emoji_chengyu/main.py
alingse/emoji-chengyu
2d4436212c1d2899dfc12a1c965ea2ddce9a4aab
[ "MIT" ]
1
2020-04-28T03:25:49.000Z
2020-04-28T03:25:49.000Z
import itertools from emoji_chengyu.puzzle import gen_puzzle def emoji_chengyu(): N = 100 pg = gen_puzzle() puzzles = list(itertools.islice(pg, N)) puzzles.sort(key=lambda p: sum(p.mask), reverse=True) M = 20 for puzzle in puzzles[:M]: print(''.join(puzzle.puzzle), puzzle.chengyu_ite...
21.866667
63
0.670732
import itertools from emoji_chengyu.puzzle import gen_puzzle def emoji_chengyu(): N = 100 pg = gen_puzzle() puzzles = list(itertools.islice(pg, N)) puzzles.sort(key=lambda p: sum(p.mask), reverse=True) M = 20 for puzzle in puzzles[:M]: print(''.join(puzzle.puzzle), puzzle.chengyu_ite...
true
true
f72094b30996c32bb9a24f3c3252221bebecd3fa
2,378
py
Python
tests/technical_ratio_test.py
bopo/mooquant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
21
2017-09-07T16:08:21.000Z
2020-10-15T13:42:21.000Z
tests/technical_ratio_test.py
bopo/MooQuant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
209
2018-10-09T11:57:39.000Z
2021-03-25T21:40:30.000Z
tests/technical_ratio_test.py
bopo/MooQuant
244a87d4cd8b4d918eec4f16905e0921c3b39f50
[ "Apache-2.0" ]
15
2018-11-17T20:14:37.000Z
2022-02-04T23:55:29.000Z
# -*- coding: utf-8 -*- # MooQuant # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 # # ...
30.883117
79
0.647603
from mooquant import dataseries from mooquant.technical import ratio from . import common class TestCase(common.TestCase): def __buildRatio(self, values, ratioMaxLen=None): seqDS = dataseries.SequenceDataSeries() ret = ratio.Ratio(seqDS, ratioMaxLen) for value in values...
true
true
f72094fcc0eabe24153127ed8f8cfab3259c6ceb
1,247
py
Python
IRIS_data_download/IRIS_download_support/obspy/io/segy/util.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-03-05T01:03:01.000Z
2020-12-17T05:04:07.000Z
IRIS_data_download/IRIS_download_support/obspy/io/segy/util.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
4
2021-03-31T19:25:55.000Z
2021-12-13T20:32:46.000Z
IRIS_data_download/IRIS_download_support/obspy/io/segy/util.py
earthinversion/Fnet_IRIS_data_automated_download
09a6e0c992662feac95744935e038d1c68539fa1
[ "MIT" ]
2
2020-09-08T19:33:40.000Z
2021-04-05T09:47:50.000Z
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * # NOQA from struct import unpack from obspy.core.util.libnames import _load_cdll # Import shared libsegy clibsegy = _load_cdll("segy") def unpack_head...
31.974359
75
0.652767
from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * from struct import unpack from obspy.core.util.libnames import _load_cdll clibsegy = _load_cdll("segy") def unpack_header_value(endian, packed_value, length, special_forma...
true
true
f72095d4a18d4936ed6471f607ee84100d63dad6
2,845
py
Python
MMLanScan/Data/build_port_services_list.py
cyb3rc/MMLanScan
60cf1cb9476bad8ee522780ce4df5513a139f47d
[ "MIT" ]
null
null
null
MMLanScan/Data/build_port_services_list.py
cyb3rc/MMLanScan
60cf1cb9476bad8ee522780ce4df5513a139f47d
[ "MIT" ]
null
null
null
MMLanScan/Data/build_port_services_list.py
cyb3rc/MMLanScan
60cf1cb9476bad8ee522780ce4df5513a139f47d
[ "MIT" ]
null
null
null
#!/usr/bin/python import urllib2 import xml.etree.ElementTree as ElementTree import re def refine_table(table): result = table result = re.sub(r"<td.*?>", "<td>", result) result = re.sub(r"<tr.*?>", "<tr>", result) result = re.sub(r"<a.*?>(.*?)</a>", "\\1", result) result = re.sub(r"<span.*?>(.*?)...
31.611111
115
0.518102
import urllib2 import xml.etree.ElementTree as ElementTree import re def refine_table(table): result = table result = re.sub(r"<td.*?>", "<td>", result) result = re.sub(r"<tr.*?>", "<tr>", result) result = re.sub(r"<a.*?>(.*?)</a>", "\\1", result) result = re.sub(r"<span.*?>(.*?)</span>", "\\1", ...
true
true
f72095f560d4de6eaf24da310f2f00ce19300c51
4,718
py
Python
API/content/views.py
kasimbozdag/SWE_573
4bce24f98fe6980b1f2c83196b8454b56118186b
[ "MIT" ]
null
null
null
API/content/views.py
kasimbozdag/SWE_573
4bce24f98fe6980b1f2c83196b8454b56118186b
[ "MIT" ]
52
2019-02-19T10:43:11.000Z
2022-02-10T10:36:37.000Z
API/content/views.py
kasimbozdag/SWE_573
4bce24f98fe6980b1f2c83196b8454b56118186b
[ "MIT" ]
null
null
null
import datetime from django.shortcuts import render, get_object_or_404 # Create your views here. from rest_framework.generics import ListAPIView from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from rest_framework.views import APIView from content.models import Content from ...
35.473684
116
0.652183
import datetime from django.shortcuts import render, get_object_or_404 from rest_framework.generics import ListAPIView from rest_framework.response import Response from rest_framework.status import HTTP_200_OK from rest_framework.views import APIView from content.models import Content from content.serializers impor...
true
true
f72095f7242e0943bddfcfc8d4c0d806cf6d4b17
1,274
py
Python
build/lib/elang/plot/utils/embedding.py
onlyphantom/elangdev
bdb80e10e98f98ef6510c313cda55daf9464d5c4
[ "CC0-1.0" ]
5
2020-02-26T15:05:47.000Z
2022-01-25T01:15:27.000Z
build/lib/elang/plot/utils/embedding.py
onlyphantom/elangdev
bdb80e10e98f98ef6510c313cda55daf9464d5c4
[ "CC0-1.0" ]
null
null
null
build/lib/elang/plot/utils/embedding.py
onlyphantom/elangdev
bdb80e10e98f98ef6510c313cda55daf9464d5c4
[ "CC0-1.0" ]
1
2020-02-13T08:14:11.000Z
2020-02-13T08:14:11.000Z
import sys, os.path import gensim from gensim.models import Word2Vec import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA def plot2d_demo(model, words=None): assert ( model.vector_size >= 2 ), "This function expects a model of size 2 (2-dimension word vectors) or h...
28.311111
86
0.625589
import sys, os.path import gensim from gensim.models import Word2Vec import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA def plot2d_demo(model, words=None): assert ( model.vector_size >= 2 ), "This function expects a model of size 2 (2-dimension word vectors) or h...
true
true
f720966df99b4facf9ee616398c70c34a8e38598
49,071
py
Python
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
weikhor/tensorflow
ce047fc05c7b5ff54868ba53d724d9c171c4adbb
[ "Apache-2.0" ]
10
2021-05-25T17:43:04.000Z
2022-03-08T10:46:09.000Z
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
weikhor/tensorflow
ce047fc05c7b5ff54868ba53d724d9c171c4adbb
[ "Apache-2.0" ]
1,056
2019-12-15T01:20:31.000Z
2022-02-10T02:06:28.000Z
tensorflow/python/data/experimental/kernel_tests/snapshot_test.py
weikhor/tensorflow
ce047fc05c7b5ff54868ba53d724d9c171c4adbb
[ "Apache-2.0" ]
6
2016-09-07T04:00:15.000Z
2022-01-12T01:47:38.000Z
# Copyright 2019 The TensorFlow 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 applica...
37.834233
82
0.708259
from __future__ import absolute_import from __future__ import division from __future__ import print_function import multiprocessing import os import shutil import time from absl.testing import parameterized import numpy as np from tensorflow.python.data.experimental.ops import snapshot from tensorflow....
true
true
f720977f63fc56cdf8a97938eefdecd9ebe62107
651
py
Python
src/prereq/exercise8.py
kradical/cluster-analysis-udemy
e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5
[ "MIT" ]
null
null
null
src/prereq/exercise8.py
kradical/cluster-analysis-udemy
e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5
[ "MIT" ]
null
null
null
src/prereq/exercise8.py
kradical/cluster-analysis-udemy
e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt # Plot a spiral dataset def generateArm(rotation, step): theta = np.random.rand(500) * step r = np.exp(theta) - 1 x = r * np.cos(theta) + (np.random.rand(500) - 0.5) / 7 y = r * np.sin(theta) + (np.random.rand(500) - 0.5) / 7 x, y = x * np.cos(r...
20.34375
99
0.563748
import numpy as np import matplotlib.pyplot as plt def generateArm(rotation, step): theta = np.random.rand(500) * step r = np.exp(theta) - 1 x = r * np.cos(theta) + (np.random.rand(500) - 0.5) / 7 y = r * np.sin(theta) + (np.random.rand(500) - 0.5) / 7 x, y = x * np.cos(rotation) - y * np.sin(r...
true
true
f7209acf0f181cb1058d455de2841e729f3c8cd5
3,798
py
Python
mlops/parallelm/mlops/stats/health/categorical_hist_stat.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
7
2019-04-08T02:31:55.000Z
2021-11-15T14:40:49.000Z
mlops/parallelm/mlops/stats/health/categorical_hist_stat.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
31
2019-02-22T22:23:26.000Z
2021-08-02T17:17:06.000Z
mlops/parallelm/mlops/stats/health/categorical_hist_stat.py
lisapm/mlpiper
74ad5ae343d364682cc2f8aaa007f2e8a1d84929
[ "Apache-2.0" ]
8
2019-03-15T23:46:08.000Z
2020-02-06T09:16:02.000Z
""" The Code contains functions to calculate univariate statistics for categorical features, given a dataset. """ import numpy as np from parallelm.mlops.stats.health.histogram_data_objects import CategoricalHistogramDataObject class CategoricalHistogram(object): """ Class is responsible for providing fit ...
42.2
145
0.645076
import numpy as np from parallelm.mlops.stats.health.histogram_data_objects import CategoricalHistogramDataObject class CategoricalHistogram(object): def __init__(self): self._prob_dist_categorical = [] self._features = [] def fit(self, training_feature_values, training_feature_n...
true
true
f7209b17100218a42c80c8e984c08597d630b188
47
py
Python
odoo-13.0/myaddons/SCM/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
181
2016-11-11T04:39:43.000Z
2022-03-14T21:17:19.000Z
odoo-13.0/myaddons/SCM/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
899
2016-11-14T02:42:56.000Z
2022-03-29T20:47:39.000Z
odoo-13.0/myaddons/SCM/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
227
2016-11-10T17:16:59.000Z
2022-03-26T16:46:38.000Z
from . import models from . import controllers
15.666667
25
0.787234
from . import models from . import controllers
true
true
f7209b3cfc5d5bd59dca31198344266661bee81a
94
py
Python
vaccine_card/api/apps.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
vaccine_card/api/apps.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
vaccine_card/api/apps.py
Unanimad/lais_046_2020_etapa_2
630efc6b25a580be44b6cd50be6744a01221a2c4
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'vaccine_card.api'
15.666667
33
0.755319
from django.apps import AppConfig class ApiConfig(AppConfig): name = 'vaccine_card.api'
true
true
f7209bc8e13eb725ec7ffbe1187a20a64ae43a57
3,850
py
Python
EWR/ab6_v2/Sort.py
Koopakiller/Edu
575c43dae24a4432e8c8fb2eda96e948cc33ec32
[ "MIT" ]
null
null
null
EWR/ab6_v2/Sort.py
Koopakiller/Edu
575c43dae24a4432e8c8fb2eda96e948cc33ec32
[ "MIT" ]
null
null
null
EWR/ab6_v2/Sort.py
Koopakiller/Edu
575c43dae24a4432e8c8fb2eda96e948cc33ec32
[ "MIT" ]
null
null
null
# coding=utf-8 # Author: Tom Lambert # Content: Implementierung der Sort-Klasse für ab6. class Sort(object): """Implementiert Sortier-Algorithmen mit der Möglichkeit einer statistischen Auswertung""" def __init__(self): self.counter_swap = 0 # entspricht ca 2 Elementabrufen und 2 Elementzuweisungen ...
38.118812
103
0.562857
class Sort(object): def __init__(self): self.counter_swap = 0 self.counter_list_item_assignment = 0 self.counter_item_compare = 0 self.counter_get_item_from_list = 0 self.counter_add_item_to_result_list = 0 self.counter_recursive_call = 0 self.counter_...
true
true
f7209bcc24d3c78f312379c3537a4b94dc7b13db
436
py
Python
packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickangle.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickangle.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/icicle/marker/colorbar/_tickangle.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="icicle.marker.colorbar", **kwargs ): super(TickangleValidator, self).__init__( plotly_name=plotly_name, p...
31.142857
85
0.665138
import _plotly_utils.basevalidators class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="icicle.marker.colorbar", **kwargs ): super(TickangleValidator, self).__init__( plotly_name=plotly_name, p...
true
true
f7209c409ce293886a6af24bf96c863400e8931e
4,791
py
Python
luminoth/utils/bbox_transform_tf.py
jsdussanc/luminoth
7637c52cc01d2826a231fef43746aa10951f99f0
[ "BSD-3-Clause" ]
2,584
2017-08-16T20:31:52.000Z
2022-03-16T07:53:54.000Z
luminoth/utils/bbox_transform_tf.py
dun933/Tabulo
dc1c1203a40e1ecf2aaca9647f3008ab72b41438
[ "BSD-3-Clause" ]
197
2017-08-17T14:49:18.000Z
2022-02-10T01:50:50.000Z
luminoth/utils/bbox_transform_tf.py
dun933/Tabulo
dc1c1203a40e1ecf2aaca9647f3008ab72b41438
[ "BSD-3-Clause" ]
462
2017-08-16T22:00:23.000Z
2022-03-08T19:14:00.000Z
import tensorflow as tf def get_width_upright(bboxes): with tf.name_scope('BoundingBoxTransform/get_width_upright'): bboxes = tf.cast(bboxes, tf.float32) x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1) width = x2 - x1 + 1. height = y2 - y1 + 1. # Calculate up right point of b...
31.313725
79
0.622626
import tensorflow as tf def get_width_upright(bboxes): with tf.name_scope('BoundingBoxTransform/get_width_upright'): bboxes = tf.cast(bboxes, tf.float32) x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1) width = x2 - x1 + 1. height = y2 - y1 + 1. urx = x1 + .5 * width ...
true
true
f7209df8e01166c38a64b49337433ccac2442afc
2,808
py
Python
5-MaksimovKA/code/submit.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
38
2021-02-18T07:04:54.000Z
2022-03-22T15:31:06.000Z
5-MaksimovKA/code/submit.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
2
2021-02-22T18:53:19.000Z
2021-06-22T20:28:06.000Z
5-MaksimovKA/code/submit.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
15
2021-02-25T17:25:40.000Z
2022-01-31T16:59:32.000Z
import os import tqdm import glob import fiona import geopandas as gpd from fire import Fire def sn7_convert_geojsons_to_csv(json_dirs, output_csv_path, population='proposal'): ''' Convert jsons to csv Population is either "ground" or "proposal" ''' first_file = True # switch that will be turned...
35.1
94
0.551994
import os import tqdm import glob import fiona import geopandas as gpd from fire import Fire def sn7_convert_geojsons_to_csv(json_dirs, output_csv_path, population='proposal'): first_file = True for json_dir in tqdm.tqdm(json_dirs[:]): json_files = sorted(glob.glob(os.path.join(json_dir, '*.geojson...
true
true
f7209e86a2976584564066d1289e7d7d2268a733
2,401
py
Python
tests/commands/test_modifyoncondition.py
lpd-patrick/oaxmlapi
1e73881c290ca3181c2d33a7b5fa74fb5f86e62c
[ "MIT" ]
25
2015-05-20T01:23:39.000Z
2021-03-01T17:13:59.000Z
tests/commands/test_modifyoncondition.py
lpd-patrick/oaxmlapi
1e73881c290ca3181c2d33a7b5fa74fb5f86e62c
[ "MIT" ]
16
2015-03-03T00:59:29.000Z
2021-11-30T16:45:15.000Z
tests/commands/test_modifyoncondition.py
lpd-patrick/oaxmlapi
1e73881c290ca3181c2d33a7b5fa74fb5f86e62c
[ "MIT" ]
12
2016-01-04T20:06:44.000Z
2020-09-27T20:15:27.000Z
# -*- coding: utf-8 from __future__ import absolute_import import unittest from oaxmlapi import commands, datatypes try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET class TestModifyOnConditionClass(unittest.TestCase): def test_str(self): slip = data...
27.918605
79
0.493544
from __future__ import absolute_import import unittest from oaxmlapi import commands, datatypes try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET class TestModifyOnConditionClass(unittest.TestCase): def test_str(self): slip = datatypes.Datatype( ...
true
true
f7209ed2b871197ee55089411c3d1ab6b323fbba
3,956
py
Python
docs/user_guides/tools/elastic_ctr/elastic_ctr/dist_train_demo.py
shiyutang/docs
b05612213a08daf9f225abce08fc42f924ef51ad
[ "Apache-2.0" ]
104
2018-09-04T08:16:05.000Z
2021-05-06T20:45:26.000Z
docs/user_guides/tools/elastic_ctr/elastic_ctr/dist_train_demo.py
shiyutang/docs
b05612213a08daf9f225abce08fc42f924ef51ad
[ "Apache-2.0" ]
1,582
2018-06-25T06:14:11.000Z
2021-05-14T16:00:43.000Z
docs/user_guides/tools/elastic_ctr/elastic_ctr/dist_train_demo.py
shiyutang/docs
b05612213a08daf9f225abce08fc42f924ef51ad
[ "Apache-2.0" ]
387
2018-06-20T07:42:32.000Z
2021-05-14T08:35:28.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.321429
82
0.65091
from __future__ import print_function import paddle.fluid.core as core import math import os import sys import numpy import paddle import paddle.fluid as fluid BATCH_SIZE = 64 PASS_NUM = 1 def loss_net(hidden, label): prediction = fluid.layers.fc(input=hidden, size=10, act='softmax') loss = ...
true
true
f7209f8d535077c8af62477c05e769c4ef76e2d5
9,895
py
Python
mazda3_joystick.py
moralrecordings/elm327_joystick
edebae95f24913f7c6caed98751fb54477743169
[ "BSD-3-Clause" ]
7
2017-12-18T13:11:18.000Z
2022-01-08T21:13:26.000Z
mazda3_joystick.py
moralrecordings/elm327_joystick
edebae95f24913f7c6caed98751fb54477743169
[ "BSD-3-Clause" ]
null
null
null
mazda3_joystick.py
moralrecordings/elm327_joystick
edebae95f24913f7c6caed98751fb54477743169
[ "BSD-3-Clause" ]
3
2018-10-27T21:37:01.000Z
2022-01-08T21:13:24.000Z
#!/usr/bin/env python3 import uinput from elm327 import ELM327, PROTOCOLS from mrcrowbar import models as mrc import math import time from optparse import OptionParser class OptParser( OptionParser ): def format_epilog( self, formatter ): return '\n{}\n'.format( '\n'.join( [formatter._format_text( x ) fo...
30.167683
141
0.597979
import uinput from elm327 import ELM327, PROTOCOLS from mrcrowbar import models as mrc import math import time from optparse import OptionParser class OptParser( OptionParser ): def format_epilog( self, formatter ): return '\n{}\n'.format( '\n'.join( [formatter._format_text( x ) for x in self.epilog.spl...
true
true
f720a09f334fcd690a947282fa271733c27fe7d4
218
py
Python
WriteaFunction.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
WriteaFunction.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
WriteaFunction.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
def is_leap(year): leap = False if year>=1900: if year%4 == 0: leap = True if year%100 == 0 and year%400 != 0: leap = False return leap year = int(input())
18.166667
47
0.463303
def is_leap(year): leap = False if year>=1900: if year%4 == 0: leap = True if year%100 == 0 and year%400 != 0: leap = False return leap year = int(input())
true
true
f720a191c0da487593b1eee10de1b8b4af27c2df
2,276
py
Python
pyecharts/charts/basic_charts/scatter.py
myqf555/pyecharts
050309ee3d2016142df3e2265a091e27aa58a027
[ "MIT" ]
1
2020-02-13T14:48:20.000Z
2020-02-13T14:48:20.000Z
pyecharts/charts/basic_charts/scatter.py
eclipse2007/pyecharts
651731a1a5220420a9a03808d2f5eb38ffe18e09
[ "MIT" ]
null
null
null
pyecharts/charts/basic_charts/scatter.py
eclipse2007/pyecharts
651731a1a5220420a9a03808d2f5eb38ffe18e09
[ "MIT" ]
1
2020-09-12T05:55:48.000Z
2020-09-12T05:55:48.000Z
import itertools from ... import options as opts from ... import types from ...charts.chart import RectChart from ...globals import ChartType class Scatter(RectChart): """ <<< Scatter >>> The scatter diagram on the rectangular coordinate system can be used to show the relationship betwe...
35.5625
76
0.560193
import itertools from ... import options as opts from ... import types from ...charts.chart import RectChart from ...globals import ChartType class Scatter(RectChart): def add_yaxis( self, series_name: str, y_axis: types.Sequence, *, is_selected: bool = Tru...
true
true
f720a2030d77959bb04a88ba16fda69fd042f960
8,410
py
Python
LichessBotMain.py
nfeddersen/lichess-bot
6457b5f66104b59b91316ba3a944b55710ca64e5
[ "MIT" ]
null
null
null
LichessBotMain.py
nfeddersen/lichess-bot
6457b5f66104b59b91316ba3a944b55710ca64e5
[ "MIT" ]
null
null
null
LichessBotMain.py
nfeddersen/lichess-bot
6457b5f66104b59b91316ba3a944b55710ca64e5
[ "MIT" ]
1
2021-07-12T14:11:04.000Z
2021-07-12T14:11:04.000Z
import requests import json from stockfish import Stockfish stockfish = Stockfish('stockfish_20090216_x64_bmi2.exe', parameters={"Threads": 8, "Minimum Thinking Time": 300}) stockfish.set_depth(15) stockfish.set_skill_level(25) api_key = 'REPLACE_WITH_API_KEY' headers = {'Authorization': f'Bearer {api_key}...
46.464088
114
0.437574
import requests import json from stockfish import Stockfish stockfish = Stockfish('stockfish_20090216_x64_bmi2.exe', parameters={"Threads": 8, "Minimum Thinking Time": 300}) stockfish.set_depth(15) stockfish.set_skill_level(25) api_key = 'REPLACE_WITH_API_KEY' headers = {'Authorization': f'Bearer {api_key}...
true
true
f720a21b297857bd9d0f8b0c056695ecb84a54fe
1,510
py
Python
pyArango/index.py
jarvisav/pyArango
dc054e2258c9fccbc54443afc244b74ad0abb8b0
[ "Apache-2.0" ]
null
null
null
pyArango/index.py
jarvisav/pyArango
dc054e2258c9fccbc54443afc244b74ad0abb8b0
[ "Apache-2.0" ]
null
null
null
pyArango/index.py
jarvisav/pyArango
dc054e2258c9fccbc54443afc244b74ad0abb8b0
[ "Apache-2.0" ]
null
null
null
import json from .theExceptions import (CreationError, DeletionError, UpdateError) class Index(object) : """An index on a collection's fields. Indexes are meant to de created by ensureXXX functions of Collections. Indexes have a .infos dictionary that stores all the infos about the index""" def __init__(self...
40.810811
151
0.625828
import json from .theExceptions import (CreationError, DeletionError, UpdateError) class Index(object) : def __init__(self, collection, infos = None, creationData = None) : self.collection = collection self.connection = self.collection.database.connection self.indexesURL = "%s/index" % se...
true
true
f720a26b353f6b3ddd1548566f5b0a972c16828a
584
py
Python
soleka.py
jshenaop/eko
bb8e96ee9e460ed10505c8046a444a24fdcfcd06
[ "Apache-2.0" ]
null
null
null
soleka.py
jshenaop/eko
bb8e96ee9e460ed10505c8046a444a24fdcfcd06
[ "Apache-2.0" ]
null
null
null
soleka.py
jshenaop/eko
bb8e96ee9e460ed10505c8046a444a24fdcfcd06
[ "Apache-2.0" ]
null
null
null
# coding=utf8 from flask import Flask, render_template from flask_restful.utils import cors from flask_cors import CORS, cross_origin import config import models from resources_v1.predictions import predictions_api_v1 from templates.templates import home app = Flask(__name__) CORS(app) app.register_bl...
22.461538
65
0.738014
from flask import Flask, render_template from flask_restful.utils import cors from flask_cors import CORS, cross_origin import config import models from resources_v1.predictions import predictions_api_v1 from templates.templates import home app = Flask(__name__) CORS(app) app.register_blueprint(predic...
true
true
f720a3476873e92b2ed94d5e14b117589ae55b83
23,418
py
Python
index.py
201723050210/17wanxiaoCheckin-Actions
666a2c8473f876a607011021a8be1ee876ce6c34
[ "MIT" ]
null
null
null
index.py
201723050210/17wanxiaoCheckin-Actions
666a2c8473f876a607011021a8be1ee876ce6c34
[ "MIT" ]
null
null
null
index.py
201723050210/17wanxiaoCheckin-Actions
666a2c8473f876a607011021a8be1ee876ce6c34
[ "MIT" ]
null
null
null
import time import os import datetime import json import logging import requests from utils.server_chan import server_push from utils.qq_email import qq_email_push from utils.qmsg import qmsg_push from login import CampusLogin def initLogging(): logging.getLogger().setLevel(logging.INFO) logging.basicConfig(...
32.211829
130
0.530575
import time import os import datetime import json import logging import requests from utils.server_chan import server_push from utils.qq_email import qq_email_push from utils.qmsg import qmsg_push from login import CampusLogin def initLogging(): logging.getLogger().setLevel(logging.INFO) logging.basicConfig(...
true
true
f720a3b2937b6b9bd9e76101573c229ffea21101
913
py
Python
tabu/package_info.py
wbernoudy/dwave-tabu
793e76405ba60d2da87bc15634adeda821d82564
[ "Apache-2.0" ]
null
null
null
tabu/package_info.py
wbernoudy/dwave-tabu
793e76405ba60d2da87bc15634adeda821d82564
[ "Apache-2.0" ]
null
null
null
tabu/package_info.py
wbernoudy/dwave-tabu
793e76405ba60d2da87bc15634adeda821d82564
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
38.041667
74
0.756846
__packagename__ = 'dwave-tabu' __title__ = 'D-Wave Tabu' __version__ = '0.1.3' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'tools@dwavesys.com' __description__ = 'Optimized Tabu solver for QUBOs' __url__ = 'https://github.com/dwavesystems/dwave-tabu' __license__ = 'Apache 2.0' __copyright__ = '20...
true
true
f720a3be847c19fa4b9c7affc33b5d31a4209713
276
py
Python
EyeTracker/display.py
PoweredByME/SSVEP_FYP
6839be6a4aeddfa1b29c587b23d64c95a90810f8
[ "MIT" ]
null
null
null
EyeTracker/display.py
PoweredByME/SSVEP_FYP
6839be6a4aeddfa1b29c587b23d64c95a90810f8
[ "MIT" ]
null
null
null
EyeTracker/display.py
PoweredByME/SSVEP_FYP
6839be6a4aeddfa1b29c587b23d64c95a90810f8
[ "MIT" ]
null
null
null
import cv2; class Display(object): def __init__(self): pass; def showFrame(self, frame, windowName = "frame"): cv2.namedWindow(windowName, cv2.WINDOW_NORMAL); cv2.imshow(windowName, frame); def end(self): cv2.destroyAllWindows();
23
55
0.637681
import cv2; class Display(object): def __init__(self): pass; def showFrame(self, frame, windowName = "frame"): cv2.namedWindow(windowName, cv2.WINDOW_NORMAL); cv2.imshow(windowName, frame); def end(self): cv2.destroyAllWindows();
true
true
f720a3c8713f607158450310ae4112fcb026294a
6,344
py
Python
simple_history/manager.py
felixschloesser/django-simple-history
28abacb8a776fbaffcf0a42432a6a88be3561a86
[ "BSD-3-Clause" ]
2
2021-03-26T09:20:05.000Z
2021-05-26T13:46:48.000Z
simple_history/manager.py
felixschloesser/django-simple-history
28abacb8a776fbaffcf0a42432a6a88be3561a86
[ "BSD-3-Clause" ]
42
2021-03-30T11:12:23.000Z
2022-03-28T09:20:13.000Z
simple_history/manager.py
hramezani/django-simple-history
32645206749a1cc68539d9ad6499f1a938b2c9f4
[ "BSD-3-Clause" ]
1
2021-10-05T10:25:35.000Z
2021-10-05T10:25:35.000Z
from django.db import connection, models from django.db.models import OuterRef, Subquery from django.utils import timezone from simple_history.utils import get_change_reason_from_object class HistoryDescriptor: def __init__(self, model): self.model = model def __get__(self, instance, owner): ...
36.67052
87
0.585908
from django.db import connection, models from django.db.models import OuterRef, Subquery from django.utils import timezone from simple_history.utils import get_change_reason_from_object class HistoryDescriptor: def __init__(self, model): self.model = model def __get__(self, instance, owner): ...
true
true
f720a3de70f0386fe46cbec6ae3539699c8d83d8
5,653
py
Python
sdk/python/pulumi_azure_native/botservice/v20171201/get_bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20171201/get_bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/botservice/v20171201/get_bot_connection.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
32.488506
144
0.618433
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetBotConnectionResult', 'AwaitableGetBotConnectionResult', 'get_bot_connection', ] @pulumi.output_type class GetBotCon...
true
true
f720a41fe1294d6a6a4f0a5fcf613dac72c9f8da
9,425
py
Python
pulsar-functions/instance/src/main/python/function_stats.py
bruth/pulsar
fe2c8ee4d37e2a45dfb528592915746827416e18
[ "Apache-2.0" ]
null
null
null
pulsar-functions/instance/src/main/python/function_stats.py
bruth/pulsar
fe2c8ee4d37e2a45dfb528592915746827416e18
[ "Apache-2.0" ]
null
null
null
pulsar-functions/instance/src/main/python/function_stats.py
bruth/pulsar
fe2c8ee4d37e2a45dfb528592915746827416e18
[ "Apache-2.0" ]
1
2019-03-15T09:34:50.000Z
2019-03-15T09:34:50.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...
49.088542
158
0.766154
import traceback import time import util from prometheus_client import Counter, Summary, Gauge class Stats(object): metrics_label_names = ['tenant', 'namespace', 'function', 'instance_id', 'cluster'] PULSAR_FUNCTION_METRICS_PREFIX = "pulsar_function_" USER_METRIC_PREFIX = "user_metric_"; ...
true
true
f720a49b1ccb9afbd2e211fb293d03f55301e147
2,226
py
Python
Numpy/code.py
JayeshSukhija/ga-learner-dsmp-repo
4c05d980462dde423b6be41cca1218d6d98e8e48
[ "MIT" ]
null
null
null
Numpy/code.py
JayeshSukhija/ga-learner-dsmp-repo
4c05d980462dde423b6be41cca1218d6d98e8e48
[ "MIT" ]
null
null
null
Numpy/code.py
JayeshSukhija/ga-learner-dsmp-repo
4c05d980462dde423b6be41cca1218d6d98e8e48
[ "MIT" ]
null
null
null
# -------------- # Importing header files import numpy as np #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Code starts here #Loading data file and saving it into a new numpy array data = np.genfromtxt(path, delimiter=",", skip_header=1) print(data.shape) #Concatenating the new record to ...
20.611111
61
0.676101
import numpy as np new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] data = np.genfromtxt(path, delimiter=",", skip_header=1) print(data.shape) census=np.concatenate((data, new_record),axis = 0) print(census.shape) import numpy as np age=census[:,0] print (age) print ('='*50) max_age=np...
true
true
f720a7182cc9382555831934ef834b1a0aab840c
473
py
Python
enaml/qt/__init__.py
dandycheung/enaml
1a7d9c95717a359bb2a8435c597eda36c9235fab
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/qt/__init__.py
dandycheung/enaml
1a7d9c95717a359bb2a8435c597eda36c9235fab
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/qt/__init__.py
dandycheung/enaml
1a7d9c95717a359bb2a8435c597eda36c9235fab
[ "BSD-3-Clause-Clear" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) 2013-2022, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ----------------------------------------------...
29.5625
80
0.46723
from qtpy import ( API as QT_API, PYQT5_API, PYSIDE2_API, PYQT6_API, PYSIDE6_API, QT_VERSION, )
true
true
f720a75e584185882c002770a51c3e80de659a39
1,945
py
Python
src/slamcore_ros2_examples/python/slamcore_ros2_examples/xacro_file_contents.py
slamcore/slamcore-ros2-examples
f101a277d7bbf07e081b89ca8efb77110abc2110
[ "BSD-3-Clause" ]
1
2022-01-31T16:00:39.000Z
2022-01-31T16:00:39.000Z
src/slamcore_ros2_examples/python/slamcore_ros2_examples/xacro_file_contents.py
slamcore/slamcore-ros2-examples
f101a277d7bbf07e081b89ca8efb77110abc2110
[ "BSD-3-Clause" ]
null
null
null
src/slamcore_ros2_examples/python/slamcore_ros2_examples/xacro_file_contents.py
slamcore/slamcore-ros2-examples
f101a277d7bbf07e081b89ca8efb77110abc2110
[ "BSD-3-Clause" ]
null
null
null
"""Module for the XacroFile substitution class.""" from pathlib import Path from typing import Text, cast import xacro from launch.launch_context import LaunchContext from launch.some_substitutions_type import SomeSubstitutionsType from launch.substitution import Substitution from launch.substitutions import Substit...
36.018519
100
0.69563
from pathlib import Path from typing import Text, cast import xacro from launch.launch_context import LaunchContext from launch.some_substitutions_type import SomeSubstitutionsType from launch.substitution import Substitution from launch.substitutions import SubstitutionFailure from launch.utilities import normalize...
true
true
f720a8cc460fe602c10d1ad4a160e2c5c625a3d0
9,766
py
Python
cloud_provider/aws/aws_bid_advisor_test.py
mridhul/minion-manager
7301ac6360a82dfdd27e682d070c34e90f080149
[ "Apache-2.0" ]
54
2018-07-06T18:06:54.000Z
2019-06-03T15:21:01.000Z
cloud_provider/aws/aws_bid_advisor_test.py
mridhul/minion-manager
7301ac6360a82dfdd27e682d070c34e90f080149
[ "Apache-2.0" ]
28
2018-07-05T23:32:22.000Z
2019-07-19T17:19:26.000Z
cloud_provider/aws/aws_bid_advisor_test.py
mridhul/minion-manager
7301ac6360a82dfdd27e682d070c34e90f080149
[ "Apache-2.0" ]
15
2018-07-28T04:51:01.000Z
2019-07-30T14:50:25.000Z
"""The file has unit tests for the AWSBidAdvisor.""" import unittest from mock import patch, MagicMock import datetime from dateutil.tz import tzutc from cloud_provider.aws.aws_bid_advisor import AWSBidAdvisor REFRESH_INTERVAL = 10 REGION = 'us-west-2' MOCK_SPOT_PRICE={'NextToken': '', 'SpotPriceHistory': [{'Availabi...
57.111111
2,928
0.668646
import unittest from mock import patch, MagicMock import datetime from dateutil.tz import tzutc from cloud_provider.aws.aws_bid_advisor import AWSBidAdvisor REFRESH_INTERVAL = 10 REGION = 'us-west-2' MOCK_SPOT_PRICE={'NextToken': '', 'SpotPriceHistory': [{'AvailabilityZone': 'us-west-2b', 'InstanceType': 'm5.4xlarge'...
true
true
f720aa2b27c1b9f527f04697350eace8a44cc17c
214
py
Python
diypy3/tests/arr_stk.py
anqurvanillapy/diypy
56ced55011e95a19b7238992c2fc612b196ff17d
[ "CC0-1.0" ]
1
2015-12-08T10:35:21.000Z
2015-12-08T10:35:21.000Z
diypy3/tests/arr_stk.py
anqurvanillapy/diypy3
56ced55011e95a19b7238992c2fc612b196ff17d
[ "CC0-1.0" ]
null
null
null
diypy3/tests/arr_stk.py
anqurvanillapy/diypy3
56ced55011e95a19b7238992c2fc612b196ff17d
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """\ This script creates a stack array """ import diypy3 d = diypy3.Diypy3() arr_stk = (1, 2, 3, 4, 5) max_size = 100 inc = 10 d.array_stack(max_size, inc, arr_stk)
14.266667
37
0.635514
import diypy3 d = diypy3.Diypy3() arr_stk = (1, 2, 3, 4, 5) max_size = 100 inc = 10 d.array_stack(max_size, inc, arr_stk)
true
true
f720aae2cd32fb0ceac540aa226171b36ea197e1
9,383
py
Python
yandex/cloud/mdb/mysql/v1alpha/backup_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/mdb/mysql/v1alpha/backup_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
yandex/cloud/mdb/mysql/v1alpha/backup_service_pb2.py
kbespalov/python-sdk
e86563ee850e46a35b4c84053ecd4affdf66a963
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/mdb/mysql/v1alpha/backup_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import messag...
43.845794
1,281
0.775338
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f720ac11c40ba6b8dd0d3806ca655474e9e8841f
344
py
Python
convert/_3D/to/_1D.py
flew-software/Dem
20b7eb9bc7c11f1baf23acfe7bfbab359ddd97fb
[ "MIT" ]
1
2021-02-17T08:30:05.000Z
2021-02-17T08:30:05.000Z
convert/_3D/to/_1D.py
flew-software/Dem
20b7eb9bc7c11f1baf23acfe7bfbab359ddd97fb
[ "MIT" ]
null
null
null
convert/_3D/to/_1D.py
flew-software/Dem
20b7eb9bc7c11f1baf23acfe7bfbab359ddd97fb
[ "MIT" ]
null
null
null
def row_major(l: list) -> tuple[list, int]: """ converts a 2d list to a 1d list using row major algorithm and returns a 1d list and row count """ out = [] i = 0 while i < len(l): ii = 0 a = l[i] while ii < len(a): out.append(a[ii]) ii += 1 i += 1 ...
22.933333
105
0.479651
def row_major(l: list) -> tuple[list, int]: out = [] i = 0 while i < len(l): ii = 0 a = l[i] while ii < len(a): out.append(a[ii]) ii += 1 i += 1 return out, len(l)
true
true
f720ae0b4dc5919f8c14b48866a4d15a378b186e
2,887
py
Python
EDSR/common.py
NateLol/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution
f23c043c6cd5c064e58b6b11bd7100fc55224702
[ "MIT" ]
33
2021-04-30T02:40:05.000Z
2022-03-09T09:35:49.000Z
EDSR/common.py
chisyliu/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution
4c977ea1586e7836248acb5cbd648e124b43aca3
[ "MIT" ]
6
2021-05-10T23:19:35.000Z
2021-12-13T02:13:16.000Z
EDSR/common.py
chisyliu/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution
4c977ea1586e7836248acb5cbd648e124b43aca3
[ "MIT" ]
13
2021-05-18T12:21:48.000Z
2022-01-21T07:17:19.000Z
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def default_conv(in_channels, out_channels, kernel_size, bias=True): return nn.Conv2d( in_channels, out_channels, kernel_size, padding=(kernel_size//2), bias=bias) clas...
33.569767
104
0.55594
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def default_conv(in_channels, out_channels, kernel_size, bias=True): return nn.Conv2d( in_channels, out_channels, kernel_size, padding=(kernel_size//2), bias=bias) clas...
true
true
f720ae8b8a42176cee5c72888875e04ea9be0096
749
py
Python
tests/hooks.py
j-mechacorta/atoolbox
900ad665f463d16911982dfadab7015cb95aa5ca
[ "MIT" ]
null
null
null
tests/hooks.py
j-mechacorta/atoolbox
900ad665f463d16911982dfadab7015cb95aa5ca
[ "MIT" ]
null
null
null
tests/hooks.py
j-mechacorta/atoolbox
900ad665f463d16911982dfadab7015cb95aa5ca
[ "MIT" ]
null
null
null
import os from os.path import dirname as _dir import logging def get_logger(name): return logging.getLogger('conftest.%s' % name) def pytest_sessionstart(session): BASE_FORMAT = "[%(name)s][%(levelname)-6s] %(message)s" FILE_FORMAT = "[%(asctime)s]" + BASE_FORMAT root_logger = logging.getLogger('con...
26.75
72
0.698264
import os from os.path import dirname as _dir import logging def get_logger(name): return logging.getLogger('conftest.%s' % name) def pytest_sessionstart(session): BASE_FORMAT = "[%(name)s][%(levelname)-6s] %(message)s" FILE_FORMAT = "[%(asctime)s]" + BASE_FORMAT root_logger = logging.getLogger('con...
true
true
f720ae996883f8afdc19851c7b8222b960cb4d67
389
py
Python
python-ds-practice/10_frequency/frequency.py
MostFunGuy/SpringboardProjectsPublic
bbda3ba26ecf8a09e62df81583122cae83acc1e6
[ "MIT" ]
null
null
null
python-ds-practice/10_frequency/frequency.py
MostFunGuy/SpringboardProjectsPublic
bbda3ba26ecf8a09e62df81583122cae83acc1e6
[ "MIT" ]
null
null
null
python-ds-practice/10_frequency/frequency.py
MostFunGuy/SpringboardProjectsPublic
bbda3ba26ecf8a09e62df81583122cae83acc1e6
[ "MIT" ]
null
null
null
def frequency(lst, search_term): """Return frequency of term in lst. >>> frequency([1, 4, 3, 4, 4], 4) 3 >>> frequency([1, 4, 3], 7) 0 """ return lst.count(search_term) print(F"frequency.py: frequency([1, 4, 3, 4, 4], 4) = `3` = {frequency([1, 4, 3, 4, 4], 4)}") print(F"freq...
35.363636
93
0.511568
def frequency(lst, search_term): return lst.count(search_term) print(F"frequency.py: frequency([1, 4, 3, 4, 4], 4) = `3` = {frequency([1, 4, 3, 4, 4], 4)}") print(F"frequency.py: frequency([1, 4, 3], 7) = `0` = {frequency([1, 4, 3], 7)}")
true
true
f720aeded9d52c0f3f6082dcb150a7020df5a4fb
107
py
Python
models/__init__.py
Abdulah-Fawaz/Benchmarking-Surface-DL
9693379f26d57f9aabf28b973f40a9f6f627d26f
[ "MIT" ]
2
2021-12-04T07:04:56.000Z
2021-12-13T16:28:50.000Z
models/__init__.py
Abdulah-Fawaz/Benchmarking-Surface-DL
9693379f26d57f9aabf28b973f40a9f6f627d26f
[ "MIT" ]
1
2021-12-21T09:36:11.000Z
2022-01-25T10:26:43.000Z
models/__init__.py
Abdulah-Fawaz/Benchmarking-Surface-DL
9693379f26d57f9aabf28b973f40a9f6f627d26f
[ "MIT" ]
1
2022-02-27T17:38:19.000Z
2022-02-27T17:38:19.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 29 10:29:06 2020 @author: fa19 """
11.888889
35
0.588785
true
true
f720af0f5626dfcd589a2242cb387ffca059e40a
7,100
py
Python
querybook/server/models/admin.py
czgu/querybook
fb3120245cd9693b7aa67bf0f08d427fd2dde74b
[ "Apache-2.0" ]
1,144
2021-03-30T05:06:16.000Z
2022-03-31T10:40:31.000Z
querybook/server/models/admin.py
czgu/querybook
fb3120245cd9693b7aa67bf0f08d427fd2dde74b
[ "Apache-2.0" ]
100
2021-03-30T19:43:45.000Z
2022-03-25T17:29:32.000Z
querybook/server/models/admin.py
czgu/querybook
fb3120245cd9693b7aa67bf0f08d427fd2dde74b
[ "Apache-2.0" ]
113
2021-03-30T00:07:20.000Z
2022-03-31T07:18:43.000Z
import sqlalchemy as sql from sqlalchemy.orm import relationship, backref from app import db from const.admin import AdminOperation from const.db import ( name_length, now, description_length, # mediumtext_length, # text_length ) from lib.sqlalchemy import CRUDMixin Base = db.Base class Announc...
33.809524
88
0.647183
import sqlalchemy as sql from sqlalchemy.orm import relationship, backref from app import db from const.admin import AdminOperation from const.db import ( name_length, now, description_length, ) from lib.sqlalchemy import CRUDMixin Base = db.Base class Announcement(CRUDMixin, Base): __tab...
true
true
f720af70da7be7958d444ad2af3d0b7e0b2ef072
601
py
Python
basicsortings/SelectionSort.py
ankushdecoded123/basicalgorithms
f8d42a57d7619ddb29fd6eae9e5f2db27ee5712c
[ "Apache-2.0" ]
null
null
null
basicsortings/SelectionSort.py
ankushdecoded123/basicalgorithms
f8d42a57d7619ddb29fd6eae9e5f2db27ee5712c
[ "Apache-2.0" ]
null
null
null
basicsortings/SelectionSort.py
ankushdecoded123/basicalgorithms
f8d42a57d7619ddb29fd6eae9e5f2db27ee5712c
[ "Apache-2.0" ]
null
null
null
# selectionsort() method def selectionSort(arr): arraySize = len(arr) for i in range(arraySize): min = i for j in range(i+1, arraySize): if arr[j] < arr[min]: min = j #swap values arr[i], arr[min] = arr[min], arr[i] # method to print an array def printList(arr): for i in rang...
20.033333
39
0.55574
def selectionSort(arr): arraySize = len(arr) for i in range(arraySize): min = i for j in range(i+1, arraySize): if arr[j] < arr[min]: min = j arr[i], arr[min] = arr[min], arr[i] def printList(arr): for i in range(len(arr)): print(arr[i],end=" ") print("\n") ...
true
true
f720b19536007d90852dfc1229d07fda01236456
2,189
py
Python
functions/sample/python/main.py
aneeshmraj/agfzb-CloudAppDevelopment_Capstone
ed9b1a675a0c4325e56bf77ed4497a36d1755484
[ "Apache-2.0" ]
null
null
null
functions/sample/python/main.py
aneeshmraj/agfzb-CloudAppDevelopment_Capstone
ed9b1a675a0c4325e56bf77ed4497a36d1755484
[ "Apache-2.0" ]
null
null
null
functions/sample/python/main.py
aneeshmraj/agfzb-CloudAppDevelopment_Capstone
ed9b1a675a0c4325e56bf77ed4497a36d1755484
[ "Apache-2.0" ]
null
null
null
# # # main() will be run when you invoke this action # # @param Cloud Functions actions accept a single parameter, which must be a JSON object. # # @return The output of this action, which must be a JSON object. # # from cloudant.client import Cloudant from cloudant.error import CloudantException from cloudant.query im...
31.724638
90
0.643216
from cloudant.client import Cloudant from cloudant.error import CloudantException from cloudant.query import Query from requests import ConnectionError, ReadTimeout, RequestException import requests import sys def main(dict): print(dict) service = Cloudant.iam(None, dict["IAM_API_KEY"], url=dict["COUC...
true
true
f720b26349b04b5e0459f3b75168c72fe5c3ff77
5,299
py
Python
src/OFS/tests/test_Uninstalled.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
null
null
null
src/OFS/tests/test_Uninstalled.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
1
2020-11-11T07:11:31.000Z
2020-11-11T07:11:31.000Z
src/OFS/tests/test_Uninstalled.py
rbanffy/Zope
ecf6770219052e7c7f8c9634ddf187a1e6280742
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
35.804054
79
0.627854
true
true
f720b26c972d7bdb64501599e3be9253fa24774d
18,722
py
Python
python/ray/ml/tests/test_preprocessors.py
siddgoel/ray
7f3031f451de410b71a5fcb18e04452bfa7351d6
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
python/ray/ml/tests/test_preprocessors.py
siddgoel/ray
7f3031f451de410b71a5fcb18e04452bfa7351d6
[ "Apache-2.0" ]
51
2018-05-17T05:55:28.000Z
2020-03-18T06:49:49.000Z
python/ray/ml/tests/test_preprocessors.py
siddgoel/ray
7f3031f451de410b71a5fcb18e04452bfa7351d6
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import warnings from unittest.mock import patch import numpy as np import pandas as pd import pytest import ray from ray.ml.preprocessor import PreprocessorNotFittedException from ray.ml.preprocessors import ( BatchMapper, StandardScaler, MinMaxScaler, OrdinalEncoder, OneHotEncoder, LabelEncod...
29.670365
84
0.626429
import warnings from unittest.mock import patch import numpy as np import pandas as pd import pytest import ray from ray.ml.preprocessor import PreprocessorNotFittedException from ray.ml.preprocessors import ( BatchMapper, StandardScaler, MinMaxScaler, OrdinalEncoder, OneHotEncoder, LabelEncod...
true
true
f720b26f06cbae99f40eb0f83633ea9c408ef321
5,737
py
Python
astro/plugins/_core.py
Lightyagami788/Astro-UB
cb2d8c76064c474ffd507e38421509f51918520f
[ "Apache-2.0" ]
null
null
null
astro/plugins/_core.py
Lightyagami788/Astro-UB
cb2d8c76064c474ffd507e38421509f51918520f
[ "Apache-2.0" ]
null
null
null
astro/plugins/_core.py
Lightyagami788/Astro-UB
cb2d8c76064c474ffd507e38421509f51918520f
[ "Apache-2.0" ]
1
2021-11-16T06:20:41.000Z
2021-11-16T06:20:41.000Z
import asyncio import os from datetime import datetime from pathlib import Path from telethon.tl.types import InputMessagesFilterDocument from astro.config import Config from astro import CMD_HELP from astro.utils import admin_cmd, load_module, remove_plugin NAME = Config.NAME DELETE_TIMEOUT = 5 thumb_image_path = "...
34.981707
124
0.599791
import asyncio import os from datetime import datetime from pathlib import Path from telethon.tl.types import InputMessagesFilterDocument from astro.config import Config from astro import CMD_HELP from astro.utils import admin_cmd, load_module, remove_plugin NAME = Config.NAME DELETE_TIMEOUT = 5 thumb_image_path = "...
true
true
f720b37866bd3fbd5203ac0faed5ee3a58cc01bc
317
py
Python
raspi/deskTimer.py
Itera/ariot2018
e83adc8ac4e788df09fe412dd57ce3aca966b99a
[ "MIT" ]
null
null
null
raspi/deskTimer.py
Itera/ariot2018
e83adc8ac4e788df09fe412dd57ce3aca966b99a
[ "MIT" ]
1
2018-03-15T15:04:10.000Z
2018-03-15T16:02:28.000Z
raspi/deskTimer.py
Itera/ariot2018
e83adc8ac4e788df09fe412dd57ce3aca966b99a
[ "MIT" ]
null
null
null
from threading import Timer class DeskTimer(object): current_timer = None def start(self, time, callback, *args): self.current_timer = Timer(time, callback, args) self.current_timer.start() def stop(self): if self.current_timer != None: self.current_timer.cancel()
24.384615
56
0.649842
from threading import Timer class DeskTimer(object): current_timer = None def start(self, time, callback, *args): self.current_timer = Timer(time, callback, args) self.current_timer.start() def stop(self): if self.current_timer != None: self.current_timer.cancel()
true
true
f720b3c07515379b83fea8c011c643547f776843
19,885
py
Python
perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
1
2018-08-28T19:33:21.000Z
2018-08-28T19:33:21.000Z
perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
msidana/PerfKitBenchmarker
2784642d3e6b20b3f474c4e27edb1ef163804f66
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
37.029795
80
0.692582
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import OrderedDict import json import logging import re import tempfile from perfkitbenchmarker import errors from perfkitbenchmarker import flags from perfkitbenchmarker import l...
true
true
f720b4c65b03ffc9b7a16a20c28258f9373c712e
1,316
py
Python
app/modules/ssh.py
danielpodwysocki/zoltan
52536c41e95ca7b641d4e2b740f68c9e00170aee
[ "MIT" ]
null
null
null
app/modules/ssh.py
danielpodwysocki/zoltan
52536c41e95ca7b641d4e2b740f68c9e00170aee
[ "MIT" ]
null
null
null
app/modules/ssh.py
danielpodwysocki/zoltan
52536c41e95ca7b641d4e2b740f68c9e00170aee
[ "MIT" ]
null
null
null
import re import paramiko class Handler: ''' A slash command for checking ssh connectivity and rebooting machines. ''' id = 2 def __init__(self, regexp): ''' Takes a regexp as an argument, the regexp will then be used to check if the format of the hostname is correct ''' ...
32.097561
117
0.569149
import re import paramiko class Handler: id = 2 def __init__(self, regexp): self.prog = re.compile(regexp) def command(self, message): response = "Something went wrong :(" if not message: response = "Run `/ssh [machine's name]` to see if the machine is reachable" ...
true
true
f720b5b8dd20b02542407ce32d85af6fe11ca20b
29,285
py
Python
pyqstrat/account.py
alexanu/pyqstrat
ec62a1a7b048df05e8d1058a37bfe2cf113d2815
[ "BSD-3-Clause" ]
null
null
null
pyqstrat/account.py
alexanu/pyqstrat
ec62a1a7b048df05e8d1058a37bfe2cf113d2815
[ "BSD-3-Clause" ]
null
null
null
pyqstrat/account.py
alexanu/pyqstrat
ec62a1a7b048df05e8d1058a37bfe2cf113d2815
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from sortedcontainers import SortedDict import math import pandas as pd import numpy as np from pyqstrat.pq_types import ContractGroup, Trade, Contract from types import SimpleNamespace from typing import Sequence, Any, Tuple, Callable, Union, MutableSet, MutableSequence, MutableMapp...
50.753899
155
0.625337
from collections import defaultdict from sortedcontainers import SortedDict import math import pandas as pd import numpy as np from pyqstrat.pq_types import ContractGroup, Trade, Contract from types import SimpleNamespace from typing import Sequence, Any, Tuple, Callable, Union, MutableSet, MutableSequence, MutableMapp...
true
true
f720b5f3be28e969cd5ce5fed492f2e66b5c370c
881
py
Python
setup.py
bayjan/openrisknet_magkoufopoulou
b1ed6dea48d67243c9ac81eec59e5d7830ca68de
[ "MIT" ]
null
null
null
setup.py
bayjan/openrisknet_magkoufopoulou
b1ed6dea48d67243c9ac81eec59e5d7830ca68de
[ "MIT" ]
null
null
null
setup.py
bayjan/openrisknet_magkoufopoulou
b1ed6dea48d67243c9ac81eec59e5d7830ca68de
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for openrisknet_magkoufopoulou. This file was generated with PyScaffold 3.0.3. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: http://pyscaffold.org/ """ import sys from setuptools import setup # Ad...
26.69697
75
0.713961
import sys from setuptools import setup entry_points = """ [console_scripts] # script_name = openrisknet_magkoufopoulou.module:function # For example: # fibonacci = openrisknet_magkoufopoulou.skeleton:run """ def setup_package(): needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv) sphin...
true
true
f720b71a384cd705368c6959d78e6566a4530fc2
349
py
Python
materials/sp20/hw/hw01/tests/q9.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
materials/sp20/hw/hw01/tests/q9.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
materials/sp20/hw/hw01/tests/q9.py
ds-modules/Deepnote-demo
548c12ced6cae774ecd0036aa1e8bb833af6472c
[ "BSD-3-Clause" ]
null
null
null
test = { 'name': 'q9', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> survey == "2020 vision" True """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', '...
15.173913
37
0.312321
test = { 'name': 'q9', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> survey == "2020 vision" True """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', '...
true
true
f720b7d1ae3ebf2758b3f637eac569a944ecce67
291
py
Python
utils/test_clear_data.py
M1d0r1/py_mantis
8d2b05601b9240e76e2e07b50770e39df5bcade9
[ "Apache-2.0" ]
null
null
null
utils/test_clear_data.py
M1d0r1/py_mantis
8d2b05601b9240e76e2e07b50770e39df5bcade9
[ "Apache-2.0" ]
null
null
null
utils/test_clear_data.py
M1d0r1/py_mantis
8d2b05601b9240e76e2e07b50770e39df5bcade9
[ "Apache-2.0" ]
null
null
null
import random def test_clear_projects_helper(app): while app.project.count()>0: app.project.navigate_to_manage_projects_page() old_projects = app.project.get_project_list() project = random.choice(old_projects) app.project.delete_by_name(project.name)
26.454545
54
0.725086
import random def test_clear_projects_helper(app): while app.project.count()>0: app.project.navigate_to_manage_projects_page() old_projects = app.project.get_project_list() project = random.choice(old_projects) app.project.delete_by_name(project.name)
true
true
f720b849c7ccaf49918d5f8db7e3b19f11f3203f
5,729
py
Python
tempest/api/compute/admin/test_servers_negative.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
2
2015-08-13T00:07:49.000Z
2020-08-07T06:38:44.000Z
tempest/api/compute/admin/test_servers_negative.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
1
2019-08-08T10:36:44.000Z
2019-08-09T05:58:23.000Z
tempest/api/compute/admin/test_servers_negative.py
rishabh20111990/tempest
df15531cd4231000b0da016f5cd8641523ce984e
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2013 Huawei Technologies Co.,LTD. # # 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 applica...
42.437037
78
0.64479
import testtools from tempest.api.compute import base from tempest.common import tempest_fixtures as fixtures from tempest.common import waiters from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc CON...
true
true
f720b868a2e8693f457acc29e9d2ffcfcf7e2f08
2,174
py
Python
debug/ssd/test_ssd300.py
jjjkkkjjj/pytorch.dl
d82aa1191c14f328c62de85e391ac6fa1b4c7ee3
[ "MIT" ]
2
2021-02-06T22:40:13.000Z
2021-03-26T09:15:34.000Z
debug/ssd/test_ssd300.py
jjjkkkjjj/pytorch.dl
d82aa1191c14f328c62de85e391ac6fa1b4c7ee3
[ "MIT" ]
8
2020-07-11T07:10:51.000Z
2022-03-12T00:39:03.000Z
debug/ssd/test_ssd300.py
jjjkkkjjj/pytorch.dl
d82aa1191c14f328c62de85e391ac6fa1b4c7ee3
[ "MIT" ]
2
2021-03-26T09:19:42.000Z
2021-07-27T02:38:09.000Z
from dl.data.objdetn import datasets, utils, target_transforms from dl.data import transforms from dl.models.ssd.ssd300 import SSD300 from dl.data.utils.converter import toVisualizeRectLabelRGBimg from torch.utils.data import DataLoader import cv2 if __name__ == '__main__': augmentation = None transform = tr...
43.48
130
0.677553
from dl.data.objdetn import datasets, utils, target_transforms from dl.data import transforms from dl.models.ssd.ssd300 import SSD300 from dl.data.utils.converter import toVisualizeRectLabelRGBimg from torch.utils.data import DataLoader import cv2 if __name__ == '__main__': augmentation = None transform = tr...
true
true
f720b9d8103adc5ec7d583ef9b481eed71f4b5ce
4,118
py
Python
cinder/api/v3/backups.py
hashsos/hashcloudos-cinder
6d8b648399e2160b419e3f9535eb520c7de9120e
[ "Apache-2.0" ]
null
null
null
cinder/api/v3/backups.py
hashsos/hashcloudos-cinder
6d8b648399e2160b419e3f9535eb520c7de9120e
[ "Apache-2.0" ]
null
null
null
cinder/api/v3/backups.py
hashsos/hashcloudos-cinder
6d8b648399e2160b419e3f9535eb520c7de9120e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Intel, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
37.099099
78
0.674114
from oslo_log import log as logging from webob import exc from cinder.api.contrib import backups as backups_v2 from cinder.api import microversions as mv from cinder.api.openstack import wsgi from cinder.api.v3.views import backups as backup_views from cinder import exception from cinder.i18n import _ ...
true
true
f720ba2b3e7006741b82f2fe08ab0e27de7bf237
8,422
py
Python
discordware/_vendors/hype/parser.py
znqi/discordware
e456bf7b0314ef8f29fabb9fa69f8c979f34d655
[ "MIT" ]
13
2021-07-31T12:07:06.000Z
2022-03-24T15:00:50.000Z
discordware/_vendors/hype/parser.py
znqi/discordware
e456bf7b0314ef8f29fabb9fa69f8c979f34d655
[ "MIT" ]
2
2021-08-02T14:04:58.000Z
2021-09-06T09:35:20.000Z
discordware/_vendors/hype/parser.py
znqi/discordware
e456bf7b0314ef8f29fabb9fa69f8c979f34d655
[ "MIT" ]
3
2021-08-07T13:23:54.000Z
2022-01-24T13:23:08.000Z
# Copyright (c) 2021, Serum Studio # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
31.425373
92
0.572786
from typing import List from hype.command import HypeCommand import optparse from optparse import HelpFormatter import sys import textwrap class HypeParser(optparse.OptionParser): _HelpCommand = HypeCommand('help', help="All details about the commands", aliases=('?')) def __init__( ...
true
true
f720ba72a3c86311008ec04f4371a49d7784b17c
433
py
Python
xlwt/__init__.py
drmelectronic/MIT
e28a82cd02dcc52ac233b89b43f29ede00993d11
[ "MIT" ]
292
2015-09-12T14:19:32.000Z
2022-02-19T08:46:12.000Z
xlwt/__init__.py
drmelectronic/MIT
e28a82cd02dcc52ac233b89b43f29ede00993d11
[ "MIT" ]
4
2015-11-18T08:10:14.000Z
2017-03-25T13:32:20.000Z
xlwt/__init__.py
drmelectronic/MIT
e28a82cd02dcc52ac233b89b43f29ede00993d11
[ "MIT" ]
131
2015-09-14T06:32:03.000Z
2021-06-11T02:31:38.000Z
# -*- coding: windows-1252 -*- __VERSION__ = '0.7.4' import sys if sys.version_info[:2] < (2, 3): print >> sys.stderr, "Sorry, xlwt requires Python 2.3 or later" sys.exit(1) from Workbook import Workbook from Worksheet import Worksheet from Row import Row from Column import Column from Formatting import Font...
25.470588
68
0.741339
__VERSION__ = '0.7.4' import sys if sys.version_info[:2] < (2, 3): print >> sys.stderr, "Sorry, xlwt requires Python 2.3 or later" sys.exit(1) from Workbook import Workbook from Worksheet import Worksheet from Row import Row from Column import Column from Formatting import Font, Alignment, Borders, Pattern,...
true
true
f720bb34265c748c8a67a6a2025eb32ff567dad4
773
py
Python
src/tools/reshape.py
Lin-Lei/CenterNet
0778dfcf4fb8e5b013dda7ab8c680f232ca851b1
[ "MIT" ]
null
null
null
src/tools/reshape.py
Lin-Lei/CenterNet
0778dfcf4fb8e5b013dda7ab8c680f232ca851b1
[ "MIT" ]
null
null
null
src/tools/reshape.py
Lin-Lei/CenterNet
0778dfcf4fb8e5b013dda7ab8c680f232ca851b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Aug 23 16:06:35 2018 @author: libo """ from PIL import Image import os def image_resize(image_path, new_path): # 统一图片尺寸 print('============>>修改图片尺寸') for img_name in os.listdir(image_path): img_path = image_path + "/" + img_name # 获取该图片全称 image = Im...
30.92
74
0.635188
from PIL import Image import os def image_resize(image_path, new_path): print('============>>修改图片尺寸') for img_name in os.listdir(image_path): img_path = image_path + "/" + img_name image = Image.open(img_path) image = image.resize((512, 512)) image.save(new_pa...
true
true
f720bbb8b5465f2391f8ff3bd20b2b9312393ba6
5,112
py
Python
BlindTest/display.py
smart-fun/Raspberry
e2ac8caff2732786bc51a7c5ab64507e7a9a8fac
[ "Apache-2.0" ]
null
null
null
BlindTest/display.py
smart-fun/Raspberry
e2ac8caff2732786bc51a7c5ab64507e7a9a8fac
[ "Apache-2.0" ]
null
null
null
BlindTest/display.py
smart-fun/Raspberry
e2ac8caff2732786bc51a7c5ab64507e7a9a8fac
[ "Apache-2.0" ]
null
null
null
import pygame as pg import pygame_widgets as pw from math import sin, cos SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 WHITE = (255,255,255) YELLOW = (220,220,0) RED = (220,0,0) GREY = (180,180,180) BLACK = (0,0,0) GREEN = (0,200,0) BUTTON_COLOR = (0,0,220) BUTTON_HOVER_COLOR = GREEN BUTTON_PRESS_COLOR = (0,100,0) def cr...
28.719101
101
0.635759
import pygame as pg import pygame_widgets as pw from math import sin, cos SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 WHITE = (255,255,255) YELLOW = (220,220,0) RED = (220,0,0) GREY = (180,180,180) BLACK = (0,0,0) GREEN = (0,200,0) BUTTON_COLOR = (0,0,220) BUTTON_HOVER_COLOR = GREEN BUTTON_PRESS_COLOR = (0,100,0) def cr...
true
true
f720bbc6a4f8599443bb6753b941ccb39af1e390
647
py
Python
merchant/migrations/0001_initial.py
Pesenin-Team/pesenin
6b3dcc84e6e48768ce231ffedc43c56981fc6606
[ "MIT" ]
4
2019-10-15T12:35:15.000Z
2019-10-16T12:38:51.000Z
merchant/migrations/0001_initial.py
Pesenin-Team/pesenin
6b3dcc84e6e48768ce231ffedc43c56981fc6606
[ "MIT" ]
null
null
null
merchant/migrations/0001_initial.py
Pesenin-Team/pesenin
6b3dcc84e6e48768ce231ffedc43c56981fc6606
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-17 10:38 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Merchant', fields=[ ('id', ...
26.958333
115
0.55796
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Merchant', fields=[ ('id', models.AutoField(auto_created=True, primary_key=...
true
true
f720bbea22a5dbf7c0ffdeeda3c286344fc9500b
12,806
py
Python
protonvpn-applet.py
seadanda/protonvpn-applet
f32978192f523ed8ee661d200c508b221e0ffccd
[ "MIT" ]
15
2019-09-13T07:11:52.000Z
2021-05-23T10:13:57.000Z
protonvpn-applet.py
seadanda/pvpn-applet
f32978192f523ed8ee661d200c508b221e0ffccd
[ "MIT" ]
11
2019-11-26T12:08:20.000Z
2020-10-24T13:08:24.000Z
protonvpn-applet.py
seadanda/pvpn-applet
f32978192f523ed8ee661d200c508b221e0ffccd
[ "MIT" ]
2
2019-11-24T00:44:55.000Z
2020-06-28T20:31:42.000Z
#!/usr/bin/env python3 import sys import subprocess import functools from enum import Enum import gi gi.require_version('Notify', '0.7') from gi.repository import Notify from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QSystemTrayIcon, QMenu, QAction, qApp, QMessageBox from PyQt5.QtCore import QSize, QT...
33.878307
119
0.679291
import sys import subprocess import functools from enum import Enum import gi gi.require_version('Notify', '0.7') from gi.repository import Notify from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QSystemTrayIcon, QMenu, QAction, qApp, QMessageBox from PyQt5.QtCore import QSize, QThread, pyqtSignal from...
true
true
f720bbec31bcc03b0a76267cc6d1919b2116ffc8
3,982
py
Python
pygraphblas/demo/dnn.py
szarnyasg/pygraphblas
7465ef6fcc77c9901869b70ddf1d77a86570c336
[ "Apache-2.0" ]
null
null
null
pygraphblas/demo/dnn.py
szarnyasg/pygraphblas
7465ef6fcc77c9901869b70ddf1d77a86570c336
[ "Apache-2.0" ]
null
null
null
pygraphblas/demo/dnn.py
szarnyasg/pygraphblas
7465ef6fcc77c9901869b70ddf1d77a86570c336
[ "Apache-2.0" ]
null
null
null
import os from functools import wraps, partial from time import time from statistics import mean from pathlib import Path from pygraphblas import * from multiprocessing.pool import ThreadPool from multiprocessing import cpu_count NFEATURES = 60000 BIAS = {1024: -0.3, 4096: -0.35, 16384: -0.4, 65536: -0.45} def timing...
30.396947
76
0.594927
import os from functools import wraps, partial from time import time from statistics import mean from pathlib import Path from pygraphblas import * from multiprocessing.pool import ThreadPool from multiprocessing import cpu_count NFEATURES = 60000 BIAS = {1024: -0.3, 4096: -0.35, 16384: -0.4, 65536: -0.45} def timing...
true
true
f720bca64500834838fa25d7053779b0ff0a3d49
1,252
py
Python
backend/server.py
ryzbaka/Niyuddha
ca54a5c79b8e733aca494f996f05c10ef5cf4950
[ "MIT" ]
null
null
null
backend/server.py
ryzbaka/Niyuddha
ca54a5c79b8e733aca494f996f05c10ef5cf4950
[ "MIT" ]
null
null
null
backend/server.py
ryzbaka/Niyuddha
ca54a5c79b8e733aca494f996f05c10ef5cf4950
[ "MIT" ]
null
null
null
from flask import Flask,jsonify,request import os from subprocess import PIPE,Popen app = Flask(__name__) @app.route("/",methods=["GET"]) def home(): return "Working" @app.route("/sendcode",methods=["POST"]) def sendCode(): print(request.json) owd = os.getcwd() # chdir into this once done executing. u...
36.823529
105
0.682907
from flask import Flask,jsonify,request import os from subprocess import PIPE,Popen app = Flask(__name__) @app.route("/",methods=["GET"]) def home(): return "Working" @app.route("/sendcode",methods=["POST"]) def sendCode(): print(request.json) owd = os.getcwd() username = request.json['username'] ...
true
true
f720bcd371ce68d744f5e4f9a76e113f3947b3e5
3,220
py
Python
pyrasterframes/src/main/python/pyrasterframes/rf_context.py
mjohns-databricks/rasterframes
44f40726b79e4b3600d6990b73c815b6f891be07
[ "Apache-2.0" ]
180
2018-03-21T13:34:08.000Z
2022-03-19T03:31:24.000Z
pyrasterframes/src/main/python/pyrasterframes/rf_context.py
mjohns-databricks/rasterframes
44f40726b79e4b3600d6990b73c815b6f891be07
[ "Apache-2.0" ]
442
2018-05-02T13:14:35.000Z
2022-03-28T21:49:58.000Z
pyrasterframes/src/main/python/pyrasterframes/rf_context.py
mjohns-databricks/rasterframes
44f40726b79e4b3600d6990b73c815b6f891be07
[ "Apache-2.0" ]
45
2018-05-03T13:46:04.000Z
2022-01-30T23:16:00.000Z
# # This software is licensed under the Apache 2 license, quoted below. # # Copyright 2019 Astraea, 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/LI...
32.525253
117
0.684472
from pyspark import SparkContext from pyspark.sql import SparkSession from typing import Any, List from py4j.java_gateway import JavaMember from py4j.java_collections import JavaList, JavaMap from typing import Tuple __all__ = ['RFContext'] class RFContext(object): def __init__(self, spark_...
true
true
f720bd0c2b5ca565bfafb6e86a7b848c423f5997
686
py
Python
tests/scrubber/test_scrubber.py
scottkleinman/lexos
d362ddd05ef23b5173ce303eb7b08ff3583ac709
[ "MIT" ]
null
null
null
tests/scrubber/test_scrubber.py
scottkleinman/lexos
d362ddd05ef23b5173ce303eb7b08ff3583ac709
[ "MIT" ]
null
null
null
tests/scrubber/test_scrubber.py
scottkleinman/lexos
d362ddd05ef23b5173ce303eb7b08ff3583ac709
[ "MIT" ]
null
null
null
"""test_scrubber.py.""" # Import a minimal text loader class, the functions for scrubber pipelines, # and the scrubber function registry from lexos.io.basic import Loader from lexos.scrubber.pipeline import make_pipeline from lexos.scrubber.registry import scrubber_components from lexos.scrubber.scrubber import Scrubb...
26.384615
75
0.781341
from lexos.io.basic import Loader from lexos.scrubber.pipeline import make_pipeline from lexos.scrubber.registry import scrubber_components from lexos.scrubber.scrubber import Scrubber data = "tests/test_data/Austen_Pride.txt" loader = Loader() loader.load(data) text = loader.texts[0] lower_case = scrubber_compon...
true
true
f720be44decd15c1c50cc613e248b09f157857d5
335
py
Python
resources/ai/swagger/__init__.py
GMKrieger/ai_api
9ed661d29afb3232b7930727d056abdedfb91b43
[ "MIT" ]
null
null
null
resources/ai/swagger/__init__.py
GMKrieger/ai_api
9ed661d29afb3232b7930727d056abdedfb91b43
[ "MIT" ]
10
2020-01-28T22:15:24.000Z
2021-04-30T20:36:27.000Z
resources/ai/swagger/__init__.py
GMKrieger/ai_api
9ed661d29afb3232b7930727d056abdedfb91b43
[ "MIT" ]
null
null
null
""" swagger module - A package defining the swagger features. This module creates the swagger structure and defines the data to show when the swagger is activated. It does not contain the html and css files used to create the page, only the underlying structure. The html and css can be found at the sta...
41.875
86
0.746269
true
true
f720bf58d889e6191c183282ec836d74afba0701
704
py
Python
tools/mo/openvino/tools/mo/front/caffe/grn_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2019-09-22T01:05:07.000Z
2019-09-22T01:05:07.000Z
tools/mo/openvino/tools/mo/front/caffe/grn_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
tools/mo/openvino/tools/mo/front/caffe/grn_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2
2021-07-14T07:40:50.000Z
2021-07-27T01:40:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from openvino.tools.mo.ops.grn import GRNOp from openvino.tools.mo.front.caffe.collect_attributes import merge_attrs from openvino.tools.mo.front.extractor import FrontExtractorOp class GRNFrontExtractor(FrontExtractorOp): op = 'GR...
26.074074
72
0.693182
from openvino.tools.mo.ops.grn import GRNOp from openvino.tools.mo.front.caffe.collect_attributes import merge_attrs from openvino.tools.mo.front.extractor import FrontExtractorOp class GRNFrontExtractor(FrontExtractorOp): op = 'GRN' enabled = True @classmethod def extract(cls, node): prot...
true
true
f720bf66d4521a60fee34b616ef7d1b5989d5e01
256
py
Python
code/learn-AI/matplotlib/graph/sigmoid_function.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
1
2019-03-27T23:22:44.000Z
2019-03-27T23:22:44.000Z
code/learn-AI/matplotlib/graph/sigmoid_function.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
code/learn-AI/matplotlib/graph/sigmoid_function.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt def func(x): return 1 / (1 + np.exp(-x)) # Return evenly spaced numbers over a specified interval. xdata = np.linspace(-8, 8, 960,endpoint=True) ydata = func(xdata) plt.plot(xdata,ydata) plt.show()
19.692308
57
0.707031
import numpy as np import matplotlib.pyplot as plt def func(x): return 1 / (1 + np.exp(-x)) xdata = np.linspace(-8, 8, 960,endpoint=True) ydata = func(xdata) plt.plot(xdata,ydata) plt.show()
true
true
f720bf6a9fb2642c27030209f924c321a1edff82
3,343
py
Python
DownData/Link_down.py
Max-astro/A2Project
5d40263742133f214936b06b622d08092e694aed
[ "MIT" ]
null
null
null
DownData/Link_down.py
Max-astro/A2Project
5d40263742133f214936b06b622d08092e694aed
[ "MIT" ]
null
null
null
DownData/Link_down.py
Max-astro/A2Project
5d40263742133f214936b06b622d08092e694aed
[ "MIT" ]
null
null
null
import requests import sys import h5py import numpy as np import os def get(path, params=None, savedir=None): # make HTTP GET request to path headers = {"api-key":"27d44ba55cd115b10f2dd9153589aff0"} r = requests.get(path, params=params, headers=headers) # raise exception if response code is...
29.324561
180
0.597368
import requests import sys import h5py import numpy as np import os def get(path, params=None, savedir=None): headers = {"api-key":"27d44ba55cd115b10f2dd9153589aff0"} r = requests.get(path, params=params, headers=headers) r.raise_for_status() if r.headers['content-type'] == 'app...
true
true
f720bf86d570b0fdfb0907c0f3e9814300ec73f6
15,954
py
Python
aphla/gui/qrangeslider.py
NSLS-II/aphla
ceb5410dc836a8fb16321b6dc5e10d442be765c5
[ "BSD-3-Clause" ]
null
null
null
aphla/gui/qrangeslider.py
NSLS-II/aphla
ceb5410dc836a8fb16321b6dc5e10d442be765c5
[ "BSD-3-Clause" ]
1
2020-02-17T18:56:18.000Z
2020-02-20T17:06:20.000Z
aphla/gui/qrangeslider.py
NSLS-II/aphla
ceb5410dc836a8fb16321b6dc5e10d442be765c5
[ "BSD-3-Clause" ]
1
2021-03-08T16:07:11.000Z
2021-03-08T16:07:11.000Z
#!/usr/bin/env python # ------------------------------------------------------------------------------ # Copyright (c) 2011-2012, Ryan Galloway (ryan@rsgalloway.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
31.529644
109
0.573587
__author__ = "Ryan Galloway <ryan@rsgalloway.com>" __version__ = "0.1" import os import sys from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4 import uic try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s __all__ = ...
true
true
f720c25b3abb18927b7fd60019577787312ad4c2
3,406
py
Python
backend/remap/predictors.py
hugocalcad/remap_rev
fa435784f897b7f4186b8ff703b3e08f48160b9f
[ "Apache-2.0" ]
17
2018-08-30T22:46:47.000Z
2021-12-23T08:19:50.000Z
backend/remap/predictors.py
red-list-ecosystem/REMAP
e1e60c56dad76dc1927af5f24a30cb28144a91c8
[ "Apache-2.0" ]
3
2019-11-01T13:58:19.000Z
2021-03-11T10:21:51.000Z
backend/remap/predictors.py
hugocalcad/remap_rev
fa435784f897b7f4186b8ff703b3e08f48160b9f
[ "Apache-2.0" ]
2
2017-11-29T02:40:03.000Z
2017-12-20T22:00:37.000Z
predictors = [ { "description": "todo", "long_name": "Normalised Difference Vegetation index", "short_name": "NDVI", "type": "Index", "ee_import": 'LANDSAT/LC8_SR', "checked": True, "vis": True, "ramp": '000000, 00FF00' }, { "descriptio...
26
62
0.491486
predictors = [ { "description": "todo", "long_name": "Normalised Difference Vegetation index", "short_name": "NDVI", "type": "Index", "ee_import": 'LANDSAT/LC8_SR', "checked": True, "vis": True, "ramp": '000000, 00FF00' }, { "descriptio...
true
true
f720c4b0ba8a3112b5e4c2e356fdfa9e370b254c
11,793
py
Python
test/unit/mongo_class/server_connect.py
mjpernot/mongo-lib
be8aa4f0cbf7fdf475bf67c07df813ffc560c3ef
[ "MIT" ]
null
null
null
test/unit/mongo_class/server_connect.py
mjpernot/mongo-lib
be8aa4f0cbf7fdf475bf67c07df813ffc560c3ef
[ "MIT" ]
null
null
null
test/unit/mongo_class/server_connect.py
mjpernot/mongo-lib
be8aa4f0cbf7fdf475bf67c07df813ffc560c3ef
[ "MIT" ]
null
null
null
#!/usr/bin/python # Classification (U) """Program: server_connect.py Description: Unit testing of Server.connect in mongo_class.py. Usage: test/unit/mongo_class/server_connect.py Arguments: """ # Libraries and Global Variables # Standard import sys import os if sys.version_info < (2, 7): ...
27.425581
78
0.620114
import sys import os if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import mock sys.path.append(os.getcwd()) import mongo_class import version __version__ = version.__version__ class UnitTest(unittest.TestCase): def setUp(self): self.name = "Mongo...
true
true
f720c55c567a173b520fcbc4127c246b39b6746f
8,696
py
Python
tests/python/contrib/test_ethosn/test_networks.py
BaldLee/tvm
b53472c7b6afa34260afeffc5f088591352c58c3
[ "Apache-2.0" ]
10
2019-03-09T07:51:56.000Z
2021-09-14T03:06:20.000Z
tests/python/contrib/test_ethosn/test_networks.py
BaldLee/tvm
b53472c7b6afa34260afeffc5f088591352c58c3
[ "Apache-2.0" ]
9
2021-10-20T13:48:52.000Z
2021-12-09T07:14:24.000Z
tests/python/contrib/test_ethosn/test_networks.py
BaldLee/tvm
b53472c7b6afa34260afeffc5f088591352c58c3
[ "Apache-2.0" ]
5
2020-11-13T19:26:25.000Z
2022-01-25T07:55:16.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...
39.171171
100
0.700092
import pytest pytest.importorskip("tflite") pytest.importorskip("tensorflow") from tvm import relay from tvm.testing import requires_ethosn from tvm.contrib import download from tvm.testing import requires_ethosn import tvm.relay.testing.tf as tf_testing import tflite.Model from . import infrastruc...
true
true
f720c5e752d2911c7077e24ef935f054b6818fb0
6,799
py
Python
source/Mlos.Python/mlos/Optimizers/RegressionModels/SklearnRidgeRegressionModelConfig.py
kkanellis/MLOS
791d670a4c44467b2b4c9633f8aa1bebab50771f
[ "MIT" ]
81
2020-08-25T17:08:05.000Z
2022-03-19T08:58:56.000Z
source/Mlos.Python/mlos/Optimizers/RegressionModels/SklearnRidgeRegressionModelConfig.py
grlap/MLOS
f828cf2b46ed63d7c9b3bd6cef73b2027a7ad12a
[ "MIT" ]
173
2020-08-25T17:38:04.000Z
2021-11-02T19:34:00.000Z
source/Mlos.Python/mlos/Optimizers/RegressionModels/SklearnRidgeRegressionModelConfig.py
grlap/MLOS
f828cf2b46ed63d7c9b3bd6cef73b2027a7ad12a
[ "MIT" ]
38
2020-08-25T20:49:14.000Z
2022-03-16T16:30:27.000Z
# # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # from enum import Enum from mlos.Spaces import SimpleHypergrid, ContinuousDimension, DiscreteDimension, CategoricalDimension, Point from mlos.Spaces.Configs.DefaultConfigMeta import DefaultConfigMeta class SklearnRidgeRegressionMod...
49.268116
116
0.631563
from enum import Enum from mlos.Spaces import SimpleHypergrid, ContinuousDimension, DiscreteDimension, CategoricalDimension, Point from mlos.Spaces.Configs.DefaultConfigMeta import DefaultConfigMeta class SklearnRidgeRegressionModelConfig(metaclass=DefaultConfigMeta): class Solver(Enum): AUTO...
true
true
f720c7aa06d180672d2e8ae9ac3670dabcc51952
10,404
py
Python
tensorflow_probability/substrates/meta/rewrite.py
varomodt/probability
d68de79e67c06ab46509744574a044ccb966c4d5
[ "Apache-2.0" ]
1
2020-01-16T02:19:34.000Z
2020-01-16T02:19:34.000Z
tensorflow_probability/substrates/meta/rewrite.py
varomodt/probability
d68de79e67c06ab46509744574a044ccb966c4d5
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/substrates/meta/rewrite.py
varomodt/probability
d68de79e67c06ab46509744574a044ccb966c4d5
[ "Apache-2.0" ]
1
2020-10-19T11:24:40.000Z
2020-10-19T11:24:40.000Z
# Copyright 2019 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
40.48249
78
0.663975
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from absl import app from absl import flags flags.DEFINE_boolean('numpy_to_jax', False, 'Whether or not to rewrite numpy imports to jax.numpy') flags.DE...
true
true
f720c8e34817cce8439e26b7ffd83fa810781ad6
35,031
py
Python
Pilot1/Combo/combo_dose.py
j-woz/Benchmarks
d518162fdafb7cfa26071b6a30a3b456dad024f6
[ "MIT" ]
2
2021-02-06T06:47:19.000Z
2021-02-24T13:45:02.000Z
Pilot1/Combo/combo_dose.py
j-woz/Benchmarks
d518162fdafb7cfa26071b6a30a3b456dad024f6
[ "MIT" ]
null
null
null
Pilot1/Combo/combo_dose.py
j-woz/Benchmarks
d518162fdafb7cfa26071b6a30a3b456dad024f6
[ "MIT" ]
1
2019-08-14T14:29:42.000Z
2019-08-14T14:29:42.000Z
#! /usr/bin/env python from __future__ import division, print_function import argparse import collections import logging import os import random import threading import numpy as np import pandas as pd from itertools import cycle, islice import keras from keras import backend as K from keras import optimizers from ...
40.876313
187
0.61163
from __future__ import division, print_function import argparse import collections import logging import os import random import threading import numpy as np import pandas as pd from itertools import cycle, islice import keras from keras import backend as K from keras import optimizers from keras.models import Mo...
true
true
f720c93c4cd30b631b5aa4846951a414fc4befea
8,078
py
Python
nets/mobilenet/mobilenet_v2.py
Popcorn-sugar/Deep_v2
23c25f74e36016658558e690890499bc7fd2aeb2
[ "MIT" ]
null
null
null
nets/mobilenet/mobilenet_v2.py
Popcorn-sugar/Deep_v2
23c25f74e36016658558e690890499bc7fd2aeb2
[ "MIT" ]
null
null
null
nets/mobilenet/mobilenet_v2.py
Popcorn-sugar/Deep_v2
23c25f74e36016658558e690890499bc7fd2aeb2
[ "MIT" ]
null
null
null
# Copyright 2018 The TensorFlow 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 applica...
37.225806
80
0.694974
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import functools import tensorflow as tf from nets.mobilenet import conv_blocks as ops from nets.mobilenet import mobilenet as lib import tf_slim as slim op = lib.op expand_input ...
true
true
f720cb08684941936d653c433957364d390d8967
3,246
py
Python
mt/preprocess/1_process_raw.py
salvacarrion/nmt-continual-learning
302147ac9c270f3341a68a72c803c457f05ff37b
[ "MIT" ]
1
2021-05-26T11:35:09.000Z
2021-05-26T11:35:09.000Z
mt/preprocess/1_process_raw.py
salvacarrion/nmt-continual-learning
302147ac9c270f3341a68a72c803c457f05ff37b
[ "MIT" ]
1
2021-05-26T11:36:24.000Z
2021-05-26T11:36:24.000Z
mt/preprocess/1_process_raw.py
salvacarrion/nmt-continual-learning
302147ac9c270f3341a68a72c803c457f05ff37b
[ "MIT" ]
null
null
null
import os import pandas as pd from pathlib import Path import numpy as np from mt import RAW_PATH from mt import utils SUFFLE = True CONSTRAINED = True TR_DATA_PATH = "/home/salva/Documents/Programming/Datasets/scielo/originals/scielo-gma/scielo-gma" TR_RAW_FILES = ["es-en-gma-biological.csv", "es-en-gma-health.csv"...
35.282609
117
0.594886
import os import pandas as pd from pathlib import Path import numpy as np from mt import RAW_PATH from mt import utils SUFFLE = True CONSTRAINED = True TR_DATA_PATH = "/home/salva/Documents/Programming/Datasets/scielo/originals/scielo-gma/scielo-gma" TR_RAW_FILES = ["es-en-gma-biological.csv", "es-en-gma-health.csv"...
true
true