content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
r"""
Using `fmas` as a black-box application
=======================================
This examples shows how to use `py-fmas` as a black-box application, that
only requires a minimal amount of scripting.
.. codeauthor:: Oliver Melchert <melchert@iqo.uni-hannover.de>
"""
#############################################... | [
81,
37811,
198,
12814,
4600,
69,
5356,
63,
355,
257,
2042,
12,
3524,
3586,
198,
10052,
1421,
18604,
198,
198,
1212,
6096,
2523,
703,
284,
779,
4600,
9078,
12,
69,
5356,
63,
355,
257,
2042,
12,
3524,
3586,
11,
326,
198,
8807,
4433,
... | 3.862934 | 518 |
from unittest import TestCase
import xmltodict
from markdown import Markdown
from markdown.util import etree
from mdx_attr_cols import AttrColTreeProcessor, AttrColExtension, makeExtension
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
11748,
2124,
76,
2528,
375,
713,
198,
198,
6738,
1317,
2902,
1330,
2940,
2902,
198,
6738,
1317,
2902,
13,
22602,
1330,
2123,
631,
198,
198,
6738,
285,
34350,
62,
35226,
62,
4033,
82,
... | 3.16129 | 62 |
# Generated by Django 3.0.5 on 2020-05-25 17:00
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
20,
319,
12131,
12,
2713,
12,
1495,
1596,
25,
405,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
# -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
import time
from gensim import corpora, models, similarities
from dialogbot.reader.data_helper import load_corpus_file
from dialogbot.utils.log import logger
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
9800,
25,
55,
84,
44,
278,
7,
87,
12595,
21,
1731,
31,
38227,
13,
785,
8,
198,
31,
11213,
25,
220,
198,
37811,
198,
198,
11748,
640,
198,
198,
6738... | 2.75 | 88 |
# https://leetcode.com/problems/single-number-ii/
| [
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
29762,
12,
17618,
12,
4178,
14,
198
] | 2.631579 | 19 |
#!/usr/bin/env python
import argparse
import kalibr_common as kc
from mpl_toolkits.mplot3d import art3d, Axes3D, proj3d
import numpy as np
import pylab as pl
import sm
import glob
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
11748,
479,
282,
2889,
62,
11321,
355,
479,
66,
198,
6738,
285,
489,
62,
25981,
74,
896,
13,
76,
29487,
18,
67,
1330,
1242,
18,
67,
11,
12176,
274,
18,
35,... | 2.528736 | 87 |
# 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.
load("@bazel_skylib//lib:paths.bzl", "paths")
load("//antlir/bzl:image.bzl", "image")
load("//antlir/bzl:oss_shim.bzl", "buck_genrule")
load("... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
... | 2.733333 | 135 |
__version__ = 'v2_2_8' | [
834,
9641,
834,
796,
705,
85,
17,
62,
17,
62,
23,
6
] | 1.833333 | 12 |
"""Top level code that takes a atmosphere phase map and propagates a wavefront through the system"""
import os
import numpy as np
import traceback
import multiprocessing
import glob
import random
import pickle as pickle
import time
from proper_mod import prop_run
from medis.Utils.plot_tools import quicklook_im, view_d... | [
37811,
9126,
1241,
2438,
326,
2753,
257,
8137,
7108,
3975,
290,
8928,
689,
257,
6769,
8534,
832,
262,
1080,
37811,
198,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12854,
1891,
198,
11748,
18540,
305,
919,
278,
19... | 2.091005 | 5,714 |
#3.3
user_ineteger_1 = int(input("Enter an integer: "))
user_integer_2 = int(input("Enter an other integer or the same as the first one: "))
sameOrNot(user_ineteger_1, user_integer_2) | [
2,
18,
13,
18,
198,
7220,
62,
42504,
11893,
62,
16,
796,
493,
7,
15414,
7203,
17469,
281,
18253,
25,
366,
4008,
198,
7220,
62,
41433,
62,
17,
796,
493,
7,
15414,
7203,
17469,
281,
584,
18253,
393,
262,
976,
355,
262,
717,
530,
2... | 2.815385 | 65 |
from tests.fixtures.regressors.simple_gaussian_mlp_regressor import (
SimpleGaussianMLPRegressor)
__all__ = ['SimpleGaussianMLPRegressor']
| [
6738,
5254,
13,
69,
25506,
13,
2301,
601,
669,
13,
36439,
62,
4908,
31562,
62,
4029,
79,
62,
2301,
44292,
1330,
357,
198,
220,
220,
220,
17427,
35389,
31562,
5805,
4805,
1533,
44292,
8,
198,
198,
834,
439,
834,
796,
37250,
26437,
35... | 2.88 | 50 |
# Copyright 2021, Crepaldi Michele.
#
# Developed as a thesis project at the TORSEC research group of the Polytechnic of Turin (Italy) under the supervision
# of professor Antonio Lioy and engineer Andrea Atzeni and with the support of engineer Andrea Marcelli.
#
# Licensed under the Apache License, Version 2.0 (the "L... | [
2,
15069,
33448,
11,
5844,
79,
37566,
38872,
13,
198,
2,
198,
2,
6013,
276,
355,
257,
21554,
1628,
379,
262,
309,
20673,
2943,
2267,
1448,
286,
262,
12280,
23873,
291,
286,
3831,
259,
357,
45001,
8,
739,
262,
20865,
198,
2,
286,
6... | 2.79052 | 3,270 |
'''Tests for the data module.'''
import pytest
import numpy as np
import torch
from torch.utils.data import TensorDataset
from torchutils.data import mean_std_over_dataset, image2tensor, tensor2image
| [
7061,
6,
51,
3558,
329,
262,
1366,
8265,
2637,
7061,
198,
198,
11748,
12972,
9288,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
309,
22854,
27354,
292,
316,
198,
6738,
28034,
26791,... | 3.15625 | 64 |
from __future__ import absolute_import
import importlib
import logging
import uuid
from contextlib import contextmanager
import fasteners
import json
import os
import shutil
import tarfile
import glob
import sys
import time
from oasislmf.model_execution.bin import prepare_model_run_directory, prepare_model_run_input... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
1330,
8019,
198,
11748,
18931,
198,
11748,
334,
27112,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
198,
11748,
3049,
36014,
198,
11748,
33918,
198,
11748,
28686,
198,
117... | 2.738166 | 676 |
import time
# Importo el modulo sys y aumento el limite de recursin, ya que viene predefinido con 1000
import sys
sys.setrecursionlimit(1000000) # 1 000 000
if __name__ == '__main__':
n = 10000000
print('Complejidad temporal de un algoritmo ITERATIVO. Factorial')
comienzo = time.time()
factorial_it... | [
11748,
640,
198,
2,
17267,
78,
1288,
953,
43348,
25064,
331,
257,
1713,
78,
1288,
1761,
578,
390,
664,
1834,
259,
11,
21349,
8358,
25357,
1734,
2747,
891,
259,
17305,
369,
8576,
198,
11748,
25064,
198,
17597,
13,
2617,
8344,
24197,
32... | 2.5 | 340 |
import smtplib
from email.header import Header
from email.mime.text import MIMEText
| [
11748,
895,
83,
489,
571,
198,
6738,
3053,
13,
25677,
1330,
48900,
198,
6738,
3053,
13,
76,
524,
13,
5239,
1330,
337,
3955,
2767,
2302,
198
] | 3.230769 | 26 |
# -*- coding: utf-8 -*-
from biothings.www.settings.default import *
from www.api.query_builder import ESQueryBuilder
from www.api.query import ESQuery
from www.api.transform import ESResultTransformer
from www.api.handlers import GeneHandler, QueryHandler, MetadataHandler, StatusHandler, TaxonHandler, DemoHandler
# *... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
3182,
849,
654,
13,
2503,
13,
33692,
13,
12286,
1330,
1635,
198,
6738,
7324,
13,
15042,
13,
22766,
62,
38272,
1330,
13380,
20746,
32875,
198,
6738,
7324,
13,
15042... | 2.657258 | 2,480 |
#!/usr/bin/env python
import os
from pathlib import Path
home = str(Path.home())
import datetime
now = datetime.datetime.now()
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11195,
796,
965,
7,
15235,
13,
11195,
28955,
198,
11748,
4818,
8079,
198,
2197,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
... | 2.79661 | 59 |
#!/usr/bin/env python
from oauth2client.service_account import ServiceAccountCredentials
from os import path
import os, requests, sys, argparse
SERVICE_ACCOUNT_KEY_FILE_NAME='SERVICE_ACCOUNT_KEY_FILE'
HANGOUTS_CHATS_API='https://chat.googleapis.com/v1'
GOOGLE_CHAT_SCOPE='https://www.googleapis.com/auth/chat.bot'
SPAC... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
267,
18439,
17,
16366,
13,
15271,
62,
23317,
1330,
4809,
30116,
34,
445,
14817,
198,
6738,
28686,
1330,
3108,
198,
11748,
28686,
11,
7007,
11,
25064,
11,
1822,
29572,
198,
1... | 2.814672 | 518 |
# import libraries
import clr
import os
from os import listdir
import System
from System.IO import SearchOption
from System import Environment
# import pyrevit libraries
from pyrevit import forms
from pyrevit import revit,DB
# get document
doc = revit.doc
# try to open cache path
try:
curdoc = DB.Document.PathNam... | [
2,
1330,
12782,
198,
11748,
537,
81,
198,
11748,
28686,
198,
6738,
28686,
1330,
1351,
15908,
198,
11748,
4482,
198,
6738,
4482,
13,
9399,
1330,
11140,
19722,
198,
6738,
4482,
1330,
9344,
198,
2,
1330,
12972,
18218,
270,
12782,
198,
6738... | 2.893417 | 319 |
#!/usr/bin/python
# # Copyright 2020 Hewlett Packard Enterprise Development LP
#
# 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 require... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
2,
1303,
15069,
12131,
30446,
15503,
6400,
446,
14973,
7712,
18470,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
... | 2.95015 | 1,665 |
from requests_html import HTMLSession
import re
from .blog.models import (Article, Tag, Category)
if __name__ == '__main__':
test = Spider()
links = test.get_list()
if links:
for i in links:
resp = test.get_detail(i)
text = test.parser(resp)
| [
6738,
7007,
62,
6494,
1330,
11532,
36044,
198,
11748,
302,
198,
6738,
764,
14036,
13,
27530,
1330,
357,
14906,
11,
17467,
11,
21743,
8,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1332,... | 2.416667 | 120 |
"""
"""
import django.dispatch
mysignal = django.dispatch.Signal(providing_args=["arg1","arg2"])
#
| [
37811,
198,
198,
37811,
198,
11748,
42625,
14208,
13,
6381,
17147,
198,
198,
28744,
570,
282,
796,
42625,
14208,
13,
6381,
17147,
13,
11712,
282,
7,
15234,
2530,
62,
22046,
28,
14692,
853,
16,
2430,
853,
17,
8973,
8,
198,
198,
2,
22... | 2.355556 | 45 |
"""
Date: Jul 2018
Author: Aciel Eshky
A script to create positive and negative samples using self-supervision.
"""
import os
import sys
import random
import pandas as pd
from numpy.random import seed as np_seed
from ustools.folder_utils import get_utterance_id, get_dir_info
from ultrasync.create_sync_samples_uti... | [
37811,
198,
198,
10430,
25,
5979,
2864,
198,
13838,
25,
317,
979,
417,
412,
1477,
2584,
628,
198,
32,
4226,
284,
2251,
3967,
290,
4633,
8405,
1262,
2116,
12,
16668,
10178,
13,
198,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064... | 2.561739 | 575 |
import cx_Freeze
import os
os.environ['TCL_LIBRARY'] = r'C:\Users\Khanh Huynh\AppData\Local\Programs\Python\Python36\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Users\Khanh Huynh\AppData\Local\Programs\Python\Python36\tcl\tk8.6'
executables = [cx_Freeze.Executable('game.py')]
cx_Freeze.setup(
name = '64... | [
11748,
43213,
62,
11146,
2736,
201,
198,
11748,
28686,
201,
198,
201,
198,
418,
13,
268,
2268,
17816,
4825,
43,
62,
40347,
49,
13153,
20520,
796,
374,
6,
34,
7479,
14490,
59,
42,
7637,
71,
11256,
2047,
71,
59,
22322,
59,
14565,
59,
... | 2.182203 | 236 |
from wordcloud import WordCloud
import jieba
import matplotlib.pyplot as plt
xiaozhai = ['', '', '', '', '',
'', 'CoCo', '', '5', '82C',
'', '', '', '', '',
'', '', '', '', '',
'', '', '', '',
'', '', '0057',
'M12', '',
''
... | [
6738,
1573,
17721,
1330,
9678,
18839,
201,
198,
11748,
474,
494,
7012,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
201,
198,
36072,
8590,
44488,
796,
37250,
3256,
705,
3256,
705,
3256,
705,
3256,
705,
... | 1.840874 | 641 |
import logging
import json
import warnings
import time
import datetime as dt
from ast import literal_eval as make_tuple
from flask import jsonify, abort, Response, request
from server import app, cln_client
from cloudant.error import CloudantException, ResultException
from cloudant.query import Query
import yfinanc... | [
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
14601,
198,
11748,
640,
198,
11748,
4818,
8079,
355,
288,
83,
198,
6738,
6468,
1330,
18875,
62,
18206,
355,
787,
62,
83,
29291,
198,
198,
6738,
42903,
1330,
33918,
1958,
11,
15614,
11,
... | 3.620968 | 124 |
from setuptools import setup
setup(
name='pymodoro',
version='0.4',
packages=['pymodoro'],
package_data={'pymodoro': ['data/*']},
entry_points={
"console_scripts": [
"pymodoro = pymodoro.pymodoro:main",
"pymodoroi3 = pymodoro.pymodoroi3:main"
]
},
)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
9078,
4666,
16522,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
19,
3256,
198,
220,
220,
220,
10392,
28,
17816,
9078,
4666,
16522,
6,
4357,
... | 2.006369 | 157 |
from django.conf import settings
from ralph.apps import RalphAppConfig
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
374,
17307,
13,
18211,
1330,
20993,
4677,
16934,
628
] | 4 | 18 |
#! /usr/bin/python
# -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals
from MDP import MDP
import version23
__author__ = 'fyabc'
# random.seed(0)
if __name__ == '__main__':
test()
| [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
6738,
337,
6322,
1330,
337,
6322... | 2.511364 | 88 |
#!/usr/bin/env python
import os
import glob
import shutil
import pytest
import hypothesis.strategies as st
from hypothesis import given, settings
from radical.entk import Task
from radical.entk import states
import radical.entk.exceptions as ree
# Hypothesis settings
settings.register_profile("travis", ma... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
15095,
198,
11748,
4423,
346,
198,
11748,
12972,
9288,
198,
198,
11748,
14078,
13,
2536,
2397,
444,
355,
336,
198,
6738,
220,
220,
14078,
220,
220,
1330,
... | 1.651513 | 8,689 |
from enum import Enum
picross = Picross([Clues(1,1,1),Clues(1,1),Clues(1,2),Clues(5),Clues(1,1,1)],
[Clues(1,2), Clues(3), Clues(1,2),Clues(3),Clues(1,3)])
print(picross)
picross.solve()
| [
6738,
33829,
1330,
2039,
388,
198,
198,
16564,
1214,
796,
15085,
1214,
26933,
2601,
947,
7,
16,
11,
16,
11,
16,
828,
2601,
947,
7,
16,
11,
16,
828,
2601,
947,
7,
16,
11,
17,
828,
2601,
947,
7,
20,
828,
2601,
947,
7,
16,
11,
... | 1.756303 | 119 |
'''
Copyright (C) 2016. Huawei Technologies Co., Ltd. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the MIT license.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANT... | [
7061,
6,
198,
15269,
357,
34,
8,
1584,
13,
43208,
21852,
1766,
1539,
12052,
13,
1439,
2489,
10395,
13,
198,
198,
1212,
1430,
318,
1479,
3788,
26,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
270,
739,
262,
2846,
286,
262,
... | 3.763889 | 144 |
# Generated by Django 3.1.2 on 2020-10-29 20:37
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
17,
319,
12131,
12,
940,
12,
1959,
1160,
25,
2718,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# ===============================================================================
# Copyright 2019 ross
#
# 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/LICE... | [
2,
38093,
25609,
855,
198,
2,
15069,
13130,
686,
824,
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,
1... | 4.663366 | 202 |
from __future__ import annotations
from typing import Optional
from dataclasses import dataclass
from logging import Logger
from processor.device_names import address_to_name
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
32233,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
18931,
1330,
5972,
1362,
198,
6738,
12649,
13,
25202,
62,
14933,
1330,
2209,
62,
1462,
62,
3672,
6... | 4.317073 | 41 |
from __future__ import print_function
import math
import nibabel as nib
import nrrd
import numpy as np
import operator
import os
import random
import torch
import warnings
from functools import reduce
from inputs import Image, ImageType
CHANNEL, DEPTH, HEIGHT, WIDTH = 0, 1, 2, 3
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
10688,
198,
198,
11748,
33272,
9608,
355,
33272,
198,
11748,
299,
81,
4372,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10088,
198,
11748,
28686,
198,
11748,
4738,
198,
... | 3.204301 | 93 |
from microscopium.screens import image_xpress
import collections as coll
| [
6738,
21145,
404,
1505,
13,
1416,
5681,
1330,
2939,
62,
87,
8439,
198,
11748,
17268,
355,
2927,
628,
628
] | 4 | 19 |
import pytest
from PySide2.QtCore import Qt
from PySide2.QtGui import QClipboard
from PySide2.QtTest import QTest
from node_launcher.gui.components.copy_button import CopyButton
| [
11748,
12972,
9288,
198,
6738,
9485,
24819,
17,
13,
48,
83,
14055,
1330,
33734,
198,
6738,
9485,
24819,
17,
13,
48,
83,
8205,
72,
1330,
1195,
2601,
541,
3526,
198,
6738,
9485,
24819,
17,
13,
48,
83,
14402,
1330,
1195,
14402,
198,
19... | 2.919355 | 62 |
# Copyright 2021 Google LLC. 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 a... | [
2,
15069,
33448,
3012,
11419,
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.727342 | 1,313 |
import discord
from discord.application_commands import ApplicationCommand, ApplicationCommandTree, option
tree = ApplicationCommandTree(guild_id=1234) # Replace with your guild ID, or ``None`` to commands global
client = Client(update_application_commands_at_startup=True)
client.add_application_command_tree(t... | [
11748,
36446,
198,
6738,
36446,
13,
31438,
62,
9503,
1746,
1330,
15678,
21575,
11,
15678,
21575,
27660,
11,
3038,
198,
198,
21048,
796,
15678,
21575,
27660,
7,
70,
3547,
62,
312,
28,
1065,
2682,
8,
220,
1303,
40177,
351,
534,
19806,
4... | 3.670213 | 94 |
#!/usr/bin/env python
import Tkinter
import tkMessageBox
import rwkpickle, rwkos, os, glob
from Tkinter import StringVar, IntVar, DoubleVar
pklpath = rwkos.FindFullPath('pygimp_lecturerc.pkl')
## def btnClick(self):
## self.answer = tkMessageBox.askyesno(title = "Your Choice", message = 'Please cli... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
309,
74,
3849,
198,
11748,
256,
74,
12837,
14253,
198,
11748,
374,
43021,
27729,
293,
11,
374,
43021,
418,
11,
28686,
11,
15095,
198,
198,
6738,
309,
74,
3849,
1330,
10903,... | 2.343042 | 309 |
"""
Constraint functions for grasp sampling
Author: Jeff Mahler
"""
from abc import ABCMeta, abstractmethod
import numpy as np
| [
37811,
198,
3103,
2536,
2913,
5499,
329,
13180,
19232,
198,
13838,
25,
5502,
8882,
1754,
198,
37811,
198,
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
198,
198,
11748,
299,
32152,
355,
45941,
198
] | 3.657143 | 35 |
"""Modelo de pacientes"""
# Django
from django.db import models
# Utilidades
from apis.utils.models import ModelUtil
| [
37811,
17633,
78,
390,
23503,
1153,
274,
37811,
198,
198,
2,
37770,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
7273,
346,
312,
2367,
198,
6738,
2471,
271,
13,
26791,
13,
27530,
1330,
9104,
18274,
346,
628
] | 3 | 40 |
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
651,
5239,
62,
75,
12582,
355,
4808,
628
] | 3.6 | 25 |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
29113,
29113,
7804,
21017,
198,
2,
15069,
357,
66,
828,
383,
317,
4178,
5631,
1074,
13,
1439,
2489,
10395,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.542811 | 619 |
import os
import tensorflow as tf
import numpy as np
C = 1e-13
# Predefined function to build a feedforward neural network
| [
11748,
28686,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
198,
34,
796,
352,
68,
12,
1485,
198,
198,
2,
14322,
18156,
2163,
284,
1382,
257,
3745,
11813,
17019,
3127,
198
] | 3.378378 | 37 |
#!/usr/bin/env python
# Copyright (C) 2006 British Broadcasting Corporation and Kamaelia Contributors(1)
# All Rights Reserved.
#
# You may only modify and redistribute this under the terms of any of the
# following licenses(2): Mozilla Public License, V1.1, GNU General
# Public License, V2.0, GNU Lesser Ge... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
201,
198,
2,
15069,
357,
34,
8,
4793,
3517,
32250,
10501,
290,
509,
1689,
25418,
25767,
669,
7,
16,
8,
201,
198,
2,
220,
220,
220,
220,
1439,
6923,
33876,
13,
201,
198,
2,
2... | 3.265044 | 1,479 |
import maya
from py2neo.ogm import Node
from app.graph_context import GraphContext
from .cypher_queries import get_product_by_id_query
| [
11748,
743,
64,
198,
6738,
12972,
17,
710,
78,
13,
519,
76,
1330,
19081,
198,
198,
6738,
598,
13,
34960,
62,
22866,
1330,
29681,
21947,
198,
198,
6738,
764,
948,
17042,
62,
421,
10640,
1330,
651,
62,
11167,
62,
1525,
62,
312,
62,
... | 3.066667 | 45 |
from .parser import parser
__all__ = [
'parse'
]
__version__ = '1.1.0'
| [
6738,
764,
48610,
1330,
30751,
628,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
705,
29572,
6,
198,
60,
198,
834,
9641,
834,
796,
705,
16,
13,
16,
13,
15,
6,
198
] | 2.264706 | 34 |
import pytest
from adlib.adversaries.feature_deletion import AdversaryFeatureDeletion
from sklearn import svm
from adlib.learners import SimpleLearner
from data_reader.dataset import EmailDataset
from data_reader.operations import load_dataset
def test_change_instance(feature_deletion, data):
sample = next((x ... | [
11748,
12972,
9288,
198,
6738,
512,
8019,
13,
324,
690,
3166,
13,
30053,
62,
2934,
1616,
295,
1330,
1215,
690,
560,
38816,
5005,
1616,
295,
198,
6738,
1341,
35720,
1330,
264,
14761,
198,
6738,
512,
8019,
13,
35720,
364,
1330,
17427,
1... | 2.810026 | 379 |
import plistlib
import os
import numpy as np
from PIL import Image
| [
11748,
458,
396,
8019,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
628,
628
] | 3.333333 | 21 |
# -*- coding: utf-8 -*-
from aiida.scheduler.plugins.pbspro import *
import unittest
#import logging
import uuid
text_qstat_f_to_test = """Job Id: 68350.mycluster
Job_Name = cell-Qnormal
Job_Owner = usernum1@mycluster.cluster
job_state = Q
queue = Q_express
server = mycluster
Checkpoint... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
257,
72,
3755,
13,
1416,
704,
18173,
13,
37390,
13,
79,
1443,
1676,
1330,
1635,
198,
11748,
555,
715,
395,
198,
2,
11748,
18931,
198,
11748,
334,
27112,
198,
220... | 2.114966 | 6,976 |
# Generated by Django 3.1.11 on 2021-07-27 13:18
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
1157,
319,
33448,
12,
2998,
12,
1983,
1511,
25,
1507,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.8 | 30 |
#!/usr/bin/python3
import random
import math
import numpy as np
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, LSTM
train_batches=2000
eval_batches=50
train_sequlen=32
train_inputs=1
lstm_states=6
#activation="relu"
activation=None
rec_activat... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
4738,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
27530,
1330,
24604,
1843,
198... | 2.30597 | 1,072 |
import critiquebrainz.frontend.external.musicbrainz_db.exceptions as mb_exceptions
RELATABLE_TYPES = [
'area',
'artist',
'label',
'place',
'event',
'recording',
'release',
'release-group',
'series',
'url',
'work',
'instrument'
]
RELATION_INCLUDES = [entity + '-rels' for ... | [
11748,
19976,
27825,
89,
13,
8534,
437,
13,
22615,
13,
28965,
27825,
89,
62,
9945,
13,
1069,
11755,
355,
285,
65,
62,
1069,
11755,
198,
198,
16448,
1404,
17534,
62,
9936,
47,
1546,
796,
685,
198,
220,
220,
220,
705,
20337,
3256,
198... | 2.558282 | 489 |
# Generated by Django 2.2.11 on 2020-05-07 19:13
from django.db import migrations, models
import djstripe.fields
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1157,
319,
12131,
12,
2713,
12,
2998,
678,
25,
1485,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
33565,
431,
13,
25747,
628
] | 2.948718 | 39 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 1 01:07:37 2019
@author: prasad
"""
import numpy as np
import pandas as pd
import math
import matplotlib.pyplot as plt
def get_data(column_names):
'''
Args
column_names: names of the features in dataset
Returns
train_d... | [
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,
41972,
319,
19480,
3158,
220,
352,
5534,
25,
2998,
25,
2718,
13130,
198,
198,
31,
9800,
25,
778,
292,... | 2.45864 | 2,176 |
from django.contrib.auth.decorators import login_required
from django.urls import reverse_lazy
from django.views.generic import ListView
from django.views.generic.edit import FormView
from teamspirit.catalogs.models import Product
from teamspirit.preorders.forms import AddToCartForm, DropFromCartForm
from teamspirit.p... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
62,
75,
12582,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
7343,
7680,
198,
6738,
... | 3.131818 | 220 |
# -*- coding: utf-8 -*-
""" TaskSets and tasks for the Prime & Support APIs """
import logging
import json
import random
from copy import deepcopy
from typing import Dict
from locust import tag, task, TaskSet
from utils.constants import (
INTERNAL_API_KEY,
TEST_PDF,
ZERO_UUID,
PRIME_API_KEY,
SUPPO... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
15941,
50,
1039,
290,
8861,
329,
262,
5537,
1222,
7929,
23113,
37227,
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
4738,
198,
6738,
4866,
1330,
2769,
30073,
19... | 2.483871 | 217 |
#######################################################################################################################
# Author: Richie Magnotti
#
# Goal of code is to demonstrate sorting via bubble sort algorithm
################################################################... | [
29113,
29113,
29113,
14468,
4242,
21017,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 4.232323 | 99 |
"""Data and functions for dealing with cell contents."""
# pylint: disable=no-member, too-many-instance-attributes, too-many-arguments
import numpy as np
from skimage import util
from skimage.transform import probabilistic_hough_line
from lib.util import Crop, Offset, intersection
| [
37811,
6601,
290,
5499,
329,
7219,
351,
2685,
10154,
526,
15931,
198,
198,
2,
279,
2645,
600,
25,
15560,
28,
3919,
12,
19522,
11,
1165,
12,
21834,
12,
39098,
12,
1078,
7657,
11,
1165,
12,
21834,
12,
853,
2886,
628,
198,
11748,
299,
... | 3.5 | 82 |
"""uuid ids
Revision ID: b6a452c73bc3
Revises: 6df0d5aac594
Create Date: 2017-12-06 20:57:39.660665
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b6a452c73bc3'
down_revision = '6df0d5aac594'
branch_labels = None
depends_on = None
| [
37811,
12303,
312,
220,
2340,
198,
198,
18009,
1166,
4522,
25,
275,
21,
64,
37730,
66,
4790,
15630,
18,
198,
18009,
2696,
25,
718,
7568,
15,
67,
20,
64,
330,
46438,
198,
16447,
7536,
25,
2177,
12,
1065,
12,
3312,
1160,
25,
3553,
2... | 2.370968 | 124 |
# vim: ts=2 sw=2 noexpandtab
from __future__ import unicode_literals
import requests
from .AbstractModule import AbstractModule
reddit = RedditModule()
| [
2,
43907,
25,
40379,
28,
17,
1509,
28,
17,
645,
11201,
392,
8658,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
7007,
198,
6738,
764,
23839,
26796,
1330,
27741,
26796,
628,
198,
198,
10748,
796,
10750,
2... | 3.522727 | 44 |
from __future__ import unicode_literals
__version__ = '2020.03.06'
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
834,
9641,
834,
796,
705,
42334,
13,
3070,
13,
3312,
6,
198
] | 2.833333 | 24 |
"""Table based reclassify triggered by probability threshold."""
import argparse
import os
import logging
import hashlib
from ecoshard import geoprocessing
from ecoshard import taskgraph
import pandas
import numpy
from osgeo import gdal
gdal.SetCacheMax(2**27)
logging.basicConfig(
level=logging.DEBUG,
format... | [
37811,
10962,
1912,
302,
4871,
1958,
13973,
416,
12867,
11387,
526,
15931,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
12234,
8019,
198,
198,
6738,
9940,
3768,
446,
1330,
30324,
305,
919,
278,
198,
6738,
994... | 2.277506 | 1,636 |
import pytest
import midas
import ke
import re
JABBERWOCKY = """\
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious... | [
11748,
12972,
9288,
198,
11748,
3095,
292,
198,
11748,
885,
198,
11748,
302,
628,
628,
628,
198,
41,
6242,
13246,
54,
11290,
56,
796,
37227,
59,
198,
6,
5080,
292,
9547,
328,
11,
290,
262,
1017,
342,
88,
284,
1158,
198,
11633,
21486... | 2.857143 | 364 |
from future import standard_library
standard_library.install_aliases()
from androguard import session
from androguard.core.bytecodes.dvm import *
from androguard.decompiler.decompiler import *
from androguard.core.androconf import CONF
def get_default_session():
"""
Return the default Session from the c... | [
6738,
2003,
1330,
3210,
62,
32016,
198,
198,
20307,
62,
32016,
13,
17350,
62,
7344,
1386,
3419,
198,
6738,
290,
3828,
84,
446,
1330,
6246,
198,
6738,
290,
3828,
84,
446,
13,
7295,
13,
26327,
40148,
13,
67,
14761,
1330,
1635,
198,
67... | 2.307073 | 1,739 |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
# -------------------------------------------------------------------------
# This is a sample controller
# - index is the default action of any application
# - user is required for authentication and authorization
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
428,
2393,
318,
2716,
739,
1171,
7386,
290,
345,
460,
779,
1231,
11247,
198,
198,
2,
16529,
45537,
198,
2,
770,
318,
257,
6291,
10444,
198,
2,
532,
6376,
318,
262... | 2.023426 | 8,623 |
from collections import OrderedDict
from enum import Enum
TO_AUTOR = 0
TO_REDAKTOR = 1
TO_INNY = 2
TO_TLUMACZ = 3
TO_KOMENTATOR = 4
TO_RECENZENT = 5
TO_OPRACOWAL = 6
TO_REDAKTOR_TLUMACZENIA = 7
TYP_OGOLNY_DO_PBN = {
TO_AUTOR: "AUTHOR",
TO_REDAKTOR: "EDITOR",
TO_TLUMACZ: "TRANSLATOR",
TO_REDAKTOR_TLUMA... | [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
33829,
1330,
2039,
388,
198,
198,
10468,
62,
39371,
1581,
796,
657,
198,
10468,
62,
22083,
10206,
32961,
796,
352,
198,
10468,
62,
1268,
12805,
796,
362,
198,
10468,
62,
14990,
5883,
... | 1.833898 | 1,180 |
import csv
from datetime import datetime, timedelta
import random
import string
import os
from os.path import expanduser
from pathlib import Path
from monitor.dbt_runner import DbtRunner
import click
any_type_columns = ['date', 'null_count', 'null_percent']
FILE_DIR = os.path.dirname(__file__)
if __name__... | [
11748,
269,
21370,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
11748,
4738,
198,
11748,
4731,
198,
11748,
28686,
198,
6738,
28686,
13,
6978,
1330,
4292,
7220,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
5671,
13,
... | 3.04386 | 114 |
from typing import List, T
| [
6738,
19720,
1330,
7343,
11,
309,
628
] | 4 | 7 |
import requests
import logging
import math
import xbmcaddon
from xbmcgui import ListItem
from xbmcplugin import addDirectoryItem, endOfDirectory
from resources.lib.constants.url import BASE_URL, SEARCH_PATH
from resources.lib.router_factory import get_router_instance
from resources.lib.routes.episodelist import episode... | [
11748,
7007,
198,
11748,
18931,
198,
11748,
10688,
198,
11748,
2124,
20475,
66,
48078,
198,
6738,
2124,
20475,
66,
48317,
1330,
7343,
7449,
198,
6738,
2124,
20475,
66,
33803,
1330,
751,
43055,
7449,
11,
886,
5189,
43055,
198,
6738,
4133,
... | 3.19685 | 127 |
from setuptools import setup, Extension
setup(name='arm_now',
version='1.2',
author='@chaign_c',
url='https://github.com/nongiach/arm_now',
packages=['arm_now'],
py_modules=['arm_now'],
entry_points = {
'console_scripts': [
'arm_now = arm_now:... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
27995,
198,
198,
40406,
7,
3672,
11639,
1670,
62,
2197,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
2196,
11639,
16,
13,
17,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
1772,
11639,
31,
... | 1.748555 | 346 |
from astropy.table import Table
from collections import OrderedDict
import numpy as np
from .spectrum import Spectrum1D
from copy import deepcopy
from scipy import signal
def rebin_spec(spec, n_rebin):
"""
Sum n_rebin pixels together
"""
n_new = len(spec.dispersion) // n_rebin
n_orig = n_new * n_re... | [
6738,
6468,
28338,
13,
11487,
1330,
8655,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
4443,
6582,
1330,
27217,
16,
35,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
629,
541,
88,
... | 2.266892 | 296 |
# -*- coding: utf-8 -*-
"""
This code evaluates the outputs from calibrated BusSim
@author: geomlk
"""
import numpy as np
import matplotlib.pyplot as plt
import pickle
import os
os.chdir("/Users/minhkieu/Documents/Github/dust/Projects/ABM_DA/bussim/")
'''
Step 1: Load calibration results
'''
'''
Step 2: Load syntheti... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
1212,
2438,
47850,
262,
23862,
422,
48050,
5869,
8890,
198,
31,
9800,
25,
4903,
296,
75,
74,
198,
37811,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603... | 2.991342 | 231 |
# -*- coding: utf-8 -*-
'''
Created on 15 feb. 2015
@author: mohamed seghilani
'''
import opencavity
import webbrowser
import platform
#if __name__ == '__main__':
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
41972,
319,
1315,
730,
65,
13,
1853,
198,
198,
31,
9800,
25,
285,
1219,
2434,
384,
456,
346,
3216,
198,
7061,
6,
198,
11748,
1280,
66,
615,
414,
198,
... | 2.5 | 66 |
from .base_thermal import BaseThermal
from .isothermal import Isothermal
from .lumped import Lumped
from .x_full import OneDimensionalX
from . import pouch_cell
| [
6738,
764,
8692,
62,
490,
7617,
1330,
7308,
35048,
7617,
198,
6738,
764,
271,
49723,
1330,
1148,
49723,
198,
6738,
764,
75,
27073,
1330,
406,
27073,
198,
6738,
764,
87,
62,
12853,
1330,
1881,
35,
16198,
55,
198,
6738,
764,
1330,
36594... | 3.577778 | 45 |
'''
http://insight.bitpay.com/
'''
import logging
import requests
import time
from lib import config, exceptions, util
bitcoin_rpc_session = None
| [
7061,
6,
198,
4023,
1378,
1040,
432,
13,
2545,
15577,
13,
785,
14,
198,
7061,
6,
198,
11748,
18931,
198,
11748,
7007,
198,
11748,
640,
198,
198,
6738,
9195,
1330,
4566,
11,
13269,
11,
7736,
198,
198,
35395,
62,
81,
14751,
62,
29891,... | 3.217391 | 46 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
if __name__ == "__main__":
products = getHotProducts("https://www.sparkfun.com/categories/top?per_page=400")
exportToCSV(products) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12... | 2.617978 | 89 |
from django.urls import path
from . import views
app_name = 'merchant'
urlpatterns = [
path('', views.merchant, name='merchant'),
path('makanan', views.makanan, name='makanan'),
path('makanan/search_makanan', views.search_makanan, name='search_makanan'),
path('search_merchant', views.search_m... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
201,
198,
6738,
764,
1330,
5009,
201,
198,
201,
198,
1324,
62,
3672,
796,
705,
647,
8907,
6,
201,
198,
201,
198,
6371,
33279,
82,
796,
685,
201,
198,
220,
220,
220,
3108,
10786,
3256,
... | 2.55157 | 223 |
"""Worker application.
It calls an external slow task and send its output, line by line, as "log"
events through SocketIO. The web page will then print the lines.
"""
# Disable the warning because eventlet must patch the standard library as soon
# as possible.
from communication import (CELERY,
... | [
37811,
12468,
263,
3586,
13,
198,
198,
1026,
3848,
281,
7097,
3105,
4876,
290,
3758,
663,
5072,
11,
1627,
416,
1627,
11,
355,
366,
6404,
1,
198,
31534,
832,
47068,
9399,
13,
383,
3992,
2443,
481,
788,
3601,
262,
3951,
13,
198,
37811... | 2.909449 | 254 |
#! /usr/bin/env python2.7
# -*- coding: latin-1 -*-
from database import User
from database import ApiKey
from flask_principal import Permission
from flask_principal import RoleNeed
admin_permission = Permission(RoleNeed('admin'))
def map_api_key_to_user(key):
"""
Take an input of an API key and return a Use... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
2,
532,
9,
12,
19617,
25,
3042,
259,
12,
16,
532,
9,
12,
198,
198,
6738,
6831,
1330,
11787,
198,
6738,
6831,
1330,
5949,
72,
9218,
198,
6738,
42903,
62,
1050,
1939,... | 2.693467 | 199 |
"""
Queries in this module have a shared 'after' query,
which lets Graphql paginate
"""
from gql import gql # type: ignore[import]
query_contributed_to: gql = gql(
r"""query ($after: String) {
viewer {
repositoriesContributedTo(first: 100, after: $after, contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, RE... | [
37811,
198,
4507,
10640,
287,
428,
8265,
423,
257,
4888,
705,
8499,
6,
12405,
11,
198,
4758,
8781,
29681,
13976,
42208,
4559,
198,
37811,
198,
198,
6738,
308,
13976,
1330,
308,
13976,
220,
1303,
2099,
25,
8856,
58,
11748,
60,
628,
198... | 1.932455 | 607 |
"""
``GribFile`` class that implements a GRIB file that closes itself and its
messages when it is no longer needed.
Author: Daniel Lee, DWD, 2014
"""
import gribapi
from gribmessage import GribMessage
| [
37811,
198,
15506,
38,
822,
8979,
15506,
1398,
326,
23986,
257,
402,
7112,
33,
2393,
326,
20612,
2346,
290,
663,
198,
37348,
1095,
618,
340,
318,
645,
2392,
2622,
13,
198,
198,
13838,
25,
7806,
5741,
11,
360,
22332,
11,
1946,
198,
3... | 3.457627 | 59 |
# Generated by Django 2.1.4 on 2019-02-21 03:11
from django.db import migrations
provinces = (
('H Ni', 'Thnh Ph'),
('H Giang', 'Tnh'),
('Cao Bng', 'Tnh'),
('Bc Kn', 'Tnh'),
('Tuyn Quang', 'Tnh'),
('Lo Cai', 'Tnh'),
('in Bin', 'Tnh'),
('Lai Chu', 'Tnh'),
('Sn La', 'Tnh'),
('Yn ... | [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
19,
319,
13130,
12,
2999,
12,
2481,
7643,
25,
1157,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
198,
198,
1676,
7114,
728,
796,
357,
198,
220,
220,
220,
19203,
39,
11556,
32... | 1.693431 | 959 |
cube = lambda x: pow(x,3)
| [
40296,
796,
37456,
2124,
25,
7182,
7,
87,
11,
18,
8,
198
] | 2.166667 | 12 |
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
import io
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
import tensorflow_datasets as tfds
from tensorflow import keras
from tensorflow.keras import layers
# Make sure we don't get any GPU errors
physical_devices = tf.config.list_physic... | [
11748,
28686,
198,
198,
418,
13,
268,
2268,
14692,
10234,
62,
8697,
47,
62,
23678,
62,
25294,
62,
2538,
18697,
8973,
796,
366,
17,
1,
198,
198,
11748,
33245,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
2603,
29487,
8019,
13... | 2.661818 | 275 |
from fabric.api import *
env.user = 'ptigas'
env.hosts = ['hocus.io']
| [
6738,
9664,
13,
15042,
1330,
1635,
198,
198,
24330,
13,
7220,
796,
705,
457,
328,
292,
6,
198,
24330,
13,
4774,
82,
796,
37250,
71,
10901,
13,
952,
20520,
198
] | 2.366667 | 30 |
from src.helpers.staticHelper import StaticHelper
from src.routes.interfaces.iEntityIndexerLogic import IEntityIndexerLogic
from src.logics.interfaces.iIndexingAlgorithm import IIndexingAlgorithm
from src.logics.interfaces.iEntityData import IEntityData
| [
6738,
12351,
13,
16794,
364,
13,
12708,
47429,
1330,
36125,
47429,
198,
6738,
12351,
13,
81,
448,
274,
13,
3849,
32186,
13,
72,
32398,
15732,
263,
11187,
291,
1330,
314,
32398,
15732,
263,
11187,
291,
198,
6738,
12351,
13,
6404,
873,
... | 3.4 | 75 |
from server.connection import Base
from sqlalchemy import Column, String
from sqlalchemy.dialects.postgresql import UUID
| [
6738,
4382,
13,
38659,
1330,
7308,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
10903,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
7353,
34239,
13976,
1330,
471,
27586,
628
] | 3.8125 | 32 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2017 Alibaba Group Holding 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/LICENS... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
7358,
12,
5539,
41992,
4912,
31703,
12052,
13,
198,
2,
220,
198,
2,
49962,
739,
262,
24843,
13789,
11,
1062... | 3.623711 | 194 |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='arrow',
version='0.4.4',
description='Better dates and times for Python',
url='http://crsmithdev.com/arrow',
author='Chris Smith',
author_email="crsmithdev@gmail.com",
license='Apache... | [
28311,
25,
198,
220,
220,
220,
422,
900,
37623,
10141,
1330,
9058,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
6018,
3256,
198,
220,
... | 2.615836 | 341 |
from typing import List
from decimal import Decimal
from yayFinPy.stock import Stock
import pandas as pd
if __name__ == '__main__':
success = []
success.append(test_constructor())
success.append(test_constructor_failure())
success.append(test_stock_attributes())
success.append(test_stock_splits())
success.append... | [
6738,
19720,
1330,
7343,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
331,
323,
18467,
20519,
13,
13578,
1330,
10500,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
... | 3.044776 | 201 |
#! /usr/bin/env python
import os
import rospy
import rospkg
from readbag import restore
from qt_gui.plugin import Plugin
from python_qt_binding.QtCore import Qt
from python_qt_binding import loadUi
from python_qt_binding.QtGui import QFileDialog, QGraphicsView, QIcon, QWidget
from PyQt4 import QtGui, QtCore
from exam... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28686,
198,
11748,
686,
2777,
88,
198,
11748,
686,
2777,
10025,
198,
198,
6738,
1100,
21454,
1330,
11169,
198,
6738,
10662,
83,
62,
48317,
13,
33803,
1330,
42636,
198,
198,
67... | 3.042017 | 119 |
from distutils.core import setup
setup(
name='Flask-SimpleSQLA',
version='1.0',
url='http://github.com/blaxpirit/flask-simplesqla',
license='BSD',
author="Oleh Prypin",
author_email='blaxpirit@gmail.com',
description="Extension providing basic support of SQLAlchemy in Flask applications",
... | [
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
7414,
2093,
12,
26437,
17861,
32,
3256,
198,
220,
220,
220,
2196,
11639,
16,
13,
15,
3256,
198,
220,
220,
220,
19016,
11639,
4023,
1378,
1... | 2.616438 | 365 |
# --- Day 20: Jurassic Jigsaw ---
# The high-speed train leaves the forest and quickly carries you south. You can even see a desert in the distance!
# Since you have some spare time, you might as well see if there was anything interesting in the image the Mythical
# Information Bureau satellite captured.
#
# After deco... | [
2,
11420,
3596,
1160,
25,
39577,
449,
45636,
11420,
198,
2,
383,
1029,
12,
12287,
4512,
5667,
262,
8222,
290,
2952,
10732,
345,
5366,
13,
921,
460,
772,
766,
257,
10326,
287,
262,
5253,
0,
198,
2,
4619,
345,
423,
617,
13952,
640,
... | 2.401549 | 2,453 |
import logging
import os
import pickle
from typing import NamedTuple
import gym
from gym import Wrapper, GoalEnv
from gym.wrappers import FlattenObservation, TimeLimit, TransformReward, FilterObservation
from runstats import Statistics
import torch
from envs.gym_mujoco.custom_wrappers import DropGoalEnvsAbsoluteLocat... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
2298,
293,
198,
6738,
19720,
1330,
34441,
51,
29291,
198,
198,
11748,
11550,
198,
6738,
11550,
1330,
27323,
2848,
11,
25376,
4834,
85,
198,
6738,
11550,
13,
29988,
11799,
1330,
1610,
41769,
313... | 2.467675 | 727 |
from typing import List, Optional, TypeVar
import torch
import torch.nn as nn
from torecsys.inputs.base import BaseInput
| [
6738,
19720,
1330,
7343,
11,
32233,
11,
5994,
19852,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
198,
6738,
26197,
6359,
893,
13,
15414,
82,
13,
8692,
1330,
7308,
20560,
628
] | 3.444444 | 36 |
# This file need to be send to the cluster via .addPyFile to handle the pickle problem
# This is outside the optimus folder on purpose because it cause problem importing optimus when using de udf.
# This can not import any optimus file unless it's imported via addPyFile
import datetime
import math
import os
import re
f... | [
2,
770,
2393,
761,
284,
307,
3758,
284,
262,
13946,
2884,
764,
2860,
20519,
8979,
284,
5412,
262,
2298,
293,
1917,
198,
2,
770,
318,
2354,
262,
6436,
385,
9483,
319,
4007,
780,
340,
2728,
1917,
33332,
6436,
385,
618,
1262,
390,
334,... | 2.030842 | 10,116 |