content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from django.shortcuts import render
from django.core.paginator import Paginator
from django.contrib.auth.models import User
from django.views import View
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
31525,
20900,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
33571,
... | 3.604651 | 43 |
"""Tirar espaços que tão sobrando no fim e no início da string"""
cor = " vermelho e azul "
print(cor.strip()) | [
37811,
51,
343,
283,
1658,
8957,
16175,
418,
8358,
256,
28749,
523,
17938,
78,
645,
277,
320,
304,
645,
287,
8836,
66,
952,
12379,
4731,
37811,
198,
198,
10215,
796,
366,
220,
3326,
17694,
8873,
304,
35560,
377,
220,
220,
220,
220,
... | 2.269231 | 52 |
"""
Objects intended to extract and store information about various components.
By changing an import, predefined bundles of variables can be used with the same organization;
see predefined.py in this folder. Helpful for testing without api data.
Organization: specific properties of the spring or
"""
import n... | [
37811,
201,
198,
10267,
82,
5292,
284,
7925,
290,
3650,
1321,
546,
2972,
6805,
13,
201,
198,
201,
198,
3886,
5609,
281,
1330,
11,
2747,
18156,
36344,
286,
9633,
460,
307,
973,
351,
262,
976,
4009,
26,
201,
198,
3826,
2747,
18156,
13... | 2.808333 | 600 |
import urllib.request, urllib.error, urllib.parse
import os
| [
11748,
2956,
297,
571,
13,
25927,
11,
2956,
297,
571,
13,
18224,
11,
2956,
297,
571,
13,
29572,
198,
11748,
28686,
628,
198
] | 2.695652 | 23 |
# Starting with a skeleton process which gets imported with the following line
from PhysicsTools.PatAlgos.patTemplate_cfg import *
from PhysicsTools.PatAlgos.tools.coreTools import *
from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.CaloJetParameters_cfi import *
from RecoJets.JetProdu... | [
2,
17962,
351,
257,
18328,
1429,
543,
3011,
17392,
351,
262,
1708,
1627,
198,
6738,
23123,
33637,
13,
12130,
2348,
70,
418,
13,
8071,
30800,
62,
37581,
1330,
1635,
198,
198,
6738,
23123,
33637,
13,
12130,
2348,
70,
418,
13,
31391,
13,... | 2.066377 | 1,612 |
"""
This module contains all tests
"""
| [
37811,
198,
1212,
8265,
4909,
477,
5254,
198,
37811,
198
] | 3.9 | 10 |
### NOW OBSOLETE: MOVED INTO VARIABLE_STEP.PY
import math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from numpy import random
from random import random
plt.style.use('seaborn-whitegrid')
class BrownianAnimation():
'''
Animating the 1D, 2D and 3D Brownian motio... | [
21017,
20229,
440,
4462,
46,
2538,
9328,
25,
28184,
1961,
39319,
569,
1503,
3539,
19146,
62,
42135,
13,
47,
56,
198,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
... | 2.071901 | 3,783 |
from typing import Final as _Final
__version__: _Final[str] = "0.0.1"
__author__: _Final[str] = "AnimateShadows"
__url__: _Final[str] = "https://github.com/AnimateShadows/dapi"
| [
6738,
19720,
1330,
8125,
355,
4808,
19006,
198,
198,
834,
9641,
834,
25,
4808,
19006,
58,
2536,
60,
796,
366,
15,
13,
15,
13,
16,
1,
198,
834,
9800,
834,
25,
4808,
19006,
58,
2536,
60,
796,
366,
2025,
1920,
2484,
9797,
1,
198,
8... | 2.542857 | 70 |
"""
1047. Remove All Adjacent Duplicates In String
Easy
2997
You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.
We repeatedly make duplicate removals on s until we no longer can.
Return the final string after ... | [
37811,
198,
198,
940,
2857,
13,
17220,
1439,
1215,
73,
12643,
49821,
16856,
554,
10903,
198,
28406,
198,
198,
1959,
5607,
198,
198,
1639,
389,
1813,
257,
4731,
264,
17747,
286,
2793,
7442,
3594,
7475,
13,
317,
23418,
9934,
10874,
286,
... | 2.897921 | 529 |
# -*- coding: utf-8 -*-
"""BaselinesTesting.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1JSwCulz7OydRTORHg24A1D-BCmvJfFUQ
"""
!apt install swig cmake libopenmpi-dev zlib1g-dev
!pip install stable-baselines
import sys
import os
import numpy a... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
15522,
20655,
44154,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
318,
5140,
379,
198,
220,
220,
220,
3740,
... | 2.88562 | 2,719 |
import unittest
from pyproxypattern import Proxy
from aiounittest import async_test
| [
11748,
555,
715,
395,
198,
6738,
12972,
1676,
87,
4464,
265,
759,
1330,
38027,
198,
6738,
257,
72,
977,
715,
395,
1330,
30351,
62,
9288,
628,
628
] | 3.222222 | 27 |
import RPi.GPIO as GPIO2
import time | [
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
17,
198,
11748,
640
] | 3 | 12 |
from .load_ur5_parallel import load_ur5_parallel
| [
6738,
764,
2220,
62,
333,
20,
62,
1845,
29363,
1330,
3440,
62,
333,
20,
62,
1845,
29363,
198
] | 2.722222 | 18 |
from contextlib import contextmanager
| [
6738,
4732,
8019,
1330,
4732,
37153,
628
] | 5.571429 | 7 |
# coding: utf-8
"""Test parsing of COUNTER BR2 book report."""
from __future__ import absolute_import
import os
import unittest
import warnings
import pycounter.report
class ParseExample(unittest.TestCase):
"""Tests for parsing C3 BR2"""
class ParseCounter4Example(unittest.TestCase):
"""Tests for parsing... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
37811,
14402,
32096,
286,
31404,
5781,
11177,
17,
1492,
989,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
146... | 3 | 141 |
import math
from python.src.neurons.activation_functions.activation_function import ActivationFunction
| [
171,
119,
123,
11748,
10688,
198,
6738,
21015,
13,
10677,
13,
710,
333,
684,
13,
48545,
62,
12543,
2733,
13,
48545,
62,
8818,
1330,
13144,
341,
22203,
628,
198
] | 3.655172 | 29 |
from django.http import JsonResponse, StreamingHttpResponse
from worker.bases import get_config, rand_sig, get_user_folder_size
from django.core.paginator import EmptyPage, PageNotAnInteger
import os
def get_maintenance_protocols():
"""
Get maintenance protocols
:return: list, module names
"""
... | [
6738,
42625,
14208,
13,
4023,
1330,
449,
1559,
31077,
11,
43124,
43481,
31077,
198,
6738,
8383,
13,
65,
1386,
1330,
651,
62,
11250,
11,
43720,
62,
82,
328,
11,
651,
62,
7220,
62,
43551,
62,
7857,
198,
6738,
42625,
14208,
13,
7295,
1... | 2.730769 | 260 |
import pandas as pd
import csv
import nltk
from nltk.corpus import stopwords
if __name__ == '__main__':
main()
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
269,
21370,
198,
11748,
299,
2528,
74,
198,
6738,
299,
2528,
74,
13,
10215,
79,
385,
1330,
2245,
10879,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
... | 2.543478 | 46 |
from functools import wraps
from flask import g, request, redirect, url_for, session, render_template
import sqlite3 as lite
import sys
def login_required(f):
"""
Decorate routes to require login.
http://flask.pocoo.org/docs/0.12/patterns/viewdecorators/
"""
@wraps(f)
return decorated_functio... | [
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
42903,
1330,
308,
11,
2581,
11,
18941,
11,
19016,
62,
1640,
11,
6246,
11,
8543,
62,
28243,
198,
11748,
44161,
578,
18,
355,
300,
578,
198,
11748,
25064,
628,
198,
4299,
17594,
62,
35827,... | 2.833333 | 114 |
import numpy as np
import os
import cv2 as cv
from constants import constants
if __name__ == "__main__":
main()
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
269,
85,
17,
355,
269,
85,
198,
6738,
38491,
1330,
38491,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.926829 | 41 |
from eth.beacon.types.blocks import BaseBeaconBlock
from eth.beacon.types.pending_attestation_records import PendingAttestationRecord
from eth.beacon.types.states import BeaconState
from eth.beacon.state_machines.configs import BeaconConfig
from .validation import (
validate_serenity_attestation,
)
def process_a... | [
6738,
4555,
13,
1350,
7807,
13,
19199,
13,
27372,
1330,
7308,
3856,
7807,
12235,
198,
6738,
4555,
13,
1350,
7807,
13,
19199,
13,
79,
1571,
62,
1078,
27364,
62,
8344,
3669,
1330,
350,
1571,
8086,
27364,
23739,
198,
6738,
4555,
13,
1350... | 2.467811 | 699 |
import math
import pyglet
from pyglet.gl import *
| [
11748,
10688,
198,
198,
11748,
12972,
70,
1616,
198,
6738,
12972,
70,
1616,
13,
4743,
1330,
1635,
628,
198
] | 2.789474 | 19 |
# Lint as: python3
# Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
2,
406,
600,
355,
25,
21015,
18,
198,
2,
15069,
33448,
3012,
11419,
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,... | 3.190972 | 864 |
import sys
import re
lines = open(sys.argv[1], 'r')
for line in lines:
line = line.replace('\n', '').replace('\r', '')
if len(line) > 0:
chars = [match.start() for match in re.finditer('[a-zA-Z]', line)]
isupper = True
for i in chars:
c = line[i].upper() if isupper... | [
11748,
25064,
201,
198,
11748,
302,
201,
198,
201,
198,
6615,
796,
1280,
7,
17597,
13,
853,
85,
58,
16,
4357,
705,
81,
11537,
201,
198,
1640,
1627,
287,
3951,
25,
201,
198,
220,
220,
220,
1627,
796,
1627,
13,
33491,
10786,
59,
77,... | 2.012821 | 234 |
from flask import request
from zeus.models import Build
from zeus.api.utils.upserts import upsert_job
from .base import BaseHook
| [
6738,
42903,
1330,
2581,
198,
198,
6738,
1976,
27650,
13,
27530,
1330,
10934,
198,
6738,
1976,
27650,
13,
15042,
13,
26791,
13,
4739,
861,
82,
1330,
19649,
861,
62,
21858,
198,
198,
6738,
764,
8692,
1330,
7308,
39,
566,
628
] | 3.3 | 40 |
from django.shortcuts import render
from core.models import *
from django.shortcuts import render, get_object_or_404, redirect
from django.urls import reverse
from django.db.models import Count
from django.contrib import messages
from django.http import Http404, HttpResponseRedirect
from django.forms import modelform_f... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
4755,
13,
27530,
1330,
1635,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
42625,
14208,
13,
6371,
82,
... | 3.360759 | 316 |
from .bert import BERT, CustomBERT
from .language_model import BERTLM, CustomBERTLM
from .classifier import GoodBad
| [
6738,
764,
4835,
1330,
347,
17395,
11,
8562,
13246,
51,
198,
6738,
764,
16129,
62,
19849,
1330,
347,
1137,
14990,
44,
11,
8562,
13246,
14990,
44,
198,
6738,
764,
4871,
7483,
1330,
4599,
22069,
198
] | 3.314286 | 35 |
# -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_int_field 1'] = '''{
int_field: [Int]
}'''
snapshots['test_int_fails 1'] = '''{
int_field: [Int]
}'''
snapshots['test_default_arg... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11495,
1477,
24879,
25,
410,
16,
532,
3740,
1378,
42469,
13,
4743,
14,
89,
34,
19,
88,
52,
66,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
19... | 2.271186 | 295 |
"""
generate_plots_JCAP_2021.py is a Python routine that can be used
to generate the plots of A. Roper Pol, S. Mandal, A. Brandenburg, and
T. Kahniashvili, "Polarization of gravitational waves from helical MHD
turbulent sources," https://arxiv.org/abs/2107.05356.
It reads the pickle run variables that can be generated... | [
37811,
198,
8612,
378,
62,
489,
1747,
62,
41,
33177,
62,
1238,
2481,
13,
9078,
318,
257,
11361,
8027,
326,
460,
307,
973,
198,
1462,
7716,
262,
21528,
286,
317,
13,
371,
3575,
2165,
11,
311,
13,
41715,
11,
317,
13,
13512,
37036,
1... | 1.89384 | 20,177 |
class CNNAnswer(object):
"""
ответы отправляются в таком формате
"""
pass
| [
4871,
8100,
33706,
7,
15252,
2599,
198,
197,
37811,
198,
197,
15166,
20375,
38857,
16843,
20375,
45035,
12466,
122,
20375,
140,
123,
21169,
16142,
38857,
30143,
40623,
141,
236,
20375,
21727,
40623,
12466,
110,
220,
20375,
16142,
31583,
254... | 1.392857 | 56 |
"""
@author: Pranay Pradhananga, Damian Katsigiannis
@filename: Goto.py
@title: Goto
@description: Goto is a type of Expression and implement Expression abstract class.
Goto simply refers to the operation specified by the line number and operates the operation
"""
import abc
from Operation import Operatio... | [
37811,
198,
31,
9800,
25,
1736,
272,
323,
1736,
324,
7637,
16484,
11,
42574,
47244,
328,
666,
21361,
198,
31,
34345,
25,
402,
2069,
13,
9078,
198,
31,
7839,
25,
402,
2069,
198,
31,
11213,
25,
402,
2069,
318,
257,
2099,
286,
41986,
... | 3.45082 | 122 |
from typing import List
from pathlib import Path
from ..io import log
class Resource:
"""Wrapper around Path used for managing config files and directories"""
class ConfigDir(Resource):
"""Directory containing config files"""
class ConfigFile(Resource):
"""Class used to manage config files that may ha... | [
6738,
19720,
1330,
7343,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
11485,
952,
1330,
2604,
628,
198,
4871,
20857,
25,
198,
220,
220,
220,
37227,
36918,
2848,
1088,
10644,
973,
329,
11149,
4566,
3696,
290,
29196,
37811,
628,
198,
48... | 3.828283 | 99 |
# -*- coding: UTF-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__author__ = "d01"
__email__ = "jungflor@gmail.com"
__copyright__ = "Copyright (C) 2019, Florian JUNG"
__license__ = "MIT"
__version__ = "0.1.0"
_... | [
2,
532,
9,
12,
19617,
25,
41002,
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,
13... | 2.718876 | 249 |
"""Generated class for state_discovery.json"""
from .state_discovery_family import FamilyDiscoveryState
from .state_discovery_family import FamilyDiscoveryState
class DiscoveryState:
"""Generated schema class"""
@staticmethod
@staticmethod
@staticmethod
| [
37811,
8645,
515,
1398,
329,
1181,
62,
67,
40821,
13,
17752,
37811,
198,
6738,
764,
5219,
62,
67,
40821,
62,
17989,
1330,
7884,
35,
40821,
9012,
198,
6738,
764,
5219,
62,
67,
40821,
62,
17989,
1330,
7884,
35,
40821,
9012,
628,
198,
... | 3.814286 | 70 |
"""
Classes to provide lazy players that are treatable as an entity ID but
do not have to receive one immediately.
"""
from typing import Dict, List, Optional, Union
from hearthstone.enums import GameType
from .exceptions import MissingPlayerData
from .tokens import UNKNOWN_HUMAN_PLAYER
from .utils import is_mercenar... | [
37811,
198,
9487,
274,
284,
2148,
16931,
1938,
326,
389,
2190,
540,
355,
281,
9312,
4522,
475,
198,
4598,
407,
423,
284,
3328,
530,
3393,
13,
198,
37811,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
11,
4479,
198,
198,
673... | 3.568421 | 95 |
import tkinter as tk
from tkinter import ttk
import pandas as pd
| [
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
198,
11748,
19798,
292,
355,
279,
67,
628
] | 2.869565 | 23 |
# pylint: disable=no-self-use,invalid-name
from __future__ import with_statement
from __future__ import division
from __future__ import absolute_import
import pytest
from allennlp.common.testing import ModelTestCase
from allennlp.data.dataset import Batch
from io import open
# Skip this one, it's an expensive test.
... | [
2,
279,
2645,
600,
25,
15560,
28,
3919,
12,
944,
12,
1904,
11,
259,
12102,
12,
3672,
198,
6738,
11593,
37443,
834,
1330,
351,
62,
26090,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
... | 2.44557 | 790 |
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect
from art_gallery_web.core.cleaned_up_files import cleaned_up_files
from art_gallery_web.core.decorators import user_is_entry_author
from art_gallery_web.gallery_app.forms import CreateArtForm, PostForm
from art_g... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
628,
198,
6738,
1242,
62,
24460,
62,
12384,
13,
7295,
13,
2375,
22739,
... | 3.171233 | 146 |
# Autogenerated file for Kivy configuration
PY3 = 0
CYTHON_MIN = '0.20'
CYTHON_MAX = '0.21.2'
CYTHON_BAD = '0.22, 0.22.beta0, 0.22.alpha0'
USE_RPI = 0
USE_OPENGL_ES2 = 0
USE_OPENGL_DEBUG = 0
USE_GLEW = 1
USE_SDL2 = 1
USE_IOS = 0
USE_MESAGL = 0
USE_X11 = 0
USE_GSTREAMER = 0
USE_AVFOUNDATION = 0
USE_OSX_FR... | [
2,
5231,
519,
877,
515,
2393,
329,
509,
452,
88,
8398,
201,
198,
47,
56,
18,
796,
657,
201,
198,
34,
56,
4221,
1340,
62,
23678,
796,
705,
15,
13,
1238,
6,
201,
198,
34,
56,
4221,
1340,
62,
22921,
796,
705,
15,
13,
2481,
13,
... | 1.80829 | 193 |
from flask import Flask
app = Flask(__name__)
app.config.from_object('settings')
import govhack2014.routes # noqa
| [
6738,
42903,
1330,
46947,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
1324,
13,
11250,
13,
6738,
62,
15252,
10786,
33692,
11537,
198,
198,
11748,
467,
85,
31153,
4967,
13,
81,
448,
274,
220,
220,
1303,
645,
20402,
198
] | 2.809524 | 42 |
"""Global constants controlling appearance"""
font_family = "Shree Devanagari 714"
main_color = "#333333"
accent_color = "#30009C"
background_color = "#ffffff"
background_color_accent = "#f2f3f4"
highlight_color = "#FB3552"
| [
37811,
22289,
38491,
12755,
5585,
37811,
198,
198,
10331,
62,
17989,
796,
366,
2484,
631,
6245,
272,
363,
2743,
767,
1415,
1,
198,
12417,
62,
8043,
796,
25113,
24840,
2091,
1,
198,
330,
1087,
62,
8043,
796,
25113,
23924,
24,
34,
1,
... | 2.848101 | 79 |
from kii import results as rs
from kii.helpers import RequestHelper, AuthRequestHelper
| [
6738,
479,
4178,
1330,
2482,
355,
44608,
198,
6738,
479,
4178,
13,
16794,
364,
1330,
19390,
47429,
11,
26828,
18453,
47429,
628,
628,
628
] | 3.833333 | 24 |
import debug
from ruler import Ruler
import input
from output import NaturalDeductionTree, Step, StepType
from premise import Premise
from fsm import MasterPool, ProveFSM, Pool
CONCLUDE = ":-"
| [
11748,
14257,
198,
6738,
22740,
1330,
31808,
198,
11748,
5128,
198,
6738,
5072,
1330,
12068,
35,
276,
8110,
27660,
11,
5012,
11,
5012,
6030,
198,
6738,
18659,
1330,
6929,
786,
198,
6738,
277,
5796,
1330,
5599,
27201,
11,
1041,
303,
1065... | 3.203125 | 64 |
from setuptools import setup, find_packages
setup(name='dehydrated_vae',
version='0.0.0',
install_requires = [
'keras',
'numpy',
],
packages=find_packages())
| [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
3672,
11639,
2934,
15511,
4111,
62,
33353,
3256,
198,
220,
2196,
11639,
15,
13,
15,
13,
15,
3256,
198,
220,
2721,
62,
47911,
796,
685,
198,
220,
220,
220,... | 2.61194 | 67 |
# -------------------------------------------
# Created by: jasper
# as part of the project: Bachelorarbeit
# Date: 4/29/20
#--------------------------------------------
import setuptools
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# ... | [
2,
20368,
32284,
198,
198,
2,
15622,
416,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
474,
32981,
198,
2,
355,
636,
286,
262,
1628,
25,
220,
220,
33399,
283,
15357,
198,
2,
7536,
25,
220,
220,
220,
... | 2.773936 | 376 |
#%%
import warnings
from sklearn.metrics import mean_squared_error
from sklearn.model_selection._split import train_test_split
import traceback
from unsupervised_learning.src import plot_clusters
import copy
warnings.filterwarnings("ignore")
import os
os.chdir(os.path.dirname(__file__))
from sklearn.metrics... | [
2,
16626,
201,
198,
11748,
14601,
201,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
1612,
62,
16485,
1144,
62,
18224,
201,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
13557,
35312,
1330,
4512,
62,
9288,
62,
35312,
201,
198,
11748,
... | 2.121348 | 5,818 |
from dataclasses import dataclass, field
from math import ceil, floor
from typing import Dict, Iterable, List, Optional, Set, Tuple, Union, cast
import itertools
import dsd.search as ds # type: ignore
import dsd.constraints as dc
# TODO: Go over each constraint, using NUPACK
# - check pfunc for each strand
# - c... | [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
10688,
1330,
2906,
346,
11,
4314,
198,
6738,
19720,
1330,
360,
713,
11,
40806,
540,
11,
7343,
11,
32233,
11,
5345,
11,
309,
29291,
11,
4479,
11,
3350,
198,
11748,
... | 2.032191 | 15,346 |
#!/usr/bin/env python
import numpy as np
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.layers import Conv2D
from tensorflow.keras import optimizers
from tensorflow.keras import backend as K
import tensorflow as tf
import sklearn
import ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
360,
107... | 2.613065 | 597 |
print("Enter a selection from the below menu. Press '0' to exit.")
menu_items = ["Bake a loaf of bread", "Bake a pound cake", "Prepare Roast Chicken", "Make Curry", \
"Put a rack of ribs in the smoker", "Buy dinner out", "Have ice cream", "Sandwiches - again"]
select = None
while True:
for i in range(len(menu... | [
4798,
7203,
17469,
257,
6356,
422,
262,
2174,
6859,
13,
220,
4332,
705,
15,
6,
284,
8420,
19570,
198,
26272,
62,
23814,
796,
14631,
33,
539,
257,
40134,
286,
8509,
1600,
366,
33,
539,
257,
14896,
12187,
1600,
366,
37534,
533,
5564,
... | 2.55 | 260 |
"""
Functional Principal Component Analysis
=======================================
Explores the two possible ways to do functional principal component analysis.
"""
# Author: Yujian Hong
# License: MIT
import skfda
from skfda.datasets import fetch_growth
from skfda.exploratory.visualization import plot_fpca_perturb... | [
37811,
198,
22203,
282,
32641,
35100,
14691,
198,
10052,
1421,
18604,
198,
198,
18438,
2850,
262,
734,
1744,
2842,
284,
466,
10345,
10033,
7515,
3781,
13,
198,
37811,
198,
198,
2,
6434,
25,
10605,
73,
666,
9764,
198,
2,
13789,
25,
171... | 3.732532 | 1,331 |
from discord import role
from redbot.core import Config, commands, bank, checks
import discord
import random
from redbot.core.utils.chat_formatting import humanize_number
credit = "By: king slayer | Legend Gaming"
| [
6738,
36446,
1330,
2597,
201,
198,
6738,
2266,
13645,
13,
7295,
1330,
17056,
11,
9729,
11,
3331,
11,
8794,
201,
198,
11748,
36446,
201,
198,
11748,
4738,
201,
198,
6738,
2266,
13645,
13,
7295,
13,
26791,
13,
17006,
62,
18982,
889,
133... | 3.46875 | 64 |
# -*- encoding: utf-8 -*-
"""
Ending Module
ReST endpoints
"""
from __future__ import generator_stop
import sys
import os
from collections import OrderedDict as ODict, deque
import enum
try:
import simplejson as json
except ImportError:
import json
import datetime
import mimetypes
import arrow
import falco... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
12915,
278,
19937,
198,
198,
3041,
2257,
886,
13033,
198,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
17301,
62,
11338,
198,
198,
11748,
25064,
198,
11748,... | 1.925576 | 35,311 |
from .utils import get_request, post_request, patch_request, authorized
| [
6738,
764,
26791,
1330,
651,
62,
25927,
11,
1281,
62,
25927,
11,
8529,
62,
25927,
11,
10435,
198
] | 4 | 18 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
tsurukame()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
256,
11793,
2724,
480,
3419,
628
] | 2.090909 | 44 |
from __future__ import annotations
import ast
import os
import platform
import re
import shutil
import sys
import tarfile
import tempfile
import zipfile
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from poetry.core import __version__
from poetry.core.factory import Factory
from poetry.cor... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
6468,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
302,
198,
11748,
4423,
346,
198,
11748,
25064,
198,
11748,
13422,
7753,
198,
11748,
20218,
7753,
198,
11748,
19974,
7753,
198,
1... | 2.899244 | 397 |
import numpy as np
from numpy.linalg import norm
if __name__ == '__main__':
# A = np.array([
# [10, -1, 2, 0],
# [-1, 11, -1, 3],
# [2, -1, 10, -1],
# [0, 3, -1, 8]
# ])
# b = np.array([6, 25, -11, 15])
# XO = np.zeros([4, 1])
A = np.array([
[4, 3... | [
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
75,
1292,
70,
1330,
2593,
628,
220,
220,
220,
220,
220,
220,
220,
220,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1303,
317,
796,... | 1.718085 | 376 |
hour = 12
minutes = 30
res = Solution().angleClock(hour, minutes)
print(res) | [
198,
198,
9769,
796,
1105,
198,
1084,
1769,
796,
1542,
198,
411,
796,
28186,
22446,
9248,
44758,
7,
9769,
11,
2431,
8,
198,
4798,
7,
411,
8
] | 2.888889 | 27 |
# !/uer/bin/env python3
# coding=utf-8
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import NoSuchElementException
from base.log import logged
| [
2,
5145,
14,
15573,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
28,
40477,
12,
23,
198,
11748,
640,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13... | 3.411111 | 90 |
import numpy as np
import _lib.pr_func as pr
| [
11748,
299,
32152,
355,
45941,
198,
11748,
4808,
8019,
13,
1050,
62,
20786,
355,
778,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
198
] | 2.433333 | 30 |
'''
slrfield cpf subpackage
This subpackage defines the following functions:
# cpf_download.py
download_bycurrent - Download the latest CPF ephemeris files at the current moment
download_bydate - Download the latest CPF ephemeris files before a specific time
cpf_download - It combines the features of download_byc... | [
7061,
6,
198,
6649,
81,
3245,
31396,
69,
850,
26495,
198,
198,
1212,
850,
26495,
15738,
262,
1708,
5499,
25,
198,
198,
2,
31396,
69,
62,
15002,
13,
9078,
220,
198,
198,
15002,
62,
1525,
14421,
532,
10472,
262,
3452,
16932,
37,
2462,... | 3.428135 | 327 |
from trace_gen_base import TraceGenBase
# main()
if __name__ == "__main__":
tg = TestReorder()
tg.generate()
| [
6738,
12854,
62,
5235,
62,
8692,
1330,
34912,
13746,
14881,
628,
198,
198,
2,
1388,
3419,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
256,
70,
796,
6208,
3041,
2875,
3419,
198,
220,
256,
70,
13,
8612,
378... | 2.577778 | 45 |
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
# http://www.apache.org/licenses/LICENSE-2.0
# or in the "license" file... | [
2,
15069,
2864,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
198,
2,
921,
743,
407,
779,
428,
2393,
2845,
287... | 3.57346 | 211 |
import torch
from torch import nn
from .util import calculate_iou
| [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
198,
6738,
764,
22602,
1330,
15284,
62,
72,
280,
628,
198
] | 3.45 | 20 |
# -*- coding: utf-8 -*-
"""
====================================================================
Custom NumPy Quaternion class (:mod:`sknano.core.math._quaternion`)
====================================================================
.. currentmodule:: sknano.core.math._quaternion
"""
from __future__ import absolute_... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
23926,
1421,
198,
15022,
31835,
20519,
2264,
9205,
295,
1398,
357,
25,
4666,
25,
63,
8135,
77,
5733,
13,
7295,
13,
11018,
13557,
421,
9205,
295,
63,
8,
198... | 2.605653 | 743 |
""""""
from collections import OrderedDict
import copy
import inspect
import logging
from neurodocker.generators.common import _add_to_entrypoint
from neurodocker.generators.common import _get_json_spec_str
from neurodocker.generators.common import _installation_implementations
from neurodocker.generators.common impo... | [
15931,
15931,
15931,
198,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
4866,
198,
11748,
10104,
198,
11748,
18931,
198,
198,
6738,
7669,
45986,
13,
8612,
2024,
13,
11321,
1330,
4808,
2860,
62,
1462,
62,
13000,
4122,
198,
67... | 3.704698 | 149 |
# switching to the file logger
from os.path import join, exists, dirname, abspath
from os import remove, getcwd
from pyomexmeta import RDF, Logger
cellml = '''<?xml version=\"1.1\" encoding=\"UTF-8\"?>
<model xmlns=\"http://www.cellml.org/cellml/1.1#\" xmlns:cmeta=\"http://www.cellml.org/metadata/1.0#\" xm... | [
2,
15430,
284,
262,
2393,
49706,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
7160,
11,
26672,
3672,
11,
2352,
6978,
198,
6738,
28686,
1330,
4781,
11,
651,
66,
16993,
198,
6738,
12972,
462,
87,
28961,
1330,
371,
8068,
11,
5972,
1362,
... | 2.5625 | 720 |
from django.urls import path
from .views import AboutPageView, ContactUsView, HomePageView
urlpatterns = [
path('', HomePageView.as_view(), name='home'),
path('about/', AboutPageView.as_view(), name='about'),
path('contact-us/', ContactUsView.as_view(), name='contact_us'),
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
33571,
1330,
7994,
9876,
7680,
11,
14039,
5842,
7680,
11,
5995,
9876,
7680,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5995,
9876,
768... | 2.9 | 100 |
from vardbg import ansi
from .misc import knapsack
from .run import debug_func
# | Item | Weight | Value |
# |------|--------|-------|
# | 1 | 2 | 1 |
# | 2 | 10 | 20 |
# | 3 | 3 | 3 |
# | 4 | 6 | 14 |
# | 5 | 18 | 100 |
# Put a placeholder 0 weight, 0 value item... | [
6738,
410,
446,
35904,
1330,
9093,
72,
198,
198,
6738,
764,
44374,
1330,
638,
1686,
441,
198,
6738,
764,
5143,
1330,
14257,
62,
20786,
198,
198,
2,
930,
9097,
930,
14331,
930,
11052,
930,
198,
2,
930,
23031,
91,
982,
91,
26866,
91,
... | 2.164384 | 219 |
from discord import Intents
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.cron import CronTrigger
from discord.ext.commands import Bot as BotBase
from dotenv import load_dotenv
from discord import Embed
import os
from datetime import datetime
from discord.ext.commands import Bo... | [
6738,
36446,
1330,
2558,
658,
220,
198,
6738,
257,
862,
1740,
18173,
13,
1416,
704,
377,
364,
13,
292,
13361,
952,
1330,
220,
1081,
13361,
40,
2640,
1740,
18173,
198,
6738,
257,
862,
1740,
18173,
13,
2213,
328,
5355,
13,
66,
1313,
1... | 3.052632 | 171 |
#!/usr/bin/env python3
__author__ = "Patrick Reckeweg"
__copyright__ = ""
import matplotlib as mlp
import matplotlib.pyplot as plt
from random import *
import array as arr
import miller_rabbin as ml
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
834,
9800,
834,
220,
220,
220,
220,
220,
796,
366,
32718,
3311,
365,
732,
70,
1,
198,
834,
22163,
4766,
834,
220,
220,
796,
13538,
198,
198,
11748,
2603,
29487,
8019,
355,
25962,... | 2.736842 | 76 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
run all flux convert and inventory runs
Things to change if rerun is needed:
- path
- volumesandmats.txt
"""
import matplotlib.pyplot as plt
import os
import numpy as np
outputfile='NESSA-Neutron-Openo'
path='NESSA0505open'
sourceRate=1e11 #1/s
materia... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
5143,
477,
28462,
10385,
290,
13184,
4539,
198,
198,
22248,
284,
1487,
611,
302,
5143,
318,
2622,
25,
... | 2.012397 | 2,420 |
#!/usr/bin/env python
import click
from influxdb import InfluxDBClient
import os
from dateutil import parser
from datetime import date, datetime, timedelta
import time
import requests
from urllib import parse
@click.command()
if __name__ == '__main__':
monitor()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
3904,
198,
6738,
25065,
9945,
1330,
4806,
22564,
11012,
11792,
198,
11748,
28686,
198,
6738,
3128,
22602,
1330,
30751,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
11,
28805,
... | 3.147727 | 88 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from sqlalchemy import and_, desc
from flask_login import current_user
from vhoops import db, logging
from vhoops.wrappers.exceptions import handle_exception, ItemNotFoundError, DependencyError
from vhoops.modules.teams.api.models import Teams
@handle_exception
@handle_e... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
44161,
282,
26599,
1330,
290,
62,
11,
1715,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
198,
198,
6738,
41... | 3.034783 | 115 |
import logging
from operator import eq
from sqlalchemy import update, MetaData, Table, and_, or_, delete
from sqlalchemy.dialects.mysql import insert
from sqlalchemy.future import select
from sqlalchemy.orm import Session
from watchmen.common.mysql.model.table_definition import get_table_model, get_primary_key, parse... | [
11748,
18931,
198,
6738,
10088,
1330,
37430,
198,
198,
6738,
44161,
282,
26599,
1330,
4296,
11,
30277,
6601,
11,
8655,
11,
290,
62,
11,
393,
62,
11,
12233,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
28744,
13976,
1330,
7550... | 3.396985 | 199 |
import json
import azure.functions as func
| [
11748,
33918,
201,
198,
11748,
35560,
495,
13,
12543,
2733,
355,
25439,
201,
198,
220,
220,
220,
220
] | 2.722222 | 18 |
from sklear import metics
| [
6738,
1341,
3238,
1330,
1138,
873,
628
] | 3.857143 | 7 |
import itertools
import pytest
from fastweather.utils import (
get_current_percentage,
extract_info,
load_cities_in_chunks,
parse_weather_request,
)
def test_load_cities_in_chunks_raises_error():
"""Raises error when `chunks` value is larger than range(1, 20 <inclusive>)"""
with pytest.raise... | [
11748,
340,
861,
10141,
198,
11748,
12972,
9288,
198,
6738,
3049,
23563,
13,
26791,
1330,
357,
198,
220,
220,
220,
651,
62,
14421,
62,
25067,
496,
11,
198,
220,
220,
220,
7925,
62,
10951,
11,
198,
220,
220,
220,
3440,
62,
66,
871,
... | 2.554913 | 173 |
import json
import pytest
from brownie.network import web3, accounts
from tests.fixtures.depositor_fixtures import (
DEPOSITOR_BASE_FIXTURES, DEPOSITOR_FIXTURES_WITH_HIGH_GAS,
DEPOSITOR_FIXTURES_WITH_DEPOSIT_PROHIBIT, DEPOSITOR_FIXTURES_NOT_ENOUGH_BUFFERED_ETHER,
DEPOSITOR_BASE_FIXTURES_SMALL_BALANCE, DEP... | [
11748,
33918,
198,
198,
11748,
12972,
9288,
198,
6738,
7586,
494,
13,
27349,
1330,
3992,
18,
11,
5504,
198,
198,
6738,
5254,
13,
69,
25506,
13,
10378,
418,
2072,
62,
69,
25506,
1330,
357,
198,
220,
220,
220,
5550,
37997,
2043,
1581,
... | 2.419903 | 412 |
#!/usr/bin/env python
"""
Fill the "result" table with historic results
(results_xxyy_with_gw.csv).
"""
import argparse
import os
from airsenal.framework.mappings import alternative_team_names
from airsenal.framework.schema import Result, session_scope, session
from airsenal.framework.data_fetcher import FPLDataFetc... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
33762,
262,
366,
20274,
1,
3084,
351,
9566,
2482,
198,
7,
43420,
62,
5324,
22556,
62,
4480,
62,
70,
86,
13,
40664,
737,
198,
37811,
198,
198,
11748,
1822,
29572,
198... | 2.513991 | 679 |
from .wbits import Wonderbits
| [
6738,
764,
86,
9895,
1330,
12902,
9895,
628,
198,
220,
220,
220,
220
] | 2.769231 | 13 |
def fruit_distribution(s,n):
"""
In this task, you will be given a string that represents a number of apples and oranges
that are distributed in a basket of fruit this basket contains
apples, oranges, and mango fruits. Given the string that represents the total number of
the oranges and apples an... | [
4299,
8234,
62,
17080,
3890,
7,
82,
11,
77,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
554,
428,
4876,
11,
345,
481,
307,
1813,
257,
4731,
326,
6870,
257,
1271,
286,
22514,
290,
48389,
220,
198,
220,
220,
220,
326,
389,
... | 2.782805 | 442 |
import pytest
import datetime
import os
from pyquery import PyQuery
from factories import EmailListFactory, MessageFactory, ThreadFactory
from mlarchive.archive.views_static import (rebuild_static_index,
link_index_page, build_static_pages, is_small_year)
"""
@pytest.mark.django_db(transaction=True)
def test_reb... | [
11748,
12972,
9288,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
198,
6738,
12972,
22766,
1330,
9485,
20746,
198,
6738,
17590,
1330,
9570,
8053,
22810,
11,
16000,
22810,
11,
14122,
22810,
198,
6738,
25962,
17474,
13,
17474,
13,
33571,
... | 2.63163 | 1,037 |
# Copyright (c) 2015 Microsoft Corporation
"""
>>> from z3 import *
>>> x = Int('x')
>>> s = MCSatCore()
>>> s.check()
sat
>>> s.add(x != x)
>>> s.check() # doctest: +ELLIPSIS
Traceback (most recent call last):
Z3Exception: ...
>>> s = MCSatCore()
>>> s.add_tactic('simplify')
>>> s.check()
sat
>>> s.add(x != x)
>>> s.... | [
198,
2,
15069,
357,
66,
8,
1853,
5413,
10501,
198,
37811,
198,
33409,
422,
1976,
18,
1330,
1635,
198,
33409,
2124,
796,
2558,
10786,
87,
11537,
198,
33409,
264,
796,
337,
7902,
265,
14055,
3419,
198,
33409,
264,
13,
9122,
3419,
198,
... | 2.25 | 336 |
# Pok On Cheng 74157306 and Zongheng Ma 16285673. ICS 31 Lab sec 5. Lab Asst 2.
print('Part (c)')
print('How many hours?')
hours = int(input())
print('This many hours:', hours)
print('How many dollars per hour?')
rate = int(input())
print('This many dollars per hour: ', rate)
print('Weekly salary: ', hours * ra... | [
2,
8175,
1550,
27692,
8915,
18458,
20548,
290,
1168,
506,
31753,
6669,
1467,
26279,
45758,
13,
314,
7902,
3261,
3498,
792,
642,
13,
3498,
1081,
301,
362,
13,
201,
198,
4798,
10786,
7841,
357,
66,
8,
11537,
201,
198,
4798,
10786,
2437,... | 2.378148 | 2,819 |
'''
reloadall.py - transitively reloads nested modules
'''
import types
from importlib import reload
if __name__ == '__main__':
import reloadall
reload_all(reloadall)
| [
7061,
6,
198,
220,
220,
220,
18126,
439,
13,
9078,
532,
1007,
1800,
306,
18126,
82,
28376,
13103,
198,
7061,
6,
198,
198,
11748,
3858,
198,
198,
6738,
1330,
8019,
1330,
18126,
198,
220,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12... | 2.830769 | 65 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 01. 奇数文字列の取り出し
print(input()[::2])
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
5534,
13,
10263,
98,
229,
46763,
108,
23877,
229,
27764,
245,
26344,
245,
15474,
237,
244,
28255,
49035,
118,
... | 1.527273 | 55 |
from keras.engine.topology import Layer
class SpatialPyramidPoling(Layer):
"""Spatial pyramid pooling layer for 2D inputs.
See Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition,
K. He, X. Zhang, S. Ren, J. Sun
# Arguments
pool_list: list of int
# Input shape
... | [
6738,
41927,
292,
13,
18392,
13,
4852,
1435,
1330,
34398,
198,
198,
4871,
1338,
34961,
20519,
20255,
8017,
278,
7,
49925,
2599,
198,
220,
220,
220,
37227,
4561,
34961,
27944,
5933,
278,
7679,
329,
362,
35,
17311,
13,
198,
220,
220,
22... | 2.567308 | 208 |
from setuptools import find_packages, setup
pkgs = find_packages('src')
name = pkgs[0]
setup(
author_email='tomoki.nakamaru@gmail.com',
author='Tomoki Nakamaru',
entry_points={'console_scripts': [f'{name}={name}.__main__:bibtefmt']},
install_requires=['pyparsing==3.0.3'],
license='MIT',
lo... | [
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
628,
628,
198,
35339,
82,
796,
1064,
62,
43789,
10786,
10677,
11537,
198,
198,
3672,
796,
279,
10025,
82,
58,
15,
60,
198,
198,
40406,
7,
198,
220,
220,
220,
1772,
62,
12888,... | 2.440594 | 202 |
# Copyright 2014 Google 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 applicable law or ag... | [
2,
15069,
1946,
3012,
3457,
13,
1439,
6923,
33876,
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,
13789,
... | 2.924036 | 882 |
from enum import Enum, auto
from ..exceptions import ModelResolverError
from ..filters import uppercase_first_letter
from .flattener import JsonSchemaFlattener
from .utils import BASE, fragment_encode
UNDEFINED = "undefined"
MULTIPLE = "multiple"
FORMAT_DEFAULT = "default"
class ModelResolver:
"""This class t... | [
6738,
33829,
1330,
2039,
388,
11,
8295,
198,
198,
6738,
11485,
1069,
11755,
1330,
9104,
4965,
14375,
12331,
198,
6738,
11485,
10379,
1010,
1330,
334,
39921,
589,
62,
11085,
62,
9291,
198,
6738,
764,
2704,
1078,
877,
1330,
449,
1559,
270... | 2.519809 | 2,726 |
# encoding: UTF-8
import zmq
import itchat
import time
import os
import json
from befh.subscription_manager import SubscriptionManager
from befh.OkcoinAPI.OkcoinMarket import OkcoinMarket
from befh.FinexAPI.BitfinexMarket import BitfinexMarket
import logging
import re
import random
import numpy as np
if __name_... | [
2,
21004,
25,
41002,
12,
23,
198,
11748,
1976,
76,
80,
198,
11748,
340,
17006,
198,
11748,
640,
198,
11748,
28686,
198,
11748,
33918,
198,
6738,
307,
69,
71,
13,
7266,
33584,
62,
37153,
1330,
3834,
33584,
13511,
198,
6738,
307,
69,
... | 2.307223 | 983 |
"""
PROBLEM
Leonhard Euler was born on 15 April 1707.
Consider the sequence 1504170715041707n mod 4503599627370517.
An element of this sequence is defined to be an Eulercoin if it is strictly smaller than all previously found Eulercoins.
For example, the first term is 1504170715041707 which is the first Eulercoin. Th... | [
37811,
198,
4805,
9864,
2538,
44,
198,
198,
36185,
10424,
412,
18173,
373,
4642,
319,
1315,
3035,
1596,
2998,
13,
198,
19626,
262,
8379,
6640,
38547,
2998,
8628,
38547,
2998,
77,
953,
18523,
2327,
38565,
1983,
20167,
48170,
13,
198,
202... | 2.443866 | 1,728 |
# Generated by Django 2.1 on 2020-12-23 15:07
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
319,
12131,
12,
1065,
12,
1954,
1315,
25,
2998,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.904762 | 42 |
"""A.i People Counter"""
"""
Copyright [2020] [MEHUL SOLANKI]
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 ag... | [
37811,
32,
13,
72,
4380,
15034,
37811,
198,
37811,
198,
15269,
685,
42334,
60,
685,
11682,
39,
6239,
36817,
15154,
40,
60,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832... | 2.248741 | 11,321 |
import libtcodpy as libtcod
from model.action import ActionTag
from model.attribute import Attribute, AttributeTag
from model.entity import Entity
from ui.game.frame_world import WorldRenderType
from behavior import Behavior
#note: an explicit from [] import * because if I don't, using entity_utilities functions in la... | [
11748,
9195,
83,
19815,
9078,
355,
9195,
83,
19815,
198,
6738,
2746,
13,
2673,
1330,
7561,
24835,
198,
6738,
2746,
13,
42348,
1330,
3460,
4163,
11,
3460,
4163,
24835,
198,
6738,
2746,
13,
26858,
1330,
20885,
198,
6738,
334,
72,
13,
60... | 3.911504 | 113 |
from pydoc import doc
from gensim.test.utils import common_texts
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
from gensim.test.utils import get_tmpfile
print(f'creating docs')
print(common_texts)
documents = [TaggedDocument(doc, [i]) for i, doc in enumerate(common_texts)]
print(len(documents))
print(f'tra... | [
6738,
279,
5173,
420,
1330,
2205,
198,
6738,
308,
641,
320,
13,
9288,
13,
26791,
1330,
2219,
62,
5239,
82,
198,
6738,
308,
641,
320,
13,
27530,
13,
15390,
17,
35138,
1330,
14432,
17,
53,
721,
11,
309,
14655,
24941,
198,
6738,
308,
... | 2.718615 | 231 |
from brownie import * | [
6738,
7586,
494,
1330,
1635
] | 4.2 | 5 |
import unyt as u
from mc_examples.realistic_workflows.graphene_slitpore.utils import create_system
from mc_examples.realistic_workflows.graphene_slitpore.gcmc_pore.runners import run_gcmc
if __name__ == "__main__":
main()
| [
11748,
555,
20760,
355,
334,
628,
198,
6738,
36650,
62,
1069,
12629,
13,
5305,
2569,
62,
1818,
44041,
13,
70,
2416,
29473,
62,
6649,
270,
79,
382,
13,
26791,
1330,
2251,
62,
10057,
198,
6738,
36650,
62,
1069,
12629,
13,
5305,
2569,
... | 2.595506 | 89 |
import os
import numpy as np
import pandas as pd
from datetime import datetime as dt
import logging
from telemanom.helpers import Config
from telemanom.errors import Errors
import telemanom.helpers as helpers
from telemanom.channel import Channel
from telemanom.modeling import Model
logger = helpers.setup_logging() | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
4818,
8079,
1330,
4818,
8079,
355,
288,
83,
198,
11748,
18931,
198,
198,
6738,
5735,
805,
296,
13,
16794,
364,
1330,
17056,
198,
6738,
... | 3.573034 | 89 |
import os
from jinja2 import Environment, FileSystemLoader
| [
11748,
28686,
198,
6738,
474,
259,
6592,
17,
1330,
9344,
11,
9220,
11964,
17401,
198
] | 3.933333 | 15 |