content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import logging import cloudinary from django.conf import settings L = logging.getLogger(__name__) try: cloudinary.config( cloud_name=settings.CLOUDINARY_NAME, api_key=settings.CLOUDINARY_API_KEY, api_secret=settings.CLOUDINARY_API_SECRET ) except AttributeError: L.warning('Cloudin...
[ 11748, 18931, 198, 198, 11748, 6279, 3219, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 43, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 28311, 25, 198, 220, 220, 220, 6279, 3219, 13, 11250, 7, 198...
2.691781
146
import setuptools setuptools.setup( name="inferactively", version="0.0.1", description=( "A Python implementation of active inference for Markov Decision Processes" ), license="Apache 2.0", url="https://github.com/alec-tschantz/infer-actively", packages=[ "inferactively", ...
[ 11748, 900, 37623, 10141, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 259, 2232, 33329, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13, 16, 1600, 198, 220, 220, 220, 6764, 16193, 198, 220, 220, ...
2.367876
193
# Generated by Django 3.2.8 on 2021-10-17 16:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33448, 12, 940, 12, 1558, 1467, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.017857
56
#!/usr/bin/python from Tools.datetimetool import DateTimeTool import logging from DbAccess import DBHelper SOCKET_TIMEOUT = 1
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 6738, 20003, 13, 19608, 316, 38813, 970, 1330, 7536, 7575, 25391, 198, 11748, 18931, 198, 6738, 360, 65, 15457, 1330, 20137, 47429, 198, 198, 50, 11290, 2767, 62, 34694, 12425, 796, 352, ...
3.023256
43
from numpy import arange, pi, sin from bokeh.models.annotations.labels import Label from bokeh.plotting import figure, show x = arange(-2*pi, 2*pi, 0.1) y = sin(x) p = figure(height=250, title=r"\[\sin(x)\text{ for }x\text{ between }-2\pi\text{ and }2\pi\]") p.circle(x, y, alpha=0.6, size=7) label = Label( text...
[ 6738, 299, 32152, 1330, 610, 858, 11, 31028, 11, 7813, 198, 198, 6738, 1489, 365, 71, 13, 27530, 13, 34574, 602, 13, 23912, 1424, 1330, 36052, 198, 6738, 1489, 365, 71, 13, 29487, 889, 1330, 3785, 11, 905, 198, 198, 87, 796, 610, ...
2.109705
237
import json import logging import swapper from django.shortcuts import get_object_or_404 from django.utils.decorators import method_decorator from django.views import View from django.views.decorators.csrf import csrf_exempt from .processor import PaymentProcessor logger = logging.getLogger(__name__) @method_deco...
[ 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 1509, 11463, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 13...
3.178808
151
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2008 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> # Copyright (c) 2008 Center for Bioinformatics, University of Hamburg # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 3648, 23771, 11693, 15215, 65, 747, 1279, 5714, 65, 747, 31, 14969, 71, 13, 35657, 12, 2763,...
3.265896
346
from bs4 import BeautifulSoup as bs import requests, json, pprint, pandas, csv, time import psutil, asyncio, aiohttp start_time = time.time() headers = { # First line of defense 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow-Headers': 'Conten...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 355, 275, 82, 201, 198, 11748, 7007, 11, 33918, 11, 279, 4798, 11, 19798, 292, 11, 269, 21370, 11, 640, 201, 198, 11748, 26692, 22602, 11, 30351, 952, 11, 257, 952, 4023, 201, 198, 201, 1...
2.60241
747
import pandas as pd from ._datasets import * __all__ = [ "load_alicante_murcia", "load_barcelona", "load_madrid", "load_valencia" "load_argentina", "load_burma", "load_china", "load_canada", "load_djibouti", "load_egypt", "load_ireland", "load_finland", "load_greece", "load_honduras", "load_italy", "lo...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 47540, 19608, 292, 1039, 1330, 1635, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 2220, 62, 282, 291, 12427, 62, 28582, 33743, 1600, 366, 2220, 62, 5657, 14308, 1600, 366, 2...
2.250951
263
import requests import os import shutil from zipfile import ZipFile
[ 11748, 7007, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 19974, 7753, 1330, 38636, 8979, 628 ]
4.058824
17
# coding: utf-8 # In[3]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns get_ipython().magic('matplotlib inline') heat_map(filepath)
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 18, 5974, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397...
2.614286
70
import sys import os import csv import json import re import math from decimal import Decimal from django.core.management.base import BaseCommand, CommandError field_types = { 'date_ymd': 'DateField', 'number': 'FloatField', 'integer': 'IntegerField', 'email': 'EmailField', 'text': 'C...
[ 11748, 25064, 201, 198, 11748, 28686, 201, 198, 11748, 269, 21370, 201, 198, 11748, 33918, 201, 198, 11748, 302, 201, 198, 11748, 10688, 201, 198, 6738, 32465, 1330, 4280, 4402, 201, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 869...
1.876823
9,393
from . import base, messages, participants, rooms, users
[ 6738, 764, 1330, 2779, 11, 6218, 11, 6809, 11, 9519, 11, 2985, 198 ]
4.384615
13
from flask import Flask, render_template, url_for, redirect from pathlib import Path import config from controller import ProgressController controller = ProgressController() app = Flask(__name__) @app.route('/') @app.route('/tech/<stem>') def tech(stem): """ 显示技术要求 :param stem: :return: "...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 18941, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 4566, 198, 6738, 10444, 1330, 18387, 22130, 198, 198, 36500, 796, 18387, 22130, 3419, 198, 198, 1324, 79...
2.621005
219
import multiprocessing.pool
[ 11748, 18540, 305, 919, 278, 13, 7742 ]
3.857143
7
import json import sys batch_size = 2000 clusters = { 'eqiad': "search.svc.eqiad.wmnet", 'codfw': "search.svc.codfw.wmnet", } if __name__ == "__main__": import math import multiprocessing if not len(sys.argv) == 2: print("Usage: %s <wiki>\n" % (sys.argv[0])) sys.exit(1) ...
[ 11748, 33918, 198, 11748, 25064, 198, 198, 43501, 62, 7857, 796, 4751, 198, 565, 13654, 796, 1391, 198, 220, 220, 220, 705, 27363, 72, 324, 10354, 366, 12947, 13, 21370, 66, 13, 27363, 72, 324, 13, 26377, 3262, 1600, 198, 220, 220, ...
2.116883
539
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628 ]
3.5
26
#!/usr/bin/env python # ctypes-opencv - A Python wrapper for OpenCV using ctypes # Copyright (c) 2008, Minh-Tri Pham # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # * Redistributions of source...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 269, 19199, 12, 9654, 33967, 532, 317, 11361, 29908, 329, 4946, 33538, 1262, 269, 19199, 198, 198, 2, 15069, 357, 66, 8, 3648, 11, 1855, 71, 12, 14824, 1380, 321, 198, 2, 1439, ...
3.696581
936
import requests from steamapi.steamapikey import SteamAPIKey #message = True
[ 11748, 7007, 198, 6738, 13324, 15042, 13, 21465, 499, 522, 88, 1330, 9094, 17614, 9218, 198, 2, 20500, 796, 6407, 628 ]
3.714286
21
# Generated by Django 3.2.7 on 2021-11-10 18:20 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 1157, 12, 940, 1248, 25, 1238, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Histogram visualization """ from string import Template from collections import Counter import sys import time import re ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2864, 11, 19764, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 1043, 287, 198, 2, 262, 38559, 24290...
2.35723
1,646
""" Utility functions for formatting """ from qcelemental import constants as qcc from qcelemental import periodictable as ptab from automol import geom # Conversion factors BOHR2ANG = qcc.conversion_factor('bohr', 'angstrom') def determine_struct_type(geo): """ determines the linear string """ # Remo...
[ 37811, 198, 34030, 5499, 329, 33313, 198, 37811, 198, 198, 6738, 10662, 344, 1732, 282, 1330, 38491, 355, 10662, 535, 198, 6738, 10662, 344, 1732, 282, 1330, 2278, 713, 540, 355, 279, 8658, 198, 6738, 3557, 349, 1330, 4903, 296, 198, ...
1.822222
2,160
import os import os.path as osp import random import shutil import sys import json import glob import xml.etree.ElementTree as ET import argparse # voc_dir = '/data/xiaowenjie/nas/datasets/urpc2021/new_urpc/before/' #remember to modify the path # voc_annotations = voc_dir + 'boxes/' # txt_dir = voc_dir + 'txt/' # coc...
[ 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 4738, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 15095, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 1822, ...
2.402154
557
# Generated by Django 3.1.6 on 2021-02-17 03:27 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 2999, 12, 1558, 7643, 25, 1983, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import pytz from datetime import datetime from django.test import TestCase from robber import expect from data.constants import MEDIA_TYPE_DOCUMENT from data.factories import ( AllegationFactory, AllegationCategoryFactory, AttachmentFileFactory, OfficerFactory, OfficerAllegationFactory, Victi...
[ 11748, 12972, 22877, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 29979, 1330, 1607, 198, 198, 6738, 1366, 13, 9979, 1187, 1330, 26112, 3539, 62, 25216, 62, 38715, 5...
3.361345
119
from discord import Color # TODO: Place holder for now - can use __init__.py once dependencies such as # data.ROLE_MAPPINGS_TABLE and rally_api.BASE_URL have been removed """ Constants useful for data module """ ROLE_MAPPINGS_TABLE = "mappings" CHANNEL_MAPPINGS_TABLE = "channel_mappings" RALLY_CONNECTIONS_TABLE = "r...
[ 6738, 36446, 1330, 5315, 198, 198, 2, 16926, 46, 25, 8474, 15762, 329, 783, 532, 460, 779, 11593, 15003, 834, 13, 9078, 1752, 20086, 884, 355, 198, 2, 1366, 13, 13252, 2538, 62, 44, 24805, 20754, 62, 38148, 290, 7903, 62, 15042, 13,...
2.690635
1,196
import sublime import sublime_plugin from .core.configurations import is_supported_syntax from .core.protocol import Request, Range, DocumentHighlightKind from .core.registry import session_for_view, client_from_session from .core.documents import get_document_position from .core.settings import settings, client_confi...
[ 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 198, 6738, 764, 7295, 13, 11250, 20074, 1330, 318, 62, 15999, 62, 1837, 41641, 198, 6738, 764, 7295, 13, 11235, 4668, 1330, 19390, 11, 13667, 11, 16854, 11922, 2971, 35854, 198, 6738, 764...
3.164502
231
#! /usr/bin/env python3 ''' Problem 39 - Project Euler http://projecteuler.net/index.php?section=problems&id=039 ''' import math if __name__ == '__main__': x = 5 pytha = [] while True: a,b,c = getPythagoreanTriplet(x) if a+b+c > 1000: break else: if a != 0: ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 198, 40781, 5014, 532, 4935, 412, 18173, 198, 4023, 1378, 16302, 68, 18173, 13, 3262, 14, 9630, 13, 10121, 30, 5458, 28, 1676, 22143, 5, 312, 28, 15, 2670, 198, 7061...
1.672783
327
""" Created on April 19, 2020 @author: Yi Wang """ import datetime from mylib.geosfp.gc_process import geosfp_add_variables ####################### # Start user parameters # gc_root_dir = '/Dedicated/jwang-data/GCDATA/GEOS_2x2.5/GEOS_FP/' new_root_dir = '/Dedicated/jwang-data/GCDATA/GEOS_2x2.5/GEOS_FP_soil_T/' s...
[ 37811, 198, 41972, 319, 3035, 678, 11, 12131, 198, 198, 31, 9800, 25, 26463, 15233, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 198, 6738, 616, 8019, 13, 469, 418, 46428, 13, 36484, 62, 14681, 1330, 4903, 418, 46428, 62, 2860, 62, ...
2.197452
471
import random import pytest import pandas as pd from datetime import datetime, date, timedelta from ..conftest import ( FauxJIRA as JIRA, FauxIssue as Issue, FauxChange as Change, FauxFieldValue as Value ) from ..querymanager import QueryManager from ..utils import extend_dict from .progressreport imp...
[ 11748, 4738, 198, 11748, 12972, 9288, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 28805, 12514, 198, 6738, 11485, 1102, 701, 395, 1330, 357, 198, 220, 220, 220, 376, 14644, 41, 40, 3861...
2.647303
241
from setuptools import find_packages, setup from setuptools.command.install import install from setuptools import setup, find_packages from distutils.command.install import install as _install import os PROJECT_DIR = os.path.dirname(__file__) DEPENDENCIES = open(os.path.join(PROJECT_DIR, 'requirements.txt')).readline...
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 17350, 1330, 2721, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 1233, 26791, 13, 21812, 13, 17350, 1330,...
2.797546
326
stable = 'scala-native-0.4.0-2.12' latest = 'scala-native-0.4.1-SNAPSHOT-2.12'
[ 31284, 796, 705, 1416, 6081, 12, 30191, 12, 15, 13, 19, 13, 15, 12, 17, 13, 1065, 6, 198, 42861, 796, 705, 1416, 6081, 12, 30191, 12, 15, 13, 19, 13, 16, 12, 15571, 2969, 9693, 2394, 12, 17, 13, 1065, 6 ]
1.857143
42
#!/usr/bin/python # Written by Thomas York # Imports from flask import Flask from flask_hashing import Hashing from config import Config from flask_sqlalchemy import SQLAlchemy # Flask Setup app = Flask(__name__) app.config.from_object(Config) hashing = Hashing(app) db = SQLAlchemy(app) # Route setup from app.route...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 22503, 416, 5658, 1971, 198, 198, 2, 1846, 3742, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 71, 2140, 1330, 367, 2140, 198, 6738, 4566, 1330, 17056, 198, 6738, 42903, 62, ...
2.954198
131
""" Task 1 @author: Alexandr Mazanik """ import time import turtle main() time.sleep(2)
[ 37811, 198, 25714, 352, 198, 31, 9800, 25, 21000, 81, 21625, 272, 1134, 198, 37811, 198, 11748, 640, 198, 11748, 28699, 628, 628, 628, 628, 198, 12417, 3419, 198, 2435, 13, 42832, 7, 17, 8, 198 ]
2.666667
36
#%% import IPython.display as ipyd #%% from IPython.display import Markdown ideas = open('./design/ideas.md') output = ideas.read() Markdown(output) #%% [markdown] # ### Problem type description template #%% [markdown] # ### Problem type title # # Description # # #### Problem generation # # Outline of algorith...
[ 198, 2, 16626, 198, 11748, 6101, 7535, 13, 13812, 355, 20966, 5173, 628, 198, 2, 16626, 198, 6738, 6101, 7535, 13, 13812, 1330, 2940, 2902, 198, 198, 485, 292, 796, 1280, 7, 4458, 14, 26124, 14, 485, 292, 13, 9132, 11537, 198, 22915...
2.758315
1,353
import unittest from signals.generators.ios.objc.parameters import ObjCParameter from signals.parser.fields import Field from signals.parser.schema import DataObject from tests.utils import create_dynamic_schema
[ 11748, 555, 715, 395, 198, 6738, 10425, 13, 8612, 2024, 13, 4267, 13, 26801, 66, 13, 17143, 7307, 1330, 38764, 8697, 41158, 2357, 198, 6738, 10425, 13, 48610, 13, 25747, 1330, 7663, 198, 6738, 10425, 13, 48610, 13, 15952, 2611, 1330, ...
3.736842
57
"""Converts 1 hz RSA from a bedrock hazard map to soil values using the NEHRP amplifcation factors Reference: Borchedt 1994 RSA is then converted to MMI using the formuala of Atkinson and Kaka (2006) Jonathan Griffin, AIFDR January 2011 """ import sys, os import numpy as np from scipy.interpolate import i...
[ 37811, 3103, 24040, 352, 289, 89, 42319, 422, 257, 47856, 15834, 3975, 284, 9260, 3815, 201, 198, 3500, 262, 10635, 17184, 47, 12306, 361, 30907, 5087, 201, 198, 26687, 25, 12182, 1740, 83, 9162, 201, 198, 201, 198, 49, 4090, 318, 788...
2.00085
1,177
import json import scrapy from kingfisher_scrapy.base_spider import CompressedFileSpider from kingfisher_scrapy.util import components, handle_http_error class ArgentinaBuenosAires(CompressedFileSpider): """ Domain Ciudad de Buenos Aires API documentation https://data.buenosaires.gob.ar/acer...
[ 11748, 33918, 198, 198, 11748, 15881, 88, 198, 198, 6738, 5822, 69, 4828, 62, 1416, 2416, 88, 13, 8692, 62, 2777, 1304, 1330, 3082, 2790, 8979, 41294, 198, 6738, 5822, 69, 4828, 62, 1416, 2416, 88, 13, 22602, 1330, 6805, 11, 5412, 6...
2.75
272
import requests, logging, json, sys from Lib.GCS.http_calls import EdgeGridHttpCaller from random import randint from akamai.edgegrid import EdgeGridAuth from Lib.GCS.config import EdgeGridConfig import urllib import socket import subprocess import os import dns.resolver import functools class Wrapper: """ A simple ...
[ 11748, 7007, 11, 18931, 11, 33918, 11, 25064, 198, 6738, 7980, 13, 38, 7902, 13, 4023, 62, 66, 5691, 1330, 13113, 41339, 43481, 14134, 263, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 47594, 1689, 72, 13, 14907, 25928, 1330, 13113, ...
2.788568
3,604
import time from urllib import parse as url_parse import pytest from page_get import ( get_cont_of_weibo, get_page, get_profile) from tasks.comment import crawl_comment_by_page from tasks.repost import crawl_repost_by_page from tests import REQUEST_INTERNAL HOME_AJAX_URL = 'http://weibo.com/p/aj/v6/mblog/mblogl...
[ 11748, 640, 198, 6738, 2956, 297, 571, 1330, 21136, 355, 19016, 62, 29572, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2443, 62, 1136, 1330, 357, 198, 220, 220, 220, 651, 62, 3642, 62, 1659, 62, 732, 26762, 11, 651, 62, 7700, 11, ...
2.235714
280
from glmnet import ElasticNet import io import numpy as np import pandas as pd import requests from sklearn.preprocessing import StandardScaler # Load data url = 'https://raw.githubusercontent.com/CCS-Lab/easyml/master/Python/datasets/prostate.csv' s = requests.get(url).content prostate = pd.read_csv(io.StringIO(s.de...
[ 6738, 1278, 76, 3262, 1330, 48567, 7934, 198, 11748, 33245, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7007, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 8997, 3351, 36213, 628, 198, 2, 8778,...
2.655218
757
#!/usr/bin/env python3 # This script compares AppGene files for similiarty # Run this script in terminal / command line to see the usage of arguments. import os import argparse from sklearn.feature_extraction.text import HashingVectorizer import json import re from sklearn.metrics.pairwise import cosine_similarity im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 770, 4226, 23008, 2034, 39358, 3696, 329, 985, 2403, 25494, 198, 2, 5660, 428, 4226, 287, 12094, 1220, 3141, 1627, 284, 766, 262, 8748, 286, 7159, 13, 198, 198, 11748, 28...
2.422909
6,862
from corehq.const import SERVER_DATETIME_FORMAT from corehq.util.timezones.conversions import PhoneTime, ServerTime from corehq.util.timezones.utils import get_timezone
[ 6738, 4755, 71, 80, 13, 9979, 1330, 18871, 5959, 62, 35, 1404, 2767, 12789, 62, 21389, 1404, 198, 6738, 4755, 71, 80, 13, 22602, 13, 2435, 89, 1952, 13, 1102, 47178, 1330, 14484, 7575, 11, 9652, 7575, 198, 6738, 4755, 71, 80, 13, ...
3.035714
56
from typing import Dict import pandas as pd import warnings from concurrent.futures import ThreadPoolExecutor, TimeoutError from capiq_excel.downloader.timeout import TimeoutWrapper from capiq_excel.fileops import get_path_of_failed_folder_add_if_necessary, move_file_to_failed_folder, get_path_of_additional_failed_fol...
[ 6738, 19720, 1330, 360, 713, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 14601, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 11, 3862, 448, 12331, 198, 198, 6738, 1451, 25011, 62, 1069, 5276, 13, 15002, ...
2.455665
812
#!/usr/bin/env python # -*- coding: UTF-8 -*- from requests import get, post from bs4 import BeautifulSoup from random import randint
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 6738, 7007, 1330, 651, 11, 1281, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 4738, 1330, 43720, 600 ]
3.093023
43
print('This program finds the number of times a letter appears in a text') word = input('Enter a text: ') char = input('Enter letter to find its number of times: ') count(word,char)
[ 4798, 10786, 1212, 1430, 7228, 262, 1271, 286, 1661, 257, 3850, 3568, 287, 257, 2420, 11537, 198, 4775, 796, 5128, 10786, 17469, 257, 2420, 25, 705, 8, 198, 10641, 796, 5128, 10786, 17469, 3850, 284, 1064, 663, 1271, 286, 1661, 25, 70...
3.62
50
import numpy as np from tangles.tree_tangles import get_hard_predictions from tangles.loading import load_GMM from sklearn.metrics import pairwise_distances def test_simple_gaussians_ab(): """ AB test to make sure the tangles algorithm still does the exact same thing. """ X, _ = load_GMM([20, 20], ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 13875, 829, 13, 21048, 62, 83, 27787, 1330, 651, 62, 10424, 62, 28764, 9278, 198, 6738, 13875, 829, 13, 25138, 1330, 3440, 62, 38, 12038, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 51...
2.107143
672
"""Vconnex integration""" import hashlib import hmac import base64 import json import time from types import SimpleNamespace from typing import Any from enum import Enum import requests import logging API__TOKEN = "/auth/project-token" logger = logging.getLogger(__name__)
[ 37811, 53, 1102, 12413, 11812, 37811, 201, 198, 201, 198, 11748, 12234, 8019, 201, 198, 11748, 289, 20285, 201, 198, 11748, 2779, 2414, 201, 198, 11748, 33918, 201, 198, 11748, 640, 201, 198, 6738, 3858, 1330, 17427, 36690, 10223, 201, ...
2.841121
107
from django.contrib import admin from .models import Image # Register your models here. @admin.register(Image)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 7412, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 31, 28482, 13, 30238, 7, 5159, 8, 628 ]
3.5625
32
import os import ntpath #EL PROGRAMA PUEDE TENER INPUT DE UNA URL #extraer_sonido(ruta)
[ 11748, 28686, 201, 198, 11748, 299, 83, 6978, 201, 198, 201, 198, 201, 198, 2, 3698, 46805, 32, 24676, 1961, 36, 309, 1677, 1137, 3268, 30076, 5550, 471, 4535, 10289, 201, 198, 201, 198, 201, 198, 201, 198, 2, 26086, 263, 62, 1559, ...
2.04
50
from validate_docbr import CPF
[ 6738, 26571, 62, 15390, 1671, 1330, 16932, 37, 198 ]
3.444444
9
import pandas as pd import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': main()
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, ...
2.076923
65
# Third party imports import pytest # pydatastructs imports from pydatastructs.linkedlist import LinkedList # Setup # initialize _linkedlist in pytest fixture to be used in individual method tests @pytest.fixture # Executions # append() adds a new instantiation of the Node class to the end of the linked list # append...
[ 2, 10467, 2151, 17944, 198, 11748, 12972, 9288, 198, 2, 279, 5173, 265, 459, 1356, 82, 17944, 198, 6738, 279, 5173, 265, 459, 1356, 82, 13, 25614, 4868, 1330, 7502, 276, 8053, 198, 198, 2, 31122, 198, 2, 41216, 4808, 25614, 4868, 28...
3.977273
176
import pymol from pymol import cmd, util from sys import argv # usage: pymol -cq script_name.py -- path/to/fragments/ path = argv[1:][0] print(f"Using path: {path} for structures") # Set some nice CB friendly colours cmd.set_color("cb_orange", [0.96, 0.41, 0.23]) # Add filter (ambient) and other misc settings cmd.s...
[ 11748, 279, 4948, 349, 198, 6738, 279, 4948, 349, 1330, 23991, 11, 7736, 198, 6738, 25064, 1330, 1822, 85, 198, 198, 2, 8748, 25, 279, 4948, 349, 532, 66, 80, 4226, 62, 3672, 13, 9078, 1377, 3108, 14, 1462, 14, 8310, 363, 902, 14,...
2.269518
1,473
import unittest from mosaic.node import Node ''' def test_fully_expanded(self): def a_func(): return 0 def b_func(): return 0 def c_func(): return 0 x1 = ListTask(is_ordered=False, name = "x1", tasks = ["x1__p1", "x1__p2"]) x2 = ListTask(is_ordered=True, name = "x2", task...
[ 11748, 555, 715, 395, 198, 198, 6738, 47076, 13, 17440, 1330, 19081, 628, 198, 7061, 6, 220, 220, 220, 825, 1332, 62, 2759, 62, 11201, 12249, 7, 944, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 825, 257, 62, 20786, 33529, 1441, ...
2.02372
801
# -*- coding: utf-8 -*- """ Created on Thu Feb 7 20:52:19 2019 @author: if715029 """ ### Crea los clusters de 5, 20, 40 y 125 días y los exporta a .sav import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans from time import time import pickle t1 = time() csv = ['...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 3158, 220, 767, 1160, 25, 4309, 25, 1129, 13130, 198, 198, 31, 9800, 25, 611, 4869, 1120, 1959, 198, 37811, 198, 198, 21017, 5844, 64, 2...
2.216949
590
from django.db.models import ( BooleanField, CharField, Model, TextField, )
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 357, 198, 220, 220, 220, 41146, 15878, 11, 198, 220, 220, 220, 3178, 15878, 11, 198, 220, 220, 220, 9104, 11, 198, 220, 220, 220, 8255, 15878, 11, 198, 8, 628 ]
2.384615
39
def countdown(): """Write a generator that counts from 100 to 1""" for i in reversed(range(1, 101)): yield i
[ 4299, 33970, 33529, 198, 220, 220, 220, 37227, 16594, 257, 17301, 326, 9853, 422, 1802, 284, 352, 37811, 198, 220, 220, 220, 329, 1312, 287, 17687, 7, 9521, 7, 16, 11, 8949, 8, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 7800, 1...
2.777778
45
from tf2recommender.config.local import ColumnNames config = { 'training_args': NcfTrainingArguments( user_dim=10, item_dim=6, batch_size=16, num_epochs=5, hidden1_dim=8, hidden2_dim=2), 'col_names': ColumnNames(user_col='user', item_col='item', rating_...
[ 6738, 48700, 17, 47335, 2194, 13, 11250, 13, 12001, 1330, 29201, 36690, 628, 198, 198, 11250, 796, 1391, 198, 220, 220, 220, 705, 34409, 62, 22046, 10354, 198, 220, 220, 220, 399, 12993, 44357, 28100, 2886, 7, 198, 220, 220, 220, 220,...
2.074074
162
""" 进程控制类 """ """ PCB 进程控制块 """ """ 进程控制块队列 """
[ 37811, 198, 32573, 249, 163, 101, 233, 162, 236, 100, 26344, 114, 163, 109, 119, 198, 37811, 628, 198, 37811, 198, 5662, 33, 198, 32573, 249, 163, 101, 233, 162, 236, 100, 26344, 114, 161, 251, 245, 198, 37811, 628, 198, 37811, 198,...
0.8125
64
from nonebot import on_command from nonebot.rule import to_me from nonebot.adapters.cqhttp import Bot,Event from nonebot.adapters.cqhttp import MessageSegment as msg from nonebot.log import logger from .util import check_rss,update_rss,rss_db_init,rss_server,add_rss,query_user_rss,remove_rss from .model import Rss fr...
[ 6738, 4844, 13645, 1330, 319, 62, 21812, 198, 6738, 4844, 13645, 13, 25135, 1330, 284, 62, 1326, 198, 6738, 4844, 13645, 13, 324, 12126, 13, 66, 80, 4023, 1330, 18579, 11, 9237, 198, 6738, 4844, 13645, 13, 324, 12126, 13, 66, 80, 40...
2.872928
181
""" Timer ====== This module measures the execution time and provides three ways to do this: * **MeasureTime**: Measure time as decorator ``@MeasureTime``. * **MeasureBlockTime**: Measure as ``with MeasureBlockTime("my_block") as my_block:``. * **Timer**: Measure as instance ``timer = Timer()`` """ from __future__ im...
[ 37811, 198, 48801, 198, 50155, 198, 198, 1212, 8265, 5260, 262, 9706, 640, 290, 3769, 1115, 2842, 284, 466, 428, 25, 198, 198, 9, 12429, 47384, 7575, 1174, 25, 24291, 640, 355, 11705, 1352, 7559, 31, 47384, 7575, 15506, 13, 198, 9, ...
2.665477
1,121
from regression_tests import *
[ 6738, 20683, 62, 41989, 1330, 1635, 198 ]
4.428571
7
""" BAD CODE The problem is in the data structure. Loading the movie database as a list of lists causes the function movies() to find the movies of a user to be of linear complexity O(1) and the function shared() to find shared movies to be of quadratic complexity O(m*m). The good code has constant complexity O(1) fo...
[ 37811, 198, 33, 2885, 42714, 198, 198, 464, 1917, 318, 287, 262, 1366, 4645, 13, 12320, 262, 3807, 6831, 355, 257, 1351, 198, 1659, 8341, 5640, 262, 2163, 6918, 3419, 284, 1064, 262, 6918, 286, 257, 2836, 284, 307, 198, 1659, 14174, ...
3.529762
168
from .motifprogram import MotifProgram import os import shutil from subprocess import Popen, PIPE from gimmemotifs.motif import Motif class Gadem(MotifProgram): """ Predict motifs using GADEM. Reference: """ def _run_program(self, bin, fastafile, params=None): """ Run GADEM and...
[ 6738, 764, 27926, 361, 23065, 1330, 6543, 361, 15167, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 198, 6738, 33135, 368, 313, 361, 82, 13, 27926, 361, 1330, 6543, 361, 628,...
1.859898
1,763
""" C, R (= 열, 행) = 7, 6일 때 [6, 7, 8, 9, 10, 11, 12] [5, 26, 27, 28, 29, 30, 13] [4, 25, 38, 39, 40, 31, 14] [3, 24, 37, 42, 41, 32, 15] [2, 23, 36, 35, 34, 33, 16] [1, 22, 21, 20, 19, 18, 17] """ C, R = map(int, input().split()) grid = [[0]* C for _ in range(R)] count, offset = 0, 0 max_size = C*R while R > 0 and ...
[ 37811, 198, 34, 11, 371, 46121, 23821, 245, 112, 11, 220, 169, 244, 231, 8, 796, 767, 11, 718, 35975, 120, 31619, 243, 234, 198, 198, 58, 21, 11, 767, 11, 807, 11, 860, 11, 838, 11, 1367, 11, 1105, 60, 198, 58, 20, 11, 2608, ...
1.862595
524
import sys from .parent_parser import ParentParser from .common_parser import CommonParser class CreateSiteUsersParser: """ Parser for createsiteusers command """ @staticmethod def create_site_user_parser(): """Method to parse create site users arguments passed by the user""" paren...
[ 11748, 25064, 198, 6738, 764, 8000, 62, 48610, 1330, 16774, 46677, 198, 6738, 764, 11321, 62, 48610, 1330, 8070, 46677, 628, 198, 4871, 13610, 29123, 14490, 46677, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 23042, 263, 329, 8075...
2.159751
482
""" "Stickfix" (c) by Ignacio Slater M. "Stickfix" is licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this work. If not, see <http://creativecommons.org/licenses/by/4.0/>. """ from bot.utils.logger import StickfixLogger ...
[ 37811, 366, 1273, 624, 13049, 1, 357, 66, 8, 416, 16583, 48711, 44289, 337, 13, 198, 220, 220, 220, 366, 1273, 624, 13049, 1, 318, 11971, 739, 257, 198, 220, 220, 220, 17404, 13815, 45336, 604, 13, 15, 4037, 13789, 13, 628, 220, 2...
3.222222
504
#!/usr/bin/env python # coding: utf-8 # <div class="alert alert-block alert-info"> # <b><h1>ENGR 1330 Computational Thinking with Data Science </h1></b> # </div> # # Copyright © 2021 Theodore G. Cleveland and Farhang Forghanparast # # Last GitHub Commit Date: # # # 34: KNN Applications # - application # #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1279, 7146, 1398, 2625, 44598, 7995, 12, 9967, 7995, 12, 10951, 5320, 198, 2, 220, 220, 220, 220, 1279, 65, 6927, 71, 16, 29, 1677, 1...
2.611511
139
from __future__ import absolute_import from proteus import * from proteus.default_p import * from math import * from .vortex import * from proteus.mprans import RDLS from . import ls_vortex_3d_p name=soname+"_rdls" LevelModelType = RDLS.LevelModel coefficients = RDLS.Coefficients(applyRedistancing=applyRedistancing, ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 5915, 385, 1330, 1635, 198, 6738, 5915, 385, 13, 12286, 62, 79, 1330, 1635, 198, 6738, 10688, 1330, 1635, 198, 6738, 764, 85, 26158, 1330, 1635, 198, 6738, 5915, 385, 13, 76, ...
2.373102
461
from xapitrader.core.data.stream.base import StreamDataInterface from xapitrader.types import types from xapitrader.types import utils
[ 6738, 2124, 499, 270, 81, 5067, 13, 7295, 13, 7890, 13, 5532, 13, 8692, 1330, 13860, 6601, 39317, 198, 6738, 2124, 499, 270, 81, 5067, 13, 19199, 1330, 3858, 198, 6738, 2124, 499, 270, 81, 5067, 13, 19199, 1330, 3384, 4487, 198 ]
3.214286
42
import pytest from mxnet.util import use_np from mxnet.gluon.data import DataLoader import numpy as np import numpy.testing as npt import tempfile import pickle import os from sklearn.model_selection import train_test_split from autogluon.core.utils.loaders import load_pd from autogluon.text.text_prediction.mx.preproce...
[ 11748, 12972, 9288, 198, 6738, 285, 87, 3262, 13, 22602, 1330, 779, 62, 37659, 198, 6738, 285, 87, 3262, 13, 70, 2290, 261, 13, 7890, 1330, 6060, 17401, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 33407, 355, 299, ...
2.271802
688
"""__init.py__""" import sys MIN_PYTHON_VERSION = (3, 8) if sys.version_info < MIN_PYTHON_VERSION: version_str = '.'.join(map(str, MIN_PYTHON_VERSION)) raise EnvironmentError("Python version needs to be at least " + version_str)
[ 37811, 834, 15003, 13, 9078, 834, 37811, 198, 11748, 25064, 198, 198, 23678, 62, 47, 56, 4221, 1340, 62, 43717, 796, 357, 18, 11, 807, 8, 198, 198, 361, 25064, 13, 9641, 62, 10951, 1279, 20625, 62, 47, 56, 4221, 1340, 62, 43717, 2...
2.597826
92
from bokeh.plotting import show, output_file from bokeh.models import Plot, Title, Circle, ColumnDataSource, DataRange1d, LinearAxis, Range1d xdr = DataRange1d() ydr = DataRange1d() p = Plot( title=None, toolbar_location=None, x_range=xdr, y_range=ydr, plot_width=800, plot_height=800, min_border=30, ...
[ 6738, 1489, 365, 71, 13, 29487, 889, 1330, 905, 11, 5072, 62, 7753, 198, 6738, 1489, 365, 71, 13, 27530, 1330, 28114, 11, 11851, 11, 16291, 11, 29201, 6601, 7416, 11, 6060, 17257, 16, 67, 11, 44800, 31554, 271, 11, 13667, 16, 67, ...
2.352496
661
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2177, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 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, ...
2.034389
17,593
# Copyright The IETF Trust 2007, All Rights Reserved # Django settings for ietf project. # BASE_DIR and "settings_local" are from # http://code.djangoproject.com/wiki/SplitSettings import os try: import syslog syslog.openlog("datatracker", syslog.LOG_PID, syslog.LOG_USER) except ImportError: pass BASE_DI...
[ 2, 15069, 383, 314, 22274, 9870, 4343, 11, 1439, 6923, 33876, 198, 198, 2, 37770, 6460, 329, 220, 1155, 69, 1628, 13, 198, 2, 49688, 62, 34720, 290, 366, 33692, 62, 12001, 1, 389, 422, 198, 2, 2638, 1378, 8189, 13, 28241, 648, 404...
2.413188
8,098
# Logistic regression #%% # Importing libraries import numpy as np import random from matplotlib import pyplot as plt #%% #%% # Generating training data x = np.linspace(1, 10, 1000)[:, np.newaxis].T y = np.hstack((np.zeros((1,500)), np.ones((1,500)))) # Adding some randomness y[0,random.randint(0,500)] = 1 y[0,rando...
[ 2, 5972, 2569, 20683, 198, 2, 16626, 198, 2, 17267, 278, 12782, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 2, 16626, 198, 198, 2, 16626, 198, 2, 29...
2.448363
397
import os import unittest from recipe_scrapers.whatsgabycooking import WhatsGabyCooking
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 8364, 62, 1416, 2416, 364, 13, 1929, 1381, 70, 3930, 27916, 278, 1330, 28556, 38, 3930, 28937, 278, 628 ]
3.103448
29
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2019 all rights reserved # # superclasses from .Communicator import Communicator # declaration class Cartesian(Communicator): """ An encapsulation of Cartesian communicators """ # per-instance public data axes = None ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 257, 26884, 85, 6557, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, 23344, 477, 2489, 10395, 198, 2, 628, ...
2.821429
140
from configparser import ConfigParser from pymongo import MongoClient from math import pow, sqrt __author__ = 'MuhamadNoorZainal MuhamadZabidi' __version__ = '1.5'
[ 6738, 4566, 48610, 1330, 17056, 46677, 201, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 201, 198, 6738, 10688, 1330, 7182, 11, 19862, 17034, 201, 198, 201, 198, 834, 9800, 834, 796, 705, 33239, 2763, 324, 45, 2675, 57, 391, 282, ...
2.428571
77
from typing import Dict, Tuple, List, Any import logging from overrides import overrides from conllu import parse_incr, string_to_file from allennlp.common.file_utils import cached_path from allennlp.data.dataset_readers.dataset_reader import DatasetReader from allennlp.data.fields import Field, TextField, SequenceLa...
[ 6738, 19720, 1330, 360, 713, 11, 309, 29291, 11, 7343, 11, 4377, 198, 11748, 18931, 198, 198, 6738, 23170, 1460, 1330, 23170, 1460, 198, 6738, 369, 297, 84, 1330, 21136, 62, 1939, 81, 11, 4731, 62, 1462, 62, 7753, 198, 198, 6738, 47...
2.67313
1,083
import os import time import traceback import numpy as np import math import cv2 from pathlib import Path from osr2mp4 import logger from osr2mp4.global_var import videoextensions from osr2mp4.Exceptions import CannotCreateVideo, FourccIsNotExtension, WrongFourcc, LibAvNotFound ### TODO: MOVE THIS TO ITS OWN FILE ###...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 269, 85, 17, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 267, 27891, 17, 3149, 19, 1330, 49706, 198, 6738, 267...
3.19802
101
import pandas as pd from sklearn.exceptions import NotFittedError from pytorch_widedeep.wdtypes import * # noqa: F403 # This class does not represent any sctructural advantage, but I keep it to # keep things tidy, as guidance for contribution and because is useful for the # check_is_fitted function class BasePrepro...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 1069, 11755, 1330, 1892, 37, 2175, 12331, 198, 198, 6738, 12972, 13165, 354, 62, 86, 1384, 68, 538, 13, 16993, 19199, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 31552, 628,...
2.833613
595
from __future__ import annotations from typing import NamedTuple
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 19720, 1330, 34441, 51, 29291, 628, 198 ]
4.25
16
#!/usr/bin/env python3 """ Run a single-purpose HTTP server. Server takes all GET requests and redirects them to a new host if the request URI starts with SUBPATH, otherwise returns 404. Requests are redirected to the URL provided by --baseurl. """ import socketserver import http.server import argparse import sys ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 5660, 257, 2060, 12, 29983, 14626, 4382, 13, 198, 198, 10697, 2753, 477, 17151, 7007, 290, 18941, 82, 606, 284, 257, 649, 2583, 198, 361, 262, 2581, 43975, 4940, 351, ...
2.884298
605
############################################################# # 2016-09-26: ParameterType.py # Author: Jeremy M. Gibson (State Archives of North Carolina) # # Description: Implementation of the parameter-type ############################################################## from lxml.ElementInclude import etree class Pa...
[ 29113, 14468, 7804, 4242, 2, 198, 2, 1584, 12, 2931, 12, 2075, 25, 25139, 2357, 6030, 13, 9078, 198, 2, 6434, 25, 11753, 337, 13, 20400, 357, 9012, 22275, 286, 2258, 5913, 8, 198, 2, 198, 2, 12489, 25, 46333, 286, 262, 11507, 12, ...
2.765079
315
#from server import db #class User(db.Model): # __tablename__ = 'users'
[ 2, 6738, 4382, 1330, 20613, 628, 198, 2, 4871, 11787, 7, 9945, 13, 17633, 2599, 198, 198, 2, 220, 220, 220, 11593, 8658, 11925, 480, 834, 796, 705, 18417, 6, 198 ]
2.516129
31
import math import numpy as np from typing import Tuple, List
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 19720, 1330, 309, 29291, 11, 7343 ]
3.647059
17
import logging import numpy as np import pickle from copy import deepcopy from ase.atoms import Atoms from thyme.utils.cell import convert_cell_format from thyme.utils.savenload import save_file, load_file from thyme.utils.atomic_symbols import species_to_order_label from ._key import *
[ 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 257, 325, 13, 265, 3150, 1330, 1629, 3150, 198, 198, 6738, 11906, 1326, 13, 26791, 13, 3846, 1330, 10385, ...
3.244444
90
import pygame pygame.init() ROWS = 45 COLS = 50 SQUARE_SIZE = 8 WIDTH, HEIGHT = 400, 400 win = pygame.display.set_mode((WIDTH, HEIGHT)) win.fill("white") pygame.display.set_caption("PyPaint") COLORS = ["red", "green", "blue", "yellow", "purple", "black"] drawing_color = COLORS[5] grid_squares = [] buttons = [] c...
[ 11748, 12972, 6057, 198, 198, 9078, 6057, 13, 15003, 3419, 628, 198, 49, 22845, 796, 4153, 198, 25154, 50, 796, 2026, 198, 50, 10917, 12203, 62, 33489, 796, 807, 198, 54, 2389, 4221, 11, 11179, 9947, 796, 7337, 11, 7337, 198, 5404, ...
2.276567
734
"""Tests for the tucuxi.s3 Module using some fixtures from conftest.py""" import logging from typing import Dict from typing import List from tucuxi import S3 logger = logging.getLogger(__name__) def test_set_get_object(s3_name: str, objs: List[Dict[str, str]]) -> None: """[summary] Args: s3_name (...
[ 37811, 51, 3558, 329, 262, 256, 1229, 2821, 72, 13, 82, 18, 19937, 1262, 617, 34609, 422, 369, 701, 395, 13, 9078, 37811, 198, 11748, 18931, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 256, 1229, ...
2.156708
887
from app import db from models import Flaskr # Create the database, and the table within. db.create_all() # Commit the changes. db.session.commit()
[ 6738, 598, 1330, 20613, 198, 6738, 4981, 1330, 46947, 81, 198, 198, 2, 13610, 262, 6831, 11, 290, 262, 3084, 1626, 13, 198, 9945, 13, 17953, 62, 439, 3419, 198, 198, 2, 35910, 262, 2458, 13, 198, 9945, 13, 29891, 13, 41509, 3419, ...
3.409091
44
import pytest from encoded.tests.features.conftest import app, app_settings, index_workbook from pyramid.exceptions import HTTPBadRequest pytestmark = [ pytest.mark.indexing, pytest.mark.usefixtures('index_workbook'), ]
[ 11748, 12972, 9288, 198, 198, 6738, 30240, 13, 41989, 13, 40890, 13, 1102, 701, 395, 1330, 598, 11, 598, 62, 33692, 11, 6376, 62, 1818, 2070, 198, 6738, 27944, 13, 1069, 11755, 1330, 14626, 22069, 18453, 628, 198, 198, 9078, 9288, 410...
3.012821
78
import torch from torch.nn import functional as F from torch.utils.data import Dataset, DataLoader import numpy as np import math import os import Audio from text import text_to_sequence from utils import process_text, pad_1D, pad_2D import hparams device = torch.device('cuda' if torch.cuda.is_available() else 'cpu'...
[ 11748, 28034, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 28686, 198, 198, 11...
3.080645
124
from django.db import models from django.contrib.auth.models import User from aspc.activityfeed.signals import new_activity, delete_activity from aspc.courses.models import Course from amazon.api import AmazonAPI import datetime from aspc.settings import AMAZON_ACCESS_KEY, AMAZON_SECRET_KEY, AMAZON_ASSOC_TAG import jso...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 355, 14751, 13, 21797, 12363, 13, 12683, 874, 1330, 649, 62, 21797, 11, 12233, 62, 21797, 198, 6738, 355, ...
3.013423
149
# -*- coding: utf-8 -*- #/usr/bin/env python import numpy as np import matplotlib.pylab as plt from timer import Timer from chebpy import ETDRK4FxCy, ETDRK4FxCy2, BC, ETDRK4 from chebpy import ROBIN, DIRICHLET def test_etdrk4fxcy(): ''' The test function is u = e^[f(x,y) - t] where ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, 397, 355, 458, 83, 198, 198, 6738, 1978...
1.653196
4,083
# O(n) time, O(n) space
[ 2, 440, 7, 77, 8, 640, 11, 440, 7, 77, 8, 2272 ]
1.916667
12
#!/usr/bin/python # Written by Heiko 2019.02.07 # Will return the password change interval from Active Directory import subprocess result = subprocess.check_output( 'dsconfigad -show | grep \'Password change interval\' | awk \'{print $5}\' ', shell=True).strip() print '<result>' + result + '</result>'
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 22503, 416, 679, 12125, 13130, 13, 2999, 13, 2998, 198, 2, 2561, 1441, 262, 9206, 1487, 16654, 422, 14199, 27387, 198, 198, 11748, 850, 14681, 198, 198, 20274, 796, 850, 14681, 13, 9122, ...
3.377778
90
#!/usr/bin/env python import getpass import time from web3 import Web3, HTTPProvider from eth_account import Account # will use directly instead of through web3 provider from schedule import chainids, txs print(len(txs), 'transactions in schedule.') with open('infura.key') as keyfile: infurakey = keyfile.read(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 651, 6603, 198, 11748, 640, 198, 198, 6738, 3992, 18, 1330, 5313, 18, 11, 14626, 29495, 198, 6738, 4555, 62, 23317, 1330, 10781, 1303, 481, 779, 3264, 2427, 286, 832, 3992,...
2.431408
1,108
#!/usr/bin/env python """Build documentation and api.""" import os EPYDOC = "python c:/programmi/python23/scripts/epydoc.py" PSYCOPG = "c:/programmi/python23/lib/site-packages/psycopg2" os.system("python ext2html.py ../doc/extensions.rst > ../doc/extensions.html") os.system("%s " "-o ../doc/api "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 37811, 15580, 10314, 290, 40391, 526, 15931, 201, 198, 201, 198, 11748, 28686, 201, 198, 201, 198, 8905, 35755, 4503, 796, 366, 29412, 269, 14079, 23065, 11632, 14, 29412, 1954, 14,...
2.102804
214