content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
API for proxy
"""
from core import exceptions
from core.web import WebHandler
from service.proxy.serializers import ProxySerializer
from service.proxy.proxy import proxy_srv
from utils import log as logger
from utils.routes import route
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
17614,
329,
15741,
198,
37811,
628,
198,
6738,
4755,
1330,
13269,
198,
6738,
4755,
13,
12384,
1330,
53... | 3.292135 | 89 |
#!/usr/bin/python3
from projects.crawler_for_prodect_category.category_output import output_utils
import codecs
Logger = output_utils.Logger
def output(filename, datas):
"""
html
:return:
"""
Logger.info('Output to html file, please wait ...')
# object_serialize('object.pkl',self.datas)
#... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
6738,
4493,
13,
66,
39464,
62,
1640,
62,
1676,
67,
478,
62,
22872,
13,
22872,
62,
22915,
1330,
5072,
62,
26791,
198,
11748,
40481,
82,
198,
198,
11187,
1362,
796,
5072,
62,
26791,
13,
... | 2.069838 | 988 |
#!/usr/bin/env python
# Copyright 2016-2019 Biomedical Imaging Group Rotterdam, Departments of
# Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
1584,
12,
23344,
8436,
35914,
48656,
4912,
18481,
353,
11043,
11,
2129,
32514,
286,
198,
2,
8366,
554,
18982,
873,
290,
5325,
12371,
11,
5256,
8597,
385,
13122,
11,
1848... | 3.744395 | 223 |
"""
Background vs Foreground Image segmentation. The goal is to produce a segmentation map that imitates
videocalls tools like the ones implemented in Google Meet, Zoom without using Deep Learning- or Machine Learning-
based techniques.
This script does the following:
- builds a background model using the first 3s ... | [
37811,
198,
21756,
3691,
4558,
2833,
7412,
10618,
341,
13,
383,
3061,
318,
284,
4439,
257,
10618,
341,
3975,
326,
545,
38654,
198,
85,
485,
420,
5691,
4899,
588,
262,
3392,
9177,
287,
3012,
21167,
11,
40305,
1231,
1262,
10766,
18252,
... | 2.172912 | 2,562 |
from entity import Entity
| [
6738,
9312,
1330,
20885,
198
] | 5.2 | 5 |
#!/opt/conda/envs/rapids/bin/python3
#
# Copyright (c) 2020, NVIDIA 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/LICENSE-2.0
#
# Unless ... | [
2,
48443,
8738,
14,
66,
13533,
14,
268,
14259,
14,
2416,
2340,
14,
8800,
14,
29412,
18,
198,
2,
198,
2,
15069,
357,
66,
8,
12131,
11,
15127,
23929,
44680,
6234,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
... | 2.963668 | 578 |
#! /usr/bin/env python
'''
This script calculates fractions of SNPs with iHS values above 2.0 over
genomic windows of specified size.
#Example input:
#CHROM POS iHS
chr1 14548 -3.32086
chr1 14670 -2.52
chr1 19796 0.977669
chr1 19798 3.604374
chr1 29412 -0.308192
chr1 29813 2.231736
chr1 29847 0.6594
chr1 29873 -2.0... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
198,
1212,
4226,
43707,
49876,
286,
11346,
12016,
351,
1312,
7998,
3815,
2029,
362,
13,
15,
625,
198,
5235,
10179,
9168,
286,
7368,
2546,
13,
198,
198,
2,
16281,
5128,
25,... | 2.17037 | 2,160 |
# Import the needed management objects from the libraries. The azure.common library
# is installed automatically with the other libraries.
from azure.common.client_factory import get_client_from_cli_profile
from azure.mgmt.resource import ResourceManagementClient
from utils.dbconn import *
from utils.logger import *
fr... | [
2,
17267,
262,
2622,
4542,
5563,
422,
262,
12782,
13,
383,
35560,
495,
13,
11321,
5888,
198,
2,
318,
6589,
6338,
351,
262,
584,
12782,
13,
198,
6738,
35560,
495,
13,
11321,
13,
16366,
62,
69,
9548,
1330,
651,
62,
16366,
62,
6738,
... | 4.068966 | 116 |
import numpy
from scipy import stats
from modules import controler
# To compile, us Auto Py to Exe:
# Step 1 - install Auto Py to Exe, if not already done
# To install the application run this line in cmd:
# pip install auto-py-to-exe
# To open the application run this line in cmd:
# auto-py-to-exe
# Step 2 - read the... | [
11748,
299,
32152,
198,
6738,
629,
541,
88,
1330,
9756,
198,
6738,
13103,
1330,
1630,
263,
198,
198,
2,
1675,
17632,
11,
514,
11160,
9485,
284,
1475,
68,
25,
198,
2,
5012,
352,
532,
2721,
11160,
9485,
284,
1475,
68,
11,
611,
407,
... | 2.474057 | 424 |
# 10000 iterations, just for relative comparison
# 2.7.5 3.3.2
# FilesCompleter 75.1109 69.2116
# FastFilesCompleter 0.7383 1.0760
if __name__ == '__main__':
import sys
import timeit
from argcomplete.completers import FilesCompleter
from _pytest._argcomplete im... | [
198,
198,
2,
33028,
34820,
11,
655,
329,
3585,
7208,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
362,
13,
22,
13,
20,
220,
220,
220,
220,
513,
13,
18,
13,
... | 2.253247 | 308 |
from dataclasses import dataclass
from bindings.gmd.time_edge_property_type import TimePrimitivePropertyType
__NAMESPACE__ = "http://www.opengis.net/gml"
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
34111,
13,
70,
9132,
13,
2435,
62,
14907,
62,
26745,
62,
4906,
1330,
3862,
23828,
1800,
21746,
6030,
198,
198,
834,
45,
29559,
47,
11598,
834,
796,
366,
4023,
1378,
2503,
13,
... | 3 | 52 |
import os
from compas_assembly.datastructures import Assembly
from compas_assembly.geometry import Arch
from compas_assembly.rhino import AssemblyArtist
from compas.rpc import Proxy
proxy = Proxy()
proxy.restart_server()
try:
HERE = os.path.dirname(__file__)
except NameError:
HERE = os.getcwd()
DATA = os.p... | [
11748,
28686,
198,
198,
6738,
552,
292,
62,
41873,
13,
19608,
459,
1356,
942,
1330,
10006,
198,
6738,
552,
292,
62,
41873,
13,
469,
15748,
1330,
5579,
198,
6738,
552,
292,
62,
41873,
13,
17179,
2879,
1330,
10006,
43020,
198,
198,
6738... | 3.976378 | 508 |
# -*- coding: utf-8 -*-
# Copyright (C) 2017-2019 by
# David Amos <somacdivad@gmail.com>
# Randy Davila <davilar@uhd.edu>
# BSD license.
#
# Authors: David Amos <somacdivad@gmail.com>
# Randy Davila <davilar@uhd.edu>
"""Assorted degree related graph utilities.
"""
import collections
from grinpy i... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
220,
220,
220,
15069,
357,
34,
8,
2177,
12,
23344,
416,
198,
2,
220,
220,
220,
3271,
49104,
1279,
82,
296,
330,
7146,
324,
31,
14816,
13,
785,
29,
198,
2,
... | 2.483146 | 3,560 |
"""Contain the tests for the handlers of each supported GitHub webhook."""
| [
37811,
4264,
391,
262,
5254,
329,
262,
32847,
286,
1123,
4855,
21722,
3992,
25480,
526,
15931,
201,
198
] | 4.222222 | 18 |
# Pytests to test the Polygon domain type in the domain.json schema file
import pytest
from jsonschema.exceptions import ValidationError
pytestmark = pytest.mark.schema("/schemas/domain")
def test_missing_composite_axis(validator, polygon_domain):
''' Invalid: Polygon domain with missing 'composite' axis '''
... | [
2,
9485,
41989,
284,
1332,
262,
12280,
14520,
7386,
2099,
287,
262,
7386,
13,
17752,
32815,
2393,
198,
198,
11748,
12972,
9288,
198,
6738,
44804,
684,
2395,
2611,
13,
1069,
11755,
1330,
3254,
24765,
12331,
198,
198,
9078,
9288,
4102,
79... | 2.529492 | 1,458 |
from django.conf import settings
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from django.utils import timezone
from rest_framework.authtoken.models import Token
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
21928,
198,
6738,
42625,
14208,
13,
6381,
17147,
1330,
9733,
198,
67... | 3.743902 | 82 |
import unittest
from app.models import Post,User
from app import db | [
11748,
555,
715,
395,
198,
6738,
598,
13,
27530,
1330,
2947,
11,
12982,
198,
6738,
598,
1330,
20613
] | 3.722222 | 18 |
import sys, pygame, math, random
from Wall import *
from Ghost import *
from Manpac import *
from Norb import *
from Score import *
pygame.init()
clock = pygame.time.Clock()
width = 700
height = 700
size = width, height
bgColor = r,g,b = 0, 0, 0
screen = pygame.display.set_mode(size)
while True:
ghosts = [Gh... | [
11748,
25064,
11,
12972,
6057,
11,
10688,
11,
4738,
198,
6738,
5007,
1330,
1635,
198,
6738,
9897,
1330,
1635,
198,
6738,
1869,
33587,
1330,
1635,
198,
6738,
5414,
65,
1330,
1635,
198,
6738,
15178,
1330,
1635,
198,
198,
9078,
6057,
13,
... | 1.669436 | 5,055 |
import logging
import multiprocessing
import sys
from Bio import Entrez
from tqdm import tqdm
from SNDG import execute, mkdir
from SNDG.WebServices import download_file
from SNDG.WebServices.NCBI import NCBI
Entrez.email = 'A.N.Other@example.com'
_log = logging.getLogger(__name__)
from collections import defaultdi... | [
11748,
18931,
198,
11748,
18540,
305,
919,
278,
198,
11748,
25064,
198,
198,
6738,
16024,
1330,
7232,
21107,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
198,
6738,
311,
8575,
38,
1330,
12260,
11,
33480,
15908,
198,
6738,
311,
... | 1.974818 | 3,852 |
"""Cut properly some text."""
import re
END_OF_SENTENCE_CHARACTERS = {".", ";", "!", "?"}
def properly_cut_text(
text: str, start_idx: int, end_idx: int, nbr_before: int = 30, nbr_after: int = 30
) -> str:
"""Properly cut a text around some interval."""
str_length = len(text)
start_idx = max(0, star... | [
37811,
26254,
6105,
617,
2420,
526,
15931,
198,
198,
11748,
302,
198,
198,
10619,
62,
19238,
62,
50,
3525,
18310,
62,
38019,
10659,
4877,
796,
19779,
33283,
366,
26,
1600,
366,
40754,
366,
1701,
92,
628,
198,
4299,
6105,
62,
8968,
62,... | 2.232376 | 383 |
# [3] n
import string
tmp = string.digits+string.ascii_uppercase[:6]
'''
.
1 (0.01ms, 10.3MB)
2 (0.02ms, 10.3MB)
3 (0.02ms, 10.3MB)
4 (0.03ms, 10.4MB)
5 (0.11ms, 10.3MB)
6 (0.11ms, 10.4MB)
7 (0.21ms, 10.3MB)
8 (0.14ms, 10.3MB)
9 (0.12ms, 10.2MB)
10 (0.14ms, 10.3MB)
11 (0.14ms, 10... | [
2,
685,
18,
60,
299,
220,
198,
198,
11748,
4731,
198,
22065,
796,
4731,
13,
12894,
896,
10,
8841,
13,
292,
979,
72,
62,
7211,
2798,
589,
58,
25,
21,
60,
198,
198,
7061,
6,
198,
764,
198,
220,
220,
198,
352,
220,
197,
357,
15,
... | 1.570156 | 449 |
from abc import abstractmethod
from typing import Any, List
import torch
def reparameterize(mu: torch.Tensor, log_var: torch.Tensor) -> torch.Tensor:
"""
Reparameterization trick to sample from N(mu, var) from N(0,1).
:param mu: (Tensor) Mean of the latent Gaussian [B x D]
:param log_var: (Tensor) S... | [
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
19720,
1330,
4377,
11,
7343,
198,
198,
11748,
28034,
628,
198,
198,
4299,
1128,
41158,
2357,
1096,
7,
30300,
25,
28034,
13,
51,
22854,
11,
2604,
62,
7785,
25,
28034,
13,
51,
22854,
8,
46... | 2.582474 | 194 |
# -*- coding: utf-8 -*-
import re
import pandas as pd
import multiprocessing
from multiprocessing.dummy import Pool as ThreadPool
import logging
from .utils import isNull
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
302,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
18540,
305,
919,
278,
198,
6738,
18540,
305,
919,
278,
13,
67,
13513,
1330,
19850,
355,
14122,
27201,
198,
... | 3.185185 | 54 |
from django.urls import path, include
from rest_framework import routers
from core import views
router = routers.DefaultRouter()
router.register('coffe_types', views.CoffeTypeViewSet, base_name='coffe_types')
router.register('harvests', views.HarvestViewSet, base_name='harvests')
router.register(
'storage_repor... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
198,
6738,
1334,
62,
30604,
1330,
41144,
198,
198,
6738,
4755,
1330,
5009,
628,
198,
472,
353,
796,
41144,
13,
19463,
49,
39605,
3419,
198,
472,
353,
13,
30238,
10786,
1073,... | 2.935484 | 155 |
from django.db import models
from core.utils.cnpj_is_valid import cnpj_is_valid
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
4755,
13,
26791,
13,
31522,
79,
73,
62,
271,
62,
12102,
1330,
269,
37659,
73,
62,
271,
62,
12102,
628
] | 2.793103 | 29 |
#!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseStamped
from styx_msgs.msg import Lane, Waypoint
from scipy.spatial import KDTree
import numpy as np
from std_msgs.msg import Int32
import math
'''
This node will publish waypoints from the car's current position to some `x` distance ahead.
As men... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
686,
2777,
88,
198,
6738,
22939,
62,
907,
14542,
13,
19662,
1330,
37557,
1273,
13322,
198,
6738,
8944,
87,
62,
907,
14542,
13,
19662,
1330,
15016,
11,
6378,
4122,
198,
6738... | 3.279133 | 369 |
from typing import Any
import cv2
import numpy as np
from sigmarsGarden.config import Configuration
from sigmarsGarden.parse import circle_coords
if __name__ == "__main__":
main()
| [
6738,
19720,
1330,
4377,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
264,
17225,
945,
38,
5872,
13,
11250,
1330,
28373,
198,
6738,
264,
17225,
945,
38,
5872,
13,
29572,
1330,
9197,
62,
1073,
3669,
628,... | 3.098361 | 61 |
import torch
from transformers import GPT2Tokenizer, GPT2LMHeadModel
from torch.utils.data import TensorDataset, DataLoader
# reference: \transformers\generation_utils.py
tokenizer = GPT2Tokenizer.from_pretrained('gpt2/en')
model = GPT2LMHeadModel.from_pretrained('gpt2/en')
# ds = read_data('./romeo_and_juliet.... | [
11748,
28034,
198,
6738,
6121,
364,
1330,
402,
11571,
17,
30642,
7509,
11,
402,
11571,
17,
31288,
13847,
17633,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
309,
22854,
27354,
292,
316,
11,
6060,
17401,
198,
2,
4941,
25,
3467,
35636,
... | 2.261589 | 302 |
from cc3d import CompuCellSetup
from connectivityTestSteppables import connectivityTestSteppable
CompuCellSetup.register_steppable(steppable=connectivityTestSteppable(frequency=1))
CompuCellSetup.run()
| [
6738,
36624,
18,
67,
1330,
3082,
84,
28780,
40786,
198,
198,
6738,
19843,
14402,
7447,
381,
2977,
1330,
19843,
14402,
7447,
381,
540,
198,
198,
7293,
84,
28780,
40786,
13,
30238,
62,
4169,
381,
540,
7,
4169,
381,
540,
28,
8443,
3458,
... | 3.360656 | 61 |
from models.genetic_algorithms.population import Population | [
6738,
4981,
13,
5235,
5139,
62,
282,
7727,
907,
13,
39748,
1330,
20133
] | 4.538462 | 13 |
from django.urls import path
from . import views
app_name = 'campaigns'
urlpatterns = [
path('<int:campaign_id>/', views.Campaign.as_view(), name='campaign'),
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
1330,
5009,
198,
198,
1324,
62,
3672,
796,
705,
35012,
82,
6,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
27,
600,
25,
35012,
62,
312,
29,
14,... | 2.783333 | 60 |
# -*- coding: iso-8859-15 -*-
import spanishconjugator
from spanishconjugator.SpanishConjugator import Conjugator
# ----------------------------------- Imperfect Indicative ----------------------------------- # | [
2,
532,
9,
12,
19617,
25,
47279,
12,
3459,
3270,
12,
1314,
532,
9,
12,
198,
11748,
599,
7115,
1102,
31761,
1352,
198,
6738,
599,
7115,
1102,
31761,
1352,
13,
43584,
3103,
31761,
1352,
1330,
1482,
31761,
1352,
198,
198,
2,
20368,
632... | 4.22 | 50 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 17:37:31 2020
@author: robertopitz
"""
import numpy as np
from random import randrange
from math import isnan
import pygame as pg
#==MAIN CODE==================================================================
board = [list("x--------x---|-... | [
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,
3300,
1737,
1511,
1596,
25,
2718,
25,
3132,
12131,
198,
198,
31,
9800,
25,
686,
4835,
404... | 1.619424 | 1,390 |
# coding:utf-8
import ConfigParser
import sys
__author__ = '4ikist'
from core.engine import NotificatonIniter, TalkHandler, VKEventHandler
if __name__ == '__main__':
main() | [
2,
19617,
25,
40477,
12,
23,
201,
198,
11748,
17056,
46677,
201,
198,
11748,
25064,
201,
198,
201,
198,
834,
9800,
834,
796,
705,
19,
1134,
396,
6,
201,
198,
201,
198,
6738,
4755,
13,
18392,
1330,
1892,
811,
13951,
818,
2676,
11,
... | 2.60274 | 73 |
from utils.yacs_config import CfgNode as CN
__C = CN()
cfg = __C
# cfg.canvas_init=0
cfg.use_vit=0
cfg.use_fast_vit=0
cfg.img_mean=-1
cfg.vit_mlp_dim=2048
cfg.vit_depth=8
cfg.vit_dropout=1
cfg.concat_one_hot=0
cfg.mask_out_prevloc_samples=0
#cfg.input_id_canvas=0
cfg.register_deprecated_key('input_id_canvas')
cfg.use_... | [
6738,
3384,
4487,
13,
88,
16436,
62,
11250,
1330,
327,
40616,
19667,
355,
31171,
198,
834,
34,
796,
31171,
3419,
198,
37581,
796,
11593,
34,
198,
2,
30218,
70,
13,
5171,
11017,
62,
15003,
28,
15,
198,
37581,
13,
1904,
62,
85,
270,
... | 2.108896 | 652 |
#!/usr/bin/env python3
import sys
from itertools import repeat, product
from operator import mul
from functools import reduce
inputFile = 'input'
if len(sys.argv) >= 2:
inputFile = sys.argv[1]
heightmap : list[list[int]] = []
with open(inputFile) as fin:
for line in fin:
heightmap.append([int(c) for ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
6738,
340,
861,
10141,
1330,
9585,
11,
1720,
198,
6738,
10088,
1330,
35971,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
198,
15414,
8979,
796,
705,
15414,
... | 2.463731 | 386 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains custom tray balloon
"""
from __future__ import print_function, division, absolute_import
from Qt.QtWidgets import QWidget, QSystemTrayIcon, QMenu
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
26796,
326,
4909,
2183,
26473,
21190,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,... | 3 | 74 |
# coding: utf-8
sales= [255, 100, 353, 400]
print len(sales)
print sales[2]
sales[2] = 100
print sales[2]
#
print 100 in sales
print 500 in sales
# range
print range(10)
print range(3,10)
print range(3,10,2)
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
82,
2040,
28,
685,
13381,
11,
1802,
11,
47567,
11,
7337,
60,
198,
4798,
18896,
7,
82,
2040,
8,
198,
4798,
4200,
58,
17,
60,
198,
82,
2040,
58,
17,
60,
796,
1802,
198,
4798,
4200,
58,
17,
... | 2.344444 | 90 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import coloredlogs
import logging
import json
import itertools
import shlex
import time
import queue
import sys
import os
import collections
import tempfile
from jsonpath_ng import jsonpath, parse
from .runner import AsyncRunner
from .common import merge_p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1822,
29572,
198,
11748,
16396,
6404,
82,
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
340,
861,
10141,
... | 1.875332 | 754 |
'''
FuSeConv: Fully Separable Convolutions for Fast Inference on Systolic Arrays
Authors: Surya Selvam, Vinod Ganesan, Pratyush Kumar
Email ID: selvams@purdue.edu, vinodg@cse.iitm.ac.in, pratyush@cse.iitm.ac.in
'''
import os
import torch
import wandb
import random
import argparse
import torchvision
import torch.nn as ... | [
7061,
6,
198,
41133,
4653,
3103,
85,
25,
40234,
8621,
283,
540,
1482,
10396,
3508,
329,
12549,
554,
4288,
319,
1632,
301,
4160,
943,
20477,
198,
30515,
669,
25,
311,
1601,
64,
15300,
85,
321,
11,
11820,
375,
402,
7305,
272,
11,
1736... | 2.676707 | 498 |
import os.path
from fabric.api import local, env
from fabric.utils import fastprint
from prezi.fabric.s3 import CommonTasks, S3Deploy, NoopServiceManager
env.forward_agent = True
env.user = 'publisher'
env.roledefs = {'production': [], 'stage': [], 'local': []}
tasks = CommonTasks(SingleVirtualenvS3Deploy, 'snake... | [
11748,
28686,
13,
6978,
198,
6738,
9664,
13,
15042,
1330,
1957,
11,
17365,
198,
6738,
9664,
13,
26791,
1330,
3049,
4798,
198,
6738,
662,
17027,
13,
36434,
1173,
13,
82,
18,
1330,
8070,
51,
6791,
11,
311,
18,
49322,
11,
1400,
404,
16... | 2.962121 | 132 |
from __future__ import unicode_literals
import warnings
from django import get_version as get_django_version
__title__ = "dj-stripe"
__summary__ = "Django + Stripe Made Easy"
__uri__ = "https://github.com/pydanny/dj-stripe/"
__version__ = "0.5.0"
__author__ = "Daniel Greenfeld"
__email__ = "pydanny@gmail.com"
__li... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
14601,
198,
198,
6738,
42625,
14208,
1330,
651,
62,
9641,
355,
651,
62,
28241,
14208,
62,
9641,
198,
198,
834,
7839,
834,
796,
366,
28241,
12,
33565,
431,
1,
198,... | 2.624535 | 269 |
import logging
import os
import time
import numpy as np
from autolamella.acquire import (
grab_images,
save_reference_images,
save_final_images,
)
from autolamella.align import realign
from autolamella.autoscript import reset_state
def _milling_coords(microscope, stage_settings, my_lamella, pattern):
... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
640,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1960,
349,
480,
8466,
13,
330,
29782,
1330,
357,
198,
220,
220,
220,
5552,
62,
17566,
11,
198,
220,
220,
220,
3613,
62,
35790,
... | 2.376179 | 3,182 |
import pygame
from Robot import Robot | [
11748,
12972,
6057,
198,
6738,
16071,
1330,
16071
] | 4.625 | 8 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017~2999 - cologler <skyoflw@gmail.com>
# ----------
#
# ----------
from typing import Iterable
from itertools import zip_longest
from .internal import TypeMatcher
from .g import isinstanceof, issubclassof
def match(args: (list, tuple), types: Iterable... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
66,
8,
2177,
93,
1959,
2079,
532,
269,
928,
1754,
1279,
15688,
1659,
75,
86,
31,
14816,
13,
... | 2.352645 | 397 |
from aetherling.space_time.space_time_types import *
from aetherling.space_time.nested_counters import *
from aetherling.modules.ram_any_type import *
from aetherling.modules.term_any_type import TermAnyType
from aetherling.modules.mux_any_type import DefineMuxAnyType
from aetherling.modules.map_fully_parallel_sequenti... | [
6738,
257,
6750,
1359,
13,
13200,
62,
2435,
13,
13200,
62,
2435,
62,
19199,
1330,
1635,
198,
6738,
257,
6750,
1359,
13,
13200,
62,
2435,
13,
77,
7287,
62,
66,
15044,
1330,
1635,
198,
6738,
257,
6750,
1359,
13,
18170,
13,
859,
62,
... | 3.173913 | 207 |
# Process two rose images by summing them together
# FIN Laske kaksi ruusukuvaa yhteen
#
# Samuli Siltanen April 2021
# Python-knns Ville Tilvis 2021
import numpy as np
import matplotlib.pyplot as plt
# Read in the images
# FIN Lue kuvat levylt
im1 = plt.imread('../_kuvat/ruusu1.png')
im2 = plt.imread('../_kuvat/ruu... | [
2,
10854,
734,
8278,
4263,
416,
2160,
2229,
606,
1978,
198,
2,
33642,
10123,
365,
479,
4730,
72,
7422,
385,
33263,
6862,
64,
331,
71,
7821,
198,
2,
198,
2,
3409,
32176,
311,
2326,
272,
268,
3035,
33448,
198,
2,
11361,
12,
15418,
5... | 2.272897 | 535 |
##############################
# Copyright (C) 2009-2011 by
# Dent Earl (dearl@soe.ucsc.edu, dent.earl@gmail.com)
# Benedict Paten (benedict@soe.ucsc.edu, benedict.paten@gmail.com)
# Mark Diekhans (markd@soe.ucsc.edu)
# ... and other members of the Reconstruction Team of David Haussler's
# lab (BME Dept. UCSC).
#
# ... | [
14468,
7804,
4242,
2235,
198,
2,
15069,
357,
34,
8,
3717,
12,
9804,
416,
220,
198,
2,
39078,
21647,
357,
67,
451,
75,
31,
568,
68,
13,
1229,
1416,
13,
15532,
11,
18794,
13,
451,
75,
31,
14816,
13,
785,
8,
198,
2,
28697,
3208,
... | 3.294466 | 506 |
from django.contrib import admin
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from django.utils.html import format_html
from datetime import date, datetime
from django_summernote.admin import SummernoteModelAdmin
from mptt.admin import MPTTModelAdmin, DraggableMPTTAdmin
from .m... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
42625,
14208,
13,
26791... | 3.14346 | 237 |
# connectorDetails
# Returns a connector object if a valid identifier was provided.
# Reference: https://fivetran.com/docs/rest-api/connectors#retrieveconnectordetails
import fivetran_api
# Fivetran API URL (Replace {connector_id} with a valid connector id).
url = "https://api.fivetran.com/v1/connectors/{connector_i... | [
2,
21716,
24259,
198,
2,
16409,
257,
21716,
2134,
611,
257,
4938,
27421,
373,
2810,
13,
198,
198,
2,
20984,
25,
3740,
1378,
13261,
2213,
272,
13,
785,
14,
31628,
14,
2118,
12,
15042,
14,
8443,
669,
2,
1186,
30227,
8443,
585,
316,
... | 3 | 123 |
from django.contrib import admin
from .models import Address, Coupon, Item, Order, OrderItem, Payment, Session
make_refund_accepted.short_description = "Update orders to refound granted"
admin.site.register(Item)
admin.site.register(Order, OrderAdmin)
admin.site.register(OrderItem)
admin.site.register(Payment)... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
27530,
1330,
17917,
11,
43156,
261,
11,
9097,
11,
8284,
11,
8284,
7449,
11,
28784,
11,
23575,
628,
198,
198,
15883,
62,
5420,
917,
62,
13635,
276,
13,
19509,
62,
1... | 3.295455 | 132 |
"""Metadata for cleaning, re-encoding, and documenting coded data columns.
These dictionaries are used to create Encoder instances. They contain the following keys:
'df': A dataframe associating short codes with long descriptions and other information.
'code_fixes': A dictionary mapping non-standard codes to canonical... | [
37811,
9171,
14706,
329,
12724,
11,
302,
12,
12685,
7656,
11,
290,
33045,
30817,
1366,
15180,
13,
198,
198,
4711,
48589,
3166,
389,
973,
284,
2251,
14711,
12342,
10245,
13,
1119,
3994,
262,
1708,
8251,
25,
198,
1549,
69,
10354,
317,
1... | 1.591034 | 23,376 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
import unittest
from cdm.utilities import StorageUtils
| [
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,
5964,
1321,
13,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
22927,
76,
... | 4.176471 | 51 |
import raguel.fptp
import raguel.irv | [
11748,
34232,
2731,
13,
69,
457,
79,
198,
11748,
34232,
2731,
13,
343,
85
] | 2.571429 | 14 |
# -*- coding: utf-8 -*-
"""
Part of slugdetection package
@author: Deirdree A Polak
github: dapolak
"""
import numpy as np
import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt
from pyspark.sql import functions as F
from pyspark.sql.window import Window
def confusion_mat(cm, labels, titl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
7841,
286,
31065,
15255,
3213,
5301,
198,
198,
31,
9800,
25,
1024,
1447,
631,
317,
2165,
461,
198,
12567,
25,
288,
499,
349,
461,
198,
37811,
198,
198,
117... | 2.515188 | 823 |
import os
import time
import yaml
import argparse
from PIL import Image
import matplotlib.pyplot as plt
from vietocr.tool.predictor import Predictor
from vietocr.tool.config import Cfg
if __name__ == "__main__":
main()
| [
11748,
28686,
198,
11748,
640,
198,
11748,
331,
43695,
198,
11748,
1822,
29572,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
410,
1155,
1696,
13,
25981,
13,
79,
17407,
... | 2.948052 | 77 |
# -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# Copyright 2020 VMware, Inc. All rights reserved.
# AUTO GENERATED FILE -- DO NOT MODIFY!
#
# vAPI stub file for package com.vmware.esx.settings.depot_content.components.
#--------------------------------------------... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
10097,
32284,
198,
2,
15069,
12131,
37754,
11,
3457,
13,
220,
1439,
2489,
10395,
13,
198,
198,
2,
47044,
46,
24700,
1137,
11617,
45811,
1377,
8410,
5626,
19164,
5064,... | 3.431429 | 350 |
#! python3
# Multi-atlas segmentation scheme trying to give a platform to do tests before translating them to the plugin.
from __future__ import print_function
from GetMetricFromElastixRegistration import GetFinalMetricFromElastixLogFile
from MultiAtlasSegmentation import MultiAtlasSegmentation
from ApplyBiasCorrection... | [
2,
0,
21015,
18,
198,
2,
15237,
12,
265,
21921,
10618,
341,
7791,
2111,
284,
1577,
257,
3859,
284,
466,
5254,
878,
34665,
606,
284,
262,
13877,
13,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
3497,
9171,
1173,
486... | 2.979306 | 3,286 |
# -*- coding: utf-8 -*-
"""
jes.gui.dialogs.intro
=====================
The "intro" dialog, which displays the JESIntroduction.txt file.
:copyright: (C) 2014 Matthew Frazier and Mark Guzdial
:license: GNU GPL v2 or later, see jes/help/JESCopyright.txt for details
"""
from __future__ import with_statement
import JES... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
73,
274,
13,
48317,
13,
38969,
18463,
13,
600,
305,
198,
4770,
1421,
28,
198,
464,
366,
600,
305,
1,
17310,
11,
543,
11298,
262,
449,
1546,
21906,
13,
14... | 3.338798 | 183 |
"""Assist
"""
| [
37811,
8021,
396,
198,
198,
37811,
198
] | 2.142857 | 7 |
import tornado.web
import tornado.websocket
import tornado.httpserver
import tornado.ioloop
from worker_gateway.server import WebSocketChannelHandler
from heartbeat.handler import HeartbeatHandler
from orm import Worker
if __name__ == '__main__':
Worker.cull_worker()
app = Application()
server = tornad... | [
11748,
33718,
13,
12384,
198,
11748,
33718,
13,
732,
1443,
5459,
198,
11748,
33718,
13,
5450,
18497,
198,
11748,
33718,
13,
1669,
11224,
198,
198,
6738,
8383,
62,
10494,
1014,
13,
15388,
1330,
5313,
39105,
29239,
25060,
198,
6738,
36051,
... | 3.166667 | 132 |
import time
from websocket_server import WebsocketServer
# Called for every client connecting (after handshake)
# Called for every client disconnecting
# Called when a client sends a message
PORT=80
HOST='0.0.0.0'
server = WebsocketServer(PORT, host=HOST)
server.set_fn_new_client(new_client)
server.set_fn_cli... | [
11748,
640,
198,
6738,
2639,
5459,
62,
15388,
1330,
47736,
5459,
10697,
198,
198,
2,
34099,
329,
790,
5456,
14320,
357,
8499,
42231,
8,
198,
220,
220,
220,
220,
198,
2,
34099,
329,
790,
5456,
22837,
278,
628,
198,
2,
34099,
618,
257... | 3.121212 | 132 |
import collections
| [
11748,
17268,
198,
220,
220,
220,
220,
220,
220,
220,
220
] | 2.454545 | 11 |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import seaborn as sns
get_ipython().run_line_magic('matplotlib', 'inline')
import matplotlib.pyplot as plt
# In[2]:
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import classification_report
from sklearn.m... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
16,
5974,
628,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
384,
397,
1211,
355,
3013... | 2.67346 | 2,208 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as 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,
2829,
17752,
355,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
9979,
415,
13,
22973,
3418... | 2.58 | 50 |
#!/usr/bin/env python
""" Newton Generate Boot Images
Usage:
generateBootImage.py <target> <file_name> [--sim][--frontdoor][--seed=<seed_value>][--count=<word_count>][--hsp_fw_0p97]
Options:
-h --help Shows this help message.
Target is one of the following:
useq_seq_ram : Microsequencer Sequence RAM
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
17321,
2980,
378,
18892,
5382,
198,
198,
28350,
25,
198,
220,
220,
220,
7716,
36476,
5159,
13,
9078,
1279,
16793,
29,
1279,
7753,
62,
3672,
29,
685,
438,
14323,
7131,
438,
... | 2.475281 | 890 |
import os, json
__author__ = 'Manfred Minimair <manfred@minimair.org>'
| [
11748,
28686,
11,
33918,
198,
198,
834,
9800,
834,
796,
705,
5124,
39193,
1855,
320,
958,
1279,
805,
39193,
31,
1084,
320,
958,
13,
2398,
29,
6,
628
] | 2.607143 | 28 |
from setuptools import setup
setup(
name="scienz",
version="0.0.1",
packages=["scienz"],
zip_safe=False,
include_package_data=True,
package_data={"scienz": ["scienz/*"],},
long_description="""
Common dataset definitions for aorist package.
""",
long_description_content_type="tex... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
36216,
19471,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
15,
13,
16,
1600,
198,
220,
220,
220,
10392,
28,
14692,
36216,
19471,
33116,
198,
2... | 2.534351 | 131 |
#!-*- conding: utf8 -*-
#coding: utf-8
"""
Aluno: Gabriel Ribeiro Camelo
Matricula: 401091
"""
import matplotlib.pyplot as pplt # grficos
import math # Matemtica
import re # expresses regulares
import numpy as np # matrizes
from statistics import pstd... | [
198,
2,
0,
12,
9,
12,
1779,
278,
25,
3384,
69,
23,
532,
9,
12,
198,
2,
66,
7656,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
978,
36909,
25,
17371,
23133,
68,
7058,
7298,
22126,
198,
220,
220,
220,
6550,
1173,
... | 2.126744 | 860 |
#!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: weixin.py
@time: 2018-02-10 17:55
"""
import re
import time
import hashlib
# from urlparse import urljoin # PY2
# from urllib.parse import urljoin # PY3
from future.moves.urllib.parse import urljoin
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
31,
9800,
25,
1976,
33255,
258,
198,
31,
43776,
25,
9485,
1925,
1670,
198,
31,
7753,
25,
356,
844,
259,
13,
9078,
198,
31,
2... | 2.396682 | 663 |
import numpy
arr = map(int, input().strip().split(' '))
d2_arr = numpy.array(list(arr))
d2_arr.shape = (3, 3)
print(d2_arr)
| [
11748,
299,
32152,
628,
198,
3258,
796,
3975,
7,
600,
11,
5128,
22446,
36311,
22446,
35312,
10786,
705,
4008,
198,
67,
17,
62,
3258,
796,
299,
32152,
13,
18747,
7,
4868,
7,
3258,
4008,
198,
67,
17,
62,
3258,
13,
43358,
796,
357,
1... | 2.25 | 56 |
import os.path
import json
| [
11748,
28686,
13,
6978,
198,
11748,
33918,
628,
628,
628,
628,
628,
198
] | 2.846154 | 13 |
import multiprocessing
import os
from settings.default import QUANDL_TICKERS, CPD_QUANDL_OUTPUT_FOLDER_DEFAULT
N_WORKERS = len(QUANDL_TICKERS)
if not os.path.exists(CPD_QUANDL_OUTPUT_FOLDER_DEFAULT):
os.mkdir(CPD_QUANDL_OUTPUT_FOLDER_DEFAULT)
all_processes = [
f'python script_cpd_example.py "{ticker}" "{os.... | [
11748,
18540,
305,
919,
278,
198,
11748,
28686,
198,
198,
6738,
6460,
13,
12286,
1330,
19604,
6981,
43,
62,
51,
11860,
4877,
11,
327,
5760,
62,
10917,
6981,
43,
62,
2606,
7250,
3843,
62,
37,
3535,
14418,
62,
7206,
38865,
198,
198,
4... | 2.270833 | 240 |
# Generated by Django 3.1.7 on 2021-03-08 14:49
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
22,
319,
33448,
12,
3070,
12,
2919,
1478,
25,
2920,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# -*- coding: utf-8 -*-
from odoo import models, fields, api
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
6738,
16298,
2238,
1330,
4981,
11,
7032,
11,
40391,
201,
198,
201
] | 2.275862 | 29 |
"""iex_parser"""
from .parser import Parser
from .messages import DEEP_1_0, TOPS_1_6, TOPS_1_5
__all__ = [
'Parser',
'DEEP_1_0',
'TOPS_1_5',
'TOPS_1_6'
]
| [
37811,
494,
87,
62,
48610,
37811,
198,
198,
6738,
764,
48610,
1330,
23042,
263,
198,
6738,
764,
37348,
1095,
1330,
5550,
8905,
62,
16,
62,
15,
11,
28662,
50,
62,
16,
62,
21,
11,
28662,
50,
62,
16,
62,
20,
198,
198,
834,
439,
834... | 1.849462 | 93 |
from pathlib import Path
import json
import re
import numpy as np
import os
from collections import OrderedDict
from .TxtMpiFile import TxtMpiFile
from .BaseSource import BaseSource
from tweezers.meta import MetaDict, UnitDict
def getData(self):
"""
Return the experiment data.
Returns:
... | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
764,
51,
742,
44,
14415,
8979,
1330,
309,
742,
44,
... | 2.187601 | 3,081 |
# keys
IMPLEMENTATION_FILE_PATHS_KEY = r'implementation_file_paths'
LPROJ_DIR_PATHS_KEY = r'lproj_file_paths'
KEY_KEY = r'key'
TRANSLATION_KEY = r'translation'
# file names
LOCALIZABLE_STRINGS_FILE_NAME = r'Localizable.strings'
| [
198,
198,
2,
8251,
198,
3955,
16437,
10979,
6234,
62,
25664,
62,
47,
1404,
7998,
62,
20373,
796,
374,
6,
320,
32851,
62,
7753,
62,
6978,
82,
6,
198,
43,
31190,
41,
62,
34720,
62,
47,
1404,
7998,
62,
20373,
796,
374,
6,
75,
1676,... | 2.32 | 100 |
#!/usr/bin/env python3
from threading import Thread
from time import sleep
import logging
import shexter.requester
import shexter.platform as platform
import shexter.config
"""
This file is for the shexter daemon, which runs persistantly. Every 5 seconds, it polls the phone to see if there are
unread messages. If t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
4704,
278,
1330,
14122,
198,
6738,
640,
1330,
3993,
198,
11748,
18931,
198,
198,
11748,
673,
87,
353,
13,
8897,
7834,
198,
11748,
673,
87,
353,
13,
24254,
355,
3859,
1... | 2.788006 | 717 |
import sys
import os
import logging
import time
import datetime
from PIL import (
Image,
ImageDraw,
ImageFont
)
from config import *
from util import *
from info_epd import praytimes
DEBUG_PRAYTIMES = False
| [
11748,
25064,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
640,
198,
11748,
4818,
8079,
198,
198,
6738,
350,
4146,
1330,
357,
198,
220,
220,
220,
7412,
11,
198,
220,
220,
220,
7412,
25302,
11,
198,
220,
220,
220,
7412,
23252,
198... | 2.960526 | 76 |
import pandas as pd
import pytest
from denstatbank.denstatbank import StatBankClient
from denstatbank.utils import data_dict_to_df, add_list_to_dict
from .mock_responses import (
mock_sub_resp_default,
mock_sub_resp_2401,
mock_tables_resp,
mock_tableinfo_resp,
mock_tableinfo_variable_resp,
mock_... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
12972,
9288,
198,
6738,
2853,
14269,
17796,
13,
6559,
14269,
17796,
1330,
5133,
28650,
11792,
198,
6738,
2853,
14269,
17796,
13,
26791,
1330,
1366,
62,
11600,
62,
1462,
62,
7568,
11,
751,
62,... | 2.527324 | 1,775 |
if __name__ == '__main__':
main() | [
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.222222 | 18 |
import sys
from os.path import join, dirname
with open(join(dirname(sys.executable), 'license.lic'), 'rb') as fs:
with open(join(sys._MEIPASS, 'license.lic'), 'wb') as fd:
fd.write(fs.read())
| [
11748,
25064,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
26672,
3672,
198,
4480,
1280,
7,
22179,
7,
15908,
3672,
7,
17597,
13,
18558,
18187,
828,
705,
43085,
13,
677,
33809,
705,
26145,
11537,
355,
43458,
25,
198,
220,
220,
220,
351,... | 2.5 | 82 |
from django.template import Library
register = Library()
hundreds = [
'',
'',
'',
'',
'',
'',
'',
'',
'',
''
]
first_decade = [
'',
('', ''),
('', ''),
'',
'',
'',
'',
'',
'',
''
]
second_decade = [
'',
'',
'',
'',
... | [
6738,
42625,
14208,
13,
28243,
1330,
10074,
198,
198,
30238,
796,
10074,
3419,
628,
198,
71,
20960,
796,
685,
198,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
705,
3256,
198,
220,
220,
220,
705,
3256... | 1.589041 | 292 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from sympy import *
x, y, z = symbols('x y z')
init_printing(use_unicode=True)
print(Eq(x, y))
print(solveset(Eq(x**2, 1), x))
print(solveset(Eq(x**2 - 1, 0), x))
print(solveset(x**2 - 1, x))
print(solveset(x**2 - x, x))
print(solveset(x - x, x, domain=S.Reals))
print(so... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
10558,
88,
1330,
1635,
198,
87,
11,
331,
11,
1976,
796,
14354,
10786,
87,
331,
1976,
11537,
198,
15003,
62... | 1.973717 | 799 |
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='ptwitter',
version='0.0.1',
description="Tiny python library for Twitter's REST API.",
author='Mitchel Kelonye',
author_email='kelonyemitchel@gmail.com',
url='https://github.com/kelonye/python-twitter',
packages... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
457,
86,
1967,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
15,
... | 2.598765 | 162 |
import sys
import a
print(datetime, sys, a) | [
11748,
25064,
198,
11748,
257,
198,
198,
4798,
7,
19608,
8079,
11,
25064,
11,
257,
8
] | 2.75 | 16 |
"""
Unit tests for resdk/resources/utils.py file.
"""
# pylint: disable=missing-docstring, protected-access
import unittest
import six
from mock import MagicMock, call, patch
from resdk.resources import Collection, Data, Process, Relation, Sample
from resdk.resources.utils import (
_print_input_line, endswith_co... | [
37811,
198,
26453,
5254,
329,
581,
34388,
14,
37540,
14,
26791,
13,
9078,
2393,
13,
198,
37811,
198,
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
15390,
8841,
11,
6861,
12,
15526,
198,
198,
11748,
555,
715,
395,
198,
198,
11748,
223... | 2.439909 | 441 |
"""test unit for core/initializer.py"""
import runtime_path # isort:skip
from core.initializer import *
TEST_SHAPE = (100000, 1)
TOR = 1e-2
| [
37811,
9288,
4326,
329,
4755,
14,
36733,
7509,
13,
9078,
37811,
198,
198,
11748,
19124,
62,
6978,
220,
1303,
318,
419,
25,
48267,
198,
198,
6738,
4755,
13,
36733,
7509,
1330,
1635,
198,
198,
51,
6465,
62,
9693,
45721,
796,
357,
3064,
... | 2.637931 | 58 |
#!/usr/bin/env python
# (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>
# modified by Tomas Karasek <tomas.karasek@digile.fi>
#
# This file is part of Ansible,
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
357,
66,
8,
2321,
11,
16556,
569,
10094,
5826,
7718,
11650,
78,
1279,
3876,
1073,
31,
363,
1015,
68,
13,
785,
29,
198,
2,
220,
220,
220,
220,
9518,
416,
42884,
9375,
589,
... | 2.546622 | 4,826 |
from datetime import date
import numpy as np
from sklearn.metrics import (
roc_curve,
auc,
)
import torch
from torch.utils.data import DataLoader
from .metrics import accuracy_thresh, fbeta, pairwise_confusion_matrix
import pandas as pd
from tqdm import tqdm
| [
6738,
4818,
8079,
1330,
3128,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
357,
198,
220,
220,
220,
686,
66,
62,
22019,
303,
11,
198,
220,
220,
220,
257,
1229,
11,
198,
8,
198,
198,
11748,
... | 2.863158 | 95 |
import collections
import xml.etree.ElementTree as x_etree
import synapse.common as s_common
import synapse.lib.syntax as s_syntax
# Special Element Handler Classes
elemcls = {
x_etree.Element: XmlDataElem,
}
def initelem(item, name=None, parent=None):
'''
Construct a new DataElem from the given item u... | [
11748,
17268,
198,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
2124,
62,
316,
631,
198,
198,
11748,
6171,
7512,
13,
11321,
355,
264,
62,
11321,
198,
198,
11748,
6171,
7512,
13,
8019,
13,
1837,
41641,
355,
264,
62,
1837,
... | 2.621891 | 201 |
bl_info = {
"name": "plantFEM (Seed)",
"author": "Haruka Tomobe",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > plantFEM Object",
"description": "Adds a new plantFEM Object",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
}
import bpy
from bp... | [
198,
2436,
62,
10951,
796,
1391,
198,
220,
220,
220,
366,
3672,
1298,
366,
15060,
37,
3620,
357,
50,
2308,
42501,
198,
220,
220,
220,
366,
9800,
1298,
366,
13587,
14852,
4186,
5910,
1600,
198,
220,
220,
220,
366,
9641,
1298,
357,
16... | 2.485893 | 319 |
from assignment_1.envs.gaussianBandit import gaussianBandit
from assignment_1.envs.bernoulliBandit import bernoulliBandit
from assignment_1.envs.RWE import RWE | [
6738,
16237,
62,
16,
13,
268,
14259,
13,
4908,
31562,
31407,
270,
1330,
31986,
31562,
31407,
270,
198,
6738,
16237,
62,
16,
13,
268,
14259,
13,
33900,
280,
15516,
31407,
270,
1330,
275,
1142,
280,
15516,
31407,
270,
198,
6738,
16237,
... | 3.057692 | 52 |
# -*- coding: utf-8 -*-
import unittest
from datetime import datetime, timedelta
from context import aged_out_report, find_todays_file
if __name__ == '__main__':
unittest.main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
555,
715,
395,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
4732,
1330,
9722,
62,
448,
62,
13116,
11,
1064,
62,
83,
375,
592,... | 2.633803 | 71 |
"Usage: python -m get_version ./setup.py"
import setuptools
import sys
setuptools.setup = lambda *args, version=None, **kwargs: print(version)
exec(open(sys.argv[1]).read())
| [
1,
28350,
25,
21015,
532,
76,
651,
62,
9641,
24457,
40406,
13,
9078,
1,
198,
198,
11748,
900,
37623,
10141,
198,
11748,
25064,
198,
198,
2617,
37623,
10141,
13,
40406,
796,
37456,
1635,
22046,
11,
2196,
28,
14202,
11,
12429,
46265,
22... | 2.809524 | 63 |
#!/usr/bin/python3
from dialectUtil import *
from java.javaProperty import JAVAProperty
from java.javaSnippets import *
from java.javaLink import JAVALink
import constants as CONST
JAVA_PROPERTIES = {}
JAVA_PROPERTIES['JAVA_AUTO_IMPORTABLE'] = ['created_by','last_modified_by','created_date', 'last_modified_date'] | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
6738,
23637,
18274,
346,
1330,
1635,
198,
6738,
20129,
13,
12355,
21746,
1330,
449,
10116,
32,
21746,
198,
6738,
20129,
13,
12355,
16501,
3974,
1039,
1330,
1635,
198,
6738,
20129,
13,
12355... | 2.889908 | 109 |
from tkinter import *
import os
main = Tk()
main.geometry('{}x{}'.format(550, 550))
main.wm_title("Welcome to Face Recognition Based Attendence System ")
svalue3= StringVar() # defines the widget state as string
svalue2 = StringVar()
#imagePath = PhotoImage(file="facerec.png")
#widgetf = Label(main, image=imagePath).... | [
6738,
256,
74,
3849,
1330,
1635,
198,
11748,
28686,
198,
198,
12417,
796,
309,
74,
3419,
198,
12417,
13,
469,
15748,
10786,
90,
92,
87,
90,
92,
4458,
18982,
7,
22730,
11,
25240,
4008,
198,
12417,
13,
26377,
62,
7839,
7203,
14618,
28... | 2.605911 | 406 |
"""Extensions module - Set up for additional libraries can go in here."""
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy() | [
37811,
11627,
5736,
8265,
532,
5345,
510,
329,
3224,
12782,
460,
467,
287,
994,
526,
15931,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
628,
198,
9945,
796,
16363,
2348,
26599,
3419
] | 3.8 | 35 |
#!/usr/bin/env python3
#
# Copyright 2017-2020 GridGain Systems.
#
# 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 applicab... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
15069,
2177,
12,
42334,
24846,
38,
391,
11998,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
... | 3.757576 | 198 |