content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
class ExportPatternTable(object,IEnumerable[KeyValuePair[ExportPatternKey,ExportPatternInfo]],IEnumerable,IDisposable):
"""
A table supporting a mapping of FillPatterns in Revit to pattern names that will be set
in the target export format.
ExportPatternTable()
"""
def Add(self,exportPatternKey,... | [
4871,
36472,
47546,
10962,
7,
15252,
11,
40,
4834,
30831,
58,
9218,
11395,
47,
958,
58,
43834,
47546,
9218,
11,
43834,
47546,
12360,
60,
4357,
40,
4834,
30831,
11,
2389,
271,
1930,
540,
2599,
201,
198,
37227,
201,
198,
317,
3084,
6493... | 2.912678 | 1,546 |
# Your MyCircularQueue object will be instantiated and called as such:
obj = CircularQueue(3)
obj.enQueue(6)
param_2 = obj.deQueue()
obj.enQueue(5)
param_2 = obj.deQueue()
# obj.enQueue(3)
# param_3 = obj.Front()
# param_4 = obj.Rear()
print(obj, obj.Front(), obj.Rear()) | [
198,
2,
3406,
2011,
31560,
934,
34991,
2134,
481,
307,
9113,
12931,
290,
1444,
355,
884,
25,
198,
26801,
796,
7672,
934,
34991,
7,
18,
8,
628,
198,
26801,
13,
268,
34991,
7,
21,
8,
628,
198,
17143,
62,
17,
796,
26181,
13,
2934,
... | 2.536364 | 110 |
# 基于PyTorch复现并修正后的马金TD方法
# 修正:叶子节点选择错误;SGD->Adagrad
import sys
import numpy as np
from models import TD_RvNN_Ma
import time
import random
from torch import optim
import datetime
from evaluate import *
from config import *
from data_io import loadLabel
from get_args import _ma_args
# str = index:wordfre... | [
2,
10263,
253,
118,
12859,
236,
20519,
15884,
354,
13783,
235,
163,
236,
108,
33176,
114,
46479,
106,
29826,
96,
28938,
236,
21410,
165,
102,
105,
34932,
239,
21016,
43095,
37345,
243,
201,
198,
2,
220,
46479,
106,
29826,
96,
171,
120... | 2.010245 | 1,757 |
import youtube
from praw.models import Comment
"""
These methods are used for detecting the current state of a post (e.g., claimed,
unclaimed, done) and the surrounding context based on the specific comment data
given.
This helps reduce the amount of data we _have_ to store in Redis.
"""
| [
11748,
35116,
198,
6738,
279,
1831,
13,
27530,
1330,
18957,
198,
198,
37811,
198,
4711,
5050,
389,
973,
329,
31521,
262,
1459,
1181,
286,
257,
1281,
357,
68,
13,
70,
1539,
4752,
11,
198,
403,
12795,
11,
1760,
8,
290,
262,
7346,
4732... | 3.857143 | 77 |
from xlsxwriter import Workbook
from parselib import Matrix
from util import measure_between
MIN_CELL_WIDTH = 3
MIN_CELL_HEIGHT = 12
MUTED_RED = '#63BE7B'
MUTED_YELLOW = '#F7B97B'
MUTED_GREEN = '#EF676A'
| [
6738,
2124,
7278,
87,
16002,
1330,
5521,
2070,
198,
6738,
1582,
741,
571,
1330,
24936,
198,
6738,
7736,
1330,
3953,
62,
23395,
198,
198,
23678,
62,
5222,
3069,
62,
54,
2389,
4221,
796,
513,
198,
23678,
62,
5222,
3069,
62,
13909,
9947,... | 2.314607 | 89 |
import gzip
import base64
import simplejson as json
import pandas as pd
from copy import deepcopy as copy
from .util import Util
class BuilderParams:
"""
Validating input parameters and building jsons for gridOptions and gridData
-----
Attributes:
obj: a Grid object whose attributes will be ... | [
198,
11748,
308,
13344,
198,
11748,
2779,
2414,
198,
198,
11748,
2829,
17752,
355,
33918,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
4866,
1330,
2769,
30073,
355,
4866,
198,
198,
6738,
764,
22602,
1330,
7273,
346,
628,
198,
... | 2.001199 | 6,670 |
"""
Space : O(1)
Time : O(n)
"""
| [
37811,
198,
14106,
220,
220,
1058,
440,
7,
16,
8,
198,
7575,
220,
220,
220,
1058,
440,
7,
77,
8,
198,
37811,
628
] | 1.695652 | 23 |
"""Init data for QuAcc"""
from ase.atoms import Atoms
from ase.io.jsonio import decode, encode
from quacc._version import __version__
from quacc.settings import QuaccSettings
Atoms.as_dict = atoms_as_dict
Atoms.from_dict = atoms_from_dict
SETTINGS = QuaccSettings()
| [
37811,
31768,
1366,
329,
2264,
17320,
37811,
198,
6738,
257,
325,
13,
265,
3150,
1330,
1629,
3150,
198,
6738,
257,
325,
13,
952,
13,
17752,
952,
1330,
36899,
11,
37773,
198,
198,
6738,
627,
4134,
13557,
9641,
1330,
11593,
9641,
834,
1... | 3.044944 | 89 |
from facePoints import facePoints
model_path = "shape_predictor_68_face_landmarks.dat"
frontal_face_detector = dlib.get_frontal_face_detector()
face_landmark_detector = dlib.shape_predictor(model_path)
mouth_cascade = cv2.CascadeClassifier('models/face_detect/haarcascade_mcs_mouth.xml') | [
6738,
1986,
40710,
1330,
1986,
40710,
198,
198,
19849,
62,
6978,
796,
366,
43358,
62,
79,
17407,
273,
62,
3104,
62,
2550,
62,
1044,
14306,
13,
19608,
1,
198,
198,
8534,
282,
62,
2550,
62,
15255,
9250,
796,
288,
8019,
13,
1136,
62,
... | 2.71028 | 107 |
# Module: core
# Date: 20th December 2014
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Core Module
Crates server component, load plugins and handles process signals.
"""
from logging import getLogger
from signal import SIGINT, SIGHUP, SIGTERM
from circuits import handler, BaseComponen... | [
2,
19937,
25,
220,
220,
4755,
198,
2,
7536,
25,
220,
220,
220,
220,
1160,
400,
3426,
1946,
198,
2,
6434,
25,
220,
220,
3700,
19790,
11,
386,
6404,
291,
379,
1790,
21170,
5013,
16605,
2010,
16605,
35851,
628,
198,
37811,
14055,
19937... | 3.628571 | 105 |
(
activity_df
.sort_values('start_date_local')
.assign(time_gap=lambda df: df['start_date_local'].diff())
.sort_values('time_gap', ascending=False)
.head(10)
)
| [
7,
198,
220,
220,
220,
3842,
62,
7568,
198,
220,
220,
220,
764,
30619,
62,
27160,
10786,
9688,
62,
4475,
62,
12001,
11537,
198,
220,
220,
220,
764,
562,
570,
7,
2435,
62,
43554,
28,
50033,
47764,
25,
47764,
17816,
9688,
62,
4475,
... | 2.307692 | 78 |
from tkinter import*
cal = Tk()
cal.title("Skiy - Calculator")
cal.minsize(width=360, height=500)
cal.maxsize(width=360, height=500)
cal.iconbitmap('C:/Users/Okeke Divine-Vessel/Desktop/Desktop/Programmer/Icons/Cal.ico')
operator=""
text_Input = StringVar()
txtDisplay = Entry(cal,font=('arial', 20,'... | [
6738,
256,
74,
3849,
1330,
9,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
9948,
796,
309,
74,
3419,
201,
198,
9948,
13,
7839,
7203,
50,
4106,
88,
532,
43597,
4943,
201,
198,
9948,
13,
42951,
1096,
7,
10394,
28,
15277,
11,
... | 2.379884 | 1,382 |
#! /usr/bin/env python3.7
# -*- coding: utf-8 -*-
# Copyright 2020 the HERA Project
# Licensed under the MIT License
import numpy as np
from pyuvdata import UVData, utils
import argparse
import sys
import os
import shutil
# Parse arguments
a = argparse.ArgumentParser(
description='Script for "fixing" H3C files to... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
13,
22,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
12131,
262,
24906,
32,
4935,
198,
2,
49962,
739,
262,
17168,
13789,
198,
198,
11748,
299,
3... | 2.514667 | 750 |
from dataset.tf_data_handler import tf_data_handler
import tensorflow as tf
from config import Config
import time
from model.model import vgg_crnn
import numpy as np
from tools.utils import ctc_decode,cacualte_acc
data_handler_obj = tf_data_handler()
test_loader = data_handler_obj.get_data_loader(Config.test_anno, b... | [
198,
6738,
27039,
13,
27110,
62,
7890,
62,
30281,
1330,
48700,
62,
7890,
62,
30281,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
4566,
1330,
17056,
198,
11748,
640,
198,
6738,
2746,
13,
19849,
1330,
410,
1130,
62,
6098,
20471,
... | 2.613577 | 383 |
# encoding: utf-8
"""
lxml custom element classes for shape-related XML elements.
"""
from __future__ import absolute_import
from .. import parse_xml
from ..ns import nsdecls
from .shared import BaseShapeElement
from ..simpletypes import ST_DrawingElementId, XsdUnsignedInt
from ..xmlchemy import (
BaseOxmlElemen... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
75,
19875,
2183,
5002,
6097,
329,
5485,
12,
5363,
23735,
4847,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
11485,
1330,
21136,
62,
1... | 2.129613 | 1,111 |
#!/usr/bin/python
# -*- coding: utf8 -*-
import numpy as np
import pandas as pd
import collections
import pandas_ml as pdml
from pandas_ml.confusion_matrix.stats import binom_interval, class_agreement, prop_test
class ConfusionMatrixAbstract(object):
"""
Abstract class for confusion matrix
You shouldn'... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
23,
532,
9,
12,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
17268,
198,
198,
11748,
19798,
292,
62,
4029... | 2.02647 | 6,649 |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^register$', views.register),
]
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
220,
198,
6738,
764,
1330,
5009,
198,
220,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
30238,
3,
3256,
5009,
13,
30238,
828,
198,
60,
198
... | 2.613636 | 44 |
# @Time: 2022/3/31 11:32
# @Author: chang liu
# @Email: chang_liu_tamu@gmail.com
# @File:20-Handling-Errors.py
# Use HTTPException
from fastapi import FastAPI, HTTPException
app = FastAPI()
items = {"foo": "The Foo Wrestlers"}
@app.get("/items/{item_id}")
#raise an exception
# Add custom headers
@app.get("/items... | [
2,
2488,
7575,
25,
33160,
14,
18,
14,
3132,
1367,
25,
2624,
198,
2,
2488,
13838,
25,
1488,
7649,
84,
198,
2,
2488,
15333,
25,
1488,
62,
4528,
84,
62,
83,
321,
84,
31,
14816,
13,
785,
198,
2,
2488,
8979,
25,
1238,
12,
12885,
13... | 3.352657 | 621 |
# Error handling for matrix2latex.py,
# todo: don't yell at errors, fix them!
# To clean the code, error handling is moved to small functions
# "expected %s to be a str, got %s" % (key, type(value))
# assert length == n,\
# "Error: %g of %g alignments given '%s'\n" % (length, n, value)
# ass... | [
2,
13047,
9041,
329,
17593,
17,
17660,
87,
13,
9078,
11,
198,
2,
284,
4598,
25,
836,
470,
28946,
379,
8563,
11,
4259,
606,
0,
198,
2,
1675,
3424,
262,
2438,
11,
4049,
9041,
318,
3888,
284,
1402,
5499,
198,
2,
220,
220,
220,
220,... | 2.349515 | 206 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" builder模块
建造者模块
"""
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
37811,
27098,
162,
101,
94,
161,
251,
245,
201,
198,
161,
119,
118,
34460,
254,
38519,
162,
101,
... | 1.425926 | 54 |
##===----------------- _memory.pyx - dpctl module -------*- Cython -*------===##
##
## Data Parallel Control (dpCtl)
##
## Copyright 2020 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## Yo... | [
2235,
18604,
1783,
12,
4808,
31673,
13,
9078,
87,
532,
288,
79,
34168,
8265,
35656,
9,
12,
327,
7535,
532,
9,
23031,
18604,
2235,
198,
2235,
198,
2235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 3.522189 | 676 |
PANEL_GROUP = 'policy'
PANEL_GROUP_NAME = 'Policy'
PANEL_GROUP_DASHBOARD = 'admin'
| [
47,
1565,
3698,
62,
46846,
796,
705,
30586,
6,
198,
47,
1565,
3698,
62,
46846,
62,
20608,
796,
705,
36727,
6,
198,
47,
1565,
3698,
62,
46846,
62,
35,
11211,
8202,
9795,
796,
705,
28482,
6,
198
] | 2.243243 | 37 |
# -*- coding: utf-8 -*-
"""Untitled1.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1E7m0EoAUNm8hn-rtemotVovsJVUjqLhS
"""
from torchvision.transforms import Normalize
import skimage.io
from skimage.transform import resize
import glob
from sklear... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
46332,
16,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
318,
5140,
379,
198,
220,
220,
220,
3740,
1378,
403... | 2.589354 | 1,052 |
import typing
from flask import current_app
from werkzeug.local import LocalProxy
from flask_currency.model import CurrencyMixin
curr = LocalProxy(lambda: current_app.extensions["currency"])
| [
11748,
19720,
198,
198,
6738,
42903,
1330,
1459,
62,
1324,
198,
6738,
266,
9587,
2736,
1018,
13,
12001,
1330,
10714,
44148,
198,
198,
6738,
42903,
62,
34415,
13,
19849,
1330,
20113,
35608,
259,
198,
198,
22019,
81,
796,
10714,
44148,
7,... | 3.611111 | 54 |
import pygame
import random
import time
import sys
class GameRound:
"""Round handler class"""
@staticmethod
| [
11748,
12972,
6057,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
25064,
198,
198,
4871,
3776,
22685,
25,
198,
220,
220,
220,
37227,
22685,
21360,
1398,
37811,
628,
220,
220,
220,
2488,
12708,
24396,
198
] | 3.371429 | 35 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: v.stone@163.com
"""
RobotFramework Listener 的使用指南:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#listener-interface
Allure RobotFramework 插件的 GitHub 仓库:
https://github.com/allure-framework/allure-python/tree/master/allure-robotfram... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6434,
25,
410,
13,
6440,
31,
24136,
13,
785,
198,
37811,
198,
14350,
313,
21055,
6433,
7343,
877,
13328,
248,
... | 2.315789 | 380 |
if __name__ == '__main__':
main()
| [
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.166667 | 18 |
import torch
from difflr.models import LinearClassifierDSC
from difflr.data import CIFARDataset
from difflr import CONFIG
from difflr.experiments import Tuner
import time
from difflr.utils import check_gpu
check_gpu()
CONFIG.DRY_RUN = False
if __name__ == '__main__':
main()
| [
11748,
28034,
198,
6738,
814,
14050,
13,
27530,
1330,
44800,
9487,
7483,
5258,
34,
198,
6738,
814,
14050,
13,
7890,
1330,
327,
5064,
9795,
265,
292,
316,
198,
6738,
814,
14050,
1330,
25626,
198,
6738,
814,
14050,
13,
23100,
6800,
1330,
... | 3.031915 | 94 |
import weakref
d = weakref.WeakValueDictionary()
d['a'] = A()
print(list(d.keys()))
| [
11748,
4939,
5420,
628,
198,
198,
67,
796,
4939,
5420,
13,
44898,
11395,
35,
14188,
3419,
198,
67,
17816,
64,
20520,
796,
317,
3419,
198,
4798,
7,
4868,
7,
67,
13,
13083,
3419,
4008,
198
] | 2.485714 | 35 |
import simplejson
import httplib2
import wsgi_intercept
from wsgi_intercept import httplib2_intercept
from tiddlyweb.model.recipe import Recipe
from tiddlyweb.model.user import User
from test.fixtures import make_test_env, make_fake_space, get_auth
def test_mutual_subscription():
"""
Subscription should... | [
11748,
2829,
17752,
198,
11748,
1841,
489,
571,
17,
198,
11748,
266,
82,
12397,
62,
3849,
984,
198,
198,
6738,
266,
82,
12397,
62,
3849,
984,
1330,
1841,
489,
571,
17,
62,
3849,
984,
198,
198,
6738,
256,
1638,
306,
12384,
13,
19849,... | 2.936406 | 1,085 |
import numpy as np
from sklearn.utils import check_random_state
from .gaussian_likelihood_fast import compute_gaussian_likelihood
from .distributions import spherical_normal_log_pdf
| [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1341,
35720,
13,
26791,
1330,
2198,
62,
25120,
62,
5219,
198,
6738,
764,
4908,
31562,
62,
2339,
11935,
62,
7217,
1330,
24061,
62,
4908,
31562,
62,
2339,
11935,
198,
6738,
764,
17080,
2455,
... | 3.528302 | 53 |
from .events import EventScheduler, Priority, event_handler
| [
6738,
764,
31534,
1330,
8558,
50,
1740,
18173,
11,
34416,
11,
1785,
62,
30281,
198
] | 4 | 15 |
# -*- encoding: utf-8 -*-
__author__ = 'krolev'
from read_conll_data import *
# from Perceptron import Perceptron
from Perceptron3 import Perceptron3
from codecs import open
from matrice_confusion import ConfusionMatrix
import yaml
import codecs
from read_conll_data import *
def TaggingCorpora(language="d... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
834,
9800,
834,
796,
705,
74,
305,
2768,
6,
201,
198,
201,
198,
6738,
1100,
62,
1102,
297,
62,
7890,
1330,
1635,
201,
198,
2,
422,
2448,
984,
1313,
1330,
2448,
... | 2.311313 | 2,316 |
# Generated by Django 3.0.4 on 2020-07-01 12:30
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
19,
319,
12131,
12,
2998,
12,
486,
1105,
25,
1270,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import unittest
from unittest.mock import Mock, patch
from fplanalyzer.definitions import MIN_GAMEWEEK, MAX_GAMEWEEK
from fplanalyzer.fplrequests import getPlayerAndCaptainNumbers
from fplanalyzer.fpl_api import is_gameweek_valid, get_current_gameweek, get_league_users
| [
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
11,
8529,
198,
198,
6738,
277,
11578,
3400,
9107,
13,
4299,
50101,
1330,
20625,
62,
38,
2390,
6217,
33823,
11,
25882,
62,
38,
2390,
6217,
33823,
198,
6738,
27... | 2.914894 | 94 |
from __future__ import print_function
import argparse
import math
import os
import time
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.parallel
import torch.optim as optim
import torch.utils.data
from tensorboardX import SummaryWriter
from torch.autograd import V... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
1822,
29572,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
640,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
... | 2.698947 | 2,375 |
import sys
import os
from Dice3DS import dom3ds
import zlib
import StringIO
import struct
if __name__ == '__main__':
main() | [
11748,
25064,
198,
11748,
28686,
198,
6738,
34381,
18,
5258,
1330,
2401,
18,
9310,
198,
11748,
1976,
8019,
198,
11748,
10903,
9399,
198,
11748,
2878,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
12417,
3... | 3.073171 | 41 |
from types import SimpleNamespace
import numpy as np
import pytest
from ..cwgan import (
ConditionalMinibatch, ConditionalProber,
RandomChoiceSampler, NaiveRandomChoiceSampler,
DEFAULT_PARAMS,
)
from .test_conditional_prober import mock_model
def access_all_attrs(obj):
""" Access all attributes of... | [
6738,
3858,
1330,
17427,
36690,
10223,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
6738,
11485,
66,
86,
1030,
1330,
357,
198,
220,
220,
220,
9724,
1859,
9452,
571,
963,
11,
9724,
1859,
2964,
527,
11,
19... | 2.455621 | 338 |
import discord
from discord.ext import commands
from main import MY_COLOR, PREFIX #we're using our main colour & prefix that we declared in our main.py file
#this is how to set up a basic cog
| [
11748,
36446,
201,
198,
6738,
36446,
13,
2302,
1330,
9729,
201,
198,
6738,
1388,
1330,
17615,
62,
46786,
11,
22814,
47084,
1303,
732,
821,
1262,
674,
1388,
9568,
1222,
21231,
326,
356,
6875,
287,
674,
1388,
13,
9078,
2393,
201,
198,
2... | 3.6 | 55 |
# Copyright (c) 2017-2020 Wenyi Tang.
# Author: Wenyi Tang
# Email: wenyitang@outlook.com
# Update: 2020 - 2 - 16
import os
import unittest
if not os.getcwd().endswith('Tests'):
os.chdir('Tests')
import numpy as np
from PIL import Image
from VSR.Backend.TF.Util import Vgg
URL = 'data/set5_x2/img_001_SRF_2_LR... | [
2,
220,
15069,
357,
66,
8,
2177,
12,
42334,
370,
28558,
72,
18816,
13,
198,
2,
220,
6434,
25,
370,
28558,
72,
18816,
198,
2,
220,
9570,
25,
266,
28558,
270,
648,
31,
448,
5460,
13,
785,
198,
2,
220,
10133,
25,
12131,
532,
362,
... | 2.338983 | 177 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Main file of pyCFG2Chomsky. """
import sys
from cfg import ContextFreeGrammar as CFG
if __name__ == '__main__':
myCFG = CFG(sys.stdin)
print "End of input."
myCFG.transform_to_Chomsky()
# print "\nChomsky Normal Form Grammar\nRules:"
myCFG.print_... | [
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,
8774,
2393,
286,
12972,
22495,
38,
17,
1925,
37093,
13,
37227,
198,
198,
11748,
25064,
198,
198,
6738,
3021... | 2.363636 | 198 |
import unittest
import solution
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
11748,
4610,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.59375 | 32 |
import os
main = "cmd/enode/main.go"
print get_version()
| [
11748,
28686,
198,
198,
12417,
796,
366,
28758,
14,
268,
1098,
14,
12417,
13,
2188,
1,
198,
198,
4798,
651,
62,
9641,
3419,
198
] | 2.458333 | 24 |
import discord
import psycopg2 as dbSQL
from discord.ext import commands
from datetime import datetime
from datetime import timedelta
import stackprinter as sp
from bin import zb
from bin import zb_config
_var = zb_config
class InactiveCog(commands.Cog):
""" Forecast, kick, ban, exclude inactive members """
... | [
11748,
36446,
198,
11748,
17331,
22163,
70,
17,
355,
20613,
17861,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
11748,
8931,
1050,
3849,
355,
599,
198,
... | 1.585512 | 3,327 |
# Copyright 2017, OpenCensus 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 w... | [
2,
15069,
2177,
11,
4946,
34,
7314,
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,
... | 2.469118 | 2,040 |
print(dumb()) | [
4798,
7,
67,
2178,
28955
] | 2.6 | 5 |
# Python dictionary is like map in Java
if __name__ == "__main__":
createDictionary()
| [
2,
11361,
22155,
318,
588,
3975,
287,
7349,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
201,
198,
220,
220,
220,
2251,
35,
14188,
3419,
201,
198
] | 2.589744 | 39 |
from matplotlib import pyplot as plt
import os
import pandas as pd
import shutil
from PACKAGES.process import *
from sklearn.svm import SVC
from sklearn.multiclass import OneVsRestClassifier
from sklearn.neighbors import KNeighborsClassifier
PROJECT_DIR="C:/Users/brice/Data_science_project"
data_dir=PROJECT_DIR+'/DATA... | [
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
4423,
346,
198,
6738,
47035,
25552,
13,
14681,
1330,
1635,
198,
6738,
1341,
35720,
13,
82,
14761,
1330,
311,... | 2.401403 | 3,707 |
from web3 import Web3, Account
from solc import compile_files, link_code, compile_source
import json
import os
import time
import chainUtil as chain
import DS
account_list = [
'0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1', # user, initializer
'0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0', # attribute ins.
'0x22d491... | [
6738,
3992,
18,
1330,
5313,
18,
11,
10781,
198,
6738,
1540,
66,
1330,
17632,
62,
16624,
11,
2792,
62,
8189,
11,
17632,
62,
10459,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
6333,
18274,
346,
355,
6333,
198,
117... | 2.456984 | 1,081 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2020-04-15 04:27
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
23,
319,
12131,
12,
3023,
12,
1314,
8702,
25,
1983,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
"""
Copyright (c) 2020 Ansys Inc. """
######## IMPORTS ########
# General purpose imports
import os,sys
sys.path.append("C:\\Program Files\\Lumerical\\v211\\api\\python\\")
import numpy as np
import json
from lumjson import LumEncoder, LumDecoder
import lumapi
# Optimization global parameters
height = 220e-9
etc... | [
37811,
198,
220,
220,
220,
15069,
357,
66,
8,
12131,
1052,
17597,
3457,
13,
37227,
198,
198,
7804,
30023,
33002,
46424,
21017,
198,
2,
3611,
4007,
17944,
198,
11748,
28686,
11,
17597,
198,
17597,
13,
6978,
13,
33295,
7203,
34,
25,
685... | 2.383803 | 568 |
from .marccd import MarCCD
| [
6738,
764,
3876,
535,
67,
1330,
1526,
4093,
35,
198
] | 2.7 | 10 |
#!/usr/bin/env python3
"""
Record game.
Authors:
LICENCE:
"""
import os
from pathlib import Path
from time import sleep
import gym
import numpy as np
from gym.wrappers.monitoring.video_recorder import VideoRecorder
import games
class Record:
"""Record a game from the environment."""
def __init__(
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
23739,
983,
13,
198,
198,
30515,
669,
25,
198,
43,
2149,
18310,
25,
198,
37811,
198,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
640,
1330,
3993,
... | 1.949265 | 1,360 |
from loguru import logger
from sklearn.svm import SVC
import mlflow
def create_svc_model(svc_hyperparameters):
"""
Description
-----------
Creates a Support Vector Classifier model for use in a scikit-learn pipeline
based upon the input logreg_hyperparameters.
The hyperparameters are also tra... | [
6738,
2604,
14717,
1330,
49706,
198,
6738,
1341,
35720,
13,
82,
14761,
1330,
311,
15922,
198,
11748,
285,
1652,
9319,
628,
198,
4299,
2251,
62,
21370,
66,
62,
19849,
7,
21370,
66,
62,
49229,
17143,
7307,
2599,
198,
220,
220,
220,
3722... | 2.276302 | 941 |
########################################################################
# CoC API Calls
########################################################################
import requests
import json
from .models import WarInfo, ClanInfo, LeagueInfo
| [
29113,
29113,
7804,
198,
2,
41055,
7824,
27592,
198,
29113,
29113,
7804,
198,
11748,
7007,
198,
11748,
33918,
198,
198,
6738,
764,
27530,
1330,
1810,
12360,
11,
22467,
12360,
11,
4041,
12360,
628
] | 7.333333 | 33 |
r"""
Cartesian Products
"""
# ****************************************************************************
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in the hope that it will be useful,
# but WIT... | [
81,
37811,
198,
43476,
35610,
18675,
198,
37811,
198,
2,
41906,
17174,
46068,
198,
2,
220,
220,
220,
220,
220,
220,
15069,
357,
34,
8,
4343,
4995,
27667,
1279,
76,
71,
33807,
31,
14816,
13,
785,
22330,
198,
2,
198,
2,
220,
4307,
6... | 2.118509 | 5,257 |
import unittest
import tempfile
import os
import shutil
from spark_python_jobs.main import SampleJob
from pyspark.sql import SparkSession
from unittest.mock import MagicMock
from pyspark.sql import functions as F
if __name__ == "__main__":
unittest.main() | [
11748,
555,
715,
395,
198,
11748,
20218,
7753,
198,
11748,
28686,
198,
11748,
4423,
346,
628,
198,
198,
6738,
9009,
62,
29412,
62,
43863,
13,
12417,
1330,
27565,
33308,
198,
6738,
279,
893,
20928,
13,
25410,
1330,
17732,
36044,
198,
673... | 3.142857 | 84 |
import unittest
import norwegian_numbers.util as internal
import norwegian_numbers as nn
# MOD10CD tests
# MOD11CD tests
# KID tests
# Account number tests
# Organisation number tests
# Birth number tests
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
4249,
20684,
62,
77,
17024,
13,
22602,
355,
5387,
198,
11748,
4249,
20684,
62,
77,
17024,
355,
299,
77,
628,
198,
220,
220,
220,
1303,
19164,
940,
8610,
5254,
628,
220,
220,
220,
1303,
19164,
1157,
... | 2.878788 | 99 |
"""
**apps_authenticator**
will handle internal application api calls
**NOTE:**
this authenticator runs on the api side will have access to all the data classes
"""
__developer__ = "mobius-crypt"
__email__ = "mobiusndou@gmail.com"
__twitter__ = "@blueitserver"
__github_repo__ = "htt... | [
37811,
201,
198,
220,
220,
220,
12429,
18211,
62,
41299,
26407,
1174,
201,
198,
220,
220,
220,
220,
220,
220,
220,
481,
5412,
5387,
3586,
40391,
3848,
201,
198,
201,
198,
220,
220,
220,
12429,
16580,
25,
1174,
201,
198,
220,
220,
22... | 2.50116 | 1,724 |
bosString = "asdfasdf(2014)"
bosString = bosString.replace("(", "")
bosString = bosString.replace(")", "")
print(bosString) | [
39565,
10100,
796,
366,
292,
7568,
292,
7568,
7,
4967,
16725,
198,
39565,
10100,
796,
37284,
10100,
13,
33491,
7203,
7,
1600,
366,
4943,
198,
39565,
10100,
796,
37284,
10100,
13,
33491,
7,
4943,
1600,
366,
4943,
198,
198,
4798,
7,
395... | 2.818182 | 44 |
# coding=utf-8
from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField
from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde
# Generated with OTLEnumerationCreator. To modify: extend, do not edit
class KlDekselVergrendeling(KeuzelijstField):
"""Manieren waarop het deksel is vergren... | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
440,
14990,
44,
3913,
13,
2394,
43,
17633,
13,
27354,
265,
9497,
13,
8896,
10277,
417,
2926,
301,
15878,
1330,
3873,
10277,
417,
2926,
301,
15878,
198,
6738,
440,
14990,
44,
3913,
13,
2394,
43... | 1.885906 | 894 |
from tensorflow.keras import Sequential,Model
from mpunet.logging import ScreenLogger
from mpunet.utils.conv_arithmetics import compute_receptive_fields
from tensorflow.keras.models import Model
from tensorflow.keras import regularizers
from tensorflow.keras.layers import Input, BatchNormalization, Cropping2D, \
... | [
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
24604,
1843,
11,
17633,
198,
6738,
29034,
403,
316,
13,
6404,
2667,
1330,
15216,
11187,
1362,
198,
6738,
29034,
403,
316,
13,
26791,
13,
42946,
62,
283,
342,
27757,
1330,
24061,
62,
260,
2... | 2.249337 | 377 |
# Forms using wtforms
from wtforms import Form, StringField, SelectField, validators, PasswordField, TextAreaField
from wtforms_validators import Alpha, AlphaNumeric, Integer
from wtforms.fields.html5 import EmailField, DateField
from datetime import date
# Customer Register Form
# Customer Login Form
# Admin Lo... | [
2,
39196,
1262,
266,
83,
23914,
198,
6738,
266,
83,
23914,
1330,
5178,
11,
10903,
15878,
11,
9683,
15878,
11,
4938,
2024,
11,
30275,
15878,
11,
8255,
30547,
15878,
198,
6738,
266,
83,
23914,
62,
12102,
2024,
1330,
12995,
11,
12995,
45... | 3.763441 | 93 |
from __future__ import division, print_function, absolute_import
import numpy as np
from skimage import util
def load(path, dtype=np.float64):
"""
Loads an image from file.
Parameters
----------
path : str
Path to image file.
dtype : np.dtype
Defaults to ``np.float64``, which ... | [
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
11,
4112,
62,
11748,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
9060,
1330,
7736,
628,
198,
4299,
3440,
7,
6978,
11,
288,
4906,
28,
37659,
13,
22468,
2414,
2599,
198,
... | 2.181034 | 1,044 |
# coding: utf-8
import pprint
import re
import six
class TemplateInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is js... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
279,
4798,
198,
11748,
302,
198,
198,
11748,
2237,
628,
628,
198,
198,
4871,
37350,
12360,
25,
628,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
49213,
25,
198,
220,
220,
220,
220... | 2.049728 | 12,850 |
#!/usr/bin/python3
import jk_flexdata
#
# This test checks for a bug. It this program terminates and does not get into an endless loop, everything is okay.
#
x = jk_flexdata.FlexObject({
"a": [
]
})
print("****************")
print(type(x.a))
for a in x.a:
print(a)
print("****************")
print(type(x... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
628,
198,
11748,
474,
74,
62,
32880,
7890,
628,
198,
198,
2,
198,
2,
770,
1332,
8794,
329,
257,
5434,
13,
632,
428,
1430,
5651,
689,
290,
857,
407,
651,
656,
281,
13079,
9052,
11,
2279,
... | 2.612245 | 147 |
print("stellaaaaa")
#test
print("bennnn is gonna stay")
| [
4798,
7203,
301,
695,
24794,
64,
4943,
198,
2,
9288,
198,
4798,
7203,
65,
1697,
20471,
318,
8066,
2652,
4943,
198
] | 2.666667 | 21 |
from urllib.request import urlopen
from urllib.request import Request
from urllib.parse import urlencode
import json
| [
6738,
2956,
297,
571,
13,
25927,
1330,
19016,
9654,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19390,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
2956,
11925,
8189,
198,
11748,
33918,
628
] | 3.575758 | 33 |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | [
2,
220,
220,
15069,
357,
66,
8,
12131,
350,
37382,
47,
37382,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
... | 1.911227 | 16,559 |
# The MIT License
# Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS)
# Copyright (c) 2017-2020 Estonian Information System Authority (RIA)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... | [
2,
220,
383,
17168,
13789,
198,
2,
220,
15069,
357,
66,
8,
33448,
12,
35834,
5136,
329,
4225,
3575,
1799,
23555,
357,
22125,
1797,
8,
198,
2,
220,
15069,
357,
66,
8,
2177,
12,
42334,
24633,
666,
6188,
4482,
11416,
357,
49,
3539,
8... | 3.710327 | 397 |
#!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 3: Deep Learning and Neural Networks
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2015 by Jeff Heaton
Licensed under the Apache License, V... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
220,
220,
220,
35941,
9345,
329,
27411,
198,
220,
220,
220,
14701,
513,
25,
10766,
18252,
290,
47986,
27862,
198,
220,
220,
220,
11361,
10628,
198,
220,
220,
220,
2638,
137... | 2.304328 | 4,436 |
from botocore.client import BaseClient
from ..key_store import KeyStore
from ..raw import CryptoBytes
| [
6738,
10214,
420,
382,
13,
16366,
1330,
7308,
11792,
198,
198,
6738,
11485,
2539,
62,
8095,
1330,
7383,
22658,
198,
6738,
11485,
1831,
1330,
36579,
45992,
628
] | 3.851852 | 27 |
import numpy as np
from createnodes import createnodes
from facenumbering import facenumbering
| [
11748,
299,
32152,
355,
45941,
198,
6738,
1827,
268,
4147,
1330,
1827,
268,
4147,
198,
6738,
1777,
268,
4494,
278,
1330,
1777,
268,
4494,
278,
198
] | 3.653846 | 26 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 17 03:28:27 2019
@author: carl
"""
from octavvs import decomposition
if __name__ == '__main__':
decomposition.main()
| [
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,
30030,
8621,
1596,
7643,
25,
2078,
25,
1983,
13130,
198,
198,
31,
9800,
25,
1097,
75,
198... | 2.519481 | 77 |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary
if __name__ == '__main__':
summary(SeNet(3), (3, 28, 28), device="cpu") | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
49736,
1330,
10638,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
... | 2.983051 | 59 |
"""
ffs.contrib
Make it a package.
"""
| [
37811,
198,
487,
82,
13,
3642,
822,
198,
198,
12050,
340,
257,
5301,
13,
198,
37811,
198
] | 2.352941 | 17 |
import netdiff
import sys
if __name__ == "__main__":
eval_check_list = [ # list all functions allowed for eval() here
'mlag_status_from_dut',
]
args = netdiff.tools.parsers.src_dst_parser()
in_data = netdiff.read._from(args.src_format, args.src_filename)
if args.case in eval_check_list:
... | [
11748,
2010,
26069,
198,
11748,
25064,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
5418,
62,
9122,
62,
4868,
796,
685,
220,
1303,
1351,
477,
5499,
3142,
329,
5418,
3419,
994,
198,
220,
... | 2.238754 | 289 |
import sys
import os
from os import listdir
from os.path import isfile, join
mypath="./"
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
o = open("data.dat", "w")
for f in sorted(onlyfiles):
if f.find("combination_of_observables")>=0 and f.find(".out")>=0:
g=f.split(".")[0]
s=(... | [
11748,
25064,
198,
11748,
28686,
198,
6738,
28686,
1330,
1351,
15908,
198,
6738,
28686,
13,
6978,
1330,
318,
7753,
11,
4654,
198,
198,
1820,
6978,
28,
1911,
30487,
198,
8807,
16624,
796,
685,
69,
329,
277,
287,
1351,
15908,
7,
1820,
6... | 1.700397 | 504 |
## wstat.py - workflow status summary from Parsl monitoring database
## The idea is not to replace the "sqlite3" interactive command or the
## Parsl web interface, but to complement them to create some useful
## interactive summaries specific to Parsl workflows.
## Python dependencies: sqlite3, tabulate
## T.Glanzma... | [
2235,
266,
14269,
13,
9078,
532,
30798,
3722,
10638,
422,
23042,
75,
9904,
6831,
198,
198,
2235,
383,
2126,
318,
407,
284,
6330,
262,
366,
25410,
578,
18,
1,
14333,
3141,
393,
262,
198,
2235,
23042,
75,
3992,
7071,
11,
475,
284,
168... | 2.815524 | 992 |
# -*- coding: utf-8 -*-
"""
Su command module.
"""
__author__ = 'Agnieszka Bylica, Marcin Usielski, Michal Ernst'
__copyright__ = 'Copyright (C) 2018-2019, Nokia'
__email__ = 'agnieszka.bylica@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com'
import re
from moler.cmd.commandchangingprompt import CommandC... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
5606,
3141,
8265,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
705,
32,
4593,
444,
89,
4914,
2750,
677,
64,
11,
13067,
259,
4021,
72,
1424,
4106,
11,
2... | 2.38913 | 920 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Splits the LD reference panel into multiple subfiles, to greatly speed up
# GCTA-cojo. Each subfile is a 3-Mb window, so that for any top_loci variant,
# we can use a subfile that has the top_loci variant +- 1 Mb.
import pandas as pd
import os
import subprocess as sp
i... | [
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,
13341,
896,
262,
27178,
4941,
6103,
656,
3294,
850,
16624,
11,
284,
9257,
2866,
510,
198,
2,
402,
4177,
... | 2.362229 | 323 |
from .device_simulator import DeviceSimulator
from .server_simulator import SingleDeviceServerSimulator
| [
6738,
764,
25202,
62,
14323,
8927,
1330,
16232,
8890,
8927,
198,
6738,
764,
15388,
62,
14323,
8927,
1330,
14206,
24728,
10697,
8890,
8927,
198
] | 4.333333 | 24 |
from django.conf import settings
from django.core.cache import cache
from django.db import models
from collections import OrderedDict
RUOLI = [('ND', 'ND - Personale non docente'),
('DC', 'DC - Dirigente a contratto'),
('NB', 'NB - ND Centro Residenziale'),
('D0', 'D0 - Dirigenti Superiori'... | [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
12940,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
628,
198,
49,
52,
3535,
40,
796,
685,
1... | 1.975795 | 3,553 |
import argparse
import re
import json
from .analyzer import TuroyoAnalyzer
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Analyze Turoyo words and sentences from command line.\n'
'Usage: python3 -m uniparser-turoyo (Turoyo sentence here.)... | [
11748,
1822,
29572,
198,
11748,
302,
198,
11748,
33918,
198,
6738,
764,
38200,
9107,
1330,
309,
1434,
8226,
37702,
9107,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
2957... | 2.487047 | 193 |
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from pants.backend.python.subsystems import setup
from pants.base.deprecated import warn_or_error
| [
2,
15069,
33448,
41689,
1628,
20420,
357,
3826,
27342,
9865,
3843,
20673,
13,
9132,
737,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
3826,
38559,
24290,
737,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
... | 3.814286 | 70 |
import lib
from lib.common import calc_stat
from collections import OrderedDict
runs = lib.get_runs(["cogs_trafo"])
runs = lib.common.group(runs, ['transformer.variant'])
stats = calc_stat(runs, lambda k: k.endswith("/accuracy/total"))
runs = lib.get_runs(["pcfg_nosched_productivity"])
runs = lib.common.group(runs, [... | [
11748,
9195,
198,
6738,
9195,
13,
11321,
1330,
42302,
62,
14269,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
48381,
796,
9195,
13,
1136,
62,
48381,
7,
14692,
66,
18463,
62,
9535,
6513,
8973,
8,
198,
48381,
796,
9195,
13,
... | 2.531579 | 570 |
# -*- coding: utf-8 -*-
import numpy as np
import torch as t
import torch.nn as nn
from torch import FloatTensor as FT
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
355,
256,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
198,
6738,
28034,
1330,
48436,
51,
22854,
355,
19446,
6... | 2.755556 | 45 |
import sys
import unittest
from functools import reduce
from http import HTTPStatus
from unittest.mock import call, patch
import cloudfoundry_client.main.main as main
from abstract_test_case import AbstractTestCase
from fake_requests import mock_response
| [
11748,
25064,
198,
11748,
555,
715,
395,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
2638,
1330,
14626,
19580,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
869,
11,
8529,
198,
198,
11748,
6279,
9275,
563,
62,
16366,
13,
12417,... | 3.779412 | 68 |
#!/usr/bin/env python
# Imports
import aiohttp
import logging
import json
logger = logging.getLogger('aprs-service')
class DarkSky:
"""Class to handle querying the DarkSky API."""
async def _wx(self, lat, lng):
"""Query the DarkSky API."""
logger.info("DarkSky request for {}, {}".format(la... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
1846,
3742,
198,
11748,
257,
952,
4023,
198,
11748,
18931,
198,
11748,
33918,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
499,
3808,
12,
15271,
11537,
628,
... | 2.12709 | 897 |
from html.parser import HTMLParser
from pathlib import Path
from typing import Union, TypeVar
import jinja2
from onemsdk.config import get_static_dir
from onemsdk.exceptions import MalformedHTMLException, ONEmSDKException
from onemsdk.parser.node import Node
from onemsdk.parser.tag import get_tag_cls, Tag
__all__ = ... | [
6738,
27711,
13,
48610,
1330,
11532,
46677,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
4479,
11,
5994,
19852,
198,
198,
11748,
474,
259,
6592,
17,
198,
198,
6738,
319,
5232,
34388,
13,
11250,
1330,
651,
62,
12708,
62,
... | 3.036232 | 138 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-03 19:08
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
17,
319,
2177,
12,
2919,
12,
3070,
678,
25,
2919,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.73913 | 69 |
from django.shortcuts import render, redirect
# Create your views here.
from django.http import HttpResponse
from website.models import *
from django.contrib import messages
from passlib.hash import pbkdf2_sha256
from . import functions
from django.core.exceptions import ObjectDoesNotExist
# 0 Admin, 1 Customer, 2... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
198,
2,
13610,
534,
5009,
994,
13,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
3052,
13,
27530,
1330,
1635,
198,
198,
6738,
42625,
14208,
... | 3.182741 | 197 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sqlite3
import click
click.disable_unicode_literals_warning = True
sql = """create table if not exists users(
id integer primary key autoincrement,
name varchar(30)
)
"""
@click.group()
@cli.command(short_hel... | [
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,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
44161,
578,
18,
198,
11748,
3904,
198,
198... | 2.873626 | 182 |
#!/usr/bin/python3
from PyQt5.QtWidgets import QApplication, QLabel
app = QApplication([])
label = QLabel(' Hello World !!!! ')
label.show()
app.exec_()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
23416,
11,
1195,
33986,
198,
198,
1324,
796,
1195,
23416,
26933,
12962,
198,
18242,
796,
1195,
33986,
10786,
220,
18... | 2.57377 | 61 |
# Generated by Django 4.0.2 on 2022-03-14 10:09
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
13,
17,
319,
33160,
12,
3070,
12,
1415,
838,
25,
2931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from core.logger import Logger
from db_spec import DBSPEC
from datetime import datetime
import pytz
from tzwhere import tzwhere
import csv
logger = Logger()
DB = None
GEO = tzwhere.tzwhere(forceTZ=True)
| [
6738,
4755,
13,
6404,
1362,
1330,
5972,
1362,
198,
6738,
20613,
62,
16684,
1330,
20137,
48451,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
12972,
22877,
198,
6738,
256,
89,
3003,
1330,
256,
89,
3003,
198,
11748,
269,
21370,
198... | 2.890411 | 73 |
# Generated by Django 3.0.8 on 2020-07-11 12:57
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
23,
319,
12131,
12,
2998,
12,
1157,
1105,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
""""Argo Workflow for building the notebook-server-jupyter-pytorch OCI images using Kaniko"""
from kubeflow.kubeflow.cd import config, kaniko_builder
def create_workflow(name=None, namespace=None, bucket=None, **kwargs):
"""
Args:
name: Name to give to the workflow. This can also be used to name
... | [
15931,
15931,
3163,
2188,
5521,
11125,
329,
2615,
262,
20922,
12,
15388,
12,
73,
929,
88,
353,
12,
9078,
13165,
354,
24775,
40,
4263,
1262,
14248,
12125,
37811,
198,
6738,
479,
549,
891,
9319,
13,
74,
549,
891,
9319,
13,
10210,
1330,
... | 2.21322 | 469 |
# 9.4 Write a program to read through the mbox-short.txt and figure out who has
# the sent the greatest number of mail messages. The program looks for 'From '
# lines and takes the second word of those lines as the person who sent the
# mail. The program creates a Python dictionary that maps the sender's mail
# address... | [
2,
860,
13,
19,
19430,
257,
1430,
284,
1100,
832,
262,
285,
3524,
12,
19509,
13,
14116,
290,
3785,
503,
508,
468,
198,
2,
262,
1908,
262,
6000,
1271,
286,
6920,
6218,
13,
383,
1430,
3073,
329,
705,
4863,
705,
198,
2,
3951,
290,
... | 3.141566 | 332 |
from __future__ import annotations
import napari
from ...layers.utils.interactivity_utils import (
orient_plane_normal_around_cursor,
)
from ...layers.utils.layer_utils import register_layer_action
from ...utils.translations import trans
from ._image_constants import Mode
from .image import Image
@Image.bind_k... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
25422,
2743,
198,
198,
6738,
2644,
75,
6962,
13,
26791,
13,
3849,
21797,
62,
26791,
1330,
357,
198,
220,
220,
220,
11367,
62,
14382,
62,
11265,
62,
14145,
62,
66,
21471,
11,
198,
... | 2.791667 | 384 |