content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from qgis.core import *
import networkx as nx
import network as net
import time
from test.utilities import get_qgis_app
QGIS_APP = get_qgis_app()
inSmallNetworkShp = r'C:\JL\Testing\pyGNAT\NetworkFeatures\In\NHD_SmallNetwork.shp'
inMedNetworkShp = r'C:\JL\Testing\pyGNAT\NetworkFeatures\In\NHD_MedNetwork.shp'
inBraids... | [
6738,
10662,
70,
271,
13,
7295,
1330,
1635,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
3127,
355,
2010,
198,
11748,
640,
198,
198,
6738,
1332,
13,
315,
2410,
1330,
651,
62,
80,
70,
271,
62,
1324,
198,
198,
48,
38,
1797,
62,
... | 2.127435 | 1,899 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from extendes.rom import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
9117,
274,
13,
398,
1330,
1635,
628,
628,
628,
198
] | 2.25 | 36 |
import pytest
import py_cui
test_string_A = "Hello world, etc 123 @ testing @ ++-- Test"
test_string_B = " Test string number two Space"
test_string_C = "Hi"
dummy_grid = py_cui.grid.Grid(3,3,30,30)
dummy_widget = py_cui.widgets.Widget('1', 'Test', dummy_grid, 1,1,1,1,1,0)
dummy_renderer = py_cui.renderer.Render... | [
11748,
12972,
9288,
198,
11748,
12972,
62,
66,
9019,
628,
198,
9288,
62,
8841,
62,
32,
796,
366,
15496,
995,
11,
3503,
17031,
2488,
4856,
2488,
19969,
438,
6208,
1,
198,
9288,
62,
8841,
62,
33,
796,
366,
220,
220,
220,
220,
6208,
... | 2.342657 | 143 |
# Condições aninhadas comparação a repetição aninhada | [
2,
9724,
72,
16175,
127,
113,
274,
281,
259,
18108,
292,
552,
3301,
16175,
28749,
257,
46152,
72,
16175,
28749,
281,
259,
71,
4763
] | 2.208333 | 24 |
# Copyright (c) 2019 ISciences, LLC.
# All rights reserved.
#
# WSIM is 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 applicab... | [
2,
15069,
357,
66,
8,
13130,
3180,
979,
3007,
11,
11419,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
25290,
3955,
318,
11971,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
198,
2,
921,
743,
... | 3.732 | 250 |
import battle_simulation.constants as const
from battle_simulation.Pokemon import Pokemon
from battle_simulation.battle_common import unittest_failure_msg
import unittest
import os
from pathlib import Path
import pandas as pd
import json
import copy
| [
11748,
3344,
62,
14323,
1741,
13,
9979,
1187,
355,
1500,
198,
6738,
3344,
62,
14323,
1741,
13,
48034,
1330,
14878,
198,
6738,
3344,
62,
14323,
1741,
13,
38471,
62,
11321,
1330,
555,
715,
395,
62,
32165,
495,
62,
19662,
198,
11748,
555... | 3.746269 | 67 |
## Program: VMTK
## Language: Python
## Date: January 10, 2018
## Version: 1.4
## Copyright (c) Richard Izzo, Luca Antiga, All rights reserved.
## See LICENSE file for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNES... | [
2235,
6118,
25,
569,
13752,
42,
198,
2235,
15417,
25,
220,
11361,
198,
2235,
7536,
25,
220,
220,
220,
220,
220,
3269,
838,
11,
2864,
198,
2235,
10628,
25,
220,
220,
352,
13,
19,
198,
198,
2235,
220,
220,
15069,
357,
66,
8,
6219,
... | 1.846637 | 1,115 |
import json
from . import exceptions
class CommandsConfigDefaults():
"""Default configuration values"""
json_cfg_file = "config/commands_settings.json"
if __name__ == '__main__':
cfg = CommandsConfig()
print(cfg.get_account_source_infos("al"))
print(cfg.roles.keys())
| [
11748,
33918,
201,
198,
201,
198,
6738,
764,
1330,
13269,
201,
198,
201,
198,
201,
198,
201,
198,
4871,
49505,
16934,
7469,
13185,
33529,
201,
198,
220,
220,
220,
37227,
19463,
8398,
3815,
37811,
201,
198,
220,
220,
220,
33918,
62,
37... | 2.618644 | 118 |
from PIL import Image, ImageDraw
from PIL import ImageFont
from os_tools import tools
def load_img(img_path):
"""Will load image to a variable.
Parameters:
:param img_path: the path to the image file
:return image file to work on
"""
img = Image.open(img_path)
return img.convert('RGBA')
... | [
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
198,
6738,
350,
4146,
1330,
7412,
23252,
198,
6738,
28686,
62,
31391,
1330,
4899,
628,
198,
4299,
3440,
62,
9600,
7,
9600,
62,
6978,
2599,
198,
220,
220,
220,
37227,
8743,
3440,
2939,
284,... | 2.912177 | 1,355 |
"""
Flask-Arango
-------------
Flask extension that provides integration with the Arango graph database using
the pyArango library. Under initial development.
"""
from setuptools import setup
setup(
name='Flask-Arango',
version='0.1.1',
url='https://github.com/grucin/flask-arango',
license='Apache L... | [
37811,
198,
7414,
2093,
12,
3163,
14208,
198,
32501,
198,
198,
7414,
2093,
7552,
326,
3769,
11812,
351,
262,
943,
14208,
4823,
6831,
1262,
198,
1169,
12972,
3163,
14208,
5888,
13,
4698,
4238,
2478,
13,
198,
198,
37811,
198,
6738,
900,
... | 2.73031 | 419 |
#!/usr/bin/env python3
from warnings import simplefilter
import numpy
import plotly
from plotly.offline import plot
import plotly.graph_objs as go
import h5py
import click
import colorsys
from md_davis.common.stats import *
class TimeSeries:
"""Create a time series object from data like RMSD and radius of gyrat... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
14601,
1330,
2829,
24455,
198,
11748,
299,
32152,
198,
11748,
7110,
306,
198,
6738,
7110,
306,
13,
2364,
1370,
1330,
7110,
198,
11748,
7110,
306,
13,
34960,
62,
672,
845... | 2.602151 | 744 |
#!/usr/bin/env python
from sulley import *
from ap_requests import *
from optparse import OptionParser
import re
import socket
import struct
import time
# Assume that wireless card is in monitor mode on appropriate channel
# Saves from lot of dependencies (lorcon, pylorcon...)
###############
if __name__ == '__... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
33154,
1636,
1330,
1635,
198,
6738,
2471,
62,
8897,
3558,
1330,
1635,
198,
6738,
2172,
29572,
1330,
16018,
46677,
198,
198,
11748,
302,
198,
11748,
17802,
198,
11748,
2878,
19... | 2.520227 | 1,409 |
"""test page for Flask and Heroku"""
from flask import Flask, render_template
app = Flask(__name__)
# make the application
#APP = Flask(__name__)
# app = Flask(__name__)
# make the route
@app.route("/")
# # make second route
# @app.route("/about")
# # func for about
# def preds():
# return render_te... | [
37811,
9288,
2443,
329,
46947,
290,
2332,
11601,
37811,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
628,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
2,
787,
262,
3586,
198,
2,
24805,
796,
46947,
7,
834,
3672,
834,
8,
... | 2.857143 | 119 |
#!/usr/bin/env python
#棄却法でオラクル分布から重みを生成する
import numpy as np
import numpy.matlib
import random
#活性化関数
with open('./temp/setting.py') as f:
exec(f.read())
#ファイル読み込み
dist = np.loadtxt('./output/numerical-ridgelet.txt', usecols = range(J))
Max = np.max(np.abs(dist))
Min = np.min(np.abs(dist))
j = 0
tries = 0
a = ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
162,
96,
226,
39355,
112,
37345,
243,
30640,
20513,
9263,
14099,
9202,
26344,
228,
30585,
225,
27370,
36853,
34932,
235,
2515,
123,
31758,
37955,
22755,
238,
33623,
25748,
198,
1... | 1.83871 | 1,085 |
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
2864,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330... | 2.560247 | 12,648 |
from peco.template import TextNode
from .read_whitespace import read_whitespace
from .syntax_error import SyntaxError
| [
198,
6738,
613,
1073,
13,
28243,
1330,
8255,
19667,
198,
6738,
764,
961,
62,
1929,
2737,
10223,
1330,
1100,
62,
1929,
2737,
10223,
198,
6738,
764,
1837,
41641,
62,
18224,
1330,
26375,
897,
12331,
628
] | 3.428571 | 35 |
import gym
import unittest
import numpy as np
from connect_four.evaluation.board import Board
from connect_four.evaluation.victor.evaluator import evaluator
from connect_four.envs.connect_four_env import ConnectFourEnv
if __name__ == '__main__':
unittest.main()
| [
11748,
11550,
198,
11748,
555,
715,
395,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
2018,
62,
14337,
13,
18206,
2288,
13,
3526,
1330,
5926,
198,
6738,
2018,
62,
14337,
13,
18206,
2288,
13,
32433,
273,
13,
18206,
84,
1352... | 3.044944 | 89 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-03 11:46
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
18,
319,
2177,
12,
2919,
12,
3070,
1367,
25,
3510,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.883117 | 77 |
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
from matplotlib import style
from os import path
import numpy as np
style.use('ggplot')
rcParams.update({'font.size': 20})
fig, axes = plt.subplots(nrows=8, ncols=1, sharex=True, figsize=(30, 30))
df7 = pd.read_csv('Algonquin_Citygate... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
1330,
48321,
10044,
4105,
198,
6738,
2603,
29487,
8019,
1330,
3918,
198,
6738,
28686,
1330,
3108,
198,
11748,
2... | 2.32049 | 1,142 |
from cts.taps.corridor import get_menu
from cts.taps.dryhop import get_menu | [
6738,
269,
912,
13,
83,
1686,
13,
10215,
44425,
1330,
651,
62,
26272,
198,
6738,
269,
912,
13,
83,
1686,
13,
39140,
8548,
1330,
651,
62,
26272
] | 2.777778 | 27 |
# Initial cleaning the comment data
# Load the Pandas libraries with alias 'pd'
import pandas as pd
from os import listdir
import re
import html.parser
# Get names in dir:
lFiles = listdir(r'Data\Archive')
lFiles.pop()
df = pd.DataFrame()
lFiles = lFiles[40:]
print(str(lFiles[0]) + str(lFiles[-1]))
for f in lFiles:... | [
2,
20768,
12724,
262,
2912,
1366,
198,
198,
2,
8778,
262,
16492,
292,
12782,
351,
16144,
705,
30094,
6,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
28686,
1330,
1351,
15908,
198,
11748,
302,
198,
11748,
27711,
13,
48610,
198,
198... | 2.140337 | 1,304 |
n1 = int(input('Digite um número: '))
d = n1 * 2
t = n1 * 3
r = n1 ** (1 / 2)
print(f"""Você digitou: {n1}! \nO dobro deste número é: {d} \nO triplo deste número é: {t}
A raiz deste número é: {r:.2f}""")
| [
77,
16,
796,
493,
7,
15414,
10786,
19511,
578,
23781,
299,
21356,
647,
78,
25,
705,
4008,
198,
198,
67,
796,
299,
16,
1635,
362,
198,
83,
796,
299,
16,
1635,
513,
198,
81,
796,
299,
16,
12429,
357,
16,
1220,
362,
8,
198,
198,
... | 1.791304 | 115 |
#
# This contains utilities to convert the starttime endtime (and
# result_interval) into a series of result dates. These result dates
# are put into an array, and then processing is done for each expected
# result date. This may need to be generalized to calculated expected result datetimes that
# are not one-day-mode... | [
2,
198,
2,
770,
4909,
20081,
284,
10385,
262,
923,
2435,
886,
2435,
357,
392,
198,
2,
1255,
62,
3849,
2100,
8,
656,
257,
2168,
286,
1255,
9667,
13,
2312,
1255,
9667,
198,
2,
389,
1234,
656,
281,
7177,
11,
290,
788,
7587,
318,
17... | 2.889524 | 525 |
import json
from pandajedi.jedimsgprocessor.base_msg_processor import BaseMsgProcPlugin
from pandajedi.jedimsgprocessor.tape_carousel_msg_processor import TapeCarouselMsgProcPlugin
from pandajedi.jedimsgprocessor.hpo_msg_processor import HPOMsgProcPlugin
from pandajedi.jedimsgprocessor.processing_msg_processor import ... | [
11748,
33918,
198,
198,
6738,
19798,
1228,
13740,
13,
73,
276,
12078,
70,
41341,
13,
8692,
62,
19662,
62,
41341,
1330,
7308,
50108,
2964,
66,
37233,
198,
6738,
19798,
1228,
13740,
13,
73,
276,
12078,
70,
41341,
13,
83,
1758,
62,
7718,... | 3.34104 | 173 |
from storyhub.sdk.service.Configuration import Configuration
from storyhub.sdk.service.Service import Service
from storyhub.sdk.service.ServiceObject import ServiceObject
class ServiceData(ServiceObject):
"""
This represents an entire service stored within the Storyscript Hub.
"""
@classmethod
d... | [
6738,
1621,
40140,
13,
21282,
74,
13,
15271,
13,
38149,
1330,
28373,
198,
6738,
1621,
40140,
13,
21282,
74,
13,
15271,
13,
16177,
1330,
4809,
198,
6738,
1621,
40140,
13,
21282,
74,
13,
15271,
13,
16177,
10267,
1330,
4809,
10267,
628,
... | 3.149171 | 181 |
from abc import ABCMeta, abstractmethod
NOT_IMPLEMENTED = "You should implement this."
| [
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
201,
198,
201,
198,
11929,
62,
3955,
16437,
10979,
1961,
796,
366,
1639,
815,
3494,
428,
526,
201,
198,
201,
198,
201,
198
] | 2.96875 | 32 |
from django.urls import path
from .views import (FreeArticleDetailView, FreeArticleListView,
PremiumArticleDetailView, PremiumArticleListView,
SearchResultsListView)
urlpatterns = [
path('free/', FreeArticleListView.as_view(), name='free_article_list'),
path('premium/',... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
33571,
1330,
357,
11146,
14906,
11242,
603,
7680,
11,
3232,
14906,
8053,
7680,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 2.733333 | 240 |
import time
from timedlist import TimedList
# Create a TimedList object that will remove items older than 10 seconds within
# 3% of maxtime
tl1 = TimedList(maxtime=10, filled_percent=3.0)
tl2 = TimedList(maxtime=10, filled_percent=3.0)
for i in range(20):
tl1.append(time.time(), i)
time.sleep(0.75)
print(... | [
11748,
640,
198,
6738,
28805,
4868,
1330,
5045,
276,
8053,
198,
198,
2,
13610,
257,
5045,
276,
8053,
2134,
326,
481,
4781,
3709,
4697,
621,
838,
4201,
1626,
198,
2,
513,
4,
286,
17266,
742,
524,
198,
28781,
16,
796,
5045,
276,
8053,... | 2.54886 | 614 |
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import keras
import argparse
import numpy as np
import tensorflow as tf
from keras import backend as K
import matplotlib.pyplot as plt
import segmentation_models as sm
from utils import visualize, freeze_session
from data_load... | [
11748,
28686,
198,
418,
13,
268,
2268,
17816,
43633,
5631,
62,
29817,
34563,
62,
39345,
34444,
20520,
796,
705,
15,
6,
198,
418,
13,
268,
2268,
17816,
10234,
62,
8697,
47,
62,
23678,
62,
25294,
62,
2538,
18697,
20520,
796,
705,
17,
... | 2.826822 | 1,894 |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'A PDS Image library based on the GDAL implementation.',
'author': 'Austin Godber',
'url': 'https://github.com/godber/gdal_pds',
'download_url': 'https://github.com/godber/gdal_pds',... | [
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,
11250,
796,
1391,
198,
220,
220,
220,
705,
11213,
10354,
705,
32,
... | 2.190647 | 278 |
from __future__ import unicode_literals
default_app_config = 'mayan.apps.django_gpg.apps.DjangoGPGApp'
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
12286,
62,
1324,
62,
11250,
796,
705,
11261,
272,
13,
18211,
13,
28241,
14208,
62,
70,
6024,
13,
18211,
13,
35,
73,
14208,
38,
6968,
4677,
6,
198
] | 2.6 | 40 |
from __future__ import print_function
from PIL import Image
import os
import os.path
import numpy as np
import sys
if sys.version_info[0] == 2:
import cPickle as pickle
else:
import pickle
import torch.utils.data as data
from torchvision.datasets.utils import download_url, check_integrity
class FRDEEPN(data.... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
361,
25064,
13,
9641,
62,
10951,
58,
15,
60,
... | 2.009465 | 3,064 |
# Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | [
2,
15069,
1946,
25,
7381,
20836,
3457,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
... | 2.871179 | 916 |
from dj_rest_auth.registration.views import VerifyEmailView
from django.conf import settings
from django.urls import path, include
from rest_framework.routers import DefaultRouter, SimpleRouter
from sonsuz_website.news.api.views import NewsViewSet, NewsImageViewSet, upload_file
if settings.DEBUG:
router = Defaul... | [
6738,
42625,
62,
2118,
62,
18439,
13,
2301,
33397,
13,
33571,
1330,
49899,
15333,
7680,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
6738,
1334,
62,
30604,
13,
... | 3.305556 | 144 |
import unittest
class Node:
""" A Node of an UnorderedList. Holds data provided by the user. """
class UnorderedList:
"""
This is a stripped down version of the UnorderedList seen in the lab
"""
def to_python(self):
""" Returns this UnorderedList as a regular Python list. Th... | [
11748,
555,
715,
395,
198,
198,
4871,
19081,
25,
198,
220,
220,
220,
37227,
317,
19081,
286,
281,
791,
24071,
8053,
13,
9340,
82,
1366,
2810,
416,
262,
2836,
13,
37227,
628,
198,
4871,
791,
24071,
8053,
25,
198,
220,
220,
220,
37227... | 1.987944 | 1,493 |
from talon import Module
from dataclasses import dataclass
mod = Module()
mod.list("cursorless_head_tail", desc="Cursorless modifier for head or tail of line")
@dataclass
head_tail_list = [
HeadTail("head", "extendThroughStartOf", "head"),
HeadTail("tail", "extendThroughEndOf", "tail"),
]
head_tail_map = {... | [
6738,
3305,
261,
1330,
19937,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
198,
4666,
796,
19937,
3419,
198,
4666,
13,
4868,
7203,
66,
21471,
1203,
62,
2256,
62,
13199,
1600,
1715,
2625,
34,
21471,
1203,
23157,
329,
1182,
... | 2.781421 | 183 |
"""arturo-stac-api."""
import os
from imp import load_source
from setuptools import find_namespace_packages, setup
with open("README.md") as f:
desc = f.read()
# Get version from stac-fastapi-api
__version__ = load_source(
"stac_fastapi.sqlalchemy.version",
os.path.join(os.path.dirname(__file__), "stac_f... | [
37811,
433,
1434,
12,
301,
330,
12,
15042,
526,
15931,
198,
11748,
28686,
198,
6738,
848,
1330,
3440,
62,
10459,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
14933,
10223,
62,
43789,
11,
9058,
198,
198,
4480,
1280,
7203,
15675,
... | 2.416887 | 758 |
"""
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -m{{cookiecutter.package_name}}` python will execute
`... | [
37811,
198,
26796,
326,
4909,
262,
3141,
1627,
598,
13,
198,
198,
5195,
857,
428,
2393,
2152,
11,
290,
1521,
407,
1234,
428,
287,
11593,
12417,
834,
30,
628,
220,
921,
1244,
307,
26194,
284,
1330,
1243,
422,
11593,
12417,
834,
1568,
... | 2.898429 | 955 |
import pywhatkit
from datetime import datetime as dt, timedelta
from functions import e164, close_tab, wait_seconds
import openpyxl as xl
import myexceptions as ex
import os
wellcome_message = """
********************************************************************************
********************* Whatsapp... | [
11748,
12972,
10919,
15813,
201,
198,
6738,
4818,
8079,
1330,
4818,
8079,
355,
288,
83,
11,
28805,
12514,
201,
198,
6738,
5499,
1330,
304,
23237,
11,
1969,
62,
8658,
11,
4043,
62,
43012,
201,
198,
11748,
1280,
9078,
87,
75,
355,
2124,... | 2.470652 | 920 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright 2020, Yutong Xie, UIUC.
Using iteration two merge two sorted linked list
'''
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
220,
220,
220,
15069,
12131,
11,
575,
315,
506,
48989,
11,
12454,
9598,
13,
198,
220,
220,
220,
8554,
... | 2.436508 | 126 |
from . import schema
from . import RemcallError
from .naming import CSharpNameConverter
| [
6738,
764,
1330,
32815,
198,
6738,
764,
1330,
3982,
13345,
12331,
198,
6738,
764,
77,
3723,
1330,
327,
44336,
5376,
3103,
332,
353,
628
] | 3.708333 | 24 |
'''
reads in disease threshold annotated EH results
splits annotation into different columns
fills outlier column with sample name if GT is in disease threshold
adds mean, std, median GT sizes from 1000Genomes EH runs (static file)
writes o/p as excel file
'''
import sys, os, re
from collections import namedtuple
from... | [
7061,
6,
198,
40779,
287,
4369,
11387,
24708,
515,
412,
39,
2482,
198,
22018,
896,
23025,
656,
1180,
15180,
198,
69,
2171,
503,
2505,
5721,
351,
6291,
1438,
611,
7963,
318,
287,
4369,
11387,
198,
2860,
82,
1612,
11,
14367,
11,
14288,
... | 2.111406 | 1,131 |
from .grid_search import GridSearch
from .differential_evolution import DifferentialEvolution
from .random_search import RandomSearch | [
6738,
764,
25928,
62,
12947,
1330,
24846,
18243,
198,
6738,
764,
39799,
498,
62,
1990,
2122,
1330,
20615,
498,
15200,
2122,
198,
6738,
764,
25120,
62,
12947,
1330,
14534,
18243
] | 4.433333 | 30 |
import pandas as pd
import os.path as path
import pickle
import collections as c
import numpy as np
import math
webGraph = None
if path.exists("web.pkl"):
with open("web.pkl", "rb") as f:
webGraph = pickle.load(f)
else:
df = pd.read_csv('links.srt.gz', compression='gzip', header=None, sep='\t')
w... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
13,
6978,
355,
3108,
198,
11748,
2298,
293,
198,
11748,
17268,
355,
269,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
628,
198,
12384,
37065,
796,
6045,
198,
198,
361,
3108,
... | 2.456621 | 219 |
"""
This file contains view classes that can be used in other applications.
"""
from geonition_utils.http import HttpResponseNotImplemented
from django.views.generic import View
class RequestHandler(View):
"""
This class should be inherited by the view
classes to be used for implementing REST
"""
d... | [
37811,
198,
1212,
2393,
4909,
1570,
6097,
326,
460,
307,
973,
287,
584,
5479,
13,
198,
37811,
198,
6738,
4903,
261,
653,
62,
26791,
13,
4023,
1330,
367,
29281,
31077,
3673,
3546,
1154,
12061,
198,
6738,
42625,
14208,
13,
33571,
13,
41... | 2.397878 | 754 |
from __future__ import absolute_import, division, print_function
import procrunner
import pytest
import xia2.Test.regression
expected_data_files = [
"AUTOMATIC_DEFAULT_NATIVE_SWEEP1_INTEGRATE.mtz",
"AUTOMATIC_DEFAULT_free.mtz",
"AUTOMATIC_DEFAULT_scaled.sca",
"AUTOMATIC_DEFAULT_scaled_unmerged.mtz",
... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
198,
11748,
13834,
16737,
198,
11748,
12972,
9288,
198,
11748,
2124,
544,
17,
13,
14402,
13,
2301,
2234,
198,
198,
40319,
62,
7890,
62,
16624,
796,
685... | 2.352564 | 156 |
from collections import deque
tree = "1,2,3,None,None,4,5"
print(serialize(deserialize(tree))) | [
6738,
17268,
1330,
390,
4188,
198,
198,
21048,
796,
366,
16,
11,
17,
11,
18,
11,
14202,
11,
14202,
11,
19,
11,
20,
1,
198,
4798,
7,
46911,
1096,
7,
8906,
48499,
1096,
7,
21048,
22305
] | 2.638889 | 36 |
# -*- coding: utf-8 -*-
import re
from datetime import timedelta
from airflow.models import Variable
from airflow.operators.bash_operator import BashOperator
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
302,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
6738,
45771,
13,
27530,
1330,
35748,
198,
6738,
45771,
13,
3575,
2024,
13,
41757,
62,
46616,
1330,
15743,
... | 3.313725 | 51 |
# Generated by Django 2.0.2 on 2020-06-01 12:28
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
17,
319,
12131,
12,
3312,
12,
486,
1105,
25,
2078,
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 |
import os
import pytest
import sys
from cekit.cache.cli import CacheCli
| [
11748,
28686,
198,
11748,
12972,
9288,
198,
11748,
25064,
198,
198,
6738,
269,
988,
270,
13,
23870,
13,
44506,
1330,
34088,
2601,
72,
628,
628,
628,
628,
198
] | 2.892857 | 28 |
#python3.8.3
import itertools
import os
import pathlib
import shutil
#IO
from pptx import Presentation
from PIL import Image
from pdf2image import convert_from_path
import json
from io import BytesIO
import subprocess
from glob import glob
#GUI
import tkinter as tk
import tkinter.filedialog as dialog
from tkinter.mes... | [
2,
29412,
18,
13,
23,
13,
18,
198,
11748,
340,
861,
10141,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
4423,
346,
198,
198,
2,
9399,
198,
6738,
279,
457,
87,
1330,
21662,
341,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
... | 2.796791 | 187 |
from oaff.app.requests.common.request_type import RequestType
| [
6738,
267,
2001,
13,
1324,
13,
8897,
3558,
13,
11321,
13,
25927,
62,
4906,
1330,
19390,
6030,
628
] | 3.5 | 18 |
import comet_ml
import numpy as np
import json
import torch
import copy
import time
import math
from lib import create_agent
from lib.distributions import kl_divergence
from util.env_util import create_env, SynchronousEnv
from util.train_util import collect_episode
from util.plot_util import load_checkpoint
from local_... | [
11748,
31733,
62,
4029,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
11748,
28034,
198,
11748,
4866,
198,
11748,
640,
198,
11748,
10688,
198,
6738,
9195,
1330,
2251,
62,
25781,
198,
6738,
9195,
13,
17080,
2455,
507,
1330,
... | 2.358446 | 3,836 |
from django.contrib.auth import forms as admin_forms
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5107,
355,
13169,
62,
23914,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
3254,
24765,
12331,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
651,
5239,
62,
75,
12582... | 3.613636 | 44 |
names = {'anonymous','tazri','focasa','troy','farha'};
# can use for loop for access names sets
for name in names :
print("Hello, "+name.title()+"!");
# can check value is exist in sets ?
print("\n'tazri' in names : ",'tazri' in names);
print("'solus' not in names : ",'solus' not in names);
print("'xenon' in name... | [
14933,
796,
1391,
6,
272,
6704,
41707,
83,
1031,
380,
41707,
69,
420,
15462,
41707,
83,
3287,
41707,
16370,
3099,
6,
19629,
198,
198,
2,
460,
779,
329,
9052,
329,
1895,
3891,
5621,
198,
1640,
1438,
287,
3891,
1058,
198,
220,
220,
22... | 2.6875 | 128 |
# $ python3 -m pip install pyserial
# /dev/cu.usbserial-<XYZ> for mac,
# ...you can find your XYZ using $ python3 -m serial.tools.list_ports -v
# ...it might also be something like /dev/cu.usbmodem<XYZ>, depending on the USB Serial adapter
# My XYZ is "FTVHYZXQ", which matches my USB Serial adapter, model n... | [
2,
720,
21015,
18,
532,
76,
7347,
2721,
279,
893,
48499,
198,
2,
1220,
7959,
14,
27399,
13,
385,
1443,
48499,
12,
27,
34278,
57,
29,
329,
8352,
11,
198,
2,
220,
220,
220,
220,
220,
220,
2644,
5832,
460,
1064,
534,
41420,
57,
126... | 2.198148 | 1,080 |
#!/usr/bin/env python
# -*- coding: utf-8 -*- | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12
] | 2.045455 | 22 |
from . import config, models, utils
| [
6738,
764,
1330,
4566,
11,
4981,
11,
3384,
4487,
198
] | 3.6 | 10 |
# encoding: utf-8
##################################################
# This script interacts with data files to extract information and modify values given to a function.
# It is part of an exercise in which data about districts and neighbourhoods are processed
# Here we have the functions for manipulating information... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
29113,
14468,
2235,
198,
2,
770,
4226,
44020,
351,
1366,
3696,
284,
7925,
1321,
290,
13096,
3815,
1813,
284,
257,
2163,
13,
198,
2,
632,
318,
636,
286,
281,
5517,
287,
543,
1366,
546,
1281... | 4.538462 | 195 |
# Generated by Django 3.0.7 on 2020-06-22 20:13
from django.db import migrations, models
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
22,
319,
12131,
12,
3312,
12,
1828,
1160,
25,
1485,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
26791,
13,
2435,
11340,
628
] | 2.926829 | 41 |
from rest_framework.test import APITestCase, APIRequestFactory, force_authenticate
from api.v2.views import UserViewSet
from api.tests.factories import UserFactory, AnonymousUserFactory
from django.core.urlresolvers import reverse
from .base import APISanityTestCase
| [
6738,
1334,
62,
30604,
13,
9288,
1330,
3486,
2043,
395,
20448,
11,
7824,
18453,
22810,
11,
2700,
62,
41299,
5344,
198,
6738,
40391,
13,
85,
17,
13,
33571,
1330,
11787,
7680,
7248,
198,
6738,
40391,
13,
41989,
13,
22584,
1749,
1330,
11... | 3.736111 | 72 |
#!/usr/bin/env python
__name__ = 'nitimeconv'
__author__ = 'Teruaki Enoto'
__version__ = '1.02'
__date__ = '2018 April 11'
from optparse import OptionParser
from astropy.time import Time
NICER_MJDREFI = 56658.0
NICER_MJDREFF = 0.000777592592592593
NICER_TIMEZERO = -1.0
#LEAP_INIT = 2.0
NICER_MET_ORIGIN... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
834,
3672,
834,
220,
220,
220,
796,
705,
77,
22552,
42946,
6,
198,
834,
9800,
834,
220,
796,
705,
15156,
84,
8182,
412,
1662,
78,
6,
198,
834,
9641,
834,
796,
705,
16,
13,
2... | 2.406109 | 3,536 |
#Fill in the blanks in the program below so that it prints “nit” (the reverse of the original character string “tin”).
original = "tin"
result = ____
for char in original:
result = ____
print(result)
| [
198,
2,
33762,
287,
262,
698,
2283,
287,
262,
1430,
2174,
523,
326,
340,
20842,
564,
250,
48825,
447,
251,
357,
1169,
9575,
286,
262,
2656,
2095,
4731,
564,
250,
43701,
447,
251,
737,
198,
198,
14986,
796,
366,
43701,
1,
198,
20274,... | 3.121212 | 66 |
import re
import typing
OUTPUT_VAR = "_output_"
INDENT = 1
UNINDENT = -1
INDENT_SPACES = 2
INDEX_VAR = "index"
class CodeBuilder:
"""Manage code generating context."""
class Token:
"""Token in template code"""
def extract_last_filter(text: str) -> (str, str):
"""
Extract last filter from e... | [
11748,
302,
198,
11748,
19720,
628,
198,
2606,
7250,
3843,
62,
53,
1503,
796,
45434,
22915,
62,
1,
198,
12115,
3525,
796,
352,
198,
4944,
12115,
3525,
796,
532,
16,
198,
12115,
3525,
62,
4303,
2246,
1546,
796,
362,
198,
12115,
6369,
... | 2.364915 | 1,351 |
# Django Imports
from django.conf.urls import patterns, include, url
from django.views.generic import RedirectView
from django.contrib import admin
from django.views.generic.base import TemplateView
from django.contrib.auth import views as auth_views
from registration.backends.default.views import ActivationView
from r... | [
2,
37770,
1846,
3742,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
2297,
1060,
7680,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
... | 2.550551 | 1,088 |
from unittest import TestCase
from .problem_13_3_anonymous_letter import solution
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
764,
45573,
62,
1485,
62,
18,
62,
272,
6704,
62,
9291,
1330,
4610,
628
] | 3.608696 | 23 |
import os.path
import threading
import Queue
import cPickle as pickle
import datetime
from matplotlib.finance import quotes_historical_yahoo
from matplotlib.dates import num2date
from stock.globalvar import *
us_dir = HIST_DIR['us']
if not os.path.isdir(us_dir):
os.makedirs(us_dir)
#for ticker in tickers:
# ... | [
11748,
28686,
13,
6978,
198,
11748,
4704,
278,
198,
11748,
4670,
518,
198,
11748,
269,
31686,
293,
355,
2298,
293,
198,
11748,
4818,
8079,
198,
6738,
2603,
29487,
8019,
13,
69,
14149,
1330,
13386,
62,
10034,
12409,
62,
40774,
198,
6738,... | 2.003759 | 532 |
import sys
import os
import platform
from PyQt5.QtWidgets import (
QApplication,
QVBoxLayout,
QWidget,
QMainWindow,
QScrollArea,
QPushButton,
QTabBar,
QTabWidget
)
from PyQt5.QtCore import Qt, QFile, QIODevice, QTextStream
from FrontEnd.Tabs import ContactTab, ShareTab, RequestTab, ac... | [
11748,
25064,
198,
11748,
28686,
198,
11748,
3859,
628,
198,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
357,
198,
220,
220,
220,
1195,
23416,
11,
198,
220,
220,
220,
1195,
53,
14253,
32517,
11,
198,
220,
220,
2... | 2.437751 | 498 |
#Constantly Changing, just a plugin I use to debug whatever is broken atm
import sys
import threading
from spock.mcmap import mapdata
from spock.mcp import mcdata
from spock.utils import pl_announce
| [
2,
34184,
3875,
33680,
11,
655,
257,
13877,
314,
779,
284,
14257,
4232,
318,
5445,
379,
76,
198,
11748,
25064,
198,
11748,
4704,
278,
198,
6738,
599,
735,
13,
23209,
8899,
1330,
3975,
7890,
198,
6738,
599,
735,
13,
76,
13155,
1330,
... | 3.553571 | 56 |
from string import Template
# Change parameters
appname = "InfoVision"
compname = "Conscienciology"
descript = "Application for training remote viewing"
vmajor = 1
vminor = 1
vbuild = 2
helpurl = ""
updateurl = ""
abouturl = ""
installsize = 16692
iconpath = "src/images/tapa_olho.ico"
builder = "py"
# --------------... | [
6738,
4731,
1330,
37350,
628,
198,
2,
9794,
10007,
198,
1324,
3672,
796,
366,
12360,
44206,
1,
198,
5589,
3672,
796,
366,
9444,
979,
268,
979,
1435,
1,
198,
20147,
1968,
796,
366,
23416,
329,
3047,
6569,
11681,
1,
198,
14761,
1518,
... | 2.596154 | 416 |
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
5878,
11,
6244,
1168,
3008,
5693,
290,
25767,
669,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
262,
1168,
3008,
... | 2.775693 | 1,119 |
import os
import random
import shlex
import shutil
import sys
import threading
import uuid
from collections import Counter
from contextlib import contextmanager
from io import StringIO
import bottle
import requests
import six
import time
from mock import Mock
from six.moves.urllib.parse import urlsplit, urlunsplit
fro... | [
11748,
28686,
198,
11748,
4738,
198,
11748,
427,
2588,
198,
11748,
4423,
346,
198,
11748,
25064,
198,
11748,
4704,
278,
198,
11748,
334,
27112,
198,
6738,
17268,
1330,
15034,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
33245,
133... | 2.569252 | 2,888 |
from typing import List
from fastapi import APIRouter, Depends, Query
from boucanpy.core import only
from boucanpy.core.security import ScopedTo, TokenPayload
from boucanpy.db.models.zone import Zone
from boucanpy.core import SortQS, PaginationQS, BaseResponse
from boucanpy.core.zone import (
ZoneRepo,
ZonesRes... | [
6738,
19720,
1330,
7343,
198,
6738,
3049,
15042,
1330,
3486,
4663,
39605,
11,
2129,
2412,
11,
43301,
198,
6738,
35833,
5171,
9078,
13,
7295,
1330,
691,
198,
6738,
35833,
5171,
9078,
13,
7295,
13,
12961,
1330,
1446,
19458,
2514,
11,
2913... | 2.891892 | 185 |
menu_name = "MOCP control"
from subprocess import call
from ui import Menu, Printer
#Some globals for LCS
main_menu = None
callback = None
#Some globals for us
i = None
o = None
#MOCP commands
main_menu_contents = [
["Toggle play/pause", mocp_toggle_play],
["Next song", mocp_next],
["Previous song", mocp_prev],
["... | [
26272,
62,
3672,
796,
366,
44,
4503,
47,
1630,
1,
198,
198,
6738,
850,
14681,
1330,
869,
198,
6738,
334,
72,
1330,
21860,
11,
1736,
3849,
198,
198,
2,
4366,
15095,
874,
329,
38217,
198,
12417,
62,
26272,
796,
6045,
198,
47423,
796,
... | 2.704 | 125 |
# 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, software
# distributed under t... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 2.678092 | 2,159 |
import torch.nn as nn
import torch.nn.functional as F
from .binary_functions import IRNetSign, RANetActSign, RANetWSign
import torch
import math
| [
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
201,
198,
6738,
764,
39491,
62,
12543,
2733,
1330,
14826,
7934,
11712,
11,
371,
1565,
316,
6398,
11712,
11,
371,
1565,
316,
54,
11712,
201,... | 2.65 | 60 |
import math
import numpy as np
__author__ = "Valentin Rakovic"
__copyright__ = "Copyright (c) 2017, Faculty of Electrical Engineering and Information Technologies, UKIM, Skopje, Macedonia"
__version__ = "0.1.0"
__email__ = "{valentin}@feit.ukim.edu.mk"
'''
Localization Module
Used for processing of the localizatio... | [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
628,
198,
834,
9800,
834,
796,
366,
7762,
31371,
34299,
17215,
1,
198,
834,
22163,
4766,
834,
796,
366,
15269,
357,
66,
8,
2177,
11,
35262,
286,
40224,
14044,
290,
6188,
21852,
11,
348... | 1.922973 | 1,480 |
# coding: utf-8
# 2019/12/24 @ tongshiwei
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
13130,
14,
1065,
14,
1731,
2488,
10479,
44019,
42990,
198
] | 2.210526 | 19 |
from PyQt5 import uic, QtWidgets, QtCore, QtGui
from PyQt5.QtCore import Qt
from PyQt5.Qt import QKeySequence
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QWidget, QMessageBox
| [
6738,
9485,
48,
83,
20,
1330,
334,
291,
11,
33734,
54,
312,
11407,
11,
33734,
14055,
11,
33734,
8205,
72,
201,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
33734,
201,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
1330,
1195... | 2.079208 | 101 |
# Generated by Django 4.0.1 on 2022-03-24 10:15
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
13,
16,
319,
33160,
12,
3070,
12,
1731,
838,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
#! python
# ===============LICENSE_START=======================================================
# metadata-flatten-extractor Apache-2.0
# ===================================================================================
# Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
# =====================... | [
2,
0,
21015,
198,
2,
796,
25609,
855,
43,
2149,
24290,
62,
2257,
7227,
10052,
4770,
1421,
18604,
198,
2,
20150,
12,
2704,
41769,
12,
2302,
40450,
24843,
12,
17,
13,
15,
198,
2,
38093,
4770,
855,
198,
2,
15069,
357,
34,
8,
2177,
... | 4.318898 | 254 |
"""
argparse_helpers.py
This module holds helper functions for use with argparse.
Some of these functions can be used for the "type" property for argparse::add_arguments
calls. Simply pass the function name as such: type=<function name>.
"""
__author__ = 'sedwards'
import ast
from typing import Any, Dict, List, Opt... | [
37811,
198,
853,
29572,
62,
16794,
364,
13,
9078,
198,
198,
1212,
8265,
6622,
31904,
5499,
329,
779,
351,
1822,
29572,
13,
198,
198,
4366,
286,
777,
5499,
460,
307,
973,
329,
262,
366,
4906,
1,
3119,
329,
1822,
29572,
3712,
2860,
62... | 2.41701 | 1,458 |
import shelve
if __name__ == '__main__':
s = shelve.open("22901.db")
s["name"] = "www.itdiffer.com"
s["lang"] = "python"
s["pages"] = 1000
s["contents"] = {"first":"base knowledge","second":"day day up"}
s.close()
s = shelve.open("22901.db")
name = s["name"]
print (name)
contents... | [
11748,
7497,
303,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
264,
796,
7497,
303,
13,
9654,
7203,
23539,
486,
13,
9945,
4943,
198,
220,
220,
220,
264,
14692,
3672,
8973,
796,
366,
2503,
13,
27... | 2.377907 | 172 |
if __name__ == '__main__':
files = ['files/Matching.txt','files/Matching2.txt']
matrix = list()
with open(files[0]) as file:
for line in file:
matrix.append(list(map(int,line.split())))
vertices = [i for i in range(len(matrix))]
next_x = [[] for _ in range(len(matrix))]
... | [
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
3696,
796,
37250,
16624,
14,
44,
19775,
13,
14116,
41707,
16624,
14,
44,
19775,
17,
13,
14116,
20520,
201,
198,
220,
220,
220,
17593,
796,
... | 2.003817 | 262 |
import argparse
import time
from os.path import join
import os
import torch
from PIL import Image
from torch.autograd import Variable
from torchvision.transforms import ToTensor, ToPILImage
import torchvision.utils as utils
from data_utils import display_transform
from model import Generator
parser = argparse.Argume... | [
11748,
1822,
29572,
198,
11748,
640,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
11748,
28686,
198,
198,
11748,
28034,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
6738,
28034,
10178,
13,
7... | 2.632488 | 868 |
import os
import json
dir = "test"
counts = 0
all_counts =0
with open("POLEVAL-NER_GOLD.json") as f:
main_data = json.load(f)["questions"]
for idx, doc in enumerate(main_data):
answers = doc["answers"][0]["data"]["brat"].split("\n")
new_labels = []
ents = []
for answer in answers... | [
11748,
28686,
198,
11748,
33918,
198,
15908,
796,
366,
9288,
1,
198,
9127,
82,
796,
657,
198,
439,
62,
9127,
82,
796,
15,
198,
4480,
1280,
7203,
16402,
2538,
23428,
12,
21479,
62,
38,
15173,
13,
17752,
4943,
355,
277,
25,
198,
220,
... | 1.678571 | 672 |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import codecs
import json
from scrapy.pipelines.images import ImagesPipeline
from scrapy.exporters import JsonItemExporter
from... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
2896,
500,
534,
2378,
31108,
994,
198,
2,
198,
2,
2094,
470,
6044,
284,
751,
534,
11523,
284,
262,
7283,
3620,
62,
47,
4061,
3698,
1268,
1546,
4634,
198,
2,
... | 2.126667 | 300 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" DocString: Load configuration from .yaml file."""
from pathlib import Path
from os import path
import confuse
# get path of the projet !
BASE_DIR = path.dirname(path.dirname(path.abspath(__file__)))
# BASE_DIR = '/home/alassane/Code/JimBot/chatbotapp'
# Load conf... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
14432,
10100,
25,
8778,
8398,
422,
764,
88,
43695,
2393,
526,
15931,
628,
198,
6738,
3108,
8019,
1330,
1064... | 2.535849 | 530 |
from armulator.armv6.opcodes.abstract_opcodes.it import It
from armulator.armv6.opcodes.opcode import Opcode
| [
6738,
3211,
8927,
13,
1670,
85,
21,
13,
404,
40148,
13,
397,
8709,
62,
404,
40148,
13,
270,
1330,
632,
198,
6738,
3211,
8927,
13,
1670,
85,
21,
13,
404,
40148,
13,
404,
8189,
1330,
8670,
8189,
628
] | 2.894737 | 38 |
import math
import time
import click
from valohai_cli.utils import force_text
class Divider(LayoutElement):
"""
Full-width divider.
"""
def __init__(self, ch='#', style=None):
"""
:param ch: The character (or characters) to fill the line with
:type ch: str
:param st... | [
11748,
10688,
198,
11748,
640,
198,
198,
11748,
3904,
198,
198,
6738,
1188,
1219,
1872,
62,
44506,
13,
26791,
1330,
2700,
62,
5239,
628,
198,
198,
4871,
4777,
1304,
7,
32517,
20180,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,... | 2.331111 | 900 |
"""Common definitions"""
from collections import namedtuple
import functools
IDN = namedtuple("IDN", ["manufacturer", "model", "serial_number", "firmware_version"])
class CommandError(Exception):
"""Raised when CME bit of SESR is set"""
def validate(func):
"""Read the Command Error bit (CME) of the Standa... | [
37811,
17227,
17336,
37811,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
11748,
1257,
310,
10141,
198,
198,
2389,
45,
796,
3706,
83,
29291,
7203,
2389,
45,
1600,
14631,
48119,
15051,
1600,
366,
19849,
1600,
366,
46911,
62,
17618,
1600,
... | 2.977528 | 178 |
"""Documentation utilities."""
def inherit_docs(cls):
"""Class decorator that makes it inherit function doc strings."""
for name in dir(cls):
member = getattr(cls, name)
if member.__doc__ is not None:
continue
for parent in cls.mro()[1:]:
if hasattr(parent, nam... | [
37811,
24941,
341,
20081,
526,
15931,
628,
198,
4299,
16955,
62,
31628,
7,
565,
82,
2599,
198,
220,
220,
220,
37227,
9487,
11705,
1352,
326,
1838,
340,
16955,
2163,
2205,
13042,
526,
15931,
198,
220,
220,
220,
329,
1438,
287,
26672,
7... | 2.095618 | 251 |
# -*- coding: utf-8 -*-
from configparser import ConfigParser # [WARNING] Don't use any other `cfg` driver.
from typing import Optional, Dict, Any
from argparse import Namespace
from recc.argparse.parser.dict_parse import get_namespace_by_dict
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
4566,
48610,
1330,
17056,
46677,
220,
1303,
685,
31502,
60,
2094,
470,
779,
597,
584,
4600,
37581,
63,
4639,
13,
198,
6738,
19720,
1330,
32233,
11,
360,
713,
... | 3.205128 | 78 |
import pytest
from coderunner import create_app
@pytest.fixture()
@pytest.fixture()
def client(app):
"""A test client for the app"""
return app.test_client()
| [
11748,
12972,
9288,
198,
198,
6738,
269,
12342,
403,
1008,
1330,
2251,
62,
1324,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
198,
4299,
5456,
7,
1324,
2599,
198,
220,
220,
220,
37227,
... | 2.746032 | 63 |
from team.models import DataTablesFilter
| [
6738,
1074,
13,
27530,
1330,
6060,
51,
2977,
22417,
628,
198
] | 3.909091 | 11 |
# -*- coding: utf-8 -*-
# @File : scheduler.py
# @Author : Kaicheng Yang
# @Time : 2022/01/26 11:04:07
import numpy as np | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
8979,
1058,
6038,
18173,
13,
9078,
198,
2,
2488,
13838,
1058,
11611,
14234,
782,
10998,
198,
2,
2488,
7575,
1058,
33160,
14,
486,
14,
2075,
1367,
25,
3023,
25... | 2.326923 | 52 |
import setuptools
with open("README.md", "r") as readme_file:
readme = readme_file.read()
setuptools.setup(
name="stripes-and-squares",
version="0.0.1-rc1",
author="Petr Machek",
description="Barcode generator with no dependencies",
long_description=readme,
long_description_content_type="... | [
11748,
900,
37623,
10141,
628,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
1100,
1326,
62,
7753,
25,
198,
220,
220,
220,
1100,
1326,
796,
1100,
1326,
62,
7753,
13,
961,
3419,
198,
198,
2617,
37623,
10141,
... | 2.53876 | 258 |
"""
lib/script_utils.py
lib for utility functions for cl script execution
"""
from sys import exit
def script_exit(reason: str) -> None:
"""Wrapper for script exit on error"""
print(f'exit with error: {reason}')
exit()
def check_validity_token(token: str) -> list:
"""Processes token input ... | [
37811,
198,
220,
220,
220,
9195,
14,
12048,
62,
26791,
13,
9078,
628,
220,
220,
220,
9195,
329,
10361,
5499,
329,
537,
4226,
9706,
198,
37811,
198,
198,
6738,
25064,
1330,
8420,
628,
198,
4299,
4226,
62,
37023,
7,
41181,
25,
965,
8,... | 2.544811 | 424 |
#!/usr/bin/env python3
#
# Copyright 2017-2020 GridGain Systems.
#
# 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 applicab... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
15069,
2177,
12,
42334,
24846,
38,
391,
11998,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
... | 3.736585 | 205 |
import cStringIO
lines = open("../../../SDL/include/SDL_opengl.h").readlines()
funcs = ["glUseProgram",
"glVertexAttribPointer",
"glActiveTexture",
"glEnableVertexAttribArray",
"glDisableVertexAttribArray",
"glDeleteProgram",
"glGetShaderiv",
"glGetS... | [
11748,
269,
10100,
9399,
198,
6615,
796,
1280,
7203,
40720,
40720,
40720,
10305,
43,
14,
17256,
14,
10305,
43,
62,
404,
1516,
75,
13,
71,
11074,
961,
6615,
3419,
198,
12543,
6359,
796,
14631,
4743,
11041,
15167,
1600,
220,
198,
220,
2... | 1.994709 | 567 |