content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from settings import constants
from game import bet_sizing, card_tools, card_to_string
from base import Node
import torch
tree_builder = PokerTreeBuilder()
| [
6738,
6460,
1330,
38491,
198,
6738,
983,
1330,
731,
62,
82,
2890,
11,
2657,
62,
31391,
11,
2657,
62,
1462,
62,
8841,
198,
6738,
2779,
1330,
19081,
198,
11748,
28034,
628,
198,
198,
21048,
62,
38272,
796,
36157,
27660,
32875,
3419,
198... | 3.785714 | 42 |
#
# Copyright (c) 2006-2013, Prometheus Research, LLC
#
"""
:mod:`htsql.core.tr.bind`
=========================
This module implements the binding process.
"""
from ..util import maybe, listof, tupleof, similar
from ..adapter import Adapter, Protocol, adapt, adapt_many
from ..domain import (Domain, BooleanDomain, ... | [
2,
198,
2,
15069,
357,
66,
8,
4793,
12,
6390,
11,
42696,
4992,
11,
11419,
198,
2,
628,
198,
37811,
198,
25,
4666,
25,
63,
71,
912,
13976,
13,
7295,
13,
2213,
13,
21653,
63,
198,
4770,
2559,
28,
198,
198,
1212,
8265,
23986,
262,
... | 2.272928 | 4,536 |
import os
import random
from django.db.models import signals
from django.utils import timezone
import factory
from factory.django import DjangoModelFactory
from locuszoom_plotting_service.users.tests.factories import UserFactory
from .. import constants as lz_constants
from .. import models as lz_models
| [
11748,
28686,
198,
11748,
4738,
198,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
10425,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
11748,
8860,
198,
6738,
8860,
13,
28241,
14208,
1330,
37770,
17633,
22810,
198,
198... | 3.714286 | 84 |
import requests
from os import getenv
from typing import List, Dict
_API_URL = getenv('API_URL')
| [
11748,
7007,
198,
6738,
28686,
1330,
651,
24330,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
628,
198,
62,
17614,
62,
21886,
796,
651,
24330,
10786,
17614,
62,
21886,
11537,
628,
628,
198
] | 3.121212 | 33 |
import torch
import torch.nn as nn
import math
import copy
from collections import OrderedDict
import torch.utils.model_zoo as model_zoo
from core.config import cfg
import utils.net as net_utils
from deform.torch_deform_conv.layers import ConvOffset2D
model_urls = {
'resnet50': 'https://s3.amazonaws.com/pytorch/mo... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
10688,
198,
11748,
4866,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
28034,
13,
26791,
13,
19849,
62,
89,
2238,
355,
2746,
62,
89,
2238,
198,
6738,
47... | 2.52474 | 3,274 |
#!/usr/bin/env python
import rospy
from master_msgs.msg import traction_Orders, imu_Speed, imu_Magnetism, pots, current, rpm, arm_Orders, goal,connection
if __name__ == '__main__':
try:
node_Interface()
except rospy.ROSInterruptException:
pass
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
686,
2777,
88,
198,
6738,
4958,
62,
907,
14542,
13,
19662,
1330,
23692,
62,
35422,
364,
11,
545,
84,
62,
22785,
11,
545,
84,
62,
13436,
3262,
1042,
11,
32195,
11,
1459,
11,
... | 2.504587 | 109 |
from pantofola_search.models import *
from pantofola_search.tools.imdb_fetcher import ImdbFetcher
| [
6738,
15857,
1659,
5708,
62,
12947,
13,
27530,
1330,
1635,
198,
6738,
15857,
1659,
5708,
62,
12947,
13,
31391,
13,
320,
9945,
62,
34045,
2044,
1330,
1846,
9945,
37,
316,
2044,
628
] | 3.09375 | 32 |
"""Expose structural RTLIR generation pass.
PyMTL user should only interact with the passes exposed here.
"""
from .StructuralRTLIRGenL4Pass import StructuralRTLIRGenL4Pass as StructuralRTLIRGenPass
| [
37811,
3109,
3455,
13204,
11923,
43,
4663,
5270,
1208,
13,
198,
198,
20519,
13752,
43,
2836,
815,
691,
9427,
351,
262,
8318,
7362,
994,
13,
198,
37811,
198,
6738,
764,
44909,
1523,
14181,
43,
4663,
13746,
43,
19,
14478,
1330,
32112,
1... | 3.448276 | 58 |
import json
import re
import datetime
import os
import arcpy
regex_flag_dict = {
# 'ASCII' re.A, # this is py3 only so wont work in arcgis desktop
'IGNORECASE': re.I,
'LOCALE': re.L,
"MULTILINE": re.M,
"DOTMATCH": re.S,
"UNICODE": re.U,
"VERBOSE": re.X,
}
def _arc_process(rule_data, ... | [
11748,
33918,
198,
11748,
302,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
198,
11748,
10389,
9078,
198,
198,
260,
25636,
62,
32109,
62,
11600,
796,
1391,
198,
220,
220,
220,
1303,
705,
42643,
3978,
6,
302,
13,
32,
11,
1303,
428,
... | 2.125062 | 2,023 |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
2,
15069,
33448,
43208,
21852,
1766,
1539,
12052,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198... | 3.54698 | 298 |
from persona import Persona
from logger_base import log
from cursor import Cursor
| [
6738,
27822,
1330,
41581,
201,
198,
6738,
49706,
62,
8692,
1330,
2604,
201,
198,
6738,
23493,
1330,
327,
21471,
201
] | 4.2 | 20 |
import json
import pytest
from tornado.httpclient import AsyncHTTPClient, HTTPRequest
from hmt.serve.mock.log import Log
from hmt.serve.mock.scope import Scope
from hmt.serve.mock.specs import load_specs
from hmt.serve.utils.routing import HeaderRouting
ACCOUNTS_HEADERS = {
"Host": "sandbox.apis.op-palvelut.fi... | [
11748,
33918,
198,
198,
11748,
12972,
9288,
198,
6738,
33718,
13,
4023,
16366,
1330,
1081,
13361,
40717,
11792,
11,
14626,
18453,
198,
198,
6738,
289,
16762,
13,
2655,
303,
13,
76,
735,
13,
6404,
1330,
5972,
198,
6738,
289,
16762,
13,
... | 2.166316 | 950 |
# Find the maximum negative element in the array.
# Display its value and position in the array.
import random
arr = [random.randint(-50, 50) for _ in range(10)]
print(arr)
num = -50
position = 0
for i in arr:
if i < 0 and i > num:
num = i
print ('The maximum negative element {}, its position: {}'.for... | [
2,
9938,
262,
5415,
4633,
5002,
287,
262,
7177,
13,
198,
2,
16531,
663,
1988,
290,
2292,
287,
262,
7177,
13,
198,
198,
11748,
4738,
198,
198,
3258,
796,
685,
25120,
13,
25192,
600,
32590,
1120,
11,
2026,
8,
329,
4808,
287,
2837,
7... | 2.932203 | 118 |
import collections
from numpy.core.defchararray import lower
import streamlit as st
import numpy as np
import pandas as pd
from pages import utils
| [
11748,
17268,
201,
198,
6738,
299,
32152,
13,
7295,
13,
4299,
10641,
18747,
1330,
2793,
201,
198,
11748,
4269,
18250,
355,
336,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
6738,
5468,
... | 3.377778 | 45 |
"""
Tool to convert 9ML files between different supported formats (e.g. XML_,
JSON_, YAML_) and 9ML versions.
"""
from argparse import ArgumentParser
from pype9.utils.arguments import nineml_document
from pype9.utils.logging import logger
| [
37811,
198,
25391,
284,
10385,
860,
5805,
3696,
1022,
1180,
4855,
17519,
357,
68,
13,
70,
13,
23735,
62,
11,
198,
40386,
62,
11,
575,
2390,
43,
62,
8,
290,
860,
5805,
6300,
13,
198,
37811,
198,
6738,
1822,
29572,
1330,
45751,
46677,... | 3.30137 | 73 |
i=0
s=[50]
for i in range(0,10):
print("w%dwww"%i)
s[i]=i
print(s[i]
| [
72,
28,
15,
198,
82,
41888,
1120,
60,
198,
1640,
1312,
287,
2837,
7,
15,
11,
940,
2599,
628,
220,
220,
220,
3601,
7203,
86,
4,
67,
2503,
1,
4,
72,
8,
198,
220,
220,
220,
264,
58,
72,
22241,
72,
198,
220,
220,
220,
3601,
7,
... | 1.603774 | 53 |
#PYTHON UN POCO MAS AVANZADO METODO DE ABRIR EN CONSOLA
print("PYTHON MAS AVANZADO")
texto = "TEXTO DE PRUEBA"
nombre = "FREYDER"
altura = "2 metros"
year = 2021
#print(f"{texto}--{nombre}--{altura}--{str(year)}")
print(texto + " " +nombre + " "+ altura +" "+ str(year))
#entradas o peticiones por teclado
sitio = i... | [
2,
47,
56,
4221,
1340,
4725,
350,
4503,
46,
32337,
14661,
1565,
57,
2885,
46,
31243,
3727,
46,
5550,
9564,
49,
4663,
12964,
39537,
3535,
32,
220,
198,
4798,
7203,
47,
56,
4221,
1340,
32337,
14661,
1565,
57,
2885,
46,
4943,
198,
198,... | 2.188442 | 398 |
# Copyright (c): Wenyi Tang 2017-2019.
# Author: Wenyi Tang
# Email: wenyi.tang@intel.com
# Update Date: 2019/4/3 5:03
import argparse
import time
from pathlib import Path
import h5py
import numpy as np
import tqdm
from PIL import Image
__all__ = ["gather_videos_vqp", "gather_videos", "print_dataset"]
parser = ... | [
2,
220,
15069,
357,
66,
2599,
370,
28558,
72,
18816,
2177,
12,
23344,
13,
198,
2,
220,
6434,
25,
370,
28558,
72,
18816,
198,
2,
220,
9570,
25,
266,
28558,
72,
13,
83,
648,
31,
48779,
13,
785,
198,
2,
220,
10133,
7536,
25,
13130,... | 2.335223 | 1,235 |
"""
Process 'com.duckduckgo.mobile.android/app_webview/Cookies'
"""
import os
import sqlite3
from modules.helpers.ddg_path_handler import process_directory_paths
query_cookies = """
SELECT
host_key,
path,
name,
value,
creation_utc,
last_access_utc,
expires_utc,
secure,
httponly,
persistent,
... | [
37811,
198,
220,
220,
220,
10854,
705,
785,
13,
646,
694,
646,
694,
2188,
13,
24896,
13,
19411,
14,
1324,
62,
12384,
1177,
14,
28937,
444,
6,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
6738,
13103,
13,
1679... | 2.319749 | 638 |
"""
A simple and short Redis performance test.
"""
__author__ = 'Dan Gunter <dkgunter@lbl.gov>'
__date__ = '8/8/16'
import argparse
import logging
import os
import redis
import subprocess
import sys
import time
_log = logging.getLogger(__name__)
_h = logging.StreamHandler()
_h.setFormatter(logging.Formatter('%(asctim... | [
37811,
198,
32,
2829,
290,
1790,
2297,
271,
2854,
1332,
13,
198,
37811,
198,
834,
9800,
834,
796,
705,
21174,
6748,
353,
1279,
34388,
7145,
353,
31,
75,
2436,
13,
9567,
29,
6,
198,
834,
4475,
834,
796,
705,
23,
14,
23,
14,
1433,
... | 2.371191 | 361 |
print("Importing packages... ", end="")
##############################################################################
import wandb
import numpy as np
from keras.datasets import fashion_mnist
import matplotlib.pyplot as plt
wandb.init(project="trail-1")
print("Done!")
##################################################... | [
4798,
7203,
20939,
278,
10392,
986,
33172,
886,
2625,
4943,
198,
29113,
29113,
7804,
4242,
2235,
198,
11748,
11569,
65,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
41927,
292,
13,
19608,
292,
1039,
1330,
6977,
62,
10295,
396,
198,
11... | 3.0625 | 432 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : icode_flask_be
# @Package : task
# @Author : jackeroo
# @Time : 2019/11/29 5:25
# @File : task.py
# @Contact :
# @Software : PyCharm
# @Desc :
from app.extensions import celery
from flask_jwt_extended import jwt_required
from app.help... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
16775,
220,
1058,
220,
14158,
1098,
62,
2704,
2093,
62,
1350,
198,
2,
2488,
27813,
220,
1058,
220,
4876,
198... | 2.418605 | 172 |
# Copyright 2021 The LabTools Authors
#
# 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 ... | [
2,
15069,
33448,
383,
3498,
33637,
46665,
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,
9... | 2.585196 | 716 |
###
# Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
# Distributed under a Modified BSD License.
# See accompanying file LICENSE.txt or
# http://www.opengeosys.org/project/license
###
# Execute this file to generate TESPy network csv files
from tespy import cmp, con, nwk, hlp
from tespy impo... | [
21017,
198,
2,
15069,
357,
66,
8,
2321,
12,
42334,
11,
4946,
10082,
34049,
893,
8108,
357,
4023,
1378,
2503,
13,
404,
3540,
418,
893,
13,
2398,
8,
198,
2,
4307,
6169,
739,
257,
40499,
347,
10305,
13789,
13,
198,
2,
4091,
19249,
23... | 1.993278 | 1,934 |
import py
from pypy.jit.codegen.ppc.rgenop import RPPCGenOp
from pypy.rpython.lltypesystem import lltype
from pypy.jit.codegen.test.rgenop_tests import AbstractRGenOpTests, FUNC, FUNC2
from ctypes import cast, c_int, c_void_p, CFUNCTYPE
from pypy.jit.codegen.ppc import instruction as insn
# for the individual tests se... | [
11748,
12972,
198,
6738,
279,
4464,
88,
13,
45051,
13,
8189,
5235,
13,
381,
66,
13,
81,
5235,
404,
1330,
25812,
5662,
13746,
18257,
198,
6738,
279,
4464,
88,
13,
81,
29412,
13,
297,
19199,
6781,
1330,
32660,
4906,
198,
6738,
279,
44... | 2.632353 | 136 |
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
from .models import TestModel
import json
import redis
import time
redis_cli = redis.Redis(host='127.0.0.1', port=6379, db=0)
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
6359,
41871,
1330,
269,
27891,
69,
62,
42679,
198,
6738,
42625,
14208,
13,
4023,
1330,
449,
1559,
31077,
198,
6738,
764,
275... | 2.897727 | 88 |
#%% [markdown]
# # Comparing approaches to feedforwardness ordering
# For evaluating feedforwardness, we have:
# - 4 networks
# - Axo-dendritic (AD)
# - Axo-axonic (AA)
# - Dendro-dendritic (DD)
# - Dendro-axonic (DA)
# - 4+ algorithms for finding an ordering
# - Signal flow (SF)
# - Spring rank (SR)
... | [
2,
16626,
685,
4102,
2902,
60,
198,
2,
1303,
3082,
1723,
10581,
284,
3745,
11813,
1108,
16216,
198,
2,
1114,
22232,
3745,
11813,
1108,
11,
356,
423,
25,
198,
2,
532,
604,
7686,
198,
2,
220,
220,
220,
532,
12176,
78,
12,
67,
437,
... | 3.027174 | 368 |
import logging
import json
import os
# Initialize logger
logger = logging.getLogger(__name__)
if __name__ == '__main__':
blockprocessedconfig = './config/blockprocessed.json'
bm = BlockManager(blockprocessedconfig,300000)
bm.set_processedblock(242443)
print(bm.get_processedblock())
| [
11748,
18931,
198,
11748,
33918,
198,
11748,
28686,
198,
198,
2,
20768,
1096,
49706,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
22... | 2.770642 | 109 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 23 20:35:49 2017
@author: wrightad
"""
import numpy as N
import matplotlib.pyplot as plt
def rmse(v1,v2):
'''
rmse(v1,v2) - Calculates the root mean square error between two vectors
Version 1.0
Created On: Apr 17, 2017
Last Mo... | [
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,
26223,
1526,
2242,
1160,
25,
2327,
25,
2920,
2177,
198,
198,
31,
9800,
25,
1319,
432,
324... | 2.294067 | 2,309 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
from .fast_ism import FastISM
from .ism_base import NaiveISM
| [
6738,
764,
7217,
62,
1042,
1330,
12549,
31125,
198,
6738,
764,
1042,
62,
8692,
1330,
11013,
425,
31125,
198
] | 3.210526 | 19 |
import numpy as np
from numpy.testing import assert_array_equal
from ..odf import OdfFit, OdfModel, gfa
from dipy.core.triangle_subdivide import (create_half_unit_sphere,
disperse_charges)
from nose.tools import (assert_almost_equal, assert_equal, assert_raises,
assert_true)
| [
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
18747,
62,
40496,
198,
6738,
11485,
375,
69,
1330,
440,
7568,
31805,
11,
440,
7568,
17633,
11,
308,
13331,
198,
6738,
19550,
88,
13,
7295,
13,
28461,
924... | 2.623932 | 117 |
import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind(('127.0.0.1', 50007))
s.listen(1)
while True:
conn, addr = s.accept()
with conn:
while True:
data = conn.recv(1024)
if not data:
break
... | [
11748,
17802,
198,
198,
4480,
17802,
13,
44971,
7,
44971,
13,
8579,
62,
1268,
2767,
11,
17802,
13,
50,
11290,
62,
2257,
32235,
8,
355,
264,
25,
198,
220,
220,
220,
264,
13,
21653,
7,
10786,
16799,
13,
15,
13,
15,
13,
16,
3256,
2... | 1.792373 | 236 |
#!/usr/bin/python
# encoding: utf-8
#!/usr/bin/python
# encoding: utf-8
import torch
import torch.nn as nn
from torch.autograd import Variable
import collections
from tqdm import tqdm
import numpy as np
import cv2
import os
import random
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
def pro... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
... | 2.174419 | 946 |
#!/usr/bin/env python
from __future__ import division
import random
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("input", help="input FASTQ Directory")
parser.add_argument("-n", "--number", type=int, help="number of reads to sample")
args = parser.parse_args()
random.seed(12)
if ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
4738,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
48610,
13,
2... | 2.362771 | 1,155 |
from django.shortcuts import render
from rest_framework.viewsets import ReadOnlyModelViewSet, ModelViewSet
from areas.models import Area
from areas.serializers import AreaSerializer, SubAreaSerializer
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
1334,
62,
30604,
13,
1177,
28709,
1330,
4149,
10049,
17633,
7680,
7248,
11,
9104,
7680,
7248,
198,
198,
6738,
3006,
13,
27530,
1330,
9498,
198,
6738,
3006,
13,
46911,
11341,
1... | 4.019608 | 51 |
# par ou impar ( condicional simples)
x = int(input('Digite um valor inteiro: '))
if (x % 2 == 0):
print('O numero par!')
if(x % 2 == 1):
print('O numero impar') | [
2,
1582,
267,
84,
848,
283,
357,
1779,
291,
1538,
985,
2374,
8,
198,
87,
796,
493,
7,
15414,
10786,
19511,
578,
23781,
1188,
273,
493,
68,
7058,
25,
705,
4008,
198,
361,
357,
87,
4064,
362,
6624,
657,
2599,
198,
220,
220,
220,
3... | 2.28 | 75 |
import math
from .exceptions import OutOfBoundsException
| [
11748,
10688,
198,
198,
6738,
764,
1069,
11755,
1330,
3806,
5189,
33,
3733,
16922,
628,
628,
628
] | 3.705882 | 17 |
from django.shortcuts import render
import sys, json, random, hashlib, calendar,time, datetime, os, random
import ast
from cryptography.fernet import Fernet
from django.shortcuts import redirect
from django.http import Http404, HttpResponse
import json
from cryptography.hazmat.primitives.serialization import Encoding, ... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
11748,
25064,
11,
33918,
11,
4738,
11,
12234,
8019,
11,
11845,
11,
2435,
11,
4818,
8079,
11,
28686,
11,
4738,
198,
11748,
6468,
198,
6738,
45898,
13,
69,
1142,
316,
1330,
38982,
3... | 3.612903 | 186 |
# UCTP Main Methods
import objects
import ioData
import random
# Set '1' to allow, during the run, the print on terminal of some steps
printSteps = 0
#==============================================================================================================
# Create the first generation of solutions
#---------... | [
2,
471,
4177,
47,
8774,
25458,
198,
198,
11748,
5563,
198,
11748,
33245,
6601,
198,
11748,
4738,
198,
198,
2,
5345,
705,
16,
6,
284,
1249,
11,
1141,
262,
1057,
11,
262,
3601,
319,
12094,
286,
617,
4831,
198,
4798,
8600,
82,
796,
6... | 6.508497 | 765 |
from pylegos import LogFactory
if __name__ == '__main__':
main() | [
198,
6738,
12972,
1455,
418,
1330,
5972,
22810,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.642857 | 28 |
#!/usr/bin/env python
import sys
import os
import time
import test_class
import subprocess
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
640,
198,
198,
11748,
1332,
62,
4871,
198,
198,
11748,
850,
14681,
628
] | 3.241379 | 29 |
"""
colors
=====
Functions that manipulate colors and arrays of colors
There are three basic types of color types: rgb, hex and tuple:
rgb - An rgb color is a string of the form 'rgb(a,b,c)' where a, b and c are
floats between 0 and 255 inclusive.
hex - A hex color is a string of the form '#xxxxxx' where each x is ... | [
37811,
198,
4033,
669,
198,
1421,
28,
198,
198,
24629,
2733,
326,
18510,
7577,
290,
26515,
286,
7577,
198,
198,
1858,
389,
1115,
4096,
3858,
286,
3124,
3858,
25,
46140,
11,
17910,
290,
46545,
25,
198,
198,
81,
22296,
532,
1052,
46140,... | 1.99893 | 8,409 |
# used by Matcher
RECEIVE_KEY = "_receive_{id}"
LAST_RECEIVE_KEY = "_last_receive"
ARG_KEY = "{key}"
REJECT_TARGET = "_current_target"
REJECT_CACHE_TARGET = "_next_target"
# used by Rule
PREFIX_KEY = "_prefix"
CMD_KEY = "command"
RAW_CMD_KEY = "raw_command"
CMD_ARG_KEY = "command_arg"
SHELL_ARGS = "_args"
SHELL_ARGV... | [
2,
973,
416,
6550,
2044,
198,
2200,
5222,
9306,
62,
20373,
796,
45434,
260,
15164,
23330,
312,
36786,
198,
43,
11262,
62,
2200,
5222,
9306,
62,
20373,
796,
45434,
12957,
62,
260,
15164,
1,
198,
1503,
38,
62,
20373,
796,
45144,
2539,
... | 2.307692 | 182 |
from django.shortcuts import render, redirect
from django.contrib.auth.models import User
from django.db import IntegrityError
from django.contrib.auth import authenticate, login, logout
from .models import TodoModel
from django.views.generic import ListView, DetailView, CreateView, DeleteView, UpdateView
from django.u... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
9945,
1330,
39348,
12331,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
1... | 2.627907 | 516 |
from ._version import version_info, __version__
from .keplergl import *
| [
6738,
47540,
9641,
1330,
2196,
62,
10951,
11,
11593,
9641,
834,
198,
198,
6738,
764,
365,
20053,
4743,
1330,
1635,
198
] | 3.47619 | 21 |
from django.test import tag
from django.core.files import File
from unittest import mock
from iaso import models as m
from iaso.test import APITestCase
| [
6738,
42625,
14208,
13,
9288,
1330,
7621,
198,
6738,
42625,
14208,
13,
7295,
13,
16624,
1330,
9220,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
6738,
1312,
292,
78,
1330,
4981,
355,
285,
198,
6738,
1312,
292,
78,
13,
9288,
1330,
... | 3.276596 | 47 |
import world
import api.captcha.captcha_phone
from api.token.jwt_token import JWTToken
"""
Django shortcuts.py
"""
world_instance = world.World.instance()
redis_server = world_instance.redis
captcha_manager = api.captcha.captcha_phone.CaptchaPhone(redis_server)
jwt_cli = JWTToken()
import django.db | [
11748,
995,
198,
11748,
40391,
13,
27144,
11693,
13,
27144,
11693,
62,
4862,
198,
6738,
40391,
13,
30001,
13,
73,
46569,
62,
30001,
1330,
449,
54,
15751,
4233,
198,
198,
37811,
198,
35,
73,
14208,
220,
32953,
13,
9078,
198,
37811,
198... | 2.839623 | 106 |
#!/usr/bin/env python
import os
import sys
import time
import datetime
import logging
import subprocess
logging.basicConfig(level=logging.INFO)
log = logging.getLogger('dl')
NOW = datetime.datetime.now()
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
DOWNLOAD_ROOT = os.getcwd()
VERSION = '5.22-61.0'
PANTHER... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
4818,
8079,
198,
11748,
18931,
198,
11748,
850,
14681,
628,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
... | 2.427451 | 255 |
# Copyright 2019 cole Polytechnique Fdrale de Lausanne. 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 requ... | [
2,
15069,
13130,
763,
293,
12280,
23873,
2350,
376,
7109,
1000,
390,
4689,
385,
21952,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,... | 3.881944 | 288 |
import kivy
from kivy.app import App
from kivy.uix.tabbedpanel import TabbedPanelHeader
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.scrollview import ScrollView
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.... | [
11748,
479,
452,
88,
198,
198,
6738,
479,
452,
88,
13,
1324,
1330,
2034,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
8658,
3077,
35330,
1330,
16904,
3077,
26639,
39681,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
8658,
3077,
35330,
13... | 2.814208 | 183 |
import itertools
from io import StringIO
from queue import LifoQueue
inputs = "2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2"
#data = [int(v) for v in StringIO(inputs).read().split(' ')]
data = [int(v) for v in open("day8.input").read().split(' ')]
# idata = iter(data)
# q = LifoQueue()
# tc_metadata = parse_packet(idata, q, ... | [
11748,
340,
861,
10141,
198,
6738,
33245,
1330,
10903,
9399,
198,
6738,
16834,
1330,
21073,
78,
34991,
198,
198,
15414,
82,
796,
366,
17,
513,
657,
513,
838,
1367,
1105,
352,
352,
657,
352,
7388,
362,
352,
352,
362,
1,
198,
198,
2,
... | 2.472527 | 182 |
import json
import os
import cv2
import numpy as np
from dataset_utils.geometry import computeCameraCalibration
if __name__ == '__main__':
vid_dir = 'D:/Skola/PhD/data/2016-ITS-BrnoCompSpeed/dataset/session5_left'
result_path = 'D:/Skola/PhD/data/2016-ITS-BrnoCompSpeed/results/session5_left/system_SochorCV... | [
11748,
33918,
198,
11748,
28686,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
27039,
62,
26791,
13,
469,
15748,
1330,
24061,
35632,
9771,
571,
1358,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
... | 2.5 | 154 |
#!/usr/bin/python2
import re
import subprocess
from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
198,
198,
11748,
302,
198,
11748,
850,
14681,
198,
6738,
9093,
856,
13,
21412,
62,
26791,
13,
35487,
1330,
28038,
856,
26796,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354... | 2.93617 | 47 |
"""@package modified_cholesky
Function to perform the modified Cholesky decomposition.
"""
import numpy as np
import numpy.linalg as la
def modified_cholesky(a):
""" Returns the matrix A if A is positive definite, or returns a modified A that is positive definite.
:param np.array a: (n, n) The symmetric matr... | [
37811,
31,
26495,
9518,
62,
354,
4316,
2584,
198,
22203,
284,
1620,
262,
9518,
609,
4316,
2584,
26969,
9150,
13,
198,
37811,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
75,
1292,
70,
355,
8591,
628,
198,
4299,
9518... | 2.592 | 375 |
# -*- coding: utf-8 -*-
"""
Python Slack Bot docker parser class for use with the HB Bot
"""
import os
import re
DOCKER_SUPPORTED = ["image", "container", "help"]
SUBCOMMAND_SUPPORTED = ["ls",]
def parse_command(incoming_text):
"""
incoming_text: A text string to parse for docker commands
returns: ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
37906,
36256,
18579,
36253,
30751,
1398,
329,
779,
351,
262,
25997,
18579,
198,
37811,
198,
11748,
28686,
198,
11748,
302,
198,
35,
11290,
1137,
62,
40331,
154... | 2.456562 | 541 |
# Entregar arquivo com o cdigo da funo teste_cartela
#
# Verificador de cartela de bingo
#
# CRIAR UMA FUNO DO TIPO:
#
# def teste_cartela(numeros_bilhete,numeros_sorteados): #numeros_bilhete e numeros_sorteados tipo lista com valores inteiros
#
# ...
#
# return([bingo,n_acertos,p_acertos,[numeros_acertados],[numeros_f... | [
2,
7232,
2301,
283,
610,
421,
23593,
401,
267,
269,
12894,
78,
12379,
1257,
78,
1332,
68,
62,
26674,
10304,
198,
2,
198,
2,
4643,
811,
7079,
390,
6383,
10304,
390,
275,
32735,
198,
2,
198,
2,
327,
7112,
1503,
471,
5673,
29397,
46,... | 1.866551 | 577 |
from pymarkovchain_dynamic.MarkovChain import *
from pymarkovchain_dynamic.DynamicMarkovChain import *
| [
6738,
12972,
4102,
709,
7983,
62,
67,
28995,
13,
9704,
709,
35491,
1330,
1635,
198,
6738,
12972,
4102,
709,
7983,
62,
67,
28995,
13,
44090,
9704,
709,
35491,
1330,
1635,
198
] | 3.322581 | 31 |
from transformers import GPTNeoForCausalLM, GPT2Tokenizer
from fastapi import FastAPI
import re
import json
from pydantic import BaseModel
from typing import Optional
import torch
app = FastAPI()
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
morph_path = './Model'
morph_tokenizer = GPT2Toke... | [
6738,
6121,
364,
1330,
402,
11571,
8199,
78,
1890,
24334,
6775,
31288,
11,
402,
11571,
17,
30642,
7509,
198,
6738,
3049,
15042,
1330,
12549,
17614,
198,
11748,
302,
198,
11748,
33918,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
220,
... | 2.354871 | 1,006 |
(enrollment)=
# Enrollment and Waitlist
For Dartmouth students, you can track the enrollment status using the ORC timetable.
The course is capped at 20 students to facilitate small group collaboration for the final data science project. Please fill out this Google form (while logged in via your Dartmouth email) if y... | [
7,
268,
48108,
47505,
198,
198,
2,
2039,
48108,
290,
16314,
4868,
198,
198,
1890,
47888,
2444,
11,
345,
460,
2610,
262,
20753,
3722,
1262,
262,
6375,
34,
40021,
13,
198,
198,
464,
1781,
318,
28490,
379,
1160,
2444,
284,
15570,
1402,
... | 3.405405 | 148 |
import sys, getopt
from zlib import adler32
from PIL import Image
from rnd import Generator, sample
Usage = """
python decode.py <password> <input image file> <output file>
"""
password, image_file, out_file = sys.argv[1:]
password = password.encode("utf-8")
image = Image.open(image_file)
dimx, dimy = image.size
npix... | [
11748,
25064,
11,
651,
8738,
198,
6738,
1976,
8019,
1330,
512,
1754,
2624,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
374,
358,
1330,
35986,
11,
6291,
198,
198,
28350,
796,
37227,
198,
29412,
36899,
13,
9078,
1279,
28712,
29,
1279,
... | 2.706271 | 303 |
from django.shortcuts import render
from .models import Member
def index(request):
"""List all members
"""
advisors = Member.objects.filter(advisor=True)
members = Member.objects.filter(advisor=False)
context = {'mobile_title_page': 'Equipe',
'advisors': advisors, 'members': members... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
764,
27530,
1330,
10239,
628,
198,
4299,
6376,
7,
25927,
2599,
198,
220,
220,
220,
37227,
8053,
477,
1866,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
32456,
796,
10239,
... | 2.89313 | 131 |
#!/usr/bin/env python3
import sys
import requests
ping = sys.argv[1]
pong = sys.argv[2]
word = sys.argv[3]
if not ping.startswith('http'):
ping = 'http://' + ping
if not pong.startswith('http'):
pong = 'http://' + pong
while True:
r = requests.post(ping, data={'food': word})
answer = r.text
if ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
11748,
7007,
198,
198,
13886,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
79,
506,
796,
25064,
13,
853,
85,
58,
17,
60,
198,
4775,
796,
25064,
13,
853,
... | 2.269036 | 197 |
from django import forms
from .models import Comment, Rating, RatingStar
| [
6738,
42625,
14208,
1330,
5107,
198,
198,
6738,
764,
27530,
1330,
18957,
11,
12028,
11,
12028,
8248,
628,
198
] | 4 | 19 |
from textwrap import dedent
import numpy as np
import subprocess
import sys
import pytest
| [
6738,
2420,
37150,
1330,
4648,
298,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
12972,
9288,
628
] | 3.791667 | 24 |
#!/usr/bin/env python
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2013,2014,2017 Contributor
#
# 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... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
269,
9078,
12,
521,
298,
12,
5715,
25,
604,
26,
33793,
12,
8658,
82,
12,
14171,
25,
18038,
532,
9,
12,
198,
2,
409,
25,
900,
4292,
8658,
2705,
8658,
11338,
28,
1... | 3.383513 | 279 |
import json
import os
from extra import MainStart
import threading
import moment
from jinja2 import Environment, PackageLoader
from sanic import Sanic, response
from sanic.log import logger
from termcolor import colored
from conf import config
from spider import bot
env = Environment(loader=PackageLoad... | [
11748,
33918,
201,
198,
11748,
28686,
201,
198,
6738,
3131,
1330,
8774,
10434,
201,
198,
11748,
4704,
278,
201,
198,
201,
198,
11748,
2589,
201,
198,
6738,
474,
259,
6592,
17,
1330,
9344,
11,
15717,
17401,
201,
198,
6738,
5336,
291,
1... | 2.776371 | 237 |
#! /usr/bin/env python
"""
Copyright (C) 2014 CompleteDB LLC.
This program is free software: you can redistribute it and/or modify
it under the terms of the Apache License Version 2.0 http://www.apache.org/licenses.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; with... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
37811,
201,
198,
15269,
357,
34,
8,
1946,
13248,
11012,
11419,
13,
201,
198,
201,
198,
1212,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
201,
... | 3.181818 | 165 |
from flask import render_template, flash, send_from_directory, send_file
from app.giturl_class.url_form import UrlForm
from app.giturl_class.download_form import DownloadButton
from app.giturl_class import bp
import json
import os
USE_TEST_FILE = False
if(os.getenv('SM2KG_TEST_MODE') == 'TRUE'):
USE_TEST_FILE = ... | [
198,
6738,
42903,
1330,
8543,
62,
28243,
11,
7644,
11,
3758,
62,
6738,
62,
34945,
11,
3758,
62,
7753,
198,
6738,
598,
13,
18300,
6371,
62,
4871,
13,
6371,
62,
687,
1330,
8799,
75,
8479,
198,
6738,
598,
13,
18300,
6371,
62,
4871,
1... | 2.813268 | 407 |
import platform
from enum import Enum, unique
| [
11748,
3859,
198,
6738,
33829,
1330,
2039,
388,
11,
3748,
628
] | 4.272727 | 11 |
from django.shortcuts import render, get_object_or_404
from django.core.exceptions import PermissionDenied
from django.http import Http404
from .models import Course
from ..mod.models import Moderator
from ..files.models import File
from ..decorators import login
# Create your views here. | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
2448,
3411,
21306,
798,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
26429,... | 3.573171 | 82 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-26 14:26
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
24,
13,
16,
319,
1584,
12,
486,
12,
2075,
1478,
25,
2075,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
19... | 2.719298 | 57 |
#!/usr/bin/env python
import math
def reduce_leftovers(leftovers, reactions):
"""
>>> reactions = read_input("input/14.txt")
>>> leftovers = {"DWBL": 10}
>>> reduce_leftovers(leftovers, reactions)
>>> leftovers
{'DWBL': 1, 'ORE': 149}
>>> leftovers = {"ZKZHV": 9}
>>> reduce_leftovers(l... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
10688,
198,
198,
4299,
4646,
62,
9464,
13801,
7,
9464,
13801,
11,
12737,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
13163,
12737,
796,
1100,
62,
15414,
7203,
1541... | 1.961914 | 2,153 |
import time
from actions import Action, action
| [
11748,
640,
198,
198,
6738,
4028,
1330,
7561,
11,
2223,
628
] | 4.454545 | 11 |
from ..utils.kfrozendict import kfrozendict
from ..utils.kfrozendict import kassertfrozen
| [
6738,
11485,
26791,
13,
74,
69,
305,
89,
437,
713,
1330,
479,
69,
305,
89,
437,
713,
198,
6738,
11485,
26791,
13,
74,
69,
305,
89,
437,
713,
1330,
479,
30493,
69,
42005,
198
] | 2.647059 | 34 |
'''
Author: Marcel Miljak
Klasse: 5aHEL - HTL Anichstrae
Diplomarbeit: Entwicklung eines Hamster Roboters
Jahrgang: 2021/22
'''
import time
from time import sleep
import RPi.GPIO as GPIO
DIR_2 = 18 # Direction-Pin vom 2ten Modul
DIR_1 = 24 # Direction-pin vom 1sten Modul
STEP_1 = 25 # S... | [
7061,
6,
198,
13838,
25,
36547,
4460,
73,
461,
198,
42,
75,
21612,
25,
642,
64,
39,
3698,
532,
7154,
43,
1052,
488,
12044,
68,
198,
18683,
7302,
283,
15357,
25,
7232,
16239,
75,
2150,
304,
1127,
4345,
1706,
16071,
364,
198,
41,
99... | 1.980209 | 1,819 |
from multiprocessing import Process
import pymongo
from itertools import combinations
import csv
import time
import sys
mongo_ip = "192.168.1.127"
db_name = "analysis"
collection_name = "common_items"
max_item_threshold = 20
if __name__ == '__main__':
mongo_con = pymongo.MongoClient(mongo_ip)
mongo_col = eval("mo... | [
6738,
18540,
305,
919,
278,
1330,
10854,
198,
11748,
279,
4948,
25162,
198,
6738,
340,
861,
10141,
1330,
17790,
198,
11748,
269,
21370,
198,
11748,
640,
198,
11748,
25064,
198,
198,
76,
25162,
62,
541,
796,
366,
17477,
13,
14656,
13,
... | 2.653409 | 176 |
# Generated by Django 2.2.24 on 2022-02-10 12:36
import bluebottle.utils.fields
import bluebottle.utils.validators
import colorfield.fields
from django.db import migrations, models
import django_better_admin_arrayfield.models.fields
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1731,
319,
33160,
12,
2999,
12,
940,
1105,
25,
2623,
198,
198,
11748,
4171,
10985,
293,
13,
26791,
13,
25747,
198,
11748,
4171,
10985,
293,
13,
26791,
13,
12102,
2024,
198,
11748,
3124,
324... | 3.263889 | 72 |
import os
import pandas as pd
from kloppy import (
load_epts_tracking_data,
to_pandas,
load_metrica_json_event_data,
load_xml_code_data,
)
from codeball import (
GameDataset,
DataType,
TrackingFrame,
EventsFrame,
CodesFrame,
PossessionsFrame,
BaseFrame,
Zones,
Area... | [
11748,
28686,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
479,
5439,
14097,
1330,
357,
198,
220,
220,
220,
3440,
62,
19598,
82,
62,
36280,
62,
7890,
11,
198,
220,
220,
220,
284,
62,
79,
392,
292,
11,
198,
220,
220,
... | 2.346591 | 176 |
import random
print("Rock, Paper, Scissors!")
player = int(input("What do you choose? Type 0 for Rock, 1 for paper, 2 for Scissors: "))
computer = random.randint(0, 2)
game = ["""
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
""", """
_______
---' ____)____
______)
... | [
11748,
4738,
198,
4798,
7203,
19665,
11,
14962,
11,
1446,
32555,
2474,
8,
198,
7829,
796,
493,
7,
15414,
7203,
2061,
466,
345,
3853,
30,
5994,
657,
329,
4631,
11,
352,
329,
3348,
11,
362,
329,
1446,
32555,
25,
366,
4008,
198,
33215,... | 1.741187 | 1,163 |
# Detector (Faster RCNN)
# forward propogate from input to output
# Goal: test if the validation output act as expected
import sys
from pathlib import Path
import pickle
import timeit
from datetime import datetime
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow.keras.regularizers impor... | [
2,
4614,
9250,
357,
37,
1603,
13987,
6144,
8,
198,
2,
2651,
2632,
519,
378,
422,
5128,
284,
5072,
198,
2,
25376,
25,
1332,
611,
262,
21201,
5072,
719,
355,
2938,
198,
198,
11748,
25064,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748... | 2.606542 | 1,070 |
#!/usr/bin/env python3
# -*- coding=utf-8 -*-
import cv2 as cv
import numpy as np
"""
cv.moments(contours, binaryImage)
- contours:
- binaryImage: bool, default False
"""
if "__main__" == __name__:
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
201,
198,
2,
532,
9,
12,
19617,
28,
40477,
12,
23,
532,
9,
12,
201,
198,
201,
198,
11748,
269,
85,
17,
355,
269,
85,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
... | 1.812903 | 155 |
from settings import Settings
from ship import Ship
import pygame
import sys
from trap import Trap
from time import clock
from random import randint
################################ Main ################################
run_game()
| [
6738,
6460,
1330,
16163,
198,
6738,
4074,
1330,
16656,
198,
11748,
12972,
6057,
198,
11748,
25064,
198,
6738,
12840,
1330,
21914,
198,
6738,
640,
1330,
8801,
198,
6738,
4738,
1330,
43720,
600,
198,
220,
220,
220,
220,
220,
220,
220,
220... | 4.321429 | 56 |
import sys
import argparse
if __name__ == '__main__':
main() | [
11748,
25064,
198,
11748,
1822,
29572,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.72 | 25 |
# Copyright 2017 Mirko Lelansky <mlelansky@mail.de>
#
# 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 a... | [
2,
15069,
2177,
7381,
7204,
406,
417,
49792,
1279,
76,
293,
75,
49792,
31,
4529,
13,
2934,
29,
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,
... | 2.811399 | 1,930 |
from __future__ import (
annotations,
)
| [
6738,
11593,
37443,
834,
1330,
357,
198,
220,
220,
220,
37647,
11,
198,
8,
198
] | 2.933333 | 15 |
from collections import defaultdict
from os import makedirs
from os.path import realpath, join, dirname, isdir, exists
from shutil import copy
from jinja2 import Environment, FileSystemLoader
from cid.cli.cli_model_specs import CliModelSpecs
from cid.cli import cli_post_processing
from cid.parser.cid_parser import pa... | [
6738,
17268,
1330,
4277,
11600,
198,
6738,
28686,
1330,
285,
4335,
17062,
198,
6738,
28686,
13,
6978,
1330,
1103,
6978,
11,
4654,
11,
26672,
3672,
11,
318,
15908,
11,
7160,
198,
6738,
4423,
346,
1330,
4866,
198,
198,
6738,
474,
259,
6... | 3.30131 | 229 |
import mxnet as mx
#import neomxnet
import os
import json
import numpy as np
from collections import namedtuple
import os
dtype='float32'
Batch = namedtuple('Batch', ['data'])
ctx = mx.neuron()
is_gpu = False
def transform_fn(mod, img, input_content_type, output_content_type):
'''
stream = os.popen('/opt/aws/neuro... | [
11748,
285,
87,
3262,
355,
285,
87,
198,
2,
11748,
497,
296,
87,
3262,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
11748,
28686,
198,
67,
4906,
11639,
22468,
... | 2.366957 | 575 |
import sys
import pandas as pd
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
''' Load and merge two CSV files - one containing messages and the other containing categories
Args:
messages_filepath (str): Path to the CSV file containing messages
... | [
11748,
25064,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
628,
198,
4299,
3440,
62,
7890,
7,
37348,
1095,
62,
7753,
6978,
11,
9376,
62,
7753,
6978,
2599,
198,
220,
220,
220,
705,
7061,
... | 2.781536 | 1,094 |
###########################
#
# #650 Divisors of Binomial Product - Project Euler
# https://projecteuler.net/problem=650
#
# Code by Kevin Marciniak
#
###########################
| [
14468,
7804,
21017,
198,
2,
198,
2,
1303,
17544,
4777,
271,
669,
286,
20828,
49070,
8721,
532,
4935,
412,
18173,
198,
2,
3740,
1378,
16302,
68,
18173,
13,
3262,
14,
45573,
28,
17544,
198,
2,
198,
2,
6127,
416,
7939,
13067,
5362,
461... | 3.58 | 50 |
from bs4 import BeautifulSoup
import os
import csv
bicycles = []
basepath = 'HTMLFiles/'
outputFile = open('scraped.py','a')
outputFile.write("list=[")
len1 = len(os.listdir(basepath))
counter1 = 0
for entry in os.listdir(basepath):
counter2 = 0
len2 = len(os.listdir(basepath+'/'+entry))
for folder in os.... | [
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
28686,
220,
198,
11748,
269,
21370,
198,
198,
65,
4611,
5427,
796,
17635,
198,
12093,
538,
776,
796,
705,
28656,
25876,
14,
6,
198,
22915,
8979,
796,
1280,
10786,
1416,
31951,
13,... | 1.855135 | 1,850 |
'''
v0.1 2015/11/26
- add output()
- add setmode()
- add setup()
'''
# Usage
'''
from dummyGPIO import CDummyGPIO
GPIO = CDummyGPIO()
GPIO.setmode(GPIO.BOARD)
GPIO.setup(10, GPIO.OUT)
'''
| [
7061,
6,
198,
85,
15,
13,
16,
1853,
14,
1157,
14,
2075,
198,
220,
532,
751,
5072,
3419,
198,
220,
532,
751,
900,
14171,
3419,
198,
220,
532,
751,
9058,
3419,
198,
7061,
6,
198,
198,
2,
29566,
198,
198,
7061,
6,
198,
6738,
31548,... | 2.164835 | 91 |
from setuptools import setup
setup(name='django-headmaster',
version='0.0.1',
description='Add extra headers to your site via your settings file',
url='http://github.com/CyrusBiotechnology/django-headmaster',
author='Peter Novotnak',
author_email='peter@cyrusbio.com',
license='MIT',... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
28241,
14208,
12,
2256,
9866,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
15,
13,
15,
13,
16,
3256,
198,
220,
220,
220,
220,
220,
6764,
11639,
4550,
3131,
24... | 2.550336 | 149 |
# -*- coding: utf-8 -*-
import os
import pytest
from sfm import lines_count
if __name__ == "__main__":
import os
basename = os.path.basename(__file__)
pytest.main([basename, "-s", "--tb=native"])
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
11748,
12972,
9288,
198,
6738,
264,
38353,
1330,
3951,
62,
9127,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220... | 2.377778 | 90 |
###########################################################################################
# accesscontrol - access control permission and need definitions
#
# Date Author Reason
# ---- ------ ------
# 01/18/14 Lou King Create
#
# Copyright 2014... | [
29113,
29113,
14468,
7804,
21017,
198,
2,
1895,
13716,
532,
1895,
1630,
7170,
290,
761,
17336,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
7536,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6434,
220,
220,
220,
220,
22... | 3.984375 | 384 |
from nailgun.extensions import BaseExtension
| [
6738,
17864,
7145,
13,
2302,
5736,
1330,
7308,
11627,
3004,
628,
198
] | 3.916667 | 12 |
# vim: ts=4:sw=4:expandtabs
__author__ = 'zach.mott@gmail.com'
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from email_utils.tasks import send_mail
RESEND_EMAIL_PERMISSION = 'can_resend_email'
| [
2,
43907,
25,
40379,
28,
19,
25,
2032,
28,
19,
25,
11201,
392,
8658,
82,
198,
198,
834,
9800,
834,
796,
705,
89,
620,
13,
76,
1252,
31,
14816,
13,
785,
6,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
142... | 2.727273 | 110 |
#!/usr/bin/python3
from .log_utils import get_module_logger
from defang import defang
import random
import string
import urllib.parse
logger = get_module_logger(__name__)
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
6738,
764,
6404,
62,
26791,
1330,
651,
62,
21412,
62,
6404,
1362,
198,
6738,
825,
648,
1330,
825,
648,
198,
198,
11748,
4738,
198,
11748,
4731,
198,
11748,
2956,
297,
571,
13,
2957... | 2.916667 | 60 |
# empty file telling python that this directory is a package
| [
2,
6565,
2393,
5149,
21015,
326,
428,
8619,
318,
257,
5301,
198
] | 5.083333 | 12 |
# Slush Tools STRING Module
| [
2,
3454,
1530,
20003,
19269,
2751,
19937,
198
] | 3.5 | 8 |