content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import pandas as pd
import networkx as nx
import matplotlib.pyplot as plt
import tqdm,json,math
from collections import defaultdict
match_path='2020_Problem_D_DATA/matches.csv'
passings='2020_Problem_D_DATA/passingevents.csv'
fullevents='2020_Problem_D_DATA/fullevents.csv'
if __name__=='__main__':
conduct_degree() | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
256,
80,
36020,
11,
17752,
11,
11018,
198,
6738,
17268,
1330,
4277,
11600,
198,
15699,
62,
... | 2.807018 | 114 |
from __future__ import print_function
import time
import itertools
import click
import datetime
import os
import sys
import logging
from tabulate import tabulate
from . import config
from . import projects
from . import helpers as h
from .projects import Project
from . import auth
from .path import Path
from . import ... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
640,
198,
11748,
340,
861,
10141,
198,
11748,
3904,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
18931,
198,
198,
6738,
7400,
5039,
1330,
7400,
5039,
... | 2.666867 | 3,329 |
import os
import logging
from http import HTTPStatus
from libtrustbridge.websub.constants import (
TOPIC_ATTR_KEY,
MODE_ATTR_KEY,
LEASE_SECONDS_ATTR_KEY
)
from flask import Flask, request, jsonify
HUB_CHALLENGE_ATTR_KEY = 'hub.challenge'
PORT = os.environ['PORT']
HOST = '0.0.0.0'
app = Flask(__name__)... | [
11748,
28686,
198,
11748,
18931,
198,
6738,
2638,
1330,
14626,
19580,
198,
6738,
9195,
38087,
9458,
13,
732,
1443,
549,
13,
9979,
1187,
1330,
357,
198,
220,
220,
220,
28662,
2149,
62,
1404,
5446,
62,
20373,
11,
198,
220,
220,
220,
337... | 2.468354 | 316 |
import argparse
import os
import random
import shutil
import warnings
import sys
warnings.filterwarnings("ignore")
from keras import backend as K
import numpy as np
from PIL import Image, ImageFilter
from skimage.measure import compare_ssim as SSIM
import keras
from util import get_model
import tensorflow as tf
impo... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
4423,
346,
198,
11748,
14601,
198,
11748,
25064,
198,
198,
40539,
654,
13,
24455,
40539,
654,
7203,
46430,
4943,
198,
198,
6738,
41927,
292,
1330,
30203,
355,
509,
198,
... | 2.314622 | 2,209 |
# Auto-generated at 2021-09-27T17:12:31.699868+08:00
# from: Justice Iam Service (4.1.0)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# pylint: ... | [
2,
11160,
12,
27568,
379,
33448,
12,
2931,
12,
1983,
51,
1558,
25,
1065,
25,
3132,
13,
21,
34808,
3104,
10,
2919,
25,
405,
198,
2,
422,
25,
4796,
314,
321,
4809,
357,
19,
13,
16,
13,
15,
8,
198,
198,
2,
15069,
357,
66,
8,
28... | 2.311671 | 754 |
"""
This module contains all db-related tasks which needs to be executed periodically or as a cron job.
The main packages used here to schedule these tasks are `django-apscheduler` and `apscheduler`
For reference follow below links:
- https://apscheduler.readthedocs.io/en/stable/index.html
- https://medium.com/... | [
37811,
198,
1212,
8265,
4909,
477,
20613,
12,
5363,
8861,
543,
2476,
284,
307,
10945,
26034,
393,
355,
257,
1067,
261,
1693,
13,
198,
464,
1388,
10392,
973,
994,
284,
7269,
777,
8861,
389,
4600,
28241,
14208,
12,
499,
1416,
704,
18173... | 2.626165 | 3,325 |
from django.db import models
from ckeditor.fields import RichTextField
USER_CHOICES = [
("a", "Admin"),
("b", "User"),
]
INTEGER_CHOICES = [
(0, "Zero"),
(1, "One"),
(2, "Two"),
(3, "Three"),
]
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
269,
9091,
2072,
13,
25747,
1330,
3998,
8206,
15878,
628,
198,
29904,
62,
44899,
34444,
796,
685,
198,
220,
220,
220,
5855,
64,
1600,
366,
46787,
12340,
198,
220,
220,
220,
5855,
65... | 2.19802 | 101 |
from queue import Queue
from threading import Thread, current_thread
from time import time
from sys import argv
from writablecte import WritableCte
from normal_style_for_update import LockingAccess
from normal_style_wo_explicit_locking import WithoutLockingAccess
from db_util import create_pool, get_connection... | [
6738,
16834,
1330,
4670,
518,
201,
198,
6738,
4704,
278,
1330,
14122,
11,
1459,
62,
16663,
201,
198,
6738,
640,
1330,
640,
201,
198,
6738,
25064,
1330,
1822,
85,
201,
198,
201,
198,
6738,
1991,
540,
310,
68,
1330,
12257,
540,
34,
66... | 2.487234 | 470 |
from .blend import Blend
| [
6738,
764,
2436,
437,
1330,
41198,
628
] | 3.714286 | 7 |
from __future__ import print_function
# fn_random.py
# A program showing various uses of the "random" function
# from the "random" module of Python's standard library.
# Author: Vasudev Ram - https://vasudevram.github.io
# Copyright 2016 Vasudev Ram
from random import random
from random import getstate, setstate
pr... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
2,
24714,
62,
25120,
13,
9078,
198,
2,
317,
1430,
4478,
2972,
3544,
286,
262,
366,
25120,
1,
2163,
220,
198,
2,
422,
262,
366,
25120,
1,
8265,
286,
11361,
338,
3210,
5888,
1... | 3.060423 | 331 |
version https://git-lfs.github.com/spec/v1
oid sha256:24c11001f7936158881bbcbcee78db69c9bf8cf58917db2dcb42b87230b682ce
size 35959
| [
9641,
3740,
1378,
18300,
12,
1652,
82,
13,
12567,
13,
785,
14,
16684,
14,
85,
16,
198,
1868,
427,
64,
11645,
25,
1731,
66,
1157,
8298,
69,
3720,
2623,
1314,
3459,
6659,
11848,
21101,
344,
68,
3695,
9945,
3388,
66,
24,
19881,
23,
1... | 2.063492 | 63 |
from flask import Flask, render_template, request, jsonify
from nlp_rock import *
app = Flask(__name__)
# prepare clients
lang_client = language.LanguageServiceClient()
tran_client = translate.Client()
# front
@app.route('/')
# process
# controller
@app.route('/nlp_rock', methods=['POST'])
if __name__ == '__main_... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
33918,
1958,
198,
6738,
299,
34431,
62,
10823,
1330,
1635,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
2,
8335,
7534,
198,
17204,
62,
16366,
796,
3303,
13,... | 2.8 | 130 |
import asyncio
from linguister import loop, run
| [
11748,
30351,
952,
198,
198,
6738,
20280,
1694,
1330,
9052,
11,
1057,
628
] | 3.846154 | 13 |
"""
Settings for the tests.
"""
from os.path import abspath, dirname, join
import sys
from workbench.settings import * # Using the XBlock generic settings for a shorter settings file
from django.conf.global_settings import LOGGING # Fix "file not found" with the workbench.settings LOGGING config
def root(*args):... | [
37811,
198,
26232,
329,
262,
5254,
13,
198,
37811,
198,
198,
6738,
28686,
13,
6978,
1330,
2352,
6978,
11,
26672,
3672,
11,
4654,
198,
11748,
25064,
198,
198,
6738,
670,
26968,
13,
33692,
1330,
1635,
220,
1303,
8554,
262,
1395,
12235,
... | 3.256579 | 152 |
test_list = [17, 5, 1, 7, 9, 12, 6, 4, 2, 19]
sort_test = insertion_sort(test_list)
| [
198,
198,
9288,
62,
4868,
796,
685,
1558,
11,
642,
11,
352,
11,
767,
11,
860,
11,
1105,
11,
718,
11,
604,
11,
362,
11,
678,
60,
198,
30619,
62,
9288,
796,
36075,
62,
30619,
7,
9288,
62,
4868,
8,
198
] | 2.097561 | 41 |
#!/usr/bin/python
if "hummingbot-dist" in __file__:
# Dist environment.
import os
import sys
sys.path.append(sys.path.pop(0))
sys.path.insert(0, os.getcwd())
import hummingbot
hummingbot.set_prefix_path(os.getcwd())
else:
# Dev environment.
from os.path import join, realpath
im... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
361,
366,
17047,
2229,
13645,
12,
17080,
1,
287,
11593,
7753,
834,
25,
198,
220,
220,
220,
1303,
4307,
2858,
13,
198,
220,
220,
220,
1330,
28686,
198,
220,
220,
220,
1330,
25064,
198,
... | 2.409938 | 161 |
from medicina import Medicina
| [
6738,
6924,
1437,
1330,
5786,
1437,
198
] | 4.285714 | 7 |
import falcon
from ebl.context import Context
from ebl.fragmentarium.application.cropped_annotations_service import (
CroppedAnnotationService,
)
from ebl.signs.web.sign_search import SignsSearch
from ebl.signs.web.signs import SignsResource
from ebl.signs.web.cropped_annotations import CroppedAnnotationsResource
... | [
11748,
24215,
1102,
198,
198,
6738,
304,
2436,
13,
22866,
1330,
30532,
198,
6738,
304,
2436,
13,
8310,
363,
434,
17756,
13,
31438,
13,
19915,
1496,
62,
34574,
602,
62,
15271,
1330,
357,
198,
220,
220,
220,
9325,
1496,
2025,
38983,
161... | 3.27551 | 98 |
# Generated by Django 2.2.19 on 2021-03-06 11:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1129,
319,
33448,
12,
3070,
12,
3312,
1367,
25,
2682,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
... | 3.064516 | 62 |
"""
Revision ID: 428551b7cf6f
Revises: e17533d246ab
Create Date: 2021-03-10 12:45:08.022940
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
import os
revision = '428551b7cf6f'
down_revision = 'e17533d246ab'
| [
37811,
198,
198,
18009,
1166,
4522,
25,
45063,
43697,
65,
22,
12993,
21,
69,
198,
18009,
2696,
25,
304,
17430,
2091,
67,
26912,
397,
198,
16447,
7536,
25,
33448,
12,
3070,
12,
940,
1105,
25,
2231,
25,
2919,
13,
15,
23539,
1821,
198,... | 2.457143 | 105 |
'''
Author: Saijal Shakya
Development:
> LMS: December 20, 2018
> HRM: Febraury 15, 2019
> CRM: March, 2020
> Inventory Sys: April, 2020
> Analytics: ...
License: Credited
Contact: https://saijalshakya.com.np
'''
| [
7061,
6,
198,
13838,
25,
25251,
73,
282,
35274,
3972,
198,
41206,
25,
198,
220,
220,
220,
1875,
406,
5653,
25,
3426,
1160,
11,
2864,
198,
220,
220,
220,
1875,
15172,
44,
25,
3158,
430,
1601,
1315,
11,
13130,
198,
220,
220,
220,
18... | 2.478723 | 94 |
"""Standarise SpecArray attributes.
attrs (dict): standarised names for spectral variables, standard_names and units
"""
# from collections import OrderedDict
import os
import yaml
HERE = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(HERE, "attributes.yml")) as stream:
attrs = AttrDict(yaml... | [
37811,
15480,
283,
786,
18291,
19182,
12608,
13,
198,
198,
1078,
3808,
357,
11600,
2599,
1302,
283,
1417,
3891,
329,
37410,
9633,
11,
3210,
62,
14933,
290,
4991,
198,
37811,
198,
2,
422,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
... | 2.540084 | 237 |
#!/usr/bin/python3
import sys
import requests
import xml.etree.ElementTree as et
USAGE = "Usage: ./nmap-hsts.py nmap.xml"
proxies = {
"http": "http://127.0.0.1:8080",
"https": "http://127.0.0.1:8080"
}
if __name__ == "__main__":
if len(sys.argv) != 2:
print(USAGE)
sys.exit(1)
ho... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
25064,
198,
11748,
7007,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
2123,
198,
198,
2937,
11879,
796,
366,
28350,
25,
24457,
77,
8899,
12,
71,
6448,
13,
9078,
2... | 2.116822 | 642 |
if __name__ == "__main__":
main(c="biconditional", i="imagine")
| [
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
7,
66,
2625,
65,
291,
623,
1859,
1600,
1312,
2625,
320,
12756,
4943,
198
] | 2.242424 | 33 |
"""
Flask-HTMLmin
-------------
minimize your flask rendered html
"""
from setuptools import setup
setup(
name='Flask-HTMLmin',
version='1.3.2',
url='https://github.com/hamidfzm/Flask-HTMLmin',
license='BSD-3-Clause',
author='Hamid FzM',
author_email='hamidfzm@gmail.com',
description='Mi... | [
198,
37811,
198,
7414,
2093,
12,
28656,
1084,
198,
32501,
198,
198,
1084,
48439,
534,
42903,
15111,
27711,
198,
37811,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
7414,
2093,
12,
... | 2.551948 | 462 |
import sys
sys.path.append('../')
from query import Query
from query import Type
from query.Type import mechanism_name_dict, wcq_mechanisms, icq_mechanisms, tcq_mechanisms
from privacy import PrivacyEngine
from query.query_gen import *
repeat_times = 1
census_card = 32561
default_workload_size = 100
... | [
11748,
25064,
201,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
201,
198,
201,
198,
6738,
12405,
1330,
43301,
201,
198,
6738,
12405,
1330,
5994,
201,
198,
6738,
12405,
13,
6030,
1330,
9030,
62,
3672,
62,
11600,
11,
266,
66,
8... | 2.466165 | 399 |
from pydantic import BaseModel, Field, EmailStr
from typing import Optional
from datetime import datetime, timezone
| [
6738,
279,
5173,
5109,
1330,
7308,
17633,
11,
7663,
11,
9570,
13290,
198,
6738,
19720,
1330,
32233,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
11340,
628,
628
] | 4.103448 | 29 |
"""
### `drawio`
Automatically includes an svg, based on .drawio file changes.
"""
import json
import subprocess as sp
from lcdoc import lp
from lcdoc.tools import file_hash, app, dirname, exists, os, read_file, write_file, os
multi_line_to_list = True
req_kw = ['fn', 'src']
def run(cmd, kw):
"""
"""
... | [
37811,
198,
21017,
220,
4600,
19334,
952,
63,
198,
198,
38062,
4142,
3407,
281,
38487,
70,
11,
1912,
319,
764,
19334,
952,
2393,
2458,
13,
198,
37811,
198,
198,
11748,
33918,
198,
11748,
850,
14681,
355,
599,
198,
198,
6738,
300,
1021... | 2.113383 | 538 |
import tensorflow as tf
import numpy as np
# refined srnn based on rev8
# try stack CUDNN GRU
| [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
2,
20449,
19677,
20471,
1912,
319,
2710,
23,
198,
2,
1949,
8931,
327,
8322,
6144,
10863,
52,
628
] | 3.064516 | 31 |
# ------------------------------------------------------------------------------
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
# ------------------------------------------------------------------------------
# Copyright (C) 2017 EOX IT Services GmbH
#
# Permission... | [
2,
16529,
26171,
198,
2,
198,
2,
4935,
25,
412,
38208,
10697,
1279,
4023,
1378,
68,
1140,
15388,
13,
2398,
29,
198,
2,
46665,
25,
14236,
666,
3059,
521,
1754,
1279,
36434,
666,
13,
20601,
521,
1754,
31,
68,
1140,
13,
265,
29,
198,... | 2.544761 | 3,541 |
import numpy as np
import cupy as cp
import chainer
from chainer import functions as F
from chainer import links as L
class NatureDQNHead(chainer.ChainList):
"""DQN's head (Nature version)"""
| [
11748,
299,
32152,
355,
45941,
198,
11748,
6508,
88,
355,
31396,
198,
11748,
6333,
263,
198,
6738,
6333,
263,
1330,
5499,
355,
376,
198,
6738,
6333,
263,
1330,
6117,
355,
406,
198,
198,
4871,
10362,
35,
48,
45,
13847,
7,
7983,
263,
... | 3.177419 | 62 |
#!/usr/bin/python2.7
# _*_ coding: utf-8 _*_
"""
@Author: MarkLiu
"""
import numpy as np
def loadSimpData():
"""
加载基本测试数据
:return:
"""
dataMatrix = np.matrix([[1., 2.1],
[2., 1.1],
[1.3, 1.],
[1., 1.],
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
13,
22,
198,
2,
4808,
9,
62,
19617,
25,
3384,
69,
12,
23,
4808,
9,
62,
198,
198,
37811,
198,
31,
13838,
25,
2940,
43,
16115,
198,
37811,
198,
11748,
299,
32152,
355,
45941,
628,
198,
429... | 1.417601 | 4,636 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import logging
import os
import django
from applicationinsights.channel import (
AsynchronousSender,
NullSender,
SenderBase,
SynchronousQueue,
TelemetryChannel,
)
from applicationinsights.channel.SenderBa... | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
11748,
42625,
14208,
198,
6738,
3586,
1040,
2337,
13,
17620,
1330,
357,
198,... | 2.325909 | 853 |
"""
Cpu bound.
see: https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools
"""
import os
import time
from datetime import datetime
from logging import getLogger
from multiprocessing.connection import Connection
from signal import SIGTERM, signal
from typing import Any, NoRet... | [
37811,
198,
34,
19944,
5421,
13,
198,
3826,
25,
3740,
1378,
31628,
13,
29412,
13,
2398,
14,
18,
14,
32016,
14,
292,
13361,
952,
12,
15596,
26268,
13,
6494,
2,
18558,
15129,
12,
8189,
12,
259,
12,
16663,
12,
273,
12,
14681,
12,
774... | 2.555172 | 580 |
#!/usr/bin/python
#
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
15069,
12131,
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... | 3.757895 | 190 |
import unittest
from aiter import flatten_aiter, map_aiter, push_aiter
from .helpers import run, get_n
| [
11748,
555,
715,
395,
628,
198,
6738,
257,
2676,
1330,
27172,
268,
62,
64,
2676,
11,
3975,
62,
64,
2676,
11,
4574,
62,
64,
2676,
628,
198,
6738,
764,
16794,
364,
1330,
1057,
11,
651,
62,
77,
628
] | 2.842105 | 38 |
from __future__ import absolute_import, division, print_function
from mmtbx.wwpdb import rcsb_web_services
def thorough_exercise():
"""
This exercises all currently available options, so makes 64 requests.
Took 20 minutes, therefore disabled from the general testing.
"""
lysozyme = """KVFGRCELAAAMKRHGLDNYRGY... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
6738,
8085,
83,
65,
87,
13,
1383,
79,
9945,
1330,
374,
6359,
65,
62,
12384,
62,
30416,
198,
198,
4299,
9321,
62,
1069,
23697,
33529,
198,
220,
37227,... | 1.945055 | 637 |
from Main.AlphaZero.DistributedSelfPlay import Constants as C
from Main.Training.Connect4 import SelfPlayWorker
from Main import Hyperparameters
import multiprocessing as mp
| [
6738,
8774,
13,
38077,
28667,
13,
20344,
6169,
24704,
11002,
1330,
4757,
1187,
355,
327,
201,
198,
6738,
8774,
13,
44357,
13,
13313,
19,
1330,
12189,
11002,
12468,
263,
201,
198,
6738,
8774,
1330,
15079,
17143,
7307,
201,
198,
11748,
18... | 3.6 | 50 |
from os import system
from config import admin_password
class PrivilegedHelper:
""" Privileged helper tool. Use carefully! """
def execute(self, command: str) -> int:
""" Execute shell command with administrator privileges.
:param str command: Shell script(command) to be executed.
... | [
6738,
28686,
1330,
1080,
198,
198,
6738,
4566,
1330,
13169,
62,
28712,
628,
198,
4871,
9243,
48446,
47429,
25,
198,
220,
220,
220,
37227,
9243,
48446,
31904,
2891,
13,
5765,
7773,
0,
37227,
628,
220,
220,
220,
825,
12260,
7,
944,
11,
... | 2.856522 | 230 |
import tarfile
from . import *
| [
11748,
13422,
7753,
198,
198,
6738,
764,
1330,
1635,
628
] | 3.3 | 10 |
import asyncio
import json
import ssl
import asyncws
from .exceptions import AuthenticationError, HomeAssistantError
ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
| [
11748,
30351,
952,
198,
11748,
33918,
198,
11748,
264,
6649,
198,
198,
11748,
30351,
18504,
198,
198,
6738,
764,
1069,
11755,
1330,
48191,
12331,
11,
5995,
48902,
12331,
198,
198,
45163,
62,
22866,
796,
264,
6649,
13,
17953,
62,
12286,
... | 3.119048 | 84 |
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin
import urllib.request
import os
import ssl
import time
from PIL import Image
import bs4
ssl._create_default_https_context = ssl._create_unverified_context
url = 'https://www.foxsports.com/mlb/players?teamId=0&season=2019&position=0&page={}&... | [
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
22179,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
28686,
198,
11748,
264,
6649,
198,
11748,
640,
198,
6738,
350,
4... | 1.977778 | 360 |
import torch
import logging
from tame_pytorch import ManifoldModule, Network, L1Linear
from grouped_adam import GroupedAdam
import math
num_inputs = 10
all_X, all_Y = adder_train_set(num_inputs)
# all_X, all_Y = prime_train_set(num_inputs)
# all_X, all_Y = sum_eq_train_set(num_inputs, 5)
# all_X, all_Y = xor_... | [
11748,
28034,
198,
11748,
18931,
198,
6738,
37812,
62,
9078,
13165,
354,
1330,
1869,
361,
727,
26796,
11,
7311,
11,
406,
16,
14993,
451,
198,
6738,
32824,
62,
324,
321,
1330,
4912,
276,
23159,
198,
11748,
10688,
628,
628,
628,
628,
62... | 1.932821 | 3,647 |
# -*- coding: utf-8 -*-
"""
Created on Mon May 16 00:27:50 2016
@author: Hossam Faris
"""
import random
import numpy
import math
from solution import solution
import time
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
1737,
1467,
3571,
25,
1983,
25,
1120,
1584,
198,
198,
31,
9800,
25,
367,
793,
321,
6755,
271,
198,
37811,
198,
198,
11748,
4738,
198,
117... | 2.916667 | 60 |
# -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1388,
3419,
201,
198
] | 1.775 | 40 |
import or_gym
import numpy as np
env_name = 'InvManagement-v3'
env = or_gym.make(env_name)
action = env.action_space.sample()
env.step(action)
# z = np.ones(env.num_stages-1)
# print(env.base_stock_action(z)) | [
11748,
393,
62,
1360,
76,
198,
11748,
299,
32152,
355,
45941,
198,
198,
24330,
62,
3672,
796,
705,
19904,
48032,
12,
85,
18,
6,
198,
198,
24330,
796,
393,
62,
1360,
76,
13,
15883,
7,
24330,
62,
3672,
8,
198,
2673,
796,
17365,
13,
... | 2.370787 | 89 |
"""
Author: Ibrahim Sherif
Date: December, 2021
This script used for ingesting data
"""
import os
import sys
import logging
import pandas as pd
from datetime import datetime
from config import DATA_PATH, INPUT_FOLDER_PATH
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
def merge_multiple_dataframe():
... | [
37811,
198,
13838,
25,
30917,
6528,
361,
198,
10430,
25,
3426,
11,
33448,
198,
1212,
4226,
973,
329,
26151,
278,
1366,
198,
37811,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
18931,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,... | 2.53886 | 579 |
import serial
import time
if __name__ == "__main__":
while True:
#
for freq in [1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 128000, 230400, 256000, 460800, 500000, 675000, 921600, 1000000]:
test_string = b"abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*(... | [
11748,
11389,
198,
11748,
640,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
981,
6407,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
198,
220,
220,
220,
220,
220,
220,
220,
329,
2030,
... | 1.601757 | 1,366 |
import argparse
import config
from utils import cwd
if __name__ == '__main__':
parser = argparse.ArgumentParser('Verify datasets.')
parser.add_argument(
'files',
nargs='*',
default=(
config.FILE_TRAINING,
config.FILE_VALIDATION,
config.FILE_TESTIN... | [
11748,
1822,
29572,
198,
198,
11748,
4566,
198,
6738,
3384,
4487,
1330,
269,
16993,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
10786,
134... | 2.025189 | 397 |
"""
********************************************************************************
compas_igs.utilities
********************************************************************************
.. currentmodule:: compas_igs.utilities
.. autosummary::
:toctree: generated/
compute_force_drawingscale
compute_forc... | [
37811,
198,
17174,
17174,
8412,
198,
5589,
292,
62,
9235,
13,
315,
2410,
198,
17174,
17174,
8412,
198,
198,
492,
1459,
21412,
3712,
552,
292,
62,
9235,
13,
315,
2410,
628,
198,
492,
44619,
388,
6874,
3712,
198,
220,
220,
220,
1058,
... | 3.781457 | 151 |
from __future__ import unicode_literals
from djangobmf.apps import ContribTemplate
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
648,
672,
76,
69,
13,
18211,
1330,
2345,
822,
30800,
628
] | 3.4 | 25 |
import numpy as np
from .variable import VariableScalar
from .expression import make_Expression
| [
11748,
299,
32152,
355,
45941,
198,
6738,
764,
45286,
1330,
35748,
3351,
282,
283,
198,
6738,
764,
38011,
1330,
787,
62,
16870,
2234,
198
] | 4 | 24 |
# Copyright (c) 2014 Scopely, Inc.
# Copyright (c) 2015 Mitch Garnaat
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanyin... | [
2,
15069,
357,
66,
8,
1946,
41063,
306,
11,
3457,
13,
198,
2,
15069,
357,
66,
8,
1853,
20472,
402,
28610,
265,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
921,
198,
2,
743... | 2.541078 | 3,116 |
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
from django.views.generic import ListView, DetailView
from django.views.generic.edit import FormView
from django.contrib.auth.decorators import login_required
from .forms import SearchMovieForm, MovieForm
from .models import ... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
19816,
1040,
1330,
23093,
37374,
35608,
259,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
7343,
7680,
11,
42585,
7680,
198,
... | 3.462264 | 106 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
import datetime
"""
Base Case:
Generate Cumulative Rewards with no battery use
"""
"""
Naive TOU Case:
Generat... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
13,
19581,
355,
285,
19581,
198,
198,
6738,
19798,
292,
13,
29487,
... | 2.163004 | 1,092 |
import numpy
import time | [
11748,
299,
32152,
198,
11748,
640
] | 4 | 6 |
#!/usr/bin/env python3
import unittest
from unittest.mock import Mock, patch
import sys, os
from io import StringIO
from rt_runticket_manager import RTManager, AuthorizationError, main
RT_SETTINGS = os.path.abspath(os.path.dirname(__file__) + '/rt_settings.ini')
if __name__ == '__main__':
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
11,
8529,
198,
11748,
25064,
11,
28686,
198,
6738,
33245,
1330,
10903,
9399,
198,
198,
6738,
374,
83,
62... | 2.745614 | 114 |
"""Define function to sort and merge an unsorted array."""
def mergesort(arr):
"""Define merge sort."""
left = arr[:len(arr)//2]
right = arr[len(arr)//2:]
if len(left) > 1:
left = mergesort(left)
if len(right) > 1:
right = mergesort(right)
lst = []
i, j = 0, 0
while i ... | [
37811,
7469,
500,
2163,
284,
3297,
290,
20121,
281,
5576,
9741,
7177,
526,
15931,
628,
198,
4299,
4017,
3212,
419,
7,
3258,
2599,
198,
220,
220,
220,
37227,
7469,
500,
20121,
3297,
526,
15931,
198,
220,
220,
220,
1364,
796,
5240,
58,
... | 1.850356 | 421 |
"""
Example of flow control and the case statement
"""
def flow_control_prime():
"""
example of nested loops and break statement
"""
for n in range(2, 10):
for x in range(2, n):
if n % x == 0:
print(n, 'equals', x, '*', n/x)
break
else... | [
37811,
198,
16281,
286,
5202,
1630,
290,
262,
1339,
2643,
198,
37811,
628,
628,
198,
198,
4299,
5202,
62,
13716,
62,
35505,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1672,
286,
28376,
23607,
290,
2270,
2643,
198,
220,
220,... | 2.060465 | 215 |
# -*- coding:utf-8 -*-
'''
MIT License
Copyright (c) 2019 李俊諭 JYUN-YU LI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to... | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
201,
198,
201,
198,
7061,
6,
201,
198,
36393,
13789,
201,
198,
201,
198,
15269,
357,
66,
8,
13130,
10545,
251,
236,
46479,
232,
164,
104,
255,
449,
56,
4944,
12,
56,
52,
246... | 3.297844 | 2,273 |
#!/usr/bin/python
# Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved
import os
import subprocess
import traceback
import numpy
import ConfigParser
from ion.reports import beadDensityPlot, plotKey
from ion.utils.blockprocessing import printtime, isbadblock
"""
def mergeRawPeakSignals(dirs):
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
15069,
357,
34,
8,
2321,
36404,
43399,
11998,
11,
3457,
13,
1439,
6923,
33876,
198,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
11748,
12854,
1891,
198,
11748,
299,
32152,
198,
11748,
... | 2.443831 | 543 |
# -*- coding: utf-8 -*-
"""
@Author : captain
@time : 18-7-10 下午8:42
@ide : PyCharm
"""
from .TextCNN import TextCNN
from .LSTM import LSTM
from .FastText import FastText
from .RCNN import RCNN
from .RCNN1 import RCNN1
from .AttLSTM import AttLSTM
from .GRU import GRU
from .Inception import InCNN
from .bigr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
31,
13838,
220,
1058,
10654,
198,
31,
2435,
220,
220,
220,
1058,
1248,
12,
22,
12,
940,
220,
10310,
233,
39355,
230,
23,
25,
3682,
198,
31,
485,
220... | 2.423611 | 144 |
import os
from config import StandardConfig, ArgparseConfig, COPWithModifiableDefaults, ConfigOptionMetadata, \
ConfigDefaultModification, ConfigPackageProvider
from config.config_option_packages import NameCOP, SaveDataCOP, OverwriteCOP, VisualizeCOP, ContinueCOP
from tracking.face_aabbox_tracking import FaceAABB... | [
11748,
28686,
198,
198,
6738,
4566,
1330,
8997,
16934,
11,
20559,
29572,
16934,
11,
27975,
3152,
5841,
16823,
7469,
13185,
11,
17056,
19722,
9171,
14706,
11,
3467,
198,
220,
220,
220,
17056,
19463,
5841,
2649,
11,
17056,
27813,
29495,
198... | 3.135231 | 281 |
#!/usr/bin/env python
"""Script that produced the test data.
"""
from pathlib import Path
import numpy as np
import pandas as pd
if __name__ == "__main__":
create_test_data()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
7391,
326,
4635,
262,
1332,
1366,
13,
198,
37811,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
628,
19... | 2.875 | 64 |
# Copyright (C) 2021 Intel Corporation
#
# 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 wri... | [
2,
15069,
357,
34,
8,
33448,
8180,
10501,
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,
... | 2.304422 | 588 |
import re
from re import match
from gluon.contrib.login_methods.email_auth import email_auth
#from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount
from gluon.tools import *
auth = Auth(globals(), db)
auth.define_tables()
auth.settings.create_user_... | [
11748,
302,
198,
6738,
302,
1330,
2872,
198,
6738,
1278,
84,
261,
13,
3642,
822,
13,
38235,
62,
24396,
82,
13,
12888,
62,
18439,
1330,
3053,
62,
18439,
198,
2,
6738,
1278,
84,
261,
13,
3642,
822,
13,
38235,
62,
24396,
82,
13,
2500... | 2.722477 | 436 |
import unittest
from board import Direction, Board
import tests.testdata as testdata
| [
11748,
555,
715,
395,
198,
6738,
3096,
1330,
41837,
11,
5926,
198,
11748,
5254,
13,
9288,
7890,
355,
1332,
7890,
198
] | 4.047619 | 21 |
"""
Tests meant to be run with pytest
"""
import pytest
from moviepy.editor import *
@pytest.fixture
| [
37811,
198,
51,
3558,
4001,
284,
307,
1057,
351,
12972,
9288,
198,
37811,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
3807,
9078,
13,
35352,
1330,
1635,
628,
198,
31,
9078,
9288,
13,
69,
9602,
198,
197,
198
] | 2.815789 | 38 |
from settings import DB_URL, DB_USER, DB_PASSWORD, DB_NAME
from sqlalchemy.ext.automap import automap_base
from sqlalchemy import create_engine
| [
6738,
6460,
1330,
20137,
62,
21886,
11,
20137,
62,
29904,
11,
20137,
62,
47924,
54,
12532,
11,
20137,
62,
20608,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
2306,
296,
499,
1330,
3557,
499,
62,
8692,
198,
6738,
44161,
282,
26599,
1330... | 3.152174 | 46 |
import unittest
import uuid
import lusid
import lusid.models as models
from lusid import OrderRequest
from lusid import OrderSetRequest
from lusid import PerpetualProperty
from lusid import PropertyValue
from lusid import ResourceId
from lusidfeature import lusid_feature
from utilities import InstrumentLoader
from util... | [
11748,
555,
715,
395,
198,
11748,
334,
27112,
198,
11748,
300,
385,
312,
198,
11748,
300,
385,
312,
13,
27530,
355,
4981,
198,
6738,
300,
385,
312,
1330,
8284,
18453,
198,
6738,
300,
385,
312,
1330,
8284,
7248,
18453,
198,
6738,
300,
... | 3.815217 | 92 |
import unittest
from test import support
from test.support import check_sanitizer
if check_sanitizer(address=True, memory=True):
raise unittest.SkipTest("Tests involvin libX11 can SEGFAULT on ASAN/MSAN builds")
# Skip test if _tkinter wasn't built.
support.import_module('_tkinter')
# Skip test if tk cannot be in... | [
11748,
555,
715,
395,
198,
6738,
1332,
1330,
1104,
198,
6738,
1332,
13,
11284,
1330,
2198,
62,
12807,
3029,
263,
198,
198,
361,
2198,
62,
12807,
3029,
263,
7,
21975,
28,
17821,
11,
4088,
28,
17821,
2599,
198,
220,
220,
220,
5298,
55... | 3.014925 | 134 |
import pavilion.sys_vars.base_classes as dumb_system_plugins
class DumbSysVar(dumb_system_plugins.SystemPlugin):
"""An always deferred system variable."""
| [
11748,
45549,
29935,
13,
17597,
62,
85,
945,
13,
8692,
62,
37724,
355,
13526,
62,
10057,
62,
37390,
628,
198,
4871,
42989,
44387,
19852,
7,
67,
2178,
62,
10057,
62,
37390,
13,
11964,
37233,
2599,
198,
220,
220,
220,
37227,
2025,
1464,... | 3.354167 | 48 |
from os.path import exists
from src.distribution_function import (
GaussianProbabilisticDistributionHandler,
BetaProbabilisticDistributionHandler
)
import cv2
def examine_show_or_save_figure_function(distribution_type: str) -> None:
'''Test show_figure, save_figure function.
Args:
distributio... | [
6738,
28686,
13,
6978,
1330,
7160,
198,
6738,
12351,
13,
17080,
3890,
62,
8818,
1330,
357,
198,
220,
220,
220,
12822,
31562,
2964,
65,
14991,
2569,
20344,
3890,
25060,
11,
198,
220,
220,
220,
17993,
2964,
65,
14991,
2569,
20344,
3890,
... | 2.679452 | 365 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as cp
from collections import OrderedDict
from torch import Tensor
from typing import Any, List, Tuple
from spectrai.networks.layers import BasicConv
from spectrai.networks.layer_utils import get_normalization, get_pooling... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
28034,
13,
26791,
13,
9122,
4122,
355,
31396,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
28034,
1330,... | 3.049911 | 561 |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | [
2,
15069,
3050,
1578,
1829,
5070,
355,
7997,
416,
262,
198,
2,
22998,
286,
262,
2351,
15781,
261,
2306,
873,
290,
4687,
8694,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
106... | 2.43128 | 1,055 |
"""Signals provide a way for applications to loosely couple themselves and respond to different life cycle events.
The `blinker`_ library provides the low-level signal implementation.
To use the signals you ``connect`` a receiver function to the signals you're interested in:
.. code-block:: python
from dynamorm... | [
37811,
11712,
874,
2148,
257,
835,
329,
5479,
284,
28845,
3155,
2405,
290,
3031,
284,
1180,
1204,
6772,
2995,
13,
198,
198,
464,
4600,
2436,
24275,
63,
62,
5888,
3769,
262,
1877,
12,
5715,
6737,
7822,
13,
198,
198,
2514,
779,
262,
1... | 3.048845 | 1,126 |
# -*- coding: utf-8 -*-
import logging
logging.getLogger('requests').setLevel(logging.INFO)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
6404,
2667,
13,
1136,
11187,
1362,
10786,
8897,
3558,
27691,
2617,
4971,
7,
6404,
2667,
13,
10778,
8,
198
] | 2.555556 | 36 |
# %%
import pandas as pd
from matminer.datasets import load_dataset
from pymatgen.ext.matproj import MPRester
from ml_matrics import ROOT
# %%
# needs MP API key in ~/.pmgrc.yml available at https://materialsproject.org/dashboard
# pmg config --add PMG_MAPI_KEY <your_key>
with MPRester() as mpr:
formulas = mpr.q... | [
2,
43313,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
2603,
1084,
263,
13,
19608,
292,
1039,
1330,
3440,
62,
19608,
292,
316,
198,
6738,
279,
4948,
265,
5235,
13,
2302,
13,
6759,
1676,
73,
1330,
337,
4805,
7834,
198,
198,
6738,... | 2.438095 | 315 |
import networkx
import matplotlib.pyplot as plot
import random
import math
"""This module is a graph-based social network model using networkx with a dictionaries of dictionaries
implementation. Please make sure to install the following dependencies before running:
- networkx: pip3 install networkx
... | [
11748,
3127,
87,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
7110,
198,
11748,
4738,
198,
11748,
10688,
198,
198,
37811,
1212,
8265,
318,
257,
4823,
12,
3106,
1919,
3127,
2746,
1262,
3127,
87,
351,
257,
48589,
3166,
286,
48589,... | 2.808784 | 4,121 |
#!/usr/bin/env python2
from __future__ import print_function
import matplotlib
from matplotlib import pyplot as plt
from scipy.cluster.hierarchy import dendrogram, linkage, cophenet, to_tree
import numpy as np
import json
import sys
import os
matplotlib.rcParams.update({'font.size': 18})
SHOWPLOT = 0
if len(sys.ar... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
2603,
29487,
8019,
198,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
6738,
629,
541,
88... | 2.274538 | 1,406 |
import FWCore.ParameterSet.Config as cms
L1GctConfigProducers = cms.ESProducer("L1GctConfigProducers",
JetFinderCentralJetSeed = cms.double(5.0),
JetFinderForwardJetSeed = cms.double(5.0),
TauIsoEtThreshold = cms.double(2.0),
HtJetEtThreshold = cms.double(10.0),
MHtJetEtThreshold = cms.double(10.0)... | [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
43,
16,
38,
310,
16934,
11547,
7999,
796,
269,
907,
13,
1546,
11547,
2189,
7203,
43,
16,
38,
310,
16934,
11547,
7999,
1600,
198,
220,
220,
220,
19013,
37,
554... | 1.862508 | 1,491 |
"""Provides access to fulltext content for arXiv papers."""
import json
from http import HTTPStatus
from functools import wraps
from urllib.parse import urljoin
import requests
from search.domain import Fulltext
from search.context import get_application_config, get_application_global
class FulltextSession(object)... | [
37811,
15946,
1460,
1895,
284,
1336,
5239,
2695,
329,
610,
55,
452,
9473,
526,
15931,
198,
198,
11748,
33918,
198,
6738,
2638,
1330,
14626,
19580,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
190... | 2.475336 | 1,338 |
# Originally written by Kevin Breen (@KevTheHermit):
# https://github.com/kevthehermit/RATDecoders/blob/master/DarkComet.py
import sys
import string
from struct import unpack
import pefile
from binascii import *
| [
2,
19486,
3194,
416,
7939,
347,
1361,
4275,
42,
1990,
464,
9360,
2781,
2599,
198,
2,
3740,
1378,
12567,
13,
785,
14,
365,
85,
1169,
372,
2781,
14,
49,
1404,
10707,
375,
364,
14,
2436,
672,
14,
9866,
14,
17367,
34,
908,
13,
9078,
... | 3.042857 | 70 |
# -*- coding: utf-8 -*-
from mfr.core import FileHandler, get_file_extension
from .render import render_pdf
EXTENSIONS = ['.pdf']
class Handler(FileHandler):
"""FileHandler for Portable Document Format files."""
renderers = {
'html': render_pdf,
}
exporters = {}
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
285,
8310,
13,
7295,
1330,
9220,
25060,
11,
651,
62,
7753,
62,
2302,
3004,
198,
6738,
764,
13287,
1330,
8543,
62,
12315,
628,
198,
13918,
16938,
11053,
796,
685,
... | 2.754717 | 106 |
#! python3
# Author: Elsaid Salem
# Credits: Gabor Szabo, GeeksForGeeks, Andrew Krcatovich
# Notes: use .xls format for the excel, make sure to add a no_images dir to the output location in -o param
#tahsine: x 23, y 445
# Known Issues:
'''
- two files are created, need to delete image-less one, for now sort by .pd... | [
2,
0,
21015,
18,
198,
198,
2,
6434,
25,
2574,
30079,
31988,
198,
2,
29501,
25,
402,
4820,
27974,
34748,
11,
402,
32201,
1890,
38,
32201,
11,
6858,
509,
6015,
265,
18198,
198,
2,
11822,
25,
779,
764,
87,
7278,
5794,
329,
262,
27336... | 3.35049 | 816 |
#!/usr/bin/env python
from website import app
# Build logger if doesn't exist
import os
if not os.path.exists('/tmp/log.csv'):
os.mknod('/tmp/log.csv')
app.run(debug=True)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
3052,
1330,
598,
198,
198,
2,
10934,
49706,
611,
1595,
470,
2152,
198,
11748,
28686,
198,
198,
361,
407,
28686,
13,
6978,
13,
1069,
1023,
10786,
14,
22065,
14,
6404,
13,
40664,
... | 2.486111 | 72 |
import time
from django.forms import Widget
from django.urls import reverse
from django.utils import baseconv
from django.core.signing import Signer
signer = Signer() | [
11748,
640,
198,
198,
6738,
42625,
14208,
13,
23914,
1330,
370,
17484,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
42625,
14208,
13,
26791,
1330,
2779,
42946,
198,
6738,
42625,
14208,
13,
7295,
13,
12683,
278,
1330,
58... | 3.36 | 50 |
# vim: set encoding=utf-8
# Copyright (c) 2016 Intel Corporation
#
# 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,
43907,
25,
900,
21004,
28,
40477,
12,
23,
198,
198,
2,
220,
15069,
1849,
7,
66,
8,
1849,
5304,
8180,
1849,
10606,
1819,
341,
1849,
198,
2,
198,
2,
220,
49962,
1849,
4625,
1849,
1169,
1849,
25189,
4891,
1849,
34156,
11,
1849,
14... | 2.749707 | 3,412 |
import os, sys
import PIL
from PIL import Image
import argparse
import glob
# TODO Change the image resize method to be more dynamic. As in add a loop to do the given sizes instead of the presets
default_sizes = ['18', '36', '72'] # Twitchs required Sub Badge sizes
if __name__ == '__main__':
pars... | [
11748,
28686,
11,
25064,
201,
198,
11748,
350,
4146,
201,
198,
6738,
350,
4146,
1330,
7412,
201,
198,
11748,
1822,
29572,
201,
198,
11748,
15095,
201,
198,
201,
198,
201,
198,
2,
16926,
46,
9794,
262,
2939,
47558,
2446,
284,
307,
517,... | 2.000594 | 1,684 |
#!/usr/bin/env python
#
# Copyright (c) 2018, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
220,
15069,
357,
66,
8,
2864,
11,
383,
4946,
16818,
46665,
13,
198,
2,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
2297,
396,
3890,
290,
779,
287,
2723,
290,
1393... | 3.117992 | 1,534 |
from collections import deque
from tkinter import *
| [
6738,
17268,
1330,
390,
4188,
198,
6738,
256,
74,
3849,
1330,
1635,
198
] | 4 | 13 |
#Personal message:
Personel_name = "Tony"
message = "You are doing great in coding."
print(Personel_name + "! " + message)
| [
2,
30228,
3275,
25,
220,
198,
198,
15439,
417,
62,
3672,
796,
366,
29387,
1,
198,
198,
20500,
796,
366,
1639,
389,
1804,
1049,
287,
19617,
526,
198,
198,
4798,
7,
15439,
417,
62,
3672,
1343,
366,
0,
366,
1343,
3275,
8,
198
] | 2.953488 | 43 |
from Blocktrace.Protobufs.bstream.v1 import bstream_pb2_grpc, bstream_pb2
from Blocktrace.Protobufs.eosio.codec.v1 import codec_pb2_grpc, codec_pb2
| [
6738,
9726,
40546,
13,
19703,
672,
3046,
82,
13,
65,
5532,
13,
85,
16,
1330,
275,
5532,
62,
40842,
17,
62,
2164,
14751,
11,
275,
5532,
62,
40842,
17,
198,
6738,
9726,
40546,
13,
19703,
672,
3046,
82,
13,
68,
418,
952,
13,
19815,
... | 2.387097 | 62 |
from rest_framework import generics, filters, permissions, viewsets, mixins, serializers, status
from rest_framework.response import Response
from django_pyowm.models import Location, Forecast
from weather_api.weather.utils import fetch_forecast_for_location
from .serializers import LocationSerializer, ForecastSeriali... | [
6738,
1334,
62,
30604,
1330,
1152,
873,
11,
16628,
11,
21627,
11,
5009,
1039,
11,
5022,
1040,
11,
11389,
11341,
11,
3722,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
42625,
14208,
62,
9078,
322,
76,
13,
27530,
1330,... | 3.229268 | 410 |
#!/usr/bin/env python
from collections import defaultdict
from re import compile
if __name__ == "__main__":
import sys
output(xref(sys.argv[1] if sys.argv[1:] else "xref.py"))
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
302,
1330,
17632,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1330,
25064,
198,
220,
220... | 2.661972 | 71 |
# encoding: utf-8
import argparse
import logging
import os
from solr_tasks.lib import utils
from solr_tasks.lib.solr import SolrCollection, solr_collections
if '__main__' == __name__:
main()
| [
2,
21004,
25,
3384,
69,
12,
23,
628,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
6738,
1540,
81,
62,
83,
6791,
13,
8019,
1330,
3384,
4487,
198,
6738,
1540,
81,
62,
83,
6791,
13,
8019,
13,
34453,
81,
1330,
4... | 2.701299 | 77 |
import unittest
from pyalink.alink import *
import numpy as np
import pandas as pd | [
11748,
555,
715,
395,
198,
6738,
12972,
282,
676,
13,
282,
676,
1330,
1635,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67
] | 3.037037 | 27 |
from . import points, graph, biomes, elevation, land, rivers, regions
__all__ = ['points', 'graph', 'biomes', 'elevation', 'land', 'rivers', 'regions']
| [
6738,
764,
1330,
2173,
11,
4823,
11,
3182,
2586,
11,
22910,
11,
1956,
11,
18180,
11,
7652,
198,
198,
834,
439,
834,
796,
37250,
13033,
3256,
705,
34960,
3256,
705,
8482,
2586,
3256,
705,
68,
2768,
341,
3256,
705,
1044,
3256,
705,
38... | 3.06 | 50 |
begin_unit
comment|'# Copyright (c) 2012 Rackspace Hosting'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n'
c... | [
27471,
62,
20850,
198,
23893,
91,
6,
2,
15069,
357,
66,
8,
2321,
37927,
13200,
14504,
278,
6,
198,
21283,
91,
6,
59,
77,
6,
198,
23893,
91,
6,
2,
1439,
6923,
33876,
2637,
198,
21283,
91,
6,
59,
77,
6,
198,
23893,
91,
6,
2,
6... | 1.973076 | 25,442 |
# -*- coding: utf-8 -*-
"""
jishaku.modules
~~~~~~~~~~~~~~
Functions for managing and searching modules.
:copyright: (c) 2021 Devon (Gorialis) R
:license: MIT, see LICENSE for more details.
"""
import pathlib
import typing
import pkg_resources
from braceexpand import UnbalancedBracesError, braceexpand
from diskor... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
73,
680,
8719,
13,
18170,
198,
15116,
8728,
4907,
198,
198,
24629,
2733,
329,
11149,
290,
10342,
13103,
13,
198,
198,
25,
22163,
4766,
25,
357,
66,
8,... | 2.565415 | 879 |