content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
""" [ raycast select module ] """
from bpy.types import Operator
import bpy
from bpy import ops as O
from .DoRaycast import do_raycast
from . import CallbackOptions
class PerformRaycastSelect(Operator):
"""Run a side differentiation and select the points by raycast"""
bl_idname = "view3d.raycast_select_pair"... | [
37811,
685,
26842,
2701,
2922,
8265,
2361,
37227,
198,
6738,
275,
9078,
13,
19199,
1330,
35946,
198,
11748,
275,
9078,
198,
6738,
275,
9078,
1330,
39628,
355,
440,
198,
198,
6738,
764,
5211,
19591,
2701,
1330,
466,
62,
2433,
2701,
198,
... | 2.995349 | 215 |
"""Free Google Translate API for Python. Translates totally free of charge."""
__all__ = 'Translator',
__version__ = '3.2.1'
from aiogoogletrans.client import Translator
from aiogoogletrans.constants import LANGCODES, LANGUAGES
| [
37811,
11146,
3012,
3602,
17660,
7824,
329,
11361,
13,
3602,
75,
689,
6635,
1479,
286,
3877,
526,
15931,
198,
834,
439,
834,
796,
705,
8291,
41880,
3256,
198,
834,
9641,
834,
796,
705,
18,
13,
17,
13,
16,
6,
628,
198,
6738,
257,
7... | 3.026316 | 76 |
import uuid
import pytest
from selenium.common.exceptions import TimeoutException
from skyportal.tests import api
@pytest.mark.flaky(reruns=2)
@pytest.mark.flaky(reruns=2)
@pytest.mark.flaky(reruns=2)
@pytest.mark.flaky(reruns=2)
@pytest.mark.flaky(reruns=2)
@pytest.mark.flaky(reruns=2)
| [
11748,
334,
27112,
198,
11748,
12972,
9288,
198,
6738,
384,
11925,
1505,
13,
11321,
13,
1069,
11755,
1330,
3862,
448,
16922,
198,
198,
6738,
6766,
634,
282,
13,
41989,
1330,
40391,
628,
198,
198,
31,
9078,
9288,
13,
4102,
13,
2704,
15... | 2.341085 | 129 |
from pypy.rpython.ootypesystem.ootype import ROOT, Instance, \
addMethods, meth, Meth, Void
from pypy.translator.backendopt.checkvirtual import check_virtual_methods
| [
6738,
279,
4464,
88,
13,
81,
29412,
13,
1025,
9497,
6781,
13,
1025,
2981,
1330,
15107,
2394,
11,
2262,
590,
11,
3467,
198,
220,
220,
220,
220,
751,
46202,
11,
11248,
11,
39675,
11,
18331,
198,
6738,
279,
4464,
88,
13,
7645,
41880,
... | 2.965517 | 58 |
from .URL_PARSER import get_text
| [
6738,
764,
21886,
62,
27082,
35009,
1330,
651,
62,
5239,
198
] | 3 | 11 |
import argparse, logging, filepattern
from pathlib import Path
# Initialize the logger
logging.basicConfig(
format="%(asctime)s - %(name)-8s - %(levelname)-8s - %(message)s",
datefmt="%d-%b-%y %H:%M:%S",
)
logger = logging.getLogger("main")
logger.setLevel(logging.INFO)
if __name__ == "__main__":
# Se... | [
11748,
1822,
29572,
11,
18931,
11,
2393,
33279,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
2,
20768,
1096,
262,
49706,
198,
6404,
2667,
13,
35487,
16934,
7,
198,
220,
220,
220,
5794,
2625,
4,
7,
292,
310,
524,
8,
82,
532,
4064,
... | 2.469201 | 763 |
#
# @lc app=leetcode id=1 lang=python3
#
# [1] Two Sum
#
# @lc code=start
# @lc code=end
| [
2,
198,
2,
2488,
44601,
598,
28,
293,
316,
8189,
4686,
28,
16,
42392,
28,
29412,
18,
198,
2,
198,
2,
685,
16,
60,
4930,
5060,
198,
2,
198,
198,
2,
2488,
44601,
2438,
28,
9688,
198,
2,
2488,
44601,
2438,
28,
437,
628
] | 2.068182 | 44 |
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from config import config
from config import Config as CF
from utils import log
bootstrap = Bootstrap()
db = SQLAlchemy()
| [
6738,
42903,
1330,
46947,
198,
6738,
42903,
62,
18769,
26418,
1330,
18892,
26418,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
4566,
1330,
4566,
198,
6738,
4566,
1330,
17056,
355,
18551,
198,
6738,
3384,
4... | 3.896552 | 58 |
# -*- coding: utf-8 -*-
# @Author: aaronpmishkin
# @Date: 2017-07-28 21:07:21
# @Last Modified by: aaronpmishkin
# @Last Modified time: 2017-08-09 13:09:35
import numpy as np
from scipy.spatial.distance import cdist
class RBF():
""" RBF
Implementation of the radial basis function kernel. Also called the ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
13838,
25,
257,
8045,
4426,
680,
5116,
198,
2,
2488,
10430,
25,
220,
220,
2177,
12,
2998,
12,
2078,
2310,
25,
2998,
25,
2481,
198,
2,
2488,
5956,
40499,
416... | 2.162785 | 4,466 |
from flask import Blueprint, jsonify, request
from playhouse.shortcuts import model_to_dict
from flask_login import current_user, login_required
import models
waitlists = Blueprint('waitlists', 'waitlists')
print()
# Index route
@waitlist.route('/', methods=["GET"])
# Create route
@waitlist.route('/', methods=["POS... | [
6738,
42903,
1330,
39932,
11,
33918,
1958,
11,
2581,
198,
6738,
711,
4803,
13,
19509,
23779,
1330,
2746,
62,
1462,
62,
11600,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
11,
17594,
62,
35827,
198,
198,
11748,
4981,
198,
198,
17... | 2.99422 | 173 |
import itertools
print(pairs_difference(2,[1, 5, 3, 4, 2]))
| [
11748,
340,
861,
10141,
201,
198,
201,
198,
201,
198,
201,
198,
4798,
7,
79,
3468,
62,
26069,
1945,
7,
17,
17414,
16,
11,
642,
11,
513,
11,
604,
11,
362,
60,
4008,
201,
198
] | 1.942857 | 35 |
from PyQt5.QtWidgets import QLabel
from PyQt5.QtCore import Qt, pyqtSignal, QTimer
from PyQt5.QtGui import QPainter, QColor, QPen | [
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
33986,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
33734,
11,
12972,
39568,
11712,
282,
11,
1195,
48801,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
8205,
72... | 2.345455 | 55 |
keyboard.send_keys("<alt>+<page_up>") | [
2539,
3526,
13,
21280,
62,
13083,
7203,
27,
2501,
29,
10,
27,
7700,
62,
929,
29,
4943
] | 2.176471 | 17 |
import json
import logging
import logging.config
import os
import sqlite3
import yaml
import paho.mqtt.client as paho
DATABASE = os.environ.get("DB_NAME")
if __name__ == "__main__":
db = get_db()
with db:
try:
db.execute("CREATE TABLE devices_table (device_id TEXT NOT NULL, lig... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
198,
11748,
331,
43695,
198,
11748,
279,
17108,
13,
76,
80,
926,
13,
16366,
355,
279,
17108,
628,
198,
35,
1404,
6242,
... | 2.221277 | 235 |
def reverse(s):
''' (str) -> str
Return a reversed version of s.
>>> reverse('hello')
'olleh'
>>> reverse('a')
'a'
'''
new = ''
for i in range(len(s)):
new += s[len(s) - 1 - i]
return new
def is_palindrome(s):
''' (str) -> bool
Return True iff... | [
4299,
9575,
7,
82,
2599,
198,
220,
220,
220,
705,
7061,
357,
2536,
8,
4613,
965,
198,
220,
220,
220,
220,
198,
220,
220,
220,
8229,
257,
17687,
2196,
286,
264,
13,
198,
220,
220,
220,
220,
198,
220,
220,
220,
13163,
9575,
10786,
... | 2.019964 | 551 |
# --------------------------------------------------------------------------
# Source file provided under Apache License, Version 2.0, January 2004,
# http://www.apache.org/licenses/
# (c) Copyright IBM Corp. 2015, 2016
# --------------------------------------------------------------------------
# gendoc: ignore
imp... | [
2,
16529,
35937,
198,
2,
8090,
2393,
2810,
739,
24843,
13789,
11,
10628,
362,
13,
15,
11,
3269,
5472,
11,
198,
2,
2638,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
198,
2,
357,
66,
8,
15069,
19764,
11421,
13,
1853,
11,
1... | 2.864312 | 538 |
"""
This module shows you how to perform various kinds of density calculations.
"""
# Does some sys.path manipulation so we can run examples in-place.
# noinspection PyUnresolvedReferences
import example_config
from colormath.color_objects import SpectralColor
from colormath.density_standards import ANSI_STA... | [
37811,
201,
198,
1212,
8265,
2523,
345,
703,
284,
1620,
2972,
6982,
286,
12109,
16765,
13,
201,
198,
37811,
201,
198,
201,
198,
2,
8314,
617,
25064,
13,
6978,
17512,
523,
356,
460,
1057,
6096,
287,
12,
5372,
13,
201,
198,
2,
645,
... | 2.16913 | 609 |
'''
Copyright (C) 2021 CG Cookie
https://github.com/CGCookie/retopoflow
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later v... | [
7061,
6,
198,
15269,
357,
34,
8,
33448,
29925,
39606,
198,
5450,
1378,
12567,
13,
785,
14,
34,
15916,
18055,
14,
1186,
404,
1659,
9319,
198,
220,
220,
220,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
... | 3.581197 | 234 |
#
## PyMoira client library
##
## This file contains the Moira-related errors.
#
from . import constants
class BaseError(Exception):
"""Any exception thrown by the library is inhereted from this"""
pass
class ConnectionError(BaseError):
"""An error which prevents the client from having or continuing a m... | [
2,
198,
2235,
9485,
16632,
8704,
5456,
5888,
198,
2235,
198,
2235,
770,
2393,
4909,
262,
4270,
8704,
12,
5363,
8563,
13,
198,
2,
198,
198,
6738,
764,
1330,
38491,
198,
198,
4871,
7308,
12331,
7,
16922,
2599,
198,
220,
220,
220,
3722... | 3.355212 | 259 |
#!/usr/bin/python
import pytest
import pandas as pd
import numpy as np
from yahoo_fantasy_bot import roster
RBLDR_COLS = ["player_id", "name", "eligible_positions", "selected_position"]
RSEL_COLS = ["player_id", "name", "HR", "OBP", "W", "ERA"]
@pytest.fixture
@pytest.fixture
@pytest.fixture
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
12972,
9288,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
331,
12992,
62,
69,
34921,
62,
13645,
1330,
9354,
198,
198,
49,
9148,
7707,
62,
... | 2.57265 | 117 |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
"""
使用邻接表表示图
A --> B
A --> C
B --> C
B --> D
C --> D
D --> C
E --> F
F --> C
"""
def find_one_path(graph, start, end, path=[]):
"""
寻找graph中由start到end顶点的其中一条路径
graph: dict
start: str
end: str
return: list
"""
path = p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
1772,
25,
1263,
6513,
692,
16115,
628,
198,
37811,
198,
45635,
18796,
101,
165,
224,
119,
162,
236,
98,
26193,
10... | 1.723005 | 1,278 |
###________________________ 2nd-Order-Free-Response ________________________###
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams.update({'font.size': 22})
##__________ Functions for dumping characteristic cases __________##
##__________ 2nd order free response __________##
f... | [
21017,
32941,
362,
358,
12,
18743,
12,
11146,
12,
31077,
220,
32941,
21017,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
198,
198,
6759,
29487,
801... | 2.296748 | 246 |
from typing import List, Dict
import numpy as np
from em.platform.rendering.dto.time_interval import TimeInterval
from em.platform.rendering.schema.events.event import Event
from em.platform.rendering.schema.processing_strategy import ProcessingStrategy
| [
6738,
19720,
1330,
7343,
11,
360,
713,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
795,
13,
24254,
13,
13287,
278,
13,
67,
1462,
13,
2435,
62,
3849,
2100,
1330,
3862,
9492,
2100,
198,
6738,
795,
13,
24254,
13,
13287,
27... | 3.520548 | 73 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from doubanfm.views.lrc_view import Lrc
from doubanfm.dal.dal_help import HelpDal
class Help(Lrc):
"""帮助界面"""
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
3385,
272,
38353,
13,
33571,
13,
75,
6015,
62,
1177,
1330,
406,
6015,
198,
6738,
3385,
272,
38353,
13,
3174... | 2.116883 | 77 |
maps = {
'batting': {
'a': 'assists',
'ab': 'atbats',
'ao': 'air_outs',
'avg': 'batting_avg',
'bb': 'base_on_balls',
'cs': 'caught_stealing',
'e': 'error',
'gidp': 'ground_into_dp',
'go': 'ground_out',
'h': 'hit',
'hbp': 'hit_by... | [
31803,
796,
1391,
198,
220,
220,
220,
705,
8664,
889,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
64,
10354,
705,
562,
1023,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
397,
10354,
705,
265,
50199,
3256,
198,
... | 1.640167 | 239 |
import networkx as nx
import numpy as np
import scipy.sparse as sp
from grapht.graphtools import *
G = nx.barabasi_albert_graph(100, 2)
G.add_edge(0, 1) # the initial condition of BA(n, 2) means it can have pendant edges, this stops that happening
G_with_pendant = G.copy()
G_with_pendant.add_node(100)
G_with_pendant.a... | [
11748,
3127,
87,
355,
299,
87,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
82,
29572,
355,
599,
198,
6738,
4823,
83,
13,
34960,
31391,
1330,
1635,
198,
198,
38,
796,
299,
87,
13,
5657,
397,
17053,
62,
282,
48... | 2.538961 | 154 |
"""Recurrent layers and their base classes."""
from tensorflow.keras.layers import RNN
from tensorflow.keras.layers import StackedRNNCells
from tensorflow.keras.layers import SimpleRNN
from tensorflow.keras.layers import GRU
from tensorflow.keras.layers import LSTM
from tensorflow.keras.layers import SimpleRNNCell
f... | [
37811,
6690,
6657,
11685,
290,
511,
2779,
6097,
526,
15931,
198,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
371,
6144,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
520,
6021,
49,
6144,
34,
1... | 2.978102 | 137 |
# Python - 2.7.6 | [
2,
11361,
532,
362,
13,
22,
13,
21
] | 2 | 8 |
import sys
import pybel
filename = ""
verbose = False
if (len(sys.argv)) == 2:
filename = sys.argv[1]
else:
print "usage :", sys.argv[0] , " filename.xyz"
exit(1)
matrix = pybel.ob.matrix3x3()
matrix.RotAboutAxisByAngle(pybel.ob.vector3(1, 0, 0), 90)
if verbose:
for i in range(3):
for j in range(3):
... | [
11748,
25064,
198,
11748,
12972,
6667,
198,
198,
34345,
796,
13538,
198,
19011,
577,
796,
10352,
198,
198,
361,
357,
11925,
7,
17597,
13,
853,
85,
4008,
6624,
362,
25,
220,
198,
220,
29472,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
... | 2.06846 | 409 |
# -*- coding: utf-8 -*-
from os import setuid, chown
from pwd import getpwnam
from typing import Union
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
28686,
1330,
900,
27112,
11,
442,
593,
198,
6738,
279,
16993,
1330,
651,
79,
675,
321,
198,
6738,
19720,
1330,
4479,
628,
628
] | 2.74359 | 39 |
#!/usr/bin/env python
""" Tests gristle_determinator.py
Contains a primary class: FileStructureFixtureManager
Which is extended by six classes that override various methods or variables.
This is a failed experiment - since the output isn't as informative as it
should be. This should be redesigned.
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
30307,
1036,
12535,
62,
67,
13221,
1352,
13,
9078,
628,
220,
220,
220,
49850,
257,
4165,
1398,
25,
9220,
1273,
5620,
37,
9602,
13511,
198,
220,
220,
220,
9022,
318,
7083,
416,
... | 2.670748 | 735 |
from manimlib.imports import *
import numpy as np
#ahora vamos a explicar el caso de esferas duras, qeu por encima de 50% de ocupacion muestan cristalización
#despues vamos a introducir el tema de espacio disponible
#puedes decir, bueno pero esque si hay muchas esferas o su radio es muy grande, pues no les ... | [
6738,
582,
320,
8019,
13,
320,
3742,
1330,
1635,
198,
11748,
299,
32152,
355,
45941,
220,
198,
220,
220,
220,
1303,
993,
5799,
410,
321,
418,
257,
1193,
291,
283,
1288,
6124,
78,
390,
1658,
2232,
292,
288,
17786,
11,
10662,
12496,
1... | 2.701705 | 352 |
# Copyright 2020 Johns Hopkins University (Shinji Watanabe)
# Northwestern Polytechnical University (Pengcheng Guo)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
# Adapted by Florian Lux 2021
import torch
class Swish(torch.nn.Module):
"""
Construct an Swish activation function fo... | [
2,
15069,
12131,
25824,
21183,
2059,
357,
44592,
7285,
12242,
272,
11231,
8,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
30197,
12280,
47944,
2059,
357,
47,
1516,
2395,
782,
1962,
78,
8,
198,
... | 2.568306 | 183 |
import os, sys
lib_path = os.path.abspath(os.path.join('..', 'utils'))
sys.path.append(lib_path)
import ftplib as FTP
import credentials as cred
import RPIO
import RPi.GPIO as GPIO
from pump import Pump
# use BCM mode to play well with RPIO
GPIO.setmode(GPIO.BCM)
# start dispatch loop in background
RPIO.wait_for_in... | [
171,
119,
123,
11748,
28686,
11,
25064,
198,
8019,
62,
6978,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
22179,
10786,
492,
3256,
705,
26791,
6,
4008,
198,
17597,
13,
6978,
13,
33295,
7,
8019,
62,
6978,
8,
198,... | 2.644928 | 138 |
"""Multiple calls in one logical line."""
import cyberbrain
cyberbrain.init()
x = {f(x=1), f(y=2)}
cyberbrain.register(x)
| [
37811,
31217,
3848,
287,
530,
12219,
1627,
526,
15931,
198,
198,
11748,
10075,
27825,
198,
198,
948,
527,
27825,
13,
15003,
3419,
628,
198,
198,
87,
796,
1391,
69,
7,
87,
28,
16,
828,
277,
7,
88,
28,
17,
38165,
628,
198,
948,
527,... | 2.529412 | 51 |
import math
class Shape:
"""Container to store 3D Image/array/feature/tensor sizes.
This is a convenience class because size specifications are often required
yet their format is ambigous. Sometimes, images are specified as CHW
(Tensorflow), sometimes as HWC (NumPy, Matplotlib). Sometimes, only the
... | [
11748,
10688,
198,
198,
4871,
25959,
25,
198,
220,
220,
220,
37227,
29869,
284,
3650,
513,
35,
7412,
14,
18747,
14,
30053,
14,
83,
22854,
10620,
13,
628,
220,
220,
220,
770,
318,
257,
15607,
1398,
780,
2546,
20640,
389,
1690,
2672,
... | 2.958955 | 268 |
import os
import sys
folder = sys.argv[1]
script = sys.argv[2]
for root, dirs, files in os.walk(folder):
for filename in files:
data_file = "{}/{}".format(root,filename)
os.system("python3 {} {}".format(script,data_file))
| [
11748,
28686,
198,
11748,
25064,
198,
198,
43551,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
12048,
796,
25064,
13,
853,
85,
58,
17,
60,
198,
198,
1640,
6808,
11,
288,
17062,
11,
3696,
287,
28686,
13,
11152,
7,
43551,
2599,
198,
22... | 2.415842 | 101 |
import numpy as np
import tensorflow as tf
import itertools
import os # used for directory operations
import io
from PIL import Image # used to read images from directory
import random
tf.enable_eager_execution()
# Global constants
# Information from input tfrecord files
SOURCE_ID = 'image/source_id'
BBOX_CONFIDENC... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
340,
861,
10141,
198,
11748,
28686,
220,
1303,
973,
329,
8619,
4560,
198,
11748,
33245,
198,
6738,
350,
4146,
1330,
7412,
220,
1303,
973,
284,
1100,
4... | 3.513347 | 487 |
import os
import unittest
import tempfile
import hiro
import jiracli.cache
| [
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
20218,
7753,
198,
11748,
289,
7058,
198,
11748,
474,
343,
330,
4528,
13,
23870,
628
] | 3.166667 | 24 |
# -*- coding: utf-8 -*-
import sys
sys.path.insert(0, os.path.join(os.path.dirname(
os.path.realpath(__file__)), "../"))
from Functions import processing_utils as pu
def on_log(client, userdata, level, buf):
"""
Log callback
"""
print("log: ", buf)
pass
def on_disconnect(client, userdata,... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
198,
220,
220,
220,
28686,
13,
6978,
13,
... | 2.447154 | 738 |
from insomniac import activation_controller
exec(activation_controller.get_extra_feature("action_warmup"))
| [
6738,
1035,
296,
8461,
330,
1330,
14916,
62,
36500,
198,
198,
18558,
7,
48545,
62,
36500,
13,
1136,
62,
26086,
62,
30053,
7203,
2673,
62,
31975,
929,
48774,
198
] | 3.724138 | 29 |
# -*- coding:UTF-8 -*-
import logging
from datetime import datetime
from typing import List, Callable
from minimir import Struct
from minimir.BattleAction import BattleAction
from minimir.Utils import Utils
| [
2,
532,
9,
12,
19617,
25,
48504,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
19720,
1330,
7343,
11,
4889,
540,
198,
198,
6738,
10356,
343,
1330,
32112,
198,
6738,
10356,
343,
13,
24064,... | 3.603448 | 58 |
# -*- coding: utf-8 -*-
import concurrent.futures
import logging
import os
import sys
from Crypto.Cipher import AES
from m3u8_To_MP4 import v2_abstract_task_processor
from m3u8_To_MP4.helpers import path_helper
from m3u8_To_MP4.helpers import printer_helper
from m3u8_To_MP4.networks.synchronous.sync_http_r... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
11748,
24580,
13,
69,
315,
942,
201,
198,
11748,
18931,
201,
198,
11748,
28686,
201,
198,
11748,
25064,
201,
198,
201,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,... | 2.431507 | 146 |
from django.db import models
from django.db.models import fields
from rest_framework import serializers
from .models import Todo | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
7032,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
764,
27530,
1330,
309,
24313
] | 4 | 32 |
from rest_framework import serializers
from legislature.models import District, State
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
15928,
13,
27530,
1330,
5665,
11,
1812,
628,
198
] | 4.684211 | 19 |
from flask_wtf import FlaskForm
from wtforms import PasswordField, RadioField, StringField
from wtforms.fields.html5 import EmailField
import wtforms.validators as validate
| [
6738,
42903,
62,
86,
27110,
1330,
46947,
8479,
198,
6738,
266,
83,
23914,
1330,
30275,
15878,
11,
8829,
15878,
11,
10903,
15878,
198,
6738,
266,
83,
23914,
13,
25747,
13,
6494,
20,
1330,
9570,
15878,
198,
11748,
266,
83,
23914,
13,
12... | 3.782609 | 46 |
#!/usr/bin/env python
import tensorflow as tf
import numpy as np
import scipy.signal
from scipy import misc
import scipy.io
from PIL import Image
import json
import os
from offline_feature import *
from bbox_tool import *
import glob
from reward_function import *
from semantic_environment import *
from shortest_path im... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
12683,
282,
198,
6738,
629,
541,
88,
1330,
12747,
198,
11748,
629,
541,
88,
13,
... | 2.894444 | 180 |
#!/usr/bin/env python
from pymap3d.vincenty import vdist
from argparse import ArgumentParser
if __name__ == '__main__': # pragma: no cover
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
279,
4948,
499,
18,
67,
13,
7114,
1087,
88,
1330,
410,
17080,
198,
6738,
1822,
29572,
1330,
45751,
46677,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,... | 2.75 | 56 |
from django.urls import path
from mytravelblog.accounts.views import *
urlpatterns = (
path('login/', UserLoginView.as_view(), name='login user'),
path('logout/', UserLogoutConfirmationView.as_view(), name='logout user confirmation'),
path('logout/signout/', UserLogoutView.as_view(), name='logout user'),
... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
616,
35927,
14036,
13,
23317,
82,
13,
33571,
1330,
1635,
198,
198,
6371,
33279,
82,
796,
357,
198,
220,
220,
220,
3108,
10786,
38235,
14,
3256,
11787,
47790,
7680,
13,
292,... | 2.972973 | 259 |
# import util
import sys
import os
pioPath = ".platformio/penv/lib/python3.9/site-packages
fullPath = os.path.join(os.path.expanduser('~'), pioPath)
print(fullPath)
sys.path.append(os.path.join(os.path.expanduser('~'), pioPath))
import util
util.get_serial_ports()
| [
2,
1330,
7736,
198,
11748,
25064,
198,
11748,
28686,
198,
79,
952,
15235,
796,
27071,
24254,
952,
14,
3617,
85,
14,
8019,
14,
29412,
18,
13,
24,
14,
15654,
12,
43789,
198,
12853,
15235,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
... | 2.623762 | 101 |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from pylib.base import environment
from pylib.device import adb_wrapper
from pylib.device import device_errors
from pylib.device import device_utils
from pyl... | [
2,
15069,
1946,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
6738,... | 3.65625 | 96 |
BASE_URL = 'https://fantasy.premierleague.com/drf/'
FPL_DATA = BASE_URL + 'bootstrap-static'
# (player id)
PLAYER_DATA = BASE_URL + 'element-summary/{}'
# (gameweek)
DREAM_TEAM_DATA = BASE_URL + 'dream-team/{}'
# (team id)
USER_DATA = BASE_URL + 'entry/{}'
# (gameweek)
USER_GAMEWEEK_TEAM_DATA = USER_DATA + '/event/{}... | [
33,
11159,
62,
21886,
796,
705,
5450,
1378,
69,
34921,
13,
31605,
959,
19316,
13,
785,
14,
7109,
69,
14,
6,
198,
198,
5837,
43,
62,
26947,
796,
49688,
62,
21886,
1343,
705,
18769,
26418,
12,
12708,
6,
198,
198,
2,
357,
7829,
4686,... | 2.201342 | 149 |
from flask import current_app, abort, request
from dmutils.authentication import UnauthorizedWWWAuthenticate
def get_allowed_tokens_from_config(config, module='main'):
"""Return a list of allowed auth tokens from the application config"""
env_variable_name = 'DM_API_AUTH_TOKENS'
if module == 'callback... | [
6738,
42903,
1330,
1459,
62,
1324,
11,
15614,
11,
2581,
198,
198,
6738,
288,
21973,
4487,
13,
41299,
3299,
1330,
791,
19721,
17947,
15543,
315,
6925,
5344,
628,
628,
198,
4299,
651,
62,
40845,
62,
83,
482,
641,
62,
6738,
62,
11250,
... | 2.9375 | 160 |
import numpy as np
from scipy.constants import m_p, c, e
import matplotlib.pyplot as plt
import PyHEADTAIL.particles.generators as generators
from PyHEADTAIL.trackers.transverse_tracking import TransverseMap
from PyHEADTAIL.trackers.detuners import Chromaticity, AmplitudeDetuning
if __name__ == '__main__':
run(... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
9979,
1187,
1330,
285,
62,
79,
11,
269,
11,
304,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
9485,
37682,
5603,
4146,
13,
3911,
2983,
13,... | 3.018692 | 107 |
# calculating_pi.py
# From Classic Computer Science Problems in Python Chapter 1
# Copyright 2018 David Kopec
#
# 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/license... | [
2,
26019,
62,
14415,
13,
9078,
198,
2,
3574,
13449,
13851,
5800,
32093,
287,
11361,
7006,
352,
198,
2,
15069,
2864,
3271,
40500,
721,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
1534... | 3.757895 | 190 |
#
# auth test module - add, update, delete
#
"""
MIT License
Copyright (c) 2017, 2018 Ioan Coman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitatio... | [
2,
198,
2,
6284,
1332,
8265,
532,
751,
11,
4296,
11,
12233,
198,
2,
198,
198,
37811,
198,
198,
36393,
13789,
198,
198,
15269,
357,
66,
8,
2177,
11,
2864,
314,
24611,
955,
272,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,... | 2.61284 | 1,028 |
"""TODO: Use dataclasses."""
from __future__ import annotations
import abc
import datetime
import sys
from collections import MutableMapping
from typing import Any
from typing import Dict
from typing import Iterator
from typing import KeysView
from typing import List
from typing import Optional
from typing import Tup... | [
37811,
51,
3727,
46,
25,
5765,
4818,
330,
28958,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
450,
66,
198,
11748,
4818,
8079,
198,
11748,
25064,
198,
6738,
17268,
1330,
13859,
540,
44,
5912,
198,
6738,
... | 2.523052 | 629 |
l = int(input("digite a largura: "))
a = int(input("digite a altura: "))
L = A = 1
while A <= a:
while L <= l:
print("#", end="")
L += 1
A += 1
L = 1
print()
| [
75,
796,
493,
7,
15414,
7203,
12894,
578,
257,
2552,
5330,
25,
366,
4008,
198,
64,
796,
493,
7,
15414,
7203,
12894,
578,
257,
5988,
5330,
25,
366,
4008,
198,
43,
796,
317,
796,
352,
198,
4514,
317,
19841,
257,
25,
198,
220,
220,
... | 1.958763 | 97 |
from unittest import TestCase
import plotly.graph_objs as go
from nose.tools import raises
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
11748,
7110,
306,
13,
34960,
62,
672,
8457,
355,
467,
198,
6738,
9686,
13,
31391,
1330,
12073,
628,
628
] | 3.481481 | 27 |
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Plivo Team. See LICENSE.txt for details.
import time
import msgpack
VALID_IDENTIFIER_SET = set(list('abcdefghijklmnopqrstuvwxyz0123456789_-'))
def is_valid_identifier(identifier):
"""Checks if the given identifier is valid or not. A valid
identifier may consists o... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
1946,
1345,
23593,
4816,
13,
4091,
38559,
24290,
13,
14116,
329,
3307,
13,
198,
11748,
640,
198,
11748,
31456,
8002,
198,
198,
23428,
2389,
62,
2... | 2.643064 | 692 |
import copy
import generators
import math
import neighbor_states as ns
import numpy as np
import plotter
import random as rand
n = 200
iterations = 500000
temperature = 1000
decay_rate = 0.99995
swap_type = "consecutive"
low = 0
high = 1
distribution = "uniform"
first_path, best_path, distances_plot_data, tempera... | [
11748,
4866,
198,
11748,
27298,
198,
11748,
10688,
198,
11748,
4780,
62,
27219,
355,
36545,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
7110,
353,
198,
11748,
4738,
355,
43720,
628,
628,
198,
198,
77,
796,
939,
198,
2676,
602,
796,
... | 3.206061 | 165 |
import gym
from gym import spaces
import torch
import torch.nn as nn
from matplotlib import pyplot as plt
import pandas as pd
import numpy as np
from xitorch.interpolate import Interp1D
from tqdm.auto import tqdm, trange
import time
from rcmodel.room import Room
from rcmodel.building import Building
from rcmodel.RCMo... | [
11748,
11550,
198,
6738,
11550,
1330,
9029,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152... | 2.487152 | 934 |
import sys
from WidgetManager import WidgetManager
from Dashboard import Dashboard
from asciimatics.screen import Screen
from asciimatics.exceptions import ResizeScreenError
"""
The application is initialized using an asciimatics wrapper
"""
widgetmanager = WidgetManager()
last_scene = None
whil... | [
11748,
25064,
201,
198,
201,
198,
6738,
370,
17484,
13511,
1330,
370,
17484,
13511,
201,
198,
6738,
16189,
3526,
1330,
16189,
3526,
201,
198,
201,
198,
6738,
355,
979,
320,
23372,
13,
9612,
1330,
15216,
201,
198,
6738,
355,
979,
320,
... | 2.696335 | 191 |
@jit | [
31,
45051
] | 2 | 2 |
import pyxel
import math
# ablak szélessége, magassága, címe
pyxel.init(255,255, caption="Hello")
# Mit csináljunk egy képkocka előtt
# Hogyan rajzolunk ki egy-egy képkockát
# Elindítjuk
pyxel.run(update, draw) | [
11748,
12972,
87,
417,
198,
11748,
10688,
198,
2,
46624,
461,
264,
89,
2634,
1203,
2634,
469,
11,
2153,
562,
6557,
4908,
11,
269,
8836,
1326,
198,
9078,
87,
417,
13,
15003,
7,
13381,
11,
13381,
11,
8305,
2625,
15496,
4943,
198,
198,... | 1.972727 | 110 |
from rest_framework import serializers
from crisiscleanup.calls.models import Gateway
from crisiscleanup.calls.models import Language
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
4442,
2304,
13087,
929,
13,
66,
5691,
13,
27530,
1330,
29916,
198,
6738,
4442,
2304,
13087,
929,
13,
66,
5691,
13,
27530,
1330,
15417,
198
] | 3.857143 | 35 |
from contextlib import contextmanager
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from ..config import settings
__engine = create_engine(settings.DATABASE)
__session_maker = sessionmaker(bind=__engine)
@contextmanager
| [
6738,
4732,
8019,
1330,
4732,
37153,
198,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
198,
198,
6738,
11485,
11250,
1330,
6460,
198,
198,
834,
18392,
796,
2251,
62,
1839... | 3.671429 | 70 |
import re
| [
11748,
302,
201,
198,
220,
220,
220,
220
] | 1.875 | 8 |
from csv import DictReader
from cd4ml.filenames import file_names
| [
6738,
269,
21370,
1330,
360,
713,
33634,
198,
6738,
22927,
19,
4029,
13,
10379,
268,
1047,
1330,
2393,
62,
14933,
628
] | 3.190476 | 21 |
from django.urls import path
from .views import PriorityListView, PriorityDetailView
urlpatterns = (
path('', PriorityListView.as_view(), name='priority-list'),
path('<str:priority>', PriorityDetailView.as_view(), name='priority-detail'),
) | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
33571,
1330,
34416,
8053,
7680,
11,
34416,
11242,
603,
7680,
198,
198,
6371,
33279,
82,
796,
357,
198,
220,
220,
220,
3108,
10786,
3256,
34416,
8053,
7680,
13,
292,
62,
117... | 3.192308 | 78 |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | [
2,
28373,
2393,
329,
262,
45368,
28413,
10314,
27098,
13,
198,
2,
198,
2,
770,
2393,
691,
4909,
257,
6356,
286,
262,
749,
2219,
3689,
13,
1114,
257,
1336,
198,
2,
1351,
766,
262,
10314,
25,
198,
2,
3740,
1378,
2503,
13,
82,
746,
... | 3.210587 | 869 |
CHOICES = ["A", "C", "G", "T"] | [
44899,
34444,
796,
14631,
32,
1600,
366,
34,
1600,
366,
38,
1600,
366,
51,
8973
] | 2 | 15 |
"""
[17-08-21] Challenge #328 [Easy] Latin Squares
https://www.reddit.com/r/dailyprogrammer/comments/6v29zk/170821_challenge_328_easy_latin_squares/
#**Description**
A [Latin square](https://en.wikipedia.org/wiki/Latin_square) is an n × n array filled with n different symbols, each
occurring exactly once in each row ... | [
37811,
198,
58,
1558,
12,
2919,
12,
2481,
60,
13879,
1303,
34256,
685,
28406,
60,
9133,
5056,
3565,
198,
198,
5450,
1378,
2503,
13,
10748,
13,
785,
14,
81,
14,
29468,
23065,
647,
14,
15944,
14,
21,
85,
1959,
89,
74,
14,
1558,
2919... | 3.071283 | 491 |
from qore import *
from libs.menu import Menu
from libs.monitor import Monitor
from libs.agents import Agents
from libs.header import AppHeader
from libs.health import Health
AutomicTerminal.run(title="Automic", log="textual.log")
| [
6738,
10662,
382,
1330,
1635,
201,
198,
6738,
9195,
82,
13,
26272,
1330,
21860,
201,
198,
6738,
9195,
82,
13,
41143,
1330,
18289,
201,
198,
6738,
9195,
82,
13,
49638,
1330,
28295,
201,
198,
6738,
9195,
82,
13,
25677,
1330,
2034,
39681... | 3.157895 | 76 |
# -*- coding: utf-8 -*-
# @Time : 2021-04-26 7:52 p.m.
# @Author : young wang
# @FileName: quality.py
# @Software: PyCharm
import numpy as np
from skimage.filters import gaussian
from scipy.ndimage import median_filter
from misc.processing import imag2uint
def ROI(x, y, width, height,s):
'''obtain the ROI fr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
33448,
12,
3023,
12,
2075,
767,
25,
4309,
279,
13,
76,
13,
198,
2,
2488,
13838,
220,
1058,
1862,
266,
648,
198,
2,
2488,
8979,
... | 2.436992 | 984 |
import requests
import sqlite3
conn = sqlite3.connect('twitter_resources.db', check_same_thread=False)
c = conn.cursor()
| [
11748,
7007,
198,
11748,
44161,
578,
18,
198,
198,
37043,
796,
44161,
578,
18,
13,
8443,
10786,
6956,
62,
37540,
13,
9945,
3256,
2198,
62,
31642,
62,
16663,
28,
25101,
8,
198,
66,
796,
48260,
13,
66,
21471,
3419,
628,
628,
198
] | 3 | 42 |
import csv
from copy import copy, deepcopy
import pytest
from hypothesis import given
from hypothesis.extra.pandas import data_frames, column
from canvasxpress.data.matrix import CXCSVData
from tests.util.hypothesis_support import everything_except
csv_sample = """
"C1","C2","C3"
1,2,3
4,5,6
"""
@given(
data_f... | [
11748,
269,
21370,
198,
6738,
4866,
1330,
4866,
11,
2769,
30073,
198,
198,
11748,
12972,
9288,
198,
6738,
14078,
1330,
1813,
198,
6738,
14078,
13,
26086,
13,
79,
392,
292,
1330,
1366,
62,
37805,
11,
5721,
198,
198,
6738,
21978,
87,
84... | 2.828221 | 163 |
from .edges import make_edges
| [
6738,
764,
276,
3212,
1330,
787,
62,
276,
3212,
198
] | 3 | 10 |
from nose.tools import assert_equal
| [
6738,
9686,
13,
31391,
1330,
6818,
62,
40496,
198
] | 4 | 9 |
import ctypes.util
from .ffi_build import ffi
def _dlopen(generated_ffi, *names):
"""Try various names for the same library, for different platforms."""
for name in names:
for lib_name in (name, 'lib' + name):
try:
path = ctypes.util.find_library(lib_name)
l... | [
11748,
269,
19199,
13,
22602,
198,
6738,
764,
487,
72,
62,
11249,
1330,
277,
12463,
628,
198,
4299,
4808,
25404,
9654,
7,
27568,
62,
487,
72,
11,
1635,
14933,
2599,
198,
220,
220,
220,
37227,
23433,
2972,
3891,
329,
262,
976,
5888,
... | 2.538023 | 526 |
# -*- coding: utf-8 -*-
import os
from datetime import datetime
from src.utils.filemeta import get_filename
from src.loader.converter import Converter
from src.utils.logging import logger
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
12351,
13,
26791,
13,
7753,
28961,
1330,
651,
62,
34345,
198,
198,
6738,
12351,
13,
29356,
13... | 3.131148 | 61 |
import os
import json
import glob
# test_name = 'time_solve_r_essentials_r_base_conda_forge'
test_name = 'time_solve_anaconda_44'
for f in glob.glob("*.json"):
with open(f) as fd:
d = json.load(fd)
if f != 'machine.json' and d:
# timeval = ((d.get('results', {}) or {}).get(test_name, {}) or {}... | [
11748,
28686,
198,
11748,
33918,
198,
11748,
15095,
198,
198,
2,
1332,
62,
3672,
796,
705,
2435,
62,
82,
6442,
62,
81,
62,
408,
14817,
62,
81,
62,
8692,
62,
66,
13533,
62,
30293,
6,
198,
9288,
62,
3672,
796,
705,
2435,
62,
82,
6... | 1.904984 | 642 |
import asyncio as _asyncio
from typing import Callable as _Callable
from . import database as _database
from .chat_log import PssChatLogger as _PssChatLogger
from .reaction_role import ReactionRole as _ReactionRole
from .reaction_role import ReactionRoleChange as _ReactionRoleChange
from .reaction_role import Reaction... | [
11748,
30351,
952,
355,
4808,
292,
13361,
952,
198,
6738,
19720,
1330,
4889,
540,
355,
4808,
14134,
540,
198,
198,
6738,
764,
1330,
6831,
355,
4808,
48806,
198,
6738,
764,
17006,
62,
6404,
1330,
350,
824,
30820,
11187,
1362,
355,
4808,
... | 3.448649 | 185 |
from button_logic import ButtonLogic
from fake_hw import FakeHardware
from hardware import Hardware, is_pi
from internet_checker import InternetChecker
from paper_status import PaperStatus
from recording import Recording
from tg import Telegram
import os
if __name__ == '__main__':
main() | [
6738,
4936,
62,
6404,
291,
1330,
20969,
11187,
291,
198,
6738,
8390,
62,
36599,
1330,
33482,
49865,
198,
6738,
6890,
1330,
28715,
11,
318,
62,
14415,
198,
6738,
5230,
62,
9122,
263,
1330,
4455,
9787,
263,
198,
6738,
3348,
62,
13376,
1... | 3.868421 | 76 |
#Import Modules
import pygame as pg
from pygame import gfxdraw
from math import *
from random import randint
from time import sleep
from glob import glob
import easygui
import types
#Custom Modules
from sceneFile import scene,world,player
import guibuttons
import shapes
pg.init() #Initialize pygame
VERSION = "Beta 0... | [
2,
20939,
3401,
5028,
198,
11748,
12972,
6057,
355,
23241,
198,
6738,
12972,
6057,
1330,
308,
21373,
19334,
198,
6738,
10688,
1330,
1635,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
640,
1330,
3993,
198,
6738,
15095,
1330,
15095,
198,
... | 1.832207 | 5,769 |
from daipecore.decorator.notebook_function import notebook_function
@notebook_function
| [
6738,
288,
1872,
431,
7295,
13,
12501,
273,
1352,
13,
11295,
2070,
62,
8818,
1330,
20922,
62,
8818,
628,
198,
31,
11295,
2070,
62,
8818,
198
] | 3.423077 | 26 |
# coding=utf-8
import re
import ast
from setuptools import setup
from os import path
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('psi/app/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
with open('etc/requirements/common... | [
2,
19617,
28,
40477,
12,
23,
198,
198,
11748,
302,
198,
11748,
6468,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
28686,
1330,
3108,
198,
198,
62,
9641,
62,
260,
796,
302,
13,
5589,
576,
7,
81,
6,
834,
9641,
834,
59,
82,
... | 2.564345 | 847 |
"""
Convert a fasta/quality files to a fastq file. I can't believe I'm writing this in 2020
"""
import os
import sys
import argparse
from roblib import read_fasta, write_fastq, message
__author__ = 'Rob Edwards'
__copyright__ = 'Copyright 2020, Rob Edwards'
__credits__ = ['Rob Edwards']
__license__ = 'MIT'
__maintai... | [
37811,
198,
3103,
1851,
257,
3049,
64,
14,
13237,
3696,
284,
257,
3049,
80,
2393,
13,
314,
460,
470,
1975,
314,
1101,
3597,
428,
287,
12131,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
1822,
29572,
198,
198,
673... | 2.654822 | 394 |
#!/usr/bin/env python3
# -*- codint: utf-8 -*-
import datetime
d1 = datetime.datetime.today()
print("today: " ,d1)
d2 = datetime.datetime.now()
print("now: " ,d2)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
14873,
600,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
4818,
8079,
198,
198,
67,
16,
796,
4818,
8079,
13,
19608,
8079,
13,
40838,
3419,
198,
4798,
7203... | 2.179487 | 78 |
import os
from amokryshev import settings
from django.db.models.fields.files import FieldFile, FileField
class DeduplicatedFieldFile(FieldFile):
"""The implementation of simple deduplication functional while saving the file,
I couldn't find deduplication feature in Django FileField and didn't want to install
... | [
11748,
28686,
198,
6738,
716,
482,
563,
7091,
85,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
25747,
13,
16624,
1330,
7663,
8979,
11,
9220,
15878,
628,
198,
4871,
360,
15532,
489,
3474,
15878,
8979,
7,
15878,
8979,
2... | 3.652542 | 236 |
# Copyright 2019 The Texar Authors. 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 ... | [
2,
15069,
13130,
383,
3567,
283,
46665,
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,
407,
779,
428,
2393,
2845,
287,
11846,
351,
... | 2.351912 | 2,458 |
#Libraries
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from os.path import split as PATHSPLIT
#Pythons
from settings import *
| [
2,
43,
11127,
201,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1635,
201,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1635,
201,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
8205,
72,
1330,
1635,
201,
... | 2.369863 | 73 |
# 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
# distrib... | [
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
220,
220,
257,
4866,... | 3.587678 | 211 |
# Напечатать три данных действительных числа , и сначала в порядке их возрастания, затем - в порядке убывания
a = input("Введите первое число: ")
b = input("Введите второе число: ")
c = input("Введите третье число: ")
print(min(a, b, c), (max(min(a, b), min(b, c))
if not
min(a, b) == min(b, c)
... | [
2,
12466,
251,
16142,
140,
123,
16843,
141,
229,
16142,
20375,
16142,
20375,
45367,
220,
20375,
21169,
18849,
12466,
112,
16142,
22177,
22177,
45035,
141,
227,
12466,
112,
16843,
140,
117,
21727,
20375,
38857,
18849,
20375,
16843,
30143,
45... | 1.278325 | 406 |
# Generated by Django 2.2.5 on 2019-10-18 17:41
import card.modelfields
import django.core.validators
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
20,
319,
13130,
12,
940,
12,
1507,
1596,
25,
3901,
198,
198,
11748,
2657,
13,
19849,
25747,
198,
11748,
42625,
14208,
13,
7295,
13,
12102,
2024,
198,
6738,
42625,
14208,
13,
9945,
1330,
157... | 3.044444 | 45 |
# -*- coding: utf-8 -*-
# BEWARE: to not import this package at startup,
# but only into functions otherwise pip will go crazy
# (we cannot understand why, but it does!)
# which version of python is this?
# Retrocompatibility for Python < 3.6
from sultan.api import Sultan
try:
import_exceptions = (ModuleNotFoundE... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
347,
6217,
12203,
25,
284,
407,
1330,
428,
5301,
379,
13693,
11,
198,
2,
475,
691,
656,
5499,
4306,
7347,
481,
467,
7165,
198,
2,
357,
732,
2314,
1833,
1521,... | 3.308333 | 120 |
from tkinter import ttk
from tkinter import *
import requests
import json
import os
# variables
page = 0
vplan = None
tableContent = []
navigationLabel = None
leftArrow = None
rightArrow = None
tableHeaders = ["Datum", "Kurs", "Stunde", "Fach", "Raum", "Lehrer", "Info"]
#tableHeaders = ["ID", "Datum", "Kurs", "Stunde... | [
6738,
256,
74,
3849,
1330,
256,
30488,
198,
6738,
256,
74,
3849,
1330,
1635,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
28686,
198,
198,
2,
9633,
198,
198,
7700,
796,
657,
198,
85,
11578,
796,
6045,
198,
11487,
19746,
796,
17635... | 2.781925 | 509 |
from karabo.simulation.coordinate_helper import east_north_to_long_lat
from karabo.simulation.east_north_coordinate import EastNorthCoordinate
| [
6738,
479,
283,
34748,
13,
14323,
1741,
13,
37652,
4559,
62,
2978,
525,
1330,
7627,
62,
43588,
62,
1462,
62,
6511,
62,
15460,
198,
6738,
479,
283,
34748,
13,
14323,
1741,
13,
23316,
62,
43588,
62,
37652,
4559,
1330,
3687,
14157,
7222,... | 3.25 | 44 |
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
import spec2model.config_manager as yml_manager
config_file_path = 'spec2model/configuration.yml'
| [
6738,
279,
5173,
11590,
13,
18439,
1330,
3012,
30515,
198,
6738,
279,
5173,
11590,
13,
19472,
1330,
3012,
24825,
198,
11748,
1020,
17,
19849,
13,
11250,
62,
37153,
355,
331,
4029,
62,
37153,
198,
198,
11250,
62,
7753,
62,
6978,
796,
7... | 3.264151 | 53 |
#! /usr/bin/python3
# Author: Cavyn VonDeylen
# Date: August 2010
# Larson-Group UWM
# Updated to python 3 by Tyler Cernik
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import struct # Handles binary data
#------------------------------------------------... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
2,
6434,
25,
19931,
2047,
26985,
5005,
2645,
268,
198,
2,
7536,
25,
2932,
3050,
198,
2,
42630,
12,
13247,
471,
22117,
198,
2,
19433,
284,
21015,
513,
416,
14886,
327,
1142,
1134,
19... | 2.62831 | 982 |