content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
"""
The :mod:`mlshell.producers.dataset` contains examples of `Dataset` class for
empty data object creation and `DataProducer` class for filling it.
:class:`mlshell.Dataset` proposes unified interface to interact with underlying
data. Intended to be used in :class:`mlshell.Workflow`. For new data formats
no need to e... | [
37811,
198,
464,
1058,
4666,
25,
63,
4029,
29149,
13,
1676,
41213,
13,
19608,
292,
316,
63,
4909,
6096,
286,
4600,
27354,
292,
316,
63,
1398,
329,
198,
28920,
1366,
2134,
6282,
290,
4600,
6601,
11547,
2189,
63,
1398,
329,
12591,
340,
... | 2.125887 | 11,550 |
a, b = map(int, input().split())
print((a%b)*(b%a)+1) | [
64,
11,
275,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
4798,
19510,
64,
4,
65,
27493,
7,
65,
4,
64,
47762,
16,
8
] | 2.038462 | 26 |
"""
this file contains tuned obs function and reward function
fix ttc calculate
"""
import math
import gym
import numpy as np
from smarts.core.agent import AgentSpec
from smarts.core.agent_interface import AgentInterface
from smarts.core.agent_interface import OGM, NeighborhoodVehicles
from smarts.core.controllers im... | [
37811,
198,
5661,
2393,
4909,
16524,
10201,
2163,
290,
6721,
2163,
198,
13049,
256,
23047,
15284,
198,
37811,
198,
11748,
10688,
198,
198,
11748,
11550,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
4451,
82,
13,
7295,
13,
25781,
... | 2.634571 | 2,586 |
"""Test suite for optimizers.constant."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import ast
import pytest
from pycc.asttools import parse
from pycc.optimizers import constant
source = """
ONE = 1
TWO = 2
T... | [
37811,
14402,
18389,
329,
6436,
11341,
13,
9979,
415,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
... | 2.853659 | 369 |
# -*- coding: utf-8 -*-
__author__ = 'alsbi'
from multiprocessing import Process
from websockify import WebSocketProxy
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
834,
9800,
834,
796,
705,
874,
8482,
6,
198,
198,
6738,
18540,
305,
919,
278,
1330,
10854,
198,
198,
6738,
2639,
735,
1958,
1330,
5313,
39105,
44148,
628,
198
] | 2.860465 | 43 |
from .massthings import MassThings
__red_end_user_data_statement__ = (
"This cog does not persistently store data or metadata about users."
# "<s>If you are using this cog, user data storage will probably be much less significant thing then API abuse</s>"
)
| [
6738,
764,
5356,
48476,
654,
1330,
5674,
22248,
198,
198,
834,
445,
62,
437,
62,
7220,
62,
7890,
62,
26090,
834,
796,
357,
198,
220,
220,
220,
366,
1212,
43072,
857,
407,
21160,
1473,
3650,
1366,
393,
20150,
546,
2985,
526,
198,
220... | 3.573333 | 75 |
# Copyright (c) 2010, individual contributors (see AUTHORS file)
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" ... | [
2,
15069,
357,
66,
8,
3050,
11,
1981,
20420,
357,
3826,
37195,
20673,
2393,
8,
198,
2,
198,
2,
2448,
3411,
284,
779,
11,
4866,
11,
13096,
11,
290,
14,
273,
14983,
428,
3788,
329,
597,
198,
2,
4007,
351,
393,
1231,
6838,
318,
293... | 3.54023 | 261 |
# flake8: noqa
"""
Copyright 2021 - Present Okta, 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 ... | [
2,
781,
539,
23,
25,
645,
20402,
198,
37811,
198,
15269,
33448,
532,
21662,
6762,
8326,
11,
3457,
13,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
42... | 3.619718 | 213 |
import discord
from discord.ext import commands
import json
from utils import error, RARITY_DICT
from parse_profile import get_profile_data
from extract_ids import extract_internal_names
# Create the master list!
from text_files.accessory_list import talisman_upgrades
# Get a list of all accessories
ACCESSORIES = []... | [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
33918,
198,
198,
6738,
3384,
4487,
1330,
4049,
11,
371,
1503,
9050,
62,
35,
18379,
198,
6738,
21136,
62,
13317,
1330,
651,
62,
13317,
62,
7890,
198,
6738,
7925,
62,
234... | 2.870968 | 279 |
import os
import cv2
from lib import lib
images_dir = "images"
faces_dir = "images/faces"
main()
| [
11748,
28686,
198,
11748,
269,
85,
17,
198,
6738,
9195,
1330,
9195,
198,
198,
17566,
62,
15908,
796,
366,
17566,
1,
198,
32186,
62,
15908,
796,
366,
17566,
14,
32186,
1,
628,
198,
198,
12417,
3419,
198
] | 2.72973 | 37 |
"""
Google Sheets interaction lib. Configuration settings:
[gapps]
api_scope = https://www.googleapis.com/auth/spreadsheets
spreadsheet_id =
spreadsheet_range =
"""
import configparser
import traceback
from googleapiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
#... | [
37811,
198,
11708,
1375,
1039,
10375,
9195,
13,
28373,
6460,
25,
198,
58,
70,
18211,
60,
198,
15042,
62,
29982,
796,
3740,
1378,
2503,
13,
13297,
499,
271,
13,
785,
14,
18439,
14,
43639,
42011,
198,
43639,
21760,
62,
312,
796,
198,
... | 2.774194 | 651 |
import sys
import pandas as pd
from sqlalchemy import create_engine
import re
import numpy as np
import nltk
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.tokenize import word_tokenize
from nltk import pos_tag, ne_chunk
nltk.download('punkt')
nltk.download('stopwords')
nl... | [
11748,
25064,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
11748,
302,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
299,
2528,
74,
198,
6738,
299,
2528,
74,
13,
10215,
79,
385... | 2.601657 | 1,569 |
import numpy as np
import matplotlib as mpl
import matplotlib.pylab as plt
P = np.arange(0.25,5.25,0.25)
#print(X)
fig = plt.figure(figsize=(10,10))
NumPlotRows = 5
NumPlotCols = 4
for i,p in enumerate(P):
X = norm_ball(p=p)
plt.subplot(NumPlotRows, NumPlotCols, i+1)
plt.plot(X[0,:].T, X[1,:].T,'-',cl... | [
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
355,
285,
489,
198,
11748,
2603,
29487,
8019,
13,
79,
2645,
397,
355,
458,
83,
628,
198,
198,
47,
796,
45941,
13,
283,
858,
7,
15,
13,
1495,
11,
20,
13,
1495,
11,
... | 1.966967 | 333 |
from fmcapi.api_objects.apiclasstemplate import APIClassTemplate
import logging
import warnings
| [
6738,
277,
76,
11128,
72,
13,
15042,
62,
48205,
13,
499,
291,
21921,
927,
6816,
1330,
3486,
2149,
31172,
30800,
198,
11748,
18931,
198,
11748,
14601,
628,
198
] | 3.5 | 28 |
def upgrade_database():
"""Perform an upgrade of the database.
This will prompt the user for confirmation, with instructions on what
will happen. If the database is using SQLite3, it will be backed up
automatically, making a copy that contains the current timestamp.
Otherwise, the user will be prompted... | [
4299,
8515,
62,
48806,
33529,
198,
197,
37811,
5990,
687,
281,
8515,
286,
262,
6831,
13,
198,
220,
220,
220,
770,
481,
6152,
262,
2836,
329,
12641,
11,
351,
7729,
319,
644,
198,
220,
220,
220,
481,
1645,
13,
1002,
262,
6831,
318,
... | 2.839716 | 705 |
from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates
from fastapi.responses import HTMLResponse
from pathlib import Path
TEMPLATES = (
str(Path(__file__).resolve().parent.parent.parent.parent) + r"\design\templates"
)
templates_view = APIRouter()
templates = Jinja2Temp... | [
6738,
3049,
15042,
1330,
3486,
4663,
39605,
11,
19390,
201,
198,
6738,
3049,
15042,
13,
11498,
489,
803,
1330,
17297,
6592,
17,
12966,
17041,
201,
198,
6738,
3049,
15042,
13,
16733,
274,
1330,
11532,
31077,
201,
198,
6738,
3108,
8019,
1... | 2.8 | 125 |
# 002_movies.py
| [
198,
2,
3571,
17,
62,
76,
20526,
13,
9078,
628
] | 1.8 | 10 |
from torch import nn
from tqdm import tqdm
import math
from train.utils import get_batch, repackage_hidden
| [
6738,
28034,
1330,
299,
77,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
10688,
198,
6738,
4512,
13,
26791,
1330,
651,
62,
43501,
11,
1128,
441,
496,
62,
30342,
628
] | 3.272727 | 33 |
import web
if "__main__" == __name__:
u = "https://www.ebay.de/sch/Mobel-Wohnen/11700/i.html?_from=R40&LH_BIN=1&_nkw=kaffeetisch&_dcat=38205&rt=nc&_mPrRngCbx=1&_udlo=4&_udhi=29"
r = web.fetch(u)
print r.status_code
| [
11748,
3992,
201,
198,
201,
198,
361,
366,
834,
12417,
834,
1,
6624,
11593,
3672,
834,
25,
201,
198,
197,
84,
796,
366,
5450,
1378,
2503,
13,
1765,
323,
13,
2934,
14,
20601,
14,
44702,
417,
12,
54,
1562,
268,
14,
1157,
9879,
14,
... | 1.757813 | 128 |
"""Day 24: Lobby layout
Coordinate system taken from
https://www.redblobgames.com/grids/hexagons/#coordinates
"""
from collections import defaultdict
from day23 import REAL_INPUT
from typing import Dict, List, Tuple
MOVES = {
"e": [1, -1, 0],
"w": [-1, 1, 0],
"se": [0, -1, 1],
"sw": [-1, 0, 1],
... | [
37811,
12393,
1987,
25,
35068,
12461,
198,
198,
7222,
45480,
1080,
2077,
422,
198,
5450,
1378,
2503,
13,
445,
2436,
672,
19966,
13,
785,
14,
2164,
2340,
14,
33095,
34765,
31113,
37652,
17540,
198,
37811,
198,
198,
6738,
17268,
1330,
427... | 1.947966 | 1,057 |
# -*- coding: utf-8 -*-
from .reader import SteinerTreeProblem, Reader, ReaderORLibrary
from .graph import UndirectedWeightedGraph
from .graph import UndirectedWeightedGraph as UWGraph
from .graph import UndirectedWeightedGraph as Graph
from .graph import UndirectedGraph
from .graph import UndirectedGraph as UGra... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
6738,
764,
46862,
1330,
2441,
7274,
27660,
40781,
11,
25342,
11,
25342,
1581,
23377,
201,
198,
6738,
764,
34960,
1330,
13794,
1060,
276,
25844,
276,
37065,
201,
198,
... | 2.778443 | 167 |
"""create user table
Revision ID: 37881a97d680
Revises: d8f500d9168
Create Date: 2014-02-10 15:52:50.366173
"""
# revision identifiers, used by Alembic.
revision = '37881a97d680'
down_revision = 'd8f500d9168'
from alembic import op
import sqlalchemy as sa
| [
37811,
17953,
2836,
3084,
198,
198,
18009,
1166,
4522,
25,
5214,
3459,
16,
64,
5607,
67,
37397,
198,
18009,
2696,
25,
288,
23,
69,
4059,
67,
24,
14656,
198,
16447,
7536,
25,
1946,
12,
2999,
12,
940,
1315,
25,
4309,
25,
1120,
13,
3... | 2.495238 | 105 |
# -*- coding: utf-8 -*-
import click
import logging
from pathlib import Path
#from dotenv import find_dotenv, load_dotenv
import pandas as pd
import tqdm
import numpy as np
#@click.command()
#@click.argument('input_filepath', type=click.Path(exists=True))
#@click.argument('output_filepath', type=click.Path())
def main... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
3904,
198,
11748,
18931,
198,
6738,
3108,
8019,
1330,
10644,
198,
2,
6738,
16605,
24330,
1330,
1064,
62,
26518,
24330,
11,
3440,
62,
26518,
24330,
198,
11748,
19798... | 2.347368 | 950 |
import asyncio
import time
import zmq
import zmq.asyncio
from pymunk import Vec2d
from zmq import Socket
from .constants import SERVER_TICK
from .events.events import PlayerEvent
from .events.movement import apply_movement
from .events.states import GameState, PlayerState
def update_game_state(game_state: GameSta... | [
11748,
30351,
952,
198,
11748,
640,
198,
198,
11748,
1976,
76,
80,
198,
11748,
1976,
76,
80,
13,
292,
13361,
952,
198,
6738,
279,
4948,
2954,
1330,
38692,
17,
67,
198,
6738,
1976,
76,
80,
1330,
47068,
198,
198,
6738,
764,
9979,
1187... | 2.548936 | 235 |
from django.conf.urls import include
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import path
import mds.apis.agency_api.v0_3.urls
import mds.authent.urls
urlpatterns = [
# TODO(hcauwelier) Backwards compat, to remove with MDS 0.3
path(
"mds/v0.... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5009,
355,
6284,
62,
33571,
198,
6738,
42625,
14208,
13,
6371,
82,
... | 1.949627 | 536 |
from cerberus import errors
from cerberus.tests import assert_fail, assert_success
| [
6738,
26074,
39192,
1330,
8563,
198,
6738,
26074,
39192,
13,
41989,
1330,
6818,
62,
32165,
11,
6818,
62,
13138,
628,
198
] | 4.047619 | 21 |
import logging
logger = logging.getLogger(__name__)
from .profiler import Profiler
from . import config, resnet
profiler = Profiler("classify.py")
import os
import cv2
import dlib
import numpy as np
import tensorflow as tf
from imutils.face_utils import FaceAligner
from imutils.face_utils import rect_to_bb
profiler.... | [
11748,
18931,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
6738,
764,
5577,
5329,
1330,
4415,
5329,
198,
6738,
764,
1330,
4566,
11,
581,
3262,
198,
5577,
5329,
796,
4415,
5329,
7203,
4871,
1958,
... | 3.174312 | 109 |
import unittest
| [
11748,
555,
715,
395,
628
] | 3.4 | 5 |
import tensorflow as tf
import argument_sr
from os.path import join
from PIL import Image
import os
from numpy import array
"""
fliker image data by pil
"""
"""
SET5 test
"""
def RGB_to_Tcrbr_Y(tensor):
"""
Args:
tensor:
Returns:
"""
with tf.name_scope("rgb_to_tcrbr"):
... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
4578,
62,
27891,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
198,
6738,
299,
32152,
1330,
7177,
198,
198,
37811,
198,
220,
220,
220,
781,... | 1.967093 | 547 |
import logging
LOG_LEVELS = {
logging.NOTSET: 'sample',
logging.DEBUG: 'debug',
logging.INFO: 'info',
logging.WARNING: 'warning',
logging.ERROR: 'error',
logging.FATAL: 'fatal',
}
DEFAULT_LOG_LEVEL = 'error'
LOG_LEVELS_MAP = {v: k for k, v in LOG_LEVELS.items()}
LEVEL_LABELS = {
logging.N... | [
11748,
18931,
198,
198,
25294,
62,
2538,
18697,
50,
796,
1391,
198,
220,
220,
220,
18931,
13,
11929,
28480,
25,
705,
39873,
3256,
198,
220,
220,
220,
18931,
13,
30531,
25,
705,
24442,
3256,
198,
220,
220,
220,
18931,
13,
10778,
25,
... | 2.367647 | 204 |
import os
import logging
import re
from datetime import datetime
from stat import ST_CTIME
from zipfile import ZipFile
from dipper import config
from dipper.sources.Source import Source
from dipper.models.Model import Model
from dipper.models.assoc.InteractionAssoc import InteractionAssoc
from dipper.models.Dataset i... | [
11748,
28686,
198,
11748,
18931,
198,
11748,
302,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
1185,
1330,
3563,
62,
4177,
12789,
198,
6738,
19974,
7753,
1330,
38636,
8979,
198,
198,
6738,
2566,
2848,
1330,
4566,
198,
6738,
... | 3.260563 | 142 |
from .eLABJournalPager import *
| [
6738,
764,
68,
48780,
25296,
47,
3536,
1330,
1635,
198
] | 3.2 | 10 |
from dataclasses import dataclass
from typing import Any, Sequence
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
4377,
11,
45835,
628
] | 4.25 | 16 |
# -*- coding: utf-8 -*-
import os
import unittest
from StringIO import StringIO
from mimecat import (Catalogue, _canonicalize_extension,
_parse_file, _parse_line)
TEST_MIME_TYPES = """
# This file maps Internet media types to unique file extension(s).
# Although created for httpd, this file is us... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
6738,
10903,
9399,
1330,
10903,
9399,
198,
198,
6738,
285,
524,
9246,
1330,
357,
39075,
5119,
11,
4808,
49883,
605,
1096,
6... | 2.887405 | 524 |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"summary": "00_core.ipynb",
"plot": "00_core.ipynb",
"perf": "00_core.ipynb"}
modules = ["ks.py"]
doc_url = "https://JiaxiangBU.github.io/pyks/"
git_url = "https://github.com/fastai/pyks/... | [
2,
47044,
7730,
1677,
1137,
11617,
11050,
41354,
39345,
0,
8410,
5626,
48483,
0,
198,
198,
834,
439,
834,
796,
14631,
9630,
1600,
366,
18170,
1600,
366,
23144,
62,
15390,
62,
28751,
1600,
366,
18300,
62,
6371,
8973,
198,
198,
9630,
79... | 2.205298 | 151 |
from __future__ import print_function
"""
Author: Emmanuel Salawu
Email: dr.emmanuel.salawu@gmail.com
Copyright 2016 Emmanuel Salawu
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 L... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
37811,
198,
198,
13838,
25,
220,
220,
220,
220,
32390,
4849,
707,
84,
220,
198,
15333,
25,
220,
220,
220,
220,
220,
1553,
13,
368,
18713,
13,
21680,
707,
84,
31,
14816,
13,
... | 2.19147 | 2,204 |
from tunepy2 import Genome
from tunepy2.interfaces import AbstractOptimizer, AbstractGenomeFactory, AbstractConvergenceCriterion
| [
6738,
6278,
538,
88,
17,
1330,
5215,
462,
198,
6738,
6278,
538,
88,
17,
13,
3849,
32186,
1330,
27741,
27871,
320,
7509,
11,
27741,
13746,
462,
22810,
11,
27741,
3103,
332,
12745,
18559,
28019,
628
] | 3.714286 | 35 |
from copy import deepcopy
from .classic import ClassicGRN
import numpy as np
import tensorflow as tf
| [
6738,
4866,
1330,
2769,
30073,
198,
6738,
764,
49421,
1330,
13449,
10761,
45,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
628
] | 3.777778 | 27 |
# modified for custom training and testing on GPU by Utkarsh Patel
from classifiers import AbstractTokenizedDocumentClassifier
from embeddings import WordEmbeddings
from nnclassifiers import StackedLSTMTokenizedDocumentClassifier, CNNTokenizedDocumentClassifier
from nnclassifiers_experimental import StructuredSelfAtte... | [
2,
9518,
329,
2183,
3047,
290,
4856,
319,
11362,
416,
7273,
74,
5406,
33110,
198,
198,
6738,
1398,
13350,
1330,
27741,
30642,
1143,
24941,
9487,
7483,
198,
6738,
11525,
67,
654,
1330,
9678,
31567,
6048,
654,
198,
6738,
299,
77,
4871,
... | 2.67033 | 1,001 |
import pytest
import numpy as np
from ardent.utilities import _validate_scalar_to_multi
from ardent.utilities import _validate_ndarray
from ardent.utilities import _validate_xyz_resolution
from ardent.utilities import _compute_axes
from ardent.utilities import _compute_coords
from ardent.utilities import _multiply_by... | [
11748,
12972,
9288,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
43033,
13,
315,
2410,
1330,
4808,
12102,
378,
62,
1416,
282,
283,
62,
1462,
62,
41684,
198,
6738,
43033,
13,
315,
2410,
1330,
4808,
12102,
378,
62,
358,
1874... | 2.764706 | 238 |
import requests, libvoikko, json, collections, sys
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
print("Need a url that points to a text file")
sys.exit(0)
r = requests.get(filename)
normalized = r.text.split()
v = libvoikko.Voikko("fi")
word_forms = [
(word, v.analyze(word)) for word in normal... | [
11748,
7007,
11,
9195,
13038,
1134,
7204,
11,
33918,
11,
17268,
11,
25064,
628,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
1875,
352,
25,
198,
220,
220,
220,
29472,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
17772,
25,
198,
220,
... | 2.266 | 500 |
from re import compile
IMPERSONAL_EXPRESSIONS = [
compile('^(\.*)ns[\s|\.|$]'),
compile('Nos\s| nos[\s|$]|-nos[\s|$]'),
compile('[N|(\.|\s)n]oss[a|o]'),
compile('\w*[e|a]mos[,|\.|\s|$]')
]
| [
6738,
302,
1330,
17632,
628,
198,
3955,
47,
29086,
1847,
62,
6369,
32761,
11053,
796,
685,
198,
220,
220,
220,
17632,
10786,
61,
38016,
15885,
8,
5907,
58,
59,
82,
91,
17405,
91,
3,
60,
33809,
198,
220,
220,
220,
17632,
10786,
45,
... | 1.769231 | 117 |
from .utils.compatibility import *
from .utils.der import parse, encodeConstructed, encodePrimitive, DerFieldType
from .utils.binary import hexFromByteString, byteStringFromHex, base64FromByteString, byteStringFromBase64
| [
6738,
764,
26791,
13,
5589,
25901,
1330,
1635,
198,
6738,
764,
26791,
13,
1082,
1330,
21136,
11,
37773,
25207,
11,
37773,
23828,
1800,
11,
9626,
15878,
6030,
198,
6738,
764,
26791,
13,
39491,
1330,
17910,
4863,
40778,
10100,
11,
18022,
... | 3.894737 | 57 |
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to ... | [
2235,
198,
2,
770,
3788,
373,
4166,
290,
1220,
393,
9518,
416,
7760,
1169,
261,
5834,
11,
198,
2,
12997,
284,
17453,
46133,
16945,
54,
12,
2713,
12,
34,
48,
12,
940,
3134,
351,
262,
1294,
5070,
13,
201,
198,
2,
220,
201,
198,
2,... | 2.92623 | 488 |
"""Main module."""
import asyncio
import logging
from pathlib import Path
from asynccpu import ProcessTaskPoolExecutor
from showroompodcast import CONFIG
from showroompodcast.archiving_task_manager import ArchivingTaskManager
from showroompodcast.showroom_archiver import TIME_TO_FORCE_TARMINATION, ShowroomArchiver
fr... | [
37811,
13383,
8265,
526,
15931,
198,
11748,
30351,
952,
198,
11748,
18931,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
355,
2047,
535,
19944,
1330,
10854,
25714,
27201,
23002,
38409,
198,
198,
6738,
905,
305,
3361,
7107,
1330,
256... | 3.601626 | 123 |
# coding=utf-8
import requests
from PyQt5.QtCore import QThread, pyqtSignal
from urllib import request, parse
from utils import LogTools
sysLog = LogTools.SysLogs()
#
Http.requestInterceptor = []
#
Http.responseInterceptor = []
if __name__ == '__main__':
data = http_get('https://www.baidu.com')
print(... | [
2,
19617,
28,
40477,
12,
23,
198,
198,
11748,
7007,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1195,
16818,
11,
12972,
39568,
11712,
282,
198,
6738,
2956,
297,
571,
1330,
2581,
11,
21136,
198,
6738,
3384,
4487,
1330,
5972... | 2.672131 | 122 |
import re
import typing
import xml.etree.ElementTree as ET
from unicodedata import name
from typing import *
from jinja2 import Template
keylayout_file = 'keylayout_file'
keylayout_xml = keylayout_file + '.xml'
keylayout_html = keylayout_file + '.html'
TOFU = '\ufffd'
def mapindex_by_modifier(map_to_modifier: Dict[i... | [
11748,
302,
198,
11748,
19720,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
6738,
28000,
9043,
1045,
1330,
1438,
198,
6738,
19720,
1330,
1635,
198,
6738,
474,
259,
6592,
17,
1330,
37350,
198,
198,
2539,
39786,
62,... | 2.520249 | 963 |
"""All Modules"""
from .nft import NftModule as NftModuleV2
from .nft_v1 import *
from .nft_types import *
from .currency import *
from .market import *
from .pack import *
from .collection import CollectionModule
from .bundle import *
| [
37811,
3237,
3401,
5028,
37811,
198,
6738,
764,
77,
701,
1330,
399,
701,
26796,
355,
399,
701,
26796,
53,
17,
198,
6738,
764,
77,
701,
62,
85,
16,
1330,
1635,
198,
6738,
764,
77,
701,
62,
19199,
1330,
1635,
198,
6738,
764,
34415,
... | 3.277778 | 72 |
"""Tests of parsing GLNs."""
import pytest
from biip import ParseError
from biip.gln import Gln
from biip.gs1 import GS1Prefix
| [
37811,
51,
3558,
286,
32096,
10188,
47503,
526,
15931,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
3182,
541,
1330,
2547,
325,
12331,
198,
6738,
3182,
541,
13,
4743,
77,
1330,
2671,
77,
198,
6738,
3182,
541,
13,
14542,
16,
1330,
266... | 2.755102 | 49 |
from django.shortcuts import render
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.views.decorators.csrf import csrf_exempt
import json
from django.core import serializers
# Create your views here.
from django.http import HttpResponse
from django.http.response import JsonResponse
... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
33523,
9876,
11,
7873,
3673,
2025,
46541,
11,
31525,
20900,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
635... | 3.546392 | 97 |
import torch
from torch.utils.data import Dataset
| [
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
628
] | 3.642857 | 14 |
from selenipupser import element
query = element('[name=q]')
| [
6738,
384,
11925,
541,
4739,
263,
1330,
5002,
198,
198,
22766,
796,
5002,
10786,
58,
3672,
28,
80,
60,
11537,
198
] | 2.952381 | 21 |
"""!
@brief Integration-test runner for tests of oscillatory and neural networks.
@authors Andrei Novikov (pyclustering@yandex.ru)
@date 2014-2020
@copyright BSD-3-Clause
"""
import unittest
from pyclustering.tests.suite_holder import suite_holder
# Generate images without having a window appear.
i... | [
37811,
0,
201,
198,
201,
198,
31,
65,
3796,
38410,
12,
9288,
17490,
329,
5254,
286,
24969,
2870,
290,
17019,
7686,
13,
201,
198,
201,
198,
31,
41617,
10948,
72,
5267,
1134,
709,
357,
9078,
565,
436,
1586,
31,
88,
392,
1069,
13,
62... | 2.837143 | 350 |
from records_mover.utils import beta, BetaWarning
import unittest
from unittest.mock import patch
| [
6738,
4406,
62,
76,
2502,
13,
26791,
1330,
12159,
11,
17993,
20361,
198,
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
628
] | 3.535714 | 28 |
import graphene
from graphql import GraphQLError
from graphql_relay import from_global_id
from django.contrib.auth import get_user_model
from creator.organizations.models import Organization
from creator.organizations.queries import OrganizationNode
from creator.events.models import Event
User = get_user_model()
... | [
11748,
42463,
198,
6738,
4823,
13976,
1330,
29681,
48,
2538,
81,
1472,
198,
6738,
4823,
13976,
62,
2411,
323,
1330,
422,
62,
20541,
62,
312,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
... | 3.724138 | 87 |
"""
Mag Square
#always do Detective work nm what
UNDERSTAND
-nxn matrix of distinctive pos INT from 1 to n^2
-Sum of any row, column, or diagonal of length n is always equal to the same
number: "Mag" constant
-Given: 3x3 matrix s of integers in the inclusive range [1,9]
we can convert any digit a to any othe... | [
37811,
220,
628,
220,
198,
220,
2944,
9276,
220,
198,
220,
1303,
33770,
466,
20220,
670,
28642,
644,
198,
4944,
14418,
2257,
6981,
198,
12,
77,
87,
77,
17593,
286,
18778,
1426,
17828,
422,
352,
284,
299,
61,
17,
220,
198,
12,
13065,... | 1.94384 | 1,745 |
import re
def rm_duplicates(seq):
"""Remove duplicate strings during renaming
"""
seen = set()
seen_add = seen.add
return [x for x in seq if not (x in seen or seen_add(x))]
def rename_genome(genome, assembly_summary):
"""Rename FASTAs based on info in the assembly summary
"""
genom... | [
11748,
302,
628,
198,
198,
4299,
42721,
62,
646,
489,
16856,
7,
41068,
2599,
198,
220,
220,
220,
37227,
27914,
23418,
13042,
1141,
8851,
3723,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1775,
796,
900,
3419,
198,
220,
220,
220,
... | 2.520661 | 363 |
"""Sample Fetch script from DuneAnalytics"""
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime
from src.duneapi.api import DuneAPI
from src.duneapi.types import Network, QueryParameter, DuneQuery
from src.duneapi.util import open_query
def fetch_records(dune: DuneAP... | [
37811,
36674,
376,
7569,
4226,
422,
360,
1726,
37702,
14094,
37811,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
12351,
13,
... | 2.708333 | 384 |
from typing import Optional
from bottle import request, route, run
import uvicorn
from arnold import config
from arnold.output.speaker import Speaker
API_CONFIG = config.API
# Module class instances, rather than init everytime
speaker = Speaker()
# TODO (qoda): Make this super generic
def runserver(host: Opt... | [
6738,
19720,
1330,
32233,
198,
198,
6738,
9294,
1330,
2581,
11,
6339,
11,
1057,
198,
11748,
334,
25531,
1211,
198,
198,
6738,
610,
77,
727,
1330,
4566,
198,
6738,
610,
77,
727,
13,
22915,
13,
4125,
3110,
1330,
14931,
628,
198,
17614,
... | 3.16 | 150 |
#!/usr/bin/env python
"""
Process a sample tweet fetched using streaming API.
Usage:
$ ipython -i FILENAME
>>> data = main()
>>> data.keys() # Then explore the `data` object in ipython.
['contributors', 'truncated', 'text', 'is_quote_status',
'in_reply_to_status_id', 'id', 'favorite_count', 'source... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
18709,
257,
6291,
6126,
11351,
1740,
1262,
11305,
7824,
13,
198,
198,
28350,
25,
198,
220,
220,
220,
720,
20966,
7535,
532,
72,
34020,
1677,
10067,
198,
220,
220,
220,
1316... | 2.216596 | 711 |
i = 0
vsota = 0
while i < 1000:
if i % 3 == 0:
vsota += i
elif i % 5 == 0:
vsota += i
i += 1
print(vsota)
| [
72,
796,
657,
198,
14259,
4265,
796,
657,
198,
4514,
1312,
1279,
8576,
25,
198,
220,
220,
220,
611,
1312,
4064,
513,
6624,
657,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3691,
4265,
15853,
1312,
198,
220,
220,
220,
1288,
361,
13... | 1.8 | 80 |
"""Regex pattern constants"""
import re
URL_PATTERN = re.compile(r'(http[s]?://(?:[a-zA-Z]|[0-9]|[$-;?-_=@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)')
NUMBER_PATTERN = re.compile(r'(\.\d+|\d[,\d]*(?:\.\d+)?)')
UNIT_PATTERN_TUPLE = [
# [length]
('inch', re.compile(r' *("|inch|inches|ins?)(?!\w)')),
('f... | [
37811,
3041,
25636,
3912,
38491,
37811,
198,
11748,
302,
198,
198,
21886,
62,
47,
1404,
31800,
796,
302,
13,
5589,
576,
7,
81,
6,
7,
4023,
58,
82,
60,
30,
1378,
7,
27514,
58,
64,
12,
89,
32,
12,
57,
60,
91,
58,
15,
12,
24,
6... | 1.729779 | 1,088 |
from apis.resources.users import user
| [
6738,
2471,
271,
13,
37540,
13,
18417,
1330,
2836,
198
] | 3.8 | 10 |
import os
import textwrap
from pprint import pprint
#import cloudmesh.pi.cluster
from cloudmesh.pi.cluster.Installer import Installer
from cloudmesh.pi.cluster.Installer import Script
from cloudmesh.common.Host import Host
from cloudmesh.common.Printer import Printer
from cloudmesh.common.console import Console
from c... | [
11748,
28686,
198,
11748,
2420,
37150,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
2,
11748,
6279,
76,
5069,
13,
14415,
13,
565,
5819,
198,
6738,
6279,
76,
5069,
13,
14415,
13,
565,
5819,
13,
15798,
263,
1330,
15545,
263,
198,
... | 3.266234 | 154 |
#!/usr/bin/py
# -*- coding: utf-8 -*-
"""
@author: Cem Rfk Aydn
Constant parameters to be leveraged across the program.
"""
import os
COMMAND = "cross_validate"
# Dimension size of embeddings
EMBEDDING_SIZE = 100
#Language can be either "turkish" or "english"
LANG = "turkish"
DATASET_PATH = os.path.join("input",... | [
2,
48443,
14629,
14,
8800,
14,
9078,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
9800,
25,
327,
368,
371,
69,
74,
317,
5173,
77,
198,
198,
3103,
18797,
10007,
284,
307,
17124,
1886,
1973,
... | 2.890351 | 456 |
from mathy_core import ExpressionParser
expression = ExpressionParser().parse("4 + 2")
assert expression.evaluate() == 6
| [
6738,
285,
10036,
62,
7295,
1330,
41986,
46677,
198,
198,
38011,
796,
41986,
46677,
22446,
29572,
7203,
19,
1343,
362,
4943,
198,
30493,
5408,
13,
49786,
3419,
6624,
718,
198
] | 4.066667 | 30 |
# Setup file for package overlapping_namespace
from setuptools import setup
setup(name="overlapping_namespace",
version="0.1.0",
install_requires=["wheel", "quark==0.0.1", "org_example_foo==0.1.0"],
setup_requires=["wheel"],
py_modules=[],
packages=['org', 'org.example', 'org.example.bar... | [
2,
31122,
2393,
329,
5301,
32997,
62,
14933,
10223,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
2625,
2502,
75,
5912,
62,
14933,
10223,
1600,
198,
220,
220,
220,
220,
220,
2196,
2625,
15,
13,
16,
13,
15,... | 2.532374 | 139 |
"""
This file contains function to separate out video and audio using ffmpeg.
It consists of two functions to split and merge video and audio
using ffmpeg.
"""
import os
from torpido.config.constants import (CACHE_DIR, CACHE_NAME,
IN_AUDIO_FILE, OUT_AUDIO_FILE,
... | [
37811,
198,
1212,
2393,
4909,
2163,
284,
4553,
503,
2008,
290,
6597,
1262,
31246,
43913,
13,
198,
1026,
10874,
286,
734,
5499,
284,
6626,
290,
20121,
2008,
290,
6597,
198,
3500,
31246,
43913,
13,
198,
37811,
198,
11748,
28686,
198,
198,... | 2.588496 | 226 |
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.callback import CallbackBase
from ansible.utils.color import stringc
| [
2,
6889,
19617,
517,
21015,
18,
12,
680,
198,
6738,
11593,
37443,
834,
1330,
357,
48546,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
8,
198,
834,
4164,
330,
31172,
834,
796,
2099,
198,
198,
6738,
9093,
856,
13,
37390,
13,
47423,
1330,
... | 3.62069 | 58 |
import planetClass
createSomePlanets()
| [
11748,
5440,
9487,
198,
198,
17953,
4366,
20854,
1039,
3419,
198
] | 3.636364 | 11 |
import json
f = open('Thesis_v3/scripts/fastapi/web/static/data/escuelas.json')
data = json.load(f)
| [
11748,
33918,
198,
198,
69,
796,
1280,
10786,
464,
13429,
62,
85,
18,
14,
46521,
14,
7217,
15042,
14,
12384,
14,
12708,
14,
7890,
14,
3798,
2731,
292,
13,
17752,
11537,
198,
7890,
796,
33918,
13,
2220,
7,
69,
8,
198
] | 2.463415 | 41 |
import numpy as np
from systemrl.agents.q_learning import QLearning
import matplotlib.pyplot as plt
from helper import decaying_epsilon, evaluate_interventions
from tqdm import tqdm
#This is not converging
| [
11748,
299,
32152,
355,
45941,
198,
6738,
1080,
45895,
13,
49638,
13,
80,
62,
40684,
1330,
1195,
41730,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
31904,
1330,
49240,
62,
538,
18217,
261,
11,
13446,
62,
3... | 2.973333 | 75 |
"""All algorithms used by geoio-server"""
import math
import functools
import geojson
def angle(point_1, point_2):
"""calculates the angle between two points in radians"""
return math.atan2(point_2[1] - point_1[1], point_2[0] - point_1[0])
def convex_hull(collection):
"""Calculates the convex hull of an ... | [
37811,
3237,
16113,
973,
416,
40087,
952,
12,
15388,
37811,
198,
11748,
10688,
198,
11748,
1257,
310,
10141,
198,
198,
11748,
4903,
13210,
1559,
198,
198,
4299,
9848,
7,
4122,
62,
16,
11,
966,
62,
17,
2599,
198,
220,
220,
220,
37227,
... | 2.498195 | 831 |
import numpy as np
def modified_bisection(f, a, b, eps=5e-6):
"""
Function that finds a root using modified Bisection method for a given function f(x).
On each iteration instead of the middle of the interval, a random number is chosen as the next guess for the
root.
The function fi... | [
11748,
299,
32152,
355,
45941,
628,
198,
4299,
9518,
62,
41907,
3213,
7,
69,
11,
257,
11,
275,
11,
304,
862,
28,
20,
68,
12,
21,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
15553,
326,
7228,
257,
680... | 2.465415 | 1,012 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
from collections import OrderedDict
from django.core.urlresolvers import reverse
from django.db import models
from django.db.transaction import atomic
from django.template.defaultfilters import slugify
from django.utils.crypto import get_rand... | [
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,
11748,
33918,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
42625,
14208,
13,
7295,
... | 3.54902 | 204 |
#!/usr/bin/python
import sys
import os
import string
#print sys.argv
frontend = "../cparser/parser.exe"
flags = "-fprint-results"
pta_cmd = "%s %s" % (frontend, flags)
prefix = ""
prefix_size = int(sys.argv[1])
for x in sys.argv[2:(2+prefix_size)]:
prefix = " %s %s" % (prefix, x)
filelist = ""
for x in sys.ar... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
4731,
198,
198,
2,
4798,
25064,
13,
853,
85,
628,
198,
8534,
437,
796,
366,
40720,
13155,
28198,
14,
48610,
13,
13499,
1,
198,
33152,
796,
27444,
... | 2.601713 | 467 |
"""Create views using Pumpwood pattern."""
import os
import pandas as pd
import simplejson as json
from io import BytesIO
from django.conf import settings
from django.http import HttpResponse
from rest_framework.parsers import JSONParser
from rest_framework import viewsets, status
from rest_framework.response import Re... | [
37811,
16447,
5009,
1262,
23220,
3822,
3912,
526,
15931,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2829,
17752,
355,
33918,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
6738,
42625,
14208,
13,
10414,
1330,
646... | 3.617391 | 230 |
from .base import Base
| [
6738,
764,
8692,
1330,
7308,
628
] | 4 | 6 |
import shutil
import unittest
import tempfile
import pandas as pd
from kgtk.cli_entry import cli_entry
from kgtk.exceptions import KGTKException
| [
11748,
4423,
346,
198,
11748,
555,
715,
395,
198,
11748,
20218,
7753,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
479,
13655,
74,
13,
44506,
62,
13000,
1330,
537,
72,
62,
13000,
198,
6738,
479,
13655,
74,
13,
1069,
11755,
1330,
... | 3.106383 | 47 |
from .scrape import Scrape
from .helper import Helper | [
6738,
764,
1416,
13484,
1330,
1446,
13484,
198,
6738,
764,
2978,
525,
1330,
5053,
525
] | 3.533333 | 15 |
# Written by Will Cromar
# Python 3.6
from collections import deque
# DX/DY array. In order of precedence, we'll move
# left, right, up, and down
DX = [-1, 1, 0, 0]
DY = [0, 0, -1, 1]
# Constants for types of spaces
EMPTY = '.'
LADDER = '#'
CHUTE = '*'
START = 'S'
EXIT = 'E'
# Primary business fu... | [
2,
22503,
416,
2561,
39131,
283,
201,
198,
2,
11361,
513,
13,
21,
201,
198,
201,
198,
6738,
17268,
1330,
390,
4188,
201,
198,
201,
198,
2,
19393,
14,
35,
56,
7177,
13,
554,
1502,
286,
38177,
11,
356,
1183,
1445,
201,
198,
2,
136... | 2.349315 | 438 |
import fitsio
import fsfits
from argparse import ArgumentParser
import json
import numpy
ap = ArgumentParser()
ap.add_argument('--check', action='store_true', default=False,
help="Test if output contains identical information to input")
ap.add_argument('input')
ap.add_argument('output')
ns = ap.parse_args(... | [
11748,
11414,
952,
198,
11748,
43458,
21013,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
11748,
33918,
198,
11748,
299,
32152,
198,
499,
796,
45751,
46677,
3419,
198,
198,
499,
13,
2860,
62,
49140,
10786,
438,
9122,
3256,
2223,
11639... | 3.235294 | 102 |
from tkinter import Entry, Listbox, StringVar
import sys, tkinter, subprocess
from window_switcher.aux import get_windows
| [
6738,
256,
74,
3849,
1330,
21617,
11,
7343,
3524,
11,
10903,
19852,
198,
11748,
25064,
11,
256,
74,
3849,
11,
850,
14681,
198,
6738,
4324,
62,
2032,
23640,
13,
14644,
1330,
651,
62,
28457,
198
] | 3.485714 | 35 |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: imu_samples.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
from google.protobuf import reflection as _r... | [
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
545,
84,
62,
82,
12629,
13,
1676,
1462,
198,
198,
11748,
25064,
198,
62,
65,
28,
17597,
13,
9641,
62,
10951,
58,
15,
60,
27,
18,
290,
... | 2.241423 | 2,361 |
"""This module contains the general information for BiosVfSgxLePubKeyHash ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
| [
37811,
1212,
8265,
4909,
262,
2276,
1321,
329,
347,
4267,
53,
69,
50,
70,
87,
3123,
14876,
9218,
26257,
1869,
1886,
10267,
526,
15931,
198,
198,
6738,
2644,
320,
66,
5908,
1330,
1869,
1886,
10267,
198,
6738,
2644,
320,
535,
382,
28961... | 3.6 | 60 |
from configparser import ConfigParser
import boto3
| [
6738,
4566,
48610,
1330,
17056,
46677,
198,
198,
11748,
275,
2069,
18,
628
] | 4.076923 | 13 |
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), 'rb') as readme:
README = readme.read()
setup(
name='getsize',
version='0.1',
packages=find_packages... | [
11748,
28686,
201,
198,
11748,
25064,
201,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
201,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
9288,
1330,
1332,
355,
6208,
21575,
201,
198,
201,
198,
201,
198,
4480,
1280,
... | 2.536585 | 492 |
# -*- coding: utf-8 -*-
from PyQt5 import QtCore, QtGui, QtWidgets
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
9485,
48,
83,
20,
1330,
33734,
14055,
11,
33734,
8205,
72,
11,
33734,
54,
312,
11407,
628
] | 2.090909 | 33 |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='attention-memory-task',
version='0.1.0',
description='Attention and Memory Experiment',
long_description='This reposi... | [
198,
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,
4480,
1280,
10786,
15675,
11682,
13,
9132,
11537,
355,
277,
25,
198,
220,
220,
220,
1100,
... | 3.081081 | 222 |
from numpy import *
import matplotlib.pyplot as plt
import time
from LogReg import trainLogRegres, showLogRegres, predicTestData
# from sklearn.datasets import make_circles
# from sklearn.model_selection import train_test_split
# from sklearn.metrics import accuracy_score
import csv
#
#
## step 1: load data
pri... | [
6738,
299,
32152,
1330,
1635,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
640,
198,
6738,
5972,
8081,
1330,
4512,
11187,
8081,
411,
11,
905,
11187,
8081,
411,
11,
41219,
14402,
6601,
198,
2,
422,
1341,
35... | 2.447476 | 733 |
import pyautogui as pg
# 2100100
pg.FAILSAFE = False #
pg.moveTo(x=100, y=100, duration=2)
pg.click() #,
#pg.click(x=None, y=None, clicks=1, interval=0.0, button='left', duration=0.0, tween=pg.linear)
'''
Exception has occurred: FailSafeException
PyAutoGUI fail-safe triggered from mouse moving to a... | [
11748,
12972,
2306,
519,
9019,
355,
23241,
201,
198,
201,
198,
2,
38123,
3064,
201,
198,
6024,
13,
7708,
4146,
4090,
15112,
796,
10352,
220,
220,
220,
1303,
201,
198,
6024,
13,
21084,
2514,
7,
87,
28,
3064,
11,
331,
28,
3064,
11,
... | 2.221996 | 491 |
import os
import naming as n
reload(n)
import maya.cmds as mc
import System.utils as utils
reload(utils)
CLASS_NAME = 'ModuleA'
TITLE = 'Module A'
DESCRIPTION = 'Test desc for module A'
ICON = os.environ['RIGGING_TOOL_ROOT'] + '/Icons/_hand.xpm'
#cNamer = n.Name(type='blueprint', mod=CLASS_NAME)
| [
11748,
28686,
201,
198,
11748,
19264,
355,
299,
201,
198,
260,
2220,
7,
77,
8,
201,
198,
11748,
743,
64,
13,
28758,
82,
355,
36650,
201,
198,
11748,
4482,
13,
26791,
355,
3384,
4487,
201,
198,
260,
2220,
7,
26791,
8,
201,
198,
201... | 2.371212 | 132 |
from unittest import TestCase
from mock import Mock
from ingest.exporter.metadata import MetadataResource, MetadataService, MetadataParseException, MetadataProvenance
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
15290,
1330,
44123,
198,
198,
6738,
26151,
13,
1069,
26634,
13,
38993,
1330,
3395,
14706,
26198,
11,
3395,
14706,
16177,
11,
3395,
14706,
10044,
325,
16922,
11,
3395,
14706,
2964,
... | 3.886364 | 44 |
import torch as th
import torch.nn as nn
import torch.nn.functional as F
import torchvision as tv
import matplotlib.pyplot as plt
import cv2
from torch.utils.tensorboard import SummaryWriter
import time
from collections import deque
import random
import copy
from utils import xsobel, ysobel | [
11748,
28034,
355,
294,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
28034,
10178,
355,
31557,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
269,
... | 3.54878 | 82 |
"""
Prototype Delivery Workflow.
"""
import os
import sys
import glob
import logging
import ska_sdp_config
import dask
import distributed
from google.oauth2 import service_account
from google.cloud import storage
# Initialise logging
logging.basicConfig()
LOG = logging.getLogger("delivery")
LOG.setLevel(logging.INF... | [
37811,
198,
19703,
8690,
28682,
5521,
11125,
13,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
15095,
198,
11748,
18931,
198,
198,
11748,
1341,
64,
62,
21282,
79,
62,
11250,
198,
11748,
288,
2093,
198,
11748,
9387,
... | 2.524547 | 2,261 |
from RLUtilities.LinearAlgebra import vec3
from RLUtilities.Maneuvers import Drive
| [
6738,
45715,
18274,
2410,
13,
14993,
451,
2348,
29230,
1330,
43030,
18,
198,
6738,
45715,
18274,
2410,
13,
44,
1531,
84,
690,
1330,
9974,
628,
198
] | 3.269231 | 26 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
# Meta-info
Author: Nelson Brochado
Created: 01/07/2015
Updated: 06/04/2018
# Description
Contains the abstract class BinaryHeap.
# References
- Slides by prof. A. Carzaniga
- Chapter 13 of Introduction to Algorithms (3rd ed.)
- http://www.math.clemson.edu/~war... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
2,
30277,
12,
10951,
198,
198,
13838,
25,
12996,
2806,
354,
4533,
198,
198,
41972,
25,
5534,
14,... | 2.40995 | 1,588 |
from .views import API
from django.urls import path
urlpatterns = [
path('', API.as_view()),
]
| [
6738,
764,
33571,
1330,
7824,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
7824,
13,
292,
62,
1177,
3419,
828,
198,
220,
220,
220,
220,
198,
60,
198
] | 2.465116 | 43 |
# -*- coding: utf-8 -*-
from trytond.pool import PoolMeta
from trytond.model import fields
from trytond.pyson import Eval, Bool, Not
__all__ = ['Product']
__metaclass__ = PoolMeta
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
1949,
83,
623,
13,
7742,
1330,
19850,
48526,
198,
6738,
1949,
83,
623,
13,
19849,
1330,
7032,
198,
6738,
1949,
83,
623,
13,
79,
19699,
1330,
26439,
11,
347,
970,... | 2.731343 | 67 |
from ParadoxTrading.Chart import Wizard
from ParadoxTrading.Fetch.ChineseFutures import FetchDominantIndex
from ParadoxTrading.Indicator import RSI
fetcher = FetchDominantIndex()
market = fetcher.fetchDayData('20100701', '20170101', 'rb')
rsi = RSI(14).addMany(market).getAllData()
wizard = Wizard()
price_view = wiz... | [
6738,
37983,
2898,
4980,
13,
45488,
1330,
16884,
198,
6738,
37983,
2898,
4980,
13,
37,
7569,
13,
23604,
37,
315,
942,
1330,
376,
7569,
43417,
415,
15732,
198,
6738,
37983,
2898,
4980,
13,
5497,
26407,
1330,
371,
11584,
198,
198,
34045,
... | 2.857923 | 183 |