content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
# ---------------------
from bs4 import BeautifulSoup as bs
import requests
import urllib3
import urllib
from urllib.parse import unquote
import re
import os
import sys
import json
import time
from colorama import Fore, init
from pprint import pprint
from datetime import datetime
import uuid
import threading
# --------... | [
2,
41436,
12,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
355,
275,
82,
198,
11748,
7007,
198,
11748,
2956,
297,
571,
18,
198,
11748,
2956,
297,
571,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
555,
22708,
198,
11748,
302,
198,
... | 3.228374 | 289 |
import unittest
from alfpy import word_pattern
from alfpy import word_vector
from alfpy import word_distance
from alfpy.utils import distmatrix
from . import utils
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
6738,
435,
69,
9078,
1330,
1573,
62,
33279,
198,
6738,
435,
69,
9078,
1330,
1573,
62,
31364,
198,
6738,
435,
69,
9078,
1330,
1573,
62,
30246,
198,
6738,
435,
69,
9078,
13,
26791,
1330,
1233,
6759,
860... | 2.918919 | 74 |
from functools import partial | [
6738,
1257,
310,
10141,
1330,
13027
] | 4.833333 | 6 |
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA @UnusedWildImport
import unittest
from obspy.core import AttribDict
if __name__ == '__main__':
unittest.main(defaultTest='suite')
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
357,
48546,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 2.448819 | 127 |
from cifar10 import CIFAR10
from mnist import MNIST | [
6738,
269,
361,
283,
940,
1330,
327,
5064,
1503,
940,
198,
6738,
285,
77,
396,
1330,
29060,
8808
] | 2.833333 | 18 |
# -*- coding: utf-8 -*-
"""
JSON Resume Validator
~~~~~~
JSON Resume Validator helps validate python dictionaries to
ensure they are valid representation of a JSON Resume.
"""
from jsonresume.resume import Resume
__all__ = ['Resume']
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
19449,
1874,
2454,
48951,
1352,
198,
220,
220,
220,
220,
8728,
4907,
628,
220,
220,
220,
19449,
1874,
2454,
48951,
1352,
5419,
26571,
21015,
4... | 2.94186 | 86 |
import glob
import os
import sys
import re
savedlines = []
startreading()
| [
11748,
15095,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
302,
198,
198,
82,
9586,
6615,
796,
17635,
628,
628,
198,
198,
9688,
25782,
3419,
198
] | 3.076923 | 26 |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# created by restran on 2016/1/2
from __future__ import unicode_literals, absolute_import
import traceback
from django.views.decorators.http import require_http_methods
from django.views.decorators.csrf import csrf_protect
from django.db import transaction
from cerberu... | [
2,
5145,
14,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2727,
416,
1334,
2596,
319,
1584,
14,
16,
14,
17,
198,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
1... | 1.556049 | 6,084 |
# -*- coding: utf-8 -*-
# filename: WX_BG.py
import prices
import glob
import prediction
import os
import time
import random
#
prices_file_pattern = "Output\\prices\\*.csv"
#
predict_file_pattern = "Output\\predict\\*.csv"
#
prices_file_second_pattern = "Output\\prices_second\\*.csv"
#
predict_file_second_pattern = "O... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
29472,
25,
370,
55,
62,
40469,
13,
9078,
198,
11748,
4536,
198,
11748,
15095,
198,
11748,
17724,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
4738,
198,
198,
2,
... | 2.234921 | 945 |
import numpy as np
import pytest
from numpy.testing import assert_almost_equal
from ...tools import linear, power
from .. import dHsic # type: ignore
| [
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
28177,
62,
40496,
198,
198,
6738,
2644,
31391,
1330,
14174,
11,
1176,
198,
6738,
11485,
1330,
288,
39,
21383,
220,
1303,
2099,
25,... | 3.5 | 44 |
from tkinter import *
from PIL import ImageTk, Image
import pymysql
from tkinter import messagebox
from tkinter import ttk
from datetime import datetime, timedelta
import decimal
a = ATLzooShowHistory()
| [
6738,
256,
74,
3849,
1330,
1635,
198,
6738,
350,
4146,
1330,
7412,
51,
74,
11,
7412,
198,
11748,
279,
4948,
893,
13976,
198,
6738,
256,
74,
3849,
1330,
3275,
3524,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
198,
6738,
4818,
8079,
1... | 3.306452 | 62 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: sample-weight-model-param.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
... | [
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,
6291,
12,
6551,
12,
19849,
12,
17143,
13,
1676,
1462,
198,
198,
11748,
2... | 2.248145 | 2,696 |
"""
:author: Nicolas Strike
:date: Early 2019
This file is mostly a definition of Cases. Each case is defined in the following format
using python dictionaries (values surrounded with < > must have the < > removed to be valid).
.. code-block:: python
:linenos:
CASENAME = {'name': 'casename',
'descrip... | [
37811,
198,
25,
9800,
25,
29737,
12282,
198,
25,
4475,
25,
12556,
13130,
198,
198,
1212,
2393,
318,
4632,
257,
6770,
286,
35536,
13,
5501,
1339,
318,
5447,
287,
262,
1708,
5794,
198,
3500,
21015,
48589,
3166,
357,
27160,
11191,
351,
1... | 1.746736 | 36,456 |
from abc import ABC, ABCMeta, abstractmethod
from domain.models.datase_information import DatasetInformation
| [
6738,
450,
66,
1330,
9738,
11,
9738,
48526,
11,
12531,
24396,
198,
198,
6738,
7386,
13,
27530,
13,
19608,
589,
62,
17018,
1330,
16092,
292,
316,
21918,
628
] | 3.964286 | 28 |
"""The setup script."""
from setuptools import find_packages, setup
with open('README.md') as readme_file:
readme = readme_file.read()
with open('docs/release-notes.md') as history_file:
history = history_file.read()
requirements = []
dev_requirements = [
# lint and tools
'black',
'flake8',
... | [
37811,
464,
9058,
4226,
526,
15931,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
9132,
11537,
355,
1100,
1326,
62,
7753,
25,
198,
220,
220,
220,
1100,
1326,
796,
11... | 2.482301 | 678 |
# -*- coding: utf-8 -*-
"""Base data handler.
Copyright 2021, Gradient Zero
All rights reserved
"""
import logging
import dq0.sdk
from dq0.sdk.estimators.data_handler.base import BasicDataHandler
import pandas as pd
from sklearn.model_selection import train_test_split
logger = logging.getLogger(__name__)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
14881,
1366,
21360,
13,
198,
198,
15269,
33448,
11,
17701,
1153,
12169,
198,
3237,
2489,
10395,
198,
37811,
198,
198,
11748,
18931,
198,
198,
11748,
288,
80,
15,
... | 2.925234 | 107 |
import os
from django.conf import settings
from git import Repo
| [
11748,
28686,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
17606,
1330,
1432,
78,
628
] | 3.823529 | 17 |
from .base_page import BasePage
from .locators import BasketPageLocators
| [
6738,
764,
8692,
62,
7700,
1330,
7308,
9876,
198,
6738,
764,
17946,
2024,
1330,
347,
11715,
9876,
33711,
2024,
628
] | 3.7 | 20 |
import factory
from api.collaboration.models import TeamMember
| [
11748,
8860,
198,
198,
6738,
40391,
13,
26000,
4820,
341,
13,
27530,
1330,
4816,
27608,
628
] | 4.0625 | 16 |
"""
aiohttp
REFERENCES:: http://bit.ly/2O2lmeU
http://bit.ly/2O08oy3
"""
import asyncio
from asyncio import Future
from typing import List, Dict
import aiohttp
from trypython.common.commoncls import SampleBase
| [
37811,
198,
64,
952,
4023,
220,
628,
198,
198,
2200,
24302,
24181,
1546,
3712,
2638,
1378,
2545,
13,
306,
14,
17,
46,
17,
75,
1326,
52,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2638,
1378,
2545,
13,
306,
... | 2.505376 | 93 |
from sqlalchemy import Column, String, Boolean, ForeignKey, Integer
from sqlalchemy.orm import relationship
from database import Base
from string import ascii_letters
from random import choice
| [
6738,
44161,
282,
26599,
1330,
29201,
11,
10903,
11,
41146,
11,
8708,
9218,
11,
34142,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
6738,
6831,
1330,
7308,
198,
6738,
4731,
1330,
355,
979,
72,
62,
15653,
198,
6738,
4738,
13... | 4.333333 | 45 |
__________________________________________________________________________________________________
sample 24 ms submission
__________________________________________________________________________________________________
sample 13188 kb submission
_______________________________________________________________________... | [
27193,
10221,
834,
198,
39873,
1987,
13845,
14498,
198,
27193,
10221,
834,
198,
39873,
1511,
20356,
47823,
14498,
198,
27193,
10221,
834,
198
] | 15.130435 | 23 |
#!/usr/bin/env python3
import sys
import numpy as np
if len(sys.argv) == 1 or sys.argv[1] == "-h" or sys.argv[1] == "--help":
print(
"""
Remove line indices (0-based) specified in 'index.txt'
usage: program [-k] index.txt inFile
-k Keep line indices in 'index.txt' instead of removing ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
6624,
352,
393,
25064,
13,
853,
85,
58,
16,
60,
6624,
27444,
71,
1,
393,
... | 2.157407 | 432 |
#!/usr/bin/env python
import arm_control_utils
DURATION = 30000
TRAJ_POLY1 = [1000, 100, 100]
TORQUE_POLY1 = [1000, 100, 100]
MODE = 3
arm_control_utils.initialize_motors()
arm_control_utils.enable_state_torque()
arm_control_utils.set_debug(1, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
3211,
62,
13716,
62,
26791,
198,
198,
35,
4261,
6234,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
513,
2388,
198,
51,... | 2.037879 | 264 |
#!/usr/bin/python
# coding=utf-8
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
19617,
28,
40477,
12,
23,
198,
2,
198,
2,
15069,
12131,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
... | 3.626943 | 193 |
# Estimators are partially based on the "estimators.py" from the following repositories:
# https://github.com/agadetsky/pytorch-pl-variance-reduction
# https://github.com/sdrobert/pydrobert-pytorch
import torch
def uniform_to_exp(logits, uniform=None, enable_grad=False):
'''
Converts a tensor of independent u... | [
2,
10062,
320,
2024,
389,
12387,
1912,
319,
262,
366,
395,
320,
2024,
13,
9078,
1,
422,
262,
1708,
38072,
25,
198,
2,
3740,
1378,
12567,
13,
785,
14,
363,
324,
1039,
2584,
14,
9078,
13165,
354,
12,
489,
12,
25641,
590,
12,
445,
... | 2.38738 | 2,504 |
#Martina O'Brien 10/3/2019
#Problem Set 7 - squareroots
#Programming Code to determining the squareroots of positive floating point numbers
## Reference for try and expect https://www.w3schools.com/python/python_try_except.asp
while True: # this loop will run to allow the user to input a value again if they do ... | [
2,
13143,
1437,
440,
6,
20118,
838,
14,
18,
14,
23344,
201,
198,
2,
40781,
5345,
767,
532,
6616,
19150,
201,
198,
2,
15167,
2229,
6127,
284,
13213,
262,
6616,
19150,
286,
3967,
12462,
966,
3146,
201,
198,
201,
198,
2235,
20984,
329,... | 3.090487 | 431 |
import requests
import json
token = ''
email_token = ''
print("######## Pass ########")
target = 'http://127.0.0.1:5000/login'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
data = {'username': 'jon@aaxus.com', 'password': 'password125'}
r = requests.post(target, data=json.dumps(data), headers... | [
11748,
7007,
198,
11748,
33918,
198,
198,
30001,
796,
10148,
198,
12888,
62,
30001,
796,
10148,
198,
198,
4798,
7203,
7804,
6251,
46424,
21017,
4943,
198,
16793,
796,
705,
4023,
1378,
16799,
13,
15,
13,
15,
13,
16,
25,
27641,
14,
3823... | 2.622694 | 1,084 |
# (C) Copyright 2021 Inova Development Inc.
# 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 appl... | [
2,
357,
34,
8,
15069,
33448,
554,
10071,
7712,
3457,
13,
198,
2,
1439,
6923,
33876,
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.695353 | 581 |
#!/usr/bin/env python
"""
This module contains the base xml Node and Period classes
"""
from xml.dom.minidom import getDOMImplementation
from date import Period
from constants import START, END
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
1212,
8265,
4909,
262,
2779,
35555,
19081,
290,
18581,
6097,
198,
37811,
198,
198,
6738,
35555,
13,
3438,
13,
1084,
312,
296,
1330,
651,
39170,
3546,
32851,
198,
198,
... | 3.666667 | 54 |
"""Define the schema for the court summary report."""
import datetime
from dataclasses import dataclass, field, fields
from typing import Any, Iterator, List, Optional, Union
import desert
import marshmallow
import pandas as pd
from ..utils import DataclassSchema
__all__ = ["CourtSummary", "Docket", "Charge", "Sent... | [
37811,
7469,
500,
262,
32815,
329,
262,
2184,
10638,
989,
526,
15931,
198,
198,
11748,
4818,
8079,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
11,
7032,
198,
6738,
19720,
1330,
4377,
11,
40806,
1352,
11,
7343,
11,
3... | 3.531915 | 94 |
# Title : Json Module Module
# Author : Kiran Raj R.
# Date : 26/11/2020
python_json = {"name":"kiran", "email":"kiran@gmail.com", "isHappy": "Yes"}
import json
string_j = json.dumps(python_json)
print(string_j) | [
2,
11851,
220,
1058,
449,
1559,
19937,
19937,
198,
2,
6434,
1058,
7385,
272,
13308,
371,
13,
198,
2,
7536,
220,
220,
1058,
2608,
14,
1157,
14,
42334,
198,
198,
29412,
62,
17752,
796,
19779,
3672,
2404,
74,
343,
272,
1600,
366,
12888... | 2.571429 | 84 |
import asyncio
from asyncio import sleep
from random import choice
from userbot.events import register
T_R_D = [
"@PrajjuS",
"@Vin02vin",
"@Iamsaisharan",
"@venomsamurai",
]
| [
11748,
30351,
952,
198,
6738,
30351,
952,
1330,
3993,
198,
6738,
4738,
1330,
3572,
198,
6738,
2836,
13645,
13,
31534,
1330,
7881,
198,
198,
51,
62,
49,
62,
35,
796,
685,
198,
220,
220,
220,
44212,
47,
430,
73,
14396,
50,
1600,
198,
... | 2.419753 | 81 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import zipfile
import logging
import requests
import tempfile
import contextlib
from .parser import parse_record
from .. import base
logger = logg... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,... | 2.256776 | 701 |
from os import path
import json
from bigcode_fetcher.project import Project
FIXTURES_DIR = path.dirname(__file__)
PROJECTS_PATH = path.join(FIXTURES_DIR, "projects.json")
with open(PROJECTS_PATH, "r") as f:
JSON_PROJECTS = json.load(f)
PROJECTS = [Project(p) for p in JSON_PROJECTS]
| [
6738,
28686,
1330,
3108,
198,
11748,
33918,
198,
198,
6738,
1263,
8189,
62,
34045,
2044,
13,
16302,
1330,
4935,
198,
198,
47084,
51,
29514,
62,
34720,
796,
3108,
13,
15908,
3672,
7,
834,
7753,
834,
8,
198,
31190,
41,
2943,
4694,
62,
... | 2.495726 | 117 |
from rx.subjects import Subject
from rx.concurrency import QtScheduler
import sys
try:
from PyQt4 import QtCore
from PyQt4.QtGui import QWidget, QLabel
from PyQt4.QtGui import QApplication
except ImportError:
try:
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication, QWidge... | [
6738,
374,
87,
13,
32796,
82,
1330,
15540,
198,
6738,
374,
87,
13,
1102,
34415,
1330,
33734,
50,
1740,
18173,
198,
11748,
25064,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
9485,
48,
83,
19,
1330,
33734,
14055,
198,
220,
220,
220,... | 2.448598 | 214 |
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import Isomap
from scipy.spatial.distance import pdist
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import cross_val_score, LeaveOneOut
RANDOM_STATE = 42
def calculate_pairwise_distances(df_for_Box_Plot_featu... | [
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
35720,
13,
805,
361,
727,
1330,
1148,
296,
499,
198,
6738,
629,
541,
88,
13,
2777,
34961,
13,
30246,
1330,
279,
17080,
... | 2.543035 | 2,405 |
for i in range(int(input())):
n = int(input())
p,q = [],[]
for j in range(n):
p.append([int(k) for k in input().split()])
for j in range(n):
q.append([int(k) for k in input().split()])
f = 0
for j in range(n):
for k in range(n):
if(p[j][k]!=q[j][k] and p[j][k... | [
198,
1640,
1312,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
198,
220,
220,
220,
299,
796,
493,
7,
15414,
28955,
198,
220,
220,
220,
279,
11,
80,
796,
685,
4357,
21737,
198,
220,
220,
220,
329,
474,
287,
2837,
7,
77,
2599,
198,
22... | 1.561521 | 447 |
import tensorflow as tf
default_params = tf.contrib.training.HParams(
# Encoder
encoder_num_hiddens=128,
encoder_num_residual_hiddens=32,
encoder_num_residual_layers=2,
# Decoder
decoder_num_hiddens=128,
decoder_num_residual_hiddens=32,
decoder_num_residual_layers=2,
embedding_di... | [
11748,
11192,
273,
11125,
355,
48700,
198,
198,
12286,
62,
37266,
796,
48700,
13,
3642,
822,
13,
34409,
13,
39,
10044,
4105,
7,
628,
220,
220,
220,
1303,
14711,
12342,
198,
220,
220,
220,
2207,
12342,
62,
22510,
62,
71,
1638,
641,
2... | 2.281481 | 405 |
"""
File to demonstrate the coroutines api in python
"""
import asyncio
"""
asyncio.run takes a coroutine and
A RuntimeWarning is generated if the coroutine is not awaited
Eg: coroutine('without_run')
"""
asyncio.run(coroutine('coroutine_call'))
"""
create_task creates a task which runs a coroutine in the even... | [
37811,
198,
8979,
284,
10176,
262,
1162,
448,
1127,
40391,
287,
21015,
198,
37811,
198,
198,
11748,
30351,
952,
628,
198,
198,
37811,
198,
292,
13361,
952,
13,
5143,
2753,
257,
1162,
28399,
290,
220,
198,
198,
32,
43160,
20361,
318,
7... | 2.777311 | 238 |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
from tord.handlers import (block_test, gocron, index, media, upload)
url_patterns = [
(r"/", index.IndexHandler),
(r"/books", upload.BooksHandler),
(r"/images", media.ImageHandler),
(r"/videos", media.VideoHandler),
# (r"/async/t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
1772,
25,
1263,
6513,
692,
16115,
628,
198,
6738,
256,
585,
13,
4993,
8116,
1330,
357,
9967,
62,
9288,
11,
308,
... | 2.330189 | 212 |
statusEmojis = {'yes':'', 'no':''}
numEmojis = {1:'1', 2:'2', 3:'3', 4:'4', 5:'5', 6:'6', 7:'7', 8:'8', 9:'9', 0:'0'}
| [
13376,
36,
5908,
73,
271,
796,
1391,
6,
8505,
10354,
6,
3256,
705,
3919,
10354,
7061,
92,
198,
22510,
36,
5908,
73,
271,
796,
1391,
16,
32105,
16,
3256,
362,
32105,
17,
3256,
513,
32105,
18,
3256,
604,
32105,
19,
3256,
642,
32105,
... | 1.761194 | 67 |
from .crawler import Crawler | [
6738,
764,
66,
39464,
1330,
20177,
1754
] | 4 | 7 |
# Copyright 2018 - 2020 Alexey Stepanov aka penguinolog.
#
# 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 requi... | [
2,
220,
220,
220,
15069,
2864,
532,
12131,
4422,
2959,
5012,
272,
709,
22430,
38373,
259,
928,
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,
198,
... | 2.334525 | 4,197 |
import pickle
import os
from constant_variable import *
# class Message
# get message from queue
def get():
new_file=open(MESSAGE_QUEUE_FILE,"r")
message_list= new_file.read().split(BUFFER)
return pickle.loads(message_list[0])
# take from file and cast it to object
# remove the message from queue
# ... | [
11748,
2298,
293,
198,
11748,
28686,
198,
6738,
6937,
62,
45286,
1330,
1635,
628,
198,
2,
1398,
16000,
198,
198,
2,
651,
3275,
422,
16834,
198,
4299,
651,
33529,
198,
220,
220,
220,
649,
62,
7753,
28,
9654,
7,
44,
1546,
4090,
8264,
... | 3.033333 | 120 |
from featureMan.otSingleSubFeatures import *
from featureMan.otNumberFeatures import *
from featureMan.otLanguages import *
from featureMan.otLocalized import *
from featureMan.otLigatureFeatures import *
from featureMan.otMark import mark
from featureMan.otSyntax import fontDic, GDEF
from featureMan.otKern import kern... | [
6738,
3895,
5124,
13,
313,
28008,
7004,
23595,
1330,
1635,
198,
6738,
3895,
5124,
13,
313,
15057,
23595,
1330,
1635,
198,
6738,
3895,
5124,
13,
313,
43,
33213,
1330,
1635,
198,
6738,
3895,
5124,
13,
313,
14565,
1143,
1330,
1635,
198,
... | 3.082222 | 450 |
"""
The MIT License
Copyright (c) 2021 MatNet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | [
198,
37811,
198,
464,
17168,
13789,
198,
198,
15269,
357,
66,
8,
33448,
6550,
7934,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
1659,
428,
3788,
290,
3917,
10314,
3696,
357,
... | 3.499089 | 549 |
import os
import numpy as np
import mindspore
from mindspore import Tensor
from mindspore import load_checkpoint, load_param_into_net
from src.model import RNNModel, RNNModelInfer
from src.utils import process_poems
start_token = 'B'
end_token = 'E'
model_dir = './ckpt/'
corpus_file = './data/poems.txt'
if __name__ ... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2000,
2777,
382,
198,
6738,
2000,
2777,
382,
1330,
309,
22854,
198,
6738,
2000,
2777,
382,
1330,
3440,
62,
9122,
4122,
11,
3440,
62,
17143,
62,
20424,
62,
3262,
198,
6738,
... | 2.634921 | 189 |
import os
import sys
from pychemia import HAS_PYMATGEN, pcm_log
from .structure import Structure
from pychemia.code.vasp import read_poscar
from pychemia.code.abinit import AbinitInput
def structure_from_file(structure_file):
"""
Attempts to reconstruct a PyChemia Structure from the contents of any given file... | [
11748,
28686,
198,
11748,
25064,
198,
6738,
12972,
15245,
544,
1330,
33930,
62,
47,
56,
41636,
35353,
11,
279,
11215,
62,
6404,
198,
6738,
764,
301,
5620,
1330,
32522,
198,
6738,
12972,
15245,
544,
13,
8189,
13,
85,
5126,
1330,
1100,
... | 2.570946 | 592 |
from os import listdir
import os.path
import pandas as pd
from .count_variants_per_gene import process_vcf
from .genetree import make_gene_tree | [
198,
6738,
28686,
1330,
1351,
15908,
198,
11748,
28686,
13,
6978,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
764,
9127,
62,
25641,
1187,
62,
525,
62,
70,
1734,
1330,
1429,
62,
85,
12993,
198,
6738,
764,
5235,
316,
631,
1330,
7... | 3 | 48 |
from deepmerge import Merger
draft_merger = Merger(
[
(list, [list_merge]),
(dict, ["merge"])
],
["override"],
["override"]
)
| [
6738,
2769,
647,
469,
1330,
4638,
1362,
628,
198,
198,
35679,
62,
647,
1362,
796,
4638,
1362,
7,
198,
220,
220,
220,
685,
198,
220,
220,
220,
220,
220,
220,
220,
357,
4868,
11,
685,
4868,
62,
647,
469,
46570,
198,
220,
220,
220,
... | 2.0125 | 80 |
import os
import numpy as np
import pandas as pd
from tqdm import tqdm
from PIL import Image
from lib.img2_coord_ica import img2_coord_iter, coord2_img
from lib.log import Logger
# ref: https://www.kaggle.com/paulorzp/run-length-encode-and-decode
def rle_decode(mask_rle, shape=(768, 768)):
"""
Args:
... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
6738,
9195,
13,
9600,
17,
62,
37652,
62,
3970,
... | 2.356481 | 432 |
from src.main import sample_function | [
6738,
12351,
13,
12417,
1330,
6291,
62,
8818
] | 4.5 | 8 |
import numpy as np
import re
import json
import xarray as xr
import pandas as pd
def read_train_loss(epoch, fname,
variables=['test_loss', 'train_loss']):
"""Read the loss.json file for the current epochs test and train loss"""
df = pd.read_json(fname)
epoch_means = df.groupby('epoch')... | [
11748,
299,
32152,
355,
45941,
198,
11748,
302,
198,
11748,
33918,
198,
11748,
2124,
18747,
355,
2124,
81,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
4299,
1100,
62,
27432,
62,
22462,
7,
538,
5374,
11,
277,
3672,
11,
198,
220,
... | 2.31259 | 691 |
import pytest
from selenium.common.exceptions import TimeoutException
from selene.browser import *
from selene.support.conditions import have
from selene.support.jquery_style_selectors import ss
from tests.acceptance.helpers.helper import get_test_driver
from tests.acceptance.helpers.todomvc import given_active
| [
11748,
12972,
9288,
198,
6738,
384,
11925,
1505,
13,
11321,
13,
1069,
11755,
1330,
3862,
448,
16922,
198,
198,
6738,
384,
29466,
13,
40259,
1330,
1635,
198,
6738,
384,
29466,
13,
11284,
13,
17561,
1756,
1330,
423,
198,
6738,
384,
29466,... | 3.456522 | 92 |
from genomics_data_index.storage.service import SQLQueryInBatcherDict, SQLQueryInBatcherList
| [
6738,
2429,
31994,
62,
7890,
62,
9630,
13,
35350,
13,
15271,
1330,
16363,
20746,
818,
24541,
2044,
35,
713,
11,
16363,
20746,
818,
24541,
2044,
8053,
628,
198
] | 3.392857 | 28 |
import db_transfer
import config
import logging
from musdk.client import Client
| [
11748,
20613,
62,
39437,
198,
11748,
4566,
198,
11748,
18931,
198,
6738,
1928,
34388,
13,
16366,
1330,
20985,
628
] | 4.263158 | 19 |
# Standard Library
import json
# Third Party Library
import pytest
from jsonpath_rw.lexer import JsonPathLexerError
# First Party Library
from data_extractor.exceptions import ExprError, ExtractError
from data_extractor.json import JSONExtractor
| [
2,
8997,
10074,
198,
11748,
33918,
198,
198,
2,
10467,
3615,
10074,
198,
11748,
12972,
9288,
198,
198,
6738,
33918,
6978,
62,
31653,
13,
2588,
263,
1330,
449,
1559,
15235,
45117,
263,
12331,
198,
198,
2,
3274,
3615,
10074,
198,
6738,
... | 3.591549 | 71 |
import numpy as np
from PIL import Image
import os
npy_file1 = './prediction/1110_1.npy'
npy_file2 = './prediction/1110_2.npy'
npy_file3 = './prediction/1110_3.npy'
npy_file4 = './prediction/1110_4.npy'
npy_file5 = './prediction/1110_5.npy'
arr1 = np.load(npy_file1)
arr2 = np.load(npy_file2)
arr3 = np.load(npy_file3)... | [
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
198,
198,
77,
9078,
62,
7753,
16,
796,
705,
19571,
28764,
2867,
14,
1157,
940,
62,
16,
13,
77,
9078,
6,
198,
77,
9078,
62,
7753,
17,
796,
705,
195... | 2.098434 | 447 |
# -*- coding: utf-8 -*-
"""
@Author: tushushu
@Date: 2018-08-21 14:33:11
@Last Modified by: tushushu
@Last Modified time: 2019-05-22 15:41:11
"""
import os
os.chdir(os.path.split(os.path.realpath(__file__))[0])
import sys
sys.path.append(os.path.abspath(".."))
from imylu.ensemble.gbdt_classifier import GradientBoos... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
13838,
25,
256,
1530,
1530,
84,
198,
31,
10430,
25,
2864,
12,
2919,
12,
2481,
1478,
25,
2091,
25,
1157,
198,
31,
5956,
40499,
416,
25,
220,
220,
256,... | 2.549296 | 213 |
"""CoinGecko view"""
__docformat__ = "numpy"
import argparse
from typing import List, Tuple
import pandas as pd
from pandas.plotting import register_matplotlib_converters
import matplotlib.pyplot as plt
from tabulate import tabulate
import mplfinance as mpf
from gamestonk_terminal.helper_funcs import (
parse_know... | [
37811,
24387,
10082,
37549,
1570,
37811,
198,
834,
15390,
18982,
834,
796,
366,
77,
32152,
1,
198,
198,
11748,
1822,
29572,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
19798,
292,
... | 2.075763 | 8,025 |
"""
Data loaders based on tensorpack
"""
import numpy as np
from utilities import nparrays as arrtools
| [
37811,
198,
6601,
3440,
364,
1912,
319,
11192,
273,
8002,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
20081,
1330,
299,
1845,
20477,
355,
5240,
31391,
628
] | 3.5 | 30 |
# from django.core.management import BaseCommand
# import pandas as pd
#
# from stages.models import Category, Stage
#
#
# class Command(BaseCommand):
# help = 'Import a list of stage in the database'
#
# def add_arguments(self, parser):
# super(Command, self).add_arguments(parser)
# parser.add_... | [
2,
422,
42625,
14208,
13,
7295,
13,
27604,
1330,
7308,
21575,
198,
2,
1330,
19798,
292,
355,
279,
67,
198,
2,
198,
2,
422,
9539,
13,
27530,
1330,
21743,
11,
15371,
198,
2,
198,
2,
198,
2,
1398,
9455,
7,
14881,
21575,
2599,
198,
... | 2.144902 | 559 |
import os
import io
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.figure import Figure
from keras.applications.imagenet_utils import preprocess_input
from keras.backend.tensorflow_backend import set_session
from kera... | [
11748,
28686,
198,
11748,
33245,
198,
11748,
2603,
29487,
8019,
355,
285,
489,
198,
76,
489,
13,
1904,
10786,
46384,
11537,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
2603,
29487,
8019,
13,
1891,
2412,... | 2.65493 | 284 |
from . import BaseAPITestCase
| [
6738,
764,
1330,
7308,
2969,
2043,
395,
20448,
628
] | 3.444444 | 9 |
#!/usr/bin/python3
import subprocess
import time
from prometheus_client import start_http_server, Gauge
start_http_server(9200)
latencygauge = Gauge('tcprtt', 'provides rtt to fed server using ss',['cohort'])
while True:
stat, lbl= getstat()
latencygauge.labels(cohort=lbl).set(stat)
time.sleep(2) | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
850,
14681,
198,
11748,
640,
198,
6738,
1552,
36916,
62,
16366,
1330,
923,
62,
4023,
62,
15388,
11,
35094,
469,
198,
198,
9688,
62,
4023,
62,
15388,
7,
24,
2167,
8,
198,
15460,
... | 2.561983 | 121 |
from behave import *
use_step_matcher("re")
| [
6738,
17438,
1330,
1635,
198,
198,
1904,
62,
9662,
62,
6759,
2044,
7203,
260,
4943,
628
] | 2.875 | 16 |
import functions
import Aspirobot
import time
import os
import Manoir
import Capteur
import Etat
import threading
import Case
from threading import Thread
manor_size = 5
gameIsRunning = True
clearConsole = lambda: os.system('cls' if os.name in ('nt', 'dos') else 'clear')
manoir = Manoir.Manoir(manor_size, manor_size... | [
11748,
5499,
198,
11748,
1081,
79,
7058,
13645,
198,
11748,
640,
198,
11748,
28686,
198,
11748,
1869,
10840,
198,
11748,
6790,
23365,
198,
11748,
17906,
265,
198,
11748,
4704,
278,
198,
11748,
8913,
198,
6738,
4704,
278,
1330,
14122,
198,... | 2.46347 | 438 |
import numpy as np
from scipy import sparse as sp
from rlscore.utilities import multiclass
if __name__=="__main__":
print_stats()
| [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
29877,
355,
599,
198,
198,
6738,
374,
75,
26675,
13,
315,
2410,
1330,
47368,
31172,
198,
220,
220,
220,
220,
198,
198,
361,
11593,
3672,
834,
855,
1,
834,
12417,
834,
129... | 2.711538 | 52 |
print(3 ** int(input()))
| [
4798,
7,
18,
12429,
493,
7,
15414,
3419,
4008,
198
] | 2.5 | 10 |
# como los hash de ruby, guarda "clave" "valor"
# al igual que un diccionario, esta la Palabra, que es la clave y la defincin que seria el valor.
# las claves tienen que ser unicas
nombre_de_diccionario = {} #curly brackets.
monthConversions = {
"Jan": "January",
"Feb": "February",
"Mar": "March",
"Apr": "Ap... | [
2,
401,
78,
22346,
12234,
390,
43506,
11,
4860,
64,
366,
44281,
1,
366,
2100,
273,
1,
198,
2,
435,
45329,
723,
8358,
555,
288,
44240,
295,
4982,
11,
1556,
64,
8591,
3175,
397,
430,
11,
8358,
1658,
8591,
537,
1015,
331,
8591,
825,
... | 2.60251 | 478 |
from click.testing import CliRunner
from dothub.cli import dothub
base_args = ["--user=xxx", "--token=yyy"]
| [
6738,
3904,
13,
33407,
1330,
1012,
72,
49493,
198,
6738,
288,
849,
549,
13,
44506,
1330,
288,
849,
549,
628,
198,
8692,
62,
22046,
796,
14631,
438,
7220,
28,
31811,
1600,
366,
438,
30001,
28,
22556,
88,
8973,
628,
628,
198
] | 2.780488 | 41 |
import matplotlib
matplotlib.use('Agg')
import statsmodels.api as sm
import statsmodels.formula.api as smf
import numpy as np
from scipy.stats import linregress
import matplotlib.pyplot as plt
from sklearn.metrics import roc_curve, auc
| [
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
46384,
11537,
198,
11748,
9756,
27530,
13,
15042,
355,
895,
198,
11748,
9756,
27530,
13,
687,
4712,
13,
15042,
355,
895,
69,
198,
11748,
299,
32152,
355,
45941,
198,
673... | 3 | 81 |
from thicket import finders
| [
6738,
6546,
316,
1330,
1064,
364,
628
] | 4.142857 | 7 |
__all__ = ["ComponentTestCase"]
import os
import sys
import yaml
import unittest
from gada import component
from test.utils import TestCaseBase
if __name__ == "__main__":
unittest.main()
| [
834,
439,
834,
796,
14631,
21950,
14402,
20448,
8973,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
331,
43695,
198,
11748,
555,
715,
395,
198,
6738,
308,
4763,
1330,
7515,
198,
6738,
1332,
13,
26791,
1330,
6208,
20448,
14881,
628,
... | 3.079365 | 63 |
import time
import random
from multiprocessing import pool
from playsound import playsound
from threading import Thread
i = -1
l = 0
count = 0
print()
x = loops()
# DRIVER CODE
n = input("ENTER YOUR TEXT")
print("type any song name from here ...")
lis=["birth",'rider','standard','teri mitti me','chitrakaar']... | [
11748,
640,
198,
11748,
4738,
198,
6738,
18540,
305,
919,
278,
1330,
5933,
198,
6738,
5341,
633,
1330,
5341,
633,
198,
6738,
4704,
278,
1330,
14122,
198,
198,
72,
796,
532,
16,
198,
75,
796,
657,
198,
198,
9127,
796,
657,
628,
628,
... | 1.488002 | 4,584 |
import pytest
from src.app import create_app
| [
11748,
12972,
9288,
198,
198,
6738,
12351,
13,
1324,
1330,
2251,
62,
1324,
628,
198
] | 3.2 | 15 |
# This file implements the PMON firmware's LEON2 boot setup. It does not
# implement the serial port boot loading, only the initial setup.
# The PMON firmware for the LEON2 comes with a number of preprocessor defines
# that the user typically changes to match the hardware configuration.
# The PMON emulation function t... | [
2,
770,
2393,
23986,
262,
3122,
1340,
18779,
338,
12509,
1340,
17,
6297,
9058,
13,
632,
857,
407,
198,
2,
3494,
262,
11389,
2493,
6297,
11046,
11,
691,
262,
4238,
9058,
13,
198,
2,
383,
3122,
1340,
18779,
329,
262,
12509,
1340,
17,
... | 4.372727 | 110 |
import wpath
from web3 import Web3
from web3 import Web3, HTTPProvider, IPCProvider, WebsocketProvider
w3 = get_web3_by_http_rpc()
eth = w3.eth
r = eth.getBalance("0x3d32aA995FdD334c671C2d276345DE6fe2F46D88")
print(r)
| [
11748,
266,
6978,
198,
6738,
3992,
18,
1330,
5313,
18,
198,
6738,
3992,
18,
1330,
5313,
18,
11,
14626,
29495,
11,
314,
5662,
29495,
11,
47736,
5459,
29495,
628,
198,
198,
86,
18,
796,
651,
62,
12384,
18,
62,
1525,
62,
4023,
62,
81... | 2.27551 | 98 |
from sklearn import svm
from sklearn import ensemble
from sklearn import linear_model
| [
6738,
1341,
35720,
1330,
264,
14761,
198,
6738,
1341,
35720,
1330,
34549,
198,
6738,
1341,
35720,
1330,
14174,
62,
19849,
628
] | 4.142857 | 21 |
shiboken_library_soversion = str(5.15)
version = "5.15.2.1"
version_info = (5, 15, 2.1, "", "")
__build_date__ = '2022-01-07T13:13:47+00:00'
__setup_py_package_version__ = '5.15.2.1'
| [
1477,
571,
4233,
62,
32016,
62,
568,
9641,
796,
965,
7,
20,
13,
1314,
8,
198,
198,
9641,
796,
366,
20,
13,
1314,
13,
17,
13,
16,
1,
198,
9641,
62,
10951,
796,
357,
20,
11,
1315,
11,
362,
13,
16,
11,
366,
1600,
366,
4943,
198... | 1.989474 | 95 |
"""
list
sort()
reversed(list) list
"""
import random
a_list = []
for i in range(10):
a_list.append(random.randint(0, 200))
print(a_list)
a_list.sort()
print(a_list)
a_list.sort(reverse=True) #
print(a_list)
new_list = reversed(a_list) # [12,10,7,9] -> [9,7,10,12]
print(new_list)
"""
... | [
37811,
198,
220,
220,
220,
1351,
198,
220,
220,
220,
3297,
3419,
220,
198,
220,
220,
220,
17687,
7,
4868,
8,
1351,
198,
37811,
198,
11748,
4738,
198,
198,
64,
62,
4868,
796,
17635,
198,
1640,
1312,
287,
2837,
7,
940,
2599,
198,
22... | 2.075 | 400 |
#!/usr/bin/env python
# pylint: disable=no-value-for-parameter
import click
import os
import sys
import requests
import json
UNLOCK_SERVICE_DEFAULT_HOSTS = {"test": "https://testnet.threefold.io", "public": "https://tokenservices.threefold.io"}
if __name__ == "__main__":
import_unlockhash_transaction_data()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
279,
2645,
600,
25,
15560,
28,
3919,
12,
8367,
12,
1640,
12,
17143,
2357,
198,
11748,
3904,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
7007,
198,
11748,
33918,
628,
198,
4944... | 2.798246 | 114 |
from PgDiffUtils import PgDiffUtils | [
6738,
350,
70,
28813,
18274,
4487,
1330,
350,
70,
28813,
18274,
4487
] | 2.916667 | 12 |
import inspect
import logging
import os
from itertools import product
import numpy as np
import pandas as pd
from skopt import load, dump
from csrank.constants import OBJECT_RANKING
from csrank.util import files_with_same_name, create_dir_recursively, rename_file_if_exist
from experiments.util import dataset_options_... | [
11748,
10104,
198,
11748,
18931,
198,
11748,
28686,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
1341,
8738,
1330,
3440,
11,
10285,
198,
198,
6738,
269... | 2.856655 | 293 |
from .. import schema, App, QueryCache, batcher, grouper, insert_ignore, export, lookup, persist, lookup_or_persist, ABCArgumentGroup, WorkOrderArgs, filter_widgets, temptable_scope, FeatureCache
from ..ObjectStore import ABCObjectStore
from sqlalchemy import Column, Integer, String, Float, ForeignKey, UnicodeText, Uni... | [
6738,
11485,
1330,
32815,
11,
2034,
11,
43301,
30562,
11,
7365,
2044,
11,
1132,
525,
11,
7550,
62,
46430,
11,
10784,
11,
35847,
11,
21160,
11,
35847,
62,
273,
62,
19276,
396,
11,
9738,
28100,
1713,
13247,
11,
5521,
18743,
42035,
11,
... | 3.171429 | 210 |
"""
AIO -- All Trains in One
"""
from trains.baselines import *
from trains.missingTask import *
__all__ = ['ATIO']
| [
37811,
198,
32,
9399,
1377,
1439,
833,
1299,
287,
1881,
198,
37811,
198,
198,
6738,
13404,
13,
12093,
20655,
1330,
1635,
198,
6738,
13404,
13,
45688,
25714,
1330,
1635,
198,
198,
834,
439,
834,
796,
37250,
1404,
9399,
20520,
198
] | 2.95 | 40 |
import os
from .baseMethod import BaseMethod
# BoardInfo
| [
11748,
28686,
198,
198,
6738,
764,
8692,
17410,
1330,
7308,
17410,
628,
198,
2,
5926,
12360,
198
] | 3.529412 | 17 |
import os
import cv2
import random
import shutil
import numpy as np
if __name__ == "__main__":
current_base = os.path.abspath('.')
input_base = os.path.join(current_base, 'data')
split_img(input_base)
# train_all, test_all = read_data()
# print train_all | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
4738,
198,
11748,
4423,
346,
198,
11748,
299,
32152,
355,
45941,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1459,
62,
8692,
796,
28686,
13,... | 2.522936 | 109 |
import os, sys
srcFolder = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'src')
sys.path.append(srcFolder)
from metrics import nss
from metrics import auc
from metrics import cc
from utils import *
import numpy as np
import argparse
parser = argparse.ArgumentParser(description='Evaluate predicted saliency... | [
11748,
28686,
11,
25064,
198,
10677,
41092,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
36911,
705,
10677,
11537,
198,
17597,
13,
6978,
13,
33295,
7,
... | 2.392176 | 1,048 |
from pandas import Series
| [
6738,
19798,
292,
1330,
7171,
628
] | 4.5 | 6 |
# -*- coding: utf-8 -*-
# Importao da biblioteca
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [2, 3, 7, 1, 0]
titulo = "Grfico de barras"
eixoX = "EixoX"
eixoY = "EixoY"
# Legendas
plt.title(titulo)
plt.xlabel(eixoX)
plt.ylabel(eixoY)
plt.bar(x, y)
plt.show() | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
2,
17267,
5488,
12379,
275,
29142,
313,
31047,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
201,
198,
87,
796,
685,
16,
... | 1.682081 | 173 |
# Org_v01 by Orgdot (www.orgdot.com/aliasfonts). A tiny,
# stylized font with all characters within a 6 pixel height.
Org_01Bitmaps = [
0xE8, 0xA0, 0x57, 0xD5, 0xF5, 0x00, 0xFD, 0x3E, 0x5F, 0x80, 0x88, 0x88,
0x88, 0x80, 0xF4, 0xBF, 0x2E, 0x80, 0x80, 0x6A, 0x40, 0x95, 0x80, 0xAA,
0x80, 0x5D, 0x00, 0xC0, 0x... | [
2,
1471,
70,
62,
85,
486,
416,
1471,
21287,
313,
357,
2503,
13,
2398,
26518,
13,
785,
14,
26011,
10331,
82,
737,
220,
317,
7009,
11,
198,
2,
22152,
1143,
10369,
351,
477,
3435,
1626,
257,
718,
17465,
6001,
13,
198,
198,
46808,
62,... | 1.363102 | 5,274 |
# Generated by Django 3.1.8 on 2021-05-26 11:09
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
23,
319,
33448,
12,
2713,
12,
2075,
1367,
25,
2931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from django.db import models
from resources_portal.models.material import Material
from resources_portal.models.user import User
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
4133,
62,
634,
282,
13,
27530,
13,
33665,
1330,
14633,
198,
6738,
4133,
62,
634,
282,
13,
27530,
13,
7220,
1330,
11787,
628
] | 3.969697 | 33 |
""" Archived flu data
http://webarchive.nationalarchives.gov.uk/20130107105354/http://www.dh.gov.uk/en/Publicationsandstatistics/Statistics/Performancedataandstatistics/DailySituationReports/index.htm
"""
import collections
import calendar
import datetime
import re
import urllib
from lxml.html import fromstring, tostr... | [
37811,
5579,
1572,
6562,
1366,
198,
4023,
1378,
12384,
17474,
13,
14648,
48814,
13,
9567,
13,
2724,
14,
6390,
486,
2998,
13348,
32182,
14,
4023,
1378,
2503,
13,
34985,
13,
9567,
13,
2724,
14,
268,
14,
15202,
602,
392,
14269,
3969,
14,... | 3.316062 | 193 |
from rest_framework.serializers import ModelSerializer
from .models import MonthlyBudget
| [
6738,
1334,
62,
30604,
13,
46911,
11341,
1330,
9104,
32634,
7509,
198,
198,
6738,
764,
27530,
1330,
27573,
33,
29427,
628
] | 4.333333 | 21 |
from behave import *
from google.cloud import datastore
import os
import uuid
import pandas as pd
| [
6738,
17438,
1330,
1635,
198,
6738,
23645,
13,
17721,
1330,
4818,
459,
382,
198,
11748,
28686,
198,
11748,
334,
27112,
198,
11748,
19798,
292,
355,
279,
67,
628,
628,
628,
628
] | 3.387097 | 31 |
import os
gpu_flag = False
gpu_name = 'cpu'
x_dim = 2048
num_class = 87
num_query = 5
batch_size = 84
eval_batch_size = 128
glove_dim = 200
pretrain_lr = 1e-4
num_epochs_pretrain = 20
eval_step_pre = 1
fusion_iter_len = 100000
# num_epochs_pretrain = 30
num_epochs_style = 30
num_epochs_fusion = 50
log_step_pre = ... | [
11748,
28686,
198,
198,
46999,
62,
32109,
796,
10352,
198,
46999,
62,
3672,
796,
705,
36166,
6,
198,
198,
87,
62,
27740,
796,
36117,
198,
22510,
62,
4871,
796,
10083,
198,
22510,
62,
22766,
796,
642,
198,
198,
43501,
62,
7857,
796,
... | 2.36918 | 902 |
# -*- coding: utf-8 -*-
from __future__ import print_function
import caffe
from caffe import params as P
from google.protobuf import text_format
#import inputParam
import os
import sys
import math
sys.path.append('../')
from username import USERNAME
sys.dont_write_bytecode = True
# #####################################... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
21121,
198,
6738,
21121,
1330,
42287,
355,
350,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
2420,
62,
18982,
... | 2.808917 | 314 |