content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import os
import tempfile
import sys
import errno
import getpass
import configparser
import pytest
from unittest import mock
from keyring.testing.backend import BackendBasicTests
from keyring.testing.util import random_string
from keyrings.cryptfile import file
from keyrings.cryptfile.file_base import encodebytes
fr... | [
11748,
28686,
198,
11748,
20218,
7753,
198,
11748,
25064,
198,
11748,
11454,
3919,
198,
11748,
651,
6603,
198,
11748,
4566,
48610,
198,
198,
11748,
12972,
9288,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
6738,
1994,
1806,
13,
33407,... | 3.756522 | 115 |
import math
import pygame
from pygame.locals import *
class Flags(object):
"""docstring for Flags"""
# def __get_sound(self):
# self.sounds = {
# 'move' : pygame.mixer.Sound(self.proj_path + 'asset/sound/Coin_1.wav'),
# 'merge' : pygame.mixer.Sound(self.proj_path + 'asset/... | [
11748,
10688,
198,
11748,
12972,
6057,
198,
6738,
12972,
6057,
13,
17946,
874,
1330,
1635,
198,
198,
4871,
34771,
7,
15252,
2599,
198,
220,
220,
220,
37227,
15390,
8841,
329,
34771,
37811,
628,
198,
220,
220,
220,
1303,
825,
11593,
1136... | 2.101852 | 216 |
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey has `on_delete` set to the desired behavior.
# * Remove `managed = False` lines if ... | [
2,
770,
318,
281,
8295,
12,
27568,
37770,
2746,
8265,
13,
198,
2,
921,
1183,
423,
284,
466,
262,
1708,
14500,
284,
3424,
428,
510,
25,
198,
2,
220,
220,
1635,
30144,
9521,
4981,
6,
1502,
198,
2,
220,
220,
1635,
6889,
1654,
1123,
... | 3.686131 | 137 |
import json
| [
11748,
33918,
628
] | 4.333333 | 3 |
import arcade
import arcade.gui
import menu_view
from data_handler import DataHandler
from arcade.gui import UIManager
from constants import *
import os
dirname = os.path.dirname(__file__)
button_normal = arcade.load_texture(os.path.join(dirname, 'images/red_button_normal.png'))
hovered_texture = arcade.load_texture(... | [
11748,
27210,
198,
11748,
27210,
13,
48317,
198,
11748,
6859,
62,
1177,
198,
6738,
1366,
62,
30281,
1330,
6060,
25060,
198,
6738,
27210,
13,
48317,
1330,
471,
3955,
272,
3536,
198,
6738,
38491,
1330,
1635,
628,
198,
11748,
28686,
198,
1... | 2.115714 | 2,100 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tests for `{{ cookiecutter.package_name }}` package.
"""
from {{ cookiecutter.package_name }} import {{ cookiecutter.package_name }}
class Test{{ cookiecutter.project_name|replace(' ', '')}}(object):
@classmethod
@classmethod
# vim: filetype=python
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
51,
3558,
329,
4600,
27007,
19751,
8968,
353,
13,
26495,
62,
3672,
34949,
63,
5301,
13,
198,
37811,
... | 2.803571 | 112 |
version = "2018-08-01" | [
9641,
796,
366,
7908,
12,
2919,
12,
486,
1
] | 2.444444 | 9 |
import fs
from .setup import * | [
11748,
43458,
198,
198,
6738,
764,
40406,
1330,
1635
] | 3.444444 | 9 |
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('competitions', views.competitions, name='competitions'),
path('athletes', views.athletes, name='athletes'),
path('news', views.news, name='news')
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5009,
13,
9630,
11,
1438,
11639,
9630,
33809,
198,
220,
220,
220,
3108,
10786,
... | 2.873684 | 95 |
##updated api path, engine, top p
##Runs as expected
import os
import sys
API_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..')
sys.path.append(API_PATH)
from api import GPT, Example, UIConfig
# Construct GPT object and show some examples
gpt = GPT(engine="curie-instruct-beta",
... | [
2235,
43162,
40391,
3108,
11,
3113,
11,
1353,
279,
220,
198,
2235,
10987,
82,
355,
2938,
220,
198,
11748,
28686,
198,
11748,
25064,
198,
17614,
62,
34219,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
1... | 3.538111 | 879 |
import numpy as np
from random import randint
class Transposon(object):
""" Transposon is our general class used for evolutionary
algorithms applied to vectors"""
def initialize(self):
""" sets up our population and asserts
our fitness func is of correct type
"""
assert self.mutation_rate >= 0.0
assert... | [
11748,
299,
32152,
355,
45941,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
4871,
3602,
1930,
261,
7,
15252,
2599,
198,
197,
37811,
3602,
1930,
261,
318,
674,
2276,
1398,
973,
329,
16673,
220,
198,
197,
282,
7727,
907,
5625,
284,
3010... | 2.891929 | 1,462 |
for i in range(int(input())):
solution()
#Author: Dharmik Bhadra | [
220,
220,
220,
220,
201,
198,
1640,
1312,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
201,
198,
220,
220,
220,
4610,
3419,
201,
198,
201,
198,
2,
13838,
25,
20529,
1670,
1134,
16581,
49456
] | 2.228571 | 35 |
# -*- coding: utf-8 -*-
from math import sqrt
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
10688,
1330,
19862,
17034,
628
] | 2.35 | 20 |
# coding: utf-8
from builtins import object
import time
import threading
from xTool.compat import PY3
if PY3:
from threading import BoundedSemaphore
else:
from threading import _BoundedSemaphore as BoundedSemaphore
class BoundedEmptySemaphore(BoundedSemaphore):
"""
A bounded semaphore that is initia... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
3170,
1040,
1330,
2134,
198,
11748,
640,
198,
11748,
4704,
278,
198,
6738,
2124,
25391,
13,
5589,
265,
1330,
350,
56,
18,
198,
198,
361,
350,
56,
18,
25,
198,
220,
220,
220,
422,
4... | 2.126532 | 2,284 |
import asyncio
import glob as _glob
import itertools as _iter
import pathlib as _path
import random as _rand
import functools
from pyperator import IP
from pyperator.nodes import Component
from pyperator.utils import InputPort, OutputPort, FilePort
from pyperator.decorators import log_schedule, component, inport, out... | [
11748,
30351,
952,
198,
11748,
15095,
355,
4808,
4743,
672,
198,
11748,
340,
861,
10141,
355,
4808,
2676,
198,
11748,
3108,
8019,
355,
4808,
6978,
198,
11748,
4738,
355,
4808,
25192,
198,
198,
11748,
1257,
310,
10141,
198,
198,
6738,
12... | 2.635199 | 2,108 |
from abc import ABC, abstractmethod
from skimage.io import imread, imshow
import matplotlib.pyplot as plt
import random
import numpy as np
import matplotlib.patches as patches
import os
from torch.utils.data import Dataset, DataLoader
import torch
import glob
if __name__ == "__main__":
from co... | [
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
6738,
1341,
9060,
13,
952,
1330,
545,
961,
11,
545,
12860,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
1174... | 2.8125 | 272 |
from uuid import UUID
from botx import Bot, SendingMessage
bot = Bot()
CHAT_ID = UUID("1f972f5e-6d17-4f39-be5b-f7e20f1b4d13")
BOT_ID = UUID("cc257e1c-c028-4181-a055-01e14ba881b0")
CTS_HOST = "my-cts.example.com"
| [
6738,
334,
27112,
1330,
471,
27586,
198,
198,
6738,
10214,
87,
1330,
18579,
11,
32038,
12837,
198,
198,
13645,
796,
18579,
3419,
198,
31542,
62,
2389,
796,
471,
27586,
7203,
16,
69,
24,
4761,
69,
20,
68,
12,
21,
67,
1558,
12,
19,
... | 1.919643 | 112 |
# -*- coding: utf-8 -*-
"""
Repair strategy
- repair_ss:
attempts at repairing a stacking sequence for the following constraints:
- damage tolerance
- contiguity
- disorientation
- 10% rule
- balance
"""
__version__ = '2.0'
__author__ = 'Noemie Fedon'
import sys
import nump... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
6207,
958,
4811,
198,
198,
12,
9185,
62,
824,
25,
198,
220,
220,
220,
6370,
379,
39005,
257,
41228,
8379,
329,
262,
1708,
17778,
25,
198,
220,
220,
220,
... | 2.585201 | 3,703 |
from __future__ import print_function
import numpy as np
import os
from sensor_msgs.msg import LaserScan
from navrep.tools.data_extraction import archive_to_lidar_dataset
from navrep.models.vae1d import Conv1DVAE, reset_graph
DEBUG_PLOTTING = True
# Parameters for training
batch_size = 100
N_SCANS_PER_BATCH = 1
NUM_... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
12694,
62,
907,
14542,
13,
19662,
1330,
23222,
33351,
198,
198,
6738,
6812,
7856,
13,
31391,
13,
7890,
62,
2302,
7861,
1330... | 2.261398 | 658 |
# modules in standard library
import re
from urllib.parse import urlparse
import requests
from selenium import webdriver
from selenium.webdriver.common.keys import Keys #需要引入 keys 包
import time
def main(domain):
"""
主函数,只需执行它就能get子域名
:param domain:
:return:
"""
dns_record = DnsR... | [
2,
13103,
287,
3210,
5888,
201,
198,
11748,
302,
201,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
29572,
201,
198,
201,
198,
11748,
7007,
201,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
201,
198,
6738,
384,
11925,
1505,
13... | 1.725753 | 299 |
/usr/lib/python3.6/encodings/utf_16_be.py | [
14,
14629,
14,
8019,
14,
29412,
18,
13,
21,
14,
12685,
375,
654,
14,
40477,
62,
1433,
62,
1350,
13,
9078
] | 1.952381 | 21 |
from datetime import datetime
from django.db import models
from django.conf import settings
from django.core.cache import get_cache
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
651,
62,
23870,
628,
198
] | 3.648649 | 37 |
# Ensure that accidentally-raised StopIterations are transformed to RuntimeErrors
# Livin' in the future!
from __future__ import generator_stop
from wordsearch.board import Board
import string, random
def start_board_run(start, direction, board):
"""
A generator that yields successive values of "board" starting ... | [
2,
48987,
326,
14716,
12,
49309,
13707,
29993,
602,
389,
14434,
284,
43160,
9139,
5965,
198,
2,
32020,
259,
6,
287,
262,
2003,
0,
198,
6738,
11593,
37443,
834,
1330,
17301,
62,
11338,
198,
198,
6738,
1573,
12947,
13,
3526,
1330,
5926,... | 2.81179 | 1,408 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class GetSna... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
24118,
687,
10290,
357,
27110,
5235,
8,
16984,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760... | 2.487064 | 889 |
#!/usr/bin/python3
import re
import requests
from time import sleep
from argparse import ArgumentParser
if __name__ == '__main__':
args = get_args()
data = ''
pattern = 'QCTF{.*?}'
while not re.search(pattern, data):
update = requests.get('%s/%s/' % (args.url, args.token)).text
hexc... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
302,
198,
11748,
7007,
198,
198,
6738,
640,
1330,
3993,
198,
6738,
1822,
29572,
1330,
45751,
46677,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
19... | 2.26935 | 323 |
import pycountry
from django.db import migrations
| [
11748,
12972,
19315,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628,
198
] | 3.533333 | 15 |
# This file is code generated
import ctypes
simple_string = ctypes.c_char * 1024
UInt64 = ctypes.c_ulonglong
ResourceHandle = ctypes.c_void_p
EnumResourceHandle = ctypes.c_void_p
EnumSoftwareFeedHandle = ctypes.c_void_p
SessionHandle = ctypes.c_void_p
TimestampUTC = ctypes.c_uint * 4
EnumSoftwareComponentHandle = ct... | [
2,
770,
2393,
318,
2438,
7560,
198,
198,
11748,
269,
19199,
198,
198,
36439,
62,
8841,
796,
269,
19199,
13,
66,
62,
10641,
1635,
28119,
198,
198,
52,
5317,
2414,
796,
269,
19199,
13,
66,
62,
377,
506,
6511,
198,
26198,
37508,
796,
... | 2.669903 | 206 |
import os
import random
import string
from flask import Flask, render_template, request, redirect, url_for
app = Flask(__name__)
COMPLAINTS_DIR = 'complaints'
os.makedirs(COMPLAINTS_DIR, exist_ok=True)
@app.route('/')
@app.route('/complaint', methods=['GET'])
@app.route('/complaint', methods=['POST'])
if __name__ ... | [
11748,
28686,
198,
11748,
4738,
198,
11748,
4731,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
18941,
11,
19016,
62,
1640,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
9858,
6489,
29833,
4694,
62,
34720,... | 2.57931 | 145 |
# -*- coding: utf-8 -*-
from django.template import Template, Context, loader, TemplateDoesNotExist
from django.contrib.sites.models import Site
from django.core.mail import EmailMultiAlternatives
from django.template.defaultfilters import striptags
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
13,
28243,
1330,
37350,
11,
30532,
11,
40213,
11,
37350,
13921,
3673,
3109,
396,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
49315,
13,
27530,
1330,
... | 3.426667 | 75 |
import string
import random as rnd
for u in range(1000):
p1 = random_password()
print(p1)
| [
11748,
4731,
198,
11748,
4738,
355,
374,
358,
198,
198,
1640,
334,
287,
2837,
7,
12825,
2599,
198,
220,
220,
220,
279,
16,
796,
4738,
62,
28712,
3419,
198,
220,
220,
220,
3601,
7,
79,
16,
8,
198
] | 2.605263 | 38 |
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
2864,
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,
7330... | 3.385638 | 376 |
# Copyright (c) 2022 Dai HBG
"""
获得日频指数成分股数据
日志
2022-01-05
- init,迁移原本功能
2022-01-08
- 更新:传入dates
- 增量更新
2022-01-11
- 更新:新增多种指数
"""
from jqdatasdk import *
import os
import pickle
import numpy as np
| [
2,
15069,
357,
66,
8,
33160,
39604,
25997,
38,
628,
198,
37811,
198,
164,
236,
115,
36181,
245,
33768,
98,
165,
95,
239,
162,
234,
229,
46763,
108,
22755,
238,
26344,
228,
164,
224,
94,
46763,
108,
162,
235,
106,
198,
198,
33768,
... | 1.243902 | 164 |
from get_set_login_data import get_login_data
from instaling import start_instaling
if __name__ == "__main__":
main() | [
6738,
651,
62,
2617,
62,
38235,
62,
7890,
1330,
651,
62,
38235,
62,
7890,
198,
6738,
916,
4272,
1330,
923,
62,
8625,
4272,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419
] | 2.97561 | 41 |
var = "Casper"
print ("Value 1:", var)
var = 23
print ("Value 2:", var)
var = "You get the point"
print ("Value 3:", var) | [
7785,
796,
366,
34,
32981,
1,
201,
198,
4798,
5855,
11395,
352,
25,
1600,
1401,
8,
201,
198,
7785,
796,
2242,
201,
198,
4798,
5855,
11395,
362,
25,
1600,
1401,
8,
201,
198,
7785,
796,
366,
1639,
651,
262,
966,
1,
201,
198,
4798,
... | 2.470588 | 51 |
FRAGMENT_PRODUCT = """
fragment fragmentProduct on Product {
productId
typeId
type_ {
typeId
name
}
attributesUnicodeText {
edges {
node {
name
field {
name
type_
}
value
}
}
}
attributesBoolean {
edges {
node {
... | [
37,
33202,
10979,
62,
4805,
28644,
796,
37227,
198,
8310,
363,
434,
24225,
15667,
319,
8721,
1391,
198,
220,
1720,
7390,
198,
220,
2099,
7390,
198,
220,
2099,
62,
1391,
198,
220,
220,
220,
2099,
7390,
198,
220,
220,
220,
1438,
198,
... | 1.6465 | 1,157 |
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class ConcentrationSeries(Model):
"""NOTE: This class is auto generated by the... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
220... | 2.717507 | 754 |
from Algorithm import SearchTree, GraphContainer
from multiprocessing import Process, Queue
import time
| [
6738,
978,
42289,
1330,
11140,
27660,
11,
29681,
29869,
198,
6738,
18540,
305,
919,
278,
1330,
10854,
11,
4670,
518,
198,
11748,
640,
628,
628
] | 4.28 | 25 |
from urllib3_mock import Responses
from anipy import (
AuthenticationProvider,
)
import os
# from anipy.exception import AniException
# from anipy.exception import InternalServerError
# from anipy.exception import InvalidGrantException
# from anipy.exception import InvalidRequestException
# from anipy.exception ... | [
6738,
2956,
297,
571,
18,
62,
76,
735,
1330,
20549,
274,
198,
198,
6738,
281,
541,
88,
1330,
357,
198,
220,
220,
220,
48191,
29495,
11,
198,
8,
198,
198,
11748,
28686,
198,
198,
2,
422,
281,
541,
88,
13,
1069,
4516,
1330,
1052,
... | 3.535354 | 99 |
from controller.invoker.invoker_cmd_base import BaseMirControllerInvoker
from controller.utils import checker, utils
from id_definition.error_codes import CTLResponseCode
from proto import backend_pb2
| [
6738,
10444,
13,
16340,
11020,
13,
16340,
11020,
62,
28758,
62,
8692,
1330,
7308,
27453,
22130,
19904,
11020,
198,
6738,
10444,
13,
26791,
1330,
2198,
263,
11,
3384,
4487,
198,
6738,
4686,
62,
46758,
13,
18224,
62,
40148,
1330,
327,
149... | 3.884615 | 52 |
from .base import BaseBreadcrumbMixin # noqa
from .create import CreateBreadcrumbMixin # noqa
from .delete import DeleteBreadcrumbMixin # noqa
from .detail import DetailBreadcrumbMixin # noqa
from .list import ListBreadcrumbMixin # noqa
from .update import UpdateBreadcrumbMixin # noqa
| [
6738,
764,
8692,
1330,
7308,
33,
961,
6098,
2178,
35608,
259,
220,
1303,
645,
20402,
198,
6738,
764,
17953,
1330,
13610,
33,
961,
6098,
2178,
35608,
259,
220,
1303,
645,
20402,
198,
6738,
764,
33678,
1330,
23520,
33,
961,
6098,
2178,
... | 3.041667 | 96 |
from .data import Data
from .error import Error
from .paged_data import PagedData
from .pagination import Pagination
from .short_url import ShortUrl
__all__ = ["Data", "PagedData", "Error", "Pagination", "ShortUrl"]
| [
6738,
764,
7890,
1330,
6060,
198,
6738,
764,
18224,
1330,
13047,
198,
6738,
764,
79,
1886,
62,
7890,
1330,
350,
1886,
6601,
198,
6738,
764,
79,
363,
1883,
1330,
31525,
1883,
198,
6738,
764,
19509,
62,
6371,
1330,
10073,
28165,
198,
19... | 3.238806 | 67 |
# Original by EMC-prog
# UNDER THE MIT LICENSE
import paramiko
import time
import os
import json
import sys
from getpass import getpass
print("ServerChecker")
print("Check and command your linux server without knowing Linux")
time.sleep(2)
os.system('cls' if os.name == 'nt' else 'clear')
#Know if the program has be... | [
2,
13745,
416,
412,
9655,
12,
1676,
70,
198,
2,
35219,
3336,
17168,
38559,
24290,
628,
198,
11748,
5772,
12125,
198,
11748,
640,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
25064,
198,
6738,
651,
6603,
1330,
651,
6603,
198,
198,
... | 2.897333 | 750 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="sdi_pandas",
version="0.0.38",
author="Thorsten Hapke",
author_email="thorsten.hapke@sap.com",
description="List of operators using the pandas module for processing the input",
long_de... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
... | 2.510811 | 370 |
''' An example of learning a NFSP Agent on Limit Texas Holdem
'''
import torch
import rlcard
from rlcard.agents.nfsp_agent_pytorch import NFSPAgent
from rlcard.agents.random_agent import RandomAgent
from rlcard.utils.utils import set_global_seed
from rlcard.utils.logger import Logger
# Make environment
env = rlcard.m... | [
7061,
6,
1052,
1672,
286,
4673,
257,
41288,
4303,
15906,
319,
27272,
3936,
9340,
368,
198,
7061,
6,
198,
11748,
28034,
198,
198,
11748,
374,
75,
9517,
198,
6738,
374,
75,
9517,
13,
49638,
13,
77,
69,
2777,
62,
25781,
62,
9078,
13165... | 2.420646 | 1,424 |
import os
import random
import cv2
import matplotlib.image as mpimg
import numpy as np
import pandas as pd
import torch
from torch.utils.data import Dataset
class FacialKeypointsDataset(Dataset):
"""
Face Landmarks dataset.
"""
def __init__(self, csv_file, root_dir, transform=None):
"""
... | [
11748,
28686,
198,
11748,
4738,
198,
198,
11748,
269,
85,
17,
198,
11748,
2603,
29487,
8019,
13,
9060,
355,
29034,
9600,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28034,
198,
6738,
28034,
13,
... | 2.504378 | 571 |
import requests
| [
11748,
7007,
628
] | 5.666667 | 3 |
TWOHERTZ = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
FIVEHERTZ = [
36,
40,
44,
48,
52,
56,
60,
64,
100,
104,
108,
112,
116,
132,
136,
140,
149,
153,
157,
161,
165,
]
ALL = [
1,
2,
3,
4,
5,
6,
7,
8,
9,
... | [
34551,
12096,
17395,
57,
796,
685,
16,
11,
362,
11,
513,
11,
604,
11,
642,
11,
718,
11,
767,
11,
807,
11,
860,
11,
838,
11,
1367,
60,
198,
198,
37,
9306,
16879,
51,
57,
796,
685,
198,
220,
220,
220,
4570,
11,
198,
220,
220,
... | 1.413699 | 365 |
#!/usr/bin/env python3.8
print(uni_char1('abcdaefg')) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
13,
23,
198,
198,
4798,
7,
35657,
62,
10641,
16,
10786,
39305,
6814,
891,
70,
6,
4008
] | 2.076923 | 26 |
from django.urls import path
from .views import RecipientDetails, MeetSchedule, DashboardView, MyMapView, SubmitMap, submitForReview,AdminGraphView, FinalSubmit, Approval, SentForApprovalMap, SaveApprovedVersion, GetLatestRevision, CommentSubmit, Discard, ReviewerReview, embedded_signing_ceremony, get_access_code, auth... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
33571,
1330,
3311,
48137,
24259,
11,
21167,
27054,
5950,
11,
16189,
3526,
7680,
11,
2011,
13912,
7680,
11,
39900,
13912,
11,
9199,
1890,
14832,
11,
46787,
37065,
7680,
11,
81... | 2.937276 | 558 |
# -*- coding:utf-8 -*-
import os
import tempfile
from flexmock import flexmock
from orator.commands.command import Command
from . import OratorCommandTestCase
class FooCommand(Command):
"""
Test Command
"""
name = "foo"
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
20218,
7753,
198,
198,
6738,
7059,
76,
735,
1330,
7059,
76,
735,
198,
198,
6738,
393,
1352,
13,
9503,
1746,
13,
21812,
1330,
9455,
198,
198,
6738,... | 2.858824 | 85 |
# Copyright 2021 Google LLC 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 or ag... | [
2,
15069,
33448,
3012,
11419,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
... | 3.658228 | 316 |
# Copyright 2021 AI Singapore
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | [
2,
15069,
33448,
9552,
12551,
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.630359 | 863 |
import pytest
from punch import file_configuration as fc
@pytest.fixture
@pytest.fixture
@pytest.fixture
| [
11748,
12972,
9288,
198,
198,
6738,
10862,
1330,
2393,
62,
11250,
3924,
355,
277,
66,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
628,
628,
198
] | 2.744186 | 43 |
import datetime
emp1 = Employee.from_string("Jason-Gibbs-jason.gibbs@hotmail.com-36000")
emp2 = Employee.from_string("Mason-Storm-mason.storm@gmail.com-45000")
emp3 = Employee.from_string("Kelvin-Hobbs-kelvin.hobbs@yahoomail.com-89000")
Employee.set_raise()
emp1.apply_raise()
emp2.apply_raise()
emp3.apply_raise()
... | [
11748,
4818,
8079,
628,
198,
198,
45787,
16,
796,
36824,
13,
6738,
62,
8841,
7203,
26497,
12,
38,
571,
1443,
12,
73,
888,
13,
70,
571,
1443,
31,
8940,
4529,
13,
785,
12,
2623,
830,
4943,
198,
45787,
17,
796,
36824,
13,
6738,
62,
... | 2.498141 | 269 |
"""
This tests whether
from future.builtins import *
works as expected:
- This should NOT introduce namespace pollution on Py3.
- On Python 2, this should not introduce any symbols that aren't in
__builtin__.
"""
from __future__ import absolute_import, print_function, unicode_literals
import copy
from futur... | [
37811,
198,
1212,
5254,
1771,
628,
220,
220,
220,
422,
2003,
13,
18780,
1040,
1330,
1635,
198,
198,
5225,
355,
2938,
25,
198,
12,
770,
815,
5626,
10400,
25745,
12231,
319,
9485,
18,
13,
198,
12,
1550,
11361,
362,
11,
428,
815,
407,
... | 2.897436 | 273 |
import collections
'''
This problem was recently asked by Google:
Given a list of numbers and a target number n, find 3 numbers combinatins in the list that sums closest to the target number n. There may be multiple ways of creating the sum closest to the target number, you can return any combination in any order.
T... | [
11748,
17268,
198,
198,
7061,
6,
198,
1212,
1917,
373,
2904,
1965,
416,
3012,
25,
198,
198,
15056,
257,
1351,
286,
3146,
290,
257,
2496,
1271,
299,
11,
1064,
513,
3146,
1974,
259,
265,
1040,
287,
262,
1351,
326,
21784,
11706,
284,
2... | 2.993377 | 151 |
from .trial import generate_trial_id
import random
import hashlib
import pandas as pd
| [
6738,
764,
45994,
1330,
7716,
62,
45994,
62,
312,
198,
11748,
4738,
198,
11748,
12234,
8019,
198,
11748,
19798,
292,
355,
279,
67,
628
] | 3.625 | 24 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# from flask_security import login_required
from functools import wraps
from .blueprints import register_blueprints
from .slugify import slugify
from app.settings import project_name
try: from instance.settings import project_name
except ImportError: pass
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
422,
42903,
62,
12961,
1330,
17594,
62,
35827,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
198,
6738,
764,
... | 3.477273 | 88 |
import requests
if __name__ == '__main__':
main() | [
11748,
7007,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.7 | 20 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import model_utils.fields
import django.utils.timezone
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
2746,
62,
26791,
13,
25747,
1... | 3.056604 | 53 |
"""Application tests.
"""
import i_xero2
def test_version():
"""Test the version of the app.
"""
assert i_xero2.__version__
| [
37811,
23416,
5254,
13,
198,
37811,
198,
11748,
1312,
62,
87,
3529,
17,
198,
198,
4299,
1332,
62,
9641,
33529,
198,
220,
220,
220,
37227,
14402,
262,
2196,
286,
262,
598,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6818,
1312... | 2.634615 | 52 |
from django.test import TestCase
from esmond.poll import IfDescrCorrelator, JnxFirewallCorrelator, \
JnxCOSCorrelator, SentryCorrelator, \
ALUSAPCorrelator
#def test_jnx_cos_correlator():
# s = MockSession()
# c = JnxCOSCorrelator(s)
# c.setup()
# fo... | [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
1658,
6327,
13,
30393,
1330,
1002,
24564,
81,
10606,
2411,
1352,
11,
449,
77,
87,
13543,
11930,
10606,
2411,
1352,
11,
3467,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 1.941441 | 222 |
from . import common_pb2 as common_messages
from contextlib import redirect_stdout
from .Utility import Utility
import json, io
| [
6738,
764,
1330,
2219,
62,
40842,
17,
355,
2219,
62,
37348,
1095,
198,
6738,
4732,
8019,
1330,
18941,
62,
19282,
448,
198,
6738,
764,
18274,
879,
1330,
34030,
198,
11748,
33918,
11,
33245,
198
] | 3.764706 | 34 |
# Copyright © 2018 Stanislav Hnatiuk. All rights reserved.
"""Module of functions."""
from operator import itemgetter
from itertools import groupby
def stime_to_decimal(s):
"""Lololo."""
return s.hour + s.minute / 60
def group_time(records):
"""Lololo."""
records.sort(key=itemgetter(6, 1))
res... | [
2,
15069,
10673,
2864,
7299,
3044,
615,
367,
77,
7246,
2724,
13,
1439,
2489,
10395,
13,
198,
198,
37811,
26796,
286,
5499,
526,
15931,
198,
198,
6738,
10088,
1330,
2378,
1136,
353,
198,
6738,
340,
861,
10141,
1330,
1448,
1525,
628,
19... | 1.91253 | 846 |
# MINLP written by GAMS Convert at 04/21/18 13:54:56
#
# Equation counts
# Total E G L N X C B
# 140 56 33 51 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | [
2,
220,
20625,
19930,
3194,
416,
402,
40834,
38240,
379,
8702,
14,
2481,
14,
1507,
1511,
25,
4051,
25,
3980,
198,
2,
220,
220,
198,
2,
220,
7889,
341,
9853,
198,
2,
220,
220,
220,
220,
220,
7472,
220,
220,
220,
220,
220,
220,
22... | 1.746788 | 9,028 |
# Django & Python
from django.core.urlresolvers import resolve
from django.http import HttpRequest
from django.http import QueryDict
from django.test import TestCase
from django.test import Client
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.contrib... | [
2,
37770,
1222,
11361,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
10568,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
18453,
198,
6738,
42625,
14208,
13,
4023,
1330,
43301,
35,
713,
198,
6738,
42625,
14208... | 3.12628 | 293 |
"""This file is part of the trivago/rebase library.
# Copyright (c) 2018 trivago N.V.
# License: Apache 2.0
# Source: https://github.com/trivago/rebase
# Version: 1.2.2
# Python Version: 3.6
# Author: Yuv Joodhisty <yuvrajsingh.joodhisty@trivago.com>
"""
from rebase.core import Model, Validator
| [
37811,
1212,
2393,
318,
636,
286,
262,
19876,
3839,
14,
260,
8692,
5888,
13,
198,
198,
2,
15069,
357,
66,
8,
2864,
19876,
3839,
399,
13,
53,
13,
198,
2,
13789,
25,
24843,
362,
13,
15,
198,
2,
8090,
25,
3740,
1378,
12567,
13,
785... | 2.646018 | 113 |
import numpy as np
import cv2
import camera
import images
objCamera = camera.Camera(camera_port = 1, resolution = 1)
img = objCamera.take_photo()
gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
cv2.imshow('Gray', gray)
cv2.waitKey(0)
gray_blur = images.gaussian(gray, 11)
cv2.imshow('Gaussian', gray_blur)
cv2.waitKey(0)... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
4676,
198,
11748,
4263,
628,
198,
26801,
35632,
796,
4676,
13,
35632,
7,
25695,
62,
634,
796,
352,
11,
6323,
796,
352,
8,
198,
9600,
796,
26181,
35632,
13,
20657,
6... | 2.328261 | 460 |
size = int(input())
matrix = []
alice_row, alice_col = 0, 0
for r in range(size):
matrix.append(input().split())
for c in range(size):
if matrix[r][c] == "A":
alice_row, alice_col = r, c
matrix[alice_row][alice_col] = '*'
alice_collected_enough_tea = False
tea = 0
current_r... | [
628,
198,
7857,
796,
493,
7,
15414,
28955,
198,
6759,
8609,
796,
17635,
198,
198,
282,
501,
62,
808,
11,
435,
501,
62,
4033,
796,
657,
11,
657,
198,
1640,
374,
287,
2837,
7,
7857,
2599,
198,
220,
220,
220,
17593,
13,
33295,
7,
1... | 2.31286 | 521 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf8 -*-
import hashlib
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
23,
532,
9,
12,
198,
198,
11748,
12234,
8019,
628
] | 2.097561 | 41 |
import os
from pathlib import Path
from ska.sdc1.utils.image_utils import crop_to_training_area
# Challenge frequency bands
#
FREQS = [560, 1400, 9200]
full_image_dir = os.path.join("data", "images")
sample_image_dir = os.path.join("data", "sample_images")
if __name__ == "__main__":
"""
Helper script to ... | [
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
1341,
64,
13,
82,
17896,
16,
13,
26791,
13,
9060,
62,
26791,
1330,
13833,
62,
1462,
62,
34409,
62,
20337,
198,
198,
2,
13879,
8373,
11760,
198,
2,
198,
37,
2200,
48,
... | 2.212714 | 409 |
from unittest import TestCase
from graph import Graph
from edge import Edge
from vertex import Vertex
import collections as col
| [
6738,
555,
715,
395,
1330,
6208,
20448,
201,
198,
6738,
4823,
1330,
29681,
201,
198,
6738,
5743,
1330,
13113,
201,
198,
6738,
37423,
1330,
4643,
16886,
201,
198,
11748,
17268,
355,
951,
201,
198,
201,
198
] | 3.75 | 36 |
import unittest
from chemcharts.core.plots.base_plot import BasePlot
| [
11748,
555,
715,
395,
198,
198,
6738,
4607,
354,
5889,
13,
7295,
13,
489,
1747,
13,
8692,
62,
29487,
1330,
7308,
43328,
628
] | 3.086957 | 23 |
import re
import xml.etree.ElementTree as ET
from datetime import datetime, timedelta
import requests
from ...models import (POI, Address, Coordinates, Line, LineType, LineTypes, LiveTime, Location, MetaRide, Platform,
Ride, RidePoint, RideSegment, Searchable, Stop, TicketData, TicketList, Trip... | [
11748,
302,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
11748,
7007,
198,
198,
6738,
2644,
27530,
1330,
357,
16402,
40,
11,
17917,
11,
22819,
17540,... | 2.722222 | 144 |
# -*- coding: utf-8 -*-
"""Location schema."""
from marshmallow import Schema, fields, validates
from werkzeug.exceptions import BadRequest
from ceraon.constants import Errors
class LocationSchema(Schema):
"""A schema for a Location model."""
created_at = fields.DateTime(dump_only=True)
name = fields.St... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
14749,
32815,
526,
15931,
198,
6738,
22397,
42725,
1330,
10011,
2611,
11,
7032,
11,
4938,
689,
198,
6738,
266,
9587,
2736,
1018,
13,
1069,
11755,
1330,
7772,
18453,... | 2.7 | 310 |
__version__ = '0.4.4'
| [
198,
198,
834,
9641,
834,
796,
705,
15,
13,
19,
13,
19,
6,
198
] | 1.714286 | 14 |
import logging
from util import config
from abc import ABC, abstractmethod
from temporal.workflow import workflow_method
logging.basicConfig(level=logging.DEBUG)
import functools
| [
11748,
18931,
198,
6738,
7736,
1330,
4566,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
6738,
21964,
13,
1818,
11125,
1330,
30798,
62,
24396,
628,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
8,
628... | 3.355932 | 59 |
#!/usr/bin/env python
# encoding: utf-8
from itertools import groupby
from operator import itemgetter
def get_real_bases(bases):
"""
Get real bases for types argument.
>>> get_real_bases(None) #=> (object,)
>>> get_real_bases(TypeA) #=> (TypeA,)
>>> get_real_bases([TypeA, TypeB]) #=> (TypeA, Type... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
6738,
340,
861,
10141,
1330,
1448,
1525,
198,
6738,
10088,
1330,
2378,
1136,
353,
628,
198,
4299,
651,
62,
5305,
62,
65,
1386,
7,
65,
1386... | 2.713105 | 847 |
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 25 21:00:31 2022
@author: LiCheng_Xu
"""
import numpy as np
from .TargetTransformation import ddG2ee
import matplotlib.pyplot as plt
from scipy.interpolate import make_interp_spline
from sklearn.model_selection import KFold
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
19480,
1526,
1679,
2310,
25,
405,
25,
3132,
33160,
201,
198,
201,
198,
31,
9800,
25,
7455,
7376,
782,
62,
55,
84,
201,
198,
37811,
... | 2.513043 | 115 |
import pandas as pd
# Accepts input for 'Salary Offer' and 'Tax Rate %' to provide
# Annual, Monthly, and Weekly take home pay after taxes and
# Lambda ISA deductions
if __name__ == '__main__':
salary = int(input("Salary Offer $:"))
taxrate = int(input('Tax Rate as Whole Number ___%:'))
take_h... | [
11748,
19798,
292,
355,
279,
67,
628,
220,
220,
220,
1303,
21699,
82,
5128,
329,
705,
19221,
560,
33085,
6,
290,
705,
27017,
14806,
4064,
6,
284,
2148,
198,
220,
220,
220,
1303,
16328,
11,
27573,
11,
290,
18168,
1011,
1363,
1414,
70... | 2.658768 | 211 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
USAGE: %(program)s -train CORPUS -output VECTORS -size SIZE -window WINDOW
-cbow CBOW -sample SAMPLE -hs HS -negative NEGATIVE -threads THREADS -iter ITER
-min_count MIN-COUNT -alpha ALPHA -b... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
49962,
739,
262,
22961,
17370,
6489,
410,
17,
13,
16,
532,
2638,
1378,
2503,
13,
41791,
13,
2398,
14,
67... | 2.493116 | 2,397 |
import messages
"""
This validator is basic validator that returns (True, None)
when a user is authenticated and the number of command tokens is 1.
Returns (False, <message>) otherwise.
"""
| [
11748,
6218,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
37811,
201,
198,
220,
220,
220,
770,
4938,
1352,
318,
4096,
4938,
1352,
326,
5860,
357,
17821,
11,
6045,
8,
220,
201,
198,
220,
220,
220,
618,
257,
2836,
318,
44529,
2... | 2.640449 | 89 |
import re
regex_pattern = r'M{0,3}(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[VX]|V?I{0,3})$'
print(str(bool(re.match(regex_pattern, input())))) | [
11748,
302,
198,
198,
260,
25636,
62,
33279,
796,
374,
6,
44,
90,
15,
11,
18,
92,
7,
34,
58,
12740,
60,
91,
35,
30,
34,
90,
15,
11,
18,
92,
5769,
55,
58,
5097,
60,
91,
43,
30,
55,
90,
15,
11,
18,
92,
5769,
40,
58,
53,
... | 1.670732 | 82 |
# --- Day 12: Passage Pathing ---
import copy
print("TEST")
resolve_puzzle("test_data.txt")
print("PUZZLE")
resolve_puzzle("data.txt") ## takes a while (<1min) --> not very efficient | [
2,
11420,
3596,
1105,
25,
46169,
3208,
722,
11420,
198,
11748,
4866,
628,
628,
628,
198,
198,
4798,
7203,
51,
6465,
4943,
198,
411,
6442,
62,
79,
9625,
7203,
9288,
62,
7890,
13,
14116,
4943,
198,
4798,
7203,
5105,
30148,
2538,
4943,
... | 2.878788 | 66 |
epsilon_d_ = {
"epsilon": ["float", "0.03", "0.01 ... 0.3"],
}
distribution_d_ = {
"distribution": ["string", "normal", "normal, laplace, logistic, gumbel"],
}
n_neighbours_d_ = {
"n_neighbours": ["int", "3", "1 ... 10"],
}
p_accept_d_ = {
"p_accept": ["float", "0.1", "0.01 ... 0.3"],
}
repulsion_factor... | [
538,
18217,
261,
62,
67,
62,
796,
1391,
198,
220,
220,
220,
366,
538,
18217,
261,
1298,
14631,
22468,
1600,
366,
15,
13,
3070,
1600,
366,
15,
13,
486,
2644,
657,
13,
18,
33116,
198,
92,
198,
17080,
3890,
62,
67,
62,
796,
1391,
1... | 2.034857 | 1,291 |
'''Asynchronous procedure.
An asynchronous procedure, a.k.a. an aproc, is a procedure that is asynchronous and has been
wrapped into an :class:`asyncio.Future`. A procedure is a function that returns None.
'''
import asyncio
__all__ = ['AprocManager']
class AprocManager:
'''Manages the completion of aprocs.
... | [
7061,
6,
1722,
31301,
8771,
13,
198,
198,
2025,
39354,
8771,
11,
257,
13,
74,
13,
64,
13,
281,
257,
36942,
11,
318,
257,
8771,
326,
318,
39354,
290,
468,
587,
198,
29988,
1496,
656,
281,
1058,
4871,
25,
63,
292,
13361,
952,
13,
... | 2.829392 | 592 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import math
import gtk, gobject
import gnomecanvas
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
11748,
10688,
198,
11748,
308,
30488,
11,
48484,
752,
198,
11748,
19967,
462,
5171,
11017,
198,
198,
361,
11593,
3672,
834,
... | 2.428571 | 56 |
from api import api_call
from config import SETTINGS
from helpers import create_embed, LetterboxdError
| [
6738,
40391,
1330,
40391,
62,
13345,
198,
6738,
4566,
1330,
25823,
51,
20754,
198,
6738,
49385,
1330,
2251,
62,
20521,
11,
18121,
3524,
67,
12331,
628,
628,
628,
198
] | 3.758621 | 29 |
# Generated by Django 2.0.13 on 2019-07-30 20:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from postgres_schema.operations import RunInPublic
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
1485,
319,
13130,
12,
2998,
12,
1270,
1160,
25,
940,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
1... | 3.166667 | 66 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
198,
2,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
257,
4866,
286,
198,
2,
262,
13789,
379,
198,
2,... | 3.836957 | 276 |
from fabric.api import *
from fabric.contrib.files import *
from path import path as ppath
app = env.app = {
'live_catalogue-repo': 'https://svn.eionet.europa.eu/repositories/Python/flis.live_catalogue',
'localrepo': ppath(__file__).abspath().parent.parent,
}
try: from localcfg import *
except: pass
app.upda... | [
6738,
9664,
13,
15042,
1330,
1635,
198,
6738,
9664,
13,
3642,
822,
13,
16624,
1330,
1635,
198,
6738,
3108,
1330,
3108,
355,
279,
6978,
198,
198,
1324,
796,
17365,
13,
1324,
796,
1391,
198,
220,
220,
220,
705,
12583,
62,
9246,
30326,
... | 2.407258 | 248 |
import pytest
from eppy.doc import EppResponse
from lxml import etree
from registrobrepp.ipnetwork.brtransferipnetworkcommand import BrEppTransferIpNetworkCommand
| [
11748,
12972,
9288,
198,
6738,
304,
14097,
13,
15390,
1330,
412,
381,
31077,
198,
6738,
300,
19875,
1330,
2123,
631,
198,
198,
6738,
4214,
305,
4679,
381,
13,
541,
27349,
13,
1671,
39437,
541,
27349,
21812,
1330,
1709,
36,
381,
43260,
... | 3.586957 | 46 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Mariusz Sielicki <mariusz.sielicki@gmail.com>
import logging
import requests
log = logging.getLogger("nozbe")
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6434,
25,
1526,
3754,
89,
311,
8207,
624,
72,
1279,
76,
19897,
89,
13,
82,
8207,
624,
72,
31,
14816,
13,
785,
... | 2.470588 | 68 |
"""
Utility to measure performance of obstacle detector.
Parameter Defaults
------------------
Resolution = (1280, 720)
Noise SD = 0
N Objects = 0
Type = circle
Radius = 100
"""
import os, sys
parent_dir = os.path.dirname(os.path.abspath(__file__))
gparent_dir = os.path.dirname(parent_dir)
ggparent_dir = os.path.dirna... | [
37811,
198,
18274,
879,
284,
3953,
2854,
286,
22007,
31029,
13,
198,
198,
36301,
2896,
13185,
198,
1783,
438,
198,
4965,
2122,
796,
357,
1065,
1795,
11,
26250,
8,
198,
2949,
786,
9834,
796,
657,
198,
45,
35832,
796,
657,
198,
6030,
... | 2.345336 | 1,222 |
from datetime import timedelta
from django.core.paginator import Paginator
from django.http import Http404
from django.utils.translation import ugettext as _
from molly.utils import haversine
from molly.utils.views import BaseView, ZoomableView
from molly.utils.breadcrumbs import *
from molly.maps import Map
from mo... | [
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
31525,
20900,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
26429,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
... | 2.950464 | 323 |
# -*- coding:utf-8 -*-
import os
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from sqldb import *
from add_customer import *
from customer_order import *
main()
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
25064,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
14055,
1330,
1635,
198,
198,
67... | 2.56338 | 71 |
#
# Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | [
2,
198,
2,
15069,
357,
66,
8,
1853,
12,
1238,
2481,
536,
959,
563,
4432,
330,
1279,
83,
2704,
273,
330,
5161,
14856,
400,
283,
13,
3262,
29,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
... | 2.764266 | 4,013 |
#!/usr/bin/env python
import random
import time
tests = 1000000
boxes = [[ 'G', 'G' ],
[ 'G', 'S' ],
[ 'S', 'S' ]]
draws = [[[ 0, 0 ], [ 0, 0 ], [ 0, 0 ]],
[[ 0, 0 ], [ 0, 0 ], [ 0, 0 ]]]
total_gold_1 = 0
total_gold_2 = 0
print('Running %d tests.'%(tests))
random.seed(int(time.time()))
for... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
4738,
198,
11748,
640,
198,
198,
41989,
796,
1802,
2388,
198,
29305,
796,
16410,
705,
38,
3256,
705,
38,
6,
16589,
198,
220,
220,
220,
220,
220,
220,
220,
220,
685,
705,
... | 1.974763 | 634 |
#!/usr/bin/env python3
"""
A script to get the intersections of Differential expression results, Fst, and differential SNPs analysis.
Draws Venn diagrams and adds columns to RNA-seq-diff.xlsx, whether the gene has high Fst/PBS/diffsnps.
"""
import sys
sys.stderr = open(snakemake.log[0], "w")
import matplotlib
matplo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
32,
4226,
284,
651,
262,
42085,
286,
20615,
498,
5408,
2482,
11,
376,
301,
11,
290,
22577,
11346,
12016,
3781,
13,
198,
25302,
82,
569,
1697,
37067,
290,
6673,
1... | 2.498054 | 1,028 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None | [
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2124,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2100,
796,
2124,
1... | 2.175676 | 74 |