content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from gym.envs.atari.atari_env import AtariEnv
from gym import spaces
import numpy as np
# return observation, reward_sum/4, done, info
| [
6738,
11550,
13,
268,
14259,
13,
35554,
13,
35554,
62,
24330,
1330,
35884,
4834,
85,
198,
6738,
11550,
1330,
9029,
198,
11748,
299,
32152,
355,
45941,
198,
2,
220,
220,
220,
220,
220,
220,
220,
1441,
13432,
11,
6721,
62,
16345,
14,
... | 2.958333 | 48 |
import logging
import re
import requests
from dateutil.parser import parse as parse_time
from json import JSONDecodeError
| [
11748,
18931,
198,
11748,
302,
198,
198,
11748,
7007,
198,
6738,
3128,
22602,
13,
48610,
1330,
21136,
355,
21136,
62,
2435,
198,
6738,
33918,
1330,
19449,
10707,
1098,
12331,
628,
198
] | 4.032258 | 31 |
from flaskeztest import EZTestCase
from flaskeztest.exceptions import FixtureDoesNotExistError, EztestidNotInFixture
| [
198,
6738,
781,
292,
365,
89,
9288,
1330,
412,
57,
14402,
20448,
198,
6738,
781,
292,
365,
89,
9288,
13,
1069,
11755,
1330,
376,
9602,
13921,
3673,
3109,
396,
12331,
11,
21034,
9288,
312,
3673,
818,
37,
9602,
628,
628
] | 3.025 | 40 |
import inferpy as inf
import matplotlib.animation as animation
import matplotlib.pyplot as plt
import numpy as np
from sklearn.cluster import KMeans
from datareduction.variational_linear_regressor_DR import VariationalLinearRegressor_DR
from prml.rv import VariationalGaussianMixture
from prml.features import Polynom... | [
11748,
13249,
9078,
355,
1167,
198,
198,
11748,
2603,
29487,
8019,
13,
11227,
341,
355,
11034,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
565,
5819,
1330... | 2.142762 | 1,506 |
#!/usr/bin/python
"""
Unit tests for worldpop.
"""
from os.path import join
import pytest
from hdx.data.vocabulary import Vocabulary
from hdx.hdx_configuration import Configuration
from hdx.hdx_locations import Locations
from hdx.location.country import Country
from worldpop import (
generate_datasets_and_showca... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
37811,
198,
26453,
5254,
329,
995,
12924,
13,
198,
198,
37811,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
198,
11748,
12972,
9288,
198,
6738,
289,
34350,
13,
7890,
13,
18893,
22528,
1330,
4... | 3.089431 | 123 |
from typing import Iterable, List, Tuple
"""
----------> (1,0)
|
|
|
|
v
(0,1)
"""
if __name__ == "__main__":
print(part_one(parse_input()))
print(part_two(parse_input()))
| [
6738,
19720,
1330,
40806,
540,
11,
7343,
11,
309,
29291,
628,
198,
37811,
198,
35937,
29,
357,
16,
11,
15,
8,
198,
91,
198,
91,
198,
91,
198,
91,
198,
85,
198,
7,
15,
11,
16,
8,
198,
37811,
628,
198,
198,
361,
11593,
3672,
834... | 2.22619 | 84 |
import requests as req
from bs4 import BeautifulSoup
import os
import os.path
import shutil
try:
r1=req.get("https://gaana.com/playlist/gaana-dj-best-of-badshah")
c1=r1.content
print(r)
soup1=BeautifulSoup(c1,"html.parser")
F1=soup1.find_all("a",{"class":"sng_c "})
#print(F1)
namelist=[]
#count=0
for i in F... | [
11748,
7007,
355,
43089,
220,
198,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
220,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
4423,
346,
198,
28311,
25,
198,
197,
81,
16,
28,
42180,
13,
1136,
7203,
5450,
1378,
... | 2.003082 | 649 |
# Generated by Django 3.1.7 on 2021-05-23 21:11
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
22,
319,
33448,
12,
2713,
12,
1954,
2310,
25,
1157,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
import torchvision
import torch
import matplotlib.pyplot as plt
import torch
import torchvision
import torchvision.transforms as transforms
from torch.utils.data import Dataset
from torch.utils.data.dataloader import DataLoader
from config import device
import torch.nn as nn
import torch.optim as opt... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
10178,
198,
11748,
28034,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28034,
198,
11748,
28034,
10178,
198,
11748,
28034,
10178,
13,
7645,
23914,
355,
31408,
... | 3.025907 | 193 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'logzero',
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
464,
9058,
4226,
526,
15931,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
... | 2.661519 | 777 |
# Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
#TOFILL
if __name__ == '__main__':
param = [
('Qaq',),
('9400761825850',),
('0011001111',),
('lasWqrLRq',... | [
2,
15069,
357,
66,
8,
13130,
12,
25579,
11,
3203,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
4... | 2.243986 | 291 |
""" fabfile to prepare the notebook """
from fabric.api import local,lcd
from fabric.utils import abort
import os
static_dir = 'static'
components_dir = os.path.join(static_dir,'components')
def components():
"""install components with bower"""
with lcd(static_dir):
local('bower install')
def css(mi... | [
37811,
7843,
7753,
284,
8335,
262,
20922,
37227,
198,
198,
6738,
9664,
13,
15042,
1330,
1957,
11,
75,
10210,
198,
6738,
9664,
13,
26791,
1330,
15614,
198,
11748,
28686,
198,
198,
12708,
62,
15908,
796,
705,
12708,
6,
198,
5589,
3906,
... | 2.715867 | 271 |
import os
import pytest
from pennylane import qchem
from pennylane.vqe import Hamiltonian
import numpy as np
symbols = ["C", "C", "N", "H", "H", "H", "H", "H"]
coordinates = np.array(
[
0.68219113,
-0.85415621,
-1.04123909,
-1.34926445,
0.23621577,
0.61794044,
... | [
11748,
28686,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
22429,
2645,
1531,
1330,
10662,
15245,
198,
198,
6738,
22429,
2645,
1531,
13,
85,
80,
68,
1330,
11582,
666,
198,
198,
11748,
299,
32152,
355,
45941,
628,
198,
1837,
2022,
10220... | 1.556054 | 446 |
import os
import subprocess
import traceback
import logging
logger = logging.getLogger("lims_dashboard")
| [
198,
11748,
28686,
198,
11748,
850,
14681,
198,
11748,
12854,
1891,
198,
198,
11748,
18931,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
2475,
82,
62,
42460,
3526,
4943,
628
] | 3.375 | 32 |
# This file is part of the Indico plugins.
# Copyright (C) 2002 - 2019 CERN
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from __future__ import unicode_literals
from indico.core.db.sqlalchemy impor... | [
2,
770,
2393,
318,
636,
286,
262,
1423,
3713,
20652,
13,
198,
2,
15069,
357,
34,
8,
6244,
532,
13130,
327,
28778,
198,
2,
198,
2,
383,
1423,
3713,
20652,
389,
1479,
3788,
26,
345,
460,
17678,
4163,
198,
2,
606,
290,
14,
273,
130... | 3.295775 | 142 |
DATABASE_ENGINE = 'sqlite3'
INSTALLED_APPS = [
'richcomments'
]
| [
35,
1404,
6242,
11159,
62,
26808,
8881,
796,
705,
25410,
578,
18,
6,
198,
198,
38604,
7036,
1961,
62,
2969,
3705,
796,
685,
198,
220,
220,
220,
705,
7527,
15944,
6,
198,
60,
198
] | 2.029412 | 34 |
from django.db import models
from django.conf import settings
from core.mixins import Trackable
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
4755,
13,
19816,
1040,
1330,
17762,
540,
628,
628,
198
] | 3.703704 | 27 |
# Generated by Django 3.1.5 on 2021-01-09 06:50
import cloudinary.models
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
20,
319,
33448,
12,
486,
12,
2931,
9130,
25,
1120,
198,
198,
11748,
6279,
3219,
13,
27530,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 3.052632 | 38 |
# -*- coding: utf-8 -*-
"""API."""
# community module
from flask import abort, request
import sqlalchemy.exc
# project module
from circle_core.models import MetaDataSession, ReplicationMaster
from .api import api
from .utils import respond_failure, respond_success
from ..utils import (oauth_require_read_schema_scop... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
17614,
526,
15931,
198,
198,
2,
2055,
8265,
198,
6738,
42903,
1330,
15614,
11,
2581,
198,
198,
11748,
44161,
282,
26599,
13,
41194,
198,
198,
2,
1628,
8265,
198,
... | 3.241071 | 112 |
from django.conf import settings
from django_assets import Bundle, register
from webassets.filter import get_filter
libsass = get_filter("libsass", style="compressed")
css_libs = Bundle(
settings.BASE_DIR + "/assets/styles/css/libs/normalize.css",
filters="cssutils",
output="css/libs.css"
)
css_custom ... | [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
42625,
14208,
62,
19668,
1330,
25282,
11,
7881,
198,
6738,
3992,
19668,
13,
24455,
1330,
651,
62,
24455,
628,
198,
8019,
82,
562,
796,
651,
62,
24455,
7203,
8019,
82,
562,
160... | 2.62069 | 203 |
import os
import sys
import time
import multiprocessing
from subprocess import Popen
from multiprocessing.pool import ThreadPool
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
18540,
305,
919,
278,
198,
6738,
850,
14681,
1330,
8099,
268,
198,
6738,
18540,
305,
919,
278,
13,
7742,
1330,
14122,
27201,
628,
198
] | 3.852941 | 34 |
# Assignment 3 for OMS6250
#
# Defines a Topology, which is a collection of Nodes. Students should not
# modify this file. This is NOT a topology like the ones defined in Mininet projects.
#
# Copyright 2015 Sean Donovan
from DistanceVector import *
| [
2,
50144,
513,
329,
440,
5653,
5237,
1120,
198,
2,
198,
2,
2896,
1127,
257,
5849,
1435,
11,
543,
318,
257,
4947,
286,
399,
4147,
13,
14882,
815,
407,
198,
2,
13096,
428,
2393,
13,
220,
770,
318,
5626,
257,
1353,
1435,
588,
262,
... | 3.761194 | 67 |
# items.py
import scrapy
# scrapy
| [
2,
3709,
13,
9078,
198,
11748,
15881,
88,
628,
198,
2,
15881,
88,
198
] | 2.571429 | 14 |
import copy
from alg.semi_supervised import SemiSupervised
from lib.ops import evaluate
from lib.utils import load_avast_weeks_pca, parse_arguments
args = parse_arguments()
dataset_avast_pca = {
'name': 'avast_pca',
'input_size': 128,
'num_classes': 5,
'mlp_arch': [96, 64, 32],
'visualise_funcs':... | [
11748,
4866,
198,
198,
6738,
435,
70,
13,
325,
11632,
62,
16668,
16149,
1330,
35525,
12442,
16149,
198,
6738,
9195,
13,
2840,
1330,
13446,
198,
6738,
9195,
13,
26791,
1330,
3440,
62,
615,
459,
62,
732,
2573,
62,
79,
6888,
11,
21136,
... | 2.392453 | 265 |
functions = {
'default-start':"""@minecraft:activator_rail\n""",
'default-end':"""setblock ~ ~1 ~ minecraft:chain_command_block[facing=up]{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}
setblock ~ ~ ~ minecraft:command_block[facing=up]{auto:1,Command:"kill @e[type=minecraft:command_block_minecart,distance=..2]"}\n"""... | [
12543,
2733,
796,
1391,
198,
220,
220,
220,
705,
12286,
12,
9688,
10354,
37811,
31,
17761,
25,
15791,
1352,
62,
30224,
59,
77,
15931,
1600,
198,
220,
220,
220,
705,
12286,
12,
437,
10354,
37811,
2617,
9967,
5299,
5299,
16,
5299,
6164,... | 2.636364 | 220 |
import logging
log = logging.getLogger(__name__)
| [
11748,
18931,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198
] | 2.941176 | 17 |
import math as m
# All functions expect base SI units for any arguments given
# DBT - Dry bulb temperature - Degrees Rankine, R
# DPT - Dew point temperature - Degress Rankine, R
# H - Specific enthalpy - British thermal unit per pound mass,
# ... | [
11748,
10688,
355,
285,
198,
198,
2,
1439,
5499,
1607,
2779,
25861,
4991,
329,
597,
7159,
1813,
198,
2,
360,
19313,
220,
220,
532,
22408,
28287,
5951,
220,
220,
220,
220,
220,
220,
220,
220,
220,
532,
25905,
6037,
10916,
500,
11,
37... | 2.536862 | 529 |
import time
#
if __name__=='__main__':
sub()
| [
11748,
640,
198,
2,
198,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
850,
3419,
628
] | 2.4 | 20 |
"""Run server as module"""
from argparse import ArgumentParser
from too_simple_server.configuration import DEFAULT_CFG_PATH
from too_simple_server.run import main
AGP = ArgumentParser(description="Mock server with simple DB interactions")
AGP.add_argument("--debug", action="store_true", default=None)
AGP.add_argument... | [
37811,
10987,
4382,
355,
8265,
37811,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
198,
6738,
1165,
62,
36439,
62,
15388,
13,
11250,
3924,
1330,
5550,
38865,
62,
22495,
38,
62,
34219,
198,
6738,
1165,
62,
36439,
62,
15388,
13,
5143,... | 2.9 | 230 |
## Program: VMTK
## Language: Python
## Date: February 12, 2018
## Version: 1.4
## Copyright (c) Richard Izzo, Luca Antiga, All rights reserved.
## See LICENSE file for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNE... | [
2235,
6118,
25,
569,
13752,
42,
198,
2235,
15417,
25,
220,
11361,
198,
2235,
7536,
25,
220,
220,
220,
220,
220,
3945,
1105,
11,
2864,
198,
2235,
10628,
25,
220,
220,
352,
13,
19,
198,
198,
2235,
220,
220,
15069,
357,
66,
8,
6219,
... | 1.469997 | 6,366 |
#Copyright (c) Facebook, Inc. and its affiliates.
#This source code is licensed under the MIT license found in the
#LICENSE file in the root directory of this source tree.
from SIM_utils.components.perf_sim import *
from SIM_utils.components.pow_sim import *
#from OSSIM_utils.components.pow_knob_sim import *
from desi... | [
2,
15269,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
1212,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
43,
2149,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
198,
... | 3.584615 | 130 |
from string import Template
from graphene.test import Client
from django.test import TestCase
from ipam.models import VLAN
from netbox_graphql.schema import schema
from netbox_graphql.tests.utils import obj_to_global_id
from netbox_graphql.tests.factories.ipam_factories import VLANFactory, RoleFactory
from netbox_g... | [
6738,
4731,
1330,
37350,
198,
198,
6738,
42463,
13,
9288,
1330,
20985,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
20966,
321,
13,
27530,
1330,
569,
25697,
198,
198,
6738,
2010,
3524,
62,
34960,
13976,
13,
1595... | 3.385965 | 114 |
import re
import json
import logging
from lxml import etree
from copy import deepcopy
from xmljson import Parker
from ncclient import xml_
from xml.etree import ElementTree
from collections import OrderedDict, defaultdict
from .errors import ModelError
from .composer import Tag, Composer
from .calculator import BaseCa... | [
11748,
302,
198,
11748,
33918,
198,
11748,
18931,
198,
6738,
300,
19875,
1330,
2123,
631,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
35555,
17752,
1330,
13612,
198,
6738,
299,
535,
75,
1153,
1330,
35555,
62,
198,
6738,
35555,
13,
31... | 1.900286 | 9,437 |
"""exercism tournament module."""
def tally(rows):
"""Tally the results of a small football competition.
Parameters
----------
arg1 : list
A list of the results of matches in the competition
Example: "Allegoric Alaskans;Blithering Badgers;win"
Returns
------
string
... | [
37811,
1069,
2798,
1042,
7756,
8265,
526,
15931,
628,
198,
4299,
26767,
7,
8516,
2599,
198,
220,
220,
220,
37227,
51,
453,
262,
2482,
286,
257,
1402,
4346,
5449,
13,
628,
220,
220,
220,
40117,
198,
220,
220,
220,
24200,
438,
198,
22... | 2.249524 | 525 |
import logging
from discord import Message
from discord.ext.commands import Cog, Context, command, has_permissions, Bot
from utils.utils import log_event, db, get_dict
from extensions.extension_templates import DatabaseHandler
DEFAULT_PREFIX = '?'
PREFIXES_DB_KEY = 'prefixes_for_servers'
###########################... | [
11748,
18931,
198,
6738,
36446,
1330,
16000,
198,
6738,
36446,
13,
2302,
13,
9503,
1746,
1330,
327,
519,
11,
30532,
11,
3141,
11,
468,
62,
525,
8481,
11,
18579,
198,
6738,
3384,
4487,
13,
26791,
1330,
2604,
62,
15596,
11,
20613,
11,
... | 2.746479 | 355 |
import gws
import importlib
| [
11748,
308,
18504,
198,
11748,
1330,
8019,
628
] | 3.625 | 8 |
"""
Blockchain configuration
"""
import os
import json
from dataclasses import dataclass, field, replace
from typing import List, Mapping, Optional
import yaml
import dacite
from .models import Peer, Channel, User, Orderer, ChaincodeSpec
from .models.gateway import Gateway
from .constants import ChaincodeLanguag... | [
37811,
198,
220,
220,
220,
29724,
8398,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
33918,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
11,
6330,
198,
6738,
19720,
1330,
7343,
11,
337,
5912,
11,
32233,
198,
198,
... | 3.744186 | 86 |
# -*- coding: utf-8 -*-
import nltk
from papersmith.editor.issue import Issue
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
299,
2528,
74,
198,
6738,
9473,
22947,
13,
35352,
13,
21949,
1330,
18232,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
... | 1.441441 | 111 |
import docutils
import docutils.nodes
import docutils.parsers.rst
import docutils.parsers.rst.directives
import sphinx.addnodes
import sphinx.application
import sphinx.directives
import sphinx.domains
import sphinx.environment
import sphinx.locale
import sphinx.roles
import sphinx.util.compat
import sphinx.util.docfiel... | [
11748,
2205,
26791,
198,
11748,
2205,
26791,
13,
77,
4147,
198,
11748,
2205,
26791,
13,
79,
945,
364,
13,
81,
301,
198,
11748,
2205,
26791,
13,
79,
945,
364,
13,
81,
301,
13,
12942,
1083,
198,
11748,
599,
20079,
87,
13,
2860,
77,
... | 2.784091 | 176 |
# encoding: utf-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Licens... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2... | 3.721805 | 266 |
import re
import datetime
import time
import urllib
import json
from inspect import ismethod
from django.views import generic
from django.utils import timezone
from django.utils.decorators import classonlymethod
from django.db.models import (
Model, Manager, AutoField, CharField
)
from django.db.models.query impo... | [
11748,
302,
198,
11748,
4818,
8079,
198,
11748,
640,
198,
11748,
2956,
297,
571,
198,
11748,
33918,
198,
198,
6738,
10104,
1330,
318,
24396,
198,
198,
6738,
42625,
14208,
13,
33571,
1330,
14276,
198,
6738,
42625,
14208,
13,
26791,
1330,
... | 3.270408 | 196 |
import pexpect
import boardfarm.config as config
from boardfarm.lib.bft_pexpect_helper import bft_pexpect_helper
| [
11748,
613,
87,
806,
198,
198,
11748,
3096,
43323,
13,
11250,
355,
4566,
198,
6738,
3096,
43323,
13,
8019,
13,
65,
701,
62,
24900,
806,
62,
2978,
525,
1330,
275,
701,
62,
24900,
806,
62,
2978,
525,
628
] | 3.026316 | 38 |
import os
import re
# https://docs.microsoft.com/en-us/typography/opentype/spec/featurelist
# https://docs.microsoft.com/en-us/typography/opentype/spec/scripttags
# https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
if __name__ == "__main__":
import sys
import time
baseURL = "http... | [
11748,
28686,
198,
11748,
302,
628,
628,
628,
198,
2,
3740,
1378,
31628,
13,
40485,
13,
785,
14,
268,
12,
385,
14,
28004,
4867,
14,
404,
298,
2981,
14,
16684,
14,
30053,
4868,
198,
2,
3740,
1378,
31628,
13,
40485,
13,
785,
14,
268... | 2.116942 | 667 |
from melody_feature import *
if __name__ == '__main__':
file = 'alphaville-forever_young.mid'
for k,note in note_from_midi_test(file):
print k
name = 'forever_youngy' + str(k)+'.txt'
vector_to_file(note,name) | [
6738,
32859,
62,
30053,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
2393,
796,
705,
17307,
615,
8270,
12,
754,
332,
62,
35465,
13,
13602,
6,
198,
220,
220,
220,
329,
479,
11,
... | 2.211009 | 109 |
import pytest
from fastapi import Request
from pytest_mock import MockerFixture
from starlette.datastructures import Headers
from fastapi_cloud_logging.request_logging_middleware import (
_FASTAPI_REQUEST_CONTEXT,
RequestLoggingMiddleware,
)
| [
11748,
12972,
9288,
198,
6738,
3049,
15042,
1330,
19390,
198,
6738,
12972,
9288,
62,
76,
735,
1330,
337,
12721,
37,
9602,
198,
6738,
3491,
21348,
13,
19608,
459,
1356,
942,
1330,
7123,
364,
198,
198,
6738,
3049,
15042,
62,
17721,
62,
... | 3.097561 | 82 |
import MailSpamFilter
| [
11748,
11099,
4561,
321,
22417,
628
] | 3.833333 | 6 |
#!/usr/bin/env python
import psutil
import sys
import time
# Return Virtual Memory Usage as a JSON
if __name__ == '__main__':
get_memory_percentage()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
26692,
22602,
198,
11748,
25064,
198,
11748,
640,
198,
198,
2,
8229,
15595,
14059,
29566,
355,
257,
19449,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,... | 3 | 52 |
# -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots["test_send_sms 1"] = {
"errors": [],
"messages": {"+358461231231": {"converted": "+358461231231", "status": "CREATED"}},
"warnings"... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11495,
1477,
24879,
25,
410,
16,
532,
3740,
1378,
42469,
13,
4743,
14,
89,
34,
19,
88,
52,
66,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
19... | 2.11 | 500 |
# -*- coding: utf-8 -*-
#
# Developed by Alex Jercan <jercan_alex27@yahoo.com>
#
# References:
# - https://github.com/XinJCheng/CSPN/blob/b3e487bdcdcd8a63333656e69b3268698e543181/cspn_pytorch/utils.py#L19
# - https://web.eecs.umich.edu/~fouhey/2016/evalSN/evalSN.html
#
from math import radians
import torch
import torc... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
6013,
276,
416,
4422,
449,
2798,
272,
1279,
73,
2798,
272,
62,
1000,
87,
1983,
31,
40774,
13,
785,
29,
198,
2,
198,
2,
31458,
25,
198,
2,
532,
3740,
1... | 2.242236 | 161 |
import numpy
import ielearn
from ielearn import extract, predict, util
| [
11748,
299,
32152,
198,
11748,
37941,
35720,
198,
6738,
37941,
35720,
1330,
7925,
11,
4331,
11,
7736,
628
] | 4 | 18 |
# No shebang line, this module is meant to be imported
#
# Copyright 2015 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | [
2,
1400,
673,
36668,
1627,
11,
428,
8265,
318,
4001,
284,
307,
17392,
198,
2,
198,
2,
15069,
1853,
12457,
1153,
11058,
402,
2022,
39,
1222,
1766,
13,
509,
38,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
... | 3.816 | 250 |
import warnings
warnings.filterwarnings('ignore')
import pandas as pd
import numpy as np
import seaborn as sns
#from sklearn.svm import SVC
#from sklearn.model_selection import KFold
from sklearn import preprocessing
import matplotlib.pyplot as plt
data=pd.read_csv('android.csv')
print(data.shape)
da... | [
11748,
14601,
201,
198,
40539,
654,
13,
24455,
40539,
654,
10786,
46430,
11537,
201,
198,
11748,
19798,
292,
355,
279,
67,
220,
220,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
384,
397,
1211,
355,
3013,
82,
201,
198,
2,... | 2.430544 | 1,159 |
"""
@brief test log(time=2s)
"""
import sys
import os
import unittest
from pyquickhelper.pycode import ExtTestCase
from pyquickhelper.ipythonhelper import AutoCompletion, AutoCompletionFile, MagicCommandParser, MagicClassWithHelpers, open_html_form
if __name__ == "__main__":
unittest.main()
| [
37811,
198,
31,
65,
3796,
220,
220,
220,
220,
220,
1332,
2604,
7,
2435,
28,
17,
82,
8,
198,
37811,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
6738,
12972,
24209,
2978,
525,
13,
9078,
8189,
1330,
5683,... | 2.904762 | 105 |
from .time_execution import *
| [
6738,
764,
2435,
62,
18558,
1009,
1330,
1635,
198
] | 3.333333 | 9 |
import unittest
from codalab.lib.bundle_cli import BundleCLI
| [
11748,
555,
715,
395,
198,
6738,
14873,
282,
397,
13,
8019,
13,
65,
31249,
62,
44506,
1330,
25282,
5097,
40,
628
] | 2.952381 | 21 |
# import to namespace
from gevent import select, socket # noqa
from gevent.queue import Empty, Full, Queue # noqa
| [
2,
1330,
284,
25745,
198,
6738,
4903,
1151,
1330,
2922,
11,
17802,
220,
1303,
645,
20402,
198,
6738,
4903,
1151,
13,
36560,
1330,
33523,
11,
6462,
11,
4670,
518,
220,
1303,
645,
20402,
198
] | 3.411765 | 34 |
#
# PySNMP MIB module ZYXEL-CLUSTER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZYXEL-CLUSTER-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:43:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
1168,
56,
55,
3698,
12,
5097,
7759,
1137,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
14490,... | 2.631535 | 3,634 |
NUM_CORES = 8
PATH_VALID_DEVICES = '/path/to/valid.pkl.gz'
PATH_DEVICES_DIR = '/path/to/devices/' | [
41359,
62,
44879,
1546,
796,
807,
198,
34219,
62,
23428,
2389,
62,
39345,
34444,
796,
31051,
6978,
14,
1462,
14,
12102,
13,
79,
41582,
13,
34586,
6,
198,
34219,
62,
39345,
34444,
62,
34720,
796,
31051,
6978,
14,
1462,
14,
42034,
14,
... | 2.255814 | 43 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from scrapy import cmdline
cmdline.execute("scrapy crawl dmzj".split()) | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
6738,
15881,
88,
1330,
23991,
1370,
198,
198,
28758,
1370,
13,
41049,
7203,
1416,
2416,
88,
27318,
288,
76,
89,
73,
1911,
35312,
... | 2.533333 | 45 |
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
"""
.
"""
def plt2d(data, types):
"""
.
:
data - pandas.DataFrame.
- X Y. - list.
types - . : "plot" - ,
, "scatter" - .
"""
# ,
ax = plt.figure... | [
11748,
2603,
29487,
8019,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
285,
489,
62,
25981,
74,
896,
13,
76,
29487,
18,
67,
1330,
12176,
274,
18,
35,
198,
198,
37811,
198,
764,
198,
37811,
198,
198,
4299,... | 1.814199 | 662 |
# -*- coding=utf-8 -*-
import pydicom
import os
import numpy
from os.path import splitext
import PIL.Image as Image
#CT
pathin = 'dcmin/'
pathout = 'dcmout/'
for root, dirs, files in os.walk(pathin):
for i in range(len(files)):
filename = files[i]
im = getfile(pathin + filename)
im1 = set... | [
2,
532,
9,
12,
19617,
28,
40477,
12,
23,
532,
9,
12,
198,
198,
11748,
279,
5173,
291,
296,
198,
11748,
28686,
198,
11748,
299,
32152,
198,
6738,
28686,
13,
6978,
1330,
4328,
578,
742,
198,
11748,
350,
4146,
13,
5159,
355,
7412,
19... | 2.117409 | 247 |
from setuptools import setup
setup(name='prepack',
version='0.4.2',
description='Python excel based data preparation library',
long_description="Library for preparing data for analysis. "
"Allows you to load and easily filter many same structure csv or xls, xlsx files. "
... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
3866,
8002,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
15,
13,
19,
13,
17,
3256,
198,
220,
220,
220,
220,
220,
6764,
11639,
37906,
27336,
1912,
1366,
11824,
... | 2.527728 | 559 |
# -*- coding: utf-8 -*-
the_count = [1, 2, 3, 4, 5]
fruits = ['apples', 'oranges', 'pears', 'apricots']
change = [1, 'pennies', 2, 'dimes', 3, 'quarters']
for i in the_count:
print(i)
for j in fruits:
print(j)
for k in change:
print(k)
element=[]
for i in range(6):
element.append(i)
for e in element:
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
1169,
62,
9127,
796,
685,
16,
11,
362,
11,
513,
11,
604,
11,
642,
60,
198,
198,
69,
50187,
796,
37250,
1324,
829,
3256,
705,
273,
6231,
3256,
705,
431,
945,
3... | 2.171053 | 152 |
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
APIKEY = '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'
message = Mail(
from_email='muxa2k11@gmail.com',
to_emails='... | [
2,
1262,
16290,
41339,
338,
11361,
10074,
198,
2,
3740,
1378,
12567,
13,
785,
14,
21280,
25928,
14,
21280,
25928,
12,
29412,
198,
11748,
28686,
198,
6738,
3758,
25928,
1330,
16290,
41339,
2969,
2149,
75,
1153,
198,
6738,
3758,
25928,
13... | 2.412811 | 281 |
from setuptools import setup, find_packages, Extension
from os import path
import os
# fmt: off
import pip
pip.main(['install', 'numpy>=1.18.0'])
import numpy
# fmt: on
here = path.abspath(path.dirname(__file__))
req = ["numpy>=1.18.0", "spatialgeometry>=0.2.0", "websockets"]
# Get the long description from the REA... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
11,
27995,
198,
6738,
28686,
1330,
3108,
198,
11748,
28686,
198,
198,
2,
46996,
25,
572,
198,
11748,
7347,
198,
79,
541,
13,
12417,
7,
17816,
17350,
3256,
705,
77,
32152,
29,
... | 2.627965 | 801 |
import sys
from decorator import decorator
from exception_reports.reporter import append_to_exception_message, create_exception_report
from exception_reports.storages import LocalErrorStorage
def exception_report(storage_backend=LocalErrorStorage(), output_format="html", data_processor=None):
"""
Decorator ... | [
11748,
25064,
198,
198,
6738,
11705,
1352,
1330,
11705,
1352,
198,
198,
6738,
6631,
62,
48922,
13,
260,
26634,
1330,
24443,
62,
1462,
62,
1069,
4516,
62,
20500,
11,
2251,
62,
1069,
4516,
62,
13116,
198,
6738,
6631,
62,
48922,
13,
301,... | 2.66875 | 320 |
from django import forms
# class RenewBookForm(forms.Form):
# renewal_date = forms.DateField(help_text="Enter a date between now and 4 weeks (default 3).")
# class NameForm(forms.Form):
# your_name = forms.CharField(label='Your name', max_length=100)
# class UserForm(forms.Form):
# username = forms... | [
6738,
42625,
14208,
1330,
5107,
628,
198,
2,
1398,
29479,
10482,
8479,
7,
23914,
13,
8479,
2599,
198,
2,
220,
220,
220,
220,
22901,
62,
4475,
796,
5107,
13,
10430,
15878,
7,
16794,
62,
5239,
2625,
17469,
257,
3128,
1022,
783,
290,
6... | 2.884615 | 156 |
from pathlib import PurePath
import importlib
from opera import stdlib
from opera.error import ParseError
from opera.parser import yaml
SUPPORTED_VERSIONS = dict(
tosca_simple_yaml_1_3="v_1_3",
)
| [
6738,
3108,
8019,
1330,
17129,
15235,
198,
11748,
1330,
8019,
198,
198,
6738,
27296,
1330,
14367,
8019,
198,
6738,
27296,
13,
18224,
1330,
2547,
325,
12331,
198,
6738,
27296,
13,
48610,
1330,
331,
43695,
628,
198,
40331,
15490,
1961,
62,
... | 2.861111 | 72 |
import json
from datetime import timedelta
from django.conf import settings
from django.http import HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils.timezone import now
from accounts.utils import get_imported_user
from annotati... | [
11748,
33918,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
7738,
1060,
11,
449,
1559,
31077,
198,
6738,
42625,
14208,
13,
19509... | 3.478873 | 355 |
""" Variant-level annotation functions requiring ClinvarDB and Metapub (NCBI/eutils). """
import requests, json, urllib
from metapub.text_mining import is_pmcid, is_ncbi_bookID
from metapub.pubmedcentral import get_pmid_for_otherid
from ..db.clinvar import ClinVarDB
from ..log import log
##########################... | [
37811,
38215,
12,
5715,
23025,
5499,
10616,
11834,
7785,
11012,
290,
3395,
499,
549,
357,
7792,
3483,
14,
68,
26791,
737,
37227,
198,
198,
11748,
7007,
11,
33918,
11,
2956,
297,
571,
198,
198,
6738,
1138,
499,
549,
13,
5239,
62,
45374... | 2.37077 | 1,389 |
"""
Functions and data for estimating taxes outside the income tax system.
Examples include value added tax, financial transaction tax, and carbon tax.
"""
import microdf as mdf
import numpy as np
import pandas as pd
# Source:
# https://www.taxpolicycenter.org/briefing-book/who-would-bear-burden-vat
VAT_INCIDENCE =... | [
37811,
198,
24629,
2733,
290,
1366,
329,
39539,
5704,
2354,
262,
3739,
1687,
1080,
13,
198,
27730,
2291,
1988,
2087,
1687,
11,
3176,
8611,
1687,
11,
290,
6588,
1687,
13,
198,
37811,
198,
198,
11748,
4580,
7568,
355,
285,
7568,
198,
19... | 2.476054 | 2,443 |
from utilities import Utilities
# from comment_level_evaluation import CommentLevelEvaluation
import operator
| [
6738,
20081,
1330,
41086,
198,
2,
422,
2912,
62,
5715,
62,
18206,
2288,
1330,
18957,
4971,
36,
2100,
2288,
198,
11748,
10088,
628,
628,
198
] | 4.56 | 25 |
import json
student = {
"ime" : "Milan",
"prezime" : "Tair",
"indeks" : 2008213514,
"ispiti" : [
{
"predmet" : "Programiranje 1",
"datum" : "2008-01-05",
"ocjena" : 10
},
{
"predmet" : "Informatika",
... | [
11748,
33918,
198,
198,
50139,
796,
1391,
198,
220,
220,
220,
366,
524,
1,
220,
220,
1058,
366,
24857,
272,
1600,
198,
220,
220,
220,
366,
3866,
89,
524,
1,
220,
220,
1058,
366,
51,
958,
1600,
198,
220,
220,
220,
366,
521,
2573,
... | 1.784024 | 338 |
import pandas as pd
import xlrd
import xlsxwriter
from p01_kennenlernen import meinebibliothek
df = pd.read_excel("O:\___Python\personen.xlsx") # importieren von excel nach python mit datumsangabe in Timestamp
print(df)
print()
df1 = pd.to_datetime(df["Geburtsdatum"]) # umwandeln von Timestamp in datetime
... | [
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
2124,
75,
4372,
201,
198,
11748,
2124,
7278,
87,
16002,
201,
198,
6738,
279,
486,
62,
74,
1697,
268,
75,
1142,
268,
1330,
502,
500,
65,
29142,
20388,
74,
201,
198,
201,
198,
201,
1... | 2.503529 | 425 |
from spec import eq_
from invoke import ctask
| [
6738,
1020,
1330,
37430,
62,
198,
198,
6738,
26342,
1330,
269,
35943,
628
] | 3.692308 | 13 |
import os
import csv
import numpy as np
import pandas as pd
import pickle as pk
from glob import glob
from math import ceil
from vmz_interface.data.db_video_create import create_video_db
| [
11748,
28686,
198,
11748,
269,
21370,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2298,
293,
355,
279,
74,
198,
6738,
15095,
1330,
15095,
198,
6738,
10688,
1330,
2906,
346,
198,
198,
6738,
45887... | 3.186441 | 59 |
import time
import base64
import pytest
import responses
from oic.oic import AuthorizationResponse, AccessTokenResponse, TokenErrorResponse, OpenIDSchema, \
AuthorizationErrorResponse
from urllib.parse import parse_qsl, urlparse
from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata... | [
11748,
640,
198,
198,
11748,
2779,
2414,
198,
11748,
12972,
9288,
198,
11748,
9109,
198,
6738,
267,
291,
13,
78,
291,
1330,
35263,
31077,
11,
8798,
30642,
31077,
11,
29130,
12331,
31077,
11,
4946,
14255,
2395,
2611,
11,
3467,
198,
220,
... | 2.330601 | 1,098 |
# Thanks to zecoxao and flatz <3
import struct
from binascii import unhexlify as uhx
from binascii import hexlify as hx
from Crypto.Cipher import AES
from Crypto.Hash import SHA, HMAC, CMAC
import os
import sys
EID1KEYS = [
'88228B0F92C4C36AF097F1FE948D27CE',
'5794BC8C2131B1E3E7EC61EF14C32EB5',
]
I... | [
2,
6930,
284,
1976,
721,
1140,
5488,
290,
6228,
89,
1279,
18,
201,
198,
201,
198,
11748,
2878,
201,
198,
6738,
9874,
292,
979,
72,
1330,
555,
33095,
75,
1958,
355,
21480,
87,
201,
198,
6738,
9874,
292,
979,
72,
1330,
17910,
75,
19... | 2.007782 | 257 |
if __name__ == "__main__":
stick = Stick()
stick.length(120)
stick.location(0)
print(stick.length, stick.location)
| [
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
4859,
796,
22994,
3419,
198,
220,
220,
220,
4859,
13,
13664,
7,
10232,
8,
198,
220,
220,
220,
4859,
13,
24886,
7,
15,
8,
628,
220,
220,
220,
... | 2.436364 | 55 |
################################################################################
# Copyright IBM Corporation 2021, 2022
#
# 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.ap... | [
29113,
29113,
14468,
198,
2,
15069,
19764,
10501,
33448,
11,
33160,
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... | 3.826471 | 340 |
import logging
from evernote.api.client import EvernoteClient
from evernote.edam.notestore.ttypes import NoteFilter, NotesMetadataResultSpec
from evernote.edam.error.ttypes import (EDAMSystemException, EDAMErrorCode)
import pickle
import sys
from datetime import datetime
from time import sleep
import os
logger = logg... | [
11748,
18931,
198,
6738,
304,
933,
1258,
13,
15042,
13,
16366,
1330,
412,
933,
1258,
11792,
198,
6738,
304,
933,
1258,
13,
276,
321,
13,
1662,
395,
382,
13,
83,
19199,
1330,
5740,
22417,
11,
11822,
9171,
14706,
23004,
22882,
198,
6738... | 2.579197 | 1,894 |
import click
import os
_DEAFULT_TEMPLATE_FILE = 'template.[yaml|yml]'
def template_click_option():
"""
Click Option for template option
"""
return click.option('--template', '-t',
default=_DEAFULT_TEMPLATE_FILE,
type=click.Path(exists=True),
... | [
11748,
3904,
198,
11748,
28686,
628,
198,
62,
7206,
8579,
16724,
62,
51,
3620,
6489,
6158,
62,
25664,
796,
705,
28243,
3693,
88,
43695,
91,
88,
4029,
49946,
628,
198,
198,
4299,
11055,
62,
12976,
62,
18076,
33529,
198,
220,
220,
220,
... | 1.862903 | 248 |
#!/usr/bin/env python
# This is a basic example for a socket server for the GoPiGo.
# This allows the client to connects can be used to respond to the commands and run the GoPiGo
# the socket server is running on Port 5005 on localhost
# Send a single byte command to the server from the client:
#
# fwd #Move forwar... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
220,
198,
198,
2,
770,
318,
257,
4096,
1672,
329,
257,
17802,
4382,
329,
262,
1514,
38729,
5247,
13,
198,
2,
770,
3578,
262,
5456,
284,
20417,
460,
307,
973,
284,
3031,
284,
262,
9729,
... | 3.145251 | 358 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : zerlous
# @File : 003.py
# @Time : 2019-04-02 23:15
# 100168
# x + 100 = m^2 , x + 268 = n^2
# => n^2 - m^2 = 168
# => (m+n)(m-n) = 168
# => i = m+n, j = m -n, i*j=168
# => m=(i+j)/2, n =(i-j)/2 i,j | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
13838,
1058,
1976,
263,
75,
516,
198,
2,
2488,
8979,
1058,
3571,
18,
13,
9078,
198,
2,
2488,
7575,
1058,
1... | 1.797203 | 143 |
ERROR_TEXT = "Sources can not be set if country or category is set."
| [
24908,
62,
32541,
796,
366,
21188,
460,
407,
307,
900,
611,
1499,
393,
6536,
318,
900,
526,
628
] | 3.888889 | 18 |
from django.contrib.auth import forms as auth_forms, get_user_model
from django.core.validators import MinLengthValidator
from final_project.accounts.helpers import BootstrapFormMixin
from final_project.accounts.models import Profile
from django import forms
from final_project.main.validators import validate_only_let... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5107,
355,
6284,
62,
23914,
11,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
7295,
13,
12102,
2024,
1330,
1855,
24539,
47139,
1352,
198,
198,
6738,
2457,
62,
16302,
13,
233... | 3.59596 | 99 |
from plotly import graph_objs as go
from stats.funnel import create_funnel_df, group_funnel_dfs
def plot_stacked_funnel(events, steps, col=None, from_date=None, to_date=None, step_interval=0):
"""
Function used for producing a funnel plot
:param events: (DataFrame)
events dataframe
... | [
6738,
7110,
306,
1330,
4823,
62,
672,
8457,
355,
467,
198,
6738,
9756,
13,
12543,
4954,
1330,
2251,
62,
12543,
4954,
62,
7568,
11,
1448,
62,
12543,
4954,
62,
7568,
82,
628,
198,
4299,
7110,
62,
301,
6021,
62,
12543,
4954,
7,
31534,
... | 1.929071 | 1,001 |
import unittest
import geopandas as gpd
import numpy as np
from libpysal.examples import load_example
from segregation.local import LocalRelativeCentralization
if __name__ == "__main__":
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
11748,
30324,
392,
292,
355,
27809,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
9195,
79,
893,
282,
13,
1069,
12629,
1330,
3440,
62,
20688,
198,
6738,
26718,
13,
12001,
1330,
10714,
6892,
876,
30... | 3.149254 | 67 |
from office365.runtime.client_value import ClientValue
| [
6738,
2607,
24760,
13,
43282,
13,
16366,
62,
8367,
1330,
20985,
11395,
628
] | 4.307692 | 13 |
"""Packaging script for ardubus"""
import os
import subprocess
import setuptools
GIT_VERSION = 'UNKNOWN'
try:
GIT_VERSION = subprocess.check_output(['git', 'rev-parse', '--verify', '--short', 'HEAD']).decode('ascii').strip()
except subprocess.CalledProcessError:
pass
setuptools.setup(
name='ardubus',
... | [
37811,
11869,
3039,
4226,
329,
33848,
549,
385,
37811,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
198,
11748,
900,
37623,
10141,
198,
198,
38,
2043,
62,
43717,
796,
705,
4944,
44706,
6,
198,
28311,
25,
198,
220,
220,
220,
402,
20... | 2.60828 | 314 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 9 19:49:52 2020
@author: gykovacs
"""
import numpy as np
# dimensionality
n_d = 8
# bins
n_bins = 3
t= generate_template()
print('t', t)
A= generate_A(t)
print('A', A)
S_u = generate_S_unique(t)
print('S_u', S_u)
m= generate_m(t)
print('... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
26223,
5979,
220,
860,
678,
25,
2920,
25,
4309,
12131,
198,
198,
31,
9800,
25,
21486,
218... | 1.797956 | 2,935 |
"""
3. Longest Substring Without Repeating Characters
Given a string s,
find the length of the longest substring without repeating characters.
Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.
Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The answer is "b", wi... | [
37811,
198,
18,
13,
5882,
395,
3834,
8841,
9170,
30558,
803,
26813,
198,
198,
15056,
257,
4731,
264,
11,
220,
198,
19796,
262,
4129,
286,
262,
14069,
3293,
1806,
1231,
20394,
3435,
13,
198,
198,
16281,
352,
25,
198,
20560,
25,
264,
... | 2.780822 | 438 |
#!/usr/bin/env python3
"""Pattoo .Agent class.
Description:
This script:
1) Processes a variety of information from agents
2) Posts the data using HTTP to a server listed
in the configuration file
"""
# Standard libraries
import textwrap
import sys
import time
import argparse
import ip... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
47,
1078,
2238,
764,
36772,
1398,
13,
198,
198,
11828,
25,
628,
220,
220,
220,
770,
4226,
25,
198,
220,
220,
220,
220,
220,
220,
220,
352,
8,
10854,
274,
257,
4996,
286,... | 2.612829 | 873 |
#####################################################################################################################################################################
# xView2 ... | [
29113,
29113,
29113,
29113,
29113,
4242,
2,
198,
2,
2124,
7680,
17,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.06728 | 1,739 |
# coding: utf-8
# flake8: noqa
"""
FeersumNLU API Utils
"""
from feersum_nlu_util import transfer
from feersum_nlu_util import image_utils
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
781,
539,
23,
25,
645,
20402,
198,
198,
37811,
198,
220,
220,
220,
5452,
364,
388,
32572,
52,
7824,
7273,
4487,
198,
198,
37811,
198,
198,
6738,
730,
364,
388,
62,
77,
2290,
62,
22602... | 2.370968 | 62 |
from random import randint, shuffle
from time import time
import os
import re
gen_playlist()
| [
6738,
4738,
1330,
43720,
600,
11,
36273,
198,
6738,
640,
1330,
640,
198,
11748,
28686,
198,
11748,
302,
628,
628,
628,
628,
628,
198,
5235,
62,
1759,
4868,
3419,
198
] | 3.433333 | 30 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for cynetworkx
You can install cynetworkx with
python setup.py install
"""
from glob import glob
import os
import sys
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
from setuptools import setup
from setuptools.extension import Extension
from Cy... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
40786,
4226,
329,
19768,
316,
1818,
87,
198,
198,
1639,
460,
2721,
19768,
316,
1818,
87,
351,
198,
198,
2... | 2.638874 | 11,082 |
# Mrs
# Copyright 2008-2012 Brigham Young University
#
# 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 o... | [
2,
9074,
198,
2,
15069,
3648,
12,
6999,
37434,
6960,
2059,
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,
262,
137... | 3.707182 | 181 |
import typing
from libragram import librabot
from libragram.objects.decorators import callback
from libragram.objects.filters import *
bot = librabot(token = "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", trust_env=True)
bot.run(bot.start_polling()) | [
11748,
19720,
198,
6738,
300,
2889,
6713,
1330,
300,
2889,
397,
313,
198,
6738,
300,
2889,
6713,
13,
48205,
13,
12501,
273,
2024,
1330,
23838,
198,
6738,
300,
2889,
6713,
13,
48205,
13,
10379,
1010,
1330,
1635,
628,
198,
13645,
796,
3... | 2.680412 | 97 |
##Author : Nicolas Farrugia, February 2020
from torchvision.models.detection import fasterrcnn_resnet50_fpn
import torch
from torchvision.io import read_video,read_video_timestamps
import matplotlib.patches as patches
from matplotlib import pyplot as plt
import datetime
import os
#### imagenet categories
cat... | [
2235,
13838,
1058,
29737,
6755,
2143,
544,
11,
3945,
12131,
198,
198,
6738,
28034,
10178,
13,
27530,
13,
15255,
3213,
1330,
5443,
6015,
20471,
62,
411,
3262,
1120,
62,
69,
21999,
198,
11748,
28034,
198,
6738,
28034,
10178,
13,
952,
1330... | 2.582255 | 541 |