content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# k_insertion.py
# An implementation of the k-insertion attack where the attacker adds k data
# points to the model
# Matthew Sedam
from adlib.adversaries.adversary import Adversary
from adlib.utils.common import fuzz_matrix
from data_reader.binary_input import Instance
from data_reader.real_input import RealFeatureVe... | [
2,
479,
62,
28463,
295,
13,
9078,
198,
2,
1052,
7822,
286,
262,
479,
12,
28463,
295,
1368,
810,
262,
15250,
6673,
479,
1366,
198,
2,
2173,
284,
262,
2746,
198,
2,
9308,
22710,
321,
198,
198,
6738,
512,
8019,
13,
324,
690,
3166,
... | 2.068555 | 10,342 |
pytest_plugins = [
'mypy.test.data',
'pytest_cov',
]
| [
9078,
9288,
62,
37390,
796,
685,
198,
220,
220,
220,
705,
1820,
9078,
13,
9288,
13,
7890,
3256,
198,
220,
220,
220,
705,
9078,
9288,
62,
66,
709,
3256,
198,
60,
198
] | 1.90625 | 32 |
from gtts import gTTS
import os
mytext = 'write here'
language = 'es'
myobj = gTTS(text=mytext, lang=language, slow=False)
myobj.save("audio.mp3")
os.system("mpg321 audio.mp3") | [
6738,
308,
83,
912,
1330,
308,
51,
4694,
201,
198,
201,
198,
11748,
28686,
201,
198,
201,
198,
1820,
5239,
796,
705,
13564,
994,
6,
201,
198,
201,
198,
16129,
796,
705,
274,
6,
201,
198,
201,
198,
1820,
26801,
796,
308,
51,
4694,
... | 2.204545 | 88 |
#!/usr/bin/env python
# Script for testing upload a file to Fedora to get an upload id for use as
# a datastream location.
# Example of using a callback method on the upload api call.
# Requires progressbar
import argparse
import base64
import progressbar
import pycurl
import tempfile
from eulfedora.server import Re... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
12327,
329,
4856,
9516,
257,
2393,
284,
32245,
284,
651,
281,
9516,
4686,
329,
779,
355,
198,
2,
257,
4818,
459,
1476,
4067,
13,
198,
2,
17934,
286,
1262,
257,
23838,
2446,
... | 2.670213 | 376 |
import factory
from django.contrib.auth.models import User
| [
11748,
8860,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
628,
628
] | 3.647059 | 17 |
#!/usr/bin/env python
#
# Copyright (c) 2018-2019 Intel Corporation
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
#
"""
Classes to handle Carla pedestrians
"""
import rospy
from derived_object_msgs.msg import Object
from shape_msgs.msg import Sol... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
198,
2,
15069,
357,
66,
8,
2864,
12,
23344,
8180,
10501,
198,
2,
198,
2,
770,
670,
318,
11971,
739,
262,
2846,
286,
262,
17168,
5964,
13,
198,
2,
1114,
257,
4866,
11,
766... | 2.378338 | 2,022 |
from django.shortcuts import render,HttpResponse,render_to_response,HttpResponseRedirect
from django.contrib import auth
from vendorprofile.models import Teacher
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404
import sys
import os
import datetime
import time
... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
43481,
31077,
11,
13287,
62,
1462,
62,
26209,
11,
43481,
31077,
7738,
1060,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6284,
198,
6738,
18371,
13317,
13,
27530,
1330,
220,
32019,
... | 3.069182 | 318 |
import os
import sys
from concurrent.futures.thread import ThreadPoolExecutor
import threading
import requests
from multissh.connection import Connection
from multissh.utils import parse_credentials, print_error, print_str, get_input
| [
11748,
28686,
198,
11748,
25064,
198,
6738,
24580,
13,
69,
315,
942,
13,
16663,
1330,
14122,
27201,
23002,
38409,
198,
11748,
4704,
278,
198,
198,
11748,
7007,
198,
198,
6738,
1963,
747,
71,
13,
38659,
1330,
26923,
198,
6738,
1963,
747,... | 3.71875 | 64 |
from django.test import TestCase, Client
from ...models import City, Country | [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
11,
20985,
198,
6738,
2644,
27530,
1330,
2254,
11,
12946
] | 4.222222 | 18 |
# Generated by Django 3.0.6 on 2020-05-27 15:51
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
21,
319,
12131,
12,
2713,
12,
1983,
1315,
25,
4349,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
498... | 3.089286 | 56 |
import joblib
import os
import io
import sys
import streamlit as st
import pandas as pd
import numpy as np
import pickle
import matplotlib.pyplot as plt
import plotly.figure_factory as ff
import cv2
import collections
from collections import defaultdict
import operator
from skimage.io import imread, imshow
from skima... | [
11748,
1693,
8019,
198,
11748,
28686,
198,
11748,
33245,
198,
11748,
25064,
198,
198,
11748,
4269,
18250,
355,
336,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
198,
11748,
2603,
29487,
... | 2.531332 | 2,665 |
from typing import List
from itertools import product
if __name__ == '__main__':
seen_scales = []
diatonic_intervals = get_diatonic_intervals()
all_root_notes = Scale.get_all_tonic_notes()
print(f'Generating scales from {len(all_root_notes)} enharmonic root notes...')
for diatonic_interval in d... | [
6738,
19720,
1330,
7343,
198,
6738,
340,
861,
10141,
1330,
1720,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1775,
62,
1416,
2040,
796,
17635,
628,
220,
220,
220,
2566,
265,
9229,
62,
... | 2.304665 | 686 |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load(
"@rules_verilator//verilator/internal:versions.bzl",
_DEFAULT_VERSION = "DEFAULT_VERSION",
_version_info = "version_info",
)
verilator_repository = repository_rule(
_verilator_repository,
attrs = {
"version": attr.st... | [
2220,
7203,
31,
65,
41319,
62,
31391,
1003,
31391,
14,
11249,
62,
4299,
82,
14,
260,
7501,
25,
4023,
13,
65,
48274,
1600,
366,
4023,
62,
17474,
4943,
198,
2220,
7,
198,
220,
220,
220,
44212,
38785,
62,
332,
346,
1352,
1003,
332,
3... | 2.2891 | 211 |
from traffic.data import airports
airports.query(
'icao.str.match("[A-Z]{4}") and iata.notnull() '
'and type != "closed" and type != "small_airport" '
'and type != "heliport" and type != "seaplane_base" '
'and icao != "ZHZH"' # misleading identifier for this Canadian airport
).sort_values( # type: ig... | [
6738,
4979,
13,
7890,
1330,
22600,
198,
198,
958,
3742,
13,
22766,
7,
198,
220,
220,
220,
705,
3970,
78,
13,
2536,
13,
15699,
7203,
58,
32,
12,
57,
60,
90,
19,
92,
4943,
290,
1312,
1045,
13,
1662,
8423,
3419,
705,
198,
220,
220,... | 2.516556 | 151 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
| [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198
] | 1.833333 | 24 |
from .element import Element
class RadioButton(Element):
"""
Element class to represent HTML Radio Button
"""
| [
6738,
764,
30854,
1330,
11703,
628,
198,
4871,
8829,
21864,
7,
20180,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
11703,
1398,
284,
2380,
11532,
8829,
20969,
198,
220,
220,
220,
37227,
198
] | 3.542857 | 35 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from localflavor.stub import _
#: A list of Latvian municipalities and republican cities.
#: Identifiers based on ISO 3166-2:LV. https://en.wikipedia.org/wiki/ISO_3166-2:LV
MUNICIPALITY_CHOICES = (
# Republican cities (not part of any municipality)
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
1179,
1604,
75,
5570,
13,
301,
549,
1330,
4808,
198,
198,
2,
25,
317,
1351,
286,
5476,
85,
... | 2.416869 | 2,063 |
from django.forms import ModelForm
from .models import Order, Customer
from django.contrib.auth.models import User
from .models import Commit
| [
6738,
42625,
14208,
13,
23914,
1330,
9104,
8479,
198,
6738,
764,
27530,
1330,
8284,
11,
22092,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
764,
27530,
1330,
35910,
628
] | 3.972222 | 36 |
"""
height_handler.py
=================
Manages height based on these rules:
* define height as new column: "height_above_surface"
* For land data:
- Use the mapping in Simon's table below from "observed_variable".
- If there are any records with an "observed_variable" not mentioned: set to 2 metres.
* ... | [
37811,
198,
17015,
62,
30281,
13,
9078,
198,
4770,
28,
198,
198,
5124,
1095,
6001,
1912,
319,
777,
3173,
25,
628,
1635,
8160,
6001,
355,
649,
5721,
25,
366,
17015,
62,
29370,
62,
42029,
1,
628,
1635,
1114,
1956,
1366,
25,
198,
220,
... | 2.887906 | 339 |
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
2,
15069,
357,
66,
8,
33448,
11,
15127,
23929,
44680,
6234,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262... | 3.32567 | 261 |
# -*- coding: utf-8 -*-
import fire
if __name__ == '__main__':
fire.Fire()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
2046,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
2046,
13,
13543,
3419,
198
] | 2.184211 | 38 |
import os
import sys
import argparse
from fairseq.models.roberta import RobertaModel
GLUE_DATA_DIR = '/ssd2/GLUE'
RAW_DATA_DIR = os.path.join(GLUE_DATA_DIR, 'glue_data')
parser = argparse.ArgumentParser()
parser.add_argument("--model_path", default="", type=str)
parser.add_argument("--checkpoint_name", default="chec... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
1822,
29572,
198,
6738,
3148,
41068,
13,
27530,
13,
305,
4835,
64,
1330,
5199,
64,
17633,
628,
198,
8763,
8924,
62,
26947,
62,
34720,
796,
31051,
824,
67,
17,
14,
8763,
8924,
6,
198,
20530,... | 2.474763 | 634 |
import numpy as np
import xgboost as xgb
from imxgboost.weighted_loss import Weight_Binary_Cross_Entropy
from imxgboost.focal_loss import Focal_Binary_Loss
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, matthews_corrcoef
c... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2124,
70,
39521,
355,
2124,
22296,
198,
6738,
545,
87,
70,
39521,
13,
6551,
276,
62,
22462,
1330,
14331,
62,
33,
3219,
62,
21544,
62,
14539,
28338,
198,
6738,
545,
87,
70,
39521,
13,
69,
43... | 2.820658 | 881 |
import click
from agent.cli.prompt.pipeline.schemaless import SchemalessPrompter
| [
11748,
3904,
198,
198,
6738,
5797,
13,
44506,
13,
16963,
457,
13,
79,
541,
4470,
13,
1416,
4411,
282,
408,
1330,
1446,
4411,
282,
408,
24129,
42104,
628
] | 2.964286 | 28 |
from django.contrib import admin
from timing.models import *
admin.site.register(Experiment)
#admin.site.register(Gender)
#admin.site.register(Race)
#admin.site.register(Ethnicity)
#admin.site.register(CountryOfResidence)
#admin.site.register(EducationLevel)
#admin.site.register(Spirituality)
#admin.site.register(Rel... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
10576,
13,
27530,
1330,
1635,
198,
198,
28482,
13,
15654,
13,
30238,
7,
20468,
3681,
8,
198,
2,
28482,
13,
15654,
13,
30238,
7,
41394,
8,
198,
2,
28482,
13,
15654,
13,
... | 3.145038 | 131 |
# Generated by Django 2.1.4 on 2019-03-17 16:29
import app.core.helpers
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
19,
319,
13130,
12,
3070,
12,
1558,
1467,
25,
1959,
198,
198,
11748,
598,
13,
7295,
13,
16794,
364,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 40 |
import os
import bpy
import sys
import traceback
from pathlib import Path
from . communication import send_dict_as_json
from . environment import user_addon_directory, addon_directories
| [
11748,
28686,
198,
11748,
275,
9078,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
764,
6946,
1330,
3758,
62,
11600,
62,
292,
62,
17752,
198,
6738,
764,
2858,
1330,
2836,
62,
48078,
62,
34945... | 3.957447 | 47 |
import pytest
from pyupgrade import _fix_tokens
from pyupgrade import _imports_unicode_literals
@pytest.mark.parametrize(
('s', 'expected'),
(
('', False),
('import x', False),
('from foo import bar', False),
('x = 5', False),
('from __future__ import unicode_literals'... | [
11748,
12972,
9288,
198,
198,
6738,
12972,
929,
9526,
1330,
4808,
13049,
62,
83,
482,
641,
198,
6738,
12972,
929,
9526,
1330,
4808,
320,
3742,
62,
46903,
1098,
62,
17201,
874,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
... | 1.957125 | 793 |
from .generation_dataset import GenDataset
from .recognition_dataset import ImageList, SeparateBatchSampler, SeparateImageList
| [
201,
198,
6738,
764,
20158,
62,
19608,
292,
316,
1330,
5215,
27354,
292,
316,
201,
198,
6738,
764,
26243,
653,
62,
19608,
292,
316,
1330,
7412,
8053,
11,
8621,
30748,
33,
963,
16305,
20053,
11,
8621,
30748,
5159,
8053,
201,
198
] | 3.195122 | 41 |
# Generated by Django 3.0.10 on 2021-01-19 12:14
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
940,
319,
33448,
12,
486,
12,
1129,
1105,
25,
1415,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
from _dmtdef import *
| [
6738,
4808,
67,
16762,
4299,
1330,
1635,
198
] | 2.75 | 8 |
from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
import re
from django.db.models import Q
from django.shortcuts import get_object_or_404
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
11748,
302,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13... | 3.362069 | 58 |
from mock import patch
from six.moves import xrange
import unittest
from django.conf import settings
from django.db import connections
from django.db.utils import DataError, IntegrityError
from django.db.models import CASCADE
from django.test import TestCase
import time
from datetime import datetime
from django_shar... | [
6738,
15290,
1330,
8529,
198,
6738,
2237,
13,
76,
5241,
1330,
2124,
9521,
198,
11748,
555,
715,
395,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
8787,
198,
6738,
42625,
14208,
13,
9945,
... | 3.175373 | 268 |
# 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
#
# Authors:
# - Alexey Anisenkov, anisyonk@cern.ch, 2018
"""
Job specific Info Service
It could cu... | [
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,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 3.233083 | 266 |
import torch
from sentence_transformers.evaluation import EmbeddingSimilarityEvaluator
from sentence_transformers import SentenceTransformer, LoggingHandler, models, util, InputExample
from sentence_transformers import losses
import os
import gzip
import csv
from datetime import datetime
import logging
#### Just some ... | [
11748,
28034,
198,
6738,
6827,
62,
35636,
364,
13,
18206,
2288,
1330,
13302,
6048,
278,
18925,
414,
36,
2100,
84,
1352,
198,
6738,
6827,
62,
35636,
364,
1330,
11352,
594,
8291,
16354,
11,
5972,
2667,
25060,
11,
4981,
11,
7736,
11,
234... | 2.652616 | 1,376 |
import torch
from torch import nn
| [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198
] | 3.777778 | 9 |
# -*- coding: utf-8 -*-
# Copyright CERN since 2015
#
# 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 ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
327,
28778,
1201,
1853,
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,
42... | 3.576744 | 215 |
from __future__ import print_function, absolute_import
from paths import Paths as paths
from . import bash_utils
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
6738,
13532,
1330,
10644,
82,
355,
13532,
198,
6738,
764,
1330,
27334,
62,
26791,
628
] | 4.071429 | 28 |
import cv2
import pickle
import glob
import os
undistorted_dir_name = 'output_images/undistorted'
chess_undistor_dir_name ="output_images/chessundistorted"
# Read in the saved objpoints and imgpoints
dist_pickle = pickle.load( open( "caliberation_dist_pickle.p", "rb" ) )
mtx = dist_pickle["mtx"]
dist = dist_pickle["d... | [
11748,
269,
85,
17,
198,
11748,
2298,
293,
198,
11748,
15095,
198,
11748,
28686,
198,
198,
917,
396,
9741,
62,
15908,
62,
3672,
796,
705,
22915,
62,
17566,
14,
917,
396,
9741,
6,
198,
2395,
824,
62,
917,
32380,
62,
15908,
62,
3672,
... | 2.661376 | 189 |
"""Module Description
Copyright (c) 2009 H. Gene Shin <shin@jimmy.harvard.edu>
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file COPYING included with
the distribution).
@status: experimental
@version: $Revision$
@author: H. Gene Shin
@contact: ... | [
198,
198,
37811,
26796,
12489,
198,
198,
15269,
357,
66,
8,
3717,
367,
13,
13005,
11466,
1279,
1477,
259,
31,
73,
320,
1820,
13,
9869,
10187,
13,
15532,
29,
198,
198,
1212,
2438,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,... | 2.019257 | 11,061 |
# Generated by Django 3.2.4 on 2021-07-17 09:46
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
19,
319,
33448,
12,
2998,
12,
1558,
7769,
25,
3510,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import torch
import torch.nn as nn
from torch.optim import Adam
in_d = 5
hidn = 2
out_d = 3
net = NN_Network(in_d, hidn, out_d)
print(list(net.parameters()))
print("test") | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
40085,
1330,
7244,
198,
198,
259,
62,
67,
796,
642,
198,
49675,
77,
796,
362,
198,
448,
62,
67,
796,
513,
198,
3262,
796,
399,
45,
62,
26245,
7,
259,
... | 2.457143 | 70 |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@author: george wang
@datetime: 2019-06-12
@file: state.py
@contact: georgewang1994@163.com
@desc: 状态机
"""
from enum import Enum, unique
@unique
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
31,
9800,
25,
220,
220,
220,
4903,
3643,
266,
648,
198,
31,
19608,
8079,
25,
220,
13130,
12,
3312,
12,
... | 2.038095 | 105 |
from md2cf.confluence_renderer import ConfluenceTag, ConfluenceRenderer
| [
6738,
45243,
17,
12993,
13,
10414,
23079,
62,
10920,
11882,
1330,
7326,
23079,
24835,
11,
7326,
23079,
49,
437,
11882,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628
] | 3.033333 | 30 |
manylinux1_compatible = False
| [
805,
2645,
259,
2821,
16,
62,
38532,
796,
10352,
198
] | 3 | 10 |
from . import base
import audioread
class TrackReadValidator(base.Validator):
"""
Check if the track can be opened and read.
"""
def validate(self, corpus):
"""
Perform the validation on the given corpus.
Args:
corpus (Corpus): The corpus to test/validate.
... | [
6738,
764,
1330,
2779,
198,
198,
11748,
40504,
382,
324,
628,
198,
4871,
17762,
5569,
47139,
1352,
7,
8692,
13,
47139,
1352,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6822,
611,
262,
2610,
460,
307,
4721,
290,
1100,
13,
1... | 2.096774 | 434 |
n = int(input())
temps = list(map(int, input().split(" ")))
i = 1
maxTemp = 10000000
theDay = 0
while i < n -1:
if temps[i - 1] > temps[i + 1]:
if maxTemp > temps[i - 1]:
maxTemp = temps[i - 1]
theDay = i - 1
else:
if maxTemp > temps[i +1]:
maxTemp = temps[i + 1]
theDay = i - 1
i +=... | [
77,
796,
493,
7,
15414,
28955,
201,
198,
201,
198,
11498,
862,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
7203,
366,
22305,
201,
198,
201,
198,
72,
796,
352,
201,
198,
9806,
30782,
796,
1802,
20483,
201,
198,
1169,
12393,
... | 1.945055 | 182 |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from sklearn.decomposition import PCA
colors = ['#AAAAAA', '#7777CC', '#FFFF99', '#99FFFF', '#FF5555', '#FF99FF',
'#5555FF', '#55FF55', '#555555', '#12569A', '#A96521', '#12A965']
shapes = ['s', 's', 'o', '^', 'v', ... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
13,
2164,
2340,
43106,
1330,
24846,
22882,
198,
6738,
1341,
35720,
13,
12501,
296,
9150,
1330,
4217,
32,
628,
198... | 2.054167 | 240 |
'''
Copyright 2017, Fujitsu Network Communications, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... | [
7061,
6,
198,
15269,
2177,
11,
32671,
19831,
7311,
14620,
11,
3457,
13,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
... | 2.460984 | 833 |
# Generated by Django 3.2.3 on 2021-07-17 19:59
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
18,
319,
33448,
12,
2998,
12,
1558,
678,
25,
3270,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
from abc import ABC, abstractmethod
from dataclasses import dataclass
import torch
class BanditsDataset(ABC):
"""
Base class for logged, aka behavior, dataset
"""
@abstractmethod
def __len__(self) -> ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
1439,
2489,
10395,
13,
198,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
6738,
4818,
330,
28958,
1330,
... | 2.158345 | 701 |
from autoflow.workflow.components.data_process_base import AutoFlowDataProcessAlgorithm
__all__ = ["ADASYN"]
| [
6738,
1960,
1659,
9319,
13,
1818,
11125,
13,
5589,
3906,
13,
7890,
62,
14681,
62,
8692,
1330,
11160,
37535,
6601,
18709,
2348,
42289,
198,
198,
834,
439,
834,
796,
14631,
2885,
26483,
45,
8973,
628
] | 3.171429 | 35 |
"""
Dicts for Activation Function
"""
import sys
import numpy
"""
Add New Activation Functions Here
"""
FUNC_LIST = [method for method in dir() if method.startswith('__') is False]
CUR_MODULE = sys.modules[__name__]
| [
37811,
198,
35,
14137,
329,
13144,
341,
15553,
198,
37811,
198,
11748,
25064,
198,
11748,
299,
32152,
198,
198,
37811,
198,
4550,
968,
13144,
341,
40480,
3423,
198,
37811,
198,
198,
42296,
34,
62,
45849,
796,
685,
24396,
329,
2446,
287,... | 3.070423 | 71 |
# -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import logging
import os
import sys
from pic2map.db import (
LocationDB,
transform_metadata_to_row,
)
from pic2map.fs import TreeExplorer
from pic2map.gps import filter_gps_metadata
from pic2map.server.app import app
logger = logging.getL... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
21575,
6910,
26491,
526,
15931,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
8301,
17,
8899,
13,
9945,
133... | 2.617402 | 1,563 |
from abc import ABCMeta
from cloudmesh.management.configuration.config import Config
import warnings
import sys
warnings.warn("ObjectStorageABC: THIS METHOD IS DEPRECATED AND StorageABC MUST BE USED")
sys.exit(1)
# noinspection PyUnusedLocal,PyPep8 | [
6738,
450,
66,
1330,
9738,
48526,
198,
198,
6738,
6279,
76,
5069,
13,
27604,
13,
11250,
3924,
13,
11250,
1330,
17056,
198,
11748,
14601,
198,
11748,
25064,
198,
198,
40539,
654,
13,
40539,
7203,
10267,
31425,
24694,
25,
12680,
337,
3625... | 3.272727 | 77 |
#!/usr/bin/env python
#
# Setup script
# $Id: //modules/xmlrpclib/setup.py#4 $
#
# Usage: python setup.py install
#
from distutils.core import setup, Extension
setup(
name="xmlrpclib",
version="1.0.1",
author="Fredrik Lundh",
author_email="fredrik@pythonware.com",
maintainer="Python... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
201,
198,
2,
31122,
4226,
201,
198,
2,
720,
7390,
25,
3373,
18170,
14,
19875,
81,
79,
565,
571,
14,
40406,
13,
9078,
2,
19,
720,
201,
198,
2,
201,
198,
2,
29566,
25,
21... | 2.375 | 240 |
import tkinter
from src.setup import *
Starter() | [
11748,
256,
74,
3849,
198,
6738,
12351,
13,
40406,
1330,
1635,
198,
198,
1273,
2571,
3419
] | 3.0625 | 16 |
class Node(object):
"""
The nodes are the verticies of the graph.
"""
| [
4871,
19081,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
383,
13760,
389,
262,
9421,
291,
444,
286,
262,
4823,
13,
198,
220,
220,
220,
37227,
198
] | 2.645161 | 31 |
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
2,
15069,
357,
34,
8,
13130,
12,
42334,
1168,
359,
528,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
... | 3.371648 | 261 |
from itertools import cycle, repeat
from operator import mul
import tensorflow as tf
import numpy as np
from config import DATA_SIZE, SUBSAMPLING_SIZE, INPUT_SIZE, SHIFT_SIZE
if __name__ == '__main__':
preprocess_data()
| [
6738,
340,
861,
10141,
1330,
6772,
11,
9585,
198,
6738,
10088,
1330,
35971,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
4566,
1330,
42865,
62,
33489,
11,
13558,
4462,
2390,
6489,
2... | 3.013158 | 76 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
2,
16529,
1783,
10541,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
5964,
1321,
13,
198,
2,
16529,
1783,
10541,
198,... | 2.959249 | 1,865 |
# -*- coding: utf-8 -*-
import blinker
signals = blinker.Namespace()
load = signals.signal('load')
before_save = signals.signal('before_save')
save = signals.signal('save')
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
21019,
263,
628,
198,
12683,
874,
796,
21019,
263,
13,
36690,
10223,
3419,
198,
198,
2220,
796,
10425,
13,
12683,
282,
10786,
2220,
11537,
198,
198,
19052,
6... | 2.69697 | 66 |
from typing import Tuple, Dict, Optional, List
import numpy as np
import re
import json
from functools import lru_cache
from geotext import GeoText
from shapely.geometry import Point, Polygon, shape
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
| [
6738,
19720,
1330,
309,
29291,
11,
360,
713,
11,
32233,
11,
7343,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
302,
198,
11748,
33918,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
198,
6738,
4903,
1258,
742,
13... | 3.706667 | 75 |
from ff_espn_api import League
if __name__ == "__main__":
league = League(league_id=1360211, year=2019, debug=True)
for team in league.teams:
print(team)
print(league) | [
6738,
31246,
62,
9774,
77,
62,
15042,
1330,
4041,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
4652,
796,
4041,
7,
19316,
62,
312,
28,
1485,
1899,
21895,
11,
614,
28,
23344,
11,
14257,
... | 2.461538 | 78 |
# CaosMX
# Dic 2020
# Ex Python Practica
'''
Listas
Podemos hacer las mismas operaciones que con las cadenas de caracteres y con las tuplas,
pero estas si podemos editarlas.
Agregar, Eliminar, Cambiar
Siguiendo Curso de Python de Manuel Gonzalez:
https://www.youtube.com/channel/UCQLWbxZbgftDIhw21i6q_OA/featured
ht... | [
2,
6488,
418,
43243,
198,
2,
360,
291,
12131,
198,
2,
1475,
11361,
13672,
3970,
198,
198,
7061,
6,
198,
8053,
292,
198,
41565,
368,
418,
289,
11736,
39990,
32691,
292,
1515,
49443,
274,
8358,
369,
39990,
20603,
268,
292,
390,
1097,
... | 2.355865 | 503 |
# coding: utf-8
"""
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
2451,
7928,
4767,
8095,
628,
220,
220,
220,
770,
1020,
318,
8384,
329,
4856,
4767,
8095,
4382,
290,
4909,
8390,
886,
13033,
11,
4981,
13,
4222,
466,
407,
779,
42... | 2.21416 | 17,006 |
"""
GOCAD data tools.
paulbourke.net/dataformats/gocad/gocad.pdf
"""
import os
import numpy
def header(buff, counter=0, casters=None):
"""
GOCAD header reader
"""
if casters is None:
casters = {
int: ('pclip', 'field'),
bool: ('imap', 'ivolmap', 'parts', 'transparency'... | [
37811,
198,
38,
4503,
2885,
1366,
4899,
13,
198,
198,
79,
2518,
6084,
365,
13,
3262,
14,
7890,
687,
1381,
14,
70,
420,
324,
14,
70,
420,
324,
13,
12315,
198,
37811,
198,
11748,
28686,
198,
11748,
299,
32152,
628,
198,
4299,
13639,
... | 1.726593 | 3,076 |
import logging
from zentral.contrib.inventory.models import MachineSnapshot
from zentral.contrib.jamf.models import JamfInstance
from zentral.core.events import event_cls_from_type, register_event_type
from zentral.core.events.base import BaseEvent
from zentral.core.queues import queues
logger = logging.getLogger('zen... | [
11748,
18931,
198,
6738,
1976,
298,
1373,
13,
3642,
822,
13,
24807,
13,
27530,
1330,
10850,
43826,
9442,
198,
6738,
1976,
298,
1373,
13,
3642,
822,
13,
39159,
69,
13,
27530,
1330,
9986,
69,
33384,
198,
6738,
1976,
298,
1373,
13,
7295,... | 2.459732 | 1,192 |
from numpy import ones, arange, meshgrid, sum, int8, sqrt, roll, zeros
from param import Param
from fortran_operators import celltocorner
| [
6738,
299,
32152,
1330,
3392,
11,
610,
858,
11,
19609,
25928,
11,
2160,
11,
493,
23,
11,
19862,
17034,
11,
4836,
11,
1976,
27498,
198,
6738,
5772,
1330,
25139,
198,
6738,
329,
2213,
272,
62,
3575,
2024,
1330,
2685,
40301,
273,
1008,
... | 3.232558 | 43 |
import dash_bootstrap_components as dbc
carousel = dbc.Carousel(
items=[
{"key": "1", "src": "/static/images/slide1.svg"},
{"key": "2", "src": "/static/images/slide2.svg"},
{"key": "3", "src": "/static/images/slide3.svg"},
],
controls=True,
indicators=True,
)
| [
11748,
14470,
62,
18769,
26418,
62,
5589,
3906,
355,
288,
15630,
198,
198,
7718,
48355,
796,
288,
15630,
13,
9914,
48355,
7,
198,
220,
220,
220,
3709,
41888,
198,
220,
220,
220,
220,
220,
220,
220,
19779,
2539,
1298,
366,
16,
1600,
... | 2.165468 | 139 |
########
# GROWbox Supervisor System (GROWSS)
# Version: 2019-03-27V1A (This is an alpha version & not yet complete)
# Todd Moore
# 3.27.19
#
# This project is released under The MIT License (MIT)
# Copyright 2019 Todd Moore
########
########
# # Code is compatible with Python 2.7 and Python 3.5.
#!/usr/bin/env python... | [
7804,
198,
2,
10863,
3913,
3524,
45673,
4482,
357,
10761,
3913,
5432,
8,
198,
2,
10628,
25,
13130,
12,
3070,
12,
1983,
53,
16,
32,
357,
1212,
318,
281,
17130,
2196,
1222,
407,
1865,
1844,
8,
198,
2,
14377,
8877,
198,
2,
513,
13,
... | 2.419813 | 2,251 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: bilibili/account/fission/v1/fission.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _re... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
275,
22282,
2403,
14,
23317,
14,
69,
1480,
14,
85,
16,
14,
69,
1480,
1... | 2.432107 | 4,404 |
import logging
from typing import Optional
log = logging.getLogger(__name__)
try:
from commentjson import loads
except ImportError:
from json import loads
log.warning("'commentjson' not found, falling back to built-in 'json'. "
"Be warned, comments in .json files will cause errors.")
with... | [
11748,
18931,
198,
6738,
19720,
1330,
32233,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
2912,
17752,
1330,
15989,
198,
16341,
17267,
12331,
25,
198,
220,
220,... | 2.214197 | 803 |
# pylint: disable=R0903,W1202,R0801
"""Language detection module"""
import os
import argparse
import wget
import pandas as pd
import fasttext
from pycountry import languages
from azureml.studio.core.io.data_frame_directory \
import load_data_frame_from_directory, save_data_frame_to_directory
from azureml.studio.... | [
2,
279,
2645,
600,
25,
15560,
28,
49,
2931,
3070,
11,
54,
1065,
2999,
11,
49,
2919,
486,
198,
198,
37811,
32065,
13326,
8265,
37811,
198,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
266,
1136,
198,
11748,
19798,
292,
355,
... | 2.392045 | 880 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#####################################################################################################
# Data ingestion script for the TBFY Knowledge Graph (http://data.tbfy.eu/)
#
# This file contains a script that enriches the JSON documents with TBFY-specific properties.
# ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
29113,
29113,
29113,
4242,
2,
198,
2,
6060,
38382,
4226,
329,
262,
23799,
43833,
20414,
29681,
357,
4023,
1378,
7890,
13,... | 3.481108 | 397 |
from output.models.ms_data.regex.re_di11_xsd.re_di11 import (
Regex,
Doc,
)
__all__ = [
"Regex",
"Doc",
]
| [
6738,
5072,
13,
27530,
13,
907,
62,
7890,
13,
260,
25636,
13,
260,
62,
10989,
1157,
62,
87,
21282,
13,
260,
62,
10989,
1157,
1330,
357,
198,
220,
220,
220,
797,
25636,
11,
198,
220,
220,
220,
14432,
11,
198,
8,
198,
198,
834,
43... | 1.863636 | 66 |
import numpy as np
class IDIMethod:
"""Common functions for all methods.
"""
def __init__(self, video, *args, **kwargs):
"""
The image displacement identification method constructor.
For more configuration options, see `method.configure()`
"""
self.video = vid... | [
11748,
299,
32152,
355,
45941,
628,
198,
4871,
4522,
3955,
316,
2065,
25,
198,
220,
220,
220,
37227,
17227,
5499,
329,
477,
5050,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,... | 2.465574 | 305 |
# version 0.0.2
import generator
qtd_cnpj = input('Digite aqui a quantidade de cnpjs que gostaria de gerar. Entre 1 e 100. ')
verify_generate(qtd_cnpj)
| [
2,
2196,
657,
13,
15,
13,
17,
198,
11748,
17301,
628,
198,
198,
80,
8671,
62,
31522,
79,
73,
796,
5128,
10786,
19511,
578,
14839,
72,
257,
5554,
312,
671,
390,
269,
37659,
8457,
8358,
308,
455,
10312,
390,
27602,
283,
13,
7232,
26... | 2.384615 | 65 |
from collections import OrderedDict
from ..util import create_element, set_xml_value, TNS
from ..version import EXCHANGE_2010
from .common import EWSFolderService, PagingEWSMixIn, create_shape_element
class FindFolder(EWSFolderService, PagingEWSMixIn):
"""
MSDN: https://docs.microsoft.com/en-us/exchange/clie... | [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
11485,
22602,
1330,
2251,
62,
30854,
11,
900,
62,
19875,
62,
8367,
11,
309,
8035,
198,
6738,
11485,
9641,
1330,
7788,
3398,
27746,
62,
10333,
198,
6738,
764,
11321,
1330,
412,
1... | 2.553648 | 699 |
# -*- coding: utf-8; py-indent-offset: 2 -*-
from __future__ import division
from collections import defaultdict
from math import cos, pi, sin, sqrt
import sys
from cctbx import crystal
from cctbx.eltbx import sasaki, chemical_elements
from iotbx.pdb import common_residue_names_water as WATER_RES_NAMES
from libtbx.ut... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
26,
12972,
12,
521,
298,
12,
28968,
25,
362,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
10688,
1330,
8615,
11,
31028,
11,
... | 2.463415 | 4,387 |
# Copyright (c) 2013-2015, Brice Arnould <unbrice@vleu.net>
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | [
2,
15069,
357,
66,
8,
2211,
12,
4626,
11,
1709,
501,
16644,
426,
1279,
403,
1671,
501,
31,
85,
293,
84,
13,
3262,
29,
198,
2,
1439,
2489,
10395,
13,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
... | 2.77917 | 1,277 |
UNKNOWN = "-"
| [
4944,
44706,
796,
366,
21215,
198
] | 2.333333 | 6 |
from app.align_reader import AlignReader
import codecs
import os
from app.utils import LOG
from app import utils
from multiprocessing import Manager
import pickle
import collections
m = Manager()
index_lock = m.Lock()
alignments_lock = m.Lock() | [
6738,
598,
13,
31494,
62,
46862,
1330,
978,
570,
33634,
198,
11748,
40481,
82,
198,
11748,
28686,
198,
6738,
598,
13,
26791,
1330,
41605,
198,
6738,
598,
1330,
3384,
4487,
198,
6738,
18540,
305,
919,
278,
1330,
9142,
198,
11748,
2298,
... | 3.5 | 70 |
from pathlib import Path
for module in Path(__file__).parent.glob('[!_]*.py'):
__import__(f'{__name__}.{module.stem}', locals(), globals())
del module # we don't want to expose the module due to this import
del Path
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
1640,
8265,
287,
10644,
7,
834,
7753,
834,
737,
8000,
13,
4743,
672,
10786,
58,
0,
62,
60,
24620,
9078,
6,
2599,
198,
220,
220,
220,
11593,
11748,
834,
7,
69,
6,
90,
834,
3672,
834,
27422,
... | 2.8375 | 80 |
import json
import random
import sys
import time
import traceback
import requests
import utils
from conf import global_variable
from orm import SubscribeVmss, or_
from task.node import V2ray
from task.proxy_server import new_proxy
from utils import logger
_v2ray_server = new_proxy()
| [
11748,
33918,
198,
11748,
4738,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
12854,
1891,
198,
198,
11748,
7007,
198,
198,
11748,
3384,
4487,
198,
6738,
1013,
1330,
3298,
62,
45286,
198,
6738,
393,
76,
1330,
19808,
53,
76,
824,
11,
... | 3.418605 | 86 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321... | 3.688136 | 295 |
#
# PySNMP MIB module HUAWEI-PIM-BSR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-PIM-BSR-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:35:59 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
367,
34970,
8845,
40,
12,
47,
3955,
12,
4462,
49,
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,
... | 2.311828 | 3,069 |
import discord
from redbot.core import commands, Config, checks
from redbot.core.utils.embed import randomize_colour
from redbot.core.utils.menus import menu, prev_page, next_page
from discord.ext import tasks
from discord_components import DiscordComponents, Button, ButtonStyle
from .utils import *
from . import play... | [
11748,
36446,
198,
6738,
2266,
13645,
13,
7295,
1330,
9729,
11,
17056,
11,
8794,
198,
6738,
2266,
13645,
13,
7295,
13,
26791,
13,
20521,
1330,
4738,
1096,
62,
49903,
198,
6738,
2266,
13645,
13,
7295,
13,
26791,
13,
3653,
385,
1330,
68... | 3.83125 | 160 |
# original by Xinbo Wu
# annotated by Haoyu Huang
# Personalized PageRank for APVPA
from Utility import *
from Personalized_PageRank import *
main()
| [
2,
2656,
416,
25426,
2127,
18027,
198,
2,
24708,
515,
416,
9398,
726,
84,
31663,
198,
2,
15644,
1143,
7873,
27520,
329,
3486,
53,
4537,
198,
198,
6738,
34030,
1330,
1635,
198,
6738,
15644,
1143,
62,
9876,
27520,
1330,
1635,
628,
198,
... | 3.326087 | 46 |
# coding=utf-8
import factory
import faker
from django.core.files.uploadedfile import SimpleUploadedFile
from website.misc.factories import UserFactory
from .. import models
fake = faker.Faker()
| [
2,
19617,
28,
40477,
12,
23,
198,
11748,
8860,
198,
11748,
277,
3110,
198,
6738,
42625,
14208,
13,
7295,
13,
16624,
13,
25850,
276,
7753,
1330,
17427,
41592,
276,
8979,
198,
198,
6738,
3052,
13,
44374,
13,
22584,
1749,
1330,
11787,
22... | 3.389831 | 59 |
import time | [
11748,
640
] | 5.5 | 2 |
# -*- coding: utf-8 -*-
import munch
import unittest
import json
import exceptions
from mock import patch, call, MagicMock
from munch import munchify
from datetime import datetime
try: # compatibility with requests-based or restkit-based op.client.python
from openprocurement_client.exceptions import ResourceGone
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
285,
3316,
198,
11748,
555,
715,
395,
198,
11748,
33918,
198,
198,
11748,
13269,
198,
6738,
15290,
1330,
8529,
11,
869,
11,
6139,
44,
735,
198,
6738,
285,
3316,
... | 3.227679 | 224 |
# USAGE
# python detect_age.py --image images/adrian.png --face face_detector --age age_detector
# import the necessary packages
import numpy as np
import argparse
import cv2
import os
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,... | [
2,
1294,
11879,
198,
2,
21015,
4886,
62,
496,
13,
9078,
1377,
9060,
4263,
14,
324,
4484,
13,
11134,
1377,
2550,
1986,
62,
15255,
9250,
1377,
496,
2479,
62,
15255,
9250,
198,
198,
2,
1330,
262,
3306,
10392,
198,
11748,
299,
32152,
35... | 2.746071 | 1,209 |
import matplotlib
from matplotlib import pyplot as plt
import csv
plot_together()
#plot_increasing_size_exp()
#plot_increasing_alphabeth_exp() | [
11748,
2603,
29487,
8019,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
11748,
269,
21370,
628,
198,
198,
29487,
62,
45525,
3419,
198,
2,
29487,
62,
42647,
62,
7857,
62,
11201,
3419,
198,
2,
29487,
62,
42647,
62... | 3.085106 | 47 |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LIC... | [
2,
15069,
2321,
4946,
25896,
5693,
198,
2,
15069,
2211,
19764,
11421,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
... | 3.732075 | 265 |
#!/usr/bin/python
from pipeline import map_representation, strip_dimensions, call_graphviz, call_rank,\
call_similarity, call_filter, function_help, TermExtraction, extract_terms
from database import ManagedSession
from mocs_database import create_query, filter_query
import write_dot
debug = False
def map_args(ar... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
6738,
11523,
1330,
3975,
62,
15603,
341,
11,
10283,
62,
27740,
5736,
11,
869,
62,
34960,
85,
528,
11,
869,
62,
43027,
11,
59,
198,
220,
220,
220,
869,
62,
38610,
414,
11,
869,
62,
24455,
... | 2.824885 | 1,519 |
"""Tests for segmentFiltering sub-module."""
| [
37811,
51,
3558,
329,
10618,
11928,
20212,
850,
12,
21412,
526,
15931,
198
] | 3.461538 | 13 |
import sys
sys.path.append('../')
import model.labeled_lda as llda
# initialize data
labeled_documents = [("example example example example example"*10, ["example"]),
("test llda model test llda model test llda model"*10, ["test", "llda_model"]),
("example test example test ex... | [
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
198,
11748,
2746,
13,
18242,
276,
62,
18986,
355,
32660,
6814,
198,
198,
2,
41216,
1366,
198,
18242,
276,
62,
15390,
2886,
796,
685,
7203,
20688,
1672,
1672,
1672,
1672... | 2.476422 | 1,442 |
from pandas import DataFrame
import europy
from europy.lifecycle.result import TestResult, TestLabel
from europy.lifecycle.report import Report
# TODO: Explicitly import each decorator in release
from europy.decorators import *
EXAMPLE_LABEL_NAME = "my-custom-label"
# This is how you make your own decorator for te... | [
6738,
19798,
292,
1330,
6060,
19778,
198,
198,
11748,
11063,
9078,
198,
6738,
11063,
9078,
13,
36195,
47510,
13,
20274,
1330,
6208,
23004,
11,
6208,
33986,
198,
6738,
11063,
9078,
13,
36195,
47510,
13,
13116,
1330,
6358,
198,
198,
2,
16... | 3.451681 | 476 |
# coding=utf-8
# Copyright 2019 SK T-Brain Authors.
#
# 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... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
13130,
14277,
309,
12,
44687,
46665,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,... | 2.385257 | 719 |