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.conf.urls import url
from main.views import insert,update,delete,index
urlpatterns = [
url(r'^$', index ,name="index"),
url(r'^insert/$', insert ,name="insert"),
url(r'^update/$', update ,name="update"),
url(r'^delete/(?P<pk>\d+)/$', delete ,name="delete"),
] | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
1388,
13,
33571,
1330,
7550,
11,
19119,
11,
33678,
11,
9630,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,
6376,
837,
36... | 2.535088 | 114 |
import requests
import pandas as pd
from datetime import datetime
def get_halts_resumption() -> pd.DataFrame:
"""Gets the latest 25 halts from the iiroc
Returns:
halt_df
Dataframe with bad data removed
========== ====================================================================
... | [
11748,
7007,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
4818,
8079,
1330,
4818,
8079,
628,
198,
4299,
651,
62,
14201,
912,
62,
411,
24098,
3419,
4613,
279,
67,
13,
6601,
19778,
25,
198,
220,
220,
220,
37227,
38,
1039,
262,
345... | 2.593824 | 421 |
# -*- coding: utf-8 -*-
"""oarepo OAI-PMH converter."""
import os
from setuptools import find_packages, setup
extras_require = {
"devel": ['oarepo[deploy-es7,taxonomies,draft]>=3.2.1.2'],
"docs": ["sphinx"]
}
tests_require = [
'pytest',
'pytest-cov'
]
setup_requires = [
'pytest-runner>=2.7',
]
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
37811,
78,
533,
7501,
440,
20185,
12,
5868,
39,
38394,
526,
15931,
198,
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
... | 2.172932 | 1,330 |
"""
pyexcel_io.fileformat.csvz
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The lower level csvz file format handler.
:copyright: (c) 2014-2017 by Onni Software Ltd.
:license: New BSD License, see LICENSE for more details
"""
import zipfile
from pyexcel_io._compact import StringIO, PY2
from pyexcel_io.book import... | [
37811,
198,
220,
220,
220,
12972,
1069,
5276,
62,
952,
13,
7753,
18982,
13,
40664,
89,
198,
220,
220,
220,
220,
27156,
15116,
4907,
93,
628,
220,
220,
220,
383,
2793,
1241,
269,
21370,
89,
2393,
5794,
21360,
13,
628,
220,
220,
220,
... | 2.937799 | 209 |
import logging
# Is there a simpler way to put the Formatter class inside of the vaultfslogger class directly ? | [
11748,
18931,
198,
198,
2,
1148,
612,
257,
18599,
835,
284,
1234,
262,
5178,
1436,
1398,
2641,
286,
262,
22563,
9501,
6404,
1362,
1398,
3264,
5633
] | 4.307692 | 26 |
import gym
import numpy as np
from matplotlib import pyplot as plt
import sys
import os
from tqdm import trange
import pickle
import logging
import torch
from ginkgo_rl import GinkgoLikelihoodEnv, GinkgoLikelihood1DEnv
logger = logging.getLogger(__name__)
# Workaround for now until Trellis is better packaged
try:
... | [
11748,
11550,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
11748,
25064,
198,
11748,
28686,
198,
6738,
256,
80,
36020,
1330,
491,
858,
198,
11748,
2298,
293,
198,
11748,
18931,
... | 2.784416 | 385 |
# Copyright 2019 The Forte Authors. 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 ... | [
2,
15069,
13130,
383,
6401,
68,
46665,
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,
2... | 3.610687 | 262 |
import sys
from cptv import CPTVReader
filename = sys.argv[1]
with open(filename, "rb") as f:
reader = CPTVReader(f)
print("version:", reader.version)
print("device name:", reader.device_name)
print("device id:", reader.device_id)
print("time:", reader.timestamp)
print("dims:", reader.x_resol... | [
11748,
25064,
198,
6738,
269,
457,
85,
1330,
16932,
6849,
33634,
628,
198,
34345,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
198,
4480,
1280,
7,
34345,
11,
366,
26145,
4943,
355,
277,
25,
198,
220,
220,
220,
9173,
796,
16932,
6849,
... | 2.410753 | 465 |
from locust import HttpLocust, TaskSet
| [
6738,
1179,
436,
1330,
367,
29281,
33711,
436,
11,
15941,
7248,
628,
628
] | 3.230769 | 13 |
from .compound import Compound
from .assay import Assay | [
6738,
764,
5589,
633,
1330,
3082,
633,
198,
6738,
764,
562,
323,
1330,
2195,
323
] | 3.666667 | 15 |
import openml
import openml.study
from openml.testing import TestBase | [
11748,
1280,
4029,
198,
11748,
1280,
4029,
13,
44517,
198,
6738,
1280,
4029,
13,
33407,
1330,
6208,
14881
] | 3.833333 | 18 |
from . import data, commons, api
| [
6738,
764,
1330,
1366,
11,
36523,
11,
40391,
628,
628,
198
] | 3.363636 | 11 |
"""Talk""" | [
37811,
25685,
37811
] | 3.333333 | 3 |
# Copyright 2021 Population Health Sciences and Image Analysis, German Center for Neurodegenerative Diseases(DZNE)
#
# 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://w... | [
2,
15069,
33448,
20133,
3893,
13473,
290,
7412,
14691,
11,
2679,
3337,
329,
13782,
13500,
877,
876,
39988,
7,
35,
57,
12161,
8,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
... | 3.399408 | 338 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
import datetime
from django.core.urlresolvers import reverse
| [
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,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
... | 3.142857 | 63 |
"""
Q257
Binary Tree Paths
Easy
Given a binary tree, return all root-to-leaf paths.
Note: A leaf is a node with no children.
"""
from typing import List
# Definition for a binary tree node.
sol = Solution_rec()
node1 = TreeNode(1)
node2 = TreeNode(2)
node3 = TreeNode(3)
node4 = TreeNode(4)
node1.left = node2
n... | [
37811,
198,
48,
28676,
198,
33,
3219,
12200,
10644,
82,
198,
28406,
198,
198,
15056,
257,
13934,
5509,
11,
1441,
477,
6808,
12,
1462,
12,
33201,
13532,
13,
198,
198,
6425,
25,
317,
12835,
318,
257,
10139,
351,
645,
1751,
13,
198,
37... | 2.629834 | 181 |
# Copyright 2020 Alvaro Bartolome, alvarobartt @ GitHub
# See LICENSE for details.
import pytest
import covid_daily
if __name__ == "__main__":
test_overview()
| [
2,
15069,
12131,
978,
7785,
78,
13167,
349,
462,
11,
435,
7785,
672,
433,
83,
2488,
21722,
198,
2,
4091,
38559,
24290,
329,
3307,
13,
198,
198,
11748,
12972,
9288,
198,
198,
11748,
39849,
312,
62,
29468,
628,
198,
198,
361,
11593,
3... | 2.8 | 60 |
import matplotlib.pyplot as plt
import numpy as np
Linewidth = 2;
# Density value
rho = 0.8
# -------------------------------------------------------------------------------------
# Density vs Current plots
# -------------------------------------------------------------------------------------
fig1, ax1 = plt.subplo... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
198,
14993,
413,
5649,
796,
362,
26,
198,
2,
360,
6377,
1988,
220,
198,
81,
8873,
796,
657,
13,
23,
198,
198,
2,
16529,
19351,
12,
1... | 2.538827 | 1,262 |
import argparse
import html5lib
from collections import OrderedDict
import sys
TABLE = '{http://www.w3.org/1999/xhtml}table'
TBODY = '{http://www.w3.org/1999/xhtml}tbody'
TR = '{http://www.w3.org/1999/xhtml}tr'
TD = '{http://www.w3.org/1999/xhtml}td'
DAYS = ['pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota']... | [
11748,
1822,
29572,
198,
11748,
27711,
20,
8019,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
25064,
198,
198,
38148,
796,
705,
90,
4023,
1378,
2503,
13,
86,
18,
13,
2398,
14,
18946,
14,
87,
6494,
92,
11487,
6,
198,
227... | 2.238255 | 298 |
"""
CSV Tag
---------
This implements a Liquid-style csv tag for Pelican,
based on the octopress image tag [1]_
Syntax
------
{% csv /path/to/csv [lines:X-Y] [:no_header:] [:download:] %}
Examples
--------
{% csv test/data/data.csv %}
{% csv
test/data/data.csv
lines:20-30
:download:
%}
[1] https://github.co... | [
37811,
198,
7902,
53,
17467,
198,
45537,
198,
1212,
23986,
257,
21020,
12,
7635,
269,
21370,
7621,
329,
12903,
7490,
11,
198,
3106,
319,
262,
19318,
404,
601,
2939,
7621,
685,
16,
60,
62,
198,
13940,
41641,
198,
23031,
198,
90,
4,
2... | 2.048465 | 619 |
# Generated by Django 3.2.8 on 2021-11-17 05:56
from django.db import migrations, models
from label_types.models import generate_random_hex_color
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
23,
319,
33448,
12,
1157,
12,
1558,
8870,
25,
3980,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
6738,
6167,
62,
19199,
13,
27530,
1330,
7716,
62,
25120,
62,
3... | 3.148936 | 47 |
import logging
class FeatureNotImplemented(Exception):
"""Exception raised for not implenented features
Attributes:
name -- not implemented feature name
"""
class OnnxNotSupport(Exception):
"""Exception raised for something which is not supported by Onnx.
""" | [
11748,
18931,
198,
198,
4871,
27018,
3673,
3546,
1154,
12061,
7,
16922,
2599,
198,
220,
37227,
16922,
4376,
329,
407,
4114,
268,
4714,
3033,
628,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1438,
1377,
407,
9177,... | 3.662338 | 77 |
#!/usr/bin/env python
import os
from .trigger_hammerdb import Trigger_hammerdb
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
198,
6738,
764,
46284,
62,
17980,
9945,
1330,
24593,
62,
17980,
9945,
628
] | 3.153846 | 26 |
from .stream import Stream
from .workflow import Workflow
from .io.input import InputClosed
from .asynctools import *
| [
6738,
764,
5532,
1330,
13860,
198,
6738,
764,
1818,
11125,
1330,
5521,
11125,
198,
6738,
764,
952,
13,
15414,
1330,
23412,
2601,
1335,
198,
6738,
764,
292,
2047,
310,
10141,
1330,
1635,
198
] | 3.575758 | 33 |
from typing import List
import numpy as np
import torchfilter
def test_split_trajectories():
"""Basic check for subsequence generation helper."""
num_trajectories = 100
trajectory_timesteps = 100
subsequence_length = 10
# Generate trajectories
trajectories: List[torchfilter.types.Trajector... | [
6738,
19720,
1330,
7343,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
28034,
24455,
628,
198,
4299,
1332,
62,
35312,
62,
9535,
752,
1749,
33529,
198,
220,
220,
220,
37227,
26416,
2198,
329,
6399,
594,
5270,
31904,
526,
1593... | 2.306122 | 588 |
"""Test command definition parsing."""
import xml.etree.ElementTree as xml
import pytest
from gladiator.parse.command import parse_required_commands
from gladiator.parse.feature import (
get_feature_requirements,
Feature,
FeatureApi,
FeatureVersion,
)
TESTED_FEATURE = Feature(api=FeatureApi.GL, ve... | [
37811,
14402,
3141,
6770,
32096,
526,
15931,
198,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
35555,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
1278,
33716,
13,
29572,
13,
21812,
1330,
21136,
62,
35827,
62,
9503,
1746,
19... | 3.033333 | 120 |
import sys
l = 1
f = [0, 1]
test_cases = open(sys.argv[1], "r")
for test in test_cases:
f, l, test = fib(f, l, int(test))
print test
test_cases.close()
| [
11748,
25064,
628,
198,
198,
75,
796,
352,
198,
69,
796,
685,
15,
11,
352,
60,
198,
198,
9288,
62,
33964,
796,
1280,
7,
17597,
13,
853,
85,
58,
16,
4357,
366,
81,
4943,
198,
1640,
1332,
287,
1332,
62,
33964,
25,
198,
220,
220,
... | 2.157895 | 76 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from fetchman.pipeline.base_pipeline import ItemPipeline
from fa_news import DBSession, News
from fetchman.utils import FetchManLogger
import traceback
if sys.version_info < (3, 0):
reload(sys)
sys.setdefaultencoding('utf-8')
# 存入数据库pipeline
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
25064,
198,
6738,
21207,
805,
13,
79,
541,
4470,
13,
8692,
62,
79,
541,
4470,
1330,
9097,
47,
541,
4470,
198,
... | 2.440945 | 127 |
from selenium import webdriver
import unittest
if __name__=='__main__':
unittest.main(warnings='ignore')
| [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
11748,
555,
715,
395,
628,
198,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
7,
40539,
654,
11639,
46430,
11537,
628,
198
] | 2.714286 | 42 |
import json
import os
class PackageTranslator:
"""The PackageTranslator creates working modules out of the metacode files."""
def save(self, target_file_path, code):
"""Saves the working Python module"""
try:
os.remove(target_file_path)
except OSError:
pass
... | [
11748,
33918,
198,
11748,
28686,
628,
198,
4871,
15717,
8291,
41880,
25,
198,
220,
220,
220,
37227,
464,
15717,
8291,
41880,
8075,
1762,
13103,
503,
286,
262,
1138,
330,
1098,
3696,
526,
15931,
628,
198,
220,
220,
220,
825,
3613,
7,
9... | 2.298851 | 174 |
import pytest
import ocs
from ocs.base import OpCode
from integration.util import (
create_agent_runner_fixture,
create_client_fixture,
create_crossbar_fixture
)
pytest_plugins = ("docker_compose")
wait_for_crossbar = create_crossbar_fixture()
run_agent = create_agent_runner_fixture(
'../agents/infl... | [
11748,
12972,
9288,
198,
198,
11748,
267,
6359,
198,
6738,
267,
6359,
13,
8692,
1330,
8670,
10669,
198,
198,
6738,
11812,
13,
22602,
1330,
357,
198,
220,
220,
220,
2251,
62,
25781,
62,
16737,
62,
69,
9602,
11,
198,
220,
220,
220,
22... | 2.744048 | 168 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import sys
import warnings
from math import sqrt, pi, exp, log, floor
from abc import ABCMeta, abstractmethod
import numpy as np
from .. import constants as const
from ..config import ConfigurationItem
from ..utils.misc import isiterable
from ..utils.exc... | [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
81,
301,
198,
11748,
25064,
198,
11748,
14601,
198,
6738,
10688,
1330,
19862,
17034,
11,
31028,
11,
1033,
11,
2604,
11,
4314,
198,
6738,
450,
... | 2.259406 | 28,546 |
#!/usr/bin/env python
"""
Python script to get the list of all contributors
in a github repository
"""
import requests
import sys
if len(sys.argv) < 3:
print "Enter desired username and repo name"
exit(1)
baseURL = "https://api.github.com/repos/"
# https://api.github.com/repos/fossasia/gci15.fossasia.org/contri... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
37906,
4226,
284,
651,
262,
1351,
286,
477,
20420,
220,
198,
259,
257,
33084,
16099,
198,
37811,
198,
198,
11748,
7007,
198,
11748,
25064,
198,
198,
361,
18896,
7,
175... | 2.694581 | 203 |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
r"""Implements evaluation of ``habitat.Agent`` inside ``habitat.Env``.
``habitat.Benchmark`` creates a ``habitat.Env`` wh... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,... | 2.817529 | 696 |
# Your FreqStack object will be instantiated and called as such:
# obj = FreqStack()
# obj.push(x)
# param_2 = obj.pop()
| [
220,
220,
220,
220,
220,
220,
220,
220,
628,
198,
2,
3406,
4848,
80,
25896,
2134,
481,
307,
9113,
12931,
290,
1444,
355,
884,
25,
198,
2,
26181,
796,
4848,
80,
25896,
3419,
198,
2,
26181,
13,
14689,
7,
87,
8,
198,
2,
5772,
62,
... | 2.538462 | 52 |
"""Variable managing utilities."""
import copy
import inspect
import itertools
from collections import UserDict
class Vars(UserDict):
"""A class that holds variable values in a trace event."""
def _scan_namespaces(self, frame):
"""Records variables from bottom to top."""
for name, value in i... | [
37811,
43015,
11149,
20081,
526,
15931,
198,
198,
11748,
4866,
198,
11748,
10104,
198,
11748,
340,
861,
10141,
198,
6738,
17268,
1330,
11787,
35,
713,
628,
198,
4871,
569,
945,
7,
12982,
35,
713,
2599,
198,
220,
220,
220,
37227,
32,
1... | 2.226277 | 411 |
import pandas as pd
import unittest
import numpy as np
import random
import DecisionTree
from sklearn.metrics import precision_score, accuracy_score, recall_score
mushrooms = pd.read_csv("./mushrooms.csv")
class DecisionTreeTestCase(unittest.TestCase):
"""Test for basic output of the decision tree"""
if __name... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
11748,
26423,
27660,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
15440,
62,
26675,
11,
9922,
62,
26675,
11,
10014,... | 3.123894 | 113 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) @AbirHasan2005
from NaysaEncoderBot.get_cfg import get_config
| [
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,
357,
66,
8,
2488,
4826,
343,
19242,
272,
14315,
198,
198,
6738,
399,
592,
64,
27195,
12342,
20630,
13,
1136,
... | 2.12069 | 58 |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Slang(AutotoolsPackage):
"""An interpreted language and programing library."""
homepa... | [
2,
15069,
2211,
12,
42334,
13914,
45036,
3549,
2351,
4765,
11,
11419,
290,
584,
198,
2,
1338,
441,
4935,
34152,
13,
4091,
262,
1353,
12,
5715,
27975,
38162,
9947,
2393,
329,
3307,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,... | 2.29682 | 283 |
"""
Django settings for housingapi project.
Generated by 'django-admin startproject' using Django 2.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os... | [
37811,
198,
35,
73,
14208,
6460,
329,
5627,
15042,
1628,
13,
198,
198,
8645,
515,
416,
705,
28241,
14208,
12,
28482,
923,
16302,
6,
1262,
37770,
362,
13,
15,
13,
16,
13,
198,
198,
1890,
517,
1321,
319,
428,
2393,
11,
766,
198,
545... | 2.394917 | 1,023 |
# sinh() function
import numpy as np
import math
in_array = [0, math.pi / 2, np.pi / 3, np.pi]
print ("Input array : \n", in_array)
Sinh_Values = np.sinh(in_array)
print ("\nSine Hyperbolic values : \n", Sinh_Values) | [
2,
7813,
71,
3419,
2163,
198,
220,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
220,
198,
259,
62,
18747,
796,
685,
15,
11,
10688,
13,
14415,
1220,
362,
11,
45941,
13,
14415,
1220,
513,
11,
45941,
13,
14415,
60,
198,
... | 2.413043 | 92 |
from flask_restplus import Api, abort as restplus_abort, Resource, fields
from pyinfraboxutils.ibflask import app
authorizations = {
'TokenAuth': {
'type': 'basic'
}
}
app.config['OPA_ENABLED'] = True
api = Api(app, authorizations=authorizations,
doc='/api/doc/',
validate=True,
... | [
6738,
42903,
62,
2118,
9541,
1330,
5949,
72,
11,
15614,
355,
1334,
9541,
62,
397,
419,
11,
20857,
11,
7032,
198,
6738,
12972,
259,
8310,
397,
1140,
26791,
13,
571,
2704,
2093,
1330,
598,
198,
198,
9800,
4582,
796,
1391,
198,
220,
22... | 2.41 | 200 |
from discord.ext import commands
import discord
intents = discord.Intents.all()
client = commands.Bot(command_prefix = ".", intents = intents)
try:
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
client.load_extension(f"cogs.{filename[:-3]}")
except Exception as e:
print("Cogs err... | [
6738,
36446,
13,
2302,
1330,
9729,
201,
198,
11748,
36446,
201,
198,
201,
198,
600,
658,
796,
36446,
13,
5317,
658,
13,
439,
3419,
201,
198,
16366,
796,
9729,
13,
20630,
7,
21812,
62,
40290,
796,
366,
33283,
493,
658,
796,
493,
658,... | 2.396552 | 232 |
#!/usr/bin/env python
"""Python wrapper module for the GROMACS editconf module
"""
import sys
import json
from command_wrapper import cmd_wrapper
import configuration.settings as settings
from tools import file_utils as fu
class Editconf(object):
"""Wrapper for the 5.1.2 version of the editconf module
Args:
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
37906,
29908,
8265,
329,
262,
10863,
2662,
2246,
50,
4370,
10414,
8265,
198,
37811,
198,
11748,
25064,
198,
11748,
33918,
198,
6738,
3141,
62,
48553,
1330,
23991,
62,
48553,
... | 2.195652 | 782 |
# taken from https://bcda.cms.gov/guide.html#try-the-api
# while the keys below are public, you should *never* commit your own id/secret to github
from bcda_client import ClientAuth
# 50 synthetic beneficiaries
EXTRA_SMALL_ACO = ClientAuth(
"0c527d2e-2e8a-4808-b11d-0fa06baf8254",
"36e0ea2217e6d6180f3ab1108d02... | [
2,
2077,
422,
3740,
1378,
15630,
6814,
13,
46406,
13,
9567,
14,
41311,
13,
6494,
2,
28311,
12,
1169,
12,
15042,
198,
2,
981,
262,
8251,
2174,
389,
1171,
11,
345,
815,
1635,
12081,
9,
4589,
534,
898,
4686,
14,
21078,
284,
33084,
19... | 2.001748 | 572 |
from typing import AsyncGenerator
import httpx
import pytest
from hw.alexander_sidorov.lesson11.service import app
TIMEOUT = 4
@pytest.fixture(scope="function")
| [
6738,
19720,
1330,
1081,
13361,
8645,
1352,
198,
198,
11748,
2638,
87,
198,
11748,
12972,
9288,
198,
198,
6738,
289,
86,
13,
1000,
87,
4066,
62,
30255,
273,
709,
13,
1203,
261,
1157,
13,
15271,
1330,
598,
198,
198,
34694,
12425,
796,
... | 2.912281 | 57 |
# -*- encoding: utf-8 -*-
#
# Copyright © 2021 Mergify SAS
#
# 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 applicabl... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
10673,
33448,
4638,
70,
1958,
35516,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
... | 3.477099 | 262 |
for char in reverse_text('step'):
print(char, end='')
print()
rt = reverse_text('step')
print(next(rt))
print('Other stuff')
print(next(rt))
| [
201,
198,
201,
198,
1640,
1149,
287,
9575,
62,
5239,
10786,
9662,
6,
2599,
201,
198,
220,
220,
220,
3601,
7,
10641,
11,
886,
28,
7061,
8,
201,
198,
4798,
3419,
201,
198,
201,
198,
17034,
796,
9575,
62,
5239,
10786,
9662,
11537,
20... | 2.25 | 72 |
# Copyright 2019 DeepMind Technologies Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | [
2,
15069,
13130,
10766,
28478,
21852,
12052,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
35... | 3.285467 | 578 |
from pathlib import Path
from typing import Iterator, Set, Union
from typing_extensions import Protocol # for py37 support
from panimg.models import (
PanImgFile,
PostProcessorResult,
SimpleITKImage,
TIFFImage,
)
| [
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
40806,
1352,
11,
5345,
11,
4479,
198,
198,
6738,
19720,
62,
2302,
5736,
1330,
20497,
220,
1303,
329,
12972,
2718,
1104,
198,
198,
6738,
3425,
9600,
13,
27530,
1330,
357,
198,
220,
... | 3 | 78 |
from django.conf import settings
from organizations_ext.models import Organization
def noop_token_creator(token_model, user, serializer):
""" Fake token creator to use sessions instead of tokens """
return None
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
5745,
62,
2302,
13,
27530,
1330,
12275,
628,
198,
198,
4299,
645,
404,
62,
30001,
62,
45382,
7,
30001,
62,
19849,
11,
2836,
11,
11389,
7509,
2599,
198,
220,
220,
220,
37227,
33482,... | 3.827586 | 58 |
"""Note well: collection slicing is deprecated!
"""
import logging
import sys
import pytest
import fiona
from fiona.errors import FionaDeprecationWarning
| [
37811,
6425,
880,
25,
4947,
49289,
318,
39224,
0,
198,
37811,
198,
198,
11748,
18931,
198,
11748,
25064,
198,
198,
11748,
12972,
9288,
198,
198,
11748,
277,
32792,
198,
6738,
277,
32792,
13,
48277,
1330,
42207,
12156,
8344,
341,
20361,
... | 3.767442 | 43 |
from flask import (
Blueprint, render_template, request, json
)
from DataBase.DataBase import GooglePlaces
from Preference import Types, UserPreferences
bp = Blueprint('Place', __name__, url_prefix='/place')
"""
Mostra tutte le informazioni dettagliate di un posto.
Essi sono ottenuti da un fil... | [
6738,
42903,
1330,
357,
201,
198,
220,
220,
220,
39932,
11,
8543,
62,
28243,
11,
2581,
11,
33918,
201,
198,
8,
201,
198,
201,
198,
6738,
6060,
14881,
13,
6601,
14881,
1330,
3012,
3646,
2114,
201,
198,
6738,
3771,
4288,
1330,
24897,
... | 2.726027 | 219 |
#!/bin/env python3
# This code are based on the assumption that there have been
# created a `black (custom)` in the `IoT Rapid Prototyping` Wap
# That contains a Device by name: `TheDevice` &
# a string value by name: `StringInfo`, that have a report & control state.
# the config json & certificates have been download... | [
2,
48443,
8800,
14,
24330,
21015,
18,
198,
198,
2,
770,
2438,
389,
1912,
319,
262,
13196,
326,
612,
423,
587,
198,
2,
2727,
257,
4600,
13424,
357,
23144,
8,
63,
287,
262,
4600,
40,
78,
51,
26430,
5038,
17183,
278,
63,
370,
499,
... | 2.646096 | 794 |
import shutil
from pathlib import Path
import itertools
import numpy as np
import pandas as pd
from scipy.optimize import minimize_scalar
input_base_dir = Path('./analysis/item_a/')
output_base_dir = input_base_dir / 'normalized/'
shutil.rmtree(output_base_dir, ignore_errors=True)
output_base_dir.mkdir(parents=True, e... | [
11748,
4423,
346,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
340,
861,
10141,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
17775,
62,
1416,
282,
283,
19... | 2.082912 | 989 |
#!/usr/bin/env python
import argparse
from random import randint
parser = argparse.ArgumentParser(description='Gem5 Fault Instance Generator')
parser.add_argument('-b', '--btb-access-count', type=str, dest='bacFile',
help='File containing BTB access references')
parser.set_defaults(bacFile="m5ou... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
1822,
29572,
198,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
11639,
38,
368,
20,
40050,
2262,
590,
35986,
11537,
... | 2.45393 | 738 |
VDSM_MIN_OVIRT = '4.2.4' # This has to match VDSK_MIN_VERSION!
VDSM_MIN_VERSION = '4.20.31' # RC4, final
CHECKS = {
'ovirt-version': check_ovirt_version,
}
| [
53,
5258,
44,
62,
23678,
62,
8874,
48771,
796,
705,
19,
13,
17,
13,
19,
6,
220,
1303,
770,
468,
284,
2872,
569,
5258,
42,
62,
23678,
62,
43717,
0,
198,
53,
5258,
44,
62,
23678,
62,
43717,
796,
705,
19,
13,
1238,
13,
3132,
6,
... | 2.088608 | 79 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cosmos/mint/v1beta1/mint.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
fr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
39385,
14,
34289,
14,
85,
16,
31361,
16,
14,
34289,
13,
1676,
1462,
198,... | 2.317638 | 2,591 |
try:
import uwsgi
except ModuleNotFoundError:
pass
import json
import re
import logging.handlers
import time
from functools import wraps
from logging import currentframe
log_levels = {
"EMERGENCY": ["\x1B[4;31m emergency \x1B[0m ", 109],
"ALERT": ["\x1B[4;31m alert \x1B[0m ", 108],
"CRITICAL":... | [
28311,
25,
198,
220,
220,
220,
1330,
334,
18504,
12397,
198,
16341,
19937,
3673,
21077,
12331,
25,
198,
220,
220,
220,
1208,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
18931,
13,
4993,
8116,
198,
11748,
640,
198,
6738,
1257,
310,
... | 2.152344 | 512 |
import re
from itertools import takewhile
print(count_passports()) | [
11748,
302,
198,
6738,
340,
861,
10141,
1330,
1011,
4514,
198,
198,
4798,
7,
9127,
62,
6603,
3742,
28955
] | 3.526316 | 19 |
import sys
import logging
ERROR = logging.ERROR
DEBUG = logging.DEBUG
CRITICAL = logging.CRITICAL
INFO = logging.INFO
logger = logging.getLogger()
| [
11748,
25064,
198,
11748,
18931,
198,
198,
24908,
220,
220,
220,
796,
18931,
13,
24908,
198,
30531,
220,
220,
220,
796,
18931,
13,
30531,
198,
9419,
2043,
20151,
796,
18931,
13,
9419,
2043,
20151,
198,
10778,
220,
220,
220,
220,
796,
... | 2.839286 | 56 |
from netmiko import ConnectHandler
from getpass import getpass
from datetime import datetime
lstamp = datetime.now()
logstamp = str(lstamp.year) + '-' + str(lstamp.month) + '-' + str(lstamp.day) + '-' + str(lstamp.hour) + str(lstamp.minute) + str(lstamp.second)
cisco4 = {
'host' : 'cisco4.lasthop.io',
... | [
6738,
2010,
76,
12125,
1330,
8113,
25060,
198,
6738,
651,
6603,
1330,
651,
6603,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
75,
301,
696,
796,
4818,
8079,
13,
2197,
3419,
198,
6404,
301,
696,
796,
965,
7,
75,
301,
696,
13,
... | 2.541568 | 421 |
import numpy as np
from scipy.integrate import odeint
import scipy.integrate as integrator
import matplotlib.pyplot as plt
import time
import sys
from cliente import Cliente # cliente OPCUA
import random
import threading
# Restricciones físicas de los tanques
# Ecuaciones diferenciales de los tanques
#... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
18908,
4873,
1330,
267,
2934,
600,
198,
11748,
629,
541,
88,
13,
18908,
4873,
355,
4132,
12392,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
640,... | 2.95 | 200 |
# Copyright 2015 Oursky Ltd.
#
# 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 writing, ... | [
2,
15069,
1853,
440,
1834,
2584,
12052,
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,
13,
198,
2,... | 3.052395 | 668 |
"""
This file generates a simple benchmark dataset similar to the one used by Caffe.
It's based on Google's build_imagenet_data.py file.
"""
import os
import json
import random
import gzip
import multiprocessing
import argparse
from dlbs.utils import IOUtils
def get_meta_file_metainfo(img_file, labels):
"""Return... | [
37811,
198,
1212,
2393,
18616,
257,
2829,
18335,
27039,
2092,
284,
262,
530,
973,
416,
327,
21223,
13,
198,
1026,
338,
1912,
319,
3012,
338,
1382,
62,
320,
11286,
316,
62,
7890,
13,
9078,
2393,
13,
198,
37811,
198,
11748,
28686,
198,
... | 2.446474 | 2,354 |
from django.shortcuts import render, redirect
from django.views.decorators.http import require_POST
from .models import Todo
from .forms import TodoForm
@require_POST
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
201,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
4023,
1330,
2421,
62,
32782,
201,
198,
201,
198,
6738,
764,
27530,
1330,
309,
24313,
201,
198,
6738,
764,
... | 3.181818 | 55 |
import random
from Astar import *
from GUI import *
if __name__ == "__main__":
# default state
init = [13, 2, 10, 3, 1, 12, 8, 4, 5, 0, 9, 6, 15, 14, 11, 7]
goal = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]
# uncommit this line to increase difficulty
random.shuffle(init)
start ... | [
11748,
4738,
198,
198,
6738,
317,
7364,
1330,
1635,
198,
6738,
25757,
1330,
1635,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1303,
4277,
1181,
198,
220,
220,
220,
2315,
796,
685,
1485,
... | 2.166667 | 408 |
'''
rc/__init__.py - Python class for polling R/C transmitters
Copyright (C) 2014 Simon D. Levy
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
L... | [
7061,
6,
198,
6015,
14,
834,
15003,
834,
13,
9078,
532,
11361,
1398,
329,
13985,
371,
14,
34,
21937,
1010,
628,
220,
220,
220,
15069,
357,
34,
8,
1946,
11288,
360,
13,
32036,
628,
220,
220,
220,
770,
1430,
318,
1479,
3788,
25,
345... | 3.537234 | 188 |
"""
Singleton Person class
"""
class Person():
"""Singleton"""
_instance = None
@staticmethod
def get_instance():
"""Get instance of Person"""
if Person._instance is None:
Person("Name", "Surname")
return Person._instance
def __init__(self, name, surname):
... | [
37811,
198,
29974,
10565,
7755,
1398,
198,
37811,
628,
198,
4871,
7755,
33529,
198,
220,
220,
220,
37227,
29974,
10565,
37811,
198,
220,
220,
220,
4808,
39098,
796,
6045,
628,
220,
220,
220,
2488,
12708,
24396,
198,
220,
220,
220,
825,
... | 2.523288 | 365 |
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import numpy as np
from pathlib import Path
from laserembeddings import Laser
from jina.executors.encoders import BaseTextEncoder
from jina.executors.decorators import batching, as_ndarray
| [
834,
22163,
4766,
834,
796,
366,
15269,
357,
66,
8,
12131,
449,
1437,
9552,
15302,
13,
1439,
2489,
10395,
526,
198,
834,
43085,
834,
796,
366,
25189,
4891,
12,
17,
13,
15,
1,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
3108,... | 3.12766 | 94 |
"""
OpenShift Get commands
======================
``oc get`` command is from openshift used to list the usage info - e.g.
pods info, dc info, services info, etc. This shared parser is used to parse
``oc get XX --all-namespaces -o yaml`` command information. Parameters
"--all-namespaces" means collecting information f... | [
37811,
198,
11505,
33377,
3497,
9729,
198,
4770,
50155,
198,
198,
15506,
420,
651,
15506,
3141,
318,
422,
9808,
29323,
973,
284,
1351,
262,
8748,
7508,
532,
304,
13,
70,
13,
198,
79,
12978,
7508,
11,
30736,
7508,
11,
2594,
7508,
11,
... | 3.157729 | 2,536 |
# Copyright 2019 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | [
2,
15069,
13130,
360,
12,
39709,
11998,
3457,
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,
13,
1... | 2.783455 | 2,877 |
import os
package_path = os.path.dirname(os.path.abspath(__file__)) # 'qanom' package base directory, e.g. "/home/.../site-packages/qanom"
with open(os.path.join(package_path, "version.txt")) as f:
__version__ = f.read().strip() | [
11748,
28686,
198,
26495,
62,
6978,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
1303,
705,
80,
272,
296,
6,
5301,
2779,
8619,
11,
304,
13,
70,
13,
12813,
11195,
14,
986,
... | 2.588889 | 90 |
"""*Dfetch* can create a patch file with your local changes to the external project.
If you've found any issues with the remote project, you can fix these issues inside the
context of your project. To help the upstream project, you can generate a patch file
that can be applied by the upstream maintainer. The patch wil... | [
37811,
9,
35,
69,
7569,
9,
460,
2251,
257,
8529,
2393,
351,
534,
1957,
2458,
284,
262,
7097,
1628,
13,
198,
198,
1532,
345,
1053,
1043,
597,
2428,
351,
262,
6569,
1628,
11,
345,
460,
4259,
777,
2428,
2641,
262,
198,
22866,
286,
53... | 2.519214 | 2,238 |
import logging
import six
from jiminy import pyprofile, vectorized
logger = logging.getLogger(__name__)
# Not used in core; but used in play_flashgames
| [
11748,
18931,
198,
11748,
2237,
198,
6738,
474,
320,
3541,
1330,
12972,
13317,
11,
15879,
1143,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
2,
1892,
973,
287,
4755,
26,
475,
973,
287,
711... | 3.276596 | 47 |
import sys
from marshmallow import Schema, fields
sys.path.append('../')
sys.path.append('./')
from falcon_routing_tools import Router, route_spec, APIDocs
| [
11748,
25064,
198,
6738,
22397,
42725,
1330,
10011,
2611,
11,
7032,
198,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
198,
17597,
13,
6978,
13,
33295,
7,
4458,
14,
11537,
198,
198,
6738,
24215,
1102,
62,
81,
13660,
62,
31391,
... | 3 | 53 |
# ## GAMECHANGER_CI_PREVENT_BUILD
import sys
from setuptools import find_packages
try:
from restricted_pkg import setup
except ImportError:
# allow falling back to setuptools only if
# we are not trying to upload
if 'upload' in sys.argv:
raise ImportError('restricted_pkg is required to upload... | [
2,
22492,
49965,
25994,
15567,
1137,
62,
25690,
62,
46437,
53,
3525,
62,
19499,
26761,
198,
11748,
25064,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
628,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
10770,
62,
35339,
1330,
... | 2.770115 | 348 |
'main'
from teambuilder import builderio, builder, shininglive, account
# need csv for song list, card list, profile, or excel builder
if __name__ == "__main__":
import sys
main(sys.argv) | [
1101,
391,
6,
198,
6738,
1074,
38272,
1330,
27098,
952,
11,
27098,
11,
22751,
12583,
11,
1848,
198,
220,
220,
198,
198,
2,
761,
269,
21370,
329,
3496,
1351,
11,
2657,
1351,
11,
7034,
11,
393,
27336,
27098,
198,
220,
220,
220,
220,
... | 2.985075 | 67 |
from collections import Counter
from random import Random
from typing import Tuple, TypeVar, Union, List, Dict, Collection
import numpy as np
from gym import spaces
from autograph.lib.envs.gridenv import GridEnv
from autograph.lib.envs.saveloadenv import SaveLoadEnv
from autograph.lib.util import element_add
class ... | [
6738,
17268,
1330,
15034,
198,
6738,
4738,
1330,
14534,
198,
6738,
19720,
1330,
309,
29291,
11,
5994,
19852,
11,
4479,
11,
7343,
11,
360,
713,
11,
12251,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
11550,
1330,
9029,
198,
198,
... | 2.787136 | 653 |
import uuid
import random
from d3m.metadata.pipeline import Pipeline
from axolotl.algorithms.base import PipelineSearchBase
from axolotl.utils import schemas as schemas_utils
primitive_python_paths = { # pragma: no cover
'data_processing': [
#'d3m.primitives.tods.data_processing.time_interval_transform'... | [
11748,
334,
27112,
198,
11748,
4738,
198,
198,
6738,
288,
18,
76,
13,
38993,
13,
79,
541,
4470,
1330,
37709,
198,
198,
6738,
7877,
349,
313,
75,
13,
282,
7727,
907,
13,
8692,
1330,
37709,
18243,
14881,
198,
6738,
7877,
349,
313,
75,... | 2.311488 | 2,594 |
## In this file, you set some app-wide settings.
APP_NAME = "Temperature Converter"
APP_ICON = "static/img/icon128.png"
APP_THEME = "united"
## Default installed themes:
# [amelia, cerulean, cyborg, flatly, journal,
# readable, simplex, slate, spacelab, united,]
| [
2235,
554,
428,
2393,
11,
345,
900,
617,
598,
12,
4421,
6460,
13,
198,
198,
24805,
62,
20608,
796,
366,
42492,
35602,
353,
1,
198,
24805,
62,
2149,
1340,
796,
366,
12708,
14,
9600,
14,
4749,
12762,
13,
11134,
1,
198,
198,
24805,
6... | 2.802083 | 96 |
'''
ModernGL: PyOpenGL alternative
'''
# pylint: disable=C0123, W0212
import os
import warnings
from typing import Dict, Tuple, Union
if os.environ.get('READTHEDOCS') == 'True':
import sys
from .mock import mgl
sys.modules['moderngl.mgl'] = mgl
from . import mgl
__version__ = '5.2.1'
__all__ = [
... | [
7061,
6,
198,
220,
220,
220,
12495,
8763,
25,
9485,
11505,
8763,
5559,
198,
7061,
6,
198,
198,
2,
279,
2645,
600,
25,
15560,
28,
34,
486,
1954,
11,
370,
2999,
1065,
198,
198,
11748,
28686,
198,
11748,
14601,
198,
6738,
19720,
1330,
... | 2.08779 | 38,296 |
import uuid
from sqlalchemy import orm
from infosystem.database import db
from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
| [
11748,
334,
27112,
198,
6738,
44161,
282,
26599,
1330,
393,
76,
198,
6738,
1167,
418,
6781,
13,
48806,
1330,
20613,
198,
6738,
44161,
282,
26599,
1330,
30015,
3103,
2536,
2913,
198,
6738,
1167,
418,
6781,
13,
11321,
13,
7266,
10057,
133... | 3.767442 | 43 |
#! "F:/Python_3.8.3/python.exe"
from ECIMS_Main import *
from ECIMS_Cooperative import *
from ECIMS_User import *
from ECIMS_Blockchain import *
Main.run_Flask(Main_Method) | [
2,
0,
366,
37,
14079,
37906,
62,
18,
13,
23,
13,
18,
14,
29412,
13,
13499,
1,
198,
198,
6738,
13182,
3955,
50,
62,
13383,
1330,
1635,
198,
6738,
13182,
3955,
50,
62,
7222,
27173,
1330,
1635,
198,
6738,
13182,
3955,
50,
62,
12982,
... | 2.521739 | 69 |
# Copyright (c) 2014-2018 Adam Karpierz
# Licensed under the zlib/libpng License
# http://opensource.org/licenses/zlib
from .void_handler import * # noqa
from .boolean_handler import * # noqa
from .char_handler import * # noqa
from .byte_handler import * # noqa
from .short_handler import * # noqa
from ... | [
2,
15069,
357,
66,
8,
1946,
12,
7908,
7244,
509,
5117,
959,
89,
198,
2,
49962,
739,
262,
1976,
8019,
14,
8019,
11134,
13789,
198,
2,
2638,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
89,
8019,
198,
198,
6738,
764,
19382,
62,
... | 2.799107 | 224 |
from django.db.models import Q
from django.utils.timezone import now
from django.views.generic import ListView
from pretix.base.models import Event
from pretix.presale.views import OrganizerViewMixin
| [
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
6738,
42625,
14208,
13,
26791,
13,
2435,
11340,
1330,
783,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
7343,
7680,
198,
198,
6738,
2181,
844,
13,
8692,
13,
27530,
1330,
... | 3.482759 | 58 |
# coding: utf-8
"""
tweak-api
Tweak API to integrate with all the Tweak services. You can find out more about Tweak at <a href='https://www.tweak.com'>https://www.tweak.com</a>, #tweak.
OpenAPI spec version: 1.0.8-beta.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
25393,
12,
15042,
628,
220,
220,
220,
24205,
461,
7824,
284,
19386,
351,
477,
262,
24205,
461,
2594,
13,
220,
921,
460,
1064,
503,
517,
546,
24205,
461,
220,
220... | 2.285272 | 5,493 |
import pandas as pd
import requests
import json
download_vacsi_tot_fra()
df = import_vacsi_res_tot_dep()
export_json(df)
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
7007,
198,
11748,
33918,
628,
198,
198,
15002,
62,
85,
330,
13396,
62,
83,
313,
62,
69,
430,
3419,
198,
7568,
796,
1330,
62,
85,
330,
13396,
62,
411,
62,
83,
313,
62,
10378,
3419,
198,
... | 2.45098 | 51 |
"""
SPDX-License-Identifier: Apache-2.0
Copyright 2017 Massachusetts Institute of Technology.
"""
import base64
import datetime
import hashlib
import hmac
import os
import secrets
from ipaddress import IPv4Address, IPv6Address, ip_address
from typing import List, Optional
import cryptography.hazmat.primitives.asymmet... | [
37811,
198,
4303,
36227,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
15269,
2177,
10140,
5136,
286,
8987,
13,
198,
37811,
198,
198,
11748,
2779,
2414,
198,
11748,
4818,
8079,
198,
11748,
12234,
8019,
198,
11748,
289,
2... | 2.656102 | 2,114 |
import os, shutil
from mojo.extensions import ExtensionBundle
basePath = os.path.dirname(__file__)
sourcePath = os.path.join(basePath, 'source')
libPath = os.path.join(sourcePath, 'code')
htmlPath = os.path.join(sourcePath, 'docs')
resourcesPath = os.path.join(sourcePath, 'resources')
licensePath = os.path.join(basePa... | [
11748,
28686,
11,
4423,
346,
198,
6738,
6941,
7639,
13,
2302,
5736,
1330,
27995,
33,
31249,
198,
198,
8692,
15235,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
8,
198,
10459,
15235,
796,
28686,
13,
6978,
13,
22179,
7,
8... | 2.656604 | 530 |
import poplib
from ...utils import Timer
class EmailChecker(Timer):
'''WARNING: This uses POP3 and by default deletes the emails it reads!'''
username = None
password = None
server = None
port = None
on_mail = None
delete = None
def on_exception(self):
'''Sometimes the mail... | [
11748,
1461,
8019,
198,
198,
6738,
2644,
26791,
1330,
5045,
263,
628,
198,
4871,
9570,
9787,
263,
7,
48801,
2599,
198,
220,
220,
220,
705,
7061,
31502,
25,
770,
3544,
37586,
18,
290,
416,
4277,
28128,
274,
262,
7237,
340,
9743,
0,
7... | 3.007143 | 140 |
"""Algorithms to support fitting routines in seaborn plotting functions."""
from __future__ import division
import numpy as np
from scipy import stats
from six.moves import range
def bootstrap(*args, **kwargs):
"""Resample one or more arrays with replacement and store aggregate values.
Positional arguments a... | [
37811,
2348,
7727,
907,
284,
1104,
15830,
31878,
287,
384,
397,
1211,
29353,
5499,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
9756,
198,
6738,
2237,
13,
76,
... | 2.289957 | 2,997 |
import numpy as np
from lumicks.pylake.fdcurve import FDCurve
from lumicks.pylake.channel import Slice, TimeSeries
def make_mock_fd(force, distance, start=0):
"""Mock FD curve which is not attached to an actual file, timestamps start at `start`"""
assert len(force) == len(distance)
fd = FDCurve(file=None... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
46390,
3378,
13,
79,
2645,
539,
13,
16344,
22019,
303,
1330,
376,
9697,
333,
303,
198,
6738,
46390,
3378,
13,
79,
2645,
539,
13,
17620,
1330,
3454,
501,
11,
3862,
27996,
628,
198,
4299,
... | 2.727273 | 198 |
from tests.unit import UnitTestCase
| [
198,
6738,
5254,
13,
20850,
1330,
11801,
14402,
20448,
628
] | 3.8 | 10 |
''' star_tides.api.routes.test_auth_route
'''
# Disabled because pytest adds fixtures by having them specified as arguments.
# This overloads the import which isn't allowed in google's pylintrc.
# pragma pylint: disable=W0621,W0613,W0611, W0105
import base64
from star_tides.tests.conftest import client
from star_tides.... | [
7061,
6,
3491,
62,
83,
1460,
13,
15042,
13,
81,
448,
274,
13,
9288,
62,
18439,
62,
38629,
198,
7061,
6,
198,
2,
43201,
780,
12972,
9288,
6673,
34609,
416,
1719,
606,
7368,
355,
7159,
13,
198,
2,
770,
31754,
82,
262,
1330,
543,
2... | 2.370726 | 936 |
import os
import re
from utils.generate_variations import GenerateLevels
from utils.data_classes import *
# input and output folders
level_input_folder = './input/'
level_output_folder = './output/'
if __name__ == "__main__":
generate_variations = GenerateVariations()
generate_variations.main()
| [
11748,
28686,
198,
11748,
302,
198,
6738,
3384,
4487,
13,
8612,
378,
62,
25641,
602,
1330,
2980,
378,
4971,
82,
198,
6738,
3384,
4487,
13,
7890,
62,
37724,
1330,
1635,
198,
198,
2,
5128,
290,
5072,
24512,
198,
5715,
62,
15414,
62,
4... | 3.081633 | 98 |
# -*- coding: utf-8 -*-
from macropy.case_classes import macros, case # noqa: F401
@case
p = Point(1, 2)
print(str(p)) # Point(1, 2)
print(p.x) # 1
print(p.y) # 2
print(Point(1, 2) == Point(1, 2)) # True
x, y = p
print(x, y) # (1, 2)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
8352,
28338,
13,
7442,
62,
37724,
1330,
34749,
11,
1339,
220,
1303,
645,
20402,
25,
376,
21844,
628,
198,
31,
7442,
628,
198,
79,
796,
6252,
7,
16,
11,
362,
8,... | 1.968504 | 127 |
from lib.search.graph import (
Graph,
SimpleGraph,
WeightedUndirectedGraph,
GridGraph,
)
from lib.search.problem import (
StartEndGraphProblem,
StartEndPathProblem,
)
from lib.search.systematic import (
dijkstra,
reconstruct_path,
explore_nodes_in_step_limit,
generic_bfs,
t... | [
6738,
9195,
13,
12947,
13,
34960,
1330,
357,
198,
220,
220,
220,
29681,
11,
198,
220,
220,
220,
17427,
37065,
11,
198,
220,
220,
220,
14331,
276,
31319,
1060,
276,
37065,
11,
198,
220,
220,
220,
24846,
37065,
11,
198,
8,
198,
6738,
... | 2.536232 | 138 |
"""
model
-----
Functions for modeling text corpuses and extracting keywords.
Contents:
get_topic_words,
get_coherence,
_order_and_subset_by_coherence,
_select_kws,
extract_kws,
gen_files
"""
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=Depre... | [
37811,
198,
19849,
198,
30934,
198,
198,
24629,
2733,
329,
21128,
2420,
24614,
2664,
290,
37895,
26286,
13,
198,
198,
15842,
25,
198,
220,
220,
220,
651,
62,
26652,
62,
10879,
11,
198,
220,
220,
220,
651,
62,
1073,
23545,
11,
198,
2... | 2.12449 | 15,431 |
import pandas as pd
import argparse
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(color_codes=True)
parser = argparse.ArgumentParser()
parser.add_argument("-copyprobs_file",
help="The copyprobs file to calculate ",
required=True)
args = parser.parse_args()
col... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
1822,
29572,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
82,
5907,
13,
2617,
7,
8043,
62,
40148,
28,
17821,
8,
198,
198,
... | 2.367491 | 566 |