hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7909dccee6cfa7b82cb045faf4538d6ccb83e2a7
630
py
Python
cannes_accomodation/gen_docker_compose.py
Xogiga/CPOA_INEC_SAVIGNY_VALADE
f33a9e9448f011bcc56abc0c2270bf0c3d9ae43a
[ "MIT" ]
null
null
null
cannes_accomodation/gen_docker_compose.py
Xogiga/CPOA_INEC_SAVIGNY_VALADE
f33a9e9448f011bcc56abc0c2270bf0c3d9ae43a
[ "MIT" ]
null
null
null
cannes_accomodation/gen_docker_compose.py
Xogiga/CPOA_INEC_SAVIGNY_VALADE
f33a9e9448f011bcc56abc0c2270bf0c3d9ae43a
[ "MIT" ]
null
null
null
from accomodation_website.secrets import DB_PWD docker_compose = """--- version: '3' services: web: build: . publish: - 80 links: ...
31.5
60
0.349206
from accomodation_website.secrets import DB_PWD docker_compose = """--- version: '3' services: web: build: . publish: - 80 links: ...
true
true
7909ddc1c9c24250060fbf7335eb390653c183b7
9,837
py
Python
TimeWrapper_JE/venv/Lib/site-packages/setuptools/_vendor/packaging/markers.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
2
2020-09-22T14:38:24.000Z
2020-10-30T03:11:36.000Z
TimeWrapper_JE/venv/Lib/site-packages/setuptools/_vendor/packaging/markers.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
TimeWrapper_JE/venv/Lib/site-packages/setuptools/_vendor/packaging/markers.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import operator import os import platform import sys from setup...
29.899696
93
0.603741
from __future__ import absolute_import, division, print_function import operator import os import platform import sys from setuptools.extern.pyparsing import ParseException, ParseResults, stringStart, stringEnd from setuptools.extern.pyparsing import ZeroOrMore, Group, Forward, QuotedString from setuptool...
true
true
7909df315f60a520d86b5dda95a110d334a5c6f3
2,432
py
Python
masakarimonitors/version.py
iorchard/masakari-monitors
bcf6129798a821975ab22cff56c791c81883f5da
[ "Apache-2.0" ]
11
2016-11-20T08:00:52.000Z
2020-08-31T10:25:42.000Z
masakarimonitors/version.py
iorchard/masakari-monitors
bcf6129798a821975ab22cff56c791c81883f5da
[ "Apache-2.0" ]
null
null
null
masakarimonitors/version.py
iorchard/masakari-monitors
bcf6129798a821975ab22cff56c791c81883f5da
[ "Apache-2.0" ]
10
2016-11-17T05:58:44.000Z
2019-07-01T09:10:44.000Z
# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
27.954023
74
0.704359
from pbr import version as pbr_version MONITORS_VENDOR = "OpenStack Foundation" MONITORS_PRODUCT = "OpenStack Masakari Monitors" MONITORS_PACKAGE = None loaded = False version_info = pbr_version.VersionInfo('masakari-monitors') version_string = version_info.version_string def _load_config(): ...
true
true
7909df6bb968934f0cd637987860c8a1104ed839
4,663
py
Python
ernie/classification/service/client.py
lerry-lee/similarity-model
74ea7f4fc97382d87e6ab71531e66182ca1ba3f4
[ "MIT" ]
4
2021-05-24T10:34:12.000Z
2021-12-17T06:28:30.000Z
ernie/classification/service/client.py
lerry-lee/similarity-model
74ea7f4fc97382d87e6ab71531e66182ca1ba3f4
[ "MIT" ]
null
null
null
ernie/classification/service/client.py
lerry-lee/similarity-model
74ea7f4fc97382d87e6ab71531e66182ca1ba3f4
[ "MIT" ]
2
2021-03-01T16:06:49.000Z
2021-08-08T16:09:14.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
42.009009
130
0.650011
from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from propeller.service.client import InferenceClient from propeller import log import six from tmp import util from time import time import ...
true
true
7909e030920127315f407061227ef507ac37bca0
493
py
Python
dynamicProgramming/303_range_sum_query_immutable.py
weilincheng/LeetCode-practice
6e105bf381661d9f737d724c2dd42aa9cf9a5588
[ "MIT" ]
null
null
null
dynamicProgramming/303_range_sum_query_immutable.py
weilincheng/LeetCode-practice
6e105bf381661d9f737d724c2dd42aa9cf9a5588
[ "MIT" ]
null
null
null
dynamicProgramming/303_range_sum_query_immutable.py
weilincheng/LeetCode-practice
6e105bf381661d9f737d724c2dd42aa9cf9a5588
[ "MIT" ]
null
null
null
class NumArray: # O(n) time | O(n) space - where n is the length of the input list def __init__(self, nums: List[int]): self.nums = [] currentSum = 0 for num in nums: currentSum += num self.nums.append(currentSum) # O(1) time to look up the nums list def s...
35.214286
70
0.549696
class NumArray: def __init__(self, nums: List[int]): self.nums = [] currentSum = 0 for num in nums: currentSum += num self.nums.append(currentSum) def sumRange(self, left: int, right: int) -> int: if left > 0: return self.nums[right] ...
true
true
7909e0e8a61bb7cf1b1a37b957ce9515fb66e3c4
1,584
py
Python
src/olympia/pages/urls.py
anik31/addons-server
cecb61da98d6e830fb45a2b1d61b41e72812137e
[ "BSD-3-Clause" ]
2
2021-07-19T03:26:43.000Z
2021-07-24T03:12:52.000Z
src/olympia/pages/urls.py
anik31/addons-server
cecb61da98d6e830fb45a2b1d61b41e72812137e
[ "BSD-3-Clause" ]
760
2021-05-17T07:59:30.000Z
2022-03-31T11:14:15.000Z
src/olympia/pages/urls.py
championshuttler/addons-server
5d4c1bfbed2fc509ecc1f3f5065955996e057eeb
[ "BSD-3-Clause" ]
1
2021-07-19T03:26:52.000Z
2021-07-19T03:26:52.000Z
from django.conf import settings from django.urls import re_path from django.http import HttpResponsePermanentRedirect as perma_redirect from django.urls import reverse from django.views.generic.base import TemplateView urlpatterns = [ re_path( r'^about$', TemplateView.as_view(template_name='pages...
30.461538
88
0.659091
from django.conf import settings from django.urls import re_path from django.http import HttpResponsePermanentRedirect as perma_redirect from django.urls import reverse from django.views.generic.base import TemplateView urlpatterns = [ re_path( r'^about$', TemplateView.as_view(template_name='pages...
true
true
7909e0ffec49b0bf73dd169d12190aee676388b8
1,047
py
Python
augur/routes/user.py
guowenbin90/augur
bccaf3139663ff4ea6a0ac6f45fe6d39d164c2cd
[ "MIT" ]
5
2019-04-14T14:05:05.000Z
2019-12-05T15:57:50.000Z
augur/routes/user.py
guowenbin90/augur
bccaf3139663ff4ea6a0ac6f45fe6d39d164c2cd
[ "MIT" ]
16
2019-04-25T00:06:57.000Z
2022-01-22T04:26:28.000Z
augur/routes/user.py
guowenbin90/augur
bccaf3139663ff4ea6a0ac6f45fe6d39d164c2cd
[ "MIT" ]
3
2019-04-12T20:34:35.000Z
2019-04-14T19:06:25.000Z
import json from flask import Flask, request, Response, send_from_directory, redirect, flash from flask_login import LoginManager, current_user, login_user from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import DataRequired from ..models ...
31.727273
80
0.698185
import json from flask import Flask, request, Response, send_from_directory, redirect, flash from flask_login import LoginManager, current_user, login_user from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import DataRequired from ..models ...
true
true
7909e130e348c46558e8dd0081a32a0a4c2fc740
31,540
py
Python
mesonbuild/cmake/traceparser.py
andriyor/meson
f9bfeb2add70973113ab4a98454a5c5d7e3a26ae
[ "Apache-2.0" ]
1
2022-02-25T00:07:10.000Z
2022-02-25T00:07:10.000Z
mesonbuild/cmake/traceparser.py
andriyor/meson
f9bfeb2add70973113ab4a98454a5c5d7e3a26ae
[ "Apache-2.0" ]
null
null
null
mesonbuild/cmake/traceparser.py
andriyor/meson
f9bfeb2add70973113ab4a98454a5c5d7e3a26ae
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Meson development team # 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 ...
41.014304
186
0.590298
from .common import CMakeException from .generator import parse_generator_expressions from .. import mlog from ..mesonlib import version_compare import typing as T from pathlib import Path from functools import lru_cache import re import json import textwrap class CMakeTraceLine: def __init__(sel...
true
true
7909e1c565267d6d7277ce4981ac6e27c41bf18b
676
py
Python
build/scripts-3.9/django-admin.py
HelloAny/nwalgo
e02493da60da4f2c33b2bfa77e0441ef66b7b5ad
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
build/scripts-3.9/django-admin.py
HelloAny/nwalgo
e02493da60da4f2c33b2bfa77e0441ef66b7b5ad
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
build/scripts-3.9/django-admin.py
HelloAny/nwalgo
e02493da60da4f2c33b2bfa77e0441ef66b7b5ad
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
#!/usr/local/opt/python@3.9/bin/python3.9 # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was deprecated in Dja...
30.727273
80
0.720414
import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was deprecated in Django 3.1 and removed in Django ' '4.0. Please manually remove this script from your virtual enviro...
true
true
7909e27cfe0db281cd4aefe7fb96cde4b0521937
623
py
Python
Lambda functions/LF0.py
nikhilkhaneja/Dining-Concierge-using-AWS-1
1b60a462cfb470a58abd0c2eeaa6c1b5f47a8b26
[ "MIT" ]
null
null
null
Lambda functions/LF0.py
nikhilkhaneja/Dining-Concierge-using-AWS-1
1b60a462cfb470a58abd0c2eeaa6c1b5f47a8b26
[ "MIT" ]
null
null
null
Lambda functions/LF0.py
nikhilkhaneja/Dining-Concierge-using-AWS-1
1b60a462cfb470a58abd0c2eeaa6c1b5f47a8b26
[ "MIT" ]
1
2021-10-09T20:08:50.000Z
2021-10-09T20:08:50.000Z
import json import boto3 def lambda_handler(event, context): print(event) lex = boto3.client('lex-runtime') lex_resp = lex.post_text( botName = 'dining_concierge_bot', botAlias = 'Test', userId = 'user01', inputText = event['messages'][0]['unstructured']['text'], act...
23.961538
65
0.457464
import json import boto3 def lambda_handler(event, context): print(event) lex = boto3.client('lex-runtime') lex_resp = lex.post_text( botName = 'dining_concierge_bot', botAlias = 'Test', userId = 'user01', inputText = event['messages'][0]['unstructured']['text'], act...
true
true
7909e384bcde82f9031aaba69932e02ed3690af6
5,331
py
Python
Lab07/lab07/lab07_stack.py
stevensu1977/aws-cdk-handson
39aecfb516b0c6e65e36cf794ab85c3da2ac6276
[ "Apache-2.0" ]
null
null
null
Lab07/lab07/lab07_stack.py
stevensu1977/aws-cdk-handson
39aecfb516b0c6e65e36cf794ab85c3da2ac6276
[ "Apache-2.0" ]
2
2021-05-11T23:51:20.000Z
2021-05-11T23:52:57.000Z
Lab07/lab07/lab07_stack.py
stevensu1977/aws-cdk-handson
39aecfb516b0c6e65e36cf794ab85c3da2ac6276
[ "Apache-2.0" ]
1
2019-08-03T12:56:31.000Z
2019-08-03T12:56:31.000Z
from aws_cdk import ( core, aws_iam as iam, aws_kinesis as kinesis, aws_kinesisfirehose as kinesisfirehose ) class Lab07Stack(core.Stack): def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: super().__init__(scope, id, **kwargs) # The code that defines your st...
49.82243
149
0.298068
from aws_cdk import ( core, aws_iam as iam, aws_kinesis as kinesis, aws_kinesisfirehose as kinesisfirehose ) class Lab07Stack(core.Stack): def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: super().__init__(scope, id, **kwargs) role01 = ia...
true
true
7909e39c0d39b1347ed8fb0fa30c3d2324d0f0a2
496
py
Python
officialWebsite/members/migrations/0002_member_team.py
paras55/officialWebsite
12210e995a5d236023d082a123cfa71e2f2855ce
[ "MIT" ]
null
null
null
officialWebsite/members/migrations/0002_member_team.py
paras55/officialWebsite
12210e995a5d236023d082a123cfa71e2f2855ce
[ "MIT" ]
null
null
null
officialWebsite/members/migrations/0002_member_team.py
paras55/officialWebsite
12210e995a5d236023d082a123cfa71e2f2855ce
[ "MIT" ]
null
null
null
# Generated by Django 3.0 on 2019-12-12 08:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('team', '0002_auto_20191210_2330'), ('members', '0001_initial'), ] operations = [ migrations.AddField(...
29.176471
197
0.693548
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('team', '0002_auto_20191210_2330'), ('members', '0001_initial'), ] operations = [ migrations.AddField(model_name='member', name='team', field=model...
true
true
7909e3d677e3ada13ac205864112f6a60c7ba440
11,474
py
Python
airflow/providers/google/cloud/operators/sql_to_gcs.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
1
2021-11-08T12:26:34.000Z
2021-11-08T12:26:34.000Z
airflow/providers/google/cloud/operators/sql_to_gcs.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
null
null
null
airflow/providers/google/cloud/operators/sql_to_gcs.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "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...
41.273381
104
0.643891
import abc import json import warnings from tempfile import NamedTemporaryFile import unicodecsv as csv from airflow.models import BaseOperator from airflow.providers.google.cloud.hooks.gcs import GCSHook from airflow.utils.decorators import apply_defaults class BaseSQLToGCSOperator(BaseOperator, ...
true
true
7909e3fef16b591896700bd1fcfde7a65f495191
7,274
py
Python
third_party/chromite/cbuildbot/archive_lib_unittest.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/chromite/cbuildbot/archive_lib_unittest.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/chromite/cbuildbot/archive_lib_unittest.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Test the archive_lib module.""" from __future__ import print_function import mock from chromite.cbuildbot import archive...
34.311321
77
0.688617
from __future__ import print_function import mock from chromite.cbuildbot import archive_lib from chromite.cbuildbot import cbuildbot_run from chromite.lib import config_lib from chromite.lib import config_lib_unittest from chromite.lib import cros_test_lib from chromite.lib import parallel_unittest DEFAULT_A...
true
true
7909e501d609b7a93a7368f9cef1f69decd64be6
7,898
py
Python
cadee/prep/genseqs.py
kamerlinlab/cadee
8fa34fc4f7fc496c8843e9380075ae11fca7aaa7
[ "MIT" ]
10
2017-01-11T09:21:27.000Z
2021-06-27T03:56:15.000Z
cadee/prep/genseqs.py
kamerlinlab/cadee
8fa34fc4f7fc496c8843e9380075ae11fca7aaa7
[ "MIT" ]
2
2017-07-18T06:54:17.000Z
2020-08-25T14:03:14.000Z
cadee/prep/genseqs.py
kamerlinlab/cadee
8fa34fc4f7fc496c8843e9380075ae11fca7aaa7
[ "MIT" ]
3
2017-03-15T12:18:13.000Z
2021-02-28T05:09:36.000Z
#!/usr/bin/env python """ Generate Sequence from a pdbfile and to modify the squences. Author: {0} ({1}) This module is part of CADEE, the framework for Computer-Aided Directed Evolution of Enzymes. """ from __future__ import print_function import logging import os import sys import time import config __author_...
30.851563
79
0.443024
from __future__ import print_function import logging import os import sys import time import config __author__ = "Beat Amrein" __email__ = "beat.amrein@gmail.com" logger = logging.getLogger('prep.genseqs') ERR_USAGE = 1 ERR_OUTPUTFOLDER_EXISTS = 2 ERR_TOPO_GENERATION_WT = 3 ERR_QPREP5_INEXISTENT = 4 ERR_MKTOP...
true
true
7909e681569f02e29cbbb0f973c01f46b7ffd0bb
3,746
py
Python
easytransfer/losses/kd_loss.py
mczhuge/Kaleido-BERT
50579660fb8dc1e250c7cc40e0f10294c54532e3
[ "MIT" ]
109
2021-04-14T04:15:53.000Z
2022-03-24T05:24:43.000Z
easytransfer/losses/kd_loss.py
NoLoPhe/Kaleido-BERT
1b14073e3ad3490c50bbd1e7e94846830671b332
[ "MIT" ]
12
2021-04-18T13:21:07.000Z
2022-01-27T09:42:51.000Z
easytransfer/losses/kd_loss.py
NoLoPhe/Kaleido-BERT
1b14073e3ad3490c50bbd1e7e94846830671b332
[ "MIT" ]
12
2021-04-25T08:40:09.000Z
2022-03-24T08:56:29.000Z
# coding=utf-8 # Copyright (c) 2019 Alibaba PAI team. # # 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 ...
40.717391
91
0.657501
import math import tensorflow as tf def build_kd_loss(teacher_logits, student_logits, task_balance=0.3, distill_tempreture=2.0, labels=None, loss_type='mse'): if loss_type == 'mse': return mse...
true
true
7909e6d83be248a0c4c1f62ad15eda46b6b81739
548
py
Python
client.py
simenvg/projetBeehive
ace9e105985647454ea850a0b9e3fd22905115b0
[ "MIT" ]
null
null
null
client.py
simenvg/projetBeehive
ace9e105985647454ea850a0b9e3fd22905115b0
[ "MIT" ]
null
null
null
client.py
simenvg/projetBeehive
ace9e105985647454ea850a0b9e3fd22905115b0
[ "MIT" ]
null
null
null
from socket import * from datetime import datetime import json #rew def send(temperature, humidity, socket): dict = {'timestamp':datetime.now().strftime("%X"), 'temperature':temperature, 'humidity':humidity} message = json.dumps(dict) try : socket.send(message) except : soc...
21.076923
103
0.644161
from socket import * from datetime import datetime import json def send(temperature, humidity, socket): dict = {'timestamp':datetime.now().strftime("%X"), 'temperature':temperature, 'humidity':humidity} message = json.dumps(dict) try : socket.send(message) except : socket.c...
true
true
7909e7a1e55e682a2b4294c7b151519f39f02483
9,111
py
Python
packandroid.py
skela/r
4c5b8574a7868c3a95ab1ccbcb07d5ba2dc5d5d0
[ "MIT" ]
null
null
null
packandroid.py
skela/r
4c5b8574a7868c3a95ab1ccbcb07d5ba2dc5d5d0
[ "MIT" ]
null
null
null
packandroid.py
skela/r
4c5b8574a7868c3a95ab1ccbcb07d5ba2dc5d5d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import xmltodict # sudo easy_install xmltodict import subprocess import zipfile class PackAndroid(object): def __init__(self, root, project_folder, project, input_apk, destination, keystore, keystore_alias, apk_name=None, zipalign=None, jarsigner=None, configuration='Release', k...
38.443038
199
0.609044
import os import xmltodict import subprocess import zipfile class PackAndroid(object): def __init__(self, root, project_folder, project, input_apk, destination, keystore, keystore_alias, apk_name=None, zipalign=None, jarsigner=None, configuration='Release', keystore_password=None): self.name = projec...
false
true
7909e7bf0a5e8cfd96d919d244dabfd1d2677ca1
781
py
Python
artinvestor_server/users/urls.py
jondelmil/artinvestor-server
93b07ae030761321dca3e8ffa87c08f01e0c9996
[ "MIT" ]
null
null
null
artinvestor_server/users/urls.py
jondelmil/artinvestor-server
93b07ae030761321dca3e8ffa87c08f01e0c9996
[ "MIT" ]
null
null
null
artinvestor_server/users/urls.py
jondelmil/artinvestor-server
93b07ae030761321dca3e8ffa87c08f01e0c9996
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url from . import views urlpatterns = [ # URL pattern for the UserListView url( regex=r'^$', view=views.UserListView.as_view(), name='list' ), # URL pattern for the ...
20.552632
56
0.581306
from __future__ import absolute_import, unicode_literals from django.conf.urls import url from . import views urlpatterns = [ url( regex=r'^$', view=views.UserListView.as_view(), name='list' ), url( regex=r'^~redirect/$', view=views.UserRedirectView.as...
true
true
7909e7ef4a0d522985fecaad88a319e4653f1382
16,510
py
Python
.vscode-server/data/User/History/-1f47d17c/IWlp.py
UNIZAR-30226-2022-09/back-end
7f20e141e34bf0ae7cce70515a1e4bb0cd85b173
[ "MIT" ]
null
null
null
.vscode-server/data/User/History/-1f47d17c/IWlp.py
UNIZAR-30226-2022-09/back-end
7f20e141e34bf0ae7cce70515a1e4bb0cd85b173
[ "MIT" ]
1
2022-02-16T12:12:43.000Z
2022-02-16T12:15:03.000Z
.vscode-server/data/User/History/-1f47d17c/IWlp.py
UNIZAR-30226-2022-09/back-end
7f20e141e34bf0ae7cce70515a1e4bb0cd85b173
[ "MIT" ]
null
null
null
# from flask import Flask, Blueprint # from flask_sqlalchemy import SQLAlchemy # from flask_login import LoginManager # import os from flask import Flask, jsonify, request, make_response, redirect, url_for import jwt import datetime import os from functools import wraps from flask_sqlalchemy import SQLAlchemy import u...
33.831967
235
0.656208
from flask import Flask, jsonify, request, make_response, redirect, url_for import jwt import datetime import os from functools import wraps from flask_sqlalchemy import SQLAlchemy import uuid from werkzeug.security import generate_password_hash, check_password_hash from werkzeug.utils import secure_filename from ...
true
true
7909e81118783589e22c3f8571d4f2cbf4e44bdc
422
py
Python
site-code/blog/views.py
notmehul/Blogie
f4972565d8a042f3984c4c9f8cee901adebc0d44
[ "WTFPL" ]
null
null
null
site-code/blog/views.py
notmehul/Blogie
f4972565d8a042f3984c4c9f8cee901adebc0d44
[ "WTFPL" ]
null
null
null
site-code/blog/views.py
notmehul/Blogie
f4972565d8a042f3984c4c9f8cee901adebc0d44
[ "WTFPL" ]
null
null
null
from django.views import generic from .models import Post # Create your views here. class PostList(generic.ListView): queryset = Post.objects.filter(status=1).order_by('-created_on') # only published blogs shown # the order by says that the latest posts will be there at the top B) template_name = 'inde...
32.461538
73
0.736967
from django.views import generic from .models import Post class PostList(generic.ListView): queryset = Post.objects.filter(status=1).order_by('-created_on') template_name = 'index.html' class PostDetail(generic.DetailView): model = Post template_name = 'post_detail.html'
true
true
7909e906ab74d7282ae70509be6ade65b9a6e4ef
1,912
py
Python
menus/nodes/hermite.py
fsanges/neMenuManager
733a281b1e0217ff24bc2fe9adf74c97a4715a2b
[ "Apache-2.0" ]
1
2021-01-28T05:11:55.000Z
2021-01-28T05:11:55.000Z
menus/nodes/hermite.py
fsanges/neMenuManager
733a281b1e0217ff24bc2fe9adf74c97a4715a2b
[ "Apache-2.0" ]
null
null
null
menus/nodes/hermite.py
fsanges/neMenuManager
733a281b1e0217ff24bc2fe9adf74c97a4715a2b
[ "Apache-2.0" ]
null
null
null
try: from maya import cmds except ImportError: pass from menus import typeIDs as nem_typeids, base as nem_base import logging logging.basicConfig() logger = logging.getLogger(__name__) def createOutputJnts(*args): ## Create outputs for the selected hermite nodes exitB = "Exit" doitB = "doIt" i...
37.490196
109
0.625
try: from maya import cmds except ImportError: pass from menus import typeIDs as nem_typeids, base as nem_base import logging logging.basicConfig() logger = logging.getLogger(__name__) def createOutputJnts(*args): ot cmds.ls(sl=True): logger.warning("You must have a {} selected!".format(nem_typeid...
true
true
7909e90e316520511b46e1e4501ecb55ca8cb104
640
py
Python
contrib/codeanalysis/src/python/pants/contrib/codeanalysis/register.py
revl/pants
8ad83e4ca80c095d44efceafd8b41e575da39c65
[ "Apache-2.0" ]
1
2021-05-05T18:58:28.000Z
2021-05-05T18:58:28.000Z
contrib/codeanalysis/src/python/pants/contrib/codeanalysis/register.py
revl/pants
8ad83e4ca80c095d44efceafd8b41e575da39c65
[ "Apache-2.0" ]
null
null
null
contrib/codeanalysis/src/python/pants/contrib/codeanalysis/register.py
revl/pants
8ad83e4ca80c095d44efceafd8b41e575da39c65
[ "Apache-2.0" ]
3
2020-06-30T08:28:13.000Z
2021-07-28T09:35:57.000Z
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.goal.task_registrar import TaskRegistrar as task from pants.contrib.codeanalysis.tasks.bundle_entries import BundleEntries from pants.contrib.codeanalysis.tasks.extract_java im...
42.666667
73
0.798438
from pants.goal.task_registrar import TaskRegistrar as task from pants.contrib.codeanalysis.tasks.bundle_entries import BundleEntries from pants.contrib.codeanalysis.tasks.extract_java import ExtractJava from pants.contrib.codeanalysis.tasks.index_java import IndexJava def register_goals(): task(name="kythe-j...
true
true
7909e9bbc3387e387d1010e11dc2be833c74a2f4
2,164
py
Python
Arrays/python/compareStringByFrequencyOfSmallestCharacter.py
kiruba-r11/DSA-guide
0687bddf81a14955fa0740610ade3b67bcdf97fb
[ "MIT" ]
60
2020-10-04T13:19:26.000Z
2022-01-23T09:09:27.000Z
Arrays/python/compareStringByFrequencyOfSmallestCharacter.py
kiruba-r11/DSA-guide
0687bddf81a14955fa0740610ade3b67bcdf97fb
[ "MIT" ]
202
2020-10-04T13:03:46.000Z
2021-07-29T07:39:15.000Z
Arrays/python/compareStringByFrequencyOfSmallestCharacter.py
kiruba-r11/DSA-guide
0687bddf81a14955fa0740610ade3b67bcdf97fb
[ "MIT" ]
169
2020-10-04T13:21:09.000Z
2022-03-20T16:59:35.000Z
""" Problem Statement: Let the function f(s) be the frequency of the lexicographically smallest character in a non-empty string s. For example, if s = "dcce" then f(s) = 2 because the lexicographically smallest character is 'c', which has a frequency of 2. You are given an array of strings words and another array of q...
36.677966
233
0.66451
from collections import Counter def numSmallerByFrequency(queries, words): fre_queries = fre(queries) fre_words = sorted(fre(words))[::-1] res = [] for q in fre_queries: count = 0 for w in fre_words: if w <= q: ...
true
true
7909ea27095366a05767c1ea8be765cbd9e262f0
1,411
py
Python
aiida_abinit/utils/resources.py
azadoks/aiida-abinit
82c9f54e3d77152bd270dbfeb756f9cce4d327c7
[ "MIT" ]
null
null
null
aiida_abinit/utils/resources.py
azadoks/aiida-abinit
82c9f54e3d77152bd270dbfeb756f9cce4d327c7
[ "MIT" ]
5
2021-04-13T13:30:20.000Z
2021-12-07T16:56:35.000Z
aiida_abinit/utils/resources.py
azadoks/aiida-abinit
82c9f54e3d77152bd270dbfeb756f9cce4d327c7
[ "MIT" ]
2
2020-10-21T16:10:04.000Z
2021-06-18T12:13:43.000Z
# -*- coding: utf-8 -*- """Utilities for calculation job resources.""" __all__ = ( 'get_default_options', 'seconds_to_timelimit', ) def get_default_options(max_num_machines: int = 1, max_wallclock_seconds: int = 1800, with_mpi: bool = False) -> dict: """Return an instance of the options dictionary with t...
31.355556
118
0.653437
__all__ = ( 'get_default_options', 'seconds_to_timelimit', ) def get_default_options(max_num_machines: int = 1, max_wallclock_seconds: int = 1800, with_mpi: bool = False) -> dict: return { 'resources': { 'num_machines': int(max_num_machines) }, 'max_wallclock_seconds'...
true
true
7909ea75221ff41707047de51661627abe857855
734
py
Python
ch08/half_float_network.py
gangigammo/deep-learning-1
3fe803514c3733d8715cf1211a82ffd8ea660af2
[ "MIT" ]
null
null
null
ch08/half_float_network.py
gangigammo/deep-learning-1
3fe803514c3733d8715cf1211a82ffd8ea660af2
[ "MIT" ]
null
null
null
ch08/half_float_network.py
gangigammo/deep-learning-1
3fe803514c3733d8715cf1211a82ffd8ea660af2
[ "MIT" ]
null
null
null
# coding: utf-8 import sys, os sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定 import numpy as np import matplotlib.pyplot as plt from ch08.deep_convnet import DeepConvNet from dataset.mnist import load_mnist (x_train, t_train), (x_test, t_test) = load_mnist(flatten=False) network = DeepConvNet() network.loa...
25.310345
64
0.757493
import sys, os sys.path.append(os.pardir) import numpy as np import matplotlib.pyplot as plt from ch08.deep_convnet import DeepConvNet from dataset.mnist import load_mnist (x_train, t_train), (x_test, t_test) = load_mnist(flatten=False) network = DeepConvNet() network.load_params("deep_convnet_params.pkl") sampl...
true
true
7909eb2dc8c35601cf7bcd36512e95f0ddda4dd6
948
py
Python
python/python_function/func.py
technonac/studycode
3f952859735d27435a79e8aae674eac9fd277bd8
[ "Apache-2.0" ]
null
null
null
python/python_function/func.py
technonac/studycode
3f952859735d27435a79e8aae674eac9fd277bd8
[ "Apache-2.0" ]
null
null
null
python/python_function/func.py
technonac/studycode
3f952859735d27435a79e8aae674eac9fd277bd8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 函数 在python中函数默认的返回对象是None """ # 默认返回值为None def hello(): print("Hello World!") print(type(hello())) # 可以返回多个对象,默认是元组 def foo(): return ['xyz', 1000, -98.6] x, y, z = foo() print(x, y, z) # 关键字参数 def foo1(x): print(x) foo1(x='abc') """ 创建函数 def fu...
10.896552
45
0.613924
""" 函数 在python中函数默认的返回对象是None """ def hello(): print("Hello World!") print(type(hello())) def foo(): return ['xyz', 1000, -98.6] x, y, z = foo() print(x, y, z) def foo1(x): print(x) foo1(x='abc') """ 创建函数 def function_name(arguments): "function documentation string" function body s...
false
true
7909ed88d7ea2b91ef3e231d82cd4d1536b93029
1,264
py
Python
models/hr_job_task.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/hr_job_task.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/hr_job_task.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
3
2017-09-11T08:02:11.000Z
2020-04-04T08:13:23.000Z
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
42.133333
79
0.624209
true
true
7909ee93aef6c55de364b6c3a846268c3d44a1c1
2,664
py
Python
Homework/forwarding/grade.py
DaixuanLi/Router-Lab
4d677d38ae02c24af2fef1a0528612c6b86d2758
[ "Linux-OpenIB" ]
null
null
null
Homework/forwarding/grade.py
DaixuanLi/Router-Lab
4d677d38ae02c24af2fef1a0528612c6b86d2758
[ "Linux-OpenIB" ]
null
null
null
Homework/forwarding/grade.py
DaixuanLi/Router-Lab
4d677d38ae02c24af2fef1a0528612c6b86d2758
[ "Linux-OpenIB" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re import sys import os import json import subprocess import time from os.path import isfile, join import random import string import signal import glob import traceback prefix = 'forwarding' exe = prefix if len(sys.argv) > 1: exe = sys.argv[1] #try: import p...
28.042105
104
0.522523
import re import sys import os import json import subprocess import time from os.path import isfile, join import random import string import signal import glob import traceback prefix = 'forwarding' exe = prefix if len(sys.argv) > 1: exe = sys.argv[1] import pyshark def write_grade(grade, total): ...
true
true
7909eeb85a032f99de28e9730df6b8357736e2e0
234
py
Python
tpd_pete/template/template.py
totalpunch/TPD-Pete
e14f47d3fa05f628a5f4422917d1ff4ce4e56e88
[ "MIT" ]
1
2020-04-24T11:55:31.000Z
2020-04-24T11:55:31.000Z
tpd_pete/template/template.py
totalpunch/TPD-Pete
e14f47d3fa05f628a5f4422917d1ff4ce4e56e88
[ "MIT" ]
34
2020-04-24T10:55:29.000Z
2021-07-25T09:29:32.000Z
tpd_pete/template/template.py
totalpunch/TPD-Pete
e14f47d3fa05f628a5f4422917d1ff4ce4e56e88
[ "MIT" ]
1
2020-04-24T11:03:28.000Z
2020-04-24T11:03:28.000Z
CLOUDFORMATION_TEMPLATE = """ AWSTemplateFormatVersion: '2010-09-09' Parameters: s3FileName: Type: String environment: Type: String deploymentBucket: Type: String Resources: # Place your AWS resources here """
13.764706
38
0.709402
CLOUDFORMATION_TEMPLATE = """ AWSTemplateFormatVersion: '2010-09-09' Parameters: s3FileName: Type: String environment: Type: String deploymentBucket: Type: String Resources: # Place your AWS resources here """
true
true
7909eff5f75c95d6d3185c95679c3ff3910616dc
203
py
Python
src/__init__.py
Farhad-Shabani/TSETMC_Dashboard
8279bd9579f02447b9ab70dfe491d56713810f51
[ "MIT" ]
5
2021-04-10T17:04:48.000Z
2021-09-17T11:49:53.000Z
src/__init__.py
Farhad-Shabani/TSETMC_Dashboard
8279bd9579f02447b9ab70dfe491d56713810f51
[ "MIT" ]
null
null
null
src/__init__.py
Farhad-Shabani/TSETMC_Dashboard
8279bd9579f02447b9ab70dfe491d56713810f51
[ "MIT" ]
3
2021-07-04T16:52:10.000Z
2021-08-18T15:17:10.000Z
from .Essential_Functions import URL_Maker, Negative_Detector from .Scrape_Index import Scrape_Index from .Scrape_StockInfo import StockInfo from .Scrape_StockData_Realtime import Realtime_StockData
40.6
62
0.871921
from .Essential_Functions import URL_Maker, Negative_Detector from .Scrape_Index import Scrape_Index from .Scrape_StockInfo import StockInfo from .Scrape_StockData_Realtime import Realtime_StockData
true
true
7909f1a0ee647d79a43a6c909ebad14af1caea03
3,228
py
Python
SchemaCollaboration/datapackage_to_documentation/main.py
Swiss-Polar-Institute/schema-collaboration-arctic-century
e02b598c7b11b26815be6e9811ff355757263995
[ "MIT" ]
15
2020-07-09T01:15:59.000Z
2021-09-24T14:47:12.000Z
SchemaCollaboration/datapackage_to_documentation/main.py
Swiss-Polar-Institute/schema-collaboration-arctic-century
e02b598c7b11b26815be6e9811ff355757263995
[ "MIT" ]
21
2020-10-27T11:33:57.000Z
2022-02-27T11:03:38.000Z
SchemaCollaboration/datapackage_to_documentation/main.py
Swiss-Polar-Institute/schema-collaboration-arctic-century
e02b598c7b11b26815be6e9811ff355757263995
[ "MIT" ]
3
2020-08-12T09:33:17.000Z
2021-07-12T09:31:33.000Z
import os import subprocess from tempfile import NamedTemporaryFile from jinja2 import Template # This file designed in a way that is independent of Django # in order to be easy (but changes are required) to be used # outside Django in the future # That's why is using jinja2 as a template language instead of # Djang...
27.355932
108
0.656753
import os import subprocess from tempfile import NamedTemporaryFile from jinja2 import Template # Django's template language. ge): template = Template(template_to_md) rendered = template.render(datapackage) return rendered.encode('utf-8') def datapackage_to_pdf(datapackage): markdown =...
true
true
7909f1e0dda631692135da74c065a76d22cccec5
93
py
Python
doc/src/site/sphinx/extensions/contentui/__init__.py
krmartin/sparkling-water
494f23f9b8891288b77a78fe3620fd8cee8e89b2
[ "Apache-2.0" ]
990
2015-01-06T09:33:30.000Z
2022-03-13T04:34:13.000Z
doc/src/site/sphinx/extensions/contentui/__init__.py
krmartin/sparkling-water
494f23f9b8891288b77a78fe3620fd8cee8e89b2
[ "Apache-2.0" ]
993
2015-01-08T19:40:12.000Z
2022-03-31T12:09:29.000Z
doc/src/site/sphinx/extensions/contentui/__init__.py
krmartin/sparkling-water
494f23f9b8891288b77a78fe3620fd8cee8e89b2
[ "Apache-2.0" ]
439
2015-01-13T06:59:47.000Z
2022-03-31T06:02:32.000Z
# The code for this extension is based on https://github.com/ulrobix/sphinxcontrib-contentui
46.5
92
0.806452
true
true
7909f23d483986233ec2317982a20122cfda9c23
6,795
py
Python
WFSOverlayServer.py
relet/kivyMaps
8b1fb0d4403ce230b0b4082ccca79aaf883207fa
[ "MIT" ]
10
2015-05-09T12:12:44.000Z
2018-11-30T19:38:55.000Z
WFSOverlayServer.py
relet/kivyMaps
8b1fb0d4403ce230b0b4082ccca79aaf883207fa
[ "MIT" ]
null
null
null
WFSOverlayServer.py
relet/kivyMaps
8b1fb0d4403ce230b0b4082ccca79aaf883207fa
[ "MIT" ]
5
2015-03-20T22:46:48.000Z
2020-06-16T04:06:31.000Z
from projections import * from urllib2 import urlopen from httplib import HTTPConnection from threading import Thread from kivy.logger import Logger from kivy.loader import Loader from os.path import join, dirname import time, os import hashlib GMLNS = "http://www.opengis.net/gml" try: from pyproj import Proj ...
33.308824
123
0.583959
from projections import * from urllib2 import urlopen from httplib import HTTPConnection from threading import Thread from kivy.logger import Logger from kivy.loader import Loader from os.path import join, dirname import time, os import hashlib GMLNS = "http://www.opengis.net/gml" try: from pyproj import Proj ...
false
true
7909f3df663de7147c3dbf424eb18b31b5d6a585
3,285
py
Python
services/discovery/jobs/box/cpe.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
services/discovery/jobs/box/cpe.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
services/discovery/jobs/box/cpe.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # CPE check # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Python modules import...
36.910112
93
0.448706
import datetime from noc.services.discovery.jobs.base import DiscoveryCheck from noc.sa.models.managedobject import ManagedObject from noc.sa.models.profile import Profile class CPECheck(DiscoveryCheck): name = "cpe" required_script = "get_cpe" required_capabilities = ["CPE | Controller"] ...
true
true
7909f404cefc5656b0fd6cbdce47cadfbbb8a8ab
4,794
py
Python
cactus/consensus/get_block_challenge.py
grayfallstown/cactus-blockchain
680d68d0bb7694bd4b99e4906b356e014bca7734
[ "Apache-2.0" ]
20
2021-07-16T18:08:13.000Z
2022-03-20T02:38:39.000Z
cactus/consensus/get_block_challenge.py
grayfallstown/cactus-blockchain
680d68d0bb7694bd4b99e4906b356e014bca7734
[ "Apache-2.0" ]
29
2021-07-17T00:38:18.000Z
2022-03-29T19:11:48.000Z
cactus/consensus/get_block_challenge.py
grayfallstown/cactus-blockchain
680d68d0bb7694bd4b99e4906b356e014bca7734
[ "Apache-2.0" ]
21
2021-07-17T02:18:57.000Z
2022-03-15T08:26:56.000Z
import logging from typing import List, Union from cactus.consensus.block_record import BlockRecord from cactus.consensus.blockchain_interface import BlockchainInterface from cactus.consensus.constants import ConsensusConstants from cactus.types.blockchain_format.sized_bytes import bytes32 from cactus.types.full_block...
46.543689
120
0.695244
import logging from typing import List, Union from cactus.consensus.block_record import BlockRecord from cactus.consensus.blockchain_interface import BlockchainInterface from cactus.consensus.constants import ConsensusConstants from cactus.types.blockchain_format.sized_bytes import bytes32 from cactus.types.full_block...
true
true
7909f65fa203f3ee3263cda6c548cd60e9a11dc9
2,093
py
Python
alipay/aop/api/response/SsdataDataserviceDtevalIdentitycheckQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/SsdataDataserviceDtevalIdentitycheckQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/SsdataDataserviceDtevalIdentitycheckQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse class SsdataDataserviceDtevalIdentitycheckQueryResponse(AlipayResponse): def __init__(self): super(SsdataDataserviceDtevalIdentitycheckQueryResponse, self).__init__()...
31.712121
122
0.697086
import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse class SsdataDataserviceDtevalIdentitycheckQueryResponse(AlipayResponse): def __init__(self): super(SsdataDataserviceDtevalIdentitycheckQueryResponse, self).__init__() self._evidence = None self....
true
true
7909f6d6dcf0d7fea954dcd9105c3e41eca265c5
2,109
py
Python
bibliopixel/util/deprecated.py
rec/leds
ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a
[ "MIT" ]
253
2015-01-03T23:17:57.000Z
2021-12-14T02:31:08.000Z
bibliopixel/util/deprecated.py
rec/leds
ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a
[ "MIT" ]
879
2015-01-11T16:07:25.000Z
2021-12-10T16:24:31.000Z
bibliopixel/util/deprecated.py
rec/leds
ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a
[ "MIT" ]
71
2015-01-04T01:02:47.000Z
2022-03-25T18:30:10.000Z
import os, sys CHOICES = 'ignore', 'fail', 'warn', 'warn_once' DEFAULT = 'warn_once' ACTION = None HELP = """ Specify what to do when a project uses deprecated features: ignore: do nothing warn: print warning messages for each feature warn_once: print a warning message, but only once for each type of feature ...
23.696629
76
0.598388
import os, sys CHOICES = 'ignore', 'fail', 'warn', 'warn_once' DEFAULT = 'warn_once' ACTION = None HELP = """ Specify what to do when a project uses deprecated features: ignore: do nothing warn: print warning messages for each feature warn_once: print a warning message, but only once for each type of feature ...
true
true
7909f86339678f4ff6b4300bc9b4937f8e52b4e1
2,298
py
Python
src/equation_parser/equations.py
sushmaakoju/parser
e40e3f818921141044b499e231ae75e6bf4141c2
[ "MIT" ]
null
null
null
src/equation_parser/equations.py
sushmaakoju/parser
e40e3f818921141044b499e231ae75e6bf4141c2
[ "MIT" ]
null
null
null
src/equation_parser/equations.py
sushmaakoju/parser
e40e3f818921141044b499e231ae75e6bf4141c2
[ "MIT" ]
null
null
null
from __future__ import absolute_import #SymPy is a non-commercial alternative to Mathematica and Maple # SymPy can map variable to a value or a matrix. # SymPy's Symbolic Statistical Modelling uses scintific computing. import sys import numpy as np import sympy as sp import pandas as pd from pathlib import Path from ....
41.781818
112
0.691036
from __future__ import absolute_import import sys import numpy as np import sympy as sp import pandas as pd from pathlib import Path from .tokens import * from .equation import * class Equations(Equation): def __init__(self): path = Path(__file__).parent self.filepath = path.joinpath("fixtures"...
true
true
7909f880ff9597791c6b835ba92450100aaff982
1,514
py
Python
djangocms_oembed/cms_plugins.py
MatthewWilkes/djangocms-oembed
168436cb2496def1bf64605dde5ce253769d3822
[ "BSD-3-Clause" ]
null
null
null
djangocms_oembed/cms_plugins.py
MatthewWilkes/djangocms-oembed
168436cb2496def1bf64605dde5ce253769d3822
[ "BSD-3-Clause" ]
null
null
null
djangocms_oembed/cms_plugins.py
MatthewWilkes/djangocms-oembed
168436cb2496def1bf64605dde5ce253769d3822
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from .models import OembedVideoPlugin, OembedRichPlugin from django.utils.translation import ugettext_lazy as _ from django.conf import settings class CMSOembedVideoPlugin(CMSPluginBase): name = _('Video (emb...
35.209302
102
0.678996
from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from .models import OembedVideoPlugin, OembedRichPlugin from django.utils.translation import ugettext_lazy as _ from django.conf import settings class CMSOembedVideoPlugin(CMSPluginBase): name = _('Video (embedded)') model = Oe...
true
true
7909f8f0919a2f941f14c7d197539ae57e894d4e
4,483
py
Python
telemetry/telemetry/page/shared_page_state_unittest.py
ravitejavalluri/catapult
246a39a82c2213d913a96fff020a263838dc76e6
[ "BSD-3-Clause" ]
4
2017-06-04T05:37:39.000Z
2021-06-26T05:30:15.000Z
telemetry/telemetry/page/shared_page_state_unittest.py
ravitejavalluri/catapult
246a39a82c2213d913a96fff020a263838dc76e6
[ "BSD-3-Clause" ]
9
2017-09-10T19:49:04.000Z
2018-04-14T04:39:55.000Z
telemetry/telemetry/page/shared_page_state_unittest.py
ravitejavalluri/catapult
246a39a82c2213d913a96fff020a263838dc76e6
[ "BSD-3-Clause" ]
2
2017-09-10T20:30:38.000Z
2017-09-12T19:50:03.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry.internal import story_runner from telemetry.page import page from telemetry.page import legacy_page_test from telemetry.page ...
38.646552
76
0.758867
import unittest from telemetry.internal import story_runner from telemetry.page import page from telemetry.page import legacy_page_test from telemetry.page import shared_page_state from telemetry import story as story_module from telemetry.testing import fakes from telemetry.util import wpr_modes def SetUpPageRu...
true
true
7909f92ef6bcd853749f31c3c2ed423ef8aa9401
2,581
py
Python
benchmarks/software_nontermination/f3_hints/C_Integer/Stroeder_15/Urban-WST2013-Fig1_false-termination.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/software_nontermination/f3_hints/C_Integer/Stroeder_15/Urban-WST2013-Fig1_false-termination.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/software_nontermination/f3_hints/C_Integer/Stroeder_15/Urban-WST2013-Fig1_false-termination.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
26.885417
77
0.573809
from typing import Tuple, FrozenSet from pysmt.environment import Environment as PysmtEnv from pysmt.fnode import FNode import pysmt.typing as types from utils import symb_to_next from hint import Hint, Location def transition_system(env: PysmtEnv) -> Tuple[FrozenSet[FNode], FNode, FNode, ...
true
true
7909f996dfdfb5eb58bed16ac63b28b8783a5e7c
3,481
py
Python
openhtf/output/callbacks/__init__.py
kunaljdoshi/openhtf
bd6f93708a84e6516ab1a1cb8f308b3108818744
[ "Apache-2.0" ]
1
2019-06-16T09:27:27.000Z
2019-06-16T09:27:27.000Z
openhtf/output/callbacks/__init__.py
airdeng/openhtf
cb544023e0d9acf758add54026d43668cc37e091
[ "Apache-2.0" ]
null
null
null
openhtf/output/callbacks/__init__.py
airdeng/openhtf
cb544023e0d9acf758add54026d43668cc37e091
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
33.796117
80
0.747774
import contextlib try: import cPickle as pickle except: import pickle import shutil import tempfile from openhtf import util from openhtf.util import data import six class Atomic(object): def __init__(self, filename): self.filename = filename self.temp = tempfile.NamedTemporaryFile(d...
true
true
7909fa2fdea672a13711a6d9641ac0903034d64d
43,055
py
Python
bin/storm.py
xulunfan/storm
8cb7b5a59b4a0556a52cb3d08c6b6c02e1b9f4a7
[ "Apache-2.0" ]
1
2018-08-30T12:46:52.000Z
2018-08-30T12:46:52.000Z
bin/storm.py
xulunfan/storm
8cb7b5a59b4a0556a52cb3d08c6b6c02e1b9f4a7
[ "Apache-2.0" ]
5
2020-04-23T21:30:46.000Z
2020-04-23T21:32:32.000Z
bin/storm.py
xulunfan/storm
8cb7b5a59b4a0556a52cb3d08c6b6c02e1b9f4a7
[ "Apache-2.0" ]
1
2020-03-12T20:26:34.000Z
2020-03-12T20:26:34.000Z
#!/usr/bin/env python # 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 # "L...
40.200747
523
0.68373
from __future__ import print_function import os import random import re import shlex import tempfile import uuid import subprocess as sub import json import sys try: from urllib.parse import quote_plus except ImportError: from urllib import quote_plus try: import configpar...
true
true
7909fb560d815d77567795084d83d2173d6d5ab1
1,907
py
Python
scripts/features/structure_extractor.py
chakki-works/elephant-sense
ba7c95e557d8b5a2bdce699fb473de3183a7ca6f
[ "Apache-2.0" ]
14
2017-04-07T10:46:49.000Z
2019-08-07T09:58:54.000Z
scripts/features/structure_extractor.py
chakki-works/elephant-sense
ba7c95e557d8b5a2bdce699fb473de3183a7ca6f
[ "Apache-2.0" ]
null
null
null
scripts/features/structure_extractor.py
chakki-works/elephant-sense
ba7c95e557d8b5a2bdce699fb473de3183a7ca6f
[ "Apache-2.0" ]
null
null
null
import re from scripts.features.feature_extractor import FeatureExtractor from bs4 import BeautifulSoup class ItemizationCountExtractor(FeatureExtractor): def extract(self, post, extracted=None): soup = BeautifulSoup(post.rendered_body, "html.parser") count = len(soup.find_all("ul")) ret...
27.242857
71
0.668589
import re from scripts.features.feature_extractor import FeatureExtractor from bs4 import BeautifulSoup class ItemizationCountExtractor(FeatureExtractor): def extract(self, post, extracted=None): soup = BeautifulSoup(post.rendered_body, "html.parser") count = len(soup.find_all("ul")) ret...
true
true
7909fc0c5d8095ff6a62e02ac890a57d40931f40
1,352
py
Python
qa/rpc-tests/staticr-tx-send.py
diyathrajapakshe/bethel-core
9f272d635da18b91582dbbb2ba47cfce1a1fc9ca
[ "MIT" ]
null
null
null
qa/rpc-tests/staticr-tx-send.py
diyathrajapakshe/bethel-core
9f272d635da18b91582dbbb2ba47cfce1a1fc9ca
[ "MIT" ]
null
null
null
qa/rpc-tests/staticr-tx-send.py
diyathrajapakshe/bethel-core
9f272d635da18b91582dbbb2ba47cfce1a1fc9ca
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Bethel Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BethelTestFramework from test_framework.staticr_util import * import...
30.044444
80
0.678994
from test_framework.test_framework import BethelTestFramework from test_framework.staticr_util import * import time class StaticRTxSend(BethelTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 1 def setup_network(self, split=Fal...
true
true
7909fc6dac6c123e255fc08303846d478c8de9e3
508
py
Python
test/aqua/operators/__init__.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
14
2019-05-06T13:51:06.000Z
2022-02-28T05:48:16.000Z
test/aqua/operators/__init__.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
2
2019-10-12T02:55:27.000Z
2019-10-13T00:14:07.000Z
test/aqua/operators/__init__.py
hushaohan/aqua
8512bc6ce246a8b3cca1e5edb1703b6885aa7c5d
[ "Apache-2.0" ]
17
2019-06-04T08:53:44.000Z
2022-01-02T22:22:38.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
36.285714
77
0.740157
true
true
7909fc76cf288ff1860027a65567cc79b4653cf3
5,623
py
Python
rklearn/tests/it/cifar10_cnn.py
rejux/rklearn-lib
56bc4f087a8c971cb545d65b0c1f9bafaaec3d67
[ "MIT" ]
null
null
null
rklearn/tests/it/cifar10_cnn.py
rejux/rklearn-lib
56bc4f087a8c971cb545d65b0c1f9bafaaec3d67
[ "MIT" ]
null
null
null
rklearn/tests/it/cifar10_cnn.py
rejux/rklearn-lib
56bc4f087a8c971cb545d65b0c1f9bafaaec3d67
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############# ## Imports ## ############# import os import sys ; sys.path.append("/home/developer/workspace/rklearn-lib") import tensorflow as tf from rklearn.tfoo_v1 import BaseModel ################# ## CIFAR10CNN ## ################# class CIFAR10CNN(BaseModel): ...
47.652542
138
0.538858
nt_dir, exist_ok = True) os.makedirs(self.model_dir, exist_ok = True) except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] logger.error("error msg = {}, error type = {}, error fi...
true
true
7909fcd7f87bea28649dafa37c3a9dd8cefc7e39
6,812
py
Python
colorpy/colorpy-0.1.0/blackbody.py
gmweir/QuasiOptics
0974178984f845597c5209217613c26edf931ed0
[ "MIT" ]
1
2020-11-06T18:16:00.000Z
2020-11-06T18:16:00.000Z
colorpy/colorpy-0.1.1/blackbody.py
gmweir/QuasiOptics
0974178984f845597c5209217613c26edf931ed0
[ "MIT" ]
null
null
null
colorpy/colorpy-0.1.1/blackbody.py
gmweir/QuasiOptics
0974178984f845597c5209217613c26edf931ed0
[ "MIT" ]
null
null
null
''' blackbody.py - Color of thermal blackbodies. Description: Calculate the spectrum of a thermal blackbody at an arbitrary temperature. Constants: PLANCK_CONSTANT - Planck's constant, in J-sec SPEED_OF_LIGHT - Speed of light, in m/sec BOLTZMAN_CONSTANT - Boltzman's constant, in J/K SUN_TEMPERATURE - Surface...
35.852632
116
0.695831
import math, numpy, pylab import colormodels import ciexyz import plots PLANCK_CONSTANT = 6.6237e-34 SPEED_OF_LIGHT = 2.997925e+08 BOLTZMAN_CONSTANT = 1.3802e-23 SUN_TEMPERATURE = 5778.0 def blackbody_specific_intensity (wl_nm, T_K): a = (PLANCK_CONSTANT * SPEED_OF_LIGHT) /...
true
true
7909feaa1363b66d123d84e63511a339ac928fb6
228
py
Python
shei/shei/doctype/price_configurator/test_price_configurator.py
CloudGround/shei
ab09f3c3cfd9a2c235f5f2d4ef64e029aff0436a
[ "MIT" ]
null
null
null
shei/shei/doctype/price_configurator/test_price_configurator.py
CloudGround/shei
ab09f3c3cfd9a2c235f5f2d4ef64e029aff0436a
[ "MIT" ]
2
2018-07-27T18:52:01.000Z
2018-12-18T16:37:59.000Z
shei/shei/doctype/price_configurator/test_price_configurator.py
CloudGround/shei
ab09f3c3cfd9a2c235f5f2d4ef64e029aff0436a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, Aptitude technologie and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestPriceConfigurator(unittest.TestCase): pass
20.727273
59
0.785088
from __future__ import unicode_literals import frappe import unittest class TestPriceConfigurator(unittest.TestCase): pass
true
true
7909feed5104e59222e59bddc53aaa2b982d1ff6
8,720
py
Python
yt/frontends/owls_subfind/data_structures.py
neutrinoceros2/yt
8cabf6091414e4d9a5037c4ff49199adf0ae64d6
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/owls_subfind/data_structures.py
neutrinoceros2/yt
8cabf6091414e4d9a5037c4ff49199adf0ae64d6
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/owls_subfind/data_structures.py
neutrinoceros2/yt
8cabf6091414e4d9a5037c4ff49199adf0ae64d6
[ "BSD-3-Clause-Clear" ]
null
null
null
import glob import os from collections import defaultdict import numpy as np from yt.data_objects.static_output import ParticleDataset, ParticleFile from yt.frontends.gadget.data_structures import _fix_unit_ordering from yt.funcs import only_on_root, setdefaultattr from yt.geometry.particle_geometry_handler import Pa...
40
87
0.620642
import glob import os from collections import defaultdict import numpy as np from yt.data_objects.static_output import ParticleDataset, ParticleFile from yt.frontends.gadget.data_structures import _fix_unit_ordering from yt.funcs import only_on_root, setdefaultattr from yt.geometry.particle_geometry_handler import Pa...
true
true
7909ff0d02864e4f0f1fb9e916578214988b459e
2,591
py
Python
spectral_clustering_fd/laplacian_sketch.py
AtsushiHashimoto/SpectralClusteringFD
dd150a08898ce354a1b59457dea2f5185d145ed7
[ "BSD-2-Clause" ]
null
null
null
spectral_clustering_fd/laplacian_sketch.py
AtsushiHashimoto/SpectralClusteringFD
dd150a08898ce354a1b59457dea2f5185d145ed7
[ "BSD-2-Clause" ]
null
null
null
spectral_clustering_fd/laplacian_sketch.py
AtsushiHashimoto/SpectralClusteringFD
dd150a08898ce354a1b59457dea2f5185d145ed7
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 import numpy as np from frequent_direction import FrequentDirection from sklearn.preprocessing import normalize from sklearn.metrics.pairwise import pairwise_kernels def laplacian_sketch(X,ell,k,do_normalize_feature,normed,callback,**args): fd = FrequentDirection(ell,k) D = np.array([np.sum(...
30.482353
88
0.618294
import numpy as np from frequent_direction import FrequentDirection from sklearn.preprocessing import normalize from sklearn.metrics.pairwise import pairwise_kernels def laplacian_sketch(X,ell,k,do_normalize_feature,normed,callback,**args): fd = FrequentDirection(ell,k) D = np.array([np.sum(callback(X,i,**...
true
true
7909ffb3942cd78c3b55d4f2b80409a1a536304f
328
py
Python
plugin.video.mrknow/mylib/tests_pydevd_runfiles/samples/nested_dir/nested2/deep_nest_test.py
mrknow/filmkodi
0162cde9ae25ddbf4a69330948714833ff2f78c9
[ "Apache-2.0" ]
105
2015-11-28T00:03:11.000Z
2021-05-05T20:47:42.000Z
plugin.video.mrknow/mylib/tests_pydevd_runfiles/samples/nested_dir/nested2/deep_nest_test.py
rrosajp/filmkodi
0162cde9ae25ddbf4a69330948714833ff2f78c9
[ "Apache-2.0" ]
918
2015-11-28T14:12:40.000Z
2022-03-23T20:24:49.000Z
plugin.video.mrknow/mylib/tests_pydevd_runfiles/samples/nested_dir/nested2/deep_nest_test.py
rrosajp/filmkodi
0162cde9ae25ddbf4a69330948714833ff2f78c9
[ "Apache-2.0" ]
111
2015-12-01T14:06:10.000Z
2020-08-01T10:44:39.000Z
import unittest class SampleTest(unittest.TestCase): def setUp(self): return def tearDown(self): return def test_non_unique_name(self): pass def test_asdf2(self): pass def test_i_am_a_unique_test_name(self): pass if __name__ == '__main__': unittest...
14.26087
43
0.625
import unittest class SampleTest(unittest.TestCase): def setUp(self): return def tearDown(self): return def test_non_unique_name(self): pass def test_asdf2(self): pass def test_i_am_a_unique_test_name(self): pass if __name__ == '__main__': unittest...
true
true
790a005d27683894422367f06a5fced6f2025836
1,115
py
Python
share/rpcuser/rpcuser.py
jazetjaz/monalisa
594b026ac5557d054f91e640e0a6315fdb1176e3
[ "MIT" ]
null
null
null
share/rpcuser/rpcuser.py
jazetjaz/monalisa
594b026ac5557d054f91e640e0a6315fdb1176e3
[ "MIT" ]
null
null
null
share/rpcuser/rpcuser.py
jazetjaz/monalisa
594b026ac5557d054f91e640e0a6315fdb1176e3
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import hashlib import sys import os from random import SystemRandom import base64 import hmac if len(s...
26.547619
79
0.728251
import hashlib import sys import os from random import SystemRandom import base64 import hmac if len(sys.argv) < 2: sys.stderr.write('Please include username as an argument.\n') sys.exit(0) username = sys.argv[1] cryptogen = SystemRandom() salt_sequence = [cryptogen.randrange(256) for i in range(16)]...
true
true
790a011e5ef52727309bffc443a2624d07dfcd11
1,612
py
Python
conbench/api/commits.py
jonkeane/conbench
f096cc2f8b7a85d8e9aea32d8310127cf1923212
[ "MIT" ]
48
2020-03-02T16:55:46.000Z
2022-02-26T00:35:57.000Z
conbench/api/commits.py
jonkeane/conbench
f096cc2f8b7a85d8e9aea32d8310127cf1923212
[ "MIT" ]
103
2020-03-23T00:22:46.000Z
2022-03-31T22:34:40.000Z
conbench/api/commits.py
jonkeane/conbench
f096cc2f8b7a85d8e9aea32d8310127cf1923212
[ "MIT" ]
6
2020-03-04T17:52:35.000Z
2022-03-30T11:53:40.000Z
from ..api import rule from ..api._endpoint import ApiEndpoint, maybe_login_required from ..entities._entity import NotFound from ..entities.commit import Commit, CommitSerializer class CommitListAPI(ApiEndpoint): serializer = CommitSerializer() @maybe_login_required def get(self): """ --...
23.362319
73
0.584367
from ..api import rule from ..api._endpoint import ApiEndpoint, maybe_login_required from ..entities._entity import NotFound from ..entities.commit import Commit, CommitSerializer class CommitListAPI(ApiEndpoint): serializer = CommitSerializer() @maybe_login_required def get(self): commits = Comm...
true
true
790a0148bbbaea06ad3b9ef02df2dc9923e4a543
1,427
py
Python
src/helloworld/app.py
The-Heyman/helloworld
6b69f72c87b82c972fc91744157752525fbe95a5
[ "BSD-3-Clause" ]
null
null
null
src/helloworld/app.py
The-Heyman/helloworld
6b69f72c87b82c972fc91744157752525fbe95a5
[ "BSD-3-Clause" ]
null
null
null
src/helloworld/app.py
The-Heyman/helloworld
6b69f72c87b82c972fc91744157752525fbe95a5
[ "BSD-3-Clause" ]
null
null
null
""" My first application """ import toga from toga.style import Pack from toga.style.pack import COLUMN, ROW class HelloWorld(toga.App): def startup(self): """ Construct and show the Toga application. Usually, you would add your application to a main content box. We then create a...
24.603448
72
0.580238
import toga from toga.style import Pack from toga.style.pack import COLUMN, ROW class HelloWorld(toga.App): def startup(self): main_box = toga.Box(style=Pack(direction=COLUMN)) name_label = toga.Label( 'Your name: ', style=Pack(padding=(0 ,5)) ) self.name_...
true
true
790a02c63f400be4c967f95f858a0f8b4d61be54
720
py
Python
priv/farmware/quickscripts/download_and_detect_coordinates.py
bahanni/custom_rpi4
ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5
[ "MIT" ]
null
null
null
priv/farmware/quickscripts/download_and_detect_coordinates.py
bahanni/custom_rpi4
ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5
[ "MIT" ]
null
null
null
priv/farmware/quickscripts/download_and_detect_coordinates.py
bahanni/custom_rpi4
ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5
[ "MIT" ]
null
null
null
"""Download an image from the Web App and detect coordinates. download the image corresponding to the ID provided and run plant detection and coordinate conversion """ import os import sys sys.path.insert(1, os.path.join(sys.path[0], '..')) from plant_detection.PlantDetection import PlantDetection from plant_detect...
30
75
0.740278
import os import sys sys.path.insert(1, os.path.join(sys.path[0], '..')) from plant_detection.PlantDetection import PlantDetection from plant_detection import ENV from plant_detection.Log import log if __name__ == "__main__": IMAGE_ID = ENV.load('PLANT_DETECTION_selected_image', get_json=False) if IMAGE_ID ...
true
true
790a03d0316972ef58c05cfb186e214b701a7d0e
2,821
py
Python
NAACL/ensemble.py
acproject/GNNs
953d175f672f0bb1b7cd25f371878728f3d27f09
[ "Apache-2.0" ]
1
2021-01-10T02:57:13.000Z
2021-01-10T02:57:13.000Z
NAACL/ensemble.py
acproject/GNNs
953d175f672f0bb1b7cd25f371878728f3d27f09
[ "Apache-2.0" ]
null
null
null
NAACL/ensemble.py
acproject/GNNs
953d175f672f0bb1b7cd25f371878728f3d27f09
[ "Apache-2.0" ]
null
null
null
'''Ensemble some predictions. ''' import argparse import collections import math from scipy.special import logsumexp import sys MODES = ['mean', 'max', 'logsumexp', 'noisy_or', 'log_noisy_or', 'odds_ratio'] def parse_args(args): parser = argparse.ArgumentParser() parser.add_argument('mode', choices...
32.425287
92
0.538107
import argparse import collections import math from scipy.special import logsumexp import sys MODES = ['mean', 'max', 'logsumexp', 'noisy_or', 'log_noisy_or', 'odds_ratio'] def parse_args(args): parser = argparse.ArgumentParser() parser.add_argument('mode', choices=MODES) parser.add_argument('f...
true
true
790a040994f325960ff2ab17368dc7f580f3ab56
29,985
py
Python
O365/utils/windows_tz.py
berezovskyi/python-o365
aaad538b729e9e30c43300768d99e5ec0dec5e45
[ "Apache-2.0" ]
900
2018-04-12T13:57:37.000Z
2022-03-30T08:39:04.000Z
O365/utils/windows_tz.py
berezovskyi/python-o365
aaad538b729e9e30c43300768d99e5ec0dec5e45
[ "Apache-2.0" ]
603
2018-04-13T13:39:34.000Z
2022-03-31T11:26:53.000Z
O365/utils/windows_tz.py
berezovskyi/python-o365
aaad538b729e9e30c43300768d99e5ec0dec5e45
[ "Apache-2.0" ]
289
2018-04-10T16:43:09.000Z
2022-03-16T15:03:51.000Z
""" Mapping from iana timezones to windows timezones and vice versa """ from datetime import tzinfo import pytz # noinspection SpellCheckingInspection IANA_TO_WIN = { "Africa/Abidjan": "Greenwich Standard Time", "Africa/Accra": "Greenwich Standard Time", "Africa/Addis_Ababa": "E. Africa Standard Time", ...
46.488372
97
0.675971
from datetime import tzinfo import pytz IANA_TO_WIN = { "Africa/Abidjan": "Greenwich Standard Time", "Africa/Accra": "Greenwich Standard Time", "Africa/Addis_Ababa": "E. Africa Standard Time", "Africa/Algiers": "W. Central Africa Standard Time", "Africa/Asmara": "E. Africa Standard Time", "Af...
true
true
790a06859cb9b44945e24cea00eb5e089b3fac70
5,955
py
Python
djangoFiles/theJekyllProject/models.py
silvrwolfboy/theJekyllProject
e36aa6605e762d8b14277e636322096d19455aa9
[ "MIT" ]
20
2017-09-29T20:00:33.000Z
2021-11-08T15:01:40.000Z
djangoFiles/theJekyllProject/models.py
silvrwolfboy/theJekyllProject
e36aa6605e762d8b14277e636322096d19455aa9
[ "MIT" ]
75
2017-10-03T12:32:05.000Z
2022-01-13T00:44:15.000Z
djangoFiles/theJekyllProject/models.py
singh1114/theJekyllProject
e36aa6605e762d8b14277e636322096d19455aa9
[ "MIT" ]
14
2017-12-29T12:32:08.000Z
2020-03-06T12:42:19.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from ckeditor.fields import RichTextField from theJekyllProject.choices import BlogTemplates class Contact(models.Model): first_name = models.CharField( max_length=200...
22.471698
77
0.589253
from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from ckeditor.fields import RichTextField from theJekyllProject.choices import BlogTemplates class Contact(models.Model): first_name = models.CharField( max_length=200 ) last_name = ...
true
true
790a06e6ecf4d0361e902f90e38add8657bb3375
363
py
Python
functions/register_module/main.py
mondele/tx-manager
ddbbeeae5990a327ffc14b42c478d3ea435c0533
[ "MIT" ]
3
2017-03-17T02:25:21.000Z
2017-05-18T22:18:20.000Z
functions/register_module/main.py
mondele/tx-manager
ddbbeeae5990a327ffc14b42c478d3ea435c0533
[ "MIT" ]
184
2016-10-13T02:56:16.000Z
2021-03-25T21:27:20.000Z
functions/register_module/main.py
mondele/tx-manager
ddbbeeae5990a327ffc14b42c478d3ea435c0533
[ "MIT" ]
16
2016-09-15T23:34:19.000Z
2019-07-25T07:06:32.000Z
from __future__ import unicode_literals, print_function from libraries.lambda_handlers.register_module_handler import RegisterModuleHandler def handle(event, context): """ Called by a module when it is deployed to register it :param dict event: :param context: :return dict: """ return Regi...
27.923077
83
0.752066
from __future__ import unicode_literals, print_function from libraries.lambda_handlers.register_module_handler import RegisterModuleHandler def handle(event, context): return RegisterModuleHandler().handle(event, context)
true
true
790a07139748007d8b569917c15f6b0f85c2a59c
1,249
py
Python
errorCheckTool/py23.py
peerke88/error-check-tool
c5b701561a3f17c966352d3f5195b04f04ae7fc9
[ "MIT" ]
2
2021-12-11T22:46:33.000Z
2022-01-02T02:29:03.000Z
errorCheckTool/py23.py
peerke88/error-check-tool
c5b701561a3f17c966352d3f5195b04f04ae7fc9
[ "MIT" ]
null
null
null
errorCheckTool/py23.py
peerke88/error-check-tool
c5b701561a3f17c966352d3f5195b04f04ae7fc9
[ "MIT" ]
null
null
null
""" Makes python 2 behave more like python 3. Ideally we import this globally so all our python 2 interpreters will assist in spotting errors early. """ # future imports are harmless if they implement behaviour that already exists in the current interpreter version from __future__ import absolute_import, division, prin...
27.755556
112
0.670136
from __future__ import absolute_import, division, print_function import sys from collections import OrderedDict if sys.version_info.major == 2: class dict(dict): def items(self): return super(dict, self).iteritems() def keys(self): return super(dict, self).iterkeys() ...
true
true
790a072b24f91a57ca39a637043e1157ec49e433
1,174
py
Python
term06 (permutation and combination).py
ahammadshawki8/Proggraming-Terms
264156b6cfb347fc1b3aaa966c44aeab8dca26c2
[ "MIT" ]
1
2021-06-07T00:22:28.000Z
2021-06-07T00:22:28.000Z
term06 (permutation and combination).py
ahammadshawki8/Proggraming-Terms
264156b6cfb347fc1b3aaa966c44aeab8dca26c2
[ "MIT" ]
2
2021-03-03T02:22:42.000Z
2021-04-24T03:26:42.000Z
term06 (permutation and combination).py
ahammadshawki8/Proggraming-Terms
264156b6cfb347fc1b3aaa966c44aeab8dca26c2
[ "MIT" ]
null
null
null
# COMBINATION: # combination is all the different ways that we can group something where the order does not matter. # PERMUTATION: # permutation is all the different ways that we can group something where the order does matter. import itertools my_list=[1,2,3] my_combinations=itertools.combinations(my_list,2)# here fi...
29.35
156
0.748722
import itertools my_list=[1,2,3] my_combinations=itertools.combinations(my_list,2) for c in my_combinations: print(c) my_permutations=itertools.permutations(my_list,2) for c in my_permutations: print(c) import itertools my_list=[1,2,3,4,5,6] my_combinations=itertools.combinations(my_list,3) answer=[re...
true
true
790a07ec3f26b37d4f73c9edf3deb5cd4d6acc16
9,386
py
Python
spectral_analysis/unsupervised_learning/autoencoder/autoencoder_bestmodel.py
csepreghy/spectral_analysis
1cbd9770347a71721164a7daf7b133ad0eeba8e4
[ "MIT" ]
5
2019-05-29T07:16:27.000Z
2019-08-20T07:15:54.000Z
spectral_analysis/unsupervised_learning/autoencoder/autoencoder_bestmodel.py
csepreghy/spectral-analysis
1cbd9770347a71721164a7daf7b133ad0eeba8e4
[ "MIT" ]
19
2020-02-20T09:48:46.000Z
2020-02-24T11:42:54.000Z
spectral_analysis/unsupervised_learning/autoencoder/autoencoder_bestmodel.py
csepreghy/spectral_analysis
1cbd9770347a71721164a7daf7b133ad0eeba8e4
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import os import matplotlib.pyplot as plt import time from tensorflow.keras.layers import Input, Dense, Flatten, Conv1D, MaxPooling1D, UpSampling1D, BatchNormalization, Reshape from tensorflow.keras.models import Model, Sequential from tensorflow.keras.callbacks import TensorBoar...
38
153
0.544002
import numpy as np import pandas as pd import os import matplotlib.pyplot as plt import time from tensorflow.keras.layers import Input, Dense, Flatten, Conv1D, MaxPooling1D, UpSampling1D, BatchNormalization, Reshape from tensorflow.keras.models import Model, Sequential from tensorflow.keras.callbacks import TensorBoar...
true
true
790a07f146d0f02d2a2bf08d785a46f783433494
452
py
Python
data/scripts/templates/object/mobile/shared_space_comm_station_talus.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_space_comm_station_talus.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_space_comm_station_talus.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_space_comm_station_talus.iff" result.attribute_template_id = 9...
26.588235
70
0.734513
true
true
790a0835018bac4f5687de4538b36440ca7223cf
1,719
py
Python
nncf/layer_utils.py
krodyush/nncf
476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a
[ "Apache-2.0" ]
null
null
null
nncf/layer_utils.py
krodyush/nncf
476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a
[ "Apache-2.0" ]
null
null
null
nncf/layer_utils.py
krodyush/nncf
476a274a90a3f2f1ace7a4cb0c9d90d1ddeb7f6a
[ "Apache-2.0" ]
1
2021-04-05T09:33:51.000Z
2021-04-05T09:33:51.000Z
import torch.nn as nn from .registry import Registry COMPRESSION_MODULES = Registry('compression modules') class ProxyModule: def __init__(self, module): self._module = module def __getattr__(self, name): return getattr(self._module, name) class _NNCFModuleMixin: def __init__(self, *a...
27.725806
63
0.623618
import torch.nn as nn from .registry import Registry COMPRESSION_MODULES = Registry('compression modules') class ProxyModule: def __init__(self, module): self._module = module def __getattr__(self, name): return getattr(self._module, name) class _NNCFModuleMixin: def __init__(self, *a...
true
true
790a08f366bde280be8d0312fc96104bd4d44c5a
3,753
py
Python
simmbse/structure_item.py
tsherburne/ma_sim
4082da1c80401dec4293415bc9e9239a6bb8185d
[ "BSD-3-Clause" ]
null
null
null
simmbse/structure_item.py
tsherburne/ma_sim
4082da1c80401dec4293415bc9e9239a6bb8185d
[ "BSD-3-Clause" ]
null
null
null
simmbse/structure_item.py
tsherburne/ma_sim
4082da1c80401dec4293415bc9e9239a6bb8185d
[ "BSD-3-Clause" ]
null
null
null
import simpy import logging """ Recursive GraphQL schema for JSON StructureItem - passed as Python dictionary type StructureItem { id: ID! type: StructureType # optional annotation for a Branch annotation: String # reference UUID / Name / Num for: Function, Exit / ExitCondition (Exit), Replicate (DomainSet...
39.925532
103
0.572342
import simpy import logging class StructureItem: def __init__(self, env: simpy.Environment, logger: logging.Logger, construct_id: str, systemModel: dict, structureItem: dict): from .branch import Branch from .function import Function from .loop import Loop ...
true
true
790a08ff134289c294b118a1f3c876565ca12c25
35,642
py
Python
senlin-7.0.0/senlin/tests/unit/profiles/test_nova_server_validate.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
senlin-7.0.0/senlin/tests/unit/profiles/test_nova_server_validate.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
senlin-7.0.0/senlin/tests/unit/profiles/test_nova_server_validate.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.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 unde...
38.07906
79
0.537287
import mock import six from senlin.common import exception as exc from senlin.profiles.os.nova import server from senlin.tests.unit.common import base from senlin.tests.unit.common import utils spec = { 'type': 'os.nova.server', 'version': '1.0', 'properties': { 'context': {}, ...
true
true
790a09b72053e70e52a971a73a45006398139d92
217
py
Python
ex007.1.py
ErosMLima/python-server-connection
a15706a007a95eff64597fa02e64d95b6b2da6a5
[ "MIT" ]
2
2020-07-27T06:33:59.000Z
2021-02-02T15:17:56.000Z
ex007.1.py
ErosMLima/python-server-connection
a15706a007a95eff64597fa02e64d95b6b2da6a5
[ "MIT" ]
null
null
null
ex007.1.py
ErosMLima/python-server-connection
a15706a007a95eff64597fa02e64d95b6b2da6a5
[ "MIT" ]
null
null
null
#Nota Média do aluno n1 = float(input('Primeira nota do aluno: ')) n2 = float(input('Segundo nota do aluno: ')) média = (n1 + n2) / 2 print('A média entre {:.1f} e {:.1f} é igual a {:.1f}'.format(n1, n2, média))
36.166667
78
0.608295
n1 = float(input('Primeira nota do aluno: ')) n2 = float(input('Segundo nota do aluno: ')) média = (n1 + n2) / 2 print('A média entre {:.1f} e {:.1f} é igual a {:.1f}'.format(n1, n2, média))
true
true
790a0b583b5fe66bc0445bd3f72b01d0fd82bd56
1,877
py
Python
cte_forest/__init__.py
kordian-kowalski/django-cte-forest
9bd3a7fb76d256cfb4d8050381b3ddf4f6d1c4f5
[ "BSD-3-Clause" ]
22
2016-12-16T14:34:33.000Z
2021-06-14T15:16:43.000Z
cte_forest/__init__.py
kordian-kowalski/django-cte-forest
9bd3a7fb76d256cfb4d8050381b3ddf4f6d1c4f5
[ "BSD-3-Clause" ]
1
2020-08-13T15:06:24.000Z
2020-08-13T15:06:24.000Z
cte_forest/__init__.py
kordian-kowalski/django-cte-forest
9bd3a7fb76d256cfb4d8050381b3ddf4f6d1c4f5
[ "BSD-3-Clause" ]
4
2016-12-22T09:54:00.000Z
2020-08-25T07:23:43.000Z
# -*- coding: utf-8 -*- # # This document is free and open-source software, subject to the OSI-approved # BSD license below. # # Copyright (c) 2011 - 2013 Alexis Petrounias <www.petrounias.org>, # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted p...
46.925
80
0.773042
VERSION = (0, 2, 2) __version__ = ".".join(map(str, VERSION))
true
true
790a0b64ee5a29731b953f684419f0b0bc2a2ae6
6,647
py
Python
DBP/models/instance.py
Pusnow/DB-Project
2a9a485bacb4e513c6fbc159faf9855c919c657c
[ "MIT" ]
null
null
null
DBP/models/instance.py
Pusnow/DB-Project
2a9a485bacb4e513c6fbc159faf9855c919c657c
[ "MIT" ]
null
null
null
DBP/models/instance.py
Pusnow/DB-Project
2a9a485bacb4e513c6fbc159faf9855c919c657c
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- from DBP.models import Base, session from DBP.models.user import User from sqlalchemy.orm import class_mapper from sqlalchemy.inspection import inspect from sqlalchemy.sql import func from sqlalchemy.dialects.mysql import INTEGER,VARCHAR, DATETIME from datetime import datetime import csv import...
24.083333
176
0.68136
from DBP.models import Base, session from DBP.models.user import User from sqlalchemy.orm import class_mapper from sqlalchemy.inspection import inspect from sqlalchemy.sql import func from sqlalchemy.dialects.mysql import INTEGER,VARCHAR, DATETIME from datetime import datetime import csv import io from openpyxl imp...
true
true
790a0ba86f5faf7a11b5b2fd062683b3364e94a1
1,175
py
Python
examples/example1.py
rob-blackbourn/bareasgi-jinja2
f2478b7287c4f16b4f1ed3b4e0aa2daa34cfd634
[ "Apache-2.0" ]
null
null
null
examples/example1.py
rob-blackbourn/bareasgi-jinja2
f2478b7287c4f16b4f1ed3b4e0aa2daa34cfd634
[ "Apache-2.0" ]
null
null
null
examples/example1.py
rob-blackbourn/bareasgi-jinja2
f2478b7287c4f16b4f1ed3b4e0aa2daa34cfd634
[ "Apache-2.0" ]
null
null
null
"""An example of jinja2 templating""" from bareasgi import Application, HttpRequest, HttpResponse import jinja2 import pkg_resources import uvicorn from bareasgi_jinja2 import Jinja2TemplateProvider, add_jinja2 async def http_request_handler(request: HttpRequest) -> HttpResponse: """Handle the request""" r...
26.111111
70
0.689362
from bareasgi import Application, HttpRequest, HttpResponse import jinja2 import pkg_resources import uvicorn from bareasgi_jinja2 import Jinja2TemplateProvider, add_jinja2 async def http_request_handler(request: HttpRequest) -> HttpResponse: return await Jinja2TemplateProvider.apply( request, ...
true
true
790a0e96a9ca47a34174432cb6ccc7fcf67991ce
1,795
py
Python
st_package_reviewer/check/file/check_redundant_files.py
Thom1729/st_package_reviewer
71e4eaad60fe3391b0a4d39405b784ec84ea58bc
[ "MIT" ]
8
2017-06-07T07:52:32.000Z
2021-04-26T23:46:36.000Z
st_package_reviewer/check/file/check_redundant_files.py
Thom1729/st_package_reviewer
71e4eaad60fe3391b0a4d39405b784ec84ea58bc
[ "MIT" ]
26
2017-05-29T21:11:10.000Z
2021-05-16T20:58:23.000Z
st_package_reviewer/check/file/check_redundant_files.py
Thom1729/st_package_reviewer
71e4eaad60fe3391b0a4d39405b784ec84ea58bc
[ "MIT" ]
8
2017-05-31T21:16:49.000Z
2021-03-20T16:43:26.000Z
import logging from . import FileChecker l = logging.getLogger(__name__) class CheckPackageMetadata(FileChecker): def check(self): if self.sub_path("package-metadata.json").is_file(): self.fail("'package-metadata.json' is supposed to be automatically generated " "by Pa...
28.046875
99
0.610585
import logging from . import FileChecker l = logging.getLogger(__name__) class CheckPackageMetadata(FileChecker): def check(self): if self.sub_path("package-metadata.json").is_file(): self.fail("'package-metadata.json' is supposed to be automatically generated " "by Pa...
true
true
790a0ef41e807ca17f216256fafd05fc723b18aa
2,222
py
Python
_pycharm_skeletons/renderdoc/BlendStats.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/BlendStats.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/BlendStats.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class BlendStats(SwigPyObject): """ Contains the statistics for blend state binds in a frame. """ def __eq__(sel...
31.295775
100
0.626463
import enum as __enum from .SwigPyObject import SwigPyObject class BlendStats(SwigPyObject): def __eq__(self, *args, **kwargs): pass def __ge__(self, *args, **kwargs): pass def __gt__(self, *args, **kwargs): pass def __hash__(self, *args, **kwargs): pass ...
true
true
790a0fb418cc8a4ea09dd8a3d1a2ef22aeede881
3,800
py
Python
chapters/chapter2.py
amastis/Dead-End
ef25c1a50d1710ea678f628f42951bbf2c2c4a5f
[ "MIT" ]
10
2021-08-14T06:39:43.000Z
2021-12-12T11:53:10.000Z
chapters/chapter2.py
amastis/Dead-End
ef25c1a50d1710ea678f628f42951bbf2c2c4a5f
[ "MIT" ]
2
2021-12-30T05:46:21.000Z
2022-01-04T00:17:19.000Z
chapters/chapter2.py
amastis/Dead-End
ef25c1a50d1710ea678f628f42951bbf2c2c4a5f
[ "MIT" ]
10
2021-05-14T00:59:32.000Z
2021-11-10T01:56:33.000Z
""" This file holds all the chapter 2 areas of the game. """ from time import sleep # from classes import Player, Difficulty from chapters.chapter import Chapter from chapters.chapter3 import Chapter3 from other.sounds_effects import GameSounds from game import player1, sounds, Difficulty from choices import _player_c...
44.186047
120
0.613421
from time import sleep from chapters.chapter import Chapter from chapters.chapter3 import Chapter3 from other.sounds_effects import GameSounds from game import player1, sounds, Difficulty from choices import _player_choice, error_message from other.colors import print_green, print_yellow, print_red, print_sleep, prin...
true
true
790a103f0a4a4ceeaae6372fb5b9b4c773807c63
1,875
py
Python
tests/test_MonkeyTest.py
Groops78/asn1editor
1c386b3a34bcfccd97b80aa29c0ce4cfcb81853f
[ "MIT" ]
1
2021-01-21T14:32:43.000Z
2021-01-21T14:32:43.000Z
tests/test_MonkeyTest.py
Groops78/asn1editor
1c386b3a34bcfccd97b80aa29c0ce4cfcb81853f
[ "MIT" ]
null
null
null
tests/test_MonkeyTest.py
Groops78/asn1editor
1c386b3a34bcfccd97b80aa29c0ce4cfcb81853f
[ "MIT" ]
null
null
null
import os import random import threading from time import sleep from unittest import TestCase import asn1tools import wx import asn1editor from asn1editor.wxPython.ViewSelect import ViewType from tests import testHelper def actions(main_window: asn1editor.wxPython.MainWindow): def get_children(window: wx.Window...
28.846154
134
0.654933
import os import random import threading from time import sleep from unittest import TestCase import asn1tools import wx import asn1editor from asn1editor.wxPython.ViewSelect import ViewType from tests import testHelper def actions(main_window: asn1editor.wxPython.MainWindow): def get_children(window: wx.Window...
true
true
790a1063bb88b75c4647565565ce2175ff64010d
1,669
py
Python
壁球/壁球游戏2.0/main.py
LZY2006/pygame-small-games
41c97a67f3781d4691b822b4fbdafa310f785938
[ "MIT" ]
null
null
null
壁球/壁球游戏2.0/main.py
LZY2006/pygame-small-games
41c97a67f3781d4691b822b4fbdafa310f785938
[ "MIT" ]
null
null
null
壁球/壁球游戏2.0/main.py
LZY2006/pygame-small-games
41c97a67f3781d4691b822b4fbdafa310f785938
[ "MIT" ]
null
null
null
# Unit PYG02: Pygame Wall Ball Game version 3 操控型 import pygame,sys pygame.init() vINFO=pygame.display.Info() print(vINFO) size = width, height = vINFO.current_w,vINFO.current_h speed = [1,1] BLACK = 0, 0, 0 screen = pygame.display.set_mode(size,pygame.FULLSCREEN) icon=pygame.image.load("1.png") pygame.display.set...
32.096154
105
0.59257
import pygame,sys pygame.init() vINFO=pygame.display.Info() print(vINFO) size = width, height = vINFO.current_w,vINFO.current_h speed = [1,1] BLACK = 0, 0, 0 screen = pygame.display.set_mode(size,pygame.FULLSCREEN) icon=pygame.image.load("1.png") pygame.display.set_icon(icon) pygame.display.set_caption("Pygame壁球")...
true
true
790a1071003702b23b70375e479230ceb5617489
12,846
py
Python
utils/heatmap-coverage.py
ved432/test
779914d1bc876414d1149161ec0d838d7bb16601
[ "Apache-2.0" ]
null
null
null
utils/heatmap-coverage.py
ved432/test
779914d1bc876414d1149161ec0d838d7bb16601
[ "Apache-2.0" ]
null
null
null
utils/heatmap-coverage.py
ved432/test
779914d1bc876414d1149161ec0d838d7bb16601
[ "Apache-2.0" ]
null
null
null
from pandas import DataFrame import matplotlib.pyplot as plt import seaborn as sns import csv,sys ExperimentName=sys.argv[1] with open(ExperimentName+'.csv', newline='') as f: reader = csv.reader(f) data = list(reader) if ExperimentName == "pod-delete": Index = ['Validation','For deployment application',...
136.659574
675
0.763973
from pandas import DataFrame import matplotlib.pyplot as plt import seaborn as sns import csv,sys ExperimentName=sys.argv[1] with open(ExperimentName+'.csv', newline='') as f: reader = csv.reader(f) data = list(reader) if ExperimentName == "pod-delete": Index = ['Validation','For deployment application',...
true
true
790a1094a20697f80ff8a238c317a81ce6746d16
3,588
py
Python
walle/service/git/repo.py
lgq9220/walle-web
06d90ee3b3577985f04567ef176c7c8e60e242bb
[ "Apache-2.0" ]
null
null
null
walle/service/git/repo.py
lgq9220/walle-web
06d90ee3b3577985f04567ef176c7c8e60e242bb
[ "Apache-2.0" ]
1
2021-03-20T05:32:23.000Z
2021-03-20T05:32:23.000Z
walle/service/git/repo.py
lgq9220/walle-web
06d90ee3b3577985f04567ef176c7c8e60e242bb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ walle-web :copyright: © 2015-2019 walle-web.io :created time: 2019-02-24 10:47:53 :author: wushuiyong@walle-web.io """ import os import re import os.path as osp import git as PyGit from git import Repo as PyRepo class Repo: path = None def __init__(self, path=Non...
24.744828
93
0.510033
import os import re import os.path as osp import git as PyGit from git import Repo as PyRepo class Repo: path = None def __init__(self, path=None): self.path = path def is_git_dir(self): d = self.path + '/.git' if osp.isdir(d): if osp.isdir(osp.join(d, 'objects')) a...
true
true
790a11b01276f7d332c9d88a8dde58030a7f58a9
1,599
py
Python
py/py_0564_maximal_polygons.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
py/py_0564_maximal_polygons.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
py/py_0564_maximal_polygons.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
# Solution of; # Project Euler Problem 564: Maximal polygons # https://projecteuler.net/problem=564 # # A line segment of length $2n-3$ is randomly split into $n$ segments of # integer length ($n \ge 3$). In the sequence given by this split, the # segments are then used as consecutive sides of a convex $n$-polygon, ...
44.416667
79
0.68793
import timed def dummy(n): pass if __name__ == '__main__': n = 1000 i = 10000 prob_id = 564 timed.caller(dummy, n, i, prob_id)
true
true
790a12c98d343c9d305668dfe266339f5ab4440a
14,445
py
Python
awswrangler/neptune/neptune.py
minwook-shin/aws-data-wrangler
304e734db5e96cc5e11ff54b4f3a1cf7c4e5736b
[ "Apache-2.0" ]
null
null
null
awswrangler/neptune/neptune.py
minwook-shin/aws-data-wrangler
304e734db5e96cc5e11ff54b4f3a1cf7c4e5736b
[ "Apache-2.0" ]
null
null
null
awswrangler/neptune/neptune.py
minwook-shin/aws-data-wrangler
304e734db5e96cc5e11ff54b4f3a1cf7c4e5736b
[ "Apache-2.0" ]
null
null
null
"""Amazon Neptune Module.""" import logging import re from typing import Any import pandas as pd from gremlin_python.process.graph_traversal import GraphTraversalSource, __ from gremlin_python.process.translator import Translator from gremlin_python.process.traversal import Cardinality, T from gremlin_python.structur...
34.640288
116
0.638975
import logging import re from typing import Any import pandas as pd from gremlin_python.process.graph_traversal import GraphTraversalSource, __ from gremlin_python.process.translator import Translator from gremlin_python.process.traversal import Cardinality, T from gremlin_python.structure.graph import Graph from aw...
true
true
790a145bf13e03b8947b4cd75d739377fdb2db45
441
py
Python
djeddit/migrations/0002_thread_locked.py
EatEmAll/django-djedd
d5b988cc94d185320c933f77494f0b1f4680b178
[ "Apache-2.0" ]
43
2017-04-22T11:28:21.000Z
2022-03-27T15:42:11.000Z
djeddit/migrations/0002_thread_locked.py
EatEmAll/django-djedd
d5b988cc94d185320c933f77494f0b1f4680b178
[ "Apache-2.0" ]
32
2017-10-14T13:09:25.000Z
2020-05-19T14:18:33.000Z
djeddit/migrations/0002_thread_locked.py
physics-is-beautiful/django-react-djeddit
db7a392c14bbdef25d56a6124b2ed9449c7de337
[ "Apache-2.0" ]
21
2017-08-05T12:07:05.000Z
2021-12-09T03:37:15.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-05-29 06:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djeddit', '0001_initial'), ] operations = [ migrations.AddField( ...
21
53
0.60771
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djeddit', '0001_initial'), ] operations = [ migrations.AddField( model_name='thread', name='locked', field=mod...
true
true
790a146620e209d719aca4a5990aeca3b589696a
951
py
Python
catkin_ws/src/learning_communication/scripts/person_publisher.py
Colin1245/ROS-Theory-Application-Shenlan
49986c83a2c73c7ab4310fd3f010e1b6bc0de786
[ "Apache-2.0" ]
null
null
null
catkin_ws/src/learning_communication/scripts/person_publisher.py
Colin1245/ROS-Theory-Application-Shenlan
49986c83a2c73c7ab4310fd3f010e1b6bc0de786
[ "Apache-2.0" ]
null
null
null
catkin_ws/src/learning_communication/scripts/person_publisher.py
Colin1245/ROS-Theory-Application-Shenlan
49986c83a2c73c7ab4310fd3f010e1b6bc0de786
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # 该例程将发布/person_info话题,自定义消息类型learning_communication::PersonMsg import rospy from learning_communication.msg import PersonMsg def velocity_publisher(): # ROS节点初始化 rospy.init_node('person_publisher', anonymous=True) # 创建一个Publisher,发布名为/person_info的topic,消息类型为Person...
25.026316
79
0.700315
import rospy from learning_communication.msg import PersonMsg def velocity_publisher(): rospy.init_node('person_publisher', anonymous=True) person_info_pub = rospy.Publisher('/person_info', PersonMsg, queue_size=10) rate = rospy.Rate(10) while not rospy.is_shutdown(): person_msg =...
false
true
790a14779ac8fa7859adb2b9cf4a8951ef9b3abe
234
py
Python
wizer/admin.py
lucasace/workoutizer
7b12cfa08ffee63c10e53de8fc227f142ecfdc42
[ "MIT" ]
null
null
null
wizer/admin.py
lucasace/workoutizer
7b12cfa08ffee63c10e53de8fc227f142ecfdc42
[ "MIT" ]
null
null
null
wizer/admin.py
lucasace/workoutizer
7b12cfa08ffee63c10e53de8fc227f142ecfdc42
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Sport, Activity, Settings, Traces, Lap admin.site.register(Sport) admin.site.register(Activity) admin.site.register(Settings) admin.site.register(Traces) admin.site.register(Lap)
23.4
58
0.807692
from django.contrib import admin from .models import Sport, Activity, Settings, Traces, Lap admin.site.register(Sport) admin.site.register(Activity) admin.site.register(Settings) admin.site.register(Traces) admin.site.register(Lap)
true
true
790a150445cdd43759ac5b9dd88e407a7abdeb40
676
py
Python
examples/run_msde.py
lukapecnik/NiaPy
a40ac08a4c06a13019ec5e39cc137461884928b0
[ "MIT" ]
null
null
null
examples/run_msde.py
lukapecnik/NiaPy
a40ac08a4c06a13019ec5e39cc137461884928b0
[ "MIT" ]
null
null
null
examples/run_msde.py
lukapecnik/NiaPy
a40ac08a4c06a13019ec5e39cc137461884928b0
[ "MIT" ]
1
2020-03-25T16:20:36.000Z
2020-03-25T16:20:36.000Z
# encoding=utf8 # This is temporary fix to import module from parent folder # It will be removed when package is published on PyPI import sys sys.path.append('../') # End of fix import random from NiaPy.algorithms.basic import MultiStrategyDifferentialEvolution from NiaPy.util import StoppingTask, OptimizationType fro...
35.578947
99
0.755917
import sys sys.path.append('../') import random from NiaPy.algorithms.basic import MultiStrategyDifferentialEvolution from NiaPy.util import StoppingTask, OptimizationType from NiaPy.benchmarks import Sphere for i in range(5): task = StoppingTask(D=10, nFES=1000, optType=OptimizationType.MINIMIZATION, benchm...
true
true
790a15edb91b3a98a8ec8ff95da69e0148aa2c7c
371
py
Python
problems/007/run.v1.py
birdchan/project_euler
ec36d3a9e47cbca8c84bdbf41bd93cd49d320364
[ "MIT" ]
null
null
null
problems/007/run.v1.py
birdchan/project_euler
ec36d3a9e47cbca8c84bdbf41bd93cd49d320364
[ "MIT" ]
null
null
null
problems/007/run.v1.py
birdchan/project_euler
ec36d3a9e47cbca8c84bdbf41bd93cd49d320364
[ "MIT" ]
null
null
null
import math def is_prime(num): if num < 2: return False for i in range(num): if i < 2: continue if num % i == 0: return False return True def get_nth_prime(n): cnt = 0 i = 0 while cnt < n: i += 1 if is_prime(i): cnt += 1 return i if __name__ == '__main__': #pr...
13.740741
28
0.568733
import math def is_prime(num): if num < 2: return False for i in range(num): if i < 2: continue if num % i == 0: return False return True def get_nth_prime(n): cnt = 0 i = 0 while cnt < n: i += 1 if is_prime(i): cnt += 1 return i if __name__ == '__main__': ...
false
true
790a17b5e28a6c3768e3529ce2c7f86524db778b
899
py
Python
datasets/nba/Game.py
MediaBrain-SJTU/GroupNet
607541c8843f8b6206b1ffefd2d27fb07dcca073
[ "MIT" ]
1
2022-03-28T12:52:40.000Z
2022-03-28T12:52:40.000Z
datasets/nba/Game.py
MediaBrain-SJTU/GroupNet
607541c8843f8b6206b1ffefd2d27fb07dcca073
[ "MIT" ]
null
null
null
datasets/nba/Game.py
MediaBrain-SJTU/GroupNet
607541c8843f8b6206b1ffefd2d27fb07dcca073
[ "MIT" ]
null
null
null
import pandas as pd from Event import Event from Team import Team from Constant import Constant import numpy as np class Game: """A class for keeping info about the games""" def __init__(self, path_to_json): # self.events = None self.home_team = None self.guest_team = None self...
27.242424
56
0.602892
import pandas as pd from Event import Event from Team import Team from Constant import Constant import numpy as np class Game: def __init__(self, path_to_json): self.home_team = None self.guest_team = None self.event = None self.path_to_json = path_to_json def read_js...
true
true
790a186c945a81d9aa3609e883b00c2fc8ba84d0
985
py
Python
config.py
kwahome/delivery-bot
70b4c6c77d1fe6743b2c5d776315452c5ee85d53
[ "MIT" ]
null
null
null
config.py
kwahome/delivery-bot
70b4c6c77d1fe6743b2c5d776315452c5ee85d53
[ "MIT" ]
null
null
null
config.py
kwahome/delivery-bot
70b4c6c77d1fe6743b2c5d776315452c5ee85d53
[ "MIT" ]
null
null
null
import os class DefaultConfig: """ Bot Configuration """ HOST = "0.0.0.0" PORT = 3978 CONNECTION_NAME = os.environ.get("CONNECTION_NAME", "echo-bot") APP_ID = os.environ.get("MICROSOFT_APP_ID", "") APP_PASSWORD = os.environ.get("MICROSOFT_APP_PASSWORD", "") LUIS_APP_ID = os.environ.get(...
35.178571
95
0.694416
import os class DefaultConfig: HOST = "0.0.0.0" PORT = 3978 CONNECTION_NAME = os.environ.get("CONNECTION_NAME", "echo-bot") APP_ID = os.environ.get("MICROSOFT_APP_ID", "") APP_PASSWORD = os.environ.get("MICROSOFT_APP_PASSWORD", "") LUIS_APP_ID = os.environ.get("LUIS_APP_ID", "") LUIS_AP...
true
true
790a18a5d898b6d8101ac1abd069d71bf03ec044
616
py
Python
kmux/tmux.py
kiemlicz/kmux
a1cf523cb02fc49b768780645c6287f30d2b7b83
[ "MIT" ]
null
null
null
kmux/tmux.py
kiemlicz/kmux
a1cf523cb02fc49b768780645c6287f30d2b7b83
[ "MIT" ]
null
null
null
kmux/tmux.py
kiemlicz/kmux
a1cf523cb02fc49b768780645c6287f30d2b7b83
[ "MIT" ]
null
null
null
import libtmux def ensure_server() -> libtmux.Server: ''' Either create new or return existing server ''' return libtmux.Server() def spawn_session(name: str, kubeconfig_location: str, server: libtmux.Server): if server.has_session(name): return else: session = server.new_ses...
32.421053
109
0.719156
import libtmux def ensure_server() -> libtmux.Server: return libtmux.Server() def spawn_session(name: str, kubeconfig_location: str, server: libtmux.Server): if server.has_session(name): return else: session = server.new_session(name) session.set_environment("KUBECONFIG", kubecon...
true
true
790a18adbfcf2eef41bdbdb8f2ba70a560921c94
2,591
py
Python
test/test_b_plot.py
cperales/Fourier-classifying-songs
54d13e2ce2d7d05fe7126bbbd884917758188d6d
[ "MIT" ]
15
2018-10-07T07:48:23.000Z
2019-03-16T15:50:54.000Z
test/test_b_plot.py
cperales/Fourier-classifying-songs
54d13e2ce2d7d05fe7126bbbd884917758188d6d
[ "MIT" ]
7
2018-10-17T18:13:29.000Z
2018-10-24T12:19:40.000Z
test/test_b_plot.py
cperales/Fourier-classifying-songs
54d13e2ce2d7d05fe7126bbbd884917758188d6d
[ "MIT" ]
1
2020-10-22T22:28:28.000Z
2020-10-22T22:28:28.000Z
import unittest from foucluster.plot import song_plot, diff_plot, heatmap_song import configparser import os import json from scipy.io.wavfile import read import numpy as np import pandas as pd class TestPlot(unittest.TestCase): @staticmethod def _get_series(i=0): """ :return: """ ...
29.11236
93
0.547665
import unittest from foucluster.plot import song_plot, diff_plot, heatmap_song import configparser import os import json from scipy.io.wavfile import read import numpy as np import pandas as pd class TestPlot(unittest.TestCase): @staticmethod def _get_series(i=0): config = configparser.ConfigParser()...
true
true
790a18dffd0d0a5f2094714c60d754f3b4807b8e
2,745
py
Python
samples/client/petstore/python/tests/test_api_exception.py
deerghayu/swagger-codegen
1e33403e381be1db91b1427d3f70f7476cb4da67
[ "Apache-2.0" ]
1
2016-12-01T21:19:51.000Z
2016-12-01T21:19:51.000Z
samples/client/petstore/python/tests/test_api_exception.py
deerghayu/swagger-codegen
1e33403e381be1db91b1427d3f70f7476cb4da67
[ "Apache-2.0" ]
5
2017-01-05T09:41:49.000Z
2018-03-04T19:38:14.000Z
samples/client/petstore/python/tests/test_api_exception.py
deerghayu/swagger-codegen
1e33403e381be1db91b1427d3f70f7476cb4da67
[ "Apache-2.0" ]
5
2020-04-01T02:37:35.000Z
2021-04-07T08:04:07.000Z
# coding: utf-8 """ Run the tests. $ pip install nose (optional) $ cd swagger_client-python $ nosetests -v """ import os import sys import time import unittest import swagger_client from swagger_client.rest import ApiException class ApiExceptionTests(unittest.TestCase): def setUp(self): self.api_clien...
30.164835
78
0.622222
import os import sys import time import unittest import swagger_client from swagger_client.rest import ApiException class ApiExceptionTests(unittest.TestCase): def setUp(self): self.api_client = swagger_client.ApiClient() self.pet_api = swagger_client.PetApi(self.api_client) self.setU...
true
true
790a1953e87b99b07c5ccf273009f041d8f7eaba
1,075
py
Python
kubernetes/test/test_v2beta1_horizontal_pod_autoscaler.py
scele/kubernetes-client-python
9e982cbdb5f19dc1a3935a75bdd92288f3b807fb
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v2beta1_horizontal_pod_autoscaler.py
scele/kubernetes-client-python
9e982cbdb5f19dc1a3935a75bdd92288f3b807fb
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v2beta1_horizontal_pod_autoscaler.py
scele/kubernetes-client-python
9e982cbdb5f19dc1a3935a75bdd92288f3b807fb
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
23.888889
108
0.739535
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v2beta1_horizontal_pod_autoscaler import V2beta1HorizontalPodAutoscaler class TestV2beta1HorizontalPodAutoscaler(unittest.TestCase): ...
true
true
790a1c76526cf01bdf87d418e5e2a9bd0bc77e5d
6,614
py
Python
vispy/visuals/tests/test_image.py
3DAlgoLab/vispy
91972307cf336674aad58198fb26b9e46f8f9ca1
[ "BSD-3-Clause" ]
1
2021-08-04T06:31:02.000Z
2021-08-04T06:31:02.000Z
vispy/visuals/tests/test_image.py
3DAlgoLab/vispy
91972307cf336674aad58198fb26b9e46f8f9ca1
[ "BSD-3-Clause" ]
1
2021-06-04T13:48:46.000Z
2021-06-05T10:57:33.000Z
vispy/visuals/tests/test_image.py
3DAlgoLab/vispy
91972307cf336674aad58198fb26b9e46f8f9ca1
[ "BSD-3-Clause" ]
1
2018-09-17T07:00:38.000Z
2018-09-17T07:00:38.000Z
# -*- coding: utf-8 -*- from unittest import mock from vispy.scene.visuals import Image from vispy.testing import (requires_application, TestingCanvas, run_tests_if_main) from vispy.testing.image_tester import assert_image_approved, downsample import numpy as np import pytest @requires_ap...
36.744444
107
0.633958
from unittest import mock from vispy.scene.visuals import Image from vispy.testing import (requires_application, TestingCanvas, run_tests_if_main) from vispy.testing.image_tester import assert_image_approved, downsample import numpy as np import pytest @requires_application() @pytest.mar...
true
true
790a1ca85391110f418f3a086954422214318656
6,901
py
Python
Robotics/src/otonomgorev.py
ahmetakif/Voice-Controlled-Raspberry-Pi-Robot
00dcc15dfbb7441d6403fb0467b2144e8750cc0c
[ "Apache-2.0" ]
5
2019-08-21T08:08:27.000Z
2021-06-14T06:56:50.000Z
Robotics/src/otonomgorev.py
ahmetakif/Voice-Controlled-Raspberry-Pi-Robot
00dcc15dfbb7441d6403fb0467b2144e8750cc0c
[ "Apache-2.0" ]
null
null
null
Robotics/src/otonomgorev.py
ahmetakif/Voice-Controlled-Raspberry-Pi-Robot
00dcc15dfbb7441d6403fb0467b2144e8750cc0c
[ "Apache-2.0" ]
2
2019-08-21T08:16:58.000Z
2021-04-07T11:56:11.000Z
import os import RPi.GPIO as gpio import time import random from mesafe import distance motorhizi = 2.5 hiz = 100 aci2 = aci3 = aci4 = 6 aci = 5.5 in4 = 26 in3 = 4 in2 = 12 in1 = 8 solled = 9 sagled = 11 gpio.setwarnings(False) def init(): gpio.setwarnings(False) gpio.setmode(gpio.BCM) gpio.setup(22,g...
20.848943
115
0.501522
import os import RPi.GPIO as gpio import time import random from mesafe import distance motorhizi = 2.5 hiz = 100 aci2 = aci3 = aci4 = 6 aci = 5.5 in4 = 26 in3 = 4 in2 = 12 in1 = 8 solled = 9 sagled = 11 gpio.setwarnings(False) def init(): gpio.setwarnings(False) gpio.setmode(gpio.BCM) gpio.setup(22,g...
true
true
790a1d37a4ebf26c18ca7f0b51e38c2f5c1b8cb7
5,166
py
Python
umn/source/conf.py
kucerakk/template
30ba12f5b25b6afbb060bfe0379fc1a7b88626ff
[ "Apache-2.0" ]
null
null
null
umn/source/conf.py
kucerakk/template
30ba12f5b25b6afbb060bfe0379fc1a7b88626ff
[ "Apache-2.0" ]
null
null
null
umn/source/conf.py
kucerakk/template
30ba12f5b25b6afbb060bfe0379fc1a7b88626ff
[ "Apache-2.0" ]
null
null
null
# 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 the...
32.696203
79
0.714092
import os import sys extensions = [ 'otcdocstheme' ] html_theme = 'otcdocs' html_theme_options = { } otcdocs_auto_name = False otcdocs_auto_version = False project = 'Dummy Service' otcdocs_repo_name = 'opentelekomcloud-docs/template' sys.path.insert(0, os.path.abspath('../../')) sys.path.ins...
true
true
790a1e1db2413ea25ac85add932a5feef92f08a8
8,855
py
Python
qutip/graph.py
trxw/qutip
b923c973edd9a071d86eb849650661549f73585f
[ "BSD-3-Clause" ]
1
2015-11-06T06:35:06.000Z
2015-11-06T06:35:06.000Z
qutip/graph.py
trxw/qutip
b923c973edd9a071d86eb849650661549f73585f
[ "BSD-3-Clause" ]
null
null
null
qutip/graph.py
trxw/qutip
b923c973edd9a071d86eb849650661549f73585f
[ "BSD-3-Clause" ]
null
null
null
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met...
34.862205
90
0.658385
true
true
790a1f0fce49d9911909bd493fe73e1f22541631
1,368
py
Python
multithreading/multithreading_simple.py
guneykayim/python-examples
b5378570fdfa71bc27809801867b53381f8e5346
[ "MIT" ]
null
null
null
multithreading/multithreading_simple.py
guneykayim/python-examples
b5378570fdfa71bc27809801867b53381f8e5346
[ "MIT" ]
null
null
null
multithreading/multithreading_simple.py
guneykayim/python-examples
b5378570fdfa71bc27809801867b53381f8e5346
[ "MIT" ]
null
null
null
import threading, queue import time import random import logging logging.basicConfig(level=logging.DEBUG, format='(%(threadName)-9s) %(message)s',) NUMBER_OF_THREADS = 4 TIMEOUT_SECONDS = 5 class SampleThread(threading.Thread): def __init__(self, group=None, target=None, name=None, id=None, kwargs=None): ...
27.918367
82
0.645468
import threading, queue import time import random import logging logging.basicConfig(level=logging.DEBUG, format='(%(threadName)-9s) %(message)s',) NUMBER_OF_THREADS = 4 TIMEOUT_SECONDS = 5 class SampleThread(threading.Thread): def __init__(self, group=None, target=None, name=None, id=None, kwargs=None): ...
true
true
790a1f549ca885d773128c7ac9a9b19cad44bb99
8,346
py
Python
tec/snake_food_import_counting.py
thorwhalen/tec
7f23e1ee0750688cfe21838414d83e813217a853
[ "Apache-2.0" ]
1
2022-01-19T13:15:30.000Z
2022-01-19T13:15:30.000Z
tec/snake_food_import_counting.py
thorwhalen/tec
7f23e1ee0750688cfe21838414d83e813217a853
[ "Apache-2.0" ]
null
null
null
tec/snake_food_import_counting.py
thorwhalen/tec
7f23e1ee0750688cfe21838414d83e813217a853
[ "Apache-2.0" ]
null
null
null
import inspect import os import re import subprocess from collections import Counter from io import StringIO import pandas as pd from numpy import unique file_sep = os.path.sep def imports_in_module(module): """ Get a list of strings showing what is imported in a module. :param module: An actual module...
38.638889
117
0.659358
import inspect import os import re import subprocess from collections import Counter from io import StringIO import pandas as pd from numpy import unique file_sep = os.path.sep def imports_in_module(module): if not isinstance(module, str): module = inspect.getfile(module) if module.endswith('c')...
true
true
790a1faf7ca690522cf3511872c292a6508ee3a2
5,276
py
Python
tools/metrics/histograms/PRESUBMIT.py
Ron423c/chromium
2edf7b980065b648f8b2a6e52193d83832fe36b7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
tools/metrics/histograms/PRESUBMIT.py
Ron423c/chromium
2edf7b980065b648f8b2a6e52193d83832fe36b7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
tools/metrics/histograms/PRESUBMIT.py
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details on the presubmit API built into depot_tools. """ def GetPr...
37.15493
80
0.736164
def GetPrettyPrintErrors(input_api, output_api, cwd, rel_path, results): exit_code = input_api.subprocess.call( [input_api.python_executable, 'pretty_print.py', rel_path, '--presubmit', '--non-interactive'], cwd=cwd) if exit_code != 0: error_msg = ( '%s is not formatted correctly; ru...
true
true
790a1fbce2d935b7a37511eef87b9aed2191f79b
32
py
Python
linguist/__init__.py
jayvdb/linguist
bac586366f1fc87eda72c90855a4eabb1f61922c
[ "BSD-3-Clause" ]
75
2015-03-14T19:32:23.000Z
2022-02-14T13:01:43.000Z
linguist/__init__.py
jayvdb/linguist
bac586366f1fc87eda72c90855a4eabb1f61922c
[ "BSD-3-Clause" ]
16
2016-04-08T03:22:02.000Z
2021-05-17T14:28:06.000Z
linguist/__init__.py
jayvdb/linguist
bac586366f1fc87eda72c90855a4eabb1f61922c
[ "BSD-3-Clause" ]
22
2015-01-14T16:33:58.000Z
2021-11-02T11:09:51.000Z
VERSION = __version__ = '0.1.1'
16
31
0.65625
VERSION = __version__ = '0.1.1'
true
true