content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import os
from setuptools import setup
import pysmartprice
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='python-smartprice'... | [
11748,
28686,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
11748,
279,
893,
13822,
20888,
198,
198,
4480,
1280,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
15675,
11682,
13,
81,
301... | 2.379781 | 366 |
#import built-in modules
import os
import cPickle
from collections import defaultdict
#installed module or modules in this folder
from lxml import etree
import utils
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
'''
IAA
(1) sval2 http://www.aclweb.org/anthology/S01-1005: NA
(2) sval3 http://ww... | [
2,
11748,
3170,
12,
259,
13103,
198,
11748,
28686,
198,
11748,
269,
31686,
293,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
2,
37050,
8265,
393,
13103,
287,
428,
9483,
198,
6738,
300,
19875,
1330,
2123,
631,
198,
11748,
3384,
4487,
... | 1.799499 | 3,192 |
import logging
from db.cache import get_cache
import settings
import api.v1
from api import app
application = app
# Clear memcached cache on startup
cache = get_cache()
cache.invalidate(True)
if settings.SENTRY_CONNECTION_STRING is not None:
from raven.contrib.flask import Sentry
sentry = Sentry(dsn=settings.... | [
11748,
18931,
198,
6738,
20613,
13,
23870,
1330,
651,
62,
23870,
198,
11748,
6460,
198,
11748,
40391,
13,
85,
16,
198,
6738,
40391,
1330,
598,
198,
198,
31438,
796,
598,
198,
2,
11459,
1066,
66,
2317,
12940,
319,
13693,
198,
23870,
79... | 2.95 | 140 |
from Beam import Beam
#from Empty import Optical_element
from OpticalElement import Optical_element
from SurfaceConic import SurfaceConic
from Shape import BoundaryRectangle
import numpy as np
from SurfaceConic import SurfaceConic
import matplotlib.pyplot as plt
from Vector import Vector
| [
6738,
25855,
1330,
25855,
198,
2,
6738,
33523,
1330,
49593,
62,
30854,
198,
6738,
49593,
20180,
1330,
49593,
62,
30854,
198,
6738,
20321,
3103,
291,
1330,
20321,
3103,
291,
198,
6738,
25959,
1330,
30149,
560,
45474,
9248,
198,
11748,
299,... | 4.171429 | 70 |
# class Interaction:
# def __init__(self, user, question, answer, score, date, transcript_id, interaction_id, display_seq):
# self.user = user
# self.question = question
# self.answer = answer
# self.score = score
# self.date = date
# self.transcript_id = transcrip... | [
628,
198,
2,
1398,
4225,
2673,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2836,
11,
1808,
11,
3280,
11,
4776,
11,
3128,
11,
14687,
62,
312,
11,
10375,
62,
312,
11,
3359,
62,
41068,
2599,
198,
2,
220,
2... | 2.311927 | 218 |
import json
import requests
from django.conf import settings
from bot.enums import HttpMethods
from bot.exceptions import DiscordApiException
NO_ERROR_STATUS = (200, 201, 202, 100, 101)
def discord_api_request(url, method=HttpMethods.GET, data=None):
"""
Makes a request to the URL with the current Bot got ... | [
11748,
33918,
198,
198,
11748,
7007,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
10214,
13,
268,
5700,
1330,
367,
29281,
46202,
198,
6738,
10214,
13,
1069,
11755,
1330,
39462,
32,
14415,
16922,
198,
198,
15285,
62,
2... | 2.742188 | 640 |
import matplotlib.pyplot as plt
import random
import pickle
from skimage.transform import rotate
from scipy import ndimage
from skimage.util import img_as_ubyte
from joblib import Parallel, delayed
from sklearn.ensemble.forest import _generate_unsampled_indices
from sklearn.ensemble.forest import _generate_sample_indic... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
4738,
198,
11748,
2298,
293,
198,
6738,
1341,
9060,
13,
35636,
1330,
23064,
198,
6738,
629,
541,
88,
1330,
299,
67,
9060,
198,
6738,
1341,
9060,
13,
22602,
1330,
337... | 3.495082 | 305 |
import argparse
import glob, os, shutil, sys
import numpy as np
import pytest
from ..qcSTR import *
from ..qcSTR import _QualityTypes
# Set up base argparser
# Just confirm that the method doesn't throw an error
# Just confirm that the method doesn't throw an error
# Just confirm that the method doesn't throw an ... | [
11748,
1822,
29572,
198,
11748,
15095,
11,
28686,
11,
4423,
346,
11,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
6738,
11485,
80,
66,
18601,
1330,
1635,
198,
6738,
11485,
80,
66,
18601,
1330,
4808,
3501... | 3.464567 | 127 |
# Standard libraries
from dataclasses import dataclass, field
from typing import List, Optional
# Third party libraries
from dataclasses_json import dataclass_json
# Project
from tilda_wrapper_api.dataclasses.base import BaseObject
@dataclass_json
@dataclass(frozen=True)
@dataclass_json
@dataclass(frozen=True)
... | [
2,
8997,
12782,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
19720,
1330,
7343,
11,
32233,
198,
198,
2,
10467,
2151,
12782,
198,
6738,
4818,
330,
28958,
62,
17752,
1330,
4818,
330,
31172,
62,
17752,
198,
1... | 3.02521 | 119 |
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
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,
322... | 2.675734 | 1,838 |
import os
import re
import shutil
import subprocess
import textwrap
import traceback
import unittest
from amaranth.hdl.ast import *
from amaranth.hdl.ir import *
from amaranth.back import rtlil
from amaranth._toolchain import require_tool
__all__ = ["FHDLTestCase"]
| [
11748,
28686,
198,
11748,
302,
198,
11748,
4423,
346,
198,
11748,
850,
14681,
198,
11748,
2420,
37150,
198,
11748,
12854,
1891,
198,
11748,
555,
715,
395,
198,
198,
6738,
716,
19173,
400,
13,
71,
25404,
13,
459,
1330,
1635,
198,
6738,
... | 3.068182 | 88 |
# from /RelValQCD_Pt_3000_3500/CMSSW_2_1_0_pre6-RelVal-1213987236-IDEAL_V2-2nd/GEN-SIM-DIGI-RAW-HLTDEBUG-RECO
import FWCore.ParameterSet.Config as cms
# from
| [
2,
422,
1220,
6892,
7762,
48,
8610,
62,
47,
83,
62,
23924,
62,
2327,
405,
14,
24187,
5432,
54,
62,
17,
62,
16,
62,
15,
62,
3866,
21,
12,
6892,
7762,
12,
1065,
1485,
44183,
24940,
12,
14114,
1847,
62,
53,
17,
12,
17,
358,
14,
... | 1.987654 | 81 |
# Generated by Django 3.1.1 on 2020-12-05 10:48
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
16,
319,
12131,
12,
1065,
12,
2713,
838,
25,
2780,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014 PHYTEC Messtechnik GmbH
# adapted from a script by Jan Lübbe
import sys
import re
import argparse
import os
def is_dir(dirname):
"""Checks if a path is an actual directory"""
if not os.path.isdir(dirname):
msg = "{0} is not a directory".f... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
1946,
9370,
56,
51,
2943,
14937,
4169,
1349,
1134,
402,
2022,
39,
198,
2,
16573,
422,
257,
4226,
416,
2365,... | 2.494505 | 182 |
# <pep8-80 compliant>
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# ... | [
2,
1279,
431,
79,
23,
12,
1795,
31332,
29,
198,
198,
2,
46424,
347,
43312,
38644,
38559,
24290,
9878,
11290,
46424,
198,
2,
198,
2,
220,
770,
1430,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
198,
2,
220,
13096,... | 2.733645 | 856 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 16 20:28:10 2020
@author: Xuheng Ding
"""
import numpy as np
import matplotlib.pyplot as plt
import astropy.io.fits as pyfits
from matplotlib.colors import LogNorm
from galight.tools.measure_tools import SB_profile
import copy, matplotlib
from matp... | [
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,
3300,
8621,
1467,
1160,
25,
2078,
25,
940,
12131,
198,
198,
31,
9800,
25,
33591,
31753,
4... | 1.848677 | 8,201 |
########################################################################
# $Header: /var/local/cvsroot/4Suite/Ft/Xml/XPath/CoreFunctions.py,v 1.31.4.1 2006/09/18 13:49:49 uogbuji Exp $
"""
The implementation of the core functions from XPath 1.0.
Copyright 2006 Fourthought, Inc. (USA).
Detailed license and copyright in... | [
29113,
29113,
7804,
198,
2,
720,
39681,
25,
1220,
7785,
14,
12001,
14,
66,
14259,
15763,
14,
19,
5606,
578,
14,
37,
83,
14,
55,
4029,
14,
55,
15235,
14,
14055,
24629,
2733,
13,
9078,
11,
85,
352,
13,
3132,
13,
19,
13,
16,
4793,
... | 2.453539 | 5,510 |
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
| [
2,
30396,
329,
1702,
306,
12,
25614,
1351,
13,
198,
2,
1398,
7343,
19667,
7,
15252,
2599,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2124,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2100... | 2.253968 | 63 |
import sys
import serial
import time
import numpy as np
import copy
try:
from urllib.parse import quote
from urllib.request import urlopen
except ImportError:
# from urlparse import quote
from urllib import quote
from urllib2 import urlopen
# https://github.com/markjones112358/pyInstruments
clas... | [
11748,
25064,
198,
11748,
11389,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4866,
628,
198,
28311,
25,
198,
220,
220,
220,
422,
2956,
297,
571,
13,
29572,
1330,
9577,
198,
220,
220,
220,
422,
2956,
297,
571,
13,
... | 2.117028 | 11,023 |
from .aggregation import aggregate_with_sparse
from .array_mapper import ArrayMapper
from .indexers import Indexer, Proxy
from bw_processing import DatapackageBase
from stats_arrays import MCRandomNumberGenerator
from typing import Any, Union, Callable
import numpy as np
class ResourceGroup:
"""A class that hand... | [
6738,
764,
9460,
43068,
1330,
19406,
62,
4480,
62,
82,
29572,
198,
6738,
764,
18747,
62,
76,
11463,
1330,
15690,
44,
11463,
198,
6738,
764,
9630,
364,
1330,
12901,
263,
11,
38027,
198,
6738,
275,
86,
62,
36948,
1330,
16092,
499,
441,
... | 2.6835 | 2,297 |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import decorators
from telemetry.page import page as page_module
from telemetry.testing import browser_test_case
from telemetry.testing import... | [
2,
15069,
1853,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
6738,... | 3.63388 | 183 |
from collections import defaultdict
class LazyDefaultDict(defaultdict):
"""
LazyDefaultDict(default_factory[, ...]) --> dict with default factory
The default factory is call with the key argument to produce
a new value when a key is not present, in __getitem__ only.
A LazyDefaultDict compares equ... | [
6738,
17268,
1330,
4277,
11600,
628,
198,
4871,
406,
12582,
19463,
35,
713,
7,
12286,
11600,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
406,
12582,
19463,
35,
713,
7,
12286,
62,
69,
9548,
58,
11,
2644,
12962,
14610,
8633,
... | 2.851351 | 296 |
import time
import numpy as np
import io
import struct
import os
import ctypes
import sys
from .fast_file import *
from .dxgi_97 import process_image_97
from .dxgi_94_95_96 import process_image_94_95_96
from .dxgi_types import *
from numba import njit
process_image_func = None
c_process_image_lib = None
c_process_imag... | [
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33245,
198,
11748,
2878,
198,
11748,
28686,
198,
11748,
269,
19199,
198,
11748,
25064,
198,
6738,
764,
7217,
62,
7753,
1330,
1635,
198,
6738,
764,
34350,
12397,
62,
5607,
1330,
... | 2.525469 | 373 |
# 入力
N = int(input())
A = list(map(int, input().split()))
S = sum(A)
# A_{i + 1} - A_i から解を求める
ans = (
'YES' if (2 * S) % (N * (N + 1)) == 0 and all(
k % N == 0 and k >= 0
for k in (
(2 * S) // (N * (N + 1)) - (A[i] - A[i - 1])
for i in range(N)
)
) else
'NO... | [
2,
10263,
227,
98,
27950,
249,
198,
45,
796,
493,
7,
15414,
28955,
198,
32,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
198,
198,
50,
796,
2160,
7,
32,
8,
198,
198,
2,
317,
23330,
72,
1343,
352,
92,
532,
31... | 1.571429 | 217 |
from conans import ConanFile, CMake, tools
| [
6738,
369,
504,
1330,
31634,
8979,
11,
327,
12050,
11,
4899,
628
] | 3.666667 | 12 |
import pytest
import deepdiff
import typing
from sqlalchemy.orm import Session
from mlrun.api import schemas
from mlrun.api.db.base import DBInterface
from mlrun.api.db.sqldb.models import (
_classes,
Function,
Project,
Run,
Artifact,
FeatureSet,
Feature,
Entity,
Schedule,
)
from te... | [
11748,
12972,
9288,
198,
11748,
2769,
26069,
198,
11748,
19720,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
23575,
198,
198,
6738,
25962,
5143,
13,
15042,
1330,
3897,
5356,
198,
6738,
25962,
5143,
13,
15042,
13,
9945,
13,
8692,
1330,
2... | 2.688119 | 202 |
import time
import requests
import click
from . import decorators
from .. import jenkins_api
from .. import utils
RESULT_COLORS = {
'SUCCESS': 'green',
'UNSTABLE': 'yellow',
'FAILURE': 'red',
}
@click.command()
@click.option('--block/--no-block', default=False, help='Block until builds '
... | [
11748,
640,
198,
198,
11748,
7007,
198,
11748,
3904,
198,
198,
6738,
764,
1330,
11705,
2024,
198,
6738,
11485,
1330,
474,
268,
5331,
62,
15042,
198,
6738,
11485,
1330,
3384,
4487,
628,
198,
19535,
16724,
62,
25154,
20673,
796,
1391,
198... | 2.207247 | 1,573 |
__version__ = "9.3.0"
| [
834,
9641,
834,
796,
366,
24,
13,
18,
13,
15,
1,
198
] | 1.833333 | 12 |
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.mail import send_mail
from django.forms.models import BaseModelFormSet, modelformset_factory
from django.template import loader
from django.utils.crypto import get_random_string
from django.utils.translation im... | [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
49315,
13,
19509,
23779,
1330,
651,
62,
14421,
62,
15654,
198,
6738,
42625,
14208,
13,
7295,
13,
4529,
1330,
3758,
62,
4529,
198,
6738,
42625,
14208,... | 2.856557 | 244 |
# -*- python2 -*-
#
# Copyright 2010 The Native Client Authors. All rights reserved. Use
# of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../../../build/common.gypi',
],
'target_defaults': {
'variables':{
'target_base': 'none',
... | [
2,
532,
9,
12,
21015,
17,
532,
9,
12,
198,
2,
198,
2,
15069,
3050,
383,
12547,
20985,
46665,
13,
220,
1439,
2489,
10395,
13,
220,
5765,
198,
2,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
30... | 1.930171 | 759 |
__all__ = [
"hsl_to_rgb",
"hue_to_value",
"map",
]
| [
628,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
366,
71,
6649,
62,
1462,
62,
81,
22296,
1600,
198,
220,
220,
220,
366,
71,
518,
62,
1462,
62,
8367,
1600,
198,
220,
220,
220,
366,
8899,
1600,
198,
60,
198
] | 1.55814 | 43 |
from one.api import ONE
from ibllib.atlas import atlas
from brainbox.io.one import load_channels_from_insertion
pid = "8413c5c6-b42b-4ec6-b751-881a54413628"
ba = atlas.AllenAtlas()
xyz = load_channels_from_insertion(ONE().alyx.rest('insertions', 'read', id=pid), ba=ba)
| [
6738,
530,
13,
15042,
1330,
16329,
198,
198,
6738,
24283,
297,
571,
13,
265,
21921,
1330,
379,
21921,
198,
6738,
3632,
3524,
13,
952,
13,
505,
1330,
3440,
62,
354,
8961,
62,
6738,
62,
28463,
295,
198,
198,
35317,
796,
366,
5705,
148... | 2.415929 | 113 |
#!/usr/bin/env python2.7
# -*- coding:UTF-8 -*-2
u"""install.py
Copyright (c) 2019 Yukio Kuro
This software is released under BSD license.
Linux用インストーラ。
"""
import os as __os
import sys as __sys
import shutil as __shutil
__shell_script = __os.path.join(__sys.exec_prefix, "games", "starseeker")
__icon = __os.path.join... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
2,
532,
9,
12,
19617,
25,
48504,
12,
23,
532,
9,
12,
17,
198,
84,
37811,
17350,
13,
9078,
198,
198,
15269,
357,
66,
8,
13130,
19760,
952,
25796,
198,
1212,
3788,
318,... | 2.342439 | 1,025 |
# HeraldBot - polling notification bot for Discord
# Written in 2018 by Sam Hanes <sam@maltera.com>
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
... | [
2,
18277,
20630,
532,
13985,
14483,
10214,
329,
39462,
198,
2,
22503,
287,
2864,
416,
3409,
367,
7305,
1279,
37687,
31,
7617,
49600,
13,
785,
29,
198,
2,
198,
2,
1675,
262,
6287,
1744,
739,
1099,
11,
262,
1772,
7,
82,
8,
423,
7256... | 3.835366 | 164 |
from typing import Dict, Type
from .common import DataFetcher
from .pypi import PypiDataFetcher
from .crates import CratesDataFetcher
from .cran import CranDataFetcher
KNOWN_FETCHERS: Dict[str, Type[DataFetcher]] = {
"pypi": PypiDataFetcher,
"crates": CratesDataFetcher,
"cran": CranDataFetcher,
}
__all_... | [
6738,
19720,
1330,
360,
713,
11,
5994,
198,
198,
6738,
764,
11321,
1330,
6060,
37,
316,
2044,
198,
6738,
764,
79,
4464,
72,
1330,
350,
4464,
72,
6601,
37,
316,
2044,
198,
6738,
764,
6098,
689,
1330,
3864,
689,
6601,
37,
316,
2044,
... | 2.268041 | 194 |
# Time: O(m * n)
# Space: O(1)
# 840
# A 3 x 3 magic square is a 3 x 3 grid filled with
# distinct numbers from 1 to 9 such that each row, column,
# and both diagonals all have the same sum.
#
# Given an grid of integers, how many 3 x 3 "magic square" subgrids are there?
# (Each subgrid is contiguous).
#
# Example 1:... | [
2,
3862,
25,
220,
440,
7,
76,
1635,
299,
8,
198,
2,
4687,
25,
440,
7,
16,
8,
198,
198,
2,
48777,
198,
2,
317,
513,
2124,
513,
5536,
6616,
318,
257,
513,
2124,
513,
10706,
5901,
351,
198,
2,
7310,
3146,
422,
352,
284,
860,
88... | 2.411429 | 350 |
import setuptools
setuptools.setup(
name="gabri",
version="0.0.2",
author="Jenisha Thankaraj",
packages=setuptools.find_packages(),
python_requires='>=3.6.8',
install_requires=[
"tqdm~=4.48.2",
"matplotlib~=3.2.2",
"tensorboard~=2.2.0",
"albumentations~=0.4.6",
... | [
11748,
900,
37623,
10141,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
220,
220,
220,
1438,
2625,
70,
397,
380,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
15,
13,
17,
1600,
198,
220,
220,
220,
1772,
2625,
44875,
19388,
6952,
... | 1.76569 | 239 |
from dataclasses import dataclass
from typing import Optional, Dict, List
@dataclass(frozen=True)
@dataclass(frozen=True)
@dataclass(frozen=True)
@dataclass(frozen=True)
@dataclass(frozen=True)
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
32233,
11,
360,
713,
11,
7343,
628,
198,
31,
19608,
330,
31172,
7,
69,
42005,
28,
17821,
8,
628,
198,
31,
19608,
330,
31172,
7,
69,
42005,
28,
17821,
8,
628,
... | 2.582278 | 79 |
from nose.tools import timed
@timed(1)
@timed(1)
@timed(1)
| [
6738,
9686,
13,
31391,
1330,
28805,
628,
628,
198,
31,
16514,
276,
7,
16,
8,
628,
198,
31,
16514,
276,
7,
16,
8,
628,
198,
31,
16514,
276,
7,
16,
8,
198
] | 2.09375 | 32 |
# -*- coding: utf-8 -*-
import logging
import pada
TRACE = 7
SIMPLE_LOG_FORMAT = r'%(levelname)s - %(message)s'
DETAIL_LOG_FORMAT = r'[%(asctime)s] {%(name)s: %(filename)s:%(lineno)d} %(levelname)s - %(message)s' # noqa E501
logging.addLevelName(TRACE, 'TRACE')
logger = logging.getLogger(pada.__name__)
_handler = ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
198,
11748,
279,
4763,
198,
198,
5446,
11598,
796,
767,
198,
48913,
16437,
62,
25294,
62,
21389,
1404,
796,
374,
6,
4,
7,
5715,
3672,
8,
82,
532,
... | 2.174497 | 149 |
#BINARY TO NUMBER
b=str(input("ENTER THE BINARY :"))
l=len(b)
c=0
for a in b:
x=int(a)
l=l-1
if (x==1):
power=pow(2,(l))
print("2^",(l),"=",power)
c=c+power
print("SUM =",c) | [
2,
33,
1268,
13153,
5390,
36871,
13246,
201,
198,
201,
198,
65,
28,
2536,
7,
15414,
7203,
3525,
1137,
3336,
347,
1268,
13153,
1058,
48774,
201,
198,
75,
28,
11925,
7,
65,
8,
201,
198,
66,
28,
15,
201,
198,
1640,
257,
287,
275,
2... | 1.574468 | 141 |
#!../venv/bin/python
from vsvlandb import dbo
from vsvlandb.models import VLAN, Subnet, Site | [
2,
0,
40720,
574,
85,
14,
8800,
14,
29412,
198,
198,
6738,
3691,
85,
1044,
65,
1330,
288,
2127,
198,
6738,
3691,
85,
1044,
65,
13,
27530,
1330,
569,
25697,
11,
3834,
3262,
11,
14413
] | 2.657143 | 35 |
import re
import sys
import logging
import subprocess
from pathlib import Path
from typing import Optional
from pydantic import BaseModel, SecretStr, BaseSettings
logging.basicConfig(level=logging.INFO)
settings = Settings() # type: ignore
logging.debug(f"Settings: {settings.json()}")
if not settings.input_chang... | [
11748,
302,
198,
11748,
25064,
198,
11748,
18931,
198,
11748,
850,
14681,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
11,
3943,
13290,
11,
7308,
26232,
628,
198,
... | 2.440367 | 981 |
# idea of count diag element (i,j) which
# sum is 4, 7, 10...
# and note R=2 special case
solution()
| [
2,
2126,
286,
954,
2566,
363,
5002,
357,
72,
11,
73,
8,
543,
198,
2,
2160,
318,
604,
11,
767,
11,
838,
986,
198,
2,
290,
3465,
371,
28,
17,
2041,
1339,
198,
82,
2122,
3419,
198
] | 2.72973 | 37 |
# -*- coding: utf-8 -*-
"""
Exodus Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This progra... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
220,
220,
220,
38557,
3060,
12,
261,
628,
220,
220,
220,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
220,
... | 3.518152 | 303 |
# Generated by Django 2.0 on 2019-06-25 16:03
import ckeditor.fields
from django.db import migrations, models
import django.db.models.deletion
import users.validators
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
319,
13130,
12,
3312,
12,
1495,
1467,
25,
3070,
198,
198,
11748,
269,
9091,
2072,
13,
25747,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
1... | 3.072727 | 55 |
# ref - https://matplotlib.org/gallery/lines_bars_and_markers/psd_demo.html#sphx-glr-gallery-lines-bars-and-markers-psd-demo-py
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.mlab as mlab
import matplotlib.gridspec as gridspec
# Fixing random state for reproducibility
np.random.seed(19680801)
d... | [
2,
1006,
532,
3740,
1378,
6759,
29487,
8019,
13,
2398,
14,
24460,
14,
6615,
62,
34046,
62,
392,
62,
4102,
364,
14,
862,
67,
62,
9536,
78,
13,
6494,
2,
82,
746,
87,
12,
4743,
81,
12,
24460,
12,
6615,
12,
34046,
12,
392,
12,
410... | 2.127273 | 275 |
# -*- coding: utf-8 -*-
"""Top-level package for Elejandria Libros chef."""
__author__ = """Learning Equality"""
__email__ = 'benjamin@learningequality.org'
__version__ = '0.1.0'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
9126,
12,
5715,
5301,
329,
15987,
73,
392,
7496,
7980,
4951,
21221,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
41730,
31428,
37811,
198,
834,
12888,
8... | 2.701493 | 67 |
import zipfile
import os
from os.path import dirname, join
from aequilibrae import Project
def create_example(path: str, from_model='sioux_falls') -> Project:
"""Copies an example model to a new project project and returns the project handle
Args:
*path* (:obj:`str`): Path where to create a new model... | [
11748,
19974,
7753,
198,
11748,
28686,
198,
6738,
28686,
13,
6978,
1330,
26672,
3672,
11,
4654,
198,
6738,
257,
4853,
22282,
430,
68,
1330,
4935,
628,
198,
4299,
2251,
62,
20688,
7,
6978,
25,
965,
11,
422,
62,
19849,
11639,
13396,
221... | 2.662304 | 382 |
import random
import numpy as np
import bob.pipelines as mario
from bob.pipelines import Sample, SampleSet
from bob.pipelines.utils import flatten_samplesets
| [
11748,
4738,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
29202,
13,
79,
541,
20655,
355,
1667,
952,
198,
198,
6738,
29202,
13,
79,
541,
20655,
1330,
27565,
11,
27565,
7248,
198,
6738,
29202,
13,
79,
541,
20655,
13,
26791... | 3.196078 | 51 |
# Exercise 50 - Text Input
age = int(input("What's your age? "))
age_last_year = age - 1
print("Last year you were %s." % age_last_year) | [
2,
32900,
2026,
532,
8255,
23412,
198,
496,
796,
493,
7,
15414,
7203,
2061,
338,
534,
2479,
30,
366,
4008,
198,
496,
62,
12957,
62,
1941,
796,
2479,
532,
352,
198,
4798,
7203,
5956,
614,
345,
547,
4064,
82,
526,
4064,
2479,
62,
12... | 2.893617 | 47 |
import sys
from cStringIO import StringIO
from tests.testcase import CoverageReporterTestCase
EXPECTED_REPORT = """\
Name Stmts Exec Miss Cover
---------------------------------------------------------------
bar 10 10 0 100.00
foo ... | [
11748,
25064,
198,
6738,
269,
10100,
9399,
1330,
10903,
9399,
198,
198,
6738,
5254,
13,
9288,
7442,
1330,
33998,
6207,
4337,
14402,
20448,
198,
198,
49864,
9782,
1961,
62,
2200,
15490,
796,
37227,
59,
198,
5376,
220,
220,
220,
220,
220,... | 2.024823 | 282 |
from PyQt5 import QtGui
from brown.interface.interface import Interface
class BrushInterface(Interface):
"""Interface for a generic drawing brush controlling fill patterns.
Currently only solid colors are supported.
"""
def __init__(self, brown_object, color, pattern):
"""
Args:
... | [
6738,
9485,
48,
83,
20,
1330,
33734,
8205,
72,
198,
198,
6738,
7586,
13,
39994,
13,
39994,
1330,
26491,
628,
198,
4871,
39846,
39317,
7,
39317,
2599,
198,
220,
220,
220,
37227,
39317,
329,
257,
14276,
8263,
14093,
12755,
6070,
7572,
1... | 2.634694 | 490 |
from examtool.api.extract_questions import extract_questions
| [
6738,
2814,
25981,
13,
15042,
13,
2302,
974,
62,
6138,
507,
1330,
7925,
62,
6138,
507,
628,
198
] | 3.5 | 18 |
#!/usr/bin/python3
import cgi
import cgitb
import os
from datetime import date
print("Cache-Control: no-cache")
print("Content-type: text/html\n")
print("<html>")
print("<head>")
print("<title>GET Request Echo</title>")
print("</head>")
print("<body>")
print("<h1 align=center>GET Request Echo</h1>")
print("<hr/>")
pr... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
269,
12397,
198,
11748,
269,
18300,
65,
198,
11748,
28686,
198,
198,
6738,
4818,
8079,
1330,
3128,
198,
198,
4798,
7203,
30562,
12,
15988,
25,
645,
12,
23870,
4943,
198,
4798,
7203... | 2.482234 | 197 |
from projections import *
from urllib2 import urlopen
from httplib import HTTPConnection
from threading import Thread
from kivy.logger import Logger
from kivy.loader import Loader
from os.path import join, dirname
import time, os
import hashlib
GMLNS = "http://www.opengis.net/gml"
try:
from pyproj import Proj
... | [
6738,
19887,
1330,
1635,
198,
6738,
2956,
297,
571,
17,
1330,
19016,
9654,
198,
6738,
1841,
489,
571,
1330,
14626,
32048,
198,
6738,
4704,
278,
1330,
14122,
198,
6738,
479,
452,
88,
13,
6404,
1362,
1330,
5972,
1362,
198,
6738,
479,
45... | 2.780488 | 164 |
from argparse import ArgumentParser
from time import sleep
from src.server import Server
parser = ArgumentParser()
parser.add_argument('-d', '--debug', action="store_true")
parser.add_argument('-w', '--disable-watchdog', action="store_true")
args = parser.parse_args()
while True:
try:
Server(debug=args.d... | [
6738,
1822,
29572,
1330,
45751,
46677,
198,
6738,
640,
1330,
3993,
198,
198,
6738,
12351,
13,
15388,
1330,
9652,
198,
198,
48610,
796,
45751,
46677,
3419,
198,
48610,
13,
2860,
62,
49140,
10786,
12,
67,
3256,
705,
438,
24442,
3256,
2223... | 2.867403 | 181 |
# Copyright © 2019 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
2,
15069,
10673,
13130,
22783,
286,
3517,
9309,
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,
13789,
13,
198,
... | 3.774074 | 270 |
from coco2customvision.integration import get_category_id_to_tag_id_dictionary
| [
6738,
8954,
78,
17,
23144,
10178,
13,
18908,
1358,
1330,
651,
62,
22872,
62,
312,
62,
1462,
62,
12985,
62,
312,
62,
67,
14188,
628
] | 3.2 | 25 |
import os
import sys
sys.path.append(os.path.dirname(__file__))
sys.path.append(os.path.join(os.path.dirname(__file__),'..'))
sys.path.append(os.path.join(os.path.dirname(__file__),'..', ".."))
from datasets.images import AffectNetDataset
DATASET_ID = 0
MODEL_ID = 1
| [
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,... | 2.424779 | 113 |
import time
username = input("Enter your username: ")
password = input("Enter your password: ")
if username == "Nenye" and password == "1010":
print("welcome to CyberSafe " + username)
print(" ")
account_type = input("savings or current? ")
transaction_type = input("Deposit or withdrawal? ")
if accoun... | [
11748,
640,
198,
29460,
796,
5128,
7203,
17469,
534,
20579,
25,
366,
8,
198,
28712,
796,
5128,
7203,
17469,
534,
9206,
25,
366,
8,
198,
198,
361,
20579,
6624,
366,
45,
268,
5948,
1,
290,
9206,
6624,
366,
8784,
15,
1298,
198,
220,
... | 2.895899 | 317 |
# Copyright 2007 by Tiago Antao <tiagoantao@gmail.com>. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
from __future__ import print_function
from Bio.PopGen.GenePop import Fi... | [
2,
15069,
4343,
416,
16953,
3839,
3738,
5488,
1279,
20259,
3839,
4910,
78,
31,
14816,
13,
785,
28401,
220,
1439,
2489,
10395,
13,
198,
2,
770,
2438,
318,
636,
286,
262,
8436,
404,
7535,
6082,
290,
21825,
416,
663,
198,
2,
5964,
13,
... | 2.002475 | 3,232 |
# -*- coding: utf-8 -*-
# @Author: prabhakar
# @Date: 2016-06-25 20:13:13
# @Last Modified by: Prabhakar Gupta
# @Last Modified time: 2016-12-25 20:53:28
from setuptools import setup, find_packages
setup(
name='github_email',
packages=find_packages(),
version='0.0.5',
description='Get email ID of ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
13838,
25,
778,
397,
43573,
283,
198,
2,
2488,
10430,
25,
220,
220,
1584,
12,
3312,
12,
1495,
1160,
25,
1485,
25,
1485,
198,
2,
2488,
5956,
40499,
416,
25,
... | 2.716561 | 314 |
from suds.client import Client
url = "http://localhost:10000/ValidaCNPJ?wsdl"
client = Client(url)
cnpj = input("Digite o CNPJ: ")
response= client.service.isCNPJ(cnpj)
print(response)
| [
6738,
424,
9310,
13,
16366,
1330,
20985,
201,
198,
6371,
796,
366,
4023,
1378,
36750,
25,
49388,
14,
7762,
3755,
34,
22182,
41,
30,
18504,
25404,
1,
220,
220,
201,
198,
16366,
796,
20985,
7,
6371,
8,
201,
198,
31522,
79,
73,
796,
... | 2.017857 | 112 |
import threading
def threadsafe(fn, lock=None):
"""decorator making sure that the decorated function is thread safe"""
lock = lock or threading.Lock()
return new
| [
11748,
4704,
278,
628,
198,
4299,
14390,
8635,
7,
22184,
11,
5793,
28,
14202,
2599,
198,
220,
220,
220,
37227,
12501,
273,
1352,
1642,
1654,
326,
262,
24789,
2163,
318,
4704,
3338,
37811,
198,
220,
220,
220,
5793,
796,
5793,
393,
4704... | 3.339623 | 53 |
from .train import main, produce_dataframe, read_file_data, COLUMNS, TARGET_COLUMN, FEATURE_COLUMNS | [
6738,
764,
27432,
1330,
1388,
11,
4439,
62,
7890,
14535,
11,
1100,
62,
7753,
62,
7890,
11,
20444,
5883,
8035,
11,
309,
46095,
62,
25154,
5883,
45,
11,
18630,
40086,
62,
25154,
5883,
8035
] | 2.911765 | 34 |
from Modules.Project import Project
import random
import string
| [
6738,
3401,
5028,
13,
16775,
1330,
4935,
198,
11748,
4738,
198,
11748,
4731,
628,
628
] | 4.466667 | 15 |
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.dispatch import dispatcher
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from flier import (methods, managers)
class BaseModel(models.Model, ... | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
42625,
14208,
13,
6381,
17147,
1330,
49952,
198,
6738,
42625,
14208,
13,
3642,
822,
13,... | 2.646591 | 880 |
# coding: utf-8
# In[ ]:
#reading from hdfs
from pyspark.sql import SparkSession
import pandas as pd
from pyspark.sql import SQLContext
#creating spark session
sparkSession = SparkSession.builder.appName("bastsmen-cluster").getOrCreate()
#if csv has header
#loading bats_details.csv from hdfs
df_load = sparkSess... | [
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
2361,
25,
628,
198,
2,
25782,
422,
289,
7568,
82,
198,
198,
6738,
279,
893,
20928,
13,
25410,
1330,
17732,
36044,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
279,
8... | 2.801887 | 1,590 |
from typing import Any, Callable, Dict
from .bookmarker import Bookmarker
from ..infrastructure import default_dumps, default_loads
| [
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
360,
713,
198,
198,
6738,
764,
2070,
4102,
263,
1330,
4897,
4102,
263,
198,
6738,
11485,
10745,
6410,
1330,
4277,
62,
67,
8142,
11,
4277,
62,
46030,
628
] | 3.722222 | 36 |
# path
source_path = "../../data"
data_path = "../data"
save_path = "./models"
log_path = "./log"
train_source = "train_data.json"
train_name = "train_data.pkl"
dev_source = "dev_data.json"
dev_name = "dev_data.pkl"
# test_source = "test1_data_postag_with_predicate.json"
# test_name = "test1_data_postag_with_predicate... | [
2,
3108,
198,
10459,
62,
6978,
796,
366,
40720,
40720,
7890,
1,
198,
7890,
62,
6978,
796,
366,
40720,
7890,
1,
198,
21928,
62,
6978,
796,
366,
19571,
27530,
1,
198,
6404,
62,
6978,
796,
366,
19571,
6404,
1,
198,
198,
27432,
62,
10... | 2.336232 | 345 |
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2015 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
34,
8,
5472,
12,
4626,
2944,
13,
4302,
11818,
9107,
13,
1439,
2489,
10395,
198,
2,
21931,
559,
6422,
21612,
3933,
11,
317,
438,
1157,
1270,
370,
2013,
... | 2.454545 | 957 |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
f = open('README.md', 'r')
try:
long_desc = f.read()
finally:
f.close()
requires = ['Sphinx>=0.6']
setup (
name = 'sphinxcontrib-pdfembed',
version = '0.1',
author = 'Super Kogito',
author_... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
69,
796,
1280,
10786,
15675,
11682,
13,
9132,
3256,
705,
81,
11537,
198,
28311,
25,
198,
220,
... | 1.918879 | 678 |
import unittest
from ayeaye.ignition import Ignition, EngineUrlCase, EngineUrlStatus
EXAMPLE_ENGINE_URL_0 = "mysql://root:{env_secret_password}@localhost/my_database"
| [
11748,
555,
715,
395,
198,
198,
6738,
257,
5948,
48822,
13,
570,
653,
1330,
16583,
653,
11,
7117,
28165,
20448,
11,
7117,
28165,
19580,
198,
198,
6369,
2390,
16437,
62,
26808,
8881,
62,
21886,
62,
15,
796,
366,
28744,
13976,
1378,
157... | 2.982456 | 57 |
import numpy as np
from scipy.spatial import distance
from scipy.optimize import curve_fit
import csv
import math
# def get_image_lagtime(names): #time that needs to be added to start of acquisition
# fname = "../bax_agg/Image Acquisition Times.csv"
# rows = get_rows(fname, 4)
# lagtime = {}
# for names i... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
2777,
34961,
1330,
5253,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
12133,
62,
11147,
198,
11748,
269,
21370,
220,
198,
11748,
10688,
628,
628,
198,
2,
825,
651,
62,
9... | 2.628571 | 175 |
# 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.
"""
Adding task owner AWS account id
"""
from yoyo import step
__depends__ = {
"20211026_01_scyfj-support-dataperf",
"20211103_01_pdU... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
198,
37811... | 2.523649 | 296 |
"""Parse data files from the International Earth Rotation Service.
See:
https://datacenter.iers.org/eop.php
ftp://cddis.gsfc.nasa.gov/pub/products/iers/readme.finals2000A
"""
import numpy as np
from ..constants import DAY_S
inf = float('inf')
# This regular expression must remain a plain string; attempting to
# com... | [
37811,
10044,
325,
1366,
3696,
422,
262,
4037,
3668,
371,
14221,
4809,
13,
198,
198,
6214,
25,
198,
5450,
1378,
19608,
330,
9255,
13,
3183,
13,
2398,
14,
68,
404,
13,
10121,
198,
701,
79,
1378,
66,
1860,
271,
13,
14542,
16072,
13,
... | 2.833333 | 216 |
###############################################
#
# Odds and ends for debugging
#
###############################################
| [
29113,
7804,
4242,
21017,
198,
2,
198,
2,
220,
220,
20664,
82,
290,
5645,
329,
28769,
198,
2,
198,
29113,
7804,
4242,
21017,
198
] | 5.5 | 24 |
from ..mpditem import MPDItem
| [
6738,
11485,
3149,
5266,
368,
1330,
4904,
35,
7449,
198
] | 3 | 10 |
#
# Example file for working with loops
#
if __name__ == "__main__":
main()
| [
2,
198,
2,
17934,
2393,
329,
1762,
351,
23607,
198,
2,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
1388,
3419,
198
] | 2.857143 | 28 |
import numpy as np
import pandas as pd
import datetime
import random as r
donor = pd.read_csv("donors.csv")
receiver = pd.read_csv("receiver.csv")
delivery = pd.read_csv("delivery.csv")
donor = donor[['ID']]
receiver = receiver[['ID', 'Accepts']]
delivery = delivery[['employeeID', 'isWorkingForSocialCause']]... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
4818,
8079,
201,
198,
11748,
4738,
355,
374,
201,
198,
201,
198,
9099,
273,
796,
279,
67,
13,
961,
62,
40664,
7203,
9099,
669,
13,
40664,
494... | 2.237607 | 585 |
#-*- coding: utf-8 -*-
from iidxrank import iidx
from iidxrank import models
import time
from datetime import datetime
import json
import copy
"""
get songs in ranktable
"""
"""
search all candidate(level & type) songs in ranktable
"""
"""
generate NOPLAY playrecord from song object
"""
"""
common processor of 'p... | [
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
1312,
312,
87,
43027,
1330,
1312,
312,
87,
198,
6738,
1312,
312,
87,
43027,
1330,
4981,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
33918,... | 3.128472 | 288 |
import pandas as pd
from flask import Flask, request, Response, jsonify
import json
app = Flask(__name__)
app.config.update(DEBUG=True)
print("importing black cards")
df = pd.read_csv (r'CAH_Black_Cards.csv', header=None)
print("importing black cards COMPLETE")
#Return TRUE length of dataframe
@app.route('/get_bc_... | [
11748,
19798,
292,
355,
279,
67,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
18261,
11,
33918,
1958,
198,
11748,
33918,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
1324,
13,
11250,
13,
19119,
7,
30531,
28,
17821,
8,
628,... | 2.656028 | 282 |
"""
This :mod: `models` module includes different modules used in the prediction.
"""
from .helpers import bestF1
__all__ = [
"bestF1"
]
| [
37811,
198,
1212,
1058,
4666,
25,
4600,
27530,
63,
8265,
3407,
1180,
13103,
973,
287,
262,
17724,
13,
198,
37811,
198,
198,
6738,
764,
16794,
364,
1330,
1266,
37,
16,
198,
198,
834,
439,
834,
796,
685,
198,
197,
197,
197,
1,
13466,
... | 2.788462 | 52 |
N, M, Y = input().split()
N, M, Y = float(N), float(M), int(Y)
current = N
for year in range(Y + 1):
current = round(current + year * M, 2)
print(f"{year} {two_decimals(current)}") | [
45,
11,
337,
11,
575,
796,
5128,
22446,
35312,
3419,
198,
45,
11,
337,
11,
575,
796,
12178,
7,
45,
828,
12178,
7,
44,
828,
493,
7,
56,
8,
198,
198,
14421,
796,
399,
198,
198,
1640,
614,
287,
2837,
7,
56,
1343,
352,
2599,
198,
... | 2.358974 | 78 |
#!/usr/bin/env python3
import sys
"""
Handle all the error messages in piemmer.
In piemmer, errors always need to be address to ensure the completely excution. Warnings, on
the other hand, are usually non-critical and can be automatically fixed by piemmer.
"""
class Error(Exception):
"""
Error class
Ar... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
198,
37811,
198,
37508,
477,
262,
4049,
6218,
287,
279,
26597,
647,
13,
198,
198,
818,
279,
26597,
647,
11,
8563,
1464,
761,
284,
307,
2209,
284,
4155,
26... | 2.87291 | 299 |
"""
"whatrecord parse" is used to parse and interpret a startup script or database
file, dumping the resulting ``ShellState`` or ``Database``.
"""
import argparse
import json
import logging
import pathlib
from typing import Dict, List, Optional, Union
import apischema
from ..common import IocMetadata
from ..db impor... | [
37811,
198,
1,
10919,
22105,
21136,
1,
318,
973,
284,
21136,
290,
6179,
257,
13693,
4226,
393,
6831,
198,
7753,
11,
30231,
262,
7186,
7559,
23248,
9012,
15506,
393,
7559,
38105,
15506,
13,
198,
37811,
198,
198,
11748,
1822,
29572,
198,
... | 2.911184 | 608 |
'''
Created on May 25, 2018
@author: nishant.sethi
'''
n=5
p=1/3
result=(1-p)**(n-1)*p
print(round(result,3)) | [
7061,
6,
201,
198,
41972,
319,
1737,
1679,
11,
2864,
201,
198,
201,
198,
31,
9800,
25,
299,
680,
415,
13,
2617,
5303,
201,
198,
7061,
6,
201,
198,
77,
28,
20,
201,
198,
79,
28,
16,
14,
18,
201,
198,
20274,
16193,
16,
12,
79,
... | 1.830769 | 65 |
from auction.utils.generic import get_or_create_bidbasket
| [
6738,
14389,
13,
26791,
13,
41357,
1330,
651,
62,
273,
62,
17953,
62,
14065,
65,
11715,
198
] | 3.411765 | 17 |
# 用于绘制同一种合约的不同参数
from matplotlib import pyplot as plt
from read_data import read_data
from label_data import get_labeled_data
import config
import numpy as np
to_sec = lambda delta_t:delta_t.seconds+delta_t.microseconds/1e6
if __name__ == '__main__':
(data, label) = get_labeled_data([0])
means = []
for ... | [
2,
13328,
242,
101,
12859,
236,
163,
119,
246,
26344,
114,
28938,
234,
31660,
163,
100,
235,
28938,
230,
163,
118,
99,
21410,
38834,
28938,
234,
20998,
224,
46763,
108,
198,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
... | 2.105839 | 274 |
from lbry.testcase import CommandTestCase
| [
6738,
18360,
563,
13,
9288,
7442,
1330,
9455,
14402,
20448,
628,
628
] | 3.75 | 12 |
import fnmatch
import os | [
11748,
24714,
15699,
198,
11748,
28686
] | 4 | 6 |
import sys
import pandas as pd
file=sys.argv[1]
df=pd.read_csv(file)#,delimiter=';')
df=df.loc[df['Pulse Rate(bpm)']<65535]
print(df)
df.to_csv(sys.argv[1][:-4]+'_processado.csv',index=False)
print("wrote to :"+sys.argv[1][:-4]+'_processado.csv')
| [
11748,
25064,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
7753,
28,
17597,
13,
853,
85,
58,
16,
60,
198,
198,
7568,
28,
30094,
13,
961,
62,
40664,
7,
7753,
8,
2,
11,
12381,
320,
2676,
11639,
26,
11537,
198,
198,
7568,
28,
75... | 2.04878 | 123 |
import sys
import json
import usrconfig
from tasklib import TaskWarrior
task = json.loads(sys.argv[1])
if task['description'] in usrconfig.prayer_list or task['description'] == 'Jumuah':
print("Accounting for missed ajr...")
db=TaskWarrior()
p_task=db.tasks.get(uuid=task['parent'])
found_missed=False
... | [
11748,
25064,
198,
11748,
33918,
198,
11748,
514,
81,
11250,
198,
6738,
4876,
8019,
1330,
15941,
13195,
7701,
198,
198,
35943,
796,
33918,
13,
46030,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
198,
361,
4876,
17816,
11213,
20520,
287,
... | 2.204188 | 382 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Rafael Corsi @ insper.edu.br
# Dez/2017
# Disciplina Elementos de Sistemas
#
from os.path import join, dirname
import sys
import os
import shutil
import subprocess
import argparse
# Scripts python
ROOT_PATH = subprocess.Popen(['git', 'rev-parse', '--show-toplevel'], std... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
31918,
26978,
72,
2488,
1035,
525,
13,
15532,
13,
1671,
198,
2,
1024,
89,
14,
5539,
198,
2,
3167,
6671,
1437... | 2.585366 | 287 |
from django.conf.urls import url
from plan2dance.views import ActionModel, MusicAnalysis, PlanningGeneration, ScriptGeneration
urlpatterns = [
url(r'^action_model$', ActionModel.as_view()),
url(r'^music_analysis$', MusicAnalysis.as_view()),
url(r'^planning_generation$', PlanningGeneration.as_view()),
u... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
1410,
17,
67,
590,
13,
33571,
1330,
7561,
17633,
11,
7849,
32750,
11,
21913,
8645,
341,
11,
12327,
8645,
341,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
2... | 2.842105 | 133 |
#Note the index.py is merely intended for running the Lambda locally
import json | [
2,
6425,
262,
6376,
13,
9078,
318,
6974,
5292,
329,
2491,
262,
21114,
6814,
15726,
198,
11748,
33918
] | 4.444444 | 18 |
import os
import sys
import json
import atexit
from functools import wraps
from flask import redirect, render_template, session, g, request, Blueprint, url_for
from genelist import app, conf, uptime
site = Blueprint('site', __name__, template_folder='templates', static_folder='static')
import support
print dir(site... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
379,
37023,
198,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
42903,
1330,
18941,
11,
8543,
62,
28243,
11,
6246,
11,
308,
11,
2581,
11,
39932,
11,
19016,
62,
1640,
... | 2.884211 | 380 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
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,
5115,
6634,
9238,
13,
220,
383,
7054,... | 3.340426 | 423 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
2829,
17752,
355,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
9979,
415,
13,
22973,
3418... | 2.58 | 50 |