content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Criar um dicionário com todos os mapeamentos
conexoes = {}
conexoes ["Casa"] = ["Amador Bueno"]
conexoes ["Amador Bueno"] = ["Osasco"]
conexoes ["Osasco"] = ["Júlio Prestes", "Pinheiros", "Amador Bueno"]
conexoes ["Júlio Prestes"] = ["Barra Funda"]
conexoes ["Barra Funda"] = ["Faculdade Impacta"]
conexoes ["Pinheiros... | [
2,
327,
380,
283,
23781,
288,
47430,
6557,
27250,
401,
284,
37427,
28686,
285,
1758,
3263,
418,
198,
49180,
87,
3028,
796,
23884,
198,
49180,
87,
3028,
14631,
34,
15462,
8973,
796,
14631,
5840,
7079,
9842,
23397,
8973,
198,
49180,
87,
... | 2.331976 | 491 |
from typing import Any, Dict
from lithopscloud.modules.gen2.profile import ProfileConfig
| [
6738,
19720,
1330,
4377,
11,
360,
713,
198,
198,
6738,
24491,
2840,
17721,
13,
18170,
13,
5235,
17,
13,
13317,
1330,
13118,
16934,
628
] | 3.791667 | 24 |
import numpy as np
import pandas as pd
from pandas.core.frame import DataFrame
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.decomposition import LatentDirichletAllocation as LDA
import pickle
import spacy
from spacy.tokens import Token
import nltk
from nltk.corpus import wordnet as wn
def ... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
19798,
292,
13,
7295,
13,
14535,
1330,
6060,
19778,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330,
2764,
38469,
7509,
198,
6738,
1341,
... | 2.446855 | 922 |
from . import pipeline
from . import config | [
6738,
764,
1330,
11523,
198,
6738,
764,
1330,
4566
] | 4.777778 | 9 |
# inspired by https://github.com/sandy1709/catuserbot/blob/master/userbot/plugins/__init__.py
import os
import re
import time
import math
import heroku3
import requests
from heroku_config import Var
from userbot import telever
from userbot.uniborgConfig import Config
from telethon import events
from datetime import da... | [
2,
7867,
416,
3740,
1378,
12567,
13,
785,
14,
82,
10757,
1558,
2931,
14,
9246,
7220,
13645,
14,
2436,
672,
14,
9866,
14,
7220,
13645,
14,
37390,
14,
834,
15003,
834,
13,
9078,
198,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
640... | 2.805687 | 211 |
##############################################################################
# Institute for the Design of Advanced Energy Systems Process Systems
# Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2020, by the
# software owners: The Regents of the University of California, through
# Lawrence Berkeley N... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
5136,
329,
262,
8495,
286,
13435,
6682,
11998,
10854,
11998,
198,
2,
14044,
25161,
357,
41957,
1546,
350,
5188,
25161,
8,
15069,
357,
66,
8,
2864,
12,
42334,
11,
416,
262,
198,
2,
3788,
4393,
... | 3.908228 | 316 |
import os
import argparse
import json
import glob
import sys
import shutil
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument(
"-t", "--target-folder", required=True, help="Where to save the folder structure."
)
parser.add_argument("-i", "--input", required=True, help="Input json structu... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
15095,
198,
11748,
25064,
198,
11748,
4423,
346,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
628,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
... | 2.137294 | 1,515 |
# -*- coding: utf-8 -*-
import skimage.io as skio
import skimage.util as sku
from tqdm import tqdm
from glob import glob
import os
import SimpleITK as sitk
import numpy as np
# %% Helper functions
# %%
# %%
if __name__ == '__main__':
make_RIRE_forFID()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
11748,
1341,
9060,
13,
952,
355,
1341,
952,
201,
198,
11748,
1341,
9060,
13,
22602,
355,
1341,
84,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
201,
198,... | 2.316667 | 120 |
# Licensed under a 3-clause BSD style license - see LICENSE.txt
"""
SPIRE-specific code for HiRes.
Copyright (c) 2012-2013, California Institute of Technology
Developer: David Shupe
"""
import hires as hires
try:
import astropy.io.fits as pyfits
except ImportError:
import pyfits
import numpy
import glob
h... | [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
14116,
198,
37811,
220,
198,
4303,
41736,
12,
11423,
2438,
329,
15902,
4965,
13,
198,
198,
15269,
357,
66,
8,
2321,
12,
6390,
11,
3442,
5136,... | 2.082534 | 3,126 |
"""Unit tests for the Diff class.
Copyright (c) 2020-2021 Network To Code, LLC <info@networktocode.com>
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... | [
37811,
26453,
5254,
329,
262,
10631,
1398,
13,
198,
198,
15269,
357,
66,
8,
12131,
12,
1238,
2481,
7311,
1675,
6127,
11,
11419,
1279,
10951,
31,
27349,
40301,
1098,
13,
785,
29,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
1062... | 2.918288 | 1,285 |
from gpiozero import Button
import socket
from multiprocessing import Pipe
from sys import byteorder
from datetime import timedelta, datetime as dt
| [
6738,
27809,
952,
22570,
1330,
20969,
198,
11748,
17802,
198,
6738,
18540,
305,
919,
278,
1330,
36039,
198,
6738,
25064,
1330,
18022,
2875,
198,
6738,
4818,
8079,
1330,
28805,
12514,
11,
4818,
8079,
355,
288,
83,
198
] | 4 | 37 |
# -*- coding: utf-8 -*-
#
# furl - URL manipulation made simple.
#
# Ansgar Grunseid
# grunseid.com
# grunseid@gmail.com
#
# License: Build Amazing Things (Unlicense)
#
import sys
if sys.version_info[0] == 2:
string_types = basestring # noqa
else:
string_types = (str, bytes)
if list(sys.version_info[:2])... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
198,
2,
277,
6371,
532,
10289,
17512,
925,
2829,
13,
198,
2,
198,
2,
28038,
4563,
1902,
403,
325,
312,
198,
2,
44397,
325,
312,
13,
785,
198,
2,
44397,
325... | 2.553279 | 244 |
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 18:03:22 2018
@author: James Wu
"""
import cv2
import numpy as np
import serial
face_cascade = cv2.CascadeClassifier('./data/haarcascade_frontalface_default.xml')
#==============================================================================
# 1.多人脸形心检测函数
# ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2365,
1315,
1248,
25,
3070,
25,
1828,
2864,
198,
198,
31,
9800,
25,
3700,
18027,
198,
37811,
198,
198,
11748,
269,
85,
17,
198,
11748,
29... | 1.709716 | 844 |
from src.articles.domain.entities import category, article, tag
from src.articles.services import unit_of_work
| [
6738,
12351,
13,
26845,
13,
27830,
13,
298,
871,
1330,
6536,
11,
2708,
11,
7621,
198,
6738,
12351,
13,
26845,
13,
30416,
1330,
4326,
62,
1659,
62,
1818,
628
] | 3.862069 | 29 |
from .filter_declarations import * # NOQA
| [
6738,
764,
24455,
62,
32446,
24355,
1330,
1635,
220,
1303,
8005,
48,
32,
198
] | 3.071429 | 14 |
from pathlib import Path
import mimetypes
import functools
@banner
def list_images(path: Path) -> None:
"""
Lista las imágenes del directorio indicado.
"""
for file in path.iterdir():
mime = mimetypes.guess_type(file)[0]
if file.is_file() and mime == "image/jpeg":
print(fi... | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
17007,
2963,
12272,
198,
11748,
1257,
310,
10141,
628,
198,
198,
31,
3820,
1008,
198,
4299,
1351,
62,
17566,
7,
6978,
25,
10644,
8,
4613,
6045,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
... | 2.333333 | 141 |
from anthill.common.model import Model
from anthill.common.validate import validate
from anthill.common.deployment import DeploymentError, DeploymentMethods
from . settings import NoSuchSettingsError, SettingsError
import os
| [
198,
6738,
26794,
359,
13,
11321,
13,
19849,
1330,
9104,
198,
6738,
26794,
359,
13,
11321,
13,
12102,
378,
1330,
26571,
198,
6738,
26794,
359,
13,
11321,
13,
2934,
1420,
434,
1330,
34706,
434,
12331,
11,
34706,
434,
46202,
198,
198,
6... | 4.017544 | 57 |
"""
.. module:: reaction_message
:platform: Unix
:synopsis: A module that describes what the reaction should be when receiving a specific message.
.. Copyright 2022 EDF
.. moduleauthor:: Oscar RODRIGUEZ INFANTE, Tony ZHOU, Trang PHAM, Efflam OLLIVIER
.. License:: This source code is licensed under the MIT Li... | [
37811,
198,
492,
8265,
3712,
6317,
62,
20500,
198,
220,
220,
1058,
24254,
25,
33501,
198,
220,
220,
1058,
28869,
24608,
25,
317,
8265,
326,
8477,
644,
262,
6317,
815,
307,
618,
6464,
257,
2176,
3275,
13,
198,
198,
492,
15069,
33160,
... | 3.388626 | 422 |
from typing import List
from pandas._typing import (
FilePathOrBuffer,
Scalar,
StorageOptions,
)
from pandas.compat._optional import import_optional_dependency
from pandas.io.excel._base import BaseExcelReader
| [
6738,
19720,
1330,
7343,
198,
198,
6738,
19798,
292,
13557,
774,
13886,
1330,
357,
198,
220,
220,
220,
9220,
15235,
5574,
28632,
11,
198,
220,
220,
220,
34529,
283,
11,
198,
220,
220,
220,
20514,
29046,
11,
198,
8,
198,
6738,
19798,
... | 3.082192 | 73 |
import boto3
from flask import make_response
# "WHERE'S MY GENE" PROTOTYPE CODE
WMG_DATA_BUCKET = "wmg-prototype-data-dev-public"
WMG_DATA_S3_OBJ_PREFIX = "lung-tissue-10x-human-20220112"
| [
11748,
275,
2069,
18,
198,
6738,
42903,
1330,
787,
62,
26209,
198,
198,
2,
366,
47357,
6,
50,
17615,
24700,
36,
1,
48006,
2394,
56,
11401,
42714,
198,
198,
54,
20474,
62,
26947,
62,
33,
16696,
2767,
796,
366,
86,
11296,
12,
38124,
... | 2.282353 | 85 |
"""
test.py
Copyright 2015 Jeroen Arnoldus <jeroen@repleo.nl>
THIS SOFTWARE IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, AND MAY BE
COPIED, MODIFIED OR DISTRIBUTED IN ANY WAY, AS LONG AS THIS NOTICE
AND ACKNOWLEDGEMENT OF AUTHORSHIP REMAIN.
"""
from django.test import TestCase
import mimetypes
from randomcab... | [
37811,
198,
220,
220,
220,
1332,
13,
9078,
198,
220,
220,
220,
15069,
1853,
449,
3529,
268,
21418,
385,
1279,
73,
3529,
268,
31,
260,
1154,
78,
13,
21283,
29,
198,
220,
220,
220,
220,
198,
43559,
47466,
3180,
19549,
49094,
42881,
34... | 2.84127 | 126 |
# -*- coding: utf-8 -*-
import codecs
import os
import pickle
#import io
#from PIL import Image
import numpy as np
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
40481,
82,
198,
11748,
28686,
198,
11748,
2298,
293,
198,
2,
11748,
33245,
198,
2,
6738,
350,
4146,
1330,
7412,
198,
11748,
299,
32152,
355,
45941,
628,
628,
628
... | 2.727273 | 44 |
## This repo will use python code in general
| [
2235,
770,
29924,
481,
779,
21015,
2438,
287,
2276,
198
] | 4.5 | 10 |
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
2,
15069,
1584,
2297,
10983,
11,
3457,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
407,
779,
428,
2393,
2845,
287,
11846... | 3.753488 | 215 |
# -*- coding: utf-8 -*-
"""
dp for Tornado
MVC Web Application Framework with Tornado
http://github.com/why2pac/dp-tornado
Copyright (c) 2015, why2pac <youngyongpark@gmail.com>
"""
import tornado.web
import tornado.ioloop
import tornado.httpserver
import time
import os
import multiprocessing
import impo... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
628,
220,
288,
79,
329,
48970,
628,
220,
337,
15922,
5313,
15678,
25161,
351,
48970,
198,
220,
2638,
1378,
12567,
13,
785,
14,
22850,
17,
33587,
14,
26059,
... | 3.196296 | 270 |
# AC
A,B,C = map(int, input().split())
if C == 0:
if A > B:
print("Takahashi")
else:
print("Aoki")
if C == 1:
if A < B:
print("Aoki")
else:
print("Takahashi")
| [
2,
7125,
198,
32,
11,
33,
11,
34,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
198,
361,
327,
6624,
657,
25,
198,
220,
220,
220,
611,
317,
1875,
347,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7203,
51,
461,
9... | 1.777778 | 117 |
import argparse
import logging
from sys import exit
from py3tftp import __version__
EPILOG = """
Released under the MIT license.
Copyright 2016 Matt O. <matt@mattscodecave.com>
"""
logging_config = {
'format': '%(asctime)s [%(levelname)s] %(message)s',
'level': logging.INFO,
'filename': None
}
| [
11748,
1822,
29572,
198,
11748,
18931,
198,
6738,
25064,
1330,
8420,
198,
198,
6738,
12972,
18,
83,
701,
79,
1330,
11593,
9641,
834,
198,
198,
8905,
4146,
7730,
796,
37227,
198,
45037,
739,
262,
17168,
5964,
13,
198,
15269,
1584,
4705,
... | 2.666667 | 117 |
from raptiformica.distributed.exec import try_machine_command
def try_issue_shutdown(host_and_port_pairs):
"""
Iterate over host and port pairs and try to issue a shutdown on all nodes until
one returns a nonzero exit code. At that point return the standard out output.
If we ran out of host and port p... | [
6738,
38404,
6933,
3970,
13,
17080,
6169,
13,
18558,
1330,
1949,
62,
30243,
62,
21812,
628,
198,
4299,
1949,
62,
21949,
62,
49625,
2902,
7,
4774,
62,
392,
62,
634,
62,
79,
3468,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
... | 2.946588 | 337 |
from .fixtures import app_harness, socket_client_factory # noqa
| [
6738,
764,
69,
25506,
1330,
598,
62,
9869,
1108,
11,
17802,
62,
16366,
62,
69,
9548,
220,
1303,
645,
20402,
198
] | 3.095238 | 21 |
import asyncio
from decimal import Decimal
from typing import (
Any,
Dict,
Optional,
)
from hummingbot.connector.exchange.k2.k2_utils import convert_from_exchange_trading_pair
from hummingbot.connector.in_flight_order_base import InFlightOrderBase
from hummingbot.core.event.events import (
OrderType,
... | [
11748,
30351,
952,
198,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
19720,
1330,
357,
198,
220,
220,
220,
4377,
11,
198,
220,
220,
220,
360,
713,
11,
198,
220,
220,
220,
32233,
11,
198,
8,
198,
198,
6738,
41465,
13645,
13,
8443,
... | 2.930435 | 115 |
from __future__ import absolute_import
from flytekit.common.types import primitives as _primitives, blobs as _blobs, schema as _schema, helpers as _helpers, \
proto as _proto, containers as _containers
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
6129,
660,
15813,
13,
11321,
13,
19199,
1330,
2684,
20288,
355,
4808,
19795,
20288,
11,
698,
8158,
355,
4808,
2436,
8158,
11,
32815,
355,
4808,
15952,
2611,
11,
49385,
355,
4808... | 3.393443 | 61 |
import logging
import urllib2
from navi.app import main
import os
from flask import Flask, render_template
from flask import request
_STOP = '/stop'
logging.basicConfig()
_pwd = os.path.abspath(__file__)
for i in range(4):
_pwd = os.path.dirname(_pwd)
_pwd += '/web'
_app_flask = Flask(__name__, template_fol... | [
11748,
18931,
198,
11748,
2956,
297,
571,
17,
198,
198,
6738,
6812,
72,
13,
1324,
1330,
1388,
198,
11748,
28686,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
198,
6738,
42903,
1330,
2581,
628,
198,
62,
2257,
3185,
796,
31051,
1... | 2.455927 | 329 |
import json
import random | [
11748,
33918,
198,
11748,
4738
] | 5 | 5 |
# Generated by Django 3.0.8 on 2020-11-26 11:27
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
23,
319,
12131,
12,
1157,
12,
2075,
1367,
25,
1983,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
from typing import List
from models.chapter import Chapter
from models.event import Event
from models.intruction import Instruction
| [
6738,
19720,
1330,
7343,
198,
198,
6738,
4981,
13,
43582,
1330,
7006,
198,
6738,
4981,
13,
15596,
1330,
8558,
198,
6738,
4981,
13,
600,
2762,
1330,
46486,
628
] | 4.785714 | 28 |
from django.shortcuts import render,redirect
from .email import send_welcome_email
from django.contrib.auth.decorators import login_required
from .forms import NewsLetterForm
from .forms import NewProjectsForm
from .models import Profile , Projects
from rest_framework.response import Response
from rest_framework.views ... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
445,
1060,
198,
6738,
764,
12888,
1330,
3758,
62,
86,
9571,
62,
12888,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
7... | 3.428571 | 210 |
__version__ = '1.0.0'
__author__ = 'upnt'
__author_email__ = 'base.shun0329@gmail.com'
__url__ = 'https://github.com/upnt/othello-python'
| [
834,
9641,
834,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
16,
13,
15,
13,
15,
6,
198,
834,
9800,
834,
220,
220,
220,
220,
220,
220,
220,
220,
220,
796,
705,
929,
429,
6,
198,
834,
9800,
62,
12888,
834,
220,
220,
220,
... | 1.847826 | 92 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
from sweetviz.config import config
from sweetviz import sv_html_formatters
from sweetviz.sv_types import FeatureType, FeatureToProcess
import sweetviz.graph
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
13,
83,
15799,
355,
285,
42298,
198,
198,
6738,
6029,
85,
528,
13,
11250... | 3.2875 | 80 |
from keras import layers
from tensorflow_probability import distributions
import tensorflow as tf
| [
6738,
41927,
292,
1330,
11685,
198,
6738,
11192,
273,
11125,
62,
1676,
65,
1799,
1330,
24570,
198,
11748,
11192,
273,
11125,
355,
48700,
628
] | 4.125 | 24 |
'''
.. module:: entree.projects
.. moduleauthor:: Julien Spronck
.. created:: Feb 2018
Module for all projects
'''
from entree.projects.base import ProjectBase
from entree.projects.flask import Flask
from entree.projects.flask_large import FlaskLarge
from entree.projects.html5 import HTML5
from entree.projects.python... | [
7061,
6,
198,
492,
8265,
3712,
920,
631,
13,
42068,
198,
492,
8265,
9800,
3712,
5979,
2013,
5522,
261,
694,
198,
492,
2727,
3712,
3158,
2864,
198,
198,
26796,
329,
477,
4493,
198,
7061,
6,
198,
198,
6738,
920,
631,
13,
42068,
13,
... | 3.164773 | 176 |
from typing import Optional, Dict
from flask import json, request, current_app, g, abort
import requests
| [
6738,
19720,
1330,
32233,
11,
360,
713,
201,
198,
6738,
42903,
1330,
33918,
11,
2581,
11,
1459,
62,
1324,
11,
308,
11,
15614,
201,
198,
11748,
7007,
201,
198,
201,
198
] | 3.548387 | 31 |
import logging
import asyncio
from gym.common.profiler.profiler import Profiler
from gym.common.identity import Peers, Identity
from gym.common.mailing import Mailing
from gym.common.messages import Message, rpc_map, Hello, Info
from gym.common.events import EventBase, EventGreetings, EventMsg
logger = logging.getLo... | [
11748,
18931,
198,
11748,
30351,
952,
198,
198,
6738,
11550,
13,
11321,
13,
5577,
5329,
13,
5577,
5329,
1330,
4415,
5329,
198,
6738,
11550,
13,
11321,
13,
738,
414,
1330,
2631,
364,
11,
27207,
198,
6738,
11550,
13,
11321,
13,
4529,
27... | 3.438776 | 98 |
from heartandsole.core.activity import Activity
import heartandsole.api
from heartandsole.util import time_from_timestring, timestring_from_time
__version__ = '0.0.23'
# __all__ = [
# 'Activity',
# ]
| [
6738,
2612,
392,
6753,
13,
7295,
13,
21797,
1330,
24641,
198,
198,
11748,
2612,
392,
6753,
13,
15042,
198,
6738,
2612,
392,
6753,
13,
22602,
1330,
640,
62,
6738,
62,
16514,
395,
1806,
11,
4628,
395,
1806,
62,
6738,
62,
2435,
198,
19... | 2.833333 | 72 |
# TODO: add docstrings
from chip8.presenter import Presenter
presenter = Presenter()
presenter.run()
| [
2,
16926,
46,
25,
751,
2205,
37336,
198,
198,
6738,
11594,
23,
13,
25579,
263,
1330,
1763,
9255,
198,
198,
25579,
263,
796,
1763,
9255,
3419,
198,
25579,
263,
13,
5143,
3419,
198
] | 3.121212 | 33 |
#!/usr/bin/env python
import rospy
if __name__ == "__main__":
try:
main()
except Exception as exc:
print("Exception occurred: ", exc)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
686,
2777,
88,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1388,
3419,
198,
220,
... | 2.373134 | 67 |
import json
from google.cloud.logging_v2.handlers import CloudLoggingFilter, CloudLoggingHandler
from google.cloud.logging_v2.handlers._helpers import _parse_xcloud_trace
from google.cloud.logging_v2.handlers.handlers import DEFAULT_LOGGER_NAME
from google.cloud.logging_v2.handlers.transports import BackgroundThreadTr... | [
11748,
33918,
198,
198,
6738,
23645,
13,
17721,
13,
6404,
2667,
62,
85,
17,
13,
4993,
8116,
1330,
10130,
11187,
2667,
22417,
11,
10130,
11187,
2667,
25060,
198,
6738,
23645,
13,
17721,
13,
6404,
2667,
62,
85,
17,
13,
4993,
8116,
13557... | 2.388646 | 1,603 |
from Bio.Align.Applications import MuscleCommandline
from Bio import AlignIO
import operator
| [
6738,
16024,
13,
2348,
570,
13,
41995,
1330,
43683,
21575,
1370,
198,
6738,
16024,
1330,
978,
570,
9399,
198,
11748,
10088,
198
] | 4.227273 | 22 |
# Generated by Django 1.11.16 on 2019-07-11
from django.db import migrations
from corehq.sql_db.operations import RawSQLMigration
migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates', 'database_views'))
| [
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1433,
319,
13130,
12,
2998,
12,
1157,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
198,
6738,
4755,
71,
80,
13,
25410,
62,
9945,
13,
3575,
602,
1330,
16089,
17861,
44,
4254,
... | 2.925926 | 81 |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | [
2,
770,
2393,
318,
636,
286,
10934,
13645,
13,
220,
10934,
13645,
318,
1479,
3788,
25,
345,
460,
198,
2,
17678,
4163,
340,
290,
14,
273,
13096,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
198,
2,
13789,
355,
3199,
416,
262,
... | 3.623967 | 484 |
from __future__ import absolute_import
import time
import random
import functools
from huskar_sdk_v2.six import iteritems
from huskar_sdk_v2.utils import (
combine, decode_key, encode_key, get_function_name)
from huskar_sdk_v2.consts import CACHE_KEYS, SWITCH_SUBDOMAIN
from . import SignalComponent, Watchable, re... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
640,
198,
11748,
4738,
198,
11748,
1257,
310,
10141,
198,
198,
6738,
4791,
21070,
62,
21282,
74,
62,
85,
17,
13,
19412,
1330,
11629,
23814,
198,
6738,
4791,
21070,
62,
2... | 2.457986 | 1,321 |
import asyncio
import unittest
from decimal import Decimal
from unittest.mock import patch
from hummingbot.connector.exchange.probit.probit_constants import \
MAX_ORDER_ID_LEN
from hummingbot.connector.exchange.probit.probit_exchange import ProbitExchange
from hummingbot.connector.utils import get_new_client_order... | [
11748,
30351,
952,
198,
11748,
555,
715,
395,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
6738,
41465,
13645,
13,
8443,
273,
13,
1069,
3803,
13,
1676,
2545,
13,
1676,
2545,
62,
99... | 3.241379 | 116 |
import logging
logger = logging.getLogger(__name__)
import os
from baseadmin.backend.interface import register_component
from baseadmin.backend.socketio import command
# add component UI
register_component("SystemActions.js", os.path.dirname(__file__))
# respond to system actions
@command("reboot")
@command("sh... | [
11748,
18931,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
11748,
28686,
198,
198,
6738,
2779,
28482,
13,
1891,
437,
13,
39994,
1330,
7881,
62,
42895,
198,
6738,
2779,
28482,
13,
1891,
437,
13,
... | 3.261682 | 107 |
# This file is part of Pynguin.
#
# Pynguin is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pynguin is distributed in the ho... | [
2,
770,
2393,
318,
636,
286,
9485,
782,
48441,
13,
198,
2,
198,
2,
9485,
782,
48441,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
262,
2846,
286,
262,
22961,
12892,
263,
3611,
5094,
13789... | 3.618026 | 233 |
from django.conf.urls import include, url, patterns
from django.contrib import admin
from contact_manager.views import IndexView,CreateEventView,EventProfileView,CreateContactView,ContactProfileView,ContactSearchView
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^new_event/$',... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
11,
19016,
11,
7572,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
2800,
62,
37153,
13,
33571,
1330,
12901,
7680,
11,
16447,
9237,
7680,
11,
9237,
37046,
7680,
... | 2.53271 | 321 |
"""Factory method for easily getting imdbs by name."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__sets = {}
from datasets.coco import coco
from datasets.ade import ade
from datasets.visual_genome import visual_genome
import numpy as np
# Set up coco... | [
37811,
22810,
2446,
329,
3538,
1972,
545,
67,
1443,
416,
1438,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
834,... | 2.740206 | 485 |
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
| [
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
8692,
1330,
7308,
22362,
320,
1352,
11,
3602,
16354,
35608,
259,
198
] | 3.454545 | 22 |
import unittest
import falcon
import falcon.testing
import app.util.json as json
from app import create_app
| [
11748,
555,
715,
395,
198,
198,
11748,
24215,
1102,
198,
11748,
24215,
1102,
13,
33407,
198,
198,
11748,
598,
13,
22602,
13,
17752,
355,
33918,
198,
6738,
598,
1330,
2251,
62,
1324,
628
] | 3.363636 | 33 |
from __future__ import print_function
import uuid
#==========================================================================
# Example Server Code
# NB: this is example code only. Does not cover
# - authentication,
# - security,
# - timer events
# - maintaining active connections (Pl... | [
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
334,
27112,
628,
628,
198,
2,
23926,
2559,
855,
198,
2,
17934,
9652,
6127,
198,
2,
41354,
25,
428,
318,
1672,
2438,
691,
13,
220,
8314,
407,
3002,
220,
198,
2,
2... | 4.507128 | 491 |
# Copyright 2015 Sindre Ilebekk Johansen and Andreas Sløgedal Løvland
# 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 ap... | [
2,
15069,
1853,
44830,
260,
314,
293,
47083,
74,
16053,
33807,
290,
33728,
3454,
24172,
2004,
282,
406,
24172,
85,
1044,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
... | 2.451052 | 1,093 |
# -*- coding: utf-8 -*-
# Implementation by Pedro Maat C. Massolino,
# hereby denoted as "the implementer".
#
# To the extent possible under law, the implementer has waived all copyright
# and related or neighboring rights to the source code in this file.
# http://creativecommons.org/publicdomain/zero/1.0/
#
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
2,
46333,
416,
28855,
6669,
265,
327,
13,
5674,
349,
2879,
11,
201,
198,
2,
29376,
2853,
5191,
355,
366,
1169,
3494,
263,
1911,
201,
198,
2,
201,
198,... | 1.808734 | 10,786 |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
13130,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 2.466667 | 3,165 |
#open files for reading
inFile = open("inFile.txt", "r")
inFile2 = open("stolen.txt", "r")
#initialize dictionary
D = {}
for line in inFile:
#find lines with 7 characters for the license plates and store into dictionary
#dictionary holds total percentage and total occurences
if line[4] == '-':
... | [
2,
9654,
3696,
329,
3555,
198,
259,
8979,
796,
1280,
7203,
259,
8979,
13,
14116,
1600,
366,
81,
4943,
198,
259,
8979,
17,
796,
1280,
7203,
301,
8622,
13,
14116,
1600,
366,
81,
4943,
198,
198,
2,
36733,
1096,
22155,
198,
35,
796,
2... | 2.173177 | 768 |
import os
import numpy as np
import json
from io import BytesIO
import time
import argparse
import requests
from cli import DefaultArgumentParser
from client import Client
from s3client import ObjectStorageClient
from zounds.persistence import DimensionEncoder, DimensionDecoder
import zounds
from mp3encoder import enc... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
11748,
640,
198,
11748,
1822,
29572,
198,
198,
11748,
7007,
198,
6738,
537,
72,
1330,
15161,
28100,
1713,
46677,
198,
6738... | 3.903846 | 104 |
#!/usr/bin/python
'''
1. blo m8 format output
2. query file length
3. allowed mismatch
'''
from sys import argv
from collections import defaultdict
try:
blom8f = open(argv[1])
lenf = open(argv[2])
allowedMM = int(argv[3])
except:
exit(__doc__)
lenD = defaultdict(int)
for l in lenf:
segs... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
7061,
6,
198,
16,
13,
24924,
285,
23,
5794,
5072,
220,
198,
17,
13,
12405,
2393,
4129,
198,
18,
13,
3142,
46318,
198,
7061,
6,
198,
6738,
25064,
1330,
1822,
85,
198,
6738,
17268,
133... | 1.821366 | 571 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import numpy as np
import pickle
from tqdm import tqdm
import os
import logging
import torch
from torch.utils.data import Dataset, DataLoader
from utility.utils import MODEL_CLASSES
| [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
28686,
198,
11748,
18931,
... | 3.16092 | 87 |
from collections import OrderedDict
from decimal import Decimal
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.db import transaction
from django.utils import six
from django.utils.module_loading import import_string
from django.utils.translation import ug... | [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
19200,
... | 3.042503 | 847 |
from tooz import coordination
coordinator = coordination.get_coordinator('zake://', b'host-1')
coordinator.start()
partitioner = coordinator.join_partitioned_group("group1")
# Returns {'host-1'}
member = partitioner.members_for_object(object())
coordinator.leave_partitioned_group(partitioner)
coordinator.stop()
| [
6738,
1165,
89,
1330,
19877,
198,
198,
37652,
20900,
796,
19877,
13,
1136,
62,
37652,
20900,
10786,
89,
539,
1378,
3256,
275,
6,
4774,
12,
16,
11537,
198,
37652,
20900,
13,
9688,
3419,
198,
3911,
653,
263,
796,
16052,
13,
22179,
62,
... | 3.16 | 100 |
'''
Roll your dice
'''
# to get help
help(str.split)
import random
x= ''
while x != 'xit':
'''
randint - A random integer takes in range [start, end] including the end points.
every time we execute randint it will give random values from 1 thru 6 including 1 and 6
'''
print(random.randint(1, 6))
... | [
7061,
6,
198,
26869,
534,
17963,
198,
7061,
6,
198,
198,
2,
284,
651,
1037,
198,
16794,
7,
2536,
13,
35312,
8,
198,
198,
11748,
4738,
198,
198,
87,
28,
10148,
198,
4514,
2124,
14512,
705,
10198,
10354,
198,
220,
220,
220,
705,
706... | 2.838462 | 130 |
"""test_train/conftest.py.
Tests blocks and networks are differentiable and trainable
"""
| [
37811,
9288,
62,
27432,
14,
1102,
701,
395,
13,
9078,
13,
198,
198,
51,
3558,
7021,
290,
7686,
389,
1180,
3379,
290,
4512,
540,
198,
37811,
198
] | 3.37037 | 27 |
import torch
from torch import nn
from models.tabular.TabModelBase import TabModelBase
class TabMLP(TabModelBase):
"""
Straightforward MLP model for tabular data, loosely based on github.com/fastai/fastai/blob/master/fastai/tabular
layer_sizes can contain ints, indicating the # of hidden units, or float... | [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
198,
6738,
4981,
13,
8658,
934,
13,
33349,
17633,
14881,
1330,
16904,
17633,
14881,
628,
198,
4871,
16904,
5805,
47,
7,
33349,
17633,
14881,
2599,
198,
220,
220,
220,
37227,
198,
220,
... | 2.14941 | 763 |
# -*- coding: utf-8 -*-
import logging
import os
import re
import arrow
import requests
from bs4 import BeautifulSoup
from nightwatch_imax.movie import is_imax_movie
from nightwatch_imax.schedule import create_schedule_info, save_schedule_list
logger = logging.getLogger()
logger.setLevel(logging.INFO)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
302,
198,
198,
11748,
15452,
198,
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
198,
6738,
1755,
8340,
6... | 2.961905 | 105 |
import PySimpleGUI as sg
sg.theme('DarkBlue16')
pw = ""
b64Img = b'iVBORw0KGgoAAAANSUhEUgAAAC8AAAAtCAYAAAA+7zKnAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxMAAAsTAQCanBgAAANpSURBVGhDzZlbSBVBGMd3SzO60wUigoqoh4goiiCIkkKiIBCV5Gh0ewgCK3qLKILo8hZIV+glo7weRUqyMIp8K8wKioiEgiyoh8IyUbxsv29nk3M8xzyXmfH84M/MN0fc/8x+M... | [
11748,
9485,
26437,
40156,
355,
264,
70,
628,
198,
45213,
13,
43810,
10786,
17367,
14573,
1433,
11537,
220,
220,
198,
79,
86,
796,
13538,
198,
65,
2414,
3546,
70,
796,
275,
6,
72,
44526,
1581,
86,
15,
42,
38,
2188,
29697,
1565,
1256... | 1.695985 | 1,569 |
from hitch import Hitch
from hitch.macros import Macros
from hitch import HitchUtils
from os import getcwd
from os.path import join as pjoin
| [
6738,
35996,
1330,
36456,
198,
6738,
35996,
13,
20285,
4951,
1330,
4100,
4951,
198,
6738,
35996,
1330,
36456,
18274,
4487,
198,
6738,
28686,
1330,
651,
66,
16993,
198,
6738,
28686,
13,
6978,
1330,
4654,
355,
279,
22179,
628,
198
] | 3.666667 | 39 |
import pigpio
from read_encoder import decoder
_pi = pigpio.pi()
if not _pi.connected:
raise IOError("Can't connect to pigpio")
DECODER_LEFT_PINS = (20,21)
DECODER_RIGHT_PINS = (19,16)
| [
11748,
12967,
79,
952,
198,
6738,
1100,
62,
12685,
12342,
1330,
875,
12342,
198,
198,
62,
14415,
796,
12967,
79,
952,
13,
14415,
3419,
198,
361,
407,
4808,
14415,
13,
15236,
25,
198,
220,
220,
220,
5298,
24418,
12331,
7203,
6090,
470,... | 2.329268 | 82 |
from kivy.clock import Clock
class Rotator(object):
''' A class that handles the rotation of widgets '''
def rotate_this(self, widget):
''' Starts rotating the given widget '''
self.widgets.append(widget)
if len(self.widgets) == 1:
Clock.schedule_interval(self.rotate, 0.05... | [
6738,
479,
452,
88,
13,
15750,
1330,
21328,
628,
198,
4871,
18481,
1352,
7,
15252,
2599,
198,
220,
220,
220,
705,
7061,
317,
1398,
326,
17105,
262,
13179,
286,
40803,
705,
7061,
628,
220,
220,
220,
825,
23064,
62,
5661,
7,
944,
11,
... | 2.515625 | 128 |
import pyaudio
import scipy.io.wavfile as wavfile
import matplotlib.pylab as plt
import numpy as np
import wave
from scipy.fft import fft, fftfreq
from playsound import playsound
## Reproducir audio
playsound('/home/angie/Git/python_dsp/alejandro.wav')
## trear, extraer y gráficar los datos de audio
fs, data = wavfi... | [
11748,
12972,
24051,
198,
11748,
629,
541,
88,
13,
952,
13,
45137,
7753,
355,
266,
615,
7753,
198,
11748,
2603,
29487,
8019,
13,
79,
2645,
397,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
6769,
198,
198,
6738,
629,
... | 2.186813 | 273 |
import probRobScene
from pyrep import PyRep
from pyrep.objects import Camera
import numpy as np
import sys
from probRobScene.wrappers.coppelia.prbCoppeliaWrapper import cop_from_prs
if len(sys.argv) != 2:
print("python3 coppeliaView.py <path-to-scenario-file>")
sys.exit(0)
scenario_file = sys.argv[1]
scenari... | [
11748,
1861,
14350,
36542,
198,
6738,
12972,
7856,
1330,
9485,
6207,
198,
6738,
12972,
7856,
13,
48205,
1330,
20432,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
6738,
1861,
14350,
36542,
13,
29988,
11799,
13,
1073,
381,
25... | 2.644351 | 239 |
# coding: utf-8
# by Joao Bueno
from random import randrange, choice
import pygame
FR = 30
SIZE = 640, 480
BGCOLOR = (255,255,255)
NODECOLOR = (255,0,255)
NODESIZE = 20,20
GRIDSPACING = 50
MAXTRIES = 1000
STARTINGNODES = 7 #need to eventually get to 20...
# Pattern in Python to make the same module
# be reusable as ... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
416,
5302,
5488,
9842,
23397,
198,
6738,
4738,
1330,
43720,
9521,
11,
3572,
198,
11748,
12972,
6057,
198,
198,
10913,
796,
1542,
198,
33489,
796,
33759,
11,
23487,
198,
33,
15916,
3535,
1581,
... | 2.880208 | 192 |
@apply
| [
31,
39014,
198
] | 2.333333 | 3 |
# -*- coding: utf-8 -*-
from collections import OrderedDict
import numpy as np
import math
import h5py as h5
from ...autograd import Variable
class Module(object):
'''Base class for all neural network modules in qualia.\n
Module can incoporate Modules, allowing to nest them in a tree structure.
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
220,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
220,
198,
11748,
299,
32152,
355,
45941,
220,
198,
11748,
10688,
220,
198,
11748,
289,
20,
9078,
355,
289,
20,
220,
198,
... | 1.854796 | 1,887 |
close_price = driver.find_element_by_xpath(
"/html/body/div[2]/div[1]/div[3]/div[1]/div/table/tr[1]/td[2]/div/div[2]/div[1]/div[2]/div/div[4]/div[2]"
).text
open_price = driver.find_element_by_xpath(
"/html/body/div[2]/div[1]/div[3]/div[1]/div/table/tr[1]/td[2]/div/div[2]/div[1]/div[2]/div/div[... | [
19836,
62,
20888,
796,
4639,
13,
19796,
62,
30854,
62,
1525,
62,
87,
6978,
7,
198,
220,
220,
220,
220,
220,
220,
220,
12813,
6494,
14,
2618,
14,
7146,
58,
17,
60,
14,
7146,
58,
16,
60,
14,
7146,
58,
18,
60,
14,
7146,
58,
16,
... | 1.738562 | 1,071 |
from setuptools import setup, find_packages
import io
version = '0.2.1'
author = 'ZSAIm'
author_email = 'zzsaim@163.com'
with io.open('README.rst', 'r', encoding='utf-8') as freadme:
long_description = freadme.read()
setup(
name='PyJSCaller',
version=version,
description='Run JavaScript code from P... | [
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
11748,
33245,
198,
198,
9641,
796,
705,
15,
13,
17,
13,
16,
6,
198,
9800,
796,
705,
57,
4090,
3546,
6,
198,
9800,
62,
12888,
796,
705,
3019,
82,
1385,
31,
... | 2.511429 | 350 |
import logging
from .backends.email import DjangoEmailBackend
from .models import Message, Messager
from .templates import REGISTER_VERIFY_CODE
from utils.data import guid
logger = logging.getLogger(__name__)
| [
11748,
18931,
198,
198,
6738,
764,
1891,
2412,
13,
12888,
1330,
37770,
15333,
7282,
437,
198,
6738,
764,
27530,
1330,
16000,
11,
10626,
3536,
198,
6738,
764,
11498,
17041,
1330,
23337,
41517,
62,
5959,
5064,
56,
62,
34,
16820,
198,
6738... | 3.365079 | 63 |
#!/usr/bin/env python
import argparse
import build
import fetcher
import os
import sys
import threading
import time
import utils
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Blitz repos')
parser.add_argument('config', type=argparse.FileType('r'), help='Config file as JSON')
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
11748,
1382,
198,
11748,
11351,
2044,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
4704,
278,
198,
11748,
640,
198,
11748,
3384,
4487,
628,
628,
198,
198,
3... | 2.704082 | 686 |
from setuptools import setup
import versioneer
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
requirements = [
# package requirements go here
]
setup(
name='eazyprofiler',
v... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
11748,
2196,
28153,
198,
6738,
28686,
1330,
3108,
198,
5661,
62,
34945,
796,
3108,
13,
397,
2777,
776,
7,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
4480,
1280,
7,
6978,
13,
22179,
... | 2.711982 | 434 |
# Generated by Django 2.0.3 on 2018-09-30 09:48
from django.db import migrations, models
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
18,
319,
2864,
12,
2931,
12,
1270,
7769,
25,
2780,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
26791,
13,
2435,
11340,
628
] | 2.926829 | 41 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 4 08:56:58 2021
@author: Thore
"""
import numpy as np
from numpy.random import exponential
from random import randint, uniform
| [
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,
2365,
220,
604,
8487,
25,
3980,
25,
3365,
33448,
198,
198,
31,
9800,
25,
536,
382,
... | 2.842857 | 70 |
import os
import tempfile
import platform
import pytest
from grep import print_helper
from tests.helper_for_tests import with_f_bwrite, hotfix_delete_temp_dir
@print_helper.color_term_in_string
# TODO do not call hotfix_delete_temp_dir manually
| [
11748,
28686,
198,
11748,
20218,
7753,
198,
11748,
3859,
198,
11748,
12972,
9288,
198,
198,
6738,
42717,
1330,
3601,
62,
2978,
525,
198,
6738,
5254,
13,
2978,
525,
62,
1640,
62,
41989,
1330,
351,
62,
69,
62,
65,
13564,
11,
3024,
13049... | 3.023529 | 85 |
import ncadquery as cq
# These can be modified rather than hardcoding values for each dimension.
circle_radius = 3.0 # The outside radius of the plate
thickness = 0.25 # The thickness of the plate
# Make a plate with two cutouts in it by moving the workplane center point
# 1. Establishes a workplane that an object... | [
11748,
299,
66,
324,
22766,
355,
269,
80,
198,
198,
2,
2312,
460,
307,
9518,
2138,
621,
1327,
66,
7656,
3815,
329,
1123,
15793,
13,
198,
45597,
62,
42172,
796,
513,
13,
15,
220,
1303,
383,
2354,
16874,
286,
262,
7480,
198,
400,
62... | 3.214149 | 523 |
"""
Module: Potential
This module shall be used to implement subclasses of Potentials that formulate a potential as an Function with N-Dimensions.
This module contains all available potentials.
"""
import numpy as np
import sympy as sp
from ensembler.util import ensemblerTypes as t
from ensembler.util.ensembl... | [
37811,
198,
26796,
25,
32480,
198,
220,
220,
220,
770,
8265,
2236,
307,
973,
284,
3494,
850,
37724,
286,
6902,
14817,
326,
46418,
257,
2785,
355,
281,
15553,
351,
399,
12,
29271,
5736,
13,
198,
220,
220,
220,
220,
770,
8265,
4909,
4... | 2.246643 | 6,479 |
from CommonServerPython import *
import os
import demistomock as demisto
RETURN_ERROR_TARGET = 'HTMLDocsAutomation.return_error'
# md = '''Key | Value
# - | -
# city | Mountain View
# country | US
# hostname | dns.google
# ip | 8.8.8.8
# loc | 37.3860,-122.0838
# org | AS15169 Google LLC
# postal | 94035
#... | [
6738,
8070,
10697,
37906,
1330,
1635,
198,
198,
11748,
28686,
198,
11748,
1357,
396,
296,
735,
355,
1357,
396,
78,
628,
198,
26087,
27064,
62,
24908,
62,
51,
46095,
796,
705,
28656,
23579,
82,
38062,
341,
13,
7783,
62,
18224,
6,
628,
... | 2.545946 | 185 |
#!/usr/bin/env python
# coding: utf-8
# # Example Seldon Core Deployments using Helm with Istio
#
# Prequisites
#
# * [Install istio](https://istio.io/latest/docs/setup/getting-started/#download)
# ## Setup Cluster and Ingress
#
# Use the setup notebook to [Setup Cluster](https://docs.seldon.io/projects/seldon-co... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
1303,
17934,
1001,
25900,
7231,
34706,
902,
1262,
28351,
351,
314,
301,
952,
198,
2,
220,
198,
2,
3771,
421,
31327,
198,
2,
220,
198,
... | 2.647757 | 1,939 |
def code():
"""
Example G-code module, a square.
Please simulate first, before milling.
"""
return """
G91
G0 X20 Y0
G0 X0 Y20
G0 X-20 Y0
G0 X0 Y-20
"""
| [
4299,
2438,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
17934,
402,
12,
8189,
8265,
11,
257,
6616,
13,
628,
220,
220,
220,
4222,
29308,
717,
11,
878,
3939,
278,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1441,
37... | 1.847458 | 118 |
from consent import provider_reg
from add_org import add_organization
import psycopg2
import random, string
name = { "title" : "Mr.",
"firstName" : "Testing",
"lastName" : "Testing"
}
csr = "-----BEGIN CERTIFICATE REQUEST-----\nMIICjDCCAXQCAQAwRzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMA... | [
6738,
8281,
1330,
10131,
62,
2301,
198,
6738,
751,
62,
2398,
1330,
751,
62,
9971,
1634,
198,
11748,
17331,
22163,
70,
17,
198,
11748,
4738,
11,
4731,
198,
198,
3672,
796,
1391,
366,
7839,
1,
220,
220,
220,
220,
220,
220,
220,
1058,
... | 1.625663 | 943 |
from .BoundBox_class import BoundBox
from .Point_class import Point
from .Line_class import Line
| [
6738,
764,
49646,
14253,
62,
4871,
1330,
30149,
14253,
198,
6738,
764,
12727,
62,
4871,
1330,
6252,
198,
6738,
764,
13949,
62,
4871,
1330,
6910,
198
] | 3.730769 | 26 |
#!/usr/bin/env python3
# Purpose: Create a new EMR cluster and submits a variable
# number of Steps defined in a separate JSON file
# Author: Gary A. Stafford (November 2020)
import argparse
import json
import logging
import os
import boto3
from botocore.exceptions import ClientError
from scripts.paramete... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
32039,
25,
13610,
257,
649,
412,
13599,
13946,
290,
850,
24883,
257,
7885,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1271,
286,
32144,
5447,
287,
257,
4553,
... | 1.789671 | 2,401 |
from neo4j import GraphDatabase
port = 7688
data_uri = 'bolt://localhost:' + str(port)
username = 'neo4j'
password = 'abc123'
# data_creds = (username, password)
data_creds = None
driver = GraphDatabase.driver(data_uri, auth=data_creds)
"""
@param pkg_data : Python dictionary of package data to be inserted
"""
... | [
6738,
19102,
19,
73,
1330,
29681,
38105,
198,
198,
634,
796,
767,
34427,
198,
7890,
62,
9900,
796,
705,
25593,
1378,
36750,
32105,
1343,
965,
7,
634,
8,
198,
198,
29460,
796,
705,
710,
78,
19,
73,
6,
198,
28712,
796,
705,
39305,
1... | 2.04812 | 665 |
from flask_login import UserMixin
from config.flask_config import CRUD | [
6738,
42903,
62,
38235,
1330,
11787,
35608,
259,
198,
6738,
4566,
13,
2704,
2093,
62,
11250,
1330,
8740,
8322
] | 3.684211 | 19 |
import pytest
from graphene import ObjectType, Schema
from graphene.test import Client
from parler.utils.context import switch_language
from django_ilmoitin.api.schema import Query
from django_ilmoitin.dummy_context import COMMON_CONTEXT, DummyContext
from django_ilmoitin.models import NotificationTemplate
from django... | [
11748,
12972,
9288,
198,
6738,
42463,
1330,
9515,
6030,
11,
10011,
2611,
198,
6738,
42463,
13,
9288,
1330,
20985,
198,
6738,
1582,
1754,
13,
26791,
13,
22866,
1330,
5078,
62,
16129,
198,
198,
6738,
42625,
14208,
62,
346,
5908,
270,
259,... | 3.172414 | 145 |
import requests
# Vuln Base Info
# Vender Fingerprint
# Proof of Concept
# Exploit, can be same with poc()
# Utils | [
11748,
7007,
628,
198,
2,
25442,
77,
7308,
14151,
628,
198,
2,
569,
2194,
39454,
4798,
198,
198,
2,
29999,
286,
26097,
628,
198,
2,
5905,
30711,
11,
460,
307,
976,
351,
279,
420,
3419,
628,
198,
2,
7273,
4487
] | 3.075 | 40 |