content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import pytest
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.remote.webelement import WebElement
from nerodia.exception import LocatorException
from nerodia.locators.element import Matcher
f... | [
11748,
12972,
9288,
198,
6738,
384,
11925,
1505,
13,
11321,
13,
1069,
11755,
1330,
1400,
16678,
20180,
16922,
11,
520,
1000,
20180,
26687,
16922,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
47960,
13,
12384,
26230,
1330,
5313,
3210... | 3.669014 | 142 |
#! /usr/bin/env python3
import unittest
from datagenerator.BankAccount import BankAccount
from datagenerator.Person import Person
verbose_tests = False
if __name__ == '__main__':
unittest.main()
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
555,
715,
395,
198,
6738,
4818,
363,
877,
1352,
13,
28650,
30116,
1330,
5018,
30116,
198,
6738,
4818,
363,
877,
1352,
13,
15439,
1330,
7755,
628,
198,
19011,
577,
6... | 2.971014 | 69 |
from __future__ import annotations
from typing import TYPE_CHECKING, List, Optional
from typing_extensions import NotRequired, TypedDict, final
if TYPE_CHECKING:
from ..shared import Snowflake
from .user import UserData
__all__ = ('ApplicationData', 'TeamData', 'TeamMemberData')
# https://discord.com/deve... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
11,
7343,
11,
32233,
198,
198,
6738,
19720,
62,
2302,
5736,
1330,
1892,
37374,
11,
17134,
276,
35,
713,
11,
2457,
198,
198,
361,
41876,
62,
500... | 3.220994 | 181 |
undefined
for (i = 0; i < document.getElementsByTagName("code").length; i++) { console.log(document.getElementsByTagName("code")[i].innerText); }
| [
198,
917,
18156,
198,
1640,
357,
72,
796,
657,
26,
1312,
1279,
3188,
13,
1136,
36,
3639,
3886,
24835,
5376,
7203,
8189,
11074,
13664,
26,
1312,
29577,
1391,
220,
220,
220,
220,
8624,
13,
6404,
7,
22897,
13,
1136,
36,
3639,
3886,
248... | 2.732143 | 56 |
import numpy as np
IMAGE_SIZE = 32
# Returns the rgb values of a pixel in an image
# Checks whether the current position is in the image
# Checks whether the value of r, g and b is [x] in an array
# Checks whether the current position is in the image and that the pixel is not black
# Returns the neighbouring pixe... | [
11748,
299,
32152,
355,
45941,
198,
198,
3955,
11879,
62,
33489,
796,
3933,
198,
198,
2,
16409,
262,
46140,
3815,
286,
257,
17465,
287,
281,
2939,
198,
198,
2,
47719,
1771,
262,
1459,
2292,
318,
287,
262,
2939,
198,
198,
2,
47719,
1... | 3.913793 | 116 |
print(countTreesProduct('InputD03Q2.txt', [[1, 1], [3, 1], [5, 1], [7, 1], [1, 2]]))
| [
198,
198,
4798,
7,
9127,
51,
6037,
15667,
10786,
20560,
35,
3070,
48,
17,
13,
14116,
3256,
16410,
16,
11,
352,
4357,
685,
18,
11,
352,
4357,
685,
20,
11,
352,
4357,
685,
22,
11,
352,
4357,
685,
16,
11,
362,
11907,
4008,
198
] | 1.977273 | 44 |
import os
import re
import sys
import numpy as np
import nltk
import xml.etree.ElementTree as ET
from nltk.tokenize import TweetTokenizer
tknzr = TweetTokenizer()
from nltk.stem import PorterStemmer
ps = PorterStemmer()
from nltk.corpus import stopwords
from collections import Counter
import collections
im... | [
11748,
28686,
201,
198,
11748,
302,
201,
198,
11748,
25064,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
299,
2528,
74,
201,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
201,
198,
6738,
299,
2528,
74,
13... | 3.178344 | 157 |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.template import loader
from django.views.generic import TemplateView | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
198,
2,
13610,
534,
5009,
994,
13,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
28243,
1330,
40213,
198,
6738,
42625,
14208,
13,
33571,
1... | 4 | 45 |
from syned.beamline.beamline import Beamline | [
198,
6738,
827,
2817,
13,
40045,
1370,
13,
40045,
1370,
1330,
25855,
1370
] | 3.461538 | 13 |
DEV = VersionTag(0)
ALPHA = VersionTag(1)
BETA = VersionTag(2)
STABLE = VersionTag(3)
| [
198,
39345,
796,
10628,
24835,
7,
15,
8,
198,
1847,
47,
7801,
796,
10628,
24835,
7,
16,
8,
198,
33,
20892,
796,
10628,
24835,
7,
17,
8,
198,
2257,
17534,
796,
10628,
24835,
7,
18,
8,
198
] | 2.351351 | 37 |
from collections import Counter
import celery
from patients.models_enums import Zygosity
from snpdb.models import VCF, SampleLocusCount
@celery.shared_task
| [
6738,
17268,
1330,
15034,
198,
198,
11748,
18725,
1924,
198,
198,
6738,
3871,
13,
27530,
62,
268,
5700,
1330,
1168,
35641,
16579,
198,
6738,
3013,
79,
9945,
13,
27530,
1330,
569,
22495,
11,
27565,
43,
10901,
12332,
628,
198,
31,
7015,
... | 3.404255 | 47 |
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name='syct',
version='0.4.3',
author="Nadav Oved",
author_email="nadavo@gmail.com",
description="A Simple Yet Convenient Timer module for Python 3",
long_description=... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
1600,
21004,
2625,
40477,
12,
23,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
... | 2.496644 | 298 |
# -*- coding: utf-8 -*-
"""
@author: Asma Baccouche
"""
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from Get_Data import get_data
from sklearn.cluster import KMeans, SpectralClustering
from nltk.cluster import KMeansClusterer, util
from gensim.models import Word2Vec
from skle... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
31,
9800,
25,
1081,
2611,
347,
4134,
280,
2395,
201,
198,
37811,
201,
198,
201,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330... | 2.43949 | 785 |
import snailfish
import unittest
import utils
if __name__ == '__main__':
unittest.main()
| [
11748,
47374,
11084,
198,
11748,
555,
715,
395,
198,
11748,
3384,
4487,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.694444 | 36 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#from weibopy.api import API
from weibo import APIClient
import sys,os,urllib,urllib2,cookielib,httplib
import webbrowser
import urlparse
#模拟授权并且获取回调地址上的code,以获得acces token和token过期的UNIX时间
client = APIClient(app_key=APP_KEY, app_secret=APP_SECRET, redirect_uri=CALLBACK_URL)
re... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6738,
356,
571,
11081,
13,
15042,
1330,
7824,
198,
6738,
356,
26762,
1330,
3486,
2149,
75,
1153,
198,
11748,
25064,
11,
4... | 2.109155 | 852 |
""""The code determines, if the user input is an
even number or an odd number"""
integer_number = int(input("Enter an integer number: "))
if integer_number % 2 == 0:
print(integer_number, "is an even number.")
else:
print(integer_number," is an odd number.") | [
15931,
15931,
464,
2438,
15947,
11,
611,
262,
2836,
5128,
318,
281,
220,
198,
10197,
1271,
393,
281,
5629,
1271,
37811,
198,
41433,
62,
17618,
796,
493,
7,
15414,
7203,
17469,
281,
18253,
1271,
25,
366,
4008,
198,
198,
361,
18253,
62,... | 3.358974 | 78 |
from django.shortcuts import render, get_object_or_404, redirect
from django.http import HttpResponse
from django.template import RequestContext, loader
from models import Profile, Post, PostComment
from forms import ProfileForm
from readings.models import Book, Day
from django.contrib.auth.decorators import login_requ... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
28243,
1330,
19390,
21947,
11,
40213,
198,
673... | 3.68 | 150 |
#!/usr/bin/env python
'''
Modified version of: noisy_odom.py, Team Leonard, University of Birmingham Intelligent Robotics 2018
'''
import rospy
import math
import random
# gauss() is an inbuilt method of the random module
from random import gauss
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
7061,
6,
198,
5841,
1431,
2196,
286,
25,
31210,
62,
375,
296,
13,
9078,
11,
4816,
20131,
11,
2059,
286,
18899,
49452,
47061,
2864,
198,
7061,
6,
198,
198,
11748,
686,
2777,
88,
... | 2.349656 | 2,471 |
from config import db, ma
| [
6738,
4566,
1330,
20613,
11,
17266,
201,
198,
201,
198,
201,
198
] | 2.583333 | 12 |
from app import db
| [
6738,
598,
1330,
20613,
198
] | 3.8 | 5 |
xCoordinate =[1]*10
| [
87,
7222,
45480,
796,
58,
16,
60,
9,
940,
198,
220,
220,
220,
220,
220,
220,
220,
220,
628,
628
] | 1.6 | 20 |
import copy
from mmcv.utils import build_from_cfg
from mmcv.runner import OPTIMIZERS
from fastda.utils import get_root_logger
| [
11748,
4866,
198,
6738,
8085,
33967,
13,
26791,
1330,
1382,
62,
6738,
62,
37581,
198,
6738,
8085,
33967,
13,
16737,
1330,
39852,
3955,
14887,
4877,
198,
6738,
3049,
6814,
13,
26791,
1330,
651,
62,
15763,
62,
6404,
1362,
628,
198
] | 3.2 | 40 |
x = 0
while x < 5:
if x == 3:
x += 1
continue
print(x)
x += 1
print('Acabou!')
| [
87,
796,
657,
198,
4514,
2124,
1279,
642,
25,
198,
220,
220,
220,
611,
2124,
6624,
513,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
15853,
352,
198,
220,
220,
220,
220,
220,
220,
220,
2555,
198,
220,
220,
220,
3601,
7,
87,... | 1.741935 | 62 |
#!/usr/bin/python
#
# list_unused_munki_pkgs.py
# Tim Sutton
#
# Simple script to list all Munki pkgs not currently referenced in a specific list
# of catalogs.
# It does not delete anything.
#
# CATALOGS can be modified to a list of catalogs in your repo that should be indexed.
# PKGS_ROOT must also be defined to be r... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
1351,
62,
403,
1484,
62,
76,
2954,
72,
62,
35339,
82,
13,
9078,
198,
2,
5045,
39964,
198,
2,
198,
2,
17427,
4226,
284,
1351,
477,
337,
2954,
72,
279,
10025,
82,
407,
3058,
... | 2.516092 | 870 |
from django.urls import path
from . import views
urlpatterns = [
path('access/token', views.getAccessToken, name='get_mpesa_access_token'),
path('online/lipa', views.lipa_na_mpesa_online, name='lipa_na_mpesa'),
# register, confirmation, validation and callback urls
path('c2b/register', views.register... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
15526,
14,
30001,
3256,
5009,
13,
1136,
15457,
30642,
11,
1438,
11639,
1136,
62,
3149... | 2.847716 | 197 |
"""
Utility for loading SNP data.
"""
__author__ = "Devon Hjelm"
__copyright__ = "Copyright 2014, Mind Research Network"
__credits__ = ["Devon Hjelm"]
__licence__ = "3-clause BSD"
__email__ = "dhjelm@mrn.org"
__maintainer__ = "Devon Hjelm"
import argparse
import copy
import logging
import gzip
import numpy as np
from... | [
37811,
198,
18274,
879,
329,
11046,
25632,
1366,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
13603,
261,
367,
73,
417,
76,
1,
198,
834,
22163,
4766,
834,
796,
366,
15269,
1946,
11,
10175,
4992,
7311,
1,
198,
834,
66,
20696,
... | 2.124171 | 20,971 |
#!/usr/bin/python
# Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
15069,
357,
66,
8,
1946,
1215,
1878,
4872,
20171,
198,
2,
6434,
25,
8832,
6031,
28635,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4... | 2.800112 | 1,781 |
# 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 os
import unittest
import StringIO
from py_vulcanize import fake_fs
from py_vulcanize import generate
from py_vulcanize import html_generation_contro... | [
2,
15069,
1946,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
11748... | 3.45 | 160 |
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8
"""
Provides Nose and Django test case assert functions
"""
from django.test.testcases import TransactionTestCase
from django.core import mail
import re
## Python
from nose import tools
for t in dir(tools):
if t.startswith('assert_'):
... | [
2,
43907,
25,
7400,
11338,
28,
19,
4292,
8658,
8295,
521,
298,
6482,
10394,
28,
19,
2393,
12685,
7656,
28,
40477,
12,
23,
198,
198,
37811,
198,
15946,
1460,
47880,
290,
37770,
1332,
1339,
6818,
5499,
198,
37811,
198,
198,
6738,
42625,... | 2.550085 | 589 |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 19 13:16:25 2015
@author: hbanks
Brevity required, prurience preferred
"""
import os
import io
import glob
import errno
import copy
import json
import warnings
import numpy as np
from scipy.optimize import curve_fit
import scipy.interpolate as spi
import scipy.optimize... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
19480,
7653,
678,
1511,
25,
1433,
25,
1495,
1853,
198,
198,
31,
9800,
25,
289,
43558,
198,
198,
12679,
21319,
2672,
11,
778,
333,
1240,
9871,
1... | 2.171336 | 70,143 |
import torch
import torch.nn.functional as F
from torch_geometric.nn.conv import GATConv, MessagePassing
from torch_geometric.nn.norm import BatchNorm
from pd_mesh_net.nn.conv import PrimalConv, GATConvNoSelfLoops
class DualPrimalConv(torch.nn.Module):
r"""Implements a modified version of the convolution operati... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
62,
469,
16996,
13,
20471,
13,
42946,
1330,
402,
1404,
3103,
85,
11,
16000,
14478,
278,
198,
6738,
28034,
62,
469,
16996,
13,
20471,
13,
27237,
1330,
3... | 2.350568 | 6,518 |
import imp
import os.path as osp
| [
11748,
848,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
628,
198
] | 2.916667 | 12 |
from python_reference.sparsemax_regression import SparsemaxRegression
| [
6738,
21015,
62,
35790,
13,
82,
29572,
9806,
62,
2301,
2234,
1330,
1338,
17208,
9806,
8081,
2234,
198
] | 3.888889 | 18 |
#!/usr/bin/env python
import pytest
from tidyplusPy import md
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
12972,
9288,
198,
6738,
43044,
9541,
20519,
1330,
45243,
198
] | 3 | 21 |
from django import template
register = template.Library()
@register.filter
| [
6738,
42625,
14208,
1330,
11055,
198,
198,
30238,
796,
11055,
13,
23377,
3419,
198,
198,
31,
30238,
13,
24455,
198
] | 3.85 | 20 |
from __future__ import unicode_literals
from datetime import datetime
from django.db.models import Q
from django.utils.translation import ugettext as _
from rest_framework.exceptions import PermissionDenied
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewset... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
355,
48... | 3.629851 | 335 |
# =========================================================================================
# Copyright 2015 Community Information Online Consortium (CIOC) and KCL Software Solutions
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | [
2,
38093,
4770,
2559,
198,
2,
220,
15069,
1853,
8108,
6188,
7467,
42727,
357,
25690,
4503,
8,
290,
509,
5097,
10442,
23555,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
19... | 4.027701 | 361 |
# -*- coding: utf-8 -*-
import sys
sys.path.append('sources')
import torch
import random
import unittest
import numpy as np
from torch.utils.data import Dataset
from torchvision import transforms
from predict import predict
from network import Model
from score import AP, meanAP
if __name__ == '__main__':
unittes... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
82,
2203,
11537,
198,
11748,
28034,
198,
11748,
4738,
198,
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
... | 3.22549 | 102 |
import numpy as np
def constant_function(x, constant=0):
"""
Returns a constant value `a` such that f(x) = a.
Parameters
============
x: the input value.
constant: the constant value.
"""
return constant
def dirac_delta_function(x, steps=[(1, 1)]):
"""
Retur... | [
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
201,
198,
4299,
6937,
62,
8818,
7,
87,
11,
6937,
28,
15,
2599,
201,
198,
220,
220,
220,
37227,
201,
198,
220,
220,
220,
16409,
257,
6937,
1988,
4600,
64,
63,
884,
326,
277,
7,
8... | 2.202166 | 554 |
import math
import numpy as np
import basis.robot_math as rm
import grasping.annotation.utils as gu
from scipy.spatial import cKDTree
def plan_pushing(hnd_s,
objcm,
cone_angle=math.radians(30),
icosphere_level=2,
local_rotation_interval=math.radians(... | [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4308,
13,
305,
13645,
62,
11018,
355,
42721,
198,
11748,
44787,
13,
1236,
14221,
13,
26791,
355,
915,
198,
6738,
629,
541,
88,
13,
2777,
34961,
1330,
269,
42,
24544,
631,
6... | 1.846774 | 1,488 |
import time
from .udp_class import Room, b
| [
11748,
640,
198,
6738,
764,
463,
79,
62,
4871,
1330,
10096,
11,
275,
628
] | 3.142857 | 14 |
from .prison.prison import env, manual_control, parallel_env, raw_env
| [
6738,
764,
35156,
13,
35156,
1330,
17365,
11,
10107,
62,
13716,
11,
10730,
62,
24330,
11,
8246,
62,
24330,
198
] | 3.5 | 20 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
11,
15720,
602,
628
] | 2.891892 | 37 |
import pytest
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from model import Base
# import all entities so they are known to the ORM
from trading.order import Order
from trading.portfolio import Portfolio
from trading.trade import... | [
11748,
12972,
9288,
198,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
283,
876,
1330,
2377,
283,
876,
62,
8692,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
198,
... | 3.769231 | 104 |
from bitcoinrpc.authproxy import AuthServiceProxy
import csv
access = AuthServiceProxy("http://rpcusername:rpcpassword@127.0.0.1:8332")
number = 50
csvfile = open('addresses.csv','a')
writer = csv.writer(csvfile)
while number != 0:
try:
newaddress = access.getnewaddress()
writer.writerow([newaddr... | [
6738,
8550,
81,
14751,
13,
18439,
36436,
1330,
26828,
16177,
44148,
198,
11748,
269,
21370,
198,
198,
15526,
796,
26828,
16177,
44148,
7203,
4023,
1378,
81,
79,
9042,
13292,
25,
81,
14751,
28712,
31,
16799,
13,
15,
13,
15,
13,
16,
25,... | 2.46988 | 166 |
"""Example app config."""
from django.apps import AppConfig
class ExampleAppConfig(AppConfig):
"""Example app config."""
name = 'example'
default_auto_field = 'django.db.models.BigAutoField'
| [
37811,
16281,
598,
4566,
526,
15931,
198,
198,
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628,
198,
4871,
17934,
4677,
16934,
7,
4677,
16934,
2599,
198,
220,
220,
220,
37227,
16281,
598,
4566,
526,
15931,
198,
220,
220,
220,
1438... | 3.029412 | 68 |
# Generated by Django 2.0.2 on 2018-03-25 19:04
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
17,
319,
2864,
12,
3070,
12,
1495,
678,
25,
3023,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
#
# client.py
#
# Timothy Graefe, Javamata LLC, Nov 2021
#
import logging
# Django imports
from django.conf import settings
from django.db.utils import DatabaseError
from django.db.backends.base.client import BaseDatabaseClient
from django.core.exceptions import ImproperlyCon... | [
2,
198,
2,
5456,
13,
9078,
198,
2,
198,
2,
22283,
7037,
22521,
11,
49247,
321,
1045,
11419,
11,
5267,
33448,
198,
2,
198,
198,
11748,
18931,
198,
198,
2,
37770,
17944,
198,
6738,
42625,
14208,
13,
10414,
220,
220,
220,
220,
220,
2... | 2.481586 | 353 |
"""
Evennia menu system.
Contribution - Griatch 2011
This module offers the ability for admins to let their game be fully
or partly menu-driven. Menu choices can be numbered or use arbitrary
keys. There are also some formatting options, such a putting options
in one or more columns.
The menu system consists of a Men... | [
37811,
198,
6104,
18142,
6859,
1080,
13,
198,
198,
4264,
3890,
532,
20914,
963,
2813,
198,
198,
1212,
8265,
4394,
262,
2694,
329,
44563,
284,
1309,
511,
983,
307,
3938,
198,
273,
11476,
6859,
12,
15808,
13,
21860,
7747,
460,
307,
2584... | 2.334308 | 9,575 |
#!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
41906,
17174,
46068,
1174,
198,
2,
15069,
357,
66,
8,
43208,
21852,
1766,
1539,
12052,
13,
33448,
12,
1238,
2481,
13,
1439,
2489,
10395,
13,
198,
2,
11971,
739,
262,
17996,
272,
6599... | 3.008757 | 571 |
import json
from .base import BaseTestArticles
from rest_framework.views import status
from ..models import Article
from ...authentication.models import User
from ....apps.profiles.models import Profile
| [
11748,
33918,
198,
6738,
764,
8692,
1330,
7308,
14402,
8001,
2983,
198,
6738,
1334,
62,
30604,
13,
33571,
1330,
3722,
198,
6738,
11485,
27530,
1330,
10172,
198,
6738,
2644,
41299,
3299,
13,
27530,
1330,
11787,
198,
6738,
19424,
18211,
13,... | 4.22449 | 49 |
blacklist=[
'finger her'
'N I G G E R',
'#removethemole',
'super hottie',
'thicc',
't h i c c',
'u are hot',
'you are hot',
'your hot',
'ur hot',
'u are sexy',
'you are sexy',
... | [
13424,
4868,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
35461,
607,
6,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
45,
314,
402,... | 1.482493 | 1,428 |
from lxml import etree
from signxml import XMLSigner, XMLVerifier
from pprint import pprint
data_to_sign = "<Test/>"
cert = open("../idp/azure_ad_app_signing_cert.pem").read()
key = open("../idp/azure_ad_app_signing_key.pem").read()
root = etree.fromstring(data_to_sign)
signed_root = XMLSigner().sign(root, key=key, ce... | [
6738,
300,
19875,
1330,
2123,
631,
198,
6738,
1051,
19875,
1330,
23735,
11712,
263,
11,
23735,
13414,
7483,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
7890,
62,
1462,
62,
12683,
796,
33490,
14402,
15913,
1,
198,
22583,
796,
1280,
... | 2.708543 | 199 |
"""
Dummy node, two pointers, swap nodes
"""
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next | [
37811,
198,
35,
13513,
10139,
11,
734,
32007,
11,
16075,
13760,
198,
37811,
198,
198,
2,
30396,
329,
1702,
306,
12,
25614,
1351,
13,
198,
2,
1398,
7343,
19667,
7,
15252,
2599,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
... | 2.457831 | 83 |
import os
from test_base import TestBase
from onadata.apps.logger.models import XForm
| [
11748,
28686,
198,
198,
6738,
1332,
62,
8692,
1330,
6208,
14881,
198,
6738,
319,
14706,
13,
18211,
13,
6404,
1362,
13,
27530,
1330,
1395,
8479,
628
] | 3.384615 | 26 |
import re
import csv
from typing import TextIO
from .core_gsheets import get_values
from .common import filter_personal_reasons
| [
11748,
302,
198,
11748,
269,
21370,
198,
198,
6738,
19720,
1330,
8255,
9399,
198,
198,
6738,
764,
7295,
62,
70,
42011,
1330,
651,
62,
27160,
198,
6738,
764,
11321,
1330,
8106,
62,
22682,
62,
260,
2812,
628
] | 3.540541 | 37 |
"""
software模块添加新的 x_开头的算法
software模块添加首新人的github和dockerhub账号
"""
from cytomine import Cytomine
from cytomine.models import SoftwareUserRepository
Cytomine.connect("192.168.52.120", "00d8474f-7fd8-4c50-bf8e-79973dcf7bc0", "2e088a54-26ab-4f8e-9bd5-d861479ecbfe")
SoftwareUserRepository(provider="Github", username="zhang... | [
37811,
198,
43776,
162,
101,
94,
161,
251,
245,
162,
115,
119,
27950,
254,
23877,
108,
21410,
2124,
62,
28156,
222,
13783,
112,
21410,
163,
106,
245,
37345,
243,
198,
43776,
162,
101,
94,
161,
251,
245,
162,
115,
119,
27950,
254,
16... | 2 | 190 |
# Generated by Django 3.0.8 on 2020-07-04 16:15
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
23,
319,
12131,
12,
2998,
12,
3023,
1467,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
from pypy.interpreter.error import OperationError
from pypy.interpreter.gateway import unwrap_spec
@unwrap_spec(lo=int, hi=int)
def bisect_left(space, w_a, w_x, lo=0, hi=-1):
"""Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e < x, and... | [
6738,
279,
4464,
88,
13,
3849,
3866,
353,
13,
18224,
1330,
14680,
12331,
198,
6738,
279,
4464,
88,
13,
3849,
3866,
353,
13,
10494,
1014,
1330,
7379,
2416,
62,
16684,
628,
198,
31,
403,
37150,
62,
16684,
7,
5439,
28,
600,
11,
23105,
... | 2.258469 | 797 |
"""
Voxel-Based Morphometry on Oasis dataset with Space-Net prior
=============================================================
Predicting age from gray-matter concentration maps from OASIS
dataset. Note that age is a continuous variable, we use the regressor
here, and not the classification object.
See also the Spac... | [
37811,
198,
53,
1140,
417,
12,
15001,
41170,
15748,
319,
440,
17765,
27039,
351,
4687,
12,
7934,
3161,
198,
10052,
4770,
25609,
28,
198,
198,
47,
17407,
278,
2479,
422,
12768,
12,
47635,
10368,
8739,
422,
440,
1921,
1797,
198,
19608,
... | 3.133953 | 1,075 |
from django import forms
from django.utils.translation import ugettext_lazy as _
from api.dc.template.views import dc_template
from gui.forms import SerializerForm
class TemplateForm(SerializerForm):
"""
Create or remove DC<->VmTemplate link by calling dc_template.
"""
_api_call = dc_template
na... | [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
198,
6738,
40391,
13,
17896,
13,
28243,
13,
33571,
1330,
30736,
62,
28243,
198,
6738,
11774,
13,
23914,... | 2.815029 | 173 |
import unittest
import networkx as nx
import dstream
| [
11748,
555,
715,
395,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
288,
5532,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
19... | 1.528571 | 70 |
# coding: utf-8
import re
import os
import json
import logging
from collections import namedtuple
from os.path import join, abspath
from ansible import constants as C
from ansible.playbook.play import Play
from ansible.errors import AnsibleError
from ansible.utils.path import unfrackpath
from ansible.parsing.datalo... | [
2,
19617,
25,
3384,
69,
12,
23,
628,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
18931,
198,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
2352,
6978,
198,
198,
6738,
9093,... | 1.737385 | 7,372 |
from dagster import (
Array,
Field,
ModeDefinition,
Noneable,
ScalarUnion,
Selector,
Shape,
pipeline,
resource,
solid,
)
from dagster.config.field import resolve_to_config_type
from dagster.core.serdes import deserialize_json_to_dagster_namedtuple, serialize_dagster_namedtuple
fr... | [
6738,
48924,
1706,
1330,
357,
198,
220,
220,
220,
15690,
11,
198,
220,
220,
220,
7663,
11,
198,
220,
220,
220,
10363,
36621,
11,
198,
220,
220,
220,
6045,
540,
11,
198,
220,
220,
220,
34529,
283,
38176,
11,
198,
220,
220,
220,
968... | 2.530055 | 183 |
from .schedule import Schedule
from .exceptions import *
| [
6738,
764,
15952,
5950,
1330,
19281,
198,
6738,
764,
1069,
11755,
1330,
1635,
198
] | 4.071429 | 14 |
import math
import random
import re
import time
from turtle import numinput
from cv2 import INTER_AREA, INTER_BITS, INTER_CUBIC, INTER_LANCZOS4, INTER_LINEAR, INTER_LINEAR_EXACT, INTER_MAX, imread, imshow, waitKey
import numpy as np
import cv2
import os
from multiprocessing import Process, Manager
data_path = os.getcw... | [
11748,
10688,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
640,
198,
6738,
28699,
1330,
997,
15414,
198,
6738,
269,
85,
17,
1330,
23255,
62,
12203,
32,
11,
23255,
62,
26094,
50,
11,
23255,
62,
34,
10526,
2149,
11,
23255,
62,
43,
2... | 2.637427 | 171 |
from django.db import models
# Create your models here.
from sellshop.utils.base_models import BaseModel
from django_countries.fields import CountryField
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13,
198,
6738,
3677,
24643,
13,
26791,
13,
8692,
62,
27530,
1330,
7308,
17633,
198,
6738,
42625,
14208,
62,
9127,
1678,
13,
25747,
1330,
12946,
15878,
628,
... | 3.659091 | 44 |
import os
import numpy as np
from matplotlib import pyplot
if __name__ == '__main__':
# Load Data
# The first two columns contains the X values and the third column
# contains the label (y).
data = np.loadtxt(os.path.join("/home/thelichking/Desktop/ml-coursera-python-assignments/Exercise2/Data",
... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1303,
8778,
6060,
198,
220,
220,
220,
1303,... | 2.310526 | 190 |
from rest_framework import serializers | [
6738,
1334,
62,
30604,
1330,
11389,
11341
] | 5.428571 | 7 |
import pandas as pd
import numpy as np
import transform
import classifier
import FoldBuilder
import training_utils
import submission_utils
if __name__ == '__main__':
mfcc_config = [
dict(
numcep = 14,
nfilt= 21,
lowfreq=500,
high... | [
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
11748,
6121,
201,
198,
11748,
1398,
7483,
201,
198,
11748,
39957,
32875,
201,
198,
11748,
3047,
62,
26791,
201,
198,
11748,
14498,
62,
26791,
... | 1.743295 | 1,044 |
""" visualises networks of related samples using cytoscape.js
A component of the findNeighbour4 system for bacterial relatedness monitoring
Copyright (C) 2021 David Wyllie david.wyllie@phe.gov.uk
repo: https://github.com/davidhwyllie/findNeighbour4
This program is free software: you can redistribute it and/or modify
... | [
37811,
5874,
2696,
7686,
286,
3519,
8405,
1262,
27104,
17500,
1758,
13,
8457,
198,
198,
32,
7515,
286,
262,
1064,
46445,
6084,
19,
1080,
329,
23462,
3519,
1108,
9904,
198,
15269,
357,
34,
8,
33448,
3271,
12958,
297,
494,
21970,
13,
21... | 2.001423 | 2,810 |
# uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: toaiff
from warnings import warnpy3k
warnpy3k('the toaiff module has been removed in Python 3.0', stacklevel=2)
del warnpy3k
import os, ... | [
2,
34318,
2349,
21,
2196,
513,
13,
17,
13,
19,
198,
2,
11361,
18022,
8189,
362,
13,
22,
357,
21,
1828,
1157,
8,
198,
2,
4280,
3361,
3902,
422,
25,
11361,
362,
13,
22,
13,
1314,
357,
85,
17,
13,
22,
13,
1314,
25,
6888,
2998,
... | 2.347253 | 455 |
# Copyright (c) 2008-2011 Tim Newsham, Andrey Mirtchovski
# Copyright (c) 2011-2012 Peter V. Saveliev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# withou... | [
2,
15069,
357,
66,
8,
3648,
12,
9804,
5045,
968,
1477,
321,
11,
843,
4364,
337,
2265,
354,
709,
20545,
198,
2,
15069,
357,
66,
8,
2813,
12,
6999,
5613,
569,
13,
10318,
626,
11203,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11... | 2.33452 | 4,215 |
# 03/08/2020 - JonatanPaschoal
#declarando funções
func1() #chamando as função e seus argumentos entre parênteses
# função e recebe argumentos
func2('Jonatan', 'Paschoal')
# função retorna valor
cubo(3) # apenas excuta a função
f = cubo(3) # atribui-se o valor da função a uma variável
print(f)
print('-'*18)#... | [
2,
7643,
14,
2919,
14,
42334,
532,
5966,
39036,
47,
292,
6679,
282,
198,
198,
2,
32446,
283,
25440,
1257,
16175,
127,
113,
274,
198,
198,
20786,
16,
3419,
1303,
49869,
25440,
355,
1257,
16175,
28749,
304,
384,
385,
4578,
418,
920,
2... | 2.140351 | 171 |
import datetime
from typing import Dict, Union
MAESTRO_INFORMATION = [
MCZInformation(0, "message_type", "message_type"),
MCZInformation(1, "power", "power"),
MCZInformation(2, "front_fan", "int"),
MCZInformation(3, "lower_back_fan", "int"),
MCZInformation(4, "top_back_fan", "int"),
MCZInform... | [
11748,
4818,
8079,
198,
6738,
19720,
1330,
360,
713,
11,
4479,
628,
198,
198,
5673,
1546,
5446,
46,
62,
1268,
35036,
796,
685,
198,
220,
220,
220,
13122,
57,
21918,
7,
15,
11,
366,
20500,
62,
4906,
1600,
366,
20500,
62,
4906,
12340,... | 2.436416 | 2,422 |
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
import argparse
import enum
import importlib
import inspect
import types
from pprint import pprint
class Parameter(object):
""" A placeholder object, used for the moment in the inline tests """
pass
QUALIFIER = '.'
def dotpath_jo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
1822,
29572,
198,
11748,
33829,
198,
11748,
1330,
8019,
198,
11748,
10104,
198,
117... | 2.249072 | 2,963 |
import clientUtils
def play_sound(data):
"""
Parameters
----------
data: dict
Returns
-------
"""
if 'sound_name' in data:
clientUtils.sound(data.get('sound_name'))
return ""
return "Je ne trouve pas le son demandé"
| [
11748,
5456,
18274,
4487,
628,
198,
4299,
711,
62,
23661,
7,
7890,
2599,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
220,
220,
220,
1366,
25,
8633,
628,
220,
220,
220,
16409,
198,
220,
... | 2.403509 | 114 |
import hashlib, binascii
null_user = User()
null_user.name = "null"
null_user.is_null = True
null_user.id = 0
| [
11748,
12234,
8019,
11,
9874,
292,
979,
72,
198,
198,
8423,
62,
7220,
796,
11787,
3419,
198,
8423,
62,
7220,
13,
3672,
796,
366,
8423,
1,
198,
8423,
62,
7220,
13,
271,
62,
8423,
796,
6407,
198,
8423,
62,
7220,
13,
312,
796,
657,
... | 2.466667 | 45 |
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
housing_data= pd.read_csv("C:\\Users\\sofia.dejesus\\Documents\\02_book\\kc_house_data.csv")
#Housing_data.head()
#print(housing_data.shape)
housing_data.describe(include=[np.number])
housing_data.he... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,... | 2.528428 | 299 |
from prettytable import PrettyTable | [
6738,
2495,
11487,
1330,
20090,
10962
] | 5.833333 | 6 |
import typing
from . import base, fields
class PassportElementError(base.TelegramObject):
"""
This object represents an error in the Telegram Passport element which was submitted that
should be resolved by the user.
https://core.telegram.org/bots/api#passportelementerror
"""
source: base.St... | [
11748,
19720,
198,
198,
6738,
764,
1330,
2779,
11,
7032,
628,
198,
4871,
6251,
634,
20180,
12331,
7,
8692,
13,
6767,
30536,
10267,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
770,
2134,
6870,
281,
4049,
287,
262,
50203,
6251,... | 3.338275 | 742 |
from query_parser import QueryParser
from unittest import TestCase
| [
6738,
12405,
62,
48610,
1330,
43301,
46677,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198
] | 4.1875 | 16 |
import time
start = time.perf_counter()
for i in range(10000):
x = "aaaaa".replace("a", "e")
print(time.perf_counter() - start)
| [
11748,
640,
198,
198,
9688,
796,
640,
13,
525,
69,
62,
24588,
3419,
198,
198,
1640,
1312,
287,
2837,
7,
49388,
2599,
198,
220,
220,
220,
2124,
796,
366,
24794,
64,
1911,
33491,
7203,
64,
1600,
366,
68,
4943,
198,
198,
4798,
7,
243... | 2.5 | 54 |
U = [314882150829468584,
427197303358170108,
1022292690726729920,
1698479428772363217,
2006101093849356424]
n, q = map(int, input().split())
A = [i for i in range(n + 1)]
FA = [f(i) for i in A]
for _ in range(q):
l, r = map(int, input().split())
s = sum(FA[l:r + 1])
print(s)
t =... | [
52,
796,
685,
33638,
3459,
2481,
33042,
27696,
3104,
46352,
11,
198,
220,
220,
220,
220,
45345,
24991,
1270,
2091,
3365,
1558,
486,
2919,
11,
198,
220,
220,
220,
220,
838,
1828,
1959,
26276,
2998,
25674,
22579,
1238,
11,
198,
220,
220... | 1.80531 | 226 |
'''
run with: python ten2eleven.py -f numframes test_dummy_old_MDA_code.py
Author: Tyler Reddy
'''
from __future__ import absolute_import
from lib2to3.fixer_base import BaseFix
from lib2to3.fixer_util import Name, Dot
from lib2to3 import pytree
| [
7061,
6,
198,
5143,
351,
25,
21015,
3478,
17,
11129,
574,
13,
9078,
532,
69,
997,
37805,
1332,
62,
67,
13513,
62,
727,
62,
44,
5631,
62,
8189,
13,
9078,
220,
198,
13838,
25,
14886,
2297,
9892,
198,
7061,
6,
198,
6738,
11593,
37443... | 2.775281 | 89 |
"""Copy actions from ProbReg project into ActieReg project
"""
import dml
import _basic.models as my
from django.contrib.auth.models import User
def main(fnaam):
"""Main function
"""
data = [actie[0] for actie in dml.Acties(fnaam, arch="alles").lijst]
for item in data:
actie = dml.Actie(fnaam,... | [
37811,
29881,
4028,
422,
30873,
8081,
1628,
656,
2191,
494,
8081,
1628,
198,
37811,
198,
11748,
288,
4029,
198,
11748,
4808,
35487,
13,
27530,
355,
616,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
628,
198... | 1.544618 | 1,087 |
import tkinter as tk
import matplotlib
import matplotlib.pyplot as plt
from gui.histogram import Histogram
from gui.operations.computer_vision import Vision
from gui.image_frame import ImageFrame
import app_config
matplotlib.use("TkAgg")
class TabPicture:
"""
Kompozycja obiektów Vision przechowujących obra... | [
11748,
256,
74,
3849,
355,
256,
74,
198,
198,
11748,
2603,
29487,
8019,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
11774,
13,
10034,
21857,
1330,
5590,
21857,
198,
6738,
11774,
13,
3575,
602,
13,
332... | 2.296167 | 861 |
#
# This file is part of Python Client Library for the LCCS Web Service.
# Copyright (C) 2019-2020 INPE.
#
# Python Client Library for the LCCS Web Service is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
"""Python Client Library for t... | [
2,
198,
2,
770,
2393,
318,
636,
286,
11361,
20985,
10074,
329,
262,
406,
4093,
50,
5313,
4809,
13,
198,
2,
15069,
357,
34,
8,
13130,
12,
42334,
3268,
11401,
13,
198,
2,
198,
2,
11361,
20985,
10074,
329,
262,
406,
4093,
50,
5313,
... | 2.663529 | 1,275 |
# 9012.py
for _ in range(int(input())):
string = input()
while string.find("()") != -1:
index = string.find("()")
string = string[:index] + string[index+2:]
if len(string) == 0:
print("YES")
else:
print("NO") | [
171,
119,
123,
2,
860,
30206,
13,
9078,
198,
1640,
4808,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
198,
220,
220,
220,
4731,
796,
5128,
3419,
198,
220,
220,
220,
981,
4731,
13,
19796,
7203,
3419,
4943,
14512,
532,
16,
25,
198,
220... | 2.106557 | 122 |
"""
Tests for binding pocket detection.
"""
import os
import logging
import unittest
import numpy as np
import deepchem as dc
from deepchem.utils import rdkit_utils
from deepchem.utils import coordinate_box_utils as box_utils
logger = logging.getLogger(__name__)
class TestBindingPocket(unittest.TestCase):
"""
D... | [
37811,
198,
51,
3558,
329,
12765,
10000,
13326,
13,
198,
37811,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2769,
15245,
355,
30736,
198,
6738,
2769,
15245,
13,
2... | 2.713188 | 781 |
#!/usr/bin/env python3
""" HIAS Bluetooth IoT Agent Class
HIAS Bluetooth IoT Agents are bridges between HIAS devices that support
Bluetooth/Bluetooth Low Energy protocol and the HIASCDI Context Broker.
MIT License
Copyright (c) 2021 Asociación de Investigacion en Inteligencia Artificial
Para la Leucemia Peter Moss
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
36210,
1921,
19263,
38488,
15906,
5016,
198,
198,
25374,
1921,
19263,
38488,
28295,
389,
19432,
1022,
36210,
1921,
4410,
326,
1104,
198,
38676,
16271,
14,
38676,
16271,
7754,
66... | 2.893662 | 1,909 |
# ___________________________________________________________________________
#
# Prescient
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
# This software is ... | [
2,
220,
220,
27193,
2602,
17569,
198,
2,
198,
2,
220,
1763,
3456,
198,
2,
220,
15069,
12131,
2351,
8987,
1222,
14044,
23555,
286,
3837,
544,
11,
11419,
198,
2,
220,
357,
11251,
7597,
737,
4698,
262,
2846,
286,
17453,
5550,
12,
4535,... | 2.277676 | 3,821 |
#!/usr/bin/env python
import sys
assert sys.version >= '2.3', "Requires Python v2.3 or above"
from distutils.core import setup, Extension
setup(
name = "pytagger",
version = "0.5",
author = "Alastair Tse",
author_email = "alastair@liquidx.net",
url = "http://www.liquidx.net/pytagger/",
descriptio... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
30493,
25064,
13,
9641,
18189,
705,
17,
13,
18,
3256,
366,
39618,
11361,
410,
17,
13,
18,
393,
2029,
1,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
11,
2799... | 2.501608 | 311 |
import falcon
from falcon import testing
from .dataset_fixtures import *
| [
11748,
24215,
1102,
198,
6738,
24215,
1102,
1330,
4856,
198,
198,
6738,
764,
19608,
292,
316,
62,
69,
25506,
1330,
1635,
628,
198
] | 3.304348 | 23 |
import torch
import torch.nn as nn
import torch.nn.functional as F
from getter import getter
from CURE.CURE import CURELearner
import numpy as np
from matplotlib import pyplot as plt
from pathlib import Path
def lossplot(config: dict, save_path: str = None) -> None:
"""Plots the negative of the loss surface. One... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
651,
353,
1330,
651,
353,
198,
6738,
327,
11335,
13,
34,
11335,
1330,
327,
11335,
14961,
1008,
198,
198,
11748,
29... | 2.209775 | 1,821 |
import asyncio
import json
import time
import uuid
from manhattan.utils.chrono import today_tz
from mongoframes import Q
import swm
import tornado.web
__all__ = [
'APIError',
'APIHandler',
'APIErrorHandler',
]
class APIError(tornado.web.HTTPError):
"""
Use `APIError` instead of `HTTPError` to ra... | [
11748,
30351,
952,
198,
11748,
33918,
198,
11748,
640,
198,
11748,
334,
27112,
198,
198,
6738,
582,
12904,
13,
26791,
13,
11413,
78,
1330,
1909,
62,
22877,
198,
6738,
285,
506,
1659,
859,
274,
1330,
1195,
198,
11748,
1509,
76,
198,
11... | 2.580777 | 489 |
# -*- coding: utf-8 -*-
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# 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
#
# U... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
220,
220,
15069,
2321,
26068,
271,
2744,
1031,
4496,
11,
13231,
271,
1951,
461,
29207,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
... | 2.490484 | 2,312 |
from __future__ import absolute_import, print_function, division
import unittest
from pony.orm.core import *
from pony.orm.tests.testutils import *
if __name__ == '__main__':
unittest.main()
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
3601,
62,
8818,
11,
7297,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
26902,
13,
579,
13,
7295,
1330,
1635,
198,
6738,
26902,
13,
579,
13,
41989,
13,
9288,
26791,
1330,
1635,
1... | 3.046154 | 65 |
"""v21.12.0_feature/#207
Revision ID: 52b9095d9dff
Revises: 05eab8fbc21b
Create Date: 2021-10-08 13:40:57.416791
"""
from alembic import op
import sqlalchemy as sa
from app.database import get_db_schema, engine
from config import MAX_UPLOAD_FILE_SIZE
# revision identifiers, used by Alembic.
revision = '52b9095d9dff... | [
37811,
85,
2481,
13,
1065,
13,
15,
62,
30053,
31113,
22745,
198,
198,
18009,
1166,
4522,
25,
6740,
65,
44675,
20,
67,
24,
67,
487,
198,
18009,
2696,
25,
8870,
68,
397,
23,
69,
15630,
2481,
65,
198,
16447,
7536,
25,
33448,
12,
940,... | 2.373424 | 1,031 |
df = pd.read_csv(link, sep=';') | [
7568,
796,
279,
67,
13,
961,
62,
40664,
7,
8726,
11,
41767,
11639,
26,
11537
] | 2.066667 | 15 |