content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#!/bin/python3
#Alexis Brunet alias AlexTheGeek
####################
## HUE COLOR LOOP ##
####################
import time
import os
import requests
from os.path import join, dirname
from dotenv import load_dotenv
from flask import Flask, render_template, request
app = Flask(__name__)
STARTING = '{"on":true,"bri":254... | [
2,
48443,
8800,
14,
29412,
18,
198,
2,
15309,
271,
15700,
316,
16144,
4422,
464,
10082,
988,
198,
14468,
4242,
198,
2235,
367,
8924,
20444,
1581,
17579,
3185,
22492,
198,
14468,
4242,
198,
198,
11748,
640,
198,
11748,
28686,
198,
11748,... | 2.646341 | 246 |
from django.contrib import admin
from .models import *
admin.site.register(IdentityProvider, IdentityProviderAdmin)
admin.site.register(ExternalIdentity, ExternalIdentityAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
27530,
1330,
1635,
628,
198,
28482,
13,
15654,
13,
30238,
7,
7390,
26858,
29495,
11,
27207,
29495,
46787,
8,
198,
198,
28482,
13,
15654,
13,
30238,
7,
41506,
7390,
2... | 3.693878 | 49 |
from setuptools import setup, find_packages
version = '0.0.5'
setup(
name="alerta-observium",
version=version,
description='Alerta webhook for Obseervium NMS',
url='https://github.com/alerta/alerta-contrib',
license='MIT',
author='Iskren Hadzhinedev',
author_email='iskren.hadzhinedev@x3me.... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
9641,
796,
705,
15,
13,
15,
13,
20,
6,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
44598,
64,
12,
672,
3168,
1505,
1600,
198,
220,
220,
220,
2196,
28,
9... | 2.256318 | 277 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
2,
16529,
1783,
10541,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
5964,
1321,
13,
198,
2,
16529,
1783,
10541,
198,... | 4.671875 | 640 |
from datetime import datetime
from unittest.mock import Mock
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker # type: ignore
from antarest.core.persistence import Base
from antarest.core.utils.fastapi_sqlalchemy import DBSessionMiddleware, db
from antarest.login.model impo... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
198,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
629,
19458,
62,
29891,
11,
6246,
10297,
220... | 3.22561 | 164 |
"""Support to send data to a Splunk instance."""
import asyncio
from http import HTTPStatus
import json
import logging
import time
from aiohttp import ClientConnectionError, ClientResponseError
from hass_splunk import SplunkPayloadError, hass_splunk
import voluptuous as vol
from homeassistant.const import (
CONF_... | [
37811,
15514,
284,
3758,
1366,
284,
257,
13341,
2954,
4554,
526,
15931,
198,
11748,
30351,
952,
198,
6738,
2638,
1330,
14626,
19580,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
640,
198,
198,
6738,
257,
952,
4023,
1330,
20985,
32048... | 2.154897 | 1,756 |
import random
alf=["а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь","э","ю","я",".",",",":","?"]
zam=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]
p=17
q=11
file=open('text.txt',encod... | [
11748,
4738,
201,
198,
201,
198,
201,
198,
1604,
28,
14692,
16142,
2430,
140,
109,
2430,
38857,
2430,
140,
111,
2430,
43666,
2430,
16843,
2430,
141,
239,
2430,
140,
114,
2430,
140,
115,
2430,
18849,
2430,
140,
117,
2430,
31583,
2430,
... | 1.594891 | 274 |
from django.test import TestCase, Client
from .models import Profile
from django.contrib.auth.models import User
import unittest
from .forms import SignUpForm
from .signals import show_login_message, show_logout_message
from django.contrib.auth.signals import user_logged_out, user_logged_in
from django.contrib i... | [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
11,
20985,
201,
198,
6738,
764,
27530,
1330,
13118,
201,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
201,
198,
11748,
555,
715,
395,
201,
198,
6738,
764,
... | 3.282895 | 152 |
# (C) 2022 GoodData Corporation
from __future__ import annotations
from pathlib import Path
from typing import Any, List, Optional, Type
import attr
from gooddata_metadata_client.model.declarative_data_source import DeclarativeDataSource
from gooddata_metadata_client.model.declarative_data_sources import Declarative... | [
2,
357,
34,
8,
33160,
4599,
6601,
10501,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
4377,
11,
7343,
11,
32233,
11,
5994,
198,
198,
11748,
708,
81,
198,
198,
6738,
922,
... | 3.15534 | 309 |
# Copyright (c) Anish Acharya.
# Licensed under the MIT License
import numpy as np
from .base_gar import GAR
from typing import List
"""
Ghosh et.al. Communication-Efficient and Byzantine-Robust Distributed Learning with Error Feedback
"""
| [
2,
15069,
357,
66,
8,
1052,
680,
26219,
43898,
13,
198,
2,
49962,
739,
262,
17168,
13789,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
8692,
62,
4563,
1330,
402,
1503,
198,
6738,
19720,
1330,
7343,
198,
198,
37811,
198,
... | 3.681818 | 66 |
# -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
24893,
1087,
14573,
15708,
318,
10607,
284,
1104,
262,
1280,
2723,
2055,
416,
1642,
5525,
241,
251,
165,
110,
116,
162,
247,
118,
12859,
239,
12,
18796,
101,... | 3.605263 | 228 |
from wpilib.command import Subsystem
from constants import Constants
from utils import singleton, lazytalonsrx
import logging
from commands import rollclimbroller
class ClimbRoller(Subsystem, metaclass=singleton.Singleton):
"""The climb roller subsystem controlls the rollers on the end of the front arm."""
d... | [
6738,
266,
79,
22282,
13,
21812,
1330,
3834,
10057,
198,
6738,
38491,
1330,
4757,
1187,
198,
6738,
3384,
4487,
1330,
2060,
1122,
11,
16931,
39240,
684,
40914,
198,
11748,
18931,
198,
6738,
9729,
1330,
4836,
565,
14107,
10646,
628,
198,
... | 2.53663 | 546 |
from objects.components import Component, types, ComponentPriority
from objects.components.state import TunableStateTypeReference, TunableStateValueReference
from sims4.tuning.tunable import HasTunableFactory, AutoFactoryInit, TunableList, TunableReference, Tunable
import services
import sims4.resources
from snippets i... | [
6738,
5563,
13,
5589,
3906,
1330,
35100,
11,
3858,
11,
35100,
22442,
414,
198,
6738,
5563,
13,
5589,
3906,
13,
5219,
1330,
13932,
540,
9012,
6030,
26687,
11,
13932,
540,
9012,
11395,
26687,
198,
6738,
985,
82,
19,
13,
28286,
278,
13,
... | 3.788136 | 118 |
from .lexer import Lexer
from dataclasses_json import dataclass_json
from dataclasses import dataclass, field
from typing import List, Tuple, Union
# Parser of .base files
# Syntax is semicolon separated list of qualified types
@dataclass_json
@dataclass
@dataclass_json
@dataclass
| [
198,
6738,
764,
2588,
263,
1330,
17210,
263,
198,
198,
6738,
4818,
330,
28958,
62,
17752,
1330,
4818,
330,
31172,
62,
17752,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
19720,
1330,
7343,
11,
309,
29... | 3.096774 | 93 |
#
# Copyright (c) 2013 - 2017, 2019 Software AG, Darmstadt, Germany and/or its licensors
#
# 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,
198,
2,
15069,
357,
66,
8,
2211,
532,
2177,
11,
13130,
10442,
13077,
11,
360,
1670,
38863,
11,
4486,
290,
14,
273,
663,
8240,
669,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
36... | 2.748552 | 863 |
from __future__ import unicode_literals
import logging
LOGGER = logging.getLogger(__name__)
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
18931,
198,
198,
25294,
30373,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
220,
220,
220,
220,
628,
628,
198,
220,
220,
220,
220
] | 2.634146 | 41 |
# add dependency directory to the Python path
import site
import os.path
site.addsitedir(os.path.join(os.path.dirname(__file__), 'deps'))
# call header.py
from xpidl import header
header.main() | [
2,
751,
20203,
8619,
284,
262,
11361,
3108,
201,
198,
11748,
2524,
201,
198,
11748,
28686,
13,
6978,
201,
198,
201,
198,
15654,
13,
2860,
82,
863,
343,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
... | 2.816901 | 71 |
from snim.snim_state import SnimState | [
6738,
3013,
320,
13,
16184,
320,
62,
5219,
1330,
5489,
320,
9012
] | 3.083333 | 12 |
# imports
from __future__ import print_function
from IPython.display import display, Image
from six.moves import cPickle as pickle
from six.moves.urllib.request import urlretrieve
from sklearn.linear_model import LogisticRegression
import imageio
import matplotlib.pyplot as plt
import numpy as np
import os
import sys
i... | [
2,
17944,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
6101,
7535,
13,
13812,
1330,
3359,
11,
7412,
198,
6738,
2237,
13,
76,
5241,
1330,
269,
31686,
293,
355,
2298,
293,
198,
6738,
2237,
13,
76,
5241,
13,
333,
297,... | 2.353357 | 1,132 |
from module1 import func1
print("imported module2")
print(func1(2))
| [
6738,
8265,
16,
1330,
25439,
16,
198,
198,
4798,
7203,
320,
9213,
8265,
17,
4943,
198,
4798,
7,
20786,
16,
7,
17,
4008,
198
] | 2.875 | 24 |
import argparse
import json
import torch
from torch import nn
from torch.autograd import Variable
from torchvision import models
from collections import OrderedDict
from PIL import Image
import numpy as np
import numbers
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
6738,
28034,
10178,
1330,
4981,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
... | 3.581081 | 74 |
import time
import gevent
import operator
from collections import OrderedDict
from protocol import BaseProtocol
from p2p_protocol import P2PProtocol
from service import WiredService
import multiplexer
from muxsession import MultiplexedSession
from crypto import ECIESDecryptionError
import slogging
import gevent.socket
... | [
11748,
640,
198,
11748,
4903,
1151,
198,
11748,
10088,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
8435,
1330,
7308,
19703,
4668,
198,
6738,
279,
17,
79,
62,
11235,
4668,
1330,
350,
17,
47,
19703,
4668,
198,
6738,
2139,
1... | 3.617647 | 136 |
# Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
2,
15069,
383,
4946,
31709,
41935,
46665,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
9... | 2.799003 | 1,806 |
"""Interfaces for interacting with Build Blockers job property plugin"""
import xml.etree.ElementTree as ElementTree
from pyjen.utils.xml_plugin import XMLPlugin
class BuildBlockerProperty(XMLPlugin):
"""Wrapper for Build Blocker job properties
https://wiki.jenkins-ci.org/display/JENKINS/Build+Blocker+Plugin... | [
37811,
9492,
32186,
329,
24986,
351,
10934,
9726,
364,
1693,
3119,
13877,
37811,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
11703,
27660,
198,
6738,
12972,
48796,
13,
26791,
13,
19875,
62,
33803,
1330,
23735,
37233,
628,
198,... | 2.577812 | 1,298 |
# coding: utf-8
"""
Mailchimp Marketing API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 3.0.74
Contact: apihelp@mailchimp.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
11099,
354,
11011,
22137,
7824,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
2451,
7928,
6127,
5235,
3740,
1378,
12567,
13,
785,
14,
2032,
7928,
12,
1504... | 2.335248 | 9,748 |
import pytest
import responses
from globus_sdk._testing import load_response_set
@pytest.mark.parametrize(
"filter_val",
[
"mapped_collections",
"mapped-collections",
"MaPpeD-cOLlectiOns",
"guest-collections",
"guest_Collections",
["Mapped-Collections", "Man... | [
11748,
12972,
9288,
198,
11748,
9109,
198,
6738,
15095,
385,
62,
21282,
74,
13557,
33407,
1330,
3440,
62,
26209,
62,
2617,
628,
628,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7,
198,
220,
220,
220,
366,
24455,
6... | 2.141361 | 191 |
import numpy as np
def dichotomy(f, a, b, epsilon=1.0e-5):
"""Tradional dichotomy to find a root of a function
"""
fa = f(a)
while True:
c = (a + b) / 2.0
if (b - a) <= epsilon:
return c
fc = f(c)
if fc * fa < 0:
b = c
else:
fa... | [
11748,
299,
32152,
355,
45941,
198,
198,
4299,
36638,
38385,
7,
69,
11,
257,
11,
275,
11,
304,
862,
33576,
28,
16,
13,
15,
68,
12,
20,
2599,
198,
220,
220,
220,
37227,
2898,
324,
1538,
36638,
38385,
284,
1064,
257,
6808,
286,
257,... | 1.761021 | 431 |
from pathlib import Path
from typing import Dict
import numpy as np
import json
import uuid
class Dataset:
"""
Class used to load datasets as published in
del Sagrado, José del Águila, Isabel M. Orellana, Francisco J.
Multi-objective ant colony optimization for requirements selection.
Empirical So... | [
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
360,
713,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
11748,
334,
27112,
628,
198,
4871,
16092,
292,
316,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5016,
... | 2.360686 | 1,633 |
from exercices.solutions.framework.core.base import BasePage
from exercices.solutions.framework.pages.newUserPage import newUserPage
| [
6738,
4208,
1063,
13,
82,
14191,
13,
30604,
13,
7295,
13,
8692,
1330,
7308,
9876,
198,
6738,
4208,
1063,
13,
82,
14191,
13,
30604,
13,
31126,
13,
3605,
12982,
9876,
1330,
649,
12982,
9876,
628,
198
] | 3.75 | 36 |
# from .post_process import detector_postprocess | [
2,
422,
764,
7353,
62,
14681,
1330,
31029,
62,
7353,
14681
] | 4.363636 | 11 |
import os
from pathlib import Path
| [
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198
] | 3.888889 | 9 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import utils_functional
'''
Custom layers for SC
'''
class Conv2d_Add_Partial(nn.Conv2d):
'''
SC Conv2d using partial binary add
'''
def forward(self, input, prec=7, err=7, forward='1d_bin', generator='lfsr', z_unit=8, legacy=Fal... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
198,
11748,
3384,
4487,
62,
45124,
198,
198,
7061,
6,
198,
15022,
11685,
329,
6374,
198,
7061,
6,
198,
198,
4871,
34872,... | 2.630225 | 622 |
from fastapi import FastAPI, Path, status
from pydantic import BaseModel
from fastapi.responses import JSONResponse
from starlette.status import (
HTTP_200_OK,
HTTP_404_NOT_FOUND,
HTTP_409_CONFLICT
)
from database import CoralDatabase, get_coral_by_catalog_number_db, \
get_coral_by_category_db, add_coral_t... | [
6738,
3049,
15042,
1330,
12549,
17614,
11,
10644,
11,
3722,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
198,
6738,
3049,
15042,
13,
16733,
274,
1330,
19449,
31077,
198,
6738,
3491,
21348,
13,
13376,
1330,
357,
198,
220,
220,
220,
146... | 2.569231 | 260 |
"""Global configuration used across all subsystems."""
import os
__version__ = os.getenv("PKG_VERSION", "0.0.0")
epilog = "‹/› with ♥ from South Dakota © 2018 Jake Brinkmann"
| [
37811,
22289,
8398,
973,
1973,
477,
39335,
82,
526,
15931,
198,
198,
11748,
28686,
198,
198,
834,
9641,
834,
796,
28686,
13,
1136,
24330,
7203,
40492,
38,
62,
43717,
1600,
366,
15,
13,
15,
13,
15,
4943,
198,
198,
538,
346,
519,
796,... | 2.825397 | 63 |
"""
InfluxDB Query Object.
"""
import functools
from influxalchemy import meta
class InfluxDBQuery:
"""
InfluxDB Query object.
entities (tuple): Query entities
client (InfluxAlchemy): InfluxAlchemy instance
expressions (tuple): Query filters
groupby (str): ... | [
37811,
198,
18943,
22564,
11012,
43301,
9515,
13,
198,
37811,
198,
11748,
1257,
310,
10141,
198,
198,
6738,
25065,
282,
26599,
1330,
13634,
628,
198,
4871,
4806,
22564,
11012,
20746,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
48... | 2.026139 | 1,339 |
import numpy as np
from scipy import interpolate
import ezdxf
import h5py
from copy import copy
from Roadways import *
def NormalVectorToLineSegment(linepts, pt):
"""
linepts = np.array([[x1,x2],[y1,y2]])
pt.shape = (2,N) # can be single pt or multiple pts
"""
if pt.ndim == 1:
pt = np.expan... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
39555,
378,
198,
11748,
304,
89,
67,
26152,
198,
11748,
289,
20,
9078,
198,
6738,
4866,
1330,
4866,
198,
6738,
5567,
1322,
1330,
1635,
198,
198,
4299,
14435,
38469,
2514,
1... | 1.91624 | 4,883 |
values = [6, 5, 3, 1, 8, 7, 2, 4]
print (values)
values = selection_sort(values)
| [
198,
27160,
796,
685,
21,
11,
642,
11,
513,
11,
352,
11,
807,
11,
767,
11,
362,
11,
604,
60,
198,
4798,
357,
27160,
8,
198,
27160,
796,
6356,
62,
30619,
7,
27160,
8,
198
] | 2.342857 | 35 |
#!/usr/bin/python3
from scapy.all import *
import socket
import sys
import signal
import os
conf_ack_received = False
conf_ack_sent = False
debug = False
if os.environ.get("DEBUG"):
debug = True
if len(sys.argv) < 2:
print("Usage %s PPTP_Server to test for CVE-2020-8597" %(sys.argv[0]));
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
6738,
629,
12826,
13,
439,
1330,
1635,
198,
11748,
17802,
198,
11748,
25064,
198,
11748,
6737,
198,
11748,
28686,
198,
10414,
62,
441,
62,
47844,
796,
10352,
198,
10414,
62,
441,
62,... | 2.504442 | 1,576 |
#import speech_recognition as sr
import wave
import io
import io, os
from google.auth import environment_vars
from google.cloud import speech | [
2,
11748,
4046,
62,
26243,
653,
355,
19677,
198,
11748,
6769,
198,
11748,
33245,
198,
11748,
33245,
11,
28686,
198,
6738,
23645,
13,
18439,
1330,
2858,
62,
85,
945,
198,
6738,
23645,
13,
17721,
1330,
4046
] | 3.916667 | 36 |
# Generated by Django 3.2.9 on 2021-12-08 10:41
import datetime
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
24,
319,
33448,
12,
1065,
12,
2919,
838,
25,
3901,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.972222 | 36 |
# Copyright (c) 2019 Microsoft Corporation
# Distributed under the MIT software license
# TODO: Test EBMUtils
from sklearn.utils.extmath import softmax
import numpy as np
import logging
log = logging.getLogger(__name__)
# TODO: Clean up
| [
2,
15069,
357,
66,
8,
13130,
5413,
10501,
198,
2,
4307,
6169,
739,
262,
17168,
3788,
5964,
198,
2,
16926,
46,
25,
6208,
412,
12261,
18274,
4487,
198,
198,
6738,
1341,
35720,
13,
26791,
13,
2302,
11018,
1330,
2705,
9806,
198,
11748,
... | 3.315068 | 73 |
from .base import BaseBackend
from .github import GitHubIssueBackend, GitHubPullRequestBackend
__all__ = [
'BaseBackend',
'GitHubIssueBackend',
'GitHubPullRequestBackend',
]
| [
6738,
764,
8692,
1330,
7308,
7282,
437,
198,
6738,
764,
12567,
1330,
21722,
45147,
7282,
437,
11,
21722,
42940,
18453,
7282,
437,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
14881,
7282,
437,
3256,
198,
220,
220,
220,
... | 2.833333 | 66 |
import os
import signal
import unittest
from mysos.common.cluster import ClusterManager
from mysos.common.testing import Fake
from mysos.executor.noop_installer import NoopPackageInstaller
from mysos.executor.mysos_task_runner import MysosTaskRunner
from mysos.executor.task_runner import TaskError
from mysos.executor.... | [
11748,
28686,
198,
11748,
6737,
198,
11748,
555,
715,
395,
198,
198,
6738,
616,
82,
418,
13,
11321,
13,
565,
5819,
1330,
38279,
13511,
198,
6738,
616,
82,
418,
13,
11321,
13,
33407,
1330,
33482,
198,
6738,
616,
82,
418,
13,
18558,
3... | 3.352727 | 275 |
#!/usr/bin/env python
import numpy as np
import sklearn
from sklearn.preprocessing import LabelEncoder
import pickle
from sensor_stick.srv import GetNormals
from sensor_stick.features import compute_color_histograms
from sensor_stick.features import compute_normal_histograms
from visualization_msgs.msg import Marker... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1341,
35720,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
36052,
27195,
12342,
198,
198,
11748,
2298,
293,
198,
198,
6738,
12694,
62,
13... | 2.910987 | 719 |
from cloudbutton.multiprocessing import Process, JoinableQueue
if __name__ == '__main__':
q = JoinableQueue()
p = Process(target=worker, args=(q,))
p.start()
for x in range(10):
q.put(x)
# uncomment to hang on the q.join
#q.put(11)
q.join()
q.put(-1) # end loop
p.join(... | [
6738,
6279,
16539,
13,
16680,
541,
305,
919,
278,
1330,
10854,
11,
15251,
540,
34991,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
10662,
796,
15251,
540,
34991,
3419,
198,
220,
220,
220... | 2.236111 | 144 |
__all__ = ('BlockStorageFile',)
import os
import struct
import logging
import errno
from multiprocessing.pool import ThreadPool
import pyoram
from pyoram.storage.block_storage import \
(BlockStorageInterface,
BlockStorageTypeFactory)
import tqdm
import six
from six.moves import xrange
log = logging.getLogg... | [
834,
439,
834,
796,
19203,
12235,
31425,
8979,
3256,
8,
198,
198,
11748,
28686,
198,
11748,
2878,
198,
11748,
18931,
198,
11748,
11454,
3919,
198,
6738,
18540,
305,
919,
278,
13,
7742,
1330,
14122,
27201,
198,
198,
11748,
12972,
273,
32... | 3.080906 | 309 |
from django.contrib.auth.mixins import LoginRequiredMixin
from django.apps import apps
from django.views.generic import DetailView, CreateView
from django.http import HttpResponse, HttpRequest, request
from django.core.signals import request_finished
from django.dispatch import receiver
Company = apps.get_model('Compa... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
19816,
1040,
1330,
23093,
37374,
35608,
259,
198,
6738,
42625,
14208,
13,
18211,
1330,
6725,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
42585,
7680,
11,
13610,
7680,
198,
6738,
... | 3.634409 | 93 |
import time
from tree_parser import *
from data_utils5 import *
import os
import withpool
text = file_contents()
database = meta_math_database(text,n=None, remember_proof_steps=True)
print()
lm = LanguageModel(database)
saved_interface = None
# import
import build_payout_data_set as pd
pd.initialize_interface(lm, ... | [
11748,
640,
198,
6738,
5509,
62,
48610,
1330,
1635,
198,
6738,
1366,
62,
26791,
20,
1330,
1635,
198,
11748,
28686,
198,
11748,
351,
7742,
198,
198,
5239,
796,
2393,
62,
3642,
658,
3419,
198,
48806,
796,
13634,
62,
11018,
62,
48806,
7,... | 2.411561 | 865 |
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | [
2,
198,
2,
770,
2723,
2393,
318,
636,
286,
262,
13113,
11012,
1280,
2723,
1628,
13,
198,
2,
198,
2,
15069,
1584,
12,
25579,
6139,
25896,
3457,
13,
290,
262,
13113,
11012,
7035,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11... | 3.734694 | 196 |
"""This file contains the implementation for basic pruning operations on arbitrary torch modules."""
import torch
import torch.nn as nn
import copy
from condense.optimizer.sparsity_functions import Constant
def calc_parameter_sparsity(p):
"""Calculates the sparsity percentage of a torch parameter.
Args:
... | [
37811,
1212,
2393,
4909,
262,
7822,
329,
4096,
778,
46493,
4560,
319,
14977,
28034,
13103,
526,
15931,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
4866,
198,
6738,
1779,
1072,
13,
40085,
7509,
13,
2777,
45... | 2.486653 | 1,461 |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
15069,
1584,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.220379 | 422 |
$NetBSD: patch-chavier_gui.py,v 1.1 2020/03/11 20:17:12 wiz Exp $
Convert to python3 syntax.
--- chavier/gui.py.orig 2011-08-08 19:23:18.000000000 +0000
+++ chavier/gui.py
- print 'CHART STATE'
- print '-' * 70
- print 'surface: %d x %d' % (alloc.width, alloc.height)
- print 'area :', ... | [
3,
7934,
21800,
25,
8529,
12,
354,
19492,
62,
48317,
13,
9078,
11,
85,
352,
13,
16,
12131,
14,
3070,
14,
1157,
1160,
25,
1558,
25,
1065,
266,
528,
5518,
720,
198,
198,
3103,
1851,
284,
21015,
18,
15582,
13,
198,
198,
6329,
442,
... | 2.016245 | 554 |
from rest_framework import serializers
from longclaw.longclaworders.models import Order, OrderItem
from longclaw.longclawproducts.serializers import ProductVariantSerializer
from longclaw.longclawshipping.serializers import AddressSerializer
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
6738,
890,
43143,
13,
6511,
43143,
6361,
13,
27530,
1330,
8284,
11,
8284,
7449,
198,
6738,
890,
43143,
13,
6511,
43143,
29498,
13,
46911,
11341,
1330,
8721,
23907,
415,
32634,
7509,
198,
6... | 4.339286 | 56 |
import os
import sys
import csv
import time
from push_api import SalesforcePushApi
# Force UTF8 output
reload(sys)
sys.setdefaultencoding('UTF8')
if __name__ == '__main__':
try:
username = os.environ.get('SF_USERNAME')
password = os.environ.get('SF_PASSWORD')
serverurl = os.enviro... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
269,
21370,
198,
11748,
640,
198,
6738,
4574,
62,
15042,
1330,
17329,
3174,
49222,
32,
14415,
198,
198,
2,
5221,
41002,
23,
5072,
198,
260,
2220,
7,
17597,
8,
198,
17597,
13,
2617,
12286,
1... | 2.289186 | 823 |
from ..messages import (MSG_NO_NAME_GROUP, MSG_NOW_UNSUBCRIBE,
MSG_NO_USER_GROUP, msg_not_found_group_name,
msg_already_subscribed, msg_now_subscribed)
from pskgu_bot.db.services import (find_group_by_name, find_vk_user_by_id,
update_use... | [
6738,
11485,
37348,
1095,
1330,
357,
5653,
38,
62,
15285,
62,
20608,
62,
46846,
11,
49064,
62,
45669,
62,
4944,
12564,
2749,
7112,
12473,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 1.838372 | 860 |
# from network.models.exceptions import *
# from network.network import Network
# from network.models.tools import random_choice
# from itertools import combinations
# import numpy as np
| [
2,
422,
3127,
13,
27530,
13,
1069,
11755,
1330,
1635,
198,
2,
422,
3127,
13,
27349,
1330,
7311,
198,
2,
422,
3127,
13,
27530,
13,
31391,
1330,
4738,
62,
25541,
198,
2,
422,
340,
861,
10141,
1330,
17790,
198,
2,
1330,
299,
32152,
3... | 4.065217 | 46 |
import r_pyclass
r_pyclass.order()
| [
11748,
374,
62,
9078,
4871,
198,
81,
62,
9078,
4871,
13,
2875,
3419,
198
] | 2.5 | 14 |
#Developed by Zachary Williams
from tkinter import *
from functools import partial
from PIL import Image
import sys
from sys import platform
root = Tk()
z = mainclass(root)
root.mainloop()
sys.exit()
| [
2,
19246,
276,
416,
18825,
560,
6484,
201,
198,
201,
198,
6738,
256,
74,
3849,
1330,
1635,
201,
198,
6738,
1257,
310,
10141,
1330,
13027,
201,
198,
6738,
350,
4146,
1330,
7412,
201,
198,
11748,
25064,
201,
198,
6738,
25064,
1330,
3859... | 2.674699 | 83 |
while True:
try: e = input()
except: break
print(e.replace(' .', '.').replace(' ,', ','))
| [
4514,
6407,
25,
198,
220,
220,
1949,
25,
304,
796,
5128,
3419,
198,
220,
220,
2845,
25,
2270,
198,
220,
220,
3601,
7,
68,
13,
33491,
10786,
764,
3256,
705,
2637,
737,
33491,
10786,
837,
3256,
705,
4032,
4008,
198
] | 2.475 | 40 |
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision
import torchvision.transforms as transforms
import os
import argparse
from ResNet_CIFAR10 import *
from VGG_model import *
#########################################... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
28034,
13,
1891,
2412,
13,
66,
463,
20471,
355,
269,
463,
20471,
198,
19... | 2.629889 | 1,713 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
2,
16529,
1783,
10541,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
5964,
1321,
13,
198,
2,
16529,
1783,
10541,
198,... | 2.716998 | 2,212 |
"""
Data manipulation routines.
"""
from collections import namedtuple
import logging
import scipy.sparse as sps
import numpy as np
import pandas as pd
from csr import CSR
_log = logging.getLogger(__name__)
RatingMatrix = namedtuple('RatingMatrix', ['matrix', 'users', 'items'])
RatingMatrix.__doc__ = """
A rating m... | [
37811,
198,
6601,
17512,
31878,
13,
198,
37811,
198,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
11748,
18931,
198,
198,
11748,
629,
541,
88,
13,
82,
29572,
355,
599,
82,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
3... | 2.467588 | 941 |
# This file is part of the clacks framework.
#
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
from clacks.agent.objects.f... | [
2,
770,
2393,
318,
636,
286,
262,
537,
4595,
9355,
13,
198,
2,
198,
2,
220,
2638,
1378,
565,
4595,
12,
16302,
13,
2398,
198,
2,
198,
2,
15069,
25,
198,
2,
220,
357,
34,
8,
3050,
12,
6999,
402,
1340,
2149,
2937,
402,
2022,
39,
... | 2.462091 | 1,253 |
import bpy
import numpy as np
import glob
# Global consts
WIDTH = 160
HEIGHT = 120
PROJECT_PATH = "/PATH/TO/bad_apple_blender_cube"
FRAME_COUNT = len(glob.glob(f'{PROJECT_PATH}/frames/*.jpg'))
# Prepare particle system
cube = bpy.data.objects["Cube"]
degp = bpy.context.evaluated_depsgraph_get()
particle_systems = cu... | [
11748,
275,
9078,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
15095,
198,
198,
2,
8060,
1500,
82,
198,
54,
2389,
4221,
796,
13454,
198,
13909,
9947,
796,
7982,
198,
31190,
23680,
62,
34219,
796,
12813,
34219,
14,
10468,
14,
14774,
... | 2.710692 | 636 |
#!/usr/bin/env python
"""
MIT License
Original work Copyright (c) 2020 Ian Webster
Modified work Copyright (c) 2020-2021 Linus Bartsch
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 res... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
36393,
13789,
198,
198,
20556,
670,
15069,
357,
66,
8,
12131,
12930,
31890,
198,
5841,
1431,
670,
15069,
357,
66,
8,
12131,
12,
1238,
2481,
5164,
385,
347,
5889,
354,
... | 3.859238 | 341 |
"""
The datetime module supplies classes for manipulating dates and times, and contains many types, objects, and methods.
You've seen some of them used in the dow function, which returns the day of the week for a specific date. We'll use them
again in the next_date function, which takes the date_string parameter in the... | [
37811,
198,
464,
4818,
8079,
8265,
9416,
6097,
329,
29349,
9667,
290,
1661,
11,
290,
4909,
867,
3858,
11,
5563,
11,
290,
5050,
13,
198,
1639,
1053,
1775,
617,
286,
606,
973,
287,
262,
47276,
2163,
11,
543,
5860,
262,
1110,
286,
262,... | 3.817891 | 313 |
from __future__ import division
import json
import numpy as np
import matplotlib.pyplot as plt
import time
import random
from sklearn.linear_model import LogisticRegressionCV
from sklearn.ensemble import RandomForestClassifier as RFC
import pandas as pd
import operator
from sklearn.metrics import roc_curve, precision_r... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
640,
198,
11748,
4738,
198,
6738,
1341,
35720,
13,
29127,
62,
19849,
1... | 1.888451 | 3,299 |
# app.py
import pprint
import json
import bson
import jwt
import pymongo
import mongomock
import requests
from flask import Flask
from flask import jsonify
from flask import request
from flask import Response
from flask import abort
from flask import json,jsonify, make_response,session
from flask import render_templa... | [
2,
598,
13,
9078,
198,
198,
11748,
279,
4798,
198,
11748,
33918,
198,
11748,
275,
1559,
198,
11748,
474,
46569,
198,
198,
11748,
279,
4948,
25162,
198,
11748,
285,
506,
296,
735,
198,
11748,
7007,
198,
6738,
42903,
1330,
46947,
198,
6... | 2.357317 | 1,640 |
#!/usr/bin/env python3.8
import pyperclip
import random
import string
from py_lock import personas, profiles
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
13,
23,
198,
11748,
12972,
525,
15036,
198,
11748,
4738,
198,
11748,
4731,
198,
6738,
12972,
62,
5354,
1330,
1048,
292,
11,
16545,
628,
628,
628,
628,
628,
628,
628,
198,
361,
11593,
... | 2.824561 | 57 |
s=Set([1,2,3])
s.add(4)
print s
print ("contains 5,",s.contains(5))
print ("contains 4,",s.contains(4))
s.remove(3)
print (s)
print ("contains 3,",s.contains(3))
| [
198,
82,
28,
7248,
26933,
16,
11,
17,
11,
18,
12962,
198,
82,
13,
2860,
7,
19,
8,
198,
4798,
264,
198,
4798,
5855,
3642,
1299,
642,
553,
11,
82,
13,
3642,
1299,
7,
20,
4008,
198,
198,
4798,
5855,
3642,
1299,
604,
553,
11,
82,
... | 2.02439 | 82 |
import os
import sys
import argparse
import subprocess
import torch
import numpy as np
import time
import gym
import pybullet
import pybullet_envs
from mpi4py import MPI
comm = MPI.COMM_WORLD
from bevodevo.policies.rnns import GatedRNNPolicy
from bevodevo.policies.cnns import ImpalaCNNPolicy
from bevodevo.policies... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
1822,
29572,
198,
11748,
850,
14681,
198,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
198,
11748,
11550,
198,
11748,
12972,
15065,
1616,
198,
11748,
12972,
15065,... | 2.523232 | 990 |
# from django.db import models
from django.contrib.auth.models import AbstractUser
from django.db import models
# Create your models here. | [
2,
422,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
27741,
12982,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13
] | 3.657895 | 38 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2020 Rémi Flamary
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 th... | [
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,
36393,
13789,
198,
198,
15269,
357,
66,
8,
12131,
47957,
11632,
33104,
560,
198,
198,
5990,
3411,
318,
... | 2.735187 | 827 |
import googleSheetsApi
import eloCalculator
if __name__ == '__main__':
main() | [
11748,
23645,
3347,
1039,
32,
14415,
198,
11748,
1288,
78,
9771,
3129,
1352,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419
] | 2.645161 | 31 |
"""Test cli_parser."""
# 3rd Party
from pyiem.util import utc
import pytest
# Local
import pywwa
from pywwa.workflows import cli_parser
from pywwa.testing import get_example_file
@pytest.mark.parametrize("database", ["iem"])
def test_processor(cursor):
"""Test basic parsing."""
data = get_example_file("CLI.t... | [
37811,
14402,
537,
72,
62,
48610,
526,
15931,
198,
2,
513,
4372,
3615,
198,
6738,
12972,
26597,
13,
22602,
1330,
3384,
66,
198,
11748,
12972,
9288,
198,
198,
2,
10714,
198,
11748,
12972,
1383,
64,
198,
6738,
12972,
1383,
64,
13,
1818,... | 2.446465 | 495 |
# -*- coding: utf-8 -*-
"""
Metaclass as interface for the health service
"""
from abc import ABCMeta, abstractmethod
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
9171,
330,
31172,
355,
7071,
329,
262,
1535,
2139,
198,
37811,
198,
198,
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
628
] | 3.076923 | 39 |
# chat/routing.py
from django.conf.urls import url
from . import consumers
websocket_urlpatterns = [
url(r'^api/ws/notifications', consumers.NotificationsConsumer),
]
| [
2,
8537,
14,
81,
13660,
13,
9078,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
764,
1330,
7008,
198,
198,
732,
1443,
5459,
62,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
... | 2.883333 | 60 |
# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX
# All rights reserved.
import copy
from unittest import mock, TestCase
from pyface.api import OK, CANCEL
from pyface.file_dialog import FileDialog
from pyface.ui.qt4.util.gui_test_assistant import GuiTestAssistant
from pyface.tasks.api import TaskWindow
from fo... | [
2,
220,
357,
34,
8,
15069,
3050,
12,
42334,
2039,
28895,
11,
3457,
1539,
9533,
11,
15326,
198,
2,
220,
1439,
2489,
10395,
13,
198,
198,
11748,
4866,
198,
6738,
555,
715,
395,
1330,
15290,
11,
6208,
20448,
198,
198,
6738,
12972,
2550... | 2.812312 | 666 |
# -*- encoding: utf-8 -*-
#
# Copyright © 2017 Red Hat, Inc.
#
# 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 applica... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
10673,
2177,
2297,
10983,
11,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
7... | 2.835821 | 603 |
# Generated by Django 3.2.6 on 2021-08-26 06:57
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
21,
319,
33448,
12,
2919,
12,
2075,
9130,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import functools
from spaceone.api.inventory.v1 import network_pb2
from spaceone.core.pygrpc.message_type import *
from spaceone.inventory.model.network_model import Network
from spaceone.inventory.info.zone_info import ZoneInfo
from spaceone.inventory.info.region_info import RegionInfo
__all__ = ['NetworkInfo', 'Net... | [
11748,
1257,
310,
10141,
198,
198,
6738,
2272,
505,
13,
15042,
13,
24807,
13,
85,
16,
1330,
3127,
62,
40842,
17,
198,
6738,
2272,
505,
13,
7295,
13,
9078,
2164,
14751,
13,
20500,
62,
4906,
1330,
1635,
198,
6738,
2272,
505,
13,
24807... | 3.408163 | 98 |
import sys
import logging
import math
from pathlib import Path
from pydantic import BaseModel
from typing import *
import PyPDF2
from reportlab.lib.units import mm, inch
logging.basicConfig(format='%(asctime)s,%(msecs)d | %(levelname)-8s | %(filename)s:%(funcName)s:%(lineno)d - %(message)s',
datef... | [
11748,
25064,
198,
11748,
18931,
198,
11748,
10688,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
198,
6738,
19720,
1330,
1635,
198,
198,
11748,
9485,
20456,
17,
198,
6738,
989,
23912,
13,
8019,
13,
... | 2.181416 | 226 |
#!/usr/bin/env python3
import sys; assert sys.version_info[0] >= 3, "Python 3 required."
from .group_hash import group_hash
from .pallas import Fp, Scalar
from .sinsemilla import sinsemilla_hash_to_point
from ..utils import i2lebsp
# Commitment schemes used in Orchard https://zips.z.cash/protocol/nu5.pdf#concretecomm... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
25064,
26,
6818,
25064,
13,
9641,
62,
10951,
58,
15,
60,
18189,
513,
11,
366,
37906,
513,
2672,
526,
198,
198,
6738,
764,
8094,
62,
17831,
1330,
1448,
62,
17831,
198,
6738... | 2.687285 | 291 |
# coding:utf-8
import logging
import os
import select
import zlib
import chardet
import time
from http.client import HTTPResponse
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn
from urllib.parse import urlparse, ParseResult, urlunparse
from tempfile import gettempdir... | [
2,
19617,
25,
40477,
12,
23,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
2922,
198,
11748,
1976,
8019,
198,
198,
11748,
442,
446,
316,
198,
11748,
640,
198,
6738,
2638,
13,
16366,
1330,
7154,
51,
4805,
9774,
2591,
198,
6738,
263... | 1.381413 | 1,033 |
#!/usr/bin/env python
# Copyright 2011-2013 Pierre de Buyl
#
# This file is part of f90h5md
#
# f90h5md is free software and is licensed under the modified BSD license (see
# LICENSE file).
types = dict()
types['i'] = 'integer'
types['d'] = 'double precision'
H5T = dict()
H5T['i'] = 'H5T_NATIVE_INTEGER'
H5T['d'] = 'H... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
2813,
12,
6390,
21204,
390,
9842,
2645,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
277,
3829,
71,
20,
9132,
198,
2,
198,
2,
277,
3829,
71,
20,
9132,
318,
1479,
3788... | 2.104768 | 1,489 |
#!python
'''Dataverse Bulk Deleter
Deletes unpublished studies at the command line
'''
import argparse
#import json
import sys
import requests
VERSION = (0, 2, 1)
__version__ = '.'.join([str(x) for x in VERSION])
def delstudy(dvurl, key, pid):
'''
Deletes Dataverse study
dvurl : str
Dataverse ins... | [
2,
0,
29412,
198,
7061,
6,
6601,
4399,
47900,
42226,
353,
198,
5005,
40676,
42686,
3640,
379,
262,
3141,
1627,
198,
7061,
6,
198,
198,
11748,
1822,
29572,
198,
2,
11748,
33918,
198,
11748,
25064,
198,
11748,
7007,
198,
43717,
796,
357... | 2.042831 | 2,218 |
# -*- coding: utf-8 -*-
from acttypes import ActType
class Act(object):
""" basic action class.
"""
class Title(Act):
""" For title act
"""
class Chapter(Act):
""" For chapter start act
"""
class Description(Act):
""" Nothing subject description act.
"""
class Person(object):... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
6738,
719,
19199,
1330,
2191,
6030,
628,
198,
4871,
2191,
7,
15252,
2599,
198,
220,
220,
220,
37227,
4096,
2223,
1398,
13,
198,
220,
220,
220,
37227,
628,
198,
48... | 2.640741 | 270 |
from django.contrib.auth import get_user_model
from .oauth2_backends import get_oauthlib_core
UserModel = get_user_model()
OAuthLibCore = get_oauthlib_core()
class OAuth2Backend:
"""
Authenticate against an OAuth2 access token
"""
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
198,
6738,
764,
12162,
1071,
17,
62,
1891,
2412,
1330,
651,
62,
12162,
1071,
8019,
62,
7295,
628,
198,
12982,
17633,
796,
651,
62,
7220,
62,
19849,
3... | 2.755556 | 90 |
from py3o.template import Template
t = Template(
"py3o_example_template_single_cell.odt",
"py3o_example_output_single_cell.odt"
)
t.set_image_path('staticimage.logo', 'images/new_logo.png')
items = list()
item1 = Item()
item1.val1 = 'Item1 Value1'
item1.val2 = 'Item1 Value2'
item1.val3 = 'It... | [
6738,
12972,
18,
78,
13,
28243,
1330,
37350,
201,
198,
201,
198,
83,
796,
37350,
7,
201,
198,
220,
220,
220,
366,
9078,
18,
78,
62,
20688,
62,
28243,
62,
29762,
62,
3846,
13,
375,
83,
1600,
201,
198,
220,
220,
220,
366,
9078,
18... | 2.153453 | 391 |
num1 = float(input("Number 1: "))
num2 = float(input("Wumber 2: "))
operation = input("Which operation (+,-,/,*): ")
if operation == "+":
print(f"The sum is {num1 + num2}")
if operation == "-":
print(f"The difference is {num1 - num2}")
if operation == "/":
if num2 != 0:
print(f"The quotient... | [
22510,
16,
796,
12178,
7,
15414,
7203,
15057,
352,
25,
366,
4008,
201,
198,
22510,
17,
796,
12178,
7,
15414,
7203,
54,
4494,
362,
25,
366,
4008,
201,
198,
27184,
796,
5128,
7203,
13828,
4905,
11502,
12095,
11,
47454,
9,
2599,
366,
8... | 2.4 | 195 |
__all__ = ('IntegrationDetail', )
from ..core import ROLES
from ..utils import timestamp_to_datetime, DISCORD_EPOCH_START
from ..role import create_partial_role_from_id
from .preinstanced import IntegrationExpireBehavior
class IntegrationDetail:
"""
Details about a non discord integration.
Attribute... | [
834,
439,
834,
796,
19203,
34500,
1358,
11242,
603,
3256,
1267,
198,
198,
6738,
11485,
7295,
1330,
371,
3535,
1546,
198,
6738,
11485,
26791,
1330,
41033,
62,
1462,
62,
19608,
8079,
11,
13954,
34,
12532,
62,
8905,
46,
3398,
62,
2257,
7... | 2.112293 | 1,692 |
from controller import Controller
import torch
import cProfile
import pstats
OPTIMIZE = False # True to generate performance reports
if OPTIMIZE:
cProfile.run('main()', "output.dat")
with open("output_time.txt","w") as f:
p = pstats.Stats("output. dat", stream=f)
p.sort_stats("time").pri... | [
6738,
10444,
1330,
22741,
198,
11748,
28034,
198,
11748,
269,
37046,
198,
11748,
279,
34242,
198,
198,
3185,
51,
3955,
35400,
796,
10352,
1303,
6407,
284,
7716,
2854,
3136,
198,
198,
361,
39852,
3955,
35400,
25,
198,
220,
220,
220,
269,... | 2.526042 | 192 |
from nodeClasses.node import node
| [
6738,
220,
10139,
9487,
274,
13,
17440,
1330,
10139,
220,
198
] | 3.272727 | 11 |
import logging
from bda_core.use_cases.log.log_info import log_info
| [
11748,
18931,
198,
6738,
275,
6814,
62,
7295,
13,
1904,
62,
33964,
13,
6404,
13,
6404,
62,
10951,
1330,
2604,
62,
10951,
628
] | 3 | 23 |
import re
import urllib
import logging
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QShortcut
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings
from PyQt5.QtWidgets import QSizePolicy
from kiosk_browser import system
def user_agent_with_system(user_agent, system_name, system_versi... | [
11748,
302,
198,
11748,
2956,
297,
571,
198,
11748,
18931,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1195,
48801,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
16438,
8968,
198,
6738,
9485,
48,
8... | 2.410714 | 336 |
#wordCloudGenerator.py
import wordcloud
from matplotlib import pyplot as plot
import tkinter
from tkinter.filedialog import askopenfile
#Reads the selected file and then draws the wordcloud
#Removes punctuation from words
#Calculates how many times each word appears in the text file
if __name__ == "__main_... | [
2,
4775,
18839,
8645,
1352,
13,
9078,
198,
198,
11748,
1573,
17721,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
7110,
198,
11748,
256,
74,
3849,
198,
6738,
256,
74,
3849,
13,
69,
3902,
498,
519,
1330,
1265,
9654,
7753,
198,... | 3.150943 | 106 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright(c) 2018 Senscape Corporation.
# License: Apache 2.0
# Import libs
import cv2, sys, numpy as np
sys.path.append('../../../')
import hsapi as hs
device = hs.GetDevice()
device.OpenDevice()
try:
while(1):
image = device.GetImage(False)
cv2... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
7,
66,
8,
2864,
14173,
36435,
10501,
13,
198,
2,
13789,
25,
24843,
362,
13,
15,
198,
198,
2,... | 2.272727 | 176 |
#!/usr/bin/env python3
#Copyright (C) 2009-2011 by Benedict Paten (benedictpaten@gmail.com)
#
#Released under the MIT license, see LICENSE.txt
import unittest
import sys
from sonLib.bioio import TestStatus
from cactus.shared.test import getCactusInputs_random
from cactus.shared.test import getCactusInputs_blanchette... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15269,
357,
34,
8,
3717,
12,
9804,
416,
28697,
3208,
268,
357,
65,
2945,
713,
8071,
268,
31,
14816,
13,
785,
8,
198,
2,
198,
2,
45037,
739,
262,
17168,
5964,
11,
766,... | 3 | 143 |
import pyVmomi
from osbot_utils.utils.Misc import wait
from k8_vmware.vsphere.VM_Keystroke import VM_Keystroke
| [
11748,
12972,
53,
76,
12753,
198,
6738,
28686,
13645,
62,
26791,
13,
26791,
13,
44,
2304,
1330,
4043,
198,
198,
6738,
479,
23,
62,
14761,
1574,
13,
85,
2777,
1456,
13,
15996,
62,
9218,
30757,
1330,
16990,
62,
9218,
30757,
628,
628
] | 2.738095 | 42 |
lista = ['oi', 'bem', 'meu']
a, b = lista.index('bem'), lista.index('meu')
lista[b], lista[a] = lista[a], lista[b]
print(lista) | [
4868,
64,
796,
37250,
23013,
3256,
705,
65,
368,
3256,
705,
1326,
84,
20520,
198,
64,
11,
275,
796,
1351,
64,
13,
9630,
10786,
65,
368,
33809,
1351,
64,
13,
9630,
10786,
1326,
84,
11537,
198,
4868,
64,
58,
65,
4357,
1351,
64,
58,
... | 2.015873 | 63 |