content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from setuptools import setup
setup(
name='dropboxbackup',
version='0.1',
py_modules=['dropboxbackup'],
install_requires=[
'click',
'dropbox',
'simple-crypt'
],
entry_points='''
[console_scripts]
dropboxbackup=dropboxbackup:cli
''',
)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
14781,
3524,
1891,
929,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
16,
3256,
198,
220,
220,
220,
12972,
62,
18170,
28,
17816,
14781,
3524,
... | 2.075342 | 146 |
from os import path
from shutil import copyfile
import tvm
from tvm import relay
from tvm.driver import tvmc
from tvm.driver.tvmc.model import TVMCModel
from tvm.relay.transform import InferType, ToMixedPrecision
"""Copy pasted mostly from:
https://github.com/AndrewZhaoLuo/TVM-Sandbox/blob/bb209e8845440ed9f40af1b258... | [
6738,
28686,
1330,
3108,
198,
6738,
4423,
346,
1330,
4866,
7753,
198,
198,
11748,
256,
14761,
198,
6738,
256,
14761,
1330,
24248,
198,
6738,
256,
14761,
13,
26230,
1330,
256,
14761,
66,
198,
6738,
256,
14761,
13,
26230,
13,
83,
14761,
... | 2.08642 | 1,215 |
# -*- coding: utf-8 -*-
"""
XJB Generate Images Module (/doodle)
Created on Sun Sep 1 16:03:16 2019
@author: user
"""
import os
import asyncio
import uuid
import tg_connection
gen_path = "D:/AndroidProjects/ScarletKindom/flandre-generator/wgan/sample.png"
inp_base = "D:/AndroidProjects/ScarletKindom/flandre-genera... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
55,
47858,
2980,
378,
5382,
19937,
50247,
67,
27106,
8,
198,
41972,
319,
3825,
8621,
220,
352,
1467,
25,
3070,
25,
1433,
13130,
198,
198,
31,
9800,
25,
283... | 2.586957 | 138 |
from rest_framework import viewsets, permissions
from leads.serializers import LeadSerializer
from leads.models import Lead
| [
6738,
1334,
62,
30604,
1330,
5009,
1039,
11,
21627,
198,
198,
6738,
5983,
13,
46911,
11341,
1330,
20116,
32634,
7509,
198,
6738,
5983,
13,
27530,
1330,
20116,
628
] | 4.5 | 28 |
from flask import render_template
from . import main | [
6738,
42903,
1330,
8543,
62,
28243,
198,
6738,
764,
1330,
1388
] | 4.727273 | 11 |
from django.contrib.auth.models import AbstractUser
from django.db import models
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
27741,
12982,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.727273 | 22 |
import PIL.Image as Img
import numpy as np
from tqdm.notebook import tqdm
from PIL import ImageFilter
import tables
import time
import gc
"""
all the insert/append function for collage generator
_canvas_append takes the inserting operation, the rest are finding add_point logic
"""
| [
11748,
350,
4146,
13,
5159,
355,
1846,
70,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
13,
11295,
2070,
1330,
256,
80,
36020,
198,
6738,
350,
4146,
1330,
7412,
22417,
198,
11748,
8893,
198,
11748,
640,
198,
11748,
3... | 3.615385 | 78 |
# coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
4946,
33377,
7824,
357,
4480,
12554,
527,
3262,
274,
8,
628,
220,
220,
220,
4946,
33377,
3769,
12188,
11,
3586,
3868,
47510,
11,
2939,
2695,
4542,
11,
290,
11553,
... | 4.575871 | 804 |
import socket
import sys
IP_ADDR = "192.168.1.19"
TCP_PORT = 10000
if __name__ == "__main__":
# Create TCP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Associate the socket with the server address
server_address = (IP_ADDR, TCP_PORT)
print("Start TCP server at address {} on p... | [
11748,
17802,
198,
11748,
25064,
198,
198,
4061,
62,
2885,
7707,
796,
366,
17477,
13,
14656,
13,
16,
13,
1129,
1,
198,
4825,
47,
62,
15490,
796,
33028,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220... | 2.447458 | 295 |
import pandas as pd
countryInformation = pd.read_csv('resource/countryInformation.csv')
#looping row
#for index,row in countryInformation.iterrows():
#print(index, row['country_name'])
print(countryInformation.loc[countryInformation['country_name'] == 'india']) | [
11748,
19798,
292,
355,
279,
67,
198,
198,
19315,
21918,
796,
279,
67,
13,
961,
62,
40664,
10786,
31092,
14,
19315,
21918,
13,
40664,
11537,
198,
198,
2,
5439,
15816,
5752,
198,
2,
1640,
6376,
11,
808,
287,
1499,
21918,
13,
2676,
85... | 3.280488 | 82 |
"""
List Comprehensions Examples
"""
my_list = []
# my_list.append()
# my_list.extend()
"""
When to use ListComps
"""
phones = [
{
'number': '111-111-1111',
'label': 'phone',
'extension': '1234',
},
{
'number': '222-222-2222',
'label': 'mobile',
'extension... | [
37811,
198,
8053,
3082,
7345,
507,
21066,
198,
37811,
198,
198,
1820,
62,
4868,
796,
17635,
198,
2,
616,
62,
4868,
13,
33295,
3419,
198,
2,
616,
62,
4868,
13,
2302,
437,
3419,
628,
198,
37811,
198,
2215,
284,
779,
7343,
5377,
862,
... | 2.373434 | 798 |
import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras import models as KM
from tensorflow.keras import layers as KL
| [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
355,
509,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
4981,
355,
46646,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
11685,
355... | 3.511628 | 43 |
import time
| [
11748,
640,
198
] | 4 | 3 |
""" Select only a part of the instances
.. todo: group instance selectors
"""
import random
import logging
from collections import defaultdict
from pySPACE.missions.nodes.base_node import BaseNode
from pySPACE.tools.memoize_generator import MemoizeGenerator
_NODE_MAPPING = {"RandomInstanceSelection": InstanceSel... | [
37811,
9683,
691,
257,
636,
286,
262,
10245,
198,
198,
492,
284,
4598,
25,
1448,
4554,
2922,
669,
198,
37811,
198,
198,
11748,
4738,
198,
11748,
18931,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
6738,
12972,
4303,
11598,
13,
8481,
... | 3.251969 | 127 |
# -*- coding: utf-8 -*-
"""
"""
from __future__ import absolute_import
from contextlib import contextmanager
import imp
import posixpath
from zipfile import ZipFile
from click.testing import CliRunner
import pkginfo
import pytest
from six import PY3
def with_byte_compiled(paths):
""" Augment PATHS... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
11748,
848,
198,
11748,
1426,
844,
6978,
198,
... | 2.349112 | 338 |
import logging
from abc import ABC, abstractmethod
logger = logging.getLogger(__name__)
def lookup_action(self, action):
"""
Case insensitive lookup for all known actions. Returned in PascalCase
:param action:
:type action: str
:return:
:rtype: str
"""
... | [
11748,
18931,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
220,
220,
220,
825,
35847,
62,
2673,
7,
944,
11,
2223,
2599,
198,
220,
220,
2... | 2.493671 | 158 |
import pybullet as p
from gym import spaces
import pybullet_planning as pbp
import numpy as np
from diy_gym.addons.addon import Addon
| [
11748,
12972,
15065,
1616,
355,
279,
198,
198,
6738,
11550,
1330,
9029,
198,
11748,
12972,
15065,
1616,
62,
11578,
768,
355,
279,
46583,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2566,
88,
62,
1360,
76,
13,
39996,
13,
48078,
1330,
... | 3.090909 | 44 |
S = "Mr John Smith"
print(solution(S))
| [
198,
50,
796,
366,
5246,
1757,
4176,
1,
198,
198,
4798,
7,
82,
2122,
7,
50,
4008,
198
] | 2.277778 | 18 |
from __future__ import print_function
import ngraph.transformers as ngt
from ngraph.flex.names import flex_gpu_transformer_name
import argparse
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
23370,
1470,
13,
35636,
364,
355,
299,
13655,
198,
6738,
23370,
1470,
13,
32880,
13,
14933,
1330,
7059,
62,
46999,
62,
7645,
16354,
62,
3672,
198,
11748,
1822,
29572,
628
] | 3.625 | 40 |
"""
Simple reduced order solver.
More of a no-op, in that it doesn't actually
perform a flux solution
"""
import numpy
from hydep.internal.features import FeatureCollection
from hydep.internal import TransportResult
from .lib import ReducedOrderSolver
| [
37811,
198,
26437,
5322,
1502,
1540,
332,
13,
198,
198,
5167,
286,
257,
645,
12,
404,
11,
287,
326,
340,
1595,
470,
1682,
198,
525,
687,
257,
28462,
4610,
198,
37811,
198,
198,
11748,
299,
32152,
198,
198,
6738,
7409,
538,
13,
32538... | 3.820896 | 67 |
import FWCore.ParameterSet.Config as cms
#
# produce ttGenEvent with all necessary ingredients
#
from TopQuarkAnalysis.TopEventProducers.producers.TopInitSubset_cfi import *
from TopQuarkAnalysis.TopEventProducers.producers.TopDecaySubset_cfi import *
from TopQuarkAnalysis.TopEventProducers.producers.TtGenEvtProducer_... | [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
2,
198,
2,
4439,
256,
83,
13746,
9237,
351,
477,
3306,
9391,
198,
2,
198,
6738,
5849,
4507,
668,
32750,
13,
9126,
9237,
11547,
7999,
13,
1676,
41213,
13,
9126... | 2.80625 | 160 |
import os
from os.path import join as pjoin
import time
import numpy as np
import torch
from torch import nn
import torch.nn.functional as F
from torch.optim.lr_scheduler import CosineAnnealingLR
try:
from .radam import RAdam
except (ImportError, ModuleNotFoundError) as err:
from radam import RAdam
try:
... | [
11748,
28686,
198,
6738,
28686,
13,
6978,
1330,
4654,
355,
279,
22179,
198,
11748,
640,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,... | 1.774486 | 1,654 |
import os
import sys
import unittest
from nose.importer import Importer
if __name__ == '__main__':
import logging
logging.basicConfig(level=logging.DEBUG)
unittest.main()
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
395,
198,
6738,
9686,
13,
320,
26634,
1330,
1846,
26634,
628,
220,
220,
220,
220,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,... | 2.680556 | 72 |
from sklearn.base import clone
import pandas as pd
from abc import ABCMeta
from time import time
from datetime import datetime
import numpy as np
from sklearn.model_selection import ParameterGrid
from sklearn.base import BaseEstimator, MetaEstimatorMixin
from mvmm.utils import get_seeds
from mvmm.multi_view.utils impo... | [
6738,
1341,
35720,
13,
8692,
1330,
17271,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
450,
66,
1330,
9738,
48526,
198,
6738,
640,
1330,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
... | 2.552239 | 603 |
"""Delegate provider traversal tests."""
from dependency_injector import providers
| [
37811,
5005,
34637,
10131,
33038,
282,
5254,
526,
15931,
198,
198,
6738,
20203,
62,
259,
752,
273,
1330,
9549,
628,
198
] | 4.095238 | 21 |
# -*- coding: utf-8 -*-
"""Top-level package for RHG Compute Tools."""
__author__ = """Michael Delgado"""
__email__ = 'mdelgado@rhg.com'
__version__ = '0.2.1'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
9126,
12,
5715,
5301,
329,
35662,
38,
3082,
1133,
20003,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
13256,
4216,
50054,
37811,
198,
834,
12888,
834,
7... | 2.402985 | 67 |
# Generated by Django 3.2.3 on 2021-12-19 17:24
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
18,
319,
33448,
12,
1065,
12,
1129,
1596,
25,
1731,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
import datetime
from sqlalchemy.orm import sessionmaker
from database import db
from database.order_history import OrderHistory
from stock_analysis.logic import order_history
from stock_analysis.logic.order_history import Order
from stock_analysis.logic.order_history import OrderHistoryLogic
from stock_analysis.logic.... | [
11748,
4818,
8079,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
198,
198,
6738,
6831,
1330,
20613,
198,
6738,
6831,
13,
2875,
62,
23569,
1330,
8284,
18122,
198,
6738,
4283,
62,
20930,
13,
6404,
291,
1330,
1502,
62,
23569,
... | 3.862745 | 102 |
import os
import tensorflow as tf
from densenet_3d_model import DenseNet3D
def _build_tfrecord_dataset(directory, total_clip_num, batch_size, **params):
'''
Buffer the training dataset to TFRecordDataset with the following video shape
[num_frames_per_clip, height, width, channel]
ex: [16, 100, 1... | [
11748,
28686,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
288,
18756,
316,
62,
18,
67,
62,
19849,
1330,
360,
1072,
7934,
18,
35,
628,
628,
628,
198,
4299,
4808,
11249,
62,
27110,
22105,
62,
19608,
292,
316,
7,
34... | 2.780405 | 296 |
import sqlite3
import sys
import os
import io
if __name__=='__main__':
main()
| [
11748,
44161,
578,
18,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
33245,
198,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.59375 | 32 |
from defcon.objects.base import BaseDictObject
if __name__ == "__main__":
import doctest
doctest.testmod() | [
6738,
825,
1102,
13,
48205,
13,
8692,
1330,
7308,
35,
713,
10267,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1330,
10412,
395,
198,
220,
220,
220,
10412,
395,
13,
9288,
4666,
3419
] | 2.785714 | 42 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
#this program is atm that withdraw any money amount
#allowed papers: 100,50,10,5, and the rest of requests
balance = 500
balance = withdraw(balance, 277)
balance = withdraw(balance, 30)
balance = withdraw(balance, 5)
balance = withdraw(balance, 500)
| [
2,
5661,
1430,
318,
379,
76,
326,
8399,
597,
1637,
2033,
220,
198,
2,
40845,
9473,
25,
1802,
11,
1120,
11,
940,
11,
20,
11,
290,
262,
1334,
286,
7007,
220,
198,
198,
20427,
796,
5323,
198,
198,
20427,
796,
8399,
7,
20427,
11,
38... | 2.89899 | 99 |
#!/usr/bin/env python3
from statistics import mode
tests_failed = 0
tests_executed = 0
example1= """00100
11110
10110
10111
10101
01111
00111
11100
10000
11001
00010
01010""".split('\n')
powers = [8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]
if __name__ == "__main__":
test_cases()
print(e... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
7869,
1330,
4235,
198,
198,
41989,
62,
47904,
796,
657,
198,
41989,
62,
18558,
7241,
796,
657,
198,
198,
20688,
16,
28,
37227,
405,
3064,
198,
1157,
11442,
198,
8784,
... | 2.384058 | 138 |
import cv2
import numpy as np
from scipy.signal import medfilt
from utils import init_dict, l2_dst
def keypoint_transform(H, keypoint):
"""
Input:
H: homography matrix of dimension (3*3)
keypoint: the (x, y) point to be transformed
Output:
keypoint_trans: Transformed point keypoint_trans = H ... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
12683,
282,
1330,
1117,
69,
2326,
198,
198,
6738,
3384,
4487,
1330,
2315,
62,
11600,
11,
300,
17,
62,
67,
301,
198,
198,
4299,
1994,
4122,
62,
35... | 2.147712 | 2,884 |
# GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
| [
2,
24700,
1137,
11617,
11050,
509,
2662,
6981,
26144,
532,
8410,
5626,
48483,
198,
11748,
479,
296,
392,
198,
11748,
33918,
628,
198,
220,
220,
220,
220,
628
] | 2.642857 | 28 |
import os
import struct
from .compilation.scout_flags import *
from .compilation.scout_files import *
from .compilation.arc_intel import arcIntel
from .compilation.arc_arm import arcArm, arcArmThumb
from .compilation.arc_mips import arcMips
from .context_creator import *
#############################... | [
11748,
28686,
198,
11748,
2878,
198,
198,
6738,
764,
5589,
10520,
13,
1416,
448,
62,
33152,
1330,
1635,
198,
6738,
764,
5589,
10520,
13,
1416,
448,
62,
16624,
1330,
1635,
198,
6738,
764,
5589,
10520,
13,
5605,
62,
48779,
220,
220,
133... | 2.298555 | 623 |
# 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... | 2.381323 | 2,570 |
# -*- coding: utf-8 -*-
from selenium.webdriver.firefox.webdriver import WebDriver
import unittest
from group import Group
from contact import Contact
if __name__ == '__main__':
unittest.main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
6495,
12792,
13,
12384,
26230,
1330,
5313,
32103,
198,
11748,
555,
715,
395,
198,
6738,
1448,
1330,
4912,
198,
6738,
2800,
... | 2.926471 | 68 |
## using output of king and plink --miss identify worse performing duplicate for exclusion
## this script is run as follows
## python ExcludeDuplicates.py <king output> <plink --miss output> <output file>
import sys
print "Reading in sample missingness from", sys.argv[2]
sampleMissing = file(sys.argv[2], "r")
sam... | [
2235,
1262,
5072,
286,
5822,
290,
458,
676,
1377,
3927,
5911,
4785,
9489,
23418,
329,
19328,
220,
198,
2235,
428,
4226,
318,
1057,
355,
5679,
198,
2235,
21015,
1475,
9152,
35660,
489,
16856,
13,
9078,
1279,
3364,
5072,
29,
1279,
489,
... | 2.732834 | 801 |
import numpy as np
import pandas as pd
from .jscatter import Scatter, component_idx_to_name
from .utils import minmax_scale
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
764,
73,
1416,
1436,
1330,
1446,
1436,
11,
7515,
62,
312,
87,
62,
1462,
62,
3672,
198,
6738,
764,
26791,
1330,
949,
9806,
62,
9888,
628
] | 3.073171 | 41 |
import logging
import sys
from typing import Iterable
# 3rd party imports
import numpy as np
# import matplotlib.pyplot as plt
from scipy.io.wavfile import read as wavread
# local imports
from .dio import dio
from .stonemask import stonemask
from .harvest import harvest
from .cheaptrick import cheaptrick
from .d4c im... | [
11748,
18931,
198,
11748,
25064,
198,
6738,
19720,
1330,
40806,
540,
198,
198,
2,
513,
4372,
2151,
17944,
198,
11748,
299,
32152,
355,
45941,
198,
2,
1330,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,... | 3.170732 | 164 |
"""Utilities to help building Docker images."""
import argparse
import os
import subprocess
from typing import List, Optional
from universal_build import build_utils
FLAG_DOCKER_IMAGE_PREFIX = "docker_image_prefix"
def parse_arguments(
input_args: List[str] = None, argument_parser: argparse.ArgumentParser = No... | [
37811,
18274,
2410,
284,
1037,
2615,
25716,
4263,
526,
15931,
198,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
19720,
1330,
7343,
11,
32233,
198,
198,
6738,
10112,
62,
11249,
1330,
1382,
62,
26791,
198,
... | 2.69383 | 3,031 |
version https://git-lfs.github.com/spec/v1
oid sha256:ea33786bb4be2c91d879beaff23346f37c5b4b5b8504df61a909e3570d67eb08
size 5150
| [
9641,
3740,
1378,
18300,
12,
1652,
82,
13,
12567,
13,
785,
14,
16684,
14,
85,
16,
198,
1868,
427,
64,
11645,
25,
18213,
2091,
46302,
11848,
19,
1350,
17,
66,
6420,
67,
23,
3720,
1350,
2001,
1954,
30557,
69,
2718,
66,
20,
65,
19,
... | 1.984615 | 65 |
# Generated by Django 2.0.5 on 2018-05-22 21:02
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
20,
319,
2864,
12,
2713,
12,
1828,
2310,
25,
2999,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
expected_output = {
"sort": {
1: {
"invoked": 3321960,
"usecs": 109,
"tty": 0,
"one_min_cpu": 0.54,
"process": "PIM Process",
"five_min_cpu": 0.48,
"runtime": 362874,
"pid": 368,
"five_sec_cpu": 1.03,... | [
40319,
62,
22915,
796,
1391,
198,
220,
220,
220,
366,
30619,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
352,
25,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
16340,
6545,
1298,
41423,
38503,
11,
... | 1.570028 | 714 |
# -*- encoding: utf-8 -*-
# Copyright (c) 2015 b<>com
#
# 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 o... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
1853,
275,
27,
29,
785,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743... | 3.514644 | 239 |
#!/usr/bin/env python
from setuptools import setup
setup(
name="earthlyw",
version="0.1",
packages=[
"ibidem",
"ibidem.earthlyw",
],
install_requires=[
"setuptools",
"colorlog<6",
"appdirs<2",
"requests<3",
],
extras_require={
"dev": ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
16442,
306,
86,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
16,
1600,
198,
220,
220,
... | 1.877419 | 465 |
#!/usr/bin/env python
# -*- coding= UTF-8 -*-
# Fad
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
# setup the empty canvas
from io import FileIO as file
from reportlab.platypus import Flowable
# from Common.pyPdf import PdfFileWriter, PdfFileReader
from PyPDF2 import PdfFileWriter, PdfFil... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
28,
41002,
12,
23,
532,
9,
12,
198,
2,
376,
324,
198,
198,
6738,
989,
23912,
13,
12315,
5235,
1330,
21978,
198,
6738,
989,
23912,
13,
8019,
13,
31126,
4340,
... | 2.099163 | 2,390 |
from __future__ import print_function, absolute_import
import random
import torch.utils.data as data
from pose.utils.osutils import *
from pose.utils.transforms import *
from scipy.io import loadmat
import argparse
real_animal_all.njoints = 18 # ugly but works
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
198,
11748,
4738,
198,
11748,
28034,
13,
26791,
13,
7890,
355,
1366,
198,
6738,
12705,
13,
26791,
13,
418,
26791,
1330,
1635,
198,
6738,
12705,
13,
26791,
13,
76... | 3.320988 | 81 |
import sklearn
from sklearn.cluster import KMeans
from src.features.feature_selection import PCA_Variants2Gene_FeatureSelection
| [
11748,
1341,
35720,
198,
6738,
1341,
35720,
13,
565,
5819,
1330,
509,
5308,
504,
198,
198,
6738,
12351,
13,
40890,
13,
30053,
62,
49283,
1330,
4217,
32,
62,
23907,
1187,
17,
39358,
62,
38816,
4653,
1564,
198
] | 3.486486 | 37 |
p = [1, 4, 9, 10, 20, 25]
e1 = int(input('Primeiro elemento: '))
e2 = int(input('Segundo elemento: '))
x = 0
achou = False
primeiro = 0
while x < len(p):
if p[x] == e1:
print(f'Elemento 1 encontrado na posio {x} da lista!')
if primeiro == 0:
primeiro = 1
if p[x] == e2:
print(... | [
79,
796,
685,
16,
11,
604,
11,
860,
11,
838,
11,
1160,
11,
1679,
60,
198,
68,
16,
796,
493,
7,
15414,
10786,
26405,
7058,
5002,
78,
25,
705,
4008,
198,
68,
17,
796,
493,
7,
15414,
10786,
41030,
41204,
5002,
78,
25,
705,
4008,
... | 2.00823 | 243 |
from lk_db.ents.Ent import Ent
| [
6738,
300,
74,
62,
9945,
13,
658,
13,
14539,
1330,
7232,
628
] | 2.666667 | 12 |
"""
Visual Genome in Scene Graph Generation by Iterative Message Passing split
"""
import os
import cv2
import json
import h5py
import pickle
import numpy as np
import scipy.sparse
import os.path as osp
from datasets.imdb import imdb
from model.utils.config import cfg
from IPython import embed
if __name__ == '__ma... | [
37811,
198,
36259,
5215,
462,
287,
28315,
29681,
16588,
416,
40806,
876,
16000,
46389,
6626,
198,
37811,
198,
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
33918,
198,
11748,
289,
20,
9078,
198,
11748,
2298,
293,
198,
11748,
299,
3... | 2.947761 | 134 |
# SL030 RFID reader driver for skpang supplied SL030 Mifare reader
# (c) 2013-2014 Thinking Binaries Ltd, David Whale
#===============================================================================
# CONFIGURATION
#
# You can change these configuration items either by editing them in this
# file, or by refering to th... | [
2,
12419,
39101,
20445,
2389,
9173,
4639,
329,
1341,
79,
648,
14275,
12419,
39101,
337,
361,
533,
9173,
198,
2,
357,
66,
8,
2211,
12,
4967,
30707,
20828,
3166,
12052,
11,
3271,
44772,
198,
198,
2,
23926,
25609,
18604,
198,
2,
25626,
... | 3.713636 | 880 |
# parser.py - parses a given sentence using a given grammar definition
import sys, os
import argparse
from utils import load_grammar
def get_parser(grammar_file, *args, **kwargs):
""" loads a parser from the given grammar """
return load_grammar(grammar_file, *args, **kwargs)
def tokenize(sentence):
"""... | [
2,
30751,
13,
9078,
532,
13544,
274,
257,
1813,
6827,
1262,
257,
1813,
23491,
6770,
198,
198,
11748,
25064,
11,
28686,
198,
11748,
1822,
29572,
198,
198,
6738,
3384,
4487,
1330,
3440,
62,
4546,
3876,
198,
198,
4299,
651,
62,
48610,
7,... | 3.176796 | 181 |
import re
from typing import List, Any, Generator, Tuple, Pattern, Optional, Callable, Dict
| [
11748,
302,
198,
6738,
19720,
1330,
7343,
11,
4377,
11,
35986,
11,
309,
29291,
11,
23939,
11,
32233,
11,
4889,
540,
11,
360,
713,
628,
198
] | 3.615385 | 26 |
import random
from django.core.management.base import BaseCommand
from pandas import Series
from src.cache.cache import put_labelled_logs
from src.core.core import get_encoded_logs
from src.jobs.models import Job
from src.jobs.tasks import prediction_task
from src.runtime.tasks import create_prediction_job
from src.... | [
11748,
4738,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
6738,
19798,
292,
1330,
7171,
198,
198,
6738,
12351,
13,
23870,
13,
23870,
1330,
1234,
62,
23912,
11978,
62,
6404,
82,
198,
6738,
12351,
... | 3.383178 | 107 |
#emacs, this is -*-Python-*- mode
from __future__ import division
from __future__ import with_statement
import contextlib
import threading, Queue
| [
2,
368,
16436,
11,
428,
318,
532,
9,
12,
37906,
12,
9,
12,
4235,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
351,
62,
26090,
198,
198,
11748,
4732,
8019,
198,
198,
11748,
4704,
278,
11,
4670,
518,
... | 3.363636 | 44 |
from flask import Flask, render_template, request, redirect, logging, make_response, json
from ethw3 import genkey, create_chain_data, verify_chain_data, create_acct, mine, history_slice
from utils_s3 import load_from_fetchlist
# Initialize flask an other global variables
app = Flask(__name__)
address, username, addr,... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
18941,
11,
18931,
11,
787,
62,
26209,
11,
33918,
198,
6738,
4555,
86,
18,
1330,
2429,
2539,
11,
2251,
62,
7983,
62,
7890,
11,
11767,
62,
7983,
62,
7890,
11,
2251,
62,
33... | 2.879828 | 233 |
import json
import os
from datetime import date
from typing import List, Dict
from d3m_metadata.metadata import PrimitiveMetadata, PrimitiveFamily, PrimitiveAlgorithmType
from d3m import index
from dsbox.planner.common.primitive import Primitive
from dsbox.schema.profile_schema import DataProfileType as dpt
from col... | [
11748,
33918,
198,
11748,
28686,
198,
198,
6738,
4818,
8079,
1330,
3128,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
198,
198,
6738,
288,
18,
76,
62,
38993,
13,
38993,
1330,
11460,
1800,
9171,
14706,
11,
11460,
1800,
24094,
11,
11460,
... | 3.625 | 96 |
# Program 64 : Capitalize the First Character of a String
my_string = input()
cap_string = my_string.capitalize()
print(cap_string) | [
2,
6118,
5598,
1058,
9747,
1096,
262,
3274,
15684,
286,
257,
10903,
198,
198,
1820,
62,
8841,
796,
5128,
3419,
198,
198,
11128,
62,
8841,
796,
616,
62,
8841,
13,
27544,
1096,
3419,
198,
198,
4798,
7,
11128,
62,
8841,
8
] | 3.268293 | 41 |
# -*- coding: utf-8 -*-
'''
Created on Fri Nov 16 09:36:50 2018
@author:
Visa Suomi
Turku University Hospital
November 2018
@description:
This model is used to predict radiation dose from pre-treatment patient
parameters
'''
#%% clear variables
%reset -f
%clear
#%% import ne... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
41972,
319,
19480,
5267,
1467,
7769,
25,
2623,
25,
1120,
2864,
198,
198,
31,
9800,
25,
198,
220,
220,
220,
220,
198,
220,
220,
220,
27645,
1778,
12753,
... | 2.066096 | 8,881 |
from dolfin import *
parameters['form_compiler']['representation'] = 'uflacs'
parameters['form_compiler']['cpp_optimize'] = True
parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -march=native'
parameters['ghost_mode'] = 'shared_facet'
mesh_file = 'cell_grid.h5'
comm = mpi_comm_world()
h5 = HDF5Fi... | [
6738,
288,
4024,
259,
1330,
1635,
198,
198,
17143,
7307,
17816,
687,
62,
5589,
5329,
6,
7131,
6,
15603,
341,
20520,
796,
705,
84,
2704,
16436,
6,
198,
17143,
7307,
17816,
687,
62,
5589,
5329,
6,
7131,
6,
20322,
62,
40085,
1096,
2052... | 2.434255 | 1,483 |
from django.test import TestCase
from customers.gems_utils import Gems
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
4297,
13,
70,
5232,
62,
26791,
1330,
30196,
628
] | 3.65 | 20 |
import click
import pandas
import pickle
import json
from clients import s3, redis
| [
11748,
3904,
198,
11748,
19798,
292,
198,
11748,
2298,
293,
198,
11748,
33918,
198,
6738,
7534,
1330,
264,
18,
11,
2266,
271,
628
] | 3.652174 | 23 |
#!/usr/bin/env python3
import argparse
import os
import io
import subprocess
import sys
from tabulate import tabulate
def run_tests(test_dir, run_dir, log_fp, oasis_args, threshold=None):
'''
Output of each run entry in `results`
In [3]: example_run
Out[3]:
{'total': 88.63,
'oasislmf.ma... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
33245,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
6738,
7400,
5039,
1330,
7400,
5039,
628,
628,
628,
198,
4299,
1057,
62,... | 2.028505 | 1,298 |
#!/bin/env python
from app import create_app, socketio
from app.db_setup import init_db
app = create_app(debug=False)
init_db()
if __name__ == '__main__':
socketio.run(app, port=5001)
| [
2,
48443,
8800,
14,
24330,
21015,
198,
6738,
598,
1330,
2251,
62,
1324,
11,
17802,
952,
198,
6738,
598,
13,
9945,
62,
40406,
1330,
2315,
62,
9945,
198,
198,
1324,
796,
2251,
62,
1324,
7,
24442,
28,
25101,
8,
198,
15003,
62,
9945,
... | 2.616438 | 73 |
# from tkinter import *
# root = Tk()
# frametop = Frame(root)
# framebottom = Frame(root)
# frameleft = Frame(framebottom)
# frameright = Frame(framebottom)
# text = Text(frametop)
# scroll = Scrollbar(frametop, command=text.yview)
# btn1 = Button(frameleft, text="Course")
# btn2 = Button(frameleft, text="Abscences... | [
2,
422,
256,
74,
3849,
1330,
1635,
198,
198,
2,
6808,
796,
309,
74,
3419,
198,
198,
2,
5346,
316,
404,
796,
25184,
7,
15763,
8,
198,
2,
5739,
22487,
796,
25184,
7,
15763,
8,
198,
2,
5739,
9464,
796,
25184,
7,
14535,
22487,
8,
... | 2.374376 | 601 |
import os
import logging
import shutil
from optimus.i18n.manager import I18NManager
def test_update_catalogs_all(
minimal_i18n_settings, caplog, temp_builds_dir, fixtures_settings
):
"""
Update every catalogs
"""
basepath = temp_builds_dir.join("i18n_update_catalogs_all")
# Copy sample proje... | [
11748,
28686,
198,
11748,
18931,
198,
11748,
4423,
346,
198,
198,
6738,
6436,
385,
13,
72,
1507,
77,
13,
37153,
1330,
314,
1507,
45,
13511,
628,
198,
4299,
1332,
62,
19119,
62,
9246,
11794,
82,
62,
439,
7,
198,
220,
220,
220,
10926,... | 2.302231 | 986 |
"""This module contains examples of stream_func where f_type
is 'element' and stream_func has a single input stream, and
a single output stream, and the operation is stateful.
The state captures information in the past input streams;
this information is required to append values to the tails
of the output streams.
Th... | [
37811,
1212,
8265,
4909,
6096,
286,
4269,
62,
20786,
810,
277,
62,
4906,
198,
271,
705,
30854,
6,
290,
4269,
62,
20786,
468,
257,
2060,
5128,
4269,
11,
290,
198,
64,
2060,
5072,
4269,
11,
290,
262,
4905,
318,
1181,
913,
13,
198,
1... | 3.061558 | 796 |
# mpqa3_to_dict helps to convert MPQA stand-off format to python dictionaries.
# It provides the following functionalities:
# 1) Clean up the MPQA 3.0 corpus
# 2) Convert an MPQA document to a dictionary
# 3) Convert an entire corpus to a dictionary
import os
import re
HAS_LIST_OF_IDS = [ # These attributes may have ... | [
2,
29034,
20402,
18,
62,
1462,
62,
11600,
5419,
284,
10385,
4904,
48,
32,
1302,
12,
2364,
5794,
284,
21015,
48589,
3166,
13,
198,
2,
632,
3769,
262,
1708,
10345,
871,
25,
198,
2,
352,
8,
5985,
510,
262,
4904,
48,
32,
513,
13,
15... | 2.981481 | 162 |
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | [
2,
198,
2,
1439,
393,
16690,
286,
428,
2393,
15069,
357,
66,
8,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
393,
198,
2,
663,
8240,
669,
13,
198,
2,
198,
2,
1114,
1844,
6634,
290,
5964,
2846,
3387,
766,
262,
38559,
24290,
379,... | 3.926136 | 176 |
#Crie um programa que tenha uma tupla com vrias palavras (no usar acentos). Depois disso, voc deve mostrar, para cada palavra, quais so as suas vogais.
palavras=('SOPA','BATATAS','CACAU','CASTANHA','LASANHA','GOSTOSURAS','TRAVESSURAS','PARMEGIANA')
for p in palavras:
print(f'\n As Vogais de {p} so: ',end='')
f... | [
1303,
34,
5034,
23781,
1430,
64,
8358,
3478,
3099,
334,
2611,
12777,
489,
64,
401,
410,
380,
292,
6340,
615,
8847,
357,
3919,
514,
283,
936,
298,
418,
737,
2129,
10924,
595,
568,
11,
12776,
390,
303,
749,
20040,
11,
31215,
269,
4763... | 2.169399 | 183 |
import os
from django.conf import *
from django.shortcuts import render_to_response, render
from django.http import HttpResponse
from .models import Data, MovingAvg, Movements, Sigma
from datetime import datetime
from django.template import RequestContext
| [
11748,
28686,
198,
6738,
42625,
14208,
13,
10414,
1330,
1635,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
62,
1462,
62,
26209,
11,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
764,
27530,
1330,
... | 3.878788 | 66 |
# Method_#1
#Regex_Pattern = r"\S\S\s\S\S\s\S\S" # Do not delete 'r'.
# Method_#2
Regex_Pattern = r"(\S\S\s){2}(\S\S){1}"
import re
print(str(bool(re.search(Regex_Pattern, input()))).lower()) | [
198,
2,
11789,
62,
2,
16,
198,
2,
3041,
25636,
62,
47546,
796,
374,
1,
59,
50,
59,
50,
59,
82,
59,
50,
59,
50,
59,
82,
59,
50,
59,
50,
1,
197,
2,
2141,
407,
12233,
705,
81,
4458,
198,
198,
2,
11789,
62,
2,
17,
198,
3041,... | 1.989796 | 98 |
import os
import shutil
| [
11748,
28686,
198,
11748,
4423,
346,
628
] | 3.571429 | 7 |
regno='1941012661'
year=2019
# print('My Regd. No is %s and I have taken admission in B. Tech. In %d.' %(regno, year))
print('My Regd. No is', regno,'and I have taken admission in B. Tech. In', year,'.' ) | [
2301,
3919,
11639,
1129,
3901,
486,
2075,
5333,
6,
198,
1941,
28,
23344,
198,
198,
2,
3601,
10786,
3666,
3310,
67,
13,
1400,
318,
4064,
82,
290,
314,
423,
2077,
13938,
287,
347,
13,
9634,
13,
554,
4064,
67,
2637,
4064,
7,
2301,
39... | 2.697368 | 76 |
"""
,
"""
from django.db import models
| [
37811,
198,
220,
220,
220,
837,
220,
220,
198,
37811,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 2.3 | 20 |
"""setuptools entry point."""
from codecs import open
from os import path
from setuptools import find_packages, setup
HERE = path.abspath(path.dirname(__file__))
with open(path.join(HERE, "README.rst"), encoding="utf-8") as f:
LONG_DESCRIPTION = f.read()
with open(path.join(HERE, "src", "den", "VERSION")) as ve... | [
37811,
2617,
37623,
10141,
5726,
966,
526,
15931,
198,
198,
6738,
40481,
82,
1330,
1280,
198,
6738,
28686,
1330,
3108,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
39,
9338,
796,
3108,
13,
397,
2777,
776,
7... | 2.220762 | 761 |
'''
Created on 31 Jul 2009
@author: charanpal
'''
from __future__ import print_function
import sys
import os
import numpy
from contextlib import contextmanager
import numpy.random as rand
import logging
import scipy.linalg
import scipy.sparse as sparse
import scipy.special
import pickle
from apgl.util.Parameter imp... | [
7061,
6,
198,
41972,
319,
3261,
5979,
3717,
198,
198,
31,
9800,
25,
1149,
272,
18596,
198,
7061,
6,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
25064,
220,
198,
11748,
28686,
198,
11748,
299,
32152,
198,
6738,... | 3.316832 | 101 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
.. codeauthor: Albert Weichselbraun <albert.weichselbraun@htwchur.ch>
.. codeauthor:: Heinz-Peter Lang <lang@weblyzard.com>
'''
from __future__ import print_function
from __future__ import unicode_literals
from eWRT.ws.rest import MultiRESTClient
from weblyzard_api.client ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
492,
2438,
9800,
25,
9966,
775,
488,
741,
16057,
403,
1279,
282,
4835,
13,
732,
488,
741,
16057,
403,
31,
71... | 2.503185 | 157 |
import datetime, os
from django.contrib.auth.models import User
from products.lib.data_load import LoadProducts
from zendesk.lib.load_tickets import LoadTickets
from tasks.engine.maintenance import Maintenance
from tasks.models import LastRun
| [
11748,
4818,
8079,
11,
28686,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
3186,
13,
8019,
13,
7890,
62,
2220,
1330,
8778,
48650,
198,
6738,
1976,
437,
274,
74,
13,
8019,
13,
2220,
62,
83,
15... | 3.753846 | 65 |
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 23 10:51:14 2018
@author: peter
"""
from sklearn.feature_extraction.text import TfidfVectorizer
import os
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPClassifier
from sklearn import metrics
import urllib.parse
from sklearn.ex... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
2556,
2242,
838,
25,
4349,
25,
1415,
2864,
198,
198,
31,
9800,
25,
279,
2357,
198,
37811,
198,
198,
6738,
1341,
35720,
13,
30053,
62,
230... | 2.616 | 500 |
import random
import string
from sqlalchemy.orm import Session
import models, schemas
| [
11748,
4738,
198,
11748,
4731,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
23575,
198,
198,
11748,
4981,
11,
3897,
5356,
628,
628,
628,
628,
628,
198
] | 3.592593 | 27 |
#!/usr/bin/env python3
from mdpyformat import *
import pprintex
header_md("""Python object primer for Python3 / meta classes""" )
header_md("""Introduction""", nesting = 2)
print_md("""
Python is good at creating the illusion of being a simple programming language. Sometimes this illusion fails, like when you have... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
45243,
9078,
18982,
1330,
1635,
198,
11748,
279,
4798,
1069,
628,
198,
25677,
62,
9132,
7203,
15931,
37906,
2134,
33270,
329,
11361,
18,
1220,
13634,
6097,
37811,
1267,
198,
19... | 2.970443 | 9,710 |
import speech_recognition as sr #Recognition Module
import pyttsx3 #Speaking package
import json
import series_counter as s_c
engine = pyttsx3.init() #initialising pyttsx value
speak('hi user')
# this class will act as a test printer
#this script will run all
def run_all(present_... | [
11748,
4046,
62,
26243,
653,
355,
19677,
220,
220,
220,
220,
1303,
6690,
2360,
653,
19937,
198,
11748,
12972,
83,
912,
87,
18,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 2.352 | 250 |
# MIT License
#
# Copyright (c) 2019 SSL-Roots
#
# 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, merge, pu... | [
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
25952,
12,
49,
13880,
198,
2,
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,
10314,
... | 3.530414 | 411 |
#
# Script to fuse features per member per family (i.e., for each FID.MID, average all encodings across feature dim).
# Any features can be fused. Here is link to ArcFace features,
# https://www.dropbox.com/s/5rbj68dqud2folu/FIDs-features.tar.gz?dl=0
#
import pickle
from pathlib import Path
import numpy as np
from tqd... | [
2,
198,
2,
12327,
284,
32738,
3033,
583,
2888,
583,
1641,
357,
72,
13,
68,
1539,
329,
1123,
376,
2389,
13,
44,
2389,
11,
2811,
477,
2207,
375,
654,
1973,
3895,
5391,
737,
198,
2,
4377,
3033,
460,
307,
43954,
13,
3423,
318,
2792,
... | 2.10928 | 1,153 |
# Python > Collections > Company Logo
# Print the number of character occurrences in descending order.
#
# https://www.hackerrank.com/challenges/most-commons/problem
#
from collections import Counter
from itertools import groupby
name = input()
nb = 0
for c, g in groupby(Counter(name).most_common(), key=lambda x: x[... | [
2,
11361,
1875,
50004,
1875,
5834,
42411,
198,
2,
12578,
262,
1271,
286,
2095,
40279,
287,
31491,
1502,
13,
198,
2,
198,
2,
3740,
1378,
2503,
13,
31153,
8056,
962,
13,
785,
14,
36747,
34120,
14,
1712,
12,
9503,
684,
14,
45573,
198,
... | 2.670588 | 170 |
# 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... | 2.254824 | 1,503 |
import os
from torch.optim import Adam, SGD
import skopt
import torch
from utils.data_utils import select_data
from utils.visualization_utils import plot_data_and_fit
from learning_models.logistic import Logistic
# df_file = os.path.join(os.getcwd(), "dati-regioni", "dpc-covid19-ita-regioni.csv")
df_file = os.path.j... | [
11748,
28686,
198,
6738,
28034,
13,
40085,
1330,
7244,
11,
26147,
35,
198,
11748,
1341,
8738,
198,
11748,
28034,
198,
198,
6738,
3384,
4487,
13,
7890,
62,
26791,
1330,
2922,
62,
7890,
198,
6738,
3384,
4487,
13,
41464,
1634,
62,
26791,
... | 2.331658 | 1,194 |
#!/usr/bin/env python
from confluent_kafka import Producer, Consumer, KafkaError
import sys
import time
import subprocess
from datetime import datetime
import threading
from collections import defaultdict
import re
import uuid
# not used at this time
# def delivery_report(err, msg):
# global messages_pos_ack... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
1013,
28216,
62,
74,
1878,
4914,
1330,
30436,
11,
18110,
11,
46906,
12331,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
850,
14681,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,... | 2.2466 | 3,897 |
"""Tests for string representations of Quantities and Units,
i.e. __repr__ and __str__"""
from units import unit
from units.predefined import define_units
from units.quantity import Quantity
from units.registry import REGISTRY
def test_quantity_repr():
"""Developer-friendly string representation of quantities."""... | [
37811,
51,
3558,
329,
4731,
24612,
286,
16972,
871,
290,
27719,
11,
198,
72,
13,
68,
13,
11593,
260,
1050,
834,
290,
11593,
2536,
834,
37811,
198,
198,
6738,
4991,
1330,
4326,
198,
6738,
4991,
13,
28764,
18156,
1330,
8160,
62,
41667,
... | 2.478079 | 958 |
from rest_framework.permissions import BasePermission, SAFE_METHODS
| [
6738,
1334,
62,
30604,
13,
525,
8481,
1330,
7308,
5990,
3411,
11,
37630,
36,
62,
49273,
50,
628
] | 3.833333 | 18 |
#!/usr/bin/python
#
# FishPi - An autonomous drop in the ocean
#
# Simple test of PWM motor and servo drive
#
import logging
import raspberrypi
from time import sleep
from drive_controller import AdafruitDriveController
if __name__ == "__main__":
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
2,
198,
2,
13388,
38729,
532,
1052,
18284,
4268,
287,
262,
9151,
198,
2,
198,
2,
17427,
1332,
286,
350,
22117,
5584,
290,
1113,
78,
3708,
198,
2,
198,
11748,
18931,
198,
11748,
38973,
... | 2.416459 | 401 |
import logging
import numpy as np
import pandas as pd
import scipy.stats as ss
from scipy.linalg import eig
from numba import jit
import sg_covid_impact
# from mi_scotland.utils.pandas import preview
logger = logging.getLogger(__name__)
np.seterr(all="raise") # Raise errors on floating point errors
def process_c... | [
11748,
18931,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
629,
541,
88,
13,
34242,
355,
37786,
198,
6738,
629,
541,
88,
13,
75,
1292,
70,
1330,
304,
328,
198,
6738,
997,
7012,
1330,
474... | 2.345656 | 5,410 |
'''Ex 019 - Um professor quer sortear um dos seus quatro alunos para apagar o quadro.
Faa um programa que ajude ele, lendo o nome dos alunos e escrevendo na tela o nome do escolhido.'''
print('-' * 15, '>Ex 19<', '-' * 15)
from random import choice
# Usando Random para sortiar o escolhido.
# Recebendo dados.
aluno1... | [
7061,
6,
3109,
5534,
24,
532,
21039,
6240,
42517,
3297,
451,
23781,
23430,
384,
385,
627,
47756,
435,
403,
418,
31215,
2471,
32452,
267,
15094,
305,
13,
198,
37,
7252,
23781,
1430,
64,
8358,
257,
73,
2507,
9766,
11,
22096,
78,
267,
... | 2.617747 | 293 |
from sklearn.model_selection import StratifiedKFold
from evalml.preprocessing.data_splitters.balanced_classification_sampler import (
BalancedClassificationSampler
)
from evalml.preprocessing.data_splitters.base_splitters import (
BaseUnderSamplingSplitter
)
from evalml.preprocessing.data_splitters.training_va... | [
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
29186,
1431,
42,
37,
727,
198,
198,
6738,
5418,
4029,
13,
3866,
36948,
13,
7890,
62,
35312,
1010,
13,
27753,
62,
4871,
2649,
62,
37687,
20053,
1330,
357,
198,
220,
220,
220,
38984,
9487,
... | 3.387387 | 111 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
9979,
415,
13,
22973,
34184,
1187,
1330,
163... | 2.446809 | 47 |