content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
import sys
from .. import api
import pysam
description = """
Index a VCF file.
This command will create an index file (.tbi) for the input VCF.
"""
epilog = f"""
[Example] Index a compressed VCF file:
$ fuc {api.common._script_name()} in.vcf.gz
[Example] Index an uncompressed VCF file (will create a compressed ... | [
11748,
25064,
198,
198,
6738,
11485,
1330,
40391,
198,
198,
11748,
279,
893,
321,
198,
198,
11213,
796,
37227,
198,
15732,
257,
569,
22495,
2393,
13,
198,
198,
1212,
3141,
481,
2251,
281,
6376,
2393,
20262,
83,
8482,
8,
329,
262,
5128... | 2.915385 | 130 |
import logging
import os
import sys
from peewee import SqliteDatabase, PostgresqlDatabase
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
if not os.getenv('POSTGRES_DB_NAME'):
logger.warning('[DB] u... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
613,
413,
1453,
1330,
311,
13976,
578,
38105,
11,
2947,
34239,
13976,
38105,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
3419,
198,
6404,
1362,
13,
2617,
4... | 2.440748 | 481 |
from scuttlecrab.classes.bot import CustomBot
bot = CustomBot()
| [
6738,
629,
315,
7100,
6098,
397,
13,
37724,
13,
13645,
1330,
8562,
20630,
198,
198,
13645,
796,
8562,
20630,
3419,
198
] | 3.095238 | 21 |
# Copyright (c) 2021 PaddlePaddle 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 appli... | [
2,
15069,
357,
66,
8,
33448,
350,
37382,
47,
37382,
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... | 3.836478 | 159 |
from captcha.image import ImageCaptcha
import random
check_captcha()
| [
6738,
48972,
13,
9060,
1330,
7412,
19209,
11693,
201,
198,
11748,
4738,
201,
198,
201,
198,
201,
198,
201,
198,
9122,
62,
27144,
11693,
3419,
201,
198
] | 2.888889 | 27 |
from openstates.utils import LXMLMixin
import datetime as dt
import re
from billy.scrape.events import Event, EventScraper
import lxml.html
import pytz
mi_events = "http://legislature.mi.gov/doc.aspx?CommitteeMeetings"
| [
6738,
1280,
27219,
13,
26791,
1330,
44988,
5805,
35608,
259,
198,
11748,
4818,
8079,
355,
288,
83,
198,
11748,
302,
198,
198,
6738,
2855,
88,
13,
1416,
13484,
13,
31534,
1330,
8558,
11,
8558,
3351,
38545,
198,
198,
11748,
300,
19875,
... | 3 | 74 |
if "__main__" == __name__:
solution = Solution()
res = solution.reverseBits(43261596)
print(res)
| [
628,
198,
361,
366,
834,
12417,
834,
1,
6624,
11593,
3672,
834,
25,
198,
220,
220,
220,
4610,
796,
28186,
3419,
198,
220,
220,
220,
581,
796,
4610,
13,
50188,
33,
896,
7,
3559,
2075,
1314,
4846,
8,
628,
220,
220,
220,
3601,
7,
4... | 2.404255 | 47 |
"""Some preloads of database content."""
tables = list()
roles = list()
roles.append({"id": 1, "name": "administrator"})
roles.append({"id": 2, "name": "contributor"})
roles.append({"id": 3, "name": "staff"})
roles.append({"id": 4, "name": "parent"})
roles.append({"id": 5, "name": "caretaker"})
roles.append... | [
37811,
4366,
662,
46030,
286,
6831,
2695,
526,
15931,
201,
198,
201,
198,
83,
2977,
796,
1351,
3419,
201,
198,
201,
198,
305,
829,
796,
1351,
3419,
201,
198,
305,
829,
13,
33295,
7,
4895,
312,
1298,
352,
11,
366,
3672,
1298,
366,
... | 2.147679 | 474 |
#
# MIT License
#
# Copyright (c) 2020 Andrew Robinson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | [
2,
198,
2,
17168,
13789,
198,
2,
220,
198,
2,
15069,
357,
66,
8,
12131,
6858,
12652,
198,
2,
220,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917... | 3.735905 | 337 |
from os import getcwd
if __name__ == '__main__':
main()
| [
6738,
28686,
1330,
651,
66,
16993,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.461538 | 26 |
####################################################################################################
# File: plotter.py
# Purpose: Plotting module.
#
# Author: Luke Poeppel
#
# Location: Kent, 2021
####################################################################################################
import logging... | [
29113,
29113,
29113,
4242,
198,
2,
9220,
25,
220,
220,
220,
220,
7110,
353,
13,
9078,
198,
2,
32039,
25,
220,
28114,
889,
8265,
13,
198,
2,
198,
2,
6434,
25,
220,
220,
11336,
34815,
46357,
198,
2,
198,
2,
13397,
25,
8758,
11,
33... | 2.899711 | 1,037 |
from flask import current_app, Flask, redirect, url_for
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
import config
from flask_login import LoginManager
app = Flask(__name__)
app.config.from_object(config) # load config.py
app.secret_key = 'super duper mega secret key'
login_manager = LoginManag... | [
6738,
42903,
1330,
1459,
62,
1324,
11,
46947,
11,
18941,
11,
19016,
62,
1640,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
11748,
4566,
198,
6738,
42903,
62,
... | 3.645714 | 175 |
#!/usr/bin/env python
import logging
from threading import Thread, Event
from Queue import Queue, Empty as QueueEmpty
import codecs
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
18931,
198,
198,
6738,
4704,
278,
1330,
14122,
11,
8558,
198,
6738,
4670,
518,
1330,
4670,
518,
11,
33523,
355,
4670,
518,
40613,
198,
11748,
40481,
82,
628
] | 3.461538 | 39 |
#Dados dos nmeros, mostrar la suma, resta, divisin y multiplicacin de ambos.
a = int(input("Dime el primer nmero: "))
b = int(input("Dime el segundo nmero: "))
print("La suma de los dos nmeros es: ",a+b)
print("La resta de los dos nmeros es: ",a-b)
print("La multiplicacin de los dos nmeros es: ",a*b)
print("La divisin... | [
2,
35,
22484,
23430,
299,
647,
418,
11,
749,
20040,
8591,
2160,
64,
11,
1334,
64,
11,
2659,
45763,
331,
15082,
291,
330,
259,
390,
4915,
418,
13,
198,
198,
64,
796,
493,
7,
15414,
7203,
35,
524,
1288,
33270,
299,
647,
78,
25,
36... | 2.430556 | 144 |
from core.advbase import *
if __name__ == '__main__':
from core.simulate import test_with_argv
test_with_argv(None, *sys.argv) | [
6738,
4755,
13,
32225,
8692,
1330,
1635,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
422,
4755,
13,
14323,
5039,
1330,
1332,
62,
4480,
62,
853,
85,
198,
220,
220,
220,
1332,
62,
4480,
62,
... | 2.518519 | 54 |
import unittest
import logging
import nzmath.factor.methods as mthd
try:
_log = logging.getLogger('test.testFactorMethod')
except:
try:
_log = logging.getLogger('nzmath.test.testFactorMethod')
except:
_log = logging.getLogger('testFactorMethod')
_log.setLevel(logging.INFO)
def suite(suff... | [
11748,
555,
715,
395,
198,
11748,
18931,
198,
11748,
299,
89,
11018,
13,
31412,
13,
24396,
82,
355,
285,
400,
67,
198,
198,
28311,
25,
198,
220,
220,
220,
4808,
6404,
796,
18931,
13,
1136,
11187,
1362,
10786,
9288,
13,
9288,
41384,
... | 2.422794 | 272 |
import collections
| [
11748,
17268,
628,
628
] | 5.5 | 4 |
# Copyright (c) 2021, Serum Studio
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | [
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
15069,
357,
66,
8,
33448,
11,
2930,
388,
11733,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048... | 3.012935 | 1,005 |
import sklearn
from sklearn import datasets | [
11748,
1341,
35720,
198,
6738,
1341,
35720,
1330,
40522
] | 4.777778 | 9 |
if __name__ == '__main__':
import Recommender_System.utility.gpu_memory_growth
from Recommender_System.algorithm.KGCN.tool import construct_undirected_kg, get_adj_list
from Recommender_System.algorithm.KGCN.model import KGCN_model
from Recommender_System.algorithm.KGCN.train import train
from R... | [
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1330,
19237,
2194,
62,
11964,
13,
315,
879,
13,
46999,
62,
31673,
62,
27922,
201,
198,
220,
220,
220,
422,
19237,
2194,
62,
11964,
13,
282,
42289,
13... | 2.566396 | 369 |
import os
import setuptools
CUR_DIR = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(CUR_DIR, "data_spec_validator", "__version__.py"), "r") as f:
exec(f.read(), about)
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name... | [
11748,
28686,
198,
198,
11748,
900,
37623,
10141,
198,
198,
34,
4261,
62,
34720,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
198,
10755,
796,
23884,
198,
4480,
1280,
7,
... | 2.512195 | 451 |
"""
A component which allows you to send data to an Influx database.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/influxdb/
"""
from datetime import timedelta
import functools
import logging
import itertools
import json
from persistent_queue import P... | [
37811,
198,
32,
7515,
543,
3578,
345,
284,
3758,
1366,
284,
281,
4806,
22564,
6831,
13,
198,
198,
1890,
517,
3307,
546,
428,
7515,
11,
3387,
3522,
284,
262,
10314,
379,
198,
5450,
1378,
11195,
12,
562,
10167,
13,
952,
14,
5589,
3906... | 2.211043 | 2,445 |
import numpy as np
import os
from ..helpers import save_json
| [
11748,
299,
32152,
355,
45941,
198,
198,
11748,
28686,
198,
6738,
11485,
16794,
364,
1330,
3613,
62,
17752,
628,
220,
220,
220,
220
] | 2.913043 | 23 |
Import("env")
# original Makefile builds into dapboot.bin/elf, let's do the same
env.Replace(PROGNAME="dapboot")
| [
20939,
7203,
24330,
4943,
198,
198,
2,
2656,
6889,
7753,
12188,
656,
288,
499,
18769,
13,
8800,
14,
7046,
11,
1309,
338,
466,
262,
976,
198,
24330,
13,
3041,
5372,
7,
4805,
7730,
20608,
2625,
67,
499,
18769,
4943,
198
] | 2.85 | 40 |
#drawing a line using DDA
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import sys
import math
x1 = 0
x2 = 0
y1 = 0
y2 = 0
if __name__ == "__main__":
main() | [
2,
19334,
278,
257,
1627,
1262,
360,
5631,
201,
198,
201,
198,
6738,
30672,
13,
8763,
1330,
1635,
201,
198,
6738,
30672,
13,
8763,
52,
1330,
1635,
201,
198,
6738,
30672,
13,
8763,
3843,
1330,
1635,
201,
198,
11748,
25064,
201,
198,
... | 2.263736 | 91 |
import pathlib
import numpy as np
import xarray as xr
def to_netcdf(
grid, path, include="*", exclude=None, time=None, format="NETCDF4", mode="w"
):
"""Write landlab a grid to a netcdf file.
Write the data and grid information for *grid* to *path* as NetCDF.
If the *append* keyword argument in True,... | [
11748,
3108,
8019,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2124,
18747,
355,
2124,
81,
628,
198,
4299,
284,
62,
3262,
66,
7568,
7,
198,
220,
220,
220,
10706,
11,
3108,
11,
2291,
2625,
9,
1600,
19607,
28,
14202,
11,
640,... | 2.275862 | 2,146 |
from flask import request, url_for, g
from flask_api import FlaskAPI, status, exceptions
from flask_sqlalchemy import SQLAlchemy
import arrow
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
from flask_cors import CORS
app = FlaskAPI(__name__)
cors = CORS(app, resources={r"/*": {"origins... | [
6738,
42903,
1330,
2581,
11,
19016,
62,
1640,
11,
308,
198,
6738,
42903,
62,
15042,
1330,
46947,
17614,
11,
3722,
11,
13269,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
11748,
15452,
198,
6738,
42903,
62,
284... | 2.671362 | 213 |
"""
Your object will be instantiated and called as such:
ty = ToyFactory()
toy = ty.getToy(type)
toy.talk()
"""
| [
37811,
198,
7120,
2134,
481,
307,
9113,
12931,
290,
1444,
355,
884,
25,
198,
774,
796,
10977,
22810,
3419,
198,
83,
726,
796,
1259,
13,
1136,
48236,
7,
4906,
8,
198,
83,
726,
13,
16620,
3419,
198,
37811,
628
] | 2.897436 | 39 |
from enum import IntEnum, unique
| [
6738,
33829,
1330,
2558,
4834,
388,
11,
3748,
628
] | 3.777778 | 9 |
from autohandshake.src.Pages.Page import Page
from autohandshake.src.HandshakeBrowser import HandshakeBrowser
from autohandshake.src.exceptions import InvalidURLError, NoSuchElementError, \
InvalidEmailError, InvalidPasswordError
import re
| [
6738,
1960,
1219,
392,
32431,
13,
10677,
13,
47798,
13,
9876,
1330,
7873,
198,
6738,
1960,
1219,
392,
32431,
13,
10677,
13,
12885,
32431,
46532,
1330,
7157,
32431,
46532,
198,
6738,
1960,
1219,
392,
32431,
13,
10677,
13,
1069,
11755,
13... | 3.602941 | 68 |
from omegaconf import DictConfig
import pytorch_lightning as pl
import numpy as np
import torch
import wandb
from simsiam.models import get_resnet
from simsiam.metrics import get_accuracy
from simsiam.optimizer import get_optimizer, get_scheduler
| [
6738,
267,
28917,
7807,
69,
1330,
360,
713,
16934,
198,
11748,
12972,
13165,
354,
62,
2971,
768,
355,
458,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
11569,
65,
198,
198,
6738,
985,
82,
1789,
13,
27530,
1330,
6... | 3.135802 | 81 |
from flask import render_template, redirect, url_for, flash
from flask_login import current_user, login_user, logout_user
from sqlalchemy import func
import stripe
from app import db
from app.auth import bp
from app.auth.forms import LoginForm, RegistrationForm, ResetPasswordRequestForm, ResetPasswordForm
from app.mode... | [
6738,
42903,
1330,
8543,
62,
28243,
11,
18941,
11,
19016,
62,
1640,
11,
7644,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
11,
17594,
62,
7220,
11,
2604,
448,
62,
7220,
198,
6738,
44161,
282,
26599,
1330,
25439,
198,
11748,
3985... | 3.760563 | 142 |
from nilearn import plotting
from IPython import display
| [
6738,
299,
576,
1501,
1330,
29353,
198,
6738,
6101,
7535,
1330,
3359,
628,
198
] | 4.214286 | 14 |
#!/usr/bin/env python3
import config
import rsys_api
import secrets
import json
import logging
import sys
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
4566,
198,
11748,
374,
17597,
62,
15042,
198,
11748,
13141,
198,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
25064,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,... | 2.901961 | 51 |
from utils import save_params, load_params
from importlib import import_module
from environments.env import Env
def run(algorithm_name, exp_name, env_name, agent_params, train_params, use_ray, use_gpu, is_train,
num_runs=None, test_run_id=None, test_model_id=None):
"""
Runner for training or t... | [
6738,
3384,
4487,
1330,
3613,
62,
37266,
11,
3440,
62,
37266,
201,
198,
6738,
1330,
8019,
1330,
1330,
62,
21412,
201,
198,
6738,
12493,
13,
24330,
1330,
2039,
85,
201,
198,
201,
198,
201,
198,
4299,
1057,
7,
282,
42289,
62,
3672,
11... | 2.088263 | 2,096 |
from decouple import config
from peewee import SqliteDatabase
from playhouse.pool import PooledSqliteExtDatabase, PooledPostgresqlExtDatabase
# db = SqliteDatabase(config('DATABASE_PATH', default='sentiment_analysis.db'))
db = PooledSqliteExtDatabase(
config('DATABASE_PATH', default='sentiment_analysis.db'),
... | [
6738,
875,
43846,
1330,
4566,
198,
6738,
613,
413,
1453,
1330,
311,
13976,
578,
38105,
198,
6738,
711,
4803,
13,
7742,
1330,
19850,
276,
50,
13976,
578,
11627,
38105,
11,
19850,
276,
6307,
34239,
13976,
11627,
38105,
628,
198,
2,
20613,... | 2.705179 | 251 |
#!/usr/bin/env python
import webapp2
from pkg.controllers.transactionctrl import TransactionCtrl
from pkg.controllers.appctrl import AppCtrl
from pkg.controllers.debug import Debug
app = webapp2.WSGIApplication([
('/transaction', TransactionCtrl),
('/transaction/([0-9]+)', TransactionCtrl),
('/', AppCtrl),
('/deb... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
3992,
1324,
17,
198,
198,
6738,
279,
10025,
13,
3642,
36667,
13,
7645,
2673,
44755,
1330,
45389,
40069,
198,
6738,
279,
10025,
13,
3642,
36667,
13,
1324,
44755,
1330,
2034,
40069,... | 2.991379 | 116 |
import re
from django.conf import settings
from django.shortcuts import redirect
from django.http import HttpResponseRedirect
EXEMPT_URLS=[]
if hasattr(settings,'LOGIN_EXEMPT_URLS'):
EXEMPT_URLS+=[re.compile(url) for url in settings.LOGIN_EXEMPT_URLS]
| [
11748,
302,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
18941,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
7738,
1060,
198,
198,
6369,
3620,
11571,
62,
4261,
6561,
28,
... | 2.771739 | 92 |
from datetime import datetime, timedelta, timezone
import freezegun
from autifycli.domain.entities.metadata import Metadata
JST = timezone(timedelta(hours=+9), "JST")
| [
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
11,
640,
11340,
198,
198,
11748,
1479,
89,
1533,
403,
198,
198,
6738,
1960,
1958,
44506,
13,
27830,
13,
298,
871,
13,
38993,
1330,
3395,
14706,
198,
198,
41,
2257,
796,
640,
11340,... | 3 | 57 |
# -*- coding: utf-8 -*-
"""
demeter database
name:__load__.py
"""
from demeter.model import *
from demeter.core import * | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
1357,
2357,
6831,
198,
220,
220,
220,
1438,
25,
834,
2220,
834,
13,
9078,
198,
37811,
198,
6738,
1357,
2357,
13,
19849,
1330,
1635,
198,
673... | 2.509804 | 51 |
import abc
| [
11748,
450,
66,
198
] | 2.75 | 4 |
# TIE Methods
import utils
from dxltieclient import TieClient
from dxltieclient.constants import HashType, ReputationProp, FileProvider, FileEnterpriseAttrib, \
CertProvider, CertEnterpriseAttrib, TrustLevel
# TIE Reputation Average Map
tiescoreMap = {0: 'Not Set', 1: 'Known Malicious', 15: 'Most Likely Malicious'... | [
2,
309,
10008,
25458,
198,
11748,
3384,
4487,
198,
6738,
44332,
2528,
494,
16366,
1330,
36286,
11792,
198,
6738,
44332,
2528,
494,
16366,
13,
9979,
1187,
1330,
21059,
6030,
11,
1432,
7094,
24331,
11,
9220,
29495,
11,
9220,
17469,
7919,
... | 2.604678 | 855 |
import hashlib
import json
import numpy as np
import pandas as pd
from pymemcache import serde
from pymemcache.client import base
from keepthis.MemcachedConnection import MemcachedConnection
from keepthis.exceptions import KeepThisValueError
| [
11748,
12234,
8019,
198,
11748,
33918,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
279,
4948,
368,
23870,
1330,
1055,
2934,
198,
6738,
279,
4948,
368,
23870,
13,
16366,
1330,
2779,
198,
198,... | 3.656716 | 67 |
import json
from pathlib import Path
from sbx_bgsvc_starterpack.sbx_json_default import json_default
| [
11748,
33918,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
264,
65,
87,
62,
65,
14542,
28435,
62,
12339,
8002,
13,
36299,
87,
62,
17752,
62,
12286,
1330,
33918,
62,
12286,
628,
628
] | 3.088235 | 34 |
#!/usr/bin/python
#
# ============================================================================
# Copyright (c) 2011 Marvell International, Ltd. All Rights Reserved
#
# Marvell Confidential
# ============================================================================
#
# Run a random sca... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
38093,
2559,
18604,
198,
2,
15069,
357,
66,
8,
2813,
1526,
29333,
4037,
11,
12052,
13,
1439,
6923,
33876,
198,
2,
220,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 2.865672 | 402 |
# --------------------------------------------------------------------------
# Copyright 2014 Digital Sapphire Development Team
#
# 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://... | [
2,
16529,
35937,
198,
2,
15069,
1946,
10231,
35718,
7712,
4816,
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,
... | 3.110849 | 424 |
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, SelectField
from wtforms.validators import DataRequired, Length
| [
6738,
42903,
62,
86,
27110,
1330,
46947,
8479,
198,
6738,
266,
83,
23914,
1330,
10903,
15878,
11,
39900,
15878,
11,
9683,
15878,
198,
6738,
266,
83,
23914,
13,
12102,
2024,
1330,
6060,
37374,
11,
22313,
628,
198
] | 3.891892 | 37 |
from __future__ import annotations
import ast
import os
import re
import sys
from itertools import product
from pathlib import Path
import attr
from hypothesis import given, settings
from hypothesis.strategies import sampled_from
from absort.__main__ import (
CommentStrategy,
FormatOption,
NameRedefiniti... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
6468,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
708,
81,
198,
6738,
14078,
... | 2.923438 | 640 |
import pygame
from BrickBreaker import *
from BrickBreaker.Scenes import *
from BrickBreaker.Shared import *
if __name__ == '__main__':
BrickBreaker().start()
| [
11748,
12972,
6057,
198,
198,
6738,
28347,
12679,
3110,
1330,
1635,
198,
6738,
28347,
12679,
3110,
13,
3351,
18719,
1330,
1635,
198,
6738,
28347,
12679,
3110,
13,
2484,
1144,
1330,
1635,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
... | 3.054545 | 55 |
from .visualization import plot_mean, plot_mean_interval
| [
6738,
764,
41464,
1634,
1330,
7110,
62,
32604,
11,
7110,
62,
32604,
62,
3849,
2100,
198
] | 3.5625 | 16 |
'''
###################################
Modified from Mike's predict_acc.py
###################################
'''
import os
import sys
import random
import pickle
import numpy as np
import pandas as pd
from keras.utils import to_categorical
from keras.models import load_model
from sklearn.metrics import accuracy_s... | [
7061,
6,
198,
29113,
21017,
198,
5841,
1431,
422,
4995,
338,
4331,
62,
4134,
13,
9078,
198,
29113,
21017,
198,
7061,
6,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
4738,
198,
11748,
2298,
293,
198,
11748,
299,
32152,
355,
4... | 2.288703 | 956 |
"""Tests for date utils"""
from datetime import time, datetime
import pytz
from jetblack_fixengine.utils.date_utils import (
is_dow_in_range,
is_time_in_range,
delay_for_time_period
)
MONDAY = 0
TUESDAY = 1
WEDNESDAY = 2
THURSDAY = 3
FRIDAY = 4
SATURDAY = 5
SUNDAY = 6
def test_dow_range():
"""Test... | [
37811,
51,
3558,
329,
3128,
3384,
4487,
37811,
198,
198,
6738,
4818,
8079,
1330,
640,
11,
4818,
8079,
198,
198,
11748,
12972,
22877,
198,
198,
6738,
12644,
13424,
62,
13049,
18392,
13,
26791,
13,
4475,
62,
26791,
1330,
357,
198,
220,
... | 2.094062 | 2,105 |
'''
xScratch exceptions
'''
| [
7061,
6,
198,
87,
3351,
36722,
13269,
198,
7061,
6,
628,
628
] | 2.583333 | 12 |
import os
import pybullet_data
from environments.locomotion.scene_abstract import Scene
import pybullet as p
| [
11748,
28686,
198,
11748,
12972,
15065,
1616,
62,
7890,
198,
6738,
12493,
13,
17946,
296,
9650,
13,
29734,
62,
397,
8709,
1330,
28315,
198,
11748,
12972,
15065,
1616,
355,
279,
628,
628
] | 3.5 | 32 |
from defs import *
from utilities import warnings
| [
6738,
825,
82,
1330,
1635,
198,
6738,
20081,
1330,
14601,
628
] | 4.636364 | 11 |
from typing import Dict, Sequence, Union
from .typing_annotations import DataFrameOrSeries
import pandas as pd
import numpy as np
def remove_consecutive_duplicates(df:DataFrameOrSeries) -> DataFrameOrSeries:
"""
Compress timeseries by only keeping the first row of consecutive duplicates. This is done by compa... | [
6738,
19720,
1330,
360,
713,
11,
45835,
11,
4479,
198,
6738,
764,
774,
13886,
62,
34574,
602,
1330,
6060,
19778,
5574,
27996,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4299,
4781,
62,
1102,
45... | 2.859916 | 1,185 |
# -*- coding: utf-8 -*-
""" Class definitions for the HLSCLT Command Line Tool.
Copyright (c) 2017 Ben Marshall
"""
# Generic error class
# Specific error class for local config file errors
# Class to hold application specific info within the Click context.
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
5016,
17336,
329,
262,
367,
6561,
5097,
51,
9455,
6910,
16984,
13,
198,
198,
15269,
357,
66,
8,
2177,
3932,
13606,
198,
37811,
198,
198,
2,
42044,
4049,
1398,
1... | 3.742857 | 70 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198
] | 2 | 23 |
import logging
from collections import deque
from ..tokens import BuiltToken
from ..utils import LogicError
from ..router import NoSuchControlSequence
from ..constants.instructions import Instructions
logger = logging.getLogger(__name__)
# Stuff specific to *my parsing*.
letter_to_non_active_uncased_type_map = {
... | [
11748,
18931,
198,
6738,
17268,
1330,
390,
4188,
198,
198,
6738,
11485,
83,
482,
641,
1330,
28477,
30642,
198,
6738,
11485,
26791,
1330,
30146,
12331,
198,
6738,
11485,
472,
353,
1330,
1400,
16678,
15988,
44015,
594,
198,
6738,
11485,
997... | 2.43028 | 3,428 |
# Generated by Django 2.1.4 on 2019-10-17 00:45
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
19,
319,
13130,
12,
940,
12,
1558,
3571,
25,
2231,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python3
#
# Copyright (c) 2020 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.... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
198,
2,
220,
220,
15069,
357,
66,
8,
12131,
3012,
11419,
13,
198,
2,
220,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
106... | 3.090566 | 265 |
# -*- coding:utf-8 -*-
"""
events.py
~~~~~~~~
,
:author: Fufu, 2019/12/20
"""
from blinker import signal
#
event_user_logined = signal('event_user_logined')
# (/)
event_sys_admin = signal('event_sys_admin')
# app
event_async_with_app_demo = signal('event_async_with_app_demo')
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
2995,
13,
9078,
198,
220,
220,
220,
220,
15116,
198,
220,
220,
220,
837,
220,
628,
220,
220,
220,
1058,
9800,
25,
376,
3046,
84,
11,
13130,
1... | 2.290076 | 131 |
import datetime
import click
from oura import OuraClient
| [
11748,
4818,
8079,
198,
198,
11748,
3904,
198,
6738,
674,
64,
1330,
3954,
64,
11792,
628
] | 3.6875 | 16 |
import cv2
import os
import time
import advancedcv.hand_tracking as htm
import numpy as np
import itertools
patterns = np.array(list(itertools.product([0, 1], repeat=5)))
p_time = 0
cap = cv2.VideoCapture(0)
# w_cam, h_cam = 648, 480
# cap.set(3, w_cam)
# cap.set(4, h_cam)
folder_path = "finger_images"
my_list = os... | [
11748,
269,
85,
17,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
6190,
33967,
13,
4993,
62,
36280,
355,
289,
17209,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
340,
861,
10141,
628,
198,
33279,
82,
796,
45941,
13,
18747,
7,
486... | 1.962785 | 833 |
import paddle
import paddlefsl
from paddlefsl.model_zoo import maml
# Set computing device
paddle.set_device('gpu:0')
# """ ---------------------------------------------------------------------------------
# Config: MAML, Omniglot, MLP, 5 Ways, 1 Shot
TRAIN_DATASET = paddlefsl.datasets.Omniglot(mode='train', image_s... | [
11748,
39517,
198,
11748,
39517,
69,
6649,
198,
6738,
39517,
69,
6649,
13,
19849,
62,
89,
2238,
1330,
285,
43695,
198,
198,
2,
5345,
14492,
3335,
198,
79,
37382,
13,
2617,
62,
25202,
10786,
46999,
25,
15,
11537,
628,
198,
2,
37227,
... | 2.722789 | 4,217 |
import numpy as np
import collections, numpy
import glob
from PIL import Image
from matplotlib.pyplot import cm
nrImages = 1
imageSize = 449
finalImageSize = 449
ImageNumber = 0
sourceFolder = 'images'
# sourceFolder = "testInput"
destinationFolder = 'final_text_files_2'
# destinationFolder = "testOutpu... | [
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
17268,
11,
299,
32152,
201,
198,
11748,
15095,
201,
198,
6738,
350,
4146,
1330,
7412,
201,
198,
6738,
2603,
29487,
8019,
13,
9078,
29487,
1330,
12067,
201,
198,
48624,
29398,
796... | 2.180784 | 791 |
from ravager.database.tasks import Tasks
import logging
from ravager.database.helpers import setup_db
from ravager.config import DATABASE_URL, LOGS_DIR
from ravager.helpers.check_process import Process
from subprocess import check_call
logger = logging.getLogger(__file__)
setup_db.create_tables()
logger.info("Databas... | [
6738,
24343,
3536,
13,
48806,
13,
83,
6791,
1330,
309,
6791,
198,
11748,
18931,
198,
6738,
24343,
3536,
13,
48806,
13,
16794,
364,
1330,
9058,
62,
9945,
198,
6738,
24343,
3536,
13,
11250,
1330,
360,
1404,
6242,
11159,
62,
21886,
11,
4... | 3.013514 | 148 |
from PyDAQmx import *
from ctypes import byref, c_ulong,c_int32
import numpy as np | [
6738,
9485,
46640,
36802,
1330,
1635,
198,
6738,
269,
19199,
1330,
416,
5420,
11,
269,
62,
377,
506,
11,
66,
62,
600,
2624,
198,
11748,
299,
32152,
355,
45941
] | 2.827586 | 29 |
#//
#// -------------------------------------------------------------
#// Copyright 2011 Synopsys, Inc.
#// Copyright 2010-2011 Mentor Graphics Corporation
#// Copyright 2019-2020 Tuomas Poikela (tpoikela)
#// All Rights Reserved Worldwide
#//
#// Licensed under the Apache License, Version 2.0 (the
#//... | [
2,
1003,
220,
198,
2,
1003,
20368,
1783,
32501,
198,
2,
1003,
220,
220,
220,
15069,
2813,
16065,
2840,
893,
11,
3457,
13,
198,
2,
1003,
220,
220,
220,
15069,
3050,
12,
9804,
31879,
273,
19840,
10501,
198,
2,
1003,
220,
220,
220,
1... | 2.598055 | 617 |
from math import inf
nums = list(map(int, input().split()))
signs = { '+': 1, '-': 2, '*': 3, '/': 4, '%': 5, '=': 0 }
anss = []
comb(nums[1:], str(nums[0]), False)
print(anss)
min_v = inf
for ans in anss:
ves = 0
for char in ans:
ves += signs.get(char, 0)
if ves < min_v:
min_v = ves
real_ans = ans... | [
6738,
10688,
1330,
1167,
198,
77,
5700,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
198,
198,
12683,
82,
796,
1391,
705,
10,
10354,
352,
11,
705,
12,
10354,
362,
11,
705,
9,
10354,
513,
11,
31051,
10354,
604,
1... | 2.131818 | 220 |
#
# Copyright 2021 by Tatsuya Hasebe, Hitachi, Ltd.
# All rights reserved.
#
# This file is part of the KEMPNN package,
# and is released under the "BSD 3-Clause License". Please see the LICENSE
# file that should have been included as part of this package.
#
import datetime
import json
import os
import pickle
import ... | [
2,
198,
2,
15069,
33448,
416,
309,
19231,
3972,
367,
589,
1350,
11,
7286,
14299,
11,
12052,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
262,
509,
39494,
6144,
5301,
11,
198,
2,
290,
318,
2716,
73... | 2.736842 | 304 |
num = int (input ('Digite um nmero inteiro: '))
if num % 2 != 0 and num % 3 != 0 and num % 5 != 0 and num % 7 != 0:
print ('{} um nmero primo'.format(num))
else:
print ('{} no um nmero primo.'.format(num))
| [
22510,
796,
493,
357,
15414,
19203,
19511,
578,
23781,
299,
647,
78,
493,
68,
7058,
25,
705,
4008,
198,
361,
997,
4064,
362,
14512,
657,
290,
997,
4064,
513,
14512,
657,
290,
997,
4064,
642,
14512,
657,
290,
997,
4064,
767,
14512,
6... | 2.4 | 90 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Graz University of Technology.
#
# invenio-records-lom is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Provider for LOM PID-fields."""
from invenio_drafts_resources.records.api import ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
33448,
402,
3247,
2059,
286,
8987,
13,
198,
2,
198,
2,
287,
574,
952,
12,
8344,
3669,
12,
75,
296,
318,
1479,
3788,
26,
345,
460,
1... | 3.12782 | 133 |
# -*- coding: utf-8 -*-
# Part of Ygen. See LICENSE file for full copyright and licensing details.
{
'name': 'Discord - Base module for discord',
'summary': """
This module is a base module to provide foudation for building discord modules for Odoo.""",
'description': """
This module is a b... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2142,
286,
575,
5235,
13,
4091,
38559,
24290,
2393,
329,
1336,
6634,
290,
15665,
3307,
13,
198,
198,
90,
198,
220,
220,
220,
705,
3672,
10354,
705,
15642,
585,
532,... | 2.29065 | 492 |
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user
import os
basePath = os.path.abspath(os.path.dirname(__file__))
template_dir = os.path.join(basePath, 'templates')... | [
6738,
42903,
1330,
46947,
220,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
42903,
62,
18769,
26418,
1330,
18892,
26418,
198,
6738,
42903,
62,
38235,
1330,
23093,
13511,
11,
11787,
35608,
259,
11,
17594,
6... | 2.852459 | 244 |
x = int(input())
for i in range(12):
if (i+x) % 2 ==1:
print(i+x)
| [
87,
796,
493,
7,
15414,
28955,
198,
1640,
1312,
287,
2837,
7,
1065,
2599,
198,
220,
220,
220,
611,
357,
72,
10,
87,
8,
4064,
362,
6624,
16,
25,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
72,
10,
87,
8,
198
] | 1.772727 | 44 |
from ..constants import JSON_PROP_TYPE
from .base_blueprint import BaseProcedureBlueprint
from ..steps import placeholders
from ..reagents import Reagent
DEFAULT_VESSEL: str = 'reactor'
DEFAULT_SEPARATION_VESSEL: str = 'separator'
DEFAULT_EVAPORATION_VESSEL: str = 'rotavap'
converters = {
'addition1': chasm2_add... | [
6738,
11485,
9979,
1187,
1330,
19449,
62,
4805,
3185,
62,
25216,
198,
6738,
764,
8692,
62,
17585,
4798,
1330,
7308,
2964,
771,
495,
14573,
4798,
198,
6738,
11485,
20214,
1330,
1295,
10476,
198,
6738,
11485,
260,
49638,
1330,
797,
25781,
... | 2.407692 | 390 |
from future.utils import iteritems
from pandaharvester.harvestercore import core_utils
| [
6738,
2003,
13,
26791,
1330,
11629,
23814,
198,
6738,
19798,
37325,
1158,
353,
13,
9869,
1158,
353,
7295,
1330,
4755,
62,
26791,
628
] | 3.826087 | 23 |
"""
Filtering of MEG data
Created on 13.9.2017
@author: Anja Thiede <anja.thiede@helsinki.fi>
"""
import os
from os import walk
import datetime
import numpy as np
import mne
now = datetime.datetime.now()
# set up data paths
root_path = ('/media/cbru/SMEDY_SOURCES/DATA/MEG_prepro/')
f = []
for (dirpath, dirnames, f... | [
37811,
198,
11928,
20212,
286,
337,
7156,
1366,
198,
198,
41972,
319,
1511,
13,
24,
13,
5539,
198,
31,
9800,
25,
1052,
6592,
536,
798,
68,
1279,
272,
6592,
13,
400,
798,
68,
31,
2978,
82,
38799,
13,
12463,
29,
198,
37811,
198,
198... | 2.131062 | 763 |
x = int(input())
if (-15 < x <= 12) or (14 < x < 17) or x >= 19:
print("True")
else:
print("False")
| [
87,
796,
493,
7,
15414,
28955,
198,
361,
13841,
1314,
1279,
2124,
19841,
1105,
8,
393,
357,
1415,
1279,
2124,
1279,
1596,
8,
393,
2124,
18189,
678,
25,
198,
220,
220,
220,
3601,
7203,
17821,
4943,
198,
17772,
25,
198,
220,
220,
220,... | 2.25 | 48 |
#
# Copyright 202021, by the California Institute of Technology. ALL RIGHTS
# RESERVED. United States Government Sponsorship acknowledged. Any commercial
# use must be negotiated with the Office of Technology Transfer at the
# California Institute of Technology.
#
"""
===============
doi_database.py
==============... | [
2,
198,
2,
220,
15069,
12131,
2481,
11,
416,
262,
3442,
5136,
286,
8987,
13,
220,
11096,
371,
34874,
198,
2,
220,
15731,
1137,
53,
1961,
13,
1578,
1829,
5070,
18972,
11094,
10810,
13,
4377,
5068,
198,
2,
220,
779,
1276,
307,
22368,
... | 3.684 | 250 |
# -*- coding: utf-8 -*-
# pylint: disable=E1101
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPNotFound
from amnesia.modules.tag import Tag
from amnesia.modules.search import SearchResource
def includeme(config):
''' Pyramid includeme func'''
config.scan(__name__)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
279,
2645,
600,
25,
15560,
28,
36,
1157,
486,
198,
198,
6738,
27944,
13,
1177,
1330,
1570,
62,
11250,
198,
6738,
27944,
13,
2804,
24900,
11755,
1330,
14626,
36... | 3.029412 | 102 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 27 00:17:55 2020
@author: mehrdad
"""
import json
import numpy as np
import pandas as pd
import time
import math
#import blist
import tslib.mining
import tslib.common
import tslib.trip_detection
import tslib.trip
STORE_RESULTS = False
#output_fol... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
26223,
3158,
2681,
3571,
25,
1558,
25,
2816,
12131,
198,
198,
31,
9800,
25,
502,
71,
4372... | 2.782468 | 308 |
from abc import ABC, abstractmethod
import gym
import matplotlib.pyplot as plt
import numpy as np
from pathlib import Path
import time
from setcpp import SmoothnessDPL1Cost, SmoothnessDPPairGridCost, SmoothnessGreedy
import tqdm
from typing import Optional, Tuple, NoReturn
from data.synthia import Frame, append_xyz_to... | [
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
11748,
11550,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
640,
198,
6738,
900,
20322... | 2.580128 | 5,485 |
# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
2,
15069,
33448,
383,
23097,
39054,
46665,
198,
2,
198,
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,
... | 3.687657 | 397 |
import numpy as np
import superfast
| [
11748,
299,
32152,
355,
45941,
198,
11748,
2208,
7217,
198
] | 3.6 | 10 |
from __future__ import absolute_import, division, print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
def compute_depth_errors(gt, pred):
thresh = torch.max((gt / pred), (pred / gt))
a1 = (thresh < 1.25 ).float().mean()
a2 = (thresh < 1.25 ** 2).float().mean()
... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628,
628,
628,
628,
198,
198,
4299,
... | 2.311644 | 292 |
import numpy as np
from plato.core import as_floatx, create_shared_variable, symbolic, add_update
from theano import tensor as tt
| [
11748,
299,
32152,
355,
45941,
198,
6738,
458,
5549,
13,
7295,
1330,
355,
62,
22468,
87,
11,
2251,
62,
28710,
62,
45286,
11,
18975,
11,
751,
62,
19119,
198,
6738,
262,
5733,
1330,
11192,
273,
355,
256,
83,
628
] | 3.358974 | 39 |
import logging
from cart import Cart
from django.conf import settings
from django.contrib.sites.models import get_current_site
from django.utils import translation
from mailtemplates.models import EMailTemplate
from payment.models import PrePayment
from payment.services.paypal import paypal
from shop.checkout_wizard im... | [
11748,
18931,
198,
6738,
6383,
1330,
13690,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
49315,
13,
27530,
1330,
651,
62,
14421,
62,
15654,
198,
6738,
42625,
14208,
13,
26791,
1330,
11059,
... | 3.506494 | 231 |
"""Clean API"""
import logging
from pathlib import Path
from . import readers
log = logging.getLogger(__name__)
def kinetic_model(src, dst=None, params=None, model='srtmb_basis', input_interp_method='linear',
w=None, r1=1, k2p=0.000250, beta_lim=None, n_beta=40, linear_phase_start=500,
... | [
37811,
32657,
7824,
37811,
198,
11748,
18931,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
764,
1330,
7183,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
4299,
37892,
62,
19849,
7,
10677,
11... | 2.239014 | 1,866 |
"""Raw CLI commands."""
from typing import IO
import click
from ..._templates import artifact_builder, replication_listener, source_region_core
from ..._util.workers_zip import build_and_write_workers
from .add import add_to_deployment
from .init import init_project
_TEMPLATES = {"builder": artifact_builder, "listen... | [
37811,
27369,
43749,
9729,
526,
15931,
198,
6738,
19720,
1330,
24418,
198,
198,
11748,
3904,
198,
198,
6738,
2644,
62,
11498,
17041,
1330,
24127,
62,
38272,
11,
30330,
62,
4868,
877,
11,
2723,
62,
36996,
62,
7295,
198,
6738,
2644,
62,
... | 3.216783 | 143 |
_base_ = './optimizer.py'
optimizer = dict(
type='Adam',
lr=0.003
)
| [
62,
8692,
62,
796,
705,
19571,
40085,
7509,
13,
9078,
6,
198,
198,
40085,
7509,
796,
8633,
7,
198,
220,
220,
220,
2099,
11639,
23159,
3256,
198,
220,
220,
220,
300,
81,
28,
15,
13,
11245,
198,
8,
198
] | 1.974359 | 39 |
from IPython.display import display
from IPython.display import HTML
import IPython.core.display as di
# This line will hide code by default when the notebook is exported as HTML
di.display_html('<script>jQuery(function() {if (jQuery("body.notebook_app").length == 0) { jQuery(".input_area").toggle(); jQuery(".promp... | [
6738,
6101,
7535,
13,
13812,
1330,
3359,
198,
6738,
6101,
7535,
13,
13812,
1330,
11532,
198,
11748,
6101,
7535,
13,
7295,
13,
13812,
355,
2566,
220,
628,
198,
198,
2,
770,
1627,
481,
7808,
2438,
416,
4277,
618,
262,
20922,
318,
29050,... | 2.330225 | 2,574 |
from dataclasses import dataclass
from typing import Dict
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
360,
713,
628
] | 3.933333 | 15 |
#!/usr/bin/python
# vim:set et sw=4:
#
# Originally from:
# http://cvs.fedoraproject.org/viewvc/F-13/ca-certificates/certdata2pem.py?revision=1.1&content-type=text%2Fplain&view=co
#
# certdata2pem.py - converts certdata.txt into PEM format.
#
# Copyright (C) 2009 Philipp Kern <pkern@debian.org>
#
# This program is fre... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
43907,
25,
2617,
2123,
1509,
28,
19,
25,
198,
2,
198,
2,
19486,
422,
25,
198,
2,
2638,
1378,
66,
14259,
13,
19082,
273,
499,
305,
752,
13,
2398,
14,
1177,
28435,
14,
37,
12,
1485,
... | 2.459269 | 1,559 |
timestamp = "02-03-2022 13:12:15 on flin (by mightqxc)"
| [
16514,
27823,
796,
366,
2999,
12,
3070,
12,
1238,
1828,
1511,
25,
1065,
25,
1314,
319,
781,
259,
357,
1525,
1244,
80,
25306,
16725,
198
] | 2.24 | 25 |
import json
import os
def read_config_file(filename):
"""
Loads and returns a configuration from the supplied filename / path.
Parameters
----------
filename: string
The name/path of the config file to load.
Returns
----------
config: object
The resulting configura... | [
11748,
33918,
198,
11748,
28686,
198,
198,
4299,
1100,
62,
11250,
62,
7753,
7,
34345,
2599,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
8778,
82,
290,
5860,
257,
8398,
422,
262,
14275,
29472,
1220,
3108,
13,
198,
220,
220,
220,
2... | 2.645283 | 265 |
# ------------------------------
# 26. Remove Duplicates from Sorted Array
#
# Description:
# Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
# Do not allocate extra space for another array, you must do this in place with constant memory.
#
# For... | [
2,
34400,
26171,
198,
2,
2608,
13,
17220,
49821,
16856,
422,
311,
9741,
15690,
198,
2,
220,
198,
2,
12489,
25,
198,
2,
11259,
257,
23243,
7177,
11,
4781,
262,
14184,
16856,
287,
1295,
884,
326,
1123,
5002,
1656,
691,
1752,
290,
1441... | 3.643045 | 381 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Troels Agergaard Jacobsen
__version__ = '0.2.0'
__description__ = 'Command line utility to backup Evernote notes and notebooks.'
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
1584,
8498,
1424,
317,
1362,
36232,
12806,
6248,
198,
834,
9641,
834,
796,
705,
15,
13,
1... | 2.897059 | 68 |
"""Plot clustered spikes
Usage:
python ncpsort.cluster_synthetic_data.inference_plot_synthetic \
--inference_dir ./inference_synthetic_N-1000/cluster_S-150-beam_NCP-10000 \
--min_cls_size 50 --plot_type overlay
or --inference_dir --min_cls_size 50 --plot_type tsne
"""
import numpy as np
imp... | [
220,
198,
37811,
43328,
49480,
27198,
198,
28350,
25,
198,
220,
220,
220,
21015,
299,
66,
862,
419,
13,
565,
5819,
62,
1837,
429,
6587,
62,
7890,
13,
259,
4288,
62,
29487,
62,
1837,
429,
6587,
3467,
198,
220,
220,
220,
220,
220,
2... | 2.031559 | 3,137 |