content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import json
import os
import re
import shutil
import uuid
from dataclasses import dataclass, field
from typing import Callable, Optional, Set, List, Dict
import blobfile as bf
import numpy as np
import torch
from mpi4py import MPI
import summarize_from_feedback
from summarize_from_feedback.model_layout import ModelLa... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
4423,
346,
198,
11748,
334,
27112,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
19720,
1330,
4889,
540,
11,
32233,
11,
5345,
11,
7343,
11,
360,
... | 2.256973 | 6,561 |
print("123","10")
| [
201,
198,
4798,
7203,
10163,
2430,
940,
4943,
201,
198
] | 2.1 | 10 |
import argparse
import os
import os.path as osp
import pickle
import re
from collections import OrderedDict
from datetime import datetime
from pathlib import Path
from modelindex.load_model_index import load
from rich.console import Console
from rich.syntax import Syntax
from rich.table import Table
console = Console... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
11748,
2298,
293,
198,
11748,
302,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3108,
8019,
13... | 3.023392 | 171 |
#!/usr/bin/python
#"fserve" by Karim Sultan, September 2020
# fsend is a server (receiver) for the FBomb Protocol
# It communicates with a client (fsend) to transfer a file.
# This protocol makes it easy to drop f-bombs across machines.
#
# This design handles a single connection at a time but accepts
# backlogs. It i... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
2,
1,
69,
2655,
303,
1,
416,
9375,
320,
37399,
11,
2693,
12131,
198,
2,
277,
21280,
318,
257,
4382,
357,
260,
39729,
8,
329,
262,
13186,
2381,
20497,
198,
2,
632,
48556,
351,
257,
... | 2.89114 | 3,307 |
#!/usr/bin/python
import sys
import os
import logging
log = logging.getLogger( __name__ )
logging.basicConfig()
import hdbfs
import higu.config
MAX_TEXT_LEN = 2**18
if( __name__ == '__main__' ):
import optparse
parser = optparse.OptionParser( usage = 'Usage: %prog [options] files...' )
parser.add_op... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
11748,
18931,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
11593,
3672,
834,
1267,
198,
6404,
2667,
13,
35487,
16934,
3419,
198,
198,
11748,
... | 2.247295 | 1,294 |
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4
import hashlib
import hmac
import os
import sys
import unittest
import datahog
from datahog import error
import psycopg2
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import base
from pgmock import *
if __name__ == '__main__':
unittest.main()
| [
2,
43907,
25,
2393,
12685,
7656,
28,
40477,
23,
25,
316,
25,
2032,
28,
19,
25,
912,
28,
23,
25,
6448,
28,
19,
198,
198,
11748,
12234,
8019,
198,
11748,
289,
20285,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
395,
1... | 2.516129 | 124 |
#
#
# Jesse Livezey 2014-04-19
#
import numpy as np
#Initialize settings for inference
def infer(basis, stimuli, eta, lamb, nIter, adapt, coeffs=None, softThresh=0):
"""Infers sparse coefficients for dictionary elements when representing a stimulus using LCA algorithm.
Args:
basis: Dictionar... | [
2,
198,
2,
198,
2,
18033,
7547,
2736,
88,
1946,
12,
3023,
12,
1129,
198,
2,
628,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
24243,
1096,
6460,
329,
32278,
198,
4299,
13249,
7,
12093,
271,
11,
25973,
11,
2123,
64,
11,
19343,
... | 2.327957 | 1,302 |
"""
OpenVINO DL Workbench
Class for ORM model described a Environment
Copyright (c) 2021 Intel Corporation
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... | [
37811,
198,
4946,
53,
46016,
23641,
5521,
26968,
198,
5016,
329,
6375,
44,
2746,
3417,
257,
9344,
628,
15069,
357,
66,
8,
33448,
8180,
10501,
628,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
19... | 3.973333 | 225 |
import os
import glob
import subprocess
import re
if __name__ == "__main__":
glob_remove("_test/*_mifs.*")
for file in glob.glob("_test/*"):
glob_remove("_test/*_mifs.*")
output = run(f'py mifs.py "{file}"')
filename, extension = os.path.splitext(os.path.basename(file))
output_file = glob.glob(f'_test/*_... | [
11748,
28686,
198,
11748,
15095,
198,
11748,
850,
14681,
198,
11748,
302,
198,
197,
197,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
197,
4743,
672,
62,
28956,
7203,
62,
9288,
15211,
62,
76,
361,
82,
15885,
4943... | 2.301075 | 279 |
"""Firebase token authentication classes"""
from typing import *
from django.contrib import auth
from django.utils import timezone
from rest_framework import authentication, exceptions
import firebase_admin
from firebase_admin import auth as firebase_auth
from .settings import api_settings
from . import models
FIRE... | [
37811,
13543,
8692,
11241,
18239,
6097,
37811,
198,
198,
6738,
19720,
1330,
1635,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6284,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
1334,
62,
30604,
1330,
18239,
11,
13269... | 2.148922 | 3,062 |
from pathlib import Path
from astropy.io import fits
import numpy as np
from PIL import Image
def load_hdf(file_name):
'''load HDF image
Parameters
----------
full file name of HDF5 file
'''
hdf = h5py.File(path,'r')['entry']['data']['data'].value
tmp = []
for iScan in hdf:
... | [
6738,
3108,
8019,
1330,
10644,
198,
6738,
6468,
28338,
13,
952,
1330,
11414,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
4299,
3440,
62,
71,
7568,
7,
7753,
62,
3672,
2599,
198,
220,
220,
220,
705,
... | 2.187023 | 524 |
import warnings
import pandas as pd
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import seaborn as sns
from xgboost import XGBClassifier
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.impute import KNNImputer, SimpleImpu... | [
198,
11748,
14601,
198,
198,
11748,
19798,
292,
355,
279,
67,
220,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
9756,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
220,
198,
11748,
384,
397,
1211,... | 2.23266 | 2,278 |
import interface
import arquivo
import classes
from time import sleep
#Ler os Arquivos txt.
arquivo.carregarArqEst()
arquivo.carregarArqCid()
#Funcoes
#Menu
while True:
resposta = interface.menu(['Finalizar o Programa', 'Cadastrar Estados', 'Cadastrar Cidades', 'Relatório de Estados', 'Rela... | [
11748,
7071,
201,
198,
11748,
610,
421,
23593,
201,
198,
11748,
6097,
201,
198,
6738,
640,
1330,
3993,
201,
198,
220,
201,
198,
2,
43,
263,
28686,
943,
421,
452,
418,
256,
742,
13,
201,
198,
283,
421,
23593,
13,
7718,
2301,
283,
3... | 1.98627 | 437 |
# A3.b1
import numpy as np
import matplotlib.pyplot as plt
n = 30
# np.random.seed(1)
x = np.random.uniform(0,1,n)
x_mean = np.mean(x)
x_sd = np.std(x)
# x = (x-x_mean) # x after standardization
y = 4*np.sin(np.pi*x)*np.cos(6*np.pi*(x**2)) + np.random.standard_normal(n)
# y = (y - x_mean) / x_sd
error_validation_li... | [
2,
317,
18,
13,
65,
16,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
77,
796,
1542,
198,
2,
45941,
13,
25120,
13,
28826,
7,
16,
8,
198,
87,
796,
45941,
13,
25120,
13... | 2.160657 | 3,772 |
#!/usr/bin/env python
#
# Make software environment from a yml database.
#
import getopt
import yaml
import sys
import shlex
def get_entry(spec=None, distrib=None, distrib_version=None, pkg=None,
section=None):
"""
Get one entry with precedence distrib with version > distrib >
match d... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
198,
2,
6889,
3788,
2858,
422,
257,
331,
4029,
6831,
13,
198,
2,
198,
198,
11748,
651,
8738,
198,
11748,
331,
43695,
198,
11748,
25064,
198,
11748,
427,
2588,
628,
628,
628,
... | 2.015248 | 3,148 |
# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | [
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... | 3.344828 | 116 |
import random
from pygamescratch.pygs import *
| [
11748,
4738,
198,
198,
6738,
12972,
19966,
6098,
963,
13,
9078,
14542,
1330,
1635,
628
] | 3.266667 | 15 |
"""The class for managing more environment
The class requires the follow properties:
'id' (str): the suffix name of resource created
'ec2_params' (dict): the dictionary of the EC2 custom parameters
'lambda_params' (dict): the dictionary of the Lambda custom parameters
All properties are mandatory. See the... | [
37811,
464,
1398,
329,
11149,
517,
2858,
198,
198,
464,
1398,
4433,
262,
1061,
6608,
25,
198,
220,
220,
220,
705,
312,
6,
357,
2536,
2599,
262,
35488,
1438,
286,
8271,
2727,
198,
220,
220,
220,
705,
721,
17,
62,
37266,
6,
357,
116... | 3.274194 | 186 |
import os
import glob
import shutil
import re
import json
from traitlets import Bool
from .baseapp import TransferApp, transfer_aliases, transfer_flags
aliases = {}
aliases.update(transfer_aliases)
aliases.update({
})
flags = {}
flags.update(transfer_flags)
flags.update({
'inbound': (
{'ListApp' : {'in... | [
11748,
28686,
198,
11748,
15095,
198,
11748,
4423,
346,
198,
11748,
302,
198,
11748,
33918,
198,
198,
6738,
1291,
2578,
912,
1330,
347,
970,
198,
198,
6738,
764,
8692,
1324,
1330,
20558,
4677,
11,
4351,
62,
7344,
1386,
11,
4351,
62,
3... | 2.446667 | 300 |
import socket
import re
import yaml
from time import sleep
config = yaml.safe_load(open('config.yml', 'rb'))
HOST = config['HOST']
PORT = config['PORT']
NICK = config['NICK']
PASS = config['PASS']
class Bot(object):
""""""
| [
11748,
17802,
198,
11748,
302,
198,
11748,
331,
43695,
198,
198,
6738,
640,
1330,
3993,
628,
198,
11250,
796,
331,
43695,
13,
21230,
62,
2220,
7,
9654,
10786,
11250,
13,
88,
4029,
3256,
705,
26145,
6,
4008,
198,
39,
10892,
796,
4566,
... | 2.761905 | 84 |
from setuptools import setup, find_packages
from runfolder import __version__
import os
setup(
name='runfolder',
version=__version__,
description="Microservice for managing runfolders",
long_description=read_file('README.md'),
keywords='bioinformatics',
author='SNP&SEQ Technology Platform, Upps... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
1057,
43551,
1330,
11593,
9641,
834,
198,
11748,
28686,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
5143,
43551,
3256,
198,
220,
220,
220,
2196,
28,
834,
96... | 2.888235 | 170 |
from django_jekyll.lib.configparse import config | [
6738,
42625,
14208,
62,
73,
988,
25727,
13,
8019,
13,
11250,
29572,
1330,
4566
] | 3.428571 | 14 |
from flask import redirect, url_for, request, session
from flask_admin import Admin, AdminIndexView, expose
from flask_admin.contrib import sqla
from flask_login import current_user
from .auth import current_user_is_roadie
from .db import postgres
from .account.models import OAuth
from .members.models import User, Ema... | [
6738,
42903,
1330,
18941,
11,
19016,
62,
1640,
11,
2581,
11,
6246,
198,
6738,
42903,
62,
28482,
1330,
32053,
11,
32053,
15732,
7680,
11,
15651,
198,
6738,
42903,
62,
28482,
13,
3642,
822,
1330,
19862,
5031,
198,
6738,
42903,
62,
38235,
... | 3.427481 | 131 |
try:
6/0
except Exception as e:
print "%s" % e
raise e
print "Despues"
| [
28311,
25,
198,
220,
220,
220,
718,
14,
15,
198,
16341,
35528,
355,
304,
25,
198,
220,
220,
220,
3601,
36521,
82,
1,
4064,
304,
198,
220,
220,
220,
5298,
304,
198,
198,
4798,
366,
5960,
79,
947,
1,
198
] | 2.1 | 40 |
# -*- coding: utf-8 -*-
import socket
import platform
import getpass
import psutil | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
17802,
198,
11748,
3859,
198,
11748,
651,
6603,
198,
11748,
26692,
22602
] | 2.964286 | 28 |
from aca.client import ACAClient
| [
6738,
936,
64,
13,
16366,
1330,
7125,
2246,
75,
1153,
628
] | 3.090909 | 11 |
if __name__ == "__main__":
import sys
sys.path.insert(0, "..")
sys.path.insert(0, "../..")
import unittest
from hamcrest.core.core.allof import *
from hamcrest.core.core.isequal import equal_to
from hamcrest_unit_test.matcher_test import MatcherTest
__author__ = "Jon Reid"
__copyright__ = "Copyright 201... | [
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1330,
25064,
628,
220,
220,
220,
25064,
13,
6978,
13,
28463,
7,
15,
11,
366,
492,
4943,
198,
220,
220,
220,
25064,
13,
6978,
13,
28463,
7,
15,
11,
366,
... | 2.579268 | 164 |
#!/usr/bin/env python
# Copyright 2016 The Dart project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import shutil
import subprocess
import sys
import time
import utils
HOST_OS = utils.GuessOS()
HOST_ARCH ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
1584,
383,
29032,
1628,
7035,
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,
... | 1.890464 | 3,104 |
from pathlib import Path
from typing import Dict, List, Optional, Set
| [
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
11,
5345,
628
] | 3.944444 | 18 |
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from app import app
column1 = dbc.Col(
[
dcc.Markdown(
"""
## Process
This web ap... | [
11748,
14470,
198,
11748,
14470,
62,
18769,
26418,
62,
5589,
3906,
355,
288,
15630,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
198,
6738,
14470,
13,
45841,
3976,
... | 3.112691 | 914 |
import math
import logging
from datetime import date
nTypes = {0: "Nordic Event",
1: "Nordic Main Header",
2: "Nordic Macroseismic Header",
3: "Nordic Comment Header",
5: "Nordic Error Header",
6: "Nordic Waveform Header",
8: "Nordic Phase Data"}
| [
11748,
10688,
198,
11748,
18931,
198,
6738,
4818,
8079,
1330,
3128,
198,
198,
77,
31431,
796,
1391,
15,
25,
366,
45,
585,
291,
8558,
1600,
198,
197,
197,
16,
25,
366,
45,
585,
291,
8774,
48900,
1600,
198,
197,
197,
17,
25,
366,
45... | 2.543689 | 103 |
import glob
import os
import shutil
from conans import ConanFile
from conans.model import Generator
| [
11748,
15095,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
198,
6738,
369,
504,
1330,
31634,
8979,
198,
6738,
369,
504,
13,
19849,
1330,
35986,
628,
628,
628,
628
] | 3.724138 | 29 |
from twitter.common import app
from kazoo.client import KazooClient
from twitter.common.zookeeper.group.kazoo_group import KazooGroup
app.main()
| [
6738,
17044,
13,
11321,
1330,
598,
198,
198,
6738,
479,
1031,
2238,
13,
16366,
1330,
16385,
2238,
11792,
198,
6738,
17044,
13,
11321,
13,
10872,
2088,
5723,
13,
8094,
13,
74,
1031,
2238,
62,
8094,
1330,
16385,
2238,
13247,
628,
198,
1... | 3.170213 | 47 |
from __future__ import print_function
import boto3
import json
import CloudCanvas
import service
from cgf_utils import aws_utils
from cgf_utils import custom_resource_utils
# import errors
#
# raise errors.ClientError(message) - results in HTTP 400 response with message
# raise errors.ForbiddenRequestError(message)... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
275,
2069,
18,
198,
11748,
33918,
198,
198,
11748,
10130,
6090,
11017,
198,
11748,
2139,
198,
198,
6738,
269,
70,
69,
62,
26791,
1330,
3253,
82,
62,
26791,
198,
6738,
269... | 3.534884 | 215 |
import prometheus.tftpd
'''
prime the device with:
nc64 -c 192.168.4.1 9195
connect ssid:password
to run:
set PYTHONPATH=p:\lanot\src\core
'''
files = [
'main.py',
'test02.py'
]
prometheus.tftpd.tftp_client('10.20.2.116', *files)
| [
11748,
1552,
36916,
13,
83,
701,
30094,
198,
198,
7061,
6,
198,
35505,
262,
3335,
351,
25,
198,
10782,
2414,
532,
66,
17817,
13,
14656,
13,
19,
13,
16,
860,
22186,
198,
8443,
264,
30255,
25,
28712,
198,
198,
1462,
1057,
25,
198,
2... | 2.132743 | 113 |
import os
import shutil
import tempfile
import unittest
from unittest import mock
from dataverk.connectors import NaisS3Connector, GoogleStorageConnector
from dataverk.connectors.storage import storage_connector_factory
from dataverk.connectors.storage.file_storage import FileStorageConnector
from dataverk.connectors.... | [
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
20218,
7753,
198,
11748,
555,
715,
395,
198,
198,
6738,
555,
715,
395,
1330,
15290,
198,
6738,
1366,
332,
74,
13,
8443,
669,
1330,
11013,
271,
50,
18,
34525,
11,
3012,
31425,
34525,
198... | 3.522727 | 176 |
#Visuafy a Spotify visualiser by Aryan Bhajanka
from os import name
from flask import Flask, request, url_for, session, redirect, render_template
from flask.helpers import get_template_attribute
import spotipy
from spotipy.exceptions import SpotifyException
from spotipy.oauth2 import SpotifyOAuth, SpotifyOauthE... | [
2,
15854,
84,
1878,
88,
257,
26778,
5874,
5847,
416,
317,
29038,
16581,
1228,
15927,
201,
198,
201,
198,
6738,
28686,
1330,
1438,
201,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
19016,
62,
1640,
11,
6246,
11,
18941,
11,
8543,
62,
... | 2.427293 | 447 |
# Generated by Django 2.0.9 on 2018-10-31 09:05
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
24,
319,
2864,
12,
940,
12,
3132,
7769,
25,
2713,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
'''
Settings
========
Methods described in this section relate to the the Settings API.
These methods can be accessed at ``Nessus.settings``.
.. rst-class:: hide-signature
.. autoclass:: SettingsAPI
:members:
'''
from typing import List, Dict, Optional
from typing_extensions import Literal
from restfly.utils impo... | [
7061,
6,
198,
26232,
198,
2559,
198,
198,
46202,
3417,
287,
428,
2665,
15124,
284,
262,
262,
16163,
7824,
13,
198,
4711,
5050,
460,
307,
17535,
379,
7559,
45,
408,
385,
13,
33692,
15506,
13,
198,
198,
492,
374,
301,
12,
4871,
3712,
... | 3.575 | 120 |
#!/usr/bin/env python3
import boto3,json,os,urllib3
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
275,
2069,
18,
11,
17752,
11,
418,
11,
333,
297,
571,
18,
198
] | 2.12 | 25 |
__author__ = 'nightfade'
from example.echo_service_pb2 import IEchoService, IEchoClient_Stub
import logger
| [
834,
9800,
834,
796,
705,
3847,
69,
671,
6,
198,
198,
6738,
1672,
13,
30328,
62,
15271,
62,
40842,
17,
1330,
28157,
6679,
16177,
11,
28157,
6679,
11792,
62,
1273,
549,
198,
11748,
49706,
628
] | 3.114286 | 35 |
# Generated by Django 2.2.13 on 2021-07-22 14:49
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1485,
319,
33448,
12,
2998,
12,
1828,
1478,
25,
2920,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321... | 2.852941 | 612 |
import os
import json
import time
import subprocess
import contextlib
import dateutil.parser
import datetime
import logging
from tempfile import TemporaryDirectory
# See https://github.com/containers/podman/issues/10173
CGROUP_WORKAROUND = False
RUNTIME = "crun"
def invokePodmanCommandPoll(command, output):
"""
... | [
11748,
28686,
198,
11748,
33918,
198,
11748,
640,
198,
11748,
850,
14681,
198,
11748,
4732,
8019,
198,
11748,
3128,
22602,
13,
48610,
198,
11748,
4818,
8079,
198,
11748,
18931,
198,
6738,
20218,
7753,
1330,
46042,
43055,
198,
198,
2,
4091... | 2.3372 | 2,414 |
import sys, time, os
| [
11748,
25064,
11,
640,
11,
28686,
198
] | 3 | 7 |
########## Script 2: Different Costs ###################
import sys
from RK_IO_model import RK_IO_methods
from Generalized_RK_Framework import generalized_RK_framework
import pdb #for debugging
import numpy as np
import pyomo.environ as pyo
from pyomo.opt import SolverFactory
from pyomo.opt imp... | [
7804,
2235,
12327,
362,
25,
20615,
36845,
1303,
14468,
2235,
198,
198,
11748,
25064,
198,
198,
6738,
371,
42,
62,
9399,
62,
19849,
1330,
371,
42,
62,
9399,
62,
24396,
82,
198,
6738,
3611,
1143,
62,
49,
42,
62,
21055,
6433,
1330,
382... | 3.078481 | 395 |
import pygame
from pygame.font import Font
from sprites import Sprite
from utils.types import Color, WindowSize, SpritePosition
| [
11748,
12972,
6057,
201,
198,
6738,
12972,
6057,
13,
10331,
1330,
24060,
201,
198,
6738,
42866,
1330,
33132,
201,
198,
6738,
3384,
4487,
13,
19199,
1330,
5315,
11,
26580,
10699,
11,
33132,
26545,
201,
198
] | 3.771429 | 35 |
from scene_manager import SceneManager
| [
6738,
3715,
62,
37153,
1330,
28315,
13511,
198
] | 4.875 | 8 |
import json
import os
import socket
import sys
if len(sys.argv) != 2:
print("Usage: python bn_rpyc.py <script>")
exit(1)
script = sys.argv[1]
if os.path.exists(script):
script = os.path.abspath(script)
else:
print("Can't find: %s" % script)
exit(1)
py3 = sys.version_info[0] >= 3
if not py3:
i... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
17802,
198,
11748,
25064,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
14512,
362,
25,
198,
220,
220,
220,
3601,
7203,
28350,
25,
21015,
275,
77,
62,
81,
9078,
66,
13,
9078,
1279,
1204... | 2.014363 | 557 |
# ASGI server using starlette & uvicorn
from starlette.applications import Starlette
from starlette.responses import FileResponse
from starlette.middleware import Middleware
from starlette.middleware.gzip import GZipMiddleware
from starlette.staticfiles import StaticFiles
from os import path, getenv
from uvicorn import... | [
2,
7054,
18878,
4382,
1262,
3491,
21348,
1222,
334,
25531,
1211,
198,
6738,
3491,
21348,
13,
1324,
677,
602,
1330,
2907,
21348,
198,
6738,
3491,
21348,
13,
16733,
274,
1330,
9220,
31077,
198,
6738,
3491,
21348,
13,
27171,
1574,
1330,
60... | 3.07265 | 234 |
#!/usr/bin/env python
""" Contains standard io reading & writing code
See the file "LICENSE" for the full license governing this code.
Copyright 2017 Ken Farmer
"""
import os
import sys
import csv
import io
import random
import errno
from os.path import isfile
from pprint import pprint
from typing import Union... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
49850,
3210,
33245,
3555,
1222,
3597,
2438,
628,
220,
220,
220,
4091,
262,
2393,
366,
43,
2149,
24290,
1,
329,
262,
1336,
5964,
15030,
428,
2438,
13,
198,
220,
220,
220,
15069,
... | 2.547431 | 506 |
from graphene import relay, AbstractType, String
from graphene_django import DjangoObjectType
from graphene_django.filter import DjangoFilterConnectionField
from .models import Calendar, Day
class CalendarNode(DjangoObjectType):
"""
how does this work?
"""
class CalendarQuery(AbstractType):
"""
... | [
6738,
42463,
1330,
24248,
11,
27741,
6030,
11,
10903,
198,
6738,
42463,
62,
28241,
14208,
1330,
37770,
10267,
6030,
198,
6738,
42463,
62,
28241,
14208,
13,
24455,
1330,
37770,
22417,
32048,
15878,
198,
198,
6738,
764,
27530,
1330,
26506,
... | 2.627753 | 454 |
import random
import time
import re
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from unidecode import unidecode
from nordvpn_randomizer import logIn, chooseRandom, getCountries
# Used for some scientists in the list that have special characters in their names
translator = {'á': ('... | [
11748,
4738,
198,
11748,
640,
198,
11748,
302,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19390,
11,
19016,
9654,
198,
6738,
2956,
297,
571,
13,
18224,
1330,
14626,
12331,
198,
6738,
555,
485,
8189,
1330,
555,
485,
8189,
198,
6738,
2... | 1.976768 | 1,980 |
from functools import lru_cache
from typing import Tuple
import pygame
| [
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
11748,
12972,
6057,
628
] | 3.47619 | 21 |
import cv2
import os # handling directories
alg="haarcascade_frontalface_default.xml"# importing algorithm
har=cv2.CascadeClassifier(alg)# reading & storing the algorithm in a variable
cam=cv2.VideoCapture(0)
dataset="dataset"
name="sociallion"
path=os.path.join(dataset,name)
if not os.path.isdir(path):
os.makedirs... | [
11748,
269,
85,
17,
198,
11748,
28686,
1303,
9041,
29196,
198,
14016,
2625,
3099,
5605,
28966,
62,
8534,
1604,
558,
62,
12286,
13,
19875,
1,
2,
33332,
11862,
198,
9869,
28,
33967,
17,
13,
34,
28966,
9487,
7483,
7,
14016,
8,
2,
3555,... | 2.343137 | 510 |
from .libindy import do_call, create_cb
from typing import Optional
from ctypes import *
import logging
async def create_wallet(pool_name: str,
name: str,
xtype: Optional[str],
config: Optional[str],
credentials: str) ->... | [
6738,
764,
8019,
521,
88,
1330,
466,
62,
13345,
11,
2251,
62,
21101,
198,
198,
6738,
19720,
1330,
32233,
198,
6738,
269,
19199,
1330,
1635,
198,
198,
11748,
18931,
628,
198,
292,
13361,
825,
2251,
62,
44623,
7,
7742,
62,
3672,
25,
9... | 2.246581 | 2,340 |
# @ Copyright Inria, Ecole Polytechnique
# Shared under the MIT license https://opensource.org/licenses/mit-license.php
# This file contains all the functions that are used in the comparison/aggregation detection
# The main part of the code is the function find_aggregators, that will be used elsewhere in the code
# ... | [
2,
220,
2488,
15069,
554,
7496,
11,
38719,
293,
12280,
23873,
2350,
198,
2,
220,
39403,
739,
262,
17168,
5964,
3740,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
2781,
12,
43085,
13,
10121,
198,
198,
2,
770,
2393,
4909,
477,
262,... | 3.304046 | 865 |
from collections import namedtuple
Node = namedtuple('Node', 'url_name label parent context')
""" Represents a node or item in a navigation
url_name -- (string) The name of a named-urlpattern
label -- (string) The label to be used in the item
parent -- (string) the url_name of its parent or ''. Extra kwa... | [
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
19667,
796,
3706,
83,
29291,
10786,
19667,
3256,
705,
6371,
62,
3672,
6167,
2560,
4732,
11537,
198,
37811,
1432,
6629,
257,
10139,
393,
2378,
287,
257,
16408,
198,
6371,
62,
3672,
220,
220,
... | 2.805687 | 211 |
try:
import numpy as np
import pandas as pd
from skimage import morphology
from skimage.measure import regionprops
from skimage.measure import label
from scipy import ndimage
from skimage.graph import route_through_array
from scipy.ndimage import binary_closing, binary_hit_or_mis... | [
28311,
25,
201,
198,
220,
220,
220,
1330,
299,
32152,
355,
45941,
201,
198,
220,
220,
220,
1330,
19798,
292,
355,
279,
67,
201,
198,
220,
220,
220,
422,
1341,
9060,
1330,
46320,
201,
198,
220,
220,
220,
422,
1341,
9060,
13,
1326,
... | 2.311881 | 202 |
# has complex polygon as tile shape, and lots of moving objects
import turtle
import engine
import math
WIDTH = 640
HEIGHT = 480
S = 25 # base unit size for ship
B = 50 # base unit size for tiles
GRIDCOLS = 1 + math.ceil(WIDTH / B) + 1
GRIDROWS = 1 + math.ceil(HEIGHT / B) + 1
SPEED = 3
HEADINGSTEP = 5
hea... | [
2,
468,
3716,
7514,
14520,
355,
17763,
5485,
11,
290,
6041,
286,
3867,
5563,
198,
198,
11748,
28699,
198,
11748,
3113,
198,
11748,
10688,
198,
198,
54,
2389,
4221,
796,
33759,
198,
13909,
9947,
796,
23487,
198,
198,
50,
796,
1679,
197... | 2.929471 | 397 |
from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='To predict the values of wafer sensor',
author='Pavantelugura',
license='MIT',
)
| [
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
10677,
3256,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
22784,
198,
220,
220,
220,
2196,
11639,
15,
13,
16,
13,
15,... | 2.710843 | 83 |
import numpy as np
import tensorflow as tf
import tensorflow_addons as tfa
import PIL
import zernike as zk
try:
from cv2 import resize, INTER_AREA
except:
print('Problem importing opencv..')
def generate_SED_elems(SED, sim_psf_toolkit, n_bins=20):
r"""Generate the SED elements needed for using the TF_p... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
11192,
273,
11125,
62,
39996,
355,
256,
13331,
198,
11748,
350,
4146,
198,
11748,
1976,
1142,
522,
355,
1976,
74,
198,
28311,
25,
198,
220,
220,
220,
... | 2.272684 | 4,232 |
'''
Physical constants
'''
from scipy.constants import c, e, epsilon_0, physical_constants
C = c
ELEM_CHARGE = e
VACUUM_IMPEDANCE = 1.0/(c*epsilon_0)
ELECTRON_MASS_EV = physical_constants['electron mass energy equivalent in MeV'][0]*1e6
if __name__ == "__main__":
print("Speed of light (m... | [
7061,
6,
198,
220,
220,
220,
16331,
38491,
198,
7061,
6,
198,
6738,
629,
541,
88,
13,
9979,
1187,
1330,
269,
11,
304,
11,
304,
862,
33576,
62,
15,
11,
3518,
62,
9979,
1187,
198,
198,
34,
796,
269,
198,
36,
2538,
44,
62,
38019,
... | 1.990415 | 313 |
'''
# GET /companies/
- list all companies
# POST /companies/
- Create new company
# DELETE /companies/{company_id}
- Delete a company by company_id
# GET /companies/{company_id}
- Get list of ic in company
# GET /companies/{company_id}/ic/
- Get list of ic in company
# POST /companies/{company... | [
7061,
6,
198,
2,
17151,
1220,
34390,
444,
14,
198,
220,
220,
220,
532,
1351,
477,
2706,
198,
198,
2,
24582,
1220,
34390,
444,
14,
198,
220,
220,
220,
532,
13610,
649,
1664,
198,
198,
2,
5550,
2538,
9328,
1220,
34390,
444,
14,
90,
... | 2.585317 | 504 |
import os
import logging
from collections import OrderedDict
from typing import List, Dict
from transformers import BertTokenizer
from .serializer import Serializer
from .vocab import Vocab
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../")))
from utils import save_pkl, load_csv
... | [
11748,
28686,
198,
11748,
18931,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
198,
6738,
6121,
364,
1330,
22108,
30642,
7509,
198,
6738,
764,
46911,
7509,
1330,
23283,
7509,
198,
6738,
764,
1... | 2.699531 | 213 |
from typing import Callable, Dict, List
import pandas as pd
from pandarallel import pandarallel
def _apply_to_row(row: pd.Series, column: str, func: Callable) -> pd.Series:
""" Apply `func` to data in `column` of dataframe's `raw`. """
copy_row = row.copy()
copy_row[column] = func(copy_row[column])
... | [
6738,
19720,
1330,
4889,
540,
11,
360,
713,
11,
7343,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
19798,
283,
29363,
1330,
19798,
283,
29363,
628,
198,
4299,
4808,
39014,
62,
1462,
62,
808,
7,
808,
25,
279,
67,
13,
27996,
... | 2.631242 | 781 |
import math
from datetime import time, timedelta, datetime, date
from typing import List
def time_to_seconds(time_: time) -> int:
"""Return total seconds from time object."""
minutes = time_.hour * 60
seconds = (time_.minute + minutes) * 60
return seconds
def seconds_to_time(seconds: int) -> time:
... | [
11748,
10688,
198,
198,
6738,
4818,
8079,
1330,
640,
11,
28805,
12514,
11,
4818,
8079,
11,
3128,
198,
6738,
19720,
1330,
7343,
628,
198,
4299,
640,
62,
1462,
62,
43012,
7,
2435,
62,
25,
640,
8,
4613,
493,
25,
198,
220,
220,
220,
3... | 2.752089 | 359 |
import cv2
import numpy as np
cap = cv2.VideoCapture("images/Circle.mp4")
# 옵션 설명 http://layer0.authentise.com/segment-background-using-computer-vision.html
fgbg = cv2.createBackgroundSubtractorMOG2(history=500, varThreshold=500, detectShadows=0)
while(1):
ret, frame = cap.read()
fgmask = fgbg.apply(fram... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
628,
198,
198,
11128,
796,
269,
85,
17,
13,
10798,
49630,
7203,
17566,
14,
31560,
293,
13,
3149,
19,
4943,
198,
198,
2,
23821,
246,
113,
168,
227,
246,
23821,
226,
97,
167,
1... | 2.157025 | 484 |
# `$ python3 simple_ast.py --help` for more information
# MIT License
#
# Copyright (c) 2020 John Scott
#
# 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 with... | [
198,
2,
4600,
3,
21015,
18,
2829,
62,
459,
13,
9078,
1377,
16794,
63,
329,
517,
1321,
198,
198,
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
12131,
1757,
4746,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
... | 3.704142 | 338 |
from pyinfra.api import FactBase
| [
6738,
12972,
10745,
430,
13,
15042,
1330,
19020,
14881,
628
] | 3.4 | 10 |
"""
File-based cache for text retrieved from URL-based resources.
"""
import typing
from typeguard import typechecked
from devvyn.cache.web_cache import WebCache
StringFunction = typing.Callable[[str], str]
@typechecked
def cached(function: StringFunction) -> StringFunction:
"""
Wrap the decorated function... | [
37811,
198,
8979,
12,
3106,
12940,
329,
2420,
29517,
422,
10289,
12,
3106,
4133,
13,
198,
37811,
198,
11748,
19720,
198,
198,
6738,
2099,
14864,
1330,
2099,
26752,
198,
198,
6738,
1614,
85,
2047,
13,
23870,
13,
12384,
62,
23870,
1330,
... | 2.701465 | 546 |
# Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | [
2,
15069,
2813,
11,
3012,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
2810,
326,
262,
1708,
3403,
389,
198,
... | 2.876117 | 2,462 |
#!/usr/bin/env python
sol = Solution()
print(sol.generateParenthesis(2))
print(sol.generateParenthesis(3))
ret = sol.generateParenthesis(4)
set1 = set(ret)
set2 = set(["(((())))","((()()))","((())())","((()))()","(()(()))","(()()())","(()())()","(())(())","(())()()","()((()))","()(()())","()(())()","()()(())","()()()(... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
34453,
796,
28186,
3419,
198,
4798,
7,
34453,
13,
8612,
378,
24546,
8497,
7,
17,
4008,
198,
4798,
7,
34453,
13,
8612,
378,
24546,
8497,
7,
18,
4008,
198,
1186,
796,
1540,
13,
... | 2.343558 | 163 |
# -*- coding: utf-8 -*- #
# Copyright 2019 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 requir... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
1303,
198,
2,
15069,
13130,
3012,
11419,
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.859406 | 1,515 |
# -*- coding: utf-8 -*-
'''
Module for gathering and managing network information
'''
from __future__ import absolute_import
# Import salt libs
import salt.utils
import hashlib
import datetime
import socket
import salt.utils.network
import salt.utils.validate.net
try:
import salt.utils.winapi
HAS_DEPENDENCIES... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
26796,
329,
11228,
290,
11149,
3127,
1321,
198,
7061,
6,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
2,
17267,
8268,
9195,
82,
198,
11... | 2.164393 | 4,471 |
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
if __name__ == '__main__':
main() | [
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
12417,
... | 2.785714 | 42 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 1 16:23:55 2020
@author: dmattox
"""
import os
import dill
import lec_gly as LecGly
from bSiteResiFeatures import plipFile
os.chdir(LecGly.homeDir)
##########################
outDir = './data/structures/bsites/batchLists/'
if not os.path.exists... | [
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,
7031,
2447,
220,
352,
1467,
25,
1954,
25,
2816,
12131,
198,
198,
31,
9800,
25,
288,
76,
... | 2.395973 | 447 |
"""
Title: Density estimation using Real NVP
Authors: [Mandolini Giorgio Maria](https://www.linkedin.com/in/giorgio-maria-mandolini-a2a1b71b4/), [Sanna Daniele](https://www.linkedin.com/in/daniele-sanna-338629bb/), [Zannini Quirini Giorgio](https://www.linkedin.com/in/giorgio-zannini-quirini-16ab181a0/)
Date created: 2... | [
37811,
198,
19160,
25,
360,
6377,
31850,
1262,
6416,
399,
8859,
198,
30515,
669,
25,
685,
49846,
43232,
402,
1504,
27769,
14200,
16151,
5450,
1378,
2503,
13,
25614,
259,
13,
785,
14,
259,
14,
70,
1504,
27769,
12,
3876,
544,
12,
22249,... | 2.755319 | 1,128 |
# Copyright 2018 the Autoware Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | [
2,
15069,
2864,
262,
5231,
322,
533,
5693,
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,
... | 3.72067 | 179 |
#!/usr/bin/env python
# encoding: utf-8
'''
#-------------------------------------------------------------------
# CONFIDENTIAL --- CUSTOM STUDIOS
#-------------------------------------------------------------------
#
# @Project Name : 下载《笔趣看》网小说
#
# @File Name :... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
7061,
6,
198,
2,
10097,
6329,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7102,
37,
2... | 2.242583 | 1,719 |
# Turtle Objects
from turtle import Screen, Turtle
# Game Objects
from defender import Defender
from invaders import Invaders
from scoreboard import ScoreBoard
# Utilities
from time import sleep
from PIL import Image, ImageTk
# Initialize Screen
main_screen = Screen()
main_screen.title("Space Invaders")
main_screen.se... | [
2,
33137,
35832,
198,
6738,
28699,
1330,
15216,
11,
33137,
198,
2,
3776,
35832,
198,
6738,
13191,
1330,
25533,
198,
6738,
39417,
1330,
41671,
198,
6738,
50198,
1330,
15178,
29828,
198,
2,
41086,
198,
6738,
640,
1330,
3993,
198,
6738,
35... | 3.191375 | 371 |
from facenet_pytorch import MTCNN, InceptionResnetV1
import torch
from torchvision import datasets
from torch.utils.data import DataLoader
from PIL import Image
mtcnn = MTCNN(image_size=240, margin=0, min_face_size=20) # initializing mtcnn for face detection
resnet = InceptionResnetV1(pretrained='vggface2')... | [
6738,
1777,
268,
316,
62,
9078,
13165,
354,
1330,
337,
4825,
6144,
11,
554,
4516,
4965,
3262,
53,
16,
201,
198,
11748,
28034,
201,
198,
6738,
28034,
10178,
1330,
40522,
201,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
20... | 2.921444 | 471 |
#!/usr/bin/python
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at: http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
15069,
2321,
3012,
3457,
13,
220,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
198,
2,
779... | 3.31746 | 315 |
# run these tests with python -m pytest from src/ dir
| [
2,
1057,
777,
5254,
351,
21015,
532,
76,
12972,
9288,
422,
12351,
14,
26672,
198
] | 3.6 | 15 |
import math
angulo = float(input('Digite um angulo: '))
sen = math.sin(math.radians(angulo))
cos = math.cos(math.radians(angulo))
tan = math.tan(math.radians(angulo))
print('O seno é {:.2f}\nO Cosseno é {:.2f}\ne a tangente é {:.2f}'.format(sen, cos, tan))
| [
11748,
10688,
198,
648,
43348,
796,
12178,
7,
15414,
10786,
19511,
578,
23781,
3550,
43348,
25,
705,
4008,
198,
6248,
796,
10688,
13,
31369,
7,
11018,
13,
6335,
1547,
7,
648,
43348,
4008,
198,
6966,
796,
10688,
13,
6966,
7,
11018,
13,... | 2.424528 | 106 |
#import debugtest
#import imp
#imp.reload(debugtest)
#Testing script for various writing setups
#import redirect_print
import unreal_engine as ue
import time
import sys
import upythread as ut
from threading import Thread
#imp.reload(redirect_print)
#the test function
#test simple fire and forget
#Test with callba... | [
2,
11748,
14257,
9288,
198,
2,
11748,
848,
198,
2,
11011,
13,
260,
2220,
7,
24442,
9288,
8,
198,
198,
2,
44154,
4226,
329,
2972,
3597,
44266,
198,
198,
2,
11748,
18941,
62,
4798,
198,
11748,
22865,
62,
18392,
355,
334,
68,
198,
11... | 3.583333 | 108 |
"""
Test suite for 'find.py' (Fall 2015 version)
"""
from find15F import matches
| [
37811,
198,
14402,
18389,
329,
705,
19796,
13,
9078,
6,
357,
24750,
1853,
2196,
8,
198,
37811,
198,
198,
6738,
1064,
1314,
37,
1330,
7466,
628,
220,
220,
220,
220,
628,
220,
220,
220,
220,
628,
198
] | 2.594595 | 37 |
# Copyright 2016 The TensorFlow 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 applic... | [
2,
15069,
1584,
383,
309,
22854,
37535,
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,
345,
743,
407,
198,
2,
779,
428,
2393,
2845,
287,
11846,
... | 3.331183 | 465 |
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class ModelArguments:
"""
Arguments pertaining to which model/config/tokenizer we are going to fine-tune, or train from scratch.
"""
model_name_or_path: Optional[str] = field(
default=None,
metadata={
... | [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
19720,
1330,
32233,
198,
198,
31,
19608,
330,
31172,
198,
4871,
9104,
28100,
2886,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
20559,
2886,
27113,
284,
543,
2... | 2.768908 | 952 |
"""
Planarity Calculators
=====================
#. :class:`.PlanarityCalculator`
Methods to calculate planarity measures of a molecule.
"""
import logging
import numpy as np
from ..calculators import Calculator
from ..results import PlanarityResults
logger = logging.getLogger(__name__)
class PlanarityCalculator... | [
37811,
198,
20854,
6806,
27131,
2024,
198,
4770,
1421,
28,
198,
198,
2,
13,
1058,
4871,
25,
44646,
20854,
6806,
9771,
3129,
1352,
63,
198,
198,
46202,
284,
15284,
1410,
6806,
5260,
286,
257,
27756,
13,
198,
198,
37811,
198,
198,
11748... | 2.182673 | 2,020 |
'''
Created on 2012-01-19
@author: innovation
'''
import unittest
import numpy as np
from tests.simualtors.joint_binomial import JointSnvMixSimulator
from joint_snv_mix.counter import JointBinaryCountData, JointBinaryQualityData
from joint_snv_mix.models.joint_snv_mix import JointSnvMixModel, JointSnvMixPriors, Join... | [
7061,
6,
198,
41972,
319,
2321,
12,
486,
12,
1129,
198,
198,
31,
9800,
25,
11044,
198,
7061,
6,
198,
11748,
555,
715,
395,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
5254,
13,
14323,
723,
83,
669,
13,
73,
1563,
62,
8800,
... | 2.794872 | 156 |
import os
DEBUG=True
TEMPLATE_PATH = '%s/templates/' % os.path.dirname(os.path.realpath(__file__))
STATIC_BUCKET = 'nytint-stg-newsapps'
REMOTE_STORAGE_PATH = 'apps/screenshotter' | [
11748,
28686,
198,
198,
30531,
28,
17821,
198,
51,
3620,
6489,
6158,
62,
34219,
796,
705,
4,
82,
14,
11498,
17041,
14,
6,
4064,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
4008,
198,
198,... | 2.291139 | 79 |
from typing import List, Tuple, Optional
from .symbols import *
from .errors import NLPError
class AnnotationError(NLPError):
'''Any error related to Annotation and subclasses'''
class TextData(object):
'''Container for text data.
All Annotations reference it and use it as a source of text data.
'''... | [
6738,
19720,
1330,
7343,
11,
309,
29291,
11,
32233,
198,
6738,
764,
1837,
2022,
10220,
1330,
1635,
198,
6738,
764,
48277,
1330,
399,
19930,
12331,
628,
198,
4871,
1052,
38983,
12331,
7,
45,
19930,
12331,
2599,
198,
220,
220,
220,
705,
... | 2.515313 | 3,200 |
# Import the required libraries
import cv2
import numpy as np
import Projects.VirtualCanvas.utils as utils
cv2.destroyAllWindows()
if __name__ == "__main__":
# mode = int(input("Debug mode -- 1 or Normal Run ---0: "))
drawOnCanvas(debug_mode=True)
"""
LOG:
Final HSV values as: HUE_min... | [
2,
17267,
262,
2672,
12782,
201,
198,
11748,
269,
85,
17,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
29898,
13,
37725,
6090,
11017,
13,
26791,
355,
3384,
4487,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
19... | 2.207363 | 1,331 |
#!/home/kevinml/anaconda3/bin/python3.7
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 7 12:41:01 2019
@author: juangabriel and kevin Meza
"""
# Upper Confidence Bound (UCB)
# =======================================================================================================
# PASOS
#
# NOTAS: Se considera que ... | [
2,
48443,
11195,
14,
365,
7114,
4029,
14,
272,
330,
13533,
18,
14,
8800,
14,
29412,
18,
13,
22,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3825,
2758,
220,
767,
1105,
25,
3901,
25... | 2.615677 | 2,105 |
# -*- time-stamp-pattern: "changed[\s]+:[\s]+%%$"; -*-
# AUTHOR INFORMATION ##########################################################
# file : csv_data_loader.py
# author : Marcel Arpogaus <marcel dot arpogaus at gmail dot com>
#
# created : 2022-01-07 09:02:38 (Marcel Arpogaus)
# changed : 2022-01-07 09:02:38 (Ma... | [
2,
532,
9,
12,
640,
12,
301,
696,
12,
33279,
25,
366,
40985,
58,
59,
82,
48688,
33250,
59,
82,
48688,
16626,
3,
8172,
532,
9,
12,
198,
2,
44746,
38044,
1303,
29113,
14468,
7804,
2,
198,
2,
2393,
220,
220,
220,
1058,
269,
21370,
... | 3.913621 | 301 |
from tensorflow.keras.layers import Dropout, Activation, Flatten
from tensorflow.keras.layers import Dense, Input, BatchNormalization
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.models import Model, load_model, Sequential
from tensorflow.keras.activations import relu, softmax
| [
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
14258,
448,
11,
13144,
341,
11,
1610,
41769,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
360,
1072,
11,
23412,
11,
347,
963,
26447,
1634,
198,
6738,
11... | 3.380435 | 92 |
import sys
import cv2
import numpy as np
import tensorflow as tf
| [
11748,
25064,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
628
] | 3.142857 | 21 |
from .clean_command import CleanCommand
| [
6738,
764,
27773,
62,
21812,
1330,
5985,
21575,
198
] | 4.444444 | 9 |
import pytest
from collections import OrderedDict
from optopus import (
Parser,
Result,
)
| [
11748,
12972,
9288,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
2172,
25790,
1330,
357,
198,
220,
220,
220,
23042,
263,
11,
198,
220,
220,
220,
25414,
11,
198,
8,
628
] | 2.941176 | 34 |