content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
import gspread
import config
from oauth2client.service_account import ServiceAccountCredentials as Account
api_url = 'https://api.leaseweb.com/invoices/v1/invoices'
# Google sheet
scope = ['https://spreadsheets.google.com/feeds',
'https://www... | [
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,
11748,
7007,
198,
11748,
308,
43639,
198,
11748,
4566,
198,
6738,
267,
18439,
17,
16366,
13,
15271,
62,
23317,... | 2.527473 | 273 |
# -*- coding: utf-8 -*-
import ast
import redis
import socket
import hashlib
import pymongo
from scrapy import Request
from w3lib.url import canonicalize_url
from scrapy.utils.python import to_bytes
def get_str_md5(string: str, encoding='utf-8'):
"""
MD5
:param string:
:param encoding:
:return:
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
6468,
198,
11748,
2266,
271,
198,
11748,
17802,
198,
11748,
12234,
8019,
198,
11748,
279,
4948,
25162,
198,
6738,
15881,
88,
1330,
19390,
198,
6738,
266,
18,
8019,
... | 2.139576 | 1,132 |
from __future__ import annotations
import decimal
from ctc.toolbox import validate_utils
from . import cpmm_spec
def trade(
x_reserves: int | float,
y_reserves: int | float,
x_sold: int | float | None = None,
x_bought: int | float | None = None,
y_sold: int | float | None = None,
y_bought: i... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
32465,
198,
198,
6738,
269,
23047,
13,
25981,
3524,
1330,
26571,
62,
26791,
198,
6738,
764,
1330,
31396,
3020,
62,
16684,
628,
198,
4299,
3292,
7,
198,
220,
220,
220,
2124,
62,
41... | 2.000541 | 3,695 |
#!/usr/bin/env python3
import boto3
import csv
import json
import re
import os
import logging
from multiprocessing import Pool
import sys
sys.path.insert(0, './lib')
from kafka import KafkaProducer
lambda_client = boto3.client('lambda')
bucket_name = None
kafka_topic = None
logging.basicConfig(format='%(levelname)s... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
275,
2069,
18,
198,
11748,
269,
21370,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
18931,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
198,
198,
... | 2.461957 | 552 |
from django.contrib import admin
from .models import Noticia
# Register your models here.
admin.site.register(Noticia) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
1892,
33577,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
28482,
13,
15654,
13,
30238,
7,
3673,
33577,
8
] | 3.606061 | 33 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 6 14:09:05 2020
@author: yannis
"""
import torch
import random
from pdb import set_trace as bp
from a2c_ppo_acktr.envs import make_vec_envs
from a2c_ppo_acktr.utils import get_vec_normalize
import motion_imitation
import time
import numpy as np
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2758,
220,
718,
1478,
25,
2931,
25,
2713,
12131,
198,
198,
31,
9800,
25,
331,
45017... | 2.397351 | 302 |
# -*- coding: utf-8 -*-
import ast
import os
import re
from setuptools import find_packages, setup
setup(
name='hailstorms',
version='1.0.5',
description="Distributed load testing framework",
long_description="""Hailstorm is a simplified config based, distributed load testing framework""",
classif... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
6468,
198,
11748,
28686,
198,
11748,
302,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,... | 2.423547 | 654 |
#
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
2,
198,
2,
15069,
7358,
12,
1238,
2481,
41992,
4912,
31703,
12052,
13,
198,
2,
220,
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,
118... | 2.284421 | 1,547 |
import csv
import logging
__all__ = (
'read_synonyms',
)
LOGGER = logging.getLogger(__name__)
def read_synonyms(path):
"""Read synonyms.
Read synonyms from the following format:
word_id;preferred_EN;variant1;variant2;variant3;variant4;variant5
1;Anatolia;anatolia;anatolie;anatolien;;
... | [
11748,
269,
21370,
198,
11748,
18931,
198,
198,
834,
439,
834,
796,
357,
198,
220,
220,
220,
705,
961,
62,
28869,
43612,
3256,
198,
8,
198,
198,
25294,
30373,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
4299,
... | 2.004608 | 868 |
from selenium import webdriver
import selenium
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
import re
STATUS_OUTPUT = \
'''Video: {0}
Status... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
11748,
384,
11925,
1505,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
13,
9019,
1330,
5313,
32103,
21321,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
1330,
2938,
... | 2.479969 | 1,298 |
import abc
import dataclasses as dc
import enum
import types as pytypes
from collections import Counter
from functools import wraps, partial
from typing import Sequence, Callable, Type as PyType, Dict, Any, Optional
import networkx as nx
import statey as st
from statey import resource, task, exc
from statey.provider ... | [
11748,
450,
66,
198,
11748,
4818,
330,
28958,
355,
30736,
198,
11748,
33829,
198,
11748,
3858,
355,
12972,
19199,
198,
6738,
17268,
1330,
15034,
198,
6738,
1257,
310,
10141,
1330,
27521,
11,
13027,
198,
6738,
19720,
1330,
45835,
11,
4889,... | 2.674134 | 982 |
from .vec2_double import Vec2Double
from .vec2_double import Vec2Double
from .jump_state import JumpState
from .weapon import Weapon
| [
6738,
764,
35138,
17,
62,
23352,
1330,
38692,
17,
25628,
198,
6738,
764,
35138,
17,
62,
23352,
1330,
38692,
17,
25628,
198,
6738,
764,
43327,
62,
5219,
1330,
15903,
9012,
198,
6738,
764,
28741,
1330,
13072,
198
] | 3.594595 | 37 |
from django.urls import path
from django.conf.urls import url
from .views import (home, capitulo_detalle, buscador, app, app_ios)
from .api import CapitulosList, CapitulosDetail
app_name = 'web'
urlpatterns = [
url(r'^$', home, name='home'),
url(r'^capitulo/(?P<slug>[-\w]+)/$', capitulo_detalle, name='capitulo_det... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
764,
33571,
1330,
357,
11195,
11,
46964,
43348,
62,
15255,
6765,
11,
1323,
66,
7079,
11,
598,
11,
598,
62,
4267,
... | 2.34359 | 195 |
# Generated by the protocol buffer compiler. DO NOT EDIT!
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = descriptor.FileDescriptor(
name='metadata.proto',
... | [
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
43087,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
3275,
198,
6738,
23645,
13,
11235,
672,
3046,
1330,
145... | 2.298596 | 10,613 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from pages.mobile.b... | [
2,
770,
8090,
6127,
5178,
318,
2426,
284,
262,
2846,
286,
262,
29258,
5094,
198,
2,
13789,
11,
410,
13,
362,
13,
15,
13,
1002,
257,
4866,
286,
262,
4904,
43,
373,
407,
9387,
351,
428,
198,
2,
2393,
11,
921,
460,
7330,
530,
379,
... | 3.336634 | 101 |
from response import ResponseObj
from response import RequestHandler
from request import RequestObjNew
import tornado.web
import traceback
import tornado.gen
import tornado.ioloop
import tornado.concurrent
import logging
from lib.customException import ApplicationException
import globalsObj
import re
import jwtoken.li... | [
6738,
2882,
1330,
18261,
49201,
198,
6738,
2882,
1330,
19390,
25060,
198,
6738,
2581,
1330,
19390,
49201,
3791,
198,
198,
11748,
33718,
13,
12384,
198,
11748,
12854,
1891,
198,
11748,
33718,
13,
5235,
198,
11748,
33718,
13,
1669,
11224,
1... | 3.909091 | 99 |
"""consumerwebsocket"""
from django.conf.urls import url
from django.urls import path
from . import consumers
websocket_urlpatterns = [
# url(r'^ws/chat/(?P<room_name>[^/]+)/$', consumers.ChatConsumer),
path('ws/chat/<room_name>/', consumers.ChatConsumer),
path('wss/chat/<room_name>/', consumers.ChatCons... | [
37811,
49827,
732,
1443,
5459,
37811,
198,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
1330,
7008,
198,
198,
732,
1443,
5459,
62,
6371,
33279,
... | 2.674286 | 175 |
import boto3
import typing
import functools
from ._bases import BaseMixin
from ..utils import logging
| [
11748,
275,
2069,
18,
198,
11748,
19720,
198,
11748,
1257,
310,
10141,
198,
198,
6738,
47540,
65,
1386,
1330,
7308,
35608,
259,
198,
6738,
11485,
26791,
1330,
18931,
628
] | 3.586207 | 29 |
import logging
import os
import sys
import traceback
from itertools import cycle
import discord
from discord.ext import commands, tasks
# Log information about bot operations.
logging.basicConfig(level=logging.INFO)
# Get Discord token from environmental variable.
DISCORD_BOT_TOKEN = os.getenv("DISCORD_BOT_TOKEN")
... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
6738,
340,
861,
10141,
1330,
6772,
198,
198,
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
11,
8861,
198,
198,
2,
5972,
1321,
546,
10214,
4560,
13... | 2.669811 | 530 |
from termcolor import cprint, colored
# Reference: https://ufal.mff.cuni.cz/pdt/Morphology_and_Tagging/Doc/hmptagqr.html
# Morphodita online demo: http://lindat.mff.cuni.cz/services/morphodita/
categories = [
{'POS': 'Part of Speech'},
{'SUBPOS': 'Detailed Part of Speech'},
{'GENDER': 'Gender'},
{'NUM... | [
6738,
3381,
8043,
1330,
269,
4798,
11,
16396,
198,
198,
2,
20984,
25,
3740,
1378,
3046,
282,
13,
76,
487,
13,
66,
35657,
13,
26691,
14,
79,
28664,
14,
44,
13425,
1435,
62,
392,
62,
51,
16406,
14,
23579,
14,
23940,
457,
363,
80,
... | 2.410272 | 5,082 |
# Real-time human segmentation with a web camera
# Modules
import cv2
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import time
import torch
from torchvision import transforms
# Use GPU if available
device = 'cuda' if torch.cuda.is_available() else 'cpu'
# Load Pretrained DeepLabV3
model =... | [
2,
6416,
12,
2435,
1692,
10618,
341,
351,
257,
3992,
4676,
198,
198,
2,
3401,
5028,
198,
11748,
269,
85,
17,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
133... | 2.721212 | 660 |
from __future__ import unicode_literals
from telesign.rest import RestClient
TELEBUREAU_CREATE_RESOURCE = "/v1/telebureau/event"
TELEBUREAU_RETRIEVE_RESOURCE = "/v1/telebureau/event/{reference_id}"
TELEBUREAU_DELETE_RESOURCE = "/v1/telebureau/event/{reference_id}"
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
13632,
274,
570,
13,
2118,
1330,
8324,
11792,
198,
198,
9328,
2538,
33,
11335,
26830,
62,
43387,
6158,
62,
19535,
31033,
796,
12813,
85,
16,
14,
46813,
65,
62... | 2.552381 | 105 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 24 11:26:20 2018
@author: nbaya
"""
import os
import glob
import re
import pandas as pd
from subprocess import call
from joblib import Parallel, delayed
import multiprocessing
import sys
import numpy as np
v3_path = "/Users/nbaya/Documents/lab/u... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
5979,
1987,
1367,
25,
2075,
25,
1238,
2864,
198,
198,
31,
9800,
25,
299,
65,
11729... | 2.369613 | 2,297 |
import time
if __name__ == "__main__":
# execute only if
# run as a script
f("oo") | [
11748,
640,
198,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1303,
12260,
691,
611,
220,
198,
220,
220,
220,
1303,
1057,
355,
257,
4226,
198,
220,
220,
220,
277,
7203,
2238,
... | 2.272727 | 44 |
a = Solution()
print a.countComponents(5, [[0, 1], [1, 2], [2, 3], [3, 4]])
print a.countComponents(5, [[0,1],[1,2],[0,2],[3,4]])
| [
628,
198,
64,
796,
28186,
3419,
198,
4798,
257,
13,
9127,
7293,
3906,
7,
20,
11,
16410,
15,
11,
352,
4357,
685,
16,
11,
362,
4357,
685,
17,
11,
513,
4357,
685,
18,
11,
604,
11907,
8,
198,
4798,
257,
13,
9127,
7293,
3906,
7,
20... | 2.015152 | 66 |
#!/usr/bin/python3
# 10-divisible_by_2.py
def divisible_by_2(my_list=[]):
"""Find all multiples of 2 in a list."""
multiples = []
for i in range(len(my_list)):
if my_list[i] % 2 == 0:
multiples.append(True)
else:
multiples.append(False)
return (multiples)
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
838,
12,
7146,
12843,
62,
1525,
62,
17,
13,
9078,
628,
198,
4299,
2659,
12843,
62,
1525,
62,
17,
7,
1820,
62,
4868,
28,
21737,
2599,
198,
220,
220,
220,
37227,
16742,
477,
5021,
... | 2.045455 | 154 |
import codegen
from arm.insts import arm_insts
with open('InstSema.arm.cpp', 'w') as f:
codegen.emit_instruction_bindings(arm_insts, 'ArmInsts', f)
with open('InstWrappers.arm.c', 'w') as f:
f.write('#include <arm_neon.h>\n')
codegen.emit_wrappers(arm_insts, f)
| [
11748,
2438,
5235,
198,
6738,
3211,
13,
259,
6448,
1330,
3211,
62,
259,
6448,
198,
198,
4480,
1280,
10786,
6310,
13900,
64,
13,
1670,
13,
20322,
3256,
705,
86,
11537,
355,
277,
25,
198,
220,
2438,
5235,
13,
368,
270,
62,
8625,
2762,... | 2.327586 | 116 |
# Copyright 2022 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from django.http import HttpResponse
from django.views import View
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
... | [
2,
15069,
33160,
33436,
12,
2043,
11,
2059,
286,
2669,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
33571,
13... | 3.490798 | 163 |
'''Constants for MachineThematicAnalysis Toolkit'''
import sys
import os
import shutil
import platform
import wx
#import wx.lib.agw.flatnotebook as FNB
import External.wxPython.flatnotebook_fix as FNB
CUR_VER = '0.8.11'
#Variables to configure GUI
FNB_STYLE = FNB.FNB_DEFAULT_STYLE|FNB.FNB_HIDE_ON_SINGLE_TAB|FNB.FNB_N... | [
7061,
6,
34184,
1187,
329,
10850,
464,
13849,
32750,
16984,
15813,
7061,
6,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
3859,
198,
11748,
266,
87,
198,
2,
11748,
266,
87,
13,
8019,
13,
363,
86,
13,
38568,
... | 2.09347 | 9,158 |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Any
from .stats import Stats
from functools import partial
from functools import partial
TargetDummy = partial(Champion, name="Target Dummy", hp=1000)
# create a partial function from the champion
Aatro... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
198,
361,
41876,
62,
50084,
2751,
25,
198,
220,
220,
220,
422,
19720,
1330,
4377,
198,
198,
6738,
764,
34242,
1330,
20595,
198,
198,
6738,
1257,
310,
... | 2.395189 | 291 |
#!/usr/bin/python
# Writer (c) 2012, MrStealth
# Rev. 1.1.1
# License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
# -*- coding: utf-8 -*-
import os
import sqlite3 as sqlite
import xbmcaddon
__addon__ = xbmcaddon.Addon(id='plugin.video.unified.search')
addon_path = __addon__.getAddonInfo('path... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
26606,
357,
66,
8,
2321,
11,
1770,
7447,
1094,
198,
2,
5416,
13,
352,
13,
16,
13,
16,
198,
2,
13789,
25,
45336,
12,
15419,
48401,
12,
11649,
32,
2339,
513,
13,
15,
791,
9213,
357,
... | 2.511628 | 129 |
'''
Author: Eunice Jun (@emjun)
Date created: November, 4, 2019
Purpose: Transform a wide format dataset into long format
Use: python3 longify.py <data_in_wide_format.csv>
'''
import sys
import csv
import pandas as pd
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Misusing script. Must include... | [
7061,
6,
198,
13838,
25,
412,
403,
501,
7653,
4275,
368,
29741,
8,
198,
10430,
2727,
25,
3389,
11,
604,
11,
13130,
220,
198,
30026,
3455,
25,
26981,
257,
3094,
5794,
27039,
656,
890,
5794,
198,
11041,
25,
21015,
18,
890,
1958,
13,
... | 2.220963 | 353 |
import autokeras as ak
from tensorflow.python.util import nest
from tf2cv.models.resnet import ResNet
LAYER_OPTIONS = [[1, 1, 1, 1], [2, 1, 1, 1], [2, 2, 1, 1], [2, 2, 2, 1], [2, 2, 2, 2], [3, 3, 3, 3],
[3, 4, 6, 3]]
| [
11748,
1960,
11020,
292,
355,
47594,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
22602,
1330,
16343,
198,
6738,
48700,
17,
33967,
13,
27530,
13,
411,
3262,
1330,
1874,
7934,
198,
198,
43,
4792,
1137,
62,
3185,
51,
11053,
796,
16410,
... | 1.884615 | 130 |
import os
import cv2
import numpy as np
directory = "/home/rider/DataSets/Images/Development/humanoid_soccer_dataset/ScreenshotMasks"
for filename in os.listdir(directory):
if filename.endswith(".txt"):
blank_image = np.zeros((480,640), np.uint8)
with open(os.path.join(directory, filename)) as f:
... | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
34945,
796,
12813,
11195,
14,
49449,
14,
6601,
50,
1039,
14,
29398,
14,
41206,
14,
10734,
1868,
62,
35634,
2189,
62,
19608,
292,
316,
14,
34204,
44,
6791,... | 2.139665 | 358 |
import sys, os
from serif.theory.serif_theory import SerifTheory
from serif.theory.enumerated_type import MentionType
from serif.util.serifxml_utils import CountryIdentifier
| [
11748,
25064,
11,
28686,
198,
198,
6738,
1055,
361,
13,
1169,
652,
13,
2655,
361,
62,
1169,
652,
1330,
2930,
361,
464,
652,
198,
6738,
1055,
361,
13,
1169,
652,
13,
268,
6975,
515,
62,
4906,
1330,
337,
1463,
6030,
198,
198,
6738,
... | 3.034483 | 58 |
# URI Online Judge
CPF = input().split('.')
XXX, YYY = CPF[0], CPF[1]
ZZZ, DD = CPF[2].split('-')[0], CPF[2].split('-')[1]
print(XXX)
print(YYY)
print(ZZZ)
print(DD)
| [
2,
43975,
7467,
8974,
198,
198,
8697,
37,
796,
5128,
22446,
35312,
10786,
2637,
8,
198,
198,
43145,
11,
575,
26314,
796,
16932,
37,
58,
15,
4357,
16932,
37,
58,
16,
60,
198,
30148,
57,
11,
20084,
796,
16932,
37,
58,
17,
4083,
3531... | 1.965116 | 86 |
#!/usr/bin/env python3
import requests
from bs4 import BeautifulSoup
import os
import base64
keyword = input('What do you want? ')
save_floder = input('Where do you want to save images?(Default as the current directory) ')
if save_floder == '': save_floder = os.getcwd()
if not os.path.exists(save_floder): os.mkdir(sa... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
28686,
198,
11748,
2779,
2414,
198,
198,
2539,
4775,
796,
5128,
10786,
2061,
466,
345,
765,
30,
705,
8,
1... | 2.298611 | 720 |
from flask import Flask, request
import requests
import json
import configparser
from api_interaction import *
# read variables from config
credential = configparser.ConfigParser()
credential.read('cred.prod')
# Import credential
bearer_bot = credential['Webex']['WEBEX_TEAMS_TOKEN']
botEmail = credential['Webex']['... | [
6738,
42903,
1330,
46947,
11,
2581,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
4566,
48610,
198,
6738,
40391,
62,
3849,
2673,
1330,
1635,
198,
198,
2,
1100,
9633,
422,
4566,
198,
66,
445,
1843,
796,
4566,
48610,
13,
16934,
46677,
... | 2.830189 | 265 |
from aiohttp import web, WSMsgType
import asyncio
from handlers.handler import Handler
| [
6738,
257,
952,
4023,
1330,
3992,
11,
25290,
50108,
6030,
198,
11748,
30351,
952,
198,
198,
6738,
32847,
13,
30281,
1330,
32412,
198
] | 3.826087 | 23 |
from library.ftx.base import AsyncBaseApiClass
| [
6738,
5888,
13,
701,
87,
13,
8692,
1330,
1081,
13361,
14881,
32,
14415,
9487,
198
] | 3.133333 | 15 |
from torchexpo.nlp.sentiment_analysis.electra import (electra_imdb)
from torchexpo.nlp.sentiment_analysis.distilbert import (distilbert_imdb) | [
6738,
7332,
2395,
87,
7501,
13,
21283,
79,
13,
34086,
3681,
62,
20930,
13,
9509,
430,
1330,
357,
9509,
430,
62,
320,
9945,
8,
198,
6738,
7332,
2395,
87,
7501,
13,
21283,
79,
13,
34086,
3681,
62,
20930,
13,
17080,
346,
4835,
1330,
... | 2.764706 | 51 |
import collections
import copy
import tensorflow as tf
| [
11748,
17268,
198,
11748,
4866,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
628,
628
] | 3.933333 | 15 |
import pprint
if __name__ == '__main__':
main()
| [
11748,
279,
4798,
220,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
628
] | 2.36 | 25 |
import rethinkdb as r
from pbkdf2 import crypt
import uuid
| [
11748,
36437,
9945,
355,
374,
198,
6738,
279,
65,
74,
7568,
17,
1330,
8194,
198,
11748,
334,
27112,
628,
198
] | 3.05 | 20 |
# Slixmpp: The Slick XMPP Library
# Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout
# This file is part of Slixmpp.
# See the file LICENSE for copying permission.
from datetime import datetime, timezone
from typing import Optional
from slixmpp import JID
from slixmpp.stanza import Presence
from slixmpp.plugi... | [
198,
2,
3454,
844,
76,
381,
25,
383,
3454,
624,
1395,
7378,
47,
10074,
198,
2,
15069,
357,
34,
8,
2211,
32607,
2271,
417,
327,
13,
45954,
11,
18990,
449,
13,
51,
13,
40275,
198,
2,
770,
2393,
318,
636,
286,
3454,
844,
76,
381,
... | 3.152941 | 170 |
from shlex import split as command_split
from subprocess import Popen, PIPE
from modules.Debug import log
| [
6738,
427,
2588,
1330,
6626,
355,
3141,
62,
35312,
198,
6738,
850,
14681,
1330,
8099,
268,
11,
350,
4061,
36,
198,
198,
6738,
13103,
13,
27509,
1330,
2604,
628,
628
] | 3.666667 | 30 |
import random
from math import sqrt
import numpy as np
from torch.utils.data import ConcatDataset, Dataset
from torchvision import transforms
| [
11748,
4738,
198,
6738,
10688,
1330,
19862,
17034,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
1482,
9246,
27354,
292,
316,
11,
16092,
292,
316,
198,
6738,
28034,
10178,
1330,
31408,
628,
198
] | 3.625 | 40 |
import math
import time
from scipy import interpolate
from threading import Lock
from abc import abstractmethod
from library.pid import PID
from stack import ActionStack
| [
11748,
10688,
198,
11748,
640,
198,
6738,
629,
541,
88,
1330,
39555,
378,
198,
6738,
4704,
278,
1330,
13656,
198,
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
5888,
13,
35317,
1330,
37022,
198,
198,
6738,
8931,
1330,
7561,
25896,
628,
... | 3.977778 | 45 |
from Canvas import Canvas
from Detector import Detector
from GUI import GUI
from Tracker import Tracker
from Function import *
from Video import Video
from Pen import Pens
from Key import Key
from Image import ImageManager
import tkinter
import tkinter.messagebox
import tkinter.font
import tkinter.simpledialog
import ... | [
6738,
1680,
11017,
1330,
1680,
11017,
198,
6738,
4614,
9250,
1330,
4614,
9250,
198,
6738,
25757,
1330,
25757,
198,
6738,
26885,
1330,
26885,
198,
6738,
15553,
1330,
1635,
198,
6738,
7623,
1330,
7623,
198,
6738,
7507,
1330,
38740,
198,
673... | 3.653465 | 101 |
"""Main entry point of the application"""
from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from fastapi.staticfiles import StaticFiles
from fastapi.middleware.cors import CORSMiddleware
from pymongo import MongoClient
from app.core.config import get_settings
from app.internal import create_ap... | [
37811,
13383,
5726,
966,
286,
262,
3586,
37811,
198,
6738,
3049,
15042,
1330,
12549,
17614,
198,
6738,
3049,
15042,
13,
16733,
274,
1330,
2297,
1060,
31077,
198,
6738,
3049,
15042,
13,
12708,
16624,
1330,
36125,
25876,
198,
6738,
3049,
15... | 2.545567 | 812 |
## @ingroup Methods-Geometry-Two_Dimensional-Cross_Section-Planform
# wing_fuel_volume.py
#
# Created: Apr 2014, T. Orra
# Modified: Sep 2016, E. Botero
# ----------------------------------------------------------------------
# Correlation-based methods for wing fuel capacity estimation
# ---------------------------... | [
2235,
2488,
278,
3233,
25458,
12,
10082,
15748,
12,
7571,
62,
35,
16198,
12,
21544,
62,
16375,
12,
20854,
687,
198,
2,
8539,
62,
25802,
62,
29048,
13,
9078,
198,
2,
198,
2,
15622,
25,
220,
2758,
1946,
11,
309,
13,
1471,
430,
198,
... | 2.655779 | 398 |
"""Find zero-crossings for individual cycles."""
from operator import gt, lt
import numpy as np
###################################################################################################
###################################################################################################
def find_zerox(sig, ... | [
37811,
16742,
6632,
12,
19692,
654,
329,
1981,
16006,
526,
15931,
198,
198,
6738,
10088,
1330,
308,
83,
11,
300,
83,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
29113,
29113,
29113,
21017,
198,
29113,
29113,
29113,
21017,
198,
19... | 2.669204 | 1,708 |
# coding: utf-8
import ctypes
# from objc_util import *
#import headers.gl_c
#import headers.glext_c
from OpenGLES.GLES.headers.gl_c import *
from OpenGLES.GLES.headers.glext_c import *
#reload(headers.gl_c)
# reload(headers.glext_c)
# ObjCClass("NSBundle").bundleWithPath_("/System/Library/Frameworks/OpenGLES.framew... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
269,
19199,
198,
2,
422,
26181,
66,
62,
22602,
1330,
1635,
198,
198,
2,
11748,
24697,
13,
4743,
62,
66,
198,
2,
11748,
24697,
13,
70,
293,
742,
62,
66,
198,
6738,
30672,
1546,
13,
8763... | 2.609375 | 128 |
import os
__version__ = '1.0.1'
| [
11748,
28686,
198,
198,
834,
9641,
834,
796,
705,
16,
13,
15,
13,
16,
6,
628,
198
] | 2.058824 | 17 |
import matplotlib.pyplot as plt
fig = plt.figure(facecolor="#979899")
ax = plt.gca()
ax.set_facecolor("#d1d1d1")
plt.xticks([1,2,3,4,5],["11/13\nTue","11/14\nWed","11/15\nThu","11/16\nFri","11/17\nSat"])
plt.yticks([0.0,0.1,0.2,0.3,0.4,0.5],["0 %","0.1 %","0.2 %","0.3 %","0.4 %","0.5 %"])
x = [1,2,3,4,5]
y = [0.31,0... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
5647,
796,
458,
83,
13,
26875,
7,
2550,
8043,
25698,
24,
43240,
2079,
4943,
198,
897,
796,
458,
83,
13,
70,
6888,
3419,
198,
897,
13,
2617,
62,
2550,
8043,
7203,
2... | 1.633136 | 338 |
import numpy as np
import matplotlib.pyplot as plt
if __name__ == "__main__":
main()
| [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.571429 | 35 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import json
import psycopg2
from typing import Dict, List, Tuple, Union
from abc import abstractmethod
import src.helpers
import src.util
from src.base_with_database_logger import BaseWithDatabaseAndLogger
from src.client.custom_sdk_client import CustomClient
from... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
17331,
22163,
70,
17,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
11,
... | 2.985075 | 134 |
import numpy as np
population_size = 35000000
admin1_nb = 10
admin1_share = np.array([0.005, 0.020, 0.045, 0.075, 0.095, 0.105, 0.125, 0.130, 0.150, 0.250])
admin1_size = admin1_share * population_size
if sum(admin1_share) != 1.000:
raise AssertionError("The admin level 1 shares must sum to 1")
# admin1 = np.r... | [
11748,
299,
32152,
355,
45941,
628,
198,
39748,
62,
7857,
796,
3439,
10535,
198,
198,
28482,
16,
62,
46803,
796,
838,
198,
28482,
16,
62,
20077,
796,
45941,
13,
18747,
26933,
15,
13,
22544,
11,
657,
13,
33618,
11,
657,
13,
40350,
11... | 1.768496 | 2,095 |
import sys
import yaml
if __name__ == '__main__':
main(*sys.argv[1:])
| [
11748,
25064,
198,
198,
11748,
331,
43695,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
46491,
17597,
13,
853,
85,
58,
16,
25,
12962,
198
] | 2.257143 | 35 |
from django.views.generic import TemplateView, CreateView
from django.urls import reverse_lazy
from .models import Contact
| [
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
37350,
7680,
11,
13610,
7680,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
62,
75,
12582,
198,
6738,
764,
27530,
1330,
14039,
628,
198
] | 3.787879 | 33 |
#!/usr/bin/env pypy3
'''
Testing 2D list (list of lists) data structure.
'''
import time
import random
from lib import benchmark, random_tuple
g_list = []
g_size = 0
g_count = 0
g_get_keys = []
g_set_keys = []
def setup(size, density):
''' Populated the table.
:param int size: total entries
:param flo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
279,
4464,
88,
18,
198,
198,
7061,
6,
198,
44154,
362,
35,
1351,
357,
4868,
286,
8341,
8,
1366,
4645,
13,
198,
7061,
6,
198,
198,
11748,
640,
198,
11748,
4738,
198,
198,
6738,
9195,
1330,
1833... | 2.103493 | 773 |
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | [
2,
15069,
13130,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
198,
2,
921,
743,
407,
779,
428,
2393,
... | 3.613043 | 230 |
# Copyright 2020 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | [
2,
15069,
12131,
2297,
10983,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921... | 3.82199 | 191 |
# Copyright 2020 The Trieste Contributors
#
# 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... | [
2,
15069,
12131,
383,
7563,
29872,
25767,
669,
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.941971 | 1,258 |
import pygame as pg
import state
from .. import util
| [
11748,
12972,
6057,
355,
23241,
198,
198,
11748,
1181,
198,
6738,
11485,
1330,
7736,
628,
628
] | 3.5625 | 16 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Some basic functions for image construction."""
import sys as _sys
import numpy as _np
from PyQt4 import QtGui as _qt
from qimageview import qimageview as _qimageview
if _sys.byteorder == 'little':
... | [
2,
795,
16436,
25,
532,
9,
12,
4235,
25,
21015,
26,
12972,
12,
521,
298,
12,
28968,
25,
604,
26,
33793,
12,
8658,
82,
12,
14171,
25,
18038,
532,
9,
12,
198,
2,
25357,
25,
900,
10117,
28,
29412,
39747,
28,
19,
40379,
28,
19,
15... | 2.050856 | 5,722 |
import numpy as np
def atom_to_numbers(atom_name, number_property):
"""
Function that contains useful conversions.
"""
name2number = {"H": 1, "He": 2, "Li": 3, "Be": 4, "B": 5, "C": 6, "N": 7, "O": 8, "F": 9, "Ne": 10, "Na": 11, "Mg": 12, "Al": 13, "Si": 14, "P": 15, "S": 16,
"Cl": 17, "Ar... | [
11748,
299,
32152,
355,
45941,
628,
198,
4299,
22037,
62,
1462,
62,
77,
17024,
7,
37696,
62,
3672,
11,
1271,
62,
26745,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
15553,
326,
4909,
4465,
32626,
13,
198,
220,
220,
220,
3722... | 1.890075 | 3,748 |
import random
import string
import uuid
from channels import Group
from django.db import models
from app.avalon import assign_roles, gen_role_list
from .util import lobby_json
| [
11748,
4738,
198,
11748,
4731,
198,
11748,
334,
27112,
198,
198,
6738,
9619,
1330,
4912,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
598,
13,
9226,
261,
1330,
8333,
62,
305,
829,
11,
2429,
62,
18090,
62,
4868,
198,
... | 3.529412 | 51 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# time_get_lock_info.py
# utils
#
# "Here's to the crazy ones. The misfits. The rebels.
# The troublemakers. The round pegs in the square holes.
# The ones who see things differently. They're not found
# of rules. And they have no respect for the status quo.
# You can q... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
640,
62,
1136,
62,
5354,
62,
10951,
13,
9078,
198,
2,
3384,
4487,
198,
2,
198,
2,
366,
4342,
3... | 2.499628 | 1,345 |
from django.core.management.base import BaseCommand
from ...test.factories import AddressFactory
| [
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
6738,
2644,
9288,
13,
22584,
1749,
1330,
17917,
22810,
628,
198
] | 4.125 | 24 |
import tensorflow as tf
tf.set_random_seed(42)
import numpy as np
from scipy import integrate
import neural_networks
import poisson_problem
import matplotlib.pyplot as plt
import sys, getopt
if __name__ == '__main__':
main(sys.argv[1:])
| [
11748,
11192,
273,
11125,
355,
48700,
220,
198,
27110,
13,
2617,
62,
25120,
62,
28826,
7,
3682,
8,
198,
198,
11748,
299,
32152,
355,
45941,
220,
198,
6738,
629,
541,
88,
1330,
19386,
198,
11748,
17019,
62,
3262,
5225,
198,
11748,
745,... | 2.772727 | 88 |
maxn = 1000000
isprime = [False] * 2 + [True] * maxn
for i in range(2, maxn):
if isprime[i]:
j = i*i
while j < maxn:
isprime[j] = False
j += i
ans = 0
for i in range(10, maxn):
if truncatable(i):
ans += i
print i
print ans
| [
9806,
77,
796,
1802,
2388,
198,
271,
35505,
796,
685,
25101,
60,
1635,
362,
1343,
685,
17821,
60,
1635,
3509,
77,
198,
1640,
1312,
287,
2837,
7,
17,
11,
3509,
77,
2599,
198,
197,
361,
318,
35505,
58,
72,
5974,
198,
197,
197,
73,
... | 2.059829 | 117 |
import click
from os import environ
from flask.cli import with_appcontext
@click.group('{{cookiecutter.app_slug}}')
def {{cookiecutter.app_slug}}():
"""Perform {{cookiecutter.app_name}} specific operations."""
@{{cookiecutter.app_slug}}.command()
| [
11748,
3904,
198,
6738,
28686,
1330,
551,
2268,
198,
6738,
42903,
13,
44506,
1330,
351,
62,
1324,
22866,
628,
198,
31,
12976,
13,
8094,
10786,
27007,
44453,
8968,
353,
13,
1324,
62,
6649,
1018,
11709,
11537,
198,
4299,
22935,
44453,
896... | 2.965116 | 86 |
from substrateinterface import SubstrateInterface, Keypair
from substrateinterface.exceptions import SubstrateRequestException
from scalecodec.type_registry import load_type_registry_file
import time
substrate = SubstrateInterface(
url='wss://ws.mof.sora.org',
ss58_format=69,
type_registry_preset='default'... | [
6738,
32305,
39994,
1330,
3834,
23104,
39317,
11,
7383,
24874,
198,
6738,
32305,
39994,
13,
1069,
11755,
1330,
3834,
23104,
18453,
16922,
198,
6738,
16578,
721,
375,
721,
13,
4906,
62,
2301,
4592,
1330,
3440,
62,
4906,
62,
2301,
4592,
6... | 2.647368 | 570 |
from re import S
from pydantic import BaseModel
from typing import Optional
| [
6738,
302,
1330,
311,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
198,
6738,
19720,
1330,
32233,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220
] | 3.148148 | 27 |
#!/pxrpythonsubst
#
# Copyright 2017 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
... | [
2,
48443,
8416,
81,
79,
5272,
684,
549,
301,
198,
2,
198,
2,
15069,
2177,
46706,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
25189,
4891,
13789,
4943,
198,
2,
351,
262,
1708,
17613,
26,
... | 3.664577 | 319 |
"""
Module to mutate sequences based on a variants list.
Assumptions for which no check is performed:
- Only ``deletion insertion`` operations.
- Only exact locations, i.e., no uncertainties such as `10+?`.
- Locations are zero-based right-open with ``start > end``.
- There is no overlapping between variants locat... | [
37811,
198,
26796,
284,
4517,
378,
16311,
1912,
319,
257,
17670,
1351,
13,
198,
198,
8021,
388,
8544,
329,
543,
645,
2198,
318,
6157,
25,
198,
532,
5514,
7559,
2934,
1616,
295,
36075,
15506,
4560,
13,
198,
532,
5514,
2748,
7064,
11,
... | 2.942675 | 942 |
import copy
from collections import defaultdict
inputs = [list(line) for line in open("day11/input").read().splitlines()]
nodes = defaultdict(lambda: [])
for y in range(len(inputs)):
for x in range(len(inputs[y])):
if inputs[y][x] != ".":
for i in range(-1, 2):
for j in range... | [
11748,
4866,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
15414,
82,
796,
685,
4868,
7,
1370,
8,
329,
1627,
287,
1280,
7203,
820,
1157,
14,
15414,
11074,
961,
22446,
35312,
6615,
3419,
60,
198,
198,
77,
4147,
796,
4277,
11600,
7,
... | 1.8528 | 625 |
# Generated by Django 2.2.3 on 2020-07-31 14:51
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
18,
319,
12131,
12,
2998,
12,
3132,
1478,
25,
4349,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14... | 3.019231 | 52 |
from __future__ import unicode_literals
DDF_HOME = find_ddf()
# TODO: find a better way to set this
SCALA_VERSION = '2.10'
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
628,
198,
198,
35,
8068,
62,
39069,
796,
1064,
62,
1860,
69,
3419,
198,
198,
2,
16926,
46,
25,
1064,
257,
1365,
835,
284,
900,
428,
198,
6173,
1847,
32,
62,
43717,
796,
7... | 2.591837 | 49 |
numbers = (x for x in range(1, 34) if x % 3 == 0)
numbers = filter(lambda x: x % 2, numbers)
numbers = map(lambda x: x ** 3, numbers)
numbers = list(numbers)
result = sum(numbers) / len(numbers)
| [
198,
77,
17024,
796,
357,
87,
329,
2124,
287,
2837,
7,
16,
11,
4974,
8,
611,
2124,
4064,
513,
6624,
657,
8,
198,
77,
17024,
796,
8106,
7,
50033,
2124,
25,
2124,
4064,
362,
11,
3146,
8,
198,
77,
17024,
796,
3975,
7,
50033,
2124,
... | 2.578947 | 76 |
# written by falsetru
import cookielib
import os
from contextlib import closing
import re
import getpass
import webbrowser
import sys
import requests
ext_to_lang = {
'.java' : 'java',
'.scala': 'scala',
'.hs' : 'hs',
'.py' : 'py',
'.js' : 'js',
'.rb' : 'rb',
'.c' : 'cpp',
... | [
2,
3194,
416,
27807,
316,
622,
198,
198,
11748,
4255,
8207,
571,
198,
11748,
28686,
198,
6738,
4732,
8019,
1330,
9605,
198,
11748,
302,
198,
11748,
651,
6603,
198,
11748,
3992,
40259,
198,
11748,
25064,
198,
198,
11748,
7007,
628,
198,
... | 2.160112 | 356 |
import numpy as np
import cv2
import open3d as o3d
from .original_repo_utils import *
np.random.seed(3)
MAX_CLASS_NUM = 100 # In the original model there are only 7 classes
segmenation_colors = np.random.randint(0, 255, (MAX_CLASS_NUM, 3)).astype("uint8")
| [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
1280,
18,
67,
355,
267,
18,
67,
198,
198,
6738,
764,
14986,
62,
260,
7501,
62,
26791,
1330,
1635,
198,
198,
37659,
13,
25120,
13,
28826,
7,
18,
8,
198,
198,
22921... | 2.537037 | 108 |
def calculate_strokes_gained(reference_value, user_putts):
'''Return the strokes gained based on reference and user input'''
return round((reference_value - user_putts), 2)
def calculate_strokes_gained_putting(reference_data, user_input):
'''Return the strokes gained value from a dictionary of user input
... | [
4299,
15284,
62,
20661,
5209,
62,
70,
1328,
7,
35790,
62,
8367,
11,
2836,
62,
1996,
912,
2599,
198,
220,
220,
220,
705,
7061,
13615,
262,
29483,
8618,
1912,
319,
4941,
290,
2836,
5128,
7061,
6,
198,
220,
220,
220,
1441,
2835,
19510,... | 2.759036 | 913 |
import os
import torch.nn
from torch import nn
from crf_torch import CRF
import re
import random
import time
from torch.optim import Adam
import torch.nn.functional as F
from datetime import timedelta
# TODO bug
def get_time_dif(start_time):
""""""
end_time = time.time()
time_dif = end_time - start_time
... | [
11748,
28686,
198,
11748,
28034,
13,
20471,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
1067,
69,
62,
13165,
354,
1330,
8740,
37,
198,
11748,
302,
198,
11748,
4738,
198,
11748,
640,
198,
6738,
28034,
13,
40085,
1330,
7244,
198,
11748,
... | 2.533473 | 478 |
"""
Copyright 2019 Goldman Sachs.
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 di... | [
37811,
198,
15269,
13130,
18740,
25158,
13,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
1639,
743,
7... | 3.869318 | 176 |
""" Utilities for OpenCOR
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2021-05-28
:Copyright: 2021, BioSimulators Team
:License: MIT
"""
from .data_model import KISAO_ALGORITHM_MAP
from biosimulators_utils.config import get_config, Config # noqa: F401
from biosimulators_utils.data_model import ValueType # noqa: F4... | [
37811,
41086,
329,
4946,
44879,
198,
198,
25,
13838,
25,
11232,
509,
3258,
1279,
74,
3258,
31,
76,
824,
76,
13,
15532,
29,
198,
25,
10430,
25,
33448,
12,
2713,
12,
2078,
198,
25,
15269,
25,
33448,
11,
16024,
8890,
24325,
4816,
198,
... | 2.342987 | 8,356 |
from .jogadores import Jogador
| [
6738,
764,
73,
519,
324,
2850,
1330,
449,
519,
7079,
198
] | 2.818182 | 11 |
# -*- coding: utf-8 -*-
import numpy as np
from scipy.stats import norm
from scipy.optimize import brentq
from arpym.tools.transpose_square_root import transpose_square_root
def saddle_point_quadn(y, alpha, beta, gamma, mu, sigma2):
"""For details, see here.
Parameters
----------
y : array, shape... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
34242,
1330,
2593,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
275,
1156,
80,
198,
6738,
610,
79,
4948,... | 1.965877 | 1,436 |
# -*- coding: utf-8 -*-
from dozer import Dozer
from .wsgi import application
application = Dozer(application)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
466,
9107,
1330,
2141,
9107,
198,
198,
6738,
764,
18504,
12397,
1330,
3586,
628,
198,
31438,
796,
2141,
9107,
7,
31438,
8,
198
] | 3 | 38 |
"""
This package groups all the built-in node classes offered by the `abstract_codegen` package.
"""
| [
37811,
198,
1212,
5301,
2628,
477,
262,
3170,
12,
259,
10139,
6097,
4438,
416,
262,
4600,
397,
8709,
62,
8189,
5235,
63,
5301,
13,
198,
37811,
198
] | 3.740741 | 27 |
from .DHT22 import sensor
import time
import pigpio
| [
6738,
764,
35,
6535,
1828,
1330,
12694,
198,
11748,
640,
198,
198,
11748,
12967,
79,
952,
198
] | 3.117647 | 17 |
# import the necessary packages
from keras.preprocessing import image as image_utils
from imagenet_utils import decode_predictions
from imagenet_utils import preprocess_input
from vgg16 import VGG16
import numpy as np
import argparse
import cv2
from keras.utils import np_utils
import matplotlib.pyplot as plt
from matpl... | [
2,
1330,
262,
3306,
10392,
198,
6738,
41927,
292,
13,
3866,
36948,
1330,
2939,
355,
2939,
62,
26791,
198,
6738,
3590,
268,
316,
62,
26791,
1330,
36899,
62,
28764,
9278,
198,
6738,
3590,
268,
316,
62,
26791,
1330,
662,
14681,
62,
15414... | 2.93273 | 773 |
'''Tests for methods.py'''
from methods import FuncName, Method, TVList
from common import Capitalizer
from protocol import DirectReturn
| [
7061,
6,
51,
3558,
329,
5050,
13,
9078,
7061,
6,
198,
6738,
5050,
1330,
11138,
66,
5376,
11,
11789,
11,
3195,
8053,
198,
6738,
2219,
1330,
9747,
7509,
198,
6738,
8435,
1330,
4128,
13615,
628,
628,
628,
628,
628,
198
] | 3.675 | 40 |
from django.db import models | [
6738,
42625,
14208,
13,
9945,
1330,
4981
] | 4 | 7 |
# stdlib
from typing import List, Sequence, Union
# 3rd party
import pytest
from coincidence.regressions import AdvancedDataRegressionFixture
from coincidence.selectors import min_version, not_windows, only_version
from domdf_python_tools.paths import PathPlus
from packaging.requirements import Requirement
from packag... | [
2,
14367,
8019,
198,
6738,
19720,
1330,
7343,
11,
45835,
11,
4479,
198,
198,
2,
513,
4372,
2151,
198,
11748,
12972,
9288,
198,
6738,
21083,
13,
2301,
601,
507,
1330,
13435,
6601,
8081,
2234,
37,
9602,
198,
6738,
21083,
13,
19738,
669,... | 2.446526 | 2,562 |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
2,
15069,
12131,
43208,
21852,
1766,
1539,
12052,
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... | 3.565079 | 315 |
# Copyright (C) 2007 Matthew Neeley
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed i... | [
2,
15069,
357,
34,
8,
4343,
220,
9308,
399,
1453,
1636,
198,
2,
198,
2,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
13789,
355,
3199,
... | 3.463277 | 354 |
# Generated by Django 2.2.16 on 2020-11-07 00:19
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1433,
319,
12131,
12,
1157,
12,
2998,
3571,
25,
1129,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.8 | 30 |
import requests
import pandas
try:
# Use ujson if available.
import ujson as json
except Exception:
import json
| [
11748,
7007,
198,
11748,
19798,
292,
198,
198,
28311,
25,
198,
220,
220,
220,
1303,
5765,
334,
17752,
611,
1695,
13,
198,
220,
220,
220,
1330,
334,
17752,
355,
33918,
198,
16341,
35528,
25,
198,
220,
220,
220,
1330,
33918,
628
] | 3.073171 | 41 |