content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from utils import s3
| [
6738,
3384,
4487,
1330,
264,
18,
628
] | 3.142857 | 7 |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import sys
# load a datafile, handle some command line args
smoothing = int(sys.argv[2]) # window size for smoothing
data_file = sys.argv[1]
name = data_file.split('/')[-1].split('.')[0] # used in output
df = pd.read_csv(data_file, index_col=None, ... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
25064,
198,
198,
2,
3440,
257,
1366,
7753,
11,
5412,
617,
3141,
1627,
26498,
198,
5796,
102... | 2.608618 | 557 |
from arcade.sprite import Sprite
from src.entities.ennemies.base_enemy import BaseEnemy
from os.path import join
from math import pi
| [
6738,
27210,
13,
34975,
578,
1330,
33132,
198,
6738,
12351,
13,
298,
871,
13,
1697,
5090,
13,
8692,
62,
46970,
1330,
7308,
4834,
3065,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
6738,
10688,
1330,
31028,
198,
220,
220,
220,
220,
628... | 3.309524 | 42 |
from bottle import Bottle, TEMPLATE_PATH
from bottle.ext import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
#from sqlalchemy.orm import sessionmaker
Base = declarative_base()
engine = create_engine('sqlite:///database.db', echo = True)
#create_session... | [
6738,
9294,
1330,
33608,
11,
309,
3620,
6489,
6158,
62,
34219,
201,
198,
6738,
9294,
13,
2302,
1330,
44161,
282,
26599,
201,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
201,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
... | 2.617761 | 259 |
# # -*- coding: utf-8 -*-
from polylogyx.celery.tasks import example_task
| [
2,
1303,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
7514,
6404,
28391,
13,
7015,
88,
13,
83,
6791,
1330,
1672,
62,
35943,
628
] | 2.5 | 30 |
import os
from configparser import ConfigParser
from app.domain.errors import NotFoundError
class AppConfig:
"""The configurations of the app at runtime"""
__instance = None
config = None
auth0_config = None
neo4j_config = None
@staticmethod
def _load_config() -> ConfigParser:
""... | [
11748,
28686,
198,
6738,
4566,
48610,
1330,
17056,
46677,
198,
198,
6738,
598,
13,
27830,
13,
48277,
1330,
1892,
21077,
12331,
628,
198,
4871,
2034,
16934,
25,
198,
220,
220,
220,
37227,
464,
25412,
286,
262,
598,
379,
19124,
37811,
198... | 2.571429 | 266 |
import torch
import torch.nn as nn
import numpy as np
from torch.autograd import Variable
import sys
from tqdm import tqdm
from util import helpers
from util.mahalanobis_lib import get_Mahalanobis_score, sample_estimator, sample_estimator_cifar10
from util.metrics import get_metrics
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
11748,
25064,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
198,
6738,
7736,
... | 3.108696 | 92 |
from rest_framework import status
from rest_framework.response import Response
from shared.audit_log.viewsets import AuditLoggingModelViewSet
from applications.api.v1.serializers import ApplicationSerializer
from applications.models import Application
| [
6738,
1334,
62,
30604,
1330,
3722,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
4888,
13,
3885,
270,
62,
6404,
13,
1177,
28709,
1330,
46450,
11187,
2667,
17633,
7680,
7248,
198,
198,
6738,
5479,
13,
15042,
13,
85,
16... | 4.45614 | 57 |
"""This component provides number entities for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import timedelta
import logging
from typing import Callable, Sequence
from homeassistant.components.number import NumberEntity, NumberEntityDescription
from homeassistant... | [
37811,
1212,
7515,
3769,
1271,
12066,
329,
43376,
10547,
21916,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
11748,
18931,
... | 2.340017 | 2,294 |
import matplotlib
import numpy as np
import pandas as pd
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
from torchvision import transforms
import cv2
from PIL import Image
import matplotlib.pyplot as plt
import glob
import os
from IPython.display import clear_output
from skimage.i... | [
11748,
2603,
29487,
8019,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28034,
198,
11748,
28034,
10178,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
3... | 3.019417 | 206 |
"""
Construct all subgroup graphs and their relations between them from a single space group.
"""
from __future__ import absolute_import, division, print_function
from cctbx import sgtbx
from cctbx.sgtbx import show_cosets
from cctbx.sgtbx import pointgroup_tools
from cctbx.development import debug_utils
import sys
... | [
37811,
198,
42316,
477,
850,
8094,
28770,
290,
511,
2316,
1022,
606,
422,
257,
2060,
2272,
1448,
13,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
628,
198,
6738,
269,
310,
65,
87,
13... | 2.825806 | 155 |
import service_factory | [
11748,
2139,
62,
69,
9548
] | 4.4 | 5 |
import json
import os
from os import listdir, path
from os.path import isfile, join
tasks_path = 'tasks/'
if __name__ == "__main__":
update_definitions(tasks_path)
| [
11748,
33918,
198,
11748,
28686,
198,
6738,
28686,
1330,
1351,
15908,
11,
3108,
198,
6738,
28686,
13,
6978,
1330,
318,
7753,
11,
4654,
198,
198,
83,
6791,
62,
6978,
796,
705,
83,
6791,
14,
6,
198,
198,
361,
11593,
3672,
834,
6624,
3... | 2.741935 | 62 |
# -*- coding: utf-8 -*-
from sklearn_export.Template import Template
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
1341,
35720,
62,
39344,
13,
30800,
1330,
37350,
628
] | 2.84 | 25 |
#!/usr/bin/env python
"""
Copyright 2014-2015 Taxamo, 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 app... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
15269,
1946,
12,
4626,
9241,
18811,
11,
12052,
13,
628,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
220,
220,
... | 3.454148 | 229 |
"""
usando Requests
trabalhando com proxies
"""
# importando modulo Requests
import requests
# proxies free
# http://www.ultrapoxies.com/
# https://www.hide-my-ip.com/pt/proxylist.shtml
url = 'https://www.hide-my-ip.com/pt/proxylist.shtml'
#proxies = {'https':'169.57.157.148:8123'}
proxies = {'http':'183.181.164.210:... | [
37811,
198,
385,
25440,
9394,
3558,
198,
2213,
44349,
4993,
78,
401,
41775,
198,
37811,
198,
2,
1330,
25440,
953,
43348,
9394,
3558,
198,
11748,
7007,
198,
198,
2,
41775,
1479,
198,
2,
2638,
1378,
2503,
13,
586,
2416,
1140,
444,
13,
... | 2.391753 | 194 |
from .api import Api | [
6738,
764,
15042,
1330,
5949,
72
] | 3.333333 | 6 |
from pydantic import BaseModel, Extra
| [
6738,
279,
5173,
5109,
1330,
7308,
17633,
11,
17221,
628
] | 3.9 | 10 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 2 12:52:01 2020
Circle Detection inspiration:
https://stackoverflow.com/questions/58109962/how-to-optimize-circle-detection-with-python-opencv
@author: modal
"""
#%% INIT
image_file_name = 'a2_a_cropped.jpg'
from well_plate_project.config import d... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
5267,
220,
362,
1105,
25,
4309,
25,
486,
12131,
198,
31560,
293,
46254,
12141,
25,
... | 2.422198 | 919 |
#!/bin/python
from roomai.games.texasholdem.TexasHoldemUtil import PokerCard
from roomai.games.texasholdem.TexasHoldemUtil import AllCardsPattern
from roomai.games.texasholdem.TexasHoldemUtil import AllPokerCards
from roomai.games.texasholdem.TexasHoldemUtil import Stage
from roomai.game... | [
2,
48443,
8800,
14,
29412,
198,
6738,
2119,
1872,
13,
19966,
13,
16886,
1077,
727,
368,
13,
21607,
26807,
368,
18274,
346,
220,
220,
220,
220,
220,
220,
220,
220,
1330,
36157,
16962,
198,
6738,
2119,
1872,
13,
19966,
13,
16886,
1077,
... | 2.898182 | 275 |
# An inefficient way I could think of to find prime numbers.
i = int(input("enter max "))
t=1
while t<i:
m=1
c=0
while m<i:
if t%m==0:
c+=1
m+=1
if c<=2:
print(t)
t+=1
| [
2,
1052,
30904,
835,
314,
714,
892,
286,
284,
1064,
6994,
3146,
13,
201,
198,
72,
796,
493,
7,
15414,
7203,
9255,
3509,
366,
4008,
201,
198,
83,
28,
16,
201,
198,
4514,
256,
27,
72,
25,
201,
198,
220,
220,
220,
285,
28,
16,
20... | 1.680851 | 141 |
"""
This file contains the CLI code for the maintenance commands.
References
----------
For the Rich package, colors are defined here:
https://rich.readthedocs.io/en/latest/appendix/colors.html#appendix-colors
"""
# -----------------------------------------------------------------------------
# System Imports... | [
37811,
198,
1212,
2393,
4909,
262,
43749,
2438,
329,
262,
9262,
9729,
13,
198,
198,
19927,
198,
35937,
198,
220,
220,
220,
1114,
262,
3998,
5301,
11,
7577,
389,
5447,
994,
25,
198,
220,
220,
220,
3740,
1378,
7527,
13,
961,
83,
704,
... | 2.457584 | 3,949 |
# -*- coding: utf-8 -*-
"""
sphinx.ext.todo
~~~~~~~~~~~~~~~
Allow todos to be inserted into your documentation. Inclusion of todos can
be switched of by a configuration variable. The todolist directive collects
all todos of your project and lists them along with a backlink to the
original loc... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
599,
20079,
87,
13,
2302,
13,
83,
24313,
198,
220,
220,
220,
220,
15116,
8728,
4907,
93,
628,
220,
220,
220,
22507,
284,
37427,
284,
307,
... | 2.859083 | 589 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
# Copyright (C) 2012 New Dream Network, LLC (DreamHost) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the Licens... | [
2,
43907,
25,
7400,
11338,
28,
19,
6482,
10394,
28,
19,
2705,
8658,
11338,
28,
19,
198,
198,
2,
220,
220,
220,
15069,
357,
34,
8,
2321,
16551,
0,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
220,
220,
220,
15069,
357,
34,
8,
2321,
... | 3.356209 | 306 |
import queue
import multiprocessing
import pangolin as pango
import OpenGL.GL as gl
import numpy as np
| [
11748,
16834,
198,
11748,
18540,
305,
919,
278,
198,
198,
11748,
279,
648,
24910,
355,
279,
14208,
198,
11748,
30672,
13,
8763,
355,
1278,
198,
11748,
299,
32152,
355,
45941,
198
] | 3.354839 | 31 |
import flask
import uuid
blueprint = flask.Blueprint("guid", __name__)
@blueprint.route("/guid/mint", methods=["GET"])
def mint_guid():
"""
Mint a GUID that is valid for this instance of indexd. The intention
of this endpoint is to allow generating valid GUIDs to be indexed
WITHOUT actually creating ... | [
11748,
42903,
198,
11748,
334,
27112,
198,
198,
17585,
4798,
796,
42903,
13,
14573,
4798,
7203,
5162,
312,
1600,
11593,
3672,
834,
8,
628,
198,
31,
17585,
4798,
13,
38629,
7203,
14,
5162,
312,
14,
34289,
1600,
5050,
28,
14692,
18851,
... | 2.61465 | 628 |
from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Event_user)
#class EventueAdmin(admin.ModelAdmin):
# list_display = ('title', 'description', 'get_date',)
admin.site.register(models.Task_user)
admin.site.register(models.User_Profile)
admin.site.regi... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
1330,
4981,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
198,
28482,
13,
15654,
13,
30238,
7,
27530,
13,
9237,
62,
7220,
8,
198,
2,
4871,
8558,
518,
46787,
7,
28... | 3.114754 | 122 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-09 13:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import projects.models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
319,
2864,
12,
3023,
12,
2931,
1511,
25,
3559,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738... | 2.916667 | 72 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 19 15:36:42 2020
@author: rakiki
"""
import numpy as np
import rasterio
# dataset construction
def pointCube(dim1_left, dim1_right, dim2_left, dim2_right
, alt_min, alt_max
, grid_len, num_layers):
'''
Constr... | [
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,
2556,
678,
1315,
25,
2623,
25,
3682,
12131,
198,
198,
31,
9800,
25,
374,
461,
5580,... | 2.138477 | 2,903 |
from flask import Blueprint
# Blueprint Configuration
auth_bp = Blueprint(
'auth_bp', __name__,
template_folder='templates',
static_folder='static'
)
from . import views | [
6738,
42903,
1330,
39932,
628,
198,
2,
39932,
28373,
198,
18439,
62,
46583,
796,
39932,
7,
198,
220,
220,
220,
705,
18439,
62,
46583,
3256,
11593,
3672,
834,
11,
198,
220,
220,
220,
11055,
62,
43551,
11639,
11498,
17041,
3256,
198,
22... | 3.210526 | 57 |
import time, random, configparser
from Classes.Base.Vector import Vector
from Loading.RandomGen import getRandomMagicWeapon, getRandomMagicCast, getRandomMonster
from Classes.Super.Weapon import Weapon
from Classes.Middle.Particle import Particle
from Classes.Super.Monster import Monster
from Loading.Objects import wea... | [
11748,
640,
11,
4738,
11,
4566,
48610,
198,
6738,
38884,
13,
14881,
13,
38469,
1330,
20650,
198,
6738,
12320,
13,
29531,
13746,
1330,
651,
29531,
22975,
27632,
11,
651,
29531,
22975,
19248,
11,
651,
29531,
40872,
198,
6738,
38884,
13,
1... | 3.5 | 198 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of th... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
5816,
12,
10531,
1717,
39909,
439,
10442,
198,
2,
15069,
357,
34,
8,
5816,
12,
15724,
40458,
29004,
2536,
9101,
76,
1279,
46286,
292,
3... | 2.809659 | 1,760 |
import serial
import time
ser = serial.Serial('/dev/ttyUSB0',115200,timeout = 1)
ser.write(0x42)
ser.write(0x57)
ser.write(0x02)
ser.write(0x00)
ser.write(0x00)
ser.write(0x00)
ser.write(0x01)
ser.write(0x06)
while(True):
while(ser.in_waiting >= 9):
#print ("a")
if(('Y' == ser.read... | [
11748,
11389,
201,
198,
11748,
640,
201,
198,
201,
198,
2655,
796,
11389,
13,
32634,
10786,
14,
7959,
14,
42852,
27155,
15,
3256,
15363,
2167,
11,
48678,
796,
352,
8,
201,
198,
2655,
13,
13564,
7,
15,
87,
3682,
8,
201,
198,
2655,
... | 1.79403 | 335 |
from datetime import datetime, time
from django import test as unittest
from django.test.client import RequestFactory
from dimagi.utils.dates import DateSpan
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.users.models import WebUser
from corehq.sql_db.connections import Session
from corehq.u... | [
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
198,
198,
6738,
42625,
14208,
1330,
1332,
355,
555,
715,
395,
198,
6738,
42625,
14208,
13,
9288,
13,
16366,
1330,
19390,
22810,
198,
198,
6738,
5391,
18013,
13,
26791,
13,
19581,
1330,
7536,
... | 3.31875 | 160 |
from munerator.store import handle_event, setup_eve_mongoengine
| [
6738,
29856,
263,
1352,
13,
8095,
1330,
5412,
62,
15596,
11,
9058,
62,
44655,
62,
76,
25162,
18392,
628,
628
] | 3.35 | 20 |
# coding: utf-8
# #Fire up graphlab create
# In[35]:
import graphlab
# #Load some house sales data
#
# Dataset is from house sales in King County, the region where the city of Seattle, WA is located.
# In[36]:
sales = graphlab.SFrame('home_data.gl/')
# In[37]:
sales
# #Exploring the data for housing sales... | [
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
1303,
13543,
510,
4823,
23912,
2251,
198,
198,
2,
554,
58,
2327,
5974,
198,
198,
11748,
4823,
23912,
628,
198,
2,
1303,
8912,
617,
2156,
4200,
1366,
198,
2,
220,
198,
2,
16092,
2... | 2.66595 | 2,326 |
import inspect
import os.path
import time
from two1.blockchain.twentyone_provider import TwentyOneProvider
from two1.bitcoin.hash import Hash
from two1.wallet.cache_manager import CacheManager
from two1.wallet.wallet_txn import WalletTransaction
this_file_path = os.path.dirname(os.path.abspath(inspect.getfile(inspec... | [
11748,
10104,
198,
11748,
28686,
13,
6978,
198,
11748,
640,
198,
198,
6738,
734,
16,
13,
9967,
7983,
13,
4246,
3787,
505,
62,
15234,
1304,
1330,
22381,
3198,
29495,
198,
6738,
734,
16,
13,
35395,
13,
17831,
1330,
21059,
198,
6738,
734... | 3.29661 | 118 |
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | [
2,
770,
670,
373,
2727,
416,
6809,
287,
262,
6060,
11651,
1628,
11,
290,
318,
198,
2,
26913,
33696,
416,
11983,
6712,
287,
6060,
11651,
13,
1114,
198,
2,
517,
1321,
319,
6060,
11651,
11,
766,
674,
3992,
2524,
379,
2638,
1378,
7890,
... | 3.268448 | 786 |
# coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online # noqa: E501
OpenAPI spec version: 0.8.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class GetFwSystems200Ok(object):
"""NOTE: This class is aut... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
32356,
2451,
7928,
26491,
628,
220,
220,
220,
1052,
4946,
17614,
329,
32356,
7467,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
4946,
17614,
1020,
21... | 2.252065 | 3,753 |
import FormaPago
import MenuOpciones
if __name__ == '__main__':
FormaPago.menuPagos()
opc = input("Dijite el numero de la opción que desea acceder: ")
if opc == "1":
MenuOpciones.OpcionCrear()
elif opc == "2":
MenuOpciones.OpcionCambiar()
| [
11748,
5178,
64,
47,
3839,
201,
198,
11748,
21860,
46,
14751,
295,
274,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
5178,
64,
47,
3839,
13,
26272,
47,
48215,
3419,
201,
198,... | 1.972603 | 146 |
from random import randrange
# Split a dataset into a train and test set
# Split a dataset into $k$ folds
# Evaluate an algorithm using a train/test split several times
# Evaluate an algorithm using a cross-validation split
| [
6738,
4738,
1330,
43720,
9521,
201,
198,
201,
198,
2,
27758,
257,
27039,
656,
257,
4512,
290,
1332,
900,
201,
198,
201,
198,
2,
27758,
257,
27039,
656,
720,
74,
3,
38744,
201,
198,
201,
198,
2,
26439,
4985,
281,
11862,
1262,
257,
... | 3.575758 | 66 |
"""
Copyright (c) 2019 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 writing,... | [
37811,
198,
15269,
357,
66,
8,
13130,
8180,
10501,
198,
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,
... | 3.20202 | 396 |
from django.urls import path, include, reverse
from django.views.decorators.clickjacking import xframe_options_sameorigin
from django.views.generic.base import TemplateView
from django.views.i18n import JavaScriptCatalog
from wagtail.core import hooks
from .decorators import turbo_disable
from .views import turbo_ini... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
11,
9575,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
12976,
73,
5430,
1330,
2124,
14535,
62,
25811,
62,
31642,
47103,
198,
6738,
42625,
14208,
13,
33571,
13,
4... | 3.344 | 125 |
import pytest
import boto3
from moto.dynamodb2 import mock_dynamodb2
from otter.router.src.shared.client import DynamoDBClient, get_valid_devices
from otter.router.src.shared.device import Device
DYNAMODB_TABLE = "ottr-example"
@pytest.fixture
@mock_dynamodb2
@mock_dynamodb2
@mock_dynamodb2
@mock_dynamodb2
... | [
11748,
12972,
9288,
198,
11748,
275,
2069,
18,
198,
6738,
285,
2069,
13,
67,
4989,
375,
65,
17,
1330,
15290,
62,
67,
4989,
375,
65,
17,
198,
198,
6738,
30972,
353,
13,
472,
353,
13,
10677,
13,
28710,
13,
16366,
1330,
41542,
11012,
... | 2.239521 | 167 |
from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import Templa... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
11,
8543,
62,
1462,
62,
26209,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
... | 3.223881 | 268 |
__all__=["model_utility","model","utility","visualization"]
from bldgnorm.model_utility import *
from bldgnorm.model import *
from bldgnorm.utility import *
from bldgnorm.visualization import * | [
834,
439,
834,
28,
14692,
19849,
62,
315,
879,
2430,
19849,
2430,
315,
879,
2430,
41464,
1634,
8973,
198,
198,
6738,
275,
335,
4593,
579,
13,
19849,
62,
315,
879,
1330,
1635,
198,
6738,
275,
335,
4593,
579,
13,
19849,
1330,
1635,
19... | 3.03125 | 64 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.server_utils import ServerUtils
from utils.video_player import MPVVideoPlayer
from api.constants import Kinds
from PyInquirer import prompt
from typing import List
import os
class Main:
""" main app that run servers and get user commands """
@prope... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
3384,
4487,
13,
15388,
62,
26791,
1330,
9652,
18274,
4487,
198,
6738,
3384,
4487,
13,
15588,
62,
7829,
1330,... | 2.157861 | 1,552 |
var_from_resource_var_file = 'Some Value'
| [
7785,
62,
6738,
62,
31092,
62,
7785,
62,
7753,
796,
705,
4366,
11052,
6,
201,
198
] | 2.6875 | 16 |
#from bson.objectid import ObjectId
from pymongo import MongoClient
client= MongoClient("localhost", 27017)
db = client.Dados | [
2,
6738,
275,
1559,
13,
15252,
312,
1330,
9515,
7390,
198,
6738,
279,
4948,
25162,
1330,
42591,
11792,
628,
198,
198,
16366,
28,
42591,
11792,
7203,
36750,
1600,
2681,
29326,
8,
198,
198,
9945,
796,
5456,
13,
35,
22484
] | 3.307692 | 39 |
#!/usr/bin/env python
class BaseVimeoException(Exception):
"""Base class for Vimeo Exceptions."""
def __init__(self, response, message):
"""Base Exception class init."""
# API error message
self.message = self.__get_message(response)
# HTTP status code
if type(respons... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
198,
4871,
7308,
53,
47776,
16922,
7,
16922,
2599,
198,
220,
220,
220,
37227,
14881,
1398,
329,
569,
47776,
1475,
11755,
526,
15931,
628,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,... | 3.077381 | 1,344 |
from calculator import calculator
if __name__=='__main__':
calculator()
| [
6738,
28260,
1330,
28260,
198,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
220,
220,
220,
28260,
3419,
198
] | 3.347826 | 23 |
"""
Parametric design with CPE modeled separately for cue and stimulus periods.
"""
design_name = "cpe_cuestim"
condition_names = ["cue", "stim",
"cpe_cue", "cpe_stim",
"error", "response_time"]
temporal_deriv = True
confound_pca = True
contrasts = [
("cue_neg", ["cu... | [
37811,
198,
22973,
19482,
1486,
351,
327,
11401,
29563,
13869,
329,
28381,
290,
19819,
9574,
13,
198,
37811,
198,
26124,
62,
3672,
796,
366,
66,
431,
62,
27399,
395,
320,
1,
198,
198,
31448,
62,
14933,
796,
14631,
15509,
1600,
366,
42... | 1.901478 | 406 |
from django.db import models
from django.contrib.auth.models import AbstractUser, AbstractBaseUser
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
27741,
12982,
11,
27741,
14881,
12982,
198,
198,
2,
13610,
534,
4981,
994,
13,
628,
628
] | 3.714286 | 35 |
from django.core.management.base import BaseCommand
from cleanup_later.models import CleanupFile
| [
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
198,
6738,
27425,
62,
36760,
13,
27530,
1330,
5985,
929,
8979,
198
] | 3.92 | 25 |
#! /usr/bin/python3
import requests,argparse,sys,colorama,pyfiglet
from colorama import Fore,Style
if __name__ == "__main__":
Covid().stats | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
7007,
11,
853,
29572,
11,
17597,
11,
8043,
1689,
11,
9078,
5647,
1616,
198,
6738,
3124,
1689,
1330,
4558,
11,
21466,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
129... | 2.803922 | 51 |
print('olá mundo')
| [
4798,
10786,
349,
6557,
27943,
78,
11537,
198
] | 2.375 | 8 |
import uuid
from django.test import TestCase, override_settings
from gitd.core.constants import GitHubEvents
from gitd.core.exceptions import GitHubException
from gitd.core.handlers import github_handler
from gitd.core.models import Deployment
| [
11748,
334,
27112,
198,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
11,
20957,
62,
33692,
198,
198,
6738,
17606,
67,
13,
7295,
13,
9979,
1187,
1330,
21722,
37103,
198,
6738,
17606,
67,
13,
7295,
13,
1069,
11755,
1330,
21722,
... | 3.686567 | 67 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
driver.get("https://orteil.dashnet.org/cookieclicker/")
driver.implicitly_wait(5)
cookie = driver.find_element_by_id("bigCookie")
cookie_cou... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
2673,
62,
38861,
1330,
7561,
1925,
1299,
198,
198,
34219,
796,
366,
34,
7479,
15167,
13283,
357,
87,
4521,
19415,
28663,
276,
38291... | 2.562963 | 405 |
import os
import re
import logging
from binascii import crc_hqx
from datetime import datetime
from flask import Flask, request, render_template, redirect
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired
from flask_bootstrap import Bootstrap
from gevent.pywsgi i... | [
11748,
28686,
198,
11748,
302,
198,
11748,
18931,
198,
6738,
9874,
292,
979,
72,
1330,
1067,
66,
62,
71,
80,
87,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
8543,
62,
28243,
11,
18941,
198,
... | 2.73176 | 466 |
# -*- coding: utf-8 -*-
import json
import os
import random
import click
import neptune
import numpy as np
import regex
import torch
from loguru import logger
from neptune.exceptions import NoExperimentContext
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
from tqdm import tqd... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
4738,
198,
198,
11748,
3904,
198,
11748,
497,
457,
1726,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
40364,
198,
11748,
28... | 2.352134 | 1,312 |
import pathlib
import os
import sys
import time
import shutil
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
BASE_URL = 'https://servicos-portal.mpro.mp.br/web/mp-transparente/contracheque'
BASE_URL_MEMBROS_ATIVOS = 'https://servicos-portal.mp... | [
11748,
3108,
8019,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
4423,
346,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
6738,
... | 2.371069 | 318 |
from riscv_isac.log import logger
import itertools
import struct
import random
import sys
import math
from decimal import *
fzero = ['0x00000000', '0x80000000']
fminsubnorm = ['0x00000001', '0x80000001']
fsubnorm = ['0x00000002', '0x80000002', '0x007FFFFE', '0x807FFFFE', '0x00555555', '0x80555555']
fmaxsubnor... | [
6738,
374,
2304,
85,
62,
271,
330,
13,
6404,
1330,
49706,
198,
11748,
340,
861,
10141,
198,
11748,
2878,
198,
11748,
4738,
198,
11748,
25064,
198,
11748,
10688,
198,
6738,
32465,
1330,
1635,
198,
198,
69,
22570,
220,
220,
220,
220,
22... | 2.170405 | 82,615 |
"""
Copyright (c) 2020 COTOBA DESIGN, Inc.
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 use, copy, modify, merge, publish, distri... | [
37811,
198,
15269,
357,
66,
8,
12131,
327,
26631,
4339,
22196,
16284,
11,
3457,
13,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
286,
428,
3788,
290,
3917,
198,
22897,
341,
3696,
... | 3.888889 | 297 |
# -*- coding: utf-8
"""Unit tests for the vndb event plugin."""
# pylint: disable=missing-docstring,too-few-public-methods
from twisted.internet.defer import inlineCallbacks
from twisted.trial.unittest import TestCase
from ...message import collapse
from ...test.helpers import CommandTestMixin
from . import Default... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
198,
37811,
26453,
5254,
329,
262,
410,
358,
65,
1785,
13877,
526,
15931,
198,
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
15390,
8841,
11,
18820,
12,
32146,
12,
11377,
12,
24396,
82,
... | 3.389474 | 95 |
# coding=utf-8
from __future__ import absolute_import, print_function
import posixpath
from urllib import urlencode
# noinspection PyUnresolvedReferences
from six.moves.urllib.parse import parse_qsl, urlsplit, urlunsplit
__author__ = 'Tyler Butler <tyler@tylerbutler.com>'
try:
# noinspection PyUnresolvedReferen... | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
3601,
62,
8818,
198,
198,
11748,
1426,
844,
6978,
198,
6738,
2956,
297,
571,
1330,
2956,
11925,
8189,
198,
198,
2,
645,
1040,
14978,
9485,
3118,
4... | 2.861314 | 137 |
from rest_framework import serializers
from radar.models import BaseRadares, Contagens, Viagens, Trajetos
from rest_framework_cache.serializers import CachedSerializerMixin
from rest_framework_cache.registry import cache_registry
cache_registry.register(BaseRadaresSerializer)
cache_registry.register(ContagensSerial... | [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
13428,
13,
27530,
1330,
7308,
15546,
3565,
11,
2345,
363,
641,
11,
16049,
363,
641,
11,
4759,
31173,
418,
198,
6738,
1334,
62,
30604,
62,
23870,
13,
46911,
11341,
1330,
327,
2317,
... | 3.593407 | 91 |
""" Balance resource model """
import datetime
from sqlalchemy.sql import func
from underbudget.database import db
from underbudget.models.transaction import (
AccountTransactionModel,
EnvelopeTransactionModel,
TransactionModel,
)
class AccountBalanceModel:
""" Account balance model """
@staticm... | [
37811,
22924,
8271,
2746,
37227,
198,
11748,
4818,
8079,
198,
6738,
44161,
282,
26599,
13,
25410,
1330,
25439,
198,
198,
6738,
739,
37315,
13,
48806,
1330,
20613,
198,
6738,
739,
37315,
13,
27530,
13,
7645,
2673,
1330,
357,
198,
220,
22... | 2.366197 | 710 |
import numpy as np
import re
from gensim.models import Word2Vec
max_len = 25
print('-- READING DATA --')
# read in defs
with open("data/definitions.txt") as f:
data = f.readlines()
# remove \n at end
data = [process_def(x.strip()) for x in data]
# reorganize into [[def 1, def 2, 1/0], [def 1, def 2, 1/0], ...... | [
11748,
299,
32152,
355,
45941,
198,
11748,
302,
198,
6738,
308,
641,
320,
13,
27530,
1330,
9678,
17,
53,
721,
198,
198,
9806,
62,
11925,
796,
1679,
628,
198,
4798,
10786,
438,
20832,
2751,
42865,
1377,
11537,
198,
198,
2,
1100,
287,
... | 2.292181 | 243 |
from utils import *
import os
import numpy as np
from video_stabilization import video_stabilization
PlotsDirectory = '../plots/Week4/task2-3/'
if not os.path.exists(PlotsDirectory):
os.makedirs(PlotsDirectory)
print("reading video...")
seq_color = video_to_frame('video1.mp4', grayscale=False)
max_size = 100
se... | [
6738,
3384,
4487,
1330,
1635,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2008,
62,
301,
14991,
1634,
1330,
2008,
62,
301,
14991,
1634,
198,
198,
3646,
1747,
43055,
796,
705,
40720,
489,
1747,
14,
20916,
19,
14,
... | 2.513932 | 323 |
from django.contrib import admin
from import_export import resources
from import_export.admin import ImportExportModelAdmin
from . import models
@admin.register(models.ControllerLink)
@admin.register(models.ControllerCommand)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
1330,
62,
39344,
1330,
4133,
198,
6738,
1330,
62,
39344,
13,
28482,
1330,
17267,
43834,
17633,
46787,
198,
6738,
764,
1330,
4981,
198,
198,
31,
28482,
13,
30238,
7,
27530,
13,
... | 4 | 57 |
import discord
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
import traceback
import asyncio
import asyncpg
import yaml # removed aiofiles because its not needed
from datetime import datetime
import os
import sys
import logging
import aiohttp
import aioredis
import psutil
impor... | [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
36446,
13,
2302,
13,
9503,
1746,
13,
1073,
15041,
82,
1330,
48353,
6030,
198,
11748,
12854,
1891,
198,
11748,
30351,
952,
198,
11748,
30351,
6024,
198,
11748,
331,
43695,
... | 2.624172 | 604 |
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.contrib.auth import login, logout
from django.conf import settings
from microsoft_authentication.auth.auth_utils import (
get_sign_in_flow,
get_token_from_code,
get_user,
get_django_user,
get_logout_url,
)
| [
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
7738,
1060,
11,
367,
29281,
31077,
1890,
37978,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
17594,
11,
2604,
448,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6... | 2.758929 | 112 |
#!/usr/bin/python3
"""Script to check this homework."""
import argparse
import logging
from .checker import Checker
from .md_writer import MdWriter
logging.basicConfig()
log = logging.getLogger("GHC")
log.setLevel(logging.INFO)
def main():
"""Run this script."""
parser = argparse.ArgumentParser()
parse... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
37811,
7391,
284,
2198,
428,
26131,
526,
15931,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
198,
6738,
764,
9122,
263,
1330,
6822,
263,
198,
6738,
764,
9132,
62,
16002,
1330,
39762,
... | 2.502075 | 482 |
T = int(raw_input())
for t in range(T):
n, m = map(int, raw_input().split())
powers = {}
bullets = {}
origBullet = 0
levelBullet = 0
for ni in range( n):
powers[ni] = map(int, raw_input().split())
for ni in range( n):
bullets[ni] = map(int, raw_input().split())
bullets[-1... | [
51,
796,
493,
7,
1831,
62,
15414,
28955,
198,
1640,
256,
287,
2837,
7,
51,
2599,
198,
220,
220,
220,
299,
11,
285,
796,
3975,
7,
600,
11,
8246,
62,
15414,
22446,
35312,
28955,
198,
220,
220,
220,
5635,
796,
23884,
198,
220,
220,
... | 2.222222 | 171 |
import datetime
import logging
import ee
from dateutil.relativedelta import *
from . import utils
# import openet.core.utils as utils
def daily(target_coll, source_coll, interp_days=32, interp_method='linear',
use_joins=False, compute_product=False):
"""Interpolate non-daily source images to a daily t... | [
11748,
4818,
8079,
198,
11748,
18931,
198,
198,
11748,
304,
68,
198,
6738,
3128,
22602,
13,
2411,
265,
1572,
12514,
1330,
1635,
198,
198,
6738,
764,
1330,
3384,
4487,
198,
2,
1330,
1280,
316,
13,
7295,
13,
26791,
355,
3384,
4487,
628,... | 2.340851 | 18,668 |
a = 15 * 3
b = 15 / 3
c = 15 // 2
d = 15 ** 2
print(type(a), a)
print(type(b), b)
print(type(c), b)
print(type(d), d)
| [
64,
796,
1315,
1635,
513,
198,
65,
796,
1315,
1220,
513,
198,
66,
796,
1315,
3373,
362,
198,
67,
796,
1315,
12429,
362,
198,
4798,
7,
4906,
7,
64,
828,
257,
8,
198,
4798,
7,
4906,
7,
65,
828,
275,
8,
198,
4798,
7,
4906,
7,
6... | 1.966667 | 60 |
#! /usr/bin/python
# -*- encoding: utf-8 -*-
from flask import Flask, render_template, jsonify
from flask_socketio import SocketIO, emit
app = Flask(__name__, template_folder='templates', static_url_path='/static/', static_folder='static')
app.config['SECRET_KEY'] = 'ines'
socketio = SocketIO(app)
@app.route('/')
@... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
33918,
1958,
198,
6738,
42903,
62,
44971,
952,
1330,
47068,
9399,
... | 2.742138 | 159 |
from .constant import TEXT_DELIMITER
from .settings import get_setting
from typing import Any, Dict, Optional
import sublime
| [
6738,
764,
9979,
415,
1330,
40383,
62,
35,
3698,
3955,
2043,
1137,
198,
6738,
764,
33692,
1330,
651,
62,
33990,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
32233,
198,
11748,
41674,
628
] | 3.705882 | 34 |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.teachers import FbDialogTeacher
from parlai.core.agents import MultiTaskTeacher
from .build import buil... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,... | 3.508929 | 112 |
import random
#1
for number in gensquares(10):
print(number)
print('\n')
#2
for number in rand_num(1,10,12):
print(number)
print('\n')
#3
s = 'hello'
s_iter = iter(s)
print(next(s_iter))
print(next(s_iter))
print(next(s_iter))
print(next(s_iter))
print(next(s_iter)) | [
11748,
4738,
198,
2,
16,
198,
198,
1640,
1271,
287,
308,
641,
421,
3565,
7,
940,
2599,
198,
220,
220,
220,
3601,
7,
17618,
8,
220,
198,
4798,
10786,
59,
77,
11537,
198,
198,
2,
17,
198,
1640,
1271,
287,
43720,
62,
22510,
7,
16,
... | 2.171875 | 128 |
from django import forms
from django.forms import ModelForm
from employee_information_site.models import CompanyDepartment, EmployeePosition, Employee
| [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
23914,
1330,
9104,
8479,
198,
6738,
6538,
62,
17018,
62,
15654,
13,
27530,
1330,
5834,
36261,
11,
36824,
26545,
11,
36824,
628
] | 4.75 | 32 |
"""
Tests if `KeyboardInterrupt` exception are properly handled.
This test currently fails. That is, trying to interrupt an ongoing
operation of the Comsol client crashes out of the Python session
instead of allowing further code execution or a return to the
interactive prompt.
The script does not depend on ... | [
171,
119,
123,
37811,
201,
198,
51,
3558,
611,
4600,
9218,
3526,
9492,
3622,
63,
6631,
389,
6105,
12118,
13,
201,
198,
201,
198,
1212,
1332,
3058,
10143,
13,
1320,
318,
11,
2111,
284,
11313,
281,
7044,
201,
198,
27184,
286,
262,
955... | 2.945783 | 498 |
import shutil
import java.lang.System
print "Setup exec_test using exec_test_setup.py"
#System Properties
user_home = java.lang.System.getProperty("user.home")
base_dir = java.lang.System.getProperty("basedir")
project_version = java.lang.System.getProperty("project.version")
artifactId = java.lang.System.getProperty... | [
11748,
4423,
346,
198,
11748,
20129,
13,
17204,
13,
11964,
198,
198,
4798,
366,
40786,
2452,
62,
9288,
1262,
2452,
62,
9288,
62,
40406,
13,
9078,
1,
198,
198,
2,
11964,
24946,
198,
7220,
62,
11195,
796,
20129,
13,
17204,
13,
11964,
... | 2.910995 | 382 |
#!/usr/bin/python
in_str = str(input()).lower().split()
for i in range(1, len(in_str)):
if in_str[i-1][-1] != in_str[i][0]:
print("false")
exit(0)
print("true") | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
259,
62,
2536,
796,
965,
7,
15414,
3419,
737,
21037,
22446,
35312,
3419,
198,
198,
1640,
1312,
287,
2837,
7,
16,
11,
18896,
7,
259,
62,
2536,
8,
2599,
198,
220,
220,
220,
611,
287,
... | 1.967742 | 93 |
# -*- coding: utf-8 -*-
import re
import math
import urlparse
from scrapy.spider import BaseSpider
from scrapy.http import Request, FormRequest
from scrapy.selector import HtmlXPathSelector
from scrapy import log
from bs4 import BeautifulSoup
from registry.items import Corporation, Person, CorporationDocument, State... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
302,
198,
11748,
10688,
198,
11748,
19016,
29572,
198,
198,
6738,
15881,
88,
13,
2777,
1304,
1330,
7308,
41294,
198,
6738,
15881,
88,
13,
4023,
1330,
19390,
... | 3.809091 | 110 |
'''
Send JPEG image to tensorflow_model_server loaded with GAN model.
Hint: the code has been compiled together with TensorFlow serving
and not locally. The client is called in the TensorFlow Docker container
'''
from __future__ import print_function
# Communication to TensorFlow server via gRPC
from grpc.beta impor... | [
7061,
6,
198,
25206,
48561,
2939,
284,
11192,
273,
11125,
62,
19849,
62,
15388,
9639,
351,
402,
1565,
2746,
13,
198,
198,
39,
600,
25,
262,
2438,
468,
587,
14102,
1978,
351,
309,
22854,
37535,
7351,
198,
392,
407,
15726,
13,
383,
54... | 3.11284 | 257 |
# setup_logging.py
import logging
import logging.config
from settings import LOGS_DIR
class CustomFormatter(logging.Formatter):
"""Logging Formatter to ad colors and count warnings / errors"""
pink = "\x1b[35m"
blue = "\033[96m"
yellow = "\033[93m"
red = "\x1b[31;21m"
bold_red = "\033[41m"
... | [
2,
9058,
62,
6404,
2667,
13,
9078,
198,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
6738,
6460,
1330,
41605,
50,
62,
34720,
628,
198,
4871,
8562,
8479,
1436,
7,
6404,
2667,
13,
8479,
1436,
2599,
198,
220,
220,
220,
37227,
... | 2.711256 | 613 |
from flask import Flask
from web.BaseRouter import BaseRouter
app = Flask(__name__)
base_url = '/'
router = BaseRouter(base_url)
router.register_flask_blueprints(app)
if __name__ == '__main__':
app.run()
| [
6738,
42903,
1330,
46947,
198,
6738,
3992,
13,
14881,
49,
39605,
1330,
7308,
49,
39605,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
8692,
62,
6371,
796,
31051,
6,
198,
198,
472,
353,
796,
7308,
49,
39605,
7,
8692,
62,
6... | 2.6375 | 80 |
from setuptools import setup, find_packages
setup(
name='github_secret_finder',
version='2.0.0',
description='Script to monitor commits from Github users and organizations for secrets.',
url='https://github.com/gsoft-inc/github-secret-finder',
author='Mathieu Gascon-Lefebvre',
author_email='mat... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
12567,
62,
21078,
62,
22805,
3256,
198,
220,
220,
220,
2196,
11639,
17,
13,
15,
13,
15,
3256,
198,
220,
220,
220,
6764,
... | 2.535593 | 295 |
# Generated by Django 3.1.2 on 2020-11-01 02:59
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
17,
319,
12131,
12,
1157,
12,
486,
7816,
25,
3270,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
import pynput
from pynput.keyboard import Key, Listener
import pyautogui
import yagmail
import os.path
from datetime import datetime
import time
import sys
import os
from sys import platform as _platform
#Defining color values for later
G = '\033[32m' #Green
R = '\033[31m' # Red
C = '\033[36m' # Cyan
... | [
11748,
279,
2047,
1996,
201,
198,
6738,
279,
2047,
1996,
13,
2539,
3526,
1330,
7383,
11,
7343,
877,
201,
198,
11748,
12972,
2306,
519,
9019,
201,
198,
11748,
331,
363,
4529,
201,
198,
11748,
28686,
13,
6978,
201,
198,
6738,
4818,
8079... | 2.021277 | 564 |
# coding: utf-8
"""
Connect API
Pelion Device Management Connect API allows web applications to communicate with devices. You can subscribe to device resources and read/write values to them. Device Management Connect allows connectivity to devices by queueing requests and caching resource values.
OpenAPI... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
8113,
7824,
628,
220,
220,
220,
12903,
295,
16232,
8549,
8113,
7824,
3578,
3992,
5479,
284,
10996,
351,
4410,
13,
921,
460,
12383,
284,
3335,
4133,
290,
1100,
14,
... | 2.367178 | 2,413 |
# -*- coding: utf-8 -*-
"""
scraperplot.py
For retreiving and plotting data using the 'scraper.py' module.
Created on Wed Oct 30 15:11:00 2019
@author: Thomas Richards
"""
# import scraper.py
import scraper as scrp
# Run functions in get module
scraper = scrp.Scraper()
choices = input('What do you want to plot? Pr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
1416,
38545,
29487,
13,
9078,
198,
198,
1890,
1005,
260,
1412,
290,
29353,
1366,
1262,
262,
705,
1416,
38545,
13,
9078,
6,
8265,
13,
198,
198,
41972,
319,
... | 2.428571 | 567 |
from sspipe import p, px
import numpy as np
| [
6738,
264,
2777,
3757,
1330,
279,
11,
279,
87,
198,
11748,
299,
32152,
355,
45941,
628,
628,
628,
198
] | 2.631579 | 19 |
import os
import sys
import argparse
import shutil
from logging import getLogger
from pathlib import Path
from time import sleep
from typing import List, Union, Optional, Sequence, Text
try:
# Might not be installed.
import ipdb as debug
except ImportError:
import pdb as debug
try:
import argcomplete
e... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
1822,
29572,
198,
11748,
4423,
346,
198,
6738,
18931,
1330,
651,
11187,
1362,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
640,
1330,
3993,
198,
6738,
19720,
1330,
7343,
11,
4479,
11,
32233,
... | 3.415459 | 207 |
"""
Django settings for ScienceCruiseDataManagement project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/sett... | [
37811,
198,
35,
73,
14208,
6460,
329,
5800,
27535,
786,
6601,
48032,
1628,
13,
198,
198,
8645,
515,
416,
705,
28241,
14208,
12,
28482,
923,
16302,
6,
1262,
37770,
352,
13,
940,
13,
19,
13,
198,
198,
1890,
517,
1321,
319,
428,
2393,
... | 2.535403 | 3,446 |
# -*- coding: utf-8 -*-
""" Views
"""
__author__ = 'Bartosz Kościów'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
29978,
198,
37811,
198,
834,
9800,
834,
796,
705,
33,
433,
418,
89,
17634,
129,
249,
979,
10205,
86,
6,
198
] | 1.891892 | 37 |
import pandas as pd
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import accuracy_score
from sklearn.linear_model import LogisticRegression
# Load The Data Into DataFrame with Pandas
iris = load_i... | [
11748,
19798,
292,
355,
279,
67,
201,
198,
6738,
1341,
35720,
13,
19608,
292,
1039,
1330,
3440,
62,
29616,
201,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312,
201,
198,
6738,
1341,
35720,
13,
3866,
3694... | 2.876623 | 308 |
"""
particle_swam_optimization_algorithm.py
Returns the minimizer of the function
func_ps - anonimous function (vectorized for multiple particles)
"""
import numpy as np
import numpy.matlib
np.random.seed();
| [
37811,
198,
3911,
1548,
62,
2032,
321,
62,
40085,
1634,
62,
282,
42289,
13,
9078,
198,
198,
35561,
262,
10356,
7509,
286,
262,
2163,
198,
20786,
62,
862,
532,
281,
261,
320,
516,
2163,
357,
31364,
1143,
329,
3294,
13166,
8,
198,
378... | 3.212121 | 66 |