content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# coding=utf-8 # Copyright 2021 Google LLC. # # 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 ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 3012, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351,...
2.685969
449
from django.contrib.auth.models import User from django.db import models from django.utils.timezone import now
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 783, 628, 628, 628, 628, 198 ]
3.305556
36
from keras.models import Sequential from keras.layers import Dense, Dropout
[ 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 11, 14258, 448, 628 ]
3.5
22
# 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 th...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.560897
312
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from numpy.testing import assert_allclose from astropy.coordinates import Angle from astropy.tests.helper import pytest, assert_quantity_allclose from ast...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 299,...
2.56044
819
# Generated by Django 2.2.16 on 2020-12-13 02:28 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1433, 319, 12131, 12, 1065, 12, 1485, 7816, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
### A module containing various utilities used at various points throughout the processes of submitting and analyzing problems ### import os import json import subprocess import hashlib import sys import random import string from .output_processor import process_output from . import code_templates def make_file(path,...
[ 21017, 317, 8265, 7268, 2972, 20081, 973, 379, 2972, 2173, 3690, 262, 7767, 286, 24353, 290, 22712, 2761, 44386, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 12234, 8019, 198, 11748, 25064, 198, 11748, 47...
2.469079
1,520
from __future__ import division from collections import OrderedDict from sqlalchemy import create_engine, MetaData, func from sqlalchemy.orm import sessionmaker, class_mapper from django.conf import settings from django.db.backends.base.creation import TEST_DATABASE_PREFIX from django.db import connection if settin...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 30277, 6601, 11, 25439, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 11, 1398,...
2.398057
7,102
from time import time from typing import * import torch from booster import Diagnostic from torch import Tensor from tqdm import tqdm from .utils import cosine, percentile, RunningMean, RunningVariance from ..estimators import GradientEstimator from ..models import TemplateModel def get_grads_from_tensor(model: Tem...
[ 6738, 640, 1330, 640, 198, 6738, 19720, 1330, 1635, 198, 198, 11748, 28034, 198, 6738, 30430, 1330, 31549, 15132, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 764, 26791, 1330, 861...
2.251931
4,402
if __name__ == '__main__': main()
[ 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.166667
18
# -*- coding: utf-8 -*- import re # from pyltp import Segmentor import jieba.posseg as pseg import jieba import os import sys import json import math # import kenlm import nltk from collections import Counter # dataSplit('TNewsSegafter2.txt', 32) dataSplit('TNewsSegafter1.txt', 32)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 2, 422, 12972, 2528, 79, 1330, 1001, 5154, 273, 198, 11748, 474, 494, 7012, 13, 1930, 325, 70, 355, 15838, 70, 198, 11748, 474, 494, 7012, 198, 11748,...
2.75
104
""" Practice problems, Python fundamentals 1 -- Solutions @authors: Balint Szoke, Daniel Csaba @date: 06/02/2017 """ #------------------------------------------------------- # 1) Solution good_string = "Sarah's code" #or good_string = """Sarah's code""" #------------------------------------------------------- ...
[ 37811, 198, 49515, 501, 2761, 11, 11361, 33099, 352, 1377, 23555, 198, 198, 31, 41617, 25, 8528, 600, 27974, 2088, 11, 7806, 327, 82, 15498, 198, 31, 4475, 25, 9130, 14, 2999, 14, 5539, 198, 37811, 198, 198, 2, 3880, 19351, 6329, 22...
3.133848
777
""" This is a python script that converts u(rho, T), P(rho, T), Cs(rho,T), S(rho, T) to T(rho, u), P(rho, u), Cs(rho, u), S(rho, u), which is more useful for SPH calculations """ import matplotlib.pyplot as plt from collections import OrderedDict import numpy as np import pandas as pd import csv import sys from scipy...
[ 37811, 198, 1212, 318, 257, 21015, 4226, 326, 26161, 334, 7, 81, 8873, 11, 309, 828, 350, 7, 81, 8873, 11, 309, 828, 327, 82, 7, 81, 8873, 11, 51, 828, 311, 7, 81, 8873, 11, 309, 8, 198, 1462, 309, 7, 81, 8873, 11, 334, 828,...
2.34402
2,433
from django.urls import path from . import views urlpatterns = [ path('post_posts', views.post_posts), path('fetch_posts', views.get_posts), path('fetch_post/<pk>', views.get_post), path('delete_post/<pk>', views.delete_post), path('edit_post/<pk>', views.edit_post), path('search_for_a_post', v...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 7353, 62, 24875, 3256, 5009, 13, 7353, 62, 24875, 828, 198, 220, 220, 220, 3108, 10786, ...
2.402778
144
import os
[ 11748, 28686, 628, 628, 628, 628, 198 ]
2.571429
7
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
from django.contrib import admin from django.urls import path, include from rest_framework_jwt.views import ( obtain_jwt_token, refresh_jwt_token, ) urlpatterns = [ path('admin/', admin.site.urls), path('token-auth/', obtain_jwt_token), path('token-refresh/', refresh_jwt_token), path('employ...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 198, 6738, 1334, 62, 30604, 62, 73, 46569, 13, 33571, 1330, 357, 198, 220, 220, 220, 7330, 62, 73, 46569, 62, 30001, 1...
2.618056
144
#General libs import sys import os import json from datetime import datetime import time #Data wrangling libs import pandas as pd import numpy as np #DB related libs from sqlalchemy import create_engine #ML models related libs from sklearn.pipeline import Pipeline, FeatureUnion from sklearn.metrics import confusion_...
[ 2, 12218, 9195, 82, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198, 198, 2, 6601, 1319, 27499, 9195, 82, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32...
2.402943
6,321
import struct MAX_UINT = 2 ** (struct.calcsize('I') * 8) - 1 MAX_ULONG = 2 ** (struct.calcsize('L') * 8) - 1 UINT8_T = 1 UINT32_T = 4 UINT64_T = 8
[ 11748, 2878, 198, 198, 22921, 62, 52, 12394, 796, 362, 12429, 357, 7249, 13, 9948, 6359, 1096, 10786, 40, 11537, 1635, 807, 8, 532, 352, 198, 22921, 62, 6239, 18494, 796, 362, 12429, 357, 7249, 13, 9948, 6359, 1096, 10786, 43, 11537, ...
2.055556
72
import pytest from django.contrib.auth.models import User from django.urls import reverse from selenium.webdriver.common.by import By from .base import AuthorBaseFunctionalTest
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 198, ...
3.509804
51
from .commons import VCFEntry, LabeledMat
[ 6738, 764, 9503, 684, 1330, 569, 22495, 30150, 11, 3498, 18449, 19044, 198 ]
3.230769
13
from simulation.common import Storage from simulation.common import BatteryEmptyError
[ 6738, 18640, 13, 11321, 1330, 20514, 198, 6738, 18640, 13, 11321, 1330, 23490, 40613, 12331, 628 ]
5.4375
16
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Oct 17 21:04:48 2018 @author: Alex Alves Programa para determinar se um tumor de mama benigno (saida 0) ou maligno (saida 1) """ import pandas as pa # Importao para poder dividir os dados entre treinamento da rede e testes de validao from sklearn....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2556, 1596, 2310, 25, 3023, 25, 2780, 2864, 198, 198, 31, 9800, 25, 4422, 978, 1158...
2.661808
1,029
# Solution of; # Project Euler Problem 736: Paths to Equality # https://projecteuler.net/problem=736 # # Define two functions on lattice points:$r(x,y) = (x+1,2y)$$s(x,y) = # (2x,y+1)$A path to equality of length $n$ for a pair $(a,b)$ is a sequence # $\Big((a_1,b_1),(a_2,b_2),\ldots,(a_n,b_n)\Big)$, where:$(a_1,b_1...
[ 2, 28186, 286, 26, 198, 2, 4935, 412, 18173, 20647, 767, 2623, 25, 10644, 82, 284, 31428, 198, 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 49150, 198, 2, 220, 198, 2, 2896, 500, 734, 5499, 319, 47240, 501, 2173, 25, ...
2.183486
545
#!/usr/bin/env python3 # https://codingcompetitions.withgoogle.com/codejam/round/000000000019fd27/0000000000209a9e t, b = map(int, input().split()) for _ in range(t): xs = [None] * b q, k, k1, k2 = 0, 0, None, None while True: if q > 0 and q % 10 == 0: if k1 is not None and k2 is not No...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 3740, 1378, 66, 7656, 5589, 316, 1756, 13, 4480, 13297, 13, 785, 14, 8189, 39159, 14, 744, 14, 8269, 405, 1129, 16344, 1983, 14, 8269, 405, 22567, 64, 24, 68, 198, 83, 11, ...
1.450054
931
import requests from Stephanie.configurer import config
[ 11748, 7007, 198, 6738, 26085, 13, 11250, 15051, 1330, 4566, 628 ]
5.181818
11
#!/usr/bin/env python # Copyright 2020 Biomedical Imaging Group Rotterdam, Departments of # Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 12131, 8436, 35914, 48656, 4912, 18481, 353, 11043, 11, 2129, 32514, 286, 198, 2, 8366, 554, 18982, 873, 290, 5325, 12371, 11, 5256, 8597, 385, 13122, 11, 18481, 353, 11...
2.149943
11,411
import os import sys from setuptools import setup, find_packages ROOT = os.path.realpath(os.path.join(os.path.dirname( sys.modules['__main__'].__file__))) sys.path.insert(0, os.path.join(ROOT, 'src')) setup( name='pgworker', packages=find_packages('src'), package_dir={'': 'src'}, classifiers=[ ...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 13252, 2394, 796, 28686, 13, 6978, 13, 5305, 6978, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 198...
2.407285
302
import os import csv path = '/Users/kevinkosumi12345/Genti/python-challenge/PyBank/Resources/budget_data.csv' budget_csv=os.path.join("../Resources", "budget_data.csv") csvfile = open(path, newline="") reader=csv.reader(csvfile, delimiter=",") header = next(reader) # print(header) # the columns we have to convert ...
[ 11748, 28686, 198, 11748, 269, 21370, 628, 198, 198, 6978, 796, 31051, 14490, 14, 365, 85, 676, 418, 12994, 10163, 2231, 14, 38, 298, 72, 14, 29412, 12, 36747, 3540, 14, 20519, 28650, 14, 33236, 14, 37315, 62, 7890, 13, 40664, 6, 19...
2.813793
725
import numpy as np import matplotlib.pyplot as plt T = 30000 # v = 0.02906 # v = 0.617085 v = 0.99 h = 0.01 a = 0.5 b = 0.5 epsilon = 0.05 c = 0.4 eta = lambda rho: np.exp(-(rho)**2/(2*c**2)) nrho = lambda rho, v: -2.0*(rho**3 + (rho-1.0)*v/2.0 - rho)/(rho + 1.0) nu = lambda rho: (b - eta(rho+1))/a u = np.zeros(T) ...
[ 11748, 299, 32152, 355, 45941, 220, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 198, 51, 796, 513, 2388, 198, 2, 410, 796, 657, 13, 48891, 3312, 198, 2, 410, 796, 657, 13, 47941, 2919, 20, 198, 85,...
1.712994
885
import numpy as np import os my_array = np.zeros(10) print(my_array) os.system('pip freeze > requirements.txt') my_list = [1,2,3,4,5] for item in my_list: print(item)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 628, 198, 1820, 62, 18747, 796, 45941, 13, 9107, 418, 7, 940, 8, 198, 4798, 7, 1820, 62, 18747, 8, 198, 198, 418, 13, 10057, 10786, 79, 541, 16611, 1875, 5359, 13, 14116, 11537, 198,...
2.285714
77
#! /usr/bin/python3 import argparse import os import re import sqlite3 as sql import sys import xml.etree.cElementTree as et import traceback import lib.initialize as initialize import lib.sqlite_interface as misc import lib.meta as meta # ================== # EXPORTED FUNCTIONS # ==================
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 44161, 578, 18, 355, 44161, 198, 11748, 25064, 198, 11748, 35555, 13, 316, 631, 13, 66, 20180, 27660, 355, 2123,...
3.4
90
from matplotlib.pyplot import get import pyhips from pyhips import get_image def test_get_image(): """ Tests the get_image() function to make sure no errors are thrown. """ assert get_image("Vega", frame="ICRS", survey="DSS", cmap="plasma") == 0 assert get_image("notanid", frame="ICRS", survey="D...
[ 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 651, 198, 11748, 12972, 5748, 198, 6738, 12972, 5748, 1330, 651, 62, 9060, 628, 198, 4299, 1332, 62, 1136, 62, 9060, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30307, 262, 651...
2.669421
242
""" Template module for cumulus. template class for reading yaml tempalte and creating data_source objects to retrieve external data. """
[ 37811, 198, 30800, 8265, 329, 10973, 23515, 13, 198, 28243, 1398, 329, 3555, 331, 43695, 2169, 18596, 660, 290, 4441, 1366, 62, 10459, 5563, 284, 198, 1186, 30227, 7097, 1366, 13, 198, 37811, 198 ]
4.058824
34
# Bubble sort steps through the list and compares adjacent pairs of elements. The elements are swapped if they are in the wrong order. The pass through the unsorted portion of the list is repeated until the list is sorted. Because Bubble sort repeatedly passes through the unsorted part of the list, it has a worst case...
[ 2, 220, 33691, 3297, 4831, 832, 262, 1351, 290, 23008, 15909, 14729, 286, 4847, 13, 383, 4847, 389, 37245, 611, 484, 389, 287, 262, 2642, 1502, 13, 383, 1208, 832, 262, 5576, 9741, 6903, 286, 262, 1351, 318, 5100, 1566, 262, 1351, 3...
4.802817
71
if __name__ == '__main__': minion_game(input("Enter a string: "))
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 28365, 62, 6057, 7, 15414, 7203, 17469, 257, 4731, 25, 366, 4008, 198 ]
2.535714
28
# -*- coding: utf-8 -*- import numpy as np X = np.random.rand(2) #input W = np.random.rand(2,3) #weight B = np.random.rand(3) #bias print(X) print(W) print(B) Y=np.dot(X,W)+B print(Y)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 628, 198, 55, 796, 45941, 13, 25120, 13, 25192, 7, 17, 8, 1303, 15414, 198, 54, 796, 45941, 13, 25120, 13, 25192, 7, 17, 11, 18, 8, ...
1.928571
98
from pytest_bdd import given, when, then from model.contact import Contact import random
[ 6738, 12972, 9288, 62, 65, 1860, 1330, 1813, 11, 618, 11, 788, 198, 6738, 2746, 13, 32057, 1330, 14039, 198, 11748, 4738 ]
4
22
#!/usr/bin/env python """ Figures generated by HiST program intended for use with in/ files including: *_flame.ini *_impulse.ini *_trans.ini Flaming Aurora 2 cameras: ./FigureMaker.py in/2cam_flame.ini Translating Aurora 2 cameras: ./FigureMaker.py in/2cam_trans.ini Impulse Aurora (for testing): ./FigureMaker.py in...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 14989, 942, 7560, 416, 15902, 2257, 1430, 198, 198, 600, 1631, 329, 779, 351, 287, 14, 3696, 1390, 25, 198, 9, 62, 49621, 13, 5362, 198, 9, 62, 11011, 9615, 13, 5362, 1...
2.736655
281
from django.db import models # Create your models here. from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin, ) from django.core.validators import RegexValidator from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 357, 198, 220, 220, 220, 27741, 14881, 12982, 11, 198, 220, 220, 220, 7308, 12982, ...
3.1
80
"""Component to control v6m relays and sensors. For more details about this component, please refer to the documentation at https://home-assistant.io/components/v6m/ """ import logging import voluptuous as vol from homeassistant.const import ( EVENT_HOMEASSISTANT_STOP, CONF_HOST, CONF_PORT, CONF_NAME) import homea...
[ 37811, 21950, 284, 1630, 410, 21, 76, 823, 592, 290, 15736, 13, 198, 198, 1890, 517, 3307, 546, 428, 7515, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, 952, 14, 5589, 3906, 14, 85, 21, 76, 14, ...
2.473934
422
import uuid from django.db import models from django.db.models.fields import TextField
[ 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 25747, 1330, 8255, 15878, 628, 220, 220, 220, 220, 198 ]
3.032258
31
""" References: https://github.com/scaelles/OSVOS-TensorFlow """ from __future__ import print_function import os import random import tensorflow as tf import time import numpy as np from utils import models from utils.load_data_finetune import Dataset from utils.logger import create_logger # seed seed = random.randin...
[ 37811, 198, 19927, 25, 3740, 1378, 12567, 13, 785, 14, 1416, 64, 695, 274, 14, 2640, 53, 2640, 12, 51, 22854, 37535, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 1119...
2.558187
971
from dataclasses import field, dataclass from typing import List from kinopoisk_unofficial.contract.response import Response from kinopoisk_unofficial.model.season import Season
[ 6738, 4818, 330, 28958, 1330, 2214, 11, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 18967, 404, 78, 1984, 62, 403, 16841, 13, 28484, 13, 26209, 1330, 18261, 198, 6738, 18967, 404, 78, 1984, 62, 403, 16841, 13, 1984...
3.829787
47
import subprocess import os import shutil import tempfile import random import string import yaml src_dir=os.path.dirname(os.path.realpath(__file__)) #def _write_text_file(fname,txt): # with open(fname,'w') as f: # f.write(txt)
[ 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 331, 43695, 198, 198, 10677, 62, 15908, 28, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 53...
2.5
96
#! /usr/bin/env python3 # coding=utf-8 # Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. # Copyright 2021 The MLPerf 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...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 33448, 15127, 23929, 44680, 6234, 13, 1439, 2489, 10395, 13, 198, 2, 15069, 33448, 383, 10373, 5990, 69, 46665, 13, 14...
3.017941
1,282
import binaryRepr # Create decorator function to see how many times functions are called # Calculate Partition (C_k, r(U)) - the partitions # of each candidate at level k are calculated # Takes in data frame of relation and a candidate in C_km1 # Outputs partition of Candidate in C_k...
[ 11748, 13934, 6207, 81, 198, 198, 2, 13610, 11705, 1352, 2163, 284, 766, 703, 867, 1661, 5499, 389, 1444, 198, 198, 2, 27131, 378, 2142, 653, 357, 34, 62, 74, 11, 374, 7, 52, 4008, 532, 262, 43869, 198, 2, 220, 220, 220, 220, 22...
2.317431
1,090
import os import numpy as np import pandas as pd import experiments.benchmarks.benchmark as benchmark ActivityBenchmark()
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 10256, 13, 26968, 14306, 13, 26968, 4102, 355, 18335, 628, 198, 198, 16516, 44199, 4102, 3419, 198 ]
3.527778
36
import xml.etree.ElementTree as et from dateutil import parser from django.shortcuts import render from django.shortcuts import redirect from django.core.urlresolvers import reverse import untangle from .forms import MenuplanSearchForm from .forms import MenuplanCreateForm from .tables import MenuplanTable from ....
[ 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 2123, 198, 198, 6738, 3128, 22602, 1330, 30751, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208...
3.615385
130
from contextlib import closing from io import StringIO import numpy import pandas from airflow.providers.postgres.hooks.postgres import PostgresHook from psycopg2.extensions import connection as psycopg2_connection from data_detective_airflow.dag_generator.works import WorkType from data_detective_airflow.operators.s...
[ 6738, 4732, 8019, 1330, 9605, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 299, 32152, 198, 11748, 19798, 292, 198, 6738, 45771, 13, 15234, 4157, 13, 7353, 34239, 13, 25480, 82, 13, 7353, 34239, 1330, 2947, 34239, 39, 566, 198,...
3.298246
114
"""Plangym API implementation.""" from abc import ABC from typing import Any, Callable, Dict, Generator, Iterable, Optional, Tuple, Union import gym from gym.envs.registration import registry as gym_registry from gym.spaces import Space import numpy import numpy as np wrap_callable = Union[Callable[[], gym.Wrapper],...
[ 37811, 3646, 648, 4948, 7824, 7822, 526, 15931, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 4377, 11, 4889, 540, 11, 360, 713, 11, 35986, 11, 40806, 540, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 11550, 198, ...
2.340045
10,728
# Layer 2 server script # project worker '''-. +#_p'-..... *+...:(loop):.............................................. m}: \ >!: 1. register clients \ &w^: 2. distribute WLs and add them to pending \ j/...
[ 2, 34398, 362, 4382, 4226, 201, 198, 2, 1628, 8383, 201, 198, 201, 198, 201, 198, 7061, 29001, 13, 201, 198, 10, 2, 62, 79, 29001, 12359, 201, 198, 9, 10, 986, 37498, 26268, 2599, 8864, 2109, 16317, 201, 198, 76, 38362, 220, 220, ...
1.927326
1,032
import factory from spaceone.core import utils from spaceone.statistics.model.schedule_model import Schedule, Scheduled, JoinQuery, Formula, QueryOption
[ 11748, 8860, 198, 198, 6738, 2272, 505, 13, 7295, 1330, 3384, 4487, 198, 6738, 2272, 505, 13, 14269, 3969, 13, 19849, 13, 15952, 5950, 62, 19849, 1330, 19281, 11, 27774, 6309, 11, 15251, 20746, 11, 19639, 11, 43301, 19722, 628, 628, 6...
3.785714
42
from datetime import datetime from sqlalchemy import Boolean, Column, DateTime, Integer, SmallInteger, String from app.config import settings from app.db.base_class import Base from app.models.task import Task # noqa
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29201, 11, 7536, 7575, 11, 34142, 11, 10452, 46541, 11, 10903, 198, 198, 6738, 598, 13, 11250, 1330, 6460, 198, 6738, 598, 13, 9945, 13, 8692, 62,...
3.745763
59
import uuid, hashlib, os, yaml, logging.config, json, requests, re from bcrypt import hashpw, gensalt from collections import namedtuple from sqlalchemy import create_engine from datetime import datetime CONFIG_FILE = os.environ.get('CONFIG_PATH_FILE') ZimbraGrant = namedtuple( 'ZimbraGrant', [ 'target_name', ...
[ 11748, 334, 27112, 11, 12234, 8019, 11, 28686, 11, 331, 43695, 11, 18931, 13, 11250, 11, 33918, 11, 7007, 11, 302, 198, 6738, 275, 29609, 1330, 12234, 79, 86, 11, 308, 641, 2501, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 4...
2.531429
175
import struct from typing import BinaryIO def write(self, file: BinaryIO, val): raise NotImplementedError # pragma: no cover class CMarkedType(CFixedType): """ Overview: Type with struct mark, which can be directly read by ``struct`` module. """ def __init__(self, mark: str, ...
[ 11748, 2878, 198, 6738, 19720, 1330, 45755, 9399, 628, 628, 198, 220, 220, 220, 825, 3551, 7, 944, 11, 2393, 25, 45755, 9399, 11, 1188, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 5298, 1892, 3546, 1154, 12061, 12331, 220, 1303, 2...
2.389362
470
# Mendel's First Law # http://rosalind.info/problems/iprb/ import sys import unittest if __name__ == '__main__': hom_dom = int(sys.argv[1]) het = int(sys.argv[2]) hom_rec = int(sys.argv[3]) if hom_dom == 0 or het == 0 or hom_rec == 0: raise Exception("ERROR: Incorrect parameters") result = iprb().main(hom_dom, ...
[ 2, 20442, 417, 338, 3274, 3854, 198, 2, 2638, 1378, 4951, 282, 521, 13, 10951, 14, 1676, 22143, 14, 541, 26145, 14, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 19...
2.433566
143
#MAIN method and graphics try: from OpenGL.GL import * from OpenGL import GLU import OpenGL.GL.shaders except: print("OpenGL wrapper for python not found") import glfw import numpy as np from computation import Computation if __name__ == "__main__": #A good configuration: 80x80 balls, s...
[ 2, 5673, 1268, 2446, 290, 9382, 201, 198, 28311, 25, 201, 198, 220, 220, 220, 422, 30672, 13, 8763, 1330, 1635, 201, 198, 220, 220, 220, 422, 30672, 1330, 10188, 52, 201, 198, 220, 220, 220, 1330, 30672, 13, 8763, 13, 1477, 9972, ...
2.607759
232
#!/usr/bin/env python from itertools import chain from pathlib import Path from typing import List INPUT_FILE = Path.cwd().parent / "inputs" / "day06.txt" AnswerGroup = List[str] if __name__ == "__main__": with INPUT_FILE.open("r") as f: input = transform_input(f.read()) print(f"Part 1: {part1(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 198, 198, 1268, 30076, 62, 25664, 796, 10644, 13, 66, 16993, 22446, 8000, 1220, ...
2.496599
147
from symopt.base import SymOptExpr import sympy as sym
[ 6738, 5659, 8738, 13, 8692, 1330, 15845, 27871, 3109, 1050, 198, 11748, 10558, 88, 355, 5659, 628 ]
3.294118
17
import json import glob from tqdm import tqdm import os contract_dir = 'contract_data' cfiles = glob.glob(contract_dir+'/contract*.json') cjson = {} print "Loading contracts..." for cfile in tqdm(cfiles): cjson.update(json.loads(open(cfile).read())) results = {} missed = [] print "Running analysis..." for c in...
[ 11748, 33918, 198, 11748, 15095, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28686, 198, 198, 28484, 62, 15908, 796, 705, 28484, 62, 7890, 6, 220, 198, 198, 12993, 2915, 796, 15095, 13, 4743, 672, 7, 28484, 62, 15908,...
2.432177
317
#! /usr/bin/python # -*- coding: utf-8 -*- import pytest import numpy as np from textory.util import neighbour_diff_squared, num_neighbours, neighbour_count, create_kernel from textory.statistics import variogram, pseudo_cross_variogram def test_variogram(init_np_arrays): """THIS TEST ONLY COVERS THE VERSION WIT...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2420, 652, 13, 22602, 1330, 12250, 62, 26069, 62, ...
2.081443
970
# -*- coding: utf-8 -*- # @Author : LG """ 152 ms, Python3 96.83% 14 MB, Python3 12.45% """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 220, 1058, 17370, 198, 198, 37811, 198, 17827, 13845, 11, 220, 11361, 18, 9907, 13, 5999, 4, 220, 198, 1415, 10771, 11, 220, 11361, 18, 1105, 13, 2231,...
1.890909
55
#Leia o sexo de uma pessoa, s aceite as letras M ou F; Caso contrario, pea a digitao novamente sexo= str(input('Digite seu sexo [M/F]: ')).strip().upper()[0] while sexo not in 'MF': sexo=str(input('DIGITE O SEXO [M/F]: ')).strip().upper()[0] print('seu sexo {} e est registrado com sucesso!'.format(sexo))
[ 2, 3123, 544, 267, 1714, 78, 390, 334, 2611, 279, 408, 12162, 11, 264, 31506, 578, 355, 1309, 8847, 337, 267, 84, 376, 26, 11294, 78, 3445, 4982, 11, 613, 64, 257, 3100, 5350, 78, 645, 85, 3263, 68, 198, 198, 8044, 78, 28, 965, ...
2.301471
136
from nonebot.adapters.onebot.v11.event import MessageEvent from nonebot.typing import T_State from nonebot.adapters.onebot.v11 import Bot, Message from plugins.uma.plugins.uma_whois.data_source import UmaWhois from plugins.uma import chara #matcher =on_endswith({'','?',''},priority=5) matcher =UmaWhois().on_regex(r'^(...
[ 6738, 4844, 13645, 13, 324, 12126, 13, 505, 13645, 13, 85, 1157, 13, 15596, 1330, 16000, 9237, 198, 6738, 4844, 13645, 13, 774, 13886, 1330, 309, 62, 9012, 198, 6738, 4844, 13645, 13, 324, 12126, 13, 505, 13645, 13, 85, 1157, 1330, ...
2.573964
169
from django.http import HttpResponse from pyspark.sql import SparkSession from django.shortcuts import render from datetime import datetime from core.chartfactory import createBarChart, createPieChart from core.dataprocessor import DataProcessor def sample(request): """ sample python report """ keys =...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 17732, 36044, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 4755, 13, ...
2.536667
300
from mxnet import nd import os import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..'))) import utils.common as dataset_commons import cv2 import numpy as np import glob import pandas as pd from gluoncv.data.transforms.presets.ssd import SSDDefaultTrainTransform from matplotlib import...
[ 6738, 285, 87, 3262, 1330, 299, 67, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 11593, 7753, 834, ...
2.541284
545
# coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six def to_str(self): ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 14563, 43476, 8324, 7824, 569, 17, 628, 220, 220, 220, 14563, 43476, 30617, 7824, 10628, 362, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946, 1761...
2.52381
336
np_pressures_hPa * math.exp(-gravit_acc * molar_mass_earth* height/(gas_constant*standard_temperature))
[ 37659, 62, 8439, 942, 62, 71, 28875, 1635, 10688, 13, 11201, 32590, 70, 4108, 270, 62, 4134, 1635, 285, 6192, 62, 22208, 62, 16442, 9, 6001, 29006, 22649, 62, 9979, 415, 9, 20307, 62, 11498, 21069, 4008 ]
2.783784
37
from pytest import mark # if setup.py present, code could be installed as library # so that there's no need include path # pip install -e . from pytest_resources import do_lower_case # from src.for_testing import do_lower_case
[ 6738, 12972, 9288, 1330, 1317, 198, 198, 2, 611, 9058, 13, 9078, 1944, 11, 2438, 714, 307, 6589, 355, 5888, 198, 2, 523, 326, 612, 338, 645, 761, 2291, 3108, 198, 2, 7347, 2721, 532, 68, 764, 198, 6738, 12972, 9288, 62, 37540, 133...
3.578125
64
import re import os # copy required files # change actions.c to add flow_radar lock # change p4_pd_rpc_server.ipp if __name__ == "__main__": copy_files() change_actions_c() change_p4_pd_rpc_server_ipp() change_p4_pd_rpc_thrift()
[ 11748, 302, 198, 11748, 28686, 198, 198, 2, 4866, 2672, 3696, 198, 198, 2, 1487, 4028, 13, 66, 284, 751, 5202, 62, 6335, 283, 5793, 198, 198, 2, 1487, 279, 19, 62, 30094, 62, 81, 14751, 62, 15388, 13, 3974, 198, 198, 361, 11593, ...
2.418367
98
#!/usr/bin/python3 # -*- coding: utf-8 -*- # calculation tool for a bridge circuit with two input current sources # two current sources can supply from both of top of the bridge and middle of the bridge # define the voltage name as follows: # Vp: voltage at the top of the bridge # Vn: voltage at the middle of the brid...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17952, 2891, 329, 257, 7696, 10349, 351, 734, 5128, 1459, 4237, 198, 2, 734, 1459, 4237, 460, 5127, 422, 1111, ...
3.392523
107
#Program to check whether the number is an armstrong number or not #Ask user to enter the number number=int(input("Enter the number you want to check armstrong: ")) #To calculate the length of number entered. order=len(str(number)) #Initialise sum to 0 sum=0 temp=number while temp>0: num=temp%10 sum+=num**o...
[ 2, 15167, 284, 2198, 1771, 262, 1271, 318, 281, 3211, 11576, 1271, 393, 407, 198, 2, 25214, 2836, 284, 3802, 262, 1271, 198, 17618, 28, 600, 7, 15414, 7203, 17469, 262, 1271, 345, 765, 284, 2198, 3211, 11576, 25, 220, 366, 4008, 198...
3.21875
192
from pyexlatex.models.sizes.textwidth import TextWidth from pyexlatex.models.format.rule import Rule
[ 6738, 12972, 1069, 17660, 87, 13, 27530, 13, 82, 4340, 13, 5239, 10394, 1330, 8255, 30916, 198, 6738, 12972, 1069, 17660, 87, 13, 27530, 13, 18982, 13, 25135, 1330, 14330, 628 ]
3.290323
31
from math import sqrt import asks import datetime import numpy as np import random from PIL import Image from PIL.ImageDraw import Draw from PIL.ImageEnhance import Brightness from PIL.ImageFont import truetype from curio import spawn_thread from curious.commands import Context, Plugin, command from io import BytesIO ...
[ 6738, 10688, 1330, 19862, 17034, 198, 198, 11748, 7893, 198, 11748, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 350, 4146, 13, 5159, 25302, 1330, 15315, 198, 6738, 350, ...
3.284672
137
import logging from maskgen import video_tools import random import maskgen.video_tools import os import maskgen import json plugin = "DonorPicker"
[ 11748, 18931, 198, 6738, 9335, 5235, 1330, 2008, 62, 31391, 198, 11748, 4738, 198, 11748, 9335, 5235, 13, 15588, 62, 31391, 198, 11748, 28686, 198, 11748, 9335, 5235, 198, 11748, 33918, 198, 198, 33803, 796, 366, 3987, 273, 47, 15799, 1...
3.609756
41
import caffe import numpy as np import os import sys import track_model_train as track_model import train_config max_iter = 1000 if __name__ == '__main__': config = train_config.Config() eval_avg_scores(config)
[ 11748, 21121, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 2610, 62, 19849, 62, 27432, 355, 2610, 62, 19849, 198, 11748, 4512, 62, 11250, 198, 198, 9806, 62, 2676, 796, 8576, 198, 361, 11593...
2.907895
76
# # Copyright (C) 2014 Conjur Inc # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distri...
[ 2, 198, 2, 15069, 357, 34, 8, 1946, 37587, 333, 3457, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 198, 2, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, ...
3.701538
325
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: D:\dev\TS4\_deploy\Client\Releasex64\Python\Generated\protocolbuffers\Social_pb2.py # Compiled at: 2020-12-13 14:24:09 # Size of sourc...
[ 2, 34318, 2349, 21, 2196, 513, 13, 22, 13, 19, 198, 2, 11361, 18022, 8189, 513, 13, 22, 357, 2091, 5824, 8, 198, 2, 4280, 3361, 3902, 422, 25, 11361, 513, 13, 22, 13, 24, 357, 31499, 14, 85, 18, 13, 22, 13, 24, 25, 1485, 66,...
2.38918
39,316
__all__ = ["NumpyUtility"] from .NumpyUtility import *
[ 834, 439, 834, 796, 14631, 45, 32152, 18274, 879, 8973, 198, 198, 6738, 764, 45, 32152, 18274, 879, 1330, 1635, 198 ]
2.666667
21
import sweetviz import pandas as pd if __name__ == '__main__': df = pd.read_csv("BankChurners_clean.csv") report = sweetviz.analyze(df, "Attrition_Flag") report.show_html()
[ 11748, 6029, 85, 528, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 361, 11593, 3672, 834, 220, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 47764, 796, 279, 67, 13, 961, 62, 40664, 7203, 28650, 1925, 700, 364, 62, 27773...
2.410256
78
from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.handlers import FTPHandler from multiprocessing import Process from pyftpdlib import servers from time import sleep from requests import get import socket import psutil import win32api # Al0nnso - 2019 # FTP Reverse Shell # NOT TESTED WITH EXTERN NETWOR...
[ 6738, 12972, 701, 30094, 8019, 13, 9800, 11341, 1330, 360, 13513, 13838, 7509, 198, 6738, 12972, 701, 30094, 8019, 13, 4993, 8116, 1330, 45854, 25060, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 6738, 12972, 701, 30094, 8019, 1330,...
2.827586
203
#!/usr/bin/env python3 # coding: utf-8 import os import pytest from deep_reference_parser.io.io import ( read_jsonl, write_jsonl, load_tsv, write_tsv, _split_list_by_linebreaks, _unpack, ) from deep_reference_parser.reference_utils import yield_token_label_pairs from .common import TEST_JSON...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2769, 62, 35790, 62, 48610, 13, 952, 13, 952, 1330, 357, 198, 220, 220, 22...
1.644327
1,895
import json import responses
[ 11748, 33918, 198, 198, 11748, 9109, 628 ]
4.428571
7
# ___________________________________________________________________________ # # 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.51663
1,353
from django.contrib import admin from inbound.models import Rule, InboundIP # Register your models here. admin.site.register(Rule, RuleAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 287, 7784, 13, 27530, 1330, 14330, 11, 554, 7784, 4061, 198, 198, 2, 17296, 534, 4981, 994, 13, 628, 628, 198, 28482, 13, 15654, 13, 30238, 7, 31929, 11, 14330, 46787, 8, 19...
3.418605
43
from django import forms
[ 6738, 42625, 14208, 1330, 5107, 198 ]
4.166667
6
from collections import Counter if __name__ == '__main__': #print(solution("FRANCE", "french")) print(solution("E=M*C^2", "e=m*c^2"))
[ 6738, 17268, 1330, 15034, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 4798, 7, 82, 2122, 7203, 10913, 19240, 1600, 366, 69, 3532, 48774, 198, 220, 220, 220, 3601, 7, 82, 2122, 7203, ...
2.423729
59
#!/bin/env python # Copyright STIFTELSEN SINTEF 2016 import suds import urllib2 import sys if len(sys.argv) < 4: print ("Usage:") print ("\t %s gss-url outputfilename token" % sys.argv[0]) exit() # get url: url = sys.argv[1] outputfileName = sys.argv[2] sessionToken = sys.argv[3] wsdlLocation = "https:...
[ 2, 48443, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 3563, 32297, 37142, 1677, 311, 1268, 9328, 37, 1584, 198, 198, 11748, 424, 9310, 198, 11748, 2956, 297, 571, 17, 198, 11748, 25064, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 127...
2.543568
482
#!/usr/bin/python3 from requests import Request, Session from requests.exceptions import ReadTimeout import urllib3, requests, collections, http.client, optparse, sys, os print("""\033[1;36m _____ _ |__ /_ __ ___ _ _ __ _ __ _| | ___ _ __ / /| '_ ` _ \| | | |/ _` |/ ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 7007, 1330, 19390, 11, 23575, 198, 6738, 7007, 13, 1069, 11755, 1330, 4149, 48031, 198, 11748, 2956, 297, 571, 18, 11, 7007, 11, 17268, 11, 2638, 13, 16366, 11, 2172, 29572, 11, 2...
1.837838
518
#coding: utf-8 #import cl_to_xi_full from __future__ import print_function from builtins import range import numpy as np from cosmosis.datablock import option_section, names as section_names from cl_to_xi import save_xi_00_02, save_xi_22, arcmin_to_radians, SpectrumInterp from legendre import get_legfactors_00, get_leg...
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 2, 11748, 537, 62, 1462, 62, 29992, 62, 12853, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 3170, 1040, 1330, 2837, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 8615, 76, ...
2.876033
121
""" The ``video`` taxon groups applets implementing video interfaces, that is, interfaces for periodic transfers of 2d arrays of samples of electromagnetic wave properties. Examples: VGA output, TFT LCD capture, TFT LCD output. Counterexamples: SCSI scanner (use taxon ``photo``), SPI LCD output (use taxon ``display``)...
[ 37811, 198, 464, 7559, 15588, 15506, 1687, 261, 2628, 598, 5289, 15427, 2008, 20314, 11, 326, 318, 11, 20314, 329, 27458, 198, 7645, 69, 364, 286, 362, 67, 26515, 286, 8405, 286, 31094, 6769, 6608, 13, 198, 198, 27730, 25, 569, 9273, ...
3.835294
85
""" The vasprun.xml parser interface. --------------------------------- Contains the parsing interfaces to ``parsevasp`` used to parse ``vasprun.xml`` content. """ # pylint: disable=abstract-method, too-many-public-methods import numpy as np from parsevasp.vasprun import Xml from parsevasp import constants as parseva...
[ 37811, 198, 464, 34439, 1050, 403, 13, 19875, 30751, 7071, 13, 198, 198, 3880, 12, 198, 4264, 1299, 262, 32096, 20314, 284, 7559, 29572, 85, 5126, 15506, 973, 284, 21136, 7559, 11017, 1050, 403, 13, 19875, 15506, 2695, 13, 198, 37811, ...
2.787952
415
from django.contrib import admin from .models import Produto, TipoProduto, Estoque # Register your models here. admin.site.register(TipoProduto, TipoProdutoAdmin) admin.site.register(Estoque, EstoqueAdmin) admin.site.register(Produto, ProdutoAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 1041, 67, 9390, 11, 23095, 78, 2964, 67, 9390, 11, 10062, 78, 4188, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 28434, 78,...
2.852273
88
import gd, itertools from cube import calculate_cube from ball import calculate_ball from helpers import average client = gd.Client() modes = {gd.PortalType.CUBE: calculate_cube, gd.PortalType.SHIP: calculate_ship, gd.PortalType.BALL: calculate_ball, gd.PortalType.BALL: calculate_ufo, ...
[ 11748, 308, 67, 11, 340, 861, 10141, 198, 6738, 23441, 1330, 15284, 62, 40296, 198, 6738, 2613, 1330, 15284, 62, 1894, 198, 6738, 49385, 1330, 2811, 198, 198, 16366, 796, 308, 67, 13, 11792, 3419, 198, 198, 76, 4147, 796, 1391, 21287,...
2.112676
426
from collections import defaultdict c=defaultdict(set) f=lambda:[int(i) for i in input().split()] a,b=f() s,e=f() for i in range(s,e+1): x=i%a==0 y=i%b==0 if x and y: c[3].add(i) elif x and not y: c[1].add(i) elif y and not x: c[2].add(i) else: c[4].add(i) o=[] for i in range(1,5): o.append(str(len(c[i])...
[ 6738, 17268, 1330, 4277, 11600, 198, 66, 28, 12286, 11600, 7, 2617, 8, 198, 69, 28, 50033, 33250, 600, 7, 72, 8, 329, 1312, 287, 5128, 22446, 35312, 3419, 60, 198, 64, 11, 65, 28, 69, 3419, 198, 82, 11, 68, 28, 69, 3419, 198, ...
1.971098
173
"""Module with useful exceptions for Parser."""
[ 37811, 26796, 351, 4465, 13269, 329, 23042, 263, 526, 15931, 628, 628, 198 ]
4
13
import json import next.utils as utils from next.apps.AppDashboard import AppDashboard
[ 11748, 33918, 198, 11748, 1306, 13, 26791, 355, 3384, 4487, 198, 6738, 1306, 13, 18211, 13, 4677, 43041, 3526, 1330, 2034, 43041, 3526, 628, 198 ]
3.56
25
import os import compas from compas.datastructures import Mesh HERE = os.path.dirname(__file__) DATA = os.path.join(HERE, 'data') FILE = os.path.join(DATA, 'faces.obj') mesh = Mesh.from_obj(FILE) print(mesh.summary())
[ 11748, 28686, 198, 11748, 552, 292, 198, 6738, 552, 292, 13, 19608, 459, 1356, 942, 1330, 47529, 198, 198, 39, 9338, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 26947, 796, 28686, 13, 6978, 13, 22179, 7, 39, ...
2.54023
87
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merg...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 13130, 360, 26236, 40, 402, 2022, 39, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 4866, 286, ...
3.832817
323